Get URL of current Browser Page

Hello, im trying to read the current URL in the address bar of the browser, in AS3.

I have done this with AS2 like this:

[AS]if (_root._url.indexOf(“https”) == -1) {
getURL(“https://www.site.com”)
}
[/AS]

I cant find anything on how this would be typed in AS3.
Thanks for any help!

The Above code (AS2) is reading the url, and if it is not sucure (http instead of https) it redeirects it to the secure page. Trying to do this in AS3.