Frame 1
_global.ipb_get_gname = function () {
var _local4 = _root._url;
var _local5 = "";
var _local3 = "";
var _local6 = (_local4.lastIndexOf("\\") + 1);
if ((_local6 == -1) || (_local6 == 0)) {
_local6 = _local4.lastIndexOf("/") + 1;
}
var _local2 = _local6;
var _local7 = String(_local4).length;
while (_local2 < String(_local4).length) {
_local3 = _local4.charAt(_local2);
if (_local3 == ".") {
break;
}
_local5 = _local5 + _local3;
_local2++;
}
return(_local5);
};
ipb_gname = _global.ipb_get_gname();
xx = new LoadVars();
xx.onLoad = function (success) {
if (success) {
_global.ipb_scoreVar = this.scoreVar;
}
};
fname = ((("arcade/gamedata/" + ipb_gname) + "/") + ipb_gname) + ".txt";
xx.load(fname);
_root.DRScore = 0;
_root.ng = new NitromeGame();
_root.ng.init("headcase", "groodle_", 25);
_root.popup_holder_frame = 20;
_root.score = 0;
swlist = "arcade/gamedata/headcaseDR/stinger.swf";
stingerURL = swlist;
stinger_mc = _root.candystand_clip;
stinger_mc.loadMovie(stingerURL);
onEnterFrame = function () {
if (!((stinger_mc._currentframe > 1) && (stinger_mc._currentframe == stinger_mc._totalframes))) {
var _loc2 = ((Stage.width - stinger_mc.thewidth) / 2);
var _loc1 = ((Stage.height - stinger_mc.theheight) / 2);
stinger_mc._x = _loc2;
stinger_mc._y = _loc1;
} else {
delete onEnterFrame;
removeMovieClip(stinger_mc);
stinger_mc._visible = false;
stinger_mc._x = 2000;
gotoAndStop ("preloader");
}
};
stop();
Frame 2
stop();
Frame 3
gotoAndStop ("nitrome");
Frame 19
_root.mc.startMenuMusic(false);
_root.attachMovie("lock", "lock", 999);
gotoAndStop ("title_screen");
Frame 20
stop();
Frame 30
stop();
Instance of Symbol 169 MovieClip [StickyfeetFont] in Frame 30
//component parameters
onClipEvent (construct) {
align = "center";
line_spacing = 16;
text = "credits";
tracking = -1;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Instance of Symbol 169 MovieClip [StickyfeetFont] in Frame 30
//component parameters
onClipEvent (construct) {
align = "center";
line_spacing = 16;
text = "simon hunter";
tracking = -1;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Instance of Symbol 169 MovieClip [StickyfeetFont] in Frame 30
//component parameters
onClipEvent (construct) {
align = "center";
line_spacing = 16;
text = "aaron steed";
tracking = -1;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Instance of Symbol 169 MovieClip [StickyfeetFont] in Frame 30
//component parameters
onClipEvent (construct) {
align = "center";
line_spacing = 16;
text = "lee nicklen";
tracking = -1;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Frame 40
stop();
Instance of Symbol 169 MovieClip [StickyfeetFont] in Frame 40
//component parameters
onClipEvent (construct) {
align = "center";
line_spacing = 16;
text = "help";
tracking = -1;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Frame 50
stop();
Instance of Symbol 169 MovieClip [StickyfeetFont] in Frame 50
//component parameters
onClipEvent (construct) {
align = "center";
line_spacing = 16;
text = "high scores";
tracking = -1;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Instance of Symbol 169 MovieClip [StickyfeetFont] in Frame 60
//component parameters
onClipEvent (construct) {
align = "center";
line_spacing = 16;
text = "submit score";
tracking = -1;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Frame 60
stop();
gname = "headcaseDR_v2";
_root.DRScore = _root.score;
gscore = _root.DRScore;
_global.ipbSend();
Frame 70
stop();
Frame 80
stop();
Frame 90
var game = new GameEngine(stage);
Instance of Symbol 169 MovieClip [StickyfeetFont] in Frame 90
//component parameters
onClipEvent (construct) {
align = "left";
line_spacing = 16;
text = "health";
tracking = -1;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Frame 100
loading_clip.gotoAndStop("loading");
_root.gotoAndStop("game");
Frame 111
var timer = this.createEmptyMovieClip("timer", 0);
timer.count = 0;
timer.delay = 300;
timer.key_listener = new Object();
timer.key_listener.t = timer;
timer.mouse_listener = new Object();
timer.mouse_listener.t = timer;
timer.key_pressed = false;
timer.mouse_pressed = false;
timer.key_listener.onKeyDown = function () {
this.t.key_pressed = true;
};
timer.mouse_listener.onMouseDown = function () {
this.t.mouse_pressed = true;
};
Key.addListener(timer.key_listener);
Mouse.addListener(timer.mouse_listener);
timer.onEnterFrame = function () {
this.count++;
if (((this.count >= this.delay) || (this.mouse_pressed)) || (this.key_pressed)) {
Key.removeListener(this.key_listener);
Mouse.removeListener(this.mouse_listener);
_root.tt.doTween("game");
this.removeMovieClip();
}
};
stop();
Symbol 1340 MovieClip Frame 1
if (yy.savescore == 1) {
if (ipb_score == undefined) {
ipb_score = eval (_global.ipb_scoreVar);
}
xx = new LoadVars();
xx.arcadegid = _root.ibpro_gameid;
xx.gscore = ipb_score;
xx.gname = _global.ipb_get_gname();
xx.enscore = (ipb_score * yy.randchar) ^ yy.randchar2;
xx.send("index.php?autocom=arcade&do=savescore", "_self", "POST");
stop();
}
_global.ipbSend = function (ipb_score) {
_root._visible = false;
_root.enabled = false;
xx = new LoadVars();
yy = new LoadVars();
xx.sendAndLoad("index.php?autocom=arcade&do=verifyscore", yy, "POST");
};
Symbol 7 MovieClip [lock] Frame 1
#initclip 97
Object.registerClass("lock", com.nitrome.util.Lock);
#endinitclip
Symbol 7 MovieClip [lock] Frame 2
stop();
Symbol 131 MovieClip [Defaults] Frame 1
#initclip 88
Object.registerClass("Defaults", mx.skins.halo.Defaults);
#endinitclip
Symbol 132 MovieClip [UIObjectExtensions] Frame 1
#initclip 89
Object.registerClass("UIObjectExtensions", mx.core.ext.UIObjectExtensions);
#endinitclip
Symbol 133 MovieClip [UIObject] Frame 1
#initclip 90
Object.registerClass("UIObject", mx.core.UIObject);
#endinitclip
stop();
Symbol 138 MovieClip [FocusRect] Frame 1
#initclip 92
Object.registerClass("FocusRect", mx.skins.halo.FocusRect);
#endinitclip
Symbol 136 Button
on (keyPress "<Tab>") {
this.tabHandler();
}
Symbol 137 MovieClip Frame 1
#initclip 91
Object.registerClass("FocusManager", mx.managers.FocusManager);
if (_root.focusManager == undefined) {
_root.createClassObject(mx.managers.FocusManager, "focusManager", mx.managers.DepthManager.highestDepth--);
}
#endinitclip
Symbol 139 MovieClip [FocusManager] Frame 1
#initclip 93
Object.registerClass("FocusManager", mx.managers.FocusManager);
#endinitclip
stop();
Symbol 140 MovieClip [UIComponentExtensions] Frame 1
#initclip 94
Object.registerClass("UIComponentExtensions", mx.core.ext.UIComponentExtensions);
#endinitclip
Symbol 141 MovieClip [UIComponent] Frame 1
#initclip 95
Object.registerClass("UIComponent", mx.core.UIComponent);
#endinitclip
stop();
Symbol 169 MovieClip [StickyfeetFont] Frame 1
#initclip 96
Object.registerClass("StickyfeetFont", StickyfeetFont);
#endinitclip
stop();
Symbol 1273 MovieClip [__Packages.NitromeGame] Frame 0
class NitromeGame
{
var level_id, total_levels, game_id;
function NitromeGame () {
}
function init(game_id, level_id, total_levels) {
this.level_id = level_id;
this.total_levels = total_levels;
this.game_id = game_id.toLowerCase();
}
function getGameId() {
return(game_id);
}
function getTotalLevels() {
return(total_levels);
}
function getNitrome() {
var _local6 = false;
var _local3 = 0;
while (_local3 < nitrome_url.length) {
var _local5 = nitrome_url[_local3];
if (_root._url.substr(0, _local5.length) == _local5) {
_local6 = true;
break;
}
_local3++;
}
_local3 = 1;
while (_local3 <= 30) {
var _local4 = "nitrome.com";
if (_root._url.substr(_local3, _local4.length) == _local4) {
_local6 = true;
}
_local3++;
}
return(_local6);
}
function getSwfPath() {
var _local2 = _url;
var _local1 = _local2.length;
while (_local1 >= 0) {
if (_local2.charAt(_local1) == "/") {
_local2 = _local2.slice(0, _local1 + 1);
break;
}
_local1--;
}
return("");
}
function getLevelName(level_number, file_ext) {
var _local3 = new com.nitrome.util.MD5();
var _local2 = "";
if (level_number < 10) {
_local2 = "0";
if (_local2) {
}
}
var _local4 = _local3.hash(String((level_id + _local2) + level_number));
return(_local4 + file_ext);
}
function setLevelUnlocked(level_number, save_id) {
if ((save_id == undefined) || (save_id == null)) {
save_id = 1;
}
var _local8 = ("so_" + game_id) + String(save_id);
var _local3 = SharedObject.getLocal(_local8);
var _local4 = false;
for (var _local5 in _local3) {
_local4 = true;
}
if (_local4 == false) {
var _local6 = new Array(total_levels);
var _local2 = 0;
while (_local2 < _local6.length) {
_local6[_local2] = 0;
_local2++;
}
_local6[0] = 1;
} else if (_local3.data.levels_unlocked == undefined) {
var _local6 = new Array(total_levels);
var _local2 = 0;
while (_local2 < _local6.length) {
_local6[_local2] = 0;
_local2++;
}
_local6[0] = 1;
} else {
var _local6 = _local3.data.levels_unlocked;
}
_local6[level_number - 1] = 1;
_local3.data.levels_unlocked = _local6;
_local3.flush();
}
function getLevelUnlocked(level_number, save_id) {
if ((save_id == undefined) || (save_id == null)) {
save_id = 1;
}
var _local9 = ("so_" + game_id) + String(save_id);
var _local4 = SharedObject.getLocal(_local9);
var _local5 = false;
for (var _local6 in _local4) {
_local5 = true;
}
if (_local5 == false) {
var _local3 = new Array(total_levels);
var _local2 = 0;
while (_local2 < _local3.length) {
_local3[_local2] = 0;
_local2++;
}
_local3[0] = 1;
_local4.data.levels_unlocked = _local3;
_local4.flush();
if (level_number == 1) {
return(true);
}
return(false);
}
if (_local4.data.levels_unlocked == undefined) {
var _local3 = new Array(total_levels);
var _local2 = 0;
while (_local2 < _local3.length) {
_local3[_local2] = 0;
_local2++;
}
_local3[0] = 1;
_local4.data.levels_unlocked = _local3;
_local4.flush();
if (level_number == 1) {
return(true);
}
return(false);
}
if (_local4.data.levels_unlocked[level_number - 1] == 1) {
return(true);
}
if (_local4.data.levels_unlocked[level_number - 1] == 0) {
return(false);
}
}
function setLevelScore(score, level_number, save_id) {
if ((save_id == undefined) || (save_id == null)) {
save_id = 1;
}
var _local6 = ("so_" + game_id) + String(save_id);
var _local2 = SharedObject.getLocal(_local6);
var _local3 = false;
for (var _local4 in _local2) {
_local3 = true;
}
if (_local3 == false) {
_local2.data.level_scores = new Array();
_local2.data.level_scores[level_number] = score;
} else if (_local2.data.level_scores == undefined) {
_local2.data.level_scores = new Array();
_local2.data.level_scores[level_number] = score;
} else {
_local2.data.level_scores[level_number] = score;
}
_local2.flush();
}
function getLevelScore(level_number, save_id) {
if ((save_id == undefined) || (save_id == null)) {
save_id = 1;
}
var _local6 = ("so_" + game_id) + String(save_id);
var _local2 = SharedObject.getLocal(_local6);
var _local3 = false;
for (var _local4 in _local2) {
_local3 = true;
}
if (_local3 == false) {
return(0);
}
if (_local2.data.level_scores == undefined) {
return(0);
}
return(_local2.data.level_scores[level_number]);
}
function getTotalScore(save_id) {
if ((save_id == undefined) || (save_id == null)) {
save_id = 1;
}
var _local8 = ("so_" + game_id) + String(save_id);
var _local2 = SharedObject.getLocal(_local8);
var _local5 = false;
for (var _local6 in _local2) {
_local5 = true;
}
if (_local5 == false) {
return(0);
}
if (_local2.data.level_scores == undefined) {
return(0);
}
var _local4 = 0;
var _local3 = 0;
while (_local3 < _local2.data.level_scores.length) {
if ((_local2.data.level_scores[_local3] != undefined) && (!isNaN(_local2.data.level_scores[_local3]))) {
_local4 = _local4 + _local2.data.level_scores[_local3];
}
_local3++;
}
return(_local4);
}
function getLastSavedScore(save_id) {
if ((save_id == undefined) || (save_id == null)) {
save_id = 1;
}
var _local6 = ("so_" + game_id) + String(save_id);
var _local2 = SharedObject.getLocal(_local6);
var _local3 = false;
for (var _local4 in _local2) {
_local3 = true;
}
if (_local3 == false) {
return(0);
}
if (_local2.data.last_saved_score == undefined) {
return(0);
}
return(_local2.data.last_saved_score);
}
function setLastSavedScore(score, save_id) {
if ((save_id == undefined) || (save_id == null)) {
save_id = 1;
}
var _local4 = ("so_" + game_id) + String(save_id);
var _local2 = SharedObject.getLocal(_local4);
_local2.data.last_saved_score = score;
_local2.flush();
}
function getSubmitScoreUrl() {
return(submit_url);
}
function getRetrieveScoreUrl() {
return(retrieve_url);
}
function getHighscoreLine(data_string, pos) {
var _local4 = data_string.split("|");
var _local1 = _local4[pos - 1];
if (((((_local1 == "0") || (_local1 == "1")) || (_local1 == undefined)) || (_local1 == null)) || (_local1 == "")) {
return(null);
}
var _local2 = _local1.split("_");
if ((_local2[1] == "n") || (_local2[2] == "n")) {
return(null);
}
var _local3 = new Object();
_local3.username = _local2[2];
_local3.score = _local2[1];
_local3.rank = _local2[0];
return(_local3);
}
function displayNextButton(data_string) {
var _local2 = data_string.split("|");
var _local1 = _local2[10];
if (_local1 == "1") {
return(true);
}
if (_local1 == "0") {
return(false);
}
}
function displayPreviousButton(data_string) {
var _local2 = data_string.split("|");
var _local1 = _local2[11];
if (_local1 == "1") {
return(true);
}
if (_local1 == "0") {
return(false);
}
}
function getScoreData(score, username) {
var _local3 = (((String(score) + "_") + game_id) + "_") + username.toLowerCase();
trace("encrypting: " + _local3);
var _local2 = encryptString(ar_key, _local3);
trace("encrypted: " + _local2);
trace(decryptString(ar_key, _local2));
return(_local2);
}
function encryptString(key, s) {
ff = convertKey(key);
var _local9 = "";
var _local10 = 0;
var _local7 = 0;
while (_local7 < s.length) {
var _local5 = s.substr(_local7, 1);
var _local4;
var _local2 = 0;
while (_local2 < ar_1.length) {
if (ar_1[_local2] == _local5) {
_local4 = _local2;
break;
}
_local2++;
}
adj = applyFudgeFactor();
var _local6 = _local10 + adj;
var _local3 = Math.round(_local6) + _local4;
_local3 = checkRange(_local3);
_local10 = _local6 + _local3;
var _local8 = ar_2[_local3];
_local9 = _local9 + _local8;
_local7++;
}
return(_local9);
}
function convertKey(key) {
var _local8 = new Array();
_local8.push(key.length);
var _local6 = 0;
var _local5 = 0;
while (_local5 < key.length) {
var _local4 = key.substr(_local5, 1);
var _local3;
var _local2 = 0;
while (_local2 < ar_1.length) {
if (ar_1[_local2] == _local4) {
_local3 = _local2;
break;
}
_local2++;
}
_local8.push(_local3);
_local6 = _local6 + _local3;
_local5++;
}
_local8.push(_local6);
return(_local8);
}
function applyFudgeFactor() {
var _local2 = Number(ff.shift());
_local2 = _local2 + adj;
ff.push(_local2);
return(_local2);
}
function checkRange(num) {
num = Math.round(num);
var _local3 = ar_1.length;
while (num >= _local3) {
num = num - _local3;
}
while (num < 0) {
num = num + _local3;
}
return(num);
}
function decryptString(key, s) {
adj = 1.75;
ff = convertKey(key);
var _local9 = "";
var _local10 = 0;
var _local7 = 0;
while (_local7 < s.length) {
var _local5 = s.substr(_local7, 1);
var _local4;
var _local2 = 0;
while (_local2 < ar_2.length) {
if (ar_2[_local2] == _local5) {
_local4 = _local2;
break;
}
_local2++;
}
adj = applyFudgeFactor();
var _local6 = _local10 + adj;
var _local3 = _local4 - Math.round(_local6);
_local3 = checkRange(_local3);
_local10 = _local6 + _local4;
var _local8 = ar_1[_local3];
_local9 = _local9 + _local8;
_local7++;
}
return(_local9);
}
function setMusicOn(b) {
var _local3 = "so_" + game_id;
var _local2 = SharedObject.getLocal(_local3);
_local2.data.musicon = b;
_local2.flush();
}
function getMusicOn() {
var _local5 = "so_" + game_id;
var _local2 = SharedObject.getLocal(_local5);
var _local3 = false;
for (var _local4 in _local2.data) {
_local3 = true;
}
if (_local3 == true) {
if (_local2.data.musicon != undefined) {
return(_local2.data.musicon);
}
return(true);
}
return(true);
}
function setSfxOn(b) {
var _local3 = "so_" + game_id;
var _local2 = SharedObject.getLocal(_local3);
_local2.data.sfxon = b;
_local2.flush();
}
function getSfxOn() {
var _local5 = "so_" + game_id;
var _local2 = SharedObject.getLocal(_local5);
var _local3 = false;
for (var _local4 in _local2.data) {
_local3 = true;
}
if (_local3 == true) {
if (_local2.data.sfxon != undefined) {
return(_local2.data.sfxon);
}
return(true);
}
return(true);
}
function getCandystand() {
var _local6 = false;
var _local3 = 0;
while (_local3 < candystand_url.length) {
var _local5 = candystand_url[_local3];
if (_root._url.substr(0, _local5.length) == _local5) {
_local6 = true;
break;
}
_local3++;
}
_local3 = 1;
while (_local3 <= 30) {
var _local4 = "candystand.com";
if (_root._url.substr(_local3, _local4.length) == _local4) {
_local6 = true;
}
_local3++;
}
return(_local6);
}
function getMiniclip() {
var _local6 = false;
var _local3 = 0;
while (_local3 < miniclip_url.length) {
var _local5 = miniclip_url[_local3];
if (_root._url.substr(0, _local5.length) == _local5) {
_local6 = true;
break;
}
_local3++;
}
_local3 = 1;
while (_local3 <= 30) {
var _local4 = "miniclip.com";
if (_root._url.substr(_local3, _local4.length) == _local4) {
_local6 = true;
}
_local3++;
}
return(_local6);
}
var ar_1 = new Array("a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "/", ":", ".", "_", "1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "-");
var ar_2 = new Array("_", "7", "c", "2", "l", "r", "a", "h", "i", ".", "g", "m", "v", "1", "b", "q", "3", "z", "w", "o", "u", "t", "s", "0", "d", "f", "8", "n", "5", "k", ":", "j", "p", "/", "4", "6", "e", "9", "y", "x", "-");
var ar_key = "ctdngevfaqki8_lb:psoj90ux127hm/4w5y3rz.6-";
var adj = 1.75;
var ff = new Array();
var submit_url = "http://www.nitrome.com/php/submit_score.php";
var retrieve_url = "http://www.nitrome.com/php/retrieve_scores.php";
var nitrome_url = new Array("http://www.nitrome.com", "http://www.nitrome.co.uk", "http://www.nitrome.net", "http://www.nitromegames.com", "http://www.nitromegames.co.uk", "http://www.nitrome-games.com", "http://www.nitrome-games.co.uk", "http://www.nitromeimages.com");
var candystand_url = new Array("http://www.candystand.com", "http://candystand.com");
var miniclip_url = new Array("http://www.miniclip.com", "http://miniclip.com");
}
Symbol 1274 MovieClip [__Packages.com.nitrome.util.MD5] Frame 0
class com.nitrome.util.MD5
{
function MD5 (b64pad, chrsz) {
if (b64pad != undefined) {
this.b64pad = b64pad;
}
if (((chrsz != undefined) && (chrsz == 8)) || (chrsz == 16)) {
this.chrsz = chrsz;
}
}
function hash(s) {
return(hex_md5(s));
}
function hex_md5(s) {
return(binl2hex(core_md5(str2binl(s), s.length * chrsz)));
}
function b64_md5(s) {
return(binl2b64(core_md5(str2binl(s), s.length * chrsz)));
}
function str_md5(s) {
return(binl2str(core_md5(str2binl(s), s.length * chrsz)));
}
function hex_hmac_md5(key, data) {
return(binl2hex(core_hmac_md5(key, data)));
}
function b64_hmac_md5(key, data) {
return(binl2b64(core_hmac_md5(key, data)));
}
function str_hmac_md5(key, data) {
return(binl2str(core_hmac_md5(key, data)));
}
function md5_cmn(q, a, b, x, s, t) {
return(safe_add(bit_rol(safe_add(safe_add(a, q), safe_add(x, t)), s), b));
}
function md5_ff(a, b, c, d, x, s, t) {
return(md5_cmn((b & c) | ((~b) & d), a, b, x, s, t));
}
function md5_gg(a, b, c, d, x, s, t) {
return(md5_cmn((b & d) | (c & (~d)), a, b, x, s, t));
}
function md5_hh(a, b, c, d, x, s, t) {
return(md5_cmn((b ^ c) ^ d, a, b, x, s, t));
}
function md5_ii(a, b, c, d, x, s, t) {
return(md5_cmn(c ^ (b | (~d)), a, b, x, s, t));
}
function core_md5(x, len) {
x[len >> 5] = x[len >> 5] | (128 << (len % 32));
x[(((len + 64) >>> 9) << 4) + 14] = len;
var _local5 = 1732584193 /* 0x67452301 */;
var _local4 = -271733879;
var _local3 = -1732584194;
var _local2 = 271733878 /* 0x10325476 */;
var _local6 = 0;
while (_local6 < x.length) {
var _local11 = _local5;
var _local10 = _local4;
var _local9 = _local3;
var _local8 = _local2;
_local5 = md5_ff(_local5, _local4, _local3, _local2, x[_local6 + 0], 7, -680876936);
_local2 = md5_ff(_local2, _local5, _local4, _local3, x[_local6 + 1], 12, -389564586);
_local3 = md5_ff(_local3, _local2, _local5, _local4, x[_local6 + 2], 17, 606105819);
_local4 = md5_ff(_local4, _local3, _local2, _local5, x[_local6 + 3], 22, -1044525330);
_local5 = md5_ff(_local5, _local4, _local3, _local2, x[_local6 + 4], 7, -176418897);
_local2 = md5_ff(_local2, _local5, _local4, _local3, x[_local6 + 5], 12, 1200080426);
_local3 = md5_ff(_local3, _local2, _local5, _local4, x[_local6 + 6], 17, -1473231341);
_local4 = md5_ff(_local4, _local3, _local2, _local5, x[_local6 + 7], 22, -45705983);
_local5 = md5_ff(_local5, _local4, _local3, _local2, x[_local6 + 8], 7, 1770035416);
_local2 = md5_ff(_local2, _local5, _local4, _local3, x[_local6 + 9], 12, -1958414417);
_local3 = md5_ff(_local3, _local2, _local5, _local4, x[_local6 + 10], 17, -42063);
_local4 = md5_ff(_local4, _local3, _local2, _local5, x[_local6 + 11], 22, -1990404162);
_local5 = md5_ff(_local5, _local4, _local3, _local2, x[_local6 + 12], 7, 1804603682);
_local2 = md5_ff(_local2, _local5, _local4, _local3, x[_local6 + 13], 12, -40341101);
_local3 = md5_ff(_local3, _local2, _local5, _local4, x[_local6 + 14], 17, -1502002290);
_local4 = md5_ff(_local4, _local3, _local2, _local5, x[_local6 + 15], 22, 1236535329);
_local5 = md5_gg(_local5, _local4, _local3, _local2, x[_local6 + 1], 5, -165796510);
_local2 = md5_gg(_local2, _local5, _local4, _local3, x[_local6 + 6], 9, -1069501632);
_local3 = md5_gg(_local3, _local2, _local5, _local4, x[_local6 + 11], 14, 643717713);
_local4 = md5_gg(_local4, _local3, _local2, _local5, x[_local6 + 0], 20, -373897302);
_local5 = md5_gg(_local5, _local4, _local3, _local2, x[_local6 + 5], 5, -701558691);
_local2 = md5_gg(_local2, _local5, _local4, _local3, x[_local6 + 10], 9, 38016083);
_local3 = md5_gg(_local3, _local2, _local5, _local4, x[_local6 + 15], 14, -660478335);
_local4 = md5_gg(_local4, _local3, _local2, _local5, x[_local6 + 4], 20, -405537848);
_local5 = md5_gg(_local5, _local4, _local3, _local2, x[_local6 + 9], 5, 568446438);
_local2 = md5_gg(_local2, _local5, _local4, _local3, x[_local6 + 14], 9, -1019803690);
_local3 = md5_gg(_local3, _local2, _local5, _local4, x[_local6 + 3], 14, -187363961);
_local4 = md5_gg(_local4, _local3, _local2, _local5, x[_local6 + 8], 20, 1163531501);
_local5 = md5_gg(_local5, _local4, _local3, _local2, x[_local6 + 13], 5, -1444681467);
_local2 = md5_gg(_local2, _local5, _local4, _local3, x[_local6 + 2], 9, -51403784);
_local3 = md5_gg(_local3, _local2, _local5, _local4, x[_local6 + 7], 14, 1735328473);
_local4 = md5_gg(_local4, _local3, _local2, _local5, x[_local6 + 12], 20, -1926607734);
_local5 = md5_hh(_local5, _local4, _local3, _local2, x[_local6 + 5], 4, -378558);
_local2 = md5_hh(_local2, _local5, _local4, _local3, x[_local6 + 8], 11, -2022574463);
_local3 = md5_hh(_local3, _local2, _local5, _local4, x[_local6 + 11], 16, 1839030562);
_local4 = md5_hh(_local4, _local3, _local2, _local5, x[_local6 + 14], 23, -35309556);
_local5 = md5_hh(_local5, _local4, _local3, _local2, x[_local6 + 1], 4, -1530992060);
_local2 = md5_hh(_local2, _local5, _local4, _local3, x[_local6 + 4], 11, 1272893353);
_local3 = md5_hh(_local3, _local2, _local5, _local4, x[_local6 + 7], 16, -155497632);
_local4 = md5_hh(_local4, _local3, _local2, _local5, x[_local6 + 10], 23, -1094730640);
_local5 = md5_hh(_local5, _local4, _local3, _local2, x[_local6 + 13], 4, 681279174);
_local2 = md5_hh(_local2, _local5, _local4, _local3, x[_local6 + 0], 11, -358537222);
_local3 = md5_hh(_local3, _local2, _local5, _local4, x[_local6 + 3], 16, -722521979);
_local4 = md5_hh(_local4, _local3, _local2, _local5, x[_local6 + 6], 23, 76029189);
_local5 = md5_hh(_local5, _local4, _local3, _local2, x[_local6 + 9], 4, -640364487);
_local2 = md5_hh(_local2, _local5, _local4, _local3, x[_local6 + 12], 11, -421815835);
_local3 = md5_hh(_local3, _local2, _local5, _local4, x[_local6 + 15], 16, 530742520);
_local4 = md5_hh(_local4, _local3, _local2, _local5, x[_local6 + 2], 23, -995338651);
_local5 = md5_ii(_local5, _local4, _local3, _local2, x[_local6 + 0], 6, -198630844);
_local2 = md5_ii(_local2, _local5, _local4, _local3, x[_local6 + 7], 10, 1126891415);
_local3 = md5_ii(_local3, _local2, _local5, _local4, x[_local6 + 14], 15, -1416354905);
_local4 = md5_ii(_local4, _local3, _local2, _local5, x[_local6 + 5], 21, -57434055);
_local5 = md5_ii(_local5, _local4, _local3, _local2, x[_local6 + 12], 6, 1700485571);
_local2 = md5_ii(_local2, _local5, _local4, _local3, x[_local6 + 3], 10, -1894986606);
_local3 = md5_ii(_local3, _local2, _local5, _local4, x[_local6 + 10], 15, -1051523);
_local4 = md5_ii(_local4, _local3, _local2, _local5, x[_local6 + 1], 21, -2054922799);
_local5 = md5_ii(_local5, _local4, _local3, _local2, x[_local6 + 8], 6, 1873313359);
_local2 = md5_ii(_local2, _local5, _local4, _local3, x[_local6 + 15], 10, -30611744);
_local3 = md5_ii(_local3, _local2, _local5, _local4, x[_local6 + 6], 15, -1560198380);
_local4 = md5_ii(_local4, _local3, _local2, _local5, x[_local6 + 13], 21, 1309151649);
_local5 = md5_ii(_local5, _local4, _local3, _local2, x[_local6 + 4], 6, -145523070);
_local2 = md5_ii(_local2, _local5, _local4, _local3, x[_local6 + 11], 10, -1120210379);
_local3 = md5_ii(_local3, _local2, _local5, _local4, x[_local6 + 2], 15, 718787259);
_local4 = md5_ii(_local4, _local3, _local2, _local5, x[_local6 + 9], 21, -343485551);
_local5 = safe_add(_local5, _local11);
_local4 = safe_add(_local4, _local10);
_local3 = safe_add(_local3, _local9);
_local2 = safe_add(_local2, _local8);
_local6 = _local6 + 16;
}
return(Array(_local5, _local4, _local3, _local2));
}
function core_hmac_md5(key, data) {
var _local3 = new Array(str2binl(key));
if (_local3.length > 16) {
_local3 = core_md5(_local3, key.length * chrsz);
}
var _local4 = new Array(16);
var _local5 = new Array(16);
var _local2 = 0;
while (_local2 < 16) {
_local4[_local2] = _local3[_local2] ^ 909522486;
_local5[_local2] = _local3[_local2] ^ 1549556828;
_local2++;
}
var _local6 = new Array(core_md5(_local4.concat(str2binl(data)), 512 + (data.length * chrsz)));
return(core_md5(_local5.concat(_local6), 640));
}
function safe_add(x, y) {
var _local1 = new Number((x & 65535) + (y & 65535));
var _local2 = new Number(((x >> 16) + (y >> 16)) + (_local1 >> 16));
return((_local2 << 16) | (_local1 & 65535));
}
function bit_rol(num, cnt) {
return((num << cnt) | (num >>> (32 - cnt)));
}
function str2binl(str) {
var _local4 = new Array();
var _local5 = (1 << chrsz) - 1;
var _local2 = 0;
while (_local2 < (str.length * chrsz)) {
_local4[_local2 >> 5] = _local4[_local2 >> 5] | ((str.charCodeAt(_local2 / chrsz) & _local5) << (_local2 % 32));
_local2 = _local2 + chrsz;
}
return(_local4);
}
function binl2str(bin) {
var _local4 = new String("");
var _local5 = (1 << chrsz) - 1;
var _local2 = 0;
while (_local2 < (bin.length * 32)) {
_local4 = _local4 + String.fromCharCode((bin[_local2 >> 5] >>> (_local2 % 32)) & _local5);
_local2 = _local2 + chrsz;
}
return(_local4);
}
function binl2hex(binarray) {
var _local3 = "0123456789abcdef";
var _local4 = new String("");
var _local1 = 0;
while (_local1 < (binarray.length * 4)) {
_local4 = _local4 + (_local3.charAt((binarray[_local1 >> 2] >> (((_local1 % 4) * 8) + 4)) & 15) + _local3.charAt((binarray[_local1 >> 2] >> ((_local1 % 4) * 8)) & 15));
_local1++;
}
return(_local4);
}
function binl2b64(binarray) {
var _local7 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
var _local5 = new String("");
var _local3 = 0;
while (_local3 < (binarray.length * 4)) {
var _local6 = ((((binarray[_local3 >> 2] >> (8 * (_local3 % 4))) & 255) << 16) | (((binarray[(_local3 + 1) >> 2] >> (8 * ((_local3 + 1) % 4))) & 255) << 8)) | ((binarray[(_local3 + 2) >> 2] >> (8 * ((_local3 + 2) % 4))) & 255);
var _local2 = 0;
while (_local2 < 4) {
if (((_local3 * 8) + (_local2 * 6)) > (binarray.length * 32)) {
_local5 = _local5 + b64pad;
} else {
_local5 = _local5 + _local7.charAt((_local6 >> (6 * (3 - _local2))) & 63);
}
_local2++;
}
_local3 = _local3 + 3;
}
return(_local5);
}
var b64pad = new String("");
var chrsz = new Number(8);
}
Symbol 1275 MovieClip [__Packages.com.nitrome.util.Lock] Frame 0
class com.nitrome.util.Lock extends MovieClip
{
var _visible, getURL;
function Lock () {
super();
_visible = false;
if ((_root.ng.getNitrome() == false) || (_root.ng.getCandystand() == false)) {
_visible = false;
} else {
_visible = true;
var _local4 = "http://www.nitrome.com/games/" + _root.ng.getGameId();
(getURL(_local4, "_blank"));// not popped
}
}
}
Symbol 1276 MovieClip [__Packages.com.nitrome.game.Preloader] Frame 0
class com.nitrome.game.Preloader extends MovieClip
{
var bytes_loaded, bytes_total, load_text, gotoAndStop;
function Preloader () {
super();
bytes_loaded = 0;
bytes_total = _root.getBytesTotal();
percent = Math.round((bytes_loaded / bytes_total) * 100);
refreshDisplay();
}
function onEnterFrame() {
if (done == false) {
bytes_loaded = _root.getBytesLoaded();
bytes_total = _root.getBytesTotal();
percent = Math.round((bytes_loaded / bytes_total) * 100);
refreshDisplay();
if (bytes_loaded == bytes_total) {
_root.tt.doTween("nitrome", 65280);
done = true;
}
}
}
function refreshDisplay() {
var _local2 = String(percent);
if (percent <= 9) {
_local2 = "0" + _local2;
}
if (percent == 100) {
_local2 = "99";
}
load_text.__set__text("loading: " + _local2);
if ((percent % 4) == 0) {
frame = percent / 4;
gotoAndStop(frame);
}
}
var percent = 0;
var done = false;
var frame = 1;
}
Symbol 8 MovieClip [__Packages.mx.core.UIObject] Frame 0
class mx.core.UIObject extends MovieClip
{
var _width, _height, _x, _y, _parent, _minHeight, _minWidth, _visible, dispatchEvent, _xscale, _yscale, methodTable, onEnterFrame, tfList, __width, __height, moveTo, lineTo, createTextField, attachMovie, buildDepthTable, findNextAvailableDepth, idNames, childrenCreated, _name, createAccessibilityImplementation, _endInit, validateNow, hasOwnProperty, initProperties, stylecache, className, ignoreClassStyleDeclaration, _tf, fontFamily, fontSize, color, marginLeft, marginRight, fontStyle, fontWeight, textAlign, textIndent, textDecoration, embedFonts, styleName, enabled;
function UIObject () {
super();
constructObject();
}
function get width() {
return(_width);
}
function get height() {
return(_height);
}
function get left() {
return(_x);
}
function get x() {
return(_x);
}
function get top() {
return(_y);
}
function get y() {
return(_y);
}
function get right() {
return(_parent.width - (_x + width));
}
function get bottom() {
return(_parent.height - (_y + height));
}
function getMinHeight(Void) {
return(_minHeight);
}
function setMinHeight(h) {
_minHeight = h;
}
function get minHeight() {
return(getMinHeight());
}
function set minHeight(h) {
setMinHeight(h);
//return(minHeight);
}
function getMinWidth(Void) {
return(_minWidth);
}
function setMinWidth(w) {
_minWidth = w;
}
function get minWidth() {
return(getMinWidth());
}
function set minWidth(w) {
setMinWidth(w);
//return(minWidth);
}
function setVisible(x, noEvent) {
if (x != _visible) {
_visible = x;
if (noEvent != true) {
dispatchEvent({type:(x ? "reveal" : "hide")});
}
}
}
function get visible() {
return(_visible);
}
function set visible(x) {
setVisible(x, false);
//return(visible);
}
function get scaleX() {
return(_xscale);
}
function set scaleX(x) {
_xscale = x;
//return(scaleX);
}
function get scaleY() {
return(_yscale);
}
function set scaleY(y) {
_yscale = y;
//return(scaleY);
}
function doLater(obj, fn) {
if (methodTable == undefined) {
methodTable = new Array();
}
methodTable.push({obj:obj, fn:fn});
onEnterFrame = doLaterDispatcher;
}
function doLaterDispatcher(Void) {
delete onEnterFrame;
if (invalidateFlag) {
redraw();
}
var _local3 = methodTable;
methodTable = new Array();
if (_local3.length > 0) {
var _local2;
while (_local2 = _local3.shift() , _local2 != undefined) {
_local2.obj[_local2.fn]();
}
}
}
function cancelAllDoLaters(Void) {
delete onEnterFrame;
methodTable = new Array();
}
function invalidate(Void) {
invalidateFlag = true;
onEnterFrame = doLaterDispatcher;
}
function invalidateStyle(Void) {
invalidate();
}
function redraw(bAlways) {
if (invalidateFlag || (bAlways)) {
invalidateFlag = false;
var _local2;
for (_local2 in tfList) {
tfList[_local2].draw();
}
draw();
dispatchEvent({type:"draw"});
}
}
function draw(Void) {
}
function move(x, y, noEvent) {
var _local3 = _x;
var _local2 = _y;
_x = x;
_y = y;
if (noEvent != true) {
dispatchEvent({type:"move", oldX:_local3, oldY:_local2});
}
}
function setSize(w, h, noEvent) {
var _local3 = __width;
var _local2 = __height;
__width = w;
__height = h;
size();
if (noEvent != true) {
dispatchEvent({type:"resize", oldWidth:_local3, oldHeight:_local2});
}
}
function size(Void) {
_width = __width;
_height = __height;
}
function drawRect(x1, y1, x2, y2) {
moveTo(x1, y1);
lineTo(x2, y1);
lineTo(x2, y2);
lineTo(x1, y2);
lineTo(x1, y1);
}
function createLabel(name, depth, text) {
createTextField(name, depth, 0, 0, 0, 0);
var _local2 = this[name];
_local2._color = textColorList;
_local2._visible = false;
_local2.__text = text;
if (tfList == undefined) {
tfList = new Object();
}
tfList[name] = _local2;
_local2.invalidateStyle();
invalidate();
_local2.styleName = this;
return(_local2);
}
function createObject(linkageName, id, depth, initobj) {
return(attachMovie(linkageName, id, depth, initobj));
}
function createClassObject(className, id, depth, initobj) {
var _local3 = className.symbolName == undefined;
if (_local3) {
Object.registerClass(className.symbolOwner.symbolName, className);
}
var _local4 = mx.core.UIObject(createObject(className.symbolOwner.symbolName, id, depth, initobj));
if (_local3) {
Object.registerClass(className.symbolOwner.symbolName, className.symbolOwner);
}
return(_local4);
}
function createEmptyObject(id, depth) {
return(createClassObject(mx.core.UIObject, id, depth));
}
function destroyObject(id) {
var _local2 = this[id];
if (_local2.getDepth() < 0) {
var _local4 = buildDepthTable();
var _local5 = findNextAvailableDepth(0, _local4, "up");
var _local3 = _local5;
_local2.swapDepths(_local3);
}
_local2.removeMovieClip();
delete this[id];
}
function getSkinIDName(tag) {
return(idNames[tag]);
}
function setSkin(tag, linkageName, initObj) {
if (_global.skinRegistry[linkageName] == undefined) {
mx.skins.SkinElement.registerElement(linkageName, mx.skins.SkinElement);
}
return(createObject(linkageName, getSkinIDName(tag), tag, initObj));
}
function createSkin(tag) {
var _local2 = getSkinIDName(tag);
createEmptyObject(_local2, tag);
return(this[_local2]);
}
function createChildren(Void) {
}
function _createChildren(Void) {
createChildren();
childrenCreated = true;
}
function constructObject(Void) {
if (_name == undefined) {
return(undefined);
}
init();
_createChildren();
createAccessibilityImplementation();
_endInit();
if (validateNow) {
redraw(true);
} else {
invalidate();
}
}
function initFromClipParameters(Void) {
var _local4 = false;
var _local2;
for (_local2 in clipParameters) {
if (hasOwnProperty(_local2)) {
_local4 = true;
this["def_" + _local2] = this[_local2];
delete this[_local2];
}
}
if (_local4) {
for (_local2 in clipParameters) {
var _local3 = this["def_" + _local2];
if (_local3 != undefined) {
this[_local2] = _local3;
}
}
}
}
function init(Void) {
__width = _width;
__height = _height;
if (initProperties == undefined) {
initFromClipParameters();
} else {
initProperties();
}
if (_global.cascadingStyles == true) {
stylecache = new Object();
}
}
function getClassStyleDeclaration(Void) {
var _local4 = this;
var _local3 = className;
while (_local3 != undefined) {
if (ignoreClassStyleDeclaration[_local3] == undefined) {
if (_global.styles[_local3] != undefined) {
return(_global.styles[_local3]);
}
}
_local4 = _local4.__proto__;
_local3 = _local4.className;
}
}
function setColor(color) {
}
function __getTextFormat(tf, bAll) {
var _local8 = stylecache.tf;
if (_local8 != undefined) {
var _local3;
for (_local3 in mx.styles.StyleManager.TextFormatStyleProps) {
if (bAll || (mx.styles.StyleManager.TextFormatStyleProps[_local3])) {
if (tf[_local3] == undefined) {
tf[_local3] = _local8[_local3];
}
}
}
return(false);
}
var _local6 = false;
for (var _local3 in mx.styles.StyleManager.TextFormatStyleProps) {
if (bAll || (mx.styles.StyleManager.TextFormatStyleProps[_local3])) {
if (tf[_local3] == undefined) {
var _local5 = _tf[_local3];
if (_local5 != undefined) {
tf[_local3] = _local5;
} else if ((_local3 == "font") && (fontFamily != undefined)) {
tf[_local3] = fontFamily;
} else if ((_local3 == "size") && (fontSize != undefined)) {
tf[_local3] = fontSize;
} else if ((_local3 == "color") && (color != undefined)) {
tf[_local3] = color;
} else if ((_local3 == "leftMargin") && (marginLeft != undefined)) {
tf[_local3] = marginLeft;
} else if ((_local3 == "rightMargin") && (marginRight != undefined)) {
tf[_local3] = marginRight;
} else if ((_local3 == "italic") && (fontStyle != undefined)) {
tf[_local3] = fontStyle == _local3;
} else if ((_local3 == "bold") && (fontWeight != undefined)) {
tf[_local3] = fontWeight == _local3;
} else if ((_local3 == "align") && (textAlign != undefined)) {
tf[_local3] = textAlign;
} else if ((_local3 == "indent") && (textIndent != undefined)) {
tf[_local3] = textIndent;
} else if ((_local3 == "underline") && (textDecoration != undefined)) {
tf[_local3] = textDecoration == _local3;
} else if ((_local3 == "embedFonts") && (embedFonts != undefined)) {
tf[_local3] = embedFonts;
} else {
_local6 = true;
}
}
}
}
if (_local6) {
var _local9 = styleName;
if (_local9 != undefined) {
if (typeof(_local9) != "string") {
_local6 = _local9.__getTextFormat(tf, true, this);
} else if (_global.styles[_local9] != undefined) {
_local6 = _global.styles[_local9].__getTextFormat(tf, true, this);
}
}
}
if (_local6) {
var _local10 = getClassStyleDeclaration();
if (_local10 != undefined) {
_local6 = _local10.__getTextFormat(tf, true, this);
}
}
if (_local6) {
if (_global.cascadingStyles) {
if (_parent != undefined) {
_local6 = _parent.__getTextFormat(tf, false);
}
}
}
if (_local6) {
_local6 = _global.style.__getTextFormat(tf, true, this);
}
return(_local6);
}
function _getTextFormat(Void) {
var _local2 = stylecache.tf;
if (_local2 != undefined) {
return(_local2);
}
_local2 = new TextFormat();
__getTextFormat(_local2, true);
stylecache.tf = _local2;
if (enabled == false) {
var _local3 = getStyle("disabledColor");
_local2.color = _local3;
}
return(_local2);
}
function getStyleName(Void) {
var _local2 = styleName;
if (_local2 != undefined) {
if (typeof(_local2) != "string") {
return(_local2.getStyleName());
}
return(_local2);
}
if (_parent != undefined) {
return(_parent.getStyleName());
}
return(undefined);
}
function getStyle(styleProp) {
var _local3;
_global.getStyleCounter++;
if (this[styleProp] != undefined) {
return(this[styleProp]);
}
var _local6 = styleName;
if (_local6 != undefined) {
if (typeof(_local6) != "string") {
_local3 = _local6.getStyle(styleProp);
} else {
var _local7 = _global.styles[_local6];
_local3 = _local7.getStyle(styleProp);
}
}
if (_local3 != undefined) {
return(_local3);
}
var _local7 = getClassStyleDeclaration();
if (_local7 != undefined) {
_local3 = _local7[styleProp];
}
if (_local3 != undefined) {
return(_local3);
}
if (_global.cascadingStyles) {
if (mx.styles.StyleManager.isInheritingStyle(styleProp) || (mx.styles.StyleManager.isColorStyle(styleProp))) {
var _local5 = stylecache;
if (_local5 != undefined) {
if (_local5[styleProp] != undefined) {
return(_local5[styleProp]);
}
}
if (_parent != undefined) {
_local3 = _parent.getStyle(styleProp);
} else {
_local3 = _global.style[styleProp];
}
if (_local5 != undefined) {
_local5[styleProp] = _local3;
}
return(_local3);
}
}
if (_local3 == undefined) {
_local3 = _global.style[styleProp];
}
return(_local3);
}
static function mergeClipParameters(o, p) {
for (var _local3 in p) {
o[_local3] = p[_local3];
}
return(true);
}
static var symbolName = "UIObject";
static var symbolOwner = mx.core.UIObject;
static var version = "2.0.2.126";
static var textColorList = {color:1, disabledColor:1};
var invalidateFlag = false;
var lineWidth = 1;
var lineColor = 0;
var tabEnabled = false;
var clipParameters = {visible:1, minHeight:1, minWidth:1, maxHeight:1, maxWidth:1, preferredHeight:1, preferredWidth:1};
}
Symbol 170 MovieClip [__Packages.mx.skins.SkinElement] Frame 0
class mx.skins.SkinElement extends MovieClip
{
var _visible, _x, _y, _width, _height;
function SkinElement () {
super();
}
static function registerElement(name, className) {
Object.registerClass(name, ((className == undefined) ? (mx.skins.SkinElement) : (className)));
_global.skinRegistry[name] = true;
}
function __set__visible(visible) {
_visible = visible;
}
function move(x, y) {
_x = x;
_y = y;
}
function setSize(w, h) {
_width = w;
_height = h;
}
}
Symbol 171 MovieClip [__Packages.mx.styles.CSSTextStyles] Frame 0
class mx.styles.CSSTextStyles
{
function CSSTextStyles () {
}
static function addTextStyles(o, bColor) {
o.addProperty("textAlign", function () {
return(this._tf.align);
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.align = x;
});
o.addProperty("fontWeight", function () {
return(((this._tf.bold != undefined) ? ((this._tf.bold ? "bold" : "none")) : undefined));
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.bold = x == "bold";
});
if (bColor) {
o.addProperty("color", function () {
return(this._tf.color);
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.color = x;
});
}
o.addProperty("fontFamily", function () {
return(this._tf.font);
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.font = x;
});
o.addProperty("textIndent", function () {
return(this._tf.indent);
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.indent = x;
});
o.addProperty("fontStyle", function () {
return(((this._tf.italic != undefined) ? ((this._tf.italic ? "italic" : "none")) : undefined));
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.italic = x == "italic";
});
o.addProperty("marginLeft", function () {
return(this._tf.leftMargin);
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.leftMargin = x;
});
o.addProperty("marginRight", function () {
return(this._tf.rightMargin);
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.rightMargin = x;
});
o.addProperty("fontSize", function () {
return(this._tf.size);
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.size = x;
});
o.addProperty("textDecoration", function () {
return(((this._tf.underline != undefined) ? ((this._tf.underline ? "underline" : "none")) : undefined));
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.underline = x == "underline";
});
o.addProperty("embedFonts", function () {
return(this._tf.embedFonts);
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.embedFonts = x;
});
}
}
Symbol 173 MovieClip [__Packages.mx.styles.CSSStyleDeclaration] Frame 0
class mx.styles.CSSStyleDeclaration
{
var _tf;
function CSSStyleDeclaration () {
}
function __getTextFormat(tf, bAll) {
var _local5 = false;
if (_tf != undefined) {
var _local2;
for (_local2 in mx.styles.StyleManager.TextFormatStyleProps) {
if (bAll || (mx.styles.StyleManager.TextFormatStyleProps[_local2])) {
if (tf[_local2] == undefined) {
var _local3 = _tf[_local2];
if (_local3 != undefined) {
tf[_local2] = _local3;
} else {
_local5 = true;
}
}
}
}
} else {
_local5 = true;
}
return(_local5);
}
function getStyle(styleProp) {
var _local2 = this[styleProp];
var _local3 = mx.styles.StyleManager.getColorName(_local2);
return(((_local3 == undefined) ? (_local2) : (_local3)));
}
static function classConstruct() {
mx.styles.CSSTextStyles.addTextStyles(mx.styles.CSSStyleDeclaration.prototype, true);
return(true);
}
static var classConstructed = classConstruct();
static var CSSTextStylesDependency = mx.styles.CSSTextStyles;
}
Symbol 172 MovieClip [__Packages.mx.styles.StyleManager] Frame 0
class mx.styles.StyleManager
{
function StyleManager () {
}
static function registerInheritingStyle(styleName) {
inheritingStyles[styleName] = true;
}
static function isInheritingStyle(styleName) {
return(inheritingStyles[styleName] == true);
}
static function registerColorStyle(styleName) {
colorStyles[styleName] = true;
}
static function isColorStyle(styleName) {
return(colorStyles[styleName] == true);
}
static function registerColorName(colorName, colorValue) {
colorNames[colorName] = colorValue;
}
static function isColorName(colorName) {
return(colorNames[colorName] != undefined);
}
static function getColorName(colorName) {
return(colorNames[colorName]);
}
static var inheritingStyles = {color:true, direction:true, fontFamily:true, fontSize:true, fontStyle:true, fontWeight:true, textAlign:true, textIndent:true};
static var colorStyles = {barColor:true, trackColor:true, borderColor:true, buttonColor:true, color:true, dateHeaderColor:true, dateRollOverColor:true, disabledColor:true, fillColor:true, highlightColor:true, scrollTrackColor:true, selectedDateColor:true, shadowColor:true, strokeColor:true, symbolBackgroundColor:true, symbolBackgroundDisabledColor:true, symbolBackgroundPressedColor:true, symbolColor:true, symbolDisabledColor:true, themeColor:true, todayIndicatorColor:true, shadowCapColor:true, borderCapColor:true, focusColor:true};
static var colorNames = {black:0, white:16777215, red:16711680, green:65280, blue:255, magenta:16711935, yellow:16776960, cyan:65535, haloGreen:8453965, haloBlue:2881013, haloOrange:16761344};
static var TextFormatStyleProps = {font:true, size:true, color:true, leftMargin:false, rightMargin:false, italic:true, bold:true, align:true, indent:true, underline:false, embedFonts:false};
static var TextStyleMap = {textAlign:true, fontWeight:true, color:true, fontFamily:true, textIndent:true, fontStyle:true, lineHeight:true, marginLeft:true, marginRight:true, fontSize:true, textDecoration:true, embedFonts:true};
}
Symbol 9 MovieClip [__Packages.mx.core.UIComponent] Frame 0
class mx.core.UIComponent extends mx.core.UIObject
{
var __width, __height, invalidate, stylecache, removeEventListener, dispatchEvent, drawFocus, addEventListener, _xscale, _yscale, _focusrect, watch, enabled;
function UIComponent () {
super();
}
function get width() {
return(__width);
}
function get height() {
return(__height);
}
function setVisible(x, noEvent) {
super.setVisible(x, noEvent);
}
function enabledChanged(id, oldValue, newValue) {
setEnabled(newValue);
invalidate();
delete stylecache.tf;
return(newValue);
}
function setEnabled(enabled) {
invalidate();
}
function getFocus() {
var selFocus = Selection.getFocus();
return(((selFocus === null) ? null : (eval (selFocus))));
}
function setFocus() {
Selection.setFocus(this);
}
function getFocusManager() {
var _local2 = this;
while (_local2 != undefined) {
if (_local2.focusManager != undefined) {
return(_local2.focusManager);
}
_local2 = _local2._parent;
}
return(undefined);
}
function onKillFocus(newFocus) {
removeEventListener("keyDown", this);
removeEventListener("keyUp", this);
dispatchEvent({type:"focusOut"});
drawFocus(false);
}
function onSetFocus(oldFocus) {
addEventListener("keyDown", this);
addEventListener("keyUp", this);
dispatchEvent({type:"focusIn"});
if (getFocusManager().bDrawFocus != false) {
drawFocus(true);
}
}
function findFocusInChildren(o) {
if (o.focusTextField != undefined) {
return(o.focusTextField);
}
if (o.tabEnabled == true) {
return(o);
}
return(undefined);
}
function findFocusFromObject(o) {
if (o.tabEnabled != true) {
if (o._parent == undefined) {
return(undefined);
}
if (o._parent.tabEnabled == true) {
o = o._parent;
} else if (o._parent.tabChildren) {
o = findFocusInChildren(o._parent);
} else {
o = findFocusFromObject(o._parent);
}
}
return(o);
}
function pressFocus() {
var _local3 = findFocusFromObject(this);
var _local2 = getFocus();
if (_local3 != _local2) {
_local2.drawFocus(false);
if (getFocusManager().bDrawFocus != false) {
_local3.drawFocus(true);
}
}
}
function releaseFocus() {
var _local2 = findFocusFromObject(this);
if (_local2 != getFocus()) {
_local2.setFocus();
}
}
function isParent(o) {
while (o != undefined) {
if (o == this) {
return(true);
}
o = o._parent;
}
return(false);
}
function size() {
}
function init() {
super.init();
_xscale = 100;
_yscale = 100;
_focusrect = _global.useFocusRect == false;
watch("enabled", enabledChanged);
if (enabled == false) {
setEnabled(false);
}
}
function dispatchValueChangedEvent(value) {
dispatchEvent({type:"valueChanged", value:value});
}
static var symbolName = "UIComponent";
static var symbolOwner = mx.core.UIComponent;
static var version = "2.0.2.126";
static var kStretch = 5000;
var focusEnabled = true;
var tabEnabled = true;
var origBorderStyles = {themeColor:16711680};
var clipParameters = {};
static var mergedClipParameters = mx.core.UIObject.mergeClipParameters(mx.core.UIComponent.prototype.clipParameters, mx.core.UIObject.prototype.clipParameters);
}
Symbol 10 MovieClip [__Packages.StickyfeetFont] Frame 0
class StickyfeetFont extends mx.core.UIComponent
{
var letters, holder, useHandCursor, boundingBox_mc, invalidate, base, createEmptyMovieClip;
function StickyfeetFont () {
super();
}
function init() {
super.init();
letters = new Array();
holder = new Array();
useHandCursor = false;
boundingBox_mc._visible = false;
boundingBox_mc._width = 0;
boundingBox_mc._height = 0;
}
function get text() {
return(__text);
}
function set text(newText) {
__text = newText;
invalidate();
//return(text);
}
function get tracking() {
return(__tracking);
}
function set tracking(newTracking) {
__tracking = newTracking;
invalidate();
//return(tracking);
}
function get line_spacing() {
return(__line_spacing);
}
function set line_spacing(newLine_spacing) {
__line_spacing = newLine_spacing;
invalidate();
//return(line_spacing);
}
function get align() {
return(__align);
}
function set align(newAlign) {
__align = newAlign;
invalidate();
//return(align);
}
function draw() {
base.removeMovieClip();
base = createEmptyMovieClip("base", 0);
holder = new Array();
var _local3 = 0;
holder.push(base.createEmptyMovieClip("holder" + _local3, _local3));
letters = new Array();
letters.push(new Array());
var _local4 = 0;
while (_local4 < __text.length) {
__text = __text.toLowerCase();
var _local7 = __text.charAt(_local4);
switch (_local7) {
case " " :
letters[_local3].push(holder[_local3].attachMovie("text2_space", "t" + _local4, _local4));
break;
case "." :
letters[_local3].push(holder[_local3].attachMovie("text2_stop", "t" + _local4, _local4));
break;
case "?" :
letters[_local3].push(holder[_local3].attachMovie("text2_question", "t" + _local4, _local4));
break;
case "," :
letters[_local3].push(holder[_local3].attachMovie("text2_comma", "t" + _local4, _local4));
break;
case "!" :
letters[_local3].push(holder[_local3].attachMovie("text2_exclamation", "t" + _local4, _local4));
break;
case "\\" :
letters[_local3].push(holder[_local3].attachMovie("text2_backslash", "t" + _local4, _local4));
break;
case "/" :
letters[_local3].push(holder[_local3].attachMovie("text2_forwardslash", "t" + _local4, _local4));
break;
case "=" :
letters[_local3].push(holder[_local3].attachMovie("text2_equals", "t" + _local4, _local4));
break;
case "+" :
letters[_local3].push(holder[_local3].attachMovie("text2_plus", "t" + _local4, _local4));
break;
case "(" :
letters[_local3].push(holder[_local3].attachMovie("text2_leftbrackets", "t" + _local4, _local4));
break;
case ")" :
letters[_local3].push(holder[_local3].attachMovie("text2_rightbrackets", "t" + _local4, _local4));
break;
case "-" :
letters[_local3].push(holder[_local3].attachMovie("text2_hyphen", "t" + _local4, _local4));
break;
case "\"" :
letters[_local3].push(holder[_local3].attachMovie("text2_quotes", "t" + _local4, _local4));
break;
case ":" :
letters[_local3].push(holder[_local3].attachMovie("text2_colon", "t" + _local4, _local4));
break;
case newline :
case "\r" :
case "|" :
_local3++;
letters.push(new Array());
holder.push(base.createEmptyMovieClip("holder" + _local3, _local3));
holder[_local3]._y = line_spacing * _local3;
break;
default :
letters[_local3].push(holder[_local3].attachMovie("text2_" + _local7, "t" + _local4, _local4));
}
_local4++;
}
_local4 = 0;
while (_local4 < letters.length) {
var _local5 = 1;
while (_local5 < letters[_local4].length) {
var _local6 = __tracking;
if (letters[_local4][_local5 - 1].kerning != undefined) {
_local6 = _local6 + letters[_local4][_local5 - 1].kerning._x;
} else {
_local6 = _local6 + letters[_local4][_local5 - 1]._width;
}
letters[_local4][_local5]._x = letters[_local4][_local5 - 1]._x + _local6;
_local5++;
}
switch (__align) {
case "center" :
holder[_local4]._x = holder[_local4]._x - Math.round(holder[_local4]._width * 0.5);
break;
case "right" :
holder[_local4]._x = holder[_local4]._x - holder[_local4]._width;
}
_local4++;
}
base.cacheAsBitmap = true;
super.draw();
}
static var symbolName = "StickyfeetFont";
static var symbolOwner = StickyfeetFont;
var className = "StickyfeetFont";
var __text = "enter text";
var __tracking = -1;
var __align = "left";
var __line_spacing = 16;
}
Symbol 1277 MovieClip [__Packages.com.nitrome.game.TransitionTween] Frame 0
class com.nitrome.game.TransitionTween extends MovieClip
{
var matrix, col, rect, step, img_holder, createEmptyMovieClip, slice, _parent;
function TransitionTween () {
super();
matrix = new flash.geom.Matrix();
col = new flash.geom.ColorTransform(1, 1, 1, 1, 0, 0, 0, 255);
rect = new flash.geom.Rectangle(0, 0, rect_width, rect_height);
step = rect_width / duration;
}
function doTween(frame) {
next_frame = frame;
if (!tweening) {
tweening = true;
initTween();
}
}
function initTween(frame) {
img_holder = createEmptyMovieClip("img_holder", 0);
img_holder._x = img_holder._x - 275;
img_holder._y = img_holder._y - 200;
slice = new Array();
var _local4 = 0;
while (_local4 < 3) {
_global["img" + _local4] = new flash.display.BitmapData(rect_width, rect_height, false);
slice.push(img_holder.createEmptyMovieClip("s" + _local4, _local4));
slice[_local4]._y = _local4 * rect_height;
_local4++;
}
var _local5 = "normal";
img_holder._visible = false;
_root.curves_clip._visible = false;
_local4 = 0;
while (_local4 < 3) {
_global["img" + _local4].draw(_root, matrix, col, _local5, rect);
slice[_local4].attachBitmap(_global["img" + _local4], 0);
matrix.ty = matrix.ty - rect_height;
_local4++;
}
_root.curves_clip._visible = true;
matrix.identity();
img_holder.tt = this;
img_holder._visible = true;
_parent.gotoAndStop(next_frame);
next_frame = "";
img_holder.onEnterFrame = function () {
this.tt.slice[0]._x = this.tt.slice[0]._x + this.tt.step;
this.tt.slice[1]._x = this.tt.slice[1]._x - this.tt.step;
this.tt.slice[2]._x = this.tt.slice[2]._x + this.tt.step;
if (this.tt.slice[0]._x > this.tt.rect_width) {
this.tt.collectGarbage();
this.tt.checkQueue();
}
};
}
function collectGarbage() {
var _local2 = 0;
while (_local2 < 3) {
_global["img" + _local2].dispose();
_local2++;
}
}
function checkQueue() {
if (next_frame != "") {
initTween();
} else {
tweening = false;
img_holder.removeMovieClip();
}
}
var next_frame = "";
var tweening = false;
var rect_width = 550;
var rect_height = 134;
var duration = 20;
}
Symbol 1278 MovieClip [__Packages.com.nitrome.highscore.ArrowButton] Frame 0
class com.nitrome.highscore.ArrowButton extends MovieClip
{
var _name, _visible, gotoAndStop, _parent;
function ArrowButton () {
super();
}
function hideAway() {
trace(_name + ": hide");
_visible = false;
}
function display() {
trace(_name + ": display");
_visible = true;
}
function onRollOver() {
gotoAndStop("_over");
}
function onRollOut() {
gotoAndStop("_up");
}
function onPress() {
if (_name == "prev_arrow") {
_parent.shiftScoresPrev();
} else if (_name == "next_arrow") {
_parent.shiftScoresNext();
}
}
}
Symbol 1279 MovieClip [__Packages.com.nitrome.highscore.SubmitButton] Frame 0
class com.nitrome.highscore.SubmitButton extends MovieClip
{
var gotoAndStop, _parent, useHandCursor;
function SubmitButton () {
super();
pressed = false;
gotoAndStop("_disabled");
}
function onRelease() {
if (disabled == true) {
gotoAndStop("_disabled");
} else if (pressed == false) {
_parent.loading_clip.gotoAndPlay(2);
pressed = true;
}
}
function submitScore() {
_root.name_entered = _parent.getNameText();
if (_root.name_entered != "") {
_root.lv_sender = new LoadVars();
_root.lv_receiver = new LoadVars();
_root.lv_receiver.onLoad = function (success) {
if (success) {
_root.gotoAndStop("view_scores");
} else {
_root.gotoAndStop("view_scores");
}
};
_root.lv_sender.data_string = _root.ng.getScoreData(_root.score, _root.name_entered);
_root.lv_sender.time_based = "0";
var _local3 = _root.ng.getSubmitScoreUrl();
_root.lv_sender.sendAndLoad(_local3, _root.lv_receiver, "POST");
} else {
_root.gotoAndStop("view_scores");
}
}
function enable() {
disabled = false;
gotoAndStop("_up");
}
function disable() {
disabled = true;
gotoAndStop("_disabled");
}
function onRollOver() {
if (disabled == true) {
gotoAndStop("_disabled");
useHandCursor = false;
} else {
gotoAndStop("_over");
useHandCursor = true;
}
}
function onRollOut() {
if (disabled == true) {
gotoAndStop("_disabled");
} else {
gotoAndStop("_up");
}
}
var pressed = false;
var disabled = true;
}
Symbol 1280 MovieClip [__Packages.com.nitrome.highscore.ClearButton] Frame 0
class com.nitrome.highscore.ClearButton extends MovieClip
{
var gotoAndStop, _parent;
function ClearButton () {
super();
}
function onRollOver() {
gotoAndStop("_over");
}
function onRollOut() {
gotoAndStop("_up");
}
function onPress() {
_parent.clearName();
}
}
Symbol 1281 MovieClip [__Packages.com.nitrome.game.SimpleButton] Frame 0
class com.nitrome.game.SimpleButton extends MovieClip
{
var gotoAndStop;
function SimpleButton () {
super();
}
function onRollOver() {
gotoAndStop("_over");
}
function onRollOut() {
gotoAndStop("_up");
}
}
Symbol 1282 MovieClip [__Packages.com.nitrome.game.ContinueEndButton] Frame 0
class com.nitrome.game.ContinueEndButton extends com.nitrome.game.SimpleButton
{
function ContinueEndButton () {
super();
}
function onPress() {
doStuff();
}
function onEnterFrame() {
if ((((_root.popup_holder._currentframe == _root.popup_holder_frame) && (Key.isDown(32))) && (!_root.popup_holder.keyPressed)) && (_root.popup_holder.keyReady)) {
doStuff();
}
if ((_root.popup_holder._currentframe == _root.popup_holder_frame) && (!Key.isDown(32))) {
_root.popup_holder.keyReady = true;
}
}
function doStuff() {
_root.popup_holder.keyPressed = true;
_root.tt.doTween("congrats", 5329233);
_root.mc.startMenuMusic(false);
}
}
Symbol 1283 MovieClip [__Packages.com.nitrome.game.TryAgainButton] Frame 0
class com.nitrome.game.TryAgainButton extends com.nitrome.game.SimpleButton
{
function TryAgainButton () {
super();
}
function onPress() {
doStuff();
}
function onEnterFrame() {
if ((((_root.popup_holder._currentframe == _root.popup_holder_frame) && (Key.isDown(32))) && (!_root.popup_holder.keyPressed)) && (_root.popup_holder.keyReady)) {
doStuff();
}
if ((_root.popup_holder._currentframe == _root.popup_holder_frame) && (!Key.isDown(32))) {
_root.popup_holder.keyReady = true;
}
}
function doStuff() {
_root.popup_holder.keyPressed = true;
_root.score_panel.clearScore();
_root.score = 0;
_root.popup_holder.hidePopUp();
_root.tt.doTween("game_reset", 5102033);
}
}
Symbol 1284 MovieClip [__Packages.com.nitrome.game.SubmitScoreButton] Frame 0
class com.nitrome.game.SubmitScoreButton extends com.nitrome.game.SimpleButton
{
var _visible;
function SubmitScoreButton () {
super();
if (_root.score > _root.ng.getLastSavedScore(_root.game_save_id)) {
_visible = true;
} else {
_visible = false;
}
}
function onPress() {
_root.ng.setLastSavedScore(_root.score, _root.game_save_id);
_root.popup_holder.hidePopUp();
_root.tt.doTween("submit_score", 5102033);
_root.mc.startMenuMusic(false);
}
}
Symbol 1285 MovieClip [__Packages.com.nitrome.game.QuitGameButton] Frame 0
class com.nitrome.game.QuitGameButton extends com.nitrome.game.SimpleButton
{
function QuitGameButton () {
super();
}
function onPress() {
_root.tt.doTween("choose_level", 5329233);
_root.mc.startMenuMusic(false);
}
}
Symbol 1286 MovieClip [__Packages.com.nitrome.game.NextLevelButton] Frame 0
class com.nitrome.game.NextLevelButton extends com.nitrome.game.SimpleButton
{
function NextLevelButton () {
super();
}
function onPress() {
doStuff();
}
function onEnterFrame() {
if ((((_root.popup_holder._currentframe == _root.popup_holder_frame) && (Key.isDown(32))) && (!_root.popup_holder.keyPressed)) && (_root.popup_holder.keyReady)) {
doStuff();
}
if ((_root.popup_holder._currentframe == _root.popup_holder_frame) && (!Key.isDown(32))) {
_root.popup_holder.keyReady = true;
}
}
function doStuff() {
_root.popup_holder.keyPressed = true;
_root.selected_level++;
_root.popup_holder.hidePopUp();
_root.tt.doTween("game_reset", 5329233);
}
}
Symbol 1287 MovieClip [__Packages.com.nitrome.game.ContinueGameButton] Frame 0
class com.nitrome.game.ContinueGameButton extends com.nitrome.game.SimpleButton
{
function ContinueGameButton () {
super();
}
function onPress() {
_root.game.pauseGame();
}
}
Symbol 1288 MovieClip [__Packages.com.nitrome.game.BackButton] Frame 0
class com.nitrome.game.BackButton extends com.nitrome.game.SimpleButton
{
function BackButton () {
super();
}
function onPress() {
_root.tt.doTween("title_screen", 5102033);
}
}
Symbol 1289 MovieClip [__Packages.com.nitrome.game.ViewScoresButton] Frame 0
class com.nitrome.game.ViewScoresButton extends com.nitrome.game.SimpleButton
{
function ViewScoresButton () {
super();
}
function onPress() {
_root.tt.doTween("view_scores", 5102033);
}
}
Symbol 1290 MovieClip [__Packages.com.nitrome.game.HelpButton] Frame 0
class com.nitrome.game.HelpButton extends com.nitrome.game.SimpleButton
{
function HelpButton () {
super();
}
function onPress() {
_root.tt.doTween("help", 5102033);
}
}
Symbol 1291 MovieClip [__Packages.com.nitrome.game.PlayButton] Frame 0
class com.nitrome.game.PlayButton extends com.nitrome.game.SimpleButton
{
function PlayButton () {
super();
}
function onPress() {
_root.tt.doTween("choose_level", 5102033);
}
}
Symbol 1292 MovieClip [__Packages.com.nitrome.game.CreditsButton] Frame 0
class com.nitrome.game.CreditsButton extends com.nitrome.game.SimpleButton
{
function CreditsButton () {
super();
}
function onPress() {
_root.tt.doTween("credits", 5102033);
}
}
Symbol 1293 MovieClip [__Packages.com.nitrome.stickyfeet.ScrollingBackground] Frame 0
class com.nitrome.stickyfeet.ScrollingBackground extends MovieClip
{
var board;
function ScrollingBackground () {
super();
}
function onEnterFrame() {
board._x = board._x - speed;
if (board._x < -64) {
board._x = board._x + 64;
}
}
var speed = 3;
}
Symbol 1294 MovieClip [__Packages.com.nitrome.stickyfeet.Debris] Frame 0
class com.nitrome.stickyfeet.Debris extends MovieClip
{
var x, px, _x, y, py, _y, dir, _rotation;
function Debris () {
super();
x = (px = _x);
y = (py = _y);
dir = ((Math.random() > 0.5) ? 15 : -15);
}
function main() {
verlet();
updateMC();
}
function verlet() {
var _local3 = x;
var _local2 = y;
x = x + ((x - px) * 0.95);
y = y + ((y - py) + 1);
px = _local3;
py = _local2;
}
function updateMC() {
_x = Math.round(x);
_y = Math.round(y);
_rotation = _rotation + dir;
}
function addVelocity(x, y) {
px = px - x;
py = py - y;
}
}
Symbol 1295 MovieClip [__Packages.com.nitrome.stickyfeet.MovingBlockAttachable] Frame 0
class com.nitrome.stickyfeet.MovingBlockAttachable extends MovieClip
{
var block, side, _y, _x;
function MovingBlockAttachable () {
super();
block = null;
side = -1;
}
function setBlock(block, side) {
this.block = block;
this.side = side;
}
function onEnterFrame() {
if (block != null) {
switch (side) {
case com.nitrome.physics.Rect.UP :
_y = Math.floor(block.y + 0.001);
break;
case com.nitrome.physics.Rect.RIGHT :
_x = Math.floor((block.x + block.width) + 0.001);
break;
case com.nitrome.physics.Rect.DOWN :
_y = Math.floor((block.y + block.height) + 0.001);
break;
case com.nitrome.physics.Rect.LEFT :
_x = Math.floor(block.x + 0.001);
}
}
}
}
Symbol 1296 MovieClip [__Packages.com.nitrome.physics.Rect] Frame 0
class com.nitrome.physics.Rect extends Object
{
var x, y, width, height;
function Rect (x, y, width, height) {
super();
this.x = x;
this.y = y;
this.width = width;
this.height = height;
}
function resize(x, y, width, height) {
this.x = x;
this.y = y;
this.width = width;
this.height = height;
}
function intersects(b) {
return(!((((x > (b.x + (b.width - 1))) || ((x + (width - 1)) < b.x)) || (y > (b.y + (b.height - 1)))) || ((y + (height - 1)) < b.y)));
}
function contains(x, y) {
return((((x >= this.x) && (y >= this.y)) && (x < (this.x + width))) && (y < (this.y + height)));
}
function inside(r) {
return(((((x + (width - 1)) < (r.x + r.width)) && ((y + (height - 1)) < (r.y + r.height))) && (x >= r.x)) && (y >= r.y));
}
function sideOf(x, y) {
var _local5 = this.x + (width * 0.5);
var _local4 = this.y + (height * 0.5);
if ((x == _local5) && (y == _local4)) {
return(0);
}
var _local3 = x - _local5;
var _local2 = y - _local4;
if (((x > _local5) && (y > _local4)) && (Math.abs(_local2) < Math.abs(_local3))) {
return(0);
}
if (((x > _local5) && (y > _local4)) && (Math.abs(_local2) > Math.abs(_local3))) {
return(1);
}
if (((x < _local5) && (y > _local4)) && (Math.abs(_local2) > Math.abs(_local3))) {
return(1);
}
if (((x < _local5) && (y > _local4)) && (Math.abs(_local2) < Math.abs(_local3))) {
return(2);
}
if (((x < _local5) && (y < _local4)) && (Math.abs(_local2) < Math.abs(_local3))) {
return(2);
}
if (((x < _local5) && (y < _local4)) && (Math.abs(_local2) > Math.abs(_local3))) {
return(3);
}
if (((x > _local5) && (y < _local4)) && (Math.abs(_local2) > Math.abs(_local3))) {
return(3);
}
if (((x > _local5) && (y < _local4)) && (Math.abs(_local2) < Math.abs(_local3))) {
return(0);
}
if ((y == _local4) && (x > _local5)) {
return(0);
}
if ((x == _local5) && (y > _local4)) {
return(1);
}
if ((y == _local4) && (x < _local5)) {
return(2);
}
if ((x == _local5) && (y < _local4)) {
return(3);
}
if ((_local3 == Math.abs(_local3)) && (_local2 == (-Math.abs(_local2)))) {
return(0);
}
if ((_local2 == Math.abs(_local2)) && (_local3 == Math.abs(_local3))) {
return(1);
}
if ((_local2 == Math.abs(_local2)) && (_local3 == (-Math.abs(_local3)))) {
return(2);
}
if ((_local2 == (-Math.abs(_local2))) && (_local3 == (-Math.abs(_local3)))) {
return(3);
}
}
static var RIGHT = 0;
static var DOWN = 1;
static var LEFT = 2;
static var UP = 3;
}
Symbol 1297 MovieClip [__Packages.com.nitrome.stickyfeet.Block] Frame 0
class com.nitrome.stickyfeet.Block extends com.nitrome.physics.Rect
{
var mc, sticky, breakable, y, x;
function Block (x, y, width, height, mc) {
super(x, y, width, height);
this.mc = mc;
sticky = false;
breakable = false;
}
function mapLocation() {
return({x:Math.floor(x / 64), y:Math.floor(y / 64)});
}
}
Symbol 1298 MovieClip [__Packages.com.nitrome.stickyfeet.MovingBlock] Frame 0
class com.nitrome.stickyfeet.MovingBlock extends com.nitrome.stickyfeet.Block
{
var g, last_x, last_y, add_x, add_y, x, y, mc;
function MovingBlock (x, y, width, height, mc, g) {
super(x, y, width, height, mc.block);
this.g = g;
updatePosition();
last_x = x;
last_y = y;
add_x = (add_y = 0);
switch (mc._totalframes) {
case 50 :
mc.gotoAndPlay((g.frame_count_50 % mc._totalframes) + 1);
break;
case 100 :
mc.gotoAndPlay((g.frame_count_100 % mc._totalframes) + 1);
break;
case 150 :
mc.gotoAndPlay((g.frame_count_150 % mc._totalframes) + 1);
}
}
function main() {
updatePosition();
}
function updatePosition() {
last_x = x;
last_y = y;
if (mc instanceof MovieClip) {
var _local2 = new Object();
_local2 = com.nitrome.physics.Util.localToLocal(mc, g.stage);
x = _local2.x + add_x;
y = _local2.y + add_y;
}
}
}
Symbol 1299 MovieClip [__Packages.com.nitrome.interfaces.NitromeGameInterface] Frame 0
interface com.nitrome.interfaces.NitromeGameInterface
{
}
Symbol 1300 MovieClip [__Packages.GameEngine] Frame 0
class GameEngine implements com.nitrome.interfaces.NitromeGameInterface
{
var stage, transitionWait, player_holder, leap_holder, tile_holder, debris_holder, monster_holder, electric_point_holder, bullet_holder, coin_holder, piping_holder, debug, blocks, encounters, moving_blocks, debris, god_mode, game_paused, frame_count_25, frame_count_75, frame_count_50, frame_count_100, frame_count_150, player, start_x, start_y, start_rotation, start_msg, scroller;
function GameEngine (mc) {
stage = mc;
_root.scroll_border._visible = false;
clearInterval(transitionWait);
transitionWait = setInterval(this, "waitForTransition", 100);
}
function waitForTransition() {
if (!(_root.tt.img_holder instanceof MovieClip)) {
init();
}
}
function init() {
clearInterval(transitionWait);
player_holder = stage.createEmptyMovieClip("player_holder", 40);
leap_holder = stage.createEmptyMovieClip("leap_holder", 50);
tile_holder = stage.createEmptyMovieClip("tile_holder", 10);
debris_holder = stage.createEmptyMovieClip("debris_holder", 60);
monster_holder = stage.createEmptyMovieClip("monster_holder", 30);
electric_point_holder = stage.createEmptyMovieClip("electric_point_holder", 35);
bullet_holder = stage.createEmptyMovieClip("bullet_holder", 25);
coin_holder = stage.createEmptyMovieClip("coin_holder", 20);
piping_holder = stage.createEmptyMovieClip("piping_holder", 5);
debug = stage.createEmptyMovieClip("debug", 90);
blocks = new Array();
encounters = new Array();
moving_blocks = new Array();
debris = new Array();
_root.lives_panel.setLife(3);
god_mode = false;
game_paused = false;
frame_count_25 = 0;
frame_count_75 = 0;
frame_count_50 = 0;
frame_count_100 = 0;
frame_count_150 = 0;
_root.score_panel.setScore(_root.score);
loadLevel(_root.selected_level);
stage.g = this;
stage.onEnterFrame = function () {
this.g.main();
};
}
function initPlayer() {
var _local3 = player_holder.attachMovie("player", "player", 0, {});
player = new com.nitrome.stickyfeet.Player(this, _local3, (scale * 0.5) + (start_x * scale), (scale * 0.5) + (start_y * scale), findBlock(start_x, start_y - 1), start_rotation);
gameMessage((("level " + _root.selected_level) + ".|") + start_msg);
}
function findBlock(x, y) {
var _local2 = 0;
while (_local2 < blocks.length) {
var _local3 = blocks[_local2].mapLocation();
if ((x == _local3.x) && (y == _local3.y)) {
return(blocks[_local2]);
}
_local2++;
}
return(null);
}
function main() {
if (!game_paused) {
debug.clear();
debug.lineStyle(3, 65280);
updateBlocks();
updateDebris();
player.main();
updateEncounters();
updateFrameCounters();
}
}
function updateFrameCounters() {
frame_count_25 = (frame_count_25 + 1) % frame_cycle_25;
frame_count_50 = (frame_count_50 + 1) % frame_cycle_50;
frame_count_75 = (frame_count_75 + 1) % frame_cycle_75;
frame_count_100 = (frame_count_100 + 1) % frame_cycle_100;
frame_count_150 = (frame_count_150 + 1) % frame_cycle_150;
}
function gameMessage(msg) {
_root.message_holder.message_text.text = msg;
_root.message_holder.gotoAndPlay(1);
_root.message_holder.message_text._visible = true;
}
function giveScore(n) {
_root.score_panel.incrementScore(n);
}
function updateBlocks() {
var _local2 = 0;
while (_local2 < blocks.length) {
if (!(blocks[_local2].mc instanceof MovieClip)) {
blocks.splice(_local2, 1);
_local2--;
}
_local2++;
}
_local2 = 0;
while (_local2 < moving_blocks.length) {
moving_blocks[_local2].main();
if (!(moving_blocks[_local2].mc instanceof MovieClip)) {
moving_blocks.splice(_local2, 1);
_local2--;
}
_local2++;
}
}
function updateEncounters() {
var _local2 = 0;
while (_local2 < encounters.length) {
if (encounters[_local2].main != undefined) {
encounters[_local2].main();
}
if (player.collide(encounters[_local2])) {
encounters[_local2].resolveEncounter(player);
}
if (!(encounters[_local2].mc instanceof MovieClip)) {
encounters.splice(_local2, 1);
_local2--;
}
_local2++;
}
}
function updateDebris() {
var _local2 = 0;
while (_local2 < debris.length) {
debris[_local2].main();
if (debris[_local2]._y > ((-stage._y) + 600)) {
debris[_local2].removeMovieClip();
debris.splice(_local2, 1);
_local2--;
}
_local2++;
}
}
function breakBlock(block) {
var _local7 = com.nitrome.physics.Util.localToLocal(block.mc.b_0, stage);
var _local6 = com.nitrome.physics.Util.localToLocal(block.mc.b_1, stage);
var _local5 = com.nitrome.physics.Util.localToLocal(block.mc.b_2, stage);
var _local4 = com.nitrome.physics.Util.localToLocal(block.mc.b_3, stage);
debris.push(debris_holder.attachMovie("break_block0", "b" + debris_holder.getNextHighestDepth(), debris_holder.getNextHighestDepth(), {_x:_local7.x, _y:_local7.y}));
debris.push(debris_holder.attachMovie("break_block1", "b" + debris_holder.getNextHighestDepth(), debris_holder.getNextHighestDepth(), {_x:_local6.x, _y:_local6.y}));
debris.push(debris_holder.attachMovie("break_block2", "b" + debris_holder.getNextHighestDepth(), debris_holder.getNextHighestDepth(), {_x:_local5.x, _y:_local5.y}));
debris.push(debris_holder.attachMovie("break_block3", "b" + debris_holder.getNextHighestDepth(), debris_holder.getNextHighestDepth(), {_x:_local4.x, _y:_local4.y}));
var _local2 = debris.length - 5;
while (_local2 < debris.length) {
debris[_local2].addVelocity(-10 + (Math.random() * 20), -5 - (Math.random() * 5));
_local2++;
}
block.mc.removeMovieClip();
scroller.removeTile(1, block.id);
player.flyingSmack();
}
function gameOver() {
_root.score = _root.score_panel.getScore();
_root.popup_holder.launchPopUp("game_over");
}
function levelComplete() {
_root.score = _root.score_panel.getScore();
if (_root.selected_level >= _root.ng.getTotalLevels()) {
_root.popup_holder.launchPopUp("final_level_complete");
} else {
_root.popup_holder.launchPopUp("level_complete");
_root.ng.setLevelUnlocked(_root.selected_level + 1, _root.game_save_id);
}
}
function pauseGame() {
if (!game_paused) {
com.nitrome.physics.Util.stopClips(stage);
_root.pause_popup.gotoAndPlay("pause");
game_paused = true;
} else {
com.nitrome.physics.Util.startClips(stage);
var _local3 = 0;
while (_local3 < encounters.length) {
encounters[_local3].unpause();
_local3++;
}
_local3 = 0;
while (_local3 < moving_blocks.length) {
moving_blocks[_local3].unpause();
_local3++;
}
game_paused = false;
_root.pause_popup.gotoAndPlay("hide");
}
}
function reset() {
init();
}
function loadLevel(num) {
var _local3 = new XML();
_local3.g = this;
_local3.onLoad = function (success) {
if (success) {
this.g.decodeXML(this);
} else {
this.g.loadLevel(_root.level);
trace("failed to load xml");
}
};
var _local8 = "" + num;
if (num < 10) {
_local8 = "0" + num;
}
var _local7 = "" + num;
var _local5 = "arcade/gamedata/headcaseDR/";
var _local9 = ".xml";
var _local6 = (_root.ng.getSwfPath() + _local5) + _root.ng.getLevelName(_local7, _local9);
_local3.load(_local6);
}
function decodeXML(xml) {
var _local17 = xml.firstChild;
var _local13 = _local17.firstChild;
var _local16 = new Array();
while (_local13 != null) {
if (_local13.nodeName == "level") {
var _local5 = parseInt(_local13.attributes.width);
var _local6 = parseInt(_local13.attributes.height);
start_x = parseInt(_local13.attributes.start_x);
start_y = parseInt(_local13.attributes.start_y);
start_rotation = parseInt(_local13.attributes.start_rotation);
scroller = new com.nitrome.stickyfeet.Scroller(this, stage, tile_holder, scale, _local5, _local6, stage_w, stage_h);
}
if (_local13.nodeName == "tiles") {
var _local4 = _local13.attributes.values.split(",");
var _local3 = 0;
while (_local3 < _local4.length) {
_local4[_local3] = parseInt(_local4[_local3]);
_local3++;
}
scroller.addLayer(_local4);
}
if (_local13.nodeName == "sign") {
var _local7 = _local13.attributes.text;
var _local12 = parseInt(_local13.attributes.n);
var _local9 = parseInt(_local13.attributes.width);
var _local8 = parseInt(_local13.attributes.height);
var _local10 = parseInt(_local13.attributes.layer);
_local16.push({text:_local7, n:_local12, layer:_local10, width:_local9, height:_local8});
}
if (_local13.nodeName == "msg") {
start_msg = _local13.attributes.text;
}
_local13 = _local13.nextSibling;
}
scroller.setSignage(_local16);
scroller.rezBeginning(start_x, start_y);
initPlayer();
_root.loading_clip.gotoAndStop("fade_out");
_root.mc.startGameMusic(false);
}
function setDebugKeys() {
Key.removeListener(key_listener);
var key_listener = new Object();
key_listener.g = this;
key_listener.onKeyDown = function () {
if (Key.isDown(71)) {
this.g.god_mode = !this.g.god_mode;
if (this.g.god_mode) {
this.g.gameMessage("god mode on");
} else {
this.g.gameMessage("god mode off");
}
}
if (Key.isDown(67)) {
com.nitrome.physics.Util.countMC(_root.stage, true);
}
if (Key.isDown(82)) {
this.g.reset();
}
if (Key.isDown(80)) {
this.g.pauseGame();
}
if (Key.isDown(78)) {
this.g.levelComplete();
}
if (Key.isDown(33)) {
this.g.player.death();
}
if (Key.isDown(34)) {
this.g.player.electrify();
}
if (Key.isDown(36)) {
_root.lives_panel.gainLife();
}
if (Key.isDown(45)) {
this.g.player.block.sticky = !this.g.player.block.sticky;
}
if (Key.isDown(84)) {
}
};
Key.addListener(key_listener);
}
var scale = 64;
var stage_w = 550;
var stage_h = 400;
var frame_cycle_50 = 50;
var frame_cycle_100 = 100;
var frame_cycle_150 = 150;
var frame_cycle_75 = 75;
var frame_cycle_25 = 25;
}
Symbol 1301 MovieClip [__Packages.com.nitrome.interfaces.NitromePlayerInterface] Frame 0
interface com.nitrome.interfaces.NitromePlayerInterface
{
}
Symbol 1302 MovieClip [__Packages.com.nitrome.stickyfeet.Player] Frame 0
class com.nitrome.stickyfeet.Player extends com.nitrome.physics.Rect implements com.nitrome.interfaces.NitromePlayerInterface
{
var g, mc, block, colliding, side, going, player_rect, width, height, direction_pressed, right_pressed, left_pressed, down_pressed, up_pressed, new_rotation, resolve_rotation, jump_pressed, anim_state, squat_count, hurt, hurt_count, ouch, ouch_count, start_count, state, scroll_rect, scroll_rect_x, scroll_rect_y, last_mc_x, last_mc_y, scroll_target_x, scroll_target_y, last_stage_x, last_stage_y, entering_pipe, x, y, electrified_count, corpse;
function Player (g, mc, x, y, block, start_rotation) {
super(x, y, 27, 44);
this.g = g;
this.mc = mc;
this.block = block;
colliding = false;
side = start_rotation;
going = start_rotation;
player_rect = new com.nitrome.physics.Rect(x, y, width, height);
mc._rotation = getRotation(side);
updatePlayerRect();
direction_pressed = false;
right_pressed = false;
left_pressed = false;
down_pressed = false;
up_pressed = false;
new_rotation = false;
resolve_rotation = false;
jump_pressed = false;
anim_state = JUMPING_LEFT;
squat_count = 0;
hurt = false;
hurt_count = 0;
ouch = false;
ouch_count = 0;
start_count = 0;
state = GAME_START;
g.player_holder.swapDepths(5);
mc._x = Math.round(x + 0.001);
mc._y = Math.round(y + 0.001);
g.stage._x = (-mc._x) + Math.round(g.stage_w * 0.5);
g.stage._y = (-mc._y) + Math.round(g.stage_h * 0.5);
g.stage._x = Math.min(0, g.stage._x);
g.stage._y = Math.min(0, g.stage._y);
g.stage._x = Math.max(((-g.scroller.width) * g.scale) + g.stage_w, g.stage._x);
g.stage._y = Math.max(((-g.scroller.height) * g.scale) + g.stage_h, g.stage._y);
scroll_rect = new com.nitrome.physics.Rect(_root.scroll_border._x, _root.scroll_border._y, _root.scroll_border._width, _root.scroll_border._height);
scroll_rect_x = _root.scroll_border._x;
scroll_rect_y = _root.scroll_border._y;
last_mc_x = mc._x;
last_mc_y = mc._y;
scroll_target_x = g.stage._x;
scroll_target_y = g.stage._y;
last_stage_x = g.stage._x;
last_stage_y = g.stage._y;
g.stage.clouds._y = (-g.stage._y) + 258;
g.stage.clouds.clouds0._x = -g.stage._x;
g.stage.clouds.clouds1._x = -g.stage._x;
g.stage.clouds.clouds2._x = -g.stage._x;
entering_pipe = false;
}
function main() {
switch (state) {
case GAME_START :
updateAnimState();
start_count++;
if (start_count >= start_delay) {
state = PIPING;
_root.sfx.playSound("missile");
}
break;
case WALKING :
if (block instanceof com.nitrome.stickyfeet.MovingBlock) {
x = x + (block.x - block.last_x);
y = y + (block.y - block.last_y);
}
updatePlayerRect();
checkBlockCollision();
checkBlockWalk();
checkHit();
updateAnimState();
updateMC();
checkKeys();
break;
case SQUATTING :
if (block instanceof com.nitrome.stickyfeet.MovingBlock) {
x = x + (block.x - block.last_x);
y = y + (block.y - block.last_y);
}
checkHit();
updateAnimState();
updateMC();
if ((!block.sticky) || (g.god_mode)) {
if (squat_count >= squat_delay) {
state = JUMPING;
if (anim_state == SQUATTING_LEFT) {
anim_state = JUMPING_LEFT;
} else if (anim_state == SQUATTING_RIGHT) {
anim_state = JUMPING_RIGHT;
}
var _local3 = g.leap_holder.attachMovie("leap_smoke", "s" + g.leap_holder.getNextHighestDepth(), g.leap_holder.getNextHighestDepth(), {_x:mc._x, _y:mc._y, _rotation:getRotation(side)});
if (block instanceof com.nitrome.stickyfeet.MovingBlock) {
_local3.setBlock(block, side);
}
_root.sfx.playSound("missile");
}
} else if (squat_count >= stuck_delay) {
state = WALKING;
going = STILL;
if (anim_state == STUCK_LEFT) {
anim_state = STANDING_LEFT;
} else if (anim_state == STUCK_RIGHT) {
anim_state = STANDING_RIGHT;
}
}
squat_count++;
break;
case JUMPING :
checkHit();
updateAnimState();
jumpingMovement();
checkJumpingBlockCollision();
updatePlayerRect();
updateMC();
break;
case DEAD :
updateAnimState();
updateCorpse();
break;
case ELECTRIFIED :
updateAnimState();
electrified_count++;
if (electrified_count >= electrified_delay) {
death();
}
break;
case PIPING :
updateAnimState();
pipingMovement();
updateMC();
break;
case CRUSHED :
checkHit();
updateAnimState();
break;
case GAME_EXIT :
}
}
function updateAnimState() {
if (!ouch) {
switch (anim_state) {
case STANDING_LEFT :
if (!hurt) {
mc.gotoAndStop("standing_left");
} else if (hurt) {
mc.gotoAndStop("hurt_standing_left");
}
break;
case STANDING_RIGHT :
if (!hurt) {
mc.gotoAndStop("standing_right");
} else if (hurt) {
mc.gotoAndStop("hurt_standing_right");
}
break;
case RUNNING_LEFT :
if (!hurt) {
mc.gotoAndStop("running_left");
} else if (hurt) {
mc.gotoAndStop("hurt_running_left");
}
break;
case RUNNING_RIGHT :
if (!hurt) {
mc.gotoAndStop("running_right");
} else if (hurt) {
mc.gotoAndStop("hurt_running_right");
}
break;
case SQUATTING_LEFT :
mc.gotoAndStop("squatting_left");
break;
case SQUATTING_RIGHT :
mc.gotoAndStop("squatting_right");
break;
case STUCK_LEFT :
mc.gotoAndStop("stuck_left");
break;
case STUCK_RIGHT :
mc.gotoAndStop("stuck_right");
break;
case JUMPING_LEFT :
if (!hurt) {
mc.gotoAndStop("jumping_left");
} else if (hurt) {
mc.gotoAndStop("hurt_jumping_left");
}
break;
case JUMPING_RIGHT :
if (!hurt) {
mc.gotoAndStop("jumping_right");
} else if (hurt) {
mc.gotoAndStop("hurt_jumping_right");
}
break;
case DYING_LEFT :
mc.gotoAndStop("dying_left");
mc._rotation = mc._rotation - 15;
break;
case DYING_RIGHT :
mc.gotoAndStop("dying_right");
mc._rotation = mc._rotation + 15;
break;
case ELECTRIFIED :
mc.gotoAndStop("electrified");
}
} else {
switch (anim_state) {
case RUNNING_LEFT :
case STANDING_LEFT :
case SQUATTING_LEFT :
case JUMPING_LEFT :
mc.gotoAndStop("ouch_left");
break;
case RUNNING_RIGHT :
case STANDING_RIGHT :
case SQUATTING_RIGHT :
case JUMPING_RIGHT :
mc.gotoAndStop("ouch_right");
}
}
}
function collide(other) {
if (player_rect.intersects(other)) {
return(true);
}
return(false);
}
function pipingMovement() {
switch (going) {
case com.nitrome.physics.Rect.UP :
switch (block.orient) {
case "down_right" :
if (y < (block.y + (block.height * 0.5))) {
going = (side = com.nitrome.physics.Rect.RIGHT);
mc._rotation = getRotation(going);
y = block.y + (block.height * 0.5);
} else {
y = y - (speed * 2);
}
break;
case "down_left" :
if (y < (block.y + (block.height * 0.5))) {
going = (side = com.nitrome.physics.Rect.LEFT);
mc._rotation = getRotation(going);
y = block.y + (block.height * 0.5);
} else {
y = y - (speed * 2);
}
break;
default :
y = y - (speed * 2);
checkPipeStatus();
}
break;
case com.nitrome.physics.Rect.RIGHT :
switch (block.orient) {
case "up_left" :
if (x > (block.x + (block.width * 0.5))) {
going = (side = com.nitrome.physics.Rect.UP);
mc._rotation = getRotation(going);
x = block.x + (block.width * 0.5);
} else {
x = x + (speed * 2);
}
break;
case "down_left" :
if (x > (block.x + (block.width * 0.5))) {
going = (side = com.nitrome.physics.Rect.DOWN);
mc._rotation = getRotation(going);
x = block.x + (block.width * 0.5);
} else {
x = x + (speed * 2);
}
break;
default :
x = x + (speed * 2);
checkPipeStatus();
}
break;
case com.nitrome.physics.Rect.DOWN :
switch (block.orient) {
case "up_right" :
if (y > (block.y + (block.height * 0.5))) {
going = (side = com.nitrome.physics.Rect.RIGHT);
mc._rotation = getRotation(going);
y = block.y + (block.height * 0.5);
} else {
y = y + (speed * 2);
}
break;
case "up_left" :
if (y > (block.y + (block.height * 0.5))) {
going = (side = com.nitrome.physics.Rect.LEFT);
mc._rotation = getRotation(going);
y = block.y + (block.height * 0.5);
} else {
y = y + (speed * 2);
}
break;
default :
y = y + (speed * 2);
checkPipeStatus();
}
break;
case com.nitrome.physics.Rect.LEFT :
switch (block.orient) {
case "up_right" :
if (x < (block.x + (block.width * 0.5))) {
going = (side = com.nitrome.physics.Rect.UP);
mc._rotation = getRotation(going);
x = block.x + (block.width * 0.5);
} else {
x = x - (speed * 2);
}
break;
case "down_right" :
if (x < (block.x + (block.width * 0.5))) {
going = (side = com.nitrome.physics.Rect.DOWN);
mc._rotation = getRotation(going);
x = block.x + (block.width * 0.5);
} else {
x = x - (speed * 2);
}
break;
default :
x = x - (speed * 2);
checkPipeStatus();
}
}
}
function checkPipeStatus() {
updatePlayerRect();
if (entering_pipe) {
if (block.contains(x, y)) {
entering_pipe = false;
return(undefined);
}
} else if (!block.contains(x, y)) {
var _local2 = 0;
while (_local2 < g.blocks.length) {
if (g.blocks[_local2].contains(x, y) && (g.blocks[_local2] instanceof com.nitrome.stickyfeet.PipeBlock)) {
block = g.blocks[_local2];
if (block instanceof com.nitrome.stickyfeet.ExitBlock) {
state = GAME_EXIT;
g.levelComplete();
}
return(undefined);
}
_local2++;
}
state = JUMPING;
g.player_holder.swapDepths(40);
}
}
function resolvePipeBlockCollision(other) {
g.player_holder.swapDepths(5);
switch (going) {
case com.nitrome.physics.Rect.UP :
x = other.x + (other.width * 0.5);
break;
case com.nitrome.physics.Rect.RIGHT :
y = other.y + (other.height * 0.5);
break;
case com.nitrome.physics.Rect.DOWN :
x = other.x + (other.width * 0.5);
break;
case com.nitrome.physics.Rect.LEFT :
y = other.y + (other.height * 0.5);
}
state = PIPING;
entering_pipe = true;
block = other;
_root.sfx.playSound("pipe");
}
function jumpingMovement() {
switch (going) {
case com.nitrome.physics.Rect.UP :
y = y - (speed * 2);
break;
case com.nitrome.physics.Rect.RIGHT :
x = x + (speed * 2);
break;
case com.nitrome.physics.Rect.DOWN :
y = y + (speed * 2);
break;
case com.nitrome.physics.Rect.LEFT :
x = x - (speed * 2);
}
}
function hit() {
if (((((ouch || (hurt)) || (state == ELECTRIFIED)) || (state == DEAD)) || (g.god_mode)) || (state == PIPING)) {
return(undefined);
}
ouch = true;
ouch_count = 0;
hurt_count = 0;
_root.lives_panel.loseLife();
_root.sfx.playSound("ow");
}
function isHurt() {
if (hurt || (ouch)) {
return(true);
}
return(false);
}
function checkHit() {
if (ouch) {
ouch_count++;
if (ouch_count >= ouch_delay) {
ouch = false;
hurt = true;
}
}
if (hurt) {
if (_root.lives_panel.getLivesLeft() <= 0) {
death();
}
hurt_count++;
if (hurt_count >= hurt_delay) {
hurt = false;
}
}
}
function death() {
if (g.god_mode) {
return(undefined);
}
state = DEAD;
_root.sfx.playSound("argh");
mc._x = Math.floor((player_rect.x + (player_rect.width * 0.5)) + 0.001);
mc._y = Math.floor((player_rect.y + (player_rect.height * 0.5)) + 0.001);
corpse = {x:mc._x, y:mc._y, px:mc._x, py:mc._y};
if ((mc._x - g.stage._x) < 275) {
anim_state = DYING_LEFT;
corpse.px = corpse.px - 10;
corpse.py = corpse.py + 10;
} else {
anim_state = DYING_RIGHT;
corpse.px = corpse.px + 10;
corpse.py = corpse.py + 10;
}
g.gameOver();
}
function electrify() {
if ((((state == CRUSHED) || (state == ELECTRIFIED)) || (state == DEAD)) || (g.god_mode)) {
return(undefined);
}
state = ELECTRIFIED;
_root.sfx.playSound("electric");
mc.gotoAndStop("electrified");
anim_state = ELECTRIFIED;
electrified_count = 0;
}
function crush() {
if (((g.god_mode || (state == CRUSHED)) || (state == DEAD)) || (state == ELECTRIFIED)) {
return(undefined);
}
state = CRUSHED;
ouch = true;
hurt = false;
ouch_count = 0;
hurt_count = 0;
_root.lives_panel.setLife(0);
}
function updateCorpse() {
var _local3 = corpse.x;
var _local2 = corpse.y;
corpse.x = corpse.x + ((corpse.x - corpse.px) * 0.95);
corpse.y = corpse.y + ((corpse.y - corpse.py) + 1);
corpse.px = _local3;
corpse.py = _local2;
mc._x = Math.floor(corpse.x + 0.001);
mc._y = Math.floor(corpse.y + 0.001);
}
function flyingSmack() {
var _local4 = 0;
var _local3 = 0;
switch (going) {
case com.nitrome.physics.Rect.UP :
_local4 = player_rect.x + (player_rect.width * 0.5);
_local3 = player_rect.y - (player_rect.height * 0.5);
y = y + (speed * 3);
break;
case com.nitrome.physics.Rect.RIGHT :
_local4 = player_rect.x + (player_rect.width * 1.5);
_local3 = player_rect.y + (player_rect.height * 0.5);
x = x - (speed * 3);
break;
case com.nitrome.physics.Rect.DOWN :
_local4 = player_rect.x + (player_rect.width * 0.5);
_local3 = player_rect.y + (player_rect.height * 1.5);
y = y - (speed * 3);
break;
case com.nitrome.physics.Rect.LEFT :
_local4 = player_rect.x - (player_rect.width * 0.5);
_local3 = player_rect.y + (player_rect.height * 0.5);
x = x + (speed * 3);
}
g.debris_holder.attachMovie("flying_smack", "s" + g.debris_holder.getNextHighestDepth(), g.debris_holder.getNextHighestDepth(), {_x:Math.floor(_local4 + 0.001), _y:Math.floor(_local3 + 0.001)});
_root.sfx.playSound("slap");
}
function checkJumpingBlockCollision() {
var _local3 = 0;
while (_local3 < g.blocks.length) {
if (block == g.blocks[_local3]) {
} else if (player_rect.intersects(g.blocks[_local3])) {
if (g.blocks[_local3] instanceof com.nitrome.stickyfeet.PipeBlock) {
resolvePipeBlockCollision(g.blocks[_local3]);
return(undefined);
}
}
_local3++;
}
_local3 = 0;
while (_local3 < g.blocks.length) {
if (block == g.blocks[_local3]) {
} else if (player_rect.intersects(g.blocks[_local3])) {
if ((!(g.blocks[_local3] instanceof com.nitrome.stickyfeet.PipeBlock)) && (!g.blocks[_local3].breakable)) {
resolveJumpingBlockCollision(g.blocks[_local3]);
_root.sfx.playSound("slap");
return(undefined);
}
if (g.blocks[_local3].breakable) {
g.breakBlock(g.blocks[_local3]);
return(undefined);
}
resolveJumpingBlockCollision(g.blocks[_local3]);
_root.sfx.playSound("slap");
return(undefined);
}
_local3++;
}
}
function resolveJumpingBlockCollision(other) {
var _local3 = false;
switch (going) {
case com.nitrome.physics.Rect.UP :
switch (jumpingSideOf(other)) {
case com.nitrome.physics.Rect.UP :
return(undefined);
case com.nitrome.physics.Rect.LEFT :
x = other.x;
mc._rotation = UP_LEFT_ROTATION;
side = com.nitrome.physics.Rect.LEFT;
new_rotation = true;
resolve_rotation = true;
state = WALKING;
clearKeyStates();
break;
case com.nitrome.physics.Rect.RIGHT :
x = other.x + other.width;
mc._rotation = UP_RIGHT_ROTATION;
side = com.nitrome.physics.Rect.RIGHT;
new_rotation = true;
resolve_rotation = true;
state = WALKING;
clearKeyStates();
break;
case com.nitrome.physics.Rect.DOWN :
_local3 = true;
y = other.y + other.height;
side = com.nitrome.physics.Rect.DOWN;
mc._rotation = DOWN_ROTATION;
state = WALKING;
clearKeyStates();
}
break;
case com.nitrome.physics.Rect.RIGHT :
switch (jumpingSideOf(other)) {
case com.nitrome.physics.Rect.RIGHT :
return(undefined);
case com.nitrome.physics.Rect.UP :
y = other.y;
mc._rotation = UP_RIGHT_ROTATION;
side = com.nitrome.physics.Rect.UP;
new_rotation = true;
resolve_rotation = true;
state = WALKING;
clearKeyStates();
break;
case com.nitrome.physics.Rect.DOWN :
y = other.y + other.height;
mc._rotation = DOWN_RIGHT_ROTATION;
side = com.nitrome.physics.Rect.DOWN;
new_rotation = true;
resolve_rotation = true;
state = WALKING;
clearKeyStates();
break;
case com.nitrome.physics.Rect.LEFT :
_local3 = true;
x = other.x;
side = com.nitrome.physics.Rect.LEFT;
mc._rotation = LEFT_ROTATION;
state = WALKING;
clearKeyStates();
}
break;
case com.nitrome.physics.Rect.DOWN :
switch (jumpingSideOf(other)) {
case com.nitrome.physics.Rect.DOWN :
return(undefined);
case com.nitrome.physics.Rect.LEFT :
x = other.x;
mc._rotation = DOWN_LEFT_ROTATION;
side = com.nitrome.physics.Rect.LEFT;
new_rotation = true;
resolve_rotation = true;
state = WALKING;
clearKeyStates();
break;
case com.nitrome.physics.Rect.RIGHT :
x = other.x + other.width;
mc._rotation = DOWN_RIGHT_ROTATION;
side = com.nitrome.physics.Rect.RIGHT;
new_rotation = true;
resolve_rotation = true;
state = WALKING;
clearKeyStates();
break;
case com.nitrome.physics.Rect.UP :
_local3 = true;
y = other.y;
side = com.nitrome.physics.Rect.UP;
mc._rotation = UP_ROTATION;
state = WALKING;
clearKeyStates();
}
break;
case com.nitrome.physics.Rect.LEFT :
switch (jumpingSideOf(other)) {
case com.nitrome.physics.Rect.LEFT :
return(undefined);
case com.nitrome.physics.Rect.UP :
y = other.y;
mc._rotation = UP_LEFT_ROTATION;
side = com.nitrome.physics.Rect.UP;
new_rotation = true;
resolve_rotation = true;
state = WALKING;
clearKeyStates();
break;
case com.nitrome.physics.Rect.DOWN :
y = other.y + other.height;
mc._rotation = DOWN_LEFT_ROTATION;
side = com.nitrome.physics.Rect.DOWN;
new_rotation = true;
resolve_rotation = true;
state = WALKING;
clearKeyStates();
break;
case com.nitrome.physics.Rect.RIGHT :
_local3 = true;
x = other.x + other.width;
side = com.nitrome.physics.Rect.RIGHT;
mc._rotation = RIGHT_ROTATION;
state = WALKING;
clearKeyStates();
}
}
going = STILL;
block = other;
if (anim_state == JUMPING_RIGHT) {
anim_state = STANDING_RIGHT;
} else if (anim_state == JUMPING_LEFT) {
anim_state = STANDING_LEFT;
}
if (_local3) {
var _local4 = g.leap_holder.attachMovie("smack", "s" + g.leap_holder.getNextHighestDepth(), g.leap_holder.getNextHighestDepth(), {_x:Math.floor(x + 0.001), _y:Math.floor(y + 0.001), _rotation:getRotation(side)});
if (block instanceof com.nitrome.stickyfeet.MovingBlock) {
_local4.setBlock(block, side);
}
}
}
function clearKeyStates() {
jump_pressed = false;
up_pressed = false;
down_pressed = false;
left_pressed = false;
right_pressed = false;
}
function checkBlockCollision() {
var _local2 = 0;
while (_local2 < g.blocks.length) {
if (block == g.blocks[_local2]) {
} else if (player_rect.intersects(g.blocks[_local2])) {
resolveBlockCollision(g.blocks[_local2]);
}
_local2++;
}
}
function resolveBlockCollision(other) {
switch (side) {
case com.nitrome.physics.Rect.UP :
switch (sideOf(other)) {
case com.nitrome.physics.Rect.LEFT :
if ((other.y < (player_rect.y + player_rect.height)) && (other.y > (player_rect.y + (player_rect.height * 0.5)))) {
y = other.y;
block = other;
return(undefined);
}
if (((other.y + other.height) > player_rect.y) && ((other.y + other.height) < (player_rect.y + (player_rect.height * 0.5)))) {
x = other.x - (width * 0.5);
return(undefined);
}
x = other.x;
mc._rotation = UP_LEFT_ROTATION;
side = com.nitrome.physics.Rect.LEFT;
break;
case com.nitrome.physics.Rect.RIGHT :
if ((other.y < (player_rect.y + player_rect.height)) && (other.y > (player_rect.y + (player_rect.height * 0.5)))) {
y = other.y;
block = other;
return(undefined);
}
if (((other.y + other.height) > player_rect.y) && ((other.y + other.height) < (player_rect.y + (player_rect.height * 0.5)))) {
x = (other.x + other.width) + (width * 0.5);
return(undefined);
}
x = other.x + other.width;
mc._rotation = UP_RIGHT_ROTATION;
side = com.nitrome.physics.Rect.RIGHT;
break;
case com.nitrome.physics.Rect.DOWN :
crush();
return(undefined);
case com.nitrome.physics.Rect.UP :
y = other.y;
block = other;
return(undefined);
}
y = y - (width * 0.7);
if (going != STILL) {
going = com.nitrome.physics.Rect.UP;
}
new_rotation = true;
block = other;
break;
case com.nitrome.physics.Rect.RIGHT :
switch (sideOf(other)) {
case com.nitrome.physics.Rect.DOWN :
if (((other.x + other.width) > player_rect.x) && ((other.x + other.width) < (player_rect.x + (player_rect.width * 0.5)))) {
x = other.x + other.width;
block = other;
return(undefined);
}
if ((other.x < (player_rect.x + player_rect.width)) && (other.x > (player_rect.x + (player_rect.width * 0.5)))) {
y = (other.y + other.height) + (width * 0.5);
return(undefined);
}
y = other.y + other.height;
mc._rotation = DOWN_RIGHT_ROTATION;
side = com.nitrome.physics.Rect.DOWN;
break;
case com.nitrome.physics.Rect.UP :
if (((other.x + other.width) > player_rect.x) && ((other.x + other.width) < (player_rect.x + (player_rect.width * 0.5)))) {
x = other.x + other.width;
block = other;
return(undefined);
}
if ((other.x < (player_rect.x + player_rect.width)) && (other.x > (player_rect.x + (player_rect.width * 0.5)))) {
y = other.y - (width * 0.5);
return(undefined);
}
y = other.y;
mc._rotation = UP_RIGHT_ROTATION;
side = com.nitrome.physics.Rect.UP;
break;
case com.nitrome.physics.Rect.LEFT :
crush();
return(undefined);
case com.nitrome.physics.Rect.RIGHT :
x = other.x + other.width;
block = other;
return(undefined);
}
x = x + (width * 0.7);
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
block = other;
break;
case com.nitrome.physics.Rect.DOWN :
switch (sideOf(other)) {
case com.nitrome.physics.Rect.LEFT :
if (((other.y + other.height) > player_rect.y) && ((other.y + other.height) < (player_rect.y + (player_rect.height * 0.5)))) {
y = other.y + other.height;
block = other;
return(undefined);
}
if ((other.y < (player_rect.y + player_rect.height)) && (other.y > (player_rect.y + (player_rect.height * 0.5)))) {
x = other.x - (width * 0.5);
return(undefined);
}
x = other.x;
mc._rotation = DOWN_LEFT_ROTATION;
side = com.nitrome.physics.Rect.LEFT;
break;
case com.nitrome.physics.Rect.RIGHT :
if (((other.y + other.height) > player_rect.y) && ((other.y + other.height) < (player_rect.y + (player_rect.height * 0.5)))) {
y = other.y + other.height;
block = other;
return(undefined);
}
if ((other.y < (player_rect.y + player_rect.height)) && (other.y > (player_rect.y + (player_rect.height * 0.5)))) {
x = (other.x + other.width) + (width * 0.5);
return(undefined);
}
x = other.x + other.width;
mc._rotation = DOWN_RIGHT_ROTATION;
side = com.nitrome.physics.Rect.RIGHT;
break;
case com.nitrome.physics.Rect.DOWN :
y = other.y + other.height;
block = other;
return(undefined);
case com.nitrome.physics.Rect.UP :
crush();
return(undefined);
}
y = y + (width + 0.7);
if (going != STILL) {
going = com.nitrome.physics.Rect.DOWN;
}
new_rotation = true;
block = other;
break;
case com.nitrome.physics.Rect.LEFT :
switch (sideOf(other)) {
case com.nitrome.physics.Rect.DOWN :
if ((other.x < (player_rect.x + player_rect.width)) && (other.x > (player_rect.x + (player_rect.width * 0.5)))) {
x = other.x;
block = other;
return(undefined);
}
if (((other.x + other.width) > player_rect.x) && ((other.x + other.width) < (player_rect.x + (player_rect.width * 0.5)))) {
y = (other.y + other.width) + (width * 0.5);
return(undefined);
}
y = other.y + other.height;
mc._rotation = DOWN_LEFT_ROTATION;
side = com.nitrome.physics.Rect.DOWN;
break;
case com.nitrome.physics.Rect.UP :
if ((other.x < (player_rect.x + player_rect.width)) && (other.x > (player_rect.x + (player_rect.width * 0.5)))) {
x = other.x;
block = other;
return(undefined);
}
if (((other.x + other.width) > player_rect.x) && ((other.x + other.width) < (player_rect.x + (player_rect.width * 0.5)))) {
y = other.y - (width * 0.5);
return(undefined);
}
y = other.y;
mc._rotation = UP_LEFT_ROTATION;
side = com.nitrome.physics.Rect.UP;
break;
case com.nitrome.physics.Rect.LEFT :
x = other.x + other.width;
block = other;
return(undefined);
case com.nitrome.physics.Rect.RIGHT :
crush();
return(undefined);
}
x = x - (width * 0.7);
if (going != STILL) {
going = com.nitrome.physics.Rect.LEFT;
}
new_rotation = true;
block = other;
}
updatePlayerRect();
}
function checkBlockWalk() {
if (!new_rotation) {
switch (side) {
case com.nitrome.physics.Rect.UP :
if (x < block.x) {
var _local2 = blockToBlock(com.nitrome.physics.Rect.LEFT);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
y = block.y;
break;
}
if (_local2 == block) {
y = block.y;
x = block.x;
} else {
mc._rotation = UP_LEFT_ROTATION;
y = block.y + (width * 0.3);
x = block.x;
side = com.nitrome.physics.Rect.LEFT;
if (going != STILL) {
going = com.nitrome.physics.Rect.DOWN;
}
new_rotation = true;
if (x > (block.x + block.width)) {
_local2 = blockToBlock(com.nitrome.physics.Rect.RIGHT);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
y = block.y;
break;
}
if (_local2 == block) {
y = block.y;
x = block.x + block.width;
} else {
mc._rotation = UP_RIGHT_ROTATION;
y = block.y + (width * 0.3);
x = block.x + block.width;
side = com.nitrome.physics.Rect.RIGHT;
if (going != STILL) {
going = com.nitrome.physics.Rect.DOWN;
}
new_rotation = true;
break;
if (y < block.y) {
_local2 = blockToBlock(com.nitrome.physics.Rect.UP);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x + block.width;
break;
}
if (_local2 == block) {
x = block.x + block.width;
y = block.y;
} else {
mc._rotation = UP_RIGHT_ROTATION;
x = (block.x + block.width) - (width * 0.3);
y = block.y;
side = com.nitrome.physics.Rect.UP;
if (going != STILL) {
going = com.nitrome.physics.Rect.LEFT;
}
new_rotation = true;
if (y > (block.y + block.height)) {
_local2 = blockToBlock(com.nitrome.physics.Rect.DOWN);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x + block.width;
break;
}
if (_local2 == block) {
x = block.x + block.width;
y = block.y + block.height;
} else {
mc._rotation = DOWN_RIGHT_ROTATION;
x = (block.x + block.width) - (width * 0.3);
y = block.y + block.height;
side = com.nitrome.physics.Rect.DOWN;
if (going != STILL) {
going = com.nitrome.physics.Rect.LEFT;
}
new_rotation = true;
break;
if (x < block.x) {
_local2 = blockToBlock(com.nitrome.physics.Rect.LEFT);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
y = block.y + block.height;
break;
}
if (_local2 == block) {
y = block.y + block.height;
x = block.x;
} else {
mc._rotation = DOWN_LEFT_ROTATION;
y = (block.y + block.height) - (width * 0.3);
x = block.x;
side = com.nitrome.physics.Rect.LEFT;
if (going != STILL) {
going = com.nitrome.physics.Rect.UP;
}
new_rotation = true;
if (x > (block.x + block.width)) {
_local2 = blockToBlock(com.nitrome.physics.Rect.RIGHT);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
y = block.y + block.height;
break;
}
if (_local2 == block) {
y = block.y + block.height;
x = block.x + block.width;
} else {
mc._rotation = DOWN_RIGHT_ROTATION;
y = (block.y + block.height) - (width * 0.3);
x = block.x + block.width;
side = com.nitrome.physics.Rect.RIGHT;
if (going != STILL) {
going = com.nitrome.physics.Rect.UP;
}
new_rotation = true;
break;
if (y < block.y) {
_local2 = blockToBlock(com.nitrome.physics.Rect.UP);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
break;
}
if (_local2 == block) {
y = block.y;
x = block.x;
} else {
mc._rotation = UP_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y;
side = com.nitrome.physics.Rect.UP;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
if (y <= (block.y + block.height)) {
break;
}
_local2 = blockToBlock(com.nitrome.physics.Rect.DOWN);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
} else if (_local2 == block) {
x = block.x;
y = block.y + block.height;
} else {
mc._rotation = DOWN_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y + block.height;
side = com.nitrome.physics.Rect.DOWN;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
}
}
}
if (y <= (block.y + block.height)) {
break;
}
_local2 = blockToBlock(com.nitrome.physics.Rect.DOWN);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
} else if (_local2 == block) {
x = block.x;
y = block.y + block.height;
} else {
mc._rotation = DOWN_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y + block.height;
side = com.nitrome.physics.Rect.DOWN;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
}
}
}
break;
if (y < block.y) {
_local2 = blockToBlock(com.nitrome.physics.Rect.UP);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
break;
}
if (_local2 == block) {
y = block.y;
x = block.x;
} else {
mc._rotation = UP_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y;
side = com.nitrome.physics.Rect.UP;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
if (y <= (block.y + block.height)) {
break;
}
_local2 = blockToBlock(com.nitrome.physics.Rect.DOWN);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
} else if (_local2 == block) {
x = block.x;
y = block.y + block.height;
} else {
mc._rotation = DOWN_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y + block.height;
side = com.nitrome.physics.Rect.DOWN;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
}
}
}
if (y <= (block.y + block.height)) {
break;
}
_local2 = blockToBlock(com.nitrome.physics.Rect.DOWN);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
} else if (_local2 == block) {
x = block.x;
y = block.y + block.height;
} else {
mc._rotation = DOWN_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y + block.height;
side = com.nitrome.physics.Rect.DOWN;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
}
}
}
if (x > (block.x + block.width)) {
_local2 = blockToBlock(com.nitrome.physics.Rect.RIGHT);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
y = block.y + block.height;
break;
}
if (_local2 == block) {
y = block.y + block.height;
x = block.x + block.width;
} else {
mc._rotation = DOWN_RIGHT_ROTATION;
y = (block.y + block.height) - (width * 0.3);
x = block.x + block.width;
side = com.nitrome.physics.Rect.RIGHT;
if (going != STILL) {
going = com.nitrome.physics.Rect.UP;
}
new_rotation = true;
break;
if (y < block.y) {
_local2 = blockToBlock(com.nitrome.physics.Rect.UP);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
break;
}
if (_local2 == block) {
y = block.y;
x = block.x;
} else {
mc._rotation = UP_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y;
side = com.nitrome.physics.Rect.UP;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
if (y <= (block.y + block.height)) {
break;
}
_local2 = blockToBlock(com.nitrome.physics.Rect.DOWN);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
} else if (_local2 == block) {
x = block.x;
y = block.y + block.height;
} else {
mc._rotation = DOWN_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y + block.height;
side = com.nitrome.physics.Rect.DOWN;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
}
}
}
if (y <= (block.y + block.height)) {
break;
}
_local2 = blockToBlock(com.nitrome.physics.Rect.DOWN);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
} else if (_local2 == block) {
x = block.x;
y = block.y + block.height;
} else {
mc._rotation = DOWN_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y + block.height;
side = com.nitrome.physics.Rect.DOWN;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
}
}
}
break;
if (y < block.y) {
_local2 = blockToBlock(com.nitrome.physics.Rect.UP);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
break;
}
if (_local2 == block) {
y = block.y;
x = block.x;
} else {
mc._rotation = UP_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y;
side = com.nitrome.physics.Rect.UP;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
if (y <= (block.y + block.height)) {
break;
}
_local2 = blockToBlock(com.nitrome.physics.Rect.DOWN);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
} else if (_local2 == block) {
x = block.x;
y = block.y + block.height;
} else {
mc._rotation = DOWN_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y + block.height;
side = com.nitrome.physics.Rect.DOWN;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
}
}
}
if (y <= (block.y + block.height)) {
break;
}
_local2 = blockToBlock(com.nitrome.physics.Rect.DOWN);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
} else if (_local2 == block) {
x = block.x;
y = block.y + block.height;
} else {
mc._rotation = DOWN_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y + block.height;
side = com.nitrome.physics.Rect.DOWN;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
}
}
}
break;
if (x < block.x) {
_local2 = blockToBlock(com.nitrome.physics.Rect.LEFT);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
y = block.y + block.height;
break;
}
if (_local2 == block) {
y = block.y + block.height;
x = block.x;
} else {
mc._rotation = DOWN_LEFT_ROTATION;
y = (block.y + block.height) - (width * 0.3);
x = block.x;
side = com.nitrome.physics.Rect.LEFT;
if (going != STILL) {
going = com.nitrome.physics.Rect.UP;
}
new_rotation = true;
if (x > (block.x + block.width)) {
_local2 = blockToBlock(com.nitrome.physics.Rect.RIGHT);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
y = block.y + block.height;
break;
}
if (_local2 == block) {
y = block.y + block.height;
x = block.x + block.width;
} else {
mc._rotation = DOWN_RIGHT_ROTATION;
y = (block.y + block.height) - (width * 0.3);
x = block.x + block.width;
side = com.nitrome.physics.Rect.RIGHT;
if (going != STILL) {
going = com.nitrome.physics.Rect.UP;
}
new_rotation = true;
break;
if (y < block.y) {
_local2 = blockToBlock(com.nitrome.physics.Rect.UP);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
break;
}
if (_local2 == block) {
y = block.y;
x = block.x;
} else {
mc._rotation = UP_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y;
side = com.nitrome.physics.Rect.UP;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
if (y <= (block.y + block.height)) {
break;
}
_local2 = blockToBlock(com.nitrome.physics.Rect.DOWN);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
} else if (_local2 == block) {
x = block.x;
y = block.y + block.height;
} else {
mc._rotation = DOWN_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y + block.height;
side = com.nitrome.physics.Rect.DOWN;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
}
}
}
if (y <= (block.y + block.height)) {
break;
}
_local2 = blockToBlock(com.nitrome.physics.Rect.DOWN);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
} else if (_local2 == block) {
x = block.x;
y = block.y + block.height;
} else {
mc._rotation = DOWN_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y + block.height;
side = com.nitrome.physics.Rect.DOWN;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
}
}
}
break;
if (y < block.y) {
_local2 = blockToBlock(com.nitrome.physics.Rect.UP);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
break;
}
if (_local2 == block) {
y = block.y;
x = block.x;
} else {
mc._rotation = UP_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y;
side = com.nitrome.physics.Rect.UP;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
if (y <= (block.y + block.height)) {
break;
}
_local2 = blockToBlock(com.nitrome.physics.Rect.DOWN);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
} else if (_local2 == block) {
x = block.x;
y = block.y + block.height;
} else {
mc._rotation = DOWN_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y + block.height;
side = com.nitrome.physics.Rect.DOWN;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
}
}
}
if (y <= (block.y + block.height)) {
break;
}
_local2 = blockToBlock(com.nitrome.physics.Rect.DOWN);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
} else if (_local2 == block) {
x = block.x;
y = block.y + block.height;
} else {
mc._rotation = DOWN_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y + block.height;
side = com.nitrome.physics.Rect.DOWN;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
}
}
}
if (x > (block.x + block.width)) {
_local2 = blockToBlock(com.nitrome.physics.Rect.RIGHT);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
y = block.y + block.height;
break;
}
if (_local2 == block) {
y = block.y + block.height;
x = block.x + block.width;
} else {
mc._rotation = DOWN_RIGHT_ROTATION;
y = (block.y + block.height) - (width * 0.3);
x = block.x + block.width;
side = com.nitrome.physics.Rect.RIGHT;
if (going != STILL) {
going = com.nitrome.physics.Rect.UP;
}
new_rotation = true;
break;
if (y < block.y) {
_local2 = blockToBlock(com.nitrome.physics.Rect.UP);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
break;
}
if (_local2 == block) {
y = block.y;
x = block.x;
} else {
mc._rotation = UP_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y;
side = com.nitrome.physics.Rect.UP;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
if (y <= (block.y + block.height)) {
break;
}
_local2 = blockToBlock(com.nitrome.physics.Rect.DOWN);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
} else if (_local2 == block) {
x = block.x;
y = block.y + block.height;
} else {
mc._rotation = DOWN_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y + block.height;
side = com.nitrome.physics.Rect.DOWN;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
}
}
}
if (y <= (block.y + block.height)) {
break;
}
_local2 = blockToBlock(com.nitrome.physics.Rect.DOWN);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
} else if (_local2 == block) {
x = block.x;
y = block.y + block.height;
} else {
mc._rotation = DOWN_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y + block.height;
side = com.nitrome.physics.Rect.DOWN;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
}
}
}
break;
if (y < block.y) {
_local2 = blockToBlock(com.nitrome.physics.Rect.UP);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
break;
}
if (_local2 == block) {
y = block.y;
x = block.x;
} else {
mc._rotation = UP_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y;
side = com.nitrome.physics.Rect.UP;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
if (y <= (block.y + block.height)) {
break;
}
_local2 = blockToBlock(com.nitrome.physics.Rect.DOWN);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
} else if (_local2 == block) {
x = block.x;
y = block.y + block.height;
} else {
mc._rotation = DOWN_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y + block.height;
side = com.nitrome.physics.Rect.DOWN;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
}
}
}
if (y <= (block.y + block.height)) {
break;
}
_local2 = blockToBlock(com.nitrome.physics.Rect.DOWN);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
} else if (_local2 == block) {
x = block.x;
y = block.y + block.height;
} else {
mc._rotation = DOWN_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y + block.height;
side = com.nitrome.physics.Rect.DOWN;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
}
}
}
if (y > (block.y + block.height)) {
_local2 = blockToBlock(com.nitrome.physics.Rect.DOWN);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x + block.width;
break;
}
if (_local2 == block) {
x = block.x + block.width;
y = block.y + block.height;
} else {
mc._rotation = DOWN_RIGHT_ROTATION;
x = (block.x + block.width) - (width * 0.3);
y = block.y + block.height;
side = com.nitrome.physics.Rect.DOWN;
if (going != STILL) {
going = com.nitrome.physics.Rect.LEFT;
}
new_rotation = true;
break;
if (x < block.x) {
_local2 = blockToBlock(com.nitrome.physics.Rect.LEFT);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
y = block.y + block.height;
break;
}
if (_local2 == block) {
y = block.y + block.height;
x = block.x;
} else {
mc._rotation = DOWN_LEFT_ROTATION;
y = (block.y + block.height) - (width * 0.3);
x = block.x;
side = com.nitrome.physics.Rect.LEFT;
if (going != STILL) {
going = com.nitrome.physics.Rect.UP;
}
new_rotation = true;
if (x > (block.x + block.width)) {
_local2 = blockToBlock(com.nitrome.physics.Rect.RIGHT);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
y = block.y + block.height;
break;
}
if (_local2 == block) {
y = block.y + block.height;
x = block.x + block.width;
} else {
mc._rotation = DOWN_RIGHT_ROTATION;
y = (block.y + block.height) - (width * 0.3);
x = block.x + block.width;
side = com.nitrome.physics.Rect.RIGHT;
if (going != STILL) {
going = com.nitrome.physics.Rect.UP;
}
new_rotation = true;
break;
if (y < block.y) {
_local2 = blockToBlock(com.nitrome.physics.Rect.UP);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
break;
}
if (_local2 == block) {
y = block.y;
x = block.x;
} else {
mc._rotation = UP_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y;
side = com.nitrome.physics.Rect.UP;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
if (y <= (block.y + block.height)) {
break;
}
_local2 = blockToBlock(com.nitrome.physics.Rect.DOWN);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
} else if (_local2 == block) {
x = block.x;
y = block.y + block.height;
} else {
mc._rotation = DOWN_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y + block.height;
side = com.nitrome.physics.Rect.DOWN;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
}
}
}
if (y <= (block.y + block.height)) {
break;
}
_local2 = blockToBlock(com.nitrome.physics.Rect.DOWN);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
} else if (_local2 == block) {
x = block.x;
y = block.y + block.height;
} else {
mc._rotation = DOWN_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y + block.height;
side = com.nitrome.physics.Rect.DOWN;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
}
}
}
break;
if (y < block.y) {
_local2 = blockToBlock(com.nitrome.physics.Rect.UP);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
break;
}
if (_local2 == block) {
y = block.y;
x = block.x;
} else {
mc._rotation = UP_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y;
side = com.nitrome.physics.Rect.UP;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
if (y <= (block.y + block.height)) {
break;
}
_local2 = blockToBlock(com.nitrome.physics.Rect.DOWN);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
} else if (_local2 == block) {
x = block.x;
y = block.y + block.height;
} else {
mc._rotation = DOWN_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y + block.height;
side = com.nitrome.physics.Rect.DOWN;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
}
}
}
if (y <= (block.y + block.height)) {
break;
}
_local2 = blockToBlock(com.nitrome.physics.Rect.DOWN);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
} else if (_local2 == block) {
x = block.x;
y = block.y + block.height;
} else {
mc._rotation = DOWN_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y + block.height;
side = com.nitrome.physics.Rect.DOWN;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
}
}
}
if (x > (block.x + block.width)) {
_local2 = blockToBlock(com.nitrome.physics.Rect.RIGHT);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
y = block.y + block.height;
break;
}
if (_local2 == block) {
y = block.y + block.height;
x = block.x + block.width;
} else {
mc._rotation = DOWN_RIGHT_ROTATION;
y = (block.y + block.height) - (width * 0.3);
x = block.x + block.width;
side = com.nitrome.physics.Rect.RIGHT;
if (going != STILL) {
going = com.nitrome.physics.Rect.UP;
}
new_rotation = true;
break;
if (y < block.y) {
_local2 = blockToBlock(com.nitrome.physics.Rect.UP);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
break;
}
if (_local2 == block) {
y = block.y;
x = block.x;
} else {
mc._rotation = UP_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y;
side = com.nitrome.physics.Rect.UP;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
if (y <= (block.y + block.height)) {
break;
}
_local2 = blockToBlock(com.nitrome.physics.Rect.DOWN);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
} else if (_local2 == block) {
x = block.x;
y = block.y + block.height;
} else {
mc._rotation = DOWN_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y + block.height;
side = com.nitrome.physics.Rect.DOWN;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
}
}
}
if (y <= (block.y + block.height)) {
break;
}
_local2 = blockToBlock(com.nitrome.physics.Rect.DOWN);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
} else if (_local2 == block) {
x = block.x;
y = block.y + block.height;
} else {
mc._rotation = DOWN_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y + block.height;
side = com.nitrome.physics.Rect.DOWN;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
}
}
}
break;
if (y < block.y) {
_local2 = blockToBlock(com.nitrome.physics.Rect.UP);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
break;
}
if (_local2 == block) {
y = block.y;
x = block.x;
} else {
mc._rotation = UP_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y;
side = com.nitrome.physics.Rect.UP;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
if (y <= (block.y + block.height)) {
break;
}
_local2 = blockToBlock(com.nitrome.physics.Rect.DOWN);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
} else if (_local2 == block) {
x = block.x;
y = block.y + block.height;
} else {
mc._rotation = DOWN_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y + block.height;
side = com.nitrome.physics.Rect.DOWN;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
}
}
}
if (y <= (block.y + block.height)) {
break;
}
_local2 = blockToBlock(com.nitrome.physics.Rect.DOWN);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
} else if (_local2 == block) {
x = block.x;
y = block.y + block.height;
} else {
mc._rotation = DOWN_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y + block.height;
side = com.nitrome.physics.Rect.DOWN;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
}
}
}
break;
if (x < block.x) {
_local2 = blockToBlock(com.nitrome.physics.Rect.LEFT);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
y = block.y + block.height;
break;
}
if (_local2 == block) {
y = block.y + block.height;
x = block.x;
} else {
mc._rotation = DOWN_LEFT_ROTATION;
y = (block.y + block.height) - (width * 0.3);
x = block.x;
side = com.nitrome.physics.Rect.LEFT;
if (going != STILL) {
going = com.nitrome.physics.Rect.UP;
}
new_rotation = true;
if (x > (block.x + block.width)) {
_local2 = blockToBlock(com.nitrome.physics.Rect.RIGHT);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
y = block.y + block.height;
break;
}
if (_local2 == block) {
y = block.y + block.height;
x = block.x + block.width;
} else {
mc._rotation = DOWN_RIGHT_ROTATION;
y = (block.y + block.height) - (width * 0.3);
x = block.x + block.width;
side = com.nitrome.physics.Rect.RIGHT;
if (going != STILL) {
going = com.nitrome.physics.Rect.UP;
}
new_rotation = true;
break;
if (y < block.y) {
_local2 = blockToBlock(com.nitrome.physics.Rect.UP);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
break;
}
if (_local2 == block) {
y = block.y;
x = block.x;
} else {
mc._rotation = UP_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y;
side = com.nitrome.physics.Rect.UP;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
if (y <= (block.y + block.height)) {
break;
}
_local2 = blockToBlock(com.nitrome.physics.Rect.DOWN);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
} else if (_local2 == block) {
x = block.x;
y = block.y + block.height;
} else {
mc._rotation = DOWN_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y + block.height;
side = com.nitrome.physics.Rect.DOWN;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
}
}
}
if (y <= (block.y + block.height)) {
break;
}
_local2 = blockToBlock(com.nitrome.physics.Rect.DOWN);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
} else if (_local2 == block) {
x = block.x;
y = block.y + block.height;
} else {
mc._rotation = DOWN_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y + block.height;
side = com.nitrome.physics.Rect.DOWN;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
}
}
}
break;
if (y < block.y) {
_local2 = blockToBlock(com.nitrome.physics.Rect.UP);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
break;
}
if (_local2 == block) {
y = block.y;
x = block.x;
} else {
mc._rotation = UP_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y;
side = com.nitrome.physics.Rect.UP;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
if (y <= (block.y + block.height)) {
break;
}
_local2 = blockToBlock(com.nitrome.physics.Rect.DOWN);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
} else if (_local2 == block) {
x = block.x;
y = block.y + block.height;
} else {
mc._rotation = DOWN_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y + block.height;
side = com.nitrome.physics.Rect.DOWN;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
}
}
}
if (y <= (block.y + block.height)) {
break;
}
_local2 = blockToBlock(com.nitrome.physics.Rect.DOWN);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
} else if (_local2 == block) {
x = block.x;
y = block.y + block.height;
} else {
mc._rotation = DOWN_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y + block.height;
side = com.nitrome.physics.Rect.DOWN;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
}
}
}
if (x > (block.x + block.width)) {
_local2 = blockToBlock(com.nitrome.physics.Rect.RIGHT);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
y = block.y + block.height;
break;
}
if (_local2 == block) {
y = block.y + block.height;
x = block.x + block.width;
} else {
mc._rotation = DOWN_RIGHT_ROTATION;
y = (block.y + block.height) - (width * 0.3);
x = block.x + block.width;
side = com.nitrome.physics.Rect.RIGHT;
if (going != STILL) {
going = com.nitrome.physics.Rect.UP;
}
new_rotation = true;
break;
if (y < block.y) {
_local2 = blockToBlock(com.nitrome.physics.Rect.UP);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
break;
}
if (_local2 == block) {
y = block.y;
x = block.x;
} else {
mc._rotation = UP_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y;
side = com.nitrome.physics.Rect.UP;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
if (y <= (block.y + block.height)) {
break;
}
_local2 = blockToBlock(com.nitrome.physics.Rect.DOWN);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
} else if (_local2 == block) {
x = block.x;
y = block.y + block.height;
} else {
mc._rotation = DOWN_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y + block.height;
side = com.nitrome.physics.Rect.DOWN;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
}
}
}
if (y <= (block.y + block.height)) {
break;
}
_local2 = blockToBlock(com.nitrome.physics.Rect.DOWN);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
} else if (_local2 == block) {
x = block.x;
y = block.y + block.height;
} else {
mc._rotation = DOWN_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y + block.height;
side = com.nitrome.physics.Rect.DOWN;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
}
}
}
break;
if (y < block.y) {
_local2 = blockToBlock(com.nitrome.physics.Rect.UP);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
break;
}
if (_local2 == block) {
y = block.y;
x = block.x;
} else {
mc._rotation = UP_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y;
side = com.nitrome.physics.Rect.UP;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
if (y <= (block.y + block.height)) {
break;
}
_local2 = blockToBlock(com.nitrome.physics.Rect.DOWN);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
} else if (_local2 == block) {
x = block.x;
y = block.y + block.height;
} else {
mc._rotation = DOWN_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y + block.height;
side = com.nitrome.physics.Rect.DOWN;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
}
}
}
if (y <= (block.y + block.height)) {
break;
}
_local2 = blockToBlock(com.nitrome.physics.Rect.DOWN);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
} else if (_local2 == block) {
x = block.x;
y = block.y + block.height;
} else {
mc._rotation = DOWN_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y + block.height;
side = com.nitrome.physics.Rect.DOWN;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
}
}
}
break;
if (y < block.y) {
_local2 = blockToBlock(com.nitrome.physics.Rect.UP);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x + block.width;
break;
}
if (_local2 == block) {
x = block.x + block.width;
y = block.y;
} else {
mc._rotation = UP_RIGHT_ROTATION;
x = (block.x + block.width) - (width * 0.3);
y = block.y;
side = com.nitrome.physics.Rect.UP;
if (going != STILL) {
going = com.nitrome.physics.Rect.LEFT;
}
new_rotation = true;
if (y > (block.y + block.height)) {
_local2 = blockToBlock(com.nitrome.physics.Rect.DOWN);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x + block.width;
break;
}
if (_local2 == block) {
x = block.x + block.width;
y = block.y + block.height;
} else {
mc._rotation = DOWN_RIGHT_ROTATION;
x = (block.x + block.width) - (width * 0.3);
y = block.y + block.height;
side = com.nitrome.physics.Rect.DOWN;
if (going != STILL) {
going = com.nitrome.physics.Rect.LEFT;
}
new_rotation = true;
break;
if (x < block.x) {
_local2 = blockToBlock(com.nitrome.physics.Rect.LEFT);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
y = block.y + block.height;
break;
}
if (_local2 == block) {
y = block.y + block.height;
x = block.x;
} else {
mc._rotation = DOWN_LEFT_ROTATION;
y = (block.y + block.height) - (width * 0.3);
x = block.x;
side = com.nitrome.physics.Rect.LEFT;
if (going != STILL) {
going = com.nitrome.physics.Rect.UP;
}
new_rotation = true;
if (x > (block.x + block.width)) {
_local2 = blockToBlock(com.nitrome.physics.Rect.RIGHT);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
y = block.y + block.height;
break;
}
if (_local2 == block) {
y = block.y + block.height;
x = block.x + block.width;
} else {
mc._rotation = DOWN_RIGHT_ROTATION;
y = (block.y + block.height) - (width * 0.3);
x = block.x + block.width;
side = com.nitrome.physics.Rect.RIGHT;
if (going != STILL) {
going = com.nitrome.physics.Rect.UP;
}
new_rotation = true;
break;
if (y < block.y) {
_local2 = blockToBlock(com.nitrome.physics.Rect.UP);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
break;
}
if (_local2 == block) {
y = block.y;
x = block.x;
} else {
mc._rotation = UP_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y;
side = com.nitrome.physics.Rect.UP;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
if (y <= (block.y + block.height)) {
break;
}
_local2 = blockToBlock(com.nitrome.physics.Rect.DOWN);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
} else if (_local2 == block) {
x = block.x;
y = block.y + block.height;
} else {
mc._rotation = DOWN_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y + block.height;
side = com.nitrome.physics.Rect.DOWN;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
}
}
}
if (y <= (block.y + block.height)) {
break;
}
_local2 = blockToBlock(com.nitrome.physics.Rect.DOWN);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
} else if (_local2 == block) {
x = block.x;
y = block.y + block.height;
} else {
mc._rotation = DOWN_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y + block.height;
side = com.nitrome.physics.Rect.DOWN;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
}
}
}
break;
if (y < block.y) {
_local2 = blockToBlock(com.nitrome.physics.Rect.UP);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
break;
}
if (_local2 == block) {
y = block.y;
x = block.x;
} else {
mc._rotation = UP_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y;
side = com.nitrome.physics.Rect.UP;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
if (y <= (block.y + block.height)) {
break;
}
_local2 = blockToBlock(com.nitrome.physics.Rect.DOWN);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
} else if (_local2 == block) {
x = block.x;
y = block.y + block.height;
} else {
mc._rotation = DOWN_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y + block.height;
side = com.nitrome.physics.Rect.DOWN;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
}
}
}
if (y <= (block.y + block.height)) {
break;
}
_local2 = blockToBlock(com.nitrome.physics.Rect.DOWN);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
} else if (_local2 == block) {
x = block.x;
y = block.y + block.height;
} else {
mc._rotation = DOWN_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y + block.height;
side = com.nitrome.physics.Rect.DOWN;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
}
}
}
if (x > (block.x + block.width)) {
_local2 = blockToBlock(com.nitrome.physics.Rect.RIGHT);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
y = block.y + block.height;
break;
}
if (_local2 == block) {
y = block.y + block.height;
x = block.x + block.width;
} else {
mc._rotation = DOWN_RIGHT_ROTATION;
y = (block.y + block.height) - (width * 0.3);
x = block.x + block.width;
side = com.nitrome.physics.Rect.RIGHT;
if (going != STILL) {
going = com.nitrome.physics.Rect.UP;
}
new_rotation = true;
break;
if (y < block.y) {
_local2 = blockToBlock(com.nitrome.physics.Rect.UP);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
break;
}
if (_local2 == block) {
y = block.y;
x = block.x;
} else {
mc._rotation = UP_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y;
side = com.nitrome.physics.Rect.UP;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
if (y <= (block.y + block.height)) {
break;
}
_local2 = blockToBlock(com.nitrome.physics.Rect.DOWN);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
} else if (_local2 == block) {
x = block.x;
y = block.y + block.height;
} else {
mc._rotation = DOWN_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y + block.height;
side = com.nitrome.physics.Rect.DOWN;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
}
}
}
if (y <= (block.y + block.height)) {
break;
}
_local2 = blockToBlock(com.nitrome.physics.Rect.DOWN);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
} else if (_local2 == block) {
x = block.x;
y = block.y + block.height;
} else {
mc._rotation = DOWN_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y + block.height;
side = com.nitrome.physics.Rect.DOWN;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
}
}
}
break;
if (y < block.y) {
_local2 = blockToBlock(com.nitrome.physics.Rect.UP);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
break;
}
if (_local2 == block) {
y = block.y;
x = block.x;
} else {
mc._rotation = UP_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y;
side = com.nitrome.physics.Rect.UP;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
if (y <= (block.y + block.height)) {
break;
}
_local2 = blockToBlock(com.nitrome.physics.Rect.DOWN);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
} else if (_local2 == block) {
x = block.x;
y = block.y + block.height;
} else {
mc._rotation = DOWN_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y + block.height;
side = com.nitrome.physics.Rect.DOWN;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
}
}
}
if (y <= (block.y + block.height)) {
break;
}
_local2 = blockToBlock(com.nitrome.physics.Rect.DOWN);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
} else if (_local2 == block) {
x = block.x;
y = block.y + block.height;
} else {
mc._rotation = DOWN_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y + block.height;
side = com.nitrome.physics.Rect.DOWN;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
}
}
}
break;
if (x < block.x) {
_local2 = blockToBlock(com.nitrome.physics.Rect.LEFT);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
y = block.y + block.height;
break;
}
if (_local2 == block) {
y = block.y + block.height;
x = block.x;
} else {
mc._rotation = DOWN_LEFT_ROTATION;
y = (block.y + block.height) - (width * 0.3);
x = block.x;
side = com.nitrome.physics.Rect.LEFT;
if (going != STILL) {
going = com.nitrome.physics.Rect.UP;
}
new_rotation = true;
if (x > (block.x + block.width)) {
_local2 = blockToBlock(com.nitrome.physics.Rect.RIGHT);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
y = block.y + block.height;
break;
}
if (_local2 == block) {
y = block.y + block.height;
x = block.x + block.width;
} else {
mc._rotation = DOWN_RIGHT_ROTATION;
y = (block.y + block.height) - (width * 0.3);
x = block.x + block.width;
side = com.nitrome.physics.Rect.RIGHT;
if (going != STILL) {
going = com.nitrome.physics.Rect.UP;
}
new_rotation = true;
break;
if (y < block.y) {
_local2 = blockToBlock(com.nitrome.physics.Rect.UP);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
break;
}
if (_local2 == block) {
y = block.y;
x = block.x;
} else {
mc._rotation = UP_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y;
side = com.nitrome.physics.Rect.UP;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
if (y <= (block.y + block.height)) {
break;
}
_local2 = blockToBlock(com.nitrome.physics.Rect.DOWN);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
} else if (_local2 == block) {
x = block.x;
y = block.y + block.height;
} else {
mc._rotation = DOWN_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y + block.height;
side = com.nitrome.physics.Rect.DOWN;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
}
}
}
if (y <= (block.y + block.height)) {
break;
}
_local2 = blockToBlock(com.nitrome.physics.Rect.DOWN);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
} else if (_local2 == block) {
x = block.x;
y = block.y + block.height;
} else {
mc._rotation = DOWN_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y + block.height;
side = com.nitrome.physics.Rect.DOWN;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
}
}
}
break;
if (y < block.y) {
_local2 = blockToBlock(com.nitrome.physics.Rect.UP);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
break;
}
if (_local2 == block) {
y = block.y;
x = block.x;
} else {
mc._rotation = UP_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y;
side = com.nitrome.physics.Rect.UP;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
if (y <= (block.y + block.height)) {
break;
}
_local2 = blockToBlock(com.nitrome.physics.Rect.DOWN);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
} else if (_local2 == block) {
x = block.x;
y = block.y + block.height;
} else {
mc._rotation = DOWN_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y + block.height;
side = com.nitrome.physics.Rect.DOWN;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
}
}
}
if (y <= (block.y + block.height)) {
break;
}
_local2 = blockToBlock(com.nitrome.physics.Rect.DOWN);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
} else if (_local2 == block) {
x = block.x;
y = block.y + block.height;
} else {
mc._rotation = DOWN_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y + block.height;
side = com.nitrome.physics.Rect.DOWN;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
}
}
}
if (x > (block.x + block.width)) {
_local2 = blockToBlock(com.nitrome.physics.Rect.RIGHT);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
y = block.y + block.height;
break;
}
if (_local2 == block) {
y = block.y + block.height;
x = block.x + block.width;
} else {
mc._rotation = DOWN_RIGHT_ROTATION;
y = (block.y + block.height) - (width * 0.3);
x = block.x + block.width;
side = com.nitrome.physics.Rect.RIGHT;
if (going != STILL) {
going = com.nitrome.physics.Rect.UP;
}
new_rotation = true;
break;
if (y < block.y) {
_local2 = blockToBlock(com.nitrome.physics.Rect.UP);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
break;
}
if (_local2 == block) {
y = block.y;
x = block.x;
} else {
mc._rotation = UP_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y;
side = com.nitrome.physics.Rect.UP;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
if (y <= (block.y + block.height)) {
break;
}
_local2 = blockToBlock(com.nitrome.physics.Rect.DOWN);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
} else if (_local2 == block) {
x = block.x;
y = block.y + block.height;
} else {
mc._rotation = DOWN_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y + block.height;
side = com.nitrome.physics.Rect.DOWN;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
}
}
}
if (y <= (block.y + block.height)) {
break;
}
_local2 = blockToBlock(com.nitrome.physics.Rect.DOWN);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
} else if (_local2 == block) {
x = block.x;
y = block.y + block.height;
} else {
mc._rotation = DOWN_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y + block.height;
side = com.nitrome.physics.Rect.DOWN;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
}
}
}
break;
if (y < block.y) {
_local2 = blockToBlock(com.nitrome.physics.Rect.UP);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
break;
}
if (_local2 == block) {
y = block.y;
x = block.x;
} else {
mc._rotation = UP_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y;
side = com.nitrome.physics.Rect.UP;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
if (y <= (block.y + block.height)) {
break;
}
_local2 = blockToBlock(com.nitrome.physics.Rect.DOWN);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
} else if (_local2 == block) {
x = block.x;
y = block.y + block.height;
} else {
mc._rotation = DOWN_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y + block.height;
side = com.nitrome.physics.Rect.DOWN;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
}
}
}
if (y <= (block.y + block.height)) {
break;
}
_local2 = blockToBlock(com.nitrome.physics.Rect.DOWN);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
} else if (_local2 == block) {
x = block.x;
y = block.y + block.height;
} else {
mc._rotation = DOWN_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y + block.height;
side = com.nitrome.physics.Rect.DOWN;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
}
}
}
if (y > (block.y + block.height)) {
_local2 = blockToBlock(com.nitrome.physics.Rect.DOWN);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x + block.width;
break;
}
if (_local2 == block) {
x = block.x + block.width;
y = block.y + block.height;
} else {
mc._rotation = DOWN_RIGHT_ROTATION;
x = (block.x + block.width) - (width * 0.3);
y = block.y + block.height;
side = com.nitrome.physics.Rect.DOWN;
if (going != STILL) {
going = com.nitrome.physics.Rect.LEFT;
}
new_rotation = true;
break;
if (x < block.x) {
_local2 = blockToBlock(com.nitrome.physics.Rect.LEFT);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
y = block.y + block.height;
break;
}
if (_local2 == block) {
y = block.y + block.height;
x = block.x;
} else {
mc._rotation = DOWN_LEFT_ROTATION;
y = (block.y + block.height) - (width * 0.3);
x = block.x;
side = com.nitrome.physics.Rect.LEFT;
if (going != STILL) {
going = com.nitrome.physics.Rect.UP;
}
new_rotation = true;
if (x > (block.x + block.width)) {
_local2 = blockToBlock(com.nitrome.physics.Rect.RIGHT);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
y = block.y + block.height;
break;
}
if (_local2 == block) {
y = block.y + block.height;
x = block.x + block.width;
} else {
mc._rotation = DOWN_RIGHT_ROTATION;
y = (block.y + block.height) - (width * 0.3);
x = block.x + block.width;
side = com.nitrome.physics.Rect.RIGHT;
if (going != STILL) {
going = com.nitrome.physics.Rect.UP;
}
new_rotation = true;
break;
if (y < block.y) {
_local2 = blockToBlock(com.nitrome.physics.Rect.UP);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
break;
}
if (_local2 == block) {
y = block.y;
x = block.x;
} else {
mc._rotation = UP_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y;
side = com.nitrome.physics.Rect.UP;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
if (y <= (block.y + block.height)) {
break;
}
_local2 = blockToBlock(com.nitrome.physics.Rect.DOWN);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
} else if (_local2 == block) {
x = block.x;
y = block.y + block.height;
} else {
mc._rotation = DOWN_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y + block.height;
side = com.nitrome.physics.Rect.DOWN;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
}
}
}
if (y <= (block.y + block.height)) {
break;
}
_local2 = blockToBlock(com.nitrome.physics.Rect.DOWN);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
} else if (_local2 == block) {
x = block.x;
y = block.y + block.height;
} else {
mc._rotation = DOWN_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y + block.height;
side = com.nitrome.physics.Rect.DOWN;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
}
}
}
break;
if (y < block.y) {
_local2 = blockToBlock(com.nitrome.physics.Rect.UP);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
break;
}
if (_local2 == block) {
y = block.y;
x = block.x;
} else {
mc._rotation = UP_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y;
side = com.nitrome.physics.Rect.UP;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
if (y <= (block.y + block.height)) {
break;
}
_local2 = blockToBlock(com.nitrome.physics.Rect.DOWN);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
} else if (_local2 == block) {
x = block.x;
y = block.y + block.height;
} else {
mc._rotation = DOWN_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y + block.height;
side = com.nitrome.physics.Rect.DOWN;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
}
}
}
if (y <= (block.y + block.height)) {
break;
}
_local2 = blockToBlock(com.nitrome.physics.Rect.DOWN);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
} else if (_local2 == block) {
x = block.x;
y = block.y + block.height;
} else {
mc._rotation = DOWN_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y + block.height;
side = com.nitrome.physics.Rect.DOWN;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
}
}
}
if (x > (block.x + block.width)) {
_local2 = blockToBlock(com.nitrome.physics.Rect.RIGHT);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
y = block.y + block.height;
break;
}
if (_local2 == block) {
y = block.y + block.height;
x = block.x + block.width;
} else {
mc._rotation = DOWN_RIGHT_ROTATION;
y = (block.y + block.height) - (width * 0.3);
x = block.x + block.width;
side = com.nitrome.physics.Rect.RIGHT;
if (going != STILL) {
going = com.nitrome.physics.Rect.UP;
}
new_rotation = true;
break;
if (y < block.y) {
_local2 = blockToBlock(com.nitrome.physics.Rect.UP);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
break;
}
if (_local2 == block) {
y = block.y;
x = block.x;
} else {
mc._rotation = UP_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y;
side = com.nitrome.physics.Rect.UP;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
if (y <= (block.y + block.height)) {
break;
}
_local2 = blockToBlock(com.nitrome.physics.Rect.DOWN);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
} else if (_local2 == block) {
x = block.x;
y = block.y + block.height;
} else {
mc._rotation = DOWN_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y + block.height;
side = com.nitrome.physics.Rect.DOWN;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
}
}
}
if (y <= (block.y + block.height)) {
break;
}
_local2 = blockToBlock(com.nitrome.physics.Rect.DOWN);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
} else if (_local2 == block) {
x = block.x;
y = block.y + block.height;
} else {
mc._rotation = DOWN_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y + block.height;
side = com.nitrome.physics.Rect.DOWN;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
}
}
}
break;
if (y < block.y) {
_local2 = blockToBlock(com.nitrome.physics.Rect.UP);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
break;
}
if (_local2 == block) {
y = block.y;
x = block.x;
} else {
mc._rotation = UP_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y;
side = com.nitrome.physics.Rect.UP;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
if (y <= (block.y + block.height)) {
break;
}
_local2 = blockToBlock(com.nitrome.physics.Rect.DOWN);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
} else if (_local2 == block) {
x = block.x;
y = block.y + block.height;
} else {
mc._rotation = DOWN_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y + block.height;
side = com.nitrome.physics.Rect.DOWN;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
}
}
}
if (y <= (block.y + block.height)) {
break;
}
_local2 = blockToBlock(com.nitrome.physics.Rect.DOWN);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
} else if (_local2 == block) {
x = block.x;
y = block.y + block.height;
} else {
mc._rotation = DOWN_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y + block.height;
side = com.nitrome.physics.Rect.DOWN;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
}
}
}
break;
if (x < block.x) {
_local2 = blockToBlock(com.nitrome.physics.Rect.LEFT);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
y = block.y + block.height;
break;
}
if (_local2 == block) {
y = block.y + block.height;
x = block.x;
} else {
mc._rotation = DOWN_LEFT_ROTATION;
y = (block.y + block.height) - (width * 0.3);
x = block.x;
side = com.nitrome.physics.Rect.LEFT;
if (going != STILL) {
going = com.nitrome.physics.Rect.UP;
}
new_rotation = true;
if (x > (block.x + block.width)) {
_local2 = blockToBlock(com.nitrome.physics.Rect.RIGHT);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
y = block.y + block.height;
break;
}
if (_local2 == block) {
y = block.y + block.height;
x = block.x + block.width;
} else {
mc._rotation = DOWN_RIGHT_ROTATION;
y = (block.y + block.height) - (width * 0.3);
x = block.x + block.width;
side = com.nitrome.physics.Rect.RIGHT;
if (going != STILL) {
going = com.nitrome.physics.Rect.UP;
}
new_rotation = true;
break;
if (y < block.y) {
_local2 = blockToBlock(com.nitrome.physics.Rect.UP);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
break;
}
if (_local2 == block) {
y = block.y;
x = block.x;
} else {
mc._rotation = UP_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y;
side = com.nitrome.physics.Rect.UP;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
if (y <= (block.y + block.height)) {
break;
}
_local2 = blockToBlock(com.nitrome.physics.Rect.DOWN);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
} else if (_local2 == block) {
x = block.x;
y = block.y + block.height;
} else {
mc._rotation = DOWN_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y + block.height;
side = com.nitrome.physics.Rect.DOWN;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
}
}
}
if (y <= (block.y + block.height)) {
break;
}
_local2 = blockToBlock(com.nitrome.physics.Rect.DOWN);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
} else if (_local2 == block) {
x = block.x;
y = block.y + block.height;
} else {
mc._rotation = DOWN_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y + block.height;
side = com.nitrome.physics.Rect.DOWN;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
}
}
}
break;
if (y < block.y) {
_local2 = blockToBlock(com.nitrome.physics.Rect.UP);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
break;
}
if (_local2 == block) {
y = block.y;
x = block.x;
} else {
mc._rotation = UP_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y;
side = com.nitrome.physics.Rect.UP;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
if (y <= (block.y + block.height)) {
break;
}
_local2 = blockToBlock(com.nitrome.physics.Rect.DOWN);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
} else if (_local2 == block) {
x = block.x;
y = block.y + block.height;
} else {
mc._rotation = DOWN_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y + block.height;
side = com.nitrome.physics.Rect.DOWN;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
}
}
}
if (y <= (block.y + block.height)) {
break;
}
_local2 = blockToBlock(com.nitrome.physics.Rect.DOWN);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
} else if (_local2 == block) {
x = block.x;
y = block.y + block.height;
} else {
mc._rotation = DOWN_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y + block.height;
side = com.nitrome.physics.Rect.DOWN;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
}
}
}
if (x > (block.x + block.width)) {
_local2 = blockToBlock(com.nitrome.physics.Rect.RIGHT);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
y = block.y + block.height;
break;
}
if (_local2 == block) {
y = block.y + block.height;
x = block.x + block.width;
} else {
mc._rotation = DOWN_RIGHT_ROTATION;
y = (block.y + block.height) - (width * 0.3);
x = block.x + block.width;
side = com.nitrome.physics.Rect.RIGHT;
if (going != STILL) {
going = com.nitrome.physics.Rect.UP;
}
new_rotation = true;
break;
if (y < block.y) {
_local2 = blockToBlock(com.nitrome.physics.Rect.UP);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
break;
}
if (_local2 == block) {
y = block.y;
x = block.x;
} else {
mc._rotation = UP_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y;
side = com.nitrome.physics.Rect.UP;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
if (y <= (block.y + block.height)) {
break;
}
_local2 = blockToBlock(com.nitrome.physics.Rect.DOWN);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
} else if (_local2 == block) {
x = block.x;
y = block.y + block.height;
} else {
mc._rotation = DOWN_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y + block.height;
side = com.nitrome.physics.Rect.DOWN;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
}
}
}
if (y <= (block.y + block.height)) {
break;
}
_local2 = blockToBlock(com.nitrome.physics.Rect.DOWN);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
} else if (_local2 == block) {
x = block.x;
y = block.y + block.height;
} else {
mc._rotation = DOWN_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y + block.height;
side = com.nitrome.physics.Rect.DOWN;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
}
}
}
break;
if (y < block.y) {
_local2 = blockToBlock(com.nitrome.physics.Rect.UP);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
break;
}
if (_local2 == block) {
y = block.y;
x = block.x;
} else {
mc._rotation = UP_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y;
side = com.nitrome.physics.Rect.UP;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
if (y <= (block.y + block.height)) {
break;
}
_local2 = blockToBlock(com.nitrome.physics.Rect.DOWN);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
} else if (_local2 == block) {
x = block.x;
y = block.y + block.height;
} else {
mc._rotation = DOWN_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y + block.height;
side = com.nitrome.physics.Rect.DOWN;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
}
}
}
if (y <= (block.y + block.height)) {
break;
}
_local2 = blockToBlock(com.nitrome.physics.Rect.DOWN);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
} else if (_local2 == block) {
x = block.x;
y = block.y + block.height;
} else {
mc._rotation = DOWN_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y + block.height;
side = com.nitrome.physics.Rect.DOWN;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
}
}
}
if (x > (block.x + block.width)) {
var _local2 = blockToBlock(com.nitrome.physics.Rect.RIGHT);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
y = block.y;
break;
}
if (_local2 == block) {
y = block.y;
x = block.x + block.width;
} else {
mc._rotation = UP_RIGHT_ROTATION;
y = block.y + (width * 0.3);
x = block.x + block.width;
side = com.nitrome.physics.Rect.RIGHT;
if (going != STILL) {
going = com.nitrome.physics.Rect.DOWN;
}
new_rotation = true;
break;
if (y < block.y) {
_local2 = blockToBlock(com.nitrome.physics.Rect.UP);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x + block.width;
break;
}
if (_local2 == block) {
x = block.x + block.width;
y = block.y;
} else {
mc._rotation = UP_RIGHT_ROTATION;
x = (block.x + block.width) - (width * 0.3);
y = block.y;
side = com.nitrome.physics.Rect.UP;
if (going != STILL) {
going = com.nitrome.physics.Rect.LEFT;
}
new_rotation = true;
if (y > (block.y + block.height)) {
_local2 = blockToBlock(com.nitrome.physics.Rect.DOWN);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x + block.width;
break;
}
if (_local2 == block) {
x = block.x + block.width;
y = block.y + block.height;
} else {
mc._rotation = DOWN_RIGHT_ROTATION;
x = (block.x + block.width) - (width * 0.3);
y = block.y + block.height;
side = com.nitrome.physics.Rect.DOWN;
if (going != STILL) {
going = com.nitrome.physics.Rect.LEFT;
}
new_rotation = true;
break;
if (x < block.x) {
_local2 = blockToBlock(com.nitrome.physics.Rect.LEFT);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
y = block.y + block.height;
break;
}
if (_local2 == block) {
y = block.y + block.height;
x = block.x;
} else {
mc._rotation = DOWN_LEFT_ROTATION;
y = (block.y + block.height) - (width * 0.3);
x = block.x;
side = com.nitrome.physics.Rect.LEFT;
if (going != STILL) {
going = com.nitrome.physics.Rect.UP;
}
new_rotation = true;
if (x > (block.x + block.width)) {
_local2 = blockToBlock(com.nitrome.physics.Rect.RIGHT);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
y = block.y + block.height;
break;
}
if (_local2 == block) {
y = block.y + block.height;
x = block.x + block.width;
} else {
mc._rotation = DOWN_RIGHT_ROTATION;
y = (block.y + block.height) - (width * 0.3);
x = block.x + block.width;
side = com.nitrome.physics.Rect.RIGHT;
if (going != STILL) {
going = com.nitrome.physics.Rect.UP;
}
new_rotation = true;
break;
if (y < block.y) {
_local2 = blockToBlock(com.nitrome.physics.Rect.UP);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
break;
}
if (_local2 == block) {
y = block.y;
x = block.x;
} else {
mc._rotation = UP_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y;
side = com.nitrome.physics.Rect.UP;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
if (y <= (block.y + block.height)) {
break;
}
_local2 = blockToBlock(com.nitrome.physics.Rect.DOWN);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
} else if (_local2 == block) {
x = block.x;
y = block.y + block.height;
} else {
mc._rotation = DOWN_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y + block.height;
side = com.nitrome.physics.Rect.DOWN;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
}
}
}
if (y <= (block.y + block.height)) {
break;
}
_local2 = blockToBlock(com.nitrome.physics.Rect.DOWN);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
} else if (_local2 == block) {
x = block.x;
y = block.y + block.height;
} else {
mc._rotation = DOWN_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y + block.height;
side = com.nitrome.physics.Rect.DOWN;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
}
}
}
break;
if (y < block.y) {
_local2 = blockToBlock(com.nitrome.physics.Rect.UP);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
break;
}
if (_local2 == block) {
y = block.y;
x = block.x;
} else {
mc._rotation = UP_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y;
side = com.nitrome.physics.Rect.UP;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
if (y <= (block.y + block.height)) {
break;
}
_local2 = blockToBlock(com.nitrome.physics.Rect.DOWN);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
} else if (_local2 == block) {
x = block.x;
y = block.y + block.height;
} else {
mc._rotation = DOWN_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y + block.height;
side = com.nitrome.physics.Rect.DOWN;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
}
}
}
if (y <= (block.y + block.height)) {
break;
}
_local2 = blockToBlock(com.nitrome.physics.Rect.DOWN);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
} else if (_local2 == block) {
x = block.x;
y = block.y + block.height;
} else {
mc._rotation = DOWN_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y + block.height;
side = com.nitrome.physics.Rect.DOWN;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
}
}
}
if (x > (block.x + block.width)) {
_local2 = blockToBlock(com.nitrome.physics.Rect.RIGHT);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
y = block.y + block.height;
break;
}
if (_local2 == block) {
y = block.y + block.height;
x = block.x + block.width;
} else {
mc._rotation = DOWN_RIGHT_ROTATION;
y = (block.y + block.height) - (width * 0.3);
x = block.x + block.width;
side = com.nitrome.physics.Rect.RIGHT;
if (going != STILL) {
going = com.nitrome.physics.Rect.UP;
}
new_rotation = true;
break;
if (y < block.y) {
_local2 = blockToBlock(com.nitrome.physics.Rect.UP);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
break;
}
if (_local2 == block) {
y = block.y;
x = block.x;
} else {
mc._rotation = UP_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y;
side = com.nitrome.physics.Rect.UP;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
if (y <= (block.y + block.height)) {
break;
}
_local2 = blockToBlock(com.nitrome.physics.Rect.DOWN);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
} else if (_local2 == block) {
x = block.x;
y = block.y + block.height;
} else {
mc._rotation = DOWN_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y + block.height;
side = com.nitrome.physics.Rect.DOWN;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
}
}
}
if (y <= (block.y + block.height)) {
break;
}
_local2 = blockToBlock(com.nitrome.physics.Rect.DOWN);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
} else if (_local2 == block) {
x = block.x;
y = block.y + block.height;
} else {
mc._rotation = DOWN_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y + block.height;
side = com.nitrome.physics.Rect.DOWN;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
}
}
}
break;
if (y < block.y) {
_local2 = blockToBlock(com.nitrome.physics.Rect.UP);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
break;
}
if (_local2 == block) {
y = block.y;
x = block.x;
} else {
mc._rotation = UP_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y;
side = com.nitrome.physics.Rect.UP;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
if (y <= (block.y + block.height)) {
break;
}
_local2 = blockToBlock(com.nitrome.physics.Rect.DOWN);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
} else if (_local2 == block) {
x = block.x;
y = block.y + block.height;
} else {
mc._rotation = DOWN_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y + block.height;
side = com.nitrome.physics.Rect.DOWN;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
}
}
}
if (y <= (block.y + block.height)) {
break;
}
_local2 = blockToBlock(com.nitrome.physics.Rect.DOWN);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
} else if (_local2 == block) {
x = block.x;
y = block.y + block.height;
} else {
mc._rotation = DOWN_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y + block.height;
side = com.nitrome.physics.Rect.DOWN;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
}
}
}
break;
if (x < block.x) {
_local2 = blockToBlock(com.nitrome.physics.Rect.LEFT);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
y = block.y + block.height;
break;
}
if (_local2 == block) {
y = block.y + block.height;
x = block.x;
} else {
mc._rotation = DOWN_LEFT_ROTATION;
y = (block.y + block.height) - (width * 0.3);
x = block.x;
side = com.nitrome.physics.Rect.LEFT;
if (going != STILL) {
going = com.nitrome.physics.Rect.UP;
}
new_rotation = true;
if (x > (block.x + block.width)) {
_local2 = blockToBlock(com.nitrome.physics.Rect.RIGHT);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
y = block.y + block.height;
break;
}
if (_local2 == block) {
y = block.y + block.height;
x = block.x + block.width;
} else {
mc._rotation = DOWN_RIGHT_ROTATION;
y = (block.y + block.height) - (width * 0.3);
x = block.x + block.width;
side = com.nitrome.physics.Rect.RIGHT;
if (going != STILL) {
going = com.nitrome.physics.Rect.UP;
}
new_rotation = true;
break;
if (y < block.y) {
_local2 = blockToBlock(com.nitrome.physics.Rect.UP);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
break;
}
if (_local2 == block) {
y = block.y;
x = block.x;
} else {
mc._rotation = UP_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y;
side = com.nitrome.physics.Rect.UP;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
if (y <= (block.y + block.height)) {
break;
}
_local2 = blockToBlock(com.nitrome.physics.Rect.DOWN);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
} else if (_local2 == block) {
x = block.x;
y = block.y + block.height;
} else {
mc._rotation = DOWN_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y + block.height;
side = com.nitrome.physics.Rect.DOWN;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
}
}
}
if (y <= (block.y + block.height)) {
break;
}
_local2 = blockToBlock(com.nitrome.physics.Rect.DOWN);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
} else if (_local2 == block) {
x = block.x;
y = block.y + block.height;
} else {
mc._rotation = DOWN_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y + block.height;
side = com.nitrome.physics.Rect.DOWN;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
}
}
}
break;
if (y < block.y) {
_local2 = blockToBlock(com.nitrome.physics.Rect.UP);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
break;
}
if (_local2 == block) {
y = block.y;
x = block.x;
} else {
mc._rotation = UP_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y;
side = com.nitrome.physics.Rect.UP;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
if (y <= (block.y + block.height)) {
break;
}
_local2 = blockToBlock(com.nitrome.physics.Rect.DOWN);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
} else if (_local2 == block) {
x = block.x;
y = block.y + block.height;
} else {
mc._rotation = DOWN_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y + block.height;
side = com.nitrome.physics.Rect.DOWN;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
}
}
}
if (y <= (block.y + block.height)) {
break;
}
_local2 = blockToBlock(com.nitrome.physics.Rect.DOWN);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
} else if (_local2 == block) {
x = block.x;
y = block.y + block.height;
} else {
mc._rotation = DOWN_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y + block.height;
side = com.nitrome.physics.Rect.DOWN;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
}
}
}
if (x > (block.x + block.width)) {
_local2 = blockToBlock(com.nitrome.physics.Rect.RIGHT);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
y = block.y + block.height;
break;
}
if (_local2 == block) {
y = block.y + block.height;
x = block.x + block.width;
} else {
mc._rotation = DOWN_RIGHT_ROTATION;
y = (block.y + block.height) - (width * 0.3);
x = block.x + block.width;
side = com.nitrome.physics.Rect.RIGHT;
if (going != STILL) {
going = com.nitrome.physics.Rect.UP;
}
new_rotation = true;
break;
if (y < block.y) {
_local2 = blockToBlock(com.nitrome.physics.Rect.UP);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
break;
}
if (_local2 == block) {
y = block.y;
x = block.x;
} else {
mc._rotation = UP_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y;
side = com.nitrome.physics.Rect.UP;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
if (y <= (block.y + block.height)) {
break;
}
_local2 = blockToBlock(com.nitrome.physics.Rect.DOWN);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
} else if (_local2 == block) {
x = block.x;
y = block.y + block.height;
} else {
mc._rotation = DOWN_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y + block.height;
side = com.nitrome.physics.Rect.DOWN;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
}
}
}
if (y <= (block.y + block.height)) {
break;
}
_local2 = blockToBlock(com.nitrome.physics.Rect.DOWN);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
} else if (_local2 == block) {
x = block.x;
y = block.y + block.height;
} else {
mc._rotation = DOWN_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y + block.height;
side = com.nitrome.physics.Rect.DOWN;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
}
}
}
break;
if (y < block.y) {
_local2 = blockToBlock(com.nitrome.physics.Rect.UP);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
break;
}
if (_local2 == block) {
y = block.y;
x = block.x;
} else {
mc._rotation = UP_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y;
side = com.nitrome.physics.Rect.UP;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
if (y <= (block.y + block.height)) {
break;
}
_local2 = blockToBlock(com.nitrome.physics.Rect.DOWN);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
} else if (_local2 == block) {
x = block.x;
y = block.y + block.height;
} else {
mc._rotation = DOWN_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y + block.height;
side = com.nitrome.physics.Rect.DOWN;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
}
}
}
if (y <= (block.y + block.height)) {
break;
}
_local2 = blockToBlock(com.nitrome.physics.Rect.DOWN);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
} else if (_local2 == block) {
x = block.x;
y = block.y + block.height;
} else {
mc._rotation = DOWN_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y + block.height;
side = com.nitrome.physics.Rect.DOWN;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
}
}
}
if (y > (block.y + block.height)) {
_local2 = blockToBlock(com.nitrome.physics.Rect.DOWN);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x + block.width;
break;
}
if (_local2 == block) {
x = block.x + block.width;
y = block.y + block.height;
} else {
mc._rotation = DOWN_RIGHT_ROTATION;
x = (block.x + block.width) - (width * 0.3);
y = block.y + block.height;
side = com.nitrome.physics.Rect.DOWN;
if (going != STILL) {
going = com.nitrome.physics.Rect.LEFT;
}
new_rotation = true;
break;
if (x < block.x) {
_local2 = blockToBlock(com.nitrome.physics.Rect.LEFT);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
y = block.y + block.height;
break;
}
if (_local2 == block) {
y = block.y + block.height;
x = block.x;
} else {
mc._rotation = DOWN_LEFT_ROTATION;
y = (block.y + block.height) - (width * 0.3);
x = block.x;
side = com.nitrome.physics.Rect.LEFT;
if (going != STILL) {
going = com.nitrome.physics.Rect.UP;
}
new_rotation = true;
if (x > (block.x + block.width)) {
_local2 = blockToBlock(com.nitrome.physics.Rect.RIGHT);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
y = block.y + block.height;
break;
}
if (_local2 == block) {
y = block.y + block.height;
x = block.x + block.width;
} else {
mc._rotation = DOWN_RIGHT_ROTATION;
y = (block.y + block.height) - (width * 0.3);
x = block.x + block.width;
side = com.nitrome.physics.Rect.RIGHT;
if (going != STILL) {
going = com.nitrome.physics.Rect.UP;
}
new_rotation = true;
break;
if (y < block.y) {
_local2 = blockToBlock(com.nitrome.physics.Rect.UP);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
break;
}
if (_local2 == block) {
y = block.y;
x = block.x;
} else {
mc._rotation = UP_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y;
side = com.nitrome.physics.Rect.UP;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
if (y <= (block.y + block.height)) {
break;
}
_local2 = blockToBlock(com.nitrome.physics.Rect.DOWN);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
} else if (_local2 == block) {
x = block.x;
y = block.y + block.height;
} else {
mc._rotation = DOWN_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y + block.height;
side = com.nitrome.physics.Rect.DOWN;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
}
}
}
if (y <= (block.y + block.height)) {
break;
}
_local2 = blockToBlock(com.nitrome.physics.Rect.DOWN);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
} else if (_local2 == block) {
x = block.x;
y = block.y + block.height;
} else {
mc._rotation = DOWN_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y + block.height;
side = com.nitrome.physics.Rect.DOWN;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
}
}
}
break;
if (y < block.y) {
_local2 = blockToBlock(com.nitrome.physics.Rect.UP);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
break;
}
if (_local2 == block) {
y = block.y;
x = block.x;
} else {
mc._rotation = UP_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y;
side = com.nitrome.physics.Rect.UP;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
if (y <= (block.y + block.height)) {
break;
}
_local2 = blockToBlock(com.nitrome.physics.Rect.DOWN);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
} else if (_local2 == block) {
x = block.x;
y = block.y + block.height;
} else {
mc._rotation = DOWN_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y + block.height;
side = com.nitrome.physics.Rect.DOWN;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
}
}
}
if (y <= (block.y + block.height)) {
break;
}
_local2 = blockToBlock(com.nitrome.physics.Rect.DOWN);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
} else if (_local2 == block) {
x = block.x;
y = block.y + block.height;
} else {
mc._rotation = DOWN_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y + block.height;
side = com.nitrome.physics.Rect.DOWN;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
}
}
}
if (x > (block.x + block.width)) {
_local2 = blockToBlock(com.nitrome.physics.Rect.RIGHT);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
y = block.y + block.height;
break;
}
if (_local2 == block) {
y = block.y + block.height;
x = block.x + block.width;
} else {
mc._rotation = DOWN_RIGHT_ROTATION;
y = (block.y + block.height) - (width * 0.3);
x = block.x + block.width;
side = com.nitrome.physics.Rect.RIGHT;
if (going != STILL) {
going = com.nitrome.physics.Rect.UP;
}
new_rotation = true;
break;
if (y < block.y) {
_local2 = blockToBlock(com.nitrome.physics.Rect.UP);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
break;
}
if (_local2 == block) {
y = block.y;
x = block.x;
} else {
mc._rotation = UP_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y;
side = com.nitrome.physics.Rect.UP;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
if (y <= (block.y + block.height)) {
break;
}
_local2 = blockToBlock(com.nitrome.physics.Rect.DOWN);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
} else if (_local2 == block) {
x = block.x;
y = block.y + block.height;
} else {
mc._rotation = DOWN_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y + block.height;
side = com.nitrome.physics.Rect.DOWN;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
}
}
}
if (y <= (block.y + block.height)) {
break;
}
_local2 = blockToBlock(com.nitrome.physics.Rect.DOWN);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
} else if (_local2 == block) {
x = block.x;
y = block.y + block.height;
} else {
mc._rotation = DOWN_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y + block.height;
side = com.nitrome.physics.Rect.DOWN;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
}
}
}
break;
if (y < block.y) {
_local2 = blockToBlock(com.nitrome.physics.Rect.UP);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
break;
}
if (_local2 == block) {
y = block.y;
x = block.x;
} else {
mc._rotation = UP_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y;
side = com.nitrome.physics.Rect.UP;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
if (y <= (block.y + block.height)) {
break;
}
_local2 = blockToBlock(com.nitrome.physics.Rect.DOWN);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
} else if (_local2 == block) {
x = block.x;
y = block.y + block.height;
} else {
mc._rotation = DOWN_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y + block.height;
side = com.nitrome.physics.Rect.DOWN;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
}
}
}
if (y <= (block.y + block.height)) {
break;
}
_local2 = blockToBlock(com.nitrome.physics.Rect.DOWN);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
} else if (_local2 == block) {
x = block.x;
y = block.y + block.height;
} else {
mc._rotation = DOWN_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y + block.height;
side = com.nitrome.physics.Rect.DOWN;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
}
}
}
break;
if (x < block.x) {
_local2 = blockToBlock(com.nitrome.physics.Rect.LEFT);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
y = block.y + block.height;
break;
}
if (_local2 == block) {
y = block.y + block.height;
x = block.x;
} else {
mc._rotation = DOWN_LEFT_ROTATION;
y = (block.y + block.height) - (width * 0.3);
x = block.x;
side = com.nitrome.physics.Rect.LEFT;
if (going != STILL) {
going = com.nitrome.physics.Rect.UP;
}
new_rotation = true;
if (x > (block.x + block.width)) {
_local2 = blockToBlock(com.nitrome.physics.Rect.RIGHT);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
y = block.y + block.height;
break;
}
if (_local2 == block) {
y = block.y + block.height;
x = block.x + block.width;
} else {
mc._rotation = DOWN_RIGHT_ROTATION;
y = (block.y + block.height) - (width * 0.3);
x = block.x + block.width;
side = com.nitrome.physics.Rect.RIGHT;
if (going != STILL) {
going = com.nitrome.physics.Rect.UP;
}
new_rotation = true;
break;
if (y < block.y) {
_local2 = blockToBlock(com.nitrome.physics.Rect.UP);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
break;
}
if (_local2 == block) {
y = block.y;
x = block.x;
} else {
mc._rotation = UP_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y;
side = com.nitrome.physics.Rect.UP;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
if (y <= (block.y + block.height)) {
break;
}
_local2 = blockToBlock(com.nitrome.physics.Rect.DOWN);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
} else if (_local2 == block) {
x = block.x;
y = block.y + block.height;
} else {
mc._rotation = DOWN_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y + block.height;
side = com.nitrome.physics.Rect.DOWN;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
}
}
}
if (y <= (block.y + block.height)) {
break;
}
_local2 = blockToBlock(com.nitrome.physics.Rect.DOWN);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
} else if (_local2 == block) {
x = block.x;
y = block.y + block.height;
} else {
mc._rotation = DOWN_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y + block.height;
side = com.nitrome.physics.Rect.DOWN;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
}
}
}
break;
if (y < block.y) {
_local2 = blockToBlock(com.nitrome.physics.Rect.UP);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
break;
}
if (_local2 == block) {
y = block.y;
x = block.x;
} else {
mc._rotation = UP_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y;
side = com.nitrome.physics.Rect.UP;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
if (y <= (block.y + block.height)) {
break;
}
_local2 = blockToBlock(com.nitrome.physics.Rect.DOWN);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
} else if (_local2 == block) {
x = block.x;
y = block.y + block.height;
} else {
mc._rotation = DOWN_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y + block.height;
side = com.nitrome.physics.Rect.DOWN;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
}
}
}
if (y <= (block.y + block.height)) {
break;
}
_local2 = blockToBlock(com.nitrome.physics.Rect.DOWN);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
} else if (_local2 == block) {
x = block.x;
y = block.y + block.height;
} else {
mc._rotation = DOWN_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y + block.height;
side = com.nitrome.physics.Rect.DOWN;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
}
}
}
if (x > (block.x + block.width)) {
_local2 = blockToBlock(com.nitrome.physics.Rect.RIGHT);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
y = block.y + block.height;
break;
}
if (_local2 == block) {
y = block.y + block.height;
x = block.x + block.width;
} else {
mc._rotation = DOWN_RIGHT_ROTATION;
y = (block.y + block.height) - (width * 0.3);
x = block.x + block.width;
side = com.nitrome.physics.Rect.RIGHT;
if (going != STILL) {
going = com.nitrome.physics.Rect.UP;
}
new_rotation = true;
break;
if (y < block.y) {
_local2 = blockToBlock(com.nitrome.physics.Rect.UP);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
break;
}
if (_local2 == block) {
y = block.y;
x = block.x;
} else {
mc._rotation = UP_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y;
side = com.nitrome.physics.Rect.UP;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
if (y <= (block.y + block.height)) {
break;
}
_local2 = blockToBlock(com.nitrome.physics.Rect.DOWN);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
} else if (_local2 == block) {
x = block.x;
y = block.y + block.height;
} else {
mc._rotation = DOWN_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y + block.height;
side = com.nitrome.physics.Rect.DOWN;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
}
}
}
if (y <= (block.y + block.height)) {
break;
}
_local2 = blockToBlock(com.nitrome.physics.Rect.DOWN);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
} else if (_local2 == block) {
x = block.x;
y = block.y + block.height;
} else {
mc._rotation = DOWN_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y + block.height;
side = com.nitrome.physics.Rect.DOWN;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
}
}
}
break;
if (y < block.y) {
_local2 = blockToBlock(com.nitrome.physics.Rect.UP);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
break;
}
if (_local2 == block) {
y = block.y;
x = block.x;
} else {
mc._rotation = UP_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y;
side = com.nitrome.physics.Rect.UP;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
if (y <= (block.y + block.height)) {
break;
}
_local2 = blockToBlock(com.nitrome.physics.Rect.DOWN);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
} else if (_local2 == block) {
x = block.x;
y = block.y + block.height;
} else {
mc._rotation = DOWN_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y + block.height;
side = com.nitrome.physics.Rect.DOWN;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
}
}
}
if (y <= (block.y + block.height)) {
break;
}
_local2 = blockToBlock(com.nitrome.physics.Rect.DOWN);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
} else if (_local2 == block) {
x = block.x;
y = block.y + block.height;
} else {
mc._rotation = DOWN_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y + block.height;
side = com.nitrome.physics.Rect.DOWN;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
}
}
}
break;
case com.nitrome.physics.Rect.RIGHT :
if (y < block.y) {
var _local2 = blockToBlock(com.nitrome.physics.Rect.UP);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x + block.width;
break;
}
if (_local2 == block) {
x = block.x + block.width;
y = block.y;
} else {
mc._rotation = UP_RIGHT_ROTATION;
x = (block.x + block.width) - (width * 0.3);
y = block.y;
side = com.nitrome.physics.Rect.UP;
if (going != STILL) {
going = com.nitrome.physics.Rect.LEFT;
}
new_rotation = true;
if (y > (block.y + block.height)) {
_local2 = blockToBlock(com.nitrome.physics.Rect.DOWN);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x + block.width;
break;
}
if (_local2 == block) {
x = block.x + block.width;
y = block.y + block.height;
} else {
mc._rotation = DOWN_RIGHT_ROTATION;
x = (block.x + block.width) - (width * 0.3);
y = block.y + block.height;
side = com.nitrome.physics.Rect.DOWN;
if (going != STILL) {
going = com.nitrome.physics.Rect.LEFT;
}
new_rotation = true;
break;
if (x < block.x) {
_local2 = blockToBlock(com.nitrome.physics.Rect.LEFT);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
y = block.y + block.height;
break;
}
if (_local2 == block) {
y = block.y + block.height;
x = block.x;
} else {
mc._rotation = DOWN_LEFT_ROTATION;
y = (block.y + block.height) - (width * 0.3);
x = block.x;
side = com.nitrome.physics.Rect.LEFT;
if (going != STILL) {
going = com.nitrome.physics.Rect.UP;
}
new_rotation = true;
if (x > (block.x + block.width)) {
_local2 = blockToBlock(com.nitrome.physics.Rect.RIGHT);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
y = block.y + block.height;
break;
}
if (_local2 == block) {
y = block.y + block.height;
x = block.x + block.width;
} else {
mc._rotation = DOWN_RIGHT_ROTATION;
y = (block.y + block.height) - (width * 0.3);
x = block.x + block.width;
side = com.nitrome.physics.Rect.RIGHT;
if (going != STILL) {
going = com.nitrome.physics.Rect.UP;
}
new_rotation = true;
break;
if (y < block.y) {
_local2 = blockToBlock(com.nitrome.physics.Rect.UP);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
break;
}
if (_local2 == block) {
y = block.y;
x = block.x;
} else {
mc._rotation = UP_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y;
side = com.nitrome.physics.Rect.UP;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
if (y <= (block.y + block.height)) {
break;
}
_local2 = blockToBlock(com.nitrome.physics.Rect.DOWN);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
} else if (_local2 == block) {
x = block.x;
y = block.y + block.height;
} else {
mc._rotation = DOWN_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y + block.height;
side = com.nitrome.physics.Rect.DOWN;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
}
}
}
if (y <= (block.y + block.height)) {
break;
}
_local2 = blockToBlock(com.nitrome.physics.Rect.DOWN);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
} else if (_local2 == block) {
x = block.x;
y = block.y + block.height;
} else {
mc._rotation = DOWN_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y + block.height;
side = com.nitrome.physics.Rect.DOWN;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
}
}
}
break;
if (y < block.y) {
_local2 = blockToBlock(com.nitrome.physics.Rect.UP);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
break;
}
if (_local2 == block) {
y = block.y;
x = block.x;
} else {
mc._rotation = UP_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y;
side = com.nitrome.physics.Rect.UP;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
if (y <= (block.y + block.height)) {
break;
}
_local2 = blockToBlock(com.nitrome.physics.Rect.DOWN);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
} else if (_local2 == block) {
x = block.x;
y = block.y + block.height;
} else {
mc._rotation = DOWN_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y + block.height;
side = com.nitrome.physics.Rect.DOWN;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
}
}
}
if (y <= (block.y + block.height)) {
break;
}
_local2 = blockToBlock(com.nitrome.physics.Rect.DOWN);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
} else if (_local2 == block) {
x = block.x;
y = block.y + block.height;
} else {
mc._rotation = DOWN_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y + block.height;
side = com.nitrome.physics.Rect.DOWN;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
}
}
}
if (x > (block.x + block.width)) {
_local2 = blockToBlock(com.nitrome.physics.Rect.RIGHT);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
y = block.y + block.height;
break;
}
if (_local2 == block) {
y = block.y + block.height;
x = block.x + block.width;
} else {
mc._rotation = DOWN_RIGHT_ROTATION;
y = (block.y + block.height) - (width * 0.3);
x = block.x + block.width;
side = com.nitrome.physics.Rect.RIGHT;
if (going != STILL) {
going = com.nitrome.physics.Rect.UP;
}
new_rotation = true;
break;
if (y < block.y) {
_local2 = blockToBlock(com.nitrome.physics.Rect.UP);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
break;
}
if (_local2 == block) {
y = block.y;
x = block.x;
} else {
mc._rotation = UP_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y;
side = com.nitrome.physics.Rect.UP;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
if (y <= (block.y + block.height)) {
break;
}
_local2 = blockToBlock(com.nitrome.physics.Rect.DOWN);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
} else if (_local2 == block) {
x = block.x;
y = block.y + block.height;
} else {
mc._rotation = DOWN_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y + block.height;
side = com.nitrome.physics.Rect.DOWN;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
}
}
}
if (y <= (block.y + block.height)) {
break;
}
_local2 = blockToBlock(com.nitrome.physics.Rect.DOWN);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
} else if (_local2 == block) {
x = block.x;
y = block.y + block.height;
} else {
mc._rotation = DOWN_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y + block.height;
side = com.nitrome.physics.Rect.DOWN;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
}
}
}
break;
if (y < block.y) {
_local2 = blockToBlock(com.nitrome.physics.Rect.UP);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
break;
}
if (_local2 == block) {
y = block.y;
x = block.x;
} else {
mc._rotation = UP_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y;
side = com.nitrome.physics.Rect.UP;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
if (y <= (block.y + block.height)) {
break;
}
_local2 = blockToBlock(com.nitrome.physics.Rect.DOWN);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
} else if (_local2 == block) {
x = block.x;
y = block.y + block.height;
} else {
mc._rotation = DOWN_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y + block.height;
side = com.nitrome.physics.Rect.DOWN;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
}
}
}
if (y <= (block.y + block.height)) {
break;
}
_local2 = blockToBlock(com.nitrome.physics.Rect.DOWN);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
} else if (_local2 == block) {
x = block.x;
y = block.y + block.height;
} else {
mc._rotation = DOWN_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y + block.height;
side = com.nitrome.physics.Rect.DOWN;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
}
}
}
break;
if (x < block.x) {
_local2 = blockToBlock(com.nitrome.physics.Rect.LEFT);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
y = block.y + block.height;
break;
}
if (_local2 == block) {
y = block.y + block.height;
x = block.x;
} else {
mc._rotation = DOWN_LEFT_ROTATION;
y = (block.y + block.height) - (width * 0.3);
x = block.x;
side = com.nitrome.physics.Rect.LEFT;
if (going != STILL) {
going = com.nitrome.physics.Rect.UP;
}
new_rotation = true;
if (x > (block.x + block.width)) {
_local2 = blockToBlock(com.nitrome.physics.Rect.RIGHT);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
y = block.y + block.height;
break;
}
if (_local2 == block) {
y = block.y + block.height;
x = block.x + block.width;
} else {
mc._rotation = DOWN_RIGHT_ROTATION;
y = (block.y + block.height) - (width * 0.3);
x = block.x + block.width;
side = com.nitrome.physics.Rect.RIGHT;
if (going != STILL) {
going = com.nitrome.physics.Rect.UP;
}
new_rotation = true;
break;
if (y < block.y) {
_local2 = blockToBlock(com.nitrome.physics.Rect.UP);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
break;
}
if (_local2 == block) {
y = block.y;
x = block.x;
} else {
mc._rotation = UP_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y;
side = com.nitrome.physics.Rect.UP;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
if (y <= (block.y + block.height)) {
break;
}
_local2 = blockToBlock(com.nitrome.physics.Rect.DOWN);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
} else if (_local2 == block) {
x = block.x;
y = block.y + block.height;
} else {
mc._rotation = DOWN_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y + block.height;
side = com.nitrome.physics.Rect.DOWN;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
}
}
}
if (y <= (block.y + block.height)) {
break;
}
_local2 = blockToBlock(com.nitrome.physics.Rect.DOWN);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
} else if (_local2 == block) {
x = block.x;
y = block.y + block.height;
} else {
mc._rotation = DOWN_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y + block.height;
side = com.nitrome.physics.Rect.DOWN;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
}
}
}
break;
if (y < block.y) {
_local2 = blockToBlock(com.nitrome.physics.Rect.UP);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
break;
}
if (_local2 == block) {
y = block.y;
x = block.x;
} else {
mc._rotation = UP_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y;
side = com.nitrome.physics.Rect.UP;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
if (y <= (block.y + block.height)) {
break;
}
_local2 = blockToBlock(com.nitrome.physics.Rect.DOWN);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
} else if (_local2 == block) {
x = block.x;
y = block.y + block.height;
} else {
mc._rotation = DOWN_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y + block.height;
side = com.nitrome.physics.Rect.DOWN;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
}
}
}
if (y <= (block.y + block.height)) {
break;
}
_local2 = blockToBlock(com.nitrome.physics.Rect.DOWN);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
} else if (_local2 == block) {
x = block.x;
y = block.y + block.height;
} else {
mc._rotation = DOWN_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y + block.height;
side = com.nitrome.physics.Rect.DOWN;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
}
}
}
if (x > (block.x + block.width)) {
_local2 = blockToBlock(com.nitrome.physics.Rect.RIGHT);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
y = block.y + block.height;
break;
}
if (_local2 == block) {
y = block.y + block.height;
x = block.x + block.width;
} else {
mc._rotation = DOWN_RIGHT_ROTATION;
y = (block.y + block.height) - (width * 0.3);
x = block.x + block.width;
side = com.nitrome.physics.Rect.RIGHT;
if (going != STILL) {
going = com.nitrome.physics.Rect.UP;
}
new_rotation = true;
break;
if (y < block.y) {
_local2 = blockToBlock(com.nitrome.physics.Rect.UP);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
break;
}
if (_local2 == block) {
y = block.y;
x = block.x;
} else {
mc._rotation = UP_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y;
side = com.nitrome.physics.Rect.UP;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
if (y <= (block.y + block.height)) {
break;
}
_local2 = blockToBlock(com.nitrome.physics.Rect.DOWN);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
} else if (_local2 == block) {
x = block.x;
y = block.y + block.height;
} else {
mc._rotation = DOWN_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y + block.height;
side = com.nitrome.physics.Rect.DOWN;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
}
}
}
if (y <= (block.y + block.height)) {
break;
}
_local2 = blockToBlock(com.nitrome.physics.Rect.DOWN);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
} else if (_local2 == block) {
x = block.x;
y = block.y + block.height;
} else {
mc._rotation = DOWN_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y + block.height;
side = com.nitrome.physics.Rect.DOWN;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
}
}
}
break;
if (y < block.y) {
_local2 = blockToBlock(com.nitrome.physics.Rect.UP);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
break;
}
if (_local2 == block) {
y = block.y;
x = block.x;
} else {
mc._rotation = UP_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y;
side = com.nitrome.physics.Rect.UP;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
if (y <= (block.y + block.height)) {
break;
}
_local2 = blockToBlock(com.nitrome.physics.Rect.DOWN);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
} else if (_local2 == block) {
x = block.x;
y = block.y + block.height;
} else {
mc._rotation = DOWN_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y + block.height;
side = com.nitrome.physics.Rect.DOWN;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
}
}
}
if (y <= (block.y + block.height)) {
break;
}
_local2 = blockToBlock(com.nitrome.physics.Rect.DOWN);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
} else if (_local2 == block) {
x = block.x;
y = block.y + block.height;
} else {
mc._rotation = DOWN_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y + block.height;
side = com.nitrome.physics.Rect.DOWN;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
}
}
}
if (y > (block.y + block.height)) {
var _local2 = blockToBlock(com.nitrome.physics.Rect.DOWN);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x + block.width;
break;
}
if (_local2 == block) {
x = block.x + block.width;
y = block.y + block.height;
} else {
mc._rotation = DOWN_RIGHT_ROTATION;
x = (block.x + block.width) - (width * 0.3);
y = block.y + block.height;
side = com.nitrome.physics.Rect.DOWN;
if (going != STILL) {
going = com.nitrome.physics.Rect.LEFT;
}
new_rotation = true;
break;
if (x < block.x) {
_local2 = blockToBlock(com.nitrome.physics.Rect.LEFT);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
y = block.y + block.height;
break;
}
if (_local2 == block) {
y = block.y + block.height;
x = block.x;
} else {
mc._rotation = DOWN_LEFT_ROTATION;
y = (block.y + block.height) - (width * 0.3);
x = block.x;
side = com.nitrome.physics.Rect.LEFT;
if (going != STILL) {
going = com.nitrome.physics.Rect.UP;
}
new_rotation = true;
if (x > (block.x + block.width)) {
_local2 = blockToBlock(com.nitrome.physics.Rect.RIGHT);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
y = block.y + block.height;
break;
}
if (_local2 == block) {
y = block.y + block.height;
x = block.x + block.width;
} else {
mc._rotation = DOWN_RIGHT_ROTATION;
y = (block.y + block.height) - (width * 0.3);
x = block.x + block.width;
side = com.nitrome.physics.Rect.RIGHT;
if (going != STILL) {
going = com.nitrome.physics.Rect.UP;
}
new_rotation = true;
break;
if (y < block.y) {
_local2 = blockToBlock(com.nitrome.physics.Rect.UP);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
break;
}
if (_local2 == block) {
y = block.y;
x = block.x;
} else {
mc._rotation = UP_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y;
side = com.nitrome.physics.Rect.UP;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
if (y <= (block.y + block.height)) {
break;
}
_local2 = blockToBlock(com.nitrome.physics.Rect.DOWN);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
} else if (_local2 == block) {
x = block.x;
y = block.y + block.height;
} else {
mc._rotation = DOWN_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y + block.height;
side = com.nitrome.physics.Rect.DOWN;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
}
}
}
if (y <= (block.y + block.height)) {
break;
}
_local2 = blockToBlock(com.nitrome.physics.Rect.DOWN);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
} else if (_local2 == block) {
x = block.x;
y = block.y + block.height;
} else {
mc._rotation = DOWN_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y + block.height;
side = com.nitrome.physics.Rect.DOWN;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
}
}
}
break;
if (y < block.y) {
_local2 = blockToBlock(com.nitrome.physics.Rect.UP);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
break;
}
if (_local2 == block) {
y = block.y;
x = block.x;
} else {
mc._rotation = UP_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y;
side = com.nitrome.physics.Rect.UP;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
if (y <= (block.y + block.height)) {
break;
}
_local2 = blockToBlock(com.nitrome.physics.Rect.DOWN);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
} else if (_local2 == block) {
x = block.x;
y = block.y + block.height;
} else {
mc._rotation = DOWN_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y + block.height;
side = com.nitrome.physics.Rect.DOWN;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
}
}
}
if (y <= (block.y + block.height)) {
break;
}
_local2 = blockToBlock(com.nitrome.physics.Rect.DOWN);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
} else if (_local2 == block) {
x = block.x;
y = block.y + block.height;
} else {
mc._rotation = DOWN_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y + block.height;
side = com.nitrome.physics.Rect.DOWN;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
}
}
}
if (x > (block.x + block.width)) {
_local2 = blockToBlock(com.nitrome.physics.Rect.RIGHT);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
y = block.y + block.height;
break;
}
if (_local2 == block) {
y = block.y + block.height;
x = block.x + block.width;
} else {
mc._rotation = DOWN_RIGHT_ROTATION;
y = (block.y + block.height) - (width * 0.3);
x = block.x + block.width;
side = com.nitrome.physics.Rect.RIGHT;
if (going != STILL) {
going = com.nitrome.physics.Rect.UP;
}
new_rotation = true;
break;
if (y < block.y) {
_local2 = blockToBlock(com.nitrome.physics.Rect.UP);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
break;
}
if (_local2 == block) {
y = block.y;
x = block.x;
} else {
mc._rotation = UP_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y;
side = com.nitrome.physics.Rect.UP;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
if (y <= (block.y + block.height)) {
break;
}
_local2 = blockToBlock(com.nitrome.physics.Rect.DOWN);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
} else if (_local2 == block) {
x = block.x;
y = block.y + block.height;
} else {
mc._rotation = DOWN_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y + block.height;
side = com.nitrome.physics.Rect.DOWN;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
}
}
}
if (y <= (block.y + block.height)) {
break;
}
_local2 = blockToBlock(com.nitrome.physics.Rect.DOWN);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
} else if (_local2 == block) {
x = block.x;
y = block.y + block.height;
} else {
mc._rotation = DOWN_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y + block.height;
side = com.nitrome.physics.Rect.DOWN;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
}
}
}
break;
if (y < block.y) {
_local2 = blockToBlock(com.nitrome.physics.Rect.UP);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
break;
}
if (_local2 == block) {
y = block.y;
x = block.x;
} else {
mc._rotation = UP_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y;
side = com.nitrome.physics.Rect.UP;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
if (y <= (block.y + block.height)) {
break;
}
_local2 = blockToBlock(com.nitrome.physics.Rect.DOWN);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
} else if (_local2 == block) {
x = block.x;
y = block.y + block.height;
} else {
mc._rotation = DOWN_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y + block.height;
side = com.nitrome.physics.Rect.DOWN;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
}
}
}
if (y <= (block.y + block.height)) {
break;
}
_local2 = blockToBlock(com.nitrome.physics.Rect.DOWN);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
} else if (_local2 == block) {
x = block.x;
y = block.y + block.height;
} else {
mc._rotation = DOWN_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y + block.height;
side = com.nitrome.physics.Rect.DOWN;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
}
}
}
break;
case com.nitrome.physics.Rect.DOWN :
if (x < block.x) {
var _local2 = blockToBlock(com.nitrome.physics.Rect.LEFT);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
y = block.y + block.height;
break;
}
if (_local2 == block) {
y = block.y + block.height;
x = block.x;
} else {
mc._rotation = DOWN_LEFT_ROTATION;
y = (block.y + block.height) - (width * 0.3);
x = block.x;
side = com.nitrome.physics.Rect.LEFT;
if (going != STILL) {
going = com.nitrome.physics.Rect.UP;
}
new_rotation = true;
if (x > (block.x + block.width)) {
_local2 = blockToBlock(com.nitrome.physics.Rect.RIGHT);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
y = block.y + block.height;
break;
}
if (_local2 == block) {
y = block.y + block.height;
x = block.x + block.width;
} else {
mc._rotation = DOWN_RIGHT_ROTATION;
y = (block.y + block.height) - (width * 0.3);
x = block.x + block.width;
side = com.nitrome.physics.Rect.RIGHT;
if (going != STILL) {
going = com.nitrome.physics.Rect.UP;
}
new_rotation = true;
break;
if (y < block.y) {
_local2 = blockToBlock(com.nitrome.physics.Rect.UP);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
break;
}
if (_local2 == block) {
y = block.y;
x = block.x;
} else {
mc._rotation = UP_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y;
side = com.nitrome.physics.Rect.UP;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
if (y <= (block.y + block.height)) {
break;
}
_local2 = blockToBlock(com.nitrome.physics.Rect.DOWN);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
} else if (_local2 == block) {
x = block.x;
y = block.y + block.height;
} else {
mc._rotation = DOWN_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y + block.height;
side = com.nitrome.physics.Rect.DOWN;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
}
}
}
if (y <= (block.y + block.height)) {
break;
}
_local2 = blockToBlock(com.nitrome.physics.Rect.DOWN);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
} else if (_local2 == block) {
x = block.x;
y = block.y + block.height;
} else {
mc._rotation = DOWN_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y + block.height;
side = com.nitrome.physics.Rect.DOWN;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
}
}
}
break;
if (y < block.y) {
_local2 = blockToBlock(com.nitrome.physics.Rect.UP);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
break;
}
if (_local2 == block) {
y = block.y;
x = block.x;
} else {
mc._rotation = UP_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y;
side = com.nitrome.physics.Rect.UP;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
if (y <= (block.y + block.height)) {
break;
}
_local2 = blockToBlock(com.nitrome.physics.Rect.DOWN);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
} else if (_local2 == block) {
x = block.x;
y = block.y + block.height;
} else {
mc._rotation = DOWN_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y + block.height;
side = com.nitrome.physics.Rect.DOWN;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
}
}
}
if (y <= (block.y + block.height)) {
break;
}
_local2 = blockToBlock(com.nitrome.physics.Rect.DOWN);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
} else if (_local2 == block) {
x = block.x;
y = block.y + block.height;
} else {
mc._rotation = DOWN_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y + block.height;
side = com.nitrome.physics.Rect.DOWN;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
}
}
}
if (x > (block.x + block.width)) {
var _local2 = blockToBlock(com.nitrome.physics.Rect.RIGHT);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
y = block.y + block.height;
break;
}
if (_local2 == block) {
y = block.y + block.height;
x = block.x + block.width;
} else {
mc._rotation = DOWN_RIGHT_ROTATION;
y = (block.y + block.height) - (width * 0.3);
x = block.x + block.width;
side = com.nitrome.physics.Rect.RIGHT;
if (going != STILL) {
going = com.nitrome.physics.Rect.UP;
}
new_rotation = true;
break;
if (y < block.y) {
_local2 = blockToBlock(com.nitrome.physics.Rect.UP);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
break;
}
if (_local2 == block) {
y = block.y;
x = block.x;
} else {
mc._rotation = UP_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y;
side = com.nitrome.physics.Rect.UP;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
if (y <= (block.y + block.height)) {
break;
}
_local2 = blockToBlock(com.nitrome.physics.Rect.DOWN);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
} else if (_local2 == block) {
x = block.x;
y = block.y + block.height;
} else {
mc._rotation = DOWN_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y + block.height;
side = com.nitrome.physics.Rect.DOWN;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
}
}
}
if (y <= (block.y + block.height)) {
break;
}
_local2 = blockToBlock(com.nitrome.physics.Rect.DOWN);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
} else if (_local2 == block) {
x = block.x;
y = block.y + block.height;
} else {
mc._rotation = DOWN_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y + block.height;
side = com.nitrome.physics.Rect.DOWN;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
}
}
}
break;
case com.nitrome.physics.Rect.LEFT :
if (y < block.y) {
var _local2 = blockToBlock(com.nitrome.physics.Rect.UP);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
break;
}
if (_local2 == block) {
y = block.y;
x = block.x;
} else {
mc._rotation = UP_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y;
side = com.nitrome.physics.Rect.UP;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
if (y <= (block.y + block.height)) {
break;
}
_local2 = blockToBlock(com.nitrome.physics.Rect.DOWN);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
} else if (_local2 == block) {
x = block.x;
y = block.y + block.height;
} else {
mc._rotation = DOWN_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y + block.height;
side = com.nitrome.physics.Rect.DOWN;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
}
}
}
if (y <= (block.y + block.height)) {
break;
}
var _local2 = blockToBlock(com.nitrome.physics.Rect.DOWN);
if ((_local2 != null) && (_local2 != block)) {
block = _local2;
x = block.x;
} else if (_local2 == block) {
x = block.x;
y = block.y + block.height;
} else {
mc._rotation = DOWN_LEFT_ROTATION;
x = block.x + (width * 0.3);
y = block.y + block.height;
side = com.nitrome.physics.Rect.DOWN;
if (going != STILL) {
going = com.nitrome.physics.Rect.RIGHT;
}
new_rotation = true;
}
}
}
if (resolve_rotation) {
mc._rotation = getRotation(side);
new_rotation = false;
resolve_rotation = false;
}
if (new_rotation) {
resolve_rotation = true;
}
}
function getRotation(side) {
var _local2 = 0;
switch (side) {
case com.nitrome.physics.Rect.UP :
_local2 = UP_ROTATION;
break;
case com.nitrome.physics.Rect.RIGHT :
_local2 = RIGHT_ROTATION;
break;
case com.nitrome.physics.Rect.DOWN :
_local2 = DOWN_ROTATION;
break;
case com.nitrome.physics.Rect.LEFT :
_local2 = LEFT_ROTATION;
}
return(_local2);
}
function blockToBlock(side_of) {
var _local3 = new com.nitrome.physics.Rect(0, 0, 0, 0);
var _local2 = 0;
while (_local2 < g.blocks.length) {
if (g.blocks[_local2] == block) {
} else {
switch (side) {
case com.nitrome.physics.Rect.UP :
if (Math.abs(g.blocks[_local2].y - block.y) < 5) {
if (((side_of == com.nitrome.physics.Rect.LEFT) && (g.blocks[_local2].x <= block.x)) && (((g.blocks[_local2].x + g.blocks[_local2].width) + (width * 0.9)) >= block.x)) {
return(g.blocks[_local2]);
}
if (((side_of == com.nitrome.physics.Rect.RIGHT) && (g.blocks[_local2].x >= block.x)) && (g.blocks[_local2].x <= ((block.x + block.width) + (width * 0.9)))) {
return(g.blocks[_local2]);
}
}
_local3.resize(block.x + block.width, block.y, height, width);
if ((side_of == com.nitrome.physics.Rect.RIGHT) && (g.blocks[_local2].intersects(_local3))) {
return(block);
}
_local3.resize(block.x - height, block.y, height, width);
if ((side_of == com.nitrome.physics.Rect.LEFT) && (g.blocks[_local2].intersects(_local3))) {
return(block);
}
break;
case com.nitrome.physics.Rect.RIGHT :
if (Math.abs((g.blocks[_local2].x + g.blocks[_local2].width) - (block.x + block.width)) < 5) {
if (((side_of == com.nitrome.physics.Rect.UP) && (g.blocks[_local2].y <= block.y)) && (((g.blocks[_local2].y + g.blocks[_local2].height) + (width * 0.9)) >= block.y)) {
return(g.blocks[_local2]);
}
if (((side_of == com.nitrome.physics.Rect.DOWN) && (g.blocks[_local2].y >= block.y)) && (g.blocks[_local2].y <= ((block.y + block.height) + (width * 0.9)))) {
return(g.blocks[_local2]);
}
}
_local3.resize((block.x + block.width) - width, block.y - height, width, height);
if ((side_of == com.nitrome.physics.Rect.UP) && (g.blocks[_local2].intersects(_local3))) {
return(block);
}
_local3.resize((block.x + block.width) - width, block.y + block.height, width, height);
if ((side_of == com.nitrome.physics.Rect.DOWN) && (g.blocks[_local2].intersects(_local3))) {
return(block);
}
break;
case com.nitrome.physics.Rect.DOWN :
if (Math.abs((g.blocks[_local2].y + g.blocks[_local2].height) - (block.y + block.height)) < 5) {
if (((side_of == com.nitrome.physics.Rect.LEFT) && (g.blocks[_local2].x <= block.x)) && (((g.blocks[_local2].x + g.blocks[_local2].width) + (width * 0.9)) >= block.x)) {
return(g.blocks[_local2]);
}
if (((side_of == com.nitrome.physics.Rect.RIGHT) && (g.blocks[_local2].x >= block.x)) && (g.blocks[_local2].x <= ((block.x + block.width) + (width * 0.9)))) {
return(g.blocks[_local2]);
}
}
_local3.resize(block.x + block.width, (block.y + block.height) - width, height, width);
if ((side_of == com.nitrome.physics.Rect.RIGHT) && (g.blocks[_local2].intersects(_local3))) {
return(block);
}
_local3.resize(block.x - height, (block.y + block.height) - width, height, width);
if ((side_of == com.nitrome.physics.Rect.LEFT) && (g.blocks[_local2].intersects(_local3))) {
return(block);
}
break;
case com.nitrome.physics.Rect.LEFT :
if (Math.abs(g.blocks[_local2].x - block.x) < 5) {
if (((side_of == com.nitrome.physics.Rect.UP) && (g.blocks[_local2].y <= block.y)) && (((g.blocks[_local2].y + g.blocks[_local2].height) + (width * 0.9)) >= block.y)) {
return(g.blocks[_local2]);
}
if (((side_of == com.nitrome.physics.Rect.DOWN) && (g.blocks[_local2].y >= block.y)) && (g.blocks[_local2].y <= ((block.y + block.height) + (width * 0.9)))) {
return(g.blocks[_local2]);
}
}
_local3.resize(block.x, block.y - height, width, height);
if ((side_of == com.nitrome.physics.Rect.UP) && (g.blocks[_local2].intersects(_local3))) {
return(block);
}
_local3.resize(block.x, block.y + block.height, width, height);
if (!((side_of == com.nitrome.physics.Rect.DOWN) && (g.blocks[_local2].intersects(_local3)))) {
break;
}
return(block);
}
}
_local2++;
}
return(null);
}
function jumpingSideOf(other) {
switch (going) {
case com.nitrome.physics.Rect.UP :
if (((player_rect.y + (player_rect.height * 0.5)) > (other.y + other.height)) && (player_rect.y < (other.y + other.height))) {
return(com.nitrome.physics.Rect.DOWN);
}
break;
case com.nitrome.physics.Rect.RIGHT :
if (((player_rect.x + (player_rect.width * 0.5)) < other.x) && ((player_rect.x + player_rect.width) > other.x)) {
return(com.nitrome.physics.Rect.LEFT);
}
break;
case com.nitrome.physics.Rect.DOWN :
if (((player_rect.y + (player_rect.height * 0.5)) < other.y) && ((player_rect.y + player_rect.height) > other.y)) {
return(com.nitrome.physics.Rect.UP);
}
break;
case com.nitrome.physics.Rect.LEFT :
if (!(((player_rect.x + (player_rect.width * 0.5)) > (other.x + other.width)) && (player_rect.x < (other.x + other.width)))) {
break;
}
return(com.nitrome.physics.Rect.RIGHT);
}
return(other.sideOf(player_rect.x + (player_rect.width * 0.5), player_rect.y + player_rect.height));
}
function sideOf(other) {
switch (side) {
case com.nitrome.physics.Rect.UP :
var _local3 = other.sideOf(player_rect.x + (player_rect.width * 0.5), player_rect.y + player_rect.height);
if ((_local3 == com.nitrome.physics.Rect.RIGHT) || (_local3 == com.nitrome.physics.Rect.LEFT)) {
return(_local3);
}
_local3 = other.sideOf(player_rect.x + (player_rect.width * 0.5), player_rect.y);
if ((_local3 == com.nitrome.physics.Rect.RIGHT) || (_local3 == com.nitrome.physics.Rect.LEFT)) {
return(_local3);
}
_local3 = other.sideOf(player_rect.x + (player_rect.width * 0.5), player_rect.y + (player_rect.height * 0.5));
if ((_local3 == com.nitrome.physics.Rect.RIGHT) || (_local3 == com.nitrome.physics.Rect.LEFT)) {
return(_local3);
}
return(_local3);
case com.nitrome.physics.Rect.RIGHT :
_local3 = other.sideOf(player_rect.x, player_rect.y + (player_rect.height * 0.5));
if ((_local3 == com.nitrome.physics.Rect.UP) || (_local3 == com.nitrome.physics.Rect.DOWN)) {
return(_local3);
}
_local3 = other.sideOf(player_rect.x + player_rect.width, player_rect.y + (player_rect.height * 0.5));
if ((_local3 == com.nitrome.physics.Rect.UP) || (_local3 == com.nitrome.physics.Rect.DOWN)) {
return(_local3);
}
_local3 = other.sideOf(player_rect.x + (player_rect.width * 0.5), player_rect.y + (player_rect.height * 0.5));
if ((_local3 == com.nitrome.physics.Rect.UP) || (_local3 == com.nitrome.physics.Rect.DOWN)) {
return(_local3);
}
return(_local3);
case com.nitrome.physics.Rect.DOWN :
_local3 = other.sideOf(player_rect.x + (player_rect.width * 0.5), player_rect.y);
if ((_local3 == com.nitrome.physics.Rect.RIGHT) || (_local3 == com.nitrome.physics.Rect.LEFT)) {
return(_local3);
}
_local3 = other.sideOf(player_rect.x + (player_rect.width * 0.5), player_rect.y + player_rect.height);
if ((_local3 == com.nitrome.physics.Rect.RIGHT) || (_local3 == com.nitrome.physics.Rect.LEFT)) {
return(_local3);
}
_local3 = other.sideOf(player_rect.x + (player_rect.width * 0.5), player_rect.y + (player_rect.height * 0.5));
if ((_local3 == com.nitrome.physics.Rect.RIGHT) || (_local3 == com.nitrome.physics.Rect.LEFT)) {
return(_local3);
}
return(_local3);
case com.nitrome.physics.Rect.LEFT :
_local3 = other.sideOf(player_rect.x + player_rect.width, player_rect.y + (player_rect.height * 0.5));
if ((_local3 == com.nitrome.physics.Rect.UP) || (_local3 == com.nitrome.physics.Rect.DOWN)) {
return(_local3);
}
_local3 = other.sideOf(player_rect.x, player_rect.y + (player_rect.height * 0.5));
if ((_local3 == com.nitrome.physics.Rect.UP) || (_local3 == com.nitrome.physics.Rect.DOWN)) {
return(_local3);
}
_local3 = other.sideOf(player_rect.x + (player_rect.width * 0.5), player_rect.y + (player_rect.height * 0.5));
if ((_local3 == com.nitrome.physics.Rect.UP) || (_local3 == com.nitrome.physics.Rect.DOWN)) {
return(_local3);
}
return(_local3);
}
}
function keyDownChange() {
var _local2 = false;
if ((Key.isDown(38) || (Key.isDown(87))) != up_pressed) {
up_pressed = Key.isDown(38) || (Key.isDown(87));
_local2 = true;
}
if ((Key.isDown(40) || (Key.isDown(83))) != down_pressed) {
down_pressed = Key.isDown(40) || (Key.isDown(83));
_local2 = true;
}
if ((Key.isDown(37) || (Key.isDown(65))) != left_pressed) {
left_pressed = Key.isDown(37) || (Key.isDown(65));
_local2 = true;
}
if ((Key.isDown(39) || (Key.isDown(68))) != right_pressed) {
right_pressed = Key.isDown(39) || (Key.isDown(68));
_local2 = true;
}
return(_local2);
}
function updatePlayerRect() {
switch (side) {
case com.nitrome.physics.Rect.UP :
player_rect.x = x - (width * 0.5);
player_rect.y = y - height;
player_rect.width = width;
player_rect.height = height;
break;
case com.nitrome.physics.Rect.RIGHT :
player_rect.x = x;
player_rect.y = y - (width * 0.5);
player_rect.width = height;
player_rect.height = width;
break;
case com.nitrome.physics.Rect.DOWN :
player_rect.x = x - (width * 0.5);
player_rect.y = y;
player_rect.width = width;
player_rect.height = height;
break;
case com.nitrome.physics.Rect.LEFT :
player_rect.x = x - height;
player_rect.y = y - (width * 0.5);
player_rect.width = height;
player_rect.height = width;
}
}
function checkKeys() {
if ((!new_rotation) && (!(((state == CRUSHED) || (state == DEAD)) || (state == ELECTRIFIED)))) {
if (Key.isDown(32) && (!jump_pressed)) {
state = SQUATTING;
going = side;
jump_pressed = true;
if ((anim_state == RUNNING_LEFT) || (anim_state == STANDING_LEFT)) {
if ((!block.sticky) || (g.god_mode)) {
anim_state = SQUATTING_LEFT;
} else {
anim_state = STUCK_LEFT;
_root.sfx.playSound("squelch");
}
} else if ((anim_state == RUNNING_RIGHT) || (anim_state == STANDING_RIGHT)) {
if ((!block.sticky) || (g.god_mode)) {
anim_state = SQUATTING_RIGHT;
} else {
anim_state = STUCK_RIGHT;
_root.sfx.playSound("squelch");
}
}
squat_count = 0;
return(undefined);
}
if (!Key.isDown(32)) {
jump_pressed = false;
}
var _local3 = keyDownChange();
if (_local3) {
if ((Key.isDown(38) || (Key.isDown(87))) && (Key.isDown(39) || (Key.isDown(68)))) {
if ((side == com.nitrome.physics.Rect.UP) || (side == com.nitrome.physics.Rect.DOWN)) {
going = com.nitrome.physics.Rect.RIGHT;
} else if ((side == com.nitrome.physics.Rect.RIGHT) || (side == com.nitrome.physics.Rect.LEFT)) {
going = com.nitrome.physics.Rect.UP;
}
} else if ((Key.isDown(40) || (Key.isDown(83))) && (Key.isDown(39) || (Key.isDown(68)))) {
if ((side == com.nitrome.physics.Rect.UP) || (side == com.nitrome.physics.Rect.DOWN)) {
going = com.nitrome.physics.Rect.RIGHT;
} else if ((side == com.nitrome.physics.Rect.RIGHT) || (side == com.nitrome.physics.Rect.LEFT)) {
going = com.nitrome.physics.Rect.DOWN;
}
} else if ((Key.isDown(40) || (Key.isDown(83))) && (Key.isDown(37) || (Key.isDown(65)))) {
if ((side == com.nitrome.physics.Rect.UP) || (side == com.nitrome.physics.Rect.DOWN)) {
going = com.nitrome.physics.Rect.LEFT;
} else if ((side == com.nitrome.physics.Rect.RIGHT) || (side == com.nitrome.physics.Rect.LEFT)) {
going = com.nitrome.physics.Rect.DOWN;
}
} else if ((Key.isDown(38) || (Key.isDown(87))) && (Key.isDown(37) || (Key.isDown(65)))) {
if ((side == com.nitrome.physics.Rect.UP) || (side == com.nitrome.physics.Rect.DOWN)) {
going = com.nitrome.physics.Rect.LEFT;
} else if ((side == com.nitrome.physics.Rect.RIGHT) || (side == com.nitrome.physics.Rect.LEFT)) {
going = com.nitrome.physics.Rect.UP;
}
} else if (Key.isDown(37) || (Key.isDown(65))) {
if ((side == com.nitrome.physics.Rect.UP) || (side == com.nitrome.physics.Rect.DOWN)) {
going = com.nitrome.physics.Rect.LEFT;
} else {
going = -1;
if (anim_state == RUNNING_LEFT) {
anim_state = STANDING_LEFT;
} else if (anim_state == RUNNING_RIGHT) {
anim_state = STANDING_RIGHT;
}
}
} else if (Key.isDown(39) || Key.isDown(68)) {
if ((side == com.nitrome.physics.Rect.UP) || (side == com.nitrome.physics.Rect.DOWN)) {
going = com.nitrome.physics.Rect.RIGHT;
} else {
going = -1;
if (anim_state == RUNNING_LEFT) {
anim_state = STANDING_LEFT;
} else if (anim_state == RUNNING_RIGHT) {
anim_state = STANDING_RIGHT;
}
}
} else if (Key.isDown(38) || Key.isDown(87)) {
if ((side == com.nitrome.physics.Rect.RIGHT) || (side == com.nitrome.physics.Rect.LEFT)) {
going = com.nitrome.physics.Rect.UP;
} else {
going = -1;
if (anim_state == RUNNING_LEFT) {
anim_state = STANDING_LEFT;
} else if (anim_state == RUNNING_RIGHT) {
anim_state = STANDING_RIGHT;
}
}
} else if (Key.isDown(40) || Key.isDown(83)) {
if ((side == com.nitrome.physics.Rect.RIGHT) || (side == com.nitrome.physics.Rect.LEFT)) {
going = com.nitrome.physics.Rect.DOWN;
} else {
going = -1;
if (anim_state == RUNNING_LEFT) {
anim_state = STANDING_LEFT;
} else if (anim_state == RUNNING_RIGHT) {
anim_state = STANDING_RIGHT;
}
}
} else {
going = -1;
if (anim_state == RUNNING_LEFT) {
anim_state = STANDING_LEFT;
} else if (anim_state == RUNNING_RIGHT) {
anim_state = STANDING_RIGHT;
}
}
}
switch (going) {
case com.nitrome.physics.Rect.UP :
y = y - speed;
if (side == com.nitrome.physics.Rect.RIGHT) {
anim_state = RUNNING_LEFT;
} else if (side == com.nitrome.physics.Rect.LEFT) {
anim_state = RUNNING_RIGHT;
}
break;
case com.nitrome.physics.Rect.RIGHT :
if (side == com.nitrome.physics.Rect.UP) {
anim_state = RUNNING_RIGHT;
} else if (side == com.nitrome.physics.Rect.DOWN) {
anim_state = RUNNING_LEFT;
}
x = x + speed;
break;
case com.nitrome.physics.Rect.DOWN :
y = y + speed;
if (side == com.nitrome.physics.Rect.RIGHT) {
anim_state = RUNNING_RIGHT;
} else if (side == com.nitrome.physics.Rect.LEFT) {
anim_state = RUNNING_LEFT;
}
break;
case com.nitrome.physics.Rect.LEFT :
if (side == com.nitrome.physics.Rect.UP) {
anim_state = RUNNING_LEFT;
} else if (side == com.nitrome.physics.Rect.DOWN) {
anim_state = RUNNING_RIGHT;
}
x = x - speed;
}
}
}
function updateMC() {
var _local3 = Math.floor(x + 0.001);
var _local2 = Math.floor(y + 0.001);
if (going != STILL) {
if (!((state == PIPING) || (state == JUMPING))) {
switch (side) {
case com.nitrome.physics.Rect.UP :
switch (going) {
case com.nitrome.physics.Rect.RIGHT :
scroll_target_x = (-_local3) + scroll_rect.x;
break;
case com.nitrome.physics.Rect.LEFT :
scroll_target_x = ((-_local3) + scroll_rect.width) + scroll_rect.x;
}
scroll_target_y = ((-_local2) + scroll_rect.height) + scroll_rect.y;
break;
case com.nitrome.physics.Rect.LEFT :
switch (going) {
case com.nitrome.physics.Rect.DOWN :
scroll_target_y = (-_local2) + scroll_rect.y;
break;
case com.nitrome.physics.Rect.UP :
scroll_target_y = ((-_local2) + scroll_rect.height) + scroll_rect.y;
}
scroll_target_x = ((-_local3) + scroll_rect.width) + scroll_rect.x;
break;
case com.nitrome.physics.Rect.DOWN :
switch (going) {
case com.nitrome.physics.Rect.RIGHT :
scroll_target_x = (-_local3) + scroll_rect.x;
break;
case com.nitrome.physics.Rect.LEFT :
scroll_target_x = ((-_local3) + scroll_rect.width) + scroll_rect.x;
}
scroll_target_y = (-_local2) + scroll_rect.y;
break;
case com.nitrome.physics.Rect.RIGHT :
switch (going) {
case com.nitrome.physics.Rect.DOWN :
scroll_target_y = (-_local2) + scroll_rect.y;
break;
case com.nitrome.physics.Rect.UP :
scroll_target_y = ((-_local2) + scroll_rect.height) + scroll_rect.y;
}
scroll_target_x = (-_local3) + scroll_rect.x;
}
} else {
scroll_target_x = (-mc._x) + Math.round(g.stage_w * 0.5);
scroll_target_y = (-mc._y) + Math.round(g.stage_h * 0.5);
}
scrolling();
} else if (block instanceof com.nitrome.stickyfeet.MovingBlock) {
switch (side) {
case com.nitrome.physics.Rect.UP :
scroll_target_x = ((-_local3) + (scroll_rect.width * 0.5)) + scroll_rect.x;
scroll_target_y = ((-_local2) + scroll_rect.height) + scroll_rect.y;
break;
case com.nitrome.physics.Rect.LEFT :
scroll_target_y = ((-_local2) + (scroll_rect.height * 0.5)) + scroll_rect.y;
scroll_target_x = ((-_local3) + scroll_rect.width) + scroll_rect.x;
break;
case com.nitrome.physics.Rect.DOWN :
scroll_target_x = ((-_local3) + (scroll_rect.width * 0.5)) + scroll_rect.x;
scroll_target_y = (-_local2) + scroll_rect.y;
break;
case com.nitrome.physics.Rect.RIGHT :
scroll_target_y = ((-_local2) + (scroll_rect.height * 0.5)) + scroll_rect.y;
scroll_target_x = (-_local3) + scroll_rect.x;
}
scrolling();
}
g.scroller.clipManager();
last_mc_x = _local3;
last_mc_y = _local2;
mc._x = _local3;
mc._y = _local2;
}
function scrolling() {
scroll_target_x = Math.min(0, scroll_target_x);
scroll_target_y = Math.min(0, scroll_target_y);
scroll_target_x = Math.max(((-g.scroller.width) * g.scale) + g.stage_w, scroll_target_x);
scroll_target_y = Math.max(((-g.scroller.height) * g.scale) + g.stage_h, scroll_target_y);
var _local2 = 0.05;
if ((state == JUMPING) || (state == PIPING)) {
_local2 = 0.2;
}
last_stage_x = g.stage._x;
last_stage_y = g.stage._y;
g.stage._x = g.stage._x + Math.round((scroll_target_x - g.stage._x) * _local2);
g.stage._y = g.stage._y + Math.round((scroll_target_y - g.stage._y) * _local2);
g.stage.clouds._y = (-g.stage._y) + 258;
g.stage.clouds.clouds0._x = g.stage.clouds.clouds0._x + Math.round((last_stage_x - g.stage._x) * 0.5);
g.stage.clouds.clouds1._x = g.stage.clouds.clouds1._x + Math.round((last_stage_x - g.stage._x) * 0.7);
g.stage.clouds.clouds2._x = g.stage.clouds.clouds2._x + Math.round((last_stage_x - g.stage._x) * 0.9);
if ((g.stage.clouds.clouds0._x + g.stage._x) < -500) {
g.stage.clouds.clouds0._x = g.stage.clouds.clouds0._x + 500;
}
if ((g.stage.clouds.clouds1._x + g.stage._x) < -550) {
g.stage.clouds.clouds1._x = g.stage.clouds.clouds1._x + 550;
}
if ((g.stage.clouds.clouds2._x + g.stage._x) < -550) {
g.stage.clouds.clouds2._x = g.stage.clouds.clouds2._x + 550;
}
if ((g.stage.clouds.clouds0._x + g.stage._x) > 0) {
g.stage.clouds.clouds0._x = g.stage.clouds.clouds0._x - 500;
}
if ((g.stage.clouds.clouds1._x + g.stage._x) > 0) {
g.stage.clouds.clouds1._x = g.stage.clouds.clouds1._x - 550;
}
if ((g.stage.clouds.clouds2._x + g.stage._x) > 0) {
g.stage.clouds.clouds2._x = g.stage.clouds.clouds2._x - 550;
}
}
var speed = 6;
var UP_ROTATION = 0;
var UP_RIGHT_ROTATION = 45;
var RIGHT_ROTATION = 90;
var DOWN_RIGHT_ROTATION = 135;
var DOWN_ROTATION = 180;
var DOWN_LEFT_ROTATION = 225;
var LEFT_ROTATION = 270;
var UP_LEFT_ROTATION = 315;
var STILL = -1;
var STANDING_LEFT = 1;
var STANDING_RIGHT = 2;
var RUNNING_LEFT = 3;
var RUNNING_RIGHT = 4;
var SQUATTING_LEFT = 5;
var SQUATTING_RIGHT = 6;
var JUMPING_LEFT = 7;
var JUMPING_RIGHT = 8;
var DYING_LEFT = 9;
var DYING_RIGHT = 10;
var OUCH_LEFT = 11;
var OUCH_RIGHT = 12;
var HURT_LEFT = 11;
var HURT_RIGHT = 12;
var ELECTRIFIED = 50;
var STUCK_LEFT = 14;
var STUCK_RIGHT = 15;
var HURT_RUNNING_LEFT = 16;
var HURT_RUNNING_RIGHT = 17;
var WALKING = 1;
var JUMPING = 2;
var SQUATTING = 3;
var DEAD = 4;
var PIPING = 5;
var PIPING_ENTRANCE = 5;
var CRUSHED = 6;
var GAME_START = 7;
var GAME_EXIT = 8;
var electrified_delay = 10;
var squat_delay = 2;
var stuck_delay = 13;
var hurt_delay = 50;
var ouch_delay = 6;
var start_delay = 25;
}
Symbol 1303 MovieClip [__Packages.com.nitrome.stickyfeet.PipeBlock] Frame 0
class com.nitrome.stickyfeet.PipeBlock extends com.nitrome.stickyfeet.Block
{
var orient;
function PipeBlock (x, y, width, height, mc) {
super(x, y, width, height, mc);
}
function setOrient(direction) {
orient = direction;
}
}
Symbol 1304 MovieClip [__Packages.com.nitrome.stickyfeet.ExitBlock] Frame 0
class com.nitrome.stickyfeet.ExitBlock extends com.nitrome.stickyfeet.PipeBlock
{
function ExitBlock (x, y, width, height, mc) {
super(x, y, width, height, mc);
}
}
Symbol 1305 MovieClip [__Packages.com.nitrome.stickyfeet.Scroller] Frame 0
class com.nitrome.stickyfeet.Scroller
{
var stage, tile_holder, scale, width, height, stage_width, stage_height, tile_maker, scroll_x, scroll_y, border_x, border_y, tiles_width, tiles_height, tile_layers, map_array_layers, map_rows_layers, map_rows_index_layers, map_cols_index_layers, update_layer, current_layer, layers, spike_block_layer, signage, tiles, map_array, map_rows, map_rows_index, map_cols_index, last_stage_x, last_stage_y;
function Scroller (g, stage, tile_holder, scale, width, height, stage_width, stage_height) {
this.stage = stage;
this.tile_holder = tile_holder;
this.scale = scale;
this.width = width;
this.height = height;
this.stage_width = stage_width;
this.stage_height = stage_height;
tile_maker = new com.nitrome.stickyfeet.TileMaker(g, this);
scroll_x = true;
scroll_y = true;
border_x = 5;
border_y = 5;
tiles_width = Math.ceil(stage_width / scale);
tiles_height = Math.ceil(stage_height / scale);
tile_layers = new Array();
map_array_layers = new Array();
map_rows_layers = new Array();
map_rows_index_layers = new Array();
map_cols_index_layers = new Array();
update_layer = new Array();
current_layer = 0;
layers = 0;
}
function addLayer(map_layer) {
if (tile_layers.length == layers) {
tile_layers.push(tile_holder.createEmptyMovieClip("tiles" + layers, layers * 10));
}
if (layers == 1) {
spike_block_layer = tile_holder.createEmptyMovieClip("spike_block_layer", 5);
}
map_array_layers.push(map_layer);
map_rows_layers.push(new Array());
map_rows_index_layers.push(new Array());
map_cols_index_layers.push(new Array());
update_layer.push(true);
layers++;
}
function addTileLayer(tileLayer) {
tile_layers.push(tileLayer);
}
function setSignage(signage) {
this.signage = signage;
}
function changeLayer(n) {
tiles = tile_layers[n];
map_array = map_array_layers[n];
map_rows = map_rows_layers[n];
map_rows_index = map_rows_index_layers[n];
map_cols_index = map_cols_index_layers[n];
current_layer = n;
}
function setLayerUpdate(n, setting) {
update_layer[n] = setting;
}
function layerToBitmap(n) {
changeLayer(n);
_global.bump_map.dispose();
_global.bump_map = new flash.display.BitmapData(width * scale, height * scale, true, 16777215);
tiles._visible = false;
var _local3 = 0;
while (_local3 < map_array.length) {
var _local5 = _local3 % width;
var _local4 = Math.floor(_local3 / width);
tile_maker.mapElement(_local5, _local4);
_local3++;
}
_global.bump_map.draw(tiles);
tiles.removeMovieClip();
tiles = tile_holder.createEmptyMovieClip("tiles" + current_layer, current_layer);
tiles.attachBitmap(_global.bump_map, 0);
}
function removeTile(layer, n) {
map_array_layers[layer][n] = 0;
}
function rezBeginning(x, y) {
map_rows_index = new Array();
map_cols_index = new Array();
map_rows = new Array();
var _local9 = Math.round(tiles_width * 0.5);
var _local10 = Math.round(tiles_height * 0.5);
stage._x = -((x - _local9) * scale);
stage._y = -((y - _local10) * scale);
last_stage_x = Math.floor(stage._x / scale);
last_stage_y = Math.floor(stage._y / scale);
var _local5 = (x - _local9) - border_x;
var _local6 = (y - _local10) - border_y;
var _local8 = (_local5 + tiles_width) + (border_x * 2);
var _local7 = (_local6 + tiles_height) + (border_y * 2);
if (_local5 < 0) {
_local5 = 0;
}
if (_local6 < 0) {
_local6 = 0;
}
if (_local8 > width) {
_local8 = width;
}
if (_local7 > height) {
_local7 = height;
}
var _local4 = 0;
while (_local4 < layers) {
changeLayer(_local4);
if (update_layer[_local4]) {
x = _local5;
while (x < _local8) {
map_cols_index.push(x);
x++;
}
y = _local6;
while (y < _local7) {
pushRow(y);
y++;
}
}
_local4++;
}
}
function clipManager() {
var _local3 = Math.floor(stage._x / scale);
var _local2 = Math.floor(stage._y / scale);
var _local5 = 0;
while (_local5 < layers) {
changeLayer(_local5);
if (update_layer[_local5]) {
if (scroll_x) {
if (_local3 > last_stage_x) {
var _local6 = _local3 - last_stage_x;
if (map_cols_index[0] > 0) {
var _local4 = _local6;
while (_local4 > 0) {
unshiftCol(map_cols_index[0] - 1);
_local4--;
}
}
if (((map_cols_index[map_cols_index.length - 1] - map_cols_index[0]) > (tiles_width + (border_x * 2))) || (map_cols_index[map_cols_index.length - 1] > (((-_local3) + tiles_width) + border_x))) {
var _local4 = _local6;
while (_local4 > 0) {
popCol();
_local4--;
}
}
}
if (_local3 < last_stage_x) {
var _local6 = _local3 - last_stage_x;
if ((map_cols_index[map_cols_index.length - 1] < (width - 1)) && ((map_cols_index[map_cols_index.length - 1] - map_cols_index[0]) < (tiles_width + (border_x * 2)))) {
var _local4 = _local6;
while (_local4 < 0) {
pushCol(map_cols_index[map_cols_index.length - 1] + 1);
_local4++;
}
}
if ((-_local3) > border_x) {
var _local4 = _local6;
while (_local4 < 0) {
shiftCol();
_local4++;
}
}
}
}
if (scroll_y) {
if (_local2 > last_stage_y) {
var _local6 = _local2 - last_stage_y;
if (map_rows_index[0] > 0) {
var _local4 = _local6;
while (_local4 > 0) {
unshiftRow(map_rows_index[0] - 1);
_local4--;
}
}
if (((map_rows_index[map_rows_index.length - 1] - map_rows_index[0]) > (tiles_height + (border_y * 2))) || (map_rows_index[map_rows_index.length - 1] > (((-_local2) + tiles_height) + border_y))) {
var _local4 = _local6;
while (_local4 > 0) {
popRow();
_local4--;
}
}
}
if (_local2 < last_stage_y) {
var _local6 = _local2 - last_stage_y;
if ((map_rows_index[map_rows_index.length - 1] < (height - 1)) && ((map_rows_index[map_rows_index.length - 1] - map_rows_index[0]) < (tiles_height + (border_y * 2)))) {
var _local4 = _local6;
while (_local4 < 0) {
pushRow(map_rows_index[map_rows_index.length - 1] + 1);
_local4++;
}
}
if ((-_local2) > border_y) {
var _local4 = _local6;
while (_local4 < 0) {
shiftRow();
_local4++;
}
}
}
}
}
_local5++;
}
last_stage_x = _local3;
last_stage_y = _local2;
}
function pushCol(x) {
map_cols_index.push(x);
var _local2 = 0;
while (_local2 < map_rows_index.length) {
map_rows[_local2].push(tile_maker.mapElement(x, _local2 + map_rows_index[0]));
_local2++;
}
}
function unshiftCol(x) {
map_cols_index.unshift(x);
var _local2 = 0;
while (_local2 < map_rows_index.length) {
map_rows[_local2].unshift(tile_maker.mapElement(x, _local2 + map_rows_index[0]));
_local2++;
}
}
function popCol() {
var _local2 = 0;
while (_local2 < map_rows_index.length) {
map_rows[_local2][map_cols_index.length - 1].removeMovieClip();
map_rows[_local2].pop();
_local2++;
}
map_cols_index.pop();
}
function shiftCol() {
var _local2 = 0;
while (_local2 < map_rows_index.length) {
map_rows[_local2][0].removeMovieClip();
map_rows[_local2].shift();
_local2++;
}
map_cols_index.shift();
}
function pushRow(y) {
map_rows.push(new Array());
map_rows_index.push(y);
var _local2 = 0;
while (_local2 < map_cols_index.length) {
map_rows[map_rows.length - 1].push(tile_maker.mapElement(_local2 + map_cols_index[0], y));
_local2++;
}
}
function unshiftRow(y) {
map_rows.unshift(new Array());
map_rows_index.unshift(y);
var _local2 = 0;
while (_local2 < map_cols_index.length) {
map_rows[0].push(tile_maker.mapElement(_local2 + map_cols_index[0], y));
_local2++;
}
}
function popRow() {
var _local2 = 0;
while (_local2 < map_cols_index.length) {
map_rows[map_rows.length - 1][_local2].removeMovieClip();
_local2++;
}
map_rows.pop();
map_rows_index.pop();
}
function shiftRow() {
var _local2 = 0;
while (_local2 < map_cols_index.length) {
map_rows[0][_local2].removeMovieClip();
_local2++;
}
map_rows.shift();
map_rows_index.shift();
}
}
Symbol 1306 MovieClip [__Packages.com.nitrome.stickyfeet.TileMaker] Frame 0
class com.nitrome.stickyfeet.TileMaker
{
var s, g;
function TileMaker (g, s) {
this.s = s;
this.g = g;
}
function mapElement(x, y) {
var _local2 = x + (y * s.width);
if ((s.map_array[_local2] > 95) && (s.map_array[_local2] < 136)) {
var _local5 = s.tiles.attachMovie("switch", "tile" + _local2, _local2, {_x:(s.scale * 0.5) + (x * s.scale), _y:(s.scale * 0.5) + (y * s.scale)});
var _local6 = com.nitrome.physics.Util.getRotation((s.map_array[_local2] - 96) % 4);
_local5._rotation = _local6;
var _local7 = new com.nitrome.stickyfeet.Switch(_local5, Math.floor((s.map_array[_local2] - 96) / 4), g);
com.nitrome.physics.Util.setCollisionBox(_local7, _local5, g.stage);
g.encounters.push(_local7);
return(_local5);
}
if ((s.map_array[_local2] > 135) && (s.map_array[_local2] < 176)) {
var _local5 = s.tiles.attachMovie("switch_block", "tile" + _local2, _local2, {_x:(s.scale * 0.5) + (x * s.scale), _y:(s.scale * 0.5) + (y * s.scale)});
var _local9 = generateBlock("switch_block", x, y, _local5);
_local9.switch_id = Math.floor((s.map_array[_local2] - 136) / 4);
var _local6 = com.nitrome.physics.Util.getRotation((s.map_array[_local2] - 136) % 4);
_local5._rotation = _local6;
return(_local5);
}
switch (s.map_array[_local2]) {
case 1 :
var _local5 = generateSign(_local2, s);
_local5._x = x * s.scale;
_local5._y = y * s.scale;
return(_local5);
case 2 :
_local5 = s.tiles.attachMovie("test_tile", "tile" + _local2, _local2, {_x:x * s.scale, _y:y * s.scale});
generateBlock("static", x, y, _local5);
return(_local5);
case 3 :
_local5 = s.tiles.attachMovie("block_01", "tile" + _local2, _local2, {_x:x * s.scale, _y:y * s.scale});
generateBlock("static", x, y, _local5);
return(_local5);
case 4 :
_local5 = s.tiles.attachMovie("block_02", "tile" + _local2, _local2, {_x:x * s.scale, _y:y * s.scale});
generateBlock("static", x, y, _local5);
return(_local5);
case 5 :
_local5 = s.tiles.attachMovie("block_03", "tile" + _local2, _local2, {_x:x * s.scale, _y:y * s.scale});
generateBlock("static", x, y, _local5);
return(_local5);
case 6 :
_local5 = s.tiles.attachMovie("block_04", "tile" + _local2, _local2, {_x:x * s.scale, _y:y * s.scale});
generateBlock("static", x, y, _local5);
return(_local5);
case 7 :
_local5 = s.tiles.attachMovie("block_05", "tile" + _local2, _local2, {_x:x * s.scale, _y:y * s.scale});
generateBlock("static", x, y, _local5);
return(_local5);
case 8 :
_local5 = s.tiles.attachMovie("block_06", "tile" + _local2, _local2, {_x:x * s.scale, _y:y * s.scale});
generateBlock("static", x, y, _local5);
return(_local5);
case 9 :
_local5 = s.tiles.attachMovie("block_07", "tile" + _local2, _local2, {_x:x * s.scale, _y:y * s.scale});
generateBlock("static", x, y, _local5);
return(_local5);
case 10 :
_local5 = s.tiles.attachMovie("block_08", "tile" + _local2, _local2, {_x:x * s.scale, _y:y * s.scale});
generateBlock("static", x, y, _local5);
return(_local5);
case 11 :
_local5 = s.tiles.attachMovie("block_09", "tile" + _local2, _local2, {_x:x * s.scale, _y:y * s.scale});
return(_local5);
case 12 :
_local5 = s.tiles.attachMovie("block_10", "tile" + _local2, _local2, {_x:x * s.scale, _y:y * s.scale});
generateBlock("static", x, y, _local5);
return(_local5);
case 13 :
_local5 = s.tiles.attachMovie("block_11", "tile" + _local2, _local2, {_x:x * s.scale, _y:y * s.scale});
generateBlock("static", x, y, _local5);
return(_local5);
case 14 :
_local5 = s.tiles.attachMovie("block_12", "tile" + _local2, _local2, {_x:x * s.scale, _y:y * s.scale});
generateBlock("static", x, y, _local5);
return(_local5);
case 15 :
_local5 = s.tiles.attachMovie("block_13", "tile" + _local2, _local2, {_x:x * s.scale, _y:y * s.scale});
generateBlock("static", x, y, _local5);
return(_local5);
case 16 :
_local5 = s.tiles.attachMovie("block_14", "tile" + _local2, _local2, {_x:x * s.scale, _y:y * s.scale});
generateBlock("static", x, y, _local5);
return(_local5);
case 17 :
_local5 = s.tiles.attachMovie("block_15", "tile" + _local2, _local2, {_x:x * s.scale, _y:y * s.scale});
generateBlock("static", x, y, _local5);
return(_local5);
case 18 :
_local5 = s.tiles.attachMovie("block_16", "tile" + _local2, _local2, {_x:x * s.scale, _y:y * s.scale});
generateBlock("static", x, y, _local5);
return(_local5);
case 19 :
_local5 = s.tiles.attachMovie("sticky_01", "tile" + _local2, _local2, {_x:x * s.scale, _y:y * s.scale});
generateBlock("sticky", x, y, _local5);
return(_local5);
case 20 :
_local5 = s.tiles.attachMovie("sticky_02", "tile" + _local2, _local2, {_x:x * s.scale, _y:y * s.scale});
generateBlock("sticky", x, y, _local5);
return(_local5);
case 21 :
_local5 = s.tiles.attachMovie("sticky_03", "tile" + _local2, _local2, {_x:x * s.scale, _y:y * s.scale});
generateBlock("sticky", x, y, _local5);
return(_local5);
case 22 :
_local5 = s.tiles.attachMovie("sticky_04", "tile" + _local2, _local2, {_x:x * s.scale, _y:y * s.scale});
generateBlock("sticky", x, y, _local5);
return(_local5);
case 23 :
_local5 = s.tiles.attachMovie("sticky_05", "tile" + _local2, _local2, {_x:x * s.scale, _y:y * s.scale});
generateBlock("sticky", x, y, _local5);
return(_local5);
case 24 :
_local5 = s.tiles.attachMovie("sticky_06", "tile" + _local2, _local2, {_x:x * s.scale, _y:y * s.scale});
generateBlock("sticky", x, y, _local5);
return(_local5);
case 25 :
_local5 = s.tiles.attachMovie("sticky_07", "tile" + _local2, _local2, {_x:x * s.scale, _y:y * s.scale});
generateBlock("sticky", x, y, _local5);
return(_local5);
case 26 :
_local5 = s.tiles.attachMovie("sticky_08", "tile" + _local2, _local2, {_x:x * s.scale, _y:y * s.scale});
generateBlock("sticky", x, y, _local5);
return(_local5);
case 27 :
_local5 = s.tiles.attachMovie("sticky_09", "tile" + _local2, _local2, {_x:x * s.scale, _y:y * s.scale});
return(_local5);
case 28 :
_local5 = s.tiles.attachMovie("sticky_10", "tile" + _local2, _local2, {_x:x * s.scale, _y:y * s.scale});
generateBlock("sticky", x, y, _local5);
return(_local5);
case 29 :
_local5 = s.tiles.attachMovie("sticky_11", "tile" + _local2, _local2, {_x:x * s.scale, _y:y * s.scale});
generateBlock("sticky", x, y, _local5);
return(_local5);
case 30 :
_local5 = s.tiles.attachMovie("sticky_12", "tile" + _local2, _local2, {_x:x * s.scale, _y:y * s.scale});
generateBlock("sticky", x, y, _local5);
return(_local5);
case 31 :
_local5 = s.tiles.attachMovie("sticky_13", "tile" + _local2, _local2, {_x:x * s.scale, _y:y * s.scale});
generateBlock("sticky", x, y, _local5);
return(_local5);
case 32 :
_local5 = s.tiles.attachMovie("sticky_14", "tile" + _local2, _local2, {_x:x * s.scale, _y:y * s.scale});
generateBlock("sticky", x, y, _local5);
return(_local5);
case 33 :
_local5 = s.tiles.attachMovie("sticky_15", "tile" + _local2, _local2, {_x:x * s.scale, _y:y * s.scale});
generateBlock("sticky", x, y, _local5);
return(_local5);
case 34 :
_local5 = s.tiles.attachMovie("sticky_16", "tile" + _local2, _local2, {_x:x * s.scale, _y:y * s.scale});
generateBlock("sticky", x, y, _local5);
return(_local5);
case 35 :
_local5 = s.tiles.attachMovie("pipe_01", "tile" + _local2, _local2, {_x:x * s.scale, _y:y * s.scale});
var _local9 = generateBlock("pipe", x, y, _local5);
_local9.setOrient("vertical");
return(_local5);
case 36 :
_local5 = s.tiles.attachMovie("pipe_02", "tile" + _local2, _local2, {_x:x * s.scale, _y:y * s.scale});
_local9 = generateBlock("pipe", x, y, _local5);
_local9.setOrient("horizontal");
return(_local5);
case 37 :
_local5 = s.tiles.attachMovie("pipe_03", "tile" + _local2, _local2, {_x:x * s.scale, _y:y * s.scale});
_local9 = generateBlock("pipe", x, y, _local5);
_local9.setOrient("vertical");
return(_local5);
case 38 :
_local5 = s.tiles.attachMovie("pipe_04", "tile" + _local2, _local2, {_x:x * s.scale, _y:y * s.scale});
_local9 = generateBlock("pipe", x, y, _local5);
_local9.setOrient("horizontal");
return(_local5);
case 39 :
_local5 = s.tiles.attachMovie("pipe_05", "tile" + _local2, _local2, {_x:x * s.scale, _y:y * s.scale});
_local9 = generateBlock("pipe", x, y, _local5);
_local9.setOrient("vertical");
return(_local5);
case 40 :
_local5 = s.tiles.attachMovie("pipe_06", "tile" + _local2, _local2, {_x:x * s.scale, _y:y * s.scale});
_local9 = generateBlock("pipe", x, y, _local5);
_local9.setOrient("horizontal");
return(_local5);
case 41 :
_local5 = s.tiles.attachMovie("pipe_07", "tile" + _local2, _local2, {_x:x * s.scale, _y:y * s.scale});
_local9 = generateBlock("pipe", x, y, _local5);
_local9.setOrient("up_right");
return(_local5);
case 42 :
_local5 = s.tiles.attachMovie("pipe_08", "tile" + _local2, _local2, {_x:x * s.scale, _y:y * s.scale});
_local9 = generateBlock("pipe", x, y, _local5);
_local9.setOrient("up_left");
return(_local5);
case 43 :
_local5 = s.tiles.attachMovie("pipe_09", "tile" + _local2, _local2, {_x:x * s.scale, _y:y * s.scale});
_local9 = generateBlock("pipe", x, y, _local5);
_local9.setOrient("down_right");
return(_local5);
case 44 :
_local5 = s.tiles.attachMovie("pipe_10", "tile" + _local2, _local2, {_x:x * s.scale, _y:y * s.scale});
_local9 = generateBlock("pipe", x, y, _local5);
_local9.setOrient("down_left");
return(_local5);
case 45 :
_local5 = s.tiles.attachMovie("break_block", "tile" + _local2, _local2, {_x:x * s.scale, _y:y * s.scale});
_local9 = generateBlock("breakable", x, y, _local5);
_local9.id = _local2;
return(_local5);
case 46 :
case 47 :
case 48 :
case 49 :
_local5 = s.tiles.attachMovie("moving_block_01", "tile" + _local2, _local2, {_x:x * s.scale, _y:y * s.scale});
_local9 = generateBlock("moving", x, y, _local5, 2, 3);
var _local6 = com.nitrome.physics.Util.getRotation(s.map_array[_local2] - 46);
_local5._rotation = _local6;
_local5.block.block._rotation = -_local6;
return(_local5);
case 50 :
case 51 :
case 52 :
case 53 :
_local5 = s.tiles.attachMovie("moving_block_02", "tile" + _local2, _local2, {_x:x * s.scale, _y:y * s.scale});
_local9 = generateBlock("moving", x, y, _local5, 1, 2);
_local6 = com.nitrome.physics.Util.getRotation(s.map_array[_local2] - 50);
_local5._rotation = _local6;
_local5.block.block._rotation = -_local6;
return(_local5);
case 54 :
case 55 :
case 56 :
case 57 :
_local5 = s.tiles.attachMovie("moving_block_03", "tile" + _local2, _local2, {_x:x * s.scale, _y:y * s.scale});
_local9 = generateBlock("moving", x, y, _local5, 1, 2);
_local6 = com.nitrome.physics.Util.getRotation(s.map_array[_local2] - 54);
_local5._rotation = _local6;
_local5.block.block._rotation = -_local6;
return(_local5);
case 58 :
case 59 :
case 60 :
case 61 :
_local5 = s.tiles.attachMovie("moving_block_04", "tile" + _local2, _local2, {_x:x * s.scale, _y:y * s.scale});
_local9 = generateBlock("moving", x, y, _local5, 1, 2);
_local6 = com.nitrome.physics.Util.getRotation(s.map_array[_local2] - 58);
_local5._rotation = _local6;
_local5.block.block._rotation = -_local6;
return(_local5);
case 62 :
case 63 :
case 64 :
case 65 :
_local5 = s.tiles.attachMovie("moving_block_05", "tile" + _local2, _local2, {_x:x * s.scale, _y:y * s.scale});
_local9 = generateBlock("moving", x, y, _local5, 3, 2);
_local6 = com.nitrome.physics.Util.getRotation(s.map_array[_local2] - 62);
_local5._rotation = _local6;
_local5.block.block._rotation = -_local6;
return(_local5);
case 66 :
case 67 :
case 68 :
case 69 :
_local5 = s.tiles.attachMovie("moving_block_06", "tile" + _local2, _local2, {_x:x * s.scale, _y:y * s.scale});
_local9 = generateBlock("moving", x, y, _local5, 2, 1);
_local6 = com.nitrome.physics.Util.getRotation(s.map_array[_local2] - 66);
_local5._rotation = _local6;
_local5.block.block._rotation = -_local6;
return(_local5);
case 70 :
case 71 :
case 72 :
case 73 :
_local5 = s.tiles.attachMovie("moving_block_07", "tile" + _local2, _local2, {_x:x * s.scale, _y:y * s.scale});
_local9 = generateBlock("moving", x, y, _local5, 2, 1);
_local6 = com.nitrome.physics.Util.getRotation(s.map_array[_local2] - 70);
_local5._rotation = _local6;
_local5.block.block._rotation = -_local6;
return(_local5);
case 74 :
case 75 :
case 76 :
case 77 :
_local5 = s.tiles.attachMovie("moving_block_08", "tile" + _local2, _local2, {_x:x * s.scale, _y:y * s.scale});
_local9 = generateBlock("moving", x, y, _local5, 2, 1);
_local6 = com.nitrome.physics.Util.getRotation(s.map_array[_local2] - 74);
_local5._rotation = _local6;
_local5.block.block._rotation = -_local6;
return(_local5);
case 78 :
_local5 = s.tiles.attachMovie("pipe_11", "tile" + _local2, _local2, {_x:x * s.scale, _y:y * s.scale});
_local9 = generateBlock("pipe", x, y, _local5);
_local9.setOrient("cross");
return(_local5);
case 79 :
_local5 = g.coin_holder.attachMovie("coin", "tile" + _local2, _local2, {_x:x * s.scale, _y:y * s.scale});
g.encounters.push(new com.nitrome.stickyfeet.Coin(_local5, _local2, g));
return(_local5);
case 80 :
case 81 :
case 82 :
case 83 :
_local5 = s.tiles.attachMovie("background_01", "tile" + _local2, _local2, {_x:(s.scale * 0.5) + (x * s.scale), _y:(s.scale * 0.5) + (y * s.scale)});
_local6 = com.nitrome.physics.Util.getRotation(s.map_array[_local2] - 80);
_local5._rotation = _local6;
return(_local5);
case 84 :
case 85 :
case 86 :
case 87 :
_local5 = s.tiles.attachMovie("background_02", "tile" + _local2, _local2, {_x:(s.scale * 0.5) + (x * s.scale), _y:(s.scale * 0.5) + (y * s.scale)});
_local6 = com.nitrome.physics.Util.getRotation(s.map_array[_local2] - 84);
_local5._rotation = _local6;
return(_local5);
case 88 :
case 89 :
case 90 :
case 91 :
_local5 = s.tiles.attachMovie("background_03", "tile" + _local2, _local2, {_x:(s.scale * 0.5) + (x * s.scale), _y:(s.scale * 0.5) + (y * s.scale)});
_local6 = com.nitrome.physics.Util.getRotation(s.map_array[_local2] - 88);
_local5._rotation = _local6;
return(_local5);
case 92 :
case 93 :
case 94 :
case 95 :
_local5 = s.tiles.attachMovie("background_04", "tile" + _local2, _local2, {_x:(s.scale * 0.5) + (x * s.scale), _y:(s.scale * 0.5) + (y * s.scale)});
_local6 = com.nitrome.physics.Util.getRotation(s.map_array[_local2] - 92);
_local5._rotation = _local6;
return(_local5);
case 96 :
case 97 :
case 98 :
case 99 :
_local5 = s.tiles.attachMovie("switch", "tile" + _local2, _local2, {_x:(s.scale * 0.5) + (x * s.scale), _y:(s.scale * 0.5) + (y * s.scale)});
_local6 = com.nitrome.physics.Util.getRotation(s.map_array[_local2] - 92);
_local5._rotation = _local6;
return(_local5);
case 177 :
_local5 = g.monster_holder.attachMovie("electric_monster", "tile" + _local2, _local2, {_x:x * s.scale, _y:y * s.scale});
var _local7 = new com.nitrome.stickyfeet.ElectricMonster(_local5, _local2, g);
g.encounters.push(_local7);
return(_local5);
case 178 :
case 179 :
case 180 :
case 181 :
_local5 = g.monster_holder.attachMovie("rider_monster_01", "tile" + _local2, _local2, {_x:(s.scale * 0.5) + (x * s.scale), _y:(s.scale * 0.5) + (y * s.scale)});
_local6 = com.nitrome.physics.Util.getRotation(s.map_array[_local2] - 178);
_local7 = new com.nitrome.stickyfeet.RiderMonster(_local5, _local2, g);
g.encounters.push(_local7);
_local5._rotation = _local6;
return(_local5);
case 182 :
case 183 :
case 184 :
case 185 :
_local5 = g.monster_holder.attachMovie("rider_monster_02", "tile" + _local2, _local2, {_x:(s.scale * 0.5) + (x * s.scale), _y:(s.scale * 0.5) + (y * s.scale)});
_local6 = com.nitrome.physics.Util.getRotation(s.map_array[_local2] - 182);
_local7 = new com.nitrome.stickyfeet.RiderMonster(_local5, _local2, g);
g.encounters.push(_local7);
_local5._rotation = _local6;
return(_local5);
case 186 :
case 187 :
case 188 :
case 189 :
_local5 = g.monster_holder.attachMovie("rider_monster_03", "tile" + _local2, _local2, {_x:(s.scale * 0.5) + (x * s.scale), _y:(s.scale * 0.5) + (y * s.scale)});
_local6 = com.nitrome.physics.Util.getRotation(s.map_array[_local2] - 186);
_local7 = new com.nitrome.stickyfeet.RiderMonster(_local5, _local2, g);
g.encounters.push(_local7);
_local5._rotation = _local6;
return(_local5);
case 190 :
_local5 = g.monster_holder.attachMovie("rider_monster_04", "tile" + _local2, _local2, {_x:(s.scale * 0.5) + (x * s.scale), _y:(s.scale * 0.5) + (y * s.scale)});
_local7 = new com.nitrome.stickyfeet.RiderMonster(_local5, _local2, g);
g.encounters.push(_local7);
return(_local5);
case 191 :
case 192 :
case 193 :
case 194 :
_local5 = s.tiles.attachMovie("start_block", "tile" + _local2, _local2, {_x:s.scale + (x * s.scale), _y:s.scale + (y * s.scale)});
_local9 = generateBlock("start", x, y, _local5);
_local6 = com.nitrome.physics.Util.getRotation(s.map_array[_local2] - 191);
_local5._rotation = _local6;
return(_local5);
case 195 :
case 196 :
case 197 :
case 198 :
_local5 = s.tiles.attachMovie("exit_block", "tile" + _local2, _local2, {_x:s.scale + (x * s.scale), _y:s.scale + (y * s.scale)});
generateBlock("exit" + (s.map_array[_local2] - 195), x, y, _local5);
_local6 = com.nitrome.physics.Util.getRotation(s.map_array[_local2] - 195);
_local5._rotation = _local6;
return(_local5);
case 199 :
case 200 :
case 201 :
case 202 :
_local5 = g.monster_holder.attachMovie("fly_monster_01", "tile" + _local2, _local2, {_x:(s.scale * 0.5) + (x * s.scale), _y:(s.scale * 0.5) + (y * s.scale)});
_local6 = com.nitrome.physics.Util.getRotation(s.map_array[_local2] - 199);
_local7 = new com.nitrome.stickyfeet.FlyMonster(_local5, _local2, g);
g.encounters.push(_local7);
_local5._rotation = _local6;
_local5.monster.monster.monster._rotation = -_local6;
return(_local5);
case 203 :
_local5 = g.monster_holder.attachMovie("ball_chain_cw", "tile" + _local2, _local2, {_x:x * s.scale, _y:y * s.scale});
_local7 = new com.nitrome.stickyfeet.BallChainMonster(_local5, _local2, g);
g.encounters.push(_local7);
return(_local5);
case 204 :
_local5 = g.monster_holder.attachMovie("ball_chain_ccw", "tile" + _local2, _local2, {_x:x * s.scale, _y:y * s.scale});
_local7 = new com.nitrome.stickyfeet.BallChainMonster(_local5, _local2, g);
g.encounters.push(_local7);
return(_local5);
case 205 :
case 206 :
case 207 :
case 208 :
_local5 = g.monster_holder.attachMovie("spikes", "tile" + _local2, _local2, {_x:(s.scale * 0.5) + (x * s.scale), _y:(s.scale * 0.5) + (y * s.scale)});
_local6 = com.nitrome.physics.Util.getRotation(s.map_array[_local2] - 205);
_local7 = new com.nitrome.stickyfeet.SpikesMonster(_local5, _local2, g);
g.encounters.push(_local7);
_local5._rotation = _local6;
return(_local5);
case 209 :
case 210 :
case 211 :
case 212 :
_local5 = g.monster_holder.attachMovie("fly_monster_02", "tile" + _local2, _local2, {_x:(s.scale * 0.5) + (x * s.scale), _y:(s.scale * 0.5) + (y * s.scale)});
_local6 = com.nitrome.physics.Util.getRotation(s.map_array[_local2] - 209);
_local7 = new com.nitrome.stickyfeet.FlyMonster(_local5, _local2, g);
g.encounters.push(_local7);
_local5._rotation = _local6;
_local5.monster.monster.monster._rotation = -_local6;
return(_local5);
case 213 :
case 214 :
case 215 :
case 216 :
_local5 = g.monster_holder.attachMovie("fly_monster_03", "tile" + _local2, _local2, {_x:(s.scale * 0.5) + (x * s.scale), _y:(s.scale * 0.5) + (y * s.scale)});
_local6 = com.nitrome.physics.Util.getRotation(s.map_array[_local2] - 213);
_local7 = new com.nitrome.stickyfeet.FlyMonster(_local5, _local2, g);
g.encounters.push(_local7);
_local5._rotation = _local6;
_local5.monster.monster.monster._rotation = -_local6;
return(_local5);
case 217 :
case 218 :
case 219 :
case 220 :
_local5 = g.monster_holder.attachMovie("ball_chain_swing", "tile" + _local2, _local2, {_x:(s.scale * 0.5) + (x * s.scale), _y:(s.scale * 0.5) + (y * s.scale)});
_local6 = com.nitrome.physics.Util.getRotation(s.map_array[_local2] - 217);
_local7 = new com.nitrome.stickyfeet.BallChainMonster(_local5, _local2, g);
g.encounters.push(_local7);
_local5._rotation = _local6;
return(_local5);
case 221 :
case 222 :
case 223 :
case 224 :
_local5 = g.monster_holder.attachMovie("shooty_monster", "tile" + _local2, _local2, {_x:(s.scale * 0.5) + (x * s.scale), _y:(s.scale * 0.5) + (y * s.scale)});
_local6 = com.nitrome.physics.Util.getRotation(s.map_array[_local2] - 221);
_local7 = new com.nitrome.stickyfeet.ShootyMonster(_local5, _local2, g, s.map_array[_local2] - 221, 50);
g.encounters.push(_local7);
_local5._rotation = _local6;
return(_local5);
case 225 :
case 226 :
case 227 :
case 228 :
_local5 = g.monster_holder.attachMovie("punchy_monster", "tile" + _local2, _local2, {_x:(s.scale * 0.5) + (x * s.scale), _y:(s.scale * 0.5) + (y * s.scale)});
_local6 = com.nitrome.physics.Util.getRotation(s.map_array[_local2] - 225);
_local7 = new com.nitrome.stickyfeet.PunchyMonster(_local5, _local2, g);
g.encounters.push(_local7);
_local5._rotation = _local6;
return(_local5);
case 229 :
_local5 = g.monster_holder.attachMovie("cannon_monster", "tile" + _local2, _local2, {_x:x * s.scale, _y:y * s.scale});
_local7 = new com.nitrome.stickyfeet.ShootyBlock(_local5, _local2, g);
g.encounters.push(_local7);
return(_local5);
case 230 :
case 231 :
case 232 :
case 233 :
_local5 = s.tiles.attachMovie("sticky_moving_block", "tile" + _local2, _local2, {_x:x * s.scale, _y:y * s.scale});
_local9 = generateBlock("sticky_moving", x, y, _local5);
_local6 = com.nitrome.physics.Util.getRotation(s.map_array[_local2] - 230);
_local5._rotation = _local6;
_local5.block.block._rotation = -_local6;
return(_local5);
case 234 :
_local5 = s.tiles.attachMovie("cogs_01", "tile" + _local2, _local2, {_x:x * s.scale, _y:y * s.scale});
return(_local5);
case 235 :
case 236 :
case 237 :
case 238 :
_local5 = g.monster_holder.attachMovie("shooty_monster", "tile" + _local2, _local2, {_x:(s.scale * 0.5) + (x * s.scale), _y:(s.scale * 0.5) + (y * s.scale)});
_local6 = com.nitrome.physics.Util.getRotation(s.map_array[_local2] - 235);
_local7 = new com.nitrome.stickyfeet.ShootyMonster(_local5, _local2, g, s.map_array[_local2] - 235, 0);
g.encounters.push(_local7);
_local5._rotation = _local6;
return(_local5);
case 239 :
_local5 = s.tiles.attachMovie("cogs_02", "tile" + _local2, _local2, {_x:x * s.scale, _y:y * s.scale});
generateBlock("static", x, y, _local5);
return(_local5);
case 240 :
_local5 = s.tiles.attachMovie("cogs_03", "tile" + _local2, _local2, {_x:x * s.scale, _y:y * s.scale});
return(_local5);
case 241 :
_local5 = s.tiles.attachMovie("cogs_04", "tile" + _local2, _local2, {_x:x * s.scale, _y:y * s.scale});
generateBlock("static", x, y, _local5);
return(_local5);
case 242 :
_local5 = s.tiles.attachMovie("cogs_05", "tile" + _local2, _local2, {_x:x * s.scale, _y:y * s.scale});
generateBlock("static", x, y, _local5);
return(_local5);
case 243 :
_local5 = s.tiles.attachMovie("cogs_06", "tile" + _local2, _local2, {_x:x * s.scale, _y:y * s.scale});
return(_local5);
case 244 :
_local5 = s.tiles.attachMovie("cogs_07", "tile" + _local2, _local2, {_x:x * s.scale, _y:y * s.scale});
generateBlock("static", x, y, _local5);
return(_local5);
case 245 :
_local5 = s.tiles.attachMovie("cogs_08", "tile" + _local2, _local2, {_x:x * s.scale, _y:y * s.scale});
generateBlock("static", x, y, _local5);
return(_local5);
case 246 :
_local5 = g.coin_holder.attachMovie("health", "tile" + _local2, _local2, {_x:x * s.scale, _y:y * s.scale});
g.encounters.push(new com.nitrome.stickyfeet.Health(_local5, _local2, g));
return(_local5);
case 247 :
case 248 :
case 249 :
case 250 :
_local5 = g.monster_holder.attachMovie("rider_monster_05", "tile" + _local2, _local2, {_x:(s.scale * 0.5) + (x * s.scale), _y:(s.scale * 0.5) + (y * s.scale)});
_local6 = com.nitrome.physics.Util.getRotation(s.map_array[_local2] - 247);
_local7 = new com.nitrome.stickyfeet.RiderMonster(_local5, _local2, g);
g.encounters.push(_local7);
_local5._rotation = _local6;
return(_local5);
case 251 :
case 252 :
case 253 :
case 254 :
_local5 = g.monster_holder.attachMovie("rider_monster_06", "tile" + _local2, _local2, {_x:(s.scale * 0.5) + (x * s.scale), _y:(s.scale * 0.5) + (y * s.scale)});
_local6 = com.nitrome.physics.Util.getRotation(s.map_array[_local2] - 251);
_local7 = new com.nitrome.stickyfeet.RiderMonster(_local5, _local2, g);
g.encounters.push(_local7);
_local5._rotation = _local6;
return(_local5);
case 255 :
_local5 = s.spike_block_layer.attachMovie("spike_block", "tile" + _local2, _local2, {_x:x * s.scale, _y:y * s.scale});
var _local8 = g.monster_holder.attachMovie("spike_block_face", "tile" + _local2, _local2, {_x:x * s.scale, _y:y * s.scale});
generateBlock("static", x, y, _local5);
_local7 = new com.nitrome.stickyfeet.SpikeBlockMonster(_local5, _local8, _local2, 0, g);
g.encounters.push(_local7);
return(_local5);
case 256 :
_local5 = s.spike_block_layer.attachMovie("spike_block", "tile" + _local2, _local2, {_x:x * s.scale, _y:y * s.scale});
_local8 = g.monster_holder.attachMovie("spike_block_face", "tile" + _local2, _local2, {_x:x * s.scale, _y:y * s.scale});
generateBlock("static", x, y, _local5);
_local7 = new com.nitrome.stickyfeet.SpikeBlockMonster(_local5, _local8, _local2, 25, g);
g.encounters.push(_local7);
return(_local5);
case 257 :
_local5 = s.spike_block_layer.attachMovie("spike_block", "tile" + _local2, _local2, {_x:x * s.scale, _y:y * s.scale});
_local8 = g.monster_holder.attachMovie("spike_block_face", "tile" + _local2, _local2, {_x:x * s.scale, _y:y * s.scale});
generateBlock("static", x, y, _local5);
_local7 = new com.nitrome.stickyfeet.SpikeBlockMonster(_local5, _local8, _local2, 50, g);
g.encounters.push(_local7);
return(_local5);
case 258 :
case 259 :
case 260 :
case 261 :
_local5 = g.monster_holder.attachMovie("electric", "tile" + _local2, _local2, {_x:(s.scale * 0.5) + (x * s.scale), _y:(s.scale * 0.5) + (y * s.scale)});
_local6 = com.nitrome.physics.Util.getRotation(s.map_array[_local2] - 258);
_local7 = new com.nitrome.stickyfeet.Electric(_local5, _local2, g);
g.encounters.push(_local7);
_local5._rotation = _local6;
return(_local5);
case 262 :
case 263 :
case 264 :
case 265 :
_local5 = g.electric_point_holder.attachMovie("electric_point", "tile" + _local2, _local2, {_x:(s.scale * 0.5) + (x * s.scale), _y:(s.scale * 0.5) + (y * s.scale)});
_local6 = com.nitrome.physics.Util.getRotation(s.map_array[_local2] - 262);
_local5._rotation = _local6;
return(_local5);
case 266 :
_local5 = s.tiles.attachMovie("sign_01", "tile" + _local2, _local2, {_x:x * s.scale, _y:y * s.scale});
return(_local5);
case 267 :
_local5 = s.tiles.attachMovie("sign_02", "tile" + _local2, _local2, {_x:x * s.scale, _y:y * s.scale});
return(_local5);
case 268 :
_local5 = s.tiles.attachMovie("sign_03", "tile" + _local2, _local2, {_x:x * s.scale, _y:y * s.scale});
return(_local5);
}
return(null);
}
function generateBlock(type, x, y, mc, width, height) {
switch (type) {
case "static" :
var _local9 = new com.nitrome.stickyfeet.Block(x * s.scale, y * s.scale, s.scale, s.scale, mc);
g.blocks.push(_local9);
return(_local9);
case "start" :
_local9 = new com.nitrome.stickyfeet.Block(x * s.scale, y * s.scale, s.scale * 2, s.scale * 2, mc);
g.blocks.push(_local9);
return(_local9);
case "exit0" :
case "exit2" :
case "exit3" :
case "exit4" :
switch (type) {
case "exit3" :
var _local10 = new com.nitrome.stickyfeet.Block(x * s.scale, y * s.scale, s.scale, s.scale, mc);
g.blocks.push(_local10);
var _local13 = new com.nitrome.stickyfeet.Block((x + 1) * s.scale, y * s.scale, s.scale, s.scale, mc);
g.blocks.push(_local13);
var _local12 = new com.nitrome.stickyfeet.PipeBlock(x * s.scale, (y + 1) * s.scale, s.scale, s.scale, mc);
g.blocks.push(_local12);
var _local11 = new com.nitrome.stickyfeet.ExitBlock((x + 1) * s.scale, (y + 1) * s.scale, s.scale, s.scale, mc);
g.blocks.push(_local11);
break;
case "exit0" :
_local9 = new com.nitrome.stickyfeet.PipeBlock(x * s.scale, y * s.scale, s.scale, s.scale, mc);
g.blocks.push(_local9);
_local9 = new com.nitrome.stickyfeet.Block((x + 1) * s.scale, y * s.scale, s.scale, s.scale, mc);
g.blocks.push(_local9);
_local9 = new com.nitrome.stickyfeet.ExitBlock(x * s.scale, (y + 1) * s.scale, s.scale, s.scale, mc);
g.blocks.push(_local9);
_local9 = new com.nitrome.stickyfeet.Block((x + 1) * s.scale, (y + 1) * s.scale, s.scale, s.scale, mc);
g.blocks.push(_local9);
break;
case "exit1" :
_local9 = new com.nitrome.stickyfeet.PipeBlock(x * s.scale, y * s.scale, s.scale, s.scale, mc);
g.blocks.push(_local9);
_local9 = new com.nitrome.stickyfeet.ExitBlock((x + 1) * s.scale, y * s.scale, s.scale, s.scale, mc);
g.blocks.push(_local9);
_local9 = new com.nitrome.stickyfeet.Block(x * s.scale, (y + 1) * s.scale, s.scale, s.scale, mc);
g.blocks.push(_local9);
_local9 = new com.nitrome.stickyfeet.Block((x + 1) * s.scale, (y + 1) * s.scale, s.scale, s.scale, mc);
g.blocks.push(_local9);
break;
case "exit1" :
_local9 = new com.nitrome.stickyfeet.Block(x * s.scale, y * s.scale, s.scale, s.scale, mc);
g.blocks.push(_local9);
_local9 = new com.nitrome.stickyfeet.PipeBlock((x + 1) * s.scale, y * s.scale, s.scale, s.scale, mc);
g.blocks.push(_local9);
_local9 = new com.nitrome.stickyfeet.Block(x * s.scale, (y + 1) * s.scale, s.scale, s.scale, mc);
g.blocks.push(_local9);
_local9 = new com.nitrome.stickyfeet.ExitBlock((x + 1) * s.scale, (y + 1) * s.scale, s.scale, s.scale, mc);
g.blocks.push(_local9);
}
return(null);
case "sticky" :
_local9 = new com.nitrome.stickyfeet.Block(x * s.scale, y * s.scale, s.scale, s.scale, mc);
_local9.sticky = true;
g.blocks.push(_local9);
return(_local9);
case "pipe" :
_local9 = new com.nitrome.stickyfeet.PipeBlock(x * s.scale, y * s.scale, s.scale, s.scale, mc);
g.blocks.push(_local9);
return(_local9);
case "breakable" :
_local9 = new com.nitrome.stickyfeet.Block(x * s.scale, y * s.scale, s.scale, s.scale, mc);
_local9.breakable = true;
g.blocks.push(_local9);
return(_local9);
case "moving" :
var _local6 = 0;
while (_local6 < (height * s.scale)) {
var _local2 = 0;
while (_local2 < (width * s.scale)) {
_local9 = new com.nitrome.stickyfeet.MovingBlock(x * s.scale, y * s.scale, s.scale, s.scale, mc, g);
_local9.add_x = _local2;
_local9.add_y = _local6;
g.blocks.push(_local9);
g.moving_blocks.push(_local9);
_local2 = _local2 + s.scale;
}
_local6 = _local6 + s.scale;
}
return(null);
case "sticky_moving" :
width = 3;
height = 2;
_local6 = 0;
while (_local6 < (height * s.scale)) {
var _local2 = 0;
while (_local2 < (width * s.scale)) {
_local9 = new com.nitrome.stickyfeet.MovingBlock(x * s.scale, y * s.scale, s.scale, s.scale, mc, g);
_local9.add_x = _local2;
_local9.add_y = _local6;
if ((_local2 == 0) || (_local2 == (s.scale * 2))) {
_local9.sticky = true;
}
g.blocks.push(_local9);
g.moving_blocks.push(_local9);
_local2 = _local2 + s.scale;
}
_local6 = _local6 + s.scale;
}
return(null);
case "switch_block" :
_local9 = new com.nitrome.stickyfeet.SwitchBlock(x * s.scale, y * s.scale, s.scale, s.scale, mc, g);
g.blocks.push(_local9);
g.moving_blocks.push(_local9);
return(_local9);
}
return(null);
}
function generateSign(n, s) {
var _local3 = 0;
while (_local3 < s.signage.length) {
if ((s.signage[_local3].n == n) && (s.signage[_local3].layer == s.current_layer)) {
var _local6 = s.tiles.createEmptyMovieClip("tile" + n, n);
var _local5 = _local6.createTextField("txt", 0, text_border, text_border, ((-text_border) * 2) + (s.signage[_local3].width * s.scale), ((-text_border) * 2) + (s.signage[_local3].height * s.scale));
_local5.selectable = false;
var _local4 = new TextFormat();
_local4.color = 16777215 /* 0xFFFFFF */;
_local4.size = 8;
_local5.embedFonts = true;
_local4.font = "sign_font";
_local5.wordWrap = true;
_local5.text = s.signage[_local3].text;
_local4.align = "center";
_local4.leading = 3;
_local5.setTextFormat(_local4);
return(_local6);
}
_local3++;
}
}
static var RIGHT = 0;
static var DOWN = 1;
static var LEFT = 2;
static var UP = 3;
var UP_ROTATION = 0;
var UP_RIGHT_ROTATION = 45;
var RIGHT_ROTATION = 90;
var DOWN_RIGHT_ROTATION = 135;
var DOWN_ROTATION = 180;
var DOWN_LEFT_ROTATION = 225;
var LEFT_ROTATION = 270;
var UP_LEFT_ROTATION = 315;
var text_border = 5;
}
Symbol 1307 MovieClip [__Packages.com.nitrome.physics.Util] Frame 0
class com.nitrome.physics.Util
{
function Util () {
}
static function thetaLerp(a, b, t) {
a = a + ((Math.abs(b - a) > Math.PI) ? (((a < b) ? (Math.PI*2) : -6.28318530717959)) : 0);
return(lerp(a, b, t));
}
static function lerp(a, b, t) {
return(a + ((b - a) * t));
}
static function wrapLerp(a, b, t, minX, maxX) {
var _local1 = Math.abs(minX - maxX);
a = a + ((Math.abs(b - a) > (_local1 * 0.5)) ? (((a < b) ? (_local1) : (-_local1))) : 0);
return(lerp(a, b, t));
}
static function getTransparent(x, y, bitmap) {
var _local1 = (bitmap.getPixel32(Math.floor(x), Math.floor(y)) >> 24) & 255;
if (_local1 == 0) {
return(true);
}
return(false);
}
static function localToLocal(mc0, mc1) {
var _local1 = {x:0, y:0};
mc0.localToGlobal(_local1);
mc1.globalToLocal(_local1);
return(_local1);
}
static function setCollisionBox(box, mc, stage) {
var _local2 = localToLocal(mc.a, stage);
var _local1 = localToLocal(mc.b, stage);
box.x = Math.min(_local2.x, _local1.x);
box.y = Math.min(_local2.y, _local1.y);
box.width = Math.abs(_local2.x - _local1.x);
box.height = Math.abs(_local2.y - _local1.y);
}
static function stopClips(mc) {
for (var _local2 in mc) {
if (typeof(mc[_local2]) == "movieclip") {
mc[_local2].stop();
stopClips(mc[_local2]);
}
}
}
static function startClips(mc) {
for (var _local2 in mc) {
if (typeof(mc[_local2]) == "movieclip") {
mc[_local2].gotoAndPlay(mc[_local2]._currentframe);
startClips(mc[_local2]);
}
}
}
static function countMC(mc, traceNames) {
_root.total_number_mcs = 0;
countClips(mc, traceNames);
trace(_root.total_number_mcs);
}
static function countClips(mc, traceNames) {
for (var _local4 in mc) {
if (typeof(mc[_local4]) == "movieclip") {
if (traceNames) {
trace(mc[_local4]);
}
_root.total_number_mcs++;
countClips(mc[_local4], traceNames);
}
}
}
static function getRotation(side) {
var _local1 = 0;
switch (side) {
case UP :
_local1 = UP_ROTATION;
break;
case RIGHT :
_local1 = RIGHT_ROTATION;
break;
case DOWN :
_local1 = DOWN_ROTATION;
break;
case LEFT :
_local1 = LEFT_ROTATION;
}
return(_local1);
}
static function circleOverlap(x0, y0, r0, x1, y1, r1) {
return((((x1 - x0) * (x1 - x0)) + ((y1 - y0) * (y1 - y0))) <= ((r0 + r1) * (r0 + r1)));
}
static function circleInside(x0, y0, r0, x1, y1, r1) {
return((((x1 - x0) * (x1 - x0)) + ((y1 - y0) * (y1 - y0))) <= ((r1 - r0) * (r1 - r0)));
}
static function proximity(x0, y0, x1, y1, len) {
return((((x1 - x0) * (x1 - x0)) + ((y1 - y0) * (y1 - y0))) <= (len * len));
}
static function rectContains(xr, yr, width, height, x, y) {
return((((x >= xr) && (y >= yr)) && (x < (xr + width))) && (y < (yr + height)));
}
static function circlePolyCollision(xc, yc, r, p) {
var _local4 = Number.MAX_VALUE;
var _local3 = Number.MAX_VALUE;
var _local5 = Number.MIN_VALUE;
var _local6 = Number.MIN_VALUE;
var _local1 = 0;
while (_local1 < p.length) {
if (p[_local1].x < _local4) {
_local4 = p[_local1].x;
}
if (p[_local1].y < _local3) {
_local3 = p[_local1].y;
}
if (p[_local1].x > _local5) {
_local5 = p[_local1].x;
}
if (p[_local1].y > _local6) {
_local6 = p[_local1].y;
}
_local1++;
}
if ((((_local4 > (xc + ((r * 2) - 1))) || ((_local4 + (_local5 - 1)) < xc)) || (_local3 > (yc + ((r * 2) - 1)))) || ((_local3 + (_local6 - 1)) < yc)) {
return(false);
}
return(false);
}
static var RIGHT = 0;
static var DOWN = 1;
static var LEFT = 2;
static var UP = 3;
static var UP_ROTATION = 0;
static var UP_RIGHT_ROTATION = 45;
static var RIGHT_ROTATION = 90;
static var DOWN_RIGHT_ROTATION = 135;
static var DOWN_ROTATION = 180;
static var DOWN_LEFT_ROTATION = 225;
static var LEFT_ROTATION = 270;
static var UP_LEFT_ROTATION = 315;
}
Symbol 1308 MovieClip [__Packages.com.nitrome.stickyfeet.Encounter] Frame 0
class com.nitrome.stickyfeet.Encounter extends com.nitrome.physics.Rect
{
var mc, id, active;
function Encounter (x, y, width, height, mc) {
super(x, y, width, height);
this.mc = mc;
id = -1;
active = true;
}
function resolveEncounter(player) {
}
function unpause() {
}
}
Symbol 1309 MovieClip [__Packages.com.nitrome.stickyfeet.Switch] Frame 0
class com.nitrome.stickyfeet.Switch extends com.nitrome.stickyfeet.Encounter
{
var switch_id, g, mc;
function Switch (mc, switch_id, g) {
super(0, 0, 0, 0, mc);
this.switch_id = switch_id;
this.g = g;
}
function resolveEncounter(player) {
if (player.state == player.DEAD) {
return(undefined);
}
if (mc._currentframe == 1) {
_root.sfx.playSound("click");
}
mc.gotoAndPlay("down");
var _local3 = 0;
while (_local3 < g.moving_blocks.length) {
if (g.moving_blocks[_local3].switch_id == switch_id) {
if (g.moving_blocks[_local3].mc._parent._currentframe == 1) {
g.moving_blocks[_local3].mc._parent.gotoAndPlay("raise");
}
}
_local3++;
}
}
function unpause() {
if (mc._currentframe == 1) {
mc.gotoAndStop("up");
}
}
}
Symbol 1310 MovieClip [__Packages.com.nitrome.stickyfeet.Coin] Frame 0
class com.nitrome.stickyfeet.Coin extends com.nitrome.stickyfeet.Encounter
{
var g, id, x, y, width, height, active, mc;
function Coin (mc, id, g) {
super(0, 0, 0, 0, mc);
this.g = g;
this.id = id;
var _local3 = com.nitrome.physics.Util.localToLocal(mc.coin, g.stage);
x = _local3.x;
y = _local3.y;
width = 22;
height = 34;
}
function resolveEncounter(player) {
if (!active) {
return(undefined);
}
active = false;
mc.removeMovieClip();
g.coin_holder.attachMovie("coin_collect", "tile" + id, id, {_x:x, _y:y});
g.scroller.removeTile(2, id);
g.giveScore(20);
_root.sfx.playSound("ching");
}
}
Symbol 1311 MovieClip [__Packages.com.nitrome.stickyfeet.Monster] Frame 0
class com.nitrome.stickyfeet.Monster extends com.nitrome.stickyfeet.Encounter
{
var id, g, active, mc;
function Monster (mc, id, g) {
super(0, 0, 0, 0, mc);
this.id = id;
this.g = g;
}
function main() {
updatePosition();
}
function resolveEncounter(player) {
if (!active) {
return(undefined);
}
}
function updatePosition() {
if (mc instanceof MovieClip) {
com.nitrome.physics.Util.setCollisionBox(this, mc.monster, g.stage);
}
}
}
Symbol 1312 MovieClip [__Packages.com.nitrome.stickyfeet.ElectricMonster] Frame 0
class com.nitrome.stickyfeet.ElectricMonster extends com.nitrome.stickyfeet.Monster
{
var resize, counter, zapping, mc, width, x, y, g, active, id;
function ElectricMonster (mc, id, g) {
super(mc, id, g);
resize(mc._x + 9, mc._y + 12, 43, 46);
counter = g.frame_count_75;
zapping = false;
if (g.frame_count_75 > (off_delay - 1)) {
counter = counter - off_delay;
zapping = true;
}
}
function main() {
if (zapping) {
mc.gotoAndStop("on");
if (com.nitrome.physics.Util.proximity(x + (width * 0.5), y + (width * 0.5), g.player.player_rect.x + (g.player.player_rect.width * 0.5), g.player.player_rect.y + (g.player.player_rect.height * 0.5), 100)) {
g.player.electrify();
}
counter++;
if (counter >= zap_delay) {
counter = 0;
zapping = false;
}
} else {
mc.gotoAndStop("off");
counter++;
if (counter >= off_delay) {
counter = 0;
zapping = true;
}
}
}
function resolveEncounter(player) {
if (!active) {
return(undefined);
}
if (player.state == player.JUMPING) {
var _local5 = com.nitrome.physics.Util.localToLocal(mc.d_1, g.stage);
var _local4 = com.nitrome.physics.Util.localToLocal(mc.d_2, g.stage);
var _local3 = com.nitrome.physics.Util.localToLocal(mc.d_3, g.stage);
g.debris.push(g.debris_holder.attachMovie("electric_debris_01", "m" + g.debris_holder.getNextHighestDepth(), g.debris_holder.getNextHighestDepth(), {_x:_local5.x, _y:_local5.y}));
g.debris.push(g.debris_holder.attachMovie("electric_debris_02", "m" + g.debris_holder.getNextHighestDepth(), g.debris_holder.getNextHighestDepth(), {_x:_local4.x, _y:_local4.y}));
g.debris.push(g.debris_holder.attachMovie("electric_debris_03", "m" + g.debris_holder.getNextHighestDepth(), g.debris_holder.getNextHighestDepth(), {_x:_local3.x, _y:_local3.y}));
var _local2 = g.debris.length - 4;
while (_local2 < g.debris.length) {
g.debris[_local2].addVelocity(-10 + (Math.random() * 20), -5 - (Math.random() * 5));
_local2++;
}
player.flyingSmack();
mc.removeMovieClip();
g.scroller.removeTile(2, id);
active = false;
g.giveScore(50);
} else {
player.hit();
}
}
var zap_delay = 25;
var off_delay = 50;
}
Symbol 1313 MovieClip [__Packages.com.nitrome.stickyfeet.RiderMonster] Frame 0
class com.nitrome.stickyfeet.RiderMonster extends com.nitrome.stickyfeet.Monster
{
var active, mc, g, id;
function RiderMonster (mc, id, g) {
super(mc, id, g);
}
function resolveEncounter(player) {
if (!active) {
return(undefined);
}
if (player.state == player.JUMPING) {
var _local6 = com.nitrome.physics.Util.localToLocal(mc.monster.d_1, g.stage);
var _local5 = com.nitrome.physics.Util.localToLocal(mc.monster.d_2, g.stage);
var _local4 = com.nitrome.physics.Util.localToLocal(mc.monster.d_3, g.stage);
var _local3 = com.nitrome.physics.Util.localToLocal(mc.monster.d_4, g.stage);
g.debris.push(g.debris_holder.attachMovie("rider_debris_01", "m" + g.debris_holder.getNextHighestDepth(), g.debris_holder.getNextHighestDepth(), {_x:_local6.x, _y:_local6.y}));
g.debris.push(g.debris_holder.attachMovie("rider_debris_02", "m" + g.debris_holder.getNextHighestDepth(), g.debris_holder.getNextHighestDepth(), {_x:_local5.x, _y:_local5.y}));
g.debris.push(g.debris_holder.attachMovie("rider_debris_03", "m" + g.debris_holder.getNextHighestDepth(), g.debris_holder.getNextHighestDepth(), {_x:_local4.x, _y:_local4.y}));
g.debris.push(g.debris_holder.attachMovie("rider_debris_04", "m" + g.debris_holder.getNextHighestDepth(), g.debris_holder.getNextHighestDepth(), {_x:_local3.x, _y:_local3.y}));
var _local2 = g.debris.length - 5;
while (_local2 < g.debris.length) {
g.debris[_local2].addVelocity(-10 + (Math.random() * 20), -5 - (Math.random() * 5));
_local2++;
}
player.flyingSmack();
mc.removeMovieClip();
g.scroller.removeTile(2, id);
active = false;
g.giveScore(10);
} else {
player.hit();
}
}
}
Symbol 1314 MovieClip [__Packages.com.nitrome.stickyfeet.FlyMonster] Frame 0
class com.nitrome.stickyfeet.FlyMonster extends com.nitrome.stickyfeet.Monster
{
var active, mc, g, id;
function FlyMonster (mc, id, g) {
super(mc, id, g);
switch (mc._totalframes) {
case 50 :
mc.gotoAndPlay((g.frame_count_50 % mc._totalframes) + 1);
break;
case 100 :
mc.gotoAndPlay((g.frame_count_100 % mc._totalframes) + 1);
break;
case 150 :
mc.gotoAndPlay((g.frame_count_150 % mc._totalframes) + 1);
}
}
function resolveEncounter(player) {
if (!active) {
return(undefined);
}
if (player.state == player.JUMPING) {
var _local5 = com.nitrome.physics.Util.localToLocal(mc.monster.monster.monster.d_1, g.stage);
var _local4 = com.nitrome.physics.Util.localToLocal(mc.monster.monster.monster.d_2, g.stage);
var _local3 = com.nitrome.physics.Util.localToLocal(mc.monster.monster.monster.d_3, g.stage);
g.debris.push(g.debris_holder.attachMovie("fly_debris_01", "m" + g.debris_holder.getNextHighestDepth(), g.debris_holder.getNextHighestDepth(), {_x:_local5.x, _y:_local5.y}));
g.debris.push(g.debris_holder.attachMovie("fly_debris_02", "m" + g.debris_holder.getNextHighestDepth(), g.debris_holder.getNextHighestDepth(), {_x:_local4.x, _y:_local4.y}));
g.debris.push(g.debris_holder.attachMovie("fly_debris_03", "m" + g.debris_holder.getNextHighestDepth(), g.debris_holder.getNextHighestDepth(), {_x:_local3.x, _y:_local3.y}));
var _local2 = g.debris.length - 5;
while (_local2 < g.debris.length) {
g.debris[_local2].addVelocity(-10 + (Math.random() * 20), -5 - (Math.random() * 5));
_local2++;
}
player.flyingSmack();
mc.removeMovieClip();
g.scroller.removeTile(2, id);
active = false;
g.giveScore(10);
} else {
player.hit();
}
}
function updatePosition() {
if (mc instanceof MovieClip) {
com.nitrome.physics.Util.setCollisionBox(this, mc.monster.monster.monster, g.stage);
}
}
}
Symbol 1315 MovieClip [__Packages.com.nitrome.stickyfeet.BallChainMonster] Frame 0
class com.nitrome.stickyfeet.BallChainMonster extends com.nitrome.stickyfeet.Monster
{
var mc, g;
function BallChainMonster (mc, id, g) {
super(mc, id, g);
switch (mc._totalframes) {
case 50 :
mc.gotoAndPlay((g.frame_count_50 % mc._totalframes) + 1);
break;
case 100 :
mc.gotoAndPlay((g.frame_count_100 % mc._totalframes) + 1);
break;
case 150 :
mc.gotoAndPlay((g.frame_count_150 % mc._totalframes) + 1);
}
}
function main() {
var _local2 = com.nitrome.physics.Util.localToLocal(mc.monster.hit, g.stage);
if (com.nitrome.physics.Util.proximity(_local2.x, _local2.y, g.player.player_rect.x + (g.player.player_rect.width * 0.5), g.player.player_rect.y + (g.player.player_rect.height * 0.5), 35)) {
g.player.hit();
}
var _local3 = com.nitrome.physics.Util.localToLocal(mc.monster.hit2, g.stage);
if (com.nitrome.physics.Util.proximity(_local3.x, _local3.y, g.player.player_rect.x + (g.player.player_rect.width * 0.5), g.player.player_rect.y + (g.player.player_rect.height * 0.5), 21)) {
g.player.hit();
}
}
function resolveEncounter(player) {
return(undefined);
}
}
Symbol 1316 MovieClip [__Packages.com.nitrome.stickyfeet.SpikesMonster] Frame 0
class com.nitrome.stickyfeet.SpikesMonster extends com.nitrome.stickyfeet.Monster
{
var active, mc, g;
function SpikesMonster (mc, id, g) {
super(mc, id, g);
}
function resolveEncounter(player) {
if (!active) {
return(undefined);
}
active = false;
player.crush();
}
function updatePosition() {
if (mc instanceof MovieClip) {
com.nitrome.physics.Util.setCollisionBox(this, mc, g.stage);
}
}
}
Symbol 1317 MovieClip [__Packages.com.nitrome.stickyfeet.ShootyMonster] Frame 0
class com.nitrome.stickyfeet.ShootyMonster extends com.nitrome.stickyfeet.Monster
{
var orient, shoot_count, shoot_delay, shooting, mc, g, active, id;
function ShootyMonster (mc, id, g, orient, delay) {
super(mc, id, g);
this.orient = orient;
shoot_count = g.frame_count_75;
shoot_delay = delay;
shooting = false;
if (delay > 0) {
if (shoot_count > (delay - 1)) {
shoot_count = shoot_count - delay;
shooting = true;
mc.gotoAndStop("shoot");
mc.monster.gotoAndPlay(shoot_count + 1);
}
} else {
shoot_count = g.frame_count_25;
shooting = true;
mc.gotoAndStop("shoot");
mc.monster.gotoAndPlay(shoot_count + 1);
}
}
function main() {
updatePosition();
shoot();
}
function unpause() {
if (shooting) {
mc.gotoAndStop("shoot");
} else if (shoot_delay > 0) {
mc.gotoAndStop("sleeping");
}
}
function shoot() {
shoot_count++;
if ((!shooting) && (shoot_count >= shoot_delay)) {
mc.gotoAndStop("shoot");
shooting = true;
shoot_count = 0;
}
if (shooting && (shoot_count == shoot_anim_frame)) {
var _local2 = com.nitrome.physics.Util.localToLocal(mc.shot, g.stage);
var _local4 = g.bullet_holder.attachMovie("bullet", "b" + g.bullet_holder.getNextHighestDepth(), g.bullet_holder.getNextHighestDepth(), {_x:_local2.x, _y:_local2.y, _rotation:mc._rotation});
g.encounters.push(new com.nitrome.stickyfeet.Bullet(orient, _local4, g));
var _local3 = com.nitrome.physics.Util.localToLocal(mc.paf, g.stage);
g.leap_holder.attachMovie("paf", "p" + g.leap_holder.getNextHighestDepth(), g.leap_holder.getNextHighestDepth(), {_x:_local3.x, _y:_local3.y, _rotation:mc._rotation});
}
if (shooting && (shoot_count >= shoot_anim_delay)) {
if (shoot_delay > 0) {
mc.gotoAndStop("sleeping");
}
shooting = false;
shoot_count = 0;
}
}
function resolveEncounter(player) {
if (!active) {
return(undefined);
}
if (player.state == player.JUMPING) {
var _local5 = com.nitrome.physics.Util.localToLocal(mc.d_1, g.stage);
var _local4 = com.nitrome.physics.Util.localToLocal(mc.d_2, g.stage);
var _local3 = com.nitrome.physics.Util.localToLocal(mc.d_3, g.stage);
g.debris.push(g.debris_holder.attachMovie("shooty_debris_01", "m" + g.debris_holder.getNextHighestDepth(), g.debris_holder.getNextHighestDepth(), {_x:_local5.x, _y:_local5.y}));
g.debris.push(g.debris_holder.attachMovie("shooty_debris_02", "m" + g.debris_holder.getNextHighestDepth(), g.debris_holder.getNextHighestDepth(), {_x:_local4.x, _y:_local4.y}));
g.debris.push(g.debris_holder.attachMovie("shooty_debris_03", "m" + g.debris_holder.getNextHighestDepth(), g.debris_holder.getNextHighestDepth(), {_x:_local3.x, _y:_local3.y}));
var _local2 = g.debris.length - 5;
while (_local2 < g.debris.length) {
g.debris[_local2].addVelocity(-10 + (Math.random() * 20), -5 - (Math.random() * 5));
_local2++;
}
player.flyingSmack();
mc.removeMovieClip();
g.scroller.removeTile(2, id);
active = false;
g.giveScore(15);
} else {
player.hit();
}
}
function updatePosition() {
if (mc instanceof MovieClip) {
com.nitrome.physics.Util.setCollisionBox(this, mc, g.stage);
}
}
var shoot_anim_frame = 15;
var shoot_anim_delay = 25;
}
Symbol 1318 MovieClip [__Packages.com.nitrome.stickyfeet.Bullet] Frame 0
class com.nitrome.stickyfeet.Bullet extends com.nitrome.stickyfeet.Encounter
{
var orient, g, mc, active, width, x, height, y;
function Bullet (orient, mc, g) {
super(0, 0, 0, 0, mc);
this.orient = orient;
this.g = g;
}
function main() {
switch (orient) {
case com.nitrome.physics.Rect.UP :
mc._y = mc._y - speed;
break;
case com.nitrome.physics.Rect.RIGHT :
mc._x = mc._x + speed;
break;
case com.nitrome.physics.Rect.DOWN :
mc._y = mc._y + speed;
break;
case com.nitrome.physics.Rect.LEFT :
mc._x = mc._x - speed;
}
updatePosition();
}
function resolveEncounter(player) {
if (!active) {
return(undefined);
}
player.hit();
}
function updatePosition() {
if (mc instanceof MovieClip) {
com.nitrome.physics.Util.setCollisionBox(this, mc, g.stage);
}
if ((((mc._x < ((-g.stage._x) - 275)) || (mc._x > ((-g.stage._x) + 825))) || (mc._y < ((-g.stage._y) - 200))) || (mc._y > ((-g.stage._y) + 600))) {
active = false;
mc.removeMovieClip();
}
var _local2 = 0;
while (_local2 < g.blocks.length) {
if (g.blocks[_local2].contains(x + (width * 0.5), y + (height * 0.5))) {
active = false;
var _local3 = g.blocks[_local2].sideOf(mc._x, mc._y);
switch (_local3) {
case com.nitrome.physics.Rect.UP :
y = g.blocks[_local2].y;
break;
case com.nitrome.physics.Rect.RIGHT :
x = g.blocks[_local2].x + g.blocks[_local2].width;
break;
case com.nitrome.physics.Rect.DOWN :
y = g.blocks[_local2].y + g.blocks[_local2].height;
break;
case com.nitrome.physics.Rect.LEFT :
x = g.blocks[_local2].x;
}
g.leap_holder.attachMovie("paf", "p" + g.leap_holder.getNextHighestDepth(), g.leap_holder.getNextHighestDepth(), {_x:x, _y:y, _rotation:com.nitrome.physics.Util.getRotation(_local3)});
mc.removeMovieClip();
}
_local2++;
}
}
var speed = 12;
}
Symbol 1319 MovieClip [__Packages.com.nitrome.stickyfeet.PunchyMonster] Frame 0
class com.nitrome.stickyfeet.PunchyMonster extends com.nitrome.stickyfeet.Monster
{
var punch_rect, g, active, mc, id;
function PunchyMonster (mc, id, g) {
super(mc, id, g);
punch_rect = new com.nitrome.physics.Rect(0, 0, 0, 0);
mc.gotoAndPlay((g.frame_count_75 % mc._totalframes) + 1);
}
function main() {
updatePosition();
if (g.player.collide(punch_rect) && (active)) {
if (g.player.state != g.player.JUMPING) {
g.player.hit();
}
}
}
function resolveEncounter(player) {
if (!active) {
return(undefined);
}
if (player.state == player.JUMPING) {
var _local5 = com.nitrome.physics.Util.localToLocal(mc.d_1, g.stage);
var _local4 = com.nitrome.physics.Util.localToLocal(mc.d_2, g.stage);
var _local3 = com.nitrome.physics.Util.localToLocal(mc.d_3, g.stage);
g.debris.push(g.debris_holder.attachMovie("punchy_debris_01", "m" + g.debris_holder.getNextHighestDepth(), g.debris_holder.getNextHighestDepth(), {_x:_local5.x, _y:_local5.y}));
g.debris.push(g.debris_holder.attachMovie("punchy_debris_02", "m" + g.debris_holder.getNextHighestDepth(), g.debris_holder.getNextHighestDepth(), {_x:_local4.x, _y:_local4.y}));
g.debris.push(g.debris_holder.attachMovie("punchy_debris_03", "m" + g.debris_holder.getNextHighestDepth(), g.debris_holder.getNextHighestDepth(), {_x:_local3.x, _y:_local3.y}));
var _local2 = g.debris.length - 5;
while (_local2 < g.debris.length) {
g.debris[_local2].addVelocity(-10 + (Math.random() * 20), -5 - (Math.random() * 5));
_local2++;
}
player.flyingSmack();
mc.removeMovieClip();
g.scroller.removeTile(2, id);
active = false;
g.giveScore(10);
} else {
player.hit();
}
}
function updatePosition() {
if (mc instanceof MovieClip) {
com.nitrome.physics.Util.setCollisionBox(this, mc, g.stage);
var _local3 = com.nitrome.physics.Util.localToLocal(mc.c, g.stage);
var _local2 = com.nitrome.physics.Util.localToLocal(mc.d, g.stage);
punch_rect.x = Math.min(_local3.x, _local2.x);
punch_rect.y = Math.min(_local3.y, _local2.y);
punch_rect.width = Math.abs(_local3.x - _local2.x);
punch_rect.height = Math.abs(_local3.y - _local2.y);
}
}
}
Symbol 1320 MovieClip [__Packages.com.nitrome.stickyfeet.ShootyBlock] Frame 0
class com.nitrome.stickyfeet.ShootyBlock extends com.nitrome.stickyfeet.Monster
{
var orient, x, y, width, height, shoot_count, g, mc, active;
function ShootyBlock (mc, id, g) {
super(mc, id, g);
orient = 0;
x = mc._x;
y = mc._y;
width = (height = 128);
shoot_count = 0;
}
function main() {
shoot();
}
function shoot() {
shoot_count++;
if (shoot_count >= shoot_delay) {
var _local2 = g.bullet_holder.attachMovie("bullet", "b" + g.bullet_holder.getNextHighestDepth(), g.bullet_holder.getNextHighestDepth(), {_x:x + (width * 0.5), _y:y + (height * 0.5), _rotation:com.nitrome.physics.Util.getRotation(orient)});
g.encounters.push(new com.nitrome.stickyfeet.Bullet(orient, _local2, g));
var _local3 = com.nitrome.physics.Util.localToLocal(mc["paf" + orient], g.stage);
g.leap_holder.attachMovie("paf", "p" + g.leap_holder.getNextHighestDepth(), g.leap_holder.getNextHighestDepth(), {_x:_local3.x, _y:_local3.y, _rotation:_local2._rotation});
shoot_count = 0;
orient = (orient + 1) % 4;
}
}
function resolveEncounter(player) {
if (!active) {
return(undefined);
}
active = false;
player.crush();
}
var shoot_delay = 10;
}
Symbol 1321 MovieClip [__Packages.com.nitrome.stickyfeet.Health] Frame 0
class com.nitrome.stickyfeet.Health extends com.nitrome.stickyfeet.Encounter
{
var g, id, x, y, width, height, active, mc;
function Health (mc, id, g) {
super(0, 0, 0, 0, mc);
this.g = g;
this.id = id;
var _local3 = com.nitrome.physics.Util.localToLocal(mc.health, g.stage);
x = _local3.x;
y = _local3.y;
width = 45;
height = 45;
}
function resolveEncounter(player) {
if (!active) {
return(undefined);
}
active = false;
mc.removeMovieClip();
g.coin_holder.attachMovie("health_collect", "tile" + id, id, {_x:x, _y:y});
g.scroller.removeTile(2, id);
_root.lives_panel.gainLife();
_root.sfx.playSound("ching");
}
}
Symbol 1322 MovieClip [__Packages.com.nitrome.stickyfeet.SpikeBlockMonster] Frame 0
class com.nitrome.stickyfeet.SpikeBlockMonster extends com.nitrome.stickyfeet.Monster
{
var mc_face, collision_rect, g, active, mc;
function SpikeBlockMonster (mc, mc_face, id, frame, g) {
super(mc, id, g);
this.mc_face = mc_face;
mc.gotoAndPlay(((g.frame_count_75 + frame) % g.frame_cycle_75) + 1);
mc_face.gotoAndPlay(((g.frame_count_75 + frame) % g.frame_cycle_75) + 1);
collision_rect = new com.nitrome.physics.Rect(0, 0, 0, 0);
}
function main() {
if (g.player.collide(collision_rect) && (active)) {
active = false;
g.player.crush();
}
if (!(mc instanceof MovieClip)) {
mc_face.removeMovieClip();
}
updatePosition();
}
function resolveEncounter(player) {
if (!active) {
return(undefined);
}
active = false;
player.crush();
}
function updatePosition() {
if (mc instanceof MovieClip) {
com.nitrome.physics.Util.setCollisionBox(this, mc, g.stage);
var _local3 = com.nitrome.physics.Util.localToLocal(mc.c, g.stage);
var _local2 = com.nitrome.physics.Util.localToLocal(mc.d, g.stage);
collision_rect.x = Math.min(_local3.x, _local2.x);
collision_rect.y = Math.min(_local3.y, _local2.y);
collision_rect.width = Math.abs(_local3.x - _local2.x);
collision_rect.height = Math.abs(_local3.y - _local2.y);
}
}
}
Symbol 1323 MovieClip [__Packages.com.nitrome.stickyfeet.Electric] Frame 0
class com.nitrome.stickyfeet.Electric extends com.nitrome.stickyfeet.Monster
{
var counter, zapping, mc, active, g;
function Electric (mc, id, g) {
super(mc, id, g);
counter = g.frame_count_75;
zapping = false;
if (g.frame_count_75 > (off_delay - 1)) {
counter = counter - off_delay;
zapping = true;
}
}
function main() {
updatePosition();
if (zapping) {
mc.gotoAndStop("on");
counter++;
if (counter >= zap_delay) {
counter = 0;
zapping = false;
}
} else {
mc.gotoAndStop("off");
counter++;
if (counter >= off_delay) {
counter = 0;
zapping = true;
}
}
}
function resolveEncounter(player) {
if (!active) {
return(undefined);
}
if (zapping) {
player.electrify();
}
}
function updatePosition() {
if (mc instanceof MovieClip) {
com.nitrome.physics.Util.setCollisionBox(this, mc.monster, g.stage);
}
}
var zap_delay = 25;
var off_delay = 50;
}
Symbol 1324 MovieClip [__Packages.com.nitrome.stickyfeet.SwitchBlock] Frame 0
class com.nitrome.stickyfeet.SwitchBlock extends com.nitrome.stickyfeet.MovingBlock
{
var switch_id, anim_mc, last_x, x, last_y, y, mc, g;
function SwitchBlock (x, y, width, height, mc, g) {
super(x, y, width, height, mc, g);
switch_id = -1;
anim_mc = mc;
anim_mc.gotoAndStop("up");
}
function updatePosition() {
last_x = x;
last_y = y;
if (mc instanceof MovieClip) {
com.nitrome.physics.Util.setCollisionBox(this, mc, g.stage);
}
}
function unpause() {
if (anim_mc._currentframe > 4) {
return(undefined);
}
anim_mc.gotoAndStop("up");
}
}
Symbol 1325 MovieClip [__Packages.com.nitrome.stickyfeet.ScorePanel] Frame 0
class com.nitrome.stickyfeet.ScorePanel extends MovieClip
{
var attachMovie, digit_0, digit_1, digit_2, digit_3, digit_4;
function ScorePanel () {
super();
attachMovie("number_clip", "digit_0", 1);
attachMovie("number_clip", "digit_1", 2);
attachMovie("number_clip", "digit_2", 3);
attachMovie("number_clip", "digit_3", 4);
attachMovie("number_clip", "digit_4", 5);
digit_0._y = 0;
digit_1._y = 0;
digit_2._y = 0;
digit_3._y = 0;
digit_4._y = 0;
updateScore();
}
function incrementScore(n) {
score = score + n;
updateScore();
}
function setScore(n) {
score = n;
updateScore();
}
function getScore() {
return(score);
}
function updateScore() {
var _local3 = String(score);
if (_local3.length < 5) {
if (_local3.length == 1) {
_local3 = "0000" + _local3;
} else if (_local3.length == 2) {
_local3 = "000" + _local3;
} else if (_local3.length == 3) {
_local3 = "00" + _local3;
} else if (_local3.length == 4) {
_local3 = "0" + _local3;
}
}
var _local5 = 0;
var _local2 = 0;
while (_local2 < _local3.length) {
var _local4 = _local3.charAt(_local2);
this["digit_" + _local2].gotoAndStop("number_" + _local4);
this["digit_" + _local2]._x = _local5;
_local5 = _local5 + number_widths[Number(_local4)];
_local2++;
}
}
var score = 0;
var number_widths = new Array(11, 9, 10, 10, 10, 10, 10, 10, 10, 10);
}
Symbol 1326 MovieClip [__Packages.com.nitrome.game.PauseButton] Frame 0
class com.nitrome.game.PauseButton extends com.nitrome.game.SimpleButton
{
function PauseButton () {
super();
}
function onPress() {
_root.game.pauseGame();
}
}
Symbol 1327 MovieClip [__Packages.com.nitrome.game.NoClicks] Frame 0
class com.nitrome.game.NoClicks extends MovieClip
{
var useHandCursor;
function NoClicks () {
super();
useHandCursor = false;
}
function onPress() {
}
}
Symbol 1328 MovieClip [__Packages.com.nitrome.game.ScoreTicker] Frame 0
class com.nitrome.game.ScoreTicker extends MovieClip
{
var next_clip, _parent, next_total, next_inc, total, inc, val, count_interval, score_text;
function ScoreTicker () {
super();
}
function onFinish() {
if (next_clip != undefined) {
_parent[next_clip].startCount(next_total, next_inc);
} else {
_root.sfx.playSound("bonus");
}
}
function setOnFinish(clip, n, inc) {
next_clip = clip;
next_total = n;
next_inc = inc;
}
function startCount(n, inc) {
total = n;
this.inc = inc;
val = 0;
count_interval = setInterval(this, "doCount", 40);
}
function doCount() {
val = val + inc;
if (val >= total) {
val = total;
displayScore();
clearInterval(count_interval);
onFinish();
} else {
displayScore();
}
_root.sfx.playSound("score");
}
function displayScore() {
score_text.text = String(val);
}
}
Symbol 1329 MovieClip [__Packages.com.nitrome.game.PopUpHolder] Frame 0
class com.nitrome.game.PopUpHolder extends MovieClip
{
var popup_id, keyPressed, keyReady, gotoAndPlay;
function PopUpHolder () {
super();
}
function launchPopUp(id) {
popup_id = id;
keyPressed = false;
keyReady = false;
gotoAndPlay(2);
}
function hidePopUp() {
gotoAndPlay("hide");
}
}
Symbol 1330 MovieClip [__Packages.com.nitrome.game.MusicToggle] Frame 0
class com.nitrome.game.MusicToggle extends MovieClip
{
var gotoAndStop;
function MusicToggle () {
super();
if (_root.mc.getMusicOn() == false) {
gotoAndStop("_off_up");
} else {
gotoAndStop("_on_up");
}
}
function onRollOver() {
updateGraphic(true);
_root.sfx_manager.playSound("rollover");
}
function onRollOut() {
updateGraphic(false);
}
function onPress() {
_root.mc.toggleMusic();
updateGraphic(true);
}
function updateGraphic(mouse_is_over) {
if (mouse_is_over == true) {
if (_root.mc.getMusicOn() == true) {
gotoAndStop("_on_over");
} else if (_root.mc.getMusicOn() == false) {
gotoAndStop("_off_over");
}
} else if (mouse_is_over == false) {
if (_root.mc.getMusicOn() == true) {
gotoAndStop("_on_up");
} else if (_root.mc.getMusicOn() == false) {
gotoAndStop("_off_up");
}
}
}
}
Symbol 1331 MovieClip [__Packages.com.nitrome.game.FxToggle] Frame 0
class com.nitrome.game.FxToggle extends MovieClip
{
var gotoAndStop;
function FxToggle () {
super();
if (_root.mc.getSfxOn() == false) {
gotoAndStop("_off_up");
} else {
gotoAndStop("_on_up");
}
}
function onRollOver() {
updateGraphic(true);
_root.sfx_manager.playSound("rollover");
}
function onRollOut() {
updateGraphic(false);
}
function onPress() {
_root.mc.toggleSfx();
updateGraphic(true);
}
function updateGraphic(mouse_is_over) {
if (mouse_is_over == true) {
if (_root.mc.getSfxOn() == true) {
gotoAndStop("_on_over");
} else if (_root.mc.getSfxOn() == false) {
gotoAndStop("_off_over");
}
} else if (mouse_is_over == false) {
if (_root.mc.getSfxOn() == true) {
gotoAndStop("_on_up");
} else if (_root.mc.getSfxOn() == false) {
gotoAndStop("_off_up");
}
}
}
}
Symbol 1332 MovieClip [__Packages.com.nitrome.stickyfeet.LivesPanel] Frame 0
class com.nitrome.stickyfeet.LivesPanel extends MovieClip
{
var gotoAndStop;
function LivesPanel () {
super();
}
function getLivesLeft() {
return(lives);
}
function loseLife() {
lives--;
if (lives < 0) {
lives = 0;
}
updateGraphics();
}
function setLife(n) {
lives = ((n > 3) ? 3 : (((n < 0) ? 0 : (n))));
updateGraphics();
}
function gainLife() {
lives++;
if (lives > 3) {
lives = 3;
}
updateGraphics();
}
function updateGraphics() {
if (lives == 3) {
gotoAndStop("h_3");
} else if (lives == 2) {
gotoAndStop("h_2");
} else if (lives == 1) {
gotoAndStop("h_1");
} else if (lives == 0) {
gotoAndStop("h_0");
}
}
var lives = 3;
}
Symbol 1333 MovieClip [__Packages.com.nitrome.game.SfxManager] Frame 0
class com.nitrome.game.SfxManager extends MovieClip
{
function SfxManager () {
super();
}
function playSound(id) {
if (_root.mc.getSfxOn() == true) {
this[id].gotoAndPlay(2);
}
}
}
Symbol 1334 MovieClip [__Packages.com.nitrome.game.MusicController] Frame 0
class com.nitrome.game.MusicController extends MovieClip
{
var menu_sound, game_sound, music_type;
function MusicController () {
super();
menu_sound = new Sound(_root.menu_music_mc);
game_sound = new Sound(_root.game_music_mc);
menu_sound.attachSound("menu_music");
game_sound.attachSound("game_music");
music_on = _root.ng.getMusicOn();
sfx_on = _root.ng.getSfxOn();
}
function startMenuMusic(from_toggle) {
if ((music_type != "menu") || (from_toggle == true)) {
if (music_on == true) {
menu_sound.onSoundComplete = function () {
this.start();
};
game_sound.onSoundComplete = function () {
};
game_sound.stop();
menu_sound.start();
}
music_type = "menu";
}
}
function startGameMusic(from_toggle) {
if ((music_type != "game") || (from_toggle == true)) {
if (music_on == true) {
game_sound.onSoundComplete = function () {
this.start();
};
menu_sound.onSoundComplete = function () {
};
menu_sound.stop();
game_sound.start();
}
music_type = "game";
}
}
function getMusicOn() {
return(music_on);
}
function toggleMusic() {
if (music_on == true) {
turnOffMusic();
} else if (music_on == false) {
turnOnMusic();
}
}
function turnOnMusic() {
music_on = true;
if (music_type == "menu") {
startMenuMusic(true);
} else if (music_type == "game") {
startGameMusic(true);
}
_root.ng.setMusicOn(true);
}
function turnOffMusic() {
music_on = false;
menu_sound.stop();
game_sound.stop();
_root.ng.setMusicOn(false);
}
function getSfxOn() {
return(sfx_on);
}
function toggleSfx() {
if (sfx_on == true) {
turnOffSfx();
} else if (sfx_on == false) {
turnOnSfx();
}
}
function turnOnSfx() {
sfx_on = true;
_root.ng.setSfxOn(true);
}
function turnOffSfx() {
sfx_on = false;
_root.ng.setSfxOn(false);
}
var music_on = true;
var sfx_on = true;
}
Symbol 1335 MovieClip [__Packages.com.nitrome.game.LevelChooserButton] Frame 0
class com.nitrome.game.LevelChooserButton extends MovieClip
{
var id, _name, useHandCursor, gotoAndStop, level_num;
function LevelChooserButton () {
super();
id = Number(_name.slice(6));
refreshClip();
if (_root.ng.getLevelUnlocked(id, _root.game_save_id)) {
active = true;
useHandCursor = true;
gotoAndStop("up");
} else {
active = false;
useHandCursor = false;
gotoAndStop("off");
level_num.__set__text(" ");
}
refreshClip();
}
function refreshClip() {
if (active == true) {
level_num.__set__text(id.toString());
} else {
level_num.__set__text(" ");
}
}
function onRollOver() {
if (active == true) {
gotoAndStop("over");
} else {
gotoAndStop("off");
}
refreshClip();
}
function onRollOut() {
if (active == true) {
gotoAndStop("up");
} else {
gotoAndStop("off");
}
refreshClip();
}
function onRelease() {
if (active == true) {
gotoAndStop("up");
} else {
gotoAndStop("off");
}
refreshClip();
}
function onPress() {
if (active == true) {
if (!(_root.tt.img_holder instanceof MovieClip)) {
_root.selected_level = id;
_root.score = 0;
if (id == "1") {
_root.tt.doTween("story");
} else {
_root.tt.doTween("game", 5329233);
}
}
} else {
gotoAndStop("off");
}
refreshClip();
}
var active = true;
}
Symbol 1336 MovieClip [__Packages.com.nitrome.highscore.HiscoreLine] Frame 0
class com.nitrome.highscore.HiscoreLine extends MovieClip
{
var _visible, _name, rank_text, name_text, _parent, score_text;
function HiscoreLine () {
super();
_visible = true;
}
function displayData(rank, nametext, scoretext) {
trace(_name + " displayData:");
rank_text.__set__text(String(rank + "."));
name_text.__set__text(nametext.toUpperCase());
trace((((rank + ",") + nametext) + ",") + scoretext);
if (_parent.getZeroFill() == true) {
var _local7 = _parent.getMaxDigits();
var _local6 = scoretext.length;
var _local3 = _local7 - _local6;
var _local5 = scoretext;
var _local2 = 1;
while (_local2 <= _local3) {
_local5 = String("0" + _local5);
_local2++;
}
score_text.__set__text(_local5);
} else {
var _local5 = String(scoretext);
score_text.__set__text(_local5);
}
_visible = true;
updateAfterEvent();
}
function hideAway() {
trace(_name + " hideAway");
_visible = false;
}
}
Symbol 1337 MovieClip [__Packages.com.nitrome.highscore.HiscoreBoard] Frame 0
class com.nitrome.highscore.HiscoreBoard extends MovieClip
{
var start_interval, gotoAndStop, saved_min_rank, next_arrow, prev_arrow, gotoAndPlay;
function HiscoreBoard () {
super();
if (_root.ng.getNitrome() == true) {
start_interval = setInterval(this, "loadHiscores", 100, 1);
} else {
gotoAndStop("off");
}
}
function loadHiscores(min_rank) {
clearInterval(start_interval);
saved_min_rank = min_rank;
_root.lv_sender = new LoadVars();
_root.lv_receiver = new LoadVars();
_root.lv_receiver.onLoad = function (success) {
if (success) {
var _local2 = _root.lv_receiver.result;
_root.hiscoreboard.displayHiscores(_local2);
}
};
_root.lv_sender.min_rank = String(min_rank);
_root.lv_sender.game_name = _root.ng.getGameId();
_root.lv_sender.time_based = "0";
var _local3 = _root.ng.getRetrieveScoreUrl();
_root.lv_sender.sendAndLoad(_local3, _root.lv_receiver, "POST");
}
function displayHiscores(data_string) {
if (data_string != "0") {
var _local3 = 0;
while (_local3 <= 9) {
var _local4 = _root.ng.getHighscoreLine(data_string, _local3 + 1);
var _local5 = String("score_line_" + (_local3 + 1));
if (_local4 == null) {
this[_local5].hideAway();
} else {
this[_local5].displayData(saved_min_rank + _local3, _local4.username, _local4.score);
}
_local3++;
}
if (_root.ng.displayNextButton(data_string) == true) {
next_arrow.display();
} else {
next_arrow.hideAway();
}
if (_root.ng.displayPreviousButton(data_string) == true) {
prev_arrow.display();
} else {
prev_arrow.hideAway();
}
gotoAndPlay("reveal");
}
}
function getZeroFill() {
return(zero_fill);
}
function getMaxDigits() {
return(max_digits);
}
function shiftScoresPrev() {
gotoAndStop("loading");
var _local2 = saved_min_rank - 10;
if (_local2 < 1) {
_local2 = 1;
}
loadHiscores(_local2);
}
function shiftScoresNext() {
gotoAndStop("loading");
var _local2 = saved_min_rank + 10;
loadHiscores(_local2);
}
function displayHiscoresMTV(leaderboard) {
if (leaderboard.length > 0) {
var _local2 = 0;
while (_local2 <= 9) {
var _local3 = String(leaderboard[_local2].user_name);
var _local5 = String(leaderboard[_local2].score);
if (((_local3 == "") || (_local3 == undefined)) || (_local3 == "undefined")) {
this[String("score_line_" + (_local2 + 1))].hideAway();
next_arrow.hideAway();
} else {
var _local4 = String("score_line_" + (_local2 + 1));
this[_local4].displayData(saved_min_rank + _local2, _local3, _local5);
}
_local2++;
}
gotoAndPlay("reveal");
} else {
trace("no leaderboard data");
}
}
var max_digits = 8;
var zero_fill = false;
var max_rank = 100;
}
Symbol 1338 MovieClip [__Packages.com.nitrome.highscore.LetterButton] Frame 0
class com.nitrome.highscore.LetterButton extends MovieClip
{
var letter_text, _name, gotoAndStop, _parent;
function LetterButton () {
super();
letter_text = _name;
}
function onRollOver() {
gotoAndStop("_over");
}
function onRollOut() {
gotoAndStop("_up");
}
function onPress() {
_parent.addLetter(letter_text);
}
}
Symbol 1339 MovieClip [__Packages.com.nitrome.highscore.ScoreSubmitPanel] Frame 0
class com.nitrome.highscore.ScoreSubmitPanel extends MovieClip
{
var score_text, gotoAndStop, name_text, submit_button;
function ScoreSubmitPanel () {
super();
if (_root.ng.getNitrome() == true) {
score_text.text = String("YOUR SCORE IS " + _root.score);
} else {
gotoAndStop("off");
}
}
function addLetter(l) {
var _local3 = name_text.text;
if (_local3.length < MAX_LENGTH) {
var _local4 = _local3 + l;
name_text.text = _local4;
_root.name_entered = name_text.text.toUpperCase();
submit_button.enable();
}
}
function getNameText() {
return(String(name_text.text));
}
function clearName() {
submit_button.disable();
name_text.text = "";
_root.name_entered = name_text.text;
}
var MAX_LENGTH = 10;
}
Symbol 174 MovieClip [__Packages.mx.events.EventDispatcher] Frame 0
class mx.events.EventDispatcher
{
function EventDispatcher () {
}
static function _removeEventListener(queue, event, handler) {
if (queue != undefined) {
var _local4 = queue.length;
var _local1;
_local1 = 0;
while (_local1 < _local4) {
var _local2 = queue[_local1];
if (_local2 == handler) {
queue.splice(_local1, 1);
return(undefined);
}
_local1++;
}
}
}
static function initialize(object) {
if (_fEventDispatcher == undefined) {
_fEventDispatcher = new mx.events.EventDispatcher();
}
object.addEventListener = _fEventDispatcher.addEventListener;
object.removeEventListener = _fEventDispatcher.removeEventListener;
object.dispatchEvent = _fEventDispatcher.dispatchEvent;
object.dispatchQueue = _fEventDispatcher.dispatchQueue;
}
function dispatchQueue(queueObj, eventObj) {
var _local7 = "__q_" + eventObj.type;
var _local4 = queueObj[_local7];
if (_local4 != undefined) {
var _local5;
for (_local5 in _local4) {
var _local1 = _local4[_local5];
var _local3 = typeof(_local1);
if ((_local3 == "object") || (_local3 == "movieclip")) {
if (_local1.handleEvent != undefined) {
_local1.handleEvent(eventObj);
}
if (_local1[eventObj.type] != undefined) {
if (exceptions[eventObj.type] == undefined) {
_local1[eventObj.type](eventObj);
}
}
} else {
_local1.apply(queueObj, [eventObj]);
}
}
}
}
function dispatchEvent(eventObj) {
if (eventObj.target == undefined) {
eventObj.target = this;
}
this[eventObj.type + "Handler"](eventObj);
dispatchQueue(this, eventObj);
}
function addEventListener(event, handler) {
var _local3 = "__q_" + event;
if (this[_local3] == undefined) {
this[_local3] = new Array();
}
_global.ASSetPropFlags(this, _local3, 1);
_removeEventListener(this[_local3], event, handler);
this[_local3].push(handler);
}
function removeEventListener(event, handler) {
var _local2 = "__q_" + event;
_removeEventListener(this[_local2], event, handler);
}
static var _fEventDispatcher = undefined;
static var exceptions = {move:1, draw:1, load:1};
}
Symbol 175 MovieClip [__Packages.mx.events.UIEventDispatcher] Frame 0
class mx.events.UIEventDispatcher extends mx.events.EventDispatcher
{
var dispatchQueue, owner, __sentLoadEvent, __origAddEventListener;
function UIEventDispatcher () {
super();
}
static function addKeyEvents(obj) {
if (obj.keyHandler == undefined) {
var _local1 = (obj.keyHandler = new Object());
_local1.owner = obj;
_local1.onKeyDown = _fEventDispatcher.onKeyDown;
_local1.onKeyUp = _fEventDispatcher.onKeyUp;
}
Key.addListener(obj.keyHandler);
}
static function removeKeyEvents(obj) {
Key.removeListener(obj.keyHandler);
}
static function addLoadEvents(obj) {
if (obj.onLoad == undefined) {
obj.onLoad = _fEventDispatcher.onLoad;
obj.onUnload = _fEventDispatcher.onUnload;
if (obj.getBytesTotal() == obj.getBytesLoaded()) {
obj.doLater(obj, "onLoad");
}
}
}
static function removeLoadEvents(obj) {
delete obj.onLoad;
delete obj.onUnload;
}
static function initialize(obj) {
if (_fEventDispatcher == undefined) {
_fEventDispatcher = new mx.events.UIEventDispatcher();
}
obj.addEventListener = _fEventDispatcher.__addEventListener;
obj.__origAddEventListener = _fEventDispatcher.addEventListener;
obj.removeEventListener = _fEventDispatcher.removeEventListener;
obj.dispatchEvent = _fEventDispatcher.dispatchEvent;
obj.dispatchQueue = _fEventDispatcher.dispatchQueue;
}
function dispatchEvent(eventObj) {
if (eventObj.target == undefined) {
eventObj.target = this;
}
this[eventObj.type + "Handler"](eventObj);
dispatchQueue(mx.events.EventDispatcher, eventObj);
dispatchQueue(this, eventObj);
}
function onKeyDown(Void) {
owner.dispatchEvent({type:"keyDown", code:Key.getCode(), ascii:Key.getAscii(), shiftKey:Key.isDown(16), ctrlKey:Key.isDown(17)});
}
function onKeyUp(Void) {
owner.dispatchEvent({type:"keyUp", code:Key.getCode(), ascii:Key.getAscii(), shiftKey:Key.isDown(16), ctrlKey:Key.isDown(17)});
}
function onLoad(Void) {
if (__sentLoadEvent != true) {
dispatchEvent({type:"load"});
}
__sentLoadEvent = true;
}
function onUnload(Void) {
dispatchEvent({type:"unload"});
}
function __addEventListener(event, handler) {
__origAddEventListener(event, handler);
var _local3 = lowLevelEvents;
for (var _local5 in _local3) {
if (mx.events.UIEventDispatcher[_local5][event] != undefined) {
var _local2 = _local3[_local5][0];
mx.events.UIEventDispatcher[_local2](this);
}
}
}
function removeEventListener(event, handler) {
var _local6 = "__q_" + event;
mx.events.EventDispatcher._removeEventListener(this[_local6], event, handler);
if (this[_local6].length == 0) {
var _local2 = lowLevelEvents;
for (var _local5 in _local2) {
if (mx.events.UIEventDispatcher[_local5][event] != undefined) {
var _local3 = _local2[_local5][1];
mx.events.UIEventDispatcher[_local2[_local5][1]](this);
}
}
}
}
static var keyEvents = {keyDown:1, keyUp:1};
static var loadEvents = {load:1, unload:1};
static var lowLevelEvents = {keyEvents:["addKeyEvents", "removeKeyEvents"], loadEvents:["addLoadEvents", "removeLoadEvents"]};
static var _fEventDispatcher = undefined;
}
Symbol 176 MovieClip [__Packages.mx.skins.ColoredSkinElement] Frame 0
class mx.skins.ColoredSkinElement
{
var getStyle, _color, onEnterFrame;
function ColoredSkinElement () {
}
function setColor(c) {
if (c != undefined) {
var _local2 = new Color(this);
_local2.setRGB(c);
}
}
function draw(Void) {
setColor(getStyle(_color));
onEnterFrame = undefined;
}
function invalidateStyle(Void) {
onEnterFrame = draw;
}
static function setColorStyle(p, colorStyle) {
if (p._color == undefined) {
p._color = colorStyle;
}
p.setColor = mixins.setColor;
p.invalidateStyle = mixins.invalidateStyle;
p.draw = mixins.draw;
p.setColor(p.getStyle(colorStyle));
}
static var mixins = new mx.skins.ColoredSkinElement();
}
Symbol 177 MovieClip [__Packages.mx.core.ext.UIObjectExtensions] Frame 0
class mx.core.ext.UIObjectExtensions
{
function UIObjectExtensions () {
}
static function addGeometry(tf, ui) {
tf.addProperty("width", ui.__get__width, null);
tf.addProperty("height", ui.__get__height, null);
tf.addProperty("left", ui.__get__left, null);
tf.addProperty("x", ui.__get__x, null);
tf.addProperty("top", ui.__get__top, null);
tf.addProperty("y", ui.__get__y, null);
tf.addProperty("right", ui.__get__right, null);
tf.addProperty("bottom", ui.__get__bottom, null);
tf.addProperty("visible", ui.__get__visible, ui.__set__visible);
}
static function Extensions() {
if (bExtended == true) {
return(true);
}
bExtended = true;
var _local6 = mx.core.UIObject.prototype;
var _local9 = mx.skins.SkinElement.prototype;
addGeometry(_local9, _local6);
mx.events.UIEventDispatcher.initialize(_local6);
var _local13 = mx.skins.ColoredSkinElement;
mx.styles.CSSTextStyles.addTextStyles(_local6);
var _local5 = MovieClip.prototype;
_local5.getTopLevel = _local6.getTopLevel;
_local5.createLabel = _local6.createLabel;
_local5.createObject = _local6.createObject;
_local5.createClassObject = _local6.createClassObject;
_local5.createEmptyObject = _local6.createEmptyObject;
_local5.destroyObject = _local6.destroyObject;
_global.ASSetPropFlags(_local5, "getTopLevel", 1);
_global.ASSetPropFlags(_local5, "createLabel", 1);
_global.ASSetPropFlags(_local5, "createObject", 1);
_global.ASSetPropFlags(_local5, "createClassObject", 1);
_global.ASSetPropFlags(_local5, "createEmptyObject", 1);
_global.ASSetPropFlags(_local5, "destroyObject", 1);
_local5.__getTextFormat = _local6.__getTextFormat;
_local5._getTextFormat = _local6._getTextFormat;
_local5.getStyleName = _local6.getStyleName;
_local5.getStyle = _local6.getStyle;
_global.ASSetPropFlags(_local5, "__getTextFormat", 1);
_global.ASSetPropFlags(_local5, "_getTextFormat", 1);
_global.ASSetPropFlags(_local5, "getStyleName", 1);
_global.ASSetPropFlags(_local5, "getStyle", 1);
var _local7 = TextField.prototype;
addGeometry(_local7, _local6);
_local7.addProperty("enabled", function () {
return(this.__enabled);
}, function (x) {
this.__enabled = x;
this.invalidateStyle();
});
_local7.move = _local9.move;
_local7.setSize = _local9.setSize;
_local7.invalidateStyle = function () {
this.invalidateFlag = true;
};
_local7.draw = function () {
if (this.invalidateFlag) {
this.invalidateFlag = false;
var _local2 = this._getTextFormat();
this.setTextFormat(_local2);
this.setNewTextFormat(_local2);
this.embedFonts = _local2.embedFonts == true;
if (this.__text != undefined) {
if (this.text == "") {
this.text = this.__text;
}
delete this.__text;
}
this._visible = true;
}
};
_local7.setColor = function (color) {
this.textColor = color;
};
_local7.getStyle = _local5.getStyle;
_local7.__getTextFormat = _local6.__getTextFormat;
_local7.setValue = function (v) {
this.text = v;
};
_local7.getValue = function () {
return(this.text);
};
_local7.addProperty("value", function () {
return(this.getValue());
}, function (v) {
this.setValue(v);
});
_local7._getTextFormat = function () {
var _local2 = this.stylecache.tf;
if (_local2 != undefined) {
return(_local2);
}
_local2 = new TextFormat();
this.__getTextFormat(_local2);
this.stylecache.tf = _local2;
if (this.__enabled == false) {
if (this.enabledColor == undefined) {
var _local4 = this.getTextFormat();
this.enabledColor = _local4.color;
}
var _local3 = this.getStyle("disabledColor");
_local2.color = _local3;
} else if (this.enabledColor != undefined) {
if (_local2.color == undefined) {
_local2.color = this.enabledColor;
}
}
return(_local2);
};
_local7.getPreferredWidth = function () {
this.draw();
return(this.textWidth + 4);
};
_local7.getPreferredHeight = function () {
this.draw();
return(this.textHeight + 4);
};
TextFormat.prototype.getTextExtent2 = function (s) {
var _local3 = _root._getTextExtent;
if (_local3 == undefined) {
_root.createTextField("_getTextExtent", -2, 0, 0, 1000, 100);
_local3 = _root._getTextExtent;
_local3._visible = false;
}
_root._getTextExtent.text = s;
var _local4 = this.align;
this.align = "left";
_root._getTextExtent.setTextFormat(this);
this.align = _local4;
return({width:_local3.textWidth, height:_local3.textHeight});
};
if (_global.style == undefined) {
_global.style = new mx.styles.CSSStyleDeclaration();
_global.cascadingStyles = true;
_global.styles = new Object();
_global.skinRegistry = new Object();
if (_global._origWidth == undefined) {
_global.origWidth = Stage.width;
_global.origHeight = Stage.height;
}
}
var _local4 = _root;
while (_local4._parent != undefined) {
_local4 = _local4._parent;
}
_local4.addProperty("width", function () {
return(Stage.width);
}, null);
_local4.addProperty("height", function () {
return(Stage.height);
}, null);
_global.ASSetPropFlags(_local4, "width", 1);
_global.ASSetPropFlags(_local4, "height", 1);
return(true);
}
static var bExtended = false;
static var UIObjectExtended = Extensions();
static var UIObjectDependency = mx.core.UIObject;
static var SkinElementDependency = mx.skins.SkinElement;
static var CSSTextStylesDependency = mx.styles.CSSTextStyles;
static var UIEventDispatcherDependency = mx.events.UIEventDispatcher;
}
Symbol 178 MovieClip [__Packages.mx.skins.halo.Defaults] Frame 0
class mx.skins.halo.Defaults
{
var beginGradientFill, beginFill, moveTo, lineTo, curveTo, endFill;
function Defaults () {
}
static function setThemeDefaults() {
var _local2 = _global.style;
_local2.themeColor = 8453965 /* 0x80FF4D */;
_local2.disabledColor = 8684164 /* 0x848284 */;
_local2.modalTransparency = 0;
_local2.filled = true;
_local2.stroked = true;
_local2.strokeWidth = 1;
_local2.strokeColor = 0;
_local2.fillColor = 16777215 /* 0xFFFFFF */;
_local2.repeatInterval = 35;
_local2.repeatDelay = 500;
_local2.fontFamily = "_sans";
_local2.fontSize = 12;
_local2.selectionColor = 13500353 /* 0xCDFFC1 */;
_local2.rollOverColor = 14942166 /* 0xE3FFD6 */;
_local2.useRollOver = true;
_local2.backgroundDisabledColor = 14540253 /* 0xDDDDDD */;
_local2.selectionDisabledColor = 14540253 /* 0xDDDDDD */;
_local2.selectionDuration = 200;
_local2.openDuration = 250;
_local2.borderStyle = "inset";
_local2.color = 734012 /* 0x0B333C */;
_local2.textSelectedColor = 24371;
_local2.textRollOverColor = 2831164 /* 0x2B333C */;
_local2.textDisabledColor = 16777215 /* 0xFFFFFF */;
_local2.vGridLines = true;
_local2.hGridLines = false;
_local2.vGridLineColor = 6710886 /* 0x666666 */;
_local2.hGridLineColor = 6710886 /* 0x666666 */;
_local2.headerColor = 15395562 /* 0xEAEAEA */;
_local2.indentation = 17;
_local2.folderOpenIcon = "TreeFolderOpen";
_local2.folderClosedIcon = "TreeFolderClosed";
_local2.defaultLeafIcon = "TreeNodeIcon";
_local2.disclosureOpenIcon = "TreeDisclosureOpen";
_local2.disclosureClosedIcon = "TreeDisclosureClosed";
_local2.popupDuration = 150;
_local2.todayColor = 6710886 /* 0x666666 */;
_local2 = (_global.styles.ScrollSelectList = new mx.styles.CSSStyleDeclaration());
_local2.backgroundColor = 16777215 /* 0xFFFFFF */;
_local2.borderColor = 13290186 /* 0xCACACA */;
_local2.borderStyle = "inset";
_local2 = (_global.styles.ComboBox = new mx.styles.CSSStyleDeclaration());
_local2.borderStyle = "inset";
_local2 = (_global.styles.NumericStepper = new mx.styles.CSSStyleDeclaration());
_local2.textAlign = "center";
_local2 = (_global.styles.RectBorder = new mx.styles.CSSStyleDeclaration());
_local2.borderColor = 14015965 /* 0xD5DDDD */;
_local2.buttonColor = 7305079 /* 0x6F7777 */;
_local2.shadowColor = 15658734 /* 0xEEEEEE */;
_local2.highlightColor = 12897484 /* 0xC4CCCC */;
_local2.shadowCapColor = 14015965 /* 0xD5DDDD */;
_local2.borderCapColor = 9542041 /* 0x919999 */;
var _local4 = new Object();
_local4.borderColor = 16711680 /* 0xFF0000 */;
_local4.buttonColor = 16711680 /* 0xFF0000 */;
_local4.shadowColor = 16711680 /* 0xFF0000 */;
_local4.highlightColor = 16711680 /* 0xFF0000 */;
_local4.shadowCapColor = 16711680 /* 0xFF0000 */;
_local4.borderCapColor = 16711680 /* 0xFF0000 */;
mx.core.UIComponent.prototype.origBorderStyles = _local4;
var _local3;
_local3 = (_global.styles.TextInput = new mx.styles.CSSStyleDeclaration());
_local3.backgroundColor = 16777215 /* 0xFFFFFF */;
_local3.borderStyle = "inset";
_global.styles.TextArea = _global.styles.TextInput;
_local3 = (_global.styles.Window = new mx.styles.CSSStyleDeclaration());
_local3.borderStyle = "default";
_local3 = (_global.styles.windowStyles = new mx.styles.CSSStyleDeclaration());
_local3.fontWeight = "bold";
_local3 = (_global.styles.dataGridStyles = new mx.styles.CSSStyleDeclaration());
_local3.fontWeight = "bold";
_local3 = (_global.styles.Alert = new mx.styles.CSSStyleDeclaration());
_local3.borderStyle = "alert";
_local3 = (_global.styles.ScrollView = new mx.styles.CSSStyleDeclaration());
_local3.borderStyle = "inset";
_local3 = (_global.styles.View = new mx.styles.CSSStyleDeclaration());
_local3.borderStyle = "none";
_local3 = (_global.styles.ProgressBar = new mx.styles.CSSStyleDeclaration());
_local3.color = 11187123 /* 0xAAB3B3 */;
_local3.fontWeight = "bold";
_local3 = (_global.styles.AccordionHeader = new mx.styles.CSSStyleDeclaration());
_local3.fontWeight = "bold";
_local3.fontSize = "11";
_local3 = (_global.styles.Accordion = new mx.styles.CSSStyleDeclaration());
_local3.borderStyle = "solid";
_local3.backgroundColor = 16777215 /* 0xFFFFFF */;
_local3.borderColor = 9081738 /* 0x8A938A */;
_local3.headerHeight = 22;
_local3.marginLeft = (_local3.marginRight = (_local3.marginTop = (_local3.marginBottom = -1)));
_local3.verticalGap = -1;
_local3 = (_global.styles.DateChooser = new mx.styles.CSSStyleDeclaration());
_local3.borderColor = 9542041 /* 0x919999 */;
_local3.headerColor = 16777215 /* 0xFFFFFF */;
_local3 = (_global.styles.CalendarLayout = new mx.styles.CSSStyleDeclaration());
_local3.fontSize = 10;
_local3.textAlign = "right";
_local3.color = 2831164 /* 0x2B333C */;
_local3 = (_global.styles.WeekDayStyle = new mx.styles.CSSStyleDeclaration());
_local3.fontWeight = "bold";
_local3.fontSize = 11;
_local3.textAlign = "center";
_local3.color = 2831164 /* 0x2B333C */;
_local3 = (_global.styles.TodayStyle = new mx.styles.CSSStyleDeclaration());
_local3.color = 16777215 /* 0xFFFFFF */;
_local3 = (_global.styles.HeaderDateText = new mx.styles.CSSStyleDeclaration());
_local3.fontSize = 12;
_local3.fontWeight = "bold";
_local3.textAlign = "center";
}
function drawRoundRect(x, y, w, h, r, c, alpha, rot, gradient, ratios) {
if (typeof(r) == "object") {
var _local18 = r.br;
var _local16 = r.bl;
var _local15 = r.tl;
var _local10 = r.tr;
} else {
var _local10 = r;
var _local15 = _local10;
var _local16 = _local15;
var _local18 = _local16;
}
if (typeof(c) == "object") {
if (typeof(alpha) != "object") {
var _local9 = [alpha, alpha];
} else {
var _local9 = alpha;
}
if (ratios == undefined) {
ratios = [0, 255];
}
var _local14 = h * 0.7;
if (typeof(rot) != "object") {
var _local11 = {matrixType:"box", x:-_local14, y:_local14, w:w * 2, h:h * 4, r:rot * 0.0174532925199433 /* Math.PI/180 */};
} else {
var _local11 = rot;
}
if (gradient == "radial") {
beginGradientFill("radial", c, _local9, ratios, _local11);
} else {
beginGradientFill("linear", c, _local9, ratios, _local11);
}
} else if (c != undefined) {
beginFill(c, alpha);
}
r = _local18;
var _local13 = r - (r * 0.707106781186547);
var _local12 = r - (r * 0.414213562373095);
moveTo(x + w, (y + h) - r);
lineTo(x + w, (y + h) - r);
curveTo(x + w, (y + h) - _local12, (x + w) - _local13, (y + h) - _local13);
curveTo((x + w) - _local12, y + h, (x + w) - r, y + h);
r = _local16;
_local13 = r - (r * 0.707106781186547);
_local12 = r - (r * 0.414213562373095);
lineTo(x + r, y + h);
curveTo(x + _local12, y + h, x + _local13, (y + h) - _local13);
curveTo(x, (y + h) - _local12, x, (y + h) - r);
r = _local15;
_local13 = r - (r * 0.707106781186547);
_local12 = r - (r * 0.414213562373095);
lineTo(x, y + r);
curveTo(x, y + _local12, x + _local13, y + _local13);
curveTo(x + _local12, y, x + r, y);
r = _local10;
_local13 = r - (r * 0.707106781186547);
_local12 = r - (r * 0.414213562373095);
lineTo((x + w) - r, y);
curveTo((x + w) - _local12, y, (x + w) - _local13, y + _local13);
curveTo(x + w, y + _local12, x + w, y + r);
lineTo(x + w, (y + h) - r);
if (c != undefined) {
endFill();
}
}
static function classConstruct() {
mx.core.ext.UIObjectExtensions.Extensions();
setThemeDefaults();
mx.core.UIObject.prototype.drawRoundRect = mx.skins.halo.Defaults.prototype.drawRoundRect;
return(true);
}
static var classConstructed = classConstruct();
static var CSSStyleDeclarationDependency = mx.styles.CSSStyleDeclaration;
static var UIObjectExtensionsDependency = mx.core.ext.UIObjectExtensions;
static var UIObjectDependency = mx.core.UIObject;
}
Symbol 179 MovieClip [__Packages.mx.managers.DepthManager] Frame 0
class mx.managers.DepthManager
{
var _childCounter, createClassObject, createObject, _parent, swapDepths, _topmost, getDepth;
function DepthManager () {
MovieClip.prototype.createClassChildAtDepth = createClassChildAtDepth;
MovieClip.prototype.createChildAtDepth = createChildAtDepth;
MovieClip.prototype.setDepthTo = setDepthTo;
MovieClip.prototype.setDepthAbove = setDepthAbove;
MovieClip.prototype.setDepthBelow = setDepthBelow;
MovieClip.prototype.findNextAvailableDepth = findNextAvailableDepth;
MovieClip.prototype.shuffleDepths = shuffleDepths;
MovieClip.prototype.getDepthByFlag = getDepthByFlag;
MovieClip.prototype.buildDepthTable = buildDepthTable;
_global.ASSetPropFlags(MovieClip.prototype, "createClassChildAtDepth", 1);
_global.ASSetPropFlags(MovieClip.prototype, "createChildAtDepth", 1);
_global.ASSetPropFlags(MovieClip.prototype, "setDepthTo", 1);
_global.ASSetPropFlags(MovieClip.prototype, "setDepthAbove", 1);
_global.ASSetPropFlags(MovieClip.prototype, "setDepthBelow", 1);
_global.ASSetPropFlags(MovieClip.prototype, "findNextAvailableDepth", 1);
_global.ASSetPropFlags(MovieClip.prototype, "shuffleDepths", 1);
_global.ASSetPropFlags(MovieClip.prototype, "getDepthByFlag", 1);
_global.ASSetPropFlags(MovieClip.prototype, "buildDepthTable", 1);
}
static function sortFunction(a, b) {
if (a.getDepth() > b.getDepth()) {
return(1);
}
return(-1);
}
static function test(depth) {
if (depth == reservedDepth) {
return(false);
}
return(true);
}
static function createClassObjectAtDepth(className, depthSpace, initObj) {
var _local1;
switch (depthSpace) {
case kCursor :
_local1 = holder.createClassChildAtDepth(className, kTopmost, initObj);
break;
case kTooltip :
_local1 = holder.createClassChildAtDepth(className, kTop, initObj);
break;
}
return(_local1);
}
static function createObjectAtDepth(linkageName, depthSpace, initObj) {
var _local1;
switch (depthSpace) {
case kCursor :
_local1 = holder.createChildAtDepth(linkageName, kTopmost, initObj);
break;
case kTooltip :
_local1 = holder.createChildAtDepth(linkageName, kTop, initObj);
break;
}
return(_local1);
}
function createClassChildAtDepth(className, depthFlag, initObj) {
if (_childCounter == undefined) {
_childCounter = 0;
}
var _local3 = buildDepthTable();
var _local2 = getDepthByFlag(depthFlag, _local3);
var _local5 = "down";
if (depthFlag == kBottom) {
_local5 = "up";
}
var _local6;
if (_local3[_local2] != undefined) {
_local6 = _local2;
_local2 = findNextAvailableDepth(_local2, _local3, _local5);
}
var _local4 = createClassObject(className, "depthChild" + (_childCounter++), _local2, initObj);
if (_local6 != undefined) {
_local3[_local2] = _local4;
shuffleDepths(_local4, _local6, _local3, _local5);
}
if (depthFlag == kTopmost) {
_local4._topmost = true;
}
return(_local4);
}
function createChildAtDepth(linkageName, depthFlag, initObj) {
if (_childCounter == undefined) {
_childCounter = 0;
}
var _local3 = buildDepthTable();
var _local2 = getDepthByFlag(depthFlag, _local3);
var _local5 = "down";
if (depthFlag == kBottom) {
_local5 = "up";
}
var _local6;
if (_local3[_local2] != undefined) {
_local6 = _local2;
_local2 = findNextAvailableDepth(_local2, _local3, _local5);
}
var _local4 = createObject(linkageName, "depthChild" + (_childCounter++), _local2, initObj);
if (_local6 != undefined) {
_local3[_local2] = _local4;
shuffleDepths(_local4, _local6, _local3, _local5);
}
if (depthFlag == kTopmost) {
_local4._topmost = true;
}
return(_local4);
}
function setDepthTo(depthFlag) {
var _local2 = _parent.buildDepthTable();
var _local3 = _parent.getDepthByFlag(depthFlag, _local2);
if (_local2[_local3] != undefined) {
shuffleDepths(MovieClip(this), _local3, _local2, undefined);
} else {
swapDepths(_local3);
}
if (depthFlag == kTopmost) {
_topmost = true;
} else {
delete _topmost;
}
}
function setDepthAbove(targetInstance) {
if (targetInstance._parent != _parent) {
return(undefined);
}
var _local2 = targetInstance.getDepth() + 1;
var _local3 = _parent.buildDepthTable();
if ((_local3[_local2] != undefined) && (getDepth() < _local2)) {
_local2 = _local2 - 1;
}
if (_local2 > highestDepth) {
_local2 = highestDepth;
}
if (_local2 == highestDepth) {
_parent.shuffleDepths(this, _local2, _local3, "down");
} else if (_local3[_local2] != undefined) {
_parent.shuffleDepths(this, _local2, _local3, undefined);
} else {
swapDepths(_local2);
}
}
function setDepthBelow(targetInstance) {
if (targetInstance._parent != _parent) {
return(undefined);
}
var _local6 = targetInstance.getDepth() - 1;
var _local3 = _parent.buildDepthTable();
if ((_local3[_local6] != undefined) && (getDepth() > _local6)) {
_local6 = _local6 + 1;
}
var _local4 = lowestDepth + numberOfAuthortimeLayers;
var _local5;
for (_local5 in _local3) {
var _local2 = _local3[_local5];
if (_local2._parent != undefined) {
_local4 = Math.min(_local4, _local2.getDepth());
}
}
if (_local6 < _local4) {
_local6 = _local4;
}
if (_local6 == _local4) {
_parent.shuffleDepths(this, _local6, _local3, "up");
} else if (_local3[_local6] != undefined) {
_parent.shuffleDepths(this, _local6, _local3, undefined);
} else {
swapDepths(_local6);
}
}
function findNextAvailableDepth(targetDepth, depthTable, direction) {
var _local5 = lowestDepth + numberOfAuthortimeLayers;
if (targetDepth < _local5) {
targetDepth = _local5;
}
if (depthTable[targetDepth] == undefined) {
return(targetDepth);
}
var _local1 = targetDepth;
var _local2 = targetDepth;
if (direction == "down") {
while (depthTable[_local2] != undefined) {
_local2--;
}
return(_local2);
}
while (depthTable[_local1] != undefined) {
_local1++;
}
return(_local1);
}
function shuffleDepths(subject, targetDepth, depthTable, direction) {
var _local9 = lowestDepth + numberOfAuthortimeLayers;
var _local8 = _local9;
var _local5;
for (_local5 in depthTable) {
var _local7 = depthTable[_local5];
if (_local7._parent != undefined) {
_local9 = Math.min(_local9, _local7.getDepth());
}
}
if (direction == undefined) {
if (subject.getDepth() > targetDepth) {
direction = "up";
} else {
direction = "down";
}
}
var _local1 = new Array();
for (_local5 in depthTable) {
var _local7 = depthTable[_local5];
if (_local7._parent != undefined) {
_local1.push(_local7);
}
}
_local1.sort(sortFunction);
if (direction == "up") {
var _local3;
var _local11;
do {
if (_local1.length <= 0) {
break;
}
_local3 = _local1.pop();
} while (_local3 != subject);
do {
if (_local1.length <= 0) {
break;
}
_local11 = subject.getDepth();
_local3 = _local1.pop();
var _local4 = _local3.getDepth();
if (_local11 > (_local4 + 1)) {
if (_local4 >= 0) {
subject.swapDepths(_local4 + 1);
} else if ((_local11 > _local8) && (_local4 < _local8)) {
subject.swapDepths(_local8);
}
}
subject.swapDepths(_local3);
} while (_local4 != targetDepth);
} else if (direction == "down") {
var _local3;
do {
if (_local1.length <= 0) {
break;
}
_local3 = _local1.shift();
} while (_local3 != subject);
do {
if (_local1.length <= 0) {
break;
}
var _local11 = _local3.getDepth();
_local3 = _local1.shift();
var _local4 = _local3.getDepth();
if ((_local11 < (_local4 - 1)) && (_local4 > 0)) {
subject.swapDepths(_local4 - 1);
}
subject.swapDepths(_local3);
} while (_local4 != targetDepth);
}
}
function getDepthByFlag(depthFlag, depthTable) {
var _local2 = 0;
if ((depthFlag == kTop) || (depthFlag == kNotopmost)) {
var _local5 = 0;
var _local7 = false;
var _local8;
for (_local8 in depthTable) {
var _local9 = depthTable[_local8];
var _local3 = typeof(_local9);
if ((_local3 == "movieclip") || ((_local3 == "object") && (_local9.__getTextFormat != undefined))) {
if (_local9.getDepth() <= highestDepth) {
if (!_local9._topmost) {
_local2 = Math.max(_local2, _local9.getDepth());
} else if (!_local7) {
_local5 = _local9.getDepth();
_local7 = true;
} else {
_local5 = Math.min(_local5, _local9.getDepth());
}
}
}
}
_local2 = _local2 + 20;
if (_local7) {
if (_local2 >= _local5) {
_local2 = _local5 - 1;
}
}
} else if (depthFlag == kBottom) {
for (var _local8 in depthTable) {
var _local9 = depthTable[_local8];
var _local3 = typeof(_local9);
if ((_local3 == "movieclip") || ((_local3 == "object") && (_local9.__getTextFormat != undefined))) {
if (_local9.getDepth() <= highestDepth) {
_local2 = Math.min(_local2, _local9.getDepth());
}
}
}
_local2 = _local2 - 20;
} else if (depthFlag == kTopmost) {
for (var _local8 in depthTable) {
var _local9 = depthTable[_local8];
var _local3 = typeof(_local9);
if ((_local3 == "movieclip") || ((_local3 == "object") && (_local9.__getTextFormat != undefined))) {
if (_local9.getDepth() <= highestDepth) {
_local2 = Math.max(_local2, _local9.getDepth());
}
}
}
_local2 = _local2 + 100;
}
if (_local2 >= highestDepth) {
_local2 = highestDepth;
}
var _local6 = lowestDepth + numberOfAuthortimeLayers;
for (var _local9 in depthTable) {
var _local4 = depthTable[_local9];
if (_local4._parent != undefined) {
_local6 = Math.min(_local6, _local4.getDepth());
}
}
if (_local2 <= _local6) {
_local2 = _local6;
}
return(_local2);
}
function buildDepthTable(Void) {
var _local5 = new Array();
var _local4;
for (_local4 in this) {
var _local2 = this[_local4];
var _local3 = typeof(_local2);
if ((_local3 == "movieclip") || ((_local3 == "object") && (_local2.__getTextFormat != undefined))) {
if (_local2._parent == this) {
_local5[_local2.getDepth()] = _local2;
}
}
}
return(_local5);
}
static var reservedDepth = 1048575;
static var highestDepth = 1048574;
static var lowestDepth = -16383;
static var numberOfAuthortimeLayers = 383;
static var kCursor = 101;
static var kTooltip = 102;
static var kTop = 201;
static var kBottom = 202;
static var kTopmost = 203;
static var kNotopmost = 204;
static var holder = _root.createEmptyMovieClip("reserved", reservedDepth);
static var __depthManager = new mx.managers.DepthManager();
}
Symbol 180 MovieClip [__Packages.mx.controls.SimpleButton] Frame 0
class mx.controls.SimpleButton extends mx.core.UIComponent
{
static var emphasizedStyleDeclaration;
var preset, boundingBox_mc, useHandCursor, skinName, linkLength, iconName, destroyObject, __width, _width, __height, _height, __emphaticStyleName, styleName, enabled, invalidate, pressFocus, dispatchEvent, autoRepeat, interval, getStyle, releaseFocus, createLabel, invalidateStyle;
function SimpleButton () {
super();
}
function init(Void) {
super.init();
if (preset == undefined) {
boundingBox_mc._visible = false;
boundingBox_mc._width = (boundingBox_mc._height = 0);
}
useHandCursor = false;
}
function createChildren(Void) {
if (preset != undefined) {
var _local2 = this[idNames[preset]];
this[refNames[preset]] = _local2;
skinName = _local2;
if (falseOverSkin.length == 0) {
rolloverSkin = fus;
}
if (falseOverIcon.length == 0) {
rolloverIcon = fui;
}
initializing = false;
} else if (__state == true) {
setStateVar(true);
} else {
if (falseOverSkin.length == 0) {
rolloverSkin = fus;
}
if (falseOverIcon.length == 0) {
rolloverIcon = fui;
}
}
}
function setIcon(tag, linkageName) {
return(setSkin(tag + 8, linkageName));
}
function changeIcon(tag, linkageName) {
linkLength = linkageName.length;
var _local2 = stateNames[tag] + "Icon";
this[_local2] = linkageName;
this[idNames[tag + 8]] = _local2;
setStateVar(getState());
}
function changeSkin(tag, linkageName) {
var _local2 = stateNames[tag] + "Skin";
this[_local2] = linkageName;
this[idNames[tag]] = _local2;
setStateVar(getState());
}
function viewIcon(varName) {
var _local4 = varName + "Icon";
var _local3 = this[_local4];
if (typeof(_local3) == "string") {
var _local5 = _local3;
if (__emphasized) {
if (this[_local3 + "Emphasized"].length > 0) {
_local3 = _local3 + "Emphasized";
}
}
if (this[_local3].length == 0) {
return(undefined);
}
_local3 = setIcon(tagMap[_local5], this[_local3]);
if ((_local3 == undefined) && (_global.isLivePreview)) {
_local3 = setIcon(0, "ButtonIcon");
}
this[_local4] = _local3;
}
iconName._visible = false;
iconName = _local3;
iconName._visible = true;
}
function removeIcons() {
var _local3 = 0;
while (_local3 < 2) {
var _local2 = 8;
while (_local2 < 16) {
destroyObject(idNames[_local2]);
this[stateNames[_local2 - 8] + "Icon"] = "";
_local2++;
}
_local3++;
}
refresh();
}
function setSkin(tag, linkageName, initobj) {
var _local3 = super.setSkin(tag, linkageName, ((initobj != undefined) ? (initobj) : ({styleName:this})));
calcSize(tag, _local3);
return(_local3);
}
function calcSize(Void) {
__width = _width;
__height = _height;
}
function viewSkin(varName, initObj) {
var _local3 = varName + "Skin";
var _local2 = this[_local3];
if (typeof(_local2) == "string") {
var _local4 = _local2;
if (__emphasized) {
if (this[_local2 + "Emphasized"].length > 0) {
_local2 = _local2 + "Emphasized";
}
}
if (this[_local2].length == 0) {
return(undefined);
}
_local2 = setSkin(tagMap[_local4], this[_local2], ((initObj != undefined) ? (initObj) : ({styleName:this})));
this[_local3] = _local2;
}
skinName._visible = false;
skinName = _local2;
skinName._visible = true;
}
function showEmphasized(e) {
if (e && (!__emphatic)) {
if (emphasizedStyleDeclaration != undefined) {
__emphaticStyleName = styleName;
styleName = emphasizedStyleDeclaration;
}
__emphatic = true;
} else {
if (__emphatic) {
styleName = __emphaticStyleName;
}
__emphatic = false;
}
}
function refresh(Void) {
var _local2 = getState();
if (enabled == false) {
viewIcon("disabled");
viewSkin("disabled");
} else {
viewSkin(phase);
viewIcon(phase);
}
setView(phase == "down");
iconName.enabled = enabled;
}
function setView(offset) {
if (iconName == undefined) {
return(undefined);
}
var _local2 = (offset ? (btnOffset) : 0);
iconName._x = ((__width - iconName._width) / 2) + _local2;
iconName._y = ((__height - iconName._height) / 2) + _local2;
}
function setStateVar(state) {
if (state) {
if (trueOverSkin.length == 0) {
rolloverSkin = tus;
} else {
rolloverSkin = trs;
}
if (trueOverIcon.length == 0) {
rolloverIcon = tui;
} else {
rolloverIcon = tri;
}
upSkin = tus;
downSkin = tds;
disabledSkin = dts;
upIcon = tui;
downIcon = tdi;
disabledIcon = dti;
} else {
if (falseOverSkin.length == 0) {
rolloverSkin = fus;
} else {
rolloverSkin = frs;
}
if (falseOverIcon.length == 0) {
rolloverIcon = fui;
} else {
rolloverIcon = fri;
}
upSkin = fus;
downSkin = fds;
disabledSkin = dfs;
upIcon = fui;
downIcon = fdi;
disabledIcon = dfi;
}
__state = state;
}
function setState(state) {
if (state != __state) {
setStateVar(state);
invalidate();
}
}
function size(Void) {
refresh();
}
function draw(Void) {
if (initializing) {
initializing = false;
skinName.visible = true;
iconName.visible = true;
}
size();
}
function getState(Void) {
return(__state);
}
function setToggle(val) {
__toggle = val;
if (__toggle == false) {
setState(false);
}
}
function getToggle(Void) {
return(__toggle);
}
function set toggle(val) {
setToggle(val);
//return(toggle);
}
function get toggle() {
return(getToggle());
}
function set value(val) {
setSelected(val);
//return(value);
}
function get value() {
return(getSelected());
}
function set selected(val) {
setSelected(val);
//return(selected);
}
function get selected() {
return(getSelected());
}
function setSelected(val) {
if (__toggle) {
setState(val);
} else {
setState((initializing ? (val) : (__state)));
}
}
function getSelected() {
return(__state);
}
function setEnabled(val) {
if (enabled != val) {
super.setEnabled(val);
invalidate();
}
}
function onPress(Void) {
pressFocus();
phase = "down";
refresh();
dispatchEvent({type:"buttonDown"});
if (autoRepeat) {
interval = setInterval(this, "onPressDelay", getStyle("repeatDelay"));
}
}
function onPressDelay(Void) {
dispatchEvent({type:"buttonDown"});
if (autoRepeat) {
clearInterval(interval);
interval = setInterval(this, "onPressRepeat", getStyle("repeatInterval"));
}
}
function onPressRepeat(Void) {
dispatchEvent({type:"buttonDown"});
updateAfterEvent();
}
function onRelease(Void) {
releaseFocus();
phase = "rollover";
if (interval != undefined) {
clearInterval(interval);
delete interval;
}
if (getToggle()) {
setState(!getState());
} else {
refresh();
}
dispatchEvent({type:"click"});
}
function onDragOut(Void) {
phase = "up";
refresh();
dispatchEvent({type:"buttonDragOut"});
}
function onDragOver(Void) {
if (phase != "up") {
onPress();
return(undefined);
}
phase = "down";
refresh();
}
function onReleaseOutside(Void) {
releaseFocus();
phase = "up";
if (interval != undefined) {
clearInterval(interval);
delete interval;
}
}
function onRollOver(Void) {
phase = "rollover";
refresh();
}
function onRollOut(Void) {
phase = "up";
refresh();
}
function getLabel(Void) {
return(fui.text);
}
function setLabel(val) {
if (typeof(fui) == "string") {
createLabel("fui", 8, val);
fui.styleName = this;
} else {
fui.text = val;
}
var _local4 = fui._getTextFormat();
var _local2 = _local4.getTextExtent2(val);
fui._width = _local2.width + 5;
fui._height = _local2.height + 5;
iconName = fui;
setView(__state);
}
function get emphasized() {
return(__emphasized);
}
function set emphasized(val) {
__emphasized = val;
var _local2 = 0;
while (_local2 < 8) {
this[idNames[_local2]] = stateNames[_local2] + "Skin";
if (typeof(this[idNames[_local2 + 8]]) == "movieclip") {
this[idNames[_local2 + 8]] = stateNames[_local2] + "Icon";
}
_local2++;
}
showEmphasized(__emphasized);
setStateVar(__state);
invalidateStyle();
//return(emphasized);
}
function keyDown(e) {
if (e.code == 32) {
onPress();
}
}
function keyUp(e) {
if (e.code == 32) {
onRelease();
}
}
function onKillFocus(newFocus) {
super.onKillFocus();
if (phase != "up") {
phase = "up";
refresh();
}
}
static var symbolName = "SimpleButton";
static var symbolOwner = mx.controls.SimpleButton;
static var version = "2.0.2.126";
var className = "SimpleButton";
var style3dInset = 4;
var btnOffset = 1;
var __toggle = false;
var __state = false;
var __emphasized = false;
var __emphatic = false;
static var falseUp = 0;
static var falseDown = 1;
static var falseOver = 2;
static var falseDisabled = 3;
static var trueUp = 4;
static var trueDown = 5;
static var trueOver = 6;
static var trueDisabled = 7;
var falseUpSkin = "SimpleButtonUp";
var falseDownSkin = "SimpleButtonIn";
var falseOverSkin = "";
var falseDisabledSkin = "SimpleButtonUp";
var trueUpSkin = "SimpleButtonIn";
var trueDownSkin = "";
var trueOverSkin = "";
var trueDisabledSkin = "SimpleButtonIn";
var falseUpIcon = "";
var falseDownIcon = "";
var falseOverIcon = "";
var falseDisabledIcon = "";
var trueUpIcon = "";
var trueDownIcon = "";
var trueOverIcon = "";
var trueDisabledIcon = "";
var phase = "up";
var fui = "falseUpIcon";
var fus = "falseUpSkin";
var fdi = "falseDownIcon";
var fds = "falseDownSkin";
var frs = "falseOverSkin";
var fri = "falseOverIcon";
var dfi = "falseDisabledIcon";
var dfs = "falseDisabledSkin";
var tui = "trueUpIcon";
var tus = "trueUpSkin";
var tdi = "trueDownIcon";
var tds = "trueDownSkin";
var trs = "trueOverSkin";
var tri = "trueOverIcon";
var dts = "trueDisabledSkin";
var dti = "trueDisabledIcon";
var rolloverSkin = mx.controls.SimpleButton.prototype.frs;
var rolloverIcon = mx.controls.SimpleButton.prototype.fri;
var upSkin = mx.controls.SimpleButton.prototype.fus;
var downSkin = mx.controls.SimpleButton.prototype.fds;
var disabledSkin = mx.controls.SimpleButton.prototype.dfs;
var upIcon = mx.controls.SimpleButton.prototype.fui;
var downIcon = mx.controls.SimpleButton.prototype.fdi;
var disabledIcon = mx.controls.SimpleButton.prototype.dfi;
var initializing = true;
var idNames = ["fus", "fds", "frs", "dfs", "tus", "tds", "trs", "dts", "fui", "fdi", "fri", "dfi", "tui", "tdi", "tri", "dti"];
var stateNames = ["falseUp", "falseDown", "falseOver", "falseDisabled", "trueUp", "trueDown", "trueOver", "trueDisabled"];
var refNames = ["upSkin", "downSkin", "rolloverSkin", "disabledSkin"];
var tagMap = {falseUpSkin:0, falseDownSkin:1, falseOverSkin:2, falseDisabledSkin:3, trueUpSkin:4, trueDownSkin:5, trueOverSkin:6, trueDisabledSkin:7, falseUpIcon:0, falseDownIcon:1, falseOverIcon:2, falseDisabledIcon:3, trueUpIcon:4, trueDownIcon:5, trueOverIcon:6, trueDisabledIcon:7};
}
Symbol 181 MovieClip [__Packages.mx.managers.SystemManager] Frame 0
class mx.managers.SystemManager
{
static var _xAddEventListener, addEventListener, __addEventListener, _xRemoveEventListener, removeEventListener, __removeEventListener, form, __screen, dispatchEvent;
function SystemManager () {
}
static function init(Void) {
if (_initialized == false) {
_initialized = true;
mx.events.EventDispatcher.initialize(mx.managers.SystemManager);
Mouse.addListener(mx.managers.SystemManager);
Stage.addListener(mx.managers.SystemManager);
_xAddEventListener = addEventListener;
addEventListener = __addEventListener;
_xRemoveEventListener = removeEventListener;
removeEventListener = __removeEventListener;
}
}
static function addFocusManager(f) {
form = f;
f.focusManager.activate();
}
static function removeFocusManager(f) {
}
static function onMouseDown(Void) {
var _local1 = form;
_local1.focusManager._onMouseDown();
}
static function onResize(Void) {
var _local7 = Stage.width;
var _local6 = Stage.height;
var _local9 = _global.origWidth;
var _local8 = _global.origHeight;
var _local3 = Stage.align;
var _local5 = (_local9 - _local7) / 2;
var _local4 = (_local8 - _local6) / 2;
if (_local3 == "T") {
_local4 = 0;
} else if (_local3 == "B") {
_local4 = _local8 - _local6;
} else if (_local3 == "L") {
_local5 = 0;
} else if (_local3 == "R") {
_local5 = _local9 - _local7;
} else if (_local3 == "LT") {
_local4 = 0;
_local5 = 0;
} else if (_local3 == "TR") {
_local4 = 0;
_local5 = _local9 - _local7;
} else if (_local3 == "LB") {
_local4 = _local8 - _local6;
_local5 = 0;
} else if (_local3 == "RB") {
_local4 = _local8 - _local6;
_local5 = _local9 - _local7;
}
if (__screen == undefined) {
__screen = new Object();
}
__screen.x = _local5;
__screen.y = _local4;
__screen.width = _local7;
__screen.height = _local6;
_root.focusManager.relocate();
dispatchEvent({type:"resize"});
}
static function get screen() {
init();
if (__screen == undefined) {
onResize();
}
return(__screen);
}
static var _initialized = false;
static var idleFrames = 0;
static var isMouseDown = false;
static var forms = new Array();
}
Symbol 182 MovieClip [__Packages.mx.managers.FocusManager] Frame 0
class mx.managers.FocusManager extends mx.core.UIComponent
{
var __defaultPushButton, defPushButton, form, move, tabEnabled, _width, _height, _x, _y, _alpha, _parent, tabCapture, watch, lastMouse, _visible, lastFocus, doLater, lastSelFocus, cancelAllDoLaters, _searchKey, _lastTarget, _firstNode, _nextIsNext, _nextNode, _lastx, _prevNode, _needPrev, _foundList, _prevObj, _nextObj, _firstObj, _lastObj, _lastNode, lastTabFocus, findFocusFromObject;
function FocusManager () {
super();
}
function get defaultPushButton() {
return(__defaultPushButton);
}
function set defaultPushButton(x) {
if (x != __defaultPushButton) {
__defaultPushButton.__set__emphasized(false);
__defaultPushButton = x;
defPushButton = x;
x.__set__emphasized(true);
}
//return(defaultPushButton);
}
function getMaxTabIndex(o) {
var _local3 = 0;
var _local6;
for (_local6 in o) {
var _local2 = o[_local6];
if (_local2._parent == o) {
if (_local2.tabIndex != undefined) {
if (_local2.tabIndex > _local3) {
_local3 = _local2.tabIndex;
}
}
if (_local2.tabChildren == true) {
var _local4 = getMaxTabIndex(_local2);
if (_local4 > _local3) {
_local3 = _local4;
}
}
}
}
return(_local3);
}
function getNextTabIndex(Void) {
return(getMaxTabIndex(form) + 1);
}
function get nextTabIndex() {
return(getNextTabIndex());
}
function relocate(Void) {
var _local2 = mx.managers.SystemManager.__get__screen();
move(_local2.x - 1, _local2.y - 1);
}
function init(Void) {
super.init();
tabEnabled = false;
_width = (_height = 1);
_x = (_y = -1);
_alpha = 0;
_parent.focusManager = this;
_parent.tabChildren = true;
_parent.tabEnabled = false;
form = _parent;
_parent.addEventListener("hide", this);
_parent.addEventListener("reveal", this);
mx.managers.SystemManager.init();
mx.managers.SystemManager.addFocusManager(form);
tabCapture.tabIndex = 0;
watch("enabled", enabledChanged);
Selection.addListener(this);
lastMouse = new Object();
_global.ASSetPropFlags(_parent, "focusManager", 1);
_global.ASSetPropFlags(_parent, "tabChildren", 1);
_global.ASSetPropFlags(_parent, "tabEnabled", 1);
}
function enabledChanged(id, oldValue, newValue) {
_visible = newValue;
return(newValue);
}
function activate(Void) {
Key.addListener(this);
activated = (_visible = true);
if (lastFocus != undefined) {
bNeedFocus = true;
if (!mx.managers.SystemManager.isMouseDown) {
doLater(this, "restoreFocus");
}
}
}
function deactivate(Void) {
Key.removeListener(this);
activated = (_visible = false);
var _local2 = getSelectionFocus();
var _local3 = getActualFocus(_local2);
if (isOurFocus(_local3)) {
lastSelFocus = _local2;
lastFocus = _local3;
}
cancelAllDoLaters();
}
function isOurFocus(o) {
if (o.focusManager == this) {
return(true);
}
while (o != undefined) {
if (o.focusManager != undefined) {
return(false);
}
if (o._parent == _parent) {
return(true);
}
o = o._parent;
}
return(false);
}
function onSetFocus(o, n) {
if (n == null) {
if (activated) {
bNeedFocus = true;
}
} else {
var _local2 = getFocus();
if (isOurFocus(_local2)) {
bNeedFocus = false;
lastFocus = _local2;
lastSelFocus = n;
}
}
}
function restoreFocus(Void) {
var _local2 = lastSelFocus.hscroll;
if (_local2 != undefined) {
var _local5 = lastSelFocus.scroll;
var _local4 = lastSelFocus.background;
}
lastFocus.setFocus();
var _local3 = Selection;
Selection.setSelection(_local3.lastBeginIndex, _local3.lastEndIndex);
if (_local2 != undefined) {
lastSelFocus.scroll = _local5;
lastSelFocus.hscroll = _local2;
lastSelFocus.background = _local4;
}
}
function onUnload(Void) {
mx.managers.SystemManager.removeFocusManager(form);
}
function setFocus(o) {
if (o == null) {
Selection.setFocus(null);
} else if (o.setFocus == undefined) {
Selection.setFocus(o);
} else {
o.setFocus();
}
}
function getActualFocus(o) {
var _local1 = o._parent;
while (_local1 != undefined) {
if (_local1.focusTextField != undefined) {
while (_local1.focusTextField != undefined) {
o = _local1;
_local1 = _local1._parent;
if (_local1 == undefined) {
return(undefined);
}
if (_local1.focusTextField == undefined) {
return(o);
}
}
}
if (_local1.tabEnabled != true) {
return(o);
}
o = _local1;
_local1 = o._parent;
}
return(undefined);
}
function getSelectionFocus() {
var m = Selection.getFocus();
var o = eval (m);
return(o);
}
function getFocus(Void) {
var _local2 = getSelectionFocus();
return(getActualFocus(_local2));
}
function walkTree(p, index, groupName, dir, lookup, firstChild) {
var _local5 = true;
var _local11;
for (_local11 in p) {
var _local2 = p[_local11];
if ((((_local2._parent == p) && (_local2.enabled != false)) && (_local2._visible != false)) && ((_local2.tabEnabled == true) || ((_local2.tabEnabled != false) && ((((((((_local2.onPress != undefined) || (_local2.onRelease != undefined)) || (_local2.onReleaseOutside != undefined)) || (_local2.onDragOut != undefined)) || (_local2.onDragOver != undefined)) || (_local2.onRollOver != undefined)) || (_local2.onRollOut != undefined)) || (_local2 instanceof TextField))))) {
if (_local2._searchKey == _searchKey) {
continue;
}
_local2._searchKey = _searchKey;
if (_local2 != _lastTarget) {
if (((_local2.groupName != undefined) || (groupName != undefined)) && (_local2.groupName == groupName)) {
continue;
}
if ((_local2 instanceof TextField) && (_local2.selectable == false)) {
continue;
}
if (_local5 || (((_local2.groupName != undefined) && (_local2.groupName == _firstNode.groupName)) && (_local2.selected == true))) {
if (firstChild) {
_firstNode = _local2;
firstChild = false;
}
}
if (_nextIsNext == true) {
if ((((_local2.groupName != undefined) && (_local2.groupName == _nextNode.groupName)) && (_local2.selected == true)) || ((_nextNode == undefined) && ((_local2.groupName == undefined) || ((_local2.groupName != undefined) && (_local2.groupName != groupName))))) {
_nextNode = _local2;
}
}
if ((_local2.groupName == undefined) || (groupName != _local2.groupName)) {
if (((_lastx.groupName != undefined) && (_local2.groupName == _lastx.groupName)) && (_lastx.selected == true)) {
} else {
_lastx = _local2;
}
}
} else {
_prevNode = _lastx;
_needPrev = false;
_nextIsNext = true;
}
if (_local2.tabIndex != undefined) {
if (_local2.tabIndex == index) {
if (_foundList[_local2._name] == undefined) {
if (_needPrev) {
_prevObj = _local2;
_needPrev = false;
}
_nextObj = _local2;
}
}
if (dir && (_local2.tabIndex > index)) {
if (((_nextObj == undefined) || ((_nextObj.tabIndex > _local2.tabIndex) && (((_local2.groupName == undefined) || (_nextObj.groupName == undefined)) || (_local2.groupName != _nextObj.groupName)))) || ((((_nextObj.groupName != undefined) && (_nextObj.groupName == _local2.groupName)) && (_nextObj.selected != true)) && ((_local2.selected == true) || (_nextObj.tabIndex > _local2.tabIndex)))) {
_nextObj = _local2;
}
} else if ((!dir) && (_local2.tabIndex < index)) {
if (((_prevObj == undefined) || ((_prevObj.tabIndex < _local2.tabIndex) && (((_local2.groupName == undefined) || (_prevObj.groupName == undefined)) || (_local2.groupName != _prevObj.groupName)))) || ((((_prevObj.groupName != undefined) && (_prevObj.groupName == _local2.groupName)) && (_prevObj.selected != true)) && ((_local2.selected == true) || (_prevObj.tabIndex < _local2.tabIndex)))) {
_prevObj = _local2;
}
}
if (((_firstObj == undefined) || ((_local2.tabIndex < _firstObj.tabIndex) && (((_local2.groupName == undefined) || (_firstObj.groupName == undefined)) || (_local2.groupName != _firstObj.groupName)))) || ((((_firstObj.groupName != undefined) && (_firstObj.groupName == _local2.groupName)) && (_firstObj.selected != true)) && ((_local2.selected == true) || (_local2.tabIndex < _firstObj.tabIndex)))) {
_firstObj = _local2;
}
if (((_lastObj == undefined) || ((_local2.tabIndex > _lastObj.tabIndex) && (((_local2.groupName == undefined) || (_lastObj.groupName == undefined)) || (_local2.groupName != _lastObj.groupName)))) || ((((_lastObj.groupName != undefined) && (_lastObj.groupName == _local2.groupName)) && (_lastObj.selected != true)) && ((_local2.selected == true) || (_local2.tabIndex > _lastObj.tabIndex)))) {
_lastObj = _local2;
}
}
if (_local2.tabChildren) {
getTabCandidateFromChildren(_local2, index, groupName, dir, _local5 && (firstChild));
}
_local5 = false;
} else if (((_local2._parent == p) && (_local2.tabChildren == true)) && (_local2._visible != false)) {
if (_local2 == _lastTarget) {
if (_local2._searchKey == _searchKey) {
continue;
}
_local2._searchKey = _searchKey;
if (_prevNode == undefined) {
var _local3 = _lastx;
var _local7 = false;
while (_local3 != undefined) {
if (_local3 == _local2) {
_local7 = true;
break;
}
_local3 = _local3._parent;
}
if (_local7 == false) {
_prevNode = _lastx;
}
}
_needPrev = false;
if (_nextNode == undefined) {
_nextIsNext = true;
}
} else if (!((_local2.focusManager != undefined) && (_local2.focusManager._parent == _local2))) {
if (_local2._searchKey == _searchKey) {
continue;
}
_local2._searchKey = _searchKey;
getTabCandidateFromChildren(_local2, index, groupName, dir, _local5 && (firstChild));
}
_local5 = false;
}
}
_lastNode = _lastx;
if (lookup) {
if (p._parent != undefined) {
if (p != _parent) {
if ((_prevNode == undefined) && (dir)) {
_needPrev = true;
} else if ((_nextNode == undefined) && (!dir)) {
_nextIsNext = false;
}
_lastTarget = _lastTarget._parent;
getTabCandidate(p._parent, index, groupName, dir, true);
}
}
}
}
function getTabCandidate(o, index, groupName, dir, firstChild) {
var _local2;
var _local3 = true;
if (o == _parent) {
_local2 = o;
_local3 = false;
} else {
_local2 = o._parent;
if (_local2 == undefined) {
_local2 = o;
_local3 = false;
}
}
walkTree(_local2, index, groupName, dir, _local3, firstChild);
}
function getTabCandidateFromChildren(o, index, groupName, dir, firstChild) {
walkTree(o, index, groupName, dir, false, firstChild);
}
function getFocusManagerFromObject(o) {
while (o != undefined) {
if (o.focusManager != undefined) {
return(o.focusManager);
}
o = o._parent;
}
return(undefined);
}
function tabHandler(Void) {
bDrawFocus = true;
var _local5 = getSelectionFocus();
var _local4 = getActualFocus(_local5);
if (_local4 != _local5) {
_local5 = _local4;
}
if (getFocusManagerFromObject(_local5) != this) {
_local5 == undefined;
}
if (_local5 == undefined) {
_local5 = form;
} else if (_local5.tabIndex != undefined) {
if ((_foundList != undefined) || (_foundList.tabIndex != _local5.tabIndex)) {
_foundList = new Object();
_foundList.tabIndex = _local5.tabIndex;
}
_foundList[_local5._name] = _local5;
}
var _local3 = Key.isDown(16) != true;
_searchKey = getTimer();
_needPrev = true;
_nextIsNext = false;
_lastx = undefined;
_firstNode = undefined;
_lastNode = undefined;
_nextNode = undefined;
_prevNode = undefined;
_firstObj = undefined;
_lastObj = undefined;
_nextObj = undefined;
_prevObj = undefined;
_lastTarget = _local5;
var _local6 = _local5;
getTabCandidate(_local6, ((_local5.tabIndex == undefined) ? 0 : (_local5.tabIndex)), _local5.groupName, _local3, true);
var _local2;
if (_local3) {
if (_nextObj != undefined) {
_local2 = _nextObj;
} else {
_local2 = _firstObj;
}
} else if (_prevObj != undefined) {
_local2 = _prevObj;
} else {
_local2 = _lastObj;
}
if (_local2.tabIndex != _local5.tabIndex) {
_foundList = new Object();
_foundList.tabIndex = _local2.tabIndex;
_foundList[_local2._name] = _local2;
} else {
if (_foundList == undefined) {
_foundList = new Object();
_foundList.tabIndex = _local2.tabIndex;
}
_foundList[_local2._name] = _local2;
}
if (_local2 == undefined) {
if (_local3 == false) {
if (_nextNode != undefined) {
_local2 = _nextNode;
} else {
_local2 = _firstNode;
}
} else if ((_prevNode == undefined) || (_local5 == form)) {
_local2 = _lastNode;
} else {
_local2 = _prevNode;
}
}
if (_local2 == undefined) {
return(undefined);
}
lastTabFocus = _local2;
setFocus(_local2);
if (_local2.emphasized != undefined) {
if (defPushButton != undefined) {
_local5 = defPushButton;
defPushButton = mx.controls.SimpleButton(_local2);
_local5.emphasized = false;
_local2.emphasized = true;
}
} else if ((defPushButton != undefined) && (defPushButton != __defaultPushButton)) {
_local5 = defPushButton;
defPushButton = __defaultPushButton;
_local5.emphasized = false;
__defaultPushButton.__set__emphasized(true);
}
}
function onKeyDown(Void) {
mx.managers.SystemManager.idleFrames = 0;
if (defaultPushButtonEnabled) {
if (Key.getCode() == 13) {
if (defaultPushButton != undefined) {
doLater(this, "sendDefaultPushButtonEvent");
}
}
}
}
function sendDefaultPushButtonEvent(Void) {
defPushButton.dispatchEvent({type:"click"});
}
function getMousedComponentFromChildren(x, y, o) {
for (var _local7 in o) {
var _local2 = o[_local7];
if (((_local2._visible && (_local2.enabled)) && (_local2._parent == o)) && (_local2._searchKey != _searchKey)) {
_local2._searchKey = _searchKey;
if (_local2.hitTest(x, y, true)) {
if ((_local2.onPress != undefined) || (_local2.onRelease != undefined)) {
return(_local2);
}
var _local3 = getMousedComponentFromChildren(x, y, _local2);
if (_local3 != undefined) {
return(_local3);
}
return(_local2);
}
}
}
return(undefined);
}
function mouseActivate(Void) {
if (!bNeedFocus) {
return(undefined);
}
_searchKey = getTimer();
var _local2 = getMousedComponentFromChildren(lastMouse.x, lastMouse.y, form);
if (_local2 instanceof mx.core.UIComponent) {
return(undefined);
}
_local2 = findFocusFromObject(_local2);
if (_local2 == lastFocus) {
return(undefined);
}
if (_local2 == undefined) {
doLater(this, "restoreFocus");
return(undefined);
}
var _local3 = _local2.hscroll;
if (_local3 != undefined) {
var _local6 = _local2.scroll;
var _local5 = _local2.background;
}
setFocus(_local2);
var _local4 = Selection;
Selection.setSelection(_local4.lastBeginIndex, _local4.lastEndIndex);
if (_local3 != undefined) {
_local2.scroll = _local6;
_local2.hscroll = _local3;
_local2.background = _local5;
}
}
function _onMouseDown(Void) {
bDrawFocus = false;
if (lastFocus != undefined) {
lastFocus.drawFocus(false);
}
mx.managers.SystemManager.idleFrames = 0;
var _local3 = Selection;
_local3.lastBeginIndex = Selection.getBeginIndex();
_local3.lastEndIndex = Selection.getEndIndex();
lastMouse.x = _root._xmouse;
lastMouse.y = _root._ymouse;
_root.localToGlobal(lastMouse);
}
function onMouseUp(Void) {
if (_visible) {
doLater(this, "mouseActivate");
}
}
function handleEvent(e) {
if (e.type == "reveal") {
mx.managers.SystemManager.activate(form);
} else {
mx.managers.SystemManager.deactivate(form);
}
}
static function enableFocusManagement() {
if (!initialized) {
initialized = true;
Object.registerClass("FocusManager", mx.managers.FocusManager);
if (_root.focusManager == undefined) {
_root.createClassObject(mx.managers.FocusManager, "focusManager", mx.managers.DepthManager.highestDepth--);
}
}
}
static var symbolName = "FocusManager";
static var symbolOwner = mx.managers.FocusManager;
static var version = "2.0.2.126";
var className = "FocusManager";
var bNeedFocus = false;
var bDrawFocus = false;
var defaultPushButtonEnabled = true;
var activated = true;
static var initialized = false;
static var UIObjectExtensionsDependency = mx.core.ext.UIObjectExtensions;
}
Symbol 183 MovieClip [__Packages.mx.skins.halo.FocusRect] Frame 0
class mx.skins.halo.FocusRect extends mx.skins.SkinElement
{
var boundingBox_mc, _xscale, _yscale, clear, beginFill, drawRoundRect, endFill, _visible;
function FocusRect () {
super();
boundingBox_mc._visible = false;
boundingBox_mc._width = (boundingBox_mc._height = 0);
}
function draw(o) {
o.adjustFocusRect();
}
function setSize(w, h, r, a, rectCol) {
_xscale = (_yscale = 100);
clear();
if (typeof(r) == "object") {
r.br = ((r.br > 2) ? (r.br - 2) : 0);
r.bl = ((r.bl > 2) ? (r.bl - 2) : 0);
r.tr = ((r.tr > 2) ? (r.tr - 2) : 0);
r.tl = ((r.tl > 2) ? (r.tl - 2) : 0);
beginFill(rectCol, a * 0.3);
drawRoundRect(0, 0, w, h, r);
drawRoundRect(2, 2, w - 4, h - 4, r);
endFill();
r.br = ((r.br > 1) ? (r.br + 1) : 0);
r.bl = ((r.bl > 1) ? (r.bl + 1) : 0);
r.tr = ((r.tr > 1) ? (r.tr + 1) : 0);
r.tl = ((r.tl > 1) ? (r.tl + 1) : 0);
beginFill(rectCol, a * 0.3);
drawRoundRect(1, 1, w - 2, h - 2, r);
r.br = ((r.br > 1) ? (r.br - 1) : 0);
r.bl = ((r.bl > 1) ? (r.bl - 1) : 0);
r.tr = ((r.tr > 1) ? (r.tr - 1) : 0);
r.tl = ((r.tl > 1) ? (r.tl - 1) : 0);
drawRoundRect(2, 2, w - 4, h - 4, r);
endFill();
} else {
var _local5;
if (r != 0) {
_local5 = r - 2;
} else {
_local5 = 0;
}
beginFill(rectCol, a * 0.3);
drawRoundRect(0, 0, w, h, r);
drawRoundRect(2, 2, w - 4, h - 4, _local5);
endFill();
beginFill(rectCol, a * 0.3);
if (r != 0) {
_local5 = r - 2;
r = r - 1;
} else {
_local5 = 0;
r = 0;
}
drawRoundRect(1, 1, w - 2, h - 2, r);
drawRoundRect(2, 2, w - 4, h - 4, _local5);
endFill();
}
}
function handleEvent(e) {
if (e.type == "unload") {
_visible = true;
} else if (e.type == "resize") {
e.target.adjustFocusRect();
} else if (e.type == "move") {
e.target.adjustFocusRect();
}
}
static function classConstruct() {
mx.core.UIComponent.prototype.drawFocus = function (focused) {
var _local2 = this._parent.focus_mc;
if (!focused) {
_local2._visible = false;
this.removeEventListener("unload", _local2);
this.removeEventListener("move", _local2);
this.removeEventListener("resize", _local2);
} else {
if (_local2 == undefined) {
_local2 = this._parent.createChildAtDepth("FocusRect", mx.managers.DepthManager.kTop);
_local2.tabEnabled = false;
this._parent.focus_mc = _local2;
} else {
_local2._visible = true;
}
_local2.draw(this);
if (_local2.getDepth() < this.getDepth()) {
_local2.setDepthAbove(this);
}
this.addEventListener("unload", _local2);
this.addEventListener("move", _local2);
this.addEventListener("resize", _local2);
}
};
mx.core.UIComponent.prototype.adjustFocusRect = function () {
var _local2 = this.getStyle("themeColor");
if (_local2 == undefined) {
_local2 = 8453965 /* 0x80FF4D */;
}
var _local3 = this._parent.focus_mc;
_local3.setSize(this.width + 4, this.height + 4, 0, 100, _local2);
_local3.move(this.x - 2, this.y - 2);
};
TextField.prototype.drawFocus = mx.core.UIComponent.prototype.drawFocus;
TextField.prototype.adjustFocusRect = mx.core.UIComponent.prototype.adjustFocusRect;
mx.skins.halo.FocusRect.prototype.drawRoundRect = mx.skins.halo.Defaults.prototype.drawRoundRect;
return(true);
}
static var classConstructed = classConstruct();
static var DefaultsDependency = mx.skins.halo.Defaults;
static var UIComponentDependency = mx.core.UIComponent;
}
Symbol 184 MovieClip [__Packages.mx.managers.OverlappedWindows] Frame 0
class mx.managers.OverlappedWindows
{
function OverlappedWindows () {
}
static function checkIdle(Void) {
if (mx.managers.SystemManager.idleFrames > 10) {
mx.managers.SystemManager.dispatchEvent({type:"idle"});
} else {
mx.managers.SystemManager.idleFrames++;
}
}
static function __addEventListener(e, o, l) {
if (e == "idle") {
if (mx.managers.SystemManager.interval == undefined) {
mx.managers.SystemManager.interval = setInterval(mx.managers.SystemManager.checkIdle, 100);
}
}
mx.managers.SystemManager._xAddEventListener(e, o, l);
}
static function __removeEventListener(e, o, l) {
if (e == "idle") {
if (mx.managers.SystemManager._xRemoveEventListener(e, o, l) == 0) {
clearInterval(mx.managers.SystemManager.interval);
}
} else {
mx.managers.SystemManager._xRemoveEventListener(e, o, l);
}
}
static function onMouseDown(Void) {
mx.managers.SystemManager.idleFrames = 0;
mx.managers.SystemManager.isMouseDown = true;
var _local5 = _root;
var _local3;
var _local8 = _root._xmouse;
var _local7 = _root._ymouse;
if (mx.managers.SystemManager.form.modalWindow == undefined) {
if (mx.managers.SystemManager.forms.length > 1) {
var _local6 = mx.managers.SystemManager.forms.length;
var _local4;
_local4 = 0;
while (_local4 < _local6) {
var _local2 = mx.managers.SystemManager.forms[_local4];
if (_local2._visible) {
if (_local2.hitTest(_local8, _local7)) {
if (_local3 == undefined) {
_local3 = _local2.getDepth();
_local5 = _local2;
} else if (_local3 < _local2.getDepth()) {
_local3 = _local2.getDepth();
_local5 = _local2;
}
}
}
_local4++;
}
if (_local5 != mx.managers.SystemManager.form) {
mx.managers.SystemManager.activate(_local5);
}
}
}
var _local9 = mx.managers.SystemManager.form;
_local9.focusManager._onMouseDown();
}
static function onMouseMove(Void) {
mx.managers.SystemManager.idleFrames = 0;
}
static function onMouseUp(Void) {
mx.managers.SystemManager.isMouseDown = false;
mx.managers.SystemManager.idleFrames = 0;
}
static function activate(f) {
if (mx.managers.SystemManager.form != undefined) {
if ((mx.managers.SystemManager.form != f) && (mx.managers.SystemManager.forms.length > 1)) {
var _local1 = mx.managers.SystemManager.form;
_local1.focusManager.deactivate();
}
}
mx.managers.SystemManager.form = f;
f.focusManager.activate();
}
static function deactivate(f) {
if (mx.managers.SystemManager.form != undefined) {
if ((mx.managers.SystemManager.form == f) && (mx.managers.SystemManager.forms.length > 1)) {
var _local5 = mx.managers.SystemManager.form;
_local5.focusManager.deactivate();
var _local3 = mx.managers.SystemManager.forms.length;
var _local1;
var _local2;
_local1 = 0;
while (_local1 < _local3) {
if (mx.managers.SystemManager.forms[_local1] == f) {
_local1 = _local1 + 1;
while (_local1 < _local3) {
if (mx.managers.SystemManager.forms[_local1]._visible == true) {
_local2 = mx.managers.SystemManager.forms[_local1];
}
_local1++;
}
mx.managers.SystemManager.form = _local2;
break;
}
if (mx.managers.SystemManager.forms[_local1]._visible == true) {
_local2 = mx.managers.SystemManager.forms[_local1];
}
_local1++;
}
_local5 = mx.managers.SystemManager.form;
_local5.focusManager.activate();
}
}
}
static function addFocusManager(f) {
mx.managers.SystemManager.forms.push(f);
mx.managers.SystemManager.activate(f);
}
static function removeFocusManager(f) {
var _local3 = mx.managers.SystemManager.forms.length;
var _local1;
_local1 = 0;
while (_local1 < _local3) {
if (mx.managers.SystemManager.forms[_local1] == f) {
if (mx.managers.SystemManager.form == f) {
mx.managers.SystemManager.deactivate(f);
}
mx.managers.SystemManager.forms.splice(_local1, 1);
return(undefined);
}
_local1++;
}
}
static function enableOverlappedWindows() {
if (!initialized) {
initialized = true;
mx.managers.SystemManager.checkIdle = checkIdle;
mx.managers.SystemManager.__addEventListener = __addEventListener;
mx.managers.SystemManager.__removeEventListener = __removeEventListener;
mx.managers.SystemManager.onMouseDown = onMouseDown;
mx.managers.SystemManager.onMouseMove = onMouseMove;
mx.managers.SystemManager.onMouseUp = onMouseUp;
mx.managers.SystemManager.activate = activate;
mx.managers.SystemManager.deactivate = deactivate;
mx.managers.SystemManager.addFocusManager = addFocusManager;
mx.managers.SystemManager.removeFocusManager = removeFocusManager;
}
}
static var initialized = false;
static var SystemManagerDependency = mx.managers.SystemManager;
}
Symbol 185 MovieClip [__Packages.mx.styles.CSSSetStyle] Frame 0
class mx.styles.CSSSetStyle
{
var styleName, stylecache, _color, setColor, invalidateStyle;
function CSSSetStyle () {
}
function _setStyle(styleProp, newValue) {
this[styleProp] = newValue;
if (mx.styles.StyleManager.TextStyleMap[styleProp] != undefined) {
if (styleProp == "color") {
if (isNaN(newValue)) {
newValue = mx.styles.StyleManager.getColorName(newValue);
this[styleProp] = newValue;
if (newValue == undefined) {
return(undefined);
}
}
}
_level0.changeTextStyleInChildren(styleProp);
return(undefined);
}
if (mx.styles.StyleManager.isColorStyle(styleProp)) {
if (isNaN(newValue)) {
newValue = mx.styles.StyleManager.getColorName(newValue);
this[styleProp] = newValue;
if (newValue == undefined) {
return(undefined);
}
}
if (styleProp == "themeColor") {
var _local7 = mx.styles.StyleManager.colorNames.haloBlue;
var _local6 = mx.styles.StyleManager.colorNames.haloGreen;
var _local8 = mx.styles.StyleManager.colorNames.haloOrange;
var _local4 = {};
_local4[_local7] = 12188666 /* 0xB9FBFA */;
_local4[_local6] = 13500353 /* 0xCDFFC1 */;
_local4[_local8] = 16766319 /* 0xFFD56F */;
var _local5 = {};
_local5[_local7] = 13958653 /* 0xD4FDFD */;
_local5[_local6] = 14942166 /* 0xE3FFD6 */;
_local5[_local8] = 16772787 /* 0xFFEEB3 */;
var _local9 = _local4[newValue];
var _local10 = _local5[newValue];
if (_local9 == undefined) {
_local9 = newValue;
}
if (_local10 == undefined) {
_local10 = newValue;
}
setStyle("selectionColor", _local9);
setStyle("rollOverColor", _local10);
}
_level0.changeColorStyleInChildren(styleName, styleProp, newValue);
} else {
if ((styleProp == "backgroundColor") && (isNaN(newValue))) {
newValue = mx.styles.StyleManager.getColorName(newValue);
this[styleProp] = newValue;
if (newValue == undefined) {
return(undefined);
}
}
_level0.notifyStyleChangeInChildren(styleName, styleProp, newValue);
}
}
function changeTextStyleInChildren(styleProp) {
var _local4 = getTimer();
var _local5;
for (_local5 in this) {
var _local2 = this[_local5];
if (_local2._parent == this) {
if (_local2.searchKey != _local4) {
if (_local2.stylecache != undefined) {
delete _local2.stylecache.tf;
delete _local2.stylecache[styleProp];
}
_local2.invalidateStyle(styleProp);
_local2.changeTextStyleInChildren(styleProp);
_local2.searchKey = _local4;
}
}
}
}
function changeColorStyleInChildren(sheetName, colorStyle, newValue) {
var _local6 = getTimer();
var _local7;
for (_local7 in this) {
var _local2 = this[_local7];
if (_local2._parent == this) {
if (_local2.searchKey != _local6) {
if (((_local2.getStyleName() == sheetName) || (sheetName == undefined)) || (sheetName == "_global")) {
if (_local2.stylecache != undefined) {
delete _local2.stylecache[colorStyle];
}
if (typeof(_local2._color) == "string") {
if (_local2._color == colorStyle) {
var _local4 = _local2.getStyle(colorStyle);
if (colorStyle == "color") {
if (stylecache.tf.color != undefined) {
stylecache.tf.color = _local4;
}
}
_local2.setColor(_local4);
}
} else if (_local2._color[colorStyle] != undefined) {
if (typeof(_local2) != "movieclip") {
_local2._parent.invalidateStyle();
} else {
_local2.invalidateStyle(colorStyle);
}
}
}
_local2.changeColorStyleInChildren(sheetName, colorStyle, newValue);
_local2.searchKey = _local6;
}
}
}
}
function notifyStyleChangeInChildren(sheetName, styleProp, newValue) {
var _local5 = getTimer();
var _local6;
for (_local6 in this) {
var _local2 = this[_local6];
if (_local2._parent == this) {
if (_local2.searchKey != _local5) {
if (((_local2.styleName == sheetName) || ((_local2.styleName != undefined) && (typeof(_local2.styleName) == "movieclip"))) || (sheetName == undefined)) {
if (_local2.stylecache != undefined) {
delete _local2.stylecache[styleProp];
delete _local2.stylecache.tf;
}
delete _local2.enabledColor;
_local2.invalidateStyle(styleProp);
}
_local2.notifyStyleChangeInChildren(sheetName, styleProp, newValue);
_local2.searchKey = _local5;
}
}
}
}
function setStyle(styleProp, newValue) {
if (stylecache != undefined) {
delete stylecache[styleProp];
delete stylecache.tf;
}
this[styleProp] = newValue;
if (mx.styles.StyleManager.isColorStyle(styleProp)) {
if (isNaN(newValue)) {
newValue = mx.styles.StyleManager.getColorName(newValue);
this[styleProp] = newValue;
if (newValue == undefined) {
return(undefined);
}
}
if (styleProp == "themeColor") {
var _local10 = mx.styles.StyleManager.colorNames.haloBlue;
var _local9 = mx.styles.StyleManager.colorNames.haloGreen;
var _local11 = mx.styles.StyleManager.colorNames.haloOrange;
var _local6 = {};
_local6[_local10] = 12188666 /* 0xB9FBFA */;
_local6[_local9] = 13500353 /* 0xCDFFC1 */;
_local6[_local11] = 16766319 /* 0xFFD56F */;
var _local7 = {};
_local7[_local10] = 13958653 /* 0xD4FDFD */;
_local7[_local9] = 14942166 /* 0xE3FFD6 */;
_local7[_local11] = 16772787 /* 0xFFEEB3 */;
var _local12 = _local6[newValue];
var _local13 = _local7[newValue];
if (_local12 == undefined) {
_local12 = newValue;
}
if (_local13 == undefined) {
_local13 = newValue;
}
setStyle("selectionColor", _local12);
setStyle("rollOverColor", _local13);
}
if (typeof(_color) == "string") {
if (_color == styleProp) {
if (styleProp == "color") {
if (stylecache.tf.color != undefined) {
stylecache.tf.color = newValue;
}
}
setColor(newValue);
}
} else if (_color[styleProp] != undefined) {
invalidateStyle(styleProp);
}
changeColorStyleInChildren(undefined, styleProp, newValue);
} else {
if ((styleProp == "backgroundColor") && (isNaN(newValue))) {
newValue = mx.styles.StyleManager.getColorName(newValue);
this[styleProp] = newValue;
if (newValue == undefined) {
return(undefined);
}
}
invalidateStyle(styleProp);
}
if (mx.styles.StyleManager.isInheritingStyle(styleProp) || (styleProp == "styleName")) {
var _local8;
var _local5 = newValue;
if (styleProp == "styleName") {
_local8 = ((typeof(newValue) == "string") ? (_global.styles[newValue]) : (_local5));
_local5 = _local8.themeColor;
if (_local5 != undefined) {
_local8.rollOverColor = (_local8.selectionColor = _local5);
}
}
notifyStyleChangeInChildren(undefined, styleProp, newValue);
}
}
static function enableRunTimeCSS() {
}
static function classConstruct() {
var _local2 = MovieClip.prototype;
var _local3 = mx.styles.CSSSetStyle.prototype;
mx.styles.CSSStyleDeclaration.prototype.setStyle = _local3._setStyle;
_local2.changeTextStyleInChildren = _local3.changeTextStyleInChildren;
_local2.changeColorStyleInChildren = _local3.changeColorStyleInChildren;
_local2.notifyStyleChangeInChildren = _local3.notifyStyleChangeInChildren;
_local2.setStyle = _local3.setStyle;
_global.ASSetPropFlags(_local2, "changeTextStyleInChildren", 1);
_global.ASSetPropFlags(_local2, "changeColorStyleInChildren", 1);
_global.ASSetPropFlags(_local2, "notifyStyleChangeInChildren", 1);
_global.ASSetPropFlags(_local2, "setStyle", 1);
var _local4 = TextField.prototype;
_local4.setStyle = _local2.setStyle;
_local4.changeTextStyleInChildren = _local3.changeTextStyleInChildren;
return(true);
}
static var classConstructed = classConstruct();
static var CSSStyleDeclarationDependency = mx.styles.CSSStyleDeclaration;
}
Symbol 186 MovieClip [__Packages.mx.core.ext.UIComponentExtensions] Frame 0
class mx.core.ext.UIComponentExtensions
{
function UIComponentExtensions () {
}
static function Extensions() {
if (bExtended == true) {
return(true);
}
bExtended = true;
TextField.prototype.setFocus = function () {
Selection.setFocus(this);
};
TextField.prototype.onSetFocus = function (oldFocus) {
if (this.tabEnabled != false) {
if (this.getFocusManager().bDrawFocus) {
this.drawFocus(true);
}
}
};
TextField.prototype.onKillFocus = function (oldFocus) {
if (this.tabEnabled != false) {
this.drawFocus(false);
}
};
TextField.prototype.drawFocus = mx.core.UIComponent.prototype.drawFocus;
TextField.prototype.getFocusManager = mx.core.UIComponent.prototype.getFocusManager;
mx.managers.OverlappedWindows.enableOverlappedWindows();
mx.styles.CSSSetStyle.enableRunTimeCSS();
mx.managers.FocusManager.enableFocusManagement();
}
static var bExtended = false;
static var UIComponentExtended = Extensions();
static var UIComponentDependency = mx.core.UIComponent;
static var FocusManagerDependency = mx.managers.FocusManager;
static var OverlappedWindowsDependency = mx.managers.OverlappedWindows;
}
Symbol 194 MovieClip [transition_tween] Frame 1
#initclip 99
Object.registerClass("transition_tween", com.nitrome.game.TransitionTween);
#endinitclip
Symbol 207 MovieClip [preloader] Frame 1
#initclip 98
Object.registerClass("preloader", com.nitrome.game.Preloader);
#endinitclip
stop();
Instance of Symbol 169 MovieClip [StickyfeetFont] "load_text" in Symbol 207 MovieClip [preloader] Frame 1
//component parameters
onClipEvent (construct) {
align = "center";
line_spacing = 16;
text = "loading: 00";
tracking = -1;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Symbol 207 MovieClip [preloader] Frame 2
stop();
Symbol 207 MovieClip [preloader] Frame 3
stop();
Symbol 207 MovieClip [preloader] Frame 4
stop();
Symbol 207 MovieClip [preloader] Frame 5
stop();
Symbol 207 MovieClip [preloader] Frame 6
stop();
Symbol 207 MovieClip [preloader] Frame 7
stop();
Symbol 207 MovieClip [preloader] Frame 8
stop();
Symbol 207 MovieClip [preloader] Frame 9
stop();
Symbol 207 MovieClip [preloader] Frame 10
stop();
Symbol 207 MovieClip [preloader] Frame 11
stop();
Symbol 207 MovieClip [preloader] Frame 12
stop();
Symbol 207 MovieClip [preloader] Frame 13
stop();
Symbol 207 MovieClip [preloader] Frame 14
stop();
Symbol 207 MovieClip [preloader] Frame 15
stop();
Symbol 207 MovieClip [preloader] Frame 16
stop();
Symbol 207 MovieClip [preloader] Frame 17
stop();
Symbol 207 MovieClip [preloader] Frame 18
stop();
Symbol 207 MovieClip [preloader] Frame 19
stop();
Symbol 207 MovieClip [preloader] Frame 20
stop();
Symbol 207 MovieClip [preloader] Frame 21
stop();
Symbol 207 MovieClip [preloader] Frame 22
stop();
Symbol 207 MovieClip [preloader] Frame 23
stop();
Symbol 207 MovieClip [preloader] Frame 24
stop();
Symbol 207 MovieClip [preloader] Frame 25
stop();
Symbol 207 MovieClip [preloader] Frame 26
stop();
Instance of Symbol 169 MovieClip [StickyfeetFont] in Symbol 210 MovieClip Frame 1
//component parameters
onClipEvent (construct) {
align = "center";
line_spacing = 16;
text = "Norman was now a superhero - with a really big head!";
tracking = -1;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Instance of Symbol 169 MovieClip [StickyfeetFont] in Symbol 213 MovieClip Frame 1
//component parameters
onClipEvent (construct) {
align = "center";
line_spacing = 16;
text = "But a bolt of cosmic lightning struck and sent him to a| crazy world where everyone walked on walls.";
tracking = -1;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Instance of Symbol 169 MovieClip [StickyfeetFont] in Symbol 216 MovieClip Frame 1
//component parameters
onClipEvent (construct) {
align = "center";
line_spacing = 16;
text = "Mild mannered Norman Noggin was just a regular Joe.|staying up late reading comics.";
tracking = -1;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Symbol 217 MovieClip [story_clip] Frame 324
stop();
Symbol 222 MovieClip [next_arrow_button] Frame 1
#initclip 178
Object.registerClass("next_arrow_button", com.nitrome.highscore.ArrowButton);
#endinitclip
stop();
Instance of Symbol 169 MovieClip [StickyfeetFont] in Symbol 222 MovieClip [next_arrow_button] Frame 1
//component parameters
onClipEvent (construct) {
align = "center";
line_spacing = 16;
text = "next";
tracking = -1;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Symbol 223 MovieClip [prev_arrow_button] Frame 1
#initclip 100
Object.registerClass("prev_arrow_button", com.nitrome.highscore.ArrowButton);
#endinitclip
stop();
Instance of Symbol 169 MovieClip [StickyfeetFont] in Symbol 223 MovieClip [prev_arrow_button] Frame 1
//component parameters
onClipEvent (construct) {
align = "center";
line_spacing = 16;
text = "previous";
tracking = -1;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Symbol 224 MovieClip [submit_button] Frame 1
#initclip 101
Object.registerClass("submit_button", com.nitrome.highscore.SubmitButton);
#endinitclip
stop();
Instance of Symbol 169 MovieClip [StickyfeetFont] in Symbol 224 MovieClip [submit_button] Frame 1
//component parameters
onClipEvent (construct) {
align = "center";
line_spacing = 16;
text = "submit";
tracking = -1;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Symbol 225 MovieClip [clear_button] Frame 1
#initclip 102
Object.registerClass("clear_button", com.nitrome.highscore.ClearButton);
#endinitclip
stop();
Instance of Symbol 169 MovieClip [StickyfeetFont] in Symbol 225 MovieClip [clear_button] Frame 1
//component parameters
onClipEvent (construct) {
align = "center";
line_spacing = 16;
text = "clear";
tracking = -1;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Symbol 226 MovieClip [continue_end_button] Frame 1
#initclip 103
Object.registerClass("continue_end_button", com.nitrome.game.ContinueEndButton);
#endinitclip
stop();
Instance of Symbol 169 MovieClip [StickyfeetFont] in Symbol 226 MovieClip [continue_end_button] Frame 1
//component parameters
onClipEvent (construct) {
align = "center";
line_spacing = 16;
text = "continue";
tracking = -1;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Symbol 227 MovieClip [try_again_button] Frame 1
#initclip 104
Object.registerClass("try_again_button", com.nitrome.game.TryAgainButton);
#endinitclip
stop();
Instance of Symbol 169 MovieClip [StickyfeetFont] in Symbol 227 MovieClip [try_again_button] Frame 1
//component parameters
onClipEvent (construct) {
align = "center";
line_spacing = 16;
text = "try again";
tracking = -1;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Symbol 228 MovieClip [submit_score_game] Frame 1
#initclip 105
Object.registerClass("submit_score_game", com.nitrome.game.SubmitScoreButton);
#endinitclip
stop();
Instance of Symbol 169 MovieClip [StickyfeetFont] in Symbol 228 MovieClip [submit_score_game] Frame 1
//component parameters
onClipEvent (construct) {
align = "center";
line_spacing = 16;
text = "submit score";
tracking = -1;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Symbol 229 MovieClip [level_select_button] Frame 1
#initclip 106
Object.registerClass("level_select_button", com.nitrome.game.QuitGameButton);
#endinitclip
stop();
Instance of Symbol 169 MovieClip [StickyfeetFont] in Symbol 229 MovieClip [level_select_button] Frame 1
//component parameters
onClipEvent (construct) {
align = "center";
line_spacing = 16;
text = "level select";
tracking = -1;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Symbol 230 MovieClip [next_level_button] Frame 1
#initclip 107
Object.registerClass("next_level_button", com.nitrome.game.NextLevelButton);
#endinitclip
stop();
Instance of Symbol 169 MovieClip [StickyfeetFont] in Symbol 230 MovieClip [next_level_button] Frame 1
//component parameters
onClipEvent (construct) {
align = "center";
line_spacing = 16;
text = "next level";
tracking = -1;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Symbol 231 MovieClip [continue_game_button] Frame 1
#initclip 108
Object.registerClass("continue_game_button", com.nitrome.game.ContinueGameButton);
#endinitclip
stop();
Instance of Symbol 169 MovieClip [StickyfeetFont] in Symbol 231 MovieClip [continue_game_button] Frame 1
//component parameters
onClipEvent (construct) {
align = "center";
line_spacing = 16;
text = "continue";
tracking = -1;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Symbol 232 MovieClip [quit_game_button] Frame 1
#initclip 109
Object.registerClass("quit_game_button", com.nitrome.game.QuitGameButton);
#endinitclip
stop();
Instance of Symbol 169 MovieClip [StickyfeetFont] in Symbol 232 MovieClip [quit_game_button] Frame 1
//component parameters
onClipEvent (construct) {
align = "center";
line_spacing = 16;
text = "quit";
tracking = -1;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Symbol 233 MovieClip [back_button] Frame 1
#initclip 110
Object.registerClass("back_button", com.nitrome.game.BackButton);
#endinitclip
stop();
Instance of Symbol 169 MovieClip [StickyfeetFont] in Symbol 233 MovieClip [back_button] Frame 1
//component parameters
onClipEvent (construct) {
align = "center";
line_spacing = 16;
text = "back";
tracking = -1;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Symbol 234 MovieClip [view_scores_button] Frame 1
#initclip 111
Object.registerClass("view_scores_button", com.nitrome.game.ViewScoresButton);
#endinitclip
stop();
Instance of Symbol 169 MovieClip [StickyfeetFont] in Symbol 234 MovieClip [view_scores_button] Frame 1
//component parameters
onClipEvent (construct) {
align = "center";
line_spacing = 16;
text = "scores";
tracking = -1;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Symbol 235 MovieClip [help_button] Frame 1
#initclip 112
Object.registerClass("help_button", com.nitrome.game.HelpButton);
#endinitclip
stop();
Instance of Symbol 169 MovieClip [StickyfeetFont] in Symbol 235 MovieClip [help_button] Frame 1
//component parameters
onClipEvent (construct) {
align = "center";
line_spacing = 16;
text = "help";
tracking = -1;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Symbol 236 MovieClip [play_button] Frame 1
#initclip 113
Object.registerClass("play_button", com.nitrome.game.PlayButton);
#endinitclip
stop();
Instance of Symbol 169 MovieClip [StickyfeetFont] in Symbol 236 MovieClip [play_button] Frame 1
//component parameters
onClipEvent (construct) {
align = "center";
line_spacing = 16;
text = "play";
tracking = -1;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Symbol 237 MovieClip [credits_button] Frame 1
#initclip 114
Object.registerClass("credits_button", com.nitrome.game.CreditsButton);
#endinitclip
stop();
Instance of Symbol 169 MovieClip [StickyfeetFont] in Symbol 237 MovieClip [credits_button] Frame 1
//component parameters
onClipEvent (construct) {
align = "center";
line_spacing = 16;
text = "credits";
tracking = -1;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Symbol 241 MovieClip [scroll_checkered] Frame 1
#initclip 115
Object.registerClass("scroll_checkered", com.nitrome.stickyfeet.ScrollingBackground);
#endinitclip
Symbol 255 MovieClip [health_collect] Frame 20
this.removeMovieClip();
Symbol 258 MovieClip [shooty_debris_02] Frame 1
#initclip 116
Object.registerClass("shooty_debris_02", com.nitrome.stickyfeet.Debris);
#endinitclip
Symbol 261 MovieClip [shooty_debris_03] Frame 1
#initclip 117
Object.registerClass("shooty_debris_03", com.nitrome.stickyfeet.Debris);
#endinitclip
Symbol 264 MovieClip [shooty_debris_01] Frame 1
#initclip 118
Object.registerClass("shooty_debris_01", com.nitrome.stickyfeet.Debris);
#endinitclip
Symbol 267 MovieClip [punchy_debris_03] Frame 1
#initclip 119
Object.registerClass("punchy_debris_03", com.nitrome.stickyfeet.Debris);
#endinitclip
Symbol 270 MovieClip [punchy_debris_02] Frame 1
#initclip 120
Object.registerClass("punchy_debris_02", com.nitrome.stickyfeet.Debris);
#endinitclip
Symbol 273 MovieClip [punchy_debris_01] Frame 1
#initclip 121
Object.registerClass("punchy_debris_01", com.nitrome.stickyfeet.Debris);
#endinitclip
Symbol 286 MovieClip [fly_debris_03] Frame 1
#initclip 122
Object.registerClass("fly_debris_03", com.nitrome.stickyfeet.Debris);
#endinitclip
Symbol 289 MovieClip [fly_debris_02] Frame 1
#initclip 123
Object.registerClass("fly_debris_02", com.nitrome.stickyfeet.Debris);
#endinitclip
Symbol 292 MovieClip [fly_debris_01] Frame 1
#initclip 124
Object.registerClass("fly_debris_01", com.nitrome.stickyfeet.Debris);
#endinitclip
Symbol 295 MovieClip [rider_debris_04] Frame 1
#initclip 125
Object.registerClass("rider_debris_04", com.nitrome.stickyfeet.Debris);
#endinitclip
Symbol 298 MovieClip [rider_debris_03] Frame 1
#initclip 126
Object.registerClass("rider_debris_03", com.nitrome.stickyfeet.Debris);
#endinitclip
Symbol 301 MovieClip [rider_debris_02] Frame 1
#initclip 127
Object.registerClass("rider_debris_02", com.nitrome.stickyfeet.Debris);
#endinitclip
Symbol 304 MovieClip [rider_debris_01] Frame 1
#initclip 128
Object.registerClass("rider_debris_01", com.nitrome.stickyfeet.Debris);
#endinitclip
Symbol 307 MovieClip [break_block3] Frame 1
#initclip 129
Object.registerClass("break_block3", com.nitrome.stickyfeet.Debris);
#endinitclip
Symbol 310 MovieClip [break_block2] Frame 1
#initclip 130
Object.registerClass("break_block2", com.nitrome.stickyfeet.Debris);
#endinitclip
Symbol 313 MovieClip [break_block1] Frame 1
#initclip 131
Object.registerClass("break_block1", com.nitrome.stickyfeet.Debris);
#endinitclip
Symbol 316 MovieClip [break_block0] Frame 1
#initclip 132
Object.registerClass("break_block0", com.nitrome.stickyfeet.Debris);
#endinitclip
Symbol 319 MovieClip [test_tile] Frame 1
stop();
Symbol 462 MovieClip [player] Frame 1
stop();
Symbol 487 MovieClip [leap_smoke] Frame 1
#initclip 133
Object.registerClass("leap_smoke", com.nitrome.stickyfeet.MovingBlockAttachable);
#endinitclip
Symbol 487 MovieClip [leap_smoke] Frame 13
this.removeMovieClip();
Symbol 500 MovieClip [smack] Frame 1
#initclip 134
Object.registerClass("smack", com.nitrome.stickyfeet.MovingBlockAttachable);
#endinitclip
Symbol 500 MovieClip [smack] Frame 7
this.removeMovieClip();
Symbol 679 MovieClip [coin_collect] Frame 20
this.removeMovieClip();
Symbol 684 MovieClip [switch] Frame 1
stop();
Symbol 699 MovieClip [switch_block] Frame 1
stop();
Symbol 710 MovieClip [flying_smack] Frame 6
this.removeMovieClip();
Symbol 734 MovieClip [electric_debris_01] Frame 1
#initclip 135
Object.registerClass("electric_debris_01", com.nitrome.stickyfeet.Debris);
#endinitclip
Symbol 737 MovieClip [electric_debris_02] Frame 1
#initclip 136
Object.registerClass("electric_debris_02", com.nitrome.stickyfeet.Debris);
#endinitclip
Symbol 740 MovieClip [electric_debris_03] Frame 1
#initclip 137
Object.registerClass("electric_debris_03", com.nitrome.stickyfeet.Debris);
#endinitclip
Symbol 754 MovieClip [electric_monster] Frame 1
stop();
Symbol 773 MovieClip [score_panel] Frame 1
#initclip 138
Object.registerClass("score_panel", com.nitrome.stickyfeet.ScorePanel);
#endinitclip
Instance of Symbol 169 MovieClip [StickyfeetFont] in Symbol 773 MovieClip [score_panel] Frame 1
//component parameters
onClipEvent (construct) {
align = "right";
line_spacing = 16;
text = "score:";
tracking = -1;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Symbol 779 MovieClip [pause_game_button] Frame 1
#initclip 139
Object.registerClass("pause_game_button", com.nitrome.game.PauseButton);
#endinitclip
stop();
Symbol 779 MovieClip [pause_game_button] Frame 10
stop();
Symbol 781 MovieClip [noclicks] Frame 1
#initclip 140
Object.registerClass("noclicks", com.nitrome.game.NoClicks);
#endinitclip
Symbol 784 MovieClip [score_ticker] Frame 1
#initclip 141
Object.registerClass("score_ticker", com.nitrome.game.ScoreTicker);
#endinitclip
Symbol 793 MovieClip Frame 1
stop();
Symbol 798 MovieClip Frame 1
trace("hello");
if (_root.score == 0) {
submit_score_button._visible = false;
} else {
submit_score_button._visible = true;
}
ticker_score.startCount(_root.score, 100);
stop();
Instance of Symbol 169 MovieClip [StickyfeetFont] in Symbol 798 MovieClip Frame 1
//component parameters
onClipEvent (construct) {
align = "center";
line_spacing = 16;
text = "well done!";
tracking = -1;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Symbol 798 MovieClip Frame 15
if (_root.score == 0) {
submit_score_button._visible = false;
} else {
submit_score_button._visible = true;
}
ticker_score.startCount(_root.score, 100);
stop();
Instance of Symbol 169 MovieClip [StickyfeetFont] in Symbol 798 MovieClip Frame 15
//component parameters
onClipEvent (construct) {
align = "center";
line_spacing = 16;
text = "you died!";
tracking = -1;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Symbol 798 MovieClip Frame 29
if (_root.score == 0) {
submit_score_button._visible = false;
} else {
submit_score_button._visible = true;
}
ticker_score.startCount(_root.score, 100);
stop();
Instance of Symbol 169 MovieClip [StickyfeetFont] in Symbol 798 MovieClip Frame 29
//component parameters
onClipEvent (construct) {
align = "center";
line_spacing = 16;
text = "well done!";
tracking = -1;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Symbol 799 MovieClip [popup_holder] Frame 1
#initclip 142
Object.registerClass("popup_holder", com.nitrome.game.PopUpHolder);
#endinitclip
stop();
Symbol 799 MovieClip [popup_holder] Frame 2
popup_clip.gotoAndStop(this.popup_id);
var top_frame = Math.ceil(Math.random() * 4);
top.gotoAndStop(top_frame);
var bottom_frame = top_frame;
do {
bottom_frame = Math.ceil(Math.random() * 4);
} while (bottom_frame == top_frame);
bottom.gotoAndStop(bottom_frame);
Symbol 799 MovieClip [popup_holder] Frame 20
stop();
Symbol 809 MovieClip [music_toggle] Frame 1
#initclip 143
Object.registerClass("music_toggle", com.nitrome.game.MusicToggle);
#endinitclip
stop();
Symbol 809 MovieClip [music_toggle] Frame 10
stop();
Symbol 809 MovieClip [music_toggle] Frame 20
stop();
Symbol 809 MovieClip [music_toggle] Frame 30
stop();
Symbol 817 MovieClip [fx_toggle] Frame 1
#initclip 144
Object.registerClass("fx_toggle", com.nitrome.game.FxToggle);
#endinitclip
stop();
Symbol 817 MovieClip [fx_toggle] Frame 10
stop();
Symbol 817 MovieClip [fx_toggle] Frame 20
stop();
Symbol 817 MovieClip [fx_toggle] Frame 30
stop();
Symbol 838 MovieClip [number_clip] Frame 1
stop();
Symbol 838 MovieClip [number_clip] Frame 2
stop();
Symbol 838 MovieClip [number_clip] Frame 3
stop();
Symbol 838 MovieClip [number_clip] Frame 4
stop();
Symbol 838 MovieClip [number_clip] Frame 5
stop();
Symbol 838 MovieClip [number_clip] Frame 6
stop();
Symbol 838 MovieClip [number_clip] Frame 7
stop();
Symbol 838 MovieClip [number_clip] Frame 8
stop();
Symbol 838 MovieClip [number_clip] Frame 9
stop();
Symbol 838 MovieClip [number_clip] Frame 10
stop();
Symbol 838 MovieClip [number_clip] Frame 11
stop();
Symbol 847 MovieClip [lives_panel] Frame 1
#initclip 145
Object.registerClass("lives_panel", com.nitrome.stickyfeet.LivesPanel);
#endinitclip
stop();
Symbol 884 MovieClip [ball_chain_cw] Frame 100
gotoAndPlay (1);
Symbol 885 MovieClip [ball_chain_ccw] Frame 100
gotoAndPlay (1);
Symbol 958 MovieClip [shooty_monster] Frame 1
stop();
Symbol 1013 MovieClip [paf] Frame 12
this.removeMovieClip();
Symbol 1122 MovieClip [electric] Frame 1
stop();
Symbol 1125 MovieClip Frame 1
stop();
Symbol 1127 MovieClip Frame 1
stop();
Symbol 1129 MovieClip Frame 1
stop();
Symbol 1131 MovieClip Frame 1
stop();
Symbol 1134 MovieClip Frame 1
stop();
Symbol 1134 MovieClip Frame 2
stop();
Symbol 1136 MovieClip Frame 1
stop();
Symbol 1136 MovieClip Frame 2
stop();
Symbol 1138 MovieClip Frame 1
stop();
Symbol 1140 MovieClip Frame 1
stop();
Symbol 1142 MovieClip Frame 1
stop();
Symbol 1144 MovieClip Frame 1
stop();
Symbol 1146 MovieClip Frame 1
stop();
Symbol 1147 MovieClip [sfx_manager] Frame 1
#initclip 146
Object.registerClass("sfx_manager", com.nitrome.game.SfxManager);
#endinitclip
Symbol 1148 MovieClip [music_controller] Frame 1
#initclip 147
Object.registerClass("music_controller", com.nitrome.game.MusicController);
#endinitclip
Symbol 1159 MovieClip [level_chooser_button] Frame 1
#initclip 148
Object.registerClass("level_chooser_button", com.nitrome.game.LevelChooserButton);
#endinitclip
this.refreshClip();
stop();
Instance of Symbol 169 MovieClip [StickyfeetFont] "level_num" in Symbol 1159 MovieClip [level_chooser_button] Frame 1
//component parameters
onClipEvent (construct) {
align = "center";
line_spacing = 16;
text = "??";
tracking = -1;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Symbol 1159 MovieClip [level_chooser_button] Frame 10
this.refreshClip();
stop();
Symbol 1159 MovieClip [level_chooser_button] Frame 20
level_num.text = "?";
stop();
Symbol 1169 MovieClip [score_line] Frame 1
#initclip 149
Object.registerClass("score_line", com.nitrome.highscore.HiscoreLine);
#endinitclip
Instance of Symbol 169 MovieClip [StickyfeetFont] "rank_text" in Symbol 1169 MovieClip [score_line] Frame 1
//component parameters
onClipEvent (construct) {
align = "left";
line_spacing = 16;
text = "100.";
tracking = -1;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Instance of Symbol 169 MovieClip [StickyfeetFont] "score_text" in Symbol 1169 MovieClip [score_line] Frame 1
//component parameters
onClipEvent (construct) {
align = "left";
line_spacing = 16;
text = "52600";
tracking = -1;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Instance of Symbol 169 MovieClip [StickyfeetFont] "name_text" in Symbol 1169 MovieClip [score_line] Frame 1
//component parameters
onClipEvent (construct) {
align = "left";
line_spacing = 16;
text = "norman";
tracking = -1;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Symbol 1171 MovieClip Frame 35
stop();
Instance of Symbol 169 MovieClip [StickyfeetFont] in Symbol 1174 MovieClip Frame 1
//component parameters
onClipEvent (construct) {
align = "center";
line_spacing = 16;
text = "loading";
tracking = -1;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Symbol 1176 Button
on (release) {
getURL ("http://www.nitrome.com/games/nanobot", "_blank");
}
Symbol 1177 MovieClip [hiscore_board] Frame 1
#initclip 150
Object.registerClass("hiscore_board", com.nitrome.highscore.HiscoreBoard);
#endinitclip
stop();
Symbol 1177 MovieClip [hiscore_board] Frame 35
stop();
Instance of Symbol 169 MovieClip [StickyfeetFont] in Symbol 1177 MovieClip [hiscore_board] Frame 36
//component parameters
onClipEvent (construct) {
align = "center";
line_spacing = 16;
text = "scores are available at nitrome.com";
tracking = -1;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Instance of Symbol 169 MovieClip [StickyfeetFont] in Symbol 1177 MovieClip [hiscore_board] Frame 36
//component parameters
onClipEvent (construct) {
align = "center";
line_spacing = 16;
text = "click to play|game at|nitrome.com";
tracking = -1;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Symbol 1178 MovieClip [letter_button_w] Frame 1
#initclip 151
Object.registerClass("letter_button_w", com.nitrome.highscore.LetterButton);
#endinitclip
stop();
Instance of Symbol 169 MovieClip [StickyfeetFont] in Symbol 1178 MovieClip [letter_button_w] Frame 1
//component parameters
onClipEvent (construct) {
align = "center";
line_spacing = 16;
text = "w";
tracking = -11;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Symbol 1178 MovieClip [letter_button_w] Frame 5
stop();
Symbol 1179 MovieClip [letter_button_z] Frame 1
#initclip 152
Object.registerClass("letter_button_z", com.nitrome.highscore.LetterButton);
#endinitclip
stop();
Instance of Symbol 169 MovieClip [StickyfeetFont] in Symbol 1179 MovieClip [letter_button_z] Frame 1
//component parameters
onClipEvent (construct) {
align = "center";
line_spacing = 16;
text = "z";
tracking = -11;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Symbol 1179 MovieClip [letter_button_z] Frame 5
stop();
Symbol 1180 MovieClip [letter_button_y] Frame 1
#initclip 153
Object.registerClass("letter_button_y", com.nitrome.highscore.LetterButton);
#endinitclip
stop();
Instance of Symbol 169 MovieClip [StickyfeetFont] in Symbol 1180 MovieClip [letter_button_y] Frame 1
//component parameters
onClipEvent (construct) {
align = "center";
line_spacing = 16;
text = "y";
tracking = -11;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Symbol 1180 MovieClip [letter_button_y] Frame 5
stop();
Symbol 1181 MovieClip [letter_button_x] Frame 1
#initclip 154
Object.registerClass("letter_button_x", com.nitrome.highscore.LetterButton);
#endinitclip
stop();
Instance of Symbol 169 MovieClip [StickyfeetFont] in Symbol 1181 MovieClip [letter_button_x] Frame 1
//component parameters
onClipEvent (construct) {
align = "center";
line_spacing = 16;
text = "x";
tracking = -11;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Symbol 1181 MovieClip [letter_button_x] Frame 5
stop();
Symbol 1182 MovieClip [letter_button_v] Frame 1
#initclip 155
Object.registerClass("letter_button_v", com.nitrome.highscore.LetterButton);
#endinitclip
stop();
Instance of Symbol 169 MovieClip [StickyfeetFont] in Symbol 1182 MovieClip [letter_button_v] Frame 1
//component parameters
onClipEvent (construct) {
align = "center";
line_spacing = 16;
text = "v";
tracking = -11;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Symbol 1182 MovieClip [letter_button_v] Frame 5
stop();
Symbol 1183 MovieClip [letter_button_u] Frame 1
#initclip 156
Object.registerClass("letter_button_u", com.nitrome.highscore.LetterButton);
#endinitclip
stop();
Instance of Symbol 169 MovieClip [StickyfeetFont] in Symbol 1183 MovieClip [letter_button_u] Frame 1
//component parameters
onClipEvent (construct) {
align = "center";
line_spacing = 16;
text = "u";
tracking = -11;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Symbol 1183 MovieClip [letter_button_u] Frame 5
stop();
Symbol 1184 MovieClip [letter_button_t] Frame 1
#initclip 157
Object.registerClass("letter_button_t", com.nitrome.highscore.LetterButton);
#endinitclip
stop();
Instance of Symbol 169 MovieClip [StickyfeetFont] in Symbol 1184 MovieClip [letter_button_t] Frame 1
//component parameters
onClipEvent (construct) {
align = "center";
line_spacing = 16;
text = "t";
tracking = -11;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Symbol 1184 MovieClip [letter_button_t] Frame 5
stop();
Symbol 1185 MovieClip [letter_button_s] Frame 1
#initclip 158
Object.registerClass("letter_button_s", com.nitrome.highscore.LetterButton);
#endinitclip
stop();
Instance of Symbol 169 MovieClip [StickyfeetFont] in Symbol 1185 MovieClip [letter_button_s] Frame 1
//component parameters
onClipEvent (construct) {
align = "center";
line_spacing = 16;
text = "s";
tracking = -11;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Symbol 1185 MovieClip [letter_button_s] Frame 5
stop();
Symbol 1186 MovieClip [letter_button_r] Frame 1
#initclip 159
Object.registerClass("letter_button_r", com.nitrome.highscore.LetterButton);
#endinitclip
stop();
Instance of Symbol 169 MovieClip [StickyfeetFont] in Symbol 1186 MovieClip [letter_button_r] Frame 1
//component parameters
onClipEvent (construct) {
align = "center";
line_spacing = 16;
text = "r";
tracking = -11;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Symbol 1186 MovieClip [letter_button_r] Frame 5
stop();
Symbol 1187 MovieClip [letter_button_q] Frame 1
#initclip 160
Object.registerClass("letter_button_q", com.nitrome.highscore.LetterButton);
#endinitclip
stop();
Instance of Symbol 169 MovieClip [StickyfeetFont] in Symbol 1187 MovieClip [letter_button_q] Frame 1
//component parameters
onClipEvent (construct) {
align = "center";
line_spacing = 16;
text = "q";
tracking = -11;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Symbol 1187 MovieClip [letter_button_q] Frame 5
stop();
Symbol 1188 MovieClip [letter_button_p] Frame 1
#initclip 161
Object.registerClass("letter_button_p", com.nitrome.highscore.LetterButton);
#endinitclip
stop();
Instance of Symbol 169 MovieClip [StickyfeetFont] in Symbol 1188 MovieClip [letter_button_p] Frame 1
//component parameters
onClipEvent (construct) {
align = "center";
line_spacing = 16;
text = "p";
tracking = -11;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Symbol 1188 MovieClip [letter_button_p] Frame 5
stop();
Symbol 1189 MovieClip [letter_button_o] Frame 1
#initclip 162
Object.registerClass("letter_button_o", com.nitrome.highscore.LetterButton);
#endinitclip
stop();
Instance of Symbol 169 MovieClip [StickyfeetFont] in Symbol 1189 MovieClip [letter_button_o] Frame 1
//component parameters
onClipEvent (construct) {
align = "center";
line_spacing = 16;
text = "o";
tracking = -11;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Symbol 1189 MovieClip [letter_button_o] Frame 5
stop();
Symbol 1190 MovieClip [letter_button_n] Frame 1
#initclip 163
Object.registerClass("letter_button_n", com.nitrome.highscore.LetterButton);
#endinitclip
stop();
Instance of Symbol 169 MovieClip [StickyfeetFont] in Symbol 1190 MovieClip [letter_button_n] Frame 1
//component parameters
onClipEvent (construct) {
align = "center";
line_spacing = 16;
text = "n";
tracking = -11;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Symbol 1190 MovieClip [letter_button_n] Frame 5
stop();
Symbol 1191 MovieClip [letter_button_m] Frame 1
#initclip 164
Object.registerClass("letter_button_m", com.nitrome.highscore.LetterButton);
#endinitclip
stop();
Instance of Symbol 169 MovieClip [StickyfeetFont] in Symbol 1191 MovieClip [letter_button_m] Frame 1
//component parameters
onClipEvent (construct) {
align = "center";
line_spacing = 16;
text = "m";
tracking = -11;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Symbol 1191 MovieClip [letter_button_m] Frame 5
stop();
Symbol 1192 MovieClip [letter_button_l] Frame 1
#initclip 165
Object.registerClass("letter_button_l", com.nitrome.highscore.LetterButton);
#endinitclip
stop();
Instance of Symbol 169 MovieClip [StickyfeetFont] in Symbol 1192 MovieClip [letter_button_l] Frame 1
//component parameters
onClipEvent (construct) {
align = "center";
line_spacing = 16;
text = "l";
tracking = -11;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Symbol 1192 MovieClip [letter_button_l] Frame 5
stop();
Symbol 1193 MovieClip [letter_button_k] Frame 1
#initclip 166
Object.registerClass("letter_button_k", com.nitrome.highscore.LetterButton);
#endinitclip
stop();
Instance of Symbol 169 MovieClip [StickyfeetFont] in Symbol 1193 MovieClip [letter_button_k] Frame 1
//component parameters
onClipEvent (construct) {
align = "center";
line_spacing = 16;
text = "k";
tracking = -11;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Symbol 1193 MovieClip [letter_button_k] Frame 5
stop();
Symbol 1194 MovieClip [letter_button_j] Frame 1
#initclip 167
Object.registerClass("letter_button_j", com.nitrome.highscore.LetterButton);
#endinitclip
stop();
Instance of Symbol 169 MovieClip [StickyfeetFont] in Symbol 1194 MovieClip [letter_button_j] Frame 1
//component parameters
onClipEvent (construct) {
align = "center";
line_spacing = 16;
text = "j";
tracking = -11;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Symbol 1194 MovieClip [letter_button_j] Frame 5
stop();
Symbol 1195 MovieClip [letter_button_i] Frame 1
#initclip 168
Object.registerClass("letter_button_i", com.nitrome.highscore.LetterButton);
#endinitclip
stop();
Instance of Symbol 169 MovieClip [StickyfeetFont] in Symbol 1195 MovieClip [letter_button_i] Frame 1
//component parameters
onClipEvent (construct) {
align = "center";
line_spacing = 16;
text = "i";
tracking = -11;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Symbol 1195 MovieClip [letter_button_i] Frame 5
stop();
Symbol 1196 MovieClip [letter_button_h] Frame 1
#initclip 169
Object.registerClass("letter_button_h", com.nitrome.highscore.LetterButton);
#endinitclip
stop();
Instance of Symbol 169 MovieClip [StickyfeetFont] in Symbol 1196 MovieClip [letter_button_h] Frame 1
//component parameters
onClipEvent (construct) {
align = "center";
line_spacing = 16;
text = "h";
tracking = -11;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Symbol 1196 MovieClip [letter_button_h] Frame 5
stop();
Symbol 1197 MovieClip [letter_button_g] Frame 1
#initclip 170
Object.registerClass("letter_button_g", com.nitrome.highscore.LetterButton);
#endinitclip
stop();
Instance of Symbol 169 MovieClip [StickyfeetFont] in Symbol 1197 MovieClip [letter_button_g] Frame 1
//component parameters
onClipEvent (construct) {
align = "center";
line_spacing = 16;
text = "g";
tracking = -11;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Symbol 1197 MovieClip [letter_button_g] Frame 5
stop();
Symbol 1198 MovieClip [letter_button_f] Frame 1
#initclip 171
Object.registerClass("letter_button_f", com.nitrome.highscore.LetterButton);
#endinitclip
stop();
Instance of Symbol 169 MovieClip [StickyfeetFont] in Symbol 1198 MovieClip [letter_button_f] Frame 1
//component parameters
onClipEvent (construct) {
align = "center";
line_spacing = 16;
text = "f";
tracking = -11;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Symbol 1198 MovieClip [letter_button_f] Frame 5
stop();
Symbol 1199 MovieClip [letter_button_e] Frame 1
#initclip 172
Object.registerClass("letter_button_e", com.nitrome.highscore.LetterButton);
#endinitclip
stop();
Instance of Symbol 169 MovieClip [StickyfeetFont] in Symbol 1199 MovieClip [letter_button_e] Frame 1
//component parameters
onClipEvent (construct) {
align = "center";
line_spacing = 16;
text = "e";
tracking = -11;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Symbol 1199 MovieClip [letter_button_e] Frame 5
stop();
Symbol 1200 MovieClip [letter_button_d] Frame 1
#initclip 173
Object.registerClass("letter_button_d", com.nitrome.highscore.LetterButton);
#endinitclip
stop();
Instance of Symbol 169 MovieClip [StickyfeetFont] in Symbol 1200 MovieClip [letter_button_d] Frame 1
//component parameters
onClipEvent (construct) {
align = "center";
line_spacing = 16;
text = "d";
tracking = -11;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Symbol 1200 MovieClip [letter_button_d] Frame 5
stop();
Symbol 1201 MovieClip [letter_button_a] Frame 1
#initclip 174
Object.registerClass("letter_button_a", com.nitrome.highscore.LetterButton);
#endinitclip
stop();
Instance of Symbol 169 MovieClip [StickyfeetFont] in Symbol 1201 MovieClip [letter_button_a] Frame 1
//component parameters
onClipEvent (construct) {
align = "center";
line_spacing = 16;
text = "a";
tracking = -11;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Symbol 1201 MovieClip [letter_button_a] Frame 5
stop();
Symbol 1202 MovieClip [letter_button_b] Frame 1
#initclip 175
Object.registerClass("letter_button_b", com.nitrome.highscore.LetterButton);
#endinitclip
stop();
Instance of Symbol 169 MovieClip [StickyfeetFont] in Symbol 1202 MovieClip [letter_button_b] Frame 1
//component parameters
onClipEvent (construct) {
align = "center";
line_spacing = 16;
text = "b";
tracking = -11;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Symbol 1202 MovieClip [letter_button_b] Frame 5
stop();
Symbol 1203 MovieClip [letter_button_c] Frame 1
#initclip 176
Object.registerClass("letter_button_c", com.nitrome.highscore.LetterButton);
#endinitclip
stop();
Instance of Symbol 169 MovieClip [StickyfeetFont] in Symbol 1203 MovieClip [letter_button_c] Frame 1
//component parameters
onClipEvent (construct) {
align = "center";
line_spacing = 16;
text = "c";
tracking = -11;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Symbol 1203 MovieClip [letter_button_c] Frame 5
stop();
Symbol 1204 MovieClip Frame 1
stop();
Instance of Symbol 169 MovieClip [StickyfeetFont] in Symbol 1204 MovieClip Frame 2
//component parameters
onClipEvent (construct) {
align = "center";
line_spacing = 16;
text = "loading";
tracking = -1;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Instance of Symbol 169 MovieClip [StickyfeetFont] in Symbol 1204 MovieClip Frame 3
//component parameters
onClipEvent (construct) {
align = "center";
line_spacing = 16;
text = "loading";
tracking = -1;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Instance of Symbol 169 MovieClip [StickyfeetFont] in Symbol 1204 MovieClip Frame 4
//component parameters
onClipEvent (construct) {
align = "center";
line_spacing = 16;
text = "loading";
tracking = -1;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Instance of Symbol 169 MovieClip [StickyfeetFont] in Symbol 1204 MovieClip Frame 5
//component parameters
onClipEvent (construct) {
align = "center";
line_spacing = 16;
text = "loading";
tracking = -1;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Instance of Symbol 169 MovieClip [StickyfeetFont] in Symbol 1204 MovieClip Frame 6
//component parameters
onClipEvent (construct) {
align = "center";
line_spacing = 16;
text = "loading";
tracking = -1;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Instance of Symbol 169 MovieClip [StickyfeetFont] in Symbol 1204 MovieClip Frame 7
//component parameters
onClipEvent (construct) {
align = "center";
line_spacing = 16;
text = "loading";
tracking = -1;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Instance of Symbol 169 MovieClip [StickyfeetFont] in Symbol 1204 MovieClip Frame 8
//component parameters
onClipEvent (construct) {
align = "center";
line_spacing = 16;
text = "loading";
tracking = -1;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Instance of Symbol 169 MovieClip [StickyfeetFont] in Symbol 1204 MovieClip Frame 9
//component parameters
onClipEvent (construct) {
align = "center";
line_spacing = 16;
text = "loading";
tracking = -1;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Instance of Symbol 169 MovieClip [StickyfeetFont] in Symbol 1204 MovieClip Frame 10
//component parameters
onClipEvent (construct) {
align = "center";
line_spacing = 16;
text = "loading";
tracking = -1;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Instance of Symbol 169 MovieClip [StickyfeetFont] in Symbol 1204 MovieClip Frame 11
//component parameters
onClipEvent (construct) {
align = "center";
line_spacing = 16;
text = "loading";
tracking = -1;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Instance of Symbol 169 MovieClip [StickyfeetFont] in Symbol 1204 MovieClip Frame 12
//component parameters
onClipEvent (construct) {
align = "center";
line_spacing = 16;
text = "loading";
tracking = -1;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Instance of Symbol 169 MovieClip [StickyfeetFont] in Symbol 1204 MovieClip Frame 13
//component parameters
onClipEvent (construct) {
align = "center";
line_spacing = 16;
text = "loading";
tracking = -1;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Instance of Symbol 169 MovieClip [StickyfeetFont] in Symbol 1204 MovieClip Frame 14
//component parameters
onClipEvent (construct) {
align = "center";
line_spacing = 16;
text = "loading";
tracking = -1;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Symbol 1204 MovieClip Frame 15
_parent.submit_button.submitScore();
stop();
Instance of Symbol 169 MovieClip [StickyfeetFont] in Symbol 1204 MovieClip Frame 15
//component parameters
onClipEvent (construct) {
align = "center";
line_spacing = 16;
text = "loading";
tracking = -1;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Symbol 1205 MovieClip [score_submit_panel] Frame 1
#initclip 177
Object.registerClass("score_submit_panel", com.nitrome.highscore.ScoreSubmitPanel);
#endinitclip
stop();
Instance of Symbol 169 MovieClip [StickyfeetFont] "score_text" in Symbol 1205 MovieClip [score_submit_panel] Frame 1
//component parameters
onClipEvent (construct) {
align = "center";
line_spacing = 16;
text = "your score is 0";
tracking = -1;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Instance of Symbol 169 MovieClip [StickyfeetFont] "name_text" in Symbol 1205 MovieClip [score_submit_panel] Frame 1
//component parameters
onClipEvent (construct) {
align = "center";
line_spacing = 16;
text = "";
tracking = -1;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Symbol 1205 MovieClip [score_submit_panel] Frame 10
stop();
Instance of Symbol 169 MovieClip [StickyfeetFont] in Symbol 1205 MovieClip [score_submit_panel] Frame 10
//component parameters
onClipEvent (construct) {
align = "center";
line_spacing = 16;
text = "scores are available at nitrome.com";
tracking = -1;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Instance of Symbol 169 MovieClip [StickyfeetFont] in Symbol 1205 MovieClip [score_submit_panel] Frame 10
//component parameters
onClipEvent (construct) {
align = "center";
line_spacing = 16;
text = "click to play|game at|nitrome.com";
tracking = -1;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Symbol 1230 MovieClip Frame 124
_root.tt.doTween("pre_title_screen");
stop();
Instance of Symbol 169 MovieClip [StickyfeetFont] in Symbol 1247 MovieClip Frame 1
//component parameters
onClipEvent (construct) {
align = "center";
line_spacing = 16;
text = "use the arrow keys or w,a,s,d|to walk. use up and down when on|a wall, and left and right when on|the floor or ceiling";
tracking = -1;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Instance of Symbol 169 MovieClip [StickyfeetFont] in Symbol 1247 MovieClip Frame 100
//component parameters
onClipEvent (construct) {
align = "center";
line_spacing = 16;
text = "|press spacebar to fly.|you will keep going till you hit a wall.";
tracking = -1;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Instance of Symbol 169 MovieClip [StickyfeetFont] in Symbol 1247 MovieClip Frame 200
//component parameters
onClipEvent (construct) {
align = "center";
line_spacing = 16;
text = "monsters hurt you!|get rid of them by flying|into them head first";
tracking = -1;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Instance of Symbol 169 MovieClip [StickyfeetFont] in Symbol 1252 MovieClip Frame 1
//component parameters
onClipEvent (construct) {
align = "center";
line_spacing = 16;
text = "Well done at using your head! But Norman|is now heading somewhere else.|What a headache!||Will Norman ever find his way home?";
tracking = -1;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Instance of Symbol 169 MovieClip [StickyfeetFont] "message_text" in Symbol 1265 MovieClip Frame 1
//component parameters
onClipEvent (construct) {
align = "center";
line_spacing = 16;
text = "ready?";
tracking = -1;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Symbol 1265 MovieClip Frame 75
message_text._visible = false;
message_text.text = " ";
stop();
Instance of Symbol 169 MovieClip [StickyfeetFont] in Symbol 1270 MovieClip Frame 1
//component parameters
onClipEvent (construct) {
align = "center";
line_spacing = 16;
text = "paused";
tracking = -1;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Symbol 1271 MovieClip Frame 1
stop();
Symbol 1271 MovieClip Frame 29
stop();
Symbol 1272 MovieClip Frame 1
var top_frame = Math.ceil(Math.random() * 4);
top.gotoAndStop(top_frame);
var bottom_frame = top_frame;
do {
bottom_frame = Math.ceil(Math.random() * 4);
} while (bottom_frame == top_frame);
bottom.gotoAndStop(bottom_frame);
stop();
Instance of Symbol 169 MovieClip [StickyfeetFont] in Symbol 1272 MovieClip Frame 1
//component parameters
onClipEvent (construct) {
align = "center";
line_spacing = 16;
text = "loading...";
tracking = -1;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Symbol 1272 MovieClip Frame 10
this.tt.doTween("clear");