home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Geek Games #12
/
GEGA012.iso
/
eroticos
/
spankthebooty.swf
/
scripts
/
__Packages
/
SoundManager.as
< prev
Wrap
Text File
|
2005-10-13
|
2KB
|
55 lines
class SoundManager
{
static var sounds = new Object();
static var soundOn = true;
static var musicSound = null;
function SoundManager()
{
}
static function changeState()
{
SoundManager.soundOn = !SoundManager.soundOn;
if(SoundManager.soundOn)
{
SoundManager.sounds.volumiser.setVolume(100);
return "Sound ON";
}
SoundManager.sounds.volumiser.setVolume(0);
return "Sound OFF";
}
static function init()
{
SoundManager.sounds.volumiser = new Sound();
SoundManager.sounds.wak = new Sound();
SoundManager.sounds.wak.attachSound("hit");
SoundManager.sounds.swing = new Sound();
SoundManager.sounds.swing.attachSound("swing");
}
static function wak()
{
SoundManager.sounds.wak.start(0.17);
}
static function swing()
{
if(SoundManager.sounds.swing.position == 0 || SoundManager.sounds.swing.position == SoundManager.sounds.swing.duration)
{
SoundManager.sounds.swing.start();
}
}
static function musicOn()
{
var _loc1_ = _root.createEmptyMovieClip("music",997);
SoundManager.musicSound = new Sound(_loc1_);
SoundManager.musicSound.attachSound("music");
SoundManager.musicSound.start(0,99999);
}
static function setMusicLow()
{
SoundManager.musicSound.setVolume(65);
}
static function setMusicHigh()
{
SoundManager.musicSound.setVolume(100);
}
}