View Full Version : loader class and gotoandstop?

02-13-2006, 03:13 AM
Hi i'm currently struggling right now to move a swf loaded from a loader object into a display object. I'm trying to move the loaded swf into a MovieClip so i can use it's properties, but can't figure out how, nor can i find documentation on it anywhere ...

here's the general code:

loader = new Loader();
loader.addEventListener(Event.INIT, onLoadStart);
loader.addEventListener(Event.COMPLETE, onLoadComplete);

private function onLoadComplete(event:Event):void {
Console.trace('loading swf to layer ' + info.contentType);

but at that point, the output_swf currentFrame property is always at 1 ... so i know the loader must be part of the output_swf ....

any ideas?

02-13-2006, 03:45 PM
where do you create the output swf and do you ever add that to the display tree?

02-14-2006, 12:06 AM
i figured it out.

on the COMPLETE event, i had to make sure i was casting the content as a movieclip.

var clip:MovieClip = MovieClip(loader.getChildAt(0));