Frame 1
ONLINE_VERSION = true;
DEBUG_MODE = true;
Frame 2
TUTORIAL_GAMEPLAY = 1;
TUTORIAL_MAP = 2;
TUTORIAL_INTERFACE = 3;
TUTORIAL_LOCATIONS = 4;
TUTORIAL_HENCHMEN = 5;
TUTORIAL_PROSTITUTES = 6;
TUTORIAL_DRUGS = 7;
TUTORIAL_ASSETS = 8;
TUTORIAL_DEMAND = 9;
TUTORIAL_ATTACK = 10;
TUTORIAL_NAMES = new Array("Gameplay", "Map", "Interface", "Locations", "Henchmen", "Prostitutes", "Drugs", "Assets", "Demand", "Attacking");
TUTORIAL_LIST = new Array(TUTORIAL_GAMEPLAY, TUTORIAL_MAP, TUTORIAL_INTERFACE, TUTORIAL_LOCATIONS, TUTORIAL_HENCHMEN, TUTORIAL_PROSTITUTES, TUTORIAL_DRUGS, TUTORIAL_ASSETS, TUTORIAL_DEMAND, TUTORIAL_ATTACK);
Frame 3
loaded = getBytesLoaded();
total = getBytesTotal();
var frame = (Math.floor((loaded / total) * 50) + 1);
var perc = (Math.round((loaded / total) * 100) + "%");
loadbar.gotoAndStop(frame);
loadbar.perc.text = perc;
if ((loaded / total) < 1) {
gotoAndPlay ("loadloop");
}
Frame 5
stop();
Frame 6
stopAllSounds();
duplicateMovieClip ("_music", "MusicMC", MUSICMC_DEPTH);
MusicMC = _root.MusicMC;
_music.stop();
Frame 61
function RandomArray(A) {
trace("Randomize Array : " + A.length);
var _local2 = Math.floor(A.length * Math.random());
return(A[_local2]);
}
function GenerateCivilian() {
Costume = new Object();
Costume.Hat = 1;
Costume.Glasses = 1;
Costume.Beard = 1;
Costume.Body = 1;
Costume.Gun = 6;
c = Math.random();
if (c < 0.5) {
Costume.Hat = Math.floor(Math.random() * CivilianHats.length);
Costume.Hat = CivilianHats[Costume.Hat];
} else if (c < 0.7) {
Costume.Glasses = Math.floor(Math.random() * CivilianGlasses.length);
Costume.Glasses = CivilianGlasses[Costume.Glasses];
} else {
Costume.Beard = Math.floor(Math.random() * CivilianBeard.length);
Costume.Beard = CivilianBeard[Costume.Beard];
}
Costume.Body = 1;
Costume.Gun = 6;
CURRENTCOSTUME = Costume;
return(Costume);
}
function getStanding(pobj) {
var _local3 = 0;
var _local4 = -1;
var _local1 = 0;
while (_local1 < pobj.Finance.TRecord.length) {
if (pobj.Finance.TRecord[_local1] > _local3) {
_local4 = _local1;
_local3 = pobj.Finance.TRecord[_local1];
}
_local1++;
}
var _local5 = pobj.Name + " mostly deals with ";
}
function purchase(pobj, amt, desc) {
if (pobj.Cash < amt) {
NewPopUp("Oops!", (("You don't have enough cash to afford " + desc) + "! You need $") + amt, _root.MONEY_ICON);
return(false);
}
addMoney(pobj, FIN_PURCHASES, -amt);
return(true);
}
function addMoney(pobj, t, amt) {
add_amt = CheckNumValue(amt, (t + " Money Type. Purchased by ") + pobj.Name);
add_amt = Math.round(add_amt);
var _local3 = "a";
if (add_amt == Math.round(_local3)) {
trace((("***ERROR*** " + t) + " Money Type. Purchased by ") + pobj.Name);
}
n = pobj.Num;
PlayerData[n].Cash = PlayerData[n].Cash + add_amt;
PlayerData[n].Finance.CRecord[t] = PlayerData[n].Finance.CRecord[t] + add_amt;
PlayerData[n].Finance.TRecord[t] = PlayerData[n].Finance.TRecord[t] + add_amt;
PlayerData[n].Finance.CCASH = PlayerData[n].Finance.CCASH + add_amt;
PlayerData[n].Finance.TCASH = PlayerData[n].Finance.TCASH + add_amt;
if (PlayerData[n].Cash < 0) {
PlayerData[n].Cash = 0;
}
if (t == FIN_BAIL) {
NewPopUp("Lost Money", "Lost $" + Math.abs(amt), MONEY_ICON);
}
}
function resetAllMoney(pobj) {
n = pobj.Num;
PlayerData[n].Finance.TCASH = 0;
var _local1 = 0;
while (_local1 < 8) {
PlayerData[n].Finance.TRecord[_local1] = 0;
_local1++;
}
resetMoney(pobj);
}
function resetMoney(pobj) {
n = pobj.Num;
PlayerData[n].Finance.CCASH = 0;
var _local1 = 0;
while (_local1 < 8) {
PlayerData[n].Finance.CRecord[_local1] = 0;
_local1++;
}
}
function addNews(h, s) {
NewsHeadlines.push({Date:DateString, Headline:h, Caption:s});
if (NewsHeadlines.length > 100) {
NewsHeadlines.shift();
}
}
function getNews() {
return(NewsHeadlines);
}
function FindAllowedLocations() {
var _local4 = 1;
while (_local4 <= MAX_PLAYERS) {
PlayerObj = PlayerData[_local4];
PlayerData[_local4].Territory = new Array();
var _local5 = 0;
while (_local5 < PlayerData[_local4].Assets.length) {
var _local2 = PlayerObj.Assets[_local5];
PlayerData[_local4].Territory[_local2] = 1;
var _local3 = 0;
while (_local3 < LocationData[_local2].allowed.length) {
PlayerData[_local4].Territory[LocationData[_local2].allowed[_local3]] = 1;
_local3++;
}
_local5++;
}
var _local8 = MAP_MAX_RADIUS;
_local8 = _local8 * (1 / (MAP_SCALE / 100));
CalcAttributes(_local4);
PowerRadius = 100;
PlayerData[_local4].AvailableLocations = new Array();
var _local9 = PlayerHQs[_local4];
HQMC = Map["LOC_" + _local9];
_local5 = 1;
while (_local5 <= LOCATIONS) {
var _local6 = distanceBetween(HQMC, Map["LOC_" + _local5]);
if (_local6 < PowerRadius) {
PlayerData[_local4].AvailableLocations[_local5] = 1;
}
_local5++;
}
_local4++;
}
_local4 = 1;
while (_local4 <= MAX_PLAYERS) {
var _local2 = 0;
while (_local2 < LOCATIONS) {
var _local7 = true;
if (PlayerData[_local4].Territory[_local2] != undefined) {
PlayerData[_local4].AvailableLocations[_local2] = 1;
} else {
var _local1 = 0;
while (_local1 < MAX_PLAYERS) {
if ((_local1 != _local4) && (PlayerData[_local1].Territory[_local2] != undefined)) {
PlayerData[_local4].AvailableLocations[_local2] = undefined;
break;
}
_local1++;
}
}
_local2++;
}
_local4++;
}
}
function getTotalAssetRevenue(n) {
var _local4 = 0;
var _local1 = 0;
while (_local1 < PlayerData[n].Assets.length) {
var _local2 = LocationData[PlayerData[n].Assets[_local1]];
_local4 = _local4 + CheckNumValue(_local2.Revenue, _local2.Name + " has an invalid revenue value");
_local1++;
}
return(_local4);
}
function AddAsset(playobj, locobj, rev, flag) {
if (locobj.Protected > 0) {
RemoveAsset(PlayerData[locobj.Protected], locobj);
}
locobj.Revenue = rev;
locobj.Protected = playobj.Num;
playobj.Assets.push(locobj.Num);
playobj.Henchmen.Stock[locobj.Num] = new Array();
if ((playobj.Type == HUMAN_TYPE) && (flag == undefined)) {
_root.OPEN_PROTECT_WINDOW.Init(playobj.Num, locobj.Num);
NewFork("Asset is Now Yours!", "Asset is now owned by your gang, would you like to move any henchmen to this location?", HENCHMEN_ICON, ["Yes", "No"], [OPEN_PROTECT_WINDOW, {RISK:0}]);
} else if ((playobj.Type == COMPUTER_TYPE) && (flag == undefined)) {
var _local3 = 0;
while (_local3 < (1 + playobj.Attributes.PROTECTIVE)) {
var _local2 = GenerateHenchmen();
_local2.wage = 0;
CreateHenchmen(_local2, playobj, locobj.Num);
_local3++;
}
}
}
function RemoveAsset(playobj, locobj) {
locobj.Protected = 0;
for (i in playobj.Assets) {
if (playobj.Assets[i] == locobj.Num) {
playobj.Assets.splice(i, 1);
}
}
playobj.Henchmen.Stock[locobj.Num] = new Array();
FindAllowedLocations(playobj.Num);
}
function GenerateHenchmen() {
return({name:_root.HENCHMEN_NAMES[Math.floor(Math.random() * _root.HENCHMEN_NAMES.length)], hp:Math.floor(Math.random() * (_root.HENCHMEN_HPMAX - 2)) + 1, atk:Math.floor(Math.random() * (_root.HENCHMEN_ATKMAX - 1)) + 1, rob:Math.floor(Math.random() * (_root.HENCHMEN_ROBMAX - 1)) + 1, pow:Math.floor(Math.random() * (_root.HENCHMEN_POWMAX - 1)) + 1, wage:Math.floor(Math.random() * (_root.HENCHMEN_WAGEMAX - 5)) + 5});
}
function GetHenchmenList(p) {
BigList = new Array();
var _local1 = 0;
while (_local1 <= LOCATIONS) {
if (PlayerData[p].Henchmen.Stock[_local1] != undefined) {
for (var _local3 in PlayerData[p].Henchmen.Stock[_local1]) {
BigList.push(PlayerData[p].Henchmen.Stock[_local1][_local3]);
}
}
_local1++;
}
return(BigList);
}
function GetHenchmenNum(l, p) {
var _local1 = PlayerData[p].Henchmen.Stock[l].length;
if (_local1 == undefined) {
_local1 = 0;
}
return(_local1);
}
function MergeAddArrayInd(Arr) {
var _local3 = Arr.length;
var _local1 = 0;
while (_local1 < Arr.length) {
if ((Arr[_local1] == undefined) || (Arr[_local1] == null)) {
_local3 = _local1;
}
_local1++;
}
return(_local3);
}
function MergeAddArray(v, Arr) {
var _local3 = Arr.length;
var _local1 = 0;
while (_local1 < Arr.length) {
if ((Arr[_local1] == undefined) || (Arr[_local1] == null)) {
_local3 = _local1;
}
_local1++;
}
Arr[_local3] = v;
}
function MergeDeleteArrayInd(i, Arr) {
Arr.splice(i, 1);
}
function MergeDeleteArray(o, Arr) {
var _local3 = -1;
var _local1 = 0;
while (_local1 < Arr.length) {
if (Arr[_local1] == o) {
_local3 = _local1;
break;
}
_local1++;
}
_local1 = _local3;
while (_local1 < (Arr.length - 1)) {
Arr[_local1] = Arr[_local1 + 1];
_local1++;
}
Arr.pop();
}
function CreateHenchmen(n, pObj, l) {
p = pObj.Num;
h = new Object();
for (i in n) {
h[i] = n[i];
}
var _local2 = GlobalHenchmen.List;
index = MergeAddArrayInd(_local2);
h.index = index;
h.loc = l;
h.player = p;
_local2[index] = h;
MergeAddArray(index, PlayerData[p].Henchmen.Stock[l]);
}
function hitHenchmen(IND, damage) {
trace((("hit " + IND) + " for ") + damage);
if (IND.index == undefined) {
IND.hp = IND.hp - damage;
if (IND.hp > 0) {
return(IND);
}
trace("Heap based Henchmen Dies.");
return(undefined);
}
GlobalHenchmen.List[IND.index].hp = GlobalHenchmen.List[IND.index].hp - damage;
if (GlobalHenchmen.List[IND.index].hp <= 0) {
dieHenchmen(IND.index);
return(undefined);
}
return(GlobalHenchmen.List[IND.index]);
}
function healHenchmen(IND, up) {
hitHenchmen(IND, -up);
if (GlobalHenchmen.List[IND.index].hp > HENCHMEN_HPMAX) {
GlobalHenchmen.List[IND.index].hp = HENCHMEN_HPMAX;
}
return(GlobalHenchmen.List[IND.index]);
}
function dieHenchmen(IND) {
trace(IND + " dies.");
DeleteHenchmenInd(IND);
}
function getHObj2(i, p, l) {
var _local2 = PlayerData[p].Henchmen.Stock[l];
var _local1 = _local2[i];
return(getHObj(_local1));
}
function getHObj(i) {
return(GlobalHenchmen.List[i]);
}
function MoveHenchmen(hObj, pObj, l) {
trace(DebugVar(hObj));
if (!hObj.unmov) {
var _local2 = pObj.Num;
var _local1 = hObj;
var _local3 = _local1.loc;
_local1.loc = l;
var _local5 = PlayerData[_local2].Henchmen.Stock[_local3];
MergeDeleteArray(_local1.index, _local5);
var _local4 = PlayerData[_local2].Henchmen.Stock[l];
MergeAddArray(_local1.index, _local4);
trace((("Moved : " + _local3) + " => ") + l);
} else {
NewPopUp("Unmovable", "This Henchmen can't be moved as it's protecting your HQ", HENCHMEN_ICON);
}
}
function DeleteHenchmen(hObj, pObj) {
if ((!hObj.unmov) || (hObj.hp <= 0)) {
var _local3 = pObj.Num;
var _local4 = hObj.index;
var _local5 = hObj.loc;
var _local2 = PlayerData[_local3].Henchmen.Stock[_local5];
MergeDeleteArray(_local4, _local2);
hObj = null;
} else {
NewPopUp("Unmovable", "This Henchmen can't be removed as it's protecting your HQ", HENCHMEN_ICON);
}
}
function FireHenchmen(ind) {
var _local2 = getHObj(ind);
if (_local2) {
if (!_local2.unmov) {
DeleteHenchmenInd(ind);
} else {
NewPopUp("Oops!", "Cannot fire this henchmen, they are your bodyguards", _root.HENCHMEN_ICON);
}
} else {
NewPopUp("Error", "Could not fire this henchmen", HENCHMEN_ICON);
}
}
function DeleteHenchmenInd(ind) {
var _local1 = GlobalHenchmen.List[ind];
var _local2 = _local1.player;
var _local3 = _local1.index;
var _local4 = _local1.loc;
MergeDeleteArray(_local3, PlayerData[_local2].Henchmen.Stock[_local4]);
GlobalHenchmen.List[ind] = undefined;
_local1 = null;
}
function getHenchmenWage(pObj) {
var _local1 = new Array();
var _local2 = 0;
_local1 = GetHenchmenList(pObj);
for (i in _local1) {
_local2 = _local2 + getHObj(_local1[i]).wage;
}
return(_local2);
}
function setBar(Bar, val, max) {
if (val > max) {
val = max;
}
Bar._width = (val / max) * 90;
}
function OverLocation(id) {
if (PlayerData[CURRENT_PLAYER].AvailableLocations[id] == 1) {
INTERFACE.locview._visible = true;
_root.globitotexto = "Click to Enter";
INTERFACE.locview.name.text = LocationData[id].Name;
INTERFACE.locview.type.text = LocationTypes[LocationData[id].Type];
INTERFACE.locview.locmc.ICON.gotoAndStop(LocationData[id].Type);
INTERFACE.locview.locmc.Protection._visible = false;
INTERFACE.locview.locmc.PR._visible = false;
setBar(INTERFACE.locview.LVL, LocatonData[id].PScale, 20);
} else {
OutLocation();
}
}
function OutLocation() {
_root.globitotexto = "";
INTERFACE.locview._visible = false;
}
function BuildInterface() {
TT.duplicateMovieClip("TOOLTIP", TOOLTIP_DEPTH);
TT._visible = false;
this.TOOLTIP._visible = true;
duplicateMovieClip ("_interface", "INTERFACE", INTERFACE_DEPTH);
duplicateMovieClip ("_popup", "PopUp", POPUP_DEPTH);
duplicateMovieClip ("_popupwindow", "PopUpWindow", POPWIND_DEPTH);
duplicateMovieClip ("_forkwindow", "ForkWindow", FORKWIND_DEPTH);
duplicateMovieClip ("_turnmc", "TurnMC", TIMER_DEPTH);
_popup._visible = false;
_popupwindow._visible = false;
_forkwindow._visible = false;
_turnmc._visible = false;
_interface._visible = false;
PopUp = _root.PopUp;
INTERFACE = _root.INTERFACE;
PopUpWindow = _root.PopUpWindow;
ForkWindow = _root.ForkWindow;
TurnMC = _root.TurnMC;
OutLocation();
}
function RemoveInterface() {
PopUp.removeMovieClip();
INTERFACE.removeMovieClip();
PopUpWindow.removeMovieClip();
ForkWindow.removeMovieClip();
TurnMC.removeMovieClip();
}
function UpdateInterface() {
var _local2 = new Color(_root.INTERFACE.INT_COLOR);
_local2.setTransform(PlayerData[CURRENT_PLAYER].GangColor);
_root.INTERFACE.date.text = DateString;
_root.INTERFACE.PORISKMC._xscale = (Env.PoRisk / 10) * 100;
_root.INTERFACE.NAME.text = PlayerData[CURRENT_PLAYER].Name;
_root.INTERFACE.CASH.text = "$" + PlayerData[CURRENT_PLAYER].Cash;
_root.INTERFACE.POWER.text = Math.round(PlayerData[CURRENT_PLAYER].Power) + "pp";
_root.INTERFACE.HENCHMEN.text = GetHenchmenNum(0, CURRENT_PLAYER);
_root.INTERFACE.GIRL.text = PlayerData[CURRENT_PLAYER].Prostitutes.Stock.length;
_root.INTERFACE.GANG_LOGO.gotoAndStop(PlayerData[CURRENT_PLAYER].Icon);
UpdateLocations();
}
function UpdateZoom(z) {
MAP_SCALE = z;
Map._xscale = MAP_SCALE;
Map._yscale = MAP_SCALE;
UpdateLocations();
}
function UpdateLocations() {
var _local1 = 1;
while (_local1 <= LOCATIONS) {
if (LocationData[_local1].Protected != 0) {
Location[_local1].MC.Protection.gotoAndStop(2);
var _local3 = new Color(Location[_local1].MC.Protection.COLOR);
_local3.setTransform(PlayerData[LocationData[_local1].Protected].GangColor);
} else {
Location[_local1].MC.Protection.gotoAndStop(1);
}
OwnerAmt = GetHenchmenNum(_local1, LocationData[_local1].Protected);
Location[_local1].MC.Protection.number.text = OwnerAmt;
var _local2 = (LocationData[_local1].Prostitutes != undefined) && (LocationData[_local1].Prostitutes > 0);
Location[_local1].MC.PR._visible = _local2;
if (PlayerData[CURRENT_PLAYER].AvailableLocations[_local1] != 1) {
Location[_local1].MC._alpha = 25;
} else {
Location[_local1].MC._alpha = 100;
}
_local1++;
}
}
function CenterMap(l) {
var _local2 = Location[l].x;
var _local1 = Location[l].y;
UpdateZoom(DEFAULT_MAP_ZOOM);
Map._x = -(_local2 - (SCREEN_WIDTH / 2));
Map._y = -(_local1 - (SCREEN_HEIGHT / 2));
if (Map._x > MAP_MAXX) {
Map._x = MAP_MAXX;
}
if (Map._y > MAP_MAXY) {
Map._y = MAP_MAXY;
}
if (Map._x < (-(Map._width - SCREEN_WIDTH))) {
Map._x = -(Map._width - SCREEN_WIDTH);
}
if (Map._y < (-(Map._height - SCREEN_HEIGHT))) {
Map._y = -(Map._height - SCREEN_HEIGHT);
}
}
function CalcAttributes(n) {
if (PlayerData[n].Type == HUMAN_TYPE) {
PlayerData[n].Attributes.Align = Math.max(PlayerData[n].Attributes.Align, -20);
PlayerData[n].Attributes.Align = Math.min(PlayerData[n].Attributes.Align, 20);
PlayerData[n].Attributes.Charisma = 1;
PlayerData[n].Attributes.Getaway = 1;
PlayerData[n].Attributes.Pursuade = 1;
PlayerData[n].Attributes.Battle = 1;
PlayerData[n].Attributes.Smuggle = 1;
for (var _local4 in PlayerData[n].Upgrades) {
var _local2 = PlayerData[n].Upgrades[_local4];
if (_local2.Slot == 1) {
PlayerData[n].Costume.Gun = (_local2.ID - GUN_UPGRADE_START) + 1;
}
for (a in _local2) {
if (PlayerData[n].Attributes[a] != undefined) {
PlayerData[n].Attributes[a] = PlayerData[n].Attributes[a] + _local2[a];
}
}
}
}
PlayerData[n].Attributes.Intimidation = 0;
PlayerData[n].Attributes.Robbery = 0;
for (var _local4 in PlayerData[n].Henchmen.Stock[0]) {
var _local3 = getHObj(PlayerData[n].Henchmen.Stock[0][_local4]);
PlayerData[n].Attributes.Intimidation = PlayerData[n].Attributes.Intimidation + _local3.pow;
PlayerData[n].Attributes.Robbery = PlayerData[n].Attributes.Robbery + _local3.rob;
}
PlayerData[n].Attributes.Intimidation = CheckRange(PlayerData[n].Attributes.Intimidation, 0, 10);
PlayerData[n].Attributes.Robbery = CheckRange(PlayerData[n].Attributes.Robbery, 0, 10);
RunAttrRackets(n);
CalcPower(n);
}
function CheckRange(item, min, max) {
item = Math.max(item, min);
item = Math.min(item, max);
return(item);
}
function CalcPower(n) {
PlayerData[n].RootPower = INITIAL_POWER;
PlayerData[n].PowerData = new Object();
var _local5 = 0;
var _local1 = 0;
while (_local1 < PlayerData[n].Assets.length) {
_local5 = _local5 + LocationData[PlayerData[n].Assets[_local1]].PScale;
_local1++;
}
var _local4 = 0;
_local1 = 1;
while (_local1 <= LOCATIONS) {
if (LocationData[_local1].Protected > 0) {
_local4 = _local4 + LocationData[_local1].PScale;
} else {
_local4++;
}
_local1++;
}
var _local7 = Math.round((_local5 / _local4) * LOCATION_POWER);
PlayerData[n].PowerData.LocPower = _local7;
PlayerData[n].RootPower = PlayerData[n].RootPower + _local7;
var _local8 = GetTotalProstPower(n);
var _local3 = 0;
_local1 = 1;
while (_local1 <= LOCATIONS) {
if (LocationData[_local1].Prostitutes != undefined) {
_local3 = _local3 + LocationData[_local1].Prostitutes;
}
_local1++;
}
_local1 = 1;
while (_local1 <= MAX_PLAYERS) {
_local3 = _local3 + GetTotalProstPower(_local1);
_local1++;
}
var _local6 = Math.round((_local8 / _local3) * PIMP_POWER);
PlayerData[n].PimpPower = _local6;
PlayerData[n].RootPower = PlayerData[n].RootPower + _local6;
PlayerData[CURRENT_PLAYER].ModPower = CheckRange(PlayerData[CURRENT_PLAYER].ModPower, 0.8, 1.4);
PlayerData[n].Power = Math.floor(PlayerData[n].RootPower * PlayerData[n].ModPower);
}
function NewGame(O) {
Env = new Object();
Env.Dat = -1;
Env.PoRisk = 2;
Env.DrugValue = new Array();
Env.DrugSlope = new Array();
var _local1 = 0;
while (_local1 < DRUG_DEFAULT.length) {
Env.DrugValue[_local1] = new Array();
Env.DrugValue[_local1].push(DRUG_DEFAULT[_local1]);
Env.DrugSlope[_local1] = 0;
_local1++;
}
Env.Mask = O.Mask;
Env.Objective = O;
Env.Slots = O.Mask.SlotMask;
Env.GenLimit = O.Mask.GenLimit;
O.Init();
BRIBE_EVENT.Callback = undefined;
ATTACK_EVENT.Callback = undefined;
BUYDRUG_EVENT.Callback = undefined;
COMPUTERDEMAND_EVENT.Callback = undefined;
DEMAND_EVENT.Callback = undefined;
PICKUP_EVENT.Callback = undefined;
ROBBERY_EVENT.Callback = undefined;
SELLDRUG_EVENT.Callback = undefined;
PopUpQueue = new Array();
NewsHeadlines = new Array();
GlobalHenchmen = new Object();
GlobalHenchmen.List = new Array();
GLOBAL_PROST_ARRAY = new Array();
}
function NewSandBox() {
MAX_PLAYERS = 1;
InitPlayer(1, "Sandbox Gang", RandomArray(GANG_LIST), HUMAN_TYPE);
PlayerData[1].Cash = 1000000 /* 0x0F4240 */;
NewGame(SANDBOX_OBJECTIVE);
}
function NewSkirmish(PLAYER_LIST_OBJ) {
MAX_PLAYERS = PLAYER_LIST_OBJ.length;
var _local2 = 1;
while (_local2 <= PLAYER_LIST_OBJ.length) {
var _local1 = PLAYER_LIST_OBJ[_local2 - 1];
if (_local1.type == HUMAN_TYPE) {
InitPlayer(_local2, _local1.name, GANG_LIST[_local1.gang], HUMAN_TYPE);
} else if (_local1.type == COMPUTER_TYPE) {
InitComputer(_local2, _local1.name, GANG_LIST[_local1.gang], _local1.personality);
}
PlayerData[_local2].resetAllMoney();
_local2++;
}
NewGame(DEFAULT_OBJECTIVE);
}
function NewSinglePlayer(NAME, GANGID) {
COMP_NUM = 1;
MAX_PLAYERS = 1 + COMP_NUM;
InitPlayer(1, NAME, GANG_LIST[GANGID], HUMAN_TYPE);
var _local1 = 2;
while (_local1 <= MAX_PLAYERS) {
var _local2 = RandomArray(GANG_LIST);
InitComputer(_local1, _local2.name, _local2, RandomArray(PERSONALITY_LIST));
_local1++;
}
NewGame(DEFAULT_OBJECTIVE);
}
function NewMission(Save, MissObj) {
COMP_NUM = 0;
if (MissObj.NumPlayers != undefined) {
COMP_NUM = MissObj.NumPlayers;
}
MAX_PLAYERS = 1 + COMP_NUM;
InitPlayer(1, Save.Name, Save.Gang, HUMAN_TYPE);
ApplySave(1);
NewGame(MissObj);
}
function InitPlayer(n, nme, gang, typ) {
PlayerData[n] = {Name:nme, Num:n, Cash:INITIAL_MONEY, Type:typ, Icon:gang.icon};
PlayerData[n].Icon = gang.icon;
PlayerData[n].ModPower = 1;
CalcPower(n);
PlayerData[n].Drug_Stock = new Array();
PlayerData[n].Drug_Value = new Array();
var _local3 = 0;
while (_local3 < DRUG_DEFAULT.length) {
PlayerData[n].Drug_Stock[_local3] = 0;
PlayerData[n].Drug_Value[_local3] = 0;
_local3++;
}
if (typ == HUMAN_TYPE) {
PlayerData[n].OnTurn = function () {
if (Math.random() < RANDOM_EVENT_PROB) {
StartRandomEvent(PLAYER_CYCLE);
}
HUMAN_ACTION = true;
CURRENT_PLAYER = PLAYER_CYCLE;
UpdateInterface();
};
} else if (typ == COMPUTER_TYPE) {
PlayerData[n].OnTurn = function () {
ComputerTurn(PLAYER_CYCLE);
};
}
PlayerData[n].Attributes = new Object();
PlayerData[n].Attributes.Align = 0;
PlayerData[n].Attributes.Charisma = 1;
PlayerData[n].Attributes.Getaway = 1;
PlayerData[n].Attributes.Pursuade = 1;
PlayerData[n].Attributes.Battle = 1;
PlayerData[n].Attributes.Smuggle = 1;
PlayerData[n].GangColor = new Object();
PlayerData[n].GangColor.rb = COLOR_LIST[n].rb;
PlayerData[n].GangColor.gb = COLOR_LIST[n].gb;
PlayerData[n].GangColor.bb = COLOR_LIST[n].bb;
PlayerData[n].Costume = new Object();
for (_local3 in gang.costume) {
PlayerData[n].Costume[_local3] = gang.costume[_local3];
}
PlayerData[n].Costume.HatColor = PlayerData[n].GangColor;
PlayerData[n].Costume.BodyColor = PlayerData[n].GangColor;
PlayerData[n].Costume.BeardColor = PlayerData[n].GangColor;
PlayerData[n].Costume.GlassesColor = PlayerData[n].GangColor;
if (typ == COMPUTER_TYPE) {
PlayerData[n].Memory = new Array();
}
PlayerData[n].Upgrades = new Array();
AddUpgrade(n, PISTOL_UPGRADE_INDEX);
PlayerData[n].AvailableLocations = new Array();
PlayerData[n].Assets = new Array();
PlayerData[n].Henchmen = new Object();
PlayerData[n].Henchmen.Stock = new Array();
PlayerData[n].Henchmen.Stock[0] = new Array();
PlayerData[n].Cards = new Array();
PlayerData[n].Prostitutes = new Object();
PlayerData[n].Prostitutes.Stock = new Array();
PlayerData[n].Finance = new Object();
PlayerData[n].Finance.CRecord = new Array();
PlayerData[n].Finance.TRecord = new Array();
PlayerData[n].Finance.CASHGRAPH = new Array();
PlayerData[n].Finance.CCASH = 0;
PlayerData[n].Finance.TCASH = 0;
PlayerData[n].Finance.CRecord = new Array();
resetMoney(PlayerData[n]);
}
function exitGame() {
NewFork("Exit", "Are you sure you want to exit? All unsaved gameplay will be lost.", _root.MONEY_ICON, ["OK", "Nevermind"], [EXIT_GAME, {RISK:0}]);
}
function MissionComplete(t, m, i) {
var _local2 = Env.Objective.Name + " Complete";
var _local1 = m;
var _local3 = MONEY_ICON;
NewFork(_local2, _local1, _local3, ["Exit To Menu"], [EXIT_GAME]);
}
function viewProtectAsset(p, l, henchmen) {
NO_MOUSE_MOVE = true;
POPUP_VISIBLE = true;
PopUp._visible = NO_MOUSE_MOVE;
PopUp.Name = "Protection";
PopUp.LocNum = l;
PopUp.Type_Name = "";
PopUp.gotoAndPlay("goUp");
PopUp.gotoType = "assetprotection";
PopUp.PlayerObj = _root.PlayerData[p];
PopUp.LocObj = _root.LocationData[l];
if (henchmen != undefined) {
PopUp.HenchmenAvailableOverride = henchmen;
}
}
function viewFinances(p) {
ttl = _root.PlayerData[p].Name + " Finances";
viewSpecial(p, "finance", ttl);
}
function viewSpecial(p, w, t) {
NO_MOUSE_MOVE = true;
PopUp._visible = NO_MOUSE_MOVE;
PopUp.Name = t;
PopUp.LocNum = -1;
PopUp.Type_Name = "";
PopUp.gotoAndPlay("goUp");
PopUp.gotoType = w;
PopUp.PlayerObj = _root.PlayerData[p];
}
function viewHenchmen(p) {
ttl = p.Name + " Henchmen";
viewSpecial(p, "henchmen", ttl);
}
function ShowCutscene(ani, out, c1, c2, p) {
PopUp._visible = false;
if (POPUP_VISIBLE) {
PopUpQueue.push({ani:ani, out:out, c1:c1, c2:c2, p:p});
} else {
POPUP_VISIBLE = true;
NO_MOUSE_MOVE = true;
CutSceneObj = new Object();
CutSceneObj.ani = ani;
CutSceneObj.out = out;
CutSceneObj.c1 = c1;
CutSceneObj.c2 = c2;
CutSceneObj.PARAM = p;
gotoAndPlay ("cutscene");
}
}
function LocationClicked(x, y) {
trace("Location Clicked : " + y);
if (PlayerData[CURRENT_PLAYER].AvailableLocations[y] != undefined) {
NO_MOUSE_MOVE = true;
PopUp._visible = NO_MOUSE_MOVE;
PopUp.Name = LocationData[y].Name;
PopUp.LocNum = y;
PopUp.Type_Name = LocationTypes[x];
PopUp.ICON.gotoAndStop(x);
PopUp.gotoAndPlay("goUp");
if (((x != 6) && (x != 9)) && (x != 10)) {
PopUp.gotoType = "actionlist";
} else {
PopUp.gotoType = "type" + x;
}
PopUp.ActionsList = GetActions(PlayerData[_root.CURRENT_PLAYER], LocationData[y]);
PopUp.PlayerObj = PlayerData[_root.CURRENT_PLAYER];
PopUp.LocObj = LocationData[y];
UpdateInterface();
} else {
NewPopUp("Not Allowed Yet", "To Enter this Location you must take over the locations surrounding", HENCHMEN_ICON);
}
}
function NewPopUpObj(o) {
if (o.ani != undefined) {
ShowCutscene(o.ani, o.out, o.c1, o.c2, o.p);
} else if (o.o != undefined) {
NewFork(o.t, o.m, o.i, o.o, o.j);
} else {
NewPopUp(o.t, o.m, o.i);
}
}
function NewFork(t, m, i, o, j) {
if (PlayerData[PLAYER_CYCLE].Type == COMPUTER_TYPE) {
trace("Cannot PopUp, current type is a computer");
DoJob(j[0]);
} else if (POPUP_VISIBLE) {
trace("Cannot PopUp, POPUP_VISIBLE is true");
PopUpQueue.push({t:t, m:m, i:i, o:o, j:j});
} else {
POPUP_VISIBLE = true;
NO_MOUSE_MOVE = true;
ForkWindow._visible = NO_MOUSE_MOVE;
ForkWindow.gotoAndPlay("popUp");
ForkWindow.t = t;
ForkWindow.m = m;
ForkWindow.i = i;
ForkWindow.Options = o;
ForkWindow.Jobs = j;
}
}
function NewPopUp(t, m, i) {
if (PlayerData[PLAYER_CYCLE].Type == COMPUTER_TYPE) {
trace("Cannot PopUp, current type is a computer");
} else if (POPUP_VISIBLE) {
PopUpQueue.push({t:t, m:m, i:i});
trace("Cannot PopUp, POPUP_VISIBLE is true");
} else {
trace("POPUP_VISIBLE is false");
trace("Popping Up");
POPUP_VISIBLE = true;
NO_MOUSE_MOVE = true;
PopUpWindow._visible = NO_MOUSE_MOVE;
PopUpWindow.gotoAndPlay("popUp");
PopUpWindow.t = t;
PopUpWindow.m = m;
PopUpWindow.i = i;
}
}
function ClosePopUp(name) {
POPUP_VISIBLE = false;
if (name != undefined) {
_root[name]._visible = false;
} else {
PopUpWindow._visible = false;
ForkWindow._visible = false;
}
NO_MOUSE_MOVE = PopUp._visible;
UpdateInterface();
if (PopUpQueue.length > 0) {
var _local2 = PopUpQueue.shift();
NewPopUpObj(_local2);
}
}
function CloseAnimation() {
POPUP_VISIBLE = false;
NO_MOUSE_MOVE = false;
UpdateInterface();
gotoAndPlay ("game");
}
function OnPopUpClosed() {
NO_MOUSE_MOVE = false;
PopUp._visible = NO_MOUSE_MOVE;
UpdateInterface();
}
function mapLocations() {
var _local3 = 1;
while (_local3 <= LOCATIONS) {
var _local2 = new Array();
L1 = Map["LOC_" + _local3];
L1NUM = _local3;
var _local1 = 1;
while (_local1 <= LOCATIONS) {
if (_local3 != _local1) {
if (((LocationData[_local1].Type == 3) || (LocationData[_local1].Type == 9)) || (LocationData[_local1].Type == 2)) {
L2 = Map["LOC_" + _local1];
L2NUM = _local1;
_local2.push({num:_local1, distance:distanceBetween(L1, L2)});
_local2.sort(checkDistanceBetween);
if (_local2.length > MAP_ASSET_SPREAD) {
_local2.pop();
}
}
}
_local1++;
}
LocationData[_local2[0].num].allowed.push(_local3);
LocationData[_local2[1].num].allowed.push(_local3);
LocationData[_local2[2].num].allowed.push(_local3);
_local3++;
}
_local3 = 1;
while (_local3 <= MAX_PLAYERS) {
ARR = LocationData[PlayerHQs[_local3]].allowed;
HQ = Map["LOC_" + PlayerHQs[_local3]];
var _local1 = 1;
while (_local1 <= LOCATIONS) {
distance = distanceBetween(HQ, Map["LOC_" + _local1]);
if (((PlayerHQs[_local3] != _local1) && (!ARR.contains(_local1))) && (distance < MINIMUM_HQ_DIST)) {
LocationData[PlayerHQs[_local3]].allowed.push(_local1);
}
_local1++;
}
_local3++;
}
}
function getLocationName(l) {
if (l == 0) {
return("Player");
}
return(LocationData[l].Name);
}
function distanceBetween(LObj1, LObj2) {
dx = LObj2._x - LObj1._x;
dy = LObj2._y - LObj1._y;
return(Math.floor(Math.sqrt((dx * dx) + (dy * dy))));
}
function RebuildMap() {
if (Map.LOC_1 == undefined) {
var _local1 = 1;
while (_local1 <= LOCATIONS) {
Map.CreateLocation(_local1);
LocToMapMC.Num = CLTM;
_local1++;
}
}
UpdateZoom(DEFAULT_MAP_SCALE);
var _local3 = MAP_SCALE;
Location = new Array();
var _local1 = 1;
while (_local1 <= LOCATIONS) {
Location[_local1] = new Object();
Location[_local1].MC = Map["LOC_" + _local1];
Location[_local1].MC._xscale = (1 / (MAP_SCALE / 100)) * 100;
Location[_local1].MC._yscale = (1 / (MAP_SCALE / 100)) * 100;
Location[_local1].MC._x = LocationData[_local1].PX;
Location[_local1].MC._y = LocationData[_local1].PY;
Location[_local1].MC.LocNum = _local1;
Location[_local1].MC.gotoAndPlay("idle");
Location[_local1].MC.TYPE.gotoAndStop(LocationData[_local1].Type);
Location[_local1].MC.ICON.gotoAndStop(LocationData[_local1].Type);
Location[_local1].MC.LocName = LocationData[_local1].Name;
Location[_local1].MC.LocTName = LocationTypes[LocationData[_local1].Type];
Location[_local1].MC.LocType = LocationData[_local1].Type;
Location[_local1].MC.LocScale = LocationData[_local1].PScale;
Location[_local1].x = (Location[_local1].MC._x * DEFAULT_MAP_SCALE) / 100;
Location[_local1].y = (Location[_local1].MC._y * DEFAULT_MAP_SCALE) / 100;
_local1++;
}
var _local2 = 0;
while (_local2 < Map.TILES) {
Map["tile" + _local2]._visible = false;
_local2++;
}
UpdateInterface();
}
function BuildMap() {
MAP_MAX_RADIUS = Math.sqrt((Map._width * Map._width) + (Map._height * Map._height));
var _local7 = 1;
var _local1 = 1;
LOCATIONS = 0;
PlayerHQs = new Array();
LocationData = new Array();
MAP_SCALE = DEFAULT_MAP_SCALE;
var _local18 = MAP_SCALE;
var _local17 = Math.min(Env.Slots, Map.TILES);
var _local6 = 0;
while (_local6 < _local17) {
var _local4 = Map["tile" + _local6];
var _local11 = _local4.level;
var _local9 = _local4.slots;
var _local5 = 0;
while (_local5 < _local9) {
var _local2 = _local4["slot" + _local5];
Map.CreateLocation(_local1);
var _local3 = Map["LOC_" + _local1];
_local3._x = _local2._x + _local4._x;
_local3._y = _local2._y + _local4._y;
_local3.Num = _local1;
LocationData[_local1] = new Object();
LocationData[_local1].PX = _local3._x;
LocationData[_local1].PY = _local3._y;
LocationData[_local1].Type = _local2.Type;
LocationData[_local1].PScale = _local2.PScale;
LocationData[_local1].Name = LocationNames[_local2.Type].shift();
if (_local2.Type == 9) {
PlayerHQs[_local7] = _local1;
if (_local7 > MAX_PLAYERS) {
_local3._visible = false;
}
_local7++;
}
if (_local2.Type == 2) {
LocationData[_local1].Prostitutes = 3 * _local2.PScale;
}
_local1++;
LOCATIONS++;
_local5++;
}
_local4._visible = false;
_local6++;
}
LOCATION_TOTAL_PSCALE = 0;
_local6 = 1;
while (_local6 <= LOCATIONS) {
LOCATION_TOTAL_PSCALE = LOCATION_TOTAL_PSCALE + LocationData[_local6].PScale;
LocationData[_local6].Num = _local6;
LocationData[_local6].Protected = 0;
LocationData[_local6].allowed = new Array();
LocationData[_local6].Pressure = 0;
_local6++;
}
RebuildMap();
mapLocations();
_local6 = 1;
while (_local6 <= MAX_PLAYERS) {
var _local8 = PlayerHQs[_local6];
AddAsset(PlayerData[_local6], LocationData[_local8], 0, true);
HObj = {hp:5, atk:3, rob:3, pow:3, wage:0, unmov:1};
HObj.name = HENCHMEN_NAMES[Math.floor(Math.random() * HENCHMEN_NAMES.length)] + " [Bodyguard]";
CreateHenchmen(HObj, PlayerData[_local6], _local8);
HObj.name = HENCHMEN_NAMES[Math.floor(Math.random() * HENCHMEN_NAMES.length)] + " [Bodyguard]";
CreateHenchmen(HObj, PlayerData[_local6], _local8);
HObj.name = HENCHMEN_NAMES[Math.floor(Math.random() * HENCHMEN_NAMES.length)] + " [Bodyguard]";
CreateHenchmen(HObj, PlayerData[_local6], _local8);
FindAllowedLocations(_local6);
_local6++;
}
UpdateInterface();
UpdateLocations();
}
function InitGame() {
_quality = Options.Quality;
Mo = new Object();
Mo.clicked = false;
MOUSE_SPEED = 1;
MAP_SCALE = DEFAULT_MAP_SCALE;
MAP_MAXX = Map._x;
MAP_MAXY = Map._y;
NO_MOUSE_MOVE = false;
Mo.onMouseMove = function () {
if (Mo.clicked && (!NO_MOUSE_MOVE)) {
_quality = "low";
dx = (_xmouse - Mo.oldmousex) * MOUSE_SPEED;
dy = (_ymouse - Mo.oldmousey) * MOUSE_SPEED;
if ((Map._x + dx) > MAP_MAXX) {
Map._x = MAP_MAXX;
dx = 0;
}
if ((Map._y + dy) > MAP_MAXY) {
Map._y = MAP_MAXY;
dy = 0;
}
if ((Map._x + dx) < (-(Map._width - SCREEN_WIDTH))) {
Map._x = -(Map._width - SCREEN_WIDTH);
dx = 0;
}
if ((Map._y + dy) < (-(Map._height - SCREEN_HEIGHT))) {
Map._y = -(Map._height - SCREEN_HEIGHT);
dy = 0;
}
_root.Map._x = _root.Map._x + dx;
_root.Map._y = _root.Map._y + dy;
Mo.oldmousex = _xmouse;
Mo.oldmousey = _ymouse;
UpdateLocations();
}
};
Mo.onMouseDown = function () {
if (MapMask.hitTest(_xmouse, _ymouse)) {
Mo.clicked = true;
Mo.oldmousex = _xmouse;
Mo.oldmousey = _ymouse;
}
};
Mo.onMouseUp = function () {
Mo.clicked = false;
_quality = Options.Quality;
};
Mouse.addListener(Mo);
Location = new Array();
i = 1;
while (i <= LOCATIONS) {
Location[i] = new Object();
Location[i].MC = Map["LOC_" + i];
Location[i].MC._xscale = (1 / (MAP_SCALE / 100)) * 100;
Location[i].MC._yscale = (1 / (MAP_SCALE / 100)) * 100;
Location[i].MC.LocNum = i;
Location[i].MC.gotoAndPlay("idle");
Location[i].MC.TYPE.gotoAndStop(LocationData[i].Type);
Location[i].MC.ICON.gotoAndStop(LocationData[i].Type);
Location[i].MC.LocName = LocationData[i].Name;
Location[i].MC.LocTName = LocationTypes[LocationData[i].Type];
Location[i].MC.LocType = LocationData[i].Type;
Location[i].MC.LocScale = LocationData[i].PScale;
Location[i].x = (Location[i].MC._x * DEFAULT_MAP_SCALE) / 100;
Location[i].y = (Location[i].MC._y * DEFAULT_MAP_SCALE) / 100;
i++;
}
mapLocations();
var i = 1;
while (i <= MAX_PLAYERS) {
FindAllowedLocations(i);
i++;
}
ClosePopUp();
PopUp._visible = false;
UpdateZoom(MAP_SCALE);
}
function NextTurn() {
_root.GO_TO_NEXT = true;
}
function TurnCycle() {
PLAYER_CYCLE++;
if (PLAYER_CYCLE > MAX_PLAYERS) {
PLAYER_CYCLE = 1;
NewDay();
}
CenterMap(PlayerHQs[PLAYER_CYCLE]);
GENERATELIMIT = Env.GenLimit;
if (Env.Objective.DailyCheck()) {
HUMAN_ACTION = false;
GO_TO_NEXT = false;
RunRackets(PLAYER_CYCLE);
INTERFACE.TurnView.gotoAndPlay(1);
INTERFACE.TurnView.GANG_LOGO.gotoAndStop(PlayerData[PLAYER_CYCLE].Icon);
INTERFACE.TurnView.GANG_NAME = PlayerData[PLAYER_CYCLE].Name;
INTERFACE.TurnView._visible = true;
}
}
function PlayerGo() {
FindAllowedLocations(PLAYER_CYCLE);
PlayerData[PLAYER_CYCLE].OnTurn();
}
function EnvRiskUp(v) {
if (v != undefined) {
Env.PoRisk = Env.PoRisk + v;
} else {
trace("****ERROR : Po Risk Up Invalid ");
}
}
function NewDay() {
Env.Dat++;
d = (Env.Dat % 30) + 1;
m = Math.floor(Env.Dat / 30) % 12;
y = Math.floor(Env.Dat / 360) + 1;
DateString = (((Month[m] + " ") + d) + ", Year ") + y;
_root.INTERFACE.date.text = DateString;
Env.PoRisk = Math.max(Env.PoRisk, 1);
Env.PoRisk = Math.min(Env.PoRisk, 10);
if (SIMULATION_MODE) {
Env.PoRisk = 5;
}
var _local2 = 0;
while (_local2 < DRUG_DEFAULT.length) {
var _local5 = Env.DrugValue[_local2];
var _local4 = _local5[_local5.length - 1];
Env.DrugSlope[_local2] = (((Math.random() * 2) - 1) / 5) + (Math.cos((((Env.Dat + ((_local2 * 5) % 90)) / 90) * 2) * Math.PI) / 10);
if (_local4 > (DRUG_DEFAULT[_local2] * DRUG_MAX)) {
Env.DrugSlope[_local2] = -Math.abs(Env.DrugSlope[_local2]);
} else if (_local4 < (DRUG_DEFAULT[_local2] * DRUG_MIN)) {
Env.DrugSlope[_local2] = Math.abs(Env.DrugSlope[_local2]);
}
Env.DrugValue[_local2].push(Math.round(_local4 + (Env.DrugSlope[_local2] * DRUG_DEFAULT[_local2])));
if (Env.DrugValue[_local2].length > 20) {
var _local7 = Env.DrugValue[_local2].shift();
}
_local2++;
}
var _local3 = 1;
while (_local3 <= MAX_PLAYERS) {
var _local6 = getTotalAssetRevenue(_local3);
trace("Asset Revenue : " + _local6);
addMoney(PlayerData[_local3], FIN_ASSET, getTotalAssetRevenue(_local3));
addMoney(PlayerData[_local3], FIN_PROSTITUTE, GetTotalProstIncome(_local3));
addMoney(PlayerData[_local3], FIN_WAGE, -getHenchmenWage(_local3));
CalcAttributes(_local3);
PlayerData[_local3].Finance.CASHGRAPH.push(PlayerData[_local3].Cash);
if (PlayerData[_local3].Finance.CASHGRAPH.length > 30) {
PlayerData[_local3].Finance.CASHGRAPH.shift();
}
if (d == 1) {
resetMoney(PlayerData[_local3]);
}
_local3++;
}
UpdateLocations();
}
function CalcRisk(p, pscale, dist, mod) {
var _local3 = PlayerData[p];
var _local6 = mod + Env.PoRisk;
var _local4 = Math.min(_local3.Power, MAX_POWER);
var _local2 = 1;
for (var _local5 in dist) {
if (_local5 == "Power") {
_local2 = _local2 - ((_local4 / MAX_POWER) * dist[_local5]);
} else {
_local2 = _local2 - ((_local3.Attributes[_local5] / 10) * dist[_local5]);
}
}
trace("Ratio : " + _local2);
_local6 = _local6 + (((max_risk_func(pscale) - min_risk_func(pscale)) * _local2) + min_risk_func(pscale));
return(_local6);
}
function DoJob(EventObj, CompOverride) {
if (CompOverride == undefined) {
OnPopUpClosed();
}
trace("Executing EventObj " + EventObj.Name);
var _local3 = EventObj.RISK / 100;
trace("Risk : " + _local3);
var _local4 = Math.random();
if ((EventObj.NoRiskUp == undefined) && (EventObj.SubEvent == undefined)) {
EnvRiskUp(_local3);
}
if (CompOverride == undefined) {
OnPopUpClosed();
}
outcome = 0;
if (EventObj.Animation != undefined) {
_root.POPUP_VISIBLE = true;
}
if (_local4 >= _local3) {
trace("EventObj.Win()");
outcome = 1;
EventObj.Win();
PlayerData[EventObj.PlayerObj.Num].ModPower = PlayerData[EventObj.PlayerObj.Num].ModPower * 1.1;
} else {
trace("EventObj.Lose()");
outcome = 0;
EventObj.Lose();
PlayerData[EventObj.PlayerObj.Num].ModPower = PlayerData[EventObj.PlayerObj.Num].ModPower * 0.9;
}
if ((EventObj.Animation != undefined) && (CompOverride == undefined)) {
_root.POPUP_VISIBLE = false;
NewPopUpObj({ani:EventObj.Animation, out:outcome, c1:EventObj.c1, c2:EventObj.c2, p:EventObj.AnimationParam});
}
if (EventObj.SubEvent == undefined) {
GO_TO_NEXT = true;
}
EventObj.Callback();
UpdateInterface();
}
function JailTime(PlayerObj) {
PlayerObj.Power = Math.max(PlayerObj.Power, 5);
if (PlayerObj.Type == HUMAN_TYPE) {
var _local2 = Math.ceil(PlayerObj.Cash / -500);
PlayerData[PlayerObj.Num].JailTime = _local2;
Env.PoRisk = 2;
}
PlayerData[PlayerObj.Num].Cash = 0;
NewPopUp("Jail Time", ("You are jailed for " + _local2) + " days. You have no money to post bail!", PRISON_ICON);
addNews(((PlayerObj.Name + " Boss Was Jailed for ") + _local2) + " days for not posting bail");
}
function AddUpgrade(p, u) {
var _local2 = PlayerData[p];
var _local1 = UPGRADE_LIST[u];
_local2.Upgrades[_local1.Slot] = new Object();
_local2.Upgrades[_local1.Slot].ID = u;
for (i in _local1) {
if (((i != "Name") && (i != "Description")) && (i != "Cost")) {
_local2.Upgrades[_local1.Slot][i] = _local1[i];
}
}
}
function DuplicateCheckObj(ARR, ITEM) {
var _local1 = false;
}
function InitComputer(n, nme, gang, p) {
InitPlayer(n, nme, gang, COMPUTER_TYPE);
ApplyPersonality(n, p);
PlayerData[n].DebugLog = new Array();
}
function ApplyPersonality(n, PERSONALITY) {
trace("Apply Personality to Computer Opponent " + n);
var _local3 = PlayerData[n];
for (i in PERSONALITY) {
PlayerData[n].Attributes[i] = PERSONALITY[i];
}
}
function GenerateComputerOpponent() {
var _local1 = RandomArray(GANG_LIST);
trace(_local1.name);
tmpObj = new Object();
tmpObj.name = _local1.name;
tmpObj.costume = _local1.costume;
tmpObj.icon = _local1.icon;
tmpObj.type = COMPUTER_TYPE;
return(tmpObj);
}
function ComputerAddEvent(n, o, param) {
var _local2 = COMPUTER_PRIORITY_EVENTS[o];
var _local9 = _local2.pr;
var _local5 = _local2.maxattempts;
var _local4 = PlayerData[n];
trace(_local2);
trace(_local2.debug);
trace(PlayerData[n]);
trace(PlayerData[n].Name);
trace(PlayerData[n].Type == COMPUTER_TYPE);
if (_local2.duplicates) {
PlayerData[n].Memory.push({i:o, p:param});
} else if (DuplicateCheckObj(PlayerData[n].Memory, COMPUTER_PRIORITY_EVENTS[o])) {
PlayerData[n].Memory.push({pr:_local9, attempts:_local5, i:o, p:param});
}
PlayerData[n].Memory.sort(ComputerMemoryCompare);
}
function getValPercentageDifference(MVAL, CVAL) {
var _local1 = CVAL - MVAL;
return(_local1 / MVAL);
}
function getDrugPercentageDifference(DRUG_ID, VAL) {
var _local2 = DRUG_DEFAULT[DRUG_ID] - VAL;
var _local1 = _local2 / DRUG_DEFAULT[DRUG_ID];
return(_local1);
}
function ChooseFork(PROB) {
var _local1 = new Array();
var _local4 = 0;
for (i in PROB) {
_local1[i] = PROB[i];
_local4 = _local4 + PROB[i];
}
var _local2 = -1;
for (i in _local1) {
_local1[i] = _local1[i] / _local4;
if (_local2 != -1) {
_local1[i] = _local1[i] + _local1[_local2];
}
_local2 = i;
}
var _local5 = Math.random();
var i = 0;
while (i < _local1.length) {
if (_local5 < _local1[i]) {
return(i);
}
i++;
}
}
function ComputerTurn_Drugs(CompNum) {
var _local1 = PlayerData[CompNum];
if (_local1.Cash < _local1.Attributes.DRUG_MIN_CASH) {
debug = debug + "Not enough cash for Drugs.\n";
return(false);
}
var _local8 = _local1.Cash * _local1.Attributes.DRUG_BUDGET;
var _local10 = 0;
var _local2 = 0;
while (_local2 < DRUG_NAMES.length) {
_local10 = _local10 + (_local1.Drug_Value[_local2] * _local1.Drug_Stock[_local2]);
_local2++;
}
if (_local10 > _local8) {
debug = debug + "Selling...\n";
var _local7 = -1;
var _local9 = 0;
_local2 = 0;
while (_local2 < DRUG_NAMES.length) {
if (_local1.Drug_Stock[_local2] > 0) {
var _local3 = Env.DrugValue[_local2][Env.DrugValue[_local2].length - 1];
var _local5 = getValPercentageDifference(_local3, _local1.Drug_Value[_local2]);
if (_local5 > _local9) {
_local7 = _local2;
_local9 = _local5;
}
}
_local2++;
}
debug = debug + (("BEST DRUG ID : " + _local7) + newline);
if (_local7 == -1) {
return(false);
}
SELLDRUG_EVENT.setPlayer(_local1);
SELLDRUG_EVENT.setDrug(_local7);
var _local4 = 1;
while (_local4 < _local1.Drug_Stock[_local7]) {
_local4 = Math.min(_local4, _local1.Drug_Stock[_local7]);
SELLDRUG_EVENT.setAmount(_local4, _local1.Drug_Value[_local7]);
var _local6 = SELLDRUG_EVENT.CalcRisk();
if (_local6 > _local1.Attributes.DRUG_MAX_RISK) {
break;
}
_local4 = _local4 + 5;
}
debug = debug + "Completed Job.\n";
DoJob(SELLDRUG_EVENT, true);
return(true);
}
debug = debug + "Buying...\n";
var _local7 = -1;
var _local9 = 0;
_local2 = 0;
while (_local2 < DRUG_NAMES.length) {
var _local3 = Env.DrugValue[_local2][Env.DrugValue[_local2].length - 1];
var _local5 = getDrugPercentageDifference(_local2, _local3);
if ((_local5 < _local9) && (_local8 > _local3)) {
_local7 = _local2;
_local9 = _local5;
}
_local2++;
}
debug = debug + (("BEST DRUG ID : " + _local7) + newline);
if (_local7 == -1) {
return(false);
}
BUYDRUG_EVENT.setPlayer(_local1);
BUYDRUG_EVENT.setDrug(_local7);
var _local3 = Env.DrugValue[_local7];
_local3 = _local3[_local3.length - 1];
BUYDRUG_EVENT.setAmount(1, _local3);
BUYDRUG_EVENT.CalcRisk();
var _local4 = 2;
while (_local4 < 40) {
_local3 = Env.DrugValue[_local7];
if (_local8 > (_local3 * _local4)) {
_local3 = _local3[_local3.length - 1];
BUYDRUG_EVENT.setAmount(_local4, _local3);
var _local6 = BUYDRUG_EVENT.CalcRisk();
if (_local6 > _local1.Attributes.DRUG_MAX_RISK) {
debug = debug + (((("Purchasing " + _local4) + "@$") + _local3) + " of Drug\n");
break;
}
} else {
break;
}
_local4 = _local4 + 5;
}
debug = debug + "Completed Job.\n";
DoJob(BUYDRUG_EVENT, true);
return(true);
}
function ComputerTurn_Pimp(CompNum) {
var _local3 = PlayerData[CompNum];
var _local4 = new Array();
for (i in _local3.AvailableLocations) {
var _local1 = i;
var _local2 = LocationData[_local1];
if ((_local2.Prostitutes != undefined) && (_local2.Prostitutes > 0)) {
_local4.push(_local1);
}
}
if (_local4.length == 0) {
debug = debug + "No Possible Prostitution Locations\n";
return(false);
}
debug = debug + (("Possible Locations : " + _local4) + newline);
var _local1 = RandomArray(_local4);
debug = debug + (((("Location : " + _local1) + " : ") + LocationData[_local1].Name) + newline);
PICKUP_EVENT.setPlayer(_local3, _local1);
var i = 0;
while (i < 25) {
PICKUP_EVENT.setTarget(GenerateProstitute());
PICKUP_EVENT.RISK = CalcRisk(CompNum, PICKUP_EVENT.PScale + 3, RISK_CHARISMA, 0);
if ((PICKUP_EVENT.RISK / 100) < _local3.Attributes.PIMP_MAX_RISK) {
break;
}
i++;
}
debug = debug + "Prostitute : \n";
debug = debug + debugVar(PICKUP_EVENT.Prostitute, "Prostitute");
debug = debug + newline;
var _local6 = PICKUP_EVENT.Prostitute;
DoJob(PICKUP_EVENT);
debug = debug + "Completed Job.\n";
return(true);
}
function SelectBestHenchmen(HARR) {
var _local1 = new Array();
_local1 = HARR.sort(besthenchmen_comparefunc);
_local1 = _local1.slice(0, 3);
debug = debug + debugVar(_local1, "Best Henchmen");
return(_local1);
}
function ComputerTurn_Demand(CompNum) {
var _local10 = PlayerData[CompNum];
var _local1 = new Array();
var _local6 = new Array();
debug = debug + debugVar(_local10.Name);
debug = debug + debugVar(_local10.AvailableLocations);
for (i in _local10.AvailableLocations) {
var _local4 = i;
var _local2 = LocationData[_local4];
if ((_local2.Type == 2) || (_local2.Type == 3)) {
if (_local2.Protected == 0) {
_local1.push(_local4);
} else if (_local2.Protected != CompNum) {
_local6.push(_local4);
}
}
}
debug = debug + debugVar(_local1, "Unprotected");
debug = debug + debugVar(_local6, "Protected");
if (_local1.length > 0) {
debug = debug + "Demanding...\n";
COMP_DEMAND_EVENT.setPlayer(CompNum);
var _local7 = 100;
var _local9 = -1;
for (var _local12 in _local1) {
COMP_DEMAND_EVENT.setLevel(_local1[_local12]);
if (LocationData[_local1[_local12]].PScale < _local7) {
_local7 = LocationData[_local1[_local12]].PScale;
_local9 = _local1[_local12];
}
}
debug = debug + (((("Demand Level : " + _local9) + " : ") + LocationData[_local9].Name) + newline);
COMP_DEMAND_EVENT.setLevel(_local9);
COMP_DEMAND_EVENT.CalcRisk();
DoJob(COMP_DEMAND_EVENT, true);
return(true);
}
if ((_local1.length == 0) && (_local6.length > 0)) {
debug = debug + "Attacking...\n";
ATTACK_EVENT.setPlayer(CompNum);
var _local8 = 100;
var _local9 = -1;
for (var _local12 in _local6) {
var _local3 = _local6[_local12];
var _local5 = PlayerData[LocationData[_local3].Protected];
if (_local8 > _local5.Henchmen.Stock[_local3].length) {
_local8 = _local5.Henchmen.Stock[_local3].length;
_local9 = _local3;
}
}
debug = debug + (((("Attack Level : " + _local9) + " : ") + LocationData[_local9].Name) + newline);
ATTACK_EVENT.setLevel(_local9);
debug = debug + "Completed Job.\n";
DoJob(ATTACK_EVENT, true);
return(true);
}
debug = debug + "No Demand Level Available.\n";
return(false);
}
function ComputerTurn_Rob(CompNum) {
debug = debug + "Robbing...\n";
var _local6 = PlayerData[CompNum];
var _local4 = new Array();
for (var _local10 in _local6.AvailableLocations) {
var _local3 = _local10;
var _local1 = LocationData[_local3];
var _local7 = _local1.Type;
if ((_local1.Type == 2) || (_local1.Type == 3)) {
if (_local1.Protected == 0) {
_local4.push(_local3);
}
}
}
if (_local4.length > 0) {
var _local8 = -1;
var _local5 = 100;
for (var _local10 in _local4) {
ROBBERY_EVENT.Init(CompNum, _local4[_local10]);
var _local2 = ROBBERY_EVENT.CalcRisk();
if (((_local2 / 100) < _local6.Attributes.ROB_MAX_RISK) && ((_local2 / 100) < _local5)) {
_local8 = _local10;
_local5 = _local2 / 100;
}
}
if (_local8 == -1) {
debug = debug + "No Robbery Locations.\n";
return(false);
}
debug = debug + "Completed Job.\n";
DoJob(ROBBERY_EVENT, true);
return(true);
}
debug = debug + "No Possible Robbing Locations\n";
return(false);
}
function ComputerDone() {
trace("Computer Done");
GO_TO_NEXT = false;
PopUpQueue = new Array();
POPUP_VISIBLE = false;
_root.PopUp._visible = false;
TurnCycle();
}
function ComputerTurn(CompNum) {
trace(("Beginning " + CompNum) + "'s Turn");
CompObj = PlayerData[CompNum];
ComputerActionQueue = new Array();
debug = CompObj.Name + "'s Turn\n";
var _local1 = PlayerData[CompNum];
if (_local1.Cash < _local1.Personality.CASH_MINIMUM) {
ComputerAddEvent(n, COMPUTER_CASHLOW, undefined);
}
var _local3 = 0;
while (_local3 < MAX_PLAYERS) {
if (_local3 != CompNum) {
var _local12;
var _local10 = PlayerHQs[CompNum];
if (_local12.AvailableLocations[_local10] != undefined) {
ComputerAddEvent(CompNum, COMPUTER_HQUNDERATTACK, _local3);
break;
}
if (_local1.AvailableLocations[PlayerHQs[_local3]]) {
ComputerAddEvent(CompNum, COMPUTER_OPPOSITIONHQAVAILABLE, _local3);
break;
}
}
_local3++;
}
var _local9 = 0;
while (_local9 < GENERATELIMIT) {
var _local7 = false;
_local3 = 0;
while (_local3 < _local1.Assets.length) {
var _local2 = Assets[_local3];
if (_local1.Henchmen.Stock[_local2].length < (1 + _local1.Attributes.PROTECTIVE)) {
var _local6 = GenerateHenchmen();
_local6.wage = 0;
_local6.loc = _local2;
CreateHenchmen(_local6, _local1, _local2);
debug = debug + (("Created Henchmen at Location '" + LocationData[_local2].Name) + newline);
_local7 = true;
break;
}
_local3++;
}
if (_local7) {
break;
}
if (_local1.Henchmen.Stock[0].length < _local1.Attributes.HENCHMEN_GOAL) {
var _local6 = GenerateHenchmen();
_local6.wage = 0;
_local6.loc = 0;
CreateHenchmen(_local6, _local1, 0);
debug = debug + "Created Henchmen on Player\n";
}
_local9++;
}
var _local5 = false;
PROBABILITIES = new Array(CompObj.Attributes.DRUG_ACTION_PERCENTAGE, CompObj.Attributes.PIMP_ACTION_PERCENTAGE, CompObj.Attributes.DEMAND_ACTION_PERCENTAGE, CompObj.Attributes.ROB_ACTION_PERCENTAGE);
var _local11 = new Array(0, 1, 2, 3);
while (!_local5) {
if (PROBABILITIES.length <= 0) {
SkipTurn();
}
var _local8 = ChooseFork(PROBABILITIES);
switch (_local11[_local8]) {
case 0 :
_local5 = ComputerTurn_Drugs(CompNum);
break;
case 1 :
_local5 = ComputerTurn_Pimp(CompNum);
break;
case 2 :
_local5 = ComputerTurn_Demand(CompNum);
break;
case 3 :
_local5 = ComputerTurn_Rob(CompNum);
break;
default :
debug = debug + "ERROR : Invalid Action!\n";
_local5 = false;
}
debug = debug + (_local5 + newline);
if (!_local5) {
debug = debug + "Trying Again.\n";
PROBABILITIES.splice(_local8, 1);
_local11.splice(_local8, 1);
}
}
debug = (("Final Cash : " + CompObj.Cash) + newline) + debug;
ComputerDone();
}
function ListObjInit(lib_mc, inst_mc, maxitems) {
this.attachMovie(lib_mc, "initMC", 200);
var _local7 = this.initMC;
_local7._visible = false;
TEMPLISTOBJ = new Object();
var _local4 = TEMPLISTOBJ;
_local4.MC = inst_mc;
_local4.itemID = lib_mc;
_local4.LISTOBJ_WIDTH = _local7._width;
_local4.LISTOBJ_HEIGHT = _local7._height;
_local4.MAXY = _local4.LISTOBJ_HEIGHT * maxitems;
_local4.ITEMCOUNT = 0;
_local4.SELECTED = -1;
_local4.MAXITEMS = maxitems;
trace(_local4);
trace(_local4.MAXY);
trace(_local4.LISTOBJ_WIDTH);
var _local3 = 0;
while (_local3 < maxitems) {
_local4.MC.attachMovie(lib_mc, "ITEM_" + _local3, 1 + _local3);
var _local5 = _local4.MC["ITEM_" + _local3];
_local5._x = 0;
_local5._y = _local5._height * _local3;
_local5._visible = true;
_local3++;
}
_local4.MC.ListObjOutline._width = _local4.LISTOBJ_WIDTH + 2;
_local4.MC.ListObjOutline._height = _local4.MAXY + 4;
_local4.SELECTSTART = 0;
_local4.MC.ScrollerX = _local4.LISTOBJ_WIDTH;
_local4.MC.TopScrollerY = 15;
_local4.MC.BottomScrollerY = _local4.MAXY - 30;
_local4.MC.DS = _local4;
_local4.MC.ScrollChange = function () {
this.DS.SELECTSTART = Math.floor(((this.Scroller._y - 15) / (this.DS.MAXY - 30)) * ((this.DS.ItemList.length - maxitems) + 1));
this.DS.Refresh();
};
_local4.MC.Up._x = _local4.LISTOBJ_WIDTH + 2;
_local4.MC.Up._y = 0;
_local4.MC.Down._x = _local4.LISTOBJ_WIDTH + 2;
_local4.MC.Down._y = _local4.MAXY - 11;
_local4.MC.Scroller._x = _local4.LISTOBJ_WIDTH;
_local4.ItemList = new Array();
_local7.removeMovieClip();
_local4.SelectItem = function (IND) {
this.SELECTED = IND;
this.Refresh();
_parent.ItemChange(IND, this.MC._name);
};
_local4.getSelectedItem = function () {
return(this.SELECTED);
};
_local4.AddItem = function (OBJ) {
this.ItemList.push(OBJ);
this.Refresh();
};
_local4.RemoveItem = function (IND) {
MergeDeleteArrayInd(IND, this.ItemList);
this.Refresh();
};
_local4.Down = function () {
if ((++this.SELECTSTART) > (this.ItemList.length - this.MAXITEMS)) {
this.SELECTSTART = this.ItemList.length - this.MAXITEMS;
}
this.Refresh();
};
_local4.Up = function () {
if ((--this.SELECTSTART) < 0) {
this.SELECTSTART = 0;
}
this.Refresh();
};
_local4.Refresh = function () {
if (this.ItemList.length > this.MAXITEMS) {
this.MC.Up._visible = true;
this.MC.Down._visible = true;
this.MC.Scroller._visible = true;
} else {
this.MC.Up._visible = false;
this.MC.Down._visible = false;
this.MC.Scroller._visible = false;
}
var _local2 = this.SELECTSTART;
while (_local2 < (this.MAXITEMS + this.SELECTSTART)) {
var _local3 = this.MC["ITEM_" + (_local2 - this.SELECTSTART)];
if (_local2 == this.SELECTED) {
_local3.gotoAndStop("selected");
} else {
_local3.gotoAndPlay(1);
}
if (this.ItemList[_local2] != undefined) {
for (str in this.ItemList[_local2]) {
_local3[str] = this.ItemList[_local2][str];
}
_local3.index = _local2;
_local3._visible = true;
} else {
_local3._visible = false;
}
_local2++;
}
};
_local4.RemoveAll = function () {
this.ItemList = new Array();
this.Refresh();
};
return(_local4);
}
function PlayCard(CARD, l, cplayer) {
if (CARD.Condition(l, cplayer)) {
CARD.Action(l, LocationData[l].Protected);
}
}
function PostVariable(name, path) {
DEBUG_WATCH_LIST.push({name:name, path:path, value:_root[path]});
}
function DebugCSave() {
if (DEBUG_MODE && (CSAVE == undefined)) {
CreateSave("Debug Gang", 0);
CSAVE.Cash = 100000 /* 0x0186A0 */;
CSAVE.Mission = 0;
trace("CSave is debugged");
}
}
function DebugInit() {
if (DEBUG_MODE) {
trace("Debugging Parameters Added To Map");
AddAsset(PlayerData[2], LocationData[VITOBAR_INDEX], 200, true);
}
}
function NewSimulation() {
MAX_PLAYERS = 2;
SIMULATION_MODE = true;
InitComputer(1, "Player 1", GANG_LIST[0], ROB_PERSONALITY);
PlayerData[1].resetAllMoney();
InitComputer(2, "Player 2", GANG_LIST[1], ROB_PERSONALITY);
PlayerData[2].resetAllMoney();
NewGame(DEFAULT_OBJECTIVE);
}
function debugVar(V, NAME, tab) {
TABVAL = "";
var _local1 = 0;
while (_local1 < tab) {
TABVAL = TABVAL + " ";
_local1++;
}
if (typeof(V) == "object") {
trace((TABVAL + "+Object ") + NAME);
debugObject(V, tab + 1);
} else {
trace(((TABVAL + NAME) + " := ") + V);
}
}
function debugObject(OBJ, tab) {
for (var _local3 in OBJ) {
debugVar(OBJ[_local3], _local3, tab + 1);
}
}
function CheckValue(v, str) {
if (v == undefined) {
errorMsg(str + " => UNDEFINED VALUE");
return(0);
}
return(v);
}
function CheckNumValue(v, str) {
if (v == undefined) {
errorMsg(str + " => UNDEFINED VALUE");
NewPopUp("Debug", (("Value Is Undefined: " + v) + " : ") + str, MONEY_ICON);
return(0);
}
if (Number(v) == Number("a")) {
errorMsg(str + " => INVALID VALUE");
NewPopUp("Debug", (("Value Is Invalid: " + v) + " : ") + str, MONEY_ICON);
return(0);
}
return(v);
}
function errorMsg(m) {
trace(m);
NewPopUp("***ERROR***", m, 1);
}
function RandomInt(min, max) {
return(Math.floor(Math.random() * (max - min)) + min);
}
function GetProstScale(PROST_OBJ) {
var _local1 = PROST_AGEMAX - PROST_OBJ.Age;
_local1 = _local1 + PROST_OBJ.Att;
return(_local1);
}
function AddProstituteToMap() {
var _local1 = new Array();
var _local2 = 0;
while (_local2 < LocationData.length) {
if (LocationData[_local2].Type == 2) {
_local1.push(_local2);
}
_local2++;
}
_local2 = RandomArray(_local1);
LocationData[_local2].Prostitutes++;
}
function GenerateProstitute(PScale) {
var _local4 = PROST_AGEMIN;
var _local3 = PROST_AGEMAX;
var _local2 = PROST_ATTMIN;
var _local1 = PROST_ATTMAX;
if (PScale != undefined) {
if (PScale < 5) {
_local4 = 35;
_local3 = 40;
_local2 = 1;
_local1 = 5;
} else if (PScale < 10) {
_local4 = 25;
_local3 = 35;
_local2 = 1;
_local1 = 10;
}
}
return({Name:RandomArray(PROSTITUTE_NAME_ARRAY), Age:RandomInt(_local4, _local3), Att:RandomInt(_local2, _local1), Own:-1});
}
function HireProstitute(PROST_OBJ, p) {
var _local1 = MergeAddArrayInd(GLOBAL_PROST_ARRAY);
GLOBAL_PROST_ARRAY[_local1] = new Object();
for (at in PROST_OBJ) {
GLOBAL_PROST_ARRAY[_local1][at] = PROST_OBJ[at];
}
GLOBAL_PROST_ARRAY[_local1].Own = p;
GLOBAL_PROST_ARRAY[_local1].INDEX = _local1;
MergeAddArray(_local1, PlayerData[p].Prostitutes.Stock);
}
function getProstObj(i) {
return(GLOBAL_PROST_ARRAY[i]);
}
function getProstObj2(p, i) {
var _local1 = PlayerData[p].Prostitutes.Stock[i];
return(getProstObj(_local1));
}
function getProstNum(p) {
return(PlayerData[p].Prostitutes.Stock.length);
}
function FireProstitute(i) {
PROST_OBJ = getProstObj(i);
MergeDeleteArrayInd(i, GLOBAL_PROST_ARRAY);
p = PROST_OBJ.Own;
MergeDeleteArray(i, PlayerData[p].Prostitutes.Stock);
AddProstituteToMap();
}
function GetTotalProstPower(p) {
var _local4 = 0;
for (var _local5 in PlayerData[p].Prostitutes.Stock) {
var _local2 = PlayerData[p].Prostitutes.Stock[_local5];
var _local1 = getProstObj(_local2);
if (_local1 != undefined) {
_local4 = _local4 + Math.ceil(((_local1.Age - 20) / 20) + (_local1.Att / 20));
}
}
return(_local4);
}
function GetTotalProstIncome(p) {
var _local3 = 0;
for (var _local4 in PlayerData[p].Prostitutes.Stock) {
var _local1 = PlayerData[p].Prostitutes.Stock[_local4];
_local3 = _local3 + GetProstIncome(_local1);
trace("Wage : " + GetProstIncome(_local1));
}
return(_local3);
}
function GetProstIncome(i) {
PROST_OBJ = getProstObj(i);
if (PROST_OBJ.Age <= PROST_AGEMAX) {
income = (PROST_FUNCT[Math.floor(PROST_OBJ.Age - PROST_AGEMIN)] * PROST_OBJ.Att) * 10;
return(Math.ceil(income));
}
if (PROST_OBJ != undefined) {
FireProstitute(i);
return(0);
}
trace("***ERROR**** Prostitute Index Undefined?!!?");
}
function AgeProstitutes(p) {
var _local1 = 0;
while (_local1 < getProstNum(p)) {
var _local2 = PlayerData[p].Prostitutes.Stock[_local1];
GLOBAL_PROST_ARRAY[_local2].Age++;
_local1++;
}
}
function SmackBitchUp(ind) {
GLOBAL_PROST_ARRAY[ind].Att--;
if (GLOBAL_PROST_ARRAY[ind].Att < PROST_ATTMIN) {
GLOBAL_PROST_ARRAY[ind].Att = PROST_ATTMIN;
}
}
function PlasticSurgery(ind) {
GLOBAL_PROST_ARRAY[ind].Age = GLOBAL_PROST_ARRAY[ind].Age - 5;
if (GLOBAL_PROST_ARRAY[ind].Age < PROST_AGEMIN) {
GLOBAL_PROST_ARRAY[ind].Age = PROST_AGEMIN;
}
}
function BoobJob(ind) {
GLOBAL_PROST_ARRAY[ind].Att = Math.min(GLOBAL_PROST_ARRAY[ind].Att + 5, PROST_ATTMAX);
}
function CreateTempEvent(RISK, WINFUNC, LOSEFUNC, PLAYER) {
TmpEvent = new Object();
TmpEvent.PLAYERNUM = PLAYER;
TmpEvent.RISK = RISK;
TmpEvent.Win = WINFUNC;
TmpEvent.Lose = LOSEFUNC;
TmpEvent.CalcRisk = function () {
return(RISK);
};
return(TmpEvent);
}
function RunAttrRackets(PLAYER_ID) {
var _local4 = PlayerData[PLAYER_ID];
var _local1 = 0;
while (_local1 < _local4.Assets.length) {
var _local2 = LocationData[_local4.Assets[_local1]];
if (_local2.Racket != undefined) {
var _local3 = RACKET_ARRAY[_local2.Racket];
if (_local3.AttributePlus != undefined) {
Racket_AttrUp(PLAYER_ID, _local3);
}
}
_local1++;
}
}
function RunRackets(PLAYER_ID) {
var _local4 = PlayerData[PLAYER_ID];
var _local3 = 0;
while (_local3 < _local4.Assets.length) {
var _local1 = LocationData[_local4.Assets[_local3]];
if (_local1.Racket != undefined) {
var _local2 = RACKET_ARRAY[_local1.Racket];
r = Math.random();
if (r < (_local2.RISK / 100)) {
_local2.Lose(PLAYER_ID);
} else {
_local2.Win(PLAYER_ID, _local1.Num);
}
}
_local3++;
}
}
function AddRacket(RACKET_ID, LOCATION_ID, PLAYER_ID) {
if (LocationData[LOCATION_ID].Protected == PLAYER_ID) {
if (LocationData[LOCATION_ID].Racket == undefined) {
LocationData[LOCATION_ID].Racket = RACKET_ID;
} else {
errorMsg("This location already has a racket");
}
} else {
errorMsg("This location is not protected by " + PLAYER_ID);
}
}
function SellRacket(LOCATION_ID) {
var _local1 = LocationData[LOCATION_ID];
var _local3 = PlayerData[_local1.Protected];
var _local2 = RACKET_ARRAY[_local1.Racket];
addMoney(_local3, FIN_ASSET, _local2.COST * 0.5);
RemoveRacket(LOCATION_ID);
}
function RemoveRacket(LOCATION_ID) {
LocationData[LOCATION_ID].Racket = undefined;
}
function Racket_AddMoney(p, rkt) {
AddMoney(PlayerData[p], FIN_ASSET, rkt.REWARD);
}
function Racket_LoseMoney(p, rkt) {
AddMoney(PlayerData[p], FIN_ASSET, -(rkt.REWARD * 2));
}
function Racket_ListMoneyAmt(p, amt) {
AddMoney(PlayerData[p], FIN_BAIL, -amt);
}
function Racket_AttrUp(p, rkt) {
if (rkt.AttributePlus == "Smuggle") {
PlayerData[p].Attributes[rkt.AttributePlus] = PlayerData[p].Attributes[rkt.AttributePlus] + 3;
} else {
PlayerData[p].Attributes[rkt.AttributePlus]++;
}
}
function exitGame() {
NewFork("Exit", "Are you sure you want to exit? All unsaved gameplay will be lost.", _root.MONEY_ICON, ["OK", "Nevermind"], [EXIT_GAME, {RISK:0}]);
}
function MissionComplete(m) {
var _local2 = Env.Objective.Name + " Complete";
var _local1 = m;
var _local3 = MONEY_ICON;
NewFork(_local2, _local1, _local3, ["Exit To Menu", "Keep Playing"], [EXIT_GAME, {RISK:0}]);
}
function CreateSave(Name, Gang) {
CSAVE = new Object();
CSAVE.Gang = GANG_LIST[Gang];
CSAVE.Name = Name;
CSAVE.Cash = 0;
CSAVE.Mission = 0;
}
function copyObj(OBJ1, OBJ2) {
trace("Copying Object");
for (var _local3 in OBJ2) {
if (typeof(OBJ2[_local3]) == "object") {
OBJ1[_local3] = new Object();
copyObj(OBJ1[_local3], OBJ2[_local3]);
} else {
trace((_local3 + " => ") + OBJ2[_local3]);
OBJ1[_local3] = OBJ2[_local3];
}
}
}
function CompleteMission(MissionID) {
trace("Applying Costume");
copyObj(CSAVE.Gang.Costume, PlayerData[1].Costume);
CSAVE.Cash = PlayerData[1].Cash;
if (MissionID > CSAVE.Mission) {
CSAVE.Mission++;
}
}
function ApplySave(p) {
PlayerData[p].Cash = CSAVE.Cash;
}
function GetActions(PObj, LObj) {
var _local3 = _root.Env.Mask.ActionMask;
var _local7 = PObj.Num;
var _local5 = LObj.Protected == _local7;
var _local9 = (LObj.Protected != _local7) && (LObj.Protected > 0);
var _local8 = LObj.Prostitutes > 0;
var _local4 = LObj.Type;
var _local2 = new Array();
if (_local9) {
if (_local3.Attack == undefined) {
_local2.push(ATTACK_ACTION);
}
if (_local3.Driveby == undefined) {
_local2.push(DRIVEBY_ACTION);
}
return(_local2);
}
if (_local4 == 5) {
if (_local3.Bribe == undefined) {
_local2.push(BRIBE_ACTION);
}
}
if (_local5) {
if (_local3.Protect == undefined) {
_local2.push(PROTECT_ACTION);
}
if (_local3.Racket == undefined) {
_local2.push(RACKET_ACTION);
}
}
if (_local8 && (_local4 == 2)) {
if (_local3.Pickup == undefined) {
_local2.push(PICKUP_ACTION);
}
}
if (((!_local5) && (_local4 == 3)) || (_local4 == 2)) {
if (_local3.Rob == undefined) {
_local2.push(ROB_ACTION);
}
}
if ((!_local5) && ((_local4 == 2) || (_local4 == 3))) {
if (_local3.Demand == undefined) {
_local2.push(DEMAND_ACTION);
}
}
return(_local2);
}
function DRUG_PSCALE_FUNC(v) {
if (v < 500) {
return(1);
}
return((v / 3000) + 2);
}
function FactionBattle(tmpEvent, Left, Right, LeftHenchmen, RightHenchmen) {
GO_TO_NEXT = false;
BATTLE_OBJECT = new Object();
BATTLE_OBJECT.WinEvent = tmpEvent;
BATTLE_OBJECT.Done = function () {
this.WinEvent.WinBattle(this.Winner);
};
BATTLE_OBJECT.Left = new Object();
BATTLE_OBJECT.Left.Type = Left.Type;
BATTLE_OBJECT.Left.Battle = Left.Attributes.Battle;
BATTLE_OBJECT.Left.Costume = Left.Costume;
BATTLE_OBJECT.Left.Player = Left.Num;
BATTLE_OBJECT.Left.Henchmen = new Array();
if (LeftHenchmen != undefined) {
for (i in LeftHenchmen) {
BATTLE_OBJECT.Left.Henchmen.push(LeftHenchmen[i]);
}
}
BATTLE_OBJECT.Right = new Object();
BATTLE_OBJECT.Right.Type = Right.Type;
BATTLE_OBJECT.Right.Battle = Right.Attributes.Battle;
BATTLE_OBJECT.Right.Costume = Right.Costume;
BATTLE_OBJECT.Right.Player = Right.Num;
BATTLE_OBJECT.Right.Henchmen = new Array();
if (RightHenchmen != undefined) {
for (i in RightHenchmen) {
BATTLE_OBJECT.Right.Henchmen.push(RightHenchmen[i]);
}
trace("Added from parameters : " + BATTLE_OBJECT.Right.Henchmen);
}
BATTLE_OBJECT.SelectHenchmen = function (arr) {
trace("Adding Henchmen " + this.SELECTSIDE);
if (this.SELECTSIDE == "l") {
for (i in arr) {
this.Left.Henchmen[i] = arr[i];
}
} else if (this.SELECTSIDE == "r") {
for (i in arr) {
this.Right.Henchmen[i] = arr[i];
}
}
this.CheckHenchmen();
};
BATTLE_OBJECT.CheckHenchmen = function () {
trace("henchmen check");
this.SELECTSIDE = "l";
if ((this.Left.Henchmen.length == 0) || (this.Left.Henchmen == undefined)) {
this.Winner = "r";
this.Done();
}
trace("Select L Side : ");
trace(this.Left.Henchmen);
this.Left.Henchmen = SelectBestHenchmen(this.Left.Henchmen);
this.SELECTSIDE = "r";
if ((this.Right.Henchmen.length == 0) || (this.Right.Henchmen == undefined)) {
this.Winner = "l";
this.Done();
}
trace("Select R Side : ");
trace(this.Right.Henchmen);
this.Right.Henchmen = SelectBestHenchmen(this.Right.Henchmen);
trace("Battle!");
trace(this.Left.Henchmen);
trace(this.Right.Henchmen);
this.Battle();
POPUP_VISIBLE = false;
trace("Human Type?");
trace(this.Left);
trace(this.Right);
if ((this.Left.Type == HUMAN_TYPE) || (this.Right.Type == HUMAN_TYPE)) {
if ((this.Left.Henchmen.length > 0) && (this.Right.Henchmen.length > 0)) {
NewPopUpObj({ani:"battle", out:undefined, c1:this.Left.Costume, c2:this.Right.Costume, p:undefined});
}
} else {
trace("No");
BATTLE_OBJECT.Done();
}
};
BATTLE_OBJECT.AC = new Array();
BATTLE_OBJECT.AC[-3] = 4;
BATTLE_OBJECT.AC[-2] = 3;
BATTLE_OBJECT.AC[-1] = 2;
BATTLE_OBJECT.AC[1] = 1;
BATTLE_OBJECT.AC[2] = 5;
BATTLE_OBJECT.AC[3] = 6;
BATTLE_OBJECT.Battle = function () {
var _local4 = -1;
if (Math.random() < 0.5) {
_local4 = 1;
}
this.Queue = new Array();
var _local3 = new Array();
_local3[-1] = new Array();
_local3[1] = new Array();
var _local7 = true;
BattleVal = new Array();
BattleVal[-1] = this.Left.Battle;
BattleVal[1] = this.Right.Battle;
for (i in this.Left.Henchmen) {
if (this.Left.Henchmen[i].name == undefined) {
_local3[-1][i] = _root.getHObj(this.Left.Henchmen[i]);
} else {
_local3[-1][i] = this.Left.Henchmen[i];
}
}
for (i in this.Right.Henchmen) {
if (this.Right.Henchmen[i].name == undefined) {
_local3[1][i] = _root.getHObj(this.Right.Henchmen[i]);
} else {
_local3[1][i] = this.Right.Henchmen[i];
}
}
trace("Array L : " + _local3[-1]);
trace("Array R : " + _local3[1]);
while (_local7) {
trace("Turn : " + _local4);
var i = 0;
while (i < 3) {
trace(" " + i);
if (_local3[_local4][i] != undefined) {
var _local10 = _local3[_local4][i];
var _local6 = "A" + this.AC[(i + 1) * _local4];
trace(" " + _local6);
if (Math.random() < (_local10.atk / 4)) {
trace(_local3[-_local4]);
o = 0;
while (o < 3) {
trace(" " + o);
if (_local3[-_local4][o] != undefined) {
var _local5 = "A" + this.AC[(o + 1) * (-_local4)];
trace(((" " + _local6) + " => ") + _local5);
_local3[-_local4][o] = _root.hitHenchmen(_local3[-_local4][o], BattleVal[_local4]);
if (_local3[-_local4][o] == undefined) {
this.Queue.push({s:_local6, d:_local5});
} else {
this.Queue.push({s:_local6, h:_local5});
}
break;
}
o++;
}
}
}
_local7 = true;
if (((_local3[-1][0] == undefined) && (_local3[-1][1] == undefined)) && (_local3[-1][2] == undefined)) {
Winner = "r";
_local7 = false;
}
if (((_local3[1][0] == undefined) && (_local3[1][1] == undefined)) && (_local3[1][2] == undefined)) {
Winner = "l";
_local7 = false;
}
i++;
}
_local4 = _local4 * -1;
}
if (Winner == "l") {
this.HenchmenToMove = new Array();
if (_local3[-1][0] != undefined) {
this.HenchmenToMove.push(_local3[-1][0].index);
}
if (_local3[-1][1] != undefined) {
this.HenchmenToMove.push(_local3[-1][1].index);
}
if (_local3[-1][2] != undefined) {
this.HenchmenToMove.push(_local3[-1][2].index);
}
}
this.Winner = Winner;
trace(Winner + "wins");
trace(this.Queue);
return(Winner);
};
BATTLE_OBJECT.CheckHenchmen();
}
function StartRandomEvent(p) {
event = RandomArray(RANDOMEVENTS_ARRAY);
if (event.Condition(p)) {
event.Run(p);
}
}
CURRENT_PLAYER = 1;
HUMAN_TYPE = 1;
COMPUTER_TYPE = 2;
TYPE_NAMES = new Array();
TYPE_NAMES.push({name:"Human Player", type:HUMAN_TYPE});
PUBLICENEMY_COSTUME = {Beard:1, Hat:6, Body:5, Glasses:1, Gun:1};
CARTEL_COSTUME = {Beard:7, Hat:23, Body:3, Glasses:2, Gun:1};
CORLEONE_COSTUME = {Hat:2, Body:11, Beard:4, Glasses:1, Gun:1};
YAKUZA_COSTUME = {Hat:22, Beard:8, Body:1, Glasses:1, Gun:1};
TRIAD_COSTUME = {Hat:1, Beard:8, Body:16, Glasses:1, Gun:1};
MRT_COSTUME = {Hat:7, Beard:9, Body:12, Glasses:1, Gun:1};
BIKER_COSTUME = {Hat:1, Beard:5, Body:12, Glasses:1, Gun:1};
PUNK_COSTUME = {Hat:21, Body:2, Beard:4, Glasses:2, Gun:1};
RASTA_COSTUME = {Hat:15, Body:13, Beard:1, Glasses:1, Gun:1};
PIRATE_COSTUME = {Hat:26, Body:14, Beard:6, Glasses:5, Gun:1};
IRISH_COSTUME = {Hat:2, Body:7, Beard:4, Glasses:1, Gun:1};
THUG_COSTUME = {Hat:3, Body:6, Beard:1, Glasses:1, Gun:1};
COLOR_LIST = new Array();
COLOR_LIST.push({});
COLOR_LIST.push({rb:-82, gb:-255, bb:-255});
COLOR_LIST.push({rb:-255, gb:-255, bb:-82});
COLOR_LIST.push({rb:-255, gb:-82, bb:-255});
COLOR_LIST.push({rb:-50, gb:-150, bb:-255});
COLOR_LIST.push({rb:-255, gb:-72, bb:-113});
COLOR_LIST.push({rb:-50, gb:-50, bb:-50});
COLOR_LIST.push({rb:-150, gb:-150, bb:-150});
COLOR_LIST.push({rb:-255, gb:-159, bb:-184});
GANG_LIST = new Array({name:"The Cosa Nostra", costume:CORLEONE_COSTUME, icon:2}, {name:"Anarchy Revolt", costume:PUNK_COSTUME, icon:4}, {name:"Colombian Cartel", costume:CARTEL_COSTUME, icon:1}, {name:"Yardi Republik", costume:RASTA_COSTUME, icon:8}, {name:"Yakuza", costume:YAKUZA_COSTUME, icon:12}, {name:"Triads", costume:TRIAD_COSTUME, icon:10}, {name:"Swashbucklers", costume:PIRATE_COSTUME, icon:9}, {name:"The A-Team", costume:MRT_COSTUME, icon:6}, {name:"Breakbeat Kings", costume:PUBLICENEMY_COSTUME, icon:3}, {name:"Satan's Children", costume:BIKER_COSTUME, icon:7}, {name:"Fightin' Irish", costume:IRISH_COSTUME, icon:11}, {name:"The Ravens", costume:THUG_COSTUME, icon:13});
DEFAULT_MAP_SCALE = 400;
SCREEN_WIDTH = 800;
SCREEN_HEIGHT = 600;
HEROIN_INDEX = 0;
WEED_INDEX = 1;
COCAINE_INDEX = 2;
EX_INDEX = 3;
ACID_INDEX = 4;
HASH_INDEX = 5;
ROOPH_INDEX = 6;
OPIUM_INDEX = 7;
NUM_GANG_LOGOS = 3;
MAX_HATS = 27;
MAX_BEARD = 9;
MAX_BODY = 16;
MAX_GLASSES = 6;
MAX_GUN = 5;
BIGGUNFLAG = 3;
COP_COSTUME = {Hat:19, Glasses:2, Beard:1, Gun:1, Body:8};
CivilianHats = new Array();
CivilianHats = [9, 10, 15, 18, 22, 23];
CivilianGlasses = new Array();
CivilianGlasses = [1, 3, 4, 5];
CivilianBeard = new Array();
CivilianBeard = [1, 2, 3, 4, 5, 6];
HENCHMEN_NAMES = new Array();
HENCHMEN_NAMES = ["Keye \"The Poot\" Tang", "George Jung", "Diego Delgado", "Pablo Escobar", "Augusto Oliveras", "Derek Foreal", "Michael Corleone", "Santino Corleone", "Jack Woltz", "Emilio Barzini", "Virgil Sollozzo", "Carmine Cuneo", "Luca Brasi", "Bruno Tattaglia", "Hyman Roth", "Frankie Pentangeli", "Rocco Lampone", "Vincent Vega", "Jules Winnfield", "Butch Coolidge", "Marsellus Wallace", "Fred Fenster", "Dean Keaton", "Michael McManus", "Todd Hockney", "Jack Baer", "Jimmy Conway", "Henry Hill", "Tommy DeVito", "Paul Cicero", "Tuddy Cicero", "Frankie Carbone", "Sonny Bunz", "Billy Batts", "Tyler Durden", "Travis Bickle", "Sam Rothstein", "Nicky Santoro", "Benjamin Ruggiero", "Donnie Brasco", "Sonny Black", "Tony Montana", "Manny Ribera", "Jim Malone", "Al Capone", "Walter Payne", "Bob Dylan", "Stevie Wonder", "David Bowie", "Albert King", "Harry Williams", "Brain Walmsley", "Zack de la Rocha", "Cosmo Kramer"];
DRUG_NAMES = new Array();
DRUG_NAMES[HEROIN_INDEX] = "Heroin";
DRUG_NAMES[WEED_INDEX] = "Weed";
DRUG_NAMES[COCAINE_INDEX] = "Cocaine";
DRUG_NAMES[EX_INDEX] = "Ex";
DRUG_NAMES[ACID_INDEX] = "Acid";
DRUG_NAMES[HASH_INDEX] = "Hash";
DRUG_NAMES[ROOPH_INDEX] = "Rooph";
DRUG_NAMES[OPIUM_INDEX] = "Opium";
DRUG_DEFAULT = new Array();
DRUG_DEFAULT[HEROIN_INDEX] = 2000;
DRUG_DEFAULT[WEED_INDEX] = 100;
DRUG_DEFAULT[COCAINE_INDEX] = 1000;
DRUG_DEFAULT[EX_INDEX] = 500;
DRUG_DEFAULT[ACID_INDEX] = 50;
DRUG_DEFAULT[HASH_INDEX] = 200;
DRUG_DEFAULT[ROOPH_INDEX] = 200;
DRUG_DEFAULT[OPIUM_INDEX] = 500;
DRUG_MAX = 2;
DRUG_MIN = 0.6;
GUNPOINT_ICON = 1;
MONEY_ICON = 2;
POLICE_ICON = 3;
DEMAND_ICON = 4;
DRUG_ICON = 5;
PRISON_ICON = 6;
HANDSHAKE_ICON = 7;
ROBBERY_ICON = 8;
HENCHMEN_ICON = 9;
GIRL_ICON = 10;
DANCE_ICON = 11;
LIQUOR_ICON = 12;
REJECTED_ICON = 13;
ACCEPTED_ICON = 14;
Month = new Array();
Month[0] = "Jan";
Month[1] = "Feb";
Month[2] = "Mar";
Month[3] = "Apr";
Month[4] = "May";
Month[5] = "Jun";
Month[6] = "Jly";
Month[7] = "Aug";
Month[8] = "Spt";
Month[9] = "Oct";
Month[10] = "Nov";
Month[11] = "Dec";
FIN_PLAYER = 1;
FIN_TYPE = new Array();
FIN_ROBBERY = 0;
FIN_ASSET = 1;
FIN_PROSTITUTE = 2;
FIN_DRUG = 3;
FIN_WAGE = 4;
FIN_BRIBE = 5;
FIN_BAIL = 6;
FIN_PURCHASES = 7;
FIN_LEVEL1 = 10000;
FIN_LEVEL2 = 25000;
FIN_LEVEL3 = 50000;
FIN_LEVEL4 = 100000 /* 0x0186A0 */;
FIN_LEVEL5 = 250000 /* 0x03D090 */;
FIN_LEVEL6 = 500000 /* 0x07A120 */;
FIN_LEVEL7 = 1000000 /* 0x0F4240 */;
FIN_STATUS = new Array();
FIN_STATUS[FIN_ROBBERY] = "Con Syndicate";
FIN_STATUS[FIN_ASSET] = "Con Syndicate";
FIN_STATUS[FIN_DRUG] = "Con Syndicate";
FIN_STATUS[FIN_PROSTITUTE] = "Con Syndicate";
NewsHeadlines = new Array();
DateString = "--";
addNews("Welcome To Sindicate", "Use this section to keep track of your actions and your enemy's actions.");
OPEN_PROTECT_WINDOW = new Object();
OPEN_PROTECT_WINDOW.Name = "Protect Window";
OPEN_PROTECT_WINDOW.RISK = 0;
OPEN_PROTECT_WINDOW.Init = function (p, l) {
this.playnum = p;
this.locnum = l;
};
OPEN_PROTECT_WINDOW.Win = function () {
viewProtectAsset(this.playnum, this.locnum);
};
HENCHMEN_HPMAX = 5;
HENCHMEN_ATKMAX = 3;
HENCHMEN_ROBMAX = 3;
HENCHMEN_POWMAX = 3;
HENCHMEN_WAGEMAX = 15;
HENCHMEN_MINWAGE = 50;
HENCHMEN_HAT_COST = 50;
HENCHMEN_BODY_COST = 100;
HENCHMEN_BEARD_COST = 30;
HENCHMEN_GLASSES_COST = 20;
UPFRONT_MOD = 5;
GlobalHenchmen = new Object();
GlobalHenchmen.List = new Array();
HenchmenDefault = {name:"Henchman", hp:1, atk:1, rob:1, pow:1, wage:10, loc:-1};
INTERFACE_DEPTH = 1000;
POPUP_DEPTH = 1001;
POPWIND_DEPTH = 1002;
FORKWIND_DEPTH = 1003;
COMPWIND_DEPTH = 1004;
TIMER_DEPTH = 1005;
TOOLTIP_DEPTH = 1006;
CUTSCENE_DEPTH = 1007;
MUSICMC_DEPTH = 1008;
SETUPMC_DEPTH = 1009;
PlayerData = new Array();
INITIAL_MONEY = 1000;
INITIAL_POWER = 10;
LOCATION_POWER = 30;
PIMP_POWER = 20;
DRUG_POWER = 20;
HENCH_POWER = 20;
MAX_ATTRIBUTES = 10;
MAX_PLAYERS = 2;
HUMAN_TYPE = 1;
COMPUTER_TYPE = 2;
PopUpQueue = new Array();
EXIT_GAME = new Object();
EXIT_GAME.Name = "Exit Game";
EXIT_GAME.RISK = 0;
EXIT_GAME.Win = function () {
RemoveInterface();
gotoAndPlay (61);
};
checkDistanceBetween = function (a, b) {
if (a.distance < b.distance) {
return(-1);
}
if (a.distance > b.distance) {
return(1);
}
return(0);
};
MAP_ASSET_SPREAD = 8;
MINIMUM_HQ_DIST = 100;
LOCATIONS = 40;
LocationTypes = new Array();
LocationTypes[1] = "None";
LocationTypes[2] = "Nightclub / Bar";
LocationTypes[3] = "Community Store";
LocationTypes[4] = "";
LocationTypes[5] = "Police Station";
LocationTypes[6] = "Drug Trade";
LocationTypes[7] = "Casino";
LocationTypes[8] = "";
LocationTypes[9] = "Syndicate HQ";
LocationTypes[10] = "Market";
LocationNames = new Array();
LocationNames[2] = new Array("FU-Bar", "Vito's Bar", "Phillip's", "Fox and the Hound", "Jack's", "Velvet Underground", "Highway 61", "Classico's", "The Sandeman", "Bada Bing's", "Phoenix", "Head", "Raggae Club", "Electrolounge", "Philthy's", "The Cult", "Grimrose Hill", "Rockafella Hall", "Underground Cavern", "Steez Pub", "The Shadow", "The Deep Purple", "Club Abstract", "Den for Men", "The Dark Side of the Moon", "The Stairway", "Motown Shakedown", "The Happy Puppy", "Wild Horse", "Silver Spur", "The Stampede Corral", "Fosco's Pub & Grill", "The Rude Native", "Greenwich Village", "1979", "Bombshelter Pub", "The Turret", "Starlight Lounge", "McMullan's", "Paddy O'Flairty's", "Failte's", "The Outback", "The Jaguar", "Che's", "Bloodbath", "The Government", "Republik", "The Mirage", "Treasure Island", "Mahi-Mahi", "Angel Tavern", "Angelucci's", "Anglers Tavern", "Antique Bar", "Aqua Lounge", "Aquis", "Arcadia Hotel", "Area 61", "The Argo", "Atoka", "Atomic Bar and Cafe", "Automatic Cafe", "Madisons", "Magic City", "Mai Tai Cocktail Bar", "Maitz Hotel", "Malvern Hotel", "Malvern Vale Club Hotel", "Maori Chief Hotel", "Marine Hotel", "Marquis of Lorne", "Town Hall Hotel", "Trader Bar", "Traffik");
LocationNames[3] = new Array("Jim Bob's Variety", "9 Eleven", "Benny's Restaurant", "Purple Turtle Records", "Futurama Shop", "Monk's", "Hyonda Car Dealership", "J-Mack's", "Grober's Grocers", "Falcon Motors", "Buckaroo's Dollar Store", "Aroma Borealis", "Brew Ha Ha", "Espresso Yourself", "Full of Beans", "Happy Endings", "Higher Grounds", "Hot Shotz", "Bobs Barkers", "Dog House", "Franks a Lot", "Puppy Love", "Hot Diggity Dogs", "Red Hot Lovers", "Dog Day Afternoon", "Beau Thai", "Bow Thai", "Once Upon a Thai", "Shang Chai", "TenPenh", "Thai Panic", "Wok N Roll", "Wok Wagon", "Tokyo Rose", "Eggspectations", "Casa Too Mucha", "The Real McCaw", "Eaton Gogh", "The Virginian", "Panchos Villa", "Tin Man Diner", "The Honest Lawyer", "Fairweather", "Cotton Ginny", "Bi-way", "Far West", "Mistaya", "Jack Fraser", "Tip Top Tailors", "Grafton & Co.", "The Suit Exchange", "Reitmans", "Roots", "Suzy Shier", "Antels", "LA Express", "Mosh", "Gloss", "Generation X", "Backstage Pass", "Forwell's Variety", "Money Tree", "Buck or a Few", "Poundland", "Pfennigland", "99 Cents Store", "Huffman's", "Sherwood Music", "DJ Equipment & Accessories", "Sublime Bar & Grill", "The WASP Texas Radio", "Roadhouse Blues Grill", "San Simeon", "A Night at the Opera House", "This is a Newstand", "AM/PM", "LCBO", "Likuer Sture", "Brick Brewery", "The Still", "Dworkin Furs", "DaBeers Diamonds", "Da Bears Sports Store", "Aldo Shoes", "Porter's", "World Poker Depot", "Underwear Brassiere", "Combat Socks", "Blast from the Past Record Store", "Back to the Future Retro Store", "MacBurger King", "Jack and the Fox", "Tramway Hotel", "Transit", "Transport Hotel", "Treasure Cove", "The Treasury");
LocationNames[5] = new Array("1st Precinct", "32nd Precinct", "76th Precinct", "66th Precinct", "89th Precinct", "12th Precinct", "35th Precinct", "38th Precinct", "26th Precinct", "67th Precinct", "28th Precinct");
LocationNames[6] = new Array("Back Alley", "Back Alley", "Back Alley", "Back Alley", "Back Alley", "Back Alley", "Back Alley", "Back Alley", "Back Alley", "Back Alley", "Back Alley", "Back Alley", "Back Alley", "Back Alley", "Back Alley", "Back Alley", "Back Alley", "Back Alley");
LocationNames[7] = new Array("CasinoName");
LocationNames[9] = new Array("Village Pines Estate", "Jasmine Cove Villa", "Stanley Oaks Mansion", "Hamlet Greens Ranch");
LocationNames[10] = new Array("Market", "Market", "Market", "Market", "Market", "Market", "Market", "Market", "Market", "Market", "Market", "Market", "Market");
Options = new Object();
Options.Quality = "high";
Options.SoundOn = true;
Options.MusicOn = true;
PLAYER_CYCLE = 0;
RISK_PURSUADE = {Power:0.25, Pursuade:0.75};
RISK_INTIMIDATION = {Intimidation:0.75, Power:0.25};
RISK_GETAWAY = {Getaway:0.75, Power:0.25};
RISK_SMUGGLE = {Power:0.5, Smuggle:0.5};
RISK_ROBBERY = {Robbery:0.5, Getaway:0.25, Power:0.25};
RISK_CHARISMA = {Power:0.5, Charisma:0.5};
RISK_PIMP = {Power:0.3, Charisma:0.4, Pursuade:0.3};
RISK_DISTRIBUTIONS = new Array(RISK_PURSUADE, RISK_INTIMIDATION, RISK_GETAWAY, RISK_POWER, RISK_ROBBERY, RISK_SMUGGLE, RISK_ROBBERY, RISK_PIMP);
MAX_POWER = 100;
MAX_PSCALE = 25;
MIN_RISK_START = 2;
MIN_RISK_END = 7;
MIN_RISK_FACTOR = (MIN_RISK_END - MIN_RISK_START) / MAX_PSCALE;
MAX_RISK_START = 10;
MAX_RISK_END = 100;
MAX_RISK_FACTOR = (MAX_RISK_END - MAX_RISK_START) / MAX_PSCALE;
min_risk_func = function (x) {
return((MIN_RISK_FACTOR * x) + MIN_RISK_START);
};
max_risk_func = function (x) {
return((MAX_RISK_FACTOR * x) + MAX_RISK_START);
};
UPGRADE_LIST = new Array();
CAR_UPGRADE_START = 0;
UPGRADE_LIST[0] = {Name:"Junker", Description:"The cheapest model in the used car lot pool. It'll get you away from the crime scene faster then if you were on foot.", Getaway:2, Cost:500, Slot:0};
UPGRADE_LIST[1] = {Name:"Van", Description:"Big unmarked black van. Perfect for a getaway and for getting as much equipment to the crime scene as possible", Getaway:4, Battle:2, Cost:5000, Slot:0};
UPGRADE_LIST[2] = {Name:"Sports Car", Description:"Getting from point A to B in record time. Perfect for a quick getaway.", Getaway:6, Cost:5000, Slot:0};
UPGRADE_LIST[3] = {Name:"Luxury Car", Description:"Looks sexy, drives quick, and gives off a professional look that will help you take care of business.", Getaway:4, Pursuade:2, Charisma:2, Cost:7500, Slot:0};
UPGRADE_LIST[4] = {Name:"Lowrider", Description:"Restored from the 70s, still got the sass and still got the style. The ladies will love it.", Getaway:4, Charisma:5, Cost:7500, Slot:0};
UPGRADE_LIST[5] = {Name:"Limo", Description:"Perfect for a Don. Take care of business & the ladies. Do that and you won't need a quick getaway", Getaway:1, Pursuade:3, Charisma:5, Cost:10000, Slot:0};
CAR_UPGRADE_END = 5;
GUN_UPGRADE_START = 6;
UPGRADE_LIST[6] = {Name:"Pistol", Description:"Standard Issue", Cost:1000, Slot:1};
PISTOL_UPGRADE_INDEX = 6;
UPGRADE_LIST[7] = {Name:"Silenced Pistol", Description:"Great for Robberies and easy getaways.", Cost:3000, Slot:1, Battle:1, Getaway:3};
UPGRADE_LIST[8] = {Name:"Revolver Pistol", Description:"A Sexy weapon perfect for the corner pimp.", Cost:3000, Slot:1, Charisma:2};
UPGRADE_LIST[9] = {Name:"Shotgun", Description:"Awesome power, an offer you can't refuse.", Cost:10000, Slot:1, Pursuade:3, Battle:6};
UPGRADE_LIST[10] = {Name:"Tommy Gun", Description:"Quick and deadly. It's got that gangster taste to it too.", Cost:12000, Slot:1, Pursuade:2, Battle:6, Charisma:1};
GUN_UPGRADE_END = 10;
MISC_UPGRADE_START = 11;
UPGRADE_LIST[11] = {Name:"Body Armor", Description:"An essential for any gun battle.", Cost:6000, Slot:2, Battle:2};
UPGRADE_LIST[12] = {Name:"Law Degree", Description:"Don't get sidetracked with legalities, learn how to bend the law.", Cost:10000, Slot:3, Pursuade:4};
UPGRADE_LIST[13] = {Name:"Pimp Jacket", Description:"You can't be a pimp without the jacket.", Cost:10000, Slot:4, Charisma:3};
UPGRADE_LIST[14] = {Name:"Ski Masks / Gloves", Description:"Lets them know you mean business and makes for a quick getaway.", Cost:500, Slot:5, Getaway:1, Pursuade:1};
MISC_UPGRADE_END = 14;
DEFAULT_PERSONALITY = {CASH_MINIMUM:1000, PROTECTIVE:1, HENCHMEN_GOAL:5, DRUG_MIN_CASH:1000, DRUG_BUDGET:0.5, DRUG_MAX_RISK:0.05, ROB_MAX_RISK:0.2, PIMP_MAX_RISK:0.4, DRUG_ACTION_PERCENTAGE:0.25, PIMP_ACTION_PERCENTAGE:0.25, ROB_ACTION_PERCENTAGE:0.25, DEMAND_ACTION_PERCENTAGE:0.25, Charisma:5, Battle:5, Getaway:5, Pursuade:5};
DRUG_PERSONALITY = {CASH_MINIMUM:500, PROTECTIVE:2, HENCHMEN_GOAL:3, DRUG_MIN_CASH:500, DRUG_BUDGET:0.6, PIMP_MAX_RISK:0.4, DRUG_MAX_RISK:0.2, ROB_MAX_RISK:0.05, DRUG_ACTION_PERCENTAGE:0.75, PIMP_ACTION_PERCENTAGE:0.05, ROB_ACTION_PERCENTAGE:0.1, DEMAND_ACTION_PERCENTAGE:0.1, Charisma:5, Battle:5, Getaway:5, Pursuade:5, Smuggle:7};
PIMP_PERSONALITY = {CASH_MINIMUM:2000, PROTECTIVE:2, HENCHMEN_GOAL:3, DRUG_MIN_CASH:1500, DRUG_BUDGET:0.25, PIMP_MAX_RISK:0.6, DRUG_MAX_RISK:0.2, ROB_MAX_RISK:0.05, DRUG_ACTION_PERCENTAGE:0.1, PIMP_ACTION_PERCENTAGE:0.6, ROB_ACTION_PERCENTAGE:0.15, DEMAND_ACTION_PERCENTAGE:0.15, Charisma:10, Battle:5, Getaway:3, Pursuade:7, Smuggle:3};
ROB_PERSONALITY = {CASH_MINIMUM:1000, PROTECTIVE:2, HENCHMEN_GOAL:5, DRUG_MIN_CASH:2000, DRUG_BUDGET:0.5, PIMP_MAX_RISK:0.6, DRUG_MAX_RISK:0.3, ROB_MAX_RISK:0.3, DRUG_ACTION_PERCENTAGE:0.1, PIMP_ACTION_PERCENTAGE:0.1, ROB_ACTION_PERCENTAGE:0.5, DEMAND_ACTION_PERCENTAGE:0.3, Charisma:3, Battle:7, Getaway:10, Pursuade:5, Smuggle:3};
DEMAND_PERSONALITY = {CASH_MINIMUM:2000, PROTECTIVE:3, HENCHMEN_GOAL:7, DRUG_BUDGET:0.3, PIMP_MAX_RISK:0.6, DRUG_MAX_RISK:0.2, ROB_MAX_RISK:0.3, DRUG_MIN_CASH:2000, DRUG_ACTION_PERCENTAGE:0.1, PIMP_ACTION_PERCENTAGE:0.1, ROB_ACTION_PERCENTAGE:0.6, DEMAND_ACTION_PERCENTAGE:0.2, Charisma:3, Battle:7, Getaway:5, Pursuade:7, Smuggle:3};
SYNDICATE_PERSONALITY = {CASH_MINIMUM:1000, PROTECTIVE:3, HENCHMEN_GOAL:10, DRUG_MIN_CASH:2000, DRUG_BUDGET:0.5, PIMP_MAX_RISK:0.7, DRUG_MAX_RISK:0.3, ROB_MAX_RISK:0.3, DRUG_ACTION_PERCENTAGE:0.25, PIMP_ACTION_PERCENTAGE:0.25, ROB_ACTION_PERCENTAGE:0.25, DEMAND_ACTION_PERCENTAGE:0.25, Charisma:10, Battle:10, Getaway:10, Pursuade:10, Smuggle:10};
EASY_PERSONALITY = {CASH_MINIMUM:500, PROTECTIVE:0, HENCHMEN_GOAL:3, DRUG_MIN_CASH:1000, DRUG_BUDGET:0.2, PIMP_MAX_RISK:0.4, DRUG_MAX_RISK:0.2, ROB_MAX_RISK:0.1, DRUG_ACTION_PERCENTAGE:0.25, PIMP_ACTION_PERCENTAGE:0.25, ROB_ACTION_PERCENTAGE:0.25, DEMAND_ACTION_PERCENTAGE:0.25, Charisma:3, Battle:3, Getaway:3, Pursuade:3, Smuggle:3};
PERSONALITY_LIST = new Array(DEFAULT_PERSONALITY, DRUG_PERSONALITY, PIMP_PERSONALITY, ROB_PERSONALITY, DEMAND_PERSONALITY, SYNDICATE_PERSONALITY, EASY_PERSONALITY);
HUMAN_TYPE = 1;
COMPUTER_TYPE = 2;
TYPE_NAMES.push({name:"Default Computer", type:COMPUTER_TYPE, personality:DEFAULT_PERSONALITY});
TYPE_NAMES.push({name:"Drug Computer", type:COMPUTER_TYPE, personality:DRUG_PERSONALITY});
TYPE_NAMES.push({name:"Pimp Computer", type:COMPUTER_TYPE, personality:PIMP_PERSONALITY});
TYPE_NAMES.push({name:"Rob Computer", type:COMPUTER_TYPE, personality:ROB_PERSONALITY});
TYPE_NAMES.push({name:"Protection Computer", type:COMPUTER_TYPE, personality:DEMAND_PERSONALITY});
TYPE_NAMES.push({name:"Syndicate Computer", type:COMPUTER_TYPE, personality:SYNDICATE_PERSONALITY});
TYPE_NAMES.push({name:"Easy Computer", type:COMPUTER_TYPE, personality:EASY_PERSONALITY});
COMPUTER_HQUNDERATTACK = 1;
COMPUTER_CASHLOW = 2;
COMPUTER_OPPOSITIONATTACK = 3;
COMPUTER_OPPOSITIONHQAVAILABLE = 4;
COMPUTER_PRIORITY_EVENTS = new Array();
COMPUTER_PRIORITY_EVENTS[COMPUTER_HQUNDERATTACK] = {debug:"HQ is available for oppostion!", pr:1, duplicates:false, maxattempts:-1};
COMPUTER_PRIORITY_EVENTS[COMPUTER_CASHLOW] = {debug:"Cash is low!", pr:2, duplicates:false, maxattempts:-1};
COMPUTER_PRIORITY_EVENTS[COMPUTER_OPPOSITIONATTACK] = {debug:"Opposition Attacked one of my locations!", pr:3, duplicates:true, maxattempts:3};
COMPUTER_PRIORITY_EVENTS[COMPUTER_OPPOSITIONHQAVAILABLE] = {debug:"Opposition's HQ is available!", pr:4, duplicates:true, maxattempts:5};
ComputerMemoryCompare = function (a, b) {
if (a.pr > b.pr) {
return(1);
}
if (a.pr == b.pr) {
return(0);
}
return(-1);
};
besthenchmen_comparefunc = function (a, b) {
HA = getHObj(a);
HB = getHObj(b);
if ((HA.atk + HA.hp) > (HB.atk + HB.hp)) {
return(-1);
}
if ((HA.atk + HA.hp) == (HB.atk + HB.hp)) {
return(0);
}
return(1);
};
DRIVE_BY_CARD = new Object();
DRIVE_BY_CARD.Action = function (l, p) {
Location[l].MC.DriveBy.play();
var _local1 = 0;
while (_local1 < PlayerData[p].Henchmen.Stock[l].length) {
hInd = PlayerData[p].Henchmen.Stock[l][_local1];
HitHenchmen(hInd, 1);
_local1++;
}
};
DRIVE_BY_CARD.Condition = function (l, cplayer) {
return(LocationData[l].Protected != cplayer);
};
BOMB_CARD = new Object();
BOMB_CARD.Action = function (l, p) {
LocationData[l].DELAY = 7;
};
BOMB_CARD.Condition = function (l, cplayer) {
return(cplayer != LocationData[l].Protected);
};
MATTRESS_CARD = new Object();
MATTRESS_CARD.Action = function (l, p) {
Location[l].MC.Mattress.play();
var _local1 = 0;
while (_local1 < PlayerData[p].Henchmen.Stock[l].length) {
hInd = PlayerData[p].Henchmen.Stock[l][_local1];
HitHenchmen(hInd, -1);
_local1++;
}
};
MATTRESS_CARD.Condition = function (l, cplayer) {
return(cplayer == LocationData[l].Protected);
};
DEBUG_MODE = false;
DEBUG_WATCH_LIST = new Array();
INIT_DEBUG_FLAG = false;
PROSTITUTE_COSTUME = {Hat:25, Body:10, Glasses:0, Beard:0, Gun:6};
PROSTITUTE_NAME_ARRAY = new Array("Hummer Handjob", "Tasty Treats", "Sandra Spunk", "Tight Cherry", "Asslee Bendover", "Rhonda Rimmer", "Marta de Moaner", "Luscious Lolita", "Venus Vegas", "Candy Coxx", "Jenny Jiggles", "Mary Muffmuncher", "Jasper Karma", "Tinker Seaview", "Sunny Rush", "Mitzy Chinchilla", "Jelana Jensen", "Melissa Lauren", "Jesse Capelli", "Adriana Sage", "Akira Lane", "Briana Carrera", "Amber Michaels", "Paige Anders", "Anita Dark", "Babe Sunny", "Krystal Steel", "Sheeza Mahn", "Kiana Sky", "Chloe Eden", "Jade Sensation", "Vivid Banks", "Briana Blaze", "Bunny Luv", "Busty Dusty", "Kendra Jade", "Kelly Moran", "Latina Mercedez", "Adele Stephens");
PROST_AGEMIN = 20;
PROST_ATTMIN = 1;
PROST_AGEMAX = 40;
PROST_ATTMAX = 20;
DEFAULT_PROSTITUTE = {Name:"Default", Age:40, Att:1, Owner:-1};
PROST_FUNCT = new Array(0.7, 0.75, 0.8, 0.9, 1, 0.9, 0.8, 0.75, 0.7, 0.6, 0.65, 0.6, 0.55, 0.5, 0.45, 0.45, 0.4, 0.35, 0.35, 0.3);
PROST_SURGERYCOST = 100;
PROST_BOOBCOST = 100;
LOW_RISK_RACKET = 1;
MID_RISK_RACKET = 5;
HIGH_RISK_RACKET = 8;
LOW_INPUT_RACKET = 10000;
MID_INPUT_RACKET = 20000;
HIGH_INPUT_RACKET = 30000;
LOW_OUTPUT_RACKET = 200;
MID_OUTPUT_RACKET = 400;
HIGH_OUTPUT_RACKET = 600;
HIJACK_RACKET = new Object();
HIJACK_RACKET.NAME = "Hijacking Racket";
HIJACK_RACKET.DESC = "Workers hijack cargo tricks on major highways and sell cargo. High risk, good reward.";
HIJACK_RACKET.COST = LOW_INPUT_RACKET;
HIJACK_RACKET.RISK = HIGH_RISK_RACKET;
HIJACK_RACKET.REWARD = MID_OUTPUT_RACKET;
HIJACK_RACKET.Win = function (p) {
Racket_AddMoney(p, this);
};
HIJACK_RACKET.Lose = function (p) {
r = Math.random();
if (r < 0.5) {
_root.NewPopUp("Robbery Failed", "When your racket thieves tried to hijack, the driver fought back and stopped the robbery", _root.MONEY_ICON);
} else {
_root.NewPopUp("Robbery Failed", "Cops bust into your Racket workshop with your hijacked goods", _root.POLICE_ICON);
Racket_LoseMoney(p, this);
}
};
MONEYLAUNDER_RACKET = new Object();
MONEYLAUNDER_RACKET.NAME = "Money Launderers";
MONEYLAUNDER_RACKET.DESC = "Accountants try to set up fake businesses to launder money through.";
MONEYLAUNDER_RACKET.COST = LOW_INPUT_RACKET;
MONEYLAUNDER_RACKET.RISK = LOW_RISK_RACKET;
MONEYLAUNDER_RACKET.Win = function (p) {
Env.PoRisk = Env.PoRisk - 1;
if (Env.PoRisk < 0) {
Env.PoRisk = 0;
}
};
MONEYLAUNDER_RACKET.Lose = function (p) {
};
STOLENDEALER_RACKET = new Object();
STOLENDEALER_RACKET.NAME = "Stolen Car Dealership";
STOLENDEALER_RACKET.DESC = "Workers steal and break into cars and then sell the cars and equipment at this dealership.";
STOLENDEALER_RACKET.COST = HIGH_INPUT_RACKET;
STOLENDEALER_RACKET.RISK = MID_RISK_RACKET;
STOLENDEALER_RACKET.REWARD = MID_OUTPUT_RACKET;
STOLENDEALER_RACKET.Win = function (p) {
Racket_AddMoney(p, this);
};
STOLENDEALER_RACKET.Lose = function (p) {
NewPopUp("Dealer Caught", "Customer found out his car was stolen, you destroy the car and give him his money back", _root.MONEY_ICON);
Racket_LoseMoney(p, this);
};
IDENTITYTHEFT_RACKET = new Object();
IDENTITYTHEFT_RACKET.NAME = "Identity Theft";
IDENTITYTHEFT_RACKET.DESC = "Workers steal Credit Cards, Drivers Licences, Passports and sell them on the street.";
IDENTITYTHEFT_RACKET.COST = LOW_INPUT_RACKET;
IDENTITYTHEFT_RACKET.RISK = HIGH_RISK_RACKET;
IDENTITYTHEFT_RACKET.REWARD = MID_OUTPUT_RACKET;
IDENTITYTHEFT_RACKET.Win = function (p) {
Racket_AddMoney(p, this);
};
IDENTITYTHEFT_RACKET.Lose = function (p) {
NewPopUp("Dealer Caught", ("Cops catch one of your customers using your id from your racket, you gotta pay $" + (this.REWARD * 2)) + " to cover your trail!", _root.MONEY_ICON);
Racket_LoseMoney(p, this);
};
LOANSHARK_RACKET = new Object();
LOANSHARK_RACKET.NAME = "Loan Shark";
LOANSHARK_RACKET.DESC = "Offer loans to anyone and everyone, offer high interest and take action if someone doesn't pay.";
LOANSHARK_RACKET.COST = HIGH_INPUT_RACKET;
LOANSHARK_RACKET.RISK = LOW_RISK_RACKET;
LOANSHARK_RACKET.REWARD = MID_OUTPUT_RACKET;
LOANSHARK_RACKET.Win = function (p) {
Racket_AddMoney(p, this);
};
LOANSHARK_RACKET.Lose = function (p) {
NewPopUp("Bled Dry", "One of your dependant loaners can't pay his bills, one of your henchmen kills him but couldn't find any cash to cover his debt.", _root.MONEY_ICON);
Racket_LoseMoney(p, this);
};
BOOKIE_RACKET = new Object();
BOOKIE_RACKET.NAME = "Bookie";
BOOKIE_RACKET.DESC = "Offer sports, news, miscellaneous bets to gamblers, but use henchmen to hustle delequants into paying what they owe.";
BOOKIE_RACKET.COST = MID_INPUT_RACKET;
BOOKIE_RACKET.RISK = LOW_RISK_RACKET;
BOOKIE_RACKET.REWARD = MID_OUTPUT_RACKET;
BOOKIE_RACKET.Win = function (p) {
Racket_AddMoney(p, this);
};
BOOKIE_RACKET.Lose = function (p) {
NewPopUp("Bled Dry", "One of your dependant loaners can't pay his bills, one of your henchmen kills him but couldn't find any cash to cover his debt.", _root.MONEY_ICON);
Racket_LoseMoney(p, this);
};
COUNTERFEITER_RACKET = new Object();
COUNTERFEITER_RACKET.NAME = "Counterfeiters";
COUNTERFEITER_RACKET.DESC = "Create counterfeit money and commercial products and offer them on the streets for minimal value.";
COUNTERFEITER_RACKET.COST = LOW_INPUT_RACKET;
COUNTERFEITER_RACKET.RISK = LOW_RISK_RACKET;
COUNTERFEITER_RACKET.REWARD = LOW_OUTPUT_RACKET;
COUNTERFEITER_RACKET.Win = function (p) {
Racket_AddMoney(p, this);
};
COUNTERFEITER_RACKET.Lose = function (p) {
NewPopUp("Undercover", "One of your counterfeit products was seized by an undercover cop, the seller go nailed but you cover your tracks.", _root.MONEY_ICON);
Racket_LoseMoney(p, this);
};
DRUGSTOCK_RACKET = new Object();
DRUGSTOCK_RACKET.NAME = "Drug Stockpile";
DRUGSTOCK_RACKET.DESC = "Clear out a hiding place to store your drugs and offer a hiding place for drug money. Will help you do bigger drug deals.";
DRUGSTOCK_RACKET.COST = MID_INPUT_RACKET;
DRUGSTOCK_RACKET.RISK = LOW_RISK_RACKET;
DRUGSTOCK_RACKET.REWARD = LOW_OUTPUT_RACKET;
DRUGSTOCK_RACKET.AttributePlus = "Smuggle";
DRUGSTOCK_RACKET.Win = function (p) {
};
DRUGSTOCK_RACKET.Lose = function (p) {
NewPopUp("Stockpile Uncovered", "One of your drug stockpiles was uncovered by officers. They take a $2000 Bribe to keep quiet", _root.MONEY_ICON);
Racket_LoseMoney(p, this);
};
WHOREHOUSE_RACKET = new Object();
WHOREHOUSE_RACKET.NAME = "Whore House";
WHOREHOUSE_RACKET.DESC = "Offer a back alley strip joint with happy endings. Also allows your prostitutes to take clients back to a safe place.";
WHOREHOUSE_RACKET.COST = HIGH_INPUT_RACKET;
WHOREHOUSE_RACKET.RISK = LOW_RISK_RACKET;
WHOREHOUSE_RACKET.REWARD = LOW_OUTPUT_RACKET;
WHOREHOUSE_RACKET.AttributePlus = "Charisma";
WHOREHOUSE_RACKET.Win = function (p) {
Racket_AddMoney(p, this);
};
WHOREHOUSE_RACKET.Lose = function (p) {
NewPopUp("Whore House Uncovered", "One of your drug stockpiles was uncovered by officers. They take a $2000 Bribe to keep quiet", _root.MONEY_ICON);
Racket_LoseMoney(p, this);
};
SAFEHOUSE_RACKET = new Object();
SAFEHOUSE_RACKET.NAME = "Safe House";
SAFEHOUSE_RACKET.DESC = "A Good place for your henchmen to lay low after crimes. Helps with getaways.";
SAFEHOUSE_RACKET.COST = LOW_INPUT_RACKET;
SAFEHOUSE_RACKET.RISK = 0;
SAFEHOUSE_RACKET.REWARD = LOW_OUTPUT_RACKET;
SAFEHOUSE_RACKET.AttributePlus = "Getaway";
SAFEHOUSE_RACKET.Win = function (p) {
};
SAFEHOUSE_RACKET.Lose = function (p) {
};
DOCTOR_RACKET = new Object();
DOCTOR_RACKET.NAME = "Silent Doctor";
DOCTOR_RACKET.DESC = "A Doctor your Henchmen can visit to. All Henchmen in this location gain Health every turn.";
DOCTOR_RACKET.COST = LOW_INPUT_RACKET;
DOCTOR_RACKET.RISK = 0;
DOCTOR_RACKET.AttributePlus = "Getaway";
DOCTOR_RACKET.Win = function (p, l) {
var _local2 = PlayerData[p].Henchmen.Stock[l];
for (i in _local2) {
var _local1 = getHObj(_local2[i]);
healHenchmen(_local1, 1);
}
};
DOCTOR_RACKET.Lose = function (p, l) {
};
HACKER_RACKET = new Object();
HACKER_RACKET.NAME = "Hackers";
HACKER_RACKET.DESC = "Offer state-of-the-art computer environment and protection to hackers that can steal from various websites and/or individuals";
HACKER_RACKET.COST = HIGH_INPUT_RACKET;
HACKER_RACKET.RISK = MID_RISK_RACKET;
HACKER_RACKET.REWARD = HIGH_OUTPUT_RACKET;
HACKER_RACKET.Win = function (p) {
Racket_AddMoney(p, this);
};
HACKER_RACKET.Lose = function (p) {
NewPopUp("Hacker Caught", "One of your hackers was caught stealing from an online bank. You pay his bail of $5000", _root.MONEY_ICON);
Racket_LoseMoney(p, this);
};
ARMORY_RACKET = new Object();
ARMORY_RACKET.NAME = "Gun Selling";
ARMORY_RACKET.DESC = "Offer weapons without registration.";
ARMORY_RACKET.COST = MID_INPUT_RACKET;
ARMORY_RACKET.RISK = HIGH_RISK_RACKET;
ARMORY_RACKET.REWARD = MID_OUTPUT_RACKET;
ARMORY_RACKET.Win = function (p) {
Racket_AddMoney(p, this);
};
ARMORY_RACKET.Lose = function (p) {
NewPopUp("Seller Caught", "One of your Gun Salesman was caught in the act, pay $ to cover your trail", _root.MONEY_ICON);
Racket_LoseMoney(p, this);
};
UNION_RACKET = new Object();
UNION_RACKET.NAME = "Union Whip";
UNION_RACKET.DESC = "Run some local Manufacturing Unions. Make sure members pay their dues, and do the 'negotiating' with management when the workers aren't treated fairly. The public loves this.";
UNION_RACKET.COST = LOW_INPUT_RACKET;
UNION_RACKET.RISK = LOW_RISK_RACKET;
UNION_RACKET.REWARD = LOW_OUTPUT_RACKET;
UNION_RACKET.AttributePlus = "Align";
UNION_RACKET.Win = function (p) {
Racket_AddMoney(p, this);
};
UNION_RACKET.Lose = function (p) {
};
RACKET_ARRAY = new Array(HIJACK_RACKET, MONEYLAUNDER_RACKET, STOLENDEALER_RACKET, IDENTITYTHEFT_RACKET, LOANSHARK_RACKET, BOOKIE_RACKET, COUNTERFEITER_RACKET, DRUGSTOCK_RACKET, WHOREHOUSE_RACKET, DOCTOR_RACKET, SAFEHOUSE_RACKET, HACKER_RACKET, ARMORY_RACKET, UNION_RACKET);
EXIT_GAME = new Object();
EXIT_GAME.Name = "Exit Game";
EXIT_GAME.RISK = 0;
EXIT_GAME.Win = function () {
RemoveInterface();
gotoAndPlay (61);
};
BRIBE_ACTION = {title:"Bribe", link:"BribeAction"};
PROTECT_ACTION = {title:"Protect", link:"AssetProtect"};
DEMAND_ACTION = {title:"Demand", link:"DemandAction"};
RACKET_ACTION = {title:"Racket", link:"RacketInfo"};
PICKUP_ACTION = {title:"Pickup", link:"PickupAction"};
ROB_ACTION = {title:"Robbery", link:"RobberyAction"};
ATTACK_ACTION = {title:"Takeover", link:"AttackAction"};
DRIVEBY_ACTION = {title:"Drive-By", link:"DrivebyAction"};
ALL_ACTIONS = new Object();
LEVEL1_ACTIONS = {Attack:1, Driveby:1, Bribe:1, Protect:1, Racket:1, Pickup:1, Demand:1};
LEVEL2_ACTIONS = {Attack:1, Driveby:1, Bribe:1, Protect:1, Racket:1};
LEVEL3_ACTIONS = {Attack:1, Driveby:1, Protect:1, Racket:1};
LEVEL4_ACTIONS = {Driveby:1, Racket:1};
DEFAULT_MASK = new Object();
DEFAULT_MASK.ActionMask = ALL_ACTIONS;
DEFAULT_MASK.SlotMask = 13;
DEFAULT_MASK.GenLimit = 5;
SANDBOX_OBJECTIVE = new Object();
SANDBOX_OBJECTIVE.Name = "Assault";
SANDBOX_OBJECTIVE.Description = 2;
SANDBOX_OBJECTIVE.Mask = DEFAULT_MASK;
SANDBOX_OBJECTIVE.DailyCheck = function () {
return(true);
};
DEFAULT_OBJECTIVE = new Object();
DEFAULT_OBJECTIVE.Name = "Assault";
DEFAULT_OBJECTIVE.Description = 1;
DEFAULT_OBJECTIVE.Mask = DEFAULT_MASK;
DEFAULT_OBJECTIVE.Init = function () {
};
DEFAULT_OBJECTIVE.DailyCheck = function () {
var _local2 = 0;
var _local3 = 0;
var _local1 = 1;
while (_local1 <= MAX_PLAYERS) {
if (LocationData[PlayerHQs[_local1]].Protected == _local1) {
_local2++;
_local3 = _local1;
if (_local2 > 1) {
break;
}
}
_local1++;
}
if (_local2 <= 0) {
MissionComplete("There was an error. No Players left standing.");
} else {
if (_local2 == 1) {
MissionComplete(PlayerData[_local3].Name + " has won the match!");
return(false);
}
return(true);
}
};
MISSION_1_MASK = new Object();
MISSION_1_MASK.ActionMask = LEVEL1_ACTIONS;
MISSION_1_MASK.SlotMask = 1;
MISSION_1_MASK.GenLimit = 0;
MISSION_1 = new Object();
MISSION_1.Name = "Straight Outta Compton";
MISSION_1.Description = 3;
MISSION_1.Restriction = "You can only ROB and PUSH DRUGS";
MISSION_1.Mask = MISSION_1_MASK;
MISSION_1.Init = function () {
this.InitCash = PlayerData[1].Cash;
};
MISSION_1.DailyCheck = function () {
if (PlayerData[1].Cash >= (this.InitCash + 1000)) {
PlayerData[1].Cash = PlayerData[1].Cash - 1000;
CompleteMission(1);
MissionComplete("You've sucessfully made $1000!");
return(false);
}
if (Env.dat > 30) {
return(false);
}
return(true);
};
MISSION_2_MASK = new Object();
MISSION_2_MASK.ActionMask = LEVEL2_ACTIONS;
MISSION_2_MASK.SlotMask = 1;
MISSION_2_MASK.GenLimit = 0;
MISSION_2 = new Object();
MISSION_2.Name = "It's Hard Out Here for a Pimp";
MISSION_2.Description = 4;
MISSION_2.Objective = "gain $2000 in 30 days.";
MISSION_2.Restrictions = "You can only PUSH DRUGS and PIMP";
MISSION_2.Mask = MISSION_2_MASK;
MISSION_2.Init = function () {
this.InitCash = PlayerData[1].Cash;
};
MISSION_2.DailyCheck = function () {
if (PlayerData[1].Cash >= (this.InitCash + 2000)) {
PlayerData[1].Cash = PlayerData[1].Cash - 2000;
CompleteMission(2);
MissionComplete("You've sucessfully made $2000");
return(false);
}
if (Env.dat > 30) {
return(false);
}
return(true);
};
MISSION_3_MASK = new Object();
MISSION_3_MASK.ActionMask = LEVEL3_ACTIONS;
MISSION_3_MASK.SlotMask = 1;
MISSION_3_MASK.GenLimit = 5;
MISSION_3 = new Object();
MISSION_3.Name = "Keep your friends close...";
MISSION_3.Description = 5;
MISSION_3.Mask = MISSION_3_MASK;
MISSION_3.GenLimit = 5;
MISSION_3.Init = function () {
};
MISSION_3.DailyCheck = function () {
if ((PlayerData[1].Power >= 30) && (PlayerData[1].Henchmen.Stock[0].length >= 10)) {
CompleteMission(3);
MissionComplete("You're now ready to attack Vito!");
} else {
if (Env.dat > 30) {
return(false);
}
return(true);
}
};
MISSION_4_MASK = new Object();
MISSION_4_MASK.ActionMask = LEVEL4_ACTIONS;
MISSION_4_MASK.SlotMask = 1;
MISSION_4_MASK.GenLimit = 5;
VITOBAR_INDEX = 9;
MISSION_4 = new Object();
MISSION_4.Name = "Crossing the Line";
MISSION_4.Description = 6;
MISSION_4.Mask = MISSION_4_MASK;
MISSION_4.GenLimit = 5;
MISSION_4.Init = function () {
};
MISSION_4.DailyCheck = function () {
if (LocationData[VITOBAR_INDEX].Protected == 1) {
CompleteMission(4);
MissionComplete("You've sucessfully killed Vito!");
return(false);
}
return(true);
};
MISSION_5_ASSET_GOAL = new Array(3, 4, 8, 6, 9);
MISSION_5 = new Object();
MISSION_5.Name = "Painting the Town Red";
MISSION_5.Description = 7;
MISSION_5.Mask = MISSION_4_MASK;
MISSION_5.GenLimit = 10;
MISSION_5.InitVar = function () {
};
MISSION_5.InitMap = function () {
AddAsset(PlayerData[1], LocationData[VITOBAR_INDEX], 200, true);
};
MISSION_5.DailyCheck = function () {
var _local2 = 0;
var _local1 = 0;
while (_local1 < MISSION_5_ASSET_GOAL.length) {
if (LocationData[MISSION_5_ASSET_GOAL[_local1]].Protected == 1) {
_local2++;
}
_local1++;
}
if (_local2 >= MISSION_5_ASSET_GOAL.length) {
CompleteMission(5);
MissionComplete("You've sucessfully taken over Village Pines!");
return(false);
}
return(true);
};
DEMO_MAX_MISSION = 4;
MISSION_LIST = new Array();
MISSION_LIST.push(MISSION_1);
MISSION_LIST.push(MISSION_2);
MISSION_LIST.push(MISSION_3);
MISSION_LIST.push(MISSION_4);
MISSION_LIST.push(MISSION_5);
ROBBERY_EVENT = new Object();
ROBBERY_EVENT.Name = "Robbery";
ROBBERY_EVENT.Animation = "robbery";
ROBBERY_EVENT.AnimationParam = 1;
ROBBERY_EVENT.bRisk = 1;
ROBBERY_EVENT.bCash = 50;
ROBBERY_EVENT.getReward = function () {
return(this.rCash);
};
ROBBERY_EVENT.CalcRisk = function () {
this.RISK = _root.CalcRisk(this.PlayerNum, this.PScale, RISK_ROBBERY, 0);
return(this.RISK);
};
ROBBERY_EVENT.setCash = function (amt) {
this.rCash = amt;
var _local2 = this.rCash / this.DEFAULT_CASH;
this.PScale = this.LocObj.PScale * _local2;
};
ROBBERY_EVENT.Init = function (playNum, locNum) {
this.AnimationParam = PlayerData[playNum].Henchmen.Stock[0].length;
this.PlayerObj = PlayerData[playNum];
this.PlayerNum = playNum;
this.LocObj = LocationData[locNum];
this.LocNum = locNum;
this.PScale = this.LocObj.PScale;
this.DEFAULT_CASH = this.bCash * this.PScale;
this.setCash(this.bCash * this.PScale);
CalcAttributes(playNum);
this.playerName = this.PlayerObj.Name;
this.c1 = this.PlayerObj.Costume;
};
with (ROBBERY_EVENT) {
ROBBERY_EVENT.Win = function () {
_root.addMoney(this.PlayerObj, FIN_ROBBERY, this.rCash);
_root.NewPopUp("Completed " + this.Name, "You Successfully Robbed the Store for $" + this.rCash, _root.ROBBERY_ICON);
_root.addNews("Gunpoint Robbery", this.LocObj.Name + " Was Robbed buy unknown gang members.");
};
ROBBERY_EVENT.Lose = function () {
_root.NewFork("Failed " + this.Name, "The Clerk sets off an alarm!", _root.POLICE_ICON, ["Run Away", "Take the Money", "Shoot The Clerk & Take the Money"], [_root.RUN_ROB_EVENT, _root.TAKE_ROB_EVENT, _root.SHOOT_ROB_EVENT]);
};
}
RUN_ROB_EVENT = new Object();
RUN_ROB_EVENT.Name = "Run Away from the Cops";
RUN_ROB_EVENT.RISK = 70;
RUN_ROB_EVENT.SubEvent = 1;
RUN_ROB_EVENT.Win = function () {
NewPopUp("Ran Away", "The Cops don't show in time, you're home free", POLICE_ICON);
};
RUN_ROB_EVENT.Lose = function () {
NewPopUp("Caught", ("The Clerk tipped the Cops! The Cops surround you, you pay $" + ROBBERY_EVENT.rCash) + " for bail", POLICE_ICON);
_root.addMoney(ROBBERY_EVENT.PlayerObj, FIN_BAIL, -ROBBERY_EVENT.rCash);
};
TAKE_ROB_EVENT = new Object();
TAKE_ROB_EVENT.Name = "Take the Money";
TAKE_ROB_EVENT.RISK = 80;
TAKE_ROB_EVENT.SubEvent = 1;
TAKE_ROB_EVENT.Win = function () {
ROBBERY_EVENT.PlayerObj.align--;
_root.addMoney(ROBBERY_EVENT.PlayerObj, FIN_ROBBERY, ROBBERY_EVENT.rCash);
NewPopUp("Got Away", "You got all the money and the clerk's too scared to tip the cops", MONEY_ICON);
};
TAKE_ROB_EVENT.Lose = function () {
NewPopUp("Caught", ("The Cops surround you, you pay $" + (ROBBERY_EVENT.rCash * 2)) + " for robbery", POLICE_ICON);
_root.addMoney(ROBBERY_EVENT.PlayerObj, FIN_BAIL, (-ROBBERY_EVENT.rCash) * 2);
};
SHOOT_ROB_EVENT = new Object();
SHOOT_ROB_EVENT.Name = "Shoot the Clerk";
SHOOT_ROB_EVENT.RISK = 90;
SHOOT_ROB_EVENT.Animation = "robberykill";
SHOOT_ROB_EVENT.AnimationParam = 1;
SHOOT_ROB_EVENT.SubEvent = 1;
SHOOT_ROB_EVENT.CalcRisk = function () {
this.AnimationParam = ROBBERY_EVENT.PlayerObj.Henchmen.Stock[0].length;
this.c1 = ROBBERY_EVENT.PlayerObj.Costume;
};
SHOOT_ROB_EVENT.Win = function () {
ROBBERY_EVENT.PlayerObj.align--;
_root.addMoney(ROBBERY_EVENT.PlayerObj, FIN_ROBBERY, ROBBERY_EVENT.rCash);
NewPopUp("Got Away", "Clerk's dead, no one to tip the cops, you get the money and you're home free", DEMAND_ICON);
};
SHOOT_ROB_EVENT.Lose = function () {
ROBBERY_EVENT.PlayerObj.align--;
NewPopUp("Caught", ("The Cops surround you, you pay $" + (ROBBERY_EVENT.rCash * 3)) + " for assault and robbery", POLICE_ICON);
_root.addMoney(ROBBERY_EVENT.PlayerObj, FIN_BAIL, (-ROBBERY_EVENT.rCash) * 3);
};
BRIBE_EVENT = new Object();
BRIBE_EVENT.Name = "Bribe";
BRIBE_EVENT.RISK = 0;
BRIBE_EVENT.bCash = 500;
BRIBE_EVENT.getReward = null;
BRIBE_EVENT.CalcRisk = function () {
this.RISK = _root.CalcRisk(this.PlayerObj.Num, this.PScale, RISK_PURSUADE, 0);
return(this.RISK);
};
BRIBE_EVENT.setLevel = null;
BRIBE_EVENT.setPlayer = function (r) {
this.PlayerObj = r;
this.playerName = r.Name;
this.bCash = 500;
this.PScale = 20;
};
BRIBE_EVENT.setCash = function (amt) {
this.bCash = amt;
if (amt > 3000) {
this.PScale = 0;
} else if (amt < 500) {
this.PScale = 20;
} else {
var _local3 = (2500 - (amt - 500)) / 2500;
this.PScale = Math.round((2000 * _local3) * _local3) / 100;
}
};
with (BRIBE_EVENT) {
BRIBE_EVENT.Lose = function () {
_root.addMoney(this.PlayerObj, FIN_BAIL, -this.bCash);
_root.NewPopUp("Failed " + this.Name, ("Sheriff Nails you For Bribery! You Pay $" + this.bCash) + " for Bail.", _root.POLICE_ICON);
_root.addNews("Bribery on Judgement Hill?", this.playerName + "'s Leader Was Caught Trying to Bribe The Police Sheriff. Investigation Begins.");
};
BRIBE_EVENT.Win = function () {
_root.addNews("Investigation Cut Short", "A PR Rep at the Sheriff's Dept. has issued a statement saying that the recent Gangland Investigation's funding has been cut for Healthcare and Poverty Prevention");
_root.addMoney(this.PlayerObj, FIN_BRIBE, -this.bCash);
_root.Env.PoRisk = 0;
_root.NewPopUp("Completed " + this.Name, "Sheriff Takes the Money.", _root.HANDSHAKE_ICON);
};
}
BUYDRUG_EVENT = new Object();
BUYDRUG_EVENT.Name = "Buy Drugs";
BUYDRUG_EVENT.bRisk = 1;
BUYDRUG_EVENT.getReward = null;
BUYDRUG_EVENT.CalcRisk = function () {
this.RISK = _root.CalcRisk(this.PlayerObj.Num, DRUG_PSCALE_FUNC(this.COST), RISK_SMUGGLE, 0);
return(this.RISK);
};
BUYDRUG_EVENT.setDrug = function (r) {
this.DRUG = r;
};
BUYDRUG_EVENT.setAmount = function (r, c) {
this.AMOUNT = r;
this.COST = c * r;
this.VALUE = c;
this.dRISK = 1 + Math.floor(this.COST / 1000);
};
BUYDRUG_EVENT.setPlayer = function (r) {
this.PlayerObj = r;
this.playerName = r.Name;
};
with (BUYDRUG_EVENT) {
BUYDRUG_EVENT.Win = function () {
var _local4 = this.PlayerObj.Drug_Value[this.DRUG];
var _local3 = this.PlayerObj.Drug_Stock[this.DRUG];
this.PlayerObj.Drug_Value[this.DRUG] = (this.COST + (_local4 * _local3)) / (this.AMOUNT + _local3);
_root.addMoney(this.PlayerObj, FIN_DRUG, -this.COST);
this.PlayerObj.Drug_Stock[this.DRUG] = this.PlayerObj.Drug_Stock[this.DRUG] + this.AMOUNT;
_root.NewPopUp("Completed Purchase", (("You Purchased $" + this.COST) + " of ") + DRUG_NAMES[this.DRUG], _root.DRUG_ICON);
_root.addNews("Underground Drug Source?", ((((this.playerName + " Has reportedly Purchased $") + this.COST) + " of ") + DRUG_NAMES[this.DRUG]) + ". Police are investigating whether these allegations are true.");
};
BUYDRUG_EVENT.Lose = function () {
_root.addMoney(this.PlayerObj, FIN_BAIL, (-this.COST) * 0.5);
_root.NewPopUp("Failed to " + this.Name, "Police raid the deal! You Lost $" + (this.COST * 0.5), _root.POLICE_ICON);
_root.addNews("Police Drug Bust", (((this.playerName + " Was Caught Trading $") + this.COST) + " of ") + DRUG_NAMES[this.DRUG]);
};
}
SELLDRUG_EVENT = new Object();
SELLDRUG_EVENT.Name = "Sell Drugs";
SELLDRUG_EVENT.bRisk = 1;
SELLDRUG_EVENT.getReward = null;
SELLDRUG_EVENT.CalcRisk = function () {
this.RISK = _root.CalcRisk(this.PlayerObj.Num, DRUG_PSCALE_FUNC(this.COST), RISK_SMUGGLE, 0);
return(this.RISK);
};
SELLDRUG_EVENT.setDrug = function (r) {
this.DRUG = r;
};
SELLDRUG_EVENT.setAmount = function (r, c) {
this.AMOUNT = r;
this.COST = c * r;
this.VALUE = c;
};
SELLDRUG_EVENT.setPlayer = function (r) {
this.PlayerObj = r;
this.playerName = r.Name;
};
with (SELLDRUG_EVENT) {
SELLDRUG_EVENT.Win = function () {
_root.addMoney(this.PlayerObj, FIN_DRUG, this.COST);
this.PlayerObj.Drug_Stock[this.DRUG] = this.PlayerObj.Drug_Stock[this.DRUG] - this.AMOUNT;
_root.NewPopUp("Completed Purchase", (("You Sold $" + this.COST) + " of ") + DRUG_NAMES[this.DRUG], _root.DRUG_ICON);
_root.addNews((((this.playerName + " Sold $") + this.COST) + " of ") + DRUG_NAMES[this.DRUG]);
};
SELLDRUG_EVENT.Lose = function () {
_root.addMoney(this.PlayerObj, FIN_BAIL, (-this.COST) * 0.5);
_root.NewPopUp("Failed to " + this.Name, "Police raid the deal! You Lost $" + (this.COST * 0.5), _root.POLICE_ICON);
_root.addNews("Drug Bust", (((this.playerName + " Was Caught Selling $") + this.COST) + " of ") + DRUG_NAMES[this.DRUG]);
};
}
DEMAND_EVENT = new Object();
DEMAND_EVENT.Name = "Demand";
DEMAND_EVENT.bRisk = 10;
DEMAND_EVENT.getPowerNeeded = function () {
return(this.powerreq);
};
DEMAND_EVENT.CalcRisk = function () {
};
DEMAND_EVENT.setLevel = function (l) {
this.levelnum = l;
this.level = _root.LocationData[l];
this.pressure = LocationData[l].Pressure;
this.powerreq = LocationData[l].PScale * 20;
this.PScale = LocationData[l].PScale;
this.DefaultRevenue = this.powerreq * 2;
this.Revenue = this.DefaultRevenue;
};
DEMAND_EVENT.setCash = function (x) {
this.Revenue = x;
this.PScale = this.level.PScale * (this.Revenue / this.DefaultRevenue);
};
DEMAND_EVENT.getCash = function () {
return(this.Revenue);
};
DEMAND_EVENT.getPressurePerc = function () {
return(this.pressure / this.powerreq);
};
DEMAND_EVENT.getPressure = function () {
return(Math.floor((this.pressure * 100) / this.powerreq) + "%");
};
DEMAND_EVENT.setPlayer = function (p) {
CalcAttributes(p);
this.PlayerObj = _root.PlayerData[p];
this.PlayerNum = p;
this.playerName = r.Name;
this.intimidation = this.PlayerObj.Attributes.Intimidation;
this.intimidation = Math.min(this.intimidation, 10);
this.intimidation = this.intimidation + Math.round(Math.min(this.PlayerObj.Power / 10, 10));
};
with (DEMAND_EVENT) {
DEMAND_EVENT.Continue = function (Mod, cont) {
this.pressure = this.pressure + (5 * Mod);
LocationData[this.levelnum].Pressure = this.pressure;
if (_root.DEMAND_EVENT.pressure >= _root.DEMAND_EVENT.powerreq) {
this.Own();
} else {
_root.NewPopUp("Pressure Increased", (_root.LocationData[this.levelnum].Name + "'s Pressure Increased to ") + this.getPressure(), _root.DEMAND_ICON);
if (cont) {
this.Win();
}
}
};
DEMAND_EVENT.Win = function () {
perc = Math.round((this.pressure / this.powerreq) * 100);
if (this.PlayerObj.Henchmen.Stock[0].length > 0) {
_root.NewFork("Demand Protection", ("Choose a Course of Action\nThe Clerk has " + perc) + "% Pressure", _root.MONEY_ICON, ["Pursuade", "Trash Store", "Make him an offer he can't refuse"], [_root.DEMAND_PURSUADE, _root.DEMAND_TRASH, _root.DEMAND_ATTACK]);
} else {
_root.NewFork("Demand Protection", ("Choose a Course of Action\nThe Clerk has " + perc) + "% Pressure", _root.MONEY_ICON, ["Pursuade", "Trash Store"], [_root.DEMAND_PURSUADE, _root.DEMAND_TRASH]);
}
};
DEMAND_EVENT.Own = function () {
AddAsset(this.PlayerObj, _root.LocationData[this.levelnum], this.Revenue);
_root.NewPopUp("Completed " + this.Name, ("You now own " + _root.LocationData[this.levelnum].Name) + "!", _root.DEMAND_ICON);
_root.addNews("New Business Sponsor", (this.PlayerObj.Name + " Corp. Has signed a deal as a Co-Owner of ") + _root.LocationData[this.levelnum].Name);
if (this.HenchmenToMove) {
for (i in this.HenchmenToMove) {
MoveHenchmen(getHObj(this.HenchmenToMove[i]), this.PlayerObj, this.levelnum);
}
}
GO_TO_NEXT = true;
};
DEMAND_EVENT.Lose = function () {
trace("should never happen");
};
}
DEMAND_PURSUADE = new Object();
DEMAND_PURSUADE.Name = "Pursuade Demand";
DEMAND_PURSUADE.SubEvent = 1;
DEMAND_PURSUADE.CalcRisk = function () {
this.RISK = _root.CalcRisk(DEMAND_EVENT.PlayerObj.Num, DEMAND_EVENT.PScale * 0.5, RISK_PURSUADE, 0);
return(this.RISK);
};
DEMAND_PURSUADE.Win = function () {
DEMAND_EVENT.Continue(5, true);
};
DEMAND_PURSUADE.Lose = function () {
NewPopUp("Failed", "The Shop Owner Refused and Calls Police", _root.POLICE_ICON);
GO_TO_NEXT = true;
};
DEMAND_TRASH = new Object();
DEMAND_TRASH.Name = "Trash Demand";
DEMAND_TRASH.SubEvent = 1;
DEMAND_TRASH.CalcRisk = function () {
this.RISK = _root.CalcRisk(DEMAND_EVENT.PlayerObj.Num, DEMAND_EVENT.PScale, RISK_INTIMIDATION, 0);
return(this.RISK);
};
DEMAND_TRASH.Win = function () {
DEMAND_EVENT.Continue(9, true);
};
DEMAND_TRASH.Lose = function () {
NewPopUp("Failed", "The Shop Owner Refused and Calls Police", _root.POLICE_ICON);
addNews("Violent Vandalism", ("The owner of " + DEMAND_EVENT.level.Name) + " has filed a police report complaining about some roughians trying to get him to pay him money to gang-related activities.");
GO_TO_NEXT = true;
};
DEMAND_ATTACK = new Object();
DEMAND_ATTACK.Name = "Trash Demand";
DEMAND_ATTACK.SubEvent = 1;
DEMAND_ATTACK.CalcRisk = function () {
this.RISK = 0;
return(0);
};
DEMAND_ATTACK.Win = function () {
tmpCHArr = new Array();
var _local4 = LocationData[DEMAND_EVENT.levelnum];
var _local2 = _local4.PScale;
tmpCHArr.push(GenerateHenchmen());
tmpBattle = 1;
if (_local2 > 5) {
tmpBattle = 3;
}
if (_local2 > 10) {
tmpBattle = 4;
}
if (_local2 > 14) {
tmpBattle = 5;
}
if (_local2 > 3) {
tmpCHArr.push(GenerateHenchmen());
}
if (_local2 > 7) {
tmpCHArr.push(GenerateHenchmen());
}
if (_local2 > 10) {
for (var _local3 in tmpCHArr) {
tmpCHArr[_local3].hp = 5;
tmpCHArr[_local3].atk = 3;
}
}
tmpCostume = GenerateCivilian();
tmpCostume.Gun = tmpBattle;
FactionBattle(_root.DEMAND_ATTACK, _root.DEMAND_EVENT.PlayerObj, {Costume:tmpCostume, Attributes:{Battle:tmpBattle}}, _root.DEMAND_EVENT.PlayerObj.Henchmen.Stock[0], tmpCHArr);
};
DEMAND_ATTACK.WinBattle = function (w) {
if (w == "l") {
NewPopUp("Won", "Attack went successfully", DEMAND_ICON);
DEMAND_EVENT.Continue(10);
} else {
DEMAND_ATTACK.Lose();
}
GO_TO_NEXT = true;
};
DEMAND_ATTACK.Lose = function () {
addNews("Shopowner Vigilante Justice", ("The owner of " + DEMAND_EVENT.level.Name) + " fought back and drove away some violent gang-members. Police have filed as self-defense.");
NewPopUp("Failed", "The Shop Owner Lives and Calls Police", _root.POLICE_ICON);
GO_TO_NEXT = true;
};
RISK_DEMAND = {Power:0.5, Pursuade:0.25, Intimidation:0.25};
COMP_DEMAND_EVENT = new Object();
COMP_DEMAND_EVENT.Name = "Computer Demand";
COMP_DEMAND_EVENT.CalcRisk = function () {
this.RISK = CalcRisk(this.PlayerObj.Num, this.PScale, RISK_DEMAND, 0);
return(this.RISK);
};
COMP_DEMAND_EVENT.setLevel = function (l) {
this.levelnum = l;
this.level = _root.LocationData[l];
this.PScale = 5 + LocationData[l].PScale;
};
COMP_DEMAND_EVENT.setPlayer = function (p) {
CalcAttributes(p);
this.PlayerObj = _root.PlayerData[p];
this.PlayerNum = p;
this.playerName = r.Name;
this.intimidation = this.PlayerObj.Attributes.Intimidation;
this.intimidation = Math.min(this.intimidation, 10);
this.intimidation = this.intimidation + Math.round(Math.min(this.PlayerObj.Power / 10, 10));
};
with (COMP_DEMAND_EVENT) {
COMP_DEMAND_EVENT.Win = function () {
AddAsset(this.PlayerObj, _root.LocationData[this.levelnum], this.PScale * 4);
_root.NewPopUp("Completed " + this.Name, ("You now own " + _root.LocationData[this.levelnum].Name) + "!", _root.DEMAND_ICON);
_root.addNews("New Business Sponsor", (this.PlayerObj.Name + " Corp. Has signed a deal as a Co-Owner of ") + _root.LocationData[this.levelnum].Name);
GO_TO_NEXT = true;
};
COMP_DEMAND_EVENT.Lose = function () {
};
}
BUYSHOT_PICKUP_EVENT = {PScale:1.1, Dist:RISK_CHARISMA, Drunk:5, Love:11};
BUYBEER_PICKUP_EVENT = {PScale:0.8, Dist:RISK_CHARISMA, Drunk:3, Love:10};
TALK_PICKUP_EVENT = {PScale:1, Dist:RISK_PIMP, Drunk:0, Love:10};
COMPLIMENT_PICKUP_EVENT = {PScale:0.5, Dist:RISK_PIMP, Drunk:0, Love:2};
DANCE_PICKUP_EVENT = {PScale:1.5, Dist:RISK_CHARISMA, Drunk:0, Love:15};
LEAVE_PICKUP_EVENT = {Leave:1};
PICKUP_EVENT = new Object();
PICKUP_EVENT.Name = "Pick Up";
PICKUP_EVENT.NoRiskUp = true;
PICKUP_EVENT.bRisk = 20;
PICKUP_EVENT.SubCalcRisk = function () {
this.RISK = _root.CalcRisk(this.PlayerObj.Num, this.PScale, RISK_CHARISMA, 0);
return(this.RISK);
};
PICKUP_EVENT.CalcRisk = function () {
this.RISK = 0;
return(0);
};
PICKUP_EVENT.setPlayer = function (r, l) {
this.PlayerObj = r;
this.playerName = r.Name;
this.levelnum = l;
};
PICKUP_EVENT.setTarget = function (tar) {
this.Prostitute = new Object();
for (i in tar) {
this.Prostitute[i] = tar[i];
}
this.PScale = ((20 - (this.Prostitute.Age - PROST_AGEMIN)) / 2.5) + ((this.Prostitute.Att / PROST_ATTMAX) * 10);
this.Love = 5;
this.MaxLove = 10 + (tar.Att * 3);
this.Drunk = 0;
this.MaxDrunk = 5 + (tar.Age / 1.5);
this.Mistakes = 0;
this.MaxMistakes = Math.ceil((15 - this.PScale) / 4);
trace("Age : " + tar.Age);
trace("Att : " + tar.Att);
trace("PScale : " + this.PScale);
trace("Mistakes : " + this.MaxMistakes);
trace("Drunk : " + this.MaxDrunk);
trace("Love : " + this.MaxLove);
};
with (PICKUP_EVENT) {
PICKUP_EVENT.Open = function () {
viewSpecial(this.PlayerObj.Num, "pickup", LocationData[this.levelnum].Name);
};
PICKUP_EVENT.CalcActionRisk = function (Action) {
return(_root.CalcRisk(this.PlayerObj.Num, this.PScale * Action.PScale, Action.Dist, 0));
};
PICKUP_EVENT.doAction = function (Action) {
var _local3;
if (Action.Leave != undefined) {
this.Lose();
}
RISK = this.CalcActionRisk(Action);
trace("Action Risk : " + RISK);
var _local5 = Math.random();
trace("Random Value : " + _local5);
if (_local5 > (RISK / 100)) {
this.Love = this.Love + Action.Love;
this.Drunk = this.Drunk + Action.Drunk;
_local3 = true;
} else {
this.Drunk = this.Drunk + Action.Drunk;
this.Mistakes++;
_local3 = false;
}
if (this.getLove() > 1) {
this.Love = this.MaxLove;
this.Pickup();
}
if (this.Drunk > this.MaxDrunk) {
_root.NewPopUp("Failed " + this.Name, "She got too drunk and her friends had to take her home...", _root.LIQUOR_ICON);
_local3 = false;
this.Lose();
}
if (this.Mistakes >= this.MaxMistakes) {
_root.NewPopUp("Failed " + this.Name, "She refused and left.", _root.REJECTED_ICON);
_local3 = false;
this.Lose();
}
return(_local3);
};
PICKUP_EVENT.getStatus = function () {
drunk_status = "";
if (this.Drunk > (0.75 * this.MaxDrunk)) {
return("She looks pretty wasted, too much alcohol and she may head home early!");
}
if (this.Drunk > (0.5 * this.MaxDrunk)) {
drunk_status = "She's tipsy drunk, but still coherent and ";
} else if (this.Drunk > (0.25 * this.MaxDrunk)) {
drunk_status = "She's starting to feel a buzz and ";
}
if ((this.MaxMistakes - this.Mistakes) <= 1) {
return(drunk_status + "she looks kind of annoyed at you... she may leave soon.");
}
if (this.getLove() < 0.25) {
return(drunk_status + "she shows little interest, her eyes are wondering. She may leave soon.");
}
if (this.getLove() < 0.5) {
return(drunk_status + "she's somewhat interested, she's staying here with you...");
}
if (this.getLove() < 0.75) {
return(drunk_status + "she's definetly interested, just needs a little more to get her completely interested");
}
return("She's lovin' it, it may be smart to take her home soon.");
};
PICKUP_EVENT.getLove = function () {
return(this.Love / this.MaxLove);
};
PICKUP_EVENT.Pickup = function () {
_root.HireProstitute(this.Prostitute, this.PlayerObj.Num);
_root.LocationData[this.levelnum].Prostitutes--;
_root.NewPopUp("Completed " + this.Name, "You now have another prositute", _root.GIRL_ICON);
GO_TO_NEXT = true;
_root.OnPopUpClosed();
};
PICKUP_EVENT.TakeHome = function () {
RISK = 0.4 - ((this.getLove() - 0.6) / 0.4);
if (this.getLove() > 0.9) {
RISK = 0;
}
trace("Take Home Risk : " + RISK);
if (Math.random() >= RISK) {
PICKUP_EVENT.Win();
} else {
PICKUP_EVENT.Lose();
NewPopUp("Failed", "Even after all that work, she refused and left... Get her love meter higher next time.", REJECTED_ICON);
}
};
PICKUP_EVENT.Win = function () {
this.Pickup();
};
PICKUP_EVENT.Lose = function () {
_root.OnPopUpClosed();
GO_TO_NEXT = true;
};
}
DRIVEBY_GAME = new Object();
DRIVEBY_GAME.Name = "Drive By";
DRIVEBY_GAME.COST = 500;
DRIVEBY_GAME.INITTIME = 20;
DRIVEBY_GAME.CalcRisk = function () {
this.RISK = 0;
return(0);
};
DRIVEBY_GAME.setLevel = function (l) {
this.RISK = 0;
this.levelnum = l;
this.level = _root.LocationData[l];
this.PScale = LocationData[l].PScale;
this.OppNum = LocationData[l].Protected;
this.OppObj = PlayerData[this.OppNum];
};
DRIVEBY_GAME.getCost = function () {
return(this.COST);
};
DRIVEBY_GAME.setPlayer = function (p) {
CalcAttributes(p);
this.PlayerObj = _root.PlayerData[p];
this.PlayerNum = p;
this.playerName = r.Name;
};
DRIVEBY_GAME.Win = function () {
NewPopUpObj({ani:"DriveByGame", c1:this.PlayerObj.Costume, c2:this.OppObj.Costume});
};
DRIVEBY_GAME.WinGame = function (points, hits) {
damage = 0;
NewPopUp("Drive-by Complete", (((("Points : " + points) + "\nHits : ") + hits) + "\nDamage : ") + damage, HENCHMEN_ICON);
};
ATTACK_EVENT = new Object();
ATTACK_EVENT.Name = "Attack";
ATTACK_EVENT.bRisk = 10;
ATTACK_EVENT.SubEvent = 1;
ATTACK_EVENT.CalcRisk = function (EnvRisk, PlayerPower) {
RISK = 0;
return("?");
};
ATTACK_EVENT.setLevel = function (l) {
this.levelnum = l;
this.level = _root.LocationData[l];
trace("---- Setting Right Player");
trace("right Player number : " + this.level.Protected);
RP = this.level.Protected;
if (RP == undefined) {
_root.errorMsg("Right Player Undefined");
}
CalcAttributes(RP);
this.RPlayerObj = _root.PlayerData[RP];
this.RPlayerNum = RP;
};
ATTACK_EVENT.getPScale = function () {
var _local2 = this.LPlayerObj.Henchmen.Stock[0];
var _local3 = this.RPlayerObj.Henchmen.Stock[this.levelnum];
trace(debugVar(_local2, "LeftPlayer"));
trace(debugVar(_local3, "RightPlayer"));
ttlhp = 0;
ttlatk = 0;
for (var _local4 in _local2) {
ttlhp = ttlhp + getHObj(_local2[_local4]).hp;
ttlatk = ttlatk + getHObj(_local2[_local4]).atk;
}
LH_POINTS = ((ttlhp + ttlattk) / _local2.length) * Math.min(3, _local2.length);
trace("LH POINTS : " + LH_POINTS);
ttlhp = 0;
ttlatk = 0;
for (var _local4 in _local3) {
ttlhp = ttlhp + getHObj(_local3[_local4]).hp;
ttlatk = ttlatk + getHObj(_local3[_local4]).atk;
}
RH_POINTS = ttlhp + ttlattk;
trace("RH POINTS : " + RH_POINTS);
return(LH_POINTS - RH_POINTS);
};
ATTACK_EVENT.setHenchmen = function (HArr) {
this.LeftHenchmen = new Array();
for (var _local3 in HArr) {
this.LeftHenchmen.push(HArr[_local3]);
}
};
ATTACK_EVENT.setPlayer = function (LP) {
CalcAttributes(LP);
this.LPlayerObj = _root.PlayerData[LP];
this.LPlayerNum = LP;
};
with (ATTACK_EVENT) {
ATTACK_EVENT.WinBattle = function (w, arr) {
GO_TO_NEXT = true;
addNews("Gangland Shootout", (((LPlayerObj.Name + " and ") + RPlayerObj.Name) + " Gangs were suspected to have initiated a shootout at ") + this.level.Name);
if (w == "l") {
if (this.RPlayerObj.Henchmen.Stock[this.levelnum].length > 0) {
NewPopUp("Won Battle", ((this.LPlayerObj.Name + " won the battle, but ") + this.RPlayerObj.Name) + " retains control.", _root.DEMAND_ICON);
} else {
var _local3 = this.level.Revenue;
RemoveAsset(this.RPlayerObj, this.level);
AddAsset(this.LPlayerObj, this.level, _local3);
NewPopUp("Complete", (this.LPlayerObj.Name + " has taken over ") + this.level.Name, _root.DEMAND_ICON);
}
} else {
NewPopUp("Failed", (this.RPlayerObj.Name + " has protected ") + this.level.Name, _root.DEMAND_ICON);
}
};
ATTACK_EVENT.Lose = function () {
};
ATTACK_EVENT.Win = function () {
tmpCHArr = new Array();
var _local3 = _root.LocationData[this.levelnum];
trace("Battle Params : " + this.levelnum);
trace("Battle Henchmen : " + this.RPlayerObj);
trace(this.RPlayerObj.Henchmen.Stock[this.levelnum]);
FactionBattle(_root.ATTACK_EVENT, _root.ATTACK_EVENT.LPlayerObj, _root.ATTACK_EVENT.RPlayerObj, _root.ATTACK_EVENT.LPlayerObj.Henchmen.Stock[0], _root.ATTACK_EVENT.RPlayerObj.Henchmen.Stock[this.levelnum]);
};
}
RANDOM_EVENT_PROB = 0.05;
HIT_REVENT_ARRAY = new Array("A local businessman wants a hit on a competitor's store. They've been using their Corporate buying power to try to underprice out this community owned business.", "A local woman needs a hit done on her abusive husband. The cops have been powerless to stop him and he keeps stalking her and their son.", "A local woman needs a hit done on her pimp. He's been demanding a bigger cut then she can give and his beating is hurting her business.", "A local drugdealer has been pushing to kids at school. Police won't do anything. The PTA has come to you to do something.");
HIT_REVENT = new Object();
HIT_REVENT.RISK = 20;
HIT_REVENT.REWARD = 2000;
HIT_REVENT.Condition = function (p) {
return(PlayerData[p].Assets.length > 5);
};
HIT_REVENT.Run = function (p) {
this.p = p;
NewFork("Favour : Hit", RandomArray(HIT_REVENT_ARRAY) + "\n$2000 is available if completed.", _root.HENCHMEN_ICON, ["Run Hit", "Refuse"], [HIT_REVENT, undefined]);
};
HIT_REVENT.Win = function () {
NewPopUp("Completed", "The Hit was successful", DEMAND_ICON);
addMoney(PlayerData[this.p], FIN_ROBBERY, HIT_REVENT.REWARD);
};
HIT_REVENT.Lose = function () {
NewPopUp("Failed", "The Hit failed.", POLICE_ICON);
};
TOXIC_REVENT = new Object();
PORNO_REVENT = new Object();
ORGANIZED_REVENT_ARRAY = new Array("A local millionaire is moving some priceless artwork to his home through town at 2am. A few of your henchmen believe that we can pull a job to hijack the vehicle by dressing up as policemen.", "The local bank is ripe for a bank job. A hacker has the ability to hack into the bank's database and change the code to add the rounded off cents into your account.", "A few local thugs have stumbled on alot of drugs, and are trying to sell it off fast before anyone knows. Henchmen are ready to kill them all and grab all the goods.", "A plan is devised to create a website scam site that sells a 'working' penis enlarging product. Then rather then shipping the product, offer a refund with the most homosexual company name, almost forcing paying customers not to cash the cheque thinking that people will read the cheque.");
ORGANIZED_REVENT = new Object();
ORGANIZED_REVENT.RISK = 40;
ORGANIZED_REVENT.REWARD = 10000;
ORGANIZED_REVENT.Condition = function (p) {
return(PlayerData[p].Assets.length > 5);
};
ORGANIZED_REVENT.Run = function (p) {
this.p = p;
NewFork("Heist", RandomArray(ORGANIZED_REVENT_ARRAY) + "\n$10,000 is available if completed.", _root.ROBBERY_ICON, ["Run Job", "Refuse"], [ORGANIZED_REVENT, undefined]);
};
ORGANIZED_REVENT.Win = function () {
NewPopUp("Completed", "The Job was successful", ROBBERY_ICON);
addMoney(PlayerData[this.p], FIN_ROBBERY, ORGANIZED_REVENT.REWARD);
};
ORGANIZED_REVENT.Lose = function () {
NewPopUp("Failed", "The Job failed. Police caught all involved. You pay $5000 to cover your tracks.", POLICE_ICON);
addMoney(PlayerData[this.p], FIN_BAIL, ORGANIZED_REVENT.REWARD * -0.5);
};
DRUGBUST_REVENT = new Object();
GIRLSMACKED_REVENT = new Object();
ROBBED_EVENT = new Object();
PROTECTIONREFUSE_EVENT = new Object();
RANDOMEVENTS_ARRAY = new Array(HIT_REVENT, ORGANIZED_REVENT);
for (var i in RANDOMEVENTS_ARRAY) {
RANDOMEVENTS_ARRAY[i].SubEvent = 1;
}
Frame 62
DebugCSave();
stop();
Frame 67
function Refresh_Icon() {
if (icon < 0) {
icon = GANG_LIST.length - 1;
} else if (icon >= GANG_LIST.length) {
icon = 0;
}
name.text = GANG_LIST[icon].name;
GANG_LOGO.gotoAndStop(GANG_LIST[icon].icon);
ACTOR.setup(GANG_LIST[icon].costume);
}
icon = 0;
Instance of Symbol 801 MovieClip in Frame 67
on (release) {
_root.icon--;
_root.Refresh_Icon();
}
Instance of Symbol 801 MovieClip in Frame 67
on (release) {
_root.icon++;
_root.Refresh_Icon();
}
Frame 68
Refresh_Icon();
stop();
Frame 72
function Refresh(i) {
Selected = MISSION_LIST[i];
cmpList.selectedIndex = i;
OMC.gotoAndStop(Selected.Description);
}
function change(Evt) {
Refresh(Evt.target.selectedIndex);
}
cmpList.addEventListener("change", this);
MissionLength = Math.min(CSAVE.Mission + 1, MISSION_LIST.length);
var i = 0;
while (i < MissionLength) {
cmpList.addItem({label:MISSION_LIST[i].Name});
i++;
}
if ((CSAVE.Mission > DEMO_MAX_MISSION) && (ONLINE_VERSION)) {
gotoAndStop ("demo");
}
GANG_LOGO.gotoAndStop(CSAVE.Gang.icon);
Refresh(CSAVE.Mission);
stop();
Instance of Symbol 477 MovieClip [List] "cmpList" in Frame 72
//component parameters
onClipEvent (construct) {
multipleSelection = false;
rowHeight = 20;
}
Frame 81
function EditNumPlayers(n) {
trace(n);
numplayers = n;
if (numplayers < 2) {
numplayers = 2;
}
if (numplayers > 8) {
numplayers = 8;
}
Refresh();
}
function Refresh() {
playernum.text = numplayers;
var _local2 = 1;
while (_local2 <= 8) {
if (_local2 <= numplayers) {
this["Player" + _local2]._visible = true;
} else {
this["Player" + _local2]._visible = false;
}
_local2++;
}
}
function Start() {
PLAYERARRAY = new Array();
var _local3 = 1;
while (_local3 <= numplayers) {
PLAYERARRAY.push({name:this["Player" + _local3].name, gang:this["Player" + _local3].gang, type:this["Player" + _local3].type, personality:this["Player" + _local3].personality});
_local3++;
}
_root.NewSkirmish(PLAYERARRAY);
gotoAndPlay ("fade");
}
cmpPlayerNum.fontSize = 24;
cmpPlayerNum.fontWeight = "bold";
CmpHandler = new Object();
CmpHandler.change = function (evt) {
_root.EditNumPlayers(evt.target.value);
};
cmpPlayerNum.addEventListener("change", CmpHandler);
TMPPLAYERDATA = new Array();
TMPPLAYERDATA[1] = {name:_root.GANG_LIST[0].name, gang:0, typeObj:_root.TYPE_NAMES[0]};
var i = 2;
while (i <= 8) {
var g = Math.floor(Math.random() * _root.GANG_LIST.length);
TMPPLAYERDATA[i] = {name:_root.GANG_LIST[g].name, gang:g, typeObj:_root.TYPE_NAMES[1]};
i++;
}
numplayers = 2;
Refresh();
stop();
Instance of Symbol 604 MovieClip [NumericStepper] "cmpPlayerNum" in Frame 81
//component parameters
onClipEvent (construct) {
maximum = 4;
minimum = 2;
stepSize = 1;
value = 0;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Frame 88
stop();
Frame 94
NewSandBox();
gotoAndPlay ("fade");
Frame 117
INIT_ONCE = true;
BuildInterface();
ClosePopUp();
InitGame();
NewDay();
NO_MOUSE_MOVE = false;
FIRST_TIME = true;
SETUP_MASK.duplicateMovieClip("SETUP_MASK_", SETUPMC_DEPTH);
Instance of Symbol 1014 MovieClip "TT" in Frame 117
//component parameters
onClipEvent (construct) {
colordefondo = "ffffff";
alfafondo = 98.504837291117;
colortitulo = 0;
colortexto = 10101;
globotitulo2 = "Example text";
parrafo = "// Paste this code in a button.\ron (rollOver) {\r globitotexto = \"example text\";\r}\ron (rollOut) {\r //essential to make the tip invisible again.\r globitotexto = \"\";\r}";
}
Frame 118
INTERFACE._visible = false;
Frame 141
BuildMap();
INTERFACE._visible = true;
Frame 142
RebuildMap();
if (_root.SETUP_MASK_ != undefined) {
INTERFACE.TurnView._visible = false;
_root.SETUP_MASK_.removeMovieClip();
}
Frame 143
if (PopUpQueue.length > 0) {
var q = PopUpQueue.shift();
NewPopUpObj(q);
} else {
trace("--------- No PopUps ------------");
}
if (FIRST_TIME) {
DebugInit();
Env.Objective.InitMap();
TurnCycle();
viewSpecial(PlayerData[1], "objective", "My Objectives");
FIRST_TIME = false;
}
stop();
Frame 144
duplicateMovieClip ("_cutscene", "CUTSCENE", CUTSCENE_DEPTH);
CUTSCENE = _root.CUTSCENE;
Frame 145
CUTSCENE.animation = CutSceneObj.ani;
CUTSCENE.outcome = CutSceneObj.out;
CUTSCENE.c1 = CutSceneObj.c1;
CUTSCENE.c2 = CutSceneObj.c2;
CUTSCENE.PARAM = CutSceneObj.PARAM;
CUTSCENE._visible = true;
CUTSCENE.play();
stop();
Frame 146
count = 0;
Frame 156
count++;
if (count < 500) {
gotoAndPlay ("intro_1_loop");
}
Frame 234
gotoAndPlay (117);
Symbol 9 MovieClip [BrdrShdw] Frame 1
mx.skins.ColoredSkinElement.setColorStyle(this, "shadowColor");
Symbol 11 MovieClip [BrdrFace] Frame 1
mx.skins.ColoredSkinElement.setColorStyle(this, "buttonColor");
Symbol 14 MovieClip [BrdrBlk] Frame 1
mx.skins.ColoredSkinElement.setColorStyle(this, "borderColor");
Symbol 16 MovieClip [BrdrHilght] Frame 1
mx.skins.ColoredSkinElement.setColorStyle(this, "highlightColor");
Symbol 19 MovieClip [Defaults] Frame 1
#initclip 54
Object.registerClass("Defaults", mx.skins.halo.Defaults);
#endinitclip
Symbol 20 MovieClip [UIObjectExtensions] Frame 1
#initclip 55
Object.registerClass("UIObjectExtensions", mx.core.ext.UIObjectExtensions);
#endinitclip
Symbol 21 MovieClip [UIObject] Frame 1
#initclip 56
Object.registerClass("UIObject", mx.core.UIObject);
#endinitclip
stop();
Symbol 24 Button
on (keyPress "<Tab>") {
this.tabHandler();
}
Symbol 25 MovieClip Frame 1
#initclip 57
Object.registerClass("FocusManager", mx.managers.FocusManager);
if (_root.focusManager == undefined) {
_root.createClassObject(mx.managers.FocusManager, "focusManager", mx.managers.DepthManager.highestDepth--);
}
#endinitclip
Symbol 26 MovieClip [FocusRect] Frame 1
#initclip 58
Object.registerClass("FocusRect", mx.skins.halo.FocusRect);
#endinitclip
Symbol 27 MovieClip [FocusManager] Frame 1
#initclip 59
Object.registerClass("FocusManager", mx.managers.FocusManager);
#endinitclip
stop();
Symbol 28 MovieClip [UIComponentExtensions] Frame 1
#initclip 60
Object.registerClass("UIComponentExtensions", mx.core.ext.UIComponentExtensions);
#endinitclip
Symbol 29 MovieClip [UIComponent] Frame 1
#initclip 61
Object.registerClass("UIComponent", mx.core.UIComponent);
#endinitclip
stop();
Symbol 30 MovieClip [SimpleButton] Frame 1
#initclip 62
Object.registerClass("SimpleButton", mx.controls.SimpleButton);
#endinitclip
stop();
Symbol 31 MovieClip [Border] Frame 1
#initclip 63
Object.registerClass("Border", mx.skins.Border);
#endinitclip
stop();
Symbol 32 MovieClip [RectBorder] Frame 1
#initclip 64
mx.skins.SkinElement.registerElement(mx.skins.RectBorder.symbolName, Object(mx.skins.RectBorder));
Object.registerClass("RectBorder", mx.skins.halo.RectBorder);
#endinitclip
stop();
Symbol 33 MovieClip [ButtonSkin] Frame 1
#initclip 65
Object.registerClass("ButtonSkin", mx.skins.halo.ButtonSkin);
#endinitclip
Symbol 34 MovieClip [Button] Frame 1
#initclip 66
Object.registerClass("Button", mx.controls.Button);
#endinitclip
stop();
Instance of Symbol 30 MovieClip [SimpleButton] in Symbol 34 MovieClip [Button] Frame 2
//component parameters
onClipEvent (initialize) {
selected = false;
toggle = false;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Symbol 35 MovieClip [CustomBorder] Frame 1
#initclip 67
Object.registerClass("CustomBorder", mx.skins.CustomBorder);
mx.skins.SkinElement.registerElement("CustomBorder", mx.skins.CustomBorder);
#endinitclip
Symbol 47 MovieClip [ScrollThemeColor1] Frame 1
mx.skins.ColoredSkinElement.setColorStyle(this, "themeColor");
Symbol 49 MovieClip [ScrollThemeColor2] Frame 1
mx.skins.ColoredSkinElement.setColorStyle(this, "themeColor");
Symbol 60 MovieClip [ThumbThemeColor1] Frame 1
mx.skins.ColoredSkinElement.setColorStyle(this, "themeColor");
Symbol 62 MovieClip [ThumbThemeColor3] Frame 1
mx.skins.ColoredSkinElement.setColorStyle(this, "themeColor");
Symbol 69 MovieClip [ThumbThemeColor2] Frame 1
mx.skins.ColoredSkinElement.setColorStyle(this, "themeColor");
Symbol 90 MovieClip [BtnDownArrow] Frame 1
#initclip 68
Object.registerClass("BtnDownArrow", mx.controls.SimpleButton);
#endinitclip
Symbol 91 MovieClip [BtnUpArrow] Frame 1
#initclip 69
Object.registerClass("BtnUpArrow", mx.controls.SimpleButton);
#endinitclip
Symbol 93 MovieClip [HScrollBar] Frame 1
#initclip 70
Object.registerClass("HScrollBar", mx.controls.HScrollBar);
#endinitclip
stop();
Instance of Symbol 34 MovieClip [Button] in Symbol 93 MovieClip [HScrollBar] Frame 2
//component parameters
onClipEvent (initialize) {
icon = "";
label = "Button";
labelPlacement = "right";
selected = false;
toggle = false;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Instance of Symbol 30 MovieClip [SimpleButton] in Symbol 93 MovieClip [HScrollBar] Frame 2
//component parameters
onClipEvent (initialize) {
selected = false;
toggle = false;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Symbol 94 MovieClip [VScrollBar] Frame 1
#initclip 71
Object.registerClass("VScrollBar", mx.controls.VScrollBar);
#endinitclip
stop();
Instance of Symbol 34 MovieClip [Button] in Symbol 94 MovieClip [VScrollBar] Frame 2
//component parameters
onClipEvent (initialize) {
icon = "";
label = "Button";
labelPlacement = "right";
selected = false;
toggle = false;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Instance of Symbol 30 MovieClip [SimpleButton] in Symbol 94 MovieClip [VScrollBar] Frame 2
//component parameters
onClipEvent (initialize) {
selected = false;
toggle = false;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Symbol 95 MovieClip [View] Frame 1
#initclip 72
Object.registerClass("View", mx.core.View);
#endinitclip
stop();
Symbol 96 MovieClip [ScrollView] Frame 1
#initclip 73
Object.registerClass("ScrollView", mx.core.ScrollView);
#endinitclip
stop();
Instance of Symbol 93 MovieClip [HScrollBar] in Symbol 96 MovieClip [ScrollView] Frame 2
//component parameters
onClipEvent (initialize) {
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Instance of Symbol 94 MovieClip [VScrollBar] in Symbol 96 MovieClip [ScrollView] Frame 2
//component parameters
onClipEvent (initialize) {
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Symbol 97 MovieClip [ScrollPane] Frame 1
#initclip 74
Object.registerClass("ScrollPane", mx.containers.ScrollPane);
#endinitclip
stop();
Symbol 129 MovieClip [ProgBarCapThemeColor] Frame 1
mx.skins.ColoredSkinElement.setColorStyle(this, "themeColor");
Symbol 137 MovieClip [ProgBarMiddleThemeColor] Frame 1
mx.skins.ColoredSkinElement.setColorStyle(this, "themeColor");
Symbol 142 MovieClip [ProgBarIndThemeColor] Frame 1
mx.skins.ColoredSkinElement.setColorStyle(this, "themeColor");
Symbol 143 MovieClip [ProgBarIndMiddleThemeColor] Frame 1
mx.skins.ColoredSkinElement.setColorStyle(this, "themeColor");
Symbol 153 MovieClip [ProgressBar] Frame 1
#initclip 75
Object.registerClass("ProgressBar", mx.controls.ProgressBar);
#endinitclip
stop();
Symbol 230 MovieClip Frame 1
stop();
Symbol 230 MovieClip Frame 26
gotoAndPlay ("walkloop");
Symbol 265 MovieClip Frame 1
stop();
Symbol 271 MovieClip Frame 1
function goPlay() {
if (_root.Options.SoundOn) {
gotoAndPlay(_parent.SOUNDID * 5);
} else {
stop();
}
}
stop();
Symbol 271 MovieClip Frame 5
trace("pistol");
stop();
Symbol 271 MovieClip Frame 9
gotoAndStop (1);
Symbol 271 MovieClip Frame 10
trace("silence");
stop();
Symbol 271 MovieClip Frame 14
gotoAndStop (1);
Symbol 271 MovieClip Frame 15
trace("magnum");
stop();
Symbol 271 MovieClip Frame 19
gotoAndStop (1);
Symbol 271 MovieClip Frame 20
trace("shotgun");
stop();
Symbol 271 MovieClip Frame 24
gotoAndStop (1);
Symbol 271 MovieClip Frame 25
trace("tommy");
stop();
Symbol 271 MovieClip Frame 30
gotoAndStop (1);
Symbol 275 MovieClip Frame 1
stop();
Symbol 275 MovieClip Frame 2
SOUND.goPlay();
Symbol 275 MovieClip Frame 5
gotoAndStop (1);
Symbol 282 MovieClip Frame 1
stop();
Symbol 320 MovieClip Frame 1
stop();
Symbol 326 MovieClip Frame 1
stop();
Symbol 335 MovieClip Frame 1
stop();
Symbol 347 MovieClip Frame 5
stop();
Symbol 381 MovieClip Frame 5
stop();
Symbol 387 MovieClip Frame 1
function SmackUp() {
gotoAndPlay ("smackup");
}
function setup(costume) {
this.COSTUME = costume;
BODY.gotoAndStop(costume.Body);
GUN.gotoAndStop(costume.Gun);
HAT.gotoAndStop(costume.Hat);
BEARD.gotoAndStop(costume.Beard);
GLASSES.gotoAndStop(costume.Glasses);
if (custome.Gun > _root.BIGGUNFLAG) {
BIGGUN = true;
} else {
BIGGUN = false;
}
COLORTRANS = new Color(HAT.COLOR);
COLORTRANS.setTransform(costume.HatColor);
COLORTRANS = new Color(BODY.COLOR);
COLORTRANS.setTransform(costume.BodyColor);
COLORTRANS = new Color(BEARD.COLOR);
COLORTRANS.setTransform(costume.BeardColor);
COLORTRANS = new Color(GLASSES.COLOR);
COLORTRANS.setTransform(costume.GlassesColor);
}
function setState(s) {
STATE = s;
trace((this._name + " STATE : ") + s);
if (HOLDUP_STATE == s) {
gotoAndPlay ("holduploop");
}
if (HELDUP_STATE == s) {
gotoAndPlay ("helduploop");
}
}
function pressalarm() {
gotoAndPlay ("heldup_pressalarm");
}
function walk() {
gotoAndPlay ("walk");
STATE = WALKING_STATE;
}
function idle() {
gotoAndPlay ("idle");
setState(IDLE_STATE);
}
function drivebyUp(fd) {
framedelay = fd;
gotoAndPlay ("driveby_up");
}
function drivebyHit() {
gotoAndPlay ("driveby_hit");
}
function die() {
trace("Die");
if (STATE == HELDUP_STATE) {
STATE = DEATH_STATE;
gotoAndPlay ("heldupdie");
} else if ((STATE == HOLDUP_STATE) || (STATE == SHOOTING_STATE)) {
STATE = DEATH_STATE;
gotoAndPlay ("gunupdie");
}
}
function hit() {
if ((STATE == HOLDUP_STATE) || (STATE == SHOOTING_STATE)) {
gotoAndPlay ("gunuphit");
}
}
function shoot() {
if ((STATE == HOLDUP_STATE) || (STATE == SHOOTING_STATE)) {
STATE = SHOOTING_STATE;
gotoAndPlay ("shootloop");
} else {
STATE = SHOOTING_STATE;
gotoAndPlay ("shoot");
}
}
function holdup() {
STATE = HOLDUP_STATE;
gotoAndPlay ("holdup");
}
function holdupdone() {
STATE = IDLE_STATE;
gotoAndPlay ("doneholdup");
}
function heldup() {
gotoAndPlay ("heldup");
}
function heldupdone() {
gotoAndPlay ("heldupdone");
}
function givemoney() {
gotoAndPlay ("givemoney");
}
IDLE_STATE = -1;
WALKING_STATE = 0;
SHOOTING_STATE = 1;
HELDUP_STATE = 2;
HOLDUP_STATE = 3;
DEATH_STATE = 4;
STATE = "";
if (INITIAL_COSTUME != undefined) {
setup(INITIAL_COSTUME);
}
LEGS.gotoAndStop("idle");
Symbol 387 MovieClip Frame 40
gotoAndPlay ("idle");
Symbol 387 MovieClip Frame 41
LEGS.gotoAndPlay("walk");
Symbol 387 MovieClip Frame 70
gotoAndPlay ("walk");
Symbol 387 MovieClip Frame 100
gotoAndPlay ("idle");
Symbol 387 MovieClip Frame 119
gotoAndPlay ("helduploop");
Symbol 387 MovieClip Frame 136
gotoAndPlay ("helduploop");
Symbol 387 MovieClip Frame 148
stop();
Symbol 387 MovieClip Frame 165
gotoAndPlay ("helduploop");
Symbol 387 MovieClip Frame 175
LEGS.gotoAndStop("idle");
Symbol 387 MovieClip Frame 194
GUN.GUNSHOT.SOUNDID = COSTUME.Gun;
GUN.GUNSHOT.gotoAndPlay("shoot");
Symbol 387 MovieClip Frame 213
gotoAndPlay ("shootloop");
Symbol 387 MovieClip Frame 219
LEGS.gotoAndStop("idle");
Symbol 387 MovieClip Frame 251
gotoAndPlay ("holduploop");
Symbol 387 MovieClip Frame 268
STATE = IDLE_STATE;
gotoAndPlay ("idle");
Symbol 387 MovieClip Frame 290
if (STATE == SHOOTING_STATE) {
gotoAndPlay ("shootloop");
} else {
gotoAndPlay ("holduploop");
}
Symbol 387 MovieClip Frame 319
stop();
Symbol 387 MovieClip Frame 320
tfl = 0;
LEGS.gotoAndStop("idle");
Symbol 387 MovieClip Frame 325
HITME = true;
Symbol 387 MovieClip Frame 326
if (tfl < framedelay) {
gotoAndPlay ("driveby_up_loop");
tfl++;
}
Symbol 387 MovieClip Frame 327
_parent.hits++;
Symbol 387 MovieClip Frame 330
HITME = false;
Symbol 387 MovieClip Frame 337
_parent.HenchmenDone(this._name);
LEGS.gotoAndStop("idle");
Symbol 387 MovieClip Frame 338
HITME = false;
Symbol 387 MovieClip Frame 342
_parent.HenchmenDone(this._name);
Symbol 395 Button
on (release) {
_parent.DS.SelectItem(index);
}
Symbol 396 MovieClip [HenchmenItem] Frame 1
stop();
Symbol 396 MovieClip [HenchmenItem] Frame 2
stop();
Symbol 396 MovieClip [HenchmenItem] Frame 3
stop();
Symbol 396 MovieClip [HenchmenItem] Frame 4
stop();
Symbol 402 MovieClip [NewsHeadline] Frame 1
index = titleTF.text;
if ((index != undefined) || (index != "")) {
var NewsArticle = _root.NewsHeadlines[index];
Date = NewsArticle.Date;
NewsHeadline = NewsArticle.Headline;
NewsContent = NewsArticle.Caption;
stop();
}
Symbol 408 MovieClip [RadioThemeColor1] Frame 1
mx.skins.ColoredSkinElement.setColorStyle(this, "themeColor");
Symbol 412 MovieClip [RadioThemeColor2] Frame 1
mx.skins.ColoredSkinElement.setColorStyle(this, "themeColor");
Symbol 418 MovieClip [RadioButtonAssets] Frame 1
#initclip 76
mx.controls.RadioButton.prototype.adjustFocusRect = function () {
var _local4 = this._parent.focus_mc;
var _local2 = this.iconName;
var _local3 = this.getStyle("themeColor");
if (_local3 == undefined) {
_local3 = 8453965 /* 0x80FF4D */;
}
var _local5 = _local2._width + 4;
var _local6 = _local2._height + 4;
_local4.setSize(_local5, _local6, 8, 100, _local3);
var _local8 = _local2._x;
var _local7 = _local2._y;
_local4.move((this.x - 2) + _local8, (this.y + _local7) - 2);
};
#endinitclip
Symbol 419 MovieClip [RadioButton] Frame 1
#initclip 77
Object.registerClass("RadioButton", mx.controls.RadioButton);
#endinitclip
stop();
Instance of Symbol 34 MovieClip [Button] "foo" in Symbol 419 MovieClip [RadioButton] Frame 2
//component parameters
onClipEvent (initialize) {
icon = "";
label = "Button";
labelPlacement = "right";
selected = false;
toggle = false;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Symbol 432 Button
on (release) {
_root.DoJob(Event);
}
Symbol 451 Button
on (release) {
_parent.Help(_root.TUTORIAL_DEMAND, "actionlist");
}
Symbol 452 MovieClip [DemandAction] Frame 1
function change(evt) {
if (Number(evt.target.value) != Number.NaN) {
_root.DEMAND_EVENT.setCash(Number(evt.target.value));
UpdateRisk();
}
}
function UpdateRisk() {
Risk = Event.CalcRisk();
Frame = Math.max(Math.round(Risk / 2), 1);
RiskBar.Risk = Math.round(Risk) + "%";
RiskBar.gotoAndStop(Frame);
}
function SetEvent() {
trace("Change");
if (cmpPursuade.selected) {
Event = _root.DEMAND_PURSUADE;
} else if (cmpTrash.selected) {
Event = _root.DEMAND_TRASH;
} else if (PlayerObj.Henchmen.Stock[0].length > 0) {
Event = _root.DEMAND_ATTACK;
} else {
_root.NewPopUp("Oops", "You need Henchmen in order to attack!", _root.HENCHMEN_ICON);
cmpPursude.selected = true;
cmpAttack.selected = false;
Event = _root.DEMAND_PURSUADE;
}
UpdateRisk();
}
cmpRobbery.addEventListener("change", this);
RadioListener = new Object();
RadioListener.click = function (evt) {
SetEvent();
};
cmpPursuade.addEventListener("click", RadioListener);
cmpAttack.addEventListener("click", RadioListener);
cmpTrash.addEventListener("click", RadioListener);
cmpPursuade.groupName = "myRadioGroup";
cmpAttack.groupName = "myRadioGroup";
cmpTrash.groupName = "myRadioGroup";
DemandEvent = _root.DEMAND_EVENT;
DemandEvent.setLevel(LocObj.Num);
DemandEvent.setPlayer(_root.CURRENT_PLAYER);
SetEvent();
var def = DemandEvent.getCash();
PreBar.gotoAndStop(Math.max(Math.ceil(DemandEvent.getPressurePerc() * 50), 1));
PreBar.Risk = Math.round(DemandEvent.getPressurePerc() * 100) + "%";
cmpRobbery.maximum = def * 2;
cmpRobbery.minimum = def * 0.5;
cmpRobbery.value = def;
if (def < 750) {
cmpRobbery.stepSize = 50;
} else if (def < 3000) {
cmpRobbery.stepSize = 200;
} else if (def < 10000) {
cmpRobbery.stepSize = 500;
}
stop();
Instance of Symbol 419 MovieClip [RadioButton] "cmpPursuade" in Symbol 452 MovieClip [DemandAction] Frame 1
//component parameters
onClipEvent (construct) {
data = "";
groupName = "radioGroup";
label = "";
labelPlacement = "right";
selected = true;
}
Instance of Symbol 419 MovieClip [RadioButton] "cmpTrash" in Symbol 452 MovieClip [DemandAction] Frame 1
//component parameters
onClipEvent (construct) {
data = "";
groupName = "radioGroup";
label = "";
labelPlacement = "right";
selected = false;
}
Instance of Symbol 419 MovieClip [RadioButton] "cmpAttack" in Symbol 452 MovieClip [DemandAction] Frame 1
//component parameters
onClipEvent (construct) {
data = "";
groupName = "radioGroup";
label = "";
labelPlacement = "right";
selected = false;
}
Symbol 460 Button
on (release) {
Event.Open();
}
Symbol 473 MovieClip [DataProvider] Frame 1
#initclip 78
Object.registerClass("DataProvider", mx.controls.listclasses.DataProvider);
#endinitclip
stop();
Symbol 474 MovieClip [DataSelector] Frame 1
#initclip 79
Object.registerClass("DataSelector", mx.controls.listclasses.DataSelector);
#endinitclip
stop();
Symbol 475 MovieClip [SelectableRow] Frame 1
#initclip 80
Object.registerClass("SelectableRow", mx.controls.listclasses.SelectableRow);
#endinitclip
stop();
Symbol 476 MovieClip [ScrollSelectList] Frame 1
#initclip 81
Object.registerClass("ScrollSelectList", mx.controls.listclasses.ScrollSelectList);
#endinitclip
stop();
Symbol 477 MovieClip [List] Frame 1
#initclip 82
Object.registerClass("List", mx.controls.List);
#endinitclip
stop();
Symbol 480 Button
on (release) {
_parent.Help(_root.TUTORIAL_PROSTITUTES, "actionlist");
}
Symbol 481 MovieClip [PickupAction] Frame 1
function UpdateRisk() {
Risk = Event.CalcActionRisk(_root.BUYSHOT_PICKUP_EVENT);
RiskBar.Risk = Math.ceil(Risk) + "%";
Frame = Math.max(Math.round(Risk / 2), 1);
RiskBar.gotoAndStop(Frame);
}
function setBar(Bar, val, max) {
if (val > max) {
val = max;
}
Bar._width = (val / max) * 90;
}
function Refresh() {
Event.setTarget(ProstituteArray[pInd]);
UpdateRisk();
HObj = ProstituteArray[pInd];
name.text = HObj.Name;
age.text = HObj.Age;
setBar(HPBAR, HObj.Att, _root.PROST_ATTMAX);
}
function change(evt) {
pname = evt.target.value;
var _local1 = 0;
while (_local1 < ProstituteArray.length) {
if (pname == ProstituteArray[_local1].Name) {
pInd = _local1;
break;
}
_local1++;
}
Refresh();
}
if (_parent.LocObj.Prostitutes <= 0) {
this._visible = false;
}
ProstituteArray = new Array();
var i = 0;
while (i < LocObj.Prostitutes) {
ProstituteArray.push(_root.GenerateProstitute(LocObj.PScale));
cmpProstitutes.addItem(ProstituteArray[i].Name);
i++;
}
cmpProstitutes.addEventListener("change", this);
pInd = 0;
Event = _root.PICKUP_EVENT;
Event.setPlayer(PlayerObj, LocObj.Num);
Refresh();
stop();
Instance of Symbol 477 MovieClip [List] "cmpProstitutes" in Symbol 481 MovieClip [PickupAction] Frame 1
//component parameters
onClipEvent (construct) {
multipleSelection = false;
rowHeight = 20;
}
Symbol 491 Button
on (release) {
Buy();
}
Symbol 510 MovieClip [RacketInfo] Frame 1
if (LocObj.Racket == undefined) {
gotoAndPlay (2);
} else {
gotoAndPlay (3);
}
Symbol 510 MovieClip [RacketInfo] Frame 2
function Refresh() {
rObj = _root.RACKET_ARRAY[rId];
name.text = rObj.NAME;
desc.text = rObj.DESC;
startup.text = "$" + rObj.COST;
risk.text = rObj.RISK + "%";
if (rObj.REWARD != undefined) {
payout.text = "$" + rObj.REWARD;
} else {
payout.text = "--";
}
}
function Buy() {
if (_root.purchase(PlayerObj, rObj.COST, ("a " + rObj.NAME) + " Racket")) {
_root.AddRacket(rId, LocObj.Num, PlayerObj.Num);
_root.NewPopUp("Racket Installed", (("You've Installed a " + rObj.NAME) + " at ") + LocObj.Name, _root.MONEY_ICON);
gotoAndPlay (1);
}
}
racketListListener = new Object();
racketListListener.change = function (evt) {
rId = evt.target.value;
Refresh();
};
cmpRacketList.addEventListener("change", racketListListener);
var i = 0;
while (i < _root.RACKET_ARRAY.length) {
cmpRacketList.addItem(_root.RACKET_ARRAY[i].NAME, i);
i++;
}
rId = 0;
Refresh();
stop();
Instance of Symbol 477 MovieClip [List] "cmpRacketList" in Symbol 510 MovieClip [RacketInfo] Frame 2
//component parameters
onClipEvent (construct) {
multipleSelection = false;
rowHeight = 20;
}
Symbol 510 MovieClip [RacketInfo] Frame 3
rObj = _root.RACKET_ARRAY[LocObj.Racket];
name.text = rObj.NAME;
desc.text = rObj.DESC;
startup.text = "$" + rObj.COST;
risk.text = rObj.RISK + "%";
stop();
Symbol 522 Button
on (release) {
_root.viewProtectAsset(PlayerObj.Num, LocObj.Num);
}
Symbol 523 Button
on (release) {
_parent.Help(_root.TUTORIAL_ASSETS, "actionlist");
}
Symbol 528 MovieClip [AssetProtect] Frame 1
revenue = "$" + LocObj.Revenue;
henchmen = PlayerObj.Henchmen.Stock[LocObj.Num].length;
stop();
Symbol 543 MovieClip Frame 1
stop();
Symbol 543 MovieClip Frame 10
stop();
Symbol 543 MovieClip Frame 11
prevFrame();
Symbol 552 Button
on (release) {
if (_root.purchase(PlayerObj, Event.getCost(), _root.FIN_PURCHASES)) {
_root.DoJob(Event);
} else {
_root.NewPopUp("Oops!", "You need $500 to do a drive-by", _root.MONEY_ICON);
}
}
Symbol 557 MovieClip [DrivebyAction] Frame 1
Event = _root.DRIVEBY_GAME;
Event.setLevel(LocObj.Num);
Event.setPlayer(_root.CURRENT_PLAYER);
Event.CalcRisk();
cost = "$" + Event.getCost();
stop();
Symbol 559 Button
on (release) {
if (PlayerObj.Henchmen.Stock[0].length > 0) {
_root.DoJob(Event);
} else {
_root.NewPopUp("Oops!", "You need to have Henchmen with you in order to attack. Hire more.", _root.HENCHMEN_ICON);
}
}
Symbol 563 Button
on (release) {
_parent.Help(_root.TUTORIAL_ATTACK, "actionlist");
}
Symbol 578 MovieClip [AttackAction] Frame 1
Event = _root.ATTACK_EVENT;
Event.setLevel(LocObj.Num);
Event.setPlayer(_root.CURRENT_PLAYER);
Event.CalcRisk();
revenue = "$" + LocObj.Revenue;
stop();
Symbol 587 MovieClip [TextInput] Frame 1
#initclip 83
Object.registerClass("TextInput", mx.controls.TextInput);
#endinitclip
stop();
Symbol 592 MovieClip [StepThemeColor1] Frame 1
mx.skins.ColoredSkinElement.setColorStyle(this, "themeColor");
Symbol 604 MovieClip [NumericStepper] Frame 1
#initclip 84
Object.registerClass("NumericStepper", mx.controls.NumericStepper);
#endinitclip
stop();
Instance of Symbol 30 MovieClip [SimpleButton] in Symbol 604 MovieClip [NumericStepper] Frame 2
//component parameters
onClipEvent (initialize) {
selected = false;
toggle = false;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Instance of Symbol 587 MovieClip [TextInput] in Symbol 604 MovieClip [NumericStepper] Frame 2
//component parameters
onClipEvent (initialize) {
editable = true;
password = false;
text = "";
maxChars = null;
restrict = "null";
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Symbol 611 MovieClip [BribeAction] Frame 1
function change(evt) {
if (Number(evt.target.value) != Number.NaN) {
Event.setCash(Number(evt.target.value));
Risk = Event.CalcRisk();
RiskBar.Risk = Math.ceil(Risk) + "%";
Frame = Math.max(Math.round(Risk / 2), 1);
RiskBar.gotoAndStop(Frame);
}
}
cmpRobbery.addEventListener("change", this);
Event = _root.BRIBE_EVENT;
Event.setPlayer(PlayerObj);
Risk = Event.CalcRisk();
RiskBar.Risk = Math.ceil(Risk) + "%";
Frame = Math.max(Math.round(Risk / 2), 1);
RiskBar.gotoAndStop(Frame);
var def = Event.bCash;
cmpRobbery.maximum = 5000;
cmpRobbery.minimum = 500;
cmpRobbery.value = def;
if (def < 750) {
cmpRobbery.stepSize = 50;
} else if (def < 3000) {
cmpRobbery.stepSize = 200;
} else if (def < 10000) {
cmpRobbery.stepSize = 500;
}
Risk = Event.CalcRisk();
RiskBar.Risk = Math.ceil(Risk) + "%";
stop();
Instance of Symbol 604 MovieClip [NumericStepper] "cmpRobbery" in Symbol 611 MovieClip [BribeAction] Frame 1
//component parameters
onClipEvent (construct) {
maximum = 10;
minimum = 0;
stepSize = 1;
value = 0;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Symbol 623 MovieClip [RobberyAction] Frame 1
function change(evt) {
if (Number(evt.target.value) != Number.NaN) {
Event.setCash(Number(evt.target.value));
Risk = Event.CalcRisk();
RiskBar.Risk = Math.ceil(Risk) + "%";
Frame = Math.max(Math.round(Risk / 2), 1);
RiskBar.gotoAndStop(Frame);
}
}
cmpRobbery.addEventListener("change", this);
Event = _root.ROBBERY_EVENT;
Event.Init(PlayerObj.Num, LocObj.Num);
Risk = Event.CalcRisk();
RiskBar.Risk = Math.ceil(Risk) + "%";
Frame = Math.max(Math.round(Risk / 2), 1);
RiskBar.gotoAndStop(Frame);
var def = Event.getReward();
cmpRobbery.maximum = def * 2;
cmpRobbery.minimum = def * 0.5;
cmpRobbery.value = def;
if (def < 750) {
cmpRobbery.stepSize = 50;
} else if (def < 3000) {
cmpRobbery.stepSize = 200;
} else if (def < 10000) {
cmpRobbery.stepSize = 500;
}
Risk = Event.CalcRisk();
RiskBar.Risk = Math.ceil(Risk) + "%";
stop();
Instance of Symbol 604 MovieClip [NumericStepper] "cmpRobbery" in Symbol 623 MovieClip [RobberyAction] Frame 1
//component parameters
onClipEvent (construct) {
maximum = 10;
minimum = 0;
stepSize = 1;
value = 0;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Symbol 637 MovieClip [DataGridAssets] Frame 1
#initclip 85
mx.controls.DataGrid.prototype.headerStyle = _global.styles.dataGridStyles;
#endinitclip
Symbol 638 MovieClip [DataGridColumn] Frame 1
#initclip 86
Object.registerClass("DataGridColumn", mx.controls.gridclasses.DataGridColumn);
#endinitclip
stop();
Symbol 639 MovieClip [DataGridRow] Frame 1
#initclip 87
Object.registerClass("DataGridRow", mx.controls.gridclasses.DataGridRow);
#endinitclip
stop();
Symbol 640 MovieClip [DataGrid] Frame 1
#initclip 88
Object.registerClass("DataGrid", mx.controls.DataGrid);
#endinitclip
stop();
Instance of Symbol 477 MovieClip [List] in Symbol 640 MovieClip [DataGrid] Frame 2
//component parameters
onClipEvent (initialize) {
multipleSelection = false;
rowHeight = 20;
}
Instance of Symbol 587 MovieClip [TextInput] in Symbol 640 MovieClip [DataGrid] Frame 2
//component parameters
onClipEvent (initialize) {
editable = true;
password = false;
text = "";
maxChars = null;
restrict = "";
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Symbol 653 MovieClip [BJCDnDObject] Frame 1
#initclip 97
BJCDnDObject = function () {
objectName = "";
this.elements = new Array();
};
BJCDnDObject.prototype.setObjectName = function (name) {
this.objectName = name;
};
BJCDnDObject.prototype.getObjectName = function () {
return(this.objectName);
};
BJCDnDObject.prototype.setProperty = function (name, value) {
this.elements[this.elements.length] = new Array(name, value);
};
BJCDnDObject.prototype.getProperty = function (name) {
i = 0;
while (i < this.elements.length) {
element = this.elements[i];
if (element[0] == name) {
return(element[1]);
}
i++;
}
return(null);
};
Object.registerClass("BJCDnDObject", BJCDnDObject);
#endinitclip
Symbol 666 MovieClip [BJCDnD] Frame 1
#initclip 96
BJCDnD.prototype = new MovieClip();
BJCDnD = function () {
this.componentType = "BJCDnD";
this.dndItems._visible = false;
this.totalHeight = this.elementPadding;
this.width = this._width;
this.height = this._height;
this._xscale = 100;
this._yscale = 100;
this.grad._width = this.width;
this.grad._height = this.height;
this.grad._alpha = this.grAlpha;
this.dt._width = this.width;
this.dt._height = this.height;
this.dt.rootMC = this._name;
this.isScrollable = false;
this.scrollingDown = false;
this.scrollingUp = false;
if (this.speed > 100) {
this.speed = 100;
} else if (this.speed < 5) {
this.speed = 5;
}
this.speed = 101 - this.speed;
this.id = 0;
this.rid = 0;
this.elements = new Array();
this._parent._parent.selectedIndex = null;
this.upArrow.attachMovie(this.defArrowIcon, "upA", 10);
this.downArrow.attachMovie(this.defArrowIcon, "downA", 10);
if (!this.showTopBottom) {
this.up._visible = false;
this.upBright._visible = false;
this.upDark._visible = false;
this.upArrow._visible = false;
this.down._visible = false;
this.downBright._visible = false;
this.downDark._visible = false;
this.downArrow._visible = false;
this.titleTxt._visible = false;
this.topBarHeight = 0;
this.bottomBarHeight = 0;
}
this.scrollAreaHeight = (this.height - this.topBarHeight) - this.bottomBarHeight;
this.elementHolder._y = this.topBarHeight;
this.elementHolder.setMask(this.mask);
this.elementHolder.rootMC = this._name;
this.up._height = this.topBarHeight;
this.up._width = this.width;
this.upBright._height = this.topBarHeight;
this.upBright._width = this.width;
this.upDark._height = this.topBarHeight;
this.upDark._width = this.width;
this.upArrow._xscale = 100;
this.upArrow._yscale = 100;
this.upArrow._rotation = 180;
this.upArrow._x = (this.width - 18) + this.upArrow._width;
this.upArrow._y = (this.topBarHeight + this.upArrow._height) / 2;
this.down._height = this.bottomBarHeight;
this.down._width = this.width;
this.downBright._height = this.bottomBarHeight;
this.downBright._width = this.width;
this.downDark._height = this.bottomBarHeight;
this.downDark._width = this.width;
this.down._y = this.height - this.bottomBarHeight;
this.downDark._y = this.down._y;
this.downBright._y = this.down._y;
this.downArrow._xscale = 100;
this.downArrow._yscale = 100;
this.downArrow._x = this.width - 18;
this.downArrow._y = this.down._y + ((this.bottomBarHeight - this.downArrow._height) / 2);
this.bgCol = new Color(this.up);
this.bgCol.setRGB(this.bgColor);
this.bCol = new Color(this.upBright);
this.bCol.setRGB(this.bBorder);
this.dCol = new Color(this.upDark);
this.dCol.setRGB(this.dBorder);
this.bgCol = new Color(this.down);
this.bgCol.setRGB(this.bgColor);
this.bCol = new Color(this.downBright);
this.bCol.setRGB(this.bBorder);
this.dCol = new Color(this.downDark);
this.dCol.setRGB(this.dBorder);
this.grCol = new Color(this.grad);
this.grCol.setRGB(this.grColor);
this.ttf = new TextFormat();
this.ttf.font = this.titleFont;
this.titleTxt.setTextFormat(this.ttf);
this.titleTxt.textColor = this.titleColor;
this.mask._y = this.topBarHeight;
this.mask._width = this.width + 2;
this.mask._height = this.scrollAreaHeight;
this.scrollMask._y = this.topBarHeight;
this.scrollMask._width = this.width + 2;
this.scrollMask._height = this.scrollAreaHeight;
this.up.onPress = function () {
this.bgCol = new Color(this);
this.bgCol.setRGB(this._parent.bgColor);
this.enabled = false;
this._parent.down.enabled = false;
this._parent.scrollUp();
};
this.up.onRollOver = function () {
if (this._parent.rolloverAvail == "On") {
this.uCol = new Color(this);
this.uCol.setRGB(this._parent.uColor);
}
};
this.up.onRollOut = function () {
this.bgCol = new Color(this);
this.bgCol.setRGB(this._parent.bgColor);
};
this.up.onDragOut = BJCDragList.prototype.up.onRollOut;
this.down.onPress = function () {
this.bgCol = new Color(this);
this.bgCol.setRGB(this._parent.bgColor);
this.enabled = false;
this._parent.up.enabled = false;
this._parent.scrollDown();
};
this.down.onRollOver = function () {
if (this._parent.rolloverAvail == "On") {
this.uCol = new Color(this);
this.uCol.setRGB(this._parent.uColor);
}
};
this.down.onRollOut = function () {
this.bgCol = new Color(this);
this.bgCol.setRGB(this._parent.bgColor);
};
this.down.onDragOut = this.down.onRollOut;
this.scrollContent();
};
BJCDnD.prototype.dragOnCallback = function (obj, index) {
eval (_root.DRAG._droptarget + "._parent").addElementCustom(obj.getProperty("_eTitle_"), obj.getProperty("_eFont_"), obj.getProperty("_eFontCol_"), obj.getProperty("_eBgCol_"), obj.getProperty("_eBgUpCol_"), obj.getProperty("_eBgDownCol_"), obj.getProperty("_eIcon_"), obj.getProperty("_eDragIcon_"));
eval (_root.DRAG._droptarget + "._parent").DE.obj.objectName = obj.objectName;
var i = 9;
while (i < obj.elements.length) {
eval (_root.DRAG._droptarget + "._parent").DE.obj.elements.push(obj.elements[i]);
i++;
}
this._parent._parent.selectedIndex = null;
if (this._parent._parent.etMode == "Move") {
this._parent._parent.removeElement(obj.getProperty("_eIndex_"));
}
eval (eval (_root.DRAG._droptarget + "._parent").elementDCallback).call(this._parent, obj, obj.getProperty("_eIndex_"));
};
BJCDnD.prototype.setClickCallback = function (cb) {
this.elementCCallback = cb;
};
BJCDnD.prototype.setDropCallback = function (cb) {
this.elementDCallback = cb;
};
BJCDnD.prototype.setElementMode = function (mode) {
if (((mode == "Button") || (mode == "Drag item")) || (mode == "Both")) {
this.eMode = mode;
}
};
BJCDnD.prototype.setElementTransferMode = function (mode) {
if ((mode == "Copy") || (mode == "Move")) {
this.etMode = mode;
}
};
BJCDnD.prototype.scrollDown = function () {
if (this.getMaxDown() >= this.scrollAreaHeight) {
this.targetScroll = (-this.scrollAreaHeight) + (this.scrollAreaHeight % (this.elementHeight + this.elementPadding));
} else {
this.targetScroll = (((-this.elementHolder._y) - this.totalHeight) + this.scrollAreaHeight) + this.topBarHeight;
}
this.startPosition = this.elementHolder._y;
this.scrollingUp = false;
this.scrollingDown = true;
clearInterval(this.scrollIVal);
this.scrollIVal = setInterval(this, "scrollContent", 30);
};
BJCDnD.prototype.scrollUp = function () {
if (this.getMaxUp() > this.scrollAreaHeight) {
this.targetScroll = this.scrollAreaHeight - (this.scrollAreaHeight % (this.elementHeight + this.elementPadding));
} else {
this.targetScroll = this.getMaxUp();
}
this.startPosition = this.elementHolder._y;
this.scrollingDown = false;
this.scrollingUp = true;
clearInterval(this.scrollIVal);
this.scrollIVal = setInterval(this, "scrollContent", 30);
};
BJCDnD.prototype.scrollIt = function (ct, bv, tv, s) {
ct = ct / (s / 2);
if (ct < 1) {
return((((tv / 2) * ct) * ct) + bv);
}
ct--;
return((((-tv) / 2) * ((ct * (ct - 2)) - 1)) + bv);
};
BJCDnD.prototype.getMaxUp = function () {
return(this.topBarHeight - this.elementHolder._y);
};
BJCDnD.prototype.getMaxDown = function () {
return(((this.totalHeight - this.bottomBarHeight) - this.scrollAreaHeight) + this.elementHolder._y);
};
BJCDnD.prototype.scrollContent = function () {
if ((this.isScrollable && (this.scrollingUp)) && (this.tcounter < this.speed)) {
this.tcounter++;
this.scrollMask._visible = true;
this.elementHolder._y = this.scrollIt(this.tcounter, this.startPosition, this.targetScroll, this.speed);
} else if ((this.isScrollable && (this.scrollingDown)) && (this.tcounter < this.speed)) {
this.tcounter++;
this.scrollMask._visible = true;
this.elementHolder._y = this.scrollIt(this.tcounter, this.startPosition, this.targetScroll, this.speed);
} else {
this.scrollingUp = false;
this.scrollingDown = false;
this.tcounter = 0;
this.scrollMask._visible = false;
clearInterval(this.scrollIVal);
if ((this.getMaxUp() == 0) || (!this.isScrollable)) {
this.upArrow._visible = false;
this.up.enabled = false;
} else if (this.showTopBottom) {
this.upArrow._visible = true;
this.up.enabled = true;
}
this.tsd = (((-this.elementHolder._y) - this.totalHeight) + this.scrollAreaHeight) + this.topBarHeight;
if ((Math.round(this.tsd) == 0) || (!this.isScrollable)) {
this.downArrow._visible = false;
this.down.enabled = false;
} else if (this.showTopBottom) {
this.downArrow._visible = true;
this.down.enabled = true;
}
}
};
BJCDnD.prototype.addElementCustom = function (title, font, fontColor, bgColor, bgUpColor, bgDownColor, icon, dragIcon) {
this.elementHolder.attachMovie(this.elementSymbol, "el" + this.id, this.id);
this.DE = eval ("this.elementHolder.el" + this.id);
this.elements.push(this.DE);
this.DE.index = this.id;
this.DE.titleHeight = this.DE.titleTF._height;
this.DE.attachMovie("dndBox", "btn", 1000);
this.DE.btn._width = this.width;
this.DE.btn._height = this.elementHeight;
this.DE.bg._width = this.width;
this.DE.bg._height = this.elementHeight;
this.DE.brightBorder._width = this.width;
this.DE.brightBorder._height = this.elementHeight;
this.DE.darkBorder._width = this.width;
this.DE.darkBorder._height = this.elementHeight;
this.DE.btn._alpha = 0;
this.DE.setTitle(title, font, fontColor);
this.DE.setIcon(icon);
this.DE.dragIconID = dragIcon;
this.bgCol = new Color(this.DE.bg);
this.bgCol.setRGB(bgColor);
this.bCol = new Color(this.DE.brightBorder);
this.bCol.setRGB(this.bBorder);
this.dCol = new Color(this.DE.darkBorder);
this.dCol.setRGB(this.dBorder);
this.DE.bgColor = bgColor;
this.DE.downColor = bgDownColor;
this.DE.upColor = bgUpColor;
this.totalHeight = this.elements.length * (this.elementHeight + this.elementPadding);
if (this.scrollAreaHeight <= this.totalHeight) {
this.isScrollable = true;
if (this.showTopBottom && (this.getMaxUp() != 0)) {
this.upArrow._visible = true;
this.up.enabled = true;
}
this.tsd = (((-this.elementHolder._y) - this.totalHeight) + this.scrollAreaHeight) + this.topBarHeight;
if ((this.tsd != 0) && (this.showTopBottom)) {
this.downArrow._visible = true;
this.down.enabled = true;
}
}
if ((this.getMaxUp() == (this.totalHeight - ((this.scrollAreaHeight + this.elementHeight) + this.elementPadding))) && (this.getMaxUp() > 0)) {
this.targetScroll = -(this.elementHeight + this.elementPadding);
this.startPosition = this.elementHolder._y;
this.scrollingUp = false;
this.scrollingDown = true;
this.up.enabled = false;
this.down.enabled = false;
}
this.DE.obj = new BJCDnDObject();
this.DE.obj.setProperty("_eTitle_", title);
this.DE.obj.setProperty("_eFont_", font);
this.DE.obj.setProperty("_eFontCol_", fontColor);
this.DE.obj.setProperty("_eBgCol_", bgColor);
this.DE.obj.setProperty("_eBgUpCol_", bgUpColor);
this.DE.obj.setProperty("_eBgDownCol_", bgDownColor);
this.DE.obj.setProperty("_eIcon_", icon);
this.DE.obj.setProperty("_eDragIcon_", dragIcon);
var i = 0;
while (i < this.elements.length) {
this.elements[i].obj.elements[8] = ["_eIndex_", i];
this.elements[i]._y = (i * (this.elementHeight + this.elementPadding)) + this.elementPadding;
i++;
}
this.DE.btn.onPress = function () {
if (this._parent._parent._parent.eMode != "Button") {
_root.attachMovie(this._parent.dragIconID, "DRAG", 10000);
if (this._parent.dragIconID == "defaultDragIcon") {
_root.DRAG._width = this._parent._parent._parent.width;
_root.DRAG._height = this._parent._parent._parent.elementHeight;
_root.DRAG._alpha = 35;
this.ddCol = new Color(_root.DRAG.bg);
this.ddCol.setRGB(this._parent.downColor);
this.ddbCol = new Color(_root.DRAG.darkBorder);
this.ddbCol.setRGB(this._parent._parent._parent.dBorder);
this.dbbCol = new Color(_root.DRAG.brightBorder);
this.dbbCol.setRGB(this._parent._parent._parent.bBorder);
}
_root.DRAG._x = _root._xmouse;
_root.DRAG._y = _root._ymouse;
_root.DRAG.startDrag();
}
this._parent._parent._parent.selectedIndex = this._parent.obj.getProperty("_eIndex_");
var _local3 = 0;
while (_local3 < this._parent._parent._parent.elements.length) {
this._parent._parent._parent.elements[_local3].titleTF.textColor = this._parent._parent._parent.elements[_local3].fontColor;
this._parent._parent._parent.elements[_local3].uCol = new Color(this._parent._parent._parent.elements[_local3].bg);
this._parent._parent._parent.elements[_local3].uCol.setRGB(this._parent._parent._parent.elements[_local3].bgColor);
_local3++;
}
this.uCol = new Color(this._parent.bg);
this.uCol.setRGB(this._parent.downColor);
};
this.DE.btn.onRelease = function () {
if (this._parent.hitTest(_root._xmouse, _root._ymouse) && (this._parent._parent._parent.eMode != "Drag item")) {
eval (this._parent._parent._parent.elementCCallback).call(this._parent, this._parent.obj, this._parent.obj.getProperty("_eIndex_"));
}
if (this._parent._parent._parent.eMode != "Button") {
stopDrag();
_root.DRAG.removeMovieClip();
}
var i = 0;
while (i < this._parent._parent._parent.elements.length) {
this._parent._parent._parent.elements[i].titleTF.textColor = this._parent._parent._parent.elements[i].fontColor;
this._parent._parent._parent.elements[i].uCol = new Color(this._parent._parent._parent.elements[i].bg);
this._parent._parent._parent.elements[i].uCol.setRGB(this._parent._parent._parent.elements[i].bgColor);
i++;
}
this._parent.titleTF.textColor = this._parent.fontColor;
this._parent.uCol = new Color(this._parent.bg);
this._parent.uCol.setRGB(this._parent.upColor);
};
this.DE.btn.onRollOver = function () {
if (this._parent._parent._parent.rolloverAvail == "On") {
this._parent.titleTF.textColor = this._parent.fontColor;
this._parent.uCol = new Color(this._parent.bg);
this._parent.uCol.setRGB(this._parent.upColor);
}
this._parent._parent._parent.onMouseOver.call(this._parent._parent._parent, this._parent.obj, this._parent.obj.getProperty("_eIndex_"));
};
this.DE.btn.onRollOut = function () {
if (this._parent._parent._parent.selectedIndex != this._parent.obj.getProperty("_eIndex_")) {
this._parent.bgCol = new Color(this._parent.bg);
this._parent.bgCol.setRGB(this._parent.bgColor);
} else {
this._parent.titleTF.textColor = this._parent._parent._parent.selTxtColor;
this._parent.bgCol = new Color(this._parent.bg);
this._parent.bgCol.setRGB(this._parent._parent._parent.selColor);
}
this._parent._parent._parent.onMouseOut.call(this._parent._parent._parent, this._parent.obj, this._parent.obj.getProperty("_eIndex_"));
};
this.DE.btn.onReleaseOutside = function () {
stopDrag();
var edcb = this._parent._parent._parent.elementDCallback;
if ((eval (_root.DRAG._droptarget + "._parent") != this._parent._parent._parent) && (eval (_root.DRAG._droptarget + "._parent").componentType != "BJCDnD")) {
eval (_root.DRAG._droptarget + ".dropHandler").call(this._parent, this._parent.obj, this._parent.obj.getProperty("_eIndex_"));
} else if ((eval (_root.DRAG._droptarget + "._parent") != this._parent._parent._parent) && (eval (_root.DRAG._droptarget + "._parent").componentType == "BJCDnD")) {
eval (_root.DRAG._droptarget + "._parent").dragOnCallback.call(this._parent, this._parent.obj, this._parent.obj.getProperty("_eIndex_"));
}
_root.DRAG.removeMovieClip();
var i = 0;
while (i < this._parent._parent._parent.elements.length) {
if (this._parent._parent._parent.selectedIndex != this._parent.obj.getProperty("_eIndex_")) {
this._parent._parent._parent.elements[i].titleTF.textColor = this._parent._parent._parent.elements[i].fontColor;
this._parent._parent._parent.elements[i].uCol = new Color(this._parent._parent._parent.elements[i].bg);
this._parent._parent._parent.elements[i].uCol.setRGB(this._parent._parent._parent.elements[i].bgColor);
} else {
this._parent.titleTF.textColor = this._parent._parent._parent.selTxtColor;
this._parent.uCol = new Color(this._parent.bg);
this._parent.uCol.setRGB(this._parent._parent._parent.selColor);
}
i++;
}
};
this.DE.titleTF.textColor = fontColor;
this.mtf = new TextFormat();
this.mtf.font = font;
this.DE.titleTF.text = title;
this.DE.titleTF.setTextFormat(this.mtf);
this.DE.titleTF._y = (this.elementHeight - this.DE.titleHeight) / 2;
this.DE.icon.attachMovie(icon, "icoSymbol", 11);
this.DE.icon._x = 4;
this.DE.iconSymbol = icon;
if (this.DE.icon._height > (this.elementHeight - 2)) {
this.DE.icon._height = this.elementHeight - 2;
}
this.DE.icon._y = (this.elementHeight - this.DE.icon._height) / 2;
this.DE.titleTF._x = this.DE.icon._width + 6;
this.DE.titleTF.autoSize = "none";
this.DE.titleTF._width = (this.width - this.DE.icon._width) - 10;
this.id++;
clearInterval(this.scrollIVal);
this.scrollIVal = setInterval(this, "scrollContent", 30);
return(this.DE.obj.getProperty("_eIndex_"));
};
BJCDnD.prototype.addElementIcon = function (title, icon) {
return(this.addElementCustom(title, this.etFont, this.etColor, this.bgColor, this.uColor, this.dColor, icon, this.defDragIcon));
};
BJCDnD.prototype.addElement = function (title) {
return(this.addElementCustom(title, this.etFont, this.etColor, this.bgColor, this.uColor, this.dColor, this.defIcon, this.defDragIcon));
};
BJCDnD.prototype.removeElement = function (index) {
this.tgtID = null;
var i = 0;
while (i < this.elements.length) {
if (this.elements[i].obj.getProperty("_eIndex_") == index) {
this.tgtID = this.elements[i];
}
i++;
}
if (this.tgtID) {
removeMovieClip(this.tgtID);
this.elements = new Array();
var i = 0;
while (i < this.id) {
if (eval ("this.elementHolder.el" + i)) {
this.elements.push(eval ("this.elementHolder.el" + i));
}
i++;
}
var i = 0;
while (i < this.elements.length) {
this.elements[i].obj.elements[8] = ["_eIndex_", i];
i++;
}
var i = 0;
while (i < this.elements.length) {
this.elements[i]._y = (i * (this.elementHeight + this.elementPadding)) + this.elementPadding;
i++;
}
this.totalHeight = this.elements.length * (this.elementHeight + this.elementPadding);
if (this.scrollAreaHeight >= this.totalHeight) {
this.isScrollable = false;
this.elementHolder._y = this.topBarHeight;
}
this.tsd = (((-this.elementHolder._y) - this.totalHeight) + this.scrollAreaHeight) + this.topBarHeight;
if ((-Math.round(this.tsd)) <= 0) {
this.targetScroll = this.elementHeight + this.elementPadding;
this.startPosition = this.elementHolder._y;
this.scrollingUp = true;
this.scrollingDown = false;
this.up.enabled = false;
this.down.enabled = false;
clearInterval(this.scrollIVal);
this.scrollIVal = setInterval(this, "scrollContent", 30);
}
this.rid++;
}
};
BJCDnD.prototype.setElementSymbol = function (id) {
this.elementSymbol = id;
};
BJCDnD.prototype.setScrollArrowIcon = function (id) {
this.defArrowIcon = id;
this.upArrow.attachMovie(this.defArrowIcon, "upA", 10);
this.downArrow.attachMovie(this.defArrowIcon, "downA", 10);
this.upArrow._xscale = 100;
this.upArrow._yscale = 100;
this.upArrow._rotation = 180;
this.upArrow._x = (this.width - 18) + this.upArrow._width;
this.upArrow._y = (this.topBarHeight + this.upArrow._height) / 2;
this.downArrow._xscale = 100;
this.downArrow._yscale = 100;
this.downArrow._x = this.width - 18;
this.downArrow._y = this.down._y + ((this.bottomBarHeight - this.downArrow._height) / 2);
};
BJCDnD.prototype.setElementIcon = function (id, icon) {
this.DE = eval ("this.elementHolder.el" + id);
this.DE.icon.attachMovie(icon, "icoSymbol", 11);
this.DE.icon._x = 4;
this.DE.iconSymbol = icon;
if (this.DE.icon._height > (this.elementHeight - 2)) {
this.DE.icon._height = this.elementHeight - 2;
}
this.DE.icon._y = (this.elementHeight - this.DE.icon._height) / 2;
this.DE.titleTF._x = this.DE.icon._width + 6;
};
BJCDnD.prototype.setObjectName = function (id, name) {
eval ("this.elementHolder.el" + id).obj.setObjectName(name);
};
BJCDnD.prototype.setProperty = function (id, property, value) {
eval ("this.elementHolder.el" + id).obj.setProperty(property, value);
};
BJCDnD.prototype.getObjectName = function (id) {
return(eval ("this.elementHolder.el" + id).obj.getObjectName());
};
BJCDnD.prototype.getProperty = function (id, property) {
return(eval ("this.elementHolder.el" + id).obj.getProperty(property));
};
BJCDnD.prototype.getElementsDown = function () {
return(Math.round(this.getMaxDown() / (this.elementHeight + this.elementPadding)));
};
BJCDnD.prototype.getElementsUp = function () {
return(Math.round(this.getMaxUp() / (this.elementHeight + this.elementPadding)));
};
BJCDnD.prototype.getElementsTotal = function () {
return(this.id - this.rid);
};
BJCDnD.prototype.getElementAt = function (index) {
return(this.elements[index]);
};
Object.registerClass("BJCDnD", BJCDnD);
#endinitclip
Symbol 669 MovieClip [AccordionHeaderSkin] Frame 1
#initclip 89
Object.registerClass("AccordionHeaderSkin", mx.skins.halo.AccordionHeaderSkin);
#endinitclip
Symbol 670 MovieClip [AccordionHeader] Frame 1
#initclip 90
Object.registerClass("AccordionHeader", mx.containers.accordionclasses.AccordionHeader);
#endinitclip
stop();
Instance of Symbol 34 MovieClip [Button] in Symbol 670 MovieClip [AccordionHeader] Frame 2
//component parameters
onClipEvent (initialize) {
icon = "";
label = "Button";
labelPlacement = "right";
selected = false;
toggle = false;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Symbol 671 MovieClip [Accordion] Frame 1
#initclip 91
Object.registerClass("Accordion", mx.containers.Accordion);
#endinitclip
stop();
Symbol 675 MovieClip [ComboBase] Frame 1
#initclip 92
mx.controls.listclasses.DataSelector.Initialize(Object(mx.controls.ComboBase).prototype);
Object.registerClass("ComboBase", mx.controls.ComboBase);
#endinitclip
stop();
Instance of Symbol 30 MovieClip [SimpleButton] in Symbol 675 MovieClip [ComboBase] Frame 2
//component parameters
onClipEvent (initialize) {
selected = false;
toggle = false;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Instance of Symbol 587 MovieClip [TextInput] in Symbol 675 MovieClip [ComboBase] Frame 2
//component parameters
onClipEvent (initialize) {
editable = true;
password = false;
text = "";
maxChars = null;
restrict = "null";
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Symbol 681 MovieClip [ComboDownArrowDisabled] Frame 1
#initclip 93
Object.registerClass("ComboDownArrowDisabled", mx.controls.SimpleButton);
#endinitclip
Symbol 683 MovieClip [ComboThemeColor1] Frame 1
mx.skins.ColoredSkinElement.setColorStyle(this, "themeColor");
Symbol 686 MovieClip [ComboAssets] Frame 1
#initclip 94
mx.controls.ComboBox.prototype.downArrowUpName = "ComboDownArrowUp";
mx.controls.ComboBox.prototype.downArrowDownName = "ComboDownArrowDown";
mx.controls.ComboBox.prototype.downArrowOverName = "ComboDownArrowOver";
mx.controls.ComboBox.prototype.downArrowDisabledName = "ComboDownArrowDisabled";
mx.controls.ComboBox.prototype.wrapDownArrowButton = false;
mx.controls.ComboBox.prototype.dropDownBorderStyle = "solid";
mx.controls.ComboBox.prototype.adjustFocusRect = function () {
var _local2 = this.getStyle("themeColor");
if (_local2 == undefined) {
_local2 = 8453965 /* 0x80FF4D */;
}
var _local3 = this._parent.focus_mc;
_local3.setSize(this.width + 4, this.height + 4, {bl:0, tl:0, tr:5, br:5}, 100, _local2);
_local3.move(this.x - 2, this.y - 2);
};
#endinitclip
Symbol 687 MovieClip [ComboBox] Frame 1
#initclip 95
Object.registerClass("ComboBox", mx.controls.ComboBox);
#endinitclip
stop();
Instance of Symbol 477 MovieClip [List] in Symbol 687 MovieClip [ComboBox] Frame 2
//component parameters
onClipEvent (initialize) {
multipleSelection = false;
rowHeight = 20;
}
Symbol 1 MovieClip [__Packages.mx.core.UIObject] Frame 0
class mx.core.UIObject extends MovieClip
{
var _width, _height, _x, _y, _parent, _minHeight, _minWidth, _visible, dispatchEvent, _xscale, _yscale, methodTable, onEnterFrame, tfList, __width, __height, moveTo, lineTo, createTextField, attachMovie, buildDepthTable, findNextAvailableDepth, idNames, childrenCreated, _name, createAccessibilityImplementation, _endInit, validateNow, hasOwnProperty, initProperties, stylecache, className, ignoreClassStyleDeclaration, _tf, fontFamily, fontSize, color, marginLeft, marginRight, fontStyle, fontWeight, textAlign, textIndent, textDecoration, embedFonts, styleName, enabled;
function UIObject () {
super();
constructObject();
}
function get width() {
return(_width);
}
function get height() {
return(_height);
}
function get left() {
return(_x);
}
function get x() {
return(_x);
}
function get top() {
return(_y);
}
function get y() {
return(_y);
}
function get right() {
return(_parent.width - (_x + width));
}
function get bottom() {
return(_parent.height - (_y + height));
}
function getMinHeight(Void) {
return(_minHeight);
}
function setMinHeight(h) {
_minHeight = h;
}
function get minHeight() {
return(getMinHeight());
}
function set minHeight(h) {
setMinHeight(h);
//return(minHeight);
}
function getMinWidth(Void) {
return(_minWidth);
}
function setMinWidth(w) {
_minWidth = w;
}
function get minWidth() {
return(getMinWidth());
}
function set minWidth(w) {
setMinWidth(w);
//return(minWidth);
}
function setVisible(x, noEvent) {
if (x != _visible) {
_visible = x;
if (noEvent != true) {
dispatchEvent({type:(x ? "reveal" : "hide")});
}
}
}
function get visible() {
return(_visible);
}
function set visible(x) {
setVisible(x, false);
//return(visible);
}
function get scaleX() {
return(_xscale);
}
function set scaleX(x) {
_xscale = x;
//return(scaleX);
}
function get scaleY() {
return(_yscale);
}
function set scaleY(y) {
_yscale = y;
//return(scaleY);
}
function doLater(obj, fn) {
if (methodTable == undefined) {
methodTable = new Array();
}
methodTable.push({obj:obj, fn:fn});
onEnterFrame = doLaterDispatcher;
}
function doLaterDispatcher(Void) {
delete onEnterFrame;
if (invalidateFlag) {
redraw();
}
var _local3 = methodTable;
methodTable = new Array();
if (_local3.length > 0) {
var _local2;
while (_local2 = _local3.shift() , _local2 != undefined) {
_local2.obj[_local2.fn]();
}
}
}
function cancelAllDoLaters(Void) {
delete onEnterFrame;
methodTable = new Array();
}
function invalidate(Void) {
invalidateFlag = true;
onEnterFrame = doLaterDispatcher;
}
function invalidateStyle(Void) {
invalidate();
}
function redraw(bAlways) {
if (invalidateFlag || (bAlways)) {
invalidateFlag = false;
var _local2;
for (_local2 in tfList) {
tfList[_local2].draw();
}
draw();
dispatchEvent({type:"draw"});
}
}
function draw(Void) {
}
function move(x, y, noEvent) {
var _local3 = _x;
var _local2 = _y;
_x = x;
_y = y;
if (noEvent != true) {
dispatchEvent({type:"move", oldX:_local3, oldY:_local2});
}
}
function setSize(w, h, noEvent) {
var _local2 = __width;
var _local3 = __height;
__width = w;
__height = h;
size();
if (noEvent != true) {
dispatchEvent({type:"resize", oldWidth:_local2, oldHeight:_local3});
}
}
function size(Void) {
_width = __width;
_height = __height;
}
function drawRect(x1, y1, x2, y2) {
moveTo(x1, y1);
lineTo(x2, y1);
lineTo(x2, y2);
lineTo(x1, y2);
lineTo(x1, y1);
}
function createLabel(name, depth, text) {
createTextField(name, depth, 0, 0, 0, 0);
var _local2 = this[name];
_local2._color = textColorList;
_local2._visible = false;
_local2.__text = text;
if (tfList == undefined) {
tfList = new Object();
}
tfList[name] = _local2;
_local2.invalidateStyle();
invalidate();
_local2.styleName = this;
return(_local2);
}
function createObject(linkageName, id, depth, initobj) {
return(attachMovie(linkageName, id, depth, initobj));
}
function createClassObject(className, id, depth, initobj) {
var _local3 = className.symbolName == undefined;
if (_local3) {
Object.registerClass(className.symbolOwner.symbolName, className);
}
var _local4 = createObject(className.symbolOwner.symbolName, id, depth, initobj);
if (_local3) {
Object.registerClass(className.symbolOwner.symbolName, className.symbolOwner);
}
return(_local4);
}
function createEmptyObject(id, depth) {
return(createClassObject(mx.core.UIObject, id, depth));
}
function destroyObject(id) {
var _local2 = this[id];
if (_local2.getDepth() < 0) {
var _local4 = buildDepthTable();
var _local5 = findNextAvailableDepth(0, _local4, "up");
var _local3 = _local5;
_local2.swapDepths(_local3);
}
_local2.removeMovieClip();
delete this[id];
}
function getSkinIDName(tag) {
return(idNames[tag]);
}
function setSkin(tag, linkageName, initObj) {
if (_global.skinRegistry[linkageName] == undefined) {
mx.skins.SkinElement.registerElement(linkageName, mx.skins.SkinElement);
}
return(createObject(linkageName, getSkinIDName(tag), tag, initObj));
}
function createSkin(tag) {
var _local2 = getSkinIDName(tag);
createEmptyObject(_local2, tag);
return(this[_local2]);
}
function createChildren(Void) {
}
function _createChildren(Void) {
createChildren();
childrenCreated = true;
}
function constructObject(Void) {
if (_name == undefined) {
return(undefined);
}
init();
_createChildren();
createAccessibilityImplementation();
_endInit();
if (validateNow) {
redraw(true);
} else {
invalidate();
}
}
function initFromClipParameters(Void) {
var _local4 = false;
var _local2;
for (_local2 in clipParameters) {
if (hasOwnProperty(_local2)) {
_local4 = true;
this["def_" + _local2] = this[_local2];
delete this[_local2];
}
}
if (_local4) {
for (_local2 in clipParameters) {
var _local3 = this["def_" + _local2];
if (_local3 != undefined) {
this[_local2] = _local3;
}
}
}
}
function init(Void) {
__width = _width;
__height = _height;
if (initProperties == undefined) {
initFromClipParameters();
} else {
initProperties();
}
if (_global.cascadingStyles == true) {
stylecache = new Object();
}
}
function getClassStyleDeclaration(Void) {
var _local4 = this;
var _local3 = className;
while (_local3 != undefined) {
if (ignoreClassStyleDeclaration[_local3] == undefined) {
if (_global.styles[_local3] != undefined) {
return(_global.styles[_local3]);
}
}
_local4 = _local4.__proto__;
_local3 = _local4.className;
}
}
function setColor(color) {
}
function __getTextFormat(tf, bAll) {
var _local8 = stylecache.tf;
if (_local8 != undefined) {
var _local3;
for (_local3 in mx.styles.StyleManager.TextFormatStyleProps) {
if (bAll || (mx.styles.StyleManager.TextFormatStyleProps[_local3])) {
if (tf[_local3] == undefined) {
tf[_local3] = _local8[_local3];
}
}
}
return(false);
}
var _local6 = false;
for (var _local3 in mx.styles.StyleManager.TextFormatStyleProps) {
if (bAll || (mx.styles.StyleManager.TextFormatStyleProps[_local3])) {
if (tf[_local3] == undefined) {
var _local5 = _tf[_local3];
if (_local5 != undefined) {
tf[_local3] = _local5;
} else if ((_local3 == "font") && (fontFamily != undefined)) {
tf[_local3] = fontFamily;
} else if ((_local3 == "size") && (fontSize != undefined)) {
tf[_local3] = fontSize;
} else if ((_local3 == "color") && (color != undefined)) {
tf[_local3] = color;
} else if ((_local3 == "leftMargin") && (marginLeft != undefined)) {
tf[_local3] = marginLeft;
} else if ((_local3 == "rightMargin") && (marginRight != undefined)) {
tf[_local3] = marginRight;
} else if ((_local3 == "italic") && (fontStyle != undefined)) {
tf[_local3] = fontStyle == _local3;
} else if ((_local3 == "bold") && (fontWeight != undefined)) {
tf[_local3] = fontWeight == _local3;
} else if ((_local3 == "align") && (textAlign != undefined)) {
tf[_local3] = textAlign;
} else if ((_local3 == "indent") && (textIndent != undefined)) {
tf[_local3] = textIndent;
} else if ((_local3 == "underline") && (textDecoration != undefined)) {
tf[_local3] = textDecoration == _local3;
} else if ((_local3 == "embedFonts") && (embedFonts != undefined)) {
tf[_local3] = embedFonts;
} else {
_local6 = true;
}
}
}
}
if (_local6) {
var _local9 = styleName;
if (_local9 != undefined) {
if (typeof(_local9) != "string") {
_local6 = _local9.__getTextFormat(tf, true, this);
} else if (_global.styles[_local9] != undefined) {
_local6 = _global.styles[_local9].__getTextFormat(tf, true, this);
}
}
}
if (_local6) {
var _local10 = getClassStyleDeclaration();
if (_local10 != undefined) {
_local6 = _local10.__getTextFormat(tf, true, this);
}
}
if (_local6) {
if (_global.cascadingStyles) {
if (_parent != undefined) {
_local6 = _parent.__getTextFormat(tf, false);
}
}
}
if (_local6) {
_local6 = _global.style.__getTextFormat(tf, true, this);
}
return(_local6);
}
function _getTextFormat(Void) {
var _local2 = stylecache.tf;
if (_local2 != undefined) {
return(_local2);
}
_local2 = new TextFormat();
__getTextFormat(_local2, true);
stylecache.tf = _local2;
if (enabled == false) {
var _local3 = getStyle("disabledColor");
_local2.color = _local3;
}
return(_local2);
}
function getStyleName(Void) {
var _local2 = styleName;
if (_local2 != undefined) {
if (typeof(_local2) != "string") {
return(_local2.getStyleName());
}
return(_local2);
}
if (_parent != undefined) {
return(_parent.getStyleName());
}
return(undefined);
}
function getStyle(styleProp) {
var _local3;
_global.getStyleCounter++;
if (this[styleProp] != undefined) {
return(this[styleProp]);
}
var _local6 = styleName;
if (_local6 != undefined) {
if (typeof(_local6) != "string") {
_local3 = _local6.getStyle(styleProp);
} else {
var _local7 = _global.styles[_local6];
_local3 = _local7.getStyle(styleProp);
}
}
if (_local3 != undefined) {
return(_local3);
}
var _local7 = getClassStyleDeclaration();
if (_local7 != undefined) {
_local3 = _local7[styleProp];
}
if (_local3 != undefined) {
return(_local3);
}
if (_global.cascadingStyles) {
if (mx.styles.StyleManager.isInheritingStyle(styleProp) || (mx.styles.StyleManager.isColorStyle(styleProp))) {
var _local5 = stylecache;
if (_local5 != undefined) {
if (_local5[styleProp] != undefined) {
return(_local5[styleProp]);
}
}
if (_parent != undefined) {
_local3 = _parent.getStyle(styleProp);
} else {
_local3 = _global.style[styleProp];
}
if (_local5 != undefined) {
_local5[styleProp] = _local3;
}
return(_local3);
}
}
if (_local3 == undefined) {
_local3 = _global.style[styleProp];
}
return(_local3);
}
static function mergeClipParameters(o, p) {
for (var _local3 in p) {
o[_local3] = p[_local3];
}
return(true);
}
static var symbolName = "UIObject";
static var symbolOwner = mx.core.UIObject;
static var version = "2.0.1.78";
static var textColorList = {color:1, disabledColor:1};
var invalidateFlag = false;
var lineWidth = 1;
var lineColor = 0;
var tabEnabled = false;
var clipParameters = {visible:1, minHeight:1, minWidth:1, maxHeight:1, maxWidth:1, preferredHeight:1, preferredWidth:1};
}
Symbol 2 MovieClip [__Packages.mx.core.UIComponent] Frame 0
class mx.core.UIComponent extends mx.core.UIObject
{
var __width, __height, invalidate, stylecache, removeEventListener, dispatchEvent, drawFocus, addEventListener, _xscale, _yscale, _focusrect, watch, enabled;
function UIComponent () {
super();
}
function get width() {
return(__width);
}
function get height() {
return(__height);
}
function setVisible(x, noEvent) {
super.setVisible(x, noEvent);
}
function enabledChanged(id, oldValue, newValue) {
setEnabled(newValue);
invalidate();
delete stylecache.tf;
return(newValue);
}
function setEnabled(enabled) {
invalidate();
}
function getFocus() {
var selFocus = Selection.getFocus();
return(((selFocus === null) ? null : (eval (selFocus))));
}
function setFocus() {
Selection.setFocus(this);
}
function getFocusManager() {
var _local2 = this;
while (_local2 != undefined) {
if (_local2.focusManager != undefined) {
return(_local2.focusManager);
}
_local2 = _local2._parent;
}
return(undefined);
}
function onKillFocus(newFocus) {
removeEventListener("keyDown", this);
removeEventListener("keyUp", this);
dispatchEvent({type:"focusOut"});
drawFocus(false);
}
function onSetFocus(oldFocus) {
addEventListener("keyDown", this);
addEventListener("keyUp", this);
dispatchEvent({type:"focusIn"});
if (getFocusManager().bDrawFocus != false) {
drawFocus(true);
}
}
function findFocusInChildren(o) {
if (o.focusTextField != undefined) {
return(o.focusTextField);
}
if (o.tabEnabled == true) {
return(o);
}
return(undefined);
}
function findFocusFromObject(o) {
if (o.tabEnabled != true) {
if (o._parent == undefined) {
return(undefined);
}
if (o._parent.tabEnabled == true) {
o = o._parent;
} else if (o._parent.tabChildren) {
o = findFocusInChildren(o._parent);
} else {
o = findFocusFromObject(o._parent);
}
}
return(o);
}
function pressFocus() {
var _local3 = findFocusFromObject(this);
var _local2 = getFocus();
if (_local3 != _local2) {
_local2.drawFocus(false);
if (getFocusManager().bDrawFocus != false) {
_local3.drawFocus(true);
}
}
}
function releaseFocus() {
var _local2 = findFocusFromObject(this);
if (_local2 != getFocus()) {
_local2.setFocus();
}
}
function isParent(o) {
while (o != undefined) {
if (o == this) {
return(true);
}
o = o._parent;
}
return(false);
}
function size() {
}
function init() {
super.init();
_xscale = 100;
_yscale = 100;
_focusrect = _global.useFocusRect == false;
watch("enabled", enabledChanged);
if (enabled == false) {
setEnabled(false);
}
}
function dispatchValueChangedEvent(value) {
dispatchEvent({type:"valueChanged", value:value});
}
static var symbolName = "UIComponent";
static var symbolOwner = mx.core.UIComponent;
static var version = "2.0.1.78";
static var kStretch = 5000;
var focusEnabled = true;
var tabEnabled = true;
var origBorderStyles = {themeColor:16711680};
var clipParameters = {};
static var mergedClipParameters = mx.core.UIObject.mergeClipParameters(mx.core.UIComponent.prototype.clipParameters, mx.core.UIObject.prototype.clipParameters);
}
Symbol 3 MovieClip [__Packages.mx.core.View] Frame 0
class mx.core.View extends mx.core.UIComponent
{
var tabChildren, tabEnabled, boundingBox_mc, border_mc, __get__width, __get__height, __tabIndex, depth, createObject, createClassObject, loadExternal, destroyObject, createClassChildAtDepth, doLater;
function View () {
super();
}
function init() {
super.init();
tabChildren = true;
tabEnabled = false;
boundingBox_mc._visible = false;
boundingBox_mc._width = (boundingBox_mc._height = 0);
}
function size() {
border_mc.move(0, 0);
border_mc.setSize(__get__width(), __get__height());
doLayout();
}
function draw() {
size();
}
function get numChildren() {
var _local3 = childNameBase;
var _local2 = 0;
while (true) {
if (this[_local3 + _local2] == undefined) {
return(_local2);
}
_local2++;
}
}
function get tabIndex() {
return((tabEnabled ? (__tabIndex) : undefined));
}
function set tabIndex(n) {
__tabIndex = n;
//return(tabIndex);
}
function addLayoutObject(object) {
}
function createChild(className, instanceName, initProps) {
if (depth == undefined) {
depth = 1;
}
var _local2;
if (typeof(className) == "string") {
_local2 = createObject(className, instanceName, depth++, initProps);
} else {
_local2 = createClassObject(className, instanceName, depth++, initProps);
}
if (_local2 == undefined) {
_local2 = loadExternal(className, _loadExternalClass, instanceName, depth++, initProps);
} else {
this[childNameBase + numChildren] = _local2;
_local2._complete = true;
childLoaded(_local2);
}
addLayoutObject(_local2);
return(_local2);
}
function getChildAt(childIndex) {
return(this[childNameBase + childIndex]);
}
function destroyChildAt(childIndex) {
if (!((childIndex >= 0) && (childIndex < numChildren))) {
return(undefined);
}
var _local4 = childNameBase + childIndex;
var _local6 = numChildren;
var _local3;
for (_local3 in this) {
if (_local3 == _local4) {
_local4 = "";
destroyObject(_local3);
break;
}
}
var _local2 = Number(childIndex);
while (_local2 < (_local6 - 1)) {
this[childNameBase + _local2] = this[childNameBase + (_local2 + 1)];
_local2++;
}
delete this[childNameBase + (_local6 - 1)];
depth--;
}
function initLayout() {
if (!hasBeenLayedOut) {
doLayout();
}
}
function doLayout() {
hasBeenLayedOut = true;
}
function createChildren() {
if (border_mc == undefined) {
border_mc = createClassChildAtDepth(_global.styles.rectBorderClass, mx.managers.DepthManager.kBottom, {styleName:this});
}
doLater(this, "initLayout");
}
function convertToUIObject(obj) {
}
function childLoaded(obj) {
convertToUIObject(obj);
}
static function extension() {
mx.core.ExternalContent.enableExternalContent();
}
static var symbolName = "View";
static var symbolOwner = mx.core.View;
static var version = "2.0.1.78";
var className = "View";
static var childNameBase = "_child";
var hasBeenLayedOut = false;
var _loadExternalClass = "UIComponent";
}
Symbol 4 MovieClip [__Packages.mx.core.ScrollView] Frame 0
class mx.core.ScrollView extends mx.core.View
{
var __width, hScroller, vScroller, __maxHPosition, propsInited, scrollAreaChanged, specialHScrollCase, createObject, viewableColumns, __height, oldRndUp, viewableRows, __viewMetrics, owner, enabled, border_mc, __get__width, __get__height, invLayout, mask_mc, _parent, dispatchEvent;
function ScrollView () {
super();
}
function getHScrollPolicy(Void) {
return(__hScrollPolicy);
}
function setHScrollPolicy(policy) {
__hScrollPolicy = policy.toLowerCase();
if (__width == undefined) {
return(undefined);
}
setScrollProperties(numberOfCols, columnWidth, rowC, rowH, heightPadding, widthPadding);
}
function get hScrollPolicy() {
return(getHScrollPolicy());
}
function set hScrollPolicy(policy) {
setHScrollPolicy(policy);
//return(hScrollPolicy);
}
function getVScrollPolicy(Void) {
return(__vScrollPolicy);
}
function setVScrollPolicy(policy) {
__vScrollPolicy = policy.toLowerCase();
if (__width == undefined) {
return(undefined);
}
setScrollProperties(numberOfCols, columnWidth, rowC, rowH, heightPadding, widthPadding);
}
function get vScrollPolicy() {
return(getVScrollPolicy());
}
function set vScrollPolicy(policy) {
setVScrollPolicy(policy);
//return(vScrollPolicy);
}
function get hPosition() {
return(getHPosition());
}
function set hPosition(pos) {
setHPosition(pos);
//return(hPosition);
}
function getHPosition(Void) {
return(__hPosition);
}
function setHPosition(pos) {
hScroller.__set__scrollPosition(pos);
__hPosition = pos;
}
function get vPosition() {
return(getVPosition());
}
function set vPosition(pos) {
setVPosition(pos);
//return(vPosition);
}
function getVPosition(Void) {
return(__vPosition);
}
function setVPosition(pos) {
vScroller.__set__scrollPosition(pos);
__vPosition = pos;
}
function get maxVPosition() {
var _local2 = vScroller.maxPos;
return(((_local2 == undefined) ? 0 : (_local2)));
}
function get maxHPosition() {
return(getMaxHPosition());
}
function set maxHPosition(pos) {
setMaxHPosition(pos);
//return(maxHPosition);
}
function getMaxHPosition(Void) {
if (__maxHPosition != undefined) {
return(__maxHPosition);
}
var _local2 = hScroller.maxPos;
return(((_local2 == undefined) ? 0 : (_local2)));
}
function setMaxHPosition(pos) {
__maxHPosition = pos;
}
function setScrollProperties(colCount, colWidth, rwCount, rwHeight, hPadding, wPadding) {
var _local3 = getViewMetrics();
if (hPadding == undefined) {
hPadding = 0;
}
if (wPadding == undefined) {
wPadding = 0;
}
propsInited = true;
delete scrollAreaChanged;
heightPadding = hPadding;
widthPadding = wPadding;
if (colWidth == 0) {
colWidth = 1;
}
if (rwHeight == 0) {
rwHeight = 1;
}
var _local5 = Math.ceil((((__width - _local3.left) - _local3.right) - widthPadding) / colWidth);
if ((__hScrollPolicy == "on") || ((_local5 < colCount) && (__hScrollPolicy == "auto"))) {
if ((hScroller == undefined) || (specialHScrollCase)) {
delete specialHScrollCase;
hScroller = createObject("HScrollBar", "hSB", 1001);
hScroller.__set__lineScrollSize(20);
hScroller.scrollHandler = scrollProxy;
hScroller.__set__scrollPosition(__hPosition);
scrollAreaChanged = true;
}
if ((((numberOfCols != colCount) || (columnWidth != colWidth)) || (viewableColumns != _local5)) || (scrollAreaChanged)) {
hScroller.setScrollProperties(_local5, 0, colCount - _local5);
viewableColumns = _local5;
numberOfCols = colCount;
columnWidth = colWidth;
}
} else if (((__hScrollPolicy == "auto") || (__hScrollPolicy == "off")) && (hScroller != undefined)) {
hScroller.removeMovieClip();
delete hScroller;
scrollAreaChanged = true;
}
if (heightPadding == undefined) {
heightPadding = 0;
}
var _local4 = Math.ceil((((__height - _local3.top) - _local3.bottom) - heightPadding) / rwHeight);
var _local8 = (((__height - _local3.top) - _local3.bottom) % rwHeight) != 0;
if ((__vScrollPolicy == "on") || ((_local4 < (rwCount + _local8)) && (__vScrollPolicy == "auto"))) {
if (vScroller == undefined) {
vScroller = createObject("VScrollBar", "vSB", 1002);
vScroller.scrollHandler = scrollProxy;
vScroller.__set__scrollPosition(__vPosition);
scrollAreaChanged = true;
rowH = 0;
}
if ((((rowC != rwCount) || (rowH != rwHeight)) || ((viewableRows + _local8) != (_local4 + oldRndUp))) || (scrollAreaChanged)) {
vScroller.setScrollProperties(_local4, 0, (rwCount - _local4) + _local8);
viewableRows = _local4;
rowC = rwCount;
rowH = rwHeight;
oldRndUp = _local8;
}
} else if (((__vScrollPolicy == "auto") || (__vScrollPolicy == "off")) && (vScroller != undefined)) {
vScroller.removeMovieClip();
delete vScroller;
scrollAreaChanged = true;
}
numberOfCols = colCount;
columnWidth = colWidth;
if (scrollAreaChanged) {
doLayout();
var _local2 = __viewMetrics;
var _local12 = ((owner != undefined) ? (owner) : this);
_local12.layoutContent(_local2.left, _local2.top, ((columnWidth * numberOfCols) - _local2.left) - _local2.right, rowC * rowH, (__width - _local2.left) - _local2.right, (__height - _local2.top) - _local2.bottom);
}
if (!enabled) {
setEnabled(false);
}
}
function getViewMetrics(Void) {
var _local2 = __viewMetrics;
var _local3 = border_mc.__get__borderMetrics();
_local2.left = _local3.left;
_local2.right = _local3.right;
if (vScroller != undefined) {
_local2.right = _local2.right + vScroller.minWidth;
}
_local2.top = _local3.top;
if ((hScroller == undefined) && ((__hScrollPolicy == "on") || (__hScrollPolicy == true))) {
hScroller = createObject("FHScrollBar", "hSB", 1001);
specialHScrollCase = true;
}
_local2.bottom = _local3.bottom;
if (hScroller != undefined) {
_local2.bottom = _local2.bottom + hScroller.minHeight;
}
return(_local2);
}
function doLayout(Void) {
var _local10 = __get__width();
var _local8 = __get__height();
delete invLayout;
var _local3 = (__viewMetrics = getViewMetrics());
var _local2 = _local3.left;
var _local9 = _local3.right;
var _local5 = _local3.top;
var _local11 = _local3.bottom;
var _local7 = hScroller;
var _local6 = vScroller;
_local7.setSize((_local10 - _local2) - _local9, _local7.minHeight + 0);
_local7.move(_local2, _local8 - _local11);
_local6.setSize(_local6.minWidth + 0, (_local8 - _local5) - _local11);
_local6.move(_local10 - _local9, _local5);
var _local4 = mask_mc;
_local4._width = (_local10 - _local2) - _local9;
_local4._height = (_local8 - _local5) - _local11;
_local4._x = _local2;
_local4._y = _local5;
}
function createChild(id, name, props) {
var _local2 = super.createChild(id, name, props);
return(_local2);
}
function init(Void) {
super.init();
__viewMetrics = new Object();
if (_global.__SVMouseWheelManager == undefined) {
var _local4 = (_global.__SVMouseWheelManager = new Object());
_local4.onMouseWheel = __onMouseWheel;
Mouse.addListener(_local4);
}
}
function __onMouseWheel(delta, scrollTarget) {
var _local4 = scrollTarget;
var _local1;
while (_local4 != undefined) {
if (_local4 instanceof mx.core.ScrollView) {
_local1 = _local4;
}
_local4 = _local4._parent;
}
if (_local1 != undefined) {
_local4 = ((delta <= 0) ? 1 : -1);
var _local2 = _local1.vScroller.lineScrollSize;
if (_local2 == undefined) {
_local2 = 0;
}
_local2 = Math.max(Math.abs(delta), _local2);
var _local3 = _local1.vPosition + (_local2 * _local4);
_local1.vPosition = Math.max(0, Math.min(_local3, _local1.maxVPosition));
_local1.dispatchEvent({type:"scroll", direction:"vertical", position:_local1.vPosition});
}
}
function createChildren(Void) {
super.createChildren();
if (mask_mc == undefined) {
mask_mc = createObject("BoundingBox", "mask_mc", MASK_DEPTH);
}
mask_mc._visible = false;
}
function invalidate(Void) {
super.invalidate();
}
function draw(Void) {
size();
}
function size(Void) {
super.size();
}
function scrollProxy(docObj) {
_parent.onScroll(docObj);
}
function onScroll(docObj) {
var _local3 = docObj.target;
var _local2 = _local3.scrollPosition;
if (_local3 == vScroller) {
var _local4 = "vertical";
var _local5 = "__vPosition";
} else {
var _local4 = "horizontal";
var _local5 = "__hPosition";
}
dispatchEvent({type:"scroll", direction:_local4, position:_local2});
this[_local5] = _local2;
}
function setEnabled(v) {
vScroller.enabled = (hScroller.enabled = v);
}
function childLoaded(obj) {
super.childLoaded(obj);
obj.setMask(mask_mc);
}
static var symbolName = "ScrollView";
static var symbolOwner = mx.core.ScrollView;
static var version = "2.0.1.78";
var className = "ScrollView";
var __vScrollPolicy = "auto";
var __hScrollPolicy = "off";
var __vPosition = 0;
var __hPosition = 0;
var numberOfCols = 0;
var rowC = 0;
var columnWidth = 1;
var rowH = 0;
var heightPadding = 0;
var widthPadding = 0;
var MASK_DEPTH = 10000;
}
Symbol 5 MovieClip [__Packages.mx.containers.ScrollPane] Frame 0
class mx.containers.ScrollPane extends mx.core.ScrollView
{
var _total, _loaded, destroyChildAt, createChild, __scrollContent, spContentHolder, hScroller, vScroller, __get__hScrollPolicy, __vScrollPolicy, __get__vScrollPolicy, tabEnabled, keyDown, mask_mc, hPosition, __get__maxHPosition, vPosition, __get__maxVPosition, __hPosition, __vPosition, invalidate;
function ScrollPane () {
super();
}
function getBytesTotal() {
return(_total);
}
function getBytesLoaded() {
return(_loaded);
}
function set contentPath(scrollableContent) {
if (!initializing) {
if (scrollableContent == undefined) {
destroyChildAt(0);
} else {
if (this[mx.core.View.childNameBase + 0] != undefined) {
destroyChildAt(0);
}
createChild(scrollableContent, "spContentHolder");
}
}
__scrollContent = scrollableContent;
//return(contentPath);
}
function get contentPath() {
return(__scrollContent);
}
function get content() {
return(spContentHolder);
}
function setHPosition(position) {
if ((position <= hScroller.maxPos) && (position >= hScroller.minPos)) {
super.setHPosition(position);
spContentHolder._x = -position;
}
}
function setVPosition(position) {
if ((position <= vScroller.maxPos) && (position >= vScroller.minPos)) {
super.setVPosition(position);
spContentHolder._y = -position;
}
}
function get vLineScrollSize() {
return(__vLineScrollSize);
}
function set vLineScrollSize(vLineSize) {
__vLineScrollSize = vLineSize;
vScroller.__set__lineScrollSize(vLineSize);
//return(vLineScrollSize);
}
function get hLineScrollSize() {
return(__hLineScrollSize);
}
function set hLineScrollSize(hLineSize) {
__hLineScrollSize = hLineSize;
hScroller.__set__lineScrollSize(hLineSize);
//return(hLineScrollSize);
}
function get vPageScrollSize() {
return(__vPageScrollSize);
}
function set vPageScrollSize(vPageSize) {
__vPageScrollSize = vPageSize;
vScroller.__set__pageScrollSize(vPageSize);
//return(vPageScrollSize);
}
function get hPageScrollSize() {
return(__hPageScrollSize);
}
function set hPageScrollSize(hPageSize) {
__hPageScrollSize = hPageSize;
hScroller.__set__pageScrollSize(hPageSize);
//return(hPageScrollSize);
}
function set hScrollPolicy(policy) {
__hScrollPolicy = policy.toLowerCase();
setScrollProperties(spContentHolder._width, 1, spContentHolder._height, 1);
//return(__get__hScrollPolicy());
}
function set vScrollPolicy(policy) {
__vScrollPolicy = policy.toLowerCase();
setScrollProperties(spContentHolder._width, 1, spContentHolder._height, 1);
//return(__get__vScrollPolicy());
}
function get scrollDrag() {
return(__scrollDrag);
}
function set scrollDrag(s) {
__scrollDrag = s;
if (__scrollDrag) {
spContentHolder.useHandCursor = true;
spContentHolder.onPress = function () {
this._parent.startDragLoop();
};
spContentHolder.tabEnabled = false;
spContentHolder.onRelease = (spContentHolder.onReleaseOutside = function () {
delete this.onMouseMove;
});
__scrollDrag = true;
} else {
delete spContentHolder.onPress;
spContentHolder.tabEnabled = false;
spContentHolder.tabChildren = true;
spContentHolder.useHandCursor = false;
__scrollDrag = false;
}
//return(scrollDrag);
}
function init(Void) {
super.init();
tabEnabled = true;
keyDown = _onKeyDown;
}
function createChildren(Void) {
super.createChildren();
mask_mc._visible = false;
initializing = false;
if ((__scrollContent != undefined) && (__scrollContent != "")) {
contentPath = (__scrollContent);
}
}
function size(Void) {
super.size();
setScrollProperties(spContentHolder._width, 1, spContentHolder._height, 1);
hPosition = Math.min(hPosition, __get__maxHPosition());
vPosition = Math.min(vPosition, __get__maxVPosition());
}
function setScrollProperties(columnCount, columnWidth, rowCount, rowHeight) {
super.setScrollProperties(columnCount, columnWidth, rowCount, rowHeight);
hScroller.__set__lineScrollSize(__hLineScrollSize);
hScroller.__set__pageScrollSize(__hPageScrollSize);
vScroller.__set__lineScrollSize(__vLineScrollSize);
vScroller.__set__pageScrollSize(__vPageScrollSize);
}
function onScroll(scrollEvent) {
super.onScroll(scrollEvent);
spContentHolder._x = -__hPosition;
spContentHolder._y = -__vPosition;
}
function childLoaded(obj) {
super.childLoaded(obj);
onComplete();
}
function onComplete(Void) {
setScrollProperties(spContentHolder._width, 1, spContentHolder._height, 1);
hPosition = 0;
vPosition = 0;
scrollDrag = (__scrollDrag);
invalidate();
}
function startDragLoop(Void) {
spContentHolder.lastX = spContentHolder._xmouse;
spContentHolder.lastY = spContentHolder._ymouse;
spContentHolder.onMouseMove = function () {
var _local5 = this.lastX - this._xmouse;
var _local4 = this.lastY - this._ymouse;
_local5 = _local5 + this._parent.hPosition;
_local4 = _local4 + this._parent.vPosition;
var _local3 = this._parent.getViewMetrics();
var _local7 = (this._parent.__height - _local3.top) - _local3.bottom;
var _local6 = (this._parent.__width - _local3.left) - _local3.right;
this._parent.__hPosition = Math.max(0, Math.min(_local5, this._width - _local6));
this._parent.__vPosition = Math.max(0, Math.min(_local4, this._height - _local7));
this._parent.hScroller.scrollPosition = this._parent.__hPosition;
this._x = -this._parent.hPosition;
this._parent.vScroller.scrollPosition = this._parent.__vPosition;
this._y = -this._parent.vPosition;
super.dispatchEvent({type:"scroll"});
};
}
function dispatchEvent(o) {
o.target = this;
_total = o.total;
_loaded = o.current;
super.dispatchEvent(o);
}
function refreshPane(Void) {
contentPath = (__scrollContent);
}
function _onKeyDown(e) {
if (e.code == 40) {
vPosition = vPosition + vLineScrollSize;
} else if (e.code == 38) {
vPosition = vPosition - vLineScrollSize;
} else if (e.code == 37) {
hPosition = hPosition - hLineScrollSize;
} else if (e.code == 39) {
hPosition = hPosition + hLineScrollSize;
} else if (e.code == 33) {
vPosition = vPosition - vPageScrollSize;
} else if (e.code == 34) {
vPosition = vPosition + vPageScrollSize;
} else if (e.code == 36) {
vPosition = vScroller.minPos;
} else if (e.code == 35) {
vPosition = vScroller.maxPos;
}
}
static var symbolName = "ScrollPane";
static var symbolOwner = mx.containers.ScrollPane;
var className = "ScrollPane";
static var version = "2.0.1.78";
var __hScrollPolicy = "auto";
var __scrollDrag = false;
var __vLineScrollSize = 5;
var __hLineScrollSize = 5;
var __vPageScrollSize = 20;
var __hPageScrollSize = 20;
var clipParameters = {contentPath:1, scrollDrag:1, hScrollPolicy:1, vScrollPolicy:1, vLineScrollSize:1, hLineScrollSize:1, vPageScrollSize:1, hPageScrollSize:1};
static var mergedClipParameters = mx.core.UIObject.mergeClipParameters(mx.containers.ScrollPane.prototype.clipParameters, mx.core.ScrollView.prototype.clipParameters);
var initializing = true;
}
Symbol 98 MovieClip [__Packages.mx.skins.SkinElement] Frame 0
class mx.skins.SkinElement extends MovieClip
{
var _visible, _x, _y, _width, _height;
function SkinElement () {
super();
}
static function registerElement(name, className) {
Object.registerClass(name, ((className == undefined) ? (mx.skins.SkinElement) : (className)));
_global.skinRegistry[name] = true;
}
function __set__visible(visible) {
_visible = visible;
}
function move(x, y) {
_x = x;
_y = y;
}
function setSize(w, h) {
_width = w;
_height = h;
}
}
Symbol 99 MovieClip [__Packages.mx.styles.CSSTextStyles] Frame 0
class mx.styles.CSSTextStyles
{
function CSSTextStyles () {
}
static function addTextStyles(o, bColor) {
o.addProperty("textAlign", function () {
return(this._tf.align);
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.align = x;
});
o.addProperty("fontWeight", function () {
return(((this._tf.bold != undefined) ? ((this._tf.bold ? "bold" : "none")) : undefined));
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.bold = x == "bold";
});
if (bColor) {
o.addProperty("color", function () {
return(this._tf.color);
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.color = x;
});
}
o.addProperty("fontFamily", function () {
return(this._tf.font);
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.font = x;
});
o.addProperty("textIndent", function () {
return(this._tf.indent);
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.indent = x;
});
o.addProperty("fontStyle", function () {
return(((this._tf.italic != undefined) ? ((this._tf.italic ? "italic" : "none")) : undefined));
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.italic = x == "italic";
});
o.addProperty("marginLeft", function () {
return(this._tf.leftMargin);
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.leftMargin = x;
});
o.addProperty("marginRight", function () {
return(this._tf.rightMargin);
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.rightMargin = x;
});
o.addProperty("fontSize", function () {
return(this._tf.size);
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.size = x;
});
o.addProperty("textDecoration", function () {
return(((this._tf.underline != undefined) ? ((this._tf.underline ? "underline" : "none")) : undefined));
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.underline = x == "underline";
});
o.addProperty("embedFonts", function () {
return(this._tf.embedFonts);
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.embedFonts = x;
});
}
}
Symbol 100 MovieClip [__Packages.mx.styles.StyleManager] Frame 0
class mx.styles.StyleManager
{
function StyleManager () {
}
static function registerInheritingStyle(styleName) {
inheritingStyles[styleName] = true;
}
static function isInheritingStyle(styleName) {
return(inheritingStyles[styleName] == true);
}
static function registerColorStyle(styleName) {
colorStyles[styleName] = true;
}
static function isColorStyle(styleName) {
return(colorStyles[styleName] == true);
}
static function registerColorName(colorName, colorValue) {
colorNames[colorName] = colorValue;
}
static function isColorName(colorName) {
return(colorNames[colorName] != undefined);
}
static function getColorName(colorName) {
return(colorNames[colorName]);
}
static var inheritingStyles = {color:true, direction:true, fontFamily:true, fontSize:true, fontStyle:true, fontWeight:true, textAlign:true, textIndent:true};
static var colorStyles = {barColor:true, trackColor:true, borderColor:true, buttonColor:true, color:true, dateHeaderColor:true, dateRollOverColor:true, disabledColor:true, fillColor:true, highlightColor:true, scrollTrackColor:true, selectedDateColor:true, shadowColor:true, strokeColor:true, symbolBackgroundColor:true, symbolBackgroundDisabledColor:true, symbolBackgroundPressedColor:true, symbolColor:true, symbolDisabledColor:true, themeColor:true, todayIndicatorColor:true, shadowCapColor:true, borderCapColor:true, focusColor:true};
static var colorNames = {black:0, white:16777215, red:16711680, green:65280, blue:255, magenta:16711935, yellow:16776960, cyan:65535, haloGreen:8453965, haloBlue:2881013, haloOrange:16761344};
static var TextFormatStyleProps = {font:true, size:true, color:true, leftMargin:false, rightMargin:false, italic:true, bold:true, align:true, indent:true, underline:false, embedFonts:false};
static var TextStyleMap = {textAlign:true, fontWeight:true, color:true, fontFamily:true, textIndent:true, fontStyle:true, lineHeight:true, marginLeft:true, marginRight:true, fontSize:true, textDecoration:true, embedFonts:true};
}
Symbol 101 MovieClip [__Packages.mx.styles.CSSStyleDeclaration] Frame 0
class mx.styles.CSSStyleDeclaration
{
var _tf;
function CSSStyleDeclaration () {
}
function __getTextFormat(tf, bAll) {
var _local5 = false;
if (_tf != undefined) {
var _local2;
for (_local2 in mx.styles.StyleManager.TextFormatStyleProps) {
if (bAll || (mx.styles.StyleManager.TextFormatStyleProps[_local2])) {
if (tf[_local2] == undefined) {
var _local3 = _tf[_local2];
if (_local3 != undefined) {
tf[_local2] = _local3;
} else {
_local5 = true;
}
}
}
}
} else {
_local5 = true;
}
return(_local5);
}
function getStyle(styleProp) {
var _local2 = this[styleProp];
var _local3 = mx.styles.StyleManager.getColorName(_local2);
return(((_local3 == undefined) ? (_local2) : (_local3)));
}
static function classConstruct() {
mx.styles.CSSTextStyles.addTextStyles(mx.styles.CSSStyleDeclaration.prototype, true);
return(true);
}
static var classConstructed = classConstruct();
static var CSSTextStylesDependency = mx.styles.CSSTextStyles;
}
Symbol 102 MovieClip [__Packages.mx.skins.Border] Frame 0
class mx.skins.Border extends mx.core.UIObject
{
function Border () {
super();
}
function init(Void) {
super.init();
}
static var symbolName = "Border";
static var symbolOwner = mx.skins.Border;
var className = "Border";
var tagBorder = 0;
var idNames = new Array("border_mc");
}
Symbol 103 MovieClip [__Packages.mx.skins.RectBorder] Frame 0
class mx.skins.RectBorder extends mx.skins.Border
{
var __width, __height, offset, __borderMetrics;
function RectBorder () {
super();
}
function get width() {
return(__width);
}
function get height() {
return(__height);
}
function init(Void) {
super.init();
}
function draw(Void) {
size();
}
function getBorderMetrics(Void) {
var _local2 = offset;
if (__borderMetrics == undefined) {
__borderMetrics = {left:_local2, top:_local2, right:_local2, bottom:_local2};
} else {
__borderMetrics.left = _local2;
__borderMetrics.top = _local2;
__borderMetrics.right = _local2;
__borderMetrics.bottom = _local2;
}
return(__borderMetrics);
}
function get borderMetrics() {
return(getBorderMetrics());
}
function drawBorder(Void) {
}
function size(Void) {
drawBorder();
}
function setColor(Void) {
drawBorder();
}
static var symbolName = "RectBorder";
static var symbolOwner = mx.skins.RectBorder;
static var version = "2.0.1.78";
var className = "RectBorder";
var borderStyleName = "borderStyle";
var borderColorName = "borderColor";
var shadowColorName = "shadowColor";
var highlightColorName = "highlightColor";
var buttonColorName = "buttonColor";
var backgroundColorName = "backgroundColor";
}
Symbol 104 MovieClip [__Packages.mx.managers.DepthManager] Frame 0
class mx.managers.DepthManager
{
var _childCounter, createClassObject, createObject, _parent, swapDepths, _topmost, getDepth;
function DepthManager () {
MovieClip.prototype.createClassChildAtDepth = createClassChildAtDepth;
MovieClip.prototype.createChildAtDepth = createChildAtDepth;
MovieClip.prototype.setDepthTo = setDepthTo;
MovieClip.prototype.setDepthAbove = setDepthAbove;
MovieClip.prototype.setDepthBelow = setDepthBelow;
MovieClip.prototype.findNextAvailableDepth = findNextAvailableDepth;
MovieClip.prototype.shuffleDepths = shuffleDepths;
MovieClip.prototype.getDepthByFlag = getDepthByFlag;
MovieClip.prototype.buildDepthTable = buildDepthTable;
_global.ASSetPropFlags(MovieClip.prototype, "createClassChildAtDepth", 1);
_global.ASSetPropFlags(MovieClip.prototype, "createChildAtDepth", 1);
_global.ASSetPropFlags(MovieClip.prototype, "setDepthTo", 1);
_global.ASSetPropFlags(MovieClip.prototype, "setDepthAbove", 1);
_global.ASSetPropFlags(MovieClip.prototype, "setDepthBelow", 1);
_global.ASSetPropFlags(MovieClip.prototype, "findNextAvailableDepth", 1);
_global.ASSetPropFlags(MovieClip.prototype, "shuffleDepths", 1);
_global.ASSetPropFlags(MovieClip.prototype, "getDepthByFlag", 1);
_global.ASSetPropFlags(MovieClip.prototype, "buildDepthTable", 1);
}
static function sortFunction(a, b) {
if (a.getDepth() > b.getDepth()) {
return(1);
}
return(-1);
}
static function test(depth) {
if (depth == reservedDepth) {
return(false);
}
return(true);
}
static function createClassObjectAtDepth(className, depthSpace, initObj) {
var _local1;
switch (depthSpace) {
case kCursor :
_local1 = holder.createClassChildAtDepth(className, kTopmost, initObj);
break;
case kTooltip :
_local1 = holder.createClassChildAtDepth(className, kTop, initObj);
break;
}
return(_local1);
}
static function createObjectAtDepth(linkageName, depthSpace, initObj) {
var _local1;
switch (depthSpace) {
case kCursor :
_local1 = holder.createChildAtDepth(linkageName, kTopmost, initObj);
break;
case kTooltip :
_local1 = holder.createChildAtDepth(linkageName, kTop, initObj);
break;
}
return(_local1);
}
function createClassChildAtDepth(className, depthFlag, initObj) {
if (_childCounter == undefined) {
_childCounter = 0;
}
var _local3 = buildDepthTable();
var _local2 = getDepthByFlag(depthFlag, _local3);
var _local6 = "down";
if (depthFlag == kBottom) {
_local6 = "up";
}
var _local5;
if (_local3[_local2] != undefined) {
_local5 = _local2;
_local2 = findNextAvailableDepth(_local2, _local3, _local6);
}
var _local4 = createClassObject(className, "depthChild" + (_childCounter++), _local2, initObj);
if (_local5 != undefined) {
_local3[_local2] = _local4;
shuffleDepths(_local4, _local5, _local3, _local6);
}
if (depthFlag == kTopmost) {
_local4._topmost = true;
}
return(_local4);
}
function createChildAtDepth(linkageName, depthFlag, initObj) {
if (_childCounter == undefined) {
_childCounter = 0;
}
var _local3 = buildDepthTable();
var _local2 = getDepthByFlag(depthFlag, _local3);
var _local6 = "down";
if (depthFlag == kBottom) {
_local6 = "up";
}
var _local5;
if (_local3[_local2] != undefined) {
_local5 = _local2;
_local2 = findNextAvailableDepth(_local2, _local3, _local6);
}
var _local4 = createObject(linkageName, "depthChild" + (_childCounter++), _local2, initObj);
if (_local5 != undefined) {
_local3[_local2] = _local4;
shuffleDepths(_local4, _local5, _local3, _local6);
}
if (depthFlag == kTopmost) {
_local4._topmost = true;
}
return(_local4);
}
function setDepthTo(depthFlag) {
var _local2 = _parent.buildDepthTable();
var _local3 = _parent.getDepthByFlag(depthFlag, _local2);
if (_local2[_local3] != undefined) {
shuffleDepths(this, _local3, _local2, undefined);
} else {
swapDepths(_local3);
}
if (depthFlag == kTopmost) {
_topmost = true;
} else {
delete _topmost;
}
}
function setDepthAbove(targetInstance) {
if (targetInstance._parent != _parent) {
return(undefined);
}
var _local2 = targetInstance.getDepth() + 1;
var _local3 = _parent.buildDepthTable();
if ((_local3[_local2] != undefined) && (getDepth() < _local2)) {
_local2 = _local2 - 1;
}
if (_local2 > highestDepth) {
_local2 = highestDepth;
}
if (_local2 == highestDepth) {
_parent.shuffleDepths(this, _local2, _local3, "down");
} else if (_local3[_local2] != undefined) {
_parent.shuffleDepths(this, _local2, _local3, undefined);
} else {
swapDepths(_local2);
}
}
function setDepthBelow(targetInstance) {
if (targetInstance._parent != _parent) {
return(undefined);
}
var _local6 = targetInstance.getDepth() - 1;
var _local3 = _parent.buildDepthTable();
if ((_local3[_local6] != undefined) && (getDepth() > _local6)) {
_local6 = _local6 + 1;
}
var _local4 = lowestDepth + numberOfAuthortimeLayers;
var _local5;
for (_local5 in _local3) {
var _local2 = _local3[_local5];
if (_local2._parent != undefined) {
_local4 = Math.min(_local4, _local2.getDepth());
}
}
if (_local6 < _local4) {
_local6 = _local4;
}
if (_local6 == _local4) {
_parent.shuffleDepths(this, _local6, _local3, "up");
} else if (_local3[_local6] != undefined) {
_parent.shuffleDepths(this, _local6, _local3, undefined);
} else {
swapDepths(_local6);
}
}
function findNextAvailableDepth(targetDepth, depthTable, direction) {
var _local5 = lowestDepth + numberOfAuthortimeLayers;
if (targetDepth < _local5) {
targetDepth = _local5;
}
if (depthTable[targetDepth] == undefined) {
return(targetDepth);
}
var _local2 = targetDepth;
var _local1 = targetDepth;
if (direction == "down") {
while (depthTable[_local1] != undefined) {
_local1--;
}
return(_local1);
}
while (depthTable[_local2] != undefined) {
_local2++;
}
return(_local2);
}
function shuffleDepths(subject, targetDepth, depthTable, direction) {
var _local9 = lowestDepth + numberOfAuthortimeLayers;
var _local8 = _local9;
var _local5;
for (_local5 in depthTable) {
var _local7 = depthTable[_local5];
if (_local7._parent != undefined) {
_local9 = Math.min(_local9, _local7.getDepth());
}
}
if (direction == undefined) {
if (subject.getDepth() > targetDepth) {
direction = "up";
} else {
direction = "down";
}
}
var _local1 = new Array();
for (_local5 in depthTable) {
var _local7 = depthTable[_local5];
if (_local7._parent != undefined) {
_local1.push(_local7);
}
}
_local1.sort(sortFunction);
if (direction == "up") {
var _local3;
var _local11;
do {
if (_local1.length <= 0) {
break;
}
_local3 = _local1.pop();
} while (_local3 != subject);
do {
if (_local1.length <= 0) {
break;
}
_local11 = subject.getDepth();
_local3 = _local1.pop();
var _local4 = _local3.getDepth();
if (_local11 > (_local4 + 1)) {
if (_local4 >= 0) {
subject.swapDepths(_local4 + 1);
} else if ((_local11 > _local8) && (_local4 < _local8)) {
subject.swapDepths(_local8);
}
}
subject.swapDepths(_local3);
} while (_local4 != targetDepth);
} else if (direction == "down") {
var _local3;
do {
if (_local1.length <= 0) {
break;
}
_local3 = _local1.shift();
} while (_local3 != subject);
do {
if (_local1.length <= 0) {
break;
}
var _local11 = _local3.getDepth();
_local3 = _local1.shift();
var _local4 = _local3.getDepth();
if ((_local11 < (_local4 - 1)) && (_local4 > 0)) {
subject.swapDepths(_local4 - 1);
}
subject.swapDepths(_local3);
} while (_local4 != targetDepth);
}
}
function getDepthByFlag(depthFlag, depthTable) {
var _local2 = 0;
if ((depthFlag == kTop) || (depthFlag == kNotopmost)) {
var _local5 = 0;
var _local7 = false;
var _local8;
for (_local8 in depthTable) {
var _local9 = depthTable[_local8];
var _local3 = typeof(_local9);
if ((_local3 == "movieclip") || ((_local3 == "object") && (_local9.__getTextFormat != undefined))) {
if (_local9.getDepth() <= highestDepth) {
if (!_local9._topmost) {
_local2 = Math.max(_local2, _local9.getDepth());
} else if (!_local7) {
_local5 = _local9.getDepth();
_local7 = true;
} else {
_local5 = Math.min(_local5, _local9.getDepth());
}
}
}
}
_local2 = _local2 + 20;
if (_local7) {
if (_local2 >= _local5) {
_local2 = _local5 - 1;
}
}
} else if (depthFlag == kBottom) {
for (var _local8 in depthTable) {
var _local9 = depthTable[_local8];
var _local3 = typeof(_local9);
if ((_local3 == "movieclip") || ((_local3 == "object") && (_local9.__getTextFormat != undefined))) {
if (_local9.getDepth() <= highestDepth) {
_local2 = Math.min(_local2, _local9.getDepth());
}
}
}
_local2 = _local2 - 20;
} else if (depthFlag == kTopmost) {
for (var _local8 in depthTable) {
var _local9 = depthTable[_local8];
var _local3 = typeof(_local9);
if ((_local3 == "movieclip") || ((_local3 == "object") && (_local9.__getTextFormat != undefined))) {
if (_local9.getDepth() <= highestDepth) {
_local2 = Math.max(_local2, _local9.getDepth());
}
}
}
_local2 = _local2 + 100;
}
if (_local2 >= highestDepth) {
_local2 = highestDepth;
}
var _local6 = lowestDepth + numberOfAuthortimeLayers;
for (var _local9 in depthTable) {
var _local4 = depthTable[_local9];
if (_local4._parent != undefined) {
_local6 = Math.min(_local6, _local4.getDepth());
}
}
if (_local2 <= _local6) {
_local2 = _local6;
}
return(_local2);
}
function buildDepthTable(Void) {
var _local5 = new Array();
var _local4;
for (_local4 in this) {
var _local2 = this[_local4];
var _local3 = typeof(_local2);
if ((_local3 == "movieclip") || ((_local3 == "object") && (_local2.__getTextFormat != undefined))) {
if (_local2._parent == this) {
_local5[_local2.getDepth()] = _local2;
}
}
}
return(_local5);
}
static var reservedDepth = 1048575;
static var highestDepth = 1048574;
static var lowestDepth = -16383;
static var numberOfAuthortimeLayers = 383;
static var kCursor = 101;
static var kTooltip = 102;
static var kTop = 201;
static var kBottom = 202;
static var kTopmost = 203;
static var kNotopmost = 204;
static var holder = _root.createEmptyMovieClip("reserved", reservedDepth);
static var __depthManager = new mx.managers.DepthManager();
}
Symbol 105 MovieClip [__Packages.mx.events.EventDispatcher] Frame 0
class mx.events.EventDispatcher
{
function EventDispatcher () {
}
static function _removeEventListener(queue, event, handler) {
if (queue != undefined) {
var _local4 = queue.length;
var _local1;
_local1 = 0;
while (_local1 < _local4) {
var _local2 = queue[_local1];
if (_local2 == handler) {
queue.splice(_local1, 1);
return(undefined);
}
_local1++;
}
}
}
static function initialize(object) {
if (_fEventDispatcher == undefined) {
_fEventDispatcher = new mx.events.EventDispatcher();
}
object.addEventListener = _fEventDispatcher.addEventListener;
object.removeEventListener = _fEventDispatcher.removeEventListener;
object.dispatchEvent = _fEventDispatcher.dispatchEvent;
object.dispatchQueue = _fEventDispatcher.dispatchQueue;
}
function dispatchQueue(queueObj, eventObj) {
var _local7 = "__q_" + eventObj.type;
var _local4 = queueObj[_local7];
if (_local4 != undefined) {
var _local5;
for (_local5 in _local4) {
var _local1 = _local4[_local5];
var _local3 = typeof(_local1);
if ((_local3 == "object") || (_local3 == "movieclip")) {
if (_local1.handleEvent != undefined) {
_local1.handleEvent(eventObj);
}
if (_local1[eventObj.type] != undefined) {
if (exceptions[eventObj.type] == undefined) {
_local1[eventObj.type](eventObj);
}
}
} else {
_local1.apply(queueObj, [eventObj]);
}
}
}
}
function dispatchEvent(eventObj) {
if (eventObj.target == undefined) {
eventObj.target = this;
}
this[eventObj.type + "Handler"](eventObj);
dispatchQueue(this, eventObj);
}
function addEventListener(event, handler) {
var _local3 = "__q_" + event;
if (this[_local3] == undefined) {
this[_local3] = new Array();
}
_global.ASSetPropFlags(this, _local3, 1);
_removeEventListener(this[_local3], event, handler);
this[_local3].push(handler);
}
function removeEventListener(event, handler) {
var _local2 = "__q_" + event;
_removeEventListener(this[_local2], event, handler);
}
static var _fEventDispatcher = undefined;
static var exceptions = {move:1, draw:1};
}
Symbol 106 MovieClip [__Packages.mx.events.UIEventDispatcher] Frame 0
class mx.events.UIEventDispatcher extends mx.events.EventDispatcher
{
var dispatchQueue, owner, __sentLoadEvent, __origAddEventListener;
function UIEventDispatcher () {
super();
}
static function addKeyEvents(obj) {
if (obj.keyHandler == undefined) {
var _local1 = (obj.keyHandler = new Object());
_local1.owner = obj;
_local1.onKeyDown = _fEventDispatcher.onKeyDown;
_local1.onKeyUp = _fEventDispatcher.onKeyUp;
}
Key.addListener(obj.keyHandler);
}
static function removeKeyEvents(obj) {
Key.removeListener(obj.keyHandler);
}
static function addLoadEvents(obj) {
if (obj.onLoad == undefined) {
obj.onLoad = _fEventDispatcher.onLoad;
obj.onUnload = _fEventDispatcher.onUnload;
if (obj.getBytesTotal() == obj.getBytesLoaded()) {
obj.doLater(obj, "onLoad");
}
}
}
static function removeLoadEvents(obj) {
delete obj.onLoad;
delete obj.onUnload;
}
static function initialize(obj) {
if (_fEventDispatcher == undefined) {
_fEventDispatcher = new mx.events.UIEventDispatcher();
}
obj.addEventListener = _fEventDispatcher.__addEventListener;
obj.__origAddEventListener = _fEventDispatcher.addEventListener;
obj.removeEventListener = _fEventDispatcher.removeEventListener;
obj.dispatchEvent = _fEventDispatcher.dispatchEvent;
obj.dispatchQueue = _fEventDispatcher.dispatchQueue;
}
function dispatchEvent(eventObj) {
if (eventObj.target == undefined) {
eventObj.target = this;
}
this[eventObj.type + "Handler"](eventObj);
dispatchQueue(mx.events.EventDispatcher, eventObj);
dispatchQueue(this, eventObj);
}
function onKeyDown(Void) {
owner.dispatchEvent({type:"keyDown", code:Key.getCode(), ascii:Key.getAscii(), shiftKey:Key.isDown(16), ctrlKey:Key.isDown(17)});
}
function onKeyUp(Void) {
owner.dispatchEvent({type:"keyUp", code:Key.getCode(), ascii:Key.getAscii(), shiftKey:Key.isDown(16), ctrlKey:Key.isDown(17)});
}
function onLoad(Void) {
if (__sentLoadEvent != true) {
dispatchEvent({type:"load"});
}
__sentLoadEvent = true;
}
function onUnload(Void) {
dispatchEvent({type:"unload"});
}
function __addEventListener(event, handler) {
__origAddEventListener(event, handler);
var _local3 = lowLevelEvents;
for (var _local5 in _local3) {
if (mx.events.UIEventDispatcher[_local5][event] != undefined) {
var _local2 = _local3[_local5][0];
mx.events.UIEventDispatcher[_local2](this);
}
}
}
function removeEventListener(event, handler) {
var _local6 = "__q_" + event;
mx.events.EventDispatcher._removeEventListener(this[_local6], event, handler);
if (this[_local6].length == 0) {
var _local2 = lowLevelEvents;
for (var _local5 in _local2) {
if (mx.events.UIEventDispatcher[_local5][event] != undefined) {
var _local3 = _local2[_local5][1];
mx.events.UIEventDispatcher[_local2[_local5][1]](this);
}
}
}
}
static var keyEvents = {keyDown:1, keyUp:1};
static var loadEvents = {load:1, unload:1};
static var lowLevelEvents = {keyEvents:["addKeyEvents", "removeKeyEvents"], loadEvents:["addLoadEvents", "removeLoadEvents"]};
static var _fEventDispatcher = undefined;
}
Symbol 107 MovieClip [__Packages.mx.core.ExternalContent] Frame 0
class mx.core.ExternalContent
{
var createObject, numChildren, prepList, doLater, loadList, dispatchEvent, loadedList, childLoaded;
function ExternalContent () {
}
function loadExternal(url, placeholderClassName, instanceName, depth, initProps) {
var _local2;
_local2 = createObject(placeholderClassName, instanceName, depth, initProps);
this[mx.core.View.childNameBase + numChildren] = _local2;
if (prepList == undefined) {
prepList = new Object();
}
prepList[instanceName] = {obj:_local2, url:url, complete:false, initProps:initProps};
prepareToLoadMovie(_local2);
return(_local2);
}
function prepareToLoadMovie(obj) {
obj.unloadMovie();
doLater(this, "waitForUnload");
}
function waitForUnload() {
var _local3;
for (_local3 in prepList) {
var _local2 = prepList[_local3];
if (_local2.obj.getBytesTotal() == 0) {
if (loadList == undefined) {
loadList = new Object();
}
loadList[_local3] = _local2;
_local2.obj.loadMovie(_local2.url);
delete prepList[_local3];
doLater(this, "checkLoadProgress");
} else {
doLater(this, "waitForUnload");
}
}
}
function checkLoadProgress() {
var _local3;
for (_local3 in loadList) {
var _local2 = loadList[_local3];
_local2.loaded = _local2.obj.getBytesLoaded();
_local2.total = _local2.obj.getBytesTotal();
if (_local2.total > 0) {
_local2.obj._visible = false;
dispatchEvent({type:"progress", target:_local2.obj, current:_local2.loaded, total:_local2.total});
if (_local2.loaded == _local2.total) {
if (loadedList == undefined) {
loadedList = new Object();
}
loadedList[_local3] = _local2;
delete loadList[_local3];
doLater(this, "contentLoaded");
}
} else if (_local2.total == -1) {
if (_local2.failedOnce != undefined) {
_local2.failedOnce++;
if (_local2.failedOnce > 3) {
dispatchEvent({type:"complete", target:_local2.obj, current:_local2.loaded, total:_local2.total});
delete loadList[_local3];
}
} else {
_local2.failedOnce = 0;
}
}
doLater(this, "checkLoadProgress");
}
}
function contentLoaded() {
var _local4;
for (_local4 in loadedList) {
var _local2 = loadedList[_local4];
_local2.obj._visible = true;
_local2.obj._complete = true;
var _local3;
for (_local3 in _local2.initProps) {
_local2.obj[_local3] = _local2.initProps[_local3];
}
childLoaded(_local2.obj);
dispatchEvent({type:"complete", target:_local2.obj, current:_local2.loaded, total:_local2.total});
delete loadedList[_local4];
}
}
function convertToUIObject(obj) {
if (obj.setSize == undefined) {
var _local2 = mx.core.UIObject.prototype;
obj.addProperty("width", _local2.__get__width, null);
obj.addProperty("height", _local2.__get__height, null);
obj.addProperty("left", _local2.__get__left, null);
obj.addProperty("x", _local2.__get__x, null);
obj.addProperty("top", _local2.__get__top, null);
obj.addProperty("y", _local2.__get__y, null);
obj.addProperty("right", _local2.__get__right, null);
obj.addProperty("bottom", _local2.__get__bottom, null);
obj.addProperty("visible", _local2.__get__visible, _local2.__set__visible);
obj.move = mx.core.UIObject.prototype.move;
obj.setSize = mx.core.UIObject.prototype.setSize;
obj.size = mx.core.UIObject.prototype.size;
mx.events.UIEventDispatcher.initialize(obj);
}
}
static function enableExternalContent() {
}
static function classConstruct() {
var _local1 = mx.core.View.prototype;
var _local2 = mx.core.ExternalContent.prototype;
_local1.loadExternal = _local2.loadExternal;
_local1.prepareToLoadMovie = _local2.prepareToLoadMovie;
_local1.waitForUnload = _local2.waitForUnload;
_local1.checkLoadProgress = _local2.checkLoadProgress;
_local1.contentLoaded = _local2.contentLoaded;
_local1.convertToUIObject = _local2.convertToUIObject;
return(true);
}
static var classConstructed = classConstruct();
static var ViewDependency = mx.core.View;
}
Symbol 108 MovieClip [__Packages.mx.controls.SimpleButton] Frame 0
class mx.controls.SimpleButton extends mx.core.UIComponent
{
static var emphasizedStyleDeclaration;
var preset, boundingBox_mc, useHandCursor, skinName, linkLength, iconName, destroyObject, __width, _width, __height, _height, __emphaticStyleName, styleName, enabled, invalidate, pressFocus, dispatchEvent, autoRepeat, interval, getStyle, releaseFocus, createLabel, invalidateStyle;
function SimpleButton () {
super();
}
function init(Void) {
super.init();
if (preset == undefined) {
boundingBox_mc._visible = false;
boundingBox_mc._width = (boundingBox_mc._height = 0);
}
useHandCursor = false;
}
function createChildren(Void) {
if (preset != undefined) {
var _local2 = this[idNames[preset]];
this[refNames[preset]] = _local2;
skinName = _local2;
if (falseOverSkin.length == 0) {
rolloverSkin = fus;
}
if (falseOverIcon.length == 0) {
rolloverIcon = fui;
}
initializing = false;
} else if (__state == true) {
setStateVar(true);
} else {
if (falseOverSkin.length == 0) {
rolloverSkin = fus;
}
if (falseOverIcon.length == 0) {
rolloverIcon = fui;
}
}
}
function setIcon(tag, linkageName) {
return(setSkin(tag + 8, linkageName));
}
function changeIcon(tag, linkageName) {
linkLength = linkageName.length;
var _local2 = stateNames[tag] + "Icon";
this[_local2] = linkageName;
this[idNames[tag + 8]] = _local2;
setStateVar(getState());
}
function changeSkin(tag, linkageName) {
var _local2 = stateNames[tag] + "Skin";
this[_local2] = linkageName;
this[idNames[tag]] = _local2;
setStateVar(getState());
}
function viewIcon(varName) {
var _local4 = varName + "Icon";
var _local3 = this[_local4];
if (typeof(_local3) == "string") {
var _local5 = _local3;
if (__emphasized) {
if (this[_local3 + "Emphasized"].length > 0) {
_local3 = _local3 + "Emphasized";
}
}
if (this[_local3].length == 0) {
return(undefined);
}
_local3 = setIcon(tagMap[_local5], this[_local3]);
if ((_local3 == undefined) && (_global.isLivePreview)) {
_local3 = setIcon(0, "ButtonIcon");
}
this[_local4] = _local3;
}
iconName._visible = false;
iconName = _local3;
iconName._visible = true;
}
function removeIcons() {
var _local3 = 0;
while (_local3 < 2) {
var _local2 = 8;
while (_local2 < 16) {
destroyObject(idNames[_local2]);
this[stateNames[_local2 - 8] + "Icon"] = "";
_local2++;
}
_local3++;
}
refresh();
}
function setSkin(tag, linkageName, initobj) {
var _local3 = super.setSkin(tag, linkageName, ((initobj != undefined) ? (initobj) : ({styleName:this})));
calcSize(tag, _local3);
return(_local3);
}
function calcSize(Void) {
__width = _width;
__height = _height;
}
function viewSkin(varName, initObj) {
var _local3 = varName + "Skin";
var _local2 = this[_local3];
if (typeof(_local2) == "string") {
var _local4 = _local2;
if (__emphasized) {
if (this[_local2 + "Emphasized"].length > 0) {
_local2 = _local2 + "Emphasized";
}
}
if (this[_local2].length == 0) {
return(undefined);
}
_local2 = setSkin(tagMap[_local4], this[_local2], ((initObj != undefined) ? (initObj) : ({styleName:this})));
this[_local3] = _local2;
}
skinName._visible = false;
skinName = _local2;
skinName._visible = true;
}
function showEmphasized(e) {
if (e && (!__emphatic)) {
if (emphasizedStyleDeclaration != undefined) {
__emphaticStyleName = styleName;
styleName = emphasizedStyleDeclaration;
}
__emphatic = true;
} else {
if (__emphatic) {
styleName = __emphaticStyleName;
}
__emphatic = false;
}
}
function refresh(Void) {
var _local2 = getState();
if (enabled == false) {
viewIcon("disabled");
viewSkin("disabled");
} else {
viewSkin(phase);
viewIcon(phase);
}
setView(phase == "down");
iconName.enabled = enabled;
}
function setView(offset) {
if (iconName == undefined) {
return(undefined);
}
var _local2 = (offset ? (btnOffset) : 0);
iconName._x = ((__width - iconName._width) / 2) + _local2;
iconName._y = ((__height - iconName._height) / 2) + _local2;
}
function setStateVar(state) {
if (state) {
if (trueOverSkin.length == 0) {
rolloverSkin = tus;
} else {
rolloverSkin = trs;
}
if (trueOverIcon.length == 0) {
rolloverIcon = tui;
} else {
rolloverIcon = tri;
}
upSkin = tus;
downSkin = tds;
disabledSkin = dts;
upIcon = tui;
downIcon = tdi;
disabledIcon = dti;
} else {
if (falseOverSkin.length == 0) {
rolloverSkin = fus;
} else {
rolloverSkin = frs;
}
if (falseOverIcon.length == 0) {
rolloverIcon = fui;
} else {
rolloverIcon = fri;
}
upSkin = fus;
downSkin = fds;
disabledSkin = dfs;
upIcon = fui;
downIcon = fdi;
disabledIcon = dfi;
}
__state = state;
}
function setState(state) {
if (state != __state) {
setStateVar(state);
invalidate();
}
}
function size(Void) {
refresh();
}
function draw(Void) {
if (initializing) {
initializing = false;
skinName.visible = true;
iconName.visible = true;
}
size();
}
function getState(Void) {
return(__state);
}
function setToggle(val) {
__toggle = val;
if (__toggle == false) {
setState(false);
}
}
function getToggle(Void) {
return(__toggle);
}
function set toggle(val) {
setToggle(val);
//return(toggle);
}
function get toggle() {
return(getToggle());
}
function set value(val) {
setSelected(val);
//return(value);
}
function get value() {
return(getSelected());
}
function set selected(val) {
setSelected(val);
//return(selected);
}
function get selected() {
return(getSelected());
}
function setSelected(val) {
if (__toggle) {
setState(val);
} else {
setState((initializing ? (val) : (__state)));
}
}
function getSelected() {
return(__state);
}
function setEnabled(val) {
if (enabled != val) {
super.setEnabled(val);
invalidate();
}
}
function onPress(Void) {
pressFocus();
phase = "down";
refresh();
dispatchEvent({type:"buttonDown"});
if (autoRepeat) {
interval = setInterval(this, "onPressDelay", getStyle("repeatDelay"));
}
}
function onPressDelay(Void) {
dispatchEvent({type:"buttonDown"});
if (autoRepeat) {
clearInterval(interval);
interval = setInterval(this, "onPressRepeat", getStyle("repeatInterval"));
}
}
function onPressRepeat(Void) {
dispatchEvent({type:"buttonDown"});
updateAfterEvent();
}
function onRelease(Void) {
releaseFocus();
phase = "rollover";
if (interval != undefined) {
clearInterval(interval);
delete interval;
}
if (getToggle()) {
setState(!getState());
} else {
refresh();
}
dispatchEvent({type:"click"});
}
function onDragOut(Void) {
phase = "up";
refresh();
dispatchEvent({type:"buttonDragOut"});
}
function onDragOver(Void) {
if (phase != "up") {
onPress();
return(undefined);
}
phase = "down";
refresh();
}
function onReleaseOutside(Void) {
releaseFocus();
phase = "up";
if (interval != undefined) {
clearInterval(interval);
delete interval;
}
}
function onRollOver(Void) {
phase = "rollover";
refresh();
}
function onRollOut(Void) {
phase = "up";
refresh();
}
function getLabel(Void) {
return(fui.text);
}
function setLabel(val) {
if (typeof(fui) == "string") {
createLabel("fui", 8, val);
fui.styleName = this;
} else {
fui.text = val;
}
var _local4 = fui._getTextFormat();
var _local2 = _local4.getTextExtent2(val);
fui._width = _local2.width + 5;
fui._height = _local2.height + 5;
iconName = fui;
setView(__state);
}
function get emphasized() {
return(__emphasized);
}
function set emphasized(val) {
__emphasized = val;
var _local2 = 0;
while (_local2 < 8) {
this[idNames[_local2]] = stateNames[_local2] + "Skin";
if (typeof(this[idNames[_local2 + 8]]) == "movieclip") {
this[idNames[_local2 + 8]] = stateNames[_local2] + "Icon";
}
_local2++;
}
showEmphasized(__emphasized);
setStateVar(__state);
invalidateStyle();
//return(emphasized);
}
function keyDown(e) {
if (e.code == 32) {
onPress();
}
}
function keyUp(e) {
if (e.code == 32) {
onRelease();
}
}
function onKillFocus(newFocus) {
super.onKillFocus();
if (phase != "up") {
phase = "up";
refresh();
}
}
static var symbolName = "SimpleButton";
static var symbolOwner = mx.controls.SimpleButton;
static var version = "2.0.1.78";
var className = "SimpleButton";
var style3dInset = 4;
var btnOffset = 1;
var __toggle = false;
var __state = false;
var __emphasized = false;
var __emphatic = false;
static var falseUp = 0;
static var falseDown = 1;
static var falseOver = 2;
static var falseDisabled = 3;
static var trueUp = 4;
static var trueDown = 5;
static var trueOver = 6;
static var trueDisabled = 7;
var falseUpSkin = "SimpleButtonUp";
var falseDownSkin = "SimpleButtonIn";
var falseOverSkin = "";
var falseDisabledSkin = "SimpleButtonUp";
var trueUpSkin = "SimpleButtonIn";
var trueDownSkin = "";
var trueOverSkin = "";
var trueDisabledSkin = "SimpleButtonIn";
var falseUpIcon = "";
var falseDownIcon = "";
var falseOverIcon = "";
var falseDisabledIcon = "";
var trueUpIcon = "";
var trueDownIcon = "";
var trueOverIcon = "";
var trueDisabledIcon = "";
var phase = "up";
var fui = "falseUpIcon";
var fus = "falseUpSkin";
var fdi = "falseDownIcon";
var fds = "falseDownSkin";
var frs = "falseOverSkin";
var fri = "falseOverIcon";
var dfi = "falseDisabledIcon";
var dfs = "falseDisabledSkin";
var tui = "trueUpIcon";
var tus = "trueUpSkin";
var tdi = "trueDownIcon";
var tds = "trueDownSkin";
var trs = "trueOverSkin";
var tri = "trueOverIcon";
var dts = "trueDisabledSkin";
var dti = "trueDisabledIcon";
var rolloverSkin = mx.controls.SimpleButton.prototype.frs;
var rolloverIcon = mx.controls.SimpleButton.prototype.fri;
var upSkin = mx.controls.SimpleButton.prototype.fus;
var downSkin = mx.controls.SimpleButton.prototype.fds;
var disabledSkin = mx.controls.SimpleButton.prototype.dfs;
var upIcon = mx.controls.SimpleButton.prototype.fui;
var downIcon = mx.controls.SimpleButton.prototype.fdi;
var disabledIcon = mx.controls.SimpleButton.prototype.dfi;
var initializing = true;
var idNames = ["fus", "fds", "frs", "dfs", "tus", "tds", "trs", "dts", "fui", "fdi", "fri", "dfi", "tui", "tdi", "tri", "dti"];
var stateNames = ["falseUp", "falseDown", "falseOver", "falseDisabled", "trueUp", "trueDown", "trueOver", "trueDisabled"];
var refNames = ["upSkin", "downSkin", "rolloverSkin", "disabledSkin"];
var tagMap = {falseUpSkin:0, falseDownSkin:1, falseOverSkin:2, falseDisabledSkin:3, trueUpSkin:4, trueDownSkin:5, trueOverSkin:6, trueDisabledSkin:7, falseUpIcon:0, falseDownIcon:1, falseOverIcon:2, falseDisabledIcon:3, trueUpIcon:4, trueDownIcon:5, trueOverIcon:6, trueDisabledIcon:7};
}
Symbol 109 MovieClip [__Packages.mx.skins.CustomBorder] Frame 0
class mx.skins.CustomBorder extends mx.skins.Border
{
var __width, __height, l_mc, setSkin, minHeight, minWidth, m_mc, r_mc;
function CustomBorder () {
super();
}
function get width() {
return(__width);
}
function get height() {
return(__height);
}
function init(Void) {
super.init();
}
function createChildren(Void) {
}
function draw(Void) {
if (l_mc == undefined) {
var _local2 = setSkin(tagL, leftSkin);
if (horizontal) {
minHeight = l_mc._height;
minWidth = l_mc._width;
} else {
minHeight = l_mc._height;
minWidth = l_mc._width;
}
}
if (m_mc == undefined) {
setSkin(tagM, middleSkin);
if (horizontal) {
minHeight = m_mc._height;
minWidth = minWidth + m_mc._width;
} else {
minHeight = minHeight + m_mc._height;
minWidth = m_mc._width;
}
}
if (r_mc == undefined) {
setSkin(tagR, rightSkin);
if (horizontal) {
minHeight = r_mc._height;
minWidth = minWidth + r_mc._width;
} else {
minHeight = minHeight + r_mc._height;
minWidth = r_mc._width;
}
}
size();
}
function size(Void) {
l_mc.move(0, 0);
if (horizontal) {
r_mc.move(width - r_mc.width, 0);
m_mc.move(l_mc.width, 0);
m_mc.setSize(r_mc.x - m_mc.x, m_mc.height);
} else {
r_mc.move(0, height - r_mc.height, 0);
m_mc.move(0, l_mc.height);
m_mc.setSize(m_mc.width, r_mc.y - m_mc.y);
}
}
static var symbolName = "CustomBorder";
static var symbolOwner = mx.skins.CustomBorder;
static var version = "2.0.1.78";
var className = "CustomBorder";
static var tagL = 0;
static var tagM = 1;
static var tagR = 2;
var idNames = new Array("l_mc", "m_mc", "r_mc");
var leftSkin = "F3PieceLeft";
var middleSkin = "F3PieceMiddle";
var rightSkin = "F3PieceRight";
var horizontal = true;
}
Symbol 110 MovieClip [__Packages.mx.controls.scrollClasses.ScrollThumb] Frame 0
class mx.controls.scrollClasses.ScrollThumb extends mx.skins.CustomBorder
{
var useHandCursor, ymin, ymax, datamin, datamax, scrollMove, lastY, _ymouse, _y, _parent, onMouseMove, grip_mc, setSkin, gripSkin, __get__width, __get__height;
function ScrollThumb () {
super();
}
function createChildren(Void) {
super.createChildren();
useHandCursor = false;
}
function setRange(_ymin, _ymax, _datamin, _datamax) {
ymin = _ymin;
ymax = _ymax;
datamin = _datamin;
datamax = _datamax;
}
function dragThumb(Void) {
scrollMove = _ymouse - lastY;
scrollMove = scrollMove + _y;
if (scrollMove < ymin) {
scrollMove = ymin;
} else if (scrollMove > ymax) {
scrollMove = ymax;
}
_parent.isScrolling = true;
_y = scrollMove;
var _local2 = Math.round(((datamax - datamin) * (_y - ymin)) / (ymax - ymin)) + datamin;
_parent.scrollPosition = _local2;
_parent.dispatchScrollEvent("ThumbTrack");
updateAfterEvent();
}
function stopDragThumb(Void) {
_parent.isScrolling = false;
_parent.dispatchScrollEvent("ThumbPosition");
_parent.dispatchScrollChangedEvent();
delete onMouseMove;
}
function onPress(Void) {
_parent.pressFocus();
lastY = _ymouse;
onMouseMove = dragThumb;
super.onPress();
}
function onRelease(Void) {
_parent.releaseFocus();
stopDragThumb();
super.onRelease();
}
function onReleaseOutside(Void) {
_parent.releaseFocus();
stopDragThumb();
super.onReleaseOutside();
}
function draw() {
super.draw();
if (grip_mc == undefined) {
setSkin(3, gripSkin);
}
}
function size() {
super.size();
grip_mc.move((__get__width() - grip_mc.width) / 2, (__get__height() - grip_mc.height) / 2);
}
static var symbolOwner = mx.skins.CustomBorder.symbolOwner;
var className = "ScrollThumb";
var btnOffset = 0;
var horizontal = false;
var idNames = new Array("l_mc", "m_mc", "r_mc", "grip_mc");
}
Symbol 111 MovieClip [__Packages.mx.controls.scrollClasses.ScrollBar] Frame 0
class mx.controls.scrollClasses.ScrollBar extends mx.core.UIComponent
{
var isScrolling, scrollTrack_mc, scrollThumb_mc, __height, tabEnabled, focusEnabled, boundingBox_mc, setSkin, upArrow_mc, _minHeight, _minWidth, downArrow_mc, createObject, createClassObject, enabled, _height, dispatchEvent, minMode, maxMode, plusMode, minusMode, _parent, getStyle, scrolling, _ymouse;
function ScrollBar () {
super();
}
function get scrollPosition() {
return(_scrollPosition);
}
function set scrollPosition(pos) {
_scrollPosition = pos;
if (isScrolling != true) {
pos = Math.min(pos, maxPos);
pos = Math.max(pos, minPos);
var _local3 = (((pos - minPos) * (scrollTrack_mc.height - scrollThumb_mc._height)) / (maxPos - minPos)) + scrollTrack_mc.top;
scrollThumb_mc.move(0, _local3);
}
//return(scrollPosition);
}
function get pageScrollSize() {
return(largeScroll);
}
function set pageScrollSize(lScroll) {
largeScroll = lScroll;
//return(pageScrollSize);
}
function set lineScrollSize(sScroll) {
smallScroll = sScroll;
//return(lineScrollSize);
}
function get lineScrollSize() {
return(smallScroll);
}
function get virtualHeight() {
return(__height);
}
function init(Void) {
super.init();
_scrollPosition = 0;
tabEnabled = false;
focusEnabled = false;
boundingBox_mc._visible = false;
boundingBox_mc._width = (boundingBox_mc._height = 0);
}
function createChildren(Void) {
if (scrollTrack_mc == undefined) {
setSkin(skinIDTrack, scrollTrackName);
}
scrollTrack_mc.visible = false;
var _local3 = new Object();
_local3.enabled = false;
_local3.preset = mx.controls.SimpleButton.falseDisabled;
_local3.initProperties = 0;
_local3.autoRepeat = true;
_local3.tabEnabled = false;
var _local2;
if (upArrow_mc == undefined) {
_local2 = createButton(upArrowName, "upArrow_mc", skinIDUpArrow, _local3);
}
_local2.buttonDownHandler = onUpArrow;
_local2.clickHandler = onScrollChanged;
_minHeight = _local2.height;
_minWidth = _local2.width;
if (downArrow_mc == undefined) {
_local2 = createButton(downArrowName, "downArrow_mc", skinIDDownArrow, _local3);
}
_local2.buttonDownHandler = onDownArrow;
_local2.clickHandler = onScrollChanged;
_minHeight = _minHeight + _local2.height;
}
function createButton(linkageName, id, skinID, o) {
if (skinID == skinIDUpArrow) {
o.falseUpSkin = upArrowUpName;
o.falseDownSkin = upArrowDownName;
o.falseOverSkin = upArrowOverName;
} else {
o.falseUpSkin = downArrowUpName;
o.falseDownSkin = downArrowDownName;
o.falseOverSkin = downArrowOverName;
}
var _local3 = createObject(linkageName, id, skinID, o);
this[id].visible = false;
this[id].useHandCursor = false;
return(_local3);
}
function createThumb(Void) {
var _local2 = new Object();
_local2.validateNow = true;
_local2.tabEnabled = false;
_local2.leftSkin = thumbTopName;
_local2.middleSkin = thumbMiddleName;
_local2.rightSkin = thumbBottomName;
_local2.gripSkin = thumbGripName;
createClassObject(mx.controls.scrollClasses.ScrollThumb, "scrollThumb_mc", skinIDThumb, _local2);
}
function setScrollProperties(pSize, mnPos, mxPos, ls) {
var _local4;
var _local2 = scrollTrack_mc;
pageSize = pSize;
largeScroll = (((ls != undefined) && (ls > 0)) ? (ls) : (pSize));
minPos = Math.max(mnPos, 0);
maxPos = Math.max(mxPos, 0);
_scrollPosition = Math.max(minPos, _scrollPosition);
_scrollPosition = Math.min(maxPos, _scrollPosition);
if (((maxPos - minPos) > 0) && (enabled)) {
var _local5 = _scrollPosition;
if (!initializing) {
upArrow_mc.enabled = true;
downArrow_mc.enabled = true;
}
_local2.onPress = (_local2.onDragOver = startTrackScroller);
_local2.onRelease = releaseScrolling;
_local2.onDragOut = (_local2.stopScrolling = stopScrolling);
_local2.onReleaseOutside = releaseScrolling;
_local2.useHandCursor = false;
if (scrollThumb_mc == undefined) {
createThumb();
}
var _local3 = scrollThumb_mc;
if (scrollTrackOverName.length > 0) {
_local2.onRollOver = trackOver;
_local2.onRollOut = trackOut;
}
_local4 = (pageSize / ((maxPos - minPos) + pageSize)) * _local2.height;
if (_local4 < _local3.minHeight) {
if (_local2.height < _local3.minHeight) {
_local3.__set__visible(false);
} else {
_local4 = _local3.minHeight;
_local3.__set__visible(true);
_local3.setSize(_minWidth, _local3.minHeight + 0);
}
} else {
_local3.__set__visible(true);
_local3.setSize(_minWidth, _local4);
}
_local3.setRange(upArrow_mc.__get__height() + 0, (virtualHeight - downArrow_mc.__get__height()) - _local3.__get__height(), minPos, maxPos);
_local5 = Math.min(_local5, maxPos);
scrollPosition = (Math.max(_local5, minPos));
} else {
scrollThumb_mc.__set__visible(false);
if (!initializing) {
upArrow_mc.enabled = false;
downArrow_mc.enabled = false;
}
delete _local2.onPress;
delete _local2.onDragOver;
delete _local2.onRelease;
delete _local2.onDragOut;
delete _local2.onRollOver;
delete _local2.onRollOut;
delete _local2.onReleaseOutside;
}
if (initializing) {
scrollThumb_mc.__set__visible(false);
}
}
function setEnabled(enabledFlag) {
super.setEnabled(enabledFlag);
setScrollProperties(pageSize, minPos, maxPos, largeScroll);
}
function draw(Void) {
if (initializing) {
initializing = false;
scrollTrack_mc.visible = true;
upArrow_mc.__set__visible(true);
downArrow_mc.__set__visible(true);
}
size();
}
function size(Void) {
if (_height == 1) {
return(undefined);
}
if (upArrow_mc == undefined) {
return(undefined);
}
var _local3 = upArrow_mc.__get__height();
var _local2 = downArrow_mc.__get__height();
upArrow_mc.move(0, 0);
var _local4 = scrollTrack_mc;
_local4._y = _local3;
_local4._height = (virtualHeight - _local3) - _local2;
downArrow_mc.move(0, virtualHeight - _local2);
setScrollProperties(pageSize, minPos, maxPos, largeScroll);
}
function dispatchScrollEvent(detail) {
dispatchEvent({type:"scroll", detail:detail});
}
function isScrollBarKey(k) {
if (k == 36) {
if (scrollPosition != 0) {
scrollPosition = (0);
dispatchScrollEvent(minMode);
}
return(true);
}
if (k == 35) {
if (scrollPosition < maxPos) {
scrollPosition = (maxPos);
dispatchScrollEvent(maxMode);
}
return(true);
}
return(false);
}
function scrollIt(inc, mode) {
var _local3 = smallScroll;
if (inc != "Line") {
_local3 = ((largeScroll == 0) ? (pageSize) : (largeScroll));
}
var _local2 = _scrollPosition + (mode * _local3);
if (_local2 > maxPos) {
_local2 = maxPos;
} else if (_local2 < minPos) {
_local2 = minPos;
}
if (scrollPosition != _local2) {
scrollPosition = (_local2);
var _local4 = ((mode < 0) ? (minusMode) : (plusMode));
dispatchScrollEvent(inc + _local4);
}
}
function startTrackScroller(Void) {
_parent.pressFocus();
if (_parent.scrollTrackDownName.length > 0) {
if (_parent.scrollTrackDown_mc == undefined) {
_parent.setSkin(skinIDTrackDown, scrollTrackDownName);
} else {
_parent.scrollTrackDown_mc.visible = true;
}
}
_parent.trackScroller();
_parent.scrolling = setInterval(_parent, "scrollInterval", getStyle("repeatDelay"), "Page", -1);
}
function scrollInterval(inc, mode) {
clearInterval(scrolling);
if (inc == "Page") {
trackScroller();
} else {
scrollIt(inc, mode);
}
scrolling = setInterval(this, "scrollInterval", getStyle("repeatInterval"), inc, mode);
}
function trackScroller(Void) {
if ((scrollThumb_mc._y + scrollThumb_mc.__get__height()) < _ymouse) {
scrollIt("Page", 1);
} else if (scrollThumb_mc._y > _ymouse) {
scrollIt("Page", -1);
}
}
function dispatchScrollChangedEvent(Void) {
dispatchEvent({type:"scrollChanged"});
}
function stopScrolling(Void) {
clearInterval(_parent.scrolling);
_parent.scrollTrackDown_mc.visible = false;
}
function releaseScrolling(Void) {
_parent.releaseFocus();
stopScrolling();
_parent.dispatchScrollChangedEvent();
}
function trackOver(Void) {
if (_parent.scrollTrackOverName.length > 0) {
if (_parent.scrollTrackOver_mc == undefined) {
_parent.setSkin(skinIDTrackOver, scrollTrackOverName);
} else {
_parent.scrollTrackOver_mc.visible = true;
}
}
}
function trackOut(Void) {
_parent.scrollTrackOver_mc.visible = false;
}
function onUpArrow(Void) {
_parent.scrollIt("Line", -1);
}
function onDownArrow(Void) {
_parent.scrollIt("Line", 1);
}
function onScrollChanged(Void) {
_parent.dispatchScrollChangedEvent();
}
static var symbolOwner = mx.core.UIComponent;
var className = "ScrollBar";
var minPos = 0;
var maxPos = 0;
var pageSize = 0;
var largeScroll = 0;
var smallScroll = 1;
var _scrollPosition = 0;
var scrollTrackName = "ScrollTrack";
var scrollTrackOverName = "";
var scrollTrackDownName = "";
var upArrowName = "BtnUpArrow";
var upArrowUpName = "ScrollUpArrowUp";
var upArrowOverName = "ScrollUpArrowOver";
var upArrowDownName = "ScrollUpArrowDown";
var downArrowName = "BtnDownArrow";
var downArrowUpName = "ScrollDownArrowUp";
var downArrowOverName = "ScrollDownArrowOver";
var downArrowDownName = "ScrollDownArrowDown";
var thumbTopName = "ScrollThumbTopUp";
var thumbMiddleName = "ScrollThumbMiddleUp";
var thumbBottomName = "ScrollThumbBottomUp";
var thumbGripName = "ScrollThumbGripUp";
static var skinIDTrack = 0;
static var skinIDTrackOver = 1;
static var skinIDTrackDown = 2;
static var skinIDUpArrow = 3;
static var skinIDDownArrow = 4;
static var skinIDThumb = 5;
var idNames = new Array("scrollTrack_mc", "scrollTrackOver_mc", "scrollTrackDown_mc", "upArrow_mc", "downArrow_mc");
var clipParameters = {minPos:1, maxPos:1, pageSize:1, scrollPosition:1, lineScrollSize:1, pageScrollSize:1, visible:1, enabled:1};
static var mergedClipParameters = mx.core.UIObject.mergeClipParameters(mx.controls.scrollClasses.ScrollBar.prototype.clipParameters, mx.core.UIComponent.prototype.clipParameters);
var initializing = true;
}
Symbol 112 MovieClip [__Packages.mx.controls.HScrollBar] Frame 0
class mx.controls.HScrollBar extends mx.controls.scrollClasses.ScrollBar
{
var _minHeight, _minWidth, _xscale, _rotation, __width, scrollIt;
function HScrollBar () {
super();
}
function getMinWidth(Void) {
return(_minHeight);
}
function getMinHeight(Void) {
return(_minWidth);
}
function init(Void) {
super.init();
_xscale = -100;
_rotation = -90;
}
function get virtualHeight() {
return(__width);
}
function isScrollBarKey(k) {
if (k == 37) {
scrollIt("Line", -1);
return(true);
}
if (k == 39) {
scrollIt("Line", 1);
return(true);
}
return(super.isScrollBarKey(k));
}
static var symbolName = "HScrollBar";
static var symbolOwner = mx.core.UIComponent;
static var version = "2.0.1.78";
var className = "HScrollBar";
var minusMode = "Left";
var plusMode = "Right";
var minMode = "AtLeft";
var maxMode = "AtRight";
}
Symbol 113 MovieClip [__Packages.mx.controls.Button] Frame 0
class mx.controls.Button extends mx.controls.SimpleButton
{
var initializing, labelPath, initIcon, getState, enabled, phase, idNames, __width, __height, setState, invalidate, iconName, refresh, createLabel, _iconLinkageName, removeIcons, hitArea_mc, createEmptyObject;
function Button () {
super();
}
function init(Void) {
super.init();
}
function draw() {
if (initializing) {
labelPath.visible = true;
}
super.draw();
if (initIcon != undefined) {
_setIcon(initIcon);
}
delete initIcon;
}
function onRelease(Void) {
super.onRelease();
}
function createChildren(Void) {
super.createChildren();
}
function setSkin(tag, linkageName, initobj) {
return(super.setSkin(tag, linkageName, initobj));
}
function viewSkin(varName) {
var _local3 = (getState() ? "true" : "false");
_local3 = _local3 + (enabled ? (phase) : "disabled");
super.viewSkin(varName, {styleName:this, borderStyle:_local3});
}
function invalidateStyle(c) {
labelPath.invalidateStyle(c);
super.invalidateStyle(c);
}
function setColor(c) {
var _local2 = 0;
while (_local2 < 8) {
this[idNames[_local2]].redraw(true);
_local2++;
}
}
function setEnabled(enable) {
labelPath.enabled = enable;
super.setEnabled(enable);
}
function calcSize(tag, ref) {
if ((__width == undefined) || (__height == undefined)) {
return(undefined);
}
if (tag < 7) {
ref.setSize(__width, __height, true);
}
}
function size(Void) {
setState(getState());
setHitArea(__width, __height);
var _local3 = 0;
while (_local3 < 8) {
var _local4 = idNames[_local3];
if (typeof(this[_local4]) == "movieclip") {
this[_local4].setSize(__width, __height, true);
}
_local3++;
}
super.size();
}
function set labelPlacement(val) {
__labelPlacement = val;
invalidate();
//return(labelPlacement);
}
function get labelPlacement() {
return(__labelPlacement);
}
function getLabelPlacement(Void) {
return(__labelPlacement);
}
function setLabelPlacement(val) {
__labelPlacement = val;
invalidate();
}
function getBtnOffset(Void) {
if (getState()) {
var _local2 = btnOffset;
} else if (phase == "down") {
var _local2 = btnOffset;
} else {
var _local2 = 0;
}
return(_local2);
}
function setView(offset) {
var _local16 = (offset ? (btnOffset) : 0);
var _local12 = getLabelPlacement();
var _local7 = 0;
var _local6 = 0;
var _local9 = 0;
var _local8 = 0;
var _local5 = 0;
var _local4 = 0;
var _local3 = labelPath;
var _local2 = iconName;
var _local15 = _local3.textWidth;
var _local14 = _local3.textHeight;
var _local10 = (__width - borderW) - borderW;
var _local11 = (__height - borderW) - borderW;
if (_local2 != undefined) {
_local7 = _local2._width;
_local6 = _local2._height;
}
if ((_local12 == "left") || (_local12 == "right")) {
if (_local3 != undefined) {
_local9 = Math.min(_local10 - _local7, _local15 + 5);
_local3._width = _local9;
_local8 = Math.min(_local11, _local14 + 5);
_local3._height = _local8;
}
if (_local12 == "right") {
_local5 = _local7;
if (centerContent) {
_local5 = _local5 + (((_local10 - _local9) - _local7) / 2);
}
_local2._x = _local5 - _local7;
} else {
_local5 = (_local10 - _local9) - _local7;
if (centerContent) {
_local5 = _local5 / 2;
}
_local2._x = _local5 + _local9;
}
_local4 = 0;
_local2._y = _local4;
if (centerContent) {
_local2._y = (_local11 - _local6) / 2;
_local4 = (_local11 - _local8) / 2;
}
if (!centerContent) {
_local2._y = _local2._y + Math.max(0, (_local8 - _local6) / 2);
}
} else {
if (_local3 != undefined) {
_local9 = Math.min(_local10, _local15 + 5);
_local3._width = _local9;
_local8 = Math.min(_local11 - _local6, _local14 + 5);
_local3._height = _local8;
}
_local5 = (_local10 - _local9) / 2;
_local2._x = (_local10 - _local7) / 2;
if (_local12 == "top") {
_local4 = (_local11 - _local8) - _local6;
if (centerContent) {
_local4 = _local4 / 2;
}
_local2._y = _local4 + _local8;
} else {
_local4 = _local6;
if (centerContent) {
_local4 = _local4 + (((_local11 - _local8) - _local6) / 2);
}
_local2._y = _local4 - _local6;
}
}
var _local13 = borderW + _local16;
_local3._x = _local5 + _local13;
_local3._y = _local4 + _local13;
_local2._x = _local2._x + _local13;
_local2._y = _local2._y + _local13;
}
function set label(lbl) {
setLabel(lbl);
//return(label);
}
function setLabel(label) {
if (label == "") {
labelPath.removeTextField();
refresh();
return(undefined);
}
if (labelPath == undefined) {
var _local2 = createLabel("labelPath", 200, label);
_local2._width = _local2.textWidth + 5;
_local2._height = _local2.textHeight + 5;
if (initializing) {
_local2.visible = false;
}
} else {
delete labelPath.__text;
labelPath.text = label;
refresh();
}
}
function getLabel(Void) {
return(((labelPath.__text != undefined) ? (labelPath.__text) : (labelPath.text)));
}
function get label() {
return(getLabel());
}
function _getIcon(Void) {
return(_iconLinkageName);
}
function get icon() {
if (initializing) {
return(initIcon);
}
return(_iconLinkageName);
}
function _setIcon(linkage) {
if (initializing) {
if (linkage == "") {
return(undefined);
}
initIcon = linkage;
} else {
if (linkage == "") {
removeIcons();
return(undefined);
}
super.changeIcon(0, linkage);
super.changeIcon(1, linkage);
super.changeIcon(3, linkage);
super.changeIcon(4, linkage);
super.changeIcon(5, linkage);
_iconLinkageName = linkage;
refresh();
}
}
function set icon(linkage) {
_setIcon(linkage);
//return(icon);
}
function setHitArea(w, h) {
if (hitArea_mc == undefined) {
createEmptyObject("hitArea_mc", 100);
}
var _local2 = hitArea_mc;
_local2.clear();
_local2.beginFill(16711680);
_local2.drawRect(0, 0, w, h);
_local2.endFill();
_local2.setVisible(false);
}
static var symbolName = "Button";
static var symbolOwner = mx.controls.Button;
var className = "Button";
static var version = "2.0.1.78";
var btnOffset = 0;
var _color = "buttonColor";
var __label = "default value";
var __labelPlacement = "right";
var falseUpSkin = "ButtonSkin";
var falseDownSkin = "ButtonSkin";
var falseOverSkin = "ButtonSkin";
var falseDisabledSkin = "ButtonSkin";
var trueUpSkin = "ButtonSkin";
var trueDownSkin = "ButtonSkin";
var trueOverSkin = "ButtonSkin";
var trueDisabledSkin = "ButtonSkin";
var falseUpIcon = "";
var falseDownIcon = "";
var falseOverIcon = "";
var falseDisabledIcon = "";
var trueUpIcon = "";
var trueDownIcon = "";
var trueOverIcon = "";
var trueDisabledIcon = "";
var clipParameters = {labelPlacement:1, icon:1, toggle:1, selected:1, label:1};
static var mergedClipParameters = mx.core.UIObject.mergeClipParameters(mx.controls.Button.prototype.clipParameters, mx.controls.SimpleButton.prototype.clipParameters);
var centerContent = true;
var borderW = 1;
}
Symbol 114 MovieClip [__Packages.mx.skins.ColoredSkinElement] Frame 0
class mx.skins.ColoredSkinElement
{
var getStyle, _color, onEnterFrame;
function ColoredSkinElement () {
}
function setColor(c) {
if (c != undefined) {
var _local2 = new Color(this);
_local2.setRGB(c);
}
}
function draw(Void) {
setColor(getStyle(_color));
onEnterFrame = undefined;
}
function invalidateStyle(Void) {
onEnterFrame = draw;
}
static function setColorStyle(p, colorStyle) {
if (p._color == undefined) {
p._color = colorStyle;
}
p.setColor = mixins.setColor;
p.invalidateStyle = mixins.invalidateStyle;
p.draw = mixins.draw;
p.setColor(p.getStyle(colorStyle));
}
static var mixins = new mx.skins.ColoredSkinElement();
}
Symbol 115 MovieClip [__Packages.mx.core.ext.UIObjectExtensions] Frame 0
class mx.core.ext.UIObjectExtensions
{
function UIObjectExtensions () {
}
static function addGeometry(tf, ui) {
tf.addProperty("width", ui.__get__width, null);
tf.addProperty("height", ui.__get__height, null);
tf.addProperty("left", ui.__get__left, null);
tf.addProperty("x", ui.__get__x, null);
tf.addProperty("top", ui.__get__top, null);
tf.addProperty("y", ui.__get__y, null);
tf.addProperty("right", ui.__get__right, null);
tf.addProperty("bottom", ui.__get__bottom, null);
tf.addProperty("visible", ui.__get__visible, ui.__set__visible);
}
static function Extensions() {
if (bExtended == true) {
return(true);
}
bExtended = true;
var _local6 = mx.core.UIObject.prototype;
var _local9 = mx.skins.SkinElement.prototype;
addGeometry(_local9, _local6);
mx.events.UIEventDispatcher.initialize(_local6);
var _local13 = mx.skins.ColoredSkinElement;
mx.styles.CSSTextStyles.addTextStyles(_local6);
var _local5 = MovieClip.prototype;
_local5.getTopLevel = _local6.getTopLevel;
_local5.createLabel = _local6.createLabel;
_local5.createObject = _local6.createObject;
_local5.createClassObject = _local6.createClassObject;
_local5.createEmptyObject = _local6.createEmptyObject;
_local5.destroyObject = _local6.destroyObject;
_global.ASSetPropFlags(_local5, "getTopLevel", 1);
_global.ASSetPropFlags(_local5, "createLabel", 1);
_global.ASSetPropFlags(_local5, "createObject", 1);
_global.ASSetPropFlags(_local5, "createClassObject", 1);
_global.ASSetPropFlags(_local5, "createEmptyObject", 1);
_global.ASSetPropFlags(_local5, "destroyObject", 1);
_local5.__getTextFormat = _local6.__getTextFormat;
_local5._getTextFormat = _local6._getTextFormat;
_local5.getStyleName = _local6.getStyleName;
_local5.getStyle = _local6.getStyle;
_global.ASSetPropFlags(_local5, "__getTextFormat", 1);
_global.ASSetPropFlags(_local5, "_getTextFormat", 1);
_global.ASSetPropFlags(_local5, "getStyleName", 1);
_global.ASSetPropFlags(_local5, "getStyle", 1);
var _local7 = TextField.prototype;
addGeometry(_local7, _local6);
_local7.addProperty("enabled", function () {
return(this.__enabled);
}, function (x) {
this.__enabled = x;
this.invalidateStyle();
});
_local7.move = _local9.move;
_local7.setSize = _local9.setSize;
_local7.invalidateStyle = function () {
this.invalidateFlag = true;
};
_local7.draw = function () {
if (this.invalidateFlag) {
this.invalidateFlag = false;
var _local2 = this._getTextFormat();
this.setTextFormat(_local2);
this.setNewTextFormat(_local2);
this.embedFonts = _local2.embedFonts == true;
if (this.__text != undefined) {
if (this.text == "") {
this.text = this.__text;
}
delete this.__text;
}
this._visible = true;
}
};
_local7.setColor = function (color) {
this.textColor = color;
};
_local7.getStyle = _local5.getStyle;
_local7.__getTextFormat = _local6.__getTextFormat;
_local7.setValue = function (v) {
this.text = v;
};
_local7.getValue = function () {
return(this.text);
};
_local7.addProperty("value", function () {
return(this.getValue());
}, function (v) {
this.setValue(v);
});
_local7._getTextFormat = function () {
var _local2 = this.stylecache.tf;
if (_local2 != undefined) {
return(_local2);
}
_local2 = new TextFormat();
this.__getTextFormat(_local2);
this.stylecache.tf = _local2;
if (this.__enabled == false) {
if (this.enabledColor == undefined) {
var _local4 = this.getTextFormat();
this.enabledColor = _local4.color;
}
var _local3 = this.getStyle("disabledColor");
_local2.color = _local3;
} else if (this.enabledColor != undefined) {
if (_local2.color == undefined) {
_local2.color = this.enabledColor;
}
}
return(_local2);
};
_local7.getPreferredWidth = function () {
this.draw();
return(this.textWidth + 4);
};
_local7.getPreferredHeight = function () {
this.draw();
return(this.textHeight + 4);
};
TextFormat.prototype.getTextExtent2 = function (s) {
var _local3 = _root._getTextExtent;
if (_local3 == undefined) {
_root.createTextField("_getTextExtent", -2, 0, 0, 1000, 100);
_local3 = _root._getTextExtent;
_local3._visible = false;
}
_root._getTextExtent.text = s;
var _local4 = this.align;
this.align = "left";
_root._getTextExtent.setTextFormat(this);
this.align = _local4;
return({width:_local3.textWidth, height:_local3.textHeight});
};
if (_global.style == undefined) {
_global.style = new mx.styles.CSSStyleDeclaration();
_global.cascadingStyles = true;
_global.styles = new Object();
_global.skinRegistry = new Object();
if (_global._origWidth == undefined) {
_global.origWidth = Stage.width;
_global.origHeight = Stage.height;
}
}
var _local4 = _root;
while (_local4._parent != undefined) {
_local4 = _local4._parent;
}
_local4.addProperty("width", function () {
return(Stage.width);
}, null);
_local4.addProperty("height", function () {
return(Stage.height);
}, null);
_global.ASSetPropFlags(_local4, "width", 1);
_global.ASSetPropFlags(_local4, "height", 1);
return(true);
}
static var bExtended = false;
static var UIObjectExtended = Extensions();
static var UIObjectDependency = mx.core.UIObject;
static var SkinElementDependency = mx.skins.SkinElement;
static var CSSTextStylesDependency = mx.styles.CSSTextStyles;
static var UIEventDispatcherDependency = mx.events.UIEventDispatcher;
}
Symbol 116 MovieClip [__Packages.mx.skins.halo.Defaults] Frame 0
class mx.skins.halo.Defaults
{
var beginGradientFill, beginFill, moveTo, lineTo, curveTo, endFill;
function Defaults () {
}
static function setThemeDefaults() {
var _local2 = _global.style;
_local2.themeColor = 8453965 /* 0x80FF4D */;
_local2.disabledColor = 8684164 /* 0x848284 */;
_local2.modalTransparency = 0;
_local2.filled = true;
_local2.stroked = true;
_local2.strokeWidth = 1;
_local2.strokeColor = 0;
_local2.fillColor = 16777215 /* 0xFFFFFF */;
_local2.repeatInterval = 35;
_local2.repeatDelay = 500;
_local2.fontFamily = "_sans";
_local2.fontSize = 12;
_local2.selectionColor = 13500353 /* 0xCDFFC1 */;
_local2.rollOverColor = 14942166 /* 0xE3FFD6 */;
_local2.useRollOver = true;
_local2.backgroundDisabledColor = 14540253 /* 0xDDDDDD */;
_local2.selectionDisabledColor = 14540253 /* 0xDDDDDD */;
_local2.selectionDuration = 200;
_local2.openDuration = 250;
_local2.borderStyle = "inset";
_local2.color = 734012 /* 0x0B333C */;
_local2.textSelectedColor = 24371;
_local2.textRollOverColor = 2831164 /* 0x2B333C */;
_local2.textDisabledColor = 16777215 /* 0xFFFFFF */;
_local2.vGridLines = true;
_local2.hGridLines = false;
_local2.vGridLineColor = 6710886 /* 0x666666 */;
_local2.hGridLineColor = 6710886 /* 0x666666 */;
_local2.headerColor = 15395562 /* 0xEAEAEA */;
_local2.indentation = 17;
_local2.folderOpenIcon = "TreeFolderOpen";
_local2.folderClosedIcon = "TreeFolderClosed";
_local2.defaultLeafIcon = "TreeNodeIcon";
_local2.disclosureOpenIcon = "TreeDisclosureOpen";
_local2.disclosureClosedIcon = "TreeDisclosureClosed";
_local2.popupDuration = 150;
_local2.todayColor = 6710886 /* 0x666666 */;
_local2 = (_global.styles.ScrollSelectList = new mx.styles.CSSStyleDeclaration());
_local2.backgroundColor = 16777215 /* 0xFFFFFF */;
_local2.borderColor = 13290186 /* 0xCACACA */;
_local2.borderStyle = "inset";
_local2 = (_global.styles.ComboBox = new mx.styles.CSSStyleDeclaration());
_local2.borderStyle = "inset";
_local2 = (_global.styles.NumericStepper = new mx.styles.CSSStyleDeclaration());
_local2.textAlign = "center";
_local2 = (_global.styles.RectBorder = new mx.styles.CSSStyleDeclaration());
_local2.borderColor = 14015965 /* 0xD5DDDD */;
_local2.buttonColor = 7305079 /* 0x6F7777 */;
_local2.shadowColor = 15658734 /* 0xEEEEEE */;
_local2.highlightColor = 12897484 /* 0xC4CCCC */;
_local2.shadowCapColor = 14015965 /* 0xD5DDDD */;
_local2.borderCapColor = 9542041 /* 0x919999 */;
var _local4 = new Object();
_local4.borderColor = 16711680 /* 0xFF0000 */;
_local4.buttonColor = 16711680 /* 0xFF0000 */;
_local4.shadowColor = 16711680 /* 0xFF0000 */;
_local4.highlightColor = 16711680 /* 0xFF0000 */;
_local4.shadowCapColor = 16711680 /* 0xFF0000 */;
_local4.borderCapColor = 16711680 /* 0xFF0000 */;
mx.core.UIComponent.prototype.origBorderStyles = _local4;
var _local3;
_local3 = (_global.styles.TextInput = new mx.styles.CSSStyleDeclaration());
_local3.backgroundColor = 16777215 /* 0xFFFFFF */;
_local3.borderStyle = "inset";
_global.styles.TextArea = _global.styles.TextInput;
_local3 = (_global.styles.Window = new mx.styles.CSSStyleDeclaration());
_local3.borderStyle = "default";
_local3 = (_global.styles.windowStyles = new mx.styles.CSSStyleDeclaration());
_local3.fontWeight = "bold";
_local3 = (_global.styles.dataGridStyles = new mx.styles.CSSStyleDeclaration());
_local3.fontWeight = "bold";
_local3 = (_global.styles.Alert = new mx.styles.CSSStyleDeclaration());
_local3.borderStyle = "alert";
_local3 = (_global.styles.ScrollView = new mx.styles.CSSStyleDeclaration());
_local3.borderStyle = "inset";
_local3 = (_global.styles.View = new mx.styles.CSSStyleDeclaration());
_local3.borderStyle = "none";
_local3 = (_global.styles.ProgressBar = new mx.styles.CSSStyleDeclaration());
_local3.color = 11187123 /* 0xAAB3B3 */;
_local3.fontWeight = "bold";
_local3 = (_global.styles.AccordionHeader = new mx.styles.CSSStyleDeclaration());
_local3.fontWeight = "bold";
_local3.fontSize = "11";
_local3 = (_global.styles.Accordion = new mx.styles.CSSStyleDeclaration());
_local3.borderStyle = "solid";
_local3.backgroundColor = 16777215 /* 0xFFFFFF */;
_local3.borderColor = 9081738 /* 0x8A938A */;
_local3.headerHeight = 22;
_local3.marginLeft = (_local3.marginRight = (_local3.marginTop = (_local3.marginBottom = -1)));
_local3.verticalGap = -1;
_local3 = (_global.styles.DateChooser = new mx.styles.CSSStyleDeclaration());
_local3.borderColor = 9542041 /* 0x919999 */;
_local3.headerColor = 16777215 /* 0xFFFFFF */;
_local3 = (_global.styles.CalendarLayout = new mx.styles.CSSStyleDeclaration());
_local3.fontSize = 10;
_local3.textAlign = "right";
_local3.color = 2831164 /* 0x2B333C */;
_local3 = (_global.styles.WeekDayStyle = new mx.styles.CSSStyleDeclaration());
_local3.fontWeight = "bold";
_local3.fontSize = 11;
_local3.textAlign = "center";
_local3.color = 2831164 /* 0x2B333C */;
_local3 = (_global.styles.TodayStyle = new mx.styles.CSSStyleDeclaration());
_local3.color = 16777215 /* 0xFFFFFF */;
_local3 = (_global.styles.HeaderDateText = new mx.styles.CSSStyleDeclaration());
_local3.fontSize = 12;
_local3.fontWeight = "bold";
_local3.textAlign = "center";
}
function drawRoundRect(x, y, w, h, r, c, alpha, rot, gradient, ratios) {
if (typeof(r) == "object") {
var _local18 = r.br;
var _local16 = r.bl;
var _local15 = r.tl;
var _local10 = r.tr;
} else {
var _local10 = r;
var _local15 = _local10;
var _local16 = _local15;
var _local18 = _local16;
}
if (typeof(c) == "object") {
if (typeof(alpha) != "object") {
var _local9 = [alpha, alpha];
} else {
var _local9 = alpha;
}
if (ratios == undefined) {
ratios = [0, 255];
}
var _local14 = h * 0.7;
if (typeof(rot) != "object") {
var _local11 = {matrixType:"box", x:-_local14, y:_local14, w:w * 2, h:h * 4, r:rot * 0.0174532925199433 /* Math.PI/180 */};
} else {
var _local11 = rot;
}
if (gradient == "radial") {
beginGradientFill("radial", c, _local9, ratios, _local11);
} else {
beginGradientFill("linear", c, _local9, ratios, _local11);
}
} else if (c != undefined) {
beginFill(c, alpha);
}
r = _local18;
var _local13 = r - (r * 0.707106781186547);
var _local12 = r - (r * 0.414213562373095);
moveTo(x + w, (y + h) - r);
lineTo(x + w, (y + h) - r);
curveTo(x + w, (y + h) - _local12, (x + w) - _local13, (y + h) - _local13);
curveTo((x + w) - _local12, y + h, (x + w) - r, y + h);
r = _local16;
_local13 = r - (r * 0.707106781186547);
_local12 = r - (r * 0.414213562373095);
lineTo(x + r, y + h);
curveTo(x + _local12, y + h, x + _local13, (y + h) - _local13);
curveTo(x, (y + h) - _local12, x, (y + h) - r);
r = _local15;
_local13 = r - (r * 0.707106781186547);
_local12 = r - (r * 0.414213562373095);
lineTo(x, y + r);
curveTo(x, y + _local12, x + _local13, y + _local13);
curveTo(x + _local12, y, x + r, y);
r = _local10;
_local13 = r - (r * 0.707106781186547);
_local12 = r - (r * 0.414213562373095);
lineTo((x + w) - r, y);
curveTo((x + w) - _local12, y, (x + w) - _local13, y + _local13);
curveTo(x + w, y + _local12, x + w, y + r);
lineTo(x + w, (y + h) - r);
if (c != undefined) {
endFill();
}
}
static function classConstruct() {
mx.core.ext.UIObjectExtensions.Extensions();
setThemeDefaults();
mx.core.UIObject.prototype.drawRoundRect = mx.skins.halo.Defaults.prototype.drawRoundRect;
return(true);
}
static var classConstructed = classConstruct();
static var CSSStyleDeclarationDependency = mx.styles.CSSStyleDeclaration;
static var UIObjectExtensionsDependency = mx.core.ext.UIObjectExtensions;
static var UIObjectDependency = mx.core.UIObject;
}
Symbol 117 MovieClip [__Packages.mx.managers.SystemManager] Frame 0
class mx.managers.SystemManager
{
static var _xAddEventListener, addEventListener, __addEventListener, _xRemoveEventListener, removeEventListener, __removeEventListener, form, __screen, dispatchEvent;
function SystemManager () {
}
static function init(Void) {
if (_initialized == false) {
_initialized = true;
mx.events.EventDispatcher.initialize(mx.managers.SystemManager);
Mouse.addListener(mx.managers.SystemManager);
Stage.addListener(mx.managers.SystemManager);
_xAddEventListener = addEventListener;
addEventListener = __addEventListener;
_xRemoveEventListener = removeEventListener;
removeEventListener = __removeEventListener;
}
}
static function addFocusManager(f) {
form = f;
f.focusManager.activate();
}
static function removeFocusManager(f) {
}
static function onMouseDown(Void) {
var _local1 = form;
_local1.focusManager._onMouseDown();
}
static function onResize(Void) {
var _local7 = Stage.width;
var _local6 = Stage.height;
var _local9 = _global.origWidth;
var _local8 = _global.origHeight;
var _local3 = Stage.align;
var _local5 = (_local9 - _local7) / 2;
var _local4 = (_local8 - _local6) / 2;
if (_local3 == "T") {
_local4 = 0;
} else if (_local3 == "B") {
_local4 = _local8 - _local6;
} else if (_local3 == "L") {
_local5 = 0;
} else if (_local3 == "R") {
_local5 = _local9 - _local7;
} else if (_local3 == "LT") {
_local4 = 0;
_local5 = 0;
} else if (_local3 == "TR") {
_local4 = 0;
_local5 = _local9 - _local7;
} else if (_local3 == "LB") {
_local4 = _local8 - _local6;
_local5 = 0;
} else if (_local3 == "RB") {
_local4 = _local8 - _local6;
_local5 = _local9 - _local7;
}
if (__screen == undefined) {
__screen = new Object();
}
__screen.x = _local5;
__screen.y = _local4;
__screen.width = _local7;
__screen.height = _local6;
_root.focusManager.relocate();
dispatchEvent({type:"resize"});
}
static function get screen() {
init();
if (__screen == undefined) {
onResize();
}
return(__screen);
}
static var _initialized = false;
static var idleFrames = 0;
static var isMouseDown = false;
static var forms = new Array();
}
Symbol 118 MovieClip [__Packages.mx.managers.FocusManager] Frame 0
class mx.managers.FocusManager extends mx.core.UIComponent
{
var __defaultPushButton, defPushButton, form, move, tabEnabled, _width, _height, _x, _y, _alpha, _parent, tabCapture, watch, lastMouse, _visible, lastFocus, doLater, lastSelFocus, cancelAllDoLaters, _searchKey, _lastTarget, _firstNode, _nextIsNext, _nextNode, _lastx, _prevNode, _needPrev, _foundList, _prevObj, _nextObj, _firstObj, _lastObj, _lastNode, lastTabFocus, findFocusFromObject;
function FocusManager () {
super();
}
function get defaultPushButton() {
return(__defaultPushButton);
}
function set defaultPushButton(x) {
if (x != __defaultPushButton) {
__defaultPushButton.__set__emphasized(false);
__defaultPushButton = x;
defPushButton = x;
x.__set__emphasized(true);
}
//return(defaultPushButton);
}
function getMaxTabIndex(o) {
var _local3 = 0;
var _local6;
for (_local6 in o) {
var _local2 = o[_local6];
if (_local2._parent == o) {
if (_local2.tabIndex != undefined) {
if (_local2.tabIndex > _local3) {
_local3 = _local2.tabIndex;
}
}
if (_local2.tabChildren == true) {
var _local4 = getMaxTabIndex(_local2);
if (_local4 > _local3) {
_local3 = _local4;
}
}
}
}
return(_local3);
}
function getNextTabIndex(Void) {
return(getMaxTabIndex(form) + 1);
}
function get nextTabIndex() {
return(getNextTabIndex());
}
function relocate(Void) {
var _local2 = mx.managers.SystemManager.__get__screen();
move(_local2.x - 1, _local2.y - 1);
}
function init(Void) {
super.init();
tabEnabled = false;
_width = (_height = 1);
_x = (_y = -1);
_alpha = 0;
_parent.focusManager = this;
_parent.tabChildren = true;
_parent.tabEnabled = false;
form = _parent;
_parent.addEventListener("hide", this);
_parent.addEventListener("reveal", this);
mx.managers.SystemManager.init();
mx.managers.SystemManager.addFocusManager(form);
tabCapture.tabIndex = 0;
watch("enabled", enabledChanged);
Selection.addListener(this);
lastMouse = new Object();
_global.ASSetPropFlags(_parent, "focusManager", 1);
_global.ASSetPropFlags(_parent, "tabChildren", 1);
_global.ASSetPropFlags(_parent, "tabEnabled", 1);
}
function enabledChanged(id, oldValue, newValue) {
_visible = newValue;
return(newValue);
}
function activate(Void) {
Key.addListener(this);
activated = (_visible = true);
if (lastFocus != undefined) {
bNeedFocus = true;
if (!mx.managers.SystemManager.isMouseDown) {
doLater(this, "restoreFocus");
}
}
}
function deactivate(Void) {
Key.removeListener(this);
activated = (_visible = false);
var _local2 = getSelectionFocus();
var _local3 = getActualFocus(_local2);
if (isOurFocus(_local3)) {
lastSelFocus = _local2;
lastFocus = _local3;
}
cancelAllDoLaters();
}
function isOurFocus(o) {
if (o.focusManager == this) {
return(true);
}
while (o != undefined) {
if (o.focusManager != undefined) {
return(false);
}
if (o._parent == _parent) {
return(true);
}
o = o._parent;
}
return(false);
}
function onSetFocus(o, n) {
if (n == null) {
if (activated) {
bNeedFocus = true;
}
} else {
var _local2 = getFocus();
if (isOurFocus(_local2)) {
bNeedFocus = false;
lastFocus = _local2;
lastSelFocus = n;
}
}
}
function restoreFocus(Void) {
var _local2 = lastSelFocus.hscroll;
if (_local2 != undefined) {
var _local5 = lastSelFocus.scroll;
var _local4 = lastSelFocus.background;
}
lastFocus.setFocus();
var _local3 = Selection;
Selection.setSelection(_local3.lastBeginIndex, _local3.lastEndIndex);
if (_local2 != undefined) {
lastSelFocus.scroll = _local5;
lastSelFocus.hscroll = _local2;
lastSelFocus.background = _local4;
}
}
function onUnload(Void) {
mx.managers.SystemManager.removeFocusManager(form);
}
function setFocus(o) {
if (o == null) {
Selection.setFocus(null);
} else if (o.setFocus == undefined) {
Selection.setFocus(o);
} else {
o.setFocus();
}
}
function getActualFocus(o) {
var _local1 = o._parent;
while (_local1 != undefined) {
if (_local1.focusTextField != undefined) {
while (_local1.focusTextField != undefined) {
o = _local1;
_local1 = _local1._parent;
if (_local1 == undefined) {
return(undefined);
}
if (_local1.focusTextField == undefined) {
return(o);
}
}
}
if (_local1.tabEnabled != true) {
return(o);
}
o = _local1;
_local1 = o._parent;
}
return(undefined);
}
function getSelectionFocus() {
var m = Selection.getFocus();
var o = eval (m);
return(o);
}
function getFocus(Void) {
var _local2 = getSelectionFocus();
return(getActualFocus(_local2));
}
function walkTree(p, index, groupName, dir, lookup, firstChild) {
var _local5 = true;
var _local11;
for (_local11 in p) {
var _local2 = p[_local11];
if ((((_local2._parent == p) && (_local2.enabled != false)) && (_local2._visible != false)) && ((_local2.tabEnabled == true) || ((_local2.tabEnabled != false) && ((((((((_local2.onPress != undefined) || (_local2.onRelease != undefined)) || (_local2.onReleaseOutside != undefined)) || (_local2.onDragOut != undefined)) || (_local2.onDragOver != undefined)) || (_local2.onRollOver != undefined)) || (_local2.onRollOut != undefined)) || (_local2 instanceof TextField))))) {
if (_local2._searchKey == _searchKey) {
continue;
}
_local2._searchKey = _searchKey;
if (_local2 != _lastTarget) {
if (((_local2.groupName != undefined) || (groupName != undefined)) && (_local2.groupName == groupName)) {
continue;
}
if ((_local2 instanceof TextField) && (_local2.selectable == false)) {
continue;
}
if (_local5 || (((_local2.groupName != undefined) && (_local2.groupName == _firstNode.groupName)) && (_local2.selected == true))) {
if (firstChild) {
_firstNode = _local2;
firstChild = false;
}
}
if (_nextIsNext == true) {
if ((((_local2.groupName != undefined) && (_local2.groupName == _nextNode.groupName)) && (_local2.selected == true)) || ((_nextNode == undefined) && ((_local2.groupName == undefined) || ((_local2.groupName != undefined) && (_local2.groupName != groupName))))) {
_nextNode = _local2;
}
}
if ((_local2.groupName == undefined) || (groupName != _local2.groupName)) {
if (((_lastx.groupName != undefined) && (_local2.groupName == _lastx.groupName)) && (_lastx.selected == true)) {
} else {
_lastx = _local2;
}
}
} else {
_prevNode = _lastx;
_needPrev = false;
_nextIsNext = true;
}
if (_local2.tabIndex != undefined) {
if (_local2.tabIndex == index) {
if (_foundList[_local2._name] == undefined) {
if (_needPrev) {
_prevObj = _local2;
_needPrev = false;
}
_nextObj = _local2;
}
}
if (dir && (_local2.tabIndex > index)) {
if (((_nextObj == undefined) || ((_nextObj.tabIndex > _local2.tabIndex) && (((_local2.groupName == undefined) || (_nextObj.groupName == undefined)) || (_local2.groupName != _nextObj.groupName)))) || ((((_nextObj.groupName != undefined) && (_nextObj.groupName == _local2.groupName)) && (_nextObj.selected != true)) && ((_local2.selected == true) || (_nextObj.tabIndex > _local2.tabIndex)))) {
_nextObj = _local2;
}
} else if ((!dir) && (_local2.tabIndex < index)) {
if (((_prevObj == undefined) || ((_prevObj.tabIndex < _local2.tabIndex) && (((_local2.groupName == undefined) || (_prevObj.groupName == undefined)) || (_local2.groupName != _prevObj.groupName)))) || ((((_prevObj.groupName != undefined) && (_prevObj.groupName == _local2.groupName)) && (_prevObj.selected != true)) && ((_local2.selected == true) || (_prevObj.tabIndex < _local2.tabIndex)))) {
_prevObj = _local2;
}
}
if (((_firstObj == undefined) || ((_local2.tabIndex < _firstObj.tabIndex) && (((_local2.groupName == undefined) || (_firstObj.groupName == undefined)) || (_local2.groupName != _firstObj.groupName)))) || ((((_firstObj.groupName != undefined) && (_firstObj.groupName == _local2.groupName)) && (_firstObj.selected != true)) && ((_local2.selected == true) || (_local2.tabIndex < _firstObj.tabIndex)))) {
_firstObj = _local2;
}
if (((_lastObj == undefined) || ((_local2.tabIndex > _lastObj.tabIndex) && (((_local2.groupName == undefined) || (_lastObj.groupName == undefined)) || (_local2.groupName != _lastObj.groupName)))) || ((((_lastObj.groupName != undefined) && (_lastObj.groupName == _local2.groupName)) && (_lastObj.selected != true)) && ((_local2.selected == true) || (_local2.tabIndex > _lastObj.tabIndex)))) {
_lastObj = _local2;
}
}
if (_local2.tabChildren) {
getTabCandidateFromChildren(_local2, index, groupName, dir, _local5 && (firstChild));
}
_local5 = false;
} else if (((_local2._parent == p) && (_local2.tabChildren == true)) && (_local2._visible != false)) {
if (_local2 == _lastTarget) {
if (_local2._searchKey == _searchKey) {
continue;
}
_local2._searchKey = _searchKey;
if (_prevNode == undefined) {
var _local3 = _lastx;
var _local7 = false;
while (_local3 != undefined) {
if (_local3 == _local2) {
_local7 = true;
break;
}
_local3 = _local3._parent;
}
if (_local7 == false) {
_prevNode = _lastx;
}
}
_needPrev = false;
if (_nextNode == undefined) {
_nextIsNext = true;
}
} else if (!((_local2.focusManager != undefined) && (_local2.focusManager._parent == _local2))) {
if (_local2._searchKey == _searchKey) {
continue;
}
_local2._searchKey = _searchKey;
getTabCandidateFromChildren(_local2, index, groupName, dir, _local5 && (firstChild));
}
_local5 = false;
}
}
_lastNode = _lastx;
if (lookup) {
if (p._parent != undefined) {
if (p != _parent) {
if ((_prevNode == undefined) && (dir)) {
_needPrev = true;
} else if ((_nextNode == undefined) && (!dir)) {
_nextIsNext = false;
}
_lastTarget = _lastTarget._parent;
getTabCandidate(p._parent, index, groupName, dir, true);
}
}
}
}
function getTabCandidate(o, index, groupName, dir, firstChild) {
var _local2;
var _local3 = true;
if (o == _parent) {
_local2 = o;
_local3 = false;
} else {
_local2 = o._parent;
if (_local2 == undefined) {
_local2 = o;
_local3 = false;
}
}
walkTree(_local2, index, groupName, dir, _local3, firstChild);
}
function getTabCandidateFromChildren(o, index, groupName, dir, firstChild) {
walkTree(o, index, groupName, dir, false, firstChild);
}
function getFocusManagerFromObject(o) {
while (o != undefined) {
if (o.focusManager != undefined) {
return(o.focusManager);
}
o = o._parent;
}
return(undefined);
}
function tabHandler(Void) {
bDrawFocus = true;
var _local5 = getSelectionFocus();
var _local4 = getActualFocus(_local5);
if (_local4 != _local5) {
_local5 = _local4;
}
if (getFocusManagerFromObject(_local5) != this) {
_local5 == undefined;
}
if (_local5 == undefined) {
_local5 = form;
} else if (_local5.tabIndex != undefined) {
if ((_foundList != undefined) || (_foundList.tabIndex != _local5.tabIndex)) {
_foundList = new Object();
_foundList.tabIndex = _local5.tabIndex;
}
_foundList[_local5._name] = _local5;
}
var _local3 = Key.isDown(16) != true;
_searchKey = getTimer();
_needPrev = true;
_nextIsNext = false;
_lastx = undefined;
_firstNode = undefined;
_lastNode = undefined;
_nextNode = undefined;
_prevNode = undefined;
_firstObj = undefined;
_lastObj = undefined;
_nextObj = undefined;
_prevObj = undefined;
_lastTarget = _local5;
var _local6 = _local5;
getTabCandidate(_local6, ((_local5.tabIndex == undefined) ? 0 : (_local5.tabIndex)), _local5.groupName, _local3, true);
var _local2;
if (_local3) {
if (_nextObj != undefined) {
_local2 = _nextObj;
} else {
_local2 = _firstObj;
}
} else if (_prevObj != undefined) {
_local2 = _prevObj;
} else {
_local2 = _lastObj;
}
if (_local2.tabIndex != _local5.tabIndex) {
_foundList = new Object();
_foundList.tabIndex = _local2.tabIndex;
_foundList[_local2._name] = _local2;
} else {
if (_foundList == undefined) {
_foundList = new Object();
_foundList.tabIndex = _local2.tabIndex;
}
_foundList[_local2._name] = _local2;
}
if (_local2 == undefined) {
if (_local3 == false) {
if (_nextNode != undefined) {
_local2 = _nextNode;
} else {
_local2 = _firstNode;
}
} else if ((_prevNode == undefined) || (_local5 == form)) {
_local2 = _lastNode;
} else {
_local2 = _prevNode;
}
}
if (_local2 == undefined) {
return(undefined);
}
lastTabFocus = _local2;
setFocus(_local2);
if (_local2.emphasized != undefined) {
if (defPushButton != undefined) {
_local5 = defPushButton;
defPushButton = _local2;
_local5.emphasized = false;
_local2.emphasized = true;
}
} else if ((defPushButton != undefined) && (defPushButton != __defaultPushButton)) {
_local5 = defPushButton;
defPushButton = __defaultPushButton;
_local5.emphasized = false;
__defaultPushButton.__set__emphasized(true);
}
}
function onKeyDown(Void) {
mx.managers.SystemManager.idleFrames = 0;
if (defaultPushButtonEnabled) {
if (Key.getCode() == 13) {
if (defaultPushButton != undefined) {
doLater(this, "sendDefaultPushButtonEvent");
}
}
}
}
function sendDefaultPushButtonEvent(Void) {
defPushButton.dispatchEvent({type:"click"});
}
function getMousedComponentFromChildren(x, y, o) {
for (var _local7 in o) {
var _local2 = o[_local7];
if (((_local2._visible && (_local2.enabled)) && (_local2._parent == o)) && (_local2._searchKey != _searchKey)) {
_local2._searchKey = _searchKey;
if (_local2.hitTest(x, y, true)) {
if ((_local2.onPress != undefined) || (_local2.onRelease != undefined)) {
return(_local2);
}
var _local3 = getMousedComponentFromChildren(x, y, _local2);
if (_local3 != undefined) {
return(_local3);
}
return(_local2);
}
}
}
return(undefined);
}
function mouseActivate(Void) {
if (!bNeedFocus) {
return(undefined);
}
_searchKey = getTimer();
var _local2 = getMousedComponentFromChildren(lastMouse.x, lastMouse.y, form);
if (_local2 instanceof mx.core.UIComponent) {
return(undefined);
}
_local2 = findFocusFromObject(_local2);
if (_local2 == lastFocus) {
return(undefined);
}
if (_local2 == undefined) {
doLater(this, "restoreFocus");
return(undefined);
}
var _local3 = _local2.hscroll;
if (_local3 != undefined) {
var _local6 = _local2.scroll;
var _local5 = _local2.background;
}
setFocus(_local2);
var _local4 = Selection;
Selection.setSelection(_local4.lastBeginIndex, _local4.lastEndIndex);
if (_local3 != undefined) {
_local2.scroll = _local6;
_local2.hscroll = _local3;
_local2.background = _local5;
}
}
function _onMouseDown(Void) {
bDrawFocus = false;
if (lastFocus != undefined) {
lastFocus.drawFocus(false);
}
mx.managers.SystemManager.idleFrames = 0;
var _local3 = Selection;
_local3.lastBeginIndex = Selection.getBeginIndex();
_local3.lastEndIndex = Selection.getEndIndex();
lastMouse.x = _root._xmouse;
lastMouse.y = _root._ymouse;
_root.localToGlobal(lastMouse);
}
function onMouseUp(Void) {
if (_visible) {
doLater(this, "mouseActivate");
}
}
function handleEvent(e) {
if (e.type == "reveal") {
mx.managers.SystemManager.activate(form);
} else {
mx.managers.SystemManager.deactivate(form);
}
}
static function enableFocusManagement() {
if (!initialized) {
initialized = true;
Object.registerClass("FocusManager", mx.managers.FocusManager);
if (_root.focusManager == undefined) {
_root.createClassObject(mx.managers.FocusManager, "focusManager", mx.managers.DepthManager.highestDepth--);
}
}
}
static var symbolName = "FocusManager";
static var symbolOwner = mx.managers.FocusManager;
static var version = "2.0.1.78";
var className = "FocusManager";
var bNeedFocus = false;
var bDrawFocus = false;
var defaultPushButtonEnabled = true;
var activated = true;
static var initialized = false;
static var UIObjectExtensionsDependency = mx.core.ext.UIObjectExtensions;
}
Symbol 119 MovieClip [__Packages.mx.skins.halo.FocusRect] Frame 0
class mx.skins.halo.FocusRect extends mx.skins.SkinElement
{
var boundingBox_mc, _xscale, _yscale, clear, beginFill, drawRoundRect, endFill, _visible;
function FocusRect () {
super();
boundingBox_mc._visible = false;
boundingBox_mc._width = (boundingBox_mc._height = 0);
}
function draw(o) {
o.adjustFocusRect();
}
function setSize(w, h, r, a, rectCol) {
_xscale = (_yscale = 100);
clear();
if (typeof(r) == "object") {
r.br = ((r.br > 2) ? (r.br - 2) : 0);
r.bl = ((r.bl > 2) ? (r.bl - 2) : 0);
r.tr = ((r.tr > 2) ? (r.tr - 2) : 0);
r.tl = ((r.tl > 2) ? (r.tl - 2) : 0);
beginFill(rectCol, a * 0.3);
drawRoundRect(0, 0, w, h, r);
drawRoundRect(2, 2, w - 4, h - 4, r);
endFill();
r.br = ((r.br > 1) ? (r.br + 1) : 0);
r.bl = ((r.bl > 1) ? (r.bl + 1) : 0);
r.tr = ((r.tr > 1) ? (r.tr + 1) : 0);
r.tl = ((r.tl > 1) ? (r.tl + 1) : 0);
beginFill(rectCol, a * 0.3);
drawRoundRect(1, 1, w - 2, h - 2, r);
r.br = ((r.br > 1) ? (r.br - 1) : 0);
r.bl = ((r.bl > 1) ? (r.bl - 1) : 0);
r.tr = ((r.tr > 1) ? (r.tr - 1) : 0);
r.tl = ((r.tl > 1) ? (r.tl - 1) : 0);
drawRoundRect(2, 2, w - 4, h - 4, r);
endFill();
} else {
var _local5;
if (r != 0) {
_local5 = r - 2;
} else {
_local5 = 0;
}
beginFill(rectCol, a * 0.3);
drawRoundRect(0, 0, w, h, r);
drawRoundRect(2, 2, w - 4, h - 4, _local5);
endFill();
beginFill(rectCol, a * 0.3);
if (r != 0) {
_local5 = r - 2;
r = r - 1;
} else {
_local5 = 0;
r = 0;
}
drawRoundRect(1, 1, w - 2, h - 2, r);
drawRoundRect(2, 2, w - 4, h - 4, _local5);
endFill();
}
}
function handleEvent(e) {
if (e.type == "unload") {
_visible = true;
} else if (e.type == "resize") {
e.target.adjustFocusRect();
} else if (e.type == "move") {
e.target.adjustFocusRect();
}
}
static function classConstruct() {
mx.core.UIComponent.prototype.drawFocus = function (focused) {
var _local2 = this._parent.focus_mc;
if (!focused) {
_local2._visible = false;
this.removeEventListener("unload", _local2);
this.removeEventListener("move", _local2);
this.removeEventListener("resize", _local2);
} else {
if (_local2 == undefined) {
_local2 = this._parent.createChildAtDepth("FocusRect", mx.managers.DepthManager.kTop);
_local2.tabEnabled = false;
this._parent.focus_mc = _local2;
} else {
_local2._visible = true;
}
_local2.draw(this);
if (_local2.getDepth() < this.getDepth()) {
_local2.setDepthAbove(this);
}
this.addEventListener("unload", _local2);
this.addEventListener("move", _local2);
this.addEventListener("resize", _local2);
}
};
mx.core.UIComponent.prototype.adjustFocusRect = function () {
var _local2 = this.getStyle("themeColor");
if (_local2 == undefined) {
_local2 = 8453965 /* 0x80FF4D */;
}
var _local3 = this._parent.focus_mc;
_local3.setSize(this.width + 4, this.height + 4, 0, 100, _local2);
_local3.move(this.x - 2, this.y - 2);
};
TextField.prototype.drawFocus = mx.core.UIComponent.prototype.drawFocus;
TextField.prototype.adjustFocusRect = mx.core.UIComponent.prototype.adjustFocusRect;
mx.skins.halo.FocusRect.prototype.drawRoundRect = mx.skins.halo.Defaults.prototype.drawRoundRect;
return(true);
}
static var classConstructed = classConstruct();
static var DefaultsDependency = mx.skins.halo.Defaults;
static var UIComponentDependency = mx.core.UIComponent;
}
Symbol 120 MovieClip [__Packages.mx.managers.OverlappedWindows] Frame 0
class mx.managers.OverlappedWindows
{
function OverlappedWindows () {
}
static function checkIdle(Void) {
if (mx.managers.SystemManager.idleFrames > 10) {
mx.managers.SystemManager.dispatchEvent({type:"idle"});
} else {
mx.managers.SystemManager.idleFrames++;
}
}
static function __addEventListener(e, o, l) {
if (e == "idle") {
if (mx.managers.SystemManager.interval == undefined) {
mx.managers.SystemManager.interval = setInterval(mx.managers.SystemManager.checkIdle, 100);
}
}
mx.managers.SystemManager._xAddEventListener(e, o, l);
}
static function __removeEventListener(e, o, l) {
if (e == "idle") {
if (mx.managers.SystemManager._xRemoveEventListener(e, o, l) == 0) {
clearInterval(mx.managers.SystemManager.interval);
}
} else {
mx.managers.SystemManager._xRemoveEventListener(e, o, l);
}
}
static function onMouseDown(Void) {
mx.managers.SystemManager.idleFrames = 0;
mx.managers.SystemManager.isMouseDown = true;
var _local5 = _root;
var _local3;
var _local8 = _root._xmouse;
var _local7 = _root._ymouse;
if (mx.managers.SystemManager.form.modalWindow == undefined) {
if (mx.managers.SystemManager.forms.length > 1) {
var _local6 = mx.managers.SystemManager.forms.length;
var _local4;
_local4 = 0;
while (_local4 < _local6) {
var _local2 = mx.managers.SystemManager.forms[_local4];
if (_local2._visible) {
if (_local2.hitTest(_local8, _local7)) {
if (_local3 == undefined) {
_local3 = _local2.getDepth();
_local5 = _local2;
} else if (_local3 < _local2.getDepth()) {
_local3 = _local2.getDepth();
_local5 = _local2;
}
}
}
_local4++;
}
if (_local5 != mx.managers.SystemManager.form) {
mx.managers.SystemManager.activate(_local5);
}
}
}
var _local9 = mx.managers.SystemManager.form;
_local9.focusManager._onMouseDown();
}
static function onMouseMove(Void) {
mx.managers.SystemManager.idleFrames = 0;
}
static function onMouseUp(Void) {
mx.managers.SystemManager.isMouseDown = false;
mx.managers.SystemManager.idleFrames = 0;
}
static function activate(f) {
if (mx.managers.SystemManager.form != undefined) {
if ((mx.managers.SystemManager.form != f) && (mx.managers.SystemManager.forms.length > 1)) {
var _local1 = mx.managers.SystemManager.form;
_local1.focusManager.deactivate();
}
}
mx.managers.SystemManager.form = f;
f.focusManager.activate();
}
static function deactivate(f) {
if (mx.managers.SystemManager.form != undefined) {
if ((mx.managers.SystemManager.form == f) && (mx.managers.SystemManager.forms.length > 1)) {
var _local5 = mx.managers.SystemManager.form;
_local5.focusManager.deactivate();
var _local3 = mx.managers.SystemManager.forms.length;
var _local1;
var _local2;
_local1 = 0;
while (_local1 < _local3) {
if (mx.managers.SystemManager.forms[_local1] == f) {
_local1 = _local1 + 1;
while (_local1 < _local3) {
if (mx.managers.SystemManager.forms[_local1]._visible == true) {
_local2 = mx.managers.SystemManager.forms[_local1];
}
_local1++;
}
mx.managers.SystemManager.form = _local2;
break;
}
if (mx.managers.SystemManager.forms[_local1]._visible == true) {
_local2 = mx.managers.SystemManager.forms[_local1];
}
_local1++;
}
_local5 = mx.managers.SystemManager.form;
_local5.focusManager.activate();
}
}
}
static function addFocusManager(f) {
mx.managers.SystemManager.forms.push(f);
mx.managers.SystemManager.activate(f);
}
static function removeFocusManager(f) {
var _local3 = mx.managers.SystemManager.forms.length;
var _local1;
_local1 = 0;
while (_local1 < _local3) {
if (mx.managers.SystemManager.forms[_local1] == f) {
if (mx.managers.SystemManager.form == f) {
mx.managers.SystemManager.deactivate(f);
}
mx.managers.SystemManager.forms.splice(_local1, 1);
return(undefined);
}
_local1++;
}
}
static function enableOverlappedWindows() {
if (!initialized) {
initialized = true;
mx.managers.SystemManager.checkIdle = checkIdle;
mx.managers.SystemManager.__addEventListener = __addEventListener;
mx.managers.SystemManager.__removeEventListener = __removeEventListener;
mx.managers.SystemManager.onMouseDown = onMouseDown;
mx.managers.SystemManager.onMouseMove = onMouseMove;
mx.managers.SystemManager.onMouseUp = onMouseUp;
mx.managers.SystemManager.activate = activate;
mx.managers.SystemManager.deactivate = deactivate;
mx.managers.SystemManager.addFocusManager = addFocusManager;
mx.managers.SystemManager.removeFocusManager = removeFocusManager;
}
}
static var initialized = false;
static var SystemManagerDependency = mx.managers.SystemManager;
}
Symbol 121 MovieClip [__Packages.mx.styles.CSSSetStyle] Frame 0
class mx.styles.CSSSetStyle
{
var styleName, stylecache, _color, setColor, invalidateStyle;
function CSSSetStyle () {
}
function _setStyle(styleProp, newValue) {
this[styleProp] = newValue;
if (mx.styles.StyleManager.TextStyleMap[styleProp] != undefined) {
if (styleProp == "color") {
if (isNaN(newValue)) {
newValue = mx.styles.StyleManager.getColorName(newValue);
this[styleProp] = newValue;
if (newValue == undefined) {
return(undefined);
}
}
}
_level0.changeTextStyleInChildren(styleProp);
return(undefined);
}
if (mx.styles.StyleManager.isColorStyle(styleProp)) {
if (isNaN(newValue)) {
newValue = mx.styles.StyleManager.getColorName(newValue);
this[styleProp] = newValue;
if (newValue == undefined) {
return(undefined);
}
}
if (styleProp == "themeColor") {
var _local7 = mx.styles.StyleManager.colorNames.haloBlue;
var _local6 = mx.styles.StyleManager.colorNames.haloGreen;
var _local8 = mx.styles.StyleManager.colorNames.haloOrange;
var _local4 = {};
_local4[_local7] = 12188666 /* 0xB9FBFA */;
_local4[_local6] = 13500353 /* 0xCDFFC1 */;
_local4[_local8] = 16766319 /* 0xFFD56F */;
var _local5 = {};
_local5[_local7] = 13958653 /* 0xD4FDFD */;
_local5[_local6] = 14942166 /* 0xE3FFD6 */;
_local5[_local8] = 16772787 /* 0xFFEEB3 */;
var _local9 = _local4[newValue];
var _local10 = _local5[newValue];
if (_local9 == undefined) {
_local9 = newValue;
}
if (_local10 == undefined) {
_local10 = newValue;
}
setStyle("selectionColor", _local9);
setStyle("rollOverColor", _local10);
}
_level0.changeColorStyleInChildren(styleName, styleProp, newValue);
} else {
if ((styleProp == "backgroundColor") && (isNaN(newValue))) {
newValue = mx.styles.StyleManager.getColorName(newValue);
this[styleProp] = newValue;
if (newValue == undefined) {
return(undefined);
}
}
_level0.notifyStyleChangeInChildren(styleName, styleProp, newValue);
}
}
function changeTextStyleInChildren(styleProp) {
var _local4 = getTimer();
var _local5;
for (_local5 in this) {
var _local2 = this[_local5];
if (_local2._parent == this) {
if (_local2.searchKey != _local4) {
if (_local2.stylecache != undefined) {
delete _local2.stylecache.tf;
delete _local2.stylecache[styleProp];
}
_local2.invalidateStyle(styleProp);
_local2.changeTextStyleInChildren(styleProp);
_local2.searchKey = _local4;
}
}
}
}
function changeColorStyleInChildren(sheetName, colorStyle, newValue) {
var _local6 = getTimer();
var _local7;
for (_local7 in this) {
var _local2 = this[_local7];
if (_local2._parent == this) {
if (_local2.searchKey != _local6) {
if (((_local2.getStyleName() == sheetName) || (sheetName == undefined)) || (sheetName == "_global")) {
if (_local2.stylecache != undefined) {
delete _local2.stylecache[colorStyle];
}
if (typeof(_local2._color) == "string") {
if (_local2._color == colorStyle) {
var _local4 = _local2.getStyle(colorStyle);
if (colorStyle == "color") {
if (stylecache.tf.color != undefined) {
stylecache.tf.color = _local4;
}
}
_local2.setColor(_local4);
}
} else if (_local2._color[colorStyle] != undefined) {
if (typeof(_local2) != "movieclip") {
_local2._parent.invalidateStyle();
} else {
_local2.invalidateStyle(colorStyle);
}
}
}
_local2.changeColorStyleInChildren(sheetName, colorStyle, newValue);
_local2.searchKey = _local6;
}
}
}
}
function notifyStyleChangeInChildren(sheetName, styleProp, newValue) {
var _local5 = getTimer();
var _local6;
for (_local6 in this) {
var _local2 = this[_local6];
if (_local2._parent == this) {
if (_local2.searchKey != _local5) {
if (((_local2.styleName == sheetName) || ((_local2.styleName != undefined) && (typeof(_local2.styleName) == "movieclip"))) || (sheetName == undefined)) {
if (_local2.stylecache != undefined) {
delete _local2.stylecache[styleProp];
delete _local2.stylecache.tf;
}
delete _local2.enabledColor;
_local2.invalidateStyle(styleProp);
}
_local2.notifyStyleChangeInChildren(sheetName, styleProp, newValue);
_local2.searchKey = _local5;
}
}
}
}
function setStyle(styleProp, newValue) {
if (stylecache != undefined) {
delete stylecache[styleProp];
delete stylecache.tf;
}
this[styleProp] = newValue;
if (mx.styles.StyleManager.isColorStyle(styleProp)) {
if (isNaN(newValue)) {
newValue = mx.styles.StyleManager.getColorName(newValue);
this[styleProp] = newValue;
if (newValue == undefined) {
return(undefined);
}
}
if (styleProp == "themeColor") {
var _local10 = mx.styles.StyleManager.colorNames.haloBlue;
var _local9 = mx.styles.StyleManager.colorNames.haloGreen;
var _local11 = mx.styles.StyleManager.colorNames.haloOrange;
var _local6 = {};
_local6[_local10] = 12188666 /* 0xB9FBFA */;
_local6[_local9] = 13500353 /* 0xCDFFC1 */;
_local6[_local11] = 16766319 /* 0xFFD56F */;
var _local7 = {};
_local7[_local10] = 13958653 /* 0xD4FDFD */;
_local7[_local9] = 14942166 /* 0xE3FFD6 */;
_local7[_local11] = 16772787 /* 0xFFEEB3 */;
var _local12 = _local6[newValue];
var _local13 = _local7[newValue];
if (_local12 == undefined) {
_local12 = newValue;
}
if (_local13 == undefined) {
_local13 = newValue;
}
setStyle("selectionColor", _local12);
setStyle("rollOverColor", _local13);
}
if (typeof(_color) == "string") {
if (_color == styleProp) {
if (styleProp == "color") {
if (stylecache.tf.color != undefined) {
stylecache.tf.color = newValue;
}
}
setColor(newValue);
}
} else if (_color[styleProp] != undefined) {
invalidateStyle(styleProp);
}
changeColorStyleInChildren(undefined, styleProp, newValue);
} else {
if ((styleProp == "backgroundColor") && (isNaN(newValue))) {
newValue = mx.styles.StyleManager.getColorName(newValue);
this[styleProp] = newValue;
if (newValue == undefined) {
return(undefined);
}
}
invalidateStyle(styleProp);
}
if (mx.styles.StyleManager.isInheritingStyle(styleProp) || (styleProp == "styleName")) {
var _local8;
var _local5 = newValue;
if (styleProp == "styleName") {
_local8 = ((typeof(newValue) == "string") ? (_global.styles[newValue]) : (_local5));
_local5 = _local8.themeColor;
if (_local5 != undefined) {
_local8.rollOverColor = (_local8.selectionColor = _local5);
}
}
notifyStyleChangeInChildren(undefined, styleProp, newValue);
}
}
static function enableRunTimeCSS() {
}
static function classConstruct() {
var _local2 = MovieClip.prototype;
var _local3 = mx.styles.CSSSetStyle.prototype;
mx.styles.CSSStyleDeclaration.prototype.setStyle = _local3._setStyle;
_local2.changeTextStyleInChildren = _local3.changeTextStyleInChildren;
_local2.changeColorStyleInChildren = _local3.changeColorStyleInChildren;
_local2.notifyStyleChangeInChildren = _local3.notifyStyleChangeInChildren;
_local2.setStyle = _local3.setStyle;
_global.ASSetPropFlags(_local2, "changeTextStyleInChildren", 1);
_global.ASSetPropFlags(_local2, "changeColorStyleInChildren", 1);
_global.ASSetPropFlags(_local2, "notifyStyleChangeInChildren", 1);
_global.ASSetPropFlags(_local2, "setStyle", 1);
var _local4 = TextField.prototype;
_local4.setStyle = _local2.setStyle;
_local4.changeTextStyleInChildren = _local3.changeTextStyleInChildren;
return(true);
}
static var classConstructed = classConstruct();
static var CSSStyleDeclarationDependency = mx.styles.CSSStyleDeclaration;
}
Symbol 122 MovieClip [__Packages.mx.core.ext.UIComponentExtensions] Frame 0
class mx.core.ext.UIComponentExtensions
{
function UIComponentExtensions () {
}
static function Extensions() {
if (bExtended == true) {
return(true);
}
bExtended = true;
TextField.prototype.setFocus = function () {
Selection.setFocus(this);
};
TextField.prototype.onSetFocus = function (oldFocus) {
if (this.tabEnabled != false) {
if (this.getFocusManager().bDrawFocus) {
this.drawFocus(true);
}
}
};
TextField.prototype.onKillFocus = function (oldFocus) {
if (this.tabEnabled != false) {
this.drawFocus(false);
}
};
TextField.prototype.drawFocus = mx.core.UIComponent.prototype.drawFocus;
TextField.prototype.getFocusManager = mx.core.UIComponent.prototype.getFocusManager;
mx.managers.OverlappedWindows.enableOverlappedWindows();
mx.styles.CSSSetStyle.enableRunTimeCSS();
mx.managers.FocusManager.enableFocusManagement();
}
static var bExtended = false;
static var UIComponentExtended = Extensions();
static var UIComponentDependency = mx.core.UIComponent;
static var FocusManagerDependency = mx.managers.FocusManager;
static var OverlappedWindowsDependency = mx.managers.OverlappedWindows;
}
Symbol 123 MovieClip [__Packages.mx.skins.halo.RectBorder] Frame 0
class mx.skins.halo.RectBorder extends mx.skins.RectBorder
{
var offset, getStyle, borderStyleName, __borderMetrics, className, borderColorName, backgroundColorName, shadowColorName, highlightColorName, buttonColorName, __get__width, __get__height, clear, _color, drawRoundRect, beginFill, drawRect, endFill;
function RectBorder () {
super();
}
function init(Void) {
borderWidths.default = 3;
super.init();
}
function getBorderMetrics(Void) {
if (offset == undefined) {
var _local3 = getStyle(borderStyleName);
offset = borderWidths[_local3];
}
if ((getStyle(borderStyleName) == "default") || (getStyle(borderStyleName) == "alert")) {
__borderMetrics = {left:3, top:1, right:3, bottom:3};
return(__borderMetrics);
}
return(super.getBorderMetrics());
}
function drawBorder(Void) {
var _local6 = _global.styles[className];
if (_local6 == undefined) {
_local6 = _global.styles.RectBorder;
}
var _local5 = getStyle(borderStyleName);
var _local7 = getStyle(borderColorName);
if (_local7 == undefined) {
_local7 = _local6[borderColorName];
}
var _local8 = getStyle(backgroundColorName);
if (_local8 == undefined) {
_local8 = _local6[backgroundColorName];
}
var _local16 = getStyle("backgroundImage");
if (_local5 != "none") {
var _local14 = getStyle(shadowColorName);
if (_local14 == undefined) {
_local14 = _local6[shadowColorName];
}
var _local13 = getStyle(highlightColorName);
if (_local13 == undefined) {
_local13 = _local6[highlightColorName];
}
var _local12 = getStyle(buttonColorName);
if (_local12 == undefined) {
_local12 = _local6[buttonColorName];
}
var _local11 = getStyle(borderCapColorName);
if (_local11 == undefined) {
_local11 = _local6[borderCapColorName];
}
var _local10 = getStyle(shadowCapColorName);
if (_local10 == undefined) {
_local10 = _local6[shadowCapColorName];
}
}
offset = borderWidths[_local5];
var _local9 = offset;
var _local3 = __get__width();
var _local4 = __get__height();
clear();
_color = undefined;
if (_local5 == "none") {
} else if (_local5 == "inset") {
_color = colorList;
draw3dBorder(_local11, _local12, _local7, _local13, _local14, _local10);
} else if (_local5 == "outset") {
_color = colorList;
draw3dBorder(_local11, _local7, _local12, _local14, _local13, _local10);
} else if (_local5 == "alert") {
var _local15 = getStyle("themeColor");
drawRoundRect(0, 5, _local3, _local4 - 5, 5, 6184542, 10);
drawRoundRect(1, 4, _local3 - 2, _local4 - 5, 4, [6184542, 6184542], 10, 0, "radial");
drawRoundRect(2, 0, _local3 - 4, _local4 - 2, 3, [0, 14342874], 100, 0, "radial");
drawRoundRect(2, 0, _local3 - 4, _local4 - 2, 3, _local15, 50);
drawRoundRect(3, 1, _local3 - 6, _local4 - 4, 2, 16777215, 100);
} else if (_local5 == "default") {
drawRoundRect(0, 5, _local3, _local4 - 5, {tl:5, tr:5, br:0, bl:0}, 6184542, 10);
drawRoundRect(1, 4, _local3 - 2, _local4 - 5, {tl:4, tr:4, br:0, bl:0}, [6184542, 6184542], 10, 0, "radial");
drawRoundRect(2, 0, _local3 - 4, _local4 - 2, {tl:3, tr:3, br:0, bl:0}, [12897484, 11844796], 100, 0, "radial");
drawRoundRect(3, 1, _local3 - 6, _local4 - 4, {tl:2, tr:2, br:0, bl:0}, 16777215, 100);
} else if (_local5 == "dropDown") {
drawRoundRect(0, 0, _local3 + 1, _local4, {tl:4, tr:0, br:0, bl:4}, [13290186, 7895160], 100, -10, "linear");
drawRoundRect(1, 1, _local3 - 1, _local4 - 2, {tl:3, tr:0, br:0, bl:3}, 16777215, 100);
} else if (_local5 == "menuBorder") {
var _local15 = getStyle("themeColor");
drawRoundRect(4, 4, _local3 - 2, _local4 - 3, 0, [6184542, 6184542], 10, 0, "radial");
drawRoundRect(4, 4, _local3 - 1, _local4 - 2, 0, 6184542, 10);
drawRoundRect(0, 0, _local3 + 1, _local4, 0, [0, 14342874], 100, 250, "linear");
drawRoundRect(0, 0, _local3 + 1, _local4, 0, _local15, 50);
drawRoundRect(2, 2, _local3 - 3, _local4 - 4, 0, 16777215, 100);
} else if (_local5 == "comboNonEdit") {
} else {
beginFill(_local7);
drawRect(0, 0, _local3, _local4);
drawRect(1, 1, _local3 - 1, _local4 - 1);
endFill();
_color = borderColorName;
}
if (_local8 != undefined) {
beginFill(_local8);
drawRect(_local9, _local9, __get__width() - _local9, __get__height() - _local9);
endFill();
}
}
function draw3dBorder(c1, c2, c3, c4, c5, c6) {
var _local3 = __get__width();
var _local2 = __get__height();
beginFill(c1);
drawRect(0, 0, _local3, _local2);
drawRect(1, 0, _local3 - 1, _local2);
endFill();
beginFill(c2);
drawRect(1, 0, _local3 - 1, 1);
endFill();
beginFill(c3);
drawRect(1, _local2 - 1, _local3 - 1, _local2);
endFill();
beginFill(c4);
drawRect(1, 1, _local3 - 1, 2);
endFill();
beginFill(c5);
drawRect(1, _local2 - 2, _local3 - 1, _local2 - 1);
endFill();
beginFill(c6);
drawRect(1, 2, _local3 - 1, _local2 - 2);
drawRect(2, 2, _local3 - 2, _local2 - 2);
endFill();
}
static function classConstruct() {
mx.core.ext.UIObjectExtensions.Extensions();
_global.styles.rectBorderClass = mx.skins.halo.RectBorder;
_global.skinRegistry.RectBorder = true;
return(true);
}
static var symbolName = "RectBorder";
static var symbolOwner = mx.skins.halo.RectBorder;
static var version = "2.0.1.78";
var borderCapColorName = "borderCapColor";
var shadowCapColorName = "shadowCapColor";
var colorList = {highlightColor:0, borderColor:0, buttonColor:0, shadowColor:0, borderCapColor:0, shadowCapColor:0};
var borderWidths = {none:0, solid:1, inset:2, outset:2, alert:3, dropDown:2, menuBorder:2, comboNonEdit:2};
static var classConstructed = classConstruct();
static var UIObjectExtensionsDependency = mx.core.ext.UIObjectExtensions;
}
Symbol 124 MovieClip [__Packages.mx.skins.halo.ButtonSkin] Frame 0
class mx.skins.halo.ButtonSkin extends mx.skins.RectBorder
{
var __get__width, __get__height, getStyle, _parent, clear, drawRoundRect, __get__x, __get__y;
function ButtonSkin () {
super();
}
function init() {
super.init();
}
function size() {
drawHaloRect(__get__width(), __get__height());
}
function drawHaloRect(w, h) {
var _local6 = getStyle("borderStyle");
var _local4 = getStyle("themeColor");
var _local5 = _parent.emphasized;
clear();
switch (_local6) {
case "falseup" :
if (_local5) {
drawRoundRect(__get__x(), __get__y(), w, h, 5, 9542041, 100);
drawRoundRect(__get__x(), __get__y(), w, h, 5, _local4, 75);
drawRoundRect(__get__x() + 1, __get__y() + 1, w - 2, h - 2, 4, [3355443, 16777215], 85, 0, "radial");
drawRoundRect(__get__x() + 2, __get__y() + 2, w - 4, h - 4, 3, [0, 14342874], 100, 0, "radial");
drawRoundRect(__get__x() + 2, __get__y() + 2, w - 4, h - 4, 3, _local4, 75);
drawRoundRect(__get__x() + 3, __get__y() + 3, w - 6, h - 6, 2, 16777215, 100);
drawRoundRect(__get__x() + 3, __get__y() + 4, w - 6, h - 7, 2, 16316664, 100);
} else {
drawRoundRect(0, 0, w, h, 5, 9542041, 100);
drawRoundRect(1, 1, w - 2, h - 2, 4, [13291985, 16250871], 100, 0, "radial");
drawRoundRect(2, 2, w - 4, h - 4, 3, [9542041, 13818586], 100, 0, "radial");
drawRoundRect(3, 3, w - 6, h - 6, 2, 16777215, 100);
drawRoundRect(3, 4, w - 6, h - 7, 2, 16316664, 100);
}
break;
case "falsedown" :
drawRoundRect(__get__x(), __get__y(), w, h, 5, 9542041, 100);
drawRoundRect(__get__x() + 1, __get__y() + 1, w - 2, h - 2, 4, [3355443, 16579836], 100, 0, "radial");
drawRoundRect(__get__x() + 1, __get__y() + 1, w - 2, h - 2, 4, _local4, 50);
drawRoundRect(__get__x() + 2, __get__y() + 2, w - 4, h - 4, 3, [0, 14342874], 100, 0, "radial");
drawRoundRect(__get__x(), __get__y(), w, h, 5, _local4, 40);
drawRoundRect(__get__x() + 3, __get__y() + 3, w - 6, h - 6, 2, 16777215, 100);
drawRoundRect(__get__x() + 3, __get__y() + 4, w - 6, h - 7, 2, _local4, 20);
break;
case "falserollover" :
drawRoundRect(__get__x(), __get__y(), w, h, 5, 9542041, 100);
drawRoundRect(__get__x(), __get__y(), w, h, 5, _local4, 50);
drawRoundRect(__get__x() + 1, __get__y() + 1, w - 2, h - 2, 4, [3355443, 16777215], 100, 0, "radial");
drawRoundRect(__get__x() + 2, __get__y() + 2, w - 4, h - 4, 3, [0, 14342874], 100, 0, "radial");
drawRoundRect(__get__x() + 2, __get__y() + 2, w - 4, h - 4, 3, _local4, 50);
drawRoundRect(__get__x() + 3, __get__y() + 3, w - 6, h - 6, 2, 16777215, 100);
drawRoundRect(__get__x() + 3, __get__y() + 4, w - 6, h - 7, 2, 16316664, 100);
break;
case "falsedisabled" :
drawRoundRect(0, 0, w, h, 5, 13159628, 100);
drawRoundRect(1, 1, w - 2, h - 2, 4, 15921906, 100);
drawRoundRect(2, 2, w - 4, h - 4, 3, 13949401, 100);
drawRoundRect(3, 3, w - 6, h - 6, 2, 15921906, 100);
break;
case "trueup" :
drawRoundRect(__get__x(), __get__y(), w, h, 5, 10066329, 100);
drawRoundRect(__get__x() + 1, __get__y() + 1, w - 2, h - 2, 4, [3355443, 16579836], 100, 0, "radial");
drawRoundRect(__get__x() + 1, __get__y() + 1, w - 2, h - 2, 4, _local4, 50);
drawRoundRect(__get__x() + 2, __get__y() + 2, w - 4, h - 4, 3, [0, 14342874], 100, 0, "radial");
drawRoundRect(__get__x(), __get__y(), w, h, 5, _local4, 40);
drawRoundRect(__get__x() + 3, __get__y() + 3, w - 6, h - 6, 2, 16777215, 100);
drawRoundRect(__get__x() + 3, __get__y() + 4, w - 6, h - 7, 2, 16250871, 100);
break;
case "truedown" :
drawRoundRect(__get__x(), __get__y(), w, h, 5, 10066329, 100);
drawRoundRect(__get__x() + 1, __get__y() + 1, w - 2, h - 2, 4, [3355443, 16579836], 100, 0, "radial");
drawRoundRect(__get__x() + 1, __get__y() + 1, w - 2, h - 2, 4, _local4, 50);
drawRoundRect(__get__x() + 2, __get__y() + 2, w - 4, h - 4, 3, [0, 14342874], 100, 0, "radial");
drawRoundRect(__get__x(), __get__y(), w, h, 5, _local4, 40);
drawRoundRect(__get__x() + 3, __get__y() + 3, w - 6, h - 6, 2, 16777215, 100);
drawRoundRect(__get__x() + 3, __get__y() + 4, w - 6, h - 7, 2, _local4, 20);
break;
case "truerollover" :
drawRoundRect(__get__x(), __get__y(), w, h, 5, 9542041, 100);
drawRoundRect(__get__x(), __get__y(), w, h, 5, _local4, 50);
drawRoundRect(__get__x() + 1, __get__y() + 1, w - 2, h - 2, 4, [3355443, 16777215], 100, 0, "radial");
drawRoundRect(__get__x() + 1, __get__y() + 1, w - 2, h - 2, 4, _local4, 40);
drawRoundRect(__get__x() + 2, __get__y() + 2, w - 4, h - 4, 3, [0, 14342874], 100, 0, "radial");
drawRoundRect(__get__x() + 2, __get__y() + 2, w - 4, h - 4, 3, _local4, 40);
drawRoundRect(__get__x() + 3, __get__y() + 3, w - 6, h - 6, 2, 16777215, 100);
drawRoundRect(__get__x() + 3, __get__y() + 4, w - 6, h - 7, 2, 16316664, 100);
break;
case "truedisabled" :
drawRoundRect(0, 0, w, h, 5, 13159628, 100);
drawRoundRect(1, 1, w - 2, h - 2, 4, 15921906, 100);
drawRoundRect(2, 2, w - 4, h - 4, 3, 13949401, 100);
drawRoundRect(3, 3, w - 6, h - 6, 2, 15921906, 100);
}
}
static function classConstruct() {
mx.core.ext.UIObjectExtensions.Extensions();
_global.skinRegistry.ButtonSkin = true;
return(true);
}
static var symbolName = "ButtonSkin";
static var symbolOwner = mx.skins.halo.ButtonSkin;
var className = "ButtonSkin";
var backgroundColorName = "buttonColor";
static var classConstructed = classConstruct();
static var UIObjectExtensionsDependency = mx.core.ext.UIObjectExtensions;
}
Symbol 125 MovieClip [__Packages.mx.controls.VScrollBar] Frame 0
class mx.controls.VScrollBar extends mx.controls.scrollClasses.ScrollBar
{
var scrollIt;
function VScrollBar () {
super();
}
function init(Void) {
super.init();
}
function isScrollBarKey(k) {
if (k == 38) {
scrollIt("Line", -1);
return(true);
}
if (k == 40) {
scrollIt("Line", 1);
return(true);
}
if (k == 33) {
scrollIt("Page", -1);
return(true);
}
if (k == 34) {
scrollIt("Page", 1);
return(true);
}
return(super.isScrollBarKey(k));
}
static var symbolName = "VScrollBar";
static var symbolOwner = mx.core.UIComponent;
static var version = "2.0.1.78";
var className = "VScrollBar";
var minusMode = "Up";
var plusMode = "Down";
var minMode = "AtTop";
var maxMode = "AtBottom";
}
Symbol 126 MovieClip [__Packages.mx.controls.ProgressBar] Frame 0
class mx.controls.ProgressBar extends mx.core.UIObject
{
var tabEnabled, boundingBox_mc, progTrackLeft_mc, setSkin, progTrackMiddle_mc, progTrackRight_mc, progBarLeft_mc, progBarMiddle_mc, progBarRight_mc, progIndBar_mc, mask_mc, createObject, labelPath, createLabel, setSize, __width, __height, invalidate, __source, __stringSource, si, dispatchEvent;
function ProgressBar () {
super();
}
function init(Void) {
super.init();
tabEnabled = false;
boundingBox_mc._visible = false;
boundingBox_mc._width = (boundingBox_mc._height = 0);
}
function createChildren(Void) {
if (progTrackLeft_mc == undefined) {
setSkin(skinIDProgTrackLeft, progTrackLeftName);
}
if (progTrackMiddle_mc == undefined) {
setSkin(skinIDProgTrackMiddle, progTrackMiddleName);
}
if (progTrackRight_mc == undefined) {
setSkin(skinIDProgTrackRight, progTrackRightName);
}
if (progBarLeft_mc == undefined) {
setSkin(skinIDProgBarLeft, progBarLeftName);
}
if (progBarMiddle_mc == undefined) {
setSkin(skinIDProgBarMiddle, progBarMiddleName);
}
if (progBarRight_mc == undefined) {
setSkin(skinIDProgBarRight, progBarRightName);
}
if (progIndBar_mc == undefined) {
setSkin(skinIDProgIndBar, progIndBarName);
progIndBar_mc._visible = false;
}
if (mask_mc == undefined) {
mask_mc = createObject("BoundingBox", "mask_mc", skinIDMask);
mask_mc._visible = false;
progIndBar_mc.setMask(mask_mc);
}
if (labelPath == undefined) {
labelPath = createLabel("labelPath", skinIDLabel);
labelPath.tabEnabled = false;
labelPath.selectable = false;
labelPath.styleName = this;
}
setSize(__width, __height);
}
function size(Void) {
invalidate();
}
function draw(Void) {
if ((__source == undefined) && (__stringSource != undefined)) {
setSource(__stringSource);
__stringSource = undefined;
}
var _local14 = __width;
var _local22 = __height;
var _local5 = ((progBarLeft_mc._width > progTrackLeft_mc._width) ? (progBarLeft_mc._width) : (progTrackLeft_mc._width));
var _local6 = ((progBarLeft_mc._height > progTrackLeft_mc._height) ? (progBarLeft_mc._height) : (progTrackLeft_mc._height));
var _local15 = ((progBarRight_mc._width > progTrackRight_mc._width) ? (progBarRight_mc._width) : (progTrackRight_mc._width));
var _local7 = _local14;
var _local8 = 0;
var _local9 = 0;
if (__labelPlacement == "top") {
_local8 = _local22 - _local6;
}
if ((__label != undefined) && (__label != "")) {
labelPath._visible = false;
var _local11 = 1;
var _local20 = 1;
var _local18 = 5;
var _local26 = 4;
var _local12 = __value - __minimum;
if (_local12 < 0) {
_local12 = 0;
}
var _local13 = __maximum - __minimum;
if (_local13 < 0) {
_local13 = 0;
}
if ((__labelPlacement == "left") || (__labelPlacement == "right")) {
var _local4 = __label;
if (!__indeterminate) {
_local4 = replace(_local4, "%1", String(Math.floor(_local13 / __conversion)));
_local4 = replace(_local4, "%2", String(Math.floor(_local13 / __conversion)));
_local4 = replace(_local4, "%3", String(100));
_local4 = replace(_local4, "%%", "%");
} else {
_local4 = replace(_local4, "%1", String(Math.floor(_local12 / __conversion)));
_local4 = replace(_local4, "%2", "??");
_local4 = replace(_local4, "%3", "");
_local4 = replace(_local4, "%%", "");
}
labelPath.text = _local4;
_local7 = _local14 - ((labelPath.textWidth + _local18) + _local11);
if (_local7 < (_local5 + _local15)) {
_local7 = 0;
}
if (__labelPlacement == "left") {
_local9 = _local14 - _local7;
}
}
var _local3 = __label;
if (!__indeterminate) {
_local3 = replace(_local3, "%1", String(Math.floor(_local12 / __conversion)));
_local3 = replace(_local3, "%2", String(Math.floor(_local13 / __conversion)));
_local3 = replace(_local3, "%3", String(Math.floor(percentComplete)));
_local3 = replace(_local3, "%%", "%");
} else {
_local3 = replace(_local3, "%1", String(Math.floor(_local12 / __conversion)));
_local3 = replace(_local3, "%2", "??");
_local3 = replace(_local3, "%3", "");
_local3 = replace(_local3, "%%", "");
}
labelPath.text = _local3;
var _local10 = 0;
if ((__labelPlacement == "left") || (__labelPlacement == "right")) {
_local10 = (_local14 - _local7) - _local11;
} else {
_local10 = _local14 - _local11;
}
if (_local10 < (labelPath.textWidth + _local18)) {
labelPath._width = _local10;
} else {
labelPath._width = labelPath.textWidth + _local18;
}
if (((__labelPlacement == "left") || (__labelPlacement == "right")) || (__labelPlacement == "center")) {
_local10 = _local22;
} else {
_local10 = (_local22 - _local20) - _local6;
}
if (_local10 < (labelPath.textHeight + _local26)) {
labelPath._height = _local10;
} else {
labelPath._height = labelPath.textHeight + _local26;
}
if (__labelPlacement == "left") {
labelPath._x = _local11;
} else if (__labelPlacement == "right") {
labelPath._x = _local7 + _local11;
} else {
labelPath._x = _local11;
}
if (((__labelPlacement == "center") || (__labelPlacement == "left")) || (__labelPlacement == "right")) {
labelPath._y = (_local6 / 2) - (labelPath.height / 2);
} else if (__labelPlacement == "top") {
labelPath._y = (_local8 - _local20) - labelPath.height;
} else {
labelPath._y = _local6 + _local20;
}
labelPath._visible = true;
} else {
labelPath.text = "";
labelPath._visible = false;
}
if (_local7 >= (_local5 + _local15)) {
var _local2 = progTrackLeft_mc.getBounds(progTrackLeft_mc);
var _local42 = -_local2.xMin;
var _local41 = -_local2.yMin;
progTrackLeft_mc.move(((_local9 + _local5) - progTrackLeft_mc._width) + _local42, (_local8 + ((_local6 - progTrackLeft_mc._height) / 2)) + _local41);
_local2 = progTrackMiddle_mc.getBounds(progTrackMiddle_mc);
var _local38 = -_local2.xMin;
var _local35 = -_local2.yMin;
progTrackMiddle_mc.setSize((_local7 - _local5) - _local15, progTrackMiddle_mc._height);
progTrackMiddle_mc.move((_local9 + _local5) + _local38, (_local8 + ((_local6 - progTrackLeft_mc._height) / 2)) + _local35);
_local2 = progTrackRight_mc.getBounds(progTrackRight_mc);
var _local31 = -_local2.xMin;
var _local32 = -_local2.yMin;
progTrackRight_mc.move(((_local9 + _local5) + progTrackMiddle_mc._width) + _local31, (_local8 + ((_local6 - progTrackRight_mc._height) / 2)) + _local32);
var _local21 = (_local7 - _local5) - _local15;
var _local16 = (_local21 * percentComplete) / 100;
var _local17 = 0;
if (__indeterminate == true) {
_local16 = _local21;
mask_mc._width = _local16;
mask_mc._height = progIndBar_mc._height;
mask_mc._x = _local9 + _local5;
mask_mc._y = _local8 + ((_local6 - progIndBar_mc._height) / 2);
progIndBar_mc._width = (_local7 * 200) / 150;
var _local28 = progIndBar_mc._x;
_local2 = progIndBar_mc.getBounds(progIndBar_mc);
var _local30 = -_local2.xMin;
var _local29 = -_local2.yMin;
var _local19 = (_local9 + _local5) + _local30;
var _local23 = (progIndBar_mc._width * 50) / 200;
var _local25 = (progIndBar_mc._width * 20) / 200;
var _local24 = 3;
var _local27 = _local23;
if (__direction == "left") {
_local23 = (progIndBar_mc._width * 30) / 200;
_local25 = 0;
_local24 = -3;
_local27 = _local25;
}
if ((_local28 <= (_local19 - _local23)) || (_local28 >= (_local19 - _local25))) {
progIndBar_mc._x = (_local19 - _local27) + _local24;
} else {
progIndBar_mc._x = progIndBar_mc._x + _local24;
}
progIndBar_mc._y = (_local8 + ((_local6 - progIndBar_mc._height) / 2)) + _local29;
progIndBar_mc._visible = true;
invalidate();
} else {
progIndBar_mc._visible = false;
if (__direction == "left") {
_local17 = _local21 - _local16;
}
}
_local2 = progBarMiddle_mc.getBounds(progBarMiddle_mc);
var _local40 = -_local2.xMin;
var _local39 = -_local2.yMin;
progBarMiddle_mc.setSize(_local16, progBarMiddle_mc._height);
progBarMiddle_mc.move(((_local17 + _local9) + _local5) + _local40, (_local8 + ((_local6 - progBarLeft_mc._height) / 2)) + _local39);
_local2 = progBarLeft_mc.getBounds(progBarLeft_mc);
var _local36 = -_local2.xMin;
var _local33 = -_local2.yMin;
progBarLeft_mc.move((((_local17 + _local9) + _local5) - progBarLeft_mc._width) + _local36, (_local8 + ((_local6 - progBarLeft_mc._height) / 2)) + _local33);
_local2 = progBarRight_mc.getBounds(progBarRight_mc);
var _local34 = -_local2.xMin;
var _local37 = -_local2.yMin;
progBarRight_mc.move((((_local17 + _local9) + _local5) + progBarMiddle_mc._width) + _local34, (_local8 + ((_local6 - progBarRight_mc._height) / 2)) + _local37);
progTrackLeft_mc._visible = true;
progTrackMiddle_mc._visible = true;
progTrackRight_mc._visible = true;
progBarLeft_mc._visible = true;
progBarMiddle_mc._visible = true;
progBarRight_mc._visible = true;
} else {
progTrackLeft_mc._visible = false;
progTrackMiddle_mc._visible = false;
progTrackRight_mc._visible = false;
progBarLeft_mc._visible = false;
progBarMiddle_mc._visible = false;
progBarRight_mc._visible = false;
}
}
function replace(str, from, to) {
var _local1 = str.split(from);
var _local2 = _local1.join(to);
return(_local2);
}
function getMode(Void) {
return(__mode);
}
function setMode(val) {
if ((val == "polled") || (val == "manual")) {
__mode = val;
} else {
delete __mode;
}
invalidate();
}
function getDirection(Void) {
return(__direction);
}
function setDirection(val) {
if (val == "left") {
__direction = val;
} else {
delete __direction;
}
invalidate();
}
function getLabelPlacement(Void) {
return(__labelPlacement);
}
function setLabelPlacement(val) {
if ((((val == "top") || (val == "center")) || (val == "left")) || (val == "right")) {
__labelPlacement = val;
} else {
delete __labelPlacement;
}
invalidate();
}
function getIndeterminate(Void) {
return(__indeterminate);
}
function setIndeterminate(val) {
if (val == true) {
__indeterminate = true;
} else {
delete __indeterminate;
}
invalidate();
}
function getLabel(Void) {
return(__label);
}
function setLabel(val) {
__label = val;
invalidate();
}
function getConversion(Void) {
return(__conversion);
}
function setConversion(val) {
if ((!_global.isNaN(val)) && (Number(val) > 0)) {
__conversion = Number(val);
invalidate();
}
}
function getSource(Void) {
return(__source);
}
function setSource(val) {
if (typeof(val) == "string") {
__stringSource = val;
val = eval (val);
}
if (((val != null) && (val != undefined)) && (val != "")) {
__source = val;
if (__mode == "event") {
if (__source.addEventListener) {
__source.addEventListener("progress", this);
__source.addEventListener("complete", this);
} else {
__source = undefined;
}
}
if (__mode == "polled") {
si = setInterval(this, "update", __interval);
}
} else if (__source != null) {
delete __source;
clearInterval(si);
delete si;
}
}
function update(Void) {
var _local2 = __source;
var _local3 = _local2.getBytesLoaded();
var _local4 = _local2.getBytesTotal();
_setProgress(_local3, _local4);
if ((percentComplete >= 100) && (__value > 0)) {
clearInterval(si);
}
}
function progress(pEvent) {
var _local2 = pEvent.target;
var _local3 = _local2.bytesLoaded;
var _local4 = _local2.bytesTotal;
_setProgress(_local3, _local4);
}
function complete(pEvent) {
}
function _setProgress(completed, total) {
if ((!_global.isNaN(completed)) && (!_global.isNaN(total))) {
__value = Number(completed);
__maximum = Number(total);
if (__mode != "event") {
dispatchEvent({type:"progress", current:completed, total:total});
if ((__value == __maximum) && (__value > 0)) {
dispatchEvent({type:"complete", current:completed, total:total});
}
}
invalidate();
}
}
function setProgress(completed, total) {
if (__mode == "manual") {
_setProgress(completed, total);
}
}
function getPercentComplete(Void) {
if ((__value < __minimum) || (__maximum < __minimum)) {
return(0);
}
var _local3 = (100 * (__value - __minimum)) / (__maximum - __minimum);
if (_global.isNaN(_local3) || (_local3 < 0)) {
return(0);
}
if (_local3 > 100) {
return(100);
}
return(_local3);
}
function getMaximum(Void) {
return(__maximum);
}
function setMaximum(val) {
if ((!_global.isNaN(val)) && (__mode == "manual")) {
__maximum = Number(val);
invalidate();
}
}
function getMinimum(Void) {
return(__minimum);
}
function setMinimum(val) {
if ((!_global.isNaN(val)) && (__mode == "manual")) {
__minimum = Number(val);
invalidate();
}
}
function getVal(Void) {
return(__value);
}
function get mode() {
return(getMode());
}
function set mode(x) {
setMode(x);
//return(mode);
}
function get source() {
return(getSource());
}
function set source(x) {
setSource(x);
//return(source);
}
function get direction() {
return(getDirection());
}
function set direction(x) {
setDirection(x);
//return(direction);
}
function get label() {
return(getLabel());
}
function set label(x) {
setLabel(x);
//return(label);
}
function get labelPlacement() {
return(getLabelPlacement());
}
function set labelPlacement(x) {
setLabelPlacement(x);
//return(labelPlacement);
}
function get indeterminate() {
return(getIndeterminate());
}
function set indeterminate(x) {
setIndeterminate(x);
//return(indeterminate);
}
function get conversion() {
return(getConversion());
}
function set conversion(x) {
setConversion(x);
//return(conversion);
}
function get percentComplete() {
return(getPercentComplete());
}
function get maximum() {
return(getMaximum());
}
function set maximum(x) {
setMaximum(x);
//return(maximum);
}
function get minimum() {
return(getMinimum());
}
function set minimum(x) {
setMinimum(x);
//return(minimum);
}
function get value() {
return(getVal());
}
static var symbolName = "ProgressBar";
static var symbolOwner = Object(mx.controls.ProgressBar);
var className = "ProgressBar";
static var version = "2.0.1.78";
var __mode = "event";
var __direction = "right";
var __labelPlacement = "bottom";
var __label = "LOADING %3%% ";
var __conversion = 1;
var __maximum = 0;
var __minimum = 0;
var __value = 0;
var __indeterminate = false;
var progTrackLeftName = "ProgTrackLeft";
var progTrackMiddleName = "ProgTrackMiddle";
var progTrackRightName = "ProgTrackRight";
var progBarLeftName = "ProgBarLeft";
var progBarMiddleName = "ProgBarMiddle";
var progBarRightName = "ProgBarRight";
var progIndBarName = "ProgIndBar";
var idNames = new Array("progTrackLeft_mc", "progTrackMiddle_mc", "progTrackRight_mc", "progBarLeft_mc", "progBarMiddle_mc", "progBarRight_mc", "progIndBar_mc");
var skinIDProgTrackLeft = 0;
var skinIDProgTrackMiddle = 1;
var skinIDProgTrackRight = 2;
var skinIDProgBarLeft = 3;
var skinIDProgBarMiddle = 4;
var skinIDProgBarRight = 5;
var skinIDProgIndBar = 6;
var skinIDMask = 100;
var skinIDLabel = 200;
var __interval = 30;
var __leave = 2;
var clipParameters = {mode:1, source:1, direction:1, label:1, labelPlacement:1, conversion:1};
static var mergedClipParameters = mx.core.UIObject.mergeClipParameters(mx.controls.ProgressBar.prototype.clipParameters, mx.core.UIObject.prototype.clipParameters);
}
Symbol 403 MovieClip [__Packages.mx.controls.RadioButton] Frame 0
class mx.controls.RadioButton extends mx.controls.Button
{
var setToggle, __value, selected, releaseFocus, phase, dispatchEvent, _parent, __data, setState, __state, getFocusManager;
function RadioButton () {
super();
}
function init(Void) {
setToggle(__toggle);
__value = this;
super.init();
}
function size(Void) {
super.size();
}
function onRelease() {
if (selected) {
return(undefined);
}
releaseFocus();
phase = "up";
setSelected(true);
dispatchEvent({type:"click"});
_parent[__groupName].dispatchEvent({type:"click"});
}
function setData(val) {
__data = val;
}
function set data(val) {
__data = val;
//return(data);
}
function getData(val) {
return(__data);
}
function get data() {
return(__data);
}
function onUnload() {
if (_parent[__groupName].selectedRadio == this) {
_parent[__groupName].selectedRadio = undefined;
}
_parent[__groupName].radioList[indexNumber] = null;
delete _parent[__groupName].radioList[indexNumber];
}
function setSelected(val) {
var _local2 = _parent[__groupName];
var _local4 = _local2.selectedRadio.__width;
var _local5 = _local2.selectedRadio.__height;
if (val) {
_local2.selectedRadio.setState(false);
_local2.selectedRadio = this;
} else if (_local2.selectedRadio == this) {
_local2.selectedRadio.setState(false);
_local2.selectedRadio = undefined;
}
setState(val);
}
function deleteGroupObj(groupName) {
delete _parent[groupName];
}
function getGroupName() {
return(__groupName);
}
function get groupName() {
return(__groupName);
}
function setGroupName(groupName) {
if ((groupName == undefined) || (groupName == "")) {
return(undefined);
}
delete _parent[__groupName].radioList[__data];
addToGroup(groupName);
__groupName = groupName;
}
function set groupName(groupName) {
setGroupName(groupName);
//return(this.groupName);
}
function addToGroup(groupName) {
if ((groupName == "") || (groupName == undefined)) {
return(undefined);
}
var _local2 = _parent[groupName];
if (_local2 == undefined) {
_local2 = (_parent[groupName] = new mx.controls.RadioButtonGroup());
_local2.__groupName = groupName;
}
_local2.addInstance(this);
if (__state) {
_local2.selectedRadio.setState(false);
_local2.selectedRadio = this;
}
}
function get emphasized() {
return(undefined);
}
function keyDown(e) {
switch (e.code) {
case 40 :
setNext();
break;
case 38 :
setPrev();
break;
case 37 :
setPrev();
break;
case 39 :
setNext();
}
}
function setNext() {
var _local2 = _parent[groupName];
if ((_local2.selectedRadio.indexNumber + 1) == _local2.radioList.length) {
return(undefined);
}
var _local4 = (_local2.selectedRadio ? (_local2.selectedRadio.indexNumber) : -1);
var _local3 = 1;
while (_local3 < _local2.radioList.length) {
if ((_local2.radioList[_local4 + _local3] != undefined) && (_local2.radioList[_local4 + _local3].enabled)) {
var _local5 = getFocusManager();
_local2.radioList[_local4 + _local3].selected = true;
_local5.setFocus(_local2.radioList[_local2.selectedRadio.indexNumber]);
_local2.dispatchEvent({type:"click"});
break;
}
_local3++;
}
}
function setPrev() {
var _local2 = _parent[groupName];
if (_local2.selectedRadio.indexNumber == 0) {
return(undefined);
}
var _local4 = (_local2.selectedRadio ? (_local2.selectedRadio.indexNumber) : 1);
var _local3 = 1;
while (_local3 < _local2.radioList.length) {
if ((_local2.radioList[_local4 - _local3] != undefined) && (_local2.radioList[_local4 - _local3].enabled)) {
var _local5 = getFocusManager();
_local2.radioList[_local4 - _local3].selected = true;
_local5.setFocus(_local2.radioList[_local2.selectedRadio.indexNumber]);
_local2.dispatchEvent({type:"click"});
break;
}
_local3++;
}
}
function set toggle(v) {
//return(toggle);
}
function get toggle() {
}
function set icon(v) {
//return(icon);
}
function get icon() {
}
static var symbolName = "RadioButton";
static var symbolOwner = mx.controls.RadioButton;
static var version = "2.0.1.78";
var className = "RadioButton";
var btnOffset = 0;
var __toggle = true;
var __label = "Radio Button";
var __labelPlacement = "right";
var ignoreClassStyleDeclaration = {Button:1};
var __groupName = "radioGroup";
var indexNumber = 0;
var offset = false;
var falseUpSkin = "";
var falseDownSkin = "";
var falseOverSkin = "";
var falseDisabledSkin = "";
var trueUpSkin = "";
var trueDownSkin = "";
var trueOverSkin = "";
var trueDisabledSkin = "";
var falseUpIcon = "RadioFalseUp";
var falseDownIcon = "RadioFalseDown";
var falseOverIcon = "RadioFalseOver";
var falseDisabledIcon = "RadioFalseDisabled";
var trueUpIcon = "RadioTrueUp";
var trueDownIcon = "";
var trueOverIcon = "";
var trueDisabledIcon = "RadioTrueDisabled";
var centerContent = false;
var borderW = 0;
var clipParameters = {labelPlacement:1, data:1, label:1, groupName:1, selected:1};
static var mergedClipParameters = mx.core.UIObject.mergeClipParameters(mx.controls.RadioButton.prototype.clipParameters, mx.controls.Button.prototype.clipParameters);
}
Symbol 420 MovieClip [__Packages.mx.controls.RadioButtonGroup] Frame 0
class mx.controls.RadioButtonGroup
{
var radioList, __groupName, selectedRadio;
function RadioButtonGroup () {
init();
mx.events.UIEventDispatcher.initialize(this);
}
function init(Void) {
radioList = new Array();
}
function setGroupName(groupName) {
if ((groupName == undefined) || (groupName == "")) {
return(undefined);
}
var _local6 = __groupName;
_parent[groupName] = this;
for (var _local5 in radioList) {
radioList[_local5].groupName = groupName;
var _local3 = radioList[_local5];
}
_local3.deleteGroupObj(_local6);
}
function getGroupName() {
return(__groupName);
}
function addInstance(instance) {
instance.indexNumber = indexNumber++;
radioList.push(instance);
}
function getValue() {
if (selectedRadio.data == "") {
return(selectedRadio.label);
}
return(selectedRadio.__data);
}
function getLabelPlacement() {
for (var _local3 in radioList) {
var _local2 = radioList[_local3].getLabelPlacement();
}
return(_local2);
}
function setLabelPlacement(pos) {
for (var _local3 in radioList) {
radioList[_local3].setLabelPlacement(pos);
}
}
function setEnabled(val) {
for (var _local3 in radioList) {
radioList[_local3].enabled = val;
}
}
function setSize(val, val1) {
for (var _local3 in radioList) {
radioList[_local3].setSize(val, val1);
}
}
function getEnabled() {
for (var _local4 in radioList) {
var _local2 = radioList[_local4].enabled;
var _local3 = t + (_local2 + 0);
}
if (_local3 == radioList.length) {
return(true);
}
if (_local3 == 0) {
return(false);
}
}
function setStyle(name, val) {
for (var _local4 in radioList) {
radioList[_local4].setStyle(name, val);
}
}
function setInstance(val) {
for (var _local3 in radioList) {
if (radioList[_local3] == val) {
radioList[_local3].selected = true;
}
}
}
function getInstance() {
return(selectedRadio);
}
function setValue(val) {
for (var _local4 in radioList) {
if ((radioList[_local4].__data == val) || (radioList[_local4].label == val)) {
var _local2 = _local4;
break;
}
}
if (_local2 != undefined) {
selectedRadio.setState(false);
selectedRadio.hitArea_mc._height = selectedRadio.__height;
selectedRadio.hitArea_mc._width = selectedRadio.__width;
selectedRadio = radioList[_local2];
selectedRadio.setState(true);
selectedRadio.hitArea_mc._height = (selectedRadio.hitArea_mc._width = 0);
}
}
function set groupName(groupName) {
if ((groupName == undefined) || (groupName == "")) {
return;
}
var _local6 = __groupName;
_parent[groupName] = this;
for (var _local5 in radioList) {
radioList[_local5].groupName = groupName;
var _local3 = radioList[_local5];
}
_local3.deleteGroupObj(_local6);
//return(this.groupName);
}
function get groupName() {
return(__groupName);
}
function set selectedData(val) {
for (var _local4 in radioList) {
if ((radioList[_local4].__data == val) || (radioList[_local4].label == val)) {
var _local2 = _local4;
break;
}
}
if (_local2 != undefined) {
selectedRadio.setState(false);
selectedRadio = radioList[_local2];
selectedRadio.setState(true);
}
//return(selectedData);
}
function get selectedData() {
if ((selectedRadio.data == "") || (selectedRadio.data == undefined)) {
return(selectedRadio.label);
}
return(selectedRadio.__data);
}
function get selection() {
return(selectedRadio);
}
function set selection(val) {
for (var _local3 in radioList) {
if (radioList[_local3] == val) {
radioList[_local3].selected = true;
}
}
//return(selection);
}
function set labelPlacement(pos) {
for (var _local3 in radioList) {
radioList[_local3].setLabelPlacement(pos);
}
//return(labelPlacement);
}
function get labelPlacement() {
for (var _local3 in radioList) {
var _local2 = radioList[_local3].getLabelPlacement();
}
return(_local2);
}
function set enabled(val) {
for (var _local3 in radioList) {
radioList[_local3].enabled = val;
}
//return(enabled);
}
function get enabled() {
var _local2 = 0;
for (var _local3 in radioList) {
_local2 = _local2 + radioList[_local3].enabled;
}
if (_local2 == 0) {
return(false);
}
if (_local2 == radioList.length) {
return(true);
}
}
static var symbolName = "RadioButtonGroup";
static var symbolOwner = mx.controls.RadioButtonGroup;
static var version = "2.0.1.78";
var className = "RadioButtonGroup";
var indexNumber = 0;
}
Symbol 469 MovieClip [__Packages.mx.controls.listclasses.DataSelector] Frame 0
class mx.controls.listclasses.DataSelector extends Object
{
var __vPosition, setVPosition, __dataProvider, enabled, lastSelID, lastSelected, selected, invUpdateControl, invalidate, multipleSelection, updateControl, __rowCount, rows;
function DataSelector () {
super();
}
static function Initialize(obj) {
var _local3 = mixinProps;
var _local4 = _local3.length;
obj = obj.prototype;
var _local1 = 0;
while (_local1 < _local4) {
obj[_local3[_local1]] = mixins[_local3[_local1]];
_local1++;
}
mixins.createProp(obj, "dataProvider", true);
mixins.createProp(obj, "length", false);
mixins.createProp(obj, "value", false);
mixins.createProp(obj, "selectedIndex", true);
mixins.createProp(obj, "selectedIndices", true);
mixins.createProp(obj, "selectedItems", false);
mixins.createProp(obj, "selectedItem", true);
return(true);
}
function createProp(obj, propName, setter) {
var p = (propName.charAt(0).toUpperCase() + propName.substr(1));
var _local2 = null;
var _local4 = function (Void) {
return(this["get" + p]());
};
if (setter) {
_local2 = function (val) {
this["set" + p](val);
};
}
obj.addProperty(propName, _local4, _local2);
}
function setDataProvider(dP) {
if (__vPosition != 0) {
setVPosition(0);
}
clearSelected();
__dataProvider.removeEventListener(this);
__dataProvider = dP;
dP.addEventListener("modelChanged", this);
dP.addView(this);
modelChanged({eventName:"updateAll"});
}
function getDataProvider(Void) {
return(__dataProvider);
}
function addItemAt(index, label, data) {
if ((index < 0) || (!enabled)) {
return(undefined);
}
var _local2 = __dataProvider;
if (_local2 == undefined) {
_local2 = (__dataProvider = new Array());
_local2.addEventListener("modelChanged", this);
index = 0;
}
if ((typeof(label) == "object") || (typeof(_local2.getItemAt(0)) == "string")) {
_local2.addItemAt(index, label);
} else {
_local2.addItemAt(index, {label:label, data:data});
}
}
function addItem(label, data) {
addItemAt(__dataProvider.length, label, data);
}
function removeItemAt(index) {
return(__dataProvider.removeItemAt(index));
}
function removeAll(Void) {
__dataProvider.removeAll();
}
function replaceItemAt(index, newLabel, newData) {
if (typeof(newLabel) == "object") {
__dataProvider.replaceItemAt(index, newLabel);
} else {
__dataProvider.replaceItemAt(index, {label:newLabel, data:newData});
}
}
function sortItemsBy(fieldName, order) {
lastSelID = __dataProvider.getItemID(lastSelected);
__dataProvider.sortItemsBy(fieldName, order);
}
function sortItems(compareFunc, order) {
lastSelID = __dataProvider.getItemID(lastSelected);
__dataProvider.sortItems(compareFunc, order);
}
function getLength(Void) {
return(__dataProvider.length);
}
function getItemAt(index) {
return(__dataProvider.getItemAt(index));
}
function modelChanged(eventObj) {
var _local3 = eventObj.firstItem;
var _local6 = eventObj.lastItem;
var _local7 = eventObj.eventName;
if (_local7 == undefined) {
_local7 = eventObj.event;
_local3 = eventObj.firstRow;
_local6 = eventObj.lastRow;
if (_local7 == "addRows") {
_local7 = (eventObj.eventName = "addItems");
} else if (_local7 == "deleteRows") {
_local7 = (eventObj.eventName = "removeItems");
} else if (_local7 == "updateRows") {
_local7 = (eventObj.eventName = "updateItems");
}
}
if (_local7 == "addItems") {
for (var _local2 in selected) {
var _local5 = selected[_local2];
if ((_local5 != undefined) && (_local5 >= _local3)) {
selected[_local2] = selected[_local2] + ((_local6 - _local3) + 1);
}
}
} else if (_local7 == "removeItems") {
if (__dataProvider.length == 0) {
delete selected;
} else {
var _local9 = eventObj.removedIDs;
var _local10 = _local9.length;
var _local2 = 0;
while (_local2 < _local10) {
var _local4 = _local9[_local2];
if (selected[_local4] != undefined) {
delete selected[_local4];
}
_local2++;
}
for (_local2 in selected) {
if (selected[_local2] >= _local3) {
selected[_local2] = selected[_local2] - ((_local6 - _local3) + 1);
}
}
}
} else if (_local7 == "sort") {
if (typeof(__dataProvider.getItemAt(0)) != "object") {
delete selected;
} else {
var _local10 = __dataProvider.length;
var _local2 = 0;
while (_local2 < _local10) {
if (isSelected(_local2)) {
var _local4 = __dataProvider.getItemID(_local2);
if (_local4 == lastSelID) {
lastSelected = _local2;
}
selected[_local4] = _local2;
}
_local2++;
}
}
} else if (_local7 == "filterModel") {
setVPosition(0);
}
invUpdateControl = true;
invalidate();
}
function getValue(Void) {
var _local2 = getSelectedItem();
if (typeof(_local2) != "object") {
return(_local2);
}
return(((_local2.data == undefined) ? (_local2.label) : (_local2.data)));
}
function getSelectedIndex(Void) {
for (var _local3 in selected) {
var _local2 = selected[_local3];
if (_local2 != undefined) {
return(_local2);
}
}
}
function setSelectedIndex(index) {
if (((index >= 0) && (index < __dataProvider.length)) && (enabled)) {
delete selected;
selectItem(index, true);
lastSelected = index;
invUpdateControl = true;
invalidate();
} else if (index == undefined) {
clearSelected();
}
}
function getSelectedIndices(Void) {
var _local2 = new Array();
for (var _local3 in selected) {
_local2.push(selected[_local3]);
}
_local2.reverse();
return(((_local2.length > 0) ? (_local2) : undefined));
}
function setSelectedIndices(indexArray) {
if (multipleSelection != true) {
return(undefined);
}
delete selected;
var _local3 = 0;
while (_local3 < indexArray.length) {
var _local2 = indexArray[_local3];
if ((_local2 >= 0) && (_local2 < __dataProvider.length)) {
selectItem(_local2, true);
}
_local3++;
}
invUpdateControl = true;
updateControl();
}
function getSelectedItems(Void) {
var _local3 = getSelectedIndices();
var _local4 = new Array();
var _local2 = 0;
while (_local2 < _local3.length) {
_local4.push(getItemAt(_local3[_local2]));
_local2++;
}
return(((_local4.length > 0) ? (_local4) : undefined));
}
function getSelectedItem(Void) {
return(__dataProvider.getItemAt(getSelectedIndex()));
}
function selectItem(index, selectedFlag) {
if (selected == undefined) {
selected = new Object();
}
var _local2 = __dataProvider.getItemID(index);
if (_local2 == undefined) {
return(undefined);
}
if (selectedFlag && (!isSelected(index))) {
selected[_local2] = index;
} else if (!selectedFlag) {
delete selected[_local2];
}
}
function isSelected(index) {
var _local2 = __dataProvider.getItemID(index);
if (_local2 == undefined) {
return(false);
}
return(selected[_local2] != undefined);
}
function clearSelected(transition) {
var _local3 = 0;
for (var _local4 in selected) {
var _local2 = selected[_local4];
if (((_local2 != undefined) && (__vPosition <= _local2)) && (_local2 < (__vPosition + __rowCount))) {
rows[_local2 - __vPosition].drawRow(rows[_local2 - __vPosition].item, "normal", transition && ((_local3 % 3) == 0));
}
_local3++;
}
delete selected;
}
static var mixins = new mx.controls.listclasses.DataSelector();
static var mixinProps = ["setDataProvider", "getDataProvider", "addItem", "addItemAt", "removeAll", "removeItemAt", "replaceItemAt", "sortItemsBy", "sortItems", "getLength", "getItemAt", "modelChanged", "calcPreferredWidthFromData", "calcPreferredHeightFromData", "getValue", "getSelectedIndex", "getSelectedItem", "getSelectedIndices", "getSelectedItems", "selectItem", "isSelected", "clearSelected", "setSelectedIndex", "setSelectedIndices"];
}
Symbol 470 MovieClip [__Packages.mx.controls.listclasses.DataProvider] Frame 0
class mx.controls.listclasses.DataProvider extends Object
{
var length, splice, dispatchEvent, sortOn, reverse, sort;
function DataProvider (obj) {
super();
}
static function Initialize(obj) {
var _local4 = mixinProps;
var _local6 = _local4.length;
obj = obj.prototype;
var _local3 = 0;
while (_local3 < _local6) {
obj[_local4[_local3]] = mixins[_local4[_local3]];
_global.ASSetPropFlags(obj, _local4[_local3], 1);
_local3++;
}
mx.events.EventDispatcher.initialize(obj);
_global.ASSetPropFlags(obj, "addEventListener", 1);
_global.ASSetPropFlags(obj, "removeEventListener", 1);
_global.ASSetPropFlags(obj, "dispatchEvent", 1);
_global.ASSetPropFlags(obj, "dispatchQueue", 1);
Object.prototype.LargestID = 0;
Object.prototype.getID = function () {
if (this.__ID__ == undefined) {
this.__ID__ = Object.prototype.LargestID++;
_global.ASSetPropFlags(this, "__ID__", 1);
}
return(this.__ID__);
};
_global.ASSetPropFlags(Object.prototype, "LargestID", 1);
_global.ASSetPropFlags(Object.prototype, "getID", 1);
return(true);
}
function addItemAt(index, value) {
if (index < length) {
splice(index, 0, value);
} else if (index > length) {
trace("Cannot add an item past the end of the DataProvider");
return(undefined);
}
this[index] = value;
updateViews("addItems", index, index);
}
function addItem(value) {
addItemAt(length, value);
}
function addItemsAt(index, newItems) {
index = Math.min(length, index);
newItems.unshift(index, 0);
splice.apply(this, newItems);
newItems.splice(0, 2);
updateViews("addItems", index, (index + newItems.length) - 1);
}
function removeItemsAt(index, len) {
var _local3 = new Array();
var _local2 = 0;
while (_local2 < len) {
_local3.push(getItemID(index + _local2));
_local2++;
}
var _local6 = splice(index, len);
dispatchEvent({type:"modelChanged", eventName:"removeItems", firstItem:index, lastItem:(index + len) - 1, removedItems:_local6, removedIDs:_local3});
}
function removeItemAt(index) {
var _local2 = this[index];
removeItemsAt(index, 1);
return(_local2);
}
function removeAll(Void) {
splice(0);
updateViews("removeItems", 0, length - 1);
}
function replaceItemAt(index, itemObj) {
if ((index < 0) || (index >= length)) {
return(undefined);
}
var _local3 = getItemID(index);
this[index] = itemObj;
this[index].__ID__ = _local3;
updateViews("updateItems", index, index);
}
function getItemAt(index) {
return(this[index]);
}
function getItemID(index) {
var _local2 = this[index];
if ((typeof(_local2) != "object") && (_local2 != undefined)) {
return(index);
}
return(_local2.getID());
}
function sortItemsBy(fieldName, order) {
if (typeof(order) == "string") {
sortOn(fieldName);
if (order.toUpperCase() == "DESC") {
reverse();
}
} else {
sortOn(fieldName, order);
}
updateViews("sort");
}
function sortItems(compareFunc, optionFlags) {
sort(compareFunc, optionFlags);
updateViews("sort");
}
function editField(index, fieldName, newData) {
this[index][fieldName] = newData;
dispatchEvent({type:"modelChanged", eventName:"updateField", firstItem:index, lastItem:index, fieldName:fieldName});
}
function getEditingData(index, fieldName) {
return(this[index][fieldName]);
}
function updateViews(event, first, last) {
dispatchEvent({type:"modelChanged", eventName:event, firstItem:first, lastItem:last});
}
static var mixinProps = ["addView", "addItem", "addItemAt", "removeAll", "removeItemAt", "replaceItemAt", "getItemAt", "getItemID", "sortItemsBy", "sortItems", "updateViews", "addItemsAt", "removeItemsAt", "getEditingData", "editField"];
static var evtDipatcher = mx.events.EventDispatcher;
static var mixins = new mx.controls.listclasses.DataProvider();
}
Symbol 471 MovieClip [__Packages.mx.controls.listclasses.ScrollSelectList] Frame 0
class mx.controls.listclasses.ScrollSelectList extends mx.core.ScrollView
{
var invLayoutContent, rows, topRowZ, listContent, __dataProvider, __vPosition, tW, layoutX, layoutY, tH, invRowHeight, invalidate, __height, invUpdateControl, __cellRenderer, __labelFunction, __iconField, __iconFunction, getLength, baseRowZ, lastPosition, propertyTable, isSelected, wasKeySelected, changeFlag, clearSelected, selectItem, lastSelected, dispatchEvent, dragScrolling, _ymouse, scrollInterval, isPressed, onMouseUp, getSelectedIndex, enabled, tabEnabled, tabChildren, createEmptyMovieClip, border_mc;
function ScrollSelectList () {
super();
}
function layoutContent(x, y, w, h) {
delete invLayoutContent;
var _local4 = Math.ceil(h / __rowHeight);
roundUp = (h % __rowHeight) != 0;
var _local12 = _local4 - __rowCount;
if (_local12 < 0) {
var _local3 = _local4;
while (_local3 < __rowCount) {
rows[_local3].removeMovieClip();
delete rows[_local3];
_local3++;
}
topRowZ = topRowZ + _local12;
} else if (_local12 > 0) {
if (rows == undefined) {
rows = new Array();
}
var _local3 = __rowCount;
while (_local3 < _local4) {
var _local2 = (rows[_local3] = listContent.createObject(__rowRenderer, "listRow" + (topRowZ++), topRowZ, {owner:this, styleName:this, rowIndex:_local3}));
_local2._x = x;
_local2._y = Math.round((_local3 * __rowHeight) + y);
_local2.setSize(w, __rowHeight);
_local2.drawRow(__dataProvider.getItemAt(__vPosition + _local3), getStateAt(__vPosition + _local3));
_local2.lastY = _local2._y;
_local3++;
}
}
if (w != tW) {
var _local11 = ((_local12 > 0) ? (__rowCount) : (_local4));
var _local3 = 0;
while (_local3 < _local11) {
rows[_local3].setSize(w, __rowHeight);
_local3++;
}
}
if ((layoutX != x) || (layoutY != y)) {
var _local3 = 0;
while (_local3 < _local4) {
rows[_local3]._x = x;
rows[_local3]._y = Math.round((_local3 * __rowHeight) + y);
_local3++;
}
}
__rowCount = _local4;
layoutX = x;
layoutY = y;
tW = w;
tH = h;
}
function getRowHeight(Void) {
return(__rowHeight);
}
function setRowHeight(v) {
__rowHeight = v;
invRowHeight = true;
invalidate();
}
function get rowHeight() {
return(getRowHeight());
}
function set rowHeight(w) {
setRowHeight(w);
//return(rowHeight);
}
function setRowCount(v) {
__rowCount = v;
}
function getRowCount(Void) {
var _local2 = ((__rowCount == 0) ? (Math.ceil(__height / __rowHeight)) : (__rowCount));
return(_local2);
}
function get rowCount() {
return(getRowCount());
}
function set rowCount(w) {
setRowCount(w);
//return(rowCount);
}
function setEnabled(v) {
super.setEnabled(v);
invUpdateControl = true;
invalidate();
}
function setCellRenderer(cR) {
__cellRenderer = cR;
var _local2 = 0;
while (_local2 < rows.length) {
rows[_local2].setCellRenderer(true);
_local2++;
}
invUpdateControl = true;
invalidate();
}
function set cellRenderer(cR) {
setCellRenderer(cR);
//return(cellRenderer);
}
function get cellRenderer() {
return(__cellRenderer);
}
function set labelField(field) {
setLabelField(field);
//return(labelField);
}
function setLabelField(field) {
__labelField = field;
invUpdateControl = true;
invalidate();
}
function get labelField() {
return(__labelField);
}
function set labelFunction(func) {
setLabelFunction(func);
//return(labelFunction);
}
function setLabelFunction(func) {
__labelFunction = func;
invUpdateControl = true;
invalidate();
}
function get labelFunction() {
return(__labelFunction);
}
function set iconField(field) {
setIconField(field);
//return(iconField);
}
function setIconField(field) {
__iconField = field;
invUpdateControl = true;
invalidate();
}
function get iconField() {
return(__iconField);
}
function set iconFunction(func) {
setIconFunction(func);
//return(iconFunction);
}
function setIconFunction(func) {
__iconFunction = func;
invUpdateControl = true;
invalidate();
}
function get iconFunction() {
return(__iconFunction);
}
function setVPosition(pos) {
if (pos < 0) {
return(undefined);
}
if ((pos > 0) && (pos > ((getLength() - __rowCount) + roundUp))) {
return(undefined);
}
var _local8 = pos - __vPosition;
if (_local8 == 0) {
return(undefined);
}
__vPosition = pos;
var _local10 = _local8 > 0;
_local8 = Math.abs(_local8);
if (_local8 >= __rowCount) {
updateControl();
} else {
var _local4 = new Array();
var _local9 = __rowCount - _local8;
var _local12 = _local8 * __rowHeight;
var _local11 = _local9 * __rowHeight;
var _local6 = (_local10 ? 1 : -1);
var _local3 = 0;
while (_local3 < __rowCount) {
if (((_local3 < _local8) && (_local10)) || ((_local3 >= _local9) && (!_local10))) {
rows[_local3]._y = rows[_local3]._y + Math.round(_local6 * _local11);
var _local5 = _local3 + (_local6 * _local9);
var _local7 = __vPosition + _local5;
_local4[_local5] = rows[_local3];
_local4[_local5].rowIndex = _local5;
_local4[_local5].drawRow(__dataProvider.getItemAt(_local7), getStateAt(_local7), false);
} else {
rows[_local3]._y = rows[_local3]._y - Math.round(_local6 * _local12);
var _local5 = _local3 - (_local6 * _local8);
_local4[_local5] = rows[_local3];
_local4[_local5].rowIndex = _local5;
}
_local3++;
}
rows = _local4;
_local3 = 0;
while (_local3 < __rowCount) {
rows[_local3].swapDepths(baseRowZ + _local3);
_local3++;
}
}
lastPosition = pos;
super.setVPosition(pos);
}
function setPropertiesAt(index, obj) {
var _local2 = __dataProvider.getItemID(index);
if (_local2 == undefined) {
return(undefined);
}
if (propertyTable == undefined) {
propertyTable = new Object();
}
propertyTable[_local2] = obj;
rows[index - __vPosition].drawRow(__dataProvider.getItemAt(index), getStateAt(index));
}
function getPropertiesAt(index) {
var _local2 = __dataProvider.getItemID(index);
if (_local2 == undefined) {
return(undefined);
}
return(propertyTable[_local2]);
}
function getPropertiesOf(obj) {
var _local2 = obj.getID();
if (_local2 == undefined) {
return(undefined);
}
return(propertyTable[_local2]);
}
function getStyle(styleProp) {
var _local2 = super.getStyle(styleProp);
var _local3 = mx.styles.StyleManager.colorNames[_local2];
if (_local3 != undefined) {
_local2 = _local3;
}
return(_local2);
}
function updateControl(Void) {
var _local2 = 0;
while (_local2 < __rowCount) {
rows[_local2].drawRow(__dataProvider.getItemAt(_local2 + __vPosition), getStateAt(_local2 + __vPosition));
_local2++;
}
delete invUpdateControl;
}
function getStateAt(index) {
return((isSelected(index) ? "selected" : "normal"));
}
function selectRow(rowIndex, transition, allowChangeEvent) {
if (!selectable) {
return(undefined);
}
var _local3 = __vPosition + rowIndex;
var _local8 = __dataProvider.getItemAt(_local3);
var _local5 = rows[rowIndex];
if (_local8 == undefined) {
return(undefined);
}
if (transition == undefined) {
transition = true;
}
if (allowChangeEvent == undefined) {
allowChangeEvent = wasKeySelected;
}
changeFlag = true;
if (((!multipleSelection) && (!Key.isDown(17))) || ((!Key.isDown(16)) && (!Key.isDown(17)))) {
clearSelected(transition);
selectItem(_local3, true);
lastSelected = _local3;
_local5.drawRow(_local5.item, getStateAt(_local3), transition);
} else if (Key.isDown(16) && (multipleSelection)) {
if (lastSelected == undefined) {
lastSelected = _local3;
}
var _local4 = ((lastSelected < _local3) ? 1 : -1);
clearSelected(false);
var _local2 = lastSelected;
while (_local2 != _local3) {
selectItem(_local2, true);
if ((_local2 >= __vPosition) && (_local2 < (__vPosition + __rowCount))) {
rows[_local2 - __vPosition].drawRow(rows[_local2 - __vPosition].item, "selected", false);
}
_local2 = _local2 + _local4;
}
selectItem(_local3, true);
_local5.drawRow(_local5.item, "selected", transition);
} else if (Key.isDown(17)) {
var _local7 = isSelected(_local3);
if ((!multipleSelection) || (wasKeySelected)) {
clearSelected(transition);
}
if (!((!multipleSelection) && (_local7))) {
selectItem(_local3, !_local7);
var _local9 = ((!_local7) ? "selected" : "normal");
_local5.drawRow(_local5.item, _local9, transition);
}
lastSelected = _local3;
}
if (allowChangeEvent) {
dispatchEvent({type:"change"});
}
delete wasKeySelected;
}
function dragScroll(Void) {
clearInterval(dragScrolling);
if (_ymouse < 0) {
setVPosition(__vPosition - 1);
selectRow(0, false);
var _local2 = Math.min((-_ymouse) - 30, 0);
scrollInterval = (((0.593 * _local2) * _local2) + 1) + minScrollInterval;
dragScrolling = setInterval(this, "dragScroll", scrollInterval);
dispatchEvent({type:"scroll", direction:"vertical", position:__vPosition});
} else if (_ymouse > __height) {
var _local3 = __vPosition;
setVPosition(__vPosition + 1);
if (_local3 != __vPosition) {
selectRow((__rowCount - 1) - roundUp, false);
}
var _local2 = Math.min((_ymouse - __height) - 30, 0);
scrollInterval = (((0.593 * _local2) * _local2) + 1) + minScrollInterval;
dragScrolling = setInterval(this, "dragScroll", scrollInterval);
dispatchEvent({type:"scroll", direction:"vertical", position:__vPosition});
} else {
dragScrolling = setInterval(this, "dragScroll", 15);
}
updateAfterEvent();
}
function __onMouseUp(Void) {
clearInterval(dragScrolling);
delete dragScrolling;
delete dragScrolling;
delete isPressed;
delete onMouseUp;
if (!selectable) {
return(undefined);
}
if (changeFlag) {
dispatchEvent({type:"change"});
}
delete changeFlag;
}
function moveSelBy(incr) {
if (!selectable) {
setVPosition(__vPosition + incr);
return(undefined);
}
var _local3 = getSelectedIndex();
if (_local3 == undefined) {
_local3 = -1;
}
var _local2 = _local3 + incr;
_local2 = Math.max(0, _local2);
_local2 = Math.min(getLength() - 1, _local2);
if (_local2 == _local3) {
return(undefined);
}
if ((_local3 < __vPosition) || (_local3 >= (__vPosition + __rowCount))) {
setVPosition(_local3);
}
if ((_local2 >= ((__vPosition + __rowCount) - roundUp)) || (_local2 < __vPosition)) {
setVPosition(__vPosition + incr);
}
wasKeySelected = true;
selectRow(_local2 - __vPosition, false);
}
function keyDown(e) {
if (selectable) {
if (findInputText()) {
return(undefined);
}
}
if (e.code == 40) {
moveSelBy(1);
} else if (e.code == 38) {
moveSelBy(-1);
} else if (e.code == 34) {
if (selectable) {
var _local3 = getSelectedIndex();
if (_local3 == undefined) {
_local3 = 0;
}
setVPosition(_local3);
}
moveSelBy((__rowCount - 1) - roundUp);
} else if (e.code == 33) {
if (selectable) {
var _local3 = getSelectedIndex();
if (_local3 == undefined) {
_local3 = 0;
}
setVPosition(_local3);
}
moveSelBy((1 - __rowCount) + roundUp);
} else if (e.code == 36) {
moveSelBy(-__dataProvider.length);
} else if (e.code == 35) {
moveSelBy(__dataProvider.length);
}
}
function findInputText(Void) {
var _local2 = Key.getAscii();
if ((_local2 >= 33) && (_local2 <= 126)) {
findString(String.fromCharCode(_local2));
return(true);
}
}
function findString(str) {
if (__dataProvider.length == 0) {
return(undefined);
}
var _local4 = getSelectedIndex();
if (_local4 == undefined) {
_local4 = 0;
}
var _local6 = 0;
var _local3 = _local4 + 1;
while (_local3 != _local4) {
var _local2 = __dataProvider.getItemAt(_local3);
if (_local2 instanceof XMLNode) {
_local2 = _local2.attributes[__labelField];
} else if (typeof(_local2) != "string") {
_local2 = String(_local2[__labelField]);
}
_local2 = _local2.substring(0, str.length);
if ((str == _local2) || (str.toUpperCase() == _local2.toUpperCase())) {
_local6 = _local3 - _local4;
break;
}
if (_local3 >= (getLength() - 1)) {
_local3 = -1;
}
_local3++;
}
if (_local6 != 0) {
moveSelBy(_local6);
}
}
function onRowPress(rowIndex) {
if (!enabled) {
return(undefined);
}
isPressed = true;
dragScrolling = setInterval(this, "dragScroll", 15);
onMouseUp = __onMouseUp;
if (!selectable) {
return(undefined);
}
selectRow(rowIndex);
}
function onRowRelease(rowIndex) {
}
function onRowRollOver(rowIndex) {
if (!enabled) {
return(undefined);
}
var _local2 = rows[rowIndex].item;
if (getStyle("useRollOver") && (_local2 != undefined)) {
rows[rowIndex].drawRow(_local2, "highlighted", false);
}
dispatchEvent({type:"itemRollOver", index:rowIndex + __vPosition});
}
function onRowRollOut(rowIndex) {
if (!enabled) {
return(undefined);
}
if (getStyle("useRollOver")) {
rows[rowIndex].drawRow(rows[rowIndex].item, getStateAt(rowIndex + __vPosition), false);
}
dispatchEvent({type:"itemRollOut", index:rowIndex + __vPosition});
}
function onRowDragOver(rowIndex) {
if (((!enabled) || (isPressed != true)) || (!selectable)) {
return(undefined);
}
if (dropEnabled) {
} else if (dragScrolling) {
selectRow(rowIndex, false);
} else {
onMouseUp = __onMouseUp;
onRowPress(rowIndex);
}
}
function onRowDragOut(rowIndex) {
if (!enabled) {
return(undefined);
}
if (dragEnabled) {
} else {
onRowRollOut(rowIndex);
}
}
function init(Void) {
super.init();
tabEnabled = true;
tabChildren = false;
if (__dataProvider == undefined) {
__dataProvider = new Array();
__dataProvider.addEventListener("modelChanged", this);
}
baseRowZ = (topRowZ = 10);
}
function createChildren(Void) {
super.createChildren();
listContent = createEmptyMovieClip("content_mc", CONTENTDEPTH);
invLayoutContent = true;
invalidate();
}
function draw(Void) {
if (invRowHeight) {
delete invRowHeight;
__rowCount = 0;
listContent.removeMovieClip();
listContent = createEmptyMovieClip("content_mc", CONTENTDEPTH);
}
if (invUpdateControl) {
updateControl();
}
border_mc.draw();
}
function invalidateStyle(propName) {
if (isRowStyle[propName]) {
invUpdateControl = true;
invalidate();
} else {
var _local3 = 0;
while (_local3 < __rowCount) {
rows[_local3].invalidateStyle(propName);
_local3++;
}
}
super.invalidateStyle(propName);
}
static var mixIt1 = mx.controls.listclasses.DataSelector.Initialize(mx.controls.listclasses.ScrollSelectList);
static var mixIt2 = mx.controls.listclasses.DataProvider.Initialize(Array);
var CONTENTDEPTH = 100;
var __hPosition = 0;
var __rowRenderer = "SelectableRow";
var __rowHeight = 22;
var __rowCount = 0;
var __labelField = "label";
var minScrollInterval = 30;
var dropEnabled = false;
var dragEnabled = false;
var className = "ScrollSelectList";
var isRowStyle = {styleName:true, backgroundColor:true, selectionColor:true, rollOverColor:true, selectionDisabledColor:true, backgroundDisabledColor:true, textColor:true, textSelectedColor:true, textRollOverColor:true, textDisabledColor:true, alternatingRowColors:true, defaultIcon:true};
var roundUp = 0;
var selectable = true;
var multipleSelection = false;
}
Symbol 472 MovieClip [__Packages.mx.controls.List] Frame 0
class mx.controls.List extends mx.controls.listclasses.ScrollSelectList
{
var border_mc, __labels, setDataProvider, roundUp, __get__rowCount, __dataProvider, __maxHPosition, invScrollProps, invalidate, __vPosition, getViewMetrics, setSize, __width, __rowHeight, totalWidth, totalHeight, displayWidth, __hScrollPolicy, vScroller, __hPosition, listContent, data, mask_mc, __height, __rowCount, invRowHeight, invLayoutContent, setScrollProperties, oldVWidth;
function List () {
super();
}
function setEnabled(v) {
super.setEnabled(v);
border_mc.backgroundColorName = (v ? "backgroundColor" : "backgroundDisabledColor");
border_mc.invalidate();
}
function get labels() {
return(__labels);
}
function set labels(lbls) {
__labels = lbls;
setDataProvider(lbls);
//return(labels);
}
function setVPosition(pos) {
pos = Math.min((__dataProvider.length - __get__rowCount()) + roundUp, pos);
pos = Math.max(0, pos);
super.setVPosition(pos);
}
function setHPosition(pos) {
pos = Math.max(Math.min(__maxHPosition, pos), 0);
super.setHPosition(pos);
hScroll(pos);
}
function setMaxHPosition(pos) {
__maxHPosition = pos;
invScrollProps = true;
invalidate();
}
function setHScrollPolicy(policy) {
if ((policy.toLowerCase() == "auto") && (!autoHScrollAble)) {
return(undefined);
}
super.setHScrollPolicy(policy);
if (policy == "off") {
setHPosition(0);
setVPosition(Math.min((__dataProvider.length - __get__rowCount()) + roundUp, __vPosition));
}
}
function setRowCount(rC) {
if (isNaN(rC)) {
return(undefined);
}
var _local2 = getViewMetrics();
setSize(__width, ((__rowHeight * rC) + _local2.top) + _local2.bottom);
}
function layoutContent(x, y, tW, tH, dW, dH) {
totalWidth = tW;
totalHeight = tH;
displayWidth = dW;
var _local4 = (((__hScrollPolicy == "on") || (__hScrollPolicy == "auto")) ? (Math.max(tW, dW)) : (dW));
super.layoutContent(x, y, _local4, dH);
}
function modelChanged(eventObj) {
super.modelChanged(eventObj);
var _local3 = eventObj.eventName;
if ((((_local3 == "addItems") || (_local3 == "removeItems")) || (_local3 == "updateAll")) || (_local3 == "filterModel")) {
invScrollProps = true;
invalidate("invScrollProps");
}
}
function onScroll(eventObj) {
var _local3 = eventObj.target;
if (_local3 == vScroller) {
setVPosition(_local3.scrollPosition);
} else {
hScroll(_local3.scrollPosition);
}
super.onScroll(eventObj);
}
function hScroll(pos) {
__hPosition = pos;
listContent._x = -pos;
}
function init(Void) {
super.init();
if (labels.length > 0) {
var _local6 = new Array();
var _local3 = 0;
while (_local3 < labels.length) {
_local6.addItem({label:labels[_local3], data:data[_local3]});
_local3++;
}
setDataProvider(_local6);
}
__maxHPosition = 0;
}
function createChildren(Void) {
super.createChildren();
listContent.setMask(mask_mc);
border_mc.move(0, 0);
border_mc.setSize(__width, __height);
}
function getRowCount(Void) {
var _local2 = getViewMetrics();
return(((__rowCount == 0) ? (Math.ceil(((__height - _local2.top) - _local2.bottom) / __rowHeight)) : (__rowCount)));
}
function size(Void) {
super.size();
configureScrolling();
var _local3 = getViewMetrics();
layoutContent(_local3.left, _local3.top, __width + __maxHPosition, totalHeight, (__width - _local3.left) - _local3.right, (__height - _local3.top) - _local3.bottom);
}
function draw(Void) {
if (invRowHeight) {
invScrollProps = true;
super.draw();
listContent.setMask(mask_mc);
invLayoutContent = true;
}
if (invScrollProps) {
configureScrolling();
delete invScrollProps;
}
if (invLayoutContent) {
var _local3 = getViewMetrics();
layoutContent(_local3.left, _local3.top, __width + __maxHPosition, totalHeight, (__width - _local3.left) - _local3.right, (__height - _local3.top) - _local3.bottom);
}
super.draw();
}
function configureScrolling(Void) {
var _local2 = __dataProvider.length;
if (__vPosition > Math.max(0, (_local2 - getRowCount()) + roundUp)) {
setVPosition(Math.max(0, Math.min((_local2 - getRowCount()) + roundUp, __vPosition)));
}
var _local3 = getViewMetrics();
var _local4 = ((__hScrollPolicy != "off") ? (((__maxHPosition + __width) - _local3.left) - _local3.right) : ((__width - _local3.left) - _local3.right));
if (_local2 == undefined) {
_local2 = 0;
}
setScrollProperties(_local4, 1, _local2, __rowHeight);
if (oldVWidth != _local4) {
invLayoutContent = true;
}
oldVWidth = _local4;
}
static var symbolOwner = mx.controls.List;
static var symbolName = "List";
var className = "List";
static var version = "2.0.1.78";
var clipParameters = {rowHeight:1, enabled:1, visible:1, labels:1};
var scrollDepth = 1;
var __vScrollPolicy = "on";
var autoHScrollAble = false;
}
Symbol 478 MovieClip [__Packages.mx.effects.Tween] Frame 0
class mx.effects.Tween extends Object
{
static var IntervalToken;
var arrayMode, listener, initVal, endVal, startTime, updateFunc, endFunc, ID;
function Tween (listenerObj, init, end, dur) {
super();
if (listenerObj == undefined) {
return;
}
if (typeof(init) != "number") {
arrayMode = true;
}
listener = listenerObj;
initVal = init;
endVal = end;
if (dur != undefined) {
duration = dur;
}
startTime = getTimer();
if (duration == 0) {
endTween();
} else {
AddTween(this);
}
}
static function AddTween(tween) {
tween.ID = ActiveTweens.length;
ActiveTweens.push(tween);
if (IntervalToken == undefined) {
Dispatcher.DispatchTweens = DispatchTweens;
IntervalToken = setInterval(Dispatcher, "DispatchTweens", Interval);
}
}
static function RemoveTweenAt(index) {
var _local2 = ActiveTweens;
if (((index >= _local2.length) || (index < 0)) || (index == undefined)) {
return(undefined);
}
_local2.splice(index, 1);
var _local4 = _local2.length;
var _local1 = index;
while (_local1 < _local4) {
_local2[_local1].ID--;
_local1++;
}
if (_local4 == 0) {
clearInterval(IntervalToken);
delete IntervalToken;
}
}
static function DispatchTweens(Void) {
var _local2 = ActiveTweens;
var _local3 = _local2.length;
var _local1 = 0;
while (_local1 < _local3) {
_local2[_local1].doInterval();
_local1++;
}
updateAfterEvent();
}
function doInterval() {
var _local2 = getTimer() - startTime;
var _local3 = getCurVal(_local2);
if (_local2 >= duration) {
endTween();
} else if (updateFunc != undefined) {
listener[updateFunc](_local3);
} else {
listener.onTweenUpdate(_local3);
}
}
function getCurVal(curTime) {
if (arrayMode) {
var _local3 = new Array();
var _local2 = 0;
while (_local2 < initVal.length) {
_local3[_local2] = easingEquation(curTime, initVal[_local2], endVal[_local2] - initVal[_local2], duration);
_local2++;
}
return(_local3);
}
return(easingEquation(curTime, initVal, endVal - initVal, duration));
}
function endTween() {
if (endFunc != undefined) {
listener[endFunc](endVal);
} else {
listener.onTweenEnd(endVal);
}
RemoveTweenAt(ID);
}
function setTweenHandlers(update, end) {
updateFunc = update;
endFunc = end;
}
function easingEquation(t, b, c, d) {
return(((c / 2) * (Math.sin(Math.PI * ((t / d) - 0.5)) + 1)) + b);
}
static var ActiveTweens = new Array();
static var Interval = 10;
static var Dispatcher = new Object();
var duration = 3000;
}
Symbol 479 MovieClip [__Packages.mx.controls.listclasses.SelectableRow] Frame 0
class mx.controls.listclasses.SelectableRow extends mx.core.UIComponent
{
var __height, cell, owner, rowIndex, icon_mc, createObject, __width, backGround, highlight, highlightColor, createLabel, createClassObject, listOwner, tabEnabled, item, createEmptyMovieClip, drawRect, isChangedToSelected, bGTween, grandOwner;
function SelectableRow () {
super();
}
function setValue(itmObj, state) {
var _local7 = __height;
var _local2 = cell;
var _local5 = owner;
var _local8 = itemToString(itmObj);
if (_local2.getValue() != _local8) {
_local2.setValue(_local8, itmObj, state);
}
var _local4 = _local5.getPropertiesAt(rowIndex + _local5.__vPosition).icon;
if (_local4 == undefined) {
_local4 = _local5.__iconFunction(itmObj);
if (_local4 == undefined) {
_local4 = itmObj[_local5.__iconField];
if (_local4 == undefined) {
_local4 = _local5.getStyle("defaultIcon");
}
}
}
var _local3 = icon_mc;
if ((_local4 != undefined) && (itmObj != undefined)) {
_local3 = createObject(_local4, "icon_mc", 20);
_local3._x = 2;
_local3._y = (_local7 - _local3._height) / 2;
_local2._x = 4 + _local3._width;
} else {
_local3.removeMovieClip();
_local2._x = 2;
}
var _local9 = ((_local3 == undefined) ? 0 : (_local3._width));
_local2.setSize(__width - _local9, Math.min(_local7, _local2.getPreferredHeight()));
_local2._y = (_local7 - _local2._height) / 2;
}
function size(Void) {
var _local3 = backGround;
var _local2 = cell;
var _local4 = __height;
var _local5 = __width;
var _local6 = ((icon_mc == undefined) ? 0 : (icon_mc._width));
_local2.setSize(_local5 - _local6, Math.min(_local4, _local2.getPreferredHeight()));
_local2._y = (_local4 - _local2._height) / 2;
icon_mc._y = (_local4 - icon_mc._height) / 2;
_local3._x = 0;
_local3._width = _local5;
_local3._height = _local4;
drawRowFill(_local3, normalColor);
drawRowFill(highlight, highlightColor);
}
function setCellRenderer(forceSizing) {
var _local3 = owner.__cellRenderer;
var _local4;
if (cell != undefined) {
_local4 = cell._x;
cell.removeMovieClip();
cell.removeTextField();
}
var _local2;
if (_local3 == undefined) {
_local2 = (cell = createLabel("cll", 0, {styleName:this}));
_local2.styleName = owner;
_local2.selectable = false;
_local2.tabEnabled = false;
_local2.background = false;
_local2.border = false;
} else if (typeof(_local3) == "string") {
_local2 = (cell = createObject(_local3, "cll", 0, {styleName:this}));
} else {
_local2 = (cell = createClassObject(_local3, "cll", 0, {styleName:this}));
}
_local2.owner = this;
_local2.listOwner = owner;
_local2.getCellIndex = getCellIndex;
_local2.getDataLabel = getDataLabel;
if (_local4 != undefined) {
_local2._x = _local4;
}
if (forceSizing) {
size();
}
}
function getCellIndex(Void) {
return({columnIndex:0, itemIndex:owner.rowIndex + listOwner.__vPosition});
}
function getDataLabel() {
return(listOwner.labelField);
}
function init(Void) {
super.init();
tabEnabled = false;
}
function createChildren(Void) {
setCellRenderer(false);
setupBG();
setState(state, false);
}
function drawRow(itmObj, state, transition) {
item = itmObj;
setState(state, transition);
setValue(itmObj, state, transition);
}
function itemToString(itmObj) {
if (itmObj == undefined) {
return(" ");
}
var _local2 = owner.__labelFunction(itmObj);
if (_local2 == undefined) {
_local2 = ((itmObj instanceof XMLNode) ? (itmObj.attributes[owner.__labelField]) : (itmObj[owner.__labelField]));
if (_local2 == undefined) {
_local2 = " ";
if (typeof(itmObj) == "object") {
for (var _local4 in itmObj) {
if (_local4 != "__ID__") {
_local2 = (itmObj[_local4] + ", ") + _local2;
}
}
_local2 = _local2.substring(0, _local2.length - 2);
} else {
_local2 = itmObj;
}
}
}
return(_local2);
}
function setupBG(Void) {
var _local2 = (backGround = createEmptyMovieClip("bG_mc", LOWEST_DEPTH));
drawRowFill(_local2, normalColor);
highlight = createEmptyMovieClip("tran_mc", LOWEST_DEPTH + 10);
_local2.owner = this;
_local2.grandOwner = owner;
_local2.onPress = bGOnPress;
_local2.onRelease = bGOnRelease;
_local2.onRollOver = bGOnRollOver;
_local2.onRollOut = bGOnRollOut;
_local2.onDragOver = bGOnDragOver;
_local2.onDragOut = bGOnDragOut;
_local2.useHandCursor = false;
_local2.trackAsMenu = true;
_local2.drawRect = drawRect;
highlight.drawRect = drawRect;
}
function drawRowFill(mc, newClr) {
mc.clear();
mc.beginFill(newClr);
mc.drawRect(1, 0, __width, __height);
mc.endFill();
mc._width = __width;
mc._height = __height;
}
function setState(newState, transition) {
var _local2 = highlight;
var _local8 = backGround;
var _local4 = __height;
var _local3 = owner;
if (!_local3.enabled) {
if ((newState == "selected") || (state == "selected")) {
highlightColor = _local3.getStyle("selectionDisabledColor");
drawRowFill(_local2, highlightColor);
_local2._visible = true;
_local2._y = 0;
_local2._height = _local4;
} else {
_local2._visible = false;
normalColor = _local3.getStyle("backgroundDisabledColor");
drawRowFill(_local8, normalColor);
}
cell.__enabled = false;
cell.setColor(_local3.getStyle("disabledColor"));
} else {
cell.__enabled = true;
if (transition && ((newState == state) || ((newState == "highlighted") && (state == "selected")))) {
isChangedToSelected = true;
return(undefined);
}
var _local6 = _local3.getStyle("selectionDuration");
var _local7 = 0;
if (isChangedToSelected && (newState == "selected")) {
transition = false;
}
var _local10 = transition && (_local6 != 0);
if (newState == "normal") {
_local7 = _local3.getStyle("color");
normalColor = getNormalColor();
drawRowFill(_local8, normalColor);
if (_local10) {
_local6 = _local6 / 2;
_local2._height = _local4;
_local2._width = __width;
_local2._y = 0;
bGTween = new mx.effects.Tween(this, _local4 + 2, _local4 * 0.2, _local6, 5);
} else {
_local2._visible = false;
}
delete isChangedToSelected;
} else {
highlightColor = _local3.getStyle(((newState == "highlighted") ? "rollOverColor" : "selectionColor"));
drawRowFill(_local2, highlightColor);
_local2._visible = true;
_local7 = _local3.getStyle(((newState == "highlighted") ? "textRollOverColor" : "textSelectedColor"));
if (_local10) {
_local2._height = _local4 * 0.5;
_local2._y = (_local4 - _local2._height) / 2;
bGTween = new mx.effects.Tween(this, _local2._height, _local4 + 2, _local6, 5);
var _local9 = _local3.getStyle("selectionEasing");
if (_local9 != undefined) {
bGTween.easingEquation = _local9;
}
} else {
_local2._y = 0;
_local2._height = _local4;
}
}
cell.setColor(_local7);
}
state = newState;
}
function onTweenUpdate(val) {
highlight._height = val;
highlight._y = (__height - val) / 2;
}
function onTweenEnd(val) {
onTweenUpdate(val);
highlight._visible = state != "normal";
}
function getNormalColor(Void) {
var _local3;
var _local2 = owner;
if (!owner.enabled) {
_local3 = _local2.getStyle("backgroundDisabledColor");
} else {
var _local5 = rowIndex + _local2.__vPosition;
if (rowIndex == undefined) {
_local3 = _local2.getPropertiesOf(item).backgroundColor;
} else {
_local3 = _local2.getPropertiesAt(_local5).backgroundColor;
}
if (_local3 == undefined) {
var _local4 = _local2.getStyle("alternatingRowColors");
if (_local4 == undefined) {
_local3 = _local2.getStyle("backgroundColor");
} else {
_local3 = _local4[_local5 % _local4.length];
}
}
}
return(_local3);
}
function invalidateStyle(propName) {
cell.invalidateStyle(propName);
super.invalidateStyle(propName);
}
function bGOnPress(Void) {
grandOwner.pressFocus();
grandOwner.onRowPress(owner.rowIndex);
}
function bGOnRelease(Void) {
grandOwner.releaseFocus();
grandOwner.onRowRelease(owner.rowIndex);
}
function bGOnRollOver(Void) {
grandOwner.onRowRollOver(owner.rowIndex);
}
function bGOnRollOut(Void) {
grandOwner.onRowRollOut(owner.rowIndex);
}
function bGOnDragOver(Void) {
grandOwner.onRowDragOver(owner.rowIndex);
}
function bGOnDragOut(Void) {
grandOwner.onRowDragOut(owner.rowIndex);
}
static var LOWEST_DEPTH = -16384;
var state = "normal";
var disabledColor = 15263976;
var normalColor = 16777215;
}
Symbol 584 MovieClip [__Packages.mx.controls.NumericStepper] Frame 0
class mx.controls.NumericStepper extends mx.core.UIComponent
{
var boundingBox_mc, _visible, tabEnabled, tabChildren, nextButton_mc, __width, prevButton_mc, __height, inputField, StepTrack_mc, focusTextField, createObject, enabled, __set__visible, setSize, createClassObject, __maxChars, dispatchEvent;
function NumericStepper () {
super();
}
function init() {
super.init();
boundingBox_mc._visible = false;
boundingBox_mc._width = (boundingBox_mc._height = 0);
_visible = false;
tabEnabled = false;
tabChildren = true;
}
function setVisible(x, noEvent) {
super.setVisible(x, noEvent);
if (initializing) {
__visible = x;
}
}
function layoutControl() {
nextButton_mc._x = __width - nextButton_mc.__width;
nextButton_mc._y = 0;
prevButton_mc._x = __width - prevButton_mc.__width;
prevButton_mc._y = __height - prevButton_mc.__height;
inputField.setSize(__width - nextButton_mc.__width, __height);
StepTrack_mc._width = Math.max(nextButton_mc.__width, prevButton_mc.__width);
StepTrack_mc._x = __width - StepTrack_mc._width;
StepTrack_mc._height = __height - (nextButton_mc._height + prevButton_mc._height);
StepTrack_mc._y = nextButton_mc.__height;
}
function createChildren() {
super.createChildren();
addAsset("nextButton_mc", skinIDUpArrow);
addAsset("prevButton_mc", skinIDDownArrow);
addAsset("inputField", skinIDInput);
focusTextField = inputField.label;
createObject("StepTrack", "StepTrack_mc", 2);
size();
}
function draw() {
prevButton_mc.enabled = enabled;
nextButton_mc.enabled = enabled;
inputField.enabled = enabled;
size();
initializing = false;
__set__visible(__visible);
}
function size() {
var _local2 = calcMinHeight();
var _local3 = calcMinWidth();
if (__height < _local2) {
setSize(__width, _local2);
}
if (__width < _local3) {
setSize(_local3, __height);
}
layoutControl();
}
function calcMinHeight() {
return(22);
}
function calcMinWidth() {
return(40);
}
function addAsset(id, skinID) {
var _local2 = new Object();
_local2.styleName = this;
if (skinID == 10) {
_local2.falseUpSkin = upArrowUp;
_local2.falseOverSkin = upArrowOver;
_local2.falseDownSkin = upArrowDown;
_local2.falseDisabledSkin = upArrowDisabled;
createClassObject(mx.controls.SimpleButton, id, skinID, _local2);
var _local5 = nextButton_mc;
_local5.tabEnabled = false;
_local5.styleName = this;
_local5._x = __width - _local5.__width;
_local5._y = 0;
_local5.owner = this;
_local5.autoRepeat = true;
_local5.clickHandler = function () {
Selection.setSelection(0, 0);
};
_local5.buttonDownHandler = function () {
this.owner.buttonPress(this);
};
} else if (skinID == 11) {
_local2.falseUpSkin = downArrowUp;
_local2.falseOverSkin = downArrowOver;
_local2.falseDownSkin = downArrowDown;
_local2.falseDisabledSkin = downArrowDisabled;
createClassObject(mx.controls.SimpleButton, id, skinID, _local2);
var _local3 = prevButton_mc;
_local3.tabEnabled = false;
_local3.styleName = this;
_local3._x = __width - _local3.__width;
_local3._y = __height - _local3.__height;
_local3.owner = this;
_local3.autoRepeat = true;
_local3.clickHandler = function () {
Selection.setSelection(0, 0);
};
_local3.buttonDownHandler = function () {
this.owner.buttonPress(this);
};
} else if (skinID == 9) {
createClassObject(mx.controls.TextInput, id, skinID);
var _local4 = inputField;
_local4.styleName = this;
_local4.setSize(__width - nextButton_mc.__width, __height);
_local4.restrict = "0-9\\-\\.\\,";
_local4.maxChars = __maxChars;
_local4.text = value;
_local4.onSetFocus = function () {
this._parent.onSetFocus();
};
_local4.onKillFocus = function () {
this._parent.onKillFocus();
};
_local4.drawFocus = function (b) {
this._parent.drawFocus(b);
};
_local4.onKeyDown = function () {
this._parent.onFieldKeyDown();
};
}
}
function setFocus() {
Selection.setFocus(inputField);
}
function onKillFocus() {
mx.managers.SystemManager.form.focusManager.defaultPushButtonEnabled = true;
super.onKillFocus();
Key.removeListener(inputField);
if (Number(inputField.text) != value) {
var _local3 = checkValidValue(Number(inputField.text));
inputField.text = _local3;
value = (_local3);
}
}
function onSetFocus() {
super.onSetFocus();
Key.addListener(inputField);
mx.managers.SystemManager.form.focusManager.defaultPushButtonEnabled = false;
}
function onFieldKeyDown() {
var _local2 = value;
switch (Key.getCode()) {
case 40 :
var _local3 = value - stepSize;
value = (_local3);
if (_local2 != value) {
dispatchEvent({type:"change"});
}
break;
case 38 :
_local3 = stepSize + value;
value = (_local3);
if (_local2 != value) {
dispatchEvent({type:"change"});
}
break;
case 36 :
inputField.text = minimum;
value = (minimum);
break;
case 35 :
inputField.text = maximum;
value = (maximum);
break;
case 13 :
value = (Number(inputField.text));
if (_local2 == value) {
break;
}
dispatchEvent({type:"change"});
}
}
function get nextValue() {
if (checkRange(value + stepSize)) {
__nextValue = value + stepSize;
return(__nextValue);
}
}
function get previousValue() {
if (checkRange(__value - stepSize)) {
__previousValue = value - stepSize;
return(__previousValue);
}
}
function set maxChars(num) {
__maxChars = num;
inputField.maxChars = __maxChars;
//return(maxChars);
}
function get maxChars() {
return(__maxChars);
}
function get value() {
return(__value);
}
function set value(v) {
var _local2 = checkValidValue(v);
if (_local2 == __value) {
return;
}
inputField.text = (__value = _local2);
//return(value);
}
function get minimum() {
return(__minimum);
}
function set minimum(v) {
__minimum = v;
//return(minimum);
}
function get maximum() {
return(__maximum);
}
function set maximum(v) {
__maximum = v;
//return(maximum);
}
function get stepSize() {
return(__stepSize);
}
function set stepSize(v) {
__stepSize = v;
//return(stepSize);
}
function onFocus() {
}
function buttonPress(button) {
var _local2 = value;
if (button._name == "nextButton_mc") {
value = value + stepSize;
} else {
value = value - stepSize;
}
if (_local2 != value) {
dispatchEvent({type:"change"});
Selection.setSelection(0, 0);
}
}
function checkRange(v) {
return((v >= minimum) and (v <= maximum));
}
function checkValidValue(val) {
var _local7 = val / stepSize;
var _local9 = Math.floor(_local7);
var _local2 = stepSize;
var _local6 = minimum;
var _local5 = maximum;
if ((val > _local6) and (val < _local5)) {
if ((_local7 - _local9) == 0) {
return(val);
}
var _local8 = Math.floor(val / _local2);
var _local4 = _local8 * _local2;
if (((((val - _local4) >= (_local2 / 2)) && (_local5 >= (_local4 + _local2))) && (_local6 <= (_local4 - _local2))) || (((val + _local2) == _local5) && (((_local5 - _local4) - _local2) > 1E-14))) {
_local4 = _local4 + _local2;
}
return(_local4);
}
if (val >= _local5) {
return(_local5);
}
return(_local6);
}
function onLabelChanged(o) {
var _local2 = checkValidValue(Number(o.__get__text()));
o.__set__text(_local2);
value = (_local2);
}
function get tabIndex() {
return(inputField.tabIndex);
}
function set tabIndex(w) {
inputField.tabIndex = w;
//return(tabIndex);
}
static var symbolName = "NumericStepper";
static var symbolOwner = mx.controls.NumericStepper;
static var version = "2.0.1.78";
var className = "NumericStepper";
var upArrowUp = "StepUpArrowUp";
var upArrowDown = "StepUpArrowDown";
var upArrowOver = "StepUpArrowOver";
var upArrowDisabled = "StepUpArrowDisabled";
var downArrowUp = "StepDownArrowUp";
var downArrowDown = "StepDownArrowDown";
var downArrowOver = "StepDownArrowOver";
var downArrowDisabled = "StepDownArrowDisabled";
var skinIDUpArrow = 10;
var skinIDDownArrow = 11;
var skinIDInput = 9;
var initializing = true;
var __visible = true;
var __minimum = 0;
var __maximum = 10;
var __stepSize = 1;
var __value = 0;
var __nextValue = 0;
var __previousValue = 0;
var clipParameters = {minimum:1, maximum:1, stepSize:1, value:1, maxChars:1};
static var mergedClipParameters = mx.core.UIObject.mergeClipParameters(mx.controls.NumericStepper.prototype.clipParameters, mx.core.UIComponent.prototype.clipParameters);
}
Symbol 605 MovieClip [__Packages.mx.controls.TextInput] Frame 0
class mx.controls.TextInput extends mx.core.UIComponent
{
var owner, enterListener, label, tabChildren, tabEnabled, focusTextField, _color, _parent, border_mc, createClassObject, dispatchValueChangedEvent, __get__width, __get__height, tfx, tfy, tfw, tfh, getStyle, bind, updateModel, _getTextFormat, enabled;
function TextInput () {
super();
}
function addEventListener(event, handler) {
if (event == "enter") {
addEnterEvents();
}
super.addEventListener(event, handler);
}
function enterOnKeyDown() {
if (Key.getAscii() == 13) {
owner.dispatchEvent({type:"enter"});
}
}
function addEnterEvents() {
if (enterListener == undefined) {
enterListener = new Object();
enterListener.owner = this;
enterListener.onKeyDown = enterOnKeyDown;
}
}
function init(Void) {
super.init();
label.styleName = this;
tabChildren = true;
tabEnabled = false;
focusTextField = label;
_color = mx.core.UIObject.textColorList;
label.onSetFocus = function () {
this._parent.onSetFocus();
};
label.onKillFocus = function (n) {
this._parent.onKillFocus(n);
};
label.drawFocus = function (b) {
this._parent.drawFocus(b);
};
label.onChanged = onLabelChanged;
}
function setFocus() {
Selection.setFocus(label);
}
function onLabelChanged(Void) {
_parent.dispatchEvent({type:"change"});
_parent.dispatchValueChangedEvent(text);
}
function createChildren(Void) {
super.createChildren();
if (border_mc == undefined) {
createClassObject(_global.styles.rectBorderClass, "border_mc", 0, {styleName:this});
}
border_mc.swapDepths(label);
label.autoSize = "none";
}
function get html() {
return(getHtml());
}
function set html(value) {
setHtml(value);
//return(html);
}
function getHtml() {
return(label.html);
}
function setHtml(value) {
if (value != label.html) {
label.html = value;
}
}
function get text() {
return(getText());
}
function set text(t) {
setText(t);
//return(text);
}
function getText() {
if (initializing) {
return(initText);
}
if (label.html == true) {
return(label.htmlText);
}
return(label.text);
}
function setText(t) {
if (initializing) {
initText = t;
} else {
var _local2 = label;
if (_local2.html == true) {
_local2.htmlText = t;
} else {
_local2.text = t;
}
}
dispatchValueChangedEvent(t);
}
function size(Void) {
border_mc.setSize(__get__width(), __get__height());
var _local2 = border_mc.__get__borderMetrics();
var _local6 = _local2.left + _local2.right;
var _local3 = _local2.top + _local2.bottom;
var _local5 = _local2.left;
var _local4 = _local2.top;
tfx = _local5;
tfy = _local4;
tfw = __get__width() - _local6;
tfh = __get__height() - _local3;
label.move(tfx, tfy);
label.setSize(tfw, tfh + 1);
}
function setEnabled(enable) {
label.type = (((__editable == true) || (enable == false)) ? "input" : "dynamic");
label.selectable = enable;
var _local2 = getStyle((enable ? "color" : "disabledColor"));
if (_local2 == undefined) {
_local2 = (enable ? 0 : 8947848);
}
setColor(_local2);
}
function setColor(col) {
label.textColor = col;
}
function onKillFocus(newFocus) {
if (enterListener != undefined) {
Key.removeListener(enterListener);
}
if (bind != undefined) {
updateModel(text);
}
super.onKillFocus(newFocus);
}
function onSetFocus(oldFocus) {
var f = Selection.getFocus();
var o = eval (f);
if (o != label) {
Selection.setFocus(label);
return(undefined);
}
if (enterListener != undefined) {
Key.addListener(enterListener);
}
super.onSetFocus(oldFocus);
}
function draw(Void) {
var _local2 = label;
var _local4 = getText();
if (initializing) {
initializing = false;
delete initText;
}
var _local3 = _getTextFormat();
_local2.embedFonts = _local3.embedFonts == true;
if (_local3 != undefined) {
_local2.setTextFormat(_local3);
_local2.setNewTextFormat(_local3);
}
_local2.multiline = false;
_local2.wordWrap = false;
if (_local2.html == true) {
_local2.setTextFormat(_local3);
_local2.htmlText = _local4;
} else {
_local2.text = _local4;
}
_local2.type = (((__editable == true) || (enabled == false)) ? "input" : "dynamic");
size();
}
function setEditable(s) {
__editable = s;
label.type = (s ? "input" : "dynamic");
}
function get maxChars() {
return(label.maxChars);
}
function set maxChars(w) {
label.maxChars = w;
//return(maxChars);
}
function get length() {
return(label.length);
}
function get restrict() {
return(label.restrict);
}
function set restrict(w) {
label.restrict = ((w == "") ? null : (w));
//return(restrict);
}
function get hPosition() {
return(label.hscroll);
}
function set hPosition(w) {
label.hscroll = w;
//return(hPosition);
}
function get maxHPosition() {
return(label.maxhscroll);
}
function get editable() {
return(__editable);
}
function set editable(w) {
setEditable(w);
//return(editable);
}
function get password() {
return(label.password);
}
function set password(w) {
label.password = w;
//return(password);
}
function get tabIndex() {
return(label.tabIndex);
}
function set tabIndex(w) {
label.tabIndex = w;
//return(tabIndex);
}
function set _accProps(val) {
label._accProps = val;
//return(_accProps);
}
function get _accProps() {
return(label._accProps);
}
static var symbolName = "TextInput";
static var symbolOwner = mx.controls.TextInput;
static var version = "2.0.1.78";
var className = "TextInput";
var initializing = true;
var clipParameters = {text:1, editable:1, password:1, maxChars:1, restrict:1};
static var mergedClipParameters = mx.core.UIObject.mergeClipParameters(mx.controls.TextInput.prototype.clipParameters, mx.core.UIComponent.prototype.clipParameters);
var _maxWidth = mx.core.UIComponent.kStretch;
var __editable = true;
var initText = "";
}
Symbol 624 MovieClip [__Packages.mx.controls.DataGrid] Frame 0
class mx.controls.DataGrid extends mx.controls.List
{
var invInitHeaders, columns, __rowCount, invDrawCols, invalidate, getViewMetrics, setSize, __width, __rowHeight, invCheckCols, enabled, cellEditor, __dataProvider, __vPosition, rows, getStateAt, __hScrollPolicy, __maxHPosition, roundUp, getRowCount, setScrollProperties, oldVWidth, invLayoutContent, border_mc, __height, setMaxHPosition, setHPosition, getMaxHPosition, getHPosition, oldWidth, displayWidth, numberOfCols, invRowHeight, invSpaceColsEqually, invColChange, updateControl, totalWidth, lines_mc, listContent, __get__height, getStyle, headerCells, header_mc, dispatchEvent, __viewMetrics, sortArrow, sortIndex, layoutX, sortDirection, owner, column, _alpha, cell, asc, col, oldX, onRollOut, __focusedCell, __hPosition, editorMask, editTween, getFocusManager, __tabHandlerCache, vScroller, hScroller, dontEdit, listOwner, activeGrid, getLength, releaseFocus;
function DataGrid () {
super();
}
function init() {
super.init();
invInitHeaders = true;
columns = new Array();
}
function layoutContent(x, y, tW, tH, dW, dH) {
var _local3 = __rowCount;
if (__showHeaders) {
y = y + __headerHeight;
dH = dH - __headerHeight;
}
super.layoutContent(x, y, tW, tH, dW, dH);
if (tW != totColW) {
drawHeaderBG();
}
if (__rowCount > _local3) {
invDrawCols = true;
invalidate();
}
}
function setRowCount(rC) {
if (isNaN(rC)) {
return(undefined);
}
var _local2 = getViewMetrics();
setSize(__width, (((__rowHeight * rC) + _local2.top) + _local2.bottom) + (__headerHeight * __showHeaders));
}
function setRowHeight(rH) {
__rowHeight = rH;
if (hasDrawn) {
super.setRowHeight(rH);
}
}
function setHScrollPolicy(policy) {
super.setHScrollPolicy(policy);
invCheckCols = true;
invalidate();
}
function setEnabled(v) {
if (v == enabled) {
return(undefined);
}
super.setEnabled(v);
if (__showHeaders) {
enableHeader(v);
}
if ((cellEditor._visible = true)) {
disposeEditor();
}
invDrawCols = true;
invalidate();
}
function modelChanged(eventObj) {
if (eventObj.eventName == "updateField") {
var _local3 = eventObj.firstItem;
var _local5 = __dataProvider.getItemAt(_local3);
rows[_local3 - __vPosition].drawRow(_local5, getStateAt(_local3));
return(undefined);
}
if (eventObj.eventName == "schemaLoaded") {
removeAllColumns();
}
if (columns.length == 0) {
generateCols();
}
super.modelChanged(eventObj);
}
function configureScrolling(Void) {
var _local3 = getViewMetrics();
var _local4 = ((__hScrollPolicy != "off") ? (((__maxHPosition + __width) - _local3.left) - _local3.right) : ((__width - _local3.left) - _local3.right));
var _local2 = __dataProvider.length;
if (_local2 == undefined) {
_local2 = 0;
}
if (__vPosition > Math.max(0, (_local2 - getRowCount()) + roundUp)) {
setVPosition(Math.max(0, Math.min((_local2 - getRowCount()) + roundUp, __vPosition)));
}
setScrollProperties(_local4, 1, _local2, __rowHeight, __headerHeight * __showHeaders);
if (oldVWidth != _local4) {
invLayoutContent = true;
}
oldVWidth = _local4;
}
function setVPosition(pos) {
if (cellEditor != undefined) {
disposeEditor();
}
super.setVPosition(pos);
}
function size(Void) {
if (hasDrawn != true) {
border_mc.setSize(__width, __height);
return(undefined);
}
if (cellEditor != undefined) {
disposeEditor();
}
if (__hScrollPolicy != "off") {
var _local5 = 0;
var _local6 = columns.length;
var _local3 = 0;
while (_local3 < _local6) {
_local5 = _local5 + columns[_local3].__width;
_local3++;
}
var _local8 = getViewMetrics();
var _local9 = (__width - _local8.left) - _local8.right;
setMaxHPosition(Math.max(_local5 - _local9, 0));
var _local7 = _local9 - _local5;
if (_local7 > 0) {
columns[_local6 - 1].__width = columns[_local6 - 1].__width + _local7;
}
setHPosition(Math.min(getMaxHPosition(), getHPosition()));
}
super.size();
if (__hScrollPolicy == "off") {
var _local10 = new Array();
var _local6 = columns.length;
if (oldWidth == undefined) {
oldWidth = displayWidth;
}
var _local4 = 0;
var _local3 = 0;
while (_local3 < _local6) {
_local4 = _local4 + ((columns[_local3].__width = (displayWidth * columns[_local3].__width) / oldWidth));
_local3++;
}
if (_local4 != displayWidth) {
columns[columns.length - 1].__width = columns[columns.length - 1].__width + (displayWidth - _local4);
}
totColW = (numberOfCols = displayWidth);
}
oldWidth = displayWidth;
drawColumns();
drawHeaderBG();
invalidate();
}
function draw() {
if (invRowHeight) {
super.draw();
invInitHeaders = true;
invDrawCols = true;
delete cellEditor;
}
if (invInitHeaders) {
initHeaders();
invLayoutContent = true;
}
super.draw();
if (invSpaceColsEqually) {
delete invSpaceColsEqually;
spaceColumnsEqually();
}
if (invColChange) {
delete invColChange;
if (hasDrawn) {
initHeaders();
initRows();
invDrawCols = true;
updateControl();
invCheckCols = true;
}
}
if (invCheckCols) {
if (totColW != displayWidth) {
resizeColumn(columns.length - 1, columns[columns.length - 1].__width);
}
delete invCheckCols;
}
if (invDrawCols) {
drawColumns();
}
hasDrawn = true;
}
function editField(index, colName, data) {
__dataProvider.editField(index, colName, data);
}
function get columnNames() {
return(getColumnNames());
}
function set columnNames(w) {
setColumnNames(w);
//return(columnNames);
}
function setColumnNames(tmpArray) {
var _local2 = 0;
while (_local2 < tmpArray.length) {
addColumn(tmpArray[_local2]);
_local2++;
}
}
function getColumnNames(Void) {
var _local3 = new Array();
var _local2 = 0;
while (_local2 < columns.length) {
_local3[_local2] = columns[_local2].columnName;
_local2++;
}
return(_local3);
}
function addColumnAt(index, newCol) {
if (index < columns.length) {
columns.splice(index, 0, "tmp");
}
var _local4 = newCol;
if (!(_local4 instanceof mx.controls.gridclasses.DataGridColumn)) {
_local4 = new mx.controls.gridclasses.DataGridColumn(_local4);
}
columns[index] = _local4;
_local4.colNum = index;
var _local2 = index + 1;
while (_local2 < columns.length) {
columns[_local2].colNum++;
_local2++;
}
_local4.parentGrid = this;
totColW = totColW + _local4.width;
invColChange = true;
invalidate();
return(newCol);
}
function addColumn(newCol) {
return(addColumnAt(columns.length, newCol));
}
function removeColumnAt(index) {
var _local4 = columns[index];
columns.splice(index, 1);
totColW = totColW - _local4.width;
var _local2 = index;
while (_local2 < columns.length) {
columns[_local2].colNum--;
_local2++;
}
invColChange = true;
invalidate();
return(_local4);
}
function removeAllColumns(Void) {
totColW = 0;
columns = new Array();
invColChange = true;
invalidate();
}
function getColumnAt(index) {
return(columns[index]);
}
function getColumnIndex(name) {
var _local2 = 0;
while (_local2 < columns.length) {
if (columns[_local2].columnName == name) {
return(_local2);
}
_local2++;
}
}
function get columnCount() {
return(columns.length);
}
function spaceColumnsEqually(Void) {
if (displayWidth == undefined) {
var _local4 = getViewMetrics();
displayWidth = (__width - _local4.left) - _local4.right;
}
var _local3 = Math.ceil(totalWidth / columns.length);
var _local2 = 0;
while (_local2 < columns.length) {
columns[_local2].__width = _local3;
_local2++;
}
totColW = totalWidth;
invDrawCols = true;
invalidate();
}
function generateCols(Void) {
if (columns.length == 0) {
var _local3 = __dataProvider.getColumnNames();
if (_local3 == undefined) {
var _local4 = __dataProvider.getItemAt(0);
for (var _local2 in _local4) {
if (_local2 != "__ID__") {
addColumn(_local2);
}
}
} else {
var _local2 = 0;
while (_local2 < _local3.length) {
addColumn(_local3[_local2]);
_local2++;
}
}
invSpaceColsEqually = true;
invColChange = true;
invCheckCols = true;
invalidate();
}
}
function resizeColumn(col, w) {
if ((__hScrollPolicy == "on") || (__hScrollPolicy == "auto")) {
columns[col].__width = w;
var _local11 = 0;
var _local5 = columns.length;
var _local2 = 0;
while (_local2 < _local5) {
_local11 = _local11 + columns[_local2].__width;
_local2++;
}
setMaxHPosition(Math.max(_local11 - displayWidth, 0));
var _local12 = displayWidth - _local11;
if (_local12 > 0) {
columns[_local5 - 1].__width = columns[_local5 - 1].__width + _local12;
}
setHPosition(Math.min(getMaxHPosition(), getHPosition()));
invDrawCols = true;
invalidate();
return(undefined);
}
var _local10 = 0;
var _local2 = 0;
while (_local2 < col) {
_local10 = _local10 + columns[_local2].__width;
_local2++;
}
var _local8 = ((displayWidth + 2) - _local10) - columns[col].__width;
var _local6 = ((displayWidth + 2) - _local10) - w;
columns[col].__width = w;
var _local5 = columns.length;
_local2 = col + 1;
while (_local2 < _local5) {
if (!columns[_local2].resizable) {
_local6 = _local6 - columns[_local2].__width;
_local8 = _local8 - columns[_local2].__width;
}
_local2++;
}
var _local9 = 0;
_local2 = col + 1;
while (_local2 < _local5) {
if (columns[_local2].resizable) {
columns[_local2].__width = (columns[_local2].width * _local6) / _local8;
_local9 = _local9 + columns[_local2].__width;
}
_local2++;
}
var _local3 = 0;
var _local7 = false;
_local2 = _local5 - 1;
while (_local2 >= 0) {
if (columns[_local2].resizable) {
if (!_local7) {
columns[_local2].__width = columns[_local2].__width + (_local6 - _local9);
_local7 = true;
}
if (_local3 > 0) {
columns[_local2].__width = columns[_local2].__width - _local3;
_local3 = 0;
}
if (columns[_local2].__width < minColWidth) {
_local3 = _local3 + (minColWidth - columns[_local2].__width);
columns[_local2].__width = minColWidth;
}
}
_local2--;
}
invDrawCols = true;
invalidate();
}
function drawColumns(Void) {
delete invDrawCols;
var _local4 = (lines_mc = listContent.createEmptyMovieClip("lines_mc", LINEDEPTH));
var _local9 = 0.75;
var _local5 = 1;
var _local15 = __get__height() - 1;
var _local12 = getStyle("vGridLineColor");
var _local14 = columns.length;
placeSortArrow();
var _local7 = 0;
while (_local7 < _local14) {
var _local6 = columns[_local7];
var _local13 = (enabled ? "backgroundColor" : "backgroundDisabledColor");
var _local11 = _local6.getStyle(_local13);
_local9 = _local9 + _local6.__width;
_local4.moveTo(_local5, 1);
_local4.lineStyle(0, _local12, 0);
var _local10 = Math.floor(_local9);
_local4.lineTo(_local10, 1);
if ((_local7 < (columns.length - 1)) && (getStyle("vGridLines"))) {
_local4.lineStyle(0, _local12, 100);
}
_local4.lineTo(_local10, __get__height());
_local4.lineStyle(0, _local12, 0);
_local4.lineTo(_local5, __get__height());
_local4.lineTo(_local5, 1);
if (__showHeaders) {
var _local3 = headerCells[_local7];
_local3._x = _local5 + 2;
_local3.hO._x = _local5;
_local3.setSize(_local6.__width - 5, Math.min(__headerHeight, _local3.getPreferredHeight()));
_local3.hO._width = _local6.__width - 2;
_local3.hO._height = __headerHeight;
_local3._y = (__headerHeight - _local3._height) / 2;
header_mc["sep" + _local7]._x = _local9 - 2;
listContent.disableHeader._width = totalWidth;
}
var _local2 = 0;
while (_local2 < __rowCount) {
if (_local7 == 0) {
rows[_local2].colBG.clear();
}
var _local8 = _local6.__width;
rows[_local2].drawCell(_local7, _local5, _local8, _local11);
_local2++;
}
_local5 = _local9;
_local7++;
}
if (getStyle("hGridLines")) {
lines_mc.lineStyle(0, getStyle("hGridLineColor"));
_local7 = 1;
while (_local7 < __rowCount) {
lines_mc.moveTo(4, rows[_local7]._y);
lines_mc.lineTo(totalWidth, rows[_local7]._y);
_local7++;
}
}
}
function initRows(Void) {
var _local2 = 0;
while (_local2 < __rowCount) {
rows[_local2].createCells();
_local2++;
}
}
function onRowPress(rowIndex) {
super.onRowPress(rowIndex);
if (!enabled) {
return(undefined);
}
var _local11 = columns.length;
var _local6 = rows[rowIndex];
var _local3 = 0;
while (_local3 < _local11) {
var _local5 = columns[_local3];
var _local4 = _local6._xmouse - _local6.cells[_local3]._x;
if ((_local4 >= 0) && (_local4 < _local5.__width)) {
dispatchEvent({type:"cellPress", columnIndex:_local3, view:this, itemIndex:rowIndex + __vPosition});
return(undefined);
}
_local3++;
}
}
function get showHeaders() {
return(getShowHeaders());
}
function set showHeaders(w) {
setShowHeaders(w);
//return(showHeaders);
}
function setShowHeaders(b) {
__showHeaders = b;
invInitHeaders = true;
invDrawCols = true;
invalidate();
}
function getShowHeaders() {
return(__showHeaders);
}
function get headerHeight() {
return(getHeaderHeight());
}
function set headerHeight(w) {
setHeaderHeight(w);
//return(headerHeight);
}
function setHeaderHeight(h) {
__headerHeight = h;
invInitHeaders = true;
invDrawCols = true;
invalidate();
}
function getHeaderHeight(Void) {
return(__headerHeight);
}
function initHeaders(Void) {
delete invInitHeaders;
if (__showHeaders) {
header_mc = listContent.createClassObject(mx.core.UIObject, "header_mc", HEADERDEPTH, {styleName:this});
headerCells = new Array();
var _local2 = 0;
while (_local2 < columns.length) {
var _local6 = columns[_local2];
var _local4;
var _local7 = _local6.__headerRenderer;
if (_local7 == undefined) {
_local4 = (headerCells[_local2] = header_mc.createLabel("fHeaderCell" + _local2, HEADERCELLDEPTH + _local2));
_local4.selectable = false;
_local4.setStyle("styleName", _local6);
} else if (typeof(_local7) == "string") {
_local4 = (headerCells[_local2] = header_mc.createObject(_local7, "fHeaderCell" + _local2, HEADERCELLDEPTH + _local2, {styleName:_local6}));
} else {
_local4 = (headerCells[_local2] = header_mc.createClassObject(_local7, "fHeaderCell" + _local2, HEADERCELLDEPTH + _local2, {styleName:_local6}));
}
_local4.setValue(_local6.__get__headerText());
_local6.headerCell = _local4;
var _local3 = header_mc.attachMovie("DataHeaderOverlay", "hO" + _local2, HEADEROVERLAYDEPTH + _local2);
_local4.hO = _local3;
_local3.cell = _local4;
_local4.column = (_local3.column = _local6);
_local4.asc = (_local3.asc = false);
_local4.owner = (_local3.owner = this);
_local3._alpha = 0;
if (_local3.column.sortable && (_local3.onPress == undefined)) {
_local3.useHandCursor = false;
_local3.onRollOver = headerRollOver;
_local3.onRollOut = headerRollOut;
_local3.onPress = headerPress;
_local3.onRelease = headerRelease;
_local3.onReleaseOutside = headerUp;
_local3.headerUp = headerUp;
}
if (_local2 < (columns.length - 1)) {
var _local5 = header_mc.attachMovie("DataHeaderSeperator", "sep" + _local2, SEPARATORDEPTH + _local2);
_local5._height = __headerHeight;
if (_local6.resizable && (resizableColumns)) {
_local5.useHandCursor = false;
_local5.col = _local2;
_local5.owner = this;
_local5.onRollOver = showStretcher;
_local5.onPress = startSizing;
_local5.onRelease = (_local5.onReleaseOutside = stopSizing);
_local5.onRollOut = hideStretcher;
}
}
_local2++;
}
drawHeaderBG();
} else {
header_mc.removeMovieClip();
}
}
function invalidateHeaderStyle(Void) {
var _local4 = columns.length;
var _local3 = 0;
while (_local3 < _local4) {
var _local2 = headerCells[_local3];
if (_local2.stylecache != undefined) {
delete _local2.stylecache.tf;
}
delete _local2.enabledColor;
_local2.invalidateStyle();
_local2.draw();
_local3++;
}
}
function drawHeaderBG(Void) {
var _local2 = header_mc;
_local2.clear();
var _local5 = getStyle("headerColor");
var _local3 = __viewMetrics;
var _local4 = Math.max(totalWidth, displayWidth + 3);
_local2.moveTo(_local3.left, _local3.top);
var _local7 = {matrixType:"box", x:0, y:0, w:_local4, h:__headerHeight + 1, r:(Math.PI/2)};
var _local8 = [_local5, _local5, 16777215];
var _local9 = [0, 60, 255];
var _local6 = [100, 100, 100];
_local2.beginGradientFill("linear", _local8, _local6, _local9, _local7);
_local2.lineStyle(0, 0, 0);
_local2.lineTo(_local4, _local3.top);
_local2.lineTo(_local4, __headerHeight + 1);
_local2.lineStyle(0, 0, 100);
_local2.lineTo(_local3.left, __headerHeight + 1);
_local2.lineStyle(0, 0, 0);
_local2.endFill();
}
function enableHeader(v) {
if (v) {
listContent.disableHeader.removeMovieClip();
} else {
var _local2 = listContent.attachMovie("DataHeaderOverlay", "disableHeader", DISABLEDHEADERDEPTH);
_local2._width = totalWidth;
_local2._height = __headerHeight;
var _local3 = new Color(_local2);
_local3.setRGB(getStyle("backgroundDisabledColor"));
_local2._alpha = 60;
}
}
function placeSortArrow(Void) {
sortArrow.removeMovieClip();
if (sortIndex == undefined) {
return(undefined);
}
if ((columns[sortIndex].__width - headerCells[sortIndex].getPreferredWidth()) <= 20) {
return(undefined);
}
sortArrow = header_mc.createObject("DataSortArrow", "sortArrow", SORTARROWDEPTH);
var _local3 = layoutX;
var _local2 = 0;
while (_local2 <= sortIndex) {
_local3 = _local3 + columns[_local2].__width;
_local2++;
}
var _local4 = sortDirection == "ASC";
sortArrow._yscale = (_local4 ? -100 : 100);
sortArrow._x = (_local3 - sortArrow._width) - 8;
sortArrow._y = ((__headerHeight - sortArrow._height) / 2) + (_local4 * sortArrow._height);
}
function headerRollOver(Void) {
var _local2 = owner;
if ((((!_local2.enabled) || (_local2.cellEditor != undefined)) || (!_local2.sortableColumns)) || (!column.sortable)) {
return(undefined);
}
var _local3 = new Color(this);
_local3.setRGB(_local2.getStyle("rollOverColor"));
_alpha = 50;
}
function headerRollOut(Void) {
_alpha = 0;
}
function headerPress(Void) {
var _local2 = owner;
if (((!column.sortable) || (!_local2.sortableColumns)) || (!_local2.enabled)) {
return(undefined);
}
cell._x = cell._x + 1;
cell._y = cell._y + 1;
var _local3 = new Color(this);
_local3.setRGB(_local2.getStyle("selectionColor"));
_alpha = 100;
}
function headerUp(Void) {
if (((!column.sortable) || (!owner.sortableColumns)) || (!owner.enabled)) {
return(undefined);
}
_alpha = 0;
cell._x = cell._x - 1;
cell._y = cell._y - 1;
}
function headerRelease(Void) {
var _local2 = owner;
var _local3 = column;
if (((!_local3.sortable) || (!_local2.sortableColumns)) || (!_local2.enabled)) {
return(undefined);
}
headerUp();
asc = !asc;
var _local4 = (asc ? "ASC" : "DESC");
_local2.sortIndex = _local2.getColumnIndex(_local3.columnName);
_local2.sortDirection = _local4;
_local2.placeSortArrow();
if (_local3.sortOnHeaderRelease) {
_local2.sortItemsBy(_local3.columnName, _local4);
}
_local2.dispatchEvent({type:"headerRelease", view:_local2, columnIndex:_local2.getColumnIndex(_local3.columnName)});
_local2.dontEdit = true;
}
function isStretchable(col) {
var _local2 = true;
if (!resizableColumns) {
_local2 = false;
} else if (!columns[col].resizable) {
_local2 = false;
} else if ((col == (columns.length - 2)) && (!columns[col + 1].resizable)) {
_local2 = false;
}
return(_local2);
}
function showStretcher(Void) {
var _local2 = owner;
if (((!_local2.isStretchable(col)) || (!_local2.enabled)) || (_local2.cellEditor != undefined)) {
return(undefined);
}
Mouse.hide();
if (_local2.stretcher == undefined) {
_local2.attachMovie("cursorStretch", "stretcher", _local2.STRETCHERDEPTH);
}
_local2.stretcher._x = _local2._xmouse;
_local2.stretcher._y = _local2._ymouse;
_local2.stretcher._visible = true;
_local2.onMouseMove = function () {
this.stretcher._x = this._xmouse;
this.stretcher._y = this._ymouse;
updateAfterEvent();
};
}
function startSizing(Void) {
var _local2 = owner;
if ((!_local2.isStretchable(col)) || (!_local2.enabled)) {
return(undefined);
}
_local2.pressFocus();
_local2.attachMovie("DataStretchBar", "stretchBar", 999);
_local2.stretchBar._height = _local2.height;
_local2.stretchBar._x = _local2._xmouse;
oldX = _local2.stretchBar._x;
_local2.colX = oldX - _local2.columns[col].width;
_local2.onMouseMove = function () {
this.stretcher._x = this._xmouse;
this.stretcher._y = this._ymouse;
this.stretchBar._x = Math.max(this._xmouse, this.colX + this.minColWidth);
if (this.__hScrollPolicy == "off") {
this.stretchBar._x = Math.min(this.stretchBar._x, this.displayWidth - this.minColWidth);
}
updateAfterEvent();
};
}
function stopSizing(Void) {
var _local2 = owner;
var _local3 = col;
if ((!_local2.isStretchable(_local3)) || (!_local2.enabled)) {
return(undefined);
}
_local2.stretchBar._visible = false;
onRollOut();
var _local4 = _local2.stretchBar._x - oldX;
_local2.resizeColumn(_local3, _local2.columns[_local3].width + _local4);
_local2.dispatchEvent({type:"columnStretch", columnIndex:_local3});
}
function hideStretcher(Void) {
owner.stretcher._visible = false;
delete owner.onMouseMove;
Mouse.show();
}
function set focusedCell(obj) {
setFocusedCell(obj);
//return(focusedCell);
}
function get focusedCell() {
return(__focusedCell);
}
function setFocusedCell(coord, broadCast) {
if ((!enabled) || (!editable)) {
return(undefined);
}
if ((coord == undefined) && (cellEditor != undefined)) {
disposeEditor();
return(undefined);
}
var _local2 = coord.itemIndex;
var _local5 = coord.columnIndex;
if (_local2 == undefined) {
_local2 = 0;
}
if (_local5 == undefined) {
_local5 = 0;
}
var _local9 = columns[_local5].columnName;
if (__vPosition > _local2) {
setVPosition(_local2);
} else {
var _local11 = (((_local2 - __vPosition) - __rowCount) + roundUp) + 1;
if (_local11 > 0) {
setVPosition(__vPosition + _local11);
}
}
var _local10 = columns[_local5];
var _local8 = rows[_local2 - __vPosition];
var _local3 = _local8.cells[_local5];
if ((_local3._x > (__hPosition + displayWidth)) || (_local3._x < __hPosition)) {
setHPosition(_local3._x);
}
var _local4 = __dataProvider.getEditingData(_local2, _local9);
if (_local4 == undefined) {
_local4 = __dataProvider.getItemAt(_local2)[_local9];
}
if (_local4 == undefined) {
_local4 = " ";
}
if (_local3.isCellEditor != true) {
if (cellEditor == undefined) {
cellEditor = listContent.createClassObject(mx.controls.TextInput, "editor_mc", EDITORDEPTH, {styleName:_local10, listOwner:this});
}
cellEditor.backgroundColor = 16777215 /* 0xFFFFFF */;
cellEditor._visible = true;
cellEditor.setSize(_local10.__width, __rowHeight + 2);
cellEditor._x = _local3._x - 1;
cellEditor.text = _local4;
editorMask = listContent.attachMovie("BoundingBox", "editorMask", 60001, {_alpha:0});
cellEditor.setMask(editorMask);
editorMask._width = cellEditor.width;
editorMask._height = cellEditor.height;
editorMask._y = (cellEditor._y = _local8._y - 1);
editorMask._x = cellEditor._x - editorMask._width;
editTween = new mx.effects.Tween(this, cellEditor._x - editorMask._width, cellEditor._x, 150);
} else {
cellEditor = _local3;
cellEditor.setValue(_local4, __dataProvider.getItemAt(_local2));
}
var _local6 = getFocusManager();
_local6.setFocus(cellEditor);
_local6.defaultPushButtonEnabled = false;
if (_local3.isCellEditor != true) {
cellEditor.hPosition = 0;
cellEditor.redraw();
Selection.setSelection(0, cellEditor.length);
}
__focusedCell = coord;
if (__tabHandlerCache == undefined) {
__tabHandlerCache = _local6.tabHandler;
_local6.tabHandler = tabHandler;
}
_local6.activeGrid = this;
cellEditor.addEventListener("keyDown", editorKeyDown);
if (broadCast) {
dispatchEvent({type:"cellFocusIn", itemIndex:_local2, columnIndex:_local5});
}
}
function onMouseDown(Void) {
if (cellEditor._visible && (!cellEditor.hitTest(_root._xmouse, _root._ymouse))) {
editCell();
}
if ((vScroller.hitTest(_root._xmouse, _root._ymouse) || (hScroller.hitTest(_root._xmouse, _root._ymouse))) || (header_mc.hitTest(_root._xmouse, _root._ymouse))) {
dontEdit = true;
}
}
function editorKeyDown(Void) {
if (Key.isDown(27)) {
listOwner.disposeEditor();
} else if (Key.isDown(13) && (Key.getCode() != 229)) {
listOwner.editCell();
listOwner.findNextEnterCell();
}
}
function tabHandler(Void) {
var _local4 = -1;
var _local3 = -1;
var _local2 = activeGrid;
if (_local2.__focusedCell != undefined) {
_local4 = _local2.__focusedCell.itemIndex;
_local3 = _local2.__focusedCell.columnIndex;
}
_local2.editCell();
_local2.findNextCell(_local4, _local3);
}
function findNextEnterCell(Void) {
var _local3 = (Key.isDown(16) ? -1 : 1);
var _local2 = __focusedCell.itemIndex + _local3;
if ((_local2 < getLength()) && (_local2 >= 0)) {
__focusedCell.itemIndex = _local2;
}
setFocusedCell(__focusedCell, true);
}
function findNextCell(index, colIndex) {
if (index == undefined) {
colIndex = -1;
index = colIndex;
}
var _local5 = false;
var _local4 = (Key.isDown(16) ? -1 : 1);
while (!_local5) {
colIndex = colIndex + _local4;
if ((colIndex >= columns.length) || (colIndex < 0)) {
colIndex = ((colIndex < 0) ? (columns.length) : 0);
index = index + _local4;
if ((index >= getLength()) || (index < 0)) {
if (getFocusManager().activeGrid != undefined) {
disposeEditor();
}
dontEdit = true;
Selection.setFocus(this);
delete dontEdit;
getFocusManager().tabHandler();
return(undefined);
}
}
if (columns[colIndex].editable) {
_local5 = true;
if (__tabHandlerCache != undefined) {
disposeEditor();
}
setFocusedCell({itemIndex:index, columnIndex:colIndex}, true);
}
}
}
function onSetFocus(Void) {
super.onSetFocus();
if (editable && (dontEdit != true)) {
if (__focusedCell == undefined) {
__focusedCell = {itemIndex:0, columnIndex:0};
}
if (columns[__focusedCell.columnIndex].editable == true) {
setFocusedCell(__focusedCell, true);
} else {
findNextCell(__focusedCell.itemIndex, __focusedCell.columnIndex);
}
}
delete dontEdit;
}
function onTweenUpdate(val) {
editorMask._x = val;
}
function onTweenEnd(val) {
editorMask._x = val;
cellEditor.setMask(undefined);
editorMask.removeMovieClip();
}
function disposeEditor(Void) {
cellEditor.removeEventListener("keyDown", editorKeyDown);
dispatchEvent({type:"cellFocusOut", itemIndex:__focusedCell.itemIndex, columnIndex:__focusedCell.columnIndex});
if (cellEditor.isCellEditor != true) {
cellEditor._visible = false;
}
var _local3 = getFocusManager();
if (__tabHandlerCache != undefined) {
_local3.tabHandler = __tabHandlerCache;
delete __tabHandlerCache;
}
_local3.defaultPushButtonEnabled = true;
if ((border_mc.hitTest(_root._xmouse, _root._ymouse) && (!vScroller.hitTest(_root._xmouse, _root._ymouse))) && (!hScroller.hitTest(_root._xmouse, _root._ymouse))) {
dontEdit = true;
releaseFocus();
delete dontEdit;
}
delete cellEditor;
delete _local3.activeGrid;
}
function editCell() {
var _local3 = __focusedCell.itemIndex;
var _local4 = columns[__focusedCell.columnIndex].columnName;
var _local2 = __dataProvider.getEditingData(_local3, _local4);
if (_local2 == undefined) {
_local2 = __dataProvider.getItemAt(_local3)[_local4];
}
var _local5 = (cellEditor.isCellEditor ? (cellEditor.getValue()) : (cellEditor.text));
if (_local2 != _local5) {
editField(_local3, _local4, _local5);
dispatchEvent({type:"cellEdit", itemIndex:_local3, columnIndex:__focusedCell.columnIndex, oldValue:_local2});
}
disposeEditor();
}
function invalidateStyle(propName) {
if ((propName == "headerColor") || (propName == "styleName")) {
drawHeaderBG();
}
if ((((((propName == "hGridLines") || (propName == "hGridLineColor")) || (propName == "vGridLines")) || (propName == "vGridLineColor")) || (propName == "styleName")) || (propName == "backgroundColor")) {
invDrawCols = true;
invalidate();
}
if (mx.styles.StyleManager.TextStyleMap[propName] != undefined) {
super.changeTextStyleInChildren(propName);
}
if ((propName == "styleName") || (propName == "headerStyle")) {
invalidateHeaderStyle();
}
super.invalidateStyle(propName);
}
function notifyStyleChangeInChildren(sheetName, styleProp, newValue) {
if (styleProp == "headerStyle") {
invalidateHeaderStyle();
}
if (sheetName != undefined) {
var _local4 = 0;
while (_local4 < columns.length) {
if (sheetName == columns[_local4].styleName) {
invalidateStyle(styleProp);
var _local3 = 0;
while (_local3 < rows.length) {
rows[_local3].notifyStyleChangeInChildren(sheetName, styleProp, newValue);
_local3++;
}
}
_local4++;
}
}
super.notifyStyleChangeInChildren(sheetName, styleProp, newValue);
}
static var symbolOwner = mx.controls.DataGrid;
static var symbolName = "DataGrid";
static var version = "2.0.1.78";
var className = "DataGrid";
var selectable = true;
var resizableColumns = true;
var __showHeaders = true;
var sortableColumns = true;
var autoHScrollAble = true;
var editable = false;
var minColWidth = 20;
var totColW = 0;
var __rowRenderer = "DataGridRow";
var __headerHeight = 20;
var hasDrawn = false;
var minScrollInterval = 60;
var HEADERDEPTH = 5001;
var LINEDEPTH = 5000;
var SORTARROWDEPTH = 5500;
var EDITORDEPTH = 5002;
var DISABLEDHEADERDEPTH = 5003;
var HEADERCELLDEPTH = 4500;
var HEADEROVERLAYDEPTH = 4000;
var SEPARATORDEPTH = 5000;
var STRETCHERDEPTH = 1000;
}
Symbol 641 MovieClip [__Packages.mx.controls.gridclasses.DataGridColumn] Frame 0
class mx.controls.gridclasses.DataGridColumn extends mx.styles.CSSStyleDeclaration
{
var columnName, parentGrid, colNum, __header, headerCell, __cellRenderer, __headerRenderer, __labelFunction, styleName;
function DataGridColumn (colName) {
super();
columnName = colName;
headerText = (colName);
}
function get width() {
return(__width);
}
function set width(w) {
delete parentGrid.invSpaceColsEqually;
if ((parentGrid != undefined) && (parentGrid.hasDrawn)) {
var _local2 = resizable;
resizable = false;
parentGrid.resizeColumn(colNum, w);
resizable = _local2;
} else {
__width = w;
}
//return(width);
}
function set headerText(h) {
__header = h;
headerCell.setValue(h);
//return(headerText);
}
function get headerText() {
return(((__header == undefined) ? (columnName) : (__header)));
}
function set cellRenderer(cR) {
__cellRenderer = cR;
parentGrid.invColChange = true;
parentGrid.invalidate();
//return(cellRenderer);
}
function get cellRenderer() {
return(__cellRenderer);
}
function set headerRenderer(hS) {
__headerRenderer = hS;
parentGrid.invInitHeaders = true;
parentGrid.invalidate();
//return(headerRenderer);
}
function get headerRenderer() {
return(__headerRenderer);
}
function set labelFunction(f) {
__labelFunction = f;
parentGrid.invUpdateControl = true;
parentGrid.invalidate();
//return(labelFunction);
}
function get labelFunction() {
return(__labelFunction);
}
function getStyle(prop) {
var _local3 = this[prop];
if (_local3 == undefined) {
if (styleName != undefined) {
if (styleName instanceof mx.styles.CSSStyleDeclaration) {
_local3 = styleName.getStyle(prop);
} else {
_local3 = _global.styles[styleName].getStyle(prop);
}
}
if ((((_local3 == undefined) || (_local3 == _global.style[prop])) || (_local3 == _global.styles[parentGrid.className][prop])) && (prop != "backgroundColor")) {
_local3 = parentGrid.getStyle(prop);
}
}
return(_local3);
}
function __getTextFormat(tf, bAll, fieldInst) {
var _local4;
if (parentGrid.header_mc[fieldInst._name] != undefined) {
_local4 = getStyle("headerStyle").__getTextFormat(tf, bAll, fieldInst);
if (_local4 != false) {
_local4 = parentGrid.getStyle("headerStyle").__getTextFormat(tf, bAll, fieldInst);
}
if (_local4 == false) {
return(_local4);
}
}
if (styleName != undefined) {
var _local8 = ((typeof(styleName) == "string") ? (_global.styles[styleName]) : (styleName));
_local4 = _local8.__getTextFormat(tf, bAll);
if (!_local4) {
return(_local4);
}
}
_local4 = super.__getTextFormat(tf, bAll, fieldInst);
if (_local4) {
return(parentGrid.__getTextFormat(tf, bAll));
}
return(_local4);
}
var editable = true;
var sortable = true;
var resizable = true;
var sortOnHeaderRelease = true;
var __width = 50;
}
Symbol 642 MovieClip [__Packages.mx.controls.gridclasses.DataGridRow] Frame 0
class mx.controls.gridclasses.DataGridRow extends mx.controls.listclasses.SelectableRow
{
var setupBG, colBG, createEmptyMovieClip, cells, owner, backGround, createObject, createClassObject, createLabel, text, draw, textHeight, listOwner, columnIndex, __height, grandOwner, wasPressed, onPress;
function DataGridRow () {
super();
}
function createChildren(Void) {
setupBG();
colBG = createEmptyMovieClip("colbG_mc", mx.controls.listclasses.SelectableRow.LOWEST_DEPTH + 1);
}
function init(Void) {
super.init();
cells = new Array();
}
function size(Void) {
if (cells.length != owner.columns.length) {
createCells();
}
super.size();
}
function createCells(Void) {
clearCells();
backGround.onRelease = startEditCell;
var _local7 = owner.columns.length;
var _local2 = 0;
while (_local2 < _local7) {
var _local5 = owner.columns[_local2];
var _local4 = _local5.__cellRenderer;
if (_local4 != undefined) {
if (typeof(_local4) == "string") {
var _local3 = (cells[_local2] = createObject(_local4, "fCell" + _local2, 2 + _local2, {styleName:_local5}));
} else {
var _local3 = (cells[_local2] = createClassObject(_local4, "fCell" + _local2, 2 + _local2, {styleName:_local5}));
}
} else {
var _local3 = (cells[_local2] = createLabel("fCell" + _local2, 2 + _local2));
_local3.styleName = _local5;
_local3.selectable = false;
_local3.backGround = false;
_local3.border = false;
_local3._visible = false;
_local3.getPreferredHeight = cellGetPreferredHeight;
}
_local3.listOwner = owner;
_local3.columnIndex = _local2;
_local3.owner = this;
_local3.getCellIndex = getCellIndex;
_local3.getDataLabel = getDataLabel;
_local2++;
}
}
function cellGetPreferredHeight() {
var _local3 = text;
text = "^g_p";
draw();
var _local2 = textHeight + 4;
text = _local3;
return(_local2);
}
function getCellIndex(Void) {
return({columnIndex:columnIndex, itemIndex:owner.rowIndex + listOwner.__vPosition});
}
function getDataLabel() {
return(listOwner.columns[columnIndex].columnName);
}
function clearCells() {
var _local2 = 0;
while (_local2 < cells.length) {
cells[_local2].removeTextField();
cells[_local2].removeMovieClip();
_local2++;
}
cells.splice(0);
}
function setValue(itmObj, state, transition) {
var _local7 = owner.columns;
var _local8 = _local7.length;
var _local3 = 0;
while (_local3 < _local8) {
var _local6 = cells[_local3];
var _local5 = _local7[_local3];
var _local2 = _local5.__labelFunction(itmObj);
if (_local2 == undefined) {
_local2 = ((itmObj instanceof XMLNode) ? (itmObj.attributes[_local5.columnName]) : (itmObj[_local5.columnName]));
}
if (_local2 == undefined) {
_local2 = " ";
}
_local6.setValue(_local2, itmObj, state);
_local3++;
}
}
function drawCell(cellNum, xPos, w, bgCol) {
var _local2 = cells[cellNum];
_local2._x = xPos;
_local2._visible = true;
_local2.setSize(w - 2, Math.min(__height, _local2.getPreferredHeight()));
_local2._y = (__height - _local2._height) / 2;
if (bgCol != undefined) {
var _local3 = Math.floor(xPos - 2);
var _local4 = Math.floor(_local3 + w);
colBG.moveTo(_local3, 0);
colBG.beginFill(bgCol);
colBG.lineStyle(0, 0, 0);
colBG.lineTo(_local4, 0);
colBG.lineTo(_local4, __height);
colBG.lineTo(_local3, __height);
colBG.endFill();
}
}
function setState(newState, transition) {
var _local6 = owner.columns;
var _local4 = _local6.length;
if ((newState != "normal") || (!owner.enabled)) {
var _local5;
if (!owner.enabled) {
_local5 = owner.getStyle("disabledColor");
} else if (newState == "highlighted") {
_local5 = owner.getStyle("textRollOverColor");
} else if (newState == "selected") {
_local5 = owner.getStyle("textSelectedColor");
}
var _local3 = 0;
while (_local3 < _local4) {
cells[_local3].setColor(_local5);
cells[_local3].__enabled = owner.enabled;
_local3++;
}
} else {
var _local3 = 0;
while (_local3 < _local4) {
cells[_local3].setColor(_local6[_local3].getStyle("color"));
cells[_local3].__enabled = owner.enabled;
_local3++;
}
}
super.setState(newState, transition);
}
function startEditCell() {
var _local2 = grandOwner;
_local2.dontEdit = true;
_local2.releaseFocus();
delete _local2.dontEdit;
if ((_local2.enabled && (_local2.editable)) && (owner.item != undefined)) {
var _local9 = owner.cells.length;
var _local3 = 0;
while (_local3 < _local9) {
var _local5 = _local2.columns[_local3];
if (_local5.editable) {
var _local4 = owner._xmouse - owner.cells[_local3]._x;
if ((_local4 >= 0) && (_local4 < _local5.__width)) {
var _local6 = owner.rowIndex + _local2.__vPosition;
_local2.setFocusedCell({itemIndex:_local6, columnIndex:_local3}, true);
if (wasPressed != true) {
onPress();
_local2.onMouseUp();
}
delete wasPressed;
clearInterval(_local2.dragScrolling);
delete _local2.onMouseUp;
return(undefined);
}
}
_local3++;
}
}
}
function bGOnPress(Void) {
wasPressed = true;
grandOwner.pressFocus();
grandOwner.onRowPress(owner.rowIndex);
}
function notifyStyleChangeInChildren(sheetName, styleProp, newValue) {
var _local6 = owner.columns;
var _local4 = cells.length;
var _local3 = 0;
while (_local3 < _local4) {
var _local2 = cells[_local3];
if (_local2.stylecache != undefined) {
delete _local2.stylecache.tf;
}
delete _local2.enabledColor;
_local2.invalidateStyle(styleProp);
_local3++;
}
}
}
Symbol 667 MovieClip [__Packages.mx.containers.accordionclasses.AccordionHeader] Frame 0
class mx.containers.accordionclasses.AccordionHeader extends mx.controls.Button
{
var swapDepths, focus_mc, createObject, __get__width, __get__height, getStyle;
function AccordionHeader () {
super();
}
function onRollOver() {
swapDepths(maxDepth);
super.onRollOver();
}
function drawFocus(isFocused) {
if (isFocused) {
if (focus_mc == undefined) {
focus_mc = createObject("FocusRect", "focus_mc", 10);
}
focus_mc.move(1, 1);
focus_mc.setSize(__get__width() - 2, __get__height() - 2, 0, 100, getStyle("themeColor"));
focus_mc._visible = true;
} else {
focus_mc._visible = false;
}
}
static var symbolName = "AccordionHeader";
var ignoreClassStyleDeclaration = {Button:1};
static var symbolOwner = mx.containers.accordionclasses.AccordionHeader;
var className = "AccordionHeader";
var falseUpSkin = "AccordionHeaderSkin";
var falseDownSkin = "AccordionHeaderSkin";
var falseOverSkin = "AccordionHeaderSkin";
var falseDisabledSkin = "AccordionHeaderSkin";
var trueUpSkin = "AccordionHeaderSkin";
var trueDownSkin = "AccordionHeaderSkin";
var trueOverSkin = "AccordionHeaderSkin";
var trueDisabledSkin = "AccordionHeaderSkin";
var centerContent = false;
var btnOffset = 0;
var maxDepth = 1999;
static var version = "2.0.1.78";
}
Symbol 668 MovieClip [__Packages.mx.containers.Accordion] Frame 0
class mx.containers.Accordion extends mx.core.View
{
var tabEnabled, boundingBox_mc, __get__numChildren, invalidate, destroyObject, childNames, childSymbols, childIcons, childLabels, getChildAt, border_mc, getStyle, getFocusManager, tween, falseUpSkin, falseDownSkin, falseOverSkin, falseDisabledSkin, trueUpSkin, trueDownSkin, trueOverSkin, trueDisabledSkin, createClassObject, createObject, __get__width, __get__height, tweenBorderMetrics, tweenMargins, tweenContentWidth, tweenContentHeight, tweenOldSelectedIndex, tweenNewSelectedIndex, dispatchEvent, dispatchValueChangedEvent;
function Accordion () {
super();
}
function init() {
super.init();
tabEnabled = true;
boundingBox_mc._visible = false;
boundingBox_mc._width = (boundingBox_mc._height = 0);
}
function createChild(symbolName, instanceName, props) {
var _local3 = super.createChild(symbolName, instanceName, props);
_local3._visible = false;
var _local4 = __get__numChildren() - 1;
createHeaderAndMask(_local3, _local4);
invalidate();
return(_local3);
}
function createSegment(symbolName, instanceName, labelStr, iconStr) {
return(createChild(symbolName, instanceName, {label:labelStr, icon:iconStr}));
}
function destroyChildAt(index) {
if (__get__numChildren() == 0) {
return(undefined);
}
super.destroyChildAt(index);
destroyObject(kHeaderNameBase + index);
destroyObject(kMaskNameBase + index);
var _local4 = __get__numChildren();
var _local3 = Number(index);
while (_local3 < _local4) {
this[kHeaderNameBase + _local3] = this[kHeaderNameBase + (_local3 + 1)];
this[kHeaderNameBase + _local3]._name = kHeaderNameBase + _local3;
this[kMaskNameBase + _local3] = this[kMaskNameBase + (_local3 + 1)];
this[kMaskNameBase + _local3]._name = kMaskNameBase + _local3;
this[kHeaderNameBase + _local3].setStateVar(this[kHeaderNameBase + _local3].getState());
_local3++;
}
delete this[kHeaderNameBase + _local4];
delete this[kMaskNameBase + _local4];
_local3 = 0;
while (_local3 < _local4) {
this[kHeaderNameBase + _local3].swapDepths(kBaseHeaderDepth + _local3);
this[kMaskNameBase + _local3].swapDepths(kBaseMaskDepth + _local3);
this[mx.core.View.childNameBase + _local3].swapDepths(_local3 + 1);
_local3++;
}
if (_local4 == 0) {
__selectedIndex = undefined;
} else if (index < __selectedIndex) {
__selectedIndex--;
} else if (index == __selectedIndex) {
if (index == _local4) {
__selectedIndex--;
}
var _local6 = this[kHeaderNameBase + __selectedIndex];
_local6.setState(true);
}
invalidate();
}
function createChildren() {
var _local7 = childNames.length;
var _local3 = 0;
while (_local3 < _local7) {
var _local4 = childSymbols[_local3];
if (_local4 == undefined) {
_local4 = "View";
}
createChild(_local4, childNames[_local3], {label:childLabels[_local3], icon:childIcons[_local3]});
_local3++;
}
super.createChildren();
}
function initLayout() {
var _local5 = __get__numChildren();
var _local3 = 0;
while (_local3 < _local5) {
var _local4 = getChildAt(_local3);
_local4.swapDepths(_local3 + 1);
createHeaderAndMask(_local4, _local3);
_local3++;
}
super.initLayout();
}
function doLayout() {
var _local17 = border_mc.__get__borderMetrics();
var _local15 = -1;
var _local16 = -1;
var _local18 = getStyle("marginTop");
var _local9 = getStyle("verticalGap");
var _local12 = calcContentWidth();
var _local10 = calcContentHeight();
var _local13 = _local17.left + _local15;
var _local3 = _local17.top + _local18;
var _local7 = _local13;
var _local11 = _local12;
var _local8 = getStyle("headerHeight");
if (_local15 < 0) {
_local7 = _local7 - _local15;
_local11 = _local11 + _local15;
}
if (_local16 < 0) {
_local11 = _local11 + _local16;
}
var _local14 = __get__numChildren();
var _local2 = 0;
while (_local2 < _local14) {
var _local6 = this[kHeaderNameBase + _local2];
var _local5 = getChildAt(_local2);
var _local4 = this[kMaskNameBase + _local2];
_local6.move(_local13, _local3);
_local6.setSize(_local12, _local8);
_local6.__set__visible(true);
_local3 = _local3 + _local8;
_local4._x = _local7;
_local4._y = _local3;
_local4._width = _local11;
_local4._height = _local10 + _local9;
_local5._x = _local7;
_local5._y = _local3;
_local5._visible = _local2 == selectedIndex;
if (_local2 == selectedIndex) {
_local3 = _local3 + _local10;
}
_local3 = _local3 + _local9;
_local2++;
}
}
function onSetFocus() {
super.onSetFocus();
getFocusManager().defaultPushButtonEnabled = false;
}
function onKillFocus() {
super.onKillFocus();
getFocusManager().defaultPushButtonEnabled = true;
}
function keyDownHandler(evt) {
if (tween != undefined) {
return(undefined);
}
var _local2 = selectedIndex;
switch (evt.code) {
case 34 :
if (selectedIndex < (__get__numChildren() - 1)) {
selectedIndex = (selectedIndex + 1);
} else {
selectedIndex = (0);
}
dispatchChangeEvent(_local2, selectedIndex);
break;
case 33 :
if (selectedIndex > 0) {
selectedIndex = (selectedIndex - 1);
} else {
selectedIndex = (__get__numChildren() - 1);
}
dispatchChangeEvent(_local2, selectedIndex);
break;
case 36 :
selectedIndex = (0);
dispatchChangeEvent(_local2, selectedIndex);
break;
case 35 :
selectedIndex = (__get__numChildren() - 1);
dispatchChangeEvent(_local2, selectedIndex);
break;
case 40 :
case 39 :
drawHeaderFocus(__focusedIndex, false);
if (__focusedIndex < (__get__numChildren() - 1)) {
__focusedIndex++;
} else {
__focusedIndex = 0;
}
drawHeaderFocus(__focusedIndex, true);
break;
case 38 :
case 37 :
drawHeaderFocus(__focusedIndex, false);
if (__focusedIndex > 0) {
__focusedIndex--;
} else {
__focusedIndex = __get__numChildren() - 1;
}
drawHeaderFocus(__focusedIndex, true);
break;
case 32 :
case 13 :
if (__focusedIndex == selectedIndex) {
break;
}
selectedIndex = (__focusedIndex);
dispatchChangeEvent(_local2, selectedIndex);
}
}
function drawFocus(isFocused) {
__bDrawFocus = isFocused;
drawHeaderFocus(__focusedIndex, isFocused);
}
function getSelectedChild() {
return(getChildAt(selectedIndex));
}
function get selectedChild() {
return(getSelectedChild());
}
function setSelectedChild(v) {
var _local3 = __get__numChildren();
var _local2 = 0;
while (_local2 < _local3) {
if (getChildAt(_local2) == v) {
setSelectedIndex(_local2);
return(undefined);
}
_local2++;
}
}
function set selectedChild(v) {
setSelectedChild(v);
//return(selectedChild);
}
function getSelectedIndex() {
return(__selectedIndex);
}
function get selectedIndex() {
return(getSelectedIndex());
}
function setSelectedIndex(v) {
var _local2 = v;
if (_local2 == __selectedIndex) {
return(undefined);
}
var _local4 = this[kHeaderNameBase + __selectedIndex];
_local4.setState(false);
var _local5 = __selectedIndex;
__selectedIndex = _local2;
startTween(_local5, _local2);
var _local3 = this[kHeaderNameBase + __selectedIndex];
_local3.setState(true);
drawHeaderFocus(__focusedIndex, false);
__focusedIndex = __selectedIndex;
drawHeaderFocus(__focusedIndex, __bDrawFocus);
}
function set selectedIndex(v) {
setSelectedIndex(v);
//return(selectedIndex);
}
function createHeaderAndMask(content_mc, i) {
if (__selectedIndex == undefined) {
__selectedIndex = 0;
}
var _local3 = {};
if (falseUpSkin != undefined) {
_local3.falseUpSkin = falseUpSkin;
}
if (falseDownSkin != undefined) {
_local3.falseDownSkin = falseDownSkin;
}
if (falseOverSkin != undefined) {
_local3.falseOverSkin = falseOverSkin;
}
if (falseDisabledSkin != undefined) {
_local3.falseDisabledSkin = falseDisabledSkin;
}
if (trueUpSkin != undefined) {
_local3.trueUpSkin = trueUpSkin;
}
if (trueDownSkin != undefined) {
_local3.trueDownSkin = trueDownSkin;
}
if (trueOverSkin != undefined) {
_local3.trueOverSkin = trueOverSkin;
}
if (trueDisabledSkin != undefined) {
_local3.trueDisabledSkin = trueDisabledSkin;
}
var _local2 = createClassObject(headerClass, kHeaderNameBase + i, kBaseHeaderDepth + i, _local3);
_local2.visible = false;
_local2.label = content_mc.label;
_local2.tabEnabled = false;
_local2.clickHandler = function () {
this._parent.headerPress(this);
};
_local2.setSize(_local2.width, getStyle("headerHeight"));
_local2.content_mc = content_mc;
if (content_mc.icon != undefined) {
_local2.icon = content_mc.icon;
}
if (i == __selectedIndex) {
_local2.setState(true);
}
var _local6 = createObject("BoundingBox", kMaskNameBase + i, kBaseMaskDepth + i);
content_mc.setMask(_local6);
}
function getHeaderAt(idx) {
return(this[kHeaderNameBase + idx]);
}
function calcContentWidth() {
var _local2 = __get__width();
var _local3 = border_mc.__get__borderMetrics();
_local2 = _local2 - (_local3.left + _local3.right);
var _local5 = -1;
var _local4 = -1;
_local2 = _local2 - (_local5 + _local4);
return(_local2);
}
function calcContentHeight() {
var _local3 = __get__height();
var _local6 = border_mc.__get__borderMetrics();
_local3 = _local3 - (_local6.top + _local6.bottom);
var _local8 = getStyle("marginTop");
var _local7 = getStyle("marginBottom");
_local3 = _local3 - (_local8 + _local7);
var _local4 = __get__numChildren();
var _local5 = getStyle("verticalGap");
var _local2 = 0;
while (_local2 < _local4) {
_local3 = _local3 - this[kHeaderNameBase + _local2].height;
if (_local2 > 0) {
_local3 = _local3 - _local5;
}
_local2++;
}
return(_local3);
}
function drawHeaderFocus(headerIndex, isFocused) {
this[kHeaderNameBase + headerIndex].drawFocus(isFocused);
}
function headerPress(header) {
var _local2 = selectedIndex;
selectedChild = (header.content_mc);
dispatchChangeEvent(_local2, selectedIndex);
}
function startTween(oldSelectedIndex, newSelectedIndex) {
tweenBorderMetrics = border_mc.borderMetrics;
tweenMargins = new Object();
tweenMargins.left = -1;
tweenMargins.top = getStyle("marginTop");
tweenMargins.right = -1;
tweenMargins.bottom = getStyle("marginBottom");
tweenContentWidth = calcContentWidth();
tweenContentHeight = calcContentHeight();
tweenOldSelectedIndex = oldSelectedIndex;
tweenNewSelectedIndex = newSelectedIndex;
tween = new mx.effects.Tween(this, 1, tweenContentHeight - 1, getStyle("openDuration"));
var _local2 = getStyle("openEasing");
if (_local2 != undefined) {
tween.easingEquation = _local2;
}
}
function onTweenUpdate(value) {
var _local16 = tweenBorderMetrics;
var _local17 = tweenMargins;
var _local19 = tweenContentWidth;
var _local15 = tweenContentHeight;
var _local9 = tweenOldSelectedIndex;
var _local10 = tweenNewSelectedIndex;
var _local8 = value;
var _local7 = _local15 - value;
var _local11 = ((_local9 < _local10) ? (-_local8) : 0);
var _local13 = ((_local10 > _local9) ? 0 : (-_local7));
var _local4 = _local16.top + _local17.top;
var _local12 = __get__numChildren();
var _local14 = getStyle("verticalGap");
var _local2 = 0;
while (_local2 < _local12) {
var _local6 = this[kHeaderNameBase + _local2];
var _local5 = getChildAt(_local2);
var _local3 = this[kMaskNameBase + _local2];
_local6._y = _local4;
_local4 = _local4 + _local6.height;
if (_local2 == _local9) {
_local3._y = _local4;
_local3._height = _local7;
_local5._y = _local3._y + _local11;
_local5._visible = true;
_local4 = _local4 + _local7;
} else if (_local2 == _local10) {
_local3._y = _local4;
_local3._height = _local8;
_local5._y = _local3._y + _local13;
_local5._visible = true;
_local4 = _local4 + _local8;
}
_local4 = _local4 + _local14;
_local2++;
}
}
function onTweenEnd(value) {
delete tweenBorderMetrics;
delete tweenMargins;
delete tweenContentWidth;
delete tweenContentHeight;
delete tweenOldSelectedIndex;
delete tweenNewSelectedIndex;
delete tween;
doLayout();
}
function dispatchChangeEvent(prevValue, newValue) {
dispatchEvent({type:"change", prevValue:prevValue, newValue:newValue});
dispatchValueChangedEvent(selectedIndex);
}
static var symbolName = "Accordion";
static var symbolOwner = mx.containers.Accordion;
var className = "Accordion";
static var version = "2.0.1.78";
var kBaseHeaderDepth = 1000;
var kBaseMaskDepth = 2000;
var kHeaderNameBase = "_header";
var kMaskNameBase = "_mask";
var headerClass = mx.containers.accordionclasses.AccordionHeader;
var __selectedIndex = undefined;
var __focusedIndex = 0;
var __bDrawFocus = false;
}
Symbol 672 MovieClip [__Packages.mx.skins.halo.AccordionHeaderSkin] Frame 0
class mx.skins.halo.AccordionHeaderSkin extends mx.skins.RectBorder
{
var __get__width, __get__height, getStyle, clear, drawRoundRect, beginGradientFill, drawRect, endFill;
function AccordionHeaderSkin () {
super();
}
function init() {
super.init();
}
function size() {
drawHaloRect(__get__width(), __get__height());
}
function drawHaloRect(w, h) {
var _local6 = getStyle("borderStyle");
var _local4 = getStyle("themeColor");
var _local5 = getStyle("textSelectedColor");
clear();
switch (_local6) {
case "falseup" :
drawRoundRect(0, 0, w, h, 0, 9081738, 100);
drawRoundRect(1, 1, w - 2, h - 2, 0, 16777215, 100);
gradientFill(2, 2, w - 2, h - 2, [14342874, 16777215]);
break;
case "falsedown" :
drawRoundRect(0, 0, w, h, 0, _local5, 50);
drawRoundRect(1, 1, w - 2, h - 2, 0, 16777215, 100);
drawRoundRect(1, 1, w - 2, h - 2, 0, _local4, 100);
drawRoundRect(2, 2, w - 4, h - 4, 0, 16777215, 100);
drawRoundRect(2, 2, w - 4, h - 4, 0, _local4, 20);
break;
case "falserollover" :
drawRoundRect(0, 0, w, h, 0, _local5, 50);
drawRoundRect(1, 1, w - 2, h - 2, 0, 16777215, 100);
drawRoundRect(1, 1, w - 2, h - 2, 0, _local4, 50);
gradientFill(2, 2, w - 2, h - 2, [14342874, 16777215]);
break;
case "falsedisabled" :
drawRoundRect(0, 0, w, h, 0, 9081738, 100);
drawRoundRect(1, 1, w - 2, h - 2, 0, 16777215, 100);
drawRoundRect(1, 1, w - 2, h - 2, 0, 13159628, 60);
gradientFill(2, 2, w - 2, h - 2, [14342874, 16777215]);
break;
case "trueup" :
drawRoundRect(0, 0, w, h, 0, _local5, 50);
drawRoundRect(1, 1, w - 2, h - 2, 0, 16777215, 100);
drawRoundRect(1, 1, w - 2, h - 2, 0, _local4, 50);
drawRoundRect(2, 2, w - 4, h - 4, 0, 16777215, 100);
drawRoundRect(2, 2, w - 4, h - 4, 0, _local4, 20);
break;
case "truedown" :
drawRoundRect(0, 0, w, h, 0, _local5, 50);
drawRoundRect(1, 1, w - 2, h - 2, 0, 16777215, 100);
drawRoundRect(1, 1, w - 2, h - 2, 0, _local4, 50);
drawRoundRect(2, 2, w - 4, h - 4, 0, 16777215, 100);
drawRoundRect(2, 2, w - 4, h - 4, 0, _local4, 20);
break;
case "truerollover" :
drawRoundRect(0, 0, w, h, 0, _local5, 50);
drawRoundRect(1, 1, w - 2, h - 2, 0, 16777215, 100);
drawRoundRect(1, 1, w - 2, h - 2, 0, _local4, 50);
drawRoundRect(2, 2, w - 4, h - 4, 0, 16777215, 100);
drawRoundRect(2, 2, w - 4, h - 4, 0, _local4, 20);
break;
case "truedisabled" :
drawRoundRect(0, 0, w, h, 0, 9081738, 100);
drawRoundRect(1, 1, w - 2, h - 2, 0, 16777215, 100);
drawRoundRect(1, 1, w - 2, h - 2, 0, 13159628, 60);
gradientFill(2, 2, w - 2, h - 2, [14342874, 16777215]);
}
}
function gradientFill(x, y, w, h, c) {
var _local2 = [100, 100];
var _local8 = [0, 255];
var _local3 = {matrixType:"box", x:x, y:y, w:w, h:h, r:(Math.PI/2)};
beginGradientFill("linear", c, _local2, _local8, _local3);
drawRect(x, y, w, h);
endFill();
}
static function classConstruct() {
mx.core.ext.UIObjectExtensions.Extensions();
_global.skinRegistry.AccordionHeaderSkin = true;
return(true);
}
static var symbolName = "AccordionHeaderSkin";
static var symbolOwner = mx.skins.halo.AccordionHeaderSkin;
var className = "AccordionHeaderSkin";
static var classConstructed = classConstruct();
static var UIObjectExtensionsDependency = mx.core.ext.UIObjectExtensions;
}
Symbol 673 MovieClip [__Packages.mx.controls.ComboBase] Frame 0
class mx.controls.ComboBase extends mx.core.UIComponent
{
var getValue, tabEnabled, tabChildren, boundingBox_mc, downArrow_mc, createClassObject, onDownArrow, border_mc, __border, text_mc, focusTextField, __width, __height, getFocusManager, __get__height, height, _parent;
function ComboBase () {
super();
getValue = _getValue;
}
function init() {
super.init();
tabEnabled = !_editable;
tabChildren = _editable;
boundingBox_mc._visible = false;
boundingBox_mc._width = (boundingBox_mc._height = 0);
}
function createChildren() {
var _local3 = new Object();
_local3.styleName = this;
if (downArrow_mc == undefined) {
_local3.falseUpSkin = downArrowUpName;
_local3.falseOverSkin = downArrowOverName;
_local3.falseDownSkin = downArrowDownName;
_local3.falseDisabledSkin = downArrowDisabledName;
_local3.validateNow = true;
_local3.tabEnabled = false;
createClassObject(mx.controls.SimpleButton, "downArrow_mc", 19, _local3);
downArrow_mc.buttonDownHandler = onDownArrow;
downArrow_mc.useHandCursor = false;
downArrow_mc.onPressWas = downArrow_mc.onPress;
downArrow_mc.onPress = function () {
this.trackAsMenuWas = this.trackAsMenu;
this.trackAsMenu = true;
if (!this._editable) {
this._parent.text_mc.trackAsMenu = this.trackAsMenu;
}
this.onPressWas();
};
downArrow_mc.onDragOutWas = downArrow_mc.onDragOut;
downArrow_mc.onDragOut = function () {
this.trackAsMenuWas = this.trackAsMenu;
this.trackAsMenu = false;
if (!this._editable) {
this._parent.text_mc.trackAsMenu = this.trackAsMenu;
}
this.onDragOutWas();
};
downArrow_mc.onDragOverWas = downArrow_mc.onDragOver;
downArrow_mc.onDragOver = function () {
this.trackAsMenu = this.trackAsMenuWas;
if (!this._editable) {
this._parent.text_mc.trackAsMenu = this.trackAsMenu;
}
this.onDragOverWas();
};
}
if (border_mc == undefined) {
_local3.tabEnabled = false;
createClassObject(_global.styles.rectBorderClass, "border_mc", 17, _local3);
border_mc.move(0, 0);
__border = border_mc;
}
_local3.borderStyle = "none";
_local3.readOnly = !_editable;
_local3.tabEnabled = _editable;
if (text_mc == undefined) {
createClassObject(mx.controls.TextInput, "text_mc", 18, _local3);
text_mc.move(0, 0);
text_mc.addEnterEvents();
text_mc.enterHandler = _enterHandler;
text_mc.changeHandler = _changeHandler;
text_mc.oldOnSetFocus = text_mc.onSetFocus;
text_mc.onSetFocus = function () {
this.oldOnSetFocus();
this._parent.onSetFocus();
};
text_mc.__set__restrict("^\x1B");
text_mc.oldOnKillFocus = text_mc.onKillFocus;
text_mc.onKillFocus = function (n) {
this.oldOnKillFocus(n);
this._parent.onKillFocus(n);
};
text_mc.drawFocus = function (b) {
this._parent.drawFocus(b);
};
delete text_mc.borderStyle;
}
focusTextField = text_mc;
text_mc.owner = this;
layoutChildren(__width, __height);
}
function onKillFocus() {
super.onKillFocus();
Key.removeListener(text_mc);
getFocusManager().defaultPushButtonEnabled = true;
}
function onSetFocus() {
super.onSetFocus();
getFocusManager().defaultPushButtonEnabled = false;
Key.addListener(text_mc);
}
function setFocus() {
if (_editable) {
Selection.setFocus(text_mc);
} else {
Selection.setFocus(this);
}
}
function setSize(w, h, noEvent) {
super.setSize(w, ((h == undefined) ? (__get__height()) : (h)), noEvent);
}
function setEnabled(enabledFlag) {
super.setEnabled(enabledFlag);
downArrow_mc.enabled = enabledFlag;
text_mc.enabled = enabledFlag;
}
function setEditable(e) {
_editable = e;
if (wrapDownArrowButton == false) {
if (e) {
border_mc.borderStyle = "inset";
text_mc.borderStyle = "inset";
symbolName = "ComboBox";
invalidateStyle();
} else {
border_mc.borderStyle = "comboNonEdit";
text_mc.borderStyle = "dropDown";
symbolName = "DropDown";
invalidateStyle();
}
}
tabEnabled = !e;
tabChildren = e;
text_mc.tabEnabled = e;
if (e) {
delete text_mc.onPress;
delete text_mc.onRelease;
delete text_mc.onReleaseOutside;
delete text_mc.onDragOut;
delete text_mc.onDragOver;
delete text_mc.onRollOver;
delete text_mc.onRollOut;
} else {
text_mc.onPress = function () {
this._parent.downArrow_mc.onPress();
};
text_mc.onRelease = function () {
this._parent.downArrow_mc.onRelease();
};
text_mc.onReleaseOutside = function () {
this._parent.downArrow_mc.onReleaseOutside();
};
text_mc.onDragOut = function () {
this._parent.downArrow_mc.onDragOut();
};
text_mc.onDragOver = function () {
this._parent.downArrow_mc.onDragOver();
};
text_mc.onRollOver = function () {
this._parent.downArrow_mc.onRollOver();
};
text_mc.onRollOut = function () {
this._parent.downArrow_mc.onRollOut();
};
text_mc.useHandCursor = false;
}
}
function get editable() {
return(_editable);
}
function set editable(e) {
setEditable(e);
//return(editable);
}
function _getValue() {
return((_editable ? (text_mc.getText()) : (DSgetValue())));
}
function draw() {
downArrow_mc.draw();
border_mc.draw();
}
function size() {
layoutChildren(__width, __height);
}
function setTheme(t) {
downArrowUpName = (t + "downArrow") + "Up_mc";
downArrowDownName = (t + "downArrow") + "Down_mc";
downArrowDisabledName = (t + "downArrow") + "Disabled_mc";
}
function get text() {
return(text_mc.getText());
}
function set text(t) {
setText(t);
//return(text);
}
function setText(t) {
text_mc.setText(t);
}
function get textField() {
return(text_mc);
}
function get restrict() {
return(text_mc.__get__restrict());
}
function set restrict(w) {
text_mc.__set__restrict(w);
//return(restrict);
}
function invalidateStyle() {
downArrow_mc.invalidateStyle();
text_mc.invalidateStyle();
border_mc.invalidateStyle();
}
function layoutChildren(w, h) {
if (downArrow_mc == undefined) {
return(undefined);
}
if (wrapDownArrowButton) {
var _local2 = border_mc.__get__borderMetrics();
downArrow_mc._width = (downArrow_mc._height = (h - _local2.top) - _local2.bottom);
downArrow_mc.move((w - downArrow_mc._width) - _local2.right, _local2.top);
border_mc.setSize(w, h);
text_mc.setSize(w - downArrow_mc._width, h);
} else {
downArrow_mc.move(w - downArrow_mc._width, 0);
border_mc.setSize(w - downArrow_mc.width, h);
text_mc.setSize(w - downArrow_mc._width, h);
downArrow_mc._height = height;
}
}
function _changeHandler(obj) {
}
function _enterHandler(obj) {
var _local2 = _parent;
obj.target = _local2;
_local2.dispatchEvent(obj);
}
function get tabIndex() {
return(text_mc.__get__tabIndex());
}
function set tabIndex(w) {
text_mc.__set__tabIndex(w);
//return(tabIndex);
}
static var mixIt1 = mx.controls.listclasses.DataSelector.Initialize(mx.controls.ComboBase);
static var symbolName = "ComboBase";
static var symbolOwner = mx.controls.ComboBase;
static var version = "2.0.1.78";
var _editable = false;
var downArrowUpName = "ScrollDownArrowUp";
var downArrowDownName = "ScrollDownArrowDown";
var downArrowOverName = "ScrollDownArrowOver";
var downArrowDisabledName = "ScrollDownArrowDisabled";
var wrapDownArrowButton = true;
var DSgetValue = mx.controls.listclasses.DataSelector.prototype.getValue;
var multipleSelection = false;
}
Symbol 674 MovieClip [__Packages.mx.controls.ComboBox] Frame 0
class mx.controls.ComboBox extends mx.controls.ComboBase
{
var __set__editable, editable, __labels, data, __dropdownWidth, __width, _editable, selectedIndex, __dropdown, dataProvider, __labelFunction, createObject, border_mc, mask, text_mc, dispatchValueChangedEvent, getValue, length, selectedItem, _y, isPressed, owner, __set__visible, height, localToGlobal, __selectedIndexOnDropdown, __get__height, getStyle, _parent, width, __dataProvider, selected, dispatchEvent;
function ComboBox () {
super();
}
function init() {
super.init();
}
function createChildren() {
super.createChildren();
__set__editable(editable);
if (__labels.length > 0) {
var _local6 = new Array();
var _local3 = 0;
while (_local3 < labels.length) {
_local6.addItem({label:labels[_local3], data:data[_local3]});
_local3++;
}
setDataProvider(_local6);
}
dropdownWidth = (((typeof(__dropdownWidth) == "number") ? (__dropdownWidth) : (__width)));
if (!_editable) {
selectedIndex = 0;
}
initializing = false;
}
function onKillFocus(n) {
if (_showingDropdown && (n != null)) {
displayDropdown(false);
}
super.onKillFocus();
}
function getDropdown() {
if (initializing) {
return(undefined);
}
if (!hasDropdown()) {
var _local3 = new Object();
_local3.styleName = this;
if (dropdownBorderStyle != undefined) {
_local3.borderStyle = dropdownBorderStyle;
}
_local3._visible = false;
__dropdown = mx.managers.PopUpManager.createPopUp(this, mx.controls.List, false, _local3, true);
__dropdown.scroller.mask.removeMovieClip();
if (dataProvider == undefined) {
dataProvider = new Array();
}
__dropdown.setDataProvider(dataProvider);
__dropdown.selectMultiple = false;
__dropdown.rowCount = __rowCount;
__dropdown.selectedIndex = selectedIndex;
__dropdown.vScrollPolicy = "auto";
__dropdown.labelField = __labelField;
__dropdown.labelFunction = __labelFunction;
__dropdown.owner = this;
__dropdown.changeHandler = _changeHandler;
__dropdown.scrollHandler = _scrollHandler;
__dropdown.itemRollOverHandler = _itemRollOverHandler;
__dropdown.itemRollOutHandler = _itemRollOutHandler;
__dropdown.resizeHandler = _resizeHandler;
__dropdown.mouseDownOutsideHandler = function (eventObj) {
var _local3 = this.owner;
var _local4 = new Object();
_local4.x = _local3._root._xmouse;
_local4.y = _local3._root._ymouse;
_local3._root.localToGlobal(_local4);
if (_local3.hitTest(_local4.x, _local4.y, false)) {
} else if ((!this.wrapDownArrowButton) && (this.owner.downArrow_mc.hitTest(_root._xmouse, _root._ymouse, false))) {
} else {
_local3.displayDropdown(false);
}
};
__dropdown.onTweenUpdate = function (v) {
this._y = v;
};
__dropdown.setSize(__dropdownWidth, __dropdown.height);
createObject("BoundingBox", "mask", 20);
mask._y = border_mc.height;
mask._width = __dropdownWidth;
mask._height = __dropdown.height;
mask._visible = false;
__dropdown.setMask(mask);
}
return(__dropdown);
}
function setSize(w, h, noEvent) {
super.setSize(w, h, noEvent);
__dropdownWidth = w;
__dropdown.rowHeight = h;
__dropdown.setSize(__dropdownWidth, __dropdown.height);
}
function setEditable(e) {
super.setEditable(e);
if (e) {
text_mc.setText("");
} else {
text_mc.setText(selectedLabel);
}
}
function get labels() {
return(__labels);
}
function set labels(lbls) {
__labels = lbls;
setDataProvider(lbls);
//return(labels);
}
function getLabelField() {
return(__labelField);
}
function get labelField() {
return(getLabelField());
}
function setLabelField(s) {
__dropdown.labelField = (__labelField = s);
text_mc.setText(selectedLabel);
}
function set labelField(s) {
setLabelField(s);
//return(labelField);
}
function getLabelFunction() {
return(__labelFunction);
}
function get labelFunction() {
return(getLabelFunction());
}
function set labelFunction(f) {
__dropdown.labelFunction = (__labelFunction = f);
text_mc.setText(selectedLabel);
//return(labelFunction);
}
function setSelectedItem(v) {
super.setSelectedItem(v);
__dropdown.selectedItem = v;
text_mc.setText(selectedLabel);
}
function setSelectedIndex(v) {
super.setSelectedIndex(v);
__dropdown.selectedIndex = v;
if (v != undefined) {
text_mc.setText(selectedLabel);
}
dispatchValueChangedEvent(getValue());
}
function setRowCount(count) {
if (isNaN(count)) {
return(undefined);
}
__rowCount = count;
__dropdown.setRowCount(count);
}
function get rowCount() {
return(Math.max(1, Math.min(length, __rowCount)));
}
function set rowCount(v) {
setRowCount(v);
//return(rowCount);
}
function setDropdownWidth(w) {
__dropdownWidth = w;
__dropdown.setSize(w, __dropdown.height);
}
function get dropdownWidth() {
return(__dropdownWidth);
}
function set dropdownWidth(v) {
setDropdownWidth(v);
//return(dropdownWidth);
}
function get dropdown() {
return(getDropdown());
}
function setDataProvider(dp) {
super.setDataProvider(dp);
__dropdown.setDataProvider(dp);
if (!_editable) {
selectedIndex = 0;
}
}
function open() {
displayDropdown(true);
}
function close() {
displayDropdown(false);
}
function get selectedLabel() {
var _local2 = selectedItem;
if (_local2 == undefined) {
return("");
}
if (labelFunction != undefined) {
return(labelFunction(_local2));
}
if (typeof(_local2) != "object") {
return(_local2);
}
if (_local2[labelField] != undefined) {
return(_local2[labelField]);
}
if (_local2.label != undefined) {
return(_local2.label);
}
var _local3 = " ";
for (var _local4 in _local2) {
if (_local4 != "__ID__") {
_local3 = (_local2[_local4] + ", ") + _local3;
}
}
_local3 = _local3.substring(0, _local3.length - 3);
return(_local3);
}
function hasDropdown() {
return((__dropdown != undefined) && (__dropdown.valueOf() != undefined));
}
function tweenEndShow(value) {
_y = value;
isPressed = true;
owner.dispatchEvent({type:"open", target:owner});
}
function tweenEndHide(value) {
_y = value;
__set__visible(false);
owner.dispatchEvent({type:"close", target:owner});
}
function displayDropdown(show) {
if (show == _showingDropdown) {
return(undefined);
}
var _local3 = new Object();
_local3.x = 0;
_local3.y = height;
localToGlobal(_local3);
if (show) {
__selectedIndexOnDropdown = selectedIndex;
getDropdown();
var _local2 = __dropdown;
_local2.isPressed = true;
_local2.rowCount = rowCount;
_local2.visible = show;
_local2._parent.globalToLocal(_local3);
_local2.onTweenEnd = tweenEndShow;
var _local5;
var _local8;
if ((_local3.y + _local2.height) > Stage.height) {
_local5 = _local3.y - __get__height();
_local8 = _local5 - _local2.height;
mask._y = -_local2.height;
} else {
_local5 = _local3.y - _local2.height;
_local8 = _local3.y;
mask._y = border_mc.height;
}
var _local6 = _local2.selectedIndex;
if (_local6 == undefined) {
_local6 = 0;
}
var _local4 = _local2.vPosition;
_local4 = _local6 - 1;
_local4 = Math.min(Math.max(_local4, 0), _local2.length - _local2.rowCount);
_local2.vPosition = _local4;
_local2.move(_local3.x, _local5);
_local2.tween = new mx.effects.Tween(__dropdown, _local5, _local8, getStyle("openDuration"));
} else {
__dropdown._parent.globalToLocal(_local3);
delete __dropdown.dragScrolling;
__dropdown.onTweenEnd = tweenEndHide;
__dropdown.tween = new mx.effects.Tween(__dropdown, __dropdown._y, _local3.y - __dropdown.height, getStyle("openDuration"));
}
var _local9 = getStyle("openEasing");
if (_local9 != undefined) {
__dropdown.tween.easingEquation = _local9;
}
_showingDropdown = show;
}
function onDownArrow() {
_parent.displayDropdown(!_parent._showingDropdown);
}
function keyDown(e) {
if (e.ctrlKey && (e.code == 40)) {
displayDropdown(true);
} else if (e.ctrlKey && (e.code == 38)) {
displayDropdown(false);
dispatchChangeEvent(undefined, __selectedIndexOnDropdown, selectedIndex);
} else if (e.code == 27) {
displayDropdown(false);
} else if (e.code == 13) {
if (_showingDropdown) {
selectedIndex = __dropdown.selectedIndex;
displayDropdown(false);
dispatchChangeEvent(undefined, __selectedIndexOnDropdown, selectedIndex);
}
} else if (((((!_editable) || (e.code == 38)) || (e.code == 40)) || (e.code == 33)) || (e.code == 34)) {
selectedIndex = 0 + selectedIndex;
bInKeyDown = true;
var _local3 = dropdown;
_local3.keyDown(e);
bInKeyDown = false;
selectedIndex = __dropdown.selectedIndex;
}
}
function invalidateStyle(styleProp) {
__dropdown.invalidateStyle(styleProp);
super.invalidateStyle(styleProp);
}
function changeTextStyleInChildren(styleProp) {
if (dropdown.stylecache != undefined) {
delete dropdown.stylecache[styleProp];
delete dropdown.stylecache.tf;
}
__dropdown.changeTextStyleInChildren(styleProp);
super.changeTextStyleInChildren(styleProp);
}
function changeColorStyleInChildren(sheetName, styleProp, newValue) {
if (dropdown.stylecache != undefined) {
delete dropdown.stylecache[styleProp];
delete dropdown.stylecache.tf;
}
__dropdown.changeColorStyleInChildren(sheetName, styleProp, newValue);
super.changeColorStyleInChildren(sheetName, styleProp, newValue);
}
function notifyStyleChangeInChildren(sheetName, styleProp, newValue) {
if (dropdown.stylecache != undefined) {
delete dropdown.stylecache[styleProp];
delete dropdown.stylecache.tf;
}
__dropdown.notifyStyleChangeInChildren(sheetName, styleProp, newValue);
super.notifyStyleChangeInChildren(sheetName, styleProp, newValue);
}
function onUnload() {
__dropdown.removeMovieClip();
}
function _resizeHandler() {
var _local2 = owner;
_local2.mask._width = width;
_local2.mask._height = height;
}
function _changeHandler(obj) {
var _local2 = owner;
var _local3 = _local2.selectedIndex;
obj.target = _local2;
if (this == owner.text_mc) {
_local2.selectedIndex = undefined;
_local2.dispatchChangeEvent(obj, -1, -2);
} else {
_local2.selectedIndex = selectedIndex;
if (!_local2._showingDropdown) {
_local2.dispatchChangeEvent(obj, _local3, _local2.selectedIndex);
} else if (!_local2.bInKeyDown) {
_local2.displayDropdown(false);
_local2.dispatchChangeEvent(obj, _local3, _local2.selectedIndex);
}
}
}
function _scrollHandler(obj) {
var _local2 = owner;
obj.target = _local2;
_local2.dispatchEvent(obj);
}
function _itemRollOverHandler(obj) {
var _local2 = owner;
obj.target = _local2;
_local2.dispatchEvent(obj);
}
function _itemRollOutHandler(obj) {
var _local2 = owner;
obj.target = _local2;
_local2.dispatchEvent(obj);
}
function modelChanged(eventObj) {
super.modelChanged(eventObj);
if (0 == __dataProvider.length) {
text_mc.setText("");
delete selected;
} else if ((__dataProvider.length == ((eventObj.lastItem - eventObj.firstItem) + 1)) && (eventObj.eventName == "addItems")) {
selectedIndex = 0;
}
}
function dispatchChangeEvent(obj, prevValue, newValue) {
var _local2;
if (prevValue != newValue) {
if ((obj != undefined) && (obj.type == "change")) {
_local2 = obj;
} else {
_local2 = {type:"change"};
}
dispatchEvent(_local2);
}
}
static var symbolName = "ComboBox";
static var symbolOwner = mx.controls.ComboBox;
static var version = "2.0.1.78";
var clipParameters = {labels:1, data:1, editable:1, rowCount:1, dropdownWidth:1};
static var mergedClipParameters = mx.core.UIObject.mergeClipParameters(mx.controls.ComboBox.prototype.clipParameters, mx.controls.ComboBase.prototype.clipParameters);
var className = "ComboBox";
var _showingDropdown = false;
var __rowCount = 5;
var dropdownBorderStyle = undefined;
var initializing = true;
var __labelField = "label";
var bInKeyDown = false;
}
Symbol 688 MovieClip [__Packages.mx.managers.PopUpManager] Frame 0
class mx.managers.PopUpManager
{
var popUp, setSize, move, modalWindow, _parent, _name, _visible, owner;
function PopUpManager () {
}
static function createModalWindow(parent, o, broadcastOutsideEvents) {
var _local2 = parent.createChildAtDepth("Modal", mx.managers.DepthManager.kTopmost);
_local2.setDepthBelow(o);
o.modalID = _local2._name;
_local2._alpha = _global.style.modalTransparency;
_local2.tabEnabled = false;
if (broadcastOutsideEvents) {
_local2.onPress = mixins.onPress;
} else {
_local2.onPress = mixins.nullFunction;
}
_local2.onRelease = mixins.nullFunction;
_local2.resize = mixins.resize;
mx.managers.SystemManager.init();
mx.managers.SystemManager.addEventListener("resize", _local2);
_local2.resize();
_local2.useHandCursor = false;
_local2.popUp = o;
o.modalWindow = _local2;
o.deletePopUp = mixins.deletePopUp;
o.setVisible = mixins.setVisible;
o.getVisible = mixins.getVisible;
o.addProperty("visible", o.getVisible, o.setVisible);
}
static function createPopUp(parent, className, modal, initobj, broadcastOutsideEvents) {
if (mixins == undefined) {
mixins = new mx.managers.PopUpManager();
}
if (broadcastOutsideEvents == undefined) {
broadcastOutsideEvents = false;
}
var _local5 = parent._root;
if (_local5 == undefined) {
_local5 = _root;
}
while (parent != _local5) {
parent = parent._parent;
}
initobj.popUp = true;
var _local4 = parent.createClassChildAtDepth(className, ((broadcastOutsideEvents || (modal)) ? (mx.managers.DepthManager.kTopmost) : (mx.managers.DepthManager.kTop)), initobj);
var _local2 = _root;
var _local6 = _local2.focusManager != undefined;
while (_local2._parent != undefined) {
_local2 = _local2._parent._root;
if (_local2.focusManager != undefined) {
_local6 = true;
break;
}
}
if (_local6) {
_local4.createObject("FocusManager", "focusManager", -1);
if (_local4._visible == false) {
mx.managers.SystemManager.deactivate(_local4);
}
}
if (modal) {
createModalWindow(parent, _local4, broadcastOutsideEvents);
} else {
if (broadcastOutsideEvents) {
_local4.mouseListener = new Object();
_local4.mouseListener.owner = _local4;
_local4.mouseListener.onMouseDown = mixins.onMouseDown;
Mouse.addListener(_local4.mouseListener);
}
_local4.deletePopUp = mixins.deletePopUp;
}
return(_local4);
}
function onPress(Void) {
var _local3 = popUp._root;
if (_local3 == undefined) {
_local3 = _root;
}
if (popUp.hitTest(_local3._xmouse, _local3._ymouse, false)) {
return(undefined);
}
popUp.dispatchEvent({type:"mouseDownOutside"});
}
function nullFunction(Void) {
}
function resize(Void) {
var _local2 = mx.managers.SystemManager.__get__screen();
setSize(_local2.width, _local2.height);
move(_local2.x, _local2.y);
}
function deletePopUp(Void) {
if (modalWindow != undefined) {
_parent.destroyObject(modalWindow._name);
}
_parent.destroyObject(_name);
}
function setVisible(v, noEvent) {
super.setVisible(v, noEvent);
modalWindow._visible = v;
}
function getVisible(Void) {
return(_visible);
}
function onMouseDown(Void) {
var _local3 = owner._root;
if (_local3 == undefined) {
_local3 = _root;
}
var _local4 = new Object();
_local4.x = _local3._xmouse;
_local4.y = _local3._ymouse;
_local3.localToGlobal(_local4);
if (owner.hitTest(_local4.x, _local4.y, false)) {
} else {
owner.mouseDownOutsideHandler(owner);
}
}
static var version = "2.0.1.78";
static var mixins = undefined;
}
Symbol 725 MovieClip Frame 1
function change(evt) {
_show.gotoAndStop(evt.target.selectedItem.data + 1);
}
var i = 0;
while (i < _root.TUTORIAL_LIST.length) {
cmpList.addItem({label:_root.TUTORIAL_NAMES[i], data:i});
i++;
}
cmpList.addEventListener("change", this);
_show.gotoAndStop(1);
stop();
Instance of Symbol 477 MovieClip [List] "cmpList" in Symbol 725 MovieClip Frame 1
//component parameters
onClipEvent (construct) {
multipleSelection = false;
rowHeight = 20;
}
Symbol 731 Button
on (release) {
play();
}
Symbol 735 MovieClip Frame 2
_parent.Update();
play();
Symbol 742 MovieClip Frame 1
function Callback() {
startTime = getTimer();
endTime = startTime + MUSIC_LENGTH;
Update();
stop();
}
function Update() {
if (_root.Options.MusicOn) {
timer.text = endTime - getTimer();
if (getTimer() > endTime) {
play();
}
} else {
stop();
}
}
MUSIC_LENGTH = 120000 /* 0x01D4C0 */;
Symbol 742 MovieClip Frame 9
Callback(0);
Symbol 742 MovieClip Frame 10
stopAllSounds();
Symbol 742 MovieClip Frame 19
Callback(1);
Symbol 742 MovieClip Frame 20
stopAllSounds();
Symbol 742 MovieClip Frame 29
Callback(2);
Symbol 742 MovieClip Frame 30
stopAllSounds();
Symbol 742 MovieClip Frame 39
Callback(3);
Symbol 742 MovieClip Frame 40
stopAllSounds();
Symbol 742 MovieClip Frame 49
Callback(4);
Symbol 742 MovieClip Frame 50
stopAllSounds();
Symbol 742 MovieClip Frame 59
Callback(5);
Symbol 742 MovieClip Frame 60
stopAllSounds();
Symbol 758 MovieClip Frame 1
_parent.stop();
Symbol 758 MovieClip Frame 121
_parent.play();
this.stop();
Symbol 765 Button
on (rollOver) {
menuchoice = "Simulation Mode";
}
on (release) {
NewSimulation();
gotoAndPlay ("fade");
}
Symbol 768 Button
on (rollOver) {
menuchoice = "Single Player";
}
on (release) {
if (_root.CSAVE == undefined) {
gotoAndPlay ("singleplayer");
} else {
gotoAndPlay ("singlegame");
}
}
Symbol 770 Button
on (rollOver) {
menuchoice = "Skirmish";
}
on (release) {
gotoAndPlay ("skirmish");
}
Symbol 772 Button
on (rollOver) {
menuchoice = "Sandbox Mode";
}
on (release) {
gotoAndPlay ("sandbox");
}
Symbol 779 Button
on (rollOver) {
if (ONLINE_VERSION) {
menuchoice = "Download Game";
}
}
on (release) {
if (ONLINE_VERSION) {
getURL ("http://renegadeent.ca", "_blank");
}
}
Symbol 781 Button
on (rollOver) {
menuchoice = "Tutorial";
}
on (release) {
gotoAndPlay ("tutorials");
}
Symbol 785 MovieClip Frame 1
play();
Symbol 791 MovieClip Frame 1
function change(evt) {
_root.Options.Quality = cmpQuality.selectedItem.data;
_root.Options.SoundOn = cmpSound.selectedItem.data;
_root.Options.MusicOn = cmpMusic.selectedItem.data;
trace(_root.debugVar(_root.Options));
if (!_root.Options.MusicOn) {
stopAllSounds();
_root.MusicMC.stop();
} else {
stopAllSounds();
_root.MusicMC.gotoAndPlay(1);
}
_quality = _root.Options.Quality;
}
cmpQuality.addItem("High", "high");
cmpQuality.addItem("Normal", "medium");
cmpQuality.addItem("Low", "low");
cmpSound.addItem("On", true);
cmpSound.addItem("Off", false);
cmpMusic.addItem("On", true);
cmpMusic.addItem("Off", false);
cmpQuality.addEventListener("change", this);
cmpSound.addEventListener("change", this);
cmpMusic.addEventListener("change", this);
switch (_root.Options.Quality) {
case "high" :
cmpQuality.selectedIndex = 0;
break;
case "medium" :
cmpQuality.selectedIndex = 1;
break;
case "low" :
cmpQuality.selectedIndex = 2;
}
if (_root.Options.SoundOn) {
cmpSound.selectedIndex = 0;
} else {
cmpSound.selectedIndex = 1;
}
if (_root.Options.MusicOn) {
cmpMusic.selectedIndex = 0;
} else {
cmpMusic.selectedIndex = 1;
}
Instance of Symbol 687 MovieClip [ComboBox] "cmpQuality" in Symbol 791 MovieClip Frame 1
//component parameters
onClipEvent (construct) {
editable = false;
rowCount = 5;
restrict = "";
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Instance of Symbol 687 MovieClip [ComboBox] "cmpSound" in Symbol 791 MovieClip Frame 1
//component parameters
onClipEvent (construct) {
editable = false;
rowCount = 5;
restrict = "";
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Instance of Symbol 687 MovieClip [ComboBox] "cmpMusic" in Symbol 791 MovieClip Frame 1
//component parameters
onClipEvent (construct) {
editable = false;
rowCount = 5;
restrict = "";
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Symbol 795 Button
on (release) {
CSAVE.Mission++;
}
Symbol 800 Button
on (rollOver) {
_root.globitotexto = "Back";
}
on (rollOut) {
_root.globitotexto = "";
}
on (release) {
History.shift();
if ((History[0] != undefined) && (History[0] > 0)) {
_parent.gotoAndPlay(History[0]);
}
}
Symbol 801 MovieClip Frame 1
if (_parent._currentframe != this.History[0]) {
this.History.unshift(_parent._currentframe);
if (History.length > 20) {
History.pop();
}
}
Symbol 805 Button
on (release) {
CreateSave(name.text, icon);
gotoAndPlay ("singlegame");
}
Symbol 824 Button
on (release) {
gotoAndPlay (61);
}
Symbol 828 Button
on (release) {
NewMission(CSAVE, MISSION_LIST[cmpList.selectedIndex]);
gotoAndPlay ("fade");
}
Symbol 866 Button
on (release) {
getURL ("http://renegadeent.com/", "_blank");
}
Symbol 871 Button
on (release) {
Start();
}
Symbol 874 Button
on (release) {
GangLogoEdit(-1);
}
Symbol 875 Button
on (release) {
GangLogoEdit(1);
}
Symbol 876 MovieClip Frame 1
function GangLogoEdit(n) {
gang = gang + n;
if (gang < 0) {
gang = _root.GANG_LIST.length - 1;
} else if (gang >= _root.GANG_LIST.length) {
gang = 0;
}
Refresh();
}
function GangTypeEdit(n) {
type = type + n;
if (type < 1) {
type = _root.TYPE_NAMES.length;
} else if (type > _root.TYPE_NAMES.length) {
type = 1;
}
Refresh();
}
function Refresh() {
name = _root.GANG_LIST[gang].name;
GANG_LOGO.gotoAndStop(_root.GANG_LIST[gang].icon);
cmpGangName.text = name;
var _local2 = reverseNameType(evt.target.value);
cmpType.text = TYPEOBJ.name;
}
CmpTextHandler = new Object();
CmpTypeHandler = new Object();
CmpTextHandler.change = function (evt) {
name = evt.target.value;
};
CmpTypeHandler.change = function (evt) {
var _local2 = reverseNameType(evt.target.value);
TYPEOBJ = _root.TYPE_NAMES[_local2];
cmpType.text = TYPEOBJ.name;
type = _root.TYPE_NAMES[_local2].type;
personality = _root.TYPE_NAMES[_local2].personality;
};
for (var i in _root.TYPE_NAMES) {
cmpType.addItem(_root.TYPE_NAMES[i].name);
}
cmpGangName.addEventListener("change", CmpTextHandler);
cmpType.addEventListener("change", CmpTypeHandler);
reverseNameType = function (typename) {
var _local2 = 0;
while (_local2 < _root.TYPE_NAMES.length) {
if (typename == _root.TYPE_NAMES[_local2].name) {
return(_local2);
}
_local2++;
}
return(-1);
};
num = this._name.substr(6, 1);
if (num == 1) {
cmpType._visible = false;
}
gang = _parent.TMPPLAYERDATA[num].gang;
name = _parent.TMPPLAYERDATA[num].name;
TYPEOBJ = _parent.TMPPLAYERDATA[num].typeObj;
type = TYPEOBJ.type;
personality = TYPEOBJ.personality;
Refresh();
stop();
Instance of Symbol 587 MovieClip [TextInput] "cmpGangName" in Symbol 876 MovieClip Frame 1
//component parameters
onClipEvent (construct) {
editable = true;
password = false;
text = "";
maxChars = null;
restrict = "";
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Instance of Symbol 687 MovieClip [ComboBox] "cmpType" in Symbol 876 MovieClip Frame 1
//component parameters
onClipEvent (construct) {
editable = false;
rowCount = 5;
restrict = "";
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Symbol 888 MovieClip Frame 1
slots = 9;
level = 3;
slot0.Type = 3;
slot0.PScale = 11;
slot7.Type = 3;
slot7.PScale = 11;
slot8.Type = 2;
slot8.PScale = 15;
slot4.Type = 2;
slot4.PScale = 15;
slot3.Type = 6;
slot3.PScale = 3;
slot6.Type = 10;
slot6.PScale = 3;
slot5.Type = 5;
slot5.PScale = 10;
slot2.Type = 3;
slot2.PScale = 15;
slot1.Type = 3;
slot1.PScale = 15;
Symbol 890 MovieClip Frame 1
slots = 9;
level = 3;
slot0.Type = 3;
slot0.PScale = 11;
slot7.Type = 3;
slot7.PScale = 11;
slot8.Type = 2;
slot8.PScale = 15;
slot4.Type = 2;
slot4.PScale = 15;
slot3.Type = 6;
slot3.PScale = 3;
slot6.Type = 10;
slot6.PScale = 3;
slot5.Type = 5;
slot5.PScale = 10;
slot2.Type = 3;
slot2.PScale = 15;
slot1.Type = 3;
slot1.PScale = 15;
Symbol 892 MovieClip Frame 1
slots = 9;
level = 3;
slot0.Type = 3;
slot0.PScale = 11;
slot7.Type = 3;
slot7.PScale = 11;
slot8.Type = 2;
slot8.PScale = 15;
slot4.Type = 2;
slot4.PScale = 15;
slot3.Type = 6;
slot3.PScale = 3;
slot6.Type = 10;
slot6.PScale = 3;
slot5.Type = 5;
slot5.PScale = 10;
slot2.Type = 3;
slot2.PScale = 15;
slot1.Type = 3;
slot1.PScale = 15;
Symbol 894 MovieClip Frame 1
slots = 12;
level = 3;
slot0.Type = 3;
slot0.PScale = 11;
slot7.Type = 3;
slot7.PScale = 11;
slot8.Type = 2;
slot8.PScale = 15;
slot4.Type = 2;
slot4.PScale = 15;
slot3.Type = 6;
slot3.PScale = 3;
slot6.Type = 10;
slot6.PScale = 3;
slot5.Type = 5;
slot5.PScale = 10;
slot2.Type = 3;
slot2.PScale = 15;
slot1.Type = 3;
slot1.PScale = 15;
slot9.Type = 3;
slot9.PScale = 16;
slot10.Type = 2;
slot10.PScale = 16;
slot11.Type = 3;
slot11.PScale = 14;
Symbol 896 Button
on (rollOver) {
_root.OverLocation(this.Num);
}
on (rollOut) {
_root.globitotexto = "";
_root.OutLocation();
}
on (release) {
_root.LocationClicked(_root.LocationData[this.Num].Type, this.Num);
}
Symbol 908 MovieClip Frame 1
stop();
Symbol 925 MovieClip Frame 1
Num = this._name.substr(4);
stop();
Symbol 925 MovieClip Frame 6
stop();
Symbol 927 MovieClip Frame 1
slots = 30;
level = 2;
slot6.Type = 6;
slot6.PScale = 3;
slot5.Type = 10;
slot5.PScale = 3;
slot8.Type = 2;
slot8.PScale = 17;
slot3.Type = 2;
slot3.PScale = 20;
slot0.Type = 3;
slot0.PScale = 17;
slot10.Type = 3;
slot10.PScale = 17;
slot12.Type = 3;
slot12.PScale = 16;
slot1.Type = 3;
slot1.PScale = 18;
slot2.Type = 3;
slot2.PScale = 20;
slot4.Type = 2;
slot4.PScale = 18;
slot7.Type = 3;
slot7.PScale = 19;
slot9.Type = 3;
slot9.PScale = 18;
slot11.Type = 2;
slot11.PScale = 20;
slot13.Type = 3;
slot13.PScale = 20;
slot14.Type = 2;
slot14.PScale = 15;
slot15.Type = 3;
slot15.PScale = 16;
slot16.Type = 3;
slot16.PScale = 17;
slot17.Type = 2;
slot17.PScale = 17;
slot18.Type = 3;
slot18.PScale = 16;
slot19.Type = 3;
slot19.PScale = 16;
slot20.Type = 2;
slot20.PScale = 18;
slot21.Type = 3;
slot21.PScale = 15;
slot22.Type = 2;
slot22.PScale = 16;
slot23.Type = 3;
slot23.PScale = 17;
slot24.Type = 2;
slot24.PScale = 16;
slot25.Type = 3;
slot25.PScale = 17;
slot25.Type = 2;
slot25.PScale = 16;
slot26.Type = 3;
slot26.PScale = 17;
slot27.Type = 2;
slot27.PScale = 16;
slot28.Type = 3;
slot28.PScale = 18;
slot29.Type = 2;
slot29.PScale = 17;
Symbol 929 MovieClip Frame 1
slots = 9;
level = 1;
slot0.Type = 9;
slot0.PScale = 20;
slot1.Type = 6;
slot1.PScale = 1;
slot2.Type = 3;
slot2.PScale = 3;
slot3.Type = 3;
slot3.PScale = 5;
slot4.Type = 10;
slot4.PScale = 1;
slot5.Type = 2;
slot5.PScale = 6;
slot6.Type = 5;
slot6.PScale = 1;
slot7.Type = 3;
slot7.PScale = 7;
slot8.Type = 2;
slot8.PScale = 7;
Symbol 931 MovieClip Frame 1
slots = 9;
level = 1;
slot0.Type = 9;
slot0.PScale = 20;
slot1.Type = 6;
slot1.PScale = 1;
slot2.Type = 3;
slot2.PScale = 3;
slot3.Type = 3;
slot3.PScale = 5;
slot4.Type = 10;
slot4.PScale = 1;
slot5.Type = 2;
slot5.PScale = 6;
slot6.Type = 5;
slot6.PScale = 1;
slot7.Type = 3;
slot7.PScale = 7;
slot8.Type = 2;
slot8.PScale = 7;
Symbol 933 MovieClip Frame 1
slots = 9;
level = 1;
slot0.Type = 9;
slot0.PScale = 20;
slot1.Type = 6;
slot1.PScale = 1;
slot2.Type = 3;
slot2.PScale = 3;
slot3.Type = 3;
slot3.PScale = 5;
slot4.Type = 10;
slot4.PScale = 1;
slot5.Type = 2;
slot5.PScale = 6;
slot6.Type = 5;
slot6.PScale = 1;
slot7.Type = 3;
slot7.PScale = 7;
slot8.Type = 2;
slot8.PScale = 7;
Symbol 935 MovieClip Frame 1
slots = 9;
level = 1;
slot0.Type = 9;
slot0.PScale = 20;
slot1.Type = 6;
slot1.PScale = 1;
slot2.Type = 3;
slot2.PScale = 3;
slot3.Type = 3;
slot3.PScale = 5;
slot4.Type = 10;
slot4.PScale = 1;
slot5.Type = 2;
slot5.PScale = 6;
slot6.Type = 5;
slot6.PScale = 1;
slot7.Type = 3;
slot7.PScale = 7;
slot8.Type = 2;
slot8.PScale = 7;
Symbol 937 MovieClip Frame 1
slots = 20;
level = 2;
slot6.Type = 6;
slot6.PScale = 2;
slot5.Type = 10;
slot5.PScale = 2;
slot8.Type = 2;
slot8.PScale = 10;
slot3.Type = 2;
slot3.PScale = 12;
slot0.Type = 3;
slot0.PScale = 9;
slot10.Type = 3;
slot10.PScale = 9;
slot12.Type = 3;
slot12.PScale = 9;
slot1.Type = 3;
slot1.PScale = 10;
slot2.Type = 3;
slot2.PScale = 11;
slot4.Type = 2;
slot4.PScale = 8;
slot7.Type = 3;
slot7.PScale = 12;
slot9.Type = 3;
slot9.PScale = 11;
slot11.Type = 2;
slot11.PScale = 10;
slot13.Type = 3;
slot13.PScale = 11;
slot14.Type = 2;
slot14.PScale = 12;
slot15.Type = 3;
slot15.PScale = 11;
slot16.Type = 2;
slot16.PScale = 12;
slot17.Type = 3;
slot17.PScale = 13;
slot17.Type = 2;
slot17.PScale = 13;
slot18.Type = 3;
slot18.PScale = 11;
slot19.Type = 2;
slot19.PScale = 7;
Symbol 938 MovieClip Frame 1
function CreateLocation(i) {
duplicateMovieClip ("_LOC", "LOC_" + i, 100 + i);
}
TILES = 13;
Symbol 949 Button
on (press) {
startDrag ("", false, left, top, right, bottom);
dragging = true;
_root.dragging = true;
_root.NO_MOUSE_MOVE = true;
}
on (release) {
stopDrag();
dragging = false;
_root.dragging = false;
_root.NO_MOUSE_MOVE = false;
var val = ((this._y - bottom) / (top - bottom));
_root.UpdateZoom(100 + (val * 600));
}
Instance of Symbol 950 MovieClip "knob" in Symbol 951 MovieClip Frame 1
onClipEvent (load) {
top = _y - 50;
bottom = _y + 50;
left = _x;
right = _x;
}
Symbol 958 Button
on (rollOver) {
_root.globitotexto = "Exit Game";
}
on (rollOut) {
_root.globitotexto = "";
}
on (release) {
_root.exitGame();
}
Symbol 960 Button
on (rollOver) {
_root.globitotexto = "View News";
}
on (rollOut) {
_root.globitotexto = "";
}
on (release) {
_root.viewSpecial(_root.CURRENT_PLAYER, "news", "News Headlines");
}
Symbol 962 Button
on (rollOver) {
_root.globitotexto = "View Objectives";
}
on (rollOut) {
_root.globitotexto = "";
}
on (release) {
_root.viewSpecial(_root.PlayerData[_root.CURRENT_PLAYER], "objective", "My Objectives");
}
Symbol 964 Button
on (rollOver) {
_root.globitotexto = "Go To HQ";
}
on (rollOut) {
_root.globitotexto = "";
}
on (release) {
_root.CenterMap(_root.PlayerHQs[_root.CURRENT_PLAYER]);
}
Symbol 966 Button
on (rollOver) {
_root.globitotexto = "Skip Turn";
}
on (rollOut) {
_root.globitotexto = "";
}
on (release) {
_root.NextTurn();
}
Symbol 985 Button
on (rollOver) {
_root.globitotexto = "View Finances";
}
on (rollOut) {
_root.globitotexto = "";
}
on (release) {
_root.viewFinances(_root.CURRENT_PLAYER);
}
Symbol 986 Button
on (rollOver) {
_root.globitotexto = "Power Rating";
}
on (rollOut) {
_root.globitotexto = "";
}
Symbol 987 Button
on (rollOver) {
_root.globitotexto = "Police Risk Level : " + Math.round(_root.Env.PoRisk);
}
on (rollOut) {
_root.globitotexto = "";
}
Symbol 988 Button
on (rollOver) {
_root.globitotexto = "Date";
}
on (rollOut) {
_root.globitotexto = "";
}
Symbol 989 Button
on (rollOver) {
_root.globitotexto = "View Prostitutes";
}
on (rollOut) {
_root.globitotexto = "";
}
on (release) {
_root.viewSpecial(_root.CURRENT_PLAYER, "prostitute", _root.PlayerData[_root.CURRENT_PLAYER].Name + "'s Prostitutes");
}
Symbol 990 Button
on (rollOver) {
_root.globitotexto = "View Henchmen";
}
on (rollOut) {
_root.globitotexto = "";
}
on (release) {
_root.viewHenchmen(_root.PlayerData[1]);
}
Symbol 999 Button
on (release) {
this._visible = false;
_root.PlayerGo();
}
Symbol 1000 MovieClip Frame 7
stop();
Instance of Symbol 1013 MovieClip in Symbol 1014 MovieClip Frame 1
onClipEvent (load) {
setProperty("_parent.fondo.texto", _visible , "0");
setProperty("_parent", _alpha , "0");
}
onClipEvent (enterFrame) {
setProperty("_parent.pico.colorin", _alpha , _parent.alfafondo);
setProperty("_parent.fondo.colorin", _alpha , _parent.alfafondo);
colorete = new Color(_parent.fondo.colorin);
colorete.setRGB(parseint(_parent.colordefondo, 16));
colorete2 = new Color(_parent.pico.colorin);
colorete2.setRGB(parseint(_parent.colordefondo, 16));
setProperty("_parent", _x , int(_parent._parent._xmouse));
setProperty("_parent", _y , int(_parent._parent._ymouse));
if ((_root.globitotexto == null) || (_root.globitotexto == "")) {
setProperty("_parent.fondo.texto", _visible , 0);
if (_parent._alpha > 0) {
setProperty("_parent", _alpha , _parent._alpha - 10);
}
} else {
if (_parent._alpha < 100) {
setProperty("_parent", _alpha , _parent._alpha + 10);
}
setProperty("_parent.fondo.texto", _visible , 1);
_parent.fondo.texto.parrafo = ((("<font size='11' color='#" + _parent.colortitulo) + "'><B>") + _root.globitotexto) + "</B></font>";
yraton = _parent._parent._ymouse;
xraton = _parent._parent._xmouse;
anchoglobo = _parent.fondo._width + _parent.pico._width;
altoglobo = _parent.fondo._height + _parent.pico._height;
if ((yraton < altoglobo) && (xraton < anchoglobo)) {
tellTarget ("_parent") {
gotoAndPlay ("abajo");
};
} else if ((yraton < altoglobo) && (xraton > anchoglobo)) {
tellTarget ("_parent") {
gotoAndPlay ("abajo_i");
};
} else if ((yraton > altoglobo) && (xraton > anchoglobo)) {
tellTarget ("_parent") {
gotoAndPlay ("arriba_i");
};
} else if ((yraton > altoglobo) && (xraton < anchoglobo)) {
tellTarget ("_parent") {
gotoAndPlay ("arriba");
};
} else {
tellTarget ("_parent") {
gotoAndPlay ("arriba");
};
}
}
}
Symbol 1014 MovieClip Frame 6
stop();
Symbol 1014 MovieClip Frame 19
stop();
Symbol 1014 MovieClip Frame 32
stop();
Symbol 1014 MovieClip Frame 45
stop();
Symbol 1027 MovieClip Frame 1
function drawGraph() {
var _local6 = Dat;
MAX_P = Math.max(_local6.length, 20);
max = 0;
var _local2 = 0;
while (_local2 < Dat.length) {
max = Math.max(Dat[_local2], max);
_local2++;
}
max = max * 1.1;
_local2 = 0;
while (_local2 < MAX_P) {
if (_local6[_local2] == undefined) {
break;
}
NoData._visible = false;
var _local5 = (_local2 * MAX_X) / MAX_P;
var _local4 = (_local6[_local2] / max) * MAX_Y;
if (_local2 == 0) {
ox = _local5;
oy = _local4;
} else {
LINE_.duplicateMovieClip("LINE_" + _local2, _local2 + 400);
var _local3 = this["LINE_" + _local2];
_local3._x = ox + LINE_._x;
_local3._y = LINE_._y - oy;
_local3._xscale = MAX_X / MAX_P;
_local3._yscale = _local4 - oy;
_local3._visible = true;
ox = _local5;
oy = _local4;
}
_local2++;
}
}
MAX_X = 400;
MAX_Y = 300;
MAX_P = 20;
NoData._visible = true;
LINE_._visible = false;
var i = 0;
while (i < MAX_P) {
this["LINE_" + i].removeMovieClip();
i++;
}
stop();
Symbol 1027 MovieClip Frame 9
gotoAndPlay ("init");
Symbol 1027 MovieClip Frame 10
drawGraph();
Symbol 1027 MovieClip Frame 17
stop();
Symbol 1036 Button
on (release) {
_root.OnPopUpClosed();
}
Symbol 1038 Button
on (release) {
gotoAndPlay(_lastframe);
}
Symbol 1043 MovieClip Frame 1
stop();
Symbol 1043 MovieClip Frame 2
stop();
Symbol 1043 MovieClip Frame 3
stop();
Symbol 1045 Button
on (release) {
_parent.ClickTab(this._name.substr(3));
}
Symbol 1048 Button
on (release) {
Help(_root.TUTORIAL_GAMEPLAY, "objective");
}
Symbol 1050 Button
on (release) {
_root.DoJob(this.Event);
}
on (rollOver) {
_root.globitotexto = "Difficulty : " + Difficulty;
}
on (rollOut) {
_root.globitotexto = "";
}
Symbol 1052 MovieClip Frame 1
Event = _root.DEMAND_EVENT;
Event.setLevel(_parent.LocNum);
Event.setPlayer(_root.CURRENT_PLAYER);
Event.CalcRisk();
stop();
Symbol 1053 Button
on (release) {
_root.PICKUP_EVENT.Open();
}
on (rollOver) {
_root.globitotexto = "Risk : " + PRisk;
}
on (rollOut) {
_root.globitotexto = "";
}
Symbol 1065 MovieClip Frame 1
function setBar(Bar, val, max) {
if (val > max) {
val = max;
}
Bar._width = (val / max) * 90;
}
function Refresh() {
Event.setTarget(ProstituteArray[pInd]);
PRisk = Event.CalcActionRisk(_root.BUYSHOT_PICKUP_EVENT) + "%";
Risk = Event.CalcRisk();
HObj = ProstituteArray[pInd];
name.text = HObj.Name;
age.text = HObj.Age;
setBar(HPBAR, HObj.Att, _root.PROST_ATTMAX);
}
function change(evt) {
pname = evt.target.value;
var _local1 = 0;
while (_local1 < ProstituteArray.length) {
if (pname == ProstituteArray[_local1].Name) {
pInd = _local1;
break;
}
_local1++;
}
Refresh();
}
if (_parent.LocObj.Prostitutes <= 0) {
this._visible = false;
}
ProstituteArray = new Array();
var i = 0;
while (i < _parent.LocObj.Prostitutes) {
ProstituteArray.push(_root.GenerateProstitute());
cmpProstitutes.addItem(ProstituteArray[i].Name);
i++;
}
cmpProstitutes.addEventListener("change", this);
pInd = 0;
Event = _root.PICKUP_EVENT;
Event.setPlayer(_parent.PlayerObj, _parent.LocNum);
Refresh();
stop();
Instance of Symbol 477 MovieClip [List] "cmpProstitutes" in Symbol 1065 MovieClip Frame 1
//component parameters
onClipEvent (construct) {
multipleSelection = false;
rowHeight = 20;
}
Symbol 1066 Button
on (release) {
_parent.gotoAndPlay("assetprotection");
}
Symbol 1070 Button
on (release) {
_root.DoJob(Event);
}
on (rollOver) {
_root.globitotexto = "Risk : " + PRisk;
}
on (rollOut) {
_root.globitotexto = "";
}
Symbol 1074 MovieClip Frame 1
function change(evt) {
if (Number(evt.target.value) != Number.NaN) {
Event.setCash(Number(evt.target.value));
Risk = Event.CalcRisk();
PRisk = (Math.round(Risk * 10) / 10) + "%";
}
}
cmpRobbery.addEventListener("change", this);
cmpRobbery.fontSize = 24;
Event = _root.ROBBERY_EVENT;
Event.Init(_parent.PlayerObj.Num, _parent.LocObj.Num);
Risk = Event.CalcRisk();
var def = Event.getReward();
cmpRobbery.maximum = def * 2;
cmpRobbery.minimum = def * 0.5;
cmpRobbery.value = def;
if (def < 750) {
cmpRobbery.stepSize = 50;
} else if (def < 3000) {
cmpRobbery.stepSize = 200;
} else if (def < 10000) {
cmpRobbery.stepSize = 500;
}
Risk = Event.CalcRisk();
PRisk = (Math.round(Risk * 10) / 10) + "%";
stop();
Instance of Symbol 604 MovieClip [NumericStepper] "cmpRobbery" in Symbol 1074 MovieClip Frame 1
//component parameters
onClipEvent (construct) {
maximum = 10;
minimum = 0;
stepSize = 1;
value = 0;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Symbol 1084 Button
on (release) {
Help(_root.TUTORIAL_ASSETS, "assetprotection");
}
Symbol 1091 Button
on (release) {
HenchmenFire(PMap[PSelected]);
}
on (rollOver) {
_root.globitotexto = "Fire Selected Henchmen";
}
on (rollOut) {
_root.globitotexto = "";
}
Symbol 1100 Button
on (release) {
HenchmenHire(0);
}
on (rollOver) {
_root.globitotexto = "Hire Henchmen";
}
on (rollOut) {
_root.globitotexto = "";
}
Symbol 1101 Button
on (release) {
HenchmenFire(LMap[LSelected]);
}
on (rollOver) {
_root.globitotexto = "Fire Selected Henchmen";
}
on (rollOut) {
_root.globitotexto = "";
}
Symbol 1102 Button
on (release) {
HenchmenHire(LocObj.Num);
}
on (rollOver) {
_root.globitotexto = "Hire Henchmen";
}
on (rollOut) {
_root.globitotexto = "";
}
Symbol 1105 Button
on (release) {
_root.DoJob(Event[1]);
}
on (rollOver) {
_root.globitotexto = "Risk : " + PRisk[1];
}
on (rollOut) {
_root.globitotexto = "";
}
Symbol 1106 Button
on (release) {
_root.DoJob(Event[1]);
}
Symbol 1108 Button
on (release) {
amount.text = Math.max(Number(amount.text) - 1, 0);
Refresh();
}
Symbol 1115 MovieClip Frame 1
Event = _root.ATTACK_EVENT;
Event.setLevel(_parent.LocNum);
Event.setPlayer(_root.CURRENT_PLAYER);
Event.CalcRisk(_root.Env.PoRisk, _parent.PlayerObj.Power);
stop();
Symbol 1116 Button
on (release) {
gotoAndPlay ("type10clothes");
}
Symbol 1119 Button
on (release) {
UPGRADE_MIN = _root.CAR_UPGRADE_START;
UPGRADE_MAX = _root.CAR_UPGRADE_END;
gotoAndPlay ("type10upgrades");
}
Symbol 1122 Button
on (release) {
UPGRADE_MIN = _root.GUN_UPGRADE_START;
UPGRADE_MAX = _root.GUN_UPGRADE_END;
gotoAndPlay ("type10upgrades");
}
Symbol 1123 Button
on (release) {
UPGRADE_MIN = _root.MISC_UPGRADE_START;
UPGRADE_MAX = _root.MISC_UPGRADE_END;
gotoAndPlay ("type10upgrades");
}
Symbol 1128 Button
on (release) {
Help(_root.TUTORIAL_GAMEPLAY, "type10");
}
Symbol 1137 Button
on (release) {
colObj = new Color(this);
_parent.switchColor(colObj.getTransform());
}
Symbol 1143 Button
on (release) {
h--;
SWATCH_SELECT = 1;
Refresh();
}
Symbol 1144 Button
on (release) {
h++;
SWATCH_SELECT = 1;
Refresh();
}
Symbol 1145 Button
on (release) {
g--;
SWATCH_SELECT = 2;
Refresh();
}
Symbol 1146 Button
on (release) {
g++;
SWATCH_SELECT = 2;
Refresh();
}
Symbol 1147 Button
on (release) {
b--;
SWATCH_SELECT = 3;
Refresh();
}
Symbol 1148 Button
on (release) {
b++;
SWATCH_SELECT = 3;
Refresh();
}
Symbol 1149 Button
on (release) {
d--;
SWATCH_SELECT = 4;
Refresh();
}
Symbol 1150 Button
on (release) {
d++;
SWATCH_SELECT = 4;
Refresh();
}
Symbol 1151 Button
on (release) {
if (_root.purchase(PlayerObj, cost, "these Clothes")) {
for (i in NewCostume) {
PlayerObj.Costume[i] = NewCostume[i];
}
_root.OnPopUpClosed();
}
}
Symbol 1154 Button
on (rollOver) {
_root.globitotexto = "Hat Color";
}
on (rollOut) {
_root.globitotexto = "";
}
on (release) {
SWATCH_SELECT = 1;
Refresh();
}
Symbol 1155 Button
on (rollOver) {
_root.globitotexto = "Glasses Color";
}
on (rollOut) {
_root.globitotexto = "";
}
on (release) {
SWATCH_SELECT = 2;
Refresh();
}
Symbol 1156 Button
on (rollOver) {
_root.globitotexto = "Shirt Color";
}
on (rollOut) {
_root.globitotexto = "";
}
on (release) {
SWATCH_SELECT = 3;
Refresh();
}
Symbol 1157 Button
on (rollOver) {
_root.globitotexto = "Facial Hair Color";
}
on (rollOut) {
_root.globitotexto = "";
}
on (release) {
SWATCH_SELECT = 4;
Refresh();
}
Symbol 1158 Button
on (release) {
trace("COSTUME = {");
for (i in Costume) {
trace(((("\t" + i) + ":") + Costume[i]) + ",");
}
trace("};");
}
Symbol 1161 Button
on (release) {
Buy();
}
Symbol 1164 Button
on (release) {
Back();
}
Symbol 1165 Button
on (release) {
Next();
}
Symbol 1184 Button
on (rollOver) {
_root.globitotexto = "Buy Low";
}
on (rollOut) {
_root.globitotexto = "";
}
Symbol 1186 Button
on (rollOver) {
_root.globitotexto = "Sell High";
}
on (rollOut) {
_root.globitotexto = "";
}
Symbol 1199 Button
on (release) {
BuyDrug();
}
Symbol 1201 Button
on (release) {
if (Number(pStock.text > 0)) {
SellDrug();
} else {
_root.NewPopUp("Nothing To Sell", "You have no drugs to sell from this type", _root.DRUG_ICON);
}
}
Symbol 1204 Button
on (release) {
gotoAndPlay ("type6");
}
Symbol 1217 Button
on (release) {
Buy();
}
on (rollOver) {
_root.globitotexto = "Risk : " + PRisk;
}
on (rollOut) {
_root.globitotexto = "";
}
Symbol 1221 Button
on (release) {
Help(_root.TUTORIAL_DRUGS, "BuyDrug");
}
Symbol 1222 Button
on (release) {
gotoAndPlay(_lastframe);
}
Symbol 1234 Button
on (release) {
Sell();
}
on (rollOver) {
_root.globitotexto = "Risk : " + PRisk;
}
on (rollOut) {
_root.globitotexto = "";
}
Symbol 1240 Button
on (release) {
Help(_root.TUTORIAL_DRUGS, "SellDrug");
}
Symbol 1243 Button
on (release) {
gotoAndPlay ("gangstatus");
}
Symbol 1245 Button
on (release) {
Help(_root.TUTORIAL_GAMEPLAY, "type9");
}
Symbol 1248 Button
on (release) {
Help(_root.TUTORIAL_ATTACK, "type9opponent");
}
Symbol 1249 Button
on (rollOver) {
_root.globitotexto = "Hire New Henchman";
}
on (rollOut) {
_root.globitotexto = "";
}
on (release) {
Hire();
}
Symbol 1250 Button
on (rollOver) {
_root.globitotexto = "Fire Selected Henchman";
}
on (rollOut) {
_root.globitotexto = "";
}
on (release) {
Fire();
}
Symbol 1264 Button
on (release) {
Help(_root.TUTORIAL_HENCHMEN, "henchmen");
}
Symbol 1269 Button
on (release) {
Help(_root.TUTORIAL_PROSTITUTES, "prostitutes");
}
Symbol 1270 Button
on (release) {
if (_root.getProstObj(Selected) != undefined) {
ACTOR.SmackUp();
_root.SmackBitchUp(Selected);
Refresh();
} else {
NewPopUp("Oops!", "No Prostitute Selected.", _root.GIRL_ICON);
}
}
Symbol 1271 Button
on (release) {
if (_root.getProstObj(Selected) != undefined) {
if (_root.purchase(PlayerObj, 500, "Boob Job")) {
_root.BoobJob(Selected);
Refresh();
}
} else {
NewPopUp("Oops!", "No Prostitute Selected.", _root.GIRL_ICON);
}
}
Symbol 1272 Button
on (release) {
if (_root.getProstObj(Selected) != undefined) {
if (_root.purchase(PlayerObj, 500, "Plastic Surgery")) {
_root.PlasticSurgery(Selected);
Refresh();
}
} else {
NewPopUp("Oops!", "No Prostitute Selected.", _root.GIRL_ICON);
}
}
Symbol 1283 Button
on (rollOver) {
_root.globitotexto = "Previous Location";
}
on (rollOut) {
_root.globitotexto = "";
}
on (release) {
locationID--;
Refresh();
}
Symbol 1294 Button
on (release) {
Hire();
}
Symbol 1298 Button
on (release) {
gotoAndPlay(_lastframe);
}
Symbol 1333 MovieClip Frame 2
this.Speech.gotoAndStop(icon);
Symbol 1333 MovieClip Frame 37
stop();
Symbol 1334 MovieClip Frame 2
A1.setup(_root.PlayerData[_root.CURRENT_PLAYER].Costume);
A2.setup(_root.PROSTITUTE_COSTUME);
Symbol 1334 MovieClip Frame 3
if (Math.random() < 0.01) {
OTHER.play();
}
Symbol 1334 MovieClip Frame 12
gotoAndPlay ("idle");
Symbol 1334 MovieClip Frame 13
trace(_parent.Outcome);
_parent.ACTION_VALID = false;
if (_parent.Outcome) {
SpeechBubble.icon = _root.ACCEPTED_ICON;
} else {
SpeechBubble.icon = _root.REJECTED_ICON;
}
trace(SpeechBubble.icon);
Symbol 1334 MovieClip Frame 24
_parent.Refresh();
Symbol 1334 MovieClip Frame 49
_parent.ACTION_VALID = true;
gotoAndPlay ("idle");
Symbol 1335 Button
on (release) {
Help(_root.TUTORIAL_PROSTITUTES, "pickup");
}
Symbol 1338 Button
on (release) {
Action(0);
}
on (rollOver) {
_root.globitotexto = ("Risk : " + Math.ceil(Risk[0])) + "%";
}
on (rollOut) {
_root.globitotexto = "";
}
Symbol 1339 Button
on (release) {
Action(2);
}
on (rollOver) {
_root.globitotexto = ("Risk : " + Math.ceil(Risk[2])) + "%";
}
on (rollOut) {
_root.globitotexto = "";
}
Symbol 1340 Button
on (release) {
Action(4);
}
on (rollOver) {
_root.globitotexto = ("Risk : " + Math.ceil(Risk[4])) + "%";
}
on (rollOut) {
_root.globitotexto = "";
}
Symbol 1341 Button
on (release) {
Action(1);
}
on (rollOver) {
_root.globitotexto = ("Risk : " + Math.ceil(Risk[1])) + "%";
}
on (rollOut) {
_root.globitotexto = "";
}
Symbol 1342 Button
on (release) {
Action(3);
}
on (rollOver) {
_root.globitotexto = ("Risk : " + Math.ceil(Risk[3])) + "%";
}
on (rollOut) {
_root.globitotexto = "";
}
Symbol 1343 Button
on (release) {
TakeHome();
}
on (rollOver) {
_root.globitotexto = "Get Love Meter High!";
}
on (rollOut) {
_root.globitotexto = "";
}
Symbol 1408 Button
on (release) {
Fight();
}
on (rollOver) {
_root.globitotexto = "Risk : " + PRisk[2];
}
on (rollOut) {
_root.globitotexto = "";
}
Symbol 1412 Button
on (press) {
if (_parent.CurrentItem ne _name) {
eval ("_parent." add _parent.CurrentItem).Deselect();
_parent.CurrentItem = _name;
Select();
}
_parent.bWasClick = true;
_parent.PrevClick = getTimer();
}
Symbol 1414 Button
on (press) {
_parent.bWasClick = true;
_parent.PrevClick = getTimer();
}
Symbol 1416 MovieClip Frame 1
function Select() {
gotoAndStop (2);
}
function Deselect() {
gotoAndStop (1);
}
stop();
Symbol 1416 MovieClip Frame 2
_parent.HandleChangeItem();
stop();
Symbol 1418 Button
on (press) {
_parent.PlacePressed();
}
Symbol 1419 MovieClip Frame 1
stop();
Symbol 1419 MovieClip Frame 2
stop();
Symbol 1421 Button
on (press) {
startDrag (_parent.Scroller, false, 0, _parent.TopScrollerY, 0, _parent.BottomScrollerY);
_parent.DoPlay(0);
}
on (release, releaseOutside) {
stopDrag();
_parent.Dragging = false;
}
Symbol 1422 MovieClip Frame 1
stop();
Symbol 1422 MovieClip Frame 2
stop();
Symbol 1426 Button
on (release, releaseOutside) {
_parent.ButtonHold = false;
}
on (press) {
_parent.DoPlay(ScrollBy);
}
Symbol 1431 Button
on (release, releaseOutside) {
_parent.ButtonHold = false;
}
on (press) {
_parent.DoPlay(ScrollBy);
}
Symbol 1432 MovieClip Frame 1
stop();
Symbol 1432 MovieClip Frame 2
stop();
Symbol 1433 MovieClip Frame 1
function Init() {
ScrollerHeight = Scroller._height;
TopScrollerY = Up._y + Up._height;
BottomScrollerY = Down._y - ScrollerHeight;
ScrollerDelta = BottomScrollerY - TopScrollerY;
ScrollBy = 1;
Up.ScrollBy = ScrollBy;
Down.ScrollBy = -ScrollBy;
SetScrollStep();
}
function SetScrollStep() {
if (_parent.ItemsCount <= _parent.VisibleCount) {
ShowControls(2);
ScrollByItem = 0;
} else {
ShowControls(1);
ScrollByItem = ScrollerDelta / (_parent.ItemsCount - _parent.VisibleCount);
}
PosRace();
}
function PosRace() {
Scroller._y = TopScrollerY - (ScrollByItem * _parent.ScrollPos);
}
function ShowControls(nFrame) {
if (nFrame == 1) {
Up.gotoAndStop(nFrame);
Down.gotoAndStop(nFrame);
Scroller.gotoAndStop(nFrame);
DragPlace.gotoAndStop(nFrame);
Up._visible = true;
Down._visible = true;
Scroller._visible = true;
DragPlace._visible = true;
} else {
Up._visible = false;
Down._visible = false;
Scroller._visible = false;
DragPlace._visible = false;
}
}
function DoScroll() {
_parent.ScrollByButton();
}
function ListToScroller() {
_parent.ScrollPos = -Math.round((Scroller._y - TopScrollerY) / ScrollByItem);
_parent.ScrollToScrollPos();
}
function DoStep() {
if (ButtonHold) {
if (_currentframe == 2) {
DoScroll();
}
} else if (Dragging) {
ListToScroller();
} else {
ToScroll = 0;
stop();
}
}
function DoPlay(ScrollBy) {
if (ScrollBy == 0) {
Dragging = true;
} else {
ToScroll = ScrollBy;
ButtonHold = true;
}
gotoAndPlay (2);
}
function PlacePressed() {
var _local1 = _ymouse - (Scroller._height / 2);
if (_local1 > BottomScrollerY) {
_local1 = BottomScrollerY;
} else if (_local1 < TopScrollerY) {
_local1 = TopScrollerY;
}
Scroller._y = _local1;
ListToScroller();
}
stop();
Symbol 1433 MovieClip Frame 2
DoStep();
Symbol 1433 MovieClip Frame 3
DoStep();
gotoAndPlay (2);
Symbol 1434 MovieClip Frame 1
function Init() {
trace(BigOffset);
ItemOrigin._visible = false;
ItemsCount = 0;
DupLevel = 0;
TopOffset = 3;
LeftOffset = 0;
HeightSpacing = 1;
ItemHeight = ItemOrigin._height;
CurrentItem = "";
CurrentItemIDD = 0;
CurrIndex = -1;
MaxItemY = (_height - TopOffset) - (ItemHeight * BigOffset);
HeightStep = ItemHeight + HeightSpacing;
ScrollPos = 0;
VisibleCount = Math.floor((_height - (2 * TopOffset)) / HeightStep) - BigOffset;
call("ScrollBar.Init");
ScrollBar.Init();
bWasClick = false;
trace(VisibleCount);
}
function AddItem(NewCapt) {
var _local1 = "LBItem_" + ItemsCount;
duplicateMovieClip ("ItemOrigin", _local1, ++DupLevel);
Set(_local1 + ".Caption", NewCapt);
Set(_local1 + ".Index", ItemsCount);
setProperty(_local1, _x , LeftOffset);
var _local2 = TopOffset + ((ItemsCount++) * HeightStep);
setProperty(_local1, _y , _local2);
setProperty(_local1, _visible , _local2 <= MaxItemY);
call(_local1 + ".Init");
ScrollBar.SetScrollStep();
}
function SelectItem(ToSelect) {
if ((ToSelect >= 0) && (ToSelect < ItemsCount)) {
if (CurrentItem ne "") {
eval (CurrentItem).Deselect();
}
CurrentItem = "LBItem_" + ToSelect;
if ((ItemsCount - ToSelect) < VisibleCount) {
ToSelect = ItemsCount - 1;
}
eval (CurrentItem).Select();
if ((!eval (CurrentItem)._visible) || ((ToSelect >= VisibleCount) && (eval ("LBItem_" + (ItemsCount - 1))._visible))) {
ScrollPos = (VisibleCount - ToSelect) - 1;
} else if (ItemsCount <= VisibleCount) {
ScrollPos = 0;
}
ScrollToScrollPos();
}
ScrollBar.PosRace();
}
function ScrollToScrollPos() {
var _local3;
var _local2 = TopOffset + (ScrollPos * HeightStep);
var _local1 = 0;
while (_local1 < ItemsCount) {
_local3 = "LBItem_" + _local1;
setProperty(_local3, _y , _local2);
setProperty(_local3, _visible , !((_local2 < TopOffset) || (_local2 > MaxItemY)));
_local2 = _local2 + HeightStep;
_local1++;
}
}
function ScrollByButton() {
if (ScrollBar.ToScroll > 0) {
if (LBItem_0._visible) {
ScrollSteps = 0;
} else {
ScrollSteps = 1;
}
} else if (eval ("LBItem_" + (ItemsCount - 1))._visible) {
ScrollSteps = 0;
} else {
ScrollSteps = -1;
}
if (ScrollSteps != 0) {
ScrollPos = ScrollPos + ScrollSteps;
ScrollToScrollPos();
}
ScrollBar.PosRace();
}
function HandleChangeItem() {
a = "LBItem_";
trace(this._name);
_parent.ItemChange(CurrentItem.substr(a.length), this._name);
}
function UpdateItem(NewItemTxt) {
Set(CurrentItem + ".Caption", NewItemTxt);
}
function DeleteItem(i) {
SelectItem(i);
DeleteItem();
}
function ClearAll() {
while (ItemsCount > 0) {
DeleteItem(0);
}
}
function DeleteItem() {
if (eval (CurrentItem)._name ne "") {
var fi = eval (CurrentItem).Index;
var NewY;
var CurrName;
removeMovieClip(CurrentItem);
var i = (fi + 1);
while (i < ItemsCount) {
CurrName = "LBItem_" + i;
eval (CurrName).Index--;
NewY = eval (CurrName)._y - HeightStep;
eval (CurrName)._visible = NewY <= MaxItemY;
eval (CurrName)._y = NewY;
eval (CurrName)._name = "LBItem_" + (i - 1);
i++;
}
ItemsCount--;
ScrollBar.SetScrollStep();
SelectItem(((fi == ItemsCount) ? (fi - 1) : (fi)));
}
}
function Add(strAdd, bAfter) {
if (((ItemsCount == 0) || (eval (CurrentItem)._name eq "")) || ((eval (CurrentItem).Index == (ItemsCount - 1)) && (bBefore))) {
AddItem(strAdd);
SelectItem(ItemsCount - 1);
} else {
eval (CurrentItem).Deselect();
var fi = (eval (CurrentItem).index + (bAfter ? 1 : 0));
var i = (ItemsCount - 1);
while (i >= fi) {
CurrName = "LBItem_" + i;
eval (CurrName).Index++;
eval (CurrName)._name = "LBItem_" + (i + 1);
i--;
}
var CurrName = ("LBItem_" + fi);
duplicateMovieClip ("ItemOrigin", CurrName, ++DupLevel);
Set(CurrName + ".Caption", strAdd);
Set(CurrName + ".Index", fi);
setProperty(CurrName, _x , LeftOffset);
call(CurrName + ".Init");
ItemsCount++;
ScrollBar.SetScrollStep();
SelectItem(fi);
}
}
stop();
Symbol 1435 Button
on (release) {
Left();
}
Symbol 1436 Button
on (release) {
Right();
}
Symbol 1441 Button
on (release, releaseOutside) {
_parent.ButtonHold = false;
}
on (press) {
_parent.DoPlay(ScrollBy);
}
Symbol 1444 Button
on (release) {
_parent.DS.Up();
}
Symbol 1445 MovieClip Frame 1
stop();
Symbol 1447 Button
on (press) {
startDrag (_parent.Scroller, false, _parent.ScrollerX, _parent.TopScrollerY, _parent.ScrollerX, _parent.BottomScrollerY);
_parent.Dragging = true;
}
on (release, releaseOutside) {
stopDrag();
_parent.Dragging = false;
_parent.ScrollChange();
}
Symbol 1448 MovieClip Frame 1
stop();
Instance of Symbol 1442 MovieClip "Down" in Symbol 1451 MovieClip Frame 1
on (release) {
_parent.DS.Down();
}
Symbol 1455 MovieClip Frame 1
function Help(id, lf) {
HELP_ID = id;
_lastframe = lf;
gotoAndPlay ("help");
}
function HenchmenHire(l) {
locationID = l;
gotoAndPlay ("hirehench");
}
function HenchmenFire(hInd) {
_root.FireHenchmen(hInd);
}
function HenchmenView(HO, PO) {
HVIEW._visible = true;
HVIEW.HInd = HO;
HVIEW.Costume = PO.Costume;
HVIEW.gotoAndPlay("init");
}
function CloseHenchmen() {
HVIEW._visible = false;
HVIEW.stop();
HVIEW.HInd = 0;
HVIEW.HObj = 0;
HVIEW.Costume = 0;
}
HVIEW._visible = false;
HVIEW.stop();
Symbol 1455 MovieClip Frame 6
gotoAndPlay(gotoType);
Symbol 1455 MovieClip Frame 7
stop();
Symbol 1455 MovieClip Frame 8
graph.Dat = PlayerObj.Finance.CASHGRAPH;
graph.gotoAndPlay("draw");
values.text = "";
var i = 0;
while (i < 8) {
values.text = values.text + (("$" + PlayerObj.Finance.CRecord[i]) + newline);
i++;
}
total.text = "$" + PlayerObj.Finance.CCASH;
stop();
Symbol 1455 MovieClip Frame 13
title.text = _root.Env.Objective.Name;
OMC.gotoAndStop(_root.Env.Objective.Description);
stop();
Symbol 1455 MovieClip Frame 17
function change(evt) {
_show.gotoAndStop(evt.target.selectedItem.data + 1);
}
var i = 0;
while (i < _root.TUTORIAL_LIST.length) {
cmpList.addItem({label:_root.TUTORIAL_NAMES[i], data:i});
i++;
}
cmpList.addEventListener("change", this);
_show.gotoAndStop(HELP_ID);
stop();
Instance of Symbol 477 MovieClip [List] "cmpList" in Symbol 1455 MovieClip Frame 17
//component parameters
onClipEvent (construct) {
multipleSelection = false;
rowHeight = 20;
}
Symbol 1455 MovieClip Frame 22
function ClickTab(i) {
var _local1 = Number(i);
cmpActions.selectedIndex = _local1;
TabMC.gotoAndStop(_local1 + 1);
}
cmpActions.headerheight = 44;
cmpActions.fontSize = 18;
tab0._visible = false;
tab1._visible = false;
tab2._visible = false;
var i = 0;
while (i < ActionsList.length) {
var Action = ActionsList[i];
var ActionObj = cmpActions.createSegment(Action.link, Action.link, Action.title);
ActionObj.PlayerObj = this.PlayerObj;
ActionObj.LocObj = this.LocObj;
this["tab" + i].action = Action.title;
this["tab" + i]._visible = true;
i++;
}
ClickTab(0);
stop();
Instance of Symbol 671 MovieClip [Accordion] "cmpActions" in Symbol 1455 MovieClip Frame 22
//component parameters
onClipEvent (construct) {
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Symbol 1455 MovieClip Frame 27
gotoAndPlay ("type1");
Symbol 1455 MovieClip Frame 28
if (LocObj.Protected > 0) {
_lastframe = "type2";
if (LocObj.Protected == _root.CURRENT_PLAYER) {
gotoAndPlay ("type2protection");
} else {
gotoAndPlay ("assetprotected");
}
}
if (LocObj.Prostitutes <= 0) {
PICKUP._visible = false;
numpro.text = "There are no Girls at this bar at this time.";
} else {
PICKUP._visible = true;
numpro.text = ("There is " + LocObj.Prostitutes) + " possible prostitute(s) at this bar";
}
stop();
Symbol 1455 MovieClip Frame 35
gotoAndPlay ("type2");
Symbol 1455 MovieClip Frame 36
if (LocObj.Protected > 0) {
if (LocObj.Protected == _root.CURRENT_PLAYER) {
gotoAndPlay ("assetprotection");
} else {
gotoAndPlay ("assetprotected");
}
}
stop();
Symbol 1455 MovieClip Frame 40
function RefreshHenchmen() {
var _local2 = _root.getHObj(HSelected);
trace("HSelected : " + HSelected);
trace("HObj : " + _local2);
if (_local2 != undefined) {
name.text = _local2.name;
setBar(HPBAR, _local2.hp, _root.HENCHMEN_HPMAX);
setBar(ATKBAR, _local2.atk, _root.HENCHMEN_ATKMAX);
setBar(ROBBAR, _local2.rob, _root.HENCHMEN_ROBMAX);
setBar(POWBAR, _local2.pow, _root.HENCHMEN_POWMAX);
}
}
function setBar(Bar, val, max) {
Bar._xscale = (val / max) * 100;
}
if (LocObj.Revenue > 0) {
revenue.text = ("$" + Math.round(LocObj.Revenue)) + "/day";
} else {
revenue.text = "";
}
locname.text = LocObj.Name;
PlayChange = function (obj, id) {
HSelected = obj.getProperty("index");
PSelected = obj.getProperty("index");
RefreshHenchmen();
};
LocChange = function (obj, id) {
HSelected = obj.getProperty("index");
LSelected = obj.getProperty("index");
RefreshHenchmen();
};
ToPlayer = function (obj, index) {
trace("ToPlayer");
hObj = _root.getHObj(obj.getProperty("index"));
if (hObj != undefined) {
_root.MoveHenchmen(hObj, PlayerObj, 0);
}
gotoAndPlay ("assetloop");
};
ToLocation = function (obj, index) {
trace("ToLocation");
trace(_root.debugVar(obj));
trace(index);
hObj = _root.getHObj(obj.getProperty("index"));
trace(_root.debugVar(hObj));
if (hObj != undefined) {
_root.MoveHenchmen(hObj, PlayerObj, LocObj.Num);
}
gotoAndPlay ("assetloop");
};
cmpPlayItems.setDropCallback(("_root." + this._name) + ".ToPlayer");
cmpLocItems.setDropCallback(("_root." + this._name) + ".ToLocation");
cmpPlayItems.setClickCallback(("_root." + this._name) + ".PlayChange");
cmpLocItems.setClickCallback(("_root." + this._name) + ".LocChange");
Refresh = function () {
l = 0;
while (cmpPlayItems.getElementsTotal() > 0) {
cmpPlayItems.removeElement(0);
}
while (cmpLocItems.getElementsTotal() > 0) {
cmpLocItems.removeElement(0);
}
cmpPlayItems.setDropCallback(("_root." + this._name) + ".ToPlayer");
cmpLocItems.setDropCallback(("_root." + this._name) + ".ToLocation");
var _local5 = _root.GetHenchmenNum(l, _root.CURRENT_PLAYER);
var _local4 = 0;
while (_local4 < _local5) {
var _local3 = _root.getHObj2(_local4, _root.CURRENT_PLAYER, l);
id = cmpPlayItems.addElementCustom(_local3.name, "verdana", "0x666666", "0xF5F5F5", "0xE1E1E1", "0x999999", "pIcon1", "dragSymbol1");
cmpPlayItems.setObjectName(id, "HenchmenData" + _local3.index);
cmpPlayItems.setProperty(id, "index", _local3.index);
_local4++;
}
l = LocObj.Num;
_local5 = _root.GetHenchmenNum(l, _root.CURRENT_PLAYER);
_local4 = 0;
while (_local4 < _local5) {
var _local3 = _root.getHObj2(_local4, _root.CURRENT_PLAYER, l);
id = cmpLocItems.addElementCustom(_local3.name, "verdana", "0x666666", "0xF5F5F5", "0xE1E1E1", "0x999999", "pIcon1", "dragSymbol1");
cmpLocItems.setObjectName(id, "HenchmenData" + _local3.index);
cmpLocItems.setProperty(id, "index", _local3.index);
_local4++;
}
_root.UpdateInterface();
};
Refresh();
stop();
stop();
Instance of Symbol 666 MovieClip [BJCDnD] "cmpPlayItems" in Symbol 1455 MovieClip Frame 40
//component parameters
onClipEvent (construct) {
title = "Player";
eMode = "Both";
etMode = "Move";
speed = 80;
showTopBottom = true;
topBarHeight = 20;
bottomBarHeight = 20;
elementHeight = 16;
elementPadding = 0;
elementCCallback = "PlayChange";
elementDCallback = "ToPlayer";
elementSymbol = "BJCDnDButton";
defIcon = "defaultIcon";
defDragIcon = "dragSymbol2";
defArrowIcon = "arrowButton";
rolloverAvail = "On";
grAlpha = 30;
grColor = 0;
bgColor = 16119285 /* 0xF5F5F5 */;
uColor = 3394815 /* 0x33CCFF */;
dColor = 113400 /* 0x01BAF8 */;
bBorder = 16777215 /* 0xFFFFFF */;
dBorder = 13421772 /* 0xCCCCCC */;
titleColor = 6710886 /* 0x666666 */;
etColor = 6710886 /* 0x666666 */;
selColor = 5592405 /* 0x555555 */;
selTxtColor = 16777215 /* 0xFFFFFF */;
titleFont = "Verdana";
etFont = "Verdana";
}
Instance of Symbol 666 MovieClip [BJCDnD] "cmpLocItems" in Symbol 1455 MovieClip Frame 40
//component parameters
onClipEvent (construct) {
title = "Location";
eMode = "Both";
etMode = "Move";
speed = 80;
showTopBottom = true;
topBarHeight = 20;
bottomBarHeight = 20;
elementHeight = 16;
elementPadding = 0;
elementCCallback = "LocChange";
elementDCallback = "ToLocation";
elementSymbol = "BJCDnDButton";
defIcon = "defaultIcon";
defDragIcon = "dragSymbol2";
defArrowIcon = "arrowButton";
rolloverAvail = "On";
grAlpha = 30;
grColor = 0;
bgColor = 16119285 /* 0xF5F5F5 */;
uColor = 3394815 /* 0x33CCFF */;
dColor = 113400 /* 0x01BAF8 */;
bBorder = 16777215 /* 0xFFFFFF */;
dBorder = 13421772 /* 0xCCCCCC */;
titleColor = 6710886 /* 0x666666 */;
etColor = 6710886 /* 0x666666 */;
selColor = 5592405 /* 0x555555 */;
selTxtColor = 16777215 /* 0xFFFFFF */;
titleFont = "Verdana";
etFont = "Verdana";
}
Symbol 1455 MovieClip Frame 43
gotoAndPlay ("assetprotection");
Symbol 1455 MovieClip Frame 44
stop();
Symbol 1455 MovieClip Frame 47
gotoAndPlay ("type3");
Symbol 1455 MovieClip Frame 48
stop();
Symbol 1455 MovieClip Frame 51
gotoAndPlay ("type4");
Symbol 1455 MovieClip Frame 52
PlayerObj = _root.PlayerData[_root.CURRENT_PLAYER];
_lastframe = "type10";
stop();
Symbol 1455 MovieClip Frame 58
function switchColor(c) {
if (SWATCH_SELECT == 1) {
hc = c;
} else if (SWATCH_SELECT == 2) {
gc = c;
} else if (SWATCH_SELECT == 3) {
bc = c;
} else if (SWATCH_SELECT == 4) {
dc = c;
}
Refresh();
}
function Refresh() {
if (h > _root.MAX_HATS) {
h = 1;
}
if (h < 1) {
h = _root.MAX_HATS;
}
if (b > _root.MAX_BODY) {
b = 1;
}
if (b < 1) {
b = _root.MAX_BODY;
}
if (d > _root.MAX_BEARD) {
d = 1;
}
if (d < 1) {
d = _root.MAX_BEARD;
}
if (g > _root.MAX_GLASSES) {
g = 1;
}
if (g < 1) {
g = _root.MAX_GLASSES;
}
NewCostume = {Hat:h, Glasses:g, Body:b, Beard:d, Gun:Costume.Gun, HatColor:hc, BodyColor:bc, BeardColor:dc, GlassesColor:gc};
cost = 0;
if (h != Costume.Hat) {
cost = cost + _root.HENCHMEN_HAT_COST;
}
if (b != Costume.Body) {
cost = cost + _root.HENCHMEN_BODY_COST;
}
if (d != Costume.Beard) {
cost = cost + _root.HENCHMEN_BEARD_COST;
}
if (g != Costume.Glasses) {
cost = cost + _root.HENCHMEN_GLASSES_COST;
}
costtxt.text = "$" + cost;
ACTOR.setup(NewCostume);
SWATCH.gotoAndStop(SWATCH_SELECT);
}
stop();
Costume = new Object();
trace(PlayerObj);
trace(PlayerObj.Costume);
for (i in PlayerObj.Costume) {
Costume[i] = PlayerObj.Costume[i];
trace((i + "->") + Costume[i]);
}
h = Costume.Hat;
g = Costume.Glasses;
b = Costume.Body;
d = Costume.Beard;
hc = Costume.HatColor;
gc = Costume.GlassesColor;
bc = Costume.BodyColor;
dc = Costume.BeardColor;
SWATCH_SELECT = 1;
Refresh();
Symbol 1455 MovieClip Frame 64
gotoAndPlay ("type10");
Symbol 1455 MovieClip Frame 65
function Refresh() {
var _local2 = _root.UPGRADE_LIST[CURRENT_UPGRADE];
ITEM.text = _local2.Name;
DESC.text = _local2.Description;
COST.text = "$" + _local2.Cost;
ICON.gotoAndStop(CURRENT_UPGRADE + 1);
details.text = "";
for (a in _local2) {
if ((((a != "Name") && (a != "Description")) && (a != "Cost")) && (a != "Slot")) {
details.text = details.text + (((a + " : +") + _local2[a]) + newline);
}
}
if (PlayerObj.Upgrades[UpgradeObj.Slot].ID == CURRENT_UPGRADE) {
PURCHASED_FLAG = true;
Purchased._visible = true;
BuyButton._visible = false;
} else {
PURCHASED_FLAG = false;
Purchased._visible = false;
BuyButton._visible = true;
}
}
function Next() {
CURRENT_UPGRADE++;
if (CURRENT_UPGRADE > UPGRADE_MAX) {
CURRENT_UPGRADE = UPGRADE_MIN;
}
Refresh();
}
function Back() {
CURRENT_UPGRADE--;
if (CURRENT_UPGRADE < UPGRADE_MIN) {
CURRENT_UPGRADE = UPGRADE_MAX;
}
Refresh();
}
function Buy() {
if (!PURCHASED_FLAG) {
PlayerObj = _root.PlayerData[_root.CURRENT_PLAYER];
UpgradeObj = _root.UPGRADE_LIST[CURRENT_UPGRADE];
if (_root.purchase(PlayerObj, UpgradeObj.Cost, "this " + UpgradeObj.Name)) {
_root.AddUpgrade(_root.CURRENT_PLAYER, CURRENT_UPGRADE);
_root.NewPopUp("Bought", UpgradeObj.Name + " purchased.", _root.MONEY_ICON);
_root.OnPopUpClosed();
}
} else {
NewPopUp("Already Purchased", "You've already bought this item.", _root.MONEY_ICON);
}
}
CURRENT_UPGRADE = UPGRADE_MIN;
Refresh();
stop();
Symbol 1455 MovieClip Frame 73
Event = new Array();
Risk = new Array();
Rew = new Array();
LocObj = _root.LocationData[LocNum];
PlayerObj = _root.PlayerData[_root.CURRENT_PLAYER];
Event[1] = _root.BRIBE_EVENT;
Event[1].setPlayer(PlayerObj);
stop();
Symbol 1455 MovieClip Frame 82
gotoAndPlay ("type5");
Symbol 1455 MovieClip Frame 83
function Drug_Refresh() {
trace("Current Drug : " + CURRENT_DRUG);
cDrug.text = _root.DRUG_NAMES[CURRENT_DRUG];
drugHistory = _root.Env.DrugValue[CURRENT_DRUG];
mPrice.text = "$" + drugHistory[drugHistory.length - 1];
pPrice.text = "$" + PlayerObj.Drug_Value[CURRENT_DRUG];
pStock.text = PlayerObj.Drug_Stock[CURRENT_DRUG];
if (drugHistory[drugHistory.length - 1] > PlayerObj.Drug_Value[CURRENT_DRUG]) {
UpOrDown.gotoAndStop(2);
} else {
UpOrDown.gotoAndStop(1);
}
if (drugHistory.length > 1) {
lmPrice.text = "$" + drugHistory[drugHistory.length - 2];
} else {
lmPrice.text = "---";
}
graph.Dat = drugHistory;
graph.gotoAndPlay("draw");
}
function SellDrug() {
_lastframe = "type6";
gotoAndPlay ("SellDrug");
}
function BuyDrug() {
_lastframe = "type6";
gotoAndPlay ("BuyDrug");
}
function change(evt) {
CURRENT_DRUG = evt.target.selectedItem.data;
Drug_Refresh();
}
PlayerObj = _root.PlayerData[_root.CURRENT_PLAYER];
cmpDrug.addEventListener("change", this);
Map = new Array();
if (LocObj.PScale == 1) {
CURRENT_DRUG = _root.WEED_INDEX;
var mv = _root.Env.DrugValue[_root.WEED_INDEX];
cmpDrug.addItem({label:"Weed", data:_root.WEED_INDEX});
mv = _root.Env.DrugValue[_root.HASH_INDEX];
cmpDrug.addItem({label:"Hash", data:_root.HASH_INDEX});
mv = _root.Env.DrugValue[_root.EX_INDEX];
cmpDrug.addItem({label:"Ex", data:_root.EX_INDEX});
}
if (LocObj.PScale == 2) {
CURRENT_DRUG = _root.ACID_INDEX;
mv = _root.Env.DrugValue[_root.ACID_INDEX];
cmpDrug.addItem({label:"Acid", data:_root.ACID_INDEX});
mv = _root.Env.DrugValue[_root.ROOPH_INDEX];
cmpDrug.addItem({label:"Rooph", data:_root.ROOPH_INDEX});
mv = _root.Env.DrugValue[_root.OPIUM_INDEX];
cmpDrug.addItem({label:"Opium", data:_root.OPIUM_INDEX});
}
if (LocObj.PScale == 3) {
CURRENT_DRUG = _root.COCAINE_INDEX;
cmpDrug.addItem({label:"Cocaine", data:_root.COCAINE_INDEX});
cmpDrug.addItem({label:"Heroin", data:_root.HEROIN_INDEX});
}
Drug_Refresh();
stop();
Instance of Symbol 477 MovieClip [List] "cmpDrug" in Symbol 1455 MovieClip Frame 83
//component parameters
onClipEvent (construct) {
multipleSelection = false;
rowHeight = 20;
}
Symbol 1455 MovieClip Frame 90
function change(evt) {
Refresh_Profit();
}
function Refresh_Profit() {
cDrug.text = _root.DRUG_NAMES[CURRENT_DRUG];
var _local4 = drugHistory[drugHistory.length - 1];
var _local8 = Math.floor(PlayerObj.Cash / _local4);
var _local2 = Number(cmpDrug.value);
_local2 = Math.min(_local8, _local2);
var _local7 = PlayerObj.Drug_Value[CURRENT_DRUG];
var _local3 = PlayerObj.Drug_Stock[CURRENT_DRUG];
var _local6 = _local4 * _local2;
cmpDrug.maximum = _local8;
cmpDrug.minimum = 1;
cmpDrug.stepSize = 10;
cmpDrug.fontSize = 24;
buyAt.text = "$" + _local4;
buyAmt.text = _local2;
cValue.text = "$" + _local7;
Cost.text = "$" + _local6;
var _local5 = _local6 + (_local7 * _local3);
trace("tcost : " + _local6);
trace("playervalue : " + _local7);
trace("playerstock : " + _local3);
_local5 = _local5 / (_local2 + _local3);
if ((_local2 + _local3) == 0) {
_local5 = 0;
}
newValue.text = "$" + _local5;
Event = _root.BUYDRUG_EVENT;
Event.setDrug(CURRENT_DRUG);
Event.setAmount(_local2, _local4);
Event.setPlayer(PlayerObj);
Risk = Event.CalcRisk(_root.Env.PoRisk, PlayerObj.Power);
PRisk = (Math.round(Risk * 10) / 10) + "%";
}
function Buy() {
if (PlayerObj.Cash < (drugHistory[drugHistory.length - 1] * Number(amount.text))) {
_root.NewPopUp("Not Enough Cash", "You Don't have enough money to buy this order of drugs", _root.MONEY_ICON);
} else if (((drugHistory[drugHistory.length - 1] * Number(amount.text)) == Number.NaN) || (Number(amount.text) == 0)) {
_root.NewPopUp("Not an amount", "You didn't order any drugs. Click Cancel if you don't wish to purchase.", _root.DRUG_ICON);
} else {
_root.DoJob(Event);
}
}
cmpDrug.addEventListener("change", this);
amount.text = 0;
Refresh_Profit();
stop();
Instance of Symbol 604 MovieClip [NumericStepper] "cmpDrug" in Symbol 1455 MovieClip Frame 90
//component parameters
onClipEvent (construct) {
maximum = 10;
minimum = 0;
stepSize = 1;
value = 0;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Symbol 1455 MovieClip Frame 95
function change(evt) {
Refresh_Profit();
}
function Refresh_Profit() {
cDrug.text = _root.DRUG_NAMES[CURRENT_DRUG];
var _local3 = drugHistory[drugHistory.length - 1];
var _local2 = Number(cmpDrug.value);
var _local5 = PlayerObj.Drug_Value[CURRENT_DRUG];
var _local6 = PlayerObj.Drug_Stock[CURRENT_DRUG];
var _local4 = _local3 * _local2;
var _local7 = _local5 * _local2;
var _local8 = _local4 - _local7;
cmpDrug.maximum = _local6;
cmpDrug.minimum = 1;
cmpDrug.stepSize = 10;
cmpDrug.fontSize = 24;
buyAt.text = "$" + _local3;
buyAmt.text = _local2;
cValue.text = "$" + _local5;
Profit.text = "$" + _local8;
Revenue.text = "$" + _local4;
Event = _root.SELLDRUG_EVENT;
Event.setDrug(CURRENT_DRUG);
Event.setAmount(_local2, _local3);
Event.setPlayer(PlayerObj);
Risk = Event.CalcRisk(_root.Env.PoRisk, PlayerObj.Power);
PRisk = (Math.round(Risk * 10) / 10) + "%";
}
function Sell() {
_root.DoJob(Event);
}
cmpDrug.addEventListener("change", this);
amount.text = 0;
Refresh_Profit();
stop();
Instance of Symbol 604 MovieClip [NumericStepper] "cmpDrug" in Symbol 1455 MovieClip Frame 95
//component parameters
onClipEvent (construct) {
maximum = 10;
minimum = 0;
stepSize = 1;
value = 0;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Symbol 1455 MovieClip Frame 100
gotoAndPlay ("type6");
Symbol 1455 MovieClip Frame 101
stop();
Symbol 1455 MovieClip Frame 106
Event = new Array();
Risk = new Array();
Rew = new Array();
PRisk = new Array();
DemandRefresh(2);
stop();
Symbol 1455 MovieClip Frame 111
gotoAndPlay ("type7");
Symbol 1455 MovieClip Frame 112
stop();
Symbol 1455 MovieClip Frame 120
gotoAndPlay ("type8");
Symbol 1455 MovieClip Frame 121
if (_root.PlayerHQs[_root.CURRENT_PLAYER] != LocObj.Num) {
gotoAndPlay ("type9opponent");
}
_lastframe = "type9";
PlayerObj = _root.PlayerData[_root.CURRENT_PLAYER];
GANG_LOGO.gotoAndStop(PlayerObj.Icon);
gangname.text = PlayerObj.Name;
standing.text = _root.getStanding(PlayerObj);
stop();
Symbol 1455 MovieClip Frame 126
_lastframe = "type9opponent";
trace(LocObj.Num);
var i = 1;
while (i < _root.PlayerHQs.length) {
if (_root.PlayerHQs[i] == LocObj.Num) {
LOCATION_PLAYER = i;
}
i++;
}
trace(LOCATION_PLAYER);
OppPlayerObj = _root.PlayerData[LOCATION_PLAYER];
GANG_LOGO.gotoAndStop(OppPlayerObj.Icon);
gangname.text = OppPlayerObj.Name;
standing.text = _root.getStanding(OppPlayerObj);
stop();
Symbol 1455 MovieClip Frame 131
function change(evt) {
Selected = evt.target.selectedItem.index;
}
function Refresh() {
ACTOR.setup(PlayerObj.Costume);
ACTOR.INITIAL_COSTUME = PlayerObj.Costume;
ttl = 0;
ttlg = 0;
cmpHenchmen.removeAll();
Map = new Array();
k = 0;
while (k < AssetList.length) {
l = AssetList[k];
MapIndex = 0;
var _local4 = _root.GetHenchmenNum(l, _root.CURRENT_PLAYER);
var _local3 = 0;
while (_local3 < _local4) {
var _local2 = _root.getHObj2(_local3, _root.CURRENT_PLAYER, l);
var _local5 = {Name:_local2.name, Location:_root.LocationData[_local2.loc].Name, HP:_local2.hp, ATK:_local2.atk, POW:_local2.pow, ROB:_local2.rob, Wage:_local2.wage, Index:_local2.index};
cmpHenchmen.addItem(_local5);
Map[MapIndex] = _local2.index;
MapIndex++;
if (Selected == undefined) {
Selected = _local2.index;
}
_local3++;
}
if (l != 0) {
ttlg = ttlg + _local4;
}
ttl = ttl + _local4;
k++;
}
totalg.text = ttlg;
total.text = ttl;
totalw.text = PlayerObj.Henchmen.Stock[0].length;
twage.text = "$" + _root.getHenchmenWage(_root.CURRENT_PLAYER);
cmpHenchmen.getColumnAt(0).width = 100;
cmpHenchmen.getColumnAt(1).width = 100;
cmpHenchmen.getColumnAt(2).width = 30;
cmpHenchmen.getColumnAt(3).width = 30;
cmpHenchmen.getColumnAt(4).width = 30;
cmpHenchmen.getColumnAt(5).width = 30;
cmpHenchmen.getColumnAt(6).width = 50;
_root.UpdateInterface();
}
function Hire() {
HenchmenHire(0);
}
function Fire() {
HenchmenFire(Selected);
Refresh();
}
cmpHenchmen.addEventListener("change", this);
_lastframe = "henchmen";
PlayerObj = _root.PlayerData[_root.CURRENT_PLAYER];
Map = new Array();
AssetList = new Array();
AssetList = [0].concat(PlayerObj.Assets);
cmpHenchmen.addColumn("Name");
cmpHenchmen.addColumn("Location");
cmpHenchmen.addColumn("HP");
cmpHenchmen.addColumn("ATK");
cmpHenchmen.addColumn("POW");
cmpHenchmen.addColumn("ROB");
cmpHenchmen.addColumn("Wage");
Refresh();
stop();
Instance of Symbol 640 MovieClip [DataGrid] "cmpHenchmen" in Symbol 1455 MovieClip Frame 131
//component parameters
onClipEvent (construct) {
editable = false;
multipleSelection = false;
rowHeight = 20;
}
Symbol 1455 MovieClip Frame 136
function change(evt) {
Selected = evt.target.selectedItem.Index;
}
function Refresh() {
ACTOR.INITIAL_COSTUME = _root.PROSTITUTE_COSTUME;
ACTOR.setup(_root.PROSTITUTE_COSTUME);
ttl = 0;
ttlg = 0;
cmpProst.removeAll();
Map = new Array();
MapIndex = 0;
for (var _local10 in PlayerObj.Prostitutes.Stock) {
var _local3 = PlayerObj.Prostitutes.Stock[_local10];
var _local2 = _root.getProstObj(_local3);
Map[MapIndex] = _local2.INDEX;
var _local4 = {Name:_local2.Name, Age:_local2.Age, Att:_local2.Att, Cut:_root.GetProstIncome(_local2.INDEX), Index:_local2.INDEX};
cmpProst.addItem(_local4);
if (Selected == undefined) {
Selected = _local2.INDEX;
}
cmpProst.getColumnAt(0).width = 120;
cmpProst.getColumnAt(1).width = 30;
cmpProst.getColumnAt(2).width = 30;
}
total.text = PlayerObj.Prostitutes.Stock.length;
income.text = "$" + _root.GetTotalProstIncome(_root.CURRENT_PLAYER);
ProstRefresh();
_root.UpdateInterface();
}
cmpProst.addEventListener("change", this);
PlayerObj = _root.PlayerData[_root.CURRENT_PLAYER];
cmpProst.addColumn("Name");
cmpProst.addColumn("Age");
cmpProst.addColumn("Att");
cmpProst.addColumn("Cut");
Refresh();
stop();
Instance of Symbol 640 MovieClip [DataGrid] "cmpProst" in Symbol 1455 MovieClip Frame 136
//component parameters
onClipEvent (construct) {
editable = false;
multipleSelection = false;
rowHeight = 20;
}
Symbol 1455 MovieClip Frame 142
function setBar(Bar, val, max) {
Bar._xscale = (val / max) * 100;
}
function CheckLimit() {
if (_root.GENERATELIMIT > 0) {
HIREBLOCK._visible = false;
} else {
HIREBLOCK._visible = true;
}
}
function Hire() {
if (HObj) {
if (_root.purchase(PlayerObj, HObj.wage * _root.UPFRONT_MOD, "this Henchmen")) {
HObj.name = name.text;
_root.CreateHenchmen(HObj, PlayerObj, locationID);
_root.NewPopUp("Hired", "You've hired " + HObj.name, _root.HENCHMEN_ICON);
_root.GENERATELIMIT--;
CheckLimit();
cmpHenchmenList.removeItemAt(cmpHenchmenList.selectedIndex);
HObj = undefined;
cmpHenchmenList.selectedIndex = 0;
HObj = cmpHenchmenList.selectedItem;
Refresh();
}
} else {
_root.NewPopUp("Oops", "Select a henchmen to hire!", _root.HENCHMEN_ICON);
}
}
function Refresh() {
if (locationID < 0) {
locationID = AssetList.length - 1;
}
if (locationID >= AssetList.length) {
locationID = 0;
}
trace(locationID);
locationname.text = _root.getLocationName(AssetList[locationID]);
if (HObj != undefined) {
name.text = HObj.name;
wage.text = "$" + HObj.wage;
upfront.text = "$" + (HObj.wage * _root.UPFRONT_MOD);
loc.text = _root.getLocationName(locationID);
setBar(HPBAR, HObj.hp, _root.HENCHMEN_HPMAX);
setBar(ATKBAR, HObj.atk, _root.HENCHMEN_ATKMAX);
setBar(ROBBAR, HObj.rob, _root.HENCHMEN_ROBMAX);
setBar(POWBAR, HObj.pow, _root.HENCHMEN_POWMAX);
}
}
function change(evt) {
var _local2 = evt.target.selectedItem.index;
HObj = evt.target.selectedItem;
Refresh();
}
_root.globitotexto = "";
AssetList = new Array();
AssetList = [0].concat(PlayerObj.Assets);
cmpHenchmenList.addEventListener("change", this);
cmpHenchmenList.addColumn("name");
cmpHenchmenList.addColumn("hp");
cmpHenchmenList.addColumn("atk");
cmpHenchmenList.addColumn("pow");
cmpHenchmenList.addColumn("rob");
cmpHenchmenList.addColumn("wage");
var i = 0;
while (i < 10) {
cmpHenchmenList.addItem(_root.GenerateHenchmen());
i++;
}
cmpHenchmenList.getColumnAt(0).width = 200;
cmpHenchmenList.getColumnAt(1).width = 50;
cmpHenchmenList.getColumnAt(2).width = 30;
cmpHenchmenList.getColumnAt(3).width = 30;
cmpHenchmenList.getColumnAt(4).width = 30;
cmpHenchmenList.getColumnAt(5).width = 100;
cmpHenchmenList.selectedIndex = 0;
HObj = cmpHenchmenList.selectedItem;
Refresh();
CheckLimit();
stop();
Instance of Symbol 640 MovieClip [DataGrid] "cmpHenchmenList" in Symbol 1455 MovieClip Frame 142
//component parameters
onClipEvent (construct) {
editable = false;
multipleSelection = false;
rowHeight = 20;
}
Symbol 1455 MovieClip Frame 146
function TakeHome() {
_root.PICKUP_EVENT.TakeHome();
}
function Action(Action) {
if (ACTION_VALID) {
ActObj = ActionsArray[Action];
Outcome = _root.PICKUP_EVENT.doAction(ActObj.evt);
Bar.gotoAndPlay("Outcome");
var _local3 = 0;
while (_local3 < 6) {
this["Act" + _local3]._visible = false;
_local3++;
}
}
}
function Refresh() {
LoveMeter.gotoAndStop(Math.ceil(_root.PICKUP_EVENT.getLove() * 50));
status.text = _root.PICKUP_EVENT.getStatus();
for (i in ActionsArray) {
Risk[i] = _root.PICKUP_EVENT.CalcActionRisk(ActionsArray[i].evt);
}
var i = 0;
while (i < 6) {
this["Act" + i]._visible = true;
i++;
}
}
ACTION_VALID = true;
var ActionsArray = new Array({evt:_root.BUYSHOT_PICKUP_EVENT, frame:"BuyShot"}, {evt:_root.BUYBEER_PICKUP_EVENT, frame:"BuyBeer"}, {evt:_root.TALK_PICKUP_EVENT, frame:"Talk"}, {evt:_root.COMPLIMENT_PICKUP_EVENT, frame:"Compliment"}, {evt:_root.DANCE_PICKUP_EVENT, frame:"Dance"});
Risk = new Array();
Refresh();
stop();
Symbol 1455 MovieClip Frame 151
function setBar(Bar, val, max) {
Bar._width = (val / max) * 280;
}
_root.CalcAttributes(_root.CURRENT_PLAYER);
setBar(CHBAR, PlayerObj.Attributes.Charisma, 10);
setBar(GTBAR, PlayerObj.Attributes.Getaway, 10);
setBar(PUBAR, PlayerObj.Attributes.Pursuade, 10);
setBar(BABAR, PlayerObj.Attributes.Battle, 10);
setBar(SMBAR, PlayerObj.Attributes.Smuggle, 10);
setBar(INBAR, PlayerObj.Attributes.Intimidation, 10);
setBar(ROBAR, PlayerObj.Attributes.Robbery, 10);
stop();
Symbol 1455 MovieClip Frame 156
gotoAndPlay ("type9");
Symbol 1455 MovieClip Frame 157
function Refresh() {
rObj = _root.RACKET_ARRAY[rId];
name.text = rObj.NAME;
desc.text = rObj.DESC;
startup.text = "$" + rObj.COST;
risk.text = rObj.RISK + "%";
if (rObj.REWARD != undefined) {
payout.text = "$" + rObj.REWARD;
} else {
payout.text = "--";
}
}
function Buy() {
if (_root.purchase(PlayerObj, rObj.COST, ("a " + rObj.NAME) + " Racket")) {
_root.AddRacket(rId, LocObj.Num, PlayerObj.Num);
_root.NewPopUp("Racket Installed", (("You've Installed a " + rObj.NAME) + " at ") + LocObj.Name, _root.MONEY_ICON);
gotoAndPlay(_lastframe);
}
}
racketListListener = new Object();
racketListListener.change = function (evt) {
rId = evt.target.value;
Refresh();
};
cmpRacketList.addEventListener("change", racketListListener);
var i = 0;
while (i < _root.RACKET_ARRAY.length) {
cmpRacketList.addItem(_root.RACKET_ARRAY[i].NAME, i);
i++;
}
rId = 0;
Refresh();
stop();
Instance of Symbol 477 MovieClip [List] "cmpRacketList" in Symbol 1455 MovieClip Frame 157
//component parameters
onClipEvent (construct) {
multipleSelection = false;
rowHeight = 20;
}
Symbol 1455 MovieClip Frame 162
x = _root.NewsHeadlines.length - 1;
while (x >= 0) {
id = dnd.addElementCustom(x, "verdana", "0x666666", "0xF5F5F5", "0xE1E1E1", "0x999999", "pIcon1", "dragSymbol1");
x--;
}
stop();
Instance of Symbol 666 MovieClip [BJCDnD] "dnd" in Symbol 1455 MovieClip Frame 162
//component parameters
onClipEvent (construct) {
title = "News";
eMode = "Both";
etMode = "Move";
speed = 80;
showTopBottom = true;
topBarHeight = 30;
bottomBarHeight = 30;
elementHeight = 120;
elementPadding = 0;
elementCCallback = "";
elementDCallback = "";
elementSymbol = "NewsHeadline";
defIcon = "defaultIcon";
defDragIcon = "defaultDragIcon";
defArrowIcon = "defaultArrow";
rolloverAvail = "On";
grAlpha = 30;
grColor = 0;
bgColor = 16119285 /* 0xF5F5F5 */;
uColor = 14540253 /* 0xDDDDDD */;
dColor = 10066329 /* 0x999999 */;
bBorder = 16777215 /* 0xFFFFFF */;
dBorder = 13421772 /* 0xCCCCCC */;
titleColor = 0;
etColor = 0;
selColor = 5592405 /* 0x555555 */;
selTxtColor = 16777215 /* 0xFFFFFF */;
titleFont = "Verdana";
etFont = "Verdana";
}
Symbol 1455 MovieClip Frame 166
function Left() {
LSelected = LocItemsDS.getSelectedItem();
var _local2 = RightMap[LSelected];
if (_local2 != undefined) {
_root.MergeDeleteArrayInd(LSelected, RightArray);
LeftArray.push(_local2);
Refresh();
}
}
function Right() {
var _local2 = LeftMap[PSelected];
trace(((PSelected + " -> ") + _local2) + " Remove");
if ((_local2 != undefined) && (RightArray.length < 3)) {
trace("L:" + LeftArray);
trace("R:" + RightArray);
_root.MergeDeleteArrayInd(PSelected, LeftArray);
RightArray.push(_local2);
Refresh();
}
}
function Fight() {
_root.BATTLE_OBJECT.SelectHenchmen(RightMap);
_root.OnPopUpClosed();
}
function Refresh() {
LeftMap = new Array();
RightMap = new Array();
PlayItems.ClearAll();
LocItemsDS.RemoveAll();
trace("L:" + LeftArray);
trace("R:" + RightArray);
var _local2 = 0;
while (_local2 < LeftArray.length) {
var _local3 = _root.getHObj(LeftArray[_local2]);
LeftMap[_local2] = _local3.index;
PlayItems.AddItem(_local3.name);
_local2++;
}
_local2 = 0;
while (_local2 < RightArray.length) {
var _local3 = _root.getHObj(RightArray[_local2]);
RightMap[_local2] = _local3.index;
LocItemsDS.AddItem(_local3);
_local2++;
}
PlayItems.SelectItem(0);
LocItemsDS.SelectItem(0);
PSelected = 0;
LSelected = 0;
}
_root.POPUP_VISIBLE = true;
_root.NO_MOUSE_MOVE = true;
this._visible = true;
trace((("Window : Player Object : " + PlayerObj.Name) + " ") + PlayerObj);
ItemChange = function (i, n) {
PSelected = i;
};
PlayItems.BigOffset = 0.5;
call("PlayItems.Init");
PlayItems.Init();
LocItemsDS = _root.ListObjInit("HenchmenItem", this.LocItems, 3);
LeftMap = new Array();
RightMap = new Array();
LeftArray = new Array();
trace(PlayerObj.Henchmen.Stock[0]);
LeftArray = LeftArray.concat(PlayerObj.Henchmen.Stock[0]);
trace(LeftArray);
RightArray = new Array();
Refresh();
stop();
Symbol 1479 Button
on (release) {
_root.ClosePopUp();
}
Symbol 1480 MovieClip Frame 10
Icon.gotoAndStop(i);
stop();
Symbol 1491 Button
on (rollOver) {
if (r1 != undefined) {
_root.globitotexto = p1;
}
}
on (rollOut) {
_root.globitotexto = "";
}
on (release) {
_root.DoJob(j1);
_root.ClosePopUp();
}
Symbol 1492 Button
on (rollOver) {
if (r2 != undefined) {
_root.globitotexto = p2;
}
}
on (rollOut) {
_root.globitotexto = "";
}
on (release) {
_root.DoJob(j2);
_root.ClosePopUp();
}
Symbol 1493 Button
on (rollOver) {
if (r3 != undefined) {
_root.globitotexto = p3;
}
}
on (rollOut) {
_root.globitotexto = "";
}
on (release) {
if (j3 != undefined) {
_root.j3.CalcRisk();
_root.DoJob(j3);
_root.ClosePopUp();
}
}
Symbol 1494 MovieClip Frame 10
Icon.gotoAndStop(i);
a1.text = Options[0];
a2.text = Options[1];
a3.text = Options[2];
j1 = Jobs[0];
j2 = Jobs[1];
j3 = Jobs[2];
trace(_root.Env.PoRisk);
trace(_root.PlayerData[_root.CURRENT_PLAYER].Power);
r1 = j1.CalcRisk(_root.Env.PoRisk, _root.PlayerData[_root.CURRENT_PLAYER].Power);
r2 = j2.CalcRisk(_root.Env.PoRisk, _root.PlayerData[_root.CURRENT_PLAYER].Power);
r3 = j3.CalcRisk(_root.Env.PoRisk, _root.PlayerData[_root.CURRENT_PLAYER].Power);
trace("Risk 1 : " + r1);
trace("Risk 2 : " + r2);
trace("Risk 3 : " + r3);
p1 = (Math.round(r1 * 10) / 10) + "%";
p2 = (Math.round(r2 * 10) / 10) + "%";
p3 = (Math.round(r3 * 10) / 10) + "%";
if (Options[1] == undefined) {
a2.text = "";
}
if (Options[2] == undefined) {
a3.text = "";
}
b1._visible = Jobs[0] != undefined;
b2._visible = Jobs[1] != undefined;
b3._visible = Jobs[2] != undefined;
stop();
Symbol 1497 Button
on (release) {
play();
}
Symbol 1498 Button
on (release) {
stop();
}
Symbol 1499 Button
on (release) {
if (_root.SIMULATION_MODE && (_root.PlayerData[_root.PLAYER_CYCLE].Type == _root.COMPUTER_TYPE)) {
_root.ComputerDone();
UpdateCompLog();
_root.CURRENT_PLAYER = _root.PLAYER_CYCLE;
_root.UpdateInterface();
}
}
Symbol 1501 MovieClip Frame 1
function UpdateCompLog() {
status.text = "";
while (_root.PlayerData[_root.PLAYER_CYCLE].DebugLog.length > 0) {
status.text = status.text + (_root.PlayerData[_root.PLAYER_CYCLE].DebugLog.shift() + newline);
}
}
UpdateCompLog();
if (((((_root.PlayerData[_root.PLAYER_CYCLE].Type == _root.HUMAN_TYPE) && (_root.GO_TO_NEXT)) && (!_root.POPUP_VISIBLE)) && (!_root.PopUp._visible)) && (_root.PopUpQueue.length == 0)) {
_root.GO_TO_NEXT = false;
_root.TurnCycle();
}
if (_root.SIMULATION_MODE && (_root.PlayerData[_root.PLAYER_CYCLE].Type == _root.COMPUTER_TYPE)) {
_root.GO_TO_NEXT = false;
_root.ComputerDone();
UpdateCompLog();
_root.CURRENT_PLAYER = _root.PLAYER_CYCLE;
_root.UpdateInterface();
}
current.text = (("Current Player : " + _root.PLAYER_CYCLE) + " ") + _root.PlayerData[_root.PLAYER_CYCLE].Name;
Symbol 1508 Button
on (release) {
_root.ComputerDone();
_root.ClosePopUp(this._name);
}
Symbol 1510 MovieClip Frame 1
_visible = false;
stop();
Symbol 1510 MovieClip Frame 10
status.text = this.DEBUGTXT;
stop();
Symbol 1511 Button
on (release) {
debugVar(PlayerData[1], "Player Object", 0);
CenterMap(PlayerHQs[1]);
}
Symbol 1512 Button
on (release) {
var i = 1;
while (i <= _root.LOCATIONS) {
_root.PlayerData[1].AvailableLocations[i] = 1;
i++;
}
_root.NewDay();
}
Symbol 1513 Button
on (release) {
_root.mapLocations();
_root.UpdateLocations();
}
Symbol 1517 Button
on (release) {
debugVar(PlayerData[2], "Player Object", 0);
CenterMap(PlayerHQs[2]);
}
Symbol 1519 Button
on (release) {
debugVar(PlayerData[3], "Player Object", 0);
CenterMap(PlayerHQs[3]);
}
Symbol 1521 Button
on (release) {
debugVar(PlayerData[4], "Player Object", 0);
CenterMap(PlayerHQs[4]);
}
Symbol 1523 Button
on (release) {
viewSpecial(CURRENT_PLAYER, "pickup", "None");
}
Symbol 1524 Button
on (release) {
_root.PlayerData[1].Cash = 1000000 /* 0x0F4240 */;
UpdateInterface();
}
Symbol 1526 Button
on (release) {
PlayerData[1].Type = _root.HUMAN_TYPE;
}
Symbol 1527 Button
on (release) {
PlayerData[2].Type = _root.HUMAN_TYPE;
}
Symbol 1528 Button
on (release) {
PlayerData[3].Type = _root.HUMAN_TYPE;
}
Symbol 1529 Button
on (release) {
PlayerData[4].Type = _root.HUMAN_TYPE;
}
Symbol 1530 Button
on (release) {
PlayerData[1].Type = _root.COMPUTER_TYPE;
}
Symbol 1531 Button
on (release) {
PlayerData[2].Type = _root.COMPUTER_TYPE;
}
Symbol 1532 Button
on (release) {
PlayerData[3].Type = _root.COMPUTER_TYPE;
}
Symbol 1533 Button
on (release) {
PlayerData[4].Type = _root.COMPUTER_TYPE;
}
Symbol 1543 MovieClip Frame 5
stop();
Symbol 1546 Button
on (release) {
done();
}
Symbol 1552 MovieClip Frame 2
this.Speech.gotoAndStop(icon);
Symbol 1552 MovieClip Frame 37
stop();
Symbol 1555 MovieClip Frame 2
this.Speech.gotoAndStop(icon);
Symbol 1555 MovieClip Frame 37
stop();
Symbol 1556 MovieClip Frame 2
A2.setup(_parent.c1);
if (_parent.PARAM > 0) {
A3.setup(_parent.c1);
A3._visible = true;
} else {
A3._visible = false;
}
if (_parent.PARAM > 1) {
A4.setup(_parent.c1);
A4._visible = true;
} else {
A4._visible = false;
}
A4.walk();
A1.setup(_root.GenerateCivilian());
A1.idle();
Symbol 1556 MovieClip Frame 5
A2.walk();
Symbol 1556 MovieClip Frame 8
A3.walk();
Symbol 1556 MovieClip Frame 62
A3.idle();
A2.idle();
A4.idle();
Symbol 1556 MovieClip Frame 77
A2.holdup();
Symbol 1556 MovieClip Frame 86
SpeechBubble.icon = 2;
Symbol 1556 MovieClip Frame 116
trace(_parent.outcome);
gotoAndPlay("outcome" + _parent.outcome);
Symbol 1556 MovieClip Frame 117
A1.heldup();
Symbol 1556 MovieClip Frame 159
A1.givemoney();
Symbol 1556 MovieClip Frame 208
_parent.done();
Symbol 1556 MovieClip Frame 209
A1.pressalarm();
Symbol 1556 MovieClip Frame 217
SpeechBubble.icon = _root.POLICE_ICON;
Symbol 1556 MovieClip Frame 235
_parent.done();
Symbol 1558 MovieClip Frame 2
A2.setup(_parent.c1);
A2.setState(A2.HOLDUP_STATE);
if (_parent.PARAM > 0) {
A3.setup(_parent.c1);
A3._visible = true;
A3.idle();
} else {
A3._visible = false;
}
if (_parent.PARAM > 1) {
A4.setup(_parent.c1);
A4._visible = true;
A4.idle();
} else {
A4._visible = false;
}
A5.setup(_root.COP_COSTUME);
A1.setup(_root.CURRENTCOSTUME);
A1.setState(A1.HELDUP_STATE);
Symbol 1558 MovieClip Frame 20
A2.shoot();
Symbol 1558 MovieClip Frame 21
A1.die();
Symbol 1558 MovieClip Frame 25
A4.walk();
Symbol 1558 MovieClip Frame 31
A2.walk();
Symbol 1558 MovieClip Frame 32
A3.walk();
Symbol 1558 MovieClip Frame 49
A2.idle();
Symbol 1558 MovieClip Frame 52
trace(_parent.outcome);
if (_parent.outcome == 0) {
gotoAndPlay ("lose");
}
Symbol 1558 MovieClip Frame 53
A2.walk();
Symbol 1558 MovieClip Frame 82
_parent.done();
Symbol 1558 MovieClip Frame 83
A2.walk();
A5.walk();
Symbol 1558 MovieClip Frame 98
A5.idle();
A5.holdup();
Symbol 1558 MovieClip Frame 106
A2.idle();
Symbol 1558 MovieClip Frame 114
A2.heldup();
Symbol 1558 MovieClip Frame 135
_parent.done();
Symbol 1559 Button
on (release) {
_root.BATTLE_OBJECT.Done();
done();
}
Symbol 1563 MovieClip Frame 2
LeftSize = _root.BATTLE_OBJECT.Left.Henchmen.length;
RightSize = _root.BATTLE_OBJECT.Right.Henchmen.length;
if (LeftSize <= 2) {
A4._visible = false;
}
if (LeftSize <= 1) {
A3._visible = false;
}
if (RightSize <= 2) {
A5._visible = false;
}
if (RightSize <= 1) {
A6._visible = false;
}
A2.setup(_parent.c1);
A3.setup(_parent.c1);
A4.setup(_parent.c1);
A4.walk();
A1.setup(_parent.c2);
A1.idle();
Symbol 1563 MovieClip Frame 5
SpeechBubble.icon = 1;
A2.walk();
Symbol 1563 MovieClip Frame 8
A3.walk();
Symbol 1563 MovieClip Frame 28
A5.setup(_parent.c2);
A5.walk();
A6.setup(_parent.c2);
A6.walk();
Symbol 1563 MovieClip Frame 48
A5.idle();
Symbol 1563 MovieClip Frame 58
A6.idle();
Symbol 1563 MovieClip Frame 62
A3.idle();
A2.idle();
A4.idle();
Symbol 1563 MovieClip Frame 63
A5.shoot();
Symbol 1563 MovieClip Frame 65
A4.shoot();
Symbol 1563 MovieClip Frame 67
A6.shoot();
Symbol 1563 MovieClip Frame 68
A2.shoot();
Symbol 1563 MovieClip Frame 70
A1.shoot();
Symbol 1563 MovieClip Frame 72
A3.shoot();
Symbol 1563 MovieClip Frame 82
delay = 4;
Symbol 1563 MovieClip Frame 83
if (delay <= 0) {
delay = Math.ceil(Math.random() * 10);
Action = _root.BATTLE_OBJECT.Queue.shift();
if (Action.d) {
this[Action.d].die();
} else if (Action.h) {
this[Action.h].hit();
}
if (_root.BATTLE_OBJECT.Queue.length == 0) {
gotoAndPlay ("battleend");
}
} else {
delay--;
}
Symbol 1563 MovieClip Frame 91
gotoAndPlay ("battle");
Symbol 1563 MovieClip Frame 92
i = 1;
while (i <= 6) {
trace("end");
if (this["A" + i].STATE != this["A" + i].DEATH_STATE) {
trace("A" + i);
this["A" + i].holdupdone();
}
i++;
}
Symbol 1563 MovieClip Frame 139
_root.BATTLE_OBJECT.Done();
_parent.done();
Symbol 1582 Button
on (press) {
Shoot();
}
Symbol 1583 Button
on (press) {
Shoot();
glass0.play();
}
Symbol 1584 Button
on (press) {
Shoot();
glass1.play();
}
Symbol 1586 Button
on (press) {
Shoot();
CreateSlug();
}
Symbol 1589 MovieClip Frame 1
trace("Time : " + timeval);
timeval--;
if (timeval <= 0) {
_parent.Done();
}
timetext.text = timeval;
Symbol 1604 MovieClip Frame 1
stop();
Symbol 1626 MovieClip Frame 1
stop();
Symbol 1640 MovieClip Frame 1
stop();
Symbol 1640 MovieClip Frame 2
SOUNDID = 5;
this.Sound.goPlay();
Symbol 1645 MovieClip Frame 14
stop();
Symbol 1650 MovieClip Frame 1
_parent.stop();
Symbol 1650 MovieClip Frame 45
_parent.play();
Symbol 1650 MovieClip Frame 46
this.stop();
Symbol 1651 MovieClip Frame 1
function ClearHenchmen() {
for (var _local2 in ACTOR_ARRAY) {
this[ACTOR_ARRAY[_local2]]._visible = false;
}
}
function GameLoop() {
var _local1 = Math.floor(35 - ((_xmouse / 467) * 20));
intro.player.gotoAndStop(_local1);
}
function Shoot() {
intro.player.fire.play();
for (var _local3 in DEFAULT_ACTOR_ARRAY) {
var _local2 = this[DEFAULT_ACTOR_ARRAY[_local3]];
trace(_local2._name);
trace((_local2._x + " , ") + _local2._y);
if (_local2.collide.hitTest(this.mousech)) {
_local2.drivebyHit();
points++;
}
}
}
function Hit() {
clock.timeval--;
HitMC._visible = true;
HitMC.gotoAndPlay(1);
}
function Done() {
if (START) {
trace("Finished");
Mouse.show();
trace(_root.DRIVEBY_GAME);
trace(_root.DRIVEBY_GAME.WinGame(points, hits));
trace(_parent._name);
trace(_parent.done());
this.stop();
}
}
function Init() {
SLUG_START_DEPTH = 500;
SLUG_COUNT = 0;
points = 0;
hits = 0;
Mouse.hide();
duplicateMovieClip ("crosshair", "mousech", 10000);
startDrag ("mousech", true);
}
function GameStart() {
START = true;
for (var _local4 in ACTOR_ARRAY) {
this[_local4].setup(_parent.c2);
}
HenchmenGo();
clock.timeval = _root.DRIVEBY_GAME.INITTIME;
}
function RandomArray(A) {
var _local1 = Math.floor(A.length * Math.random());
return(A[_local1]);
}
function HenchmenGo() {
if (ACTOR_ARRAY.length > 0) {
var _local2 = Math.floor(ACTOR_ARRAY.length * Math.random());
mc = ACTOR_ARRAY[_local2];
ACTOR_ARRAY.splice(_local2, 1);
this[mc]._visible = true;
this[mc].drivebyUp(5);
}
}
function HenchmenDone(n) {
this[n]._visible = false;
this[n].stop();
ACTOR_ARRAY.push(n);
HenchmenGo();
}
function CreateSlug() {
duplicateMovieClip ("_SLUG", "slug" + SLUG_COUNT, SLUG_COUNT + SLUG_START_DEPTH);
this["slug" + SLUG_COUNT].gotoAndStop(Math.ceil(Math.random() * 6));
this["slug" + SLUG_COUNT]._x = _xmouse;
this["slug" + SLUG_COUNT]._y = _ymouse;
SLUG_COUNT++;
}
function ClearSlugs() {
var _local2 = 0;
while (_local2 < SLUG_COUNT) {
_root["slug" + _local2].removeMovieClip();
_local2++;
}
}
START = false;
DEFAULT_ACTOR_ARRAY = new Array("A0", "A1", "A3");
ACTOR_ARRAY = new Array("A0", "A1", "A3");
Symbol 1651 MovieClip Frame 2
ClearHenchmen();
stop();
Symbol 1651 MovieClip Frame 3
Init();
Symbol 1651 MovieClip Frame 4
GameStart();
Symbol 1651 MovieClip Frame 5
GameLoop();
play();
Symbol 1651 MovieClip Frame 6
gotoAndPlay ("loop");
Symbol 1653 Button
on (release) {
CS.play();
nextFrame();
}
Symbol 1657 MovieClip Frame 1
stop();
Symbol 1657 MovieClip Frame 11
function done() {
_root.CloseAnimation();
this.removeMovieClip();
}
gotoAndPlay(animation);
Symbol 1657 MovieClip Frame 12
stop();
Symbol 1657 MovieClip Frame 20
stop();
Symbol 1657 MovieClip Frame 27
stop();
Symbol 1657 MovieClip Frame 34
stop();
Symbol 1657 MovieClip Frame 35
stop();