Hi everyone,
The following code works fine. However, rather than refering to the child by instance name I want to use something like the as2 _level1.gotoAndStop.
The idea is that it’ll work for any .swf that is added using addChildAt(1) and therefore avoid having to repeat the code for lots of different .swfs
Do anyone have any ideas?
Thanks in advance,
MrT
stop();
var thisMovieClip:MovieClip;
var thisLoader:Loader = new Loader();
thisLoader.contentLoaderInfo.addEventListener(Event.INIT, doneLoading);
thisLoader.load( new URLRequest("ext.swf") );
function doneLoading(evt:Event):void {
thisMovieClip = MovieClip(thisLoader.content);
stage.addChildAt(thisMovieClip, 1);
thisMovieClip.stop();
}
butt1.addEventListener(MouseEvent.CLICK, startMotion);
function startMotion(evt:MouseEvent):void {
thisMovieClip.gotoAndStop(3);
}