PDA

View Full Version : temporarily remove loader


in3eez
11-08-2008, 05:12 PM
Hi, I am loading info (xml and external swfs)
Right now they are loading fine, but I need the loaders to "unload" when you go to the other button. Right now, if I go to btn5, the xml loads, but then if I go to btn3, the swf loads, but the xml doesn't "unload".

How can I do this?
Thanks alot.


case "btn5" :
loader.load(new URLRequest("news.xml"));
removeEventListener(Event.COMPLETE, onLoaded);
break;

case "btn3" :

var request:URLRequest = newURLRequest("trailer.swf");
var videoLoader:Loader = new Loader();
videoLoader.load(request);
addChild(videoLoader);
videoLoader.x = 250;
videoLoader.y = 268;

removeEventListener(Event.COMPLETE, onLoaded);
break;