Posted By

marzsman on 04/04/11


Tagged

javascript swfObject parameters loaderInfo


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

burnandbass


Get parameters from Javascript


 / Published in: ActionScript 3
 

Get parameters from a flash import

  1. //Get them all
  2. try {
  3. var keyStr:String;
  4. var valueStr:String;
  5. var paramObj:Object = LoaderInfo(this.root.loaderInfo).parameters;
  6. for (keyStr in paramObj) {
  7. valueStr = String(paramObj[keyStr]);
  8. }
  9. } catch (error:Error) {
  10. trace(error.toString());
  11. }
  12.  
  13. //get a single one
  14. var string:String = root.loaderInfo.parameters['param'];

Report this snippet  

You need to login to post a comment.