4 Replies Latest reply on Feb 20, 2009 5:30 AM by ggles.fi

    FlashVars problem

      I seem to be having some trouble passing variables to Flash. Even when I step back and test it out with the FlashVars tutorial from the help menu. Here, have a look:


      You will see...nothing! I've tried it on multiple browsers, and this example was created following the Adobe Help instructions exactly. Very frustrating.

      The Actionscript I have posted to the first frame of that swf is:

      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;

      I just need to pass two simple number vars into my animation. Help...anyone?
        • 1. Re: FlashVars problem
          Greg Dove Level 4
          well it seems strange that you're not getting nothing no even the 'myURL is not defined' message.

          I don't know how old the tutorial is - even though its in CS3. You page code has the active content javascript embedding code. And flash Vars is not set up in there.
          edit your html (manually ) and add this line:
          after this line:
          'movie', 'myflashvars',

          see if that makes a difference.
          • 2. Re: FlashVars problem
            Thanks GWD. That was part of the solution.

            I also had to go back to my publising settings and drop my Flash Player Version back to 8, then re-publish.

            Does that mean Flash Player 9 doesn't support FlashVars? Is there another method we should use to pas vars into Flash?
            • 3. Re: FlashVars problem
              Greg Dove Level 4
              I doubt very much that player 9 doesn't support it, because flash 8 content plays in player 9 no problems and if it didn't work it would very likely break a lot of flash 8 content out there. I'm sure we would have heard about it! Are you sure that you have player 9 installed for your browser? Also if you have firefox do a search for the flashswitcher plugin - its useful to have for testing different player versions.

              I tend to use Geoff Stearn's SwfObject for embedding you might want to also check that out . http://blog.deconcept.com/
              • 4. Re: FlashVars problem
                Well, I'm seeing the same thing, too. VERY frustrating -- following the adobe docs TO THE LETTER and finding that its a bug there. Using swfobject showed that flashvars params are working as expected. Adobe, save countless others n00bs time and update your code, please!