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

 

senocular.com ActionScript Library

moveBefore.as

1
2
3
4
5
// moves a child within its set of children (to before a beforeNode)
XMLNode.prototype.moveBefore = function(beforeNode){
	beforeNode.parentNode.insertBefore( this.cloneNode(true), beforeNode);
	this.removeNode();
}