Tutorials, extensions, and source files for ActionScript, Flash, and other Adobe products.

 

senocular.com ActionScript Library

remove.as

Name: remove() - removes ANY movieclip, even if placed on the stage in the Flash authoring environment.
Author: senocular: www.senocular.com
Date: 1899-12-31T00:44:48.500
Documentation:
basically if you use swapDepths with a movieclip which wasnt attached or duplicated to 
be created, you can use removeMovieClip on it.  This has all the functionality of 
mc.removeMovieClip() but also works on clips placed on the screen in flash.

Example:
my_mc.remove();

1
2
3
4
MovieClip.prototype.remove = function(){
	this.swapDepths(1048575);
	this.removeMovieClip();
}