Return to Snippet

Revision: 51106
at September 14, 2011 16:28 by okhy


Initial Code
/*
  Child index changed after you remove one.
*/
DisplayObject.prototype.removeAllChildren = function(){	
	for(var j = this.numChildren-1; j >= 0; j--){
		this.removeChildAt(j);
	}
}

/*

usage:
movieClipName.removeAllChildren();
moviClipParent.movieClipChild.removeAllChildren();
etc.

*/

Initial URL

                                

Initial Description

                                

Initial Title
removeAllChildren

Initial Tags
object

Initial Language
ActionScript 3