I had 28 swf files, which are connected with a main swf, and the main swf is loaded external to a blank swf.
On the main swf there a 26 buttons which are linked to 26 swf and each 26 swf have a back button which will return to the main swf.
All are working fine accept the memory issue. Please help me with this
The script I used in the main swf to go to the other 26 swf is
var loader_mc : Loader = new Loader();
addChild(loader_mc);
btn_main_apple.addEventListener(MouseEvent.CLICK, buttonClick)
function buttonClick(e:MouseEvent):void
{
try{
loader_mc.unloadAndStop();
} catch(e:Error) {
}
var urlRequest : URLRequest = new URLRequest("FitzroySound_A.swf");
loader_mc.load(urlRequest);
}
btn_main_bird.addEventListener(MouseEvent.CLICK, buttonClick2bird)
function buttonClick2bird(e:MouseEvent):void
{
try{
loader_mc.unloadAndStop();
} catch(e:Error) {
}
var urlRequest : URLRequest = new URLRequest("FitzroySound_B.swf");
loader_mc.load(urlRequest);
}
btn_main_cat.addEventListener(MouseEvent.CLICK, buttonClickCat)
function buttonClickCat(e:MouseEvent):void
{
try{
loader_mc.unloadAndStop();
} catch(e:Error) {
}
var urlRequest : URLRequest = new URLRequest("FitzroySound_C.swf");
loader_mc.load(urlRequest);
}
and so on…
And the script I used on the other 26 swf to return to the main swf is
var loader_mc : Loader = new Loader();
addChild(loader_mc);
logout_btn_drw_z.addEventListener(MouseEvent.CLICK, buttonClick)
function buttonClick(e:MouseEvent):void
{
try{
loader_mc.unloadAndStop();
} catch(e:Error) {
}
var urlRequest : URLRequest = new URLRequest("FitzroySound_mainScreen.swf");
loader_mc.load(urlRequest);
}
Please help me