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], "Dmitri Girski" <[EMAIL PROTECTED]> 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.
>


Reply via email to