Help with Playing timeline in reverse

Hi if this has been posted before sorry for reposting it

having problems trying to play the main timeline in reverse, I have a button on frame 5 and when its pressed want it to end back on frame 1 playing back through the animation in reverse.
Code is probally way off lol, cheers!


stop();

var targetFrame:int = 5;
var startFrame:int = 1;


actback.addEventListener(MouseEvent.CLICK, go_back);
if (currentFrame = targetFrame) 
stage.addEventListener(Event.ENTER_FRAME, go_back);


function go_back(evt:Event) :void {
    prevFrame();
    if (currentFrame = startFrame)
    stage.removeEventListener(Event.ENTER_FRAME, go_back);
}