2 Replies Latest reply on Feb 11, 2007 6:00 AM by buabco

    flashvars and AS3

    buabco Level 1

      I've been reading the documentation and explains how to get the FLASHVARS when you are using flex, but how do you get them when you are using AS3? does they end up in the root object as it was with as2? or should we look for them somewhere else?

      While we are at this :), is there a way to know if the flash's movie is been hosted on the the internet or on the users PC?
        • 1. Re: flashvars and AS3
          When you send parameters via FlashVars to a swf file, those parameters will be stored in an associative array located in the property

          root.loaderInfo.parameters (root is a property of any display Object, so you can find it in a MovieClip, Sprite, Loader, etc)

          For example, if you send 2 vars "?var1=abc&var2=def"

          you will reference those variables in ActionScript with

          root.loaderInfo.parameters["var1"] or
          • 2. Re: flashvars and AS3
            buabco Level 1
            Thanks, I'll try that.