home *** CD-ROM | disk | FTP | other *** search
- class SoundPhrase
- {
- var file;
- var length;
- var volume;
- var index;
- function SoundPhrase(file, length, volume)
- {
- this.file = file;
- if(length == undefined)
- {
- length = 1;
- }
- if(volume == undefined)
- {
- volume = 100;
- }
- this.length = length;
- this.volume = volume;
- this.index = 0;
- }
- function Next()
- {
- this.index = this.index + 1;
- if(this.index == this.length)
- {
- this.index = 0;
- return true;
- }
- return false;
- }
- }
-