Timeline scripting for mouse actions

hi everyone!
i’ve just got help from someone here with a script to tell the timeline animation to play after 5 secs:


** stop();

setTimeout(function () {
gotoAndPlay(5);
},5000);

** --------------------------
it works super great, only thing is, after i mouse over the image and the animation starts playing, the above script will kick in, and the animation will start all over again on from frame 5.

what i’m trying to do is this:
the image actually needs someone to mouse over to initiate a timeline animation, but if no one interacts with image for 5 secs, then the timeline animation will play automatically.

is there anyway i can stop the above code if someone DOES interact with the image within 5 secs?

:hangover:

sorry i’m really bad at this…how do you do that? :frowning: