Posted By

Roshambo on 06/14/07


Tagged

url parameters params flashvars arguments


Versions (?)

Who likes this?

6 people have marked this snippet as a favorite

copyleft
fukami
gismo
shoffa
Akuma99
THEPWN3R


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


 / Published in: ActionScript 3
 

  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  

You need to login to post a comment.