The first article shows the different ways of referencing the stage and it's children.
Basically here the short list of queries to have some information of the stage and it's children:
trace("Number of children of the Stage: ");
trace(stage.numChildren);
trace("What are children of Stage: ");
trace(stage.getChildAt(0));
trace("What does the keyword this refer to? ");
trace(this);
trace("Number of children of MainTimeline: ");
trace(this.numChildren);
trace("Are this.stage and stage the same? ");
trace(this.stage == stage);
trace("How many children does this.stage have? ");
trace(this.stage.numChildren);
trace("What are the children of this.stage? ");
trace(this.stage.getChild(0));
http://www.flashandmath.com/intermediate/children/stage.html
the good collection of senocular classes includes a custom stageDetection class:
http://www.senocular.com/flash/actionscript.php?file=ActionScript_3.0/com/senocular/events/StageDetection.as
No comments:
Post a Comment