|
-
Load and Unload external .swf
Hello, Im currently loading an external .swf on click of a button with this action script:
button.addEventListener(MouseEvent.MOUSE_DOWN, button);
function button(event:MouseEvent):void {
import flash.display.Loader;
import flash.net.URLRequest;
var request:URLRequest = new URLRequest("mapoverlay.swf");
var loader:Loader = new Loader();
loader.load(request);
addChild(loader);}
It works fine however I also want to be able to UNLOAD this swf with a click of a button. Seems simple. but I just cant figure it out. Please Help.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|