/ Published in: ActionScript 3
pass variables from from url into flash
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
var keyStr:String; var valueStr:String; var theVars:Array = new Array(); try { var paramObj:Object = LoaderInfo(this.root.loaderInfo).parameters; for (keyStr in paramObj) { valueStr = String(paramObj[keyStr]); theVars.push({key:keyStr, val:valueStr}); } init(); } catch (error:Error) { trace(error.toString()); }