Hi
First, I’m new to AS3. Please take pity. Here’s what I’m trying to do:
I have multiple buttons on the stage, each calling a different SWF (that will has a FLV file in it) and trying to load it to a single MC “myLoader”. The idea is that is as you click on each button, it will replace the playing SWF with a new SWF, but instead it seems as if it plays over the SWF (instead of replacing it). The code Im working with:
portBtn1.addEventListener(MouseEvent.MOUSE_DOWN, newvid1);
portBtn2.addEventListener(MouseEvent.MOUSE_DOWN, newvid2);
function newvid1(event:MouseEvent) {
var loadit = new Loader();
myLoader.addChild(loadit);
loadit.load(new URLRequest(“port1.swf”));
}
function newvid2(event:MouseEvent) {
var loadit = new Loader();
myLoader.addChild(loadit);
loadit.load(new URLRequest(“port2.swf”));
}
Do I need to unload the MC? Any insight is appreciated.
Thanks!