views:

346

answers:

1

I have tried following things to access the FlashVars from HTML in the flash movie.

  • Added the Flashvars in embed tag
  • added the FlashVars in param tag
  • added the FlashVars in JavaScript code generated by the Adobe Flash compiler
  • Tried to access the FlashVars by using: root.loaderInfo.parameters.param_name and root.loaderInfo.parameters["param_name"]

But still I am not able to access the FlashVars. Can somebody guide me to the correct solution.

A: 

Have you tried embedding the swf with swfobject? is has a really simple syntax to pass flashvars.

to access them, I use:

var params:Object = LoaderInfo(this.root.loaderInfo).parameters;
var var1:String = params['var1'];
kajyr