Frame 1
System.security.allowDomain("http://www.rustyarcade.com");
_root.showMenu = false;
function startEverything() {
function __com_mochibot__(swfid, mc, lv, trk) {
var x;
var g;
var s;
var fv;
var sb;
var u;
var res;
var mb;
var mbc;
mb = "__mochibot__";
mbc = "mochibot.com";
g = (_global ? (_global) : (_level0._root));
if (g[mb + swfid]) {
return(g[mb + swfid]);
}
s = System.security;
x = mc._root.getSWFVersion;
fv = (x ? (mc.getSWFVersion()) : ((_global ? 6 : 5)));
if (!s) {
s = {};
}
sb = s.sandboxType;
if (sb == "localWithFile") {
return(null);
}
x = s.allowDomain;
if (x) {
s.allowDomain(mbc);
}
x = s.allowInsecureDomain;
if (x) {
s.allowInsecureDomain(mbc);
}
u = (((((((((((("http://" + mbc) + "/my/core.swf?mv=7&fv=") + fv) + "&v=") + escape(getVersion())) + "&swfid=") + escape(swfid)) + "&l=") + lv) + "&f=") + mc) + (sb ? ("&sb=" + sb) : "")) + (trk ? "&t=1" : "");
lv = ((fv > 6) ? (mc.getNextHighestDepth()) : ((g[mb + "level"] ? (g[mb + "level"] + 1) : (lv))));
g[mb + "level"] = lv;
if (fv == 5) {
res = "_level" + lv;
if (!eval (res)) {
loadMovieNum (u, lv);
}
} else {
res = mc.createEmptyMovieClip(mb + swfid, lv);
res.loadMovie(u);
}
return(res);
}
if (_root.startup == undefined) {
_root.startup = true;
_root.sound = true;
_root.music = true;
_root.music2 = true;
}
if (_root.music2) {
stopAllSounds();
_root.music2 = false;
var loop = new Sound(_root);
loop.attachSound("loop2");
loop.start(0, 1000);
}
__com_mochibot__("e43d9216", this, 10301, true);
}
stop();
Stage.showMenu = false;
Instance of Symbol 301 MovieClip in Frame 1
onClipEvent (enterFrame) {
this.percent = ((_root.getBytesLoaded() / _root.getBytesTotal()) * 100) + "%";
if ((((_root.getBytesLoaded() / _root.getBytesTotal()) * 100) == 100) && (this._currentframe == 1)) {
this.play();
}
}
on (release) {
getURL ("http://www.rustyarcade.com", "_blank");
}
Frame 2
stop();
stopAllSounds();
Frame 29
function attachTrolley(xarr, yarr, tarr) {
m = _root.shop.trollies.attachMovie("trolley", "trolley" + _root.shop.trollies.getNextHighestDepth(), _root.shop.trollies.getNextHighestDepth(), {_x:685, _y:33, _xscale:26.5, _yscale:26.5});
col = random(6) + 1;
m.col1.gotoAndStop(col);
m.col2.gotoAndStop(col);
m.targetX = xarr;
m.targetY = yarr;
m.targetF = tarr;
delete m;
}
stop();
_root.maxs = 0;
_root.trols = 0;
var billcount = 0;
var statrefresh = false;
var currenttrend = 1;
var handcancel = false;
var speedup = 1;
var tlimit = 500;
var ttimer = 0;
var refresher = true;
var refresher2 = true;
var basebills = 750;
var money = 5000;
var days = 22;
var month = 12;
var years = 2007;
var months = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
var monthdays = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
var daye = ["st", "nd", "rd", "th", "th", "th", "th", "th", "th", "th", "th", "th", "th", "th", "th", "th", "th", "th", "th", "th", "st", "nd", "rd", "th", "th", "th", "th", "th", "th", "th", "st"];
var stars = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1];
var sellbys = [2, 20, 3, 4, 6, 14, 7, 3, 4, 3, 4, 5, 16, 6, 12, 16, 10, 18, 4, 17, 20, 15, 2, 2];
var NameText = ["Milk", "Cereal", "Bread", "Biscuits", "Butter", "Ice-cream", "Cheese", "Juice", "Apples", "Grapes", "Carrots", "Tomatoes", "Peas", "Pizza", "Pasta", "Ketchup", "Eggs", "Dog food", "Candy", "Sugar", "Coffee", "Beans", "Meat", "Fish"];
var InfoText = ["Straight from the cow milk. A delicious white treat to keep your bones healthy.", "Cruncheo's are a yummy breakfast time treat to keep the kids nice and lively! Warning contains 90% sugar.", "Fresh home brand bread tastes like soft peices of heaven. This really is the best thing since sliced bread...", "CRUNCH cookies. They taste mmmm-mmmmmmm.", "Butter-me-up butter. The most delicious butter in all the land!", "Ice, ice baby ice cream. I scream for ice cream.", "Just Cheese. No questions.", "There is no better way to get away then a nice cold glass of OJ!", "Gold 'and' delicious apples. Crunchy balls delicious fruit packed with nutrition", "Thanks a bunch grapes. Show someone you really care with a bunch of our finest.", "Crunchy carrots full of orange goodness", "Tom's tomatoes. Because pronounciation does not matter.", "Garden peas. Frozen not stirred. Warning defrosting is essential.", "Pizza-cake. Because it really can be that easy.", "Pass-ta-pasta, everyone wants a plate... or two!", "Catch-up ketchup. Come on tomato, catch up", "Eggs. They're so fresh they might just hatch in your fridge! Warning, eggs may hatch in your fridge!", "Canine-bites. The yummy dog treat designed to keep your best friend healthy. Warning, for animal consumption only.", "Candy candy everywhere so lets all have a treat!", "Sugar, honey honey. We can be your candy girl, and make you want more. Warning, addictive substances inside.", "Coffee. Excuse me.", "Baked beans. Because beans means Beinz.", "Flinstones meat. Warning, may contain dinosaur.", "A fish a day keeps the doctor away. And anyone else for that matter."];
var BasePrices = [4, 40, 16, 75, 10, 54, 63, 80, 7, 12, 8, 19, 50, 84, 56, 25, 66, 30, 76, 35, 45, 25, 84, 99];
var QposX = [616, 719, 829, 946, 662, 770, 885, 1000, 725, 832, 942, 1059];
var QposY = [287, 362, 429, 496, 320, 391, 459, 536, 268, 339, 410, 484];
var Qdir = [2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3];
var warehouseitemi = [];
var warehouseitems = [];
var warehouseitemq = [];
onEnterFrame = function () {
if (_root.billcount == 6) {
_root.billte = ("1 day until next bill ($" + _root.bills) + ")";
} else {
_root.billte = (((7 - _root.billcount) + " days until next bill ($") + _root.bills) + ")";
}
_root.ttimer = _root.ttimer + _root.speedup;
if (_root.ttimer >= _root.tlimit2) {
_root.ttimer = 0;
if (_root.trols < 12) {
_root.trols++;
_root.maxs++;
switch (random(10)) {
case 0 :
_root.attachTrolley([72, 184, 550, 655, 275, 392, 761, 866, 478, 610, 998], [423, 482, 250, 323, 552, 618, 378, 456, 686, 765, 526], [1, 2, 3, 2, 1, 2, 3, 2, 1, 2, 3]);
break;
case 1 :
_root.attachTrolley([72, 184, 275, 655, 761, 392, 478, 866, 998, 610, 478, 866], [423, 482, 552, 323, 378, 618, 686, 456, 526, 765, 686, 456], [1, 2, 2, 3, 2, 1, 2, 3, 2, 1, 4, 3]);
break;
case 2 :
_root.attachTrolley([72, 184, 275, 392, 761, 866, 478, 610, 998], [423, 482, 552, 618, 378, 456, 686, 765, 526], [1, 2, 2, 2, 3, 2, 1, 2, 3]);
break;
case 3 :
_root.attachTrolley([72, 184, 275, 392, 478, 866, 998, 610, 478, 392, 761], [423, 482, 552, 618, 686, 456, 526, 765, 686, 618, 378], [1, 2, 2, 2, 2, 3, 2, 1, 4, 4, 3]);
break;
case 4 :
_root.attachTrolley([72, 184, 550, 655, 761, 866, 478, 610, 998, 866], [423, 482, 250, 323, 378, 456, 686, 765, 526, 456], [1, 2, 3, 2, 2, 2, 1, 2, 3, 4]);
break;
case 5 :
_root.attachTrolley([72, 184, 275, 655], [423, 482, 552, 323], [1, 2, 2, 3]);
break;
case 6 :
_root.attachTrolley([72, 184, 550, 655, 761, 392, 478, 866], [423, 482, 250, 323, 378, 618, 686, 456], [1, 2, 3, 2, 2, 1, 2, 3]);
break;
case 7 :
_root.attachTrolley([72, 184, 275, 392, 478, 610, 998, 866, 761, 392, 275, 655], [423, 482, 552, 618, 686, 765, 526, 456, 378, 618, 552, 323], [1, 2, 2, 2, 2, 2, 3, 4, 4, 1, 4, 3]);
break;
case 8 :
_root.attachTrolley([72, 184, 275, 392, 478, 866], [423, 482, 552, 618, 686, 456], [1, 2, 2, 2, 2, 3]);
break;
case 9 :
_root.attachTrolley([72, 184, 275, 392, 761, 655, 275, 184, 550], [423, 482, 552, 618, 378, 323, 552, 482, 250], [1, 2, 2, 2, 3, 4, 1, 4, 3]);
}
}
}
if (_root.refresher2) {
_root.refresher2 = false;
}
_root.dayt = _root.days + _root.daye[_root.days - 1];
_root.montht = _root.months[_root.month - 1];
if (_root.days > _root.monthdays[_root.month - 1]) {
_root.month++;
_root.statrefresh = true;
_root.days = 1;
}
if (_root.month > 12) {
_root.month = 1;
_root.years++;
}
_root.money = Math.round(_root.money * 100) / 100;
if (_root.music && (_root.music2)) {
stopAllSounds();
_root.music2 = false;
var _local2 = new Sound(_root);
_local2.attachSound("loop");
_local2.start(0, 1000);
}
};
Instance of Symbol 468 MovieClip "shop" in Frame 29
onClipEvent (enterFrame) {
if (this._y > 0) {
this._y = 0;
}
if (this._y < ((-this._height) + Stage.height)) {
this._y = (-this._height) + Stage.height;
}
if (this._x > 0) {
this._x = 0;
}
if (this._x < ((-this._width) + Stage.width)) {
this._x = (-this._width) + Stage.width;
}
}
Instance of Symbol 482 MovieClip in Frame 29
on (press) {
if (_root.shop._xscale < 200) {
_root.shop._xscale = (_root.shop._yscale = _root.shop._yscale + 50);
_root.shop._x = -380;
_root.shop._y = -250;
}
}
onClipEvent (enterFrame) {
this._alpha = 100 - (100 * (_root.shop._xscale >= 200));
}
Instance of Symbol 485 MovieClip in Frame 29
on (press) {
if (_root.shop._xscale > 50) {
_root.shop._xscale = (_root.shop._yscale = _root.shop._yscale - 50);
_root.shop._x = -380;
_root.shop._y = -250;
}
}
onClipEvent (enterFrame) {
this._alpha = 100 - (100 * (_root.shop._xscale <= 50));
}
Instance of Symbol 488 MovieClip in Frame 29
on (press) {
this.clicked = true;
}
onClipEvent (mouseUp) {
this.clicked = false;
}
onClipEvent (enterFrame) {
if (this.clicked || (Key.isDown(40))) {
this.gotoAndStop(2);
_root.shop._y = _root.shop._y - 10;
} else {
this.gotoAndStop(1);
}
}
Instance of Symbol 488 MovieClip in Frame 29
on (press) {
this.clicked = true;
}
onClipEvent (mouseUp) {
this.clicked = false;
}
onClipEvent (enterFrame) {
if (this.clicked || (Key.isDown(38))) {
this.gotoAndStop(2);
_root.shop._y = _root.shop._y + 10;
} else {
this.gotoAndStop(1);
}
}
Instance of Symbol 488 MovieClip in Frame 29
on (press) {
this.clicked = true;
}
onClipEvent (mouseUp) {
this.clicked = false;
}
onClipEvent (enterFrame) {
if (this.clicked || (Key.isDown(37))) {
this.gotoAndStop(2);
_root.shop._x = _root.shop._x + 10;
} else {
this.gotoAndStop(1);
}
}
Instance of Symbol 488 MovieClip in Frame 29
on (press) {
this.clicked = true;
}
onClipEvent (mouseUp) {
this.clicked = false;
}
onClipEvent (enterFrame) {
if (this.clicked || (Key.isDown(39))) {
this.gotoAndStop(2);
_root.shop._x = _root.shop._x - 10;
} else {
this.gotoAndStop(1);
}
}
Instance of Symbol 494 MovieClip in Frame 29
on (press) {
_root.buyMenu._visible = !_root.buyMenu._visible;
}
Instance of Symbol 496 MovieClip "dragHand" in Frame 29
on (press) {
_root.handcancel = true;
}
onClipEvent (enterFrame) {
this._visible = !_root.handcancel;
if ((((_root.buyMenu._visible || (_root.shelfMenu._visible)) || (_root.upgradeMenu._visible)) || (_root.marketMenu._visible)) || (_root.statsMenu._visible)) {
this._visible = false;
}
}
onClipEvent (keyDown) {
if (Key.isDown(72)) {
_root.handcancel = !_root.handcancel;
}
}
Instance of Symbol 501 MovieClip in Frame 29
on (press) {
_root.upgradeMenu._visible = !_root.upgradeMenu._visible;
}
Instance of Symbol 506 MovieClip in Frame 29
on (press) {
_root.marketMenu._visible = !_root.marketMenu._visible;
}
Instance of Symbol 510 MovieClip in Frame 29
on (press) {
_root.statsMenu._visible = !_root.statsMenu._visible;
}
Instance of Symbol 514 MovieClip in Frame 29
onClipEvent (enterFrame) {
this._xscale = this._xscale - (100 / (600 / _root.speedup));
if (_root.refresher) {
_root.refresher = false;
}
if (this._xscale <= 0) {
if (random(20) == 0) {
_root.currenttrend = random(24);
}
_root.billcount++;
if (_root.billcount >= 7) {
if (_root.money < 0) {
_root.play();
}
_root.billcount = 0;
_root.money = _root.money - _root.bills;
if (_root.basebills < 3500) {
_root.basebills = _root.basebills + 250;
}
}
_root.days++;
_root.refresher = true;
this._xscale = 100;
}
}
Instance of Symbol 536 MovieClip in Frame 29
onClipEvent (load) {
this.gotoAndStop(1 + (!_root.music));
}
on (press) {
if (this._currentframe == 1) {
stopAllSounds();
this.gotoAndStop(2);
} else {
var loop = new Sound(_root);
loop.attachSound("loop");
loop.start(0, 1000);
this.gotoAndStop(1);
}
}
Instance of Symbol 550 MovieClip "statsMenu" in Frame 29
onClipEvent (load) {
this._visible = false;
}
Instance of Symbol 569 MovieClip "buyMenu" in Frame 29
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if ((((this._visible || (_root.shelfMenu._visible)) || (_root.upgradeMenu._visible)) || (_root.statsMenu._visible)) || (_root.marketMenu._visible)) {
_root.shelfInfo._visible = false;
_root.dragHand._visible = false;
} else {
_root.shelfInfo._visible = true;
_root.dragHand._visible = true;
}
}
Instance of Symbol 584 MovieClip "marketMenu" in Frame 29
onClipEvent (load) {
this._visible = false;
}
Instance of Symbol 610 MovieClip "shelfMenu" in Frame 29
onClipEvent (load) {
this._visible = false;
}
Instance of Symbol 620 MovieClip "upgradeMenu" in Frame 29
onClipEvent (load) {
this._visible = false;
}
Instance of Symbol 634 MovieClip "infoPanel" in Frame 29
onClipEvent (load) {
this._visible = false;
}
Instance of Symbol 641 MovieClip "millionaire" in Frame 29
onClipEvent (enterFrame) {
if (_root.money >= 1000000) {
this._visible = true;
} else {
this._visible = false;
}
}
Instance of Symbol 644 MovieClip in Frame 29
onClipEvent (enterFrame) {
if (this._visible) {
this._alpha = this._alpha - 0.5;
}
if (!this._visible) {
this._alpha = 100;
}
this._visible = _root.handcancel;
if (_root.handcancel) {
if (this.dragging) {
_root.shop._x = this.origx2 - (this.origx1 - _root._xmouse);
_root.shop._y = this.origy2 - (this.origy1 - _root._ymouse);
}
}
}
on (press) {
if (_root.handcancel) {
this.dragging = true;
this.origx1 = _root._xmouse;
this.origy1 = _root._ymouse;
this.origx2 = _root.shop._x;
this.origy2 = _root.shop._y;
}
}
onClipEvent (mouseUp) {
this.dragging = false;
}
Instance of Symbol 646 MovieClip in Frame 29
on (press) {
_root.handcancel = false;
}
onClipEvent (enterFrame) {
this._visible = _root.handcancel;
}
Frame 30
stop();
stopAllSounds();
Symbol 78 MovieClip Frame 28
this.gotoAndPlay((((this._parent.fnum - 1) * 30) - (this._parent.fnum - 2)) + 2);
Symbol 78 MovieClip Frame 57
this.gotoAndPlay((((this._parent.fnum - 1) * 30) - (this._parent.fnum - 2)) + 2);
Symbol 78 MovieClip Frame 86
this.gotoAndPlay((((this._parent.fnum - 1) * 30) - (this._parent.fnum - 2)) + 2);
Symbol 78 MovieClip Frame 115
this.gotoAndPlay((((this._parent.fnum - 1) * 30) - (this._parent.fnum - 2)) + 2);
Symbol 78 MovieClip Frame 144
this.gotoAndPlay((((this._parent.fnum - 1) * 30) - (this._parent.fnum - 2)) + 2);
Symbol 97 MovieClip Frame 1
this.b1.gotoAndStop(this._parent.fnum);
this.b2.gotoAndStop(this._parent.fnum);
this.b3.gotoAndStop(this._parent.fnum);
Symbol 106 MovieClip Frame 1
stop();
Symbol 134 MovieClip Frame 1
stop();
Symbol 143 MovieClip Frame 1
stop();
Symbol 209 MovieClip Frame 23
this.gotoAndPlay(((this._parent.fnum - 1) * 25) - (this._parent.fnum - 2));
Symbol 209 MovieClip Frame 47
this.gotoAndPlay(((this._parent.fnum - 1) * 25) - (this._parent.fnum - 2));
Symbol 209 MovieClip Frame 71
this.gotoAndPlay(((this._parent.fnum - 1) * 25) - (this._parent.fnum - 2));
Symbol 209 MovieClip Frame 95
this.gotoAndPlay(((this._parent.fnum - 1) * 25) - (this._parent.fnum - 2));
Symbol 209 MovieClip Frame 119
this.gotoAndPlay(((this._parent.fnum - 1) * 25) - (this._parent.fnum - 2));
Symbol 215 MovieClip Frame 1
this.gotoAndStop(this._parent.fnum);
Symbol 221 MovieClip Frame 1
this.gotoAndStop(this._parent.fnum);
Symbol 227 MovieClip Frame 1
this.gotoAndStop(this._parent.fnum);
Symbol 229 MovieClip [trolley] Frame 1
#initclip 2
Object.registerClass("trolley", trolley);
#endinitclip
if (this.fnum == undefined) {
this.fnum = random(5) + 1;
}
Instance of Symbol 78 MovieClip "pants" in Symbol 229 MovieClip [trolley] Frame 1
onClipEvent (load) {
this.gotoAndPlay(((this._parent.fnum - 1) * 30) - (this._parent.fnum - 2));
}
Symbol 229 MovieClip [trolley] Frame 2
stop();
Symbol 229 MovieClip [trolley] Frame 3
this.b1.gotoAndStop(this._parent.fnum);
this.b2.gotoAndStop(this._parent.fnum);
this.b3.gotoAndStop(this._parent.fnum);
Instance of Symbol 209 MovieClip "pants" in Symbol 229 MovieClip [trolley] Frame 3
onClipEvent (load) {
this.gotoAndPlay(((this._parent.fnum - 1) * 25) - (this._parent.fnum - 2));
}
Instance of Symbol 215 MovieClip "b1" in Symbol 229 MovieClip [trolley] Frame 3
onClipEvent (enterFrame) {
this.gotoAndStop(this._parent.fnum);
}
Instance of Symbol 221 MovieClip "b2" in Symbol 229 MovieClip [trolley] Frame 3
onClipEvent (enterFrame) {
this.gotoAndStop(this._parent.fnum);
}
Instance of Symbol 227 MovieClip "b3" in Symbol 229 MovieClip [trolley] Frame 3
onClipEvent (enterFrame) {
this.gotoAndStop(this._parent.fnum);
}
Symbol 229 MovieClip [trolley] Frame 4
this.b1.gotoAndStop(this._parent.fnum);
this.b2.gotoAndStop(this._parent.fnum);
this.b3.gotoAndStop(this._parent.fnum);
Instance of Symbol 215 MovieClip "b3" in Symbol 229 MovieClip [trolley] Frame 4
onClipEvent (enterFrame) {
this.gotoAndStop(this._parent.fnum);
}
Instance of Symbol 227 MovieClip "b1" in Symbol 229 MovieClip [trolley] Frame 4
onClipEvent (enterFrame) {
this.gotoAndStop(this._parent.fnum);
}
Symbol 236 MovieClip [BuyBar2] Frame 1
stop();
Symbol 236 MovieClip [BuyBar2] Frame 2
stop();
Symbol 243 MovieClip [BuyBar] Frame 1
stop();
Instance of Symbol 241 MovieClip in Symbol 243 MovieClip [BuyBar] Frame 1
on (press) {
_root.infoPanel._visible = true;
_root.infoPanel.pname = this._parent.title;
_root.infoPanel.pinfo = this._parent.info;
_root.infoPanel.product.gotoAndStop(this._parent.pnum + 2);
_root.infoPanel.pprice = this._parent.price;
_root.infoPanel.pstars = _root.stars[this._parent.pnum];
}
Symbol 243 MovieClip [BuyBar] Frame 2
stop();
Symbol 258 Button
on (release) {
_root.getURL("http://www.rustyarcade.com", "_blank");
}
Symbol 263 Button
on (release) {
_root.music2 = true;
_root.gotoAndStop(3);
}
Symbol 268 Button
on (release) {
_root.play();
}
Symbol 272 Button
on (release) {
getURL ("http://www.rustyarcade.com", "_blank");
}
Symbol 283 Button
on (release) {
getURL ("http://www.rustyarcade.com/supermanager", "_blank");
}
Symbol 301 MovieClip Frame 1
stop();
Symbol 301 MovieClip Frame 113
stop();
_root.startEverything();
Symbol 664 MovieClip [__Packages.trolley] Frame 0
class trolley extends MovieClip
{
var hitter, pants, fnum, _parent, hitTest, _y, getDepth, gotoAndStop, ang, _x, swapDepths, removeMovieClip;
function trolley () {
super();
}
function onEnterFrame() {
if (pitems[0] == "e") {
pprice = [];
pitems = [];
litems = [];
qitems = [];
}
if (!pauser) {
if (pitems.length < 8) {
for (var _local5 in _root.shop) {
if (_local5.slice(0, 5) == "shelf") {
if (hitter.hitTest(_root.shop[_local5].hitter) && (_root.shop[_local5].stock > 0)) {
var _local3 = 0;
i = 0;
while (i < pitems.length) {
if ((pitems[i] == _root.shop[_local5].productid) || (litems == _root.shop[_local5].productid)) {
_local3++;
break;
}
i++;
}
if (_local3 == 0) {
litems.push(_root.shop[_local5].productid);
if (random(100) < _root.shop[_local5].prob) {
var _local4 = 1;
i = 0;
while (i < (_root.shop[_local5].capacity / 10)) {
if (_root.shop[_local5].stock == 0) {
break;
}
if (random(100) < _root.shop[_local5].prob) {
_local4++;
_root.shop[_local5].stock--;
}
i++;
}
_root.shop[_local5].stock--;
i = 0;
while (i <= 8) {
_root.shop[_local5]["prod" + i].gotoAndStop(1);
i++;
}
pitems.push(_root.shop[_local5].productid);
pprice.push(_root.shop[_local5].price);
qitems.push(_local4);
}
}
}
}
}
}
i = 0;
while (i < 8) {
if (pitems[i] == undefined) {
this["p" + (i + 1)].gotoAndStop(1);
} else {
this["p" + (i + 1)].gotoAndStop(pitems[i] + 2);
}
i++;
}
if ((current >= targetX.length) || (waiting)) {
pants.gotoAndPlay((((fnum - 1) * 30) - (fnum - 2)) + 1);
} else {
pants.play();
}
for (var _local5 in _parent) {
if (hitTest(_parent[_local5])) {
if ((_parent[_local5]._y < _y) && (_parent[_local5].getDepth() > getDepth())) {
_parent[_local5].swapDepths(getDepth());
}
}
}
gotoAndStop(targetF[current]);
ang = Math.atan2(_y - targetY[current], _x - targetX[current]);
_x = _x - (Math.cos(ang) * (speed * _root.speedup));
_y = _y - (Math.sin(ang) * (speed * _root.speedup));
if (((_x - targetX[current]) * (_x - targetX[current])) < 49) {
if (((_y - targetY[current]) * (_y - targetY[current])) < 49) {
current++;
}
}
if (!queing) {
if (hitTest(_parent._parent.door1)) {
if (_parent._parent.door1._currentframe == 1) {
_parent._parent.door1.gotoAndPlay(2);
}
if (_parent._parent.door1._currentframe > 25) {
_parent._parent.door1.gotoAndPlay(24);
}
}
if (current >= targetX.length) {
queing = true;
}
} else {
if ((qid < 4) && (qid >= 0)) {
var _local3 = 0;
for (var _local5 in _parent) {
if (_parent[_local5].qid == (qid + 4)) {
_local3++;
break;
}
}
if (_local3 == 0) {
qid = qid + 4;
current = 0;
targetX = [_root.QposX[qid]];
targetY = [_root.QposY[qid]];
targetF = [_root.Qdir[qid]];
}
}
if ((qid < 8) && (qid > 3)) {
var _local3 = 0;
for (var _local5 in _parent) {
if (_parent[_local5].qid == (qid + 4)) {
_local3++;
break;
}
}
if (_local3 == 0) {
qid = qid + 4;
current = 0;
targetX = [_root.QposX[qid]];
targetY = [_root.QposY[qid]];
targetF = [_root.Qdir[qid]];
}
}
if ((qid > 7) && (current >= targetX.length)) {
if ((pitems.length <= 0) && (!waiting)) {
var _local4 = targetX[0];
targetX = [_local4 + 150];
_local4 = targetY[0];
targetY = [_local4 - 100];
targetF[0] = [3];
current = 0;
qid = -5;
} else if (!waiting) {
waiting = true;
_root.shop["checkout" + qid].gotoAndPlay(2);
i = pitems.length - 1;
while (i >= 0) {
if (pitems[i] != -1) {
_root.shop["checkout" + qid].price = pprice[i] * qitems[i];
_root.shop["checkout" + qid].pid = pitems[i] + 1;
pitems[i] = -1;
if (i == 0) {
pitems = [];
}
break;
}
i--;
}
}
}
if ((qid == -5) && (current >= targetX.length)) {
_root.trols--;
swapDepths(_parent.getNextHighestDepth());
removeMovieClip();
}
if (targetX[0] == 72) {
var i = 11;
while (i >= 0) {
var _local3 = 0;
for (var _local5 in _parent) {
if (_parent[_local5].qid == i) {
_local3++;
}
}
if (_local3 == 0) {
current = 0;
qid = i;
if (i > 7) {
if (_root.QposX[i - 4] < targetX[targetX.length - 1]) {
var _local4 = 4;
} else {
var _local4 = 2;
}
targetX = [_root.QposX[i - 4], _root.QposX[i]];
targetY = [_root.QposY[i - 4], _root.QposY[i]];
targetF = [_local4, _root.Qdir[i - 4], _root.Qdir[i]];
} else {
if (_root.QposX[i] < targetX[targetX.length - 1]) {
var _local4 = 4;
} else {
var _local4 = 2;
}
targetX = [_root.QposX[i]];
targetY = [_root.QposY[i]];
targetF = [_local4, _root.Qdir[i]];
}
break;
}
i--;
}
}
}
}
}
var targetX = [];
var targetY = [];
var targetF = [];
var pauser = false;
var current = 0;
var speed = 3;
var queing = false;
var qid = -1;
var aqty = 0;
var pprice = ["e"];
var pitems = ["e"];
var litems = ["e"];
var qitems = ["e"];
var waiting = false;
}
Symbol 311 Button
on (release) {
_root.music = true;
}
Symbol 317 Button
on (release) {
_root.music = false;
}
Symbol 318 Button
on (release) {
_root.sound = true;
}
Symbol 319 Button
on (release) {
_root.sound = false;
}
Symbol 324 Button
on (release) {
_root._quality = "HIGH";
}
Symbol 329 Button
on (release) {
_root._quality = "MEDIUM";
}
Symbol 334 Button
on (release) {
_root._quality = "LOW";
}
Symbol 338 Button
on (release) {
_root.gotoAndStop(1);
}
Symbol 339 MovieClip Frame 1
onEnterFrame = function () {
if (_root.music) {
this.b1._visible = false;
this.b2._visible = true;
} else {
this.b1._visible = true;
this.b2._visible = false;
}
if (_root.sound) {
this.b3._visible = false;
this.b4._visible = true;
} else {
this.b3._visible = true;
this.b4._visible = false;
}
};
Symbol 356 Button
on (release) {
_root.nextFrame();
}
Symbol 359 Button
on (release) {
_root.prevFrame();
}
Symbol 362 Button
on (release) {
_root.gotoAndStop(28);
}
Symbol 436 Button
on (release) {
_root.play();
}
Symbol 450 MovieClip Frame 1
stop();
Symbol 454 MovieClip Frame 1
stop();
this.onEnterFrame = function () {
if ((_root.speedup == 2) && ((this._currentframe % 2) == 0)) {
this.nextFrame();
this.play();
}
};
Symbol 454 MovieClip Frame 57
if (_root.sound) {
var sfx = new Sound(_root);
sfx.attachSound("beep");
sfx.start(0, 0);
}
Symbol 454 MovieClip Frame 60
for (d in _root.shop.trollies) {
if (_root.shop.trollies[d].qid == this._name.slice(8, this._name.length)) {
_root.shop.trollies[d].waiting = false;
}
}
_root.money = _root.money + this.price;
this.gotoAndStop(1);
Symbol 455 MovieClip Frame 1
stop();
Symbol 463 MovieClip Frame 1
stop();
Symbol 467 MovieClip Frame 1
stop();
Symbol 468 MovieClip Frame 1
l = 1;
while (l < 25) {
this["shelf" + l].productid = -1;
this["shelf" + l].stock = 0;
this["shelf" + l].capacity = 10;
this["shelf" + l].price = 0;
this["shelf" + l].nametext._visible = false;
this["shelf" + l].onEnterFrame = function () {
if (((((this.productid == 0) || (this.productid == 4)) || (this.productid == 5)) || (this.productid == 6)) || (this.productid == 12)) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
this.prob = (_root.stars[this.productid] / 5) * 40;
if (this.price == _root.BasePrices[this.productid]) {
this.prob = this.prob + 30;
} else {
this.prob = this.prob + (42 - ((this.price / _root.BasePrices[this.productid]) * 12));
}
if (_root.currenttrend == this.productid) {
this.prob = this.prob + 20;
}
i = 0;
while (i <= 8) {
this["prod" + i].gotoAndStop(this.productid + 2);
if (i >= Math.round((this.stock / this.capacity) * 8)) {
break;
}
i++;
}
if (this.productid == -1) {
i = 0;
while (i <= 8) {
this["prod" + i].gotoAndStop(1);
this.named = ("Empty\n(" + this.capacity) + " capacity)";
i++;
}
} else {
this.named = ((((_root.NameText[this.productid] + "\n(") + this.stock) + "/") + this.capacity) + ")";
}
};
this["shelf" + l].onRollOver = function () {
_root.shelfInfo.swapDepths(_root.getNextHighestDepth());
_root.shelfInfo.removeMovieClip();
m = _root.attachMovie("shelfName", "shelfInfo", _root.getNextHighestDepth(), {_x:_root._xmouse, _y:_root._ymouse});
m.shelfnum = this._name;
m._visible = false;
m.nametext = this.named;
m.onEnterFrame = function () {
this._x = _root._xmouse;
this._y = _root._ymouse;
};
};
this["shelf" + l].onRollOut = function () {
_root.shelfInfo.swapDepths(_root.getNextHighestDepth());
_root.shelfInfo.removeMovieClip();
};
this["shelf" + l].onPress = function () {
if (((((!_root.shelfMenu._visible) && (!_root.buyMenu._visible)) && (!_root.upgradeMenu._visible)) && (!_root.marketMenu._visible)) && (!_root.statsMenu._visible)) {
_root.shelfMenu._visible = true;
_root.shelfMenu.title = this._name;
}
};
l++;
}
Instance of Symbol 454 MovieClip "checkout8" in Symbol 468 MovieClip Frame 1
onClipEvent (enterFrame) {
this.product.gotoAndStop(this.pid + 1);
}
Instance of Symbol 454 MovieClip "checkout9" in Symbol 468 MovieClip Frame 1
onClipEvent (enterFrame) {
this.product.gotoAndStop(this.pid + 1);
}
Instance of Symbol 454 MovieClip "checkout10" in Symbol 468 MovieClip Frame 1
onClipEvent (enterFrame) {
this.product.gotoAndStop(this.pid + 1);
}
Instance of Symbol 454 MovieClip "checkout11" in Symbol 468 MovieClip Frame 1
onClipEvent (enterFrame) {
this.product.gotoAndStop(this.pid + 1);
}
Symbol 479 MovieClip Frame 1
onEnterFrame = function () {
this.money = "$" + _root.money;
};
Symbol 482 MovieClip Frame 1
stop();
Symbol 482 MovieClip Frame 2
stop();
Symbol 485 MovieClip Frame 1
stop();
Symbol 485 MovieClip Frame 2
stop();
Instance of Symbol 493 MovieClip in Symbol 494 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.shop[this._parent.title].stock < _root.shop[this._parent.title].capacity) {
this._alpha = 100;
} else {
this._alpha = 50;
}
}
on (press) {
if (this._alpha == 100) {
i = 0;
while (i < _root.warehouseitemi.length) {
if (_root.warehouseitemi[i] == _root.shop[this._parent.title].productid) {
l = _root.warehouseitemq[i];
j = 0;
while (j < l) {
if (_root.shop[this._parent.title].stock != _root.shop[this._parent.title].capacity) {
_root.warehouseitemq[i]--;
_root.shop[this._parent.title].stock++;
} else {
break;
}
j++;
}
}
i++;
}
}
_root.refresher2 = true;
}
Instance of Symbol 500 MovieClip in Symbol 501 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.shop[this._parent.title].stock < _root.shop[this._parent.title].capacity) {
this._alpha = 100;
} else {
this._alpha = 50;
}
}
on (press) {
if (this._alpha == 100) {
i = 0;
while (i < _root.warehouseitemi.length) {
if (_root.warehouseitemi[i] == _root.shop[this._parent.title].productid) {
l = _root.warehouseitemq[i];
j = 0;
while (j < l) {
if (_root.shop[this._parent.title].stock != _root.shop[this._parent.title].capacity) {
_root.warehouseitemq[i]--;
_root.shop[this._parent.title].stock++;
} else {
break;
}
j++;
}
}
i++;
}
}
_root.refresher2 = true;
}
Instance of Symbol 505 MovieClip in Symbol 506 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.shop[this._parent.title].stock < _root.shop[this._parent.title].capacity) {
this._alpha = 100;
} else {
this._alpha = 50;
}
}
on (press) {
if (this._alpha == 100) {
i = 0;
while (i < _root.warehouseitemi.length) {
if (_root.warehouseitemi[i] == _root.shop[this._parent.title].productid) {
l = _root.warehouseitemq[i];
j = 0;
while (j < l) {
if (_root.shop[this._parent.title].stock != _root.shop[this._parent.title].capacity) {
_root.warehouseitemq[i]--;
_root.shop[this._parent.title].stock++;
} else {
break;
}
j++;
}
}
i++;
}
}
_root.refresher2 = true;
}
Instance of Symbol 509 MovieClip in Symbol 510 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.shop[this._parent.title].stock < _root.shop[this._parent.title].capacity) {
this._alpha = 100;
} else {
this._alpha = 50;
}
}
on (press) {
if (this._alpha == 100) {
i = 0;
while (i < _root.warehouseitemi.length) {
if (_root.warehouseitemi[i] == _root.shop[this._parent.title].productid) {
l = _root.warehouseitemq[i];
j = 0;
while (j < l) {
if (_root.shop[this._parent.title].stock != _root.shop[this._parent.title].capacity) {
_root.warehouseitemq[i]--;
_root.shop[this._parent.title].stock++;
} else {
break;
}
j++;
}
}
i++;
}
}
_root.refresher2 = true;
}
Symbol 521 MovieClip Frame 1
stop();
Symbol 525 MovieClip Frame 1
stop();
Symbol 528 MovieClip Frame 1
stop();
Instance of Symbol 521 MovieClip in Symbol 529 MovieClip Frame 1
on (press) {
_root.speedup = 0;
}
Instance of Symbol 525 MovieClip in Symbol 529 MovieClip Frame 1
on (press) {
_root.speedup = 2;
}
Instance of Symbol 528 MovieClip in Symbol 529 MovieClip Frame 1
on (press) {
_root.speedup = 1;
}
Symbol 532 Button
on (release) {
getURL ("http://www.rustyarcade.com", "_blank");
}
Symbol 536 MovieClip Frame 1
stop();
Symbol 550 MovieClip Frame 1
this.mr = false;
this.ad1 = false;
this.ad2 = false;
onEnterFrame = function () {
if (_root.refresher) {
if (this.ad1) {
_root.money = _root.money - 1000;
}
if (this.ad2) {
_root.money = _root.money - 1000;
}
if (this.mr) {
_root.money = _root.money - 1000;
}
}
_root.tlimit = 500;
_root.tlimit = _root.tlimit - (this.ad1 * 100);
_root.tlimit = _root.tlimit - (this.ad2 * 200);
if (!this.mr) {
this.currentTrend = "Activate market research to view current trends";
} else {
this.currentTrend = "Customer currently want " + _root.NameText[_root.currenttrend];
}
};
Instance of Symbol 538 MovieClip in Symbol 550 MovieClip Frame 1
on (press) {
this._parent.startDrag();
}
onClipEvent (mouseUp) {
this._parent.stopDrag();
}
Instance of Symbol 541 MovieClip in Symbol 550 MovieClip Frame 1
on (press) {
this._parent._visible = false;
}
Instance of Symbol 545 MovieClip in Symbol 550 MovieClip Frame 1
onClipEvent (load) {
this.mstats = [10000];
this.ms0 = [1];
}
onClipEvent (enterFrame) {
if (_root.statrefresh) {
t = this.mstats[this.mstats.length - 1];
this.mstats = [t];
t = this.ms0[this.ms0.length - 1];
this.ms0 = [t];
t = this.ms1[this.ms1.length - 1];
_root.statrefresh = false;
}
if (_root.refresher) {
for (d in this) {
if (d.slice(0, 3) == "dot") {
this[d].swapDepths(this.getNextHighestDepth());
this[d].removeMovieClip();
}
}
this.ms0[this.ms0.length] = (((_root.dayt + " ") + _root.montht) + " ") + _root.years;
this.mstats[this.mstats.length] = _root.money;
this.drawer.clear();
j = 0;
k = 100000 /* 0x0186A0 */;
i = 0;
while (i < this.mstats.length) {
j = Math.max(j, this.mstats[i]);
k = Math.min(k, this.mstats[i]);
i++;
}
j = j + k;
this.drawer.lineStyle(1, 8947848, 100);
i = 0;
while (i < this.mstats.length) {
this.drawer.moveTo((190 / this.mstats.length) * i, 0);
this.drawer.lineTo((190 / this.mstats.length) * i, 100);
i++;
}
this.drawer.lineStyle(2, 16711680, 100);
this.drawer.moveTo((190 / this.mstats.length) * -1, (this.mstats[0] / j) * 100);
i = 1;
while (i < this.mstats.length) {
this.drawer.lineTo((190 / this.mstats.length) * (i - 1), 100 - ((this.mstats[i] / j) * 100));
m = this.attachMovie("dot", "dot" + i, this.getNextHighestDepth(), {_x:(190 / this.mstats.length) * (i - 1), _y:100 - ((this.mstats[i] / j) * 100)});
m.id = i;
m.onPress = function () {
this._parent._parent.info0 = this._parent.ms0[this.id];
this._parent._parent.info1 = "Opening balance: " + this._parent.mstats[this.id - 1];
this._parent._parent.info2 = "Profit/Loss: " + (this._parent.mstats[this.id] - this._parent.mstats[this.id - 1]);
this._parent._parent.info3 = "Closing balance: " + this._parent.mstats[this.id];
};
if (((m._y > 100) || (m._x > 190)) || (m._x < 0)) {
m.swapDepths(this.getNextHighestDepth());
m.removeMovieClip();
}
i++;
}
}
}
Symbol 564 MovieClip Frame 1
onEnterFrame = function () {
if (_root.refresher2 || (_root.refresher)) {
i = 0;
while (i < _root.warehouseitemi.length) {
if (((((_root.days + "/") + _root.month) + "/") + _root.years) == _root.warehouseitems[i]) {
_root.warehouseitemq[i] = 0;
}
i++;
}
for (d in this.bars) {
this.bars[d].swapDepths(this.bars.getNextHighestDepth());
this.bars[d].removeMovieClip();
}
var _local3 = 0;
i = 0;
while (i < _root.warehouseitemi.length) {
if (_root.warehouseitemq[i] > 0) {
m = this.bars.attachMovie("BuyBar2", "bar" + this.bars.getNextHighestDepth(), this.bars.getNextHighestDepth(), {_x:0, _y:25 * _local3});
m.title = _root.NameText[_root.warehouseitemi[i]];
m.sellbyt = _root.warehouseitems[i];
m.qty = _root.warehouseitemq[i];
m.pnum = i;
m.onPress = function () {
this._parent._parent._parent.deli = this.pnum;
};
delete m;
_local3++;
}
i++;
}
}
};
Symbol 568 MovieClip Frame 1
onEnterFrame = function () {
if (_root.refresher) {
for (d in this.bars) {
this.bars[d].swapDepths(this.bars.getNextHighestDepth());
this.bars[d].removeMovieClip();
}
i = 0;
while (i < 24) {
m = this.bars.attachMovie("BuyBar", "bar" + this.bars.getNextHighestDepth(), this.bars.getNextHighestDepth(), {_x:0, _y:25 * i});
m.title = _root.NameText[i];
m.info = _root.InfoText[i];
m.price = _root.BasePrices[i];
m.sellbyd = _root.days + _root.sellbys[i];
m.sellbym = _root.month;
m.sellbyy = _root.years;
if (m.sellbyd > _root.monthdays[_root.month - 1]) {
m.sellbyd = m.sellbyd - _root.monthdays[_root.month - 1];
m.sellbym++;
}
if (m.sellbym > 12) {
m.sellbym = 1;
m.sellbyy++;
}
m.sellbyt = (((m.sellbyd + "/") + m.sellbym) + "/") + m.sellbyy;
if (this._parent.buyi > -1) {
if (this._parent.buyi == i) {
this._parent.buys = m.sellbyt;
m.gotoAndStop(2);
}
}
m.pnum = i;
m.button.onPress = function () {
if (Key.isDown(16)) {
if (this._parent._currentframe == 1) {
this._parent.gotoAndStop(2);
this._parent._parent._parent._parent.buyi.push(this._parent.pnum);
this._parent._parent._parent._parent.buyp.push(this._parent.price);
this._parent._parent._parent._parent.buys.push(this._parent.sellbyt);
}
} else {
for (d in this._parent._parent) {
this._parent._parent[d].gotoAndStop(1);
}
this._parent.gotoAndStop(2);
this._parent._parent._parent._parent.buyi = [this._parent.pnum];
this._parent._parent._parent._parent.buyp = [this._parent.price];
this._parent._parent._parent._parent.buys = [this._parent.sellbyt];
}
};
delete m;
i++;
}
if (this._parent.buyi[0] != -1) {
i = 0;
while (i < this._parent.buyi.length) {
for (d in this.bars) {
if (this.bars[d].pnum == this._parent.buyi[i]) {
this.bars[d].gotoAndStop(2);
this._parent.buys[i] = this.bars[d].sellbyt;
}
}
i++;
}
}
}
};
Symbol 569 MovieClip Frame 1
var qty = 1;
var buyi = [-1];
var buyp = [0];
onEnterFrame = function () {
tot = 0;
i = 0;
while (i < this.buyi.length) {
tot = tot + ((this.qty * this.buyp[i]) - (Math.floor(this.qty / 3.5) * this.buyp[i]));
i++;
}
this.tprice = "$" + tot;
};
Instance of Symbol 541 MovieClip in Symbol 569 MovieClip Frame 1
on (press) {
this._parent._visible = false;
}
Instance of Symbol 552 MovieClip in Symbol 569 MovieClip Frame 1
on (press) {
this._parent.startDrag();
}
onClipEvent (mouseUp) {
this._parent.stopDrag();
}
Instance of Symbol 555 MovieClip in Symbol 569 MovieClip Frame 1
on (press) {
this.pressed = true;
}
onClipEvent (enterFrame) {
if (this.pressed && (this._parent.qty > 0)) {
this._parent.qty--;
}
}
onClipEvent (mouseUp) {
this.pressed = false;
}
Instance of Symbol 555 MovieClip in Symbol 569 MovieClip Frame 1
on (press) {
this.pressed = true;
}
onClipEvent (enterFrame) {
if (this.pressed && (this._parent.qty < 100)) {
this._parent.qty++;
}
}
onClipEvent (mouseUp) {
this.pressed = false;
}
Instance of Symbol 559 MovieClip in Symbol 569 MovieClip Frame 1
onClipEvent (enterFrame) {
this.tot = 0;
i = 0;
while (i < this._parent.buyi.length) {
this.tot = this.tot + ((this._parent.qty * this._parent.buyp[i]) - (Math.floor(this._parent.qty / 3.5) * this._parent.buyp[i]));
i++;
}
if ((_root.money < this.tot) || (this._parent.buyi[0] == -1)) {
this._alpha = 50;
this.useHandCursor = false;
} else {
this._alpha = 100;
this.useHandCursor = true;
}
}
on (press) {
if (this._alpha == 100) {
_root.money = _root.money - this.tot;
k = 0;
while (k < this._parent.buyi.length) {
this.couldntfindamatch = true;
i = 0;
while (i < _root.warehouseitemi.length) {
if (_root.warehouseitemi[i] == this._parent.buyi[k]) {
if (_root.warehouseitems[i] == this._parent.buys[k]) {
_root.warehouseitemq[i] = _root.warehouseitemq[i] + this._parent.qty;
this.couldntfindamatch = false;
break;
}
}
i++;
}
if (this.couldntfindamatch) {
_root.warehouseitemi.push(this._parent.buyi[k]);
_root.warehouseitems.push(this._parent.buys[k]);
_root.warehouseitemq.push(this._parent.qty);
}
k++;
}
_root.refresher2 = true;
}
}
Instance of Symbol 555 MovieClip in Symbol 569 MovieClip Frame 1
on (press) {
this.clicked = true;
}
onClipEvent (mouseUp) {
this.clicked = false;
}
onClipEvent (enterFrame) {
if (this.clicked) {
if (this._parent.bars3.bars._y > -450) {
this._parent.bars3.bars._y = this._parent.bars3.bars._y - 5;
}
}
}
Instance of Symbol 561 MovieClip in Symbol 569 MovieClip Frame 1
on (press) {
this.clicked = true;
}
onClipEvent (mouseUp) {
this.clicked = false;
}
onClipEvent (enterFrame) {
if (this.clicked) {
if (this._parent.bars3.bars._y < 0) {
this._parent.bars3.bars._y = this._parent.bars3.bars._y + 5;
}
}
}
Instance of Symbol 567 MovieClip in Symbol 569 MovieClip Frame 1
on (press) {
k = 1;
while (k < 26) {
if (_root.shop["shelf" + k].stock < _root.shop["shelf" + k].capacity) {
i = 0;
while (i < _root.warehouseitemi.length) {
if (_root.warehouseitemi[i] == _root.shop["shelf" + k].productid) {
l = _root.warehouseitemq[i];
j = 0;
while (j < l) {
if (_root.shop["shelf" + k].stock != _root.shop["shelf" + k].capacity) {
_root.warehouseitemq[i]--;
_root.shop["shelf" + k].stock++;
} else {
break;
}
j++;
}
}
i++;
}
}
_root.refresher2 = true;
k++;
}
}
Instance of Symbol 555 MovieClip in Symbol 569 MovieClip Frame 1
on (press) {
this.clicked = true;
}
onClipEvent (mouseUp) {
this.clicked = false;
}
onClipEvent (enterFrame) {
if (this.clicked) {
if (this._parent.bars2.bars._y > -450) {
this._parent.bars2.bars._y = this._parent.bars2.bars._y - 10;
}
}
}
Instance of Symbol 561 MovieClip in Symbol 569 MovieClip Frame 1
on (press) {
this.clicked = true;
}
onClipEvent (mouseUp) {
this.clicked = false;
}
onClipEvent (enterFrame) {
if (this.clicked) {
if (this._parent.bars2.bars._y < 0) {
this._parent.bars2.bars._y = this._parent.bars2.bars._y + 10;
}
}
}
Symbol 584 MovieClip Frame 1
this.mr = false;
this.ad1 = false;
this.ad2 = false;
onEnterFrame = function () {
_root.bills = _root.basebills;
if (this.ad1) {
_root.bills = _root.bills + 600;
}
if (this.ad2) {
_root.bills = _root.bills + 1400;
}
if (this.mr) {
_root.bills = _root.bills + 200;
}
_root.tlimit2 = 500;
if (this.ad1) {
_root.tlimit2 = _root.tlimit2 - 100;
}
if (this.ad2) {
_root.tlimit2 = _root.tlimit2 - 200;
}
if (!this.mr) {
this.currentTrend = "Activate market research to view current trends";
} else {
this.currentTrend = "Customer currently want " + _root.NameText[_root.currenttrend];
}
};
Instance of Symbol 538 MovieClip in Symbol 584 MovieClip Frame 1
on (press) {
this._parent.startDrag();
}
onClipEvent (mouseUp) {
this._parent.stopDrag();
}
Instance of Symbol 541 MovieClip in Symbol 584 MovieClip Frame 1
on (press) {
this._parent._visible = false;
}
Instance of Symbol 577 MovieClip in Symbol 584 MovieClip Frame 1
onClipEvent (enterFrame) {
if (!this._parent.ad1) {
this._alpha = 100;
} else {
this._alpha = 20;
}
}
on (press) {
if (this._alpha == 100) {
if (_root.money >= 600) {
_root.money = _root.money - 600;
this._parent.ad1 = true;
}
} else {
this._parent.ad1 = false;
}
}
Instance of Symbol 580 MovieClip in Symbol 584 MovieClip Frame 1
onClipEvent (enterFrame) {
if (!this._parent.ad2) {
this._alpha = 100;
} else {
this._alpha = 20;
}
}
on (press) {
if (this._alpha == 100) {
if (_root.money >= 1400) {
_root.money = _root.money - 1400;
this._parent.ad2 = true;
}
} else {
this._parent.ad2 = false;
}
}
Instance of Symbol 583 MovieClip in Symbol 584 MovieClip Frame 1
onClipEvent (enterFrame) {
if (!this._parent.mr) {
this._alpha = 100;
} else {
this._alpha = 20;
}
}
on (press) {
if (this._alpha == 100) {
if (_root.money >= 200) {
_root.money = _root.money - 200;
this._parent.mr = true;
}
} else {
this._parent.mr = false;
}
}
Symbol 587 MovieClip Frame 1
i = 0;
while (i < _root.warehouseitems.length) {
pi = _root.warehouseitems[i].id;
m = this.bars.attachMovie("BuyBar", "bar" + this.bars.getNextHighestDepth(), this.bars.getNextHighestDepth(), {_x:0, _y:25 * pi});
m.title = _root.NameText[pi];
m.info = _root.InfoText[pi];
m.price = _root.BasePrices[pi];
m.pnum = pi;
delete m;
i++;
}
Symbol 588 MovieClip Frame 1
onEnterFrame = function () {
if (_root.refresher2 || (_root.refresher)) {
i = 0;
while (i < _root.warehouseitemi.length) {
if (((((_root.days + "/") + _root.month) + "/") + _root.years) == _root.warehouseitems[i]) {
_root.warehouseitemq[i] = 0;
}
i++;
}
for (d in this.bars) {
this.bars[d].swapDepths(this.bars.getNextHighestDepth());
this.bars[d].removeMovieClip();
}
var _local3 = 0;
i = 0;
while (i < _root.warehouseitemi.length) {
if (_root.warehouseitemq[i] > 0) {
m = this.bars.attachMovie("BuyBar2", "bar" + this.bars.getNextHighestDepth(), this.bars.getNextHighestDepth(), {_x:0, _y:25 * _local3});
m.title = _root.NameText[_root.warehouseitemi[i]];
m.sellbyt = _root.warehouseitems[i];
m.qty = _root.warehouseitemq[i];
m.pnum = _root.warehouseitemi[i];
m.onPress = function () {
for (d in this._parent) {
this._parent[d].gotoAndStop(1);
}
this.gotoAndStop(2);
this._parent._parent._parent.stockeri = this.pnum;
};
delete m;
_local3++;
}
i++;
}
}
};
Symbol 610 MovieClip Frame 1
var qty = 1;
var qty2 = 1;
var buyi = -1;
var buyp = 0;
onEnterFrame = function () {
this.titer = ((("Shelf " + this.title.slice(5, this.title.length)) + " (") + _root.shop[this.title].capacity) + ")";
if (_root.shop[this.title].productid == -1) {
this.stockt = "Currently Empty";
this.rrpt = "";
} else {
this.stockt = ((((("Currently stocking: " + _root.NameText[_root.shop[this.title].productid]) + "(") + _root.shop[this.title].stock) + "/") + _root.shop[this.title].capacity) + ")";
this.rrpt = ("Sale price (RRP " + (_root.BasePrices[_root.shop[this.title].productid] * 2)) + ")";
}
this.pricet = _root.shop[this.title].price;
};
Instance of Symbol 552 MovieClip in Symbol 610 MovieClip Frame 1
on (press) {
this._parent.startDrag();
}
onClipEvent (mouseUp) {
this._parent.stopDrag();
}
Instance of Symbol 541 MovieClip in Symbol 610 MovieClip Frame 1
on (press) {
this._parent._visible = false;
}
Instance of Symbol 591 MovieClip in Symbol 610 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.shop[this._parent.title].stock < _root.shop[this._parent.title].capacity) {
this._alpha = 100;
} else {
this._alpha = 50;
}
}
on (press) {
if (this._alpha == 100) {
i = 0;
while (i < _root.warehouseitemi.length) {
if (_root.warehouseitemi[i] == _root.shop[this._parent.title].productid) {
l = _root.warehouseitemq[i];
j = 0;
while (j < l) {
if (_root.shop[this._parent.title].stock != _root.shop[this._parent.title].capacity) {
_root.warehouseitemq[i]--;
_root.shop[this._parent.title].stock++;
} else {
break;
}
j++;
}
}
i++;
}
}
_root.refresher2 = true;
}
Instance of Symbol 596 MovieClip in Symbol 610 MovieClip Frame 1
onClipEvent (enterFrame) {
this.ttext = "";
if (_root.shop[this._parent.title].productid == -1) {
if (this._parent.stockeri != undefined) {
this.gotoAndStop(1);
this.ttext = _root.NameText[this._parent.stockeri];
} else {
this.gotoAndStop(3);
}
} else {
this.gotoAndStop(2);
}
}
on (press) {
if (this._currentframe == 1) {
for (d in this._parent.bars2.bars) {
this._parent.bars2.bars[d].gotoAndStop(1);
}
_root.shop[this._parent.title].productid = this._parent.stockeri;
_root.shop[this._parent.title].price = _root.BasePrices[_root.shop[this._parent.title].productid] * 1.5;
}
}
Instance of Symbol 599 MovieClip in Symbol 610 MovieClip Frame 1
on (press) {
_root.shop[this._parent.title].stock = 0;
_root.shop[this._parent.title].productid = -1;
_root.shop[this._parent.title].price = 0;
}
Instance of Symbol 602 MovieClip in Symbol 610 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.shop[this._parent.title].capacity < 100) {
this._alpha = 100;
} else {
this._alpha = 50;
}
}
on (press) {
if ((this._alpha == 100) && (_root.money >= 1000)) {
_root.money = _root.money - 1000;
_root.shop[this._parent.title].capacity = _root.shop[this._parent.title].capacity + 10;
}
}
Instance of Symbol 555 MovieClip in Symbol 610 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.shop[this._parent.title].price > _root.BasePrices[_root.shop[this._parent.title].productid]) {
this._alpha = 100;
} else {
this._alpha = 50;
}
if ((this._alpha == 100) && (this.pressed)) {
_root.shop[this._parent.title].price = _root.shop[this._parent.title].price - (_root.BasePrices[_root.shop[this._parent.title].productid] / 2);
}
_root.shop[this._parent.title].price = Math.round(_root.shop[this._parent.title].price * 100) / 100;
}
on (press) {
this.pressed = true;
}
onClipEvent (mouseUp) {
this.pressed = false;
}
Instance of Symbol 555 MovieClip in Symbol 610 MovieClip Frame 1
on (press) {
this.clicked = true;
}
onClipEvent (mouseUp) {
this.clicked = false;
}
onClipEvent (enterFrame) {
if (this.clicked) {
if (this._parent.bars2.bars._y > -450) {
this._parent.bars2.bars._y = this._parent.bars2.bars._y - 5;
}
}
}
Instance of Symbol 561 MovieClip in Symbol 610 MovieClip Frame 1
on (press) {
this.clicked = true;
}
onClipEvent (mouseUp) {
this.clicked = false;
}
onClipEvent (enterFrame) {
if (this.clicked) {
if (this._parent.bars2.bars._y < 0) {
this._parent.bars2.bars._y = this._parent.bars2.bars._y + 5;
}
}
}
Instance of Symbol 555 MovieClip in Symbol 610 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.shop[this._parent.title].price < (_root.BasePrices[_root.shop[this._parent.title].productid] * 3)) {
this._alpha = 100;
} else {
this._alpha = 50;
}
if ((this._alpha == 100) && (this.pressed)) {
_root.shop[this._parent.title].price = _root.shop[this._parent.title].price + (_root.BasePrices[_root.shop[this._parent.title].productid] / 2);
}
}
on (press) {
this.pressed = true;
}
onClipEvent (mouseUp) {
this.pressed = false;
}
Symbol 615 MovieClip Frame 1
onEnterFrame = function () {
if (_root.refresher2 || (_root.refresher)) {
for (d in this.bars) {
this.bars[d].swapDepths(this.bars.getNextHighestDepth());
this.bars[d].removeMovieClip();
}
i = 0;
while (i < 24) {
m = this.bars.attachMovie("BuyBar", "bar" + this.bars.getNextHighestDepth(), this.bars.getNextHighestDepth(), {_x:0, _y:25 * i});
m.title = _root.NameText[i];
m.info = _root.InfoText[i];
m.sellbyt = _root.stars[i];
if (this._parent.buyi > -1) {
if (this._parent.buyi == i) {
this._parent.buys = m.sellbyt;
m.gotoAndStop(2);
}
}
m.pnum = i;
m.button.onPress = function () {
for (d in this._parent._parent) {
this._parent._parent[d].gotoAndStop(1);
}
this._parent.gotoAndStop(2);
this._parent._parent._parent._parent.buyi = this._parent.pnum;
this._parent._parent._parent._parent.buys = this._parent.sellbyt;
};
delete m;
i++;
}
}
};
Symbol 620 MovieClip Frame 1
onEnterFrame = function () {
if (this.buyi > -1) {
this.tprice = (this.buys * 100) + (_root.BasePrices[this.buyi] * 10);
} else {
this.tprice = 0;
}
this.tpricet = "$" + this.tprice;
};
Instance of Symbol 538 MovieClip in Symbol 620 MovieClip Frame 1
on (press) {
this._parent.startDrag();
}
onClipEvent (mouseUp) {
this._parent.stopDrag();
}
Instance of Symbol 614 MovieClip in Symbol 620 MovieClip Frame 1
onClipEvent (enterFrame) {
if (((_root.money < this._parent.tprice) || (this._parent.buyi == -1)) || (_root.stars[this._parent.buyi] == 5)) {
this._alpha = 50;
this.useHandCursor = false;
} else {
this._alpha = 100;
this.useHandCursor = true;
}
}
on (press) {
if (this._alpha == 100) {
_root.money = _root.money - this._parent.tprice;
_root.stars[this._parent.buyi]++;
_root.refresher2 = true;
}
}
Instance of Symbol 555 MovieClip in Symbol 620 MovieClip Frame 1
on (press) {
this.clicked = true;
}
onClipEvent (mouseUp) {
this.clicked = false;
}
onClipEvent (enterFrame) {
if (this.clicked) {
if (this._parent.bars2.bars._y > -450) {
this._parent.bars2.bars._y = this._parent.bars2.bars._y - 5;
}
}
}
Instance of Symbol 561 MovieClip in Symbol 620 MovieClip Frame 1
on (press) {
this.clicked = true;
}
onClipEvent (mouseUp) {
this.clicked = false;
}
onClipEvent (enterFrame) {
if (this.clicked) {
if (this._parent.bars2.bars._y < 0) {
this._parent.bars2.bars._y = this._parent.bars2.bars._y + 5;
}
}
}
Instance of Symbol 541 MovieClip in Symbol 620 MovieClip Frame 1
on (press) {
this._parent._visible = false;
}
Symbol 630 MovieClip Frame 1
stop();
Symbol 634 MovieClip Frame 1
onEnterFrame = function () {
this.stars.gotoAndStop(this.pstars);
};
Instance of Symbol 622 MovieClip in Symbol 634 MovieClip Frame 1
on (press) {
this._parent.startDrag();
}
onClipEvent (mouseUp) {
this._parent.stopDrag();
}
Instance of Symbol 541 MovieClip in Symbol 634 MovieClip Frame 1
on (press) {
this._parent._visible = false;
}
Symbol 641 MovieClip Frame 1
this.mr = false;
this.ad1 = false;
this.ad2 = false;
onEnterFrame = function () {
_root.bills = 750;
if (this.ad1) {
_root.bills = _root.bills + 600;
}
if (this.ad2) {
_root.bills = _root.bills + 1400;
}
if (this.mr) {
_root.bills = _root.bills + 200;
}
_root.tlimit2 = 500;
if (this.ad1) {
_root.tlimit2 = _root.tlimit2 - 100;
}
if (this.ad2) {
_root.tlimit2 = _root.tlimit2 - 200;
}
if (!this.mr) {
this.currentTrend = "Activate market research to view current trends";
} else {
this.currentTrend = "Customer currently want " + _root.NameText[_root.currenttrend];
}
};
Instance of Symbol 538 MovieClip in Symbol 641 MovieClip Frame 1
on (press) {
this._parent.startDrag();
}
onClipEvent (mouseUp) {
this._parent.stopDrag();
}
Instance of Symbol 541 MovieClip in Symbol 641 MovieClip Frame 1
on (press) {
this._parent._visible = false;
}
Instance of Symbol 640 MovieClip in Symbol 641 MovieClip Frame 1
on (release) {
john = new LoadVars();
john.pn = this._parent.playername;
john.pm = this._parent.playermessage;
john.sendAndLoad("http://www.rustyarcade.com/supermanager/submit.php", john, "post");
getURL ("http://www.rustyarcade.com/supermanager/", "_blank");
this._parent.swapDepths(_root.getNextHighestDepth());
this._parent.removeMovieClip();
}
Symbol 660 Button
on (release) {
getURL ("http://www.rustyarcade.com", "_blank");
}
Symbol 661 Button
on (release) {
_root.gotoAndStop(1);
}
Symbol 662 MovieClip Frame 28
stop();