# Declaring un-instantiated class makes stage=null. MOST bizzare

**URL:** <https://forum.kirupa.com/t/declaring-un-instantiated-class-makes-stage-null-most-bizzare/322178>\
**Category:** Uncategorized\
**Created:** [May 13, 2011, 1:59am UTC](https://forum.kirupa.com/t/declaring-un-instantiated-class-makes-stage-null-most-bizzare/322178 "2011-05-13T01:59:14Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shaedo](https://avatars.discourse-cdn.com/v4/letter/s/e19b73/32.png) [@Shaedo](https://forum.kirupa.com/u/Shaedo)\
**Post date:** [May 13, 2011, 1:59am UTC](https://forum.kirupa.com/t/declaring-un-instantiated-class-makes-stage-null-most-bizzare/322178/1 "2011-05-13T01:59:14Z")

</div>

In my document class I have this

```php
var __w:Who;		
trace(stage);//null

```

but if I comment out the var I get this

```php
//var __w:Who;		
trace(stage);//[object Stage]

```

It does not matter where I declare the var \_\_w:Who in the constructor, as a class var or in another function entirely.

The whole thing still operates normally but it’s irritating not being able to set my stage.align=StageAlign.TOP\_LEFT; in the constructor…

I am guessing it is something in my Who class because it does not happen if I declare any other vars

the constructor in Who pretty basic:

```php
	public function Who():void
	/*CONSTRUCTOR*/
	{
		var u:URLLoader;/*load xml or title links*/
		
		u=new URLLoader();
		u.load(new URLRequest('XML/Who.xml'));
		u.addEventListener(Event.COMPLETE,PX);
		
		th=new Sprite();
		addChild(th);
	}

```

I’m open to any suggestions on this… Something obvious I’m missing ?
