Assuming the button exists in the outer swf, you would use something like this:
If the button is inside the child swf, you'll need to dispatch a custom event out of their like so:PHP Code:function escapeChildSwf(e:Event = null):void{
removeChild(loader);
loader.unload();
gotoAndPlay('someFrame');
}
And listen to that event from the parent swf:PHP Code:childBtn.addEventListener(MouseEvent.CLICK, function(e:MouseEvent):void{
dispatchEvent(new Event('killMe'));
});
PHP Code:loader.content.addEventListener('killMe', escapeChildSwf);




Reply With Quote
