home *** CD-ROM | disk | FTP | other *** search
/ 600 Games / 600games.iso / Puzzle / crazycube.swf / scripts / __Packages / com / Sounds.as < prev    next >
Encoding:
Text File  |  2006-06-13  |  1.6 KB  |  52 lines

  1. class com.Sounds
  2. {
  3.    var winLevel;
  4.    var clickToFace;
  5.    var clickToEndPoint;
  6.    var lineComplite;
  7.    var lineNoComplite;
  8.    function Sounds(obj)
  9.    {
  10.       this.winLevel = new Sound(obj);
  11.       this.winLevel.attachSound("winLevel");
  12.       this.winLevel.onSoundComplete = this.emptyFuncForSound;
  13.       this.clickToFace = new Sound(obj);
  14.       this.clickToFace.attachSound("clickToFace");
  15.       this.clickToFace.onSoundComplete = this.emptyFuncForSound;
  16.       this.clickToEndPoint = new Sound(obj);
  17.       this.clickToEndPoint.attachSound("clickToEndPoint");
  18.       this.clickToEndPoint.onSoundComplete = this.emptyFuncForSound;
  19.       this.lineComplite = new Sound(obj);
  20.       this.lineComplite.attachSound("lineComplite");
  21.       this.lineComplite.onSoundComplete = this.emptyFuncForSound;
  22.       this.lineNoComplite = new Sound(obj);
  23.       this.lineNoComplite.attachSound("lineNoComplite");
  24.       this.lineNoComplite.onSoundComplete = this.emptyFuncForSound;
  25.    }
  26.    function playSound(type)
  27.    {
  28.       this.lineNoComplite.setVolume(60);
  29.       switch(type)
  30.       {
  31.          case "clickToFace":
  32.             this.clickToFace.start();
  33.             break;
  34.          case "clickToEndPoint":
  35.             this.clickToEndPoint.start();
  36.             break;
  37.          case "lineComplite":
  38.             this.lineComplite.start();
  39.             break;
  40.          case "lineNoComplite":
  41.             this.lineNoComplite.start();
  42.             break;
  43.          case "winLevel":
  44.             this.lineNoComplite.setVolume(30);
  45.             this.winLevel.start();
  46.       }
  47.    }
  48.    function emptyFuncForSound()
  49.    {
  50.    }
  51. }
  52.