Redirect to another frame

inside of a flash site, I am wanting to change to another frame depending on the previous URL. I have tried several ways but none are working. I am using AS3. I am pretty new to this. Here is what I have now.

testURL.addEventListener(MouseEvent.MOUSE_DOWN, getHistory);

function getHistory(event:MouseEvent):void{
var request = new URLRequest(“javascript:history.go(+1);”)
if (“javascript:history.go(+1)” == “/cubs/sliding/”){
gotoAndStop(2);
}else{
gotoAndStop(4);
}

}

This was a test to see if I could get a button to redirect me. It doesn’t work though.

thanks.