# Redirect to another frame

**URL:** <https://forum.kirupa.com/t/redirect-to-another-frame/243719>\
**Category:** Uncategorized\
**Created:** [November 9, 2007, 9:28pm UTC](https://forum.kirupa.com/t/redirect-to-another-frame/243719 "2007-11-09T21:28:55Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![eg540](https://avatars.discourse-cdn.com/v4/letter/e/ccd318/32.png) [@eg540](https://forum.kirupa.com/u/eg540)\
**Post date:** [November 9, 2007, 9:28pm UTC](https://forum.kirupa.com/t/redirect-to-another-frame/243719/1 "2007-11-09T21:28:55Z")

</div>

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.
