|
-
Help with AS3:unloading external swf files with mouse click
I have external swf files which open in main swf with button click. I want the swf to close on mouse click but having problem with the actionscript. Any ideas about how to do this? here's the code so far:
var img1Request:URLRequest = new URLRequest ("kelly.swf");
var img1Loader:Loader = new Loader();
kelly_mc.addEventListener(MouseEvent.CLICK, clickF);
function clickF(event:MouseEvent):void{
img1Loader.load(img1Request);
img1Loader.contentLoaderInfo.addEventListener(Even t.COMPLETE,loadNowF);
function loadNowF(event:Event):void{
container_mc.addChild(img1Loader);
}
}
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
|