home *** CD-ROM | disk | FTP | other *** search
/ Champak 112 / jogo-disk-112.iso / Games / barrels_of_monkey.swf / scripts / DefineSprite_45 / frame_1 / DoAction.as
Text File  |  2010-07-14  |  2KB  |  59 lines

  1. if(!master)
  2. {
  3.    _global.soundBodge = this;
  4.    master = {};
  5.    _global.sndman = new SoundManager(_root.createEmptyMovieClip("snd_mc",_root.getNextHighestDepth()));
  6.    _global.master = master;
  7.    yesSound = _global.sndman.newSound("yesSound");
  8.    yesSound.onSoundComplete = function()
  9.    {
  10.       this.remove();
  11.    };
  12.    yes1Sound = _global.sndman.newSound("yes1Sound");
  13.    yes1Sound.onSoundComplete = function()
  14.    {
  15.       this.remove();
  16.    };
  17.    yes2Sound = _global.sndman.newSound("yes2Sound");
  18.    yes2Sound.onSoundComplete = function()
  19.    {
  20.       this.remove();
  21.    };
  22.    yes3Sound = _global.sndman.newSound("yes3Sound");
  23.    yes3Sound.onSoundComplete = function()
  24.    {
  25.       this.remove();
  26.    };
  27.    noSound = _global.sndman.newSound("noSound");
  28.    noSound.onSoundComplete = function()
  29.    {
  30.       this.remove();
  31.    };
  32.    timeupSound = _global.sndman.newSound("timeupSound");
  33.    timeupSound.onSoundComplete = function()
  34.    {
  35.       this.remove();
  36.    };
  37.    clickSound = _global.sndman.newSound("clickSound");
  38.    clickSound.onSoundComplete = function()
  39.    {
  40.       this.remove();
  41.    };
  42.    lostSound = _global.sndman.newSound("lostSound");
  43.    lostSound.onSoundComplete = function()
  44.    {
  45.       this.remove();
  46.    };
  47.    wonSound = _global.sndman.newSound("wonSound");
  48.    wonSound.onSoundComplete = function()
  49.    {
  50.       this.remove();
  51.    };
  52.    master.playSound = function(s)
  53.    {
  54.       trace("playing " + s + "Sound " + this[s + "Sound"]);
  55.       _global.sndman.playAndRemove(s + "Sound");
  56.    };
  57. }
  58. stop();
  59.