I'm guessing it's simpler. The stepper registers a mousedown event, which changes the enabled state to false. Since the control is disabled, it never registers a mouseup event. So the stepper thinks you are holding down one of the stepper buttons. When it reenables, the steeper acts as if it is still being clicked.
- Daniel Freiman On Tue, May 6, 2008 at 3:59 PM, Dmitri Girski <[EMAIL PROTECTED]> wrote: > So, "change" event comes if you do enabled = false/true. > > Here is the description from docs: "Dispatched ["change" event] when > the value of the NumericStepper control changes as a result of user > interaction. " > I always though that user interaction means clicks and keyboard input. > > Does it mean that NumericStepper "overreacts" on it's own property change? > > Thanks! > > Dmitri. > > --- In [email protected] <flexcoders%40yahoogroups.com>, > "valdhor" <[EMAIL PROTECTED]> wrote: > > > > I can see why - you are triggering the fOnChange function on a change > > event. Then you go ahead and change the numeric stepper by changing > > the enabled flag which triggers the change event and so on... > > > > > > > > > > --- In [email protected] <flexcoders%40yahoogroups.com>, > "Dmitri Girski" <mitek17@> wrote: > > > > > > Hi all, > > > > > > Just bumped into some strange effect - if you click on the > > > NumericStepper, then processing function disables it, does something > > > and re-enables it - it starts clicking by itself. > > > > > > Any ideas how to stop this? > > > > > > > > > Here is the code: > > > > > > <?xml version="1.0" encoding="utf-8"?> > > > <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" > > > layout="absolute"> > > > <mx:Script> > > > <![CDATA[ > > > import mx.managers.CursorManager; > > > [Bindable] > > > private var m_bFlag:Boolean = true; > > > private var m_timer:Timer = new Timer(1000, 1); > > > > > > private function fOnChange():void > > > { > > > CursorManager.setBusyCursor(); > > > m_bFlag = false; > > > m_timer.addEventListener(TimerEvent.TIMER_COMPLETE, > > > fStop); > > > m_timer.start(); > > > } > > > private function fStop(event:TimerEvent):void > > > { > > > CursorManager.removeBusyCursor(); > > > m_timer.removeEventListener(TimerEvent.TIMER_COMPLETE, > > > fStop); > > > m_bFlag = true; > > > } > > > ]]> > > > </mx:Script> > > > <mx:NumericStepper x="278" y="222" change="fOnChange()" > > > enabled="{m_bFlag}"/> > > > </mx:Application> > > > > > > > > > Thanks! > > > > > > Dmitri. > > > > > > > >

