Hi all,
Is it possible to achieve the same effect as clicking a button by holding the cursor over it for a few seconds? If so, how would I achieve this?
Many thanks,
Paul
Amy Berry - 30 Mar 2007 16:37 GMT
NOT TESTED === NO FLASH ON THIS COMPUTER.
But you want something that will start a timer on you rollover, fire another
event after three seconds, and quit the timer when it reashes 3 seconds or
when you roll out.
myMovieClip.onRelease = handleRelease;
myMovieClip.onRollOver = handleRollover;
myMovieClip.onRollOut = handleRollout;
var mydate = new Date();
function handleRollover() {
var mytime = mydate.getTime();
this.onEnterFrame = fucntion() {
if (mydate.getTime() - mytime > 3000) {
this.handleRelease();
delete this.onEnterFrame;
}
}
function handleRollout() {
delete this.onEnterFrame;
}
function handleRelease() {
trace("It worked");
}
> Hi all,
>
[quoted text clipped - 3 lines]
> Many thanks,
> Paul