You can do that with ExternalInterface. See this: http://learn.adobe.com/wiki/display/Flex/External+Interface
This is the flow you need to follow...
3. Store the result of the ExternalInterface call into a String variable and show that on Alert
Check ExternalInterface class.
As an example,
urlPath = ExternalInterface.call(”window.location.href.toString”);
Here are some LiveDocs pages and other resources that should help:
If this helps you, please mark it as such.