0

I've got a Glow effect (glowIn) being applied to an object on the roll over which has a startDelay applied. I have another glow effect (glowOut) on roll out. If the user mouses out of the control during the startDelay of glowIn, I want to cancel the effect. How do I do this?

In this instance, I'm using a glow effect with a startDelay of 300ms. I want a short pause before the item actually shows the effect, but I don't want the effect playing if the user mouses out during this time. I'm setting the properties as follows:

component.setStyle("rollOverEffect", glowIn);
component.setStyle("rollOutEffect", glowOut);

I don't think it matters much, but the component in question is a Series within a chart that gets created at runtime so I would prefer a solution in actionscript rather than mxml if possible.

Shawn
  • 2,406
  • 1
  • 26
  • 31
  • I would if I could get acceptable answers. :) – Shawn May 05 '11 at 13:22
  • 1
    Try this [link](http://butterfliesandbugs.wordpress.com/2008/04/02/creating-smooth-rollover-and-rollout-effects/). There is an example showing how to create smooth roll-over and roll-out effects in flex. – Kyle May 05 '11 at 16:58

1 Answers1

0

I was unable to find a perfect solution to this issue so what I ended up doing was setting up a mouse-event handler for MouseOver and MouseOut on the control, setting up the effects globally and checking effect.isPlaying() within the mouse event handler.

There are some inconsistencies, however, in interrupting the effect while the start delay is playing and there are some weird results. I set up a basic Resize effect and found that if I mouse out during the start delay, the effect is correctly cancelled. But if I mouseOut when the effect has started, the control continues to grow out of control.

Shawn
  • 2,406
  • 1
  • 26
  • 31