xx3ddfan
06-24-2010, 04:13 AM
I don't want my movie clip to play unless the person's mouse is on the movie clip for more than a second. How do I code that?
stop();
var myTimer:Timer = new Timer(1000, 1);
myTimer.addEventListener(TimerEvent.TIMER, timerListener);
function timerListener (e:TimerEvent):void{
gotoAndPlay("over1");
}
image1.addEventListener(MouseEvent.MOUSE_OVER, image1overFunc);
function image1overFunc(e:MouseEvent):void {
myTimer.start();
}
stop();
var myTimer:Timer = new Timer(1000, 1);
myTimer.addEventListener(TimerEvent.TIMER, timerListener);
function timerListener (e:TimerEvent):void{
gotoAndPlay("over1");
}
image1.addEventListener(MouseEvent.MOUSE_OVER, image1overFunc);
function image1overFunc(e:MouseEvent):void {
myTimer.start();
}