Hei, i’ve got problem with unload my child.swf,
I eksternally loaded and I controlled from main time…
the bugs are:
- If I wanna go to another swf file, i still can hear the sound…
- if I click the button wich linked to mp3.swf, the sound/song are duplicated by2, and then if I click again the sound are duplicated by3…
how I can fix this problem???
hereis my code to call the child swf :
var Xpos:Number = 140;
var Ypos:Number =100;
var swf:MovieClip;
var loader:Loader = new Loader();
addChild(loader);
// Buttuns Universal function
function btnClick(event:MouseEvent):void {
removeChild(loader);
var newSWFRequest:URLRequest = new URLRequest("swfs/" + event.target.name + ".swf");
loader.load(newSWFRequest);
loader.x = Xpos;
loader.y = Ypos;
addChild(loader);
}
// Btn listeners
shout.addEventListener(MouseEvent.CLICK, btnClick);
song.addEventListener(MouseEvent.CLICK, btnClick);
gallery.addEventListener(MouseEvent.CLICK, btnClick);
about.addEventListener(MouseEvent.CLICK, btnClick);