home *** CD-ROM | disk | FTP | other *** search
- function LoadComponents()
- {
- ComponentList[0] = RESOURCEFILE + "^10";
- var CompInfo;
- trace("LOADING COMPONENTS");
- i = 0;
- while(i < TOTAL_COMP)
- {
- LoadStatus[i] = false;
- CompInfo = ComponentList[i].split("^");
- LoadComponent(CompInfo[0] + ".swf",CompInfo[1]);
- i++;
- }
- }
- function LoadComponent(c, lev)
- {
- trace("Load Component:" + c);
- eval("Loader_" + LoaderIndex).GetMovie(c,lev);
- LoaderIndex++;
- }
- function LoadDone(wname)
- {
- trace("Done:" + wname);
- var ind = wname.split("_");
- ind = ind[1];
- removeMovieClip("Loader_" + ind);
- LoadStatus[ind] = true;
- var AllDone = true;
- i = 0;
- while(i < TOTAL_COMP)
- {
- if(LoadStatus[i] == false)
- {
- AllDone = false;
- i = TOTAL_COMP + 1;
- }
- i++;
- }
- if(AllDone)
- {
- ComponentsLoaded();
- }
- }
- function ComponentsLoaded()
- {
- trace("ALL MOVIES LOADED!");
- Initialize();
- }
- function Initialize()
- {
- KeyBlock.SetScreenWatch(0);
- Splash = eval(ResLevel + ".SplashMovie");
- Splash.play();
- }
- function SplashScreenComplete()
- {
- Splash.gotoAndStop();
- Splash._visible = false;
- fscommand("event","intro finished");
- eval(ResLevel).gotoAndStop("BLANK");
- }
- function SetUpAgreement()
- {
- KeyBlock.SetScreenWatch(1);
- fscommand("newscreen","license agreement");
- eval(ResLevel).gotoAndStop("AGREEMENT");
- eval(ResLevel + ".Accept").Label = "Accept";
- eval(ResLevel + ".Decline").Label = "Decline";
- eval(ResLevel + ".Decline").gotoAndStop("ACTIVE");
- ScrollBox = eval(_root.ResLevel + ".Agreement");
- ScrollBox.Text = LICENSEAGREEMENT;
- }
- function ActivateAccept()
- {
- eval(ResLevel + ".Accept").gotoAndStop("ACTIVE");
- }
- function SetButtonState()
- {
- if(ButtonState == 0)
- {
- ButtonState = "DISABLED";
- if(int(KeyBlock.ScreenWatch) == 4)
- {
- ButtonState = "SDISABLED";
- }
- }
- if(ButtonState == 1)
- {
- ButtonState = "ACTIVE";
- if(int(KeyBlock.ScreenWatch) == 4)
- {
- ButtonState = "SACTIVE";
- }
- }
- eval(ResLevel + "." + TargetButton).gotoAndStop(ButtonState);
- }
- function SetUpInstallPath(skip)
- {
- KeyBlock.SetScreenWatch(3);
- if(!skip)
- {
- fscommand("newscreen","install path");
- }
- eval(ResLevel).gotoAndStop("BLANK");
- eval(ResLevel).gotoAndStop("INSTALLPATH");
- eval(ResLevel + ".Change").Label = "Browse";
- eval(ResLevel + ".Change").gotoAndStop("ACTIVE");
- eval(ResLevel + ".Install").Label = "Install";
- eval(ResLevel + ".Install").gotoAndStop("ACTIVE");
- }
- function SetUpRegister()
- {
- KeyBlock.SetScreenWatch(4);
- eval(ResLevel).gotoAndStop("REGISTRATION");
- fscommand("newscreen","registration");
- eval(ResLevel + ".Tutorial").gotoAndStop("SACTIVE");
- eval(ResLevel + ".Tutorial").Label = "Online Bingo Tutorial";
- eval(ResLevel + ".Register").gotoAndStop("SDISABLED");
- eval(ResLevel + ".Register").Label = "Register \'PLAY FOR REAL\'";
- if(int(REGDONE) == 0)
- {
- ButtonActivator.DelayActivateButton(eval(ResLevel + ".Register"));
- }
- ProgressBar.TrackProgress();
- }
- function SetUpAccount()
- {
- fscommand("newscreen","account info");
- eval(ResLevel).gotoAndStop("ACCOUNTINFO");
- }
- function SetUpFinish()
- {
- KeyBlock.SetScreenWatch(5);
- ProgressBar.StopTracking();
- fscommand("newscreen","finish");
- eval(ResLevel).gotoAndStop("FINISHED");
- eval(ResLevel + ".Launch").Label = "Play Now";
- eval(ResLevel + ".Launch").gotoAndStop("ACTIVE");
- }
- function ButtonHit(btn)
- {
- trace(btn._name + " pressed");
- if(btn._name eq "Decline")
- {
- fscommand("button","decline");
- }
- if(btn._name eq "Accept")
- {
- fscommand("button","accept");
- }
- if(btn._name eq "Change")
- {
- fscommand("button","changepath");
- }
- if(btn._name eq "Install")
- {
- fscommand("button","install");
- }
- if(btn._name eq "Register")
- {
- fscommand("button","register");
- }
- if(btn._name eq "Launch")
- {
- fscommand("button","launch");
- }
- if(btn._name eq "Tutorial")
- {
- getURL(HelpPath,"");
- }
- }
- function UncheckComponents()
- {
- trace("Unchecking Components");
- i = 0;
- while(i < 3)
- {
- eval(ResLevel + ".Component_" + i).Checked = false;
- eval(ResLevel + ".Component_" + i).Check.gotoAndStop(3);
- eval(ResLevel + ".Component_" + i).State = "0";
- SelectedComponents[0] = 0;
- i++;
- }
- }
- function ComponentHit(cmp)
- {
- trace(cmp._name + " Hit:" + cmp.State);
- compnum = cmp._name.split("_");
- SelectedComponents[compnum[1]] = cmp.State;
- if(int(compnum[1]) == 3)
- {
- if(int(cmp.State) == 1)
- {
- UncheckComponents();
- }
- else
- {
- SetUpPackage();
- }
- }
- else if(int(SelectedComponents[3]) == 1)
- {
- UncheckComponents();
- }
- foundone = false;
- i = 0;
- while(i < SelectedComponents.length)
- {
- if(int(SelectedComponents[i]) == 1)
- {
- foundone = true;
- }
- i++;
- }
- if(foundone)
- {
- eval(ResLevel + ".Select").gotoAndStop("ACTIVE");
- }
- else
- {
- eval(ResLevel + ".Select").gotoAndStop("DISABLED");
- }
- }
- function ConfirmQuit()
- {
- MsgBox = eval(ResLevel + ".MsgBox");
- MsgBox.gotoAndStop("CONFIRM");
- MsgBox.Text = "This will exit the installation. Do you want to continue?";
- ConfirmFor = "Quit";
- MsgBox._x = 0 + MsgBox._width / 1.3;
- MsgBox._y = 0 + MsgBox._height;
- }
- function Confirm(conf)
- {
- eval(ResLevel + ".MsgBox")._x = -500;
- if(int(ErrorAction) == 0)
- {
- if(!conf)
- {
- trace("Quit");
- fscommand("button","quit");
- }
- else
- {
- trace("Continue");
- fscommand("button","continue");
- }
- }
- else if(int(ErrorAction) == 1)
- {
- if(conf)
- {
- trace("Quit");
- fscommand("button","quit");
- }
- else
- {
- trace("Continue");
- fscommand("button","continue");
- }
- }
- }
- function AlertOK()
- {
- eval(ResLevel + ".MsgBox")._x = -500;
- if(int(ErrorAction) == 1)
- {
- fscommand("button","quit");
- }
- if(int(ErrorAction) == 2)
- {
- fscommand("button","OK");
- }
- }
- function SetUpInstallScreen()
- {
- eval(ResLevel).gotoAndStop("INSTALLING");
- }
- var SelectedComponents = new Array();
- SelectedComponents[0] = 0;
- SelectedComponents[1] = 0;
- SelectedComponents[2] = 0;
- SelectedComponents[3] = 0;
- var LoaderIndex = 0;
- var LoadStatus = new Array();
- var ComponentList = new Array();
- var ResLevel = "_level10";
- TOTAL_COMP = 1;
- i = 0;
- while(i < TOTAL_COMP)
- {
- duplicateMovieClip(WatcherOrigin,"Loader_" + i,16384 + (i + 1));
- i++;
- }
-