1 Reply Latest reply on Nov 3, 2008 7:15 AM by clbeech

    How do I add a tween class on button rollover?

    asiabackpacker Level 1
      Basically, I want to have one tween class effect running on my button by default. The button's scale will be "pulsating" in and out.

      Then, when you mouse over the button, it tweens up to 120%, until you roll off, then it goes back to "pulsating"....

      I can get it to "pulsate," but I can't figure out how to get that effect to stop, and apply a different tween to scale it up on rollover...

      Make sense?

      Here is the code for the first part,,,

      (on rollover, I send it to a frame that applies the rollover tween effect, however, the initial tween keeps playing)....is there a way to do this in one frame? (and get it to work)

      Any help much appreciated!

        • 1. Re: How do I add a tween class on button rollover?
          clbeech Level 3
          sure you should be able to get this to work out. I think I would place the tween declarations inside a method that you can control, then onRollOver you must call the two pulse tweens to 'stop()' and start the scale up tween - then onRollOut 'restart' the pulse tweens by calling the method once again, essentially 'restarting' the pulse.

          (i would also just place the 'scaleup' tween within the onRollOver handler for simplicity and accessibility - always try to make it easy to reference your codes - save on headaches ;)