2 Replies Latest reply on Sep 20, 2006 10:32 AM by NetBossUSA

    Using variables to name files

    NetBossUSA
      I have an if statement that runs a function. Inside that function I want an swf to play depending on the variable name that comes up from an array's shuffle. Can anyone help me with the syntax?

      function questions() {
      this."question" + questionNumb[0] + ".play()";
      }

      when this function runs if the vallue of the questionNumb array value 0 is 2 I want the statement to run as question2.play(); I know I have the wrong syntax but I can't find a reference to this type of statement in my action script books or online. Any help would be appreciated.

      NetBoss