hello everyone.
new problem today.
ok so im bringing in a test external swf like so:
var loader:Loader = new Loader();
var url:URLRequest = new URLRequest("load2.swf");
loader.load(url);
addChild(loader);
Now im trying to envoke a goto and play like so:
var loaded:Object;
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, handleLoaded);
function handleLoaded(e:Event):void {
loaded = e.target.content;
}
load1.addEventListener(MouseEvent.CLICK, handleClick);
function handleClick(e:MouseEvent):void {
if (loaded) {
loaded.gotoAndPlay("outro");
}
//other content here.
}
this simple external test swf has 10 frames. @ frame 1 theres a “intro” label, @ frame 5 theres a “stop” action, and on frame 6, theres an “outro” label.
problem is that, when i click the button, it RE-imports the external swf and plays from frame 1.
any ideas/tips/hints etc or heck, even a better way to do it, id gladly appreciate. thanks in advance.