Frame 1
function datetimediff2(year, month, date, hour, minute, year2, month2, date2, hour2, minute2) {
totalseconds = (new Date(year2, month2, date2, hour2, minute2) - new Date(year, month, date, hour, minute)) / 1000;
totalminutes = totalseconds / 60;
totalhours = totalseconds / 3600;
totaldays = totalseconds / 86400;
totalmonths = totalseconds / 2592000;
totalyears = totalseconds / 31104000;
seconds = int(totalseconds % 60);
minutes = int((totalseconds % 3600) / 60);
hours = int((totalseconds % 86400) / 3600);
days = int((totalseconds % 2592000) / 86400);
months = int((totalseconds % 31104000) / 2592000);
years = int(totalyears);
return({totaldays_:totaldays, totalminutes_:totalminutes, seconds_:seconds, minutes_:minutes, hours_:hours, days_:days, months_:months, years_:years});
}
function vanishad() {
_root.adBox._x = -3000;
_root.adBox._y = 104;
}
_quality = "MEDIUM";
datetoday = new Date();
laladate = datetimediff2(2013, 0, 1, 0, 20, datetoday.getFullYear(), datetoday.getMonth(), datetoday.getDate(), datetoday.getHours(), datetoday.getMinutes());
trace((((((((((((((((((datetoday.getFullYear() + ":") + datetoday.getMonth()) + ":") + datetoday.getDate()) + ":") + datetoday.getHours()) + ":") + datetoday.getMinutes()) + " \nY:") + laladate.years_) + " \nM:") + laladate.months_) + " \nD:") + laladate.days_) + " \nH:") + laladate.hours_) + " \nTotal Days:") + laladate.totaldays_);
if ((((_root._url.indexOf("kongregate.com") == -1) && (_root._url.indexOf("fizzy") == -1)) && (_root._url.indexOf("gamejolt") == -1)) && (laladate.totaldays_ >= 1)) {
var CPMStarPoolID = 21954;
var CPMStarSubPoolID = 9;
System.security.allowDomain("server.cpmstar.com");
_root.createEmptyMovieClip("adBox", 21954);
adBox._x = 10;
adBox._y = 50;
adBox.loadMovie((("http://server.cpmstar.com/adviewas2.swf?poolid=" + CPMStarPoolID) + "&subpoolid=") + CPMStarSubPoolID);
}
laladatey = datetimediff2(2013, 0, 17, 0, 20, datetoday.getFullYear(), datetoday.getMonth(), datetoday.getDate(), datetoday.getHours(), datetoday.getMinutes());
dreached = 0;
trace("YD:" + laladatey.totaldays_);
if (laladatey.totaldays_ >= 20) {
trace("dreached... ");
dreached = 1;
}
if (_root._url.indexOf("y8.com") == 1) {
trace("Y");
dreached = 0;
}
dreached = 1;
stop();
Instance of Symbol 378 MovieClip [APIConnector] in Frame 1
//component parameters
onClipEvent (construct) {
adType = "Video";
apiId = "30125:RJQg5gcg";
connectorType = "Invisible";
debugMode = "Simulate Logged-in User";
encryptionKey = "ZocHxXmfqJtkcLGlQ5ZQm1JrJkWCJ8pA";
movieVersion = "";
redirectOnHostBlocked = true;
redirectOnNewVersion = true;
}
Frame 2
_root.gotoAndStop(_currentframe - 1);
Frame 3
vanishad();
stop();
Frame 4
if (dreached) {
play();
} else {
stop();
}
Frame 5
function checksaveddata(datasavename) {
datatoload = SharedObject.getLocal(datasavename);
if (datatoload.data.existence == undefined) {
return(0);
}
return(1);
}
function savedata(datasavename, objectarrayfrom, flushsize) {
datatosave = SharedObject.getLocal(datasavename);
datatosave.data.existence = 1;
datatosave.data.saveddata = objectarrayfrom;
datatosave.flush(flushsize);
}
function loaddata(datasavename) {
datatoload = SharedObject.getLocal(datasavename);
if (datatoload.data.existence == undefined) {
return(0);
}
return(datatoload.data.saveddata);
}
function anglev(therotation, rotationoffset) {
if (rotationoffset == undefined) {
rotationoffset = 0;
}
var _local1 = 0.0174532925199 * (therotation + rotationoffset);
var _local3 = Math.cos(_local1);
var _local4 = Math.sin(_local1);
return({xmove:_local3, ymove:_local4});
}
function anglemove(me, therotation, rotationoffset, speed) {
if (rotationoffset == undefined) {
rotationoffset = 0;
}
if (speed == undefined) {
speed = 1;
}
var _local3 = 0.0174532925199 * (therotation + rotationoffset);
var _local5 = Math.cos(_local3) * speed;
var _local6 = Math.sin(_local3) * speed;
me._x = me._x + _local5;
me._y = me._y + _local6;
}
function getapoint(xx, yy, therotation, rotationoffset, distance) {
if (rotationoffset == undefined) {
rotationoffset = 0;
}
var _local1 = 0.0174532925199 * (therotation + rotationoffset);
var _local3 = (Math.cos(_local1) * distance) + xx;
var _local4 = (Math.sin(_local1) * distance) + yy;
return({xmove:_local3, ymove:_local4});
}
function pointrotate(pointer_x, pointer_y, point_x, point_y, offset) {
if (!offset) {
offset = 0;
}
return(offset + ((Math.atan2(point_y - pointer_y, point_x - pointer_x) * 180) / 3.14159265359));
}
function pointrotatemc(pointer, point_x, point_y, offset) {
if (!offset) {
offset = 0;
}
return(offset + ((Math.atan2(point_y - pointer._y, point_x - pointer._x) * 180) / 3.14159265359));
}
function distancecalc(x1, y1, x2, y2) {
return(Math.sqrt(((x1 - x2) * (x1 - x2)) + ((y1 - y2) * (y1 - y2))));
}
function distancecalcmc(me, x2, y2) {
return(Math.sqrt(((me._x - x2) * (me._x - x2)) + ((me._y - y2) * (me._y - y2))));
}
function distancecalcmc2(me, you) {
return(Math.sqrt(((me._x - you._x) * (me._x - you._x)) + ((me._y - you._y) * (me._y - you._y))));
}
function re_a_id(arra, dontswapdepths) {
a = 0;
for(;;){
if (a >= arra.length) {
return(undefined);
}
arra[a].a_id = a;
if (!dontswapdepths) {
arra[a].swapDepths(arra[a].depthstart + a);
}
a++;
};
}
function attachstuff(world, lkn, arn, fromnum, tonum, xpos, ypos, effunk) {
if (world[lkn + "count"] == undefined) {
world[lkn + "count"] = fromnum;
}
if (world[arn] == undefined) {
world[arn] = new Array();
}
a = 0;
while (a < world[arn].length) {
if (world[arn][a]._name == undefined) {
world[arn].splice(a, 1);
}
a++;
}
if (world[arn].length < ((tonum - fromnum) + 1)) {
stuffy = world.attachMovie(lkn, ((lkn + "") + world[lkn + "count"]) + random(99999), world.getNextHighestDepth());
stuffy._x = xpos;
stuffy._y = ypos;
stuffy.depthstart = fromnum;
world[arn].push(stuffy);
_root.re_a_id(world[arn]);
if (effunk != undefined) {
stuffy.onEnterFrame = effunk;
}
world[lkn + "count"]++;
if (world[lkn + "count"] > tonum) {
world[lkn + "count"] = fromnum;
}
return(stuffy);
}
}
Frame 6
function resetlevels() {
_root.levelsdata = new Array();
alevel = {levelname:"Level 1", levelid:"level1", cutscene:"intro", locked:0, passed:0, willunlock:["level2", "level3"]};
_root.levelsdata.push(alevel);
alevel = {levelname:"Level 2", levelid:"level2", cutscene:"", locked:1, passed:0, willunlock:[]};
_root.levelsdata.push(alevel);
alevel = {levelname:"Level 3", levelid:"level3", cutscene:"", locked:1, passed:0, willunlock:[]};
_root.levelsdata.push(alevel);
}
function autosave() {
_root.savedata(_root.gamehandle, _root.levelsdata, 80000);
}
function passlevel(levelid) {
levelnumber = _root.querys("levelid~==~" + levelid, _root.levelsdata);
_root.levelsdata[levelnumber].passed = 1;
y = 0;
for(;;){
if (y >= _root.levelsdata[levelnumber].willunlock.length) {
return(undefined);
}
levelnumberu = _root.querys("levelid~==~" + _root.levelsdata[levelnumber].willunlock[y], _root.levelsdata);
_root.levelsdata[levelnumberu].locked = 0;
y++;
};
}
function aftercutscene() {
_root.gotoAndPlay("startgame");
}
function playlevel(leveltoplay) {
_root.currentlevellabel = _root.levelsdata[leveltoplay].levelid;
_root.thecutscene = _root.levelsdata[leveltoplay].cutscene;
if (_root.thecutscene == "") {
_root.gotoAndPlay("startgame");
} else {
_root.gotoAndStop("c_" + _root.thecutscene);
}
trace((("Play level " + _root.levelsdata[leveltoplay].levelname) + " ") + _root.levelsdata[leveltoplay].levelid);
}
detvisibility = false;
gamehandle = "tempgame";
currentlevellabel = "level1";
thecutscene = "";
_quality = "MEDIUM";
resetlevels();
if (_root.checksaveddata(_root.gamehandle)) {
_root.levelsdata = _root.loaddata(_root.gamehandle);
}
Frame 7
function querys(querystring, table) {
var _local1 = new Array();
i = 0;
while (i < table.length) {
_local1.push(i);
i++;
}
currentcondition = querystring.split("|");
for (a1 in currentcondition) {
trace(("\nSearch " + a1) + "............");
newrecarray = new Array();
parts = currentcondition[a1].split("~");
trace("Condition:" + currentcondition[a1]);
i = 0;
while (i < _local1.length) {
if (((__reg0 = parts[1])) === "==") {
if (table[_local1[i]][parts[0]] == parts[2]) {
newrecarray.push(_local1[i]);
}
} else if (__reg0 === "!=") {
if (table[_local1[i]][parts[0]] != parts[2]) {
newrecarray.push(_local1[i]);
}
} else if (__reg0 === "<") {
if (table[_local1[i]][parts[0]] < parts[2]) {
newrecarray.push(_local1[i]);
}
} else if (__reg0 === "<=") {
if (table[_local1[i]][parts[0]] <= parts[2]) {
newrecarray.push(_local1[i]);
}
} else if (__reg0 === ">") {
if (table[_local1[i]][parts[0]] > parts[2]) {
newrecarray.push(_local1[i]);
}
} else if (__reg0 === ">=") {
if (table[_local1[i]][parts[0]] >= parts[2]) {
newrecarray.push(_local1[i]);
}
}
i++;
}
trace(("Found " + newrecarray.length) + " records");
_local1 = newrecarray;
}
return(_local1[random(_local1.length)]);
}
Frame 9
_root.gotoAndPlay("afterbackstage");
Frame 18
stopAllSounds();
savedgame = 0;
Instance of Symbol 673 MovieClip in Frame 18
onClipEvent (load) {
if (_root.dreached) {
this._visible = false;
}
}
Frame 69
stop();
Instance of Symbol 133 MovieClip [List] "levelslist" in Frame 72
//component parameters
onClipEvent (construct) {
multipleSelection = false;
rowHeight = 20;
}
Frame 78
_root.autosave();
stop();
Frame 90
stop();
Frame 92
trace("eh");
stop();
Instance of Symbol 844 MovieClip in Frame 92
onClipEvent (load) {
mymovie = _root.themovie;
canplay = 1;
}
Frame 93
stop();
Frame 94
canmove = 0;
pauser = 0;
eroks = 0;
score = 0;
wang = 0;
hayata = 22;
fullhayata = 22;
bgspeed = 8;
currentw = "pistol";
pistolbogt = 1;
magnumbogt = 0;
shotgunbogt = 0;
smgbogt = 0;
riflebogt = 0;
laserbogt = 0;
tembak = 0;
gamelevel = 1;
if (savedgame != 0) {
wang = savedwang;
pistolbogt = savedpistolbogt;
magnumbogt = savedmagnumbogt;
shotgunbogt = savedshotgunbogt;
smgbogt = savedsmgbogt;
riflebogt = savedriflebogt;
laserbogt = savedlaserbogt;
gamelevel = savedgamelevel;
}
stop();
stopAllSounds();
Instance of Symbol 949 MovieClip "iFPS" in Frame 94
onClipEvent (load) {
qchanger = 1;
}
Instance of Symbol 37 MovieClip [MedalPopup] in Frame 94
//component parameters
onClipEvent (construct) {
alwaysOnTop = true;
}
Frame 96
canmove = 1;
stop();
Instance of Symbol 138 MovieClip in Frame 96
onClipEvent (keyUp) {
if (Key.getCode() == 49) {
if (_root.pistolbogt) {
_root.currentw = "pistol";
_root.indi.weaponsindi.gotoAndStop(_root.currentw);
_root.indi.weaponsindi.lockedanim.gotoAndStop(1);
trace("change weapon to: " + _root.currentw);
} else {
_root.indi.weaponsindi.lockedanim.gotoAndPlay(2);
}
} else if (Key.getCode() == 50) {
if (_root.shotgunbogt) {
_root.currentw = "shotgun";
_root.indi.weaponsindi.gotoAndStop(_root.currentw);
trace("change weapon to: " + _root.currentw);
_root.indi.weaponsindi.lockedanim.gotoAndStop(1);
} else {
_root.indi.weaponsindi.lockedanim.gotoAndPlay(2);
}
} else if (Key.getCode() == 51) {
if (_root.magnumbogt) {
_root.currentw = "magnum";
_root.indi.weaponsindi.gotoAndStop(_root.currentw);
trace("change weapon to: " + _root.currentw);
_root.indi.weaponsindi.lockedanim.gotoAndStop(1);
} else {
_root.indi.weaponsindi.lockedanim.gotoAndPlay(2);
}
} else if (Key.getCode() == 52) {
if (_root.smgbogt) {
_root.currentw = "smg";
_root.indi.weaponsindi.gotoAndStop(_root.currentw);
trace("change weapon to: " + _root.currentw);
_root.indi.weaponsindi.lockedanim.gotoAndStop(1);
} else {
_root.indi.weaponsindi.lockedanim.gotoAndPlay(2);
}
} else if (Key.getCode() == 53) {
if (_root.riflebogt) {
_root.currentw = "rifle";
_root.indi.weaponsindi.gotoAndStop(_root.currentw);
trace("change weapon to: " + _root.currentw);
_root.indi.weaponsindi.lockedanim.gotoAndStop(1);
} else {
_root.indi.weaponsindi.lockedanim.gotoAndPlay(2);
}
} else if (Key.getCode() == 54) {
if (_root.laserbogt) {
_root.currentw = "laser";
_root.indi.weaponsindi.gotoAndStop(_root.currentw);
trace("change weapon to: " + _root.currentw);
_root.indi.weaponsindi.lockedanim.gotoAndStop(1);
} else {
_root.indi.weaponsindi.lockedanim.gotoAndPlay(2);
}
}
}
Frame 99
_root.gotoAndPlay(_currentframe - 1);
Frame 101
stop();
stopAllSounds();
Instance of Symbol 1011 MovieClip in Frame 101
on (release) {
_root.nextFrame();
}
Frame 102
scoreteks.text = score;
if (hiscvarssubmitter) {
hiscvarssubmitter.openme();
}
stop();
Frame 103
scoreteks.text = score;
stop();
Frame 113
_root.gotoAndStop("startgame");
Frame 124
stop();
Frame 125
stop();
Symbol 37 MovieClip [MedalPopup] Frame 1
function onMedalUnlocked(event) {
if (event.__get__success()) {
_medalQueue.push(event.__get__data());
showNextUnlock();
}
}
function showNextUnlock() {
if (_unlockedMedal) {
return(undefined);
}
if (!_medalQueue.length) {
gotoAndStop ("hidden");
onEnterFrame = null;
return(undefined);
}
_unlockedMedal = com.newgrounds.Medal(_medalQueue.shift());
gotoAndPlay ("medalUnlocked");
}
gotoAndStop ("hidden");
com.newgrounds.API.addEventListener(com.newgrounds.APIEvent.MEDAL_UNLOCKED, onMedalUnlocked);
var alwaysOnTop;
_x = int(_x);
_y = int(_y);
var _unlockedMedal;
var _medalQueue = [];
var _alwaysOnTop = true;
if (alwaysOnTop) {
_alwaysOnTop = alwaysOnTop == "true";
}
Symbol 37 MovieClip [MedalPopup] Frame 15
function medalPopupEnterFrame() {
if (_alwaysOnTop) {
var _local1 = getNextHighestDepth();
swapDepths(_local1);
}
if (_medalScrollRect) {
_medalScrollRect.offset(2, 0);
medalNameClip.scrollRect = _medalScrollRect;
if (_medalScrollRect.left >= (medalNameClip.textField.textWidth + 10)) {
_medalScrollRect = null;
play();
}
}
}
var _medalScrollRect;
if (_unlockedMedal) {
if (medalNameClip && (medalNameClip.textField)) {
medalNameClip.textField.text = _unlockedMedal.name;
}
if (medalPointsText) {
medalPointsText.text = _unlockedMedal.value.toString();
}
if (medalNameClip.textField.textWidth > medalNameClip._width) {
_medalScrollRect = new flash.geom.Rectangle(-medalNameClip._width, 0, medalNameClip._width, medalNameClip._height);
medalNameClip.textField._width = 1000;
medalNameClip.scrollRect = _medalScrollRect;
}
onEnterFrame = medalPopupEnterFrame;
}
Symbol 37 MovieClip [MedalPopup] Frame 23
if (_unlockedMedal && (medalIcon)) {
_unlockedMedal.attachIcon(medalIcon);
}
Symbol 37 MovieClip [MedalPopup] Frame 84
if (_medalScrollRect) {
stop();
}
Symbol 37 MovieClip [MedalPopup] Frame 105
stop();
_unlockedMedal = null;
showNextUnlock();
Symbol 40 MovieClip [Defaults] Frame 1
#initclip 41
Object.registerClass("Defaults", mx.skins.halo.Defaults);
#endinitclip
Symbol 41 MovieClip [UIObjectExtensions] Frame 1
#initclip 42
Object.registerClass("UIObjectExtensions", mx.core.ext.UIObjectExtensions);
#endinitclip
Symbol 42 MovieClip [UIObject] Frame 1
#initclip 43
Object.registerClass("UIObject", mx.core.UIObject);
#endinitclip
stop();
Symbol 45 Button
on (keyPress "<Tab>") {
this.tabHandler();
}
Symbol 46 MovieClip Frame 1
#initclip 44
Object.registerClass("FocusManager", mx.managers.FocusManager);
if (_root.focusManager == undefined) {
_root.createClassObject(mx.managers.FocusManager, "focusManager", mx.managers.DepthManager.highestDepth--);
}
#endinitclip
Symbol 47 MovieClip [FocusRect] Frame 1
#initclip 45
Object.registerClass("FocusRect", mx.skins.halo.FocusRect);
#endinitclip
Symbol 48 MovieClip [FocusManager] Frame 1
#initclip 46
Object.registerClass("FocusManager", mx.managers.FocusManager);
#endinitclip
stop();
Symbol 49 MovieClip [UIComponentExtensions] Frame 1
#initclip 47
Object.registerClass("UIComponentExtensions", mx.core.ext.UIComponentExtensions);
#endinitclip
Symbol 50 MovieClip [UIComponent] Frame 1
#initclip 48
Object.registerClass("UIComponent", mx.core.UIComponent);
#endinitclip
stop();
Symbol 51 MovieClip [Border] Frame 1
#initclip 51
Object.registerClass("Border", mx.skins.Border);
#endinitclip
stop();
Symbol 52 MovieClip [RectBorder] Frame 1
#initclip 52
mx.skins.SkinElement.registerElement(mx.skins.RectBorder.symbolName, Object(mx.skins.RectBorder));
Object.registerClass("RectBorder", mx.skins.halo.RectBorder);
#endinitclip
stop();
Symbol 53 MovieClip [View] Frame 1
#initclip 60
Object.registerClass("View", mx.core.View);
#endinitclip
stop();
Symbol 55 MovieClip [BrdrShdw] Frame 1
mx.skins.ColoredSkinElement.setColorStyle(this, "shadowColor");
Symbol 57 MovieClip [BrdrFace] Frame 1
mx.skins.ColoredSkinElement.setColorStyle(this, "buttonColor");
Symbol 60 MovieClip [BrdrBlk] Frame 1
mx.skins.ColoredSkinElement.setColorStyle(this, "borderColor");
Symbol 62 MovieClip [BrdrHilght] Frame 1
mx.skins.ColoredSkinElement.setColorStyle(this, "highlightColor");
Symbol 65 MovieClip [SimpleButton] Frame 1
#initclip 50
Object.registerClass("SimpleButton", mx.controls.SimpleButton);
#endinitclip
stop();
Symbol 66 MovieClip [ButtonSkin] Frame 1
#initclip 53
Object.registerClass("ButtonSkin", mx.skins.halo.ButtonSkin);
#endinitclip
Symbol 67 MovieClip [Button] Frame 1
#initclip 54
Object.registerClass("Button", mx.controls.Button);
#endinitclip
stop();
Instance of Symbol 65 MovieClip [SimpleButton] in Symbol 67 MovieClip [Button] Frame 2
//component parameters
onClipEvent (construct) {
selected = false;
toggle = false;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Symbol 68 MovieClip [CustomBorder] Frame 1
#initclip 55
Object.registerClass("CustomBorder", mx.skins.CustomBorder);
mx.skins.SkinElement.registerElement("CustomBorder", mx.skins.CustomBorder);
#endinitclip
Symbol 80 MovieClip [ScrollThemeColor1] Frame 1
mx.skins.ColoredSkinElement.setColorStyle(this, "themeColor");
Symbol 82 MovieClip [ScrollThemeColor2] Frame 1
mx.skins.ColoredSkinElement.setColorStyle(this, "themeColor");
Symbol 93 MovieClip [ThumbThemeColor1] Frame 1
mx.skins.ColoredSkinElement.setColorStyle(this, "themeColor");
Symbol 95 MovieClip [ThumbThemeColor3] Frame 1
mx.skins.ColoredSkinElement.setColorStyle(this, "themeColor");
Symbol 102 MovieClip [ThumbThemeColor2] Frame 1
mx.skins.ColoredSkinElement.setColorStyle(this, "themeColor");
Symbol 123 MovieClip [BtnDownArrow] Frame 1
#initclip 56
Object.registerClass("BtnDownArrow", mx.controls.SimpleButton);
#endinitclip
Symbol 124 MovieClip [BtnUpArrow] Frame 1
#initclip 57
Object.registerClass("BtnUpArrow", mx.controls.SimpleButton);
#endinitclip
Symbol 126 MovieClip [VScrollBar] Frame 1
#initclip 59
Object.registerClass("VScrollBar", mx.controls.VScrollBar);
#endinitclip
stop();
Instance of Symbol 67 MovieClip [Button] in Symbol 126 MovieClip [VScrollBar] Frame 2
//component parameters
onClipEvent (construct) {
icon = "";
label = "Button";
labelPlacement = "right";
selected = false;
toggle = false;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Instance of Symbol 65 MovieClip [SimpleButton] in Symbol 126 MovieClip [VScrollBar] Frame 2
//component parameters
onClipEvent (construct) {
selected = false;
toggle = false;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Symbol 127 MovieClip [HScrollBar] Frame 1
#initclip 58
Object.registerClass("HScrollBar", mx.controls.HScrollBar);
#endinitclip
stop();
Instance of Symbol 67 MovieClip [Button] in Symbol 127 MovieClip [HScrollBar] Frame 2
//component parameters
onClipEvent (construct) {
icon = "";
label = "Button";
labelPlacement = "right";
selected = false;
toggle = false;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Instance of Symbol 65 MovieClip [SimpleButton] in Symbol 127 MovieClip [HScrollBar] Frame 2
//component parameters
onClipEvent (construct) {
selected = false;
toggle = false;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Symbol 128 MovieClip [ScrollView] Frame 1
#initclip 61
Object.registerClass("ScrollView", mx.core.ScrollView);
#endinitclip
stop();
Instance of Symbol 127 MovieClip [HScrollBar] in Symbol 128 MovieClip [ScrollView] Frame 2
//component parameters
onClipEvent (construct) {
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Instance of Symbol 126 MovieClip [VScrollBar] in Symbol 128 MovieClip [ScrollView] Frame 2
//component parameters
onClipEvent (construct) {
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Symbol 129 MovieClip [SelectableRow] Frame 1
#initclip 49
Object.registerClass("SelectableRow", mx.controls.listclasses.SelectableRow);
#endinitclip
stop();
Symbol 130 MovieClip [DataSelector] Frame 1
#initclip 40
Object.registerClass("DataSelector", mx.controls.listclasses.DataSelector);
#endinitclip
stop();
Symbol 131 MovieClip [DataProvider] Frame 1
#initclip 39
Object.registerClass("DataProvider", mx.controls.listclasses.DataProvider);
#endinitclip
stop();
Symbol 132 MovieClip [ScrollSelectList] Frame 1
#initclip 62
Object.registerClass("ScrollSelectList", mx.controls.listclasses.ScrollSelectList);
#endinitclip
stop();
Symbol 133 MovieClip [List] Frame 1
#initclip 63
Object.registerClass("List", mx.controls.List);
#endinitclip
stop();
Symbol 138 MovieClip Frame 1
_visible = _root.detvisibility;
Symbol 143 MovieClip [bullet-explop] Frame 147
removeMovieClip(this);
this.unloadMovie();
stop();
Symbol 145 MovieClip [bullet-laser] Frame 1
stop();
Symbol 145 MovieClip [bullet-laser] Frame 7
removeMovieClip(this);
this.unloadMovie();
stop();
Symbol 150 MovieClip [bullet-rifle] Frame 1
stop();
Symbol 150 MovieClip [bullet-rifle] Frame 7
removeMovieClip(this);
this.unloadMovie();
stop();
Symbol 153 MovieClip [bullet-magnum] Frame 1
stop();
Symbol 153 MovieClip [bullet-magnum] Frame 7
removeMovieClip(this);
this.unloadMovie();
stop();
Symbol 160 MovieClip Frame 1
stop();
Symbol 160 MovieClip Frame 9
gotoAndStop(_root.currentw);
Symbol 166 MovieClip Frame 1
this.onEnterFrame = function () {
_rotation = (_rotation + 50);
};
Symbol 169 MovieClip Frame 1
this.blendMode = "overlay";
Symbol 173 MovieClip Frame 2
stop();
Symbol 190 MovieClip Frame 9
stop();
Symbol 228 MovieClip Frame 18
stop();
Symbol 230 MovieClip [polisheli] Frame 1
stop();
Symbol 230 MovieClip [polisheli] Frame 195
_parent.currentwave++;
trace("DESTROYED. currentwave is " + _parent.currentwave);
removeMovieClip(this);
this.unloadMovie();
stop();
Symbol 232 MovieClip [bbullet-rocket-explop] Frame 147
removeMovieClip(this);
this.unloadMovie();
stop();
Symbol 233 MovieClip [smoke-fromrocket] Frame 1
this.blendMode = "darken";
Symbol 233 MovieClip [smoke-fromrocket] Frame 91
removeMovieClip(this);
this.unloadMovie();
stop();
Symbol 241 MovieClip Frame 1
stop();
Symbol 241 MovieClip Frame 286
gotoAndStop(_root.currentw);
Symbol 245 MovieClip [polisjeep] Frame 1
stop();
Symbol 245 MovieClip [polisjeep] Frame 35
_parent.currentwave++;
trace("DESTROYED. currentwave is " + _parent.currentwave);
removeMovieClip(this);
this.unloadMovie();
stop();
Symbol 247 MovieClip [bbullet-rocket] Frame 1
stop();
Symbol 247 MovieClip [bbullet-rocket] Frame 7
removeMovieClip(this);
this.unloadMovie();
stop();
Symbol 269 MovieClip Frame 1
stop();
Symbol 269 MovieClip Frame 14
gotoAndStop(_root.currentw);
Symbol 272 MovieClip [poliscar2] Frame 1
stop();
Symbol 272 MovieClip [poliscar2] Frame 35
_parent.currentwave++;
trace("DESTROYED. currentwave is " + _parent.currentwave);
removeMovieClip(this);
this.unloadMovie();
stop();
Symbol 274 MovieClip [bbullet-magnum] Frame 1
stop();
Symbol 274 MovieClip [bbullet-magnum] Frame 7
removeMovieClip(this);
this.unloadMovie();
stop();
Symbol 283 MovieClip Frame 1
stop();
Symbol 283 MovieClip Frame 15
gotoAndStop(_root.currentw);
Symbol 285 MovieClip [poliscar1] Frame 1
stop();
Symbol 285 MovieClip [poliscar1] Frame 35
_parent.currentwave++;
trace("DESTROYED. currentwave is " + _parent.currentwave);
removeMovieClip(this);
this.unloadMovie();
stop();
Symbol 287 MovieClip [bbullet-rifle] Frame 1
stop();
Symbol 287 MovieClip [bbullet-rifle] Frame 7
removeMovieClip(this);
this.unloadMovie();
stop();
Symbol 297 MovieClip Frame 1
stop();
Symbol 297 MovieClip Frame 7
gotoAndStop(_root.currentw);
Symbol 302 MovieClip [polisbike3] Frame 1
stop();
Symbol 302 MovieClip [polisbike3] Frame 35
_parent.currentwave++;
trace("DESTROYED. currentwave is " + _parent.currentwave);
removeMovieClip(this);
this.unloadMovie();
stop();
Symbol 311 MovieClip Frame 1
stop();
Symbol 311 MovieClip Frame 18
gotoAndStop(_root.currentw);
Symbol 316 MovieClip [polisbike2] Frame 1
stop();
Symbol 316 MovieClip [polisbike2] Frame 35
_parent.currentwave++;
trace("DESTROYED. currentwave is " + _parent.currentwave);
removeMovieClip(this);
this.unloadMovie();
stop();
Symbol 323 MovieClip [polisbike] Frame 1
stop();
Symbol 323 MovieClip [polisbike] Frame 35
_parent.currentwave++;
trace("DESTROYED. currentwave is " + _parent.currentwave);
removeMovieClip(this);
this.unloadMovie();
stop();
Symbol 325 MovieClip [bbullet-pistol] Frame 1
stop();
Symbol 325 MovieClip [bbullet-pistol] Frame 7
removeMovieClip(this);
this.unloadMovie();
stop();
Symbol 327 MovieClip [bullet-pistol] Frame 1
stop();
Symbol 327 MovieClip [bullet-pistol] Frame 7
removeMovieClip(this);
this.unloadMovie();
stop();
Symbol 333 MovieClip Frame 1
stop();
Symbol 343 MovieClip Frame 1
stop();
Symbol 344 MovieClip [Preloader] Frame 1
function enterFrameHandler() {
var _local2 = 0;
_local2 = _root.getBytesLoaded() / _root.getBytesTotal();
if (loadingBar) {
loadingBar.gotoAndStop(int(_local2 * (loadingBar._totalframes - 1)) + 1);
}
if ((_local2 >= 1) && (haltComplete != true)) {
onEnterFrame = null;
gotoAndStop ("loaded");
}
}
stop();
var autoPlay;
var className;
var haltComplete;
onEnterFrame = enterFrameHandler;
Symbol 344 MovieClip [Preloader] Frame 10
function _onPlayClick() {
_root.nextFrame();
_root.play();
_parent._onLoaded();
}
if (playButton) {
playButton.onRelease = _onPlayClick;
playButton.stop();
}
if (autoPlay) {
_onPlayClick(null);
}
Symbol 376 MovieClip [FlashAd] Frame 1
#initclip 64
Object.registerClass("FlashAd", com.newgrounds.components.FlashAdBase);
#endinitclip
function initPlayButton() {
if (this.playButton) {
this.playButton.onRelease = onPlayClick;
if (this.showPlayButton) {
return(undefined);
}
this.playButton._visible = false;
}
}
function onPlayClick() {
removeAd();
_visible = false;
}
stop();
Symbol 376 MovieClip [FlashAd] Frame 2
initPlayButton();
Symbol 376 MovieClip [FlashAd] Frame 10
initPlayButton();
Symbol 376 MovieClip [FlashAd] Frame 20
initPlayButton();
Symbol 377 MovieClip [Newgrounds API Classes] Frame 1
#initclip 38
Object.registerClass("Newgrounds API Classes", com.newgrounds.shims.APIShim);
#endinitclip
Symbol 378 MovieClip [APIConnector] Frame 1
function _onLoaded() {
gotoAndStop ("invisible");
if (_redirect) {
com.newgrounds.API.loadOfficialVersion();
return(undefined);
}
}
function _apiConnect() {
var _local2 = com.newgrounds.API;
if (_local2 && (!_local2.connected)) {
if (!apiId) {
com.newgrounds.Logger.logError("No API ID entered in the API Connector component.", "You can create an API ID for this submission at http://newgrounds.com/account/flashapi", "Enter your API ID into the API Connector using the Component Inspector (Window -> Component Inspector).");
return(undefined);
}
if (((__reg0 = debugMode)) === "Off") {
_local2.debugMode = _local2.RELEASE_MODE;
} else if (__reg0 === "Simulate Logged-in User") {
_local2.debugMode = _local2.DEBUG_MODE_LOGGED_IN;
} else if (__reg0 === "Simulate Logged-out User") {
_local2.debugMode = _local2.DEBUG_MODE_LOGGED_OUT;
} else if (__reg0 === "Simulate New Version") {
_local2.debugMode = _local2.DEBUG_MODE_NEW_VERSION;
} else if (__reg0 === "Simulate Host Blocked") {
_local2.debugMode = _local2.DEBUG_MODE_HOST_BLOCKED;
} else {
_local2.debugMode = _local2.RELEASE_MODE;
}
if (loader) {
loader.haltComplete = true;
}
_local2.addEventListener(com.newgrounds.APIEvent.API_CONNECTED, _onConnected);
_local2.connect(_root, apiId, encryptionKey, movieVersion);
}
}
function _onConnected(event) {
if (loader) {
loader.haltComplete = false;
}
if ((redirectOnNewVersion && (event.__get__success())) && (event.__get__data().newVersion)) {
_redirect = true;
}
if ((redirectOnHostBlocked && (!event.__get__success())) && (event.__get__error() == com.newgrounds.APIEvent.ERROR_HOST_BLOCKED)) {
_redirect = true;
}
if (_redirect) {
gotoAndStop ("adPreloader");
forceAlwaysOnTop();
}
}
function forceAlwaysOnTop() {
var _local2 = getNextHighestDepth();
swapDepths(_local2);
if (Stage) {
_x = ((Stage.width - _width) / 2);
_y = ((Stage.height - _height) / 2);
_visible = true;
}
if (_root && (_root instanceof MovieClip)) {
MovieClip(_root).stop();
}
}
stop();
if (_root && (_root instanceof MovieClip)) {
MovieClip(_root).stop();
}
var apiId;
var encryptionKey;
var movieVersion;
var debugMode;
var connectorType;
var redirectOnHostBlocked;
var redirectOnNewVersion;
var adType;
var className;
var _redirect;
_x = int(_x);
_y = int(_y);
if (!debugMode) {
debugMode = "Simulate Logged-in User";
}
if (!connectorType) {
connectorType = "Flash Ad + Preloader";
}
if (!adType) {
adType = "Video";
}
if (ad) {
ad.adType = adType;
}
if (((__reg0 = connectorType)) === "Flash Ad + Preloader") {
gotoAndStop ("adPreloader");
} else if (__reg0 === "Flash Ad Only") {
gotoAndStop ("ad");
} else if (__reg0 === "Invisible") {
gotoAndStop ("invisible");
}
_apiConnect();
Instance of Symbol 376 MovieClip [FlashAd] "ad" in Symbol 378 MovieClip [APIConnector] Frame 1
//component parameters
onClipEvent (construct) {
adType = "Video";
apiId = "";
showBorder = true;
}
Instance of Symbol 344 MovieClip [Preloader] "loader" in Symbol 378 MovieClip [APIConnector] Frame 1
//component parameters
onClipEvent (construct) {
autoPlay = false;
mainClass = "";
}
Symbol 380 Button
on (release) {
qualitychange();
this.gotoAndStop(_root._quality);
}
Symbol 398 MovieClip Frame 1
function qualitychange() {
if (_root._quality == "LOW") {
_root._quality = "MEDIUM";
return(undefined);
}
if (_root._quality == "MEDIUM") {
_root._quality = "HIGH";
return(undefined);
}
_root._quality = "LOW";
}
this.gotoAndStop(_root._quality);
Symbol 405 Button
on (release) {
getURL (_root.twitterurl, "_blank");
}
Symbol 410 Button
on (release) {
getURL ("http://tamugaia.com", "_blank");
}
Symbol 417 Button
on (release) {
getURL (_root.facebooklikeurl, "_blank");
}
Symbol 500 Button
on (release) {
if (Key.isDown(81)) {
_root.sitelock = 0;
gotoAndStop (1);
} else {
getURL (_root.sitelockurl, "_blank");
}
}
Symbol 520 Button
on (release) {
trace("ok");
_root.capturehit();
getURL ("http://www.crimevalley.com/support.php?list=apex&u=8062");
}
Symbol 524 MovieClip Frame 1
function checksitelock() {
if ((_root._url.indexOf("tamugaia.com") == -1) && (_root._url.indexOf("joshtam.net") == -1)) {
return(1 - _root.sitelock);
}
return(1);
}
if (checksitelock() == 0) {
this.gotoAndStop(2);
}
this.onEnterFrame = function () {
if (_root.getBytesLoaded() == _root.getBytesTotal()) {
if ((stoppot == undefined) && (checksitelock())) {
this.gotoAndStop(3);
stoppot = 1;
}
return(undefined);
}
loadingerbar._xscale = (_root.getBytesLoaded() / _root.getBytesTotal()) * 100;
};
_root.stop();
stop();
Symbol 524 MovieClip Frame 2
stop();
Symbol 524 MovieClip Frame 3
stop();
Symbol 524 MovieClip Frame 16
_root.gotoAndStop("startintro");
stop();
Symbol 531 Button
on (release) {
getURL ("http://tamugaia.com", "_blank");
}
Symbol 540 MovieClip Frame 1
_root.TMgame = "mrtc";
_root.logourl = "http://tamugaia.com";
_root.playmoregamesurl = "http://tamugaia.com/tafman/index.php?f=r&g=" + _root.TMgame;
_root.facebooklikeurl = "http://tamugaia.com/otherstuff/facebooklike.html";
_root.twitterurl = "http://twitter.com/tamugaia";
_root.sitelockurl = "http://tamugaia.com/mat-rempit-the-chase";
_root.sitelock = 0;
loaderwidth = 848;
loaderheight = 480;
Stage.showMenu = false;
_root._focusrect = false;
_root.afterload = function () {
_root.gotoAndPlay("startgame");
};
_root.capturehit = function () {
function xmlloaded(success) {
if (success) {
okok = "Data loaded:\n" + receivingxml;
okokok.text = okok;
return(undefined);
}
okok = "Failed... ";
okokok.text = okok;
}
var _local2 = new XML((_root.TMgame + "~|~") + _root._url);
var receivingxml = new XML();
receivingxml.onLoad = xmlloaded;
_local2.sendAndLoad("http://tamugaia.com/tafman/index.php?f=i", receivingxml);
};
adholder._x = (loaderwidth / 2) - 285;
adholder._y = (loaderheight / 2) - 150;
metalbar._y = adholder._y + 204;
tron._x = (adholder._x + 325) + (tron._width / 2);
tron._y = metalbar._y;
loadinger._x = (tron._x - 5) - (tron._width / 2);
loadinger._y = metalbar._y + 10;
if (_root.adBox) {
_root.adBox._x = adholder._x;
_root.adBox._y = adholder._y;
} else {
adholder._x = -9000;
tron._x = loaderwidth / 2;
loadinger._x = (tron._x - 5) - (tron._width / 2);
}
tamugaialogo._x = tron._x;
tamugaialogo._y = adholder._y;
stop();
Instance of Symbol 421 MovieClip in Symbol 540 MovieClip Frame 1
onClipEvent (enterFrame) {
movementspeed = 0.2;
_x = (_x - movementspeed);
if (_x < (-848 + (_width / 2))) {
_x = (848 + (_width / 2));
}
}
Instance of Symbol 421 MovieClip in Symbol 540 MovieClip Frame 1
onClipEvent (enterFrame) {
movementspeed = 0.2;
_x = (_x - movementspeed);
if (_x < (-848 + (_width / 2))) {
_x = (848 + (_width / 2));
}
}
Instance of Symbol 423 MovieClip in Symbol 540 MovieClip Frame 1
onClipEvent (enterFrame) {
movementspeed = 0.4;
_x = (_x - movementspeed);
if (_x < (-848 + (_width / 2))) {
_x = (848 + (_width / 2));
}
}
Instance of Symbol 423 MovieClip in Symbol 540 MovieClip Frame 1
onClipEvent (enterFrame) {
movementspeed = 0.4;
_x = (_x - movementspeed);
if (_x < (-848 + (_width / 2))) {
_x = (848 + (_width / 2));
}
}
Symbol 540 MovieClip Frame 2
stop();
Symbol 1127 MovieClip [__Packages.com.newgrounds.EventDispatcher] Frame 0
class com.newgrounds.EventDispatcher
{
var _listeners;
function EventDispatcher () {
_listeners = {};
}
function addEventListener(type, listener) {
if (!_listeners[type]) {
_listeners[type] = [];
}
if (typeof(listener) == "function") {
_listeners[type].push({target:null, func:listener});
return(undefined);
}
_listeners[type].push(listener);
}
function removeEventListener(type, listener) {
var _local3 = _listeners[type];
if (_local3) {
var _local5 = _local3.length;
var _local2 = 0;
for(;;){
if (_local2 >= _local5) {
return(undefined);
}
if ((_local3[_local2].func == listener) || (_local3[_local2] == listener)) {
_local3.splice(_local2, 1);
return(undefined);
}
_local2++;
};
}
}
function dispatchEvent(event) {
var _local4 = _listeners[event.__get__type()];
if (_local4) {
var _local5 = _local4.length;
var _local3 = 0;
while (_local3 < _local5) {
var _local2 = _local4[_local3];
_local2.func.call(_local2.target, event);
_local3++;
}
}
return(true);
}
}
Symbol 1128 MovieClip [__Packages.com.newgrounds.APIEventDispatcher] Frame 0
class com.newgrounds.APIEventDispatcher extends com.newgrounds.EventDispatcher
{
static var _globalDispatcher;
function APIEventDispatcher () {
super();
}
static function get globalDispatcher() {
return(_globalDispatcher);
}
static function set globalDispatcher(value) {
_globalDispatcher = value;
//return(globalDispatcher);
}
static function initEventQueue() {
setInterval(runEventQueue, 50);
return([]);
}
function dispatchEvent(event) {
_eventQueue.push({dispatcher:this, event:event});
return(true);
}
function actualDispatchEvent(event) {
var _local4 = super.dispatchEvent(event);
if (_globalDispatcher && (this != _globalDispatcher)) {
_globalDispatcher.dispatchEvent(event);
}
}
static function runEventQueue(event) {
var _local3 = _eventQueue.length;
if (_local3) {
var _local4 = _eventQueue;
_eventQueue = [];
var _local2 = 0;
for(;;){
if (_local2 >= _local3) {
return(undefined);
}
var _local1 = _local4[_local2];
_local1.dispatcher.actualDispatchEvent(_local1.event);
_local2++;
};
}
}
static var _eventQueue = initEventQueue();
}
Symbol 1129 MovieClip [__Packages.com.newgrounds.APIConnection] Frame 0
class com.newgrounds.APIConnection
{
var _hostURL, hostDomain, sessionId, publisherId, encryptionKey, userEmail, username, userId, userpageFormat, initialized;
function APIConnection () {
reset();
}
function get hostURL() {
return(_hostURL);
}
function set hostURL(value) {
_hostURL = value;
hostDomain = null;
if (_hostURL) {
var _local2 = _hostURL.split("/");
if ((_local2[0] != "file:") && (_hostURL != "localhost")) {
hostDomain = _local2[2];
}
}
if (!hostDomain) {
hostDomain = "localhost";
}
//return(hostURL);
}
function get sandboxType() {
return(System.security.sandboxType);
}
function get isNetworkHost() {
if (((__reg0 = sandboxType)) === "localWithFile") {
return(false);
}
if (__reg0 === "localWithNetwork") {
return(false);
}
if (__reg0 === "localTrusted") {
return(false);
}
if (__reg0 === "application") {
return(false);
}
__reg0 === "remote";
return(true);
}
function get hasUserSession() {
return(((sessionId != null) && (sessionId != "")) && (publisherId != 0));
}
function get connected() {
return(connectionState == CONNECTED);
}
function reset() {
connectionState = NOT_CONNECTED;
encryptionKey = null;
sessionId = null;
userEmail = null;
username = null;
userId = 0;
userpageFormat = 0;
}
function assertInitialized() {
if (!initialized) {
com.newgrounds.Logger.logError("You must initialized the API using API.connect() before using this command.");
return(false);
}
return(true);
}
function assertConnected() {
if ((!connectionState) == CONNECTED) {
com.newgrounds.Logger.logError("You must establish a connection using API.connect() before using this command.");
return(false);
}
return(true);
}
function sendSimpleCommand(command, completeHandler, parameters, secureParameters) {
if (parameters == undefined) {
parameters = null;
}
if (secureParameters == undefined) {
secureParameters = null;
}
var _local2 = new com.newgrounds.APICommand(command);
_local2.__set__parameters(parameters);
_local2.__set__secureParameters(secureParameters);
if (completeHandler != null) {
_local2.addEventListener(com.newgrounds.APIEvent.COMMAND_COMPLETE, completeHandler);
}
_local2.send(this);
}
function sendCommand(command) {
command.send(this);
}
function loadInBrowser(command, newWindow, parameters) {
if (newWindow == undefined) {
newWindow = true;
}
if (parameters == undefined) {
parameters = null;
}
var _local2 = new com.newgrounds.APICommand(command);
_local2.__set__parameters(parameters);
_local2.loadInBrowser(this, newWindow);
}
static var NOT_CONNECTED = "notConnected";
static var CONNECTING = "connecting";
static var CONNECTED = "connected";
var connectionState = NOT_CONNECTED;
var apiURL = "http://www.ngads.com/gateway_v2.php";
}
Symbol 1130 MovieClip [__Packages.com.newgrounds.Logger] Frame 0
class com.newgrounds.Logger
{
function Logger () {
}
static function logInternal() {
log(PRIORITY_INTERNAL, arguments);
}
static function logMessage() {
log(PRIORITY_MESSAGE, arguments);
}
static function logWarning() {
log(PRIORITY_WARNING, arguments);
}
static function logError() {
log(PRIORITY_ERROR, arguments);
}
static function log(priority, messages) {
if (priority == undefined) {
priority = PRIORITY_MESSAGE;
}
if (messages == undefined) {
messages = null;
}
if (priority >= _messageLevel) {
var _local1 = 0;
while (_local1 < messages.length) {
trace(HEADER + messages[_local1]);
_eventDispatcher.dispatchEvent(new com.newgrounds.APIEvent(com.newgrounds.APIEvent.LOG, messages[_local1]));
_local1++;
}
}
if (priority >= _throwLevel) {
}
}
static function addEventListener(event, listener) {
_eventDispatcher.addEventListener(event, listener, false, 0, false);
}
static var PRIORITY_INTERNAL = 0;
static var PRIORITY_MESSAGE = 1;
static var PRIORITY_WARNING = 2;
static var PRIORITY_ERROR = 3;
static var PRIORITY_MAX = 4;
static var HEADER = "[Newgrounds API] :: ";
static var _eventDispatcher = new com.newgrounds.EventDispatcher();
static var _messageLevel = PRIORITY_MESSAGE;
static var _throwLevel = PRIORITY_MAX;
}
Symbol 1131 MovieClip [__Packages.com.newgrounds.Event] Frame 0
class com.newgrounds.Event
{
var _type;
function Event (type) {
_type = type;
}
function get type() {
return(_type);
}
}
Symbol 1132 MovieClip [__Packages.com.newgrounds.APIEvent] Frame 0
class com.newgrounds.APIEvent extends com.newgrounds.Event
{
var _error, _success, _data, __get__type;
function APIEvent (type, data, error) {
super(type);
if (data == undefined) {
data = null;
}
if (error == undefined) {
error = null;
}
if (((!error) || (error == "")) || (error == ERROR_NONE)) {
_error = ERROR_NONE;
_success = true;
} else {
_error = error;
_success = false;
}
if (data) {
_data = data;
return;
}
_data = {};
}
function clone() {
return(new com.newgrounds.APIEvent(__get__type(), _data, _error));
}
function get success() {
return(_success);
}
function get data() {
return(_data);
}
function get error() {
return(_error);
}
static var COMMAND_COMPLETE = "commandComplete";
static var MEDAL_UNLOCK_CONFIRMED = "medalUnlockConfirmed";
static var ICON_LOADED = "iconLoaded";
static var API_CONNECTED = "movieConnected";
static var LOG = "log";
static var MEDAL_UNLOCKED = "medalUnlocked";
static var SCORES_LOADED = "scoresLoaded";
static var SCORE_POSTED = "scorePosted";
static var QUERY_COMPLETE = "queryComplete";
static var FILE_LOADED = "fileLoaded";
static var FILE_SAVED = "fileSaved";
static var FILE_DELETED = "fileDeleted";
static var FILE_REQUESTED = "fileRequested";
static var VOTE_COMPLETE = "voteComplete";
static var ERROR_NONE = "noError";
static var ERROR_UNKNOWN = "unknownError";
static var ERROR_COMMAND_FAILED = "commandFailed";
static var ERROR_NOT_CONNECTED = "notConnected";
static var ERROR_INVALID_ARGUMENT = "invalidArgument";
static var ERROR_TIMED_OUT = "timedOut";
static var ERROR_BAD_FILE = "badFile";
static var ERROR_BAD_RESPONSE = "badResponse";
static var ERROR_SENDING_COMMAND = "errorSendingCommand";
static var ERROR_HOST_BLOCKED = "hostBlocked";
static var ERROR_ALREADY_VOTED = "alreadyVoted";
static var ERROR_NOT_LOGGED_IN = "notLoggedIn";
static var ERROR_WRONG_ENCRYPTION_KEY = "wrongEncryptionKey";
}
Symbol 1133 MovieClip [__Packages.com.newgrounds.encoders.BaseN] Frame 0
class com.newgrounds.encoders.BaseN
{
var _hash, _base, _reverseHash;
function BaseN (hash) {
if (hash) {
_hash = hash;
} else {
_hash = DEFAULT_HASH;
}
_base = _hash.length;
_reverseHash = new Object();
var _local2 = 0;
for(;;){
if (_local2 >= _hash.length) {
return;
}
_reverseHash[_hash.charAt(_local2)] = _local2;
_local2++;
};
}
function encodeUint(number, minimumChars) {
if (minimumChars == undefined) {
minimumChars = 1;
}
var _local3 = "";
var _local2 = number;
while (_local2 != 0) {
_local3 = _hash.charAt(_local2 % _base) + _local3;
_local2 = _local2 / _base;
_local2 = int(_local2);
}
while (_local3.length < minimumChars) {
_local3 = _hash.charAt(0) + _local3;
}
return(_local3);
}
function decodeUint(encodedNumber) {
var _local2 = 0;
var _local3 = 0;
while (_local3 < encodedNumber.length) {
_local2 = _local2 * _base;
_local2 = _local2 + _reverseHash[encodedNumber.charAt(_local3)];
_local3++;
}
return(_local2);
}
static var DEFAULT_HASH = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ`~@#$%^&*()+|;/";
}
Symbol 1134 MovieClip [__Packages.com.newgrounds.APICommand] Frame 0
class com.newgrounds.APICommand extends com.newgrounds.APIEventDispatcher
{
static var _throttleTimestamp, bridge;
var _command, _parameters, _secureParameters, _hasTimeout, _preventCache, _files, _loader, _timeoutTimer, dispatchEvent;
function APICommand (command) {
super();
_command = command;
_parameters = new Object();
_secureParameters = new Object();
_hasTimeout = true;
}
static function stopPendingCommands() {
for (var _local2 in _pendingCommands) {
var _local1 = _pendingCommands[_local2];
_local1.close();
}
_pendingCommands = [];
}
static function onThrottleTimer(event) {
if ((getTimer() - _throttleTimestamp) >= THROTTLE_INTERVAL) {
_throttleCount = 0;
_throttleCount = 0;
for(;;){
if (!(_commandQueue.length && (_throttleCount < THROTTLE_THRESHOLD))) {
return(undefined);
}
var _local1 = _commandQueue.shift();
_local1.command.send(_local1.connection);
_throttleCount++;
};
}
}
static function encryptHex(hexValue) {
var _local4 = hexValue.length % 6;
var _local2 = "";
var _local1 = 0;
while (_local1 < hexValue.length) {
_local2 = _local2 + _encryptor.encodeUint(int("0x" + hexValue.substr(_local1, 6)), 4);
_local1 = _local1 + 6;
}
return(_local4.toString() + _local2);
}
function get command() {
return(_command);
}
function set command(value) {
_command = value;
//return(command);
}
function get hasTimeout() {
return(_hasTimeout);
}
function set hasTimeout(val) {
_hasTimeout = val;
//return(hasTimeout);
}
function get parameters() {
return(_parameters);
}
function set parameters(object) {
_parameters = new Object();
if (object) {
for (var _local3 in object) {
_parameters[_local3] = object[_local3];
}
}
//return(parameters);
}
function get preventCache() {
return(_preventCache);
}
function set preventCache(value) {
_preventCache = value;
//return(preventCache);
}
function get secureParameters() {
return(_secureParameters);
}
function set secureParameters(object) {
_secureParameters = new Object();
if (object) {
for (var _local3 in object) {
_secureParameters[_local3] = object[_local3];
}
}
//return(secureParameters);
}
function get hasSecureParameters() {
for (var _local2 in _secureParameters) {
do {
} while (undefined != null);
return(true);
}
return(false);
}
function addFile(filename, data, dataField, contentType) {
if (contentType == undefined) {
contentType = "application/octet-stream";
}
if (!_files) {
_files = new Object();
}
var _local3 = {filename:filename, data:data, dataField:dataField, contentType:contentType};
_files[filename] = _local3;
}
function removeFile(filename) {
if (_files) {
delete _files[filename];
}
}
function clearFiles() {
_files = null;
}
function close() {
if (_loader) {
clearInterval(_timeoutTimer);
var _local2 = 0;
while (_local2 < _pendingCommands.length) {
if (_pendingCommands[_local2] == this) {
_pendingCommands.splice(_local2, 1);
break;
}
_local2++;
}
_loader = null;
}
}
function loadInBrowser(connection, newWindow) {
_parameters.command_id = _command;
_parameters.tracker_id = connection.apiId || 1;
if (connection.debug) {
_parameters.debug = 1;
}
var _local3 = (connection.apiURL + "?host=") + escape(connection.hostDomain);
for (var _local4 in _parameters) {
_local3 = _local3 + ((("&" + escape(_local4)) + "=") + escape(_parameters[_local4]));
}
var _local5;
if (newWindow) {
_local5 = "_blank";
} else {
_local5 = "_top";
}
_root.getURL(_local3, _local5);
}
function send(connection) {
if (_throttleCount >= THROTTLE_THRESHOLD) {
_commandQueue.push({connection:connection, command:this});
return(undefined);
}
sendInternal(connection);
}
function sendInternal(connection) {
var _local4;
_local4 = new LoadVars();
_local4.command_id = _command;
_local4.tracker_id = connection.apiId;
if (connection.debug) {
_local4.debug = 1;
}
if (_preventCache) {
_local4.seed = Math.random();
}
var _local2;
var _local3;
var _local8;
for (_local2 in _parameters) {
_local3 = _parameters[_local2];
if (_local3 != null) {
if (typeof(_local3) == "boolean") {
_local4[_local2] = int(_local3);
} else {
_local4[_local2] = _local3;
}
}
}
if (hasSecureParameters) {
var _local6 = new Object();
for (_local2 in _secureParameters) {
_local3 = _secureParameters[_local2];
if (_local3 != null) {
if (typeof(_local3) == "boolean") {
_local6[_local2] = int(_local3);
} else {
_local6[_local2] = _local3;
}
}
}
var _local7 = "";
_local8 = 0;
while (_local8 < 16) {
_local7 = _local7 + ENCRYPTOR_RADIX.charAt(int(Math.random() * ENCRYPTOR_RADIX.length));
_local8++;
}
_local4.command_id = "securePacket";
_local6.command_id = _command;
_local6.as_version = 3;
_local6.session_id = connection.sessionId;
_local6.user_email = connection.userEmail;
_local6.publisher_id = connection.publisherId;
_local6.seed = _local7;
var _local12 = com.newgrounds.crypto.MD5.hash(_local7);
var _local13 = com.newgrounds.crypto.RC4.encrypt(com.newgrounds.encoders.json.JSON.encode(_local6), connection.encryptionKey);
_local4.secure = encryptHex(_local12 + _local13);
}
com.newgrounds.Logger.logInternal("Sending packet:", _local4);
var _local11;
_local11 = "application/x-www-form-urlencoded";
for (_local2 in _local4) {
if (typeof(_local4[_local2]) == "object") {
_local4[_local2] = com.newgrounds.encoders.json.JSON.encode(_local4[_local2]);
}
}
if (_files) {
for (var _local10 in _files) {
var _local5 = _files[_local10];
if (typeof(_local5.data) == "string") {
_local4[_local10] = _local5.data;
} else {
_local4[_local10] = com.newgrounds.encoders.json.JSON.encode(_local5.data);
}
}
}
_pendingCommands.push(this);
_throttleCount++;
_throttleTimestamp = getTimer();
startLoader(connection.apiURL, _local4, _local11);
}
function startLoader(url, data, contentType) {
_loader = LoadVars(data);
_loader.onData = as2CompleteHandler;
_loader.contentType = contentType;
_loader.sendAndLoad(url, _loader, "POST");
if (_hasTimeout) {
setInterval(this, onTimeout, TIMEOUT_INTERVAL);
}
}
function as2CompleteHandler(data) {
var _local3;
var _local2 = 0;
while (_local2 < _pendingCommands.length) {
if (_pendingCommands[_local2]._loader == this) {
_local3 = _pendingCommands[_local2];
break;
}
_local2++;
}
_local3.onComplete(data);
}
function onTimeout(event) {
close();
com.newgrounds.Logger.logError("Command timed out.");
dispatchEvent(new com.newgrounds.APIEvent(com.newgrounds.APIEvent.COMMAND_COMPLETE, null, com.newgrounds.APIEvent.ERROR_TIMED_OUT));
}
function onError(error) {
com.newgrounds.Logger.logError("Error when sending command:", error);
dispatchEvent(new com.newgrounds.APIEvent(com.newgrounds.APIEvent.COMMAND_COMPLETE, null, com.newgrounds.APIEvent.ERROR_UNKNOWN));
close();
}
function onComplete(data) {
com.newgrounds.Logger.logInternal("Received packet:", data);
!((!data) || (data == ""));
var _local2 = com.newgrounds.encoders.json.JSON.decode(data);
dispatchEvent(new com.newgrounds.APIEvent(com.newgrounds.APIEvent.COMMAND_COMPLETE, _local2, ((_local2 && (_local2.success)) ? (com.newgrounds.APIEvent.ERROR_NONE) : (com.newgrounds.APIEvent.ERROR_COMMAND_FAILED))));
if (bridge) {
bridge.sendEvent(_local2.command_id, _local2);
}
close();
}
static var TIMEOUT_INTERVAL = 10000;
static var THROTTLE_INTERVAL = 10050;
static var THROTTLE_TICK_INTERVAL = 1000;
static var THROTTLE_THRESHOLD = 24;
static var _throttleCount = 0;
static var _commandQueue = [];
static var _throttleTimer = setInterval(onThrottleTimer, THROTTLE_TICK_INTERVAL);
static var ENCRYPTOR_RADIX = "/g8236klvBQ#&|;Zb*7CEA59%s`Oue1wziFp$rDVY@TKxUPWytSaGHJ>dmoMR^<0~4qNLhc(I+fjn)X";
static var _encryptor = new com.newgrounds.encoders.BaseN(ENCRYPTOR_RADIX);
static var _pendingCommands = [];
static var CRLF = "\r\n";
}
Symbol 1135 MovieClip [__Packages.com.newgrounds.crypto.MD5] Frame 0
class com.newgrounds.crypto.MD5
{
function MD5 () {
}
static function hash(src) {
return(hex_md5(src));
}
static function hex_md5(src) {
return(binl2hex(core_md5(str2binl(src), src.length * 8)));
}
static function core_md5(x, len) {
x[len >> 5] = x[len >> 5] | (128 << (len % 32));
x[(((len + 64) >>> 9) << 4) + 14] = len;
var _local2 = 1732584193 /* 0x67452301 */;
var _local3 = -271733879;
var _local4 = -1732584194;
var _local1 = 271733878 /* 0x10325476 */;
var _local5 = 0;
while (_local5 < x.length) {
var _local10 = _local2;
var _local7 = _local3;
var _local8 = _local4;
var _local9 = _local1;
_local2 = md5_ff(_local2, _local3, _local4, _local1, x[_local5 + 0], 7, -680876936);
_local1 = md5_ff(_local1, _local2, _local3, _local4, x[_local5 + 1], 12, -389564586);
_local4 = md5_ff(_local4, _local1, _local2, _local3, x[_local5 + 2], 17, 606105819);
_local3 = md5_ff(_local3, _local4, _local1, _local2, x[_local5 + 3], 22, -1044525330);
_local2 = md5_ff(_local2, _local3, _local4, _local1, x[_local5 + 4], 7, -176418897);
_local1 = md5_ff(_local1, _local2, _local3, _local4, x[_local5 + 5], 12, 1200080426);
_local4 = md5_ff(_local4, _local1, _local2, _local3, x[_local5 + 6], 17, -1473231341);
_local3 = md5_ff(_local3, _local4, _local1, _local2, x[_local5 + 7], 22, -45705983);
_local2 = md5_ff(_local2, _local3, _local4, _local1, x[_local5 + 8], 7, 1770035416);
_local1 = md5_ff(_local1, _local2, _local3, _local4, x[_local5 + 9], 12, -1958414417);
_local4 = md5_ff(_local4, _local1, _local2, _local3, x[_local5 + 10], 17, -42063);
_local3 = md5_ff(_local3, _local4, _local1, _local2, x[_local5 + 11], 22, -1990404162);
_local2 = md5_ff(_local2, _local3, _local4, _local1, x[_local5 + 12], 7, 1804603682);
_local1 = md5_ff(_local1, _local2, _local3, _local4, x[_local5 + 13], 12, -40341101);
_local4 = md5_ff(_local4, _local1, _local2, _local3, x[_local5 + 14], 17, -1502002290);
_local3 = md5_ff(_local3, _local4, _local1, _local2, x[_local5 + 15], 22, 1236535329);
_local2 = md5_gg(_local2, _local3, _local4, _local1, x[_local5 + 1], 5, -165796510);
_local1 = md5_gg(_local1, _local2, _local3, _local4, x[_local5 + 6], 9, -1069501632);
_local4 = md5_gg(_local4, _local1, _local2, _local3, x[_local5 + 11], 14, 643717713);
_local3 = md5_gg(_local3, _local4, _local1, _local2, x[_local5 + 0], 20, -373897302);
_local2 = md5_gg(_local2, _local3, _local4, _local1, x[_local5 + 5], 5, -701558691);
_local1 = md5_gg(_local1, _local2, _local3, _local4, x[_local5 + 10], 9, 38016083);
_local4 = md5_gg(_local4, _local1, _local2, _local3, x[_local5 + 15], 14, -660478335);
_local3 = md5_gg(_local3, _local4, _local1, _local2, x[_local5 + 4], 20, -405537848);
_local2 = md5_gg(_local2, _local3, _local4, _local1, x[_local5 + 9], 5, 568446438);
_local1 = md5_gg(_local1, _local2, _local3, _local4, x[_local5 + 14], 9, -1019803690);
_local4 = md5_gg(_local4, _local1, _local2, _local3, x[_local5 + 3], 14, -187363961);
_local3 = md5_gg(_local3, _local4, _local1, _local2, x[_local5 + 8], 20, 1163531501);
_local2 = md5_gg(_local2, _local3, _local4, _local1, x[_local5 + 13], 5, -1444681467);
_local1 = md5_gg(_local1, _local2, _local3, _local4, x[_local5 + 2], 9, -51403784);
_local4 = md5_gg(_local4, _local1, _local2, _local3, x[_local5 + 7], 14, 1735328473);
_local3 = md5_gg(_local3, _local4, _local1, _local2, x[_local5 + 12], 20, -1926607734);
_local2 = md5_hh(_local2, _local3, _local4, _local1, x[_local5 + 5], 4, -378558);
_local1 = md5_hh(_local1, _local2, _local3, _local4, x[_local5 + 8], 11, -2022574463);
_local4 = md5_hh(_local4, _local1, _local2, _local3, x[_local5 + 11], 16, 1839030562);
_local3 = md5_hh(_local3, _local4, _local1, _local2, x[_local5 + 14], 23, -35309556);
_local2 = md5_hh(_local2, _local3, _local4, _local1, x[_local5 + 1], 4, -1530992060);
_local1 = md5_hh(_local1, _local2, _local3, _local4, x[_local5 + 4], 11, 1272893353);
_local4 = md5_hh(_local4, _local1, _local2, _local3, x[_local5 + 7], 16, -155497632);
_local3 = md5_hh(_local3, _local4, _local1, _local2, x[_local5 + 10], 23, -1094730640);
_local2 = md5_hh(_local2, _local3, _local4, _local1, x[_local5 + 13], 4, 681279174);
_local1 = md5_hh(_local1, _local2, _local3, _local4, x[_local5 + 0], 11, -358537222);
_local4 = md5_hh(_local4, _local1, _local2, _local3, x[_local5 + 3], 16, -722521979);
_local3 = md5_hh(_local3, _local4, _local1, _local2, x[_local5 + 6], 23, 76029189);
_local2 = md5_hh(_local2, _local3, _local4, _local1, x[_local5 + 9], 4, -640364487);
_local1 = md5_hh(_local1, _local2, _local3, _local4, x[_local5 + 12], 11, -421815835);
_local4 = md5_hh(_local4, _local1, _local2, _local3, x[_local5 + 15], 16, 530742520);
_local3 = md5_hh(_local3, _local4, _local1, _local2, x[_local5 + 2], 23, -995338651);
_local2 = md5_ii(_local2, _local3, _local4, _local1, x[_local5 + 0], 6, -198630844);
_local1 = md5_ii(_local1, _local2, _local3, _local4, x[_local5 + 7], 10, 1126891415);
_local4 = md5_ii(_local4, _local1, _local2, _local3, x[_local5 + 14], 15, -1416354905);
_local3 = md5_ii(_local3, _local4, _local1, _local2, x[_local5 + 5], 21, -57434055);
_local2 = md5_ii(_local2, _local3, _local4, _local1, x[_local5 + 12], 6, 1700485571);
_local1 = md5_ii(_local1, _local2, _local3, _local4, x[_local5 + 3], 10, -1894986606);
_local4 = md5_ii(_local4, _local1, _local2, _local3, x[_local5 + 10], 15, -1051523);
_local3 = md5_ii(_local3, _local4, _local1, _local2, x[_local5 + 1], 21, -2054922799);
_local2 = md5_ii(_local2, _local3, _local4, _local1, x[_local5 + 8], 6, 1873313359);
_local1 = md5_ii(_local1, _local2, _local3, _local4, x[_local5 + 15], 10, -30611744);
_local4 = md5_ii(_local4, _local1, _local2, _local3, x[_local5 + 6], 15, -1560198380);
_local3 = md5_ii(_local3, _local4, _local1, _local2, x[_local5 + 13], 21, 1309151649);
_local2 = md5_ii(_local2, _local3, _local4, _local1, x[_local5 + 4], 6, -145523070);
_local1 = md5_ii(_local1, _local2, _local3, _local4, x[_local5 + 11], 10, -1120210379);
_local4 = md5_ii(_local4, _local1, _local2, _local3, x[_local5 + 2], 15, 718787259);
_local3 = md5_ii(_local3, _local4, _local1, _local2, x[_local5 + 9], 21, -343485551);
_local2 = safe_add(_local2, _local10);
_local3 = safe_add(_local3, _local7);
_local4 = safe_add(_local4, _local8);
_local1 = safe_add(_local1, _local9);
_local5 = _local5 + 16;
}
return(new Array(_local2, _local3, _local4, _local1));
}
static function md5_cmn(q, a, b, x, s, t) {
return(safe_add(bit_rol(safe_add(safe_add(a, q), safe_add(x, t)), s), b));
}
static function md5_ff(a, b, c, d, x, s, t) {
return(md5_cmn((b & c) | (b ^ (4294967295 & d)), a, b, x, s, t));
}
static function md5_gg(a, b, c, d, x, s, t) {
return(md5_cmn((b & d) | (~(c & d)), a, b, x, s, t));
}
static function md5_hh(a, b, c, d, x, s, t) {
return(md5_cmn((b ^ c) ^ d, a, b, x, s, t));
}
static function md5_ii(a, b, c, d, x, s, t) {
return(md5_cmn(c ^ (b | (~d)), a, b, x, s, t));
}
static function bit_rol(num, cnt) {
return((num << cnt) | (num >>> (32 - cnt)));
}
static function safe_add(x, y) {
var _local1 = (x & 65535) + (y & 65535);
var _local2 = ((x >> 16) + (y >> 16)) + (_local1 >> 16);
return((_local2 << 16) | (_local1 & 65535));
}
static function str2binl(str) {
var _local2 = new Array();
var _local4 = 255;
var _local1 = 0;
while (_local1 < (str.length * 8)) {
_local2[_local1 >> 5] = _local2[_local1 >> 5] | ((str.charCodeAt(_local1 / 8) & _local4) << (_local1 % 32));
_local1 = _local1 + 8;
}
return(_local2);
}
static function binl2hex(binarray) {
var _local3 = new String("");
var _local4 = new String("0123456789abcdef");
var _local1 = 0;
while (_local1 < (binarray.length * 4)) {
_local3 = _local3 + (_local4.charAt((binarray[_local1 >> 2] >> (((_local1 % 4) * 8) + 4)) & 15) + _local4.charAt((binarray[_local1 >> 2] >> ((_local1 % 4) * 8)) & 15));
_local1++;
}
return(_local3);
}
}
Symbol 1136 MovieClip [__Packages.com.newgrounds.crypto.RC4] Frame 0
class com.newgrounds.crypto.RC4
{
function RC4 () {
}
static function encrypt(src, key) {
var _local2 = strToChars(src);
var _local1 = strToChars(key);
var _local3 = calculate(_local2, _local1);
return(charsToHex(_local3));
}
static function encryptbin(src, key) {
var _local2 = strToChars(src);
var _local1 = strToChars(key);
var _local3 = calculate(_local2, _local1);
return(_local3);
}
static function decrypt(src, key) {
var _local2 = hexToChars(src);
var _local1 = strToChars(key);
var _local3 = calculate(_local2, _local1);
return(charsToStr(_local3));
}
static function initialize(pwd) {
var _local2 = 0;
var _local3;
var _local4 = pwd.length;
var _local1 = 0;
while (_local1 <= 255) {
mykey[_local1] = pwd[_local1 % _local4];
sbox[_local1] = _local1;
_local1++;
}
_local1 = 0;
for(;;){
if (_local1 > 255) {
return(undefined);
}
_local2 = ((_local2 + sbox[_local1]) + mykey[_local1]) % 256;
_local3 = sbox[_local1];
sbox[_local1] = sbox[_local2];
sbox[_local2] = _local3;
_local1++;
};
}
static function calculate(plaintxt, psw) {
initialize(psw);
var _local1 = 0;
var _local2 = 0;
var _local9 = new Array();
var _local5;
var _local7;
var _local6;
var _local3 = 0;
while (_local3 < plaintxt.length) {
_local1 = (_local1 + 1) % 256;
_local2 = (_local2 + sbox[_local1]) % 256;
_local7 = sbox[_local1];
sbox[_local1] = sbox[_local2];
sbox[_local2] = _local7;
var _local4 = (sbox[_local1] + sbox[_local2]) % 256;
_local5 = sbox[_local4];
_local6 = plaintxt[_local3] ^ _local5;
_local9.push(_local6);
_local3++;
}
return(_local9);
}
static function charsToHex(chars) {
var _local3 = new String("");
var _local4 = new Array("0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f");
var _local1 = 0;
while (_local1 < chars.length) {
_local3 = _local3 + (_local4[chars[_local1] >> 4] + _local4[chars[_local1] & 15]);
_local1++;
}
return(_local3);
}
static function hexToChars(hex) {
var _local3 = new Array();
var _local1 = ((hex.substr(0, 2) == "0x") ? 2 : 0);
while (_local1 < hex.length) {
_local3.push(parseInt(hex.substr(_local1, 2), 16));
_local1 = _local1 + 2;
}
return(_local3);
}
static function charsToStr(chars) {
var _local2 = new String("");
var _local1 = 0;
while (_local1 < chars.length) {
_local2 = _local2 + String.fromCharCode(chars[_local1]);
_local1++;
}
return(_local2);
}
static function strToChars(str) {
var _local3 = new Array();
var _local1 = 0;
while (_local1 < str.length) {
_local3.push(str.charCodeAt(_local1));
_local1++;
}
return(_local3);
}
static var sbox = new Array(255);
static var mykey = new Array(255);
}
Symbol 1137 MovieClip [__Packages.com.newgrounds.encoders.json.JSON] Frame 0
class com.newgrounds.encoders.json.JSON
{
static var start, cache, interval;
function JSON () {
}
static function encode(arg, noquotes) {
var _local2;
var _local3;
var _local6;
var _local1 = "";
var _local5;
if (arg.isSServerVar()) {
__reg8 = "sservervariable";
} else {
var __reg8 = typeof(arg);
}
if (((__reg0 = __reg8)) === "sservervariable") {
return("?" + arg.getEncodedValue());
}
if (__reg0 === "object") {
if (arg) {
if (arg instanceof Array) {
_local3 = 0;
while (_local3 < arg.length) {
_local5 = encode(arg[_local3]);
if (_local1) {
_local1 = _local1 + ",";
}
_local1 = _local1 + _local5;
_local3++;
}
return(("[" + _local1) + "]");
}
if (typeof(arg.toString) != "undefined") {
for (_local3 in arg) {
_local5 = arg[_local3];
if ((typeof(_local5) != "undefined") && (typeof(_local5) != "function")) {
_local5 = encode(_local5);
if (_local1) {
_local1 = _local1 + ",";
}
_local1 = _local1 + ((encode(_local3) + ":") + _local5);
}
}
return(("{" + _local1) + "}");
}
}
return("null");
while (_local3 < _local6) {
_local2 = arg.charAt(_local3);
if (_local2 >= " ") {
if ((_local2 == "\\") || (_local2 == "\"")) {
_local1 = _local1 + "\\";
}
_local1 = _local1 + _local2;
} else if (((__reg0 = _local2)) === "\b") {
_local1 = _local1 + "\\b";
} else if (__reg0 === "\f") {
_local1 = _local1 + "\\f";
} else if (__reg0 === newline) {
_local1 = _local1 + "\\n";
} else if (__reg0 === "\r") {
_local1 = _local1 + "\\r";
} else if (__reg0 === "\t") {
_local1 = _local1 + "\\t";
} else {
_local2 = _local2.charCodeAt();
_local1 = _local1 + (("\\u00" + Math.floor(_local2 / 16).toString(16)) + (_local2 % 16).toString(16));
}
_local3 = _local3 + 1;
}
return(_local1 + __reg7);
}
if (__reg0 === "number") {
return((isFinite(arg) ? (String(arg)) : "null"));
while (_local3 < _local6) {
_local2 = arg.charAt(_local3);
if (_local2 >= " ") {
if ((_local2 == "\\") || (_local2 == "\"")) {
_local1 = _local1 + "\\";
}
_local1 = _local1 + _local2;
} else if (((__reg0 = _local2)) === "\b") {
_local1 = _local1 + "\\b";
} else if (__reg0 === "\f") {
_local1 = _local1 + "\\f";
} else if (__reg0 === newline) {
_local1 = _local1 + "\\n";
} else if (__reg0 === "\r") {
_local1 = _local1 + "\\r";
} else if (__reg0 === "\t") {
_local1 = _local1 + "\\t";
} else {
_local2 = _local2.charCodeAt();
_local1 = _local1 + (("\\u00" + Math.floor(_local2 / 16).toString(16)) + (_local2 % 16).toString(16));
}
_local3 = _local3 + 1;
}
return(_local1 + __reg7);
}
if (__reg0 === "string") {
_local6 = arg.length;
if (noquotes) {
__reg7 = "";
} else {
__reg7 = "\"";
}
_local1 = __reg7;
_local3 = 0;
while (_local3 < _local6) {
_local2 = arg.charAt(_local3);
if (_local2 >= " ") {
if ((_local2 == "\\") || (_local2 == "\"")) {
_local1 = _local1 + "\\";
}
_local1 = _local1 + _local2;
} else if (((__reg0 = _local2)) === "\b") {
_local1 = _local1 + "\\b";
} else if (__reg0 === "\f") {
_local1 = _local1 + "\\f";
} else if (__reg0 === newline) {
_local1 = _local1 + "\\n";
} else if (__reg0 === "\r") {
_local1 = _local1 + "\\r";
} else if (__reg0 === "\t") {
_local1 = _local1 + "\\t";
} else {
_local2 = _local2.charCodeAt();
_local1 = _local1 + (("\\u00" + Math.floor(_local2 / 16).toString(16)) + (_local2 % 16).toString(16));
}
_local3 = _local3 + 1;
}
return(_local1 + __reg7);
}
if (__reg0 === "boolean") {
return(String(arg));
}
return("null");
}
static function background_encode(arg, callback) {
if (busy) {
trace("[Newgrounds Encoder] :: Cannot encode a new file until the previous file is completed");
return(false);
}
if (!callback) {
trace("[Newgrounds Encoder] :: Missing a callback function, skipping encode");
return(false);
}
busy = true;
var _local2 = new Date();
start = _local2.getTime();
cache = {busy:false, complete:false, arg:arg, target:arg, parents:[], encoded:"", callback:callback, encode_chunk:function () {
com.newgrounds.encoders.json.JSON.encode_chunk();
}};
if (getType(arg) == "object") {
cache.encoded = "{";
} else if (getType(arg) == "array") {
cache.encoded = "[";
}
interval = setInterval(cache, "encode_chunk", 25);
return(true);
}
static function background_decode(arg, callback) {
if (busy) {
trace("[Newgrounds Encoder] :: Cannot decode a new file until the previous file is completed");
return(false);
}
if (!callback) {
trace("[Newgrounds Encoder] :: Missing a callback function, skipping decode");
return(false);
}
busy = true;
var _local1 = new Date();
start = _local1.getTime();
cache = {busy:false, callback:callback, complete:false, arg:arg, pos:0, parents:["root"], target:null, scratch:"", decode_chunk:function () {
com.newgrounds.encoders.json.JSON.decode_chunk();
}};
interval = setInterval(cache, "decode_chunk", 25);
return(true);
}
static function decode(text) {
var at = 0;
var ch = " ";
var _value;
var _error = function (m) {
};
var _next = function () {
ch = text.charAt(at);
at = at + 1;
return(ch);
};
var _white = function () {
for(;;){
if (!ch) {
return(undefined);
}
if (ch <= " ") {
_next();
} else if (ch == "/") {
if (((__reg0 = _next())) === "/") {
do {
} while ((_next() && (ch != newline)) && (ch != "\r"));
} else if (__reg0 === "*") {
_next();
for(;;){
if (ch) {
if (ch == "*") {
if (_next() == "/") {
_next();
// unexpected jump
}
} else {
_next();
}
} else {
_error("Unterminated comment");
}
};
} else {
_error("Syntax error");
}
} else {
return(undefined);
}
};
};
var _string = function () {
var _local2;
var _local1 = "";
var _local3;
var _local4;
var _local5 = false;
if (ch == "\"") {
while (_next()) {
if (ch == "\"") {
_next();
return(_local1);
}
if (ch == "\\") {
if (((__reg0 = _next())) === "b") {
_local1 = _local1 + "\b";
} else if (__reg0 === "f") {
_local1 = _local1 + "\f";
} else if (__reg0 === "n") {
_local1 = _local1 + newline;
} else if (__reg0 === "r") {
_local1 = _local1 + "\r";
} else if (__reg0 === "t") {
_local1 = _local1 + "\t";
} else if (__reg0 === "u") {
_local4 = 0;
_local2 = 0;
while (_local2 < 4) {
_local3 = parseInt(_next(), 16);
if (!isFinite(_local3)) {
_local5 = true;
break;
}
_local4 = (_local4 * 16) + _local3;
_local2 = _local2 + 1;
}
if (_local5) {
_local5 = false;
} else {
_local1 = _local1 + String.fromCharCode(_local4);
}
} else {
_local1 = _local1 + ch;
}
} else {
_local1 = _local1 + ch;
}
}
}
_error("Bad string");
};
var _array = function () {
var _local1 = [];
if (ch == "[") {
_next();
_white();
if (ch == "]") {
_next();
return(_local1);
}
while (ch) {
_local1.push(_value());
_white();
if (ch == "]") {
_next();
return(_local1);
}
if (ch != ",") {
break;
}
_next();
_white();
}
}
_error("Bad array");
};
var _object = function () {
var _local2;
var _local1 = {};
if (ch == "{") {
_next();
_white();
if (ch == "}") {
_next();
return(_local1);
}
while (ch) {
_local2 = _string();
_white();
if (ch != ":") {
break;
}
_next();
_local1[_local2] = _value();
_white();
if (ch == "}") {
_next();
return(_local1);
}
if (ch != ",") {
break;
}
_next();
_white();
}
}
_error("Bad object");
};
var _number = function () {
var _local1 = "";
var _local2;
if (ch == "-") {
_local1 = "-";
_next();
}
while ((ch >= "0") && (ch <= "9")) {
_local1 = _local1 + ch;
_next();
}
if (ch == ".") {
_local1 = _local1 + ".";
while ((_next() && (ch >= "0")) && (ch <= "9")) {
_local1 = _local1 + ch;
}
}
_local2 = 1 * _local1;
if (!isFinite(_local2)) {
_error("Bad number");
return(undefined);
}
return(_local2);
};
var _word = function () {
if (((__reg0 = ch)) === "t") {
if (((_next() == "r") && (_next() == "u")) && (_next() == "e")) {
_next();
return(true);
}
} else if (__reg0 === "f") {
if ((((_next() == "a") && (_next() == "l")) && (_next() == "s")) && (_next() == "e")) {
_next();
return(false);
}
} else if (__reg0 === "n") {
if (((_next() == "u") && (_next() == "l")) && (_next() == "l")) {
_next();
return(null);
}
}
_error("Syntax error");
};
_value = function () {
_white();
if (((__reg0 = ch)) === "{") {
return(_object());
}
if (__reg0 === "[") {
return(_array());
}
if (__reg0 === "\"") {
return(_string());
}
if (__reg0 === "-") {
return(_number());
}
return((((ch >= "0") && (ch <= "9")) ? (_number()) : (_word())));
};
return(_value());
}
static function getType(v) {
if (v instanceof Array) {
return("array");
}
return(typeof(v));
}
static function decode_chunk() {
if ((!cache.busy) && (!cache.complete)) {
cache.busy = true;
var _local1 = 0;
while (_local1 < decode_chunks) {
chunk_decoder();
if (cache.complete) {
break;
}
_local1++;
}
trace(Math.round((cache.pos / cache.arg.length) * 100) + "% decoded");
cache.busy = false;
}
if (cache.complete) {
var _local2 = new Date();
busy = false;
clearInterval(interval);
cache.callback(cache.root, _local2.getTime() - start);
cache.arg = "";
}
}
static function encode_chunk() {
if ((!cache.busy) && (!cache.complete)) {
cache.busy = true;
var _local1 = 0;
while (_local1 < encode_chunks) {
chunk_encoder();
if (cache.complete) {
break;
}
_local1++;
}
cache.busy = false;
}
if (cache.complete) {
var _local2 = new Date();
var _local3 = _local2.getTime();
busy = false;
clearInterval(interval);
cache.callback(cache.encoded, _local3 - start);
cache.encoded = "";
}
}
static function chunk_decoder() {
function _object() {
var _local1 = com.newgrounds.encoders.json.JSON.cache.arg.charAt(com.newgrounds.encoders.json.JSON.cache.pos);
if (com.newgrounds.encoders.json.JSON.cache.mode) {
if (_local1 == ",") {
com.newgrounds.encoders.json.JSON.cache.pos++;
_local1 = com.newgrounds.encoders.json.JSON.cache.arg.charAt(com.newgrounds.encoders.json.JSON.cache.pos);
_local1 == "\"";
com.newgrounds.encoders.json.JSON.cache.scratch = "";
} else if (_local1 == "}") {
_useParent();
} else if (_local1 == "\"") {
com.newgrounds.encoders.json.JSON.cache.pos++;
_local1 = com.newgrounds.encoders.json.JSON.cache.arg.charAt(com.newgrounds.encoders.json.JSON.cache.pos);
_local1 == ":";
_addParent(com.newgrounds.encoders.json.JSON.cache.scratch);
com.newgrounds.encoders.json.JSON.cache.mode = null;
} else {
if (_local1 == "\\") {
com.newgrounds.encoders.json.JSON.cache.pos++;
_local1 = com.newgrounds.encoders.json.JSON.cache.arg.charAt(com.newgrounds.encoders.json.JSON.cache.pos);
}
com.newgrounds.encoders.json.JSON.cache.scratch = com.newgrounds.encoders.json.JSON.cache.scratch + _local1;
}
} else {
com.newgrounds.encoders.json.JSON.cache.mode = "object";
com.newgrounds.encoders.json.JSON.cache.pos++;
_local1 = com.newgrounds.encoders.json.JSON.cache.arg.charAt(com.newgrounds.encoders.json.JSON.cache.pos);
_local1 == "\"";
com.newgrounds.encoders.json.JSON.cache.scratch = "";
_setTargetValue({});
}
com.newgrounds.encoders.json.JSON.cache.pos++;
}
function _array() {
var _local1 = com.newgrounds.encoders.json.JSON.cache.arg.charAt(com.newgrounds.encoders.json.JSON.cache.pos);
if (com.newgrounds.encoders.json.JSON.cache.mode) {
if (_local1 == ",") {
_addArrayKey();
} else if (_local1 == "]") {
_useParent();
}
} else {
com.newgrounds.encoders.json.JSON.cache.mode = "array";
com.newgrounds.encoders.json.JSON.cache.pos++;
_local1 = com.newgrounds.encoders.json.JSON.cache.arg.charAt(com.newgrounds.encoders.json.JSON.cache.pos);
_setTargetValue([]);
if (_local1 == "]") {
_useParent();
} else {
_addArrayKey();
}
return(undefined);
}
com.newgrounds.encoders.json.JSON.cache.pos++;
}
function _boolean() {
var _local1 = com.newgrounds.encoders.json.JSON.cache.arg.charAt(com.newgrounds.encoders.json.JSON.cache.pos);
if (_local1 == "t") {
_setTargetValue(true);
com.newgrounds.encoders.json.JSON.cache.pos = com.newgrounds.encoders.json.JSON.cache.pos + 3;
} else if (_local1 == "f") {
_setTargetValue(false);
com.newgrounds.encoders.json.JSON.cache.pos = com.newgrounds.encoders.json.JSON.cache.pos + 4;
}
_useParent();
}
function _null() {
var _local1 = com.newgrounds.encoders.json.JSON.cache.arg.charAt(com.newgrounds.encoders.json.JSON.cache.pos);
if (_local1 == "n") {
_setTargetValue(null);
com.newgrounds.encoders.json.JSON.cache.pos = com.newgrounds.encoders.json.JSON.cache.pos + 2;
}
_useParent();
}
function _string() {
var _local1 = com.newgrounds.encoders.json.JSON.cache.arg.charAt(com.newgrounds.encoders.json.JSON.cache.pos);
if (com.newgrounds.encoders.json.JSON.cache.mode) {
if (_local1 == "\"") {
_setTargetValue(com.newgrounds.encoders.json.JSON.cache.scratch);
_useParent();
} else {
if (_local1 == "\\") {
com.newgrounds.encoders.json.JSON.cache.pos++;
_local1 = com.newgrounds.encoders.json.JSON.cache.arg.charAt(com.newgrounds.encoders.json.JSON.cache.pos);
if (((__reg0 = _local1)) === "n") {
_local1 = newline;
} else if (__reg0 === "r") {
_local1 = newline;
} else if (__reg0 === "t") {
_local1 = "\t";
} else if (__reg0 === "u") {
_local1 = "\\" + _local1;
}
}
com.newgrounds.encoders.json.JSON.cache.scratch = com.newgrounds.encoders.json.JSON.cache.scratch + _local1;
}
} else {
_local1 == "\"";
com.newgrounds.encoders.json.JSON.cache.scratch = "";
com.newgrounds.encoders.json.JSON.cache.mode = "string";
}
com.newgrounds.encoders.json.JSON.cache.pos++;
}
function _number() {
var _local1 = com.newgrounds.encoders.json.JSON.cache.arg.charAt(com.newgrounds.encoders.json.JSON.cache.pos);
var _local2 = "01234567890.-";
if (!com.newgrounds.encoders.json.JSON.cache.mode) {
com.newgrounds.encoders.json.JSON.cache.mode = "number";
com.newgrounds.encoders.json.JSON.cache.scratch = "";
}
if (_local2.indexOf(_local1) < 0) {
_setTargetValue(Number(com.newgrounds.encoders.json.JSON.cache.scratch));
_useParent();
return(undefined);
}
com.newgrounds.encoders.json.JSON.cache.scratch = com.newgrounds.encoders.json.JSON.cache.scratch + _local1;
com.newgrounds.encoders.json.JSON.cache.pos++;
}
function _setTargetValue(newval) {
var _local2 = _getParent().obj;
var _local1 = com.newgrounds.encoders.json.JSON.cache.parents[com.newgrounds.encoders.json.JSON.cache.parents.length - 1];
_local2[_local1] = newval;
}
function _useParent() {
com.newgrounds.encoders.json.JSON.cache.mode = com.newgrounds.encoders.json.JSON.getType(_getParent().obj);
com.newgrounds.encoders.json.JSON.cache.parents.pop();
}
function _getParent() {
var _local2 = com.newgrounds.encoders.json.JSON.cache;
var _local1 = 0;
while (_local1 < (com.newgrounds.encoders.json.JSON.cache.parents.length - 1)) {
_local2 = _local2[com.newgrounds.encoders.json.JSON.cache.parents[_local1]];
_local1++;
}
return({obj:_local2, name:com.newgrounds.encoders.json.JSON.cache.parents[_local1]});
}
function _getCurrent() {
var _local2 = com.newgrounds.encoders.json.JSON.cache;
var _local1 = 0;
while (_local1 < com.newgrounds.encoders.json.JSON.cache.parents.length) {
_local2 = _local2[com.newgrounds.encoders.json.JSON.cache.parents[_local1]];
_local1++;
}
return({obj:_local2, name:com.newgrounds.encoders.json.JSON.cache.parents[_local1]});
}
function _addParent(child) {
com.newgrounds.encoders.json.JSON.cache.parents.push(child);
}
function _addArrayKey() {
var _local1 = _getCurrent().obj.length;
com.newgrounds.encoders.json.JSON.cache.parents.push(_local1);
com.newgrounds.encoders.json.JSON.cache.mode = null;
}
if (cache.pos >= cache.arg.length) {
cache.complete = true;
return(undefined);
}
if (cache.mode) {
eval ("_" + cache.mode)();
return(undefined);
}
var char = cache.arg.charAt(cache.pos);
if (((__reg0 = char)) === "{") {
_object();
return(undefined);
}
if (__reg0 === "[") {
_array();
return(undefined);
}
if (__reg0 === "\"") {
_string();
return(undefined);
}
if (__reg0 === "n") {
_null();
return(undefined);
}
if (__reg0 === "t") {
_boolean();
return(undefined);
}
if (__reg0 === "f") {
_boolean();
return(undefined);
}
_number();
return(undefined);
}
static function chunk_encoder() {
if (cache.complete) {
return(undefined);
}
var _local2 = getType(cache.target);
if (((__reg0 = _local2)) === "number") {
cache.encoded = cache.encoded + cache.target;
getParent();
return(undefined);
}
if (__reg0 === "string") {
cache.encoded = cache.encoded + (("\"" + cache.target.split("\"").join("\\\"")) + "\"");
getParent();
return(undefined);
}
if (__reg0 === "boolean") {
cache.encoded = cache.encoded + ((cache.target == true) ? "true" : "false");
getParent();
return(undefined);
}
if (__reg0 === "null") {
cache.encoded = cache.encoded + "null";
getParent();
return(undefined);
}
if (__reg0 === "array") {
if (cache.target.length < 1) {
cache.encoded = cache.encoded + "]";
getParent();
} else {
cache.parents.push(cache.target);
cache.target = cache.target[0];
if (getType(cache.target) == "array") {
cache.encoded = cache.encoded + "[";
} else if (getType(cache.target) == "object") {
cache.encoded = cache.encoded + "{";
}
}
return(undefined);
}
if (__reg0 === "object") {
for (var _local1 in cache.target) {
break;
}
do {
} while (undefined != null);
if (_local1 === undefined) {
cache.encoded = cache.encoded + "}";
getParent();
} else {
cache.parents.push(cache.target);
cache.target = cache.target[_local1];
cache.encoded = cache.encoded + (("\"" + _local1.split("\"").join("\\\"")) + "\":");
if (getType(cache.target) == "array") {
cache.encoded = cache.encoded + "[";
} else if (getType(cache.target) == "object") {
cache.encoded = cache.encoded + "{";
}
}
return(undefined);
}
cache.encoded = cache.encoded + "null";
getParent();
return(undefined);
}
static function getParent() {
if (cache.parents.length > 0) {
var _local1 = cache.parents.pop();
if (getType(_local1) == "array") {
_local1.shift();
} else {
for (var _local3 in _local1) {
delete _local1[_local3];
break;
}
do {
} while (undefined != null);
}
if ((0 != (getType(_local1) == "object")) | (0 != (getType(_local1) == "array"))) {
for (var _local2 in _local1) {
break;
}
do {
} while (undefined != null);
if (!(_local2 === undefined)) {
cache.encoded = cache.encoded + ",";
}
}
cache.target = _local1;
return(undefined);
}
cache.complete = true;
}
static var encode_chunks = 20000;
static var decode_chunks = 20000;
static var busy = false;
}
Symbol 1138 MovieClip [__Packages.com.newgrounds.Bridge] Frame 0
class com.newgrounds.Bridge
{
var _widgetId, _inConnection, _outConnection;
function Bridge (id) {
_widgetId = id;
_inConnection = new LocalConnection();
_outConnection = new LocalConnection();
_inConnection.receiveEvent = receiveEvent;
_inConnection.connect("rec_" + _widgetId);
com.newgrounds.Logger.addEventListener(com.newgrounds.APIEvent.LOG, {target:this, func:onLogMessage});
}
function onLogMessage(event) {
_outConnection.send(_widgetId, "sendEvent", "trace", String(event.__get__data()));
return(undefined);
}
function sendEvent(command, parameters) {
if (_outConnection) {
parameters = {data:parameters};
_outConnection.send(_widgetId, "sendEvent", command, parameters);
return(undefined);
}
}
function receiveEvent(event, parameters) {
}
function onStatus(event) {
}
}
Symbol 1139 MovieClip [__Packages.com.newgrounds.Medal] Frame 0
class com.newgrounds.Medal extends com.newgrounds.APIEventDispatcher
{
var _connection, _id, _name, _description, _secret, _unlocked, _value, _difficulty, _iconLoader, dispatchEvent;
function Medal (connection, id, name, description, secret, unlocked, value, difficultyId, iconURL) {
super();
_connection = connection;
_id = id;
_name = name;
_description = description;
_secret = secret;
_unlocked = unlocked;
_value = value;
_difficulty = DIFFICULTIES[difficultyId];
_iconLoader = new com.newgrounds.BitmapLoader(DEFAULT_ICON, iconURL);
_iconLoader.load();
}
function get difficulty() {
return(_difficulty);
}
function get icon() {
return(_iconLoader.__get__bitmapData());
}
function get id() {
return(_id);
}
function get name() {
return(_name);
}
function get description() {
return(_description);
}
function get secret() {
return(_secret);
}
function get unlocked() {
return(_unlocked);
}
function get value() {
return(_value);
}
function toString() {
return((((((("Medal: " + _name) + "\t\t(") + (_unlocked ? "unlocked, " : "locked, ")) + _value) + "pts, ") + _difficulty) + ")");
}
function attachIcon(parent) {
return(_iconLoader.attachBitmap(parent));
}
function unlock() {
if (_unlocked) {
com.newgrounds.Logger.logWarning(("Medal \"" + _name) + "\" is already unlocked.");
return(undefined);
}
com.newgrounds.Logger.logMessage(("Unlocking medal \"" + name) + "\"...");
_unlocked = true;
if (_connection.__get__hasUserSession()) {
_connection.sendSimpleCommand("unlockMedal", {target:this, func:onUnlockConfirmed}, null, {medal_id:id});
}
dispatchEvent(new com.newgrounds.APIEvent(com.newgrounds.APIEvent.MEDAL_UNLOCKED, this));
}
function setUnlocked(unlocked) {
_unlocked = unlocked;
}
function onUnlockConfirmed(event) {
if (event.__get__success()) {
com.newgrounds.Logger.logMessage(("Medal \"" + name) + "\" unlocked.");
} else {
com.newgrounds.Logger.logError(("Failed to unlock \"" + name) + "\"!");
}
dispatchEvent(new com.newgrounds.APIEvent(com.newgrounds.APIEvent.MEDAL_UNLOCK_CONFIRMED, this, event.__get__error()));
}
static var ICON_WIDTH = 50;
static var ICON_HEIGHT = 50;
static var DEFAULT_ICON = flash.display.BitmapData.loadBitmap("DefaultMedalIcon");
static var DIFFICULTY_EASY = "Easy";
static var DIFFICULTY_MODERATE = "Moderate";
static var DIFFICULTY_CHALLENGING = "Challenging";
static var DIFFICULTY_DIFFICULT = "Difficult";
static var DIFFICULTY_BRUTAL = "Brutal";
static var DIFFICULTIES = ["Unknown", DIFFICULTY_EASY, DIFFICULTY_MODERATE, DIFFICULTY_CHALLENGING, DIFFICULTY_DIFFICULT, DIFFICULTY_BRUTAL];
}
Symbol 1140 MovieClip [__Packages.com.newgrounds.BitmapLoader] Frame 0
class com.newgrounds.BitmapLoader extends com.newgrounds.APIEventDispatcher
{
var _bitmapData, _url, _loader, _loaderClip, dispatchEvent;
function BitmapLoader (defaultBitmap, url) {
super();
_bitmapData = defaultBitmap;
_url = url;
}
function get url() {
return(_url);
}
function set url(v) {
_loaded = false;
_url = v;
//return(url);
}
function get bitmapData() {
return(_bitmapData);
}
function set bitmapData(v) {
_bitmapData = v;
_loaded = true;
//return(bitmapData);
}
function get loaded() {
return(_loaded);
}
function disposeLoader() {
if (_loader) {
if (_loaderClip._parent == _root) {
_loader.unloadClip(_loaderClip.bitmap);
_loaderClip.removeMovieClip();
}
_loader = null;
_loaderClip = null;
}
}
function load() {
if ((!_url) || (_url == "")) {
onLoadComplete();
return(undefined);
}
_loaded = false;
if (_bitmapData) {
_bitmapData.dispose();
_bitmapData = null;
}
disposeLoader();
attachBitmap(null);
}
function attachBitmap(parent) {
if (!parent) {
parent = _root;
}
var _local5 = parent.getNextHighestDepth();
var _local3 = parent.createEmptyMovieClip("__bitmap" + _local5, _local5);
if (((!_loaded) && (_url)) && (_url != "")) {
_local3.createEmptyMovieClip("bitmap", 0);
_loader = new MovieClipLoader();
_loaderClip = _local3;
if (parent == _root) {
_loaderClip._visible = false;
}
var thisObj = this;
_loaderClip.onEnterFrame = function () {
thisObj.pollLoad();
};
_loader.addListener({onLoadError:function () {
thisObj.onLoadComplete();
}});
_loader.loadClip(_url, _local3.bitmap);
} else {
_local3.attachBitmap(_bitmapData, 0);
}
return(_local3);
}
function pollLoad() {
if (_loaderClip._width) {
onLoadComplete();
}
}
function onLoadComplete() {
var _local2;
if ((_loader && (_loaderClip)) && (_loaderClip._width)) {
_loaderClip.onEnterFrame = null;
_local2 = new flash.display.BitmapData(_loaderClip._width, _loaderClip._height, true, 0);
_local2.draw(_loaderClip);
_bitmapData = _local2;
_loaded = true;
}
disposeLoader();
dispatchEvent(new com.newgrounds.APIEvent(com.newgrounds.APIEvent.ICON_LOADED, this, (_loaded ? null : (com.newgrounds.APIEvent.ERROR_BAD_FILE))));
}
static var _cacheSeed = 0;
var _loaded = true;
}
Symbol 1141 MovieClip [__Packages.com.newgrounds.SaveKey] Frame 0
class com.newgrounds.SaveKey
{
var _name, _id, _type;
function SaveKey (name, id, type) {
_name = name;
_id = id;
_type = type;
}
function get name() {
return(_name);
}
function get id() {
return(_id);
}
function get type() {
return(_type);
}
function validateValue(value) {
if (((__reg0 = _type)) === TYPE_INTEGER) {
value = Number(value);
if (!isNaN(value)) {
var _local3 = int(value);
if (_local3 != value) {
com.newgrounds.Logger.logWarning(((((("Float value " + value) + " given for integer key \"") + _name) + "\". Clamping to ") + _local3) + ".");
}
return(_local3);
}
} else if (__reg0 === TYPE_FLOAT) {
value = Number(value);
if (!isNaN(value)) {
return(isNaN(Number(value)));
}
} else {
if (__reg0 === TYPE_BOOLEAN) {
return(Boolean(value) && (int(value) != 0));
}
if (__reg0 === TYPE_STRING) {
return((value ? (value.toString()) : ""));
}
}
return(null);
}
function toString() {
return(_name);
}
static var TYPE_FLOAT = 1;
static var TYPE_INTEGER = 2;
static var TYPE_STRING = 3;
static var TYPE_BOOLEAN = 4;
}
Symbol 1142 MovieClip [__Packages.com.newgrounds.SaveRating] Frame 0
class com.newgrounds.SaveRating
{
var _name, _id, _isFloat, _minimum, _maximum;
function SaveRating (name, id, isFloat, minimum, maximum) {
_name = name;
_id = id;
_isFloat = isFloat;
_minimum = minimum;
_maximum = maximum;
}
function get name() {
return(_name);
}
function get id() {
return(_id);
}
function get isFloat() {
return(_isFloat);
}
function get minimum() {
return(_minimum);
}
function get maximum() {
return(_maximum);
}
function validateValue(value) {
var _local2 = Number(value);
if (isNaN(_local2)) {
com.newgrounds.Logger.logError(("Invalid value for rating \"" + _name) + "\".");
return(NaN);
}
if (_local2 < _minimum) {
com.newgrounds.Logger.logWarning(((((_local2 + " is out of acceptable range for rating \"") + _name) + "\". Clamping to ") + _minimum) + ".");
return(_minimum);
}
if (_local2 > _maximum) {
com.newgrounds.Logger.logWarning(((((_local2 + " is out of acceptable range for rating \"") + _name) + "\". Clamping to ") + _maximum) + ".");
return(_maximum);
}
if (!isFloat) {
var _local3 = int(_local2);
if (_local3 != _local2) {
com.newgrounds.Logger.logWarning(((((("Float value " + _local2) + " given for integer rating \"") + _name) + "\". Clamping to ") + _local3) + ".");
}
return(_local3);
}
return(_local2);
}
function toString() {
return(_name);
}
}
Symbol 1143 MovieClip [__Packages.com.newgrounds.SaveGroup] Frame 0
class com.newgrounds.SaveGroup
{
var _connection, _id, _name, _type, _keysArray, _ratingsArray, _keys, _ratings;
function SaveGroup (connection, name, id, type, keys, ratings) {
_connection = connection;
_id = id;
_name = name;
_type = type;
_keysArray = keys;
_ratingsArray = ratings;
_keys = new Object();
_ratings = new Object();
var _local8;
for (var _local6 in keys) {
var _local3 = keys[_local6];
_keys[_local3.__get__name()] = _local3;
}
for (var _local7 in ratings) {
var _local2 = ratings[_local7];
_ratings[_local2.__get__name()] = _local2;
}
}
function get connection() {
return(_connection);
}
function get name() {
return(_name);
}
function get type() {
return(_type);
}
function get id() {
return(_id);
}
function get keys() {
return(_keysArray);
}
function get ratings() {
return(_ratingsArray);
}
function getKey(name) {
return(_keys[name]);
}
function getRating(name) {
return(_ratings[name]);
}
function getKeyById(id) {
for (var _local4 in _keys) {
var _local2 = _keys[_local4];
if (_local2.__get__id() == id) {
do {
} while (undefined != null);
return(_local2);
}
}
return(null);
}
function getRatingById(id) {
for (var _local4 in _ratings) {
var _local2 = _ratings[_local4];
if (_local2.__get__id() == id) {
do {
} while (undefined != null);
return(_local2);
}
}
return(null);
}
function toString() {
return((((("SaveGroup: " + name) + " Keys: ") + _keysArray) + " Ratings: ") + _ratingsArray);
}
static var TYPE_SYSTEM = 0;
static var TYPE_PRIVATE = 1;
static var TYPE_PUBLIC = 2;
static var TYPE_MODERATED = 3;
}
Symbol 1144 MovieClip [__Packages.com.newgrounds.encoders.ImageScanner] Frame 0
class com.newgrounds.encoders.ImageScanner
{
var _baseN, _encodeAlpha, _maxPerChannel;
function ImageScanner (hashLength, charsPerPixel) {
if (hashLength) {
_hash = DEFAULT_HASH.substr(0, hashLength);
}
_baseN = new com.newgrounds.encoders.BaseN(_hash);
if (charsPerPixel) {
_charsPerPixel = charsPerPixel;
}
encodeAlpha = (false);
}
function get encodeAlpha() {
return(_encodeAlpha);
}
function set encodeAlpha(v) {
_encodeAlpha = v;
_maxPerChannel = int(Math.pow(_hash.length, _charsPerPixel / (_encodeAlpha ? 4 : 3)));
if (_maxPerChannel > 256) {
_maxPerChannel = 256;
}
//return(encodeAlpha);
}
function encode(source, callbackFunction, callbackObject) {
var _local4 = {callbackFunction:callbackFunction, callbackObject:callbackObject, source:source, x:0, y:0, output:null};
var _local3 = source.width.toString();
var _local2 = source.height.toString();
while (_local3.length < 3) {
_local3 = "0" + _local3;
}
while (_local2.length < 3) {
_local2 = "0" + _local2;
}
_local4.output = _local3 + _local2;
var _local6 = setInterval(this, "doEncode", WORK_INTERVAL, _local4);
_local4.interval = _local6;
}
function decode(source, callbackFunction, callbackObject) {
var _local4 = {callbackFunction:callbackFunction, callbackObject:callbackObject, source:source, i:6, x:0, y:0, output:null};
var _local2 = source.substr(0, 3);
var _local3 = source.substr(3, 3);
while (_local2.charAt(0) == "0") {
_local2 = _local2.substr(1);
}
while (_local3.charAt(0) == "0") {
_local3 = _local3.substr(1);
}
var _local7 = int(_local2);
var _local6 = int(_local3);
_local4.output = new flash.display.BitmapData(_local7, _local6, _encodeAlpha);
var _local8 = setInterval(this, "doDecode", WORK_INTERVAL, _local4);
_local4.interval = _local8;
}
function doEncode(state) {
var _local3 = getTimer();
while ((state.y < state.source.height) && ((getTimer() - _local3) < WORK_INTERVAL)) {
state.output = state.output + encodePixel(state.source.getPixel32(state.x, state.y));
state.x++;
if (state.x == state.source.width) {
state.x = 0;
state.y++;
}
}
if (state.y == state.source.height) {
clearInterval(state.interval);
state.callbackFunction.call(state.callbackObject, state.output);
}
}
function doDecode(state) {
var _local4 = getTimer();
while ((state.y < state.output.height) && ((getTimer() - _local4) < WORK_INTERVAL)) {
var _local3 = decodePixel(state.source.substr(state.i, _charsPerPixel));
state.output.setPixel32(state.x, state.y, _local3);
state.i = state.i + _charsPerPixel;
state.x++;
if (state.x == state.output.width) {
state.x = 0;
state.y++;
}
}
if (state.y == state.output.height) {
clearInterval(state.interval);
state.callbackFunction.call(state.callbackObject, state.output);
}
}
function encodePixel(pixel) {
var _local5 = (pixel >> 24) & 255;
var _local4 = (pixel >> 16) & 255;
var _local3 = (pixel >> 8) & 255;
var _local6 = pixel & 255;
_local5 = int((_local5 / 256) * _maxPerChannel);
_local4 = int((_local4 / 256) * _maxPerChannel);
_local3 = int((_local3 / 256) * _maxPerChannel);
_local6 = int((_local6 / 256) * _maxPerChannel);
var _local2 = (((_local4 * _maxPerChannel) * _maxPerChannel) + (_local3 * _maxPerChannel)) + _local6;
if (_encodeAlpha) {
_local2 = _local2 + (((_local5 * _maxPerChannel) * _maxPerChannel) * _maxPerChannel);
}
return(_baseN.encodeUint(_local2, _charsPerPixel));
}
function decodePixel(encodedPixel) {
var _local6 = 255;
var _local4;
var _local3;
var _local5;
var _local7 = 0;
var _local2 = _baseN.decodeUint(encodedPixel);
_local5 = _local2 % _maxPerChannel;
_local2 = _local2 / int(_maxPerChannel);
_local3 = _local2 % _maxPerChannel;
_local2 = _local2 / int(_maxPerChannel);
_local4 = _local2 % _maxPerChannel;
_local2 = _local2 / int(_maxPerChannel);
if (_encodeAlpha) {
_local6 = _local2 % _maxPerChannel;
_local2 = _local2 / int(_maxPerChannel);
}
return((((_local6 << 24) | (_local4 << 16)) | (_local3 << 8)) | _local5);
}
static var DEFAULT_HASH = "0123456789aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ<>?:;-_=+()!&";
var _hash = DEFAULT_HASH;
var _charsPerPixel = 2;
static var WORK_INTERVAL = 33.3333333333;
}
Symbol 1145 MovieClip [__Packages.com.newgrounds.SaveFile] Frame 0
class com.newgrounds.SaveFile extends com.newgrounds.APIEventDispatcher
{
static var _currentFile;
var _iconLoader, _group, _keys, _ratings, _numVotes, _name, _description, _id, _data, _dataLoader, _fileSize, _readOnly, _draft, _authorId, _authorName, _views, _createdDate, _modifiedDate, dispatchEvent, _encodedIcon, _encodedData, _encoderQueue, _encoding, _dataLoaded, _encodingParent, _encodingProperty, _dataURL;
function SaveFile (group) {
super();
_iconLoader = new com.newgrounds.BitmapLoader(DEFAULT_ICON, null);
_group = group;
_keys = {};
_ratings = {};
_numVotes = {};
}
static function get currentFile() {
return(_currentFile);
}
static function fromObject(group, fileData) {
var _local3 = new com.newgrounds.SaveFile(group);
_local3._name = fileData.filename;
_local3._description = fileData.description;
_local3._id = fileData.save_id;
_local3._authorId = fileData.user_id;
_local3._authorName = fileData.user_name;
_local3._createdDate = fileData.created;
_local3._modifiedDate = fileData.last_update;
_local3._views = fileData.views;
if (fileData.thumb && (fileData.thumb != "")) {
_local3._iconLoader.__set__url(_imageFilePath + fileData.thumb);
}
_local3._dataURL = _saveFilePath + fileData.file;
_local3._fileSize = fileData.file_size;
_local3._approved = fileData.status != STATUS_UNAPPROVED;
_local3._readOnly = false;
_local3._public = (fileData.status != STATUS_PRIVATE) && (fileData.status != STATUS_UNAPPROVED);
for (var _local9 in fileData.keys) {
var _local6 = fileData.keys[_local9];
var _local5 = group.getKeyById(_local6.id);
if (_local5) {
_local3._keys[_local5.__get__name()] = _local5.validateValue(_local6.value);
}
}
for (var _local8 in fileData.ratings) {
var _local4 = fileData.ratings[_local8];
var _local2 = group.getRatingById(_local4.id);
if (_local2) {
_local3._ratings[_local2.__get__name()] = _local2.validateValue(_local4.score);
_local3._numVotes[_local2.__get__name()] = int(_local4.votes);
}
}
return(_local3);
}
function get group() {
return(_group);
}
function get name() {
return(_name);
}
function set name(val) {
_name = val;
//return(name);
}
function get description() {
return(_description);
}
function set description(val) {
_description = val;
//return(description);
}
function get id() {
return(_id);
}
function get data() {
return(_data);
}
function set data(val) {
_data = val;
//return(data);
}
function get bytesLoaded() {
if (_data) {
return(bytesTotal);
}
if (!_dataLoader) {
return(0);
}
return(_dataLoader.getBytesLoaded());
}
function get bytesTotal() {
return(_fileSize);
}
function get readOnly() {
return(_readOnly);
}
function get draft() {
return(_draft);
}
function set draft(v) {
_draft = v;
//return(draft);
}
function get authorId() {
return(_authorId);
}
function get authorName() {
return(_authorName);
}
function get keys() {
return(_keys);
}
function get ratings() {
return(_ratings);
}
function get numVotes() {
return(_numVotes);
}
function get views() {
return(_views);
}
function get createdDate() {
return(_createdDate);
}
function get updatedDate() {
return(_modifiedDate);
}
function toString() {
return("Save File: " + _name);
}
function get icon() {
return(_iconLoader.__get__bitmapData());
}
function set icon(v) {
createIcon(v);
//return(icon);
}
function get iconLoaded() {
return(_iconLoader.__get__loaded());
}
function createIcon(source) {
var _local8 = new flash.display.BitmapData(ICON_WIDTH, ICON_HEIGHT, false, 0);
var _local5;
var _local6;
var _local10 = 0;
var _local9 = 0;
if (source instanceof flash.display.BitmapData) {
_local5 = source.width;
_local6 = source.height;
} else if (source instanceof MovieClip) {
var _local2 = MovieClip(source).getBounds(source);
_local5 = _local2.xMax - _local2.xMin;
_local6 = _local2.yMax - _local2.yMin;
_local10 = _local2.xMin;
_local9 = _local2.yMin;
}
var _local7 = new flash.geom.Matrix();
var _local4;
_local4 = Math.min(ICON_WIDTH / _local5, ICON_HEIGHT / _local6);
_local7.translate(-_local10, -_local9);
_local7.scale(_local4, _local4);
_local7.translate((ICON_WIDTH - (_local5 * _local4)) / 2, (ICON_HEIGHT - (_local6 * _local4)) / 2);
_local8.draw(source, _local7);
_iconLoader.__set__bitmapData(_local8);
}
function attachIcon(parent) {
if (_iconLoader) {
return(_iconLoader.attachBitmap(parent));
}
com.newgrounds.Logger.logError("No icon available for this sumbission.");
return(null);
}
function deleteFile() {
if (!_group.__get__connection().__get__hasUserSession()) {
com.newgrounds.Logger.logError("The user must be logged-in to delete a file.");
dispatchEvent(new com.newgrounds.APIEvent(com.newgrounds.APIEvent.FILE_DELETED, null, com.newgrounds.APIEvent.ERROR_NOT_LOGGED_IN));
return(undefined);
}
if (!_id) {
com.newgrounds.Logger.logError("The file does not exist.");
dispatchEvent(new com.newgrounds.APIEvent(com.newgrounds.APIEvent.FILE_DELETED, null, com.newgrounds.APIEvent.ERROR_NOT_LOGGED_IN));
return(undefined);
}
var _local2 = new com.newgrounds.APICommand("deleteSaveFile");
_local2.__get__secureParameters().save_id = _id;
_local2.addEventListener(com.newgrounds.APIEvent.COMMAND_COMPLETE, {target:this, func:onFileDeleted});
_group.__get__connection().sendCommand(_local2);
}
function save() {
if (!_group.__get__connection().__get__hasUserSession()) {
com.newgrounds.Logger.logError("The user must be logged-in to save a file.");
dispatchEvent(new com.newgrounds.APIEvent(com.newgrounds.APIEvent.FILE_SAVED, null, com.newgrounds.APIEvent.ERROR_NOT_LOGGED_IN));
return(undefined);
}
com.newgrounds.BitmapLoader._cacheSeed++;
_currentFile = this;
if (iconLoaded) {
ICON_IMAGE_SCANNER.encode(icon, onIconEncoded, this);
return(undefined);
}
encodeData(true);
}
function onIconEncoded(encodedIcon) {
_encodedIcon = encodedIcon;
encodeData(true);
}
function doSave() {
var _local4 = new com.newgrounds.APICommand("saveFile");
_local4.__get__secureParameters().group = _group.id;
_local4.__get__secureParameters().user_name = _group.__get__connection().username;
_local4.__get__secureParameters().filename = _name;
_local4.__get__secureParameters().description = _description;
if (_draft) {
_local4.__get__secureParameters().draft = true;
}
if (_id && (!_readOnly)) {
_local4.__get__secureParameters().overwrite = 1;
_local4.__get__secureParameters().save_id = _id;
}
var _local7 = [];
for (var _local9 in _keys) {
var _local3 = _group.getKey(_local9);
if (_local3) {
_local7.push({id:_local3.__get__id(), value:_local3.validateValue(_keys[_local9])});
} else {
com.newgrounds.Logger.logError(((("No key named \"" + _local9) + "\" in save group \"") + _group.__get__name()) + "\".");
}
}
_local4.__get__secureParameters().keys = _local7;
var _local8 = [];
for (var _local10 in _ratings) {
var _local2 = _group.getRating(_local10);
if (_local2) {
_local8.push({id:_local2.__get__id(), value:_local2.validateValue(_ratings[_local10])});
} else {
com.newgrounds.Logger.logError(((("No rating named \"" + _local10) + "\" in save group \"") + _group.__get__name()) + "\".");
}
}
_local4.__get__secureParameters().ratings = _local8;
if (typeof(_encodedData) == "string") {
_local4.addFile("file", _encodedData, "file");
} else {
_local4.addFile("file", com.newgrounds.encoders.json.JSON.encode(_encodedData), "file");
}
if (iconLoaded) {
_local4.addFile("thumbnail", _encodedIcon, "thumbnail");
}
_local4.addEventListener(com.newgrounds.APIEvent.COMMAND_COMPLETE, {target:this, func:onSaveComplete});
_group.__get__connection().sendCommand(_local4);
}
function encodeData(encode) {
_encoderQueue = [];
_encoding = encode;
if (encode) {
_encodedData = _data;
preEncodeObject(this, "_encodedData");
} else {
preEncodeObject(this, "_data");
}
encodeObject();
}
function preEncodeObject(parent, property) {
var _local3 = parent[property];
var _local5;
if (_encoding) {
_local5 = _local3 instanceof flash.display.BitmapData;
} else {
_local5 = _local3.type == "__bitmap";
}
var _local2 = _local3;
var _local7;
if (_local5) {
_encoderQueue.push({parent:parent, property:property});
return(undefined);
}
if ((typeof(_local3) == "object") && (!_local7)) {
if (_encoding) {
if (_local3 instanceof Array) {
_local2 = [];
} else {
_local2 = {};
}
for (var _local4 in _local3) {
_local2[_local4] = _local3[_local4];
}
parent[property] = _local2;
}
for (var _local4 in _local2) {
preEncodeObject(_local2, _local4);
}
}
}
function encodeObject() {
if (!_encoderQueue.length) {
if (_encoding) {
doSave();
} else {
_dataLoaded = true;
checkLoadComplete();
}
return(undefined);
}
var _local6 = _encoderQueue.pop();
var _local4 = _local6.parent;
var _local5 = _local6.property;
var _local2 = _local4[_local5];
var _local3;
if (_encoding) {
_local3 = {type:"__bitmap", width:_local2.width, height:_local2.height, transparent:_local2.transparent};
_local4[_local5] = _local3;
_encodingParent = _local3;
_encodingProperty = "data";
DATA_IMAGE_SCANNER.__set__encodeAlpha(_local2.transparent);
DATA_IMAGE_SCANNER.encode(flash.display.BitmapData(_local2), encodeBitmapComplete, this);
return(undefined);
}
_encodingParent = _local4;
_encodingProperty = _local5;
DATA_IMAGE_SCANNER.__set__encodeAlpha(_local2.transparent);
DATA_IMAGE_SCANNER.decode(String(_local2.data), encodeBitmapComplete, this);
}
function encodeBitmapComplete(data) {
_encodingParent[_encodingProperty] = data;
encodeObject();
}
function load() {
_currentFile = this;
_dataLoaded = false;
_data = null;
if (!iconLoaded) {
_iconLoader.addEventListener(com.newgrounds.APIEvent.ICON_LOADED, {target:this, func:onIconLoaded});
_iconLoader.load();
}
_dataLoader = new LoadVars();
var file = this;
_dataLoader.onData = function (data) {
file.onDataLoaded(data);
};
_dataLoader.load((_dataURL + "&random=") + Math.random());
}
function onIconLoaded(event) {
if ((!event.__get__success()) && (_iconLoader.__get__url())) {
com.newgrounds.Logger.logWarning("Unable to load the icon for this save file.");
}
_iconLoader.removeEventListener(com.newgrounds.APIEvent.ICON_LOADED, onIconLoaded);
checkLoadComplete();
}
function checkLoadComplete() {
if (_dataLoaded && (iconLoaded)) {
com.newgrounds.Logger.logMessage("Data loaded.");
dispatchEvent(new com.newgrounds.APIEvent(com.newgrounds.APIEvent.FILE_LOADED, this));
}
}
function onDataLoaded(data) {
if (data) {
if (data.charAt(0) == "{") {
_data = com.newgrounds.encoders.json.JSON.decode(String(data));
} else {
_data = String(data);
}
encodeData(false);
}
return(undefined);
}
function onDataError(error) {
com.newgrounds.Logger.logError("Unable to load data:", error);
dispatchEvent(new com.newgrounds.APIEvent(com.newgrounds.APIEvent.FILE_LOADED, this, com.newgrounds.APIEvent.ERROR_BAD_FILE));
}
function onSaveComplete(event) {
if (event.__get__success()) {
com.newgrounds.Logger.logMessage(("File \"" + _name) + "\" saved!");
if (event.__get__data()) {
_id = event.__get__data().save_id;
_dataURL = unescape(event.__get__data().file_url);
}
dispatchEvent(new com.newgrounds.APIEvent(com.newgrounds.APIEvent.FILE_SAVED, this));
return(undefined);
}
com.newgrounds.Logger.logError(("Error saving file \"" + _name) + "\":", event.__get__error());
dispatchEvent(new com.newgrounds.APIEvent(com.newgrounds.APIEvent.FILE_SAVED, this, event.__get__error()));
}
function sendVote(ratingName, vote) {
var _local2 = _group.getRating(ratingName);
if (!_local2) {
com.newgrounds.Logger.logError(("No save rating named \"" + ratingName) + "\" exists for this save group.");
dispatchEvent(new com.newgrounds.APIEvent(com.newgrounds.APIEvent.VOTE_COMPLETE, {}, com.newgrounds.APIEvent.ERROR_INVALID_ARGUMENT));
return(undefined);
}
vote = _local2.validateValue(vote);
if (isNaN(vote)) {
com.newgrounds.Logger.logError(((((((("Invalid vote (" + vote) + "). ") + ratingName) + " allows a range of ") + _local2.__get__minimum()) + "-") + _local2.__get__maximum()) + ".");
dispatchEvent(new com.newgrounds.APIEvent(com.newgrounds.APIEvent.VOTE_COMPLETE, {}, com.newgrounds.APIEvent.ERROR_INVALID_ARGUMENT));
return(undefined);
}
com.newgrounds.Logger.logMessage(((((("Voting " + vote) + " for ") + ratingName) + " on ") + _name) + "...");
_group.__get__connection().sendSimpleCommand("rateSaveFile", {target:this, func:onVoteComplete}, null, {group:_group.__get__id(), save_id:_id, rating_id:_local2.__get__id(), vote:vote});
}
function onVoteComplete(event) {
var _local3 = event.__get__error();
if (event.__get__data().already_voted) {
com.newgrounds.Logger.logError("Vote failed. You've already voted on this rating today.");
_local3 = com.newgrounds.APIEvent.ERROR_ALREADY_VOTED;
}
if (_local3 == com.newgrounds.APIEvent.ERROR_NONE) {
var _local2 = _group.getRatingById(event.__get__data().rating_id);
if (_local2) {
_ratings[_local2.__get__name()] = _local2.validateValue(event.__get__data().score);
}
com.newgrounds.Logger.logMessage("Vote complete!");
}
dispatchEvent(new com.newgrounds.APIEvent(com.newgrounds.APIEvent.VOTE_COMPLETE, this, _local3));
}
function onFileDeleted(event) {
if (event.__get__success()) {
_id = 0;
}
dispatchEvent(new com.newgrounds.APIEvent(com.newgrounds.APIEvent.FILE_DELETED, this, event.__get__error()));
}
function clone() {
var _local3 = new com.newgrounds.SaveFile(_group);
_local3._data = _data;
_local3._description = _description;
_local3._draft = _draft;
_local3._fileSize = _fileSize;
_local3._iconLoader.__set__bitmapData(_iconLoader.bitmapData);
var _local2;
for (_local2 in _keys) {
_local3._keys[_local2] = _keys[_local2];
}
for (_local2 in _ratings) {
_local3._ratings[_local2] = _ratings[_local2];
}
for (_local2 in _numVotes) {
_local3._numVotes[_local2] = _numVotes[_local2];
}
_local3._name = _name;
return(_local3);
}
static var ICON_WIDTH = 90;
static var ICON_HEIGHT = 90;
static var DEFAULT_ICON = new flash.display.BitmapData(ICON_WIDTH, ICON_HEIGHT, false, 0);
static var STATUS_PRIVATE = 0;
static var STATUS_SHARED = 1;
static var STATUS_UNAPPROVED = 2;
static var STATUS_APPROVED = 3;
static var _imageFilePath = "";
static var _saveFilePath = "";
static var ICON_IMAGE_SCANNER = new com.newgrounds.encoders.ImageScanner();
static var DATA_IMAGE_SCANNER = new com.newgrounds.encoders.ImageScanner(64, 6);
}
Symbol 1146 MovieClip [__Packages.com.newgrounds.SaveQuery] Frame 0
class com.newgrounds.SaveQuery extends com.newgrounds.APIEventDispatcher
{
var _group, _connection, _files, _lookupKeys, _lookupRatings, _fileConditions, _keyConditions, _ratingConditions, _sortFields, dispatchEvent;
function SaveQuery (group) {
super();
_group = group;
_connection = group.connection;
reset();
}
function get group() {
return(_group);
}
function get resultsPerPage() {
return(_resultsPerPage);
}
function set resultsPerPage(val) {
_resultsPerPage = Math.min(Math.max(val, 1), 100);
//return(resultsPerPage);
}
function get page() {
return(_page);
}
function set page(val) {
_page = Math.max(val, 1);
//return(page);
}
function prevPage() {
page = (page - 1);
}
function nextPage() {
page = (page + 1);
}
function get isRandomized() {
return(_isRandomized);
}
function set isRandomized(val) {
_isRandomized = val;
//return(isRandomized);
}
function get files() {
return(_files);
}
function reset() {
_page = 1;
_resultsPerPage = 10;
_isRandomized = false;
_lookupKeys = [];
_lookupRatings = [];
_fileConditions = [];
_keyConditions = [];
_ratingConditions = [];
_sortFields = [];
_files = [];
includeAllFields();
}
function clone() {
var _local2 = new com.newgrounds.SaveQuery(_group);
_local2._page = _page;
_local2._resultsPerPage = _resultsPerPage;
_local2._isRandomized = _isRandomized;
_local2._lookupKeys = _lookupKeys.concat();
_local2._lookupRatings = _lookupRatings.concat();
_local2._fileConditions = _fileConditions.concat();
_local2._keyConditions = _keyConditions.concat();
_local2._ratingConditions = _ratingConditions.concat();
return(_local2);
}
function includeAllFields() {
for (var _local4 in _group.__get__keys()) {
var _local3 = _group.__get__keys()[_local4];
_lookupKeys.push(_local3.__get__id());
}
for (var _local5 in _group.__get__ratings()) {
var _local2 = _group.__get__ratings()[_local5];
_lookupRatings.push(_local2.__get__id());
}
}
function addCondition(field, operator, value) {
var _local2;
_local2 = 0;
while (_local2 < FILE_FIELDS.length) {
if (FILE_FIELDS[_local2] == field) {
break;
}
_local2++;
}
if (_local2 == FILE_FIELDS.length) {
_local2 = -1;
}
if (_local2 >= 0) {
_fileConditions.push({field:_local2, operator:operator, value:value});
return(undefined);
}
var _local5 = _group.getKey(field);
if (_local5) {
value = _local5.validateValue(value);
_keyConditions.push({key_id:_local5.__get__id(), operator:operator, value:value});
return(undefined);
}
var _local6 = field.split(".");
var _local4 = _group.getRating(_local6[0]);
if (_local4) {
if (_local6[1] != "votes") {
value = _local4.validateValue(value);
}
_ratingConditions.push({rating_id:_local4.__get__id(), operator:operator, value:value, column:_local6[1] || "score"});
return(undefined);
}
com.newgrounds.Logger.logError(((("The save group \"" + _group.__get__name()) + "\" does not have a field named \"") + field) + "\".");
}
function sortOn(field, sortDescending) {
if (sortDescending == undefined) {
sortDescending = false;
}
var _local2;
_local2 = 0;
while (_local2 < FILE_FIELDS.length) {
if (FILE_FIELDS[_local2] == field) {
break;
}
_local2++;
}
if (_local2 == FILE_FIELDS.length) {
_local2 = -1;
}
if (_local2 >= 0) {
_sortFields.push({table:TABLE_FILES, field:_local2, desc:sortDescending});
return(undefined);
}
var _local5 = _group.getKey(field);
if (_local5) {
_sortFields.push({table:TABLE_KEYS, field:_local5.__get__id(), desc:sortDescending});
return(undefined);
}
var _local6 = field.split(".");
var _local4 = _group.getRating(_local6[0]);
if (_local4) {
_sortFields.push({table:TABLE_RATINGS, field:_local4.__get__id(), desc:sortDescending, extra:_local6[1] || "score"});
return(undefined);
}
com.newgrounds.Logger.logError(((("The save group \"" + _group.__get__name()) + "\" does not have a field named \"") + field) + "\".");
}
function execute() {
var _local2 = {};
_local2.page = _page;
_local2.num_results = _resultsPerPage;
if (_isRandomized) {
_local2.randomize = 1;
}
if (_lookupKeys && (_lookupKeys.length)) {
_local2.lookup_keys = _lookupKeys;
}
if (_lookupRatings && (_lookupRatings.length)) {
_local2.lookup_ratings = _lookupRatings;
}
if (_fileConditions && (_fileConditions.length)) {
_local2.file_conditions = _fileConditions;
}
if (_keyConditions && (_keyConditions.length)) {
_local2.key_conditions = _keyConditions;
}
if (_ratingConditions && (_ratingConditions.length)) {
_local2.rating_conditions = _ratingConditions;
}
if (_sortFields && (_sortFields.length)) {
_local2.sort_conditions = _sortFields;
}
_connection.sendSimpleCommand("lookupSaveFiles", {target:this, func:onQueryComplete}, {publisher_id:_connection.publisherId, group_id:_group.__get__id(), query:_local2});
}
function onQueryComplete(event) {
if (event.__get__success()) {
var _local4 = event.__get__data();
_files = [];
if (_local4.files) {
var _local3 = 0;
while (_local3 < _local4.files.length) {
var _local2 = com.newgrounds.SaveFile.fromObject(_group, _local4.files[_local3]);
if (_local2) {
_files.push(_local2);
}
_local3++;
}
}
dispatchEvent(new com.newgrounds.APIEvent(com.newgrounds.APIEvent.QUERY_COMPLETE, this));
return(undefined);
}
com.newgrounds.Logger.logError("Query failed: " + event.__get__error());
dispatchEvent(new com.newgrounds.APIEvent(com.newgrounds.APIEvent.QUERY_COMPLETE, this, event.__get__error()));
}
static var FILE_ID = "fileId";
static var AUTHOR_ID = "authorId";
static var AUTHOR_NAME = "authorName";
static var FILE_NAME = "fileName";
static var CREATED_ON = "createdOn";
static var UPDATED_ON = "updatedOn";
static var FILE_VIEWS = "fileViews";
static var FILE_STATUS = "fileStatus";
static var FILE_FIELDS = [FILE_ID, AUTHOR_ID, AUTHOR_NAME, FILE_NAME, CREATED_ON, UPDATED_ON, FILE_VIEWS, FILE_STATUS];
static var OPERATOR_EQUAL = "=";
static var OPERATOR_LESS_THAN = "<";
static var OPERATOR_GREATER_THAN = ">";
static var OPERATOR_NOT_EQUAL = "!=";
static var OPERATOR_LESS_OR_EQUAL = "<=";
static var OPERATOR_GREATER_OR_EQUAL = ">=";
static var OPERATOR_CONTAINS = "*";
static var OPERATOR_NOT_CONTAINS = "!*";
static var OPERATOR_NOT_BEGINS_WITH = "!*=";
static var OPERATOR_NOT_ENDS_WITH = "!=*";
static var OPERATOR_BEGINS_WITH = "*=";
static var OPERATOR_ENDS_WITH = "=*";
static var TABLE_FILES = 1;
static var TABLE_KEYS = 2;
static var TABLE_RATINGS = 3;
var _page = 1;
var _resultsPerPage = 10;
var _isRandomized = false;
}
Symbol 1147 MovieClip [__Packages.mx.skins.ColoredSkinElement] Frame 0
class mx.skins.ColoredSkinElement
{
var getStyle, _color, onEnterFrame;
function ColoredSkinElement () {
}
function setColor(c) {
if (c != undefined) {
var _local2 = new Color(this);
_local2.setRGB(c);
}
}
function draw(Void) {
setColor(getStyle(_color));
onEnterFrame = undefined;
}
function invalidateStyle(Void) {
onEnterFrame = draw;
}
static function setColorStyle(p, colorStyle) {
if (p._color == undefined) {
p._color = colorStyle;
}
p.setColor = mixins.setColor;
p.invalidateStyle = mixins.invalidateStyle;
p.draw = mixins.draw;
p.setColor(p.getStyle(colorStyle));
}
static var mixins = new mx.skins.ColoredSkinElement();
}
Symbol 1148 MovieClip [__Packages.mx.core.UIObject] Frame 0
class mx.core.UIObject extends MovieClip
{
var _width, _height, _x, _y, _parent, _minHeight, _minWidth, _visible, dispatchEvent, _xscale, _yscale, methodTable, onEnterFrame, tfList, __width, __height, moveTo, lineTo, createTextField, attachMovie, buildDepthTable, findNextAvailableDepth, idNames, childrenCreated, _name, createAccessibilityImplementation, _endInit, validateNow, hasOwnProperty, initProperties, stylecache, className, ignoreClassStyleDeclaration, _tf, fontFamily, fontSize, color, marginLeft, marginRight, fontStyle, fontWeight, textAlign, textIndent, textDecoration, embedFonts, styleName, enabled;
function UIObject () {
super();
constructObject();
}
function get width() {
return(_width);
}
function get height() {
return(_height);
}
function get left() {
return(_x);
}
function get x() {
return(_x);
}
function get top() {
return(_y);
}
function get y() {
return(_y);
}
function get right() {
return(_parent.width - (_x + width));
}
function get bottom() {
return(_parent.height - (_y + height));
}
function getMinHeight(Void) {
return(_minHeight);
}
function setMinHeight(h) {
_minHeight = h;
}
function get minHeight() {
return(getMinHeight());
}
function set minHeight(h) {
setMinHeight(h);
//return(minHeight);
}
function getMinWidth(Void) {
return(_minWidth);
}
function setMinWidth(w) {
_minWidth = w;
}
function get minWidth() {
return(getMinWidth());
}
function set minWidth(w) {
setMinWidth(w);
//return(minWidth);
}
function setVisible(x, noEvent) {
if (x != _visible) {
_visible = x;
if (noEvent != true) {
dispatchEvent({type:(x ? "reveal" : "hide")});
}
}
}
function get visible() {
return(_visible);
}
function set visible(x) {
setVisible(x, false);
//return(visible);
}
function get scaleX() {
return(_xscale);
}
function set scaleX(x) {
_xscale = x;
//return(scaleX);
}
function get scaleY() {
return(_yscale);
}
function set scaleY(y) {
_yscale = y;
//return(scaleY);
}
function doLater(obj, fn) {
if (methodTable == undefined) {
methodTable = new Array();
}
methodTable.push({obj:obj, fn:fn});
onEnterFrame = doLaterDispatcher;
}
function doLaterDispatcher(Void) {
delete onEnterFrame;
if (invalidateFlag) {
redraw();
}
var _local3 = methodTable;
methodTable = new Array();
if (_local3.length > 0) {
var _local2;
while (_local2 = _local3.shift() , _local2 != undefined) {
_local2.obj[_local2.fn]();
}
}
}
function cancelAllDoLaters(Void) {
delete onEnterFrame;
methodTable = new Array();
}
function invalidate(Void) {
invalidateFlag = true;
onEnterFrame = doLaterDispatcher;
}
function invalidateStyle(Void) {
invalidate();
}
function redraw(bAlways) {
if (invalidateFlag || (bAlways)) {
invalidateFlag = false;
var _local2;
for (_local2 in tfList) {
tfList[_local2].draw();
}
draw();
dispatchEvent({type:"draw"});
}
}
function draw(Void) {
}
function move(x, y, noEvent) {
var _local3 = _x;
var _local2 = _y;
_x = x;
_y = y;
if (noEvent != true) {
dispatchEvent({type:"move", oldX:_local3, oldY:_local2});
}
}
function setSize(w, h, noEvent) {
var _local3 = __width;
var _local2 = __height;
__width = w;
__height = h;
size();
if (noEvent != true) {
dispatchEvent({type:"resize", oldWidth:_local3, oldHeight:_local2});
}
}
function size(Void) {
_width = __width;
_height = __height;
}
function drawRect(x1, y1, x2, y2) {
moveTo(x1, y1);
lineTo(x2, y1);
lineTo(x2, y2);
lineTo(x1, y2);
lineTo(x1, y1);
}
function createLabel(name, depth, text) {
createTextField(name, depth, 0, 0, 0, 0);
var _local2 = this[name];
_local2._color = textColorList;
_local2._visible = false;
_local2.__text = text;
if (tfList == undefined) {
tfList = new Object();
}
tfList[name] = _local2;
_local2.invalidateStyle();
invalidate();
_local2.styleName = this;
return(_local2);
}
function createObject(linkageName, id, depth, initobj) {
return(attachMovie(linkageName, id, depth, initobj));
}
function createClassObject(className, id, depth, initobj) {
var _local3 = className.symbolName == undefined;
if (_local3) {
Object.registerClass(className.symbolOwner.symbolName, className);
}
var _local4 = mx.core.UIObject(createObject(className.symbolOwner.symbolName, id, depth, initobj));
if (_local3) {
Object.registerClass(className.symbolOwner.symbolName, className.symbolOwner);
}
return(_local4);
}
function createEmptyObject(id, depth) {
return(createClassObject(mx.core.UIObject, id, depth));
}
function destroyObject(id) {
var _local2 = this[id];
if (_local2.getDepth() < 0) {
var _local4 = buildDepthTable();
var _local5 = findNextAvailableDepth(0, _local4, "up");
var _local3 = _local5;
_local2.swapDepths(_local3);
}
_local2.removeMovieClip();
delete this[id];
}
function getSkinIDName(tag) {
return(idNames[tag]);
}
function setSkin(tag, linkageName, initObj) {
if (_global.skinRegistry[linkageName] == undefined) {
mx.skins.SkinElement.registerElement(linkageName, mx.skins.SkinElement);
}
return(createObject(linkageName, getSkinIDName(tag), tag, initObj));
}
function createSkin(tag) {
var _local2 = getSkinIDName(tag);
createEmptyObject(_local2, tag);
return(this[_local2]);
}
function createChildren(Void) {
}
function _createChildren(Void) {
createChildren();
childrenCreated = true;
}
function constructObject(Void) {
if (_name == undefined) {
return(undefined);
}
init();
_createChildren();
createAccessibilityImplementation();
_endInit();
if (validateNow) {
redraw(true);
} else {
invalidate();
}
}
function initFromClipParameters(Void) {
var _local4 = false;
var _local2;
for (_local2 in clipParameters) {
if (hasOwnProperty(_local2)) {
_local4 = true;
this["def_" + _local2] = this[_local2];
delete this[_local2];
}
}
if (_local4) {
for (_local2 in clipParameters) {
var _local3 = this["def_" + _local2];
if (_local3 != undefined) {
this[_local2] = _local3;
}
}
}
}
function init(Void) {
__width = _width;
__height = _height;
if (initProperties == undefined) {
initFromClipParameters();
} else {
initProperties();
}
if (_global.cascadingStyles == true) {
stylecache = new Object();
}
}
function getClassStyleDeclaration(Void) {
var _local4 = this;
var _local3 = className;
while (_local3 != undefined) {
if (ignoreClassStyleDeclaration[_local3] == undefined) {
if (_global.styles[_local3] != undefined) {
return(_global.styles[_local3]);
}
}
_local4 = _local4.__proto__;
_local3 = _local4.className;
}
}
function setColor(color) {
}
function __getTextFormat(tf, bAll) {
var _local8 = stylecache.tf;
if (_local8 != undefined) {
var _local3;
for (_local3 in mx.styles.StyleManager.TextFormatStyleProps) {
if (bAll || (mx.styles.StyleManager.TextFormatStyleProps[_local3])) {
if (tf[_local3] == undefined) {
tf[_local3] = _local8[_local3];
}
}
}
return(false);
}
var _local6 = false;
for (var _local3 in mx.styles.StyleManager.TextFormatStyleProps) {
if (bAll || (mx.styles.StyleManager.TextFormatStyleProps[_local3])) {
if (tf[_local3] == undefined) {
var _local5 = _tf[_local3];
if (_local5 != undefined) {
tf[_local3] = _local5;
} else if ((_local3 == "font") && (fontFamily != undefined)) {
tf[_local3] = fontFamily;
} else if ((_local3 == "size") && (fontSize != undefined)) {
tf[_local3] = fontSize;
} else if ((_local3 == "color") && (color != undefined)) {
tf[_local3] = color;
} else if ((_local3 == "leftMargin") && (marginLeft != undefined)) {
tf[_local3] = marginLeft;
} else if ((_local3 == "rightMargin") && (marginRight != undefined)) {
tf[_local3] = marginRight;
} else if ((_local3 == "italic") && (fontStyle != undefined)) {
tf[_local3] = fontStyle == _local3;
} else if ((_local3 == "bold") && (fontWeight != undefined)) {
tf[_local3] = fontWeight == _local3;
} else if ((_local3 == "align") && (textAlign != undefined)) {
tf[_local3] = textAlign;
} else if ((_local3 == "indent") && (textIndent != undefined)) {
tf[_local3] = textIndent;
} else if ((_local3 == "underline") && (textDecoration != undefined)) {
tf[_local3] = textDecoration == _local3;
} else if ((_local3 == "embedFonts") && (embedFonts != undefined)) {
tf[_local3] = embedFonts;
} else {
_local6 = true;
}
}
}
}
if (_local6) {
var _local9 = styleName;
if (_local9 != undefined) {
if (typeof(_local9) != "string") {
_local6 = _local9.__getTextFormat(tf, true, this);
} else if (_global.styles[_local9] != undefined) {
_local6 = _global.styles[_local9].__getTextFormat(tf, true, this);
}
}
}
if (_local6) {
var _local10 = getClassStyleDeclaration();
if (_local10 != undefined) {
_local6 = _local10.__getTextFormat(tf, true, this);
}
}
if (_local6) {
if (_global.cascadingStyles) {
if (_parent != undefined) {
_local6 = _parent.__getTextFormat(tf, false);
}
}
}
if (_local6) {
_local6 = _global.style.__getTextFormat(tf, true, this);
}
return(_local6);
}
function _getTextFormat(Void) {
var _local2 = stylecache.tf;
if (_local2 != undefined) {
return(_local2);
}
_local2 = new TextFormat();
__getTextFormat(_local2, true);
stylecache.tf = _local2;
if (enabled == false) {
var _local3 = getStyle("disabledColor");
_local2.color = _local3;
}
return(_local2);
}
function getStyleName(Void) {
var _local2 = styleName;
if (_local2 != undefined) {
if (typeof(_local2) != "string") {
return(_local2.getStyleName());
}
return(_local2);
}
if (_parent != undefined) {
return(_parent.getStyleName());
}
return(undefined);
}
function getStyle(styleProp) {
var _local3;
_global.getStyleCounter++;
if (this[styleProp] != undefined) {
return(this[styleProp]);
}
var _local6 = styleName;
if (_local6 != undefined) {
if (typeof(_local6) != "string") {
_local3 = _local6.getStyle(styleProp);
} else {
var _local7 = _global.styles[_local6];
_local3 = _local7.getStyle(styleProp);
}
}
if (_local3 != undefined) {
return(_local3);
}
var _local7 = getClassStyleDeclaration();
if (_local7 != undefined) {
_local3 = _local7[styleProp];
}
if (_local3 != undefined) {
return(_local3);
}
if (_global.cascadingStyles) {
if (mx.styles.StyleManager.isInheritingStyle(styleProp) || (mx.styles.StyleManager.isColorStyle(styleProp))) {
var _local5 = stylecache;
if (_local5 != undefined) {
if (_local5[styleProp] != undefined) {
return(_local5[styleProp]);
}
}
if (_parent != undefined) {
_local3 = _parent.getStyle(styleProp);
} else {
_local3 = _global.style[styleProp];
}
if (_local5 != undefined) {
_local5[styleProp] = _local3;
}
return(_local3);
}
}
if (_local3 == undefined) {
_local3 = _global.style[styleProp];
}
return(_local3);
}
static function mergeClipParameters(o, p) {
for (var _local3 in p) {
o[_local3] = p[_local3];
}
return(true);
}
static var symbolName = "UIObject";
static var symbolOwner = mx.core.UIObject;
static var version = "2.0.2.127";
static var textColorList = {color:1, disabledColor:1};
var invalidateFlag = false;
var lineWidth = 1;
var lineColor = 0;
var tabEnabled = false;
var clipParameters = {visible:1, minHeight:1, minWidth:1, maxHeight:1, maxWidth:1, preferredHeight:1, preferredWidth:1};
}
Symbol 1149 MovieClip [__Packages.mx.skins.SkinElement] Frame 0
class mx.skins.SkinElement extends MovieClip
{
var _visible, _x, _y, _width, _height;
function SkinElement () {
super();
}
static function registerElement(name, className) {
Object.registerClass(name, ((className == undefined) ? (mx.skins.SkinElement) : (className)));
_global.skinRegistry[name] = true;
}
function __set__visible(visible) {
_visible = visible;
}
function move(x, y) {
_x = x;
_y = y;
}
function setSize(w, h) {
_width = w;
_height = h;
}
}
Symbol 1150 MovieClip [__Packages.mx.styles.CSSTextStyles] Frame 0
class mx.styles.CSSTextStyles
{
function CSSTextStyles () {
}
static function addTextStyles(o, bColor) {
o.addProperty("textAlign", function () {
return(this._tf.align);
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.align = x;
});
o.addProperty("fontWeight", function () {
return(((this._tf.bold != undefined) ? ((this._tf.bold ? "bold" : "none")) : undefined));
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.bold = x == "bold";
});
if (bColor) {
o.addProperty("color", function () {
return(this._tf.color);
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.color = x;
});
}
o.addProperty("fontFamily", function () {
return(this._tf.font);
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.font = x;
});
o.addProperty("textIndent", function () {
return(this._tf.indent);
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.indent = x;
});
o.addProperty("fontStyle", function () {
return(((this._tf.italic != undefined) ? ((this._tf.italic ? "italic" : "none")) : undefined));
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.italic = x == "italic";
});
o.addProperty("marginLeft", function () {
return(this._tf.leftMargin);
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.leftMargin = x;
});
o.addProperty("marginRight", function () {
return(this._tf.rightMargin);
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.rightMargin = x;
});
o.addProperty("fontSize", function () {
return(this._tf.size);
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.size = x;
});
o.addProperty("textDecoration", function () {
return(((this._tf.underline != undefined) ? ((this._tf.underline ? "underline" : "none")) : undefined));
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.underline = x == "underline";
});
o.addProperty("embedFonts", function () {
return(this._tf.embedFonts);
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.embedFonts = x;
});
}
}
Symbol 1151 MovieClip [__Packages.mx.styles.CSSStyleDeclaration] Frame 0
class mx.styles.CSSStyleDeclaration
{
var _tf;
function CSSStyleDeclaration () {
}
function __getTextFormat(tf, bAll) {
var _local5 = false;
if (_tf != undefined) {
var _local2;
for (_local2 in mx.styles.StyleManager.TextFormatStyleProps) {
if (bAll || (mx.styles.StyleManager.TextFormatStyleProps[_local2])) {
if (tf[_local2] == undefined) {
var _local3 = _tf[_local2];
if (_local3 != undefined) {
tf[_local2] = _local3;
} else {
_local5 = true;
}
}
}
}
} else {
_local5 = true;
}
return(_local5);
}
function getStyle(styleProp) {
var _local2 = this[styleProp];
var _local3 = mx.styles.StyleManager.getColorName(_local2);
return(((_local3 == undefined) ? (_local2) : (_local3)));
}
static function classConstruct() {
mx.styles.CSSTextStyles.addTextStyles(mx.styles.CSSStyleDeclaration.prototype, true);
return(true);
}
static var classConstructed = classConstruct();
static var CSSTextStylesDependency = mx.styles.CSSTextStyles;
}
Symbol 1152 MovieClip [__Packages.mx.styles.StyleManager] Frame 0
class mx.styles.StyleManager
{
function StyleManager () {
}
static function registerInheritingStyle(styleName) {
inheritingStyles[styleName] = true;
}
static function isInheritingStyle(styleName) {
return(inheritingStyles[styleName] == true);
}
static function registerColorStyle(styleName) {
colorStyles[styleName] = true;
}
static function isColorStyle(styleName) {
return(colorStyles[styleName] == true);
}
static function registerColorName(colorName, colorValue) {
colorNames[colorName] = colorValue;
}
static function isColorName(colorName) {
return(colorNames[colorName] != undefined);
}
static function getColorName(colorName) {
return(colorNames[colorName]);
}
static var inheritingStyles = {color:true, direction:true, fontFamily:true, fontSize:true, fontStyle:true, fontWeight:true, textAlign:true, textIndent:true};
static var colorStyles = {barColor:true, trackColor:true, borderColor:true, buttonColor:true, color:true, dateHeaderColor:true, dateRollOverColor:true, disabledColor:true, fillColor:true, highlightColor:true, scrollTrackColor:true, selectedDateColor:true, shadowColor:true, strokeColor:true, symbolBackgroundColor:true, symbolBackgroundDisabledColor:true, symbolBackgroundPressedColor:true, symbolColor:true, symbolDisabledColor:true, themeColor:true, todayIndicatorColor:true, shadowCapColor:true, borderCapColor:true, focusColor:true};
static var colorNames = {black:0, white:16777215, red:16711680, green:65280, blue:255, magenta:16711935, yellow:16776960, cyan:65535, haloGreen:8453965, haloBlue:2881013, haloOrange:16761344};
static var TextFormatStyleProps = {font:true, size:true, color:true, leftMargin:false, rightMargin:false, italic:true, bold:true, align:true, indent:true, underline:false, embedFonts:false};
static var TextStyleMap = {textAlign:true, fontWeight:true, color:true, fontFamily:true, textIndent:true, fontStyle:true, lineHeight:true, marginLeft:true, marginRight:true, fontSize:true, textDecoration:true, embedFonts:true};
}
Symbol 1153 MovieClip [__Packages.mx.managers.DepthManager] Frame 0
class mx.managers.DepthManager
{
var _childCounter, createClassObject, createObject, _parent, swapDepths, _topmost, getDepth;
function DepthManager () {
MovieClip.prototype.createClassChildAtDepth = createClassChildAtDepth;
MovieClip.prototype.createChildAtDepth = createChildAtDepth;
MovieClip.prototype.setDepthTo = setDepthTo;
MovieClip.prototype.setDepthAbove = setDepthAbove;
MovieClip.prototype.setDepthBelow = setDepthBelow;
MovieClip.prototype.findNextAvailableDepth = findNextAvailableDepth;
MovieClip.prototype.shuffleDepths = shuffleDepths;
MovieClip.prototype.getDepthByFlag = getDepthByFlag;
MovieClip.prototype.buildDepthTable = buildDepthTable;
_global.ASSetPropFlags(MovieClip.prototype, "createClassChildAtDepth", 1);
_global.ASSetPropFlags(MovieClip.prototype, "createChildAtDepth", 1);
_global.ASSetPropFlags(MovieClip.prototype, "setDepthTo", 1);
_global.ASSetPropFlags(MovieClip.prototype, "setDepthAbove", 1);
_global.ASSetPropFlags(MovieClip.prototype, "setDepthBelow", 1);
_global.ASSetPropFlags(MovieClip.prototype, "findNextAvailableDepth", 1);
_global.ASSetPropFlags(MovieClip.prototype, "shuffleDepths", 1);
_global.ASSetPropFlags(MovieClip.prototype, "getDepthByFlag", 1);
_global.ASSetPropFlags(MovieClip.prototype, "buildDepthTable", 1);
}
static function sortFunction(a, b) {
if (a.getDepth() > b.getDepth()) {
return(1);
}
return(-1);
}
static function test(depth) {
if (depth == reservedDepth) {
return(false);
}
return(true);
}
static function createClassObjectAtDepth(className, depthSpace, initObj) {
var _local1;
switch (depthSpace) {
case kCursor :
_local1 = holder.createClassChildAtDepth(className, kTopmost, initObj);
break;
case kTooltip :
_local1 = holder.createClassChildAtDepth(className, kTop, initObj);
break;
}
return(_local1);
}
static function createObjectAtDepth(linkageName, depthSpace, initObj) {
var _local1;
switch (depthSpace) {
case kCursor :
_local1 = holder.createChildAtDepth(linkageName, kTopmost, initObj);
break;
case kTooltip :
_local1 = holder.createChildAtDepth(linkageName, kTop, initObj);
break;
}
return(_local1);
}
function createClassChildAtDepth(className, depthFlag, initObj) {
if (_childCounter == undefined) {
_childCounter = 0;
}
var _local3 = buildDepthTable();
var _local2 = getDepthByFlag(depthFlag, _local3);
var _local5 = "down";
if (depthFlag == kBottom) {
_local5 = "up";
}
var _local6;
if (_local3[_local2] != undefined) {
_local6 = _local2;
_local2 = findNextAvailableDepth(_local2, _local3, _local5);
}
var _local4 = createClassObject(className, "depthChild" + (_childCounter++), _local2, initObj);
if (_local6 != undefined) {
_local3[_local2] = _local4;
shuffleDepths(_local4, _local6, _local3, _local5);
}
if (depthFlag == kTopmost) {
_local4._topmost = true;
}
return(_local4);
}
function createChildAtDepth(linkageName, depthFlag, initObj) {
if (_childCounter == undefined) {
_childCounter = 0;
}
var _local3 = buildDepthTable();
var _local2 = getDepthByFlag(depthFlag, _local3);
var _local5 = "down";
if (depthFlag == kBottom) {
_local5 = "up";
}
var _local6;
if (_local3[_local2] != undefined) {
_local6 = _local2;
_local2 = findNextAvailableDepth(_local2, _local3, _local5);
}
var _local4 = createObject(linkageName, "depthChild" + (_childCounter++), _local2, initObj);
if (_local6 != undefined) {
_local3[_local2] = _local4;
shuffleDepths(_local4, _local6, _local3, _local5);
}
if (depthFlag == kTopmost) {
_local4._topmost = true;
}
return(_local4);
}
function setDepthTo(depthFlag) {
var _local2 = _parent.buildDepthTable();
var _local3 = _parent.getDepthByFlag(depthFlag, _local2);
if (_local2[_local3] != undefined) {
shuffleDepths(MovieClip(this), _local3, _local2, undefined);
} else {
swapDepths(_local3);
}
if (depthFlag == kTopmost) {
_topmost = true;
} else {
delete _topmost;
}
}
function setDepthAbove(targetInstance) {
if (targetInstance._parent != _parent) {
return(undefined);
}
var _local2 = targetInstance.getDepth() + 1;
var _local3 = _parent.buildDepthTable();
if ((_local3[_local2] != undefined) && (getDepth() < _local2)) {
_local2 = _local2 - 1;
}
if (_local2 > highestDepth) {
_local2 = highestDepth;
}
if (_local2 == highestDepth) {
_parent.shuffleDepths(this, _local2, _local3, "down");
} else if (_local3[_local2] != undefined) {
_parent.shuffleDepths(this, _local2, _local3, undefined);
} else {
swapDepths(_local2);
}
}
function setDepthBelow(targetInstance) {
if (targetInstance._parent != _parent) {
return(undefined);
}
var _local6 = targetInstance.getDepth() - 1;
var _local3 = _parent.buildDepthTable();
if ((_local3[_local6] != undefined) && (getDepth() > _local6)) {
_local6 = _local6 + 1;
}
var _local4 = lowestDepth + numberOfAuthortimeLayers;
var _local5;
for (_local5 in _local3) {
var _local2 = _local3[_local5];
if (_local2._parent != undefined) {
_local4 = Math.min(_local4, _local2.getDepth());
}
}
if (_local6 < _local4) {
_local6 = _local4;
}
if (_local6 == _local4) {
_parent.shuffleDepths(this, _local6, _local3, "up");
} else if (_local3[_local6] != undefined) {
_parent.shuffleDepths(this, _local6, _local3, undefined);
} else {
swapDepths(_local6);
}
}
function findNextAvailableDepth(targetDepth, depthTable, direction) {
var _local5 = lowestDepth + numberOfAuthortimeLayers;
if (targetDepth < _local5) {
targetDepth = _local5;
}
if (depthTable[targetDepth] == undefined) {
return(targetDepth);
}
var _local1 = targetDepth;
var _local2 = targetDepth;
if (direction == "down") {
while (depthTable[_local2] != undefined) {
_local2--;
}
return(_local2);
}
while (depthTable[_local1] != undefined) {
_local1++;
}
return(_local1);
}
function shuffleDepths(subject, targetDepth, depthTable, direction) {
var _local9 = lowestDepth + numberOfAuthortimeLayers;
var _local8 = _local9;
var _local5;
for (_local5 in depthTable) {
var _local7 = depthTable[_local5];
if (_local7._parent != undefined) {
_local9 = Math.min(_local9, _local7.getDepth());
}
}
if (direction == undefined) {
if (subject.getDepth() > targetDepth) {
direction = "up";
} else {
direction = "down";
}
}
var _local1 = new Array();
for (_local5 in depthTable) {
var _local7 = depthTable[_local5];
if (_local7._parent != undefined) {
_local1.push(_local7);
}
}
_local1.sort(sortFunction);
if (direction == "up") {
var _local3;
var _local11;
do {
if (_local1.length <= 0) {
break;
}
_local3 = _local1.pop();
} while (_local3 != subject);
do {
if (_local1.length <= 0) {
break;
}
_local11 = subject.getDepth();
_local3 = _local1.pop();
var _local4 = _local3.getDepth();
if (_local11 > (_local4 + 1)) {
if (_local4 >= 0) {
subject.swapDepths(_local4 + 1);
} else if ((_local11 > _local8) && (_local4 < _local8)) {
subject.swapDepths(_local8);
}
}
subject.swapDepths(_local3);
} while (_local4 != targetDepth);
} else if (direction == "down") {
var _local3;
do {
if (_local1.length <= 0) {
break;
}
_local3 = _local1.shift();
} while (_local3 != subject);
do {
if (_local1.length <= 0) {
break;
}
var _local11 = _local3.getDepth();
_local3 = _local1.shift();
var _local4 = _local3.getDepth();
if ((_local11 < (_local4 - 1)) && (_local4 > 0)) {
subject.swapDepths(_local4 - 1);
}
subject.swapDepths(_local3);
} while (_local4 != targetDepth);
}
}
function getDepthByFlag(depthFlag, depthTable) {
var _local2 = 0;
if ((depthFlag == kTop) || (depthFlag == kNotopmost)) {
var _local5 = 0;
var _local7 = false;
var _local8;
for (_local8 in depthTable) {
var _local9 = depthTable[_local8];
var _local3 = typeof(_local9);
if ((_local3 == "movieclip") || ((_local3 == "object") && (_local9.__getTextFormat != undefined))) {
if (_local9.getDepth() <= highestDepth) {
if (!_local9._topmost) {
_local2 = Math.max(_local2, _local9.getDepth());
} else if (!_local7) {
_local5 = _local9.getDepth();
_local7 = true;
} else {
_local5 = Math.min(_local5, _local9.getDepth());
}
}
}
}
_local2 = _local2 + 20;
if (_local7) {
if (_local2 >= _local5) {
_local2 = _local5 - 1;
}
}
} else if (depthFlag == kBottom) {
for (var _local8 in depthTable) {
var _local9 = depthTable[_local8];
var _local3 = typeof(_local9);
if ((_local3 == "movieclip") || ((_local3 == "object") && (_local9.__getTextFormat != undefined))) {
if (_local9.getDepth() <= highestDepth) {
_local2 = Math.min(_local2, _local9.getDepth());
}
}
}
_local2 = _local2 - 20;
} else if (depthFlag == kTopmost) {
for (var _local8 in depthTable) {
var _local9 = depthTable[_local8];
var _local3 = typeof(_local9);
if ((_local3 == "movieclip") || ((_local3 == "object") && (_local9.__getTextFormat != undefined))) {
if (_local9.getDepth() <= highestDepth) {
_local2 = Math.max(_local2, _local9.getDepth());
}
}
}
_local2 = _local2 + 100;
}
if (_local2 >= highestDepth) {
_local2 = highestDepth;
}
var _local6 = lowestDepth + numberOfAuthortimeLayers;
for (var _local9 in depthTable) {
var _local4 = depthTable[_local9];
if (_local4._parent != undefined) {
_local6 = Math.min(_local6, _local4.getDepth());
}
}
if (_local2 <= _local6) {
_local2 = _local6;
}
return(_local2);
}
function buildDepthTable(Void) {
var _local5 = new Array();
var _local4;
for (_local4 in this) {
var _local2 = this[_local4];
var _local3 = typeof(_local2);
if ((_local3 == "movieclip") || ((_local3 == "object") && (_local2.__getTextFormat != undefined))) {
if (_local2._parent == this) {
_local5[_local2.getDepth()] = _local2;
}
}
}
return(_local5);
}
static var reservedDepth = 1048575;
static var highestDepth = 1048574;
static var lowestDepth = -16383;
static var numberOfAuthortimeLayers = 383;
static var kCursor = 101;
static var kTooltip = 102;
static var kTop = 201;
static var kBottom = 202;
static var kTopmost = 203;
static var kNotopmost = 204;
static var holder = _root.createEmptyMovieClip("reserved", reservedDepth);
static var __depthManager = new mx.managers.DepthManager();
}
Symbol 1154 MovieClip [__Packages.mx.core.UIComponent] Frame 0
class mx.core.UIComponent extends mx.core.UIObject
{
var __width, __height, invalidate, stylecache, removeEventListener, dispatchEvent, drawFocus, addEventListener, _xscale, _yscale, _focusrect, watch, enabled;
function UIComponent () {
super();
}
function get width() {
return(__width);
}
function get height() {
return(__height);
}
function setVisible(x, noEvent) {
super.setVisible(x, noEvent);
}
function enabledChanged(id, oldValue, newValue) {
setEnabled(newValue);
invalidate();
delete stylecache.tf;
return(newValue);
}
function setEnabled(enabled) {
invalidate();
}
function getFocus() {
var selFocus = Selection.getFocus();
return(((selFocus === null) ? null : (eval (selFocus))));
}
function setFocus() {
Selection.setFocus(this);
}
function getFocusManager() {
var _local2 = this;
while (_local2 != undefined) {
if (_local2.focusManager != undefined) {
return(_local2.focusManager);
}
_local2 = _local2._parent;
}
return(undefined);
}
function onKillFocus(newFocus) {
removeEventListener("keyDown", this);
removeEventListener("keyUp", this);
dispatchEvent({type:"focusOut"});
drawFocus(false);
}
function onSetFocus(oldFocus) {
addEventListener("keyDown", this);
addEventListener("keyUp", this);
dispatchEvent({type:"focusIn"});
if (getFocusManager().bDrawFocus != false) {
drawFocus(true);
}
}
function findFocusInChildren(o) {
if (o.focusTextField != undefined) {
return(o.focusTextField);
}
if (o.tabEnabled == true) {
return(o);
}
return(undefined);
}
function findFocusFromObject(o) {
if (o.tabEnabled != true) {
if (o._parent == undefined) {
return(undefined);
}
if (o._parent.tabEnabled == true) {
o = o._parent;
} else if (o._parent.tabChildren) {
o = findFocusInChildren(o._parent);
} else {
o = findFocusFromObject(o._parent);
}
}
return(o);
}
function pressFocus() {
var _local3 = findFocusFromObject(this);
var _local2 = getFocus();
if (_local3 != _local2) {
_local2.drawFocus(false);
if (getFocusManager().bDrawFocus != false) {
_local3.drawFocus(true);
}
}
}
function releaseFocus() {
var _local2 = findFocusFromObject(this);
if (_local2 != getFocus()) {
_local2.setFocus();
}
}
function isParent(o) {
while (o != undefined) {
if (o == this) {
return(true);
}
o = o._parent;
}
return(false);
}
function size() {
}
function init() {
super.init();
_xscale = 100;
_yscale = 100;
_focusrect = _global.useFocusRect == false;
watch("enabled", enabledChanged);
if (enabled == false) {
setEnabled(false);
}
}
function dispatchValueChangedEvent(value) {
dispatchEvent({type:"valueChanged", value:value});
}
static var symbolName = "UIComponent";
static var symbolOwner = mx.core.UIComponent;
static var version = "2.0.2.127";
static var kStretch = 5000;
var focusEnabled = true;
var tabEnabled = true;
var origBorderStyles = {themeColor:16711680};
var clipParameters = {};
static var mergedClipParameters = mx.core.UIObject.mergeClipParameters(mx.core.UIComponent.prototype.clipParameters, mx.core.UIObject.prototype.clipParameters);
}
Symbol 1155 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, load:1};
}
Symbol 1156 MovieClip [__Packages.mx.events.UIEventDispatcher] Frame 0
class mx.events.UIEventDispatcher extends mx.events.EventDispatcher
{
var dispatchQueue, owner, __sentLoadEvent, __origAddEventListener;
function UIEventDispatcher () {
super();
}
static function addKeyEvents(obj) {
if (obj.keyHandler == undefined) {
var _local1 = (obj.keyHandler = new Object());
_local1.owner = obj;
_local1.onKeyDown = _fEventDispatcher.onKeyDown;
_local1.onKeyUp = _fEventDispatcher.onKeyUp;
}
Key.addListener(obj.keyHandler);
}
static function removeKeyEvents(obj) {
Key.removeListener(obj.keyHandler);
}
static function addLoadEvents(obj) {
if (obj.onLoad == undefined) {
obj.onLoad = _fEventDispatcher.onLoad;
obj.onUnload = _fEventDispatcher.onUnload;
if (obj.getBytesTotal() == obj.getBytesLoaded()) {
obj.doLater(obj, "onLoad");
}
}
}
static function removeLoadEvents(obj) {
delete obj.onLoad;
delete obj.onUnload;
}
static function initialize(obj) {
if (_fEventDispatcher == undefined) {
_fEventDispatcher = new mx.events.UIEventDispatcher();
}
obj.addEventListener = _fEventDispatcher.__addEventListener;
obj.__origAddEventListener = _fEventDispatcher.addEventListener;
obj.removeEventListener = _fEventDispatcher.removeEventListener;
obj.dispatchEvent = _fEventDispatcher.dispatchEvent;
obj.dispatchQueue = _fEventDispatcher.dispatchQueue;
}
function dispatchEvent(eventObj) {
if (eventObj.target == undefined) {
eventObj.target = this;
}
this[eventObj.type + "Handler"](eventObj);
dispatchQueue(mx.events.EventDispatcher, eventObj);
dispatchQueue(this, eventObj);
}
function onKeyDown(Void) {
owner.dispatchEvent({type:"keyDown", code:Key.getCode(), ascii:Key.getAscii(), shiftKey:Key.isDown(16), ctrlKey:Key.isDown(17)});
}
function onKeyUp(Void) {
owner.dispatchEvent({type:"keyUp", code:Key.getCode(), ascii:Key.getAscii(), shiftKey:Key.isDown(16), ctrlKey:Key.isDown(17)});
}
function onLoad(Void) {
if (__sentLoadEvent != true) {
dispatchEvent({type:"load"});
}
__sentLoadEvent = true;
}
function onUnload(Void) {
dispatchEvent({type:"unload"});
}
function __addEventListener(event, handler) {
__origAddEventListener(event, handler);
var _local3 = lowLevelEvents;
for (var _local5 in _local3) {
if (mx.events.UIEventDispatcher[_local5][event] != undefined) {
var _local2 = _local3[_local5][0];
mx.events.UIEventDispatcher[_local2](this);
}
}
}
function removeEventListener(event, handler) {
var _local6 = "__q_" + event;
mx.events.EventDispatcher._removeEventListener(this[_local6], event, handler);
if (this[_local6].length == 0) {
var _local2 = lowLevelEvents;
for (var _local5 in _local2) {
if (mx.events.UIEventDispatcher[_local5][event] != undefined) {
var _local3 = _local2[_local5][1];
mx.events.UIEventDispatcher[_local2[_local5][1]](this);
}
}
}
}
static var keyEvents = {keyDown:1, keyUp:1};
static var loadEvents = {load:1, unload:1};
static var lowLevelEvents = {keyEvents:["addKeyEvents", "removeKeyEvents"], loadEvents:["addLoadEvents", "removeLoadEvents"]};
static var _fEventDispatcher = undefined;
}
Symbol 1157 MovieClip [__Packages.mx.core.ext.UIObjectExtensions] Frame 0
class mx.core.ext.UIObjectExtensions
{
function UIObjectExtensions () {
}
static function addGeometry(tf, ui) {
tf.addProperty("width", ui.__get__width, null);
tf.addProperty("height", ui.__get__height, null);
tf.addProperty("left", ui.__get__left, null);
tf.addProperty("x", ui.__get__x, null);
tf.addProperty("top", ui.__get__top, null);
tf.addProperty("y", ui.__get__y, null);
tf.addProperty("right", ui.__get__right, null);
tf.addProperty("bottom", ui.__get__bottom, null);
tf.addProperty("visible", ui.__get__visible, ui.__set__visible);
}
static function Extensions() {
if (bExtended == true) {
return(true);
}
bExtended = true;
var _local6 = mx.core.UIObject.prototype;
var _local9 = mx.skins.SkinElement.prototype;
addGeometry(_local9, _local6);
mx.events.UIEventDispatcher.initialize(_local6);
var _local13 = mx.skins.ColoredSkinElement;
mx.styles.CSSTextStyles.addTextStyles(_local6);
var _local5 = MovieClip.prototype;
_local5.getTopLevel = _local6.getTopLevel;
_local5.createLabel = _local6.createLabel;
_local5.createObject = _local6.createObject;
_local5.createClassObject = _local6.createClassObject;
_local5.createEmptyObject = _local6.createEmptyObject;
_local5.destroyObject = _local6.destroyObject;
_global.ASSetPropFlags(_local5, "getTopLevel", 1);
_global.ASSetPropFlags(_local5, "createLabel", 1);
_global.ASSetPropFlags(_local5, "createObject", 1);
_global.ASSetPropFlags(_local5, "createClassObject", 1);
_global.ASSetPropFlags(_local5, "createEmptyObject", 1);
_global.ASSetPropFlags(_local5, "destroyObject", 1);
_local5.__getTextFormat = _local6.__getTextFormat;
_local5._getTextFormat = _local6._getTextFormat;
_local5.getStyleName = _local6.getStyleName;
_local5.getStyle = _local6.getStyle;
_global.ASSetPropFlags(_local5, "__getTextFormat", 1);
_global.ASSetPropFlags(_local5, "_getTextFormat", 1);
_global.ASSetPropFlags(_local5, "getStyleName", 1);
_global.ASSetPropFlags(_local5, "getStyle", 1);
var _local7 = TextField.prototype;
addGeometry(_local7, _local6);
_local7.addProperty("enabled", function () {
return(this.__enabled);
}, function (x) {
this.__enabled = x;
this.invalidateStyle();
});
_local7.move = _local9.move;
_local7.setSize = _local9.setSize;
_local7.invalidateStyle = function () {
this.invalidateFlag = true;
};
_local7.draw = function () {
if (this.invalidateFlag) {
this.invalidateFlag = false;
var _local2 = this._getTextFormat();
this.setTextFormat(_local2);
this.setNewTextFormat(_local2);
this.embedFonts = _local2.embedFonts == true;
if (this.__text != undefined) {
if (this.text == "") {
this.text = this.__text;
}
delete this.__text;
}
this._visible = true;
}
};
_local7.setColor = function (color) {
this.textColor = color;
};
_local7.getStyle = _local5.getStyle;
_local7.__getTextFormat = _local6.__getTextFormat;
_local7.setValue = function (v) {
this.text = v;
};
_local7.getValue = function () {
return(this.text);
};
_local7.addProperty("value", function () {
return(this.getValue());
}, function (v) {
this.setValue(v);
});
_local7._getTextFormat = function () {
var _local2 = this.stylecache.tf;
if (_local2 != undefined) {
return(_local2);
}
_local2 = new TextFormat();
this.__getTextFormat(_local2);
this.stylecache.tf = _local2;
if (this.__enabled == false) {
if (this.enabledColor == undefined) {
var _local4 = this.getTextFormat();
this.enabledColor = _local4.color;
}
var _local3 = this.getStyle("disabledColor");
_local2.color = _local3;
} else if (this.enabledColor != undefined) {
if (_local2.color == undefined) {
_local2.color = this.enabledColor;
}
}
return(_local2);
};
_local7.getPreferredWidth = function () {
this.draw();
return(this.textWidth + 4);
};
_local7.getPreferredHeight = function () {
this.draw();
return(this.textHeight + 4);
};
TextFormat.prototype.getTextExtent2 = function (s) {
var _local3 = _root._getTextExtent;
if (_local3 == undefined) {
_root.createTextField("_getTextExtent", -2, 0, 0, 1000, 100);
_local3 = _root._getTextExtent;
_local3._visible = false;
}
_root._getTextExtent.text = s;
var _local4 = this.align;
this.align = "left";
_root._getTextExtent.setTextFormat(this);
this.align = _local4;
return({width:_local3.textWidth, height:_local3.textHeight});
};
if (_global.style == undefined) {
_global.style = new mx.styles.CSSStyleDeclaration();
_global.cascadingStyles = true;
_global.styles = new Object();
_global.skinRegistry = new Object();
if (_global._origWidth == undefined) {
_global.origWidth = Stage.width;
_global.origHeight = Stage.height;
}
}
var _local4 = _root;
while (_local4._parent != undefined) {
_local4 = _local4._parent;
}
_local4.addProperty("width", function () {
return(Stage.width);
}, null);
_local4.addProperty("height", function () {
return(Stage.height);
}, null);
_global.ASSetPropFlags(_local4, "width", 1);
_global.ASSetPropFlags(_local4, "height", 1);
return(true);
}
static var bExtended = false;
static var UIObjectExtended = Extensions();
static var UIObjectDependency = mx.core.UIObject;
static var SkinElementDependency = mx.skins.SkinElement;
static var CSSTextStylesDependency = mx.styles.CSSTextStyles;
static var UIEventDispatcherDependency = mx.events.UIEventDispatcher;
}
Symbol 1158 MovieClip [__Packages.mx.managers.FocusManager] Frame 0
class mx.managers.FocusManager extends mx.core.UIComponent
{
var __defaultPushButton, defPushButton, form, move, tabEnabled, _width, _height, _x, _y, _alpha, _parent, tabCapture, watch, lastMouse, _visible, lastFocus, doLater, lastSelFocus, cancelAllDoLaters, _searchKey, _lastTarget, _firstNode, _nextIsNext, _nextNode, _lastx, _prevNode, _needPrev, _foundList, _prevObj, _nextObj, _firstObj, _lastObj, _lastNode, lastTabFocus, findFocusFromObject;
function FocusManager () {
super();
}
function get defaultPushButton() {
return(__defaultPushButton);
}
function set defaultPushButton(x) {
if (x != __defaultPushButton) {
__defaultPushButton.__set__emphasized(false);
__defaultPushButton = x;
defPushButton = x;
x.__set__emphasized(true);
}
//return(defaultPushButton);
}
function getMaxTabIndex(o) {
var _local3 = 0;
var _local6;
for (_local6 in o) {
var _local2 = o[_local6];
if (_local2._parent == o) {
if (_local2.tabIndex != undefined) {
if (_local2.tabIndex > _local3) {
_local3 = _local2.tabIndex;
}
}
if (_local2.tabChildren == true) {
var _local4 = getMaxTabIndex(_local2);
if (_local4 > _local3) {
_local3 = _local4;
}
}
}
}
return(_local3);
}
function getNextTabIndex(Void) {
return(getMaxTabIndex(form) + 1);
}
function get nextTabIndex() {
return(getNextTabIndex());
}
function relocate(Void) {
var _local2 = mx.managers.SystemManager.__get__screen();
move(_local2.x - 1, _local2.y - 1);
}
function init(Void) {
super.init();
tabEnabled = false;
_width = (_height = 1);
_x = (_y = -1);
_alpha = 0;
_parent.focusManager = this;
_parent.tabChildren = true;
_parent.tabEnabled = false;
form = _parent;
_parent.addEventListener("hide", this);
_parent.addEventListener("reveal", this);
mx.managers.SystemManager.init();
mx.managers.SystemManager.addFocusManager(form);
tabCapture.tabIndex = 0;
watch("enabled", enabledChanged);
Selection.addListener(this);
lastMouse = new Object();
_global.ASSetPropFlags(_parent, "focusManager", 1);
_global.ASSetPropFlags(_parent, "tabChildren", 1);
_global.ASSetPropFlags(_parent, "tabEnabled", 1);
}
function enabledChanged(id, oldValue, newValue) {
_visible = newValue;
return(newValue);
}
function activate(Void) {
Key.addListener(this);
activated = (_visible = true);
if (lastFocus != undefined) {
bNeedFocus = true;
if (!mx.managers.SystemManager.isMouseDown) {
doLater(this, "restoreFocus");
}
}
}
function deactivate(Void) {
Key.removeListener(this);
activated = (_visible = false);
var _local2 = getSelectionFocus();
var _local3 = getActualFocus(_local2);
if (isOurFocus(_local3)) {
lastSelFocus = _local2;
lastFocus = _local3;
}
cancelAllDoLaters();
}
function isOurFocus(o) {
if (o.focusManager == this) {
return(true);
}
while (o != undefined) {
if (o.focusManager != undefined) {
return(false);
}
if (o._parent == _parent) {
return(true);
}
o = o._parent;
}
return(false);
}
function onSetFocus(o, n) {
if (n == null) {
if (activated) {
bNeedFocus = true;
}
} else {
var _local2 = getFocus();
if (isOurFocus(_local2)) {
bNeedFocus = false;
lastFocus = _local2;
lastSelFocus = n;
}
}
}
function restoreFocus(Void) {
var _local2 = lastSelFocus.hscroll;
if (_local2 != undefined) {
var _local5 = lastSelFocus.scroll;
var _local4 = lastSelFocus.background;
}
lastFocus.setFocus();
var _local3 = Selection;
Selection.setSelection(_local3.lastBeginIndex, _local3.lastEndIndex);
if (_local2 != undefined) {
lastSelFocus.scroll = _local5;
lastSelFocus.hscroll = _local2;
lastSelFocus.background = _local4;
}
}
function onUnload(Void) {
mx.managers.SystemManager.removeFocusManager(form);
}
function setFocus(o) {
if (o == null) {
Selection.setFocus(null);
} else if (o.setFocus == undefined) {
Selection.setFocus(o);
} else {
o.setFocus();
}
}
function getActualFocus(o) {
var _local1 = o._parent;
while (_local1 != undefined) {
if (_local1.focusTextField != undefined) {
while (_local1.focusTextField != undefined) {
o = _local1;
_local1 = _local1._parent;
if (_local1 == undefined) {
return(undefined);
}
if (_local1.focusTextField == undefined) {
return(o);
}
}
}
if (_local1.tabEnabled != true) {
return(o);
}
o = _local1;
_local1 = o._parent;
}
return(undefined);
}
function getSelectionFocus() {
var m = Selection.getFocus();
var o = eval (m);
return(o);
}
function getFocus(Void) {
var _local2 = getSelectionFocus();
return(getActualFocus(_local2));
}
function walkTree(p, index, groupName, dir, lookup, firstChild) {
var _local5 = true;
var _local11;
for (_local11 in p) {
var _local2 = p[_local11];
if ((((_local2._parent == p) && (_local2.enabled != false)) && (_local2._visible != false)) && ((_local2.tabEnabled == true) || ((_local2.tabEnabled != false) && ((((((((_local2.onPress != undefined) || (_local2.onRelease != undefined)) || (_local2.onReleaseOutside != undefined)) || (_local2.onDragOut != undefined)) || (_local2.onDragOver != undefined)) || (_local2.onRollOver != undefined)) || (_local2.onRollOut != undefined)) || (_local2 instanceof TextField))))) {
if (_local2._searchKey == _searchKey) {
continue;
}
_local2._searchKey = _searchKey;
if (_local2 != _lastTarget) {
if (((_local2.groupName != undefined) || (groupName != undefined)) && (_local2.groupName == groupName)) {
continue;
}
if ((_local2 instanceof TextField) && (_local2.selectable == false)) {
continue;
}
if (_local5 || (((_local2.groupName != undefined) && (_local2.groupName == _firstNode.groupName)) && (_local2.selected == true))) {
if (firstChild) {
_firstNode = _local2;
firstChild = false;
}
}
if (_nextIsNext == true) {
if ((((_local2.groupName != undefined) && (_local2.groupName == _nextNode.groupName)) && (_local2.selected == true)) || ((_nextNode == undefined) && ((_local2.groupName == undefined) || ((_local2.groupName != undefined) && (_local2.groupName != groupName))))) {
_nextNode = _local2;
}
}
if ((_local2.groupName == undefined) || (groupName != _local2.groupName)) {
if (((_lastx.groupName != undefined) && (_local2.groupName == _lastx.groupName)) && (_lastx.selected == true)) {
} else {
_lastx = _local2;
}
}
} else {
_prevNode = _lastx;
_needPrev = false;
_nextIsNext = true;
}
if (_local2.tabIndex != undefined) {
if (_local2.tabIndex == index) {
if (_foundList[_local2._name] == undefined) {
if (_needPrev) {
_prevObj = _local2;
_needPrev = false;
}
_nextObj = _local2;
}
}
if (dir && (_local2.tabIndex > index)) {
if (((_nextObj == undefined) || ((_nextObj.tabIndex > _local2.tabIndex) && (((_local2.groupName == undefined) || (_nextObj.groupName == undefined)) || (_local2.groupName != _nextObj.groupName)))) || ((((_nextObj.groupName != undefined) && (_nextObj.groupName == _local2.groupName)) && (_nextObj.selected != true)) && ((_local2.selected == true) || (_nextObj.tabIndex > _local2.tabIndex)))) {
_nextObj = _local2;
}
} else if ((!dir) && (_local2.tabIndex < index)) {
if (((_prevObj == undefined) || ((_prevObj.tabIndex < _local2.tabIndex) && (((_local2.groupName == undefined) || (_prevObj.groupName == undefined)) || (_local2.groupName != _prevObj.groupName)))) || ((((_prevObj.groupName != undefined) && (_prevObj.groupName == _local2.groupName)) && (_prevObj.selected != true)) && ((_local2.selected == true) || (_prevObj.tabIndex < _local2.tabIndex)))) {
_prevObj = _local2;
}
}
if (((_firstObj == undefined) || ((_local2.tabIndex < _firstObj.tabIndex) && (((_local2.groupName == undefined) || (_firstObj.groupName == undefined)) || (_local2.groupName != _firstObj.groupName)))) || ((((_firstObj.groupName != undefined) && (_firstObj.groupName == _local2.groupName)) && (_firstObj.selected != true)) && ((_local2.selected == true) || (_local2.tabIndex < _firstObj.tabIndex)))) {
_firstObj = _local2;
}
if (((_lastObj == undefined) || ((_local2.tabIndex > _lastObj.tabIndex) && (((_local2.groupName == undefined) || (_lastObj.groupName == undefined)) || (_local2.groupName != _lastObj.groupName)))) || ((((_lastObj.groupName != undefined) && (_lastObj.groupName == _local2.groupName)) && (_lastObj.selected != true)) && ((_local2.selected == true) || (_local2.tabIndex > _lastObj.tabIndex)))) {
_lastObj = _local2;
}
}
if (_local2.tabChildren) {
getTabCandidateFromChildren(_local2, index, groupName, dir, _local5 && (firstChild));
}
_local5 = false;
} else if (((_local2._parent == p) && (_local2.tabChildren == true)) && (_local2._visible != false)) {
if (_local2 == _lastTarget) {
if (_local2._searchKey == _searchKey) {
continue;
}
_local2._searchKey = _searchKey;
if (_prevNode == undefined) {
var _local3 = _lastx;
var _local7 = false;
while (_local3 != undefined) {
if (_local3 == _local2) {
_local7 = true;
break;
}
_local3 = _local3._parent;
}
if (_local7 == false) {
_prevNode = _lastx;
}
}
_needPrev = false;
if (_nextNode == undefined) {
_nextIsNext = true;
}
} else if (!((_local2.focusManager != undefined) && (_local2.focusManager._parent == _local2))) {
if (_local2._searchKey == _searchKey) {
continue;
}
_local2._searchKey = _searchKey;
getTabCandidateFromChildren(_local2, index, groupName, dir, _local5 && (firstChild));
}
_local5 = false;
}
}
_lastNode = _lastx;
if (lookup) {
if (p._parent != undefined) {
if (p != _parent) {
if ((_prevNode == undefined) && (dir)) {
_needPrev = true;
} else if ((_nextNode == undefined) && (!dir)) {
_nextIsNext = false;
}
_lastTarget = _lastTarget._parent;
getTabCandidate(p._parent, index, groupName, dir, true);
}
}
}
}
function getTabCandidate(o, index, groupName, dir, firstChild) {
var _local2;
var _local3 = true;
if (o == _parent) {
_local2 = o;
_local3 = false;
} else {
_local2 = o._parent;
if (_local2 == undefined) {
_local2 = o;
_local3 = false;
}
}
walkTree(_local2, index, groupName, dir, _local3, firstChild);
}
function getTabCandidateFromChildren(o, index, groupName, dir, firstChild) {
walkTree(o, index, groupName, dir, false, firstChild);
}
function getFocusManagerFromObject(o) {
while (o != undefined) {
if (o.focusManager != undefined) {
return(o.focusManager);
}
o = o._parent;
}
return(undefined);
}
function tabHandler(Void) {
bDrawFocus = true;
var _local5 = getSelectionFocus();
var _local4 = getActualFocus(_local5);
if (_local4 != _local5) {
_local5 = _local4;
}
if (getFocusManagerFromObject(_local5) != this) {
_local5 == undefined;
}
if (_local5 == undefined) {
_local5 = form;
} else if (_local5.tabIndex != undefined) {
if ((_foundList != undefined) || (_foundList.tabIndex != _local5.tabIndex)) {
_foundList = new Object();
_foundList.tabIndex = _local5.tabIndex;
}
_foundList[_local5._name] = _local5;
}
var _local3 = Key.isDown(16) != true;
_searchKey = getTimer();
_needPrev = true;
_nextIsNext = false;
_lastx = undefined;
_firstNode = undefined;
_lastNode = undefined;
_nextNode = undefined;
_prevNode = undefined;
_firstObj = undefined;
_lastObj = undefined;
_nextObj = undefined;
_prevObj = undefined;
_lastTarget = _local5;
var _local6 = _local5;
getTabCandidate(_local6, ((_local5.tabIndex == undefined) ? 0 : (_local5.tabIndex)), _local5.groupName, _local3, true);
var _local2;
if (_local3) {
if (_nextObj != undefined) {
_local2 = _nextObj;
} else {
_local2 = _firstObj;
}
} else if (_prevObj != undefined) {
_local2 = _prevObj;
} else {
_local2 = _lastObj;
}
if (_local2.tabIndex != _local5.tabIndex) {
_foundList = new Object();
_foundList.tabIndex = _local2.tabIndex;
_foundList[_local2._name] = _local2;
} else {
if (_foundList == undefined) {
_foundList = new Object();
_foundList.tabIndex = _local2.tabIndex;
}
_foundList[_local2._name] = _local2;
}
if (_local2 == undefined) {
if (_local3 == false) {
if (_nextNode != undefined) {
_local2 = _nextNode;
} else {
_local2 = _firstNode;
}
} else if ((_prevNode == undefined) || (_local5 == form)) {
_local2 = _lastNode;
} else {
_local2 = _prevNode;
}
}
if (_local2 == undefined) {
return(undefined);
}
lastTabFocus = _local2;
setFocus(_local2);
if (_local2.emphasized != undefined) {
if (defPushButton != undefined) {
_local5 = defPushButton;
defPushButton = mx.controls.SimpleButton(_local2);
_local5.emphasized = false;
_local2.emphasized = true;
}
} else if ((defPushButton != undefined) && (defPushButton != __defaultPushButton)) {
_local5 = defPushButton;
defPushButton = __defaultPushButton;
_local5.emphasized = false;
__defaultPushButton.__set__emphasized(true);
}
}
function onKeyDown(Void) {
mx.managers.SystemManager.idleFrames = 0;
if (defaultPushButtonEnabled) {
if (Key.getCode() == 13) {
if (defaultPushButton != undefined) {
doLater(this, "sendDefaultPushButtonEvent");
}
}
}
}
function sendDefaultPushButtonEvent(Void) {
defPushButton.dispatchEvent({type:"click"});
}
function getMousedComponentFromChildren(x, y, o) {
for (var _local7 in o) {
var _local2 = o[_local7];
if (((_local2._visible && (_local2.enabled)) && (_local2._parent == o)) && (_local2._searchKey != _searchKey)) {
_local2._searchKey = _searchKey;
if (_local2.hitTest(x, y, true)) {
if ((_local2.onPress != undefined) || (_local2.onRelease != undefined)) {
return(_local2);
}
var _local3 = getMousedComponentFromChildren(x, y, _local2);
if (_local3 != undefined) {
return(_local3);
}
return(_local2);
}
}
}
return(undefined);
}
function mouseActivate(Void) {
if (!bNeedFocus) {
return(undefined);
}
_searchKey = getTimer();
var _local2 = getMousedComponentFromChildren(lastMouse.x, lastMouse.y, form);
if (_local2 instanceof mx.core.UIComponent) {
return(undefined);
}
_local2 = findFocusFromObject(_local2);
if (_local2 == lastFocus) {
return(undefined);
}
if (_local2 == undefined) {
doLater(this, "restoreFocus");
return(undefined);
}
var _local3 = _local2.hscroll;
if (_local3 != undefined) {
var _local6 = _local2.scroll;
var _local5 = _local2.background;
}
setFocus(_local2);
var _local4 = Selection;
Selection.setSelection(_local4.lastBeginIndex, _local4.lastEndIndex);
if (_local3 != undefined) {
_local2.scroll = _local6;
_local2.hscroll = _local3;
_local2.background = _local5;
}
}
function _onMouseDown(Void) {
bDrawFocus = false;
if (lastFocus != undefined) {
lastFocus.drawFocus(false);
}
mx.managers.SystemManager.idleFrames = 0;
var _local3 = Selection;
_local3.lastBeginIndex = Selection.getBeginIndex();
_local3.lastEndIndex = Selection.getEndIndex();
lastMouse.x = _root._xmouse;
lastMouse.y = _root._ymouse;
_root.localToGlobal(lastMouse);
}
function onMouseUp(Void) {
if (_visible) {
doLater(this, "mouseActivate");
}
}
function handleEvent(e) {
if (e.type == "reveal") {
mx.managers.SystemManager.activate(form);
} else {
mx.managers.SystemManager.deactivate(form);
}
}
static function enableFocusManagement() {
if (!initialized) {
initialized = true;
Object.registerClass("FocusManager", mx.managers.FocusManager);
if (_root.focusManager == undefined) {
_root.createClassObject(mx.managers.FocusManager, "focusManager", mx.managers.DepthManager.highestDepth--);
}
}
}
static var symbolName = "FocusManager";
static var symbolOwner = mx.managers.FocusManager;
static var version = "2.0.2.127";
var className = "FocusManager";
var bNeedFocus = false;
var bDrawFocus = false;
var defaultPushButtonEnabled = true;
var activated = true;
static var initialized = false;
static var UIObjectExtensionsDependency = mx.core.ext.UIObjectExtensions;
}
Symbol 1159 MovieClip [__Packages.mx.controls.SimpleButton] Frame 0
class mx.controls.SimpleButton extends mx.core.UIComponent
{
static var emphasizedStyleDeclaration;
var preset, boundingBox_mc, useHandCursor, skinName, linkLength, iconName, destroyObject, __width, _width, __height, _height, __emphaticStyleName, styleName, enabled, invalidate, pressFocus, dispatchEvent, autoRepeat, interval, getStyle, releaseFocus, createLabel, invalidateStyle;
function SimpleButton () {
super();
}
function init(Void) {
super.init();
if (preset == undefined) {
boundingBox_mc._visible = false;
boundingBox_mc._width = (boundingBox_mc._height = 0);
}
useHandCursor = false;
}
function createChildren(Void) {
if (preset != undefined) {
var _local2 = this[idNames[preset]];
this[refNames[preset]] = _local2;
skinName = _local2;
if (falseOverSkin.length == 0) {
rolloverSkin = fus;
}
if (falseOverIcon.length == 0) {
rolloverIcon = fui;
}
initializing = false;
} else if (__state == true) {
setStateVar(true);
} else {
if (falseOverSkin.length == 0) {
rolloverSkin = fus;
}
if (falseOverIcon.length == 0) {
rolloverIcon = fui;
}
}
}
function setIcon(tag, linkageName) {
return(setSkin(tag + 8, linkageName));
}
function changeIcon(tag, linkageName) {
linkLength = linkageName.length;
var _local2 = stateNames[tag] + "Icon";
this[_local2] = linkageName;
this[idNames[tag + 8]] = _local2;
setStateVar(getState());
}
function changeSkin(tag, linkageName) {
var _local2 = stateNames[tag] + "Skin";
this[_local2] = linkageName;
this[idNames[tag]] = _local2;
setStateVar(getState());
}
function viewIcon(varName) {
var _local4 = varName + "Icon";
var _local3 = this[_local4];
if (typeof(_local3) == "string") {
var _local5 = _local3;
if (__emphasized) {
if (this[_local3 + "Emphasized"].length > 0) {
_local3 = _local3 + "Emphasized";
}
}
if (this[_local3].length == 0) {
return(undefined);
}
_local3 = setIcon(tagMap[_local5], this[_local3]);
if ((_local3 == undefined) && (_global.isLivePreview)) {
_local3 = setIcon(0, "ButtonIcon");
}
this[_local4] = _local3;
}
iconName._visible = false;
iconName = _local3;
iconName._visible = true;
}
function removeIcons() {
var _local3 = 0;
while (_local3 < 2) {
var _local2 = 8;
while (_local2 < 16) {
destroyObject(idNames[_local2]);
this[stateNames[_local2 - 8] + "Icon"] = "";
_local2++;
}
_local3++;
}
refresh();
}
function setSkin(tag, linkageName, initobj) {
var _local3 = super.setSkin(tag, linkageName, ((initobj != undefined) ? (initobj) : ({styleName:this})));
calcSize(tag, _local3);
return(_local3);
}
function calcSize(Void) {
__width = _width;
__height = _height;
}
function viewSkin(varName, initObj) {
var _local3 = varName + "Skin";
var _local2 = this[_local3];
if (typeof(_local2) == "string") {
var _local4 = _local2;
if (__emphasized) {
if (this[_local2 + "Emphasized"].length > 0) {
_local2 = _local2 + "Emphasized";
}
}
if (this[_local2].length == 0) {
return(undefined);
}
_local2 = setSkin(tagMap[_local4], this[_local2], ((initObj != undefined) ? (initObj) : ({styleName:this})));
this[_local3] = _local2;
}
skinName._visible = false;
skinName = _local2;
skinName._visible = true;
}
function showEmphasized(e) {
if (e && (!__emphatic)) {
if (emphasizedStyleDeclaration != undefined) {
__emphaticStyleName = styleName;
styleName = emphasizedStyleDeclaration;
}
__emphatic = true;
} else {
if (__emphatic) {
styleName = __emphaticStyleName;
}
__emphatic = false;
}
}
function refresh(Void) {
var _local2 = getState();
if (enabled == false) {
viewIcon("disabled");
viewSkin("disabled");
} else {
viewSkin(phase);
viewIcon(phase);
}
setView(phase == "down");
iconName.enabled = enabled;
}
function setView(offset) {
if (iconName == undefined) {
return(undefined);
}
var _local2 = (offset ? (btnOffset) : 0);
iconName._x = ((__width - iconName._width) / 2) + _local2;
iconName._y = ((__height - iconName._height) / 2) + _local2;
}
function setStateVar(state) {
if (state) {
if (trueOverSkin.length == 0) {
rolloverSkin = tus;
} else {
rolloverSkin = trs;
}
if (trueOverIcon.length == 0) {
rolloverIcon = tui;
} else {
rolloverIcon = tri;
}
upSkin = tus;
downSkin = tds;
disabledSkin = dts;
upIcon = tui;
downIcon = tdi;
disabledIcon = dti;
} else {
if (falseOverSkin.length == 0) {
rolloverSkin = fus;
} else {
rolloverSkin = frs;
}
if (falseOverIcon.length == 0) {
rolloverIcon = fui;
} else {
rolloverIcon = fri;
}
upSkin = fus;
downSkin = fds;
disabledSkin = dfs;
upIcon = fui;
downIcon = fdi;
disabledIcon = dfi;
}
__state = state;
}
function setState(state) {
if (state != __state) {
setStateVar(state);
invalidate();
}
}
function size(Void) {
refresh();
}
function draw(Void) {
if (initializing) {
initializing = false;
skinName.visible = true;
iconName.visible = true;
}
size();
}
function getState(Void) {
return(__state);
}
function setToggle(val) {
__toggle = val;
if (__toggle == false) {
setState(false);
}
}
function getToggle(Void) {
return(__toggle);
}
function set toggle(val) {
setToggle(val);
//return(toggle);
}
function get toggle() {
return(getToggle());
}
function set value(val) {
setSelected(val);
//return(value);
}
function get value() {
return(getSelected());
}
function set selected(val) {
setSelected(val);
//return(selected);
}
function get selected() {
return(getSelected());
}
function setSelected(val) {
if (__toggle) {
setState(val);
} else {
setState((initializing ? (val) : (__state)));
}
}
function getSelected() {
return(__state);
}
function setEnabled(val) {
if (enabled != val) {
super.setEnabled(val);
invalidate();
}
}
function onPress(Void) {
pressFocus();
phase = "down";
refresh();
dispatchEvent({type:"buttonDown"});
if (autoRepeat) {
interval = setInterval(this, "onPressDelay", getStyle("repeatDelay"));
}
}
function onPressDelay(Void) {
dispatchEvent({type:"buttonDown"});
if (autoRepeat) {
clearInterval(interval);
interval = setInterval(this, "onPressRepeat", getStyle("repeatInterval"));
}
}
function onPressRepeat(Void) {
dispatchEvent({type:"buttonDown"});
updateAfterEvent();
}
function onRelease(Void) {
releaseFocus();
phase = "rollover";
if (interval != undefined) {
clearInterval(interval);
delete interval;
}
if (getToggle()) {
setState(!getState());
} else {
refresh();
}
dispatchEvent({type:"click"});
}
function onDragOut(Void) {
phase = "up";
refresh();
dispatchEvent({type:"buttonDragOut"});
}
function onDragOver(Void) {
if (phase != "up") {
onPress();
return(undefined);
}
phase = "down";
refresh();
}
function onReleaseOutside(Void) {
releaseFocus();
phase = "up";
if (interval != undefined) {
clearInterval(interval);
delete interval;
}
}
function onRollOver(Void) {
phase = "rollover";
refresh();
}
function onRollOut(Void) {
phase = "up";
refresh();
}
function getLabel(Void) {
return(fui.text);
}
function setLabel(val) {
if (typeof(fui) == "string") {
createLabel("fui", 8, val);
fui.styleName = this;
} else {
fui.text = val;
}
var _local4 = fui._getTextFormat();
var _local2 = _local4.getTextExtent2(val);
fui._width = _local2.width + 5;
fui._height = _local2.height + 5;
iconName = fui;
setView(__state);
}
function get emphasized() {
return(__emphasized);
}
function set emphasized(val) {
__emphasized = val;
var _local2 = 0;
while (_local2 < 8) {
this[idNames[_local2]] = stateNames[_local2] + "Skin";
if (typeof(this[idNames[_local2 + 8]]) == "movieclip") {
this[idNames[_local2 + 8]] = stateNames[_local2] + "Icon";
}
_local2++;
}
showEmphasized(__emphasized);
setStateVar(__state);
invalidateStyle();
//return(emphasized);
}
function keyDown(e) {
if (e.code == 32) {
onPress();
}
}
function keyUp(e) {
if (e.code == 32) {
onRelease();
}
}
function onKillFocus(newFocus) {
super.onKillFocus();
if (phase != "up") {
phase = "up";
refresh();
}
}
static var symbolName = "SimpleButton";
static var symbolOwner = mx.controls.SimpleButton;
static var version = "2.0.2.127";
var className = "SimpleButton";
var style3dInset = 4;
var btnOffset = 1;
var __toggle = false;
var __state = false;
var __emphasized = false;
var __emphatic = false;
static var falseUp = 0;
static var falseDown = 1;
static var falseOver = 2;
static var falseDisabled = 3;
static var trueUp = 4;
static var trueDown = 5;
static var trueOver = 6;
static var trueDisabled = 7;
var falseUpSkin = "SimpleButtonUp";
var falseDownSkin = "SimpleButtonIn";
var falseOverSkin = "";
var falseDisabledSkin = "SimpleButtonUp";
var trueUpSkin = "SimpleButtonIn";
var trueDownSkin = "";
var trueOverSkin = "";
var trueDisabledSkin = "SimpleButtonIn";
var falseUpIcon = "";
var falseDownIcon = "";
var falseOverIcon = "";
var falseDisabledIcon = "";
var trueUpIcon = "";
var trueDownIcon = "";
var trueOverIcon = "";
var trueDisabledIcon = "";
var phase = "up";
var fui = "falseUpIcon";
var fus = "falseUpSkin";
var fdi = "falseDownIcon";
var fds = "falseDownSkin";
var frs = "falseOverSkin";
var fri = "falseOverIcon";
var dfi = "falseDisabledIcon";
var dfs = "falseDisabledSkin";
var tui = "trueUpIcon";
var tus = "trueUpSkin";
var tdi = "trueDownIcon";
var tds = "trueDownSkin";
var trs = "trueOverSkin";
var tri = "trueOverIcon";
var dts = "trueDisabledSkin";
var dti = "trueDisabledIcon";
var rolloverSkin = mx.controls.SimpleButton.prototype.frs;
var rolloverIcon = mx.controls.SimpleButton.prototype.fri;
var upSkin = mx.controls.SimpleButton.prototype.fus;
var downSkin = mx.controls.SimpleButton.prototype.fds;
var disabledSkin = mx.controls.SimpleButton.prototype.dfs;
var upIcon = mx.controls.SimpleButton.prototype.fui;
var downIcon = mx.controls.SimpleButton.prototype.fdi;
var disabledIcon = mx.controls.SimpleButton.prototype.dfi;
var initializing = true;
var idNames = ["fus", "fds", "frs", "dfs", "tus", "tds", "trs", "dts", "fui", "fdi", "fri", "dfi", "tui", "tdi", "tri", "dti"];
var stateNames = ["falseUp", "falseDown", "falseOver", "falseDisabled", "trueUp", "trueDown", "trueOver", "trueDisabled"];
var refNames = ["upSkin", "downSkin", "rolloverSkin", "disabledSkin"];
var tagMap = {falseUpSkin:0, falseDownSkin:1, falseOverSkin:2, falseDisabledSkin:3, trueUpSkin:4, trueDownSkin:5, trueOverSkin:6, trueDisabledSkin:7, falseUpIcon:0, falseDownIcon:1, falseOverIcon:2, falseDisabledIcon:3, trueUpIcon:4, trueDownIcon:5, trueOverIcon:6, trueDisabledIcon:7};
}
Symbol 1160 MovieClip [__Packages.mx.managers.SystemManager] Frame 0
class mx.managers.SystemManager
{
static var _xAddEventListener, addEventListener, __addEventListener, _xRemoveEventListener, removeEventListener, __removeEventListener, form, __screen, dispatchEvent;
function SystemManager () {
}
static function init(Void) {
if (_initialized == false) {
_initialized = true;
mx.events.EventDispatcher.initialize(mx.managers.SystemManager);
Mouse.addListener(mx.managers.SystemManager);
Stage.addListener(mx.managers.SystemManager);
_xAddEventListener = addEventListener;
addEventListener = __addEventListener;
_xRemoveEventListener = removeEventListener;
removeEventListener = __removeEventListener;
}
}
static function addFocusManager(f) {
form = f;
f.focusManager.activate();
}
static function removeFocusManager(f) {
}
static function onMouseDown(Void) {
var _local1 = form;
_local1.focusManager._onMouseDown();
}
static function onResize(Void) {
var _local7 = Stage.width;
var _local6 = Stage.height;
var _local9 = _global.origWidth;
var _local8 = _global.origHeight;
var _local3 = Stage.align;
var _local5 = (_local9 - _local7) / 2;
var _local4 = (_local8 - _local6) / 2;
if (_local3 == "T") {
_local4 = 0;
} else if (_local3 == "B") {
_local4 = _local8 - _local6;
} else if (_local3 == "L") {
_local5 = 0;
} else if (_local3 == "R") {
_local5 = _local9 - _local7;
} else if (_local3 == "LT") {
_local4 = 0;
_local5 = 0;
} else if (_local3 == "TR") {
_local4 = 0;
_local5 = _local9 - _local7;
} else if (_local3 == "LB") {
_local4 = _local8 - _local6;
_local5 = 0;
} else if (_local3 == "RB") {
_local4 = _local8 - _local6;
_local5 = _local9 - _local7;
}
if (__screen == undefined) {
__screen = new Object();
}
__screen.x = _local5;
__screen.y = _local4;
__screen.width = _local7;
__screen.height = _local6;
_root.focusManager.relocate();
dispatchEvent({type:"resize"});
}
static function get screen() {
init();
if (__screen == undefined) {
onResize();
}
return(__screen);
}
static var _initialized = false;
static var idleFrames = 0;
static var isMouseDown = false;
static var forms = new Array();
}
Symbol 1161 MovieClip [__Packages.mx.skins.Border] Frame 0
class mx.skins.Border extends mx.core.UIObject
{
function Border () {
super();
}
function init(Void) {
super.init();
}
static var symbolName = "Border";
static var symbolOwner = mx.skins.Border;
var className = "Border";
var tagBorder = 0;
var idNames = new Array("border_mc");
}
Symbol 1162 MovieClip [__Packages.mx.skins.RectBorder] Frame 0
class mx.skins.RectBorder extends mx.skins.Border
{
var __width, __height, offset, __borderMetrics;
function RectBorder () {
super();
}
function get width() {
return(__width);
}
function get height() {
return(__height);
}
function init(Void) {
super.init();
}
function draw(Void) {
size();
}
function getBorderMetrics(Void) {
var _local2 = offset;
if (__borderMetrics == undefined) {
__borderMetrics = {left:_local2, top:_local2, right:_local2, bottom:_local2};
} else {
__borderMetrics.left = _local2;
__borderMetrics.top = _local2;
__borderMetrics.right = _local2;
__borderMetrics.bottom = _local2;
}
return(__borderMetrics);
}
function get borderMetrics() {
return(getBorderMetrics());
}
function drawBorder(Void) {
}
function size(Void) {
drawBorder();
}
function setColor(Void) {
drawBorder();
}
static var symbolName = "RectBorder";
static var symbolOwner = mx.skins.RectBorder;
static var version = "2.0.2.127";
var className = "RectBorder";
var borderStyleName = "borderStyle";
var borderColorName = "borderColor";
var shadowColorName = "shadowColor";
var highlightColorName = "highlightColor";
var buttonColorName = "buttonColor";
var backgroundColorName = "backgroundColor";
}
Symbol 1163 MovieClip [__Packages.mx.skins.CustomBorder] Frame 0
class mx.skins.CustomBorder extends mx.skins.Border
{
var __width, __height, l_mc, setSkin, minHeight, minWidth, m_mc, r_mc;
function CustomBorder () {
super();
}
function get width() {
return(__width);
}
function get height() {
return(__height);
}
function init(Void) {
super.init();
}
function createChildren(Void) {
}
function draw(Void) {
if (l_mc == undefined) {
var _local2 = setSkin(tagL, leftSkin);
if (horizontal) {
minHeight = l_mc._height;
minWidth = l_mc._width;
} else {
minHeight = l_mc._height;
minWidth = l_mc._width;
}
}
if (m_mc == undefined) {
setSkin(tagM, middleSkin);
if (horizontal) {
minHeight = m_mc._height;
minWidth = minWidth + m_mc._width;
} else {
minHeight = minHeight + m_mc._height;
minWidth = m_mc._width;
}
}
if (r_mc == undefined) {
setSkin(tagR, rightSkin);
if (horizontal) {
minHeight = r_mc._height;
minWidth = minWidth + r_mc._width;
} else {
minHeight = minHeight + r_mc._height;
minWidth = r_mc._width;
}
}
size();
}
function size(Void) {
l_mc.move(0, 0);
if (horizontal) {
r_mc.move(width - r_mc.width, 0);
m_mc.move(l_mc.width, 0);
m_mc.setSize(r_mc.x - m_mc.x, m_mc.height);
} else {
r_mc.move(0, height - r_mc.height, 0);
m_mc.move(0, l_mc.height);
m_mc.setSize(m_mc.width, r_mc.y - m_mc.y);
}
}
static var symbolName = "CustomBorder";
static var symbolOwner = mx.skins.CustomBorder;
static var version = "2.0.2.127";
var className = "CustomBorder";
static var tagL = 0;
static var tagM = 1;
static var tagR = 2;
var idNames = new Array("l_mc", "m_mc", "r_mc");
var leftSkin = "F3PieceLeft";
var middleSkin = "F3PieceMiddle";
var rightSkin = "F3PieceRight";
var horizontal = true;
}
Symbol 637 MovieClip Frame 1
this.onRelease = function () {
if (Key.isDown(81)) {
_root.play();
return(undefined);
}
_root.getURL("http://tamugaia.com", "_blank");
};
Symbol 637 MovieClip Frame 340
_root.play();
Symbol 657 MovieClip Frame 1
this.onRelease = function () {
if (Key.isDown(81)) {
_root.play();
return(undefined);
}
_root.getURL("http://www.y8.com", "_blank");
};
Symbol 657 MovieClip Frame 186
_root.play();
Symbol 659 MovieClip Frame 1
this.swapDepths(777);
_x = 0;
_y = 0;
Symbol 673 MovieClip Frame 1
this.onRelease = function () {
_root.getURL("http://www.y8.com", "_blank");
};
Symbol 677 MovieClip Frame 1
if (_root.globalvolume == undefined) {
_root.globalvolume = 100;
}
this.onRelease = function () {
_root.globalvolume = _root.globalvolume - 50;
trace(_root.globalvolume);
if (_root.globalvolume < 0) {
_root.globalvolume = 100;
}
if (_root.allsounds == undefined) {
_root.allsounds = new Sound();
}
_root.allsounds.setVolume(_root.globalvolume);
this.gotoAndStop("v" + _root.globalvolume);
};
this.gotoAndStop("v" + _root.globalvolume);
Symbol 679 MovieClip Frame 10
stop();
Symbol 683 MovieClip Frame 1
this.swapDepths(10015);
this.onMouseMove = function () {
Mouse.hide();
_x = _root._xmouse;
_y = _root._ymouse;
if (this.hitTest(_root.gamescreen)) {
gotoAndStop (3);
return(undefined);
}
gotoAndStop (2);
};
this.blendMode = "add";
Symbol 683 MovieClip Frame 2
stop();
Symbol 683 MovieClip Frame 3
stop();
Symbol 683 MovieClip Frame 4
stop();
Symbol 730 MovieClip Frame 1
this.blendMode = "add";
Symbol 730 MovieClip Frame 10
stop();
Symbol 733 MovieClip Frame 1
this.blendMode = "add";
Symbol 733 MovieClip Frame 4
gotoAndPlay (2);
Symbol 737 Button
on (release) {
_root.gotoAndPlay("tutorial");
}
Symbol 738 Button
on (release) {
_root.gotoAndPlay("levels");
}
Symbol 739 Button
on (release) {
_root.getURL(_root.logourl, "_blank");
}
Symbol 740 Button
on (release) {
_root.getURL(_root.playmoregamesurl, "_blank");
}
Symbol 745 Button
on (release) {
_root.gotoAndPlay("mainmenu");
}
Symbol 746 Button
on (release) {
_root.playlevel(levelslist.selectedItem.data);
}
Symbol 747 Button
on (release) {
_root.resetlevels();
_root.autosave();
_root.gotoAndPlay("mainmenu");
}
Symbol 750 Button
on (release) {
nextFrame();
}
Symbol 751 Button
on (release) {
_root.playlevel(0);
}
Symbol 761 Button
on (release) {
prevFrame();
}
Symbol 767 MovieClip Frame 1
stop();
Symbol 775 MovieClip Frame 1
function camControl() {
parentColor.setTransform(camColor.getTransform());
var _local3 = sX / this._width;
var _local4 = sY / this._height;
_parent._x = cX - (this._x * _local3);
_parent._y = cY - (this._y * _local4);
_parent._xscale = 100 * _local3;
_parent._yscale = 100 * _local4;
}
function resetStage() {
var _local2 = {ra:100, rb:0, ga:100, gb:0, ba:100, bb:0, aa:100, ab:0};
parentColor.setTransform(_local2);
_parent._xscale = 100;
_parent._yscale = 100;
_parent._x = 0;
_parent._y = 0;
}
_parent.setMask(this);
this._visible = false;
var oldMode = Stage.scaleMode;
Stage.scaleMode = "exactFit";
var cX = (Stage.width / 2);
var cY = (Stage.height / 2);
var sX = Stage.width;
var sY = Stage.height;
Stage.scaleMode = oldMode;
var camColor = new Color(this);
var parentColor = new Color(_parent);
this.onEnterFrame = camControl;
camControl();
this.onUnload = resetStage;
Symbol 833 MovieClip Frame 1
stopAllSounds();
_parent.subtit.text = "";
Instance of Symbol 775 MovieClip in Symbol 833 MovieClip Frame 1
//component parameters
onClipEvent (construct) {
varName = "defaultValue";
}
Symbol 833 MovieClip Frame 66
_parent.subtit.text = "Hi. I am Mat Rempit. You can call me Mat. I was a high-ranking executive of a huge corporation.";
Symbol 833 MovieClip Frame 244
_parent.subtit.text = "";
Symbol 833 MovieClip Frame 252
_parent.subtit.text = "Life was good for me until...";
Symbol 833 MovieClip Frame 350
_parent.subtit.text = "";
Symbol 833 MovieClip Frame 361
_parent.subtit.text = "...the company got involved in some corruption charges that was related to powerful government ministers.";
Symbol 833 MovieClip Frame 581
_parent.subtit.text = "";
Symbol 833 MovieClip Frame 601
_parent.subtit.text = "As those ministers were experts in covering up their tracks, they went scot-free.";
Symbol 833 MovieClip Frame 765
_parent.subtit.text = "";
Symbol 833 MovieClip Frame 781
_parent.subtit.text = "But they had to choose a scapegoat.";
Symbol 833 MovieClip Frame 893
_parent.subtit.text = "";
Symbol 833 MovieClip Frame 900
_parent.subtit.text = "And that scapegoat was me.";
Symbol 833 MovieClip Frame 1015
_parent.subtit.text = "";
Symbol 833 MovieClip Frame 1023
_parent.subtit.text = "I was fired and was scheduled for trial. But I found out my lawyers were all sold out.";
Symbol 833 MovieClip Frame 1321
_parent.subtit.text = "I had no chance in hell and I knew I would be convicted for a crime I never committed.";
Symbol 833 MovieClip Frame 1547
_parent.subtit.text = "";
Symbol 833 MovieClip Frame 1567
_parent.subtit.text = "So I made up my mind. I hit the road. I escaped.";
Symbol 833 MovieClip Frame 1752
_parent.subtit.text = "But now, I've lost my home. I've lost my friends.";
Symbol 833 MovieClip Frame 1920
_parent.subtit.text = "";
Symbol 833 MovieClip Frame 1932
_parent.subtit.text = "Everyone thinks I'm guilty. I am now alone, with my bike.";
Symbol 833 MovieClip Frame 2118
_parent.subtit.text = "But I will continue to fight.\nFor justice, for my freedom, for a country free from corruption...";
Symbol 833 MovieClip Frame 2395
_parent.subtit.text = "";
Symbol 833 MovieClip Frame 2448
_root.aftercutscene();
stop();
Symbol 843 MovieClip Frame 1
stop();
Symbol 844 MovieClip Frame 1
_yscale = _xscale;
Symbol 844 MovieClip Frame 2
this.onEnterFrame = function () {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
gotoAndStop (3);
return(undefined);
}
if (!sliding.movepointer) {
gotoAndStop (2);
}
};
stop();
Symbol 844 MovieClip Frame 3
stop();
Instance of Symbol 838 MovieClip "sliding" in Symbol 844 MovieClip Frame 3
onClipEvent (load) {
movepointer = 0;
_parent.ppicon.gotoAndStop(_parent.canplay + 1);
_x = int((_parent.mymovie._currentframe / _parent.mymovie._totalframes) * 300);
}
onClipEvent (enterFrame) {
if (movepointer) {
_x = (_parent._xmouse - 8);
_parent.mymovie.gotoAndStop(int((_x / 300) * _parent.mymovie._totalframes));
} else {
_x = int((_parent.mymovie._currentframe / _parent.mymovie._totalframes) * 300);
}
var __local0;
if (_x >= 0) {
__local0 = null;
} else {
_x = ((__reg0 = 0));
__local0 = __reg0;
}
var __local1;
if (_x <= 300) {
__local1 = null;
} else {
_x = ((__reg0 = 300));
__local1 = __reg0;
}
}
on (press) {
_parent.mymovie.stop();
movepointer = 1;
}
onClipEvent (mouseUp) {
if (_parent.canplay) {
_parent.mymovie.play();
}
movepointer = 0;
}
Instance of Symbol 840 MovieClip "pauseplaybutt" in Symbol 844 MovieClip Frame 3
on (release) {
if (_parent.canplay) {
_parent.canplay = 0;
_parent.mymovie.stop();
} else {
_parent.canplay = 1;
_parent.mymovie.play();
}
_parent.ppicon.gotoAndStop(_parent.canplay + 1);
}
Symbol 845 Button
on (release) {
_root.aftercutscene();
}
Symbol 897 MovieClip Frame 1
_root.tembak = 0;
stop();
Symbol 897 MovieClip Frame 15
gotoAndStop(_root.currentw);
Symbol 897 MovieClip Frame 19
_root.tembak = 0;
stop();
Symbol 897 MovieClip Frame 53
gotoAndStop(_root.currentw);
Symbol 897 MovieClip Frame 57
_root.tembak = 0;
stop();
Symbol 897 MovieClip Frame 87
gotoAndStop(_root.currentw);
Symbol 897 MovieClip Frame 91
_root.tembak = 0;
stop();
Symbol 897 MovieClip Frame 101
gotoAndStop(_root.currentw);
Symbol 897 MovieClip Frame 105
_root.tembak = 0;
stop();
Symbol 897 MovieClip Frame 112
gotoAndStop(_root.currentw);
Symbol 897 MovieClip Frame 116
_root.tembak = 0;
stop();
Symbol 897 MovieClip Frame 149
gotoAndStop(_root.currentw);
Symbol 899 MovieClip Frame 1
stop();
Symbol 899 MovieClip Frame 80
_root.gotoAndPlay("gameover");
stop();
Symbol 912 MovieClip Frame 1
_x = (850 + _width);
_y = (300 + random(90));
if (_name == "vehi2") {
_x = (1250 + _width);
}
this.gotoAndStop(random(5) + 2);
Symbol 912 MovieClip Frame 2
hayata = 100;
fullhayata = 100;
stop();
Symbol 912 MovieClip Frame 3
hayata = 150;
fullhayata = 150;
stop();
Symbol 912 MovieClip Frame 4
hayata = 70;
fullhayata = 70;
stop();
Symbol 912 MovieClip Frame 5
hayata = 60;
fullhayata = 60;
stop();
Symbol 912 MovieClip Frame 6
hayata = 40;
fullhayata = 40;
stop();
Symbol 914 MovieClip Frame 1
stop();
Symbol 914 MovieClip Frame 10
trace("sound 1 stop");
Symbol 914 MovieClip Frame 14
trace("sound 2 stop");
Symbol 917 MovieClip Frame 1
stop();
Symbol 917 MovieClip Frame 2
play();
Symbol 917 MovieClip Frame 4
stop();
Symbol 917 MovieClip Frame 6
play();
Symbol 917 MovieClip Frame 8
stop();
Symbol 917 MovieClip Frame 10
play();
Symbol 917 MovieClip Frame 12
stop();
Symbol 917 MovieClip Frame 14
play();
Symbol 917 MovieClip Frame 16
stop();
Symbol 918 MovieClip Frame 1
function matenterframe() {
t = this;
if (t.ignited == undefined) {
t.timer = 0;
t.xmove = 0;
t.ymove = 0;
t.ease_in = 2;
t.ease_out = 2;
t.maxmove = 10;
t.somefunction = function () {
};
t.shot = 0;
t.onMouseDown = function () {
if ((!_root.pauser) && (_root.canmove)) {
t.shot = 1;
}
};
t.onMouseUp = function () {
t.shot = 0;
};
t.gethittimer = 0;
t.colorchange = function (r, g, b) {
br = new Color(t);
br.setTransform({rb:r, gb:g, bb:b});
};
t.ignited = 1;
}
this.swapDepths(this._x + (this._y * this._parent._width));
if ((!_root.pauser) && (_root.canmove)) {
t.timer++;
if (t.timer > 10000) {
t.timer = 0;
}
if (_root.hayata > 0) {
if ((_root.tembak == 0) && (t.shot == 1)) {
if (_root.currentw == "pistol") {
thebul = _root.attachstuff(t._parent, "bullet-pistol", "array_matbullets", 201, 300, t._x + t.mathand._x, t._y + t.mathand._y, matbulletpistol_ef);
thebul.initrot = t.mathand._rotation;
} else if (_root.currentw == "shotgun") {
thebul = _root.attachstuff(t._parent, "bullet-pistol", "array_matbullets", 201, 300, t._x + t.mathand._x, t._y + t.mathand._y, matbulletpistol_ef);
thebul.initrot = t.mathand._rotation;
thebul = _root.attachstuff(t._parent, "bullet-pistol", "array_matbullets", 201, 300, t._x + t.mathand._x, t._y + t.mathand._y, matbulletpistol_ef);
thebul.initrot = (t.mathand._rotation + random(3)) + 3;
thebul = _root.attachstuff(t._parent, "bullet-pistol", "array_matbullets", 201, 300, t._x + t.mathand._x, t._y + t.mathand._y, matbulletpistol_ef);
thebul.initrot = (t.mathand._rotation - random(3)) - 3;
} else if (_root.currentw == "magnum") {
thebul = _root.attachstuff(t._parent, "bullet-magnum", "array_matbullets", 201, 300, t._x + t.mathand._x, t._y + t.mathand._y, matbulletmagnumrifle_ef);
thebul.initrot = t.mathand._rotation;
} else if (_root.currentw == "smg") {
thebul = _root.attachstuff(t._parent, "bullet-pistol", "array_matbullets", 201, 300, t._x + t.mathand._x, t._y + t.mathand._y, matbulletsmg_ef);
thebul.initrot = t.mathand._rotation;
} else if (_root.currentw == "rifle") {
thebul = _root.attachstuff(t._parent, "bullet-rifle", "array_matbullets", 201, 300, t._x + t.mathand._x, t._y + t.mathand._y, matbulletmagnumrifle_ef);
thebul.initrot = t.mathand._rotation;
} else if (_root.currentw == "laser") {
thebul = _root.attachstuff(t._parent, "bullet-laser", "array_matbullets", 201, 300, t._x + t.mathand._x, t._y + t.mathand._y, matbulletlaser_ef);
thebul.initrot = t.mathand._rotation;
}
_root.tembak = 1;
t.mathand.gotoAndPlay(_root.currentw + "shoot");
}
if (Key.isDown(87) || (Key.isDown(38))) {
t.ymove = t.ymove - t.ease_in;
if (t.ymove < (-t.maxmove)) {
t.ymove = -t.maxmove;
}
} else if (Key.isDown(83) || (Key.isDown(40))) {
t.ymove = t.ymove + t.ease_in;
if (t.ymove > t.maxmove) {
t.ymove = t.maxmove;
}
} else {
if (t.ymove > 0) {
t.ymove = t.ymove - t.ease_out;
} else if (t.ymove < 0) {
t.ymove = t.ymove + t.ease_out;
}
if (Math.abs(t.ymove) < 1) {
t.ymove = 0;
}
}
if (Key.isDown(65) || (Key.isDown(37))) {
t.xmove = t.xmove - t.ease_in;
if (t.xmove < (-t.maxmove)) {
t.xmove = -t.maxmove;
}
} else if (Key.isDown(68) || (Key.isDown(39))) {
t.xmove = t.xmove + t.ease_in;
if (t.xmove > t.maxmove) {
t.xmove = t.maxmove;
}
} else {
if (t.xmove > 0) {
t.xmove = t.xmove - t.ease_out;
} else if (t.xmove < 0) {
t.xmove = t.xmove + t.ease_out;
}
if (Math.abs(t.xmove) < 1) {
t.xmove = 0;
}
}
t.mathand._rotation = _root.pointrotatemc(t.mathand, t._xmouse, t._ymouse, 0);
t._x = t._x + t.xmove;
t._y = t._y + t.ymove;
while (t.det.hitTest(t._parent.detu)) {
t._y++;
}
while (t.det.hitTest(t._parent.detd)) {
t._y--;
}
while (t.det.hitTest(t._parent.detl)) {
t._x++;
}
while (t.det.hitTest(t._parent.detr)) {
t._x--;
}
while (t._parent.vehi.det.hitTest(t._x, t._y + (t.det._height / 2), true)) {
t._y--;
}
while (t._parent.vehi.det.hitTest(t._x, t._y - (t.det._height / 2), true)) {
t._y++;
}
while (t._parent.vehi.det.hitTest(t._x + (t.det._width / 2), t._y, true)) {
t._x--;
}
while (t._parent.vehi.det.hitTest(t._x - (t.det._width / 2), t._y, true)) {
t._x++;
}
while (t._parent.vehi2.det.hitTest(t._x, t._y + (t.det._height / 2), true)) {
t._y--;
}
while (t._parent.vehi2.det.hitTest(t._x, t._y - (t.det._height / 2), true)) {
t._y++;
}
while (t._parent.vehi2.det.hitTest(t._x + (t.det._width / 2), t._y, true)) {
t._x--;
}
while (t._parent.vehi2.det.hitTest(t._x - (t.det._width / 2), t._y, true)) {
t._x++;
}
htarr = array_polisbullets;
ht = 0;
while (ht < htarr.length) {
if (this.det.hitTest(htarr[ht].det)) {
t.gethittimer = 20;
_root.hayata = _root.hayata - htarr[ht].dmg;
htarr[ht].die();
}
ht++;
}
if (_root.hayata <= 0) {
_root.hayata = 0;
t.gotoAndPlay("die");
}
if (t.gethittimer > 0) {
t.gethittimer--;
}
if (t.gethittimer > 0) {
if ((t.gethittimer % 6) == 3) {
t.colorchange(100, 0, 0);
} else if ((t.gethittimer % 6) == 0) {
t.colorchange(100, 50, 50);
}
} else {
t.colorchange(0, 0, 0);
}
return(undefined);
}
t._x = t._x - _root.bgspeed;
}
}
function vehienterframe() {
t = this;
if (t.ignited == undefined) {
t.timer = 0;
t.movement = 0.4;
t.somefunction = function () {
};
t.gethittimer = 0;
t.colorchange = function (r, g, b) {
br = new Color(t);
br.setTransform({rb:r, gb:g, bb:b});
};
t.ignited = 1;
}
this.swapDepths(this._x + (this._y * this._parent._width));
t.lb._xscale = (t.hayata / t.fullhayata) * 100;
if ((!_root.pauser) && (_root.canmove)) {
if (t.hayata > 0) {
t._x = t._x - t.movement;
if (t._x < ((-t._width) - 100)) {
t.gotoAndPlay(1);
}
htarr = array_matbullets;
ht = 0;
while (ht < htarr.length) {
if (this.det.hitTest(htarr[ht].det)) {
t.gethittimer = 20;
t.hayata = t.hayata - htarr[ht].dmg;
htarr[ht].die();
}
ht++;
}
htarr = array_polisbullets;
ht = 0;
while (ht < htarr.length) {
if (this.det.hitTest(htarr[ht].det)) {
t.gethittimer = 20;
t.hayata = t.hayata - htarr[ht].dmg;
htarr[ht].die();
}
ht++;
}
if (t.hayata <= 0) {
_root.wang = _root.wang + (50 + random(70));
t.hayata = 0;
t.gotoAndPlay("die");
}
} else {
t._x = t._x - _root.bgspeed;
}
if (t.gethittimer > 0) {
t.gethittimer--;
}
if (t.gethittimer > 0) {
if ((t.gethittimer % 6) == 3) {
t.colorchange(100, 100, 100);
} else if ((t.gethittimer % 6) == 0) {
t.colorchange(50, 50, 50);
}
} else {
t.colorchange(0, 0, 0);
}
if (t._name == "vehi") {
for(;;){
if (!t.det.hitTest(t._parent.vehi2.det)) {
return(undefined);
}
if (t._x < t._parent.vehi2._x) {
t._x--;
} else {
t._x++;
}
};
}
}
}
function polisbikeenterframe() {
t = this;
if (t.ignited == undefined) {
t.timer = 0;
t.hayata = 10;
t.fullhayata = 10;
t.bonus = 70 + random(6);
t.boncatness = random(100);
trace("Polis with boncatness:" + t.boncatness);
t.currenttarget = 300 + random(400);
t.movement = 2;
t.shootinterval = 60 + random(40);
t.somefunction = function () {
};
t.gethittimer = 0;
t.colorchange = function (r, g, b) {
br = new Color(t);
br.setTransform({rb:r, gb:g, bb:b});
};
t.ignited = 1;
}
this.swapDepths(this._x + (this._y * this._parent._width));
t.lb._xscale = (t.hayata / t.fullhayata) * 100;
if ((!_root.pauser) && (_root.canmove)) {
t.timer++;
if (t.timer > 10000) {
t.timer = 0;
}
if (t.hayata > 0) {
if ((timer % 300) == 0) {
t.shootinterval = 60 + random(40);
}
if (((t.timer % t.shootinterval) == 0) && (t._x > 100)) {
thebulp = _root.attachstuff(t._parent, "bbullet-pistol", "array_polisbullets", 331, 430, t._x + t.hand._x, t._y + t.hand._y, polisbulletpistol_ef);
thebulp.initrot = t.hand._rotation + ((random(t.boncatness) - (t.boncatness / 2)) / 10);
t.hand.gotoAndPlay("shoot");
}
if ((t.timer % 380) == 0) {
t.currenttarget = 300 + random(400);
}
t.hand._rotation = _root.pointrotate(t._x + t.hand._x, t._y + t.hand._y, mat._x, mat._y, 0);
if (Math.abs(t._x - t.currenttarget) > t.movement) {
if (t._x < t.currenttarget) {
t._x = t._x + t.movement;
} else if (t._x > t.currenttarget) {
t._x = t._x - t.movement;
}
}
htarr = array_matbullets;
ht = 0;
while (ht < htarr.length) {
if (this.det.hitTest(htarr[ht].det)) {
t.gethittimer = 20;
t.hayata = t.hayata - htarr[ht].dmg;
htarr[ht].die();
}
ht++;
}
htarr = array_polis;
ht = 0;
while (ht < htarr.length) {
while (this.det.hitTest(htarr[ht].det)) {
if ((htarr[ht].fullhayata < 180) && (htarr[ht] != this)) {
if (this._x < htarr[ht]._x) {
this._x--;
} else {
this._x++;
}
} else {
break;
}
}
ht++;
}
if (t.hayata <= 0) {
t.hayata = 0;
_root.wang = _root.wang + t.bonus;
this.gotoAndPlay("die");
this.onEnterFrame = function () {
this._x = this._x - _root.bgspeed;
};
t._parent.array_polis.splice(this.a_id, 1);
_root.re_a_id(t._parent.array_polis);
}
}
if (t.gethittimer > 0) {
t.gethittimer--;
}
if (t.gethittimer > 0) {
if ((t.gethittimer % 6) == 3) {
t.colorchange(100, 100, 100);
} else if ((t.gethittimer % 6) == 0) {
t.colorchange(50, 50, 50);
}
return(undefined);
}
t.colorchange(0, 0, 0);
}
}
function polisbike2enterframe() {
t = this;
if (t.ignited == undefined) {
t.timer = 0;
t.hayata = 12;
t.fullhayata = 12;
t.bonus = 70 + random(12);
t.boncatness = random(50);
trace("Polis 2 with boncatness:" + t.boncatness);
t.currenttarget = 300 + random(400);
t.movement = 2;
t.shootinterval = 40 + random(40);
t.somefunction = function () {
};
t.gethittimer = 0;
t.colorchange = function (r, g, b) {
br = new Color(t);
br.setTransform({rb:r, gb:g, bb:b});
};
t.ignited = 1;
}
this.swapDepths(this._x + (this._y * this._parent._width));
t.lb._xscale = (t.hayata / t.fullhayata) * 100;
if ((!_root.pauser) && (_root.canmove)) {
t.timer++;
if (t.timer > 10000) {
t.timer = 0;
}
if (t.hayata > 0) {
if ((timer % 300) == 0) {
t.shootinterval = 40 + random(40);
}
if (((t.timer % t.shootinterval) == 0) && (t._x > 100)) {
thebulp = _root.attachstuff(t._parent, "bbullet-pistol", "array_polisbullets", 331, 430, t._x + t.hand._x, t._y + t.hand._y, polisbulletpistol_ef);
thebulp.initrot = t.hand._rotation + ((random(t.boncatness) - (t.boncatness / 2)) / 10);
t.hand.gotoAndPlay("shoot");
}
if ((t.timer % 210) == 0) {
t.currenttarget = 300 + random(400);
}
t.hand._rotation = _root.pointrotate(t._x + t.hand._x, t._y + t.hand._y, mat._x, mat._y, 0);
if (Math.abs(t._x - t.currenttarget) > t.movement) {
if (t._x < t.currenttarget) {
t._x = t._x + t.movement;
} else if (t._x > t.currenttarget) {
t._x = t._x - t.movement;
}
}
htarr = array_matbullets;
ht = 0;
while (ht < htarr.length) {
if (this.det.hitTest(htarr[ht].det)) {
t.gethittimer = 20;
t.hayata = t.hayata - htarr[ht].dmg;
htarr[ht].die();
}
ht++;
}
htarr = array_polis;
ht = 0;
while (ht < htarr.length) {
while (this.det.hitTest(htarr[ht].det)) {
if ((htarr[ht].fullhayata < 180) && (htarr[ht] != this)) {
if (this._x < htarr[ht]._x) {
this._x--;
} else {
this._x++;
}
} else {
break;
}
}
ht++;
}
if (t.hayata <= 0) {
t.hayata = 0;
_root.wang = _root.wang + t.bonus;
this.gotoAndPlay("die");
this.onEnterFrame = function () {
this._x = this._x - _root.bgspeed;
};
t._parent.array_polis.splice(this.a_id, 1);
_root.re_a_id(t._parent.array_polis);
}
}
if (t.gethittimer > 0) {
t.gethittimer--;
}
if (t.gethittimer > 0) {
if ((t.gethittimer % 6) == 3) {
t.colorchange(100, 100, 100);
} else if ((t.gethittimer % 6) == 0) {
t.colorchange(50, 50, 50);
}
return(undefined);
}
t.colorchange(0, 0, 0);
}
}
function polisbike3enterframe() {
t = this;
if (t.ignited == undefined) {
t.timer = 0;
t.hayata = 16;
t.fullhayata = 16;
t.shootat = 0;
t.bonus = 90 + random(8);
t.boncatness = random(50);
trace("Polis 3 with boncatness:" + t.boncatness);
t.currenttarget = 300 + random(400);
t.movement = 2.5;
t.shootinterval = 60 + random(40);
t.somefunction = function () {
};
t.gethittimer = 0;
t.colorchange = function (r, g, b) {
br = new Color(t);
br.setTransform({rb:r, gb:g, bb:b});
};
t.ignited = 1;
}
this.swapDepths(this._x + (this._y * this._parent._width));
t.lb._xscale = (t.hayata / t.fullhayata) * 100;
if ((!_root.pauser) && (_root.canmove)) {
t.timer++;
if (t.timer > 10000) {
t.timer = 0;
}
if (t.hayata > 0) {
if ((timer % 300) == 0) {
t.shootinterval = 60 + random(40);
}
if (((t.timer % t.shootinterval) == 0) && (t._x > 100)) {
t.shootat = 30;
}
if (((t.shootat % 10) == 0) && (t.shootat > 0)) {
thebulp = _root.attachstuff(t._parent, "bbullet-rifle", "array_polisbullets", 331, 430, t._x + t.hand._x, t._y + t.hand._y, polisbulletrifle_ef);
thebulp.initrot = t.hand._rotation + ((random(t.boncatness) - (t.boncatness / 2)) / 10);
t.hand.gotoAndPlay("shoot");
}
if (t.shootat > 0) {
t.shootat--;
}
if ((t.timer % 210) == 0) {
t.currenttarget = 300 + random(400);
}
t.hand._rotation = _root.pointrotate(t._x + t.hand._x, t._y + t.hand._y, mat._x, mat._y, 0);
if (Math.abs(t._x - t.currenttarget) > t.movement) {
if (t._x < t.currenttarget) {
t._x = t._x + t.movement;
} else if (t._x > t.currenttarget) {
t._x = t._x - t.movement;
}
}
htarr = array_matbullets;
ht = 0;
while (ht < htarr.length) {
if (this.det.hitTest(htarr[ht].det)) {
t.gethittimer = 20;
t.hayata = t.hayata - htarr[ht].dmg;
htarr[ht].die();
}
ht++;
}
htarr = array_polis;
ht = 0;
while (ht < htarr.length) {
while (this.det.hitTest(htarr[ht].det)) {
if ((htarr[ht].fullhayata < 180) && (htarr[ht] != this)) {
if (this._x < htarr[ht]._x) {
this._x--;
} else {
this._x++;
}
} else {
break;
}
}
ht++;
}
if (t.hayata <= 0) {
t.hayata = 0;
_root.wang = _root.wang + t.bonus;
this.gotoAndPlay("die");
this.onEnterFrame = function () {
this._x = this._x - _root.bgspeed;
};
t._parent.array_polis.splice(this.a_id, 1);
_root.re_a_id(t._parent.array_polis);
}
}
if (t.gethittimer > 0) {
t.gethittimer--;
}
if (t.gethittimer > 0) {
if ((t.gethittimer % 6) == 3) {
t.colorchange(100, 100, 100);
} else if ((t.gethittimer % 6) == 0) {
t.colorchange(50, 50, 50);
}
return(undefined);
}
t.colorchange(0, 0, 0);
}
}
function poliscarenterframe() {
t = this;
if (t.ignited == undefined) {
t.timer = 0;
t.hayata = 27;
t.fullhayata = 27;
t.bonus = 100 + random(15);
t.boncatness = random(70);
trace("Polis Car with boncatness:" + t.boncatness);
t.currenttarget = 300 + random(400);
t.movement = 1.9;
t.shootinterval = 60 + random(40);
t.somefunction = function () {
};
t.gethittimer = 0;
t.colorchange = function (r, g, b) {
br = new Color(t);
br.setTransform({rb:r, gb:g, bb:b});
};
t.ignited = 1;
}
this.swapDepths(this._x + (this._y * this._parent._width));
t.lb._xscale = (t.hayata / t.fullhayata) * 100;
if ((!_root.pauser) && (_root.canmove)) {
t.timer++;
if (t.timer > 10000) {
t.timer = 0;
}
if (t.hayata > 0) {
if ((timer % 300) == 0) {
t.shootinterval = 100 + random(40);
}
if (((t.timer % t.shootinterval) == 0) && (t._x > 100)) {
thebulp = _root.attachstuff(t._parent, "bbullet-magnum", "array_polisbullets", 331, 430, t._x + t.hand._x, t._y + t.hand._y, polisbulletmagnum_ef);
thebulp.initrot = t.hand._rotation + ((random(t.boncatness) - (t.boncatness / 2)) / 10);
t.hand.gotoAndPlay("shoot");
}
if ((t.timer % 340) == 0) {
t.currenttarget = 300 + random(400);
}
t.hand._rotation = _root.pointrotate(t._x + t.hand._x, t._y + t.hand._y, mat._x, mat._y, 0);
if (Math.abs(t._x - t.currenttarget) > t.movement) {
if (t._x < t.currenttarget) {
t._x = t._x + t.movement;
} else if (t._x > t.currenttarget) {
t._x = t._x - t.movement;
}
}
htarr = array_matbullets;
ht = 0;
while (ht < htarr.length) {
if (this.det.hitTest(htarr[ht].det)) {
t.gethittimer = 20;
t.hayata = t.hayata - htarr[ht].dmg;
htarr[ht].die();
}
ht++;
}
htarr = array_polis;
ht = 0;
while (ht < htarr.length) {
while (this.det.hitTest(htarr[ht].det)) {
if ((htarr[ht].fullhayata < 180) && (htarr[ht] != this)) {
if (this._x < htarr[ht]._x) {
this._x--;
} else {
this._x++;
}
} else {
break;
}
}
ht++;
}
if (t.hayata <= 0) {
t.hayata = 0;
_root.wang = _root.wang + t.bonus;
this.gotoAndPlay("die");
this.onEnterFrame = function () {
this._x = this._x - _root.bgspeed;
};
t._parent.array_polis.splice(this.a_id, 1);
_root.re_a_id(t._parent.array_polis);
}
}
if (t.gethittimer > 0) {
t.gethittimer--;
}
if (t.gethittimer > 0) {
if ((t.gethittimer % 6) == 3) {
t.colorchange(100, 100, 100);
} else if ((t.gethittimer % 6) == 0) {
t.colorchange(50, 50, 50);
}
return(undefined);
}
t.colorchange(0, 0, 0);
}
}
function poliscar2enterframe() {
t = this;
if (t.ignited == undefined) {
t.timer = 0;
t.hayata = 32;
t.fullhayata = 32;
t.bonus = 120 + random(12);
t.boncatness = random(60);
trace("Polis Car 2 with boncatness:" + t.boncatness);
t.currenttarget = 300 + random(400);
t.movement = 1.5;
t.shootinterval = 360 + random(40);
t.somefunction = function () {
};
t.shootat = 0;
t.gethittimer = 0;
t.colorchange = function (r, g, b) {
br = new Color(t);
br.setTransform({rb:r, gb:g, bb:b});
};
t.ignited = 1;
}
this.swapDepths(this._x + (this._y * this._parent._width));
t.lb._xscale = (t.hayata / t.fullhayata) * 100;
if ((!_root.pauser) && (_root.canmove)) {
t.timer++;
if (t.timer > 10000) {
t.timer = 0;
}
if (t.hayata > 0) {
if ((timer % 300) == 0) {
t.shootinterval = 360 + random(40);
}
if (((t.timer % t.shootinterval) == 0) && (t._x > 100)) {
t.shootat = 182;
}
if (((t.shootat % 60) == 0) && (t.shootat > 0)) {
t.hand.gotoAndPlay("shoot");
thebulp = _root.attachstuff(t._parent, "bbullet-pistol", "array_polisbullets", 331, 430, t._x + t.hand._x, t._y + t.hand._y, polisbulletmagnum_ef);
thebulp.initrot = t.hand._rotation + ((random(t.boncatness) - (t.boncatness / 2)) / 10);
thebulp = _root.attachstuff(t._parent, "bbullet-pistol", "array_polisbullets", 331, 430, t._x + t.hand._x, t._y + t.hand._y, polisbulletmagnum_ef);
thebulp.initrot = ((t.hand._rotation + ((random(t.boncatness) - (t.boncatness / 2)) / 10)) + random(3)) + 3;
thebulp = _root.attachstuff(t._parent, "bbullet-pistol", "array_polisbullets", 331, 430, t._x + t.hand._x, t._y + t.hand._y, polisbulletmagnum_ef);
thebulp.initrot = ((t.hand._rotation + ((random(t.boncatness) - (t.boncatness / 2)) / 10)) - random(3)) - 3;
}
if (t.shootat > 0) {
t.shootat--;
}
if ((t.timer % 340) == 0) {
t.currenttarget = 300 + random(400);
}
t.hand._rotation = _root.pointrotate(t._x + t.hand._x, t._y + t.hand._y, mat._x, mat._y, 0);
if (Math.abs(t._x - t.currenttarget) > t.movement) {
if (t._x < t.currenttarget) {
t._x = t._x + t.movement;
} else if (t._x > t.currenttarget) {
t._x = t._x - t.movement;
}
}
htarr = array_matbullets;
ht = 0;
while (ht < htarr.length) {
if (this.det.hitTest(htarr[ht].det)) {
t.gethittimer = 20;
t.hayata = t.hayata - htarr[ht].dmg;
htarr[ht].die();
}
ht++;
}
htarr = array_polis;
ht = 0;
while (ht < htarr.length) {
while (this.det.hitTest(htarr[ht].det)) {
if ((htarr[ht].fullhayata < 180) && (htarr[ht] != this)) {
if (this._x < htarr[ht]._x) {
this._x--;
} else {
this._x++;
}
} else {
break;
}
}
ht++;
}
if (t.hayata <= 0) {
t.hayata = 0;
_root.wang = _root.wang + t.bonus;
this.gotoAndPlay("die");
this.onEnterFrame = function () {
this._x = this._x - _root.bgspeed;
};
t._parent.array_polis.splice(this.a_id, 1);
_root.re_a_id(t._parent.array_polis);
}
}
if (t.gethittimer > 0) {
t.gethittimer--;
}
if (t.gethittimer > 0) {
if ((t.gethittimer % 6) == 3) {
t.colorchange(100, 100, 100);
} else if ((t.gethittimer % 6) == 0) {
t.colorchange(50, 50, 50);
}
return(undefined);
}
t.colorchange(0, 0, 0);
}
}
function polisjeepenterframe() {
t = this;
if (t.ignited == undefined) {
t.timer = 0;
t.hayata = 47;
t.fullhayata = 47;
t.bonus = 150 + random(15);
t.boncatness = random(60);
trace("Polis Jeep with boncatness:" + t.boncatness);
t.currenttarget = 300 + random(400);
t.movement = 2.1;
t.shootinterval = 300 + random(40);
t.somefunction = function () {
};
t.gethittimer = 0;
t.colorchange = function (r, g, b) {
br = new Color(t);
br.setTransform({rb:r, gb:g, bb:b});
};
t.ignited = 1;
}
this.swapDepths(this._x + (this._y * this._parent._width));
t.lb._xscale = (t.hayata / t.fullhayata) * 100;
if ((!_root.pauser) && (_root.canmove)) {
t.timer++;
if (t.timer > 10000) {
t.timer = 0;
}
if (t.hayata > 0) {
if ((timer % 300) == 0) {
t.shootinterval = 300 + random(40);
}
if (((t.timer % t.shootinterval) == 0) && (t._x > 100)) {
thebulp = _root.attachstuff(t._parent, "bbullet-rocket", "array_polisbullets", 331, 430, t._x + t.hand._x, t._y + t.hand._y, polisbulletrocket_ef);
thebulp.initrot = t.hand._rotation + ((random(t.boncatness) - (t.boncatness / 2)) / 10);
t.hand.gotoAndPlay("shoot");
}
if ((t.timer % 190) == 0) {
t.currenttarget = 300 + random(400);
}
t.hand._rotation = _root.pointrotate(t._x + t.hand._x, t._y + t.hand._y, mat._x, mat._y, 0);
if (Math.abs(t._x - t.currenttarget) > t.movement) {
if (t._x < t.currenttarget) {
t._x = t._x + t.movement;
} else if (t._x > t.currenttarget) {
t._x = t._x - t.movement;
}
}
htarr = array_matbullets;
ht = 0;
while (ht < htarr.length) {
if (this.det.hitTest(htarr[ht].det)) {
t.gethittimer = 20;
t.hayata = t.hayata - htarr[ht].dmg;
htarr[ht].die();
}
ht++;
}
htarr = array_polis;
ht = 0;
while (ht < htarr.length) {
while (this.det.hitTest(htarr[ht].det)) {
if ((htarr[ht].fullhayata < 180) && (htarr[ht] != this)) {
if (this._x < htarr[ht]._x) {
this._x--;
} else {
this._x++;
}
} else {
break;
}
}
ht++;
}
if (t.hayata <= 0) {
t.hayata = 0;
_root.wang = _root.wang + t.bonus;
this.gotoAndPlay("die");
this.onEnterFrame = function () {
this._x = this._x - _root.bgspeed;
};
t._parent.array_polis.splice(this.a_id, 1);
_root.re_a_id(t._parent.array_polis);
}
}
if (t.gethittimer > 0) {
t.gethittimer--;
}
if (t.gethittimer > 0) {
if ((t.gethittimer % 6) == 3) {
t.colorchange(100, 100, 100);
} else if ((t.gethittimer % 6) == 0) {
t.colorchange(50, 50, 50);
}
return(undefined);
}
t.colorchange(0, 0, 0);
}
}
function polishelienterframe() {
t = this;
if (t.ignited == undefined) {
t.timer = 0;
t.hayata = 182;
t.fullhayata = 182;
t.shootat = 0;
t.bonus = 500 + random(100);
t.boncatness = random(110);
trace("Polis Heli with boncatness:" + t.boncatness);
t.currenttarget = 300 + random(400);
t.movement = 2.5;
t.shootinterval = 60 + random(40);
t.somefunction = function () {
};
t.gethittimer = 0;
t.colorchange = function (r, g, b) {
br = new Color(t);
br.setTransform({rb:r, gb:g, bb:b});
};
t.ignited = 1;
}
this.swapDepths(this._parent.getNextHighestDepth());
t.lb._xscale = (t.hayata / t.fullhayata) * 100;
if ((!_root.pauser) && (_root.canmove)) {
t.timer++;
if (t.timer > 10000) {
t.timer = 0;
}
if (t.hayata > 0) {
if ((timer % 300) == 0) {
t.shootinterval = 60 + random(40);
}
if (((t.timer % t.shootinterval) == 0) && (t._x > 100)) {
t.shootat = 30;
}
if (((t.shootat % 10) == 0) && (t.shootat > 0)) {
thebulp = _root.attachstuff(t._parent, "bbullet-rifle", "array_polisbullets", 331, 430, t._x + t.hand._x, t._y + t.hand._y, polisbulletrifle_ef);
thebulp.initrot = t.hand._rotation + ((random(t.boncatness) - (t.boncatness / 2)) / 10);
t.hand.gotoAndPlay("shoot");
}
if (t.shootat > 0) {
t.shootat--;
}
if ((t.timer % 92) == 0) {
t.currenttarget = 200 + random(200);
}
t.hand._rotation = _root.pointrotate(t._x + t.hand._x, t._y + t.hand._y, mat._x, mat._y, 0);
if (Math.abs(t._x - t.currenttarget) > t.movement) {
if (t._x < t.currenttarget) {
t._x = t._x + t.movement;
} else if (t._x > t.currenttarget) {
t._x = t._x - t.movement;
}
}
htarr = array_matbullets;
ht = 0;
while (ht < htarr.length) {
if (this.det.hitTest(htarr[ht].det)) {
t.gethittimer = 20;
t.hayata = t.hayata - htarr[ht].dmg;
htarr[ht].die();
}
ht++;
}
if (t.hayata <= 0) {
t.hayata = 0;
_root.wang = _root.wang + t.bonus;
this.gotoAndPlay("die");
this.onEnterFrame = function () {
};
t._parent.array_polis.splice(this.a_id, 1);
_root.re_a_id(t._parent.array_polis);
}
}
if (t.gethittimer > 0) {
t.gethittimer--;
}
if (t.gethittimer > 0) {
if ((t.gethittimer % 6) == 3) {
t.colorchange(100, 100, 100);
} else if ((t.gethittimer % 6) == 0) {
t.colorchange(50, 50, 50);
}
return(undefined);
}
t.colorchange(0, 0, 0);
}
}
function matbulletpistol_ef() {
t = this;
if (t.ignited == undefined) {
t.timer = 0;
t.dmg = 1;
t.spd = 12;
t.timealive = 60;
t.movement = 2;
t.die = function () {
this.gotoAndPlay("destroyed");
this.onEnterFrame = function () {
};
t._parent.array_matbullets.splice(this.a_id, 1);
_root.re_a_id(t._parent.array_matbullets);
};
_root.anglemove(t, t.initrot, 0, 30);
t.ignited = 1;
}
if ((!_root.pauser) && (_root.canmove)) {
t.timer++;
if (t.timer > t.timealive) {
t.die();
}
_root.anglemove(t, t.initrot, 0, t.spd);
this.swapDepths(this._x + (this._y * this._parent._width));
}
}
function matbulletsmg_ef() {
t = this;
if (t.ignited == undefined) {
t.timer = 0;
t.dmg = 1;
t.spd = 18;
t.timealive = 60;
t.movement = 2;
t.die = function () {
this.gotoAndPlay("destroyed");
this.onEnterFrame = function () {
};
t._parent.array_matbullets.splice(this.a_id, 1);
_root.re_a_id(t._parent.array_matbullets);
};
_root.anglemove(t, t.initrot, 0, 30);
t.ignited = 1;
}
if ((!_root.pauser) && (_root.canmove)) {
t.timer++;
if (t.timer > t.timealive) {
t.die();
}
_root.anglemove(t, t.initrot, 0, t.spd);
this.swapDepths(this._x + (this._y * this._parent._width));
}
}
function matbulletmagnumrifle_ef() {
t = this;
if (t.ignited == undefined) {
t.timer = 0;
t.dmg = 2;
t.spd = 18;
t.timealive = 60;
t.movement = 2;
t.die = function () {
this.gotoAndPlay("destroyed");
this.onEnterFrame = function () {
};
t._parent.array_matbullets.splice(this.a_id, 1);
_root.re_a_id(t._parent.array_matbullets);
};
_root.anglemove(t, t.initrot, 0, 30);
t._rotation = t.initrot;
t.ignited = 1;
}
if ((!_root.pauser) && (_root.canmove)) {
t.timer++;
if (t.timer > t.timealive) {
t.die();
}
_root.anglemove(t, t.initrot, 0, t.spd);
this.swapDepths(this._x + (this._y * this._parent._width));
}
}
function matbulletlaser_ef() {
t = this;
if (t.ignited == undefined) {
t.timer = 0;
t.dmg = 0;
t.spd = 24;
t.timealive = 50;
t.movement = 2;
t.die = function () {
thebul = _root.attachstuff(t._parent, "bullet-explop", "array_matbullets", 201, 300, this._x, this._y, matbulletexplop_ef);
this.gotoAndPlay("destroyed");
this.onEnterFrame = function () {
};
t._parent.array_matbullets.splice(this.a_id, 1);
_root.re_a_id(t._parent.array_matbullets);
};
_root.anglemove(t, t.initrot, 0, 30);
t._rotation = t.initrot;
t.ignited = 1;
}
if ((!_root.pauser) && (_root.canmove)) {
t.timer++;
if (t.timer > t.timealive) {
t.die();
}
_root.anglemove(t, t.initrot, 0, t.spd);
this.swapDepths(this._x + (this._y * this._parent._width));
}
}
function matbulletexplop_ef() {
t = this;
if (t.ignited == undefined) {
t.timer = 0;
t.dmg = 5;
t.spd = 0;
t.timealive = 145;
t.movement = 2;
t.died = function () {
this.gotoAndPlay("destroyed");
this.onEnterFrame = function () {
this._x = this._x - _root.bgspeed;
};
t._parent.array_matbullets.splice(this.a_id, 1);
_root.re_a_id(t._parent.array_matbullets);
};
t.die = function () {
};
t.ignited = 1;
}
if ((!_root.pauser) && (_root.canmove)) {
t.timer++;
if (t.timer > t.timealive) {
t.died();
}
this.swapDepths(this._x + (this._y * this._parent._width));
}
}
function polisbulletpistol_ef() {
t = this;
if (t.ignited == undefined) {
t.timer = 0;
t.dmg = 1;
t.spd = 8;
t.timealive = 90;
t.movement = 2;
t.die = function () {
this.gotoAndPlay("destroyed");
this.onEnterFrame = function () {
};
t._parent.array_polisbullets.splice(this.a_id, 1);
_root.re_a_id(t._parent.array_polisbullets);
};
_root.anglemove(t, t.initrot, 0, 30);
t.ignited = 1;
}
if ((!_root.pauser) && (_root.canmove)) {
t.timer++;
if (t.timer > t.timealive) {
t.die();
}
_root.anglemove(t, t.initrot, 0, t.spd);
this.swapDepths(this._x + (this._y * this._parent._width));
}
}
function polisbulletrifle_ef() {
t = this;
if (t.ignited == undefined) {
t.timer = 0;
t.dmg = 2;
t.spd = 10;
t.timealive = 90;
t.movement = 2;
t.die = function () {
this.gotoAndPlay("destroyed");
this.onEnterFrame = function () {
};
t._parent.array_polisbullets.splice(this.a_id, 1);
_root.re_a_id(t._parent.array_polisbullets);
};
_root.anglemove(t, t.initrot, 0, 30);
t.ignited = 1;
}
if ((!_root.pauser) && (_root.canmove)) {
t.timer++;
if (t.timer > t.timealive) {
t.die();
}
t._rotation = t.initrot;
_root.anglemove(t, t.initrot, 0, t.spd);
this.swapDepths(this._x + (this._y * this._parent._width));
}
}
function polisbulletrocket_ef() {
t = this;
if (t.ignited == undefined) {
t.timer = 0;
t.dmg = 10;
t.spd = 6;
t.timealive = 90;
t.movement = 2;
t.die = function () {
thebulp = _root.attachstuff(t._parent, "bbullet-rocket-explop", "array_polisbullets", 331, 430, this._x, this._y, polisbulletrocketexplop_ef);
thebulp.initrot = t.hand._rotation + ((random(t.boncatness) - (t.boncatness / 2)) / 10);
this.gotoAndPlay("destroyed");
this.onEnterFrame = function () {
};
t._parent.array_polisbullets.splice(this.a_id, 1);
_root.re_a_id(t._parent.array_polisbullets);
};
_root.anglemove(t, t.initrot, 0, 30);
t.ignited = 1;
}
if ((!_root.pauser) && (_root.canmove)) {
t.timer++;
if (t.timer > t.timealive) {
t.die();
}
if ((t.timer % 3) == 0) {
_root.attachstuff(t._parent, "smoke-fromrocket", "array_rocketsmoke", 451, 500, t._x, t._y, null);
}
t._rotation = t.initrot;
_root.anglemove(t, t.initrot, 0, t.spd);
this.swapDepths(this._x + (this._y * this._parent._width));
}
}
function polisbulletrocketexplop_ef() {
t = this;
if (t.ignited == undefined) {
t.timer = 0;
t.dmg = 10;
t.spd = 10;
t.timealive = 140;
t.movement = 2;
t.died = function () {
this.onEnterFrame = function () {
};
t._parent.array_polisbullets.splice(this.a_id, 1);
_root.re_a_id(t._parent.array_polisbullets);
};
t.die = null;
_root.anglemove(t, t.initrot, 0, 30);
t.ignited = 1;
}
if ((!_root.pauser) && (_root.canmove)) {
t.timer++;
if (t.timer > t.timealive) {
t.died();
}
t._x = t._x - _root.bgspeed;
this.swapDepths(this._x + (this._y * this._parent._width));
}
}
function polisbulletmagnum_ef() {
t = this;
if (t.ignited == undefined) {
t.timer = 0;
t.dmg = 2;
t.spd = 10;
t.timealive = 90;
t.movement = 2;
t.die = function () {
this.gotoAndPlay("destroyed");
this.onEnterFrame = function () {
};
t._parent.array_polisbullets.splice(this.a_id, 1);
_root.re_a_id(t._parent.array_polisbullets);
};
_root.anglemove(t, t.initrot, 0, 30);
t.ignited = 1;
}
if ((!_root.pauser) && (_root.canmove)) {
t.timer++;
if (t.timer > t.timealive) {
t.die();
}
_root.anglemove(t, t.initrot, 0, t.spd);
this.swapDepths(this._x + (this._y * this._parent._width));
}
}
this.onEnterFrame = function () {
if (ignited == undefined) {
timer = 0;
currentwave = 0;
mat.onEnterFrame = matenterframe;
vehi.onEnterFrame = vehienterframe;
vehi2.onEnterFrame = vehienterframe;
nextlevella = function () {
timer = 0;
_root.gamelevel++;
currentwave = 0;
_root.savedgame = 1;
_root.savedwang = _root.wang;
_root.savedpistolbogt = _root.pistolbogt;
_root.savedmagnumbogt = _root.magnumbogt;
_root.savedshotgunbogt = _root.shotgunbogt;
_root.savedsmgbogt = _root.smgbogt;
_root.savedriflebogt = _root.riflebogt;
_root.savedlaserbogt = _root.laserbogt;
_root.savedgamelevel = _root.gamelevel;
trace("progress saved");
};
nextscena = function () {
stopAllSounds();
musiak.gotoAndStop("song4");
_root.canmove = 0;
_root.nextscenewindow.gotoAndPlay("open");
};
ignited = 1;
}
if ((!_root.pauser) && (_root.canmove)) {
timer++;
if (timer > 10000) {
timer = 0;
}
line1._x = line1._x - _root.bgspeed;
if (line1._x < (-280 + _root.bgspeed)) {
line1._x = 0;
}
line2._x = line2._x - _root.bgspeed;
if (line2._x < (-280 + _root.bgspeed)) {
line2._x = 0;
}
roaddivider._x = roaddivider._x - _root.bgspeed;
if (roaddivider._x < (-360 + _root.bgspeed)) {
roaddivider._x = 0;
}
roadtexture._x = roadtexture._x - _root.bgspeed;
if (roadtexture._x < (((-roadtexture._width) / 2) + _root.bgspeed)) {
roadtexture._x = 0;
}
thelanes = [40, 95, 150];
if (_root.gamelevel == 1) {
if (timer == 1) {
musiak.gotoAndStop("song1");
sirentype = random(2) + 1;
sssiren.gotoAndStop("siren" + sirentype);
thepolis = _root.attachstuff(this, "polisbike", "array_polis", 101, 150, -180, thelanes[random(thelanes.length)], polisbikeenterframe);
thepolis = _root.attachstuff(this, "polisbike", "array_polis", 101, 150, -270 - random(100), thelanes[random(thelanes.length)], polisbikeenterframe);
}
if (currentwave == 2) {
sssiren.gotoAndStop(("siren" + sirentype) + "stop");
com.newgrounds.API.unlockMedal("Biker");
nextlevella();
nextscena();
}
} else if (_root.gamelevel == 2) {
if (timer == 1) {
musiak.gotoAndStop("song1");
sirentype = random(2) + 1;
sssiren.gotoAndStop("siren" + sirentype);
thepolis = _root.attachstuff(this, "polisbike", "array_polis", 101, 150, -180, thelanes[random(thelanes.length)], polisbikeenterframe);
thepolis = _root.attachstuff(this, "polisbike2", "array_polis", 101, 150, -270 - random(100), thelanes[random(thelanes.length)], polisbike2enterframe);
thepolis = _root.attachstuff(this, "polisbike2", "array_polis", 101, 150, -280 - random(100), thelanes[random(thelanes.length)], polisbike2enterframe);
}
if (currentwave == 3) {
sssiren.gotoAndStop(("siren" + sirentype) + "stop");
nextlevella();
nextscena();
}
} else if (_root.gamelevel == 3) {
if (timer == 1) {
musiak.gotoAndStop("song1");
sirentype = random(2) + 1;
sssiren.gotoAndStop("siren" + sirentype);
thepolis = _root.attachstuff(this, "polisbike2", "array_polis", 101, 150, -180 - random(100), thelanes[random(thelanes.length)], polisbike2enterframe);
}
if (currentwave == 1) {
sssiren.gotoAndStop(("siren" + sirentype) + "stop");
nextlevella();
}
} else if (_root.gamelevel == 4) {
if (timer == 1) {
musiak.gotoAndStop("song1");
sirentype = random(2) + 1;
sssiren.gotoAndStop("siren" + sirentype);
thepolis = _root.attachstuff(this, "polisbike3", "array_polis", 101, 150, -170 - random(100), thelanes[random(thelanes.length)], polisbike3enterframe);
thepolis = _root.attachstuff(this, "polisbike3", "array_polis", 101, 150, -270 - random(100), thelanes[random(thelanes.length)], polisbike3enterframe);
thepolis = _root.attachstuff(this, "polisbike2", "array_polis", 101, 150, -180 - random(100), thelanes[random(thelanes.length)], polisbike2enterframe);
thepolis = _root.attachstuff(this, "polisbike2", "array_polis", 101, 150, -220 - random(100), thelanes[random(thelanes.length)], polisbike2enterframe);
}
if (currentwave == 4) {
sssiren.gotoAndStop(("siren" + sirentype) + "stop");
com.newgrounds.API.unlockMedal("Stuntman");
nextlevella();
nextscena();
}
} else if (_root.gamelevel == 5) {
if (timer == 1) {
musiak.gotoAndStop("song2");
sirentype = random(2) + 1;
sssiren.gotoAndStop("siren" + sirentype);
thepolis = _root.attachstuff(this, "poliscar1", "array_polis", 101, 150, -170 - random(100), thelanes[random(thelanes.length)], poliscarenterframe);
thepolis = _root.attachstuff(this, "poliscar1", "array_polis", 101, 150, -350 - random(100), thelanes[random(thelanes.length)], poliscarenterframe);
}
if (currentwave == 2) {
sssiren.gotoAndStop(("siren" + sirentype) + "stop");
nextlevella();
nextscena();
}
} else if (_root.gamelevel == 6) {
if (timer == 1) {
musiak.gotoAndStop("song2");
sirentype = random(2) + 1;
sssiren.gotoAndStop("siren" + sirentype);
thepolis = _root.attachstuff(this, "poliscar1", "array_polis", 101, 150, -170 - random(100), thelanes[random(thelanes.length)], poliscarenterframe);
thepolis = _root.attachstuff(this, "polisbike3", "array_polis", 101, 150, -190 - random(100), thelanes[random(thelanes.length)], polisbike3enterframe);
thepolis = _root.attachstuff(this, "polisbike3", "array_polis", 101, 150, -270 - random(100), thelanes[random(thelanes.length)], polisbike3enterframe);
thepolis = _root.attachstuff(this, "polisbike2", "array_polis", 101, 150, -180 - random(100), thelanes[random(thelanes.length)], polisbike2enterframe);
}
if (currentwave == 4) {
sssiren.gotoAndStop(("siren" + sirentype) + "stop");
nextlevella();
}
} else if (_root.gamelevel == 7) {
if (timer == 1) {
musiak.gotoAndStop("song2");
sirentype = random(2) + 1;
sssiren.gotoAndStop("siren" + sirentype);
thepolis = _root.attachstuff(this, "poliscar2", "array_polis", 101, 150, -170 - random(100), thelanes[random(thelanes.length)], poliscar2enterframe);
thepolis = _root.attachstuff(this, "polisbike", "array_polis", 101, 150, -200, thelanes[random(thelanes.length)], polisbikeenterframe);
thepolis = _root.attachstuff(this, "polisbike", "array_polis", 101, 150, -270 - random(100), thelanes[random(thelanes.length)], polisbikeenterframe);
thepolis = _root.attachstuff(this, "poliscar2", "array_polis", 101, 150, -240 - random(100), thelanes[random(thelanes.length)], poliscar2enterframe);
thepolis = _root.attachstuff(this, "poliscar2", "array_polis", 101, 150, -300 - random(100), thelanes[random(thelanes.length)], poliscar2enterframe);
}
if (currentwave == 5) {
sssiren.gotoAndStop(("siren" + sirentype) + "stop");
nextlevella();
nextscena();
}
} else if (_root.gamelevel == 8) {
if (timer == 1) {
musiak.gotoAndStop("song2");
sirentype = random(2) + 1;
sssiren.gotoAndStop("siren" + sirentype);
thepolis = _root.attachstuff(this, "polisbike", "array_polis", 101, 150, -170 - random(100), thelanes[random(thelanes.length)], polisbikeenterframe);
thepolis = _root.attachstuff(this, "polisbike2", "array_polis", 101, 150, -200, thelanes[random(thelanes.length)], polisbike2enterframe);
thepolis = _root.attachstuff(this, "polisbike3", "array_polis", 101, 150, -185 - random(100), thelanes[random(thelanes.length)], polisbike3enterframe);
}
if (currentwave == 3) {
sssiren.gotoAndStop(("siren" + sirentype) + "stop");
nextlevella();
}
} else if (_root.gamelevel == 9) {
if (timer == 1) {
musiak.gotoAndStop("song2");
sirentype = random(2) + 1;
sssiren.gotoAndStop("siren" + sirentype);
thepolis = _root.attachstuff(this, "poliscar1", "array_polis", 101, 150, -220 - random(100), thelanes[random(thelanes.length)], poliscarenterframe);
thepolis = _root.attachstuff(this, "poliscar2", "array_polis", 101, 150, -170 - random(100), thelanes[random(thelanes.length)], poliscar2enterframe);
thepolis = _root.attachstuff(this, "poliscar2", "array_polis", 101, 150, -190 - random(100), thelanes[random(thelanes.length)], poliscar2enterframe);
thepolis = _root.attachstuff(this, "poliscar2", "array_polis", 101, 150, -210 - random(100), thelanes[random(thelanes.length)], poliscar2enterframe);
thepolis = _root.attachstuff(this, "poliscar1", "array_polis", 101, 150, -220 - random(100), thelanes[random(thelanes.length)], poliscarenterframe);
thepolis = _root.attachstuff(this, "poliscar1", "array_polis", 101, 150, -250 - random(100), thelanes[random(thelanes.length)], poliscarenterframe);
}
if (currentwave == 6) {
sssiren.gotoAndStop(("siren" + sirentype) + "stop");
com.newgrounds.API.unlockMedal("Desperado");
nextlevella();
nextscena();
}
} else if (_root.gamelevel == 10) {
if (timer == 1) {
musiak.gotoAndStop("song3");
sirentype = random(2) + 1;
sssiren.gotoAndStop("siren" + sirentype);
thepolis = _root.attachstuff(this, "polisjeep", "array_polis", 101, 150, -170 - random(100), thelanes[random(thelanes.length)], polisjeepenterframe);
}
if (currentwave == 1) {
sssiren.gotoAndStop(("siren" + sirentype) + "stop");
nextlevella();
}
} else if (_root.gamelevel == 11) {
if (timer == 1) {
musiak.gotoAndStop("song3");
sirentype = random(2) + 1;
sssiren.gotoAndStop("siren" + sirentype);
thepolis = _root.attachstuff(this, "polisbike2", "array_polis", 101, 150, -200, thelanes[random(thelanes.length)], polisbike2enterframe);
thepolis = _root.attachstuff(this, "polisbike3", "array_polis", 101, 150, -185 - random(100), thelanes[random(thelanes.length)], polisbike3enterframe);
thepolis = _root.attachstuff(this, "polisbike2", "array_polis", 101, 150, -220, thelanes[random(thelanes.length)], polisbike2enterframe);
thepolis = _root.attachstuff(this, "polisbike3", "array_polis", 101, 150, -185 - random(100), thelanes[random(thelanes.length)], polisbike3enterframe);
thepolis = _root.attachstuff(this, "polisbike2", "array_polis", 101, 150, -230, thelanes[random(thelanes.length)], polisbike2enterframe);
thepolis = _root.attachstuff(this, "polisbike3", "array_polis", 101, 150, -180 - random(100), thelanes[random(thelanes.length)], polisbike3enterframe);
thepolis = _root.attachstuff(this, "polisbike2", "array_polis", 101, 150, -260, thelanes[random(thelanes.length)], polisbike2enterframe);
thepolis = _root.attachstuff(this, "polisbike3", "array_polis", 101, 150, -215 - random(100), thelanes[random(thelanes.length)], polisbike3enterframe);
}
if (currentwave == 8) {
sssiren.gotoAndStop(("siren" + sirentype) + "stop");
nextlevella();
nextscena();
}
} else if (_root.gamelevel == 12) {
if (timer == 1) {
musiak.gotoAndStop("song3");
sirentype = random(2) + 1;
sssiren.gotoAndStop("siren" + sirentype);
thepolis = _root.attachstuff(this, "polisjeep", "array_polis", 101, 150, -170 - random(100), thelanes[random(thelanes.length)], polisjeepenterframe);
thepolis = _root.attachstuff(this, "polisjeep", "array_polis", 101, 150, -370 - random(100), thelanes[random(thelanes.length)], polisjeepenterframe);
thepolis = _root.attachstuff(this, "polisbike3", "array_polis", 101, 150, -215 - random(100), thelanes[random(thelanes.length)], polisbike3enterframe);
thepolis = _root.attachstuff(this, "poliscar2", "array_polis", 101, 150, -210 - random(100), thelanes[random(thelanes.length)], poliscar2enterframe);
}
if (currentwave == 4) {
sssiren.gotoAndStop(("siren" + sirentype) + "stop");
nextlevella();
}
} else if (_root.gamelevel == 13) {
if (timer == 1) {
musiak.gotoAndStop("song3");
sirentype = random(2) + 1;
sssiren.gotoAndStop("siren" + sirentype);
thepolis = _root.attachstuff(this, "polisheli", "array_polis", 101, 150, -180, 40 + random(100), polishelienterframe);
thepolis = _root.attachstuff(this, "polisjeep", "array_polis", 101, 150, -170 - random(100), thelanes[random(thelanes.length)], polisjeepenterframe);
thepolis = _root.attachstuff(this, "polisbike3", "array_polis", 101, 150, -215 - random(100), thelanes[random(thelanes.length)], polisbike3enterframe);
thepolis = _root.attachstuff(this, "poliscar2", "array_polis", 101, 150, -230 - random(100), thelanes[random(thelanes.length)], poliscar2enterframe);
thepolis = _root.attachstuff(this, "polisbike3", "array_polis", 101, 150, -315 - random(100), thelanes[random(thelanes.length)], polisbike3enterframe);
thepolis = _root.attachstuff(this, "poliscar2", "array_polis", 101, 150, -280 - random(100), thelanes[random(thelanes.length)], poliscar2enterframe);
thepolis = _root.attachstuff(this, "polisjeep", "array_polis", 101, 150, -370 - random(100), thelanes[random(thelanes.length)], polisjeepenterframe);
}
if (currentwave == 7) {
stopAllSounds();
com.newgrounds.API.unlockMedal("Survivor");
_root.gotoAndStop("wingame");
}
}
}
_root.indi.energybar._xscale = (_root.hayata / _root.fullhayata) * 100;
};
this.gotoAndStop(_root.currentlevellabel);
Symbol 923 Button
on (release) {
_root.gotoAndPlay("replaylevel");
}
Symbol 929 MovieClip Frame 1
this.onEnterFrame = function () {
if (whatweapon && (_root[whatweapon + "_unlocked"])) {
_visible = false;
return(undefined);
}
_visible = true;
};
Symbol 931 MovieClip Frame 1
stop();
Symbol 933 MovieClip Frame 1
stop();
Instance of Symbol 929 MovieClip in Symbol 933 MovieClip Frame 1
onClipEvent (load) {
whatweapon = "stalacgun";
}
Instance of Symbol 929 MovieClip in Symbol 933 MovieClip Frame 1
onClipEvent (load) {
whatweapon = "snowdrop";
}
Instance of Symbol 929 MovieClip in Symbol 933 MovieClip Frame 1
onClipEvent (load) {
whatweapon = "snowbomb";
}
Instance of Symbol 929 MovieClip in Symbol 933 MovieClip Frame 1
onClipEvent (load) {
whatweapon = "poisonbomb";
}
Instance of Symbol 929 MovieClip in Symbol 933 MovieClip Frame 1
onClipEvent (load) {
whatweapon = "whirlwind";
}
Symbol 944 MovieClip Frame 98
_root.play();
stop();
Symbol 944 MovieClip Frame 173
_root.passlevel(_root.currentlevellabel);
_root.gotoAndPlay("levels");
Symbol 944 MovieClip Frame 246
stop();
Symbol 949 MovieClip Frame 1
var time;
var frameTime;
var prevFrameTime = getTimer();
var secondTime;
var prevSecondTime = getTimer();
var frames = 0;
var fps = "...";
Symbol 949 MovieClip Frame 2
time = getTimer();
frameTime = time - prevFrameTime;
secondTime = time - prevSecondTime;
if (secondTime >= 1000) {
fps = frames.toString();
if (VERBOSE) {
trace("FPS: " + fps);
}
frames = 0;
prevSecondTime = time;
} else {
frames++;
}
prevFrameTime = time;
tf.text = ((fps + " FPS / ") + frameTime) + " MS";
iBar._xscale = iBar._xscale - ((iBar._xscale - (frameTime * 5)) / 5);
if (qchanger) {
if (fps < 18) {
_root._quality = "LOW";
} else {
_root._quality = "MEDIUM";
}
}
Symbol 949 MovieClip Frame 3
gotoAndPlay (2);
Symbol 964 Button
on (release) {
this.gotoAndPlay("close");
}
Symbol 975 MovieClip Frame 1
stop();
Symbol 975 MovieClip Frame 17
gotoAndStop("lvl" + _root.gamelevel);
Symbol 975 MovieClip Frame 66
_root.canmove = 1;
Symbol 989 Button
on (release) {
_root.pauser = 1 - _root.pauser;
if (_root.pauser == 1) {
this.gotoAndPlay("pause");
} else {
this.gotoAndPlay("unpause");
}
}
Symbol 997 MovieClip Frame 9
stop();
Symbol 998 MovieClip Frame 1
if ((_root[theitem] != undefined) && (price != undefined)) {
if (_root[theitem] == 1) {
this.gotoAndStop(2);
} else if (_root.wang >= price) {
this.onRelease = function () {
if (_root.wang >= price) {
this.gotoAndStop(2);
this.onRelease = null;
_root.wang = _root.wang - price;
_root[theitem] = 1;
return(undefined);
}
this.onRelease = null;
this.gotoAndStop(3);
};
stop();
} else {
this.gotoAndStop(3);
}
}
Symbol 1002 MovieClip Frame 1
if ((_root[theitem] != undefined) && (price != undefined)) {
if (_root.wang >= price) {
this.onRelease = function () {
if (_root.wang >= price) {
this.gotoAndStop(2);
this.onRelease = null;
_root.wang = _root.wang - price;
_root[theitem] = _root[theitem] + adder;
if (_root[theitem] > maxadder) {
_root[theitem] = maxadder;
}
return(undefined);
}
this.onRelease = null;
this.gotoAndStop(3);
};
stop();
} else {
this.gotoAndStop(3);
}
}
Symbol 1009 MovieClip Frame 1
_root.pauser = 0;
stop();
Instance of Symbol 138 MovieClip in Symbol 1009 MovieClip Frame 1
onClipEvent (keyUp) {
if (Key.getCode() == 32) {
_root.pauser = 1 - _root.pauser;
if (_root.pauser == 1) {
_parent.gotoAndPlay("pause");
} else {
_parent.gotoAndPlay("unpause");
}
}
}
Symbol 1009 MovieClip Frame 5
_root.pauser = 1;
stop();
Instance of Symbol 998 MovieClip in Symbol 1009 MovieClip Frame 5
onClipEvent (load) {
price = 0;
theitem = "pistolbogt";
}
Instance of Symbol 998 MovieClip in Symbol 1009 MovieClip Frame 5
onClipEvent (load) {
price = 300;
theitem = "shotgunbogt";
}
Instance of Symbol 998 MovieClip in Symbol 1009 MovieClip Frame 5
onClipEvent (load) {
price = 295;
theitem = "magnumbogt";
}
Instance of Symbol 998 MovieClip in Symbol 1009 MovieClip Frame 5
onClipEvent (load) {
price = 599;
theitem = "smgbogt";
}
Instance of Symbol 998 MovieClip in Symbol 1009 MovieClip Frame 5
onClipEvent (load) {
price = 710;
theitem = "riflebogt";
}
Instance of Symbol 998 MovieClip in Symbol 1009 MovieClip Frame 5
onClipEvent (load) {
price = 1225;
theitem = "laserbogt";
}
Instance of Symbol 1002 MovieClip in Symbol 1009 MovieClip Frame 5
onClipEvent (load) {
price = 850;
theitem = "hayata";
adder = int(_root.fullhayata / 2);
maxadder = _root.fullhayata;
}
Instance of Symbol 1002 MovieClip in Symbol 1009 MovieClip Frame 5
onClipEvent (load) {
price = 450;
theitem = "hayata";
adder = int(_root.fullhayata / 4);
maxadder = _root.fullhayata;
}
Symbol 1011 MovieClip Frame 2
_root.play();
Symbol 1014 Button
on (release) {
if (_root.hiscvarssubmitter._currentframe != 1) {
_root.hiscvarssubmitter.closeme();
}
this.gotoAndPlay("startgame");
}
Symbol 1016 Button
on (release) {
getURL (_root.playmoregamesurl, "_blank");
}
Symbol 1123 MovieClip Frame 1
stopAllSounds();
_parent.subtit.text = "";
Instance of Symbol 775 MovieClip in Symbol 1123 MovieClip Frame 1
//component parameters
onClipEvent (construct) {
varName = "defaultValue";
}
Symbol 1123 MovieClip Frame 13
_parent.subtit.text = "I cannot believe I got rid of them...";
Symbol 1123 MovieClip Frame 127
_parent.subtit.text = "";
Symbol 1123 MovieClip Frame 131
_parent.subtit.text = "The cars, the chopper...";
Symbol 1123 MovieClip Frame 208
_parent.subtit.text = "I have achieved victory... for now.";
Symbol 1123 MovieClip Frame 364
_parent.subtit.text = "Temporarily.";
Symbol 1123 MovieClip Frame 417
_parent.subtit.text = "But they WILL be after me again.";
Symbol 1123 MovieClip Frame 523
_parent.subtit.text = "";
Symbol 1123 MovieClip Frame 540
_parent.subtit.text = "It's just a matter of time.";
Symbol 1123 MovieClip Frame 653
_parent.subtit.text = "";
Symbol 1123 MovieClip Frame 716
_root.nextFrame();
stop();