2 Replies Latest reply on Apr 3, 2009 6:31 AM by eabigelow

    targeting multiple motion tweens CS4

    eabigelow
      Hi--

      I am having a problem with targeting multiple motion tweens in Flash CS4. I am using AS2 and attempting to change the visibility of eight separate motion tweens (visible false and then true). I want to be able to affect each tween separately. I am looking to activate visibility as follows:

      if (triggerclip._currentframe == 2) {
      sword._visible=true;
      }
      if (triggerclip._currentframe == 1) {
      sword._visible=false;
      }
      where "sword" is one of the tweens and "triggerclip" is an mc that goes back and forth from frame 1 to frame 2 depending on which frame the root movie is on. I use the same script for all eight tweens, with the appropriate substitute for "sword" each time...

      Unfortunately, the AS only affects one of the eight tweens, but not the others.

      I am at a loss... Any suggestions? Many thanks!!!!
        • 1. Re: targeting multiple motion tweens CS4
          kglad Adobe Community Professional & MVP
          tweens don't have a _visible property while movieclips do.

          so, sword must be a movieclip instance name, correct?

          now, are you using movieclip instance names when trying to assign _visible properties or are you using tween names?
          • 2. Re: targeting multiple motion tweens CS4
            eabigelow Level 1
            Hi--Thanks so much for your reply.

            I am using tween names (via the properties box) PLUS I have also tried assigning names to the movie clip incidences themselves at either end of the tweens.

            I would put the tweens into separate movie clips, and then target the movie clips (rather than the tweens) BUT the tweens are masked, and the masking does not work over the tweens when they are inside movie clips.

            Does this help?