# Why is object null?

**URL:** <https://forum.kirupa.com/t/why-is-object-null/323914>\
**Category:** Uncategorized\
**Created:** [July 24, 2011, 2:15am UTC](https://forum.kirupa.com/t/why-is-object-null/323914 "2011-07-24T02:15:01Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![oluc](https://avatars.discourse-cdn.com/v4/letter/o/cc9497/32.png) [@oluc](https://forum.kirupa.com/u/oluc)\
**Post date:** [July 24, 2011, 2:15am UTC](https://forum.kirupa.com/t/why-is-object-null/323914/1 "2011-07-24T02:15:01Z")

</div>

i am trying to access an object within a class and the object is comming up as null but i dont understand why.

this is the object:  
btnLMain = new MovieClip(); //variable declared earlier in code  
btnLMain.name = “btnLMain”;  
btnLMain.clickNum = 0;  
addChild(btnLMain);

this was created in the class: LanguageButton.

here is how i declared the above class within the class i am trying to instantiate it:  
var btnL:LanguageButton;

then i try to access the btnLMain from the LanguageButton Class and it, (btnLMain) is comming out null:

btnL = new LanguageButton(cssLoader);  
main.addChild(btnL);

[COLOR="#ff00ff"]btnL.btnLMain.addEventListener(MouseEvent.CLICK, btnLClick);[/COLOR]

do you see what i am doing wrong?
