Frame 1
function update(aChallenge) {
txtChallenger.text = aChallenge.challengerName;
txtRating.text = (_root.ltxt("RATING:") + " ") + _root.getChallengeSetting(aChallenge.challengeSetting, "hostRating");
txtEntryFee.text = (_root.ltxt("ENTRY_FEE:") + " ") + _root.getChallengeSetting(aChallenge.challengeSetting, "fee");
var cGameType = _root.getChallengeSetting(aChallenge.challengeSetting, "proplay");
txtProplay.text = (_root.ltxt("PRO_PLAY:") + " ") + _root.ltxt(_root.getGameTypeText(parseInt(cGameType)));
txtRanked.text = (_root.ltxt("RATED:") + " ") + _root.ltxt(_root.getGameRankedText(parseInt(_root.getChallengeSetting(aChallenge.challengeSetting, "rank"))));
var playTypeId = parseInt(_root.getChallengeSetting(aChallenge.challengeSetting, "playType"));
var oppPfcId = parseInt(_root.getChallengeSetting(aChallenge.challengeSetting, "pfcid"));
txtPlayType.text = (_root.ltxt("GAME_TYPE:") + " ") + _root.ltxt(_root.playType[playTypeId]);
if (playTypeId == _root.CON_EXHIBITION_GAME) {
playerImage1._visible = false;
playerImage2._visible = false;
} else {
playerImage1.loadMovie(_root.getSmallProfileImage(_root.myProfileCardId()));
playerImage2.loadMovie(_root.getSmallProfileImage(oppPfcId));
playerImage1._visible = true;
playerImage2._visible = true;
}
}
function initMain() {
playerImage1._visible = false;
playerImage2._visible = false;
lblTitle.setFont(tfN10);
lblTitle2.setFont(tfN10);
txtProplay.setFont(tfN1);
txtChallenger.setFont(tfN7);
txtRanked.setFont(tfN1);
txtEntryFee.setFont(tfN1);
txtRating.setFont(tfN1);
txtPlayType.setFont(tfN7);
lblTitle.text = _root.ltxt("UC_YOU_ARE_BEING_CHALLENGED");
lblTitle2.text = _root.ltxt("UC_YOU_ARE_BEING_CHALLENGED");
vsMC.loadMovie(_root.getVSImage());
btnAccept.onPress = function () {
_root.acceptChallenge(selectTeamMC.getSelectedTeamId());
hide();
};
btnDecline.onPress = function () {
_root.declineChallenge();
hide();
};
}
function hide() {
this._visible = false;
}
function show() {
this._visible = true;
}
this.tabEnabled = false;
this.tabChildren = false;
nextFrame();
Instance of Symbol 19 Imported [easoButtonS] "btnAccept" in Frame 1
//component parameters
onClipEvent (initialize) {
label = "BTN_ACCEPT";
bLocalize = true;
bcolor = "blue";
}
Instance of Symbol 19 Imported [easoButtonS] "btnDecline" in Frame 1
//component parameters
onClipEvent (initialize) {
label = "BTN_DECLINE";
bLocalize = true;
bcolor = "blue";
}
Frame 2
stop();
initMain();
_parent.challengedOnLoad();