< mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" backgroundColor="0xffffff" verticalScrollPolicy="off" horizontalScrollPolicy="off" creationComplete="application1_creationCompleteHandler(event)"> import com.flexlib.moudel.statistical.StatisticalService; import com.flexlib.moudel.statistical.StatisticalBar; import com .flexlib.moudel.statistical.StatisticalPane; import mx.events.FlexEvent; private var res:StatisticalService = new StatisticalService(); public function StatisticalManager(ary:Array):void { var bar:StatisticalBar = new StatisticalBar(); bar.width = 350; bar.height = 15; bar.accurate = 1; // bar.color = 0x9999ff ; var pane:StatisticalPane = new StatisticalPane(); pane.width = 520; pane.height = 15; pane.titleSpace = 50; pane.voteSpace = 35; pane.barSpace = 25; pane.percentSpace = 60; res.dataArray = ary; res.autoColorEnabled =true; res.geostrophyEnabled = true; res. geostrophy = [0xffffff,0xcccccc]; res.StatisticalList(pane,bar,cvs); } protected function application1_creationCompleteHandler(event:FlexEvent):void { var item:Object = Application.application.parameters; var aryMSG:Object = ExternalInterface.call("resultArray"); var strtmp:String; var newAry:Array = new Array(); for( var i:int = 0; i < aryMSG.length; i ) { strtmp = aryMSG[i].substring(aryMSG[i].indexOf("singleId:") 9,aryMSG[i] .length - 1); if(strtmp == item.quesID){ newAry.push(aryMSG[i]); } } StatisticalManager(newAry); } ] ]>
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn