How can I find the url of the page my flash is embedded in? This may seem really simple but I cant count how often I find js functions which pass this value into the flash. ExternalInterface allows access to a wide variety of js and should not be over looked. The below line of code will call the javascript “window.location.href.toString” and return the url as a string.
1 |
var currentURL:String = ExternalInterface.call("window.location.href.toString"); |