for more clearer explaination on what I'm doing is I want to handling error for application inside swf loader , not on it's initial load error. (application can be loaded normally but It's contain error inside).
On Apr 21, 4:09 pm, "[email protected]" <[email protected]> wrote: > Thx for your reply what I've done's trying to do follow your code. > In case that my test.swf still shows it's termination error on > swfloader > What am I doing wrong here's my code. > > <?xml version="1.0" encoding="utf-8"?> > <mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml" > layout="absolute"> > <mx:SWFLoader id="testswf" creationComplete="init()"> > > </mx:SWFLoader> > <mx:Script> > <![CDATA[ > import mx.rpc.events.FaultEvent; > import mx.controls.SWFLoader; > private function init():void { > //var loader : SWFLoader = new > SWFLoader(); > testswf.addEventListener(Event.COMPLETE,result); > testswf.addEventListener(IOErrorEvent.IO_ERROR,fault); > testswf.addEventListener > (ProgressEvent.PROGRESS ,checkProgressfunction); > testswf.width = 800 > testswf.height = 600 > testswf.load('test.swf'); //<----- test.swf got error > on datagrid > section > > } > > // defining functions > public function result(evt:Event):void > { > // on the result of the loader > > } > > public function fault(evt:FaultEvent):void > { > // Called if the loader get a fault state > > } > > public function checkProgressfunction(evt:ProgressEvent):void > { > // can capture how much time and data in progress of loading > > } > > ]]> > </mx:Script> > </mx:WindowedApplication> > > On Apr 20, 7:43 pm, vrathore <[email protected]> wrote: > > > > > var loader : SWFLoader = new SWFLoader(); > > loader.addEventListener(Event.COMPLETE,result); > > loader.addEventListener(IOErrorEvent.IO_ERROR,fault); > > loader.addEventListener > > (ProgressEvent.PROGRESS ,checkProgressfunction); > > > loader.load(urlReq); > > > // defining functions > > public function result(evt:Event):void > > { > > // on the result of the loader} > > > public function fault(evt:FaultEvent):void > > { > > // Called if the loader get a fault state} > > > public function checkProgressfunction(evt:ProgressEvent):void > > { > > // can capture how much time and data in progress of loading > > > } > > > Cheers > > Varun Rathorehttp://www.vrathore.blogspot.com- Hide quoted text - > > - Show quoted text - --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Flex India Community" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/flex_india?hl=en -~----------~----~----~----~------~----~------~--~---

