Referencing dynamically attached nested movies

long title, eh? that basically explains my question, though.

what now happens: a mask continuously reveals the area behind it, based on keyboard-based movement. (that part works). There is one mask clip (mask_mc for lack of creativity), and whenever there is a key pressed, it looks like this:

var a:MovieClip = mask_mc.attachMovie(“mask”,“mask”+depth,depth);
a._x = etc. etc.

later in the script, I need to start over with the blank mask. Possible solutions: reference the nested clips, and remove them all, or delete the whole clip and attach a new one. when I tried the latter, it just attached another version of the more complex mask. When i tried the first one, I could only figure out how to point to “undefined”

that didn’t seem to work… any suggestions or blatant errors on my part?