Frame 1
function senturl(a, b, c, d) {
getURL ((((((((("http://user.game.com.cn/game/?action=highscore&id=" + _global.gameID) + "&s=") + a) + "&a=") + b) + "&t=") + d) + "&r=") + c, "_blank");
}
function geturl() {
getURL ("http://user.game.com.cn/game/?action=highscore&id=" + _global.gameID, "_blank");
}
function hex_average(s) {
return(binl2hex(core_average(str2binl(s), s.length * chrsz)));
}
function b64_average(s) {
return(binl2b64(core_average(str2binl(s), s.length * chrsz)));
}
function hex_hmac_average(key, data) {
return(binl2hex(core_hmac_average(key, data)));
}
function b64_hmac_average(key, data) {
return(binl2b64(core_hmac_average(key, data)));
}
function calcaverage(s) {
return(binl2hex(core_average(str2binl(s), s.length * chrsz)));
}
function average_vm_test() {
return(hex_average("abc") == "900150983cd24fb0d6963f7d28e17f72");
}
function core_average(x, len) {
x[len >> 5] = x[len >> 5] | (128 << (len % 32));
x[(((len + 64) >>> 9) << 4) + 14] = len;
var _local4 = 1732584193 /* 0x67452301 */;
var _local3 = -271733879;
var _local2 = -1732584194;
var _local1 = 271733878 /* 0x10325476 */;
var _local5 = 0;
while (_local5 < x.length) {
var _local10 = _local4;
var _local9 = _local3;
var _local8 = _local2;
var _local7 = _local1;
_local4 = average_ff(_local4, _local3, _local2, _local1, x[_local5 + 0], 7, -680876936);
_local1 = average_ff(_local1, _local4, _local3, _local2, x[_local5 + 1], 12, -389564586);
_local2 = average_ff(_local2, _local1, _local4, _local3, x[_local5 + 2], 17, 606105819);
_local3 = average_ff(_local3, _local2, _local1, _local4, x[_local5 + 3], 22, -1044525330);
_local4 = average_ff(_local4, _local3, _local2, _local1, x[_local5 + 4], 7, -176418897);
_local1 = average_ff(_local1, _local4, _local3, _local2, x[_local5 + 5], 12, 1200080426);
_local2 = average_ff(_local2, _local1, _local4, _local3, x[_local5 + 6], 17, -1473231341);
_local3 = average_ff(_local3, _local2, _local1, _local4, x[_local5 + 7], 22, -45705983);
_local4 = average_ff(_local4, _local3, _local2, _local1, x[_local5 + 8], 7, 1770035416);
_local1 = average_ff(_local1, _local4, _local3, _local2, x[_local5 + 9], 12, -1958414417);
_local2 = average_ff(_local2, _local1, _local4, _local3, x[_local5 + 10], 17, -42063);
_local3 = average_ff(_local3, _local2, _local1, _local4, x[_local5 + 11], 22, -1990404162);
_local4 = average_ff(_local4, _local3, _local2, _local1, x[_local5 + 12], 7, 1804603682);
_local1 = average_ff(_local1, _local4, _local3, _local2, x[_local5 + 13], 12, -40341101);
_local2 = average_ff(_local2, _local1, _local4, _local3, x[_local5 + 14], 17, -1502002290);
_local3 = average_ff(_local3, _local2, _local1, _local4, x[_local5 + 15], 22, 1236535329);
_local4 = average_gg(_local4, _local3, _local2, _local1, x[_local5 + 1], 5, -165796510);
_local1 = average_gg(_local1, _local4, _local3, _local2, x[_local5 + 6], 9, -1069501632);
_local2 = average_gg(_local2, _local1, _local4, _local3, x[_local5 + 11], 14, 643717713);
_local3 = average_gg(_local3, _local2, _local1, _local4, x[_local5 + 0], 20, -373897302);
_local4 = average_gg(_local4, _local3, _local2, _local1, x[_local5 + 5], 5, -701558691);
_local1 = average_gg(_local1, _local4, _local3, _local2, x[_local5 + 10], 9, 38016083);
_local2 = average_gg(_local2, _local1, _local4, _local3, x[_local5 + 15], 14, -660478335);
_local3 = average_gg(_local3, _local2, _local1, _local4, x[_local5 + 4], 20, -405537848);
_local4 = average_gg(_local4, _local3, _local2, _local1, x[_local5 + 9], 5, 568446438);
_local1 = average_gg(_local1, _local4, _local3, _local2, x[_local5 + 14], 9, -1019803690);
_local2 = average_gg(_local2, _local1, _local4, _local3, x[_local5 + 3], 14, -187363961);
_local3 = average_gg(_local3, _local2, _local1, _local4, x[_local5 + 8], 20, 1163531501);
_local4 = average_gg(_local4, _local3, _local2, _local1, x[_local5 + 13], 5, -1444681467);
_local1 = average_gg(_local1, _local4, _local3, _local2, x[_local5 + 2], 9, -51403784);
_local2 = average_gg(_local2, _local1, _local4, _local3, x[_local5 + 7], 14, 1735328473);
_local3 = average_gg(_local3, _local2, _local1, _local4, x[_local5 + 12], 20, -1926607734);
_local4 = average_hh(_local4, _local3, _local2, _local1, x[_local5 + 5], 4, -378558);
_local1 = average_hh(_local1, _local4, _local3, _local2, x[_local5 + 8], 11, -2022574463);
_local2 = average_hh(_local2, _local1, _local4, _local3, x[_local5 + 11], 16, 1839030562);
_local3 = average_hh(_local3, _local2, _local1, _local4, x[_local5 + 14], 23, -35309556);
_local4 = average_hh(_local4, _local3, _local2, _local1, x[_local5 + 1], 4, -1530992060);
_local1 = average_hh(_local1, _local4, _local3, _local2, x[_local5 + 4], 11, 1272893353);
_local2 = average_hh(_local2, _local1, _local4, _local3, x[_local5 + 7], 16, -155497632);
_local3 = average_hh(_local3, _local2, _local1, _local4, x[_local5 + 10], 23, -1094730640);
_local4 = average_hh(_local4, _local3, _local2, _local1, x[_local5 + 13], 4, 681279174);
_local1 = average_hh(_local1, _local4, _local3, _local2, x[_local5 + 0], 11, -358537222);
_local2 = average_hh(_local2, _local1, _local4, _local3, x[_local5 + 3], 16, -722521979);
_local3 = average_hh(_local3, _local2, _local1, _local4, x[_local5 + 6], 23, 76029189);
_local4 = average_hh(_local4, _local3, _local2, _local1, x[_local5 + 9], 4, -640364487);
_local1 = average_hh(_local1, _local4, _local3, _local2, x[_local5 + 12], 11, -421815835);
_local2 = average_hh(_local2, _local1, _local4, _local3, x[_local5 + 15], 16, 530742520);
_local3 = average_hh(_local3, _local2, _local1, _local4, x[_local5 + 2], 23, -995338651);
_local4 = average_ii(_local4, _local3, _local2, _local1, x[_local5 + 0], 6, -198630844);
_local1 = average_ii(_local1, _local4, _local3, _local2, x[_local5 + 7], 10, 1126891415);
_local2 = average_ii(_local2, _local1, _local4, _local3, x[_local5 + 14], 15, -1416354905);
_local3 = average_ii(_local3, _local2, _local1, _local4, x[_local5 + 5], 21, -57434055);
_local4 = average_ii(_local4, _local3, _local2, _local1, x[_local5 + 12], 6, 1700485571);
_local1 = average_ii(_local1, _local4, _local3, _local2, x[_local5 + 3], 10, -1894986606);
_local2 = average_ii(_local2, _local1, _local4, _local3, x[_local5 + 10], 15, -1051523);
_local3 = average_ii(_local3, _local2, _local1, _local4, x[_local5 + 1], 21, -2054922799);
_local4 = average_ii(_local4, _local3, _local2, _local1, x[_local5 + 8], 6, 1873313359);
_local1 = average_ii(_local1, _local4, _local3, _local2, x[_local5 + 15], 10, -30611744);
_local2 = average_ii(_local2, _local1, _local4, _local3, x[_local5 + 6], 15, -1560198380);
_local3 = average_ii(_local3, _local2, _local1, _local4, x[_local5 + 13], 21, 1309151649);
_local4 = average_ii(_local4, _local3, _local2, _local1, x[_local5 + 4], 6, -145523070);
_local1 = average_ii(_local1, _local4, _local3, _local2, x[_local5 + 11], 10, -1120210379);
_local2 = average_ii(_local2, _local1, _local4, _local3, x[_local5 + 2], 15, 718787259);
_local3 = average_ii(_local3, _local2, _local1, _local4, x[_local5 + 9], 21, -343485551);
_local4 = safe_add(_local4, _local10);
_local3 = safe_add(_local3, _local9);
_local2 = safe_add(_local2, _local8);
_local1 = safe_add(_local1, _local7);
_local5 = _local5 + 16;
}
return(Array(_local4, _local3, _local2, _local1));
}
function average_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 average_ff(a, b, c, d, x, s, t) {
return(average_cmn((b & c) | ((~b) & d), a, b, x, s, t));
}
function average_gg(a, b, c, d, x, s, t) {
return(average_cmn((b & d) | (c & (~d)), a, b, x, s, t));
}
function average_hh(a, b, c, d, x, s, t) {
return(average_cmn((b ^ c) ^ d, a, b, x, s, t));
}
function average_ii(a, b, c, d, x, s, t) {
return(average_cmn(c ^ (b | (~d)), a, b, x, s, t));
}
function core_hmac_average(key, data) {
var _local2 = str2binl(key);
if (_local2.length > 16) {
_local2 = core_average(_local2, key.length * chrsz);
}
var _local3 = Array(16);
var _local4 = Array(16);
var _local1 = 0;
while (_local1 < 16) {
_local3[_local1] = _local2[_local1] ^ 909522486;
_local4[_local1] = _local2[_local1] ^ 1549556828;
_local1++;
}
var _local5 = core_average(_local3.concat(str2binl(data)), 512 + (data.length * chrsz));
return(core_average(_local4.concat(_local5), 640));
}
function safe_add(x, y) {
var _local1 = (x & 65535) + (y & 65535);
var _local2 = ((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 _local3 = Array();
var _local4 = (1 << chrsz) - 1;
var _local1 = 0;
while (_local1 < (str.length * chrsz)) {
_local3[_local1 >> 5] = _local3[_local1 >> 5] | ((str.charCodeAt(_local1 / chrsz) & _local4) << (_local1 % 32));
_local1 = _local1 + chrsz;
}
return(_local3);
}
function binl2hex(binarray) {
var _local3 = (hexcase ? "0123456789ABCDEF" : "0123456789abcdef");
var _local4 = "";
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 _local6 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
var _local4 = "";
var _local2 = 0;
while (_local2 < (binarray.length * 4)) {
var _local5 = ((((binarray[_local2 >> 2] >> (8 * (_local2 % 4))) & 255) << 16) | (((binarray[(_local2 + 1) >> 2] >> (8 * ((_local2 + 1) % 4))) & 255) << 8)) | ((binarray[(_local2 + 2) >> 2] >> (8 * ((_local2 + 2) % 4))) & 255);
var _local1 = 0;
while (_local1 < 4) {
if (((_local2 * 8) + (_local1 * 6)) > (binarray.length * 32)) {
_local4 = _local4 + b64pad;
} else {
_local4 = _local4 + _local6.charAt((_local5 >> (6 * (3 - _local1))) & 63);
}
_local1++;
}
_local2 = _local2 + 3;
}
return(_local4);
}
function SortT() {
var _local1 = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
var _local2 = "";
trace(_local1 + "###");
i = 0;
while (i < 10) {
_local2 = _local2 + _local1.substr(random(_local1.length), 1);
i++;
}
trace(_local2);
return(_local2);
}
function DrawLine(position, line, x1, x2, y1, y2) {
function AbstractTile(cx, cy) {
center = new Vector(cx, cy);
verts = new Array();
normal = new Vector(0, 0);
isVisible = true;
isActivated = true;
initializeContainer();
}
function initializeContainer() {
var _local2 = _root.getNextHighestDepth();
var _local3 = "_" + _local2;
dmc = _root.createEmptyMovieClip(_local3, _local2);
}
function createBoundingRect(rw, rh) {
var _local1 = center.y - (rh / 2);
var _local2 = center.y + (rh / 2);
var _local4 = center.x - (rw / 2);
var _local3 = center.x + (rw / 2);
verts.push(new Vector(_local3, _local2));
verts.push(new Vector(_local3, _local1));
verts.push(new Vector(_local4, _local1));
verts.push(new Vector(_local4, _local2));
setCardProjections();
}
function testIntervals(boxMin, boxMax, tileMin, tileMax) {
if (boxMax < tileMin) {
return(0);
}
if (tileMax < boxMin) {
return(0);
}
var _local2 = tileMax - boxMin;
var _local1 = tileMin - boxMax;
if (Math.abs(_local2) < Math.abs(_local1)) {
return(_local2);
}
return(_local1);
}
var _local10 = new Vector(x1, y1);
var _local6 = new Vector(x2, y2);
current = _local10.dot(_local6);
nextdot = _local10.cross(_local6);
current = current + nextdot;
var _local25;
var _local24;
var _local23;
var _local22;
var verts;
var center;
var normal;
var dmc;
var isVisible;
var isActivated;
var _local3 = [];
_global.strqq = "";
i = 0;
while (i < 8) {
var _local4 = 0;
j = 0;
while (j < 10) {
c = ord(line.substr(j, 1));
c = String(c).substr(String(c).length - 2, 1);
_local4 = _local4 + Number(c);
j++;
}
trace(_local4);
if (_local4 > 10) {
_local4 = _local4 % 10;
}
_local3[i] = Math.round(((i + _local4) * (i + _local4)) - ((_local4 * _local4) / 2));
while (_local3[i] >= 32) {
_local3[i] = Math.round(_local3[i] / 2);
}
l = 0;
l = 0;
while (l < (_local3.length - 1)) {
if (_local3[i] == _local3[l]) {
_local3[i] = _local3[i] + 1;
}
l++;
}
trace(_local3[i]);
_global.strqq = _global.strqq + position.substr(_local3[i], 1);
i++;
}
var _local19 = new Vector(x1, y1);
current = _local19.dot(_local6);
nextdot = _local19.cross(_local6);
current = current + nextdot;
var _local17 = new Vector(x1, y1);
current = _local17.dot(_local6);
nextdot = _local17.cross(_local6);
current = current + nextdot;
var _local16 = new Vector(x1, y1);
current = _local16.dot(_local6);
nextdot = _local16.cross(_local6);
current = current + nextdot;
_local19 = new Vector(x1, y1);
current = point5.dot(_local6);
nextdot = point5.cross(_local6);
current = current + nextdot;
current = Math.round(Math.sqrt(current * 2));
if (current > 20) {
current = Math.round(Math.sqrt(current));
}
return(current);
}
function Randoms(Num) {
aaa = "123098938487634asdflskafgpoipALKGAISFH:LKHAODG";
var _local2 = "";
i = 0;
while (i < Num) {
bbb = bbb + aaa.substr(random(aaa.length), 1);
i++;
}
return(bbb);
}
function md5(randomStr) {
x[len >> 5] = x[len >> 5] | (128 << (len % 32));
x[(((len + 64) >>> 9) << 4) + 14] = len;
var _local3 = 1732584193 /* 0x67452301 */;
var _local4 = -271733879;
var _local2 = -1732584194;
var _local1 = 271733878 /* 0x10325476 */;
var _local10 = str2binl(key);
if (_local10.length > 16) {
_local10 = core_average(_local10, key.length * chrsz);
}
var _local11 = Array(16);
var _local12 = Array(16);
var _local5 = 0;
while (_local5 < 16) {
_local11[_local5] = _local10[_local5] ^ 909522486;
_local12[_local5] = _local10[_local5] ^ 1549556828;
_local5++;
}
var _local13 = core_average(_local11.concat(str2binl(data)), 512 + (data.length * chrsz));
return(core_average(_local12.concat(_local13), 640));
while (_local5 < x.length) {
var _local9 = _local3;
var _local8 = _local4;
var _local7 = _local2;
var _local6 = _local1;
_local3 = average_ff(_local3, _local4, _local2, _local1, x[_local5 + 0], 7, -680876936);
_local1 = average_ff(_local1, _local3, _local4, _local2, x[_local5 + 1], 12, -389564586);
_local2 = average_ff(_local2, _local1, _local3, _local4, x[_local5 + 2], 17, 606105819);
_local4 = average_ff(_local4, _local2, _local1, _local3, x[_local5 + 3], 22, -1044525330);
_local3 = average_ff(_local3, _local4, _local2, _local1, x[_local5 + 4], 7, -176418897);
_local1 = average_ff(_local1, _local3, _local4, _local2, x[_local5 + 5], 12, 1200080426);
_local2 = average_ff(_local2, _local1, _local3, _local4, x[_local5 + 6], 17, -1473231341);
_local4 = average_ff(_local4, _local2, _local1, _local3, x[_local5 + 7], 22, -45705983);
_local3 = average_ff(_local3, _local4, _local2, _local1, x[_local5 + 8], 7, 1770035416);
_local1 = average_ff(_local1, _local3, _local4, _local2, x[_local5 + 9], 12, -1958414417);
_local2 = average_ff(_local2, _local1, _local3, _local4, x[_local5 + 10], 17, -42063);
_local4 = average_ff(_local4, _local2, _local1, _local3, x[_local5 + 11], 22, -1990404162);
_local3 = average_ff(_local3, _local4, _local2, _local1, x[_local5 + 12], 7, 1804603682);
_local1 = average_ff(_local1, _local3, _local4, _local2, x[_local5 + 13], 12, -40341101);
_local2 = average_ff(_local2, _local1, _local3, _local4, x[_local5 + 14], 17, -1502002290);
_local4 = average_ff(_local4, _local2, _local1, _local3, x[_local5 + 15], 22, 1236535329);
_local3 = average_gg(_local3, _local4, _local2, _local1, x[_local5 + 1], 5, -165796510);
_local1 = average_gg(_local1, _local3, _local4, _local2, x[_local5 + 6], 9, -1069501632);
_local2 = average_gg(_local2, _local1, _local3, _local4, x[_local5 + 11], 14, 643717713);
_local4 = average_gg(_local4, _local2, _local1, _local3, x[_local5 + 0], 20, -373897302);
_local3 = average_gg(_local3, _local4, _local2, _local1, x[_local5 + 5], 5, -701558691);
_local1 = average_gg(_local1, _local3, _local4, _local2, x[_local5 + 10], 9, 38016083);
_local2 = average_gg(_local2, _local1, _local3, _local4, x[_local5 + 15], 14, -660478335);
_local3 = average_ii(_local3, _local4, _local2, _local1, x[_local5 + 12], 6, 1700485571);
_local1 = average_ii(_local1, _local3, _local4, _local2, x[_local5 + 3], 10, -1894986606);
_local2 = average_ii(_local2, _local1, _local3, _local4, x[_local5 + 10], 15, -1051523);
_local4 = average_ii(_local4, _local2, _local1, _local3, x[_local5 + 1], 21, -2054922799);
_local3 = average_ii(_local3, _local4, _local2, _local1, x[_local5 + 8], 6, 1873313359);
_local1 = average_ii(_local1, _local3, _local4, _local2, x[_local5 + 15], 10, -30611744);
_local2 = average_ii(_local2, _local1, _local3, _local4, x[_local5 + 6], 15, -1560198380);
_local4 = average_ii(_local4, _local2, _local1, _local3, x[_local5 + 13], 21, 1309151649);
_local3 = average_ii(_local3, _local4, _local2, _local1, x[_local5 + 4], 6, -145523070);
_local1 = average_ii(_local1, _local3, _local4, _local2, x[_local5 + 11], 10, -1120210379);
_local2 = average_ii(_local2, _local1, _local3, _local4, x[_local5 + 2], 15, 718787259);
_local4 = average_ii(_local4, _local2, _local1, _local3, x[_local5 + 9], 21, -343485551);
_local3 = safe_add(_local3, _local9);
_local4 = safe_add(_local4, _local8);
_local2 = safe_add(_local2, _local7);
_local1 = safe_add(_local1, _local6);
_local5 = _local5 + 16;
}
return(Array(_local3, _local4, _local2, _local1));
}
_global.gameID = 20;
var hexcase = 0;
var b64pad = "";
var chrsz = 8;
randomStr = Randoms(10);
stop();
_root.localization_url1 = "http://www.gamesgames.com/moregames/?utm_source=brandedgames&utm_medium=mighty_spidy";
_root.localization_url2 = "http://www.gamesgames.com/freegames/?utm_source=brandedgames&utm_medium=mighty_spidy";
_root.localization_language_nr = 1;
_root.localization_branding_nr = 1;
Frame 2
function startSound(nam) {
if (sounds[nam]) {
return(undefined);
}
for (var _local2 in _root.sounds) {
_root.sounds[_local2] = false;
_root[_local2].stop();
}
sounds[nam] = true;
_root[nam].start(0, 10000);
}
function stopSound() {
for (var _local2 in _root.sounds) {
_root.sounds[_local2] = false;
_root[_local2].stop();
}
}
stop();
if ((soundattach = null)) {
soundattach = _root.createEmptyMovieClip("soundattach", 1000004);
}
var hited = new Sound(this);
hited.attachSound("hited");
var hitwall = new Sound(this);
hitwall.attachSound("hitwall");
var getitem = new Sound();
getitem.attachSound("getitem");
var getfly = new Sound(this);
getfly.attachSound("getfly");
var beep = new Sound(this);
beep.attachSound("beep");
var soapsound = new Sound(this);
soapsound.attachSound("soapsound");
var knifesound = new Sound(this);
knifesound.attachSound("knifesound");
var websound = new Sound(this);
websound.attachSound("webshot");
var attack1 = new Sound(this);
attack1.attachSound("attack1");
var bird_attack = new Sound(this);
bird_attack.attachSound("bird_attack");
var deadsnd = new Sound(this);
deadsnd.attachSound("deadsound");
var blowup = new Sound(this);
blowup.attachSound("blowup");
var spiked = new Sound(this);
spiked.attachSound("spiked");
var bounced = new Sound(this);
bounced.attachSound("bounced");
var flying = new Sound(this);
flying.attachSound("flying");
var invic = new Sound(this);
invic.attachSound("invic");
var clouded = new Sound(this);
clouded.attachSound("clouded");
var mainscreen = new Sound(this.soundattach);
mainscreen.attachSound("mainscreen");
var level_map = new Sound(this.soundattach);
level_map.attachSound("level_map");
var world1 = new Sound(this.soundattach);
world1.attachSound("world1");
var world2 = new Sound(this.soundattach);
world2.attachSound("world2");
var world3 = new Sound(this.soundattach);
world3.attachSound("world3");
var completed = new Sound(this.soundattach);
completed.attachSound("complete");
var game_over = new Sound(this.soundattach);
game_over.attachSound("game_over");
var invincible_power = new Sound(this.soundattach);
invincible_power.attachSound("invincible_power");
sounds = {};
if (vol == null) {
vol = 60;
}
game_over.setVolume(vol);
mainscreen.setVolume(vol);
fscommand ("trapallkeys", "true");
fscommand ("showmenu", "false");
Frame 3
tile.Dep.init();
spider = null;
Mouse.show();
_root.attachMovie("startui", "start", 1);
stop();
tiletype = [];
tiletype[0] = "nothing";
tiletype[1] = "stone";
tiletype[2] = "cloud";
tiletype[3] = "lader";
tiletype[4] = "knife";
tiletype[5] = "soap";
tiletype[6] = "spike";
tiletype[7] = "trampoline";
tiletype[8] = "water";
tiletype[9] = "moveh";
tiletype[10] = "movev";
tiletype[15] = "beehive";
tiletype[16] = "wasp";
tiletype[17] = "mantis";
tiletype[18] = "scorpion";
tiletype[19] = "airvent";
tiletype[20] = "fly";
tiletype[21] = "energy";
tiletype[22] = "timeup";
tiletype[33] = "helicopter";
tiletype[24] = "longweb";
tiletype[25] = "invincible";
tiletype[26] = "leaf";
tiletype[30] = "dec";
stone_part = [];
stone_part[0] = [[0, 0, 0, 0, 1, 0], [0, 0, 0, 0, 0, 1], [0, 0, 30, 0, 0, 0], [0, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0], [1, 1, 0, 0, 0, 0]];
stone_part[1] = [[0, 0, 0, 0, 1, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [1, 0, 30, 0, 0, 0], [0, 1, 1, 1, 0, 0], [0, 0, 0, 0, 1, 1]];
stone_part[2] = [[0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 30, 0, 0, 0], [0, 1, 1, 1, 0, 0], [0, 0, 0, 1, 1, 0], [0, 0, 0, 0, 1, 1]];
stone_part[3] = [[0, 0, 1, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 1, 1, 1, 0], [0, 1, 1, 0, 0, 0], [1, 1, 0, 0, 0, 0]];
stone_part[4] = [[0, 1, 0, 0, 0, 1], [0, 0, 0, 0, 0, 0], [0, 0, 30, 0, 0, 0], [0, 0, 1, 0, 0, 0], [0, 0, 1, 0, 0, 0], [0, 0, 0, 0, 0, 0]];
stone_part[5] = [[0, 0, 0, 0, 0, 0], [0, 0, 30, 0, 0, 0], [0, 1, 1, 1, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0]];
cloud_part = [];
cloud_part[0] = [[0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 2, 0, 0, 2, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0]];
var lader_part = [];
lader_part[0] = [[0, 0, 3, 3, 0, 0], [0, 0, 3, 3, 0, 0], [0, 0, 3, 3, 0, 0], [0, 0, 3, 3, 0, 0], [0, 0, 3, 3, 0, 0], [0, 0, 3, 3, 0, 0]];
lader_part[1] = [[0, 0, 3, 3, 3, 3], [0, 0, 3, 3, 3, 3], [0, 0, 3, 3, 3, 3], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0]];
var fly_part = [];
fly_part[0] = [[0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 20, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0]];
fly_part[1] = [[0, 20, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0]];
var airvent_part = [];
airvent_part[0] = [[0, 0, 0, 0, 0, 0], [19, 19, 0, 0, 0, 0], [0, 19, 19, 0, 0, 0], [0, 0, 19, 19, 0, 0], [0, 0, 0, 19, 19, 0], [0, 0, 0, 0, 19, 19]];
airvent_part[1] = [[0, 0, 0, 0, 19, 19], [0, 0, 0, 19, 19, 0], [0, 0, 19, 19, 0, 0], [0, 19, 19, 0, 0, 0], [19, 19, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0]];
airvent_part[2] = [[0, 0, 0, 0, 0, 0], [0, 0, 0, 19, 19, 19], [0, 0, 0, 19, 19, 19], [0, 0, 0, 19, 19, 19], [0, 0, 0, 19, 19, 19], [0, 0, 0, 19, 19, 19]];
var moveh_part = [];
moveh_part[0] = [[0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 9, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0]];
moveh_part[1] = [[0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 10, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0]];
normal_part = [];
normal_part = normal_part.concat(stone_part);
normal_part = normal_part.concat(lader_part);
var i = 0;
while (i < normal_part.length) {
i++;
}
var knife_part = [];
knife_part[0] = [[0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 4, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0]];
knife_part[1] = [[0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 4, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0]];
var spike_part = [];
spike_part[0] = [[0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 6, 0, 0], [1, 1, 1, 1, 0, 0]];
spike_part[1] = [[0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 6, 0, 0, 0, 0], [1, 1, 0, 0, 1, 1]];
var soap_part = [];
soap_part[0] = [[0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [1, 1, 5, 5, 5, 1], [1, 1, 1, 1, 0, 0]];
soap_part[1] = [[0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [1, 5, 5, 5, 1, 1], [1, 1, 0, 0, 1, 1]];
var water_part = [];
water_part[0] = [[0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [1, 8, 8, 8, 8, 1]];
water_part[1] = [[0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [1, 8, 8, 1, 8, 1]];
var mantis_part = [];
mantis_part[0] = [[0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 17, 0, 0, 0], [1, 1, 1, 1, 1, 0]];
mantis_part[1] = [[0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 17, 0, 0, 0, 0], [0, 1, 1, 1, 0, 0], [0, 0, 0, 0, 0, 1]];
mantis_part[1] = [[0, 0, 0, 0, 0, 0], [0, 0, 0, 17, 0, 0], [0, 1, 1, 1, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 1]];
var scorpion_part = [];
scorpion_part[0] = [[0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 18, 0, 0, 0], [1, 1, 1, 1, 1, 0]];
scorpion_part[1] = [[0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 18, 0, 0, 0, 0], [0, 1, 1, 1, 0, 0], [0, 0, 0, 0, 0, 1]];
scorpion_part[2] = [[0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 18, 0], [0, 1, 1, 1, 1, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 1]];
var wasp_part = [];
wasp_part[0] = [[0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 16, 0, 0, 0], [1, 1, 1, 1, 1, 0]];
wasp_part[1] = [[0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 16, 0, 0, 0, 0], [0, 1, 0, 1, 0, 0], [0, 0, 0, 0, 0, 1]];
wasp_part[2] = [[0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 16, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0]];
var trampoline_part = [];
trampoline_part[0] = [[0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 7, 0, 0], [1, 1, 1, 1, 1, 0]];
var beehive_part = [];
beehive_part[0] = [[0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 15, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0]];
var leaf_part = [];
leaf_part[0] = [[0, 0, 26, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0]];
enemy_part = [];
enemy_part = enemy_part.concat(mantis_part);
enemy_part = enemy_part.concat(scorpion_part);
enemy_part = enemy_part.concat(wasp_part);
Frame 4
function initmc() {
tile.Tile.init();
rows = 32;
cols = 32;
_root.createEmptyMovieClip("scene", 3);
_root.scene.createEmptyMovieClip("empty", tile.Dep.corddep);
var _local2 = Math.ceil(game.level / 4);
_root.attachMovie("bg1", "bg1", 1);
_root.bg1.gotoAndStop(_local2);
_root.attachMovie("bg2", "bg2", 2);
_root.bg2.gotoAndStop(_local2);
}
function initbitmap() {
if (bitmap == null) {
bitmap = new flash.display.BitmapData(1600, 1600, true, 16777215);
} else {
bitmap.fillRect(new flash.geom.Rectangle(0, 0, 1600, 1600), 16777215);
}
_root.scene.attachBitmap(bitmap, 8);
}
function init_arrs() {
arrs = [];
var _local1 = 0;
while (_local1 < (rows - 1)) {
arrs[_local1] = [];
var _local2 = 0;
while (_local2 < cols) {
arrs[_local1][_local2] = 0;
_local2++;
}
_local1++;
}
_local1 = rows - 1;
arrs[_local1] = [];
var _local2 = 0;
while (_local2 < cols) {
arrs[_local1][_local2] = 1;
_local2++;
}
}
function creatItem(item) {
var _local1 = true;
while (_local1) {
x = random(30) + 1;
y = random(30) + 1;
if (arrs[y][x] == 0) {
arrs[y][x] = item;
_local1 = false;
}
}
}
function creatlevel() {
var _local7 = 0;
while (_local7 < 5) {
var _local5 = 0;
while (_local5 < 5) {
var _local6 = normal_part[random(normal_part.length)];
var _local4 = _local7 * 6;
var _local3 = _local5 * 6;
var _local2 = _local4;
while (_local2 < (_local4 + 6)) {
var _local1 = _local3;
while (_local1 < (_local3 + 6)) {
arrs[_local2 + 1][_local1 + 1] = _local6[_local2 - _local4][_local1 - _local3];
_local1++;
}
_local2++;
}
_local5++;
}
_local7++;
}
}
function generatefly() {
flys = up;
var _local2 = 0;
while (_local2 < rows) {
var _local1 = 0;
while (_local1 < cols) {
s = arrs[_local2][_local1];
if (!(s === 20)) {
} else {
if (tiles[_local2][_local1].func == "nothing") {
tiles[_local2][_local1] = new tile.Tile(_local2, _local1, "fly", "fly");
}
var _local3 = minimap.attachMovie("minifly", (("minifly" + _local2) + "_") + _local1, (_local2 * 32) + _local1);
_local3._y = _local2 * 2;
_local3._x = _local1 * 2;
}
_local1++;
}
_local2++;
}
}
function testlen(x, y) {
var _local2 = 0;
while (_local2 < _root.waspss.length) {
if ((Math.abs(_root.waspss[_local2][0] - y) + Math.abs(_root.waspss[_local2][1] - x)) < 6) {
return(false);
}
_local2++;
}
return(true);
}
function generatelevel() {
flys = 0;
_root.scene._visible = true;
_root.bg1._visible = true;
_root.bg2._visible = true;
while (flys < up) {
if ((flys == 0) || (flys == 3)) {
x = random(10) + 1;
y = random(30) + 1;
} else if ((flys == 1) || (flys == 4)) {
x = random(10) + 10;
y = random(30) + 1;
} else if ((flys == 2) || (flys == 5)) {
x = random(10) + 10;
y = random(30) + 1;
} else {
x = random(30) + 1;
y = random(30) + 1;
}
if ((arrs[y][x] == 0) && (testlen(x, y))) {
if ((arrs[y][x - 1] == 18) || (arrs[y][x + 1] == 18)) {
} else {
arrs[y][x] = 20;
_root.waspss.push([y, x]);
flys++;
}
}
}
ui.afly = up;
_root.ui.cfly = 0;
tiles = [];
knifes = [];
moves = [];
agents = [];
minimap = ui.attachMovie("minimap", "minimap", 1, {_x:480, _y:5});
ui.minimap.attachMovie("minispider", "minispider", 10000);
_root.scene.createEmptyMovieClip("beehives", 20001);
trace(game.level);
var _local3 = 0;
while (_local3 < rows) {
tiles[_local3] = [];
var _local2 = 0;
while (_local2 < cols) {
s = arrs[_local3][_local2];
switch (s) {
case 0 :
tiles[_local3][_local2] = new tile.Tile(_local3, _local2);
break;
case 1 :
if (game.level < 5) {
tiles[_local3][_local2] = new tile.Tile(_local3, _local2, "world_1_tile", "stone");
} else if (game.level < 9) {
tiles[_local3][_local2] = new tile.Tile(_local3, _local2, "world_2_tile", "stone");
} else {
tiles[_local3][_local2] = new tile.Tile(_local3, _local2, "world_3_tile", "stone");
}
break;
case 2 :
tiles[_local3][_local2] = new tile.Tile(_local3, _local2, "cloud", "cloud");
break;
case 4 :
tiles[_local3][_local2] = new tile.Tile(_local3, _local2, "knife", "knife");
knifes.push(tiles[_local3][_local2]);
break;
case 3 :
tiles[_local3][_local2] = new tile.Tile(_local3, _local2, "lader", "lader");
break;
case 5 :
tiles[_local3][_local2] = new tile.Tile(_local3, _local2, "soap", "soap");
break;
case 6 :
trace("spike");
tiles[_local3][_local2] = new tile.Tile(_local3, _local2, "", "stone");
agents.push(new agent.Spike(_local3, _local2));
break;
case 7 :
tiles[_local3][_local2] = new tile.Tile(_local3, _local2);
agents.push(new agent.Trampoline(_local3, _local2));
break;
case 8 :
tiles[_local3][_local2] = new tile.Tile(_local3, _local2, "water", "water");
break;
case 9 :
tiles[_local3][_local2] = new tile.Tile(_local3, _local2);
agents.push(new agent.Moveh(_local3, _local2));
break;
case 10 :
tiles[_local3][_local2] = new tile.Tile(_local3, _local2);
agents.push(new agent.Movev(_local3, _local2));
break;
case 19 :
tiles[_local3][_local2] = new tile.Tile(_local3, _local2, "airvent", "airvent");
break;
case 15 :
trace("beehive");
tiles[_local3][_local2] = new tile.Tile(_local3, _local2);
agents.push(new agent.Beehive(_local3, _local2));
break;
case 16 :
tiles[_local3][_local2] = new tile.Tile(_local3, _local2);
if (random(2) == 0) {
agents.push(new agent.Wasp(_local3, _local2));
} else {
agents.push(new agent.Magpie(_local3, _local2));
}
break;
case 17 :
tiles[_local3][_local2] = new tile.Tile(_local3, _local2);
agents.push(new agent.Mantis(_local3, _local2));
break;
case 18 :
tiles[_local3][_local2] = new tile.Tile(_local3, _local2);
agents.push(new agent.Scorpion(_local3, _local2));
break;
case 20 :
tiles[_local3][_local2] = new tile.Tile(_local3, _local2, "fly", "fly");
var _local4 = minimap.attachMovie("minifly", (("minifly" + _local3) + "_") + _local2, (_local3 * 32) + _local2);
_local4._y = _local3 * 2;
_local4._x = _local2 * 2;
break;
case 21 :
tiles[_local3][_local2] = new tile.Tile(_local3, _local2, "energy", "energy");
break;
case 22 :
tiles[_local3][_local2] = new tile.Tile(_local3, _local2, "timeup", "timeup");
break;
case 23 :
tiles[_local3][_local2] = new tile.Tile(_local3, _local2, "helicopter", "helicopter");
break;
case 24 :
tiles[_local3][_local2] = new tile.Tile(_local3, _local2, "longweb", "longweb");
break;
case 25 :
tiles[_local3][_local2] = new tile.Tile(_local3, _local2, "invincible", "invincible");
break;
case 26 :
tiles[_local3][_local2] = new tile.Tile(_local3, _local2);
agents.push(new agent.Leaf(_local3, _local2));
break;
case 30 :
trace("dec");
if (game.level < 5) {
tiles[_local3][_local2] = new tile.Tile(_local3, _local2, "world_1_dec", "dec");
} else if (game.level < 9) {
tiles[_local3][_local2] = new tile.Tile(_local3, _local2, "world_2_dec", "dec");
} else {
tiles[_local3][_local2] = new tile.Tile(_local3, _local2, "world_3_dec", "dec");
}
break;
default :
tiles[_local3][_local2] = new tile.Tile(_local3, _local2);
}
_local2++;
}
_local3++;
}
}
function initlevel() {
if (spider == null) {
spider = new agent.Spider();
} else {
_root.spider.initmc(20, 20);
}
mousedown = true;
this.onMouseDown = function () {
spider.MouseDown();
Mouse.hide();
};
this.onMouseUp = function () {
spider.MouseUp();
};
sttime = getTimer();
this.onEnterFrame = function () {
if (timeup_mc) {
return(undefined);
}
cursor._x = _xmouse;
cursor._y = _ymouse;
var _local2 = uptime - int((getTimer() - sttime) / 1000);
if (_local2 < 15) {
if (ui.timer._currentframe == 1) {
ui.timer.play();
}
if (_local2 <= 0) {
_root.attachMovie("timeup_mc", "timeup_mc", _root.getNextHighestDepth());
_root.ui.timer.gotoAndStop(1);
ui.time = "00:00";
spider.life--;
sttime = getTimer();
if (spider.life > 0) {
return(undefined);
}
_local2 = uptime;
}
} else {
ui.timer.gotoAndStop(1);
}
mtime = Math.floor(_local2 / 60);
_local2 = _local2 % 60;
if (_local2 < 10) {
ui.time = (("0" + mtime) + ":0") + _local2;
} else {
ui.time = (("0" + mtime) + ":") + _local2;
}
if (mousedown) {
spider.run();
}
tile.Tile.canfunc();
tile.Tile.canback();
};
}
function attachMap() {
var _local2 = SharedObject.getLocal("firsted");
if (_local2.data.firsted == undefined) {
_root.attachMovie("helpui", "helpui", 45);
Mouse.show();
_local2.data.firsted = 1;
_local2.flush();
}
startSound("level_map");
_root.scene._visible = false;
_root.bg1._visible = false;
_root.bg2._visible = false;
if (game.level <= 12) {
_root.attachMovie("levelmap", "levelmap", 40);
_root.levelmap.gotoAndPlay(((game.level - 1) * 10) + 2);
} else if (_root.game.level == 13) {
_root.spider.win();
}
}
var bitmap;
_root.attachMovie("cursor", "cursor", 20);
_root.attachMovie("ui", "ui", 10);
var up;
var uptime;
if (_root.mode == "esay") {
up = 5;
uptime = 100;
}
if (_root.mode == "normal") {
up = 7;
uptime = 90;
}
if (_root.mode == "hard") {
up = 10;
uptime = 80;
}
attachMap();
Frame 5
Mouse.show();
stopSound();
game_over.start(0, 1);
_root.attachMovie("overui", "ui", 1);
Frame 6
Mouse.show();
startSound("mainscreen");
_root.attachMovie("winui", "ui", 1);
Frame 7
_root.attachMovie("helpui", "ui", 1);
Mouse.show();
Symbol 14 MovieClip Frame 1
var num = 0;
onEnterFrame = function () {
var _local2 = _root.getBytesLoaded();
var _local3 = _root.getBytesTotal();
loaded._xscale = int((_local2 / _local3) * 100);
num = int((_local2 / _local3) * 100) + "%";
if (loaded._xscale >= 100) {
_root.play();
}
};
Symbol 27 MovieClip Frame 1
gotoAndStop(_root.localization_language_nr);
Symbol 29 Button
on (release) {
getURL (_root.localization_url1, "_blank");
}
Symbol 70 MovieClip Frame 1
gotoAndStop(_root.localization_branding_nr);
stop();
Symbol 1227 MovieClip [__Packages.Vector] Frame 0
class Vector
{
var x, y;
function Vector (px, py) {
x = px;
y = py;
}
function setTo(px, py) {
x = px;
y = py;
}
function copy(v) {
x = v.x;
y = v.y;
}
function dot(v) {
return((x * v.x) + (y * v.y));
}
function cross(v) {
return((x * v.y) - (y * v.x));
}
function plus(v) {
x = x + v.x;
y = y + v.y;
return(this);
}
function plusNew(v) {
return(new Vector(x + v.x, y + v.y));
}
function minus(v) {
x = x - v.x;
y = y - v.y;
return(this);
}
function minusNew(v) {
return(new Vector(x - v.x, y - v.y));
}
function mult(s) {
x = x * s;
y = y * s;
return(this);
}
function multNew(s) {
return(new Vector(x * s, y * s));
}
function distance(v) {
var _local3 = x - v.x;
var _local2 = y - v.y;
return(Math.sqrt((_local3 * _local3) + (_local2 * _local2)));
}
function normalize() {
var _local2 = Math.sqrt((x * x) + (y * y));
x = x / _local2;
y = y / _local2;
return(this);
}
function magnitude() {
return(Math.sqrt((x * x) + (y * y)));
}
function project(b) {
var _local5 = dot(b);
var _local4 = (b.x * b.x) + (b.y * b.y);
var _local3 = new Vector(0, 0);
_local3.x = (_local5 / _local4) * b.x;
_local3.y = (_local5 / _local4) * b.y;
return(_local3);
}
}
Symbol 1228 MovieClip [__Packages.Game] Frame 0
class Game
{
var level, root, tarr;
function Game (mc) {
level = 1;
root = mc;
}
function initLevel() {
tile.Dep.tiledep = 2000;
if (_root.game.level >= 13) {
_root.spider.win();
return(undefined);
}
_root.initmc();
_root.init_arrs();
_root.creatlevel();
_root.waspss = [];
esaylevel();
_root.generatelevel();
_root.initlevel();
}
function resetLevel() {
_root.initmc();
_root.generatelevel();
_root.initlevel();
}
function addspikes() {
var _local10 = true;
while (_local10) {
var _local7 = random(5);
var _local8 = random(5);
if (tarr[_local8][_local7] == 0) {
tarr[_local8][_local7] = 1;
var _local9 = _root.spike_part[random(_root.spike_part.length)];
_local10 = false;
var _local6 = _local8 * 6;
var _local5 = _local7 * 6;
var _local4 = _local6;
while (_local4 < (_local6 + 6)) {
var _local3 = _local5;
while (_local3 < (_local5 + 6)) {
_root.arrs[_local4 + 1][_local3 + 1] = _local9[_local4 - _local6][_local3 - _local5];
_local3++;
}
_local4++;
}
}
}
}
function addenemy() {
var _local10 = true;
while (_local10) {
var _local7 = random(5);
if (_local7 == 0) {
var _local8 = random(3) + 1;
} else {
var _local8 = random(4);
}
if (tarr[_local8][_local7] == 0) {
tarr[_local8][_local7] = 1;
if (_root.mode == "hard") {
var _local9 = _root.enemy_part[random(_root.enemy_part.length)];
} else if (_root.mode == "normal") {
var _local9 = _root.enemy_part[random(_root.enemy_part.length) - 1];
} else {
var _local9 = _root.enemy_part[random(_root.enemy_part.length) - 2];
}
_local10 = false;
var _local6 = _local8 * 6;
var _local5 = _local7 * 6;
var _local4 = _local6;
while (_local4 < (_local6 + 6)) {
var _local3 = _local5;
while (_local3 < (_local5 + 6)) {
_root.arrs[_local4 + 1][_local3 + 1] = _local9[_local4 - _local6][_local3 - _local5];
if (_root.arrs[_local4 + 1][_local3 + 1] == 16) {
_root.waspss.push([_local4 + 1, _local3 + 1]);
}
_local3++;
}
_local4++;
}
}
}
}
function addmove() {
var _local10 = true;
while (_local10) {
var _local7 = random(5);
var _local8 = random(4);
if (tarr[_local8][_local7] == 0) {
tarr[_local8][_local7] = 1;
var _local9 = _root.moveh_part[random(_root.moveh_part.length)];
_local10 = false;
var _local6 = _local8 * 6;
var _local5 = _local7 * 6;
var _local4 = _local6;
while (_local4 < (_local6 + 6)) {
var _local3 = _local5;
while (_local3 < (_local5 + 6)) {
_root.arrs[_local4 + 1][_local3 + 1] = _local9[_local4 - _local6][_local3 - _local5];
_local3++;
}
_local4++;
}
}
}
}
function addknife() {
var _local10 = true;
while (_local10) {
var _local7 = random(5);
var _local8 = random(4);
if (tarr[_local8][_local7] == 0) {
tarr[_local8][_local7] = 1;
var _local9 = _root.knife_part[random(_root.knife_part.length)];
_local10 = false;
var _local6 = _local8 * 6;
var _local5 = _local7 * 6;
var _local4 = _local6;
while (_local4 < (_local6 + 6)) {
var _local3 = _local5;
while (_local3 < (_local5 + 6)) {
_root.arrs[_local4 + 1][_local3 + 1] = _local9[_local4 - _local6][_local3 - _local5];
_local3++;
}
_local4++;
}
}
}
}
function addsoap() {
var _local10 = true;
while (_local10) {
var _local7 = random(5);
var _local8 = random(4);
if (tarr[_local8][_local7] == 0) {
tarr[_local8][_local7] = 1;
var _local9 = _root.soap_part[random(_root.soap_part.length)];
_local10 = false;
var _local6 = _local8 * 6;
var _local5 = _local7 * 6;
var _local4 = _local6;
while (_local4 < (_local6 + 6)) {
var _local3 = _local5;
while (_local3 < (_local5 + 6)) {
_root.arrs[_local4 + 1][_local3 + 1] = _local9[_local4 - _local6][_local3 - _local5];
_local3++;
}
_local4++;
}
}
}
}
function addleaf() {
var _local10 = true;
while (_local10) {
var _local7 = random(5);
var _local8 = random(3);
if (tarr[_local8][_local7] == 0) {
tarr[_local8][_local7] = 1;
var _local9 = _root.leaf_part[random(_root.leaf_part.length)];
_local10 = false;
var _local6 = _local8 * 6;
var _local5 = _local7 * 6;
var _local4 = _local6;
while (_local4 < (_local6 + 6)) {
var _local3 = _local5;
while (_local3 < (_local5 + 6)) {
_root.arrs[_local4 + 1][_local3 + 1] = _local9[_local4 - _local6][_local3 - _local5];
_local3++;
}
_local4++;
}
}
}
}
function addbeehive() {
var _local10 = true;
while (_local10) {
var _local7 = random(5);
var _local8 = random(3);
if (tarr[_local8][_local7] == 0) {
tarr[_local8][_local7] = 1;
var _local9 = _root.beehive_part[random(_root.beehive_part.length)];
_local10 = false;
var _local6 = _local8 * 6;
var _local5 = _local7 * 6;
var _local4 = _local6;
while (_local4 < (_local6 + 6)) {
var _local3 = _local5;
while (_local3 < (_local5 + 6)) {
_root.arrs[_local4 + 1][_local3 + 1] = _local9[_local4 - _local6][_local3 - _local5];
_local3++;
}
_local4++;
}
}
}
}
function addairvent() {
var _local10 = true;
while (_local10) {
var _local7 = random(5);
var _local8 = random(4);
if (tarr[_local8][_local7] == 0) {
tarr[_local8][_local7] = 1;
var _local9 = _root.airvent_part[random(_root.airvent_part.length)];
_local10 = false;
var _local6 = _local8 * 6;
var _local5 = _local7 * 6;
var _local4 = _local6;
while (_local4 < (_local6 + 6)) {
var _local3 = _local5;
while (_local3 < (_local5 + 6)) {
_root.arrs[_local4 + 1][_local3 + 1] = _local9[_local4 - _local6][_local3 - _local5];
_local3++;
}
_local4++;
}
}
}
}
function addcloud() {
var _local10 = true;
while (_local10) {
var _local7 = random(5);
var _local8 = random(4);
if (tarr[_local8][_local7] == 0) {
tarr[_local8][_local7] = 1;
var _local9 = _root.cloud_part[random(_root.cloud_part.length)];
_local10 = false;
var _local6 = _local8 * 6;
var _local5 = _local7 * 6;
var _local4 = _local6;
while (_local4 < (_local6 + 6)) {
var _local3 = _local5;
while (_local3 < (_local5 + 6)) {
_root.arrs[_local4 + 1][_local3 + 1] = _local9[_local4 - _local6][_local3 - _local5];
_local3++;
}
_local4++;
}
}
}
}
function addwater() {
var _local10 = true;
while (_local10) {
var _local7 = random(5);
var _local8 = 4;
if (tarr[_local8][_local7] == 0) {
tarr[_local8][_local7] = 1;
var _local9 = _root.water_part[random(_root.water_part.length)];
_local10 = false;
var _local6 = _local8 * 6;
var _local5 = _local7 * 6;
var _local4 = _local6;
while (_local4 < (_local6 + 6)) {
var _local3 = _local5;
while (_local3 < (_local5 + 6)) {
_root.arrs[_local4 + 1][_local3 + 1] = _local9[_local4 - _local6][_local3 - _local5];
_local3++;
}
_local4++;
}
}
}
}
function addtrampoline() {
var _local10 = true;
while (_local10) {
var _local7 = random(5);
var _local8 = random(4);
if (tarr[_local8][_local7] == 0) {
tarr[_local8][_local7] = 1;
var _local9 = _root.trampoline_part[random(_root.trampoline_part.length)];
_local10 = false;
var _local6 = _local8 * 6;
var _local5 = _local7 * 6;
var _local4 = _local6;
while (_local4 < (_local6 + 6)) {
var _local3 = _local5;
while (_local3 < (_local5 + 6)) {
_root.arrs[_local4 + 1][_local3 + 1] = _local9[_local4 - _local6][_local3 - _local5];
_local3++;
}
_local4++;
}
}
}
}
function esaylevel() {
tarr = [[0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0]];
switch (level) {
case 1 :
addenemy();
if (_root.mode == "hard") {
} else if (_root.mode == "normal") {
_root.creatItem(22);
} else {
_root.creatItem(21);
_root.creatItem(22);
}
break;
case 2 :
addmove();
addsoap();
addsoap();
addsoap();
addenemy();
if (_root.mode == "easy") {
}
break;
case 3 :
addspikes();
addspikes();
addspikes();
addsoap();
addsoap();
addsoap();
addenemy();
if (_root.mode == "hard") {
} else if (_root.mode == "normal") {
_root.creatItem(22);
} else {
_root.creatItem(21);
_root.creatItem(22);
}
break;
case 4 :
addmove();
addmove();
addsoap();
addsoap();
addsoap();
addknife();
addknife();
addknife();
addenemy();
if ((_root.mode == "normal") || (_root.mode == "hard")) {
_root.creatItem(21);
}
_root.creatItem(25);
break;
case 5 :
addtrampoline();
addtrampoline();
addenemy();
addenemy();
if (_root.mode == "easy") {
_root.creatItem(22);
_root.creatItem(21);
}
_root.creatItem(25);
break;
case 6 :
addmove();
addtrampoline();
addtrampoline();
addwater();
addwater();
addwater();
addenemy();
addenemy();
_root.creatItem(23);
if (_root.mode == "easy") {
_root.creatItem(22);
} else if (_root.mode == "normal") {
_root.creatItem(21);
}
break;
case 7 :
addmove();
addmove();
addenemy();
addenemy();
addairvent();
addairvent();
addairvent();
if (_root.mode == "easy") {
_root.creatItem(21);
}
_root.creatItem(22);
_root.creatItem(23);
break;
case 8 :
addmove();
addmove();
addtrampoline();
addtrampoline();
addenemy();
addenemy();
addairvent();
addairvent();
addwater();
addwater();
addwater();
if (_root.mode == "easy") {
}
break;
case 9 :
addmove();
addenemy();
addenemy();
addenemy();
addleaf();
addleaf();
addbeehive();
addbeehive();
if (_root.mode == "easy") {
_root.creatItem(22);
_root.creatItem(21);
}
_root.creatItem(23);
break;
case 10 :
addmove();
addbeehive();
addbeehive();
addbeehive();
addenemy();
addenemy();
addenemy();
addleaf();
addleaf();
if (_root.mode == "easy") {
_root.creatItem(22);
}
break;
case 11 :
addmove();
addmove();
addleaf();
addleaf();
addleaf();
addenemy();
addenemy();
addenemy();
addcloud();
addcloud();
addcloud();
if (_root.mode == "easy") {
_root.creatItem(21);
}
_root.creatItem(25);
break;
case 12 :
addmove();
addmove();
addbeehive();
addbeehive();
addcloud();
addcloud();
addcloud();
addenemy();
addenemy();
if (_root.mode != "easy") {
break;
}
_root.creatItem(21);
}
if (_root.mode == "normal") {
addenemy();
addenemy();
} else if (_root.mode == "hard") {
addenemy();
addenemy();
addenemy();
addenemy();
}
}
static var esay = {fly:20, enemy:10};
static var normal = {fly:40, enemy:20};
static var hard = {fly:60, enemy:30};
}
Symbol 1229 MovieClip [__Packages.tile.Dep] Frame 0
class tile.Dep
{
function Dep () {
}
static function init() {
bg1dep = 5;
bg2dep = 6;
decdep = 10;
tiledep = 2000;
corddep = 9999;
enemydep = 10000;
flydep = 18000;
chardep = 19000;
tempdep = 20000;
cordmcdep = 30000;
}
static var decdep = 10;
static var tiledep = 2000;
static var corddep = 9999;
static var cordmcdep = 30000;
static var enemydep = 10000;
static var chardep = 15000;
static var tempdep = 20000;
static var bg1dep = 5;
static var bg2dep = 6;
static var flydep = 18000;
}
Symbol 1230 MovieClip [__Packages.agent.Moveh] Frame 0
class agent.Moveh
{
var i, j, xspeed, yspeed, dir, mc, initx, inity;
function Moveh (_i, _j) {
trace("Moveh");
i = _i;
j = _j;
xspeed = 0;
yspeed = 0;
dir = random(2);
mc = _root.scene.attachMovie("movehtile", "move" + tile.Dep.enemydep, tile.Dep.enemydep);
tile.Dep.enemydep++;
initx = (mc._x = j * tile.Tile.w);
inity = (mc._y = i * tile.Tile.h);
}
function run(spider) {
if (dir == 1) {
xspeed = 5;
} else {
xspeed = -5;
}
mc._x = mc._x + xspeed;
if (xspeed > 0) {
if ((_root.tiles[i][Math.floor(mc._x / tile.Tile.w) + 1].walkable == 0) || (mc._x > 1500)) {
dir = 0;
}
} else if ((_root.tiles[i][Math.floor(mc._x / tile.Tile.w)].walkable == 0) || (mc._x < 50)) {
dir = 1;
}
if (spider.oncoper) {
return(undefined);
}
if (mc.hitTest((_root.scene._x + spider.mc.x) + spider.w2, (_root.scene._y + spider.mc.y) + spider.h2, true) || (mc.hitTest((_root.scene._x + spider.mc.x) - spider.w2, (_root.scene._y + spider.mc.y) + spider.h2, true))) {
if ((spider.__get__y() + spider.w2) < mc._y) {
spider.onground = true;
spider.groundtile = this;
spider.onair = false;
spider.vy = 0;
spider.mc.y = (mc._y - spider.h2) - 0.5;
}
}
}
var range = 300;
var speed = 3;
}
Symbol 1231 MovieClip [__Packages.tile.Tile] Frame 0
class tile.Tile
{
static var backarr, funcarr;
var time, i, j, fx, fy, xspeed, yspeed, dir, graphic, func, walkable, mc, functime;
function Tile (_i, _j, _graphic, _func) {
time = getTimer();
i = _i;
j = _j;
fx = 0;
fy = 0;
xspeed = 0;
yspeed = 0;
dir = random(2);
if (_func == "airvent") {
fy = -1.2;
}
graphic = _graphic;
func = _func;
walkable = 1;
if (((func == "stone") || (func == "soap")) || (func == "cloud")) {
walkable = 0;
}
initmc();
}
static function init() {
backarr = [];
funcarr = [];
}
function lader(spider) {
}
function initmc() {
if (graphic) {
if (func == "fly") {
mc = _root.scene.attachMovie(graphic, "tile" + tile.Dep.flydep, tile.Dep.flydep++);
} else if (func == "dec") {
mc = _root.scene.attachMovie(graphic, "tile" + tile.Dep.decdep, tile.Dep.decdep++);
mc.gotoAndStop(random(mc._totalframes) + 1);
} else {
mc = _root.scene.attachMovie(graphic, "tile" + tile.Dep.tiledep, tile.Dep.tiledep++);
}
if (func == "lader") {
if (_root.game.level < 5) {
} else if (_root.game.level < 9) {
mc.gotoAndStop(2);
} else {
mc.gotoAndStop(3);
}
}
mc._x = j * w;
mc._y = i * h;
mc.txt = (j + "_") + i;
}
}
function stone(char) {
}
function water(spider) {
if (mc.hitTest(_root.scene._x + spider.mc.x, (_root.scene._y + spider.mc.y) + 6, true)) {
spider.__set__hp(0);
}
}
function airvent(spider) {
}
function fly(spider) {
if (mc.hitTest(spider.mc)) {
_root.getfly.start(0, 1);
mc.removeMovieClip();
mc = null;
_root.ui.minimap[(("minifly" + i) + "_") + j].removeMovieClip();
spider.__set__score(spider.__get__score() + Game[_root.mode].fly);
_root.flys--;
_root.tiles[i][j].func = "nothing";
spider.mc.char.gotoAndStop(7);
spider.preframe = 7;
trace((((spider.mc.char + " ") + spider.preframe) + " ") + spider.mc.char._totalframes);
_root.ui.cfly = _root.up - _root.flys;
if (_root.flys == 0) {
_root.game.level++;
_root.onMouseDown = null;
_root.onEnterFrame = null;
spider.stopsound();
Mouse.show();
_root.ui.timer.gotoAndStop(1);
_root.attachMovie("levelcomplete", "levelcomplete", 30);
_root.levelcomplete.energy = spider.hp;
_root.levelcomplete.time = 120 - int((getTimer() - _root.sttime) / 1000);
_root.levelcomplete.score = spider.score;
}
}
}
function nothing(spider) {
}
function knife2(spider) {
if (mc.hitTest(spider.mc)) {
if ((getTimer() - time) > 300) {
var _local5 = spider.y - (mc._y + (w / 1.5));
var _local6 = spider.x - (mc._x + (w / 2));
var _local4 = Math.atan2(_local5, _local6);
spider.vx = 6 * Math.cos(_local4);
spider.vy = 6 * Math.sin(_local4);
spider.hp = spider.hp - 5;
time = getTimer();
_root.spiked.start(0, 1);
}
}
}
function knife(spider) {
if (_root.scene.empty.hitTest(mc)) {
var _local4 = new geom.Vecter(mc._x + 25, mc._y + 25);
var _local7 = new geom.Linev(spider.cord.m1.pos, new geom.Vecter(spider.__get__x(), spider.__get__y()));
var _local6 = new geom.Linev(spider.cord.m1.pos, new geom.Vecter(spider.mc.x, spider.mc.y));
var _local5 = new geom.Linev(new geom.Vecter(spider.__get__x(), spider.__get__y()), new geom.Vecter(spider.mc.x, spider.mc.y));
if (((_local7.TestPoint(_local4) < 0) && (_local6.TestPoint(_local4) > 0)) && (_local5.TestPoint(_local4) < 0)) {
return(true);
}
return(false);
}
return(false);
}
function cloud(spider) {
}
function helicopter(spider) {
if (mc.hitTest(spider.mc)) {
_root.getitem.start();
spider.mc.char.gotoAndStop("helicopter");
spider.oncoper = true;
spider.onground = false;
spider.onswing = false;
spider.groundtile = null;
mc.removeMovieClip();
addback(this);
functime = getTimer() + 6000;
funcarr.push(this);
}
}
function timeup(spider) {
if (mc.hitTest(spider.mc)) {
trace("timeup");
_root.getitem.start();
_root.sttime = _root.sttime + 15000;
mc.removeMovieClip();
addback(this);
}
}
function longweb(spider) {
if (mc.hitTest(spider.mc)) {
trace("longweb");
_root.getitem.start();
spider.maxlen = true;
mc.removeMovieClip();
addback(this);
functime = getTimer() + 20000;
funcarr.push(this);
}
}
function invincible(spider) {
if (mc.hitTest(spider.mc)) {
trace("invincible");
_root.getitem.start();
spider.invincible = true;
mc.removeMovieClip();
addback(this);
functime = getTimer() + 10000;
funcarr.push(this);
_root.startSound("invincible_power");
_root.invic.start(0, 1);
}
}
function energy(spider) {
if (mc.hitTest(spider.mc)) {
trace("energy");
_root.getitem.start();
if (spider.__get__life() >= 3) {
spider.__set__hp(20);
} else {
spider.__set__life((spider.__get__life()+1));
}
mc.removeMovieClip();
func = "nothing";
}
}
function funcback() {
var _local3 = _root.spider;
if (func == "invincible") {
_local3.invincible = false;
_local3.mc._alpha = 100;
if (_root.game.level < 5) {
_root.stopSound();
_root.startSound("world1");
} else if (_root.game.level < 9) {
_root.stopSound();
_root.startSound("world2");
} else {
_root.stopSound();
_root.startSound("world3");
}
}
if (func == "longerweb") {
_local3.cord.maxlen = false;
}
if (func == "helicopter") {
_local3.oncoper = false;
_local3.mc.char.gotoAndStop("normal");
}
}
function back() {
initmc();
}
static function addback(t) {
t.backtime = getTimer() + 20000;
backarr.push(t);
}
static function canfunc() {
var _local3 = getTimer();
var _local1 = 0;
while (_local1 < funcarr.length) {
var _local2 = tile.Tile(funcarr[_local1]);
if (_local3 > _local2.functime) {
_local2.funcback();
funcarr.splice(_local1, 1);
break;
}
_local1++;
}
}
static function canback() {
var _local3 = getTimer();
var _local1 = 0;
while (_local1 < backarr.length) {
var _local2 = tile.Tile(backarr[_local1]);
if (_local3 > _local2.backtime) {
_local2.back();
backarr.splice(_local1, 1);
break;
}
_local1++;
}
}
static var w = 50;
static var h = 50;
}
Symbol 1232 MovieClip [__Packages.geom.Mass] Frame 0
class geom.Mass
{
var m, vel, pos, force, acc;
function Mass (am) {
m = am;
vel = new geom.Vecter();
pos = new geom.Vecter();
force = new geom.Vecter();
acc = new geom.Vecter();
}
function get x() {
return(pos.x);
}
function set x(v) {
pos.x = v;
//return(x);
}
function get y() {
return(pos.y);
}
function set y(v) {
pos.y = v;
//return(y);
}
function applyForce(f) {
force.x = force.x + f.x;
force.y = force.y + f.y;
}
function getacc() {
pos.plus(vel.x, vel.y);
}
}
Symbol 1233 MovieClip [__Packages.geom.Vecter] Frame 0
class geom.Vecter
{
var x, y;
function Vecter (ax, ay) {
if (ax != null) {
x = ax;
y = ay;
} else {
x = 0;
y = 0;
}
}
static function getdot(a, b) {
return((a.x * b.x) + (a.y * b.y));
}
function clone() {
return(new geom.Vecter(x, y));
}
function normal() {
var _local2 = length();
x = x / _local2;
y = y / _local2;
return(this);
}
function getMag() {
return(Math.sqrt((x * x) + (y * y)));
}
function length() {
return(Math.sqrt((x * x) + (y * y)));
}
function plus(x, y) {
this.x = this.x + x;
this.y = this.y + y;
return(this);
}
function addv(v) {
x = x + v.x;
y = y + v.y;
return(this);
}
function reset(x, y) {
this.x = x;
this.y = y;
}
function scale(s) {
x = x * s;
y = y * s;
return(this);
}
static function getminus2(vb, va) {
return(new geom.Vecter(va.x - vb.x, va.y - vb.y));
}
static function getminus(va, vb) {
return(new geom.Vecter(va.x - vb.x, va.y - vb.y));
}
static function getaddv(va, vb) {
return(new geom.Vecter(va.x + vb.x, va.y + vb.y));
}
}
Symbol 1234 MovieClip [__Packages.agent.Spider] Frame 0
class agent.Spider extends geom.Mass
{
var fx, fy, vx, vy, hurttime, raycast, onair, onground, onlader, onswing, swingtime, onsoap, oncoper, _hp, invincible, mc, _life, _score, maxlen, xiaoshiclouds, x, y, cord, ctile, groundtile, debug, preframe;
function Spider () {
super(1);
hp = (20);
life = (3);
score = (0);
fx = 0;
fy = 0;
vx = 0.1;
vy = 0;
hurttime = getTimer();
raycast = new geom.Raycast(_root.tiles);
if (_root.scene) {
initmc(20, 20);
}
onair = true;
onground = false;
onlader = false;
onswing = false;
swingtime = 0;
onsoap = false;
oncoper = false;
}
function stopsound() {
_root.flying.stop();
_root.invic.stop();
}
function get hp() {
return(_hp);
}
function set hp(value) {
if (_hp > value) {
if (invincible || (getTimer() < hurttime)) {
return;
}
hurttime = getTimer() + 500;
mc.char.gotoAndStop("hurted");
}
_hp = value;
if (_hp <= 0) {
_hp = 20;
stopsound();
_root.deadsnd.start(0, 1);
mc.char.gotoAndStop("dead");
life = (life - 1);
initmc(20, 20);
}
if (_hp > 20) {
_hp = 20;
}
_root.ui.hp.hpbar._xscale = (_hp * 100) / 20;
//return(hp);
}
function get life() {
return(_life);
}
function set life(value) {
_life = value;
_root.ui.life.gotoAndStop(_life);
MouseUp();
_root.sttime = getTimer();
if ((_life <= 0) && (_root.timeup_mc == null)) {
gameover();
}
//return(life);
}
function get score() {
return(_score);
}
function set score(v) {
_score = v;
_root.ui.score = _score;
//return(score);
}
function gameover() {
_root.onEnterFrame = null;
_root.onMouseDown = null;
Mouse.show();
for (var _local2 in _root) {
_root[_local2].removeMovieClip();
}
_root.gotoAndStop("gameover");
}
function win() {
_root.onEnterFrame = null;
_root.onMouseDown = null;
Mouse.show();
for (var _local2 in _root) {
_root[_local2].removeMovieClip();
}
_root.gotoAndStop("win");
}
function initmc(sx, sy) {
trace("initmc===" + _root.level);
if (_root.game.level < 5) {
_root.stopSound();
_root.startSound("world1");
} else if (_root.game.level < 9) {
_root.stopSound();
_root.startSound("world2");
} else {
_root.stopSound();
_root.startSound("world3");
}
mc = _root.scene.attachMovie("spider", "spider", tile.Dep.chardep);
if (!_root.scene.emety) {
_root.scene.createEmptyMovieClip("empty", tile.Dep.corddep);
}
if (life < 3) {
_root.generatefly();
}
raycast = new geom.Raycast(_root.tiles);
invincible = false;
oncoper = false;
maxlen = false;
invincible = false;
xiaoshiclouds = [];
fx = 0;
fy = 0;
vx = 1;
vy = 0;
hp = (20);
mc.x = (mc._x = sx);
mc.y = (mc._y = sy);
onair = true;
_root.ui.cfly = _root.up - _root.flys;
onground = false;
onlader = false;
onswing = false;
swingtime = 0;
oncoper = false;
}
function MouseDown() {
if (onswing || (oncoper)) {
return(undefined);
}
if (_root.scene.beehives.hitTest(_root._xmouse, _root._ymouse, true)) {
return(undefined);
}
if (getTimer() > swingtime) {
onswing = true;
_root.websound.start(0, 1);
var _local4 = new geom.Mass(1);
_local4.__set__x(x);
_local4.__set__y(y);
var _local3 = _root.scene._xmouse - x;
var _local5 = _root.scene._ymouse - y;
if (_local3 == 0) {
_local3 = 0.1;
}
var _local6 = Math.atan2(_local5, _local3);
var _local7 = Math.cos(_local6);
var _local8 = Math.sin(_local6);
_local4.vel.x = 20 * _local7;
_local4.vel.y = 20 * _local8;
var _local9 = Math.sqrt((_local5 * _local5) + (_local3 * _local3));
cord = new agent.Cord(this, _local4, _local9);
}
}
function MouseUp() {
if (onswing) {
onswing = false;
swingtime = getTimer() + 100;
}
}
function drawcord() {
_root.scene.empty.clear();
_root.scene.empty.lineStyle(2, 16777215);
if (!_root.scene.web) {
_root.scene.attachMovie("web", "web", tile.Dep.cordmcdep);
}
_root.scene.web._visible = true;
_root.scene.web._x = cord.m1.x;
_root.scene.web._y = cord.m1.y;
_root.scene.empty.moveTo(mc._x, mc._y);
_root.scene.empty.lineTo(cord.m1.x, cord.m1.y);
}
function isonair() {
var _local4 = Math.floor((mc.x - w2) / tile.Tile.w);
var _local5 = Math.floor((mc.x + w2) / tile.Tile.w);
var _local3 = Math.floor(((mc.y + w2) + 2) / tile.Tile.w);
if (_root.tiles[_local3][_local4].walkable && (_root.tiles[_local3][_local5].walkable)) {
return(true);
}
return(false);
}
function backcloud() {
var _local2 = 0;
while (_local2 < xiaoshiclouds.length) {
if ((getTimer() - xiaoshiclouds[_local2].backtime) > 0) {
xiaoshiclouds[_local2].walkable = 0;
xiaoshiclouds[_local2].mc._visible = true;
xiaoshiclouds.splice(_local2, 1);
break;
}
_local2++;
}
}
function isontile() {
var _local5 = Math.floor(mc.x / tile.Tile.w);
var _local4 = Math.floor(((mc.y + w2) + 2) / tile.Tile.w);
var _local3 = _root.tiles[_local4][_local5];
if (onsoap == false) {
if (_local3.func == "soap") {
onsoap = true;
_root.soapsound.start(0, 1);
}
} else if (_local3.func != "soap") {
onsoap = false;
}
if ((_local3.walkable == 0) && (_local3.func == "cloud")) {
if (ctile == _local3) {
if ((getTimer() - ctile.ongroundtime) > 3000) {
ctile.walkable = 1;
trace("cloud xiaoshi");
_root.clouded.start(0, 1);
ctile.mc._visible = false;
ctile.backtime = getTimer() + 3000;
xiaoshiclouds.push(ctile);
}
} else {
ctile.ongroundtime = null;
ctile = _local3;
ctile.ongroundtime = getTimer();
}
}
}
function testmovetile() {
if (groundtile != null) {
if (vx > groundtile.xspeed) {
vx = vx - 1;
vx = Math.max(vx, groundtile.xspeed);
} else if (vx < groundtile.xspeed) {
vx = vx + 1;
vx = Math.min(vx, groundtile.xspeed);
}
}
}
function run() {
debug = "";
fx = 0;
fy = 0;
runcount++;
_root.scene.empty.clear();
if (_root.scene.web._visible) {
_root.scene.web._visible = false;
}
_root.cursor.gotoAndStop("z");
backcloud();
onlader = false;
var _local12 = Math.floor(y / tile.Tile.w);
var _local13 = Math.floor(x / tile.Tile.w);
_root.ui.minimap.minispider._x = int(x / 25);
_root.ui.minimap.minispider._y = int(y / 25);
if (_root.tiles[_local12][_local13].func == "lader") {
onlader = true;
}
if (isonair()) {
onair = true;
onground = false;
}
isontile();
testmovetile();
if (oncoper) {
if (mc.char._currentframe <= 3) {
mc.char.gotoAndStop(6);
}
var _local30 = Math.atan2(mc._ymouse, mc._xmouse);
fx = 2 * Math.cos(_local30);
fy = 2 * Math.sin(_local30);
vx = vx + fx;
vy = vy + fy;
if (vx > 6) {
vx = 6;
} else if (vx < -6) {
vx = -6;
}
if (vy > 6) {
vy = 6;
} else if (vy < -6) {
vy = -6;
}
} else {
if (onswing) {
cord.enterframe(this);
fx = fx + cord.fx;
fy = fy + cord.fy;
onlader = false;
}
if (onlader) {
if ((_root.scene._ymouse + 40) < y) {
vy = -5;
} else if ((_root.scene._ymouse - 40) > y) {
vy = 5;
} else {
vy = 0;
}
if ((_root.scene._xmouse + 40) < x) {
vx = -5;
} else if ((_root.scene._xmouse - 40) > x) {
vx = 5;
} else {
vx = 0;
}
mc.x = mc.x + vx;
mc.y = mc.y + vy;
var _local27 = Math.floor(mc.y / tile.Tile.w);
var _local26 = Math.floor(mc.x / tile.Tile.w);
if (_root.tiles[_local27][_local26].func != "lader") {
if ((vy < 0) && (vx == 0)) {
mc.y = _root.tiles[_local12][_local13].mc._y;
}
}
if (mc._xmouse > 30) {
_root.cursor.gotoAndStop("right");
} else if (mc._xmouse < -30) {
_root.cursor.gotoAndStop("left");
}
if (mc._ymouse > 30) {
_root.cursor.gotoAndStop("down");
} else if (mc._ymouse < -30) {
_root.cursor.gotoAndStop("up");
}
mc.x = mc.x - vx;
mc.y = mc.y - vy;
} else {
fx = fx + _root.tiles[_local12][_local13].fx;
fy = fy + _root.tiles[_local12][_local13].fy;
if (_root.tiles[_local12][_local13].fy == -1.2) {
if ((_root.blowup.position == 0) || (_root.blowup.position == _root.blowup.duration)) {
_root.blowup.start(0, 1);
}
}
if (onground || (groundtile != null)) {
var _local30 = Math.atan2(mc._ymouse, mc._xmouse);
if (mc._xmouse > 10) {
fx = fx + 1;
_root.cursor.gotoAndStop("right");
} else if (mc._xmouse < -10) {
fx = fx + -1;
_root.cursor.gotoAndStop("left");
}
if (onsoap) {
vx = vx * soapfriction;
} else {
vx = vx * groundfriction;
}
if (groundtile != null) {
vy = groundtile.yspeed;
if ((fy + mg) < 0) {
onair = true;
groundtile = null;
onground = false;
} else if (((x - w2) > (groundtile.mc._x + tile.Tile.w)) || ((x + w2) < groundtile.mc._x)) {
onair = true;
groundtile = null;
onground = false;
}
}
} else {
fy = fy + mg;
}
}
vx = vx + fx;
vy = vy + fy;
}
if (vx > 0) {
mc.char._xscale = 100;
} else if (vx < 0) {
mc.char._xscale = -100;
}
vx = vx * airfriction;
vy = vy * airfriction;
if (vx > 14) {
vx = 14;
} else if (vx < -14) {
vx = -14;
}
if (vy > 14) {
vy = 14;
} else if (vy < -14) {
vy = -14;
}
if (onground || (groundtile != null)) {
if (Math.abs(vx) < 0.1) {
vx = 0;
if ((preframe != 1) && (preframe < 4)) {
mc.char.gotoAndStop("normal");
}
} else if ((preframe != 2) && (preframe < 4)) {
mc.char.gotoAndStop("leftright");
}
} else if (onlader) {
if ((Math.abs(vx) + Math.abs(vy)) > 3) {
if ((preframe != 2) && (preframe < 4)) {
mc.char.gotoAndStop("leftright");
}
} else if ((preframe != 1) && (preframe < 4)) {
mc.char.gotoAndStop("normal");
}
} else if ((preframe != 3) && (preframe < 4)) {
mc.char.gotoAndStop("updown");
}
mc.x = mc.x + vx;
mc.y = mc.y + vy;
var _local28 = Math.abs(vx) + Math.abs(vy);
var _local4 = 0;
while (_local4 < _root.agents.length) {
_root.agents[_local4].run(this);
_local4++;
}
if (invincible) {
if ((runcount % 6) == 0) {
if (((runcount / 2) % 2) == 0) {
mc._alpha = 40;
} else {
mc._alpha = 100;
}
}
}
_local12 = Math.floor(mc.y / tile.Tile.w);
_local13 = Math.floor(mc.x / tile.Tile.w);
if ((_root.tiles[_local12][_local13].func != "stone") && (_root.tiles[_local12][_local13].func != "knife")) {
_root.tiles[_local12][_local13][_root.tiles[_local12][_local13].func](this);
}
var _local25 = Math.atan2(vy, vx);
var _local32 = Math.cos(_local25);
var _local29 = Math.sin(_local25);
var _local31 = Math.tan(_local25);
var _local11 = new geom.Vecter(x - w2, y - h2);
_local11.j = Math.floor(_local11.x / tile.Tile.w);
_local11.i = Math.floor(_local11.y / tile.Tile.h);
var _local7 = new geom.Vecter(x + w2, y - h2);
_local7.j = Math.floor(_local7.x / tile.Tile.w);
_local7.i = Math.floor(_local7.y / tile.Tile.h);
var _local8 = new geom.Vecter(x + w2, y + h2);
_local8.j = Math.floor(_local8.x / tile.Tile.w);
_local8.i = Math.floor(_local8.y / tile.Tile.h);
var _local9 = new geom.Vecter(x - w2, y + h2);
_local9.j = Math.floor(_local9.x / tile.Tile.w);
_local9.i = Math.floor(_local9.y / tile.Tile.h);
var _local20 = false;
if (vx == 0) {
if (vy > 0) {
if ((_root.tiles[Math.floor((mc.y + w2) / tile.Tile.w)][_local9.j].walkable == 0) || (_root.tiles[Math.floor((mc.y + w2) / tile.Tile.w)][_local7.j].walkable == 0)) {
mc.y = ((Math.floor((mc.y + w2) / tile.Tile.w) * tile.Tile.h) - h2) - 1;
vy = 0;
onground = true;
onair = false;
_local20 = true;
}
} else if (vy < 0) {
if ((_root.tiles[Math.floor((mc.y - w2) / tile.Tile.w)][_local9.j].walkable == 0) || (_root.tiles[Math.floor((mc.y - w2) / tile.Tile.w)][_local7.j].walkable == 0)) {
mc.y = ((Math.floor(1 + ((mc.y - w2) / tile.Tile.w)) * tile.Tile.h) + h2) + 1;
vy = 0;
onair = true;
groundtile = null;
onground = false;
_local20 = true;
}
} else {
return(undefined);
}
} else if (vy == 0) {
if (vx > 0) {
if ((_root.tiles[_local11.i][Math.floor((mc.x + w2) / tile.Tile.w)].walkable == 0) || (_root.tiles[_local8.i][Math.floor((mc.x + w2) / tile.Tile.w)].walkable == 0)) {
mc.x = ((Math.floor((mc.x + w2) / tile.Tile.w) * tile.Tile.h) - h2) - 1;
vx = 0;
_local20 = true;
}
} else if (vx < 0) {
if ((_root.tiles[_local11.i][Math.floor((mc.x - w2) / tile.Tile.w)].walkable == 0) || (_root.tiles[_local8.i][Math.floor((mc.x - w2) / tile.Tile.w)].walkable == 0)) {
mc.x = ((Math.floor(1 + ((mc.x - w2) / tile.Tile.w)) * tile.Tile.h) + h2) + 1;
vx = 0;
_local20 = true;
}
}
if (onground) {
if (isonair()) {
onground = false;
onair = true;
}
}
} else if ((vx > 0) && (vy > 0)) {
var _local19 = raycast.path(_local7.x, _local7.y, mc.x + w2, mc.y - h2);
var _local18 = raycast.path(_local8.x, _local8.y, mc.x + h2, mc.y + h2);
var _local15 = raycast.path(_local9.x, _local9.y, mc.x - w2, mc.y + h2);
} else if ((vx < 0) && (vy < 0)) {
var _local19 = raycast.path(_local7.x, _local7.y, mc.x + w2, mc.y - h2);
var _local18 = raycast.path(_local11.x, _local11.y, mc.x - h2, mc.y - h2);
var _local15 = raycast.path(_local9.x, _local9.y, mc.x - w2, mc.y + h2);
if (isonair()) {
onair = true;
onground = false;
}
} else if ((vy > 0) && (vx < 0)) {
var _local19 = raycast.path(_local11.x, _local11.y, mc.x - w2, mc.y - h2);
var _local18 = raycast.path(_local8.x, _local8.y, mc.x + h2, mc.y + h2);
var _local15 = raycast.path(_local9.x, _local9.y, mc.x - w2, mc.y + h2);
} else if ((vy < 0) && (vx > 0)) {
var _local19 = raycast.path(_local7.x, _local7.y, mc.x + w2, mc.y - h2);
var _local18 = raycast.path(_local8.x, _local8.y, mc.x + h2, mc.y + h2);
var _local15 = raycast.path(_local11.x, _local11.y, mc.x - w2, mc.y - h2);
if (isonair()) {
onair = true;
onground = false;
}
}
if ((vx != 0) && (vy != 0)) {
if ((_local19 || (_local18)) || (_local15)) {
var _local10 = {};
var _local6 = 0;
var _local14 = {};
var _local17 = 0;
var _local16 = 0;
var _local3;
_local20 = true;
if (_local19 && (_local10[_local19.dir] == null)) {
_local10[_local19.dir] = 1;
_local14[(_local19.x + "_") + _local19.y] = 1;
_local3 = _local19;
}
if (_local18 && (_local10[_local18.dir] == null)) {
_local10[_local18.dir] = 1;
_local14[(_local18.x + "_") + _local18.y] = 1;
_local3 = _local18;
}
if (_local15 && (_local10[_local15.dir] == null)) {
_local10[_local15.dir] = 1;
_local14[(_local15.x + "_") + _local15.y] = 1;
_local3 = _local15;
}
for (var _local24 in _local10) {
_local6 = _local6 + agent.Spider[_local24];
_local16++;
}
for (var _local24 in _local14) {
_local17++;
}
var _local22 = false;
if ((_local17 == 1) && (_local16 > 1)) {
_local22 = true;
}
switch (_local6) {
case 1 :
mc.x = ((Math.floor(1 + ((mc.x - w2) / tile.Tile.w)) * tile.Tile.w) + w2) + 1;
vx = 0;
break;
case 2 :
mc.y = ((Math.floor(1 + ((mc.y - w2) / tile.Tile.w)) * tile.Tile.h) + h2) + 1;
vy = 0;
onair = true;
groundtile = null;
onground = false;
break;
case 4 :
mc.x = ((Math.floor((mc.x + w2) / tile.Tile.w) * tile.Tile.w) - w2) - 1;
vx = 0;
break;
case 8 :
mc.y = ((Math.floor((mc.y + w2) / tile.Tile.w) * tile.Tile.w) - w2) - 1;
vy = 0;
onground = true;
onair = false;
break;
case 3 :
if (_local22) {
if (Math.abs((mc.x - _root.tiles[_local3.y][_local3.x].mc._x) - (tile.Tile.w / 2)) > Math.abs((mc.y - _root.tiles[_local3.y][_local3.x].mc._y) - (tile.Tile.w / 2))) {
mc.x = ((Math.floor(1 + ((mc.x - w2) / tile.Tile.w)) * tile.Tile.w) + w2) + 1;
vx = 0;
} else {
mc.y = ((Math.floor(1 + ((mc.y - w2) / tile.Tile.w)) * tile.Tile.h) + h2) + 1;
vy = 0;
onair = true;
groundtile = null;
onground = false;
}
} else {
mc.x = ((Math.floor(1 + ((mc.x - w2) / tile.Tile.w)) * tile.Tile.w) + w2) + 1;
vx = 0;
mc.y = ((Math.floor(1 + ((mc.y - w2) / tile.Tile.w)) * tile.Tile.h) + h2) + 1;
vy = 0;
onair = true;
groundtile = null;
onground = false;
}
break;
case 6 :
if (_local22) {
if (Math.abs((mc.x - _root.tiles[_local3.y][_local3.x].mc._x) - (tile.Tile.w / 2)) > Math.abs((mc.y - _root.tiles[_local3.y][_local3.x].mc._y) - (tile.Tile.w / 2))) {
mc.x = ((Math.floor((mc.x + w2) / tile.Tile.w) * tile.Tile.w) - w2) - 1;
vx = 0;
} else {
mc.y = ((Math.floor(1 + ((mc.y - w2) / tile.Tile.w)) * tile.Tile.h) + h2) + 1;
vy = 0;
onair = true;
groundtile = null;
onground = false;
}
} else {
mc.y = ((Math.floor(1 + ((mc.y - w2) / tile.Tile.w)) * tile.Tile.h) + h2) + 1;
vy = 0;
mc.x = ((Math.floor((mc.x + w2) / tile.Tile.w) * tile.Tile.w) - w2) - 1;
vx = 0;
onair = true;
groundtile = null;
onground = false;
}
break;
case 12 :
if (_local22) {
if (Math.abs((mc.x - _root.tiles[_local3.y][_local3.x].mc._x) - (tile.Tile.w / 2)) > Math.abs((mc.y - _root.tiles[_local3.y][_local3.x].mc._y) - (tile.Tile.w / 2))) {
mc.x = ((Math.floor((mc.x + w2) / tile.Tile.w) * tile.Tile.w) - w2) - 1;
vx = 0;
} else {
mc.y = ((Math.floor((mc.y + w2) / tile.Tile.w) * tile.Tile.w) - w2) - 1;
vy = 0;
onground = true;
onair = false;
}
} else {
mc.x = ((Math.floor((mc.x + w2) / tile.Tile.w) * tile.Tile.w) - w2) - 1;
vx = 0;
mc.y = ((Math.floor((mc.y + w2) / tile.Tile.w) * tile.Tile.w) - w2) - 1;
vy = 0;
onground = true;
onair = false;
}
break;
case 9 :
if (_local22) {
if (Math.abs((mc.x - _root.tiles[_local3.y][_local3.x].mc._x) - (tile.Tile.w / 2)) > Math.abs((mc.y - _root.tiles[_local3.y][_local3.x].mc._y) - (tile.Tile.w / 2))) {
mc.x = ((Math.floor(1 + ((mc.x - w2) / tile.Tile.w)) * tile.Tile.w) + w2) + 1;
vx = 0;
} else {
mc.y = ((Math.floor((mc.y + w2) / tile.Tile.w) * tile.Tile.w) - w2) - 1;
vy = 0;
onground = true;
onair = false;
}
} else {
mc.x = ((Math.floor(1 + ((mc.x - w2) / tile.Tile.w)) * tile.Tile.w) + w2) + 1;
vx = 0;
mc.y = ((Math.floor((mc.y + w2) / tile.Tile.w) * tile.Tile.w) - w2) - 1;
vy = 0;
onground = true;
onair = false;
}
break;
default :
trace("................");
_root.mousedown = true;
}
debug = debug + (("dirs=" + _local6) + newline);
}
}
var _local5 = 0;
if (!invincible) {
while (_local5 < _root.knifes.length) {
if (_root.knifes[_local5].knife2(this)) {
break;
}
_local5++;
}
}
if (onswing) {
drawcord();
_local5 = 0;
while (_local5 < _root.knifes.length) {
if (_root.knifes[_local5].knife(this)) {
MouseUp();
_root.knifesound.start(0, 1);
swingtime = swingtime + 500;
_root.scene.empty.clear();
drawcord();
break;
}
_local5++;
}
}
var _local23 = _root.tiles[0].length;
var _local21 = _root.tiles.length;
if (mc.x > ((_local23 * 50) - 20)) {
mc.x = (_local23 * 50) - 20;
vx = 0;
}
if (mc.x < 0) {
mc.x = 0;
vx = 0;
}
if (mc.y > ((_local21 * 50) - 20)) {
mc.y = (_local21 * 50) - 20;
vy = 0;
}
if (mc.y < 0) {
mc.y = 0;
vy = 0;
}
if (_local20 && (vy == 0)) {
}
mc._x = mc.x;
mc._y = mc.y;
x = mc.x;
y = mc.y;
preframe = mc.char._currentframe;
if (mc._x < 275) {
_root.scene._x = 0;
} else if (mc._x > ((_local23 * 50) - 275)) {
_root.scene._x = ((-_local23) * 50) + 550;
} else {
_root.scene._x = (-mc._x) + 275;
}
if (mc._y < 200) {
_root.scene._y = 0;
} else if (mc._y > ((_local21 * 50) - 200)) {
_root.scene._y = ((-_local21) * 50) + 400;
} else {
_root.scene._y = (-mc._y) + 200;
}
if (onswing) {
drawcord();
}
_root.bg2._x = (-250 * _root.scene._x) / (((-_local23) * 50) + 550);
_root.bg2._y = (-400 * _root.scene._y) / (((-_local21) * 50) + 300);
}
var mg = 0.465;
var w2 = 16;
var h2 = 16;
static var left = 1;
static var up = 2;
static var right = 4;
static var down = 8;
var airfriction = 0.985;
var soapfriction = 0.96;
var groundfriction = 0.86;
var runcount = 0;
}
Symbol 1235 MovieClip [__Packages.geom.Raycast] Frame 0
class geom.Raycast
{
var tiles, rows, cols, mx, my, dr, sin, cos, count, upcount;
function Raycast (arr) {
tiles = arr;
rows = arr.length;
cols = arr[0].length;
}
function assign(arr) {
tiles = arr;
rows = arr.length;
cols = arr[0].length;
}
function path(x, y, dx, dy) {
var _local3 = x;
var _local2 = y;
mx = dx;
my = dy;
var _local8 = Math.floor(_local2 / gridwidth);
var _local6 = Math.floor(_local3 / gridwidth);
var _local7 = Math.floor(my / gridwidth);
var _local5 = Math.floor(mx / gridwidth);
dr = getR(_local3, _local2, dx, dy);
sin = Math.sin(dr);
cos = Math.cos(dr);
count = 0;
upcount = Math.abs(_local5 - _local6) + Math.abs(_local7 - _local8);
if ((_local8 == _local7) && (_local5 == _local6)) {
return(null);
}
var _local4 = null;
if ((cos > 0) && (sin > 0)) {
_local4 = raycast1(_local3, _local2);
} else if ((cos < 0) && (sin < 0)) {
_local4 = raycast3(_local3, _local2);
} else if ((cos < 0) && (sin > 0)) {
_local4 = raycast2(_local3, _local2);
} else if ((cos > 0) && (sin < 0)) {
_local4 = raycast4(_local3, _local2);
}
return(_local4);
}
function raycast1(sx, sy) {
count++;
if (count > upcount) {
return(null);
}
var _local3 = Math.floor(sy / gridwidth) + 1;
var _local2 = Math.floor(sx / gridwidth) + 1;
if ((_local3 == (Math.floor(my / gridwidth) + 1)) && (_local2 == (Math.floor(mx / gridwidth) + 1))) {
}
if ((_local3 > rows) || (_local2 > cols)) {
return(null);
}
var _local6 = (_local3 * gridwidth) - sy;
var _local7 = (_local2 * gridwidth) - sx;
var _local11 = Math.floor(sy / gridwidth);
var _local9 = Math.floor(sx / gridwidth);
var _local10 = Math.floor(my / gridwidth);
var _local8 = Math.floor(mx / gridwidth);
if ((_local6 / sin) <= (_local7 / cos)) {
sy = _local3 * gridwidth;
sx = sx + (_local6 / Math.tan(dr));
if (tiles[_local3][_local2 - 1].walkable == 0) {
return({x:_local2 - 1, y:_local3, dir:"down"});
}
return(raycast1(sx, sy));
}
sx = _local2 * gridwidth;
sy = sy + (_local7 * Math.tan(dr));
if (tiles[_local3 - 1][_local2].walkable == 0) {
return({x:_local2, y:_local3 - 1, dir:"right"});
}
return(raycast1(sx, sy));
}
function raycast2(sx, sy) {
count++;
if (count > upcount) {
return(null);
}
var _local3 = Math.floor(sy / gridwidth) + 1;
var _local2 = Math.ceil(sx / gridwidth) - 1;
if ((_local3 == (Math.floor(my / gridwidth) + 1)) && (_local2 == (Math.ceil(mx / gridwidth) - 1))) {
}
if ((_local3 > rows) || (_local2 < 0)) {
return(null);
}
var _local6 = (_local3 * gridwidth) - sy;
var _local7 = (_local2 * gridwidth) - sx;
if ((_local6 / sin) <= (_local7 / cos)) {
sy = _local3 * gridwidth;
sx = sx + (_local6 / Math.tan(dr));
if (tiles[_local3][_local2].walkable == 0) {
return({x:_local2, y:_local3, dir:"down"});
}
return(raycast2(sx, sy));
}
sx = _local2 * gridwidth;
sy = sy + (_local7 * Math.tan(dr));
if (tiles[_local3 - 1][_local2 - 1].walkable == 0) {
return({x:_local2 - 1, y:_local3 - 1, dir:"left"});
}
return(raycast2(sx, sy));
}
function raycast3(sx, sy) {
count++;
if (count > upcount) {
return(null);
}
var _local3 = Math.ceil(sy / gridwidth) - 1;
var _local2 = Math.ceil(sx / gridwidth) - 1;
if ((_local3 == (Math.ceil(my / gridwidth) - 1)) && (_local2 == (Math.ceil(mx / gridwidth) - 1))) {
}
if ((_local3 < 0) || (_local2 < 0)) {
return(null);
}
var _local6 = (_local3 * gridwidth) - sy;
var _local7 = (_local2 * gridwidth) - sx;
if ((_local6 / sin) <= (_local7 / cos)) {
sy = _local3 * gridwidth;
sx = sx + (_local6 / Math.tan(dr));
if (tiles[_local3 - 1][_local2].walkable == 0) {
return({x:_local2, y:_local3 - 1, dir:"up"});
}
return(raycast3(sx, sy));
}
sx = _local2 * gridwidth;
sy = sy + (_local7 * Math.tan(dr));
if (tiles[_local3][_local2 - 1].walkable == 0) {
return({x:_local2 - 1, y:_local3, dir:"left"});
}
return(raycast3(sx, sy));
}
function raycast4(sx, sy) {
count++;
if (count > upcount) {
return(null);
}
var _local3 = Math.ceil(sy / gridwidth) - 1;
var _local2 = Math.floor(sx / gridwidth) + 1;
if ((_local3 == (Math.ceil(my / gridwidth) - 1)) && (_local2 == (Math.floor(mx / gridwidth) + 1))) {
}
if ((_local3 < 0) || (_local2 > cols)) {
return(null);
}
var _local6 = (_local3 * gridwidth) - sy;
var _local7 = (_local2 * gridwidth) - sx;
if ((_local6 / sin) <= (_local7 / cos)) {
sy = _local3 * gridwidth;
sx = sx + (_local6 / Math.tan(dr));
if (tiles[_local3 - 1][_local2 - 1].walkable == 0) {
return({x:_local2 - 1, y:_local3 - 1, dir:"up"});
}
return(raycast4(sx, sy));
}
sx = _local2 * gridwidth;
sy = sy + (_local7 * Math.tan(dr));
if (tiles[_local3][_local2].walkable == 0) {
return({x:_local2, y:_local3, dir:"right"});
}
return(raycast4(sx, sy));
}
function getR(x1, y1, x2, y2) {
return(Math.atan2(y2 - y1, x2 - x1));
}
var gridwidth = 50;
}
Symbol 1236 MovieClip [__Packages.agent.Cord] Frame 0
class agent.Cord
{
var m0, m1, count, clen, len, fx, fy;
function Cord (_m0, _m1, l) {
m0 = _m0;
m1 = _m1;
count = 0;
if (l < 150) {
clen = l;
}
len = 0;
fx = 0;
fy = 0;
}
function enterframe(spider) {
fx = 0;
fy = 0;
if (count < 8) {
count++;
m1.getacc();
len = len + 19;
var _local3 = _root.spider.raycast.path(m1.__get__x() - m1.vel.x, m1.__get__y() - m1.vel.y, m1.__get__x(), m1.__get__y());
if (_local3) {
trace((((("pengzhuang==" + _local3.x) + "_") + _local3.y) + "_") + _local3.dir);
if (_local3.dir == "left") {
var _local5 = ((_local3.x + 1) * tile.Tile.w) - m1.__get__x();
var _local4 = (m1.vel.y * _local5) / m1.vel.x;
len = len - Math.sqrt((_local5 * _local5) + (_local4 * _local4));
m1.__set__x(m1.__get__x() + _local5);
m1.__set__y(m1.__get__y() + _local4);
} else if (_local3.dir == "right") {
var _local5 = (_local3.x * tile.Tile.w) - m1.__get__x();
var _local4 = (m1.vel.y * _local5) / m1.vel.x;
len = len - Math.sqrt((_local5 * _local5) + (_local4 * _local4));
m1.__set__x(m1.__get__x() + _local5);
m1.__set__y(m1.__get__y() + _local4);
} else if (_local3.dir == "up") {
var _local4 = ((_local3.y + 1) * tile.Tile.w) - m1.__get__y();
var _local5 = (m1.vel.x * _local4) / m1.vel.y;
len = len - Math.sqrt((_local5 * _local5) + (_local4 * _local4));
m1.__set__x(m1.__get__x() + _local5);
m1.__set__y(m1.__get__y() + _local4);
} else if (_local3.dir == "down") {
var _local4 = (_local3.y * tile.Tile.w) - m1.__get__y();
var _local5 = (m1.vel.x * _local4) / m1.vel.y;
len = len - Math.sqrt((_local5 * _local5) + (_local4 * _local4));
m1.__set__x(m1.__get__x() + _local5);
m1.__set__y(m1.__get__y() + _local4);
}
count = 8;
}
if (len > clen) {
count = 8;
}
if (count == 8) {
m1.vel.x = 0;
m1.vel.y = 0;
if (len < 20) {
len = 20;
}
}
}
var _local5 = m1.__get__x() - m0.__get__x();
var _local4 = m1.__get__y() - m0.__get__y();
var _local8 = Math.sqrt((_local5 * _local5) + (_local4 * _local4));
var _local6 = (_local8 - (len / 2)) / len;
if (count == 8) {
fx = ((_local5 / len) * _local6) * springConst;
fy = ((_local4 / len) * _local6) * springConst;
}
var _local9 = new geom.Vecter(m1.__get__x() - m0.__get__x(), m1.__get__y() - m0.__get__y());
var _local7 = new geom.Vecter(m0.__get__x() - m1.__get__x(), m0.__get__y() - m1.__get__y());
_local7.normal();
_local5 = _root.scene._xmouse - m1.__get__x();
_local4 = _root.scene._ymouse - m1.__get__y();
var _local10 = Math.sqrt((_local5 * _local5) + (_local4 * _local4));
if (_local6 < 0.4) {
len = len - 2;
if (len < 20) {
len = 20;
}
}
}
var initspeed = 10;
var springConst = 3;
}
Symbol 1237 MovieClip [__Packages.geom.Linev] Frame 0
class geom.Linev
{
var p1, p2, mc, np, pv;
function Linev (_p1, _p2, _mc) {
p1 = _p1;
p2 = _p2;
getpv();
mc = _mc;
list[0] = p1;
list[1] = p2;
np.normal();
}
function draw() {
mc.clear();
mc.p1._x = p1.x;
mc.p1._y = p1.y;
mc.p2._x = p2.x;
mc.p2._y = p2.y;
mc.lineStyle(1, 5596825);
mc.moveTo(p1.x, p1.y);
mc.lineTo(p2.x, p2.y);
}
function getpv() {
pv = geom.Vecter.getminus2(p1, p2);
np = new geom.Vecter(-pv.y, pv.x);
}
function testline(line) {
var _local2 = TestPoint(line.p1);
var _local4 = TestPoint(line.p2);
trace(_local2);
trace(_local4);
if ((_local2 * _local4) < 0) {
trace("\u76F8\u4EA4");
var _local7 = Math.abs(_local2 / (Math.abs(_local2) + Math.abs(_local4)));
var _local6 = line.p1.x + (line.pv.x * _local7);
var _local5 = line.p1.y + (line.pv.y * _local7);
trace([_local6, _local5]);
if (p1.x != p2.x) {
if (((_local6 - p1.x) * (p2.x - _local6)) >= -0.1) {
return(new geom.Vecter(_local6, _local5));
}
} else if (((_local5 - p1.y) * (p2.y - _local5)) >= -0.1) {
return(new geom.Vecter(_local6, _local5));
}
} else if ((_local2 * _local4) == 0) {
if ((_local2 == 0) && (_local4 == 0)) {
return(null);
}
var _local7 = Math.abs(_local2 / (_local2 + _local4));
var _local6 = line.p1.x + (line.pv.x * _local7);
var _local5 = line.p1.y + (line.pv.y * _local7);
if (p1.x != p2.x) {
if (((_local6 - p1.x) * (p2.x - _local6)) >= -0.1) {
return(new geom.Vecter(_local6, _local5));
}
} else if (((_local5 - p1.y) * (p2.y - _local5)) >= -0.1) {
return(new geom.Vecter(_local6, _local5));
}
}
return(null);
}
function TestPoint(point) {
var _local2 = geom.Vecter.getdot(np, geom.Vecter.getminus2(p1, point));
if (_local2 > EPSILON) {
return(_local2);
}
if (_local2 < (-EPSILON)) {
return(_local2);
}
return(0);
}
function getpointdis(v) {
var _local4 = geom.Vecter.getminus2(p2, p1);
var _local2 = geom.Vecter.getminus2(v, p1);
var _local3 = getjia(_local4, _local2);
return(Math.abs(_local2.length * Math.sin(_local3)));
}
static function getjia(pv1, pv2) {
var _local2 = geom.Vecter.getdot(pv1, pv2) / (pv1.getMag() * pv2.getMag());
var _local1 = Math.acos(_local2);
return(_local1);
}
static function getjiajiao(line1, line2) {
return(getjia(line1.pv, line2.pv));
}
var EPSILON = 0.01;
var list = [];
}
Symbol 1238 MovieClip [__Packages.agent.Mantis] Frame 0
class agent.Mantis
{
var i, j, mc, initx, inity, dir;
function Mantis (_i, _j) {
i = _i;
j = _j;
mc = _root.scene.attachMovie("mantis", "mantis" + tile.Dep.enemydep, tile.Dep.enemydep);
tile.Dep.enemydep++;
initx = (mc._x = j * tile.Tile.w);
inity = (mc._y = i * tile.Tile.h);
dir = random(2);
if (dir == 1) {
mc.char._xscale = -100;
}
}
function run(spider) {
if (mc.hitTest(spider.mc)) {
var _local9 = spider.__get__hp();
spider.__set__hp(spider.__get__hp() - 3);
if (_local9 > spider.__get__hp()) {
_root.hited.start(0.1, 1);
}
var _local5 = spider.y - (mc._y + (tile.Tile.w / 1.5));
var _local6 = spider.x - (mc._x + (tile.Tile.w / 2));
var _local4 = Math.atan2(_local5, _local6);
spider.vx = 6 * Math.cos(_local4);
spider.vy = 6 * Math.sin(_local4);
}
if (mc.char._currentframe == 1) {
if (dir == 1) {
if (spider.mc.hitTest((_root.scene._x + mc._x) + 100, (_root.scene._y + mc._y) + 20, true)) {
mc.char.gotoAndPlay("atk");
_root.attack1.start(0, 1);
return(undefined);
}
mc._x = mc._x + speed;
var _local7 = _root.tiles[i + 1][Math.floor((mc._x + 50) / tile.Tile.w)];
var _local8 = _root.tiles[i][Math.floor((mc._x + 50) / tile.Tile.w)];
if ((_local7.walkable == 1) || (_local8.walkable == 0)) {
dir = 0;
mc.char._xscale = 100;
}
} else {
if (spider.mc.hitTest((_root.scene._x + mc._x) - 50, (_root.scene._y + mc._y) + 20, true)) {
mc.char.gotoAndPlay("atk");
_root.attack1.start(0, 1);
return(undefined);
}
mc._x = mc._x - speed;
var _local7 = _root.tiles[i + 1][Math.floor(mc._x / tile.Tile.w)];
var _local8 = _root.tiles[i][Math.floor(mc._x / tile.Tile.w)];
if ((_local7.walkable == 1) || (_local8.walkable == 0)) {
dir = 1;
mc.char._xscale = -100;
}
}
}
}
var range = 300;
var speed = 3;
}
Symbol 1239 MovieClip [__Packages.agent.Wasp] Frame 0
class agent.Wasp
{
var i, j, mc, initx, inity;
function Wasp (_i, _j) {
trace("wasp");
i = _i;
j = _j;
mc = _root.scene.attachMovie("wasp", "wasp" + tile.Dep.enemydep, tile.Dep.enemydep);
tile.Dep.enemydep++;
initx = (mc._x = j * tile.Tile.w);
inity = (mc._y = i * tile.Tile.h);
}
function run(spider) {
if ((Math.abs(spider.x - mc._x) + Math.abs(spider.y - mc._y)) < range) {
var _local4 = Math.atan2(spider.y - mc._y, spider.x - mc._x);
mc._y = mc._y + (speed * Math.sin(_local4));
mc._x = mc._x + (speed * Math.cos(_local4));
if (mc.hitTest(spider.mc)) {
var _local5 = spider.hp;
spider.hp = spider.hp - 3;
if (_local5 > spider.hp) {
_root.hited.start(0.1, 1);
}
}
} else {
if ((Math.abs(initx - mc._x) + Math.abs(inity - mc._y)) <= (speed + 1)) {
return(undefined);
}
var _local4 = Math.atan2(inity - mc._y, initx - mc._x);
mc._y = mc._y + (speed * Math.sin(_local4));
mc._x = mc._x + (speed * Math.cos(_local4));
}
if (!mc.hitTest(spider.mc)) {
if (Math.cos(_local4) >= 0) {
mc.char._xscale = -100;
} else {
mc.char._xscale = 100;
}
}
}
var range = 300;
var speed = 2.5;
}
Symbol 1240 MovieClip [__Packages.agent.Spike] Frame 0
class agent.Spike
{
var time, i, j, mc, initx, inity;
function Spike (_i, _j) {
time = getTimer();
i = _i;
j = _j;
mc = _root.scene.attachMovie("spike", "spike" + tile.Dep.enemydep, tile.Dep.enemydep);
mc.gotoAndStop(random(mc._totalframes) + 1);
tile.Dep.enemydep++;
initx = (mc._x = j * tile.Tile.w);
inity = (mc._y = i * tile.Tile.h);
}
function run(spider) {
if (mc.hitTest(spider.mc)) {
if ((getTimer() - time) > 300) {
var _local5 = spider.y - (mc._y + (tile.Tile.w / 1.5));
var _local6 = spider.x - (mc._x + (tile.Tile.w / 2));
var _local4 = Math.atan2(_local5, _local6);
spider.vx = 6 * Math.cos(_local4);
spider.vy = 6 * Math.sin(_local4);
spider.hp = spider.hp - 5;
time = getTimer();
_root.spiked.start(0, 1);
}
}
}
var range = 300;
var speed = 3;
}
Symbol 1241 MovieClip [__Packages.agent.Movev] Frame 0
class agent.Movev
{
var i, j, xspeed, yspeed, dir, mc, initx, inity;
function Movev (_i, _j) {
trace("Movev");
i = _i;
j = _j;
xspeed = 0;
yspeed = 0;
dir = random(2);
mc = _root.scene.attachMovie("movehtile", "move" + tile.Dep.enemydep, tile.Dep.enemydep);
tile.Dep.enemydep++;
initx = (mc._x = j * tile.Tile.w);
inity = (mc._y = i * tile.Tile.h);
}
function run(spider) {
if (dir == 1) {
yspeed = 5;
} else {
yspeed = -5;
}
var _local4 = yspeed;
if (spider.groundtile == this) {
spider.mc.vy = yspeed;
}
mc._y = mc._y + yspeed;
if (yspeed > 0) {
if ((_root.tiles[Math.floor(mc._y / tile.Tile.w) + 1][j].walkable == 0) || (mc._y > 1500)) {
mc._y = mc._y - yspeed;
_local4 = 0;
if (spider.groundtile == this) {
spider.mc.vy = 0;
}
dir = 0;
}
} else if ((_root.tiles[Math.floor(mc._y / tile.Tile.w)][j].walkable == 0) || (mc._y < 50)) {
mc._y = mc._y - yspeed;
_local4 = 0;
if (spider.groundtile == this) {
spider.mc.vy = 0;
}
dir = 1;
}
if (spider.groundtile == this) {
spider.mc.y = (mc._y - spider.h2) - 0.5;
return(undefined);
}
if (spider.oncoper) {
return(undefined);
}
if (mc.hitTest((_root.scene._x + spider.mc.x) + spider.w2, (_root.scene._y + spider.mc.y) + spider.h2, true) || (mc.hitTest((_root.scene._x + spider.mc.x) - spider.w2, (_root.scene._y + spider.mc.y) + spider.h2, true))) {
if ((spider.y + spider.h2) < (mc._y - _local4)) {
spider.onground = true;
spider.groundtile = this;
spider.vy = 0;
spider.mc.y = (mc._y - spider.h2) - 0.5;
}
}
}
var range = 300;
var speed = 3;
}
Symbol 1242 MovieClip [__Packages.agent.Leaf] Frame 0
class agent.Leaf
{
var i, j, mc, initx, inity, dir;
function Leaf (_i, _j) {
i = _i;
j = _j;
mc = _root.scene.attachMovie("leaf", "leaf" + tile.Dep.enemydep, tile.Dep.enemydep);
tile.Dep.enemydep++;
initx = (mc._x = j * tile.Tile.w);
inity = (mc._y = i * tile.Tile.h);
}
function run(spider) {
dir = 1;
yspeed = 2;
mc._y = mc._y + yspeed;
var _local4 = yspeed;
if (spider.groundtile == this) {
spider.mc.vy = yspeed;
}
mc._y = mc._y + yspeed;
if (yspeed > 0) {
if ((_root.tiles[Math.floor(mc._y / tile.Tile.w) + 1][j].walkable == 0) || (mc._y > 1500)) {
mc._y = inity;
if (spider.groundtile == this) {
spider.onair = true;
spider.groundtile = null;
spider.onground = false;
return(undefined);
}
}
}
if (spider.groundtile == this) {
spider.mc.y = (mc._y - spider.h2) - 0.5;
return(undefined);
}
if (spider.oncoper) {
return(undefined);
}
if (mc.hitTest((_root.scene._x + spider.mc.x) + spider.w2, (_root.scene._y + spider.mc.y) + spider.h2, true) || (mc.hitTest((_root.scene._x + spider.mc.x) - spider.w2, (_root.scene._y + spider.mc.y) + spider.h2, true))) {
if ((spider.__get__y() + spider.h2) < (mc._y - _local4)) {
spider.onground = true;
spider.groundtile = this;
spider.vy = 0;
spider.mc.y = (mc._y - spider.h2) - 0.5;
}
}
}
var range = 300;
var yspeed = 2;
var xspeed = 0;
}
Symbol 1243 MovieClip [__Packages.agent.Beehive] Frame 0
class agent.Beehive
{
var i, j, mc, initx, inity;
function Beehive (_i, _j) {
i = _i;
j = _j;
mc = _root.scene.beehives.attachMovie("beehive", "beehive" + tile.Dep.enemydep, tile.Dep.enemydep);
tile.Dep.enemydep++;
initx = (mc._x = j * tile.Tile.w);
inity = (mc._y = i * tile.Tile.h);
}
function run(spider) {
if (mc.hitTest(_root._xmouse, _root._ymouse, true)) {
trace("hit");
_root.cursor.gotoAndStop("cha");
}
}
var range = 300;
var speed = 3;
}
Symbol 1244 MovieClip [__Packages.agent.Magpie] Frame 0
class agent.Magpie
{
var i, j, mc, initx, inity;
function Magpie (_i, _j) {
trace("Magpie");
i = _i;
j = _j;
mc = _root.scene.attachMovie("magpie", "magpie" + tile.Dep.enemydep, tile.Dep.enemydep);
tile.Dep.enemydep++;
initx = (mc._x = j * tile.Tile.w);
inity = (mc._y = i * tile.Tile.h);
}
function run(spider) {
if ((Math.abs(spider.x - mc._x) + Math.abs(spider.y - mc._y)) < range) {
var _local4 = Math.atan2(spider.y - mc._y, spider.x - mc._x);
mc._y = mc._y + (speed * Math.sin(_local4));
mc._x = mc._x + (speed * Math.cos(_local4));
if (mc.hitTest(spider.mc)) {
var _local5 = spider.__get__hp();
spider.__set__hp(spider.__get__hp() - 3);
if (_local5 > spider.__get__hp()) {
_root.bird_attack.start(0.2, 1);
}
}
} else {
if ((Math.abs(initx - mc._x) + Math.abs(inity - mc._y)) <= (speed + 1)) {
return(undefined);
}
var _local4 = Math.atan2(inity - mc._y, initx - mc._x);
mc._y = mc._y + (speed * Math.sin(_local4));
mc._x = mc._x + (speed * Math.cos(_local4));
}
if (!mc.hitTest(spider.mc)) {
if (Math.cos(_local4) >= 0) {
mc.char._xscale = -Math.abs(mc.char._xscale);
} else {
mc.char._xscale = Math.abs(mc.char._xscale);
}
}
}
var range = 350;
var speed = 2.8;
}
Symbol 1245 MovieClip [__Packages.agent.Trampoline] Frame 0
class agent.Trampoline
{
var i, j, mc, initx, inity;
function Trampoline (_i, _j) {
i = _i;
j = _j;
mc = _root.scene.attachMovie("trampoline", "trampoline" + tile.Dep.enemydep, tile.Dep.enemydep);
tile.Dep.enemydep++;
initx = (mc._x = j * tile.Tile.w);
inity = (mc._y = i * tile.Tile.h);
}
function run(spider) {
if (mc._currentframe == 1) {
if (mc.hitTest(_root.scene._x + spider.mc._x, _root.scene._y + spider.mc._y, true) && (spider.vy > 0)) {
mc.play();
spider.vy = spider.vy * 0.2;
}
} else if (mc.hitTest(spider.mc)) {
spider.vy = spider.vy + mc.fy;
if (mc._currentframe <= 8) {
var _local5 = 71 - Math.abs((spider.x - mc._x) - 71);
var _local4 = _local5 * Math.sin(mc._currentframe / 8);
if (((spider.y + spider.vy) + spider.h2) > (mc._y + _local4)) {
spider.mc.y = spider.mc.y - (spider.vy * 0.3);
spider.vy = spider.vy - 5;
}
}
}
}
var range = 300;
var speed = 3;
}
Symbol 1246 MovieClip [__Packages.agent.Scorpion] Frame 0
class agent.Scorpion
{
var i, j, mc, initx, inity, dir;
function Scorpion (_i, _j) {
i = _i;
j = _j;
mc = _root.scene.attachMovie("scorpion", "scorpion" + tile.Dep.enemydep, tile.Dep.enemydep);
tile.Dep.enemydep++;
initx = (mc._x = j * tile.Tile.w);
inity = (mc._y = i * tile.Tile.h);
dir = random(2);
if (dir == 1) {
mc.char._xscale = -100;
}
}
function run(spider) {
if (mc.hitTest(spider.mc)) {
var _local9 = spider.hp;
spider.hp = spider.hp - 3;
if (_local9 > spider.hp) {
_root.hited.start(0.1, 1);
}
var _local5 = spider.y - (mc._y + (tile.Tile.w / 1.5));
var _local6 = spider.x - (mc._x + (tile.Tile.w / 2));
var _local4 = Math.atan2(_local5, _local6);
spider.vx = 6 * Math.cos(_local4);
spider.vy = 6 * Math.sin(_local4);
}
if (mc.char._currentframe == 1) {
if (dir == 1) {
if (spider.mc.hitTest((_root.scene._x + mc._x) + 100, (_root.scene._y + mc._y) + 20, true)) {
mc.char.gotoAndPlay("atk");
_root.attack1.start(0, 1);
return(undefined);
}
mc._x = mc._x + speed;
var _local7 = _root.tiles[i + 1][Math.floor((mc._x + 50) / tile.Tile.w)];
var _local8 = _root.tiles[i][Math.floor((mc._x + 50) / tile.Tile.w)];
if ((_local7.walkable == 1) || (_local8.walkable == 0)) {
dir = 0;
mc.char._xscale = 100;
}
} else {
if (spider.mc.hitTest((_root.scene._x + mc._x) - 50, (_root.scene._y + mc._y) + 20, true)) {
mc.char.gotoAndPlay("atk");
_root.attack1.start(0, 1);
return(undefined);
}
mc._x = mc._x - speed;
var _local7 = _root.tiles[i + 1][Math.floor(mc._x / tile.Tile.w)];
var _local8 = _root.tiles[i][Math.floor(mc._x / tile.Tile.w)];
if ((_local7.walkable == 1) || (_local8.walkable == 0)) {
dir = 1;
mc.char._xscale = -100;
}
}
}
}
var range = 300;
var speed = 3;
}
Symbol 78 Button
on (release) {
_root.bounced.start();
_root.attachMovie("options", "options", 1);
}
Symbol 79 Button
on (release) {
if (_root.localization_language_nr != 2) {
_root.bounced.start();
_root.attachMovie("highscore", "highscore", 1);
} else {
_root.geturl();
}
}
Symbol 80 Button
on (release) {
_root.flying.start();
getURL (_root.localization_url1, "_blank");
}
Symbol 81 Button
on (release) {
_root.bounced.start();
_root.gotoAndStop("help");
}
Symbol 82 Button
on (release) {
_root.flying.start();
getURL (_root.localization_url2, "_blank");
}
Symbol 111 MovieClip Frame 1
gotoAndStop(_root.localization_language_nr);
Symbol 124 MovieClip Frame 1
gotoAndStop(_root.localization_language_nr);
Symbol 137 MovieClip Frame 1
gotoAndStop(_root.localization_language_nr);
Symbol 138 MovieClip Frame 1
stop();
_quality = "HIGH";
this.onPress = function () {
_root.flying.start();
play();
};
Symbol 138 MovieClip Frame 2
stop();
_quality = "MEDIUM";
this.onPress = function () {
_root.flying.start();
play();
};
Symbol 138 MovieClip Frame 3
stop();
_quality = "LOW";
this.onPress = function () {
_root.flying.start();
play();
};
Symbol 163 MovieClip Frame 1
gotoAndStop(_root.localization_language_nr);
Symbol 176 MovieClip Frame 1
gotoAndStop(_root.localization_language_nr);
Symbol 177 MovieClip Frame 1
stop();
_root.vol = 60;
_root.world1.setVolume(_root.vol);
this.onPress = function () {
_root.flying.start();
play();
};
Symbol 177 MovieClip Frame 2
stop();
_root.vol = 0;
_root.world1.setVolume(_root.vol);
Symbol 199 MovieClip Frame 1
gotoAndStop(_root.localization_language_nr);
Symbol 212 MovieClip Frame 1
gotoAndStop(_root.localization_language_nr);
Symbol 230 MovieClip Frame 1
gotoAndStop(_root.localization_language_nr);
Symbol 247 MovieClip Frame 1
gotoAndStop(_root.localization_language_nr);
Symbol 260 MovieClip Frame 1
gotoAndStop(_root.localization_language_nr);
Symbol 261 MovieClip [startui] Frame 1
sped = 2;
Instance of Symbol 74 MovieClip "a1" in Symbol 261 MovieClip [startui] Frame 1
onClipEvent (enterFrame) {
_x = (_x - _parent.sped);
if (_x < -530) {
_x = (_parent.a2._x + (_parent.a2._width - _parent.sped));
}
_y = (_y - _parent.sped);
if (_y < -530) {
_y = (_parent.a3._y + (_parent.a3._height - _parent.sped));
}
}
Instance of Symbol 74 MovieClip "a2" in Symbol 261 MovieClip [startui] Frame 1
onClipEvent (enterFrame) {
_x = (_x - _parent.sped);
if (_x < -530) {
_x = (_parent.a1._x + (_parent.a1._width - _parent.sped));
}
_y = (_y - _parent.sped);
if (_y < -530) {
_y = (_parent.a4._y + (_parent.a4._height - _parent.sped));
}
}
Instance of Symbol 74 MovieClip "a3" in Symbol 261 MovieClip [startui] Frame 1
onClipEvent (enterFrame) {
_x = (_x - _parent.sped);
if (_x < -530) {
_x = (_parent.a4._x + (_parent.a4._width - _parent.sped));
}
_y = (_y - _parent.sped);
if (_y < -530) {
_y = (_parent.a1._y + (_parent.a1._height - _parent.sped));
}
}
Instance of Symbol 74 MovieClip "a4" in Symbol 261 MovieClip [startui] Frame 1
onClipEvent (enterFrame) {
_x = (_x - _parent.sped);
if (_x < -530) {
_x = (_parent.a3._x + (_parent.a3._width - _parent.sped));
}
_y = (_y - _parent.sped);
if (_y < -530) {
_y = (_parent.a2._y + (_parent.a2._height - _parent.sped));
}
}
Instance of Symbol 138 MovieClip in Symbol 261 MovieClip [startui] Frame 1
onClipEvent (load) {
if (_quality == "MEDIUM") {
gotoAndStop (2);
} else if (_quality == "LOW") {
gotoAndStop (3);
}
}
Instance of Symbol 177 MovieClip in Symbol 261 MovieClip [startui] Frame 1
onClipEvent (load) {
if (_root.vol == 0) {
gotoAndStop (2);
}
}
Symbol 270 MovieClip Frame 1
stop();
Symbol 270 MovieClip Frame 11
_root.beep.start(0, 1);
Symbol 270 MovieClip Frame 21
gotoAndPlay (2);
Symbol 287 Button
on (release) {
_root.flying.start();
if (yourname.text.length < 3) {
return(undefined);
}
if (((yourname.text.indexOf(" ") >= 0) || (yourname.text.indexOf(" ") >= 0)) || (yourname.text.indexOf("\t") >= 0)) {
return(undefined);
}
if (_root.localization_language_nr == 2) {
var time = new Date().getTime();
b = _root.SortT();
a = _root.hex_average(((String(_global.gameID) + _root.spider.score) + b) + time);
_root.DrawLine(a, b, 10, 10, 15, 15);
c = _global.strqq;
_root.senturl(_root.spider.score, b, c, time);
_root.flying.start();
_root.startSound("mainscreen");
_root.gotoAndStop("start");
_root.attachMovie("startui", "start", 1);
return(undefined);
}
var so = SharedObject.getLocal("userHighScore");
if (so.data.highScore == undefined) {
so.data.highScore = [];
var i = 0;
while (i < 10) {
so.data.highScore[i] = {name:"CPU", score:10000 - (i * 1000)};
i++;
}
so.flush();
}
done = false;
var i = 0;
while (i < so.data.highScore.length) {
if (_root.spider.score >= so.data.highScore[i].score) {
so.data.highScore.splice(i, 0, {score:_root.spider.score, name:yourname.text});
done = true;
break;
}
i++;
}
if (done == false) {
so.data.highScore.push({score:_root.spider.score, name:yourname.text});
}
so.flush();
_root.attachMovie("highscore", "highscore", 1);
}
on (keyPress "<Enter>") {
if (yourname.text.length < 3) {
return(undefined);
}
if (((yourname.text.indexOf(" ") >= 0) || (yourname.text.indexOf(" ") >= 0)) || (yourname.text.indexOf("\t") >= 0)) {
return(undefined);
}
if (_root.localization_language_nr == 2) {
var time = new Date().getTime();
b = _root.SortT();
a = _root.hex_average(((String(_global.gameID) + _root.spider.score) + b) + time);
_root.DrawLine(a, b, 10, 10, 15, 15);
c = _global.strqq;
_root.senturl(_root.spider.score, b, c, time);
_root.flying.start();
_root.startSound("mainscreen");
_root.gotoAndStop("start");
_root.attachMovie("startui", "start", 1);
return(undefined);
}
var so = SharedObject.getLocal("userHighScore");
if (so.data.highScore == undefined) {
so.data.highScore = [];
var i = 0;
while (i < 10) {
so.data.highScore[i] = {name:"CPU", score:10000 - (i * 1000)};
i++;
}
so.flush();
}
done = false;
var i = 0;
while (i < so.data.highScore.length) {
if (_root.spider.score >= so.data.highScore[i].score) {
so.data.highScore.splice(i, 0, {score:_root.spider.score, name:yourname.text});
done = true;
break;
}
i++;
}
if (done == false) {
so.data.highScore.push({score:_root.spider.score, name:yourname.text});
}
so.flush();
_root.attachMovie("highscore", "highscore", 1);
}
Symbol 301 MovieClip Frame 1
gotoAndStop(_root.localization_language_nr);
Symbol 314 MovieClip Frame 1
gotoAndStop(_root.localization_language_nr);
Symbol 327 MovieClip Frame 1
gotoAndStop(_root.localization_language_nr);
Symbol 340 MovieClip Frame 1
gotoAndStop(_root.localization_language_nr);
Symbol 353 MovieClip Frame 1
gotoAndStop(_root.localization_language_nr);
Symbol 366 MovieClip Frame 1
gotoAndStop(_root.localization_language_nr);
Symbol 367 MovieClip Frame 1
gotoAndStop(_root.mode);
trace(_root.mode);
Symbol 383 MovieClip Frame 1
gotoAndStop(_root.localization_language_nr);
Symbol 384 Button
on (release) {
_root.flying.start();
_root.startSound("mainscreen");
_root.gotoAndStop("start");
_root.attachMovie("startui", "start", 1);
}
Symbol 397 MovieClip Frame 1
gotoAndStop(_root.localization_language_nr);
Symbol 398 MovieClip Frame 1
_visible = false;
if (_root.localization_language_nr == 2) {
_visible = true;
}
Symbol 399 MovieClip [winui] Frame 1
score.text = _root.spider.score;
sped = 2;
switch (_root.localization_language_nr) {
case 1 :
yourname.text = "Player";
break;
case 2 :
yourname.text = "\u6E38\u5BA2.";
break;
case 3 :
yourname.text = "Speler";
break;
case 4 :
yourname.text = "Joueur";
break;
case 5 :
yourname.text = "Spieler";
break;
case 6 :
yourname.text = "Gracz";
break;
case 7 :
yourname.text = "Spelare";
break;
case 8 :
yourname.text = "Giocatore";
break;
case 9 :
yourname.text = "Jugador";
break;
case 10 :
yourname.text = "Jogador";
break;
case 11 :
yourname.text = "Pemain";
break;
case 12 :
yourname.text = "\u0418\u0433\u0440\u043E\u043A";
break;
default :
yourname.text = "Player";
}
Instance of Symbol 74 MovieClip "a1" in Symbol 399 MovieClip [winui] Frame 1
onClipEvent (enterFrame) {
_x = (_x - _parent.sped);
if (_x < -530) {
_x = (_parent.a2._x + (_parent.a2._width - _parent.sped));
}
_y = (_y - _parent.sped);
if (_y < -530) {
_y = (_parent.a3._y + (_parent.a3._height - _parent.sped));
}
}
Instance of Symbol 74 MovieClip "a2" in Symbol 399 MovieClip [winui] Frame 1
onClipEvent (enterFrame) {
_x = (_x - _parent.sped);
if (_x < -530) {
_x = (_parent.a1._x + (_parent.a1._width - _parent.sped));
}
_y = (_y - _parent.sped);
if (_y < -530) {
_y = (_parent.a4._y + (_parent.a4._height - _parent.sped));
}
}
Instance of Symbol 74 MovieClip "a3" in Symbol 399 MovieClip [winui] Frame 1
onClipEvent (enterFrame) {
_x = (_x - _parent.sped);
if (_x < -530) {
_x = (_parent.a4._x + (_parent.a4._width - _parent.sped));
}
_y = (_y - _parent.sped);
if (_y < -530) {
_y = (_parent.a1._y + (_parent.a1._height - _parent.sped));
}
}
Instance of Symbol 74 MovieClip "a4" in Symbol 399 MovieClip [winui] Frame 1
onClipEvent (enterFrame) {
_x = (_x - _parent.sped);
if (_x < -530) {
_x = (_parent.a3._x + (_parent.a3._width - _parent.sped));
}
_y = (_y - _parent.sped);
if (_y < -530) {
_y = (_parent.a2._y + (_parent.a2._height - _parent.sped));
}
}
Symbol 402 Button
on (press) {
_root.gotoAndStop("start");
}
Symbol 422 MovieClip Frame 1
gotoAndStop(_root.localization_language_nr);
Symbol 424 Button
on (release) {
if (yourname.text.length < 3) {
return(undefined);
}
if (((yourname.text.indexOf(" ") >= 0) || (yourname.text.indexOf(" ") >= 0)) || (yourname.text.indexOf("\t") >= 0)) {
return(undefined);
}
if (_root.localization_language_nr == 2) {
var time = new Date().getTime();
b = _root.SortT();
a = _root.hex_average(((String(_global.gameID) + _root.spider.score) + b) + time);
_root.DrawLine(a, b, 10, 10, 15, 15);
c = _global.strqq;
_root.senturl(_root.spider.score, b, c, time);
_root.flying.start();
_root.startSound("mainscreen");
_root.gotoAndStop("start");
_root.attachMovie("startui", "start", 1);
return(undefined);
}
_root.flying.start();
var so = SharedObject.getLocal("userHighScore");
if (so.data.highScore == undefined) {
so.data.highScore = [];
var i = 0;
while (i < 10) {
so.data.highScore[i] = {name:"CPU", score:10000 - (i * 1000)};
i++;
}
so.flush();
}
done = false;
var i = 0;
while (i < so.data.highScore.length) {
if (_root.spider.score >= so.data.highScore[i].score) {
so.data.highScore.splice(i, 0, {score:_root.spider.score, name:yourname.text});
done = true;
break;
}
i++;
}
if (done == false) {
so.data.highScore.push({score:_root.spider.score, name:yourname.text});
}
so.flush();
_root.attachMovie("highscore", "highscore", 1);
}
on (keyPress "<Enter>") {
if (yourname.text.length < 3) {
return(undefined);
}
if (((yourname.text.indexOf(" ") >= 0) || (yourname.text.indexOf(" ") >= 0)) || (yourname.text.indexOf("\t") >= 0)) {
return(undefined);
}
if (_root.localization_language_nr == 2) {
var time = new Date().getTime();
b = _root.SortT();
a = _root.hex_average(((String(_global.gameID) + _root.spider.score) + b) + time);
_root.DrawLine(a, b, 10, 10, 15, 15);
c = _global.strqq;
_root.senturl(_root.spider.score, b, c, time);
_root.flying.start();
_root.startSound("mainscreen");
_root.gotoAndStop("start");
_root.attachMovie("startui", "start", 1);
return(undefined);
}
var so = SharedObject.getLocal("userHighScore");
if (so.data.highScore == undefined) {
so.data.highScore = [];
var i = 0;
while (i < 10) {
so.data.highScore[i] = {name:"CPU", score:10000 - (i * 1000)};
i++;
}
so.flush();
}
done = false;
var i = 0;
while (i < so.data.highScore.length) {
if (_root.spider.score >= so.data.highScore[i].score) {
so.data.highScore.splice(i, 0, {score:_root.spider.score, name:yourname.text});
done = true;
break;
}
i++;
}
if (done == false) {
so.data.highScore.push({score:_root.spider.score, name:yourname.text});
}
so.flush();
_root.attachMovie("highscore", "highscore", 1);
}
Symbol 427 MovieClip [overui] Frame 1
score.text = _root.spider.score;
sped = 2;
switch (_root.localization_language_nr) {
case 1 :
yourname.text = "Player";
break;
case 2 :
yourname.text = "\u6E38\u5BA2.";
break;
case 3 :
yourname.text = "Speler";
break;
case 4 :
yourname.text = "Joueur";
break;
case 5 :
yourname.text = "Spieler";
break;
case 6 :
yourname.text = "Gracz";
break;
case 7 :
yourname.text = "Spelare";
break;
case 8 :
yourname.text = "Giocatore";
break;
case 9 :
yourname.text = "Jugador";
break;
case 10 :
yourname.text = "Jogador";
break;
case 11 :
yourname.text = "Pemain";
break;
case 12 :
yourname.text = "\u0418\u0433\u0440\u043E\u043A";
break;
default :
yourname.text = "Player";
}
Instance of Symbol 74 MovieClip "a1" in Symbol 427 MovieClip [overui] Frame 1
onClipEvent (enterFrame) {
_x = (_x - _parent.sped);
if (_x < -530) {
_x = (_parent.a2._x + (_parent.a2._width - _parent.sped));
}
_y = (_y - _parent.sped);
if (_y < -530) {
_y = (_parent.a3._y + (_parent.a3._height - _parent.sped));
}
}
Instance of Symbol 74 MovieClip "a2" in Symbol 427 MovieClip [overui] Frame 1
onClipEvent (enterFrame) {
_x = (_x - _parent.sped);
if (_x < -530) {
_x = (_parent.a1._x + (_parent.a1._width - _parent.sped));
}
_y = (_y - _parent.sped);
if (_y < -530) {
_y = (_parent.a4._y + (_parent.a4._height - _parent.sped));
}
}
Instance of Symbol 74 MovieClip "a3" in Symbol 427 MovieClip [overui] Frame 1
onClipEvent (enterFrame) {
_x = (_x - _parent.sped);
if (_x < -530) {
_x = (_parent.a4._x + (_parent.a4._width - _parent.sped));
}
_y = (_y - _parent.sped);
if (_y < -530) {
_y = (_parent.a1._y + (_parent.a1._height - _parent.sped));
}
}
Instance of Symbol 74 MovieClip "a4" in Symbol 427 MovieClip [overui] Frame 1
onClipEvent (enterFrame) {
_x = (_x - _parent.sped);
if (_x < -530) {
_x = (_parent.a3._x + (_parent.a3._width - _parent.sped));
}
_y = (_y - _parent.sped);
if (_y < -530) {
_y = (_parent.a2._y + (_parent.a2._height - _parent.sped));
}
}
Symbol 430 Button
on (release) {
_root.flying.start();
_root.attachMovie("startui", "ui", 1);
}
Symbol 431 Button
on (release) {
_root.flying.start();
_root.gotoAndStop("game");
_root.game = new Game(_root);
_root.mode = "esay";
this.removeMovieClip();
}
Symbol 432 Button
on (release) {
_root.flying.start();
_root.gotoAndStop("game");
_root.game = new Game(_root);
_root.mode = "normal";
this.removeMovieClip();
}
Symbol 433 Button
on (release) {
_root.flying.start();
_root.gotoAndStop("game");
_root.game = new Game(_root);
_root.mode = "hard";
this.removeMovieClip();
}
Symbol 444 MovieClip Frame 1
gotoAndStop(_root.localization_language_nr);
Symbol 452 MovieClip Frame 1
gotoAndStop(_root.localization_language_nr);
Symbol 463 MovieClip Frame 1
gotoAndStop(_root.localization_language_nr);
Symbol 464 MovieClip [options] Frame 1
bgbt.enabled = false;
sped = 2;
Instance of Symbol 74 MovieClip "a1" in Symbol 464 MovieClip [options] Frame 1
onClipEvent (enterFrame) {
_x = (_x - _parent.sped);
if (_x < -530) {
_x = (_parent.a2._x + (_parent.a2._width - _parent.sped));
}
_y = (_y - _parent.sped);
if (_y < -530) {
_y = (_parent.a3._y + (_parent.a3._height - _parent.sped));
}
}
Instance of Symbol 74 MovieClip "a2" in Symbol 464 MovieClip [options] Frame 1
onClipEvent (enterFrame) {
_x = (_x - _parent.sped);
if (_x < -530) {
_x = (_parent.a1._x + (_parent.a1._width - _parent.sped));
}
_y = (_y - _parent.sped);
if (_y < -530) {
_y = (_parent.a4._y + (_parent.a4._height - _parent.sped));
}
}
Instance of Symbol 74 MovieClip "a3" in Symbol 464 MovieClip [options] Frame 1
onClipEvent (enterFrame) {
_x = (_x - _parent.sped);
if (_x < -530) {
_x = (_parent.a4._x + (_parent.a4._width - _parent.sped));
}
_y = (_y - _parent.sped);
if (_y < -530) {
_y = (_parent.a1._y + (_parent.a1._height - _parent.sped));
}
}
Instance of Symbol 74 MovieClip "a4" in Symbol 464 MovieClip [options] Frame 1
onClipEvent (enterFrame) {
_x = (_x - _parent.sped);
if (_x < -530) {
_x = (_parent.a3._x + (_parent.a3._width - _parent.sped));
}
_y = (_y - _parent.sped);
if (_y < -530) {
_y = (_parent.a2._y + (_parent.a2._height - _parent.sped));
}
}
Symbol 469 Button
on (release) {
if (_root.game.level == 13) {
_root.spider.win();
this.removeMovieClip();
return(undefined);
}
if ((_currentframe % 10) == 0) {
Mouse.hide();
nextFrame();
trace("_currentframe");
_root.game.initLevel();
this.removeMovieClip();
}
}
Symbol 485 MovieClip Frame 1
gotoAndStop(_root.localization_language_nr);
Symbol 561 MovieClip Frame 12
_parent.gotoAndStop("normal");
Symbol 622 MovieClip Frame 19
_parent.gotoAndStop("normal");
Symbol 623 MovieClip Frame 1
stop();
Symbol 637 MovieClip Frame 1
gotoAndStop(_root.localization_language_nr);
Symbol 650 MovieClip Frame 1
gotoAndStop(_root.localization_language_nr);
Symbol 665 MovieClip Frame 1
gotoAndStop(_root.localization_language_nr);
Symbol 668 MovieClip [levelmap] Frame 1
this.onEnterFrame = function () {
if (Key.isDown(32)) {
if (_root.game.level == 13) {
_root.spider.win();
this.removeMovieClip();
return(undefined);
}
if ((_currentframe % 10) == 0) {
nextFrame();
trace("_currentframe");
_root.game.initLevel();
this.removeMovieClip();
}
}
};
sped = 2;
Instance of Symbol 74 MovieClip "a1" in Symbol 668 MovieClip [levelmap] Frame 1
onClipEvent (enterFrame) {
_x = (_x - _parent.sped);
if (_x < -530) {
_x = (_parent.a2._x + (_parent.a2._width - _parent.sped));
}
_y = (_y - _parent.sped);
if (_y < -530) {
_y = (_parent.a3._y + (_parent.a3._height - _parent.sped));
}
}
Instance of Symbol 74 MovieClip "a2" in Symbol 668 MovieClip [levelmap] Frame 1
onClipEvent (enterFrame) {
_x = (_x - _parent.sped);
if (_x < -530) {
_x = (_parent.a1._x + (_parent.a1._width - _parent.sped));
}
_y = (_y - _parent.sped);
if (_y < -530) {
_y = (_parent.a4._y + (_parent.a4._height - _parent.sped));
}
}
Instance of Symbol 74 MovieClip "a3" in Symbol 668 MovieClip [levelmap] Frame 1
onClipEvent (enterFrame) {
_x = (_x - _parent.sped);
if (_x < -530) {
_x = (_parent.a4._x + (_parent.a4._width - _parent.sped));
}
_y = (_y - _parent.sped);
if (_y < -530) {
_y = (_parent.a1._y + (_parent.a1._height - _parent.sped));
}
}
Instance of Symbol 74 MovieClip "a4" in Symbol 668 MovieClip [levelmap] Frame 1
onClipEvent (enterFrame) {
_x = (_x - _parent.sped);
if (_x < -530) {
_x = (_parent.a3._x + (_parent.a3._width - _parent.sped));
}
_y = (_y - _parent.sped);
if (_y < -530) {
_y = (_parent.a2._y + (_parent.a2._height - _parent.sped));
}
}
Symbol 668 MovieClip [levelmap] Frame 10
stop();
Symbol 668 MovieClip [levelmap] Frame 20
stop();
Symbol 668 MovieClip [levelmap] Frame 30
stop();
Symbol 668 MovieClip [levelmap] Frame 40
stop();
Symbol 668 MovieClip [levelmap] Frame 50
stop();
Symbol 668 MovieClip [levelmap] Frame 60
stop();
Symbol 668 MovieClip [levelmap] Frame 70
stop();
Symbol 668 MovieClip [levelmap] Frame 80
stop();
Symbol 668 MovieClip [levelmap] Frame 90
stop();
Symbol 668 MovieClip [levelmap] Frame 100
stop();
Symbol 668 MovieClip [levelmap] Frame 110
stop();
Symbol 668 MovieClip [levelmap] Frame 120
stop();
Symbol 670 Button
on (release) {
onspace();
}
Symbol 738 MovieClip Frame 1
gotoAndStop(_root.localization_language_nr);
Symbol 739 MovieClip [levelcomplete] Frame 1
function onspace() {
if (doned) {
if (_root.game.level >= 13) {
_root.spider.win();
} else {
_root.attachMap();
}
this.removeMovieClip();
} else {
while (doned == false) {
doadd();
}
}
}
function doadd() {
if (e < energy) {
ebonus = ebonus + 50;
score = score + 50;
e++;
} else if (t < time) {
tbonus = tbonus + 10;
score = score + 10;
t++;
} else if (_root.mode == "esay") {
if (lbonus < 1000) {
lbonus = lbonus + 100;
score = score + 100;
} else {
_root.spider.score = score;
doned = true;
}
} else if (_root.mode == "normal") {
if (lbonus < 2500) {
lbonus = lbonus + 100;
score = score + 100;
} else {
_root.spider.score = score;
doned = true;
}
} else if (_root.mode == "hard") {
if (lbonus < 5000) {
lbonus = lbonus + 100;
score = score + 100;
} else {
_root.spider.score = score;
doned = true;
}
}
}
t = 0;
e = 0;
doned = false;
level = _root.game.level - 1;
_root.stopSound();
_root.completed.start(0, 1);
this.onEnterFrame = function () {
if (doned == false) {
doadd();
}
if (Key.isDown(32)) {
onspace();
}
};
tbonus = 0;
ebonus = 0;
lbonus = 0;
Symbol 756 MovieClip Frame 1
gotoAndStop(_root.localization_language_nr);
Symbol 767 MovieClip Frame 1
gotoAndStop(_root.localization_language_nr);
Symbol 778 MovieClip Frame 1
gotoAndStop(_root.localization_language_nr);
Symbol 791 MovieClip Frame 1
gotoAndStop(_root.localization_language_nr);
Symbol 792 MovieClip [highscore] Frame 1
function creatText(nam, x, y, w, h, dep, content) {
var _local2 = new TextFormat();
_local2.blockIndent = 20;
_local2.font = "Arial Black";
_local2.color = 13378099 /* 0xCC2233 */;
_local2.size = 12;
var _local3 = this.createTextField(nam, dep, x, y, w + 5, h + 5);
_local3.selectable = false;
_local3.text = content;
var _local4 = _local3.filters;
_local4.push(myDropFilter);
_local3.setTextFormat(_local2);
_local3.filters = _local4;
}
sped = 2;
switch (_root.localization_language_nr) {
case 1 :
outcup = "CPU";
break;
case 2 :
outcup = "\u7535\u8111.";
break;
case 3 :
outcup = "CPU";
break;
case 4 :
outcup = "PC";
break;
case 5 :
outcup = "CPU";
break;
case 6 :
outcup = "KOMPUTER";
break;
case 7 :
outcup = "PC";
break;
case 8 :
outcup = "PC";
break;
case 9 :
outcup = "CPU";
break;
case 10 :
outcup = "CPU";
break;
case 11 :
outcup = "KOMPUTER";
break;
case 12 :
outcup = "\u041A\u041E\u041C\u041F\u042C\u042E\u0422\u0415\u0420";
break;
default :
outcup = "CPU";
}
var myDropFilter = (new flash.filters.GlowFilter(13421772, 2, 2, 3, 100, 1));
tempscores = [75000, 50000, 40000, 30000, 25000, 20000, 15000, 10000, 7500, 5000];
var so = SharedObject.getLocal("userHighScore");
if (so.data.highScore == undefined) {
so.data.highScore = [];
var i = 0;
while (i < 10) {
so.data.highScore[i] = {name:outcup, score:tempscores[i]};
i++;
}
so.flush();
var up = Math.min(10, so.data.highScore.length);
var i = 0;
while (i < up) {
creatText("t" + i, 125, 100 + (i * 20), 80, 16, (i * 3) + 3, i + 1);
creatText("tm" + i, 210, 100 + (i * 20), 150, 16, (i * 3) + 4, so.data.highScore[i].name);
creatText("ts" + i, 340, 100 + (i * 20), 100, 16, (i * 3) + 5, so.data.highScore[i].score);
i++;
}
} else {
var up = Math.min(10, so.data.highScore.length);
var i = 0;
while (i < up) {
creatText("t" + i, 125, 100 + (i * 20), 80, 16, (i * 3) + 3, i + 1);
creatText("tm" + i, 210, 100 + (i * 20), 150, 16, (i * 3) + 4, so.data.highScore[i].name);
creatText("ts" + i, 340, 100 + (i * 20), 100, 16, (i * 3) + 5, so.data.highScore[i].score);
i++;
}
}
Mouse.show();
stop();
Instance of Symbol 74 MovieClip "a1" in Symbol 792 MovieClip [highscore] Frame 1
onClipEvent (enterFrame) {
_x = (_x - _parent.sped);
if (_x < -530) {
_x = (_parent.a2._x + (_parent.a2._width - _parent.sped));
}
_y = (_y - _parent.sped);
if (_y < -530) {
_y = (_parent.a3._y + (_parent.a3._height - _parent.sped));
}
}
Instance of Symbol 74 MovieClip "a2" in Symbol 792 MovieClip [highscore] Frame 1
onClipEvent (enterFrame) {
_x = (_x - _parent.sped);
if (_x < -530) {
_x = (_parent.a1._x + (_parent.a1._width - _parent.sped));
}
_y = (_y - _parent.sped);
if (_y < -530) {
_y = (_parent.a4._y + (_parent.a4._height - _parent.sped));
}
}
Instance of Symbol 74 MovieClip "a3" in Symbol 792 MovieClip [highscore] Frame 1
onClipEvent (enterFrame) {
_x = (_x - _parent.sped);
if (_x < -530) {
_x = (_parent.a4._x + (_parent.a4._width - _parent.sped));
}
_y = (_y - _parent.sped);
if (_y < -530) {
_y = (_parent.a1._y + (_parent.a1._height - _parent.sped));
}
}
Instance of Symbol 74 MovieClip "a4" in Symbol 792 MovieClip [highscore] Frame 1
onClipEvent (enterFrame) {
_x = (_x - _parent.sped);
if (_x < -530) {
_x = (_parent.a3._x + (_parent.a3._width - _parent.sped));
}
_y = (_y - _parent.sped);
if (_y < -530) {
_y = (_parent.a2._y + (_parent.a2._height - _parent.sped));
}
}
Symbol 796 Button
on (press) {
if (_root._currentframe == 7) {
_root.flying.start();
_root.gotoAndStop("start");
} else {
_root.flying.start();
this.removeMovieClip();
}
}
Symbol 810 MovieClip Frame 1
gotoAndStop(_root.localization_language_nr);
Symbol 823 MovieClip Frame 1
gotoAndStop(_root.localization_language_nr);
Symbol 836 MovieClip Frame 1
gotoAndStop(_root.localization_language_nr);
Symbol 849 MovieClip Frame 1
gotoAndStop(_root.localization_language_nr);
Symbol 862 MovieClip Frame 1
gotoAndStop(_root.localization_language_nr);
Symbol 863 MovieClip [helpui] Frame 1
sped = 2;
bb.enabled = false;
if (_root._currentframe == 7) {
s_mc._visible = false;
h_mc._visible = true;
} else {
s_mc._visible = true;
h_mc._visible = false;
}
Instance of Symbol 74 MovieClip "a1" in Symbol 863 MovieClip [helpui] Frame 1
onClipEvent (enterFrame) {
_x = (_x - _parent.sped);
if (_x < -530) {
_x = (_parent.a2._x + (_parent.a2._width - _parent.sped));
}
_y = (_y - _parent.sped);
if (_y < -530) {
_y = (_parent.a3._y + (_parent.a3._height - _parent.sped));
}
}
Instance of Symbol 74 MovieClip "a2" in Symbol 863 MovieClip [helpui] Frame 1
onClipEvent (enterFrame) {
_x = (_x - _parent.sped);
if (_x < -530) {
_x = (_parent.a1._x + (_parent.a1._width - _parent.sped));
}
_y = (_y - _parent.sped);
if (_y < -530) {
_y = (_parent.a4._y + (_parent.a4._height - _parent.sped));
}
}
Instance of Symbol 74 MovieClip "a3" in Symbol 863 MovieClip [helpui] Frame 1
onClipEvent (enterFrame) {
_x = (_x - _parent.sped);
if (_x < -530) {
_x = (_parent.a4._x + (_parent.a4._width - _parent.sped));
}
_y = (_y - _parent.sped);
if (_y < -530) {
_y = (_parent.a1._y + (_parent.a1._height - _parent.sped));
}
}
Instance of Symbol 74 MovieClip "a4" in Symbol 863 MovieClip [helpui] Frame 1
onClipEvent (enterFrame) {
_x = (_x - _parent.sped);
if (_x < -530) {
_x = (_parent.a3._x + (_parent.a3._width - _parent.sped));
}
_y = (_y - _parent.sped);
if (_y < -530) {
_y = (_parent.a2._y + (_parent.a2._height - _parent.sped));
}
}
Symbol 866 MovieClip Frame 15
stop();
Symbol 878 MovieClip [world_1_dec] Frame 1
stop();
gotoAndStop(random(10) + 1);
this.cacheAsBitmap = true;
Symbol 880 MovieClip [world_1_tile] Frame 1
this.cacheAsBitmap = true;
Symbol 892 MovieClip [world_2_dec] Frame 1
stop();
gotoAndStop(random(10) + 1);
this.cacheAsBitmap = true;
Symbol 894 MovieClip [world_2_tile] Frame 1
this.cacheAsBitmap = true;
Symbol 905 MovieClip [world_3_dec] Frame 1
stop();
gotoAndStop(random(10) + 1);
Symbol 905 MovieClip [world_3_dec] Frame 10
this.cacheAsBitmap = true;
Symbol 907 MovieClip [world_3_tile] Frame 1
this.cacheAsBitmap = true;
Symbol 933 MovieClip Frame 1
stop();
Symbol 954 MovieClip Frame 1
stop();
Symbol 1021 MovieClip Frame 1
gotoAndStop(_root.localization_branding_nr);
stop();
Symbol 1031 MovieClip [bg1] Frame 1
var blurX = 3;
var blurY = 3;
var quality = 3;
var filter = (new flash.filters.BlurFilter(blurX, blurY, quality));
var filterArray = new Array();
filterArray.push(filter);
this.filters = filterArray;
Symbol 1031 MovieClip [bg1] Frame 2
var blurX = 10;
var blurY = 10;
var quality = 3;
var filter = (new flash.filters.BlurFilter(blurX, blurY, quality));
var filterArray = new Array();
filterArray.push(filter);
this.filters = filterArray;
Symbol 1031 MovieClip [bg1] Frame 3
var blurX = 10;
var blurY = 10;
var quality = 3;
var filter = (new flash.filters.BlurFilter(blurX, blurY, quality));
var filterArray = new Array();
filterArray.push(filter);
this.filters = filterArray;
Symbol 1045 MovieClip [bg2] Frame 1
var blurX = 3;
var blurY = 3;
var quality = 1;
var filter = (new flash.filters.BlurFilter(blurX, blurY, quality));
var filterArray = new Array();
filterArray.push(filter);
this.filters = filterArray;
Symbol 1057 MovieClip [cursor] Frame 1
stop();
Symbol 1076 MovieClip [lader] Frame 1
stop();
Symbol 1103 MovieClip Frame 1
gotoAndStop(_root.localization_language_nr);
Symbol 1105 MovieClip [timeup_mc] Frame 82
if (_root.spider.life <= 0) {
_root.spider.gameover();
} else {
_root.sttime = getTimer();
_root.spider.initmc(20, 20);
this.removeMovieClip();
}
Symbol 1114 MovieClip [trampoline] Frame 1
fy = -3;
stop();
Symbol 1114 MovieClip [trampoline] Frame 2
fy = fy - 5;
Symbol 1114 MovieClip [trampoline] Frame 4
fy = fy - 5;
Symbol 1114 MovieClip [trampoline] Frame 6
fy = fy - 3;
Symbol 1114 MovieClip [trampoline] Frame 8
fy = fy - 3;
Symbol 1114 MovieClip [trampoline] Frame 9
fy = fy - 5;
Symbol 1114 MovieClip [trampoline] Frame 10
fy = fy + 2;
Symbol 1114 MovieClip [trampoline] Frame 15
Symbol 1114 MovieClip [trampoline] Frame 16
fy = fy + 1;
Symbol 1114 MovieClip [trampoline] Frame 17
fy = 0;
Symbol 1171 MovieClip Frame 1
stop();
_visible = false;
Symbol 1224 MovieClip Frame 7
stop();
Symbol 1225 MovieClip Frame 240
stop();
Symbol 1226 MovieClip Frame 1
_visible = false;
this.onRelease = function () {
getURL ("http://www.game.com.cn", "_blank");
};
if (_root.localization_language_nr != 2) {
stop();
_root.startSound("mainscreen");
_parent.play();
} else {
_visible = true;
}
Symbol 1226 MovieClip Frame 240
stop();
_root.startSound("mainscreen");
_root.play();