I have this actionscript that works fine until you try and move your mouse

once you move it, the frame skips back to the beginning

why??

Code:
onClipEvent (enterFrame) {
	stop();
}

on (keyPress "<Space>") {
	play();
}