Hey guys,
I've decided to take the jump to AS3 now but im having a lot of issues... Im trying to load an external swf into a movieclip.
In AS2 it would be:
In AS3 atm i have (taken from tutorial):PHP Code:var mcLoader:MovieClipLoader = new MovieClipLoader();
var myListener:Object = new Object ();
mcLoader.addListener(myListener);
mcLoader.loadClip("mainLoader.swf","externalLoader_mc");
How can i load the URLRequest into an actual movieclip as i have done in AS2? As far as i know the load function only accepts one variable. ATM the external swf im loading is just going into thin air and i can't get anything to happen (i have the functions created to deal with the events btw).PHP Code:var myLoader:Loader = new Loader();
var myRequest:URLRequest = new URLRequest("mainLoader.swf");
myLoader.load(myRequest);
myLoader.contentLoaderInfo.addEventListener(Event.OPEN,showPreloader);
myLoader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS,showProgress);
myLoader.contentLoaderInfo.addEventListener(Event.COMPLETE,showLoadResult);
Any help would be greatly appreciated. Thx.
Edit: Just fixed it by adding externalLoader_mc.addChild(myLoader);




Reply With Quote