Get current url to Flash swf using an External Interface call

Visit Publisher Site
Get current url to Flash swf using an External Interface call Hosting Promo

Sponsored by TMDHosting

Many have struggled with the task of getting you swf to read or get the current url showing in the browser, the html page the browser is at which has the swf embedded. Not to be confused with the _root._url which returns the path of the swf file. This would be helpful to know if someone is embedding your swfs on their site, or even customize your swf depending on which page it resides on. There is a pretty simple, yet virtually undocumented way to do this. We have to use javascript by calling External Interface and get the url from the DOM. Window.location.href. Then we must call the toString() function only because ExternalInterface.call requires a function rather than only reading a static property.

Visit publisher site: Get current url to Flash swf using an External Interface call

Listing Details

Filed in:
Scripts / Flash / Tutorials & Tips / Actionscript
Submitted on:
 
Last Updated:
Dec 25, 2010 
Publisher:
Other listings by this publisher

License & Pricing Information

LICENSE #1
License Type:
Freeware
Price:
$0.00 USD
Additional Info:

Featured Marketplace Listings

User Reviews 

Be the first to review this listing!