1 Reply Latest reply on Mar 1, 2008 4:44 AM by Newsgroup_User

    FlashVars something strange

    mishmashup
      I can not get flashvars to work in my project. So I created a brand new file and followed the flashdocs tutorial and this is what happens:


      1. In CS3 create a new flash file (Actionscript 2.0) called myflashvars.fla.

      2. In the first frame I use this actionscript:


      this.createTextField("myTxt", 100, 0, 0, 100, 20);
      myTxt.autoSize = "left";
      if (_level0.myURL == undefined) {
      myTxt.text = "myURL is not defined";
      } else {
      myTxt.text = _level0.myURL;
      }


      3. I publish it. And use this object tag:


      <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase=" http://fpdownload.adobe.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="550" height="400" id="myflashvars" align="middle">
      <param name="allowScriptAccess" value="sameDomain" />
      <param name="movie" value="myflashvars.swf" />
      <param name="FlashVars" value="myURL=http://weblogs.adobe.com/">
      <param name="quality" value="high" />
      <param name="bgcolor" value="#ffffff" />
      <embed src="myflashvars.swf" FlashVars="myURL=http://weblogs.adobe.com/" quality="high" bgcolor="#ffffff" width="550" height="400" name="myflashvars" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage=" http://www.adobe.com/go/getflashplayer" />
      </object>


      3. I view the html in my web browser (tried both firefox and safari), and I see the text "myURL is not defined".



      Assuming I didn't mistype any of the code, what could I be doing wrong?