Clear DisplayList

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

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

Copy this code and paste it in your HTML
  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


RSS Icon Subscribe to comments

You need to login to post a comment.