5 Replies Latest reply on Aug 17, 2007 3:29 PM by cramroop

    Getting FlashVars variable into a Form App

    skyhead03 Level 1
      I've never had a problem setting a variable using a timeline based flash app. -

      var1 = _root.var1 or _level0
      But for the life of me, I can't figure out the syntax. None of the these work.
        • 1. Re: Getting FlashVars variable into a Form App
          klintonray Level 1
          not sure what you are trying to accomplish here, you gotta be a little more clear as to what is going on and what you are trying to do so we can figure out how to help you and explain where you are going wrong.
          • 2. Re: Getting FlashVars variable into a Form App
            klintonray Level 1
            after looking at your title again, are you just trying to reference the variable passed in by flash vars? If you are, the variable is set up upon loading.

            so say you have a quere string that you are passing in that has something like

            var1=val1&var2=val2

            when the flash app loads it will automatically have var1 and var2 set up as properties of root. The values of var1 and var2 will be val1 and val2 respectively.
            • 3. Getting FlashVars variable into a Form App
              skyhead03 Level 1
              "when the flash app loads it will automatically have var1 and var2 set up as properties of root. The values of var1 and var2 will be val1 and val2 respectively."

              That is what is NOT happening. Referencing the _root doesn't access the variables that I'm trying to pass into the swf. Like I've written, I've never had a problem with this before - there is something specific about using a Form App. that I'm missing.
              Something about working with Forms(Screens) is prohibiting me from accessing the _root ?
              Even when I set a _global.var on one Form, I can't access it from another Form. Is there some special syntax I'm missing?
              • 4. Re: Getting FlashVars variable into a Form App
                klintonray Level 1
                Hey sky,

                It's kinda hard for me to debug what your going through based on what I've read. If you want, send me your .fla with comments in the code describing what you would like to have happen, and I'll take a look at it for you later tonight.

                My email addy is school@krksales.com
                • 5. Re: Getting FlashVars variable into a Form App
                  cramroop Level 1
                  One possible cause for you not being able to access variables on the root is that if your symbols are in an external library and are being added dynamicaly, they won't be able to access anything on the root. Not too sure the reason for this but that's the way it is.