View Full Version : loading/unloading external swf (external swf has mx transitions)

07-06-2009, 07:37 AM
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. http://www.youtube.com/watch?v=8hAIW0ppDww

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.x = Xpos;
loader.y = Ypos;

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

//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. :(