How To Cancelling this.onEnterFrame = function

this.onRelease = function() {
this._x = (this._x+500);
_parent.InArrow._x = (_parent.InArrow._x-300);
this.onEnterFrame = function() {
_root.prevFrame();
};
};

Please bear with me, im new at all this!

this is the actionscript i have on a button nested within a couple of movie clips.

_root.prevFrame makes my main timeline run back from frame 15 to frame 1. When the main time line hits 1 i need the

this.onEnterFrame = function() {
_root.prevFrame();

to be cancelled, but i can’t work out how to do it.

all help much appreciated. Attached is the swf of where i am so far, it should give you a better idea of why i need this to be cancelled.

do you mean…

delete this.onEnterFrame;

yes, but i need it to occur when the main timeline enters frame 1 (its running backwards at this point from frame 15 back to frame 1).

i just don’t seem to be able to get it to work,

i’ve tried putting this actionscript on the 1st frame of the main time line and mapping the command thro to the button MC and also tried putting actionscript on the button which says when main timeline enters frame 1 delete onEnterFrame but with no joy.

attached is the .fla as it stands, i’ve cleaned it back to working bits as it had become messy and confusing!

sorted!!!