Blog

a great conversation starts with a great topic

This is a public Blog  publicRSS

Entry

    • Flashvars in AS3
      Entry posted Feb 05 by Dan.Smith
      420 Views, 0 Comments
      Title:
      Flashvars in AS3
      Entry:

      Another new feature in AS3 ( actionscript 3 ) is the new method of calling and setting flashvars in your actionscript.  Back in actionscript 2, you just called them after setting them in your html code and magically they appeared.  AS3 is different.  While there are a few methods to do this, the simplest way I’ve found is this:

      //the name of my flashvar is myVar

      myText.text = root.loaderInfo.parameters.myVar;

      Then you can use the Flash AS3 global variable method I use here to set your flashvar in as3 as a global variable.

      MyGlobal.myString =  root.loaderInfo.parameters.myVar;