Simple "go here then go there" script

I’m wanting to the user to hit the button and then on Release I want two things to happen in consecutive order.

1.) Rewind the previous animation and…

2.) After that has rewound, Goto the desired frame that the button would take you to.

I see this in alot of Flash Designs. I have the code to rewind the animation, but I can’t figure out how to then goto the desired frame.

Here’s the script for the MC button with the Rewind _root function:


this.onEnterFrame = function(){
if(rewind == true){
this.onRollOver = function(){
rewind = false;

this.onRollOut = function(){
rewind = true;
_root.onEnterFrame = function(){
if(_root.rewind == true){
this.onRelease = function(){
_root.rewind = true;