1 Reply Latest reply on Sep 15, 2006 2:16 PM by NSurveyor

    Random Sound script - Variable name problem?

      I am trying to play one of three intro sounds on a certain frame of a
      movie. Heres the AS I have so far:

      set ("sound", "RandAud"+Math.round(Math.random()*3));

      trace(sound); // returns RandAud1 or RandAud2 or RandAud3



      When the movie plays var_sound is echoed properly as RandAud#, but the
      sound will not play.

      All of the commented out lines play the sound properly. Is there
      something wrong with the way the variable name is passed? Any help
      would be much appreciated.


      Matt Mika