# How to retrieve the current browser URL

**URL:** <https://forum.kirupa.com/t/how-to-retrieve-the-current-browser-url/86209>\
**Category:** flash\
**Created:** [April 11, 2005, 7:37am UTC](https://forum.kirupa.com/t/how-to-retrieve-the-current-browser-url/86209 "2005-04-11T07:37:31Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![glads](https://avatars.discourse-cdn.com/v4/letter/g/5e9695/32.png) [@glads](https://forum.kirupa.com/u/glads)\
**Post date:** [April 11, 2005, 7:37am UTC](https://forum.kirupa.com/t/how-to-retrieve-the-current-browser-url/86209/1 "2005-04-11T07:37:31Z")

</div>

Hello,

I’d like to create a SWF file that will be able to play different frames when different links are clicked.  
However, I need the SWF file to be independent of the links. That means that the links are sitting on a HTML page. This also means that I need to be able to retrieve the current browser URL. And then depending on the links clicked (URL retrieved), it will gotoAndPlay a different frame when different links are clicked.

I tried movieclip.\_url but it returns the URL where the SWF is loaded, thus it is of no use (see script below). What is the function I should use?

Please help.

onClipEvent(enterFrame) {

var location = this.\_url;  
if (location == “[www.kirupa.com](http://www.kirupa.com)”) {  
\_root.mc.gotoAndPlay(5);

Thanks  
Glads
