I have a rollOver event on a pop-up button in flex. I want that the menu is opened on rollover. But if the user accidentally goes with the mouse over the component the menu should not be displayed. So on rollOver I want to start a timer (wait for half second) and than check if the user is still on the pop-up button (rollOut was not fired).
My example code so far:
private function rollOverMenu(event:Event){
rollOutNow = false;
var shortDelay:Timer = new Timer(3000);
shortDelay.addEventListener(TimerEvent.TIMER_COMPLETE, timerCompleteEvent);
shortDelay.start();
}
private function timerCompleteEvent(event:Timer){
Alert.show("time is up");
if (!rollOutNow){
/*open the menu*/
}
}
The Alert "time is up" is never shown, any ideas why my timer event does not work?