homepage Welcome to WebmasterWorld Guest from 54.205.144.54
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / Flash and Shockwave
Forum Library, Charter, Moderator: open

Flash and Shockwave Forum

    
loading/unloading external swf (external swf has mx transitions)
sircheel




msg:3946752
 5:44 am on Jul 6, 2009 (gmt 0)

Hello. I'm new to AS, i'm trying to figure out on how to load external swf.

I created a new file which is AS3 (2 buttons on stage) and my external swf's has mx transitions on AS2 (consists of images and thumbnails). I followed this tutorial. [youtube.com ]

The problem is, once I click the buttons (main file) I've created, my external swf's tween won't work anymore as well as with the buttons of that external swf. In short the animation of my external swf became static. But for the initial load of the first external swf, it's working.

I don't know what's the problem. Does this have to do with the AS3 & AS2 conflicts? or something wrong with my code?

Attached here is my code:

var Xpos:Number = 110;
var Ypos:Number = 60;
var swf:MovieClip;
var loader:Loader = new Loader();


var defaultSWF:URLRequest = new URLRequest("swf/vcon_folio_white.swf");


loader.load(defaultSWF);
loader.x = Xpos;
loader.y = Ypos;
addChild(loader);
//////////////////////////////


//Btns Universal Function
function btnClick(event:MouseEvent):void{
removeChild(loader);
var newSWFRequest:URLRequest = new URLRequest("swf/" + event.target.name + ".swf");
loader.load(newSWFRequest);
loader.x = Xpos;
loader.y = Ypos;
addChild(loader);

}

//Btn Listeners
vcon_folio_white.addEventListener(MouseEvent.CLICK, btnClick);
vcon_folio_black.addEventListener(MouseEvent.CLICK, btnClick);

Hope someone can help me here in the community. :(

 

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / Flash and Shockwave
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved