Posted By

leongaban on 07/30/10


Tagged

url flash embedded


Versions (?)

Who likes this?

5 people have marked this snippet as a favorite

leongaban
shalomfriss
alptugan
adrianparr
Priestd09


How to get the page URL a Flash movie is embedded on


 / Published in: ActionScript 3
 

Took a bit to figure this one out, most code out there only gives you the path to the Flash swf file instead of the actual page URL. You will need to use an ExternalInterface call

  1. import flash.external.*;
  2.  
  3. var pagePath:String = "";
  4.  
  5. //Somewhere in the body of your code
  6. pagePath = ExternalInterface.call("window.location.href.toString");

Report this snippet  

You need to login to post a comment.