# Get URL from address bar

**URL:** <https://forum.kirupa.com/t/get-url-from-address-bar/193251>\
**Category:** flash\
**Created:** [July 10, 2006, 3:28am UTC](https://forum.kirupa.com/t/get-url-from-address-bar/193251 "2006-07-10T03:28:07Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![NaughtyPine](https://avatars.discourse-cdn.com/v4/letter/n/e9a140/32.png) [@NaughtyPine](https://forum.kirupa.com/u/NaughtyPine)\
**Post date:** [July 10, 2006, 3:28am UTC](https://forum.kirupa.com/t/get-url-from-address-bar/193251/1 "2006-07-10T03:28:07Z")

</div>

How can I have actionscript read the URL that is in the address bar?

I have an if statement that needs to compare the url in browser to a variable.

```auto

if(!pagesURL! == aLink) {
        this.onpagebg._visible = true;
    } else {
          this.onpagebg._visible = false;
    }

```
