home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
404 Jogos
/
CLJG.iso
/
Esportes
/
CrossingCup.swf
/
scripts
/
__Packages
/
CNewGameScreen.as
< prev
next >
Wrap
Text File
|
2007-12-11
|
2KB
|
64 lines
class CNewGameScreen extends CScreen
{
function CNewGameScreen()
{
super();
if(_global.AppStarted == undefined)
{
return undefined;
}
this.ctr = 0;
this.onEnterFrame = function()
{
if(this.ctr > 1)
{
this.onEnterFrame = null;
this.CreateList();
_global.__DISPATCH({type:"changeTeam",id:1});
}
this.ctr = this.ctr + 1;
};
EventCenter.access().addEventListener("teamChanged",this);
_global.__DISPATCH({type:"changeTeam",id:1});
}
function teamChanged(event)
{
var _loc2_ = CTeamManager.ins().currentTeam;
this.txTeamName.text = _loc2_.teamname;
this.myflag.toid = _loc2_.flagid;
this.myflag.setFlag(_loc2_.flagid);
this.txCornerKicker.text = _loc2_.cornerkicker;
this.txKicker.text = _loc2_.kicker;
this.txGoalie.text = _loc2_.goalie;
this.mcUniform1.shirt.gotoAndStop(_loc2_.shirtcolor1);
this.mcUniform1.pants.gotoAndStop(_loc2_.pantscolor1);
this.mcUniform2.shirt.gotoAndStop(_loc2_.shirtcolor2);
this.mcUniform2.pants.gotoAndStop(_loc2_.pantscolor2);
SoundManager.ins().playMouseover();
}
function selectTeam()
{
CTournament.ins().newTournament();
_global.__DISPATCH({type:"endScreen",name:this._name});
}
function CreateList()
{
CTeamManager.ins().randomTeam();
var _loc6_ = CTeamManager.ins().teams;
var _loc5_ = 0;
while(_loc5_ < _loc6_.length)
{
var _loc4_ = CTeam(_loc6_[_loc5_]);
var _loc3_ = this.ListTeam.addThumb({identifier:"ItemList",height:25});
_loc3_.id = _loc4_.id;
_loc3_.txJudul.text = _loc4_.teamname;
_loc3_.flag.toid = _loc4_.flagid;
_loc3_.onPress = function()
{
_global.__DISPATCH({type:"changeTeam",id:this.id});
};
_loc5_ = _loc5_ + 1;
}
}
}