4 Replies Latest reply on Jul 22, 2009 6:12 PM by kglad

    Using flashvars to access variables from html to swf

    Sreelash Level 1

      Hi, In many tutorial i have find how to use FlashVars in embed or object tag of html. I used the FlashVars in an html file as follows:


      <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="312" height="319" id="rot14-07-09" align="middle">
          <param name="allowScriptAccess" value="sameDomain" />
          <param name="allowFullScreen" value="false" />
         <param name="FlashVars" value="userName=sreelash" />
          <param name="movie" value="rot14-07-09.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" />    <embed src="rot14-07-09.swf" quality="high" bgcolor="#ffffff" width="312" height="319" name="rot14-07-09" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" FlashVars="userName=sreelash"/>


      Then in the fla I tried to display the userName in a text field. But its displaying undefined. Should I define any method in fla to access the FlashVars variable.