Frame 1
stop();
getURL ("http://www.mindistortion.net/games/mindscape", "_self");
Instance of Symbol 203 MovieClip in Frame 1
onClipEvent (load) {
status = "loading...";
}
onClipEvent (enterFrame) {
myPercentLoaded = int((_root.getBytesLoaded() / _root.getBytesTotal()) * 100);
_root.bytesLoaded = int(_root.getBytesLoaded());
_root.bytesTotal = int(_root.getBytesTotal());
if (myPercentLoaded == 100) {
status = "loaded!";
ystep = (-50 - _y) / 5;
_y = (_y + ystep);
}
if (_y <= 20) {
_root.play();
}
}
Frame 19
stop();
Frame 25
stop();
Frame 32
_global.mycontrols = 1;
if (_global.mycontrols == 0) {
_global.ctrlUp = 38;
_global.ctrlDown = 40;
_global.ctrlLeft = 37;
_global.ctrlRight = 39;
_global.ctrlAction = 32;
_global.ctrlAction2 = 17;
} else {
_global.ctrlUp = 87;
_global.ctrlDown = 83;
_global.ctrlLeft = 65;
_global.ctrlRight = 68;
_global.ctrlAction = 32;
_global.ctrlAction2 = 16;
}
_global.ctrlStatus = new Array();
onEnterFrame = function () {
var _local1 = _global;
if (Key.isDown(_local1.ctrlUp)) {
_local1.ctrlStatus[_local1.ctrlUp] = true;
} else {
_local1.ctrlStatus[_local1.ctrlUp] = false;
}
if (Key.isDown(_local1.ctrlDown)) {
_local1.ctrlStatus[_local1.ctrlDown] = true;
} else {
_local1.ctrlStatus[_local1.ctrlDown] = false;
}
if (Key.isDown(_local1.ctrlLeft)) {
_local1.ctrlStatus[_local1.ctrlLeft] = true;
} else {
_local1.ctrlStatus[_local1.ctrlLeft] = false;
}
if (Key.isDown(_local1.ctrlRight)) {
_local1.ctrlStatus[_local1.ctrlRight] = true;
} else {
_local1.ctrlStatus[_local1.ctrlRight] = false;
}
if (Key.isDown(_local1.ctrlAction)) {
_local1.ctrlStatus[_local1.ctrlAction] = true;
} else {
_local1.ctrlStatus[_local1.ctrlAction] = false;
}
};
var currLvl = 0;
var score = 0;
var lifes = 5;
var health = 100;
var musicVol = 80;
var endSuccess = false;
var bonusScore = 0;
_root.attachMovie("JukeBox", "jukebox", 10);
var secretsFound = new Array();
var medalsEarned = new Array();
var unlockedLevels = 0;
var itemsTotal = new Array();
var itemsTotalLvl = new Array();
var itemsCollected = new Array();
_root.itemsCollected[0] = 0;
_root.itemsCollected[1] = 0;
_root.itemsCollected[2] = 0;
myProfile = SharedObject.getLocal("mindScapeProfile");
if ((myProfile.data.url != "") && (myProfile.data.url != undefined)) {
var secretsFound = myProfile.data.secretsFound;
var medalsEarned = myProfile.data.medalsEarned;
var unlockedLevels = myProfile.data.unblockedLevels;
}
Frame 33
jukebox.playTrack("menu");
jukebox.targetVol = _root.musicVol;
Frame 34
stop();
Frame 35
_root.jukebox.targetVol = 0;
myProfile = SharedObject.getLocal("mindScapeProfile");
myProfile.data.secretsFound = secretsFound;
myProfile.data.medalsEarned = medalsEarned;
myProfile.data.unblockedLevels = unlockedLevels;
myProfile.data.url = "http://www.MINDistortion.net";
myProfile.flush();
removeMovieClip("hud");
removeMovieClip("worldContainer");
if (_root.lifes < 0) {
_root.attachMovie("game_over", "cine", 1);
stop();
} else if (currLvl == 0) {
_root.attachMovie("cine_1", "cine", 1);
stop();
} else if (currLvl == 4) {
_root.attachMovie("cine_2", "cine", 1);
stop();
} else if (currLvl == 101) {
_root.score = _root.score + _root.bonusScore;
_root.bonusScore = 0;
_root.attachMovie("cine_3", "cine", 1);
_root.unlockedLevels = 1;
stop();
} else if (currLvl == 102) {
_root.score = _root.score + _root.bonusScore;
_root.bonusScore = 0;
_root.attachMovie("cine_4", "cine", 1);
_root.unlockedLevels = 2;
stop();
} else if (currLvl == 12) {
_root.attachMovie("cine_5", "cine", 1);
stop();
} else if ((currLvl == 103) && (endSuccess)) {
_root.score = _root.score + _root.bonusScore;
_root.bonusScore = 0;
_root.attachMovie("cine_6", "cine", 1);
stop();
} else if ((currLvl == 103) && (!endSuccess)) {
_root.attachMovie("cine_7", "cine", 1);
stop();
}
Frame 36
removeMovieClip("cine");
if (_root.currLvl == 0) {
_root.currLvl = 1;
} else if (((_root.currLvl % 4) != 0) && (_root.currLvl < 100)) {
_root.currLvl++;
} else if (_root.currLvl > 100) {
_root.currLvl = _root.currLvl - 100;
_root.currLvl = _root.currLvl * 4;
_root.currLvl++;
} else {
_root.currLvl = 100 + (_root.currLvl / 4);
}
_root.gotoAndPlay("startLvl");
Frame 37
_root.attachMovie("HUD", "hud", 6);
_root.createEmptyMovieClip("worldContainer", 2);
worldContainer._x = 275;
worldContainer._y = 200;
worldContainer.attachMovie("World", "world", 10);
_root.attachMovie("loadingScreen", "loadingScreen", 50);
Frame 38
worldContainer.world.buildLevel(MapList.loadMap(currLvl));
var tmpArr = MapList.loadOverlay(currLvl);
if (tmpArr[0] != undefined) {
worldContainer.world.hideTiles();
worldContainer.world.mapOverlay(tmpArr[0], tmpArr[1]);
worldContainer.world.mapBg(MapList.loadBg(currLvl));
}
Frame 39
stop();
worldContainer.world.startGame();
if (currLvl <= 4) {
jukebox.playTrack("candy_meadows_1");
} else if (currLvl == 101) {
jukebox.playTrack("candy_meadows_2");
} else if ((currLvl >= 5) && (currLvl <= 8)) {
jukebox.playTrack("clockwork_1");
} else if (currLvl == 102) {
jukebox.playTrack("clockwork_2");
} else if ((currLvl >= 9) && (currLvl <= 12)) {
jukebox.playTrack("asylum_1");
} else if (currLvl == 103) {
jukebox.playTrack("asylum_2");
}
removeMovieClip("loadingScreen");
_root.jukebox.targetVol = _root.musicVol;
Frame 40
_root.jukebox.targetVol = 0;
_root.removeMovieClip("worldContainer");
_root.removeMovieClip("HUD");
_root.removeMovieClip("cine");
_root.myurl = _root._url;
_root.domain1 = _root.myurl.substring(0, 28);
_root.domain2 = _root.myurl.substring(0, 35);
_root.domain3 = _root.myurl.substring(0, 31);
if (((_root.domain1 == "http://www.mindistortion.net") || (_root.domain2 == "http://mindistortion.freshgames.net")) || (_root.domain3 == "http://mindistortion.finito.net")) {
gotoAndStop (43);
} else {
gotoAndStop (41);
}
Frame 42
stop();
Frame 44
stop();
Symbol 1 MovieClip [Enemy9] Frame 1
#initclip 66
Object.registerClass("Enemy9", Enemy9);
#endinitclip
Symbol 2 MovieClip [Enemy8] Frame 1
#initclip 37
Object.registerClass("Enemy8", Enemy8);
#endinitclip
Symbol 3 MovieClip [Enemy7] Frame 1
#initclip 38
Object.registerClass("Enemy7", Enemy7);
#endinitclip
Symbol 4 MovieClip [Enemy6] Frame 1
#initclip 39
Object.registerClass("Enemy6", Enemy6);
#endinitclip
Symbol 5 MovieClip [Enemy5] Frame 1
#initclip 40
Object.registerClass("Enemy5", Enemy5);
#endinitclip
Symbol 6 MovieClip [Enemy4] Frame 1
#initclip 41
Object.registerClass("Enemy4", Enemy4);
#endinitclip
Symbol 7 MovieClip [Enemy3] Frame 1
#initclip 42
Object.registerClass("Enemy3", Enemy3);
#endinitclip
Symbol 8 MovieClip [Enemy2] Frame 1
#initclip 43
Object.registerClass("Enemy2", Enemy2);
#endinitclip
Symbol 9 MovieClip [Enemy1] Frame 1
#initclip 44
Object.registerClass("Enemy1", Enemy1);
#endinitclip
Symbol 10 MovieClip [Player] Frame 1
#initclip 45
Object.registerClass("Player", Player);
#endinitclip
Symbol 43 MovieClip [TraceCell] Frame 1
#initclip 46
Object.registerClass("TraceCell", TraceCell);
#endinitclip
Symbol 44 MovieClip [Cell] Frame 1
#initclip 47
Object.registerClass("Cell", Cell);
#endinitclip
Symbol 45 MovieClip [TraceWorld] Frame 1
#initclip 48
Object.registerClass("TraceWorld", TraceWorld);
#endinitclip
Symbol 46 MovieClip [World] Frame 1
#initclip 49
Object.registerClass("World", World);
#endinitclip
Symbol 47 MovieClip [Editor] Frame 1
#initclip 50
Object.registerClass("Editor", Editor);
#endinitclip
Symbol 49 MovieClip [RawCell] Frame 1
#initclip 51
Object.registerClass("RawCell", RawCell);
#endinitclip
Symbol 63 MovieClip [EditorPanel] Frame 1
#initclip 52
Object.registerClass("EditorPanel", EditorPanel);
#endinitclip
ioLvl.text = 2;
btnOk.onPress = function () {
_root.gotoAndPlay("lbl_play");
};
btnTrace.onPress = function () {
_root.gotoAndPlay("lbl_trace");
};
btnSave.onPress = function () {
io.text = _root.editor.outputMap();
};
btnLoad.onPress = function () {
_root.editor.loadMap(io.text);
};
btnLoadLvl.onPress = function () {
io.text = MapList.loadMap(ioLvl.text);
_root.editor.loadMap(MapList.loadMap(ioLvl.text));
};
Symbol 84 MovieClip [Item9] Frame 1
#initclip 53
Object.registerClass("Item9", Item9);
#endinitclip
Symbol 85 MovieClip [Item8] Frame 1
#initclip 54
Object.registerClass("Item8", Item8);
#endinitclip
Symbol 86 MovieClip [Item7] Frame 1
#initclip 55
Object.registerClass("Item7", Item7);
#endinitclip
Symbol 87 MovieClip [Item6] Frame 1
#initclip 56
Object.registerClass("Item6", Item6);
#endinitclip
Symbol 88 MovieClip [Item5] Frame 1
#initclip 57
Object.registerClass("Item5", Item5);
#endinitclip
Symbol 89 MovieClip [Item4] Frame 1
#initclip 58
Object.registerClass("Item4", Item4);
#endinitclip
Symbol 90 MovieClip [Item3] Frame 1
#initclip 59
Object.registerClass("Item3", Item3);
#endinitclip
Symbol 91 MovieClip [Item2] Frame 1
#initclip 60
Object.registerClass("Item2", Item2);
#endinitclip
Symbol 108 MovieClip [Item1] Frame 1
#initclip 61
Object.registerClass("Item1", Item1);
#endinitclip
Symbol 111 MovieClip [Item0] Frame 1
#initclip 62
Object.registerClass("Item0", Item0);
#endinitclip
Symbol 132 MovieClip [player_lookaround_3] Frame 139
_parent.attachMovie(_parent._parent.playerStatus, "sprite", 1);
Symbol 135 MovieClip [player_lookaround_2] Frame 80
_parent.attachMovie(_parent._parent.playerStatus, "sprite", 1);
Symbol 156 Button
on (release) {
if (!menuOut) {
_root.attachMovie("MenuBox", "menuBox", 3);
_root.menuBox.targetY = 20;
menuOut = true;
} else {
_root.menuBox.targetY = -(_root.menuBox._height + 5);
menuOut = false;
}
}
Symbol 157 MovieClip [HUD] Frame 1
#initclip 63
Object.registerClass("HUD", HUD);
#endinitclip
Symbol 161 MovieClip [JukeBox] Frame 1
#initclip 64
Object.registerClass("JukeBox", JukeBox);
#endinitclip
Instance of Symbol 165 MovieClip in Symbol 167 MovieClip [loadingScreen] Frame 1
onClipEvent (load) {
if ((_root.currLvl <= 4) || (_root.currLvl == 101)) {
gotoAndStop (1);
} else if (((_root.currLvl >= 5) && (_root.currLvl <= 8)) || (_root.currLvl == 102)) {
gotoAndStop (2);
} else if (((_root.currLvl >= 9) && (_root.currLvl <= 12)) || (_root.currLvl == 103)) {
gotoAndStop (3);
}
}
Symbol 170 MovieClip [Message] Frame 1
#initclip 65
Object.registerClass("Message", Message);
#endinitclip
Symbol 179 Button
on (release) {
getURL ("http://www.armorgames.com", "_blank");
}
Symbol 184 Button
on (release) {
getURL ("http://www.mindistortion.net", "_blank");
}
Instance of Symbol 200 MovieClip in Symbol 203 MovieClip Frame 1
onClipEvent (enterFrame) {
_xscale = _parent.myPercentLoaded;
}
Symbol 1222 MovieClip [__Packages.MapList] Frame 0
class MapList
{
function MapList () {
}
static function loadMap(id) {
var _local2 = id;
var _local1 = new Array();
_local1[0] = "20|20:3C.01.C.01.2W.01.B.p.01.2Q.01.g.01.i.01.C.01.2O.01.g.01.i.01.C.01.Sk.0";
_local1[1] = "60|60:5q.01.J1.01.Hm.01.2q.01.Hm.01.2q.01.Hm.01.2q.01.2Q.01.C7.01.2q.01.1z.01.Bi.01.1C.01.p.2D.01.p.Q.01.2q.01.E.01.t.01.p.1n.01.1F.01.1J.B.01.1J.B.01.1J.B.01.1J.I.01.C.01.C.01.C.01.C.01.C.01.H.01.1J.B.01.1J.B.01.1J.B.01.1J.B.01.1J.C.01.C.01.C.01.C.01.C.01.C.01.B.M.01.M.01.M.01.M.01.4D.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.I.01.C.01.C.01.C.01.28.01.C.01.C.01.C.01.C.01.C.01.1q.01.B.4n.01.2Q.01.25.01.B.L.p.39.01.C.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.25.01.B.4n.01.2Q.01.25.01.B.4n.01.2Q.01.25.01.C.01.B.L.1J.36.01.2Q.01.28.01.B.L.1J.36.01.2Q.01.28.01.B.L.1J.36.01.2Q.01.28.01.B.L.1J.36.01.2Q.01.1n.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.B.L.1J.B.L.01.Cj.01.2Q.01.1n.01.1n.01.1aS.01.2Q.01.1n.01.1n.01.1aS.01.2Q.01.1n.01.1n.01.13.01.B.L.01.19.L.01.Cm.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.1n.01.1n.01.13.01.B.Yq.01.1n.01.13.01.B.L.p.Ig.01.1n.01.13.01.B.Yq.01.1n.01.1bT.01.1n.01.1bT.01.1n.01.16.01.B.L.1J.B.L.01.1rM.01.1n.01.16.01.B.L.1J.Id.01.1n.01.16.01.B.L.1J.Id.01.1n.01.16.01.B.L.1J.Id.01.1n.01.1bT.01.1n.01.1bT.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.B.L.01.19.L.01.1rh.01.B.Z8.01.B.L.p.Iy.01.B.Z8.01.B.3O.01.p.L.1J.Im.01.C.01.w.01.p.L.1J.Ip.01.w.01.p.L.1J.Ip.01.w.01.p.L.1J.Ip.01.I.01.p.L.1J.Ip.01.J1.01.J1.01.C.01.C.01.p.L.p.M.01.V.L.1J.Is.01.p.O.01.V.L.1J.Is.01.p.O.01.V.L.1J.Is.01.p.Z8.01.p.Z8.01.C.01.J1.01.J1.01.J1.01.J1.01.J1.01.C.01.1K.01.27p.01.J1.01.C.01.C.01.C.01.C.01.C.01.C.01.SN.0";
_local1[2] = "60|60:r.01.C.01.C.01.C.01.C.01.C.01.J1.01.Iv.01.1K.01.1K.01.J1.01.J1.01.It.01.f.01.19.f.01.1A.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.Im.01.9u.01.Im.01.9u.01.IY.01.i.01.I.01.9u.01.IY.01.f.1J.C.01.I.01.9u.01.IV.01.f.01.19.f.01.1A.01.I.01.9u.01.Im.01.9u.01.Im.01.9u.01.IV.01.i.01.1n.01.9u.01.IV.01.f.p.M.01.1n.01.9u.01.IV.01.i.01.1n.01.9u.01.IV.01.i.01.1n.01.9u.01.Im.01.9u.01.Im.01.9u.01.IY.01.i.01.I.01.9u.01.IY.01.f.p.C.01.I.01.9u.01.IY.01.i.01.I.01.9u.01.IV.01.f.01.19.f.01.1A.01.I.01.9u.01.Im.01.9u.01.Im.01.9u.01.IY.01.f.01.19.f.01.1A.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.Ig.01.J1.01.J1.01.It.01.f.p.M.01.W.01.It.01.i.01.W.01.It.01.i.01.W.01.It.01.i.01.W.01.C.01.Iw.01.f.1J.C.01.Iq.01.g.01.g.01.f.1J.C.01.IC.01.2C.01.E.01.h.01.f.1J.C.01.IC.01.2C.01.E.01.D.01.f.1J.C.01.IC.01.2E.01.C.01.D.01.f.1J.C.01.IC.01.B.01.1J.B.01.1J.B.01.1J.B.01.1J.B.01.1J.B.01.1J.1t.01.C.01.G.01.f.1J.C.01.IC.01.B.01.1J.B.01.1J.B.01.1J.B.01.1J.B.01.1J.B.01.1J.B.01.1J.1n.01.C.01.G.01.f.01.19.f.01.1A.01.C.01.C.01.C.01.C.01.C.01.C.01.Hu.01.B.01.1J.B.01.1J.B.01.1J.B.01.1J.B.01.1J.B.01.1J.B.01.1J.B.01.1J.F.01.C.01.1z.01.9r.01.Hu.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.1z.01.9r.01.Ib.01.f.01.19.f.01.1A.01.C.01.C.01.C.01.C.01.C.01.C.01.Ie.01.f.1J.C.01.Iw.01.f.1J.C.01.Iw.01.f.1J.C.01.It.01.f.01.19.f.01.1A.01.C.01.C.01.C.01.C.01.C.01.C.01.Ip.01.9r.01.Ip.01.9r.01.Ie.01.f.01.19.f.01.1A.01.C.01.C.01.C.01.C.01.C.01.Ih.01.i.01.Iw.01.i.01.I6.01.2R.01.i.01.I6.01.2L.01.g.01.i.01.C.01.I6.01.2I.01.F.01.i.01.I9.01.2I.01.C.01.C.01.1M.01.I9.01.27.01.1J.B.01.1J.B.01.1J.B.01.1J.C.01.C.01.C.01.C.01.I9.01.21.01.p.P.01.g.01.g.01.g.01.g.01.II.01.E.01.8J.01.g.01.g.01.g.01.g.01.IU.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.IP.0";
_local1[3] = "60|60:2.01.J1.01.2z.01.1J.B.01.1J.B.01.1J.B.01.1J.2x.01.24.01.p.2V.01.1J.B.01.1J.B.01.1J.B.01.1J.2x.01.22.01.g.01.g.01.g.01.l.01.1J.B.01.1J.B.01.1J.B.01.1J.B.01.1J.1m.01.1J.B.01.1J.B.01.1J.B.01.1J.I.01.C.01.C.01.C.01.2x.01.E.01.8P.01.M.01.M.01.M.01.S.01.C.01.C.01.C.01.C.01.I.01.W.01.C.01.C.01.C.01.Hl.01.C.01.C.01.C.01.C.01.C.01.C.01.J1.01.C.01.g.01.g.01.g.01.15P.01.E.01.p.YF.01.2P.01.C.01.C.01.C.01.C.01.1n.01.Bl.01.CV.01.2b.01.C.01.C.01.F.01.BS.01.1J.B.01.1J.B.01.1J.1n.01.1C.01.p.3t.01.Bj.01.2h.01.C.01.C.01.C.01.w.01.C.01.C.01.I.01.W.01.C.01.C.01.C.01.C.01.E.01.p.3Y.01.1G.01.19.01.1J.B.01.1J.1n.01.1H.01.2n.01.C.01.8R.01.W.01.1n.01.C.01.C.01.C.01.C.01.C.01.E.01.p.P.01.1G.01.C.01.C.01.C.01.I.01.1C.01.1M.01.2n.01.C.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.22.01.C.01.C.01.C.01.C.01.22.01.C.01.C.01.C.01.C.01.B.M.01.M.01.M.01.M.01.4A.01.C.01.8R.01.W.01.2E.01.22.01.1n.01.B.4P.01.8R.01.5V.01.C.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.1n.01.B.L.p.2l.01.8R.01.5V.01.22.01.1n.01.B.4P.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.2H.01.22.01.1n.01.B.YV.01.22.01.1n.01.B.YV.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.I.01.C.01.B.Z5.01.B.L.1J.Iy.01.B.L.1J.Iy.01.B.L.1J.I9.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.B.L.1J.B.M.01.M.01.M.01.Y7.01.B.W.01.W.01.W.01.W.01.5M.01.oX.01.B.W.01.W.01.V.1J.f.W.01.5M.01.oX.01.1t.01.C.01.C.01.C.01.1u.01.Y.01.f.M.01.M.01.M.01.YA.01.1t.01.I.01.1q.01.16.01.B.L.1J.I9.01.1t.01.I.01.1q.01.16.01.B.L.1J.I9.01.C.01.C.01.C.01.C.01.C.01.C.01.I.01.1q.01.16.01.B.L.1J.Ia.01.1q.01.1bQ.01.1q.01.1bQ.01.1q.01.13.01.B.L.01.19.L.01.1rM.01.1q.01.13.01.B.Yn.01.1q.01.13.01.B.L.p.Id.01.1q.01.13.01.B.Yn.01.1q.01.1bQ.01.1q.01.1bQ.01.1q.01.16.01.B.L.01.19.L.01.1rJ.01.1q.01.16.01.B.Yk.01.1q.01.16.01.B.L.p.Ia.01.1q.01.16.01.B.Yk.01.1q.01.1bQ.01.1q.01.1bQ.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.B.L.01.19.L.01.1rh.01.J1.01.J1.01.J1.02.J0.02.J0.02.J0.02.J0.01.J1.01.C.01.1K.01.1K.01.1K.01.1K.01.1K.01.27d.01.J1.01.J1.01.J1.01.J1.01.J1.01.J1.01.C.01.C.01.C.01.C.01.C.01.C.01.1";
_local1[4] = "60|60:2.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.36.01.1u.01.Ii.01.E.01.8H.01.Ii.01.1u.01.Ii.01.1u.01.Ii.01.1u.01.Ii.01.1p.01.p.D.01.Ii.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.B.L.1J.B.M.01.M.01.M.01.M.01.M.01.M.01.Yn.01.B.L.1J.Iy.01.B.L.1J.Iy.01.B.L.1J.Iy.01.C.01.B.L.p.1n.01.B.L.1J.B.L.1J.Ig.01.B.3R.01.B.L.1J.B.L.1J.Ig.01.B.3R.01.B.L.1J.B.L.1J.Ig.01.B.3R.01.B.L.1J.B.L.1J.II.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.B.L.01.19.L.01.1rJ.01.1w.01.1bK.01.1w.01.9r.01.W.01.p.L.1J.IO.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.B.L.01.19.L.01.1A.01.W.01.p.L.1J.Im.01.I.01.W.01.p.L.1J.Im.01.J1.01.C.01.J1.01.C.01.B.Z8.01.B.L.p.Iy.01.B.3O.01.W.01.C.01.C.01.C.01.C.01.C.01.IX.01.B.3O.01.W.01.B.z.1J.B.V.1J.B.V.1J.B.19.1J.C.01.I6.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.B.L.01.19.L.01.1D.01.W.01.B.L.1J.G.01.f.1J.C.01.I6.01.1w.01.9x.01.C.01.B.L.1J.H.01.1J.C.01.I6.01.1w.01.9x.01.B.L.1J.1m.01.1J.C.01.22.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.2W.01.C.01.g.01.g.01.g.01.g.01.g.01.g.01.10.01.g.01.6d.01.B.L.1J.J.01.L.1J.C.01.22.01.D.01.22.01.H.01.2o.01.C.01.C.01.C.01.B.L.01.19.L.01.1D.01.B.L.1J.D.01.M.01.M.01.M.01.3g.01.B.i.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.B.O.01.2x.01.B.L.1J.F.01.C.01.8m.01.F.01.F.01.D6.01.W.01.1C.01.F.01.2x.01.B.L.1J.F.01.8p.01.F.01.F.01.D6.01.1A.01.i.01.F.01.2x.01.B.L.1J.2T.01.F.01.22.01.F.01.2x.01.B.L.1J.2T.01.F.01.22.01.F.01.2x.01.C.01.B.44.01.F.01.22.01.F.01.2x.01.C.01.B.L.p.42.01.F.01.1o.01.g.01.g.01.g.01.i.01.B.O.01.2x.01.C.01.B.44.01.F.01.20.01.b.01.2T.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.B.44.01.F.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.2T.01.1z.01.Ag.01.B.i.01.30.01.1z.01.Ag.01.B.i.01.30.01.1z.01.9r.01.B.L.01.19.L.01.C0.01.B.i.01.30.01.1z.01.9r.01.B.L.p.2N.01.B.i.01.30.01.1z.01.9r.01.B.3s.01.C.01.C.01.C.01.B.i.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.2E.01.1z.01.9r.01.B.3s.01.G.01.Z.01.W.01.W.01.V.1J.B.V.1J.B.V.1J.B.V.1J.B.V.1J.B.V.1J.B.5F.01.2E.01.1z.01.AX.01.G.01.Z.01.5d.01.2E.01.1z.01.AX.01.G.01.Z.01.5d.01.2E.01.1z.01.16.01.7H.01.Z.01.5d.01.2E.01.1z.01.16.01.B.L.01.19.L.01.1qX.01.2E.01.1z.01.16.01.B.L.p.Ho.01.2E.01.1z.01.16.01.B.4c.01.59.01.2E.01.1z.01.16.01.B.4c.01.59.01.2E.01.1z.01.BE.01.59.01.2E.01.1z.01.Az.01.B.1K.B.1K.B.1J.G.01.V.01.g.01.g.01.g.01.g.01.j.01.2E.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.02.B.01.19.B.01.19.B.01.19.B.01.19.B.01.C1.01.B.1K.B.1K.B.1J.I.01.g.01.g.01.k.01.W.01.W.01.V.p.B.W.01.b.01.2i.01.2I.01.B.1K.B.1K.B.1K.B.1J.I.01.g.01.g.01.77.01.2i.01.1u.01.C.01.C.01.C.01.B.q.C.01.1m.01.g.01.g.01.g.01.7M.01.2i.01.1w.01.g.01.g.01.g.01.g.01.g.01.6x.01.p.3O.01.p.3h.01.2i.01.B.01.1J.B.01.1J.B.01.1J.B.01.1J.B.01.1J.B.01.1J.C.01.C.01.C.01.C.01.C.01.C.01.1m.01.p.3S.01.g.01.g.01.g.01.g.01.g.01.C.01.C.01.C.01.C.01.1p.01.1J.t.01.2i.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.2C.0";
_local1[5] = "60|60:2.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.17.01.25.01.1p.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.Az.01.25.01.2e.01.10.01.Az.01.21.01.1L.01.2e.01.10.01.9v.01.1t.01.2N.01.C.01.C.01.C.01.C.01.B.p.V.C.01.C.01.C.01.B.01.1J.C.01.2e.01.10.01.9v.01.1t.01.2B.01.g.01.g.01.g.01.i.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.B.M.01.M.01.M.01.M.01.41.01.10.01.9v.01.1t.01.B.01.1H.01.F.01.1n.01.1q.01.i.01.25.01.B.4D.01.10.01.9v.01.1t.01.B.01.1H.01.F.01.1n.01.F.01.I.01.i.01.25.01.B.4D.01.10.01.9v.01.C.01.C.01.C.01.B.p.f.C.01.C.01.B.01.1H.01.F.01.1n.01.F.01.I.01.i.01.25.01.B.4D.01.10.01.z.g.01.g.01.g.01.g.01.i.01.C.01.C.01.C.01.C.01.C.01.C.01.B.M.01.P.01.F.01.1n.01.F.01.I.01.f.p.W.01.25.01.B.4D.01.10.01.9s.01.i.01.1t.01.B.S.01.C.01.C.01.1n.01.C.01.B.p.f.I.01.i.01.25.01.B.L.p.5n.01.10.01.9s.01.f.p.W.01.1t.01.B.P.01.i.01.C.01.C.01.B.M.01.M.01.i.01.C.01.C.01.B.P.01.i.01.25.01.B.4D.01.10.01.9s.01.i.01.1t.01.B.L.p.X.01.i.01.F.01.B.P.01.i.01.F.01.B.P.01.i.01.25.01.B.4D.01.10.01.9s.01.i.01.1t.01.B.P.01.i.01.C.01.C.01.B.M.01.g.01.i.01.C.01.C.01.B.P.01.i.01.25.01.B.4D.01.10.01.9s.01.i.01.1t.01.B.S.01.W.01.V.p.f.51.01.W.01.W.01.c.01.i.01.25.01.B.4D.01.10.01.z.g.01.g.01.g.01.g.01.i.01.C.01.C.01.C.01.C.01.C.01.C.01.B.M.01.P.01.Z.01.5A.01.g.01.g.01.i.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.B.M.01.M.01.M.01.M.01.41.01.10.01.9v.01.W.01.W.01.1C.01.B.10.01.W.01.V.01.1H.01.Z.01.52.01.1J.L.B.1J.L.01.1J.T.01.W.01.W.01.W.01.W.01.V.q.W.01.W.01.W.01.W.01.W.01.5s.01.10.01.9v.01.Z.01.f.1J.M.01.B.L.1J.N.01.V.01.1H.01.Z.01.Z.01.g.01.g.01.f.1J.M.01.B.L.1K.S.01.5J.01.5s.01.10.01.A1.01.f.1J.M.01.B.L.1J.N.01.V.01.1H.01.Z.01.52.01.1J.L.V.1J.L.01.1J.T.01.5J.01.5s.01.10.01.9w.01.1J.L.B.1J.M.1J.M.01.B.L.1J.3o.01.54.01.5J.01.5s.01.10.01.17.01.g.01.g.01.f.1J.M.01.C.01.C.01.B.L.1K.M.01.3k.01.54.01.5J.01.5s.01.10.01.9v.01.f.1J.M.01.B.z.1J.L.V.1J.L.01.1J.3o.01.o9.01.10.01.9v.01.f.1J.M.01.B.L.1J.3u.01.o9.01.10.01.9v.01.f.1J.M.01.B.L.1J.Yi.01.10.01.9v.01.f.1J.M.01.B.L.1J.3f.01.1n.01.Hw.01.9s.01.F.01.f.1J.M.01.B.L.1J.N.01.1z.01.1n.01.Hw.01.9s.01.F.01.f.1J.M.01.B.L.1J.N.01.1z.01.1n.01.Hw.01.9s.01.C.01.C.01.1M.01.B.q.01.C.01.1z.01.1n.01.Hw.01.z.g.01.g.01.g.01.i.01.C.01.C.01.C.01.C.01.C.01.C.01.B.L.01.19.L.01.19.L.01.BU.01.C.01.C.01.C.01.C.01.Hw.01.17.01.i.01.1t.01.B.3V.01.i.01.C.01.C.01.C.01.C.01.B.M.01.M.01.3b.01.2t.01.17.01.i.01.1t.01.B.q.01.B.1J.L.B.1J.L.B.1J.L.B.1J.L.B.1J.L.1M.01.1n.01.B.S.01.1w.01.2t.01.17.01.f.1L.01.1t.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.1n.01.B.S.01.1w.01.2t.01.17.01.i.01.1t.01.B.10.01.V.1J.L.V.1J.L.V.1J.L.V.1J.L.V.1J.L.1C.01.1n.01.B.S.01.1w.01.2t.01.17.01.i.01.1t.01.B.3V.01.i.01.C.01.C.01.C.01.C.01.B.S.01.C.01.C.01.C.01.B.p.V.C.01.C.01.C.01.2t.01.z.g.01.g.01.g.01.i.01.C.01.C.01.C.01.C.01.C.01.C.01.B.L.01.19.L.01.19.L.01.BU.01.W.01.W.01.W.01.W.01.Z.01.g.01.i.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.B.M.01.M.01.M.01.M.01.4G.01.9s.01.W.01.W.01.W.01.V.q.W.01.W.01.5D.01.51.01.c.01.i.01.1w.01.B.4S.01.9s.01.57.01.5D.01.51.01.c.01.i.01.1w.01.B.4S.01.9s.01.57.01.5D.01.51.01.c.01.i.01.1w.01.B.L.p.62.01.9s.01.57.01.5D.01.51.01.c.01.f.p.g.01.1w.01.B.4S.01.10.01.17.01.57.01.5Y.01.i.01.1w.01.B.4S.01.10.01.Ab.01.1q.01.f.01.1A.01.1w.01.B.4S.01.10.01.Ab.01.1q.01.f.01.1A.01.1w.01.B.4S.01.10.01.Ab.01.1n.01.f.01.19.f.01.1A.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.B.M.01.M.01.M.01.M.01.4G.01.10.01.Ab.01.I.01.I.01.V.01.19.V.01.19.V.01.19.W.01.W.01.V.q.W.01.67.01.10.01.17.01.1w.01.22.01.B.1J.L.B.1J.L.B.1J.L.B.1J.Q.01.V.01.Ba.01.67.01.9s.01.1w.01.1q.01.g.01.g.01.g.01.i.01.C.01.C.01.C.01.B.M.01.3b.01.67.01.9s.01.1w.01.1n.01.1n.01.i.01.I.01.B.L.p.5E.01.67.01.9s.01.1w.01.1n.01.1n.01.i.01.I.01.B.3e.01.67.01.9s.01.C.01.C.01.B.p.01.C.01.C.01.C.01.C.01.1n.01.1n.01.i.01.C.01.C.01.C.01.B.M.01.M.01.M.01.M.01.M.01.4h.01.z.g.01.g.01.g.01.i.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.B.S.01.C.01.C.01.C.01.F.01.W.01.V.q.W.01.o9.01.17.01.f.p.W.01.1w.01.B.L.p.X.01.f.1J.M.01.C.01.C.01.C.01.B.L.1J.T.01.o9.01.17.01.i.01.1w.01.B.P.01.f.1J.M.01.I.01.B.L.1J.T.01.o9.01.17.01.i.01.1w.01.B.P.01.f.1J.M.01.I.01.B.L.1J.T.01.o9.01.17.01.i.01.1w.01.B.P.01.f.1J.M.01.C.01.C.01.C.01.B.L.1K.M.01.M.01.Y4.01.17.01.i.01.1w.01.B.S.01.W.01.W.01.V.q.oO.01.17.01.i.01.1w.01.B.S.01.c.01.oO.01.z.g.01.g.01.g.01.i.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.B.M.01.M.01.3P.01.oO.01.9s.01.V.1J.L.V.1J.L.V.1J.L.V.1J.L.V.1J.L.V.1J.L.V.1J.L.V.1J.3W.01.oO.01.9s.01.5A.01.5A.01.oO.01.9s.01.5A.01.oj.01.9s.01.5A.01.50.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.6";
_local1[6] = "60|60:5.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.1bc.01.10.01.1bc.01.10.01.1bc.01.10.01.1bc.01.10.01.1bc.01.10.01.Az.01.1q.01.2t.01.10.01.Az.01.1q.01.2t.01.10.01.Az.01.1q.01.2t.01.10.01.Az.01.1q.01.2t.01.10.01.Az.01.C.01.C.01.C.01.B.p.V.C.01.2t.01.10.01.Ak.01.g.01.g.01.g.01.g.01.i.01.C.01.C.01.C.01.C.01.C.01.B.M.01.M.01.M.01.M.01.4G.01.10.01.Aw.01.i.01.1q.01.B.4S.01.10.01.Av.01.1J.f.01.1K.01.1q.01.B.L.p.62.01.10.01.Aw.01.f.p.W.01.1q.01.B.4S.01.10.01.Aw.01.i.01.1q.01.B.4S.01.10.01.Ak.01.g.01.g.01.g.01.g.01.i.01.C.01.C.01.C.01.C.01.C.01.B.M.01.M.01.M.01.M.01.4G.01.10.01.Az.01.W.01.W.01.W.01.V.q.W.01.67.01.10.01.Az.01.50.01.g.01.g.01.7h.01.10.01.Az.01.c.01.W.01.V.1J.01.67.01.10.01.Az.01.54.01.b.01.M.01.L.V.01.M.01.M.01.L.B.01.48.01.10.01.Az.01.54.01.Z.01.W.01.W.01.c.01.2Y.01.10.01.BE.01.51.01.c.01.C.01.C.01.2S.01.10.01.Aw.01.25.01.V.01.g.01.g.01.f.B.01.g.01.g.01.k.01.C.01.C.01.1z.01.1p.01.10.01.Aw.01.2V.01.g.01.g.01.k.01.C.01.B.p.V.C.01.F.01.1p.01.10.01.Aw.01.2k.01.g.01.g.01.g.01.h.01.1p.01.10.01.Aw.01.2J.01.1E.01.B.1J.L.B.1J.L.B.1J.L.B.1J.3Z.01.1p.01.10.01.Aw.01.B.p.f.C.01.C.01.B.1J.L.B.1J.L.B.1J.L.B.1J.L.B.1J.L.B.1J.L.B.1J.L.B.1J.L.B.1J.L.B.1J.L.B.1J.L.B.01.19.C.01.E.01.C.01.C.01.C.02.C.01.C.01.B.p.V.C.01.C.01.C.01.C.01.1s.01.Ah.01.g.01.g.01.g.01.g.01.i.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.B.M.01.M.01.M.01.O.01.Ae.01.1q.01.i.01.I.01.B.3e.01.i.01.2H.01.B.3R.01.Ae.01.1q.01.i.01.I.01.B.3e.01.i.01.2H.01.B.3R.01.Ae.01.1n.01.g.01.i.01.C.01.C.01.C.01.B.M.01.M.01.M.01.M.01.3S.01.i.01.F.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.F.01.B.L.p.51.01.Ae.01.I.01.I.01.W.01.W.01.V.q.5J.01.i.01.F.01.B.01.1J.L.01.1J.L.01.1J.L.B.1J.L.B.1J.L.B.1J.L.B.1J.L.01.1J.L.01.1J.M.01.F.01.B.3R.01.Ae.01.C.01.C.01.C.01.I.01.c.01.54.01.i.01.J.01.i.01.F.01.B.01.1J.L.01.1J.L.01.1J.L.B.1J.L.B.1J.L.B.1J.L.B.1J.L.01.1J.L.01.1J.M.01.F.01.B.3R.01.AP.01.g.01.g.01.g.01.g.01.i.01.C.01.C.01.C.01.B.L.1K.3P.01.54.01.f.1J.10.01.J.01.i.01.F.01.B.01.1J.L.01.1J.L.01.1J.L.B.1J.L.B.1J.L.B.1J.L.B.1J.L.01.1J.L.01.1J.M.01.F.01.B.3R.01.Ab.01.f.p.W.01.I.01.B.L.1J.3Q.01.54.01.i.01.J.01.f.p.W.01.F.01.B.f.1J.L.f.1J.L.f.1J.M.01.C.01.C.01.C.01.B.L.1K.L.1J.M.01.F.01.B.3R.01.Ab.01.i.01.I.01.B.L.1J.3Q.01.5J.01.i.01.F.01.B.f.1J.L.f.1J.L.f.1J.M.01.I.01.B.L.1K.L.1J.M.01.F.01.B.3R.01.AP.01.g.01.g.01.g.01.g.01.i.01.C.01.C.01.C.01.B.L.1J.3u.01.i.01.F.01.B.f.1J.L.f.1J.L.f.1J.M.01.I.01.B.L.1K.L.1J.M.01.F.01.B.3R.01.Ae.01.W.01.W.01.Y.01.B.L.1J.3i.01.i.01.G.01.i.01.F.01.B.f.1J.L.f.1J.L.f.1J.M.01.C.01.C.01.C.01.B.L.1K.L.1J.M.01.C.01.C.01.B.M.01.M.01.M.01.O.01.Ae.01.Z.01.Y.01.B.L.1J.3i.01.i.01.G.01.i.01.F.01.B.01.1J.L.01.1J.L.01.1J.L.V.1J.L.V.1J.L.V.1J.L.V.1J.L.01.1J.L.01.1J.L.W.01.W.01.56.01.Ae.01.Z.01.Y.01.B.L.1J.3i.01.f.p.g.01.G.01.i.01.F.01.B.01.1J.L.01.1J.L.01.1J.L.V.1J.L.V.1J.L.V.1J.L.V.1J.L.01.1J.L.01.1J.L.Z.01.56.01.Ae.01.Z.01.Y.01.B.L.1J.3i.01.i.01.G.01.i.01.F.01.B.01.1J.L.01.1J.L.01.1J.L.V.1J.L.V.1J.L.V.1J.L.V.1J.L.01.1J.L.01.1J.M.01.C.01.C.01.B.M.01.M.01.M.01.O.01.AD.01.1n.01.21.01.B.L.1J.3i.01.i.01.G.01.i.01.F.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.F.01.B.3R.01.AD.01.1n.01.1q.01.F.01.E.01.B.L.1J.3u.01.i.01.2H.01.B.L.p.51.01.AD.01.1n.01.1q.01.F.01.E.01.B.L.1J.3u.01.i.01.2H.01.B.3R.01.AD.01.1n.01.1q.01.F.01.E.01.B.L.1J.3l.01.i.01.B.g.01.i.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.B.M.01.M.01.M.01.O.01.AD.01.C.01.C.01.B.p.V.C.01.1q.01.C.01.C.01.E.01.B.L.1J.3l.01.i.01.G.01.W.01.W.01.Y.01.C.01.C.01.L.W.01.W.01.W.01.W.01.W.01.W.01.W.01.W.01.V.p.6g.01.9y.01.g.01.g.01.g.01.g.01.i.01.C.01.C.01.C.01.C.01.B.S.01.i.01.C.01.C.01.C.01.B.L.01.1A.01.Bm.01.i.01.G.01.50.01.N.01.5G.01.56.01.9s.01.C.01.1q.01.i.01.1n.01.B.S.01.i.01.I.01.B.3b.01.g.01.g.01.g.01.g.01.i.01.C.01.C.01.C.01.G.01.W.01.5J.01.56.01.9s.01.C.01.1q.01.i.01.1n.01.B.L.p.a.01.i.01.I.01.B.3q.01.W.01.W.01.W.01.c.01.5M.01.56.01.9s.01.C.01.1q.01.i.01.1n.01.B.P.01.g.01.i.01.C.01.C.01.C.01.B.L.p.f.M.01.M.01.M.01.3e.01.57.01.5M.01.53.01.9q.01.1J.L.01.1J.L.C.01.D.01.1J.L.f.1J.L.g.01.g.01.i.01.C.01.C.01.C.01.C.01.B.M.01.S.01.W.01.W.01.W.01.5V.01.5s.01.9q.01.1J.N.01.C.01.G.01.1J.T.01.W.01.W.01.W.01.W.01.54.01.c.01.5V.01.5s.01.z.g.01.g.01.g.01.g.01.i.01.C.01.B.M.01.M.01.M.01.P.01.51.01.54.01.c.01.5V.01.5s.01.z.g.01.g.01.g.01.g.01.i.01.C.01.B.M.01.M.01.M.01.P.01.51.01.54.01.c.01.o6.01.9q.01.1J.N.01.V.p.01.a.01.1J.T.01.51.01.54.01.c.01.o6.01.9q.01.1J.L.01.1J.L.W.01.X.01.1J.L.01.1J.T.01.51.01.oU.01.10.01.9s.01.W.01.oy.01.10.01.9s.01.W.01.oy.01.10.01.10.01.10.01.14.01.W.01.50.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.6";
_local1[7] = "60|60:5.01.10.01.14.01.1n.01.1m.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.9s.01.1n.01.IZ.01.10.01.9s.01.1n.01.1q.01.1n.01.I8.01.9v.01.1n.01.1q.01.1n.01.I8.01.9v.01.C.01.B.p.01.C.01.C.01.1q.01.1n.01.I8.01.z.g.01.g.01.g.01.g.01.i.01.C.01.C.01.C.01.C.01.B.M.01.M.01.P.01.1n.01.28.01.F.01.2z.01.9s.01.i.01.1n.01.B.3P.01.C.01.C.01.C.01.C.01.28.01.F.01.2z.01.9s.01.f.p.W.01.1n.01.B.L.p.X.01.g.01.f.1J.M.01.C.01.C.01.C.01.C.01.B.L.1K.M.01.M.01.M.01.3V.01.F.01.2z.01.9s.01.i.01.1n.01.B.S.01.f.1J.M.01.1n.01.B.L.1J.3f.01.F.01.2z.01.z.g.01.g.01.g.01.g.01.i.01.C.01.C.01.C.01.C.01.B.M.01.P.01.f.1J.M.01.1n.01.B.L.1J.3f.01.C.01.B.1J.01.2z.01.9v.01.W.01.W.01.V.q.W.01.51.01.f.1J.M.01.1n.01.B.L.1J.3Q.01.g.01.g.01.g.01.g.01.f.1J.M.01.C.01.C.01.B.L.1K.M.01.M.01.M.01.4M.01.9v.01.51.01.Z.01.g.01.g.01.f.1J.M.01.C.01.C.01.C.01.C.01.B.L.1K.M.01.M.01.M.01.3S.01.f.1J.M.01.F.01.B.L.1J.4W.01.10.01.9s.01.51.01.54.01.W.01.1C.01.B.10.01.5A.01.g.01.g.01.g.01.f.1J.M.01.C.01.C.01.B.L.1K.M.01.M.01.M.01.4M.01.10.01.9s.01.51.01.57.01.i.01.B.3Y.01.1q.01.i.01.B.4b.01.10.01.9s.01.51.01.57.01.i.01.B.3Y.01.1q.01.i.01.B.L.p.6B.01.10.01.A7.01.1q.01.f.p.g.01.B.3Y.01.C.01.C.01.B.p.f.C.01.C.01.1M.01.B.4b.01.10.01.A7.01.1q.01.i.01.B.3P.01.g.01.f.01.19.f.01.1A.01.C.01.C.01.C.01.C.01.C.01.C.01.B.M.01.M.01.M.01.M.01.4P.01.10.01.A7.01.1q.01.i.01.B.L.p.6h.01.i.01.B.10.01.W.01.W.01.W.01.W.01.6G.01.10.01.A7.01.B.01.BU.01.i.01.B.3V.01.i.01.B.3S.01.6G.01.10.01.A7.01.B.01.19.C.01.C.01.B.p.V.C.01.1M.01.B.q.01.C.01.C.01.B.p.V.C.01.C.01.1M.01.B.3S.01.6G.01.10.01.9s.01.g.01.g.01.g.01.g.01.i.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.B.3b.01.2t.01.10.01.A4.01.i.01.B.10.01.W.01.W.01.W.01.W.01.W.01.V.q.W.01.W.01.W.01.W.01.W.01.1C.01.B.3b.01.B.01.CX.01.10.01.A4.01.i.01.B.3n.01.i.01.B.q.01.C.01.C.01.C.01.B.p.V.C.01.C.01.C.01.B.01.CX.01.10.01.A4.01.f.p.W.01.B.3h.01.g.01.g.01.i.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.B.M.01.3V.01.I.01.2M.01.10.01.17.01.1q.01.i.01.B.3Y.01.F.01.1n.01.W.01.W.01.W.01.W.01.V.q.W.01.W.01.W.01.1C.01.B.P.01.1q.01.I.01.1q.01.1n.01.1v.01.9s.01.1q.01.i.01.B.3Y.01.F.01.1n.01.5D.01.i.01.B.L.p.X.01.1q.01.I.01.1q.01.1n.01.1v.01.9s.01.1n.01.C.01.1M.01.B.q.01.1t.01.B.01.1B.01.1n.01.57.01.C.01.C.01.1M.01.B.q.01.C.01.1q.01.I.01.1q.01.1n.01.1v.01.9s.01.I.01.i.01.C.01.C.01.C.01.C.01.B.3S.01.B.01.19.C.01.1n.01.Z.01.g.01.g.01.g.01.f.1J.M.01.C.01.C.01.C.01.C.01.C.01.C.01.B.L.1K.S.01.B.1J.L.B.1J.L.B.1J.L.B.1J.3Q.01.B.01.1H.01.1v.01.9s.01.C.01.C.01.B.p.f.1M.01.1n.01.B.q.01.C.01.B.p.V.C.01.E.01.C.01.C.01.B.M.01.M.01.3V.01.f.1J.M.01.1t.01.B.L.1J.L.01.1J.L.f.1J.L.f.1J.M.01.C.01.C.01.C.01.B.M.01.S.01.B.01.19.C.01.B.p.f.C.01.1v.01.z.g.01.g.01.g.01.i.01.C.01.C.01.C.01.C.01.1n.01.C.01.C.01.C.01.C.01.C.01.C.01.F.01.B.L.1J.Bd.01.f.1J.M.01.1t.01.B.S.01.f.1J.M.01.I.01.B.L.p.X.01.g.01.i.01.C.01.C.01.C.01.C.01.B.M.01.M.01.M.01.M.01.O.01.17.01.f.1J.M.01.1n.01.1n.01.B.10.01.W.01.V.q.W.01.Y.01.C.01.C.01.B.M.01.M.01.M.01.M.01.3P.01.f.1J.M.01.1t.01.B.S.01.f.1J.M.01.I.01.B.S.01.i.01.1n.01.B.3U.01.17.01.f.1J.M.01.1n.01.C.01.C.01.C.01.C.01.B.3S.01.V.1J.L.V.1J.L.V.1J.3c.01.f.1J.M.01.1t.01.B.L.1J.L.01.1J.L.f.1J.L.f.1J.M.01.C.01.C.01.C.01.B.M.01.P.01.f.1L.01.1n.01.B.L.01.1K.01.D5.01.17.01.f.1J.M.01.1t.01.B.10.01.57.01.Z.01.5G.01.f.1J.M.01.1t.01.B.L.1J.T.01.V.1J.L.V.1J.L.V.1J.L.V.1J.T.01.i.01.1n.01.B.3U.01.17.01.f.1J.M.01.1t.01.B.L.p.6q.01.Z.01.1q.01.g.01.g.01.f.1J.M.01.C.01.C.01.C.01.C.01.C.01.C.01.B.L.1K.M.01.P.01.W.01.Z.01.Z.01.g.01.g.01.i.01.C.01.C.01.C.01.C.01.B.M.01.M.01.M.01.M.01.O.01.17.01.f.1J.M.01.1t.01.B.8F.01.F.01.1q.01.1n.01.1n.01.W.01.W.01.1C.01.B.10.01.W.01.57.01.Z.01.54.01.V.01.19.W.01.V.p.f.W.01.59.01.z.g.01.g.01.f.01.19.f.01.1A.01.C.01.C.01.1n.01.C.01.B.L.1K.P.01.C.01.B.p.f.1q.01.1n.01.1t.01.f.p.g.01.B.P.01.57.01.Z.01.54.01.V.01.1H.01.59.01.9s.01.W.01.1C.01.1q.01.B.L.1J.N.01.i.01.C.01.C.01.B.M.01.Q.01.1J.L.B.1J.L.01.1J.Q.01.C.01.C.01.C.01.C.01.C.01.C.01.1M.01.B.L.p.X.01.57.01.Z.01.54.01.51.01.59.01.9v.01.f.p.g.01.1q.01.B.L.1J.N.01.i.01.F.01.B.P.01.g.01.f.1J.M.01.B.L.1J.N.01.i.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.B.M.01.3t.01.51.01.59.01.11.01.g.01.g.01.g.01.g.01.i.01.C.01.C.01.C.01.C.01.C.01.B.L.1J.N.01.i.01.C.01.C.01.B.M.01.Q.01.1J.L.V.1J.L.01.1J.L.g.01.i.01.C.01.B.V.1J.L.V.1J.L.V.1J.L.V.1J.L.V.1J.L.V.1J.3x.01.51.01.59.01.9y.01.W.01.W.01.W.01.W.01.W.01.51.01.V.01.19.V.1J.01.V.01.BU.01.51.01.V.01.19.57.01.67.01.10.01.9v.01.54.01.51.01.V.01.1B.01.V.01.BU.01.51.01.V.01.19.57.01.67.01.10.01.9v.01.54.01.51.01.Z.01.54.01.51.01.V.01.19.57.01.67.01.10.01.9v.01.54.01.51.01.Z.01.54.01.51.01.W.01.57.01.67.01.10.01.9v.01.54.01.51.01.Z.01.5G.01.W.01.6P.01.10.01.1bc.01.10.01.1bc.01.10.01.1bc.01.10.01.1bc.01.10.01.1bc.01.10.01.1bc.01.10.01.1bc.01.10.01.1bc.01.10.01.1bc.01.10.01.1bc.01.10.01.1bc.01.10.01.1bc.01.10.01.1bc.01.10.01.1bc.01.10.01.1bc.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.6";
_local1[8] = "60|60:5.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.A1.01.1p.01.10.01.10.01.10.01.An.01.30.01.1v.01.10.01.An.01.30.01.1v.01.10.01.An.01.2c.01.C.01.C.01.C.01.C.01.C.01.B.p.V.C.01.C.01.1v.01.10.01.An.01.21.01.Bg.01.C.01.C.01.B.p.f.E.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.B.M.01.M.01.M.01.M.01.O.01.10.01.An.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.B.01.19.C.01.C.01.B.p.f.C.01.C.01.C.01.B.p.f.E.01.C.01.C.01.C.01.C.01.G.01.i.01.1n.01.B.3U.01.10.01.AY.01.g.01.g.01.g.01.g.01.i.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.B.g.01.g.01.g.01.g.01.j.01.i.01.1n.01.B.L.p.54.01.10.01.Ak.01.i.01.25.01.B.3k.01.j.01.i.01.1n.01.B.3U.01.10.01.Ak.01.i.01.25.01.B.3O.01.Bd.01.g.01.g.01.i.01.C.01.C.01.C.01.C.01.B.M.01.M.01.M.01.M.01.O.01.10.01.Ak.01.i.01.25.01.B.3O.01.1B.01.B.1J.L.B.1J.L.B.1J.3W.01.W.01.19.1J.M.01.B.z.1J.L.59.01.10.01.Ak.01.i.01.25.01.B.L.p.a.01.B.01.19.E.01.C.01.C.02.B.p.f.C.01.C.01.C.01.I.01.i.01.B.3a.01.10.01.Aj.01.1J.f.01.1K.01.25.01.B.3O.01.C.01.C.01.F.01.C.01.C.01.C.01.C.01.C.01.G.01.f.1J.M.01.B.L.1J.3Y.01.10.01.Ak.01.i.01.25.01.B.M.01.M.01.3O.01.C.01.C.01.1r.01.g.01.g.01.i.01.B.3a.01.10.01.Ak.01.i.01.25.01.B.3w.01.f.1J.M.01.B.L.1J.3Y.01.10.01.Ak.01.i.01.25.01.B.3w.01.i.01.B.3a.01.10.01.Ak.01.i.01.25.01.B.3V.01.22.01.f.1J.M.01.B.L.1J.3Y.01.10.01.AY.01.g.01.g.01.g.01.g.01.i.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.B.M.01.M.01.M.01.S.01.22.01.i.01.B.3a.01.10.01.An.01.W.01.W.01.W.01.W.01.W.01.W.01.V.q.W.01.W.01.W.01.5A.01.22.01.f.1J.M.01.B.L.1J.3Y.01.10.01.An.01.5J.01.5A.01.22.01.i.01.B.3a.01.10.01.An.01.57.01.1n.01.5A.01.C.01.C.01.C.01.C.01.C.01.1m.01.19.f.1J.M.01.B.L.1J.M.01.BZ.01.10.01.AG.01.28.01.57.01.1n.01.Z.01.g.01.g.01.g.01.g.01.i.01.C.01.C.01.C.01.C.01.C.01.m.01.19.i.01.B.O.01.19.1v.01.AG.01.28.01.57.01.1n.01.57.01.i.01.G.01.1q.01.B.01.1A.1J.M.01.B.p.1J.L.B.01.19.B.1J.3V.01.AG.01.2Q.01.25.01.i.01.G.01.C.01.C.01.B.p.V.C.01.E.01.C.01.C.01.C.01.C.01.C.01.B.M.01.M.01.M.01.M.01.O.01.AG.01.1w.01.C.01.C.01.B.p.V.C.01.C.01.I.01.C.01.C.01.25.01.i.01.B.g.01.i.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.B.L.1J.3S.01.AG.01.B.p.f.C.01.C.01.C.01.1m.01.C.01.C.01.C.01.C.02.H.01.W.01.C.01.C.01.B.M.01.M.01.M.01.M.01.3P.01.f.p.g.01.C.01.D.01.i.01.25.01.B.3U.01.A1.01.g.01.g.01.g.01.g.01.i.01.C.01.C.01.C.01.C.01.1x.01.1s.01.B.3b.01.i.01.C.01.D.01.i.01.25.01.B.L.1J.3P.01.10.01.AD.01.i.01.G.01.22.01.1s.01.B.L.p.6n.01.i.01.C.01.D.01.i.01.25.01.B.3R.01.10.01.AD.01.i.01.a.01.C.01.C.01.C.01.C.01.C.01.B.p.V.C.01.C.01.C.01.1s.01.B.3b.01.i.01.C.01.D.01.i.01.25.01.B.L.1J.3P.01.10.01.AA.01.g.01.g.01.g.01.g.01.i.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.B.L.p.f.M.01.M.01.O.01.C.01.B.L.01.19.L.01.Ba.01.f.1J.M.01.D.01.i.01.25.01.B.3R.01.10.01.AM.01.i.01.22.01.B.S.01.M.01.O.01.B.3P.01.g.01.g.01.g.01.g.01.f.1J.M.01.D.01.i.01.25.01.B.L.1J.3P.01.10.01.AG.01.i.01.W.01.C.01.22.01.B.S.01.M.01.O.01.B.S.01.1z.01.i.01.25.01.B.3R.01.10.01.AG.01.f.1L.01.W.01.C.01.22.01.C.01.B.L.1J.N.01.M.01.O.01.B.S.01.1z.01.i.01.25.01.B.L.1J.3S.01.AD.01.f.01.19.f.01.1A.01.W.01.C.01.22.01.C.01.B.L.1J.3Z.01.I.01.g.01.f.1J.M.01.G.01.f.p.W.01.25.01.B.3U.01.AM.01.f.1J.M.01.22.01.C.01.B.L.1J.3Q.01.B.1J.L.B.1J.L.B.1J.L.B.1J.T.01.f.1J.M.01.B.g.01.g.01.i.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.B.L.1K.M.01.M.01.M.01.O.01.AM.01.f.1J.M.01.22.01.C.01.B.L.1J.Q.01.g.01.i.01.C.01.C.01.C.01.B.S.01.f.1J.M.01.J.01.W.01.W.01.W.01.W.01.W.01.V.q.W.01.W.01.W.01.W.01.59.01.AM.01.f.1J.M.01.22.01.C.01.B.L.1J.T.01.i.01.I.01.B.L.p.V.P.01.f.1J.M.01.J.01.5J.01.59.01.AM.01.f.1J.M.01.22.01.B.3S.01.i.01.I.01.B.S.01.f.1J.M.01.J.01.50.01.C.01.C.01.C.01.J.01.56.01.10.01.AA.01.g.01.g.01.g.01.g.01.f.1J.M.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.B.M.01.P.01.g.01.g.01.i.01.C.01.C.01.C.01.B.P.01.g.01.f.1J.M.01.C.01.C.01.C.01.C.01.G.01.W.01.W.01.V.1J.01.51.01.56.01.10.01.AP.01.W.01.W.01.W.01.W.01.V.q.W.01.W.01.W.01.W.01.V.01.Ba.01.W.01.W.01.V.q.54.01.W.01.W.01.V.q.W.01.5J.01.56.01.10.01.AP.01.5G.01.V.01.Ba.01.c.01.54.01.5m.01.10.01.AM.01.I.01.1w.01.5A.01.c.01.54.01.5m.01.10.01.AM.01.B.1J.L.B.1J.L.B.1J.L.B.1J.3W.01.5A.01.c.01.54.01.5m.01.10.01.A7.01.g.01.g.01.g.01.g.01.i.01.C.01.C.01.C.01.B.M.01.M.01.M.01.M.01.P.01.5A.01.c.01.54.01.5m.01.10.01.AJ.01.i.01.I.01.B.L.p.oJ.01.10.01.AJ.01.i.01.I.01.B.YD.01.10.01.9v.01.1z.01.i.01.C.01.C.01.C.01.B.YD.01.10.01.9v.01.1z.01.i.01.B.W.01.W.01.oO.01.10.01.9v.01.1z.01.i.01.G.01.oO.01.10.01.9v.01.1z.01.i.01.G.01.oO.01.10.01.9v.01.C.01.B.p.01.C.01.C.01.C.01.C.01.C.01.C.01.1M.01.G.01.oO.01.10.01.z.g.01.g.01.g.01.g.01.i.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.G.01.oO.01.10.01.9s.01.i.01.1n.01.B.Yb.01.10.01.9s.01.f.p.W.01.1n.01.B.Yb.01.10.01.9s.01.i.01.1n.01.B.Yb.01.10.01.z.g.01.g.01.g.01.g.01.i.01.C.01.C.01.C.01.C.01.B.L.p.f.M.01.M.01.M.01.YP.01.10.01.9v.01.V.1J.L.V.1J.L.V.1J.L.V.1J.L.V.1J.Yc.01.10.01.9v.01.51.01.om.01.10.01.9v.01.51.01.om.01.10.01.9v.01.51.01.om.01.10.01.10.01.10.01.10.01.14.01.51.01.50.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.6";
_local1[9] = "60|60:i.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.I0.01.G.01.2V.01.I0.01.G.01.2H.01.1p.01.2o.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.1n.01.G.01.2H.01.1p.01.2o.01.1r.01.1p.01.1n.01.G.01.B.01.Bv.01.1p.01.2o.01.1r.01.1p.01.1n.01.G.01.B.01.Bv.01.1p.01.2o.01.E.01.8E.01.1p.01.1n.01.B.g.01.i.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.02.C.01.C.01.B.1J.01.C.01.1p.01.2o.01.C.01.C.01.C.01.C.01.C.01.C.01.B.M.01.M.01.O.01.1n.01.I.01.22.01.C.01.C.01.C.01.C.01.C.01.B.M.01.M.01.O.01.36.01.B.3O.01.1n.01.I.01.2H.01.B.3O.01.36.01.B.3O.01.1n.01.I.01.2H.01.B.3O.01.2o.01.C.01.C.01.C.01.C.01.F.01.B.3O.01.1n.01.I.01.C.01.C.01.C.01.C.01.C.01.C.01.1z.01.B.3O.01.2o.01.B.L.1J.V.L.1J.Z.01.F.01.B.3O.01.1n.02.C.01.1v.01.1K.01.1z.01.B.M.01.M.01.O.01.2o.01.B.L.1J.V.L.1J.Z.01.F.01.B.M.01.M.01.O.01.1n.01.1z.01.1K.01.1z.01.1n.01.2o.01.B.L.1J.V.L.1J.Z.01.F.01.B.3O.01.1n.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.1z.01.1n.01.2o.01.B.L.1J.V.L.1J.Z.01.C.01.C.01.B.3O.01.2c.01.1n.01.2o.01.B.L.1J.V.L.1J.5D.01.2c.01.1n.01.2o.01.B.L.1J.5G.01.2c.01.B.W.01.W.01.Y.01.2o.01.B.q.01.C.01.E.01.C.01.C.01.B.3O.01.2c.01.1n.01.2o.01.C.01.C.01.C.01.C.01.F.01.B.3O.01.1t.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.1t.01.1n.01.36.01.B.M.01.M.01.O.01.C.01.1q.01.D.01.1y.01.1t.01.1n.01.36.01.1q.01.1q.01.D.01.1q.01.M.01.O.01.1t.01.1n.01.C.01.C.01.C.01.C.01.C.01.C.01.1q.01.C.01.C.01.C.01.C.01.C.01.C.01.2H.01.1q.01.1q.01.I.01.C.01.C.01.C.01.I.01.1t.01.J.01.V.01.19.W.01.W.01.W.p.W.01.Y.01.C.01.C.01.C.01.C.01.C.01.B.W.01.W.01.W.01.W.p.Y.01.2H.01.1q.01.1q.01.I.01.I.01.I.01.1t.01.J.01.V.01.BX.01.W.01.W.01.W.01.W.p.W.01.59.01.M.01.M.01.M.01.M.01.M.01.M.01.M.01.1w.01.C.01.B.g.01.g.01.i.01.1q.01.I.01.I.01.I.01.1t.01.2a.01.W.01.W.01.W.01.W.p.W.01.W.01.Y.01.1z.01.B.f.01.19.f.01.19.f.01.1A.01.1q.01.I.01.I.01.I.01.1t.01.2x.01.1z.01.G.01.i.01.1q.01.I.01.I.01.I.01.1t.01.2x.01.1z.01.G.01.i.01.C.01.C.01.C.01.C.01.C.01.I.01.C.01.C.01.C.01.I.01.C.01.C.01.C.01.C.01.C.01.C.01.2C.01.C.01.C.01.C.p.C.01.1p.01.1B.01.W.01.53.01.1z.01.J.01.1n.01.1q.01.C.01.1q.01.1t.01.B.01.1E.01.I.01.C.01.C.01.C.01.1m.01.C.01.C.01.C.01.C.01.1n.01.1B.01.W.01.53.01.1z.01.J.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.I.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.B.01.19.C.01.C.01.1m.01.C.01.C.01.C.01.28.01.C.01.C.01.C.01.1n.01.1z.01.1n.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.I.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.2l.01.1z.01.G.01.i.01.28.01.B.W.01.Y.01.25.01.2l.01.1z.01.B.g.01.g.01.i.01.28.01.I.01.25.01.C.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.1z.01.G.01.i.01.28.01.I.01.25.01.2l.01.1z.01.G.01.i.01.1q.01.C.01.C.01.C.01.C.01.C.01.C.01.I.01.25.01.2l.01.1z.01.1n.01.1q.01.1u.01.b.01.25.01.2l.01.1z.01.1n.01.1q.01.B.g.01.6g.01.b.01.25.01.2l.01.1z.02.C.01.C.01.E.01.1q.01.I.01.C.01.C.01.C.01.C.01.C.01.C.01.25.01.2l.01.1z.01.1n.01.1q.01.I.01.2N.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.1z.01.1n.01.1q.01.I.01.IR.01.1n.01.1q.01.I.01.IR.01.1n.01.C.01.C.01.C.01.C.01.C.01.I.01.IR.01.B.g.01.g.01.6m.01.b.01.IR.01.23.01.b.01.IR.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.3Ng.0";
_local1[10] = "60|60:2.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.1t.01.2E.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.16.01.1t.01.2E.01.1ab.01.16.01.1t.01.2E.01.1ab.01.16.01.1t.01.2E.01.AR.01.C.01.C.01.C.01.2W.01.16.01.1t.01.I.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.AP.01.V.1K.V.1K.V.1K.V.1J.c.01.C.01.C.01.C.01.2E.01.16.01.1t.01.I.01.Ap.01.1x.01.V.01.19.W.01.W.01.5U.01.16.01.1t.01.I.01.Ap.01.B.3Y.01.V.01.C3.01.16.01.1t.01.I.01.9r.01.W.01.C.01.C.01.C.01.C.01.1w.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.B.3k.01.i.01.28.01.16.01.1t.01.I.01.9s.01.Y.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.G.01.W.01.W.01.W.01.Y.01.C.01.C.01.C.01.C.01.B.L.01.19.L.01.19.L.01.19.L.01.19.3Y.01.i.01.28.01.16.01.1t.01.I.01.9v.01.W.01.V.01.19.W.01.W.01.W.01.W.01.W.01.5A.01.W.01.W.01.W.p.W.01.5P.01.g.q.01.28.01.16.01.1t.01.I.01.9y.01.V.01.C4.01.5P.01.i.01.28.01.16.01.1t.01.I.01.11.01.g.01.g.01.g.01.g.01.i.01.C.01.C.01.C.01.2F.01.5P.01.i.01.28.01.16.01.1t.01.I.01.A9.01.9x.01.10.01.9y.01.61.01.16.01.1t.01.I.01.A9.01.A0.01.9y.01.61.01.16.01.1t.01.I.01.14.01.g.01.g.01.g.01.g.01.i.01.C.01.C.01.C.01.1t.01.AV.01.f.1J.W.01.2B.01.16.01.1t.01.I.01.A1.01.W.01.W.01.W.01.59.01.AV.01.f.1J.W.01.2B.01.16.01.1t.01.I.01.AU.01.AM.01.I.01.f.1J.W.01.2K.01.1t.01.I.01.AD.01.i.01.1n.01.AM.01.I.01.f.1J.W.01.2K.01.1t.01.I.01.AD.01.i.01.1n.01.AM.01.1n.01.C.01.1p.01.DN.01.1t.01.I.01.AD.01.i.01.1n.01.AM.01.1n.01.C.01.F.01.C.01.C.01.B.01.1J.C.01.21.01.1t.01.I.01.AA.01.f.01.19.f.01.1A.01.1n.01.AM.01.C.01.C.01.C.01.C.01.C.01.C.01.E.01.C.01.C.01.C.01.C.02.C.01.C.01.C.01.C.01.C.01.C.01.E.01.1t.01.I.01.AU.01.A0.01.C.01.C.01.C.01.B.g.01.g.01.g.01.i.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.1t.01.I.01.AU.01.A0.01.I.01.J.01.i.01.2o.01.I.01.AG.01.i.01.I.01.A0.01.I.01.J.01.i.01.2o.01.I.01.AG.01.i.01.I.01.A0.01.I.01.J.01.i.01.2o.01.I.01.AG.01.i.01.I.01.A0.01.I.01.J.01.i.01.2o.01.I.01.AL.01.S.01.A0.01.I.01.J.01.i.01.2o.01.I.01.AU.01.A0.01.I.01.J.01.i.01.2o.01.I.01.AU.01.A0.01.I.01.J.01.i.01.2o.01.I.01.A7.01.g.01.g.01.f.01.19.f.01.1A.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.I.01.J.01.i.01.2o.01.I.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.9v.01.i.01.2E.01.J.01.i.01.2o.01.2L.01.i.01.2E.01.J.01.i.01.2o.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.J.01.i.01.28.01.C.01.C.01.J.01.i.01.Hu.01.J.01.i.01.28.01.1r.01.i.01.Hu.01.B.g.01.g.01.g.01.i.01.28.01.1r.01.i.01.Hu.01.1q.01.28.01.1r.01.i.01.Hu.01.1q.01.28.01.J.01.g.01.g.1J.i.01.Hu.01.1q.01.28.01.1r.01.i.01.Hu.01.B.W.01.W.01.W.01.Y.01.28.01.1r.01.i.01.2o.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.G.01.b.01.C.01.C.01.C.01.C.01.1w.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.2o.01.1o.01.1q.01.B.01.BU.01.51.01.H.01.C.01.C.01.C.01.Hr.01.1o.01.1q.01.B.01.BU.01.51.01.H.01.w.01.Hr.01.1o.01.1q.01.B.01.19.I.01.W.01.51.01.H.01.w.01.Hr.01.1o.01.C.01.C.01.B.p.z.C.01.E.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.w.01.Hr.01.B.g.01.g.01.g.01.i.01.C.01.C.01.C.01.C.01.C.01.25.01.C.01.w.01.Hr.01.J.01.i.01.2K.01.C.01.w.01.Hr.01.J.01.i.01.2K.01.C.01.w.01.Hr.01.J.01.i.01.2K.01.C.01.10.01.10.01.10.01.2W.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.I.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.B.g.01.g.01.g.01.i.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.1n.01.C.01.C.01.C.01.C.01.w.01.C.01.C.01.C.01.C.01.25.01.C.01.C.01.C.01.C.01.C.01.B.W.01.W.01.W.01.W.p.W.01.Y.01.C.01.C.01.C.01.B.W.01.V.01.19.W.01.W.01.1C.01.C.01.1o.01.W.01.W.01.W.01.W.01.W.01.W.01.W.01.Y.01.C.01.C.01.C.01.C.01.B.W.01.W.01.V.01.1H.01.V.01.19.W.01.W.01.Y.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.B.W.01.W.01.W.p.W.01.5A.01.W.01.W.01.W.p.W.01.W.01.V.01.1E.01.f.01.1A.01.C.01.1o.01.5F.01.M.01.M.01.M.01.M.01.L.Z.01.V.01.1H.01.V.01.1H.01.W.01.W.01.W.01.W.01.W.01.W.01.W.01.W.01.W.01.W.01.5n.01.f.01.1A.01.C.01.B.g.01.g.01.g.01.i.01.C.01.C.01.C.01.M.01.M.01.Q.01.W.01.W.01.V.p.z.W.01.oM.01.f.01.1A.01.C.01.J.01.i.01.B.Al.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.1y.01.1J.V.01.1J.V.01.1J.V.01.1J.V.01.1J.5K.01.f.01.1A.01.C.01.J.01.i.01.B.4E.01.Y.01.1w.01.E.01.8M.01.M.01.M.01.M.01.M.01.3O.02.8M.01.f.01.1A.01.C.01.J.01.i.01.B.q.01.C.01.C.01.C.01.1n.01.C.01.B.p.z.C.01.25.01.Y.01.1w.01.C.01.C.01.C.01.C.01.C.01.1p.02.8L.01.g.01.g.01.g.01.n.01.f.01.1A.01.C.01.J.01.i.01.C.01.C.01.C.01.C.01.C.02.B.1J.V.B.1J.V.B.1J.W.01.g.01.g.01.g.01.f.B.1J.V.B.1J.V.B.1J.V.B.1J.V.B.1J.V.B.1J.d.01.Y.01.2B.01.C.01.g.01.g.01.g.01.g.01.g.01.g.01.g.01.6t.01.f.01.1A.01.C.01.J.01.i.01.1q.01.C.01.C.01.C.01.C.01.I.01.C.01.C.01.C.01.C.01.C.01.C.01.J.01.Y.01.2Z.01.B.01.1J.V.01.1J.V.01.1J.V.01.1J.V.01.1J.52.01.f.01.1A.01.C.01.J.01.f.1L.01.2T.01.C.01.C.01.C.01.C.01.C.01.2Z.01.C.01.C.01.C.01.C.01.C.01.1o.01.1M.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.2o.01.C.01.C.01.C.01.C.01.C.01.C.01.1";
_local1[11] = "60|60:5.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.17.01.1t.01.1n.01.1s.01.2K.01.2H.01.C.01.AM.01.1t.01.1n.01.1s.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.2H.01.C.01.AM.01.1t.01.1n.01.1s.01.1X.01.1X.01.CU.01.C.01.AM.01.C.01.C.01.C.01.C.01.C.01.C.01.1n.01.B.1J.V.C.01.B.1J.V.C.01.B.1J.V.B.01.1T.B.1J.V.B.01.1T.B.1J.V.B.01.19.B.1J.5z.01.C.01.A7.01.g.01.g.01.g.01.g.01.i.01.C.01.C.01.C.01.C.01.C.01.C.01.B.M.01.M.01.L.01.W.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.02.C.01.C.01.B.p.z.C.01.1w.01.B.01.1E.01.C.01.C.01.C.01.1p.01.1N.01.C.01.AJ.01.i.01.1t.01.B.3s.01.C.01.C.01.C.01.C.01.C.02.C.01.C.01.C.01.B.p.z.C.01.C.01.B.01.1G.01.C.01.C.01.C.01.1n.01.1N.01.C.01.AJ.01.i.01.1t.01.B.47.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.22.01.C.01.C.01.C.01.C.01.AJ.01.i.01.1t.01.B.4M.01.13.01.22.01.1n.01.AJ.01.i.01.1t.01.B.4M.01.13.01.C.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.1n.01.AJ.01.i.01.1t.01.B.3b.01.I.01.2D.01.13.01.22.01.1n.01.A7.01.g.01.g.01.g.01.g.01.i.01.C.01.C.01.C.01.C.01.C.01.C.01.B.M.01.M.01.M.01.M.01.3P.01.I.01.2D.01.13.01.22.01.1n.01.AM.01.W.01.W.01.W.01.W.01.W.01.W.01.5G.01.I.01.2D.01.13.01.22.01.1n.01.AM.01.57.01.5G.01.I.01.2D.01.13.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.1n.01.AP.01.C.01.C.01.C.01.C.01.25.01.C.01.C.01.C.01.2D.01.AO.01.AA.01.f.01.19.f.01.19.f.01.19.f.01.19.f.01.1A.01.C.01.C.01.C.01.C.01.B.L.01.19.L.01.19.L.01.19.L.01.19.L.01.19.g.01.g.01.g.01.i.01.C.01.C.01.C.01.B.M.01.M.01.M.01.M.01.3a.01.AO.01.AM.01.i.01.1n.01.B.3b.01.i.01.I.01.B.3m.01.AO.01.A7.01.1q.01.i.01.1n.01.B.3b.01.i.01.I.01.B.3m.01.AO.01.A7.01.1q.01.i.01.1n.01.B.3Y.01.g.01.i.01.C.01.C.01.C.01.B.M.01.M.01.3g.01.AO.01.A7.01.1n.01.g.01.i.01.C.01.C.01.C.01.C.01.B.M.01.3S.01.I.01.W.01.W.01.W.01.51.01.21.01.AO.01.A7.01.I.01.I.01.W.01.W.01.W.01.W.01.c.01.C.01.C.01.C.01.C.01.I.01.c.01.51.01.21.01.AO.01.A7.01.C.01.C.01.C.01.I.01.54.01.g.01.i.01.C.01.C.01.C.01.C.01.B.M.01.3S.01.C.01.C.01.C.01.21.01.AO.01.9s.01.g.01.g.01.g.01.g.01.i.01.C.01.C.01.C.01.B.M.01.3Y.01.i.01.1n.01.B.P.01.g.01.g.01.g.01.i.01.C.01.C.01.C.01.B.M.01.M.01.M.01.M.01.3O.01.AO.01.A4.01.i.01.I.01.B.3b.01.i.01.1n.01.B.3S.01.i.01.I.01.B.3a.01.AO.01.A4.01.i.01.I.01.B.3b.01.i.01.1n.01.B.3S.01.i.01.I.01.B.3a.01.AO.01.9s.01.g.01.g.01.g.01.g.01.i.01.C.01.C.01.C.01.B.M.01.M.01.M.01.P.01.g.01.g.01.g.01.i.01.C.01.C.01.C.01.C.01.B.M.01.M.01.P.01.g.01.i.01.C.01.C.01.C.01.B.M.01.M.01.M.01.M.01.3O.01.AO.01.A7.01.W.01.W.01.W.01.5J.01.W.01.W.01.W.01.W.01.5A.01.W.01.W.01.W.01.5F.01.AO.01.A7.01.c.01.5J.01.5M.01.c.01.5F.01.AO.01.A7.01.c.01.5P.01.C.01.C.01.1w.01.c.01.5F.01.AO.01.A7.01.c.01.5A.01.g.01.g.01.g.01.g.01.i.01.C.01.C.01.B.M.01.M.01.M.01.M.01.P.01.c.01.5F.01.AO.01.A7.01.c.01.5M.01.i.01.F.01.B.3V.01.c.01.5F.01.AO.01.Ab.01.g.01.g.01.g.01.g.01.i.01.C.01.C.01.B.M.01.M.01.M.01.M.01.3s.01.AO.01.Aq.01.W.01.W.01.5j.01.AO.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.9v.01.Z.01.5C.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.BG.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.B.L.01.1T.L.01.1U.01.1U.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.IL.01.B.L.01.19.L.01.19.L.01.1A.01.Ip.01.B.L.01.1U.01.1U.01.1U.01.Ip.01.B.3O.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.IL.01.B.S.01.6g.01.V.1K.V.1K.V.1K.V.1J.V.19.1J.W.01.IL.01.B.P.01.6j.01.V.1J.V.01.1J.V.01.1J.V.01.1J.V.f.1J.W.01.IL.01.B.S.01.6g.01.d.01.1J.V.f.1J.W.01.IL.01.B.3O.01.C.01.C.01.C.01.C.01.C.01.C.01.E.01.1J.V.f.1J.W.01.IL.01.B.3O.01.1t.01.E.01.1J.V.f.1J.W.01.IL.01.B.3O.01.1t.01.E.01.1J.V.f.1J.W.01.IL.01.B.3O.01.C.01.C.01.C.01.C.01.C.01.C.01.E.01.1J.V.f.1J.W.01.2u.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.1w.01.B.3Y.01.3Q.01.1J.V.f.1J.W.01.2u.01.J.01.1n.01.1p.01.1w.01.B.L.p.9y.01.Q.01.1J.V.01.1J.V.01.1J.V.f.1J.W.01.2u.01.E.01.1J.V.01.1J.V.B.1J.d.01.B.1J.V.01.1J.V.01.1J.Z.01.1w.01.B.3Y.01.P.01.B.1J.V.B.1J.V.B.1J.W.1J.W.01.2u.01.E.01.1J.V.01.1J.V.B.1J.V.C.01.B.1J.01.C.01.B.1J.V.01.1J.V.01.1J.Z.01.1w.01.B.3O.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.2u.01.B.g.01.f.1J.V.f.1J.W.01.C.01.C.01.C.01.C.01.B.L.1J.V.L.1J.V.O.01.1t.01.C.01.B.M.01.M.01.O.01.Hu.01.E.01.1J.V.f.1J.W.01.1n.01.B.L.1J.V.01.1J.Z.01.1t.01.1q.01.Hu.01.B.g.01.f.1J.V.f.1J.W.01.1n.01.B.01.1J.V.01.1J.Z.01.1t.01.1q.01.Hu.01.1n.01.1n.02.C.01.C.01.E.01.1t.01.1q.01.Hu.01.1n.01.1n.01.1n.01.1t.01.B.f.01.19.f.01.19.f.01.1A.01.C.01.Hu.01.1n.01.1n.01.1n.01.1t.01.G.01.i.01.33.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.B.Z.01.Y.01.C.01.C.01.C.01.C.01.1n.01.C.01.C.01.C.01.C.01.C.01.C.01.G.01.i.01.33.01.23.01.5k.01.i.01.33.01.2y.01.i.01.33.01.21.01.p.AG.01.B.1J.V.C.01.B.1J.V.C.01.B.1J.V.C.01.B.1J.V.1M.01.33.01.E.01.8J.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.1z.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.33.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.Hv.0";
_local1[12] = "60|60:2.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.2i.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.2W.01.22.01.2i.01.22.01.2W.01.22.01.2i.01.22.01.2W.01.22.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.F.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.1n.01.22.01.2W.01.29.01.1p.01.F.01.B.10.01.W.01.W.01.W.01.W.01.W.01.W.01.W.01.1C.01.1n.01.E.01.8L.01.1L.01.2W.01.1z.01.1R.01.1p.01.F.01.B.3S.01.c.01.f.1J.W.01.1n.01.C.01.C.01.C.01.C.01.I.01.C.01.C.01.2W.01.1z.01.1R.01.1p.01.F.01.B.3S.01.c.01.i.01.1z.01.I.01.2c.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.B.M.01.M.01.O.01.C.01.C.01.B.M.01.M.01.O.01.C.01.C.01.B.g.01.g.01.f.1J.W.01.1z.01.I.01.3C.01.B.3g.01.F.01.G.01.i.01.1z.01.I.01.3C.01.B.3g.01.F.01.G.01.f.1J.W.01.1z.01.I.01.3C.01.B.3g.01.F.01.G.01.i.01.F.01.C.01.C.01.C.01.C.01.C.01.C.01.I.01.3C.01.B.3O.01.C.01.C.01.C.01.C.01.C.01.C.01.F.01.G.01.f.1J.W.01.F.01.D.01.1p.01.I.01.3C.01.B.3O.01.1z.01.G.01.i.01.F.01.D.01.F.01.M.01.O.01.I.01.3C.01.B.3O.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.B.g.01.g.01.f.1J.W.01.F.01.I.01.I.01.I.01.3C.01.B.S.01.j.01.22.01.i.01.F.01.I.01.B.W.01.Y.01.I.01.3C.01.B.P.01.g.01.j.01.22.01.f.1J.W.01.F.01.I.01.I.01.I.01.3C.01.B.S.01.j.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.1M.01.F.01.I.01.I.02.C.01.E.01.3C.01.B.3O.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.F.01.I.01.I.01.I.01.3C.01.B.3O.01.2H.01.I.01.D.01.Z.01.M.01.O.01.3C.01.B.3O.01.2H.01.I.01.D.01.53.01.3C.01.B.3O.01.2H.01.I.01.C.01.C.01.C.01.C.01.C.01.C.01.3C.01.B.3O.01.2H.01.I.01.2E.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.2H.01.B.M.01.M.01.O.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.1q.01.I.01.2E.01.J.01.F.01.I.01.W.01.W.01.1C.01.2H.01.B.3b.01.1p.01.1q.01.I.01.2E.01.J.01.F.01.1q.01.i.01.2H.01.B.3b.01.1p.01.1q.01.I.01.2E.01.J.01.C.01.C.01.B.p.9s.01.i.01.2H.01.B.q.01.B.1J.V.C.01.B.1J.V.C.01.B.1J.V.C.01.B.1J.V.1p.01.1q.01.I.01.C.01.C.01.C.01.25.01.B.g.01.g.01.f.1J.W.01.C.01.C.01.C.01.C.01.B.g.01.g.01.i.01.2H.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.B.M.01.M.01.O.01.1q.01.B.g.01.j.01.H.01.25.01.G.01.i.01.1n.01.G.01.i.01.2i.01.B.3O.01.1q.01.J.01.H.01.25.01.G.01.f.1J.W.01.1n.01.G.01.i.01.2i.01.B.3O.01.1q.01.C.01.C.01.C.01.I.01.25.01.G.01.i.01.1n.01.G.01.i.01.2i.01.B.3O.01.1z.01.I.01.25.01.G.01.f.1J.W.01.1n.01.G.01.i.01.2i.01.B.3O.01.1z.01.I.01.25.01.G.01.i.01.1n.01.G.01.i.01.2i.01.B.3O.01.1n.01.C.01.C.01.C.01.C.02.B.01.19.B.01.1A.01.C.01.C.01.C.01.C.01.1t.01.G.01.f.1J.W.01.1n.01.G.01.i.01.2i.01.B.L.p.16.01.1n.01.B.3e.01.i.01.1t.01.G.01.i.01.1n.01.G.01.i.01.2i.01.B.M.01.M.01.O.01.C.01.C.01.C.01.C.01.B.3e.01.i.01.C.01.C.01.C.01.C.01.C.01.C.01.B.g.01.g.01.f.1J.W.01.1n.01.G.01.i.01.2i.01.1o.01.I.01.28.01.1t.01.1p.01.1n.01.B.g.01.g.01.i.01.2i.01.1o.01.I.01.28.01.1t.01.1p.01.1n.01.1n.01.2i.01.1o.01.D.01.p.11.01.28.01.C.01.C.01.C.01.B.p.z.C.01.C.01.1p.01.1n.01.1n.01.28.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.B.M.01.M.01.O.01.C.01.C.01.C.01.C.01.B.L.1J.V.3Y.01.g.01.f.1J.W.01.C.01.C.01.C.01.C.01.C.01.C.01.B.g.01.g.01.f.1J.W.01.1n.01.1n.01.28.01.B.10.01.W.01.W.01.W.01.W.01.W.01.W.01.W.01.W.01.W.01.W.01.53.01.1n.01.B.L.1J.c.01.C.01.C.01.C.01.G.01.f.1J.W.01.1t.01.G.01.i.01.1n.01.B.M.01.M.01.O.01.28.01.B.S.01.5D.01.53.01.1n.01.B.L.1J.52.01.1n.01.f.1J.W.01.1t.01.G.01.f.1J.W.01.1n.01.B.3O.01.28.01.B.S.01.5D.01.53.01.1n.01.B.L.1J.52.01.1n.01.f.1J.W.01.1t.01.G.01.i.01.1n.01.B.3O.01.28.01.B.M.01.M.01.O.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.1n.01.B.p.1J.V.B.1J.d.01.B.1J.V.B.1J.V.B.1J.V.B.1J.W.1J.W.01.1t.01.G.01.f.1J.W.01.1n.01.B.3O.01.28.01.B.3O.01.2N.01.C.01.C.01.B.M.01.M.01.O.01.C.01.C.01.C.01.C.01.C.01.1t.01.G.01.i.01.1n.01.B.3O.01.28.01.B.3O.01.2T.01.B.3O.01.28.01.G.01.f.1J.W.01.1n.01.B.3O.01.28.01.B.3O.01.2T.01.B.3O.01.28.01.G.01.i.01.1n.01.B.3O.01.C.01.25.01.B.3O.01.2T.01.B.3O.01.28.01.G.01.f.1J.W.01.1n.01.B.3R.01.25.01.B.3O.01.2T.01.B.3O.01.28.01.B.g.01.g.01.i.01.1n.01.B.3R.01.25.01.B.3O.01.2T.01.B.L.p.16.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.H.01.1J.W.01.1n.01.B.M.01.L.1J.1T.R.01.25.01.B.3O.01.2T.01.B.3t.01.3R.01.1n.01.B.3R.01.25.01.B.3O.01.2T.01.B.3t.01.M.01.M.01.M.01.O.01.1n.01.B.3R.01.25.01.B.M.01.M.01.O.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.B.M.01.M.01.3n.01.3R.01.1n.01.B.3O.01.C.01.25.01.B.S.01.1z.01.I.01.W.01.V.1K.W.01.V.1K.W.01.V.1K.W.01.V.1J.51.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.1n.01.1n.01.B.3O.01.28.01.B.S.01.1z.01.I.01.5A.01.53.01.28.01.1n.01.C.01.C.01.C.01.C.01.B.M.01.M.01.O.01.28.01.B.q.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.I.01.5A.01.53.01.28.01.1x.01.3R.01.28.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.28.01.1x.01.3R.01.IR.01.1x.01.3R.01.IR.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.Ot.0";
_local1[101] = "15|15:l.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.2H.01.C.01.2H.01.C.01.1p.01.p.1C.01.p.1C.01.p.BW.01.C.01.B.01.x.01.M.01.M.01.M.01.M.01.M.01.M.01.3P.01.C.01.C.01.g.01.6v.01.g.01.g.01.C.01.C.01.C.01.E.01.p.1F.01.p.1F.01.p.1D.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.KU.0";
_local1[102] = "60|60:2.01.10.01.17.01.F.01.27.01.10.01.10.01.10.01.10.01.10.01.10.01.1aY.01.9s.01.F.01.1q.01.F.01.24.01.1al.01.F.01.1q.01.F.01.24.01.1al.01.F.01.1q.01.F.01.24.01.1al.01.B.p.01.B.p.1J.1q.01.F.01.24.01.1aW.01.g.01.g.01.g.01.g.01.i.01.C.01.C.01.B.M.01.S.01.C.01.B.p.1J.24.01.1ai.01.f.p.1K.01.F.01.B.L.p.1L.01.g.01.i.01.C.01.C.01.B.M.01.M.01.M.01.M.01.3R.01.1aW.01.g.01.g.01.g.01.g.01.i.01.C.01.C.01.B.M.01.P.01.f.p.1K.01.F.01.B.L.p.DH.01.1al.01.W.01.V.p.1J.c.01.g.01.i.01.C.01.C.01.B.M.01.M.01.M.01.M.01.3R.01.1al.01.Z.01.54.01.W.01.V.p.1J.5I.01.1ai.01.F.01.1t.01.Z.01.5I.01.1ai.01.C.01.B.p.1J.1q.01.F.01.27.01.1aW.01.g.01.g.01.g.01.i.01.C.01.C.01.B.M.01.S.01.C.01.B.p.1J.27.01.1af.01.f.p.1K.01.F.01.B.L.p.1L.01.g.01.i.01.C.01.C.01.B.M.01.M.01.M.01.M.01.3U.01.1aW.01.g.01.g.01.g.01.i.01.C.01.C.01.B.M.01.P.01.f.p.1K.01.F.01.B.L.p.DK.01.1ai.01.W.01.V.p.1J.c.01.g.01.i.01.C.01.C.01.B.M.01.M.01.M.01.M.01.3U.01.1ai.01.Z.01.54.01.W.01.V.p.1J.5L.01.1ai.01.Z.01.54.01.Z.01.5L.01.1ai.01.Z.01.54.01.Z.01.5L.01.1ai.01.Z.01.54.01.Z.01.5I.01.10.01.1aY.01.AA.01.Z.01.5I.01.1ab.01.Aj.01.1ab.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.10.01.HMx.0";
_local1[103] = "300|20:Vj.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.U6.01.28.01.RR.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.1n.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.28.01.C.01.C.01.C.01.Jq.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.Lv.01.2Q.01.C.01.C.01.C.01.C.01.Hx.01.g.01.6s.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.F.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.Hl.01.F.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.36.01.Iy.01.C.01.I0.01.C.01.C.01.Id.01.6m.01.6m.01.74.01.C.01.C.01.KK.01.36.01.36.01.C.01.C.01.C.01.C.01.C.01.28.01.1t.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.KT.01.1w.01.1w.01.2E.01.C.01.C.01.KK.01.1z.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.E.01.w.01.p.F5.01.C.01.C.01.C.01.C.01.1t.01.C.01.C.01.C.01.C.01.C.01.1n.01.1t.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.25.01.1t.01.C.01.C.01.IO.01.1t.01.1t.01.2Q.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.Hu.01.g.01.g.01.15M.01.1z.01.2f.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.1n.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.2K.01.C.01.C.01.C.01.C.01.C.01.C.01.F.01.C.01.C.01.C.01.C.01.2l.01.C.01.C.01.2B.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.28.01.C.01.C.01.C.01.C.01.2l.01.C.01.C.01.C.01.2u.01.1w.01.C.01.C.01.1q.01.Ij.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.2f.01.Jn.01.C.01.C.01.C.01.2Q.01.C.01.C.01.C.01.C.01.F.01.1w.01.C.01.C.01.C.01.C.01.C.01.2W.01.1w.01.C.01.C.01.C.01.C.01.36.01.1t.01.C.01.C.01.2H.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.K2.01.Jw.01.C.01.C.01.1n.01.C.01.C.01.1n.01.C.01.C.01.C.01.C.01.C.01.1t.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.2f.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.Ho.01.C.01.C.01.C.01.C.01.C.01.C.01.F.01.C.01.C.01.C.01.C.01.1w.01.C.01.C.01.C.01.2f.01.1t.01.C.01.C.01.C.01.Jb.01.K2.01.C.01.C.01.C.01.C.01.F.01.C.01.C.01.C.01.C.01.Kl.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.2o.01.C.01.C.01.C.01.C.01.C.01.C.01.I.01.C.01.C.01.I3.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.2f.01.RF.01.2W.01.6m.01.6v.01.C.01.C.01.C.01.C.01.1z.01.2f.01.RF.01.1t.01.1t.01.1w.01.1w.01.1t.01.C.01.C.01.C.01.C.01.2B.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.RF.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.C.01.3ZC.0";
return(_local1[_local2]);
}
static function loadOverlay(id) {
var _local2 = id;
var _local1 = new Array();
_local1[0] = new Array();
_local1[0][0] = "testlvl_overlay";
_local1[0][1] = 7.5025;
_local1[1] = new Array();
_local1[1][0] = "lvl01_overlay";
_local1[1][1] = 7.5025;
_local1[2] = new Array();
_local1[2][0] = "lvl02_overlay";
_local1[2][1] = 7.5;
_local1[3] = new Array();
_local1[3][0] = "lvl03_overlay";
_local1[3][1] = 7.5025;
_local1[4] = new Array();
_local1[4][0] = "lvl04_overlay";
_local1[4][1] = 7.5025;
_local1[5] = new Array();
_local1[5][0] = "lvl05_overlay";
_local1[5][1] = 7.5;
_local1[6] = new Array();
_local1[6][0] = "lvl06_overlay";
_local1[6][1] = 7.375;
_local1[7] = new Array();
_local1[7][0] = "lvl07_overlay";
_local1[7][1] = 7.375;
_local1[8] = new Array();
_local1[8][0] = "lvl08_overlay";
_local1[8][1] = 7.375;
_local1[9] = new Array();
_local1[9][0] = "lvl09_overlay";
_local1[9][1] = 7.5;
_local1[10] = new Array();
_local1[10][0] = "lvl10_overlay";
_local1[10][1] = 7.5;
_local1[11] = new Array();
_local1[11][0] = "lvl11_overlay";
_local1[11][1] = 7.5;
_local1[12] = new Array();
_local1[12][0] = "lvl12_overlay";
_local1[12][1] = 7.5;
_local1[101] = new Array();
_local1[101][0] = "lvl101_overlay";
_local1[101][1] = 1.875;
_local1[102] = new Array();
_local1[102][0] = "lvl102_overlay";
_local1[102][1] = 7.5;
_local1[103] = new Array();
_local1[103][0] = "lvl103_overlay";
_local1[103][1] = 27.2727272727273;
return(_local1[_local2]);
}
static function loadBg(id) {
var _local2 = id;
var _local1 = new Array();
_local1[0] = "testlvl_bg";
_local1[1] = "lvl01_bg";
_local1[2] = "lvl01_bg";
_local1[3] = "lvl01_bg";
_local1[4] = "lvl01_bg";
_local1[5] = "lvl02_bg";
_local1[6] = "lvl02_bg";
_local1[7] = "lvl02_bg";
_local1[8] = "lvl02_bg";
_local1[9] = "lvl03_bg";
_local1[10] = "lvl03_bg";
_local1[11] = "lvl03_bg2";
_local1[12] = "lvl03_bg";
_local1[101] = "lvl01_bg";
_local1[102] = "lvl02_bg";
_local1[103] = "lvl03_bg";
return(_local1[_local2]);
}
}
Symbol 1223 MovieClip [__Packages.Enemy8] Frame 0
class Enemy8 extends MovieClip
{
function Enemy8 () {
super();
}
function onLoad() {
var _local1 = this;
_root.bonusScore = 2500;
var _local3 = _local1._name.split("_");
_local1.id = Number(_local3[1]);
var _local2 = _local1._parent.spawnPoints[8][_local1.id].split(":");
_local1._x = _local2[0] * _local1._parent.cellsize;
_local1._y = _local2[1] * _local1._parent.cellsize;
_local1._parent.cells[_local2[0]][_local2[1]].spawn = undefined;
if (_local1._parent.cells[_local2[0]][_local2[1]].gravType > 0) {
_local1.gravType = _local1._parent.cells[_local2[0]][_local2[1]].gravType;
_local1._rotation = 90 * (_local1.gravType - 1);
} else {
_local1.gravType = 1;
}
_local1.xCell = Math.floor((_local1._x / _local1._parent.cellsize) + 0.5);
_local1.yCell = Math.floor((_local1._y / _local1._parent.cellsize) + 0.5);
if (_local1._parent.triggers[_local1.id] == undefined) {
_local1._parent.triggers[_local1.id] = new Object();
}
_local1._parent.triggers[_local1.id].clip = _local1;
_local1.createEmptyMovieClip("sprite", 1);
_local1.sprite._y = _local1._parent.cellsize / 2;
if (!_local1._parent.triggers[_local1.id].pushed) {
_local1.enemyStatus = "boss2_off";
} else {
_local1.enemyStatus = "boss2_on";
}
_local1.sprite.attachMovie(_local1.enemyStatus, "sprite", 1);
}
function onEnterFrame() {
var _local1 = this;
if (_local1.sprite.hitTest(_local1._parent.player) && (_global.ctrlStatus[_global.ctrlAction])) {
if (_local1._parent._parent.triggerMemory != (_local1.id + 1)) {
_local1.switchTrigger();
_local1._parent._parent.triggerMemory = _local1.id + 1;
}
} else if (_local1._parent._parent.triggerMemory == (_local1.id + 1)) {
_local1._parent._parent.triggerMemory = 0;
}
if (_local1._parent.cells[_local1.xCell][_local1.yCell].clip == undefined) {
if (_local1._parent.cells[_local1.xCell][_local1.yCell].tile == 2) {
_local1.yCell++;
} else if (_local1._parent.cells[_local1.xCell][_local1.yCell].tile == 3) {
_local1.xCell--;
} else if (_local1._parent.cells[_local1.xCell][_local1.yCell].tile == 4) {
_local1.yCell--;
} else if (_local1._parent.cells[_local1.xCell][_local1.yCell].tile == 5) {
_local1.xCell++;
}
_local1._parent.spawnPoints[8][_local1.id] = (_local1.xCell + ":") + _local1.yCell;
_local1._parent.cells[_local1.xCell][_local1.yCell].spawn = 8;
_local1._parent.cells[_local1.xCell][_local1.yCell].spawnId = _local1.id;
(_local1.removeMovieClip());// not popped
}
}
function switchTrigger() {
var _local1 = this;
_local1.soundFX = new Sound(_local1);
_local1.soundFX.attachSound("switchTrigger");
_local1.soundFX.start(0, 0);
_local1.soundFX.setVolume(20);
if (_root.bonusScore >= 25) {
_root.bonusScore = _root.bonusScore - 25;
}
if (((((_local1.id == 0) || (_local1.id == 2)) || (_local1.id == 3)) || (_local1.id == 6)) && (!_local1._parent.triggerPile[0])) {
var _local2 = true;
} else if (((((_local1.id == 1) || (_local1.id == 4)) || (_local1.id == 5)) || (_local1.id == 7)) && (!_local1._parent.triggerPile[1])) {
var _local2 = true;
} else if (((((_local1.id == 9) || (_local1.id == 12)) || (_local1.id == 13)) || (_local1.id == 15)) && (!_local1._parent.triggerPile[2])) {
var _local2 = true;
} else if (((((_local1.id == 8) || (_local1.id == 10)) || (_local1.id == 11)) || (_local1.id == 14)) && (!_local1._parent.triggerPile[3])) {
var _local2 = true;
} else {
var _local2 = false;
}
if (_local2) {
if (_local1.enemyStatus != "boss2_on") {
_local1.enemyStatus = "boss2_on";
_local1._parent.triggers[_local1.id].pushed = true;
} else {
_local1.enemyStatus = "boss2_off";
_local1._parent.triggers[_local1.id].pushed = false;
}
if (_local1.id == 0) {
_local1._parent.triggers[3].clip.remoteSwitch();
}
if (_local1.id == 2) {
_local1._parent.triggers[0].clip.remoteSwitch();
}
if (_local1.id == 1) {
_local1._parent.triggers[4].clip.remoteSwitch();
}
if (_local1.id == 4) {
_local1._parent.triggers[5].clip.remoteSwitch();
}
if (_local1.id == 5) {
_local1._parent.triggers[7].clip.remoteSwitch();
}
if (_local1.id == 9) {
_local1._parent.triggers[12].clip.remoteSwitch();
}
if (_local1.id == 12) {
_local1._parent.triggers[9].clip.remoteSwitch();
}
if (_local1.id == 13) {
_local1._parent.triggers[15].clip.remoteSwitch();
}
if (_local1.id == 15) {
_local1._parent.triggers[9].clip.remoteSwitch();
}
if (_local1.id == 8) {
_local1._parent.triggers[10].clip.remoteSwitch();
}
if (_local1.id == 10) {
_local1._parent.triggers[8].clip.remoteSwitch();
_local1._parent.triggers[11].clip.remoteSwitch();
}
if (_local1.id == 11) {
_local1._parent.triggers[14].clip.remoteSwitch();
}
if (_local1.id == 14) {
_local1._parent.triggers[8].clip.remoteSwitch();
}
_local1.sprite.attachMovie(_local1.enemyStatus, "sprite", 1);
}
}
function remoteSwitch() {
var _local1 = this;
if (_local1.enemyStatus != "boss2_on") {
_local1.enemyStatus = "boss2_on";
_local1._parent.triggers[_local1.id].pushed = true;
} else {
_local1.enemyStatus = "boss2_off";
_local1._parent.triggers[_local1.id].pushed = false;
}
_local1.sprite.attachMovie(_local1.enemyStatus, "sprite", 1);
}
var gravType = 1;
var outside = false;
}
Symbol 1224 MovieClip [__Packages.Enemy7] Frame 0
class Enemy7 extends MovieClip
{
function Enemy7 () {
super();
}
function onLoad() {
var _local1 = this;
_root.bonusScore = 1000;
var _local3 = _local1._name.split("_");
_local1.id = Number(_local3[1]);
var _local2 = _local1._parent.spawnPoints[7][_local1.id].split(":");
_local1._x = _local2[0] * _local1._parent.cellsize;
_local1._y = _local2[1] * _local1._parent.cellsize;
_local1._parent.cells[_local2[0]][_local2[1]].spawn = undefined;
if (_local1._parent.cells[_local2[0]][_local2[1]].gravType > 0) {
_local1.gravType = _local1._parent.cells[_local2[0]][_local2[1]].gravType;
_local1._rotation = 90 * (_local1.gravType - 1);
} else {
_local1.gravType = 1;
}
_local1.xCell = Math.floor((_local1._x / _local1._parent.cellsize) + 0.5);
_local1.yCell = Math.floor((_local1._y / _local1._parent.cellsize) + 0.5);
_local1.createEmptyMovieClip("sprite", 1);
_local1.sprite._y = _local1._parent.cellsize / 2;
_local1.enemyStatus = "boss1_idle_1";
_local1.sprite.attachMovie(_local1.enemyStatus, "sprite", 1);
}
function onEnterFrame() {
var _local1 = this;
if (((_local1._parent.triggerStatus == (_local1.id + 1)) && (_local1.enemyStatus != "boss1_comeout_1")) && (_local1.enemyStatus != "boss1_keyfight_1")) {
_local1.enemyStatus = "boss1_comeout_1";
_local1.sprite.attachMovie(_local1.enemyStatus, "sprite", 1);
_local1.outside = true;
}
if ((_local1.sprite.sprite.hitarea.hitTest(_local1._parent.player) && (_local1.enemyStatus != "boss1_keyfight_1")) && (_local1.outside)) {
_local1.enemyStatus = "boss1_keyfight_1";
_local1.sprite.attachMovie(_local1.enemyStatus, "sprite", 1);
if (_local1._parent.player.xStep > 0) {
_local1.sprite._xscale = 100;
} else if (_local1._parent.player.xStep < 0) {
_local1.sprite._xscale = -100;
}
}
if (_local1._parent.cells[_local1.xCell][_local1.yCell].clip == undefined) {
if (_local1._parent.cells[_local1.xCell][_local1.yCell].tile == 2) {
_local1.yCell++;
} else if (_local1._parent.cells[_local1.xCell][_local1.yCell].tile == 3) {
_local1.xCell--;
} else if (_local1._parent.cells[_local1.xCell][_local1.yCell].tile == 4) {
_local1.yCell--;
} else if (_local1._parent.cells[_local1.xCell][_local1.yCell].tile == 5) {
_local1.xCell++;
}
_local1._parent.spawnPoints[7][_local1.id] = (_local1.xCell + ":") + _local1.yCell;
_local1._parent.cells[_local1.xCell][_local1.yCell].spawn = 7;
_local1._parent.cells[_local1.xCell][_local1.yCell].spawnId = _local1.id;
(_local1.removeMovieClip());// not popped
}
}
var gravType = 1;
var outside = false;
}
Symbol 1225 MovieClip [__Packages.Enemy6] Frame 0
class Enemy6 extends MovieClip
{
function Enemy6 () {
super();
}
function onLoad() {
var _local1 = this;
var _local3 = _local1._name.split("_");
_local1.id = Number(_local3[1]);
var _local2 = _local1._parent.spawnPoints[6][_local1.id].split(":");
_local1._x = _local2[0] * _local1._parent.cellsize;
_local1._y = _local2[1] * _local1._parent.cellsize;
_local1._parent.cells[_local2[0]][_local2[1]].spawn = undefined;
_local1.onGround = false;
if (_local1._parent.cells[_local2[0]][_local2[1]].gravType > 0) {
_local1.gravType = _local1._parent.cells[_local2[0]][_local2[1]].gravType;
_local1._rotation = 90 * (_local1.gravType - 1);
} else {
_local1.gravType = 1;
}
_local1.createEmptyMovieClip("sprite", 1);
_local1.sprite._y = (_local1._parent.cellsize / 2) - 4;
_local1.enemyStatus = "enemy6_walk_1";
_local1.sprite.attachMovie(_local1.enemyStatus, "sprite", 1);
_local1.walking = true;
}
function onEnterFrame() {
var _local1 = this;
if (_local1.yStep != 0) {
_local1.onGround = false;
}
_local1.xCell = Math.floor((_local1._x / _local1._parent.cellsize) + 0.5);
_local1.yCell = Math.floor((_local1._y / _local1._parent.cellsize) + 0.5);
if (_local1._parent.cells[_local1.xCell][_local1.yCell].clip == undefined) {
if (_local1._parent.cells[_local1.xCell][_local1.yCell].tile == 2) {
_local1.yCell++;
} else if (_local1._parent.cells[_local1.xCell][_local1.yCell].tile == 3) {
_local1.xCell--;
} else if (_local1._parent.cells[_local1.xCell][_local1.yCell].tile == 4) {
_local1.yCell--;
} else if (_local1._parent.cells[_local1.xCell][_local1.yCell].tile == 5) {
_local1.xCell++;
}
_local1._parent.spawnPoints[6][_local1.id] = (_local1.xCell + ":") + _local1.yCell;
_local1._parent.cells[_local1.xCell][_local1.yCell].spawn = 6;
_local1._parent.cells[_local1.xCell][_local1.yCell].spawnId = _local1.id;
(_local1.removeMovieClip());// not popped
}
if ((_local1.hitTest(_local1._parent.player) && (_local1.enemyStatus != "enemy6_attack_1")) && (_local1._parent.player.blinking <= 0)) {
_local1.enemyStatus = "enemy6_attack_1";
_local1.sprite.attachMovie(_local1.enemyStatus, "sprite", 1);
_local1.walking = false;
if (_local1._parent.player.xStep > 0) {
_local1.sprite._xscale = 100;
_local1.xStep = 0;
} else if (_local1._parent.player.xStep < 0) {
_local1.sprite._xscale = -100;
_local1.xStep = 0;
}
}
if (_local1.walking) {
if (_local1.gravType == 1) {
if (_local1._parent.cells[_local1.xCell][_local1.yCell].tile != 4) {
if ((((_local1.xStep >= 0) && (_local1._parent.cells[_local1.xCell + 1][_local1.yCell + 1].edges[0] == 1)) && (_local1._parent.cells[_local1.xCell + 1][_local1.yCell].edges[3] == 0)) && (_local1._parent.cells[_local1.xCell + 1][_local1.yCell + 1].edges[3] == 0)) {
_local1.xStep = _local1.walkSpeed;
_local1.sprite._xscale = -100;
} else if ((((_local1.xStep <= 0) && (_local1._parent.cells[_local1.xCell - 1][_local1.yCell + 1].edges[0] == 1)) && (_local1._parent.cells[_local1.xCell - 1][_local1.yCell].edges[1] == 0)) && (_local1._parent.cells[_local1.xCell - 1][_local1.yCell + 1].edges[1] == 0)) {
_local1.xStep = -_local1.walkSpeed;
_local1.sprite._xscale = 100;
} else if (_local1.onGround) {
_local1.xStep = -_local1.xStep;
_local1.sprite._xscale = -_local1.sprite._xscale;
} else {
_local1.xStep = 0;
}
} else if ((((_local1.xStep >= 0) && (_local1._parent.cells[_local1.xCell + 1][_local1.yCell].edges[0] == 1)) && (_local1._parent.cells[_local1.xCell + 1][_local1.yCell - 1].edges[3] == 0)) && (_local1._parent.cells[_local1.xCell + 1][_local1.yCell].edges[3] == 0)) {
_local1.xStep = _local1.walkSpeed;
_local1.sprite._xscale = -100;
} else if ((((_local1.xStep <= 0) && (_local1._parent.cells[_local1.xCell - 1][_local1.yCell].edges[0] == 1)) && (_local1._parent.cells[_local1.xCell - 1][_local1.yCell - 1].edges[1] == 0)) && (_local1._parent.cells[_local1.xCell - 1][_local1.yCell].edges[1] == 0)) {
_local1.xStep = -_local1.walkSpeed;
_local1.sprite._xscale = 100;
} else if (_local1.onGround) {
_local1.xStep = -_local1.xStep;
_local1.sprite._xscale = -_local1.sprite._xscale;
} else {
_local1.xStep = 0;
}
if ((_local1._parent.cells[_local1.xCell + 1][_local1.yCell].clip == undefined) || (_local1._parent.cells[_local1.xCell - 1][_local1.yCell].clip == undefined)) {
_local1.xStep = 0;
}
} else if (_local1.gravType == 2) {
if (_local1._parent.cells[_local1.xCell][_local1.yCell].tile != 5) {
if ((((_local1.xStep >= 0) && (_local1._parent.cells[_local1.xCell - 1][_local1.yCell + 1].edges[1] == 1)) && (_local1._parent.cells[_local1.xCell][_local1.yCell + 1].edges[0] == 0)) && (_local1._parent.cells[_local1.xCell - 1][_local1.yCell + 1].edges[0] == 0)) {
_local1.xStep = _local1.walkSpeed;
_local1.sprite._xscale = -100;
} else if ((((_local1.xStep <= 0) && (_local1._parent.cells[_local1.xCell - 1][_local1.yCell - 1].edges[1] == 1)) && (_local1._parent.cells[_local1.xCell][_local1.yCell - 1].edges[2] == 0)) && (_local1._parent.cells[_local1.xCell - 1][_local1.yCell - 1].edges[2] == 0)) {
_local1.xStep = -_local1.walkSpeed;
_local1.sprite._xscale = 100;
} else if (_local1.onGround) {
_local1.xStep = -_local1.xStep;
_local1.sprite._xscale = -_local1.sprite._xscale;
} else {
_local1.xStep = 0;
}
} else if ((((_local1.xStep >= 0) && (_local1._parent.cells[_local1.xCell][_local1.yCell + 1].edges[1] == 1)) && (_local1._parent.cells[_local1.xCell - 1][_local1.yCell + 1].edges[0] == 0)) && (_local1._parent.cells[_local1.xCell][_local1.yCell + 1].edges[0] == 0)) {
_local1.xStep = _local1.walkSpeed;
_local1.sprite._xscale = -100;
} else if ((((_local1.xStep <= 0) && (_local1._parent.cells[_local1.xCell][_local1.yCell - 1].edges[1] == 1)) && (_local1._parent.cells[_local1.xCell - 1][_local1.yCell - 1].edges[2] == 0)) && (_local1._parent.cells[_local1.xCell][_local1.yCell - 1].edges[2] == 0)) {
_local1.xStep = -_local1.walkSpeed;
_local1.sprite._xscale = 100;
} else if (_local1.onGround) {
_local1.xStep = -_local1.xStep;
_local1.sprite._xscale = -_local1.sprite._xscale;
} else {
_local1.xStep = 0;
}
if ((_local1._parent.cells[_local1.xCell][_local1.yCell + 1].clip == undefined) || (_local1._parent.cells[_local1.xCell][_local1.yCell - 1].clip == undefined)) {
_local1.xStep = 0;
}
} else if (_local1.gravType == 3) {
if (_local1._parent.cells[_local1.xCell][_local1.yCell].tile != 2) {
if ((((_local1.xStep >= 0) && (_local1._parent.cells[_local1.xCell - 1][_local1.yCell - 1].edges[2] == 1)) && (_local1._parent.cells[_local1.xCell - 1][_local1.yCell].edges[1] == 0)) && (_local1._parent.cells[_local1.xCell - 1][_local1.yCell - 1].edges[1] == 0)) {
_local1.xStep = _local1.walkSpeed;
_local1.sprite._xscale = -100;
} else if ((((_local1.xStep <= 0) && (_local1._parent.cells[_local1.xCell + 1][_local1.yCell - 1].edges[2] == 1)) && (_local1._parent.cells[_local1.xCell + 1][_local1.yCell].edges[3] == 0)) && (_local1._parent.cells[_local1.xCell + 1][_local1.yCell - 1].edges[3] == 0)) {
_local1.xStep = -_local1.walkSpeed;
_local1.sprite._xscale = 100;
} else if (_local1.onGround) {
_local1.xStep = -_local1.xStep;
_local1.sprite._xscale = -_local1.sprite._xscale;
} else {
_local1.xStep = 0;
}
} else if ((((_local1.xStep >= 0) && (_local1._parent.cells[_local1.xCell - 1][_local1.yCell].edges[2] == 1)) && (_local1._parent.cells[_local1.xCell - 1][_local1.yCell + 1].edges[1] == 0)) && (_local1._parent.cells[_local1.xCell - 1][_local1.yCell].edges[1] == 0)) {
_local1.xStep = _local1.walkSpeed;
_local1.sprite._xscale = -100;
} else if ((((_local1.xStep <= 0) && (_local1._parent.cells[_local1.xCell + 1][_local1.yCell].edges[2] == 1)) && (_local1._parent.cells[_local1.xCell + 1][_local1.yCell + 1].edges[3] == 0)) && (_local1._parent.cells[_local1.xCell + 1][_local1.yCell].edges[3] == 0)) {
_local1.xStep = -_local1.walkSpeed;
_local1.sprite._xscale = 100;
} else if (_local1.onGround) {
_local1.xStep = -_local1.xStep;
_local1.sprite._xscale = -_local1.sprite._xscale;
} else {
_local1.xStep = 0;
}
if ((_local1._parent.cells[_local1.xCell + 1][_local1.yCell].clip == undefined) || (_local1._parent.cells[_local1.xCell - 1][_local1.yCell].clip == undefined)) {
_local1.xStep = 0;
}
} else if (_local1.gravType == 4) {
if (_local1._parent.cells[_local1.xCell][_local1.yCell].tile != 3) {
if ((((_local1.xStep >= 0) && (_local1._parent.cells[_local1.xCell + 1][_local1.yCell - 1].edges[3] == 1)) && (_local1._parent.cells[_local1.xCell][_local1.yCell - 1].edges[2] == 0)) && (_local1._parent.cells[_local1.xCell + 1][_local1.yCell - 1].edges[2] == 0)) {
_local1.xStep = _local1.walkSpeed;
_local1.sprite._xscale = -100;
} else if ((((_local1.xStep <= 0) && (_local1._parent.cells[_local1.xCell + 1][_local1.yCell + 1].edges[3] == 1)) && (_local1._parent.cells[_local1.xCell][_local1.yCell + 1].edges[0] == 0)) && (_local1._parent.cells[_local1.xCell + 1][_local1.yCell + 1].edges[0] == 0)) {
_local1.xStep = -_local1.walkSpeed;
_local1.sprite._xscale = 100;
} else if (_local1.onGround) {
_local1.xStep = -_local1.xStep;
_local1.sprite._xscale = -_local1.sprite._xscale;
} else {
_local1.xStep = 0;
}
} else if ((((_local1.xStep >= 0) && (_local1._parent.cells[_local1.xCell][_local1.yCell - 1].edges[3] == 1)) && (_local1._parent.cells[_local1.xCell][_local1.yCell - 1].edges[2] == 0)) && (_local1._parent.cells[_local1.xCell + 1][_local1.yCell - 1].edges[2] == 0)) {
_local1.xStep = _local1.walkSpeed;
_local1.sprite._xscale = -100;
} else if ((((_local1.xStep <= 0) && (_local1._parent.cells[_local1.xCell][_local1.yCell + 1].edges[3] == 1)) && (_local1._parent.cells[_local1.xCell][_local1.yCell + 1].edges[0] == 0)) && (_local1._parent.cells[_local1.xCell + 1][_local1.yCell + 1].edges[0] == 0)) {
_local1.xStep = -_local1.walkSpeed;
_local1.sprite._xscale = 100;
} else if (_local1.onGround) {
_local1.xStep = -_local1.xStep;
_local1.sprite._xscale = -_local1.sprite._xscale;
} else {
_local1.xStep = 0;
}
if ((_local1._parent.cells[_local1.xCell][_local1.yCell + 1].clip == undefined) || (_local1._parent.cells[_local1.xCell][_local1.yCell - 1].clip == undefined)) {
_local1.xStep = 0;
}
}
}
if (_local1._parent.gravity < _local1._parent.maxspeed) {
_local1.yStep = _local1.yStep + _local1._parent.gravity;
}
if (_local1.gravType == 1) {
_local1.futureY = _local1._y + _local1.yStep;
_local1.futureX = _local1._x + _local1.xStep;
_local1.targetRot = 0;
} else if (_local1.gravType == 2) {
_local1.futureY = _local1._y + _local1.xStep;
_local1.futureX = _local1._x - _local1.yStep;
_local1.targetRot = 90;
} else if (_local1.gravType == 3) {
_local1.futureY = _local1._y - _local1.yStep;
_local1.futureX = _local1._x - _local1.xStep;
if (_local1._rotation <= -90) {
_local1.targetRot = -180;
} else {
_local1.targetRot = 180;
}
} else if (_local1.gravType == 4) {
_local1.futureY = _local1._y - _local1.xStep;
_local1.futureX = _local1._x + _local1.yStep;
if (_local1._rotation >= 180) {
_local1.targetRot = 270;
} else {
_local1.targetRot = -90;
}
}
if (((_local1.targetRot - _local1._rotation) * (_local1.targetRot - _local1._rotation)) > 5) {
_local1._rotation = _local1._rotation + ((_local1.targetRot - _local1._rotation) / 2);
} else {
_local1._rotation = _local1.targetRot;
if (_local1._rotation == -180) {
_local1._rotation = 180;
}
if (_local1._rotation == 270) {
_local1._rotation = -90;
}
}
_local1.xCell = Math.floor((_local1.futureX / _local1._parent.cellsize) + 0.5);
_local1.yCell = Math.floor((_local1.futureY / _local1._parent.cellsize) + 0.5);
if ((_local1._parent.cells[_local1.xCell][_local1.yCell].gravType != 0) && (_local1._parent.cells[_local1.xCell][_local1.yCell].gravType != undefined)) {
if (_local1._parent.cells[_local1.xCell][_local1.yCell].gravType <= 4) {
_local1.gravType = _local1._parent.cells[_local1.xCell][_local1.yCell].gravType;
_local1.shiftGrav = 0;
} else if (_local1.shiftGrav != (_local1._parent.cells[_local1.xCell][_local1.yCell].gravType - 4)) {
_local1.shiftGrav = _local1._parent.cells[_local1.xCell][_local1.yCell].gravType - 4;
if (_local1.shiftGrav == _local1.gravType) {
if (_local1.gravType < 4) {
_local1.gravType++;
} else {
_local1.gravType = 1;
}
} else if (_local1.gravType > 1) {
_local1.gravType--;
} else {
_local1.gravType = 4;
}
}
}
_local1.rawHitTest();
_local1._y = _local1.futureY;
_local1._x = _local1.futureX;
}
function rawHitTest() {
var _local1 = this;
var _local3 = -1;
while (_local3 <= 1) {
var _local2 = -1;
while (_local2 <= 1) {
if ((_local1.xCell != 0) && (_local1.yCell != 0)) {
_local1.detailHitTest(_local1.xCell + _local3, _local1.yCell + _local2);
} else if (((_local1.xCell == 0) && (_local1.yCell != 0)) && (_local3 >= 0)) {
_local1.detailHitTest(_local1.xCell + _local3, _local1.yCell + _local2);
} else if (((_local1.xCell != 0) && (_local1.yCell == 0)) && (_local2 >= 0)) {
_local1.detailHitTest(_local1.xCell + _local3, _local1.yCell + _local2);
} else if ((_local3 >= 0) && (_local2 >= 0)) {
_local1.detailHitTest(_local1.xCell + _local3, _local1.yCell + _local2);
}
_local2++;
}
_local3++;
}
}
function detailHitTest(tmpX, tmpY) {
var _local1 = this;
var _local2 = tmpX;
var _local3 = tmpY;
var tile = _local1._parent.cells[_local2][_local3].tile;
if ((tile >= 1) && (tile <= 5)) {
var left = (_local1.futureX - (_local1._width / 2));
var right = (_local1.futureX + (_local1._width / 2));
var top = (_local1.futureY - (_local1._height / 2));
var bottom = (_local1.futureY + (_local1._height / 2));
if (tile == 1) {
var cLeft = (_local1._parent.cells[_local2][_local3].clip._x - (_local1._parent.cellsize / 2));
var cRight = (_local1._parent.cells[_local2][_local3].clip._x + (_local1._parent.cellsize / 2));
var cTop = (_local1._parent.cells[_local2][_local3].clip._y - (_local1._parent.cellsize / 2));
var cBottom = (_local1._parent.cells[_local2][_local3].clip._y + (_local1._parent.cellsize / 2));
} else if (tile == 2) {
var cLeft = (_local1._parent.cells[_local2][_local3].clip._x - (_local1._parent.cellsize / 2));
var cRight = (_local1._parent.cells[_local2][_local3].clip._x + (_local1._parent.cellsize / 2));
var cTop = (_local1._parent.cells[_local2][_local3].clip._y - (_local1._parent.cellsize / 2));
var cBottom = _local1._parent.cells[_local2][_local3].clip._y;
} else if (tile == 3) {
var cLeft = _local1._parent.cells[_local2][_local3].clip._x;
var cRight = (_local1._parent.cells[_local2][_local3].clip._x + (_local1._parent.cellsize / 2));
var cTop = (_local1._parent.cells[_local2][_local3].clip._y - (_local1._parent.cellsize / 2));
var cBottom = (_local1._parent.cells[_local2][_local3].clip._y + (_local1._parent.cellsize / 2));
} else if (tile == 4) {
var cLeft = (_local1._parent.cells[_local2][_local3].clip._x - (_local1._parent.cellsize / 2));
var cRight = (_local1._parent.cells[_local2][_local3].clip._x + (_local1._parent.cellsize / 2));
var cTop = _local1._parent.cells[_local2][_local3].clip._y;
var cBottom = (_local1._parent.cells[_local2][_local3].clip._y + (_local1._parent.cellsize / 2));
} else if (tile == 5) {
var cLeft = (_local1._parent.cells[_local2][_local3].clip._x - (_local1._parent.cellsize / 2));
var cRight = _local1._parent.cells[_local2][_local3].clip._x;
var cTop = (_local1._parent.cells[_local2][_local3].clip._y - (_local1._parent.cellsize / 2));
var cBottom = (_local1._parent.cells[_local2][_local3].clip._y + (_local1._parent.cellsize / 2));
}
if ((((bottom > cTop) && (top < cBottom)) && (left < cRight)) && (right > cLeft)) {
var projUp = ((cTop - (_local1._height / 2)) - _local1.futureY);
var projDown = ((cBottom + (_local1._height / 2)) - _local1.futureY);
var projLeft = ((cLeft - (_local1._width / 2)) - _local1.futureX);
var projRight = ((cRight + (_local1._width / 2)) - _local1.futureX);
if (Math.sqrt(projUp * projUp) < Math.sqrt(projDown * projDown)) {
var projY = projUp;
} else {
var projY = projDown;
}
if (Math.sqrt(projLeft * projLeft) < Math.sqrt(projRight * projRight)) {
var projX = projLeft;
} else {
var projX = projRight;
}
if (Math.sqrt(projX * projX) < Math.sqrt(projY * projY)) {
if ((_local1.gravType == 1) || (_local1.gravType == 3)) {
} else if ((_local1.gravType == 2) || (_local1.gravType == 4)) {
_local1.yStep = 0;
}
_local1.futureX = _local1.futureX + projX;
if ((projX == projRight) && (_local1.gravType == 2)) {
if (!_local1.onGround) {
_local1.onGround = true;
}
} else if ((projX == projLeft) && (_local1.gravType == 4)) {
if (!_local1.onGround) {
_local1.onGround = true;
}
}
} else {
if ((_local1.gravType == 1) || (_local1.gravType == 3)) {
_local1.yStep = 0;
} else if ((_local1.gravType == 2) || (_local1.gravType == 4)) {
}
_local1.futureY = _local1.futureY + projY;
if ((projY == projUp) && (_local1.gravType == 1)) {
if (!_local1.onGround) {
_local1.onGround = true;
}
} else if ((projY == projDown) && (_local1.gravType == 3)) {
if (!_local1.onGround) {
_local1.onGround = true;
}
}
}
}
}
}
var walkSpeed = 2;
var xStep = 0;
var yStep = 0;
var onGround = false;
var targetRot = 0;
var walking = false;
}
Symbol 1226 MovieClip [__Packages.Enemy5] Frame 0
class Enemy5 extends MovieClip
{
function Enemy5 () {
super();
}
function onLoad() {
var _local1 = this;
var _local3 = _local1._name.split("_");
_local1.id = Number(_local3[1]);
var _local2 = _local1._parent.spawnPoints[5][_local1.id].split(":");
_local1._x = _local2[0] * _local1._parent.cellsize;
_local1._y = _local2[1] * _local1._parent.cellsize;
_local1._parent.cells[_local2[0]][_local2[1]].spawn = undefined;
_local1.onGround = false;
if (_local1._parent.cells[_local2[0]][_local2[1]].gravType > 0) {
_local1.gravType = _local1._parent.cells[_local2[0]][_local2[1]].gravType;
_local1._rotation = 90 * (_local1.gravType - 1);
} else {
_local1.gravType = 1;
}
_local1.createEmptyMovieClip("sprite", 1);
_local1.sprite._y = _local1._parent.cellsize / 2;
_local1.enemyStatus = "enemy5_running_1";
_local1.sprite.attachMovie(_local1.enemyStatus, "sprite", 1);
_local1.sprite._xscale = -100;
}
function onEnterFrame() {
var _local1 = this;
if (_local1.yStep != 0) {
_local1.onGround = false;
}
_local1.xCell = Math.floor((_local1._x / _local1._parent.cellsize) + 0.5);
_local1.yCell = Math.floor((_local1._y / _local1._parent.cellsize) + 0.5);
if (_local1._parent.cells[_local1.xCell][_local1.yCell].clip == undefined) {
if (_local1._parent.cells[_local1.xCell][_local1.yCell].tile == 2) {
_local1.yCell++;
} else if (_local1._parent.cells[_local1.xCell][_local1.yCell].tile == 3) {
_local1.xCell--;
} else if (_local1._parent.cells[_local1.xCell][_local1.yCell].tile == 4) {
_local1.yCell--;
} else if (_local1._parent.cells[_local1.xCell][_local1.yCell].tile == 5) {
_local1.xCell++;
}
_local1._parent.spawnPoints[5][_local1.id] = (_local1.xCell + ":") + _local1.yCell;
_local1._parent.cells[_local1.xCell][_local1.yCell].spawn = 5;
_local1._parent.cells[_local1.xCell][_local1.yCell].spawnId = _local1.id;
(_local1.removeMovieClip());// not popped
}
if (_local1.hitTest(_local1._parent.player) && (_local1._parent.player.blinking <= 0)) {
_local1._parent.player.health = _local1._parent.player.health - 20;
if (_local1._parent.player.health < 0) {
_local1._parent.player.health = 0;
}
_local1._parent.player.hit = true;
if (_local1._xscale > 0) {
_local1._parent.player.yStep = -10;
_local1._parent.player.xStep = -1;
_local1._parent.player.onGround = false;
} else {
_local1._parent.player.yStep = -10;
_local1._parent.player.xStep = 1;
_local1._parent.player.onGround = false;
}
}
if (_local1.walking) {
if (_local1.gravType == 1) {
if (_local1._parent.cells[_local1.xCell][_local1.yCell].tile != 4) {
if ((((_local1.xStep >= 0) && (_local1._parent.cells[_local1.xCell + 1][_local1.yCell + 1].edges[0] == 1)) && (_local1._parent.cells[_local1.xCell + 1][_local1.yCell].edges[3] == 0)) && (_local1._parent.cells[_local1.xCell + 1][_local1.yCell + 1].edges[3] == 0)) {
_local1.xStep = _local1.walkSpeed;
_local1.sprite._xscale = -100;
} else if ((((_local1.xStep <= 0) && (_local1._parent.cells[_local1.xCell - 1][_local1.yCell + 1].edges[0] == 1)) && (_local1._parent.cells[_local1.xCell - 1][_local1.yCell].edges[1] == 0)) && (_local1._parent.cells[_local1.xCell - 1][_local1.yCell + 1].edges[1] == 0)) {
_local1.xStep = -_local1.walkSpeed;
_local1.sprite._xscale = 100;
} else if (_local1.onGround) {
_local1.xStep = -_local1.xStep;
_local1.sprite._xscale = -_local1.sprite._xscale;
} else {
_local1.xStep = 0;
}
} else if ((((_local1.xStep >= 0) && (_local1._parent.cells[_local1.xCell + 1][_local1.yCell].edges[0] == 1)) && (_local1._parent.cells[_local1.xCell + 1][_local1.yCell - 1].edges[3] == 0)) && (_local1._parent.cells[_local1.xCell + 1][_local1.yCell].edges[3] == 0)) {
_local1.xStep = _local1.walkSpeed;
_local1.sprite._xscale = -100;
} else if ((((_local1.xStep <= 0) && (_local1._parent.cells[_local1.xCell - 1][_local1.yCell].edges[0] == 1)) && (_local1._parent.cells[_local1.xCell - 1][_local1.yCell - 1].edges[1] == 0)) && (_local1._parent.cells[_local1.xCell - 1][_local1.yCell].edges[1] == 0)) {
_local1.xStep = -_local1.walkSpeed;
_local1.sprite._xscale = 100;
} else if (_local1.onGround) {
_local1.xStep = -_local1.xStep;
_local1.sprite._xscale = -_local1.sprite._xscale;
} else {
_local1.xStep = 0;
}
if ((_local1._parent.cells[_local1.xCell + 1][_local1.yCell].clip == undefined) || (_local1._parent.cells[_local1.xCell - 1][_local1.yCell].clip == undefined)) {
_local1.xStep = 0;
}
} else if (_local1.gravType == 2) {
if (_local1._parent.cells[_local1.xCell][_local1.yCell].tile != 5) {
if ((((_local1.xStep >= 0) && (_local1._parent.cells[_local1.xCell - 1][_local1.yCell + 1].edges[1] == 1)) && (_local1._parent.cells[_local1.xCell][_local1.yCell + 1].edges[0] == 0)) && (_local1._parent.cells[_local1.xCell - 1][_local1.yCell + 1].edges[0] == 0)) {
_local1.xStep = _local1.walkSpeed;
_local1.sprite._xscale = -100;
} else if ((((_local1.xStep <= 0) && (_local1._parent.cells[_local1.xCell - 1][_local1.yCell - 1].edges[1] == 1)) && (_local1._parent.cells[_local1.xCell][_local1.yCell - 1].edges[2] == 0)) && (_local1._parent.cells[_local1.xCell - 1][_local1.yCell - 1].edges[2] == 0)) {
_local1.xStep = -_local1.walkSpeed;
_local1.sprite._xscale = 100;
} else if (_local1.onGround) {
_local1.xStep = -_local1.xStep;
_local1.sprite._xscale = -_local1.sprite._xscale;
} else {
_local1.xStep = 0;
}
} else if ((((_local1.xStep >= 0) && (_local1._parent.cells[_local1.xCell][_local1.yCell + 1].edges[1] == 1)) && (_local1._parent.cells[_local1.xCell - 1][_local1.yCell + 1].edges[0] == 0)) && (_local1._parent.cells[_local1.xCell][_local1.yCell + 1].edges[0] == 0)) {
_local1.xStep = _local1.walkSpeed;
_local1.sprite._xscale = -100;
} else if ((((_local1.xStep <= 0) && (_local1._parent.cells[_local1.xCell][_local1.yCell - 1].edges[1] == 1)) && (_local1._parent.cells[_local1.xCell - 1][_local1.yCell - 1].edges[2] == 0)) && (_local1._parent.cells[_local1.xCell][_local1.yCell - 1].edges[2] == 0)) {
_local1.xStep = -_local1.walkSpeed;
_local1.sprite._xscale = 100;
} else if (_local1.onGround) {
_local1.xStep = -_local1.xStep;
_local1.sprite._xscale = -_local1.sprite._xscale;
} else {
_local1.xStep = 0;
}
if ((_local1._parent.cells[_local1.xCell][_local1.yCell + 1].clip == undefined) || (_local1._parent.cells[_local1.xCell][_local1.yCell - 1].clip == undefined)) {
_local1.xStep = 0;
}
} else if (_local1.gravType == 3) {
if (_local1._parent.cells[_local1.xCell][_local1.yCell].tile != 2) {
if ((((_local1.xStep >= 0) && (_local1._parent.cells[_local1.xCell - 1][_local1.yCell - 1].edges[2] == 1)) && (_local1._parent.cells[_local1.xCell - 1][_local1.yCell].edges[1] == 0)) && (_local1._parent.cells[_local1.xCell - 1][_local1.yCell - 1].edges[1] == 0)) {
_local1.xStep = _local1.walkSpeed;
_local1.sprite._xscale = -100;
} else if ((((_local1.xStep <= 0) && (_local1._parent.cells[_local1.xCell + 1][_local1.yCell - 1].edges[2] == 1)) && (_local1._parent.cells[_local1.xCell + 1][_local1.yCell].edges[3] == 0)) && (_local1._parent.cells[_local1.xCell + 1][_local1.yCell - 1].edges[3] == 0)) {
_local1.xStep = -_local1.walkSpeed;
_local1.sprite._xscale = 100;
} else if (_local1.onGround) {
_local1.xStep = -_local1.xStep;
_local1.sprite._xscale = -_local1.sprite._xscale;
} else {
_local1.xStep = 0;
}
} else if ((((_local1.xStep >= 0) && (_local1._parent.cells[_local1.xCell - 1][_local1.yCell].edges[2] == 1)) && (_local1._parent.cells[_local1.xCell - 1][_local1.yCell + 1].edges[1] == 0)) && (_local1._parent.cells[_local1.xCell - 1][_local1.yCell].edges[1] == 0)) {
_local1.xStep = _local1.walkSpeed;
_local1.sprite._xscale = -100;
} else if ((((_local1.xStep <= 0) && (_local1._parent.cells[_local1.xCell + 1][_local1.yCell].edges[2] == 1)) && (_local1._parent.cells[_local1.xCell + 1][_local1.yCell + 1].edges[3] == 0)) && (_local1._parent.cells[_local1.xCell + 1][_local1.yCell].edges[3] == 0)) {
_local1.xStep = -_local1.walkSpeed;
_local1.sprite._xscale = 100;
} else if (_local1.onGround) {
_local1.xStep = -_local1.xStep;
_local1.sprite._xscale = -_local1.sprite._xscale;
} else {
_local1.xStep = 0;
}
if ((_local1._parent.cells[_local1.xCell + 1][_local1.yCell].clip == undefined) || (_local1._parent.cells[_local1.xCell - 1][_local1.yCell].clip == undefined)) {
_local1.xStep = 0;
}
} else if (_local1.gravType == 4) {
if (_local1._parent.cells[_local1.xCell][_local1.yCell].tile != 3) {
if ((((_local1.xStep >= 0) && (_local1._parent.cells[_local1.xCell + 1][_local1.yCell - 1].edges[3] == 1)) && (_local1._parent.cells[_local1.xCell][_local1.yCell - 1].edges[2] == 0)) && (_local1._parent.cells[_local1.xCell + 1][_local1.yCell - 1].edges[2] == 0)) {
_local1.xStep = _local1.walkSpeed;
_local1.sprite._xscale = -100;
} else if ((((_local1.xStep <= 0) && (_local1._parent.cells[_local1.xCell + 1][_local1.yCell + 1].edges[3] == 1)) && (_local1._parent.cells[_local1.xCell][_local1.yCell + 1].edges[0] == 0)) && (_local1._parent.cells[_local1.xCell + 1][_local1.yCell + 1].edges[0] == 0)) {
_local1.xStep = -_local1.walkSpeed;
_local1.sprite._xscale = 100;
} else if (_local1.onGround) {
_local1.xStep = -_local1.xStep;
_local1.sprite._xscale = -_local1.sprite._xscale;
} else {
_local1.xStep = 0;
}
} else if ((((_local1.xStep >= 0) && (_local1._parent.cells[_local1.xCell][_local1.yCell - 1].edges[3] == 1)) && (_local1._parent.cells[_local1.xCell][_local1.yCell - 1].edges[2] == 0)) && (_local1._parent.cells[_local1.xCell + 1][_local1.yCell - 1].edges[2] == 0)) {
_local1.xStep = _local1.walkSpeed;
_local1.sprite._xscale = -100;
} else if ((((_local1.xStep <= 0) && (_local1._parent.cells[_local1.xCell][_local1.yCell + 1].edges[3] == 1)) && (_local1._parent.cells[_local1.xCell][_local1.yCell + 1].edges[0] == 0)) && (_local1._parent.cells[_local1.xCell + 1][_local1.yCell + 1].edges[0] == 0)) {
_local1.xStep = -_local1.walkSpeed;
_local1.sprite._xscale = 100;
} else if (_local1.onGround) {
_local1.xStep = -_local1.xStep;
_local1.sprite._xscale = -_local1.sprite._xscale;
} else {
_local1.xStep = 0;
}
if ((_local1._parent.cells[_local1.xCell][_local1.yCell + 1].clip == undefined) || (_local1._parent.cells[_local1.xCell][_local1.yCell - 1].clip == undefined)) {
_local1.xStep = 0;
}
}
}
if (_local1._parent.gravity < _local1._parent.maxspeed) {
_local1.yStep = _local1.yStep + _local1._parent.gravity;
}
if (_local1.gravType == 1) {
_local1.futureY = _local1._y + _local1.yStep;
_local1.futureX = _local1._x + _local1.xStep;
_local1.targetRot = 0;
} else if (_local1.gravType == 2) {
_local1.futureY = _local1._y + _local1.xStep;
_local1.futureX = _local1._x - _local1.yStep;
_local1.targetRot = 90;
} else if (_local1.gravType == 3) {
_local1.futureY = _local1._y - _local1.yStep;
_local1.futureX = _local1._x - _local1.xStep;
if (_local1._rotation <= -90) {
_local1.targetRot = -180;
} else {
_local1.targetRot = 180;
}
} else if (_local1.gravType == 4) {
_local1.futureY = _local1._y - _local1.xStep;
_local1.futureX = _local1._x + _local1.yStep;
if (_local1._rotation >= 180) {
_local1.targetRot = 270;
} else {
_local1.targetRot = -90;
}
}
if (((_local1.targetRot - _local1._rotation) * (_local1.targetRot - _local1._rotation)) > 5) {
_local1._rotation = _local1._rotation + ((_local1.targetRot - _local1._rotation) / 2);
} else {
_local1._rotation = _local1.targetRot;
if (_local1._rotation == -180) {
_local1._rotation = 180;
}
if (_local1._rotation == 270) {
_local1._rotation = -90;
}
}
_local1.xCell = Math.floor((_local1.futureX / _local1._parent.cellsize) + 0.5);
_local1.yCell = Math.floor((_local1.futureY / _local1._parent.cellsize) + 0.5);
if ((_local1._parent.cells[_local1.xCell][_local1.yCell].gravType != 0) && (_local1._parent.cells[_local1.xCell][_local1.yCell].gravType != undefined)) {
if (_local1._parent.cells[_local1.xCell][_local1.yCell].gravType <= 4) {
_local1.gravType = _local1._parent.cells[_local1.xCell][_local1.yCell].gravType;
_local1.shiftGrav = 0;
} else if (_local1.shiftGrav != (_local1._parent.cells[_local1.xCell][_local1.yCell].gravType - 4)) {
_local1.shiftGrav = _local1._parent.cells[_local1.xCell][_local1.yCell].gravType - 4;
if (_local1.shiftGrav == _local1.gravType) {
if (_local1.gravType < 4) {
_local1.gravType++;
} else {
_local1.gravType = 1;
}
} else if (_local1.gravType > 1) {
_local1.gravType--;
} else {
_local1.gravType = 4;
}
}
}
_local1.rawHitTest();
_local1._y = _local1.futureY;
_local1._x = _local1.futureX;
}
function rawHitTest() {
var _local1 = this;
var _local3 = -1;
while (_local3 <= 1) {
var _local2 = -1;
while (_local2 <= 1) {
if ((_local1.xCell != 0) && (_local1.yCell != 0)) {
_local1.detailHitTest(_local1.xCell + _local3, _local1.yCell + _local2);
} else if (((_local1.xCell == 0) && (_local1.yCell != 0)) && (_local3 >= 0)) {
_local1.detailHitTest(_local1.xCell + _local3, _local1.yCell + _local2);
} else if (((_local1.xCell != 0) && (_local1.yCell == 0)) && (_local2 >= 0)) {
_local1.detailHitTest(_local1.xCell + _local3, _local1.yCell + _local2);
} else if ((_local3 >= 0) && (_local2 >= 0)) {
_local1.detailHitTest(_local1.xCell + _local3, _local1.yCell + _local2);
}
_local2++;
}
_local3++;
}
}
function detailHitTest(tmpX, tmpY) {
var _local1 = this;
var _local2 = tmpX;
var _local3 = tmpY;
var tile = _local1._parent.cells[_local2][_local3].tile;
if ((tile >= 1) && (tile <= 5)) {
var left = (_local1.futureX - (_local1._width / 2));
var right = (_local1.futureX + (_local1._width / 2));
var top = (_local1.futureY - (_local1._height / 2));
var bottom = (_local1.futureY + (_local1._height / 2));
if (tile == 1) {
var cLeft = (_local1._parent.cells[_local2][_local3].clip._x - (_local1._parent.cellsize / 2));
var cRight = (_local1._parent.cells[_local2][_local3].clip._x + (_local1._parent.cellsize / 2));
var cTop = (_local1._parent.cells[_local2][_local3].clip._y - (_local1._parent.cellsize / 2));
var cBottom = (_local1._parent.cells[_local2][_local3].clip._y + (_local1._parent.cellsize / 2));
} else if (tile == 2) {
var cLeft = (_local1._parent.cells[_local2][_local3].clip._x - (_local1._parent.cellsize / 2));
var cRight = (_local1._parent.cells[_local2][_local3].clip._x + (_local1._parent.cellsize / 2));
var cTop = (_local1._parent.cells[_local2][_local3].clip._y - (_local1._parent.cellsize / 2));
var cBottom = _local1._parent.cells[_local2][_local3].clip._y;
} else if (tile == 3) {
var cLeft = _local1._parent.cells[_local2][_local3].clip._x;
var cRight = (_local1._parent.cells[_local2][_local3].clip._x + (_local1._parent.cellsize / 2));
var cTop = (_local1._parent.cells[_local2][_local3].clip._y - (_local1._parent.cellsize / 2));
var cBottom = (_local1._parent.cells[_local2][_local3].clip._y + (_local1._parent.cellsize / 2));
} else if (tile == 4) {
var cLeft = (_local1._parent.cells[_local2][_local3].clip._x - (_local1._parent.cellsize / 2));
var cRight = (_local1._parent.cells[_local2][_local3].clip._x + (_local1._parent.cellsize / 2));
var cTop = _local1._parent.cells[_local2][_local3].clip._y;
var cBottom = (_local1._parent.cells[_local2][_local3].clip._y + (_local1._parent.cellsize / 2));
} else if (tile == 5) {
var cLeft = (_local1._parent.cells[_local2][_local3].clip._x - (_local1._parent.cellsize / 2));
var cRight = _local1._parent.cells[_local2][_local3].clip._x;
var cTop = (_local1._parent.cells[_local2][_local3].clip._y - (_local1._parent.cellsize / 2));
var cBottom = (_local1._parent.cells[_local2][_local3].clip._y + (_local1._parent.cellsize / 2));
}
if ((((bottom > cTop) && (top < cBottom)) && (left < cRight)) && (right > cLeft)) {
var projUp = ((cTop - (_local1._height / 2)) - _local1.futureY);
var projDown = ((cBottom + (_local1._height / 2)) - _local1.futureY);
var projLeft = ((cLeft - (_local1._width / 2)) - _local1.futureX);
var projRight = ((cRight + (_local1._width / 2)) - _local1.futureX);
if (Math.sqrt(projUp * projUp) < Math.sqrt(projDown * projDown)) {
var projY = projUp;
} else {
var projY = projDown;
}
if (Math.sqrt(projLeft * projLeft) < Math.sqrt(projRight * projRight)) {
var projX = projLeft;
} else {
var projX = projRight;
}
if (Math.sqrt(projX * projX) < Math.sqrt(projY * projY)) {
if ((_local1.gravType == 1) || (_local1.gravType == 3)) {
_local1.xStep = 0;
} else if ((_local1.gravType == 2) || (_local1.gravType == 4)) {
_local1.yStep = 0;
}
_local1.futureX = _local1.futureX + projX;
if ((projX == projRight) && (_local1.gravType == 2)) {
if (!_local1.onGround) {
_local1.onGround = true;
}
} else if ((projX == projLeft) && (_local1.gravType == 4)) {
if (!_local1.onGround) {
_local1.onGround = true;
}
}
} else {
if ((_local1.gravType == 1) || (_local1.gravType == 3)) {
_local1.yStep = 0;
} else if ((_local1.gravType == 2) || (_local1.gravType == 4)) {
_local1.xStep = 0;
}
_local1.futureY = _local1.futureY + projY;
if ((projY == projUp) && (_local1.gravType == 1)) {
if (!_local1.onGround) {
_local1.onGround = true;
}
} else if ((projY == projDown) && (_local1.gravType == 3)) {
if (!_local1.onGround) {
_local1.onGround = true;
}
}
}
}
}
}
var walkSpeed = 4;
var xStep = 0;
var yStep = 0;
var gravType = 1;
var onGround = false;
var targetRot = 0;
var walking = true;
}
Symbol 1227 MovieClip [__Packages.Enemy4] Frame 0
class Enemy4 extends MovieClip
{
function Enemy4 () {
super();
}
function onLoad() {
var _local1 = this;
var _local3 = _local1._name.split("_");
_local1.id = Number(_local3[1]);
var _local2 = _local1._parent.spawnPoints[4][_local1.id].split(":");
_local1._x = _local2[0] * _local1._parent.cellsize;
_local1._y = _local2[1] * _local1._parent.cellsize;
_local1._parent.cells[_local2[0]][_local2[1]].spawn = undefined;
_local1.onGround = false;
if (_local1._parent.cells[_local2[0]][_local2[1]].gravType > 0) {
_local1.gravType = _local1._parent.cells[_local2[0]][_local2[1]].gravType;
_local1._rotation = 90 * (_local1.gravType - 1);
} else {
_local1.gravType = 1;
}
_local1.createEmptyMovieClip("sprite", 1);
_local1.sprite._y = _local1._parent.cellsize / 2;
_local1.enemyStatus = "enemy4_idle_1";
_local1.sprite.attachMovie(_local1.enemyStatus, "sprite", 1);
}
function onEnterFrame() {
var _local1 = this;
_local1.xCell = Math.floor((_local1._x / _local1._parent.cellsize) + 0.5);
_local1.yCell = Math.floor((_local1._y / _local1._parent.cellsize) + 0.5);
if (_local1._parent.cells[_local1.xCell][_local1.yCell].clip == undefined) {
if (_local1._parent.cells[_local1.xCell][_local1.yCell].tile == 2) {
_local1.yCell++;
} else if (_local1._parent.cells[_local1.xCell][_local1.yCell].tile == 3) {
_local1.xCell--;
} else if (_local1._parent.cells[_local1.xCell][_local1.yCell].tile == 4) {
_local1.yCell--;
} else if (_local1._parent.cells[_local1.xCell][_local1.yCell].tile == 5) {
_local1.xCell++;
}
_local1._parent.spawnPoints[4][_local1.id] = (_local1.xCell + ":") + _local1.yCell;
_local1._parent.cells[_local1.xCell][_local1.yCell].spawn = 4;
_local1._parent.cells[_local1.xCell][_local1.yCell].spawnId = _local1.id;
(_local1.removeMovieClip());// not popped
}
if ((_local1.hitTest(_local1._parent.player) && (_local1.enemyStatus != "enemy4_attack_1")) && (_local1._parent.player.blinking <= 0)) {
_local1.enemyStatus = "enemy4_attack_1";
_local1.sprite.attachMovie(_local1.enemyStatus, "sprite", 1);
}
}
var walkSpeed = 3;
var onGround = false;
var targetRot = 0;
}
Symbol 1228 MovieClip [__Packages.Enemy3] Frame 0
class Enemy3 extends MovieClip
{
function Enemy3 () {
super();
}
function onLoad() {
var _local1 = this;
var _local3 = _local1._name.split("_");
_local1.id = Number(_local3[1]);
var _local2 = _local1._parent.spawnPoints[3][_local1.id].split(":");
_local1._x = _local2[0] * _local1._parent.cellsize;
_local1._y = _local2[1] * _local1._parent.cellsize;
_local1._parent.cells[_local2[0]][_local2[1]].spawn = undefined;
_local1.onGround = false;
if (_local1._parent.cells[_local2[0]][_local2[1]].gravType > 0) {
_local1.gravType = _local1._parent.cells[_local2[0]][_local2[1]].gravType;
if (_local1.gravType > 4) {
_local1.gravType = _local1.gravType - 4;
if (_local1.gravType == 0) {
_local1.gravType = 1;
}
}
_local1._rotation = 90 * (_local1.gravType - 1);
} else {
_local1.gravType = 1;
}
_local1.createEmptyMovieClip("sprite", 1);
_local1.sprite._y = (_local1._parent.cellsize / 2) - 4;
_local1.enemyStatus = "enemy3_walk_1";
_local1.sprite.attachMovie(_local1.enemyStatus, "sprite", 1);
_local1.walking = true;
}
function onEnterFrame() {
var _local1 = this;
if (_local1.yStep != 0) {
_local1.onGround = false;
}
_local1.xCell = Math.floor((_local1._x / _local1._parent.cellsize) + 0.5);
_local1.yCell = Math.floor((_local1._y / _local1._parent.cellsize) + 0.5);
if (_local1._parent.cells[_local1.xCell][_local1.yCell].clip == undefined) {
if (_local1._parent.cells[_local1.xCell][_local1.yCell].tile == 2) {
_local1.yCell++;
} else if (_local1._parent.cells[_local1.xCell][_local1.yCell].tile == 3) {
_local1.xCell--;
} else if (_local1._parent.cells[_local1.xCell][_local1.yCell].tile == 4) {
_local1.yCell--;
} else if (_local1._parent.cells[_local1.xCell][_local1.yCell].tile == 5) {
_local1.xCell++;
}
_local1._parent.spawnPoints[3][_local1.id] = (_local1.xCell + ":") + _local1.yCell;
_local1._parent.cells[_local1.xCell][_local1.yCell].spawn = 3;
_local1._parent.cells[_local1.xCell][_local1.yCell].spawnId = _local1.id;
(_local1.removeMovieClip());// not popped
}
if ((_local1.hitTest(_local1._parent.player) && (_local1.enemyStatus != "enemy3_attack_1")) && (_local1._parent.player.blinking <= 0)) {
_local1.enemyStatus = "enemy3_attack_1";
_local1.sprite.attachMovie(_local1.enemyStatus, "sprite", 1);
_local1.walking = false;
if (_local1._parent.player.xStep > 0) {
_local1.sprite._xscale = 100;
_local1.xStep = 0;
} else if (_local1._parent.player.xStep < 0) {
_local1.sprite._xscale = -100;
_local1.xStep = 0;
}
}
if (_local1.walking) {
if (_local1.gravType == 1) {
if (_local1._parent.cells[_local1.xCell][_local1.yCell].tile != 4) {
if ((((_local1.xStep >= 0) && (_local1._parent.cells[_local1.xCell + 1][_local1.yCell + 1].edges[0] == 1)) && (_local1._parent.cells[_local1.xCell + 1][_local1.yCell].edges[3] == 0)) && (_local1._parent.cells[_local1.xCell + 1][_local1.yCell + 1].edges[3] == 0)) {
_local1.xStep = _local1.walkSpeed;
_local1.sprite._xscale = -100;
} else if ((((_local1.xStep <= 0) && (_local1._parent.cells[_local1.xCell - 1][_local1.yCell + 1].edges[0] == 1)) && (_local1._parent.cells[_local1.xCell - 1][_local1.yCell].edges[1] == 0)) && (_local1._parent.cells[_local1.xCell - 1][_local1.yCell + 1].edges[1] == 0)) {
_local1.xStep = -_local1.walkSpeed;
_local1.sprite._xscale = 100;
} else if (_local1.onGround) {
_local1.xStep = -_local1.xStep;
_local1.sprite._xscale = -_local1.sprite._xscale;
} else {
_local1.xStep = 0;
}
} else if ((((_local1.xStep >= 0) && (_local1._parent.cells[_local1.xCell + 1][_local1.yCell].edges[0] == 1)) && (_local1._parent.cells[_local1.xCell + 1][_local1.yCell - 1].edges[3] == 0)) && (_local1._parent.cells[_local1.xCell + 1][_local1.yCell].edges[3] == 0)) {
_local1.xStep = _local1.walkSpeed;
_local1.sprite._xscale = -100;
} else if ((((_local1.xStep <= 0) && (_local1._parent.cells[_local1.xCell - 1][_local1.yCell].edges[0] == 1)) && (_local1._parent.cells[_local1.xCell - 1][_local1.yCell - 1].edges[1] == 0)) && (_local1._parent.cells[_local1.xCell - 1][_local1.yCell].edges[1] == 0)) {
_local1.xStep = -_local1.walkSpeed;
_local1.sprite._xscale = 100;
} else if (_local1.onGround) {
_local1.xStep = -_local1.xStep;
_local1.sprite._xscale = -_local1.sprite._xscale;
} else {
_local1.xStep = 0;
}
if ((_local1._parent.cells[_local1.xCell + 1][_local1.yCell].clip == undefined) || (_local1._parent.cells[_local1.xCell - 1][_local1.yCell].clip == undefined)) {
_local1.xStep = 0;
}
} else if (_local1.gravType == 2) {
if (_local1._parent.cells[_local1.xCell][_local1.yCell].tile != 5) {
if ((((_local1.xStep >= 0) && (_local1._parent.cells[_local1.xCell - 1][_local1.yCell + 1].edges[1] == 1)) && (_local1._parent.cells[_local1.xCell][_local1.yCell + 1].edges[0] == 0)) && (_local1._parent.cells[_local1.xCell - 1][_local1.yCell + 1].edges[0] == 0)) {
_local1.xStep = _local1.walkSpeed;
_local1.sprite._xscale = -100;
} else if ((((_local1.xStep <= 0) && (_local1._parent.cells[_local1.xCell - 1][_local1.yCell - 1].edges[1] == 1)) && (_local1._parent.cells[_local1.xCell][_local1.yCell - 1].edges[2] == 0)) && (_local1._parent.cells[_local1.xCell - 1][_local1.yCell - 1].edges[2] == 0)) {
_local1.xStep = -_local1.walkSpeed;
_local1.sprite._xscale = 100;
} else if (_local1.onGround) {
_local1.xStep = -_local1.xStep;
_local1.sprite._xscale = -_local1.sprite._xscale;
} else {
_local1.xStep = 0;
}
} else if ((((_local1.xStep >= 0) && (_local1._parent.cells[_local1.xCell][_local1.yCell + 1].edges[1] == 1)) && (_local1._parent.cells[_local1.xCell - 1][_local1.yCell + 1].edges[0] == 0)) && (_local1._parent.cells[_local1.xCell][_local1.yCell + 1].edges[0] == 0)) {
_local1.xStep = _local1.walkSpeed;
_local1.sprite._xscale = -100;
} else if ((((_local1.xStep <= 0) && (_local1._parent.cells[_local1.xCell][_local1.yCell - 1].edges[1] == 1)) && (_local1._parent.cells[_local1.xCell - 1][_local1.yCell - 1].edges[2] == 0)) && (_local1._parent.cells[_local1.xCell][_local1.yCell - 1].edges[2] == 0)) {
_local1.xStep = -_local1.walkSpeed;
_local1.sprite._xscale = 100;
} else if (_local1.onGround) {
_local1.xStep = -_local1.xStep;
_local1.sprite._xscale = -_local1.sprite._xscale;
} else {
_local1.xStep = 0;
}
if ((_local1._parent.cells[_local1.xCell][_local1.yCell + 1].clip == undefined) || (_local1._parent.cells[_local1.xCell][_local1.yCell - 1].clip == undefined)) {
_local1.xStep = 0;
}
} else if (_local1.gravType == 3) {
if (_local1._parent.cells[_local1.xCell][_local1.yCell].tile != 2) {
if ((((_local1.xStep >= 0) && (_local1._parent.cells[_local1.xCell - 1][_local1.yCell - 1].edges[2] == 1)) && (_local1._parent.cells[_local1.xCell - 1][_local1.yCell].edges[1] == 0)) && (_local1._parent.cells[_local1.xCell - 1][_local1.yCell - 1].edges[1] == 0)) {
_local1.xStep = _local1.walkSpeed;
_local1.sprite._xscale = -100;
} else if ((((_local1.xStep <= 0) && (_local1._parent.cells[_local1.xCell + 1][_local1.yCell - 1].edges[2] == 1)) && (_local1._parent.cells[_local1.xCell + 1][_local1.yCell].edges[3] == 0)) && (_local1._parent.cells[_local1.xCell + 1][_local1.yCell - 1].edges[3] == 0)) {
_local1.xStep = -_local1.walkSpeed;
_local1.sprite._xscale = 100;
} else if (_local1.onGround) {
_local1.xStep = -_local1.xStep;
_local1.sprite._xscale = -_local1.sprite._xscale;
} else {
_local1.xStep = 0;
}
} else if ((((_local1.xStep >= 0) && (_local1._parent.cells[_local1.xCell - 1][_local1.yCell].edges[2] == 1)) && (_local1._parent.cells[_local1.xCell - 1][_local1.yCell + 1].edges[1] == 0)) && (_local1._parent.cells[_local1.xCell - 1][_local1.yCell].edges[1] == 0)) {
_local1.xStep = _local1.walkSpeed;
_local1.sprite._xscale = -100;
} else if ((((_local1.xStep <= 0) && (_local1._parent.cells[_local1.xCell + 1][_local1.yCell].edges[2] == 1)) && (_local1._parent.cells[_local1.xCell + 1][_local1.yCell + 1].edges[3] == 0)) && (_local1._parent.cells[_local1.xCell + 1][_local1.yCell].edges[3] == 0)) {
_local1.xStep = -_local1.walkSpeed;
_local1.sprite._xscale = 100;
} else if (_local1.onGround) {
_local1.xStep = -_local1.xStep;
_local1.sprite._xscale = -_local1.sprite._xscale;
} else {
_local1.xStep = 0;
}
if ((_local1._parent.cells[_local1.xCell + 1][_local1.yCell].clip == undefined) || (_local1._parent.cells[_local1.xCell - 1][_local1.yCell].clip == undefined)) {
_local1.xStep = 0;
}
} else if (_local1.gravType == 4) {
if (_local1._parent.cells[_local1.xCell][_local1.yCell].tile != 3) {
if ((((_local1.xStep >= 0) && (_local1._parent.cells[_local1.xCell + 1][_local1.yCell - 1].edges[3] == 1)) && (_local1._parent.cells[_local1.xCell][_local1.yCell - 1].edges[2] == 0)) && (_local1._parent.cells[_local1.xCell + 1][_local1.yCell - 1].edges[2] == 0)) {
_local1.xStep = _local1.walkSpeed;
_local1.sprite._xscale = -100;
} else if ((((_local1.xStep <= 0) && (_local1._parent.cells[_local1.xCell + 1][_local1.yCell + 1].edges[3] == 1)) && (_local1._parent.cells[_local1.xCell][_local1.yCell + 1].edges[0] == 0)) && (_local1._parent.cells[_local1.xCell + 1][_local1.yCell + 1].edges[0] == 0)) {
_local1.xStep = -_local1.walkSpeed;
_local1.sprite._xscale = 100;
} else if (_local1.onGround) {
_local1.xStep = -_local1.xStep;
_local1.sprite._xscale = -_local1.sprite._xscale;
} else {
_local1.xStep = 0;
}
} else if ((((_local1.xStep >= 0) && (_local1._parent.cells[_local1.xCell][_local1.yCell - 1].edges[3] == 1)) && (_local1._parent.cells[_local1.xCell][_local1.yCell - 1].edges[2] == 0)) && (_local1._parent.cells[_local1.xCell + 1][_local1.yCell - 1].edges[2] == 0)) {
_local1.xStep = _local1.walkSpeed;
_local1.sprite._xscale = -100;
} else if ((((_local1.xStep <= 0) && (_local1._parent.cells[_local1.xCell][_local1.yCell + 1].edges[3] == 1)) && (_local1._parent.cells[_local1.xCell][_local1.yCell + 1].edges[0] == 0)) && (_local1._parent.cells[_local1.xCell + 1][_local1.yCell + 1].edges[0] == 0)) {
_local1.xStep = -_local1.walkSpeed;
_local1.sprite._xscale = 100;
} else if (_local1.onGround) {
_local1.xStep = -_local1.xStep;
_local1.sprite._xscale = -_local1.sprite._xscale;
} else {
_local1.xStep = 0;
}
if ((_local1._parent.cells[_local1.xCell][_local1.yCell + 1].clip == undefined) || (_local1._parent.cells[_local1.xCell][_local1.yCell - 1].clip == undefined)) {
_local1.xStep = 0;
}
}
}
if (_local1._parent.gravity < _local1._parent.maxspeed) {
_local1.yStep = _local1.yStep + _local1._parent.gravity;
}
if (_local1.gravType == 1) {
_local1.futureY = _local1._y + _local1.yStep;
_local1.futureX = _local1._x + _local1.xStep;
_local1.targetRot = 0;
} else if (_local1.gravType == 2) {
_local1.futureY = _local1._y + _local1.xStep;
_local1.futureX = _local1._x - _local1.yStep;
_local1.targetRot = 90;
} else if (_local1.gravType == 3) {
_local1.futureY = _local1._y - _local1.yStep;
_local1.futureX = _local1._x - _local1.xStep;
if (_local1._rotation <= -90) {
_local1.targetRot = -180;
} else {
_local1.targetRot = 180;
}
} else if (_local1.gravType == 4) {
_local1.futureY = _local1._y - _local1.xStep;
_local1.futureX = _local1._x + _local1.yStep;
if (_local1._rotation >= 180) {
_local1.targetRot = 270;
} else {
_local1.targetRot = -90;
}
}
if (((_local1.targetRot - _local1._rotation) * (_local1.targetRot - _local1._rotation)) > 5) {
_local1._rotation = _local1._rotation + ((_local1.targetRot - _local1._rotation) / 2);
} else {
_local1._rotation = _local1.targetRot;
if (_local1._rotation == -180) {
_local1._rotation = 180;
}
if (_local1._rotation == 270) {
_local1._rotation = -90;
}
}
_local1.xCell = Math.floor((_local1.futureX / _local1._parent.cellsize) + 0.5);
_local1.yCell = Math.floor((_local1.futureY / _local1._parent.cellsize) + 0.5);
if ((_local1._parent.cells[_local1.xCell][_local1.yCell].gravType != 0) && (_local1._parent.cells[_local1.xCell][_local1.yCell].gravType != undefined)) {
if (_local1._parent.cells[_local1.xCell][_local1.yCell].gravType <= 4) {
_local1.gravType = _local1._parent.cells[_local1.xCell][_local1.yCell].gravType;
_local1.shiftGrav = 0;
} else if (_local1.shiftGrav != (_local1._parent.cells[_local1.xCell][_local1.yCell].gravType - 4)) {
_local1.shiftGrav = _local1._parent.cells[_local1.xCell][_local1.yCell].gravType - 4;
if (_local1.shiftGrav == _local1.gravType) {
if (_local1.gravType < 4) {
_local1.gravType++;
} else {
_local1.gravType = 1;
}
} else if (_local1.gravType > 1) {
_local1.gravType--;
} else {
_local1.gravType = 4;
}
}
}
_local1.rawHitTest();
_local1._y = _local1.futureY;
_local1._x = _local1.futureX;
}
function rawHitTest() {
var _local1 = this;
var _local3 = -1;
while (_local3 <= 1) {
var _local2 = -1;
while (_local2 <= 1) {
if ((_local1.xCell != 0) && (_local1.yCell != 0)) {
_local1.detailHitTest(_local1.xCell + _local3, _local1.yCell + _local2);
} else if (((_local1.xCell == 0) && (_local1.yCell != 0)) && (_local3 >= 0)) {
_local1.detailHitTest(_local1.xCell + _local3, _local1.yCell + _local2);
} else if (((_local1.xCell != 0) && (_local1.yCell == 0)) && (_local2 >= 0)) {
_local1.detailHitTest(_local1.xCell + _local3, _local1.yCell + _local2);
} else if ((_local3 >= 0) && (_local2 >= 0)) {
_local1.detailHitTest(_local1.xCell + _local3, _local1.yCell + _local2);
}
_local2++;
}
_local3++;
}
}
function detailHitTest(tmpX, tmpY) {
var _local1 = this;
var _local2 = tmpX;
var _local3 = tmpY;
var tile = _local1._parent.cells[_local2][_local3].tile;
if ((tile >= 1) && (tile <= 5)) {
var left = (_local1.futureX - (_local1._width / 2));
var right = (_local1.futureX + (_local1._width / 2));
var top = (_local1.futureY - (_local1._height / 2));
var bottom = (_local1.futureY + (_local1._height / 2));
if (tile == 1) {
var cLeft = (_local1._parent.cells[_local2][_local3].clip._x - (_local1._parent.cellsize / 2));
var cRight = (_local1._parent.cells[_local2][_local3].clip._x + (_local1._parent.cellsize / 2));
var cTop = (_local1._parent.cells[_local2][_local3].clip._y - (_local1._parent.cellsize / 2));
var cBottom = (_local1._parent.cells[_local2][_local3].clip._y + (_local1._parent.cellsize / 2));
} else if (tile == 2) {
var cLeft = (_local1._parent.cells[_local2][_local3].clip._x - (_local1._parent.cellsize / 2));
var cRight = (_local1._parent.cells[_local2][_local3].clip._x + (_local1._parent.cellsize / 2));
var cTop = (_local1._parent.cells[_local2][_local3].clip._y - (_local1._parent.cellsize / 2));
var cBottom = _local1._parent.cells[_local2][_local3].clip._y;
} else if (tile == 3) {
var cLeft = _local1._parent.cells[_local2][_local3].clip._x;
var cRight = (_local1._parent.cells[_local2][_local3].clip._x + (_local1._parent.cellsize / 2));
var cTop = (_local1._parent.cells[_local2][_local3].clip._y - (_local1._parent.cellsize / 2));
var cBottom = (_local1._parent.cells[_local2][_local3].clip._y + (_local1._parent.cellsize / 2));
} else if (tile == 4) {
var cLeft = (_local1._parent.cells[_local2][_local3].clip._x - (_local1._parent.cellsize / 2));
var cRight = (_local1._parent.cells[_local2][_local3].clip._x + (_local1._parent.cellsize / 2));
var cTop = _local1._parent.cells[_local2][_local3].clip._y;
var cBottom = (_local1._parent.cells[_local2][_local3].clip._y + (_local1._parent.cellsize / 2));
} else if (tile == 5) {
var cLeft = (_local1._parent.cells[_local2][_local3].clip._x - (_local1._parent.cellsize / 2));
var cRight = _local1._parent.cells[_local2][_local3].clip._x;
var cTop = (_local1._parent.cells[_local2][_local3].clip._y - (_local1._parent.cellsize / 2));
var cBottom = (_local1._parent.cells[_local2][_local3].clip._y + (_local1._parent.cellsize / 2));
}
if ((((bottom > cTop) && (top < cBottom)) && (left < cRight)) && (right > cLeft)) {
var projUp = ((cTop - (_local1._height / 2)) - _local1.futureY);
var projDown = ((cBottom + (_local1._height / 2)) - _local1.futureY);
var projLeft = ((cLeft - (_local1._width / 2)) - _local1.futureX);
var projRight = ((cRight + (_local1._width / 2)) - _local1.futureX);
if (Math.sqrt(projUp * projUp) < Math.sqrt(projDown * projDown)) {
var projY = projUp;
} else {
var projY = projDown;
}
if (Math.sqrt(projLeft * projLeft) < Math.sqrt(projRight * projRight)) {
var projX = projLeft;
} else {
var projX = projRight;
}
if (Math.sqrt(projX * projX) < Math.sqrt(projY * projY)) {
if ((_local1.gravType == 1) || (_local1.gravType == 3)) {
} else if ((_local1.gravType == 2) || (_local1.gravType == 4)) {
_local1.yStep = 0;
}
_local1.futureX = _local1.futureX + projX;
if ((projX == projRight) && (_local1.gravType == 2)) {
if (!_local1.onGround) {
_local1.onGround = true;
}
} else if ((projX == projLeft) && (_local1.gravType == 4)) {
if (!_local1.onGround) {
_local1.onGround = true;
}
}
} else {
if ((_local1.gravType == 1) || (_local1.gravType == 3)) {
_local1.yStep = 0;
} else if ((_local1.gravType == 2) || (_local1.gravType == 4)) {
}
_local1.futureY = _local1.futureY + projY;
if ((projY == projUp) && (_local1.gravType == 1)) {
if (!_local1.onGround) {
_local1.onGround = true;
}
} else if ((projY == projDown) && (_local1.gravType == 3)) {
if (!_local1.onGround) {
_local1.onGround = true;
}
}
}
}
}
}
var walkSpeed = 3;
var xStep = 0;
var yStep = 0;
var onGround = false;
var targetRot = 0;
var walking = false;
}
Symbol 1229 MovieClip [__Packages.Enemy2] Frame 0
class Enemy2 extends MovieClip
{
function Enemy2 () {
super();
}
function onLoad() {
var _local1 = this;
var _local3 = _local1._name.split("_");
_local1.id = Number(_local3[1]);
var _local2 = _local1._parent.spawnPoints[2][_local1.id].split(":");
_local1._x = _local2[0] * _local1._parent.cellsize;
_local1._y = _local2[1] * _local1._parent.cellsize;
_local1._parent.cells[_local2[0]][_local2[1]].spawn = undefined;
_local1.onGround = false;
if (_local1._parent.cells[_local2[0]][_local2[1]].gravType > 0) {
_local1.gravType = _local1._parent.cells[_local2[0]][_local2[1]].gravType;
_local1._rotation = 90 * (_local1.gravType - 1);
} else {
_local1.gravType = 1;
}
_local1.createEmptyMovieClip("sprite", 1);
_local1.sprite._y = (_local1._parent.cellsize / 2) - 4;
_local1.enemyStatus = "enemy2_walk_1";
_local1.sprite.attachMovie(_local1.enemyStatus, "sprite", 1);
_local1.walking = true;
}
function onEnterFrame() {
var _local1 = this;
if (_local1.yStep != 0) {
_local1.onGround = false;
}
_local1.xCell = Math.floor((_local1._x / _local1._parent.cellsize) + 0.5);
_local1.yCell = Math.floor((_local1._y / _local1._parent.cellsize) + 0.5);
if (_local1._parent.cells[_local1.xCell][_local1.yCell].clip == undefined) {
if (_local1._parent.cells[_local1.xCell][_local1.yCell].tile == 2) {
_local1.yCell++;
} else if (_local1._parent.cells[_local1.xCell][_local1.yCell].tile == 3) {
_local1.xCell--;
} else if (_local1._parent.cells[_local1.xCell][_local1.yCell].tile == 4) {
_local1.yCell--;
} else if (_local1._parent.cells[_local1.xCell][_local1.yCell].tile == 5) {
_local1.xCell++;
}
_local1._parent.spawnPoints[2][_local1.id] = (_local1.xCell + ":") + _local1.yCell;
_local1._parent.cells[_local1.xCell][_local1.yCell].spawn = 2;
_local1._parent.cells[_local1.xCell][_local1.yCell].spawnId = _local1.id;
(_local1.removeMovieClip());// not popped
}
if ((_local1.hitTest(_local1._parent.player) && (_local1.enemyStatus != "enemy2_attack_1")) && (_local1._parent.player.blinking <= 0)) {
_local1.enemyStatus = "enemy2_attack_1";
_local1.sprite.attachMovie(_local1.enemyStatus, "sprite", 1);
_local1.walking = false;
if (_local1._parent.player.xStep > 0) {
_local1.sprite._xscale = 100;
_local1.xStep = 0;
} else if (_local1._parent.player.xStep < 0) {
_local1.sprite._xscale = -100;
_local1.xStep = 0;
}
}
if (_local1.walking) {
if (_local1.gravType == 1) {
if (_local1._parent.cells[_local1.xCell][_local1.yCell].tile != 4) {
if ((((_local1.xStep >= 0) && (_local1._parent.cells[_local1.xCell + 1][_local1.yCell + 1].edges[0] == 1)) && (_local1._parent.cells[_local1.xCell + 1][_local1.yCell].edges[3] == 0)) && (_local1._parent.cells[_local1.xCell + 1][_local1.yCell + 1].edges[3] == 0)) {
_local1.xStep = _local1.walkSpeed;
_local1.sprite._xscale = -100;
} else if ((((_local1.xStep <= 0) && (_local1._parent.cells[_local1.xCell - 1][_local1.yCell + 1].edges[0] == 1)) && (_local1._parent.cells[_local1.xCell - 1][_local1.yCell].edges[1] == 0)) && (_local1._parent.cells[_local1.xCell - 1][_local1.yCell + 1].edges[1] == 0)) {
_local1.xStep = -_local1.walkSpeed;
_local1.sprite._xscale = 100;
} else if (_local1.onGround) {
_local1.xStep = -_local1.xStep;
_local1.sprite._xscale = -_local1.sprite._xscale;
} else {
_local1.xStep = 0;
}
} else if ((((_local1.xStep >= 0) && (_local1._parent.cells[_local1.xCell + 1][_local1.yCell].edges[0] == 1)) && (_local1._parent.cells[_local1.xCell + 1][_local1.yCell - 1].edges[3] == 0)) && (_local1._parent.cells[_local1.xCell + 1][_local1.yCell].edges[3] == 0)) {
_local1.xStep = _local1.walkSpeed;
_local1.sprite._xscale = -100;
} else if ((((_local1.xStep <= 0) && (_local1._parent.cells[_local1.xCell - 1][_local1.yCell].edges[0] == 1)) && (_local1._parent.cells[_local1.xCell - 1][_local1.yCell - 1].edges[1] == 0)) && (_local1._parent.cells[_local1.xCell - 1][_local1.yCell].edges[1] == 0)) {
_local1.xStep = -_local1.walkSpeed;
_local1.sprite._xscale = 100;
} else if (_local1.onGround) {
_local1.xStep = -_local1.xStep;
_local1.sprite._xscale = -_local1.sprite._xscale;
} else {
_local1.xStep = 0;
}
if ((_local1._parent.cells[_local1.xCell + 1][_local1.yCell].clip == undefined) || (_local1._parent.cells[_local1.xCell - 1][_local1.yCell].clip == undefined)) {
_local1.xStep = 0;
}
} else if (_local1.gravType == 2) {
if (_local1._parent.cells[_local1.xCell][_local1.yCell].tile != 5) {
if ((((_local1.xStep >= 0) && (_local1._parent.cells[_local1.xCell - 1][_local1.yCell + 1].edges[1] == 1)) && (_local1._parent.cells[_local1.xCell][_local1.yCell + 1].edges[0] == 0)) && (_local1._parent.cells[_local1.xCell - 1][_local1.yCell + 1].edges[0] == 0)) {
_local1.xStep = _local1.walkSpeed;
_local1.sprite._xscale = -100;
} else if ((((_local1.xStep <= 0) && (_local1._parent.cells[_local1.xCell - 1][_local1.yCell - 1].edges[1] == 1)) && (_local1._parent.cells[_local1.xCell][_local1.yCell - 1].edges[2] == 0)) && (_local1._parent.cells[_local1.xCell - 1][_local1.yCell - 1].edges[2] == 0)) {
_local1.xStep = -_local1.walkSpeed;
_local1.sprite._xscale = 100;
} else if (_local1.onGround) {
_local1.xStep = -_local1.xStep;
_local1.sprite._xscale = -_local1.sprite._xscale;
} else {
_local1.xStep = 0;
}
} else if ((((_local1.xStep >= 0) && (_local1._parent.cells[_local1.xCell][_local1.yCell + 1].edges[1] == 1)) && (_local1._parent.cells[_local1.xCell - 1][_local1.yCell + 1].edges[0] == 0)) && (_local1._parent.cells[_local1.xCell][_local1.yCell + 1].edges[0] == 0)) {
_local1.xStep = _local1.walkSpeed;
_local1.sprite._xscale = -100;
} else if ((((_local1.xStep <= 0) && (_local1._parent.cells[_local1.xCell][_local1.yCell - 1].edges[1] == 1)) && (_local1._parent.cells[_local1.xCell - 1][_local1.yCell - 1].edges[2] == 0)) && (_local1._parent.cells[_local1.xCell][_local1.yCell - 1].edges[2] == 0)) {
_local1.xStep = -_local1.walkSpeed;
_local1.sprite._xscale = 100;
} else if (_local1.onGround) {
_local1.xStep = -_local1.xStep;
_local1.sprite._xscale = -_local1.sprite._xscale;
} else {
_local1.xStep = 0;
}
if ((_local1._parent.cells[_local1.xCell][_local1.yCell + 1].clip == undefined) || (_local1._parent.cells[_local1.xCell][_local1.yCell - 1].clip == undefined)) {
_local1.xStep = 0;
}
} else if (_local1.gravType == 3) {
if (_local1._parent.cells[_local1.xCell][_local1.yCell].tile != 2) {
if ((((_local1.xStep >= 0) && (_local1._parent.cells[_local1.xCell - 1][_local1.yCell - 1].edges[2] == 1)) && (_local1._parent.cells[_local1.xCell - 1][_local1.yCell].edges[1] == 0)) && (_local1._parent.cells[_local1.xCell - 1][_local1.yCell - 1].edges[1] == 0)) {
_local1.xStep = _local1.walkSpeed;
_local1.sprite._xscale = -100;
} else if ((((_local1.xStep <= 0) && (_local1._parent.cells[_local1.xCell + 1][_local1.yCell - 1].edges[2] == 1)) && (_local1._parent.cells[_local1.xCell + 1][_local1.yCell].edges[3] == 0)) && (_local1._parent.cells[_local1.xCell + 1][_local1.yCell - 1].edges[3] == 0)) {
_local1.xStep = -_local1.walkSpeed;
_local1.sprite._xscale = 100;
} else if (_local1.onGround) {
_local1.xStep = -_local1.xStep;
_local1.sprite._xscale = -_local1.sprite._xscale;
} else {
_local1.xStep = 0;
}
} else if ((((_local1.xStep >= 0) && (_local1._parent.cells[_local1.xCell - 1][_local1.yCell].edges[2] == 1)) && (_local1._parent.cells[_local1.xCell - 1][_local1.yCell + 1].edges[1] == 0)) && (_local1._parent.cells[_local1.xCell - 1][_local1.yCell].edges[1] == 0)) {
_local1.xStep = _local1.walkSpeed;
_local1.sprite._xscale = -100;
} else if ((((_local1.xStep <= 0) && (_local1._parent.cells[_local1.xCell + 1][_local1.yCell].edges[2] == 1)) && (_local1._parent.cells[_local1.xCell + 1][_local1.yCell + 1].edges[3] == 0)) && (_local1._parent.cells[_local1.xCell + 1][_local1.yCell].edges[3] == 0)) {
_local1.xStep = -_local1.walkSpeed;
_local1.sprite._xscale = 100;
} else if (_local1.onGround) {
_local1.xStep = -_local1.xStep;
_local1.sprite._xscale = -_local1.sprite._xscale;
} else {
_local1.xStep = 0;
}
if ((_local1._parent.cells[_local1.xCell + 1][_local1.yCell].clip == undefined) || (_local1._parent.cells[_local1.xCell - 1][_local1.yCell].clip == undefined)) {
_local1.xStep = 0;
}
} else if (_local1.gravType == 4) {
if (_local1._parent.cells[_local1.xCell][_local1.yCell].tile != 3) {
if ((((_local1.xStep >= 0) && (_local1._parent.cells[_local1.xCell + 1][_local1.yCell - 1].edges[3] == 1)) && (_local1._parent.cells[_local1.xCell][_local1.yCell - 1].edges[2] == 0)) && (_local1._parent.cells[_local1.xCell + 1][_local1.yCell - 1].edges[2] == 0)) {
_local1.xStep = _local1.walkSpeed;
_local1.sprite._xscale = -100;
} else if ((((_local1.xStep <= 0) && (_local1._parent.cells[_local1.xCell + 1][_local1.yCell + 1].edges[3] == 1)) && (_local1._parent.cells[_local1.xCell][_local1.yCell + 1].edges[0] == 0)) && (_local1._parent.cells[_local1.xCell + 1][_local1.yCell + 1].edges[0] == 0)) {
_local1.xStep = -_local1.walkSpeed;
_local1.sprite._xscale = 100;
} else if (_local1.onGround) {
_local1.xStep = -_local1.xStep;
_local1.sprite._xscale = -_local1.sprite._xscale;
} else {
_local1.xStep = 0;
}
} else if ((((_local1.xStep >= 0) && (_local1._parent.cells[_local1.xCell][_local1.yCell - 1].edges[3] == 1)) && (_local1._parent.cells[_local1.xCell][_local1.yCell - 1].edges[2] == 0)) && (_local1._parent.cells[_local1.xCell + 1][_local1.yCell - 1].edges[2] == 0)) {
_local1.xStep = _local1.walkSpeed;
_local1.sprite._xscale = -100;
} else if ((((_local1.xStep <= 0) && (_local1._parent.cells[_local1.xCell][_local1.yCell + 1].edges[3] == 1)) && (_local1._parent.cells[_local1.xCell][_local1.yCell + 1].edges[0] == 0)) && (_local1._parent.cells[_local1.xCell + 1][_local1.yCell + 1].edges[0] == 0)) {
_local1.xStep = -_local1.walkSpeed;
_local1.sprite._xscale = 100;
} else if (_local1.onGround) {
_local1.xStep = -_local1.xStep;
_local1.sprite._xscale = -_local1.sprite._xscale;
} else {
_local1.xStep = 0;
}
if ((_local1._parent.cells[_local1.xCell][_local1.yCell + 1].clip == undefined) || (_local1._parent.cells[_local1.xCell][_local1.yCell - 1].clip == undefined)) {
_local1.xStep = 0;
}
}
}
if (_local1._parent.gravity < _local1._parent.maxspeed) {
_local1.yStep = _local1.yStep + _local1._parent.gravity;
}
if (_local1.gravType == 1) {
_local1.futureY = _local1._y + _local1.yStep;
_local1.futureX = _local1._x + _local1.xStep;
_local1.targetRot = 0;
} else if (_local1.gravType == 2) {
_local1.futureY = _local1._y + _local1.xStep;
_local1.futureX = _local1._x - _local1.yStep;
_local1.targetRot = 90;
} else if (_local1.gravType == 3) {
_local1.futureY = _local1._y - _local1.yStep;
_local1.futureX = _local1._x - _local1.xStep;
if (_local1._rotation <= -90) {
_local1.targetRot = -180;
} else {
_local1.targetRot = 180;
}
} else if (_local1.gravType == 4) {
_local1.futureY = _local1._y - _local1.xStep;
_local1.futureX = _local1._x + _local1.yStep;
if (_local1._rotation >= 180) {
_local1.targetRot = 270;
} else {
_local1.targetRot = -90;
}
}
if (((_local1.targetRot - _local1._rotation) * (_local1.targetRot - _local1._rotation)) > 5) {
_local1._rotation = _local1._rotation + ((_local1.targetRot - _local1._rotation) / 2);
} else {
_local1._rotation = _local1.targetRot;
if (_local1._rotation == -180) {
_local1._rotation = 180;
}
if (_local1._rotation == 270) {
_local1._rotation = -90;
}
}
_local1.xCell = Math.floor((_local1.futureX / _local1._parent.cellsize) + 0.5);
_local1.yCell = Math.floor((_local1.futureY / _local1._parent.cellsize) + 0.5);
if ((_local1._parent.cells[_local1.xCell][_local1.yCell].gravType != 0) && (_local1._parent.cells[_local1.xCell][_local1.yCell].gravType != undefined)) {
if (_local1._parent.cells[_local1.xCell][_local1.yCell].gravType <= 4) {
_local1.gravType = _local1._parent.cells[_local1.xCell][_local1.yCell].gravType;
_local1.shiftGrav = 0;
} else if (_local1.shiftGrav != (_local1._parent.cells[_local1.xCell][_local1.yCell].gravType - 4)) {
_local1.shiftGrav = _local1._parent.cells[_local1.xCell][_local1.yCell].gravType - 4;
if (_local1.shiftGrav == _local1.gravType) {
if (_local1.gravType < 4) {
_local1.gravType++;
} else {
_local1.gravType = 1;
}
} else if (_local1.gravType > 1) {
_local1.gravType--;
} else {
_local1.gravType = 4;
}
}
}
_local1.rawHitTest();
_local1._y = _local1.futureY;
_local1._x = _local1.futureX;
}
function rawHitTest() {
var _local1 = this;
var _local3 = -1;
while (_local3 <= 1) {
var _local2 = -1;
while (_local2 <= 1) {
if ((_local1.xCell != 0) && (_local1.yCell != 0)) {
_local1.detailHitTest(_local1.xCell + _local3, _local1.yCell + _local2);
} else if (((_local1.xCell == 0) && (_local1.yCell != 0)) && (_local3 >= 0)) {
_local1.detailHitTest(_local1.xCell + _local3, _local1.yCell + _local2);
} else if (((_local1.xCell != 0) && (_local1.yCell == 0)) && (_local2 >= 0)) {
_local1.detailHitTest(_local1.xCell + _local3, _local1.yCell + _local2);
} else if ((_local3 >= 0) && (_local2 >= 0)) {
_local1.detailHitTest(_local1.xCell + _local3, _local1.yCell + _local2);
}
_local2++;
}
_local3++;
}
}
function detailHitTest(tmpX, tmpY) {
var _local1 = this;
var _local2 = tmpX;
var _local3 = tmpY;
var tile = _local1._parent.cells[_local2][_local3].tile;
if ((tile >= 1) && (tile <= 5)) {
var left = (_local1.futureX - (_local1._width / 2));
var right = (_local1.futureX + (_local1._width / 2));
var top = (_local1.futureY - (_local1._height / 2));
var bottom = (_local1.futureY + (_local1._height / 2));
if (tile == 1) {
var cLeft = (_local1._parent.cells[_local2][_local3].clip._x - (_local1._parent.cellsize / 2));
var cRight = (_local1._parent.cells[_local2][_local3].clip._x + (_local1._parent.cellsize / 2));
var cTop = (_local1._parent.cells[_local2][_local3].clip._y - (_local1._parent.cellsize / 2));
var cBottom = (_local1._parent.cells[_local2][_local3].clip._y + (_local1._parent.cellsize / 2));
} else if (tile == 2) {
var cLeft = (_local1._parent.cells[_local2][_local3].clip._x - (_local1._parent.cellsize / 2));
var cRight = (_local1._parent.cells[_local2][_local3].clip._x + (_local1._parent.cellsize / 2));
var cTop = (_local1._parent.cells[_local2][_local3].clip._y - (_local1._parent.cellsize / 2));
var cBottom = _local1._parent.cells[_local2][_local3].clip._y;
} else if (tile == 3) {
var cLeft = _local1._parent.cells[_local2][_local3].clip._x;
var cRight = (_local1._parent.cells[_local2][_local3].clip._x + (_local1._parent.cellsize / 2));
var cTop = (_local1._parent.cells[_local2][_local3].clip._y - (_local1._parent.cellsize / 2));
var cBottom = (_local1._parent.cells[_local2][_local3].clip._y + (_local1._parent.cellsize / 2));
} else if (tile == 4) {
var cLeft = (_local1._parent.cells[_local2][_local3].clip._x - (_local1._parent.cellsize / 2));
var cRight = (_local1._parent.cells[_local2][_local3].clip._x + (_local1._parent.cellsize / 2));
var cTop = _local1._parent.cells[_local2][_local3].clip._y;
var cBottom = (_local1._parent.cells[_local2][_local3].clip._y + (_local1._parent.cellsize / 2));
} else if (tile == 5) {
var cLeft = (_local1._parent.cells[_local2][_local3].clip._x - (_local1._parent.cellsize / 2));
var cRight = _local1._parent.cells[_local2][_local3].clip._x;
var cTop = (_local1._parent.cells[_local2][_local3].clip._y - (_local1._parent.cellsize / 2));
var cBottom = (_local1._parent.cells[_local2][_local3].clip._y + (_local1._parent.cellsize / 2));
}
if ((((bottom > cTop) && (top < cBottom)) && (left < cRight)) && (right > cLeft)) {
var projUp = ((cTop - (_local1._height / 2)) - _local1.futureY);
var projDown = ((cBottom + (_local1._height / 2)) - _local1.futureY);
var projLeft = ((cLeft - (_local1._width / 2)) - _local1.futureX);
var projRight = ((cRight + (_local1._width / 2)) - _local1.futureX);
if (Math.sqrt(projUp * projUp) < Math.sqrt(projDown * projDown)) {
var projY = projUp;
} else {
var projY = projDown;
}
if (Math.sqrt(projLeft * projLeft) < Math.sqrt(projRight * projRight)) {
var projX = projLeft;
} else {
var projX = projRight;
}
if (Math.sqrt(projX * projX) < Math.sqrt(projY * projY)) {
if ((_local1.gravType == 1) || (_local1.gravType == 3)) {
} else if ((_local1.gravType == 2) || (_local1.gravType == 4)) {
_local1.yStep = 0;
}
_local1.futureX = _local1.futureX + projX;
if ((projX == projRight) && (_local1.gravType == 2)) {
if (!_local1.onGround) {
_local1.onGround = true;
}
} else if ((projX == projLeft) && (_local1.gravType == 4)) {
if (!_local1.onGround) {
_local1.onGround = true;
}
}
} else {
if ((_local1.gravType == 1) || (_local1.gravType == 3)) {
_local1.yStep = 0;
} else if ((_local1.gravType == 2) || (_local1.gravType == 4)) {
}
_local1.futureY = _local1.futureY + projY;
if ((projY == projUp) && (_local1.gravType == 1)) {
if (!_local1.onGround) {
_local1.onGround = true;
}
} else if ((projY == projDown) && (_local1.gravType == 3)) {
if (!_local1.onGround) {
_local1.onGround = true;
}
}
}
}
}
}
var walkSpeed = 2;
var xStep = 0;
var yStep = 0;
var onGround = false;
var targetRot = 0;
var walking = false;
}
Symbol 1230 MovieClip [__Packages.Enemy1] Frame 0
class Enemy1 extends MovieClip
{
function Enemy1 () {
super();
}
function onLoad() {
var _local1 = this;
var _local3 = _local1._name.split("_");
_local1.id = Number(_local3[1]);
var _local2 = _local1._parent.spawnPoints[1][_local1.id].split(":");
_local1._x = _local2[0] * _local1._parent.cellsize;
_local1._y = _local2[1] * _local1._parent.cellsize;
_local1._parent.cells[_local2[0]][_local2[1]].spawn = undefined;
_local1.onGround = false;
if (_local1._parent.cells[_local2[0]][_local2[1]].gravType > 0) {
_local1.gravType = _local1._parent.cells[_local2[0]][_local2[1]].gravType;
_local1._rotation = 90 * (_local1.gravType - 1);
} else {
_local1.gravType = 1;
}
_local1.createEmptyMovieClip("sprite", 1);
_local1.sprite._y = _local1._parent.cellsize / 2;
_local1.enemyStatus = "enemy1_running_1";
_local1.sprite.attachMovie(_local1.enemyStatus, "sprite", 1);
_local1.sprite._xscale = -100;
}
function onEnterFrame() {
var _local1 = this;
if (_local1.yStep != 0) {
_local1.onGround = false;
}
_local1.xCell = Math.floor((_local1._x / _local1._parent.cellsize) + 0.5);
_local1.yCell = Math.floor((_local1._y / _local1._parent.cellsize) + 0.5);
if (_local1._parent.cells[_local1.xCell][_local1.yCell].clip == undefined) {
if (_local1._parent.cells[_local1.xCell][_local1.yCell].tile == 2) {
_local1.yCell++;
} else if (_local1._parent.cells[_local1.xCell][_local1.yCell].tile == 3) {
_local1.xCell--;
} else if (_local1._parent.cells[_local1.xCell][_local1.yCell].tile == 4) {
_local1.yCell--;
} else if (_local1._parent.cells[_local1.xCell][_local1.yCell].tile == 5) {
_local1.xCell++;
}
_local1._parent.spawnPoints[1][_local1.id] = (_local1.xCell + ":") + _local1.yCell;
_local1._parent.cells[_local1.xCell][_local1.yCell].spawn = 1;
_local1._parent.cells[_local1.xCell][_local1.yCell].spawnId = _local1.id;
(_local1.removeMovieClip());// not popped
}
if (_local1.walking) {
if (_local1.gravType == 1) {
if (_local1._parent.cells[_local1.xCell][_local1.yCell].tile != 4) {
if ((((_local1.xStep >= 0) && (_local1._parent.cells[_local1.xCell + 1][_local1.yCell + 1].edges[0] == 1)) && (_local1._parent.cells[_local1.xCell + 1][_local1.yCell].edges[3] == 0)) && (_local1._parent.cells[_local1.xCell + 1][_local1.yCell + 1].edges[3] == 0)) {
_local1.xStep = _local1.walkSpeed;
_local1.sprite._xscale = -100;
} else if ((((_local1.xStep <= 0) && (_local1._parent.cells[_local1.xCell - 1][_local1.yCell + 1].edges[0] == 1)) && (_local1._parent.cells[_local1.xCell - 1][_local1.yCell].edges[1] == 0)) && (_local1._parent.cells[_local1.xCell - 1][_local1.yCell + 1].edges[1] == 0)) {
_local1.xStep = -_local1.walkSpeed;
_local1.sprite._xscale = 100;
} else if (_local1.onGround) {
_local1.xStep = -_local1.xStep;
_local1.sprite._xscale = -_local1.sprite._xscale;
} else {
_local1.xStep = 0;
}
} else if ((((_local1.xStep >= 0) && (_local1._parent.cells[_local1.xCell + 1][_local1.yCell].edges[0] == 1)) && (_local1._parent.cells[_local1.xCell + 1][_local1.yCell - 1].edges[3] == 0)) && (_local1._parent.cells[_local1.xCell + 1][_local1.yCell].edges[3] == 0)) {
_local1.xStep = _local1.walkSpeed;
_local1.sprite._xscale = -100;
} else if ((((_local1.xStep <= 0) && (_local1._parent.cells[_local1.xCell - 1][_local1.yCell].edges[0] == 1)) && (_local1._parent.cells[_local1.xCell - 1][_local1.yCell - 1].edges[1] == 0)) && (_local1._parent.cells[_local1.xCell - 1][_local1.yCell].edges[1] == 0)) {
_local1.xStep = -_local1.walkSpeed;
_local1.sprite._xscale = 100;
} else if (_local1.onGround) {
_local1.xStep = -_local1.xStep;
_local1.sprite._xscale = -_local1.sprite._xscale;
} else {
_local1.xStep = 0;
}
if ((_local1._parent.cells[_local1.xCell + 1][_local1.yCell].clip == undefined) || (_local1._parent.cells[_local1.xCell - 1][_local1.yCell].clip == undefined)) {
_local1.xStep = 0;
}
} else if (_local1.gravType == 2) {
if (_local1._parent.cells[_local1.xCell][_local1.yCell].tile != 5) {
if ((((_local1.xStep >= 0) && (_local1._parent.cells[_local1.xCell - 1][_local1.yCell + 1].edges[1] == 1)) && (_local1._parent.cells[_local1.xCell][_local1.yCell + 1].edges[0] == 0)) && (_local1._parent.cells[_local1.xCell - 1][_local1.yCell + 1].edges[0] == 0)) {
_local1.xStep = _local1.walkSpeed;
_local1.sprite._xscale = -100;
} else if ((((_local1.xStep <= 0) && (_local1._parent.cells[_local1.xCell - 1][_local1.yCell - 1].edges[1] == 1)) && (_local1._parent.cells[_local1.xCell][_local1.yCell - 1].edges[2] == 0)) && (_local1._parent.cells[_local1.xCell - 1][_local1.yCell - 1].edges[2] == 0)) {
_local1.xStep = -_local1.walkSpeed;
_local1.sprite._xscale = 100;
} else if (_local1.onGround) {
_local1.xStep = -_local1.xStep;
_local1.sprite._xscale = -_local1.sprite._xscale;
} else {
_local1.xStep = 0;
}
} else if ((((_local1.xStep >= 0) && (_local1._parent.cells[_local1.xCell][_local1.yCell + 1].edges[1] == 1)) && (_local1._parent.cells[_local1.xCell - 1][_local1.yCell + 1].edges[0] == 0)) && (_local1._parent.cells[_local1.xCell][_local1.yCell + 1].edges[0] == 0)) {
_local1.xStep = _local1.walkSpeed;
_local1.sprite._xscale = -100;
} else if ((((_local1.xStep <= 0) && (_local1._parent.cells[_local1.xCell][_local1.yCell - 1].edges[1] == 1)) && (_local1._parent.cells[_local1.xCell - 1][_local1.yCell - 1].edges[2] == 0)) && (_local1._parent.cells[_local1.xCell][_local1.yCell - 1].edges[2] == 0)) {
_local1.xStep = -_local1.walkSpeed;
_local1.sprite._xscale = 100;
} else if (_local1.onGround) {
_local1.xStep = -_local1.xStep;
_local1.sprite._xscale = -_local1.sprite._xscale;
} else {
_local1.xStep = 0;
}
if ((_local1._parent.cells[_local1.xCell][_local1.yCell + 1].clip == undefined) || (_local1._parent.cells[_local1.xCell][_local1.yCell - 1].clip == undefined)) {
_local1.xStep = 0;
}
} else if (_local1.gravType == 3) {
if (_local1._parent.cells[_local1.xCell][_local1.yCell].tile != 2) {
if ((((_local1.xStep >= 0) && (_local1._parent.cells[_local1.xCell - 1][_local1.yCell - 1].edges[2] == 1)) && (_local1._parent.cells[_local1.xCell - 1][_local1.yCell].edges[1] == 0)) && (_local1._parent.cells[_local1.xCell - 1][_local1.yCell - 1].edges[1] == 0)) {
_local1.xStep = _local1.walkSpeed;
_local1.sprite._xscale = -100;
} else if ((((_local1.xStep <= 0) && (_local1._parent.cells[_local1.xCell + 1][_local1.yCell - 1].edges[2] == 1)) && (_local1._parent.cells[_local1.xCell + 1][_local1.yCell].edges[3] == 0)) && (_local1._parent.cells[_local1.xCell + 1][_local1.yCell - 1].edges[3] == 0)) {
_local1.xStep = -_local1.walkSpeed;
_local1.sprite._xscale = 100;
} else if (_local1.onGround) {
_local1.xStep = -_local1.xStep;
_local1.sprite._xscale = -_local1.sprite._xscale;
} else {
_local1.xStep = 0;
}
} else if ((((_local1.xStep >= 0) && (_local1._parent.cells[_local1.xCell - 1][_local1.yCell].edges[2] == 1)) && (_local1._parent.cells[_local1.xCell - 1][_local1.yCell + 1].edges[1] == 0)) && (_local1._parent.cells[_local1.xCell - 1][_local1.yCell].edges[1] == 0)) {
_local1.xStep = _local1.walkSpeed;
_local1.sprite._xscale = -100;
} else if ((((_local1.xStep <= 0) && (_local1._parent.cells[_local1.xCell + 1][_local1.yCell].edges[2] == 1)) && (_local1._parent.cells[_local1.xCell + 1][_local1.yCell + 1].edges[3] == 0)) && (_local1._parent.cells[_local1.xCell + 1][_local1.yCell].edges[3] == 0)) {
_local1.xStep = -_local1.walkSpeed;
_local1.sprite._xscale = 100;
} else if (_local1.onGround) {
_local1.xStep = -_local1.xStep;
_local1.sprite._xscale = -_local1.sprite._xscale;
} else {
_local1.xStep = 0;
}
if ((_local1._parent.cells[_local1.xCell + 1][_local1.yCell].clip == undefined) || (_local1._parent.cells[_local1.xCell - 1][_local1.yCell].clip == undefined)) {
_local1.xStep = 0;
}
} else if (_local1.gravType == 4) {
if (_local1._parent.cells[_local1.xCell][_local1.yCell].tile != 3) {
if ((((_local1.xStep >= 0) && (_local1._parent.cells[_local1.xCell + 1][_local1.yCell - 1].edges[3] == 1)) && (_local1._parent.cells[_local1.xCell][_local1.yCell - 1].edges[2] == 0)) && (_local1._parent.cells[_local1.xCell + 1][_local1.yCell - 1].edges[2] == 0)) {
_local1.xStep = _local1.walkSpeed;
_local1.sprite._xscale = -100;
} else if ((((_local1.xStep <= 0) && (_local1._parent.cells[_local1.xCell + 1][_local1.yCell + 1].edges[3] == 1)) && (_local1._parent.cells[_local1.xCell][_local1.yCell + 1].edges[0] == 0)) && (_local1._parent.cells[_local1.xCell + 1][_local1.yCell + 1].edges[0] == 0)) {
_local1.xStep = -_local1.walkSpeed;
_local1.sprite._xscale = 100;
} else if (_local1.onGround) {
_local1.xStep = -_local1.xStep;
_local1.sprite._xscale = -_local1.sprite._xscale;
} else {
_local1.xStep = 0;
}
} else if ((((_local1.xStep >= 0) && (_local1._parent.cells[_local1.xCell][_local1.yCell - 1].edges[3] == 1)) && (_local1._parent.cells[_local1.xCell][_local1.yCell - 1].edges[2] == 0)) && (_local1._parent.cells[_local1.xCell + 1][_local1.yCell - 1].edges[2] == 0)) {
_local1.xStep = _local1.walkSpeed;
_local1.sprite._xscale = -100;
} else if ((((_local1.xStep <= 0) && (_local1._parent.cells[_local1.xCell][_local1.yCell + 1].edges[3] == 1)) && (_local1._parent.cells[_local1.xCell][_local1.yCell + 1].edges[0] == 0)) && (_local1._parent.cells[_local1.xCell + 1][_local1.yCell + 1].edges[0] == 0)) {
_local1.xStep = -_local1.walkSpeed;
_local1.sprite._xscale = 100;
} else if (_local1.onGround) {
_local1.xStep = -_local1.xStep;
_local1.sprite._xscale = -_local1.sprite._xscale;
} else {
_local1.xStep = 0;
}
if ((_local1._parent.cells[_local1.xCell][_local1.yCell + 1].clip == undefined) || (_local1._parent.cells[_local1.xCell][_local1.yCell - 1].clip == undefined)) {
_local1.xStep = 0;
}
}
}
if (_local1._parent.gravity < _local1._parent.maxspeed) {
_local1.yStep = _local1.yStep + _local1._parent.gravity;
}
if (_local1.gravType == 1) {
_local1.futureY = _local1._y + _local1.yStep;
_local1.futureX = _local1._x + _local1.xStep;
_local1.targetRot = 0;
} else if (_local1.gravType == 2) {
_local1.futureY = _local1._y + _local1.xStep;
_local1.futureX = _local1._x - _local1.yStep;
_local1.targetRot = 90;
} else if (_local1.gravType == 3) {
_local1.futureY = _local1._y - _local1.yStep;
_local1.futureX = _local1._x - _local1.xStep;
if (_local1._rotation <= -90) {
_local1.targetRot = -180;
} else {
_local1.targetRot = 180;
}
} else if (_local1.gravType == 4) {
_local1.futureY = _local1._y - _local1.xStep;
_local1.futureX = _local1._x + _local1.yStep;
if (_local1._rotation >= 180) {
_local1.targetRot = 270;
} else {
_local1.targetRot = -90;
}
}
if (((_local1.targetRot - _local1._rotation) * (_local1.targetRot - _local1._rotation)) > 5) {
_local1._rotation = _local1._rotation + ((_local1.targetRot - _local1._rotation) / 2);
} else {
_local1._rotation = _local1.targetRot;
if (_local1._rotation == -180) {
_local1._rotation = 180;
}
if (_local1._rotation == 270) {
_local1._rotation = -90;
}
}
_local1.xCell = Math.floor((_local1.futureX / _local1._parent.cellsize) + 0.5);
_local1.yCell = Math.floor((_local1.futureY / _local1._parent.cellsize) + 0.5);
if ((_local1._parent.cells[_local1.xCell][_local1.yCell].gravType != 0) && (_local1._parent.cells[_local1.xCell][_local1.yCell].gravType != undefined)) {
if (_local1._parent.cells[_local1.xCell][_local1.yCell].gravType <= 4) {
_local1.gravType = _local1._parent.cells[_local1.xCell][_local1.yCell].gravType;
_local1.shiftGrav = 0;
} else if (_local1.shiftGrav != (_local1._parent.cells[_local1.xCell][_local1.yCell].gravType - 4)) {
_local1.shiftGrav = _local1._parent.cells[_local1.xCell][_local1.yCell].gravType - 4;
if (_local1.shiftGrav == _local1.gravType) {
if (_local1.gravType < 4) {
_local1.gravType++;
} else {
_local1.gravType = 1;
}
} else if (_local1.gravType > 1) {
_local1.gravType--;
} else {
_local1.gravType = 4;
}
}
}
_local1.rawHitTest();
_local1._y = _local1.futureY;
_local1._x = _local1.futureX;
}
function rawHitTest() {
var _local1 = this;
var _local3 = -1;
while (_local3 <= 1) {
var _local2 = -1;
while (_local2 <= 1) {
if ((_local1.xCell != 0) && (_local1.yCell != 0)) {
_local1.detailHitTest(_local1.xCell + _local3, _local1.yCell + _local2);
} else if (((_local1.xCell == 0) && (_local1.yCell != 0)) && (_local3 >= 0)) {
_local1.detailHitTest(_local1.xCell + _local3, _local1.yCell + _local2);
} else if (((_local1.xCell != 0) && (_local1.yCell == 0)) && (_local2 >= 0)) {
_local1.detailHitTest(_local1.xCell + _local3, _local1.yCell + _local2);
} else if ((_local3 >= 0) && (_local2 >= 0)) {
_local1.detailHitTest(_local1.xCell + _local3, _local1.yCell + _local2);
}
_local2++;
}
_local3++;
}
}
function detailHitTest(tmpX, tmpY) {
var _local1 = this;
var _local2 = tmpX;
var _local3 = tmpY;
var tile = _local1._parent.cells[_local2][_local3].tile;
if ((tile >= 1) && (tile <= 5)) {
var left = (_local1.futureX - (_local1._width / 2));
var right = (_local1.futureX + (_local1._width / 2));
var top = (_local1.futureY - (_local1._height / 2));
var bottom = (_local1.futureY + (_local1._height / 2));
if (tile == 1) {
var cLeft = (_local1._parent.cells[_local2][_local3].clip._x - (_local1._parent.cellsize / 2));
var cRight = (_local1._parent.cells[_local2][_local3].clip._x + (_local1._parent.cellsize / 2));
var cTop = (_local1._parent.cells[_local2][_local3].clip._y - (_local1._parent.cellsize / 2));
var cBottom = (_local1._parent.cells[_local2][_local3].clip._y + (_local1._parent.cellsize / 2));
} else if (tile == 2) {
var cLeft = (_local1._parent.cells[_local2][_local3].clip._x - (_local1._parent.cellsize / 2));
var cRight = (_local1._parent.cells[_local2][_local3].clip._x + (_local1._parent.cellsize / 2));
var cTop = (_local1._parent.cells[_local2][_local3].clip._y - (_local1._parent.cellsize / 2));
var cBottom = _local1._parent.cells[_local2][_local3].clip._y;
} else if (tile == 3) {
var cLeft = _local1._parent.cells[_local2][_local3].clip._x;
var cRight = (_local1._parent.cells[_local2][_local3].clip._x + (_local1._parent.cellsize / 2));
var cTop = (_local1._parent.cells[_local2][_local3].clip._y - (_local1._parent.cellsize / 2));
var cBottom = (_local1._parent.cells[_local2][_local3].clip._y + (_local1._parent.cellsize / 2));
} else if (tile == 4) {
var cLeft = (_local1._parent.cells[_local2][_local3].clip._x - (_local1._parent.cellsize / 2));
var cRight = (_local1._parent.cells[_local2][_local3].clip._x + (_local1._parent.cellsize / 2));
var cTop = _local1._parent.cells[_local2][_local3].clip._y;
var cBottom = (_local1._parent.cells[_local2][_local3].clip._y + (_local1._parent.cellsize / 2));
} else if (tile == 5) {
var cLeft = (_local1._parent.cells[_local2][_local3].clip._x - (_local1._parent.cellsize / 2));
var cRight = _local1._parent.cells[_local2][_local3].clip._x;
var cTop = (_local1._parent.cells[_local2][_local3].clip._y - (_local1._parent.cellsize / 2));
var cBottom = (_local1._parent.cells[_local2][_local3].clip._y + (_local1._parent.cellsize / 2));
}
if ((((bottom > cTop) && (top < cBottom)) && (left < cRight)) && (right > cLeft)) {
var projUp = ((cTop - (_local1._height / 2)) - _local1.futureY);
var projDown = ((cBottom + (_local1._height / 2)) - _local1.futureY);
var projLeft = ((cLeft - (_local1._width / 2)) - _local1.futureX);
var projRight = ((cRight + (_local1._width / 2)) - _local1.futureX);
if (Math.sqrt(projUp * projUp) < Math.sqrt(projDown * projDown)) {
var projY = projUp;
} else {
var projY = projDown;
}
if (Math.sqrt(projLeft * projLeft) < Math.sqrt(projRight * projRight)) {
var projX = projLeft;
} else {
var projX = projRight;
}
if (Math.sqrt(projX * projX) < Math.sqrt(projY * projY)) {
if ((_local1.gravType == 1) || (_local1.gravType == 3)) {
_local1.xStep = 0;
} else if ((_local1.gravType == 2) || (_local1.gravType == 4)) {
_local1.yStep = 0;
}
_local1.futureX = _local1.futureX + projX;
if ((projX == projRight) && (_local1.gravType == 2)) {
if (!_local1.onGround) {
_local1.onGround = true;
}
} else if ((projX == projLeft) && (_local1.gravType == 4)) {
if (!_local1.onGround) {
_local1.onGround = true;
}
}
} else {
if ((_local1.gravType == 1) || (_local1.gravType == 3)) {
_local1.yStep = 0;
} else if ((_local1.gravType == 2) || (_local1.gravType == 4)) {
_local1.xStep = 0;
}
_local1.futureY = _local1.futureY + projY;
if ((projY == projUp) && (_local1.gravType == 1)) {
if (!_local1.onGround) {
_local1.onGround = true;
}
} else if ((projY == projDown) && (_local1.gravType == 3)) {
if (!_local1.onGround) {
_local1.onGround = true;
}
}
}
}
}
}
var walkSpeed = 5;
var xStep = 0;
var yStep = 0;
var gravType = 1;
var onGround = false;
var targetRot = 0;
var walking = true;
}
Symbol 1231 MovieClip [__Packages.Player] Frame 0
class Player extends MovieClip
{
function Player () {
super();
}
function onLoad() {
var _local1 = this;
var _local2 = _root;
var _local3 = _local1._parent.spawnPoints[0][0].split(":");
_local1._x = _local3[0] * _local1._parent.cellsize;
_local1._y = _local3[1] * _local1._parent.cellsize;
_local1.futureX = _local1._x;
_local1.futureY = _local1._y;
_local1._parent.camFollow = true;
_local1.health = _local2.health;
_local1.xCell = Math.floor((_local1.futureX / _local1._parent.cellsize) + 0.5);
_local1.yCell = Math.floor((_local1.futureY / _local1._parent.cellsize) + 0.5);
if (_local1._parent.cells[_local1.xCell][_local1.yCell].gravType > 0) {
_local1.gravType = _local1._parent.cells[_local1.xCell][_local1.yCell].gravType;
_local1._rotation = 90 * (_local1.gravType - 1);
} else {
_local1.gravType = 1;
}
_local1.createEmptyMovieClip("sprite", 1);
_local1.sprite._y = _local1._parent.cellsize / 2;
_local1.playerStatus = "player_idle_1";
_local1.sprite.attachMovie(_local1.playerStatus, "sprite", 1);
_local1.sprite._xscale = -100;
if (_local2.currLvl == 103) {
_local1.walkSpeed = 12;
_local1.airMax = 12;
_local1.airAcc = 4;
_local1.dontmove = true;
_local2.attachMovie("CountDown", "countdown", 15);
}
_local2.jukebox.targetVol = _local2.musicVol;
}
function onEnterFrame() {
var _local1 = this;
var _local2 = _root;
var _local3 = _global;
_local2.health = _local1.health;
if ((_local2.currLvl == 103) && (_local2.jukebox.music.position > 7520)) {
_local1.dontmove = false;
}
if ((_local2.currLvl == 103) && ((_local1._parent.worldTimer > 1750) || (_local1._x > 14500))) {
_local1.dontmove = true;
_local2.endSuccess = false;
_local2.gotoAndPlay("cinematics");
(_local1.removeMovieClip());// not popped
}
if (_local1._parent.cells[_local1.xCell][_local1.yCell].triggerPoint) {
if ((_local1.yCell == 35) && ((_local1.xCell >= 28) && (_local1.xCell <= 30))) {
_local2.jukebox.playTrack("asylum_1");
} else if ((_local1.yCell == 33) && ((_local1.xCell >= 28) && (_local1.xCell <= 30))) {
_local2.jukebox.playTrack("asylum_3");
} else if (((_local1.yCell == 2) || (_local1.yCell == 3)) && (_local1.xCell == 30)) {
_local2.jukebox.playTrack("asylum_3");
} else if (((_local1.yCell == 2) || (_local1.yCell == 3)) && (_local1.xCell == 32)) {
_local2.jukebox.playTrack("asylum_1");
}
}
if ((_local1._parent.cells[_local1.xCell][_local1.yCell].clip == undefined) && (_local1.blinking < 20)) {
if (_local1.gravType == 1) {
if (_local1.xStep > 0) {
_local1._x = _local1._x - _local1._parent.cellsize;
} else {
_local1._x = _local1._x + _local1._parent.cellsize;
}
}
if (_local1.gravType == 2) {
if (_local1.xStep > 0) {
_local1._y = _local1._y - _local1._parent.cellsize;
} else {
_local1._y = _local1._y + _local1._parent.cellsize;
}
}
if (_local1.gravType == 3) {
if (_local1.xStep < 0) {
_local1._x = _local1._x - _local1._parent.cellsize;
} else {
_local1._x = _local1._x + _local1._parent.cellsize;
}
}
if (_local1.gravType == 4) {
if (_local1.xStep < 0) {
_local1._y = _local1._y - _local1._parent.cellsize;
} else {
_local1._y = _local1._y + _local1._parent.cellsize;
}
}
}
if (_local1.yStep != 0) {
_local1.onGround = false;
}
if (!_local1.hit) {
if ((_local3.ctrlStatus[_local3.ctrlUp] && (_local1.onGround)) && (!_local1.jumping)) {
_local1.yStep = -_local1.jumpHeight;
_local1.onGround = false;
_local1.jumping = true;
if (_local1.playerStatus != "player_jump_1") {
_local1.playerStatus = "player_jump_1";
_local1.sprite.attachMovie(_local1.playerStatus, "sprite", 1);
}
}
if ((!_local3.ctrlStatus[_local3.ctrlUp]) && (_local1.jumping)) {
_local1.jumping = false;
}
if (_local3.ctrlStatus[_local3.ctrlDown]) {
}
if (_local3.ctrlStatus[_local3.ctrlLeft]) {
if (_local1.onGround) {
if (_local2.currLvl == 103) {
if (_local1.playerStatus != "player_running_2") {
_local1.playerStatus = "player_running_2";
_local1.sprite.attachMovie(_local1.playerStatus, "sprite", 1);
}
} else if (_local1.playerStatus != "player_running_1") {
_local1.playerStatus = "player_running_1";
_local1.sprite.attachMovie(_local1.playerStatus, "sprite", 1);
}
_local1.sprite._xscale = 100;
_local1.xStep = -_local1.walkSpeed;
} else {
if ((_local1.playerStatus != "player_fall_1") && (_local1.yStep > 1)) {
_local1.playerStatus = "player_fall_1";
_local1.sprite.attachMovie(_local1.playerStatus, "sprite", 1);
}
_local1.sprite._xscale = 100;
if (_local1.xStep > (-_local1.airMax)) {
_local1.xStep = _local1.xStep - _local1.airAcc;
}
}
} else if (_local3.ctrlStatus[_local3.ctrlRight]) {
if (_local1.onGround) {
if (_local2.currLvl == 103) {
if (_local1.playerStatus != "player_running_2") {
_local1.playerStatus = "player_running_2";
_local1.sprite.attachMovie(_local1.playerStatus, "sprite", 1);
}
} else if (_local1.playerStatus != "player_running_1") {
_local1.playerStatus = "player_running_1";
_local1.sprite.attachMovie(_local1.playerStatus, "sprite", 1);
}
_local1.sprite._xscale = -100;
_local1.xStep = _local1.walkSpeed;
} else {
if ((_local1.playerStatus != "player_fall_1") && (_local1.yStep > 1)) {
_local1.playerStatus = "player_fall_1";
_local1.sprite.attachMovie(_local1.playerStatus, "sprite", 1);
}
_local1.sprite._xscale = -100;
if (_local1.xStep < _local1.airMax) {
_local1.xStep = _local1.xStep + _local1.airAcc;
}
}
} else {
if (_local1.onGround) {
_local1.xStep = 0;
} else {
_local1.xStep = _local1.xStep * 0.95;
}
if ((_local1.playerStatus != "player_idle_1") && (_local1.onGround)) {
_local1.playerStatus = "player_idle_1";
_local1.sprite.attachMovie(_local1.playerStatus, "sprite", 1);
} else if ((_local1.playerStatus != "player_fall_1") && (_local1.yStep > 0)) {
_local1.playerStatus = "player_fall_1";
_local1.sprite.attachMovie(_local1.playerStatus, "sprite", 1);
}
}
} else {
if (_local1.playerStatus != "player_hit_1") {
_local1.playerStatus = "player_hit_1";
_local1.sprite.attachMovie(_local1.playerStatus, "sprite", 1);
}
if (_local1.blinking <= 0) {
_local1.blinking = 60;
}
}
if (_local1.blinking > 0) {
if ((_local1.blinking % 2) == 0) {
_local1.sprite._alpha = 50;
} else {
_local1.sprite._alpha = 100;
}
_local1.blinking--;
}
if (_local1.dontmove) {
_local1.xStep = 0;
_local1.yStep = 0;
}
if (_local1.yStep < _local1._parent.maxspeed) {
_local1.yStep = _local1.yStep + _local1._parent.gravity;
}
if (_local1.shiftGrav != 0) {
_local1.oldGrav = _local1.gravType;
}
if (_local1.oldGrav != _local1.gravType) {
_local1.gravDelay = 15;
_local1.gravDiff = _local1.gravType - _local1.oldGrav;
if (_local1.gravDiff > 1) {
_local1.gravDiff = -1;
} else if (_local1.gravDiff < -1) {
_local1.gravDiff = 1;
}
}
if (_local1.gravDelay > 2) {
_local1.gravDelay = _local1.gravDelay * 0.85;
} else {
_local1.gravDelay = 0;
_local1.gravDiff = 0;
}
if (_local1.gravDiff > 0) {
if (_local1.gravDelay > 0) {
var iDistort = (_local1.gravDelay / 15);
var jDistort = ((15 - _local1.gravDelay) / 15);
var currXstep = ((_local1.yStep * iDistort) + (_local1.xStep * jDistort));
var currYStep = ((_local1.xStep * iDistort) + (_local1.yStep * jDistort));
}
} else if (_local1.gravDiff < 0) {
if (_local1.gravDelay > 0) {
var iDistort = (_local1.gravDelay / 15);
var jDistort = ((15 - _local1.gravDelay) / 15);
var currXstep = (((-_local1.yStep) * iDistort) + (_local1.xStep * jDistort));
var currYStep = ((_local1.xStep * iDistort) + (_local1.yStep * jDistort));
}
} else {
var currXstep = _local1.xStep;
var currYstep = _local1.yStep;
}
_local1.oldGrav = _local1.gravType;
if (_local1.gravType == 1) {
_local1.futureY = _local1._y + currYstep;
_local1.futureX = _local1._x + currXstep;
_local1.targetRot = 0;
_local1.pHeight = 48;
_local1.pWidth = 26;
} else if (_local1.gravType == 2) {
_local1.futureY = _local1._y + currXstep;
_local1.futureX = _local1._x - currYstep;
_local1.targetRot = 90;
_local1.pHeight = 26;
_local1.pWidth = 48;
} else if (_local1.gravType == 3) {
_local1.futureY = _local1._y - currYstep;
_local1.futureX = _local1._x - currXstep;
if (_local1._rotation <= -90) {
_local1.targetRot = -180;
} else {
_local1.targetRot = 180;
}
_local1.pHeight = 48;
_local1.pWidth = 26;
} else if (_local1.gravType == 4) {
_local1.futureY = _local1._y - currXstep;
_local1.futureX = _local1._x + currYstep;
if (_local1._rotation >= 180) {
_local1.targetRot = 270;
} else {
_local1.targetRot = -90;
}
_local1.pHeight = 26;
_local1.pWidth = 48;
}
if (((_local1.targetRot - _local1._rotation) * (_local1.targetRot - _local1._rotation)) > 5) {
_local1._rotation = _local1._rotation + ((_local1.targetRot - _local1._rotation) / 2);
} else {
_local1._rotation = _local1.targetRot;
if (_local1._rotation == -180) {
_local1._rotation = 180;
}
if (_local1._rotation == 270) {
_local1._rotation = -90;
}
}
_local1.xCell = Math.floor((_local1.futureX / _local1._parent.cellsize) + 0.5);
_local1.yCell = Math.floor((_local1.futureY / _local1._parent.cellsize) + 0.5);
if ((_local1._parent.cells[_local1.xCell][_local1.yCell].gravType != 0) && (_local1._parent.cells[_local1.xCell][_local1.yCell].gravType != undefined)) {
if (_local1._parent.cells[_local1.xCell][_local1.yCell].gravType <= 4) {
_local1.gravType = _local1._parent.cells[_local1.xCell][_local1.yCell].gravType;
_local1.shiftGrav = 0;
} else if (_local1.shiftGrav != (_local1._parent.cells[_local1.xCell][_local1.yCell].gravType - 4)) {
_local1.shiftGrav = _local1._parent.cells[_local1.xCell][_local1.yCell].gravType - 4;
if (_local1.shiftGrav == _local1.gravType) {
if (_local1.gravType < 4) {
_local1.gravType++;
} else {
_local1.gravType = 1;
}
} else if (_local1.gravType > 1) {
_local1.gravType--;
} else {
_local1.gravType = 4;
}
}
}
_local1.rawHitTest();
_local1._y = _local1.futureY;
_local1._x = _local1.futureX;
_local1.xCell = Math.floor((_local1._x / _local1._parent.cellsize) + 0.5);
_local1.yCell = Math.floor((_local1._y / _local1._parent.cellsize) + 0.5);
if (_local1._parent.cells[_local1.xCell][_local1.yCell].kill) {
_local1.health = _local1.health - 500;
if (_local1.health < 0) {
_local1.health = 0;
}
}
if (_local1._parent.cells[_local1.xCell][_local1.yCell].checkpoint) {
_local1._parent.spawnPoints[0][0] = (_local1.xCell + ":") + _local1.yCell;
}
if (_local1._parent.cells[_local1.xCell][_local1.yCell].exit) {
_local2.health = _local1.health;
_local2.gotoAndPlay("cinematics");
(_local1.removeMovieClip());// not popped
}
if ((_local1.health <= 0) && (_local1._parent.reSpawnCounter == 0)) {
_local1._parent.camFollow = false;
_local2.jukebox.targetVol = 0;
if (!_local1.hit) {
_local1._parent.reSpawnCounter = 30;
} else {
_local1._parent.reSpawnCounter = 60;
}
}
if (_local1._parent.reSpawnCounter == 15) {
_local2.lifes--;
if (_local2.lifes < 0) {
_local2.gotoAndPlay("cinematics");
}
(_local1.removeMovieClip());// not popped
}
}
function rawHitTest() {
var _local1 = this;
var _local3 = -1;
while (_local3 <= 1) {
var _local2 = -1;
while (_local2 <= 1) {
if ((_local1.xCell != 0) && (_local1.yCell != 0)) {
_local1.detailHitTest(_local1.xCell + _local3, _local1.yCell + _local2);
} else if (((_local1.xCell == 0) && (_local1.yCell != 0)) && (_local3 >= 0)) {
_local1.detailHitTest(_local1.xCell + _local3, _local1.yCell + _local2);
} else if (((_local1.xCell != 0) && (_local1.yCell == 0)) && (_local2 >= 0)) {
_local1.detailHitTest(_local1.xCell + _local3, _local1.yCell + _local2);
} else if ((_local3 >= 0) && (_local2 >= 0)) {
_local1.detailHitTest(_local1.xCell + _local3, _local1.yCell + _local2);
}
_local2++;
}
_local3++;
}
}
function detailHitTest(tmpX, tmpY) {
var _local1 = this;
var _local2 = tmpX;
var _local3 = tmpY;
var tile = _local1._parent.cells[_local2][_local3].tile;
if ((tile >= 1) && (tile <= 5)) {
var left = (_local1.futureX - (_local1.pWidth / 2));
var right = (_local1.futureX + (_local1.pWidth / 2));
var top = (_local1.futureY - (_local1.pHeight / 2));
var bottom = (_local1.futureY + (_local1.pHeight / 2));
if (tile == 1) {
var cLeft = (_local1._parent.cells[_local2][_local3].clip._x - (_local1._parent.cellsize / 2));
var cRight = (_local1._parent.cells[_local2][_local3].clip._x + (_local1._parent.cellsize / 2));
var cTop = (_local1._parent.cells[_local2][_local3].clip._y - (_local1._parent.cellsize / 2));
var cBottom = (_local1._parent.cells[_local2][_local3].clip._y + (_local1._parent.cellsize / 2));
} else if (tile == 2) {
var cLeft = (_local1._parent.cells[_local2][_local3].clip._x - (_local1._parent.cellsize / 2));
var cRight = (_local1._parent.cells[_local2][_local3].clip._x + (_local1._parent.cellsize / 2));
var cTop = (_local1._parent.cells[_local2][_local3].clip._y - (_local1._parent.cellsize / 2));
var cBottom = _local1._parent.cells[_local2][_local3].clip._y;
} else if (tile == 3) {
var cLeft = _local1._parent.cells[_local2][_local3].clip._x;
var cRight = (_local1._parent.cells[_local2][_local3].clip._x + (_local1._parent.cellsize / 2));
var cTop = (_local1._parent.cells[_local2][_local3].clip._y - (_local1._parent.cellsize / 2));
var cBottom = (_local1._parent.cells[_local2][_local3].clip._y + (_local1._parent.cellsize / 2));
} else if (tile == 4) {
var cLeft = (_local1._parent.cells[_local2][_local3].clip._x - (_local1._parent.cellsize / 2));
var cRight = (_local1._parent.cells[_local2][_local3].clip._x + (_local1._parent.cellsize / 2));
var cTop = _local1._parent.cells[_local2][_local3].clip._y;
var cBottom = (_local1._parent.cells[_local2][_local3].clip._y + (_local1._parent.cellsize / 2));
} else if (tile == 5) {
var cLeft = (_local1._parent.cells[_local2][_local3].clip._x - (_local1._parent.cellsize / 2));
var cRight = _local1._parent.cells[_local2][_local3].clip._x;
var cTop = (_local1._parent.cells[_local2][_local3].clip._y - (_local1._parent.cellsize / 2));
var cBottom = (_local1._parent.cells[_local2][_local3].clip._y + (_local1._parent.cellsize / 2));
}
if ((((bottom > cTop) && (top < cBottom)) && (left < cRight)) && (right > cLeft)) {
var projUp = ((cTop - (_local1.pHeight / 2)) - _local1.futureY);
var projDown = ((cBottom + (_local1.pHeight / 2)) - _local1.futureY);
var projLeft = ((cLeft - (_local1.pWidth / 2)) - _local1.futureX);
var projRight = ((cRight + (_local1.pWidth / 2)) - _local1.futureX);
if (Math.sqrt(projUp * projUp) < Math.sqrt(projDown * projDown)) {
var projY = projUp;
} else {
var projY = projDown;
}
if (Math.sqrt(projLeft * projLeft) < Math.sqrt(projRight * projRight)) {
var projX = projLeft;
} else {
var projX = projRight;
}
if (Math.sqrt(projX * projX) < Math.sqrt(projY * projY)) {
if ((_local1.gravType == 1) || (_local1.gravType == 3)) {
_local1.xStep = 0;
} else if ((_local1.gravType == 2) || (_local1.gravType == 4)) {
_local1.yStep = 0;
}
_local1.futureX = _local1.futureX + projX;
if ((projX == projRight) && (_local1.gravType == 2)) {
if (!_local1.onGround) {
_local1.onGround = true;
}
} else if ((projX == projLeft) && (_local1.gravType == 4)) {
if (!_local1.onGround) {
_local1.onGround = true;
}
}
} else {
if ((_local1.gravType == 1) || (_local1.gravType == 3)) {
_local1.yStep = 0;
} else if ((_local1.gravType == 2) || (_local1.gravType == 4)) {
_local1.xStep = 0;
}
_local1.futureY = _local1.futureY + projY;
if ((projY == projUp) && (_local1.gravType == 1)) {
if (!_local1.onGround) {
_local1.onGround = true;
}
} else if ((projY == projDown) && (_local1.gravType == 3)) {
if (!_local1.onGround) {
_local1.onGround = true;
}
}
}
}
}
}
var jumpHeight = 13;
var walkSpeed = 7.5;
var airAcc = 2;
var airMax = 7.5;
var pHeight = 48;
var pWidth = 26;
var xStep = 0;
var yStep = 0;
var gravType = 1;
var onGround = false;
var hit = false;
var blinking = 0;
var jumping = false;
var gravDelay = 0;
var oldGrav = 1;
var gravDiff = 0;
var dontmove = false;
}
Symbol 1232 MovieClip [__Packages.TraceCell] Frame 0
class TraceCell extends MovieClip
{
function TraceCell () {
super();
}
function onLoad() {
var _local1 = this;
var tmpArr = _local1._name.split("_");
var _local3 = Number(tmpArr[1]);
var _local2 = Number(tmpArr[2]);
_local1._x = _local3 * _local1._parent.cellsize;
_local1._y = _local2 * _local1._parent.cellsize;
_local1._parent.cells[_local3][_local2].clip = _local1;
_local1.attachMovie("TraceTile" + _local1._parent.cells[_local3][_local2].tile, "tile", 1);
}
}
Symbol 1233 MovieClip [__Packages.Cell] Frame 0
class Cell extends MovieClip
{
function Cell () {
super();
}
function onLoad() {
var _local1 = this;
var tmpArr = _local1._name.split("_");
var _local3 = Number(tmpArr[1]);
var _local2 = Number(tmpArr[2]);
_local1._x = _local3 * _local1._parent.cellsize;
_local1._y = _local2 * _local1._parent.cellsize;
_local1._parent.cells[_local3][_local2].clip = _local1;
var grav = new MovieClip();
_local1.attachMovie("Tile" + _local1._parent.cells[_local3][_local2].tile, "tile", 1);
if (!_local1._parent.tilesVisible) {
_local1._visible = false;
}
}
}
Symbol 1234 MovieClip [__Packages.TraceWorld] Frame 0
class TraceWorld extends MovieClip
{
function TraceWorld () {
super();
}
function onLoad() {
var _local1 = this;
_local1.gravity = 1;
_local1.maxspeed = 20;
_local1.xsize = 60;
_local1.ysize = 60;
_local1.cellsize = 50;
_local1.camFollow = true;
_local1.numEnemyTypes = 5;
_local1.numItemTypes = 3;
_local1.cells = new Array();
_local1.i = 0;
while (_local1.i < _local1.xsize) {
_local1.cells[_local1.i] = new Array();
_local1.j = 0;
while (_local1.j < _local1.ysize) {
_local1.cells[_local1.i][_local1.j] = new Object();
_local1.cells[_local1.i][_local1.j].tile = 0;
_local1.cells[_local1.i][_local1.j].edges = new Array();
_local1.j++;
}
_local1.i++;
}
}
function buildLevel(mapString) {
var _local1 = this;
var _local2 = mapString;
_local2 = Map.decode(_local2);
_local1.mapArray = new Array();
_local1.mapArray = _local2.split(":");
_local1.mapArray2 = _local1.mapArray[0].split("|");
_local1.spawnPoints = new Array();
_local1.itemPoints = new Array();
_local1.i = 0;
while (_local1.i < 30) {
_local1.spawnPoints[_local1.i] = new Array();
_local1.i++;
}
_local1.i = 0;
while (_local1.i < 20) {
_local1.itemPoints[_local1.i] = new Array();
_local1.i++;
}
_local1.xsize = Number(_local1.mapArray2[0]);
_local1.ysize = Number(_local1.mapArray2[1]);
_local1.depth = 1000;
_local1.j = 0;
while (_local1.j < _local1.ysize) {
_local1.i = 0;
while (_local1.i < _local1.xsize) {
_local1.currPos = (_local1.i + (_local1.j * _local1.xsize)) * 3;
_local1.gravType = Number(_local1.mapArray[1].substr(_local1.currPos, 1));
_local1.tileType = Number(_local1.mapArray[1].substr(_local1.currPos + 1, 2));
if ((_local1.tileType >= 50) && (_local1.tileType < 80)) {
_local1.tileType = 0;
} else if (_local1.tileType >= 80) {
_local1.tileType = 0;
}
_local1.cells[_local1.i][_local1.j].tile = _local1.tileType;
_local1.cells[_local1.i][_local1.j].clip = new MovieClip();
_local1.attachMovie("TraceCell", (("cell_" + _local1.i) + "_") + _local1.j, _local1.depth);
_local1.depth++;
_local1.i++;
}
_local1.j++;
}
}
var tilesVisible = true;
}
Symbol 1235 MovieClip [__Packages.Map] Frame 0
class Map
{
function Map () {
}
static function encode(str) {
var str2encode = str;
var splitStr = str2encode.split(":");
splitStr[1] = RLE.encode(splitStr[1]);
var _local3 = splitStr[1].split(".");
var _local2 = "";
var _local1 = 0;
while (_local1 < _local3.length) {
if (_local1 > 0) {
_local2 = (_local2 + ".") + NumTrans.encode(_local3[_local1]);
} else {
_local2 = _local2 + NumTrans.encode(_local3[_local1]);
}
_local1++;
}
return((splitStr[0] + ":") + _local2);
}
static function decode(str) {
var str2decode = str;
var splitStr = str2decode.split(":");
var _local3 = splitStr[1].split(".");
var _local2 = "";
var _local1 = 0;
while (_local1 < _local3.length) {
if (_local1 > 0) {
_local2 = (_local2 + ".") + NumTrans.decode(_local3[_local1]);
} else {
_local2 = _local2 + NumTrans.decode(_local3[_local1]);
}
_local1++;
}
splitStr[1] = RLE.decode(_local2);
return((splitStr[0] + ":") + splitStr[1]);
}
}
Symbol 1236 MovieClip [__Packages.RLE] Frame 0
class RLE
{
function RLE () {
}
static function encode(str) {
var str2encode = str;
var _local2 = str2encode.split("");
var _local3 = "";
var counter = 1;
var res = "";
var _local1 = 0;
while (_local1 < _local2.length) {
if (_local2[_local1] == _local3) {
counter++;
_local3 = _local2[_local1];
if (_local1 == (_local2.length - 1)) {
res = ((res + counter) + ".") + _local3;
}
} else if (_local3 != "") {
res = ((res + counter) + ".") + _local3;
_local3 = _local2[_local1];
counter = 1;
if (_local1 == (_local2.length - 1)) {
res = ((res + counter) + ".") + _local2[_local1];
}
} else {
_local3 = _local2[_local1];
}
_local1++;
}
return(res);
}
static function decode(str) {
var str2decode = str;
var _local2 = str2decode.split(".");
var res = "";
var _local1 = 0;
while (_local1 < (_local2.length - 1)) {
_local2[_local1] = (_local2[_local1] + ".") + _local2[_local1 + 1].substr(0, 1);
if (_local1 > 0) {
_local2[_local1] = _local2[_local1].substr(1, _local2[_local1].length - 1);
}
_local2[_local1] = _local2[_local1].split(".");
var _local3 = 0;
while (_local3 < Number(_local2[_local1][0])) {
res = res + _local2[_local1][1];
_local3++;
}
_local1++;
}
return(res);
}
}
Symbol 1237 MovieClip [__Packages.NumTrans] Frame 0
class NumTrans
{
function NumTrans () {
}
static function encode(str) {
var str2encode = str;
var prev = "";
var leadingZeros = 0;
while (str2encode.charCodeAt(0) == 48) {
str2encode = str2encode.substr(1, str.length - 1);
leadingZeros++;
}
var _local1 = new Array();
var i = 48;
while (i < 58) {
_local1.push(String.fromCharCode(i));
i++;
}
var i = 65;
while (i < 91) {
_local1.push(String.fromCharCode(i));
i++;
}
var i = 97;
while (i < 123) {
_local1.push(String.fromCharCode(i));
i++;
}
var _local3 = Number(str2encode);
var _local2 = "";
var modulo = 0;
var timeOut = 0;
while ((_local3 > 0) && (timeOut < 20)) {
modulo = _local3 % _local1.length;
_local2 = _local1[modulo] + _local2;
_local3 = _local3 - modulo;
_local3 = _local3 / _local1.length;
timeOut++;
}
var i = 0;
while (i < leadingZeros) {
_local2 = "0" + _local2;
i++;
}
return(_local2);
}
static function decode(str) {
var str2decode = str;
var _local1 = 0;
var _local2 = new Array();
var _local3 = 48;
while (_local3 < 58) {
_local2[_local3] = _local1;
_local1++;
_local3++;
}
_local3 = 65;
while (_local3 < 91) {
_local2[_local3] = _local1;
_local1++;
_local3++;
}
_local3 = 97;
while (_local3 < 123) {
_local2[_local3] = _local1;
_local1++;
_local3++;
}
var leadingZeros = 0;
while (str2decode.charCodeAt(0) == 48) {
str2decode = str2decode.substr(1, str.length - 1);
leadingZeros++;
}
var splitStr = str2decode.split("");
var sum = 0;
var exp = 1;
_local3 = splitStr.length - 1;
while (_local3 >= 0) {
sum = sum + (Number(_local2[splitStr[_local3].charCodeAt(0)]) * exp);
exp = exp * 62;
_local3--;
}
var res = sum.toString();
_local3 = 0;
while (_local3 < leadingZeros) {
res = "0" + res;
_local3++;
}
return(res);
}
}
Symbol 1238 MovieClip [__Packages.World] Frame 0
class World extends MovieClip
{
function World () {
super();
}
function onLoad() {
}
function hideTiles() {
tilesVisible = false;
}
function buildLevel(mapString) {
var _local1 = this;
_root.itemsTotal[_root.currLvl - 1] = 0;
var mapString = Map.decode(mapString);
var mapArray = mapString.split(":");
var mapArray2 = mapArray[0].split("|");
_local1.spawnPoints = new Array();
_local1.itemPoints = new Array();
var _local2 = 0;
while (_local2 < 30) {
_local1.spawnPoints[_local2] = new Array();
_local2++;
}
_local2 = 0;
while (_local2 < 20) {
_local1.itemPoints[_local2] = new Array();
_local2++;
}
_local1.xsize = Number(mapArray2[0]);
_local1.ysize = Number(mapArray2[1]);
_local1.cells = new Array();
_local2 = 0;
while (_local2 < _local1.xsize) {
_local1.cells[_local2] = new Array();
var _local3 = 0;
while (_local3 < _local1.ysize) {
_local1.cells[_local2][_local3] = new Object();
_local1.cells[_local2][_local3].tile = 0;
_local1.cells[_local2][_local3].edges = new Array();
_local3++;
}
_local2++;
}
var depth = 100;
var currPos = 0;
var gravType = 0;
var tileType = 0;
var _local3 = 0;
while (_local3 < _local1.ysize) {
_local2 = 0;
while (_local2 < _local1.xsize) {
currPos = (_local2 + (_local3 * _local1.xsize)) * 3;
gravType = Number(mapArray[1].substr(currPos, 1));
tileType = Number(mapArray[1].substr(currPos + 1, 2));
if ((tileType >= 50) && (tileType < 80)) {
if (tileType == 50) {
_local1.spawnPoints[0][0] = (_local2 + ":") + _local3;
} else {
_local1.spawnPoints[tileType - 50][_local1.spawnPoints[tileType - 50].length] = (_local2 + ":") + _local3;
}
_local1.cells[_local2][_local3].spawn = tileType - 50;
_local1.cells[_local2][_local3].spawnId = _local1.spawnPoints[tileType - 50].length - 1;
_local1.cells[_local2][_local3].spawnAlive = true;
tileType = 0;
} else if (tileType >= 80) {
_local1.itemPoints[tileType - 80][_local1.itemPoints[tileType - 80].length] = (_local2 + ":") + _local3;
_local1.cells[_local2][_local3].item = tileType - 80;
_local1.cells[_local2][_local3].itemId = _local1.itemPoints[tileType - 80].length - 1;
_local1.cells[_local2][_local3].itemAlive = true;
if (((tileType - 80) > 0) && ((tileType - 80) <= 3)) {
_root.itemsTotal[_root.currLvl - 1]++;
}
tileType = 0;
}
if (tileType == 6) {
_local1.cells[_local2][_local3].kill = true;
tileType = 0;
}
if (tileType == 7) {
_local1.cells[_local2][_local3].checkpoint = true;
tileType = 0;
}
if (tileType == 8) {
_local1.cells[_local2][_local3].exit = true;
tileType = 0;
}
if (tileType == 9) {
_local1.cells[_local2][_local3].triggerpoint = true;
tileType = 0;
}
_local1.cells[_local2][_local3].depth = depth;
_local1.cells[_local2][_local3].tile = tileType;
_local1.cells[_local2][_local3].gravType = gravType;
_local1.cells[_local2][_local3].clip = undefined;
depth++;
_local2++;
}
_local3++;
}
_local3 = 0;
while (_local3 < _local1.ysize) {
_local2 = 0;
while (_local2 < _local1.xsize) {
if (_local1.cells[_local2][_local3].tile == 0) {
_local1.cells[_local2][_local3].edges[0] = 0;
_local1.cells[_local2][_local3].edges[1] = 0;
_local1.cells[_local2][_local3].edges[2] = 0;
_local1.cells[_local2][_local3].edges[3] = 0;
} else if (_local1.cells[_local2][_local3].tile == 1) {
if ((((_local1.cells[_local2][_local3 - 1].tile == 0) || (_local1.cells[_local2][_local3 - 1].tile == 3)) || (_local1.cells[_local2][_local3 - 1].tile == 5)) || (_local1.cells[_local2][_local3 - 1].tile == 2)) {
_local1.cells[_local2][_local3].edges[0] = 1;
} else {
_local1.cells[_local2][_local3].edges[0] = 0;
}
if ((((_local1.cells[_local2 + 1][_local3].tile == 0) || (_local1.cells[_local2 + 1][_local3].tile == 2)) || (_local1.cells[_local2 + 1][_local3].tile == 3)) || (_local1.cells[_local2 + 1][_local3].tile == 4)) {
_local1.cells[_local2][_local3].edges[1] = 1;
} else {
_local1.cells[_local2][_local3].edges[1] = 0;
}
if ((((_local1.cells[_local2][_local3 + 1].tile == 0) || (_local1.cells[_local2][_local3 + 1].tile == 3)) || (_local1.cells[_local2][_local3 + 1].tile == 4)) || (_local1.cells[_local2][_local3 + 1].tile == 5)) {
_local1.cells[_local2][_local3].edges[2] = 1;
} else {
_local1.cells[_local2][_local3].edges[2] = 0;
}
if ((((_local1.cells[_local2 - 1][_local3].tile == 0) || (_local1.cells[_local2 - 1][_local3].tile == 2)) || (_local1.cells[_local2 - 1][_local3].tile == 4)) || (_local1.cells[_local2 - 1][_local3].tile == 5)) {
_local1.cells[_local2][_local3].edges[3] = 1;
} else {
_local1.cells[_local2][_local3].edges[3] = 0;
}
} else if (_local1.cells[_local2][_local3].tile == 2) {
if ((((_local1.cells[_local2][_local3 - 1].tile == 0) || (_local1.cells[_local2][_local3 - 1].tile == 2)) || (_local1.cells[_local2][_local3 - 1].tile == 3)) || (_local1.cells[_local2][_local3 - 1].tile == 5)) {
_local1.cells[_local2][_local3].edges[0] = 1;
} else {
_local1.cells[_local2][_local3].edges[0] = 0;
}
if (((_local1.cells[_local2 + 1][_local3].tile == 0) || (_local1.cells[_local2 + 1][_local3].tile == 3)) || (_local1.cells[_local2 + 1][_local3].tile == 4)) {
_local1.cells[_local2][_local3].edges[1] = 1;
} else {
_local1.cells[_local2][_local3].edges[1] = 0;
}
if (((((_local1.cells[_local2][_local3 + 1].tile == 0) || (_local1.cells[_local2][_local3 + 1].tile == 2)) || (_local1.cells[_local2][_local3 + 1].tile == 3)) || (_local1.cells[_local2][_local3 + 1].tile == 4)) || (_local1.cells[_local2][_local3 + 1].tile == 5)) {
_local1.cells[_local2][_local3].edges[2] = 1;
} else {
_local1.cells[_local2][_local3].edges[2] = 0;
}
if (((_local1.cells[_local2 - 1][_local3].tile == 0) || (_local1.cells[_local2 - 1][_local3].tile == 5)) || (_local1.cells[_local2 - 1][_local3].tile == 4)) {
_local1.cells[_local2][_local3].edges[3] = 1;
} else {
_local1.cells[_local2][_local3].edges[3] = 0;
}
} else if (_local1.cells[_local2][_local3].tile == 3) {
if (((_local1.cells[_local2][_local3 - 1].tile == 0) || (_local1.cells[_local2][_local3 - 1].tile == 2)) || (_local1.cells[_local2][_local3 - 1].tile == 5)) {
_local1.cells[_local2][_local3].edges[0] = 1;
} else {
_local1.cells[_local2][_local3].edges[0] = 0;
}
if ((((_local1.cells[_local2 + 1][_local3].tile == 0) || (_local1.cells[_local2 + 1][_local3].tile == 2)) || (_local1.cells[_local2 + 1][_local3].tile == 3)) || (_local1.cells[_local2 + 1][_local3].tile == 4)) {
_local1.cells[_local2][_local3].edges[1] = 1;
} else {
_local1.cells[_local2][_local3].edges[1] = 0;
}
if (((_local1.cells[_local2][_local3 + 1].tile == 0) || (_local1.cells[_local2][_local3 + 1].tile == 5)) || (_local1.cells[_local2][_local3 + 1].tile == 4)) {
_local1.cells[_local2][_local3].edges[2] = 1;
} else {
_local1.cells[_local2][_local3].edges[2] = 0;
}
if (((((_local1.cells[_local2 - 1][_local3].tile == 0) || (_local1.cells[_local2 - 1][_local3].tile == 2)) || (_local1.cells[_local2 - 1][_local3].tile == 3)) || (_local1.cells[_local2 - 1][_local3].tile == 4)) || (_local1.cells[_local2 - 1][_local3].tile == 5)) {
_local1.cells[_local2][_local3].edges[3] = 1;
} else {
_local1.cells[_local2][_local3].edges[3] = 0;
}
} else if (_local1.cells[_local2][_local3].tile == 4) {
if (((((_local1.cells[_local2][_local3 - 1].tile == 0) || (_local1.cells[_local2][_local3 - 1].tile == 2)) || (_local1.cells[_local2][_local3 - 1].tile == 3)) || (_local1.cells[_local2][_local3 - 1].tile == 4)) || (_local1.cells[_local2][_local3 - 1].tile == 5)) {
_local1.cells[_local2][_local3].edges[0] = 1;
} else {
_local1.cells[_local2][_local3].edges[0] = 0;
}
if (((_local1.cells[_local2 + 1][_local3].tile == 0) || (_local1.cells[_local2 + 1][_local3].tile == 3)) || (_local1.cells[_local2 + 1][_local3].tile == 2)) {
_local1.cells[_local2][_local3].edges[1] = 1;
} else {
_local1.cells[_local2][_local3].edges[1] = 0;
}
if ((((_local1.cells[_local2][_local3 + 1].tile == 0) || (_local1.cells[_local2][_local3 + 1].tile == 3)) || (_local1.cells[_local2][_local3 + 1].tile == 4)) || (_local1.cells[_local2][_local3 + 1].tile == 5)) {
_local1.cells[_local2][_local3].edges[2] = 1;
} else {
_local1.cells[_local2][_local3].edges[2] = 0;
}
if (((_local1.cells[_local2 - 1][_local3].tile == 0) || (_local1.cells[_local2 - 1][_local3].tile == 5)) || (_local1.cells[_local2 - 1][_local3].tile == 2)) {
_local1.cells[_local2][_local3].edges[3] = 1;
} else {
_local1.cells[_local2][_local3].edges[3] = 0;
}
} else if (_local1.cells[_local2][_local3].tile == 5) {
if (((_local1.cells[_local2][_local3 - 1].tile == 0) || (_local1.cells[_local2][_local3 - 1].tile == 2)) || (_local1.cells[_local2][_local3 - 1].tile == 3)) {
_local1.cells[_local2][_local3].edges[0] = 1;
} else {
_local1.cells[_local2][_local3].edges[0] = 0;
}
if (((((_local1.cells[_local2 + 1][_local3].tile == 0) || (_local1.cells[_local2 + 1][_local3].tile == 2)) || (_local1.cells[_local2 + 1][_local3].tile == 3)) || (_local1.cells[_local2 + 1][_local3].tile == 4)) || (_local1.cells[_local2 + 1][_local3].tile == 5)) {
_local1.cells[_local2][_local3].edges[1] = 1;
} else {
_local1.cells[_local2][_local3].edges[1] = 0;
}
if (((_local1.cells[_local2][_local3 + 1].tile == 0) || (_local1.cells[_local2][_local3 + 1].tile == 3)) || (_local1.cells[_local2][_local3 + 1].tile == 4)) {
_local1.cells[_local2][_local3].edges[2] = 1;
} else {
_local1.cells[_local2][_local3].edges[2] = 0;
}
if ((((_local1.cells[_local2 - 1][_local3].tile == 0) || (_local1.cells[_local2 - 1][_local3].tile == 2)) || (_local1.cells[_local2 - 1][_local3].tile == 4)) || (_local1.cells[_local2 - 1][_local3].tile == 5)) {
_local1.cells[_local2][_local3].edges[3] = 1;
} else {
_local1.cells[_local2][_local3].edges[3] = 0;
}
}
_local2++;
}
_local3++;
}
var tmpArr = _local1.spawnPoints[0][0].split(":");
_local1._x = Math.round(((-tmpArr[0]) * _local1.cellsize) * 10) / 10;
_local1._y = Math.round(((-tmpArr[1]) * _local1.cellsize) * 10) / 10;
}
function startGame() {
var _local1 = this;
if (_root.currLvl == 4) {
_root.itemsTotalLvl[0] = ((Number(_root.itemsTotal[0]) + Number(_root.itemsTotal[1])) + Number(_root.itemsTotal[2])) + Number(_root.itemsTotal[3]);
} else if (_root.currLvl == 8) {
_root.itemsTotalLvl[1] = ((Number(_root.itemsTotal[4]) + Number(_root.itemsTotal[5])) + Number(_root.itemsTotal[6])) + Number(_root.itemsTotal[7]);
} else if (_root.currLvl == 12) {
_root.itemsTotalLvl[2] = ((Number(_root.itemsTotal[8]) + Number(_root.itemsTotal[9])) + Number(_root.itemsTotal[10])) + Number(_root.itemsTotal[11]);
}
var tmpArr = _local1.spawnPoints[0][0].split(":");
_local1.currX = Number(tmpArr[0]);
_local1.currY = Number(tmpArr[1]);
var windowSize = 8;
var _local2 = _local1.currX - windowSize;
while (_local2 < (_local1.currX + windowSize)) {
var _local3 = _local1.currY - windowSize;
while (_local3 < (_local1.currY + windowSize)) {
if (_local1.cells[_local2][_local3].clip == undefined) {
_local1.cells[_local2][_local3].clip = new MovieClip();
_local1.attachMovie("Cell", (("Cell_" + _local2) + "_") + _local3, _local1.cells[_local2][_local3].depth);
}
_local3++;
}
_local2++;
}
_local1.oldX = _local1.currX;
_local1.oldY = _local1.currY;
_local1.attachMovie("Player", "player", 9900);
var _local3 = 1;
while (_local3 <= _local1.numEnemyTypes) {
_local2 = 0;
while (_local2 < _local1.spawnPoints[_local3].length) {
_local1.attachMovie("Enemy" + _local3, (("enemy" + _local3) + "_") + _local2, (6000 + (_local3 * 50)) + _local2);
_local2++;
}
_local3++;
}
_local3 = 0;
while (_local3 < _local1.numItemTypes) {
_local2 = 0;
while (_local2 < _local1.itemPoints[_local3].length) {
_local1.attachMovie("Item" + _local3, (("item" + _local3) + "_") + _local2, (7500 + (_local3 * 50)) + _local2, {id:_local2});
_local2++;
}
_local3++;
}
}
function onEnterFrame() {
var _local1 = this;
if (_root.currLvl == 101) {
if (_local1.triggerStatus == 0) {
var r = Math.floor(random(5));
if (r != _local1.triggerMemory) {
_local1.triggerStatus = r + 1;
_local1.triggerMemory = r;
}
}
}
if (_root.currLvl == 102) {
if (((_local1.triggers[0].pushed && (_local1.triggers[2].pushed)) && (_local1.triggers[3].pushed)) && (_local1.triggers[6].pushed)) {
_local1.triggerPile[0] = true;
}
if (((_local1.triggers[1].pushed && (_local1.triggers[4].pushed)) && (_local1.triggers[5].pushed)) && (_local1.triggers[7].pushed)) {
_local1.triggerPile[1] = true;
}
if (((_local1.triggers[9].pushed && (_local1.triggers[12].pushed)) && (_local1.triggers[13].pushed)) && (_local1.triggers[15].pushed)) {
_local1.triggerPile[2] = true;
}
if (((_local1.triggers[8].pushed && (_local1.triggers[10].pushed)) && (_local1.triggers[11].pushed)) && (_local1.triggers[14].pushed)) {
_local1.triggerPile[3] = true;
}
var _local2 = 0;
var _local3 = 0;
while (_local3 < 4) {
if (_local1.triggerPile[_local3]) {
_local2++;
}
_local3++;
}
if (_local2 >= 4) {
_root.gotoAndPlay("cinematics");
(_local1.removeMovieClip());// not popped
(_local1.removeMovieClip());// not popped
}
}
if (_root.currLvl == 103) {
_local1.worldTimer++;
}
if (_local1.combatStatus <= 0) {
_root.gotoAndPlay("cinematics");
(_local1.removeMovieClip());// not popped
(_local1.removeMovieClip());// not popped
}
if (_local1.camFollow) {
if (_local1.player.targetRot == 0) {
_local1.targetRot = 0;
} else if (_local1.player.targetRot == 90) {
if (_local1._parent._rotation >= 180) {
_local1.targetRot = 270;
} else {
_local1.targetRot = -90;
}
} else if (_local1.player.targetRot == 180) {
if (_local1._parent._rotation <= -90) {
_local1.targetRot = -180;
} else {
_local1.targetRot = 180;
}
} else if (_local1.player.targetRot == -90) {
_local1.targetRot = 90;
}
_local1.targetX = Math.round((-_local1.player._x) * 10) / 10;
_local1.targetY = Math.round((-_local1.player._y) * 10) / 10;
var xDist = (_local1.targetX - _local1._x);
var yDist = (_local1.targetY - _local1._y);
if ((xDist * xDist) > 0.5) {
_local1._x = _local1._x + (xDist / 3);
} else {
_local1._x = _local1.targetX;
}
if ((yDist * yDist) > 0.5) {
_local1._y = _local1._y + (yDist / 3);
} else {
_local1._y = _local1.targetY;
}
if (((_local1.player.targetRot - _local1.player._rotation) * (_local1.player.targetRot - _local1.player._rotation)) < 5) {
if (((_local1.targetRot - _local1._parent._rotation) * (_local1.targetRot - _local1._parent._rotation)) > 5) {
_local1._parent._rotation = _local1._parent._rotation + ((_local1.targetRot - _local1._parent._rotation) / 4);
} else {
_local1._parent._rotation = _local1.targetRot;
if (_local1._parent._rotation == -180) {
_local1._parent._rotation = 180;
}
if (_local1._parent._rotation == 270) {
_local1._parent._rotation = -90;
}
}
}
_local1.currX = _local1.player.xCell;
_local1.currY = _local1.player.yCell;
var xDist = Math.sqrt((_local1.currX - _local1.oldX) * (_local1.currX - _local1.oldX));
var yDist = Math.sqrt((_local1.currY - _local1.oldY) * (_local1.currY - _local1.oldY));
var windowSize = 8;
if ((xDist >= 1) || (yDist >= 1)) {
var _local3 = _local1.currX - (windowSize + xDist);
while (_local3 < ((_local1.currX + windowSize) + xDist)) {
var _local2 = _local1.currY - (windowSize + yDist);
while (_local2 < ((_local1.currY + windowSize) + yDist)) {
if ((((_local3 > (_local1.currX - windowSize)) && (_local3 < (_local1.currX + windowSize))) && (_local2 > (_local1.currY - windowSize))) && (_local2 < (_local1.currY + windowSize))) {
if (_local1.cells[_local3][_local2].clip == undefined) {
_local1.cells[_local3][_local2].clip = new MovieClip();
if ((_local1.cells[_local3][_local2].tile == 0) && (_local1.cells[_local3][_local2].spawn != undefined)) {
_local1.attachMovie("Enemy" + _local1.cells[_local3][_local2].spawn, (("enemy" + _local1.cells[_local3][_local2].spawn) + "_") + _local1.cells[_local3][_local2].spawnId, (6000 + (_local1.cells[_local3][_local2].spawn * 50)) + _local1.cells[_local3][_local2].spawnId);
} else if ((_local1.cells[_local3][_local2].tile == 0) && (_local1.cells[_local3][_local2].item != undefined)) {
if (_local1.cells[_local3][_local2].itemAlive) {
_local1.attachMovie("Item" + _local1.cells[_local3][_local2].item, (("item" + _local1.cells[_local3][_local2].item) + "_") + _local1.cells[_local3][_local2].itemId, (7500 + (_local1.cells[_local3][_local2].item * 50)) + _local1.cells[_local3][_local2].itemId);
}
}
_local1.attachMovie("Cell", (("Cell_" + _local3) + "_") + _local2, _local1.cells[_local3][_local2].depth);
}
} else {
_local1.cells[_local3][_local2].clip.removeMovieClip();
_local1.cells[_local3][_local2].clip = undefined;
}
_local2++;
}
_local3++;
}
}
_local1.oldX = _local1.currX;
_local1.oldY = _local1.currY;
}
if (_local1.reSpawnCounter > 0) {
_local1.reSpawnCounter--;
if (_local1.reSpawnCounter == 1) {
_root.health = 100;
_local1.attachMovie("Player", "player", 5999);
_local1.player.blinking = 60;
}
}
}
function mapOverlay(mcName, mcScale) {
var _local1 = this;
var _local2 = mcScale;
var _local3 = mcName;
_local1.attachMovie(_local3, "overlay", 90);
_local1.overlay._x = (-_local1.cellsize) / 2;
_local1.overlay._y = (-_local1.cellsize) / 2;
_local1.overlay._width = _local1.overlay._width * _local2;
_local1.overlay._height = _local1.overlay._height * _local2;
}
function mapBg(mcName) {
var _local1 = mcName;
var _local2 = this;
_local2._parent._parent.attachMovie(_local1, "bg", 1);
_local2._parent._parent.bg._x = 280;
_local2._parent._parent.bg._y = 205;
}
function instaFocus() {
var _local1 = this;
_local1._x = Math.round((-_local1.player._x) * 10) / 10;
_local1._y = Math.round((-_local1.player._y) * 10) / 10;
}
var gravity = 1;
var maxspeed = 20;
var xsize = 60;
var ysize = 60;
var cellsize = 50;
var numEnemyTypes = 9;
var numItemTypes = 4;
var camFollow = true;
var tilesVisible = true;
var reSpawnCounter = 0;
var triggerStatus = 0;
var triggerMemory = 0;
var combatStatus = 100;
var worldTimer = 0;
var triggers = new Array();
var triggerPile = new Array();
}
Symbol 1239 MovieClip [__Packages.Editor] Frame 0
class Editor extends MovieClip
{
function Editor () {
super();
}
function onLoad() {
}
function buildEditor() {
var _local1 = this;
_local1.cells = new Array();
var depth = 100;
var _local3 = 0;
while (_local3 < _local1.xsize) {
_local1.cells[_local3] = new Array();
var _local2 = 0;
while (_local2 < _local1.ysize) {
_local1.cells[_local3][_local2] = new Object();
_local1.cells[_local3][_local2].depth = depth;
_local1.cells[_local3][_local2].clip = undefined;
_local1.cells[_local3][_local2].tile = 0;
_local1.cells[_local3][_local2].gravType = 0;
_local1.cells[_local3][_local2].edges = new Array();
depth++;
_local2++;
}
_local3++;
}
_local1.currX = Math.floor((((-_local1._x) + 275) / _local1.cellsize) + 0.5);
_local1.currY = Math.floor((((-_local1._y) + 200) / _local1.cellsize) + 0.5);
var windowSize = 8;
_local3 = _local1.currX - windowSize;
while (_local3 < (_local1.currX + windowSize)) {
var _local2 = _local1.currY - windowSize;
while (_local2 < (_local1.currY + windowSize)) {
if ((((_local3 > (_local1.currX - windowSize)) && (_local3 < (_local1.currX + windowSize))) && (_local2 > (_local1.currY - windowSize))) && (_local2 < (_local1.currY + windowSize))) {
if (_local1.cells[_local3][_local2].clip == undefined) {
_local1.cells[_local3][_local2].clip = new MovieClip();
_local1.attachMovie("RawCell", (("rawCell_" + _local3) + "_") + _local2, _local1.cells[_local3][_local2].depth, {xId:_local3, yId:_local2, tileType:_local1.cells[_local3][_local2].tile, gravType:_local1.cells[_local3][_local2].gravType});
}
} else {
_local1.cells[_local3][_local2].clip.removeMovieClip();
_local1.cells[_local3][_local2].clip = undefined;
}
_local2++;
}
_local3++;
}
}
function onEnterFrame() {
var _local1 = this;
if (Key.isDown(32)) {
_local1._x = _local1._x + (_root._xmouse - _local1.oldMouseX);
_local1._y = _local1._y + (_root._ymouse - _local1.oldMouseY);
}
if (Key.isDown(37)) {
_local1._x = _local1._x + 25;
} else if (Key.isDown(39)) {
_local1._x = _local1._x - 25;
}
if (Key.isDown(38)) {
_local1._y = _local1._y + 20;
} else if (Key.isDown(40)) {
_local1._y = _local1._y - 20;
}
_local1.oldMouseX = _root._xmouse;
_local1.oldMouseY = _root._ymouse;
_local1.currX = Math.floor((((-_local1._x) + 275) / _local1.cellsize) + 0.5);
_local1.currY = Math.floor((((-_local1._y) + 200) / _local1.cellsize) + 0.5);
var xDist = Math.sqrt((_local1.currX - _local1.oldX) * (_local1.currX - _local1.oldX));
var yDist = Math.sqrt((_local1.currY - _local1.oldY) * (_local1.currY - _local1.oldY));
var windowSize = 8;
if ((xDist >= 1) || (yDist >= 1)) {
var _local3 = _local1.currX - (windowSize + xDist);
while (_local3 < ((_local1.currX + windowSize) + xDist)) {
var _local2 = _local1.currY - (windowSize + yDist);
while (_local2 < ((_local1.currY + windowSize) + yDist)) {
if ((((_local3 > (_local1.currX - windowSize)) && (_local3 < (_local1.currX + windowSize))) && (_local2 > (_local1.currY - windowSize))) && (_local2 < (_local1.currY + windowSize))) {
if (_local1.cells[_local3][_local2].clip == undefined) {
_local1.cells[_local3][_local2].clip = new MovieClip();
_local1.attachMovie("RawCell", (("rawCell_" + _local3) + "_") + _local2, _local1.cells[_local3][_local2].depth, {xId:_local3, yId:_local2, tileType:_local1.cells[_local3][_local2].tile, gravType:_local1.cells[_local3][_local2].gravType});
}
} else {
_local1.cells[_local3][_local2].clip.removeMovieClip();
_local1.cells[_local3][_local2].clip = undefined;
}
_local2++;
}
_local3++;
}
}
_local1.oldX = _local1.currX;
_local1.oldY = _local1.currY;
}
function outputMap() {
var _local3 = this;
var mapString = (((_local3.xsize + "|") + _local3.ysize) + ":");
var tmp = "";
var _local2 = 0;
while (_local2 < _local3.ysize) {
var _local1 = 0;
while (_local1 < _local3.xsize) {
if (_local3.cells[_local1][_local2].tile > 9) {
tmp = String(_local3.cells[_local1][_local2].gravType) + String(_local3.cells[_local1][_local2].tile);
} else {
tmp = (String(_local3.cells[_local1][_local2].gravType) + "0") + String(_local3.cells[_local1][_local2].tile);
}
mapString = mapString + tmp;
_local1++;
}
_local2++;
}
return(Map.encode(mapString));
}
function loadMap(mapString) {
var _local1 = this;
var mapString = Map.decode(mapString);
var mapArray = mapString.split(":");
_local1.spawnPoints = new Array();
var depth = 100;
var currPos = 0;
var gravType = 0;
var tileType = 0;
var _local2 = 0;
while (_local2 < _local1.ysize) {
var _local3 = 0;
while (_local3 < _local1.xsize) {
currPos = (_local3 + (_local2 * _local1.xsize)) * 3;
gravType = Number(mapArray[1].substr(currPos, 1));
tileType = Number(mapArray[1].substr(currPos + 1, 2));
_local1.cells[_local3][_local2].tile = tileType;
_local1.cells[_local3][_local2].clip = undefined;
_local1.cells[_local3][_local2].gravType = gravType;
depth++;
_local3++;
}
_local2++;
}
_local1.currX = Math.floor((((-_local1._x) + 275) / _local1.cellsize) + 0.5);
_local1.currY = Math.floor((((-_local1._y) + 200) / _local1.cellsize) + 0.5);
var windowSize = 8;
var _local3 = _local1.currX - windowSize;
while (_local3 < (_local1.currX + windowSize)) {
_local2 = _local1.currY - windowSize;
while (_local2 < (_local1.currY + windowSize)) {
if ((((_local3 > (_local1.currX - windowSize)) && (_local3 < (_local1.currX + windowSize))) && (_local2 > (_local1.currY - windowSize))) && (_local2 < (_local1.currY + windowSize))) {
if (_local1.cells[_local3][_local2].clip == undefined) {
_local1.cells[_local3][_local2].clip = new MovieClip();
_local1.attachMovie("RawCell", (("rawCell_" + _local3) + "_") + _local2, _local1.cells[_local3][_local2].depth, {xId:_local3, yId:_local2, tileType:_local1.cells[_local3][_local2].tile, gravType:_local1.cells[_local3][_local2].gravType});
}
} else {
_local1.cells[_local3][_local2].clip.removeMovieClip();
_local1.cells[_local3][_local2].clip = undefined;
}
_local2++;
}
_local3++;
}
}
var cellsize = 50;
var xsize = 60;
var ysize = 60;
}
Symbol 1240 MovieClip [__Packages.RawCell] Frame 0
class RawCell extends MovieClip
{
function RawCell () {
super();
}
function onLoad() {
var _local1 = this;
_local1._x = _local1.xId * _local1._parent.cellsize;
_local1._y = _local1.yId * _local1._parent.cellsize;
_local1._parent.cells[_local1.xId][_local1.yId].clip = _local1;
if (_local1.tileType != undefined) {
if (_local1.tileType < 50) {
_local1.attachMovie("Tile" + _local1.tileType, "tile", 1);
} else if (_local1.tileType < 80) {
_local1.attachMovie("Spawn" + (_local1.tileType - 50), "tile", 1);
} else {
_local1.attachMovie("ItemSpawn" + (_local1.tileType - 80), "tile", 1);
}
}
if (_local1.gravType > 0) {
_local1.createEmptyMovieClip("grav", 2);
_local1.grav.attachMovie("GravityArrow", "dir", 1);
if (_local1.gravType <= 4) {
_local1.grav.dir._rotation = 90 * (_local1.gravType - 1);
} else {
_local1.grav.dir._rotation = (90 * (_local1.gravType - 5)) + 45;
}
}
}
function onEnterFrame() {
var _local1 = this;
var _local2 = _root;
if ((_local1.hitTest(_local2._xmouse, _local2._ymouse) && (!_local2.ep.hitTest(_local2._xmouse, _local2._ymouse))) && (_local2.mousePressed)) {
if (_local2.ep.setType == 1) {
_local1.attachMovie("Tile" + _local2.ep.tileType, "tile", 1);
_local1._parent.cells[_local1.xId][_local1.yId].tile = _local2.ep.tileType;
} else if (_local2.ep.setType == 2) {
_local1.attachMovie("Spawn" + (_local2.ep.spawnType - 50), "tile", 1);
_local1._parent.cells[_local1.xId][_local1.yId].tile = _local2.ep.spawnType;
} else if (_local2.ep.setType == 3) {
_local1.attachMovie("ItemSpawn" + (_local2.ep.itemType - 80), "tile", 1);
_local1._parent.cells[_local1.xId][_local1.yId].tile = _local2.ep.itemType;
} else if (_local2.ep.setType == 4) {
if (_local2.ep.gravType > 0) {
_local1.createEmptyMovieClip("grav", 2);
_local1.grav.attachMovie("GravityArrow", "dir", 1);
_local1._parent.cells[_local1.xId][_local1.yId].gravType = _local2.ep.gravType;
if ((_local2.ep.gravType <= 4) && (_local2.ep.gravType > 0)) {
_local1.grav.dir._rotation = 90 * (_local2.ep.gravType - 1);
} else if (_local2.ep.gravType > 4) {
_local1.grav.dir._rotation = (90 * (_local2.ep.gravType - 5)) + 45;
}
} else {
_local1.grav.removeMovieClip("dir");
_local1._parent.cells[_local1.xId][_local1.yId].gravType = 0;
}
}
}
}
}
Symbol 1241 MovieClip [__Packages.EditorPanel] Frame 0
class EditorPanel extends MovieClip
{
function EditorPanel () {
super();
}
function onLoad() {
var _local1 = this;
_local1.createEmptyMovieClip("tileContainer", 1);
_local1.tileContainer.attachMovie("Tile1", "tile", 1);
_local1.tileContainer._x = 30;
_local1.tileContainer._y = 30;
_local1.tileType = 1;
_local1.numOfTileTypes = 10;
_local1.createEmptyMovieClip("spawnContainer", 2);
_local1.spawnContainer.attachMovie("Spawn0", "spawn", 1);
_local1.spawnContainer._x = 90;
_local1.spawnContainer._y = 30;
_local1.spawnType = 50;
_local1.numOfSpawnTypes = 10;
_local1.createEmptyMovieClip("itemContainer", 3);
_local1.itemContainer.attachMovie("ItemSpawn1", "item", 1);
_local1.itemContainer._x = 150;
_local1.itemContainer._y = 30;
_local1.itemType = 80;
_local1.numOfItemTypes = 10;
_local1.createEmptyMovieClip("gravContainer", 4);
_local1.gravContainer.attachMovie("GravityArrow", "grav", 1);
_local1.gravContainer._x = 30;
_local1.gravContainer._y = 80;
_local1.gravType = 1;
_local1.setType = 1;
}
function onMouseDown() {
var _local1 = this;
var _local2 = _root;
if (_local1.tileContainer.hitTest(_local2._xmouse, _local2._ymouse)) {
if (_local1.setType == 1) {
if (_local1.tileType < (_local1.numOfTileTypes - 1)) {
_local1.tileType++;
} else {
_local1.tileType = 0;
}
}
_local1.setType = 1;
_local1.tileContainer.attachMovie("Tile" + _local1.tileType, "tile", 1);
} else if (_local1.spawnContainer.hitTest(_local2._xmouse, _local2._ymouse)) {
if (_local1.setType == 2) {
if (_local1.spawnType < (_local1.numOfSpawnTypes + 49)) {
_local1.spawnType++;
} else {
_local1.spawnType = 50;
}
}
_local1.setType = 2;
_local1.spawnContainer.attachMovie("Spawn" + (_local1.spawnType - 50), "spawn", 1);
} else if (_local1.itemContainer.hitTest(_local2._xmouse, _local2._ymouse)) {
if (_local1.setType == 3) {
if (_local1.itemType < (_local1.numOfItemTypes + 79)) {
_local1.itemType++;
} else {
_local1.itemType = 80;
}
}
_local1.setType = 3;
_local1.itemContainer.attachMovie("ItemSpawn" + (_local1.itemType - 80), "item", 1);
} else if (_local1.gravContainer.hitTest(_local2._xmouse, _local2._ymouse)) {
if (_local1.setType == 4) {
if (_local1.gravType < 8) {
_local1.gravType++;
} else {
_local1.gravType = 0;
}
}
_local1.setType = 4;
if ((_local1.gravType > 0) && (_local1.gravType <= 4)) {
_local1.gravContainer.attachMovie("GravityArrow", "grav", 1);
_local1.gravContainer.grav._rotation = 90 * (_local1.gravType - 1);
} else if (_local1.gravType > 4) {
_local1.gravContainer.attachMovie("GravityArrow", "grav", 1);
_local1.gravContainer.grav._rotation = (90 * (_local1.gravType - 5)) + 45;
} else if (_local1.gravType == 0) {
_local1.gravContainer.attachMovie("GravNeutral", "grav", 1);
}
}
}
}
Symbol 1242 MovieClip [__Packages.Item9] Frame 0
class Item9 extends MovieClip
{
function Item9 () {
super();
}
function onLoad() {
var _local1 = this;
var tmpArr = _local1._name.split("_");
var id = Number(tmpArr[1]);
var _local3 = _local1._parent.itemPoints[9][id].split(":");
_local1._x = _local3[0] * _local1._parent.cellsize;
_local1._y = _local3[1] * _local1._parent.cellsize;
_local1.xCell = Math.floor((_local1._x / _local1._parent.cellsize) + 0.5);
_local1.yCell = Math.floor((_local1._y / _local1._parent.cellsize) + 0.5);
var _local2 = _local1._parent.cells[_local1.xCell][_local1.yCell].gravType;
if (_local2 <= 4) {
if (_local2 == 0) {
_local2 = 1;
}
_local1._rotation = 90 * (_local2 - 1);
} else {
_local1._rotation = (90 * (_local2 - 1)) + 45;
}
_local1.createEmptyMovieClip("sprite", 1);
_local1.sprite.attachMovie("item9_1", "sprite", 1);
}
function onEnterFrame() {
var _local1 = this;
var _local2 = _root;
if (_local1._parent.cells[_local1.xCell][_local1.yCell].clip == undefined) {
(_local1.removeMovieClip());// not popped
}
if (_local1.sprite.sprite.hitarea.hitTest(_local1._parent.player) && (_local1._parent.cells[_local1.xCell][_local1.yCell].itemAlive)) {
_local2.score = _local2.score + 250;
_local1._parent.cells[_local1.xCell][_local1.yCell].itemAlive = false;
_local2.secretsFound[5] = true;
_local2.attachMovie("Message", "msg", 5);
_local2.msg.msgText = "You've found the Straight Jacket!";
_local1.soundFX = new Sound(_local1);
_local1.soundFX.attachSound("collect_secret");
_local1.soundFX.start(0, 0);
_local1.soundFX.setVolume(80);
_local1.collected = true;
}
if (!_local1._parent.cells[_local1.xCell][_local1.yCell].itemAlive) {
_local1._alpha = _local1._alpha + ((-_local1._alpha) / 3);
_local1._xscale = _local1._xscale + ((150 - _local1._xscale) / 3);
_local1._yscale = _local1._xscale;
if (_local1._alpha < 5) {
(_local1.removeMovieClip());// not popped
}
}
}
var collected = false;
}
Symbol 1243 MovieClip [__Packages.Item8] Frame 0
class Item8 extends MovieClip
{
function Item8 () {
super();
}
function onLoad() {
var _local1 = this;
var tmpArr = _local1._name.split("_");
var id = Number(tmpArr[1]);
var _local3 = _local1._parent.itemPoints[8][id].split(":");
_local1._x = _local3[0] * _local1._parent.cellsize;
_local1._y = _local3[1] * _local1._parent.cellsize;
_local1.xCell = Math.floor((_local1._x / _local1._parent.cellsize) + 0.5);
_local1.yCell = Math.floor((_local1._y / _local1._parent.cellsize) + 0.5);
var _local2 = _local1._parent.cells[_local1.xCell][_local1.yCell].gravType;
if (_local2 <= 4) {
if (_local2 == 0) {
_local2 = 1;
}
_local1._rotation = 90 * (_local2 - 1);
} else {
_local1._rotation = (90 * (_local2 - 1)) + 45;
}
_local1.createEmptyMovieClip("sprite", 1);
_local1.sprite.attachMovie("item8_1", "sprite", 1);
}
function onEnterFrame() {
var _local1 = this;
var _local2 = _root;
if (_local1._parent.cells[_local1.xCell][_local1.yCell].clip == undefined) {
(_local1.removeMovieClip());// not popped
}
if (_local1.sprite.sprite.hitarea.hitTest(_local1._parent.player) && (_local1._parent.cells[_local1.xCell][_local1.yCell].itemAlive)) {
_local2.score = _local2.score + 250;
_local1._parent.cells[_local1.xCell][_local1.yCell].itemAlive = false;
_local2.secretsFound[4] = true;
_local2.attachMovie("Message", "msg", 5);
_local2.msg.msgText = "You've found the Meaning of Life!";
_local1.soundFX = new Sound(_local1);
_local1.soundFX.attachSound("collect_secret");
_local1.soundFX.start(0, 0);
_local1.soundFX.setVolume(80);
_local1.collected = true;
}
if (!_local1._parent.cells[_local1.xCell][_local1.yCell].itemAlive) {
_local1._alpha = _local1._alpha + ((-_local1._alpha) / 3);
_local1._xscale = _local1._xscale + ((150 - _local1._xscale) / 3);
_local1._yscale = _local1._xscale;
if (_local1._alpha < 5) {
(_local1.removeMovieClip());// not popped
}
}
}
var collected = false;
}
Symbol 1244 MovieClip [__Packages.Item7] Frame 0
class Item7 extends MovieClip
{
function Item7 () {
super();
}
function onLoad() {
var _local1 = this;
var tmpArr = _local1._name.split("_");
var id = Number(tmpArr[1]);
var _local3 = _local1._parent.itemPoints[7][id].split(":");
_local1._x = _local3[0] * _local1._parent.cellsize;
_local1._y = _local3[1] * _local1._parent.cellsize;
_local1.xCell = Math.floor((_local1._x / _local1._parent.cellsize) + 0.5);
_local1.yCell = Math.floor((_local1._y / _local1._parent.cellsize) + 0.5);
var _local2 = _local1._parent.cells[_local1.xCell][_local1.yCell].gravType;
if (_local2 <= 4) {
if (_local2 == 0) {
_local2 = 1;
}
_local1._rotation = 90 * (_local2 - 1);
} else {
_local1._rotation = (90 * (_local2 - 1)) + 45;
}
_local1.createEmptyMovieClip("sprite", 1);
_local1.sprite.attachMovie("item7_1", "sprite", 1);
}
function onEnterFrame() {
var _local1 = this;
var _local2 = _root;
if (_local1._parent.cells[_local1.xCell][_local1.yCell].clip == undefined) {
(_local1.removeMovieClip());// not popped
}
if (_local1.sprite.sprite.hitarea.hitTest(_local1._parent.player) && (_local1._parent.cells[_local1.xCell][_local1.yCell].itemAlive)) {
_local2.score = _local2.score + 250;
_local1._parent.cells[_local1.xCell][_local1.yCell].itemAlive = false;
_local2.secretsFound[3] = true;
_local2.attachMovie("Message", "msg", 5);
_local2.msg.msgText = "You've found the Old School Video Game Console!";
_local1.soundFX = new Sound(_local1);
_local1.soundFX.attachSound("collect_secret");
_local1.soundFX.start(0, 0);
_local1.soundFX.setVolume(80);
_local1.collected = true;
}
if (!_local1._parent.cells[_local1.xCell][_local1.yCell].itemAlive) {
_local1._alpha = _local1._alpha + ((-_local1._alpha) / 3);
_local1._xscale = _local1._xscale + ((150 - _local1._xscale) / 3);
_local1._yscale = _local1._xscale;
if (_local1._alpha < 5) {
(_local1.removeMovieClip());// not popped
}
}
}
var collected = false;
}
Symbol 1245 MovieClip [__Packages.Item6] Frame 0
class Item6 extends MovieClip
{
function Item6 () {
super();
}
function onLoad() {
var _local1 = this;
var tmpArr = _local1._name.split("_");
var id = Number(tmpArr[1]);
var _local3 = _local1._parent.itemPoints[6][id].split(":");
_local1._x = _local3[0] * _local1._parent.cellsize;
_local1._y = _local3[1] * _local1._parent.cellsize;
_local1.xCell = Math.floor((_local1._x / _local1._parent.cellsize) + 0.5);
_local1.yCell = Math.floor((_local1._y / _local1._parent.cellsize) + 0.5);
var _local2 = _local1._parent.cells[_local1.xCell][_local1.yCell].gravType;
if (_local2 <= 4) {
if (_local2 == 0) {
_local2 = 1;
}
_local1._rotation = 90 * (_local2 - 1);
} else {
_local1._rotation = (90 * (_local2 - 1)) + 45;
}
_local1.createEmptyMovieClip("sprite", 1);
_local1.sprite.attachMovie("item6_1", "sprite", 1);
}
function onEnterFrame() {
var _local1 = this;
var _local2 = _root;
if (_local1._parent.cells[_local1.xCell][_local1.yCell].clip == undefined) {
(_local1.removeMovieClip());// not popped
}
if (_local1.sprite.sprite.hitarea.hitTest(_local1._parent.player) && (_local1._parent.cells[_local1.xCell][_local1.yCell].itemAlive)) {
_local2.score = _local2.score + 250;
_local1._parent.cells[_local1.xCell][_local1.yCell].itemAlive = false;
_local2.secretsFound[2] = true;
_local2.attachMovie("Message", "msg", 5);
_local2.msg.msgText = "You've found the Clockwork Orange!";
_local1.soundFX = new Sound(_local1);
_local1.soundFX.attachSound("collect_secret");
_local1.soundFX.start(0, 0);
_local1.soundFX.setVolume(80);
_local1.collected = true;
}
if (!_local1._parent.cells[_local1.xCell][_local1.yCell].itemAlive) {
_local1._alpha = _local1._alpha + ((-_local1._alpha) / 3);
_local1._xscale = _local1._xscale + ((150 - _local1._xscale) / 3);
_local1._yscale = _local1._xscale;
if (_local1._alpha < 5) {
(_local1.removeMovieClip());// not popped
}
}
}
var collected = false;
}
Symbol 1246 MovieClip [__Packages.Item5] Frame 0
class Item5 extends MovieClip
{
function Item5 () {
super();
}
function onLoad() {
var _local1 = this;
var tmpArr = _local1._name.split("_");
var id = Number(tmpArr[1]);
var _local3 = _local1._parent.itemPoints[5][id].split(":");
_local1._x = _local3[0] * _local1._parent.cellsize;
_local1._y = _local3[1] * _local1._parent.cellsize;
_local1.xCell = Math.floor((_local1._x / _local1._parent.cellsize) + 0.5);
_local1.yCell = Math.floor((_local1._y / _local1._parent.cellsize) + 0.5);
var _local2 = _local1._parent.cells[_local1.xCell][_local1.yCell].gravType;
if (_local2 <= 4) {
if (_local2 == 0) {
_local2 = 1;
}
_local1._rotation = 90 * (_local2 - 1);
} else {
_local1._rotation = (90 * (_local2 - 1)) + 45;
}
_local1.createEmptyMovieClip("sprite", 1);
_local1.sprite.attachMovie("item5_1", "sprite", 1);
}
function onEnterFrame() {
var _local1 = this;
var _local2 = _root;
if (_local1._parent.cells[_local1.xCell][_local1.yCell].clip == undefined) {
(_local1.removeMovieClip());// not popped
}
if (_local1.sprite.sprite.hitarea.hitTest(_local1._parent.player) && (_local1._parent.cells[_local1.xCell][_local1.yCell].itemAlive)) {
_local2.score = _local2.score + 250;
_local1._parent.cells[_local1.xCell][_local1.yCell].itemAlive = false;
_local2.secretsFound[1] = true;
_local2.attachMovie("Message", "msg", 5);
_local2.msg.msgText = "You've found the Monkey Totem!";
_local1.soundFX = new Sound(_local1);
_local1.soundFX.attachSound("collect_secret");
_local1.soundFX.start(0, 0);
_local1.soundFX.setVolume(80);
_local1.collected = true;
}
if (!_local1._parent.cells[_local1.xCell][_local1.yCell].itemAlive) {
_local1._alpha = _local1._alpha + ((-_local1._alpha) / 3);
_local1._xscale = _local1._xscale + ((150 - _local1._xscale) / 3);
_local1._yscale = _local1._xscale;
if (_local1._alpha < 5) {
(_local1.removeMovieClip());// not popped
}
}
}
var collected = false;
}
Symbol 1247 MovieClip [__Packages.Item4] Frame 0
class Item4 extends MovieClip
{
function Item4 () {
super();
}
function onLoad() {
var _local1 = this;
var tmpArr = _local1._name.split("_");
var id = Number(tmpArr[1]);
var _local3 = _local1._parent.itemPoints[4][id].split(":");
_local1._x = _local3[0] * _local1._parent.cellsize;
_local1._y = _local3[1] * _local1._parent.cellsize;
_local1.xCell = Math.floor((_local1._x / _local1._parent.cellsize) + 0.5);
_local1.yCell = Math.floor((_local1._y / _local1._parent.cellsize) + 0.5);
var _local2 = _local1._parent.cells[_local1.xCell][_local1.yCell].gravType;
if (_local2 <= 4) {
if (_local2 == 0) {
_local2 = 1;
}
_local1._rotation = 90 * (_local2 - 1);
} else {
_local1._rotation = (90 * (_local2 - 1)) + 45;
}
_local1.createEmptyMovieClip("sprite", 1);
_local1.sprite.attachMovie("item4_1", "sprite", 1);
}
function onEnterFrame() {
var _local1 = this;
var _local2 = _root;
if (_local1._parent.cells[_local1.xCell][_local1.yCell].clip == undefined) {
(_local1.removeMovieClip());// not popped
}
if (_local1.sprite.sprite.hitarea.hitTest(_local1._parent.player) && (_local1._parent.cells[_local1.xCell][_local1.yCell].itemAlive)) {
_local2.score = _local2.score + 250;
_local1._parent.cells[_local1.xCell][_local1.yCell].itemAlive = false;
_local2.secretsFound[0] = true;
_local2.attachMovie("Message", "msg", 5);
_local2.msg.msgText = "You've found the Bunny Mask!";
_local1.soundFX = new Sound(_local1);
_local1.soundFX.attachSound("collect_secret");
_local1.soundFX.start(0, 0);
_local1.soundFX.setVolume(80);
_local1.collected = true;
}
if (!_local1._parent.cells[_local1.xCell][_local1.yCell].itemAlive) {
_local1._alpha = _local1._alpha + ((-_local1._alpha) / 3);
_local1._xscale = _local1._xscale + ((150 - _local1._xscale) / 3);
_local1._yscale = _local1._xscale;
if (_local1._alpha < 5) {
(_local1.removeMovieClip());// not popped
}
}
}
var collected = false;
}
Symbol 1248 MovieClip [__Packages.Item3] Frame 0
class Item3 extends MovieClip
{
function Item3 () {
super();
}
function onLoad() {
var _local1 = this;
var tmpArr = _local1._name.split("_");
var id = Number(tmpArr[1]);
var tmpArr2 = _local1._parent.itemPoints[3][id].split(":");
_local1._x = tmpArr2[0] * _local1._parent.cellsize;
_local1._y = tmpArr2[1] * _local1._parent.cellsize;
_local1.xCell = Math.floor((_local1._x / _local1._parent.cellsize) + 0.5);
_local1.yCell = Math.floor((_local1._y / _local1._parent.cellsize) + 0.5);
var _local2 = _local1._parent.cells[_local1.xCell][_local1.yCell].gravType;
if (_local2 <= 4) {
if (_local2 == 0) {
_local2 = 1;
}
_local1._rotation = 90 * (_local2 - 1);
} else {
_local1._rotation = (90 * (_local2 - 1)) + 45;
}
_local1.createEmptyMovieClip("sprite", 1);
if ((_local1._parent.cells[_local1.xCell][_local1.yCell].r != undefined) && (_local1._parent.cells[_local1.xCell][_local1.yCell].r > 0)) {
var _local3 = _local1._parent.cells[_local1.xCell][_local1.yCell].r;
} else {
var _local3 = Math.floor(random(8)) + 1;
}
_local1.sprite.attachMovie("item3_" + _local3, "sprite", 1);
_local1._parent.cells[_local1.xCell][_local1.yCell].r = _local3;
}
function onEnterFrame() {
var _local1 = this;
var _local2 = _root;
if (_local1._parent.cells[_local1.xCell][_local1.yCell].clip == undefined) {
(_local1.removeMovieClip());// not popped
}
if (_local1.hitTest(_local1._parent.player) && (_local1._parent.cells[_local1.xCell][_local1.yCell].itemAlive)) {
_local2.score = _local2.score + 10;
_local2.itemsCollected[2]++;
if ((_local2.itemsCollected[2] >= _local2.itemsTotalLvl[2]) && (_local2.currLvl == 12)) {
_local2.score = _local2.score + 100;
_local2.attachMovie("Message", "msg", 5);
_local2.msg.msgText = "You've collected all meds!";
_local2.medalsEarned[2] = true;
}
_local1._parent.cells[_local1.xCell][_local1.yCell].itemAlive = false;
}
if (!_local1._parent.cells[_local1.xCell][_local1.yCell].itemAlive) {
if (!_local1.collected) {
_local1.soundFX = new Sound(_local1);
_local1.soundFX.attachSound("collect_item");
_local1.soundFX.start(0, 0);
_local1.soundFX.setVolume(50);
_local1.collected = true;
}
_local1._alpha = _local1._alpha + ((-_local1._alpha) / 3);
_local1._xscale = _local1._xscale + ((150 - _local1._xscale) / 3);
_local1._yscale = _local1._xscale;
if (_local1._alpha < 5) {
(_local1.removeMovieClip());// not popped
}
}
}
var collected = false;
}
Symbol 1249 MovieClip [__Packages.Item2] Frame 0
class Item2 extends MovieClip
{
function Item2 () {
super();
}
function onLoad() {
var _local1 = this;
var tmpArr = _local1._name.split("_");
var id = Number(tmpArr[1]);
var tmpArr2 = _local1._parent.itemPoints[2][id].split(":");
_local1._x = tmpArr2[0] * _local1._parent.cellsize;
_local1._y = tmpArr2[1] * _local1._parent.cellsize;
_local1.xCell = Math.floor((_local1._x / _local1._parent.cellsize) + 0.5);
_local1.yCell = Math.floor((_local1._y / _local1._parent.cellsize) + 0.5);
var _local2 = _local1._parent.cells[_local1.xCell][_local1.yCell].gravType;
if (_local2 <= 4) {
if (_local2 == 0) {
_local2 = 1;
}
_local1._rotation = 90 * (_local2 - 1);
} else {
_local1._rotation = (90 * (_local2 - 1)) + 45;
}
_local1.createEmptyMovieClip("sprite", 1);
if ((_local1._parent.cells[_local1.xCell][_local1.yCell].r != undefined) && (_local1._parent.cells[_local1.xCell][_local1.yCell].r > 0)) {
var _local3 = _local1._parent.cells[_local1.xCell][_local1.yCell].r;
} else {
var _local3 = Math.floor(random(11)) + 1;
}
_local1.sprite.attachMovie("item2_" + _local3, "sprite", 1);
_local1._parent.cells[_local1.xCell][_local1.yCell].r = _local3;
}
function onEnterFrame() {
var _local1 = this;
var _local2 = _root;
if (_local1._parent.cells[_local1.xCell][_local1.yCell].clip == undefined) {
(_local1.removeMovieClip());// not popped
}
if (_local1.hitTest(_local1._parent.player) && (_local1._parent.cells[_local1.xCell][_local1.yCell].itemAlive)) {
_local2.score = _local2.score + 10;
_local2.itemsCollected[1]++;
if ((_local2.itemsCollected[1] >= _local2.itemsTotalLvl[1]) && (_local2.currLvl == 8)) {
_local2.score = _local2.score + 100;
_local2.attachMovie("Message", "msg", 5);
_local2.msg.msgText = "You've collected all cogs and screws!";
_local2.medalsEarned[1] = true;
}
_local1._parent.cells[_local1.xCell][_local1.yCell].itemAlive = false;
}
if (!_local1._parent.cells[_local1.xCell][_local1.yCell].itemAlive) {
if (!_local1.collected) {
_local1.soundFX = new Sound(_local1);
_local1.soundFX.attachSound("collect_item");
_local1.soundFX.start(0, 0);
_local1.soundFX.setVolume(50);
_local1.collected = true;
}
_local1._alpha = _local1._alpha + ((-_local1._alpha) / 3);
_local1._xscale = _local1._xscale + ((150 - _local1._xscale) / 3);
_local1._yscale = _local1._xscale;
if (_local1._alpha < 5) {
(_local1.removeMovieClip());// not popped
}
}
}
var collected = false;
}
Symbol 1250 MovieClip [__Packages.Item1] Frame 0
class Item1 extends MovieClip
{
function Item1 () {
super();
}
function onLoad() {
var _local1 = this;
var tmpArr = _local1._name.split("_");
var id = Number(tmpArr[1]);
var tmpArr2 = _local1._parent.itemPoints[1][id].split(":");
_local1._x = tmpArr2[0] * _local1._parent.cellsize;
_local1._y = tmpArr2[1] * _local1._parent.cellsize;
_local1.xCell = Math.floor((_local1._x / _local1._parent.cellsize) + 0.5);
_local1.yCell = Math.floor((_local1._y / _local1._parent.cellsize) + 0.5);
var _local2 = _local1._parent.cells[_local1.xCell][_local1.yCell].gravType;
if (_local2 <= 4) {
if (_local2 == 0) {
_local2 = 1;
}
_local1._rotation = 90 * (_local2 - 1);
} else {
_local1._rotation = (90 * (_local2 - 1)) + 45;
}
_local1.createEmptyMovieClip("sprite", 1);
if ((_local1._parent.cells[_local1.xCell][_local1.yCell].r != undefined) && (_local1._parent.cells[_local1.xCell][_local1.yCell].r > 0)) {
var _local3 = _local1._parent.cells[_local1.xCell][_local1.yCell].r;
} else {
var _local3 = Math.floor(random(11)) + 1;
}
_local1.sprite.attachMovie("item1_" + _local3, "sprite", 1);
_local1._parent.cells[_local1.xCell][_local1.yCell].r = _local3;
}
function onEnterFrame() {
var _local1 = this;
var _local2 = _root;
if (_local1._parent.cells[_local1.xCell][_local1.yCell].clip == undefined) {
(_local1.removeMovieClip());// not popped
}
if (_local1.hitTest(_local1._parent.player) && (_local1._parent.cells[_local1.xCell][_local1.yCell].itemAlive)) {
_local2.score = _local2.score + 10;
_local2.itemsCollected[0]++;
if ((_local2.itemsCollected[0] >= _local2.itemsTotalLvl[0]) && (_local2.currLvl == 4)) {
_local2.score = _local2.score + 100;
_local2.attachMovie("Message", "msg", 5);
_local2.msg.msgText = "You've collected all candies!";
_local2.medalsEarned[0] = true;
}
_local1._parent.cells[_local1.xCell][_local1.yCell].itemAlive = false;
}
if (!_local1._parent.cells[_local1.xCell][_local1.yCell].itemAlive) {
if (!_local1.collected) {
_local1.soundFX = new Sound(_local1);
_local1.soundFX.attachSound("collect_item");
_local1.soundFX.start(0, 0);
_local1.soundFX.setVolume(50);
_local1.collected = true;
}
_local1._alpha = _local1._alpha + ((-_local1._alpha) / 3);
_local1._xscale = _local1._xscale + ((150 - _local1._xscale) / 3);
_local1._yscale = _local1._xscale;
if (_local1._alpha < 5) {
(_local1.removeMovieClip());// not popped
}
}
}
var collected = false;
}
Symbol 1251 MovieClip [__Packages.Item0] Frame 0
class Item0 extends MovieClip
{
function Item0 () {
super();
}
function onLoad() {
var _local1 = this;
var tmpArr = _local1._name.split("_");
var id = Number(tmpArr[1]);
var _local3 = _local1._parent.itemPoints[0][id].split(":");
_local1._x = _local3[0] * _local1._parent.cellsize;
_local1._y = _local3[1] * _local1._parent.cellsize;
_local1.xCell = Math.floor((_local1._x / _local1._parent.cellsize) + 0.5);
_local1.yCell = Math.floor((_local1._y / _local1._parent.cellsize) + 0.5);
var _local2 = _local1._parent.cells[_local1.xCell][_local1.yCell].gravType;
if (_local2 <= 4) {
if (_local2 == 0) {
_local2 = 1;
}
_local1._rotation = 90 * (_local2 - 1);
} else {
_local1._rotation = (90 * (_local2 - 1)) + 45;
}
_local1.createEmptyMovieClip("sprite", 1);
_local1.sprite.attachMovie("item0_1", "sprite", 1);
}
function onEnterFrame() {
var _local1 = this;
var _local2 = _root;
if (_local1._parent.cells[_local1.xCell][_local1.yCell].clip == undefined) {
(_local1.removeMovieClip());// not popped
}
if ((_local1.hitTest(_local1._parent.player) && (_local1._parent.cells[_local1.xCell][_local1.yCell].itemAlive)) && (_local2.worldContainer.world.player.health < 100)) {
_local2.worldContainer.world.player.health = _local2.worldContainer.world.player.health + 25;
if (_local2.worldContainer.world.player.health > 100) {
_local2.worldContainer.world.player.health = 100;
}
_local1._parent.cells[_local1.xCell][_local1.yCell].itemAlive = false;
}
if (!_local1._parent.cells[_local1.xCell][_local1.yCell].itemAlive) {
if (!_local1.collected) {
_local1.soundFX = new Sound(_local1);
_local1.soundFX.attachSound("collect_health");
_local1.soundFX.start(0, 0);
_local1.soundFX.setVolume(70);
_local1.collected = true;
}
_local1._alpha = _local1._alpha + ((-_local1._alpha) / 3);
_local1._xscale = _local1._xscale + ((150 - _local1._xscale) / 3);
_local1._yscale = _local1._xscale;
if (_local1._alpha < 5) {
(_local1.removeMovieClip());// not popped
}
}
}
var collected = false;
}
Symbol 1252 MovieClip [__Packages.HUD] Frame 0
class HUD extends MovieClip
{
function HUD () {
super();
}
function onLoad() {
var _local1 = _root;
var _local2 = this;
if ((_local1.currLvl <= 4) || (_local1.currLvl == 101)) {
_local2.bg.gotoAndStop(2);
} else if (((_local1.currLvl >= 5) && (_local1.currLvl <= 8)) || (_local1.currLvl == 102)) {
_local2.bg.gotoAndStop(3);
} else if (((_local1.currLvl >= 9) && (_local1.currLvl <= 12)) || (_local1.currLvl == 103)) {
_local2.bg.gotoAndStop(4);
} else {
_local2.bg.gotoAndStop(1);
}
}
function onEnterFrame() {
var _local1 = this;
var _local2 = _root;
_local1.healthBar.gotoAndStop(_local2.health + 1);
_local1.txtScore.text = _local2.score;
_local1.txtLifes.text = "x " + _local2.lifes;
}
var menuOut = false;
}
Symbol 1253 MovieClip [__Packages.JukeBox] Frame 0
class JukeBox extends MovieClip
{
function JukeBox () {
super();
}
function onLoad() {
var _local1 = this;
stopAllSounds();
_local1.music = new Sound(_local1);
_local1.targetVol = _root.musicVol;
}
function playTrack(track) {
var _local1 = this;
var _local2 = track;
if (_local1.currTrack != _local2) {
_local1.currTrack = _local2;
_local1.music.attachSound(_local2);
_local1.music.stop();
if (_local2 != "asylum_2") {
_local1.music.start(0, 9999);
} else {
_local1.music.start(0, 0);
}
_local1.music.setVolume(0);
}
}
function onEnterFrame() {
var _local1 = this;
if (_local1.currTrack != "") {
var _local2 = (_local1.targetVol - _local1.music.getVolume()) / 15;
_local1.music.setVolume(_local1.music.getVolume() + _local2);
}
}
var currTrack = "";
}
Symbol 1254 MovieClip [__Packages.Message] Frame 0
class Message extends MovieClip
{
function Message () {
super();
}
function onLoad() {
var _local1 = this;
_local1._x = 0;
_local1._y = 40;
_local1._xscale = 20;
_local1._yscale = 20;
_local1.lifeTime = 0;
}
function onEnterFrame() {
var _local1 = this;
_local1.txtMsg.text = _local1.msgText;
if (_local1.lifeTime < 140) {
_local1._xscale = _local1._xscale + ((100 - _local1._xscale) / 3);
_local1._yscale = _local1._xscale;
} else {
_local1._xscale = _local1._xscale + ((20 - _local1._xscale) / 3);
_local1._yscale = _local1._yscale;
if (_local1._xscale < 25) {
(_local1.removeMovieClip());// not popped
}
}
_local1.lifeTime++;
}
}
Symbol 1255 MovieClip [__Packages.Enemy9] Frame 0
class Enemy9 extends MovieClip
{
function Enemy9 () {
super();
}
function onLoad() {
var _local1 = this;
_root.bonusScore = 7500;
var _local3 = _local1._name.split("_");
_local1.id = Number(_local3[1]);
var _local2 = _local1._parent.spawnPoints[9][_local1.id].split(":");
_local1._x = _local2[0] * _local1._parent.cellsize;
_local1._y = _local2[1] * _local1._parent.cellsize;
_local1._parent.cells[_local2[0]][_local2[1]].spawn = undefined;
_local1.onGround = false;
if (_local1._parent.cells[_local2[0]][_local2[1]].gravType > 0) {
_local1.gravType = _local1._parent.cells[_local2[0]][_local2[1]].gravType;
_local1._rotation = 90 * (_local1.gravType - 1);
} else {
_local1.gravType = 1;
}
_local1.createEmptyMovieClip("sprite", 1);
_local1.sprite._y = _local1._parent.cellsize / 2;
_local1.enemyStatus = "boss3_running_1";
_local1.sprite.attachMovie(_local1.enemyStatus, "sprite", 1);
_local1.walking = true;
_local1._xscale = -100;
_local1.xStep = 0;
}
function onEnterFrame() {
var _local1 = this;
var _local2 = _root;
if (_local2.bonusScore >= 3) {
_local2.bonusScore = _local2.bonusScore - 3;
}
if ((_local2.currLvl == 103) && (_local2.jukebox.music.position > 7520)) {
_local1.xStep = _local1.walkSpeed;
}
if (_local1.yStep != 0) {
_local1.onGround = false;
}
if (_local1.onGround && (_local1.enemyStatus != "boss3_running_1")) {
_local1.enemyStatus = "boss3_running_1";
_local1.sprite.attachMovie(_local1.enemyStatus, "sprite", 1);
}
if (_local1.hitTest(_local1._parent.player)) {
_local2.endSuccess = true;
_local2.gotoAndPlay("cinematics");
}
_local1.xCell = Math.floor((_local1._x / _local1._parent.cellsize) + 0.5);
_local1.yCell = Math.floor((_local1._y / _local1._parent.cellsize) + 0.5);
if (_local1._parent.cells[_local1.xCell][_local1.yCell].clip == undefined) {
if (_local1._parent.cells[_local1.xCell][_local1.yCell].tile == 2) {
_local1.yCell++;
} else if (_local1._parent.cells[_local1.xCell][_local1.yCell].tile == 3) {
_local1.xCell--;
} else if (_local1._parent.cells[_local1.xCell][_local1.yCell].tile == 4) {
_local1.yCell--;
} else if (_local1._parent.cells[_local1.xCell][_local1.yCell].tile == 5) {
_local1.xCell++;
}
_local1._parent.spawnPoints[9][_local1.id] = (_local1.xCell + ":") + _local1.yCell;
_local1._parent.cells[_local1.xCell][_local1.yCell].spawn = 9;
_local1._parent.cells[_local1.xCell][_local1.yCell].spawnId = _local1.id;
(_local1.removeMovieClip());// not popped
}
if (((((_local1._parent.cells[_local1.xCell + 4][_local1.yCell].edges[3] == 1) || (_local1._parent.cells[_local1.xCell + 3][_local1.yCell].edges[3] == 1)) || (_local1._parent.cells[_local1.xCell + 2][_local1.yCell].edges[3] == 1)) || (_local1._parent.cells[_local1.xCell + 1][_local1.yCell].edges[3] == 1)) && (_local1.onGround)) {
_local1.yStep = -13;
if (_local1.enemyStatus != "boss3_jump_1") {
_local1.enemyStatus = "boss3_jump_1";
_local1.sprite.attachMovie(_local1.enemyStatus, "sprite", 1);
}
} else if (((((_local1._parent.cells[_local1.xCell + 4][_local1.yCell - 1].edges[3] == 1) || (_local1._parent.cells[_local1.xCell + 3][_local1.yCell - 1].edges[3] == 1)) || (_local1._parent.cells[_local1.xCell + 2][_local1.yCell - 1].edges[3] == 1)) || (_local1._parent.cells[_local1.xCell + 1][_local1.yCell - 1].edges[3] == 1)) && (_local1.onGround)) {
_local1.yStep = -13;
if (_local1.enemyStatus != "boss3_jump_1") {
_local1.enemyStatus = "boss3_jump_1";
_local1.sprite.attachMovie(_local1.enemyStatus, "sprite", 1);
}
}
if ((_local1._parent.cells[_local1.xCell + 1][_local1.yCell].clip == undefined) || (_local1._parent.cells[_local1.xCell - 1][_local1.yCell].clip == undefined)) {
_local1.xStep = 0;
}
if (_local1._parent.gravity < _local1._parent.maxspeed) {
_local1.yStep = _local1.yStep + _local1._parent.gravity;
}
if (_local1.gravType == 1) {
_local1.futureY = _local1._y + _local1.yStep;
_local1.futureX = _local1._x + _local1.xStep;
_local1.targetRot = 0;
} else if (_local1.gravType == 2) {
_local1.futureY = _local1._y + _local1.xStep;
_local1.futureX = _local1._x - _local1.yStep;
_local1.targetRot = 90;
} else if (_local1.gravType == 3) {
_local1.futureY = _local1._y - _local1.yStep;
_local1.futureX = _local1._x - _local1.xStep;
if (_local1._rotation <= -90) {
_local1.targetRot = -180;
} else {
_local1.targetRot = 180;
}
} else if (_local1.gravType == 4) {
_local1.futureY = _local1._y - _local1.xStep;
_local1.futureX = _local1._x + _local1.yStep;
if (_local1._rotation >= 180) {
_local1.targetRot = 270;
} else {
_local1.targetRot = -90;
}
}
if (((_local1.targetRot - _local1._rotation) * (_local1.targetRot - _local1._rotation)) > 5) {
_local1._rotation = _local1._rotation + ((_local1.targetRot - _local1._rotation) / 2);
} else {
_local1._rotation = _local1.targetRot;
if (_local1._rotation == -180) {
_local1._rotation = 180;
}
if (_local1._rotation == 270) {
_local1._rotation = -90;
}
}
_local1.xCell = Math.floor((_local1.futureX / _local1._parent.cellsize) + 0.5);
_local1.yCell = Math.floor((_local1.futureY / _local1._parent.cellsize) + 0.5);
if ((_local1._parent.cells[_local1.xCell][_local1.yCell].gravType != 0) && (_local1._parent.cells[_local1.xCell][_local1.yCell].gravType != undefined)) {
if (_local1._parent.cells[_local1.xCell][_local1.yCell].gravType <= 4) {
_local1.gravType = _local1._parent.cells[_local1.xCell][_local1.yCell].gravType;
_local1.shiftGrav = 0;
} else if (_local1.shiftGrav != (_local1._parent.cells[_local1.xCell][_local1.yCell].gravType - 4)) {
_local1.shiftGrav = _local1._parent.cells[_local1.xCell][_local1.yCell].gravType - 4;
if (_local1.shiftGrav == _local1.gravType) {
if (_local1.gravType < 4) {
_local1.gravType++;
} else {
_local1.gravType = 1;
}
} else if (_local1.gravType > 1) {
_local1.gravType--;
} else {
_local1.gravType = 4;
}
}
}
_local1.rawHitTest();
_local1._y = _local1.futureY;
_local1._x = _local1.futureX;
}
function rawHitTest() {
var _local1 = this;
var _local3 = -1;
while (_local3 <= 1) {
var _local2 = -1;
while (_local2 <= 1) {
if ((_local1.xCell != 0) && (_local1.yCell != 0)) {
_local1.detailHitTest(_local1.xCell + _local3, _local1.yCell + _local2);
} else if (((_local1.xCell == 0) && (_local1.yCell != 0)) && (_local3 >= 0)) {
_local1.detailHitTest(_local1.xCell + _local3, _local1.yCell + _local2);
} else if (((_local1.xCell != 0) && (_local1.yCell == 0)) && (_local2 >= 0)) {
_local1.detailHitTest(_local1.xCell + _local3, _local1.yCell + _local2);
} else if ((_local3 >= 0) && (_local2 >= 0)) {
_local1.detailHitTest(_local1.xCell + _local3, _local1.yCell + _local2);
}
_local2++;
}
_local3++;
}
}
function detailHitTest(tmpX, tmpY) {
var _local1 = this;
var _local2 = tmpX;
var _local3 = tmpY;
var tile = _local1._parent.cells[_local2][_local3].tile;
if ((tile >= 1) && (tile <= 5)) {
var left = (_local1.futureX - (_local1._width / 2));
var right = (_local1.futureX + (_local1._width / 2));
var top = (_local1.futureY - (_local1._height / 2));
var bottom = (_local1.futureY + (_local1._height / 2));
if (tile == 1) {
var cLeft = (_local1._parent.cells[_local2][_local3].clip._x - (_local1._parent.cellsize / 2));
var cRight = (_local1._parent.cells[_local2][_local3].clip._x + (_local1._parent.cellsize / 2));
var cTop = (_local1._parent.cells[_local2][_local3].clip._y - (_local1._parent.cellsize / 2));
var cBottom = (_local1._parent.cells[_local2][_local3].clip._y + (_local1._parent.cellsize / 2));
} else if (tile == 2) {
var cLeft = (_local1._parent.cells[_local2][_local3].clip._x - (_local1._parent.cellsize / 2));
var cRight = (_local1._parent.cells[_local2][_local3].clip._x + (_local1._parent.cellsize / 2));
var cTop = (_local1._parent.cells[_local2][_local3].clip._y - (_local1._parent.cellsize / 2));
var cBottom = _local1._parent.cells[_local2][_local3].clip._y;
} else if (tile == 3) {
var cLeft = _local1._parent.cells[_local2][_local3].clip._x;
var cRight = (_local1._parent.cells[_local2][_local3].clip._x + (_local1._parent.cellsize / 2));
var cTop = (_local1._parent.cells[_local2][_local3].clip._y - (_local1._parent.cellsize / 2));
var cBottom = (_local1._parent.cells[_local2][_local3].clip._y + (_local1._parent.cellsize / 2));
} else if (tile == 4) {
var cLeft = (_local1._parent.cells[_local2][_local3].clip._x - (_local1._parent.cellsize / 2));
var cRight = (_local1._parent.cells[_local2][_local3].clip._x + (_local1._parent.cellsize / 2));
var cTop = _local1._parent.cells[_local2][_local3].clip._y;
var cBottom = (_local1._parent.cells[_local2][_local3].clip._y + (_local1._parent.cellsize / 2));
} else if (tile == 5) {
var cLeft = (_local1._parent.cells[_local2][_local3].clip._x - (_local1._parent.cellsize / 2));
var cRight = _local1._parent.cells[_local2][_local3].clip._x;
var cTop = (_local1._parent.cells[_local2][_local3].clip._y - (_local1._parent.cellsize / 2));
var cBottom = (_local1._parent.cells[_local2][_local3].clip._y + (_local1._parent.cellsize / 2));
}
if ((((bottom > cTop) && (top < cBottom)) && (left < cRight)) && (right > cLeft)) {
var projUp = ((cTop - (_local1._height / 2)) - _local1.futureY);
var projDown = ((cBottom + (_local1._height / 2)) - _local1.futureY);
var projLeft = ((cLeft - (_local1._width / 2)) - _local1.futureX);
var projRight = ((cRight + (_local1._width / 2)) - _local1.futureX);
if (Math.sqrt(projUp * projUp) < Math.sqrt(projDown * projDown)) {
var projY = projUp;
} else {
var projY = projDown;
}
if (Math.sqrt(projLeft * projLeft) < Math.sqrt(projRight * projRight)) {
var projX = projLeft;
} else {
var projX = projRight;
}
if (Math.sqrt(projX * projX) < Math.sqrt(projY * projY)) {
if ((_local1.gravType == 1) || (_local1.gravType == 3)) {
} else if ((_local1.gravType == 2) || (_local1.gravType == 4)) {
_local1.yStep = 0;
}
_local1.futureX = _local1.futureX + projX;
if ((projX == projRight) && (_local1.gravType == 2)) {
if (!_local1.onGround) {
_local1.onGround = true;
}
} else if ((projX == projLeft) && (_local1.gravType == 4)) {
if (!_local1.onGround) {
_local1.onGround = true;
}
}
} else {
if ((_local1.gravType == 1) || (_local1.gravType == 3)) {
_local1.yStep = 0;
} else if ((_local1.gravType == 2) || (_local1.gravType == 4)) {
}
_local1.futureY = _local1.futureY + projY;
if ((projY == projUp) && (_local1.gravType == 1)) {
if (!_local1.onGround) {
_local1.onGround = true;
}
} else if ((projY == projDown) && (_local1.gravType == 3)) {
if (!_local1.onGround) {
_local1.onGround = true;
}
}
}
}
}
}
var walkSpeed = 11.5;
var xStep = 0;
var yStep = 0;
var onGround = false;
var targetRot = 0;
var walking = false;
}
Symbol 1256 MovieClip [__Packages.MenuBox] Frame 0
class MenuBox extends MovieClip
{
function MenuBox () {
super();
}
function onLoad() {
var _local1 = this;
var _local2 = _root;
_local1._x = 550;
_local1._y = -_local1._height;
if (_local2.musicVol > 0) {
_local1.btnOn._alpha = 100;
_local1.btnOff._alpha = 50;
} else {
_local1.btnOn._alpha = 50;
_local1.btnOff._alpha = 100;
}
if (_local1._quality == "LOW") {
_local1.btnLow._alpha = 100;
_local1.btnMedium._alpha = 50;
_local1.btnHigh._alpha = 50;
} else if (_local1._quality == "MEDIUM") {
_local1.btnLow._alpha = 50;
_local1.btnMedium._alpha = 100;
_local1.btnHigh._alpha = 50;
} else {
_local1.btnLow._alpha = 50;
_local1.btnMedium._alpha = 50;
_local1.btnHigh._alpha = 100;
}
if ((_local2.currLvl <= 4) || (_local2.currLvl == 101)) {
_local1.bg.gotoAndStop(2);
} else if (((_local2.currLvl >= 5) && (_local2.currLvl <= 8)) || (_local2.currLvl == 102)) {
_local1.bg.gotoAndStop(3);
} else if (((_local2.currLvl >= 9) && (_local2.currLvl <= 12)) || (_local2.currLvl == 103)) {
_local1.bg.gotoAndStop(4);
} else {
_local1.bg.gotoAndStop(1);
}
}
function onEnterFrame() {
var _local1 = this;
_local1._y = _local1._y + ((_local1.targetY - _local1._y) / 3);
if (_local1._y < (-_local1._height)) {
(_local1.removeMovieClip());// not popped
}
}
}
Symbol 1257 MovieClip [__Packages.CountDown] Frame 0
class CountDown extends MovieClip
{
function CountDown () {
super();
}
function onLoad() {
var _local1 = this;
_local1._x = 275;
_local1._y = 100;
_local1._visible = false;
_local1 = _local1.stop();
}
function onEnterFrame() {
var _local1 = _root;
var _local2 = this;
if ((_local1.jukebox.music.position > 1000) && (_local1.jukebox.music.position <= 2000)) {
_local2._visible = true;
} else if ((_local1.jukebox.music.position > 2000) && (_local1.jukebox.music.position <= 3000)) {
(_local2.gotoAndStop(2));// not popped
} else if ((_local1.jukebox.music.position > 3000) && (_local1.jukebox.music.position <= 4000)) {
(_local2.gotoAndStop(3));// not popped
} else if ((_local1.jukebox.music.position > 4000) && (_local1.jukebox.music.position <= 5000)) {
(_local2.gotoAndStop(4));// not popped
} else if ((_local1.jukebox.music.position > 5000) && (_local1.jukebox.music.position <= 6000)) {
(_local2.gotoAndStop(5));// not popped
} else if ((_local1.jukebox.music.position > 6000) && (_local1.jukebox.music.position <= 7400)) {
(_local2.gotoAndStop(6));// not popped
} else if ((_local1.jukebox.music.position > 7400) && (_local1.jukebox.music.position <= 9000)) {
(_local2.gotoAndStop(7));// not popped
} else if (_local1.jukebox.music.position > 9000) {
}
}
}
Symbol 211 Button
on (release) {
getURL ("http://www.mindistortion.net", "_blank");
}
Symbol 213 MovieClip Frame 149
_root.play();
Symbol 257 Button
on (release) {
_root.play();
}
Symbol 258 MovieClip Frame 143
_root.play();
stop();
Symbol 269 MovieClip Frame 12
gotoAndPlay (1);
Symbol 271 MovieClip [boss1_comeout_1] Frame 1
var counter = 0;
Symbol 271 MovieClip [boss1_comeout_1] Frame 20
if (counter > (_parent._parent._parent.combatStatus / 10)) {
play();
} else {
counter++;
gotoAndPlay (10);
}
Symbol 271 MovieClip [boss1_comeout_1] Frame 28
_parent._parent._parent.player.health = _parent._parent._parent.player.health - 5;
_parent._parent._parent.player.hit = true;
if (_root.bonusScore >= 25) {
_root.bonusScore = _root.bonusScore - 25;
}
_parent._parent._parent.triggerStatus = 0;
_parent._parent.enemyStatus = "boss1_idle_1";
_parent._parent.outside = false;
_parent.attachMovie(_parent._parent.enemyStatus, "sprite", 1);
Symbol 279 MovieClip [boss1_keyfight_1] Frame 1
_parent._parent._parent.player.dontmove = true;
_parent._parent._parent.player._visible = false;
_parent._parent._parent.player._x = _parent._parent._x;
_parent._parent._parent.player._y = _parent._parent._y;
_parent._parent._parent.combatStatus = _parent._parent._parent.combatStatus - 10;
Symbol 279 MovieClip [boss1_keyfight_1] Frame 35
_parent._parent.outside = false;
_parent._parent._parent.player.dontmove = false;
_parent._parent._parent.player._visible = true;
_parent._parent._parent.triggerStatus = 0;
_parent._parent.enemyStatus = "boss1_idle_1";
_parent.attachMovie(_parent._parent.enemyStatus, "sprite", 1);
Symbol 299 MovieClip [boss3_jump_1] Frame 20
stop();
Symbol 304 MovieClip [boss3_running_1] Frame 17
gotoAndPlay (1);
Symbol 305 MovieClip Frame 23
gotoAndPlay (1);
Symbol 317 MovieClip [enemy2_attack_1] Frame 3
if (this.hitTest(_parent._parent._parent.player)) {
_parent._parent._parent.player.health = _parent._parent._parent.player.health - 15;
if (_parent._parent._parent.player.health < 0) {
_parent._parent._parent.player.health = 0;
}
_parent._parent._parent.player.hit = true;
if (_parent._xscale > 0) {
_parent._parent._parent.player.yStep = -11;
_parent._parent._parent.player.xStep = -7;
_parent._parent._parent.player.onGround = false;
} else {
_parent._parent._parent.player.yStep = -11;
_parent._parent._parent.player.xStep = 7;
_parent._parent._parent.player.onGround = false;
}
}
Symbol 317 MovieClip [enemy2_attack_1] Frame 18
_parent._parent.walking = true;
_parent._parent.enemyStatus = "enemy2_walk_1";
_parent.attachMovie(_parent._parent.enemyStatus, "sprite", 1);
Symbol 320 MovieClip [enemy2_walk_1] Frame 20
gotoAndPlay (1);
Symbol 321 MovieClip [enemy2_attack_2] Frame 18
_parent._parent.enemyStatus = "enemy2_idle_1";
_parent.attachMovie(_parent._parent.enemyStatus, "sprite", 1);
Symbol 322 MovieClip [enemy2_idle_1] Frame 29
var r = Math.floor(random(5));
if (r == 0) {
_parent.attachMovie("enemy2_idle_2", "sprite", 1);
}
gotoAndPlay (1);
Symbol 323 MovieClip [enemy2_idle_2] Frame 64
_parent.attachMovie(_parent._parent.enemyStatus, "sprite", 1);
Symbol 337 MovieClip [enemy3_attack_1] Frame 4
if (this.hitTest(_parent._parent._parent.player)) {
_parent._parent._parent.player.health = _parent._parent._parent.player.health - 20;
if (_parent._parent._parent.player.health < 0) {
_parent._parent._parent.player.health = 0;
}
_parent._parent._parent.player.hit = true;
if (_parent._xscale > 0) {
_parent._parent._parent.player.yStep = -5;
_parent._parent._parent.player.xStep = -9;
_parent._parent._parent.player.onGround = false;
} else {
_parent._parent._parent.player.yStep = -5;
_parent._parent._parent.player.xStep = 9;
_parent._parent._parent.player.onGround = false;
}
}
Symbol 337 MovieClip [enemy3_attack_1] Frame 17
_parent._parent.walking = true;
_parent._parent.enemyStatus = "enemy3_walk_1";
_parent.attachMovie(_parent._parent.enemyStatus, "sprite", 1);
Symbol 338 MovieClip [enemy3_walk_1] Frame 31
gotoAndPlay (1);
Symbol 350 MovieClip [enemy4_attack_1] Frame 4
if (this.hitTest(_parent._parent._parent.player)) {
_parent._parent._parent.player.health = _parent._parent._parent.player.health - 15;
if (_parent._parent._parent.player.health < 0) {
_parent._parent._parent.player.health = 0;
}
_parent._parent._parent.player.hit = true;
if (_parent._parent._parent.player._x < _parent._parent._x) {
_parent._parent._parent.player.yStep = -5;
_parent._parent._parent.player.xStep = -9;
_parent._parent._parent.player.onGround = false;
} else {
_parent._parent._parent.player.yStep = -5;
_parent._parent._parent.player.xStep = 9;
_parent._parent._parent.player.onGround = false;
}
}
Symbol 350 MovieClip [enemy4_attack_1] Frame 15
_parent._parent.enemyStatus = "enemy4_idle_1";
_parent.attachMovie(_parent._parent.enemyStatus, "sprite", 1);
Symbol 351 MovieClip [enemy4_idle_1] Frame 29
if (Math.floor(random(10) + 1) == 1) {
gotoAndPlay (20);
} else {
play();
}
Symbol 351 MovieClip [enemy4_idle_1] Frame 45
if (Math.floor(random(10) + 1) == 1) {
gotoAndPlay (1);
} else {
gotoAndPlay (35);
}
Symbol 358 MovieClip [enemy5_running_1] Frame 23
gotoAndPlay (1);
Symbol 365 MovieClip [enemy6_attack_1] Frame 3
if (this.hitTest(_parent._parent._parent.player)) {
_parent._parent._parent.player.health = _parent._parent._parent.player.health - 25;
if (_parent._parent._parent.player.health < 0) {
_parent._parent._parent.player.health = 0;
}
_parent._parent._parent.player.hit = true;
if (_parent._xscale > 0) {
_parent._parent._parent.player.yStep = -5;
_parent._parent._parent.player.xStep = -9;
_parent._parent._parent.player.onGround = false;
} else {
_parent._parent._parent.player.yStep = -5;
_parent._parent._parent.player.xStep = 9;
_parent._parent._parent.player.onGround = false;
}
}
Symbol 365 MovieClip [enemy6_attack_1] Frame 19
_parent._parent.walking = true;
_parent._parent.enemyStatus = "enemy6_walk_1";
_parent.attachMovie(_parent._parent.enemyStatus, "sprite", 1);
Symbol 366 MovieClip [enemy6_walk_1] Frame 24
gotoAndPlay (1);
Symbol 372 MovieClip Frame 15
gotoAndPlay (1);
Symbol 374 MovieClip [item0_1] Frame 23
gotoAndPlay (1);
Symbol 441 MovieClip [player_fall_1] Frame 20
stop();
Symbol 443 MovieClip [player_hit_1] Frame 15
if (_parent._parent.health > 0) {
_parent._parent.hit = false;
} else {
stop();
}
Symbol 444 MovieClip [player_idle_1] Frame 29
var r = Math.floor(random(20));
if (r <= 3) {
_parent.attachMovie("player_lookaround_1", "sprite", 1);
} else if (r == 4) {
_parent.attachMovie("player_lookaround_2", "sprite", 1);
} else if (r == 5) {
_parent.attachMovie("player_lookaround_3", "sprite", 1);
}
gotoAndPlay (1);
Symbol 445 MovieClip [player_jump_1] Frame 20
stop();
Symbol 446 MovieClip [player_lookaround_1] Frame 30
_parent.attachMovie(_parent._parent.playerStatus, "sprite", 1);
Symbol 447 MovieClip [player_running_1] Frame 23
gotoAndPlay (1);
Symbol 449 MovieClip [player_running_2] Frame 17
gotoAndPlay (1);
Instance of Symbol 452 MovieClip in Symbol 453 MovieClip Frame 1
onClipEvent (enterFrame) {
_rotation = (_rotation + 4);
}
Instance of Symbol 452 MovieClip in Symbol 453 MovieClip Frame 1
onClipEvent (enterFrame) {
_rotation = (_rotation + 6);
}
Instance of Symbol 452 MovieClip in Symbol 453 MovieClip Frame 1
onClipEvent (enterFrame) {
_rotation = (_rotation + 7);
}
Instance of Symbol 452 MovieClip in Symbol 453 MovieClip Frame 1
onClipEvent (enterFrame) {
_rotation = (_rotation + 8);
}
Instance of Symbol 452 MovieClip in Symbol 453 MovieClip Frame 1
onClipEvent (enterFrame) {
_rotation = (_rotation + 10);
}
Symbol 628 MovieClip [CountDown] Frame 1
#initclip 68
Object.registerClass("CountDown", CountDown);
#endinitclip
Symbol 665 Button
on (release) {
removeMovieClip(_root.worldContainer);
removeMovieClip(_root.hud);
removeMovieClip(_root.bg);
removeMovieClip(_root.countdown);
removeMovieClip(_root.msg);
_root.score = 0;
_root.lifes = 5;
_root.health = 100;
_root.currLvl = 0;
_root.gotoAndPlay("main_menu");
removeMovieClip(this);
}
Symbol 671 MovieClip [MenuBox] Frame 1
#initclip 67
Object.registerClass("MenuBox", MenuBox);
#endinitclip
stop();
btnOn.onRelease = function () {
var _local1 = _root;
_local1.musicVol = 80;
_local1.jukebox.targetVol = _local1.musicVol;
btnOn._alpha = 100;
btnOff._alpha = 50;
};
btnOff.onRelease = function () {
var _local1 = _root;
_local1.musicVol = 0;
_local1.jukebox.targetVol = _local1.musicVol;
btnOn._alpha = 50;
btnOff._alpha = 100;
};
btnLow.onRelease = function () {
_quality = "LOW";
btnLow._alpha = 100;
btnMedium._alpha = 50;
btnHigh._alpha = 50;
};
btnMedium.onRelease = function () {
_quality = "MEDIUM";
btnLow._alpha = 50;
btnMedium._alpha = 100;
btnHigh._alpha = 50;
};
btnHigh.onRelease = function () {
_quality = "HIGH";
btnLow._alpha = 50;
btnMedium._alpha = 50;
btnHigh._alpha = 100;
};
btnLeaveGame.onRelease = function () {
if (_currentframe == 1) {
nextFrame();
}
};
Symbol 671 MovieClip [MenuBox] Frame 2
btnNo.onRelease = function () {
prevFrame();
};
btnYes.onRelease = function () {
};
Symbol 680 MovieClip [lvl03_bg] Frame 1
onEnterFrame = function () {
_rotation = (_rotation-1);
};
Symbol 684 MovieClip Frame 1
stop();
Symbol 685 MovieClip [lvl03_bg2] Frame 1
var oldRot = _rotation;
var targetScale = 100;
var reScale = false;
var rotOffset = 0;
var currFrame = 1;
onEnterFrame = function () {
rotOffset = rotOffset + 0.2;
_rotation = ((-_root.worldContainer._rotation) + rotOffset);
if ((((oldRot - _rotation) * (oldRot - _rotation)) > 0.2) && (!reScale)) {
targetScale = 100 + Math.floor(random(200));
if (currFrame < 3) {
currFrame++;
} else {
currFrame = 1;
}
bg.gotoAndStop(currFrame);
reScale = true;
}
if ((((oldRot - _rotation) * (oldRot - _rotation)) <= 0.2) && (reScale)) {
reScale = false;
}
if (((targetScale - _xscale) * (targetScale - _xscale)) > 1) {
_xscale = (_xscale + ((targetScale - _xscale) / 8));
} else {
_xscale = targetScale;
}
_yscale = _xscale;
oldRot = _rotation;
};
Symbol 702 Button
on (release) {
play();
}
on (keyPress "<Space>") {
play();
}
on (keyPress "<Enter>") {
play();
}
Symbol 707 Button
on (release) {
_root.play();
}
Symbol 723 Button
on (release) {
gotoAndPlay(_currentframe + 1);
}
on (keyPress "<Space>") {
play();
}
on (keyPress "<Enter>") {
play();
}
Symbol 754 MovieClip [cine_1] Frame 3
stop();
Symbol 754 MovieClip [cine_1] Frame 78
_root.jukebox.playTrack("candy_meadows_1");
_root.jukebox.targetVol = _root.musicVol;
Symbol 754 MovieClip [cine_1] Frame 152
stop();
Symbol 754 MovieClip [cine_1] Frame 153
_root.jukebox.targetVol = 0;
Symbol 754 MovieClip [cine_1] Frame 164
stop();
Symbol 754 MovieClip [cine_1] Frame 165
_root.jukebox.targetVol = _root.musicVol;
Symbol 754 MovieClip [cine_1] Frame 175
stop();
Symbol 754 MovieClip [cine_1] Frame 176
_root.jukebox.targetVol = 0;
Symbol 754 MovieClip [cine_1] Frame 186
stop();
Symbol 754 MovieClip [cine_1] Frame 219
stop();
Symbol 754 MovieClip [cine_1] Frame 220
_root.jukebox.targetVol = _root.musicVol;
Symbol 754 MovieClip [cine_1] Frame 249
stop();
Symbol 754 MovieClip [cine_1] Frame 261
stop();
Symbol 754 MovieClip [cine_1] Frame 262
_root.jukebox.targetVol = _root.musicVol / 5;
Symbol 754 MovieClip [cine_1] Frame 283
stop();
Symbol 754 MovieClip [cine_1] Frame 284
_root.jukebox.targetVol = _root.musicVol;
Symbol 754 MovieClip [cine_1] Frame 289
stop();
Symbol 754 MovieClip [cine_1] Frame 295
stop();
Symbol 754 MovieClip [cine_1] Frame 301
stop();
Symbol 754 MovieClip [cine_1] Frame 307
stop();
Symbol 754 MovieClip [cine_1] Frame 317
stop();
Symbol 754 MovieClip [cine_1] Frame 338
stop();
_root.play();
Symbol 784 MovieClip [cine_2] Frame 120
_root.jukebox.playTrack("candy_meadows_2");
_root.jukeBox.targetVol = _root.musicVol / 3;
Symbol 784 MovieClip [cine_2] Frame 188
_root.jukeBox.targetVol = _root.musicVol;
Symbol 784 MovieClip [cine_2] Frame 190
stop();
_root.play();
Symbol 807 MovieClip [cine_3] Frame 265
stop();
_root.play();
Symbol 833 MovieClip [cine_4] Frame 175
stop();
_root.play();
Symbol 865 MovieClip [cine_5] Frame 1
_root.jukeBox.playTrack("asylum_1");
_root.jukeBox.targetVol = _root.musicVol / 3;
Symbol 865 MovieClip [cine_5] Frame 84
stop();
Symbol 865 MovieClip [cine_5] Frame 98
stop();
Symbol 865 MovieClip [cine_5] Frame 105
stop();
Symbol 865 MovieClip [cine_5] Frame 110
stop();
Symbol 865 MovieClip [cine_5] Frame 115
stop();
Symbol 865 MovieClip [cine_5] Frame 120
stop();
Symbol 865 MovieClip [cine_5] Frame 125
stop();
Symbol 865 MovieClip [cine_5] Frame 139
stop();
Symbol 865 MovieClip [cine_5] Frame 146
stop();
Symbol 865 MovieClip [cine_5] Frame 151
stop();
Symbol 865 MovieClip [cine_5] Frame 156
stop();
Symbol 865 MovieClip [cine_5] Frame 161
stop();
Symbol 865 MovieClip [cine_5] Frame 166
stop();
Symbol 865 MovieClip [cine_5] Frame 171
stop();
Symbol 865 MovieClip [cine_5] Frame 176
stop();
Symbol 865 MovieClip [cine_5] Frame 199
_root.jukeBox.targetVol = _root.musicVol;
Symbol 865 MovieClip [cine_5] Frame 200
stop();
_root.play();
Symbol 874 MovieClip Frame 10
gotoAndPlay (1);
Symbol 875 Button
on (release) {
gotoAndPlay (765);
}
Symbol 930 Button
on (release) {
getURL ("http://www.mindistortion.net", "_blank");
}
Symbol 931 Button
on (release) {
getURL ("http://www.armorgames.com", "_blank");
}
Symbol 932 Button
on (release) {
getURL ("http://www.newgrounds.com/audio", "_blank");
}
Symbol 933 Button
on (release) {
getURL ("http://www.newgrounds.com", "_blank");
}
Symbol 934 Button
on (release) {
getURL ("http://www.mindistortion.net/forum", "_blank");
}
Symbol 942 Button
on (release) {
_root.score = 0;
_root.lifes = 5;
_root.health = 100;
_root.endSuccess = false;
_root.gotoAndPlay("main_menu");
_root.currLvl = 0;
removeMovieClip(this);
}
Symbol 948 Button
on (release) {
_root.score = _root.score + (_root.health * 2);
_root.score = _root.score + (_root.lifes * 200);
_root.endSuccess = false;
_root.gotoAndPlay("submit_score");
_root.currLvl = 0;
removeMovieClip(this);
}
Symbol 949 MovieClip [cine_6] Frame 430
_root.jukebox.playTrack("asylum_1");
_root.jukebox.targetVol = 10;
Symbol 949 MovieClip [cine_6] Frame 521
stop();
Symbol 949 MovieClip [cine_6] Frame 522
_root.jukebox.targetVol = 20;
Symbol 949 MovieClip [cine_6] Frame 590
stop();
Symbol 949 MovieClip [cine_6] Frame 591
_root.jukebox.targetVol = 35;
Symbol 949 MovieClip [cine_6] Frame 660
stop();
Symbol 949 MovieClip [cine_6] Frame 661
_root.jukebox.targetVol = 55;
Symbol 949 MovieClip [cine_6] Frame 746
stop();
_root.jukebox.targetVol = 0;
Symbol 949 MovieClip [cine_6] Frame 1829
stop();
Symbol 950 Button
on (release) {
_root.currLvl = 12;
_root.lifes--;
_root.play();
}
Symbol 961 MovieClip [cine_7] Frame 1
_root.jukebox.playTrack("");
Symbol 961 MovieClip [cine_7] Frame 390
stop();
_root.currLvl = 12;
_root.lifes--;
_root.play();
Symbol 965 Button
on (release) {
_root.endSuccess = false;
_root.gotoAndPlay("submit_score");
_root.currLvl = 0;
removeMovieClip(this);
}
Symbol 970 Button
on (release) {
if (_root.unlockedLevels == 0) {
_root.currLvl = 0;
} else if (_root.unlockedLevels == 1) {
_root.currLvl = 101;
} else if (_root.unlockedLevels == 2) {
_root.currLvl = 102;
}
_root.score = 0;
_root.lifes = 5;
_root.health = 100;
_root.endSuccess = false;
_root.gotoAndPlay("cinematics");
removeMovieClip(this);
}
Symbol 971 Button
on (release) {
getURL ("http://www.armorgames.com", "_blank");
}
Symbol 972 Button
on (release) {
getURL ("http://www.mindistortion.net", "_blank");
}
Symbol 973 MovieClip [game_over] Frame 1
_root.jukebox.targetVol = 0;
Symbol 973 MovieClip [game_over] Frame 50
stop();
Symbol 980 MovieClip Frame 1
stop();
Symbol 1005 MovieClip Frame 49
gotoAndPlay (1);
Symbol 1006 Button
on (release) {
_root.musicVol = 0;
_root.jukebox.targetVol = _root.musicVol;
nextFrame();
}
Symbol 1009 Button
on (release) {
_root.musicVol = 80;
_root.jukebox.targetVol = _root.musicVol;
prevFrame();
}
Symbol 1010 MovieClip Frame 1
if (_root.musicVol > 0) {
stop();
} else {
nextFrame();
}
Instance of Symbol 1005 MovieClip in Symbol 1010 MovieClip Frame 1
on (release) {
nextFrame();
_root.jukebox.targetVol = 0;
}
Instance of Symbol 1008 MovieClip in Symbol 1010 MovieClip Frame 2
on (release) {
nextFrame();
_root.jukebox.targetVol = 0;
}
Symbol 1016 Button
on (release) {
getURL ("http://www.mindistortion.net", "_blank");
}
Symbol 1020 Button
on (release) {
nextFrame();
}
Symbol 1024 Button
on (release) {
getURL ("http://www.mindistortion.net", "_blank");
}
Symbol 1027 Button
on (release) {
prevFrame();
}
Symbol 1031 Button
on (release) {
getURL ("http://www.newgrounds.com/audio", "_blank");
}
Symbol 1032 MovieClip Frame 1
stop();
Symbol 1033 Button
on (release) {
nextFrame();
}
Symbol 1038 Button
on (release) {
prevFrame();
}
Symbol 1053 MovieClip Frame 1
stop();
var secrets = 0;
if (!_root.secretsFound[0]) {
s1._visible = false;
} else {
secrets++;
}
if (!_root.secretsFound[1]) {
s2._visible = false;
} else {
secrets++;
}
if (!_root.secretsFound[2]) {
s3._visible = false;
} else {
secrets++;
}
if (!_root.secretsFound[3]) {
s4._visible = false;
} else {
secrets++;
}
if (!_root.secretsFound[4]) {
s5._visible = false;
} else {
secrets++;
}
if (!_root.secretsFound[5]) {
s6._visible = false;
} else {
secrets++;
}
if (secrets < 1) {
emo = ":(";
} else if ((secrets >= 1) && (secrets < 2)) {
emo = ":/";
} else if ((secrets >= 2) && (secrets < 6)) {
emo = ":)";
} else {
emo = ":D";
}
if (secrets >= 6) {
_root.medalsEarned[3] = true;
}
txtStatistic.text = (("You've found " + secrets) + " of 6 secret items! ") + emo;
onEnterFrame = function () {
var _local1 = _root;
if (s1.hitTest(_local1._xmouse, _local1._ymouse, true) && (_local1.secretsFound[0])) {
txtDescr.text = "Why are you wearing that stupid boy suit?";
} else if (s2.hitTest(_local1._xmouse, _local1._ymouse, true) && (_local1.secretsFound[1])) {
txtDescr.text = "See no evil, hear no evil, say no evil...";
} else if (s3.hitTest(_local1._xmouse, _local1._ymouse, true) && (_local1.secretsFound[2])) {
txtDescr.text = "I was cured, all right.";
} else if (s4.hitTest(_local1._xmouse, _local1._ymouse, true) && (_local1.secretsFound[3])) {
txtDescr.text = "Lemme guess, the princess is in another castle...";
} else if (s5.hitTest(_local1._xmouse, _local1._ymouse, true) && (_local1.secretsFound[4])) {
txtDescr.text = "So you found the meaning of life. Now what?";
} else if (s6.hitTest(_local1._xmouse, _local1._ymouse, true) && (_local1.secretsFound[5])) {
txtDescr.text = "If you hate yourself you'll have to hug yourself.";
} else {
txtDescr.text = "";
}
};
Symbol 1053 MovieClip Frame 2
var medals = 0;
if (!_root.medalsEarned[0]) {
m1._visible = false;
} else {
medals++;
}
if (!_root.medalsEarned[1]) {
m2._visible = false;
} else {
medals++;
}
if (!_root.medalsEarned[2]) {
m3._visible = false;
} else {
medals++;
}
if (!_root.medalsEarned[3]) {
m4._visible = false;
} else {
medals++;
}
if (medals < 1) {
emo = ":(";
} else if ((medals >= 1) && (medals < 2)) {
emo = ":/";
} else if ((medals >= 2) && (medals < 4)) {
emo = ":)";
} else {
emo = ":D";
}
txtStatistic.text = (("You've earned " + medals) + " of 4 medals! ") + emo;
Symbol 1056 Button
on (release) {
getURL ("http://www.mindistortion.net", "_blank");
}
Symbol 1106 MovieClip Frame 1
_root.myurl = _root._url;
_root.domain1 = _root.myurl.substring(0, 28);
_root.domain2 = _root.myurl.substring(0, 35);
_root.domain3 = _root.myurl.substring(0, 31);
if (((_root.domain1 == "http://www.mindistortion.net") || (_root.domain2 == "http://mindistortion.freshgames.net")) || (_root.domain3 == "http://mindistortion.finito.net")) {
gotoAndPlay (5);
} else {
gotoAndStop (2);
}
Symbol 1106 MovieClip Frame 8
stop();
remoteVars = new LoadVars();
remoteVars.load("http://www.mindistortion.net/processing/readHighscore2.php?list_size=15&highscore_table=highscore_mindscape");
remoteVars.onLoad = function () {
name1 = remoteVars.name1;
name2 = remoteVars.name2;
name3 = remoteVars.name3;
name4 = remoteVars.name4;
name5 = remoteVars.name5;
name6 = remoteVars.name6;
name7 = remoteVars.name7;
name8 = remoteVars.name8;
name9 = remoteVars.name9;
name10 = remoteVars.name10;
name11 = remoteVars.name11;
name12 = remoteVars.name12;
name13 = remoteVars.name13;
name14 = remoteVars.name14;
name15 = remoteVars.name15;
score1 = remoteVars.score1;
score2 = remoteVars.score2;
score3 = remoteVars.score3;
score4 = remoteVars.score4;
score5 = remoteVars.score5;
score6 = remoteVars.score6;
score7 = remoteVars.score7;
score8 = remoteVars.score8;
score9 = remoteVars.score9;
score10 = remoteVars.score10;
score11 = remoteVars.score11;
score12 = remoteVars.score12;
score13 = remoteVars.score13;
score14 = remoteVars.score14;
score15 = remoteVars.score15;
play();
};
Symbol 1106 MovieClip Frame 10
stop();
Symbol 1126 Button
on (release) {
getURL ("http://www.mindistortion.net/updates/mindscape.php", "_blank");
}
Symbol 1130 Button
on (release) {
getURL ("http://www.armorgames.com", "_blank");
}
Symbol 1158 MovieClip Frame 1
var targetX = _x;
var targetY = _y;
var targetRot = _parent._rotation;
if (_root.unlockedLevels < 2) {
btnLevel3._visible = false;
}
if (_root.unlockedLevels < 1) {
btnLevel2._visible = false;
}
onEnterFrame = function () {
_x = (_x + ((targetX - _x) / 4));
_y = (_y + ((targetY - _y) / 4));
_parent._rotation = _parent._rotation + ((targetRot - _parent._rotation) / 7);
};
btnPlay.onPress = function () {
var _local1 = _root;
_local1.itemsCollected[0] = 0;
_local1.itemsCollected[1] = 0;
_local1.itemsCollected[2] = 0;
_local1.play();
};
btnSelectLevel.onPress = function () {
targetX = 0;
targetY = 700;
targetRot = 90;
};
btnHighscores.onPress = function () {
targetX = -875;
targetY = 700;
targetRot = 0;
};
btnTrophyRoom.onPress = function () {
targetX = -950;
targetY = 0;
targetRot = 180;
};
btnCredits.onPress = function () {
targetX = -550;
targetY = -680;
targetRot = -90;
};
btnBack1.onPress = function () {
targetX = -145;
targetY = 0;
targetRot = 0;
};
btnBack2.onPress = function () {
targetX = -145;
targetY = 0;
targetRot = 0;
};
btnBack3.onPress = function () {
targetX = -145;
targetY = 0;
targetRot = 0;
};
btnBack4.onPress = function () {
targetX = -145;
targetY = 0;
targetRot = 0;
};
btnLevel1.onPress = function () {
var _local1 = _root;
_local1.itemsCollected[0] = 0;
_local1.itemsCollected[1] = 0;
_local1.itemsCollected[2] = 0;
_local1.play();
};
btnLevel2.onPress = function () {
var _local1 = _root;
_local1.itemsCollected[0] = 0;
_local1.itemsCollected[1] = 0;
_local1.itemsCollected[2] = 0;
_local1.currLvl = 101;
_local1.play();
};
btnLevel3.onPress = function () {
var _local1 = _root;
_local1.itemsCollected[0] = 0;
_local1.itemsCollected[1] = 0;
_local1.itemsCollected[2] = 0;
_local1.currLvl = 102;
_local1.play();
};
Symbol 1162 Button
on (release) {
_root.score = 0;
_root.lifes = 5;
_root.health = 100;
_root.endSuccess = false;
_root.gotoAndPlay("main_menu");
_root.currLvl = 0;
}
Symbol 1172 Button
on (release) {
if (playername != "") {
play();
}
}
Symbol 1221 MovieClip Frame 1
stop();
score = _root.score;
playername = "";
loaded = "";
Symbol 1221 MovieClip Frame 3
highscore_table = "highscore_mindscape";
list_size = 15;
loadVariables ("http://www.mindistortion.net/processing/writeHighscore2.php", this, "POST");
Symbol 1221 MovieClip Frame 7
if ((loaded == undefined) || (loaded == "")) {
gotoAndPlay(_currentframe - 2);
}
Symbol 1221 MovieClip Frame 8
stop();
remoteVars = new LoadVars();
remoteVars.load("http://www.mindistortion.net/processing/readHighscore2.php?list_size=15&highscore_table=highscore_mindscape");
remoteVars.onLoad = function () {
name1 = remoteVars.name1;
name2 = remoteVars.name2;
name3 = remoteVars.name3;
name4 = remoteVars.name4;
name5 = remoteVars.name5;
name6 = remoteVars.name6;
name7 = remoteVars.name7;
name8 = remoteVars.name8;
name9 = remoteVars.name9;
name10 = remoteVars.name10;
name11 = remoteVars.name11;
name12 = remoteVars.name12;
name13 = remoteVars.name13;
name14 = remoteVars.name14;
name15 = remoteVars.name15;
score1 = remoteVars.score1;
score2 = remoteVars.score2;
score3 = remoteVars.score3;
score4 = remoteVars.score4;
score5 = remoteVars.score5;
score6 = remoteVars.score6;
score7 = remoteVars.score7;
score8 = remoteVars.score8;
score9 = remoteVars.score9;
score10 = remoteVars.score10;
score11 = remoteVars.score11;
score12 = remoteVars.score12;
score13 = remoteVars.score13;
score14 = remoteVars.score14;
score15 = remoteVars.score15;
play();
};
Symbol 1221 MovieClip Frame 10
stop();