Can someone check out this code

Hey guys wassap, im working on a CD based project with flash and i want it to run automatically if the user leaves the mouse idle for lets say minutes, so if the user doesnt interact with it it automatically does its thing but if the user moves the mouse i want it to reset and start counting again to 3 mins and verify if the mouse has been idel for 3 mins again, hope you guys understand what im trying to do anyways heres the code it works but the problem is if i interact with it if just jumps to whatever scene it feels like and it doesnt do what i tell it to :angy:

stop();
trace("scene 5 frame"+_root._currentframe);
proceed = function () {
 gotoAndPlay("six");
 clearInterval(go);
};
time = 5000;
go = setInterval(proceed, time);
onMouseMove = function () {
 clearInterval(go);
 go = setInterval(proceed, time);
};
trace(time);

any help is appreciated like always :beam: