first commit
This commit is contained in:
+18
@@ -0,0 +1,18 @@
|
||||
on(construct){
|
||||
m_width = 200;
|
||||
m_textAlign = false;
|
||||
m_labelPosition = "right align";
|
||||
m_label_x = 0;
|
||||
m_label_y = 0;
|
||||
m_focusDirs = "Up/Down";
|
||||
m_iconType = "default";
|
||||
m_extLabel = "";
|
||||
m_nTruncateType = 0;
|
||||
m_label = "$MAIN_MENU_BUTTON";
|
||||
m_bEnabled = true;
|
||||
m_refFM = "_root.gFM";
|
||||
m_initiallySelected = false;
|
||||
m_tabIndex = 0;
|
||||
m_bVisible = true;
|
||||
m_contentSymbol = "buttonContentSymbol";
|
||||
}
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
on(construct){
|
||||
m_width = 200;
|
||||
m_textAlign = false;
|
||||
m_labelPosition = "right align";
|
||||
m_label_x = 0;
|
||||
m_label_y = 0;
|
||||
m_focusDirs = "Up/Down";
|
||||
m_iconType = "default";
|
||||
m_extLabel = "";
|
||||
m_nTruncateType = 0;
|
||||
m_label = "$RECRUIT_BUTTON";
|
||||
m_bEnabled = true;
|
||||
m_refFM = "_root.gFM";
|
||||
m_initiallySelected = false;
|
||||
m_tabIndex = 1;
|
||||
m_bVisible = true;
|
||||
m_contentSymbol = "buttonContentSymbol";
|
||||
}
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
on(construct){
|
||||
m_width = 200;
|
||||
m_textAlign = false;
|
||||
m_labelPosition = "right align";
|
||||
m_label_x = 0;
|
||||
m_label_y = 0;
|
||||
m_focusDirs = "Up/Down";
|
||||
m_iconType = "default";
|
||||
m_extLabel = "";
|
||||
m_nTruncateType = 0;
|
||||
m_label = "$AI_BUTTON";
|
||||
m_bEnabled = true;
|
||||
m_refFM = "_root.gFM";
|
||||
m_initiallySelected = false;
|
||||
m_tabIndex = 2;
|
||||
m_bVisible = true;
|
||||
m_contentSymbol = "buttonContentSymbol";
|
||||
}
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
on(construct){
|
||||
m_width = 200;
|
||||
m_textAlign = false;
|
||||
m_labelPosition = "right align";
|
||||
m_label_x = 0;
|
||||
m_label_y = 0;
|
||||
m_focusDirs = "Up/Down";
|
||||
m_iconType = "default";
|
||||
m_extLabel = "";
|
||||
m_nTruncateType = 0;
|
||||
m_label = "$REPLAY_VIDEO_BUTTON";
|
||||
m_bEnabled = true;
|
||||
m_refFM = "_root.gFM";
|
||||
m_initiallySelected = false;
|
||||
m_tabIndex = 3;
|
||||
m_bVisible = true;
|
||||
m_contentSymbol = "buttonContentSymbol";
|
||||
}
|
||||
+1
@@ -0,0 +1 @@
|
||||
stop();
|
||||
+1
@@ -0,0 +1 @@
|
||||
stop();
|
||||
+1
@@ -0,0 +1 @@
|
||||
stop();
|
||||
+1
@@ -0,0 +1 @@
|
||||
stop();
|
||||
+1
@@ -0,0 +1 @@
|
||||
stop();
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
on(construct){
|
||||
m_focusDirs = "Up/Down";
|
||||
m_numEntries = 10;
|
||||
m_vPadding = 5;
|
||||
m_bEnabled = true;
|
||||
m_refFM = "_root.gFM";
|
||||
m_initiallySelected = false;
|
||||
m_tabIndex = -1;
|
||||
m_bVisible = true;
|
||||
m_scrollbarOffset = [];
|
||||
m_scrollbarOffset[0] = 10;
|
||||
m_scrollbarOffset[1] = 0;
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
on(construct){
|
||||
m_nLength = 100;
|
||||
m_nMax = 10;
|
||||
m_nMin = 0;
|
||||
m_nValue = 0;
|
||||
}
|
||||
+1
@@ -0,0 +1 @@
|
||||
gotoAndPlay(1);
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
on(construct){
|
||||
_type = "MovieComponent";
|
||||
_handle = "video1";
|
||||
}
|
||||
+1
@@ -0,0 +1 @@
|
||||
stop();
|
||||
+1
@@ -0,0 +1 @@
|
||||
stop();
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
on(construct){
|
||||
m_width = 200;
|
||||
m_textAlign = false;
|
||||
m_labelPosition = "right align";
|
||||
m_label_x = 0;
|
||||
m_label_y = 0;
|
||||
m_focusDirs = "Up/Down";
|
||||
m_iconType = "default";
|
||||
m_extLabel = "";
|
||||
m_nTruncateType = 0;
|
||||
m_label = "$REPLAY_BUTTON";
|
||||
m_bEnabled = true;
|
||||
m_refFM = "_root.gFM";
|
||||
m_initiallySelected = false;
|
||||
m_tabIndex = 0;
|
||||
m_bVisible = true;
|
||||
m_contentSymbol = "buttonContentSymbol";
|
||||
}
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
on(construct){
|
||||
m_width = 200;
|
||||
m_textAlign = false;
|
||||
m_labelPosition = "right align";
|
||||
m_label_x = 0;
|
||||
m_label_y = 0;
|
||||
m_focusDirs = "Up/Down";
|
||||
m_iconType = "default";
|
||||
m_extLabel = "";
|
||||
m_nTruncateType = 0;
|
||||
m_label = "$CONTINUE";
|
||||
m_bEnabled = true;
|
||||
m_refFM = "_root.gFM";
|
||||
m_initiallySelected = false;
|
||||
m_tabIndex = 1;
|
||||
m_bVisible = true;
|
||||
m_contentSymbol = "buttonContentSymbol";
|
||||
}
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
on(construct){
|
||||
m_width = 200;
|
||||
m_textAlign = false;
|
||||
m_labelPosition = "right align";
|
||||
m_label_x = 0;
|
||||
m_label_y = 0;
|
||||
m_focusDirs = "Up/Down";
|
||||
m_iconType = "default";
|
||||
m_extLabel = "";
|
||||
m_nTruncateType = 0;
|
||||
m_label = "$MAIN_MENU_BUTTON";
|
||||
m_bEnabled = true;
|
||||
m_refFM = "_root.gFM";
|
||||
m_initiallySelected = false;
|
||||
m_tabIndex = 0;
|
||||
m_bVisible = true;
|
||||
m_contentSymbol = "buttonContentSymbol";
|
||||
}
|
||||
+193
@@ -0,0 +1,193 @@
|
||||
class Cafe2_BaseUIScreen
|
||||
{
|
||||
var m_changeToScreen = null;
|
||||
var m_executeOuttroCallBack = null;
|
||||
var m_uiComponentArray = new Array();
|
||||
function Cafe2_BaseUIScreen(screen)
|
||||
{
|
||||
Cafe2_BaseUIScreen.m_screen = screen;
|
||||
Cafe2_BaseUIScreen.m_screen.onEnterFrame = _global.bind0(this,this.frameDelayedInitCallback);
|
||||
}
|
||||
function frameDelayedInit()
|
||||
{
|
||||
trace("\n\nCafe2_BaseUIScreen::frameDelayedInitCallback() :");
|
||||
var _loc1_ = new Array("N.B. You *must* override frameDelayedInit() in your","\nscreens and move the call to initGUI() to frameDelayedInit().\n");
|
||||
trace(_loc1_[0] + _loc1_[1]);
|
||||
}
|
||||
function frameDelayedInitCallback()
|
||||
{
|
||||
Cafe2_BaseUIScreen.m_screen.onEnterFrame = null;
|
||||
this.frameDelayedInit();
|
||||
}
|
||||
function outtroComplete(theComponent)
|
||||
{
|
||||
trace("Cafe2_BaseUIScreen::outtroComplete() " + theComponent);
|
||||
var _loc2_ = 0;
|
||||
while(_loc2_ < Cafe2_BaseUIScreen.m_thisClass.m_uiComponentArray.length)
|
||||
{
|
||||
if(theComponent == Cafe2_BaseUIScreen.m_thisClass.m_uiComponentArray[_loc2_])
|
||||
{
|
||||
break;
|
||||
}
|
||||
_loc2_ = _loc2_ + 1;
|
||||
}
|
||||
Cafe2_BaseUIScreen.m_thisClass.m_uiComponentArray.splice(_loc2_,1);
|
||||
if(Cafe2_BaseUIScreen.m_thisClass.m_uiComponentArray.length <= 0)
|
||||
{
|
||||
if(Cafe2_BaseUIScreen.m_thisClass.m_changeToScreen != null)
|
||||
{
|
||||
_global.gSM.changeMainScreen(Cafe2_BaseUIScreen.m_thisClass.m_changeToScreen);
|
||||
}
|
||||
}
|
||||
}
|
||||
function introComplete(theComponent)
|
||||
{
|
||||
trace("Cafe2_BaseUIScreen::introComplete()");
|
||||
theComponent.restoreVisualState();
|
||||
Cafe2_BaseUIScreen.m_thisClass.m_introCount--;
|
||||
if(Cafe2_BaseUIScreen.m_thisClass.m_introCount <= 0)
|
||||
{
|
||||
Cafe2_BaseUIScreen.m_thisClass.onIntrosComplete();
|
||||
}
|
||||
}
|
||||
function onIntrosComplete()
|
||||
{
|
||||
trace("Cafe2_BaseUIScreen::onIntrosComplete()");
|
||||
_global.gEH.setLocalEventHandler(this.localEventHandler);
|
||||
_global.gEH.enableCurrentLocalEventHandler();
|
||||
}
|
||||
function registerIntroOuttroComponents(components)
|
||||
{
|
||||
trace("Cafe2_BaseUIScreen::registerIntroOuttroComponents()");
|
||||
this.m_uiComponentArray = components;
|
||||
this.m_introCount = this.m_uiComponentArray.length;
|
||||
var _loc2_ = 0;
|
||||
while(_loc2_ < this.m_introCount)
|
||||
{
|
||||
this.m_uiComponentArray[_loc2_].setIntroCallback(this.introComplete);
|
||||
_loc2_ = _loc2_ + 1;
|
||||
}
|
||||
}
|
||||
function executeBackFunction(theComponent)
|
||||
{
|
||||
trace("Cafe2_BaseUIScreen::executeBackFunction" + theComponent);
|
||||
var _loc2_ = 0;
|
||||
while(_loc2_ < Cafe2_BaseUIScreen.m_thisClass.m_uiComponentArray.length)
|
||||
{
|
||||
if(theComponent == Cafe2_BaseUIScreen.m_thisClass.m_uiComponentArray[_loc2_])
|
||||
{
|
||||
break;
|
||||
}
|
||||
_loc2_ = _loc2_ + 1;
|
||||
}
|
||||
Cafe2_BaseUIScreen.m_thisClass.m_uiComponentArray.splice(_loc2_,1);
|
||||
if(Cafe2_BaseUIScreen.m_thisClass.m_uiComponentArray.length <= 0)
|
||||
{
|
||||
_global.gSM.goBackScreen();
|
||||
}
|
||||
}
|
||||
function startIntro()
|
||||
{
|
||||
trace("Cafe2_BaseUIScreen::startIntro()");
|
||||
var _loc3_ = this.m_uiComponentArray.length;
|
||||
var _loc2_ = 0;
|
||||
while(_loc2_ < _loc3_)
|
||||
{
|
||||
this.m_uiComponentArray[_loc2_].intro();
|
||||
_loc2_ = _loc2_ + 1;
|
||||
}
|
||||
}
|
||||
function startOuttro(newScreen)
|
||||
{
|
||||
trace("Cafe2_BaseUIScreen::startOuttro");
|
||||
this.m_changeToScreen = newScreen;
|
||||
var _loc3_ = Cafe2_BaseUIScreen.m_thisClass.m_uiComponentArray.length;
|
||||
if(_loc3_ > 0)
|
||||
{
|
||||
var _loc2_ = 0;
|
||||
while(_loc2_ < _loc3_)
|
||||
{
|
||||
Cafe2_BaseUIScreen.m_thisClass.m_uiComponentArray[_loc2_].outtro(this.outtroComplete);
|
||||
_loc2_ = _loc2_ + 1;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
this.outtroComplete(null);
|
||||
}
|
||||
}
|
||||
function startOuttroAndCallBack(doAfterOuttroComplete)
|
||||
{
|
||||
trace("Cafe2_BaseUIScreen::startOuttro");
|
||||
this.m_executeOuttroCallBack = doAfterOuttroComplete;
|
||||
var _loc3_ = Cafe2_BaseUIScreen.m_thisClass.m_uiComponentArray.length;
|
||||
if(_loc3_ > 0)
|
||||
{
|
||||
var _loc2_ = 0;
|
||||
while(_loc2_ < _loc3_)
|
||||
{
|
||||
Cafe2_BaseUIScreen.m_thisClass.m_uiComponentArray[_loc2_].outtro(this.outtroAndCallBackComplete);
|
||||
_loc2_ = _loc2_ + 1;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
this.outtroAndCallBackComplete(null);
|
||||
}
|
||||
}
|
||||
function outtroAndCallBackComplete(theComponent)
|
||||
{
|
||||
trace("Cafe2_BaseUIScreen::outtroComplete() " + theComponent);
|
||||
var _loc1_ = 0;
|
||||
while(_loc1_ < Cafe2_BaseUIScreen.m_thisClass.m_uiComponentArray.length)
|
||||
{
|
||||
if(theComponent == Cafe2_BaseUIScreen.m_thisClass.m_uiComponentArray[_loc1_])
|
||||
{
|
||||
break;
|
||||
}
|
||||
_loc1_ = _loc1_ + 1;
|
||||
}
|
||||
Cafe2_BaseUIScreen.m_thisClass.m_uiComponentArray.splice(_loc1_,1);
|
||||
if(Cafe2_BaseUIScreen.m_thisClass.m_uiComponentArray.length <= 0)
|
||||
{
|
||||
Cafe2_BaseUIScreen.m_thisClass.m_executeOuttroCallBack();
|
||||
}
|
||||
}
|
||||
function backButtonClicked()
|
||||
{
|
||||
trace("Cafe2_BaseUIScreen::backButtonClicked()");
|
||||
var _loc3_ = Cafe2_BaseUIScreen.m_thisClass.m_uiComponentArray.length;
|
||||
if(_loc3_ > 0)
|
||||
{
|
||||
var _loc2_ = 0;
|
||||
while(_loc2_ < _loc3_)
|
||||
{
|
||||
Cafe2_BaseUIScreen.m_thisClass.m_uiComponentArray[_loc2_].outtro(Cafe2_BaseUIScreen.m_thisClass.executeBackFunction);
|
||||
_loc2_ = _loc2_ + 1;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
_global.gSM.goBackScreen();
|
||||
}
|
||||
}
|
||||
function localEventHandler(keyCode, controller)
|
||||
{
|
||||
trace("Cafe2_BaseUIScreen::localEventHandler() keyCode == " + keyCode);
|
||||
_global.gFM.handleDefaultInputs(keyCode);
|
||||
}
|
||||
function clearData()
|
||||
{
|
||||
Cafe2_BaseUIScreen.m_screen = null;
|
||||
Cafe2_BaseUIScreen.m_thisClass = null;
|
||||
this.m_changeToScreen = null;
|
||||
this.m_uiComponentArray = null;
|
||||
}
|
||||
function bind0(obj, func)
|
||||
{
|
||||
return function()
|
||||
{
|
||||
func.call(obj);
|
||||
};
|
||||
}
|
||||
}
|
||||
+366
@@ -0,0 +1,366 @@
|
||||
class fes_m_missionBriefing extends Cafe2_BaseUIScreen
|
||||
{
|
||||
var m_fmvTalkingHead = "";
|
||||
var m_missionIdx = -1;
|
||||
var m_waitingForSignIn = false;
|
||||
var m_isContinuingToObjectivesBriefing = false;
|
||||
var m_playingVideo = false;
|
||||
var m_playBriefing = false;
|
||||
function fes_m_missionBriefing(screen)
|
||||
{
|
||||
super(screen);
|
||||
Cafe2_BaseUIScreen.m_thisClass = this;
|
||||
_global.GAME.MODE = _global.ENUM.GAME_MODE_CAMPAIGN;
|
||||
Cafe2_BaseUIScreen.m_screen.mcBtnBar1._visible = false;
|
||||
Cafe2_BaseUIScreen.m_screen.mcBtnBar2._visible = false;
|
||||
}
|
||||
function frameDelayedInit()
|
||||
{
|
||||
this.initGUI();
|
||||
}
|
||||
function initGUI()
|
||||
{
|
||||
trace("fes_m_missionBriefing::initGUI()");
|
||||
_global.gSM.setOnExitScreen(_global.bind0(this,this.onScreenExit));
|
||||
this.m_localMessageHandlerFunc = _global.bind1DynamicParams(this,this.localMessageHandler);
|
||||
_global.gMH.addMessageHandler(this.m_localMessageHandlerFunc);
|
||||
var ret = new Object();
|
||||
var arr = new Array(); // 此变量从未被使用过
|
||||
// Checked
|
||||
loadVariables("QueryGameEngine?CAMPAIGN_MISSION&CAMPAIGN_MISSION_NAME",ret);
|
||||
this.m_missionIdx = ret.CAMPAIGN_MISSION;
|
||||
this.m_missionName = ret.CAMPAIGN_MISSION_NAME + "&Outline";
|
||||
// Checked
|
||||
loadVariables("QueryGameEngine?MISSION_OVERVIEW_BACKGROUND?MissionIndex="
|
||||
+ this.m_missionIdx
|
||||
+ "&MISSION_OVERVIEW_TALKING_HEAD?MissionIndex="
|
||||
+ this.m_missionIdx
|
||||
+ "&MISSION_INTRO_MOVIE?MissionIndex="
|
||||
+ this.m_missionIdx,
|
||||
ret
|
||||
);
|
||||
this.m_swfBackground = ret.MISSION_OVERVIEW_BACKGROUND;
|
||||
this.m_fmvTalkingHead = ret.MISSION_OVERVIEW_TALKING_HEAD;
|
||||
this.m_introMovie = ret.MISSION_INTRO_MOVIE;
|
||||
Cafe2_BaseUIScreen.m_screen.mcTransmission._visible = false;
|
||||
this.loadBriefingAnimation();
|
||||
this.configureButton(Cafe2_BaseUIScreen.m_screen.mcBtnBar1.btnMainMenu,_global.bind0(this,this.onMainMenuClicked));
|
||||
this.configureButton(Cafe2_BaseUIScreen.m_screen.mcBtnBar1.btnReplayVideo,_global.bind0(this,this.onReplayVideoClicked));
|
||||
this.configureButton(Cafe2_BaseUIScreen.m_screen.mcBtnBar2.btnMainMenu,_global.bind0(this,this.onMainMenuClicked));
|
||||
switch(_global.GAME.COOPMODE)
|
||||
{
|
||||
case _global.ENUM.GAME_COOPMODE_CHOOSER:
|
||||
Cafe2_BaseUIScreen.m_screen.mcTransmission._visible = false;
|
||||
if(_global.GAME.PLAY_MISSION_INTRO_MOVIE)
|
||||
{
|
||||
_global.GAME.PLAY_MISSION_INTRO_MOVIE = false;
|
||||
this.playMissionIntroMovie();
|
||||
}
|
||||
this.configureButton(Cafe2_BaseUIScreen.m_screen.mcBtnBar1.btnRecruit,_global.bind0(this,this.onRecruitClicked));
|
||||
this.configureButton(Cafe2_BaseUIScreen.m_screen.mcBtnBar1.btnAI,_global.bind0(this,this.onAIClicked));
|
||||
this.configureButton(Cafe2_BaseUIScreen.m_screen.mcBtnBar2.btnSkip,_global.bind0(this,this.onSkipClicked));
|
||||
Cafe2_BaseUIScreen.m_screen.mcBtnBar2.waitingMessageMC._visible = false;
|
||||
this.initHelpPanel(["$CAMPAIGNMODESELECTIONHELPTEXT"],Cafe2_BaseUIScreen.m_screen.mcTransmission.helpTextScrollList,Cafe2_BaseUIScreen.m_screen.mcTransmission.helpTextScrollBar);
|
||||
this.initCampaignModeSelectionUI();
|
||||
break;
|
||||
case _global.ENUM.GAME_COOPMODE_HOST:
|
||||
Cafe2_BaseUIScreen.m_screen.mcBtnBar2.btnMainMenu.setLabel("$ABORT_BUTTON");
|
||||
this.configureButton(Cafe2_BaseUIScreen.m_screen.mcBtnBar2.btnSkip,_global.bind0(this,this.onSkipClicked));
|
||||
Cafe2_BaseUIScreen.m_screen.mcBtnBar2.btnSkip.disable();
|
||||
Cafe2_BaseUIScreen.m_screen.mcBtnBar2.waitingMessageMC._visible = true;
|
||||
this.playMissionIntroMovie();
|
||||
// Checked
|
||||
getUrl("FSCommand:CallGameFunction", "CoopCampaignFlow_HostReady");
|
||||
this.initMissionBriefingUI();
|
||||
this.m_playBriefing = true;
|
||||
this.PlayBriefing();
|
||||
break;
|
||||
case _global.ENUM.GAME_COOPMODE_CLIENT:
|
||||
Cafe2_BaseUIScreen.m_screen.mcBtnBar2.btnSkip.hide();
|
||||
Cafe2_BaseUIScreen.m_screen.mcBtnBar2.waitingMessageMC._visible = true;
|
||||
Cafe2_BaseUIScreen.m_screen.mcBtnBar2.btnMainMenu.setLabel("$ABORT_BUTTON");
|
||||
this.playMissionIntroMovie();
|
||||
// Checked
|
||||
getUrl("FSCommand:CallGameFunction", "CoopCampaignFlow_ClientReady");
|
||||
this.initMissionBriefingUI();
|
||||
this.m_playBriefing = true;
|
||||
this.PlayBriefing();
|
||||
break;
|
||||
case _global.ENUM.GAME_COOPMODE_AI:
|
||||
default:
|
||||
this.configureButton(Cafe2_BaseUIScreen.m_screen.mcBtnBar2.btnSkip,_global.bind0(this,this.onSkipClicked));
|
||||
this.configureButton(Cafe2_BaseUIScreen.m_screen.mcBtnBar1.btnMainMenu,_global.bind0(this,this.onMainMenuClicked));
|
||||
Cafe2_BaseUIScreen.m_screen.mcBtnBar2.waitingMessageMC._visible = false;
|
||||
this.initMissionBriefingUI();
|
||||
this.m_playBriefing = true;
|
||||
this.PlayBriefing();
|
||||
}
|
||||
this.configureButton(Cafe2_BaseUIScreen.m_screen.mcBtnBar2.btnReplay,_global.bind0(this,this.onReplayClicked));
|
||||
}
|
||||
function configureButton(button, callback)
|
||||
{
|
||||
button.show();
|
||||
button.enable();
|
||||
button.setOnMouseUpFunction(callback);
|
||||
button.noIntro();
|
||||
}
|
||||
function loadBriefingAnimation()
|
||||
{
|
||||
trace("fes_m_missionBriefing::loadBriefingAnimation() : m_swfBackground = " + this.m_swfBackground);
|
||||
if(this.m_swfBackground != undefined)
|
||||
{
|
||||
this.m_mcBGMovie = Cafe2_BaseUIScreen.m_screen.mcBGMovie;
|
||||
this.m_mcBGMovie.loadMovie(this.m_swfBackground + ".swf");
|
||||
}
|
||||
else
|
||||
{
|
||||
trace("WARNING: m_swfBackground is undefined in fes_m_missionBriefing::loadBriefingAnimation()");
|
||||
}
|
||||
}
|
||||
function onBriefingLoaded()
|
||||
{
|
||||
trace("fes_m_missionBriefing::onBriefingLoaded()");
|
||||
if(this.m_playBriefing)
|
||||
{
|
||||
this.PlayBriefing();
|
||||
}
|
||||
else
|
||||
{
|
||||
this.m_mcBGMovie._visible = false;
|
||||
this.m_mcBGMovie.gotoAndStop("_wait");
|
||||
}
|
||||
}
|
||||
function onScreenExit()
|
||||
{
|
||||
trace("fes_m_missionBriefing::onScreenExit()");
|
||||
_global.gMH.removeMessageHandler(this.m_localMessageHandlerFunc);
|
||||
delete this.m_localMessageHandlerFunc;
|
||||
this.StopBriefing();
|
||||
this.m_mcBGMovie.unloadMovie();
|
||||
this.m_mcBGMovie = null;
|
||||
this.clearData();
|
||||
delete _global.fes_m_missionBriefing;
|
||||
delete _global.Cafe2_BaseUIScreen;
|
||||
if(!this.m_isContinuingToObjectivesBriefing)
|
||||
{
|
||||
_global.PlayShellMusic(_global.SOUND.SHELL_MAIN);
|
||||
}
|
||||
}
|
||||
function localMessageHandler(message)
|
||||
{
|
||||
trace("fes_m_missionBriefing::localMessageHandler() Received message \'" + message + "\'");
|
||||
var flag = true;
|
||||
switch(message)
|
||||
{
|
||||
case _global.MSGCODE.FE_COOP_ONLINE_GAME_CONNECT_SUCCESS:
|
||||
trace("fes_m_missionBriefing::localMessageHandler() Handling message \'" + message + "\'");
|
||||
if(this.m_waitingForSignIn)
|
||||
{
|
||||
this.m_waitingForSignIn = false;
|
||||
_global.comLink.screen.close();
|
||||
}
|
||||
_global.GAME.COOPMODE = _global.ENUM.GAME_COOPMODE_HOST;
|
||||
// Checked
|
||||
getUrl("FSCommand:CallGameFunction", "%SetGameSetupMode?Mode=Online");
|
||||
this.startOuttro(_global.SCREEN.FEG_RECRUITMENT_UI);
|
||||
break;
|
||||
case _global.MSGCODE.FE_MP_ONLINE_GAMECONNECT_FAILURE:
|
||||
trace("fes_m_missionBriefing::localMessageHandler() Handling message \'" + message + "\'");
|
||||
if(this.m_waitingForSignIn)
|
||||
{
|
||||
this.m_waitingForSignIn = false;
|
||||
_global.comLink.screen.close();
|
||||
}
|
||||
Cafe2_BaseUIScreen.m_screen.mcBtnBar1.btnRecruit.enable();
|
||||
break;
|
||||
case _global.MSGCODE.FE_MP_ONLINE_LOBBY_JOINED:
|
||||
if(this.m_waitingForSignIn)
|
||||
{
|
||||
trace("fes_m_missionBriefing::localMessageHandler() Handling message \'" + message + "\'");
|
||||
// Checked
|
||||
getUrl("FSCommand:CallGameFunction", "%CreateOnlineCoop");
|
||||
}
|
||||
flag = false;
|
||||
break;
|
||||
case _global.MSGCODE.FE_COOP_CAMPAIGN_STAGING_STEP_OBJECTIVE_BRIEFING:
|
||||
this.goToObjectivesBriefing();
|
||||
break;
|
||||
case _global.MSGCODE.FE_COOP_CAMPAIGN_COCOMMANDER_READY:
|
||||
if(_global.GAME.COOPMODE == _global.ENUM.GAME_COOPMODE_HOST)
|
||||
{
|
||||
Cafe2_BaseUIScreen.m_screen.mcBtnBar2.btnSkip.enable();
|
||||
Cafe2_BaseUIScreen.m_screen.mcBtnBar2.waitingMessageMC._visible = false;
|
||||
}
|
||||
break;
|
||||
case _global.MSGCODE.FE_COOP_CAMPAIGN_COMMANDER_READY:
|
||||
if(_global.GAME.COOPMODE == _global.ENUM.GAME_COOPMODE_CLIENT)
|
||||
{
|
||||
// Checked
|
||||
getUrl("FSCommand:CallGameFunction", "CoopCampaignFlow_ClientReady");
|
||||
}
|
||||
break;
|
||||
default:
|
||||
flag = false;
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
function onMainMenuClicked()
|
||||
{
|
||||
trace("fes_m_missionBriefing::onMainMenuClicked");
|
||||
// Checked
|
||||
getUrl("FSCommand:CallGameFunction", "Campaign_ExitGame");
|
||||
_global.GAME.MODE = _global.ENUM.GAME_MODE_NONE;
|
||||
// Checked
|
||||
getUrl("FSCommand:CallGameFunction", "%SetGameSetupMode?Mode=None");
|
||||
_global.gSM.changeMainScreen(_global.SCREEN.FEG_MAIN_MENU);
|
||||
}
|
||||
function onRecruitClicked()
|
||||
{
|
||||
trace("fes_m_missionBriefing::onRecruitClicked");
|
||||
var ret = new Object();
|
||||
// Checked
|
||||
loadVariables("QueryGameEngine?ONLINE_SIGNED_IN",ret);
|
||||
if(Number(ret.ONLINE_SIGNED_IN) == 1)
|
||||
{
|
||||
// Checked
|
||||
getUrl("FSCommand:CallGameFunction", "%CreateOnlineCoop");
|
||||
Cafe2_BaseUIScreen.m_screen.mcBtnBar1.btnRecruit.disable();
|
||||
}
|
||||
else
|
||||
{
|
||||
this.m_waitingForSignIn = true;
|
||||
_global.comLink.screen.open();
|
||||
}
|
||||
}
|
||||
function onAIClicked()
|
||||
{
|
||||
trace("fes_m_missionBriefing::onAIClicked");
|
||||
_global.GAME.COOPMODE = _global.ENUM.GAME_COOPMODE_AI;
|
||||
this.initMissionBriefingUI();
|
||||
this.PlayBriefing();
|
||||
}
|
||||
function PlayBriefing()
|
||||
{
|
||||
trace("fes_m_missionBriefing::PlayBriefing");
|
||||
this.m_mcBGMovie._visible = true;
|
||||
this.m_mcBGMovie.gotoAndPlay("_run");
|
||||
if(this.m_fmvTalkingHead != undefined)
|
||||
{
|
||||
if(this.m_playingVideo)
|
||||
{
|
||||
Cafe2_BaseUIScreen.m_screen.mcTalkingHead.movTalkingHead.StopMovie();
|
||||
}
|
||||
this.m_playingVideo = true;
|
||||
Cafe2_BaseUIScreen.m_screen.mcTalkingHead.movTalkingHead.PlayMovie(this.m_fmvTalkingHead);
|
||||
}
|
||||
}
|
||||
function StopBriefing()
|
||||
{
|
||||
trace("fes_m_missionBriefing::StopBriefing");
|
||||
this.m_mcBGMovie.stop();
|
||||
this.m_mcBGMovie._visible = false;
|
||||
Cafe2_BaseUIScreen.m_screen.mcTalkingHead.movTalkingHead.StopMovie();
|
||||
}
|
||||
function initCampaignModeSelectionUI()
|
||||
{
|
||||
trace("fes_m_missionBriefing::initCampaignModeSelectionUI");
|
||||
Cafe2_BaseUIScreen.m_screen.mcTransmission._visible = true;
|
||||
Cafe2_BaseUIScreen.m_screen.mcTransmission._alpha = 100;
|
||||
Cafe2_BaseUIScreen.m_screen.mcBtnBar1._visible = true;
|
||||
this.disableTalkingHeadVideo();
|
||||
this.disableGadget();
|
||||
Cafe2_BaseUIScreen.m_screen.mcBackground.gotoAndPlay("_disable");
|
||||
this.disableDashboard();
|
||||
Cafe2_BaseUIScreen.m_screen.mcBtnBar2._visible = false;
|
||||
}
|
||||
function initMissionBriefingUI()
|
||||
{
|
||||
trace("fes_m_missionBriefing::initMissionBriefingUI");
|
||||
Cafe2_BaseUIScreen.m_screen.mcTransmission._visible = false;
|
||||
Cafe2_BaseUIScreen.m_screen.mcBtnBar1._visible = false;
|
||||
this.enableTalkingHeadVideo();
|
||||
this.enableGadget();
|
||||
Cafe2_BaseUIScreen.m_screen.mcBackground.gotoAndPlay("_enable");
|
||||
this.enableDashboard();
|
||||
Cafe2_BaseUIScreen.m_screen.mcBtnBar2._visible = true;
|
||||
_global.PlayShellMusic(_global.SOUND.BRIEFING);
|
||||
}
|
||||
function playMissionIntroMovie()
|
||||
{
|
||||
// Checked
|
||||
getURL("FSCommand:CallGameFunction","%PlayMovieAtomic?movie=" + this.m_introMovie + "|allowCancel=1");
|
||||
}
|
||||
function onReplayVideoClicked()
|
||||
{
|
||||
this.playMissionIntroMovie();
|
||||
}
|
||||
function onReplayClicked()
|
||||
{
|
||||
trace("fes_m_missionBriefing::onReplayClicked");
|
||||
this.PlayBriefing();
|
||||
}
|
||||
function onSkipClicked()
|
||||
{
|
||||
trace("fes_m_missionBriefing::onSkipClicked");
|
||||
this.StopBriefing();
|
||||
// Checked
|
||||
getUrl("FSCommand:CallGameFunction", "%CoopCampaignFlow_ObjectiveBriefing");
|
||||
this.goToObjectivesBriefing();
|
||||
}
|
||||
function goToObjectivesBriefing()
|
||||
{
|
||||
this.m_isContinuingToObjectivesBriefing = true;
|
||||
this.startOuttro(_global.SCREEN.FES_COOP_OBJECTIVES_BRIEFING);
|
||||
}
|
||||
function onBackgroundMovieFinished()
|
||||
{
|
||||
trace("fes_m_missionBriefing::onBackgroundMovieFinished");
|
||||
Cafe2_BaseUIScreen.m_screen.mcBtnBar2.btnSkip.setText("$CONTINUE");
|
||||
}
|
||||
function enableDashboard()
|
||||
{
|
||||
Cafe2_BaseUIScreen.m_screen.dashBoardMC.gotoAndPlay("_enable");
|
||||
Cafe2_BaseUIScreen.m_screen.dashBoardMC.titleMC.titleTF.text = this.m_missionName;
|
||||
Cafe2_BaseUIScreen.m_screen.dashBoardMC.titleMC.shadowTF.text = this.m_missionName;
|
||||
}
|
||||
function disableDashboard()
|
||||
{
|
||||
Cafe2_BaseUIScreen.m_screen.dashBoardMC.gotoAndPlay("_disable");
|
||||
Cafe2_BaseUIScreen.m_screen.dashBoardMC.titleMC.titleTF.text = this.m_missionName;
|
||||
Cafe2_BaseUIScreen.m_screen.dashBoardMC.titleMC.shadowTF.text = this.m_missionName;
|
||||
}
|
||||
function enableTalkingHeadVideo()
|
||||
{
|
||||
Cafe2_BaseUIScreen.m_screen.mcTalkingHead.gotoAndPlay("_enable");
|
||||
}
|
||||
function disableTalkingHeadVideo()
|
||||
{
|
||||
Cafe2_BaseUIScreen.m_screen.mcTalkingHead.gotoAndPlay("_disable");
|
||||
}
|
||||
function enableGadget()
|
||||
{
|
||||
Cafe2_BaseUIScreen.m_screen.mcGadget.gotoAndPlay("_enable");
|
||||
}
|
||||
function disableGadget()
|
||||
{
|
||||
Cafe2_BaseUIScreen.m_screen.mcGadget.gotoAndPlay("_disable");
|
||||
}
|
||||
function initHelpPanel(listData, listMC, listScrollBar)
|
||||
{
|
||||
listScrollBar.show();
|
||||
listScrollBar.enable();
|
||||
listMC.setNumEntries(10);
|
||||
listMC.setVerticalPadding(0);
|
||||
listMC.addListener(this);
|
||||
listMC.disableEntryHitRegion();
|
||||
var arr = new Array();
|
||||
arr.push({symbol:"std_mouseListboxEntryTextElementSymbol",width:520,leftMargin:20,rightMargin:40,useHighlights:false,isSelectable:false,useHitRegion:false,autoSize:true});
|
||||
listMC.init(arr,27);
|
||||
listMC.attachScrollbarController(listScrollBar);
|
||||
listMC.setColumnData(0,listData);
|
||||
listMC.setSelectedIndex(0);
|
||||
listMC.refreshDisplay();
|
||||
listMC.refreshScrollbar();
|
||||
listMC.moveViewToFirst();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
var screen = new fes_m_missionBriefing(this);
|
||||
stop();
|
||||
Reference in New Issue
Block a user