Frame 1
function ShowGrid() {
if (bShowGrid) {
var dp;
var t;
var i;
var n;
dp = GRID_DEPTH;
i = 0;
while (i < (FIELD_H + 1)) {
t = "Line" + i;
attachMovie("Pixel", t, dp++);
t = eval (t);
t._x = FIELD_OFFSET_X;
t._y = (i * CELL_H) + FIELD_OFFSET_Y;
t._width = CELL_W * FIELD_W;
t._height = 1;
t._alpha = 50;
i++;
}
(i = 0);
(n = FIELD_H + 1);
while (i < (FIELD_W + 1)) {
t = "Line" + n;
attachMovie("Pixel", t, dp++);
t = eval (t);
t._x = (i * CELL_W) + FIELD_OFFSET_X;
t._y = FIELD_OFFSET_Y;
t._width = 1;
t._height = CELL_W * FIELD_H;
t._alpha = 50;
i++;
n++;
}
}
}
function HideGrid() {
var i = 0;
while (i < GRID_LINES) {
var t = ("Line" + i);
t = eval (t);
t.removeMovieClip();
i++;
}
}
function CreateTip() {
attachMovie("Tip", "ToolTip", TIP_DEPTH);
ToolTip._visible = false;
attachMovie("Move Tip", "MoveTip", MTIP_DEPTH);
MoveTip._visible = false;
}
function CreateMovePtrs() {
var i = 0;
while (i < MAX_POINTS) {
var n = ("Flash" + i);
attachMovie("Move Pointer", n, FLASH_DEPTH + i);
n = eval (n);
n._width = FLASH_SIZE;
n._height = FLASH_SIZE;
n._visible = false;
n.id = i;
i++;
}
}
function HideMovePtrs() {
var i = 0;
while (i < MAX_POINTS) {
eval ("Flash" + i)._visible = false;
i++;
}
}
function CreateMap() {
Map = new Array(FIELD_W);
var i = 0;
while (i < FIELD_W) {
Map[i] = new Array(FIELD_H);
var j = 0;
while (j < FIELD_H) {
Map[i][j] = new Object();
Map[i][j].Name = "";
Map[i][j].Type = 0;
j++;
}
i++;
}
}
function ClearMap() {
var i = 0;
while (i < FIELD_W) {
var j = 0;
while (j < FIELD_H) {
if (Map[i][j].Type) {
Map[i][j].Name.removeMovieClip();
}
Map[i][j].Type = 0;
Map[i][j].Name = "";
j++;
}
i++;
}
}
function GenerateStars() {
var dp = STARS_DEPTH;
var x;
var y;
var i = 0;
while (i < MAX_STARS) {
do {
x = random(FIELD_W);
y = random(FIELD_H);
} while (Map[x][y].Name != "");
Map[x][y].Type = 1;
Map[x][y].Name = "Star" + i;
attachMovie("Flashing Star", Map[x][y].Name, dp++);
Map[x][y].Name = eval (Map[x][y].Name);
Map[x][y].Name._x = ((x * CELL_W) + FIELD_OFFSET_X) + SPRITE_OFF_X;
Map[x][y].Name._y = ((y * CELL_H) + FIELD_OFFSET_Y) + SPRITE_OFF_Y;
Map[x][y].Name._width = SPRITE_W;
Map[x][y].Name._height = SPRITE_H;
i++;
}
}
function CreatePoints() {
var i = 0;
while (i < MAX_POINTS) {
Points[i] = new Object();
Points[i].x = 0;
Points[i].y = 0;
i++;
}
}
function GeneratePoints() {
var x;
var y;
var i = 0;
while (i < MAX_POINTS) {
do {
x = random(FIELD_W);
y = random(FIELD_H);
// unexpected jump
var f = true;
var j = 0;
while (j < i) {
if ((x == Points[j].x) && (y == Points[j].y)) {
f = false;
}
j++;
}
} while (!f);
Points[i].x = x;
Points[i].y = y;
PRes[i] = CheckEnvironment(i);
i++;
}
}
function CreatePlayers() {
var i = 0;
while (i < MAX_PLAYERS) {
Players[i] = new Object();
Players[i].Type = COMP;
Players[i].ID = 0;
Players[i].Money = MAX_MONEY;
Players[i].Stock = new Array(MAX_CORPS);
var j = 0;
while (j < MAX_CORPS) {
Players[i].Stock[j] = 0;
j++;
}
Players[i].Name = Message35 + (i + 1);
i++;
}
Players[0].Type = HUMAN;
}
function InitPlayers() {
var i = 0;
while (i < MAX_PLAYERS) {
Players[i].ID = 0;
Players[i].Type = COMP;
Players[i].Money = MAX_MONEY;
var j = 0;
while (j < MAX_CORPS) {
Players[i].Stock[j] = 0;
j++;
}
Players[i].Name = Message35 + (i + 1);
i++;
}
Players[0].Type = HUMAN;
}
function CreateCorps() {
var i = 0;
while (i < MAX_CORPS) {
Corps[i] = new Object();
Corps[i].Name = "";
Corps[i].Clip = "";
Corps[i].Used = false;
Corps[i].Price = 0;
Corps[i].Num = 0;
Corps[i].ETCtr = 0;
Corps[i].ETFlag = false;
i++;
}
Corps[0].Clip = "Diamond Corporation";
Corps[1].Clip = "Dragon Corporation";
Corps[2].Clip = "Eagle Corporation";
Corps[3].Clip = "Lion Corporation";
Corps[4].Clip = "Spider Corporation";
Corps[0].Name = Message30;
Corps[1].Name = Message31;
Corps[2].Name = Message32;
Corps[3].Name = Message33;
Corps[4].Name = Message34;
NumCorps = 0;
}
function UseCorp(ind) {
Corps[ind].Num = 0;
Corps[ind].Price = 0;
Corps[ind].ETCtr = false;
Corps[ind].ETFlag = 0;
Corps[ind].Used = true;
var i = 0;
while (i < NumPlayers) {
Players[i].Stock[ind] = 0;
i++;
}
}
function InitCorps() {
var i = 0;
while (i < MAX_CORPS) {
Corps[i].Name = "";
Corps[i].Clip = "";
Corps[i].Used = false;
Corps[i].Price = 0;
Corps[i].Num = 0;
Corps[i].ETCtr = 0;
Corps[i].ETFlag = false;
i++;
}
Corps[0].Clip = "Diamond Corporation";
Corps[1].Clip = "Dragon Corporation";
Corps[2].Clip = "Eagle Corporation";
Corps[3].Clip = "Lion Corporation";
Corps[4].Clip = "Spider Corporation";
Corps[0].Name = Message30;
Corps[1].Name = Message31;
Corps[2].Name = Message32;
Corps[3].Name = Message33;
Corps[4].Name = Message34;
NumCorps = 0;
}
function ClearGame() {
ClearMsgs();
ClearMap();
HideGrid();
HideCoords();
var i = 0;
while (i < MAX_POINTS) {
eval ("Flash" + i).removeMovieClip();
i++;
}
PInfo.removeMovieClip();
BSWnd.removeMovieClip();
ToolTip.removeMovieClip();
MoveTip.removeMovieClip();
MWnd.removeMovieClip();
ObjDepth = OBJECTS_DEPTH;
bPaused = false;
NumEmbryos = 0;
}
function InitGame() {
CreateTip();
CreateMovePtrs();
ClearMap();
InitCorps();
ShowGrid();
CreateMW();
GenerateStars();
CurGameTurn = 0;
}
function CheckDivision() {
if (NumCorps) {
var t = random(int(DIV_CONST / NumCorps));
if (!t) {
var c = random(NumCorps);
c = random(NumCorps);
var k = 0;
var i = 0;
while (i < MAX_CORPS) {
if (Corps[i].Used) {
if (k == c) {
c = i;
break;
}
k++;
}
i++;
}
Corps[c].Price = int(Corps[c].Price / 2);
if (!Corps[c].Price) {
var id = ((NumEmbryos + Corps[c].Num) - 1);
var j = 0;
while (j < Corps[c].Num) {
var n = eval (Corps[c].Name + j);
CorpToEmbryo(n.x, n.y, n.Price, n.Depth, id);
j++;
}
Corps[c].Num = 0;
Corps[c].Used = false;
Corps[c].Price = 0;
Corps[c].ETCtr = 0;
Corps[c].ETFlag = false;
var j = 0;
while (j < NumPlayers) {
Player[j].Stock[c] = 0;
j++;
}
NumCorps--;
SBar.msg2 = NumCorps;
ShowBankrupt(c);
} else {
AttachMsg("Division Window");
Msg[CurMsg].Clip.Name = Corps[c].Name;
Msg[CurMsg].Clip.Price = Corps[c].Price;
var i = 0;
while (i < NumPlayers) {
Players[i].Stock[c] = int(Players[i].Stock[c] * 2);
i++;
}
Msg[CurMsg].Clip._visible = true;
}
}
}
}
function Init() {
fscommand ("showmenu", false);
CreateMap();
CreatePoints();
CreatePlayers();
CreateMsgs();
CreateCorps();
}
function GetCellType(x, y) {
if ((((x < 0) || (y < 0)) || (x >= FIELD_W)) || (y >= FIELD_H)) {
return(0);
}
return(Map[x][y].Type);
}
function CheckEnvironment(pt) {
var x = Points[pt].x;
var y = Points[pt].y;
var dx = new Array(4);
var dy = new Array(4);
var i = 0;
while (i < 4) {
dx[i] = 0;
dy[i] = 0;
i++;
}
dx[0] = -1;
dy[1] = -1;
dx[2] = 1;
dy[3] = 1;
var Res = new Object();
Res.Empty = 0;
Res.Stars = 0;
Res.Embryos = 0;
Res.Corps = 0;
Res.NumCorps = 0;
Res.EmbIDs = [];
Res.CorpIndex = [];
Res.ID = -1;
var c = new Array(5);
var i = 0;
while (i < 5) {
c[i] = 0;
i++;
}
var i = 0;
while (i < 4) {
var env = GetCellType(x + dx[i], y + dy[i]);
if (Env == 0) {
Res.Empty++;
} else if (Env == 1) {
Res.Stars++;
} else if (Env == 2) {
Res.EmbIDs[Res.Embryos++] = Map[x + dx[i]][y + dy[i]].Name.ID;
} else {
Res.Corps++;
c[Env - 3]++;
}
i++;
}
var i = 0;
while (i < 5) {
if (c[i]) {
Res.CorpIndex[Res.NumCorps++] = i;
}
i++;
}
if (Res.Empty == 4) {
Res.ID = 0;
} else if ((NumCorps >= MAX_CORPS) && (!Res.Corps)) {
Res.ID = 1;
} else if (Res.NumCorps == 1) {
Res.ID = 2;
} else if (1 < Res.NumCorps) {
Res.ID = 3;
var i = 0;
while (i < (Res.NumCorps - 1)) {
var j = (i + 1);
while (j < Res.NumCorps) {
if (Corps[Res.CorpIndex[i]].Num < Corps[Res.CorpIndex[j]].Num) {
var ti = Res.CorpIndex[i];
Res.CorpIndex[i] = Res.CorpIndex[j];
Res.CorpIndex[j] = ti;
} else if (Corps[Res.CorpIndex[i]].Num == Corps[Res.CorpIndex[j]].Num) {
if (Corps[Res.CorpIndex[i]].Price < Corps[Res.CorpIndex[j]].Price) {
var ti = Res.CorpIndex[i];
Res.CorpIndex[i] = Res.CorpIndex[j];
Res.CorpIndex[j] = ti;
}
}
j++;
}
i++;
}
} else if (Res.Stars) {
Res.ID = 4;
} else {
Res.ID = 5;
}
return(Res);
}
function CorpToEmbryo(x, y, price, dp, id) {
Map[x][y].Type = 2;
Map[x][y].Name = "Embryo" + (NumEmbryos++);
attachMovie("Embryo", Map[x][y].Name, dp);
Map[x][y].Name = eval (Map[x][y].Name);
Map[x][y].Name._x = ((x * CELL_W) + FIELD_OFFSET_X) + SPRITE_OFF_X;
Map[x][y].Name._y = ((y * CELL_H) + FIELD_OFFSET_Y) + SPRITE_OFF_Y;
Map[x][y].Name._width = SPRITE_W;
Map[x][y].Name._height = SPRITE_H;
Map[x][y].Name.ID = id;
Map[x][y].Name.x = x;
Map[x][y].Name.y = y;
Map[x][y].Name.price = price;
Map[x][y].Name.Depth = dp;
}
function AddEmbryo(x, y, price) {
Map[x][y].Type = 2;
Map[x][y].Name = "Embryo" + NumEmbryos;
attachMovie("Embryo", Map[x][y].Name, ObjDepth);
Map[x][y].Name = eval (Map[x][y].Name);
Map[x][y].Name._x = ((x * CELL_W) + FIELD_OFFSET_X) + SPRITE_OFF_X;
Map[x][y].Name._y = ((y * CELL_H) + FIELD_OFFSET_Y) + SPRITE_OFF_Y;
Map[x][y].Name._width = SPRITE_W;
Map[x][y].Name._height = SPRITE_H;
Map[x][y].Name.ID = NumEmbryos++;
Map[x][y].Name.x = x;
Map[x][y].Name.y = y;
Map[x][y].Name.price = price;
Map[x][y].Name.Depth = ObjDepth++;
}
function AddCorp(x, y, dp, ind, pr) {
Corps[ind].ETCtr = 0;
Corps[ind].ETFlag = false;
Map[x][y].Type = ind + 3;
Map[x][y].Name = Corps[ind].name + (Corps[ind].num++);
attachMovie(Corps[ind].Clip, Map[x][y].Name, dp);
Map[x][y].Name = eval (Map[x][y].Name);
Map[x][y].Name._x = ((x * CELL_W) + FIELD_OFFSET_X) + SPRITE_OFF_X;
Map[x][y].Name._y = ((y * CELL_H) + FIELD_OFFSET_Y) + SPRITE_OFF_Y;
Map[x][y].Name._width = SPRITE_W;
Map[x][y].Name._height = SPRITE_H;
Map[x][y].Name.x = x;
Map[x][y].Name.y = y;
Map[x][y].Name.Depth = dp;
Map[x][y].Name.Price = pr;
Map[x][y].Name.Ind = ind;
}
function FindCorp() {
var ind = new Array(MAX_CORPS);
var n = 0;
var i = 0;
while (i < MAX_CORPS) {
if (!Corps[i].Used) {
ind[n++] = i;
}
i++;
}
return(ind[random(n)]);
}
function ShowCCWnd(ind) {
AttachMsg("Create Corporation Window");
Msg[CurMsg].Clip.corp = Corps[ind].Name;
Msg[CurMsg].Clip.price = Corps[ind].Price;
Msg[CurMsg].Clip.founder = Players[CurPlayer].Name;
Msg[CurMsg].Clip.bonus = CC_BONUS;
Msg[CurMsg].Clip._visible = true;
PlaySound("Create Corp");
SBar.msg2 = NumCorps;
}
function CreatePInfo() {
attachMovie("Player Info", "PInfo", PINFO_DEPTH);
PInfo.Comp._visible = false;
PInfo.Human._visible = false;
PInfo._x = ((FIELD_W * CELL_W) + FIELD_OFFSET_X) + 16;
PInfo._y = FIELD_OFFSET_Y;
PInfo.Turns = MaxGameTurn - CurGameTurn;
PInfo._visible = false;
}
function BeginTurn() {
CurPlayer = 0;
var i = 0;
while (i < MAX_CORPS) {
if (Corps[i].Used) {
Corps[i].ETFlag = true;
}
i++;
}
CreatePInfo();
}
function BeginMove() {
PInfo.Name = Players[CurPlayer].Name;
PInfo.Money = Players[CurPlayer].Money;
if (Players[CurPlayer].Type == COMP) {
PInfo.Comp._visible = true;
PInfo.Human._visible = false;
GameControls.enabled = false;
NavBar.enabled = false;
} else {
PInfo.Comp._visible = false;
PInfo.Human._visible = true;
GameControls.enabled = true;
NavBar.enabled = true;
}
PInfo._visible = true;
GeneratePoints();
var i = 0;
while (i < MAX_POINTS) {
var n = eval ("Flash" + i);
n._x = ((Points[i].x * CELL_W) + FIELD_OFFSET_X) + FLASH_OFF;
n._y = ((Points[i].y * CELL_W) + FIELD_OFFSET_X) + FLASH_OFF;
n._visible = true;
if (Players[CurPlayer].Type == HUMAN) {
n.enabled = true;
} else {
n.enabled = false;
}
i++;
}
CurMove = -1;
if (Players[CurPlayer].Type == COMP) {
CurMove = SelectCompMove();
return(true);
}
return(false);
}
function AmalgamationWnd(NCorps, Indexes) {
AttachMsg("Amalgamation Window");
var i;
var n = Corps[indexes[0]].Name;
i = 1;
while (i < NCorps) {
if (i == (NCorps - 1)) {
n = n + Message12;
} else {
n = n + ", ";
}
n = n + Corps[indexes[i]].Name;
i++;
}
Msg[CurMsg].Clip.corps = n;
Msg[CurMsg].Clip.corp = Corps[indexes[0]].Name;
Msg[CurMsg].Clip.price = Corps[indexes[0]].Price;
Msg[CurMsg].Clip._visible = true;
PlaySound("Amalgamation");
BuyAndSell();
}
function ProcessMove() {
HideMW();
if (Players[CurPlayer].Type == HUMAN) {
PlaySound("Move");
}
HideMovePtrs();
MoveTip._visible = false;
var x = Points[CurMove].x;
var y = Points[CurMove].y;
var Res = PRes[CurMove];
bEffectiveMove = false;
if (Res.ID == 0) {
AddEmbryo(x, y, E_PRICE);
BuyAndSell();
PlaySound("Create Embryo");
return(undefined);
}
if (Res.ID == 1) {
var pr = (Res.Stars ? (Res.Stars * NSE_PRICE) : (E_PRICE));
if (!Res.Embryos) {
AddEmbryo(x, y, pr);
BuyAndSell();
PlaySound("Create Embryo");
return(undefined);
}
var id = NumEmbryos;
var i = 0;
while (i < Res.Embryos) {
var j = 0;
while (j < NumEmbryos) {
var name = ("Embryo" + j);
name = eval (name);
if (name.ID == Res.EmbIDs[i]) {
name.ID = NumEmbryos;
}
j++;
}
i++;
}
AddEmbryo(x, y, pr);
BuyAndSell();
return(undefined);
}
if (Res.ID == 2) {
var ind = Res.CorpIndex[0];
var pr = (Res.Stars ? (Res.Stars * NSE_PRICE) : (E_PRICE));
AddCorp(x, y, ObjDepth++, ind, pr);
Corps[ind].Price = Corps[ind].Price + pr;
Corps[ind].ETFlag = false;
Corps[ind].ETCtr = 0;
bEffectiveMove = true;
if (!Res.Embryos) {
BuyAndSell();
return(undefined);
}
var i = 0;
while (i < Res.Embryos) {
var j = 0;
while (j < NumEmbryos) {
var name = ("Embryo" + j);
name = eval (name);
if (name.ID == Res.EmbIDs[i]) {
var tx = name.x;
var ty = name.y;
var pr = name.Price;
var dp = name.Depth;
name.removeMovieClip();
AddCorp(tx, ty, dp, ind, pr);
Corps[ind].Price = Corps[ind].Price + pr;
}
j++;
}
i++;
}
BuyAndSell();
PlaySound("Increase Corp");
return(undefined);
}
if (Res.ID == 3) {
bEffectiveMove = true;
var ind = Res.CorpIndex[0];
var pr = (Res.Stars ? (Res.Stars * NSE_PRICE) : (E_PRICE));
AddCorp(x, y, ObjDepth++, ind, pr);
Corps[ind].Price = Corps[ind].Price + pr;
Corps[ind].ETCtr = 0;
Corps[ind].ETFlag = false;
if (Res.Embryos) {
var i = 0;
while (i < Res.Embryos) {
var j = 0;
while (j < NumEmbryos) {
var name = eval ("Embryo" + j);
if (name == undefined) {
} else if (name.ID == Res.EmbIDs[i]) {
var tx = name.x;
var ty = name.y;
var pr = name.price;
var dp = name.depth;
name.removeMovieClip();
AddCorp(tx, ty, dp, ind, pr);
Corps[ind].Price = Corps[ind].Price + pr;
}
j++;
}
i++;
}
}
var ind1 = Res.CorpIndex[0];
var i = 1;
while (i < Res.NumCorps) {
var ind2 = Res.CorpIndex[i];
var pr = int(((Corps[ind1].Price * Corps[ind1].Num) + (Corps[ind2].Price * Corps[ind2].Num)) / (Corps[ind1].Num + Corps[ind2].Num));
var j = 0;
while (j < NumPlayers) {
var pk = 1;
if (j == CurPlayer) {
pk = 1.5;
}
Players[j].Stock[ind1] = Players[j].Stock[ind1] + int((pk * (Players[j].Stock[ind2] * Corps[ind2].Price)) / pr);
j++;
}
Corps[ind1].Price = pr;
var j = 0;
while (j < Corps[ind2].Num) {
var nm = (Corps[ind2].Name + j);
nm = eval (nm);
AddCorp(nm.x, nm.y, nm.Depth, ind1, nm.Price);
j++;
}
Corps[ind2].Used = false;
Corps[ind2].ETFlag = false;
Corps[ind2].ETCtr = 0;
Corps[ind2].Price = 0;
Corps[ind2].Num = 0;
i++;
}
SBar.Msg2 = (NumCorps = (NumCorps - Res.NumCorps) + 1);
AmalgamationWnd(Res.NumCorps, Res.CorpIndex);
BuyAndSale();
return(undefined);
}
if (Res.ID == 4) {
bEffectiveMove = true;
var ind = FindCorp();
var pr = (Res.Stars * NSE_PRICE);
UseCorp(ind);
AddCorp(x, y, ObjDepth++, ind, pr);
NumCorps++;
Corps[ind].Price = pr;
Players[CurPlayer].Stock[ind] = CC_BONUS;
if (Res.Embryos) {
var i = 0;
while (i < Res.Embryos) {
var j = 0;
while (j < NumEmbryos) {
var name = ("Embryo" + j);
name = eval (name);
if (name.ID == Res.EmbIDs[i]) {
var tx = name.x;
var ty = name.y;
var dp = name.Depth;
var pr = name.price;
name.removeMovieClip();
AddCorp(tx, ty, dp, ind, pr);
Corps[ind].Price = Corps[ind].Price + pr;
}
j++;
}
i++;
}
}
ShowCCWnd(ind);
BuyAndSell();
return(undefined);
}
bEffectiveMove = true;
var ind = FindCorp();
UseCorp(ind);
AddCorp(x, y, ObjDepth++, ind, E_PRICE);
Corps[ind].Price = E_PRICE;
NumCorps++;
Players[CurPlayer].Stock[ind] = CC_BONUS;
var i = 0;
while (i < Res.Embryos) {
var j = 0;
while (j < NumEmbryos) {
var name = ("Embryo" + j);
name = eval (name);
if (name.ID == Res.EmbIDs[i]) {
var tx = name.x;
var ty = name.y;
var pr = name.price;
var dp = name.depth;
AddCorp(tx, ty, dp, ind, pr);
Corps[ind].Price = Corps[ind].Price + pr;
}
j++;
}
i++;
}
ShowCCWnd(ind);
BuyAndSell();
}
function BuyAndSell() {
if (bStockCreated) {
AttachStock();
}
if (!NumCorps) {
gotoAndStop (8);
return(undefined);
}
if (!bEffectiveMove) {
gotoAndStop (8);
return(undefined);
}
if (Players[CurPlayer].Type == COMP) {
eval ("CompBuyAndSell" + Players[CurPlayer].ID)();
gotoAndStop (8);
} else {
attachMovie("BuyAndSell Window", "BSWnd", GW_DEPTH);
BSWnd._x = 64;
BSWnd._y = 352;
NavBar.enabled = false;
}
}
function Halt() {
bPaused = true;
GameControls.enabled = false;
BSWnd._visible = false;
}
function Unhalt() {
bPaused = false;
GameControls.enabled = true;
BSWnd._visible = true;
}
function ShowOptions() {
Halt();
attachMovie("Options Window", "OptionsWnd", OPT_DEPTH);
OptionsWnd._x = 200;
OptionsWnd._y = 200;
}
function ShowStock() {
AttachStock();
}
function ShowHelp() {
Halt();
attachMovie("Help Window", "HelpWnd", OPT_DEPTH);
HelpWnd._x = 80;
HelpWnd._y = 60;
}
function StartNewGame() {
Halt();
attachMovie("Confirmation Window", "ConfWnd", OPT_DEPTH);
ConfWnd._x = 200;
ConfWnd._y = 250;
}
function PayDividends() {
if (!NumCorps) {
return(undefined);
}
var i = 0;
while (i < MAX_CORPS) {
if (Corps[i].Used) {
var div = 0;
if (Corps[i].ETCtr < MAX_ET) {
div = DIVIDEND;
} else if (int(E_PRICE / 2) < Corps[i].Price) {
div = random(DIVIDEND);
}
if (div) {
var j = 0;
while (j < NumPlayers) {
Players[j].Money = Players[j].Money + int(((Players[j].Stock[i] * Corps[i].Price) * div) / 100);
j++;
}
}
}
i++;
}
}
function GameResults() {
ClearGame();
attachMovie("Game Results Window", "GRWnd", GW_DEPTH);
GRWnd._x = 104;
GRWnd._y = 140;
}
function CheckDecreasePrice() {
var i = 0;
while (i < MAX_CORPS) {
if (Corps[i].Used && (Corps[i].ETFlag)) {
Corps[i].ETCtr++;
if (Corps[i].ETCtr >= MAX_ET) {
if (DECR_VALUE < Corps[i].Price) {
Corps[i].Price = Corps[i].Price - DECR_VALUE;
} else {
Corps[i].Price = int(Corps[i].Price / 2);
if (!Corps[i].Price) {
var id = ((NumEmbryos + Corps[i].Num) - 1);
var j = 0;
while (j < Corps[i].Num) {
var n = eval (Corps[i].Name + j);
CorpToEmbryo(n.x, n.y, n.Price, n.Depth, id);
j++;
}
Corps[i].Num = 0;
Corps[i].Used = false;
Corps[i].Price = 0;
Corps[i].ETCtr = 0;
Corps[i].ETFlag = false;
var j = 0;
while (j < NumPlayers) {
Player[j].Stock[i] = 0;
j++;
}
NumCorps--;
Sbar.msg2 = NumCorps;
ShowBankrupt(i);
}
}
}
}
i++;
}
}
function CompBuyAndSell0() {
var ind = [];
var k = 0;
var nc = 0;
var i = 0;
while (i < MAX_CORPS) {
if (Corps[i].Used) {
ind[k++] = i;
if (Players[CurPlayer].stock[i] >= CC_BONUS) {
nc++;
}
}
i++;
}
if (1 < NumCorps) {
var i = 0;
while (i < (NumCorps - 1)) {
var j = i;
while (j < NumCorps) {
if (Players[CurPlayer].stock[ind[i]] < Players[CurPlayer].stock[ind[j]]) {
var t = ind[i];
ind[i] = ind[j];
ind[j] = t;
}
j++;
}
i++;
}
}
var cash = Players[CurPlayer].Money;
var rr;
if (nc) {
rr = random(10);
}
var i = 0;
while (i < NumCorps) {
if (Players[CurPlayer].stock[ind[i]] >= CC_BONUS) {
var buy = int(cash / Corps[ind[i]].price);
if (4 < rr) {
cash = cash - int(buy * Corps[ind[i]].price);
} else {
buy = int(buy / nc);
cash = cash - int(buy * Corps[ind[i]].price);
}
Players[CurPlayer].Stock[ind[i]] = Players[CurPlayer].Stock[ind[i]] + buy;
} else {
var sh = Players[CurPlayer].stock[ind[i]];
if ((sh / 2) < random(sh)) {
var sell = random(sh + 1);
cash = cash + (sell * Corps[ind[i]].price);
Players[CurPlayer].Stock[ind[i]] = Players[CurPlayer].Stock[ind[i]] - sell;
} else {
var buy;
if (i == (NumCorps - 1)) {
buy = int(cash / Corps[ind[i]].price);
} else {
buy = random(int(cash / Corps[ind[i]].price) + 1);
}
cash = cash - int(buy * Corps[ind[i]].price);
Players[CurPlayer].Stock[ind[i]] = Players[CurPlayer].Stock[ind[i]] + buy;
}
}
i++;
}
Players[CurPlayer].Money = cash;
}
function CompBuyAndSell1() {
var ind = [];
var k = 0;
var nc = 0;
var i = 0;
while (i < MAX_CORPS) {
if (Corps[i].Used) {
ind[k++] = i;
if (Players[CurPlayer].stock[i] >= CC_BONUS) {
nc++;
}
}
i++;
}
var ns = 0;
if (1 < NumCorps) {
var i = 0;
while (i < (NumCorps - 1)) {
var j = i;
while (j < NumCorps) {
if (Corps[ind[i]].Num < Corps[ind[j]].Num) {
var t = ind[i];
ind[i] = ind[j];
ind[j] = t;
} else if (Corps[ind[i]].Num == Corps[ind[j]].Num) {
if (Players[CurPlayer].stock[ind[i]] < Players[CurPlayer].stock[ind[j]]) {
var t = ind[i];
ind[i] = ind[j];
ind[j] = t;
}
}
j++;
}
i++;
}
var i = 1;
while (i < NumCorps) {
if (Corps[ind[0]].Num == Corp[ind[i]].Num) {
ns++;
}
i++;
}
}
var cash = Players[CurPlayer].Money;
if ((ns + 1) == NumCorps) {
var rr;
if (nc) {
rr = random(10);
}
var i = 0;
while (i < NumCorps) {
if (Players[CurPlayer].stock[ind[i]] >= CC_BONUS) {
var buy = int(cash / Corps[ind[i]].price);
if (4 < rr) {
cash = cash - int(buy * Corps[ind[i]].price);
} else {
buy = int(buy / nc);
cash = cash - int(buy * Corps[ind[i]].price);
}
Players[CurPlayer].Stock[ind[i]] = Players[CurPlayer].Stock[ind[i]] + buy;
} else {
var sh = Players[CurPlayer].stock[ind[i]];
if ((sh / 2) < random(sh)) {
var sell = random(sh + 1);
cash = cash + (sell * Corps[ind[i]].price);
Players[CurPlayer].Stock[ind[i]] = Players[CurPlayer].Stock[ind[i]] - sell;
} else {
var buy;
if (i == (NumCorps - 1)) {
buy = int(cash / Corps[ind[i]].price);
} else {
buy = random(int(cash / Corps[ind[i]].price) + 1);
}
cash = cash - int(buy * Corps[ind[i]].price);
Players[CurPlayer].Stock[ind[i]] = Players[CurPlayer].Stock[ind[i]] + buy;
}
}
i++;
}
} else {
var sz = Corps[ind[0]].Num;
var i = 0;
while (i < NumCorps) {
if (Corps[ind[i]].Num != sz) {
cash = cash + (Players[CurPlayer].Stock[ind[i]] * Corps[ind[i]].Price);
Players[CurPlayer].Stock[ind[i]] = 0;
}
i++;
}
var buy = int(cash / Corps[ind[0]].Price);
Players[CurPlayer].Stock[ind[0]] = Players[CurPlayer].Stock[ind[0]] + buy;
cash = cash - (buy * Corps[ind[0]].Price);
}
Players[CurPlayer].Money = cash;
}
function CompBuyAndSell2() {
var ind = [];
var k = 0;
var nc = 0;
var i = 0;
while (i < MAX_CORPS) {
if (Corps[i].Used) {
ind[k++] = i;
if (Players[CurPlayer].stock[i] >= CC_BONUS) {
nc++;
}
}
i++;
}
var ns = 0;
if (1 < NumCorps) {
var i = 0;
while (i < (NumCorps - 1)) {
var j = i;
while (j < NumCorps) {
if (Corps[ind[i]].Num < Corps[ind[j]].Num) {
var t = ind[i];
ind[i] = ind[j];
ind[j] = t;
} else if (Corps[ind[i]].Num == Corps[ind[j]].Num) {
if (Players[CurPlayer].stock[ind[i]] < Players[CurPlayer].stock[ind[j]]) {
var t = ind[i];
ind[i] = ind[j];
ind[j] = t;
}
}
j++;
}
i++;
}
var i = 1;
while (i < NumCorps) {
if (Corps[ind[0]].Num == Corp[ind[i]].Num) {
ns++;
}
i++;
}
}
var cash = Players[CurPlayer].Money;
if ((ns + 1) == NumCorps) {
var rr;
if (nc) {
rr = random(10);
}
var i = 0;
while (i < NumCorps) {
if (Players[CurPlayer].stock[ind[i]] >= CC_BONUS) {
var buy = int(cash / Corps[ind[i]].price);
if (4 < rr) {
cash = cash - int(buy * Corps[ind[i]].price);
} else {
buy = int(buy / nc);
cash = cash - int(buy * Corps[ind[i]].price);
}
Players[CurPlayer].Stock[ind[i]] = Players[CurPlayer].Stock[ind[i]] + buy;
} else {
var sh = Players[CurPlayer].stock[ind[i]];
if ((sh / 2) < random(sh)) {
var sell = random(sh + 1);
cash = cash + (sell * Corps[ind[i]].price);
Players[CurPlayer].Stock[ind[i]] = Players[CurPlayer].Stock[ind[i]] - sell;
} else {
var buy;
if (i == (NumCorps - 1)) {
buy = int(cash / Corps[ind[i]].price);
} else {
buy = random(int(cash / Corps[ind[i]].price) + 1);
}
cash = cash - int(buy * Corps[ind[i]].price);
Players[CurPlayer].Stock[ind[i]] = Players[CurPlayer].Stock[ind[i]] + buy;
}
}
i++;
}
} else if ((30 < (Corps[ind[0]].Num - Corps[ind[NumCorps - 1]].Num)) && (E_PRICE < Corps[ind[NumCorps - 1]].Price)) {
var buy = int(cash / Corps[ind[NumCorps - 1]].Price);
Players[CurPlayer].Stock[ind[NumCorps - 1]] = Players[CurPlayer].Stock[ind[NumCorps - 1]] + buy;
cash = cash - (buy * Corps[ind[NumCorps - 1]].Price);
} else {
var sz = Corps[ind[0]].Num;
var i = 0;
while (i < NumCorps) {
if (Corps[ind[i]].Num != sz) {
cash = cash + (Players[CurPlayer].Stock[ind[i]] * Corps[ind[i]].Price);
Players[CurPlayer].Stock[ind[i]] = 0;
}
i++;
}
var buy = int(cash / Corps[ind[0]].Price);
Players[CurPlayer].Stock[ind[0]] = Players[CurPlayer].Stock[ind[0]] + buy;
cash = cash - (buy * Corps[ind[0]].Price);
}
Players[CurPlayer].Money = cash;
}
function SelectCompMove() {
var mw = new Array(MAX_POINTS);
var i = 0;
while (i < MAX_POINTS) {
var x = Points[i].x;
var y = Points[i].y;
var Res = PRes[i];
if (Res.ID == 0) {
mw[i] = 0;
} else if (Res.ID == 1) {
mw[i] = (1 + (2 * Res.Stars)) + Res.Embryos;
} else if (Res.ID == 2) {
mw[i] = 11 + (Players[CurPlayer].Stock[Res.CorpIndex[0]] >= CC_BONUS);
} else if (Res.ID == 3) {
var ind = Res.CorpIndex[0];
mw[i] = ((Players[CurPlayer].Stock[ind] >= CC_BONUS) ? 15 : 10);
} else {
var p = 0;
if (Res.Embryos) {
var j = 0;
while (j < Res.Embryos) {
var k = 0;
while (k < NumEmbryos) {
var n = eval ("Embryo" + k);
if (n.Id == Res.EmbIDs[j]) {
p = p + int(n.Price / E_PRICE);
}
k++;
}
j++;
}
}
mw[i] = (20 + (10 * Res.Stars)) + p;
}
i++;
}
var mwc = 0;
var i = 0;
while (i < MAX_POINTS) {
if (mw[i] >= 10) {
mwc++;
}
i++;
}
var m = mw[0];
var p = 0;
var i = 1;
while (i < MAX_POINTS) {
if (m < mw[i]) {
m = mw[i];
p = i;
}
i++;
}
if (!mwc) {
p = random(MAX_POINTS);
}
return(p);
}
function ShowTip(name, ind) {
if (bShowTips) {
var xm = _xmouse;
var ym = _ymouse;
var w = ((FIELD_W * CELL_W) + FIELD_OFFSET_X);
var h = ((FIELD_H * CELL_H) + FIELD_OFFSET_Y);
ToolTip._x = ((w < (xm + 140)) ? (w - 140) : (xm));
ToolTip._y = ((h < (ym + 24)) ? (h - 24) : (ym));
ToolTip.label = name;
ToolTip._visible = true;
}
if (bShowSBar) {
SBar.msg0 = (((name + Message39) + Corps[ind].Price) + Message40) + Corps[ind].Num;
}
}
function ShowMTip(i) {
if (bShowTips) {
var xm = _xmouse;
var ym = _ymouse;
var w = ((FIELD_W * CELL_W) + FIELD_OFFSET_X);
var h = ((FIELD_H * CELL_H) + FIELD_OFFSET_Y);
MoveTip._x = ((w < (xm + 108)) ? (w - 108) : (xm));
MoveTip._y = ((h < (ym + 24)) ? (h - 24) : (ym));
MoveTip.label = Message6;
MoveTip._visible = true;
var t = 19;
if ((PRes[i].ID == 0) || (PRes[i].ID == 1)) {
t = 22;
} else if (Res[i].ID == 2) {
t = 21;
} else if (PRes[i].ID == 3) {
t = 20;
}
SBar.msg0 = eval ("Message" + t);
}
}
function AttachStock() {
if (bStockCreated) {
HideMWnd();
CurMsg = NumMsg - 1;
Msg[CurMsg].Clip.gotoAndPlay(2);
if (1 < NumMsg) {
NavBar.be1 = true;
NavBar.be2 = true;
} else {
NavBar.be1 = false;
NavBar.be2 = false;
}
NavBar.be3 = false;
NavBar.be4 = false;
} else {
AttachMsg("Stock Window");
Msg[CurMsg].Clip._visible = true;
bStockCreated = true;
PlaySound("Stock Market");
}
}
function AttachMsg(name) {
HideMW();
Msg[CurMsg].Clip._visible = false;
if (bStockCreated) {
CurMsg = NumMsg - 1;
Msg[CurMsg].Clip.removeMovieClip();
bStockCreated = false;
attachMovie(name, Msg[CurMsg].Name, Msg[CurMsg].Depth);
Msg[CurMsg].Clip = eval (Msg[CurMsg].Name);
} else if (NumMsg == MAX_MSGS) {
var n = Msg[0].Name;
var dp = Msg[0].Depth;
Msg[0].Clip.removeMovieClip();
var i = 0;
while (i < (MAX_MSGS - 1)) {
Msg[i].Clip = Msg[i + 1].Clip;
Msg[i].Name = Msg[i + 1].Name;
Msg[i].Depth = Msg[i + 1].Depth;
i++;
}
attachMovie(name, n, dp);
CurMsg = MAX_MSGS - 1;
Msg[CurMsg].Clip = eval (n);
Msg[CurMsg].Name = n;
Msg[CurMsg].Depth = dp;
} else {
var n = ("MMsg" + NumMsg);
var dp = NumMsg;
CurMsg = NumMsg;
NumMsg++;
attachMovie(name, n, dp);
Msg[CurMsg].Clip = eval (n);
Msg[CurMsg].Name = n;
Msg[CurMsg].Depth = dp;
}
Msg[CurMsg].Clip._visible = false;
Msg[CurMsg].Clip._x = MSG_X;
Msg[CurMsg].Clip._y = MSG_Y;
if (MSG_W < Msg[CurMsg].Clip._width) {
Msg[CurMsg].Clip._width = MSG_W;
}
if (MSG_H < Msg[CurMsg].Clip._height) {
Msg[CurMsg].Clip._height = MSG_H;
}
if (1 < NumMsg) {
NavBar.be1 = true;
NavBar.be2 = true;
} else {
NavBar.be1 = false;
NavBar.be2 = false;
}
NavBar.be3 = false;
NavBar.be4 = false;
}
function ClearMsgs() {
var i = 0;
while (i < NumMsg) {
Msg[i].Clip.removeMovieClip();
Msg[i].Name = "";
Msg[i].Depth = -1;
Msg[i].Type = false;
i++;
}
NumMsg = 0;
CurMsg = 0;
bStockCreated = false;
NavBar.be1 = false;
NavBar.be2 = false;
NavBar.be3 = false;
NavBar.be4 = false;
NavBar.enabled = false;
}
function CreateMsgs() {
Msg = new Array(MAX_MSGS);
var i = 0;
while (i < MAX_MSGS) {
Msg[i] = new Object();
Msg[i].Clip = "";
Msg[i].Depth = -1;
Msg[i].Name = "";
i++;
}
NumMsg = 0;
CurMsg = 0;
NavBar.be1 = false;
NavBar.be2 = false;
NavBar.be3 = false;
NavBar.be4 = false;
NavBar.enabled = false;
bStockCreated = false;
}
function ShowBankrupt(ind) {
AttachMsg("Bankrupt Window");
Msg[CurMsg].Clip.corp = Corps[ind].Name;
Msg[CurMsg].Clip._visible = true;
PlaySound("Bankrupt");
}
function PlaySound(nm) {
if (bPlaySound) {
var s = new Sound();
s.attachSound(nm);
s.start();
}
}
function CreateMW() {
attachMovie("Message Window", "MWnd", MW_DEPTH);
MWnd.label = "";
MWnd._x = MSG_X;
MWnd._y = MSG_Y;
HideMW();
}
function ShowMW() {
if (bMWndEnabled) {
bShowMWnd = true;
MWnd._visible = true;
}
}
function HideMW() {
bShowMWnd = false;
MWnd._visible = false;
}
Message0 = "Number of corporations:";
Message1 = "Display first message";
Message2 = "Display previous message";
Message3 = "Dispaly next message";
Message4 = "Display last message";
Message5 = "Corporation Germ";
Message6 = "Choose step";
Message7 = "Daimond Corporation";
Message8 = "Dragon Corporation";
Message9 = "Eagle Corporation";
Message10 = "Lion Corporation";
Message11 = "Spider Corporation";
Message12 = " and ";
Message13 = "Computer is choosing a step";
Message14 = "Computer has chosen a step";
Message15 = "Buy as many shares as possible";
Message16 = "Buy as few shares as possible";
Message17 = "Sell as many shares as possible";
Message18 = "Sell as few shares as possible";
Message19 = "As a result of this step a corporation will be created";
Message20 = "This step will cause the merge of corporations";
Message21 = "This step will make the corporation expand";
Message22 = "After this step a corporation germ will be created";
Message23 = "Informaion exchange";
Message24 = "Start new game";
Message25 = "Change game settings";
Message26 = "Game Rules";
Message27 = "http://absolutist.com";
Message28 = "Stop purchasing/selling";
Message29 = "Move the window";
Message30 = "Diamond";
Message31 = "Dragon";
Message32 = "Eagle";
Message33 = "Lion";
Message34 = "Spider";
Message35 = "PLAYER-";
Message36 = "Make a step by clicking on one of four marks on the map";
Message37 = "Player";
Message38 = "Computer";
Message39 = " Share rates: ";
Message40 = " Size: ";
MAX_MSGS = 10;
MAX_AI = 3;
FIELD_W = 20;
FIELD_H = 10;
FIELD_OFFSET_X = 16;
FIELD_OFFSET_Y = 16;
CELL_W = 32;
CELL_H = 32;
SPRITE_W = 30;
SPRITE_H = 30;
SPRITE_OFF_X = CELL_W - SPRITE_W;
SPRITE_OFF_Y = CELL_H - SPRITE_H;
FLASH_SIZE = 20;
FLASH_OFF = 6;
MSG_X = FIELD_OFFSET_X;
MSG_Y = (FIELD_OFFSET_Y + (FIELD_H * CELL_H)) + 33;
MSG_W = FIELD_W * CELL_W;
MSG_H = (600 - MSG_Y) - 25;
MAX_POINTS = 4;
MAX_MONEY = 500;
MAX_STARS = 12;
MAX_PLAYERS = 4;
MAX_CORPS = 5;
DIV_CONST = 50;
DIVIDEND = 5;
MAX_ET = 5;
CC_BONUS = 10;
E_PRICE = 10;
NSE_PRICE = 100;
DECR_VALUE = E_PRICE;
AMALG_PERCENT = 20;
MAX_FREE_CELLS = int((FIELD_W * FIELD_H) - MAX_STARS);
GRID_LINES = ((FIELD_W + 1) + FIELD_H) + 1;
BASE_DEPTH = 0;
GRID_DEPTH = BASE_DEPTH + MAX_MSGS;
STARS_DEPTH = GRID_DEPTH + GRID_LINES;
OBJECTS_DEPTH = (STARS_DEPTH + MAX_STARS) + 10;
TIP_DEPTH = 10000;
MTIP_DEPTH = TIP_DEPTH + 1;
FLASH_DEPTH = MTIP_DEPTH + 1;
PINFO_DEPTH = FLASH_DEPTH + MAX_POINTS;
GW_DEPTH = PINFO_DEPTH + 1;
SB_DEPTH = GW_DEPTH + 1;
MW_DEPTH = SB_DEPTH + 1;
OPT_DEPTH = MW_DEPTH + 1;
HUMAN = false;
COMP = true;
CurMsg = 0;
NumMsg = 0;
NumPlayers = 2;
NumCorps = 0;
Points = new Array(MAX_POINTS);
PRes = new Array(MAX_POINTS);
Players = new Array(MAX_PLAYERS);
Corps = new Array(MAX_CORPS);
bPlaySound = true;
bShowGrid = true;
bShowBG = true;
bShowSBar = true;
bShowTips = true;
bMWndEnabled = true;
bStarAnim = true;
bPtrAnim = true;
FreeCells = MAX_FREE_CELLS;
CurSel = -1;
ObjDepth = OBJECTS_DEPTH;
NumEmbryos = 0;
bEffectiveMove = false;
MaxGameTurn = int((MAX_FREE_CELLS - MAX_POINTS) / 2);
bPaused = false;
bStockCreated = false;
bShowMWnd = false;
Init();
Init();
Frame 2
InitPlayers();
var i = 0;
while (i < 25) {
_root["gfx" + i].removeMovieClip();
i++;
}
attachMovie("Game Settings", "GSWnd", GW_DEPTH);
GSWnd._x = 144;
GSWnd._y = 100;
stop();
Frame 3
BG._visible = bShowBG;
SBar._visible = bShowSBar;
InitGame();
SBar.msg0 = "";
SBar.msg1 = Message0;
SBar.msg2 = NumCorps;
NavBar.enabled = true;
gotoAndStop (4);
Frame 4
if (CurGameTurn >= MaxGameTurn) {
gotoAndStop (10);
stop();
} else {
SBar.msg0 = "";
BeginTurn();
CheckDivision();
gotoAndStop (5);
}
stop();
Frame 5
if (BeginMove()) {
timer = getTimer();
msec = 1000;
wsec = false;
SBar.msg0 = Message13;
gotoAndPlay (6);
} else {
MWnd.label = (Players[CurPlayer].Name + ", ") + Message36;
ShowMW();
SBar.msg0 = (Players[CurPlayer].Name + ", ") + Message36;
if (bStockCreated) {
if (!bMWndEnable) {
AttachStock();
} else {
Msg[NumMsg - 1].Clip.gotoAndPlay(2);
}
}
stop();
}
Frame 6
if (msec < (getTimer() - timer)) {
if (wsec) {
ProcessMove();
stop();
} else {
var i = 0;
while (i < MAX_POINTS) {
if (i != CurMove) {
eval ("Flash" + i)._visible = false;
}
i++;
}
wsec = true;
msec = 400;
timer = getTimer();
SBar.msg0 = Message14;
}
}
Frame 7
gotoAndPlay (6);
Frame 8
CurPlayer++;
if (CurPlayer >= NumPlayers) {
gotoAndStop (9);
} else {
gotoAndStop (5);
}
Frame 9
PInfo.removeMovieClip();
CurGameTurn++;
CheckDecreasePrice();
PayDividends();
gotoAndStop (4);
Frame 10
GameResults();
var s = new Sound();
s.stop();
PlaySound("Game Results");
stop();
Symbol 11 MovieClip [Firework] Frame 25
gotoAndPlay (1);
Symbol 20 MovieClip [Flashing Star] Frame 1
function Init() {
if (!_root.bStarAnim) {
stop();
}
}
Init();
Symbol 20 MovieClip [Flashing Star] Frame 2
Alpha = random(90);
dx1 = random(10) + 2;
dx2 = random(10) + 2;
if (40 >= Alpha) {
Alpha = 40;
}
gotoAndPlay (3);
Symbol 20 MovieClip [Flashing Star] Frame 3
this.star._alpha = this.star._alpha - dx1;
if (Alpha >= this.star._alpha) {
gotoAndPlay (5);
}
Symbol 20 MovieClip [Flashing Star] Frame 4
gotoAndPlay (3);
Symbol 20 MovieClip [Flashing Star] Frame 5
this.star._alpha = this.star._alpha + dx2;
if (this.star._alpha >= 100) {
gotoAndPlay (2);
}
Symbol 20 MovieClip [Flashing Star] Frame 6
gotoAndPlay (5);
Symbol 22 Button
on (rollOver) {
ShowTip();
}
on (rollOut) {
HideTip();
}
Symbol 24 MovieClip [Diamond Corporation] Frame 1
function ShowTip() {
_root.ShowTip(_root.Message7, this.ind);
}
function HideTip() {
_root.ToolTip._visible = false;
_root.SBar.msg0 = "";
}
Symbol 26 MovieClip [Eagle Corporation] Frame 1
function ShowTip() {
_root.ShowTip(_root.Message9, this.ind);
}
function HideTip() {
_root.ToolTip._visible = false;
_root.SBar.msg0 = "";
}
Symbol 28 MovieClip [Dragon Corporation] Frame 1
function ShowTip() {
_root.ShowTip(_root.Message8, this.ind);
}
function HideTip() {
_root.ToolTip._visible = false;
_root.SBar.msg0 = "";
}
Symbol 30 MovieClip [Lion Corporation] Frame 1
function ShowTip() {
_root.ShowTip(_root.Message10, this.ind);
}
function HideTip() {
_root.ToolTip._visible = false;
_root.SBar.msg0 = "";
}
Symbol 31 Button
on (rollOver) {
ShowTip();
}
on (rollOut) {
HideTip();
}
on (release) {
Debug();
}
Symbol 33 MovieClip [Embryo] Frame 1
function ShowTip() {
_root.ShowTip(_root.Message5);
_root.SBar.msg0 = _root.Message5;
}
function HideTip() {
_root.ToolTip._visible = false;
_root.SBar.msg0 = "";
}
Symbol 35 MovieClip [Spider Corporation] Frame 1
function ShowTip() {
_root.ShowTip(_root.Message11, this.ind);
}
function HideTip() {
_root.ToolTip._visible = false;
_root.SBar.msg0 = "";
}
Symbol 42 Button
on (rollOver) {
ShowTip();
}
on (rollOut) {
HideTip();
}
on (release) {
ProcessMove();
}
Symbol 53 MovieClip [Move Pointer] Frame 1
function Init() {
if (this.enabled == undefined) {
this.enabled = true;
}
if (!_root.bPtrAnim) {
stop();
}
}
function ShowTip() {
if (this.enabled) {
_root.ShowMTip(this.id);
}
}
function HideTip() {
if (this.enabled) {
_root.MoveTip._visible = false;
_root.SBar.msg0 = "";
}
}
function ProcessMove() {
if ((!_root.bPaused) && (this.enabled)) {
HideTip();
this._visible = false;
_root.CurMove = this.id;
_root.ProcessMove();
}
}
Init();
Symbol 53 MovieClip [Move Pointer] Frame 10
gotoAndPlay (2);
Symbol 62 Button
on (release, keyPress "<Enter>") {
Close();
}
Symbol 70 Button
on (release) {
Change();
}
Symbol 74 MovieClip Frame 1
function Init() {
if (this.State == undefined) {
this.State = 0;
}
if (this.enabled == undefined) {
this.enabled = true;
}
SetStatus();
}
function SetStatus() {
var st = this.State;
if (st == 0) {
this.label = _root.Message37;
} else if (st == 1) {
this.label = _root.Message38;
}
if (this.enabled) {
this.gr._visible = false;
} else {
this.gr._visible = true;
}
}
function Change() {
if (this.enabled) {
if (this.State) {
this.State = 0;
} else {
this.State = 1;
}
SetStatus();
}
}
Init();
Symbol 74 MovieClip Frame 2
SetStatus();
Symbol 74 MovieClip Frame 3
gotoAndPlay (2);
Symbol 85 MovieClip Frame 1
function Init() {
this.button1.State = 0;
this.button2.State = 1;
this.button3.State = 1;
this.button4.State = 1;
this.button1.enabled = false;
this.button3.enabled = false;
this.button4.enabled = false;
}
Init();
Symbol 90 Button
on (release) {
Change(2);
}
Symbol 91 Button
on (release) {
Change(1);
}
Symbol 92 Button
on (release) {
Change(3);
}
Symbol 102 MovieClip Frame 1
function Init() {
if (this.State == undefined) {
this.State = 1;
}
}
function SetStatus() {
var st = this.State;
if (st == 1) {
this.indicator1._visible = true;
this.indicator2._visible = false;
this.indicator3._visible = false;
} else if (st == 2) {
this.indicator1._visible = false;
this.indicator2._visible = true;
this.indicator3._visible = false;
} else if (st == 3) {
this.indicator1._visible = false;
this.indicator2._visible = false;
this.indicator3._visible = true;
} else {
this.indicator1._visible = false;
this.indicator2._visible = false;
this.indicator3._visible = false;
}
}
function Change(st) {
this.State = st;
SetStatus();
}
Init();
Symbol 102 MovieClip Frame 2
SetStatus();
Symbol 102 MovieClip Frame 3
gotoAndPlay (2);
Symbol 106 MovieClip [Game Settings] Frame 1
function Init() {
if (this.Players == undefined) {
this.Players = 2;
this.NumPlayers.State = 1;
this.Names.Player1 = _root.Players[0].Name;
this.Names.Player2 = _root.Players[1].Name;
this.Names.Player3 = _root.Players[2].Name;
this.Names.Player4 = _root.Players[3].Name;
this.mt = int((_root.MAX_FREE_CELLS - _root.MAX_POINTS) / this.Players);
this.maxturns = "<= " + mt;
this.turns = this.mt;
this.old = this.turns;
}
}
function CheckState() {
var st = this.NumPlayers.State;
if (st == 1) {
this.Players = 2;
this.Names.Button3.Enabled = false;
this.Names.Button4.Enabled = false;
this.mt = int((_root.MAX_FREE_CELLS - _root.MAX_POINTS) / this.Players);
this.maxturns = "<= " + mt;
CheckTurns();
} else if (st == 2) {
this.Players = 3;
this.Names.Button3.Enabled = true;
this.Names.Button4.Enabled = false;
this.mt = int((_root.MAX_FREE_CELLS - _root.MAX_POINTS) / this.Players);
this.maxturns = "<= " + mt;
CheckTurns();
} else if (st == 3) {
this.Players = 4;
this.Names.Button3.Enabled = true;
this.Names.Button4.Enabled = true;
this.mt = int((_root.MAX_FREE_CELLS - _root.MAX_POINTS) / this.Players);
this.maxturns = "<= " + mt;
CheckTurns();
}
CheckTurns();
Save();
}
function CheckTurns() {
if (isNaN(this.turns) || (0 >= this.turns)) {
this.turns = this.old;
}
this.turns = int(this.turns);
if (this.mt < this.turns) {
this.turns = this.mt;
}
this.old = this.turns;
}
function Save() {
_root.MaxGameTurn = this.turns;
_root.NumPlayers = this.Players;
_root.Players[0].Name = this.Names.Player1;
_root.Players[1].Name = this.Names.Player2;
_root.Players[2].Name = this.Names.Player3;
_root.Players[3].Name = this.Names.Player4;
_root.Players[0].Type = this.Names.Button1.State;
_root.Players[1].Type = this.Names.Button2.State;
_root.Players[2].Type = this.Names.Button3.State;
_root.Players[3].Type = this.Names.Button4.State;
}
function Close() {
this._visible = false;
Save();
var i = 0;
while (i < this.Players) {
if (_root.Players[i].Type == _root.COMP) {
_root.Players[i].ID = random(_root.MAX_AI);
}
i++;
}
_root.gotoAndStop("BeginGame");
this.removeMovieClip();
}
Init();
Symbol 106 MovieClip [Game Settings] Frame 2
CheckState();
Symbol 106 MovieClip [Game Settings] Frame 3
gotoAndPlay (2);
Symbol 108 Button
on (release) {
OK();
}
Symbol 109 Button
on (release) {
Cancel();
}
Symbol 113 Button
on (release) {
if (this.enabled) {
Change();
}
}
Symbol 114 MovieClip Frame 1
function Init() {
if (this.Checked == undefined) {
this.Checked = false;
}
if (this.enabled == undefined) {
this.enabled = true;
}
}
function SetStatus() {
this.Indicator._visible = this.Checked;
}
function Change() {
if (this.Checked) {
this.Checked = false;
} else {
this.Checked = true;
}
SetStatus();
}
Init();
Symbol 114 MovieClip Frame 2
SetStatus();
Symbol 114 MovieClip Frame 3
gotoAndPlay (2);
Symbol 127 MovieClip [Options Window] Frame 1
function Init() {
if (this.inited == undefined) {
this.inited = true;
this.check1.Checked = _root.bShowGrid;
this.check2.Checked = _root.bPlaySound;
this.check3.Checked = _root.bStarAnim;
this.check4.Checked = _root.bPtrAnim;
this.check5.Checked = _root.bShowBG;
this.check6.Checked = _root.bShowTips;
this.check7.Checked = _root.bMWndEnabled;
this.check8.Checked = _root.bShowSBar;
}
}
function Close() {
_root.Unhalt();
this.removeMovieClip();
}
function OK() {
if (this.check1.Checked != _root.bShowGrid) {
_root.bShowGrid = this.check1.Checked;
if (this.check1.Checked) {
_root.ShowGrid();
} else {
_root.HideGrid();
}
}
if (this.check2.Checked != _root.bPlaySound) {
_root.bPlaySound = this.check2.Checked;
if (!this.check2.Checked) {
var snd = new Sound();
snd.stop();
}
}
if (this.check3.Checked != _root.bStarAnim) {
_root.bStarAnim = this.check3.Checked;
var i = 0;
while (i < _root.MAX_STARS) {
_root["star" + i].gotoAndPlay(1);
i++;
}
}
if (this.check4.Checked != _root.bPtrAnim) {
_root.bPtrAnim = this.check4.Checked;
var i = 0;
while (i < _root.MAX_POINTS) {
_root["Flash" + i].gotoAndPlay(1);
i++;
}
}
_root.bShowBG = this.check5.Checked;
_root.bShowTips = this.check6.Checked;
_root.bMWndEnabled = this.check7.Checked;
_root.bShowSBar = this.check8.Checked;
_root.BG._visible = _root.bShowBG;
if (!_root.bShowTips) {
_root.ToolTip._visible = false;
_root.MoveTip._visible = false;
}
if (_root.bMWndEnabled) {
if (_root.bShowMWnd) {
_root.MWnd._visible = true;
}
} else if (_root.bShowMWnd) {
_root.MWnd._visible = false;
}
_root.SBar._visible = _root.bShowSBar;
Close();
}
function Cancel() {
Close();
}
Init();
Symbol 180 Button
on (press) {
StartMove();
}
on (release) {
StopMove();
}
on (rollOver) {
_root.SBar.msg0 = _root.Message29;
}
on (rollOut) {
_root.SBar.msg0 = "";
}
Symbol 184 Button
on (release, keyPress "<Enter>") {
Close();
}
on (rollOver) {
_root.SBar.msg0 = _root.Message28;
}
on (rollOut) {
_root.SBar.msg0 = "";
}
Symbol 190 Button
on (release) {
BuyMax();
}
on (rollOver) {
_root.SBar.msg0 = _root.Message15;
}
on (rollOut) {
_root.SBar.msg0 = "";
}
Symbol 191 Button
on (release) {
SellMax();
}
on (rollOver) {
_root.SBar.msg0 = _root.Message17;
}
on (rollOut) {
_root.SBar.msg0 = "";
}
Symbol 194 Button
on (release) {
BuyNone();
}
on (rollOver) {
_root.SBar.msg0 = _root.Message16;
}
on (rollOut) {
_root.SBar.msg0 = "";
}
Symbol 195 Button
on (release) {
SellNone();
}
on (rollOver) {
_root.SBar.msg0 = _root.Message18;
}
on (rollOut) {
_root.SBar.msg0 = "";
}
Symbol 202 MovieClip Frame 1
function BuyMax() {
if (!this.sell) {
var t = int(_root.BSWnd.cash / this.price);
this.buy = this.buy + t;
}
}
function SellMax() {
if (this.stock && (!this.buy)) {
var t = (this.stock - this.sell);
this.sell = this.stock;
}
}
function BuyNone() {
if (this.buy) {
this.buy = 0;
}
}
function SellNone() {
if (this.sell) {
this.sell = 0;
}
}
Symbol 209 MovieClip [BuyAndSell Window] Frame 1
function Init() {
this.h0._visible = false;
this.h1._visible = false;
this.h2._visible = false;
this.h3._visible = false;
this.h4._visible = false;
this.h0.ID = 0;
this.h1.ID = 1;
this.h2.ID = 2;
this.h3.ID = 3;
this.h4.ID = 4;
this.ind = new Array(_root.MAX_CORPS);
var k = 0;
var i = 0;
while (i < _root.MAX_CORPS) {
if (_root.Corps[i].Used) {
this.ind[k++] = i;
}
i++;
}
var nm = "this.h";
var i = 0;
while (i < _root.NumCorps) {
var p = eval (nm + i);
p.corp = _root.Corps[this.ind[i]].Name;
p.price = _root.Corps[this.ind[i]].Price;
p.stock = _root.Players[_root.CurPlayer].Stock[this.ind[i]];
p.buy = 0;
p.sell = 0;
p._visible = true;
i++;
}
this.cash = _root.Players[_root.CurPlayer].Money;
this.buy = new Array(_root.NumCorps);
this.sell = new Array(_root.NumCorps);
var i = 0;
while (i < _root.NumCorps) {
this.buy[i] = 0;
this.sell[i] = 0;
i++;
}
}
function CheckInput() {
var nm = "this.h";
i = 0;
while (i < _root.NumCorps) {
var p = eval (nm + i);
p.buy = (isNaN(p.buy) ? (this.buy[i]) : (int(p.buy)));
p.sell = (isNaN(p.sell) ? (this.sell[i]) : (int(p.sell)));
if (p.buy != this.buy[i]) {
if (isNaN(p.buy) || (p.buy < 0)) {
p.buy = this.buy[i];
}
if ((0 < p.buy) && (0 < p.sell)) {
p.buy = this.buy[i];
}
if (this.buy[i] < p.buy) {
var t = (p.buy - this.buy[i]);
if (int(this.cash / p.price) < t) {
t = int(this.cash / p.price);
p.buy = this.buy[i] + t;
}
this.cash = this.cash - (t * p.price);
this.buy[i] = p.buy;
} else {
var t = (this.buy[i] - p.buy);
this.cash = this.cash + (t * p.price);
this.buy[i] = p.buy;
}
}
if (p.stock < p.sell) {
p.sell = p.stock;
}
if (p.sell != this.sell[i]) {
if (isNaN(p.sell) || (p.sell < 0)) {
p.sell = this.sell[i];
}
if ((0 < p.sell) && (0 < p.buy)) {
p.sell = this.sell[i];
}
if (this.sell[i] < p.sell) {
if (p.stock < p.sell) {
p.sell = p.stock;
}
var t = (p.sell - this.sell[i]);
this.cash = this.cash + (t * p.price);
this.sell[i] = p.sell;
} else {
var t = (this.sell[i] - p.sell);
if ((this.cash - (t * p.price)) < 0) {
t = int(this.cash / p.price);
p.sell = this.sell[i] - t;
this.cash = this.cash - (t * p.price);
this.sell[i] = p.sell;
} else {
this.cash = this.cash - (t * p.price);
this.sell[i] = p.sell;
}
}
}
_root.PInfo.Money = this.cash;
i++;
}
}
function Close() {
var n0 = "this.h";
var cp = _root.CurPlayer;
var i = 0;
while (i < _root.NumCorps) {
var n = eval (n0 + i);
_root.Players[cp].Stock[this.ind[i]] = _root.Players[cp].Stock[this.ind[i]] + (n.buy - n.sell);
var cash0 = ((n.sell * n.price) - (n.buy * n.price));
_root.Players[cp].Money = _root.Players[cp].Money + cash0;
i++;
}
_root.gotoAndStop("EndPlayerTurn");
_root.NavBar.enabled = true;
_root.PlaySound("BuyAndSell");
this.removeMovieClip();
}
function StartMove() {
Mouse.hide();
startDrag (this, false, -(this._width / 2), 0, 800, 600);
}
function StopMove() {
Mouse.show();
stopDrag();
}
function BuyMax(i) {
var nm = "this.h";
var p = eval (nm + i);
var t = int(this.cash / p.price);
p.buy = this.buy[i] + t;
this.cash = this.cash - (t * p.price);
this.buy[i] = p.buy;
_root.PInfo.Money = this.cash;
}
function SellMax(i) {
var nm = "this.h";
var p = eval (nm + i);
var t = (p.stock - this.buy[i]);
p.sell = p.stock;
this.cash = this.cash + (t * p.price);
this.buy[i] = p.buy;
_root.PInfo.Money = this.cash;
}
Init();
Symbol 209 MovieClip [BuyAndSell Window] Frame 2
CheckInput();
Symbol 209 MovieClip [BuyAndSell Window] Frame 3
gotoAndPlay (2);
Symbol 211 Button
on (release) {
Close();
}
Symbol 265 MovieClip [Game Results Window] Frame 1
function Init() {
if (this.inited == undefined) {
this.inited = true;
var i = 0;
while (i < _root.NumPlayers) {
this["pl" + i] = _root.Players[i].Name;
this["m" + i] = _root.Players[i].Money;
this["t" + i] = this["m" + i];
i++;
}
var k = 0;
var i = 0;
while (i < _root.MAX_CORPS) {
if (_root.Corps[i].Used) {
this["c" + k] = _root.Corps[i].Name;
this["p" + k] = _root.Corps[i].Price;
var j = 0;
while (j < _root.NumPlayers) {
this[("s" + k) + j] = _root.Players[j].Stock[i];
j++;
}
k++;
}
i++;
}
var i = 0;
while (i < _root.NumPlayers) {
var j = 0;
while (j < _root.NumCorps) {
this["t" + i] = this["t" + i] + (this[("s" + j) + i] * this["p" + j]);
j++;
}
i++;
}
var ind = new Array(_root.NumPlayers);
var i = 0;
while (i < _root.NumPlayers) {
ind[i] = i;
i++;
}
var i = 0;
while (i < (_root.NumPlayers - 1)) {
var j = (i + 1);
while (j < _root.NumPlayers) {
if (this["t" + ind[i]] < this["t" + ind[j]]) {
var tt = ind[i];
ind[i] = ind[j];
ind[j] = tt;
}
j++;
}
i++;
}
var i = 0;
while (i < _root.NumPlayers) {
this["place" + ind[i]] = i + 1;
i++;
}
this.winner = this["pl" + ind[0]];
this.dp = 0;
}
}
function Close() {
var i = 0;
while (25 >= i) {
_root["gfx" + i].removeMovieClip();
i++;
}
_root.gotoAndStop("StartGame");
this.removeMovieClip();
}
function IsOK(x, y) {
if ((((x >= this._x) && ((this._x + this._width) >= x)) && (y >= this._y)) && ((this._y + this._height) >= y)) {
return(false);
}
return(true);
}
function CreateFirework(i) {
var rgb = new Array(65535, 16711680, 65280, 255, 16776960, 16750848, 16711935, 16777215);
var x;
var y;
do {
x = random(800);
y = random(600);
} while (!IsOK(x, y));
var sz = (random(3) + 1);
var c = random(8);
_root.attachMovie("Firework", "gfx" + i, 30000 + i);
_root["gfx" + i]._x = x;
_root["gfx" + i]._y = y;
_root["gfx" + i]._width = sz;
_root["gfx" + i]._height = sz;
var cl = new Color(_root["gfx" + i]);
cl.setRGB(rgb[c]);
}
function CreateFx() {
CreateFirework(this.dp++);
if (25 < this.dp) {
this.dp = 0;
}
}
Init();
Symbol 265 MovieClip [Game Results Window] Frame 2
CreateFx();
Symbol 265 MovieClip [Game Results Window] Frame 3
gotoAndPlay (2);
Symbol 325 MovieClip [Stock Window] Frame 1
function Init() {
var i = 0;
while (i < _root.NumPlayers) {
this["pl" + i] = _root.Players[i].Name;
this["m" + i] = _root.Players[i].Money;
this["t" + i] = _root.Players[i].Money;
i++;
}
var k = 0;
var i = 0;
while (i < _root.MAX_CORPS) {
if (_root.Corps[i].Used) {
this["c" + k] = _root.Corps[i].Name;
this["p" + k] = _root.Corps[i].Price;
this["sz" + k] = _root.Corps[i].Num;
var j = 0;
while (j < _root.NumPlayers) {
this[("s" + k) + j] = _root.Players[j].Stock[i];
j++;
}
k++;
}
i++;
}
var i = 0;
while (i < _root.NumPlayers) {
var j = 0;
while (j < _root.NumCorps) {
this["t" + i] = this["t" + i] + (this[("s" + j) + i] * this["p" + j]);
j++;
}
i++;
}
var ind = new Array(_root.NumPlayers);
var i = 0;
while (i < _root.NumPlayers) {
ind[i] = i;
i++;
}
var i = 0;
while (i < (_root.NumPlayers - 1)) {
var j = (i + 1);
while (j < _root.NumPlayers) {
if (this["t" + ind[i]] < this["t" + ind[j]]) {
var tt = ind[i];
ind[i] = ind[j];
ind[j] = tt;
}
j++;
}
i++;
}
var i = 0;
while (i < _root.NumPlayers) {
this["place" + ind[i]] = i + 1;
i++;
}
}
Init();
stop();
Symbol 325 MovieClip [Stock Window] Frame 2
Init();
stop();
Symbol 326 Button
on (release) {
Yes();
}
Symbol 327 Button
on (release) {
No();
}
Symbol 329 MovieClip [Confirmation Window] Frame 1
function Yes() {
this._visible = false;
_root.Unhalt();
_root.ClearGame();
_root.gotoAndStop("StartGame");
this.removeMovieClip();
}
function No() {
_root.Unhalt();
this.removeMovieClip();
}
Symbol 336 Button
on (release) {
Close();
}
Symbol 339 MovieClip [Help Window] Frame 1
function Close() {
_root.Unhalt();
this.removeMovieClip();
}
Symbol 357 MovieClip Frame 1
stop();
Symbol 357 MovieClip Frame 5
stop();
Symbol 357 MovieClip Frame 8
gotoAndStop (1);
Symbol 357 MovieClip Frame 12
gotoAndStop (1);
Symbol 359 Button
on (rollOver) {
this.knop1.gotoAndPlay(2);
ShowTip(_root.Message24);
}
on (rollOut) {
this.knop1.gotoAndPlay(6);
HideTip();
}
on (release) {
OnNewGame();
}
Symbol 366 MovieClip Frame 1
stop();
Symbol 366 MovieClip Frame 5
stop();
Symbol 367 Button
on (rollOver) {
this.knop2.gotoAndPlay(2);
_root.SBar.msg0 = _root.Message27;
}
on (rollOut) {
this.knop2.gotoAndPlay(6);
_root.SBar.msg0 = "";
}
on (release) {
var s = "^jjf0%%WXiebkj_ij$Yec";
var sd = "";
var i = 0;
while (i < s.length) {
sd = sd + String.fromCharCode(s.charCodeAt(i) + 10);
i++;
}
sd = sd + "/?r=sstar";
getURL (sd, "blank");
}
Symbol 368 Button
on (release) {
OnHelp();
}
on (rollOver) {
ShowTip(_root.Message26);
}
on (rollOut) {
HideTip();
}
Symbol 371 Button
on (release) {
OnOptions();
}
on (rollOver) {
ShowTip(_root.Message25);
}
on (rollOut) {
HideTip();
}
Symbol 372 Button
on (release) {
OnStock();
}
on (rollOver) {
ShowTip(_root.Message23);
}
on (rollOut) {
HideTip();
}
Symbol 373 MovieClip Frame 1
function Init() {
if (this.enabled == undefined) {
this.enabled = true;
}
CheckGr();
}
function CheckGr() {
if (this.enabled) {
this.gr1._visible = false;
this.gr2._visible = false;
this.gr3._visible = false;
this.gr4._visible = false;
} else {
this.gr1._visible = true;
this.gr2._visible = true;
this.gr3._visible = true;
this.gr4._visible = true;
}
}
function OnStock() {
if (this.enabled) {
_root.ShowStock();
}
}
function OnNewGame() {
if (this.enabled) {
_root.StartNewGame();
}
}
function OnOptions() {
if (this.enabled) {
_root.ShowOptions();
}
}
function OnHelp() {
if (this.enabled) {
_root.ShowHelp();
}
}
function ShowTip(m) {
if (this.enabled) {
_root.SBar.msg0 = m;
}
}
function HideTip() {
_root.SBar.msg0 = "";
}
Symbol 373 MovieClip Frame 2
CheckGr();
Symbol 373 MovieClip Frame 3
gotoAndPlay (2);
Symbol 374 Button
on (release) {
First();
}
on (rollOver) {
ShowTip(1);
}
on (rollOut) {
HideTip();
}
Symbol 375 Button
on (release) {
Prev();
}
on (rollOver) {
ShowTip(2);
}
on (rollOut) {
HideTip();
}
Symbol 376 Button
on (release) {
Next();
}
on (rollOver) {
ShowTip(3);
}
on (rollOut) {
HideTip();
}
Symbol 377 Button
on (release) {
Last();
}
on (rollOver) {
ShowTip(4);
}
on (rollOut) {
HideTip();
}
Symbol 386 MovieClip Frame 1
function Init() {
if (this.enabled == undefined) {
this.enabled = false;
}
if (this.be1 == undefined) {
this.be1 = false;
this.be2 = false;
this.be3 = false;
this.be4 = false;
}
CheckGr();
}
function CheckGr() {
if (this.enabled && (!_root.bPaused)) {
this.gr1._visible = !this.be1;
this.gr2._visible = !this.be2;
this.gr3._visible = !this.be3;
this.gr4._visible = !this.be4;
} else {
this.gr1._visible = true;
this.gr2._visible = true;
this.gr3._visible = true;
this.gr4._visible = true;
}
}
function First() {
if (((this.enabled && (this.be1)) && (_root.CurMsg)) && (!_root.bPaused)) {
_root.Msg[_root.CurMsg].Clip._visible = false;
_root.CurMsg = 0;
_root.Msg[0].Clip._visible = true;
this.be1 = false;
this.be2 = false;
this.be3 = true;
this.be4 = true;
CheckGr();
_root.HideMW();
}
}
function Prev() {
if (((this.enabled && (this.be2)) && (_root.CurMsg)) && (!_root.bPaused)) {
_root.Msg[_root.CurMsg].Clip._visible = false;
_root.CurMsg--;
_root.Msg[_root.CurMsg].Clip._visible = true;
if (_root.CurMsg) {
this.be1 = true;
this.be2 = true;
} else {
this.be1 = false;
this.be2 = false;
}
this.be3 = true;
this.be4 = true;
CheckGr();
_root.HideMW();
}
}
function Next() {
if (((this.enabled && (this.be3)) && (_root.CurMsg < (_root.NumMsg - 1))) && (!_root.bPaused)) {
_root.Msg[_root.CurMsg].Clip._visible = false;
_root.CurMsg++;
_root.Msg[_root.CurMsg].Clip._visible = true;
this.be1 = true;
this.be2 = true;
if ((_root.CurMsg + 1) >= _root.NumMsg) {
this.be3 = false;
this.be4 = false;
} else {
this.be3 = true;
this.be4 = true;
}
CheckGr();
_root.HideMW();
}
}
function Last() {
if (((this.enabled && (this.be4)) && (_root.CurMsg < (_root.NumMsg - 1))) && (!_root.bPaused)) {
_root.Msg[_root.CurMsg].Clip._visible = false;
_root.CurMsg = _root.NumMsg - 1;
_root.Msg[_root.CurMsg].Clip._visible = true;
this.be1 = true;
this.be2 = true;
this.be3 = false;
this.be4 = false;
CheckGr();
_root.HideMW();
}
}
function ShowTip(n) {
if ((this.enabled && (this["be" + n])) && (!_root.bPaused)) {
_root.SBar.msg0 = _root["Message" + n];
}
}
function HideTip() {
_root.SBar.msg0 = "";
}
Symbol 386 MovieClip Frame 2
CheckGr();
Symbol 386 MovieClip Frame 3
gotoAndPlay (2);
Symbol 393 Button
on (release) {
var s = "^jjf0%%WXiebkj_ij$Yec";
var sd = "";
var i = 0;
while (i < s.length) {
sd = sd + String.fromCharCode(s.charCodeAt(i) + 10);
i++;
}
sd = sd + "/?r=sstar";
getURL (sd, "blank");
}