home *** CD-ROM | disk | FTP | other *** search
/ 600 Games / 600games.iso / Puzzle / jig.swf / scripts / __Packages / SoundPhrase.as < prev   
Encoding:
Text File  |  2006-06-13  |  588 b   |  33 lines

  1. class SoundPhrase
  2. {
  3.    var file;
  4.    var length;
  5.    var volume;
  6.    var index;
  7.    function SoundPhrase(file, length, volume)
  8.    {
  9.       this.file = file;
  10.       if(length == undefined)
  11.       {
  12.          length = 1;
  13.       }
  14.       if(volume == undefined)
  15.       {
  16.          volume = 100;
  17.       }
  18.       this.length = length;
  19.       this.volume = volume;
  20.       this.index = 0;
  21.    }
  22.    function Next()
  23.    {
  24.       this.index = this.index + 1;
  25.       if(this.index == this.length)
  26.       {
  27.          this.index = 0;
  28.          return true;
  29.       }
  30.       return false;
  31.    }
  32. }
  33.