Quick removeMC problem

[AS]if (this.Delete == true) {
this.swapDepths(6666666);
this.removeMovieClip();
}[/AS]

The MC i’m tring to delete was not dynamically made. I heared i had to swap the depth to a positive # for the removeMovieClip(); command to work.
What did i do wrong?

thanx in advance:thumb2:

I don’t know if I’d use the reserved word “Delete” try using deleteClip as as your var name, and then in the if statement, trace “this” and make sure its referencing the correct mc - I’ve had some issues w/ removeMovieClip as well, and sometime have resorted to simply placing the mc offstage, hope this helps

creatify

Delete is not a resrved word :wink:

Problem is that Flash doesn’t have 6666666 depth levels but rather something closer to 16000, try this:

if (this.Delete == true) {
 this.swapDepths(1928);
 this.removeMovieClip();
}

:cowboy:

Removable depths: 0 - 1,048,575 :wink:
http://www.kirupa.com/developer/actionscript/depths2.htm

scotty(-: