Frame 1
stopAllSounds();
_root.bytesLoaded = _root.getBytesLoaded();
_root.bytesTotal = _root.getBytesTotal();
_root.percentLoaded = Math.round(100 * (_root.bytesLoaded / _root.bytesTotal));
_root.percentLoadedText = _root.percentLoaded + "%";
_root.bar.gotoAndStop(percentLoaded);
Instance of Symbol 37 MovieClip [emptyContainer] "codeClip" in Frame 1
onClipEvent (load) {
function doSound(id) {
this.mySound.attachSound(id);
this.mySound.start();
}
function newMusic(music) {
trace(("REQUESTING \"" + music) + "\"");
gameMusic.stop();
gameMusic.attachSound(music);
gameMusic.start(0, 999);
gameMusic.onSoundComplete = function () {
this.start(0, 999);
};
}
function frameLimiter() {
newT = getTimer();
while (Math.abs(newT - oldT) < maxF) {
newT = getTimer();
}
oldT = getTimer();
}
var gameMusic = new Sound();
this.mySound = new Sound();
oldT = getTimer();
newT = getTimer();
maxF = 33;
}
onClipEvent (enterFrame) {
frameLimiter();
}
Frame 2
if (_root.percentLoaded == 100) {
gotoAndPlay (4);
} else {
gotoAndPlay (1);
}
Frame 4
stop();
Instance of Symbol 1319 MovieClip in Frame 4
onClipEvent (load) {
this.stop();
}
Frame 5
stop();
Instance of Symbol 1330 MovieClip "blackOut" in Frame 5
onClipEvent (load) {
this.onEnterFrame = function () {
this._alpha = this._alpha - 1;
if (this._alpha <= 2) {
_root.play();
}
};
}
Frame 6
function fadeBG() {
brickBG.onEnterFrame = function () {
this._alpha = this._alpha - 5;
if (this._alpha < 3) {
_root.gotoAndStop(2);
delete this.onEnterFrame;
}
};
}
stop();
Instance of Symbol 37 MovieClip [emptyContainer] "codeClip_globals" in Frame 6
onClipEvent (load) {
_global.informant = false;
_global.hpMaxPrice = 2500;
_global.luggPrice = 20000;
_global.drugsBought = false;
_global.payoffEnabled = false;
_global.playerName = "Player 1";
_global.face = 1;
_global.eyes = 1;
_global.hair = 1;
_global.bling = 1;
_global.bloodMode = true;
_global.shadowMode = true;
_global.innocenceMode = false;
_global.qualFX = true;
_global.qualitySel = "LOW";
_global.timedBattle = 0;
_global.inBattle = false;
_global.ammo = 0;
_global.p5 = false;
_global.s5 = false;
_global.k5 = false;
_root.locationList.removeMovieClip();
_root.inventory.removeMovieClip();
_root.myStore._visible = false;
_global.timerDefault = 150;
_global.timerMod = 0.8;
_global.bankCurr = 10000;
_global.bankMod = 1.5;
_global.bankMax = 100000 /* 0x0186A0 */;
_global.penaltyTime = 5;
}
Instance of Symbol 7 MovieClip [Xray Connector 7-OS] in Frame 7
//component parameters
onClipEvent (construct) {
classPackages = [];
classPackages[0] = "com";
classPackages[1] = "mx";
classPackages[2] = "flash";
showFPS = false;
}
Instance of Symbol 1743 MovieClip "flying_mc" in Frame 7
onClipEvent (load) {
this._visible = false;
this.gotoAndStop(1);
this.locID = "-1";
this.showAnim = function () {
trace("WEEE" + this);
this._visible = true;
this.gotoAndPlay(1);
};
}
Frame 8
function battleObj(battleText, enemyType, enemyCount) {
this.battleText = battleText;
this.enemyType = enemyType;
this.enemyCount = enemyCount;
}
function updateLocationList() {
var _local3 = 0;
while (_local3 < myChar.locationStack.length) {
temp = _root.locationList[myChar.locationStack[_local3].myName];
temp.enabled = myChar.locationStack[_local3].available && (myChar.myLocation != _local3);
if (myChar.locationStack[_local3].available) {
temp.gotoAndStop(1);
temp.locationName.text = myChar.locationStack[_local3].myName;
temp.myName = temp.locationName.text;
temp.onPress = function () {
_root.flyTo(this.locationID);
};
} else {
temp.gotoAndStop("disabled");
temp.locationName.text = "Invalid Passport";
}
_local3++;
}
_root.locationList[myChar.getCurrentLocation().myName].enabled = false;
_root.locationList[myChar.getCurrentLocation().myName].gotoAndStop(2);
}
function enableLocation(locID) {
trace("ENABLE LOCATION : " + locID);
myChar.enableLocation(locID);
}
function disableLocation() {
for (i in _root.locationList) {
if (typeof(locationList[i]) == "movieclip") {
locationList[i].enabled = true;
locationList[i].gotoAndStop(1);
}
}
_root.locationList[myChar.getCurrentLocation().myName].enabled = false;
_root.locationList[myChar.getCurrentLocation().myName].gotoAndStop(2);
}
function killLocation(locID) {
_root.locationList[myChar.locationStack[locID].myName].enabled = false;
_root.locationList[myChar.locationStack[locID].myName].gotoAndStop(2);
}
function changeBG() {
_root.bgContainer.bgClip.removeMovieClip();
trace(bgContainer.bgClip);
_root.bgContainer.attachMovie(myChar.getCurrentLocation().bgClip, "bgClip", _root.bgContainer.getNextHighestDepth());
}
function nextDay() {
if (_root.daysLeft <= _root.maxDays) {
myChar.calcLoan();
myChar.calcSavings();
}
if ((_global.bankCurr * _global.bankMod) < _global.bankMax) {
_global.bankCurr = _global.bankCurr * _global.bankMod;
} else {
_global.bankCurr = _global.bankMax;
}
myInventory.seedDrugs();
_root.daysLeft--;
_global.contact = false;
_global.loanedToday = false;
_global.robbedToday = false;
_root.popupStack = new Array();
_root.phoneStack = new Array();
var _local6 = myInventory.freeDrugs();
if (_global.contact) {
phoneStack.push("INFORMANT CALL");
myChar.phoneCount--;
}
if (_local6 != -1) {
_global.drugsBought = true;
myInventory.addDrug(_local6, myInventory.getDrug(_local6).freeAmt);
if (!_global.innocenceMode) {
popupStack.push(myInventory.getDrug(_local6).freeText);
} else {
popupStack.push(myInventory.getDrug(_local6).kid_freeText);
}
}
var _local5 = 0;
while (_local5 < myInventory.numSpaces) {
var _local4 = myInventory.getDrug(_local5);
_root.inventory[_local4.__get__streetName()].updateDisplay();
if (_local4.available) {
if (!_global.innocenceMode) {
if (_local4.highMode && (_local4.currPrice > _local4.highPrice)) {
_root.popupStack.push(_local4.__get__highText());
}
if (_local4.lowMode && (_local4.currPrice < _local4.lowPrice)) {
_root.popupStack.push(_local4.__get__lowText());
}
} else {
if (_local4.highMode && (_local4.currPrice > _local4.highPrice)) {
_root.popupStack.push(_local4.__get__kid_highText());
}
if (_local4.lowMode && (_local4.currPrice < _local4.lowPrice)) {
_root.popupStack.push(_local4.__get__kid_lowText());
}
}
}
_local5++;
}
_global.spriteConf = myChar.locationStack[((myChar.myLocation != undefined) ? (myChar.myLocation) : 0)].spriteConf;
trace("GLOBAL SPRITE: " + _global.spriteConf);
charStats.updateDisplay();
this.battleStack = undefined;
if (((_root.maxDays - _root.daysLeft) > 2) && (_global.drugsBought)) {
if (!this.yesterdayBattle) {
if (myChar.getCurrentLocation() != undefined) {
var _local7 = myChar.getCurrentLocation().Calendar;
} else {
var _local7 = myChar.locationStack[0].Calendar;
}
if (_local7.currentDay.copMode) {
this.battleStack = new battleObj("\" FREEZE, PUNK! YOU'RE GOING DOWNTOWN! \"", "cop", Math.floor(Math.random() * 3) + 3);
} else if (_local7.currentDay.rivalMode) {
this.battleStack = new battleObj("\" What're you doing slanging on our block? \"", "thug", Math.floor(Math.random() * 3) + 3);
} else if (_global.noFight >= 3) {
switch (_root.randRange(1, 2)) {
case 1 :
this.battleStack = new battleObj("\" FREEZE, PUNK! YOU'RE GOING DOWNTOWN! \"", "cop", Math.floor(Math.random() * 3) + 3);
break;
case 2 :
this.battleStack = new battleObj("\" What're you doing slanging on our block? \"", "thug", Math.floor(Math.random() * 3) + 3);
}
}
}
this.yesterdayBattle = this.battleStack != undefined;
_global.noFight++;
}
if (this.yesterdayBattle) {
_global.noFight = 0;
}
if (_root.daysLeft >= 1) {
_root.checkBattle();
_root.nextPopup();
} else {
_root.endGame();
}
}
function nextPopup() {
if ((!_global.inBattle) && (!_global.immPopup)) {
this.popUp.removeMovieClip();
if (popupStack.length > 0) {
_root.codeClip.doSound("popUp");
temp = _root.attachMovie("noticePopup", "popUp", _root.getNextHighestDepth());
temp.noticeText.text = popupStack.shift();
temp.okButton.onPress = function () {
this._parent.removeMovieClip();
_root.nextPopup();
};
}
}
}
function endGame(endText) {
temp = _root.attachMovie("finalScreenEntry", "tPop", _root.getNextHighestDepth());
temp._x = (temp._y = 0);
var _local4 = (myChar.myLoot + myChar.mySavings) - myChar.myLoan;
if (endText == undefined) {
if (_local4 > 0) {
endText = "Time is up! Excellent work!";
} else {
endText = "Your Swiss bankers have written you off.";
}
}
temp.myLoot.text = "$" + _local4;
temp.notoriety.text = ((myChar.notoriety != undefined) ? (myChar.notoriety) : "ELITE");
temp.userName.text = myChar.userName;
temp.endReason.text = endText;
temp.finalMessage.text = "I'd like to thank you for playing this game. I hope you enjoyed playing it as much as we enjoyed making it. Keep an eye out for future tenative modifications to incorporate better upgrades, new locations, new customizations, etc etc.";
temp.okButton.onPress = function () {
stopAllSounds();
_root.gotoAndPlay(6);
this._parent.removeMovieClip();
};
}
function flyTo(locID) {
trace("SENDING " + locID);
this.bgFlight.flyTo(locID);
}
function flyTo2(locID) {
trace(locID);
myChar.changeLocation(locID);
nextDay();
changeBG();
disableLocation();
updateLocationList();
killLocation(((locID == undefined) ? 0 : (locID)));
_global.currLocation = ((locID == undefined) ? 0 : (locID));
}
function immediatePopup(myText) {
_global.immPopup = true;
temp = _root.attachMovie("noticePopup", "popUp", _root.getNextHighestDepth());
temp.noticeText.text = myText;
temp.okButton.onPress = function () {
_global.immPopup = false;
_root.nextPopup();
this._parent.removeMovieClip();
};
}
function checkBattle() {
if (this.battleStack != undefined) {
temp = _root.attachMovie("battlePopup", "popUp", _root.getNextHighestDepth());
trace(temp);
temp.noticeText.text = this.battleStack.battleText;
_global.inBattle = true;
if (this.battleStack.enemyType == "cop") {
_root.codeClip.doSound("siren");
}
_global.enemyType = this.battleStack.enemyType;
_global.enemyCount = this.battleStack.enemyCount;
_global.ammo = _root.myChar.ammo;
_global.hp = _root.myChar.currHP;
_global.maxhp = _root.myChar.maxHP;
_global.money = _root.myChar.myLoot;
temp.okButton.onPress = function () {
_root.codeClip.newMusic("battlemusic");
if (this.battleStack.enemyType == "cop") {
_root.codeClip.doSound("policeradio");
}
_root.attachBattle();
this._parent.removeMovieClip();
};
this.battleStack = undefined;
}
}
function attachBattle() {
_global.noFight = 0;
_global.savings = _root.myChar.mySavings;
_global.win = false;
_global.paused = false;
_global.spriteConf = myChar.locationStack[((myChar.myLocation != undefined) ? (myChar.myLocation) : 0)].spriteConf;
temp = _root.attachMovie("battleMC", "battleMC", _root.getNextHighestDepth());
var _local6 = myChar.locationStack[((myChar.myLocation != undefined) ? (myChar.myLocation) : 0)].myName;
if (_global.timedBattle == 0) {
_global.enemyCount = _root.randRange(3, 6);
} else {
_local6 = "Bank";
}
temp.stage_mc.gotoAndStop(_local6);
temp._lockroot = true;
temp.onUnload = function () {
_root.battleStack = undefined;
_global.paused = false;
if (_global.win || (_global.paidoff)) {
_root.myChar._notoriety = _root.myChar._notoriety + 0.25;
var _local5 = 0;
if (_global.enemyType == "cop") {
if (_global.timedBattle == 0) {
_local5 = 3000;
_root.immediatePopup(("You defeated the police! The Russian mafia gives you $" + _local5) + " for every kill.");
_global.money = _global.money + (_local5 * _global.deadCount);
} else {
_local5 = Math.floor(_global.bankCurr);
_root.immediatePopup(((("Congratulations! You made off with $" + _local5) + " from the Bank of ") + myChar.getCurrentLocation().myName) + "!");
_global.money = _global.money + _local5;
_global.bankCurr = 10000;
_global.timerDefault = _global.timerDefault - _global.penaltyTime;
}
} else {
_local5 = _root.randRange(500, 2000);
numKey = _root.randRange(2, 6);
var _local3 = myInventory.getDrug(_root.randRange(0, 7));
if (!_global.innocenceMode) {
drugName = _local3.streetName;
} else {
drugName = _local3.kidName;
}
immediatePopup(((((("You defeated the rival gang! You find $" + _local5) + " and ") + numKey) + " ") + drugName) + "!");
myInventory.addDrug(_local3.ID, numKey);
_root.inventory[_local3.__get__streetName()].updateDisplay();
_global.money = _global.money + _local5;
}
} else {
_root.myChar._notoriety = _root.myChar._notoriety - 0.25;
if (_global.timedBattle == 0) {
_global.hp = 1;
if (_global.enemyType == "cop") {
var _local5 = Math.floor(_global.money * 0.3);
_root.immediatePopup(("The police release you two days later, having paid $" + _local5) + " bond and half your product!");
_global.money = Math.floor(_global.money * 0.7);
_global.loanedToday = false;
_root.myChar.loseProduct();
_root.daysLeft = _root.daysLeft - 2;
var _local4 = 0;
while (_local4 < myInventory.numSpaces) {
var _local3 = myInventory.getDrug(_local4);
_root.inventory[_local3.__get__streetName()].updateDisplay();
if (_local3.available) {
if (!_global.innocenceMode) {
if (_local3.highMode && (_local3.currPrice > _local3.highPrice)) {
_root.popupStack.push(_local3.__get__highText());
}
if (_local3.lowMode && (_local3.currPrice < _local3.lowPrice)) {
_root.popupStack.push(_local3.__get__lowText());
}
} else {
if (_local3.highMode && (_local3.currPrice > _local3.highPrice)) {
_root.popupStack.push(_local3.__get__kid_highText());
}
if (_local3.lowMode && (_local3.currPrice < _local3.lowPrice)) {
_root.popupStack.push(_local3.__get__kid_lowText());
}
}
}
_local4++;
}
} else {
var _local5 = Math.floor(_global.money * 0.3);
_root.immediatePopup(("You were defeated by the thugs! Those bastards took $" + _local5) + "!");
_global.money = Math.floor(_global.money * 0.7);
}
} else if (_global.enemyType == "cop") {
if (_global.hp <= 0) {
_global.hp = 1;
}
_root.immediatePopup("You get thrown in jail for 3 days. Vinnie bails you out, but it cost you half your cash and savings!");
_global.money = Math.floor(_global.money * 0.5);
_global.savings = Math.floor(_global.savings * 0.5);
_global.loanedToday = false;
_root.daysLeft = _root.daysLeft - 3;
var _local4 = 0;
while (_local4 < myInventory.numSpaces) {
var _local3 = myInventory.getDrug(_local4);
_root.inventory[_local3.__get__streetName()].updateDisplay();
if (_local3.available) {
if (!_global.innocenceMode) {
if (_local3.highMode && (_local3.currPrice > _local3.highPrice)) {
_root.popupStack.push(_local3.__get__highText());
}
if (_local3.lowMode && (_local3.currPrice < _local3.lowPrice)) {
_root.popupStack.push(_local3.__get__lowText());
}
} else {
if (_local3.highMode && (_local3.currPrice > _local3.highPrice)) {
_root.popupStack.push(_local3.__get__kid_highText());
}
if (_local3.lowMode && (_local3.currPrice < _local3.lowPrice)) {
_root.popupStack.push(_local3.__get__kid_lowText());
}
}
}
_local4++;
}
}
}
_global.inBattle = false;
_global.timedBattle = 0;
_root.myChar.ammo = _global.ammo;
_root.myChar.currHP = _global.hp;
_root.myChar.myLoot = _global.money;
_root.myChar.mySavings = _global.savings;
charStats.updateDisplay();
nextPopup();
_root.codeClip.newMusic("menumusic");
};
}
function randRange(min, max) {
var _local1 = Math.floor(Math.random() * ((max - min) + 1)) + min;
return(_local1);
}
function robBank() {
_global.enemyCount = _root.randRange(8, 10);
_global.timedBattle = _global.enemyCount * 15;
_global.inBattle = true;
_global.enemyType = "cop";
_global.ammo = _root.myChar.ammo;
_global.hp = _root.myChar.currHP;
_global.maxhp = _root.myChar.maxHP;
_global.money = _root.myChar.myLoot;
_global.robbedToday = true;
_root.codeClip.newMusic("battlemusic");
_root.attachBattle();
}
function getRobText() {
return((((("You will only have " + Math.floor(_global.timerDefault / 60)) + ":") + ((String(Math.floor(_global.timerDefault % 60)).length == 1) ? "0" : "")) + Math.floor(_global.timerDefault % 60)) + " to rob the bank. Proceed?");
}
stop();
_global.timerDefault = 120;
_global.penaltyTime = 5;
_root.myStore._visible = true;
_global.noFight = 0;
this.codeClip.newMusic("menumusic");
this.codeClip.doSound("plane");
myChar = _root.attachMovie("myChar", "player", _root.getNextHighestDepth(), {_x:20, _y:390});
myChar._visible = false;
var maxDays = _global.maxDays;
var daysLeft = maxDays;
loanMax = 5500;
trace("Setting loanAmt");
var lLondon = (new com.DrugWars.Location("London", true, true, maxDays, "londonCityBG", 33, 33, [5, 8, 1, 4, 1, 1, 1, 1]));
var lNewYork = (new com.DrugWars.Location("New York", true, true, maxDays, "newYorkCityBG", 33, 33, [1, 4, 1, 3, 1, 1, 1, 1]));
var lAmsterdam = (new com.DrugWars.Location("Amsterdam", true, true, maxDays, "amsterdamCityBG", 33, 33, [9, 12, 1, 4, 1, 3, 3, 3]));
var lBogota = (new com.DrugWars.Location("Bogota", true, true, maxDays, "bogotaCityBG", 33, 33, [13, 16, 1, 4, 2, 3, 2, 2]));
var lLosAngeles = (new com.DrugWars.Location("Los Angeles", true, true, maxDays, "losAngelesCityBG", 33, 33, [1, 4, 1, 3, 1, 1, 1, 1]));
_global.robbedBank = false;
this.yesterdayBattle = false;
_global.bankCurr = 10000;
_global.bankMod = 1.5;
_global.bankMax = 100000 /* 0x0186A0 */;
this.battleStack = undefined;
myChar.addLocation(lNewYork);
myChar.addLocation(lLosAngeles);
myChar.addLocation(lAmsterdam, false);
myChar.addLocation(lBogota, false);
myChar.addLocation(lLondon, false);
myChar.myLocation = 0;
myChar.userName = _global.playerName;
_root.createEmptyMovieClip("locationList", _root.getNextHighestDepth());
var i = 0;
while (i < myChar.locationStack.length) {
temp = _root.locationList.attachMovie("locationEntry", myChar.locationStack[i].myName, _root.locationList.getNextHighestDepth());
temp.locationID = i;
temp._y = i * (temp._height + 2);
temp.locationName.text = myChar.locationStack[i].myName;
temp.onPress = function () {
_root.codeClip.doSound("latch");
_root.flyTo(this.locationID);
};
temp.onRollOver = function () {
_root.codeClip.doSound("menuHover");
};
i++;
}
if (_root.locationList.getDepth() > this.myStore.getDepth()) {
_root.locationList.swapDepths(this.myStore);
}
_root.locationList._x = 538;
_root.locationList._y = 371 - ((myChar.locationStack.length - 1) * (temp._height + 2));
myChar.traceVars();
charStats.updateDisplay = function () {
if (myChar.myLoot == "NaN") {
myChar.myLoot = 0;
}
this.daysLeft.text = _root.daysLeft;
this.notorietyClip.gotoAndStop(myChar._notoriety);
this.userName.text = myChar.userName;
this.inventoryCount.text = ((myInventory.drugLimit - myInventory.freeSpace) + " / ") + myInventory.drugLimit;
this.myLoot.text = "$" + myChar.myLoot;
this.myLoan.text = "$" + myChar.myLoan;
if (myChar.myLoan > 20000) {
this.myLoan.textColor = 14483456 /* 0xDD0000 */;
} else {
this.myLoan.textColor = 0;
}
this.mySavings.text = "$" + myChar.mySavings;
this.myAmmo.text = _global.ammo;
this.phoneCount.text = myChar.phoneCount;
this.healthCount.text = (myChar.currHP + " / ") + myChar.maxHP;
if (myChar.currHP < 10) {
this.healthCount.textColor = 14483456 /* 0xDD0000 */;
} else {
this.healthCount.textColor = 0;
}
};
var dAcid = (new com.DrugWars.Drug(0, "acidIcon", 600, 5000, 0.25, -1, 3, 11, 10));
dAcid.addStreetName("Acid");
dAcid.addStreetName("LSD");
dAcid.addStreetName("Tabs");
dAcid.addStreetName("Blotter");
dAcid.addKidName("Laffy Taffy");
dAcid.addKidName("Laffy Taffy");
dAcid.availability = 3;
dAcid._lowText = "Home-made NAME floods the market!";
dAcid._freeText = "You meet a friend, who lays some NAME on you!";
dAcid.freeAmt = 5;
var dCocaine = (new com.DrugWars.Drug(0, "cocaineIcon", 16000, 29000, 1, 10, -1, 95, 100));
dCocaine.addStreetName("Cocaine");
dCocaine.addStreetName("Blow");
dCocaine.addStreetName("White");
dCocaine.addStreetName("Yayo");
dCocaine.addStreetName("Coke");
dCocaine.addStreetName("Powder");
dCocaine.addStreetName("Charlie");
dCocaine.addKidName("Pixie Stix");
dCocaine.addKidName("Pixie Stix");
dCocaine.availability = 4;
dCocaine._freeText = "You find some NAME in a luggage locker!";
dCocaine._highText = "Demand for NAME has soared!";
dCocaine.freeAmt = 3;
var dKetamine = (new com.DrugWars.Drug(0, "ketamineIcon", 4000, 7000, 0.25, 10, 15, 95, 100));
dKetamine.addStreetName("Ketamine");
dKetamine.addStreetName("Special-K");
dKetamine.availability = 4;
dKetamine.addKidName("Skittles");
dKetamine.addKidName("Skittles");
dKetamine._lowText = "Vets are selling NAME on the cheap!";
dKetamine._highText = "The cops make a big bust. NAME prices are insane!";
dKetamine.freeChance = -1;
var dEcstasy = (new com.DrugWars.Drug(0, "ecstasyIcon", 2000, 3000, 1, 2.5, 9, 10, 10));
dEcstasy.addStreetName("Ecstasy");
dEcstasy.addStreetName("XTC");
dEcstasy.addStreetName("X");
dEcstasy.addStreetName("MDMA");
dEcstasy.addStreetName("Beans");
dEcstasy.addKidName("Spree");
dEcstasy.addKidName("Spree");
dEcstasy.availability = 3;
dEcstasy._freeText = "You find some NAME on the subway!";
dEcstasy._highText = "Ravers are buying NAME at outrageous prices!";
dEcstasy.freeAmt = 6;
var dHeroin = (new com.DrugWars.Drug(0, "heroinIcon", 4000, 10000, -1, 10, -1, 10, 10));
dHeroin.addStreetName("Heroin");
dHeroin.addStreetName("Smack");
dHeroin.addStreetName("Dope");
dHeroin.addStreetName("Junk");
dHeroin.addKidName("Blowpops");
dHeroin.addKidName("Blowpops");
dHeroin.availability = 3;
dHeroin._highText = "Addicts will pay anything for NAME!";
dHeroin.freeChance = -1;
var dMarijuana = (new com.DrugWars.Drug(1, "marijuanaIcon", 300, 2000, 0.25, 2.5, 30, 80, 100));
dMarijuana.addStreetName("Marijuana");
dMarijuana.addStreetName("Weed");
dMarijuana.addStreetName("Pot");
dMarijuana.addStreetName("Reefer");
dMarijuana.addStreetName("Smoke");
dMarijuana.addStreetName("Ganja");
dMarijuana.addKidName("Chocolate");
dMarijuana.addKidName("Chocolate");
dMarijuana.availability = 2;
dMarijuana._lowText = "A Columbian shipment floors NAME prices!";
dMarijuana._highText = "A bust sends NAME prices sky-high!";
dMarijuana._freeText = "You find a bit of NAME in the taxi!";
dMarijuana.freeAmt = 8;
var dShrooms = (new com.DrugWars.Drug(1, "shroomsIcon", 300, 2000, 0.25, 2.5, 10, 70, 100));
dShrooms.addStreetName("Shrooms");
dShrooms.addStreetName("Mushrooms");
dShrooms.addStreetName("Psilocybes");
dShrooms.addStreetName("Boomers");
dShrooms.addKidName("Nerds");
dShrooms.addKidName("Nerds");
dShrooms.availability = 3;
dShrooms._lowText = "A recent thunderstorm floors NAME prices!";
dShrooms._highText = "A Phish concert comes to town and skyrockets NAME prices!";
dShrooms.freeChance = -1;
var dSpeed = (new com.DrugWars.Drug(1, "speedIcon", 300, 3000, 0.25, 8.5, 20, 80, 100));
dSpeed.addStreetName("Speed");
dSpeed.addStreetName("Amphetamines");
dSpeed.availability = 3;
dSpeed.addKidName("M&Ms");
dSpeed.addKidName("M&Ms");
dSpeed._lowText = "A recent shipment floors NAME prices!";
dSpeed._highText = "A bust sends NAME prices sky-high!";
dSpeed.freeChance = -1;
myInventory = myChar.myInventory;
myInventory.addDrugSpace(dAcid, 0);
myInventory.addDrugSpace(dCocaine, 1);
myInventory.addDrugSpace(dKetamine, 2);
myInventory.addDrugSpace(dEcstasy, 3);
myInventory.addDrugSpace(dHeroin, 4);
myInventory.addDrugSpace(dMarijuana, 5);
myInventory.addDrugSpace(dShrooms, 6);
myInventory.addDrugSpace(dSpeed, 7);
myInventory.traceVars();
charStats.updateDisplay();
trace("\n Inventory Dump");
_root.createEmptyMovieClip("inventory", _root.getNextHighestDepth());
var i = 0;
while (i < myInventory.numSpaces) {
var test = myInventory.getDrug(i);
var dName = test.__get__streetName();
currClip = _root.inventory.attachMovie("inventoryEntry", dName, _root.inventory.getNextHighestDepth());
if (!_global.innocenceMode) {
currClip.drugName.text = test.streetName;
} else {
currClip.drugName.text = test.kidName;
}
currClip._y = 2 + (i * 33);
currClip._x = 10;
currClip.myID = test.ID;
currClip.updateDisplay = function () {
var _local3 = myInventory.getDrug(this.myID);
if (!_global.innocenceMode) {
this.drugName.text = _local3.streetName;
} else {
this.drugName.text = _local3.kidName;
}
if (_local3.available) {
var _local4 = _local3.getPrice();
this.drugPrice.text = "$" + _local4;
this.drugCount.text = myInventory.getDrugCount(this.myID);
this.sellButton.enabled = true;
this.buyButton.enabled = true;
this.sellButton.gotoAndStop(1);
this.buyButton.gotoAndStop(1);
} else {
this.drugPrice.text = "n/a";
this.drugCount.text = myInventory.getDrugCount(this.myID);
this.sellButton.enabled = false;
this.sellButton.gotoAndStop("disabled");
this.buyButton.enabled = false;
this.buyButton.gotoAndStop("disabled");
}
charStats.updateDisplay();
};
currClip.updateDisplay();
currClip.buyButton.onRollOver = function () {
_root.codeClip.doSound("latch");
};
currClip.buyButton.onRelease = function () {
_root.codeClip.doSound("latch");
var _local4 = _root.attachMovie("transactionEntry", "tPop", _root.getNextHighestDepth());
_local4._x = (_local4._y = 0);
_local4.myID = this._parent.myID;
_local4.myParent = this._parent;
maxBuy = Math.floor(myChar.myLoot / myInventory.getDrug(this._parent.myID).getPrice());
maxHold = myInventory.freeSpace;
if (maxBuy <= maxHold) {
_local4.canBuy = maxBuy;
_local4.queryText.text = ((("At $" + myInventory.getDrug(this._parent.myID).getPrice()) + ", you can afford ") + _local4.canBuy) + ".";
} else {
_local4.canBuy = maxHold;
_local4.queryText.text = ((("At $" + myInventory.getDrug(this._parent.myID).getPrice()) + ", you can carry ") + _local4.canBuy) + ".";
}
_local4.drugCount.text = "0";
_local4.drugCount.restrict = "0-9";
_local4.okButton.onRelease = function () {
_root.codeClip.doSound("buy");
if (this._parent.drugCount.text == "") {
this._parent.drugCount.text = "0";
}
if (parseInt(this._parent.drugCount.text) > this._parent.canBuy) {
this._parent.drugCount.text = this._parent.canBuy;
}
myChar.myLoot = myChar.myLoot - (parseInt(this._parent.drugCount.text) * myInventory.getDrug(this._parent.myID).getPrice());
myInventory.addDrug(this._parent.myID, parseInt(this._parent.drugCount.text));
_global.drugsBought = true;
_root.inventory[myInventory.getDrug(this._parent.myID).streetName].updateDisplay();
this._parent.removeMovieClip();
};
_local4.allButton.onPress = function () {
_root.codeClip.doSound("latch");
this._parent.drugCount.text = this._parent.canBuy;
};
_local4.arrowUp.onPress = function () {
_root.codeClip.doSound("latch");
drugMax = this._parent.canBuy;
this.onEnterFrame = function () {
if (parseInt(this._parent.drugCount.text) < drugMax) {
this._parent.drugCount.text = parseInt(this._parent.drugCount.text) + 1;
}
};
};
_local4.arrowDown.onPress = function () {
_root.codeClip.doSound("latch");
this.onEnterFrame = function () {
if (parseInt(this._parent.drugCount.text) > 0) {
this._parent.drugCount.text = parseInt(this._parent.drugCount.text) - 1;
}
};
};
_local4.arrowUp.onReleaseOutside = (_local4.arrowDown.onReleaseOutside = (_local4.arrowUp.onRelease = (_local4.arrowDown.onRelease = function () {
delete this.onEnterFrame;
})));
};
currClip.sellButton.onRollOver = function () {
_root.codeClip.doSound("latch");
};
currClip.sellButton.onRelease = function () {
_root.codeClip.doSound("latch");
temp = _root.attachMovie("transactionEntry", "tPop", _root.getNextHighestDepth());
temp._x = (temp._y = 0);
temp.myID = this._parent.myID;
temp.myParent = this._parent;
temp.queryText.text = ((("You can sell " + myInventory.getDrugCount(this._parent.myID)) + " at $") + myInventory.getDrug(this._parent.myID).getPrice()) + ".";
temp.drugCount.text = "0";
temp.drugCount.restrict = "0-9";
temp.okButton.onRelease = function () {
_root.codeClip.doSound("sell");
var _local3 = myInventory.getDrugCount(this._parent.myID);
if (this._parent.dollarAmt.text == "") {
this._parent.dollarAmt.text = "0";
}
if (parseInt(this._parent.drugCount.text) * myInventory.getDrug(this._parent.myID).getPrice()) {
myChar.myLoot = myChar.myLoot + (parseInt(this._parent.drugCount.text) * myInventory.getDrug(this._parent.myID).getPrice());
}
myInventory.remDrug(this._parent.myID, parseInt(this._parent.drugCount.text));
_root.inventory[myInventory.getDrug(this._parent.myID).streetName].updateDisplay();
this._parent.removeMovieClip();
};
temp.allButton.onPress = function () {
_root.codeClip.doSound("latch");
this._parent.drugCount.text = myInventory.getDrugCount(this._parent.myID);
};
temp.arrowUp.onPress = function () {
_root.codeClip.doSound("latch");
drugMax = myInventory.getDrugCount(this._parent.myID);
this.onEnterFrame = function () {
if (parseInt(this._parent.drugCount.text) < drugMax) {
this._parent.drugCount.text = parseInt(this._parent.drugCount.text) + 1;
}
};
};
temp.arrowDown.onPress = function () {
_root.codeClip.doSound("latch");
this.onEnterFrame = function () {
if (parseInt(this._parent.drugCount.text) > 0) {
this._parent.drugCount.text = parseInt(this._parent.drugCount.text) - 1;
}
};
};
temp.arrowUp.onReleaseOutside = (temp.arrowDown.onReleaseOutside = (temp.arrowUp.onRelease = (temp.arrowDown.onRelease = function () {
delete this.onEnterFrame;
})));
delete temp;
};
i++;
}
if (_root.inventory.getDepth() > this.myStore.getDepth()) {
_root.inventory.swapDepths(this.myStore);
}
charStats.loanInc.onRollOver = function () {
_root.codeClip.doSound("latch");
};
charStats.loanInc.onRelease = function () {
if (myChar.myLoan <= 35000) {
if (myChar.myLoan <= 35000) {
if (!_global.loanedToday) {
_root.codeClip.doSound("latch");
temp = _root.attachMovie("moneyTransactionEntry", "tPop", _root.getNextHighestDepth());
temp._x = (temp._y = 0);
temp.queryText.text = ("You can borrow up to $" + loanMax) + ".";
temp.dollarAmt.text = "0";
temp.dollarAmt.restrict = "0-9";
temp.robbank.onRelease = function () {
_root.codeClip.doSound("latch");
this._parent.removeMovieClip();
if (!_global.robbedToday) {
temp = _root.attachMovie("queryPop", "qPop", _root.getNextHighestDepth());
temp._x = (temp._y = 0);
temp.noticeText.text = _root.getRobText();
temp.noButton.onPress = function () {
_root.codeClip.doSound("latch");
this._parent.removeMovieClip();
};
temp.yesButton.onPress = function () {
_root.codeClip.doSound("latch");
_root.robBank();
this._parent.removeMovieClip();
};
} else {
immediatePopup("You've already robbed the bank today. They're empty.");
}
};
temp.okButton.onRelease = function () {
_root.codeClip.doSound("latch");
if (this._parent.dollarAmt.text == "") {
this._parent.dollarAmt.text = "0";
}
if (parseInt(this._parent.dollarAmt.text) > loanMax) {
this._parent.dollarAmt.text = loanMax;
}
if (parseInt(this._parent.dollarAmt.text) > 0) {
_global.loanedToday = true;
myChar.myLoot = myChar.myLoot + parseInt(this._parent.dollarAmt.text);
myChar.myLoan = myChar.myLoan + parseInt(this._parent.dollarAmt.text);
}
charStats.updateDisplay();
this._parent.removeMovieClip();
};
temp.allButton.onPress = function () {
_root.codeClip.doSound("latch");
this._parent.dollarAmt.text = loanMax;
};
temp.arrowUp.onPress = function () {
_root.codeClip.doSound("latch");
this.onEnterFrame = function () {
if (parseInt(this._parent.dollarAmt.text) < loanMax) {
this._parent.dollarAmt.text = parseInt(this._parent.dollarAmt.text) + 1;
}
};
};
temp.arrowDown.onPress = function () {
_root.codeClip.doSound("latch");
this.onEnterFrame = function () {
if (parseInt(this._parent.dollarAmt.text) > 0) {
this._parent.dollarAmt.text = parseInt(this._parent.dollarAmt.text) - 1;
}
};
};
temp.arrowUp.onReleaseOutside = (temp.arrowDown.onReleaseOutside = (temp.arrowUp.onRelease = (temp.arrowDown.onRelease = function () {
delete this.onEnterFrame;
})));
delete temp;
} else {
_root.codeClip.doSound("nope");
immediatePopup("Sorry, but you've already taken a loan today!");
}
} else {
_root.codeClip.doSound("nope");
immediatePopup("Your loan is too high! Pay some back to access it again.");
}
} else {
_root.codeClip.doSound("nope");
immediatePopup("Your loan is too high! Pay some back to access it again.");
}
};
charStats.loanDec.onRollOver = function () {
_root.codeClip.doSound("latch");
};
charStats.loanDec.onRelease = function () {
temp = _root.attachMovie("moneyTransactionEntry", "tPop", _root.getNextHighestDepth());
temp._x = (temp._y = 0);
temp.maxAmt = myChar.myLoan;
if (myChar.myLoot < temp.maxAmt) {
temp.maxAmt = myChar.myLoot;
temp.queryText.text = ("You can afford to repay up to $" + temp.maxAmt) + ".";
} else {
temp.queryText.text = ("You can repay up to $" + temp.maxAmt) + ".";
}
temp.dollarAmt.text = "0";
temp.dollarAmt.restrict = "0-9";
temp.robbank.onRelease = function () {
_root.codeClip.doSound("latch");
this._parent.removeMovieClip();
if (!_global.robbedToday) {
temp = _root.attachMovie("queryPop", "qPop", _root.getNextHighestDepth());
temp._x = (temp._y = 0);
temp.noticeText.text = _root.getRobText();
temp.noButton.onPress = function () {
_root.codeClip.doSound("latch");
this._parent.removeMovieClip();
};
temp.yesButton.onPress = function () {
_root.codeClip.doSound("latch");
_root.robBank();
this._parent.removeMovieClip();
};
} else {
immediatePopup("You've already robbed the bank today. They're empty.");
}
};
temp.okButton.onRelease = function () {
_root.codeClip.doSound("latch");
if (this._parent.dollarAmt.text == "") {
this._parent.dollarAmt.text = "0";
}
if (parseInt(this._parent.dollarAmt.text) > this._parent.maxAmt) {
this._parent.dollarAmt.text = this._parent.maxAmt;
}
myChar.myLoot = myChar.myLoot - parseInt(this._parent.dollarAmt.text);
myChar.myLoan = myChar.myLoan - parseInt(this._parent.dollarAmt.text);
charStats.updateDisplay();
this._parent.removeMovieClip();
};
temp.allButton.onPress = function () {
_root.codeClip.doSound("latch");
this._parent.dollarAmt.text = this._parent.maxAmt;
};
temp.arrowUp.onPress = function () {
_root.codeClip.doSound("latch");
this.onEnterFrame = function () {
if (parseInt(this._parent.dollarAmt.text) < this._parent.maxAmt) {
this._parent.dollarAmt.text = parseInt(this._parent.dollarAmt.text) + 1;
}
};
};
temp.arrowDown.onPress = function () {
_root.codeClip.doSound("latch");
this.onEnterFrame = function () {
if (parseInt(this._parent.dollarAmt.text) > 0) {
this._parent.dollarAmt.text = parseInt(this._parent.dollarAmt.text) - 1;
}
};
};
temp.arrowUp.onReleaseOutside = (temp.arrowDown.onReleaseOutside = (temp.arrowUp.onRelease = (temp.arrowDown.onRelease = function () {
delete this.onEnterFrame;
})));
delete temp;
};
charStats.savInc.onRollOver = function () {
_root.codeClip.doSound("latch");
};
charStats.savInc.onRelease = function () {
_root.codeClip.doSound("latch");
temp = _root.attachMovie("moneyTransactionEntry", "tPop", _root.getNextHighestDepth());
temp._x = (temp._y = 0);
temp.queryText.text = ("You can deposit up to $" + myChar.myLoot) + ".";
temp.dollarAmt.text = "0";
temp.dollarAmt.restrict = "0-9";
temp.robbank.onRelease = function () {
_root.codeClip.doSound("latch");
this._parent.removeMovieClip();
if (!_global.robbedToday) {
temp = _root.attachMovie("queryPop", "qPop", _root.getNextHighestDepth());
temp._x = (temp._y = 0);
temp.noticeText.text = _root.getRobText();
temp.noButton.onPress = function () {
_root.codeClip.doSound("latch");
this._parent.removeMovieClip();
};
temp.yesButton.onPress = function () {
_root.codeClip.doSound("latch");
_root.robBank();
this._parent.removeMovieClip();
};
} else {
immediatePopup("You've already robbed the bank today. They're empty.");
}
};
temp.okButton.onRelease = function () {
_root.codeClip.doSound("latch");
if (this._parent.dollarAmt.text == "") {
this._parent.dollarAmt.text = "0";
}
if (parseInt(this._parent.dollarAmt.text) > myChar.myLoot) {
this._parent.dollarAmt.text = myChar.myLoot;
}
myChar.myLoot = myChar.myLoot - parseInt(this._parent.dollarAmt.text);
myChar.mySavings = myChar.mySavings + parseInt(this._parent.dollarAmt.text);
charStats.updateDisplay();
this._parent.removeMovieClip();
};
temp.allButton.onPress = function () {
_root.codeClip.doSound("latch");
this._parent.dollarAmt.text = myChar.myLoot;
};
temp.arrowUp.onPress = function () {
_root.codeClip.doSound("latch");
this.onEnterFrame = function () {
if (parseInt(this._parent.dollarAmt.text) < myChar.myLoot) {
this._parent.dollarAmt.text = parseInt(this._parent.dollarAmt.text) + 1;
}
};
};
temp.arrowDown.onPress = function () {
_root.codeClip.doSound("latch");
this.onEnterFrame = function () {
if (parseInt(this._parent.dollarAmt.text) > 0) {
this._parent.dollarAmt.text = parseInt(this._parent.dollarAmt.text) - 1;
}
};
};
temp.arrowUp.onReleaseOutside = (temp.arrowDown.onReleaseOutside = (temp.arrowUp.onRelease = (temp.arrowDown.onRelease = function () {
delete this.onEnterFrame;
})));
delete temp;
};
charStats.savDec.onRollOver = function () {
_root.codeClip.doSound("latch");
};
charStats.savDec.onRelease = function () {
_root.codeClip.doSound("latch");
temp = _root.attachMovie("moneyTransactionEntry", "tPop", _root.getNextHighestDepth());
temp._x = (temp._y = 0);
temp.maxAmt = myChar.mySavings;
temp.queryText.text = ("You can withdraw up to $" + temp.maxAmt) + ".";
temp.dollarAmt.text = "0";
temp.dollarAmt.restrict = "0-9";
temp.robbank.onRelease = function () {
_root.codeClip.doSound("latch");
this._parent.removeMovieClip();
if (!_global.robbedToday) {
temp = _root.attachMovie("queryPop", "qPop", _root.getNextHighestDepth());
temp._x = (temp._y = 0);
temp.noticeText.text = _root.getRobText();
temp.noButton.onPress = function () {
_root.codeClip.doSound("latch");
this._parent.removeMovieClip();
};
temp.yesButton.onPress = function () {
_root.codeClip.doSound("latch");
_root.robBank();
this._parent.removeMovieClip();
};
} else {
immediatePopup("You've already robbed the bank today. They're empty.");
}
};
temp.okButton.onRelease = function () {
_root.codeClip.doSound("latch");
if (this._parent.dollarAmt.text == "") {
this._parent.dollarAmt.text = "0";
}
if (parseInt(this._parent.dollarAmt.text) > this._parent.maxAmt) {
this._parent.dollarAmt.text = this._parent.maxAmt;
}
myChar.myLoot = myChar.myLoot + parseInt(this._parent.dollarAmt.text);
myChar.mySavings = myChar.mySavings - parseInt(this._parent.dollarAmt.text);
charStats.updateDisplay();
this._parent.removeMovieClip();
};
temp.allButton.onPress = function () {
_root.codeClip.doSound("latch");
this._parent.dollarAmt.text = this._parent.maxAmt;
};
temp.arrowUp.onPress = function () {
_root.codeClip.doSound("latch");
this.onEnterFrame = function () {
if (parseInt(this._parent.dollarAmt.text) < this._parent.maxAmt) {
this._parent.dollarAmt.text = parseInt(this._parent.dollarAmt.text) + 1;
}
};
};
temp.arrowDown.onPress = function () {
_root.codeClip.doSound("latch");
this.onEnterFrame = function () {
if (parseInt(this._parent.dollarAmt.text) > 0) {
this._parent.dollarAmt.text = parseInt(this._parent.dollarAmt.text) - 1;
}
};
};
temp.arrowUp.onReleaseOutside = (temp.arrowDown.onReleaseOutside = (temp.arrowUp.onRelease = (temp.arrowDown.onRelease = function () {
delete this.onEnterFrame;
})));
delete temp;
};
_global.loanedToday = false;
_root.inventory._xscale = (_root.inventory._yscale = 75);
_root.inventory._x = 5;
_root.inventory._y = 10;
_root.popupStack = new Array();
_root.phoneStack = new Array();
_global.immPopup = false;
currClip.seedButton.onPress();
charStats.updateDisplay();
changeBG();
disableLocation();
updateLocationList();
killLocation(0);
Instance of Symbol 7 MovieClip [Xray Connector 7-OS] in Frame 8
//component parameters
onClipEvent (construct) {
classPackages = [];
classPackages[0] = "com";
classPackages[1] = "mx";
classPackages[2] = "flash";
showFPS = false;
}
Instance of Symbol 1803 MovieClip "bgFlight" in Frame 8
onClipEvent (load) {
function flyTo(locID) {
clearInterval(this.myDelay);
this.locID = locID;
this.myDelay = setInterval(this, "flyToA", 1000);
trace("FLYINGMC: " + _root.flying_mc);
_root.flying_mc.swapDepths(_root.getNextHighestDepth());
_root.flying_mc._visible = true;
_root.flying_mc.gotoAndPlay(1);
_root.flying_mc.locID = locID;
}
function flyToA() {
this.destMarker.flyTo(this.locID);
clearInterval(this.myDelay);
}
function flyTo2() {
clearInterval(this.myDelay);
this.myDelay = setInterval(this, "flyTo2A", 1000);
}
function flyTo2A() {
this.swapDepths(this.origLevel);
clearInterval(this.myDelay);
}
this.myDelay = -1;
this.origLevel = this.getDepth();
this.onPress = function () {
};
this.useHandCursor = false;
}
Instance of Symbol 1931 MovieClip "myStore" in Frame 8
/* no clip actions */
Instance of Symbol 1651 MovieClip "soundControls" in Frame 8
onClipEvent (load) {
this.mutebtn.onPress = function () {
_root.codeClip.doSound("clipEmpty");
trace(this._parent.vis._currentframe);
this._parent.vis.gotoAndPlay("off");
trace(this._parent.vis._currentframe);
this._parent._parent.codeClip.gameMusic.stop();
};
this.playbtn.onPress = function () {
_root.codeClip.doSound("clipEmpty");
this._parent.vis.gotoAndStop("on");
this._parent._parent.codeClip.gameMusic.stop();
this._parent._parent.codeClip.gameMusic.start(this._parent._parent.codeClip.gameMusic.position / 1000, 999);
};
}
Symbol 7 MovieClip [Xray Connector 7-OS] Frame 1
#initclip 26
com.blitzagency.xray.Xray.init();
this.onLoad = function () {
com.blitzagency.xray.Xray.initConnections();
};
#endinitclip
if (!_global.isLivePreview) {
label._visible = false;
if (this.showFPS) {
com.blitzagency.xray.Xray.createFPSMeter(this);
}
if (this.classPackages != undefined) {
com.blitzagency.xray.Xray.addPackages(this.classPackages);
}
}
Symbol 1932 MovieClip [__Packages.com.DrugWars.Dealer] Frame 0
class com.DrugWars.Dealer extends MovieClip
{
var userName, ammo, myLoan, myLoot, mySavings, savingsIR, loanIR, rivalsKilled, copsKilled, myInventory, currHP, maxHP, _notoriety;
function Dealer () {
super();
userName = "Player";
ammo = 0;
myLoan = 5500;
myLoot = 2000;
mySavings = 0;
savingsIR = 0.06;
loanIR = 0.12;
notoriety = (0);
rivalsKilled = 0;
copsKilled = 0;
myInventory = new com.DrugWars.Inventory();
currHP = 100;
maxHP = 100;
}
function loseProduct() {
myInventory.halfEmpty();
}
function set notoriety(newLevel) {
_notoriety = newLevel;
//return(notoriety);
}
function get notoriety() {
return(_notArray[Math.floor(_notoriety)]);
}
function calcLoan() {
myLoan = Math.floor(myLoan + (myLoan * loanIR));
}
function calcSavings() {
mySavings = Math.floor(mySavings + (mySavings * savingsIR));
}
function traceVars() {
trace("\t-------------------------");
trace("\tName: " + userName);
trace("\t-------------------------");
var _local2;
for (_local2 in this) {
trace((("\t " + _local2) + " : ") + this[_local2]);
}
trace("\tInventory Max: " + myInventory.drugLimit);
trace("\tInventory Free: " + myInventory.__get__freeSpace());
trace("\t-------------------------");
}
var _notArray = ["Newbie", "Hoodlum", "Thug", "Gangster", "Made Man", "Don"];
}
Symbol 1933 MovieClip [__Packages.com.DrugWars.Inventory] Frame 0
class com.DrugWars.Inventory
{
var drugArray, weaponArray, drugLimit;
function Inventory () {
drugArray = new Array();
weaponArray = new Array();
drugLimit = 100;
}
function get numSpaces() {
return(drugArray.length);
}
function addDrugSpace(drug, drugID) {
drug.ID = drugID;
drugArray.push([drug, 0]);
}
function addDrug(drugID, quantity) {
if ((freeSpace - quantity) < 0) {
quantity = freeSpace;
}
drugArray[getArrayIndex(drugID)][1] = drugArray[getArrayIndex(drugID)][1] + quantity;
}
function remDrug(drugID, quantity) {
if ((getDrugCount(drugID) - quantity) < 0) {
quantity = getDrugCount(drugID);
}
addDrug(drugID, -quantity);
}
function getDrugCount(drugID) {
return(drugArray[getArrayIndex(drugID)][1]);
}
function getArrayIndex(drugID) {
var _local3 = -1;
var _local2 = 0;
while (_local2 < drugArray.length) {
if (drugArray[_local2][0].ID == drugID) {
_local3 = _local2;
}
_local2++;
}
return(_local3);
}
function halfEmpty() {
var _local2 = 0;
while (_local2 < drugArray.length) {
if (drugArray[_local2][1] > 1) {
trace((("WIPING " + Math.floor(drugArray[_local2][1] / 2)) + " of ") + drugArray[_local2][0].streetName);
drugArray[_local2][1] = Math.floor(drugArray[_local2][1] * 0.5);
}
_local2++;
}
}
function get freeSpace() {
var _local3 = drugLimit;
var _local2 = 0;
while (_local2 < drugArray.length) {
_local3 = _local3 - drugArray[_local2][1];
_local2++;
}
return(_local3);
}
function traceVars() {
trace((("INVENTORY MAX: " + drugLimit) + ", FREE: ") + freeSpace);
trace("DRUGS :");
var _local2 = 0;
while (_local2 < drugArray.length) {
trace((("\t" + drugArray[_local2][0].streetName) + ", Count: ") + drugArray[_local2][1]);
drugArray[_local2][0].traceVars();
_local2++;
}
trace("WEAPONS :");
_local2 = 0;
while (_local2 < weaponArray.length) {
trace((("\t" + weaponArray[_local2][0].weaponName) + ", Ammunition: ") + weaponArray[_local2][1]);
weaponArray[_local2][0].traceVars();
_local2++;
}
}
function getDrug(index) {
return(drugArray[index][0]);
}
function seedDrugs() {
var _local2 = 0;
while (_local2 < drugArray.length) {
drugArray[_local2][0].seedPrice();
drugArray[_local2][0].traceVars();
_local2++;
}
}
function freeDrugs() {
var _local3 = -1;
var _local2 = 0;
while (_local2 < drugArray.length) {
if ((drugArray[_local2][0].randRange(1, 100) <= drugArray[_local2][0].freeChance) && (_local3 == -1)) {
_local3 = drugArray[_local2][0].ID;
}
_local2++;
}
return(_local3);
}
}
Symbol 1934 MovieClip [__Packages.com.DrugWars.Drug] Frame 0
class com.DrugWars.Drug
{
var ID, symbolName, highPrice, lowPrice, highMod, lowMod, highMode, lowMode, highTrigger, lowTrigger, _highText, _lowText, _freeText, freeChance, freeAmt, maxNum, streetNames, kidNames, availability, basePrice, currPrice, available;
function Drug (dID, sName, lPrice, hPrice, lMod, hMod, lTrigger, hTrigger, mNum) {
ID = dID;
symbolName = sName;
highPrice = hPrice;
lowPrice = lPrice;
highMod = hMod;
lowMod = lMod;
highMode = false;
lowMode = false;
highTrigger = hTrigger;
lowTrigger = lTrigger;
_highText = "Availability drops. NAME prices are through the roof!";
_lowText = "A big shipment arrives. NAME prices are on the low-low!";
_freeText = "You find some NAME in a locker!";
freeChance = 3;
freeAmt = 3;
if (mNum == undefined) {
mNum = 10;
}
maxNum = mNum;
streetNames = new Array();
kidNames = new Array();
availability = 5;
seedPrice();
}
function get streetName() {
return(streetNames[0]);
}
function get kidName() {
return(kidNames[0]);
}
function addStreetName(sName) {
streetNames.push(sName);
}
function addKidName(sName) {
trace(("\n\n KID NAME : " + sName) + "\n\n");
kidNames.push(sName);
}
function getStreetName(index) {
if (index == undefined) {
index = randRange(1, streetNames.length - 1);
}
return(streetNames[index]);
}
function getKidName(index) {
if (index == undefined) {
index = randRange(1, kidNames.length - 1);
}
return(kidNames[index]);
}
function randRange(min, max) {
var _local1 = Math.floor(Math.random() * ((max - min) + 1)) + min;
return(_local1);
}
function seedPrice() {
var _local2 = (highMode = (lowMode = false));
basePrice = (currPrice = randRange(lowPrice, highPrice));
_local2 = randRange(1, maxNum) >= highTrigger;
highMode = _local2;
if (!_local2) {
_local2 = randRange(1, maxNum) <= lowTrigger;
lowMode = _local2;
}
if (highMode) {
currPrice = currPrice * randRange(1, highMod);
} else if (lowMode) {
currPrice = currPrice * (randRange(lowMod * 10, 10) / 10);
}
available = randRange(1, 10) >= availability;
return(_local2);
}
function getPrice() {
return(Math.floor(currPrice));
}
function traceVars() {
trace("\t-------------------------");
trace("\tName: " + streetName);
trace("\tKidName: " + kidName);
trace("\t-------------------------");
var _local2;
for (_local2 in this) {
trace((("\t " + _local2) + " : ") + this[_local2]);
}
trace("\tStreet Price: " + getPrice());
trace("\thighText: " + highText);
trace("\tlowText: " + lowText);
trace("\tfreeText: " + freeText);
trace("\t-------------------------");
}
function toString() {
return("Drug " + streetName);
}
function get highText() {
var _local2 = _highText.indexOf("NAME");
return((_highText.substr(0, _local2) + getStreetName()) + _highText.substr(_local2 + 4));
}
function get lowText() {
var _local2 = _lowText.indexOf("NAME");
return((_lowText.substr(0, _local2) + getStreetName()) + _lowText.substr(_local2 + 4));
}
function get freeText() {
var _local2 = _freeText.indexOf("NAME");
return((_freeText.substr(0, _local2) + getStreetName()) + _freeText.substr(_local2 + 4));
}
function get kid_highText() {
var _local2 = _highText.indexOf("NAME");
return((_highText.substr(0, _local2) + getKidName()) + _highText.substr(_local2 + 4));
}
function get kid_lowText() {
var _local2 = _lowText.indexOf("NAME");
return((_lowText.substr(0, _local2) + getKidName()) + _lowText.substr(_local2 + 4));
}
function get kid_freeText() {
var _local2 = _freeText.indexOf("NAME");
return((_freeText.substr(0, _local2) + getKidName()) + _freeText.substr(_local2 + 4));
}
}
Symbol 1935 MovieClip [__Packages.com.DrugWars.Player] Frame 0
class com.DrugWars.Player extends com.DrugWars.Dealer
{
var locationStack, _myLocation, phoneCount, userName, myInventory;
function Player () {
super();
locationStack = new Array();
_myLocation = -1;
phoneCount = 0;
}
function addLocation(location, available) {
if (available != undefined) {
location.available = available;
}
locationStack.push(location);
}
function changeLocation(newID) {
myLocation = (newID);
}
function set myLocation(newID) {
_myLocation = newID;
//return(myLocation);
}
function get myLocation() {
return(_myLocation);
}
function getLocation(ID) {
return(locationStack[ID]);
}
function enableLocation(ID) {
trace("\tENABLED LOCATION: " + ID);
var _local2 = locationStack[ID];
_local2.available = true;
locationStack[ID] = _local2;
trace("\t\tLOCATION.available: " + locationStack[ID].available);
}
function disableLocation(ID) {
trace("\tDISABLED LOCATION: " + ID);
locationStack[ID].enableMe(false);
trace("\t\tLOCATION.available: " + locationStack[ID].available);
}
function getCurrentLocation() {
return(locationStack[_myLocation]);
}
function traceVars() {
trace("\t-------------------------");
trace("\tName: " + userName);
trace("\t-------------------------");
var _local2;
for (_local2 in this) {
trace((("\t " + _local2) + " : ") + this[_local2]);
}
trace("\tInventory Max: " + myInventory.drugLimit);
trace("\tInventory Free: " + myInventory.__get__freeSpace());
trace("\t-------------------------");
}
}
Symbol 1936 MovieClip [__Packages.com.DrugWars.Location] Frame 0
class com.DrugWars.Location extends MovieClip
{
var myName, rivalChance, copChance, visitCount, bgClip, spriteConf, robbedBank, Calendar;
function Location (sName, rivals, cops, maxDays, mcIdentifier, cChance, rChance, spriteArr) {
super();
myName = sName;
rivalChance = rivals;
copChance = cops;
visitCount = 0;
bgClip = mcIdentifier;
available = true;
spriteConf = spriteArr;
robbedBank = false;
Calendar = new com.DrugWars.Calendar(maxDays, cChance, rChance);
}
function enableMe(bool) {
available = bool;
traceVars();
}
function traceVars() {
trace("\t-------------------------");
trace("\tDay: " + myName);
trace("\t-------------------------");
var _local2;
for (_local2 in this) {
trace((("\t " + _local2) + " : ") + this[_local2]);
}
trace("\t-------------------------");
}
var available = true;
}
Symbol 1937 MovieClip [__Packages.com.DrugWars.Calendar] Frame 0
class com.DrugWars.Calendar extends MovieClip
{
var currDay, numDays, dayArray, __get__loaned;
function Calendar (numD, cChance, rChance) {
super();
currDay = 1;
numDays = numD;
dayArray = new Array();
buildDays(cChance, rChance);
}
function buildDays(cChance, rChance) {
var _local3;
var _local2 = 1;
while (_local2 <= numDays) {
_local3 = new com.DrugWars.Day(_local2, cChance, rChance);
_local3.__set__loanedAmt(0);
dayArray.push(_local3);
dayArray[dayArray.length - 1].traceVars();
_local2++;
}
}
function getDay(dayNum) {
return(dayArray[dayNum - 1]);
}
function setDay(dayNum) {
currDay = dayNum;
}
function set loaned(loanAmt) {
currentDay.__set__loanedAmt(loanAmt);
//return(__get__loaned());
}
function get currentDay() {
return(getDay(currDay));
}
function nextDay() {
currDay++;
}
function get currentDayNum() {
return(currDay);
}
function traceVars() {
trace("\t-------------------------");
trace("\tCalendar NumDays: " + numDays);
trace("\t-------------------------");
var _local2;
for (_local2 in this) {
trace((("\t " + _local2) + " : ") + this[_local2]);
}
trace("\t-------------------------");
}
}
Symbol 1938 MovieClip [__Packages.com.DrugWars.Day] Frame 0
class com.DrugWars.Day extends MovieClip
{
var cChance, rChance, copMode, rivalMode, dayNum, _loanedAmt;
function Day (dNum, cChance, rChance) {
super();
this.cChance = cChance;
this.rChance = rChance;
copMode = randRange(1, 100) <= this.cChance;
if (!copMode) {
rivalMode = randRange(1, 100) <= this.rChance;
} else {
rivalMode = false;
}
dayNum = dNum;
_loanedAmt = 0;
}
function set loanedAmt(loanAmt) {
trace(((((("DAY " + dayNum) + " - Changing current loanedAmt of ") + _loanedAmt) + " to ") + loanAmt) + ".");
_loanedAmt = loanAmt;
//return(loanedAmt);
}
function incLoan(loanAmt) {
trace((((("DAY " + dayNum) + " - Adding ") + loanAmt) + " to current loanedAmt of ") + _loanedAmt);
_loanedAmt = _loanedAmt + loanAmt;
}
function get loanedAmt() {
return(_loanedAmt);
}
function randRange(min, max) {
var _local1 = Math.floor(Math.random() * ((max - min) + 1)) + min;
return(_local1);
}
function traceVars() {
trace("\t-------------------------");
trace("\tDay: " + dayNum);
trace("\t-------------------------");
var _local2;
for (_local2 in this) {
trace((("\t " + _local2) + " : ") + this[_local2]);
}
trace("\t-------------------------");
}
}
Symbol 1939 MovieClip [__Packages.mx.transitions.OnEnterFrameBeacon] Frame 0
class mx.transitions.OnEnterFrameBeacon
{
function OnEnterFrameBeacon () {
}
static function init() {
var _local4 = _global.MovieClip;
if (!_root.__OnEnterFrameBeacon) {
mx.transitions.BroadcasterMX.initialize(_local4);
var _local3 = _root.createEmptyMovieClip("__OnEnterFrameBeacon", 9876);
_local3.onEnterFrame = function () {
_global.MovieClip.broadcastMessage("onEnterFrame");
};
}
}
static var version = "1.1.0.52";
}
Symbol 1940 MovieClip [__Packages.mx.transitions.BroadcasterMX] Frame 0
class mx.transitions.BroadcasterMX
{
var _listeners;
function BroadcasterMX () {
}
static function initialize(o, dontCreateArray) {
if (o.broadcastMessage != undefined) {
delete o.broadcastMessage;
}
o.addListener = mx.transitions.BroadcasterMX.prototype.addListener;
o.removeListener = mx.transitions.BroadcasterMX.prototype.removeListener;
if (!dontCreateArray) {
o._listeners = new Array();
}
}
function addListener(o) {
removeListener(o);
if (broadcastMessage == undefined) {
broadcastMessage = mx.transitions.BroadcasterMX.prototype.broadcastMessage;
}
return(_listeners.push(o));
}
function removeListener(o) {
var _local2 = _listeners;
var _local3 = _local2.length;
while (_local3--) {
if (_local2[_local3] == o) {
_local2.splice(_local3, 1);
if (!_local2.length) {
broadcastMessage = undefined;
}
return(true);
}
}
return(false);
}
function broadcastMessage() {
var _local5 = String(arguments.shift());
var _local4 = _listeners.concat();
var _local6 = _local4.length;
var _local3 = 0;
while (_local3 < _local6) {
_local4[_local3][_local5].apply(_local4[_local3], arguments);
_local3++;
}
}
static var version = "1.1.0.52";
}
Symbol 1941 MovieClip [__Packages.mx.transitions.Tween] Frame 0
class mx.transitions.Tween
{
var obj, prop, begin, useSeconds, _listeners, addListener, prevTime, _time, looping, _duration, broadcastMessage, isPlaying, _fps, prevPos, _pos, change, _intervalID, _startTime;
function Tween (obj, prop, func, begin, finish, duration, useSeconds) {
mx.transitions.OnEnterFrameBeacon.init();
if (!arguments.length) {
return;
}
this.obj = obj;
this.prop = prop;
this.begin = begin;
position = (begin);
this.duration = (duration);
this.useSeconds = useSeconds;
if (func) {
this.func = func;
}
this.finish = (finish);
_listeners = [];
addListener(this);
start();
}
function set time(t) {
prevTime = _time;
if (t > duration) {
if (looping) {
rewind(t - _duration);
update();
broadcastMessage("onMotionLooped", this);
} else {
if (useSeconds) {
_time = _duration;
update();
}
stop();
broadcastMessage("onMotionFinished", this);
}
} else if (t < 0) {
rewind();
update();
} else {
_time = t;
update();
}
//return(time);
}
function get time() {
return(_time);
}
function set duration(d) {
_duration = (((d == null) || (d <= 0)) ? (_global.Infinity) : (d));
//return(duration);
}
function get duration() {
return(_duration);
}
function set FPS(fps) {
var _local2 = isPlaying;
stopEnterFrame();
_fps = fps;
if (_local2) {
startEnterFrame();
}
//return(FPS);
}
function get FPS() {
return(_fps);
}
function set position(p) {
setPosition(p);
//return(position);
}
function setPosition(p) {
prevPos = _pos;
obj[prop] = (_pos = p);
broadcastMessage("onMotionChanged", this, _pos);
updateAfterEvent();
}
function get position() {
return(getPosition());
}
function getPosition(t) {
if (t == undefined) {
t = _time;
}
return(func(t, begin, change, _duration));
}
function set finish(f) {
change = f - begin;
//return(finish);
}
function get finish() {
return(begin + change);
}
function continueTo(finish, duration) {
begin = position;
this.finish = (finish);
if (duration != undefined) {
this.duration = (duration);
}
start();
}
function yoyo() {
continueTo(begin, time);
}
function startEnterFrame() {
if (_fps == undefined) {
_global.MovieClip.addListener(this);
} else {
_intervalID = setInterval(this, "onEnterFrame", 1000 / _fps);
}
isPlaying = true;
}
function stopEnterFrame() {
if (_fps == undefined) {
_global.MovieClip.removeListener(this);
} else {
clearInterval(_intervalID);
}
isPlaying = false;
}
function start() {
rewind();
startEnterFrame();
broadcastMessage("onMotionStarted", this);
}
function stop() {
stopEnterFrame();
broadcastMessage("onMotionStopped", this);
}
function resume() {
fixTime();
startEnterFrame();
broadcastMessage("onMotionResumed", this);
}
function rewind(t) {
_time = ((t == undefined) ? 0 : (t));
fixTime();
update();
}
function fforward() {
time = (_duration);
fixTime();
}
function nextFrame() {
if (useSeconds) {
time = ((getTimer() - _startTime) / 1000);
} else {
time = (_time + 1);
}
}
function onEnterFrame() {
nextFrame();
}
function prevFrame() {
if (!useSeconds) {
time = (_time - 1);
}
}
function toString() {
return("[Tween]");
}
function fixTime() {
if (useSeconds) {
_startTime = getTimer() - (_time * 1000);
}
}
function update() {
position = (getPosition(_time));
}
static var version = "1.1.0.52";
static var __initBeacon = mx.transitions.OnEnterFrameBeacon.init();
static var __initBroadcaster = mx.transitions.BroadcasterMX.initialize(mx.transitions.Tween.prototype, true);
function func(t, b, c, d) {
return(((c * t) / d) + b);
}
}
Symbol 1942 MovieClip [__Packages.mx.transitions.easing.Strong] Frame 0
class mx.transitions.easing.Strong
{
function Strong () {
}
static function easeIn(t, b, c, d) {
t = t / d;
return((((((c * t) * t) * t) * t) * t) + b);
}
static function easeOut(t, b, c, d) {
t = (t / d) - 1;
return((c * (((((t * t) * t) * t) * t) + 1)) + b);
}
static function easeInOut(t, b, c, d) {
t = t / (d / 2);
if (t < 1) {
return(((((((c / 2) * t) * t) * t) * t) * t) + b);
}
t = t - 2;
return(((c / 2) * (((((t * t) * t) * t) * t) + 2)) + b);
}
static var version = "1.1.0.52";
}
Symbol 4 MovieClip [__Packages.com.blitzagency.xray.Xray] Frame 0
class com.blitzagency.xray.Xray
{
static var recursionControl, xrayTrace, pointConverter, fpsMeter, functionName, lc_info, lc_exec;
function Xray () {
}
static function init() {
recursionControl = 0;
xrayTrace = com.blitzagency.xray.XrayTrace.getInstance();
_global.view = function () {
com.blitzagency.xray.Xray.xrayTrace.trace.apply(com.blitzagency.xray.Xray.xrayTrace, arguments);
};
_global.tt = function () {
com.blitzagency.xray.Xray.xrayTrace.trace.apply(com.blitzagency.xray.Xray.xrayTrace, arguments);
};
pointConverter = com.blitzagency.util.PointConverter.getInstance();
fpsMeter = com.blitzagency.xray.FPSMeter.getInstance();
fpsMeter.addEventListener("onFpsUpdate", com.blitzagency.util.Delegate.create(com.blitzagency.xray.Xray, updateFps));
functionName = com.blitzagency.xray.FunctionName.getInstance();
_global.tf = function () {
com.blitzagency.xray.Xray.functionName.traceFunction.apply(com.blitzagency.xray.Xray.functionName, arguments);
};
if (!_global.isLivePreview) {
com.blitzagency.xray.ClassPath.registerPackage("mx");
if (lc_info) {
return(undefined);
}
lc_exec = new com.blitzagency.xray.ControlConnection();
lc_info = new com.blitzagency.xray.LoggerConnection();
}
}
static function addPackages(ary) {
var _local1 = 0;
while (_local1 < ary.length) {
if (ary[_local1] != "") {
com.blitzagency.xray.ClassPath.registerPackage(ary[_local1]);
}
_local1++;
}
}
static function trace() {
xrayTrace.trace.apply(_global.AdminTool, arguments);
}
static function tt() {
xrayTrace.trace.apply(xrayTrace, arguments);
}
static function tf() {
_global.FunctionName.traceFunction.apply(_global.FunctionName, arguments);
}
static function updateFps(obj) {
lc_exec.sendFPS(obj);
}
static function createFPSMeter(target_mc) {
target_mc = ((!target_mc) ? (_level0) : (target_mc));
var _local2 = target_mc.createEmptyMovieClip("fpsContainer", target_mc.getNextHighestDepth());
_local2.cacheAsBitmap = true;
_local2.createTextField("fps", 1, 0, 0, 40, 22);
_local2.embedFonts = false;
_local2.textFormat = new TextFormat();
_local2.textFormat.font = "_sans";
_local2.textFormat.size = 10;
_local2.fps.setNewTextFormat(_local2.textFormat);
_local2.fps.setTextFormat(_local2.textFormat);
_local2.updateFps = function (obj) {
this.fps.text = obj.fps;
};
fpsMeter.__set__runFPS(true);
fpsMeter.addEventListener("onFpsUpdate", com.blitzagency.util.Delegate.create(_local2, _local2.updateFps));
return(_local2);
}
static function initConnections() {
var _local2 = lc_exec.initConnection();
var _local3 = lc_info.initConnection();
if (_local2) {
lc_exec.send("_xray_conn", "checkFPSOn");
}
_global.tt("Connections", (_local2 + " | ") + _local3);
}
}
Symbol 8 MovieClip [__Packages.com.blitzagency.util.Delegate] Frame 0
class com.blitzagency.util.Delegate
{
function Delegate () {
}
static function create(target, handler) {
var _local4 = arguments.slice(2);
var _local3;
_local3 = function () {
var _local2 = arguments.callee;
var _local3 = _local2.extraArgs;
var _local6 = _local2.handler;
var _local4 = _local2.target;
var _local5 = arguments.concat(_local3, [_local2]);
return(_local6.apply(_local4, _local5));
};
_local3.extraArgs = _local4;
_local3.handler = handler;
_local3.target = target;
return(_local3);
}
}
Symbol 9 MovieClip [__Packages.com.blitzagency.xray.Watch] Frame 0
class com.blitzagency.xray.Watch
{
function Watch () {
}
static function createCallBack(obj, prop_str, callBack) {
var _local1 = obj[prop_str];
obj.watch(prop_str, _functionChanged, callBack);
obj[prop_str] = undefined;
if (_local1) {
obj[prop_str] = _local1;
}
}
static function removeCallBack(obj, prop_str, callBack) {
obj.unwatch(prop_str);
var _local2 = obj[prop_str];
var _local6;
var _local3;
var _local5 = new Array();
while (true) {
_local3 = _local2.callBack;
if (typeof(_local3) == "function") {
_local6 = _local2.newVal;
_local2.callBack = undefined;
if ((_local3 == callBack) || (callBack == undefined)) {
break;
}
_local5.push(_local3);
_local2 = _local6;
} else {
break;
}
}
if (_local6) {
obj[prop_str] = _local6;
} else {
delete obj[prop_str];
}
var _local1 = 0;
while (_local1 < _local5.length) {
callBack = _local5[_local1];
createCallBack(obj, prop_str, callBack);
_local1++;
}
}
static function _functionChanged(prop_str, oldVal, newVal, callBack) {
var _local3 = function () {
var _local3 = arguments.callee;
var _local5 = _local3.newVal;
var _local4 = _local3.callBack;
_local5.apply(this, arguments);
_local4.apply(this, arguments);
};
_local3.newVal = newVal;
_local3.callBack = callBack;
return(_local3);
}
}
Symbol 10 MovieClip [__Packages.com.blitzagency.xray.DragableMovieClip] Frame 0
class com.blitzagency.xray.DragableMovieClip extends MovieClip
{
static var _instance;
var broadcastMessage, startDrag, ___onMouseMove, onMouseMove, stopDrag;
function DragableMovieClip () {
super();
}
static function initialize(mc, restriction_obj) {
if (!_instance) {
_instance = new com.blitzagency.xray.DragableMovieClip();
}
var _local2 = arguments.slice(2);
_instance._enable.apply(_instance, [mc, restriction_obj].concat(_local2));
}
function _customOnPress(restriction_obj) {
var _local4 = arguments.slice(1);
broadcastMessage.apply(this, ["onDragPress", this].concat(_local4));
if (restriction_obj) {
startDrag(false, restriction_obj.left, restriction_obj.top, restriction_obj.right, restriction_obj.bottom);
} else {
startDrag();
}
___onMouseMove = onMouseMove;
onMouseMove = updateAfterEvent;
}
function _customOnRelease() {
stopDrag();
com.blitzagency.xray.Xray.lc_exec.updateHistory(this);
onMouseMove = ___onMouseMove;
broadcastMessage.apply(this, ["onDragRelease", this].concat(arguments));
}
function _enable(mc, restriction_obj) {
AsBroadcaster.initialize(mc);
var _local5 = arguments.slice(2);
var _local6 = com.blitzagency.util.Delegate.create.apply(com.blitzagency.util.Delegate, [mc, _customOnPress, restriction_obj].concat(_local5));
var _local4 = com.blitzagency.util.Delegate.create.apply(com.blitzagency.util.Delegate, [mc, _customOnRelease].concat(_local5));
mc.__removeReferenceDelegatePress__ = _local6;
mc.__removeReferenceDelegateRelease__ = _local4;
com.blitzagency.xray.Watch.createCallBack(mc, "onPress", _local6);
com.blitzagency.xray.Watch.createCallBack(mc, "onRelease", _local4);
com.blitzagency.xray.Watch.createCallBack(mc, "onReleaseOutside", _local4);
}
static function remove(mc) {
var _local3 = mc.__removeReferenceDelegatePress__;
var _local2 = mc.__removeReferenceDelegateRelease__;
if (_local3 && (_local2)) {
delete mc.__removeReferenceDelegatePress__;
delete mc.__removeReferenceDelegateRelease__;
com.blitzagency.xray.Watch.removeCallBack(mc, "onPress", _local3);
com.blitzagency.xray.Watch.removeCallBack(mc, "onRelease", _local2);
com.blitzagency.xray.Watch.removeCallBack(mc, "onReleaseOutside", _local2);
}
}
}
Symbol 11 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 12 MovieClip [__Packages.com.blitzagency.xray.ClassPath] Frame 0
class com.blitzagency.xray.ClassPath
{
static var check, fullPath;
function ClassPath () {
}
static function registerPackage(packageName) {
if (check == undefined) {
check = [];
intrinsicPusher(_global.ASSetNative, "ASSetNative");
intrinsicPusher(_global.ASSetNativeAccessor, "ASSetNativeAccessor");
intrinsicPusher(_global.ASconstructor, "ASconstructor");
intrinsicPusher(_global.ASnative, "ASnative");
intrinsicPusher(_global.Accessibility, "Accessibility");
intrinsicPusher(_global.Array, "Array");
intrinsicPusher(_global.AsBroadcaster, "AsBroadcaster");
intrinsicPusher(_global.AsSetupError, "AsSetupError");
intrinsicPusher(_global.Boolean, "Boolean");
intrinsicPusher(_global.Button, "Button");
intrinsicPusher(_global.Camera, "Camera");
intrinsicPusher(_global.Color, "Color");
intrinsicPusher(_global.ContextMenu, "ContextMenu");
intrinsicPusher(_global.ContextMenuItem, "ContextMenuItem");
intrinsicPusher(_global.Cookie, "Cookie");
intrinsicPusher(_global.CustomActions, "CustomActions");
intrinsicPusher(_global.Date, "Date");
intrinsicPusher(_global.Error, "Error");
intrinsicPusher(_global.FWEndCommand, "FWEndCommand");
intrinsicPusher(_global.FWJavascript, "FWJavascript");
intrinsicPusher(_global.Function, "Function");
intrinsicPusher(_global.Key, "Key");
intrinsicPusher(_global.LoadVars, "LoadVars");
intrinsicPusher(_global.LocalConnection, "LocalConnection");
intrinsicPusher(_global.MMEndCommand, "MMEndCommand");
intrinsicPusher(_global.MMExecute, "MMExecute");
intrinsicPusher(_global.MMSave, "MMSave");
intrinsicPusher(_global.Math, "Math");
intrinsicPusher(_global.Microphone, "Microphone");
intrinsicPusher(_global.Mouse, "Mouse");
intrinsicPusher(_global.MovieClip, "MovieClip");
intrinsicPusher(_global.MovieClipLoader, "MovieClipLoader");
intrinsicPusher(_global.NetConnection, "NetConnection");
intrinsicPusher(_global.NetStream, "NetStream");
intrinsicPusher(_global.Number, "Number");
intrinsicPusher(_global.Object, "Object");
intrinsicPusher(_global.PrintJob, "PrintJob");
intrinsicPusher(_global.RemoteLSOUsage, "RemoteLSOUsage");
intrinsicPusher(_global.Selection, "Selection");
intrinsicPusher(_global.SharedObject, "SharedObject");
intrinsicPusher(_global.Sound, "Sound");
intrinsicPusher(_global.Stage, "Stage");
intrinsicPusher(_global.String, "String");
intrinsicPusher(_global.System, "System");
intrinsicPusher(_global.TextField, "TextField");
intrinsicPusher(_global.TextFormat, "TextFormat");
intrinsicPusher(_global.TextSnapshot, "TextSnapshot");
intrinsicPusher(_global.Video, "Video");
intrinsicPusher(_global.XML, "XML");
intrinsicPusher(_global.XMLNode, "XMLNode");
intrinsicPusher(_global.XMLSocket, "XMLSocket");
intrinsicPusher(_global.XMLUI, "XMLUI");
intrinsicPusher(_global.clearInterval, "clearInterval");
intrinsicPusher(_global.clearTimeout, "clearTimeout");
intrinsicPusher(_global.escape, "escape");
intrinsicPusher(_global.flash, "flash");
intrinsicPusher(_global.isFinite, "isFinite");
intrinsicPusher(_global.isNaN, "isNaN");
intrinsicPusher(_global.parseFloat, "parseFloat");
intrinsicPusher(_global.parseInt, "parseInt");
intrinsicPusher(_global.setInterval, "setInterval");
intrinsicPusher(_global.setTimeout, "setTimeout");
intrinsicPusher(_global.showRedrawRegions, "showRedrawRegions");
intrinsicPusher(_global.textRenderer, "textRenderer");
intrinsicPusher(_global.trace, "trace");
intrinsicPusher(_global.unescape, "unescape");
intrinsicPusher(_global.updateAfterEvent, "updateAfterEvent");
}
if (packageName == undefined) {
var _local2 = [];
for (var _local3 in _global) {
_local2.push(_local3);
}
_global.ASSetPropFlags(_global, null, 0, true);
classPusher(_global);
_protect(_global, _local2);
} else {
classPusher(_global[packageName], packageName);
}
}
static function _protect(package_obj, unprotected) {
_global.ASSetPropFlags(package_obj, null, 1, true);
_global.ASSetPropFlags(package_obj, unprotected, 0, true);
_global.ASSetPropFlags(package_obj, ["constructor", "__constructor__", "prototype", "__proto__"], 1, true);
}
static function getClassName(obj) {
if (obj instanceof Function) {
return(obj.shortClassName);
}
return(obj.constructor.shortClassName);
}
static function getLongClassName(obj) {
if (obj instanceof Function) {
return(obj.className);
}
return(obj.constructor.className);
}
static function getPath(obj) {
if (obj instanceof Function) {
return(obj.className);
}
return(obj.constructor.className);
}
static function intrinsicPusher(node, className) {
node.className = className;
node.shortClassName = className;
check.push(node);
}
static function classPusher(node, name) {
var _local2 = ((name == undefined) ? "" : (name + "."));
for (var _local3 in node) {
if ((node[_local3] instanceof Function) && (node[_local3].constructor != null)) {
node[_local3].className = _local2 + _local3;
node[_local3].shortClassName = _local3;
check.push(node[_local3]);
} else if (node[_local3] instanceof Object) {
classPusher(node[_local3], _local2 + _local3);
}
}
}
static function checkProtoChain(obj, extendedPath, includePath) {
if ((obj.__proto__ != undefined) && (obj.__proto__.constructor.className != undefined)) {
var _local1 = checkExtended(obj);
var _local4 = ((extendedPath || (includePath)) ? (_local1.className) : (_local1.shortClassName));
if (_local1.extended) {
fullPath = ((fullPath == "") ? (_local4) : ((fullPath + ".") + _local1.shortClassName));
}
if (extendedPath) {
checkProtoChain(obj.__proto__, extendedPath);
}
}
}
static function getClass(obj, extendedPath, includePath) {
fullPath = "";
checkProtoChain(obj, extendedPath, includePath);
if (fullPath == "") {
fullPath = typeof(obj);
}
return(fullPath);
}
static function checkExtended(obj) {
var _local2 = {extended:false};
var _local1 = 0;
while (_local1 < check.length) {
var _local3 = ((obj.__proto__ == check[_local1].prototype) ? true : false);
if (_local3) {
_local2.extended = _local3;
_local2.className = check[_local1].className;
_local2.shortClassName = check[_local1].shortClassName;
return(_local2);
}
_local1++;
}
return(_local2);
}
}
Symbol 13 MovieClip [__Packages.com.blitzagency.xray.ObjectViewer] Frame 0
class com.blitzagency.xray.ObjectViewer
{
var _recursionCount, mc_prop_ary, TextField_prop_ary, Button_prop_ary, Sound_prop_ary, mc_prop_small_ary, objMap, currentObjPath, XMLAry, dispatchEvent, XMLStr, XMLDoc;
function ObjectViewer () {
_recursionCount = 0.003;
mc_prop_ary = new Array("_name", "_x", "_y", "_width", "_height", "_rotation", "_visible", "_alpha", "_xscale", "_yscale", "cacheAsBitmap", "filters", "_currentframe", "_totalframes", "_framesloaded", "enabled", "hitArea", "_droptarget", "_target", "_focusEnabled", "_focusrect", "_lockroot", "menu", "_quality", "soundbuftime", "tabChildren", "tabEnabled", "tabIndex", "trackAsMenu", "_url", "useHandCursor");
TextField_prop_ary = new Array("_name", "_x", "_y", "_width", "_height", "_rotation", "_visible", "_alpha", "_xscale", "_yscale", "html", "htmlText", "text");
Button_prop_ary = new Array("_name", "_x", "_y", "_width", "_height", "_rotation", "_visible", "_alpha", "_xscale", "_yscale", "enabled");
Sound_prop_ary = new Array("position", "duration", "id3.comment", "id3.album", "id3.genre", "id3.songname", "id3.artist", "id3.track", "id3.year", "volume", "pan");
mc_prop_small_ary = new Array("_x", "_y", "_width", "_height", "_visible", "_alpha", "_currentframe");
mc_prop_ary.reverse();
TextField_prop_ary.reverse();
Button_prop_ary.reverse();
Sound_prop_ary.reverse();
mc_prop_small_ary.reverse();
mx.events.EventDispatcher.initialize(this);
}
function replace(str, srch_str, repl_str) {
var _local1 = new Array();
_local1 = str.split(srch_str);
var _local2 = _local1.join(repl_str);
return(_local2);
}
function setAttributes(xmlNode, obj) {
for (var _local3 in obj) {
if (((_local3 != "__recursionCheck") && (_local3 != "getRecursionChecked")) && (_local3 != "setRecursionChecked")) {
xmlNode.attributes[_local3] = obj[_local3];
}
}
}
function getObjProperties(obj) {
var _local3 = new Object();
for (var _local4 in obj) {
if ((((_local4 != "Xray") && (_local4 != "__recursionCheck")) && (_local4 != "getRecursionChecked")) && (_local4 != "setRecursionChecked")) {
var _local1 = com.blitzagency.xray.ClassPath.getClass(obj[_local4]);
_local1 = ((_local1 != "") ? (_local1) : (typeof(obj[_local4])));
_local3[_local4] = (_local1 + " :: ") + obj[_local4];
}
}
return(_local3);
}
function getFunctionProperties(obj, sPath) {
_global.ASSetPropFlags(obj, null, 0, true);
var _local4 = new Object();
for (var _local5 in obj) {
if ((((((_local5 != "__proto__") && (_local5 != "prototype")) && (_local5 != "Xray")) && (_local5 != "__recursionCheck")) && (_local5 != "getRecursionChecked")) && (_local5 != "setRecursionChecked")) {
var _local3 = ((typeof(obj[_local5]) == "function") ? "function" : (obj[_local5]));
_local4[_local5] = _local3;
}
}
if (obj.prototype) {
for (var _local5 in obj.prototype) {
if ((((((_local5 != "__proto__") && (_local5 != "prototype")) && (_local5 != "Xray")) && (_local5 != "__recursionCheck")) && (_local5 != "getRecursionChecked")) && (_local5 != "setRecursionChecked")) {
var _local3 = ((typeof(obj.prototype[_local5]) == "function") ? "function" : "property");
_local4[_local5] = _local3;
}
}
}
_global.ASSetPropFlags(obj, null, 1, true);
return(_local4);
}
function getProperties(target_obj, showAll) {
_global.ASSetPropFlags(target_obj, null, 0, true);
var obj = new Object();
obj.sTarget_mc = String(eval (target_obj._target));
if (showAll) {
for (var items in target_obj) {
if ((((items != "__recursionCheck") && (items != "Xray")) && (items != "getRecursionChecked")) && (items != "setRecursionChecked")) {
var sClass = com.blitzagency.xray.ClassPath.getClass(target_obj[items]);
sClass = ((sClass != "") ? (sClass) : (typeof(target_obj[items])));
obj[items] = (sClass + " :: ") + target_obj[items];
}
}
}
obj.Class = com.blitzagency.xray.ClassPath.getClass(target_obj, true);
obj._props = new Object();
var ary;
if (target_obj instanceof MovieClip) {
ary = mc_prop_ary;
}
if (target_obj instanceof TextField) {
ary = TextField_prop_ary;
}
if (target_obj instanceof Button) {
ary = Button_prop_ary;
}
if (target_obj instanceof Sound) {
ary = Sound_prop_ary;
}
var x = 0;
while (x < ary.length) {
switch (ary) {
case mc_prop_ary :
if (ary[x] == "_y") {
obj._props.depth = target_obj.getDepth();
}
obj._props[ary[x]] = target_obj[ary[x]];
break;
case TextField_prop_ary :
obj._props[ary[x]] = target_obj[ary[x]];
break;
case Button_prop_ary :
obj._props[ary[x]] = target_obj[ary[x]];
break;
case Sound_prop_ary :
if (ary[x] == "volume") {
obj._props.volume = target_obj.getVolume();
} else if (ary[x] == "pan") {
obj._props.pan = target_obj.getPan();
} else if (ary[x] == "id3.comment") {
obj._props.id3_comment = target_obj.id3.comment;
} else if (ary[x] == "id3.album") {
obj._props.id3_album = target_obj.id3.album();
} else if (ary[x] == "id3.genre") {
obj._props.id3_genre = target_obj.id3.genre();
} else if (ary[x] == "id3.songname") {
obj._props.id3_songname = target_obj.id3.songname();
} else if (ary[x] == "id3.artist") {
obj._props.id3_artist = target_obj.id3.artist();
} else if (ary[x] == "id3.track") {
obj._props.id3_track = target_obj.id3.track();
} else if (ary[x] == "id3.year") {
obj._props.id3_year = target_obj.id3.year();
} else {
obj._props[ary[x]] = target_obj[ary[x]];
}
}
x++;
}
_global.ASSetPropFlags(obj, ["constructor", "__constructor__", "prototype", "__proto__", "__recursionCheck"], 1, true);
return(obj);
}
function getStandardProperties(target_mc) {
var _local3 = new Object();
_local3._props = new Object();
var _local2 = 0;
while (_local2 < mc_prop_small_ary.length) {
if (mc_prop_small_ary[_local2] == "_y") {
_local3._props.depth = target_mc.getDepth();
}
_local3._props[mc_prop_small_ary[_local2]] = target_mc[mc_prop_small_ary[_local2]];
_local2++;
}
return(_local3);
}
function getSoundProperties(snd) {
var _local1 = new Object();
_local1.txtPosition = snd.position;
_local1.txtDuration = snd.duration;
_local1.txtComment = snd.id3.comment;
_local1.txtAlbum = snd.id3.album;
_local1.txtGenre = snd.id3.genre;
_local1.txtSongName = snd.id3.songname;
_local1.txtArtist = snd.id3.artist;
_local1.txtTrack = snd.id3.track;
_local1.txtYear = snd.id3.year;
_local1.txtVolume = snd.getVolume();
_local1.txtPan = snd.getPan();
return(_local1);
}
function getVideoProperties(ns) {
var _local2 = new Object();
_local2.txtPosition = ns.time;
_local2.txtBufferLength = ns.bufferLength;
_local2.txtBufferTime = ns.bufferTime;
_local2.txtBytesLoaded = ns.bytesLoaded;
_local2.txtBytesTotal = ns.bytesTotal;
_local2.txtCurrentFps = ns.currentFps;
var _local4 = getObjProperties(ns);
_local2.props = _local4;
return(_local2);
}
function getName(clip) {
var _local1 = clip._name;
return(((!_local1) ? (String(clip)) : (_local1)));
}
function addObject(link, iType, sName) {
if (link.lastIndexOf(".") > -1) {
var _local6 = link.split(".");
var _local2 = objMap;
var _local4 = 0;
while (_local4 < _local6.length) {
var _local3 = ((_local4 == (_local6.length - 1)) ? (sName) : (_local6[_local4]));
var _local5 = _local6.slice(0, _local4).join(".");
var _local8 = true;
if (!_local2[_local3]) {
_local8 = false;
_local2[_local3] = new Object();
_local5 = ((_local4 > 0) ? ((_local5 + ".") + _local3) : (_local5));
_local2[_local3].sPath = _local5;
_local2[_local3].iType = iType;
_local2[_local3].sName = _local3;
}
_local2 = _local2[_local3];
if ((_local4 == (_local6.length - 1)) && (!_local8)) {
var _local9 = link.split(".");
var _local12 = _local9.pop();
link = (_local9.join(".") + ".") + sName;
_local2.sPath = link;
_local2.iType = iType;
_local2.sName = sName;
}
_local4++;
}
} else {
if (!objMap[link]) {
objMap[link] = new Object();
}
objMap[link].sPath = link;
objMap[link].iType = iType;
objMap[link].sName = sName;
}
}
function buildTree(obj) {
var len = currentObjPath.split(".").length;
var aTemp = obj.sPath.split(".");
aTemp.splice(0, len - 1);
var checkPath = ((aTemp.join(".") == "") ? false : true);
var sNodeName;
var sNodeLabel;
var sCurrentTarget;
var iType;
var o;
if (((obj.sPath != undefined) && (checkPath)) && (obj.sName != undefined)) {
sNodeName = getName(obj.sName);
sNodeName = replace(sNodeName, " ", "_");
sNodeLabel = getName(obj.sName);
sCurrentTarget = obj.sPath;
iType = obj.iType;
switch (iType) {
case 0 :
var sClass = com.blitzagency.xray.ClassPath.getClass(eval (sCurrentTarget), false);
if (!sClass) {
var func = typeof(eval (sCurrentTarget));
sClass = "Object";
}
sNodeLabel = ((sNodeLabel + " (") + sClass) + ")";
o = {label:sNodeLabel, mc:sCurrentTarget, t:iType};
break;
case 1 :
var sClass = com.blitzagency.xray.ClassPath.getClass(eval (sCurrentTarget), false);
sNodeLabel = ((sNodeLabel + " (") + sClass) + ")";
o = {label:sNodeLabel, mc:sCurrentTarget, t:iType};
break;
case 2 :
var sClass = com.blitzagency.xray.ClassPath.getClass(eval (sCurrentTarget), false);
sNodeLabel = ((sNodeLabel + " (") + sClass) + ")";
o = {label:sNodeLabel, mc:sCurrentTarget, t:iType};
break;
case 3 :
var sClass = com.blitzagency.xray.ClassPath.getClass(eval (sCurrentTarget), false);
sNodeLabel = ((sNodeLabel + " (") + sClass) + ")";
o = {label:sNodeLabel, mc:sCurrentTarget, t:iType};
break;
case 4 :
var sClass = com.blitzagency.xray.ClassPath.getClass(eval (sCurrentTarget), false);
sNodeLabel = ((sNodeLabel + " (") + sClass) + ")";
o = {label:sNodeLabel, mc:sCurrentTarget, t:iType};
break;
case 5 :
var sClass = com.blitzagency.xray.ClassPath.getClass(eval (sCurrentTarget), false);
sNodeLabel = ((sNodeLabel + " (") + sClass) + ")";
o = {label:sNodeLabel, mc:sCurrentTarget, t:iType};
break;
case 6 :
var sClass = com.blitzagency.xray.ClassPath.getClass(eval (sCurrentTarget), false);
if (!sClass) {
var func = typeof(eval (sCurrentTarget));
sClass = "Object";
}
sNodeLabel = ((sNodeLabel + " (") + sClass) + ")";
o = {label:sNodeLabel, mc:sCurrentTarget, t:iType};
break;
case 7 :
var sClass = com.blitzagency.xray.ClassPath.getClass(eval (sCurrentTarget), false);
if (sClass) {
sClass = ("( " + sClass) + " )";
} else {
sClass = "( function )";
}
sNodeLabel = sNodeLabel + sClass;
o = {label:sNodeLabel, mc:sCurrentTarget, t:iType};
break;
case 8 :
var sClass = com.blitzagency.xray.ClassPath.getClass(eval (sCurrentTarget), false);
if (!sClass) {
var func = typeof(eval (sCurrentTarget));
sClass = "Object";
}
sNodeLabel = ((sNodeLabel + " (") + sClass) + ")";
o = {label:sNodeLabel, mc:sCurrentTarget, t:iType};
}
XMLAry.push(("<" + sNodeName) + " ");
for (var atr in o) {
XMLAry.push(((atr + "=\"") + o[atr]) + "\" ");
}
XMLAry.push(">");
}
aTemp = new Array();
for (var items in obj) {
if (typeof(obj[items]) == "object") {
aTemp.push(obj[items]);
}
}
aTemp.sortOn("sName");
var x = 0;
while (x < aTemp.length) {
buildTree(aTemp[x]);
x++;
}
if (sNodeName) {
XMLAry.push(("</" + sNodeName) + ">");
}
}
function _protect(package_obj, unprotected_array) {
_global.ASSetPropFlags(package_obj, null, 1, true);
_global.ASSetPropFlags(package_obj, unprotected_array, 0, true);
_global.ASSetPropFlags(package_obj, ["constructor", "__constructor__", "prototype", "__proto__"], 1, true);
}
function viewTree(obj, objPath, recursiveSearch, showHidden, objectSearch) {
dispatchEvent({type:"onViewTree", obj:obj});
objMap = new Object();
XMLStr = "";
XMLAry = [];
com.blitzagency.xray.Xray.recursionControl = com.blitzagency.xray.Xray.recursionControl + 1;
var sNodeName;
if (typeof(obj) == "movieclip") {
sNodeName = getName(obj);
} else if (typeof(obj) == "object") {
sNodeName = objPath.split(".")[0];
}
var objType = getType(obj);
var targetPath;
if (objType == 2) {
targetPath = String(eval (obj._target));
objPath = targetPath;
} else {
targetPath = objPath;
}
currentObjPath = objPath;
var aTemp = currentObjPath.split(".");
if (aTemp.length > 1) {
aTemp.splice(aTemp.length - 1);
}
var o;
aTemp = targetPath.split(".");
XMLDoc = new XML();
if (recursiveSearch || ((!recursiveSearch) && (targetPath == "_level0"))) {
var currentNode;
var element1 = XMLDoc.createElement(aTemp[0]);
XMLDoc.appendChild(element1);
var attribute_obj = {label:aTemp[0], mc:aTemp[0], t:objType};
setAttributes(XMLDoc.lastChild, attribute_obj);
currentNode = XMLDoc.lastChild;
}
var bParsed = false;
addObject(sNodeName, getType(obj), sNodeName, obj.getDepth());
if (!objectSearch) {
objectSearch = ((getType(obj) == 0) ? true : false);
}
parseTree(obj, sNodeName, objPath, recursiveSearch, showHidden, objectSearch);
buildTree(objMap);
XMLDoc = new XML(XMLAry.join(""));
obj = new Object();
obj.XMLDoc = XMLDoc;
dispatchEvent({type:"onViewTreeReturn", obj:obj});
return(XMLDoc);
}
function parseTree(obj, sName, sPath, recursiveSearch, showHidden, objectSearch, parent, lastParent) {
var iDepth = Number(((typeof(obj) == "movieclip") ? (obj.getDepth()) : 0));
var objType = getType(obj);
var unprotected_array = new Array();
if (((typeof(obj) == "object") || (typeof(obj) == "movieclip")) || (typeof(obj) == "function")) {
if (showHidden) {
for (var items in obj) {
unprotected_array.push(items);
}
_global.ASSetPropFlags(obj, null, 0, true);
}
if (recursiveSearch) {
if (obj.__recursionCheck == null) {
obj.prototype.getRecursionChecked = function () {
};
obj.prototype.setRecursionChecked = function (value) {
};
var created = obj.prototype.addProperty("__recursionCheck", obj.prototype.getRecursionChecked, obj.prototype.setRecursionChecked);
obj.__recursionCheck = 0;
_global.ASSetPropFlags(obj, ["__recursionCheck", "getRecursionChecked", "setRecursionChecked"], 1, true);
}
if (Math.floor(obj.__recursionCheck) != Math.floor(com.blitzagency.xray.Xray.recursionControl)) {
obj.__recursionCheck = com.blitzagency.xray.Xray.recursionControl;
}
} else {
delete obj.__recursionCheck;
delete obj.getRecursionChecked;
delete obj.setRecursionChecked;
}
if (((typeof(obj) == "object") && (recursiveSearch)) && (!objectSearch)) {
if (showHidden) {
_protect(obj, unprotected_array);
}
return(undefined);
}
for (var items in obj) {
if ((items != "__recursionCheck") && (((typeof(obj[items]) == "object") || (typeof(obj[items]) == "movieclip")) || (typeof(obj[items]) == "function"))) {
var bReturn = false;
var pathCheck = "";
if (typeof(obj[items]) == "movieclip") {
var pathLength = sPath.split(".").length;
var targetLength = String(eval (obj[items]._target)).split(".").length;
if (pathLength <= targetLength) {
pathCheck = (sPath + ".") + items;
} else {
pathCheck = (sPath + ".") + items;
}
} else {
pathCheck = (sPath + ".") + items;
}
if (((((((((((((typeof(obj[items]) == "object") || (typeof(obj[items]) == "movieclip")) || (typeof(obj[items]) == "function")) && (items.toLowerCase() != "xray")) && (items != "__recursionCheck")) && (items != "getRecursionChecked")) && (items != "setRecursionChecked")) && (items.toLowerCase() != "xray")) && (items != "__proto__")) && (items != "prototype")) && (items != "__constructor__")) && (items != "__resolve")) && (items != "constructor")) {
iDepth = Number(((typeof(obj[items]) == "movieclip") ? (obj[items].getDepth()) : 0));
addObject(pathCheck, getType(obj[items]), items, iDepth);
if (recursiveSearch) {
if ((Math.floor(obj[items].__recursionCheck) != Math.floor(com.blitzagency.xray.Xray.recursionControl)) || (obj[items].__recursionCheck < (com.blitzagency.xray.Xray.recursionControl + _recursionCount))) {
if (Math.floor(obj[items].__recursionCheck) == Math.floor(com.blitzagency.xray.Xray.recursionControl)) {
obj[items].__recursionCheck = obj[items].__recursionCheck + 0.001;
}
if ((obj[items].__recursionCheck < (com.blitzagency.xray.Xray.recursionControl + _recursionCount)) || (obj[items].__recursionCheck == undefined)) {
parseTree(obj[items], items, pathCheck, recursiveSearch, showHidden, objectSearch, obj, parent);
}
}
}
}
}
}
if (showHidden) {
_protect(obj, unprotected_array);
}
}
}
function getType(obj) {
var _local7 = obj instanceof MovieClip;
var _local11 = obj instanceof Button;
var _local5 = obj instanceof Sound;
var _local3 = obj instanceof Video;
var _local8 = obj instanceof NetStream;
var _local4 = obj instanceof TextField;
var _local10 = Boolean(((typeof(obj) == "object") ? true : false));
var _local6 = ((obj.constructor == Array) ? true : false);
var _local9 = Boolean(((typeof(obj) == "function") ? true : false));
var _local1;
if (_local10) {
_local1 = 0;
}
if (_local6) {
_local1 = 1;
}
if (_local7) {
_local1 = 2;
}
if (_local11) {
_local1 = 3;
}
if (_local5) {
_local1 = 4;
}
if (_local4) {
_local1 = 5;
}
if (_local3) {
_local1 = 6;
}
if (_local9) {
_local1 = 7;
}
if (_local8) {
_local1 = 8;
}
return(_local1);
}
}
Symbol 14 MovieClip [__Packages.com.blitzagency.xray.FPSMeter] Frame 0
class com.blitzagency.xray.FPSMeter
{
var _fps, dispatchEvent, _modus, _runFPS, fpsSI, _pollInterval, past, now, pass, delta, populationSize, population;
function FPSMeter () {
mx.events.EventDispatcher.initialize(this);
init();
}
function get fps() {
return(_fps);
}
function set fps(newValue) {
_fps = newValue;
dispatchEvent({type:"onFpsUpdate", fps:newValue});
//return(fps);
}
function get modus() {
return(_modus);
}
function set modus(newValue) {
_modus = newValue;
//return(modus);
}
function get runFPS() {
return(_runFPS);
}
function set runFPS(newValue) {
_runFPS = newValue;
clearInterval(fpsSI);
if (newValue) {
fpsSI = setInterval(this, "update", pollInterval);
}
//return(runFPS);
}
function get pollInterval() {
return(_pollInterval);
}
function set pollInterval(newValue) {
_pollInterval = newValue;
clearInterval(fpsSI);
if (runFPS) {
fpsSI = setInterval(this, "update", pollInterval);
}
//return(pollInterval);
}
static function getInstance() {
if (_instance == null) {
_instance = new com.blitzagency.xray.FPSMeter();
}
return(_instance);
}
function init() {
past = 0;
now = 0;
fps = ("");
pass = 0;
delta = 0;
populationSize = 10;
population = new Array(populationSize);
runFPS = (false);
modus = (true);
pollInterval = (25);
}
function update() {
if (!runFPS) {
clearInterval(fpsSI);
}
now = getTimer();
delta = now - past;
if (modus) {
population[pass] = delta;
pass++;
if (pass >= populationSize) {
var _local2 = 0;
for (var _local3 in population) {
_local2 = _local2 + population[_local3];
}
var _local5 = int((1000 * populationSize) / _local2);
fps = (("[" + _local5) + "fps]");
pass = 0;
}
} else {
var _local4 = int(1000 / delta);
fps = (("[" + _local4) + "fps]");
}
past = now;
}
static var _instance = null;
}
Symbol 15 MovieClip [__Packages.com.blitzagency.xray.Commander] Frame 0
class com.blitzagency.xray.Commander
{
function Commander () {
}
static function exec(str) {
var _local7 = str.split(";");
var _local4 = 0;
while (_local4 < _local7.length) {
_local7[_local4] = retainValue(_local7[_local4]);
_local7[_local4] = _local7[_local4].split(".");
_local7[_local4][_local7[_local4].length - 1] = restoreValue(_local7[_local4][_local7[_local4].length - 1]);
var _local6 = _local7[_local4];
var _local8 = _local6.length;
var _local3 = 0;
while (_local3 < _local8) {
if (_local6[_local3].indexOf("[") > -1) {
var _local5 = _local6[_local3].split("[");
_local6[_local3] = _local5[0];
var _local1 = 1;
while (_local1 < _local5.length) {
var _local2 = replace(_local5[_local1], "\"", "");
_local2 = replace(_local2, "]", "");
_local6.splice(_local1, 0, _local2);
_local1++;
}
}
_local3++;
}
_local4++;
}
var _local9 = script(_local7);
return(_local9);
}
static function script(cmds) {
var c = 0;
while (c < cmds.length) {
var cmd = cmds[c][cmds[c].length - 1];
cmd = getArguments(cmd);
var d = ((cmds[c].length > 1) ? 1 : 0);
var r;
if (d > 0) {
var exec = eval (cmds[c][0]);
while (d < (cmds[c].length - 1)) {
exec = exec[cmds[c][d]];
d++;
}
if (cmd.method) {
r = exec[cmd.method].apply(exec, cmd.args);
if (r != undefined) {
return(r);
}
} else {
exec[cmd.prop] = cmd.val;
}
} else {
r = _global[cmd.method](cmd.args);
if (r != undefined) {
return(r);
}
}
c++;
}
}
static function retainValue(str) {
var _local5 = str.indexOf("=");
var _local2 = str.indexOf("(");
if (_local5 > -1) {
var _local3 = str.split("=");
_local3[1] = replace(_local3[1], ".", "(dot)");
return(_local3.join("="));
}
if (_local2 > -1) {
var _local4 = str.indexOf(")", _local2);
var _local6 = str.slice(0, _local2);
var _local7 = str.slice(_local4 + 2);
var _local8 = replace(str.substr(_local2, _local4), ".", "(dot)");
return((_local6 + _local8) + _local7);
}
return(str);
}
static function restoreValue(str) {
return(replace(str, "(dot)", "."));
}
static function replace(str, search, use) {
return(str.split(search).join(use));
}
static function getArguments(str) {
var _local10 = str.indexOf("(");
var _local12 = str.lastIndexOf(")");
var _local13;
var _local2;
var _local11;
var _local7;
if (_local10 > -1) {
_local13 = str.substr(0, _local10);
_local2 = str.substring(_local10 + 1, _local12).split(",");
var _local1 = 0;
while (_local1 < _local2.length) {
var _local4 = _local2[_local1].indexOf("\"");
var _local3 = _local2[_local1].indexOf("(");
if (_local3 > -1) {
_local2[_local1] = String(replace(_local2[_local1], " ", ""));
_local2[_local1] = exec(_local2[_local1]);
} else if ((_local4 > -1) && (_local3 == -1)) {
_local2[_local1] = String(replace(_local2[_local1], "\"", ""));
_local2[_local1] = String(replace(_local2[_local1], "'", ""));
} else if (!isNaN(parseInt(_local2[_local1]))) {
_local2[_local1] = parseInt(_local2[_local1]);
}
_local1++;
}
} else {
_local11 = replace(str.split("=")[0], " ", "");
var _local5 = replace(str.split("=")[1], " ", "");
var _local9;
var _local14;
switch (_local5) {
case "true" :
_local9 = true;
_local7 = _local9;
break;
case "false" :
_local9 = false;
_local7 = _local9;
break;
default :
if (!isNaN(parseInt(_local5))) {
_local14 = parseInt(_local5);
_local7 = _local14;
} else {
_local5 = String(replace(_local5, "\"", ""));
_local5 = String(replace(_local5, "'", ""));
_local7 = _local5;
}
}
}
var _local6 = new Object();
_local6.method = _local13;
_local6.args = _local2;
_local6.prop = _local11;
_local6.val = _local7;
return(_local6);
}
}
Symbol 16 MovieClip [__Packages.com.blitzagency.xray.ControlConnection] Frame 0
class com.blitzagency.xray.ControlConnection extends LocalConnection
{
var objViewer, tree_que, queSI, send, fpsMeter, focusEnabledCheck, highlightColor, boundingBox_mc, isConnected, connect;
function ControlConnection () {
super();
mx.events.EventDispatcher.initialize(this);
init();
}
function init() {
objViewer = new com.blitzagency.xray.ObjectViewer();
tree_que = new Array();
}
function viewTree(sTarget_mc, recursiveSearch, showHidden, objectSearch) {
var target_mc = eval (sTarget_mc);
var objPath = null;
if (typeof(target_mc) == "object") {
objPath = sTarget_mc;
}
var tree_xml = objViewer.viewTree(target_mc, objPath, recursiveSearch, showHidden, objectSearch);
if (!tree_xml) {
com.blitzagency.xray.Xray.tt("treeview search returned undefined");
return(undefined);
}
var iLevelCount = 5000;
var level_ary = new Array();
var x = 1;
while (x <= iLevelCount) {
if (eval ("_level" + x)) {
level_ary.push(x);
}
x++;
}
var sTree = tree_xml.toString();
var treeLength = sTree.length;
if (treeLength > 5000) {
tree_que = new Array();
var x = 0;
while (x < treeLength) {
var toSend = sTree.substring(x, x + 5000);
var bLast = (((x + 5000) >= sTree.length) ? true : false);
tree_que.push({XMLDoc:toSend, level_ary:level_ary, bLast:bLast});
x = x + 5000;
}
queSI = setInterval(this, "processQue", 25);
} else {
var obj = {XMLDoc:tree_xml.toString()};
var bSent = send("_xray_conn", "setTree", obj, level_ary, true);
}
}
function processQue() {
var _local2 = tree_que.shift();
var _local3 = new Object();
_local3.XMLDoc = _local2.XMLDoc;
var _local5 = _local2.level_ary;
var _local4 = _local2.bLast;
if (tree_que.length == 0) {
clearInterval(queSI);
}
var _local6 = send("_xray_conn", "setTree", _local3, _local5, _local4);
}
function sendFPS(obj) {
var _local2 = send("_xray_conn", "viewFPS", obj.fps);
}
function showFPS() {
fpsMeter.__set__runFPS(true);
}
function hideFPS() {
fpsMeter.__set__runFPS(false);
}
function fpsOn(showFPS) {
fpsMeter.__set__runFPS(showFPS);
}
function getMovieClipProperties(sTarget_mc, bShowAll) {
var target_mc = eval (sTarget_mc);
var obj = objViewer.getProperties(target_mc, bShowAll);
var bSent = send("_xray_conn", "showMovieClipProperties", obj);
}
function getTipMovieClipProperties(sTarget_mc, bShowAll) {
var target_mc = eval (sTarget_mc);
var obj = objViewer.getProperties(target_mc, false);
var bSent = send("_xray_conn", "showTipMovieClipProperties", obj);
}
function getObjProperties(sObj, key) {
var sTemp = sObj.split(".");
var target_obj = eval (sTemp[0]);
var x = 1;
while (x < sTemp.length) {
target_obj = target_obj[sTemp[x]];
x++;
}
if (key) {
target_obj = target_obj[key];
}
var obj = objViewer.getObjProperties(target_obj);
var bSent = send("_xray_conn", "showMovieClipProperties", obj);
}
function getFunctionProperties(sObj) {
var target_obj = eval (sObj);
var obj = objViewer.getFunctionProperties(target_obj);
var bSent = send("_xray_conn", "showMovieClipProperties", obj);
}
function writeChangeHistory(obj) {
var _local4 = "//==========/[ CHANGES ]\\===========//";
_global.trace(_local4);
for (var _local3 in obj) {
if (typeof(obj[_local3]) == "object") {
_global.trace(obj[_local3].changes + ";");
}
}
_local4 = "//==========\\[ CHANGES ]/===========//";
_global.trace(_local4);
}
function executeScript(sExecute) {
com.blitzagency.xray.Commander.exec(sExecute);
}
function getSoundProperties(sSound) {
var obj = objViewer.getSoundProperties(eval (sSound));
var bSent = send("_xray_conn", "setSoundProperties", obj);
}
function getVideoProperties(sNetStream) {
var obj = objViewer.getVideoProperties(eval (sNetStream));
var bSent = send("_xray_conn", "setVideoProperties", obj);
}
function playSound(sSound, iLoops) {
var snd = eval (sSound);
snd.start(0, iLoops);
}
function stopSound(sSound) {
var snd = eval (sSound);
snd.stop();
}
function playVideo(sVideo, flv) {
var ns = eval (sVideo);
ns.play(flv);
}
function pauseVideo(sVideo) {
var ns = eval (sVideo);
ns.pause();
}
function stopVideo(sVideo) {
var ns = eval (sVideo);
ns.close();
}
function highlightClip(sTarget_mc) {
var target_mc = eval (sTarget_mc);
focusEnabledCheck = target_mc.focusEnabled;
target_mc.focusEnabled = true;
_global.Selection.setFocus(sTarget_mc);
}
function lowlightClip(sTarget_mc) {
var target_mc = eval (sTarget_mc);
_global.Selection.setFocus(null);
target_mc.focusEnabled = focusEnabledCheck;
}
function startExamineClips(sTarget_mc, iType) {
var target_mc = eval (sTarget_mc);
var mc;
if ((iType == 5) || (iType == 3)) {
} else if (iType == 3) {
} else if (iType == 2) {
mc = target_mc;
var colorObj = highlightColor.getTransform();
var myColorTransform;
if (colorObj && (colorObj.rb == 81)) {
myColorTransform = {ra:100, rb:0, ga:100, gb:0, ba:100, bb:0, aa:100, ab:0};
com.blitzagency.xray.DragableMovieClip.remove(target_mc);
} else {
com.blitzagency.xray.DragableMovieClip.initialize(target_mc);
myColorTransform = {ra:100, rb:81, ga:100, gb:56, ba:100, bb:-57, aa:100, ab:0};
}
highlightColor = new Color(mc);
highlightColor.setTransform(myColorTransform);
}
boundingBox_mc = mc;
}
function stopExamineClips(sTarget_mc, iType) {
var target_mc = eval (sTarget_mc);
highlightColor = new Color(boundingBox_mc);
var myColorTransform = {ra:100, rb:0, ga:100, gb:0, ba:100, bb:0, aa:100, ab:0};
highlightColor.setTransform(myColorTransform);
com.blitzagency.xray.DragableMovieClip.remove(target_mc);
}
function updateHistory(target_mc) {
var sTarget_mc = String(eval (target_mc._target));
var obj = new Object();
var propsAry = new Array("_x", "_y");
var aTemp = sTarget_mc.split(".");
aTemp.splice(0, 1);
sTarget_mc = aTemp.join(".");
var x = 0;
while (x < propsAry.length) {
var p = propsAry[x];
var key = ((sTarget_mc + ".") + p);
var o = ((obj[key] = new Object()));
o.prop = p;
o.value = target_mc[p];
o.key = (sTarget_mc + ".") + p;
o.sExecute = (((sTarget_mc + ".") + p) + " = ") + target_mc[p];
x++;
}
var bSent = send("_xray_conn", "updateHistory", obj);
}
function allowDomain(sendingDomain) {
return(true);
}
function onStatus(infoObject) {
switch (infoObject.level) {
case "status" :
break;
case "error" :
}
}
function initConnection() {
fpsMeter = com.blitzagency.xray.FPSMeter.getInstance();
isConnected = connect("_xray_remote_conn");
return(isConnected);
}
}
Symbol 17 MovieClip [__Packages.com.blitzagency.xray.XrayTrace] Frame 0
class com.blitzagency.xray.XrayTrace
{
var _recursionCount, _sViewInfo, _sViewInfoClean, _queInterval, sendSI, _separator, sendAry, dispatchEvent, iViewColCount;
function XrayTrace () {
mx.events.EventDispatcher.initialize(this);
separator = (" :: ");
_recursionCount = 0.003;
}
function get sViewInfo() {
return(_sViewInfo);
}
function set sViewInfo(newValue) {
_sViewInfo = newValue;
//return(sViewInfo);
}
function get sViewInfoClean() {
return(_sViewInfoClean);
}
function set sViewInfoClean(newValue) {
_sViewInfoClean = newValue;
//return(sViewInfoClean);
}
function get queInterval() {
return(_queInterval);
}
function set queInterval(newValue) {
_queInterval = newValue;
clearInterval(sendSI);
sendSI = setInterval(this, "sendData", newValue);
//return(queInterval);
}
function get separator() {
return(_separator);
}
function set separator(newValue) {
_separator = newValue;
//return(separator);
}
static function getInstance() {
if (_instance == null) {
_instance = new com.blitzagency.xray.XrayTrace();
}
return(_instance);
}
function sendData() {
var _local2 = sendAry.shift();
if (_local2) {
dispatchEvent({type:"onSendData", info:_local2.sViewInfo, last:_local2.bLast});
}
}
function examine(obj) {
var _local6 = "";
var _local7 = "";
var _local5 = 0;
while (_local5 < iViewColCount) {
_local6 = _local6 + " ";
_local7 = _local7 + " ";
_local5++;
}
if (obj.__recursionCheck == null) {
obj.prototype.getRecursionChecked = function () {
};
obj.prototype.setRecursionChecked = function (value) {
};
obj.prototype.addProperty("__recursionCheck", obj.prototype.getRecursionChecked, obj.prototype.setRecursionChecked);
obj.__recursionCheck = 0;
_global.ASSetPropFlags(obj, ["__recursionCheck", "getRecursionChecked", "setRecursionChecked"], 1, true);
}
if (Math.floor(obj.__recursionCheck) != Math.floor(_global.recursionControl)) {
obj.__recursionCheck = _global.recursionControl;
}
for (var _local8 in obj) {
var _local4 = false;
sViewInfo = sViewInfo + ((((((_local6 + "<font size=\"12\" color=\"#0000FF\">") + _local8) + "</font>") + " = ") + obj[_local8]) + newline);
sViewInfoClean = sViewInfoClean + ((((_local7 + _local8) + " = ") + obj[_local8]) + newline);
if (typeof(obj[_local8]) == "object") {
if ((Math.floor(obj[_local8].__recursionCheck) != Math.floor(_global.recursionControl)) || (obj[_local8].__recursionCheck < (_global.recursionControl + _recursionCount))) {
if (Math.floor(obj[_local8].__recursionCheck) == Math.floor(_global.recursionControl)) {
obj[_local8].__recursionCheck = obj[_local8].__recursionCheck + 0.001;
}
if ((obj[_local8].__recursionCheck < (_global.recursionControl + _recursionCount)) || (obj[_local8].__recursionCheck == undefined)) {
iViewColCount = iViewColCount + 4;
_local4 = examine(obj[_local8]);
if (!_local4) {
return(true);
}
}
}
}
}
iViewColCount = iViewColCount - 4;
sViewInfo = sViewInfo + newline;
sViewInfoClean = sViewInfoClean + newline;
return(true);
}
function trace() {
sViewInfo = ("");
sViewInfoClean = ("");
var _local4 = 0;
while (_local4 < arguments.length) {
if (typeof(arguments[_local4]) == "object") {
sViewInfo = sViewInfo + newline;
sViewInfoClean = sViewInfoClean + newline;
iViewColCount = 2;
dispatchEvent({type:"onStatus", code:"Trace.object"});
_global.recursionControl = _global.recursionControl + 1;
examine(arguments[_local4]);
} else if (_local4 > 0) {
sViewInfo = sViewInfo + (arguments[_local4] + " :: ");
sViewInfoClean = sViewInfoClean + (arguments[_local4] + " :: ");
}
_local4++;
}
if (sViewInfo.substring(sViewInfo.length - 4, sViewInfo.length) == " :: ") {
sViewInfo = (sViewInfo.substring(0, sViewInfo.length - 4));
}
if (sViewInfoClean.substring(sViewInfoClean.length - 4, sViewInfoClean.length) == " :: ") {
sViewInfoClean = (sViewInfoClean.substring(0, sViewInfoClean.length - 4));
}
var _local7 = (((("(" + getTimer()) + ") ") + arguments[0]) + ": ") + sViewInfoClean;
if (com.blitzagency.xray.Xray.lc_info) {
if (_local7 != undefined) {
if (_local7.length > 5000) {
_local4 = 0;
while (_local4 < _local7.length) {
var _local5 = _local7.substring(_local4, _local4 + 5000);
var _local8 = (((_local4 + 5000) >= _local7.length) ? true : false);
sendAry.push({sViewInfo:_local5, bLast:_local8});
_local4 = _local4 + 5000;
}
} else {
sendAry.push({sViewInfo:_local7, bLast:true});
}
}
}
_global.trace((((("(" + getTimer()) + ") ") + arguments[0]) + ": ") + sViewInfoClean);
dispatchEvent({type:"onTrace", sInfo:_local7});
if ((com.blitzagency.xray.Xray.lc_info && (!queInterval)) && (!_global.isLivePreview)) {
queInterval = (50);
sendAry = new Array();
}
return(_local7);
}
static var _instance = null;
}
Symbol 18 MovieClip [__Packages.com.blitzagency.xray.LoggerConnection] Frame 0
class com.blitzagency.xray.LoggerConnection extends LocalConnection
{
var send, xrayTrace, isConnected, connect;
function LoggerConnection () {
super();
mx.events.EventDispatcher.initialize(this);
}
function setViewInfo(obj) {
var _local2 = send("_xray_view_conn", "setViewInfo", obj.info, obj.last);
}
function getTraceValue(traceValue) {
var sInfo = xrayTrace.trace("getTraceValue", eval (traceValue));
}
function allowDomain(sendingDomain) {
return(true);
}
function onStatus(infoObject) {
switch (infoObject.level) {
case "status" :
break;
case "error" :
}
}
function initConnection() {
xrayTrace = com.blitzagency.xray.XrayTrace.getInstance();
xrayTrace.addEventListener("onSendData", com.blitzagency.util.Delegate.create(this, setViewInfo));
isConnected = connect("_xray_view_remote_conn");
return(isConnected);
}
}
Symbol 19 MovieClip [__Packages.com.blitzagency.util.PointConverter] Frame 0
class com.blitzagency.util.PointConverter
{
function PointConverter () {
mx.events.EventDispatcher.initialize(this);
_global.localToLocal = function () {
com.blitzagency.util.PointConverter.localToLocal.apply(com.blitzagency.util.PointConverter, arguments);
};
}
static function getInstance() {
if (_instance == null) {
_instance = new com.blitzagency.util.PointConverter();
}
return(_instance);
}
static function localToLocal(from, to) {
var _local1 = {x:0, y:0};
from.localToGlobal(_local1);
to.globalToLocal(_local1);
return(_local1);
}
static var _instance = null;
}
Symbol 20 MovieClip [__Packages.com.blitzagency.xray.FunctionName] Frame 0
class com.blitzagency.xray.FunctionName
{
var dispatchEvent;
function FunctionName () {
mx.events.EventDispatcher.initialize(this);
}
static function getInstance() {
if (_instance == null) {
_instance = new com.blitzagency.xray.FunctionName();
}
return(_instance);
}
function traceFunction(ary, obj) {
_global.ASSetPropFlags(obj, null, 0, true);
for (var _local7 in obj) {
if ((typeof(obj[_local7]) == "function") && (obj[_local7] == ary.callee)) {
_global.tt(((("Function called :: " + _local7) + "\ntarget :: ") + obj) + "\narguments", ary);
dispatchEvent({type:"onTraceFunction", functionName:_local7});
return(_local7);
}
}
_global.ASSetPropFlags(obj, null, 1, true);
}
static var _instance = null;
}
Symbol 45 MovieClip [defeatedPopup] Frame 66
stop();
Symbol 78 MovieClip [fightPopup] Frame 123
this.removeMovieClip();
Symbol 95 Button
on (release) {
_root.codeClip.doSound("latch");
_global.bloodMode = !mcCheck1.checked;
if (mcCheck1.checked) {
mcCheck1.gotoAndPlay("unchecked");
} else {
mcCheck1.gotoAndPlay("checked");
}
trace("BLOODMODE : " + _global.bloodMode);
}
Symbol 105 MovieClip Frame 1
checked = true;
Symbol 105 MovieClip Frame 9
stop();
Symbol 105 MovieClip Frame 11
stop();
checked = false;
Symbol 106 Button
on (release) {
_root.codeClip.doSound("latch");
_global.innocenceMode = !mcCheck3.checked;
if (mcCheck3.checked) {
mcCheck3.gotoAndPlay("unchecked");
} else {
mcCheck3.gotoAndPlay("checked");
}
}
Symbol 115 MovieClip Frame 6
stop();
Symbol 117 Button
on (release) {
_root.codeClip.doSound("latch");
_global.qualFX = !mcCheck4.checked;
if (mcCheck4.checked) {
mcCheck4.gotoAndPlay("unchecked");
} else {
mcCheck4.gotoAndPlay("checked");
}
}
Symbol 119 Button
on (release) {
_root.codeClip.doSound("latch");
_quality = ((_global.qualitySel = "HIGH"));
mcQline._x = buttH._x;
mcQline.gotoAndPlay("on");
}
Symbol 120 Button
on (release) {
_root.codeClip.doSound("latch");
_quality = ((_global.qualitySel = "MEDIUM"));
mcQline._x = buttM._x;
mcQline.gotoAndPlay("on");
}
Symbol 121 Button
on (release) {
_root.codeClip.doSound("latch");
_quality = ((_global.qualitySel = "LOW"));
this.mcQline._x = buttL._x;
this.mcQline.gotoAndPlay("on");
}
Symbol 122 MovieClip [pausedPopup] Frame 1
opened = false;
Instance of Symbol 79 MovieClip in Symbol 122 MovieClip [pausedPopup] Frame 1
onClipEvent (load) {
this.onRelease = function () {
};
this.useHandCursor = false;
}
Symbol 122 MovieClip [pausedPopup] Frame 7
if (!this.opened) {
opened = true;
this.mcCheck1.gotoAndPlay((_global.bloodMode ? "checked" : "unchecked"));
this.mcCheck2.gotoAndPlay((_global.shadowMode ? "checked" : "unchecked"));
this.mcCheck3.gotoAndPlay((_global.innocenceMode ? "checked" : "unchecked"));
this.mcCheck4.gotoAndPlay((_global.qualFX ? "checked" : "unchecked"));
switch (_global.qualitySel) {
case "LOW" :
mcQline._x = buttL._x;
break;
case "MEDIUM" :
mcQline._x = buttM._x;
break;
case "HIGH" :
mcQline._x = buttH._x;
}
trace((((((_global.bloodMode + " : ") + _global.shadowMode) + " : ") + _global.innocenceMode) + " : ") + _global.qualFX);
mcQline.gotoAndPlay("on");
}
Symbol 122 MovieClip [pausedPopup] Frame 8
Symbol 153 MovieClip Frame 5
stop();
Symbol 154 MovieClip Frame 6
if (random(100) > 3) {
gotoAndPlay ("cower");
}
Symbol 154 MovieClip Frame 22
if (random(100) > 20) {
gotoAndPlay ("look");
}
Symbol 170 MovieClip Frame 5
stop();
Symbol 171 MovieClip Frame 6
if (random(100) > 3) {
gotoAndPlay ("cower");
}
Symbol 171 MovieClip Frame 22
if (random(100) > 20) {
gotoAndPlay ("look");
}
Symbol 188 MovieClip Frame 5
stop();
Symbol 189 MovieClip Frame 6
if (random(100) > 3) {
gotoAndPlay ("cower");
}
Symbol 189 MovieClip Frame 22
if (random(100) > 20) {
gotoAndPlay ("look");
}
Symbol 205 MovieClip Frame 5
stop();
Symbol 206 MovieClip Frame 6
if (random(100) > 3) {
gotoAndPlay ("cower");
}
Symbol 206 MovieClip Frame 22
if (random(100) > 20) {
gotoAndPlay ("look");
}
Symbol 252 MovieClip Frame 1
this.gotoAndStop(_global.bling);
this.noPlay = true;
Symbol 289 MovieClip Frame 1
this.hair_mc.gotoAndStop(_global.hair);
this.face_mc.gotoAndStop(_global.face);
this.eyes_mc.gotoAndStop(_global.eyes);
Symbol 438 MovieClip Frame 1
this._visible = _root.myChar.ammo > 0;
Symbol 578 MovieClip Frame 58
stop();
Symbol 608 MovieClip Frame 10
stop();
Symbol 612 MovieClip Frame 1
stop();
Instance of Symbol 612 MovieClip in Symbol 627 MovieClip Frame 1
onClipEvent (load) {
this._alpha = 30;
}
Symbol 628 MovieClip [battleMC] Frame 1
function getFPS() {
if (signal == true) {
time = getTimer();
} else {
tempo = int(1000 / (getTimer() - time));
}
signal = !signal;
return(tempo);
}
function makeBlood(mc, limit) {
if (_global.bloodMode) {
if (_global.innocenceMode) {
temp = _root.createEmptyMovieClip((("bloodmc_" + mc._name) + "_") + randRange(1, 50000), _root.getNextHighestDepth());
bloodCount = 0;
limit = randRange(5, 15);
var _local6 = 0;
while (_local6 < limit) {
bloodCount++;
var _local5 = temp.attachMovie("confetti", "blood" + bloodCount, temp.getNextHighestDepth());
if (!mc.stunned) {
_local5._y = (mc._y - mc._height) + (40 + randRange(10, 20));
if ((this.myChar.dir == "RIGHT") && (!mc.shot)) {
xAdj = (-(mc._width / 2)) + 40;
}
if ((this.myChar.dir == "RIGHT") && (mc.shot)) {
xAdj = (mc._width / 2) - 20;
}
if ((this.myChar.dir == "LEFT") && (!mc.shot)) {
xAdj = (mc._width / 2) - 40;
}
if ((this.myChar.dir == "LEFT") && (mc.shot)) {
xAdj = (-(mc._width / 2)) + 20;
}
} else {
_local5._y = (mc._y - mc._height) + (40 + randRange(40, 60));
}
if (mc.stunned) {
if (mc.dir == "RIGHT") {
xAdj = (-(mc._width / 2)) + 35;
} else {
xAdj = (mc._width / 2) - 35;
}
}
_local5._x = mc._x + xAdj;
var _local7 = new Color(_local5);
_local7.setRGB(Math.floor(Math.random() * 6710886) + 10066329);
var _local8 = randRange(100, 400);
_local5._xscale = (_local5._yscale = _local5._xscale * (_local8 / 100));
_local5.g = 0;
_local5.xMovement = -Math.abs(Math.random() * 12);
_local5.yMovement = ((-Math.random()) * 8) - 12;
if (Math.abs(mc._xscale) != mc._xscale) {
_local5.xMovement = _local5.xMovement * -1;
}
if (mc.shot) {
_local5.xMovement = _local5.xMovement * -1;
}
_local5.parent = mc;
_local5.randEnd = randRange(0, 40) - 20;
_local5.cacheAsBitmap = true;
_local5.onEnterFrame = function () {
if (!_global.paused) {
this._alpha = this._alpha - 2;
if (this._y >= this.parent.oldY) {
this.removeMovieClip();
}
this._x = this._x - ((this.xMovement = this.xMovement * 0.95));
this._y = this._y + ((this.yMovement = this.yMovement + 2));
}
};
_local6++;
}
} else {
var xAdj = (mc._width / 2);
if (!mc.shot) {
temp = _root.attachMovie("hitBlood_" + randRange(1, 3), (("blood_" + mc) + "_") + randRange(1, 200), _root.getNextHighestDepth());
} else {
temp = _root.attachMovie("shotBlood_" + randRange(1, 4), (("blood_" + mc) + "_") + randRange(1, 200), _root.getNextHighestDepth());
}
if (!mc.stunned) {
temp._y = (mc._y - mc._height) + (40 + randRange(10, 20));
if ((this.myChar.dir == "RIGHT") && (!mc.shot)) {
temp._xscale = -200;
xAdj = (-(mc._width / 2)) + 40;
}
if ((this.myChar.dir == "RIGHT") && (mc.shot)) {
temp._xscale = 200;
xAdj = (mc._width / 2) - 20;
}
if ((this.myChar.dir == "LEFT") && (!mc.shot)) {
temp._xscale = 200;
xAdj = (mc._width / 2) - 40;
}
if ((this.myChar.dir == "LEFT") && (mc.shot)) {
temp._xscale = -200;
xAdj = (-(mc._width / 2)) + 20;
}
} else {
temp._y = (mc._y - mc._height) + (40 + randRange(40, 60));
}
temp._x = mc._x;
if (mc.stunned) {
temp._rotation = temp._rotation - 90;
if (mc.dir == "RIGHT") {
xAdj = (-(mc._width / 2)) + 35;
} else {
xAdj = (mc._width / 2) - 35;
}
}
temp.oldY = mc._y - 2;
temp._x = mc._x + xAdj;
temp.parent = mc;
temp.xAdj = xAdj;
temp.onEnterFrame = function () {
if (!_global.paused) {
this.play();
this._x = this.parent._x + this.xAdj;
if (this._currentframe == this._totalframes) {
this.removeMovieClip();
}
} else {
this.stop();
}
};
}
}
}
function playerBlood(dirRight, enemy) {
if (_global.bloodMode) {
if (_global.innocenceMode) {
temp = _root.createEmptyMovieClip((("bloodmc_" + this.myChar._name) + "_") + randRange(1, 50000), _root.getNextHighestDepth());
bloodCount = 0;
var _local9 = randRange(5, 15);
var _local6 = 0;
while (_local6 < _local9) {
bloodCount++;
var _local4 = temp.attachMovie("confetti", "blood" + bloodCount, temp.getNextHighestDepth());
_local4._y = (this.myChar._y - this.myChar._height) + (40 + randRange(10, 20));
if ((enemy.dir == "RIGHT") && (!this.myChar.shot)) {
xAdj = (-(this.myChar._width / 2)) + 40;
}
if ((enemy.dir == "RIGHT") && (this.myChar.shot)) {
xAdj = (this.myChar._width / 2) - 20;
}
if ((enemy.dir == "LEFT") && (!this.myChar.shot)) {
xAdj = (this.myChar._width / 2) - 40;
}
if ((enemy.dir == "LEFT") && (this.myChar.shot)) {
xAdj = (-(this.myChar._width / 2)) + 20;
}
_local4._x = this.myChar._x + xAdj;
var _local7 = new Color(_local4);
_local7.setRGB(Math.floor(Math.random() * 6710886) + 10066329);
var _local8 = randRange(100, 300);
_local4._xscale = (_local4._yscale = _local4._xscale * (_local8 / 100));
_local4.g = 0;
_local4.xMovement = -Math.abs(Math.random() * 12);
_local4.yMovement = ((-Math.random()) * 8) - 12;
if (enemy.dir == "LEFT") {
_local4.xMovement = _local4.xMovement * -1;
}
if (_root.myChar.shot) {
_local4.xMovement = _local4.xMovement * -1;
}
_local4.parent = this.myChar;
_local4.randEnd = randRange(0, 40) - 20;
_local4.cacheAsBitmap = true;
_local4.onEnterFrame = function () {
if (!_global.paused) {
this._alpha = this._alpha - 2;
if (this._y >= this.parent.oldY) {
this.removeMovieClip();
}
this._x = this._x - ((this.xMovement = this.xMovement * 0.95));
this._y = this._y + ((this.yMovement = this.yMovement + 2));
}
};
_local6++;
}
_root.myChar.shot = false;
} else {
var xAdj = (mc._width / 2);
var mc = _root.myChar;
if (!mc.shot) {
temp = _root.attachMovie("hitBlood_" + randRange(1, 3), (("blood_" + mc) + "_") + randRange(1, 200), _root.getNextHighestDepth());
} else {
temp = _root.attachMovie("shotBlood_" + randRange(1, 4), (("blood_" + mc) + "_") + randRange(1, 200), _root.getNextHighestDepth());
}
temp._y = (mc._y - mc._height) + (40 + randRange(10, 20));
if (dirRight) {
temp._xscale = 200;
xAdj = (mc._width / 2) - 20;
} else {
temp._xscale = -200;
xAdj = (-(mc._width / 2)) + 40;
}
temp._x = mc._x;
temp.oldY = mc._y - 2;
temp._x = mc._x + xAdj;
temp.parent = mc;
temp.xAdj = xAdj;
temp.onEnterFrame = function () {
if (!_global.paused) {
this.play();
this._x = this.parent._x + this.xAdj;
if (this._currentframe == this._totalframes) {
this.removeMovieClip();
}
} else {
this.stop();
}
};
}
}
}
function randRange(min, max) {
var _local1 = Math.floor(Math.random() * ((max - min) + 1)) + min;
return(_local1);
}
function trueX(mc) {
var _local1 = {x:mc._x, y:mc._y};
trace((mc._x + " : ") + mc.localToGlobal(_local1));
return(_local1._x);
}
function resetFired() {
clearInterval(this.firedTimer);
this.firedTimer = -1;
}
function resetAttackTimer() {
clearInterval(this.attackTimer);
this.attackTimer = -1;
}
function makeShell(mc, right) {
if (_global.qualFX) {
var _local6 = mc._width / 2;
_root["shellcasing_" + this.shellCount].removeMovieClip();
temp = _root.attachMovie("shellcasing", "shellcasing_" + (this.shellCount++), _root.getNextHighestDepth());
if (this.shellCount >= 30) {
this.shellCount = 0;
}
temp._y = (mc._y - mc._height) + 40;
temp._xscale = (temp._yscale = 75);
temp.xMovement = ((-Math.random()) * 5) - 5;
temp.yMovement = ((-Math.random()) * 2) - 12;
var _local5 = mc.dir;
if (right != undefined) {
_local5 = (right ? "RIGHT" : "LEFT");
}
if (_local5 == "RIGHT") {
temp.xMovement = temp.xMovement * -1;
}
if (_local5 == "RIGHT") {
_local6 = (-(mc._width / 2)) + 60;
}
if (_local5 == "LEFT") {
_local6 = (mc._width / 2) - 60;
}
temp._x = mc._x + _local6;
temp.oldY = mc.oldY;
temp.parent = mc;
temp.xAdj = _local6;
temp.spinRate = _root.randRange(15, 30);
temp.sCount = this.shellCount;
temp.onEnterFrame = function () {
if (!_global.paused) {
this._rotation = this._rotation + this.spinRate;
this._x = this._x - ((this.xMovement = this.xMovement * 0.95));
this._y = this._y + ((this.yMovement = this.yMovement + 2));
if (this._y > this.oldY) {
this.yMovement = this.yMovement * -0.6;
}
if (((this.yMovement > -1) && (this.yMovement < 1)) && (this._y >= this.oldY)) {
this.swapDepths(this.sCount);
delete this.onEnterFrame;
}
}
};
}
}
_global.paused = false;
numcount = 0;
cumule = 0;
this.createEmptyMovieClip("fps", this.getNextHighestDepth());
lowestFPS = 30;
fps_func = function () {
numcount++;
currfps = getFPS();
fpps = currfps;
cumule = cumule + currfps;
fppsavg = Math.round((cumule / numcount) * 10) / 10;
if ((lowestFPS > fpps) && (fpps != 0)) {
lowestFPS = fpps;
}
};
this.firedTimer = -1;
this.attackTimer = -1;
this.shellCount = 0;
Instance of Symbol 208 MovieClip "stage_mc" in Symbol 628 MovieClip [battleMC] Frame 1
onClipEvent (load) {
this.onRelease = function () {
};
this.useHandCursor = false;
}
Instance of Symbol 579 MovieClip "myChar" in Symbol 628 MovieClip [battleMC] Frame 1
onClipEvent (load) {
function timeCountDown() {
_global.lastSeconds = true;
this.setVariables();
this.timerPopup = _root.attachMovie("timerPopup", "timerPopup", _root.getNextHighestDepth());
this.timerPopup._x = 0;
this.timerPopup._y = 0;
this.timerPopup.numH = 0;
this.timerPopup.onEnterFrame = function () {
this.swapDepths(this._parent.getNextHighestDepth());
if (this._currentframe == this._totalframes) {
if (this.numH >= 30) {
_quality = "HIGH";
_root.removeMovieClip();
this.stop();
} else {
this.gotoAndPlay(this._totalframes - 1);
this.numH++;
}
}
};
}
function timerOut() {
_global.win = false;
_quality = "HIGH";
_root.removeMovieClip();
trace(getTimer() + " - TIME'S UP");
}
function spawnMore() {
if (this.countEnemy < _global.enemyCount) {
this.countEnemy++;
myType = _global.enemyType;
temp = this._parent.attachMovie(myType, "enemy_" + this.countEnemy, this._parent.getNextHighestDepth());
temp._x = _root.randRange(Stage.width + 20, Stage.width + 6);
temp._y = _root.randRange(250, Stage.height - 20) + ((this.countEnemy - 1) * 0.1);
temp.myID = this.countEnemy - 1;
var _local4 = 0;
temp.myHat = _root.randRange(_global.spriteConf[_local4++], _global.spriteConf[_local4++]);
temp.myEyes = _root.randRange(_global.spriteConf[_local4++], _global.spriteConf[_local4++]);
temp.myFace = _root.randRange(_global.spriteConf[_local4++], _global.spriteConf[_local4++]);
temp.myBaton = _root.randRange(_global.spriteConf[_local4++], _global.spriteConf[_local4++]);
temp.myGun = _root.randRange(1, 3);
temp.paused = false;
trace((((("enemyStack: " + temp) + " _y:") + temp._y) + ", _x:") + temp._x);
}
}
function doSound(id) {
this.mySound.attachSound(id);
this.mySound.start();
}
function setVariables() {
trace("SETVARS");
_global.hp = this.hp;
_global.ammo = this.ammo;
_global.money = this.cashmoney;
}
function Attack(frameLabel, frameHold, yHold, hitStagger, hitStun, hpMin, hpMax) {
this.frameLabel = frameLabel;
this.frameHold = frameHold;
this.yHold = yHold;
this.hitStagger = hitStagger;
this.hitStun = hitStun;
this.hpMin = hpMin;
this.hpMax = hpMax;
this.toString = function () {
trace("Attack : " + this.frameLabel);
};
}
function stringCheckAll(myArray, str) {
var _local3 = true;
var _local1 = 0;
while (_local1 < myArray.length) {
if (myArray[_local1] != str) {
_local3 = false;
}
_local1++;
}
return(_local3);
}
function myY() {
if (this.jumping) {
return(this.oldY);
}
return(this._y);
}
function deadAnimation() {
this.deadAnim = true;
this.gotoAndStop("lose");
this.mc.defeatedPopup = null;
this.setVariables();
this.mc.onEnterFrame = function () {
if ((!this._parent.playDead) && (this._currentframe == 6)) {
this.gotoAndPlay(5);
}
if ((!defeatedPopup) && (this._currentframe == this._totalframes)) {
Key.removeListener(this._parent.keyListener);
defeatedPopup = _root.attachMovie("defeatedPopup", "defeated", _root.getNextHighestDepth());
defeatedPopup._x = 0;
defeatedPopup._y = 0;
defeatedPopup.onEnterFrame = function () {
this.swapDepths(this._parent.getNextHighestDepth());
if (this._currentframe == this._totalframes) {
this.stop();
_quality = "HIGH";
_root.removeMovieClip();
}
};
this.gotoAndStop(this._totalframes);
}
};
}
function jumpEnd() {
this.gotoAndStop("land");
this.animBusy = true;
this.mc.onEnterFrame = function () {
if (this._currentframe == this._totalframes) {
this._parent.jumping = false;
this._parent.animBusy = false;
idleAnimReset();
}
};
}
function idleTransition() {
this.animBusy = true;
this.gotoAndStop("idle_return");
this.mc.onEnterFrame = function () {
if (this._currentframe == this._totalframes) {
idleAnimReset();
}
};
}
function idleAnimReset() {
this.animBusy = false;
if ((!this.animBusy) && (!this.jumping)) {
this.gotoAndStop("idle");
}
}
function varThreshold(charVal, range, enemyVal) {
return((enemyVal >= (charVal - range)) && (enemyVal <= (charVal + range)));
}
function hitAnim() {
this.animBusy = true;
if (_root.randRange(1, 2) == 1) {
this.gotoAndStop("hit");
} else {
this.gotoAndStop("hit2");
}
this.mc.onEnterFrame = function () {
if (this._currentframe == this._totalframes) {
idleTransition();
}
};
}
function stunnedEnemy(enemyStack) {
var _local3 = this._parent[enemyStack[i]];
var _local5 = true;
var i = 1;
while (i < enemyStack.length) {
var _local2 = this._parent[enemyStack[i]];
if (_local2._y > _local3._y) {
_local3 = _local2;
}
if (_local2.stunned != true) {
_local5 = false;
}
i++;
}
trace(stunnedEnemy);
if (!_local5) {
return(undefined);
}
return(_local3);
}
function enemiesOnY(yVal, yTol, mc) {
var _local5 = new Array();
for (i in this._parent) {
if (((typeof(this._parent[i]) == "movieclip") && (i.substr(0, 6) == "enemy_")) && ((mc == undefined) || ((mc != undefined) && (i != mc)))) {
if ((((this._parent[i]._y >= (yVal - yTol)) && (this._parent[i]._y <= (yVal + yTol))) && (!this._parent[i].dead)) && (!this._parent[i].airTime)) {
_local5.push(i);
}
}
}
return(_local5);
}
function closestEnemyOnX(enemyStack, dir, xVal) {
var _local3 = null;
if (xVal == undefined) {
xVal = this._x;
}
var _local4 = 0;
while (_local4 < enemyStack.length) {
var _local2 = this._parent[enemyStack[_local4]];
if (dir == "LEFT") {
if ((_local2._x < xVal) && ((_local2._x > _local3._x) || (_local3 == null))) {
_local3 = _local2;
}
}
if (dir == "RIGHT") {
if ((_local2._x > xVal) && ((_local2._x < _local3._x) || (_local3 == null))) {
_local3 = _local2;
}
}
_local4++;
}
return(_local3);
}
function closestEnemiesOnXInRange(enemyStack, xVal) {
var _local6 = new Array();
var _local3 = 0;
while (_local3 < enemyStack.length) {
var _local2 = this._parent[enemyStack[_local3]];
if ((_local2._x >= (this._x - xVal)) && (_local2._x <= (this._x + xVal))) {
_local6.push(_local2);
}
_local3++;
}
return(_local6);
}
function closestEnemiesOnXInRangeInDir(enemyStack, xVal) {
var _local4 = new Array();
var _local3 = 0;
while (_local3 < enemyStack.length) {
var _local2 = this._parent[enemyStack[_local3]];
if (this.dir == "RIGHT") {
if ((_local2._x <= (this._x + xVal)) && (_local2._x >= this._x)) {
_local4.push(_local2);
}
} else if ((_local2._x >= (this._x - xVal)) && (_local2._x <= this._x)) {
_local4.push(_local2);
}
_local3++;
}
return(_local4);
}
function pauseMC() {
var _local3 = 1;
while (_local3 <= _global.enemyCount) {
temp = this._parent["enemy_" + _local3];
if (!temp.dead) {
temp.pauseMe();
}
temp.ready2go = true;
_local3++;
}
this.mc.stop();
for (_local3 in this.mc) {
if (typeof(this.mc[_local3]) == "movieclip") {
this.mc[_local3].stop();
}
}
this.paused = true;
if (!_global.win) {
pausedPopup();
}
}
function pausedPopup() {
pausePopup = _root.attachMovie("pausedPopup", "pauseWin", _root.getNextHighestDepth());
pausePopup._x = 0;
pausePopup._y = 0;
this.doSound("popUp");
this.setVariables();
pausePopup.onEnterFrame = function () {
if (this._currentframe == this._totalframes) {
this.stop();
}
};
}
function youWin() {
Key.removeListener(keyListener);
this.timerPopup.removeMovieClip();
winPopup = _root.attachMovie("winPopup", "_youWin", _root.getNextHighestDepth());
winPopup._x = 0;
winPopup._y = 0;
this.setVariables();
winPopup.onEnterFrame = function () {
this.swapDepths(this._parent.getNextHighestDepth());
if (this._currentframe == this._totalframes) {
this.stop();
_quality = "HIGH";
_root.removeMovieClip();
}
};
}
function unPauseMC() {
_root.pauseWin.removeMovieClip();
for (x in this.mc) {
if (typeof(this.mc[x]) == "movieclip") {
if (this.mc[x].noPlay != true) {
this.mc[x].play();
}
}
}
this.mc.play();
this.paused = false;
var x = 1;
while (x <= this._global.enemyCount) {
temp = this._parent["enemy_" + x];
if (!temp.dead) {
temp.unPauseMe();
}
x++;
}
}
_global.lastSeconds = false;
_quality = _global.qualitySel;
this.paused = true;
this.timerPopup = null;
_global.paused = true;
_global.win = false;
if (_global.shadowMode) {
temp = this._parent.attachMovie("charShadow", "myShadow", this._parent.getNextHighestDepth());
temp.swapDepths(31);
temp._y = this.oldY - 0.2;
temp._x = this._x;
temp._alpha = 60 - ((Math.abs(this.oldY) - Math.abs(this._y)) / 3);
}
stop();
this.maxEnemy = 4;
this.npcLimit = ((this.maxEnemy > _global.enemyCount) ? (_global.enemyCount) : (this.maxEnemy));
this.countEnemy = this.npcLimit;
trace((((("npcLimit: " + this.npcLimit) + ", totalEnemies: ") + _global.enemyCount) + "; maxEnemy: ") + this.maxEnemy);
_global.deadCount = 0;
this.hp = _global.hp;
this.hpmax = _global.maxhp;
this.ammo = _global.ammo;
this.cashmoney = _global.money;
this._parent.battleHUD.healthMeter.gotoAndStop(((this.hp > 0) ? (100 * (this.hp / this.hpmax)) : 1));
this._parent.battleHUD.healthCount.text = (this.hp + " / ") + this.hpmax;
this._parent.battleHUD.myLoot.text = "$" + this.cashmoney;
if (_global.payoffEnabled) {
this._parent.battleHUD.payoff.text = "$" + (((this.cashmoney / 10) > 2000) ? (Math.floor(this.cashmoney / 10)) : 2000);
}
trace("SPRITECONF: " + _global.spriteConf);
this.origY = this._y;
this.dead = false;
this.deadAnim = false;
this.playDead = false;
this.mySound = new Sound();
var x = 1;
while (x <= this.npcLimit) {
myType = _global.enemyType;
temp = this._parent.attachMovie(myType, "enemy_" + x, this._parent.getNextHighestDepth());
temp._x = _root.randRange(250, Stage.width - 20);
temp._y = _root.randRange(250, Stage.height - 20) + ((x - 1) * 0.1);
temp.myID = x - 1;
var i = 0;
temp.myHat = _root.randRange(_global.spriteConf[i++], _global.spriteConf[i++]);
temp.myEyes = _root.randRange(_global.spriteConf[i++], _global.spriteConf[i++]);
temp.myFace = _root.randRange(_global.spriteConf[i++], _global.spriteConf[i++]);
temp.myBaton = _root.randRange(_global.spriteConf[i++], _global.spriteConf[i++]);
temp.myGun = _root.randRange(1, 3);
temp.paused = true;
trace((((("enemyStack: " + temp) + " _y:") + temp._y) + ", _x:") + temp._x);
x++;
}
this.comboCount = 1;
var jp = new Attack("jp", 6, true, 4, 2, 5, 7);
jp.attack = function () {
this.animBusy = true;
this.gotoAndStop("jp");
temp = enemiesOnY(this.oldY, 20);
if (temp.length > 0) {
temp = closestEnemyOnX(temp, this.dir);
this.mc.closestEnemy = temp;
} else {
this.mc.closestEnemy = null;
}
this.mc.hitAlready = false;
this.mc.onEnterFrame = function () {
if (((((!this.hitAlready) && (this.closestEnemy.hitTest(this.hit))) && (!this.closestEnemy.dead)) && (!this.closestEnemy.stunned)) && (!this.closestEnemy.airTime)) {
this.hitAlready = true;
this.closestEnemy.hp = this.closestEnemy.hp - _root.randRange(jp.hpMin, jp.hpMax);
this._parent.doSound("hit_" + _root.randRange(1, 4));
_root.makeBlood(this.closestEnemy, _root.randRange(1, 10));
this.closestEnemy.hitAnim();
this.closestEnemy.staggerNum = jp.hitStagger;
this.closestEnemy._xscale = -this._parent._xscale;
this.closestEnemy.xVel = ((this.closestEnemy._xscale > 0) ? -3 : 3);
}
if (this._currentframe == this._totalframes) {
this._parent.animBusy = false;
jumpAnimReset();
}
};
};
var jk = new Attack("jk", 6, true, 4, 2, 5, 7);
jk.attack = function () {
this.animBusy = true;
this.gotoAndStop("jk");
temp = enemiesOnY(this.oldY, 20);
if (temp.length > 0) {
temp = closestEnemyOnX(temp, this.dir);
this.mc.closestEnemy = temp;
} else {
this.mc.closestEnemy = null;
}
this.mc.hitAlready = false;
this.mc.onEnterFrame = function () {
if (((((!this.hitAlready) && (this.closestEnemy.hitTest(this.hit))) && (!this.closestEnemy.dead)) && (!this.closestEnemy.stunned)) && (!this.closestEnemy.airTime)) {
this.hitAlready = true;
this.closestEnemy.hp = this.closestEnemy.hp - _root.randRange(jk.hpMin, jk.hpMax);
_root.makeBlood(this.closestEnemy, _root.randRange(1, 10));
this.closestEnemy.staggerNum = jk.hitStagger;
this.closestEnemy.hitAnim();
this._parent.doSound("hit_" + _root.randRange(1, 4));
this.closestEnemy.holdTurn = true;
this.closestEnemy._xscale = -this._parent._xscale;
this.closestEnemy.xVel = ((this.closestEnemy._xscale > 0) ? -3 : 3);
}
if (this._currentframe == this._totalframes) {
this._parent.animBusy = false;
jumpAnimReset();
}
};
};
var js = new Attack("js", 6, true, 4, 2, 5, 7);
js.attack = function () {
this.animBusy = true;
this.gotoAndStop("js");
this.mc.hitAlready = false;
if (this.ammo > 0) {
doSound("playerGun");
} else {
doSound("emptyClip");
}
this.mc.onEnterFrame = function () {
if (this.gunend) {
this.temp = enemiesOnY(this._parent.oldY, 20, this._parent._x + this.gunend._x);
if (this._parent.dir == "LEFT") {
this.closestEnemy = closestEnemyOnX(this.temp, this._parent.dir, this._parent._x - this.gunend._x);
} else {
this.closestEnemy = closestEnemyOnX(this.temp, this._parent.dir, this._parent._x + this.gunend._x);
}
} else {
this.closestEnemy = null;
}
if ((((((!this.hitAlready) && (this.closestEnemy != null)) && (!this.closestEnemy.dead)) && (!this.closestEnemy.stunned)) && (!this.closestEnemy.airTime)) && (this._parent.ammo > 0)) {
this.hitAlready = true;
this.closestEnemy.shot = true;
this.closestEnemy.hp = this.closestEnemy.hp - _root.randRange(js.hpMin, js.hpMax);
_root.makeBlood(this.closestEnemy, _root.randRange(1, 10));
_root.makeShell(this._parent);
this.closestEnemy.staggerNum = js.hitStagger;
this.closestEnemy.hitAnim();
}
if (this._currentframe == this._totalframes) {
if (this._parent.ammo > 0) {
this._parent.ammo--;
}
this._parent.animBusy = false;
jumpAnimReset();
}
};
};
var punch1 = new Attack("p1", 6, true, 4, 2, 2, 6);
punch1.attack = function () {
this.animBusy = true;
this.gotoAndStop("p1");
temp = enemiesOnY(this._y, 20);
if (temp.length > 0) {
this.mc.closestEnemies = closestEnemiesOnXInRangeInDir(temp, 50);
} else {
this.mc.closestEnemy = null;
}
this.mc.hitAlready = false;
this.mc.onEnterFrame = function () {
if ((!this.hitAlready) && (this.closestEnemies != null)) {
var _local3 = 0;
while (_local3 < this.closestEnemies.length) {
if (((this.hit.hitTest(this.closestEnemies[_local3]) && (!this.closestEnemies[_local3].dead)) && (!this.closestEnemies[_local3].stunned)) && (!this.closestEnemies[_local3].airTime)) {
this.closestEnemies[_local3].hp = this.closestEnemies[_local3].hp - _root.randRange(punch1.hpMin, punch1.hpMax);
this.closestEnemies[_local3].yVel = -3;
this.closestEnemies[_local3].hitAnim();
if (!this.hitAlready) {
this.closestEnemies[_local3].doSound("hit_" + _root.randRange(1, 4));
}
this.closestEnemies[_local3].holdTurn = true;
this.closestEnemies[_local3]._xscale = -this._parent._xscale;
this.closestEnemies[_local3].xVel = ((this.closestEnemies[_local3]._xscale > 0) ? -1.5 : 1.5);
this.closestEnemies[_local3].staggerNum = punch1.hitStagger;
this.closestEnemies[_local3].hitWith(punch1);
_root.makeBlood(this.closestEnemies[_local3], _root.randRange(1, 10));
this.hitAlready = false;
}
_local3++;
}
}
if (this._currentframe == this._totalframes) {
idleTransition();
}
};
};
var punch2 = new Attack("p2", 8, true, 4, 2, 5, 8);
punch2.attack = function () {
this.animBusy = true;
this.gotoAndStop("p2");
temp = enemiesOnY(this._y, 20);
if (temp.length > 0) {
this.mc.closestEnemies = closestEnemiesOnXInRangeInDir(temp, 50);
} else {
this.mc.closestEnemies = null;
}
this.xHold = 3;
this.mc.count = 0;
this.mc.hitAlready = false;
this.mc.onEnterFrame = function () {
if ((!this.hitAlready) && (this.closestEnemies != null)) {
var _local3 = 0;
while (_local3 < this.closestEnemies.length) {
if (((this.hit.hitTest(this.closestEnemies[_local3]) && (!this.closestEnemies[_local3].dead)) && (!this.closestEnemies[_local3].stunned)) && (!this.closestEnemies[_local3].airTime)) {
this.closestEnemies[_local3].hp = this.closestEnemies[_local3].hp - _root.randRange(punch2.hpMin, punch2.hpMax);
if (!this.hitAlready) {
this.closestEnemies[_local3].doSound("hit_" + _root.randRange(1, 4));
}
this.hitAlready = true;
_root.makeBlood(this.closestEnemies[_local3], _root.randRange(1, 10));
this.closestEnemies[_local3].holdTurn = true;
this.closestEnemies[_local3]._xscale = -this._parent._xscale;
this.closestEnemies[_local3].yVel = -3;
this.closestEnemies[_local3].staggerNum = punch2.hitStagger;
this.closestEnemies[_local3].hitAnim();
this.closestEnemies[_local3].xVel = ((this.closestEnemies[_local3]._xscale > 0) ? -1.5 : 1.5);
}
_local3++;
}
}
if (this._currentframe == this._totalframes) {
idleTransition();
} else {
this.count++;
if (this.count < this._parent.xHold) {
this.gotoAndStop(1);
} else {
this.nextFrame();
}
}
};
};
var punch3 = new Attack("p3", 8, true, 4, 2, 8, 12);
punch3.attack = function () {
this.animBusy = true;
this.gotoAndStop("p3");
temp = enemiesOnY(this._y, 20);
if (temp.length > 0) {
this.mc.closestEnemies = closestEnemiesOnXInRangeInDir(temp, 50);
} else {
this.mc.closestEnemies = null;
}
this.xVel = ((this.dir == "LEFT") ? -7 : 7);
this.xHold = 10;
this.mc.count = 0;
this.mc.hitAlready = false;
this.mc.onEnterFrame = function () {
if ((!this.hitAlready) && (this.closestEnemies != null)) {
this._parent.comboCount = 0;
}
this._parent.comboStack = new Array();
var _local3 = 0;
while (_local3 < this.closestEnemies.length) {
if (((this.hit.hitTest(this.closestEnemies[_local3]) && (!this.closestEnemies[_local3].dead)) && (!this.closestEnemies[_local3].stunned)) && (!this.closestEnemies[_local3].airTime)) {
if (!this.hitAlready) {
this.closestEnemies[_local3].doSound("hit_" + _root.randRange(1, 4));
}
this.hitAlready = true;
this.closestEnemies[_local3].hp = this.closestEnemies[_local3].hp - _root.randRange(punch3.hpMin, punch3.hpMax);
_root.makeBlood(this.closestEnemies[_local3], _root.randRange(1, 10));
this.closestEnemies[_local3].yVel = -8;
this.closestEnemies[_local3].staggerNum = punch3.hitStagger;
this.closestEnemies[_local3].airHitAnim();
this.closestEnemies[_local3].hitWith(punch3);
this.closestEnemies[_local3].holdTurn = true;
this.closestEnemies[_local3]._xscale = -this._parent._xscale;
this.closestEnemies[_local3].xVel = ((this.closestEnemies[_local3]._xscale > 0) ? -7 : 7);
}
_local3++;
}
if (this._currentframe == this._totalframes) {
idleTransition();
} else {
this.count++;
if (this.count < this._parent.xHold) {
this.gotoAndStop(1);
} else {
this.nextFrame();
}
}
};
};
var punch4 = new Attack("p4", 9, true, 4, 2, 10, 20);
punch4.attack = function () {
this.animBusy = true;
this.gotoAndStop("p4");
temp = enemiesOnY(this._y, 20);
if (temp.length > 0) {
this.mc.closestEnemies = closestEnemiesOnXInRangeInDir(temp, 50);
} else {
this.mc.closestEnemies = null;
}
this.xVel = ((this.dir == "LEFT") ? -5 : 5);
this.mc.hitAlready = false;
this.xHold = 8;
this.mc.count = 0;
this.mc.onEnterFrame = function () {
if ((!this.hitAlready) && (this.closestEnemies != null)) {
var _local3 = 0;
while (_local3 < this.closestEnemies.length) {
if (((this.hit.hitTest(this.closestEnemies[_local3]) && (!this.closestEnemies[_local3].dead)) && (!this.closestEnemies[_local3].stunned)) && (!this.closestEnemies[_local3].airTime)) {
this.closestEnemies[_local3].hp = this.closestEnemies[_local3].hp - _root.randRange(punch4.hpMin, punch4.hpMax);
if (!this.hitAlready) {
this.closestEnemies[_local3].doSound("hit_" + _root.randRange(1, 4));
}
_root.makeBlood(this.closestEnemies[_local3], _root.randRange(1, 10));
this.closestEnemies[_local3].yVel = -3;
this.closestEnemies[_local3].staggerNum = punch4.hitStagger;
this.closestEnemies[_local3].hitAnim();
this.closestEnemies[_local3].holdTurn = true;
this.closestEnemies[_local3]._xscale = -this._parent._xscale;
this.closestEnemies[_local3].xVel = ((this.closestEnemies[_local3]._xscale > 0) ? -4 : 4);
if (!this.hitAlready) {
this._parent.comboCount++;
}
this.hitAlready = true;
}
_local3++;
}
}
if (this._currentframe == this._totalframes) {
trace((this + " : ") + this._parent.comboCount);
idleTransition();
} else {
this.count++;
if (this.count < this._parent.xHold) {
this.gotoAndStop(1);
} else {
this.nextFrame();
}
}
};
};
var punch5 = new Attack("p5", 33, true, 4, 2, 15, 25);
punch5.attack = function () {
this.animBusy = true;
this.gotoAndStop("p5");
this.mc.connected = false;
temp = enemiesOnY(this._y, 40);
if (temp.length > 0) {
this.mc.closestEnemies = closestEnemiesOnXInRange(temp, 160);
} else {
this.mc.closestEnemies = null;
}
this.doSound("p5");
this.mc.onEnterFrame = function () {
if ((!this.connected) && (this.closestEnemies != null)) {
var _local3 = 0;
while (_local3 < this.closestEnemies.length) {
if (((!this.closestEnemies[_local3].dead) && (!this.closestEnemies[_local3].stunned)) && (!this.closestEnemies[_local3].airTime)) {
this.closestEnemies[_local3].hp = this.closestEnemies[_local3].hp - _root.randRange(punch5.hpMin, punch5.hpMax);
_root.makeBlood(this.closestEnemies[_local3], _root.randRange(10, 30));
this.closestEnemies[_local3].flameHit();
this.closestEnemies[_local3].staggerNum = punch5.hitStagger;
this.closestEnemies[_local3].airHitAnim();
this.closestEnemies[_local3].hitWith(punch5);
this.closestEnemies[_local3].holdTurn = true;
this.closestEnemies[_local3].xVel = ((this.closestEnemies[_local3]._xscale > 0) ? -7 : 7);
this.closestEnemies[_local3].yVel = -15;
}
_local3++;
}
this._parent.comboCount++;
this.connected = true;
}
if (this._currentframe == this._totalframes) {
this._parent.comboCount = 0;
this._parent.comboStack = new Array();
this.animBusy = false;
idleTransition();
}
};
};
var punchC = new Attack("pc", 9, true, 4, 2, 5, 7);
punchC.attack = function () {
this.animBusy = true;
this.gotoAndStop("pc");
temp = enemiesOnY(this._y, 20);
if (temp.length > 0) {
this.mc.closestEnemies = closestEnemiesOnXInRangeInDir(temp, 50);
} else {
this.mc.closestEnemies = null;
}
this.xVel = ((this.dir == "LEFT") ? -5 : 5);
this.xHold = 10;
this.mc.count = 0;
this.mc.hitAlready = false;
this.mc.onEnterFrame = function () {
if ((!this.hitAlready) && (this.closestEnemies != null)) {
var _local3 = 0;
while (_local3 < this.closestEnemies.length) {
if (((this.hit.hitTest(this.closestEnemies[_local3]) && (!this.closestEnemies[_local3].dead)) && (!this.closestEnemies[_local3].stunned)) && (!this.closestEnemies[_local3].airTime)) {
if (!this.hitAlready) {
this.closestEnemies[_local3].doSound("hit_" + _root.randRange(1, 4));
}
this.closestEnemies[_local3].hp = this.closestEnemies[_local3].hp - _root.randRange(punchC.hpMin, punchC.hpMax);
_root.makeBlood(this.closestEnemies[_local3], _root.randRange(1, 10));
this.closestEnemies[_local3].staggerNum = punchC.hitStagger;
this.closestEnemies[_local3].hitAnim();
this.closestEnemies[_local3].holdTurn = true;
this.closestEnemies[_local3]._xscale = -this._parent._xscale;
this.closestEnemies[_local3].xVel = ((this.closestEnemies[_local3]._xscale > 0) ? -5 : 5);
if (!this.hitAlready) {
this._parent.comboCount++;
}
this.hitAlready = true;
}
_local3++;
}
}
if (this._currentframe == this._totalframes) {
if (!this.hitAlready) {
this._parent.comboCount = 0;
this._parent.comboStack = new Array();
}
this.animBusy = false;
idleTransition();
} else {
this.count++;
if (this.count < this._parent.xHold) {
this.gotoAndStop(1);
} else {
this.nextFrame();
}
}
};
};
var stomp = new Attack("stomp", 6, true, 0, 2, 2, 6);
var kick1 = new Attack("k1", 6, true, 1, 4, 2, 6);
kick1.attack = function () {
this.animBusy = true;
temp = enemiesOnY(this._y, 20);
myEnemy = stunnedEnemy(temp);
if (myEnemy == undefined) {
this.closestEnemies = closestEnemiesOnXInRangeInDir(temp, 50);
} else {
this.closestEnemies = null;
}
if (myEnemy != undefined) {
this.gotoAndStop("stomp");
this.mc.closestEnemies = this.closestEnemies;
delete this.closestEnemies;
this.mc.hitAlready = false;
this.mc.onEnterFrame = function () {
if (!this.hitAlready) {
if (!this.hitAlready) {
this.closestEnemies[i].doSound("stomp");
}
this.hitAlready = true;
_root.makeBlood(this.closestEnemies[0], _root.randRange(1, 5));
this.closestEnemies[0].hp = this.closestEnemies[0].hp - _root.randRange(stomp.hpMin, stomp.hpMax);
this.closestEnemies[0].staggerNum = stomp.hitStagger;
this.closestEnemies[0].stompedAnim();
this._parent.comboCount--;
}
if (this._currentframe == this._totalframes) {
idleTransition();
}
};
} else {
this.gotoAndStop("k1");
this.mc.closestEnemies = this.closestEnemies;
delete this.closestEnemies;
this.mc.hitAlready = false;
this.mc.onEnterFrame = function () {
if ((!this.hitAlready) && (this.closestEnemies != null)) {
var _local3 = 0;
while (_local3 < this.closestEnemies.length) {
if (((this.hit.hitTest(this.closestEnemies[_local3]) && (!this.closestEnemies[_local3].dead)) && (!this.closestEnemies[_local3].stunned)) && (!this.closestEnemies[_local3].airTime)) {
if (!this.hitAlready) {
this.closestEnemies[_local3].doSound("hit_" + _root.randRange(1, 4));
}
this.hitAlready = true;
_root.makeBlood(this.closestEnemies[_local3], _root.randRange(1, 2));
this.closestEnemies[_local3].hp = this.closestEnemies[_local3].hp - _root.randRange(kick1.hpMin, kick1.hpMax);
this.closestEnemies[_local3].yVel = -1;
this.closestEnemies[_local3].staggerNum = kick1.hitStagger;
this.closestEnemies[_local3].hitAnim();
this.closestEnemies[_local3].holdTurn = true;
this.closestEnemies[_local3]._xscale = -this._parent._xscale;
this.closestEnemies[_local3].xVel = ((this.closestEnemies[_local3]._xscale > 0) ? -1 : 1);
}
_local3++;
}
}
if (this._currentframe == this._totalframes) {
idleTransition();
}
};
}
};
var kick2 = new Attack("k2", 8, true, 4, 2, 5, 8);
kick2.attack = function () {
this.animBusy = true;
this.gotoAndStop("k2");
temp = enemiesOnY(this.oldY, 20);
if (temp.length > 0) {
this.mc.closestEnemies = closestEnemiesOnXInRangeInDir(temp, 50);
} else {
this.mc.closestEnemies = null;
}
this.xVel = ((this.dir == "LEFT") ? -1 : 1);
this.mc.hitAlready = false;
this.mc.onEnterFrame = function () {
if ((!this.hitAlready) && (this.closestEnemies != null)) {
var _local3 = 0;
while (_local3 < this.closestEnemies.length) {
if (((this.hit.hitTest(this.closestEnemies[_local3]) && (!this.closestEnemies[_local3].dead)) && (!this.closestEnemies[_local3].stunned)) && (!this.closestEnemies[_local3].airTime)) {
if (!this.hitAlready) {
this.closestEnemies[_local3].doSound("hit_" + _root.randRange(1, 4));
}
this.hitAlready = true;
this.closestEnemies[_local3].hp = this.closestEnemies[_local3].hp - _root.randRange(kick2.hpMin, kick2.hpMax);
_root.makeBlood(this.closestEnemies[_local3], _root.randRange(1, 2));
this.closestEnemies[_local3].yVel = -1;
this.closestEnemies[_local3].staggerNum = kick2.hitStagger;
this.closestEnemies[_local3].hitAnim();
this.closestEnemies[_local3].holdTurn = true;
this.closestEnemies[_local3]._xscale = -this._parent._xscale;
this.closestEnemies[_local3].xVel = ((this.closestEnemies[_local3]._xscale > 0) ? -1 : 1);
}
_local3++;
}
}
if (this._currentframe == this._totalframes) {
idleTransition();
}
};
};
var kick3 = new Attack("k3", 8, true, 4, 2, 8, 12);
kick3.attack = function () {
this.animBusy = true;
this.gotoAndStop("k3");
temp = enemiesOnY(this._y, 20);
if (temp.length > 0) {
this.mc.closestEnemies = closestEnemiesOnXInRangeInDir(temp, 50);
} else {
this.mc.closestEnemies = null;
}
this.xVel = ((this.dir == "LEFT") ? -5 : 5);
this.xHold = 10;
this.mc.count = 0;
this.mc.hitAlready = false;
this.mc.onEnterFrame = function () {
if ((!this.hitAlready) && (this.closestEnemies != null)) {
this._parent.comboCount = 0;
this._parent.comboStack = new Array();
var _local3 = 0;
while (_local3 < this.closestEnemies.length) {
if (((this.hit.hitTest(this.closestEnemies[_local3]) && (!this.closestEnemies[_local3].dead)) && (!this.closestEnemies[_local3].stunned)) && (!this.closestEnemies[_local3].airTime)) {
if (!this.hitAlready) {
this.closestEnemies[_local3].doSound("hit_" + _root.randRange(1, 4));
}
this.hitAlready = true;
this.closestEnemies[_local3].hp = this.closestEnemies[_local3].hp - _root.randRange(kick3.hpMin, kick3.hpMax);
_root.makeBlood(this.closestEnemies[_local3], _root.randRange(1, 10));
this.closestEnemies[_local3].yVel = -10;
this.closestEnemies[_local3].staggerNum = kick3.hitStagger;
this.closestEnemies[_local3].airHitAnim();
this.closestEnemies[_local3].hitWith(kick3);
this.closestEnemies[_local3].holdTurn = true;
this.closestEnemies[_local3]._xscale = -this._parent._xscale;
this.closestEnemies[_local3].xVel = ((this.closestEnemies[_local3]._xscale > 0) ? -7 : 7);
}
_local3++;
}
}
if (this._currentframe == this._totalframes) {
this._parent.comboCount = 0;
this._parent.comboStack = new Array();
this.animBusy = false;
idleTransition();
} else {
this.count++;
if (this.count < this._parent.xHold) {
this.gotoAndStop(1);
} else {
this.nextFrame();
}
}
};
};
var kick4 = new Attack("k4", 9, true, 4, 2, 10, 20);
kick4.attack = function () {
this.animBusy = true;
this.gotoAndStop("k4");
temp = enemiesOnY(this._y, 20);
if (temp.length > 0) {
this.mc.closestEnemies = closestEnemiesOnXInRangeInDir(temp, 50);
} else {
this.mc.closestEnemies = null;
}
this.xVel = ((this.dir == "LEFT") ? -6 : 6);
this.xHold = 10;
this.mc.count = 0;
this.mc.hitAlready = false;
this.mc.onEnterFrame = function () {
if ((!this.hitAlready) && (this.closestEnemies != null)) {
var _local3 = 0;
while (_local3 < this.closestEnemies.length) {
if (((this.hit.hitTest(this.closestEnemies[_local3]) && (!this.closestEnemies[_local3].dead)) && (!this.closestEnemies[_local3].stunned)) && (!this.closestEnemies[_local3].airTime)) {
if (!this.hitAlready) {
this.closestEnemies[_local3].doSound("hit_" + _root.randRange(1, 4));
}
this.closestEnemies[_local3].hp = this.closestEnemies[_local3].hp - _root.randRange(kick4.hpMin, kick4.hpMax);
_root.makeBlood(this.closestEnemies[_local3], _root.randRange(1, 3));
this.closestEnemies[_local3].yVel = -5;
this.closestEnemies[_local3].staggerNum = kick4.hitStagger;
this.closestEnemies[_local3].hitAnim();
this.closestEnemies[_local3].holdTurn = true;
this.closestEnemies[_local3]._xscale = -this._parent._xscale;
this.closestEnemies[_local3].xVel = ((this.closestEnemies[_local3]._xscale > 0) ? -6 : 6);
if (!this.hitAlready) {
this._parent.comboCount++;
}
this.hitAlready = true;
}
_local3++;
}
}
if (this._currentframe == this._totalframes) {
if (!this.hitAlready) {
this._parent.comboCount = 0;
this._parent.comboStack = new Array();
}
this.animBusy = false;
idleTransition();
} else {
this.count++;
if (this.count < this._parent.xHold) {
this.gotoAndStop(1);
} else {
this.nextFrame();
}
}
};
};
var kick5 = new Attack("k5", 33, true, 4, 2, 15, 25);
kick5.attack = function () {
this.animBusy = true;
this.gotoAndStop("k5");
this.connected = false;
temp = enemiesOnY(this._y, 20);
if (temp.length > 0) {
this.mc.closestEnemies = closestEnemiesOnXInRangeInDir(temp, 50);
} else {
this.mc.closestEnemies = null;
}
this.xVel = ((this.dir == "LEFT") ? -5 : 5);
this.mc.hitAlready = false;
doSound("k5");
this.mc.onEnterFrame = function () {
if ((!this.hitAlready) && (this.closestEnemies != null)) {
var _local3 = 0;
while (_local3 < this.closestEnemies.length) {
if (((this.hit.hitTest(this.closestEnemies[_local3]) && (!this.closestEnemies[_local3].dead)) && (!this.closestEnemies[_local3].stunned)) && (!this.closestEnemies[_local3].airTime)) {
this.closestEnemies[_local3].hp = this.closestEnemies[_local3].hp - _root.randRange(kick5.hpMin, kick5.hpMax);
_root.makeBlood(this.closestEnemies[_local3], _root.randRange(1, 10));
this.closestEnemies[_local3].flameHit();
this.closestEnemies[_local3].staggerNum = kick5.hitStagger;
this.closestEnemies[_local3].airHitAnim();
this.closestEnemies[_local3].hitWith(kick5);
this.closestEnemies[_local3].holdTurn = true;
this.closestEnemies[_local3]._xscale = -this._parent._xscale;
this.closestEnemies[_local3].xVel = ((this.closestEnemies[_local3]._xscale > 0) ? -5 : 5);
this.closestEnemies[_local3].yVel = -20;
if (!this.hitAlready) {
this._parent.comboCount++;
}
this.hitAlready = true;
}
_local3++;
}
}
if (this._currentframe == this._totalframes) {
if (!this.hitAlready) {
this._parent.comboCount = 0;
this._parent.comboStack = new Array();
}
idleTransition();
}
};
};
var kickC = new Attack("kc", 9, true, 4, 2, 10, 15);
kickC.attack = function () {
this.animBusy = true;
this.gotoAndStop("kc");
temp = enemiesOnY(this._y, 20);
if (temp.length > 0) {
temp = closestEnemyOnX(temp, this.dir);
this.mc.closestEnemy = temp;
} else {
this.mc.closestEnemy = null;
}
this.xVel = ((this.dir == "LEFT") ? -6 : 6);
this.xHold = 10;
this.mc.count = 0;
this.mc.hitAlready = false;
this.mc.onEnterFrame = function () {
if (((((!this.hitAlready) && (this.hit.hitTest(this.closestEnemy))) && (!this.closestEnemy.dead)) && (!this.closestEnemy.stunned)) && (!this.closestEnemy.airTime)) {
if (!this.hitAlready) {
this.closestEnemy.doSound("hit_" + _root.randRange(1, 4));
}
this.closestEnemy.hp = this.closestEnemy.hp - _root.randRange(kickC.hpMin, kickC.hpMax);
_root.makeBlood(this.closestEnemy, _root.randRange(1, 3));
this.closestEnemy.yVel = -3;
this.closestEnemy.staggerNum = kickC.hitStagger;
this.closestEnemy.hitAnim();
this.closestEnemies[i].holdTurn = true;
this.closestEnemies[i]._xscale = -this._parent._xscale;
this.closestEnemy.xVel = ((this.closestEnemy._xscale > 0) ? -6 : 6);
if (!this.hitAlready) {
this._parent.comboCount++;
}
this.hitAlready = true;
}
if (this._currentframe == this._totalframes) {
if (!this.hitAlready) {
this._parent.comboCount = 0;
this._parent.comboStack = new Array();
}
this.animBusy = false;
idleTransition();
} else {
this.count++;
if (this.count < this._parent.xHold) {
this.gotoAndStop(1);
} else {
this.nextFrame();
}
}
};
};
var shoot1 = new Attack("s1", 9, true, 4, 2, 5, 7);
shoot1.attack = function () {
this.animBusy = true;
this.gotoAndStop("s1");
this.mc.hitAlready = false;
temp = enemiesOnY(this._y, 20);
if (temp.length > 0) {
if (this.dir == "LEFT") {
temp = closestEnemyOnX(temp, this.dir, this._x - this.mc.gunend._x);
} else {
temp = closestEnemyOnX(temp, this.dir, this._x + this.mc.gunend._x);
}
this.mc.closestEnemy = temp;
} else {
this.mc.closestEnemy = null;
}
if (this.ammo > 0) {
doSound("playerGun");
} else {
doSound("emptyClip");
}
this.mc.onEnterFrame = function () {
if (((!this.hitAlready) && (this.gunend)) && (this._parent.ammo > 0)) {
if ((((((this._parent.dir == "RIGHT") && (this.closestEnemy._x > (this._parent._x + this.gunend._x))) && (!this.closestEnemy.dead)) && (!this.closestEnemy.stunned)) && (!this.closestEnemy.airTime)) && (this._parent.ammo > 0)) {
this.closestEnemy.shot = true;
this.closestEnemy.hp = this.closestEnemy.hp - _root.randRange(shoot1.hpMin, shoot1.hpMax);
_root.makeBlood(this.closestEnemy, _root.randRange(1, 5));
this.closestEnemy.staggerNum = shoot1.hitStagger;
this.closestEnemy.hitAnim();
this.hitAlready = true;
} else if ((((((this._parent.dir == "LEFT") && (this.closestEnemy._x < (this._parent._x - this.gunend._x))) && (!this.closestEnemy.dead)) && (!this.closestEnemy.stunned)) && (!this.closestEnemy.airTime)) && (this._parent.ammo > 0)) {
this.closestEnemy.shot = true;
this.closestEnemy.hp = this.closestEnemy.hp - _root.randRange(shoot1.hpMin, shoot1.hpMax);
_root.makeBlood(this.closestEnemy, _root.randRange(1, 5));
_root.makeShell(this._parent);
this.closestEnemy.staggerNum = shoot1.hitStagger;
this.closestEnemy.hitAnim();
this.hitAlready = true;
}
_root.makeShell(this._parent);
}
if (this._currentframe == this._totalframes) {
if (this._parent.ammo > 0) {
this._parent.ammo--;
}
this.hitAlready = false;
idleAnimReset();
}
};
};
var shootC = new Attack("sc", 9, true, 4, 2, 5, 7);
shootC.attack = function () {
this.animBusy = true;
this.gotoAndStop("sc");
this.mc.hitAlready = false;
temp = enemiesOnY(this._y, 20);
if (temp.length > 0) {
if (this.dir == "LEFT") {
this.mc.closestEnemy = closestEnemyOnX(temp, this.dir, this._x - this.mc.gunend._x);
} else {
this.mc.closestEnemy = closestEnemyOnX(temp, this.dir, this._x + this.mc.gunend._x);
}
} else {
this.mc.closestEnemy = null;
}
if (this.ammo > 0) {
doSound("playerGun");
} else {
doSound("emptyClip");
}
this.mc.onEnterFrame = function () {
if (((((((!this.hitAlready) && (this._parent.dir == "RIGHT")) && (this.closestEnemy._x > (this._parent._x + this.gunend._x))) && (!this.closestEnemy.dead)) && (!this.closestEnemy.stunned)) && (!this.closestEnemy.airTime)) && (this._parent.ammo > 0)) {
this.hitAlready = true;
this.closestEnemy.shot = true;
this.closestEnemy.hp = this.closestEnemy.hp - _root.randRange(sc.hpMin, sc.hpMax);
_root.makeBlood(this.closestEnemy, _root.randRange(1, 10));
_root.makeShell(this._parent);
this.closestEnemy.staggerNum = shootC.hitStagger;
this.closestEnemy.hitAnim();
this._parent.comboCount++;
} else if (((((((!this.hitAlready) && (this._parent.dir == "LEFT")) && (this.closestEnemy._x < (this._parent._x - this.gunend._x))) && (!this.closestEnemy.dead)) && (!this.closestEnemy.stunned)) && (!this.closestEnemy.airTime)) && (this._parent.ammo > 0)) {
this.hitAlready = true;
this.closestEnemy.shot = true;
this.closestEnemy.hp = this.closestEnemy.hp - _root.randRange(sc.hpMin, sc.hpMax);
_root.makeBlood(this.closestEnemy, _root.randRange(1, 10));
_root.makeShell(this._parent);
this.closestEnemy.staggerNum = shootC.hitStagger;
this.closestEnemy.hitAnim();
this._parent.comboCount++;
}
if (this._currentframe == this._totalframes) {
if (this._parent.ammo > 0) {
this._parent.ammo--;
}
idleAnimReset();
}
};
this.combo = false;
delete this.comboExecute;
};
var shoot5 = new Attack("s5", 9, true, 4, 2, 1, 2);
shoot5.attack = function () {
this.animBusy = true;
this.gotoAndStop("s5");
temp = enemiesOnY(this._y, 20);
doSound("uzi");
this.mc.onEnterFrame = function () {
if (this.gunend && (temp.length)) {
var _local3 = 0;
while (_local3 < temp.length) {
if (((!temp[_local3].dead) && (!temp[_local3].stunned)) && (!temp[_local3].airTime)) {
_root[temp[_local3]].hp = _root[temp[_local3]].hp - _root.randRange(shoot5.hpMin, shoot5.hpMax);
_root.makeBlood(_root[temp[_local3]], _root.randRange(1, 10));
_root[temp[_local3]].shot = true;
_root[temp[_local3]].staggerNum = shoot5.hitStagger;
_root[temp[_local3]].hitAnim();
_root[temp[_local3]].xVel = ((_root[temp[_local3]]._xscale > 0) ? -4 : 4);
}
_root.makeShell(this._parent, true);
_root.makeShell(this._parent, false);
_local3++;
}
this._parent.comboCount++;
}
if (this._currentframe == this._totalframes) {
this._parent.comboStack = new Array();
idleTransition();
}
};
};
var keyListener = new Object();
keyListener.onKeyDown = function () {
if (Key.getCode() == 192) {
_root.fpsDisp._visible = !_root.fpsDisp._visible;
if (_root.fpsDisp._visible) {
_root.fps.onEnterFrame = _root.fps_func;
} else {
_root.fps.onEnterFrame = null;
}
}
if (Key.getCode() == 80) {
_global.paused = !_global.paused;
}
};
this.punchKey = 65;
this.kickKey = 83;
this.shootKey = 68;
this.animBusy = false;
this.specialBusy = false;
this.held = 0;
this.combo = false;
this.oldY = this._y;
this.horizMax = 6;
this.horizMin = 2;
this.horizCount = this.horizMin;
this.vertMax = 3;
this.vertMin = 1;
this.vertCount = this.vertMin;
_root.myEnemy.shot = false;
_root.myEnemy.flame = false;
this.comboStack = new Array();
this.dir = "RIGHT";
this.jumping = false;
this.firing = false;
this.walking = true;
this.easeCount = 0;
this.easeMax = 24;
this.walkRight = function () {
if ((this._x + this.horizCount) > Stage.width) {
this._x = Stage.width;
} else {
this._x = this._x + this.horizCount;
}
};
this.walkLeft = function () {
if ((this._x - this.horizCount) < 0) {
this._x = 0;
} else {
this._x = this._x - this.horizCount;
}
};
this.walkUp = function () {
if ((this._y - this.vertCount) < 250) {
this._y = 250;
} else {
this._y = this._y - this.vertCount;
}
};
this.walkDown = function () {
if ((this._y + this.vertCount) > Stage.height) {
this._y = Stage.height;
} else {
this._y = this._y + this.vertCount;
}
this.origY = this._y;
};
this.jump = function () {
this.distX = ((this.dir == "RIGHT") ? (this.horizCount / 3) : ((-this.horizCount) / 3));
this.origY = this._y;
this.yVel = -20;
};
}
onClipEvent (keyUp) {
if (((!this.jumping) && (!this.firing)) && (!this.walking)) {
this.horizCount = this.horizMin;
if (!this.animBusy) {
this.gotoAndStop("idle");
}
}
this.checkCombo();
if (((!this.animBusy) && (this.combo)) && (!this.jumping)) {
this.comboExecute();
}
this.walking = false;
this.held = 0;
}
onClipEvent (enterFrame) {
if (!_global.paused) {
if (this.paused) {
unPauseMC();
}
if (!this.dead) {
gravity = 1.5;
if ((((Key.isDown(this.kickKey) && (!Key.isDown(this.punchKey))) && (!Key.isDown(this.shootKey))) && (this.jumping)) && (this.held != this.kickKey)) {
if (!this.animBusy) {
attackAnim = jk.attack;
attackAnim();
}
}
if ((((Key.isDown(this.punchKey) && (!Key.isDown(this.kickKey))) && (!Key.isDown(this.shootKey))) && (this.jumping)) && (this.held != this.punchKey)) {
if (!this.animBusy) {
attackAnim = jp.attack;
attackAnim();
}
}
if ((((Key.isDown(this.shootKey) && (!Key.isDown(this.punchKey))) && (!Key.isDown(this.kickKey))) && (this.jumping)) && (this.held != this.shootKey)) {
if (!this.animBusy) {
attackAnim = js.attack;
attackAnim();
}
}
if ((((Key.isDown(this.punchKey) && (!Key.isDown(this.kickKey))) && (!Key.isDown(this.shootKey))) && (!this.jumping)) && (this.held != this.punchKey)) {
if ((!this.animBusy) || (this.mc._currentframe >= (this.mc._totalframes - 1))) {
this.held = Key.getCode();
this.comboStack.push("A");
switch (this.comboCount) {
default :
attackAnim = punch1.attack;
this.comboCount = 0;
this.comboStack = ["A"];
case 1 :
attackAnim = punch1.attack;
this.comboCount++;
// unexpected jump
case 2 :
attackAnim = punch2.attack;
this.comboCount++;
// unexpected jump
case 3 :
if (stringCheckAll(this.comboStack, "A") && (this.comboStack.length >= 2)) {
attackAnim = punch3.attack;
this.comboCount = 0;
this.comboStack = new Array();
} else {
attackAnim = punchC.attack;
}
// unexpected jump
case 4 :
attackAnim = punch4.attack;
// unexpected jump
case 5 :
}
if (_global.p5) {
attackAnim = punch5.attack;
} else {
attackAnim = punch1.attack;
}
attackAnim();
}
}
if ((((Key.isDown(this.kickKey) && (!Key.isDown(this.punchKey))) && (!Key.isDown(this.shootKey))) && (!this.jumping)) && (this.held != this.kickKey)) {
if ((!this.animBusy) || (this.mc._currentframe >= (this.mc._totalframes - 1))) {
this.held = Key.getCode();
this.comboStack.push("K");
switch (this.comboCount) {
default :
attackAnim = kick1.attack;
this.comboCount = 0;
this.comboStack = ["K"];
case 1 :
attackAnim = kick1.attack;
this.comboCount++;
// unexpected jump
case 2 :
attackAnim = kick2.attack;
this.comboCount++;
// unexpected jump
case 3 :
if (stringCheckAll(this.comboStack, "K")) {
attackAnim = kick3.attack;
this.comboCount = 0;
this.comboStack = new Array();
} else {
attackAnim = kickC.attack;
}
// unexpected jump
case 4 :
attackAnim = kick4.attack;
// unexpected jump
case 5 :
}
if (_global.k5) {
attackAnim = kick5.attack;
} else {
attackAnim = kick1.attack;
}
attackAnim();
}
}
if ((((Key.isDown(this.shootKey) && (!Key.isDown(this.punchKey))) && (!Key.isDown(this.kickKey))) && (!this.jumping)) && (this.held != this.shootKey)) {
if ((!this.animBusy) || (this.mc._currentframe >= (this.mc._totalframes - 1))) {
this.held = Key.getCode();
this.comboStack.push("S");
switch (this.comboCount) {
case 3 :
attackAnim = shootC.attack;
break;
case 5 :
if (_global.s5) {
attackAnim = shoot5.attack;
} else {
attackAnim = shoot1.attack;
}
break;
default :
attackAnim = shoot1.attack;
this.comboCount = 0;
this.comboStack = new Array();
}
attackAnim();
}
}
this.walkTemp = false;
if (!this.animBusy) {
if (Key.isDown(39)) {
if (this.jumping == false) {
this._xscale = 100;
if (this.dir != "RIGHT") {
this.horizCount = this.horizMin;
}
this.dir = "RIGHT";
if (!this.walkTemp) {
this.gotoAndStop("walk");
}
this.walkTemp = true;
this.walkRight();
this.horizCount = this.horizCount + 0.5;
if (this.horizCount > this.horizMax) {
this.horizCount = this.horizMax;
}
} else {
this.distX = this.distX + 0.5;
this._xscale = 100;
this.dir = "RIGHT";
}
}
if (Key.isDown(37)) {
if (this.jumping == false) {
this._xscale = -100;
if (this.dir != "LEFT") {
this.horizCount = this.horizMin;
}
this.dir = "LEFT";
this.horizCount = this.horizCount + 0.5;
if (this.horizCount > this.horizMax) {
this.horizCount = this.horizMax;
}
if (!this.walkTemp) {
this.gotoAndStop("walk");
}
this.walkTemp = true;
this.walkLeft();
} else {
this.distX = this.distX - 0.5;
this._xscale = -100;
this.dir = "LEFT";
}
}
if (Key.isDown(38)) {
if (this.jumping == false) {
this.vertCount = this.vertCount + 1;
if (this.vertCount > this.vertMax) {
this.vertCount = this.vertMax;
}
this.walkUp();
if (!this.walkTemp) {
this.gotoAndStop("walk");
}
this.walkTemp = true;
} else if (this.jumping) {
this.distY = this.distY + 0.2;
} else {
this.vertCount = this.vertMin;
}
}
if (Key.isDown(40)) {
if (this.jumping == false) {
this.vertCount = this.vertCount + 1;
if (this.vertCount > this.vertMax) {
this.vertCount = this.vertMax;
}
this.walkDown();
if (!this.walkTemp) {
this.gotoAndStop("walk");
}
this.walkTemp = true;
} else if (this.jumping) {
this.distY = this.distY + 0.2;
} else {
this.vertCount = this.vertMin;
}
}
if ((Key.isDown(32) && (!this.jumping)) && (!this.animBusy)) {
this.jump(this.dir);
this.jumping = true;
this.oldY = this._y;
}
}
this.walking = this.walkTemp;
if (this.jumping) {
if ((this._x + this.distX) > Stage.width) {
this._x = Stage.width;
} else if ((this._x + this.distX) < 0) {
this._x = 0;
} else {
this._x = this._x + this.distX;
}
this.yVel = this.yVel + gravity;
_y = (_y + this.yVel);
if ((this.yVel > 0) && (!this.animBusy)) {
this.gotoAndStop("fall");
} else if (!this.animBusy) {
this.gotoAndStop("idle_air");
}
if (this._y >= this.oldY) {
this._y = this.oldY;
this.jumping = false;
this.jumpEnd();
}
} else {
this.oldY = this._y;
if (Math.abs(this.xVel) > 0.5) {
if (this.xVel > 0) {
this.xVel = this.xVel - 0.5;
} else {
this.xVel = this.xVel + 0.5;
}
if (((_x + this.xVel) > 0) && ((_x + this.xVel) <= Stage.width)) {
_x = (_x + this.xVel);
}
} else {
this.xVel = 0;
}
if ((!this.animBusy) && (!this.walking)) {
this.gotoAndStop("idle");
}
}
if (!this.animBusy) {
this.comboStack = new Array();
this.comboCount = 1;
}
this._parent.myShadow._y = this.oldY - 0.2;
this._parent.myShadow._x = this._x;
this._parent.myShadow._alpha = 60 - ((Math.abs(this.oldY) - Math.abs(this._y)) / 3);
this._parent.battleHUD.healthMeter.gotoAndStop(((this.hp > 0) ? (100 * (this.hp / this.hpmax)) : 1));
this._parent.battleHUD.healthCount.text = (this.hp + " / ") + this.hpmax;
this._parent.battleHUD.ammoCount.text = this.ammo;
if (_global.payoffEnabled) {
this._parent.battleHUD.payoff.text = "$" + (++this.cashmoney);
}
this.dead = ((!_global.lastSeconds) ? (this.hp <= 0) : false);
} else if ((!this.deadAnim) && (!_global.lastSeconds)) {
this.deadAnim = true;
this.deadAnimation();
}
for (i in this._parent) {
if ((typeof(this._parent[i]) == "movieclip") && (((i.substr(0, 6) == "enemy_") || (i == "myChar")) || (i.substr(0, 5) == "blood"))) {
this._parent[i].swapDepths(this._parent[i].oldY * 10);
}
}
this.swapDepths((this.oldY + 1) * 10);
} else if ((!this.paused) && (!this.dead)) {
pauseMC();
}
if ((_global.deadCount >= _global.enemyCount) && (!_global.win)) {
_global.win = true;
trace("YOU WIN!");
_global.paused = true;
pauseMC();
youWin();
}
}
Instance of Symbol 584 MovieClip "myClock" in Symbol 628 MovieClip [battleMC] Frame 1
onClipEvent (load) {
this._visible = _global.timedBattle != 0;
if (_global.timedBattle) {
this.timer.text = (Math.floor(_global.timedBattle / 60) + ":") + Math.floor(_global.timedBattle % 60);
this.timerVal = _global.timedBattle;
this.lastTime = getTimer();
this.onEnterFrame = null;
this.enableMe = function () {
trace("ENABLEME");
this.onEnterFrame = this.eFrame;
};
this.eFrame = function () {
if (!_global.paused) {
newTime = getTimer();
if ((newTime - lastTime) > 1000) {
lastTime = newTime;
this.timer.text = ((Math.floor(this.timerVal / 60) + ":") + ((String(Math.floor(this.timerVal % 60)).length == 1) ? "0" : "")) + Math.floor(this.timerVal % 60);
this.timerVal--;
if (this.timerVal == 3) {
_root.myChar.timeCountDown();
}
if (this.timerVal == 1) {
Key.removeListener(this._parent.myChar.keyListener);
_root.myChar.pauseMC();
}
if (this.timerVal < 10) {
this.timer.textColor = 14483456 /* 0xDD0000 */;
}
if (this.timerVal <= 0) {
delete this.onEnterFrame;
}
}
}
};
}
}
Instance of Symbol 590 MovieClip "fpsDisp" in Symbol 628 MovieClip [battleMC] Frame 1
onClipEvent (load) {
this._visible = false;
}
Instance of Symbol 627 MovieClip "battleHUD" in Symbol 628 MovieClip [battleMC] Frame 1
onClipEvent (enterFrame) {
this.ammoCount.text = _global.ammo;
this.myLoot.text = _global.money;
this.healthCount.text = (_global.hp + " / ") + _global.maxhp;
}
Instance of Symbol 78 MovieClip [fightPopup] "fightPopup" in Symbol 628 MovieClip [battleMC] Frame 1
onClipEvent (load) {
this.swapDepths(40000);
this.onEnterFrame = function () {
if (this._currentframe == 92) {
_root.myChar.doSound("bellFight");
}
if (this._currentframe == this._totalframes) {
Key.addListener(_root.myChar.keyListener);
this.stop();
_global.paused = false;
_root.myChar.unPauseMC();
this._parent.myClock.enableMe();
this.removeMovieClip();
}
};
}
Symbol 693 MovieClip Frame 10
stop();
Symbol 696 MovieClip Frame 1
stop();
Symbol 699 MovieClip Frame 10
stop();
Symbol 701 MovieClip Frame 1
stop();
Symbol 706 MovieClip [inventoryEntry] Frame 1
stop();
Symbol 711 MovieClip Frame 1
stop();
Symbol 712 MovieClip [seedPriceEntry] Frame 1
stop();
Symbol 732 MovieClip Frame 14
stop();
Symbol 737 MovieClip [locationEntry] Frame 1
stop();
locationName.text = (this.myName ? (this.myName) : "Invalid Passport");
Symbol 737 MovieClip [locationEntry] Frame 2
locationName.text = (this.myName ? (this.myName) : "Invalid Passport");
Symbol 737 MovieClip [locationEntry] Frame 3
locationName.text = (this.myName ? (this.myName) : "Invalid Passport");
Symbol 737 MovieClip [locationEntry] Frame 4
locationName.text = (this.myName ? (this.myName) : "Invalid Passport");
Symbol 739 MovieClip [myChar] Frame 1
#initclip 27
Object.registerClass("myChar", com.DrugWars.Player);
#endinitclip
Symbol 746 MovieClip Frame 10
stop();
Symbol 748 MovieClip Frame 1
stop();
Instance of Symbol 740 MovieClip in Symbol 752 MovieClip [phonePopup] Frame 1
onClipEvent (load) {
this.onRelease = function () {
};
this.useHandCursor = false;
}
Symbol 761 MovieClip Frame 10
stop();
Symbol 765 MovieClip Frame 1
stop();
Symbol 769 MovieClip Frame 1
stop();
Symbol 773 MovieClip Frame 10
stop();
Symbol 775 MovieClip Frame 1
stop();
Instance of Symbol 740 MovieClip in Symbol 776 MovieClip [moneyTransactionEntry] Frame 1
onClipEvent (load) {
this.onRelease = function () {
};
this.useHandCursor = false;
}
Instance of Symbol 740 MovieClip in Symbol 780 MovieClip [noticePopup] Frame 1
onClipEvent (load) {
this.onRelease = function () {
};
this.useHandCursor = false;
}
Instance of Symbol 740 MovieClip in Symbol 784 MovieClip [transactionEntry] Frame 1
onClipEvent (load) {
this.onRelease = function () {
};
this.useHandCursor = false;
}
Symbol 791 MovieClip Frame 1
this.gotoAndStop(this._parent._parent._parent.myFace);
Symbol 796 MovieClip Frame 1
this.gotoAndStop(this._parent._parent._parent.myEyes);
Symbol 813 MovieClip Frame 1
this.gotoAndStop(this._parent._parent._parent.myHat);
Symbol 816 MovieClip Frame 1
stop();
Symbol 821 MovieClip Frame 1
this.gotoAndStop(this._parent._parent.myBaton);
this.noPlay = true;
Symbol 1005 MovieClip [cop] Frame 1
function doSound(id) {
this.mySound.attachSound(id);
this.mySound.start();
}
function calcAI() {
if (((!this.animBusy) && (this.myState != this.deadState)) && (this.myState != this.hitState)) {
switch (this.myState) {
case this.deadState :
trace(this + " : still DEAD");
break;
case this.hitState :
trace(this + " : hit");
break;
case this.idleState :
trace(this + " : idleState");
if (!varThreshold(this._x, 150, _root.myChar._x)) {
this.gunMode = true;
} else {
this.gunMode = false;
}
this.myState = this.walkState;
break;
case this.walkState :
trace(this + " : walkState");
if (this.gunMode && (varThreshold(this.oldY, 10, _root.myChar.oldY))) {
this.myState = this.gunAttack;
}
break;
case this.batonAttack :
trace(this + " : batonAttack");
this.gunMode = false;
if (_root.attackTimer != -1) {
this.myState = this.walkState;
}
break;
case this.gunAttack :
trace(this + " : gunAttack");
if (this._x < (Stage.width - 20)) {
if (this.ammo <= 0) {
this.gunMode = false;
}
if (this.gunMode && (!varThreshold(this.oldY, 10, _root.myChar.oldY))) {
this.gunMode = false;
}
if (_root.firedTimer != -1) {
this.gunMode = false;
}
} else {
this.gunMode = false;
}
if (!this.gunMode) {
this.myState = this.idleState;
}
break;
default :
trace(((this + " : default(") + this.myState) + ")");
}
}
}
function walkHoriz(right) {
if (!this.animBusy) {
this.gotoAndStop(walkGraphic());
if (right) {
this._x = this._x + this.xSpeed;
if (this._x > Stage.width) {
this._x = Stage.width;
}
} else {
this._x = this._x - this.xSpeed;
if (this._x < 0) {
this._x = 0;
}
}
}
}
function walkVert(up) {
if (!this.animBusy) {
this.gotoAndStop(walkGraphic());
if (up) {
if ((this._y + 1) < Stage.height) {
this._y = this._y + 1;
}
} else if ((this._y - 1) > 250) {
this._y = this._y - 1;
}
this.oldY = this._y;
}
}
function getUp() {
trace("GETUP");
if (this.hp > 0) {
this.gotoAndStop("getup");
this.animBusy = true;
this.mc.onEnterFrame = function () {
if (this._currentframe == this._totalframes) {
idleAnimReset();
}
};
} else {
setDead();
}
}
function setDead() {
trace("setDead : " + this);
clearInterval(this.stateCalcTimer);
this.myState = this.deadState;
this.dead = true;
_root.resetAttackTimer();
this.aiTimer = -1;
this.gotoAndStop("stomped");
delete this.flameCode.onEnterFrame;
delete this.mc.onEnterFrame;
this.mc.gotoAndStop(this.mc._totalframes);
this.my_color = new Color(this);
this.myTransform = this.my_color.getTransform();
this.myTransform.ra = 60;
this.myTransform.ga = 60;
this.myTransform.ba = 60;
this.my_color.setTransform(this.myTransform);
this.healthMeter._visible = false;
this.animBusy = true;
_global.deadCount++;
_root.myChar.spawnMore();
this.cacheAsBitmap = true;
}
function idleGraphic() {
if (this.gunMode) {
return("idle_gun");
}
return("idle_baton");
}
function walkGraphic() {
if (this.gunMode) {
return("walk_gun");
}
return("walk_baton");
}
function stompedAnim() {
this.myState = this.hitState;
this.gotoAndStop("stomped");
this.mc.gotoAndPlay(1);
delete this.mc.onEnterFrame;
this.mc.onEnterFrame = function () {
if (this._currentframe == this._totalframes) {
if (this._parent.stunCount >= this._parent.stunHold) {
getUp();
} else {
this.gotoAndPlay(this._totalframes - 1);
}
this._parent.stunned = false;
}
this._parent.stunCount++;
};
}
function idleAnimReset() {
if (this.hp > 0) {
this.myState = this.idleState;
this.animBusy = false;
this.airTime = false;
this.stunned = false;
this.turnHold = false;
delete this.mc.onEnterFrame;
this.gotoAndStop(idleGraphic());
} else {
this.airTime = true;
this.animBusy = true;
this.yVel = -10;
airHitAnim();
}
}
function swapToBaton() {
if (this.gunMode && (!this.animBusy)) {
this.gunMode = !this.gunMode;
this.gotoAndStop("switch_baton");
this.mc.onEnterFrame = function () {
if (this._currentframe == this._totalframes) {
idleAnimReset();
}
};
}
}
function swapToGun() {
if ((!this.gunMode) && (!this.animBusy)) {
this.gunMode = !this.gunMode;
this.gotoAndStop("switch_gun");
this.animBusy = true;
this.mc.onEnterFrame = function () {
if (this._currentframe == this._totalframes) {
idleAnimReset();
}
};
}
}
function attack() {
if ((!this.animBusy) && (!_root.myChar.dead)) {
if (this.gunMode) {
this.animBusy = true;
_root.firedTimer = setInterval(this._parent, "resetFired", 2000);
prepShot();
} else {
this.gotoAndStop("attack");
this.animBusy = true;
_root.attackTimer = setInterval(_root, "resetAttackTimer", 2000);
this.mc.onEnterFrame = function () {
if (((!this.hitAlready) && (this.hit.hitTest(_root.myChar))) && (!_root.myChar.inv)) {
this._parent.doSound("hit_" + _root.randRange(1, 4));
this.hitAlready = true;
_root.myChar.hp = _root.myChar.hp - 5;
if (!_root.myChar.animBusy) {
_root.myChar.hitAnim();
}
_root.myChar.shot = false;
_root.playerBlood(true, enemy);
_root.myChar.comboStack = new Array();
_root.myChar.comboCount = 0;
}
if (this._currentframe == this._totalframes) {
idleAnimReset();
}
};
}
}
}
function prepShot() {
this.gotoAndStop("aim");
this.animBusy = true;
this.mc.holdCount = 30;
this.mc.count = 0;
this.mc.onEnterFrame = function () {
this.count++;
if (this._currentframe == this._totalframes) {
if (this.count >= this.holdCount) {
shoot();
} else {
this.gotoAndPlay(this._totalframes - 1);
}
}
};
}
function shoot() {
this.gotoAndStop("shoot");
this.animBusy = true;
this.ammo--;
doSound("enemyGun");
if (varThreshold(_root.myChar.oldY, 10, this.oldY) && (!_root.myChar.jumping)) {
_root.myChar.hp = _root.myChar.hp - 5;
if (!_root.myChar.animBusy) {
_root.myChar.hitAnim();
}
_root.myChar.shot = true;
_root.playerBlood(false, this);
_root.myChar.comboStack = new Array();
_root.myChar.comboCount = 0;
this.myState = this.batonAttack;
}
_root.makeShell(this);
this.mc.onEnterFrame = function () {
if (this._currentframe == this._totalframes) {
shootReset();
}
};
}
function shootReset() {
_root.resetFired();
delete this.mc.onEnterFrame;
this.animBusy = true;
this.gotoAndStop("idle_return");
this.animBusy = true;
this.ammo--;
if (varThreshold(_root.myChar.oldY, 10, this.oldY)) {
_root.myChar.hp = _root.myChar.hp - 5;
if (!_root.myChar.animBusy) {
_root.myChar.hitAnim();
}
_root.playerBlood(false);
_root.myChar.comboStack = new Array();
_root.myChar.comboCount = 0;
this.myState = this.batonAttack;
}
this.mc.onEnterFrame = function () {
if (this._currentframe == this._totalframes) {
idleAnimReset();
}
};
}
function varThreshold(charVal, range, enemyVal) {
return((enemyVal >= (charVal - range)) && (enemyVal <= (charVal + range)));
}
function airLand() {
this.gotoAndStop("land");
this.stunCount = 0;
this.mc.onEnterFrame = function () {
if (this._currentframe == this._totalframes) {
if (this._parent.stunCount >= this._parent.stunHold) {
this._parent.animBusy = false;
this._parent.airTime = false;
getUp();
} else {
this.gotoAndPlay(this._totalframes - 1);
}
}
this._parent.stunCount++;
};
}
function airHitAnim() {
this.animBusy = true;
this.airTime = true;
this.stunned = true;
this.turnHold = true;
this.gotoAndStop("fall");
this.mc.onEnterFrame = function () {
if (this._parent._y == this._parent.oldY) {
airLand();
} else if (this._currentframe >= (this._totalframes - 1)) {
this.gotoAndPlay(this._totalframes - 1);
}
};
}
function hitAnim() {
if (this.hp > 0) {
delete this.mc.onEnterFrame;
this.stunned = true;
this.animBusy = true;
if (_root.randRange(1, 2) == 1) {
if (this.gunMode) {
this.gotoAndStop("hit_gun");
} else {
this.gotoAndStop("hit_baton");
}
this.xVel = 0;
} else {
if (this.gunMode) {
this.gotoAndStop("hit2_gun");
} else {
this.gotoAndStop("hit2_baton");
}
this.xVel = ((this._xscale > 0) ? -2 : 2);
}
this.mc.onEnterFrame = function () {
if (this._currentframe == this._totalframes) {
idleAnimReset();
}
};
} else {
this.myState = this.airState;
delete this.mc.onEnterFrame;
clearInterval(this.calcStateTimer);
delete this.flameCode.onEnterFrame;
this.yVel = -10;
this.my_color = new Color(this);
this.myTransform = this.my_color.getTransform();
this.myTransform.ra = 60;
this.myTransform.ga = 60;
this.myTransform.ba = 60;
this.my_color.setTransform(this.myTransform);
this.healthMeter._visible = false;
airHitAnim();
}
}
function flameHit() {
if (!this.flame) {
this.flame = true;
this.my_color = new Color(this);
this.myTransform = this.my_color.getTransform();
this.myTransform.ra = this.myTransform.ra - 90;
this.myTransform.ga = this.myTransform.ga - 90;
this.myTransform.ba = this.myTransform.ba - 90;
this.my_color.setTransform(this.myTransform);
this.restCount = 0;
this.createEmptyMovieClip("flameCode", this.getNextHighestDepth());
this.flameCode.onEnterFrame = function () {
this._parent.myTransform.ra++;
this._parent.myTransform.ga++;
this._parent.myTransform.ba++;
this._parent.my_color.setTransform(this._parent.myTransform);
this._parent.restCount++;
if (this._parent.restCount >= 90) {
this._parent.flame = false;
delete this.onEnterFrame;
}
};
}
}
function hitWith(attackObj) {
this.stunHold = attackObj.hitStun * 30;
}
function pauseMe() {
if (!this.dead) {
clearInterval(this.stateCalcTimer);
this.mc.stop();
for (x in this.mc) {
if (typeof(this.mc[x]) == "movieclip") {
this.mc[x].stop();
}
}
this.paused = true;
}
}
function unPauseMe() {
if (!this.dead) {
this.stateCalcTimer = setInterval(this, "calcAI", 500);
for (x in this.mc) {
if (typeof(this.mc[x]) == "movieclip") {
if (this.mc[x].noPlay != true) {
this.mc[x].play();
}
}
}
this.mc.play();
this.paused = false;
}
}
this.hp = 100;
this.ammo = 20;
this.ready2go = false;
this._xscale = -100;
this.dir = "LEFT";
this.oldY = this._y;
this.swapDepths(this.oldY);
this.shot = false;
this.stopMove = false;
this.gunMode = false;
this.gravity = 1.5;
this.xSpeed = _root.randRange(1, 3);
this.lastSide = _root.randRange(1, 2) == 2;
this.idleState = 1;
this.walkState = 2;
this.airState = 3;
this.batonAttack = 4;
this.gunAttack = 5;
this.downState = 6;
this.deadState = -1;
this.myState = this.walkState;
this.yAdjust = 0;
this.turnHold = false;
this.stunned = false;
this.airTime = false;
this.dead = false;
this.staggerNum = 0;
this.yCalc = 0;
this.stateCalcTimer = setInterval(this, "calcAI", 500);
this.animBusy = false;
this.newTCount = 60;
this.upClear = (this.downClear = (this.leftClear = (this.rightClear = true)));
this.endCheck = false;
this.timeDel = 0;
this.gotoAndStop(idleGraphic());
this.mySound = new Sound();
this.onEnterFrame = function () {
if (!this.paused) {
if ((!this.turnHold) && (!this.dead)) {
if (this._parent.myChar._x < this._x) {
this._xscale = -100;
this.dir = "LEFT";
} else if (this._parent.myChar._x >= this._x) {
this._xscale = 100;
this.dir = "RIGHT";
}
}
if (((!this.dead) && (!_root.myChar.dead)) && (!this.stopMove)) {
if (this.newTCount >= 60) {
this.targetX = _root.myChar._x;
this.targetY = _root.myChar.origY;
} else {
this.newTCount++;
}
if (this.stunned) {
if (Math.abs(this.xVel) > 0.5) {
if (this.xVel > 0) {
this.xVel = this.xVel - 0.5;
} else {
this.xVel = this.xVel + 0.5;
}
if (((_x + this.xVel) >= 0) && ((_x + this.xVel) <= Stage.width)) {
_x = (_x + this.xVel);
}
} else {
this.xVel = 0;
}
}
if (this.airTime && (this.animBusy)) {
this.yVel = this.yVel + gravity;
_y = (_y + this.yVel);
if (this._y >= this.oldY) {
this.yVel = 0;
this._y = this.oldY;
}
}
if (this.newTCount == 60) {
if ((this.targetY == _root.myChar.oldY) && ((_root.attackTimer != -1) || (_root.firedTimer != -1))) {
lastSide = !lastSide;
this.targetY = (_root.myChar._y + _root.randRange(1, 50)) - 25;
this.targetX = _root.myChar._x + (lastSide ? -80 : 80);
trace((((((this._name + " : ") + this.newTCount) + " : newTarget : _x:") + this.targetX) + ", _y:") + this.targetY);
this.newTCount = 0;
} else {
this.targetY = _root.myChar.oldY;
this.targetX = _root.myChar._x;
this.newTCount = 60;
}
}
if (this.newTCount == 60) {
if (((!this.gunMode) && (this.myState == this.walkState)) && (!this.animBusy)) {
var _local6 = Math.abs(this._y - this.targetY) != (this._y - this.targetY);
var _local5 = Math.abs(this.targetX - this._x) == (this.targetX - this._x);
if (Math.abs(this._y - this.targetY) > 5) {
if (this.upClear && (_local6)) {
this.walkVert(true);
} else if (this.downClear && (!_local6)) {
this.walkVert(false);
}
}
if (Math.abs(this._x - this.targetX) > 50) {
if (this.rightClear && (_local5)) {
this.walkHoriz(true);
} else if (this.leftClear && (!_local5)) {
this.walkHoriz(false);
}
}
}
if ((this.gunMode && (this.myState == this.walkState)) && (!this.animBusy)) {
var _local6 = Math.abs(this._y - this.targetY) != (this._y - this.targetY);
var _local5 = Math.abs(this.targetX - this._x) == (this.targetX - this._x);
if (Math.abs(this._y - this.targetY) > 5) {
if (this.upClear && (_local6)) {
this.walkVert(true);
} else if (this.downClear && (!_local6)) {
this.walkVert(false);
}
}
if (Math.abs(this._x - this.targetX) > 50) {
if (this.rightClear && (_local5)) {
this.walkHoriz(true);
} else if (this.leftClear && (!_local5)) {
this.walkHoriz(false);
}
}
}
} else {
var _local6 = Math.abs(this._y - this.targetY) != (this._y - this.targetY);
var _local5 = Math.abs(this.targetX - this._x) == (this.targetX - this._x);
if (Math.abs(this._y - this.targetY) > 5) {
if (this.upClear && (_local6)) {
this.walkVert(true);
} else if (this.downClear && (!_local6)) {
this.walkVert(false);
}
}
if (Math.abs(this._x - this.targetX) > 50) {
if (this.rightClear && (_local5)) {
this.walkHoriz(true);
} else if (this.leftClear && (!_local5)) {
this.walkHoriz(false);
}
}
}
if (((!this.airTime) && (!this.stunned)) && (!this.animBusy)) {
this.gotoAndStop(idleGraphic);
if (Math.abs(this._x - _root.myChar._x) < 50) {
this.gunMode = false;
}
if (Math.abs(this._x - _root.myChar._x) > 250) {
this.gunMode = true;
}
if (!this.gunMode) {
swapToBaton();
} else {
swapToGun();
}
}
if (this.newTCount == 60) {
if ((((((((this.staggerNum <= 0) && (!this.gunMode)) && (_root.attackTimer == -1)) && (Math.abs(this._x - _root.myChar._x) < 50)) && (!this.animBusy)) && (!this.airTime)) && (!this.stunned)) && (varThreshold(_root.myChar.oldY, 10, this.oldY))) {
attack();
}
if ((((((((this.staggerNum <= 0) && (_root.firedTimer == -1)) && (this.gunMode)) && (_root.attackTimer == -1)) && (!this.animBusy)) && (!this.airTime)) && (!this.stunned)) && (varThreshold(_root.myChar.oldY, 6, this.oldY))) {
attack();
}
}
this.healthMeter.gotoAndStop(this.hp);
this.healthMeter._xscale = this._xscale;
this.mc.myHat = this.myHat;
this.mc.myEyes = this.myEyes;
this.mc.myFace = this.myFace;
this.mc.myBaton = this.myBaton;
this.mc.myGun = this.myGun;
if (this.staggerNum >= 0) {
this.staggerNum--;
}
} else if (_root.myChar.dead && (!this.stopMove)) {
if (!this.endCheck) {
this.endCheck = true;
trace(this._name + " : resetTargetX,Y");
this.targetX = _root.myChar._x;
this.targetY = _root.myChar.origY;
}
clearInterval(this.stateCalcTimer);
if (this.targetY == _root.myChar.origY) {
var _local4 = -1;
if (_root.myChar._x < (Stage.width / 2)) {
this.targetX = _root.myChar._x + (Stage.width / 2);
_root.myChar._xscale = 100;
_local4 = -1;
} else {
this.targetX = _root.myChar._x - (Stage.width / 2);
_root.myChar._xscale = -100;
_local4 = 1;
}
var _local7 = Math.floor(_global.enemyCount / 2);
var _local8 = Math.abs(this.myID - _local7) * (50 * _local4);
this.targetX = this.targetX + (_local8 + (this.myID * 15));
this.targetY = (((Stage.height - 250) / _global.enemyCount) * this.myID) + 250;
this.xSpeed = 5;
}
var _local6 = Math.abs(this._y - this.targetY) != (this._y - this.targetY);
var _local5 = Math.abs(this.targetX - this._x) == (this.targetX - this._x);
if (Math.abs(this._y - this.targetY) > 5) {
if (this.upClear && (_local6)) {
this.walkVert(true);
} else if (this.downClear && (!_local6)) {
this.walkVert(false);
}
}
if (Math.abs(this._x - this.targetX) > 30) {
if (this.rightClear && (_local5)) {
this.walkHoriz(true);
} else if (this.leftClear && (!_local5)) {
this.walkHoriz(false);
}
}
if ((Math.abs(this._x - this.targetX) <= 30) && (Math.abs(this._y - this.targetY) <= 5)) {
this.stopMove = true;
this.gotoAndStop("aim");
this.mc.onEnterFrame = function () {
if (this._currentframe == this._totalframes) {
_root.myChar.playDead = true;
this.gotoAndStop(this._totalframes);
}
};
}
}
}
};
this.animBusy = false;
calcAI();
Instance of Symbol 626 MovieClip "healthMeter" in Symbol 1005 MovieClip [cop] Frame 2
onClipEvent (enterFrame) {
this._xscale = this._parent._xscale;
this.gotoAndStop(this._parent.hp);
}
Symbol 1008 MovieClip Frame 1
this.gotoAndStop(this._parent._parent._parent.myFace);
Symbol 1014 MovieClip Frame 1
this.gotoAndStop(this._parent._parent._parent.myEyes);
Symbol 1023 MovieClip Frame 1
this.gotoAndStop(this._parent._parent._parent.myHat);
Symbol 1027 MovieClip Frame 1
this.gotoAndStop(this._parent._parent.myGun);
this.noPlay = true;
Symbol 1030 MovieClip Frame 1
this.gotoAndStop(this._parent._parent.myBaton);
this.noPlay = true;
Symbol 1213 MovieClip [thug] Frame 1
function doSound(id) {
this.mySound.attachSound(id);
this.mySound.start();
}
function calcAI() {
if (((!this.animBusy) && (this.myState != this.deadState)) && (this.myState != this.hitState)) {
switch (this.myState) {
case this.deadState :
trace(this + " : still DEAD");
break;
case this.hitState :
trace(this + " : hit");
break;
case this.idleState :
trace(this + " : idleState");
if (!varThreshold(this._x, 150, _root.myChar._x)) {
this.gunMode = true;
} else {
this.gunMode = false;
}
this.myState = this.walkState;
break;
case this.walkState :
trace(this + " : walkState");
if (this.gunMode && (varThreshold(this.oldY, 10, _root.myChar.oldY))) {
this.myState = this.gunAttack;
}
break;
case this.batonAttack :
trace(this + " : batonAttack");
this.gunMode = false;
if (_root.attackTimer != -1) {
this.myState = this.walkState;
}
break;
case this.gunAttack :
trace(this + " : gunAttack");
if (this._x < (Stage.width - 20)) {
if (this.ammo <= 0) {
this.gunMode = false;
}
if (this.gunMode && (!varThreshold(this.oldY, 10, _root.myChar.oldY))) {
this.gunMode = false;
}
if (_root.firedTimer != -1) {
this.gunMode = false;
}
} else {
this.gunMode = false;
}
if (!this.gunMode) {
this.myState = this.idleState;
}
break;
default :
trace(((this + " : default(") + this.myState) + ")");
}
}
}
function walkHoriz(right) {
if (!this.animBusy) {
this.gotoAndStop(walkGraphic());
if (right) {
this._x = this._x + this.xSpeed;
if (this._x > Stage.width) {
this._x = Stage.width;
}
} else {
this._x = this._x - this.xSpeed;
if (this._x < 0) {
this._x = 0;
}
}
}
}
function walkVert(up) {
if (!this.animBusy) {
this.gotoAndStop(walkGraphic());
if (up) {
if ((this._y + 1) < Stage.height) {
this._y = this._y + 1;
}
} else if ((this._y - 1) > 250) {
this._y = this._y - 1;
}
this.oldY = this._y;
}
}
function getUp() {
trace("GETUP");
if (this.hp > 0) {
this.gotoAndStop("getup");
this.animBusy = true;
this.mc.onEnterFrame = function () {
if (this._currentframe == this._totalframes) {
idleAnimReset();
}
};
} else {
setDead();
}
}
function setDead() {
trace("setDead : " + this);
clearInterval(this.stateCalcTimer);
this.myState = this.deadState;
this.dead = true;
_root.resetAttackTimer();
this.aiTimer = -1;
this.gotoAndStop("stomped");
delete this.flameCode.onEnterFrame;
delete this.mc.onEnterFrame;
this.mc.gotoAndStop(this.mc._totalframes);
this.my_color = new Color(this);
this.myTransform = this.my_color.getTransform();
this.myTransform.ra = 60;
this.myTransform.ga = 60;
this.myTransform.ba = 60;
this.my_color.setTransform(this.myTransform);
this.healthMeter._visible = false;
this.animBusy = true;
_global.deadCount++;
_root.myChar.spawnMore();
this.cacheAsBitmap = true;
}
function idleGraphic() {
if (this.gunMode) {
return("idle_gun");
}
return("idle_baton");
}
function walkGraphic() {
if (this.gunMode) {
return("walk_gun");
}
return("walk_baton");
}
function stompedAnim() {
this.myState = this.hitState;
this.gotoAndStop("stomped");
this.mc.gotoAndPlay(1);
delete this.mc.onEnterFrame;
this.mc.onEnterFrame = function () {
if (this._currentframe == this._totalframes) {
if (this._parent.stunCount >= this._parent.stunHold) {
getUp();
} else {
this.gotoAndPlay(this._totalframes - 1);
}
this._parent.stunned = false;
}
this._parent.stunCount++;
};
}
function idleAnimReset() {
if (this.hp > 0) {
this.myState = this.idleState;
this.animBusy = false;
this.airTime = false;
this.stunned = false;
this.turnHold = false;
delete this.mc.onEnterFrame;
this.gotoAndStop(idleGraphic());
} else {
this.airTime = true;
this.animBusy = true;
this.yVel = -10;
airHitAnim();
}
}
function swapToBaton() {
if (this.gunMode && (!this.animBusy)) {
this.gunMode = !this.gunMode;
this.gotoAndStop("switch_baton");
this.mc.onEnterFrame = function () {
if (this._currentframe == this._totalframes) {
idleAnimReset();
}
};
}
}
function swapToGun() {
if ((!this.gunMode) && (!this.animBusy)) {
this.gunMode = !this.gunMode;
this.gotoAndStop("switch_gun");
this.animBusy = true;
this.mc.onEnterFrame = function () {
if (this._currentframe == this._totalframes) {
idleAnimReset();
}
};
}
}
function attack() {
if ((!this.animBusy) && (!_root.myChar.dead)) {
if (this.gunMode) {
this.animBusy = true;
_root.firedTimer = setInterval(this._parent, "resetFired", 2000);
prepShot();
} else {
this.gotoAndStop("attack");
this.animBusy = true;
_root.attackTimer = setInterval(_root, "resetAttackTimer", 2000);
this.mc.onEnterFrame = function () {
if (((!this.hitAlready) && (this.hit.hitTest(_root.myChar))) && (!_root.myChar.inv)) {
this._parent.doSound("hit_" + _root.randRange(1, 4));
this.hitAlready = true;
_root.myChar.hp = _root.myChar.hp - 5;
if (!_root.myChar.animBusy) {
_root.myChar.hitAnim();
}
_root.myChar.shot = false;
_root.playerBlood(true, enemy);
_root.myChar.comboStack = new Array();
_root.myChar.comboCount = 0;
}
if (this._currentframe == this._totalframes) {
idleAnimReset();
}
};
}
}
}
function prepShot() {
this.gotoAndStop("aim");
this.animBusy = true;
this.mc.holdCount = 30;
this.mc.count = 0;
this.mc.onEnterFrame = function () {
this.count++;
if (this._currentframe == this._totalframes) {
if (this.count >= this.holdCount) {
shoot();
} else {
this.gotoAndPlay(this._totalframes - 1);
}
}
};
}
function shoot() {
this.gotoAndStop("shoot");
this.animBusy = true;
this.ammo--;
doSound("enemyGun");
if (varThreshold(_root.myChar.oldY, 10, this.oldY) && (!_root.myChar.jumping)) {
_root.myChar.hp = _root.myChar.hp - 5;
if (!_root.myChar.animBusy) {
_root.myChar.hitAnim();
}
_root.myChar.shot = true;
_root.playerBlood(false, this);
_root.myChar.comboStack = new Array();
_root.myChar.comboCount = 0;
this.myState = this.batonAttack;
}
_root.makeShell(this);
this.mc.onEnterFrame = function () {
if (this._currentframe == this._totalframes) {
shootReset();
}
};
}
function shootReset() {
_root.resetFired();
delete this.mc.onEnterFrame;
this.animBusy = true;
this.gotoAndStop("idle_return");
this.animBusy = true;
this.ammo--;
if (varThreshold(_root.myChar.oldY, 10, this.oldY)) {
_root.myChar.hp = _root.myChar.hp - 5;
if (!_root.myChar.animBusy) {
_root.myChar.hitAnim();
}
_root.playerBlood(false);
_root.myChar.comboStack = new Array();
_root.myChar.comboCount = 0;
this.myState = this.batonAttack;
}
this.mc.onEnterFrame = function () {
if (this._currentframe == this._totalframes) {
idleAnimReset();
}
};
}
function varThreshold(charVal, range, enemyVal) {
return((enemyVal >= (charVal - range)) && (enemyVal <= (charVal + range)));
}
function airLand() {
this.gotoAndStop("land");
this.stunCount = 0;
this.mc.onEnterFrame = function () {
if (this._currentframe == this._totalframes) {
if (this._parent.stunCount >= this._parent.stunHold) {
this._parent.animBusy = false;
this._parent.airTime = false;
getUp();
} else {
this.gotoAndPlay(this._totalframes - 1);
}
}
this._parent.stunCount++;
};
}
function airHitAnim() {
this.animBusy = true;
this.airTime = true;
this.stunned = true;
this.turnHold = true;
this.gotoAndStop("fall");
this.mc.onEnterFrame = function () {
if (this._parent._y == this._parent.oldY) {
airLand();
} else if (this._currentframe >= (this._totalframes - 1)) {
this.gotoAndPlay(this._totalframes - 1);
}
};
}
function hitAnim() {
if (this.hp > 0) {
delete this.mc.onEnterFrame;
this.stunned = true;
this.animBusy = true;
if (_root.randRange(1, 2) == 1) {
if (this.gunMode) {
this.gotoAndStop("hit_gun");
} else {
this.gotoAndStop("hit_baton");
}
this.xVel = 0;
} else {
if (this.gunMode) {
this.gotoAndStop("hit2_gun");
} else {
this.gotoAndStop("hit2_baton");
}
this.xVel = ((this._xscale > 0) ? -2 : 2);
}
this.mc.onEnterFrame = function () {
if (this._currentframe == this._totalframes) {
idleAnimReset();
}
};
} else {
this.myState = this.airState;
delete this.mc.onEnterFrame;
clearInterval(this.calcStateTimer);
delete this.flameCode.onEnterFrame;
this.yVel = -10;
this.my_color = new Color(this);
this.myTransform = this.my_color.getTransform();
this.myTransform.ra = 60;
this.myTransform.ga = 60;
this.myTransform.ba = 60;
this.my_color.setTransform(this.myTransform);
this.healthMeter._visible = false;
airHitAnim();
}
}
function flameHit() {
if (!this.flame) {
this.flame = true;
this.my_color = new Color(this);
this.myTransform = this.my_color.getTransform();
this.myTransform.ra = this.myTransform.ra - 90;
this.myTransform.ga = this.myTransform.ga - 90;
this.myTransform.ba = this.myTransform.ba - 90;
this.my_color.setTransform(this.myTransform);
this.restCount = 0;
this.createEmptyMovieClip("flameCode", this.getNextHighestDepth());
this.flameCode.onEnterFrame = function () {
this._parent.myTransform.ra++;
this._parent.myTransform.ga++;
this._parent.myTransform.ba++;
this._parent.my_color.setTransform(this._parent.myTransform);
this._parent.restCount++;
if (this._parent.restCount >= 90) {
this._parent.flame = false;
delete this.onEnterFrame;
}
};
}
}
function hitWith(attackObj) {
this.stunHold = attackObj.hitStun * 30;
}
function pauseMe() {
if (!this.dead) {
clearInterval(this.stateCalcTimer);
this.mc.stop();
for (x in this.mc) {
if (typeof(this.mc[x]) == "movieclip") {
this.mc[x].stop();
}
}
this.paused = true;
}
}
function unPauseMe() {
if (!this.dead) {
this.stateCalcTimer = setInterval(this, "calcAI", 500);
for (x in this.mc) {
if (typeof(this.mc[x]) == "movieclip") {
if (this.mc[x].noPlay != true) {
this.mc[x].play();
}
}
}
this.mc.play();
this.paused = false;
}
}
this.hp = 100;
this.ammo = 20;
this.ready2go = false;
this._xscale = -100;
this.dir = "LEFT";
this.oldY = this._y;
this.swapDepths(this.oldY);
this.shot = false;
this.stopMove = false;
this.gunMode = false;
this.gravity = 1.5;
this.xSpeed = _root.randRange(1, 3);
this.lastSide = _root.randRange(1, 2) == 2;
this.idleState = 1;
this.walkState = 2;
this.airState = 3;
this.batonAttack = 4;
this.gunAttack = 5;
this.downState = 6;
this.deadState = -1;
this.myState = this.walkState;
this.yAdjust = 0;
this.turnHold = false;
this.stunned = false;
this.airTime = false;
this.dead = false;
this.staggerNum = 0;
this.yCalc = 0;
this.stateCalcTimer = setInterval(this, "calcAI", 500);
this.animBusy = false;
this.newTCount = 60;
this.upClear = (this.downClear = (this.leftClear = (this.rightClear = true)));
this.endCheck = false;
this.timeDel = 0;
this.gotoAndStop(idleGraphic());
this.mySound = new Sound();
this.onEnterFrame = function () {
if (!this.paused) {
if ((!this.turnHold) && (!this.dead)) {
if (this._parent.myChar._x < this._x) {
this._xscale = -100;
this.dir = "LEFT";
} else if (this._parent.myChar._x >= this._x) {
this._xscale = 100;
this.dir = "RIGHT";
}
}
if (((!this.dead) && (!_root.myChar.dead)) && (!this.stopMove)) {
if (this.newTCount >= 60) {
this.targetX = _root.myChar._x;
this.targetY = _root.myChar.origY;
} else {
this.newTCount++;
}
if (this.stunned) {
if (Math.abs(this.xVel) > 0.5) {
if (this.xVel > 0) {
this.xVel = this.xVel - 0.5;
} else {
this.xVel = this.xVel + 0.5;
}
if (((_x + this.xVel) >= 0) && ((_x + this.xVel) <= Stage.width)) {
_x = (_x + this.xVel);
}
} else {
this.xVel = 0;
}
}
if (this.airTime && (this.animBusy)) {
this.yVel = this.yVel + gravity;
_y = (_y + this.yVel);
if (this._y >= this.oldY) {
this.yVel = 0;
this._y = this.oldY;
}
}
if (this.newTCount == 60) {
if ((this.targetY == _root.myChar.oldY) && ((_root.attackTimer != -1) || (_root.firedTimer != -1))) {
lastSide = !lastSide;
this.targetY = (_root.myChar._y + _root.randRange(1, 50)) - 25;
this.targetX = _root.myChar._x + (lastSide ? -80 : 80);
trace((((((this._name + " : ") + this.newTCount) + " : newTarget : _x:") + this.targetX) + ", _y:") + this.targetY);
this.newTCount = 0;
} else {
this.targetY = _root.myChar.oldY;
this.targetX = _root.myChar._x;
this.newTCount = 60;
}
}
if (this.newTCount == 60) {
if (((!this.gunMode) && (this.myState == this.walkState)) && (!this.animBusy)) {
var _local6 = Math.abs(this._y - this.targetY) != (this._y - this.targetY);
var _local5 = Math.abs(this.targetX - this._x) == (this.targetX - this._x);
if (Math.abs(this._y - this.targetY) > 5) {
if (this.upClear && (_local6)) {
this.walkVert(true);
} else if (this.downClear && (!_local6)) {
this.walkVert(false);
}
}
if (Math.abs(this._x - this.targetX) > 50) {
if (this.rightClear && (_local5)) {
this.walkHoriz(true);
} else if (this.leftClear && (!_local5)) {
this.walkHoriz(false);
}
}
}
if ((this.gunMode && (this.myState == this.walkState)) && (!this.animBusy)) {
var _local6 = Math.abs(this._y - this.targetY) != (this._y - this.targetY);
var _local5 = Math.abs(this.targetX - this._x) == (this.targetX - this._x);
if (Math.abs(this._y - this.targetY) > 5) {
if (this.upClear && (_local6)) {
this.walkVert(true);
} else if (this.downClear && (!_local6)) {
this.walkVert(false);
}
}
if (Math.abs(this._x - this.targetX) > 50) {
if (this.rightClear && (_local5)) {
this.walkHoriz(true);
} else if (this.leftClear && (!_local5)) {
this.walkHoriz(false);
}
}
}
} else {
var _local6 = Math.abs(this._y - this.targetY) != (this._y - this.targetY);
var _local5 = Math.abs(this.targetX - this._x) == (this.targetX - this._x);
if (Math.abs(this._y - this.targetY) > 5) {
if (this.upClear && (_local6)) {
this.walkVert(true);
} else if (this.downClear && (!_local6)) {
this.walkVert(false);
}
}
if (Math.abs(this._x - this.targetX) > 50) {
if (this.rightClear && (_local5)) {
this.walkHoriz(true);
} else if (this.leftClear && (!_local5)) {
this.walkHoriz(false);
}
}
}
if (((!this.airTime) && (!this.stunned)) && (!this.animBusy)) {
this.gotoAndStop(idleGraphic);
if (Math.abs(this._x - _root.myChar._x) < 50) {
this.gunMode = false;
}
if (Math.abs(this._x - _root.myChar._x) > 250) {
this.gunMode = true;
}
if (!this.gunMode) {
swapToBaton();
} else {
swapToGun();
}
}
if (this.newTCount == 60) {
if ((((((((this.staggerNum <= 0) && (!this.gunMode)) && (_root.attackTimer == -1)) && (Math.abs(this._x - _root.myChar._x) < 50)) && (!this.animBusy)) && (!this.airTime)) && (!this.stunned)) && (varThreshold(_root.myChar.oldY, 10, this.oldY))) {
attack();
}
if ((((((((this.staggerNum <= 0) && (_root.firedTimer == -1)) && (this.gunMode)) && (_root.attackTimer == -1)) && (!this.animBusy)) && (!this.airTime)) && (!this.stunned)) && (varThreshold(_root.myChar.oldY, 6, this.oldY))) {
attack();
}
}
this.healthMeter.gotoAndStop(this.hp);
this.healthMeter._xscale = this._xscale;
this.mc.myHat = this.myHat;
this.mc.myEyes = this.myEyes;
this.mc.myFace = this.myFace;
this.mc.myBaton = this.myBaton;
this.mc.myGun = this.myGun;
if (this.staggerNum >= 0) {
this.staggerNum--;
}
} else if (_root.myChar.dead && (!this.stopMove)) {
if (!this.endCheck) {
this.endCheck = true;
trace(this._name + " : resetTargetX,Y");
this.targetX = _root.myChar._x;
this.targetY = _root.myChar.origY;
}
clearInterval(this.stateCalcTimer);
if (this.targetY == _root.myChar.origY) {
var _local4 = -1;
if (_root.myChar._x < (Stage.width / 2)) {
this.targetX = _root.myChar._x + (Stage.width / 2);
_root.myChar._xscale = 100;
_local4 = -1;
} else {
this.targetX = _root.myChar._x - (Stage.width / 2);
_root.myChar._xscale = -100;
_local4 = 1;
}
var _local7 = Math.floor(_global.enemyCount / 2);
var _local8 = Math.abs(this.myID - _local7) * (50 * _local4);
this.targetX = this.targetX + (_local8 + (this.myID * 15));
this.targetY = (((Stage.height - 250) / _global.enemyCount) * this.myID) + 250;
this.xSpeed = 5;
}
var _local6 = Math.abs(this._y - this.targetY) != (this._y - this.targetY);
var _local5 = Math.abs(this.targetX - this._x) == (this.targetX - this._x);
if (Math.abs(this._y - this.targetY) > 5) {
if (this.upClear && (_local6)) {
this.walkVert(true);
} else if (this.downClear && (!_local6)) {
this.walkVert(false);
}
}
if (Math.abs(this._x - this.targetX) > 30) {
if (this.rightClear && (_local5)) {
this.walkHoriz(true);
} else if (this.leftClear && (!_local5)) {
this.walkHoriz(false);
}
}
if ((Math.abs(this._x - this.targetX) <= 30) && (Math.abs(this._y - this.targetY) <= 5)) {
this.stopMove = true;
this.gotoAndStop("aim");
this.mc.onEnterFrame = function () {
if (this._currentframe == this._totalframes) {
_root.myChar.playDead = true;
this.gotoAndStop(this._totalframes);
}
};
}
}
}
};
this.animBusy = false;
calcAI();
Instance of Symbol 626 MovieClip "healthMeter" in Symbol 1213 MovieClip [thug] Frame 2
onClipEvent (enterFrame) {
this._xscale = this._parent._xscale;
this.gotoAndStop(this._parent.hp);
}
Instance of Symbol 1242 MovieClip in Symbol 1256 MovieClip [finalScreenEntry] Frame 1
onClipEvent (load) {
this.onRelease = function () {
};
this.useHandCursor = false;
}
Instance of Symbol 579 MovieClip "playerMC" in Symbol 1256 MovieClip [finalScreenEntry] Frame 1
onClipEvent (load) {
this.gotoAndStop("idle");
}
Instance of Symbol 814 MovieClip in Symbol 1258 MovieClip Frame 1
onClipEvent (load) {
this._visible = _global.enemyType == "cop";
}
Instance of Symbol 1024 MovieClip in Symbol 1258 MovieClip Frame 1
onClipEvent (load) {
this._visible = _global.enemyType == "thug";
}
Instance of Symbol 740 MovieClip in Symbol 1260 MovieClip [battlePopup] Frame 1
onClipEvent (load) {
this.onRelease = function () {
};
this.useHandCursor = false;
}
Instance of Symbol 1259 MovieClip in Symbol 1260 MovieClip [battlePopup] Frame 1
onClipEvent (load) {
this.myHat = 2;
this.myEyes = 2;
this.myFace = 2;
}
Symbol 1267 MovieClip Frame 10
stop();
Symbol 1269 MovieClip Frame 1
stop();
Symbol 1272 MovieClip Frame 10
stop();
Symbol 1274 MovieClip Frame 1
stop();
Instance of Symbol 1261 MovieClip in Symbol 1275 MovieClip [queryPop] Frame 1
onClipEvent (load) {
this.onPress = function () {
};
this.useHandCursor = false;
}
Symbol 1322 Button
on (release) {
getURL ("http://www.armorgames.com", "blank");
}
Symbol 1329 MovieClip Frame 81
stopAllSounds();
_root.play();
_root.play();
Symbol 1331 Button
on (rollOver) {
_root.codeClip.doSound("latch");
}
on (release) {
_root.codeClip.doSound("emptyClip");
this._parent.codeClip.newMusic("titlemusic");
gotoAndPlay ("menu");
}
Symbol 1422 MovieClip Frame 128
stop();
Symbol 1426 MovieClip Frame 1
stop();
Symbol 1457 MovieClip Frame 18
gotoAndPlay("a" + random(10));
Symbol 1457 MovieClip Frame 29
if (random(6)) {
gotoAndPlay("a" + random(10));
} else {
gotoAndPlay ("idle");
}
Symbol 1457 MovieClip Frame 43
if (random(6)) {
gotoAndPlay("a" + random(10));
} else {
gotoAndPlay ("idle");
}
Symbol 1457 MovieClip Frame 54
if (random(6)) {
gotoAndPlay("a" + random(10));
} else {
gotoAndPlay ("idle");
}
Symbol 1457 MovieClip Frame 73
if (random(6)) {
gotoAndPlay("a" + random(10));
} else {
gotoAndPlay ("idle");
}
Symbol 1457 MovieClip Frame 88
if (random(6)) {
gotoAndPlay("a" + random(10));
} else {
gotoAndPlay ("idle");
}
Symbol 1457 MovieClip Frame 109
if (random(6)) {
gotoAndPlay("a" + random(10));
} else {
gotoAndPlay ("idle");
}
Symbol 1457 MovieClip Frame 132
if (random(6)) {
gotoAndPlay("a" + random(10));
} else {
gotoAndPlay ("idle");
}
Symbol 1457 MovieClip Frame 153
if (random(6)) {
gotoAndPlay("a" + random(10));
} else {
gotoAndPlay ("idle");
}
Symbol 1457 MovieClip Frame 174
if (random(6)) {
gotoAndPlay("a" + random(10));
} else {
gotoAndPlay ("idle");
}
Symbol 1457 MovieClip Frame 192
if (random(6)) {
gotoAndPlay("a" + (random(9) + 1));
} else {
gotoAndPlay ("idle");
}
Symbol 1495 MovieClip Frame 1
stop();
Symbol 1495 MovieClip Frame 9
play();
Symbol 1495 MovieClip Frame 17
stop();
Symbol 1495 MovieClip Frame 26
flipped = true;
Symbol 1495 MovieClip Frame 33
stop();
Symbol 1495 MovieClip Frame 45
gotoAndPlay ("_up");
Symbol 1509 MovieClip Frame 1
stop();
Symbol 1509 MovieClip Frame 9
play();
Symbol 1509 MovieClip Frame 17
stop();
Symbol 1509 MovieClip Frame 26
flipped = true;
Symbol 1509 MovieClip Frame 33
stop();
Symbol 1509 MovieClip Frame 45
gotoAndPlay ("_up");
Symbol 1520 MovieClip Frame 1
stop();
Symbol 1520 MovieClip Frame 9
play();
Symbol 1520 MovieClip Frame 17
stop();
Symbol 1520 MovieClip Frame 26
flipped = true;
Symbol 1520 MovieClip Frame 33
stop();
Symbol 1520 MovieClip Frame 45
gotoAndPlay ("_up");
Symbol 1531 MovieClip Frame 1
stop();
Symbol 1531 MovieClip Frame 9
play();
Symbol 1531 MovieClip Frame 17
stop();
Symbol 1531 MovieClip Frame 26
flipped = true;
Symbol 1531 MovieClip Frame 33
stop();
Symbol 1531 MovieClip Frame 45
gotoAndPlay ("_up");
Symbol 1556 MovieClip Frame 1
stop();
Symbol 1556 MovieClip Frame 9
play();
Symbol 1556 MovieClip Frame 17
stop();
Symbol 1556 MovieClip Frame 26
flipped = true;
Symbol 1556 MovieClip Frame 33
stop();
Symbol 1556 MovieClip Frame 44
gotoAndPlay ("_up");
Symbol 1556 MovieClip Frame 56
stop();
_parent.buttBack.enabled = true;
_parent.buttBack._visible = true;
this._visible = false;
gotoAndPlay ("_up");
Symbol 1556 MovieClip Frame 69
gotoAndPlay ("_up");
Symbol 1560 MovieClip Frame 1
origX = this._x;
origY = this._y;
maxX = 100;
maxY = 150;
destX = this._x;
destY = this._y;
count = 0;
this.onEnterFrame = function () {
count--;
if (count <= 0) {
count = random(30) + 4;
destX = (origX - (maxX / 2)) + random(maxX);
destY = (origY - (maxY / 2)) + random(maxY);
}
this._x = this._x + ((destX - this._x) / 16);
this._y = this._y + ((destY - this._y) / 16);
};
Symbol 1560 MovieClip Frame 4
gotoAndPlay (2);
Symbol 1569 MovieClip Frame 36
if (random(25) > 3) {
gotoAndPlay (1);
}
Symbol 1576 Button
on (release) {
_global.maxDays = 30;
gotoAndPlay ("char");
_root.codeClip.doSound("latch");
}
on (rollOver) {
_root.codeClip.doSound("emptyClip");
}
Symbol 1577 Button
on (release) {
_global.maxDays = 60;
gotoAndPlay ("char");
_root.codeClip.doSound("latch");
}
on (rollOver) {
_root.codeClip.doSound("emptyClip");
}
Symbol 1578 Button
on (release) {
_global.maxDays = 90;
gotoAndPlay ("char");
_root.codeClip.doSound("latch");
}
on (rollOver) {
_root.codeClip.doSound("emptyClip");
}
Symbol 1603 Button
on (release) {
_root.codeClip.doSound("latch");
_global.shadowMode = !mcCheck2.checked;
if (mcCheck2.checked) {
mcCheck2.gotoAndPlay("unchecked");
} else {
mcCheck2.gotoAndPlay("checked");
}
}
Symbol 1608 Button
on (release) {
_root.codeClip.doSound("latch");
_global.qualitySel = "HIGH";
mcQline._x = buttH._x;
mcQline.gotoAndPlay("on");
}
Symbol 1609 Button
on (release) {
_root.codeClip.doSound("latch");
_global.qualitySel = "MEDIUM";
mcQline._x = buttM._x;
mcQline.gotoAndPlay("on");
}
Symbol 1610 Button
on (release) {
_root.codeClip.doSound("latch");
_global.qualitySel = "LOW";
mcQline._x = buttL._x;
mcQline.gotoAndPlay("on");
}
Symbol 1623 Button
on (release) {
_root.codeClip.doSound("latch");
getURL ("http://www.ankhstudios.com", "_blank");
}
Symbol 1624 Button
on (release) {
_root.codeClip.doSound("latch");
getURL ("http://www.girlshavecooties.com", "_blank");
}
Symbol 1625 Button
on (release) {
_root.codeClip.doSound("latch");
getURL ("http://www.icysmooth.com", "_blank");
}
Symbol 1626 MovieClip Frame 1
stop();
opened = false;
Symbol 1626 MovieClip Frame 16
stop();
opened = true;
Symbol 1626 MovieClip Frame 30
function randRange(min, max) {
var _local1 = Math.floor(Math.random() * ((max - min) + 1)) + min;
return(_local1);
}
stop();
opened = true;
this.playerMC.mc.head_mc.eyes_mc.gotoAndStop(_global.eyes);
this.playerMC.mc.head_mc.hair_mc.gotoAndStop(_global.hair);
this.playerMC.mc.head_mc.face_mc.gotoAndStop(_global.face);
this.playerMC.mc.bling_mc.gotoAndStop(_global.bling);
this.playerName.text = _global.playerName;
this.hair_inc.onRelease = function () {
_root.codeClip.doSound("latch");
if (this._parent.playerMC.mc.head_mc.hair_mc._currentframe == this._parent.playerMC.mc.head_mc.hair_mc._totalframes) {
this._parent.playerMC.mc.head_mc.hair_mc.gotoAndStop(1);
} else {
this._parent.playerMC.mc.head_mc.hair_mc.nextFrame();
}
_global.hair = this._parent.playerMC.mc.head_mc.hair_mc._currentframe;
};
this.hair_dec.onRelease = function () {
_root.codeClip.doSound("latch");
if (this._parent.playerMC.mc.head_mc.hair_mc._currentframe == 1) {
this._parent.playerMC.mc.head_mc.hair_mc.gotoAndStop(this._parent.playerMC.mc.head_mc.hair_mc._totalframes);
} else {
this._parent.playerMC.mc.head_mc.hair_mc.prevFrame();
}
_global.hair = this._parent.playerMC.mc.head_mc.hair_mc._currentframe;
};
this.eyes_inc.onRelease = function () {
_root.codeClip.doSound("latch");
if (this._parent.playerMC.mc.head_mc.eyes_mc._currentframe == this._parent.playerMC.mc.head_mc.eyes_mc._totalframes) {
this._parent.playerMC.mc.head_mc.eyes_mc.gotoAndStop(1);
} else {
this._parent.playerMC.mc.head_mc.eyes_mc.nextFrame();
}
_global.eyes = this._parent.playerMC.mc.head_mc.eyes_mc._currentframe;
};
this.eyes_dec.onRelease = function () {
_root.codeClip.doSound("latch");
if (this._parent.playerMC.mc.head_mc.eyes_mc._currentframe == 1) {
this._parent.playerMC.mc.head_mc.eyes_mc.gotoAndStop(this._parent.playerMC.mc.head_mc.eyes_mc._totalframes);
} else {
this._parent.playerMC.mc.head_mc.eyes_mc.prevFrame();
}
_global.eyes = this._parent.playerMC.mc.head_mc.eyes_mc._currentframe;
};
this.face_inc.onRelease = function () {
_root.codeClip.doSound("latch");
if (this._parent.playerMC.mc.head_mc.face_mc._currentframe == this._parent.playerMC.mc.head_mc.face_mc._totalframes) {
this._parent.playerMC.mc.head_mc.face_mc.gotoAndStop(1);
} else {
this._parent.playerMC.mc.head_mc.face_mc.nextFrame();
}
_global.face = this._parent.playerMC.mc.head_mc.face_mc._currentframe;
};
this.face_dec.onRelease = function () {
_root.codeClip.doSound("latch");
if (this._parent.playerMC.mc.head_mc.face_mc._currentframe == 1) {
this._parent.playerMC.mc.head_mc.face_mc.gotoAndStop(this._parent.playerMC.mc.head_mc.face_mc._totalframes);
} else {
this._parent.playerMC.mc.head_mc.face_mc.prevFrame();
}
_global.face = this._parent.playerMC.mc.head_mc.face_mc._currentframe;
};
this.bling_inc.onRelease = function () {
_root.codeClip.doSound("latch");
if (_global.bling == this._parent.playerMC.mc.bling_mc._totalframes) {
_global.bling = 1;
} else {
_global.bling++;
}
this._parent.playerMC.mc.bling_mc.gotoAndStop(_global.bling);
};
this.bling_dec.onRelease = function () {
_root.codeClip.doSound("latch");
if (_global.bling == 1) {
_global.bling = this._parent.playerMC.mc.bling_mc._totalframes;
} else {
_global.bling--;
}
this._parent.playerMC.mc.bling_mc.gotoAndStop(_global.bling);
};
this.btn_randomize.onRelease = function () {
_root.codeClip.doSound("latch");
_global.bling = this._parent.randRange(1, this._parent.playerMC.mc.bling_mc._totalframes);
this._parent.playerMC.mc.head_mc.face_mc.gotoAndStop(this._parent.randRange(1, this._parent.playerMC.mc.head_mc.face_mc._totalframes));
this._parent.playerMC.mc.head_mc.eyes_mc.gotoAndStop(this._parent.randRange(1, this._parent.playerMC.mc.head_mc.eyes_mc._totalframes));
this._parent.playerMC.mc.head_mc.hair_mc.gotoAndStop(this._parent.randRange(1, this._parent.playerMC.mc.head_mc.hair_mc._totalframes));
_global.face = this._parent.playerMC.mc.head_mc.face_mc._currentframe;
_global.eyes = this._parent.playerMC.mc.head_mc.eyes_mc._currentframe;
_global.hair = this._parent.playerMC.mc.head_mc.hair_mc._currentframe;
this._parent.playerMC.mc.bling_mc.gotoAndStop(_global.bling);
};
this.btn_done.onRelease = function () {
_root.codeClip.doSound("emptyClip");
_global.playerName = this._parent.playerName.text;
_parent.gotoAndPlay("startgame");
};
Instance of Symbol 579 MovieClip "playerMC" in Symbol 1626 MovieClip Frame 30
onClipEvent (load) {
this.gotoAndStop("walk");
this.healthMeter._visible = false;
}
Symbol 1626 MovieClip Frame 56
stop();
opened = true;
mcCheck1.gotoAndPlay((_global.bloodMode ? "checked" : "unchecked"));
mcCheck2.gotoAndPlay((_global.shadowMode ? "checked" : "unchecked"));
mcCheck3.gotoAndPlay((_global.innocenceMode ? "checked" : "unchecked"));
mcCheck4.gotoAndPlay((_global.qualFX ? "checked" : "unchecked"));
switch (_global.qualitySel) {
case "LOW" :
mcQline._x = buttL._x;
break;
case "MEDIUM" :
mcQline._x = buttM._x;
break;
case "HIGH" :
mcQline._x = buttH._x;
}
mcQline.gotoAndPlay("on");
Symbol 1626 MovieClip Frame 73
stop();
opened = true;
Symbol 1626 MovieClip Frame 90
gotoAndPlay ("closed");
Symbol 1637 MovieClip Frame 20
gotoAndPlay("a" + random(4));
Symbol 1637 MovieClip Frame 43
gotoAndPlay("a" + random(4));
Symbol 1637 MovieClip Frame 63
gotoAndPlay("a" + random(4));
Symbol 1637 MovieClip Frame 75
gotoAndPlay("a" + random(4));
Instance of Symbol 1637 MovieClip in Symbol 1638 MovieClip Frame 1
onClipEvent (load) {
gotoAndPlay(random(16) + 1);
}
Instance of Symbol 1637 MovieClip in Symbol 1638 MovieClip Frame 1
onClipEvent (load) {
gotoAndPlay(random(16) + 1);
}
Instance of Symbol 1637 MovieClip in Symbol 1638 MovieClip Frame 1
onClipEvent (load) {
gotoAndPlay(random(16) + 1);
}
Instance of Symbol 1637 MovieClip in Symbol 1638 MovieClip Frame 1
onClipEvent (load) {
gotoAndPlay(random(16) + 1);
}
Instance of Symbol 1637 MovieClip in Symbol 1638 MovieClip Frame 1
onClipEvent (load) {
gotoAndPlay(random(16) + 1);
}
Instance of Symbol 1637 MovieClip in Symbol 1638 MovieClip Frame 1
onClipEvent (load) {
gotoAndPlay(random(16) + 1);
}
Instance of Symbol 1637 MovieClip in Symbol 1638 MovieClip Frame 1
onClipEvent (load) {
gotoAndPlay(random(16) + 1);
}
Symbol 1640 MovieClip Frame 1
stop();
Symbol 1640 MovieClip Frame 11
stop();
Symbol 1646 MovieClip Frame 1
stop();
Symbol 1646 MovieClip Frame 2
stop();
Symbol 1646 MovieClip Frame 3
stop();
Symbol 1648 MovieClip Frame 1
stop();
Symbol 1648 MovieClip Frame 2
stop();
Symbol 1648 MovieClip Frame 3
stop();
Symbol 1650 MovieClip Frame 1
stop();
Symbol 1650 MovieClip Frame 2
stop();
Symbol 1650 MovieClip Frame 3
stop();
Symbol 1662 MovieClip Frame 1
stop();
Symbol 1662 MovieClip Frame 9
play();
Symbol 1662 MovieClip Frame 17
stop();
Symbol 1662 MovieClip Frame 33
stop();
_parent.buttPlay2.enabled = true;
_parent.buttPlay2._visible = true;
this._visible = false;
this.gotoAndPlay("_up");
Symbol 1676 MovieClip Frame 8
stop();
Symbol 1685 MovieClip Frame 1
stop();
Symbol 1685 MovieClip Frame 9
play();
Symbol 1685 MovieClip Frame 17
stop();
Symbol 1695 MovieClip Frame 1
stop();
Symbol 1695 MovieClip Frame 9
play();
Symbol 1695 MovieClip Frame 17
stop();
Symbol 1728 MovieClip Frame 1
stop();
opened = false;
Symbol 1728 MovieClip Frame 10
opened = true;
currPage = 1;
totalPages = 12;
Instance of Symbol 1685 MovieClip in Symbol 1728 MovieClip Frame 23
on (rollOver) {
_root.codeClip.doSound("latch");
}
on (release) {
_root.codeClip.doSound("emptyClip");
_parent.currPage++;
_parent.gotoAndPlay("page" + _parent.currPage);
}
Symbol 1728 MovieClip Frame 30
stop();
Instance of Symbol 1695 MovieClip in Symbol 1728 MovieClip Frame 34
on (rollOver) {
_root.codeClip.doSound("latch");
}
on (release) {
_root.codeClip.doSound("emptyClip");
_parent.currPage--;
_parent.gotoAndPlay("page" + _parent.currPage);
}
Symbol 1728 MovieClip Frame 41
stop();
Symbol 1728 MovieClip Frame 52
stop();
Symbol 1728 MovieClip Frame 63
stop();
Symbol 1728 MovieClip Frame 74
stop();
Symbol 1728 MovieClip Frame 85
stop();
Symbol 1728 MovieClip Frame 96
stop();
Symbol 1728 MovieClip Frame 106
stop();
Symbol 1728 MovieClip Frame 117
stop();
Symbol 1728 MovieClip Frame 128
stop();
Symbol 1728 MovieClip Frame 139
stop();
Symbol 1728 MovieClip Frame 150
stop();
Symbol 1737 MovieClip Frame 126
this._parent.codeClip.newMusic("titlemusic");
Symbol 1737 MovieClip Frame 131
function menuEnable() {
if (buttPlay.flipped) {
buttPlay.flipped = false;
buttPlay.gotoAndPlay("flipBack");
} else {
buttPlay.gotoAndPlay("_up");
}
if (buttOptions.flipped) {
buttOptions.flipped = false;
buttOptions.gotoAndPlay("flipBack");
} else {
buttOptions.gotoAndPlay("_up");
}
if (buttHowto.flipped) {
buttHowto.flipped = false;
buttHowto.gotoAndPlay("flipBack");
} else {
buttHowto.gotoAndPlay("_up");
}
if (buttCredits.flipped) {
buttCredits.flipped = false;
buttCredits.gotoAndPlay("flipBack");
} else {
buttCredits.gotoAndPlay("_up");
}
buttPlay.enabled = true;
buttOptions.enabled = true;
buttHowto.enabled = true;
buttCredits.enabled = true;
if (mcHowto.opened) {
mcHowto.gotoAndPlay("hide");
}
}
Instance of Symbol 1495 MovieClip "buttPlay" in Symbol 1737 MovieClip Frame 132
on (rollOver) {
_root.codeClip.doSound("menuHover");
}
on (release) {
_parent.buttOptions.gotoAndPlay("flip");
_parent.buttOptions.enabled = false;
_parent.buttHowto.gotoAndPlay("flip");
_parent.buttHowto.enabled = false;
_parent.buttCredits.gotoAndPlay("flip");
_parent.buttCredits.enabled = false;
_parent.buttPlay2.gotoAndPlay("backShow");
_parent.buttPlay2.enabled = false;
this.enabled = false;
_root.codeClip.doSound("emptyClip");
_parent.mcSubmenu.gotoAndPlay("play");
}
Instance of Symbol 1509 MovieClip "buttOptions" in Symbol 1737 MovieClip Frame 132
on (rollOver) {
_root.codeClip.doSound("menuHover");
}
on (release) {
_parent.buttPlay.gotoAndPlay("flip");
_parent.buttPlay.enabled = false;
_parent.buttHowto.gotoAndPlay("flip");
_parent.buttHowto.enabled = false;
_parent.buttCredits.gotoAndPlay("flip");
_parent.buttCredits.enabled = false;
_parent.buttPlay2.gotoAndPlay("backShow");
_parent.buttPlay2.enabled = false;
this.enabled = false;
_root.codeClip.doSound("emptyClip");
_parent.mcSubmenu.gotoAndPlay("options");
}
Instance of Symbol 1520 MovieClip "buttHowto" in Symbol 1737 MovieClip Frame 132
on (rollOver) {
_root.codeClip.doSound("menuHover");
}
on (release) {
_parent.buttPlay.gotoAndPlay("flip");
_parent.buttPlay.enabled = false;
_parent.buttOptions.gotoAndPlay("flip");
_parent.buttOptions.enabled = false;
_parent.buttCredits.gotoAndPlay("flip");
_parent.buttCredits.enabled = false;
_parent.buttPlay2.gotoAndPlay("backShow");
_parent.buttPlay2.enabled = false;
this.enabled = false;
_root.codeClip.doSound("emptyClip");
_parent.mcHowto.gotoAndPlay("show");
}
Instance of Symbol 1531 MovieClip "buttCredits" in Symbol 1737 MovieClip Frame 132
on (rollOver) {
_root.codeClip.doSound("menuHover");
}
on (release) {
_parent.buttPlay.gotoAndPlay("flip");
_parent.buttPlay.enabled = false;
_parent.buttOptions.gotoAndPlay("flip");
_parent.buttOptions.enabled = false;
_parent.buttHowto.gotoAndPlay("flip");
_parent.buttHowto.enabled = false;
_parent.buttPlay2.gotoAndPlay("backShow");
_parent.buttPlay2.enabled = false;
this.enabled = false;
_root.codeClip.doSound("emptyClip");
_parent.mcSubmenu.gotoAndPlay("credits");
}
Instance of Symbol 1556 MovieClip "buttPlay2" in Symbol 1737 MovieClip Frame 132
on (rollOver) {
_root.codeClip.doSound("menuHover");
}
on (release) {
_root.codeClip.doSound("emptyClip");
getURL ("http://www.armorgames.com", "_blank");
}
Instance of Symbol 1651 MovieClip "soundControls" in Symbol 1737 MovieClip Frame 132
onClipEvent (load) {
this.mutebtn.onPress = function () {
this._parent.vis.gotoAndPlay("off");
this._parent._parent._parent.codeClip.gameMusic.stop();
};
this.playbtn.onPress = function () {
this._parent.vis.gotoAndStop("on");
this._parent._parent._parent.codeClip.gameMusic.stop();
this._parent._parent._parent.codeClip.gameMusic.start(this._parent._parent._parent.codeClip.gameMusic.position / 1000, 999);
};
}
Instance of Symbol 1662 MovieClip "buttBack" in Symbol 1737 MovieClip Frame 132
onClipEvent (load) {
this._visible = false;
}
on (rollOver) {
_root.codeClip.doSound("menuHover");
}
on (release) {
_root.codeClip.doSound("emptyClip");
_parent.menuEnable();
this.enabled = false;
this.gotoAndPlay("flip");
if (_parent.mcSubmenu.opened) {
_parent.mcSubmenu.gotoAndPlay("close");
}
}
Symbol 1737 MovieClip Frame 142
stop();
Instance of Symbol 1651 MovieClip "soundControls" in Symbol 1737 MovieClip Frame 142
onClipEvent (load) {
this.mutebtn.onPress = function () {
_root.codeClip.doSound("clipEmpty");
this._parent.vis.gotoAndPlay("off");
this._parent._parent._parent.codeClip.gameMusic.stop();
};
this.playbtn.onPress = function () {
_root.codeClip.doSound("clipEmpty");
this._parent.vis.gotoAndStop("on");
this._parent._parent._parent.codeClip.gameMusic.stop();
this._parent._parent._parent.codeClip.gameMusic.start(this._parent._parent._parent.codeClip.gameMusic.position / 1000, 999);
};
}
Symbol 1737 MovieClip Frame 162
stop();
Symbol 1737 MovieClip Frame 172
_root.codeClip.doSound("shing");
Instance of Symbol 1556 MovieClip "buttPlay2" in Symbol 1737 MovieClip Frame 172
on (rollOver) {
_root.codeClip.doSound("menuHover");
}
on (release) {
_root.codeClip.doSound("emptyClip");
getURL ("http://www.armorgames.com", "_blank");
}
Symbol 1737 MovieClip Frame 206
_root.codeClip.doSound("plane");
this._parent.play();
Instance of Symbol 1261 MovieClip in Symbol 1743 MovieClip Frame 1
onClipEvent (load) {
this.onPress = function () {
};
this.useHandCursor = false;
}
Symbol 1743 MovieClip Frame 30
this._visible = false;
_root.flyTo2(this.locID);
trace("locID = " + this.locID);
stop();
Instance of Symbol 1801 MovieClip "seq" in Symbol 1803 MovieClip Frame 1
onClipEvent (load) {
function gotoLocation(target) {
this.targetLocation = target;
doSpin();
}
function doSpin() {
this.play();
this.onEnterFrame = function () {
if (this[this.targetLocation]) {
this.stop();
doZoom();
}
};
}
function doZoom() {
this.onEnterFrame = function () {
this._parent.destMarker.doneFlight();
delete this.onEnterFrame;
};
}
var spinIt = false;
var targetLocation = "";
this.origScale = this._parent._xscale;
}
Instance of Symbol 1763 MovieClip "destMarker" in Symbol 1803 MovieClip Frame 1
onClipEvent (load) {
function flyTo(cityID) {
trace("FLYTO: " + cityID);
this.gotoAndStop("fly");
this.targetLoc = cityID;
tweenJump();
this._parent.seq.gotoLocation(locArray[this.targetLoc]._locString);
}
function doneFlight() {
this.gotoAndStop("stop");
this.currentLocation = this.targetLoc;
this._parent.flyTo2();
}
function tweenJump() {
var _local4 = locArray[this.targetLoc]._locX;
var _local3 = locArray[this.targetLoc]._locY;
if (this.currentLocation == this.targetLoc) {
var _local5 = _local4 - 2;
} else {
var _local5 = locArray[this.currentLocation]._locX;
}
var _local2 = locArray[this.currentLocation]._locY;
new mx.transitions.Tween(this, "_x", mx.transitions.easing.Strong.easeInOut, _local5, _local4, 36, false);
new mx.transitions.Tween(this, "_y", mx.transitions.easing.Strong.easeInOut, _local2, _local3, 36, false);
adjside = _local4 - _local5;
oppside = -1 * (_local3 - _local2);
angle = Math.atan2(oppside, adjside);
angle = Math.round((angle / Math.PI) * 180);
this._yscale = Math.abs(this._yscale);
if (_local4 > _local5) {
this._xscale = -Math.abs(this._xscale);
if (_local3 < _local2) {
this._yscale = -Math.abs(this._yscale);
} else {
this._yscale = Math.abs(this._yscale);
}
} else {
this._xscale = Math.abs(this._xscale);
if (_local3 > _local2) {
this._yscale = -Math.abs(this._yscale);
} else {
this._yscale = Math.abs(this._yscale);
}
}
this._rotation = -angle;
}
this.currentLocation = 0;
this.targetLoc = 0;
var locArray = [{_locX:37, _locY:27, _locString:"NY"}, {_locX:32, _locY:32, _locString:"LA"}, {_locX:32.4, _locY:19.5, _locString:"AM"}, {_locX:27, _locY:53.5, _locString:"BG"}, {_locX:36.2, _locY:19.5, _locString:"LD"}];
flyTo(0);
}
Symbol 1826 MovieClip Frame 1
stop();
Instance of Symbol 579 MovieClip "playerHeadShot" in Symbol 1828 MovieClip Frame 1
onClipEvent (load) {
this.gotoAndStop("idle");
this.healthMeter._visible = false;
}
Instance of Symbol 751 MovieClip in Symbol 1828 MovieClip Frame 1
onClipEvent (load) {
this.gotoAndStop(1);
}
Symbol 1834 MovieClip Frame 86
gotoAndPlay (1);
Symbol 1847 Button
on (release) {
_root.codeClip.doSound("latch");
_root.updateLocationList();
_root.killLocation(((_root.myChar.myLocation == undefined) ? 0 : (_root.myChar.myLocation)));
_parent.gotoAndPlay("close");
}
Symbol 1852 MovieClip Frame 1
stop();
Symbol 1852 MovieClip Frame 2
stop();
Symbol 1855 MovieClip Frame 1
stop();
Symbol 1855 MovieClip Frame 2
stop();
Symbol 1858 MovieClip Frame 1
stop();
Symbol 1858 MovieClip Frame 2
stop();
Symbol 1861 MovieClip Frame 1
stop();
Symbol 1861 MovieClip Frame 2
stop();
Symbol 1864 MovieClip Frame 1
stop();
Symbol 1864 MovieClip Frame 2
stop();
Symbol 1867 MovieClip Frame 1
stop();
Symbol 1867 MovieClip Frame 2
stop();
Symbol 1870 MovieClip Frame 1
stop();
Symbol 1870 MovieClip Frame 2
stop();
Symbol 1874 MovieClip Frame 1
stop();
Symbol 1874 MovieClip Frame 2
stop();
Symbol 1874 MovieClip Frame 3
stop();
Symbol 1877 MovieClip Frame 1
stop();
Symbol 1877 MovieClip Frame 2
stop();
Symbol 1880 Button
on (release) {
trace((this + " : ") + this.blingDefault);
if (!this.boughtIt) {
_global.bling = this.blingDefault;
}
gotoAndPlay ("main");
}
Symbol 1899 Button
on (release) {
gotoAndPlay ("main");
}
Symbol 1908 Button
on (release) {
trace((this + " : ") + this.hairDefault);
if (!this.boughtIt) {
_global.hair = this.hairDefault;
}
gotoAndPlay ("main");
}
Symbol 1911 Button
on (release) {
_root.codeClip.doSound("latch");
gotoAndPlay ("main");
}
Symbol 1921 MovieClip Frame 1
stop();
Symbol 1921 MovieClip Frame 2
stop();
Symbol 1921 MovieClip Frame 3
stop();
Symbol 1925 MovieClip Frame 1
stop();
Symbol 1925 MovieClip Frame 2
stop();
Symbol 1925 MovieClip Frame 3
stop();
Symbol 1929 MovieClip Frame 1
stop();
Symbol 1929 MovieClip Frame 2
stop();
Symbol 1929 MovieClip Frame 3
stop();
Symbol 1930 MovieClip Frame 1
stop();
welcomeText = "Welcome to Vinnie's Barber Shoppe! We got whatever you need, especially hair cuts! If you ain't a cop, have a look around.";
this.btn_health.onRelease = function () {
if (_root.myChar.myLoot >= 1000) {
if ((_root.myChar.currHP + 50) <= _root.myChar.maxHP) {
_root.codeClip.doSound("buy");
_root.myChar.myLoot = _root.myChar.myLoot - 1000;
_root.myChar.currHP = _root.myChar.currHP + 50;
} else if (_root.myChar.currHP != _root.myChar.maxHP) {
_root.myChar.currHP = _root.myChar.maxHP;
_root.codeClip.doSound("buy");
_root.myChar.myLoot = _root.myChar.myLoot - 1000;
} else {
_root.codeClip.doSound("nope");
_root.immediatePopup("You wanted a $1000 burger... and you didn't even need it. Be careful with your money, tubs.");
}
} else {
_root.codeClip.doSound("nope");
_root.immediatePopup("You do not have sufficient funds to order Vinnie's Big Burger.");
}
_root.charStats.updateDisplay();
};
this.btn_healthMax.onRelease = function () {
if (_root.myChar.myLoot >= _global.hpMaxPrice) {
_root.codeClip.doSound("buy");
_root.myChar.myLoot = _root.myChar.myLoot - _global.hpMaxPrice;
_root.myChar.maxHP = _root.myChar.maxHP + 5;
_root.myChar.currHP = _root.myChar.maxHP;
_global.hpMaxPrice = Math.floor(_global.hpMaxPrice * 1.3);
this._parent.price.text = "$" + _global.hpMaxPrice;
} else {
_root.codeClip.doSound("nope");
_root.immediatePopup("You do not have sufficient funds to purchase a stat upgrade!");
}
_root.charStats.updateDisplay();
};
this.btn_ammo.onRelease = function () {
if (_root.myChar.myLoot >= 1000) {
_root.codeClip.doSound("buy");
_root.myChar.myLoot = _root.myChar.myLoot - 1000;
_root.myChar.ammo = _root.myChar.ammo + 30;
} else {
_root.codeClip.doSound("nope");
_root.immediatePopup("You do not have sufficient funds to purchase additional ammunition!");
}
_global.ammo = _root.myChar.ammo;
_root.charStats.updateDisplay();
};
this.btn_phone.onRelease = function () {
if (_global.informant) {
if (_root.myChar.myLoot >= 5000) {
_root.codeClip.doSound("buy");
_root.myChar.myLoot = _root.myChar.myLoot - 5000;
_root.myChar.phoneCount = _root.myChar.phoneCount + 3;
} else {
_root.codeClip.doSound("nope");
_root.immediatePopup("You do not have sufficient funds to purchase a prepaid phone.");
}
_root.charStats.updateDisplay();
} else {
_root.codeClip.doSound("nope");
_root.immediatePopup("I'm sorry, we're fresh out of those right now.");
}
};
this.btn_luggage.onRelease = function () {
if (_root.myChar.myLoot >= _global.luggPrice) {
_root.codeClip.doSound("buy");
_root.myChar.myLoot = _root.myChar.myLoot - _global.luggPrice;
_root.myChar.myInventory.drugLimit = _root.myChar.myInventory.drugLimit + 40;
_global.luggPrice = Math.floor(_global.luggPrice * 1.5);
this._parent.price.text = "$" + _global.luggPrice;
} else {
_root.codeClip.doSound("nope");
_root.immediatePopup("You do not have sufficient funds to purchase a larger false-bottomed suitcase.");
}
_root.charStats.updateDisplay();
};
Instance of Symbol 1834 MovieClip in Symbol 1930 MovieClip Frame 1
onClipEvent (load) {
this.stop();
this.onRollOver = function () {
play();
};
this.onRollOut = function () {
stop();
};
}
on (release) {
_root.codeClip.doSound("latch");
_root.updateLocationList();
_root.killLocation(((_root.myChar.myLocation == undefined) ? 0 : (_root.myChar.myLocation)));
_root.myStore.gotoAndPlay("close");
}
Instance of Symbol 1836 MovieClip in Symbol 1930 MovieClip Frame 1
onClipEvent (load) {
this.onRelease = function () {
};
this.useHandCursor = false;
}
Instance of Symbol 1852 MovieClip "btn_bling" in Symbol 1930 MovieClip Frame 1
on (rollOver) {
_root.codeClip.doSound("latch");
_parent.desc.text = "It's like a haircut, for your neck.";
_parent.price.text = "$1000";
}
on (release) {
_parent.gotoAndPlay("bling");
}
on (rollOut) {
_parent.desc.text = _parent.welcomeText;
_parent.price.text = "--";
}
Instance of Symbol 1855 MovieClip "btn_luggage" in Symbol 1930 MovieClip Frame 1
on (rollOver) {
_root.codeClip.doSound("latch");
_parent.desc.text = "Luggage ain't luggage without a false bottom. Whatever you got, this one lets you carry more.\n\nRaises max inventory: 40 pts.";
_parent.price.text = "$" + _global.luggPrice;
}
on (rollOut) {
_parent.desc.text = _parent.welcomeText;
_parent.price.text = "--";
}
Instance of Symbol 1858 MovieClip "btn_health" in Symbol 1930 MovieClip Frame 1
on (rollOver) {
_root.codeClip.doSound("latch");
_parent.desc.text = "Vinnie's Big Burger replenishes all your health needs. If it doesn't, buy another one!\n\nRaises HP: 50 pts";
_parent.price.text = "$1000";
}
on (rollOut) {
_parent.desc.text = _parent.welcomeText;
_parent.price.text = "--";
}
Instance of Symbol 1861 MovieClip "btn_healthMax" in Symbol 1930 MovieClip Frame 1
on (rollOver) {
_root.codeClip.doSound("latch");
_parent.desc.text = "If the ladies think you're weak, it's because you are weak! Let Vinnie help you out.\n\nRaises max HP: 5 pts\nRefills HP";
_parent.price.text = "$" + _global.hpMaxPrice;
}
on (rollOut) {
_parent.desc.text = _parent.welcomeText;
_parent.price.text = "--";
}
Instance of Symbol 1864 MovieClip "btn_ammo" in Symbol 1930 MovieClip Frame 1
on (rollOver) {
_root.codeClip.doSound("latch");
_parent.desc.text = "You never know when you'll end up on a deserted island and need to start a fire with a gun. Better stock up on these babies.\n\nRefills ammo: 30.";
_parent.price.text = "$1000";
}
on (rollOut) {
_parent.desc.text = _parent.welcomeText;
_parent.price.text = "--";
}
Instance of Symbol 1867 MovieClip "btn_phone" in Symbol 1930 MovieClip Frame 1
on (rollOver) {
_root.codeClip.doSound("latch");
_parent.desc.text = "With Vinnie's pre-paid phones, you'll know exactly when special events happen. This one's good for 3 uses, then you gotta cough up for another one.";
if (!_global.informant) {
_parent.desc.text = _parent.desc.text + "\nWe're backordered on these puppies. Come back later.";
}
_parent.price.text = "$5000";
}
on (rollOut) {
_parent.desc.text = _parent.welcomeText;
_parent.price.text = "--";
}
onClipEvent (load) {
this._visible = false;
}
Instance of Symbol 1870 MovieClip "btn_hair" in Symbol 1930 MovieClip Frame 1
on (rollOver) {
_root.codeClip.doSound("latch");
_parent.desc.text = "Yeah, we got hair cuts too. If you want to change your look, let Vinnie work his magic.";
_parent.price.text = "$38";
}
on (release) {
_parent.gotoAndPlay("haircut");
}
on (rollOut) {
_parent.desc.text = _parent.welcomeText;
_parent.price.text = "--";
}
Instance of Symbol 1874 MovieClip "btn_passport" in Symbol 1930 MovieClip Frame 1
on (rollOver) {
_root.codeClip.doSound("latch");
_parent.desc.text = "I'll bet you wanna travel the world, right? Can't get there without a passport. Lucky for you, Vinnie sells them.";
_parent.price.text = " - varies -";
}
on (release) {
_parent.gotoAndPlay("passport");
}
on (rollOut) {
_parent.desc.text = _parent.welcomeText;
_parent.price.text = "--";
}
Instance of Symbol 1877 MovieClip in Symbol 1930 MovieClip Frame 1
on (rollOver) {
_root.codeClip.doSound("latch");
_parent.desc.text = "You gotta have some new moves if you want to hold up in battle! Upgrade your skills here.";
_parent.price.text = "$20000";
}
on (release) {
_parent.gotoAndPlay("attacks");
}
on (rollOut) {
_parent.desc.text = _parent.welcomeText;
_parent.price.text = "--";
}
Symbol 1930 MovieClip Frame 10
blingText = "Choose from this large variety.";
desc.text = blingText;
Instance of Symbol 579 MovieClip "playerMC" in Symbol 1930 MovieClip Frame 10
onClipEvent (load) {
this.gotoAndStop("idle");
this.healthMeter._visible = false;
}
Instance of Symbol 579 MovieClip "playerMC" in Symbol 1930 MovieClip Frame 15
onClipEvent (load) {
this.gotoAndStop("idle");
this.healthMeter._visible = false;
}
Symbol 1930 MovieClip Frame 18
stop();
this.blingDefault = _global.bling;
this.boughtIt = false;
this.buy_bling.onRelease = function () {
if (_global.bling != this._parent.blingDefault) {
if (_root.myChar.myLoot >= 1000) {
_root.codeClip.doSound("buy");
this._parent.blingDefault = _global.bling;
_root.myChar.myLoot = _root.myChar.myLoot - 1000;
_root.charStats.playerHeadShot.gotoAndStop("lose");
_root.charStats.playerHeadShot.gotoAndStop("idle");
_root.charStats.updateDisplay();
this._parent.boughtIt = true;
} else {
_root.codeClip.doSound("nope");
_root.immediatePopup("You do not have sufficient funds to purchase this \"bling\".");
}
} else {
_root.codeClip.doSound("nope");
_root.immediatePopup("You have already purchased this \"bling\".");
}
};
this.bling_inc.onRelease = function () {
_root.codeClip.doSound("latch");
if (_global.bling == this._parent.playerMC.mc.bling_mc._totalframes) {
_global.bling = 1;
} else {
_global.bling++;
}
this._parent.playerMC.mc.bling_mc.gotoAndStop(_global.bling);
};
this.bling_dec.onRelease = function () {
_root.codeClip.doSound("latch");
if (_global.bling == 1) {
_global.bling = this._parent.playerMC.mc.bling_mc._totalframes;
} else {
_global.bling--;
}
this._parent.playerMC.mc.bling_mc.gotoAndStop(_global.bling);
};
Symbol 1930 MovieClip Frame 24
hairText = "Sometimes haircuts come with hats.";
desc.text = hairText;
Instance of Symbol 579 MovieClip "playerMC" in Symbol 1930 MovieClip Frame 24
onClipEvent (load) {
this.gotoAndStop("idle");
this.healthMeter._visible = false;
}
Instance of Symbol 579 MovieClip "playerMC" in Symbol 1930 MovieClip Frame 25
onClipEvent (load) {
this.gotoAndStop("idle");
this.healthMeter._visible = false;
}
Instance of Symbol 579 MovieClip "playerMC" in Symbol 1930 MovieClip Frame 26
onClipEvent (load) {
this.gotoAndStop("idle");
this.healthMeter._visible = false;
}
Instance of Symbol 579 MovieClip "playerMC" in Symbol 1930 MovieClip Frame 27
onClipEvent (load) {
this.gotoAndStop("idle");
this.healthMeter._visible = false;
}
Instance of Symbol 579 MovieClip "playerMC" in Symbol 1930 MovieClip Frame 28
onClipEvent (load) {
this.gotoAndStop("idle");
this.healthMeter._visible = false;
}
Instance of Symbol 579 MovieClip "playerMC" in Symbol 1930 MovieClip Frame 29
onClipEvent (load) {
this.gotoAndStop("idle");
this.healthMeter._visible = false;
}
Symbol 1930 MovieClip Frame 32
stop();
this.boughtIt = true;
this.hairDefault = _global.hair;
this.hair_inc.onRelease = function () {
_root.codeClip.doSound("latch");
if (_global.hair == this._parent.playerMC.mc.head_mc.hair_mc._totalframes) {
_global.hair = 1;
} else {
_global.hair++;
}
this._parent.playerMC.mc.head_mc.hair_mc.gotoAndStop(_global.hair);
this._parent.boughtIt = false;
};
this.hair_dec.onRelease = function () {
_root.codeClip.doSound("latch");
if (_global.hair == 1) {
_global.hair = this._parent.playerMC.mc.head_mc.hair_mc._totalframes;
} else {
_global.hair--;
}
this._parent.playerMC.mc.head_mc.hair_mc.gotoAndStop(_global.hair);
this._parent.boughtIt = false;
};
this.buy_haircut.onRelease = function () {
if (_global.hair != this._parent.hairDefault) {
if (_root.myChar.myLoot >= 38) {
_root.codeClip.doSound("buy");
this._parent.hairDefault = _global.hair;
_root.myChar.myLoot = _root.myChar.myLoot - 38;
_root.charStats.playerHeadShot.gotoAndStop("lose");
_root.charStats.playerHeadShot.gotoAndStop("idle");
_root.charStats.updateDisplay();
this._parent.boughtIt = true;
} else {
_root.codeClip.doSound("nope");
_root.immediatePopup("You do not have sufficient funds to purchase this hairstyle.");
}
} else {
_root.codeClip.doSound("nope");
_root.immediatePopup("You already have this hairstyle.");
}
};
Symbol 1930 MovieClip Frame 37
passText = "Feel free to leave the country. Vinnie's got shops all over the stinkin' world.";
desc.text = passText;
Instance of Symbol 1874 MovieClip "london_Pass" in Symbol 1930 MovieClip Frame 37
on (rollOver) {
_root.codeClip.doSound("latch");
_parent.price.text = "$10000";
}
Instance of Symbol 1874 MovieClip "amsterdam_Pass" in Symbol 1930 MovieClip Frame 37
on (rollOver) {
_root.codeClip.doSound("latch");
_parent.price.text = "$20000";
}
Instance of Symbol 1874 MovieClip "bogota_Pass" in Symbol 1930 MovieClip Frame 37
on (rollOver) {
_root.codeClip.doSound("latch");
_parent.price.text = "$30000";
}
Instance of Symbol 1874 MovieClip "london_Pass" in Symbol 1930 MovieClip Frame 42
on (rollOver) {
_root.codeClip.doSound("latch");
_parent.price.text = "$10000";
}
Instance of Symbol 1874 MovieClip "amsterdam_Pass" in Symbol 1930 MovieClip Frame 42
on (rollOver) {
_root.codeClip.doSound("latch");
_parent.price.text = "$20000";
}
Instance of Symbol 1874 MovieClip "bogota_Pass" in Symbol 1930 MovieClip Frame 42
on (rollOver) {
_root.codeClip.doSound("latch");
_parent.price.text = "$30000";
}
Symbol 1930 MovieClip Frame 45
stop();
var londonAvailable = _root.myChar.locationStack[4].available;
var amsterdamAvailable = _root.myChar.locationStack[2].available;
var bogotaAvailable = _root.myChar.locationStack[3].available;
if (!bogotaAvailable) {
this.bogota_Pass.onRelease = function () {
if (_root.myChar.myLoot >= 30000) {
_root.myChar.myLoot = _root.myChar.myLoot - 30000;
_root.codeClip.doSound("buy");
_root.enableLocation(3);
_root.updateLocationList();
this.enabled = false;
this.gotoAndStop("disabled");
} else {
_root.codeClip.doSound("nope");
_root.immediatePopup("You can't afford that Passport, bub. Bogota will have to wait. Go do something.");
}
_root.charStats.updateDisplay();
};
} else {
this.bogota_Pass.enabled = false;
this.bogota_Pass.gotoAndStop("disabled");
}
if (!amsterdamAvailable) {
this.amsterdam_Pass.onRelease = function () {
if (_root.myChar.myLoot >= 20000) {
_root.myChar.myLoot = _root.myChar.myLoot - 20000;
_root.codeClip.doSound("buy");
_root.enableLocation(2);
_root.updateLocationList();
this.enabled = false;
this.gotoAndStop("disabled");
} else {
_root.codeClip.doSound("nope");
_root.immediatePopup("You can't afford that Passport, bub. Amsterdam will have to wait. Go do something.");
}
_root.charStats.updateDisplay();
};
} else {
this.amsterdam_Pass.enabled = false;
this.amsterdam_Pass.gotoAndStop("disabled");
}
if (!londonAvailable) {
this.london_Pass.onRelease = function () {
if (_root.myChar.myLoot >= 10000) {
_root.myChar.myLoot = _root.myChar.myLoot - 10000;
_root.codeClip.doSound("buy");
_root.enableLocation(4);
_root.updateLocationList();
this.enabled = false;
this.gotoAndStop("disabled");
} else {
_root.codeClip.doSound("nope");
_root.immediatePopup("You can't afford that Passport, bub. London will have to wait. Go do something.");
}
_root.charStats.updateDisplay();
};
} else {
this.london_Pass.enabled = false;
this.london_Pass.gotoAndStop("disabled");
}
Symbol 1930 MovieClip Frame 53
attacksText = "Tired of being a punching bag? Same old 3-hit combo? Let Vinnie teach you how to fight like a real man.";
desc.text = attacksText;
Instance of Symbol 1921 MovieClip "p5btn" in Symbol 1930 MovieClip Frame 53
on (rollOver) {
_root.codeClip.doSound("latch");
_parent.price.text = "$20000";
_parent.desc.text = "Ring O' Fire\nKeep enemies away.\n\nInstructions: Press Punch as the 5th move in your combo.\ne.g. P-P-K-P-P";
}
Instance of Symbol 1925 MovieClip "k5btn" in Symbol 1930 MovieClip Frame 53
on (rollOver) {
_root.codeClip.doSound("latch");
_parent.price.text = "$20000";
_parent.desc.text = "Fire Uppercut\nOne powerful hit.\n\nInstructions: Press Kick as the 5th move in your combo.\ne.g. P-P-K-P-K";
}
Instance of Symbol 1929 MovieClip "s5btn" in Symbol 1930 MovieClip Frame 53
on (rollOver) {
_root.codeClip.doSound("latch");
_parent.price.text = "$20000";
_parent.desc.text = "Dual Uzis\nNo need to get your hands dirty.\n\nInstructions: Press Shoot as the 5th move in your combo.\ne.g. P-P-K-P-S";
}
Symbol 1930 MovieClip Frame 61
stop();
if (!_global.k5) {
this.k5btn.onRelease = function () {
if (_root.myChar.myLoot >= 20000) {
_root.myChar.myLoot = _root.myChar.myLoot - 20000;
_root.codeClip.doSound("buy");
_global.k5 = true;
this.enabled = false;
this.gotoAndStop("disabled");
} else {
_root.codeClip.doSound("nope");
_root.immediatePopup("At this moment, you do not have the training, the grasp of budo - the.. uh. You don't have 20 large.");
}
_root.charStats.updateDisplay();
};
} else {
this.k5btn.enabled = false;
this.k5btn.gotoAndStop("disabled");
}
if (!_global.p5) {
this.p5btn.onRelease = function () {
if (_root.myChar.myLoot >= 20000) {
_root.myChar.myLoot = _root.myChar.myLoot - 20000;
_root.codeClip.doSound("buy");
_global.p5 = true;
this.enabled = false;
this.gotoAndStop("disabled");
} else {
_root.codeClip.doSound("nope");
_root.immediatePopup("At this moment, you do not have the training, the grasp of budo - the.. uh. You don't have 20 large.");
}
_root.charStats.updateDisplay();
};
} else {
this.p5btn.enabled = false;
this.p5btn.gotoAndStop("disabled");
}
if (!_global.s5) {
this.s5btn.onRelease = function () {
if (_root.myChar.myLoot >= 20000) {
_root.myChar.myLoot = _root.myChar.myLoot - 20000;
_root.codeClip.doSound("buy");
_global.s5 = true;
this.enabled = false;
this.gotoAndStop("disabled");
} else {
_root.codeClip.doSound("nope");
_root.immediatePopup("At this moment, you do not have the training, the grasp of budo - the.. uh. You don't have 20 large.");
}
_root.charStats.updateDisplay();
};
} else {
this.s5btn.enabled = false;
this.s5btn.gotoAndStop("disabled");
}
Symbol 1931 MovieClip Frame 1
stop();
Instance of Symbol 1834 MovieClip in Symbol 1931 MovieClip Frame 1
on (rollOver) {
this.swapDepths(_root.getNextHighestDepth());
}
on (release) {
this._visible = false;
this._parent.gotoAndPlay("open");
}
Symbol 1931 MovieClip Frame 17
_root.codeClip.doSound("shing");
Symbol 1931 MovieClip Frame 24
stop();
Symbol 1931 MovieClip Frame 30
_root.codeClip.doSound("menuHide");
Symbol 1931 MovieClip Frame 34
gotoAndStop ("_up");