3 Replies Latest reply on Dec 6, 2006 1:27 PM by kglad

    simple question - variable instance name

    ddirk
      Ok, I am creating an image loader type of program. I am using a for ( ) loop to cycle through and load each image into a new holder.

      The problem I am having is that i am not sure how to use a variable holder instance name... example below

      removeMovieClip('holder'+i); // remove old holder
      this.createEmptyMovieClip('holder'+i,-16384); // create new holder
      setProperty ('holder'+i,_x,imageX); // set holder x location
      setProperty ('holder'+i,_y,imageY); // set new holder y location

      then this works

      holder1.loadMovie('images/'+i+'.jpg') // load image 1 into holder

      but this doesn't

      holder+'i'.loadMovie('images/'+i+'.jpg') // load image 1 into holder\

      So the question is... how do I load an image into a holder that has a variable name?