loaderinfo variables


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

pass variables from from url into flash


Copy this code and paste it in your HTML
  1. var keyStr:String;
  2. var valueStr:String;
  3. var theVars:Array = new Array();
  4.  
  5.  
  6.  
  7. try {
  8.  
  9. var paramObj:Object = LoaderInfo(this.root.loaderInfo).parameters;
  10. for (keyStr in paramObj) {
  11. valueStr = String(paramObj[keyStr]);
  12. theVars.push({key:keyStr, val:valueStr});
  13.  
  14. }
  15.  
  16. init();
  17. } catch (error:Error) {
  18. trace(error.toString());
  19. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.