Like most browser information, this value is most easily retrieved using JavaScript.

Using ExternalInterface, you can call “window.location.href.toString” to retrieve the location of your running Flex application. This method also has the added benefit of returning any query parameters passed into the URL.

Sample code:

public function getWindowLocation () : String
{
    var location : String = null;

    if (ExternalInterface.available)
    {
        try
        {
            location = ExternalInterface.call
                ("window.location.href.toString");
        }
        catch (error : Error)
        {
            location = null;
        }
    }

    return location;
}