Play pause an animation wth action script

Hi all,

having a small issue that shouldn’t be difficult at all to solve for you pros.
I have a symbol tweening from frame1 to frame100, via a motion tween. However for other reasons, I want this tween to be driven by action script. I searched the forums I found this solution:

onClipEvent (enterFrame) {
	speed = 1;
	this._x -= speed;
}

I applied this code to the symbol and it works a dream, and I am more than happy.
My question is, when you rollover this symbol while it is moving, how do you make the symbol stop? Then on rollout, how do you make the symbol start moving again?

Thanks for your help in advance

Enforcer73