veiky
11-07-2006, 05:46 AM
Hi,
I have placed this code on click of a button
restart_btn.addEventListener(MouseEvent.CLICK, raceReset);
function pageReset(event:MouseEvent):void
{
var ldr:Loader = new Loader();
var url:String = "mypage.swf";
var urlReq:URLRequest = new URLRequest(url);
ldr.load(urlReq);
addChild(ldr);
}
This is working fine. but when i click this button more than 3-4 times the speed of the page(some animation) goes down. I think that is because, I am loading the page again and again but not unloading it.
Any solution?
Thanks...
I have placed this code on click of a button
restart_btn.addEventListener(MouseEvent.CLICK, raceReset);
function pageReset(event:MouseEvent):void
{
var ldr:Loader = new Loader();
var url:String = "mypage.swf";
var urlReq:URLRequest = new URLRequest(url);
ldr.load(urlReq);
addChild(ldr);
}
This is working fine. but when i click this button more than 3-4 times the speed of the page(some animation) goes down. I think that is because, I am loading the page again and again but not unloading it.
Any solution?
Thanks...