Load external swf gallery
I’m trying to load a swf that contains a flash gallery in to a movieClip.
The problem is that load the swf but the gallery isn’t able to load it’s images so i only get the blank swf.
The funny thing is that when i use a UILoader at startup everithing, everything loads so it’s ok, when i tell it to load on a click event it stops working.
I have the following code …
The problem is that load the swf but the gallery isn’t able to load it’s images so i only get the blank swf.
The funny thing is that when i use a UILoader at startup everithing, everything loads so it’s ok, when i tell it to load on a click event it stops working.
I have the following code …
ActionScript Code:
b1.addEventListener(MouseEvent.CLICK,startLoad); function startLoad(e:Event) { var mLoader:Loader = new Loader(); var mRequest:URLRequest = new URLRequest("fisa.swf"); mLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, onCompleteHandler); mLoader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, onProgressHandler); mLoader.load(mRequest); } function onCompleteHandler(loadEvent:Event) { addChild(loadEvent.currentTarget.content); } function onProgressHandler(mProgress:ProgressEvent) { var percent:Number = mProgress.bytesLoaded/mProgress.bytesTotal; trace(percent); trace (mProgress.bytesLoaded) trace (mProgress.bytesTotal); }
Where b1 is a button
Original post by toby31