/ Published in: ActionScript 3
<p>Alternatively, to access the URL where the SWF resides we can access the url property of the LoaderInfo object belonging to our SWF's root. Note this is the location of the SWF file and NOT the HTML page it's embedded in. It's important to make this distinction as both the SWF and HTML could reside on different domains.</p>
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
root.loaderInfo.url;