Get document's URL arguments and FlashVars (a.k.a. parameters)


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



Copy this code and paste it in your HTML
  1. function getParams(documentRoot):Object
  2. {
  3. try {
  4.  
  5. var params:Object = LoaderInfo(documentRoot.loaderInfo).parameters;
  6. var pairs:Object = {};
  7. var key:String;
  8.  
  9. for(key in params) {
  10. pairs.key = String(params.key);
  11. }
  12.  
  13. } catch(e:Error) {
  14. return {};
  15. }
  16.  
  17. return params;
  18. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.