PDA

View Full Version : Joining .swf problems


tjholden
10-25-2011, 08:36 PM
I am trying to link three .swfs together. swf1 is composed in AS2 and requires a button click within the .swf to access swf2.

.swf2 is also currently in AS2 and also requires a button click within the .swf to access .swf3.

.swf3 is composed in AS3. There is a navigation button back to .swf2. All access the .swfs correctly. The problem is in the last step. The button in .swf2 no longer can access .swf3 after the initial happy path.

swf2-> swf3 ->swf2 button does not work to go back to swf3. My guess is that I am not unloading the swfs. Any help/insight would be greatly appreciated.

AS3 code
main_btn.addEventListener(MouseEvent.CLICK, clickHandler);

var loader:Loader = new Loader();
addChild(loader);

function clickHandler(e:Event):void{

switch(e.target.name){
case "main_btn": loader.load(new URLRequest("swf2.swf")); break;
}
}

AS2 code
infrastructure_btn.onPress = function(){
infrastructure();
}
function infrastructure(){
loadMovie("swf3.swf", 0);
}