3 Replies Latest reply on Dec 3, 2007 1:35 PM by kglad

    removing dynamic MCs

    influxxmedia
      Hi

      I have some code that generates dynamic MCs and attaches a linked library item. It is created inside of a faux loop, where i equals 0,1 or 2, and these correspond to values in an array: If i==1 use array[1] etc...

      The problem I am having is with a dynamically generated MC with an instance name corresponding to the value of i, like this "genImg_mc"+i. I can use removeMovieClip() to remove a hard-coded MC (eg: genImg_mc2), but I cannot find the correct syntax to remove an MC with the value of i. I hope this makes sense. The code below is the function that is called on a setInterval, and everything works, but after severall minutes the dynamically created MCs build up to the point of bogging down the player. I want to remove the MC on the depth below the MC just created, hence using it inside the onMotionFinished function.

      Please any help will spare my sanity here.
      mm66