home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
404 Jogos
/
CLJG.iso
/
Esportes
/
CrossingCup.swf
/
scripts
/
__Packages
/
COptionsScreen.as
< prev
next >
Wrap
Text File
|
2007-12-11
|
3KB
|
94 lines
class COptionsScreen extends CScreen
{
function COptionsScreen()
{
super();
}
function setup()
{
if(_global.AppStarted == undefined)
{
return undefined;
}
this._visible = true;
this.slVolume.setVal(CSessionManager.ins().sndOverallVolume);
this.slMusic.setVal(CSessionManager.ins().sndMusicVolume);
this.slEffect.setVal(CSessionManager.ins().sndEffectsVolume);
var _loc3_ = Math.round(CSessionManager.ins().numPlayPerGame / 20 * 100);
this.slGame.setVal(_loc3_);
if(CTournament.ins().tournamentPhase > 1)
{
this.slGame._visible = false;
}
else
{
this.slGame._visible = true;
}
this.txGame.text = String(CSessionManager.ins().numPlayPerGame);
switch(this._quality)
{
case "LOW":
this.slGraphic.setVal(0);
break;
case "MEDIUM":
this.slGraphic.setVal(50);
break;
case "HIGH":
this.slGraphic.setVal(100);
}
EventCenter.access().addEventListener("sliderpress",this);
EventCenter.access().addEventListener("sliderrelease",this);
EventCenter.access().addEventListener("slidermove",this);
}
function sliderrelease(ob)
{
switch(ob.param._name)
{
case "slVolume":
CSessionManager.ins().sndOverallVolume = this.slVolume.getVal();
trace("changing volume baibe to " + CSessionManager.ins().sndOverallVolume);
SoundManager.ins().setOverallVolume();
break;
case "slMusic":
CSessionManager.ins().sndMusicVolume = this.slMusic.getVal();
SoundManager.ins().setMusicVolume();
break;
case "slEffect":
CSessionManager.ins().sndEffectsVolume = this.slEffect.getVal();
SoundManager.ins().setEffectVolume();
break;
case "slGraphic":
var _loc2_ = this.slGraphic.getVal();
if(_loc2_ < 33)
{
this._quality = "LOW";
this.slGraphic.setVal(0);
}
else if(_loc2_ > 66)
{
this._quality = "HIGH";
this.slGraphic.setVal(100);
}
else
{
this._quality = "MEDIUM";
this.slGraphic.setVal(50);
}
break;
case "slGame":
if(CTournament.ins().tournamentPhase > 1)
{
return undefined;
}
_loc2_ = Math.round(this.slGame.getVal() / 100 * 19);
if(_loc2_ < 2)
{
_loc2_ = 2;
}
CSessionManager.ins().numPlayPerGame = _loc2_;
this.txGame.text = String(_loc2_);
break;
}
}
}