Movieclip troubles

Hello,

I’m trying to create a simple sound wave effect in AS 2.0. I have an object moving and generating a soundwave everyonce in awhile but when it goes off the side I want the object and soundwave to appear on the other side. Here’s what I tried


function cleanUp()
{
 ct = 0;
 for(var mc in this)
 {
  if(mc == "sound")
  {
   ct++;
   trace("MOVING"+this[mc]+" number "+ct+" from "+this[mc]._x);
   this[mc]._x = 0;
  }
 }
}

If I produce the first soundwave right as the object is about to go off the stage, everything appears on the other side of the screen correctly. However, all other soundwaves after that do not appear on the other side of the screen. I create soundwaves with this function:


function showMovie(linkageId, xpos, ypos,rot) 
{
    var linkageId :String;
    var xpos:Number;
    var ypos:Number;
    myMovie = this.createEmptyMovieClip(linkageId, this.getNextHighestDepth());
    myMovie._x = xpos;
    myMovie._y = ypos;
 myMovie.attachMovie(linkageId,e,this.getNextHighestDepth());
}