In my document class I have this
var __w:Who;
trace(stage);//null
but if I comment out the var I get this
//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:
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 ?