# Removing Null Object

**URL:** https://forum.kirupa.com/t/removing-null-object/299515
**Category:** Uncategorized
**Created:** [November 6, 2009, 2:29am UTC](https://forum.kirupa.com/t/removing-null-object/299515 "2009-11-06T02:29:44Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Daimz](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/daimz/32/2383_2.png) [@Daimz](https://forum.kirupa.com/u/Daimz)
#### Post date: [November 6, 2009, 2:29am UTC](https://forum.kirupa.com/t/removing-null-object/299515/1 "2009-11-06T02:29:44Z")

</div>

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.

```auto
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);
}

```
