views:

19

answers:

1

Hi,

In my web based flex app I have a HSlider to which 'change' event listener is binded. Inside the event listener function I have the following.

trace('slider click target: '+e.clickTarget);

I am changing the slider value from a timer (say every second). At this time, in the console I see that traget is being printed as null every second.

Now, if I change the value by dragging the thumb, it prints target as thumb. And then onwards it keeps printing the target as thumb every second instead of printing null. The same thing happens if change the slider value by clicking track (it keeps printing track).

Basically, I have the event listener to find out if the value of the slider is changing due to the timer, click on thumb or click on track. Kindly let me know if this issue can be fixed or is there any other approach I can follow. Thanks!!

+1  A: 

This is strange, because the documentation says that the change event is dispatched when the slider changes value due to mouse or keyboard interaction - the event is not triggered when you change it programmatically, and the listener shouldn't even be called.

Are you calling the event listener manually? Post some more code - where you update the slider value and the full event listener.

Amarghosh