home *** CD-ROM | disk | FTP | other *** search
- package Code.LIB.SOUND
- {
- import Code.LIB.COMPONENTS._vw412;
- import Code.LIB._nd174;
- import Code.OPTIONS._dx111;
- import flash.events.MouseEvent;
- import flash.media.Sound;
- import flash.media.SoundChannel;
- import flash.media.SoundMixer;
- import flash.media.SoundTransform;
- import flash.utils.*;
-
- public class _wj196
- {
-
- private static var iSTransform:SoundTransform = new SoundTransform();
-
- public static var iMusic:_vw412;
-
- private static var iMTransform:SoundTransform = new SoundTransform();
-
- private static var savedSoundsV:Number;
-
- private static var iSounds:Array = new Array();
-
- private static var iSChannel:SoundChannel = new SoundChannel();
-
- private static var iMChannel:SoundChannel = new SoundChannel();
-
- private static var iSoundVolume:Number = 1;
-
- public static var iSound:_vw412;
-
- private static var iList:_mv52;
-
- public static var iMusPlaying:Boolean = false;
-
- private static var iMusikVolume:Number;
-
- private static var savedMusicV:Number;
-
-
- public function _wj196()
- {
- super();
- }
-
- public static function get _qt85() : Number
- {
- return iSoundVolume;
- }
-
- public static function _nx391(param1:MouseEvent) : void
- {
- switch(param1.target)
- {
- case iMusic.iButton._ol346:
- if(iMusic.State == _vw412.stOnn)
- {
- savedMusicV = _ao83;
- _ao83 = 0;
- iMusic.State = _vw412.stOff;
- }
- else
- {
- _ao83 = !!savedMusicV ? savedMusicV : 0.7;
- iMusic.State = _vw412.stOnn;
- }
- _nd174._tp546();
- break;
- case iSound.iButton._ol346:
- if(iSound.State == _vw412.stOnn)
- {
- savedSoundsV = _qt85;
- _qt85 = 0;
- iSound.State = _vw412.stOff;
- }
- else
- {
- _qt85 = !!savedSoundsV ? savedSoundsV : 0.7;
- iSound.State = _vw412.stOnn;
- }
- _nd174._tp546();
- }
- }
-
- public static function get _ao83() : Number
- {
- return iMusikVolume;
- }
-
- public static function _nk262(param1:Array) : void
- {
- var _loc2_:Array = null;
- var _loc3_:Array = null;
- var _loc4_:Sound = null;
- iSound = new _vw412(_dx111.TSpeakerOnn,_dx111.TSpeakerOff);
- iSound._vt351 = 750;
- iMusic = new _vw412(_dx111.TMusicOnn,_dx111.TMusicOff);
- iMusic._vt351 = 700;
- iSound._lh238 = 0;
- iMusic._lh238 = 0;
- iSound.addEventListener(MouseEvent.MOUSE_DOWN,_nx391);
- iMusic.addEventListener(MouseEvent.MOUSE_DOWN,_nx391);
- iSTransform.volume = iSoundVolume;
- iMTransform.volume = iMusikVolume;
- _loc2_ = iSounds;
- for each(_loc3_ in param1)
- {
- _loc4_ = new _loc3_[1]() as Sound;
- iSounds.push([_loc3_[0],_loc4_]);
- }
- _wj196.iList = new _mv52(iSTransform);
- }
-
- public static function set _ao83(param1:Number) : void
- {
- iMusikVolume = param1;
- iMTransform.volume = iMusikVolume;
- iMChannel.soundTransform = iMTransform;
- if(iMusikVolume == 0)
- {
- iMusic.State = _vw412.stOff;
- }
- else
- {
- iMusic.State = _vw412.stOnn;
- }
- if(_nd174._ai238)
- {
- _nd174._ai238[1].prMVolume = param1;
- }
- }
-
- public static function _rh198() : void
- {
- iSChannel.stop();
- }
-
- public static function _ss148() : void
- {
- iMusPlaying = false;
- SoundMixer.stopAll();
- }
-
- public static function _ti225(param1:String) : void
- {
- _wj196.iList.add(_rm64(param1));
- }
-
- public static function _va384(param1:String, param2:Boolean = false) : void
- {
- var _loc3_:Sound = null;
- iSTransform.volume = iSoundVolume;
- iMTransform.volume = iMusikVolume;
- _loc3_ = _rm64(param1);
- if(!_loc3_)
- {
- return;
- }
- if(param2)
- {
- if(iMusPlaying)
- {
- return;
- }
- iMusPlaying = true;
- iMChannel.stop();
- iMChannel = _loc3_.play(0,999,iMTransform);
- }
- else
- {
- iSChannel = _loc3_.play(0,0,iSTransform);
- }
- }
-
- public static function set _qt85(param1:Number) : void
- {
- iSoundVolume = param1;
- if(_nd174._ai238)
- {
- _nd174._ai238[1].prSVolume = param1;
- }
- if(iSoundVolume == 0)
- {
- iSound.State = _vw412.stOff;
- }
- else
- {
- iSound.State = _vw412.stOnn;
- }
- }
-
- private static function _rm64(param1:String) : Sound
- {
- var _loc2_:Array = null;
- for each(_loc2_ in iSounds)
- {
- if(_loc2_[0] == param1)
- {
- return Sound(_loc2_[1]);
- }
- }
- return null;
- }
- }
- }
-