Posted By

hejaaa on 11/16/11


Tagged

url variable


Versions (?)

Load URL variable from HTML link


 / Published in: ActionScript 3
 

  1. import flash.external.ExternalInterface;
  2. import flash.net.URLVariables;
  3.  
  4. public function readVariable(variable:String):String {
  5. var fullurl:String = ExternalInterface.call("window.location.href.toString");
  6. fullurl ? null : fullurl = "";
  7. var variablesUrl:URLVariables = new URLVariables(fullurl.split("?")[1]);
  8. variablesUrl[variable] ? null : variablesUrl[variable] = "";
  9. return variablesUrl[variable];
  10. }

Report this snippet  

You need to login to post a comment.