1 Reply Latest reply on Dec 1, 2009 6:55 AM by kglad

    referencing nested parameterd movieclip question?

    Tal770

      on stage a movie clip instance name is: LetterCont

      for (j=0; j<20; j++) {
      duplicateMovieClip("letterCont", "Letter"+j, j);
      }
      then...

      _root["Letter"+j].attachMovie("libLetter"+ j,"let"+ j,j);

       

      and now I want to refrence "let"+j

      trace(_root["Letter"+j+"let"+j].width) I get undefined

                                           |

      I tried also                     V

      trace(_root["Letter"+j+".let"+j].width) I get undefined

       

      how should I reference "let"+j

        • 1. Re: referencing nested parameterd movieclip question?
          kglad Adobe Community Professional & MVP

          if that code is on the _root timeline, the correct reference is:

           

          _root["Letter"+j]["let"+ j]

           

          but you'll still have problems because of depth collisions if the attachMovie code is using the same j values.  use:

           


          for (j=0; j<20; j++) {
          duplicateMovieClip("letterCont", "Letter"+j, j);
          }

          _root["Letter"+j].attachMovie("libLetter"+ j,"let"+ j,j+20);