Take the 2-minute tour ×

I want to use xbox kinect to run a flash application with a motion sensor, I've got a simple software to perform the function of moving the mouse and click. unfortunately not be done with just one hand, right hand to move the mouse and click the left hand to command. I wish it could be done with just one hand. My idea is to replace the function of mouse click with the mouse over function, provided that the delay was extended, can it be done? please help me how to set it to AS3, the key word is the delay time (ex three seconds) when there is mouse over the button, so that applications can run flash properly. or any advice or any other way for me?

share|improve this question

1 Answer 1

Easily done like so, might want to adjust this if you're having more than 1 button but it's quite easy to adjust if so.

var timer:Timer = new Timer(3000);
timer.addEventListener(TimerEvent.TIMER, onTimerTickHandler);

button.addEventListener(MouseEvent.ROLL_OVER, _onRollOverHandler);
button.addEventListener(MouseEvent.ROLL_OUT, _onRollOutHandler);

private function _onRollOverHandler(e:MouseEvent):void

private function _onRollOutHandler(e:MouseEvent):void

private function _onTimerTickHandler(e:TimerEvent):void

    // do something

Hope that helps.

EDIT: The reason I use MouseEvent.ROLL_OVER/MouseEvent.ROLL_OUT is because you'll experience a lot less problems this way, check the documentation if you want to know the exact difference. Good luck with your project.

share|improve this answer
thanks I will try first, I'll tell you the results on –  mainless May 28 '12 at 10:05
How did it go? hate seeing questions go without an accepted answer after this much time haha :P –  xLite Jun 13 '12 at 18:37

Your Answer


