/ Published in: ActionScript 3
Get parameters from a flash import
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
//Get them all try { var keyStr:String; var valueStr:String; var paramObj:Object = LoaderInfo(this.root.loaderInfo).parameters; for (keyStr in paramObj) { valueStr = String(paramObj[keyStr]); } } catch (error:Error) { trace(error.toString()); } //get a single one var string:String = root.loaderInfo.parameters['param'];