Question
target swifts button
having difficulty targeting a loaded swift and it's button
stage2.swf has no script just a button with a library and instance name "obj1" and is exported for actionscript
var stage2:URLRequest = new URLRequest ("stage2.swf");
var stage2Loader: Loader = new Loader();
stage2Loader.load(stage2);
addChild(stage2Loader);
stage2.obj1.addEventListener(MouseEvent.CLICK, myClick);
function myClick(evt:MouseEvent):void
{
gotoAndStop(10);
}
stage2.swf has no script just a button with a library and instance name "obj1" and is exported for actionscript
var stage2:URLRequest = new URLRequest ("stage2.swf");
var stage2Loader: Loader = new Loader();
stage2Loader.load(stage2);
addChild(stage2Loader);
stage2.obj1.addEventListener(MouseEvent.CLICK, myClick);
function myClick(evt:MouseEvent):void
{
gotoAndStop(10);
}