Apologies for the multiple posts, but I keep figuring out better ways to ask the same question and I think I might be getting closer to what the actual problem is:
I’m building a portfolio in ActionScript 3, and some of the portfolio pieces are SWFs built in ActionScript 2 created by someone other than myself (I just did the artwork). It’s a series of 8 different SWFs (although for now I’m just trying to get 2 to work) I load the first SWF and it plays just fine. Any attempt to swap that SWF with another one of these SWFs results in a distorted playback of the new SWF. Animations don’t trigger or they trigger out of sequence. Is it possible that the first loaded SWF leaves behind a set of objects, properties and variables that the following SWFs are still referencing, like a timer or something? Am I on the right track? Could that be possible?
If so, is there a way to purge any reference or trail of the previously loaded SWF?
I’ve tried unload() and removeChild(), but even with these, any attempt to load a 2nd SWF after the first one has loaded results in a messed up playback of that newly loaded SWF.
Thanks for any help with this.
I’ve attached the FLA and the SWFs.
Here’s what my code looks like right now:
var clipLoader:Loader = new Loader();
var url:String = “ad1.swf”;
var urlReq:URLRequest = new URLRequest(url);
var url2:String = “ad2.swf”;
var urlReq2:URLRequest = new URLRequest(url2);
clipLoader.load(urlReq);
addChild(clipLoader);
button.addEventListener(MouseEvent.CLICK, resetClip);
function resetClip(event:MouseEvent):void {
clipLoader.load(urlReq2);
}