Well also, you are listening to Event.INIT.
If you use a SWFLoader, listen to contentLoaderInfo for the
Event.COMPLETE event; or at least that's how you'd do it in Flex  &
AS3.
 
Blake

________________________________

From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of Alex Harui
Sent: Wednesday, March 12, 2008 10:21 AM
To: [email protected]
Subject: RE: [flexcoders] SWF download problem



Use SWFLoader

________________________________

From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of qau_yasir
Sent: Wednesday, March 12, 2008 1:15 AM
To: [email protected]
Subject: [flexcoders] SWF download problem

Hello
I tried to build an application that downloads a swf file and
installed it. Although the code I used was from the tutorial from
Adobe Livedocs. but still I find exception 
Error #2044: Unhandled IOErrorEvent:. text=Error #2036: Load Never
Completed.

My code is 
private function test():void{ 
try{ 
airSWFLoader = new Loader(); // Used to load the SWF
loaderContext = new LoaderContext(); // Used to load the SWF 
loaderContext.applicationDomain
=pplicationDomain.currentDomain;
airSWFLoader.contentLoaderInfo.addEventListener(Event.INIT, onInit);
airSWFLoader.load(new
URLRequest("http://mahmood:8080/C:/Tools/apache-tomcat-5.5.26/webapps/pr
ojectClientSerevrDesktop.swf
<http://mahmood:8080/C:/Tools/apache-tomcat-5.5.26/webapps/projectClient
SerevrDesktop.swf> "),
loaderContext);
} 
catch (e:Error){
Alert.show("Error in test() function " + e.message,"Error");
} 
} 

private function onInit(e:Event):void {

airSWF = e.target.content;
}

Any one know the problem? how to download and run/install .swf file?
regards
Yasir

 

Reply via email to