Remove code on rollOut

Hi, i have made a movieclip, and when rollOver it starts to play on frame 2 obivious…

Then on frame 20 i have a code that says:

[AS]this.gotoAndPlay(2);[/AS]

Then when it reaches frame 20 it starts on frame 2 and over and over again. My problem is now that i would like on rollOut, that the code on frame 20, would be removed or canceled or something so that the movieclip would just end. Is this possible?

Thanks

on frame 20:

[AS]
if (yourButtonName.hitTest(_root._xmouse, _root._ymouse, true)) {
gotoAndPlay(2);
} else {
stop();
}
[/AS]

Thanks mate…I dunno why i didnt thougth about this…

Varsågod!