Posted By

jpdevries on 12/27/08


Tagged

display list clear remove


Versions (?)

Who likes this?

4 people have marked this snippet as a favorite

THEPWN3R
papillion
dubogii
jondiscipulo


Clear DisplayList


 / Published in: ActionScript 3
 

Removes all children from the specified scopes display list. Straight out of Colin Moock's Essential ActionScript 3 book.

  1. var _scope:DisplayObjectContainer = this; // set the desired scope here, or below if you want to keep it to one line
  2. while(_scope.numChildren > 0) _scope.removeChildAt(_scope.numChildren-1);

Report this snippet  

Comments

RSS Icon Subscribe to comments
Posted By: onedayitwillmake on May 24, 2009

// Anything not null/undefined/(zero) -equates to true while(numChildren) removeChildAt(0);

You need to login to post a comment.