I am having some problem removing a null object and I realise that I have not been unloading my swf’s properly. Could someone take a look at what I have been doing and tell me what I can do to make it better. I am putting my website in an exhibiton of my design work and if it lagged up due to all the clicking it would suck! so its important I get this right I just need a little help if someone wouldn’t mind.
aboutBtn.addEventListener(MouseEvent.CLICK, aboutLoad);
function aboutLoad(e:MouseEvent):void {
ldr.unload();
proLdr.unload();
ldr.source = "about.swf";
}
contactBtn.addEventListener(MouseEvent.CLICK, contactLoad);
function contactLoad(e:MouseEvent):void {
ldr.unload();
proLdr.unload();
ldr.source = "contact.swf";
}
storeBtn.addEventListener(MouseEvent.CLICK, storeLoad);
function storeLoad(e:MouseEvent):void {
ldr.unload();
proLdr.unload();
ldr.source = "store.swf";
}
productsBtn.addEventListener(MouseEvent.CLICK, productsLoad);
function productsLoad(e:MouseEvent):void {
ldr.unload();
proLdr.unload();
this.product.gotoAndPlay(2);
}