Get all DisplayObjects in a Class (with name and current index)


/ Published in: ActionScript 3
Save to your folder(s)



Copy this code and paste it in your HTML
  1. private function seeDisplayStack() : void {
  2.  
  3. trace('+ number of DisplayObject: ' + this.numChildren + ' --------------------------------');
  4. for (var i : uint = 0; i < this.numChildren; ++i) {
  5. trace('\t|\t ' + i + '.\t name:' + this.getChildAt(i).name + '\t type:' + typeof (this.getChildAt(i)) + '\t' + this.getChildAt(i));
  6. }
  7. trace('\t+ --------------------------------------------------------------------------------------');
  8. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.