Posted By

Activetuts on 01/13/11


Tagged


Versions (?)

Who likes this?

8 people have marked this snippet as a favorite

chus
alsodenn
kure69
AndrewPotter
shuchii
JaaQ
im3der
elderhsouza


Get URL of the Page Where SWF is Embedded: Appendix


 / Published in: ActionScript 3
 

URL: http://enva.to/e4ig6z

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.

  1. root.loaderInfo.url;

Report this snippet  

You need to login to post a comment.