"prevFrame"

i worte a script that makes my MC to play back and forward; my qestion is how can i change the sctipt that my MC will play only after i press him (OnPress)and will stop at the end’ and play it back by prevFrame only after i hit him agine.

thanks!

this is my script:

 onClipEvent (enterFrame) {
if (this._currentframe == this._totalframes-1) {
trace("end of internal frames");
this.onEnterFrame = function() {
	 trace("backwords step");
	 prevFrame();
	 if (this._currentframe == 1) {
		 this.onEnterFrame = "";
		 trace("first frame");
		 play();
	 }
};
}
}