1 Reply Latest reply on Dec 19, 2006 2:12 PM by kglad

    duplicateMovieClip

    Level 7
      Dear All

      Please help me. What does these 2 lines really do?

      duplicateMovieClip("fade", "fade" + i, i);
      eval("fade" + i + ".font.letterfield") = substring(line1, i, 1);

      all be it the second line fails and thanks to DMennenoh, I was advised to
      use:

      var newClip = duplicateMovieClip ("fade",fade + i,200 - i)
      newClip.font.letterfield = substring (line1,i,1)

      What I am trying understand is it that "fade" is the name of the duplicated
      movie and newClip.font.letterfield is the font of an object called
      letterfield and why make this equal to substring(line1, i, 1) which I
      thought only allowed 2 parameters? I presume it is similar to Instr and Mid
      in VB?

      Can someone please enlighten me about what they think is happening here? and
      how can I re-write the line eval("fade" + i + ".font.letterfield") =
      substring(line1, i, 1) to work properly. I apologise to DMennenoh, if they
      think they have answered by previous question. I am a bit slow with this
      one.

      Thanks again for the support of the group.

      Alastair MacFarlane



        • 1. Re: duplicateMovieClip
          kglad Adobe Community Professional & MVP
          dmennoh rewrote that line with the 2nd block of code you're using.

          in your first block you're creating a movieclip with instance name tl["fade"+i], where tl is the timeline that contains your code. and font is a child object of tl["fade"+i] and letterfield is a child object of font.