1 Reply Latest reply on Jul 2, 2007 4:11 AM by moogster

    control flash movieClips from inside repeat loop

    moogster
      Hi guys

      I have a flash sprite in my score which contains 20 movieClips called button1 to button20.
      I am trying to rewind the button movieClips to their 1st frames from within a repeat loop, I've tried a few different methods but can't figure it out!

      this code works: sprite(11).button1.goToAndStop(1)

      Has anyone had any success doing this?


      Many thanks
        • 1. Re: control flash movieClips from inside repeat loop
          moogster Level 1
          Hi guys, I've figured it out.
          I ended up setting a reference to the movieClips using getVariable()

          Posted the code, might come in useful!
          -------------------------------------------------------------------------------
          property pFlashButton

          repeat with i = 1 to 20
          pFlashButton=getvariable(sprite(11),#button&i,False)
          pFlashButton.goToAndStop(1)
          end repeat
          -------------------------------------------------------------------------------

          Cheers