Pull query-string variables from the loading files URL


/ Published in: ActionScript 3
Save to your folder(s)

It's not the prettiest piece of code but it works for now


Copy this code and paste it in your HTML
  1. import flash.external.ExternalInterface;
  2. var fullurl:String = ExternalInterface.call("window.location.href.toString");
  3.  
  4.  
  5. if(fullurl){
  6. var params:Array = fullurl.split('?');
  7. fullurl = params[1];
  8. params = fullurl.split('&');
  9. var length:uint = params.length;
  10. var g:uint;
  11. for (g=0; g< length; g++){
  12. var index:int=0;
  13. var kvPair:String = params[g];
  14. if((index = kvPair.indexOf("=")) > 0){
  15. var key:String = kvPair.substring(0,index);
  16. var value:String = kvPair.substring(index+1);
  17. params[key] = value;
  18. }
  19. }
  20. }

URL: www.DegnerWeddings.com

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.