irwan

Load URL variable from HTML link

Nov 15th, 2011
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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.     }
Advertisement
Add Comment
Please, Sign In to add comment