actionscript 3 - GetChildByName is not working -
i having problem in getting child starling.current.nativestage - here code
var temp:image = starling.current.nativestage.getchildbyname("ball"+turn)as image; trace(temp.name);
the code "cannot access property or method of null object reference." making mistake or what?
help me please note*i m noob in starling
nativestage returns flash stage. these flash.display.displayobjects. cast starling.display.image via as image
. return null.
so, mean native flash stage, or starling stage - starling.current.stage
?
var temp:image = starling.current.stage.getchildbyname("ball"+turn)as image; trace(temp ? temp.name : "temp null");
Comments
Post a Comment