Frame 1
function __com_mochibot__(swfid, mc, lv, trk) {
var x;
var g;
var s;
var fv;
var sb;
var u;
var res;
var mb;
var mbc;
var pv;
mb = "__mochibot__";
mbc = "mochibot.com";
g = (_global ? (_global) : (_level0._root));
if (g[mb + swfid]) {
return(g[mb + swfid]);
}
s = System.security;
x = mc._root.getSWFVersion;
fv = (x ? (mc.getSWFVersion()) : ((_global ? 6 : 5)));
if (!s) {
s = {};
}
sb = s.sandboxType;
if (sb == "localWithFile") {
return(null);
}
x = s.allowDomain;
if (x) {
s.allowDomain(mbc);
}
x = s.allowInsecureDomain;
if (x) {
s.allowInsecureDomain(mbc);
}
pv = ((fv == 5) ? (getVersion()) : (System.capabilities.version));
u = (((((((((((("http://" + mbc) + "/my/core.swf?mv=8&fv=") + fv) + "&v=") + escape(pv)) + "&swfid=") + escape(swfid)) + "&l=") + lv) + "&f=") + mc) + (sb ? ("&sb=" + sb) : "")) + (trk ? "&t=1" : "");
lv = ((fv > 6) ? (mc.getNextHighestDepth()) : ((g[mb + "level"] ? (g[mb + "level"] + 1) : (lv))));
g[mb + "level"] = lv;
if (fv == 5) {
res = "_level" + lv;
if (!eval (res)) {
loadMovieNum (u, lv);
}
} else {
res = mc.createEmptyMovieClip(mb + swfid, lv);
res.loadMovie(u);
}
return(res);
}
Stage.showMenu = false;
stop();
stepp = 0;
__com_mochibot__("8b9696ed", this, 10301, true);
mochi.as2.MochiAd.showPreGameAd({id:"93b6c66eb3903caf", res:"550x450", background:2642569, color:1783644, outline:0, no_bg:false});
Instance of Symbol 60 MovieClip "loaderbar" in Frame 1
/* no clip actions */
Frame 3
Stage.showMenu = false;
this._lockroot = true;
var CH = 32.05;
var CW = 20.8;
var Decrypt = "![],1234567890AXYBLRTSCEolcnvitar=;h- ";
var Encrypt = "!_-do2qp84ram51vwijnzfghetyusklxcb.?| ";
var ImportCode = "";
var mainTimeLine = this;
trace("mainTimeLine: " + mainTimeLine);
var LevUnlock = new Array(0, 1E16, 1E16, 1E16, 1E16, 1E16, 1E16);
var LevUnlockT = new Array("0", "5:00.00", "4:00.00", "3:00.00", "1:45.00", "2:00.00", "2:30.00");
var ReqTimeE = new Array("0", "5:00.00", "4:00.00", "3:00.00", "1:45.00", "2:00.00", "2:30.00");
var ReqTimeM = new Array("0", "1:15.00", "2:00.00", "1:30.00", "00:45.00", "00:43.00", "1:25.00");
var ReqTimeH = new Array("0", "0:45.00", "0:58.00", "0:45.00", "00:26.00", "00:26.00", "00:58.00");
var ReqTimeG = new Array("0", "0:34.50", "0:38.00", "0:28.45", "00:18.00", "00:18.50", "00:45.00");
var BestTime = new Array();
var BestTimeT = new Array();
i = 0;
while (i <= 6) {
BestTime[i] = 1E16;
BestTimeT[i] = "99:59.99";
i++;
}
var AimS = 5;
keys = new Object();
keys.Left = 65;
keys.Right = 68;
keys.Jump = 87;
keys.Kunai = 32;
VolBG = -100;
VolSFX = -100;
Slide2YVal = 135;
SlideYVal = 135;
M = true;
SFX = true;
trace("M: " + M);
trace("SFX: " + SFX);
trace("BTB4: " + BestTime[4]);
SavedGame = SharedObject.getLocal("NinjaSave");
if (SavedGame.data.Controls != undefined) {
keys = SavedGame.data.Controls;
}
if (SavedGame.data.AimerSens != undefined) {
AimS = SavedGame.data.AimerSens;
}
if (SavedGame.data.TimesNum != undefined) {
BestTime = SavedGame.data.TimesNum;
}
if (SavedGame.data.TimesString != undefined) {
BestTimeT = SavedGame.data.TimesString;
}
if (SavedGame.data.Vol2 != undefined) {
VolBG = SavedGame.data.Vol2;
}
if (SavedGame.data.VolY != undefined) {
SlideYVal = SavedGame.data.VolY;
}
if (SavedGame.data.Vol != undefined) {
VolSFX = SavedGame.data.Vol;
}
if (SavedGame.data.VolY2 != undefined) {
Slide2YVal = SavedGame.data.VolY2;
}
if (VolBG >= 0) {
M = false;
}
if (VolSFX >= 0) {
SFX = false;
}
trace("M: " + M);
trace("SFX: " + SFX);
trace(SavedGame.data.Vol2);
trace(SavedGame.data.Vol);
i = 0;
while (i <= 6) {
trace((("BT" + i) + ": ") + BestTime[i]);
trace((("BT" + i) + ": ") + BestTimeT[i]);
i++;
}
make_sound = function (mc_name, depth, volume, name) {
mc = mainTimeLine.createEmptyMovieClip(mc_name, depth);
snd = new Sound(mc);
snd.setVolume(volume);
snd.attachSound(name);
return(snd);
};
CS = make_sound("CS", 20, VolSFX / 4, "CS");
GS = make_sound("GS", 21, VolSFX * 2, "GS");
MS = make_sound("MS", 23, VolBG / 2, "MS");
LS = make_sound("LevelBG", 22, VolBG * 4, "LevelBG");
HS = make_sound("Hit", 24, VolSFX * 2, "Hit2");
LBS = make_sound("BuildBG", 25, VolBG, "BuildBG");
WS = make_sound("WinBG", 26, VolBG, "WinBG");
GoS = make_sound("LoseBG", 27, VolBG, "LoseBG");
ThrRopS = make_sound("TRS", 28, VolSFX * 2, "Throw Rope Sound");
StpS = make_sound("StepS", 29, VolSFX / 1.2, "Step Sound");
JmpS = make_sound("JS", 30, VolSFX * 2, "Jump Sound");
KBatS = make_sound("KBS", 31, VolSFX * 2, "Kill Bat Sound");
ThrKunS = make_sound("TKS", 32, VolSFX * 2, "Throw Kunai Sound");
var PlayingMenu = false;
var TileSize = 50;
var ChRad = 8100;
var ChHeadRad = 400;
var ChBodyRad = 144;
var ChLegRad = 144;
var SoRad = 8100;
var SoHeadRad = 400;
var SoBodyRad = 160;
var SoLegRad = 160;
var SoH = 28;
var CoinRad = 361;
var TIY = 14;
var TIX = 16;
var MA = -90;
var MXA = 90;
var MK = 25;
var Map = [[]];
var MapPieces = new Array();
var EnemyS = 2.5;
var EnemySi = 80000;
var BatHeadRad = 60;
var BatWingRad = 60;
var DogHeadRad = 155;
var DogBodyRad = 90;
var DogNum = 58;
var BatNum = 59;
var SpikeUNum = 54;
var RatNum = 60;
var SoldierNum = 61;
var ArcherNum = 62;
var SpikeDNum = 55;
var SpikeLNum = 56;
var SpikeRNum = 57;
var TorchNum = 32;
var WT = 10;
var BT = 25;
var AS = 26;
var ES = 54;
var TT = 61;
var BitMapArray = ["", "Tile1A", "Tile2A", "Tile3A", "Tile4A", "Tile5A", "Tile22A", "Tile23A", "Tile24A", "Tile25A", "Tile14A", "Tile7A", "Tile8A", "Tile9A", "Tile10A", "Tile11A", "Tile12A", "Tile13A", "Tile6A", "Tile15A", "Tile18A", "Tile19A", "Tile20A", "Tile21A", "Tile55A", "Tile56A", "Tile16A", "Tile26A", "Tile27A", "Tile17A", "Tile28A", "Tile29A", "Tile30A", "Tile31A", "Tile32A", "Tile33A", "Tile34A", "Tile35A", "Tile36A", "Tile37A", "Tile38A", "Tile39A", "Tile40A", "Tile59A", "Tile42A", "Tile57A", "Tile43A", "Tile44A", "Tile45A", "Tile46A", "Tile47A", "Tile48A", "Tile58A", "Tile41A", "Tile51A", "Tile60A", "Tile61A", "Tile62A", "Tile49A", "Tile50A", "Tile52A", "Tile53A", "Tile54A"];
i = 1;
while (i <= TT) {
mainTimeLine["TileBitmap" + i] = flash.display.BitmapData.loadBitmap(BitMapArray[i]);
i++;
}
var TileBitmap1001 = flash.display.BitmapData.loadBitmap("Tile1001A");
var TileBitmap1002 = flash.display.BitmapData.loadBitmap("Tile1002A");
var TileBitmap1003 = flash.display.BitmapData.loadBitmap("Tile1003A");
var TileBitmap1004 = flash.display.BitmapData.loadBitmap("Tile1004A");
var TileBitmap1000 = (new flash.display.BitmapData(50, 50, false, 0));
i = 0;
while (i <= 255) {
MapPieces[i] = new flash.display.BitmapData(TileSize, TileSize, false, 0);
i++;
}
var CoinBit = flash.display.BitmapData.loadBitmap("Coin");
var Tike3T = flash.display.BitmapData.loadBitmap("Tike3");
Level = 0;
var EnviStartYA = new Array();
var EnviStartXA = new Array();
var CharStartYA = new Array();
var CharStartXA = new Array();
var LRBA = new Array();
var LLBA = new Array();
var LTBA = new Array();
var LBBA = new Array();
var ColLoc0X = new Array();
var ColLoc0Y = new Array();
var AccType0 = new Array();
var AccLoc0X = new Array();
var AccLoc0Y = new Array();
var Acc = new Array();
var LevelCodeValue = new Array();
LevelCodeValue[1] = "!d!d!d!d!dqd2d2-!d!d!d!d!d2doqdp-!d!dqdqd2dqdo2d2do-!d!dqdo2doqdoqdoado2dq-!d!d2doodo2doadoodo2do-!d!d2doodo2doqdoqdoqdq-!d!dqdoodoodoqdoado2d2-!d!d2doqdoqdo2doodoad2-!d!dodo2doqdoadoado2do-!d!dodo2do2do2do2doqdp-!d!dodo2do2do2do2do2dp-!d!dqdoqdoqdoqdo2do2do-!d!dqdoadoqdo2do2do2dqd2dpdododqdqdqdpdqd2dodpdqd2-!d!dpdoqdoqdoqdoqdo2doqdoodoqdoodoadoadoodoqdoqdoqdoqdo2doqdoqdp-!d!dpdoodo2doqdoqdo2doqdoado2doado2do2doodo2doodoqdoadoodoodoqd2-!d!dqdoodo2do2do2do2doqdoodoodoodoqdoqdoqdoqdoado2do2doodoodo2dp-!d!dqd2dqdqdpdqd2d2dqdpdqdod2dpdqdqdo2doadoqdoqdq-!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d2doqdoodoqdo2dq-!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!dpdoodoqdo2doqd2-!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d2do2doadoqdoodo-!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d2doadoodoado2d2-!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d2do2doado2doqdp-!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!dpdo2do2doqdood2-!d!d!d!d!d!d!d!d!d!d!d!d!d!d!dod2dqdo2doqdoqdoodqd2-!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d2doodoodo2doadoqdoqdoqdq-!d!d!d!d!d!d!d!d!d!d!d!d!d!d!dodo2doqdoodoado2doqdo2dq-!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d2doqdoqdoodoqdoqdo2do2dq-!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d2doqdoodo2doqdoado2doodq-!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d2doqdo2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!d!d!d!d!dodo2do2doqdo2do2doadoqdq-!d!d!d!d!d!d!d!d!d!d!d!d!d2dod2dpdodoadoodoqdqdo-!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d2do2doadoqdo2d2-!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!dqdo2doqdoqdoqdo-!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!dqdoadoodo2doqdq-!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!dqdoqdoodo2doadq-!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!dodoodo2do2doado-!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!dqdoadoadoqdoqdo-!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!dqdoodoqdo2doadp-!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!dqdo2doodoqdoad2-!d!d!d!d!d!d!d!d!d!dqdqd2d2dododod2doadoqdoqdoadq-!d!d!d!d!d!d!d!d!d!dqdo2doqdoadqdo2do2d2doqdoqdoodoad2-!d!d!d!d!d!d!d!d!d!dpdoqdo2doqdqdoqdoadodoadoqdoqdoadq-!d!d!d!d!d!d!d!d!d!dqdo2do2do2d2doqdoad2do2doodo2do2d2-!d!d!d!d!d!d!d!d!d!d2do2doqdo2dqdo2doqdqdo2doado2doqdq-!d!d!d!d!d!d!d!d!d!d2do2doqdo2d2doodoad2doadoodoqdoodo-!d!d!d!d!d!d!d!d!d!dodoodoqdo2dpdoqdo2d2doqdo2doado2dq-!d!d!d!d!d!d!d!d!d!dqdoodoqdo2doqdoqdo2d2do2do2do2doodq-!d!d!d!d!d!d!d!d!d!d2do2doodoqdo2do2do2dodoado2do2doqdq-!d!d!d!d!d!d!d!d!d!dqdoqdoqdo2doodoadoqd2do2doodo2do2dp-!d!d!d!d!d!d!d!d!d!dqdoodo2dood2dodqdodoodoado2do2do-!d!d!d!d!d!d!d!d!d!d2doqdoadoqdodo2doodoodo2doqdoado2do-!d!d!d!d!d!d!d!d!d!d2doado2doqdoadoadoado2doadoodoqdoad2-!d!d!d!d!d!d!d!d!d!dodoado2do2doodo2doqdo2do2do2doqdoqdo-!d!d!d!d!d!d!d!d!d!d2doqdoadoodo2do2doqdoqdoodo2do2doad2-!d!d!d!d!d!d!d!d!d!dqdo2do2doqd2doadoodo2do2doodo2doodp-!d!d!d!d!d!d!d!d!d!dqd2d2d2dqdqdodod2d2dqdod2--2rqd2rqdq2rdq2rd|r4d|22dq2da4dop5d|2r2pd|oqo5d|oqrpd|opqmd|o8opd|o8a2-qq2dqa4dqa4dqq2d45pd45pd45pd45pd45pd|oord8p2d85rdpard854d8qm-|2a5o-|pp5-2r8-228-|44rd|p4md|2amd|o8r2d|o8oad|op4pd|opo5d|oq84d|o8rrd|o82qd|op4md|opo8d|oq4od|oq5rd4qm 8dr8od2prd|2qmd|8mmd|p5od|o88qd|oq88dm8qd|2o84d|2484d|o2mad|oq52d|2qm4d45o-qqadqqadqqadr5odr5odr5odr5odr5odq4mdq4mdq4mdq4mdq4mdq4mdqqo 8dprpdprpdprpdqo2dqo2dp25dp25d4o5d4o5d|amd44qdr5od|4odoq5-8md8md8md8pd8pd8pd8pd8pd88d88d88d88d88d88dppdq2dq2dq2dq2dq2dq2dq2dqodqodqodqod8pd45dq2-";
LevelCodeValue[2] = "!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!dod2d2dqd2dqdqd2dodqdq-!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!dpdoodoodoodo2do2do2do2doqdo2d2d!d!d!d!d!d!d!d!d!dqd2dpdqd2dqdqd2dq-!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d2doqdoodoqdoqdo2do2do2doadood2d!d!d!d!d!d!d!d!d!dqdoqdo2do2doqdoadoado2do-!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d2do2doado2doadoqdoqdo2do2doodod!d!d!d!d!d!d!d!d!d2do2doqdoqdoadoodoado2dq-!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!dodo2doqdoodoadoado2do2do2doqdqd!d!d!d!d!d!d!d!d!dpdo2doqdoqdo2doado2dood2-!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d2do2do2doadoqdoqdoodo2doqdo2dod!d!d!d!d!d!d!d!d!dqdoadoqdo2doadoadoadoqdp-!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d2do2do2do2do2doodo2doadoodo2d2d!d!d!d!d!d!d!d!d!dqdoado2doqdoqdoqdo2doqdp-!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!dodoqdo2doado2doodo2do2doqdo2dod!d!d!d!d!d!d!d!d!dodoqdo2do2do2doodoodo2dp-!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!dpdo2doqdoodo2do2doqdoqdoqdoad2d!d!d!d!d!d!d!d!d!dodoadoadoodo2doqdoadoadq-!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d2doqdoqdoodoqdoadoqdo2doadoqdpd!d!d!d!d!d!d!d!d!d2do2do2doqdoqdoqdoqdo2dq-!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!dqdoqdo2do2do2do2doqdoado2doqd2d!d!d!d!d!d!d!d!d!dqdoqdoqdoodoado2do2doqdq-!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!dpdo2do2doqdoodoqdo2do2do2do2dpd!d!d!d!d!d!d!d!d!d2do2do2doodoqdoqdo2do2dq-!d!dqdqd2dqdpd2d!d!d!d!d!d!d!d!dqdoodoadoodoodo2do2doodoqdoqdod!d!d!d!d!d!d!d!d!dqdoodoqdoqdoqdoqdoqdo2dp-!d!d2doqdo2doqdoodod!d!d!d!d!d!d!d!d2doodoodo2do2doqdoodo2doadoodod!d!d!d!d!d!d!d!d!dqdoadoadoqdoodo2do2do2d2-!d!d2do2do2doadoqdqd!d!d!d!d!d!d!d!d2doqdo2doqdoqdoqdoqdoadoadoodod!d!d!d!d!d!d!d!d!dodo2doado2doqdoqdoado2d2-!d!d2doqdoqdoqdo2dpd2d2dod2dqd2dqdpdqdo2doodoqdoodoadoadoodoqdoqd2d2d2d2dpdodqd2d2dqdodoodoqdoadoodo2doqdoqdpdqdqd2dqdpdqdpdpdpdqdqdqd2dpd2d2d2dpd2d2dodqdododqdqdodqdq-!d!dpdo2do2doqdoadoodoqdoadoodoqdo2doqdoqdoodo2doado2doqdo2doqdoodoodo2doodo2do2do2doodoodoadoado2do2do2doodoadoqdoadoqdo2do2doqdoodo2doqdo2doadoqdoadoodoqdo2do2doadoadoqdo2doqdo2do2doqdoqdoqdo2doqdoqdoodoqdo2doado2dq-!d!d2doadoqdoqdoodoqdoqdoodoodoqdoodo2doadoadoado2doadoqdoqdo2doodo2doqdo2do2do2doadoodoadoodoqdo2do2doadoqdo2do2do2doqdoodo2do2do2doqdoado2doado2doqdoodoodoodo2do2doqdoqdoadoadoqdoqdoqdoado2doadoodoado2doadoqdoqdoqdp-!d!dpdo2doadoqdo2doqdoqdo2doadoqdo2doqdo2doqdoadoado2doodo2do2doqdoodo2do2doqdoodoqdoodoqdo2do2doqdoado2do2doqdo2do2doodoqdoadoqdo2doodo2doqdoqdoadoodoodoqdo2doodoodoodoqdoadoqdoqdoodoadoqdoadoodoodoqdoadoadoado2do2d2-!d!d2doqdoadoqdoodqdpdqdod2dqdqd2dpdqdo2doqdoadoqdoqdoodoqdo2doqdodqdodqdqdqdod2d2d2dpdodqd2d2dqdpdqdqdqdpdqd2d2dqdqdqdoadoqdo2do2doqdoado2d2dqd2dqdqdod2dqd2dpd2dqdpdq-!d!dodoqdoodo2doodpd!d!d!d!d!d!d!d!dodoqdo2doqdoqdoqdo2doqdoadoodod!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!dqdoqdoadoqdoodoqdoodoqd2-!d!dqdo2doodoadoad2d!d!d!d!d!d!d!d!dodoodoodoqdo2doodoadoqdo2doad2d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!dodoado2do2do2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-!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d2do2doodoqdo2do2do2do2do2dood2d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!dpdoadoodoodo2doqdoodoodo-!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!dpdoqdo2doodoqdo2doqdoqdo2doqd2d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!dqdoadoqdoado2do2doadoadp-!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!dodoodo2doadoqdo2doqdoodoqdoadpd!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!dodo2do2doqdoqdoqdoodoadp-!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!dpd2dqd2d2d2d2dod2d2dqd!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d2doadoqdoodoqdoqdo2doqd2-!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!dododqdod2dpdpd2dq-!--poqdormdo28drodq8mdo5rpdo525dm44dap5dra4drq2d|prpd|p25d|q44d|2r4d|222d|o4ad|82qd|p4md|po8d|q28d|2rod|2ordo528dmrodmorda2pdrr5dro4dp4p-|qoomd|qoomd|qoomd|qoomd|qoomd|825d|825d|825d|42ad|42ad|42ad|oqo2d|oqo2d|oqo2d|op25d|op25d|op25d|22o4d|22o4d|22o4d|2q54d|2q54d|2q54d|22o4d|22o4d|22o4d|2qoqd|2qoqd|2qoqd|qoom-|452-|qqmo-2r8-228-288dpord8rdqmdqmmd25od2mmdo5p8d|q2qda2md|q2qdo5prdmmad|882d|852d2mmdppa-|q2oqd|228md|228md|oqrrd|84rdmmdmmd|pqpd|o2q8d|2oq8d|2oq8d|pmod|2omod|2omod|o2modo4od|qop5-q2dq2dq2dq2dq2dq2dq2d4od4od4od4odqrdqrdqrdqrdqrdqr-";
LevelCodeValue[3] = "!d!d!d!d!d!d!d!d!d!d2d2dpd2d2d2dqdpdpdodqd2dqdqdodod2d2d2-!d!d!d!d!d!d!d!d!d!dqdoodo2do2do2do2doodoado2doado2doado2doodoado2doadoqdo-!d!d!d!d!d!d!d!d!d!d2doadoado2do2do2doqdoqdoqdo2do2doadoodoqdo2doodo2doado-!d!d!d!d!d!d!d!d!d!d2doodoqdo2do2do2doodo2doadoqdo2doqdoadoodoqdoadoqdoqd2-!d!dqd2d2d2d2d!d!d!dqdo2do2do2doodoqdo2doadoqdoadoqdoqdoqdoqdoodoqdoqdoad2-!d!d2do2do2do2dqd!d!d!dqdoqdoqdo2do2doadoqdoqdpd2d2dodoqdoodo2do2do2doadq-!d!d2doodo2doqdod!d!d!dqdo2doado2doadoado2doqd2d!d!dqdoqdoadoado2doodoqdodqdqd2-!d!d2do2doqdoad2d!d!d!dqdo2do2doqdoqdo2doqdoqdqd!d!dqdo2doqdoqdoqdoqdoado2doadoadq-!d!dqdo2doodo2d2d!d!d!d2do2doodoadoadoodoadood2d!d!dqdoqdo2do2doqdo2doqdo2do2doqd2-!d!d2do2doodoqd2d!d!d!dodoodoqdoodo2do2doqdoadqd!d!d2doado2doqdoqdoadoado2doqdoad2-!d!d2do2doodo2dpd!d!d!dqdo2doqdoqdoqdoodoodo2d2d!d!d2do2doqdoodoodoadoqdo2doadoado-!d!d2doqdoqdoqdod!d!d!dqdoodoqdoqdo2doodoqdoad2d!d!dpdo2doqdoado2do2doodoado2doqd2-!d!dodo2doodoqd2d!d!d!dqdo2do2doadoadoodoodoqd2d!d!dqdoodo2doodoqdo2do2doqdo2do2dqdqd2d2d2d2dpdpdqdqd2dododpd2-!d!dodoadoadoqdqd!d!d!d2do2doodo2doqdo2dodqdpd!d!dodo2doodoqdoqdo2doadoodoqdoodo2do2doodo2doqdo2doado2doqdoqdoodo2do2doqdo-!d!d2doadoodoqdpdodqdqdqdoqdoodo2doadoqdqd!d!d!d!dqdoodoqdoqdoqdoadoqdoodoqdo2doqdo2doodo2do2do2do2do2doadoodoadoadoqdoad2-!d!dodo2doadoqdoqdo2do2doqdo2doqdoqdoqdo2dood2d!d!d!d!dodo2doado2do2doodoqdoqdoqdo2doqdoodoqdo2doqdo2doqdoadoqdoado2doqdoqdoqdq-!d!d2doodoodoodoadoadoado2doadoqdoqdo2do2do2dod!d!d!d!dpdoodoqdoodo2doqdoqdoqdo2doodo2doadoadoqdo2doado2doado2doqdoqdoodoqdoqd2-!d!d2doqdoqdo2do2do2doqdoodoqdoado2do2doqdoqd2d!d!d!d!d2do2doodoodoodo2do2do2doadoqdoqdoadoadoqdoodoodoado2do2doado2do2doqdoqdq-!d!d2do2doqdoodoodoodoqdoadoqdo2doqdoqdoqdo2dqd!d!d!d!dpdoqdo2doodoqdoqdo2doqdoqdoadoadoqdo2doadoadoqdo2doadoqdo2do2doadoqdoad2-!d!dqdoqdo2do2doqdo2doadoadoqdoqdo2doqdoadoqdqd!d!d!d!dodoqdo2doodoadoqdo2doado2doqdo2doqdo2doqdo2do2doado2doadoqdo2doodoqdo2d2-!d!dqd2d2d2dqdqd2d2d2dqdpdqdpd2d2d!d!d!d!d2dqd2dodqdqdpdqd2dqd2dpd2dpd2d2dpd2do2doqdoodoodo2do2dq-!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d2do2doqdo2do2doodoad2-!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d2doqdoodoqdo2do2doqdpd2dqd2dpdod2-!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!dodo2do2do2doqdo2do2doqdoqdoodo2do2do2d2-!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d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d!d!d!d!d!d!d!d!d!d!d!d!d!dqdo2doqdo2doadoqdo2doadoqdoado2do2d2-!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!dqdoodoadoqdoado2do2do2doodo2doodoodo-!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!dqdo2doodoqdo2doqdoodoqdoqdo2doado2do-!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!dqdoadoqdoqdoadoqdoodo2do2doqdo2doadp-!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!dpdoadoadoado2doado2doqdoado2do2doqdp-!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d2do2do2do2do2do2doado2doodoadoodoad2-!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d2do2doodoado2doodoqdo2doqdoodoadoado-!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!dodoadoodo2doadoadoqdo2doodo2do2doqdq-!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!dpdoqdoado2do2do2doado2doadoodoodoodo-!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d2do2doadoadoadoodoado2doado2do2do2d2-!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!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!d!d2d2dqdq--8orpd8o25d8544d85o2dpm8adpm5pdpa85dprm4dp8rodp8rodp8rodp8rodp8rodp8rodp8rodp8rodp8rodp8rodqmrodqmrodqmrodqmrodqmrodqmrodqmrodqmrodqmrodqmrodqmrodqmrodqmrodqpqodqpa8dq8qmdo82qdo8m8do44rd4pod4m8drpmdq2od8rpdo5ado5ado5ad2qmpd2p44d28qa-qqaqdqqaqdqqaqdqqaqdqqaqdqqaqdqqaqdqqaqdq5q2dq54adqo5pdqop5dqor4dq2o2dq2padq2apdqq25dqq84d2pa2d28oad288pd28m5d2424d2442d24mad2rqpd2rr5d2a54d2ap2d2arad2mopd22q5d22q5d22q5d22q5d22q5d22q5d25a4d25a4d25a4dopa2daq8dmqpdmaado5p2d2o22d2o22d2o22-|8q-|po-2r8-228-8om4dpqp8d8ooodpmordqpmdpm4doo22door4do2q5do2apdoqqadoqm2dopp4do855do88pdo45ado442doro4dorr5doa2pdoaradomq2doma4d282mdq8o4dq2p4d45dom4domam 8doaqpdoprpdo2mpd8mpd2m5d885dqo4mdq2p4dq8aad2o44d2aa4d2824do8qmdo454dar2dq55d224d8prdq2rmdqr2m-qq8md2maqdqpqqdqpqqdao4dop44d2pmmd2pmmd2pmmd2pmmd2pmmd2pmmd2pmmd2pmmd2pmmd2pmmd2pmmd2pmmd2pmmd2pmmd2pmmd2pmmd2pmmd2oamd2orad2o54d4pado8md2pq5 8d2p44d2p44d2p44d2o4odop8mdao5d2q45d228od228od25ord25ord25ord2o2rd2o24d25oodo2odooamdoqpmd2po4d2po4-qrd8ad8ad8ad4od4od8pd8pd8pd8pd8pd8pd8pd8pd8pd8pd8pd8pd8pd8pd8pd8pd8pd45d8md8md8mdqrdppdq5dq5dq5dqodqodqodqmdq2dq2dq2dq2dq2dq2dq2dq2dq2dq2dq2d4od4o-!d!d!d!d!d!d!d!d!d!d2d2dpd2d2d2dqdpdpdodqd2dqdqdodod2d2d2-!d!d!d!d!d!d!d!d!d!dqdoodo2do2do2do2doodoado2doado2doado2doodoado2doadoqdo-!d!d!d!d!d!d!d!d!d!d2doadoado2do2do2doqdoqdoqdo2do2doadoodoqdo2doodo2doado-!d!d!d!d!d!d!d!d!d!d2doodoqdo2do2do2doodo2doadoqdo2doqdoadoodoqdoadoqdoqd2-!d!dqd2d2d2d2d!d!d!dqdo2do2do2doodoqdo2doadoqdoadoqdoqdoqdoqdoodoqdoqdoad2-!d!d2do2do2do2dqd!d!d!dqdoqdoqdo2do2doadoqdoqdpd2d2dodoqdoodo2do2do2doadq-!d!d2doodo2doqdod!d!d!dqdo2doado2doadoado2doqd2d!d!dqdoqdoadoado2doodoqdodqdqd2-!d!d2do2doqdoad2d!d!d!dqdo2do2doqdoqdo2doqdoqdqd!d!dqdo2doqdoqdoqdoqdoado2doadoadq-!d!dqdo2doodo2d2d!d!d!d2do2doodoadoadoodoadood2d!d!dqdoqdo2do2doqdo2doqdo2do2doqd2-!d!d2do2doodoqd2d!d!d!dodoodoqdoodo2do2doqdoadqd!d!d2doado2doqdoqdoadoado2doqdoad2-!d!d2do2doodo2dpd!d!d!dqdo2doqdoqdoqdoodoodo2d2d!d!d2do2doqdoodoodoadoqdo2doadoado-!d!d2doqdoqdoqdod!d!d!dqdoodoqdoqdo2doodoqdoad2d!d!dpdo2doqdoado2do2doodoado2doqd2-!d!dodo2doodoqd2d!d!d!dqdo2do2doadoadoodoodoqd2d!d!dqdoodo2doodoqdo2do2doqdo2do2dqdqd2d2d2d2dpdpdqdqd2dododpd2-!d!dodoadoadoqdqd!d!d!d2do2doodo2doqdo2dodqdpd!d!dodo2doodoqdoqdo2doadoodoqdoodo2do2doodo2doqdo2doado2doqdoqdoodo2do2doqdo-!d!d2doadoodoqdpdodqdqdqdoqdoodo2doadoqdqd!d!d!d!dqdoodoqdoqdoqdoadoqdoodoqdo2doqdo2doodo2do2do2do2do2doadoodoadoadoqdoad2-!d!dodo2doadoqdoqdo2do2doqdo2doqdoqdoqdo2dood2d!d!d!d!dodo2doado2do2doodoqdoqdoqdo2doqdoodoqdo2doqdo2doqdoadoqdoado2doqdoqdoqdq-!d!d2doodoodoodoadoadoado2doadoqdoqdo2do2do2dod!d!d!d!dpdoodoqdoodo2doqdoqdoqdo2doodo2doadoadoqdo2doado2doado2doqdoqdoodoqdoqd2-!d!d2doqdoqdo2do2do2doqdoodoqdoado2do2doqdoqd2d!d!d!d!d2do2doodoodoodo2do2do2doadoqdoqdoadoadoqdoodoodoado2do2doado2do2doqdoqdq-!d!d2do2doqdoodoodoodoqdoadoqdo2doqdoqdoqdo2dqd!d!d!d!dpdoqdo2doodoqdoqdo2doqdoqdoadoadoqdo2doadoadoqdo2doadoqdo2do2doadoqdoad2-!d!dqdoqdo2do2doqdo2doadoadoqdoqdo2doqdoadoqdqd!d!d!d!dodoqdo2doodoadoqdo2doado2doqdo2doqdo2doqdo2do2doado2doadoqdo2doodoqdo2d2-!d!dqd2d2d2dqdqd2d2d2dqdpdqdpd2d2d!d!d!d!d2dqd2dodqdqdpdqd2dqd2dpd2dpd2d2dpd2do2doqdoodoodo2do2dq-!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d2do2doqdo2do2doodoad2-!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d2doqdoodoqdo2do2doqdpd2dqd2dpdod2-!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!dodo2do2do2doqdo2do2doqdoqdoodo2do2do2d2-!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d2do2doodoado2doqdoodoado2doqdoqdoqdo2dq-!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!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qmdo82qdo8m8do44rd4pod4m8drpmdq2od8rpdo5ado5ado5ad2qmpd2p44d28qa-qqaqdqqaqdqqaqdqqaqdqqaqdqqaqdqqaqdqqaqdq5q2dq54adqo5pdqop5dqor4dq2o2dq2padq2apdqq25dqq84d2pa2d28oad288pd28m5d2424d2442d24mad2rqpd2rr5d2a54d2ap2d2arad2mopd22q5d22q5d22q5d22q5d22q5d22q5d25a4d25a4d25a4dopa2daq8dmqpdmaado5p2d2o22d2o22d2o22-|8q-|po-2r8-228-8om4dpqp8d8ooodpmordqpmdpm4doo22door4do2q5do2apdoqqadoqm2dopp4do855do88pdo45ado442doro4dorr5doa2pdoaradomq2doma4d282mdq8o4dq2p4d45dom4domam 8doaqpdoprpdo2mpd8mpd2m5d885dqo4mdq2p4dq8aad2o44d2aa4d2824do8qmdo454dar2dq55d224d8prdq2rmdqr2m-qq8md2maqdqpqqdqpqqdao4dop44d2pmmd2pmmd2pmmd2pmmd2pmmd2pmmd2pmmd2pmmd2pmmd2pmmd2pmmd2pmmd2pmmd2pmmd2pmmd2pmmd2pmmd2oamd2orad2o54d4pado8md2pq5 8d2p44d2p44d2p44d2o4odop8mdao5d2q45d228od228od25ord25ord25ord2o2rd2o24d25oodo2odooamdoqpmd2po4d2po4-qrd8ad8ad8ad4od4od8pd8pd8pd8pd8pd8pd8pd8pd8pd8pd8pd8pd8pd8pd8pd8pd8pd45d8md8md8mdqrdppdq5dq5dq5dqodqodqodqmdq2dq2dq2dq2dq2dq2dq2dq2dq2dq2dq2d4od4o-!d!d!d!d!d!d!d!d!d!d2d2dpd2d2d2dqdpdpdodqd2dqdqdodod2d2d2-!d!d!d!d!d!d!d!d!d!dqdoodo2do2do2do2doodoado2doado2doado2doodoado2doadoqdo-!d!d!d!d!d!d!d!d!d!d2doadoado2do2do2doqdoqdoqdo2do2doadoodoqdo2doodo2doado-!d!d!d!d!d!d!d!d!d!d2doodoqdo2do2do2doodo2doadoqdo2doqdoadoodoqdoadoqdoqd2-!d!dqd2d2d2d2d!d!d!dqdo2do2do2doodoqdo2doadoqdoadoqdoqdoqdoqdoodoqdoqdoad2-!d!d2do2do2do2dqd!d!d!dqdoqdoqdo2do2doadoqdoqdpd2d2dodoqdoodo2do2do2doadq-!d!d2doodo2doqdod!d!d!dqdo2doado2doadoado2doqd2d!d!dqdoqdoadoado2doodoqdodqdqd2-!d!d2do2doqdoad2d!d!d!dqdo2do2doqdoqdo2doqdoqdqd!d!dqdo2doqdoqdoqdoqdoado2doadoadq-!d!dqdo2doodo2d2d!d!d!d2do2doodoadoadoodoadood2d!d!dqdoqdo2do2doqdo2doqdo2do2doqd2-!d!d2do2doodoqd2d!d!d!dodoodoqdoodo2do2doqdoadqd!d!d2doado2doqdoqdoadoado2doqdoad2-!d!d2do2doodo2dpd!d!d!dqdo2doqdoqdoqdoodoodo2d2d!d!d2do2doqdoodoodoadoqdo2doadoado-!d!d2doqdoqdoqdod!d!d!dqdoodoqdoqdo2doodoqdoad2d!d!dpdo2doqdoado2do2doodoado2doqd2-!d!dodo2doodoqd2d!d!d!dqdo2do2doadoadoodoodoqd2d!d!dqdoodo2doodoqdo2do2doqdo2do2dqdqd2d2d2d2dpdpdqdqd2dododpd2-!d!dodoadoadoqdqd!d!d!d2do2doodo2doqdo2dodqdpd!d!dodo2doodoqdoqdo2doadoodoqdoodo2do2doodo2doqdo2doado2doqdoqdoodo2do2doqdo-!d!d2doadoodoqdpdodqdqdqdoqdoodo2doadoqdqd!d!d!d!dqdoodoqdoqdoqdoadoqdoodoqdo2doqdo2doodo2do2do2do2do2doadoodoadoadoqdoad2-!d!dodo2doadoqdoqdo2do2doqdo2doqdoqdoqdo2dood2d!d!d!d!dodo2doado2do2doodoqdoqdoqdo2doqdoodoqdo2doqdo2doqdoadoqdoado2doqdoqdoqdq-!d!d2doodoodoodoadoadoado2doadoqdoqdo2do2do2dod!d!d!d!dpdoodoqdoodo2doqdoqdoqdo2doodo2doadoadoqdo2doado2doado2doqdoqdoodoqdoqd2-!d!d2doqdoqdo2do2do2doqdoodoqdoado2do2doqdoqd2d!d!d!d!d2do2doodoodoodo2do2do2doadoqdoqdoadoadoqdoodoodoado2do2doado2do2doqdoqdq-!d!d2do2doqdoodoodoodoqdoadoqdo2doqdoqdoqdo2dqd!d!d!d!dpdoqdo2doodoqdoqdo2doqdoqdoadoadoqdo2doadoadoqdo2doadoqdo2do2doadoqdoad2-!d!dqdoqdo2do2doqdo2doadoadoqdoqdo2doqdoadoqdqd!d!d!d!dodoqdo2doodoadoqdo2doado2doqdo2doqdo2doqdo2do2doado2doadoqdo2doodoqdo2d2-!d!dqd2d2d2dqdqd2d2d2dqdpdqdpd2d2d!d!d!d!d2dqd2dodqdqdpdqd2dqd2dpd2dpd2d2dpd2do2doqdoodoodo2do2dq-!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d2do2doqdo2do2doodoad2-!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d2doqdoodoqdo2do2doqdpd2dqd2dpdod2-!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!dodo2do2do2doqdo2do2doqdoqdoodo2do2do2d2-!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d2do2doodoado2doqdoodoado2doqdoqdoqdo2dq-!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!dpdo2doqdoqdoqdo2doodoodoodoqdoqdo2doqdq-!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d2doadoado2do2doado2do2doodo2doado2doad2-!d!d!d!d!d!d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28m5d2424d2442d24mad2rqpd2rr5d2a54d2ap2d2arad2mopd22q5d22q5d22q5d22q5d22q5d22q5d25a4d25a4d25a4dopa2daq8dmqpdmaado5p2d2o22d2o22d2o22-|8q-|po-2r8-228-8om4dpqp8d8ooodpmordqpmdpm4doo22door4do2q5do2apdoqqadoqm2dopp4do855do88pdo45ado442doro4dorr5doa2pdoaradomq2doma4d282mdq8o4dq2p4d45dom4domam 8doaqpdoprpdo2mpd8mpd2m5d885dqo4mdq2p4dq8aad2o44d2aa4d2824do8qmdo454dar2dq55d224d8prdq2rmdqr2m-qq8md2maqdqpqqdqpqqdao4dop44d2pmmd2pmmd2pmmd2pmmd2pmmd2pmmd2pmmd2pmmd2pmmd2pmmd2pmmd2pmmd2pmmd2pmmd2pmmd2pmmd2pmmd2oamd2orad2o54d4pado8md2pq5 8d2p44d2p44d2p44d2o4odop8mdao5d2q45d228od228od25ord25ord25ord2o2rd2o24d25oodo2odooamdoqpmd2po4d2po4-qrd8ad8ad8ad4od4od8pd8pd8pd8pd8pd8pd8pd8pd8pd8pd8pd8pd8pd8pd8pd8pd8pd45d8md8md8mdqrdppdq5dq5dq5dqodqodqodqmdq2dq2dq2dq2dq2dq2dq2dq2dq2dq2dq2d4od4o-";
LevelCodeValue[4] = "!d!dododqdpd2dqdpdpdqdqdqdodqdpdo-!d!dpdoadoqdoodo2doqdo2doadoodoadoqdo2doqdo2dp-!d!dpd2dqdodpdqd2d2d2dqdo2do2do2doodp-!d!d!d!d!d!d!d!d!d!d!d2do2doodoodoodq-!d!d!d!d!d!d!d!d!d!d!dqdoqdoodoadoodq-!d!d!d!d!d!d!d!d!d!d!dodoodoodoodoqdq-!d!d!d!d!d!d!d!d!d!d!d2do2do2doodoodqd!d!d!d!d2dpdpdpdpd2dqd2d2d2dqdqdodqdqdod2dqdp-!d!d!d!d!d!d!d!d!d!d!d2doodoodoadoqd2d!d!d!d!dodo2doado2d2doqdoqdqdo2do2doodoodo2do2do2doado2do2d2-!d!d!d!d!d!d!d!d!d!d!dodo2do2doodoodqd!d!d!d!dpdoodo2doqd2doqdoodqdoqdoadpdqd2dqdodoodo2do2dq-!d!d!d!d!d!d!d!d!d!d!dpdo2doqdoadoadqd!d!d!d!dqdoqdoodood2do2dood2doodo2d2d!d!d!d2doadoodoodo-!d!d!d!d!d!d!d!d!d!d!d2doadoodoodo2dqd!d!d!d!dqdo2doqdoqd2doqdoodqdoodoadpd!d!d!dpdo2do2do2do-!d!d!d!d!d!d!d!d!d!d!dqdo2do2do2dood2d!d!d!d!dodoodoqdoodoqdoodo2dqdo2dood2d!d!d!dqdo2doodoodo-!d!d!d!d!d!d!d!d!d!d!dodoadoodo2do2dqd!d!d!d!d2do2doodoqdo2doadood2doadoadqd!d!d!dqdo2doodoodqdod2dpd2dp-!d!d!d!d!d!d!d!d!d!d!dqdo2doodoodoad2dqdod2dqdpdoadoqdoodoodoqdoqdo2doqdood2d!d!d!dpdo2doqdoodoodoodoadoodood2-!d!d!d!d!d!d!d!d!d!d!d2doqdo2doqdoado2doodo2doodoadoodoodoado2do2do2do2doadoadoqdpd!d!d!dqdoado2doqdodoodoodoado2d2-!d!d!d!d!d!d!d!d!d!d!d2do2doadoodoado2do2doodoodoodoadoadoodoodoodoodoodo2doodood2d!d!d!dqdoodoadoodqdo2do2doado2do-!d!d!d!d!d!d!d!d!d!d!dqd2d2dpdqdodqdodqdpd2doodoodo2doadoqdoodoodoodo2dod!d!d!dodoadoodo2doodo2doodoodoadq-!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!dqdoadoadoado2doodoqdqdo2do2dpd!d!d!dqdoodoqdo2dodoodoodoadoado-!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!dqdo2doado2doqdoqdoadqdoodoodod!d!d!d2doodo2doodpdoodoado2doqdo-!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d2do2doqdo2dpdo2doododo2doodpd!d!d!d2do2do2doqdoadoodoqdoodood2-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d!d!d!d!d!d!d!d!d!d!d!d!dqdo2do2doadoodoqdq-!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d2dqd2d2dpd2do-!--2rpd2rpd2rpd2rpd2rpd2rpd2rpd2rpd2rpd2rpd2rpd2rpd8r4d8rpdoq2rdoq2rd8r5do2padop52do5mrdmpmd25r8d2524domr4doq24d228p-2a4dq22dq8adqmpdpq5dp44d852d8qad8rpd4o5d4p4d4a2do242dopo2dopo2do24qdo84pdom48dom48dom4pdom4pd2o8ad2o8rd2o8rdo88rd22oo-omm-q8-2r8-228-4q5d4q5d42ado2r4do2a5do2a5d222rd22q5dmqpdo222d4pad4pado254do254dmq5dqoadrq2do2mo 8dap8d2omrd22mmdop85dop85dop85dop2odoqr2dm82doo5qdo28qdop5q-o2p2doqm2do8p2do8p2doqm2do2p2d2oq8d254mdoa8qdoa8qdoqqmdoorrdoorrdoqqmdoppad4m2d4m2do854 8d2oqad25o5d255mdoa45dom5adom8adoaq4doaq4domp2domp2domp2domp2-4od4od4od4od4od4odqrdq2dq2dq2dq2dq2dq2dq2dq2dq2dq2dppdqmd8md8md8rd8rd8rd88d88d4od4od4od4o-";
LevelCodeValue[5] = "!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!dpd2dpdpdqd2-!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d2do2doqdoodood2-!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d2do2doqdo2do2d2-!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!dpdoqdo2doadoadq-!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!dpdoqdoqdo2doqd2-!d!d!d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d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d2doadoqdoqdoadoqd2doqdoqdp-!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!dodoqdoqdo2doqdoqd2doodood2-!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!dpdo2doadoado2do2dqdoqdoodo-!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d2doqdoodoqdoqdood2do2doodq-!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!dodo2doqdodo2doqdoado2doqdq-!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d2doqdoadpdo2do2doqdo2do2dq-!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!dodoqdo2dpdoqdoodo2doadoodq-!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d2do2doodo2do2do2dpdo2doqdp-!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!dpdoqdoodoqdoqdo2d2do2do2do-!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!dpdo2do2doqdoqdo2dodo2doqdp-!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!dpdo2doqdoqdo2doqdodoqdoqd2-!d!d!d2dpd2dod2d2d2dpdqdqdpdqdpd2dpdqdpdodqdpdpd2dqdpdpdo2do2d2-!d!d!dqdo2doodoadoqdoodoado2do2do2doodoodoado2do2dpdo2doodo2doqdo2doodo2dpdoqdoqdood2-!d!d!d2doadoado2do2do2doodo2do2doqdo2doqdoqdo2do2dpdoadoqdoqdoqdoqdo2do2dpdo2doodoqdp-!d!d!dpdo2do2doqdoado2doodo2doqdoqdoadoqdoqdo2doodqdo2doqdo2doqdo2doadoqd2doadoadoad2-!d!d!dqdoodoodo2doqdo2do2doado2doado2dpdoado2doqdoodoqdoodoqd2doodoqdo2doodoqdoqdo2d2-!d!d!d2doodoadoqdoqdoqdo2doqdoqdoadoqd2do2doodoqdoodoqdoodoqd2doadoodo2doado2doqdo2d2-!d!d!dqdoadoadoqdoadoado2do2doqdoadoodpdo2doado2doodo2doqdoadodoqdoqdoqdoqdoqdoadoqd2-!d!d!d2doodoadpdqd2d2d2dpdqd2dqdpdpdpdodqdqd2dodqdpd2dqdqdpdqdq-!d!d!dpdoodoadp-!d!d!d2do2doado-!d!d!d2do2do2do-!d!d!dpdo2doqd2-!d!d!dpdo2doqd2-!d!d!dpdoqdo2do-!d!d!dpdo2doqd2-!d!d!dqdoado2do-!d!d!dodo2do2dq-!d!d!dpdoqdo2dp-!d!d!d2doadoadp-!d!d!dpdo2do2dp-!d!d2d2doqdo2d2dpd2dpdp-!d!dodoodoodoadoqdoodoado2d2-!d!dodoqdoodoodoodo2do2doqd2-!d!dpdoadoadoodoadoqdo2do2d2-!d!dpdo2doqdo2doqdo2doodoado-!d!dodo2doado2doodoqdo2doadp-!d!dpdoqdoodoqdoqdoado2doado-!d!d2d2dpdpdqdpdpdqdp--qr4dpq5dpapdo522do5r4dooq5do85ado85ado85ad2o84d2o84d2o84d28aad2445d2rq2dqrr4dqr22dqaq5dp52adqmrpdqm25dq8p2dq4opdq4a4dq82mdq82mdq8aqdq8aqdpo28dpo24dpprrdp8pmdp42od8o2rd8qr4d8qr4d8o2pdpqradpqrr-25pd25pd25pd|2omd|2omd|2omd|2od8odo2qdo2qd8od|2od|288d|288d|288d|q2rd|q2rd|q2rd|o48d|o48d|o48d|o48d|o48d|o48d|opd|4ad|4ad|opd|2o8d|4opd|o2o8d|o2o8d|o2o8d|o5opd|o5oqd|oqomd|oqomd|ao4d|poa-255-|opmo-2r8-228-8q42d8q5ad828pdpq54dpo8pdpqo4dpo8odqraodqmrmdqaopd2p2rdq288doqoodor4odpampd254rdo8mmdoqprd2pad2om5dpqodr5odammdo2m8dommrdo45od22pmd2mqqdq85mdqm2qdp5m4d8or8d82rpdp2podqoo8doa44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d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!do5do5d2od25d2od25d25d2od25d8d22d2qd28d28d2pd2qd2doqdoqdoqdoodoodoqdoodoqdoqdoqdoqdo2doqdoqdo2dpd!d!d!d!d!d!d!d!d!d!d!d!d!do-!d!dqd!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!do5do5d2od2od2od25d2od2od25d8d2qd2qd22d28d2pd2pdoqdoqdoodoodoadoodoqdoadoadoodoqdo2doodoqdo2doqdod!d!d!d!d!d!d!d!d!d!d!d!d!d2-!d!dqd!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!do5do5d2od25d25d2od25d2od2od8d2qd2qd22d2pd2qd2qdo2doodoadoqdoqdoqdoqdo2do2do2doadoqdoodo2doqdoodod!d!d!d!d!d!d!d!d!d!d!d!d!dp-!d!d2d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!do5do5d2od2od25d2od25d2od25d8d2qd28d22d2qd2pd22do2doado2do2doqdo2do2doqdoadoqdoadoqdo2do2doqdood2d!d!d!d!d!d!d!d!d!d!d!d!d!d2-!d!dqd!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!do5do5d2od2od2od25d25d2od2od8d2qd2pd2pd2qd2qd28d2doqdoqdoadoodo2d2d2dpdqdodo2doqdoqdo2doqd2d!d!d!d!d!d!d!d!d!d!d!d!d!d2-!d!d2d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!do5do5d2od25d25d2od2od25d2od8d2qd22d2pd2qd2qd22dpdoqdoadoadoqdo2d2doodoqdo2dqdoodo2doodoqdo2dpd!d!d!d!d!d!d!d!d!d!d!d!d!d2-!d!dod!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!do5d2od2od2od2od2od25d2od8d28d2qd2pd2qd2qd22d2do2doqdoqdo2doqdoqdoadoodoqdpdoodo2doqdo2doqdpd!d!d!d!d!d!d!d!d!d!d!d!d!dq-!d!d2d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!do5do5d2od25d25d25d2od2od25d8d2pd2qd2qd2qd2pd22d2doodoado2doqdoodqdo2do2doqdodo2do2doadoado2d2d!d!d!d!d!d!d!d!d!d!d!d!d!d2-!d!dqd!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!do5do5d2od25d2od2od2od25d25d8d2pd22d2pd2qd28d2qd2doodo2doqdoqdo2dpdodpd2dodo2doadoadoadoqdpd!d!d!d!d!d!d!d!d!d!d!d!d!dq-!d!dod!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!do5do5d2od2od2od2od25d25d25d8d2qd2qd22d2qd2pd2pdoqdoqdoadoadoqdoodoqdo2do2doodo2doodoqdo2doqdoqd2d!d!d!d!d!d!d!d!d!d!d!d!d!dq-!d!dqd!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!do5do5d2od25d25d25d25d2od2od8d2qd2pd2qd2pd2qd2pdoqdo2do2doodoqdoado2doqdoqdo2doadoadoqdoodoqdo2dod!d!d!d!d!d!d!d!d!d!d!d!d!dq-!d!dqd!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!do5do5d2od25d25d25d2od2od25d8d2qd22d28d28d2pd2pdoqdoqdo2doodo2do2doqdoodo2do2do2do2doodoqdo2do2dqd!d!d!d!d!d!d!d!d!d!d!d!d!dq-!d!dqd!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!d!do5do5d25d25d2od25d2od25d25d8d2pd2pd28d2qd2qd28dpdoodo2doodoq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do2pdo2pdo2pdo2pdo2pdo2pdp2pdp2pdp2pdp2pdp2pdp2pd2rqd|o28d4rqd4rqd|o28d2rqd2rqd2rqd2rqd2rqd2rqd2rqd2rqd2rqd|oq5d4rrd2rpd252dqp4dpoadoq5d2r2dqppdpo4d255doq2-|o4ad|oo4d|48d|oadqpd|248d|248d|248d|248d|248d|248d|244d|244d|244dqqqdqqqdqqqdqqqdqqpd|25dqpdaadop2dom4d285dq5pdq8adpo2d|omdq8damdopqdomrd28odq58dq8mdpoqd8q2d8qqd8qqd8qqd8qqd8qpd8qpd8qpd8q8d8q8d8q8d8q8d8q8d|pppd|pppdqqqd2rmd228dorodoord4qd42dooqdo4rdqqqd224d2rad|o5oad|m2od|m25d|4o8d|4opd|o5oad|o5oad|o5oad|o5oad|o5oad|o5oad|o5oad|o5oad|o5oad|8oad|8oad|4oqd|4oqd|4oqd|4oqd|4oqd|m22d|m22d|m22d|m22d|m2q-|m82-|28p2-2r8-228-|4md2rqdq4qdp8qd8pqd4qqd2odoood25od|rpd42adq8ad252d|o5adqp2d8mpdo24d|mdp8md|22od|225dr2odr4mdo2d2o5dq8pd8r5-8oqd8oqd8oqd8oqd8oqd8oqd8oqd8oqd8oqd|2a4d|2a4d|2a4d|2a4d|arad|arad|arad|arad|4omd|4omd|o5q4d|ooa4d|ooa8d|o5q8d|o5a4d|o5a4d|o5a4d|o5a4-4od4od4od4od4od4od4od4od4od4od4od4od4od8md8md8md8md8ad8ad4od4od4od4od4od4od4od4o-";
Frame 4
stop();
var OnOne = true;
attachMovie("playhubSplash", "SS", getNextHighestDepth(), {_x:282.1, _y:207.3});
SS._x = 284;
SS._y = 220;
SS.onMouseDown = function () {
if (OnOne) {
getURL ("http://www.playhub.com/?utm_medium=brandedgames_external&utm_campaign=ninja_plus_2&utm_source=domain.com&utm_content=ingame", "_blank");
} else {
getURL ("http://www.fullergames.com", "_blank");
}
};
onEnterFrame = function () {
if ((SS._x == undefined) && (OnOne)) {
attachMovie("MySplashScreen", "SS", getNextHighestDepth(), {_x:282.1, _y:207.3});
SS._x = 282.1;
SS._y = 207.3;
OnOne = false;
} else if ((SS._x == undefined) && (!OnOne)) {
delete onEnterFrame;
gotoAndPlay ("Menu");
}
if (OnOne) {
SS._x = 284;
SS._y = 220;
} else {
SS._x = 282.1;
SS._y = 207.3;
}
};
Frame 5
function GoOut() {
var _local5 = new mx.transitions.Tween(PlayButton, "_x", mx.transitions.easing.Strong.easeOut, PlayButton._x, 1000, 1, true);
var _local3 = new mx.transitions.Tween(LevelBuilderButton, "_x", mx.transitions.easing.Strong.easeOut, LevelBuilderButton._x, 950, 1, true);
var _local4 = new mx.transitions.Tween(ImportButton, "_x", mx.transitions.easing.Strong.easeOut, ImportButton._x, 900, 1, true);
var _local2 = new mx.transitions.Tween(HowtoPlayButton, "_x", mx.transitions.easing.Strong.easeOut, HowtoPlayButton._x, 850, 1, true);
var _local1 = new mx.transitions.Tween(OptionsButton, "_x", mx.transitions.easing.Strong.easeOut, OptionsButton._x, 800, 1, true);
var _local7 = new mx.transitions.Tween(MG, "_x", mx.transitions.easing.Strong.easeOut, MG._x, 750, 1, true);
var _local6 = new mx.transitions.Tween(Title, "_x", mx.transitions.easing.Strong.easeOut, Title._x, 1000, 1, true);
if (Sitelock) {
urlStart = _url.indexOf("://") + 3;
urlEnd = _url.indexOf("/", urlStart);
domain = _url.substring(urlStart, urlEnd);
LastDot = domain.lastIndexOf(".") - 1;
domEnd = domain.lastIndexOf(".", LastDot) + 1;
domain = domain.substring(domEnd, domain.length);
sitename = "fullergames.com";
trace("Domain: " + domain);
if ((domain != sitename) && (domain != "flashgamelicense.com")) {
gotoAndStop ("WrongSite");
}
}
_local1.onMotionFinished = function () {
if (Sitelock) {
urlStart = _url.indexOf("://") + 3;
urlEnd = _url.indexOf("/", urlStart);
domain = _url.substring(urlStart, urlEnd);
LastDot = domain.lastIndexOf(".") - 1;
domEnd = domain.lastIndexOf(".", LastDot) + 1;
domain = domain.substring(domEnd, domain.length);
sitename = "fullergames.com";
trace("Domain: " + domain);
if ((domain != sitename) && (domain != "flashgamelicense.com")) {
gotoAndStop ("WrongSite");
}
}
delete onMouseUp;
gotoAndStop(Where);
};
}
function ImportLevel(LevelSet, Exception, Ecode) {
var _local3 = LevelSet + "X";
var _local2 = LevelSet + "Y";
var _local7 = LevelSet + "X";
var _local6 = LevelSet + "Y";
Decrypted = "";
mainTimeLine[("AccLoc" + LevelSet) + "X"] = new Array();
mainTimeLine[("AccLoc" + LevelSet) + "Y"] = new Array();
mainTimeLine["AccType" + LevelSet] = new Array();
mainTimeLine[("ColLoc" + LevelSet) + "X"] = new Array();
mainTimeLine[("ColLoc" + LevelSet) + "Y"] = new Array();
EnviStartYA[LevelSet] = undefined;
EnviStartXA[LevelSet] = undefined;
CharStartYA[LevelSet] = undefined;
CharStartXA[LevelSet] = undefined;
LRBA[LevelSet] = undefined;
LLBA[LevelSet] = undefined;
LTBA[LevelSet] = undefined;
LBBA[LevelSet] = undefined;
Map[LevelSet] = [];
var _local5 = "";
var _local4 = 0;
if ((LevelSet == 0) && (!Exception)) {
ImportCode = Import.ImportCodeT.text;
} else if ((LevelSet == 0) && (Exception)) {
ImportCode = ECode;
} else if (LevelSet > 0) {
ImportCode = LevelCodeValue[LevelSet];
} else {
ImportCode = RandomLevelValue;
}
i = 0;
while (i < ImportCode.length) {
_local5 = ImportCode.substr(i, 1);
_local4 = Encrypt.indexOf(_local5, 0);
Decrypted = Decrypted + Decrypt.substr(_local4, 1);
i++;
}
Start = 0;
SingleValue = "";
Value = "";
x = 0;
y = 0;
if (Decrypted.indexOf("]") == -1) {
} else {
do {
while (true) {
SingleValue = Decrypted.substr(Start, 1);
if (SingleValue == ",") {
if (Map[LevelSet][x] == undefined) {
Map[LevelSet][x] = new Array();
}
Start++;
if (Value == "!") {
Map[LevelSet][x][y] = undefined;
} else {
Map[LevelSet][x][y] = parseInt(Value);
}
Value = "";
y++;
} else {
if (SingleValue == "]") {
if (Map[LevelSet][x] == undefined) {
Map[LevelSet][x] = new Array();
}
if (Value == "!") {
Map[LevelSet][x][y] = undefined;
} else {
Map[LevelSet][x][y] = parseInt(Value);
}
Value = "";
y++;
break;
}
Value = Value + SingleValue;
Start++;
}
}
x++;
y = 0;
Start++;
SingleValue = Decrypted.substr(Start, 1);
} while (SingleValue != "]");
Start++;
x = 0;
Value = "";
while (true) {
SingleValue = Decrypted.substr(Start, 1);
if (SingleValue == ",") {
Start++;
if (Value == "!") {
mainTimeLine["ColLoc" + _local3][x] = undefined;
} else {
mainTimeLine["ColLoc" + _local3][x] = parseInt(Value);
}
Value = "";
x++;
} else {
if (SingleValue == "]") {
if (Value == "!") {
mainTimeLine["ColLoc" + _local3][x] = undefined;
} else {
mainTimeLine["ColLoc" + _local3][x] = parseInt(Value);
}
Value = "";
x++;
break;
}
Value = Value + SingleValue;
Start++;
}
}
Start++;
x = 0;
Value = "";
while (true) {
SingleValue = Decrypted.substr(Start, 1);
if (SingleValue == ",") {
Start++;
if (Value == "!") {
mainTimeLine["ColLoc" + _local2][x] = undefined;
} else {
mainTimeLine["ColLoc" + _local2][x] = parseInt(Value);
}
Value = "";
x++;
} else {
if (SingleValue == "]") {
if (Value == "!") {
mainTimeLine["ColLoc" + _local2][x] = undefined;
} else {
mainTimeLine["ColLoc" + _local2][x] = parseInt(Value);
}
Value = "";
x++;
break;
}
Value = Value + SingleValue;
Start++;
}
}
Start++;
Value = "";
x = LevelSet;
while (true) {
SingleValue = Decrypted.substr(Start, 1);
if (SingleValue == "]") {
if (Value == "!") {
EnviStartXA[x] = undefined;
} else {
EnviStartXA[x] = parseInt(Value);
}
Value = "";
x++;
break;
}
Value = Value + SingleValue;
Start++;
}
Start++;
Value = "";
x = LevelSet;
while (true) {
SingleValue = Decrypted.substr(Start, 1);
if (SingleValue == "]") {
if (Value == "!") {
EnviStartYA[x] = undefined;
} else {
EnviStartYA[x] = parseInt(Value);
}
Value = "";
x++;
break;
}
Value = Value + SingleValue;
Start++;
}
Start++;
Value = "";
x = LevelSet;
while (true) {
SingleValue = Decrypted.substr(Start, 1);
if (SingleValue == "]") {
if (Value == "!") {
CharStartXA[x] = undefined;
} else {
CharStartXA[x] = parseInt(Value);
}
Value = "";
x++;
break;
}
Value = Value + SingleValue;
Start++;
}
Start++;
Value = "";
x = LevelSet;
while (true) {
SingleValue = Decrypted.substr(Start, 1);
if (SingleValue == "]") {
if (Value == "!") {
CharStartYA[x] = undefined;
} else {
CharStartYA[x] = parseInt(Value);
}
Value = "";
x++;
break;
}
Value = Value + SingleValue;
Start++;
}
Start++;
x = 0;
Value = "";
while (true) {
SingleValue = Decrypted.substr(Start, 1);
if (SingleValue == ",") {
Start++;
if (Value == "!") {
mainTimeLine[("AccLoc" + LevelSet) + "X"][x] = undefined;
} else {
mainTimeLine[("AccLoc" + LevelSet) + "X"][x] = parseInt(Value);
}
Value = "";
x++;
} else {
if (SingleValue == "]") {
if (Value == "!") {
mainTimeLine[("AccLoc" + LevelSet) + "X"][x] = undefined;
} else if (Value != "") {
mainTimeLine[("AccLoc" + LevelSet) + "X"][x] = parseInt(Value);
}
Value = "";
x++;
break;
}
Value = Value + SingleValue;
Start++;
}
}
Start++;
x = 0;
Value = "";
while (true) {
SingleValue = Decrypted.substr(Start, 1);
if (SingleValue == ",") {
Start++;
if (Value == "!") {
mainTimeLine[("AccLoc" + LevelSet) + "Y"][x] = undefined;
} else {
mainTimeLine[("AccLoc" + LevelSet) + "Y"][x] = parseInt(Value);
}
Value = "";
x++;
} else {
if (SingleValue == "]") {
if (Value == "!") {
mainTimeLine[("AccLoc" + LevelSet) + "Y"][x] = undefined;
} else if (Value != "") {
mainTimeLine[("AccLoc" + LevelSet) + "Y"][x] = parseInt(Value);
}
Value = "";
x++;
break;
}
Value = Value + SingleValue;
Start++;
}
}
Start++;
x = 0;
Value = "";
while (true) {
SingleValue = Decrypted.substr(Start, 1);
if (SingleValue == ",") {
Start++;
if (Value == "!") {
mainTimeLine["AccType" + LevelSet][x] = undefined;
} else {
mainTimeLine["AccType" + LevelSet][x] = parseInt(Value);
}
Value = "";
x++;
} else {
if (SingleValue == "]") {
if (Value == "!") {
mainTimeLine["AccType" + LevelSet][x] = undefined;
} else {
mainTimeLine["AccType" + LevelSet][x] = parseInt(Value);
}
Value = "";
x++;
break;
}
Value = Value + SingleValue;
Start++;
}
}
stopMouse();
Import.removeMovieClip();
Level = LevelSet;
if (PlayingMenu) {
MS.stop();
PlayingMenu = false;
}
GoOut();
Where = "Game";
}
}
stop();
if (!PlayingMenu) {
MS.start(0, 9999);
trace("Hit Menu");
PlayingMenu = true;
}
Sitelock = false;
if (Sitelock) {
urlStart = _url.indexOf("://") + 3;
urlEnd = _url.indexOf("/", urlStart);
domain = _url.substring(urlStart, urlEnd);
LastDot = domain.lastIndexOf(".") - 1;
domEnd = domain.lastIndexOf(".", LastDot) + 1;
domain = domain.substring(domEnd, domain.length);
sitename = "fullergames.com";
trace("Domain: " + domain);
if ((domain == sitename) || (domain == "flashgamelicense.com")) {
gotoAndStop ("Menu");
} else {
gotoAndStop ("WrongSite");
}
}
Where = "";
var PlayTween = (new mx.transitions.Tween(PlayButton, "_x", mx.transitions.easing.Strong.easeOut, -50, PlayButton._x, 1.5, true));
var BuildLevelTween = (new mx.transitions.Tween(LevelBuilderButton, "_x", mx.transitions.easing.Strong.easeOut, -100, LevelBuilderButton._x, 1.5, true));
var LoadTween = (new mx.transitions.Tween(ImportButton, "_x", mx.transitions.easing.Strong.easeOut, -150, ImportButton._x, 1.5, true));
var HowToPlayTween = (new mx.transitions.Tween(HowtoPlayButton, "_x", mx.transitions.easing.Strong.easeOut, -200, HowtoPlayButton._x, 1.5, true));
var OptionsTween = (new mx.transitions.Tween(OptionsButton, "_x", mx.transitions.easing.Strong.easeOut, -250, OptionsButton._x, 1.5, true));
var MGTween = (new mx.transitions.Tween(MG, "_x", mx.transitions.easing.Strong.easeOut, -300, MG._x, 1.5, true));
var TitleTween = (new mx.transitions.Tween(Title, "_x", mx.transitions.easing.Strong.easeOut, -250, Title._x, 0.5, true));
PlayButton.onRelease = function () {
GoOut();
Where = "LevelSelect";
};
HowtoPlayButton.onRelease = function () {
GoOut();
Where = "HowtoPlay";
};
OptionsButton.onRelease = function () {
GoOut();
Where = "Options";
};
LoadLevelButton.onRelease = function () {
GoOut();
Where = "LevelLoader";
};
LoadLevelsBtn.onRelease = function () {
delete onMouseUp;
gotoAndStop ("LevelLoader");
};
LevelBuilderButton.onRelease = function () {
GoOut();
Where = "LevelBuilder";
};
FullerLink.onRelease = function () {
getURL ("http://www.fullergames.com");
};
ShowLoad = false;
var Decrypted = "";
ImportButton.onRelease = function () {
if (!ShowLoad) {
ShowLoad = true;
attachMovie("ImportMC", "Import", mainTimeLine.getNextHighestDepth());
Import._x = 285.9;
Import._y = 179.4;
}
};
onMouseUp = function () {
if (Import.ExitImportButton.hitTest(mainTimeLine._xmouse, mainTimeLine._ymouse, true)) {
SelectingTiles = false;
LevelBuilderMenu.TileMenu.removeMovieClip();
ShowLoad = false;
Import.removeMovieClip();
} else {
Import.ExitImportButton.gotoAndStop("Neutral");
}
if (Import.ImportButtonLoad.hitTest(mainTimeLine._xmouse, mainTimeLine._ymouse, true)) {
ImportLevel(0);
} else {
Import.ImportButtonLoad.gotoAndStop("Neutral");
}
};
Frame 6
function time_to_string(time_to_convert) {
var _local3 = Math.floor(time_to_convert / 3600000);
var _local1 = time_to_convert - (_local3 * 3600000);
var _local4 = Math.floor(_local1 / 60000);
_local1 = _local1 - (_local4 * 60000);
var _local2 = Math.floor(_local1 / 1000);
_local1 = _local1 - (_local2 * 1000);
var _local5 = Math.floor(_local1 / 10);
var _local10 = ((_local3 < 10) ? ("0" + _local3.toString()) : (_local3.toString()));
var _local8 = ((_local4 < 10) ? ("0" + _local4.toString()) : (_local4.toString()));
var _local6 = ((_local2 < 10) ? ("0" + _local2.toString()) : (_local2.toString()));
var _local7 = ((_local5 < 10) ? ("0" + _local5.toString()) : ((hundredths = _local5.toString())));
return((((_local8 + ":") + _local6) + ".") + _local7);
}
function ImportLevel(LevelSet, Exception, Ecode) {
var _local3 = LevelSet + "X";
var _local2 = LevelSet + "Y";
var _local7 = LevelSet + "X";
var _local6 = LevelSet + "Y";
Decrypted = "";
mainTimeLine[("AccLoc" + LevelSet) + "X"] = new Array();
mainTimeLine[("AccLoc" + LevelSet) + "Y"] = new Array();
mainTimeLine["AccType" + LevelSet] = new Array();
mainTimeLine[("ColLoc" + LevelSet) + "X"] = new Array();
mainTimeLine[("ColLoc" + LevelSet) + "Y"] = new Array();
EnviStartYA[LevelSet] = undefined;
EnviStartXA[LevelSet] = undefined;
CharStartYA[LevelSet] = undefined;
CharStartXA[LevelSet] = undefined;
LRBA[LevelSet] = undefined;
LLBA[LevelSet] = undefined;
LTBA[LevelSet] = undefined;
LBBA[LevelSet] = undefined;
Map[LevelSet] = [];
var _local5 = "";
var _local4 = 0;
if ((LevelSet == 0) && (!Exception)) {
ImportCode = Import.ImportCodeT.text;
} else if ((LevelSet == 0) && (Exception)) {
ImportCode = ECode;
} else if (LevelSet > 0) {
ImportCode = LevelCodeValue[LevelSet];
} else {
ImportCode = RandomLevelValue;
}
i = 0;
while (i < ImportCode.length) {
_local5 = ImportCode.substr(i, 1);
_local4 = Encrypt.indexOf(_local5, 0);
Decrypted = Decrypted + Decrypt.substr(_local4, 1);
i++;
}
Start = 0;
SingleValue = "";
Value = "";
x = 0;
y = 0;
if (Decrypted.indexOf("]") == -1) {
} else {
do {
while (true) {
SingleValue = Decrypted.substr(Start, 1);
if (SingleValue == ",") {
if (Map[LevelSet][x] == undefined) {
Map[LevelSet][x] = new Array();
}
Start++;
if (Value == "!") {
Map[LevelSet][x][y] = undefined;
} else {
Map[LevelSet][x][y] = parseInt(Value);
}
Value = "";
y++;
} else {
if (SingleValue == "]") {
if (Map[LevelSet][x] == undefined) {
Map[LevelSet][x] = new Array();
}
if (Value == "!") {
Map[LevelSet][x][y] = undefined;
} else {
Map[LevelSet][x][y] = parseInt(Value);
}
Value = "";
y++;
break;
}
Value = Value + SingleValue;
Start++;
}
}
x++;
y = 0;
Start++;
SingleValue = Decrypted.substr(Start, 1);
} while (SingleValue != "]");
Start++;
x = 0;
Value = "";
while (true) {
SingleValue = Decrypted.substr(Start, 1);
if (SingleValue == ",") {
Start++;
if (Value == "!") {
mainTimeLine["ColLoc" + _local3][x] = undefined;
} else {
mainTimeLine["ColLoc" + _local3][x] = parseInt(Value);
}
Value = "";
x++;
} else {
if (SingleValue == "]") {
if (Value == "!") {
mainTimeLine["ColLoc" + _local3][x] = undefined;
} else {
mainTimeLine["ColLoc" + _local3][x] = parseInt(Value);
}
Value = "";
x++;
break;
}
Value = Value + SingleValue;
Start++;
}
}
Start++;
x = 0;
Value = "";
while (true) {
SingleValue = Decrypted.substr(Start, 1);
if (SingleValue == ",") {
Start++;
if (Value == "!") {
mainTimeLine["ColLoc" + _local2][x] = undefined;
} else {
mainTimeLine["ColLoc" + _local2][x] = parseInt(Value);
}
Value = "";
x++;
} else {
if (SingleValue == "]") {
if (Value == "!") {
mainTimeLine["ColLoc" + _local2][x] = undefined;
} else {
mainTimeLine["ColLoc" + _local2][x] = parseInt(Value);
}
Value = "";
x++;
break;
}
Value = Value + SingleValue;
Start++;
}
}
Start++;
Value = "";
x = LevelSet;
while (true) {
SingleValue = Decrypted.substr(Start, 1);
if (SingleValue == "]") {
if (Value == "!") {
EnviStartXA[x] = undefined;
} else {
EnviStartXA[x] = parseInt(Value);
}
Value = "";
x++;
break;
}
Value = Value + SingleValue;
Start++;
}
Start++;
Value = "";
x = LevelSet;
while (true) {
SingleValue = Decrypted.substr(Start, 1);
if (SingleValue == "]") {
if (Value == "!") {
EnviStartYA[x] = undefined;
} else {
EnviStartYA[x] = parseInt(Value);
}
Value = "";
x++;
break;
}
Value = Value + SingleValue;
Start++;
}
Start++;
Value = "";
x = LevelSet;
while (true) {
SingleValue = Decrypted.substr(Start, 1);
if (SingleValue == "]") {
if (Value == "!") {
CharStartXA[x] = undefined;
} else {
CharStartXA[x] = parseInt(Value);
}
Value = "";
x++;
break;
}
Value = Value + SingleValue;
Start++;
}
Start++;
Value = "";
x = LevelSet;
while (true) {
SingleValue = Decrypted.substr(Start, 1);
if (SingleValue == "]") {
if (Value == "!") {
CharStartYA[x] = undefined;
} else {
CharStartYA[x] = parseInt(Value);
}
Value = "";
x++;
break;
}
Value = Value + SingleValue;
Start++;
}
Start++;
x = 0;
Value = "";
while (true) {
SingleValue = Decrypted.substr(Start, 1);
if (SingleValue == ",") {
Start++;
if (Value == "!") {
mainTimeLine[("AccLoc" + LevelSet) + "X"][x] = undefined;
} else {
mainTimeLine[("AccLoc" + LevelSet) + "X"][x] = parseInt(Value);
}
Value = "";
x++;
} else {
if (SingleValue == "]") {
if (Value == "!") {
mainTimeLine[("AccLoc" + LevelSet) + "X"][x] = undefined;
} else if (Value != "") {
mainTimeLine[("AccLoc" + LevelSet) + "X"][x] = parseInt(Value);
}
Value = "";
x++;
break;
}
Value = Value + SingleValue;
Start++;
}
}
Start++;
x = 0;
Value = "";
while (true) {
SingleValue = Decrypted.substr(Start, 1);
if (SingleValue == ",") {
Start++;
if (Value == "!") {
mainTimeLine[("AccLoc" + LevelSet) + "Y"][x] = undefined;
} else {
mainTimeLine[("AccLoc" + LevelSet) + "Y"][x] = parseInt(Value);
}
Value = "";
x++;
} else {
if (SingleValue == "]") {
if (Value == "!") {
mainTimeLine[("AccLoc" + LevelSet) + "Y"][x] = undefined;
} else if (Value != "") {
mainTimeLine[("AccLoc" + LevelSet) + "Y"][x] = parseInt(Value);
}
Value = "";
x++;
break;
}
Value = Value + SingleValue;
Start++;
}
}
Start++;
x = 0;
Value = "";
while (true) {
SingleValue = Decrypted.substr(Start, 1);
if (SingleValue == ",") {
Start++;
if (Value == "!") {
mainTimeLine["AccType" + LevelSet][x] = undefined;
} else {
mainTimeLine["AccType" + LevelSet][x] = parseInt(Value);
}
Value = "";
x++;
} else {
if (SingleValue == "]") {
if (Value == "!") {
mainTimeLine["AccType" + LevelSet][x] = undefined;
} else {
mainTimeLine["AccType" + LevelSet][x] = parseInt(Value);
}
Value = "";
x++;
break;
}
Value = Value + SingleValue;
Start++;
}
}
stopMouse();
Import.removeMovieClip();
Level = LevelSet;
if (PlayingMenu) {
MS.stop();
PlayingMenu = false;
}
gotoAndStop ("Game");
}
}
function stopMouse() {
delete onMouseMove;
delete onMouseUp;
}
if (!PlayingMenu) {
MS.start(0, 9999);
PlayingMenu = true;
}
v = 1;
while (v <= 6) {
if (BestTime[v] < LevUnlock[v]) {
mainTimeLine["Level" + v].gotoAndStop("Cleared");
} else if (BestTime[v - 1] < LevUnlock[v - 1]) {
mainTimeLine["Level" + v].gotoAndStop("Neutral");
} else if (v == 1) {
mainTimeLine["Level" + v].gotoAndStop("Neutral");
} else {
mainTimeLine["Level" + v].gotoAndStop("Locked");
}
v++;
}
var MenuTween = (new mx.transitions.Tween(BacktoMenuButton, "_y", mx.transitions.easing.Strong.easeOut, -230, BacktoMenuButton._y, 1.5, true));
MenuTween.onMotionFinished = function () {
};
ShowLoad = false;
var Decrypted = "";
onMouseMove = function () {
if (!ShowLoad) {
var _local1 = false;
v = 1;
while (v <= 6) {
if (mainTimeLine["Level" + v].hitTest(mainTimeLine._xmouse, mainTimeLine._ymouse, true)) {
Yes = false;
if (BestTime[v] < LevUnlock[v]) {
mainTimeLine["Level" + v].gotoAndStop("ClearedOver");
Yes = true;
} else if (BestTime[v - 1] < LevUnlock[v - 1]) {
mainTimeLine["Level" + v].gotoAndStop("RollOver");
Yes = true;
} else if (v == 1) {
mainTimeLine["Level" + v].gotoAndStop("RollOver");
Yes = true;
} else {
mainTimeLine["Level" + v].gotoAndStop("Locked");
}
} else if (BestTime[v] < LevUnlock[v]) {
mainTimeLine["Level" + v].gotoAndStop("Cleared");
} else if (BestTime[v - 1] < LevUnlock[v - 1]) {
mainTimeLine["Level" + v].gotoAndStop("Neutral");
} else if (v == 1) {
mainTimeLine["Level" + v].gotoAndStop("Neutral");
} else {
mainTimeLine["Level" + v].gotoAndStop("Locked");
}
v++;
}
}
};
Level1.onRelease = function () {
if (!ShowLoad) {
stopMouse();
LevelStats.removeMovieClip();
ImportLevel(1);
}
};
Level2.onRelease = function () {
if ((!ShowLoad) && (BestTime[1] < LevUnlock[1])) {
stopMouse();
LevelStats.removeMovieClip();
ImportLevel(2);
}
};
Level3.onRelease = function () {
if ((!ShowLoad) && (BestTime[2] < LevUnlock[2])) {
stopMouse();
LevelStats.removeMovieClip();
ImportLevel(3);
}
};
Level4.onRelease = function () {
if ((!ShowLoad) && (BestTime[3] < LevUnlock[3])) {
stopMouse();
LevelStats.removeMovieClip();
ImportLevel(4);
}
};
Level5.onRelease = function () {
if ((!ShowLoad) && (BestTime[4] < LevUnlock[4])) {
stopMouse();
LevelStats.removeMovieClip();
ImportLevel(5);
}
};
Level6.onRelease = function () {
if ((!ShowLoad) && (BestTime[5] < LevUnlock[5])) {
stopMouse();
LevelStats.removeMovieClip();
ImportLevel(6);
}
};
ShowLoad = false;
ImportButton.onRelease = function () {
if (!ShowLoad) {
ShowLoad = true;
attachMovie("ImportMC", "Import", mainTimeLine.getNextHighestDepth());
Import._x = 285.9;
Import._y = 179.4;
}
};
onMouseUp = function () {
if (Import.ExitImportButton.hitTest(mainTimeLine._xmouse, mainTimeLine._ymouse, true)) {
SelectingTiles = false;
LevelBuilderMenu.TileMenu.removeMovieClip();
ShowLoad = false;
Import.removeMovieClip();
} else {
Import.ExitImportButton.gotoAndStop("Neutral");
}
if (Import.ImportButtonLoad.hitTest(mainTimeLine._xmouse, mainTimeLine._ymouse, true)) {
ImportLevel(0);
} else {
Import.ImportButtonLoad.gotoAndStop("Neutral");
}
};
BacktoMenuButton.onRelease = function () {
stopMouse();
gotoAndStop ("Menu");
};
stop();
Frame 7
function FadeS() {
TV = TV + 1;
LS.setVolume(TV);
if (TV >= TVMax) {
trace("dONE");
clearInterval(FadeInt);
}
}
function FadeOutSound() {
TV = TV - 2;
LS.setVolume(TV);
if (TV <= 0) {
LS.stop();
clearInterval(FadeInt);
}
}
function CreateTile(TileSet, XPos, YPos, XName, YName) {
Name = XName + (YName * (TIX + 1));
if (!No) {
YVar = YPos;
No = true;
}
Envi.Wall.createEmptyMovieClip(["MapPiece" + Name], Envi.Wall.getNextHighestDepth());
if (((TileSet != undefined) && (TileSet != "!")) && (TileSet != 0)) {
Envi.Wall["MapPiece" + Name].attachBitmap(MapPieces[Name], Envi.Wall["MapPiece" + Name].getNextHighestDepth());
MapPieces[Name].copyPixels(mainTimeLine["TileBitmap" + TileSet], new flash.geom.Rectangle(0, 0, 50, 50), new flash.geom.Point(0, 0));
} else {
RandomNum = Math.round(Math.random() * 3) + 1;
Envi.Wall["MapPiece" + Name].attachBitmap(MapPieces[Name], Envi.Wall["MapPiece" + Name].getNextHighestDepth());
MapPieces[Name].copyPixels(mainTimeLine["TileBitmap100" + RandomNum], new flash.geom.Rectangle(0, 0, 50, 50), new flash.geom.Point(0, 0));
Map[Level][XPos][YPos] = 1000 + RandomNum;
}
Envi.Wall["MapPiece" + Name]._x = XPos * TileSize;
Envi.Wall["MapPiece" + Name]._y = YPos * TileSize;
q++;
}
function SetAnimation() {
if (!Dead) {
if (OnGround) {
if (Direction == 3) {
if (JustLanded) {
if (ChState != "land-up") {
ChState = "land-up";
Char.gotoAndPlay("land-up");
}
} else if (ChState != "Stand") {
ChState = "Stand";
Char.gotoAndPlay("stand");
}
} else if (Direction == 1) {
if (CharHit) {
if (ChState != "hit-right") {
ChState = "hit-right";
Char.gotoAndPlay("hit-right");
}
} else if (RopeOut && (vx != 0)) {
if (ChState != "rope-right") {
ChState = "rope-right";
Char.gotoAndStop("rope-right");
JustLanded = false;
}
} else if ((!RopeOut) && (vx != 0)) {
if (ChState != "move-right") {
ChState = "move-right";
Char.gotoAndPlay("move-right");
JustLanded = false;
}
} else if (JustLanded) {
if (ChState != "land-right") {
ChState = "land-right";
Char.gotoAndPlay("land-right");
}
} else if (vx == 0) {
if (ChState != "side-right") {
ChState = "side-right";
Char.gotoAndStop("side-right");
}
}
} else if (Direction == 0) {
if (CharHit) {
if (ChState != "hit-left") {
ChState = "hit-left";
Char.gotoAndPlay("hit-left");
}
} else if (RopeOut && (vx != 0)) {
if (ChState != "rope-left") {
ChState = "rope-left";
Char.gotoAndStop("rope-left");
JustLanded = false;
}
} else if ((!RopeOut) && (vx != 0)) {
if (ChState != "move-left") {
ChState = "move-left";
Char.gotoAndPlay("move-left");
JustLanded = false;
}
} else if (JustLanded) {
if (ChState != "land-left") {
ChState = "land-left";
Char.gotoAndPlay("land-left");
}
} else if (ChState != "side-left") {
ChState = "side-left";
Char.gotoAndStop("side-left");
}
}
}
if (!OnGround) {
if (Direction == 3) {
if (ChState != "jump-up") {
ChState = "jump-up";
Char.gotoAndStop("jump-up");
}
} else if (Direction == 1) {
if (CharHit) {
if (ChState != "hit-right") {
ChState = "hit-right";
Char.gotoAndPlay("hit-right");
}
} else if (JumpingNow) {
if (ChState != "JumpSlide") {
ChState = "JumpSlide";
if (JumpingOutDir == "right") {
Char.gotoAndPlay("wall-jump-right-out");
} else if (JumpingOutDir == "left") {
Char.gotoAndPlay("wall-jump-left-out");
}
}
} else if (WallSlidingLeft && (SlidingNow)) {
if (ChState != "Sliding") {
ChState = "Sliding";
Char.gotoAndStop("slide-left");
}
} else if (WallSlidingLeft) {
if (ChState != "SlidingInLeft") {
ChState = "SlidingInLeft";
Char.gotoAndPlay("wall-jump-left-in");
}
} else if (RopeOut) {
if (ChState != "rope-right") {
ChState = "rope-right";
Char.gotoAndStop("rope-right");
}
} else if (!RopeOut) {
if (ChState != "jump-right") {
ChState = "jump-right";
Char.gotoAndStop("jump-right");
}
}
} else if (Direction == 0) {
if (CharHit) {
if (ChState != "hit-left") {
ChState = "hit-left";
Char.gotoAndPlay("hit-left");
}
} else if (JumpingNow) {
if (ChState != "JumpSlide") {
ChState = "JumpSlide";
if (JumpingOutDir == "right") {
Char.gotoAndPlay("wall-jump-right-out");
} else if (JumpingOutDir == "left") {
Char.gotoAndPlay("wall-jump-left-out");
}
}
} else if (WallSlidingRight && (SlidingNow)) {
if (ChState != "Sliding") {
ChState = "Sliding";
Char.gotoAndStop("slide-right");
}
} else if (WallSlidingRight) {
if (ChState != "SlidingInRight") {
ChState = "SlidingInRight";
Char.gotoAndPlay("wall-jump-right-in");
}
} else if (RopeOut) {
if (ChState != "rope-left") {
ChState = "rope-left";
Char.gotoAndStop("rope-left");
}
} else if (!RopeOut) {
if (ChState != "jump-left") {
ChState = "jump-left";
Char.gotoAndStop("jump-left");
}
}
}
}
} else if (Dead) {
if (OnGround) {
if (ChState != "Dead") {
ChState = "Dead";
trace("Set");
Char.gotoAndPlay("dead");
}
} else if (!OnGround) {
if (ChState != "fall-die") {
ChState = "fall-die";
Char.gotoAndStop("fall-die");
}
}
}
}
function MoveEnemies() {
CX = Char._x - Envi._x;
CY = Char._y - Envi._y;
t = 0;
do {
if (EnemyType[t] == BatNum) {
BatAI(t);
} else if (EnemyType[t] == DogNum) {
DogAI(t);
} else if (EnemyType[t] == RatNum) {
RatAI(t);
} else if (EnemyType[t] == SoldierNum) {
SoldierAI(t);
} else if (EnemyType[t] == SpikeUNum) {
SpikeUAI(t);
} else if (EnemyType[t] == SpikeDNum) {
SpikeDAI(t);
} else if (EnemyType[t] == SpikeLNum) {
SpikeLAI(t);
} else if (EnemyType[t] == SpikeRNum) {
SpikeRAI(t);
} else if (EnemyType[t] == ArcherNum) {
ArcherAI(t);
}
} while ((++t) < EC);
}
function ArcherAI(t) {
if (!EnemyDead[t]) {
Rotated = false;
AngleCurrently = 100;
AngledNeeded = 0;
FoundChar = false;
EX = Envi.Enemies["Enemy" + t]._x;
EY = Envi.Enemies["Enemy" + t]._y;
XD = CX - EX;
YD = CY - EY;
EYT = Math.round((EY - 35) / TileSize);
EXT = Math.round((EX - 25) / TileSize);
if ((Map[Level][EXT][EYT + 1] > WT) || (Map[Level][EXT][EYT + 1] == undefined)) {
Envi.Enemies["Enemy" + t]._y = Envi.Enemies["Enemy" + t]._y + (EnemyS * 2);
} else {
ECurrTime[t] = getTimer();
if (((XD * XD) + (YD * YD)) < EnemySi) {
FoundChar = true;
if ((Char._x - Envi._x) > EX) {
EDir[t] = 1;
Envi.Enemies["Enemy" + t]._xscale = -100;
} else {
EDir[t] = 0;
Envi.Enemies["Enemy" + t]._xscale = 100;
}
if ((((ECurrTime[t] - ELastShot[t]) >= 900) && (State[t] != "Attacking")) && (State[t] != "Returning")) {
ELastShot[t] = getTimer() - 900;
State[t] = "Attacking";
Envi.Enemies["Enemy" + t].Enemy.gotoAndPlay("shoot");
}
}
if (((ECurrTime[t] - ELastShot[t]) >= 2150) && (State[t] == "Attacking")) {
ArrowXNum = (Char._x - Envi._x) - Envi.Enemies["Enemy" + t]._x;
ArrowYNum = ((Char._y - Envi._y) + 20) - Envi.Enemies["Enemy" + t]._y;
ArrowDenom = Math.sqrt((ArrowXNum * ArrowXNum) + (ArrowYNum * ArrowYNum));
Arrowrvx[KIE] = (ArrowXNum * ArrowPower) / ArrowDenom;
Arrowrvy[KIE] = (ArrowYNum * ArrowPower) / ArrowDenom;
AngleNeeded = ((Math.atan2(Arrowrvy[KIE], Arrowrvx[KIE]) + 1.507) * 180) / Math.PI;
AngleCurrently = Envi.Enemies["Enemy" + t].Enemy.Bow._rotation;
trace(AngleCurrently + ". Currently");
trace(AngleNeeded + ". Needed");
if ((AngleNeeded > -90) && (AngleNeeded < 90)) {
Envi.Enemies["Enemy" + t].Enemy.Bow._rotation = Envi.Enemies["Enemy" + t].Enemy.Bow._rotation + 5;
Envi.Enemies["Enemy" + t].Enemy.Arm._rotation = Envi.Enemies["Enemy" + t].Enemy.Arm._rotation + 5;
if ((AngleNeeded > -90) && (AngleNeeded < 0)) {
AngleNeeded = AngleNeeded + 45;
} else if ((AngleNeeded > 0) && (AngleNeeded < 90)) {
AngleNeeded = AngleNeeded - 45;
}
} else if ((AngleNeeded > 90) && (AngleNeeded < 270)) {
Envi.Enemies["Enemy" + t].Enemy.Bow._rotation = Envi.Enemies["Enemy" + t].Enemy.Bow._rotation - 5;
Envi.Enemies["Enemy" + t].Enemy.Arm._rotation = Envi.Enemies["Enemy" + t].Enemy.Arm._rotation - 5;
if ((AngleNeeded > 180) && (AngleNeeded < 270)) {
AngleNeeded = AngleNeeded - 270;
} else if ((AngleNeeded > 90) && (AngleNeeded < 180)) {
AngleNeeded = AngleNeeded - 90;
}
}
if (Math.abs(Math.abs(AngleCurrently) - Math.abs(AngleNeeded)) <= 5) {
trace("Close enough");
Rotated = true;
}
}
if ((((ECurrTime[t] - ELastShot[t]) >= 2550) && (State[t] == "Attacking")) || (Rotated)) {
EKunHit[KIE] = false;
State[t] = "Nothing";
Envi.Enemies["Enemy" + t].Enemy.play();
EKunXPoint[KIE] = Char._x - Envi._x;
EKunYPoint[KIE] = (Char._y - Envi._y) + 20;
if (EDir[t] == 1) {
EKunDrawPointX[KIE] = EX + 15;
} else if (EDir[t] == 0) {
EKunDrawPointX[KIE] = EX - 15;
}
EKunDrawPointY[KIE] = EY;
EKunOut = true;
SetEnemyKunai(t, true);
ELastShot[t] = getTimer();
}
}
} else if ((getTimer() - ELastShot[t]) > 500) {
EYT = Math.round((Envi.Enemies["Enemy" + t]._y - 30) / TileSize);
EXT = Math.round((Envi.Enemies["Enemy" + t]._x - 30) / TileSize);
if ((Map[Level][EXT][EYT + 1] > WT) || (Map[Level][EXT][EYT + 1] == undefined)) {
Envi.Enemies["Enemy" + t]._y = Envi.Enemies["Enemy" + t]._y + (EnemyS * 2);
} else {
Envi.Enemies["Enemy" + t].Enemy.gotoAndStop("dead2");
}
}
}
function SpikeUAI(t) {
EX = Envi.Enemies["Enemy" + t]._x;
EY = Envi.Enemies["Enemy" + t]._y;
XD = CX - EX;
YD = CY - EY;
if ((((YD >= -60) && (YD <= 0)) && (Math.abs(XD) <= 20)) && (State[t] != "Spiking")) {
ELastShot[t] = getTimer();
EnemyDead[t] = false;
Envi.Enemies["Enemy" + t].Enemy.gotoAndPlay("spike");
State[t] = "Spiking";
}
if (State[t] == "Spiking") {
if (Envi.Enemies["Enemy" + t].hitTest(Char) && (!EnemyDead[t])) {
EnemyDead[t] = true;
CharLoseHP(1);
}
ECurrTime[t] = getTimer();
if ((ECurrTime[t] - ELastShot[t]) > 2200) {
Envi.Enemies["Enemy" + t].Enemy.gotoAndStop("stop");
State[t] = "Idle";
}
}
}
function SpikeDAI(t) {
EX = Envi.Enemies["Enemy" + t]._x;
EY = Envi.Enemies["Enemy" + t]._y;
XD = CX - EX;
YD = CY - EY;
if ((((YD <= 80) && (YD >= 0)) && (Math.abs(XD) <= 20)) && (State[t] != "Spiking")) {
ELastShot[t] = getTimer();
EnemyDead[t] = false;
Envi.Enemies["Enemy" + t].Enemy.gotoAndPlay("spike");
State[t] = "Spiking";
}
if (State[t] == "Spiking") {
if (Envi.Enemies["Enemy" + t].hitTest(Char) && (!EnemyDead[t])) {
EnemyDead[t] = true;
CharLoseHP(1);
}
ECurrTime[t] = getTimer();
if ((ECurrTime[t] - ELastShot[t]) > 2200) {
Envi.Enemies["Enemy" + t].Enemy.gotoAndStop("stop");
State[t] = "Idle";
}
}
}
function SpikeRAI(t) {
EX = Envi.Enemies["Enemy" + t]._x;
EY = Envi.Enemies["Enemy" + t]._y;
XD = CX - EX;
YD = CY - EY;
if ((((Math.abs(YD) <= 20) && (XD >= -60)) && (XD <= 0)) && (State[t] != "Spiking")) {
ELastShot[t] = getTimer();
EnemyDead[t] = false;
Envi.Enemies["Enemy" + t].Enemy.gotoAndPlay("spike");
State[t] = "Spiking";
}
if (State[t] == "Spiking") {
if (Envi.Enemies["Enemy" + t].hitTest(Char) && (!EnemyDead[t])) {
EnemyDead[t] = true;
CharLoseHP(1);
}
ECurrTime[t] = getTimer();
if ((ECurrTime[t] - ELastShot[t]) > 2200) {
Envi.Enemies["Enemy" + t].Enemy.gotoAndStop("stop");
State[t] = "Idle";
}
}
}
function SpikeLAI(t) {
EX = Envi.Enemies["Enemy" + t]._x;
EY = Envi.Enemies["Enemy" + t]._y;
XD = CX - EX;
YD = CY - EY;
if ((((Math.abs(YD) <= 20) && (XD <= 60)) && (XD >= 0)) && (State[t] != "Spiking")) {
ELastShot[t] = getTimer();
EnemyDead[t] = false;
Envi.Enemies["Enemy" + t].Enemy.gotoAndPlay("spike");
State[t] = "Spiking";
}
if (State[t] == "Spiking") {
if (Envi.Enemies["Enemy" + t].hitTest(Char) && (!EnemyDead[t])) {
EnemyDead[t] = true;
CharLoseHP(1);
}
ECurrTime[t] = getTimer();
if ((ECurrTime[t] - ELastShot[t]) > 2200) {
Envi.Enemies["Enemy" + t].Enemy.gotoAndStop("stop");
State[t] = "Idle";
}
}
}
function RatAI(t) {
if (!EnemyDead[t]) {
EX = Envi.Enemies["Enemy" + t]._x;
EY = Envi.Enemies["Enemy" + t]._y;
XD = CX - EX;
YD = CY - EY;
EYT = Math.round(((EY - 37) - 25) / TileSize);
EXT = Math.round((EX - 25) / TileSize);
if ((Map[Level][EXT][EYT + 1] > WT) || (Map[Level][EXT][EYT + 1] == undefined)) {
Envi.Enemies["Enemy" + t]._y = Envi.Enemies["Enemy" + t]._y + (EnemyS * 2);
} else {
if (!Landed[t]) {
Envi.Enemies["Enemy" + t].Enemy.gotoAndPlay("walk");
State[t] = "Walking";
Envi.Enemies["Enemy" + t]._xscale = 100 - (200 * EDir[t]);
Landed[t] = true;
}
FoundChar = false;
if (((YD * YD) + (XD * XD)) < (EnemySi / 3)) {
FoundChar = true;
if ((Char._x - Envi._x) > Envi.Enemies["Enemy" + t]._x) {
EDir[t] = 1;
Envi.Enemies["Enemy" + t]._xscale = -100;
} else {
EDir[t] = 0;
Envi.Enemies["Enemy" + t]._xscale = 100;
}
}
if ((EDir[t] == 1) && (Map[Level][EXT][EYT + 1] <= WT)) {
if (((Map[Level][EXT + 1][EYT] <= WT) || (Map[Level][EXT + 1][EYT + 1] == undefined)) || (Map[Level][EXT + 1][EYT + 1] > WT)) {
if (FoundChar) {
Envi.Enemies["Enemy" + t]._xscale = -100;
} else {
EDir[t] = 0;
Envi.Enemies["Enemy" + t]._xscale = 100;
}
} else if (!FoundChar) {
if (State[t] != "Walking") {
Envi.Enemies["Enemy" + t].Enemy.gotoAndPlay("walk");
State[t] = "Walking";
}
Envi.Enemies["Enemy" + t]._x = Envi.Enemies["Enemy" + t]._x + (EnemyS * 1.5);
} else if (FoundChar) {
if (Math.abs(XD) > 30) {
if (State[t] != "Running") {
Envi.Enemies["Enemy" + t].Enemy.gotoAndPlay("run");
State[t] = "Running";
}
Envi.Enemies["Enemy" + t]._x = Envi.Enemies["Enemy" + t]._x + (EnemyS * 4);
} else if (((Math.abs(XD) < 30) && (Math.abs(YD) < 25)) && (State[t] != "Biting")) {
State[t] = "Biting";
ELastShot[t] = getTimer();
CharLoseHP(1);
Envi.Enemies["Enemy" + t].Enemy.gotoAndPlay("bite");
} else if (Math.abs(XD) < 20) {
if (XD < 0) {
Envi.Enemies["Enemy" + t]._x = Envi.Enemies["Enemy" + t]._x + EnemyS;
} else if (XD > 0) {
Envi.Enemies["Enemy" + t]._x = Envi.Enemies["Enemy" + t]._x - EnemyS;
}
} else if (((Math.abs(XD) < 30) && (Math.abs(YD) < 25)) && (State[t] == "Biting")) {
ECurrTime[t] = getTimer();
if ((ECurrTime[t] - ELastShot[t]) > 700) {
CharLoseHP(1);
ELastShot[t] = getTimer();
}
}
}
} else if ((EDir[t] == 0) && (Map[Level][EXT][EYT + 1] <= WT)) {
if (((Map[Level][EXT - 1][EYT] <= WT) || (Map[Level][EXT - 1][EYT + 1] == undefined)) || (Map[Level][EXT - 1][EYT + 1] > WT)) {
if (FoundChar) {
Envi.Enemies["Enemy" + t]._xscale = 100;
} else {
EDir[t] = 1;
Envi.Enemies["Enemy" + t]._xscale = -100;
}
} else if (!FoundChar) {
if (State[t] != "Walking") {
Envi.Enemies["Enemy" + t].Enemy.gotoAndPlay("walk");
State[t] = "Walking";
}
Envi.Enemies["Enemy" + t]._x = Envi.Enemies["Enemy" + t]._x - (EnemyS * 1.5);
} else if (FoundChar) {
if (Math.abs(XD) > 30) {
if (State[t] != "Running") {
Envi.Enemies["Enemy" + t].Enemy.gotoAndPlay("run");
State[t] = "Running";
}
Envi.Enemies["Enemy" + t]._x = Envi.Enemies["Enemy" + t]._x - (EnemyS * 4);
} else if (((Math.abs(XD) < 30) && (Math.abs(YD) < 25)) && (State[t] != "Biting")) {
State[t] = "Biting";
ELastShot[t] = getTimer();
CharLoseHP(1);
Envi.Enemies["Enemy" + t].Enemy.gotoAndPlay("bite");
} else if (Math.abs(XD) < 20) {
if (XD < 0) {
Envi.Enemies["Enemy" + t]._x = Envi.Enemies["Enemy" + t]._x + EnemyS;
} else if (XD > 0) {
Envi.Enemies["Enemy" + t]._x = Envi.Enemies["Enemy" + t]._x - EnemyS;
}
} else if (((Math.abs(XD) < 30) && (Math.abs(YD) < 25)) && (State[t] == "Biting")) {
ECurrTime[t] = getTimer();
if ((ECurrTime[t] - ELastShot[t]) > 700) {
CharLoseHP(1);
ELastShot[t] = getTimer();
}
}
}
}
}
} else {
EYT = Math.round(((Envi.Enemies["Enemy" + t]._y - 37) - 25) / TileSize);
EXT = Math.round((Envi.Enemies["Enemy" + t]._x - 25) / TileSize);
if ((Map[Level][EXT][EYT + 1] > WT) || (Map[Level][EXT][EYT + 1] == undefined)) {
Envi.Enemies["Enemy" + t]._y = Envi.Enemies["Enemy" + t]._y + (EnemyS * 2);
} else {
Envi.Enemies["Enemy" + t].Enemy.gotoAndStop("dead");
}
}
}
function DogAI(t) {
if (!EnemyDead[t]) {
EX = Envi.Enemies["Enemy" + t]._x;
EY = Envi.Enemies["Enemy" + t]._y;
XD = CX - EX;
YD = CY - EY;
EYT = Math.round(((EY - 25) - 25) / TileSize);
EXT = Math.round((EX - 25) / TileSize);
if ((Map[Level][EXT][EYT + 1] > WT) || (Map[Level][EXT][EYT + 1] == undefined)) {
Envi.Enemies["Enemy" + t]._y = Envi.Enemies["Enemy" + t]._y + (EnemyS * 2);
} else {
if (!Landed[t]) {
Envi.Enemies["Enemy" + t].Enemy.gotoAndPlay("walk");
State[t] = "Walking";
Envi.Enemies["Enemy" + t]._xscale = -100 + (200 * EDir[t]);
Landed[t] = true;
}
FoundChar = false;
if (((YD * YD) + (XD * XD)) < (EnemySi / 3)) {
FoundChar = true;
if ((Char._x - Envi._x) > Envi.Enemies["Enemy" + t]._x) {
EDir[t] = 1;
Envi.Enemies["Enemy" + t]._xscale = 100;
} else {
EDir[t] = 0;
Envi.Enemies["Enemy" + t]._xscale = -100;
}
}
if ((EDir[t] == 1) && (Map[Level][EXT][EYT + 1] <= WT)) {
if (((Map[Level][EXT + 1][EYT] <= WT) || (Map[Level][EXT + 1][EYT + 1] == undefined)) || (Map[Level][EXT + 1][EYT + 1] > WT)) {
if (FoundChar) {
Envi.Enemies["Enemy" + t]._xscale = 100;
} else {
EDir[t] = 0;
Envi.Enemies["Enemy" + t]._xscale = -100;
}
} else if (!FoundChar) {
if (State[t] != "Walking") {
Envi.Enemies["Enemy" + t].Enemy.gotoAndPlay("walk");
State[t] = "Walking";
}
Envi.Enemies["Enemy" + t]._x = Envi.Enemies["Enemy" + t]._x + (EnemyS * 1.5);
} else if (FoundChar) {
if (Math.abs(XD) > 40) {
if (State[t] != "Running") {
Envi.Enemies["Enemy" + t].Enemy.gotoAndPlay("run");
State[t] = "Running";
}
Envi.Enemies["Enemy" + t]._x = Envi.Enemies["Enemy" + t]._x + (EnemyS * 3);
} else if (((Math.abs(XD) < 40) && (Math.abs(YD) < 13)) && (State[t] != "Biting")) {
State[t] = "Biting";
ELastShot[t] = getTimer();
CharLoseHP(1);
Envi.Enemies["Enemy" + t].Enemy.gotoAndPlay("bite");
} else if (Math.abs(XD) < 30) {
if (XD < 0) {
Envi.Enemies["Enemy" + t]._x = Envi.Enemies["Enemy" + t]._x + EnemyS;
} else if (XD > 0) {
Envi.Enemies["Enemy" + t]._x = Envi.Enemies["Enemy" + t]._x - EnemyS;
}
} else if (((Math.abs(XD) < 40) && (Math.abs(YD) < 13)) && (State[t] == "Biting")) {
ECurrTime[t] = getTimer();
if ((ECurrTime[t] - ELastShot[t]) > 1000) {
CharLoseHP(1);
ELastShot[t] = getTimer();
}
}
}
} else if ((EDir[t] == 0) && (Map[Level][EXT][EYT + 1] <= WT)) {
if (((Map[Level][EXT - 1][EYT] <= WT) || (Map[Level][EXT - 1][EYT + 1] == undefined)) || (Map[Level][EXT - 1][EYT + 1] > WT)) {
if (FoundChar) {
Envi.Enemies["Enemy" + t]._xscale = -100;
} else {
EDir[t] = 1;
Envi.Enemies["Enemy" + t]._xscale = 100;
}
} else if (!FoundChar) {
if (State[t] != "Walking") {
Envi.Enemies["Enemy" + t].Enemy.gotoAndPlay("walk");
State[t] = "Walking";
}
Envi.Enemies["Enemy" + t]._x = Envi.Enemies["Enemy" + t]._x - (EnemyS * 1.5);
} else if (FoundChar) {
if (Math.abs(XD) > 40) {
if (State[t] != "Running") {
Envi.Enemies["Enemy" + t].Enemy.gotoAndPlay("run");
State[t] = "Running";
}
Envi.Enemies["Enemy" + t]._x = Envi.Enemies["Enemy" + t]._x - (EnemyS * 3);
} else if (((Math.abs(XD) < 40) && (Math.abs(YD) < 13)) && (State[t] != "Biting")) {
State[t] = "Biting";
ELastShot[t] = getTimer();
CharLoseHP(1);
Envi.Enemies["Enemy" + t].Enemy.gotoAndPlay("bite");
} else if (Math.abs(XD) < 30) {
if (XD < 0) {
Envi.Enemies["Enemy" + t]._x = Envi.Enemies["Enemy" + t]._x + EnemyS;
} else if (XD > 0) {
Envi.Enemies["Enemy" + t]._x = Envi.Enemies["Enemy" + t]._x - EnemyS;
}
} else if (((Math.abs(XD) < 40) && (Math.abs(YD) < 13)) && (State[t] == "Biting")) {
ECurrTime[t] = getTimer();
if ((ECurrTime[t] - ELastShot[t]) > 1000) {
CharLoseHP(1);
ELastShot[t] = getTimer();
}
}
}
}
}
} else {
EYT = Math.round(((Envi.Enemies["Enemy" + t]._y - 25) - 25) / TileSize);
EXT = Math.round((Envi.Enemies["Enemy" + t]._x - 25) / TileSize);
if ((Map[Level][EXT][EYT + 1] > WT) || (Map[Level][EXT][EYT + 1] == undefined)) {
Envi.Enemies["Enemy" + t]._y = Envi.Enemies["Enemy" + t]._y + (EnemyS * 2);
} else {
Envi.Enemies["Enemy" + t].Enemy.gotoAndStop("dead");
}
}
}
function BatAI(t) {
if (!EnemyDead[t]) {
var _local3 = Envi.Enemies["Enemy" + t]._x;
var _local2 = Envi.Enemies["Enemy" + t]._y;
XD = CX - _local3;
YD = CY - _local2;
EYT = Math.round(((_local2 + Batrvy[t]) - 25) / TileSize);
EXT = Math.round(((_local3 + Batrvx[t]) - 25) / TileSize);
if ((((XD * XD) + (YD * YD)) < (EnemySi / 2)) && (!RetreatingChar[t])) {
ECurrTime[t] = getTimer();
if (((ECurrTime[t] - ELastShot[t]) > 2000) || (ELastShot[t] == undefined)) {
BatPointY[t] = Char._y - Envi._y;
BatPointX[t] = Char._x - Envi._x;
BatXNum = BatPointX[t] - _local3;
BatYNum = BatPointY[t] - _local2;
BatDenom = Math.sqrt((BatXNum * BatXNum) + (BatYNum * BatYNum));
Batrvx[t] = (BatXNum * BatPower) / BatDenom;
Batrvy[t] = (BatYNum * BatPower) / BatDenom;
ChasingChar[t] = true;
if (State[t] != "Diving") {
Envi.Enemies["Enemy" + t].Enemy.gotoAndStop("dive");
State[t] = "Diving";
}
}
}
if (ChasingChar[t]) {
BatPointY[t] = Char._y - Envi._y;
BatPointX[t] = Char._x - Envi._x;
BatXNum = BatPointX[t] - _local3;
BatYNum = BatPointY[t] - _local2;
BatDenom = Math.sqrt((BatXNum * BatXNum) + (BatYNum * BatYNum));
Batrvx[t] = (BatXNum * BatPower) / BatDenom;
Batrvy[t] = (BatYNum * BatPower) / BatDenom;
Angle = ((Math.atan2(Batrvy[t], Batrvx[t]) + 1.507) * 180) / Math.PI;
Envi.Enemies["Enemy" + t]._rotation = Angle;
}
if ((Map[Level][EXT][EYT] <= WT) && (ChasingChar[t])) {
trace("Set A timer");
ChasingChar[t] = false;
ELastShot[t] = getTimer();
if (State[t] != "Flying") {
Envi.Enemies["Enemy" + t].Enemy.gotoAndPlay("fly");
State[t] = "Flying";
Envi.Enemies["Enemy" + t]._rotation = 0;
}
}
Hit = false;
XD = Envi.Enemies["Enemy" + t]._x - (Char._x - Envi._x);
YD = Envi.Enemies["Enemy" + t]._y - (Char._y - Envi._y);
if ((((XD * XD) + (YD * YD)) < ChRad) && (ChasingChar[t])) {
if (((XD * XD) + (YD * YD)) < ChBodyRad) {
Hit = true;
}
if (!Hit) {
XD = Envi.Enemies["Enemy" + t]._x - (HeadMarker._x - Envi._x);
YD = Envi.Enemies["Enemy" + t]._y - (HeadMarker._y - Envi._y);
if (((XD * XD) + (YD * YD)) < ChHeadRad) {
Hit = true;
}
}
if (!Hit) {
XD = Envi.Enemies["Enemy" + t]._x - (Char._x - Envi._x);
YD = Envi.Enemies["Enemy" + t]._y - (((Char._y + CH) - 10) - Envi._y);
if (((XD * XD) + (YD * YD)) < ChLegRad) {
Hit = true;
}
}
}
if ((Map[Level][EXT][EYT] <= WT) || (Hit)) {
if (!ChasingChar[t]) {
RetreatingChar[t] = false;
BatPointX[t] = Envi.Enemies["Enemy" + t]._x + ((Math.random() * 200) - 100);
BatPointY[t] = Envi.Enemies["Enemy" + t]._y + ((Math.random() * 200) - 100);
BatXNum = BatPointX[t] - _local3;
BatYNum = BatPointY[t] - _local2;
BatDenom = Math.sqrt((BatXNum * BatXNum) + (BatYNum * BatYNum));
Batrvx[t] = (BatXNum * BatPower) / BatDenom;
Batrvy[t] = (BatYNum * BatPower) / BatDenom;
} else if (ChasingChar[t]) {
ChasingChar[t] = false;
RetreatingChar[t] = true;
BatPointX[t] = (Math.random() * 200) - 100;
BatPointY[t] = (Math.random() * 200) - 100;
BatXNum = BatPointX[t] - _local3;
BatYNum = BatPointY[t] - _local2;
BatDenom = Math.sqrt((BatXNum * BatXNum) + (BatYNum * BatYNum));
Batrvx[t] = (BatXNum * BatPower) / BatDenom;
Batrvy[t] = (BatYNum * BatPower) / BatDenom;
CharLoseHP(1);
if (State[t] != "Flying") {
Envi.Enemies["Enemy" + t].Enemy.gotoAndPlay("fly");
State[t] = "Flying";
Envi.Enemies["Enemy" + t]._rotation = 0;
}
}
} else {
if (!ChasingChar[t]) {
if (State[t] != "Flying") {
Envi.Enemies["Enemy" + t].Enemy.gotoAndPlay("fly");
State[t] = "Flying";
Envi.Enemies["Enemy" + t]._rotation = 0;
}
}
Envi.Enemies["Enemy" + t]._y = Envi.Enemies["Enemy" + t]._y + Batrvy[t];
Envi.Enemies["Enemy" + t]._x = Envi.Enemies["Enemy" + t]._x + Batrvx[t];
}
} else {
EYT = Math.round(((Envi.Enemies["Enemy" + t]._y - 25) - 40) / TileSize);
EXT = Math.round((Envi.Enemies["Enemy" + t]._x - 25) / TileSize);
if ((Map[Level][EXT][EYT + 1] > WT) || (Map[Level][EXT][EYT + 1] == undefined)) {
Envi.Enemies["Enemy" + t]._y = Envi.Enemies["Enemy" + t]._y + (EnemyS * 2);
} else {
Envi.Enemies["Enemy" + t].Enemy.gotoAndStop("dead");
}
}
}
function SoldierAI(t) {
if (!EnemyDead[t]) {
FoundChar = false;
EX = Envi.Enemies["Enemy" + t]._x;
EY = Envi.Enemies["Enemy" + t]._y;
XD = CX - EX;
YD = CY - EY;
EYT = Math.round((EY - 35) / TileSize);
EXT = Math.round((EX - 25) / TileSize);
if ((Map[Level][EXT][EYT + 1] > WT) || (Map[Level][EXT][EYT + 1] == undefined)) {
Envi.Enemies["Enemy" + t]._y = Envi.Enemies["Enemy" + t]._y + (EnemyS * 2);
} else {
ECurrTime[t] = getTimer();
if (((XD * XD) + (YD * YD)) < (EnemySi / 2)) {
FoundChar = true;
if ((Char._x - Envi._x) > EX) {
EDir[t] = 1;
Envi.Enemies["Enemy" + t]._xscale = -100;
} else {
EDir[t] = 0;
Envi.Enemies["Enemy" + t]._xscale = 100;
}
if (((ECurrTime[t] - ELastShot[t]) >= 900) && (State[t] != "Attacking")) {
ELastShot[t] = getTimer() - 900;
State[t] = "Attacking";
Envi.Enemies["Enemy" + t].Enemy.gotoAndPlay("attack");
}
}
if (((ECurrTime[t] - ELastShot[t]) >= 1500) && (State[t] == "Attacking")) {
State[t] = "Nothing";
EKunHit[KIE] = false;
EKunXPoint[KIE] = Char._x - Envi._x;
EKunYPoint[KIE] = (Char._y - Envi._y) + 20;
EKunDrawPointX[KIE] = EX;
EKunDrawPointY[KIE] = EY - 30;
EKunOut = true;
SetEnemyKunai(t, false);
ELastShot[t] = getTimer();
}
if (!FoundChar) {
if ((Map[Level][EXT][EYT + 1] <= WT) && (EDir[t] == 1)) {
Envi.Enemies["Enemy" + t]._x = Envi.Enemies["Enemy" + t]._x + EnemyS;
if ((State[t] != "Walking") && (State[t] != "Attacking")) {
State[t] = "Walking";
Envi.Enemies["Enemy" + t].Enemy.gotoAndPlay("walk");
}
if (((Map[Level][EXT + 1][EYT] <= WT) || (Map[Level][EXT + 1][EYT + 1] == undefined)) || (Map[Level][EXT + 1][EYT + 1] > WT)) {
EDir[t] = 0;
Envi.Enemies["Enemy" + t]._xscale = 100;
}
} else if ((Map[Level][EXT][EYT + 1] <= WT) && (EDir[t] == 0)) {
Envi.Enemies["Enemy" + t]._x = Envi.Enemies["Enemy" + t]._x - EnemyS;
if ((State[t] != "Walking") && (State[t] != "Attacking")) {
State[t] = "Walking";
Envi.Enemies["Enemy" + t].Enemy.gotoAndPlay("walk");
}
if (((Map[Level][EXT - 1][EYT] <= WT) || (Map[Level][EXT - 1][EYT + 1] == undefined)) || (Map[Level][EXT - 1][EYT + 1] > WT)) {
EDir[t] = 1;
Envi.Enemies["Enemy" + t]._xscale = -100;
}
}
}
}
} else if ((getTimer() - ELastShot[t]) > 500) {
EYT = Math.round((Envi.Enemies["Enemy" + t]._y - 30) / TileSize);
EXT = Math.round((Envi.Enemies["Enemy" + t]._x - 30) / TileSize);
if ((Map[Level][EXT][EYT + 1] > WT) || (Map[Level][EXT][EYT + 1] == undefined)) {
Envi.Enemies["Enemy" + t]._y = Envi.Enemies["Enemy" + t]._y + (EnemyS * 2);
State[t] = "Dead";
} else {
State[t] = "Dead";
}
}
if (EnemyDead[t]) {
State[t] = "Dead";
}
}
function SetKunai() {
Envi.Kunais["Kunai" + KI].removeMovieClip();
Envi.Kunais.attachMovie("Kunai", ["Kunai" + KI], KI);
Envi.Kunais["Kunai" + KI]._x = Char._x - Envi._x;
Envi.Kunais["Kunai" + KI]._y = Char._y - Envi._y;
KunXNum = KunXPoint[KI] - Char._x;
KunYNum = KunYPoint[KI] - Char._y;
KunDenom = Math.sqrt((KunXNum * KunXNum) + (KunYNum * KunYNum));
Kunrvx[KI] = (KunXNum * KunPower) / KunDenom;
Kunrvy[KI] = (KunYNum * KunPower) / KunDenom;
Angle = ((Math.atan2(Kunrvy[KI], Kunrvx[KI]) + 1.507) * 180) / Math.PI;
Envi.Kunais["Kunai" + KI]._rotation = Angle;
ThrKunS.start(0, 1);
if ((KI++) > (KIS + MK)) {
KI = KIS;
}
}
function SetEnemyKunai(t, Arrow) {
Envi.Kunais["Kunai" + KIE].removeMovieClip();
Envi.Kunais["Arrow" + KIE].removeMovieClip();
if (Arrow) {
Envi.Kunais.attachMovie("Arrow", ["Kunai" + KIE], KIE);
} else {
Envi.Kunais.attachMovie("Kunai", ["Kunai" + KIE], KIE);
}
Envi.Kunais["Kunai" + KIE]._x = Envi.Enemies["Enemy" + t]._x;
Envi.Kunais["Kunai" + KIE]._y = Envi.Enemies["Enemy" + t]._y;
EKunXNum = EKunXPoint[KIE] - Envi.Enemies["Enemy" + t]._x;
EKunYNum = EKunYPoint[KIE] - Envi.Enemies["Enemy" + t]._y;
EKunDenom = Math.sqrt((EKunXNum * EKunXNum) + (EKunYNum * EKunYNum));
EKunrvx[KIE] = (EKunXNum * EKunPower) / EKunDenom;
EKunrvy[KIE] = (EKunYNum * EKunPower) / EKunDenom;
Angle = ((Math.atan2(EKunrvy[KIE], EKunrvx[KIE]) + 1.507) * 180) / Math.PI;
Envi.Kunais["Kunai" + KIE]._rotation = Angle;
if ((KIE++) > (KIES + MK)) {
KIE = KIES;
}
}
function MoveEnemyKunai() {
var _local1 = KIES;
do {
if (!EKunHit[_local1]) {
EKunDrawPointX[_local1] = EKunDrawPointX[_local1] + EKunrvx[_local1];
EKunDrawPointY[_local1] = EKunDrawPointY[_local1] + EKunrvy[_local1];
}
Envi.Kunais["Kunai" + _local1]._x = EKunDrawPointX[_local1];
Envi.Kunais["Kunai" + _local1]._y = EKunDrawPointY[_local1];
RYT = Math.round((Envi.Kunais["Kunai" + _local1]._y - 25) / TileSize);
RXT = Math.round((Envi.Kunais["Kunai" + _local1]._x - 25) / TileSize);
if (((Map[Level][RXT][RYT] >= 1) && (Map[Level][RXT][RYT] <= WT)) && (Map[Level][RXT][RYT] != undefined)) {
EKunHit[_local1] = true;
}
XD = Envi.Kunais["Kunai" + _local1]._x - (Char._x - Envi._x);
YD = Envi.Kunais["Kunai" + _local1]._y - (Char._y - Envi._y);
if ((!EKunHit[_local1]) && (((XD * XD) + (YD * YD)) < ChRad)) {
Hit = false;
XD = Envi.Kunais["Kunai" + _local1]._x - (Char._x - Envi._x);
YD = Envi.Kunais["Kunai" + _local1]._y - (Char._y - Envi._y);
if (((XD * XD) + (YD * YD)) < ChBodyRad) {
Hit = true;
}
if (!Hit) {
XD = Envi.Kunais["Kunai" + _local1]._x - (HeadMarker._x - Envi._x);
YD = Envi.Kunais["Kunai" + _local1]._y - (HeadMarker._y - Envi._y);
if (((XD * XD) + (YD * YD)) < ChHeadRad) {
Hit = true;
}
}
if (!Hit) {
XD = Envi.Kunais["Kunai" + _local1]._x - (Char._x - Envi._x);
YD = Envi.Kunais["Kunai" + _local1]._y - (((Char._y - Envi._y) + CH) - 10);
if (((XD * XD) + (YD * YD)) < ChLegRad) {
Hit = true;
}
}
if (Hit) {
CharLoseHP(1);
Envi.Kunais["Kunai" + _local1].removeMovieClip();
}
}
_local1++;
} while (_local1 < EKunDrawPointX.length);
}
function CharLoseHP(HPLoss) {
Stats["HP" + CharHP].removeMovieClip();
CharHP = CharHP - 1;
HS.start(0.1, 1);
if (CharHP <= 0) {
Dead = true;
RopeOut = false;
Grappled = false;
Grap._x = -50;
Grap._y = -50;
Line.clear();
RR = false;
trace("In");
} else {
CharHit = true;
}
}
function MoveKunai() {
var _local3 = KIS;
do {
if (!KunHit[_local3]) {
if (Envi.Kunais["Kunai" + _local3]._x != undefined) {
if (Envi.Kunais["Kunai" + _local3]._x == NaN) {
trace("OMG ITS NAN YOU FOOL");
}
KunDrawPointX[_local3] = KunDrawPointX[_local3] + Kunrvx[_local3];
KunDrawPointY[_local3] = KunDrawPointY[_local3] + Kunrvy[_local3];
Envi.Kunais["Kunai" + _local3]._x = KunDrawPointX[_local3];
Envi.Kunais["Kunai" + _local3]._y = KunDrawPointY[_local3];
RYT = Math.round((KunDrawPointY[_local3] - 25) / TileSize);
RXT = Math.round((KunDrawPointX[_local3] - 25) / TileSize);
if ((Map[Level][RXT][RYT] <= WT) && (Map[Level][RXT][RYT] != undefined)) {
KunHit[_local3] = true;
}
var _local2 = 0;
do {
if (!CColl[_local2]) {
var _local5 = Envi.Kunais["Kunai" + _local3]._x;
var _local4 = Envi.Kunais["Kunai" + _local3]._y;
YD = (CCY[_local2] + 15) - _local4;
if ((YD < 20) && (YD > -20)) {
XD = (CCX[_local2] + 16) - _local5;
if ((XD < 20) && (XD > -20)) {
Hit = false;
XD = (CCX[_local2] + 16) - _local5;
YD = (CCY[_local2] + 15) - _local4;
if (((XD * XD) + (YD * YD)) < CoinRad) {
Hit = true;
}
if (!Hit) {
XD = (CCX[_local2] + 16) - (Envi.Kunais["Kunai" + _local3].Corner1._x - _local5);
YD = (CCY[_local2] + 15) - (Envi.Kunais["Kunai" + _local3].Corner1._y - _local4);
if (((XD * XD) + (YD * YD)) < CoinRad) {
Hit = true;
}
}
if (!Hit) {
XD = (CCX[_local2] + 16) - (Envi.Kunais["Kunai" + _local3].Corner2._x + _local5);
YD = (CCY[_local2] + 15) - (Envi.Kunais["Kunai" + _local3].Corner2._y + _local4);
if (((XD * XD) + (YD * YD)) < CoinRad) {
Hit = true;
}
}
if (Hit) {
CS.start(0, 1);
CurrentOrbs++;
CColl[_local2] = true;
OrbsText = (("x " + CurrentOrbs) + "/") + TotalOrbs;
attachMovie("Collectable", "1" + CurrentOrbs, getNextHighestDepth());
mainTimeLine["1" + CurrentOrbs]._x = (CCX[_local2] + 17) + Envi._x;
mainTimeLine["1" + CurrentOrbs]._y = (CCY[_local2] + 17.5) + Envi._y;
var _local7 = new mx.transitions.Tween(mainTimeLine["1" + CurrentOrbs], "_alpha", mx.transitions.easing.Strong.easeOut, 100, 0, 1.5, true);
var _local8 = new mx.transitions.Tween(mainTimeLine["1" + CurrentOrbs], "_y", mx.transitions.easing.Strong.easeOut, mainTimeLine["1" + CurrentOrbs]._y, 20, 1.5, true);
var _local9 = new mx.transitions.Tween(mainTimeLine["1" + CurrentOrbs], "_xscale", mx.transitions.easing.Strong.easeOut, 100, 80, 1.5, true);
var _local10 = new mx.transitions.Tween(mainTimeLine["1" + CurrentOrbs], "_x", mx.transitions.easing.Strong.easeOut, mainTimeLine["1" + CurrentOrbs]._x, 290, 1.5, true);
var _local6 = new mx.transitions.Tween(mainTimeLine["1" + CurrentOrbs], "_yscale", mx.transitions.easing.Strong.easeOut, 100, 80, 1.5, true);
_local6.onMotionFinished = function () {
this.obj.removeMovieClip();
};
if (CurrentOrbs == TotalOrbs) {
elapsed_time = getTimer() - start_time;
Stats.TimerT.text = time_to_string(elapsed_time);
if (elapsed_time < mainTimeLine.BestTime[Level]) {
BestTime[Level] = elapsed_time;
BestTimeT[Level] = time_to_string(BestTime[Level]);
}
TotalTimeT = Stats.TimerT.text;
TotalTime = elapsed_time;
CleanUp("Win");
}
Envi.Orbs["Orb" + _local2].removeMovieClip();
}
}
}
}
_local2++;
} while (_local2 < mainTimeLine[("ColLoc" + Level) + "X"].length);
_local2 = 0;
do {
if (!EnemyDead[_local2]) {
if (EnemyType[_local2] == BatNum) {
XD = Envi.Enemies["Enemy" + _local2]._x - KunDrawPointX[_local3];
YD = Envi.Enemies["Enemy" + _local2]._y - KunDrawPointY[_local3];
if (((XD * XD) + (YD * YD)) < 600) {
Hit = false;
trace("In");
XD = Envi.Enemies["Enemy" + _local2]._x - KunDrawPointX[_local3];
YD = Envi.Enemies["Enemy" + _local2]._y - KunDrawPointY[_local3];
if (((XD * XD) + (YD * YD)) < BatHeadRad) {
Hit = true;
}
if (!Hit) {
XD = Envi.Enemies["Enemy" + _local2]._x - (Envi.Kunais["Kunai" + _local3].CenterPoint._x + Envi.Kunais["Kunai" + _local3]._x);
YD = Envi.Enemies["Enemy" + _local2]._y - (Envi.Kunais["Kunai" + _local3].CenterPoint._y + Envi.Kunais["Kunai" + _local3]._y);
if (((XD * XD) + (YD * YD)) < BatHeadRad) {
Hit = true;
}
}
if (!Hit) {
XD = Envi.Enemies["Enemy" + _local2]._x - (Envi.Kunais["Kunai" + _local3].CenterPoint2._x + Envi.Kunais["Kunai" + _local3]._x);
YD = Envi.Enemies["Enemy" + _local2]._y - (Envi.Kunais["Kunai" + _local3].CenterPoint2._y + Envi.Kunais["Kunai" + _local3]._y);
if (((XD * XD) + (YD * YD)) < BatHeadRad) {
Hit = true;
}
}
if (!Hit) {
if (State[_local2] != "Swooping") {
XD = (Envi.Enemies["Enemy" + _local2]._x - 15) - KunDrawPointX[_local3];
YD = Envi.Enemies["Enemy" + _local2]._y - KunDrawPointY[_local3];
if (((XD * XD) + (YD * YD)) < BatWingRad) {
Hit = true;
}
if (!Hit) {
XD = (Envi.Enemies["Enemy" + _local2]._x + 15) - KunDrawPointX[_local3];
YD = Envi.Enemies["Enemy" + _local2]._y - KunDrawPointY[_local3];
if (((XD * XD) + (YD * YD)) < BatWingRad) {
Hit = true;
}
}
if (!Hit) {
XD = (Envi.Enemies["Enemy" + _local2]._x - 15) - (Envi.Kunais["Kunai" + _local3].CenterPoint._x + Envi.Kunais["Kunai" + _local3]._x);
YD = Envi.Enemies["Enemy" + _local2]._y - (Envi.Kunais["Kunai" + _local3].CenterPoint._y + Envi.Kunais["Kunai" + _local3]._y);
if (((XD * XD) + (YD * YD)) < BatWingRad) {
Hit = true;
}
}
if (!Hit) {
XD = (Envi.Enemies["Enemy" + _local2]._x + 15) - (Envi.Kunais["Kunai" + _local3].CenterPoint._x + Envi.Kunais["Kunai" + _local3]._x);
YD = Envi.Enemies["Enemy" + _local2]._y - (Envi.Kunais["Kunai" + _local3].CenterPoint._y + Envi.Kunais["Kunai" + _local3]._y);
if (((XD * XD) + (YD * YD)) < BatWingRad) {
Hit = true;
}
}
}
}
if (Hit) {
BatLoseHP(1, _local2, _local3);
}
}
} else if (EnemyType[_local2] == DogNum) {
XD = Envi.Enemies["Enemy" + _local2]._x - KunDrawPointX[_local3];
YD = Envi.Enemies["Enemy" + _local2]._y - KunDrawPointY[_local3];
if (((XD * XD) + (YD * YD)) < 4900) {
TempDPX = KunDrawPointX[_local3] - Kunrvx[_local3];
TempDPY = KunDrawPointY[_local3] - Kunrvy[_local3];
do {
TempDPX = TempDPX + (Kunrvx[_local3] / 5);
TempDPY = TempDPY + (Kunrvy[_local3] / 5);
if (EDir[_local2] == 1) {
XD = (Envi.Enemies["Enemy" + _local2]._x + 22.2) - TempDPX;
} else if (EDir[_local2] == 0) {
XD = (Envi.Enemies["Enemy" + _local2]._x - 22.2) - TempDPX;
}
YD = (Envi.Enemies["Enemy" + _local2]._y - 9.9) - TempDPY;
if (((XD * XD) + (YD * YD)) < DogHeadRad) {
DogLoseHP(1, _local2, _local3);
break;
}
XD = Envi.Enemies["Enemy" + _local2]._x - TempDPX;
YD = (Envi.Enemies["Enemy" + _local2]._y - 3.3) - TempDPY;
if (((XD * XD) + (YD * YD)) < DogBodyRad) {
DogLoseHP(1, _local2, _local3);
break;
}
if (EDir[_local2] == 1) {
XD = (Envi.Enemies["Enemy" + _local2]._x - 14) - TempDPX;
} else if (EDir[_local2] == 0) {
XD = (Envi.Enemies["Enemy" + _local2]._x + 14) - TempDPX;
}
YD = (Envi.Enemies["Enemy" + _local2]._y - 3.3) - TempDPY;
if (((XD * XD) + (YD * YD)) < DogBodyRad) {
DogLoseHP(1, _local2, _local3);
break;
}
XD = (Envi.Enemies["Enemy" + _local2]._x - 14) - TempDPX;
YD = (Envi.Enemies["Enemy" + _local2]._y + 9) - TempDPY;
if (((XD * XD) + (YD * YD)) < DogBodyRad) {
DogLoseHP(1, _local2, _local3);
break;
}
XD = (Envi.Enemies["Enemy" + _local2]._x + 14) - TempDPX;
YD = (Envi.Enemies["Enemy" + _local2]._y + 9) - TempDPY;
if (((XD * XD) + (YD * YD)) < DogBodyRad) {
DogLoseHP(1, _local2, _local3);
break;
}
} while (Math.abs((TempDPX - KunDrawPointX[_local3]) + (TempDPY - KunDrawPointY[_local3])) > 1);
}
} else if (EnemyType[_local2] == SoldierNum) {
XD = Envi.Kunais["Kunai" + _local3]._x - Envi.Enemies["Enemy" + _local2]._x;
YD = Envi.Kunais["Kunai" + _local3]._y - Envi.Enemies["Enemy" + _local2]._y;
if ((!KunHit[_local3]) && (((XD * XD) + (YD * YD)) < SoRad)) {
Hit = false;
HeadShot = false;
XD = Envi.Kunais["Kunai" + _local3]._x - Envi.Enemies["Enemy" + _local2]._x;
YD = Envi.Kunais["Kunai" + _local3]._y - Envi.Enemies["Enemy" + _local2]._y;
if (((XD * XD) + (YD * YD)) < SoBodyRad) {
Hit = true;
trace("Hit body");
}
if (!Hit) {
XD = Envi.Kunais["Kunai" + _local3]._x - Envi.Enemies["Enemy" + _local2]._x;
YD = Envi.Kunais["Kunai" + _local3]._y - (Envi.Enemies["Enemy" + _local2]._y - SoH);
if (((XD * XD) + (YD * YD)) < SoHeadRad) {
Hit = true;
HeadShot = true;
trace("Hit head");
}
}
if (!Hit) {
YD = Envi.Kunais["Kunai" + _local3]._y - ((Envi.Enemies["Enemy" + _local2]._y + SoH) - 5);
if (((XD * XD) + (YD * YD)) < SoLegRad) {
Hit = true;
trace("Hit legs");
}
}
if (Hit) {
EnemyHP[_local2] = EnemyHP[_local2] - 1;
if (HeadShot) {
EnemyHP[_local2] = EnemyHP[_local2] - 10;
}
if (EnemyHP[_local2] <= 0) {
EnemyDead[_local2] = true;
State[_local2] = "Dead";
ELastShot[_local3] = getTimer();
Envi.Enemies["Enemy" + _local2].Enemy.gotoAndPlay("dead");
}
Envi.Kunais["Kunai" + _local3].removeMovieClip();
break;
}
}
} else if (EnemyType[_local2] == RatNum) {
if (Envi.Kunais["Kunai" + _local3].hitTest(Envi.Enemies["Enemy" + _local2])) {
EnemyHP[_local2] = EnemyHP[_local2] - 1;
if (EnemyHP[_local2] <= 0) {
EnemyDead[_local2] = true;
Envi.Enemies["Enemy" + _local2].Enemy.gotoAndStop("dead");
}
Envi.Kunais["Kunai" + _local3].removeMovieClip();
break;
}
}
}
_local2++;
} while (_local2 < EC);
}
}
_local3++;
} while (_local3 < KunDrawPointX.length);
}
function BatLoseHP(HP, Bat, Kunai) {
EnemyHP[Bat] = EnemyHP[Bat] - 1;
KBatS.start(0, 1);
if (EnemyHP[Bat] <= 0) {
Envi.Enemies["Enemy" + Bat].Enemy.gotoAndStop("fall");
Envi.Enemies["Enemy" + Bat]._rotation = 0;
EnemyDead[Bat] = true;
}
Envi.Kunais["Kunai" + Kunai].removeMovieClip();
}
function DogLoseHP(HP, Dog, Kunai) {
EnemyHP[Dog] = EnemyHP[Dog] - 1;
if (EnemyHP[Dog] <= 0) {
Envi.Enemies["Enemy" + Dog].Enemy.gotoAndStop("dead");
EnemyDead[Dog] = true;
}
Envi.Kunais["Kunai" + Kunai].removeMovieClip();
}
function CheckWallCollisions() {
var _local9 = false;
var _local10 = false;
var _local11 = false;
var _local12 = false;
var _local13 = false;
var _local14 = false;
var _local3 = (Char._x - Envi._x) - 25;
var _local2 = (Char._y - Envi._y) - 25;
CTP = Map[Level][Math.round((_local3 + vx) / TileSize)][Math.round(((_local2 + vy) - CH) / TileSize)];
CTRP = Map[Level][Math.round(((_local3 + vx) + CW) / TileSize)][Math.round(((_local2 - CH) + 1) / TileSize)];
CTLP = Map[Level][Math.round(((_local3 + vx) - CW) / TileSize)][Math.round(((_local2 - CH) + 1) / TileSize)];
CBP = Map[Level][Math.round((_local3 + vx) / TileSize)][Math.round(((_local2 + vy) + CH) / TileSize)];
CBRP = Map[Level][Math.round(((_local3 + vx) + CW) / TileSize)][Math.round(((_local2 + CH) - 1) / TileSize)];
CBLP = Map[Level][Math.round(((_local3 + vx) - CW) / TileSize)][Math.round(((_local2 + CH) - 1) / TileSize)];
CLP = Map[Level][Math.round(((_local3 + vx) - CW) / TileSize)][Math.round(_local2 / TileSize)];
CRP = Map[Level][Math.round(((_local3 + vx) + CW) / TileSize)][Math.round(_local2 / TileSize)];
CTRCP = Map[Level][Math.round(((_local3 + CW) - 10) / TileSize)][Math.round((((_local2 + vy) - CH) + 1) / TileSize)];
CTLCP = Map[Level][Math.round(((_local3 - CW) + 10) / TileSize)][Math.round((((_local2 + vy) - CH) + 1) / TileSize)];
CBLCP = Map[Level][Math.round(((_local3 - CW) + 10) / TileSize)][Math.round(((_local2 + vy) + CH) / TileSize)];
CBRCP = Map[Level][Math.round(((_local3 + CW) - 10) / TileSize)][Math.round(((_local2 + vy) + CH) / TileSize)];
if (((CBP <= WT) && (CBP != undefined)) && (!OnGround)) {
vy = 0;
do {
if (Map[Level][Math.round((_local3 + vx) / TileSize)][Math.round(((_local2 + vy) + CH) / TileSize)] <= WT) {
break;
}
vy++;
} while (true);
WJ = false;
if (!Grappled) {
Grapped = false;
}
OnGround = true;
JustLanded = true;
} else if ((CBP <= WT) && (CBP != undefined)) {
vy = 0;
} else if (((CBLCP <= WT) && (CBLCP != undefined)) && (!OnGround)) {
vy = 0;
OnGround = true;
do {
if (Map[Level][Math.round(((_local3 - CW) + 10) / TileSize)][Math.round(((_local2 + vy) + CH) / TileSize)] <= WT) {
break;
}
vy++;
} while (true);
WJ = false;
if (!Grappled) {
Grapped = false;
}
OnGround = true;
JustLanded = true;
} else if ((CBLCP <= WT) && (CBLCP != undefined)) {
vy = 0;
} else if (((CBRCP <= WT) && (CBRCP != undefined)) && (!OnGround)) {
vy = 0;
OnGround = true;
do {
if (Map[Level][Math.round(((_local3 + CW) - 10) / TileSize)][Math.round(((_local2 + vy) + CH) / TileSize)] <= WT) {
break;
}
vy++;
} while (true);
WJ = false;
if (!Grappled) {
Grapped = false;
}
OnGround = true;
JustLanded = true;
} else if ((CBRCP <= WT) && (CBRCP != undefined)) {
vy = 0;
} else if (OnGround) {
OnGround = false;
}
if ((CBRP <= WT) && (CBRP != undefined)) {
_local14 = true;
if (vx > 0) {
vx = 0;
do {
if (Map[Level][Math.round(((_local3 + CW) + vx) / TileSize)][Math.round(((_local2 + CH) - 1) / TileSize)] <= WT) {
break;
}
vx++;
} while (true);
}
}
if ((CBLP <= WT) && (CBLP != undefined)) {
_local11 = true;
if (vx < 0) {
vx = 0;
do {
if (Map[Level][Math.round(((_local3 - CW) + vx) / TileSize)][Math.round(((_local2 + CH) - 1) / TileSize)] <= WT) {
break;
}
vx--;
} while (true);
}
}
if ((CTP <= WT) && (CTP != undefined)) {
vy = 0;
do {
if (Map[Level][Math.round((_local3 + vx) / TileSize)][Math.round(((_local2 + vy) - CH) / TileSize)] <= WT) {
break;
}
vy--;
} while (true);
vy++;
} else if ((CTRCP <= WT) && (CTRCP != undefined)) {
vy = 0;
do {
if (Map[Level][Math.round(((_local3 + CW) - 10) / TileSize)][Math.round(((_local2 + vy) - CH) / TileSize)] <= WT) {
break;
}
vy--;
} while (true);
vy++;
} else if ((CTLCP <= WT) && (CTLCP != undefined)) {
vy = 0;
do {
if (Map[Level][Math.round(((_local3 - CW) + 10) / TileSize)][Math.round(((_local2 + vy) - CH) / TileSize)] <= WT) {
break;
}
vy--;
} while (true);
vy++;
}
if ((CTLP <= WT) && (CTLP != undefined)) {
_local9 = true;
if (vx < 0) {
vx = 0;
do {
if (Map[Level][Math.round((((_local3 - CW) + vx) + 1) / TileSize)][Math.round(((_local2 - CH) + 1) / TileSize)] <= WT) {
break;
}
vx--;
} while (true);
}
}
if ((CTRP <= WT) && (CTRP != undefined)) {
_local12 = true;
if (vx > 0) {
vx = 0;
do {
if (Map[Level][Math.round((((_local3 + CW) + vx) - 1) / TileSize)][Math.round(((_local2 - CH) + 1) / TileSize)] <= WT) {
break;
}
vx++;
} while (true);
}
}
if ((CRP <= WT) && (CRP != undefined)) {
_local13 = true;
if (vx > 0) {
vx = 0;
do {
if (Map[Level][Math.round(((_local3 + CW) + vx) / TileSize)][Math.round(_local2 / TileSize)] <= WT) {
break;
}
vx++;
} while (true);
}
}
if ((CLP <= WT) && (CLP != undefined)) {
_local10 = true;
if (vx < 0) {
vx = 0;
do {
if (Map[Level][Math.round(((_local3 - CW) + vx) / TileSize)][Math.round(_local2 / TileSize)] <= WT) {
break;
}
vx--;
} while (true);
}
}
if ((!OnGround) && (!Grappled)) {
if ((_local13 && (_local12)) && (_local14)) {
WSC++;
if (WSC >= 6) {
if (!WallSlidingRight) {
}
WallSlidingRight = true;
WallSlidingLeft = false;
Direction = 0;
}
} else if ((_local10 && (_local9)) && (_local11)) {
WSC++;
if (WSC >= 6) {
if (!WallSlidingLeft) {
Changed = true;
}
WallSlidingLeft = true;
WallSlidingRight = false;
Direction = 1;
}
} else {
SlidingNow = false;
WallSlidingLeft = false;
WallSlidingRight = false;
}
} else {
WallSlidingLeft = false;
WallSlidingRight = false;
WSC = 0;
SlidingNow = false;
WSOC = 0;
}
v = 0;
do {
XD = (Envi.Orbs["Orb" + v]._x + 16) - (Char._x - Envi._x);
YD = (Envi.Orbs["Orb" + v]._y + 15) - (Char._y - Envi._y);
if (((XD * XD) + (YD * YD)) < ((CH * 2) * (CH * 2))) {
Hit = false;
XD = (Envi.Orbs["Orb" + v]._x + 16) - (Char._x - Envi._x);
YD = (Envi.Orbs["Orb" + v]._y + 15) - (Char._y - Envi._y);
if (((XD * XD) + (YD * YD)) < (ChBodyRad + CoinRad)) {
Hit = true;
}
if (!Hit) {
XD = (Envi.Orbs["Orb" + v]._x + 16) - (HeadMarker._x - Envi._x);
YD = (Envi.Orbs["Orb" + v]._y + 15) - (HeadMarker._y - Envi._y);
if (((XD * XD) + (YD * YD)) < (ChHeadRad + CoinRad)) {
Hit = true;
}
}
if (!Hit) {
XD = (Envi.Orbs["Orb" + v]._x + 16) - (Char._x - Envi._x);
YD = (Envi.Orbs["Orb" + v]._y + 15) - (((Char._y - Envi._y) + CH) - 10);
if (((XD * XD) + (YD * YD)) < (ChLegRad + CoinRad)) {
Hit = true;
}
}
if (Hit) {
CurrentOrbs++;
CS.start(0, 1);
CColl[v] = true;
OrbsText = (("x " + CurrentOrbs) + "/") + TotalOrbs;
attachMovie("Collectable", "1" + CurrentOrbs, getNextHighestDepth());
mainTimeLine["1" + CurrentOrbs]._x = (Envi.Orbs["Orb" + v]._x + (Envi.Orbs["Orb" + v]._width / 2)) + Envi._x;
mainTimeLine["1" + CurrentOrbs]._y = (Envi.Orbs["Orb" + v]._y + (Envi.Orbs["Orb" + v]._height / 2)) + Envi._y;
var _local5 = new mx.transitions.Tween(mainTimeLine["1" + CurrentOrbs], "_alpha", mx.transitions.easing.Strong.easeOut, 100, 0, 1.5, true);
var _local6 = new mx.transitions.Tween(mainTimeLine["1" + CurrentOrbs], "_y", mx.transitions.easing.Strong.easeOut, mainTimeLine["1" + CurrentOrbs]._y, 20, 1.5, true);
var _local7 = new mx.transitions.Tween(mainTimeLine["1" + CurrentOrbs], "_xscale", mx.transitions.easing.Strong.easeOut, 100, 80, 1.5, true);
var _local8 = new mx.transitions.Tween(mainTimeLine["1" + CurrentOrbs], "_x", mx.transitions.easing.Strong.easeOut, mainTimeLine["1" + CurrentOrbs]._x, 290, 1.5, true);
var _local4 = new mx.transitions.Tween(mainTimeLine["1" + CurrentOrbs], "_yscale", mx.transitions.easing.Strong.easeOut, 100, 80, 1.5, true);
_local4.onMotionFinished = function () {
this.obj.removeMovieClip();
};
if (CurrentOrbs == TotalOrbs) {
elapsed_time = getTimer() - start_time;
Stats.TimerT.text = time_to_string(elapsed_time);
if (elapsed_time < mainTimeLine.BestTime[Level]) {
BestTime[Level] = elapsed_time;
BestTimeT[Level] = time_to_string(BestTime[Level]);
}
TotalTimeT = Stats.TimerT.text;
TotalTime = elapsed_time;
CleanUp("Win");
}
Envi.Orbs["Orb" + v].removeMovieClip();
}
}
} while ((++v) < mainTimeLine[("ColLoc" + Level) + "X"].length);
}
function MoveCharacter() {
if (OnGround) {
if (Direction == 1) {
if ((!RopeOut) && (vx != 0)) {
HeadMarker._x = Char._x + CHW;
} else {
HeadMarker._x = Char._x;
}
} else if (Direction == 0) {
if ((!RopeOut) && (vx != 0)) {
HeadMarker._x = Char._x - CHW;
} else {
HeadMarker._x = Char._x;
}
}
}
if (!OnGround) {
if (Direction == 1) {
if (RopeOut) {
HeadMarker._x = Char._x;
}
if (!RopeOut) {
HeadMarker._x = Char._x + CHW;
}
} else if (Direction == 0) {
if (RopeOut) {
HeadMarker._x = Char._x;
} else if (!RopeOut) {
HeadMarker._x = Char._x - CHW;
}
}
}
HeadMarker._y = (Char._y - CH) + 4;
BodyMarker._x = Char._x;
BodyMarker._y = Char._y;
LegMarker._x = Char._x;
LegMarker._y = (Char._y + CH) - 10;
var _local3 = vx;
var _local2 = vy;
var _local1 = 0;
Envi._x = Envi._x - _local3;
Envi._y = Envi._y - _local2;
DrawPointX = DrawPointX - _local3;
DrawPointY = DrawPointY - _local2;
_local1 = 0;
do {
if (!CColl[_local1]) {
Inny = false;
XD = CCX[_local1] + Envi._x;
YD = CCY[_local1] + Envi._y;
if (XD < 570) {
if (XD > -30) {
if (YD < 470) {
if (YD > -30) {
Inny = true;
if (!CoinExists[_local1]) {
Envi.Orbs.createEmptyMovieClip("Orb" + _local1, _local1);
Envi.Orbs["Orb" + _local1].attachBitmap(CoinBitty, 1);
Envi.Orbs["Orb" + _local1]._x = CCX[_local1];
Envi.Orbs["Orb" + _local1]._y = CCY[_local1];
CoinExists[_local1] = true;
}
}
}
}
}
if (CoinExists[_local1] && (!Inny)) {
Envi.Orbs["Orb" + _local1].removeMovieClip();
CoinExists[_local1] = false;
}
}
_local1++;
} while (_local1 < mainTimeLine[("ColLoc" + Level) + "X"].length);
b = 0;
do {
_local1 = AccNumber[b];
Inny = false;
XD = CAX[_local1] + Envi._x;
YD = CAY[_local1] + Envi._y;
if (XD < 555) {
if (XD > -155) {
if (YD < 455) {
if (YD > -250) {
Inny = true;
if (!AccExists[_local1]) {
AccExists[_local1] = true;
if (mainTimeLine["AccType" + Level][_local1] != TorchNum) {
Envi.Accs.createEmptyMovieClip(["AccH" + _local1], Envi.Accs.getNextHighestDepth());
Envi.Accs["AccH" + _local1].attachBitmap(mainTimeLine["TileBitmap" + mainTimeLine["AccType" + Level][_local1]], Envi.Accs["AccH" + _local1].getNextHighestDepth());
} else {
Envi.Accs.createEmptyMovieClip(["AccH" + _local1], Envi.Accs.getNextHighestDepth());
Envi.Accs["AccH" + _local1].attachMovie("TorchMC", "Torch", Envi.Accs["AccH" + _local1].getNextHighestDepth());
Rand = Math.round((Math.random() * 18) + 1);
Envi.Accs["AccH" + _local1].Torch.gotoAndPlay(Rand);
}
Envi.Accs["AccH" + _local1]._x = CAX[_local1];
Envi.Accs["AccH" + _local1]._y = CAY[_local1];
}
}
}
}
}
if (AccExists[_local1] && (!Inny)) {
AccExists[_local1] = false;
Envi.Accs["AccH" + _local1].removeMovieClip();
}
} while ((++b) < AccNumber.length);
b = 0;
do {
Inny = false;
TEC = SpikeNum[b];
XD = CSX[b] + Envi._x;
YD = CSY[b] + Envi._y;
if (XD > -30) {
if (XD < 580) {
if (YD > -30) {
if (YD < 480) {
Inny = true;
if (!SpikeExists[b]) {
SpikeExists[b] = true;
trace("TEC:: " + TEC);
Envi.Enemies.createEmptyMovieClip("Enemy" + TEC, TEC);
Envi.Enemies["Enemy" + TEC].attachMovie("Enemy" + SpikeUNum, "Enemy", 1);
Envi.Enemies["Enemy" + TEC]._x = CSX[b];
Envi.Enemies["Enemy" + TEC]._y = CSY[b];
trace("Y: " + Envi.Enemies["Enemy" + TEC]._y);
trace("X: " + Envi.Enemies["Enemy" + TEC]._x);
if (EnemyType[TEC] != SpikeUNum) {
if (EnemyType[TEC] == SpikeDNum) {
Envi.Enemies["Enemy" + TEC]._rotation = Envi.Enemies["Enemy" + TEC]._rotation + 180;
} else if (EnemyType[TEC] == SpikeRNum) {
Envi.Enemies["Enemy" + TEC]._rotation = Envi.Enemies["Enemy" + TEC]._rotation - 90;
} else if (EnemyType[TEC] == SpikeLNum) {
Envi.Enemies["Enemy" + TEC]._rotation = Envi.Enemies["Enemy" + TEC]._rotation + 90;
}
}
}
}
}
}
}
if (SpikeExists[b] && (!Inny)) {
trace("Deleted");
SpikeExists[b] = false;
Envi.Enemies["Enemy" + TEC].removeMovieClip();
}
} while ((++b) < SpikeNum.length);
if (CXT != Math.round(((-Envi._x) - 25) / TileSize)) {
TYT = Math.round(((-Envi._y) - 25) / TileSize);
if (Math.round(((-Envi._x) - 25) / TileSize) > CXT) {
CXT = Math.round(((-Envi._x) - 25) / TileSize);
MoveTile(CXT, TYT, 0, 1);
} else if (Math.round(((-Envi._x) - 25) / TileSize) < CXT) {
CXT = Math.round(((-Envi._x) - 25) / TileSize);
MoveTile(CXT, TYT, 0, 0);
}
}
if (CYT != Math.round(((-Envi._y) - 25) / TileSize)) {
if (Math.round(((-Envi._y) - 25) / TileSize) > CYT) {
CYT = Math.round(((-Envi._y) - 25) / TileSize);
MoveTile(CXT, CYT, 1, 1);
} else if (Math.round(((-Envi._y) - 25) / TileSize) < CYT) {
CYT = Math.round(((-Envi._y) - 25) / TileSize);
MoveTile(CXT, CYT, 1, 0);
}
}
}
function MoveTile(XT, YT, Y, GOR) {
if (!Y) {
Higher = undefined;
TileAtZero = XT - SXT;
if (TileAtZero != OldTAZX) {
if ((((TileAtZero - OldTAZX) > 1) && (TileAtZero != 16)) && (OldTAZX != 0)) {
Higher = true;
trace(((("TileAtZero: " + TileAtZero) + ". OldTAZX: ") + OldTAZX) + ". True");
} else if ((((TileAtZero - OldTAZX) < -1) && (TileAtZero != 2)) && (OldTAZX != 18)) {
trace(((("TileAtZero: " + TileAtZero) + ". OldTAZX: ") + OldTAZX) + ". False");
Higher = false;
}
OldTAZX = TileAtZero;
if (TileAtZero > 16) {
do {
TileAtZero = TileAtZero - 17;
} while (TileAtZero > 16);
} else if (TileAtZero < 0) {
do {
TileAtZero = TileAtZero + 17;
} while (TileAtZero < 0);
}
if (GOR) {
TileAtZero--;
if (TileAtZero == -1) {
TileAtZero = 16;
}
XT = XT + 14;
v = 0;
do {
Name = TileAtZero + (v * 17);
Envi.Wall["MapPiece" + Name]._x = Envi.Wall["MapPiece" + Name]._x + 850;
TileFromEnvi = (Math.round(((Envi._y + Envi.Wall["MapPiece" + Name]._y) - 25) / TileSize) - 1) + YT;
Val = Map[Level][XT][YConst + TileFromEnvi];
if (Val != undefined) {
MapPieces[Name].copyPixels(mainTimeLine["TileBitmap" + Val], new flash.geom.Rectangle(0, 0, 50, 50), new flash.geom.Point(0, 0));
} else {
RandomNum = Math.round(Math.random() * 3) + 1;
MapPieces[Name].copyPixels(mainTimeLine["TileBitmap100" + RandomNum], new flash.geom.Rectangle(0, 0, 50, 50), new flash.geom.Point(0, 0));
}
} while ((++v) <= 14);
} else if (!GOR) {
XT = XT - 2;
v = 0;
do {
Name = TileAtZero + (v * 17);
Envi.Wall["MapPiece" + Name]._x = Envi.Wall["MapPiece" + Name]._x - 850;
TileFromEnvi = (Math.round(((Envi._y + Envi.Wall["MapPiece" + Name]._y) - 25) / TileSize) - 1) + YT;
Val = Map[Level][XT][YConst + TileFromEnvi];
if (Val != undefined) {
MapPieces[Name].copyPixels(mainTimeLine["TileBitmap" + Val], new flash.geom.Rectangle(0, 0, 50, 50), new flash.geom.Point(0, 0));
} else {
RandomNum = Math.round(Math.random() * 3) + 1;
MapPieces[Name].copyPixels(mainTimeLine["TileBitmap100" + RandomNum], new flash.geom.Rectangle(0, 0, 50, 50), new flash.geom.Point(0, 0));
}
} while ((++v) <= 14);
}
}
} else if (Y) {
Higher = undefined;
c = 1;
TileAtZero = YT - SYT;
if (TileAtZero != OldTAZY) {
if ((TileAtZero - OldTAZY) > 1) {
if ((TileAtZero == 14) && (OldTAZY == 0)) {
} else {
Higher = true;
OTAZY = TileAtZero;
OYT = YT;
trace(((("TileAtZero: " + TileAtZero) + ". OldTAZY: ") + OldTAZY) + ". True");
}
} else if ((TileAtZero - OldTAZY) < -1) {
if ((TileAtZero == 2) && (OldTAZY == 16)) {
} else {
OTAZY = TileAtZero;
OYT = YT;
trace(((("TileAtZero: " + TileAtZero) + ". OldTAZY: ") + OldTAZY) + ". False");
Higher = false;
}
}
Temp = TileAtZero;
do {
if (TileAtZero > 14) {
do {
TileAtZero = TileAtZero - 15;
} while (TileAtZero > 14);
} else if (TileAtZero < 0) {
do {
TileAtZero = TileAtZero + 15;
} while (TileAtZero < 0);
}
if (GOR) {
TileAtZero--;
if (TileAtZero == -1) {
TileAtZero = 14;
}
YT = YT + 12;
v = 0;
do {
Name = v + (TileAtZero * 17);
Envi.Wall["MapPiece" + Name]._y = Envi.Wall["MapPiece" + Name]._y + 750;
TileFromEnvi = (Math.round(((Envi._x + Envi.Wall["MapPiece" + Name]._x) - 25) / TileSize) - 1) + XT;
Val = Map[Level][XConst + TileFromEnvi][YT];
if (Val != undefined) {
MapPieces[Name].copyPixels(mainTimeLine["TileBitmap" + Val], new flash.geom.Rectangle(0, 0, 50, 50), new flash.geom.Point(0, 0));
} else {
RandomNum = Math.round(Math.random() * 3) + 1;
MapPieces[Name].copyPixels(mainTimeLine["TileBitmap100" + RandomNum], new flash.geom.Rectangle(0, 0, 50, 50), new flash.geom.Point(0, 0));
}
} while ((++v) <= 16);
} else if (!GOR) {
YT = YT - 2;
v = 0;
do {
Name = v + (TileAtZero * 17);
Envi.Wall["MapPiece" + Name]._y = Envi.Wall["MapPiece" + Name]._y - 750;
TileFromEnvi = (Math.round(((Envi._x + Envi.Wall["MapPiece" + Name]._x) - 25) / TileSize) - 1) + XT;
Val = Map[Level][XConst + TileFromEnvi][YT];
if (Val != undefined) {
MapPieces[Name].copyPixels(mainTimeLine["TileBitmap" + Val], new flash.geom.Rectangle(0, 0, 50, 50), new flash.geom.Point(0, 0));
} else {
RandomNum = Math.round(Math.random() * 3) + 1;
MapPieces[Name].copyPixels(mainTimeLine["TileBitmap100" + RandomNum], new flash.geom.Rectangle(0, 0, 50, 50), new flash.geom.Point(0, 0));
}
} while ((++v) <= 16);
}
if (Higher) {
TileAtZero = OTAZY - c;
YT = OYT - c;
} else if (!Higher) {
TileAtZero = OTAZY + c;
YT = OYT + c;
}
if (Higher != undefined) {
trace((("BEFORE LOOPING TileAtZero: " + TileAtZero) + ". YT: ") + YT);
}
c++;
} while (Math.abs(TileAtZero - OldTAZY) < 1);
OldTAZY = Temp;
}
}
}
function MoveRope() {
ThrRopS.start(0, 1);
var _local1 = XPoint - Char._x;
var _local2 = YPoint - Char._y;
var _local3 = Math.sqrt((_local1 * _local1) + (_local2 * _local2));
rvx = (_local1 * RPower) / _local3;
rvy = (_local2 * RPower) / _local3;
}
function DrawRope() {
var _local2 = DrawPointX;
var _local1 = DrawPointY;
if (!Grappled) {
_local2 = _local2 + (rvx * Dir);
_local1 = _local1 + ((rvy * Dir) + RopeGrav);
RopeDistance = ((Char._x - _local2) * (Char._x - _local2)) + ((Char._y - _local1) * (Char._y - _local1));
if (RopeDistance > MaxLen) {
Dir = NegDir;
RopeGrav = RopeGravity;
}
}
Line.clear();
Line.lineStyle(2, 6697728, 100);
if (Direction) {
Line.moveTo(-8.3 + Char._x, -10.2 + Char._y);
} else {
Line.moveTo(8.3 + Char._x, -10.2 + Char._y);
}
Line.lineTo(_local2, _local1);
Grap._x = _local2;
Grap._y = _local1;
Char.NinjaArm._rotation = Math.atan2(Char._y - _local1, Char._x - _local2) * 57.2957795130823;
Char.NinjaArm2._rotation = Char.NinjaArm._rotation;
DrawPointX = _local2;
DrawPointY = _local1;
}
function GetRopeForces() {
var _local1 = DrawPointX - Char._x;
var _local2 = DrawPointY - Char._y;
XForce = S * _local1;
YForce = S * (_local2 - NormLen);
if (YForce > 1.5) {
YForce = 1.5;
} else if (YForce < -1.5) {
YForce = -1.5;
}
if (XForce > 2) {
XForce = 2;
} else if (XForce < -2) {
XForce = -2;
}
vy = vy + YForce;
vx = vx + XForce;
}
function SetAimer() {
var _local1 = (AimAngle / 180) * Math.PI;
Aimer._x = Char._x + (Math.cos(_local1) * AimerRad);
Aimer._y = Char._y - (Math.sin(_local1) * AimerRad);
}
function CleanUp(GOTO) {
if (GOTO != "Win") {
CleanUpFunc(GOTO);
} else {
Pause = true;
TimeShow = true;
t = 0;
while (t < EC) {
Envi.Enemies["Enemy" + t].Enemy.stop();
t++;
}
var _local2 = new mx.transitions.Tween(Stats.TimerT, "_y", mx.transitions.easing.Strong.easeOut, Stats.TimerT._y, 150, 1.5, true);
var _local5 = new mx.transitions.Tween(Stats.TimerT, "_xscale", mx.transitions.easing.Strong.easeOut, 100, 500, 1.5, true);
var _local3 = new mx.transitions.Tween(Stats.TimerT, "_x", mx.transitions.easing.Strong.easeOut, Stats.TimerT._x, 100, 1.5, true);
var _local4 = new mx.transitions.Tween(Stats.TimerT, "_yscale", mx.transitions.easing.Strong.easeOut, 100, 500, 1.5, true);
var _local1 = new mx.transitions.Tween(States.TimerT, "_height", mx.transitions.easing.Strong.easeOut, Stats.TimerT._height, Stats.TimerT._height, 3, true);
_local1.onMotionFinished = function () {
CleanUpFunc(GOTO);
};
}
}
function CleanUpFunc(GOTO) {
if (GOTO != "QS") {
clearInterval(FadeInt);
FadeInt = setInterval(FadeOutSound, 20);
TV = VolBG;
}
v = 0;
while (v <= TotalOrbs) {
mainTimeLine["1" + v].removeMovieClip();
v++;
}
t = KIS;
while (t < KunDrawPointX.length) {
Envi.Kunais["Kunai" + t].removeMovieClip();
t++;
}
v = 0;
while (v < mainTimeLine[("ColLoc" + mainTimeLine.Level) + "X"].length) {
Envi.Orbs["Orb" + v].removeMovieClip();
v++;
}
v = 0;
while (v < mainTimeLine[("AccLoc" + mainTimeLine.Level) + "X"].length) {
Envi.Accs["AccH" + v].removeMovieClip();
v++;
}
v = 0;
while (v < EC) {
Envi.Enemies["Enemy" + v].removeMovieClip();
v++;
}
i = 0;
while (i <= 255) {
MapPieces[i] = new flash.display.BitmapData(TileSize, TileSize, false, 0);
i++;
}
Pause = false;
Key.removeListener(keyListener);
delete onMouseUp;
delete onMouseDown;
delete onMouseMove;
Envi.removeMovieClip();
Line.removeMovieClip();
Char.removeMovieClip();
Grap.removeMovieClip();
Aimer.removeMovieClip();
Stats.removeMovieClip();
Mouse.show();
gotoAndStop(GOTO);
}
function time_to_string(time_to_convert) {
var _local3 = Math.floor(time_to_convert / 3600000);
var _local1 = time_to_convert - (_local3 * 3600000);
var _local4 = Math.floor(_local1 / 60000);
_local1 = _local1 - (_local4 * 60000);
var _local2 = Math.floor(_local1 / 1000);
_local1 = _local1 - (_local2 * 1000);
var _local5 = Math.floor(_local1 / 10);
var _local10 = ((_local3 < 10) ? ("0" + _local3.toString()) : (_local3.toString()));
var _local8 = ((_local4 < 10) ? ("0" + _local4.toString()) : (_local4.toString()));
var _local6 = ((_local2 < 10) ? ("0" + _local2.toString()) : (_local2.toString()));
var _local7 = ((_local5 < 10) ? ("0" + _local5.toString()) : ((hundredths = _local5.toString())));
return((((_local8 + ":") + _local6) + ".") + _local7);
}
function GetEnglish(keyCode) {
if (keyCode == 8) {
return("BackSpace");
}
if (keyCode == 19) {
return("Pause/Break");
}
if (keyCode == 145) {
return("ScrollLock");
}
if (keyCode == 144) {
return("NumLock");
}
if (keyCode == 46) {
return("Delete");
}
if (keyCode == 45) {
return("Insert");
}
if (keyCode == 40) {
return("Down");
}
if (keyCode == 39) {
return("Right");
}
if (keyCode == 38) {
return("Up");
}
if (keyCode == 37) {
return("Left");
}
if (keyCode == 9) {
return("Tab");
}
if (keyCode == 13) {
return("Enter");
}
if (keyCode == 16) {
return("Shift");
}
if (keyCode == 17) {
return("Ctrl");
}
if (keyCode == 20) {
return("Caps Lock");
}
if (keyCode == 27) {
return("Esc");
}
if (keyCode == 32) {
return("Space");
}
if (keyCode == 33) {
return("Page Up");
}
if (keyCode == 34) {
return("Page Down");
}
if (keyCode == 35) {
return("End");
}
if (keyCode == 36) {
return("Home");
}
return(chr(keyCode));
}
Mouse.hide();
TVMax = Math.abs(VolBG);
trace("BNG: " + VolBG);
trace(LS);
MS.stop();
LS.stop();
LS.start(0, 9999);
TV = 0;
clearInterval(FadeInt);
FadeInt = setInterval(FadeS, 20);
var Dead = false;
var Pause = false;
var v = 0;
var keydown = Key.isDown;
var HeadShot = false;
createEmptyMovieClip("Envi", mainTimeLine.getNextHighestDepth());
Envi.createEmptyMovieClip("Wall", Envi.getNextHighestDepth());
Envi.createEmptyMovieClip("Accs", Envi.getNextHighestDepth());
Envi.createEmptyMovieClip("Enemies", Envi.getNextHighestDepth());
Envi.createEmptyMovieClip("Kunais", Envi.getNextHighestDepth());
Envi.createEmptyMovieClip("Orbs", Envi.getNextHighestDepth());
var q = 0;
var CharTileX = Math.round(((CharStartXA[Level] - EnviStartXA[Level]) - 25) / TileSize);
var CharTileY = Math.round(((CharStartYA[Level] - EnviStartYA[Level]) - 25) / TileSize);
var CharRTileX = Math.round(CharStartXA[Level] / TileSize);
var CharRTileY = Math.round(CharStartYA[Level] / TileSize);
var x = ((CharTileX - CharRTileX) - 2);
var XStart = ((CharTileX - CharRTileX) - 2);
var XStop = (XStart + TIX);
var y = ((CharTileY - CharRTileY) - 2);
var YStart = ((CharTileY - CharRTileY) - 2);
var YStop = (YStart + TIY);
var Q = 0;
var W = 0;
do {
W = 0;
do {
if (((Map[Level][Q][W] == undefined) || (Map[Level][Q][W] == "!")) || (Map[Level][Q][W] == 0)) {
RandomNum = Math.round(Math.random() * 3) + 1;
Map[Level][Q][W] = 1000 + RandomNum;
}
} while ((++W) < Map[Level][Q].length);
} while ((++Q) < Map[Level].length);
q = 0;
do {
y = YStart;
do {
CreateTile(Map[Level][x][y], x, y, x - XStart, y - YStart);
} while ((++y) <= YStop);
} while ((++x) <= XStop);
var CharStartY = CharStartYA[Level];
var CharStartX = CharStartXA[Level];
stop();
createEmptyMovieClip("Line", getNextHighestDepth());
attachMovie("Char", "Char", getNextHighestDepth());
attachMovie("Kunai2", "Grap", getNextHighestDepth());
attachMovie("Target", "Aimer", getNextHighestDepth());
var CoinExists = new Array(mainTimeLine[("ColLoc" + Level) + "X"].length);
var CCX = new Array(mainTimeLine[("ColLoc" + Level) + "X"].length);
var CCY = new Array(mainTimeLine[("ColLoc" + Level) + "X"].length);
var CColl = new Array(mainTimeLine[("ColLoc" + Level) + "X"].length);
CoinBitty = new flash.display.BitmapData(32, 30, true, 0);
CoinBitty.copyPixels(mainTimeLine.CoinBit, new flash.geom.Rectangle(0, 0, 32, 30), new flash.geom.Point(0, 0));
v = 0;
do {
CoinExists[v] = false;
CColl[v] = false;
CCX[v] = (mainTimeLine[("ColLoc" + Level) + "X"][v] - EnviStartXA[Level]) - 17;
CCY[v] = (mainTimeLine[("ColLoc" + Level) + "Y"][v] - EnviStartYA[Level]) - 17.5;
XD = CCX[v] + EnviStartXA[Level];
YD = (CCY[v] + EnviStartYA[Level]) + 5;
if (XD < 570) {
if (XD > -20) {
if (YD < 470) {
if (YD > -20) {
Envi.Orbs.createEmptyMovieClip("Orb" + v, v);
Envi.Orbs["Orb" + v].attachBitmap(CoinBitty, 1);
Envi.Orbs["Orb" + v]._x = CCX[v];
Envi.Orbs["Orb" + v]._y = CCY[v];
CoinExists[v] = true;
}
}
}
}
} while ((++v) < mainTimeLine[("ColLoc" + Level) + "X"].length);
var EnemyType = new Array();
var EDir = new Array();
var EC = 0;
var EnemyHP = new Array();
var EnemyDead = new Array();
var ChasingChar = new Array();
var RetreatingChar = new Array();
var BatPointX = new Array();
var BatPointY = new Array();
var Batrvx = new Array();
var Batrvy = new Array();
var BatPower = 3;
var State = new Array();
var Landed = new Array();
var Hit = false;
var CharHit = false;
var Inny = false;
var AccNumber = new Array(mainTimeLine[("AccLoc" + Level) + "X"].length);
var AccExists = new Array(mainTimeLine[("AccLoc" + Level) + "X"].length);
var CAX = new Array(mainTimeLine[("AccLoc" + Level) + "X"].length);
var CAY = new Array(mainTimeLine[("AccLoc" + Level) + "X"].length);
var SC = 0;
var SpikeExists = new Array();
var CSX = new Array();
var CSY = new Array();
var SpikeNum = new Array();
var AccCounter = 0;
v = 0;
do {
if (mainTimeLine["AccType" + Level][v] < ES) {
AccNumber[AccCounter] = v;
AccCounter++;
AccExists[v] = false;
CAX[v] = mainTimeLine[("AccLoc" + Level) + "X"][v] - EnviStartXA[Level];
CAY[v] = mainTimeLine[("AccLoc" + Level) + "Y"][v] - EnviStartYA[Level];
XD = CAX[v] + EnviStartXA[Level];
YD = (CAY[v] + EnviStartYA[Level]) + 5;
if (XD < 555) {
if (XD > -155) {
if (YD < 455) {
if (YD > -250) {
AccExists[v] = true;
if (mainTimeLine["AccType" + Level][v] != TorchNum) {
Envi.Accs.createEmptyMovieClip(["AccH" + v], Envi.Accs.getNextHighestDepth());
Envi.Accs["AccH" + v].attachBitmap(mainTimeLine["TileBitmap" + mainTimeLine["AccType" + Level][v]], Envi.Accs["AccH" + v].getNextHighestDepth());
} else {
Envi.Accs.createEmptyMovieClip(["AccH" + v], Envi.Accs.getNextHighestDepth());
Envi.Accs["AccH" + v].attachMovie("TorchMC", "Torch", Envi.Accs["AccH" + v].getNextHighestDepth());
Rand = Math.round((Math.random() * 18) + 1);
Envi.Accs["AccH" + v].Torch.gotoAndPlay(Rand);
}
Envi.Accs["AccH" + v]._x = CAX[v];
Envi.Accs["AccH" + v]._y = CAY[v];
}
}
}
}
} else {
EnemyType[EC] = mainTimeLine["AccType" + Level][v];
if ((((mainTimeLine["AccType" + Level][v] == SpikeUNum) || (mainTimeLine["AccType" + Level][v] == SpikeDNum)) || (mainTimeLine["AccType" + Level][v] == SpikeLNum)) || (mainTimeLine["AccType" + Level][v] == SpikeRNum)) {
SpikeNum[SC] = EC;
SpikeExists[SC] = false;
CSX[SC] = mainTimeLine[("AccLoc" + Level) + "X"][v] - EnviStartXA[Level];
CSY[SC] = mainTimeLine[("AccLoc" + Level) + "Y"][v] - EnviStartYA[Level];
XD = CSX[SC] + EnviStartXA[Level];
YD = (CSY[SC] + EnviStartYA[Level]) + 5;
if (XD > -30) {
if (XD < 580) {
if (YD > -30) {
if (YD < 480) {
trace("EC: " + EC);
trace("Y : " + CSY[SC]);
trace("X: " + CSX[SC]);
SpikeExists[SC] = true;
Envi.Enemies.createEmptyMovieClip("Enemy" + EC, EC);
Envi.Enemies["Enemy" + EC].attachMovie("Enemy" + SpikeUNum, "Enemy", 1);
Envi.Enemies["Enemy" + EC]._x = CSX[SC];
Envi.Enemies["Enemy" + EC]._y = CSY[SC];
if (EnemyType[EC] != SpikeUNum) {
if (EnemyType[EC] == SpikeDNum) {
Envi.Enemies["Enemy" + EC]._rotation = Envi.Enemies["Enemy" + EC]._rotation + 180;
} else if (EnemyType[EC] == SpikeRNum) {
Envi.Enemies["Enemy" + EC]._rotation = Envi.Enemies["Enemy" + EC]._rotation - 90;
} else if (EnemyType[EC] == SpikeLNum) {
Envi.Enemies["Enemy" + EC]._rotation = Envi.Enemies["Enemy" + EC]._rotation + 90;
}
}
}
}
}
}
SC++;
} else {
Envi.Enemies.createEmptyMovieClip("Enemy" + EC, EC);
Envi.Enemies["Enemy" + EC].attachMovie("Enemy" + mainTimeLine["AccType" + Level][v], "Enemy", 1);
Envi.Enemies["Enemy" + EC]._x = mainTimeLine[("AccLoc" + Level) + "X"][v] - EnviStartXA[Level];
Envi.Enemies["Enemy" + EC]._y = mainTimeLine[("AccLoc" + Level) + "Y"][v] - EnviStartYA[Level];
}
if ((mainTimeLine["AccType" + Level][v] == DogNum) || (mainTimeLine["AccType" + Level][v] == RatNum)) {
EDir[EC] = Math.round(Math.random());
State[EC] = "Falling";
Landed[EC] = false;
if (mainTimeLine["AccType" + Level][v] == DogNum) {
EnemyHP[EC] = 2;
} else {
EnemyHP[EC] = 1;
}
Envi.Enemies["Enemy" + EC]._xscale = 100 - (200 * EDir[EC]);
Envi.Enemies["Enemy" + EC].Enemy.gotoAndStop("FallThing");
} else if (mainTimeLine["AccType" + Level][v] == BatNum) {
BatPointX[EC] = Envi.Enemies["Enemy" + EC]._x + ((Math.random() * 200) - 100);
BatPointY[EC] = Envi.Enemies["Enemy" + EC]._y + ((Math.random() * 200) - 100);
BatXNum = BatPointX[EC] - Envi.Enemies["Enemy" + EC]._x;
BatYNum = BatPointY[EC] - Envi.Enemies["Enemy" + EC]._y;
BatDenom = Math.sqrt((BatXNum * BatXNum) + (BatYNum * BatYNum));
Batrvx[EC] = (BatXNum * BatPower) / BatDenom;
Batrvy[EC] = (BatYNum * BatPower) / BatDenom;
EnemyHP[EC] = 1;
} else if (mainTimeLine["AccType" + Level][v] == SoldierNum) {
EDir[EC] = Math.round(Math.random());
State[EC] = "Falling";
Landed[EC] = false;
EnemyHP[EC] = 3;
Envi.Enemies["Enemy" + EC]._xscale = 100 - (200 * EDir[EC]);
} else if (mainTimeLine["AccType" + Level][v] == ArcherNum) {
EDir[EC] = Math.round(Math.random());
State[EC] = "Falling";
Landed[EC] = false;
EnemyHP[EC] = 3;
Envi.Enemies["Enemy" + EC]._xscale = 100 - (200 * EDir[EC]);
} else {
EDir[EC] = Math.round(Math.random());
EnemyHP[EC] = 3;
}
EC++;
}
} while ((++v) < mainTimeLine[("AccLoc" + Level) + "X"].length);
if (Level == 1) {
trace("In WEVEE");
Depthy = mainTimeLine[("ColLoc" + Level) + "X"].length + 1;
v++;
Envi.Orbs.createEmptyMovieClip(["AccH" + v], Depthy);
Envi.Orbs["AccH" + v].attachMovie("FirstSpeech", "FS", Envi.Orbs["AccH" + v].getNextHighestDepth());
Envi.Orbs["AccH" + v]._x = 3200;
Envi.Orbs["AccH" + v]._y = 575;
Envi.Orbs["AccH" + v].FS.FirstSpeechT.htmlText = ((("Move left with " + GetEnglish(keys.Left)) + "<br>Move right with ") + GetEnglish(keys.Right)) + ".";
v++;
Envi.Orbs.createEmptyMovieClip(["AccH" + v], Envi.Orbs.getNextHighestDepth());
Envi.Orbs["AccH" + v].attachMovie("FirstSpeech", "FS", Envi.Orbs["AccH" + v].getNextHighestDepth());
Envi.Orbs["AccH" + v]._x = 3420;
Envi.Orbs["AccH" + v]._y = 650;
Envi.Orbs["AccH" + v].FS.FirstSpeechT.htmlText = "You must collect all<br> coins to complete a level.";
v++;
Envi.Orbs.createEmptyMovieClip(["AccH" + v], Envi.Orbs.getNextHighestDepth());
Envi.Orbs["AccH" + v].attachMovie("FirstSpeech", "FS", Envi.Orbs["AccH" + v].getNextHighestDepth());
Envi.Orbs["AccH" + v]._x = 3350;
Envi.Orbs["AccH" + v]._y = 950;
Envi.Orbs["AccH" + v].FS.FirstSpeechT.htmlText = ("Press " + GetEnglish(keys.Kunai)) + " to throw a lightning fast Kunai to obliterate your enemies!";
v++;
Envi.Orbs.createEmptyMovieClip(["AccH" + v], Envi.Orbs.getNextHighestDepth());
Envi.Orbs["AccH" + v].attachMovie("FirstSpeech", "FS", Envi.Orbs["AccH" + v].getNextHighestDepth());
Envi.Orbs["AccH" + v]._x = 1800;
Envi.Orbs["AccH" + v]._y = 950;
Envi.Orbs["AccH" + v].FS.FirstSpeechT.htmlText = "Press and hold the left mouse<br> button to fire your rope!";
v++;
Envi.Orbs.createEmptyMovieClip(["AccH" + v], Envi.Orbs.getNextHighestDepth());
Envi.Orbs["AccH" + v].attachMovie("FirstSpeech", "FS", Envi.Orbs["AccH" + v].getNextHighestDepth());
Envi.Orbs["AccH" + v]._x = 350;
Envi.Orbs["AccH" + v]._y = 250;
Envi.Orbs["AccH" + v].FS.FirstSpeechT.htmlText = "You don't always have to collect the coin with your body. <br>Try shooting it!";
v++;
Envi.Orbs.createEmptyMovieClip(["AccH" + v], Envi.Orbs.getNextHighestDepth());
Envi.Orbs["AccH" + v].attachMovie("FirstSpeech", "FS", Envi.Orbs["AccH" + v].getNextHighestDepth());
Envi.Orbs["AccH" + v]._x = 860;
Envi.Orbs["AccH" + v]._y = 975;
Envi.Orbs["AccH" + v].FS.FirstSpeechT.htmlText = ((("Press the " + GetEnglish(keys.Jump)) + " key to jump. <br>Hold against a wall to begin wall sliding. Push the ") + GetEnglish(keys.Jump)) + " key to jump off!";
} else if (Level == 2) {
trace("In WEVE6");
Depthy = mainTimeLine[("ColLoc" + Level) + "X"].length + 1;
v++;
Envi.Orbs.createEmptyMovieClip(["AccH" + v], Depthy);
Envi.Orbs["AccH" + v].attachMovie("FirstSpeech", "FS", Envi.Orbs["AccH" + v].getNextHighestDepth());
Envi.Orbs["AccH" + v]._x = 875;
Envi.Orbs["AccH" + v]._y = 3450;
Envi.Orbs["AccH" + v].FS.FirstSpeechT.htmlText = ("Move against the <br> wall and hold " + GetEnglish(keys.Jump)) + "!";
v++;
Envi.Orbs.createEmptyMovieClip(["AccH" + v], Envi.Orbs.getNextHighestDepth());
Envi.Orbs["AccH" + v].attachMovie("FirstSpeech", "FS", Envi.Orbs["AccH" + v].getNextHighestDepth());
Envi.Orbs["AccH" + v]._x = 1075;
Envi.Orbs["AccH" + v]._y = 2800;
Envi.Orbs["AccH" + v].FS.FirstSpeechT.htmlText = "Head shots are always one hit kills.";
v++;
Envi.Orbs.createEmptyMovieClip(["AccH" + v], Envi.Orbs.getNextHighestDepth());
Envi.Orbs["AccH" + v].attachMovie("FirstSpeech", "FS", Envi.Orbs["AccH" + v].getNextHighestDepth());
Envi.Orbs["AccH" + v]._x = 875;
Envi.Orbs["AccH" + v]._y = 1100;
Envi.Orbs["AccH" + v].FS.FirstSpeechT.htmlText = "Continue on up!";
} else if (Level == 6) {
trace("In WEVE2");
Depthy = mainTimeLine[("ColLoc" + Level) + "X"].length + 1;
v++;
Envi.Orbs.createEmptyMovieClip(["AccH" + v], Depthy);
Envi.Orbs["AccH" + v].attachMovie("FirstSpeech", "FS", Envi.Orbs["AccH" + v].getNextHighestDepth());
Envi.Orbs["AccH" + v]._x = 1225;
Envi.Orbs["AccH" + v]._y = 2575;
Envi.Orbs["AccH" + v].FS.FirstSpeechT.htmlText = "They think a cage can hold you?";
v++;
Envi.Orbs.createEmptyMovieClip(["AccH" + v], Envi.Orbs.getNextHighestDepth());
Envi.Orbs["AccH" + v].attachMovie("FirstSpeech", "FS", Envi.Orbs["AccH" + v].getNextHighestDepth());
Envi.Orbs["AccH" + v]._x = 1225;
Envi.Orbs["AccH" + v]._y = 1450;
Envi.Orbs["AccH" + v].FS.FirstSpeechT.htmlText = "Boy, were they ever wrong!";
}
attachMovie("HitPoint", "HeadMarker", getNextHighestDepth());
attachMovie("HitPoint", "BodyMarker", getNextHighestDepth());
attachMovie("HitPoint", "LegMarker", getNextHighestDepth());
attachMovie("Stats", "Stats", mainTimeLine.getNextHighestDepth());
if (Level == 0) {
Stats.ContEditButton._x = 384;
Stats.ContEditButton._y = -43;
} else {
Stats.ContEditButton._x = -1000;
Stats.ContEditButton._y = -1000;
Stats.MenuTab.Box._width = 180;
}
trace("SFX: " + SFX);
trace("M : " + M);
if (SFX) {
Stats.SFXBtn.gotoAndStop("On");
} else {
Stats.SFXBtn.gotoAndStop("Off");
}
if (M) {
Stats.MBtn.gotoAndStop("On");
} else {
Stats.MBtn.gotoAndStop("Off");
}
s = 3;
v = 1;
do {
SR = Math.round(s);
trace(SR + " SR");
Stats.attachMovie(["bar" + SR], "HP" + v, Stats.getNextHighestDepth());
Stats["HP" + v]._x = 165 + (10 * v);
Stats["HP" + v]._y = 16;
s = s - 0.5;
} while ((++v) <= 6);
var start_time = getTimer();
var elapsed_time = (getTimer() - start_time);
Stats.TimerT.text = time_to_string(elapsed_time);
var TotalOrbs = mainTimeLine[("ColLoc" + Level) + "X"].length;
var CurrentOrbs = 0;
var OrbsText = ((("x " + CurrentOrbs) + "/") + TotalOrbs);
Envi._x = EnviStartXA[Level];
Envi._y = EnviStartYA[Level] + 5;
Char._x = CharStartX;
Char._y = CharStartY + 5;
HeadMarker._x = Char._x;
Aimer._x = mainTimeLine._xmouse;
Aimer._y = mainTimeLine._ymouse;
Grap._x = -100;
Grap._y = -100;
Stats._x = 0;
Stats._y = 0;
var TileAtZero = 0;
var Val = 0;
var TileFromEnvi = 0;
var CXT = (((-Envi._x) - 25) / TileSize);
var SXT = (((-Envi._x) - 25) / TileSize);
trace((("XA: " + EnviStartXA[Level]) + ". YA: ") + EnviStartYA[Level]);
trace("SXT Before: " + CXT);
if (Envi._x > 0) {
if (CXT > 0) {
CXT = Math.floor(CXT);
CXT--;
} else if (CXT <= 0) {
CXT = Math.ceil(CXT);
CXT--;
}
} else if (Envi._x <= 0) {
CXT = Math.floor(CXT);
}
SXT = CXT;
trace((("SXT: " + SXT) + ". EnviX: ") + Envi._x);
var TYT = 0;
var XConst = 2;
var YConst = 2;
var CYT = (((-Envi._y) - 25) / TileSize);
var SYT = (((-Envi._y) - 25) / TileSize);
trace("SYT Before: " + CYT);
if (Envi._y > 0) {
if (CYT > 0) {
CYT = Math.floor(CYT);
CYT--;
} else if (CYT <= 0) {
CYT = Math.ceil(CYT);
CYT--;
}
} else if (Envi._y <= 0) {
if (Envi._x > 0) {
CYT = Math.round(CYT);
} else {
CYT = Math.floor(CYT);
}
}
SYT = CYT;
trace((("SYT: " + SYT) + ". EnviY: ") + Envi._y);
var OldTAZY = 0;
var OldTAZX = 0;
var KIS = Envi.Kunais.getNextHighestDepth();
var KI = KIS;
var KIES = (Envi.Kunais.getNextHighestDepth() + MK);
var KIE = KIES;
var XD = 0;
var YD = 0;
var CTP = 0;
var CTRP = 0;
var CTLP = 0;
var CBP = 0;
var CBRP = 0;
var CBLP = 0;
var CLP = 0;
var CRP = 0;
var CTRCP = 0;
var CTLCP = 0;
var CBLCP = 0;
var CBRCP = 0;
var Friction = 0.95;
var Gravity = 0.5;
var GW = 275;
var GH = 200;
var CH = ((Char._height / 2) - 3);
var CW = (Char._width / 2);
var CHW = 15;
var AimerRad = 40;
var AimerAngle = 0;
var AimAngle = 0;
var vx = 0;
var vy = 0;
var JumpHeight = 13;
var WalkPower = 10;
var GrapPower = 0.55;
var Power = WalkPower;
var OnGround = false;
var Direction = 3;
var Changed = false;
var RopeGravity = 10;
var NormLen = 10;
var S = 0.005;
var CurrLen = 0;
var MaxLen = 280000;
var MinLen = 10;
var RPower = 35;
var RopeOut = false;
var Grappled = false;
var rvy = 0;
var rvx = 0;
var PosDir = 1;
var NegDir = -1.2;
var RXT = 0;
var RYT = 0;
var CharHP = 6;
var KunXPoint = new Array(25);
var KunYPoint = new Array(25);
var KunDrawPointX = new Array(25);
var KunDrawPointY = new Array(25);
var Kunrvy = new Array(25);
var Kunrvx = new Array(25);
var KunOut = false;
var KunPower = 35;
var KunHit = new Array(25);
var EKunXPoint = new Array(25);
var EKunYPoint = new Array(25);
var EKunDrawPointX = new Array(25);
var EKunDrawPointY = new Array(25);
var EKunrvy = new Array(25);
var EKunrvx = new Array(25);
var Arrowrvy = new Array(25);
var Arrowrvx = new Array(25);
var EKunOut = false;
var EKunPower = 10;
var ArrowPower = 15;
var EKunHit = new Array(25);
var ECurrTime = new Array(25);
var ELastShot = new Array(25);
var FPSVal = 0;
var FPSTime = 0;
var FPSLast = getTimer();
Stats.FPS.text = 0;
var TimeShow = false;
var RR = true;
var JustLanded = false;
var SlidingNow = false;
var JumpingNow = false;
var JumpingOurDir = "";
var WSC = 0;
var WSOC = 0;
trace("EnviX: " + EnviStartXA[Level]);
trace("Enviy: " + EnviStartYA[Level]);
keyListener = new Object();
Key.addListener(keyListener);
keyListener.onKeyUp = function () {
var _local1 = Key.getCode();
if (_local1 == keys.Rope) {
RR = true;
}
if (_local1 == 80) {
if (Pause && (!TimeShow)) {
PS.removeMovieClip();
Pause = false;
start_time = start_time + (getTimer() - Time);
LastShot = LastShot + (getTimer() - Time);
v = 0;
do {
if (mainTimeLine["AccType" + Level][v] < ES) {
if (mainTimeLine["AccType" + Level][v] == TorchNum) {
Envi.Accs["AccH" + v].Torch.play();
}
}
} while ((++v) < mainTimeLine[("AccLoc" + Level) + "X"].Length);
t = 0;
while (t < EC) {
if (ELastShot[t] != undefined) {
ELastShot[t] = ELastShot[t] + (getTimer() - Time);
}
trace("State[t]: " + State[t]);
if ((State[t] == "Idle") || (State[t] == "Diving")) {
Envi.Enemies["Enemy" + t].Enemy.stop();
} else if ((((((State[t] == "Attacking") || (State[t] == "Spiking")) || (State[t] == "Running")) || (State[t] == "Biting")) || (State[t] == "Flying")) || (State[t] == "Walking")) {
Envi.Enemies["Enemy" + t].Enemy.play();
} else if (State[t] == "Dead") {
Envi.Enemies["Enemy" + t].Enemy.gotoAndStop("deadfinal");
}
t++;
}
} else if (!TimeShow) {
attachMovie("PauseScreen", "PS", getNextHighestDepth());
PS.x = 0;
PS.y = 0;
Pause = true;
Time = getTimer();
t = 0;
while (t < EC) {
Envi.Enemies["Enemy" + t].Enemy.stop();
t++;
}
v = 0;
while (v < mainTimeLine[("AccLoc" + Level) + "X"].length) {
if (mainTimeLine["AccType" + Level][v] < ES) {
if (mainTimeLine["AccType" + Level][v] == TorchNum) {
Envi.Accs["AccH" + v].Torch.stop();
}
}
v++;
}
}
}
if ((_local1 == 27) && (Level == 0)) {
CleanUp("LevelBuilder");
} else if ((_local1 == 27) && (Level > 0)) {
CleanUp("LevelSelect");
} else if ((_local1 == 27) && (Level == -1)) {
CleanUp("LevelLoader");
}
if (_local1 == 13) {
CleanUp("QS");
}
};
Char.onEnterFrame = function () {
if ((!Dead) && (!Pause)) {
Moving = false;
FPSVal++;
FPSTime = getTimer();
if ((FPSTime - FPSLast) >= 1000) {
Stats.FPS.text = FPSVal + 1;
FPSVal = 0;
FPSLast = getTimer();
}
elapsed_time = getTimer() - start_time;
Stats.TimerT.text = time_to_string(elapsed_time);
if (keydown(keys.Kunai)) {
CurrTime = getTimer();
if ((CurrTime - LastShot) >= 200) {
KunOut = true;
KunHit[KI] = false;
KunXPoint[KI] = Aimer._x;
KunYPoint[KI] = Aimer._y;
KunDrawPointX[KI] = Char._x - Envi._x;
KunDrawPointY[KI] = Char._y - Envi._y;
SetKunai();
LastShot = getTimer();
}
}
if (!OnGround) {
if ((!WallSlidingLeft) && (!WallSlidingRight)) {
vy = vy + Gravity;
} else if (vy > 0) {
vy = vy + (Gravity / 5);
} else {
vy = vy + Gravity;
}
}
if (keydown(keys.Jump)) {
if (OnGround) {
vy = vy - JumpHeight;
JmpS.start(0, 1);
} else if (WallSlidingRight || (WallSlidingLeft)) {
JmpS.start(0, 1);
WJ = true;
vy = -JumpHeight;
WSC = 0;
WSOC = 0;
SlidingNow = false;
JumpingNow = true;
if (WallSlidingLeft) {
vx = Power;
JumpingOutDir = "left";
WallSlidingLeft = false;
} else if (WallSlidingRight) {
vx = -Power;
JumpingOutDir = "right";
WallSlidingRight = false;
}
}
}
if (keydown(keys.Right)) {
if ((Direction != 1) || (vx <= 0)) {
}
Direction = 1;
Moving = true;
if (Grappled) {
vx = vx + GrapPower;
} else if (!Grappled) {
if (OnGround) {
vx = Power;
} else if (vx < (Power * 1.1)) {
vx = vx + (Power / 15);
}
}
} else if (keydown(keys.Left)) {
if ((Direction != 0) || (vx >= 0)) {
}
Direction = 0;
Moving = true;
if (Grappled) {
vx = vx - GrapPower;
} else if (!Grappled) {
if (OnGround) {
vx = -Power;
} else if (vx > ((-Power) * 1.1)) {
vx = vx - (Power / 15);
}
}
}
if (WallSlidingLeft) {
Direction = 1;
} else if (WallSlidingRight) {
Direction = 0;
}
if (RopeOut && (!Grappled)) {
RYT = Math.round(((Grap._y - Envi._y) - 25) / TileSize);
RXT = Math.round(((Grap._x - Envi._x) - 25) / TileSize);
if (((Map[Level][RXT][RYT] >= 1) && (Map[Level][RXT][RYT] <= WT)) && (Map[Level][RXT][RYT] != undefined)) {
GS.start(0, 1);
Grappled = true;
Grapped = true;
}
}
if (Grappled) {
GetRopeForces();
}
if (vx > 18) {
vx = 18;
} else if (vx < -18) {
vx = -18;
}
if (vy > 18) {
vy = 18;
} else if (vy < -18) {
vy = -18;
}
if (((((!Grapped) && (!OnGround)) && (!Moving)) && (!WJ)) || (((!Moving) && (!Grappled)) && (OnGround))) {
if (vx != 0) {
vx = 0;
}
}
if ((!OnGround) || (Grappled)) {
vy = vy * 0.995;
vx = vx * 0.995;
}
CheckWallCollisions();
MoveEnemies();
MoveCharacter();
if (RopeOut) {
DrawRope();
}
if (KunOut) {
MoveKunai();
}
if (EKunOut) {
MoveEnemyKunai();
}
SetAnimation();
} else if (Dead) {
SetAnimation();
MoveEnemies();
if (!OnGround) {
vy = vy + Gravity;
CheckWallCollisions();
MoveCharacter();
if (vy > 20) {
vy = 20;
} else if (vy < -20) {
vy = -20;
}
} else if (OnGround) {
ChState = "Dead";
}
}
};
onMouseMove = function () {
Aimer._x = mainTimeLine._xmouse;
Aimer._y = mainTimeLine._ymouse;
};
onMouseDown = function () {
if ((!Dead) && (!Pause)) {
GS.start(0.5, 1);
if (Direction == 3) {
if (Aimer._x > Char._x) {
Direction = 1;
} else if (Aimer._x < Char._x) {
Direction = 0;
}
}
RopeGrav = 0;
RopeOut = true;
Grappled = false;
XPoint = Aimer._x;
YPoint = Aimer._y;
DrawPointX = Char._x;
DrawPointY = Char._y;
Dir = PosDir;
MoveRope();
RR = false;
Grap._x = Char._x;
Grap._y = Char._y;
}
};
onMouseUp = function () {
if (RopeOut) {
if ((!Dead) && (!Pause)) {
RopeOut = false;
Grappled = false;
Grap._x = -50;
Grap._y = -50;
Line.clear();
RR = false;
}
}
if (Stats.SFXBtn.hitTest(mainTimeLine._xmouse, mainTimeLine._ymouse, true)) {
if (SFX) {
Stats.SFXBtn.gotoAndStop("Off");
CS.setVolume(0);
GS.setVolume(0);
HS.setVolume(0);
ThrKunS.setVolume(0);
ThrRopS.setVolume(0);
StpS.setVolume(0);
JmpS.setVolume(0);
KBatS.setVolume(0);
SFX = false;
} else {
Stats.SFXBtn.gotoAndStop("On");
CS.setVolume(VolSFX / 4);
GS.setVolume(VolSFX * 2);
HS.setVolume(VolSFX * 2);
ThrKunS.setVolume(VolSFX * 2);
ThrRopS.setVolume(VolSFX * 2);
StpS.setVolume(VolSFX * 2);
JmpS.setVolume(VolSFX * 2);
KBatS.setVolume(VolSFX * 2);
SFX = true;
}
}
if (Stats.MBtn.hitTest(mainTimeLine._xmouse, mainTimeLine._ymouse, true)) {
if (M) {
Stats.MBtn.gotoAndStop("Off");
LS.setVolume(0);
MS.setVolume(0);
GoS.setVolume(0);
LBS.setVolume(0);
WS.setVolume(0);
M = false;
} else {
Stats.MBtn.gotoAndStop("On");
LS.setVolume(VolBG * 2);
MS.setVolume(VolBG / 2);
GoS.setVolume(VolBG);
LBS.setVolume(VolBG);
WS.setVolume(VolBG);
M = true;
}
}
};
Frame 8
function LeaveScreen(Where) {
if (((Where == "Game") && (BestTime[Level] < LevUnlock[Level])) || (Where != "Game")) {
var _local2 = new mx.transitions.Tween(LevelSelectButton, "_y", mx.transitions.easing.Strong.easeOut, LevelSelectButton._y, 650, 1.5, true);
var _local1 = new mx.transitions.Tween(TryAgainButton, "_y", mx.transitions.easing.Strong.easeOut, TryAgainButton._y, 650, 1.5, true);
var _local3 = new mx.transitions.Tween(NextLevelButton, "_y", mx.transitions.easing.Strong.easeOut, NextLevelButton._y, 650, 1.5, true);
var _local4 = new mx.transitions.Tween(MGBtn, "_y", mx.transitions.easing.Strong.easeOut, MGBtn._y, 650, 1.5, true);
_local1.onMotionFinished = function () {
if (Where == "Game") {
ImportLevel(Level + 1);
} else {
WS.stop();
gotoAndStop(Where);
}
};
} else {
}
}
function ImportLevel(LevelSet, Exception, Ecode) {
var _local3 = LevelSet + "X";
var _local2 = LevelSet + "Y";
var _local7 = LevelSet + "X";
var _local6 = LevelSet + "Y";
Decrypted = "";
mainTimeLine[("AccLoc" + LevelSet) + "X"] = new Array();
mainTimeLine[("AccLoc" + LevelSet) + "Y"] = new Array();
mainTimeLine["AccType" + LevelSet] = new Array();
mainTimeLine[("ColLoc" + LevelSet) + "X"] = new Array();
mainTimeLine[("ColLoc" + LevelSet) + "Y"] = new Array();
EnviStartYA[LevelSet] = undefined;
EnviStartXA[LevelSet] = undefined;
CharStartYA[LevelSet] = undefined;
CharStartXA[LevelSet] = undefined;
LRBA[LevelSet] = undefined;
LLBA[LevelSet] = undefined;
LTBA[LevelSet] = undefined;
LBBA[LevelSet] = undefined;
Map[LevelSet] = [];
var _local5 = "";
var _local4 = 0;
if ((LevelSet == 0) && (!Exception)) {
ImportCode = Import.ImportCodeT.text;
} else if ((LevelSet == 0) && (Exception)) {
ImportCode = ECode;
} else if (LevelSet > 0) {
ImportCode = LevelCodeValue[LevelSet];
} else {
ImportCode = RandomLevelValue;
}
i = 0;
while (i < ImportCode.length) {
_local5 = ImportCode.substr(i, 1);
_local4 = Encrypt.indexOf(_local5, 0);
Decrypted = Decrypted + Decrypt.substr(_local4, 1);
i++;
}
Start = 0;
SingleValue = "";
Value = "";
x = 0;
y = 0;
if (Decrypted.indexOf("]") == -1) {
} else {
do {
while (true) {
SingleValue = Decrypted.substr(Start, 1);
if (SingleValue == ",") {
if (Map[LevelSet][x] == undefined) {
Map[LevelSet][x] = new Array();
}
Start++;
if (Value == "!") {
Map[LevelSet][x][y] = undefined;
} else {
Map[LevelSet][x][y] = parseInt(Value);
}
Value = "";
y++;
} else {
if (SingleValue == "]") {
if (Map[LevelSet][x] == undefined) {
Map[LevelSet][x] = new Array();
}
if (Value == "!") {
Map[LevelSet][x][y] = undefined;
} else {
Map[LevelSet][x][y] = parseInt(Value);
}
Value = "";
y++;
break;
}
Value = Value + SingleValue;
Start++;
}
}
x++;
y = 0;
Start++;
SingleValue = Decrypted.substr(Start, 1);
} while (SingleValue != "]");
Start++;
x = 0;
Value = "";
while (true) {
SingleValue = Decrypted.substr(Start, 1);
if (SingleValue == ",") {
Start++;
if (Value == "!") {
mainTimeLine["ColLoc" + _local3][x] = undefined;
} else {
mainTimeLine["ColLoc" + _local3][x] = parseInt(Value);
}
Value = "";
x++;
} else {
if (SingleValue == "]") {
if (Value == "!") {
mainTimeLine["ColLoc" + _local3][x] = undefined;
} else {
mainTimeLine["ColLoc" + _local3][x] = parseInt(Value);
}
Value = "";
x++;
break;
}
Value = Value + SingleValue;
Start++;
}
}
Start++;
x = 0;
Value = "";
while (true) {
SingleValue = Decrypted.substr(Start, 1);
if (SingleValue == ",") {
Start++;
if (Value == "!") {
mainTimeLine["ColLoc" + _local2][x] = undefined;
} else {
mainTimeLine["ColLoc" + _local2][x] = parseInt(Value);
}
Value = "";
x++;
} else {
if (SingleValue == "]") {
if (Value == "!") {
mainTimeLine["ColLoc" + _local2][x] = undefined;
} else {
mainTimeLine["ColLoc" + _local2][x] = parseInt(Value);
}
Value = "";
x++;
break;
}
Value = Value + SingleValue;
Start++;
}
}
Start++;
Value = "";
x = LevelSet;
while (true) {
SingleValue = Decrypted.substr(Start, 1);
if (SingleValue == "]") {
if (Value == "!") {
EnviStartXA[x] = undefined;
} else {
EnviStartXA[x] = parseInt(Value);
}
Value = "";
x++;
break;
}
Value = Value + SingleValue;
Start++;
}
Start++;
Value = "";
x = LevelSet;
while (true) {
SingleValue = Decrypted.substr(Start, 1);
if (SingleValue == "]") {
if (Value == "!") {
EnviStartYA[x] = undefined;
} else {
EnviStartYA[x] = parseInt(Value);
}
Value = "";
x++;
break;
}
Value = Value + SingleValue;
Start++;
}
Start++;
Value = "";
x = LevelSet;
while (true) {
SingleValue = Decrypted.substr(Start, 1);
if (SingleValue == "]") {
if (Value == "!") {
CharStartXA[x] = undefined;
} else {
CharStartXA[x] = parseInt(Value);
}
Value = "";
x++;
break;
}
Value = Value + SingleValue;
Start++;
}
Start++;
Value = "";
x = LevelSet;
while (true) {
SingleValue = Decrypted.substr(Start, 1);
if (SingleValue == "]") {
if (Value == "!") {
CharStartYA[x] = undefined;
} else {
CharStartYA[x] = parseInt(Value);
}
Value = "";
x++;
break;
}
Value = Value + SingleValue;
Start++;
}
Start++;
x = 0;
Value = "";
while (true) {
SingleValue = Decrypted.substr(Start, 1);
if (SingleValue == ",") {
Start++;
if (Value == "!") {
mainTimeLine[("AccLoc" + LevelSet) + "X"][x] = undefined;
} else {
mainTimeLine[("AccLoc" + LevelSet) + "X"][x] = parseInt(Value);
}
Value = "";
x++;
} else {
if (SingleValue == "]") {
if (Value == "!") {
mainTimeLine[("AccLoc" + LevelSet) + "X"][x] = undefined;
} else if (Value != "") {
mainTimeLine[("AccLoc" + LevelSet) + "X"][x] = parseInt(Value);
}
Value = "";
x++;
break;
}
Value = Value + SingleValue;
Start++;
}
}
Start++;
x = 0;
Value = "";
while (true) {
SingleValue = Decrypted.substr(Start, 1);
if (SingleValue == ",") {
Start++;
if (Value == "!") {
mainTimeLine[("AccLoc" + LevelSet) + "Y"][x] = undefined;
} else {
mainTimeLine[("AccLoc" + LevelSet) + "Y"][x] = parseInt(Value);
}
Value = "";
x++;
} else {
if (SingleValue == "]") {
if (Value == "!") {
mainTimeLine[("AccLoc" + LevelSet) + "Y"][x] = undefined;
} else if (Value != "") {
mainTimeLine[("AccLoc" + LevelSet) + "Y"][x] = parseInt(Value);
}
Value = "";
x++;
break;
}
Value = Value + SingleValue;
Start++;
}
}
Start++;
x = 0;
Value = "";
while (true) {
SingleValue = Decrypted.substr(Start, 1);
if (SingleValue == ",") {
Start++;
if (Value == "!") {
mainTimeLine["AccType" + LevelSet][x] = undefined;
} else {
mainTimeLine["AccType" + LevelSet][x] = parseInt(Value);
}
Value = "";
x++;
} else {
if (SingleValue == "]") {
if (Value == "!") {
mainTimeLine["AccType" + LevelSet][x] = undefined;
} else {
mainTimeLine["AccType" + LevelSet][x] = parseInt(Value);
}
Value = "";
x++;
break;
}
Value = Value + SingleValue;
Start++;
}
}
stopMouse();
Import.removeMovieClip();
Level = LevelSet;
WS.stop();
gotoAndStop ("Game");
}
}
Submitted = false;
WS.start(0, 9999);
if (Level > 0) {
if (Level == 6) {
NextLevelButton._x = -1000;
NextLevelButton._y = -1000;
}
var LSTween = (new mx.transitions.Tween(LevelSelectButton, "_y", mx.transitions.easing.Strong.easeOut, -90, LevelSelectButton._y, 1.5, true));
var TATween = (new mx.transitions.Tween(TryAgainButton, "_y", mx.transitions.easing.Strong.easeOut, -90, TryAgainButton._y, 1.5, true));
var NLTween = (new mx.transitions.Tween(NextLevelButton, "_y", mx.transitions.easing.Strong.easeOut, -90, NextLevelButton._y, 1.5, true));
var MGBtnTween = (new mx.transitions.Tween(MGBtn, "_y", mx.transitions.easing.Strong.easeOut, -90, MGBtn._y, 1.5, true));
SavedGame = SharedObject.getLocal("NinjaSave");
SavedGame.data.TimesString = BestTimeT;
SavedGame.data.TimesNum = BestTime;
Status = SavedGame.flush();
if (Status == true) {
Message.text = "Your game was saved.";
} else if (Status == false) {
Message.text = "There was a problem saving your game.";
} else if (Status == "pending") {
Message.text = "Please allow space for the game to save.";
}
SavedGame.flush();
} else if (Level == -1) {
NextLevelButton._x = -1000;
NextLevelButton._y = -1000;
var LSTween = (new mx.transitions.Tween(LevelSelectButton, "_y", mx.transitions.easing.Strong.easeOut, -90, LevelSelectButton._y, 1.5, true));
var TATween = (new mx.transitions.Tween(TryAgainButton, "_y", mx.transitions.easing.Strong.easeOut, -90, TryAgainButton._y, 1.5, true));
var NLTween = (new mx.transitions.Tween(NextLevelButton, "_y", mx.transitions.easing.Strong.easeOut, -90, NextLevelButton._y, 1.5, true));
var MGBtnTween = (new mx.transitions.Tween(MGBtn, "_y", mx.transitions.easing.Strong.easeOut, -90, MGBtn._y, 1.5, true));
} else if (Level == 0) {
BTT._x = -1000;
BTT._y = -1000;
ENT._x = -1000;
ENT._y = -1000;
LCT._x = -1000;
LCT._y = -1000;
LCBG._x = -1000;
LCBG._y = -1000;
SSTBtn._x = -1000;
SSTBtn._y = -1000;
NextLevelButton._x = -1000;
NextLevelButton._y = -1000;
LevelSelectButton._x = -1000;
LevelSelectButton._y = -1000;
TryAgainButton._x = -1000;
TryAgainButton._y = -1000;
Time0._x = -1000;
Time0._y = -1000;
Time1._x = -1000;
Time1._y = -1000;
Time2._x = -1000;
Time2._y = -1000;
Time3._x = -1000;
Time3._y = -1000;
Time4._x = -1000;
Time4._y = -1000;
Time5._x = -1000;
Time5._y = -1000;
Time6._x = -1000;
Time6._y = -1000;
Time7._x = -1000;
Time7._y = -1000;
Time8._x = -1000;
Time8._y = -1000;
Time9._x = -1000;
Time9._y = -1000;
YT._x = -1000;
YT._y = -1000;
TimeHolderT._x = -1000;
TimeHolderT._y = -1000;
TLBG._x = 274.8;
TLBG._y = 200.6;
BackButton._x = 144;
BackButton._y = 246;
MGBtnTL._x = 453;
MGBtnTL._y = 246;
}
BackButton.onRelease = function () {
WS.stop();
gotoAndStop ("LevelBuilder");
};
TryAgainButton.onRelease = function () {
WS.stop();
gotoAndStop ("Game");
};
LevelSelectButton.onRelease = function () {
if (Level > 0) {
LeaveScreen("LevelSelect");
} else {
LeaveScreen("LevelLoader");
}
};
NextLevelButton.onRelease = function () {
LeaveScreen("Game");
};
Frame 9
function CreateTile(TileSet, XPos, YPos, Random, Start) {
if (Start) {
XPos = XPos + TS;
YPos = YPos + TS;
}
MapPiecesLB[q] = new flash.display.BitmapData(mainTimeLine["TileBitmap" + TileSet].width, mainTimeLine["TileBitmap" + TileSet].height, false, 0);
MapPiecesLB[q].copyPixels(mainTimeLine["TileBitmap" + TileSet], new flash.geom.Rectangle(0, 0, mainTimeLine["TileBitmap" + TileSet].width, mainTimeLine["TileBitmap" + TileSet].height), new flash.geom.Point(0, 0));
Envi.Wall.createEmptyMovieClip(["MapPiece" + q], Envi.Wall.getNextHighestDepth());
Envi.Wall["MapPiece" + q].attachBitmap(MapPiecesLB[q], Envi.Wall["MapPiece" + q].getNextHighestDepth());
Envi.Wall["MapPiece" + q]._x = XPos * TileSize;
Envi.Wall["MapPiece" + q]._y = YPos * TileSize;
q++;
if (Map[Level][XPos] == undefined) {
Map[Level][XPos] = new Array();
}
Map[Level][XPos][YPos] = TileSet;
}
function GetTile(PointX, PointY) {
if ((PointX == undefined) && (PointY == undefined)) {
var _local1 = (mainTimeLine._xmouse - Envi._x) - 25;
var _local2 = (mainTimeLine._ymouse - Envi._y) - 25;
} else {
var _local1 = (PointX - Envi._x) - 25;
var _local2 = (PointY - Envi._y) - 25;
}
YTile = Math.round(_local2 / TileSize);
XTile = Math.round(_local1 / TileSize);
if (Map[Level][XTile] == undefined) {
Map[Level][XTile] = new Array();
}
}
function ChangeDragger(Type, MC, Acc) {
if (Type == "Bitmap") {
Dragger.removeMovieClip();
createEmptyMovieClip("Dragger", getNextHighestDepth());
Dragger._alpha = 50;
if (Acc) {
AccPlace = true;
BitMap = false;
} else {
AccPlace = false;
BitMap = true;
}
if (PieceArray.length > 1) {
RandomNumber = Math.round(Math.random() * (PieceArray.length - 1));
CurrentTile = PieceArray[RandomNumber];
} else {
CurrentTile = PieceArray[0];
}
Dragger.attachBitmap(mainTimeLine["TileBitmap" + CurrentTile], 1);
SetDraggerPos();
} else if (Type == "MC") {
Dragger.removeMovieClip();
createEmptyMovieClip("Dragger", getNextHighestDepth());
Dragger._alpha = 50;
BitMap = false;
Dragger.attachMovie(MC, "Drag", 1);
SetDraggerPos();
}
}
function SetDraggerPos() {
if (!LevelBuilderMenu.hitTest(mainTimeLine._xmouse, mainTimeLine._ymouse, true)) {
GetTile();
if (BitMap) {
Dragger._x = (TileSize * XTile) + Envi._x;
Dragger._y = (TileSize * YTile) + Envi._y;
} else if (!AccPlace) {
Dragger._x = mainTimeLine._xmouse;
Dragger._y = mainTimeLine._ymouse;
} else if (AccPlace) {
Dragger._x = mainTimeLine._xmouse - (mainTimeLine["TileBitmap" + CurrentTile].width / 2);
Dragger._y = mainTimeLine._ymouse - (mainTimeLine["TileBitmap" + CurrentTile].height / 2);
}
} else {
Dragger._x = -1000;
}
}
function CheckKeys() {
if (Key.isDown(32)) {
Deleting = true;
OrbPlace = false;
CharPlace = false;
AccPlace = false;
ChangeDragger("MC", "Eraser");
}
if (Key.isDown(16)) {
AccPlace = false;
CharPlace = true;
OrbPlace = false;
Deleting = false;
ChangeDragger("MC", "Char");
}
if (Key.isDown(17)) {
OrbPlace = true;
CharPlace = false;
Deleting = false;
AccPlace = false;
ChangeDragger("MC", "Collectable");
}
}
function MoveLevel(Prop, Value) {
if (Prop == "x") {
LeftLine._x = LeftLine._x + Value;
RightLine._x = RightLine._x + Value;
Envi._x = Envi._x + Value;
Char._x = Char._x + Value;
x = 0;
while (x < mainTimeLine.oi) {
mainTimeLine["Orb" + x]._x = mainTimeLine["Orb" + x]._x + Value;
x++;
}
x = 0;
while (x < AC) {
mainTimeLine["AccH" + x]._x = mainTimeLine["AccH" + x]._x + Value;
x++;
}
} else if (Prop == "y") {
TopLine._y = TopLine._y + Value;
BottomLine._y = BottomLine._y + Value;
Envi._y = Envi._y + Value;
Char._y = Char._y + Value;
x = 0;
while (x < mainTimeLine.oi) {
mainTimeLine["Orb" + x]._y = mainTimeLine["Orb" + x]._y + Value;
x++;
}
x = 0;
while (x < AC) {
mainTimeLine["AccH" + x]._y = mainTimeLine["AccH" + x]._y + Value;
x++;
}
}
SetDraggerPos();
}
function PrepareLevelVars(Exporting) {
Col = 0;
Down = true;
mainTimeLine[("ColLoc" + mainTimeLine.Level) + "X"] = new Array();
mainTimeLine[("ColLoc" + mainTimeLine.Level) + "Y"] = new Array();
mainTimeLine[("AccLoc" + Level) + "X"] = new Array();
mainTimeLine[("AccLoc" + Level) + "Y"] = new Array();
mainTimeLine["AccType" + Level] = new Array();
if (Char._x != undefined) {
var _local2 = Char._x - 275;
var _local1 = Char._y - 225;
CharStartXA[Level] = Char._x - _local2;
CharStartYA[Level] = Char._y - _local1;
} else {
var _local2 = 0;
var _local1 = 0;
}
EnviStartYA[Level] = Envi._y - _local1;
EnviStartXA[Level] = Envi._x - _local2;
z = 0;
while (z < mainTimeLine.oi) {
if ((mainTimeLine["Orb" + z]._x == null) || (mainTimeLine["Orb" + z]._x == undefined)) {
Col++;
} else {
mainTimeLine[("ColLoc" + mainTimeLine.Level) + "X"][z - Col] = mainTimeLine["Orb" + z]._x - _local2;
mainTimeLine[("ColLoc" + mainTimeLine.Level) + "Y"][z - Col] = mainTimeLine["Orb" + z]._y - _local1;
if (!Exporting) {
mainTimeLine["Orb" + z].removeMovieClip();
}
}
z++;
}
Col = 0;
z = 0;
while (z < AC) {
if ((mainTimeLine["AccH" + z]._x == null) || (mainTimeLine["AccH" + z]._x == undefined)) {
Col++;
} else {
if (AccTile[z] >= ES) {
mainTimeLine[("AccLoc" + Level) + "X"][z - Col] = (mainTimeLine["AccH" + z]._x - _local2) + (mainTimeLine["TileBitmap" + AccTile[z]].width / 2);
mainTimeLine[("AccLoc" + Level) + "Y"][z - Col] = (mainTimeLine["AccH" + z]._y - _local1) + (mainTimeLine["TileBitmap" + AccTile[z]].height / 2);
} else {
mainTimeLine[("AccLoc" + Level) + "X"][z - Col] = mainTimeLine["AccH" + z]._x - _local2;
mainTimeLine[("AccLoc" + Level) + "Y"][z - Col] = mainTimeLine["AccH" + z]._y - _local1;
}
mainTimeLine["AccType" + Level][z - Col] = AccTile[z];
if (!Exporting) {
mainTimeLine["AccH" + z].removeMovieClip();
}
}
z++;
}
if (!Exporting) {
LevelBuilderMenu.removeMovieClip();
}
if (!Exporting) {
Key.removeListener(keyListener);
if (PlayingMenu) {
MS.stop();
PlayingMenu = false;
}
LBS.stop();
delete onEnterFrame;
delete onKeyUp;
delete onMouseUp;
delete onMouseMove;
delete onMouseDown;
InfoBox.removeMovieClip();
box.removeMovieClip();
Delete.removeMovieClip();
Envi.removeMovieClip();
Char.removeMovieClip();
BottomLine.removeMovieClip();
TopLine.removeMovieClip();
LeftLine.removeMovieClip();
RightLine.removeMovieClip();
Dragger.removeMovieClip();
}
}
function PrepareLevelCode() {
LevelPrint = 1;
FirstThingX = -1;
FirstThingY = 10000000000;
x = 0;
while (x < Map[Level].length) {
y = 0;
while (y < Map[Level][x].length) {
if (Map[Level][x][y] != undefined) {
if (y < FirstThingY) {
FirstThingY = y;
}
}
y++;
}
x++;
}
FirstThingY--;
Written = false;
Found = false;
ChangedUnd = false;
x = 0;
while (x < Map[Level].length) {
y = 0;
while (y < Map[Level][x].length) {
if ((((Map[Level][x][y] >= 0) && (Map[Level][x][y] != undefined)) || (Found)) || (y >= FirstThingY)) {
if (Map[Level][x][y] == undefined) {
Map[Level][x][y] = "!";
ChangedUnd = true;
}
if (!Found) {
if (FirstThingX == -1) {
FirstThingX = x;
}
if (Written) {
mainTimeLine.LevelCode = mainTimeLine.LevelCode + ("" + Map[Level][x][y]);
} else if (!Written) {
mainTimeLine.LevelCode = mainTimeLine.LevelCode + ("" + Map[Level][x][y]);
}
Found = true;
Written = true;
}
if (Found) {
mainTimeLine.LevelCode = mainTimeLine.LevelCode + ("," + Map[Level][x][y]);
}
}
if (ChangedUnd) {
Map[Level][x][y] = undefined;
ChangedUnd = false;
}
y++;
}
if (Found) {
mainTimeLine.LevelCode = mainTimeLine.LevelCode + "]";
} else if ((!Found) && (Written)) {
mainTimeLine.LevelCode = mainTimeLine.LevelCode + "!]";
}
Found = false;
x++;
}
mainTimeLine.LevelCode = mainTimeLine.LevelCode + "]";
FirstThingY--;
EnviStartXCalc = (EnviStartXA[Level] + 100000) + ((FirstThingX - 2000) * 50);
EnviStartYCalc = (EnviStartYA[Level] + 100000) + ((FirstThingY - 2000) * 50);
if (mainTimeLine[("ColLoc" + mainTimeLine.Level) + "X"].length > 0) {
z = 0;
while (z < mainTimeLine[("ColLoc" + mainTimeLine.Level) + "X"].length) {
if (z != (mainTimeLine[("ColLoc" + mainTimeLine.Level) + "X"].length - 1)) {
mainTimeLine.LevelCode = mainTimeLine.LevelCode + (mainTimeLine[("ColLoc" + mainTimeLine.Level) + "X"][z] + ",");
} else {
mainTimeLine.LevelCode = mainTimeLine.LevelCode + (mainTimeLine[("ColLoc" + mainTimeLine.Level) + "X"][z] + "]");
}
z++;
}
z = 0;
while (z < mainTimeLine[("ColLoc" + mainTimeLine.Level) + "Y"].length) {
if (z != (mainTimeLine[("ColLoc" + mainTimeLine.Level) + "Y"].length - 1)) {
mainTimeLine.LevelCode = mainTimeLine.LevelCode + (mainTimeLine[("ColLoc" + mainTimeLine.Level) + "Y"][z] + ",");
} else {
mainTimeLine.LevelCode = mainTimeLine.LevelCode + (mainTimeLine[("ColLoc" + mainTimeLine.Level) + "Y"][z] + "]");
}
z++;
}
} else {
mainTimeLine.LevelCode = mainTimeLine.LevelCode + "]]";
}
mainTimeLine.LevelCode = mainTimeLine.LevelCode + (EnviStartXCalc + "]");
mainTimeLine.LevelCode = mainTimeLine.LevelCode + (EnviStartYCalc + "]");
if (mainTimeLine.CharStartXA[mainTimeLine.Level] != undefined) {
mainTimeLine.LevelCode = mainTimeLine.LevelCode + (mainTimeLine.CharStartXA[mainTimeLine.Level] + "]");
mainTimeLine.LevelCode = mainTimeLine.LevelCode + (mainTimeLine.CharStartYA[mainTimeLine.Level] + "]");
} else {
mainTimeLine.LevelCode = mainTimeLine.LevelCode + "!]";
mainTimeLine.LevelCode = mainTimeLine.LevelCode + "!]";
}
if (mainTimeLine[("AccLoc" + Level) + "X"].length > 0) {
z = 0;
while (z < mainTimeLine[("AccLoc" + Level) + "X"].length) {
if (z != (mainTimeLine[("AccLoc" + Level) + "X"].length - 1)) {
mainTimeLine.LevelCode = mainTimeLine.LevelCode + (mainTimeLine[("AccLoc" + Level) + "X"][z] + ",");
} else {
mainTimeLine.LevelCode = mainTimeLine.LevelCode + (mainTimeLine[("AccLoc" + Level) + "X"][z] + "]");
}
z++;
}
z = 0;
while (z < mainTimeLine[("AccLoc" + Level) + "Y"].length) {
if (z != (mainTimeLine[("AccLoc" + Level) + "Y"].length - 1)) {
mainTimeLine.LevelCode = mainTimeLine.LevelCode + (mainTimeLine[("AccLoc" + Level) + "Y"][z] + ",");
} else {
mainTimeLine.LevelCode = mainTimeLine.LevelCode + (mainTimeLine[("AccLoc" + Level) + "Y"][z] + "]");
}
z++;
}
z = 0;
while (z < mainTimeLine["AccType" + Level].length) {
if (z != (mainTimeLine["AccType" + Level].length - 1)) {
mainTimeLine.LevelCode = mainTimeLine.LevelCode + (mainTimeLine["AccType" + Level][z] + ",");
} else {
mainTimeLine.LevelCode = mainTimeLine.LevelCode + (mainTimeLine["AccType" + Level][z] + "]");
}
z++;
}
} else {
mainTimeLine.LevelCode = mainTimeLine.LevelCode + "]]]";
}
EncryptFunc();
}
function EncryptFunc() {
var _local2 = "";
var _local1 = 0;
i = 0;
while (i < mainTimeLine.LevelCode.length) {
_local2 = mainTimeLine.LevelCode.substr(i, 1);
_local1 = Decrypt.indexOf(_local2, 0);
Encrypted = Encrypted + Encrypt.substr(_local1, 1);
i++;
}
}
function Allowed(Check) {
if (Check == "PrepareLevelVars") {
Orb = false;
if (oi != 0) {
z = 0;
while (z < mainTimeLine.oi) {
if ((mainTimeLine["Orb" + z]._x != undefined) && (mainTimeLine["Orb" + z]._y != undefined)) {
Orb = true;
}
z++;
}
}
if (!Orb) {
attachMovie("LBNotice", "LBNotice", CAWD);
CAWD++;
LBNotice._x = 275;
LBNotice._y = 225;
LBNotice.Status.text = "Please place at least one coin!";
return(0);
}
if (((Char._x != undefined) && (Char._y != undefined)) && (Orb)) {
return(1);
}
attachMovie("LBNotice", "LBNotice", CAWD);
CAWD++;
LBNotice._x = 275;
LBNotice._y = 225;
LBNotice.Status.text = "Please place your character!";
return(0);
}
if (Check == "PlacingChar") {
CW = 20.8;
CH = 32.05;
OXP = mainTimeLine._xmouse;
OYP = mainTimeLine._ymouse;
XP = OXP;
YP = OYP;
Okay = false;
GetTile(XP, YP);
if ((Map[Level][XTile][YTile] > WT) || (Map[Level][XTile][YTile] == undefined)) {
XP = OXP + CW;
GetTile(XP, YP);
if ((Map[Level][XTile][YTile] > WT) || (Map[Level][XTile][YTile] == undefined)) {
XP = OXP - CW;
GetTile(XP, YP);
if ((Map[Level][XTile][YTile] > WT) || (Map[Level][XTile][YTile] == undefined)) {
XP = OXP;
YP = OYP + CH;
GetTile(XP, YP);
if ((Map[Level][XTile][YTile] > WT) || (Map[Level][XTile][YTile] == undefined)) {
XP = OXP;
YP = OYP - CH;
GetTile(XP, YP);
if ((Map[Level][XTile][YTile] > WT) || (Map[Level][XTile][YTile] == undefined)) {
XP = OXP - CW;
YP = OYP + CH;
GetTile(XP, YP);
if ((Map[Level][XTile][YTile] > WT) || (Map[Level][XTile][YTile] == undefined)) {
XP = OXP - CW;
YP = OYP - CH;
GetTile(XP, YP);
if ((Map[Level][XTile][YTile] > WT) || (Map[Level][XTile][YTile] == undefined)) {
XP = OXP + CW;
YP = OYP + CH;
GetTile(XP, YP);
if ((Map[Level][XTile][YTile] > WT) || (Map[Level][XTile][YTile] == undefined)) {
XP = OXP + CW;
YP = OYP - CH;
GetTile(XP, YP);
if ((Map[Level][XTile][YTile] > WT) || (Map[Level][XTile][YTile] == undefined)) {
Okay = true;
return(1);
}
}
}
}
}
}
}
}
}
if (!Okay) {
attachMovie("LBNotice", "LBNotice", CAWD);
CAWD++;
LBNotice._x = 275;
LBNotice._y = 225;
LBNotice.Status.text = "You cannot place your character there!";
return(0);
}
} else if (Check == "PlacingEnemy") {
if (PieceArray[0] >= ES) {
if ((((PieceArray[0] == SpikeUNum) || (PieceArray[0] == SpikeDNum)) || (PieceArray[0] == SpikeLNum)) || (PieceArray[0] == SpikeRNum)) {
if (PieceArray[0] == SpikeUNum) {
CHF = mainTimeLine["TileBitmap" + PieceArray[0]].height / 2;
CHB = -10;
CWF = mainTimeLine["TileBitmap" + PieceArray[0]].width / 2;
CWF = CWF - 2;
CWB = CWF;
} else if (PieceArray[0] == SpikeDNum) {
CHF = -10;
CHB = mainTimeLine["TileBitmap" + PieceArray[0]].height / 2;
CWF = mainTimeLine["TileBitmap" + PieceArray[0]].width / 2;
CWF = CWF - 2;
CWB = CWF;
} else if (PieceArray[0] == SpikeLNum) {
CHF = mainTimeLine["TileBitmap" + PieceArray[0]].height / 2;
CHF = CHF - 2;
CHB = CHF;
CWF = -10;
CWB = mainTimeLine["TileBitmap" + PieceArray[0]].width / 2;
} else if (PieceArray[0] == SpikeRNum) {
CHF = mainTimeLine["TileBitmap" + PieceArray[0]].height / 2;
CHF = CHF - 2;
CHB = CHF;
CWF = mainTimeLine["TileBitmap" + PieceArray[0]].width / 2;
CWB = -10;
}
OXP = mainTimeLine._xmouse;
OYP = mainTimeLine._ymouse;
XP = OXP;
YP = OYP;
Okay = false;
XP = OXP;
YP = OYP + CHF;
GetTile(XP, YP);
if ((Map[Level][XTile][YTile] <= WT) && (Map[Level][XTile][YTile] != undefined)) {
XP = OXP;
YP = OYP - CHB;
GetTile(XP, YP);
if ((Map[Level][XTile][YTile] <= WT) && (Map[Level][XTile][YTile] != undefined)) {
XP = OXP - CWB;
YP = OYP + CHF;
GetTile(XP, YP);
if ((Map[Level][XTile][YTile] <= WT) && (Map[Level][XTile][YTile] != undefined)) {
XP = OXP - CWB;
YP = OYP - CHB;
GetTile(XP, YP);
if ((Map[Level][XTile][YTile] <= WT) && (Map[Level][XTile][YTile] != undefined)) {
XP = OXP + CWF;
YP = OYP + CHF;
GetTile(XP, YP);
if ((Map[Level][XTile][YTile] <= WT) && (Map[Level][XTile][YTile] != undefined)) {
XP = OXP + CWF;
YP = OYP - CHB;
GetTile(XP, YP);
if ((Map[Level][XTile][YTile] <= WT) && (Map[Level][XTile][YTile] != undefined)) {
Okay = true;
return(1);
}
}
}
}
}
}
if (!Okay) {
attachMovie("LBNotice", "LBNotice", CAWD);
CAWD++;
LBNotice._x = 275;
LBNotice._y = 225;
LBNotice.Status.text = "You cannot place a spike trap there!";
return(0);
}
} else {
CW = mainTimeLine["TileBitmap" + PieceArray[0]].width / 2;
CH = mainTimeLine["TileBitmap" + PieceArray[0]].height / 2;
OXP = mainTimeLine._xmouse;
OYP = mainTimeLine._ymouse;
XP = OXP;
YP = OYP;
Okay = false;
GetTile(XP, YP);
if ((Map[Level][XTile][YTile] > WT) || (Map[Level][XTile][YTile] == undefined)) {
XP = OXP + CW;
GetTile(XP, YP);
if ((Map[Level][XTile][YTile] > WT) || (Map[Level][XTile][YTile] == undefined)) {
XP = OXP - CW;
GetTile(XP, YP);
if ((Map[Level][XTile][YTile] > WT) || (Map[Level][XTile][YTile] == undefined)) {
XP = OXP;
YP = OYP + CH;
GetTile(XP, YP);
if ((Map[Level][XTile][YTile] > WT) || (Map[Level][XTile][YTile] == undefined)) {
XP = OXP;
YP = OYP - CH;
GetTile(XP, YP);
if ((Map[Level][XTile][YTile] > WT) || (Map[Level][XTile][YTile] == undefined)) {
XP = OXP - CW;
YP = OYP + CH;
GetTile(XP, YP);
if ((Map[Level][XTile][YTile] > WT) || (Map[Level][XTile][YTile] == undefined)) {
XP = OXP - CW;
YP = OYP - CH;
GetTile(XP, YP);
if ((Map[Level][XTile][YTile] > WT) || (Map[Level][XTile][YTile] == undefined)) {
XP = OXP + CW;
YP = OYP + CH;
GetTile(XP, YP);
if ((Map[Level][XTile][YTile] > WT) || (Map[Level][XTile][YTile] == undefined)) {
XP = OXP + CW;
YP = OYP - CH;
GetTile(XP, YP);
if ((Map[Level][XTile][YTile] > WT) || (Map[Level][XTile][YTile] == undefined)) {
Okay = true;
return(1);
}
}
}
}
}
}
}
}
}
if (!Okay) {
attachMovie("LBNotice", "LBNotice", CAWD);
CAWD++;
LBNotice._x = 275;
LBNotice._y = 225;
LBNotice.Status.text = "You cannot place an enemy there!";
return(0);
}
}
} else {
return(1);
}
}
}
function OpenTileMenu() {
LevelBuilderMenu.attachMovie("TileMenu", "TileMenu", LevelBuilderMenu.getNextHighestDepth());
SelectingTiles = true;
LevelBuilderMenu.TileMenu._x = 110;
LevelBuilderMenu.TileMenu._y = 90;
LevelBuilderMenu.TileMenu.PageMC._x = -1000;
LevelBuilderMenu.TileMenu.PageMC._y = -1000;
g = 1;
if (LastTab == "Wall") {
WallTabFunc();
} else if (LastTab == "BG") {
BGTabFunc();
} else if (LastTab == "Acc") {
AccTabFunc();
} else if (LastTab == "Ene") {
EneTabFunc();
}
Dragger._x = -1000;
}
function WallTabFunc() {
d = 10000;
g = 1;
while (g <= TT) {
LevelBuilderMenu.TileMenu["Tile" + g].removeMovieClip();
g++;
}
g = 1;
while (g <= WT) {
LevelBuilderMenu.TileMenu.createEmptyMovieClip("Tile" + g, d);
LevelBuilderMenu.TileMenu["Tile" + g].attachBitmap(mainTimeLine["TileBitmap" + g], LevelBuilderMenu.TileMenu["Tile" + g].getNextHighestDepth());
X = Math.floor((g - 1) / 7);
LevelBuilderMenu.TileMenu["Tile" + g]._x = ((58 * g) - 260) - (406 * X);
LevelBuilderMenu.TileMenu["Tile" + g]._y = (58 * X) - 10;
d++;
g++;
}
o = 1;
while (o <= TT) {
LevelBuilderMenu.TileMenu["Box" + o].removeMovieClip();
o++;
}
o = 0;
while (o < PieceArray.length) {
Ind = PieceArray[o];
if ((PieceArray[o] >= 1) && (PieceArray[o] <= WT)) {
LevelBuilderMenu.TileMenu.attachMovie("Box", "Box" + Ind, Ind + 100);
LevelBuilderMenu.TileMenu["Box" + Ind]._x = LevelBuilderMenu.TileMenu["Tile" + Ind]._x - 2;
LevelBuilderMenu.TileMenu["Box" + Ind]._y = LevelBuilderMenu.TileMenu["Tile" + Ind]._y - 2;
LevelBuilderMenu.TileMenu["Box" + Ind]._width = mainTimeLine["TileBitmap" + Ind].width + ((mainTimeLine["TileBitmap" + Ind].width / 50) * 6);
LevelBuilderMenu.TileMenu["Box" + Ind]._height = mainTimeLine["TileBitmap" + Ind].height + ((mainTimeLine["TileBitmap" + Ind].width / 50) * 6);
}
o++;
}
}
function BGTabFunc() {
d = 10000;
g = 1;
while (g <= TT) {
LevelBuilderMenu.TileMenu["Tile" + g].removeMovieClip();
g++;
}
g = WT + 1;
while (g <= BT) {
LevelBuilderMenu.TileMenu.createEmptyMovieClip("Tile" + g, d);
LevelBuilderMenu.TileMenu["Tile" + g].attachBitmap(mainTimeLine["TileBitmap" + g], LevelBuilderMenu.TileMenu["Tile" + g].getNextHighestDepth());
X = Math.floor((g - (WT + 1)) / 7);
LevelBuilderMenu.TileMenu["Tile" + g]._x = ((58 * (g - WT)) - 260) - (406 * X);
LevelBuilderMenu.TileMenu["Tile" + g]._y = (58 * X) - 10;
d++;
g++;
}
o = 1;
while (o <= TT) {
LevelBuilderMenu.TileMenu["Box" + o].removeMovieClip();
o++;
}
o = 0;
while (o < PieceArray.length) {
Ind = PieceArray[o];
if ((PieceArray[o] >= (WT + 1)) && (PieceArray[o] <= BT)) {
LevelBuilderMenu.TileMenu.attachMovie("Box", "Box" + Ind, Ind + 100);
LevelBuilderMenu.TileMenu["Box" + Ind]._x = LevelBuilderMenu.TileMenu["Tile" + Ind]._x - 2;
LevelBuilderMenu.TileMenu["Box" + Ind]._y = LevelBuilderMenu.TileMenu["Tile" + Ind]._y - 2;
LevelBuilderMenu.TileMenu["Box" + Ind]._width = mainTimeLine["TileBitmap" + Ind].width + ((mainTimeLine["TileBitmap" + Ind].width / 50) * 6);
LevelBuilderMenu.TileMenu["Box" + Ind]._height = mainTimeLine["TileBitmap" + Ind].height + ((mainTimeLine["TileBitmap" + Ind].width / 50) * 6);
}
o++;
}
}
function AccTabFunc() {
d = 10000;
LevelBuilderMenu.TileMenu.PageMC._x = 154;
LevelBuilderMenu.TileMenu.PageMC._y = 250;
g = 1;
while (g <= TT) {
LevelBuilderMenu.TileMenu["Tile" + g].removeMovieClip();
g++;
}
if (Page == 1) {
g = AS;
while (g <= (ES - 9)) {
trace(g);
LevelBuilderMenu.TileMenu.createEmptyMovieClip("Tile" + g, d);
LevelBuilderMenu.TileMenu["Tile" + g].attachBitmap(mainTimeLine["TileBitmap" + g], LevelBuilderMenu.TileMenu["Tile" + g].getNextHighestDepth());
d++;
g++;
}
LevelBuilderMenu.TileMenu.Tile26._x = -202;
LevelBuilderMenu.TileMenu.Tile26._y = -10;
LevelBuilderMenu.TileMenu.Tile27._x = -144;
LevelBuilderMenu.TileMenu.Tile27._y = -10;
LevelBuilderMenu.TileMenu.Tile28._x = -86;
LevelBuilderMenu.TileMenu.Tile28._y = -10;
LevelBuilderMenu.TileMenu.Tile30._x = -28;
LevelBuilderMenu.TileMenu.Tile30._y = -10;
LevelBuilderMenu.TileMenu.Tile34._x = 30;
LevelBuilderMenu.TileMenu.Tile34._y = -10;
LevelBuilderMenu.TileMenu.Tile31._x = 88;
LevelBuilderMenu.TileMenu.Tile31._y = -10;
LevelBuilderMenu.TileMenu.Tile32._x = 146;
LevelBuilderMenu.TileMenu.Tile32._y = -10;
LevelBuilderMenu.TileMenu.Tile33._x = -202;
LevelBuilderMenu.TileMenu.Tile33._y = 48;
LevelBuilderMenu.TileMenu.Tile29._x = -144;
LevelBuilderMenu.TileMenu.Tile29._y = 48;
LevelBuilderMenu.TileMenu.Tile35._x = -86;
LevelBuilderMenu.TileMenu.Tile35._y = 48;
LevelBuilderMenu.TileMenu.Tile36._x = -28;
LevelBuilderMenu.TileMenu.Tile36._y = 48;
LevelBuilderMenu.TileMenu.Tile37._x = 30;
LevelBuilderMenu.TileMenu.Tile37._y = 48;
LevelBuilderMenu.TileMenu.Tile38._x = 88;
LevelBuilderMenu.TileMenu.Tile38._y = 48;
LevelBuilderMenu.TileMenu.Tile39._x = 146;
LevelBuilderMenu.TileMenu.Tile39._y = 48;
LevelBuilderMenu.TileMenu.Tile40._x = -202;
LevelBuilderMenu.TileMenu.Tile40._y = 106;
LevelBuilderMenu.TileMenu.Tile44._x = -144;
LevelBuilderMenu.TileMenu.Tile44._y = 150;
LevelBuilderMenu.TileMenu.Tile42._x = -76;
LevelBuilderMenu.TileMenu.Tile42._y = 166;
LevelBuilderMenu.TileMenu.Tile41._x = 142;
LevelBuilderMenu.TileMenu.Tile41._y = 152;
LevelBuilderMenu.TileMenu.Tile43._x = -18;
LevelBuilderMenu.TileMenu.Tile43._y = 164;
LevelBuilderMenu.TileMenu.Tile45._x = -202;
LevelBuilderMenu.TileMenu.Tile45._y = 212;
o = 1;
while (o <= TT) {
LevelBuilderMenu.TileMenu["Box" + o].removeMovieClip();
o++;
}
o = 0;
while (o < PieceArray.length) {
Ind = PieceArray[o];
if ((PieceArray[o] >= AS) && (PieceArray[o] <= (ES - 9))) {
LevelBuilderMenu.TileMenu.attachMovie("Box", "Box" + Ind, Ind + 100);
LevelBuilderMenu.TileMenu["Box" + Ind]._x = LevelBuilderMenu.TileMenu["Tile" + Ind]._x - 2;
LevelBuilderMenu.TileMenu["Box" + Ind]._y = LevelBuilderMenu.TileMenu["Tile" + Ind]._y - 1;
LevelBuilderMenu.TileMenu["Box" + Ind]._width = mainTimeLine["TileBitmap" + Ind].width + ((mainTimeLine["TileBitmap" + Ind].width / 50) * 6);
LevelBuilderMenu.TileMenu["Box" + Ind]._height = mainTimeLine["TileBitmap" + Ind].height + ((mainTimeLine["TileBitmap" + Ind].width / 50) * 6);
}
o++;
}
} else if (Page == 2) {
g = ES - 8;
while (g <= (ES - 1)) {
trace(g);
LevelBuilderMenu.TileMenu.createEmptyMovieClip("Tile" + g, d);
LevelBuilderMenu.TileMenu["Tile" + g].attachBitmap(mainTimeLine["TileBitmap" + g], LevelBuilderMenu.TileMenu["Tile" + g].getNextHighestDepth());
LevelBuilderMenu.TileMenu["Tile" + g]._x = -1000;
LevelBuilderMenu.TileMenu["Tile" + g]._y = -1000;
d++;
g++;
}
LevelBuilderMenu.TileMenu.Tile51._x = -202;
LevelBuilderMenu.TileMenu.Tile51._y = -10;
LevelBuilderMenu.TileMenu.Tile46._x = -86;
LevelBuilderMenu.TileMenu.Tile46._y = -10;
LevelBuilderMenu.TileMenu.Tile47._x = 30;
LevelBuilderMenu.TileMenu.Tile47._y = -10;
LevelBuilderMenu.TileMenu.Tile48._x = 100;
LevelBuilderMenu.TileMenu.Tile48._y = -10;
LevelBuilderMenu.TileMenu.Tile49._x = -86;
LevelBuilderMenu.TileMenu.Tile49._y = 106;
LevelBuilderMenu.TileMenu.Tile50._x = -28;
LevelBuilderMenu.TileMenu.Tile50._y = 106;
LevelBuilderMenu.TileMenu.Tile52._x = 155;
LevelBuilderMenu.TileMenu.Tile52._y = 106;
LevelBuilderMenu.TileMenu.Tile53._x = 70;
LevelBuilderMenu.TileMenu.Tile53._y = 106;
o = 1;
while (o <= TT) {
LevelBuilderMenu.TileMenu["Box" + o].removeMovieClip();
o++;
}
o = 0;
while (o < PieceArray.length) {
Ind = PieceArray[o];
if ((PieceArray[o] >= (ES - 8)) && (PieceArray[o] <= (ES - 1))) {
LevelBuilderMenu.TileMenu.attachMovie("Box", "Box" + Ind, Ind + 100);
LevelBuilderMenu.TileMenu["Box" + Ind]._x = LevelBuilderMenu.TileMenu["Tile" + Ind]._x - 2;
LevelBuilderMenu.TileMenu["Box" + Ind]._y = LevelBuilderMenu.TileMenu["Tile" + Ind]._y - 1;
LevelBuilderMenu.TileMenu["Box" + Ind]._width = mainTimeLine["TileBitmap" + Ind].width + ((mainTimeLine["TileBitmap" + Ind].width / 50) * 6);
LevelBuilderMenu.TileMenu["Box" + Ind]._height = mainTimeLine["TileBitmap" + Ind].height + ((mainTimeLine["TileBitmap" + Ind].width / 50) * 6);
}
o++;
}
}
}
function EneTabFunc() {
d = 10000;
g = 1;
while (g <= TT) {
LevelBuilderMenu.TileMenu["Tile" + g].removeMovieClip();
g++;
}
g = ES;
while (g <= TT) {
LevelBuilderMenu.TileMenu.createEmptyMovieClip("Tile" + g, d);
LevelBuilderMenu.TileMenu["Tile" + g].attachBitmap(mainTimeLine["TileBitmap" + g], LevelBuilderMenu.TileMenu["Tile" + g].getNextHighestDepth());
X = Math.floor((g - ES) / 5);
LevelBuilderMenu.TileMenu["Tile" + g]._x = ((75 * ((g - ES) + 1)) - 270) - (378 * X);
LevelBuilderMenu.TileMenu["Tile" + g]._y = (75 * X) - 10;
d++;
g++;
}
o = 1;
while (o <= TT) {
LevelBuilderMenu.TileMenu["Box" + o].removeMovieClip();
o++;
}
o = 0;
while (o < PieceArray.length) {
Ind = PieceArray[o];
if ((PieceArray[o] >= ES) && (PieceArray[o] <= TT)) {
LevelBuilderMenu.TileMenu.attachMovie("Box", "Box" + Ind, Ind + 100);
LevelBuilderMenu.TileMenu["Box" + Ind]._x = LevelBuilderMenu.TileMenu["Tile" + Ind]._x - 2;
LevelBuilderMenu.TileMenu["Box" + Ind]._y = LevelBuilderMenu.TileMenu["Tile" + Ind]._y - 1;
LevelBuilderMenu.TileMenu["Box" + Ind]._width = mainTimeLine["TileBitmap" + Ind].width + ((mainTimeLine["TileBitmap" + Ind].width / 50) * 6);
LevelBuilderMenu.TileMenu["Box" + Ind]._height = mainTimeLine["TileBitmap" + Ind].height + ((mainTimeLine["TileBitmap" + Ind].width / 50) * 6);
}
o++;
}
}
MS.stop();
PlayingMenu = false;
LBS.start(0, 9999);
var Page = 1;
trace("Depth: " + _root.getNextHighestDepth());
LBBG._x = 0;
LBBG._y = 0;
CAWD = _root.getNextHighestDepth();
var LastTab = "Wall";
var TS = 500;
var DungeonStart = 1;
var DungeonEnd = 4;
var RoomEnd = 5;
var BGEnd = 8;
var EnemyEnd = 8;
var PieceArray = [1];
var SS = 6;
var AC = 0;
var AccTile = new Array();
var CurrentTile = 1;
var SelectingTiles = false;
var ShowingHelp = false;
var XTile = 0;
var YTile = 0;
var Level = 0;
var LevelCode = "";
var Encrypted = "";
var oi = 0;
var q = 0;
var BitMap = true;
createEmptyMovieClip("Envi", CAWD);
CAWD++;
Envi.createEmptyMovieClip("Wall", Envi.getNextHighestDepth());
attachMovie("LevelBuilderMenu", "LevelBuilderMenu", 1000000000);
LevelBuilderMenu._x = 170;
LevelBuilderMenu._y = 20;
attachMovie("Bin", "Delete", mainTimeLine.getNextHighestDepth());
Delete._x = 520;
Delete._y = 420;
createEmptyMovieClip("Dragger", mainTimeLine.getNextHighestDepth());
Dragger.attachBitmap(TileBitmap1, 1);
Dragger._alpha = 25;
var MapPiecesLB = new Array();
var Acc = new Array();
var TempMap = [[]];
if (Map[Level].length > 0) {
ForX = Map[Level].length;
x = 0;
while (x < ForX) {
y = 0;
while (y < Map[Level][x].length) {
if (TempMap[x] == undefined) {
TempMap[x] = new Array();
}
if ((((Map[Level][x][y] == 1001) || (Map[Level][x][y] == 1002)) || (Map[Level][x][y] == 1003)) || (Map[Level][x][y] == 1004)) {
Map[Level][x][y] = undefined;
}
TempMap[x][y] = Map[Level][x][y];
y++;
}
x++;
}
var Map = [[]];
x = 0;
while (x < TempMap.length) {
y = 0;
while (y < TempMap[x].length) {
if ((TempMap[x][y] != 0) && (TempMap[x][y] != undefined)) {
CreateTile(TempMap[x][y], x, y, false, true);
}
y++;
}
x++;
}
Envi._x = EnviStartXA[Level] - (50 * TS);
Envi._y = EnviStartYA[Level] - (50 * TS);
} else {
Envi._x = -100000;
Envi._y = -100000;
}
var CharStartY = CharStartYA[Level];
var CharStartX = CharStartXA[Level];
var LRB = LRBA[Level];
var LLB = LLBA[Level];
var LTB = LTBA[Level];
var LBB = LBBA[Level];
if (CharStartYA[Level] != undefined) {
attachMovie("Char", "Char", 1000000);
Char._x = CharStartX;
Char._y = CharStartY;
}
if (mainTimeLine[("AccLoc" + Level) + "X"].length > 0) {
v = 0;
while (v < mainTimeLine[("AccLoc" + Level) + "X"].length) {
trace(mainTimeLine["AccType" + Level][v]);
Acc[v] = new flash.display.BitmapData(mainTimeLine["TileBitmap" + mainTimeLine["AccType" + Level][v]].width, mainTimeLine["TileBitmap" + mainTimeLine["AccType" + Level][v]].height, true, 0);
Acc[v].copyPixels(mainTimeLine["TileBitmap" + mainTimeLine["AccType" + Level][v]], new flash.geom.Rectangle(0, 0, mainTimeLine["TileBitmap" + mainTimeLine["AccType" + Level][v]].width, mainTimeLine["TileBitmap" + mainTimeLine["AccType" + Level][v]].height), new flash.geom.Point(0, 0));
createEmptyMovieClip(["AccH" + v], CAWD);
CAWD++;
mainTimeLine["AccH" + v].attachBitmap(Acc[v], mainTimeLine["AccH" + v].getNextHighestDepth());
if (mainTimeLine["AccType" + Level][v] >= ES) {
mainTimeLine["AccH" + v]._x = mainTimeLine[("AccLoc" + Level) + "X"][v] - (mainTimeLine["TileBitmap" + mainTimeLine["AccType" + Level][v]].width / 2);
mainTimeLine["AccH" + v]._y = mainTimeLine[("AccLoc" + Level) + "Y"][v] - (mainTimeLine["TileBitmap" + mainTimeLine["AccType" + Level][v]].height / 2);
} else {
mainTimeLine["AccH" + v]._x = mainTimeLine[("AccLoc" + Level) + "X"][v];
mainTimeLine["AccH" + v]._y = mainTimeLine[("AccLoc" + Level) + "Y"][v];
}
AccTile[v] = mainTimeLine["AccType" + Level][v];
v++;
}
AC = mainTimeLine[("AccLoc" + Level) + "X"].length;
}
if (mainTimeLine[("ColLoc" + Level) + "X"].length > 0) {
v = 0;
while (v < mainTimeLine[("ColLoc" + Level) + "X"].length) {
attachMovie("Collectable", ["Orb" + v], CAWD);
CAWD++;
mainTimeLine["Orb" + v]._x = mainTimeLine[("ColLoc" + Level) + "X"][v];
mainTimeLine["Orb" + v]._y = mainTimeLine[("ColLoc" + Level) + "Y"][v];
v++;
}
oi = mainTimeLine[("ColLoc" + Level) + "X"].length;
}
var AccPlace = false;
var OrbPlace = false;
var CharPlace = false;
var Deleting = false;
var Down = false;
var Playing = false;
var On = false;
createEmptyMovieClip("box", CAWD);
CAWD++;
box.lineStyle(1, 0, 0, true);
box.moveTo(0, 0);
box.beginFill(0, 0);
box.lineTo(550, 0);
box.lineTo(550, 450);
box.lineTo(0, 450);
box.lineTo(0, 0);
box.endFill();
box.useHandCursor = false;
box.onRollOut = function () {
trace("Off");
On = false;
};
box.onRollOver = function () {
trace("On");
On = true;
};
trace("Depth After: " + _root.getNextHighestDepth());
SetDraggerPos();
onMouseDown = function () {
if (((!Playing) && (!SelectingTiles)) && (!ShowingHelp)) {
if ((!LevelBuilderMenu.hitTest(mainTimeLine._xmouse, mainTimeLine._ymouse, true)) && (!Delete.hitTest(mainTimeLine._xmouse, mainTimeLine._ymouse, true))) {
if (((((!Down) && (!CharPlace)) && (!OrbPlace)) && (!AccPlace)) && (!Deleting)) {
GetTile();
FoundArr = false;
r = 0;
while (r < PieceArray.length) {
if (Map[Level][XTile][YTile] == PieceArray[r]) {
FoundArr = true;
break;
}
r++;
}
if (!FoundArr) {
Map[Level][XTile][YTile] = CurrentTile;
CreateTile(Map[Level][XTile][YTile], XTile, YTile, true, false);
ChangeDragger("Bitmap");
}
Down = true;
}
if (AccPlace) {
if (Allowed("PlacingEnemy")) {
Acc[AC] = new flash.display.BitmapData(mainTimeLine["TileBitmap" + PieceArray[0]].width, mainTimeLine["TileBitmap" + PieceArray[0]].height, true, 0);
Acc[AC].copyPixels(mainTimeLine["TileBitmap" + PieceArray[0]], new flash.geom.Rectangle(0, 0, mainTimeLine["TileBitmap" + PieceArray[0]].width, mainTimeLine["TileBitmap" + PieceArray[0]].height), new flash.geom.Point(0, 0));
createEmptyMovieClip(["AccH" + AC], CAWD);
CAWD++;
mainTimeLine["AccH" + AC].attachBitmap(Acc[AC], mainTimeLine["AccH" + AC].getNextHighestDepth());
mainTimeLine["AccH" + AC]._x = mainTimeLine._xmouse - (mainTimeLine["TileBitmap" + PieceArray[0]].width / 2);
mainTimeLine["AccH" + AC]._y = mainTimeLine._ymouse - (mainTimeLine["TileBitmap" + PieceArray[0]].height / 2);
AccTile[AC] = PieceArray[0];
AC++;
}
ChangeDragger("Bitmap", "", true);
}
if (CharPlace) {
if (Allowed("PlacingChar")) {
attachMovie("Char", "Char", 1000000);
Char._x = mainTimeLine._xmouse;
Char._y = mainTimeLine._ymouse;
}
if (PieceArray[0] >= AS) {
ChangeDragger("Bitmap", "", true);
} else {
ChangeDragger("Bitmap");
}
CheckKeys();
}
if (OrbPlace) {
attachMovie("Collectable", "Orb" + oi, CAWD);
CAWD++;
mainTimeLine["Orb" + oi]._x = mainTimeLine._xmouse;
mainTimeLine["Orb" + oi]._y = mainTimeLine._ymouse;
oi++;
if (PieceArray[0] >= AS) {
ChangeDragger("Bitmap", "", true);
} else {
ChangeDragger("Bitmap");
}
CheckKeys();
}
if (Deleting) {
if (PieceArray[0] >= AS) {
ChangeDragger("Bitmap", "", true);
} else {
CheckKeys();
ChangeDragger("Bitmap");
CheckKeys();
}
Down = true;
Hit = false;
var _local1 = mainTimeLine._xmouse;
var _local2 = mainTimeLine._ymouse;
z = 0;
while (z < mainTimeLine.oi) {
if (mainTimeLine["Orb" + z].hitTest(_local1, _local2, false)) {
mainTimeLine["Orb" + z].removeMovieClip();
Hit = true;
break;
}
z++;
}
if (!Hit) {
z = 0;
while (z < AC) {
if (mainTimeLine["AccH" + z].hitTest(_local1, _local2, true)) {
mainTimeLine["AccH" + z].removeMovieClip();
Hit = true;
break;
}
z++;
}
}
if (!Hit) {
z = 0;
while (z < q) {
if (mainTimeLine.Envi.Wall["MapPiece" + z].hitTest(_local1, _local2, true)) {
mainTimeLine.Envi.Wall["MapPiece" + z].removeMovieClip();
GetTile();
Map[Level][XTile][YTile] = undefined;
break;
}
z++;
}
}
if (PieceArray[0] >= AS) {
ChangeDragger("Bitmap", "", true);
} else {
ChangeDragger("Bitmap");
}
Deleting = false;
CheckKeys();
}
}
}
};
onMouseUp = function () {
if (!LevelBuilderMenu.ExportButton.hitTest(mainTimeLine._xmouse, mainTimeLine._ymouse, true)) {
LevelBuilderMenu.ExportButton.gotoAndStop("Neutral");
}
if (!LevelBuilderMenu.TilesButton.hitTest(mainTimeLine._xmouse, mainTimeLine._ymouse, true)) {
LevelBuilderMenu.TilesButton.gotoAndStop("Neutral");
}
if (!LevelBuilderMenu.MenuButton.hitTest(mainTimeLine._xmouse, mainTimeLine._ymouse, true)) {
LevelBuilderMenu.MenuButton.gotoAndStop("Neutral");
}
if (((!Playing) && (!SelectingTiles)) && (!ShowingHelp)) {
SetDraggerPos();
if (CharPlace) {
CharPlace = false;
} else if (Deleting) {
Deleting = false;
Down = false;
} else if (OrbPlace) {
OrbPlace = false;
} else if (((!Test.hitTest(mainTimeLine._xmouse, mainTimeLine._ymouse, false)) && (!Export.hitTest(mainTimeLine._xmouse, mainTimeLine._ymouse, false))) && (Down)) {
Down = false;
}
if (!LevelBuilderMenu.ExportButton.hitTest(mainTimeLine._xmouse, mainTimeLine._ymouse, true)) {
LevelBuilderMenu.ExportButton.gotoAndStop("Neutral");
}
if (!LevelBuilderMenu.TilesButton.hitTest(mainTimeLine._xmouse, mainTimeLine._ymouse, true)) {
LevelBuilderMenu.TilesButton.gotoAndStop("Neutral");
}
} else if (ShowingHelp) {
if (InfoBox.ContBuildingBtn.hitTest(mainTimeLine._xmouse, mainTimeLine._ymouse, true)) {
SetDraggerPos();
CheckKeys();
InfoBox.removeMovieClip();
ShowingHelp = false;
Down = false;
} else {
InfoBox.ContBuildingBtn.gotoAndStop("Neutral");
}
if (InfoBox.ContBuildingBtn2.hitTest(mainTimeLine._xmouse, mainTimeLine._ymouse, true)) {
SetDraggerPos();
CheckKeys();
InfoBox.removeMovieClip();
ShowingHelp = false;
Down = false;
} else {
InfoBox.ContBuildingBtn2.gotoAndStop("Neutral");
}
if (InfoBox.TestOEBtn.hitTest(mainTimeLine._xmouse, mainTimeLine._ymouse, true)) {
InfoBox.removeMovieClip();
ShowingHelp = false;
Down = false;
PrepareLevelVars();
Level = 0;
gotoAndStop ("Game");
} else {
InfoBox.TestOEBtn.gotoAndStop("Neutral");
}
if (InfoBox.CopyButton.hitTest(mainTimeLine._xmouse, mainTimeLine._ymouse, true)) {
System.setClipboard(InfoBox.LevelCodeT.text);
} else {
InfoBox.CopyButton.gotoAndStop("Neutral");
}
if (InfoBox.YesBtn.hitTest(mainTimeLine._xmouse, mainTimeLine._ymouse, true)) {
PrepareLevelVars();
mainTimeLine[("ColLoc" + mainTimeLine.Level) + "X"] = new Array();
mainTimeLine[("ColLoc" + mainTimeLine.Level) + "Y"] = new Array();
mainTimeLine[("AccLoc" + Level) + "X"] = new Array();
mainTimeLine[("AccLoc" + Level) + "Y"] = new Array();
mainTimeLine["AccType" + Level] = new Array();
CharStartXA[Level] = undefined;
CharStartYA[Level] = undefined;
EnviStartYA[Level] = undefined;
EnviStartXA[Level] = undefined;
var _local2 = new Array();
InfoBox.removeMovieClip();
ShowingHelp = false;
gotoAndStop ("QS2");
} else {
InfoBox.YesBtn.gotoAndStop("Neutral");
}
if (InfoBox.NoBtn.hitTest(mainTimeLine._xmouse, mainTimeLine._ymouse, true)) {
SetDraggerPos();
CheckKeys();
InfoBox.removeMovieClip();
ShowingHelp = false;
Down = false;
} else {
InfoBox.NoBtn.gotoAndStop("Neutral");
}
if (InfoBox.MenuBtn.hitTest(mainTimeLine._xmouse, mainTimeLine._ymouse, true)) {
InfoBox.removeMovieClip();
ShowingHelp = false;
Down = false;
PrepareLevelVars();
gotoAndStop ("Menu");
} else {
InfoBox.MenuBtn.gotoAndStop("Neutral");
}
if (InfoBox.SaveBtn.hitTest(mainTimeLine._xmouse, mainTimeLine._ymouse, true)) {
if ((InfoBox.Submitter.text != "") && (InfoBox.LevelName.text != "")) {
vars = new LoadVars();
save_check = new LoadVars();
vars.LevelInfo = InfoBox.LevelCodeT.text;
vars.Submitter = InfoBox.Submitter.text;
vars.LevelName = InfoBox.LevelName.text;
save_check.onLoad = function () {
if (this.response == "passed") {
InfoBox.Message.text = "Success!";
} else if (this.response == "named") {
InfoBox.Message.text = "Level Name is already used.";
} else if (this.response == "level") {
InfoBox.Message.text = "Level already submitted.";
}
};
vars.sendAndLoad("http://www.fullergames.com/Ninja/save_level.php", save_check, "POST");
} else if (InfoBox.Submitter.text == "") {
InfoBox.Message.text = "You forgot to enter your name!";
} else if (InfoBox.LevelName.text == "") {
InfoBox.Message.text = "You forgot to name your level!";
}
} else {
InfoBox.SaveBtn.gotoAndStop("Neutral");
}
} else if (SelectingTiles) {
if (LevelBuilderMenu.TileMenu.ExitTileButton.hitTest(mainTimeLine._xmouse, mainTimeLine._ymouse, true)) {
SelectingTiles = false;
LevelBuilderMenu.TileMenu.removeMovieClip();
} else {
LevelBuilderMenu.TileMenu.ExitTileButton.gotoAndStop("Neutral");
}
if (LevelBuilderMenu.TileMenu.BGTab.hitTest(mainTimeLine._xmouse, mainTimeLine._ymouse, true)) {
LevelBuilderMenu.TileMenu.PageMC._x = -1000;
LevelBuilderMenu.TileMenu.PageMC._y = -1000;
BGTabFunc();
LastTab = "BG";
}
if (LevelBuilderMenu.TileMenu.WallTab.hitTest(mainTimeLine._xmouse, mainTimeLine._ymouse, true)) {
LevelBuilderMenu.TileMenu.PageMC._x = -1000;
LevelBuilderMenu.TileMenu.PageMC._y = -1000;
WallTabFunc();
LastTab = "Wall";
}
if (LevelBuilderMenu.TileMenu.EneTab.hitTest(mainTimeLine._xmouse, mainTimeLine._ymouse, true)) {
LevelBuilderMenu.TileMenu.PageMC._x = -1000;
LevelBuilderMenu.TileMenu.PageMC._y = -1000;
EneTabFunc();
LastTab = "Ene";
}
if (LevelBuilderMenu.TileMenu.AccTab.hitTest(mainTimeLine._xmouse, mainTimeLine._ymouse, true)) {
LevelBuilderMenu.TileMenu.PageMC._x = 154;
LevelBuilderMenu.TileMenu.PageMC._y = 250;
AccTabFunc();
LastTab = "Acc";
}
if (LevelBuilderMenu.TileMenu.PageMC.hitTest(mainTimeLine._xmouse, mainTimeLine._ymouse, true)) {
trace("HitPage");
if (Page == 1) {
Page = 2;
} else if (Page == 2) {
Page = 1;
}
AccTabFunc();
trace(Page);
}
}
};
onMouseMove = function () {
if (((!Playing) && (!SelectingTiles)) && (!ShowingHelp)) {
SetDraggerPos();
CheckKeys();
if (Down && (Deleting)) {
if (PieceArray[0] >= AS) {
ChangeDragger("Bitmap", "", true);
} else {
ChangeDragger("Bitmap");
}
Down = true;
Hit = false;
var _local1 = mainTimeLine._xmouse;
var _local2 = mainTimeLine._ymouse;
z = 0;
while (z < mainTimeLine.oi) {
if (mainTimeLine["Orb" + z].hitTest(_local1, _local2, false)) {
mainTimeLine["Orb" + z].removeMovieClip();
Hit = true;
break;
}
z++;
}
if (!Hit) {
z = 0;
while (z < AC) {
if (mainTimeLine["AccH" + z].hitTest(_local1, _local2, true)) {
mainTimeLine["AccH" + z].removeMovieClip();
Hit = true;
break;
}
z++;
}
}
if (!Hit) {
z = 0;
while (z < q) {
if (mainTimeLine.Envi.Wall["MapPiece" + z].hitTest(_local1, _local2, true)) {
mainTimeLine.Envi.Wall["MapPiece" + z].removeMovieClip();
GetTile();
Map[Level][XTile][YTile] = undefined;
break;
}
z++;
}
}
if (PieceArray[0] >= AS) {
ChangeDragger("Bitmap", "", true);
} else {
ChangeDragger("Bitmap");
}
Deleting = false;
CheckKeys();
}
}
};
onEnterFrame = function () {
if (((!Playing) && (!SelectingTiles)) && (!ShowingHelp)) {
CheckKeys();
if (Down) {
if (!Deleting) {
GetTile();
FoundArr = false;
r = 0;
while (r < PieceArray.length) {
if (Map[Level][XTile][YTile] == PieceArray[r]) {
FoundArr = true;
break;
}
r++;
}
if (!FoundArr) {
Map[Level][XTile][YTile] = CurrentTile;
CreateTile(Map[Level][XTile][YTile], XTile, YTile, true, false);
ChangeDragger("Bitmap");
}
}
}
}
if (!ShowingHelp) {
if (On) {
if ((mainTimeLine._xmouse > 520) && (mainTimeLine._xmouse < 550)) {
MoveLevel("x", -SS);
}
if ((mainTimeLine._xmouse < 30) && (mainTimeLine._xmouse > 0)) {
MoveLevel("x", SS);
}
if ((mainTimeLine._ymouse < 30) && (mainTimeLine._ymouse > 0)) {
MoveLevel("y", SS);
}
if ((mainTimeLine._ymouse > 420) && (mainTimeLine._ymouse < 450)) {
MoveLevel("y", -SS);
}
}
if (Key.isDown(37)) {
MoveLevel("x", SS * 3);
}
if (Key.isDown(39)) {
MoveLevel("x", (-SS) * 3);
}
if (Key.isDown(38)) {
MoveLevel("y", SS * 3);
}
if (Key.isDown(40)) {
MoveLevel("y", (-SS) * 3);
}
}
};
keyListener = new Object();
Key.addListener(keyListener);
keyListener.onKeyUp = function () {
var _local1 = Key.getCode();
if (((_local1 == 32) && (SelectingTiles)) && (!ShowingHelp)) {
i = 0;
while (i <= PieceArray.length) {
LevelBuilderMenu.TileMenu["Box" + PieceArray[i]].removeMovieClip();
i++;
}
PieceArray.splice(0, PieceArray.length);
trace("Array: " + PieceArray);
ChangeDragger("Bitmap");
}
if (!ShowingHelp) {
if (_local1 == 32) {
Deleting = false;
if (PieceArray[0] >= AS) {
ChangeDragger("Bitmap", "", true);
} else {
ChangeDragger("Bitmap");
}
}
if (_local1 == 84) {
if (Allowed("PrepareLevelVars")) {
Playing = true;
Level = 0;
PrepareLevelVars();
gotoAndStop ("Game");
}
}
if (_local1 == 69) {
if (Allowed("PrepareLevelVars")) {
if ((!ShowingHelp) && (!SelectingTiles)) {
ShowingHelp = true;
attachMovie("InfoBox", "InfoBox", getNextHighestDepth());
InfoBox._x = 275;
InfoBox._y = 225;
InfoBox.gotoAndStop("Export");
PrepareLevelVars(true);
PrepareLevelCode();
InfoBox.LevelCodeT.text = Encrypted;
} else if (ShowingHelp && (!SelectingTiles)) {
InfoBox.removeMovieClip();
ShowingHelp = false;
Down = false;
}
}
}
if (_local1 == 77) {
if ((!SelectingTiles) && (!ShowingHelp)) {
OpenTileMenu();
} else if (SelectingTiles && (!ShowingHelp)) {
SelectingTiles = false;
LevelBuilderMenu.TileMenu.removeMovieClip();
}
}
if (_local1 == 72) {
if ((!ShowingHelp) && (!SelectingTiles)) {
ShowingHelp = true;
attachMovie("InfoBox", "InfoBox", getNextHighestDepth());
InfoBox._x = 275;
InfoBox._y = 225;
InfoBox.gotoAndStop("Instructions");
} else if (ShowingHelp && (!SelectingTiles)) {
InfoBox.removeMovieClip();
ShowingHelp = false;
}
}
if (_local1 == 83) {
}
}
};
LevelBuilderMenu.TestButton.onRelease = function () {
if (Allowed("PrepareLevelVars")) {
Playing = true;
Level = 0;
PrepareLevelVars();
gotoAndStop ("Game");
}
};
LevelBuilderMenu.MenuButton.onRelease = function () {
PrepareLevelVars(false);
box.removeMovieClip();
gotoAndStop ("Menu");
};
LevelBuilderMenu.ExportButton.onRelease = function () {
if (Allowed("PrepareLevelVars")) {
if ((!ShowingHelp) && (!SelectingTiles)) {
ShowingHelp = true;
attachMovie("InfoBox", "InfoBox", getNextHighestDepth());
InfoBox._x = 275;
InfoBox._y = 225;
InfoBox.gotoAndStop("Export");
PrepareLevelVars(true);
PrepareLevelCode();
InfoBox.LevelCodeT.text = Encrypted;
} else if (ShowingHelp && (!SelectingTiles)) {
InfoBox.removeMovieClip();
ShowingHelp = false;
Down = false;
}
}
};
Delete.onRelease = function () {
if ((!ShowingHelp) && (!SelectingTiles)) {
ShowingHelp = true;
attachMovie("InfoBox", "InfoBox", getNextHighestDepth());
InfoBox._x = 275;
InfoBox._y = 225;
InfoBox.gotoAndStop("AreYouSure");
}
};
LevelBuilderMenu.InstructionsButton.onRelease = function () {
if ((!ShowingHelp) && (!SelectingTiles)) {
ShowingHelp = true;
attachMovie("InfoBox", "InfoBox", getNextHighestDepth());
InfoBox._x = 275;
InfoBox._y = 225;
InfoBox.gotoAndStop("Instructions");
} else if (ShowingHelp && (!SelectingTiles)) {
InfoBox.removeMovieClip();
ShowingHelp = false;
Down = false;
}
};
LevelBuilderMenu.TilesButton.onRelease = function () {
if ((!SelectingTiles) && (!ShowingHelp)) {
OpenTileMenu();
} else if (SelectingTiles && (!ShowingHelp)) {
SelectingTiles = false;
LevelBuilderMenu.TileMenu.removeMovieClip();
}
};
Frame 10
LevelCodeT.text = Encrypted;
TestOEButton.onRelease = function () {
Level = 0;
gotoAndStop ("Game");
};
CopyButton.onRelease = function () {
System.setClipboard(LevelCodeT.text);
};
BacktoMenuButton.onRelease = function () {
gotoAndStop ("Menu");
};
vars = new LoadVars();
save_check = new LoadVars();
SaveBtn.onRelease = function () {
vars.LevelInfo = LevelCodeT.text;
vars.Submitter = Submitter.text;
vars.LevelName = LevelName.text;
save_check.onLoad = function () {
if (this.response == "passed") {
Message.text = "Success!";
} else if ((this.response = "named")) {
Message.text = "Level Name is already used.";
} else if ((this.response = "level")) {
Message.text = "Level already submitted.";
}
};
vars.sendAndLoad("http://www.fullergames.com/Ninja/save_level.php", save_check, "POST");
};
Frame 11
gotoAndStop ("Game");
Frame 12
stop();
BacktoMenuButton.onRelease = function () {
gotoAndStop ("Menu");
};
Frame 13
function SetText() {
mainTimeLine[Changing + "Key"].text = GetEnglish(keys["" + Changing]);
}
function GetEnglish(keyCode) {
if (keyCode == 8) {
return("BackSpace");
}
if (keyCode == 19) {
return("Pause/Break");
}
if (keyCode == 145) {
return("ScrollLock");
}
if (keyCode == 144) {
return("NumLock");
}
if (keyCode == 46) {
return("Delete");
}
if (keyCode == 45) {
return("Insert");
}
if (keyCode == 40) {
return("Down");
}
if (keyCode == 39) {
return("Right");
}
if (keyCode == 38) {
return("Up");
}
if (keyCode == 37) {
return("Left");
}
if (keyCode == 9) {
return("Tab");
}
if (keyCode == 13) {
return("Enter");
}
if (keyCode == 16) {
return("Shift");
}
if (keyCode == 17) {
return("Ctrl");
}
if (keyCode == 20) {
return("Caps Lock");
}
if (keyCode == 27) {
return("Esc");
}
if (keyCode == 32) {
return("Space");
}
if (keyCode == 33) {
return("Page Up");
}
if (keyCode == 34) {
return("Page Down");
}
if (keyCode == 35) {
return("End");
}
if (keyCode == 36) {
return("Home");
}
return(chr(keyCode));
}
trace("M:" + M);
if (!M) {
Slide2YVal = SliderBar._y + 100;
}
if (!SFX) {
SlideYVal = SliderBar2._y + 100;
}
ScrollingOut = true;
var OptTextTween = (new mx.transitions.Tween(OptText, "_y", mx.transitions.easing.Strong.easeOut, -400, OptText._y, 1.5, true));
var ChangeLeftTween = (new mx.transitions.Tween(ChangeLeft, "_y", mx.transitions.easing.Strong.easeOut, -200, ChangeLeft._y, 1.5, true));
var ChangeRightTween = (new mx.transitions.Tween(ChangeRight, "_y", mx.transitions.easing.Strong.easeOut, -150, ChangeRight._y, 1.5, true));
var ChangeJumpTween = (new mx.transitions.Tween(ChangeJump, "_y", mx.transitions.easing.Strong.easeOut, -100, ChangeJump._y, 1.5, true));
var ChangeKunaiTween = (new mx.transitions.Tween(ChangeKunai, "_y", mx.transitions.easing.Strong.easeOut, -50, ChangeKunai._y, 1.5, true));
var SliderTween = (new mx.transitions.Tween(Slider, "_y", mx.transitions.easing.Strong.easeOut, -50, SlideYVal, 1.5, true));
var Slider2Tween = (new mx.transitions.Tween(Slider2, "_y", mx.transitions.easing.Strong.easeOut, -50, Slide2YVal, 1.5, true));
var SliderBarTween = (new mx.transitions.Tween(SliderBar, "_y", mx.transitions.easing.Strong.easeOut, -50, SliderBar._y, 1.5, true));
var SliderBar2Tween = (new mx.transitions.Tween(SliderBar2, "_y", mx.transitions.easing.Strong.easeOut, -50, SliderBar2._y, 1.5, true));
var RDBTween = (new mx.transitions.Tween(RDB, "_y", mx.transitions.easing.Strong.easeOut, -50, RDB._y, 1.5, true));
var EDBTween = (new mx.transitions.Tween(EDB, "_y", mx.transitions.easing.Strong.easeOut, -50, EDB._y, 1.5, true));
var BacktoMenuButtonTween = (new mx.transitions.Tween(BacktoMenuButton, "_y", mx.transitions.easing.Strong.easeOut, -50, BacktoMenuButton._y, 1.5, true));
var MessageTween = (new mx.transitions.Tween(Message, "_y", mx.transitions.easing.Strong.easeOut, -50, Message._y, 1.5, true));
var IncreaseQualTween = (new mx.transitions.Tween(IncreaseQual, "_y", mx.transitions.easing.Strong.easeOut, -50, IncreaseQual._y, 1.5, true));
var DecreaseQualTween = (new mx.transitions.Tween(DecreaseQual, "_y", mx.transitions.easing.Strong.easeOut, -50, DecreaseQual._y, 1.5, true));
var QualityDisplayTween = (new mx.transitions.Tween(QualityDisplay, "_y", mx.transitions.easing.Strong.easeOut, -50, QualityDisplay._y, 1.5, true));
var RightKeyTween = (new mx.transitions.Tween(RightKey, "_y", mx.transitions.easing.Strong.easeOut, -110, RightKey._y, 1.5, true));
var LeftKeyTween = (new mx.transitions.Tween(LeftKey, "_y", mx.transitions.easing.Strong.easeOut, -140, LeftKey._y, 1.5, true));
var JumpKeyTween = (new mx.transitions.Tween(JumpKey, "_y", mx.transitions.easing.Strong.easeOut, -80, JumpKey._y, 1.5, true));
var KunaiKeyTween = (new mx.transitions.Tween(KunaiKey, "_y", mx.transitions.easing.Strong.easeOut, -50, KunaiKey._y, 1.5, true));
KunaiKeyTween.onMotionFinished = function () {
ScrollingOut = false;
};
if (mainTimeLine._quality == "HIGH") {
QualityDisplay.text = "High";
} else if (mainTimeLine._quality == "MEDIUM") {
QualityDisplay.text = "Medium";
} else if (mainTimeLine._quality == "LOW") {
QualityDisplay.text = "Low";
}
LeftKey.text = GetEnglish(keys.Left);
RightKey.text = GetEnglish(keys.Right);
JumpKey.text = GetEnglish(keys.Jump);
KunaiKey.text = GetEnglish(keys.Kunai);
AimST.text = AimS;
stop();
var Changing = "";
BacktoMenuButton.onRelease = function () {
trace("CLICKED!");
ScrollingOut = true;
Key.removeListener(keyListener);
var _local19 = new mx.transitions.Tween(OptText, "_y", mx.transitions.easing.Strong.easeOut, OptText._y, 550, 1.5, true);
var _local5 = new mx.transitions.Tween(ChangeLeft, "_y", mx.transitions.easing.Strong.easeOut, ChangeLeft._y, 520, 1.5, true);
var _local15 = new mx.transitions.Tween(ChangeRight, "_y", mx.transitions.easing.Strong.easeOut, ChangeRight._y, 520, 1.5, true);
var _local18 = new mx.transitions.Tween(ChangeJump, "_y", mx.transitions.easing.Strong.easeOut, ChangeJump._y, 530, 1.5, true);
var _local17 = new mx.transitions.Tween(ChangeKunai, "_y", mx.transitions.easing.Strong.easeOut, ChangeKunai._y, 560, 1.5, true);
var _local11 = new mx.transitions.Tween(Slider, "_y", mx.transitions.easing.Strong.easeOut, SlideYVal, 520, 1.5, true);
var _local10 = new mx.transitions.Tween(Slider2, "_y", mx.transitions.easing.Strong.easeOut, Slide2YVal, 520, 1.5, true);
var _local6 = new mx.transitions.Tween(SliderBar, "_y", mx.transitions.easing.Strong.easeOut, SliderBar._y, 520, 1.5, true);
var _local13 = new mx.transitions.Tween(SliderBar2, "_y", mx.transitions.easing.Strong.easeOut, SliderBar2._y, 520, 1.5, true);
var _local20 = new mx.transitions.Tween(RDB, "_y", mx.transitions.easing.Strong.easeOut, RDB._y, 500, 1.5, true);
var _local16 = new mx.transitions.Tween(EDB, "_y", mx.transitions.easing.Strong.easeOut, EDB._y, 500, 1.5, true);
var _local14 = new mx.transitions.Tween(IncreaseQual, "_y", mx.transitions.easing.Strong.easeOut, IncreaseQual._y, 520, 1.5, true);
var _local9 = new mx.transitions.Tween(DecreaseQual, "_y", mx.transitions.easing.Strong.easeOut, DecreaseQual._y, 520, 1.5, true);
var _local7 = new mx.transitions.Tween(QualityDisplay, "_y", mx.transitions.easing.Strong.easeOut, QualityDisplay._y, 520, 1.5, true);
var _local3 = new mx.transitions.Tween(RightKey, "_y", mx.transitions.easing.Strong.easeOut, RightKey._y, 520, 1.5, true);
var _local12 = new mx.transitions.Tween(LeftKey, "_y", mx.transitions.easing.Strong.easeOut, LeftKey._y, 520, 1.5, true);
var _local4 = new mx.transitions.Tween(JumpKey, "_y", mx.transitions.easing.Strong.easeOut, JumpKey._y, 520, 1.5, true);
var _local8 = new mx.transitions.Tween(KunaiKey, "_y", mx.transitions.easing.Strong.easeOut, KunaiKey._y, 520, 1.5, true);
var _local2 = new mx.transitions.Tween(BacktoMenuButton, "_y", mx.transitions.easing.Strong.easeOut, BacktoMenuButton._y, 500, 1.5, true);
var _local1 = new mx.transitions.Tween(Message, "_y", mx.transitions.easing.Strong.easeOut, Message._y, 520, 1.5, true);
_local1.onMotionFinished = function () {
gotoAndStop ("Menu");
};
};
keyListener = new Object();
Key.addListener(keyListener);
keyListener.onKeyUp = function () {
var _local1 = Key.getCode();
keys["" + Changing] = _local1;
mainTimeLine[Changing + "Key"].text = GetEnglish(_local1);
SavedGame = SharedObject.getLocal("NinjaSave");
SavedGame.data.Controls = keys;
SavedGame.flush();
Changing = "";
};
ChangeLeft.onRelease = function () {
SetText();
Changing = "Left";
mainTimeLine[Changing + "Key"].text = "Press a key!";
};
ChangeRight.onRelease = function () {
SetText();
Changing = "Right";
mainTimeLine[Changing + "Key"].text = "Press a key!";
};
ChangeJump.onRelease = function () {
SetText();
Changing = "Jump";
mainTimeLine[Changing + "Key"].text = "Press a key!";
};
ChangeRope.onRelease = function () {
SetText();
Changing = "Rope";
mainTimeLine[Changing + "Key"].text = "Press a key!";
};
ChangeKunai.onRelease = function () {
SetText();
Changing = "Kunai";
mainTimeLine[Changing + "Key"].text = "Press a key!";
};
IncreaseQual.onRelease = function () {
if (mainTimeLine._quality == "HIGH") {
mainTimeLine._quality = "LOW";
QualityDisplay.text = "Low";
} else if (mainTimeLine._quality == "MEDIUM") {
mainTimeLine._quality = "HIGH";
QualityDisplay.text = "High";
} else if (mainTimeLine._quality == "LOW") {
mainTimeLine._quality = "MEDIUM";
QualityDisplay.text = "Medium";
}
};
DecreaseQual.onRelease = function () {
if (mainTimeLine._quality == "HIGH") {
mainTimeLine._quality = "MEDIUM";
QualityDisplay.text = "Medium";
} else if (mainTimeLine._quality == "MEDIUM") {
mainTimeLine._quality = "LOW";
QualityDisplay.text = "Low";
} else if (mainTimeLine._quality == "LOW") {
mainTimeLine._quality = "HIGH";
QualityDisplay.text = "High";
}
};
EDB.onRelease = function () {
SavedGame = SharedObject.getLocal("NinjaSave");
SavedGame.data.TimesNum = eval (undefined)();
SavedGame.data.TimesString = eval (undefined)();
i = 0;
while (i <= 6) {
BestTime[i] = 1E16;
BestTimeT[i] = "99:59.99";
i++;
}
Message.text = "Saved data erased.";
};
RDB.onRelease = function () {
keys.Left = 65;
keys.Right = 68;
keys.Jump = 87;
keys.Kunai = 32;
AimS = 5;
SavedGame = SharedObject.getLocal("NinjaSave");
SavedGame.data.Controls = keys;
SavedGame.data.AimerSens = AimS;
SavedGame.flush();
LeftKey.text = GetEnglish(keys.Left);
RightKey.text = GetEnglish(keys.Right);
JumpKey.text = GetEnglish(keys.Jump);
RopeKey.text = GetEnglish(keys.Rope);
KunaiKey.text = GetEnglish(keys.Kunai);
AimST.text = AimS;
Message.text = "Defaults restored.";
};
onMouseUp = function () {
Slider.stopDrag();
Slider2.stopDrag();
};
Slider2.onPress = function () {
Slider2.startDrag(true, 413.5, SliderBar2._y, 413.5, SliderBar2._y + 100);
};
Slider2.onMouseMove = function () {
if (!ScrollingOut) {
newPoint = new Object();
newPoint.x = this._x;
newPoint.y = this._y;
SliderBar2.globalToLocal(newPoint);
Vol = (SliderBar2._height - ((SliderBar2._height + SliderBar2._y) - Slider2._y)) / SliderBar2._height;
Vol = Vol * -100;
Vol = -100 - Vol;
Vol = Vol + 1.5;
LS.setVolume(Vol * 2);
MS.setVolume(Vol / 2);
GoS.setVolume(Vol);
LBS.setVolume(Vol);
WS.setVolume(Vol);
VolBG = Vol;
if (VolBG > 0) {
M = false;
} else {
M = true;
}
Slide2YVal = Slider2._y;
SavedGame = SharedObject.getLocal("NinjaSave");
SavedGame.data.Vol2 = Vol;
SavedGame.data.VolY2 = Slide2YVal;
SavedGame.flush();
}
};
Slider.onPress = function () {
Slider.startDrag(true, 475.5, SliderBar._y, 475.5, SliderBar._y + 100);
};
Slider.onMouseMove = function () {
if (!ScrollingOut) {
newPoint = new Object();
newPoint.x = this._x;
newPoint.y = this._y;
SliderBar.globalToLocal(newPoint);
Vol = (SliderBar._height - ((SliderBar._height + SliderBar._y) - Slider._y)) / SliderBar._height;
Vol = Vol * -100;
Vol = -100 - Vol;
Vol = Vol + 1.5;
SlideYVal = Slider._y;
SavedGame = SharedObject.getLocal("NinjaSave");
VolSFX = Vol;
if (VolSFX > 0) {
SFX = false;
} else {
SFX = true;
}
CS.setVolume(VolSFX / 4);
GS.setVolume(VolSFX * 2);
HS.setVolume(VolSFX * 2);
ThrKunS.setVolume(VolSFX * 2);
ThrRopS.setVolume(VolSFX * 2);
StpS.setVolume(VolSFX * 2);
JmpS.setVolume(VolSFX * 2);
KBatS.setVolume(VolSFX * 2);
SavedGame.data.Vol = Vol;
SavedGame.data.VolY = SlideYVal;
SavedGame.flush();
}
};
Frame 14
GoS.start(0, 9999);
mainTimeLine.BestTimeText = mainTimeLine.BestTimeT[Level];
if (Level == 0) {
EditGOBtn._x = 485.3;
EditGOBtn._y = 144.11;
}
EditGOBtn.onRelease = function () {
GoS.stop();
gotoAndStop ("LevelBuilder");
};
TryAgainButton.onRelease = function () {
GoS.stop();
gotoAndStop ("Game");
};
LevelSelectButton.onRelease = function () {
GoS.stop();
gotoAndStop ("Menu");
};
Frame 15
function time_to_string(time_to_convert) {
var _local3 = Math.floor(time_to_convert / 3600000);
var _local1 = time_to_convert - (_local3 * 3600000);
var _local4 = Math.floor(_local1 / 60000);
_local1 = _local1 - (_local4 * 60000);
var _local2 = Math.floor(_local1 / 1000);
_local1 = _local1 - (_local2 * 1000);
var _local5 = Math.floor(_local1 / 10);
var _local10 = ((_local3 < 10) ? ("0" + _local3.toString()) : (_local3.toString()));
var _local8 = ((_local4 < 10) ? ("0" + _local4.toString()) : (_local4.toString()));
var _local6 = ((_local2 < 10) ? ("0" + _local2.toString()) : (_local2.toString()));
var _local7 = ((_local5 < 10) ? ("0" + _local5.toString()) : ((hundredths = _local5.toString())));
return((((_local8 + ":") + _local6) + ".") + _local7);
}
function SendRating(RateNum) {
if (LoadedALevel) {
vars = new LoadVars();
save_check = new LoadVars();
vars.Rating = RateNum;
vars.LevelInfo = LevelInfoT.text;
vars.Submitter = SubmitterT.text;
vars.LevelName = LevelNameT.text;
save_check.onLoad = function () {
if (this.response == "passed") {
Message.text = "Success!";
RatingT.text = Math.round(this.Rate * 100) / 100;
} else if (this.response == "voted") {
Message.text = "You have already voted once.";
} else {
Message.text = "Failed";
}
};
vars.sendAndLoad("http://www.fullergames.com/Ninja/rate_level.php", save_check, "POST");
} else {
Message.text = "Please load a level.";
}
}
function ImportLevel(LevelSet, Exception, Ecode) {
trace("Called");
var _local3 = LevelSet + "X";
var _local2 = LevelSet + "Y";
var _local7 = LevelSet + "X";
var _local6 = LevelSet + "Y";
Decrypted = "";
mainTimeLine[("AccLoc" + LevelSet) + "X"] = new Array();
mainTimeLine[("AccLoc" + LevelSet) + "Y"] = new Array();
mainTimeLine["AccType" + LevelSet] = new Array();
mainTimeLine[("ColLoc" + LevelSet) + "X"] = new Array();
mainTimeLine[("ColLoc" + LevelSet) + "Y"] = new Array();
EnviStartYA[LevelSet] = undefined;
EnviStartXA[LevelSet] = undefined;
CharStartYA[LevelSet] = undefined;
CharStartXA[LevelSet] = undefined;
LRBA[LevelSet] = undefined;
LLBA[LevelSet] = undefined;
LTBA[LevelSet] = undefined;
LBBA[LevelSet] = undefined;
Map[LevelSet] = [];
var _local5 = "";
var _local4 = 0;
if ((LevelSet == 0) && (!Exception)) {
ImportCode = Import.ImportCodeT.text;
} else if ((LevelSet == 0) && (Exception)) {
ImportCode = ECode;
} else if (LevelSet > 0) {
ImportCode = LevelCodeValue[LevelSet];
} else {
ImportCode = RandomLevelValue;
}
i = 0;
while (i < ImportCode.length) {
_local5 = ImportCode.substr(i, 1);
_local4 = Encrypt.indexOf(_local5, 0);
Decrypted = Decrypted + Decrypt.substr(_local4, 1);
i++;
}
Start = 0;
SingleValue = "";
Value = "";
x = 0;
y = 0;
if (Decrypted.indexOf("]") == -1) {
} else {
do {
while (true) {
SingleValue = Decrypted.substr(Start, 1);
if (SingleValue == ",") {
if (Map[LevelSet][x] == undefined) {
Map[LevelSet][x] = new Array();
}
Start++;
if (Value == "!") {
Map[LevelSet][x][y] = undefined;
} else {
Map[LevelSet][x][y] = parseInt(Value);
}
Value = "";
y++;
} else {
if (SingleValue == "]") {
if (Map[LevelSet][x] == undefined) {
Map[LevelSet][x] = new Array();
}
if (Value == "!") {
Map[LevelSet][x][y] = undefined;
} else {
Map[LevelSet][x][y] = parseInt(Value);
}
Value = "";
y++;
break;
}
Value = Value + SingleValue;
Start++;
}
}
x++;
y = 0;
Start++;
SingleValue = Decrypted.substr(Start, 1);
} while (SingleValue != "]");
Start++;
x = 0;
Value = "";
while (true) {
SingleValue = Decrypted.substr(Start, 1);
if (SingleValue == ",") {
Start++;
if (Value == "!") {
mainTimeLine["ColLoc" + _local3][x] = undefined;
} else {
mainTimeLine["ColLoc" + _local3][x] = parseInt(Value);
}
Value = "";
x++;
} else {
if (SingleValue == "]") {
if (Value == "!") {
mainTimeLine["ColLoc" + _local3][x] = undefined;
} else {
mainTimeLine["ColLoc" + _local3][x] = parseInt(Value);
}
Value = "";
x++;
break;
}
Value = Value + SingleValue;
Start++;
}
}
Start++;
x = 0;
Value = "";
while (true) {
SingleValue = Decrypted.substr(Start, 1);
if (SingleValue == ",") {
Start++;
if (Value == "!") {
mainTimeLine["ColLoc" + _local2][x] = undefined;
} else {
mainTimeLine["ColLoc" + _local2][x] = parseInt(Value);
}
Value = "";
x++;
} else {
if (SingleValue == "]") {
if (Value == "!") {
mainTimeLine["ColLoc" + _local2][x] = undefined;
} else {
mainTimeLine["ColLoc" + _local2][x] = parseInt(Value);
}
Value = "";
x++;
break;
}
Value = Value + SingleValue;
Start++;
}
}
Start++;
Value = "";
x = LevelSet;
while (true) {
SingleValue = Decrypted.substr(Start, 1);
if (SingleValue == "]") {
if (Value == "!") {
EnviStartXA[x] = undefined;
} else {
EnviStartXA[x] = parseInt(Value);
}
Value = "";
x++;
break;
}
Value = Value + SingleValue;
Start++;
}
Start++;
Value = "";
x = LevelSet;
while (true) {
SingleValue = Decrypted.substr(Start, 1);
if (SingleValue == "]") {
if (Value == "!") {
EnviStartYA[x] = undefined;
} else {
EnviStartYA[x] = parseInt(Value);
}
Value = "";
x++;
break;
}
Value = Value + SingleValue;
Start++;
}
Start++;
Value = "";
x = LevelSet;
while (true) {
SingleValue = Decrypted.substr(Start, 1);
if (SingleValue == "]") {
if (Value == "!") {
CharStartXA[x] = undefined;
} else {
CharStartXA[x] = parseInt(Value);
}
Value = "";
x++;
break;
}
Value = Value + SingleValue;
Start++;
}
Start++;
Value = "";
x = LevelSet;
while (true) {
SingleValue = Decrypted.substr(Start, 1);
if (SingleValue == "]") {
if (Value == "!") {
CharStartYA[x] = undefined;
} else {
CharStartYA[x] = parseInt(Value);
}
Value = "";
x++;
break;
}
Value = Value + SingleValue;
Start++;
}
Start++;
x = 0;
Value = "";
while (true) {
SingleValue = Decrypted.substr(Start, 1);
if (SingleValue == ",") {
Start++;
if (Value == "!") {
mainTimeLine[("AccLoc" + LevelSet) + "X"][x] = undefined;
} else {
mainTimeLine[("AccLoc" + LevelSet) + "X"][x] = parseInt(Value);
}
Value = "";
x++;
} else {
if (SingleValue == "]") {
if (Value == "!") {
mainTimeLine[("AccLoc" + LevelSet) + "X"][x] = undefined;
} else if (Value != "") {
mainTimeLine[("AccLoc" + LevelSet) + "X"][x] = parseInt(Value);
}
Value = "";
x++;
break;
}
Value = Value + SingleValue;
Start++;
}
}
Start++;
x = 0;
Value = "";
while (true) {
SingleValue = Decrypted.substr(Start, 1);
if (SingleValue == ",") {
Start++;
if (Value == "!") {
mainTimeLine[("AccLoc" + LevelSet) + "Y"][x] = undefined;
} else {
mainTimeLine[("AccLoc" + LevelSet) + "Y"][x] = parseInt(Value);
}
Value = "";
x++;
} else {
if (SingleValue == "]") {
if (Value == "!") {
mainTimeLine[("AccLoc" + LevelSet) + "Y"][x] = undefined;
} else if (Value != "") {
mainTimeLine[("AccLoc" + LevelSet) + "Y"][x] = parseInt(Value);
}
Value = "";
x++;
break;
}
Value = Value + SingleValue;
Start++;
}
}
Start++;
x = 0;
Value = "";
while (true) {
SingleValue = Decrypted.substr(Start, 1);
if (SingleValue == ",") {
Start++;
if (Value == "!") {
mainTimeLine["AccType" + LevelSet][x] = undefined;
} else {
mainTimeLine["AccType" + LevelSet][x] = parseInt(Value);
}
Value = "";
x++;
} else {
if (SingleValue == "]") {
if (Value == "!") {
mainTimeLine["AccType" + LevelSet][x] = undefined;
} else {
mainTimeLine["AccType" + LevelSet][x] = parseInt(Value);
}
Value = "";
x++;
break;
}
Value = Value + SingleValue;
Start++;
}
}
stopMouse();
Import.removeMovieClip();
Level = LevelSet;
if (PlayingMenu) {
MS.stop();
PlayingMenu = false;
}
gotoAndStop ("Game");
}
}
stop();
if (!PlayingMenu) {
PlayingMenu = true;
MS.start(0, 9999);
}
LoadedALevel = false;
LevelCounter.text = "Loading..";
LoadedLevels = new LoadVars();
LoadedLevels.onLoad = function () {
LevelCounter.text = ("There are currently " + LoadedLevels.LevelAmount) + " levels in the database!";
};
LoadedLevels.load("http://www.fullergames.com/Ninja/get_levelnumbers.php");
BacktoMenuButton.onRelease = function () {
gotoAndStop ("Menu");
};
LoadedLevel = true;
myData = new LoadVars();
LRLBtn.onRelease = function () {
if (LoadedLevel) {
myData = new LoadVars();
LoadedLevel = false;
Message.text = "Loading..";
myData.onLoad = function () {
LoadedLevel = true;
trace("Time0: " + myData.Time0);
placeTheDataIntoTheRightPlace();
Message.text = "Loaded!";
LoadedALevel = true;
};
myData.load("http://www.fullergames.com/Ninja/load_vars.php");
} else {
Message.text = "Please wait, loading. If not loading, check your security settings or internet connection.";
}
};
placeTheDataIntoTheRightPlace = function () {
RandomLevelValue = myData.LIRet;
LevelNameVariable = myData.LNRet;
SubmitterVariable = myData.NameRet;
LevelInfoT.text = RandomLevelValue;
if (myData.Time0 != "---") {
Time0L.text = (time_to_string(myData.Time0) + " by ") + myData.TimeName0;
} else {
Time0L.text = "---";
}
if (myData.Time1 != "---") {
Time1L.text = (time_to_string(myData.Time1) + " by ") + myData.TimeName1;
} else {
Time1L.text = "---";
}
if (myData.Time2 != "---") {
Time2L.text = (time_to_string(myData.Time2) + " by ") + myData.TimeName2;
} else {
Time2L.text = "---";
}
trace(myData.Rating);
if (myData.Rating == "Be the first to rate this level!") {
RatingT.text = "Be the first!";
} else {
RatingT.text = Math.round(myData.Rating * 100) / 100;
}
LevelNameT.text = myData.LNRet;
SubmitterT.text = myData.NameRet;
};
PlayBtn.onRelease = function () {
trace("Wee");
if (LoadedALevel) {
ImportLevel(-1);
} else {
Message.text = "Please load a level!";
}
};
vars = new LoadVars();
save_check = new LoadVars();
SSTBtn.onRelease = function () {
vars.Time = TimeTestT.text;
vars.TimeHolder = TimeHolderTestT.text;
vars.Submitter = SubmitterT.text;
vars.LevelInfo = LevelInfoT.text;
vars.LevelName = LevelNameT.text;
trace(vars.Time);
trace(vars.TimeHolder);
trace(vars.Submitter);
trace(vars.LevelInfo);
trace(vars.LevelName);
save_check.onLoad = function () {
if (this.response == "passed") {
Message.text = "Success!";
} else {
Message.text = "Fail!";
}
};
vars.sendAndLoad("http://www.fullergames.com/Ninja/save_time.php", save_check, "POST");
trace(vars.Stringt);
};
vars = new LoadVars();
save_check = new LoadVars();
Rate1.onRelease = function () {
SendRating(1);
};
Rate2.onRelease = function () {
SendRating(2);
};
Rate3.onRelease = function () {
SendRating(3);
};
Rate4.onRelease = function () {
SendRating(4);
};
Rate5.onRelease = function () {
SendRating(5);
};
Frame 16
stop();
Link.onPress = function () {
getURL ("http://www.FullerGames.com");
};
Frame 17
gotoAndStop ("LevelBuilder");
Symbol 7 MovieClip [weaponSCARLogo] Frame 1
stop();
Symbol 25 MovieClip [armSCARF] Frame 1
stop();
Symbol 25 MovieClip [armSCARF] Frame 3
gotoAndStop ("idle");
Symbol 25 MovieClip [armSCARF] Frame 35
gotoAndStop ("idle");
Symbol 28 MovieClip [armM4B] Frame 1
stop();
Symbol 28 MovieClip [armM4B] Frame 3
gotoAndStop ("idle");
Symbol 28 MovieClip [armM4B] Frame 35
gotoAndStop ("idle");
Symbol 65 Button
on (release) {
getURL ("http://www.playhub.com/?utm_medium=brandedgames_external&utm_campaign=ninja_plus_2&utm_source=domain.com&utm_content=ingame", "_blank");
}
Symbol 1138 MovieClip [__Packages.mochi.as2.MochiAd] Frame 0
class mochi.as2.MochiAd
{
function MochiAd () {
}
static function getVersion() {
return(mochi.as2.MochiServices.getVersion());
}
static function showPreGameAd(options) {
var _local26 = {clip:_root, ad_timeout:3000, fadeout_time:250, regpt:"o", method:"showPreloaderAd", color:16747008, background:16777161, outline:13994812, no_progress_bar:false, ad_started:function () {
this.clip.stop();
}, ad_finished:function () {
this.clip.play();
}, ad_failed:function () {
trace("[MochiAd] Couldn't load an ad, make sure that your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_loaded:function (width, height) {
}, ad_skipped:function () {
}, ad_progress:function (percent) {
}};
options = _parseOptions(options, _local26);
if ("c862232051e0a94e1c3609b3916ddb17".substr(0) == "dfeada81ac97cde83665f81c12da7def") {
options.ad_started();
options.ad_finished();
return(undefined);
}
var clip = options.clip;
var _local22 = 11000;
var _local25 = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!load(options)) {
options.ad_failed();
options.ad_finished();
return(undefined);
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var _local14 = _getRes(options);
var _local4 = _local14[0];
var _local13 = _local14[1];
mc._x = _local4 * 0.5;
mc._y = _local13 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk._x = _local4 * -0.5;
chk._y = _local13 * -0.5;
var _local6 = chk.createEmptyMovieClip("_mochiad_bar", 4);
if (options.no_progress_bar) {
_local6._visible = false;
delete options.no_progress_bar;
} else {
_local6._x = 10;
_local6._y = _local13 - 20;
}
var _local21 = options.color;
delete options.color;
var _local19 = options.background;
delete options.background;
var _local23 = options.outline;
delete options.outline;
var _local5 = _local6.createEmptyMovieClip("_outline", 1);
_local5.beginFill(_local19);
_local5.moveTo(0, 0);
_local5.lineTo(_local4 - 20, 0);
_local5.lineTo(_local4 - 20, 10);
_local5.lineTo(0, 10);
_local5.lineTo(0, 0);
_local5.endFill();
var _local3 = _local6.createEmptyMovieClip("_inside", 2);
_local3.beginFill(_local21);
_local3.moveTo(0, 0);
_local3.lineTo(_local4 - 20, 0);
_local3.lineTo(_local4 - 20, 10);
_local3.lineTo(0, 10);
_local3.lineTo(0, 0);
_local3.endFill();
_local3._xscale = 0;
var _local7 = _local6.createEmptyMovieClip("_outline", 3);
_local7.lineStyle(0, _local23, 100);
_local7.moveTo(0, 0);
_local7.lineTo(_local4 - 20, 0);
_local7.lineTo(_local4 - 20, 10);
_local7.lineTo(0, 10);
_local7.lineTo(0, 0);
chk.ad_msec = _local22;
chk.ad_timeout = _local25;
chk.started = getTimer();
chk.showing = false;
chk.last_pcnt = 0;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function () {
var _local2 = 100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time));
if (_local2 > 0) {
this._parent._alpha = _local2;
} else {
var _local3 = this._parent._parent;
mochi.as2.MochiAd.unload(_local3);
delete this.onEnterFrame;
}
};
mc.lc.regContLC = function (lc_name) {
mc._containerLCName = lc_name;
};
var sendHostProgress = false;
mc.lc.sendHostLoadProgress = function (lc_name) {
sendHostProgress = true;
};
mc.lc.adLoaded = options.ad_loaded;
mc.lc.adSkipped = options.ad_skipped;
mc.lc.adjustProgress = function (msec) {
var _local2 = this.mc._mochiad_wait;
_local2.server_control = true;
_local2.started = getTimer();
_local2.ad_msec = msec;
};
mc.lc.rpc = function (callbackID, arg) {
mochi.as2.MochiAd.rpc(clip, callbackID, arg);
};
mc.rpcTestFn = function (s) {
trace("[MOCHIAD rpcTestFn] " + s);
return(s);
};
chk.onEnterFrame = function () {
var _local6 = this._parent._parent;
var _local11 = this._parent._mochiad_ctr;
var _local5 = getTimer() - this.started;
var _local3 = false;
var _local4 = _local6.getBytesTotal();
var _local8 = _local6.getBytesLoaded();
var _local2 = (100 * _local8) / _local4;
var _local10 = (100 * _local5) / chk.ad_msec;
var _local9 = this._mochiad_bar._inside;
var _local13 = Math.min(100, Math.min(_local2 || 0, _local10));
_local13 = Math.max(this.last_pcnt, _local13);
this.last_pcnt = _local13;
_local9._xscale = _local13;
options.ad_progress(_local13);
if (sendHostProgress) {
mochi.as2.MochiAd.containerNotify(clip, {id:"hostLoadPcnt", pcnt:_local2}, clip._mochiad._containerLCName);
if (_local2 == 100) {
sendHostProgress = false;
}
}
if (!chk.showing) {
var _local7 = _local11.getBytesTotal();
if ((_local7 > 0) || (typeof(_local7) == "undefined")) {
chk.showing = true;
chk.started = getTimer();
} else if ((_local5 > chk.ad_timeout) && (_local2 == 100)) {
options.ad_failed();
_local3 = true;
}
}
if (_local5 > chk.ad_msec) {
_local3 = true;
}
if (((_local4 > 0) && (_local8 >= _local4)) && (_local3)) {
if (this.server_control) {
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = chk.fadeFunction;
}
}
};
}
static function showClickAwayAd(options) {
var _local9 = {clip:_root, ad_timeout:2000, fadeout_time:250, regpt:"o", method:"showClickAwayAd", res:"300x250", no_bg:true, ad_started:function () {
}, ad_finished:function () {
}, ad_loaded:function (width, height) {
}, ad_failed:function () {
trace("[MochiAd] Couldn't load an ad, make sure that your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_skipped:function () {
}};
options = _parseOptions(options, _local9);
var clip = options.clip;
var _local8 = options.ad_timeout;
delete options.ad_timeout;
if (!load(options)) {
options.ad_failed();
options.ad_finished();
return(undefined);
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var _local4 = _getRes(options);
var _local10 = _local4[0];
var _local7 = _local4[1];
mc._x = _local10 * 0.5;
mc._y = _local7 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk.ad_timeout = _local8;
chk.started = getTimer();
chk.showing = false;
mc.lc.adLoaded = options.ad_loaded;
mc.lc.adSkipped = options.ad_skipped;
mc.lc.rpc = function (callbackID, arg) {
mochi.as2.MochiAd.rpc(clip, callbackID, arg);
};
mc.rpcTestFn = function (s) {
trace("[MOCHIAD rpcTestFn] " + s);
return(s);
};
var _local20 = false;
mc.lc.regContLC = function (lc_name) {
mc._containerLCName = lc_name;
};
chk.onEnterFrame = function () {
var _local5 = this._parent._mochiad_ctr;
var _local4 = getTimer() - this.started;
var _local2 = false;
if (!chk.showing) {
var _local3 = _local5.getBytesTotal();
if ((_local3 > 0) || (typeof(_local3) == "undefined")) {
_local2 = true;
chk.showing = true;
chk.started = getTimer();
} else if (_local4 > chk.ad_timeout) {
options.ad_failed();
_local2 = true;
}
}
if (_local2) {
delete this.onEnterFrame;
}
};
}
static function showInterLevelAd(options) {
var _local13 = {clip:_root, ad_timeout:2000, fadeout_time:250, regpt:"o", method:"showTimedAd", ad_started:function () {
this.clip.stop();
}, ad_finished:function () {
this.clip.play();
}, ad_failed:function () {
trace("[MochiAd] Couldn't load an ad, make sure that your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_loaded:function (width, height) {
}, ad_skipped:function () {
}};
options = _parseOptions(options, _local13);
var clip = options.clip;
var _local10 = 11000;
var _local12 = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!load(options)) {
options.ad_failed();
options.ad_finished();
return(undefined);
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var _local5 = _getRes(options);
var _local14 = _local5[0];
var _local11 = _local5[1];
mc._x = _local14 * 0.5;
mc._y = _local11 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk.ad_msec = _local10;
chk.ad_timeout = _local12;
chk.started = getTimer();
chk.showing = false;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function () {
var _local2 = 100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time));
if (_local2 > 0) {
this._parent._alpha = _local2;
} else {
var _local3 = this._parent._parent;
mochi.as2.MochiAd.unload(_local3);
delete this.onEnterFrame;
}
};
mc.lc.adLoaded = options.ad_loaded;
mc.lc.adSkipped = options.ad_skipped;
mc.lc.adjustProgress = function (msec) {
var _local2 = this.mc._mochiad_wait;
_local2.server_control = true;
_local2.started = getTimer();
_local2.ad_msec = msec - 250;
};
mc.lc.rpc = function (callbackID, arg) {
mochi.as2.MochiAd.rpc(clip, callbackID, arg);
};
mc.rpcTestFn = function (s) {
trace("[MOCHIAD rpcTestFn] " + s);
return(s);
};
chk.onEnterFrame = function () {
var _local5 = this._parent._mochiad_ctr;
var _local4 = getTimer() - this.started;
var _local2 = false;
if (!chk.showing) {
var _local3 = _local5.getBytesTotal();
if ((_local3 > 0) || (typeof(_local3) == "undefined")) {
chk.showing = true;
chk.started = getTimer();
} else if (_local4 > chk.ad_timeout) {
options.ad_failed();
_local2 = true;
}
}
if (_local4 > chk.ad_msec) {
_local2 = true;
}
if (_local2) {
if (this.server_control) {
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = this.fadeFunction;
}
}
};
}
static function showPreloaderAd(options) {
trace("[MochiAd] DEPRECATED: showPreloaderAd was renamed to showPreGameAd in 2.0");
showPreGameAd(options);
}
static function showTimedAd(options) {
trace("[MochiAd] DEPRECATED: showTimedAd was renamed to showInterLevelAd in 2.0");
showInterLevelAd(options);
}
static function _allowDomains(server) {
var _local1 = server.split("/")[2].split(":")[0];
if (System.security) {
if (System.security.allowDomain) {
System.security.allowDomain("*");
System.security.allowDomain(_local1);
}
if (System.security.allowInsecureDomain) {
System.security.allowInsecureDomain("*");
System.security.allowInsecureDomain(_local1);
}
}
return(_local1);
}
static function load(options) {
var _local13 = {clip:_root, server:"http://x.mochiads.com/srv/1/", method:"load", depth:10333, id:"_UNKNOWN_"};
options = _parseOptions(options, _local13);
options.swfv = options.clip.getSWFVersion() || 6;
options.mav = getVersion();
var _local7 = options.clip;
if (!_isNetworkAvailable()) {
return(null);
}
if (_local7._mochiad_loaded) {
return(null);
}
var _local12 = options.depth;
delete options.depth;
var _local6 = _local7.createEmptyMovieClip("_mochiad", _local12);
var _local11 = _getRes(options);
options.res = (_local11[0] + "x") + _local11[1];
options.server = options.server + options.id;
delete options.id;
_local7._mochiad_loaded = true;
if (_local7._url.indexOf("http") != 0) {
trace("[MochiAd] NOTE: Security Sandbox Violation errors below are normal");
}
var _local4 = _local6.createEmptyMovieClip("_mochiad_ctr", 1);
for (var _local8 in options) {
_local4[_local8] = options[_local8];
}
var _local10 = _local4.server;
delete _local4.server;
var _local14 = _allowDomains(_local10);
_local6.onEnterFrame = function () {
if (this._mochiad_ctr._url != this._url) {
this.onEnterFrame = function () {
if (!this._mochiad_ctr) {
delete this.onEnterFrame;
mochi.as2.MochiAd.unload(this._parent);
}
};
}
};
var _local5 = new Object();
var _local9 = ["", Math.floor(new Date().getTime()), random(999999)].join("_");
_local5.mc = _local6;
_local5.name = _local9;
_local5.hostname = _local14;
_local5.allowDomain = function (d) {
return(true);
};
_local5.allowInsecureDomain = _local5.allowDomain;
_local5.connect(_local9);
_local6.lc = _local5;
_local4.lc = _local9;
_local4.st = getTimer();
_local4.loadMovie(_local10 + ".swf", "POST");
return(_local6);
}
static function unload(clip) {
if (typeof(clip) == "undefined") {
clip = _root;
}
if (clip.clip && (clip.clip._mochiad)) {
clip = clip.clip;
}
if (!clip._mochiad) {
return(false);
}
containerNotify(clip, {id:"unload"}, clip._mochiad._containerLCName);
clip._mochiad.removeMovieClip();
delete clip._mochiad_loaded;
delete clip._mochiad;
return(true);
}
static function _isNetworkAvailable() {
if (System.security) {
var _local1 = System.security;
if (_local1.sandboxType == "localWithFile") {
return(false);
}
}
return(true);
}
static function _getRes(options) {
var _local3 = options.clip.getBounds();
var _local2 = 0;
var _local1 = 0;
if (typeof(options.res) != "undefined") {
var _local4 = options.res.split("x");
_local2 = parseFloat(_local4[0]);
_local1 = parseFloat(_local4[1]);
} else {
_local2 = _local3.xMax - _local3.xMin;
_local1 = _local3.yMax - _local3.yMin;
}
if ((_local2 == 0) || (_local1 == 0)) {
_local2 = Stage.width;
_local1 = Stage.height;
}
return([_local2, _local1]);
}
static function _parseOptions(options, defaults) {
var _local4 = {};
for (var _local8 in defaults) {
_local4[_local8] = defaults[_local8];
}
if (options) {
for (var _local8 in options) {
_local4[_local8] = options[_local8];
}
}
if (_root.mochiad_options) {
var _local5 = _root.mochiad_options.split("&");
var _local2 = 0;
while (_local2 < _local5.length) {
var _local3 = _local5[_local2].split("=");
_local4[unescape(_local3[0])] = unescape(_local3[1]);
_local2++;
}
}
if (_local4.id == "test") {
trace("[MochiAd] WARNING: Using the MochiAds test identifier, make sure to use the code from your dashboard, not this example!");
}
return(_local4);
}
static function rpc(clip, callbackID, arg) {
switch (arg.id) {
case "setValue" :
setValue(clip, arg.objectName, arg.value);
break;
case "getValue" :
var _local4 = getValue(clip, arg.objectName);
containerRpcResult(clip, callbackID, _local4, clip._mochiad._containerLCName);
break;
case "runMethod" :
var _local3 = runMethod(clip, arg.method, arg.args);
containerRpcResult(clip, callbackID, _local3, clip._mochiad._containerLCName);
break;
default :
trace("[mochiads rpc] unknown rpc id: " + arg.id);
}
}
static function setValue(base, objectName, value) {
var _local2 = objectName.split(".");
var _local1;
_local1 = 0;
while (_local1 < (_local2.length - 1)) {
if ((base[_local2[_local1]] == undefined) || (base[_local2[_local1]] == null)) {
return(undefined);
}
base = base[_local2[_local1]];
_local1++;
}
base[_local2[_local1]] = value;
}
static function getValue(base, objectName) {
var _local2 = objectName.split(".");
var _local1;
_local1 = 0;
while (_local1 < (_local2.length - 1)) {
if ((base[_local2[_local1]] == undefined) || (base[_local2[_local1]] == null)) {
return(undefined);
}
base = base[_local2[_local1]];
_local1++;
}
return(base[_local2[_local1]]);
}
static function runMethod(base, methodName, argsArray) {
var _local2 = methodName.split(".");
var _local1;
_local1 = 0;
while (_local1 < (_local2.length - 1)) {
if ((base[_local2[_local1]] == undefined) || (base[_local2[_local1]] == null)) {
return(undefined);
}
base = base[_local2[_local1]];
_local1++;
}
if (typeof(base[_local2[_local1]]) == "function") {
return(base[_local2[_local1]].apply(base, argsArray));
}
return(undefined);
}
static function containerNotify(clip, args, lcName) {
var _local1 = clip._mochiad._mochiad_ctr.ad.app;
if (_local1.notify) {
_local1.notify(args);
} else {
new LocalConnection().send(lcName, "notify", args);
}
}
static function containerRpcResult(clip, callbackID, val, lcName) {
var _local1 = clip._mochiad._mochiad_ctr.ad.app;
if (_local1.rpcResult) {
_local1.rpcResult(callbackID, val);
} else {
new LocalConnection().send(lcName, "rpcResult", callbackID, val);
}
}
}
Symbol 1139 MovieClip [__Packages.mochi.as2.MochiSync] Frame 0
class mochi.as2.MochiSync
{
var _syncContainer;
function MochiSync () {
_syncContainer = {};
}
function getProp(name) {
return(_syncContainer[name]);
}
function setProp(name, value) {
if (_syncContainer[name] == value) {
return(undefined);
}
_syncContainer[name] = value;
mochi.as2.MochiServices.send("sync_propUpdate", {name:name, value:value});
}
function triggerEvent(eventType, args) {
switch (eventType) {
case SYNC_REQUEST :
mochi.as2.MochiServices.send("sync_syncronize", _syncContainer);
break;
case SYNC_PROPERTY :
_syncContainer[args.name] = args.value;
}
}
static var SYNC_REQUEST = "SyncRequest";
static var SYNC_PROPERTY = "UpdateProperty";
}
Symbol 1140 MovieClip [__Packages.mochi.as2.MochiServices] Frame 0
class mochi.as2.MochiServices
{
static var _id, _container, _clip, _sendChannelName, __get__comChannelName, onError, _listenChannel, _sendChannel;
function MochiServices () {
}
static function get id() {
return(_id);
}
static function get clip() {
return(_container);
}
static function get childClip() {
return(_clip);
}
static function getVersion() {
return("3.3 as2");
}
static function allowDomains(server) {
var _local1 = server.split("/")[2].split(":")[0];
if (System.security) {
if (System.security.allowDomain) {
System.security.allowDomain("*");
System.security.allowDomain(_local1);
}
if (System.security.allowInsecureDomain) {
System.security.allowInsecureDomain("*");
System.security.allowInsecureDomain(_local1);
}
}
return(_local1);
}
static function get isNetworkAvailable() {
if (System.security) {
var _local1 = System.security;
if (_local1.sandboxType == "localWithFile") {
return(false);
}
}
return(true);
}
static function set comChannelName(val) {
if (val != undefined) {
if (val.length > 3) {
_sendChannelName = val + "_fromgame";
initComChannels();
}
}
//return(__get__comChannelName());
}
static function get connected() {
return(_connected);
}
static function connect(id, clip, onError) {
warnID(id, false);
if ((!_connected) && (_clip == undefined)) {
trace("MochiServices Connecting...");
_connecting = true;
init(id, clip);
}
if (onError != undefined) {
mochi.as2.MochiServices.onError = onError;
} else if (mochi.as2.MochiServices.onError == undefined) {
mochi.as2.MochiServices.onError = function (errorCode) {
trace(errorCode);
};
}
}
static function disconnect() {
if (_connected || (_connecting)) {
_connecting = (_connected = false);
flush(true);
if (_clip != undefined) {
_clip.removeMovieClip();
delete _clip;
}
_listenChannel.close();
}
}
static function init(id, clip) {
_id = id;
if (clip != undefined) {
_container = clip;
} else {
_container = _root;
}
loadCommunicator(id, _container);
}
static function loadCommunicator(id, clip) {
var _local6 = "_mochiservices_com_" + id;
var _local5 = new MovieClipLoader();
var _local3 = {};
if (_clip != null) {
return(_clip);
}
if (!isNetworkAvailable) {
return(null);
}
if (urlOptions().servURL) {
_servURL = urlOptions().servURL;
}
var _local4 = _servURL + _services;
if (urlOptions().servicesURL) {
_local4 = urlOptions().servicesURL;
}
allowDomains(_local4);
_clip = clip.createEmptyMovieClip(_local6, 10336, false);
_listenChannelName = _listenChannelName + ((Math.floor(new Date().getTime()) + "_") + Math.floor(Math.random() * 99999));
listen();
if (_local3.waitInterval != null) {
clearInterval(_local3.waitInterval);
}
_local3.onLoadError = loadError;
_local3.onLoadStart = function (target_mc) {
this.isLoading = true;
};
_local3.startTime = getTimer();
_local3.wait = function () {
if ((getTimer() - this.startTime) > 10000) {
if (!this.isLoading) {
mochi.as2.MochiServices.disconnect();
mochi.as2.MochiServices.onError.apply(null, ["IOError"]);
}
clearInterval(this.waitInterval);
}
};
_local3.waitInterval = setInterval(_local3, "wait", 1000);
_local5.addListener(_local3);
_local5.loadClip((((((_local4 + "?listenLC=") + _listenChannelName) + "&mochiad_options=") + escape(_root.mochiad_options)) + "&api_version=") + getVersion(), _clip);
_sendChannel = new LocalConnection();
_sendChannel._queue = [];
return(_clip);
}
static function loadError(target_mc, errorCode, httpStatus) {
trace("MochiServices could not load.");
disconnect();
onError.apply(null, [errorCode]);
}
static function onStatus(infoObject) {
if (!(infoObject.level === "error")) {
} else {
_connected = false;
_listenChannel.connect(_listenChannelName);
}
}
static function listen() {
_listenChannel = new LocalConnection();
_listenChannel.handshake = function (args) {
mochi.as2.MochiServices.__set__comChannelName(args.newChannel);
};
_listenChannel.allowDomain = function (d) {
return(true);
};
_listenChannel.allowInsecureDomain = _listenChannel.allowDomain;
_listenChannel._nextcallbackID = 0;
_listenChannel._callbacks = {};
_listenChannel.connect(_listenChannelName);
trace("Waiting for MochiAds services to connect...");
}
static function initComChannels() {
if (!_connected) {
_sendChannel.onStatus = function (infoObject) {
mochi.as2.MochiServices.onStatus(infoObject);
};
_sendChannel.send(_sendChannelName, "onReceive", {methodName:"handshakeDone"});
_sendChannel.send(_sendChannelName, "onReceive", {methodName:"registerGame", id:_id, clip:_clip, version:getVersion()});
_listenChannel.onStatus = function (infoObject) {
mochi.as2.MochiServices.onStatus(infoObject);
};
_listenChannel.onReceive = function (pkg) {
var _local5 = pkg.callbackID;
var _local4 = this._callbacks[_local5];
if (!_local4) {
return(undefined);
}
var _local2 = _local4.callbackMethod;
var _local3 = _local4.callbackObject;
if (_local3 && (typeof(_local2) == "string")) {
_local2 = _local3[_local2];
}
if (_local2 != undefined) {
_local2.apply(_local3, pkg.args);
}
delete this._callbacks[_local5];
};
_listenChannel.onEvent = function (pkg) {
switch (pkg.target) {
case "events" :
mochi.as2.MochiEvents.triggerEvent(pkg.event, pkg.args);
break;
case "coins" :
mochi.as2.MochiCoins.triggerEvent(pkg.event, pkg.args);
break;
case "sync" :
mochi.as2.MochiServices.servicesSync.triggerEvent(pkg.event, pkg.args);
}
};
_listenChannel.onError = function () {
mochi.as2.MochiServices.onError.apply(null, ["IOError"]);
};
trace("[SERVICES_API] connected!");
_connecting = false;
_connected = true;
while (_sendChannel._queue.length > 0) {
_sendChannel.send(_sendChannelName, "onReceive", _sendChannel._queue.shift());
}
}
}
static function flush(error) {
var _local1;
var _local2;
while (_sendChannel._queue.length > 0) {
_local1 = _sendChannel._queue.shift();
if (_local1.callbackID != null) {
_local2 = _listenChannel._callbacks[_local1.callbackID];
}
delete _listenChannel._callbacks[_local1.callbackID];
if (error) {
handleError(_local1.args, _local2.callbackObject, _local2.callbackMethod);
}
}
}
static function handleError(args, callbackObject, callbackMethod) {
if (args != null) {
if (args.onError != null) {
args.onError.apply(null, ["NotConnected"]);
}
if ((args.options != null) && (args.options.onError != null)) {
args.options.onError.apply(null, ["NotConnected"]);
}
}
if (callbackMethod != null) {
args = {};
args.error = true;
args.errorCode = "NotConnected";
if ((callbackObject != null) && (typeof(callbackMethod) == "string")) {
callbackObject[callbackMethod](args);
} else if (callbackMethod != null) {
callbackMethod.apply(args);
}
}
}
static function send(methodName, args, callbackObject, callbackMethod) {
if (_connected) {
_sendChannel.send(_sendChannelName, "onReceive", {methodName:methodName, args:args, callbackID:_listenChannel._nextcallbackID});
} else {
if ((_clip == undefined) || (!_connecting)) {
trace("Error: MochiServices not connected. Please call MochiServices.connect(). Function: " + methodName);
handleError(args, callbackObject, callbackMethod);
flush(true);
return(undefined);
}
_sendChannel._queue.push({methodName:methodName, args:args, callbackID:_listenChannel._nextcallbackID});
}
_listenChannel._callbacks[_listenChannel._nextcallbackID] = {callbackObject:callbackObject, callbackMethod:callbackMethod};
_listenChannel._nextcallbackID++;
}
static function urlOptions() {
var _local5 = {};
var _local6;
if (_root._url.indexOf("mochiad_options") != -1) {
var _local2 = (_root._url.indexOf("mochiad_options") + "mochiad_options".length) + 1;
_local6 = _root._url.substr(_local2, _root._url.length);
} else if (_root.mochiad_options) {
_local6 = _root.mochiad_options;
}
if (_local6) {
var _local4 = _root.mochiad_options.split("&");
var _local2 = 0;
while (_local2 < _local4.length) {
var _local3 = _local4[_local2].split("=");
_local5[unescape(_local3[0])] = unescape(_local3[1]);
_local2++;
}
}
return(_local5);
}
static function warnID(bid, leaderboard) {
bid = bid.toLowerCase();
if (bid.length != 16) {
trace(("WARNING: " + (leaderboard ? "board" : "game")) + " ID is not the appropriate length");
return(undefined);
}
if (bid == "1e113c7239048b3f") {
if (leaderboard) {
trace("WARNING: Using testing board ID");
} else {
trace("WARNING: Using testing board ID as game ID");
}
return(undefined);
}
if (bid == "84993a1de4031cd8") {
if (leaderboard) {
trace("WARNING: Using testing game ID as board ID");
} else {
trace("WARNING: Using testing game ID");
}
return(undefined);
}
var _local1 = 0;
while (_local1 < bid.length) {
switch (bid.charAt(_local1)) {
case "0" :
case "1" :
case "2" :
case "3" :
case "4" :
case "5" :
case "6" :
case "7" :
case "8" :
case "9" :
case "a" :
case "b" :
case "c" :
case "d" :
case "e" :
case "f" :
break;
default :
trace("WARNING: Board ID contains illegal characters: " + bid);
return(undefined);
}
_local1++;
}
}
static function addLinkEvent(url, burl, btn, onClick) {
var timeout = 1500;
var t0 = getTimer();
var _local2 = new Object();
_local2.mav = getVersion();
_local2.swfv = btn.getSWFVersion() || 6;
_local2.swfurl = btn._url;
_local2.fv = System.capabilities.version;
_local2.os = System.capabilities.os;
_local2.lang = System.capabilities.language;
_local2.scres = (System.capabilities.screenResolutionX + "x") + System.capabilities.screenResolutionY;
var s = "?";
var _local3 = 0;
for (var _local6 in _local2) {
if (_local3 != 0) {
s = s + "&";
}
_local3++;
s = ((s + _local6) + "=") + escape(_local2[_local6]);
}
if (!(netupAttempted || (_connected))) {
var ping = btn.createEmptyMovieClip("ping", 777);
var _local7 = btn.createEmptyMovieClip("nettest", 778);
netupAttempted = true;
ping.loadMovie("http://x.mochiads.com/linkping.swf?t=" + getTimer());
_local7.onEnterFrame = function () {
if ((ping._totalframes > 0) && (ping._totalframes == ping._framesloaded)) {
delete this.onEnterFrame;
} else if ((getTimer() - t0) > timeout) {
delete this.onEnterFrame;
mochi.as2.MochiServices.netup = false;
}
};
}
var _local4 = btn.createEmptyMovieClip("clk", 1001);
_local4._alpha = 0;
_local4.beginFill(1044735);
_local4.moveTo(0, 0);
_local4.lineTo(0, btn._height);
_local4.lineTo(btn._width, btn._height);
_local4.lineTo(btn._width, 0);
_local4.lineTo(0, 0);
_local4.endFill();
_local4.onRelease = function () {
if (mochi.as2.MochiServices.netup) {
getURL (url + s, "_blank");
} else {
getURL (burl, "_blank");
}
if (onClick != undefined) {
onClick();
}
};
}
static function setContainer(clip) {
}
static function stayOnTop(clip) {
}
static var _servURL = "http://www.mochiads.com/static/lib/services/";
static var _services = "services.swf";
static var _mochiLC = "MochiLC.swf";
static var _listenChannelName = "__ms_";
static var _connecting = false;
static var _connected = false;
static var netup = true;
static var netupAttempted = false;
static var servicesSync = new mochi.as2.MochiSync();
}
Symbol 1141 MovieClip [__Packages.mochi.as2.MochiEventDispatcher] Frame 0
class mochi.as2.MochiEventDispatcher
{
var eventTable;
function MochiEventDispatcher () {
eventTable = {};
}
function buildDelegate(thisObject, thatObject) {
var _local2 = {thisObject:thisObject, thatObject:thatObject};
if (thatObject != undefined) {
var funct = ((typeof(thatObject) == "string") ? (thisObject[thatObject]) : (thatObject));
_local2.delegate = function (args) {
funct.call(thisObject, args);
};
} else {
_local2.delegate = thisObject;
}
return(_local2);
}
function compareDelegate(d_A, d_B) {
if ((d_A.thisObject != d_B.thisObject) || (d_A.thatObject != d_B.thatObject)) {
return(false);
}
return(true);
}
function addEventListener(event, thisObject, thatObject) {
removeEventListener(event, thisObject, thatObject);
eventTable[event].push(buildDelegate(thisObject, thatObject));
}
function removeEventListener(event, thisObject, thatObject) {
var _local3 = buildDelegate(thisObject, thatObject);
if (eventTable[event] == undefined) {
eventTable[event] = [];
return(undefined);
}
for (var _local4 in eventTable[event]) {
if (!compareDelegate(eventTable[event][_local4], _local3)) {
continue;
}
eventTable[event].splice(Number(_local4), 1);
}
}
function triggerEvent(event, args) {
if (eventTable[event] == undefined) {
return(undefined);
}
for (var _local4 in eventTable[event]) {
eventTable[event][_local4].delegate(args);
}
}
}
Symbol 1142 MovieClip [__Packages.mochi.as2.MochiEvents] Frame 0
class mochi.as2.MochiEvents
{
static var gameStart, levelStart;
function MochiEvents () {
}
static function getVersion() {
return(mochi.as2.MochiServices.getVersion());
}
static function startSession(achievementID) {
mochi.as2.MochiServices.send("events_beginSession", {achievementID:achievementID}, null, null);
}
static function trigger(kind, obj) {
if (obj == undefined) {
obj = {};
} else if (obj.kind != undefined) {
trace("WARNING: optional arguements package contains key 'id', it will be overwritten");
obj.kind = kind;
}
mochi.as2.MochiServices.send("events_triggerEvent", {eventObject:obj}, null, null);
}
static function setNotifications(clip, style) {
var _local2 = {};
for (var _local3 in style) {
_local2[_local3] = style[_local3];
}
_local2.clip = clip;
mochi.as2.MochiServices.send("events_setNotifications", _local2, null, null);
}
static function addEventListener(eventType, thisObject, thatObject) {
_dispatcher.addEventListener(eventType, thisObject, thatObject);
}
static function triggerEvent(eventType, args) {
_dispatcher.triggerEvent(eventType, args);
}
static function removeEventListener(eventType, thisObject, thatObject) {
_dispatcher.removeEventListener(eventType, thisObject, thatObject);
}
static function startGame() {
gameStart = new Date().getTime();
trigger("start_game");
}
static function endGame() {
var _local1 = new Date().getTime() - gameStart;
trigger("end_game", {time:_local1});
}
static function startLevel() {
levelStart = new Date().getTime();
trigger("start_level");
}
static function endLevel() {
var _local1 = new Date().getTime() - levelStart;
trigger("end_level", {time:_local1});
}
static var ACHIEVEMENT_RECEIVED = "AchievementReceived";
static var ALIGN_TOP_LEFT = "ALIGN_TL";
static var ALIGN_TOP = "ALIGN_T";
static var ALIGN_TOP_RIGHT = "ALIGN_TR";
static var ALIGN_LEFT = "ALIGN_L";
static var ALIGN_CENTER = "ALIGN_C";
static var ALIGN_RIGHT = "ALIGN_R";
static var ALIGN_BOTTOM_LEFT = "ALIGN_BL";
static var ALIGN_BOTTOM = "ALIGN_B";
static var ALIGN_BOTTOM_RIGHT = "ALIGN_BR";
static var FORMAT_SHORT = "ShortForm";
static var FORMAT_LONG = "LongForm";
static var _dispatcher = new mochi.as2.MochiEventDispatcher();
}
Symbol 1143 MovieClip [__Packages.mochi.as2.MochiCoins] Frame 0
class mochi.as2.MochiCoins
{
function MochiCoins () {
}
static function getVersion() {
return(mochi.as2.MochiServices.getVersion());
}
static function showStore(options) {
mochi.as2.MochiServices.send("coins_showStore", {options:options}, null, null);
}
static function showItem(options) {
if ((options == undefined) || (typeof(options.item) != "string")) {
trace("ERROR: showItem call must pass an Object with an item key");
return(undefined);
}
mochi.as2.MochiServices.send("coins_showItem", {options:options}, null, null);
}
static function showVideo(options) {
if ((options == undefined) || (typeof(options.item) != "string")) {
trace("ERROR: showVideo call must pass an Object with an item key");
return(undefined);
}
mochi.as2.MochiServices.send("coins_showVideo", {options:options}, null, null);
}
static function showLoginWidget(options) {
mochi.as2.MochiServices.setContainer();
mochi.as2.MochiServices.stayOnTop();
mochi.as2.MochiServices.send("coins_showLoginWidget", {options:options});
}
static function hideLoginWidget() {
mochi.as2.MochiServices.send("coins_hideLoginWidget");
}
static function getStoreItems() {
mochi.as2.MochiServices.send("coins_getStoreItems");
}
static function getUserInfo() {
mochi.as2.MochiServices.send("coins_getUserInfo");
}
static function saveUserProperties(properties) {
mochi.as2.MochiServices.send("coins_saveUserProperties", properties);
}
static function addEventListener(eventType, delegate) {
_dispatcher.addEventListener(eventType, delegate);
}
static function triggerEvent(eventType, args) {
_dispatcher.triggerEvent(eventType, args);
}
static function removeEventListener(eventType, delegate) {
_dispatcher.removeEventListener(eventType, delegate);
}
static var LOGGED_IN = "LoggedIn";
static var LOGGED_OUT = "LoggedOut";
static var LOGIN_SHOW = "LoginShow";
static var LOGIN_HIDE = "LoginHide";
static var STORE_SHOW = "StoreShow";
static var STORE_HIDE = "StoreHide";
static var PROFILE_SHOW = "ProfileShow";
static var PROFILE_HIDE = "ProfileHide";
static var PROPERTIES_SAVED = "PropertySaved";
static var WIDGET_LOADED = "WidgetLoaded";
static var ITEM_OWNED = "ItemOwned";
static var ITEM_NEW = "ItemNew";
static var STORE_ITEMS = "StoreItems";
static var USER_INFO = "UserInfo";
static var ERROR = "Error";
static var IO_ERROR = "IOError";
static var NO_USER = "NoUser";
static var PROPERTIES_SIZE = "PropertiesSize";
static var _dispatcher = new mochi.as2.MochiEventDispatcher();
}
Symbol 1144 MovieClip [__Packages.mx.transitions.OnEnterFrameBeacon] Frame 0
class mx.transitions.OnEnterFrameBeacon
{
function OnEnterFrameBeacon () {
}
static function init() {
var _local4 = _global.MovieClip;
if (!_root.__OnEnterFrameBeacon) {
mx.transitions.BroadcasterMX.initialize(_local4);
var _local3 = _root.createEmptyMovieClip("__OnEnterFrameBeacon", 9876);
_local3.onEnterFrame = function () {
_global.MovieClip.broadcastMessage("onEnterFrame");
};
}
}
static var version = "1.1.0.52";
}
Symbol 1145 MovieClip [__Packages.mx.transitions.BroadcasterMX] Frame 0
class mx.transitions.BroadcasterMX
{
var _listeners;
function BroadcasterMX () {
}
static function initialize(o, dontCreateArray) {
if (o.broadcastMessage != undefined) {
delete o.broadcastMessage;
}
o.addListener = mx.transitions.BroadcasterMX.prototype.addListener;
o.removeListener = mx.transitions.BroadcasterMX.prototype.removeListener;
if (!dontCreateArray) {
o._listeners = new Array();
}
}
function addListener(o) {
removeListener(o);
if (broadcastMessage == undefined) {
broadcastMessage = mx.transitions.BroadcasterMX.prototype.broadcastMessage;
}
return(_listeners.push(o));
}
function removeListener(o) {
var _local2 = _listeners;
var _local3 = _local2.length;
while (_local3--) {
if (_local2[_local3] == o) {
_local2.splice(_local3, 1);
if (!_local2.length) {
broadcastMessage = undefined;
}
return(true);
}
}
return(false);
}
function broadcastMessage() {
var _local5 = String(arguments.shift());
var _local4 = _listeners.concat();
var _local6 = _local4.length;
var _local3 = 0;
while (_local3 < _local6) {
_local4[_local3][_local5].apply(_local4[_local3], arguments);
_local3++;
}
}
static var version = "1.1.0.52";
}
Symbol 1146 MovieClip [__Packages.mx.transitions.Tween] Frame 0
class mx.transitions.Tween
{
var obj, prop, begin, useSeconds, _listeners, addListener, prevTime, _time, looping, _duration, broadcastMessage, isPlaying, _fps, prevPos, _pos, change, _intervalID, _startTime;
function Tween (obj, prop, func, begin, finish, duration, useSeconds) {
mx.transitions.OnEnterFrameBeacon.init();
if (!arguments.length) {
return;
}
this.obj = obj;
this.prop = prop;
this.begin = begin;
position = (begin);
this.duration = (duration);
this.useSeconds = useSeconds;
if (func) {
this.func = func;
}
this.finish = (finish);
_listeners = [];
addListener(this);
start();
}
function set time(t) {
prevTime = _time;
if (t > duration) {
if (looping) {
rewind(t - _duration);
update();
broadcastMessage("onMotionLooped", this);
} else {
if (useSeconds) {
_time = _duration;
update();
}
stop();
broadcastMessage("onMotionFinished", this);
}
} else if (t < 0) {
rewind();
update();
} else {
_time = t;
update();
}
//return(time);
}
function get time() {
return(_time);
}
function set duration(d) {
_duration = (((d == null) || (d <= 0)) ? (_global.Infinity) : (d));
//return(duration);
}
function get duration() {
return(_duration);
}
function set FPS(fps) {
var _local2 = isPlaying;
stopEnterFrame();
_fps = fps;
if (_local2) {
startEnterFrame();
}
//return(FPS);
}
function get FPS() {
return(_fps);
}
function set position(p) {
setPosition(p);
//return(position);
}
function setPosition(p) {
prevPos = _pos;
obj[prop] = (_pos = p);
broadcastMessage("onMotionChanged", this, _pos);
updateAfterEvent();
}
function get position() {
return(getPosition());
}
function getPosition(t) {
if (t == undefined) {
t = _time;
}
return(func(t, begin, change, _duration));
}
function set finish(f) {
change = f - begin;
//return(finish);
}
function get finish() {
return(begin + change);
}
function continueTo(finish, duration) {
begin = position;
this.finish = (finish);
if (duration != undefined) {
this.duration = (duration);
}
start();
}
function yoyo() {
continueTo(begin, time);
}
function startEnterFrame() {
if (_fps == undefined) {
_global.MovieClip.addListener(this);
} else {
_intervalID = setInterval(this, "onEnterFrame", 1000 / _fps);
}
isPlaying = true;
}
function stopEnterFrame() {
if (_fps == undefined) {
_global.MovieClip.removeListener(this);
} else {
clearInterval(_intervalID);
}
isPlaying = false;
}
function start() {
rewind();
startEnterFrame();
broadcastMessage("onMotionStarted", this);
}
function stop() {
stopEnterFrame();
broadcastMessage("onMotionStopped", this);
}
function resume() {
fixTime();
startEnterFrame();
broadcastMessage("onMotionResumed", this);
}
function rewind(t) {
_time = ((t == undefined) ? 0 : (t));
fixTime();
update();
}
function fforward() {
time = (_duration);
fixTime();
}
function nextFrame() {
if (useSeconds) {
time = ((getTimer() - _startTime) / 1000);
} else {
time = (_time + 1);
}
}
function onEnterFrame() {
nextFrame();
}
function prevFrame() {
if (!useSeconds) {
time = (_time - 1);
}
}
function toString() {
return("[Tween]");
}
function fixTime() {
if (useSeconds) {
_startTime = getTimer() - (_time * 1000);
}
}
function update() {
position = (getPosition(_time));
}
static var version = "1.1.0.52";
static var __initBeacon = mx.transitions.OnEnterFrameBeacon.init();
static var __initBroadcaster = mx.transitions.BroadcasterMX.initialize(mx.transitions.Tween.prototype, true);
function func(t, b, c, d) {
return(((c * t) / d) + b);
}
}
Symbol 1147 MovieClip [__Packages.mx.transitions.easing.Strong] Frame 0
class mx.transitions.easing.Strong
{
function Strong () {
}
static function easeIn(t, b, c, d) {
t = t / d;
return((((((c * t) * t) * t) * t) * t) + b);
}
static function easeOut(t, b, c, d) {
t = (t / d) - 1;
return((c * (((((t * t) * t) * t) * t) + 1)) + b);
}
static function easeInOut(t, b, c, d) {
t = t / (d / 2);
if (t < 1) {
return(((((((c / 2) * t) * t) * t) * t) * t) + b);
}
t = t - 2;
return(((c / 2) * (((((t * t) * t) * t) * t) + 2)) + b);
}
static var version = "1.1.0.52";
}
Symbol 70 Button
on (release) {
getURL ("http://www.arcadebomb.com", "_blank");
}
Symbol 75 MovieClip [ABSplashScreen] Frame 115
this.removeMovieClip();
Symbol 84 MovieClip [Enemy60] Frame 4
gotoAndPlay ("run");
Symbol 84 MovieClip [Enemy60] Frame 13
gotoAndPlay ("bite");
Symbol 90 MovieClip [Enemy59] Frame 4
gotoAndPlay ("fly");
Symbol 115 MovieClip [Enemy58] Frame 16
gotoAndPlay ("run");
Symbol 115 MovieClip [Enemy58] Frame 31
gotoAndPlay ("bite");
Symbol 115 MovieClip [Enemy58] Frame 64
gotoAndPlay ("walk");
Symbol 119 MovieClip [Enemy54] Frame 1
stop();
Symbol 119 MovieClip [Enemy54] Frame 77
gotoAndStop ("stop");
Symbol 151 MovieClip [Enemy62] Frame 1
stop();
Symbol 151 MovieClip [Enemy62] Frame 38
stop();
Symbol 151 MovieClip [Enemy62] Frame 45
gotoAndStop (1);
Symbol 151 MovieClip [Enemy62] Frame 60
stop();
Symbol 176 MovieClip [Enemy61] Frame 1
stop();
Symbol 176 MovieClip [Enemy61] Frame 13
gotoAndPlay (2);
Symbol 176 MovieClip [Enemy61] Frame 40
gotoAndStop (1);
Symbol 176 MovieClip [Enemy61] Frame 60
stop();
Symbol 237 MovieClip [MySplashScreen] Frame 1
var Ready = false;
var numPart = 100;
var maxSpeed = 20;
var minSpeed = 0.1;
var xLoc = 124.3;
var yLoc = 261.4;
var Once2 = new Array(numPart);
var Once = new Array(numPart);
x = 1;
while (x <= numPart) {
myParticle2 = _root.attachMovie("Particle", "Particle" + x, _root.getNextHighestDepth());
myParticle2.Angle = Math.random() * 360;
myParticle2.Speed = (Math.random() * maxSpeed) + minSpeed;
myParticle2.XNum = x;
myParticle2._alpha = (Math.random() * 50) + 50;
myParticle2._x = -100;
myParticle2._y = -100;
myParticle2.onEnterFrame = function () {
if (Ready) {
if (Once2[this.XNum] == undefined) {
Once2[this.XNum] = 1;
this._x = xLoc;
this._y = yLoc;
}
this.xSpeed = Math.cos(this.Angle) * this.Speed;
this.ySpeed = Math.sin(this.Angle) * this.Speed;
this._x = this._x + this.xSpeed;
this._y = this._y + this.ySpeed;
this.Speed = this.Speed * 2;
if ((((this._x > Stage.width) || (this._y > Stage.height)) || (this._x < -10)) || (this._y < -10)) {
this.removeMovieClip();
}
}
};
x++;
}
x = 1;
while (x <= numPart) {
myParticle = _root.attachMovie("Particle", "Particle" + x, _root.getNextHighestDepth());
myParticle.Angle = Math.random() * 360;
myParticle.Speed = (Math.random() * maxSpeed) + minSpeed;
myParticle.XNum = x;
myParticle._alpha = (Math.random() * 50) + 50;
myParticle._x = -100;
myParticle._y = -100;
myParticle.onEnterFrame = function () {
if (Ready) {
if (Once[this.XNum] == undefined) {
Once[this.XNum] = 1;
this._x = xLoc;
this._y = yLoc;
}
this.xSpeed = Math.cos(this.Angle) * this.Speed;
this.ySpeed = Math.sin(this.Angle) * this.Speed;
this._x = this._x + this.xSpeed;
this._y = this._y + this.ySpeed;
this.Speed = this.Speed * 1;
this._alpha = this._alpha - 10;
if (this._alpha <= 0) {
this.removeMovieClip();
}
}
};
x++;
}
Instance of Symbol 187 MovieClip in Symbol 237 MovieClip [MySplashScreen] Frame 1
on (release) {
getURL ("http://www.fullergames.com", "_blank");
}
Symbol 237 MovieClip [MySplashScreen] Frame 139
Ready = true;
Symbol 237 MovieClip [MySplashScreen] Frame 205
this.removeMovieClip();
Symbol 249 MovieClip Frame 1
stop();
this.onRollOver = function () {
gotoAndStop ("RollOver");
};
Symbol 249 MovieClip Frame 2
stop();
this.onRollOut = function () {
gotoAndStop ("Neutral");
};
Symbol 263 MovieClip Frame 1
stop();
this.onRollOver = function () {
gotoAndStop ("RollOver");
};
Symbol 263 MovieClip Frame 2
this.onRollOut = function () {
gotoAndStop ("Neutral");
};
Symbol 268 MovieClip Frame 1
stop();
this.onRollOver = function () {
gotoAndStop ("RollOver");
};
Symbol 268 MovieClip Frame 2
stop();
this.onRollOut = function () {
gotoAndStop ("Neutral");
};
Symbol 273 MovieClip Frame 1
stop();
this.onRollOver = function () {
gotoAndStop ("RollOver");
};
Symbol 273 MovieClip Frame 2
stop();
this.onRollOut = function () {
gotoAndStop ("Neutral");
};
Symbol 280 MovieClip Frame 1
stop();
this.onRollOver = function () {
this.gotoAndStop("RollOver");
};
Symbol 280 MovieClip Frame 2
stop();
this.onRollOut = function () {
gotoAndStop ("Neutral");
};
Symbol 285 MovieClip Frame 1
stop();
this.onRollOver = function () {
this.gotoAndStop("RollOver");
};
Symbol 285 MovieClip Frame 2
stop();
stop();
this.onRollOut = function () {
this.gotoAndStop("Neutral");
};
Symbol 286 MovieClip [InfoBox] Frame 1
stop();
ContBuildingBtn.onRollOver = function () {
ContBuildingBtn.useHandCursor = true;
};
Symbol 286 MovieClip [InfoBox] Frame 2
stop();
MenuBtn.onRollOver = function () {
MenuBtn.useHandCursor = true;
};
TestOEBtn.onRollOver = function () {
TestOEBtn.useHandCursor = true;
};
CopyButton.onRollOver = function () {
CopyButton.useHandCursor = true;
};
ContBuildingBtn.onRollOver = function () {
ContBuildingBtn.useHandCursor = true;
};
Symbol 286 MovieClip [InfoBox] Frame 3
YesBtn.onRollOver = function () {
YesBtn.useHandCursor = true;
};
NoBtn.onRollOver = function () {
NoBtn.useHandCursor = true;
};
Symbol 292 MovieClip [LBNotice] Frame 1
var Time = getTimer();
var TimeN = 0;
onEnterFrame = function () {
TimeN = getTimer();
if ((TimeN - Time) >= 3000) {
this.removeMovieClip();
}
};
Symbol 297 MovieClip Frame 1
stop();
this.onRollOver = function () {
gotoAndStop ("RollOver");
};
Symbol 297 MovieClip Frame 2
stop();
this.onRollOut = function () {
gotoAndStop ("Neutral");
};
Symbol 311 MovieClip Frame 1
stop();
this.onRollOver = function () {
gotoAndStop ("RollOver");
};
Symbol 311 MovieClip Frame 2
stop();
this.onRollOut = function () {
gotoAndStop ("Neutral");
};
Symbol 315 MovieClip Frame 1
stop();
this.onRollOver = function () {
gotoAndStop ("RollOver");
};
Symbol 315 MovieClip Frame 2
stop();
this.onRollOut = function () {
gotoAndStop ("Neutral");
};
Symbol 317 MovieClip [LevelBuilderMenu] Frame 1
onMouseUp = function () {
var _local2 = false;
var _local3 = 0;
o = 0;
while (o <= _root.TT) {
if (TileMenu["Tile" + o].hitTest(_root._xmouse, _root._ymouse, false)) {
TileMenu.attachMovie("Box", "Box" + o, o + 100);
TileMenu["Box" + o]._x = TileMenu["Tile" + o]._x - 2;
TileMenu["Box" + o]._y = TileMenu["Tile" + o]._y - 2;
TileMenu["Box" + o]._width = _root["TileBitmap" + o].width + ((mainTimeLine["TileBitmap" + o].width / 50) * 6);
TileMenu["Box" + o]._height = _root["TileBitmap" + o].height + ((mainTimeLine["TileBitmap" + o].width / 50) * 6);
trace(_root["TileBitmap" + o].height);
if (Key.isDown(16) && (o < _root.AS)) {
e = 0;
while (e < _root.PieceArray.length) {
if (_root.PieceArray[e] == o) {
_local2 = true;
_local3 = e;
}
if (_root.PieceArray[e] >= _root.AS) {
TileMenu["Box" + _root.PieceArray[e]].removeMovieClip();
_root.PieceArray.splice(e, 1);
}
e++;
}
if (!_local2) {
_root.PieceArray.push(o);
_root.ChangeDragger("Bitmap");
} else if (_local2) {
TileMenu["Box" + _root.PieceArray[_local3]].removeMovieClip();
_root.PieceArray.splice(_local3, 1);
_root.ChangeDragger("Bitmap");
}
break;
}
_root.CurrentTile = o;
_root.PieceArray.splice(0, _root.PieceArray.length);
_root.PieceArray[0] = _root.CurrentTile;
if (o >= _root.AS) {
_root.ChangeDragger("Bitmap", "", true);
} else {
_root.ChangeDragger("Bitmap");
}
_root.SelectingTiles = false;
TileMenu.removeMovieClip();
break;
}
o++;
}
};
Symbol 333 MovieClip Frame 1
stop();
this.onRollOver = function () {
gotoAndStop ("RollOver");
};
Symbol 333 MovieClip Frame 2
stop();
this.onRollOut = function () {
gotoAndStop ("Neutral");
};
Symbol 337 MovieClip [TileMenu] Frame 1
ExitTileButton.onRollOver = function () {
ExitTileButton.useHandCursor = true;
};
WallTab.onRollOver = function () {
DungeonTab.useHandCursor = true;
};
BGTab.onRollOver = function () {
BGTab.useHandCursor = true;
};
AccTab.onRollOver = function () {
Room.useHandCursor = true;
};
EneTab.onRollOver = function () {
Enemies.useHandCursor = true;
};
PageMC.onRollOver = function () {
PageMC.useHandCursor = true;
};
Symbol 344 MovieClip Frame 1
stop();
this.onRollOver = function () {
gotoAndStop ("RollOver");
};
Symbol 344 MovieClip Frame 2
stop();
this.onRollOut = function () {
gotoAndStop ("Neutral");
};
Symbol 345 MovieClip [ImportMC] Frame 1
ImportButtonLoad.onRollOver = function () {
ImportButtonLoad.useHandCursor = true;
};
ExitImportButton.onRollOver = function () {
ExitImportButton.useHandCursor = true;
};
Symbol 473 MovieClip [Char] Frame 1
stop();
Symbol 473 MovieClip [Char] Frame 20
_root.JustLanded = false;
Symbol 473 MovieClip [Char] Frame 38
_root.JustLanded = false;
gotoAndStop ("side-left");
Symbol 473 MovieClip [Char] Frame 62
_root.JustLanded = false;
gotoAndStop ("side-right");
Symbol 473 MovieClip [Char] Frame 71
_root.SlidingNow = true;
Symbol 473 MovieClip [Char] Frame 101
gotoAndStop ("slide-left");
Symbol 473 MovieClip [Char] Frame 121
gotoAndStop ("slide-right");
Symbol 473 MovieClip [Char] Frame 132
_root.JumpingNow = false;
gotoAndStop ("jump-right");
Symbol 473 MovieClip [Char] Frame 145
_root.SlidingNow = true;
Symbol 473 MovieClip [Char] Frame 167
_root.JumpingNow = false;
gotoAndStop ("jump-left");
Symbol 473 MovieClip [Char] Frame 180
_root.StpS.start(0, 1);
Symbol 473 MovieClip [Char] Frame 186
_root.StpS.start(0, 1);
Symbol 473 MovieClip [Char] Frame 194
gotoAndPlay ("move-right");
Symbol 473 MovieClip [Char] Frame 200
_root.StpS.start(0, 1);
Symbol 473 MovieClip [Char] Frame 206
_root.StpS.start(0, 1);
Symbol 473 MovieClip [Char] Frame 214
gotoAndPlay ("move-left");
Symbol 473 MovieClip [Char] Frame 248
_root.CharHit = false;
gotoAndStop (1);
Symbol 473 MovieClip [Char] Frame 258
_root.CharHit = false;
gotoAndStop (1);
Symbol 473 MovieClip [Char] Frame 263
stop();
_root.CleanUp("GameOver");
Symbol 473 MovieClip [Char] Frame 297
_root.CleanUp("GameOver");
Symbol 473 MovieClip [Char] Frame 396
gotoAndPlay ("move-right-armout");
Symbol 473 MovieClip [Char] Frame 416
gotoAndPlay ("move-right-armout");
Symbol 473 MovieClip [Char] Frame 468
function TimeFall() {
Count++;
if (Count > 150) {
_root.CleanUp("GameOver");
clearInterval(FallTimer);
}
}
Count = 0;
FallTimer = setInterval(TimeFall, 25);
Symbol 482 MovieClip [TorchMC] Frame 19
gotoAndPlay (1);
Symbol 554 MovieClip Frame 1
stop();
this.onRollOver = function () {
gotoAndStop ("RollOver");
};
Symbol 554 MovieClip Frame 2
this.onRollOut = function () {
gotoAndStop ("Neutral");
};
Symbol 559 MovieClip Frame 1
stop();
this.onRollOver = function () {
gotoAndStop ("RollOver");
};
Symbol 559 MovieClip Frame 2
stop();
this.onRollOut = function () {
gotoAndStop ("Neutral");
};
Symbol 564 MovieClip Frame 1
stop();
this.onRollOver = function () {
gotoAndStop ("RollOver");
};
Symbol 564 MovieClip Frame 2
stop();
this.onRollOut = function () {
gotoAndStop ("Neutral");
};
Symbol 569 MovieClip [musique] Frame 1
stop();
Symbol 569 MovieClip [musique] Frame 2
stop();
Symbol 572 MovieClip [musique2] Frame 1
stop();
Symbol 572 MovieClip [musique2] Frame 2
stop();
Symbol 573 MovieClip [Stats] Frame 1
var Scroll = false;
var Delay = 0;
onMouseMove = function () {
if (Scroll && (!MenuTab.hitTest(_root._xmouse, _root._ymouse, true))) {
Scroll = false;
var _local2 = new mx.transitions.Tween(MenuTab, "_y", mx.transitions.easing.Strong.easeOut, MenuTab._y, -58, 1, true);
var _local5 = new mx.transitions.Tween(MenuButton, "_y", mx.transitions.easing.Strong.easeOut, MenuButton._y, -43, 1, true);
var _local4 = new mx.transitions.Tween(ContEditButton, "_y", mx.transitions.easing.Strong.easeOut, ContEditButton._y, -43, 1, true);
var _local3 = new mx.transitions.Tween(RestartButton, "_y", mx.transitions.easing.Strong.easeOut, RestartButton._y, -43, 1, true);
_local2.onMotionFinished = function () {
Delay = 0;
};
}
};
onEnterFrame = function () {
if ((!Scroll) && (MenuTab.hitTest(_root._xmouse, _root._ymouse, true))) {
Delay++;
if (Delay >= 15) {
Scroll = true;
var _local2 = new mx.transitions.Tween(MenuTab, "_y", mx.transitions.easing.Strong.easeOut, MenuTab._y, -3, 1, true);
var _local5 = new mx.transitions.Tween(MenuButton, "_y", mx.transitions.easing.Strong.easeOut, MenuButton._y, 5, 1, true);
var _local4 = new mx.transitions.Tween(ContEditButton, "_y", mx.transitions.easing.Strong.easeOut, ContEditButton._y, 5, 1, true);
var _local3 = new mx.transitions.Tween(RestartButton, "_y", mx.transitions.easing.Strong.easeOut, RestartButton._y, 5, 1, true);
}
}
};
Symbol 586 MovieClip Frame 1
stop();
Symbol 586 MovieClip Frame 2
stop();
Symbol 587 MovieClip Frame 1
head.gotoAndStop("attack");
Symbol 626 MovieClip Frame 1
stop();
Symbol 628 MovieClip [playhubSplash] Frame 278
this.removeMovieClip();
Symbol 643 MovieClip Frame 1
stop();
Symbol 689 MovieClip Frame 35
stop();
Symbol 715 MovieClip Frame 10
stop();
Symbol 734 Button
on (release) {
getURL ("http://www.playhub.com/?utm_medium=brandedgames_external&utm_campaign=ninja_plus_2&utm_source=domain.com&utm_content=ingame", "_blank");
}
Symbol 748 MovieClip Frame 1
stop();
Symbol 760 MovieClip Frame 1
stop();
Symbol 770 MovieClip Frame 1
stop();
Symbol 787 MovieClip Frame 1
stop();
Symbol 797 MovieClip Frame 1
stop();
Symbol 807 MovieClip Frame 1
stop();
Symbol 850 MovieClip Frame 1
stop();
Symbol 927 MovieClip Frame 10
stop();
Symbol 928 Button
on (release) {
getURL ("http://www.playhub.com/?utm_medium=brandedgames_external&utm_campaign=ninja_plus_2&utm_source=domain.com&utm_content=ingame", "_blank");
}
Symbol 940 MovieClip Frame 10
stop();
Symbol 943 Button
on (release) {
getURL ("http://www.playhub.com/?utm_medium=brandedgames_external&utm_campaign=ninja_plus_2&utm_source=domain.com&utm_content=ingame", "_blank");
}
Symbol 984 MovieClip Frame 10
stop();
Symbol 1085 Button
on (release) {
getURL ("http://www.playhub.com/?utm_medium=brandedgames_external&utm_campaign=ninja_plus_2&utm_source=domain.com&utm_content=ingame", "_blank");
mochi.as2.MochiServices.addLinkEvent("http://x.mochiads.com/link/ff8a0e5b4b31b20e", "http://www.playhub.com/?utm_medium=brandedgames_external&utm_campaign=ninja_plus_2&utm_source=domain.com&utm_content=ingame", MG);
}