import flash.external.ExternalInterface;
Next, call the window location from JavaScript using the call function of ExternalInterface.
flash.external.ExternalInterface.call("window.location.href.toString");
This should work for most browsers; however, there have been reported problems using this method. If you experience difficulties with your browser, try wrapping the call in a JavaScript function.
flash.external.ExternalInterface.call("function(){ return window.location.href.toString();}")
In addition, you may want to find the path of the .swf file. Using the following code will get the path of the .swf:
var swfLocation = this.location.href;
One final note, the ExternalInterface calls only work when JavaScript is enabled on the page, so if it does not work, this may be the issue.
Happy Coding,
kieblera5