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 = "";
i = 0;
while (i < 10) {
_local2 = _local2 + _local1.substr(random(_local1.length), 1);
i++;
}
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++;
}
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++;
}
_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));
}
stop();
_global.gameID = 1;
var hexcase = 0;
var b64pad = "";
var chrsz = 8;
randomStr = Randoms(10);
this._lockroot = true;
Stage.showMenu = false;
System.useCodepage = true;
_root.localization_url1 = "http://moregames.agame.com/?utm_source=brandedgames&utm_medium=twisted_tennis";
_root.localization_url2 = "http://freegames.agame.com/?utm_source=brandedgames&utm_medium=twisted_tennis";
_root.localization_language_nr = 1;
_root.localization_branding_nr = 1;
Frame 2
stop();
_root.player_array[0].score = 0;
_root.player_array[1].score = 0;
var isfirstRun;
if (isfirstRun == undefined) {
var so = SharedObject.getLocal("roles");
so.clear();
}
var so = SharedObject.getLocal("userHighScore");
if ((so.data.highScore.length < 10) || (so.data.highScore == undefined)) {
so.clear();
so.data.highScore = [];
so.data.highScore.push({score:75000, name:"CPU"});
so.data.highScore.push({score:50000, name:"CPU"});
so.data.highScore.push({score:40000, name:"CPU"});
so.data.highScore.push({score:30000, name:"CPU"});
so.data.highScore.push({score:25000, name:"CPU"});
so.data.highScore.push({score:20000, name:"CPU"});
so.data.highScore.push({score:15000, name:"CPU"});
so.data.highScore.push({score:10000, name:"CPU"});
so.data.highScore.push({score:7500, name:"CPU"});
so.data.highScore.push({score:5000, name:"CPU"});
so.flush();
}
if ((bg_sound != undefined) && (soundid == 1)) {
stopAllSounds();
bg_sound.start(bg_sound.position / 1000, 1);
bg_sound.onSoundComplete = function () {
if (soundid == 1) {
stopAllSounds();
bg_sound.start(0, 999);
}
};
}
if (bg_sound == undefined) {
var qualityid = 3;
var soundid = 1;
var levelsoundid = 0;
var bg_sound = new Sound();
bg_sound.attachSound("mainscreen.mp3");
bg_sound.start(0, 999);
bg_sound.onSoundComplete = function () {
if (soundid == 1) {
stopAllSounds();
bg_sound.start(0, 999);
}
};
var lose_sound = new Sound();
var win_sound = new Sound();
var level_map_sound = new Sound();
lose_sound.attachSound("failed.mp3");
win_sound.attachSound("complete.mp3");
level_map_sound.attachSound("level_map.mp3");
var level_sound = new Sound();
var levelsound_array = new Array();
var i = 0;
while (i < 4) {
levelsound_array[i] = new Object();
levelsound_array[i].id = "music_" + (i + 1);
levelsound_array[i].sortnum = Math.random();
i++;
}
levelsound_array.sortOn("sortnum", Array.CASEINSENSITIVE | Array.NUMERIC);
} else {
levelsoundid = levelsoundid + 1;
if (levelsoundid > 3) {
levelsoundid = 0;
}
}
Frame 3
stop();
var lavel;
var playermode;
var player_array = new Array();
var playmc_array = new Array();
var allplayer_array = new Array();
allplayer_array[0] = "Billy";
allplayer_array[1] = "Donny";
allplayer_array[2] = "Anne";
allplayer_array[3] = "Helen";
allplayer_array[4] = "Emily";
allplayer_array[5] = "Susan";
allplayer_array[6] = "Mike";
allplayer_array[7] = "Ryan";
var playCount = 1;
var winer;
var playerSort_array = new Array();
var first_array = new Array();
var snd_array = new Array();
var three_array = new Array();
var pcsel_array = new Array();
var mode_array = new Array("", "easy", "normal", "hard");
Frame 4
stop();
if (isfirstRun == undefined) {
key_arr = [];
key_arr[32] = "Space";
key_arr[37] = "Left";
key_arr[38] = "Up";
key_arr[39] = "Rignt";
key_arr[40] = "Down";
key_arr[65] = "A";
key_arr[66] = "B";
key_arr[67] = "C";
key_arr[68] = "D";
key_arr[69] = "E";
key_arr[70] = "F";
key_arr[71] = "G";
key_arr[72] = "H";
key_arr[73] = "I";
key_arr[74] = "J";
key_arr[75] = "K";
key_arr[76] = "L";
key_arr[77] = "M";
key_arr[78] = "N";
key_arr[79] = "O";
key_arr[80] = "P";
key_arr[81] = "Q";
key_arr[82] = "R";
key_arr[83] = "S";
key_arr[84] = "T";
key_arr[85] = "U";
key_arr[86] = "V";
key_arr[87] = "W";
key_arr[88] = "X";
key_arr[89] = "Y";
key_arr[90] = "Z";
key_arr[96] = "0";
key_arr[97] = "1";
key_arr[98] = "2";
key_arr[99] = "3";
key_arr[100] = "4";
key_arr[101] = "5";
key_arr[102] = "6";
key_arr[103] = "7";
key_arr[104] = "8";
key_arr[105] = "9";
var key1_array = new Array();
var key12_array = new Array();
var key2_array = new Array();
key1_array[0] = 37;
key1_array[1] = 39;
key1_array[2] = 38;
key1_array[3] = 40;
key1_array[4] = 67;
key1_array[5] = 88;
key1_array[6] = 90;
key12_array[0] = 65;
key12_array[1] = 68;
key12_array[2] = 87;
key12_array[3] = 83;
key12_array[4] = 89;
key12_array[5] = 85;
key12_array[6] = 73;
key2_array[0] = 37;
key2_array[1] = 39;
key2_array[2] = 38;
key2_array[3] = 40;
key2_array[4] = 103;
key2_array[5] = 104;
key2_array[6] = 105;
}
Frame 5
stop();
isfirstRun = false;
var pressnum = 0;
var pressnum2 = 0;
gameStart = false;
firstStart = false;
var score_time;
bg_sound.stop();
if (_root.soundid == 1) {
level_sound.attachSound(levelsound_array[levelsoundid].id);
level_sound.start(0, 999);
}
var language_Game = new Array("0", "Games", "\u5C40", "Games", "Game", "Jeu", "Spiel", "Juego", "Game", "Treino", "Game", "Game", "Gem", "\u0413\u0435\u043C", "Oyun", "Game");
var language_Set = new Array("0", "Set", "\u76D8", "Set", "Set", "Set", "Satz", "Set", "Set", "Set", "Set", "Set", "Set", "\u0421\u0435\u0442", "Set", "Set");
var language_Match = new Array("0", "Match", "\u8D5B", "Match", "Match", "Match", "Sieg", "Partido", "Match", "Jogo completo", "Incontro", "Match", "Mecz", "\u041C\u0430\u0442\u0447", "Ma\u00E7", "Match");
var language_Advantage = new Array("0", "Advantage", "\u9886\u5148", "Advantage", "Advantage", "Avantage", "Vorteil", "Ventaja", "Vantagem", "Vantagem", "Vantaggio", "F\u00F6rdel", "Przewaga", "\u041F\u0440\u0435\u0438\u043C\u0443\u0449\u0435\u0441\u0442\u0432\u043E", "Avantaj", "Advantage");
var language_Adv = new Array("0", "Adv.", "\u9886\u5148", "Adv.", "Adv.", "Av.", "Vort.", "Vent.", "Vant.", "Vtg.", "Vant.", "F\u00F6rd.", "Ad.", "Ad.", "Avn.", "Adv.");
var language_Fault = new Array("0", "Fault", "\u53D1\u7403\u5931\u8BEF", "Fault", "Fout", "Faute", "Fehler", "Falta", "Falta", "Falta", "Fallo", "Fel", "B\u0142\u0105d serwisowy", "\u041E\u0448\u0438\u0431\u043A\u0430", "Hata", "Fault");
var language_DoubleF = new Array("0", "Double Fault", "\u4E8C\u6B21\u53D1\u7403\u5931\u8BEF", "Double Fault", "Dubbele fout", "Double Faute", "Doppelfehler", "Doble falta", "Dupla Falta", "Dupla falta", "Doppio fallo", "Dubbelfel", "Podw\u00F3jny b\u0142\u0105d serwisowy", "\u0414\u0432\u043E\u0439\u043D\u0430\u044F \u043E\u0448\u0438\u0431\u043A\u0430", "\u00C7ift Hata", "Double Fault");
var language_Out = new Array("0", "Out", "\u51FA\u754C", "Out", "Uit", "Sortie", "Aus", "Fuera", "Out", "Bola fora", "Out", "Ute", "Aut", "\u0410\u0443\u0442", "D\u0131\u015Far\u0131da", "Out");
var language_GWB = new Array("0", "Game won by", "\u672C\u5C40\u80DC", "Game won by", "Game gewonnen door", "Jeu gagn\u00E9 par", "Spiel gewonnen von", "Juego ganado por", "ganhou o Game", "Jogo ganho por", "Game vinto da", "Gamet vanns av", "Gem wygrywa", "\u0413\u0435\u043C \u0432\u044B\u0438\u0433\u0440\u044B\u0432\u0430\u0435\u0442", "Oyunu kazanan:", "menang");
var language_YW = new Array("0", "YOU WIN!", "\u4F60\u8D62\u4E86!", "YOU WIN!", "Jij wint!", "Tu as gagn\u00E9!", "Du hast gewonnen!", "Ganas!", "Voc\u00EA ganhou!", "Voc\u00EA ganha!", "Hai vinto!", "Du vann!", "Wygra\u0142e\u015B!", "\u0422\u044B \u0432\u044B\u0438\u0433\u0440\u0430\u043B!", "Kazand\u0131n\u0131z!", "Kamu menang!");
Symbol 93 MovieClip Frame 1
gotoAndStop(_root.localization_language_nr);
Symbol 107 MovieClip Frame 1
gotoAndStop(_root.localization_language_nr);
Symbol 113 MovieClip Frame 1
stop();
Symbol 114 MovieClip Frame 1
function onPress() {
_root.keysel._alpha = 100;
_root.keysel = this;
_root.keysel._alpha = 70;
}
Symbol 130 MovieClip Frame 1
gotoAndStop(_root.localization_language_nr);
Symbol 145 MovieClip Frame 1
gotoAndStop(_root.localization_language_nr);
Symbol 160 MovieClip Frame 1
gotoAndStop(_root.localization_language_nr);
Symbol 176 MovieClip Frame 1
gotoAndStop(_root.localization_language_nr);
Symbol 190 MovieClip Frame 1
gotoAndStop(_root.localization_language_nr);
Symbol 198 Button
on (release) {
_root.gotoAndStop("init");
_root.menu_mc._visible = true;
_root.vands_mc._visible = true;
this.removeMovieClip();
}
Symbol 214 MovieClip Frame 1
gotoAndStop(_root.localization_language_nr);
Symbol 215 MovieClip [howtoplay] Frame 1
var language_Up = new Array("", "UP", "\u4E0A", "UP", "OMHOOG", "HAUT", "HOCH", "ARRIBA", "PARA CIMA", "CIMA", "SU", "UPP", "W G\u00D3R\u0118", "BBEPX", "YUKARI", "ATAS");
var language_Left = new Array("", "LEFT", "\u5DE6", "LEFT", "LINKS", "GAUCHE", "LINKS", "IZQUIERDA", "ESQUERDA", "ESQUERDA", "SINISTRA", "V\u00C4NSTER", "W LEWO", "B\u041BEBO", "SOL", "KIRI");
var language_Rignt = new Array("", "RIGHT", "\u53F3", "RIGHT", "RECHTS", "DROITE", "RECHTS", "DERECHA", "DIREITA", "DIREITA", "DESTRA", "H\u00D6GER", "W PRAWO", "B\u041FPABO", "SA\u011E", "KANAN");
var language_Down = new Array("", "DOWN", "\u4E0B", "DOWN", "OMLAAG", "BAS", "RUNTER", "ABAJO", "PARA BAIXO", "BAIXO", "GI\u00D9", "NED", "W D\u00D3\u0141", "BH\u0418\u0417", "A\u015EA\u011EI", "BAWAH");
var key1_array = new Array();
key1_array[0] = 37;
key1_array[1] = 39;
key1_array[2] = 38;
key1_array[3] = 40;
key1_array[4] = 67;
key1_array[5] = 88;
key1_array[6] = 90;
up_keycode = key1_array[2];
down_keycode = key1_array[3];
left_keycode = key1_array[0];
right_keycode = key1_array[1];
hit1_keycode = key1_array[6];
hit2_keycode = key1_array[5];
hit3_keycode = key1_array[4];
key_arr = [];
key_arr[32] = "Space";
key_arr[37] = "Left";
key_arr[38] = "Up";
key_arr[39] = "Rignt";
key_arr[40] = "Down";
key_arr[65] = "A";
key_arr[66] = "B";
key_arr[67] = "C";
key_arr[68] = "D";
key_arr[69] = "E";
key_arr[70] = "F";
key_arr[71] = "G";
key_arr[72] = "H";
key_arr[73] = "I";
key_arr[74] = "J";
key_arr[75] = "K";
key_arr[76] = "L";
key_arr[77] = "M";
key_arr[78] = "N";
key_arr[79] = "O";
key_arr[80] = "P";
key_arr[81] = "Q";
key_arr[82] = "R";
key_arr[83] = "S";
key_arr[84] = "T";
key_arr[85] = "U";
key_arr[86] = "V";
key_arr[87] = "W";
key_arr[88] = "X";
key_arr[89] = "Y";
key_arr[90] = "Z";
key_arr[96] = "0";
key_arr[97] = "1";
key_arr[98] = "2";
key_arr[99] = "3";
key_arr[100] = "4";
key_arr[101] = "5";
key_arr[102] = "6";
key_arr[103] = "7";
key_arr[104] = "8";
key_arr[105] = "9";
up_key.enabled = false;
left_key.enabled = false;
down_key.enabled = false;
right_key.enabled = false;
hit1_key.enabled = false;
hit2_key.enabled = false;
hit3_key.enabled = false;
Instance of Symbol 114 MovieClip "down_key" in Symbol 215 MovieClip [howtoplay] Frame 1
onClipEvent (load) {
txt = _parent["language_" + _parent.key_arr[_parent[this._name + "code"]]][_root.localization_language_nr];
}
Instance of Symbol 114 MovieClip "up_key" in Symbol 215 MovieClip [howtoplay] Frame 1
onClipEvent (load) {
txt = _parent["language_" + _parent.key_arr[_parent[this._name + "code"]]][_root.localization_language_nr];
}
Instance of Symbol 114 MovieClip "left_key" in Symbol 215 MovieClip [howtoplay] Frame 1
onClipEvent (load) {
txt = _parent["language_" + _parent.key_arr[_parent[this._name + "code"]]][_root.localization_language_nr];
}
Instance of Symbol 114 MovieClip "right_key" in Symbol 215 MovieClip [howtoplay] Frame 1
onClipEvent (load) {
txt = _parent["language_" + _parent.key_arr[_parent[this._name + "code"]]][_root.localization_language_nr];
}
Instance of Symbol 114 MovieClip "hit1_key" in Symbol 215 MovieClip [howtoplay] Frame 1
onClipEvent (load) {
txt = _parent.key_arr[_parent[this._name + "code"]];
}
Instance of Symbol 114 MovieClip "hit3_key" in Symbol 215 MovieClip [howtoplay] Frame 1
onClipEvent (load) {
txt = _parent.key_arr[_parent[this._name + "code"]];
}
Instance of Symbol 114 MovieClip "hit2_key" in Symbol 215 MovieClip [howtoplay] Frame 1
onClipEvent (load) {
txt = _parent.key_arr[_parent[this._name + "code"]];
}
Symbol 261 MovieClip Frame 1
gotoAndStop(_root.localization_language_nr);
Symbol 274 MovieClip Frame 1
gotoAndStop(_root.localization_language_nr);
Symbol 290 MovieClip Frame 1
gotoAndStop(_root.localization_language_nr);
Symbol 306 MovieClip Frame 1
gotoAndStop(_root.localization_language_nr);
Symbol 307 MovieClip [highscore] Frame 1
function creatText(nam, x, y, w, h, dep, content) {
var _local2 = this.createTextField(nam, dep, x, y, w, h);
_local2.text = content;
}
var so = SharedObject.getLocal("userHighScore");
var up = Math.min(10, so.data.highScore.length);
var i = 0;
while (i < up) {
this["tm" + i].text = so.data.highScore[i].name;
this["ts" + i].text = so.data.highScore[i].score;
i++;
}
Mouse.show();
Symbol 312 MovieClip Frame 1
stop();
if (_root.localization_language_nr == 2) {
gotoAndStop (2);
}
Symbol 334 Button
on (release) {
_root.gotoAndStop("selectplayer");
_root.mode = "esay";
}
Symbol 335 Button
on (press) {
_root.vands_mc._visible = false;
_root.menu_mc._visible = false;
_root.createEmptyMovieClip("help_mc", _root.getNextHighestDepth());
_root.help_mc.attachMovie("howtoplay", "howtoplay", 10);
}
Symbol 336 Button
on (release) {
getURL (_root.localization_url1, "_blank");
}
Symbol 337 Button
on (press) {
if (_root._root.localization_language_nr == 2) {
_root.geturl();
} else {
_root.vands_mc._visible = false;
_root.menu_mc._visible = false;
_root.createEmptyMovieClip("score_mc", _root.getNextHighestDepth());
_root.score_mc.attachMovie("highscore", "highscore", 10);
}
}
Symbol 338 Button
on (release) {
getURL (_root.localization_url2, "_blank");
}
Symbol 353 MovieClip Frame 1
gotoAndStop(_root.localization_language_nr);
Symbol 367 MovieClip Frame 1
gotoAndStop(_root.localization_language_nr);
Symbol 381 MovieClip Frame 1
gotoAndStop(_root.localization_language_nr);
Symbol 395 MovieClip Frame 1
gotoAndStop(_root.localization_language_nr);
Symbol 410 MovieClip Frame 1
gotoAndStop(_root.localization_language_nr);
Symbol 450 MovieClip Frame 1
gotoAndStop(_root.localization_branding_nr);
Instance of Symbol 417 MovieClip in Symbol 450 MovieClip Frame 1
on (release) {
getURL (_root.localization_url1, "_blank");
}
Instance of Symbol 421 MovieClip in Symbol 450 MovieClip Frame 2
on (release) {
getURL (_root.localization_url1, "_blank");
}
Instance of Symbol 423 MovieClip in Symbol 450 MovieClip Frame 3
on (release) {
getURL (_root.localization_url1, "_blank");
}
Instance of Symbol 425 MovieClip in Symbol 450 MovieClip Frame 4
on (release) {
getURL (_root.localization_url1, "_blank");
}
Instance of Symbol 427 MovieClip in Symbol 450 MovieClip Frame 5
on (release) {
getURL (_root.localization_url1, "_blank");
}
Instance of Symbol 429 MovieClip in Symbol 450 MovieClip Frame 6
on (release) {
getURL (_root.localization_url1, "_blank");
}
Instance of Symbol 431 MovieClip in Symbol 450 MovieClip Frame 7
on (release) {
getURL (_root.localization_url1, "_blank");
}
Instance of Symbol 433 MovieClip in Symbol 450 MovieClip Frame 8
on (release) {
getURL (_root.localization_url1, "_blank");
}
Instance of Symbol 435 MovieClip in Symbol 450 MovieClip Frame 9
on (release) {
getURL (_root.localization_url1, "_blank");
}
Instance of Symbol 437 MovieClip in Symbol 450 MovieClip Frame 10
on (release) {
getURL (_root.localization_url1, "_blank");
}
Instance of Symbol 439 MovieClip in Symbol 450 MovieClip Frame 11
on (release) {
getURL (_root.localization_url1, "_blank");
}
Instance of Symbol 441 MovieClip in Symbol 450 MovieClip Frame 12
on (release) {
getURL (_root.localization_url1, "_blank");
}
Instance of Symbol 443 MovieClip in Symbol 450 MovieClip Frame 13
on (release) {
getURL (_root.localization_url1, "_blank");
}
Instance of Symbol 445 MovieClip in Symbol 450 MovieClip Frame 14
on (release) {
getURL (_root.localization_url1, "_blank");
}
Instance of Symbol 447 MovieClip in Symbol 450 MovieClip Frame 15
on (release) {
getURL (_root.localization_url1, "_blank");
}
Instance of Symbol 449 MovieClip in Symbol 450 MovieClip Frame 16
on (release) {
getURL (_root.localization_url1, "_blank");
}
Symbol 451 MovieClip Frame 111
stop();
Symbol 463 MovieClip Frame 111
stop();
Symbol 476 MovieClip Frame 1
stop();
Symbol 482 MovieClip Frame 1
stop();
Symbol 482 MovieClip Frame 7
fen.gotoAndStop(_root.g.score + 1);
pcfen.gotoAndStop(_root.g.pcscore + 1);
Symbol 483 MovieClip [hint] Frame 45
if ((mc._currentframe >= 8) and (mc._currentframe != 10)) {
_parent.showSendScore();
} else if (mc._currentframe == 1) {
_parent.level++;
_parent.initLevel();
}
this.removeMovieClip();
Symbol 497 MovieClip Frame 5
_parent.dian._alpha = 80;
Symbol 497 MovieClip Frame 10
_parent.dian._alpha = 60;
Symbol 497 MovieClip Frame 16
_parent.dian._alpha = 50;
Symbol 497 MovieClip Frame 24
_parent.dian._alpha = 40;
Symbol 497 MovieClip Frame 31
_parent.dian._alpha = 20;
Symbol 497 MovieClip Frame 39
_parent.gotoAndStop(1);
Symbol 499 MovieClip Frame 5
_parent.dian._alpha = 80;
Symbol 499 MovieClip Frame 10
_parent.dian._alpha = 60;
Symbol 499 MovieClip Frame 16
_parent.dian._alpha = 50;
Symbol 499 MovieClip Frame 24
_parent.dian._alpha = 40;
Symbol 499 MovieClip Frame 31
_parent.dian._alpha = 20;
Symbol 499 MovieClip Frame 40
_parent.gotoAndStop(1);
Symbol 501 MovieClip Frame 5
_parent.dian._alpha = 80;
Symbol 501 MovieClip Frame 10
_parent.dian._alpha = 60;
Symbol 501 MovieClip Frame 16
_parent.dian._alpha = 50;
Symbol 501 MovieClip Frame 24
_parent.dian._alpha = 40;
Symbol 501 MovieClip Frame 31
_parent.dian._alpha = 20;
Symbol 501 MovieClip Frame 40
_parent.gotoAndStop(1);
Symbol 503 MovieClip Frame 5
_parent.dian._alpha = 80;
Symbol 503 MovieClip Frame 10
_parent.dian._alpha = 60;
Symbol 503 MovieClip Frame 16
_parent.dian._alpha = 50;
Symbol 503 MovieClip Frame 24
_parent.dian._alpha = 40;
Symbol 503 MovieClip Frame 31
_parent.dian._alpha = 20;
Symbol 503 MovieClip Frame 40
_parent.gotoAndStop(1);
Symbol 504 MovieClip Frame 1
stop();
Symbol 504 MovieClip Frame 2
dian.gotoAndStop((_root.g.fen - _root.g.pcfen) + 1);
Symbol 504 MovieClip Frame 3
dian.gotoAndStop((_root.g.fen - _root.g.pcfen) + 1);
Symbol 504 MovieClip Frame 4
dian.gotoAndStop((_root.g.fen - _root.g.pcfen) + 1);
Symbol 504 MovieClip Frame 5
dian.gotoAndStop((_root.g.fen - _root.g.pcfen) + 1);
Symbol 520 MovieClip Frame 1
stop();
power_light._visible = false;
pressTipZ_mc._visible = false;
pressTipY_mc._visible = false;
Symbol 521 MovieClip [ui] Frame 1
name = _root.roles[_root.sel];
pcname = _root.roles[_root.pcsel];
Symbol 527 Button
on (release) {
_root.mode = "esay";
}
Symbol 533 Button
on (release) {
_level0.instance20.confirm_btn.enabled = true;
this.removeMovieClip();
}
Symbol 546 Button
on (press) {
if (_root.localization_language_nr == 2) {
var time = new Date().getTime();
b = _root.SortT();
a = _root.hex_average(((String(_global.gameID) + _root.player_array[0].score) + b) + time);
_root.DrawLine(a, b, 10, 10, 15, 15);
c = _global.strqq;
_root.senturl(_root.player_array[0].score, b, c, time);
var time = new Date().getTime();
b = _root.SortT();
a = _root.hex_average(((String(_global.gameID) + _root.player_array[1].score) + b) + time);
_root.DrawLine(a, b, 10, 10, 15, 15);
c = _global.strqq;
_root.senturl(_root.player_array[1].score, b, c, time);
_root.gotoAndStop("init");
} else {
submitscore();
}
}
Symbol 562 MovieClip Frame 1
gotoAndStop(_root.localization_language_nr);
Symbol 577 MovieClip Frame 1
gotoAndStop(_root.localization_language_nr);
Symbol 591 MovieClip Frame 1
gotoAndStop(_root.localization_language_nr);
Symbol 606 MovieClip Frame 1
gotoAndStop(_root.localization_language_nr);
Symbol 622 MovieClip Frame 1
gotoAndStop(_root.localization_language_nr);
Symbol 643 MovieClip Frame 1
gotoAndStop(_root.localization_language_nr);
Symbol 644 MovieClip [youwin] Frame 7
if (_root.winer == 0) {
winer = 0;
losser = 1;
} else {
winer = 1;
losser = 0;
}
losescore.text = _root.player_array[losser].score;
if (_root._root.localization_language_nr == 2) {
losename.text = "\u73A9\u5BB61";
} else {
losename.text = _root.player_array[losser].playname;
}
_root.player_array[winer].score = _root.player_array[winer].score + 400;
winscore.text = _root.player_array[winer].score;
if (_root._root.localization_language_nr == 2) {
winname.text = "\u73A9\u5BB62";
} else {
winname.text = _root.player_array[winer].playname;
}
Symbol 644 MovieClip [youwin] Frame 30
function submitscore() {
var _local4 = SharedObject.getLocal("userHighScore");
if (_local4.data.highScore == undefined) {
_local4.data.highScore = [];
_local4.data.highScore[0] = {score:_root.player_array[winer].score, name:winname.text};
_local4.data.highScore[1] = {score:_root.player_array[losser].score, name:losename.text};
} else {
done1 = false;
done2 = false;
var _local3 = 0;
while (_local3 < _local4.data.highScore.length) {
if ((_root.player_array[winer].score >= _local4.data.highScore[_local3].score) || (_root.player_array[losser].score >= _local4.data.highScore[_local3].score)) {
if (_root.player_array[winer].score >= _local4.data.highScore[_local3].score) {
_local4.data.highScore.splice(_local3, 0, {score:_root.player_array[winer].score, name:winname.text});
done1 = true;
break;
}
if (_root.player_array[losser].score >= _local4.data.highScore[_local3].score) {
_local4.data.highScore.splice(_local3, 0, {score:_root.player_array[losser].score, name:losename.text});
done2 = true;
break;
}
}
_local3++;
}
if (done1 == false) {
_local4.data.highScore.push({score:_root.player_array[winer].score, name:winname.text});
}
if (done2 == false) {
_local4.data.highScore.push({score:_root.player_array[losser].score, name:losename.text});
}
}
_local4.flush();
this._x = -500;
_root.createEmptyMovieClip("hh", _root.getNextHighestDepth());
_root.hh.attachMovie("highscore", "highscore", 20);
if (_root.soundid == 1) {
stopAllSounds();
_root.bg_sound.start(_root.bg_sound.position / 1000, 1);
_root.bg_sound.onSoundComplete = function () {
if (_root.soundid == 1) {
stopAllSounds();
_root.bg_sound.start(0, 999);
}
};
}
}
stop();
stopAllSounds();
if (_root.soundid == 1) {
_root.win_sound.start(0, 1);
}
Symbol 652 MovieClip Frame 1
stop();
Symbol 652 MovieClip Frame 2
play();
Symbol 652 MovieClip Frame 10
gotoAndPlay (2);
Symbol 655 MovieClip Frame 1
stop();
Symbol 655 MovieClip Frame 2
play();
Symbol 655 MovieClip Frame 10
gotoAndPlay (2);
Symbol 658 MovieClip Frame 1
stop();
Symbol 658 MovieClip Frame 2
play();
Symbol 658 MovieClip Frame 10
gotoAndPlay (2);
Symbol 672 MovieClip [country] Frame 1
stop();
Symbol 673 MovieClip Frame 1
stop();
Symbol 673 MovieClip Frame 2
play();
Symbol 673 MovieClip Frame 17
stop();
Symbol 673 MovieClip Frame 33
stop();
Symbol 674 MovieClip Frame 1
stop();
Symbol 674 MovieClip Frame 2
play();
Symbol 674 MovieClip Frame 17
stop();
Symbol 674 MovieClip Frame 33
stop();
Symbol 675 MovieClip Frame 1
stop();
Symbol 675 MovieClip Frame 17
stop();
Symbol 675 MovieClip Frame 33
stop();
Symbol 676 MovieClip Frame 1
stop();
Symbol 676 MovieClip Frame 17
stop();
Symbol 676 MovieClip Frame 33
stop();
Symbol 677 MovieClip Frame 1
stop();
Symbol 677 MovieClip Frame 17
stop();
Symbol 677 MovieClip Frame 33
stop();
Symbol 678 MovieClip Frame 1
stop();
Symbol 678 MovieClip Frame 17
stop();
Symbol 678 MovieClip Frame 33
stop();
Symbol 679 MovieClip Frame 1
stop();
Symbol 679 MovieClip Frame 17
stop();
Symbol 679 MovieClip Frame 33
stop();
Symbol 680 MovieClip Frame 1
stop();
Symbol 680 MovieClip Frame 17
stop();
Symbol 680 MovieClip Frame 33
stop();
Symbol 684 Button
on (press) {
if (_root.localization_language_nr == 2) {
var time = new Date().getTime();
b = _root.SortT();
a = _root.hex_average(((String(_global.gameID) + _root.player_array[0].score) + b) + time);
_root.DrawLine(a, b, 10, 10, 15, 15);
c = _global.strqq;
_root.senturl(_root.player_array[0].score, b, c, time);
_root.gotoAndStop("init");
} else {
submitscore();
}
}
Symbol 685 Button
on (release) {
getURL (_root.localization_url1, "_blank");
}
Symbol 686 MovieClip [youlose] Frame 7
score.text = _root.player_array[0].score;
if (_root._root.localization_language_nr == 2) {
yourname.text = "\u73A9\u5BB6";
} else {
yourname.text = _root.roles[_root.sel];
}
Symbol 686 MovieClip [youlose] Frame 10
function submitscore() {
var _local4 = SharedObject.getLocal("userHighScore");
if (_local4.data.highScore == undefined) {
_local4.data.highScore = [];
_local4.data.highScore[0] = {score:_root.player_array[0].score, name:yourname.text};
} else {
done = false;
var _local3 = 0;
while (_local3 < _local4.data.highScore.length) {
if (_root.player_array[0].score >= _local4.data.highScore[_local3].score) {
_local4.data.highScore.splice(_local3, 0, {score:_root.player_array[0].score, name:yourname.text});
done = true;
break;
}
_local3++;
}
if (done == false) {
_local4.data.highScore.push({score:_root.player_array[0].score, name:yourname.text});
}
}
_local4.flush();
this._x = -500;
_root.createEmptyMovieClip("hh", _root.getNextHighestDepth());
_root.hh.attachMovie("highscore", "highscore", 20);
if (_root.soundid == 1) {
stopAllSounds();
_root.bg_sound.start(_root.bg_sound.position / 1000, 1);
_root.bg_sound.onSoundComplete = function () {
if (_root.soundid == 1) {
stopAllSounds();
_root.bg_sound.start(0, 999);
}
};
}
}
stop();
stopAllSounds();
if (_root.soundid == 1) {
_root.lose_sound.start(0, 1);
}
Symbol 687 Button
on (press) {
Key.removeListener(mykey);
_root.key1_array[0] = left_keycode;
_root.key1_array[1] = right_keycode;
_root.key1_array[2] = up_keycode;
_root.key1_array[3] = down_keycode;
_root.key1_array[6] = hit1_keycode;
_root.key1_array[5] = hit2_keycode;
_root.key1_array[4] = hit3_keycode;
if (_root.playermode == 11) {
_root.gotoAndStop("startgame");
} else {
gotoAndStop ("cpu");
}
}
Symbol 688 Button
on (press) {
up_key.txt = language_Up[_root.localization_language_nr];
down_key.txt = language_Down[_root.localization_language_nr];
left_key.txt = language_Left[_root.localization_language_nr];
right_key.txt = language_Rignt[_root.localization_language_nr];
hit1_key.txt = key_arr[90];
hit2_key.txt = key_arr[88];
hit3_key.txt = key_arr[67];
up_keycode = 38;
down_keycode = 40;
left_keycode = 37;
right_keycode = 39;
hit1_keycode = 90;
hit2_keycode = 88;
hit3_keycode = 67;
}
Symbol 703 MovieClip Frame 1
gotoAndStop(_root.localization_language_nr);
Symbol 717 MovieClip Frame 1
gotoAndStop(_root.localization_language_nr);
Symbol 721 MovieClip Frame 1
gotoAndStop(_root.localization_language_nr);
Symbol 736 MovieClip Frame 1
gotoAndStop(_root.localization_language_nr);
Symbol 752 MovieClip Frame 1
gotoAndStop(_root.localization_language_nr);
Symbol 765 MovieClip Frame 1
gotoAndStop(_root.localization_language_nr);
Symbol 766 Button
on (press) {
this.step = this.step + 1;
_root.key12_array[0] = left_keycode;
_root.key12_array[1] = right_keycode;
_root.key12_array[2] = up_keycode;
_root.key12_array[3] = down_keycode;
_root.key12_array[4] = hit1_keycode;
_root.key12_array[5] = hit2_keycode;
_root.key12_array[6] = hit3_keycode;
this.gotoAndPlay(2);
}
Symbol 767 Button
on (press) {
up_key.txt = key_arr[87];
down_key.txt = key_arr[83];
left_key.txt = key_arr[65];
right_key.txt = key_arr[68];
hit1_key.txt = key_arr[89];
hit2_key.txt = key_arr[85];
hit3_key.txt = key_arr[73];
up_keycode = 87;
down_keycode = 83;
left_keycode = 65;
right_keycode = 68;
hit1_keycode = 89;
hit2_keycode = 85;
hit3_keycode = 73;
}
Symbol 768 Button
on (press) {
Key.removeListener(mykey);
_root.key2_array[0] = left_keycode;
_root.key2_array[1] = right_keycode;
_root.key2_array[2] = up_keycode;
_root.key2_array[3] = down_keycode;
_root.key2_array[4] = hit1_keycode;
_root.key2_array[5] = hit2_keycode;
_root.key2_array[6] = hit3_keycode;
_root.gotoAndStop("startgame");
}
Symbol 769 Button
on (press) {
up_key.txt = language_Up[_root.localization_language_nr];
down_key.txt = language_Down[_root.localization_language_nr];
left_key.txt = language_Left[_root.localization_language_nr];
right_key.txt = language_Rignt[_root.localization_language_nr];
hit1_key.txt = key_arr[103];
hit2_key.txt = key_arr[104];
hit3_key.txt = key_arr[105];
up_keycode = 38;
down_keycode = 40;
left_keycode = 37;
right_keycode = 39;
hit1_keycode = 103;
hit2_keycode = 104;
hit3_keycode = 105;
}
Symbol 770 MovieClip [control_key] Frame 1
var language_Up = new Array("", "UP", "\u4E0A", "UP", "OMHOOG", "HAUT", "HOCH", "ARRIBA", "PARA CIMA", "CIMA", "SU", "UPP", "W G\u00D3R\u0118", "BBEPX", "YUKARI", "ATAS");
var language_Left = new Array("", "LEFT", "\u5DE6", "LEFT", "LINKS", "GAUCHE", "LINKS", "IZQUIERDA", "ESQUERDA", "ESQUERDA", "SINISTRA", "V\u00C4NSTER", "W LEWO", "B\u041BEBO", "SOL", "KIRI");
var language_Rignt = new Array("", "RIGHT", "\u53F3", "RIGHT", "RECHTS", "DROITE", "RECHTS", "DERECHA", "DIREITA", "DIREITA", "DESTRA", "H\u00D6GER", "W PRAWO", "B\u041FPABO", "SA\u011E", "KANAN");
var language_Down = new Array("", "DOWN", "\u4E0B", "DOWN", "OMLAAG", "BAS", "RUNTER", "ABAJO", "PARA BAIXO", "BAIXO", "GI\u00D9", "NED", "W D\u00D3\u0141", "BH\u0418\u0417", "A\u015EA\u011EI", "BAWAH");
var step = 1;
Symbol 770 MovieClip [control_key] Frame 6
if ((_root.playermode == 11) || (_root.playermode == 21)) {
gotoAndStop ("set11");
}
if ((_root.playermode == 12) && (step == 1)) {
gotoAndStop ("set12");
}
if (step == 2) {
gotoAndStop ("set122");
}
Symbol 770 MovieClip [control_key] Frame 7
Key.removeListener(mykey);
var keysel;
var mc = this;
country_mc.gotoAndStop(_root.player_array[0].id + 1);
var mc_array = new Array(up_key, down_key, left_key, right_key, hit1_key, hit2_key, hit3_key);
up_keycode = _root.key1_array[2];
down_keycode = _root.key1_array[3];
left_keycode = _root.key1_array[0];
right_keycode = _root.key1_array[1];
hit1_keycode = _root.key1_array[6];
hit2_keycode = _root.key1_array[5];
hit3_keycode = _root.key1_array[4];
key_arr = [];
key_arr[37] = "Left";
key_arr[38] = "Up";
key_arr[39] = "Rignt";
key_arr[40] = "Down";
key_arr[65] = "A";
key_arr[66] = "B";
key_arr[67] = "C";
key_arr[68] = "D";
key_arr[69] = "E";
key_arr[70] = "F";
key_arr[71] = "G";
key_arr[72] = "H";
key_arr[73] = "I";
key_arr[74] = "J";
key_arr[75] = "K";
key_arr[76] = "L";
key_arr[77] = "M";
key_arr[78] = "N";
key_arr[79] = "O";
key_arr[80] = "P";
key_arr[81] = "Q";
key_arr[82] = "R";
key_arr[83] = "S";
key_arr[84] = "T";
key_arr[85] = "U";
key_arr[86] = "V";
key_arr[87] = "W";
key_arr[88] = "X";
key_arr[89] = "Y";
key_arr[90] = "Z";
key_arr[96] = "0";
key_arr[97] = "1";
key_arr[98] = "2";
key_arr[99] = "3";
key_arr[100] = "4";
key_arr[101] = "5";
key_arr[102] = "6";
key_arr[103] = "7";
key_arr[104] = "8";
key_arr[105] = "9";
mykey = new Object();
mykey.onKeyDown = function () {
str = mc["language_" + key_arr[Key.getCode()]][_root.localization_language_nr];
if (key_arr[Key.getCode()] != null) {
var _local2 = 0;
while (_local2 < mc_array.length) {
if ((key_arr[Key.getCode()] == mc_array[_local2].txt) || (str == mc_array[_local2].txt)) {
_root.keysel.keyerror_mc.play();
return(undefined);
}
_local2++;
}
if (((((str.length > 1) || (str == "\u4E0A")) || (str == "\u4E0B")) || (str == "\u5DE6")) || (str == "\u53F3")) {
_root.keysel.txt = str;
} else {
_root.keysel.txt = key_arr[Key.getCode()];
}
mc[_root.keysel._name + "code"] = Key.getCode();
}
};
Key.addListener(mykey);
up_key.txt = ((this["language_" + key_arr[up_keycode]][_root.localization_language_nr] == undefined) ? (key_arr[up_keycode]) : (this["language_" + key_arr[up_keycode]][_root.localization_language_nr]));
down_key.txt = ((this["language_" + key_arr[down_keycode]][_root.localization_language_nr] == undefined) ? (key_arr[down_keycode]) : (this["language_" + key_arr[down_keycode]][_root.localization_language_nr]));
left_key.txt = ((this["language_" + key_arr[left_keycode]][_root.localization_language_nr] == undefined) ? (key_arr[left_keycode]) : (this["language_" + key_arr[left_keycode]][_root.localization_language_nr]));
right_key.txt = ((this["language_" + key_arr[right_keycode]][_root.localization_language_nr] == undefined) ? (key_arr[right_keycode]) : (this["language_" + key_arr[right_keycode]][_root.localization_language_nr]));
hit1_key.txt = ((this["language_" + key_arr[hit1_keycode]][_root.localization_language_nr] == undefined) ? (key_arr[hit1_keycode]) : (this["language_" + key_arr[hit1_keycode]][_root.localization_language_nr]));
hit2_key.txt = ((this["language_" + key_arr[hit2_keycode]][_root.localization_language_nr] == undefined) ? (key_arr[hit2_keycode]) : (this["language_" + key_arr[hit2_keycode]][_root.localization_language_nr]));
hit3_key.txt = ((this["language_" + key_arr[hit3_keycode]][_root.localization_language_nr] == undefined) ? (key_arr[hit3_keycode]) : (this["language_" + key_arr[hit3_keycode]][_root.localization_language_nr]));
stop();
Instance of Symbol 114 MovieClip "down_key" in Symbol 770 MovieClip [control_key] Frame 7
/* no clip actions */
Instance of Symbol 114 MovieClip "up_key" in Symbol 770 MovieClip [control_key] Frame 7
/* no clip actions */
Instance of Symbol 114 MovieClip "left_key" in Symbol 770 MovieClip [control_key] Frame 7
/* no clip actions */
Instance of Symbol 114 MovieClip "right_key" in Symbol 770 MovieClip [control_key] Frame 7
/* no clip actions */
Instance of Symbol 114 MovieClip "hit1_key" in Symbol 770 MovieClip [control_key] Frame 7
/* no clip actions */
Instance of Symbol 114 MovieClip "hit3_key" in Symbol 770 MovieClip [control_key] Frame 7
/* no clip actions */
Instance of Symbol 114 MovieClip "hit2_key" in Symbol 770 MovieClip [control_key] Frame 7
/* no clip actions */
Symbol 770 MovieClip [control_key] Frame 8
Key.removeListener(mykey);
var keysel;
var mc = this;
country_mc.gotoAndStop(_root.player_array[0].id + 1);
var mc_array = new Array(up_key, down_key, left_key, right_key, hit1_key, hit2_key, hit3_key);
up_keycode = _root.key12_array[2];
down_keycode = _root.key12_array[3];
left_keycode = _root.key12_array[0];
right_keycode = _root.key12_array[1];
hit1_keycode = _root.key12_array[4];
hit2_keycode = _root.key12_array[5];
hit3_keycode = _root.key12_array[6];
key_arr = [];
key_arr[37] = "Left";
key_arr[38] = "Up";
key_arr[39] = "Rignt";
key_arr[40] = "Down";
key_arr[65] = "A";
key_arr[66] = "B";
key_arr[67] = "C";
key_arr[68] = "D";
key_arr[69] = "E";
key_arr[70] = "F";
key_arr[71] = "G";
key_arr[72] = "H";
key_arr[73] = "I";
key_arr[74] = "J";
key_arr[75] = "K";
key_arr[76] = "L";
key_arr[77] = "M";
key_arr[78] = "N";
key_arr[79] = "O";
key_arr[80] = "P";
key_arr[81] = "Q";
key_arr[82] = "R";
key_arr[83] = "S";
key_arr[84] = "T";
key_arr[85] = "U";
key_arr[86] = "V";
key_arr[87] = "W";
key_arr[88] = "X";
key_arr[89] = "Y";
key_arr[90] = "Z";
key_arr[96] = "0";
key_arr[97] = "1";
key_arr[98] = "2";
key_arr[99] = "3";
key_arr[100] = "4";
key_arr[101] = "5";
key_arr[102] = "6";
key_arr[103] = "7";
key_arr[104] = "8";
key_arr[105] = "9";
mykey = new Object();
mykey.onKeyDown = function () {
str = mc["language_" + key_arr[Key.getCode()]][_root.localization_language_nr];
if (key_arr[Key.getCode()] != null) {
var _local2 = 0;
while (_local2 < mc_array.length) {
if ((key_arr[Key.getCode()] == mc_array[_local2].txt) || (str == mc_array[_local2].txt)) {
_root.keysel.keyerror_mc.play();
return(undefined);
}
_local2++;
}
if (((((str.length > 1) || (str == "\u4E0A")) || (str == "\u4E0B")) || (str == "\u5DE6")) || (str == "\u53F3")) {
_root.keysel.txt = str;
} else {
_root.keysel.txt = key_arr[Key.getCode()];
}
mc[_root.keysel._name + "code"] = Key.getCode();
}
};
Key.addListener(mykey);
up_key.txt = ((this["language_" + key_arr[up_keycode]][_root.localization_language_nr] == undefined) ? (key_arr[up_keycode]) : (this["language_" + key_arr[up_keycode]][_root.localization_language_nr]));
down_key.txt = ((this["language_" + key_arr[down_keycode]][_root.localization_language_nr] == undefined) ? (key_arr[down_keycode]) : (this["language_" + key_arr[down_keycode]][_root.localization_language_nr]));
left_key.txt = ((this["language_" + key_arr[left_keycode]][_root.localization_language_nr] == undefined) ? (key_arr[left_keycode]) : (this["language_" + key_arr[left_keycode]][_root.localization_language_nr]));
right_key.txt = ((this["language_" + key_arr[right_keycode]][_root.localization_language_nr] == undefined) ? (key_arr[right_keycode]) : (this["language_" + key_arr[right_keycode]][_root.localization_language_nr]));
hit1_key.txt = ((this["language_" + key_arr[hit1_keycode]][_root.localization_language_nr] == undefined) ? (key_arr[hit1_keycode]) : (this["language_" + key_arr[hit1_keycode]][_root.localization_language_nr]));
hit2_key.txt = ((this["language_" + key_arr[hit2_keycode]][_root.localization_language_nr] == undefined) ? (key_arr[hit2_keycode]) : (this["language_" + key_arr[hit2_keycode]][_root.localization_language_nr]));
hit3_key.txt = ((this["language_" + key_arr[hit3_keycode]][_root.localization_language_nr] == undefined) ? (key_arr[hit3_keycode]) : (this["language_" + key_arr[hit3_keycode]][_root.localization_language_nr]));
stop();
Instance of Symbol 114 MovieClip "down_key" in Symbol 770 MovieClip [control_key] Frame 8
/* no clip actions */
Instance of Symbol 114 MovieClip "up_key" in Symbol 770 MovieClip [control_key] Frame 8
/* no clip actions */
Instance of Symbol 114 MovieClip "left_key" in Symbol 770 MovieClip [control_key] Frame 8
/* no clip actions */
Instance of Symbol 114 MovieClip "right_key" in Symbol 770 MovieClip [control_key] Frame 8
/* no clip actions */
Symbol 770 MovieClip [control_key] Frame 9
Key.removeListener(mykey);
var keysel;
var mc = this;
country_mc.gotoAndStop(_root.player_array[1].id + 1);
var mc_array = new Array(up_key, down_key, left_key, right_key, hit1_key, hit2_key, hit3_key);
country_mc.p1._visible = false;
up_keycode = _root.key2_array[2];
down_keycode = _root.key2_array[3];
left_keycode = _root.key2_array[0];
right_keycode = _root.key2_array[1];
hit1_keycode = _root.key2_array[4];
hit2_keycode = _root.key2_array[5];
hit3_keycode = _root.key2_array[6];
key_arr = [];
key_arr[37] = "Left";
key_arr[38] = "Up";
key_arr[39] = "Rignt";
key_arr[40] = "Down";
key_arr[65] = "A";
key_arr[66] = "B";
key_arr[67] = "C";
key_arr[68] = "D";
key_arr[69] = "E";
key_arr[70] = "F";
key_arr[71] = "G";
key_arr[72] = "H";
key_arr[73] = "I";
key_arr[74] = "J";
key_arr[75] = "K";
key_arr[76] = "L";
key_arr[77] = "M";
key_arr[78] = "N";
key_arr[79] = "O";
key_arr[80] = "P";
key_arr[81] = "Q";
key_arr[82] = "R";
key_arr[83] = "S";
key_arr[84] = "T";
key_arr[85] = "U";
key_arr[86] = "V";
key_arr[87] = "W";
key_arr[88] = "X";
key_arr[89] = "Y";
key_arr[90] = "Z";
key_arr[96] = "0";
key_arr[97] = "1";
key_arr[98] = "2";
key_arr[99] = "3";
key_arr[100] = "4";
key_arr[101] = "5";
key_arr[102] = "6";
key_arr[103] = "7";
key_arr[104] = "8";
key_arr[105] = "9";
mykey = new Object();
mykey.onKeyDown = function () {
str = mc["language_" + key_arr[Key.getCode()]][_root.localization_language_nr];
if (key_arr[Key.getCode()] != null) {
var _local2 = 0;
while (_local2 < mc_array.length) {
if ((key_arr[Key.getCode()] == mc_array[_local2].txt) || (str == mc_array[_local2].txt)) {
_root.keysel.keyerror_mc.play();
return(undefined);
}
_local2++;
}
if (((((str.length > 1) || (str == "\u4E0A")) || (str == "\u4E0B")) || (str == "\u5DE6")) || (str == "\u53F3")) {
_root.keysel.txt = str;
} else {
_root.keysel.txt = key_arr[Key.getCode()];
}
mc[_root.keysel._name + "code"] = Key.getCode();
}
};
Key.addListener(mykey);
up_key.txt = ((this["language_" + key_arr[up_keycode]][_root.localization_language_nr] == undefined) ? (key_arr[up_keycode]) : (this["language_" + key_arr[up_keycode]][_root.localization_language_nr]));
down_key.txt = ((this["language_" + key_arr[down_keycode]][_root.localization_language_nr] == undefined) ? (key_arr[down_keycode]) : (this["language_" + key_arr[down_keycode]][_root.localization_language_nr]));
left_key.txt = ((this["language_" + key_arr[left_keycode]][_root.localization_language_nr] == undefined) ? (key_arr[left_keycode]) : (this["language_" + key_arr[left_keycode]][_root.localization_language_nr]));
right_key.txt = ((this["language_" + key_arr[right_keycode]][_root.localization_language_nr] == undefined) ? (key_arr[right_keycode]) : (this["language_" + key_arr[right_keycode]][_root.localization_language_nr]));
hit1_key.txt = ((this["language_" + key_arr[hit1_keycode]][_root.localization_language_nr] == undefined) ? (key_arr[hit1_keycode]) : (this["language_" + key_arr[hit1_keycode]][_root.localization_language_nr]));
hit2_key.txt = ((this["language_" + key_arr[hit2_keycode]][_root.localization_language_nr] == undefined) ? (key_arr[hit2_keycode]) : (this["language_" + key_arr[hit2_keycode]][_root.localization_language_nr]));
hit3_key.txt = ((this["language_" + key_arr[hit3_keycode]][_root.localization_language_nr] == undefined) ? (key_arr[hit3_keycode]) : (this["language_" + key_arr[hit3_keycode]][_root.localization_language_nr]));
stop();
Instance of Symbol 114 MovieClip "down_key" in Symbol 770 MovieClip [control_key] Frame 9
/* no clip actions */
Instance of Symbol 114 MovieClip "up_key" in Symbol 770 MovieClip [control_key] Frame 9
/* no clip actions */
Instance of Symbol 114 MovieClip "left_key" in Symbol 770 MovieClip [control_key] Frame 9
/* no clip actions */
Instance of Symbol 114 MovieClip "right_key" in Symbol 770 MovieClip [control_key] Frame 9
/* no clip actions */
Symbol 770 MovieClip [control_key] Frame 10
function randRange(min, max) {
var _local1 = Math.floor(Math.random() * ((max - min) + 1)) + min;
return(_local1);
}
function setplayer() {
var _local2 = 0;
while (_local2 < 4) {
var _local3 = randRange(2 * _local2, (2 * _local2) + 1);
if ((_local3 != cur) && (_local3 != pccur)) {
_root.first_array.push(_local3);
}
_local2++;
}
if (cur <= 3) {
_root.pcsel_array.push(_root.first_array[0]);
var _local4 = randRange(1, 2);
var _local3 = _root.first_array[_local4];
_root.snd_array.push(_local3);
} else {
_root.pcsel_array.push(_root.first_array[2]);
var _local4 = randRange(0, 1);
var _local3 = _root.first_array[_local4];
_root.snd_array.push(_local3);
}
_root.pcsel_array.push(_root.snd_array[0]);
}
function playani(arr) {
var _local2 = 0;
while (_local2 < arr.length) {
j = arr[_local2].id + 1;
if (_root.sel == arr[_local2].id) {
if ((_local2 % 2) == 0) {
_root.pcsel = arr[_local2 + 1].id;
} else {
_root.pcsel = arr[_local2 - 1].id;
}
}
mc["country" + j].play();
_local2++;
}
}
stopAllSounds();
if (_root.soundid == 1) {
_root.level_map_sound.start(0, 1);
}
var player_arr = new Array();
var cur;
var pccur;
var i = 0;
while (i < 8) {
player_arr[i] = new Object();
player_arr[i].id = i;
player_arr[i].playname = _root.allplayer_array[i];
player_arr[i].sortnum = Math.random();
i++;
}
player_arr.sortOn("sortnum", Array.CASEINSENSITIVE | Array.NUMERIC);
mc = this.attachMovie("tour2_mc", "tour2_mc", 1);
var i = 0;
while (i < 8) {
j = i + 1;
_root.playerSort_array[i] = new Object();
_root.playerSort_array[i].id = player_arr[i].id;
_root.playerSort_array[i].playname = player_arr[i].playname;
mc["country" + j]["country" + j].gotoAndStop(player_arr[i].id + 1);
if (player_arr[i].id != _root.sel) {
mc["country" + j]["country" + j].p1._visible = false;
} else {
cur = i;
}
i++;
}
if ((_root.sel % 2) == 0) {
_root.pcsel = _root.sel + 1;
} else {
_root.pcsel = _root.sel - 1;
}
_root.player_array[0].id = _root.sel;
_root.player_array[0].playname = _root.allplayer_array[_root.sel];
_root.player_array[1] = new Object();
_root.player_array[1].id = _root.pcsel;
_root.player_array[1].playname = _root.allplayer_array[_root.pcsel];
if ((cur % 2) == 0) {
pccur = cur + 1;
mc.allline[("line" + _root.playCount) + (cur + (cur + 1))].gotoAndPlay(2);
} else {
pccur = cur - 1;
mc.allline[("line" + _root.playCount) + (cur + (cur - 1))].gotoAndPlay(2);
}
_root.pcsel_array.push(pccur);
setplayer();
_root.g.level = 1;
mc.onRelease = function () {
_root.playermode = 21;
_root.nextFrame();
this.removeMovieClip();
};
Symbol 770 MovieClip [control_key] Frame 65
stop();
Symbol 771 Button
on (release) {
_root.gotoAndStop("init");
this.removeMovieClip();
}
Symbol 786 MovieClip Frame 1
gotoAndStop(_root.localization_language_nr);
Symbol 802 MovieClip Frame 1
gotoAndStop(_root.localization_language_nr);
Symbol 803 Button
on (release) {
gotoAndStop ("pvp");
}
Symbol 804 Button
on (release) {
_root.playermode = 11;
gotoAndStop (2);
}
Symbol 805 Button
on (release) {
_root.playermode = 12;
gotoAndStop (8);
}
Symbol 806 Button
on (release) {
_root.lavel = 1;
_root.playermode = 21;
gotoAndStop (5);
}
Symbol 821 MovieClip Frame 1
gotoAndStop(_root.localization_language_nr);
Symbol 836 MovieClip Frame 1
gotoAndStop(_root.localization_language_nr);
Symbol 837 Button
on (release) {
gotoAndStop (1);
}
Symbol 935 MovieClip Frame 1
gotoAndStop(_root.localization_language_nr);
Symbol 936 Button
on (release) {
confirm_btn.enabled = true;
mc.removeMovieClip();
gotoAndStop (2);
}
Symbol 938 Button
on (release) {
if ((myname.text.length > 3) and (myname.text.length <= 12)) {
var so = SharedObject.getLocal("roles");
var i = 0;
while (i < so.data.roles.length) {
if ((so.data.roles[i] == myname.text) and (i != sel)) {
var mc = this.attachMovie("warning", "warning", 10);
confirm_btn.enabled = false;
mc._x = 20;
mc._y = 50;
return(undefined);
}
i++;
}
so.data.roles[sel] = myname.text;
so.flush();
_root.roles = so.data.roles;
_root.player_array[0] = new Object();
_root.player_array[0].id = _root.sel;
_root.player_array[0].playname = myname.text;
_root.allplayer_array[_root.sel] = myname.text;
_root.player_array[1] = new Object();
_root.player_array[1].id = _root.pcsel;
_root.player_array[1].playname = arrs[_root.pcsel];
_root.allplayer_array[_root.pcsel] = arrs[_root.pcsel];
gotoAndStop ("level");
}
}
Symbol 953 MovieClip Frame 1
gotoAndStop(_root.localization_language_nr);
Symbol 968 MovieClip Frame 1
gotoAndStop(_root.localization_language_nr);
Symbol 969 Button
on (release) {
gotoAndStop ("level");
}
Symbol 972 Button
on (release) {
_root.mode = "esay";
_root.gotoAndStop("controlset");
this.removeMovieClip();
}
Symbol 973 Button
on (release) {
_root.mode = "normal";
_root.gotoAndStop("controlset");
this.removeMovieClip();
}
Symbol 974 Button
on (release) {
_root.mode = "hard";
_root.gotoAndStop("controlset");
this.removeMovieClip();
}
Symbol 987 MovieClip Frame 1
gotoAndStop(_root.localization_language_nr);
Symbol 999 MovieClip Frame 1
gotoAndStop(_root.localization_language_nr);
Symbol 1013 MovieClip Frame 1
gotoAndStop(_root.localization_language_nr);
Symbol 1022 Button
on (release) {
confirm_btn.enabled = true;
mc.removeMovieClip();
prevFrame();
}
Symbol 1023 Button
on (release) {
if ((myname.text.length > 3) and (myname.text.length <= 12)) {
var so = SharedObject.getLocal("roles");
var i = 0;
while (i < so.data.roles.length) {
if ((so.data.roles[i] == myname.text) and (i != sel)) {
var mc = this.attachMovie("warning", "warning", 10);
confirm_btn.enabled = false;
mc._x = 20;
mc._y = 50;
return(undefined);
}
i++;
}
so.data.roles[sel] = myname.text;
so.flush();
_root.roles = so.data.roles;
_root.player_array[0] = new Object();
_root.player_array[0].id = _root.sel;
_root.player_array[0].playname = myname.text;
_root.allplayer_array[_root.sel] = myname.text;
_root.gotoAndStop("controlset");
}
}
Symbol 1025 Button
on (release) {
gotoAndStop (1);
}
Symbol 1035 Button
on (release) {
if ((myname.text.length > 3) and (myname.text.length <= 12)) {
var so = SharedObject.getLocal("roles");
var i = 0;
while (i < so.data.roles.length) {
if ((so.data.roles[i] == myname.text) and (i != sel)) {
var mc = this.attachMovie("warning", "warning", 10);
confirm_btn.enabled = false;
mc._x = 20;
mc._y = 50;
return(undefined);
}
i++;
}
so.data.roles[sel] = myname.text;
so.flush();
_root.roles = so.data.roles;
_root.player_array[0] = new Object();
_root.player_array[0].id = _root.sel;
_root.player_array[0].playname = myname.text;
_root.allplayer_array[_root.sel] = myname.text;
nextFrame();
}
}
Symbol 1060 MovieClip Frame 1
gotoAndStop(_root.localization_language_nr);
Symbol 1061 Button
on (release) {
if ((myname.text.length > 3) and (myname.text.length <= 12)) {
var so = SharedObject.getLocal("roles");
var i = 0;
while (i < so.data.roles.length) {
if ((so.data.roles[i] == myname.text) and (i != pcsel)) {
var mc = this.attachMovie("warning", "warning", 10);
confirm_btn.enabled = false;
mc._x = 20;
mc._y = 50;
return(undefined);
}
i++;
}
so.data.roles[pcsel] = myname.text;
so.flush();
_root.player_array[1] = new Object();
_root.player_array[1].id = _root.pcsel;
_root.player_array[1].playname = arrs[_root.pcsel];
_root.allplayer_array[_root.pcsel] = arrs[_root.pcsel];
gotoAndStop ("level");
}
}
Symbol 1063 Button
on (release) {
if (_root.playermode == 11) {
gotoAndStop (3);
} else {
prevFrame();
}
}
Symbol 1081 MovieClip Frame 1
gotoAndStop(_root.localization_language_nr);
Symbol 1095 MovieClip Frame 1
gotoAndStop(_root.localization_language_nr);
Symbol 1111 MovieClip Frame 1
gotoAndStop(_root.localization_language_nr);
Symbol 1127 MovieClip Frame 1
gotoAndStop(_root.localization_language_nr);
Symbol 1128 MovieClip [mode_select] Frame 1
stop();
Symbol 1128 MovieClip [mode_select] Frame 2
if (sel == null) {
sel = 0;
pcsel = 1;
}
var i = 0;
while (i < 8) {
this["bt" + i].i = i;
this["player" + (i + 1)].gotoAndStop(1);
this["bt" + i].onRelease = function () {
sel = this.i;
pcsel = (this.i + random(7)) + 1;
pcsel = pcsel % 8;
gotoAndStop (3);
};
this["bt" + i].onRollOver = function () {
this["player" + (this.i + 1)].gotoAndPlay(2);
this["player" + (this.i + 1)].play();
};
this["bt" + i].onRollOut = (this["bt" + i].onReleaseOutside = function () {
this["player" + (this.i + 1)].gotoAndStop(1);
});
i++;
}
if (arrs == null) {
arrs = ["Billy", "Donny", "Anne", "Helen", "Emily", "Susan", "Mike", "Ryan"];
var so = SharedObject.getLocal("roles");
if (so.data.roles == undefined) {
so.data.roles = arrs;
so.flush();
} else {
arrs = so.data.roles;
}
}
var i = 0;
while (i < 8) {
this["txt" + i] = arrs[i];
i++;
}
stop();
Symbol 1128 MovieClip [mode_select] Frame 3
myname.text = arrs[sel];
mc._visible = false;
_root.sel = sel;
_root.pcsel = pcsel;
Symbol 1128 MovieClip [mode_select] Frame 5
if (sel == null) {
sel = 0;
pcsel = 1;
}
var i = 0;
while (i < 8) {
this["bt" + i].i = i;
this["player" + (i + 1)].gotoAndStop(1);
this["bt" + i].onRelease = function () {
sel = this.i;
pcsel = (this.i + random(7)) + 1;
pcsel = pcsel % 8;
nextFrame();
};
this["bt" + i].onRollOver = function () {
this["player" + (this.i + 1)].gotoAndPlay(2);
this["player" + (this.i + 1)].play();
};
this["bt" + i].onRollOut = (this["bt" + i].onReleaseOutside = function () {
this["player" + (this.i + 1)].gotoAndStop(1);
});
i++;
}
if (arrs == null) {
arrs = ["Billy", "Donny", "Anne", "Helen", "Emily", "Susan", "Mike", "Ryan"];
var so = SharedObject.getLocal("roles");
if (so.data.roles == undefined) {
so.data.roles = arrs;
so.flush();
} else {
arrs = so.data.roles;
}
}
var i = 0;
while (i < 8) {
this["txt" + i] = arrs[i];
i++;
}
stop();
Symbol 1128 MovieClip [mode_select] Frame 6
myname.text = arrs[sel];
_root.sel = sel;
_root.pcsel = pcsel;
Game3.paixu();
Symbol 1128 MovieClip [mode_select] Frame 7
function randRange(min, max) {
var _local1 = Math.floor(Math.random() * ((max - min) + 1)) + min;
return(_local1);
}
function setplayer() {
var _local2 = 0;
while (_local2 < 4) {
var _local3 = randRange(2 * _local2, (2 * _local2) + 1);
if ((_local3 != cur) && (_local3 != pccur)) {
_root.first_array.push(_local3);
}
_local2++;
}
if (cur <= 3) {
_root.pcsel_array.push(_root.first_array[0]);
var _local4 = randRange(1, 2);
var _local3 = _root.first_array[_local4];
_root.snd_array.push(_local3);
} else {
_root.pcsel_array.push(_root.first_array[2]);
var _local4 = randRange(0, 1);
var _local3 = _root.first_array[_local4];
_root.snd_array.push(_local3);
}
_root.pcsel_array.push(_root.snd_array[0]);
}
function playani(arr) {
var _local2 = 0;
while (_local2 < arr.length) {
j = arr[_local2].id + 1;
if (_root.sel == arr[_local2].id) {
if ((_local2 % 2) == 0) {
_root.pcsel = arr[_local2 + 1].id;
} else {
_root.pcsel = arr[_local2 - 1].id;
}
}
mc["country" + j].play();
_local2++;
}
}
stopAllSounds();
if (_root.soundid == 1) {
_root.level_map_sound.start(0, 1);
}
var player_arr = new Array();
var cur;
var pccur;
var i = 0;
while (i < 8) {
player_arr[i] = new Object();
player_arr[i].id = i;
player_arr[i].playname = _root.allplayer_array[i];
player_arr[i].sortnum = Math.random();
i++;
}
player_arr.sortOn("sortnum", Array.CASEINSENSITIVE | Array.NUMERIC);
mc = this.attachMovie("tour2_mc", "tour2_mc", 1);
var i = 0;
while (i < 8) {
j = i + 1;
_root.playerSort_array[i] = new Object();
_root.playerSort_array[i].id = player_arr[i].id;
_root.playerSort_array[i].playname = player_arr[i].playname;
mc["country" + j]["country" + j].gotoAndStop(player_arr[i].id + 1);
if (player_arr[i].id != _root.sel) {
mc["country" + j]["country" + j].p1._visible = false;
} else {
cur = i;
}
i++;
}
if ((_root.sel % 2) == 0) {
_root.pcsel = _root.sel + 1;
} else {
_root.pcsel = _root.sel - 1;
}
_root.player_array[0].id = _root.sel;
_root.player_array[0].playname = _root.allplayer_array[_root.sel];
_root.player_array[1] = new Object();
_root.player_array[1].id = _root.pcsel;
_root.player_array[1].playname = _root.allplayer_array[_root.pcsel];
if ((cur % 2) == 0) {
pccur = cur + 1;
mc.allline[("line" + _root.playCount) + (cur + (cur + 1))].gotoAndPlay(2);
} else {
pccur = cur - 1;
mc.allline[("line" + _root.playCount) + (cur + (cur - 1))].gotoAndPlay(2);
}
_root.pcsel_array.push(pccur);
setplayer();
_root.g.level = 1;
mc.onRelease = function () {
_root.playermode = 21;
_root.nextFrame();
this.removeMovieClip();
};
Symbol 1128 MovieClip [mode_select] Frame 8
if (sel == null) {
sel = 0;
pcsel = 1;
}
var i = 0;
while (i < 8) {
this["bt" + i].i = i;
this["player" + (i + 1)].gotoAndStop(1);
this["bt" + i].onRelease = function () {
sel = this.i;
nextFrame();
};
this["bt" + i].onRollOver = function () {
this["player" + (this.i + 1)].gotoAndPlay(2);
this["player" + (this.i + 1)].play();
};
this["bt" + i].onRollOut = (this["bt" + i].onReleaseOutside = function () {
this["player" + (this.i + 1)].gotoAndStop(1);
});
i++;
}
if (arrs == null) {
arrs = ["Billy", "Donny", "Anne", "Helen", "Emily", "Susan", "Mike", "Ryan"];
var so = SharedObject.getLocal("roles");
if (so.data.roles == undefined) {
so.data.roles = arrs;
so.flush();
} else {
arrs = so.data.roles;
}
}
var i = 0;
while (i < 8) {
this["txt" + i] = arrs[i];
i++;
}
stop();
Symbol 1128 MovieClip [mode_select] Frame 9
myname.text = arrs[sel];
_root.sel = sel;
Symbol 1128 MovieClip [mode_select] Frame 10
var i = 0;
while (i < 8) {
this["player" + (i + 1)].gotoAndStop(1);
this["bt" + i].i = i;
if (i != sel) {
this["bt" + i].onRelease = function () {
pcsel = this.i;
nextFrame();
};
this["bt" + i].onRollOver = function () {
this["player" + (this.i + 1)].gotoAndPlay(2);
this["player" + (this.i + 1)].play();
};
this["bt" + i].onRollOut = (this["bt" + i].onReleaseOutside = function () {
this["player" + (this.i + 1)].gotoAndStop(1);
});
} else {
this["bt" + i].enabled = false;
this["player" + (i + 1)]._alpha = 50;
}
i++;
}
if (arrs == null) {
arrs = ["Billy", "Donny", "Anne", "Helen", "Emily", "Susan", "Mike", "Ryan"];
var so = SharedObject.getLocal("roles");
if (so.data.roles == undefined) {
so.data.roles = arrs;
so.flush();
} else {
arrs = so.data.roles;
}
}
var i = 0;
while (i < 8) {
this["txt" + i] = arrs[i];
i++;
}
stop();
Symbol 1128 MovieClip [mode_select] Frame 11
myname.text = arrs[pcsel];
_root.sel = sel;
_root.pcsel = pcsel;
Symbol 1128 MovieClip [mode_select] Frame 12
stop();
level1_mc.onRelease = function () {
_root.lavel = 1;
if (_root.playermode == 11) {
gotoAndStop (4);
} else {
_root.gotoAndStop("controlset");
}
};
level2_mc.onRelease = function () {
_root.lavel = 2;
if (_root.playermode == 11) {
gotoAndStop (4);
} else {
_root.gotoAndStop("controlset");
}
};
level3_mc.onRelease = function () {
_root.lavel = 3;
if (_root.playermode == 11) {
gotoAndStop (4);
} else {
_root.gotoAndStop("controlset");
}
};
Symbol 1219 MovieClip Frame 7
stop();
Symbol 1220 MovieClip Frame 240
stop();
Symbol 1221 MovieClip Frame 1
this.onRelease = function () {
getURL ("http://www.game.com.cn", "_blank");
};
Symbol 1221 MovieClip Frame 240
stop();
_root.gotoAndStop("init");
Symbol 1222 MovieClip Frame 1
byteloaded = _root.getBytesLoaded();
bytetotal = _root.getBytesTotal();
bar._xscale = (byteloaded / bytetotal) * 100;
bian = int((byteloaded / bytetotal) * 100);
Symbol 1222 MovieClip Frame 2
if (byteloaded >= bytetotal) {
if (_root.localization_language_nr == 2) {
gotoAndStop (3);
} else {
_root.play();
}
} else {
gotoAndPlay (1);
}
Symbol 1222 MovieClip Frame 3
stop();
Symbol 3110 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 3111 MovieClip [__Packages.mx.transitions.OnEnterFrameBeacon] Frame 0
class mx.transitions.OnEnterFrameBeacon
{
function OnEnterFrameBeacon () {
}
static function init() {
var _local4 = _global.MovieClip;
if (!_root.__OnEnterFrameBeacon) {
mx.transitions.BroadcasterMX.initialize(_local4);
var _local3 = _root.createEmptyMovieClip("__OnEnterFrameBeacon", 9876);
_local3.onEnterFrame = function () {
_global.MovieClip.broadcastMessage("onEnterFrame");
};
}
}
static var version = "1.1.0.52";
}
Symbol 3112 MovieClip [__Packages.mx.transitions.BroadcasterMX] Frame 0
class mx.transitions.BroadcasterMX
{
var _listeners;
function BroadcasterMX () {
}
static function initialize(o, dontCreateArray) {
if (o.broadcastMessage != undefined) {
delete o.broadcastMessage;
}
o.addListener = mx.transitions.BroadcasterMX.prototype.addListener;
o.removeListener = mx.transitions.BroadcasterMX.prototype.removeListener;
if (!dontCreateArray) {
o._listeners = new Array();
}
}
function addListener(o) {
removeListener(o);
if (broadcastMessage == undefined) {
broadcastMessage = mx.transitions.BroadcasterMX.prototype.broadcastMessage;
}
return(_listeners.push(o));
}
function removeListener(o) {
var _local2 = _listeners;
var _local3 = _local2.length;
while (_local3--) {
if (_local2[_local3] == o) {
_local2.splice(_local3, 1);
if (!_local2.length) {
broadcastMessage = undefined;
}
return(true);
}
}
return(false);
}
function broadcastMessage() {
var _local5 = String(arguments.shift());
var _local4 = _listeners.concat();
var _local6 = _local4.length;
var _local3 = 0;
while (_local3 < _local6) {
_local4[_local3][_local5].apply(_local4[_local3], arguments);
_local3++;
}
}
static var version = "1.1.0.52";
}
Symbol 3113 MovieClip [__Packages.mx.transitions.Tween] Frame 0
class mx.transitions.Tween
{
var obj, prop, begin, useSeconds, _listeners, addListener, prevTime, _time, looping, _duration, broadcastMessage, isPlaying, _fps, prevPos, _pos, change, _intervalID, _startTime;
function Tween (obj, prop, func, begin, finish, duration, useSeconds) {
mx.transitions.OnEnterFrameBeacon.init();
if (!arguments.length) {
return;
}
this.obj = obj;
this.prop = prop;
this.begin = begin;
position = (begin);
this.duration = (duration);
this.useSeconds = useSeconds;
if (func) {
this.func = func;
}
this.finish = (finish);
_listeners = [];
addListener(this);
start();
}
function set time(t) {
prevTime = _time;
if (t > duration) {
if (looping) {
rewind(t - _duration);
update();
broadcastMessage("onMotionLooped", this);
} else {
if (useSeconds) {
_time = _duration;
update();
}
stop();
broadcastMessage("onMotionFinished", this);
}
} else if (t < 0) {
rewind();
update();
} else {
_time = t;
update();
}
//return(time);
}
function get time() {
return(_time);
}
function set duration(d) {
_duration = (((d == null) || (d <= 0)) ? (_global.Infinity) : (d));
//return(duration);
}
function get duration() {
return(_duration);
}
function set FPS(fps) {
var _local2 = isPlaying;
stopEnterFrame();
_fps = fps;
if (_local2) {
startEnterFrame();
}
//return(FPS);
}
function get FPS() {
return(_fps);
}
function set position(p) {
setPosition(p);
//return(position);
}
function setPosition(p) {
prevPos = _pos;
obj[prop] = (_pos = p);
broadcastMessage("onMotionChanged", this, _pos);
updateAfterEvent();
}
function get position() {
return(getPosition());
}
function getPosition(t) {
if (t == undefined) {
t = _time;
}
return(func(t, begin, change, _duration));
}
function set finish(f) {
change = f - begin;
//return(finish);
}
function get finish() {
return(begin + change);
}
function continueTo(finish, duration) {
begin = position;
this.finish = (finish);
if (duration != undefined) {
this.duration = (duration);
}
start();
}
function yoyo() {
continueTo(begin, time);
}
function startEnterFrame() {
if (_fps == undefined) {
_global.MovieClip.addListener(this);
} else {
_intervalID = setInterval(this, "onEnterFrame", 1000 / _fps);
}
isPlaying = true;
}
function stopEnterFrame() {
if (_fps == undefined) {
_global.MovieClip.removeListener(this);
} else {
clearInterval(_intervalID);
}
isPlaying = false;
}
function start() {
rewind();
startEnterFrame();
broadcastMessage("onMotionStarted", this);
}
function stop() {
stopEnterFrame();
broadcastMessage("onMotionStopped", this);
}
function resume() {
fixTime();
startEnterFrame();
broadcastMessage("onMotionResumed", this);
}
function rewind(t) {
_time = ((t == undefined) ? 0 : (t));
fixTime();
update();
}
function fforward() {
time = (_duration);
fixTime();
}
function nextFrame() {
if (useSeconds) {
time = ((getTimer() - _startTime) / 1000);
} else {
time = (_time + 1);
}
}
function onEnterFrame() {
nextFrame();
}
function prevFrame() {
if (!useSeconds) {
time = (_time - 1);
}
}
function toString() {
return("[Tween]");
}
function fixTime() {
if (useSeconds) {
_startTime = getTimer() - (_time * 1000);
}
}
function update() {
position = (getPosition(_time));
}
static var version = "1.1.0.52";
static var __initBeacon = mx.transitions.OnEnterFrameBeacon.init();
static var __initBroadcaster = mx.transitions.BroadcasterMX.initialize(mx.transitions.Tween.prototype, true);
function func(t, b, c, d) {
return(((c * t) / d) + b);
}
}
Symbol 3114 MovieClip [__Packages.mx.transitions.easing.None] Frame 0
class mx.transitions.easing.None
{
function None () {
}
static function easeNone(t, b, c, d) {
return(((c * t) / d) + b);
}
static function easeIn(t, b, c, d) {
return(((c * t) / d) + b);
}
static function easeOut(t, b, c, d) {
return(((c * t) / d) + b);
}
static function easeInOut(t, b, c, d) {
return(((c * t) / d) + b);
}
static var version = "1.1.0.52";
}
Symbol 1229 MovieClip Frame 4
gotoAndStop (1);
Symbol 1232 MovieClip Frame 3
gotoAndStop (1);
Symbol 1233 Button
on (press) {
if (_root.qualityid == 3) {
_root.qualityid = 1;
_quality = "LOW";
} else if (_root.qualityid == 1) {
_root.qualityid = 2;
_quality = "MEDIUM";
} else if (_root.qualityid == 2) {
_root.qualityid = 3;
_quality = "HIGH";
}
quilaty_mc.nextFrame();
}
Symbol 1234 Button
on (press) {
if (_root.soundid == 1) {
_root.bg_sound.stop();
_root.soundid = 2;
} else if (_root.soundid == 2) {
_root.soundid = 1;
_root.bg_sound.start(0, 999);
}
sound_mc.nextFrame();
}
Symbol 1241 MovieClip Frame 4
gotoAndStop (1);
Symbol 1244 MovieClip Frame 3
gotoAndStop (1);
Symbol 1250 MovieClip Frame 4
gotoAndStop (1);
Symbol 1253 MovieClip Frame 3
gotoAndStop (1);
Symbol 1259 MovieClip Frame 4
gotoAndStop (1);
Symbol 1262 MovieClip Frame 3
gotoAndStop (1);
Symbol 1268 MovieClip Frame 4
gotoAndStop (1);
Symbol 1271 MovieClip Frame 3
gotoAndStop (1);
Symbol 1277 MovieClip Frame 4
gotoAndStop (1);
Symbol 1280 MovieClip Frame 3
gotoAndStop (1);
Symbol 1286 MovieClip Frame 4
gotoAndStop (1);
Symbol 1289 MovieClip Frame 3
gotoAndStop (1);
Symbol 1293 MovieClip Frame 4
gotoAndStop (1);
Symbol 1296 MovieClip Frame 3
gotoAndStop (1);
Symbol 1301 MovieClip Frame 4
gotoAndStop (1);
Symbol 1304 MovieClip Frame 3
gotoAndStop (1);
Symbol 1309 MovieClip Frame 4
gotoAndStop (1);
Symbol 1312 MovieClip Frame 3
gotoAndStop (1);
Symbol 1318 MovieClip Frame 4
gotoAndStop (1);
Symbol 1321 MovieClip Frame 3
gotoAndStop (1);
Symbol 1327 MovieClip Frame 4
gotoAndStop (1);
Symbol 1330 MovieClip Frame 3
gotoAndStop (1);
Symbol 1336 MovieClip Frame 4
gotoAndStop (1);
Symbol 1339 MovieClip Frame 3
gotoAndStop (1);
Symbol 1345 MovieClip Frame 4
gotoAndStop (1);
Symbol 1348 MovieClip Frame 3
gotoAndStop (1);
Symbol 1349 MovieClip Frame 1
gotoAndStop(_root.localization_language_nr);
quilaty_mc.gotoAndStop(_root.qualityid);
sound_mc.gotoAndStop(_root.soundid);
Symbol 1349 MovieClip Frame 2
quilaty_mc.gotoAndStop(_root.qualityid);
sound_mc.gotoAndStop(_root.soundid);
Symbol 1349 MovieClip Frame 3
quilaty_mc.gotoAndStop(_root.qualityid);
sound_mc.gotoAndStop(_root.soundid);
Symbol 1349 MovieClip Frame 4
quilaty_mc.gotoAndStop(_root.qualityid);
sound_mc.gotoAndStop(_root.soundid);
Symbol 1349 MovieClip Frame 5
quilaty_mc.gotoAndStop(_root.qualityid);
sound_mc.gotoAndStop(_root.soundid);
Symbol 1349 MovieClip Frame 6
quilaty_mc.gotoAndStop(_root.qualityid);
sound_mc.gotoAndStop(_root.soundid);
Symbol 1349 MovieClip Frame 7
quilaty_mc.gotoAndStop(_root.qualityid);
sound_mc.gotoAndStop(_root.soundid);
Symbol 1349 MovieClip Frame 8
quilaty_mc.gotoAndStop(_root.qualityid);
sound_mc.gotoAndStop(_root.soundid);
Symbol 1349 MovieClip Frame 9
quilaty_mc.gotoAndStop(_root.qualityid);
sound_mc.gotoAndStop(_root.soundid);
Symbol 1349 MovieClip Frame 10
quilaty_mc.gotoAndStop(_root.qualityid);
sound_mc.gotoAndStop(_root.soundid);
Symbol 1349 MovieClip Frame 11
quilaty_mc.gotoAndStop(_root.qualityid);
sound_mc.gotoAndStop(_root.soundid);
Symbol 1349 MovieClip Frame 12
quilaty_mc.gotoAndStop(_root.qualityid);
sound_mc.gotoAndStop(_root.soundid);
Symbol 1349 MovieClip Frame 13
quilaty_mc.gotoAndStop(_root.qualityid);
sound_mc.gotoAndStop(_root.soundid);
Symbol 1349 MovieClip Frame 14
quilaty_mc.gotoAndStop(_root.qualityid);
sound_mc.gotoAndStop(_root.soundid);
Symbol 1349 MovieClip Frame 15
quilaty_mc.gotoAndStop(_root.qualityid);
sound_mc.gotoAndStop(_root.soundid);
Symbol 1354 MovieClip Frame 1
stop();
Symbol 1354 MovieClip Frame 2
stop();
Symbol 1354 MovieClip Frame 7
stop();
Symbol 1354 MovieClip Frame 14
stop();
Symbol 1354 MovieClip Frame 19
stop();
Symbol 1354 MovieClip Frame 27
stop();
Symbol 1354 MovieClip Frame 32
stop();
Symbol 1362 MovieClip Frame 1
stop();
cnt = 0;
onEnterFrame = function () {
cnt++;
if (cnt < 8) {
return(undefined);
}
cnt = 0;
if (_visible) {
this._visible = false;
} else {
this._visible = true;
}
};
Symbol 1366 MovieClip Frame 1
stop();
Symbol 1366 MovieClip Frame 2
this._alpha = 100;
onEnterFrame = function () {
this._alpha = this._alpha - 100;
if (_alpha <= 0) {
delete onEnterFrame;
gotoAndStop (1);
}
};
Symbol 1390 MovieClip Frame 1
if (_root.soundid == 1) {
var sound1_sound = new Sound();
sound1_sound.attachSound("f8954_bang-2642.mp3");
sound1_sound.start();
}
Symbol 1390 MovieClip Frame 21
if (_root.soundid == 1) {
var sound_sound = new Sound();
sound_sound.attachSound("Fx07252_rip1.mp3");
sound_sound.start();
}
Symbol 1390 MovieClip Frame 46
this._parent.gotoAndStop(1);
Symbol 1391 MovieClip Frame 1
stop();
onEnterFrame = function () {
if (canhit) {
if (this.hit_mc.hitTest(this._parent.mcBall)) {
this.gotoAndStop(2);
_root.player_array[0].score = _root.player_array[0].score + 50;
this._parent.mcPlayer0.power = this._parent.mcPlayer0.power + 20;
canhit = false;
delete onEnterFrame;
}
}
};
Symbol 1391 MovieClip Frame 2
stop();
Symbol 1441 MovieClip Frame 1
if (_root.soundid == 1) {
var sound_sound = new Sound();
sound_sound.attachSound("rw228.mp3");
sound_sound.start();
}
Symbol 1441 MovieClip Frame 40
_parent.gotoAndStop(1);
Symbol 1442 MovieClip Frame 1
stop();
onEnterFrame = function () {
if (canhit) {
if (this.hit_mc.hitTest(this._parent.mcBall)) {
this.gotoAndStop(2);
_root.player_array[0].score = _root.player_array[0].score + 50;
this._parent.mcPlayer0.power = this._parent.mcPlayer0.power + 20;
canhit = false;
delete onEnterFrame;
}
}
};
Symbol 1442 MovieClip Frame 2
stop();
Symbol 1459 MovieClip Frame 14
if (_root.soundid == 1) {
var sound_sound = new Sound();
sound_sound.attachSound("rw227.mp3");
sound_sound.start();
}
Symbol 1459 MovieClip Frame 73
this._parent.gotoAndStop(1);
Symbol 1460 MovieClip Frame 1
stop();
onEnterFrame = function () {
if (canhit) {
if (this.hit_mc.hitTest(this._parent.mcBall)) {
this.gotoAndStop(2);
_root.player_array[0].score = _root.player_array[0].score + 50;
this._parent.mcPlayer0.power = this._parent.mcPlayer0.power + 20;
canhit = false;
delete onEnterFrame;
}
}
};
Symbol 1460 MovieClip Frame 2
stop();
Symbol 1478 MovieClip Frame 1
if (_root.soundid == 1) {
var sound_sound = new Sound();
sound_sound.attachSound("f8954_bang-2642.mp3");
sound_sound.start();
}
Symbol 1478 MovieClip Frame 26
if (_root.soundid == 1) {
var sound1_sound = new Sound();
sound1_sound.attachSound("47111_1082_1390.mp3");
sound1_sound.start();
}
Symbol 1478 MovieClip Frame 65
this._parent.gotoAndStop(1);
Symbol 1479 MovieClip Frame 1
stop();
onEnterFrame = function () {
if (canhit) {
if ((this.hit_mc.hitTest(this._parent.mcBall) && (this._parent.mcBall.vy < -400)) && (this.hit_mc.hitTest(this._parent.mcPlayer1) == false)) {
this.gotoAndStop(2);
_root.player_array[0].score = _root.player_array[0].score + 50;
this._parent.mcPlayer0.power = this._parent.mcPlayer0.power + 20;
canhit = false;
delete onEnterFrame;
}
}
};
Symbol 1479 MovieClip Frame 2
stop();
Symbol 1497 MovieClip Frame 1
if (_root.soundid == 1) {
var sound1_sound = new Sound();
sound1_sound.attachSound("rw426.mp3");
sound1_sound.start();
}
Symbol 1497 MovieClip Frame 7
if (_root.soundid == 1) {
var sound_sound = new Sound();
sound_sound.attachSound("27373_1074_179.mp3");
sound_sound.start();
}
Symbol 1497 MovieClip Frame 55
this._parent.gotoAndStop(1);
Symbol 1498 MovieClip Frame 1
stop();
this._parent.play();
onEnterFrame = function () {
if (this._parent.canhit) {
if ((this.hit_mc.hitTest(this._parent._parent.mcBall) && (this._parent._parent.mcBall.vy < -390)) && (this.hit_mc.hitTest(this._parent._parent.mcPlayer1) == false)) {
this._parent.stop();
this.gotoAndStop(2);
_root.player_array[0].score = _root.player_array[0].score + 100;
this._parent._parent.mcPlayer0.power = this._parent._parent.mcPlayer0.power + 25;
canhit = false;
delete onEnterFrame;
}
}
};
Symbol 1498 MovieClip Frame 2
stop();
Symbol 1521 MovieClip Frame 15
_parent._parent._parent.start_wait(1);
Symbol 1527 MovieClip Frame 17
_parent._parent._parent.start_wait(1);
Symbol 1537 MovieClip Frame 13
stop();
Symbol 1559 MovieClip Frame 21
this._parent.gotoAndStop("serve");
Symbol 1569 MovieClip Frame 26
_parent._parent._parent.start_wait(1);
Symbol 1590 MovieClip Frame 15
_parent._parent._parent.start_wait(1);
Symbol 1596 MovieClip Frame 17
_parent._parent._parent.start_wait(1);
Symbol 1606 MovieClip Frame 13
stop();
Symbol 1626 MovieClip Frame 21
this._parent.gotoAndStop("serve");
Symbol 1635 MovieClip Frame 26
_parent._parent._parent.start_wait(1);
Symbol 1656 MovieClip Frame 14
_parent._parent._parent.start_wait(1);
Symbol 1662 MovieClip Frame 17
_parent._parent._parent.start_wait(1);
Symbol 1672 MovieClip Frame 13
stop();
Symbol 1692 MovieClip Frame 21
this._parent.gotoAndStop("serve");
Symbol 1701 MovieClip Frame 26
_parent._parent._parent.start_wait(1);
Symbol 1722 MovieClip Frame 15
_parent._parent._parent.start_wait(1);
Symbol 1728 MovieClip Frame 16
_parent._parent._parent.start_wait(1);
Symbol 1738 MovieClip Frame 13
stop();
Symbol 1756 MovieClip Frame 21
this._parent.gotoAndStop("serve");
Symbol 1765 MovieClip Frame 26
_parent._parent._parent.start_wait(1);
Symbol 1786 MovieClip Frame 15
_parent._parent._parent.start_wait(1);
Symbol 1792 MovieClip Frame 17
_parent._parent._parent.start_wait(1);
Symbol 1802 MovieClip Frame 13
stop();
Symbol 1822 MovieClip Frame 21
this._parent.gotoAndStop("serve");
Symbol 1831 MovieClip Frame 26
_parent._parent._parent.start_wait(1);
Symbol 1852 MovieClip Frame 15
_parent._parent._parent.start_wait(1);
Symbol 1858 MovieClip Frame 17
_parent._parent._parent.start_wait(1);
Symbol 1868 MovieClip Frame 13
stop();
Symbol 1888 MovieClip Frame 21
this._parent.gotoAndStop("serve");
Symbol 1897 MovieClip Frame 26
_parent._parent._parent.start_wait(1);
Symbol 1918 MovieClip Frame 15
_parent._parent._parent.start_wait(1);
Symbol 1924 MovieClip Frame 17
_parent._parent._parent.start_wait(1);
Symbol 1934 MovieClip Frame 12
stop();
Symbol 1954 MovieClip Frame 21
this._parent.gotoAndStop("serve");
Symbol 1963 MovieClip Frame 26
_parent._parent._parent.start_wait(1);
Symbol 1984 MovieClip Frame 15
_parent._parent._parent.start_wait(1);
Symbol 1990 MovieClip Frame 17
_parent._parent._parent.start_wait(1);
Symbol 2000 MovieClip Frame 13
stop();
Symbol 2020 MovieClip Frame 21
this._parent.gotoAndStop("serve");
Symbol 2029 MovieClip Frame 26
_parent._parent._parent.start_wait(1);
Symbol 2031 MovieClip Frame 1
stop();
Symbol 2031 MovieClip Frame 2
stop();
Symbol 2031 MovieClip Frame 3
stop();
Symbol 2031 MovieClip Frame 4
stop();
Symbol 2031 MovieClip Frame 5
stop();
Symbol 2031 MovieClip Frame 6
stop();
Symbol 2031 MovieClip Frame 7
stop();
Symbol 2031 MovieClip Frame 8
stop();
Symbol 2058 MovieClip Frame 15
_parent._parent._parent.start_wait(0);
Symbol 2065 MovieClip Frame 17
_parent._parent._parent.start_wait(0);
Symbol 2075 MovieClip Frame 12
stop();
Symbol 2093 MovieClip Frame 21
this._parent.gotoAndStop("serve");
Symbol 2102 MovieClip Frame 26
_parent._parent._parent.start_wait(0);
Symbol 2123 MovieClip Frame 16
_parent._parent._parent.start_wait(0);
Symbol 2129 MovieClip Frame 17
_parent._parent._parent.start_wait(0);
Symbol 2139 MovieClip Frame 12
stop();
Symbol 2159 MovieClip Frame 21
this._parent.gotoAndStop("serve");
Symbol 2168 MovieClip Frame 26
_parent._parent._parent.start_wait(0);
Symbol 2189 MovieClip Frame 16
_parent._parent._parent.start_wait(0);
Symbol 2195 MovieClip Frame 17
_parent._parent._parent.start_wait(0);
Symbol 2205 MovieClip Frame 12
stop();
Symbol 2223 MovieClip Frame 21
this._parent.gotoAndStop("serve");
Symbol 2232 MovieClip Frame 26
_parent._parent._parent.start_wait(0);
Symbol 2253 MovieClip Frame 16
_parent._parent._parent.start_wait(0);
Symbol 2259 MovieClip Frame 17
_parent._parent._parent.start_wait(0);
Symbol 2269 MovieClip Frame 12
stop();
Symbol 2287 MovieClip Frame 21
this._parent.gotoAndStop("serve");
Symbol 2296 MovieClip Frame 26
_parent._parent._parent.start_wait(0);
Symbol 2317 MovieClip Frame 16
_parent._parent._parent.start_wait(0);
Symbol 2323 MovieClip Frame 17
_parent._parent._parent.start_wait(0);
Symbol 2333 MovieClip Frame 12
stop();
Symbol 2353 MovieClip Frame 21
this._parent.gotoAndStop("serve");
Symbol 2362 MovieClip Frame 26
_parent._parent._parent.start_wait(0);
Symbol 2383 MovieClip Frame 16
_parent._parent._parent.start_wait(0);
Symbol 2389 MovieClip Frame 16
_parent._parent._parent.start_wait(0);
Symbol 2399 MovieClip Frame 12
stop();
Symbol 2419 MovieClip Frame 21
this._parent.gotoAndStop("serve");
Symbol 2428 MovieClip Frame 26
_parent._parent._parent.start_wait(0);
Symbol 2449 MovieClip Frame 16
_parent._parent._parent.start_wait(0);
Symbol 2455 MovieClip Frame 17
_parent._parent._parent.start_wait(0);
Symbol 2465 MovieClip Frame 12
stop();
Symbol 2483 MovieClip Frame 21
this._parent.gotoAndStop("serve");
Symbol 2492 MovieClip Frame 26
_parent._parent._parent.start_wait(0);
Symbol 2513 MovieClip Frame 16
_parent._parent._parent.start_wait(0);
Symbol 2519 MovieClip Frame 17
_parent._parent._parent.start_wait(0);
Symbol 2529 MovieClip Frame 12
stop();
Symbol 2547 MovieClip Frame 21
this._parent.gotoAndStop("serve");
Symbol 2556 MovieClip Frame 26
_parent._parent._parent.start_wait(0);
Symbol 2558 MovieClip Frame 1
stop();
Symbol 2558 MovieClip Frame 2
stop();
Symbol 2558 MovieClip Frame 3
stop();
Symbol 2558 MovieClip Frame 4
stop();
Symbol 2558 MovieClip Frame 5
stop();
Symbol 2558 MovieClip Frame 6
stop();
Symbol 2558 MovieClip Frame 7
stop();
Symbol 2558 MovieClip Frame 8
stop();
Symbol 2585 MovieClip Frame 1
this._parent.play();
Symbol 2585 MovieClip Frame 16
gotoAndPlay (1);
Symbol 2585 MovieClip Frame 93
this._parent.play();
Symbol 2603 MovieClip Frame 1
stop();
Symbol 2603 MovieClip Frame 2
play();
Symbol 2604 MovieClip Frame 1
mc = this;
onEnterFrame = function () {
if (this._parent.canhit) {
if ((this.man_mc.hit_mc.hitTest(this._parent._parent.mcBall) && (this._parent._parent.mcBall.vy > 400)) && (this.man_mc.hit_mc.hitTest(this._parent._parent.mcPlayer0) == false)) {
mc.stop();
this.man_mc.gotoAndPlay("hit");
_root.player_array[1].score = _root.player_array[1].score + 100;
this._parent._parent.mcPlayer1.power = this._parent._parent.mcPlayer1.power + 25;
this._parent.canhit = false;
delete onEnterFrame;
}
}
};
Symbol 2622 MovieClip Frame 1
stop();
Symbol 2622 MovieClip Frame 2
stop();
Symbol 2637 MovieClip Frame 1
if (_root.soundid == 1) {
var sound1_sound = new Sound();
sound1_sound.attachSound("rw237.mp3");
sound1_sound.start();
}
Symbol 2637 MovieClip Frame 19
if (_root.soundid == 1) {
var sound2_sound = new Sound();
sound2_sound.attachSound("07ty076.mp3");
sound2_sound.start();
}
Symbol 2637 MovieClip Frame 50
this._parent.gotoAndStop(1);
Symbol 2638 MovieClip Frame 1
stop();
onEnterFrame = function () {
if (canhit) {
if (this.hit_mc.hitTest(this._parent.mcBall)) {
this.gotoAndStop(2);
_root.player_array[1].score = _root.player_array[1].score + 50;
this._parent.mcPlayer1.power = this._parent.mcPlayer1.power + 20;
canhit = false;
delete onEnterFrame;
}
}
};
Symbol 2638 MovieClip Frame 2
stop();
Symbol 2653 MovieClip Frame 1
if (_root.soundid == 1) {
var sound_sound = new Sound();
sound_sound.attachSound("rw236.mp3");
sound_sound.start();
}
Symbol 2653 MovieClip Frame 63
this._parent.gotoAndStop(1);
Symbol 2654 MovieClip Frame 1
stop();
onEnterFrame = function () {
if (canhit) {
if (this.hit1_mc.hitTest(this._parent.mcBall) || (this.hit2_mc.hitTest(this._parent.mcBall) && (this._parent.mcBall.vy > 500))) {
this.gotoAndStop(2);
_root.player_array[1].score = _root.player_array[1].score + 50;
this._parent.mcPlayer1.power = this._parent.mcPlayer1.power + 20;
canhit = false;
delete onEnterFrame;
}
}
};
Symbol 2654 MovieClip Frame 2
stop();
Symbol 2668 MovieClip Frame 1
if (_root.soundid == 1) {
var sound1_sound = new Sound();
sound1_sound.attachSound("rw227.mp3");
sound1_sound.start();
}
Symbol 2668 MovieClip Frame 26
if (_root.soundid == 1) {
var sound2_sound = new Sound();
sound2_sound.attachSound("07ty076.mp3");
sound2_sound.start();
}
Symbol 2668 MovieClip Frame 45
this._parent.gotoAndStop(1);
Symbol 2669 MovieClip Frame 1
stop();
onEnterFrame = function () {
if (canhit) {
if (this.hit_mc.hitTest(this._parent.mcBall)) {
this.gotoAndStop(2);
_root.player_array[1].score = _root.player_array[1].score + 50;
this._parent.mcPlayer1.power = this._parent.mcPlayer1.power + 20;
canhit = false;
delete onEnterFrame;
}
}
};
Symbol 2669 MovieClip Frame 2
stop();
Symbol 2714 MovieClip Frame 81
this._parent.gotoAndStop(1);
Symbol 2715 MovieClip Frame 1
stop();
canhit = true;
onEnterFrame = function () {
if (canhit) {
if (this.hit_mc.hitTest(this._parent.mcBall)) {
this.gotoAndStop(2);
_root.player_array[1].score = _root.player_array[1].score + 50;
this._parent.mcPlayer1.power = this._parent.mcPlayer1.power + 20;
canhit = false;
delete onEnterFrame;
}
}
};
Symbol 2715 MovieClip Frame 2
stop();
Symbol 2726 MovieClip Frame 1
if (_root.soundid == 1) {
var sound_sound = new Sound();
sound_sound.attachSound("shizi.mp3");
sound_sound.start();
}
Symbol 2726 MovieClip Frame 27
this._parent.gotoAndStop(1);
Symbol 2727 MovieClip Frame 1
stop();
onEnterFrame = function () {
if (canhit) {
if (this.hit_mc.hitTest(this._parent.mcBall)) {
this.gotoAndStop(2);
_root.player_array[1].score = _root.player_array[1].score + 50;
this._parent.mcPlayer1.power = this._parent.mcPlayer1.power + 20;
canhit = false;
delete onEnterFrame;
}
}
};
Symbol 2727 MovieClip Frame 2
stop();
Symbol 2748 MovieClip Frame 1
if (_root.soundid == 1) {
var sound_sound = new Sound();
sound_sound.attachSound("bianselong.mp3");
sound_sound.start();
}
Symbol 2748 MovieClip Frame 40
this._parent.gotoAndStop(1);
Symbol 2749 MovieClip Frame 1
stop();
onEnterFrame = function () {
if (canhit) {
if (this.hit_mc.hitTest(this._parent.mcBall)) {
this.gotoAndStop(2);
_root.player_array[1].score = _root.player_array[1].score + 50;
this._parent.mcPlayer1.power = this._parent.mcPlayer1.power + 20;
canhit = false;
delete onEnterFrame;
}
}
};
Symbol 2749 MovieClip Frame 2
stop();
Symbol 2761 MovieClip Frame 1
if (_root.soundid == 1) {
var sound_sound = new Sound();
sound_sound.attachSound("lu.mp3");
sound_sound.start();
}
Symbol 2761 MovieClip Frame 27
this._parent.gotoAndStop(1);
Symbol 2762 MovieClip Frame 1
stop();
onEnterFrame = function () {
if (canhit) {
if (this.hit_mc.hitTest(this._parent.mcBall)) {
this.gotoAndStop(2);
_root.player_array[0].score = _root.player_array[0].score + 50;
this._parent.mcPlayer0.power = this._parent.mcPlayer0.power + 20;
canhit = false;
delete onEnterFrame;
}
}
};
Symbol 2762 MovieClip Frame 2
stop();
Symbol 2780 MovieClip Frame 1
if (_root.soundid == 1) {
var sound_sound = new Sound();
sound_sound.attachSound("Fx07417_lgcomp.mp3");
sound_sound.start();
}
Symbol 2780 MovieClip Frame 80
this._parent.gotoAndStop(1);
Symbol 2781 MovieClip Frame 1
stop();
onEnterFrame = function () {
if (canhit) {
if ((this.hit_mc.hitTest(this._parent.mcBall) && (this._parent.mcBall.vy < -400)) && (this.hit_mc.hitTest(this._parent.mcPlayer1) == false)) {
this.gotoAndStop(2);
_root.player_array[0].score = _root.player_array[0].score + 50;
this._parent.mcPlayer0.power = this._parent.mcPlayer0.power + 20;
canhit = false;
delete onEnterFrame;
}
}
};
Symbol 2781 MovieClip Frame 2
stop();
Symbol 2798 MovieClip Frame 1
if (_root.soundid == 1) {
var sound_sound = new Sound();
sound_sound.attachSound("Fx01611_monkey110.mp3");
sound_sound.start();
}
Symbol 2798 MovieClip Frame 20
this._parent.gotoAndStop(1);
Symbol 2799 MovieClip Frame 1
stop();
onEnterFrame = function () {
if (canhit) {
if (this.hit_mc.hitTest(this._parent.mcBall)) {
this.gotoAndStop(2);
_root.player_array[0].score = _root.player_array[0].score + 50;
this._parent.mcPlayer0.power = this._parent.mcPlayer0.power + 20;
canhit = false;
delete onEnterFrame;
}
}
};
Symbol 2799 MovieClip Frame 2
stop();
Symbol 2812 MovieClip Frame 1
if (_root.soundid == 1) {
var sound_sound = new Sound();
sound_sound.attachSound("013kt007.mp3");
sound_sound.start();
}
Symbol 2812 MovieClip Frame 22
this._parent.gotoAndStop(1);
Symbol 2813 MovieClip Frame 1
stop();
onEnterFrame = function () {
if (this._parent.canhit) {
if ((this.hit_mc.hitTest(this._parent._parent.mcBall) && (this._parent._parent.mcBall.vy < -400)) && (this.hit_mc.hitTest(this._parent._parent.mcPlayer1) == false)) {
this.gotoAndStop(2);
_root.player_array[0].score = _root.player_array[0].score + 100;
this._parent._parent.mcPlayer0.power = this._parent._parent.mcPlayer0.power + 25;
this._parent.canhit = false;
delete onEnterFrame;
}
}
};
Symbol 2813 MovieClip Frame 2
stop();
Symbol 2821 MovieClip Frame 1
if (_root.soundid == 1) {
var sound_sound = new Sound();
sound_sound.attachSound("huolieniao.mp3");
sound_sound.start();
}
Symbol 2821 MovieClip Frame 24
this._parent.gotoAndStop(1);
Symbol 2822 MovieClip Frame 1
stop();
onEnterFrame = function () {
if (canhit) {
if (this.hit_mc.hitTest(this._parent.mcBall)) {
this.gotoAndStop(2);
_root.player_array[1].score = _root.player_array[1].score + 50;
this._parent.mcPlayer1.power = this._parent.mcPlayer1.power + 20;
canhit = false;
delete onEnterFrame;
}
}
};
Symbol 2822 MovieClip Frame 2
stop();
Symbol 2831 MovieClip Frame 1
if (_root.soundid == 1) {
var sound_sound = new Sound();
sound_sound.attachSound("Fx00634_zebra1.mp3");
sound_sound.start();
}
Symbol 2831 MovieClip Frame 47
this._parent.gotoAndStop(1);
Symbol 2832 MovieClip Frame 1
stop();
onEnterFrame = function () {
if (canhit) {
if (this.hit_mc.hitTest(this._parent.mcBall)) {
this.gotoAndStop(2);
_root.player_array[1].score = _root.player_array[1].score + 50;
this._parent.mcPlayer1.power = this._parent.mcPlayer1.power + 20;
canhit = false;
delete onEnterFrame;
}
}
};
Symbol 2832 MovieClip Frame 2
stop();
Symbol 2844 MovieClip Frame 1
if (_root.soundid == 1) {
var sound_sound = new Sound();
sound_sound.attachSound("yingwu.mp3");
sound_sound.start();
}
Symbol 2844 MovieClip Frame 30
this._parent.gotoAndStop(1);
Symbol 2845 MovieClip Frame 1
stop();
onEnterFrame = function () {
if (canhit) {
if (this.hit_mc.hitTest(this._parent.mcBall)) {
this.gotoAndStop(2);
_root.player_array[0].score = _root.player_array[0].score + 50;
this._parent.mcPlayer0.power = this._parent.mcPlayer0.power + 20;
canhit = false;
delete onEnterFrame;
}
}
};
Symbol 2845 MovieClip Frame 2
stop();
Symbol 2863 MovieClip Frame 1
if (_root.soundid == 1) {
var sound_sound = new Sound();
sound_sound.attachSound("013kt004.mp3");
sound_sound.start();
}
Symbol 2863 MovieClip Frame 41
this._parent.gotoAndStop(1);
Symbol 2864 MovieClip Frame 1
stop();
onEnterFrame = function () {
if (this._parent.canhit) {
if ((this.hit_mc.hitTest(this._parent._parent.mcBall) && (this._parent._parent.mcBall.vy > 400)) && (this.hit_mc.hitTest(this._parent._parent.mcPlayer0) == false)) {
this.gotoAndStop(2);
_root.player_array[1].score = _root.player_array[1].score + 100;
this._parent._parent.mcPlayer1.power = this._parent._parent.mcPlayer1.power + 25;
canhit = false;
delete onEnterFrame;
}
}
};
Symbol 2864 MovieClip Frame 2
stop();
Symbol 2879 MovieClip Frame 1
if (_root.soundid == 1) {
var sound_sound = new Sound();
sound_sound.attachSound("Fx10410_TRASH.mp3");
sound_sound.start();
}
Symbol 2879 MovieClip Frame 40
this._parent.gotoAndStop(1);
Symbol 2880 MovieClip Frame 1
stop();
onEnterFrame = function () {
if (canhit) {
if (this.hit_mc.hitTest(this._parent.mcBall)) {
this.gotoAndStop(2);
_root.player_array[1].score = _root.player_array[1].score + 50;
this._parent.mcPlayer1.power = this._parent.mcPlayer1.power + 20;
canhit = false;
delete onEnterFrame;
}
}
};
Symbol 2880 MovieClip Frame 2
stop();
Symbol 2892 MovieClip Frame 1
if (_root.soundid == 1) {
var sound_sound = new Sound();
sound_sound.attachSound("46638_1082_1381.mp3");
sound_sound.start();
}
Symbol 2892 MovieClip Frame 27
this._parent.gotoAndStop(1);
Symbol 2893 MovieClip Frame 1
stop();
onEnterFrame = function () {
if (canhit) {
if (this.hit_mc.hitTest(this._parent.mcBall)) {
this.gotoAndStop(2);
_root.player_array[1].score = _root.player_array[1].score + 50;
this._parent.mcPlayer1.power = this._parent.mcPlayer1.power + 20;
canhit = false;
delete onEnterFrame;
}
}
};
Symbol 2893 MovieClip Frame 2
stop();
Symbol 2922 MovieClip Frame 1
if (_root.soundid == 1) {
var sound_sound = new Sound();
sound_sound.attachSound("dw210.mp3");
sound_sound.start();
}
Symbol 2922 MovieClip Frame 40
this._parent.gotoAndStop(1);
Symbol 2923 MovieClip Frame 1
stop();
onEnterFrame = function () {
if (canhit) {
if (this.hit_mc.hitTest(this._parent.mcBall)) {
this.gotoAndStop(2);
_root.player_array[0].score = _root.player_array[0].score + 50;
this._parent.mcPlayer0.power = this._parent.mcPlayer0.power + 20;
canhit = false;
delete onEnterFrame;
}
}
};
Symbol 2923 MovieClip Frame 2
stop();
Symbol 2944 MovieClip Frame 1
if (_root.soundid == 1) {
var sound_sound = new Sound();
sound_sound.attachSound("28731_1074_201.mp3");
sound_sound.start();
}
Symbol 2944 MovieClip Frame 40
this._parent.gotoAndStop(1);
Symbol 2945 MovieClip Frame 1
stop();
onEnterFrame = function () {
if (canhit) {
if (this.hit_mc.hitTest(this._parent.mcBall)) {
this.gotoAndStop(2);
_root.player_array[0].score = _root.player_array[0].score + 50;
this._parent.mcPlayer0.power = this._parent.mcPlayer0.power + 20;
canhit = false;
delete onEnterFrame;
}
}
};
Symbol 2945 MovieClip Frame 2
stop();
Symbol 2959 MovieClip Frame 8
if (_root.soundid == 1) {
var sound_sound = new Sound();
sound_sound.attachSound("rw227.mp3");
sound_sound.start();
}
Symbol 2959 MovieClip Frame 28
this._parent.gotoAndStop(1);
Symbol 2960 MovieClip Frame 1
stop();
onEnterFrame = function () {
if (canhit) {
if (this.hit_mc.hitTest(this._parent.mcBall)) {
this.gotoAndStop(2);
_root.player_array[0].score = _root.player_array[0].score + 50;
this._parent.mcPlayer0.power = this._parent.mcPlayer0.power + 20;
canhit = false;
delete onEnterFrame;
}
}
};
Symbol 2960 MovieClip Frame 2
stop();
Symbol 2972 MovieClip Frame 1
if (_root.soundid == 1) {
var sound_sound = new Sound();
sound_sound.attachSound("rw236.mp3");
sound_sound.start();
}
Symbol 2972 MovieClip Frame 25
this._parent.gotoAndStop(1);
Symbol 2973 MovieClip Frame 1
stop();
onEnterFrame = function () {
if (canhit) {
if (this.hit_mc.hitTest(this._parent.mcBall)) {
this.gotoAndStop(2);
_root.player_array[0].score = _root.player_array[0].score + 50;
this._parent.mcPlayer0.power = this._parent.mcPlayer0.power + 20;
canhit = false;
delete onEnterFrame;
}
}
};
Symbol 2973 MovieClip Frame 2
stop();
Symbol 2989 MovieClip Frame 1
if (_root.soundid == 1) {
var sound_sound = new Sound();
sound_sound.attachSound("27376_1074_179.mp3");
sound_sound.start();
}
Symbol 2989 MovieClip Frame 20
this._parent.gotoAndStop(1);
Symbol 2990 MovieClip Frame 1
stop();
onEnterFrame = function () {
if (this._parent.canhit) {
if ((this.hit_mc.hitTest(this._parent._parent.mcBall) && (this._parent._parent.mcBall.vy < -400)) && (this.hit_mc.hitTest(this._parent._parent.mcPlayer1) == false)) {
this.gotoAndStop(2);
_root.player_array[0].score = _root.player_array[0].score + 100;
this._parent._parent.mcPlayer0.power = this._parent._parent.mcPlayer0.power + 25;
this._parent.canhit = false;
delete onEnterFrame;
}
}
};
Symbol 2990 MovieClip Frame 2
stop();
Symbol 3005 MovieClip Frame 1
if (_root.soundid == 1) {
var sound_sound = new Sound();
sound_sound.attachSound("rw426.mp3");
sound_sound.start();
}
Symbol 3005 MovieClip Frame 70
this._parent.gotoAndStop(1);
Symbol 3006 MovieClip Frame 1
stop();
onEnterFrame = function () {
if (this._parent.canhit) {
if ((this.hit_mc.hitTest(this._parent._parent.mcBall) && (this._parent._parent.mcBall.vy > 400)) && (this.hit_mc.hitTest(this._parent._parent.mcPlayer0) == false)) {
this.gotoAndStop(2);
_root.player_array[1].score = _root.player_array[1].score + 100;
this._parent._parent.mcPlayer1.power = this._parent._parent.mcPlayer1.power + 25;
this._parent.canhit = false;
delete onEnterFrame;
}
}
};
Symbol 3006 MovieClip Frame 2
stop();
Symbol 3020 MovieClip Frame 3
if (_root.soundid == 1) {
var sound_sound = new Sound();
sound_sound.attachSound("27373_1074_179.mp3");
sound_sound.start();
}
Symbol 3020 MovieClip Frame 30
this._parent.gotoAndStop(1);
Symbol 3021 MovieClip Frame 1
stop();
onEnterFrame = function () {
if (canhit) {
if (this.hit_mc.hitTest(this._parent.mcBall)) {
this.gotoAndStop(2);
_root.player_array[1].score = _root.player_array[1].score + 50;
this._parent.mcPlayer1.power = this._parent.mcPlayer1.power + 20;
canhit = false;
delete onEnterFrame;
}
}
};
Symbol 3021 MovieClip Frame 2
stop();
Symbol 3034 MovieClip Frame 1
if (_root.soundid == 1) {
var sound_sound = new Sound();
sound_sound.attachSound("f8116_splash-1.mp3");
sound_sound.start();
}
Symbol 3034 MovieClip Frame 30
this._parent.gotoAndStop(1);
Symbol 3035 MovieClip Frame 1
stop();
onEnterFrame = function () {
if (canhit) {
if (this.hit_mc.hitTest(this._parent.mcBall)) {
this.gotoAndStop(2);
_root.player_array[1].score = _root.player_array[1].score + 50;
this._parent.mcPlayer1.power = this._parent.mcPlayer1.power + 20;
canhit = false;
delete onEnterFrame;
}
}
};
Symbol 3035 MovieClip Frame 2
stop();
Symbol 3037 MovieClip Frame 1
function init_hit() {
var i = 0;
while (i < 10) {
eval ("hitmc" + i).canhit = true;
i++;
}
}
function init_game() {
serve_pos = 1;
play_winner = -1;
fault_cnt = 0;
point = [0, 0];
_parent.score_txt = " 0 - 0 ";
_parent.play1fenshu = 0;
_parent.play2fenshu = 0;
init_play();
}
function init_play() {
rally_cnt = 0;
play_result = 0;
_parent.mcMes.gotoAndStop("inplay");
var _local4 = 0;
while (_local4 < 2) {
var _local3 = _root.playmc_array[_local4]._parent;
var _local5 = _local3.filters[0];
_local5.alpha = 0;
_local5.blurX = 0;
_local5.blurY = 0;
_local3.filters = new Array(_local5);
_local3.vy = COURT_H + 20;
if (_local4 == 1) {
_local3.vy = _local3.vy * -1;
}
if (server == _local4) {
_local3.vx = serve_pos * 20;
start_serve(_local4);
} else {
_local3.vx = ((serve_pos * (-COURT_W)) * 2) / 3;
_local3.stat = PS_WAIT;
_local3.play_mc.gotoAndStop("wait");
_local3.wm = WM_WAIT;
}
if (server == 1) {
canscroll = false;
_local3.vx = _local3.vx * -1;
}
player_position(_local4);
_local3.net_flg = 0;
_local4++;
}
init_ball();
init_hit();
debug_txt = "";
var _local7 = new Object();
_local7.onKeyDown = onKeyDownFunc;
Key.addListener(_local7);
if (_root.playermode == 12) {
var _local6 = new Object();
_local6.onKeyDown = onKeyDownFunc2;
Key.addListener(_local6);
}
}
function user_action() {
mc = _root.playmc_array[0]._parent;
switch (mc.stat) {
case PS_SERVE :
check_pad();
if ((pad_trig || (pad_trig1)) || (pad_trig2)) {
start_toss(0);
}
if (pad_hori == 0) {
move_cnt = 0;
} else {
var _local4 = mc.footwork;
mc.vx = mc.vx + (pad_hori * _local4);
if (serve_pos == 1) {
if (mc.vx <= 20) {
mc.vx = 20;
}
if (mc.vx >= 200) {
mc.vx = 200;
}
} else {
if (mc.vx >= -20) {
mc.vx = -20;
}
if (mc.vx <= -200) {
mc.vx = -200;
}
}
player_position(0);
if (pad_hori < 0) {
mc.play_mc.gotoAndStop("serveleft");
} else {
mc.play_mc.gotoAndStop("serveright");
}
}
break;
case PS_TOSS :
check_pad();
mc.cnt++;
if (mc.cnt > 8) {
if (pad_trig) {
start_stroke_user(0);
powertype = 0;
}
if (pad_trig1) {
start_stroke_user(0);
powertype = 1;
}
if (pad_trig2) {
start_stroke_user(0);
powertype = 2;
}
}
if (mc.cnt == 7) {
start_toss_ball(0);
}
break;
case PS_POWER :
check_pad();
mc.play_mc.gotoAndStop("power");
mcPlayer0.power = 0;
var _local3 = mcPlayer0.filters[0];
_local3.alpha = 1;
_local3.color = 16711680 /* 0xFF0000 */;
_local3.blurX = 20;
_local3.blurY = 20;
mcPlayer0.filters = new Array(_local3);
powertype = 7;
_parent.power1_mc.pressTipZ_mc._visible = false;
_parent.power1_mc.pressTipY_mc._visible = false;
if (pad_up) {
start_stroke_user(0);
_local3 = mcPlayer0.filters[0];
_local3.alpha = 0;
_local3.blurX = 0;
_local3.blurY = 0;
mcPlayer0.filters = new Array(_local3);
}
break;
case PS_STROKE :
mc.cnt++;
if (mc.cnt == 3) {
if (check_hit(0)) {
set_ball_dest_user(powertype);
powertype = 0;
if (Math.floor(mc.power) < 100) {
mc.power = mc.power + 5;
}
if (Math.floor(mc.power) >= 100) {
mc.power = 100;
}
_root.player_array[0].score = _root.player_array[0].score + 10;
if (_root.playermode != 12) {
if (_root.playmc_array[1]._parent.stat == PS_WAIT) {
mcPlayer1.stat = PS_FREEZE;
mcPlayer1.cnt = 0;
mcPlayer1.gotoAndStop("wait");
_root.playmc_array[1]._parent.stat = PS_FREEZE;
_root.playmc_array[1]._parent.cnt = 0;
_root.playmc_array[1].gotoAndStop("wait");
}
}
} else {
check_hitman(0);
}
}
_local3 = mcPlayer0.filters[0];
_local3.alpha = 0;
_local3.blurX = 0;
_local3.blurY = 0;
mcPlayer0.filters = new Array(_local3);
break;
case PS_WAIT :
mc.cnt++;
check_pad();
if ((pad_vart == 0) && (pad_hori == 0)) {
mc.play_mc.gotoAndStop("wait");
move_cnt = 0;
} else {
var _local4 = mc.footwork;
mc.vx = mc.vx + (pad_hori * _local4);
mc.vy = mc.vy + (pad_vart * _local4);
if (mc.vx > 230) {
mc.vx = 230;
}
if (mc.vx < -220) {
mc.vx = -220;
}
if (mc.vy > 520) {
mc.vy = 520;
}
if (mc.vy < -20) {
mc.vy = -20;
}
player_position(0);
if (pad_hori < 0) {
mc.play_mc.gotoAndStop("left");
} else {
mc.play_mc.gotoAndStop("right");
}
}
if (mc.power == 100) {
} else {
if (pad_trig) {
start_stroke_user(0);
powertype = 0;
}
if (pad_trig1) {
start_stroke_user(0);
powertype = 1;
}
if (!pad_trig2) {
break;
}
start_stroke_user(0);
powertype = 2;
}
}
}
function user_action2() {
mc = _root.playmc_array[1]._parent;
switch (mc.stat) {
case PS_SERVE :
check_pad2();
if ((pad_trig2 || (pad_trig21)) || (pad_trig22)) {
start_toss(1);
}
if (pad_hori2 == 0) {
move_cnt = 0;
} else {
var _local5 = mc.footwork;
mc.vx = mc.vx + (pad_hori2 * _local5);
if (serve_pos == -1) {
if (mc.vx <= 20) {
mc.vx = 20;
}
if (mc.vx >= 200) {
mc.vx = 200;
}
} else {
if (mc.vx >= -20) {
mc.vx = -20;
}
if (mc.vx <= -200) {
mc.vx = -200;
}
}
player_position(1);
if (pad_hori2 < 0) {
mc.play_mc.gotoAndStop("serveleft");
} else {
mc.play_mc.gotoAndStop("serveright");
}
}
break;
case PS_TOSS :
check_pad2();
mc.cnt++;
if (mc.cnt > 8) {
if (pad_trig2) {
start_stroke_user2(1);
powertype2 = 0;
}
if (pad_trig21) {
start_stroke_user2(1);
powertype2 = 1;
}
if (pad_trig22) {
start_stroke_user2(1);
powertype2 = 2;
}
var _local6 = new mx.transitions.Tween(this._parent.lavel_mc, "_y", mx.transitions.easing.None.easeOut, 150, 96, 2, true);
_local6.onMotionFinished = function () {
canscroll = true;
};
}
if (mc.cnt == 7) {
start_toss_ball(1);
}
break;
case PS_POWER :
check_pad2();
mc.cnt++;
mc.play_mc.gotoAndStop("power");
mcPlayer1.power = 0;
var _local4 = mcPlayer1.filters[0];
_local4.alpha = 1;
_local4.color = 16711680 /* 0xFF0000 */;
_local4.blurX = 20;
_local4.blurY = 20;
mcPlayer1.filters = new Array(_local4);
powertype2 = 7;
_parent.power2_mc.pressTip_mc._visible = false;
if (pad_up2) {
start_stroke_user2(1);
_local4 = mcPlayer1.filters[0];
_local4.alpha = 0;
_local4.blurX = 0;
_local4.blurY = 0;
mcPlayer1.filters = new Array(_local4);
}
break;
case PS_STROKE :
mc.cnt++;
if (mc.cnt == 3) {
if (check_hit(1)) {
set_ball_dest_user2(powertype2);
powertype2 = 0;
if (Math.floor(mc.power) < 100) {
mc.power = mc.power + 5;
}
if (Math.floor(mc.power) >= 100) {
mc.power = 100;
}
_root.player_array[1].score = _root.player_array[1].score + 10;
} else {
check_hitman(1);
}
}
break;
case PS_WAIT :
mc.cnt++;
check_pad2();
if ((pad_vart2 == 0) && (pad_hori2 == 0)) {
mc.play_mc.gotoAndStop("wait");
move_cnt = 0;
} else {
var _local5 = mc.footwork;
mc.vx = mc.vx + (pad_hori2 * _local5);
mc.vy = mc.vy + (pad_vart2 * _local5);
if (mc.vx > 230) {
mc.vx = 230;
}
if (mc.vx < -270) {
mc.vx = -270;
}
if (mc.vy <= -400) {
mc.vy = -400;
}
player_position(1);
if (pad_hori2 < 0) {
mc.play_mc.gotoAndStop("right");
} else {
mc.play_mc.gotoAndStop("left");
}
}
if (mc.power == 100) {
} else {
if (pad_trig2) {
start_stroke_user2(1);
powertype2 = 0;
}
if (pad_trig21) {
start_stroke_user2(1);
powertype2 = 1;
}
if (!pad_trig22) {
break;
}
start_stroke_user2(1);
powertype2 = 1;
}
}
}
function check_pad() {
pad_vart = 0;
pad_up = false;
if (Key.isDown(key1_array[3])) {
pad_vart = 1;
}
if (Key.isDown(key1_array[2])) {
pad_vart = -1;
}
pad_hori = 0;
if (Key.isDown(key1_array[0])) {
pad_hori = -1;
}
if (Key.isDown(key1_array[1])) {
pad_hori = 1;
}
pad_trig = Key.isDown(key1_array[4]);
pad_trig1 = Key.isDown(key1_array[5]);
pad_trig2 = Key.isDown(key1_array[6]);
if (((pad_trig == false) && (pad_trig1 == false)) && (pad_trig2 == false)) {
pad_up = true;
}
}
function check_pad2() {
pad_vart2 = 0;
pad_up2 = false;
if (Key.isDown(key2_array[3])) {
pad_vart2 = 1;
}
if (Key.isDown(key2_array[2])) {
pad_vart2 = -1;
}
pad_hori2 = 0;
if (Key.isDown(key2_array[0])) {
pad_hori2 = -1;
}
if (Key.isDown(key2_array[1])) {
pad_hori2 = 1;
}
pad_trig2 = Key.isDown(key2_array[4]);
pad_trig21 = Key.isDown(key2_array[5]);
pad_trig22 = Key.isDown(key2_array[6]);
if (((pad_trig2 == false) && (pad_trig21 == false)) && (pad_trig22 == false)) {
pad_up2 = true;
}
}
function start_power(pn) {
var _local2 = _root.playmc_array[pn]._parent;
srcpower = _local2.power;
_local2.stat = PS_POWER;
_local2.cnt = 0;
_local2.play_mc.gotoAndStop("power");
}
function start_serve(pn) {
var _local2 = _root.playmc_array[pn]._parent;
_local2.stat = PS_SERVE;
_local2.cnt = 0;
_local2.play_mc.gotoAndStop("serve");
}
function start_toss(pn) {
var _local2 = _root.playmc_array[pn]._parent;
_local2.stat = PS_TOSS;
_local2.play_mc.gotoAndStop("toss");
_local2.cnt = 0;
}
function start_stroke_user(pn) {
var _local2 = _root.playmc_array[pn]._parent;
_local2.stat = PS_STROKE;
_local2.cnt = 0;
var _local3 = mcBall.vx + (mcBall.ax * 2);
if (((mcBall.vh > 70) && (_local3 > (_local2.vx + HIT_X1_SMASH))) && (_local3 < (_local2.vx + HIT_X2_SMASH))) {
_local2.stroke_type = ST_SMASH;
_local2.hit_x1 = HIT_X1_SMASH;
_local2.hit_x2 = HIT_X2_SMASH;
_local2.play_mc.gotoAndStop("smash");
} else if ((mcBall.vx + (mcBall.ax * 3)) < _local2.vx) {
if ((Math.floor(Math.abs((mcBall.vx + (mcBall.ax * 3)) - _local2.vx)) > 60) && (mcBall.side == 1)) {
_local2.stroke_type = ST_LEFTJIU;
_local2.hit_x1 = HIT_X1_BACK;
_local2.hit_x2 = HIT_X2_BACK - 40;
mcShadow0._visible = false;
_local2.play_mc.gotoAndStop("leftjiu");
} else {
_local2.stroke_type = ST_BACK;
_local2.hit_x1 = HIT_X1_BACK;
_local2.hit_x2 = HIT_X2_BACK;
_local2.play_mc.gotoAndStop("back");
}
} else if ((Math.floor(Math.abs((mcBall.vx + (mcBall.ax * 3)) - _local2.vx)) > 60) && (mcBall.side == 1)) {
_local2.stroke_type = ST_RIGHTJIU;
_local2.hit_x1 = HIT_X1_FORE;
_local2.hit_x2 = HIT_X2_FORE + 40;
mcShadow0._visible = false;
_local2.play_mc.gotoAndStop("rightjiu");
} else {
_local2.stroke_type = ST_FORE;
_local2.hit_x1 = HIT_X1_FORE;
_local2.hit_x2 = HIT_X2_FORE;
_local2.play_mc.gotoAndStop("fore");
}
_local2.hit_y1 = HIT_Y1;
_local2.hit_y2 = HIT_Y2;
}
function start_stroke_user2(pn) {
var _local2 = _root.playmc_array[pn]._parent;
_local2.stat = PS_STROKE;
_local2.cnt = 0;
var _local3 = mcBall.vx + (mcBall.ax * 2);
if (((mcBall.vh > 70) && (_local3 > (_local2.vx + HIT_X1_SMASH))) && (_local3 < (_local2.vx + HIT_X2_SMASH))) {
_local2.stroke_type = ST_SMASH;
_local2.hit_x1 = HIT_X1_SMASH;
_local2.hit_x2 = HIT_X2_SMASH;
_local2.play_mc.gotoAndStop("smash");
} else if ((mcBall.vx + (mcBall.ax * 3)) < _local2.vx) {
if ((Math.floor(Math.abs((mcBall.vx + (mcBall.ax * 3)) - _local2.vx)) > 60) && (mcBall.side == 0)) {
_local2.stroke_type = ST_LEFTJIU;
_local2.hit_x1 = HIT_X1_BACK;
_local2.hit_x2 = HIT_X2_BACK - 40;
_local2.play_mc.gotoAndStop("leftjiu");
} else {
_local2.stroke_type = ST_BACK;
_local2.hit_x1 = HIT_X1_BACK;
_local2.hit_x2 = HIT_X2_BACK;
_local2.play_mc.gotoAndStop("back");
}
} else if ((Math.floor(Math.abs((mcBall.vx + (mcBall.ax * 3)) - _local2.vx)) > 60) && (mcBall.side == 0)) {
_local2.stroke_type = ST_RIGHTJIU;
_local2.hit_x1 = HIT_X1_FORE;
_local2.hit_x2 = HIT_X2_FORE + 40;
mcShadow1._visible = false;
_local2.play_mc.gotoAndStop("rightjiu");
} else {
_local2.stroke_type = ST_FORE;
_local2.hit_x1 = HIT_X1_FORE;
_local2.hit_x2 = HIT_X2_FORE;
mcShadow1._visible = false;
_local2.play_mc.gotoAndStop("fore");
}
_local2.hit_y1 = HIT_Y1;
_local2.hit_y2 = HIT_Y2;
}
function check_hit(pn) {
var _local2 = _root.playmc_array[pn]._parent;
var _local3 = mcBall;
if (mcBall.vx < (_local2.vx + _local2.hit_x1)) {
return(0);
}
if (mcBall.vx > (_local2.vx + _local2.hit_x2)) {
return(0);
}
if (mcBall.vy < (_local2.vy + _local2.hit_y1)) {
return(0);
}
if (mcBall.vy > (_local2.vy + _local2.hit_y2)) {
return(0);
}
if (mcBall.vh > HIT_Z) {
return(0);
}
return(1);
}
function set_ball_dest_user(type) {
if (mcBall.side == 0) {
return(undefined);
}
check_pad();
var _local3 = 1;
if (pad_hori < 0) {
_local3 = 0;
}
if (pad_hori > 0) {
_local3 = 2;
}
var _local4 = 1;
if (pad_vart < 0) {
_local4 = 0;
}
if (pad_vart > 0) {
_local4 = 2;
}
var _local2;
var _local7;
var _local6;
var _local11;
if (rally_cnt == 0) {
if (serve_pos > 0) {
_local2 = -COURT_W;
_local7 = 0;
} else {
_local2 = 0;
_local7 = COURT_W;
}
_local6 = -SERVE_H;
_local11 = (-SERVE_H) / 2;
} else {
_local2 = -COURT_W;
_local7 = COURT_W;
_local6 = -COURT_H;
_local11 = (-COURT_H) / 3;
}
var _local9 = (_local7 - _local2) / 3;
var _local10 = (_local11 - _local6) / 3;
var _local12 = (_local2 + (_local9 * _local3)) + (Math.random() * _local9);
var _local13 = (_local6 + (_local10 * _local4)) + (Math.random() * _local10);
if (type == 0) {
mc.forehand = 25 + (1 * mc._parent._parent.player_data[0][0]);
mc.backhand = 25 + (0.5 * mc._parent._parent.player_data[0][1]);
mc.serve = 30 + (3 * mc._parent._parent.player_data[0][2]);
efact = false;
}
if (type == 1) {
mc.forehand = 20 + (1 * mc._parent._parent.player_data[0][0]);
mc.backhand = 20 + (0.5 * mc._parent._parent.player_data[0][1]);
mc.serve = 25 + (3 * mc._parent._parent.player_data[0][2]);
efact = false;
}
if (type == 2) {
mc.forehand = 15 + (1 * mc._parent._parent.player_data[0][0]);
mc.backhand = 15 + (0.5 * mc._parent._parent.player_data[0][1]);
mc.serve = 20 + (3 * mc._parent._parent.player_data[0][2]);
efact = false;
}
if (type == 3) {
mc.forehand = 60 + (1 * mc._parent._parent.player_data[0][0]);
mc.backhand = 60 + (0.5 * mc._parent._parent.player_data[0][1]);
mc.serve = 60 + (3 * mc._parent._parent.player_data[0][2]);
efact = true;
}
if (type == 7) {
mc.forehand = 80 + (1 * mc._parent._parent.player_data[0][0]);
mc.backhand = 80 + (0.5 * mc._parent._parent.player_data[0][1]);
mc.serve = 80 + (3 * mc._parent._parent.player_data[0][2]);
efact = true;
}
var _local5 = mc.forehand;
if ((_root.playmc_array[0]._parent.stroke_type == ST_BACK) || (_root.playmc_array[0]._parent.stroke_type == ST_LEFTJIU)) {
_local5 = mc.backhand;
}
if (_root.playmc_array[0]._parent.stroke_type == ST_SMASH) {
_local5 = mc.serve;
}
start_move_ball(_local12, _local13, 0, _local5, efact);
}
function set_ball_dest_user2(type) {
if (mcBall.side == 1) {
return(undefined);
}
check_pad2();
var _local3 = 1;
if (pad_hori < 0) {
_local3 = 0;
}
if (pad_hori > 0) {
_local3 = 2;
}
var _local4 = 1;
if (pad_vart < 0) {
_local4 = 0;
}
if (pad_vart > 0) {
_local4 = 2;
}
var _local2;
var _local7;
var _local6;
var _local11;
if (rally_cnt == 0) {
if (serve_pos > 0) {
_local2 = -COURT_W;
_local7 = 0;
} else {
_local2 = 0;
_local7 = COURT_W;
}
_local6 = -SERVE_H;
_local11 = (-SERVE_H) / 2;
} else {
_local2 = -COURT_W;
_local7 = COURT_W;
_local6 = -COURT_H;
_local11 = (-COURT_H) / 3;
}
var _local9 = (_local7 - _local2) / 3;
var _local10 = (_local11 - _local6) / 3;
var _local12 = -1 * ((_local2 + (_local9 * _local3)) + (Math.random() * _local9));
var _local13 = -1 * ((_local6 + (_local10 * _local4)) + (Math.random() * _local10));
if (type == 0) {
mc.forehand = 25 + (1 * mc._parent._parent.player_data[1][0]);
mc.backhand = 25 + (0.5 * mc._parent._parent.player_data[1][1]);
mc.serve = 30 + (3 * mc._parent._parent.player_data[1][2]);
efact = false;
}
if (type == 1) {
mc.forehand = 20 + (1 * mc._parent._parent.player_data[1][0]);
mc.backhand = 20 + (0.5 * mc._parent._parent.player_data[1][1]);
mc.serve = 25 + (3 * mc._parent._parent.player_data[1][2]);
efact = false;
}
if (type == 2) {
mc.forehand = 15 + (1 * mc._parent._parent.player_data[1][0]);
mc.backhand = 15 + (0.5 * mc._parent._parent.player_data[1][1]);
mc.serve = 20 + (3 * mc._parent._parent.player_data[1][2]);
efact = false;
}
if (type == 3) {
mc.forehand = 60 + (1 * mc._parent._parent.player_data[1][0]);
mc.backhand = 60 + (0.5 * mc._parent._parent.player_data[1][1]);
mc.serve = 60 + (3 * mc._parent._parent.player_data[1][2]);
efact = true;
}
if (type == 7) {
mc.forehand = 80 + (1 * mc._parent._parent.player_data[1][0]);
mc.backhand = 80 + (0.5 * mc._parent._parent.player_data[1][1]);
mc.serve = 80 + (3 * mc._parent._parent.player_data[1][2]);
efact = true;
}
var _local5 = mc.forehand;
if (_root.playmc_array[1]._parent.stroke_type == ST_BACK) {
_local5 = mc.backhand;
}
if (_root.playmc_array[1]._parent.stroke_type == ST_SMASH) {
_local5 = mc.serve;
}
start_move_ball(_local12, _local13, 1, _local5, efact);
}
function start_wait(pn) {
var _local2 = _root.playmc_array[pn]._parent;
if ((_local2.stat == PS_STROKE) && (_local2.stroke_type == ST_SMASH)) {
var _local4 = -20;
if (pn == 1) {
_local4 = _local4 * -1;
}
_local2.vy = _local2.vy + _local4;
if ((pn == 0) && (_local2.vy < 0)) {
_local2.vy = 0;
}
if ((pn == 1) && (_local2.vy > 0)) {
_local2.vy = 0;
}
player_position(pn);
}
if ((_local2.stat == PS_STROKE) && (_local2.stroke_type == ST_LEFTJIU)) {
_local2.vx = _local2.vx - 80;
player_position(pn);
}
if ((_local2.stat == PS_STROKE) && (_local2.stroke_type == ST_RIGHTJIU)) {
_local2.vx = _local2.vx + 80;
player_position(pn);
}
_local2.stat = PS_WAIT;
_local2.play_mc.gotoAndStop("wait");
if ((pn == 1) && (mcBall.vy < _local2.vy)) {
_local2.stat = PS_AFTER;
_local2.play_mc.gotoAndStop("lose");
}
if (_local2.net_flg == 0) {
if (_local2.netplay > (Math.random() * 20)) {
_local2.net_flg = 1;
}
}
_local2.wm = WM_MOVE;
_local2.dest_x = 0;
_local2.dest_y = -COURT_H;
if (_local2.net_flg) {
_local2.dest_x = mcBall.dx / 3;
_local2.dest_y = -150;
}
}
function move_enemy() {
var _local3 = _root.playmc_array[1]._parent;
switch (_local3.stat) {
case PS_SERVE :
_local3.cnt++;
_local3.powertype2 = 0;
var _local7 = _local3.filters[0];
_local7.alpha = 0;
_local7.blurX = 0;
_local7.blurY = 0;
_local3.filters = new Array(_local7);
if (_local3.cnt > 10) {
start_toss(1);
}
break;
case PS_TOSS :
_local3.cnt++;
if (_local3.cnt == 7) {
start_toss_ball(1);
}
if (_local3.cnt > 22) {
start_stroke_com(1);
var _local9 = new mx.transitions.Tween(this._parent.lavel_mc, "_y", mx.transitions.easing.None.easeOut, 150, 96, 2, true);
_local9.onMotionFinished = function () {
canscroll = true;
};
}
break;
case PS_WAIT :
_local3.powertype2 = 0;
if (!_local3.ispower) {
_local7 = _local3.filters[0];
_local7.alpha = 0;
_local7.blurX = 0;
_local7.blurY = 0;
_local3.filters = new Array(_local7);
}
if (_local3.wm == WM_MOVE) {
var _local6 = _local3.footwork;
var _local8 = 0;
var _local4 = 0;
if (_local3.vy < (_local3.dest_y - 10)) {
_local3.vy = _local3.vy + _local6;
} else if (_local3.vy > (_local3.dest_y + 10)) {
_local3.vy = _local3.vy - _local6;
} else {
_local8++;
}
if (_local8 == 0) {
if (_local3.vx > 0) {
_local4 = 1;
} else {
_local4 = -1;
}
}
if (_local3.vx < (_local3.dest_x - 10)) {
_local3.vx = _local3.vx + _local6;
_local3.play_mc.gotoAndStop("left");
_local4 = -1;
} else if (_local3.vx > (_local3.dest_x + 10)) {
_local3.vx = _local3.vx - _local6;
_local3.play_mc.gotoAndStop("right");
_local4 = 1;
} else {
_local8++;
}
if (_local8 == 2) {
if (((_local3.power == 100) && ((_local3.ispower == false) || (_local3.ispower == undefined))) && (mcBall.vy < 0)) {
_local3.ispower = true;
}
if (_local3.ispower) {
_local3.play_mc.gotoAndStop("power");
if (_root.mode == "easy") {
_local3.powertype2 = 3;
var _local5 = _local3.filters[0];
_local5.alpha = 1;
_local5.color = 65280;
_local5.blurX = 20;
_local5.blurY = 20;
_local3.filters = new Array(_local5);
} else {
_local3.powertype2 = 7;
var _local5 = _local3.filters[0];
_local5.alpha = 1;
_local5.color = 16711680 /* 0xFF0000 */;
_local5.blurX = 20;
_local5.blurY = 20;
_local3.filters = new Array(_local5);
}
} else {
_local3.wm = WM_WAIT;
_local3.play_mc.gotoAndStop("wait");
}
} else {
if (_local4 < 0) {
_local3.play_mc.gotoAndStop("left");
}
if (_local4 > 0) {
_local3.play_mc.gotoAndStop("right");
}
}
player_position(1);
}
if ((mcBall.vy + (mcBall.ay * 4)) < _local3.vy) {
if (Math.abs((mcBall.vx + (mcBall.ax * 4)) - _local3.vx) < 60) {
start_stroke_com(1);
_local3.ispower = false;
_local7 = _local3.filters[0];
_local7.alpha = 0;
_local7.blurX = 0;
_local7.blurY = 0;
_local3.filters = new Array(_local7);
}
}
break;
case PS_STROKE :
_local3.cnt++;
if (_local3.cnt == 3) {
if (check_hit(1)) {
set_ball_dest_com();
if (_local3.power < 100) {
_local3.power = _local3.power + 5;
}
if (_local3.power >= 100) {
_local3.power = 100;
}
} else {
check_hitman(1);
}
}
_local7 = _local3.filters[0];
_local7.alpha = 0;
_local7.blurX = 0;
_local7.blurY = 0;
_local3.filters = new Array(_local7);
if (_local3.powertype2 == 3) {
_local3.power = 50;
}
if (_local3.powertype2 == 7) {
_local3.power = 0;
}
break;
case PS_FREEZE :
_local3.cnt++;
_local7 = _local3.filters[0];
_local7.alpha = 0;
_local7.blurX = 0;
_local7.blurY = 0;
_local3.filters = new Array(_local7);
if (_local3.cnt > 10) {
if (_local3.vy > mcBall.dy) {
_local3.dest_x = ((mcBall.ax / mcBall.ay) * (_local3.vy - mcBall.vy)) + mcBall.vx;
_local3.dest_y = _local3.vy;
} else {
_local3.dest_x = mcBall.dx + (mcBall.ax * 5);
_local3.dest_y = mcBall.dy + (mcBall.ay * 5);
}
_local3.stat = PS_WAIT;
_local3.wm = WM_MOVE;
}
break;
}
}
function start_stroke_com(pn) {
var _local2 = _root.playmc_array[pn]._parent;
_local2.stat = PS_STROKE;
_local2.cnt = 0;
var _local3 = mcBall.vx + (mcBall.ax * 2);
if (((mcBall.vh > 70) && (_local3 > (_local2.vx - HIT_X2_SMASH))) && (_local3 < (_local2.vx - HIT_X1_SMASH))) {
_local2.stroke_type = ST_SMASH;
_local2.hit_x1 = -HIT_X2_SMASH;
_local2.hit_x2 = -HIT_X1_SMASH;
_local2.play_mc.gotoAndStop("smash");
} else if ((mcBall.vx + (mcBall.ax * 3)) > _local2.vx) {
if (Math.floor(Math.abs((mcBall.vx + (mcBall.ax * 3)) - _local2.vx)) > 60) {
_local2.stroke_type = ST_RIGHTJIU;
_local2.hit_x1 = -HIT_X2_BACK;
_local2.hit_x2 = -HIT_X1_BACK;
_local2.play_mc.gotoAndStop("rightjiu");
} else {
_local2.stroke_type = ST_BACK;
_local2.hit_x1 = -HIT_X2_BACK;
_local2.hit_x2 = -HIT_X1_BACK;
_local2.play_mc.gotoAndStop("back");
}
} else if (Math.floor(Math.abs((mcBall.vx + (mcBall.ax * 3)) - _local2.vx)) > 60) {
_local2.stroke_type = ST_LEFTJIU;
_local2.hit_x1 = -HIT_X2_FORE;
_local2.hit_x2 = -HIT_X1_FORE;
mcShadow1._visible = false;
_local2.play_mc.gotoAndStop("leftjiu");
} else {
_local2.stroke_type = ST_FORE;
_local2.hit_x1 = -HIT_X2_FORE;
_local2.hit_x2 = -HIT_X1_FORE;
mcShadow1._visible = false;
_local2.play_mc.gotoAndStop("fore");
}
_local2.hit_y1 = -HIT_Y2;
_local2.hit_y2 = -HIT_Y1;
}
function set_ball_dest_com() {
var _local8 = Math.floor(Math.random() * 3);
var _local10 = Math.floor(Math.random() * 3);
var _local4;
var _local5;
var _local6;
var _local9;
if (rally_cnt == 0) {
if (serve_pos > 0) {
_local4 = -COURT_W;
_local5 = 0;
} else {
_local4 = 0;
_local5 = COURT_W;
}
_local6 = -SERVE_H;
_local9 = (-SERVE_H) / 2;
} else {
if (_root.playmc_array[1]._parent.tech > (Math.random() * 10)) {
if (_root.playmc_array[0].vx < 0) {
_local8 = 0;
} else {
_local8 = 2;
}
}
if (_root.playmc_array[1]._parent.net_flg) {
_local10 = Math.floor(Math.random() * 2);
}
_local4 = -COURT_W;
_local5 = COURT_W;
_local6 = -COURT_H;
_local9 = (-COURT_H) / 3;
}
var _local12 = (_local5 - _local4) / 3;
var _local11 = (_local9 - _local6) / 3;
var _local2 = (_local4 + (_local12 * _local8)) + (Math.random() * _local12);
var _local3 = (_local6 + (_local11 * _local10)) + (Math.random() * _local11);
_local2 = _local2 * -1;
_local3 = _local3 * -1;
if (((_local2 < 0) && (_root.playmc_array[0]._parent.vx < 0)) || ((_local2 > 0) && (_root.playmc_array[0]._parent.vx > 0))) {
if ((Math.abs(Math.abs(_local2) - Math.abs(_root.playmc_array[0]._parent.vx)) > 80) && ((_root.mode == "normal") || (_root.mode == "easy"))) {
if (_local2 < 0) {
_local2 = _local2 + 80;
} else {
_local2 = _local2 - 80;
}
}
} else if (_local2 < 0) {
_local2 = _local2 + 80;
} else {
_local2 = _local2 - 80;
}
mc = _root.playmc_array[1]._parent;
var _local7 = mc.forehand;
if (_root.playmc_array[1]._parent.stroke_type == ST_BACK) {
_local7 = mc.backhand;
}
if (_root.playmc_array[1]._parent.stroke_type == ST_SMASH) {
_local7 = mc.serve;
}
if (mc.powertype2 == 3) {
start_move_ball(_local2, _local3, 1, 60, true);
}
if (mc.powertype2 == 7) {
start_move_ball(_local2, _local3, 1, 80, true);
} else {
start_move_ball(_local2, _local3, 1, _local7, false);
}
mc.powertype2 = 0;
mc.ispower = false;
}
function player_position(n) {
var mc = eval ("mcPlayer" + n);
var per = (1 + ((mc.vy / COURT_H) / 10));
var x = (mc.vx * per);
var y = (mc.vy / 2);
mc._x = SCREEN_OX + x;
mc._y = SCREEN_OY + y;
mc._xscale = 60 * per;
mc._yscale = 60 * per;
var mc2 = eval ("mcShadow" + n);
mc2._visible = true;
mc2._x = mc._x;
mc2._y = mc._y;
}
function check_hitman(pn) {
var _local2 = _root.playmc_array[pn];
if ((((Math.abs(mcBall.vx) - Math.abs(_local2._parent.vx)) <= 5) && ((Math.abs(mcBall.vy) - Math.abs(_local2._parent.vy)) <= 3)) && (mcBall.hitTest(_local2.hit_mc))) {
WM_HIT = true;
}
}
function init_ball() {
var _local2 = _root.playmc_array[server]._parent;
mcBall._y = 100;
mcBallShadow._x = 100;
mcBall.ax = 0;
mcBall.ay = 0;
mcBall.vx = _local2.vx;
mcBall.vy = _local2.vy;
mcBall.vh = 0;
mcBall.up = 0;
mcBall.down = 0;
mcBall.side = 0;
WM_HIT = false;
if (server == 0) {
mcBall.side = 1;
}
mcBall.area = 0;
if (server == 1) {
mcBall.area = 1;
}
mcBall.moving = 0;
mcBall._visible = false;
mcBallShadow._visible = false;
}
function start_toss_ball(pn) {
var _local3 = _root.playmc_array[pn]._parent;
mcBall.ax = 0;
mcBall.ay = 0;
var _local2 = 10;
if (pn == 1) {
_local2 = _local2 * -1;
}
mcBall.vx = _local3.vx + _local2;
mcBall.vy = _local3.vy;
mcBall.vh = TOSS_H;
mcBall.up = 10;
mcBall.down = 0;
mcBall.side = 0;
if (pn == 0) {
mcBall.side = 1;
}
mcBall.bound = 0;
mcBall.moving = 1;
mcBall._visible = true;
mcBallShadow._visible = true;
}
function start_move_ball(dx, dy, side, max_speed, efact) {
if ((rally_cnt == 1) && (mcBall.bound == 0)) {
set_result(RESULT_VOLLEY);
}
mcBall.side = side;
mcBall.dx = dx;
mcBall.dy = dy;
var _local2 = mcBall.dx - mcBall.vx;
var _local3 = mcBall.dy - mcBall.vy;
var _local4 = Math.sqrt((_local2 * _local2) + (_local3 * _local3));
i = 0;
while (i < 5) {
var _local1 = max_speed - (i * 4);
if (check_hit_net(_local2, _local3, _local1, _local4) == 1) {
break;
}
i++;
}
var _local5 = _local4 / _local1;
var _local7 = ((_local5 * (_local5 - 1)) * GRAVITY) / 2;
mcBall.ax = _local2 / _local5;
mcBall.ay = _local3 / _local5;
mcBall.up = (_local7 - mcBall.vh) / _local5;
mcBall.down = 0;
mcBall.bound = 0;
rally_cnt++;
sndHit.start();
ballefact = efact;
}
function check_hit_net(sx, sy, speed, dt) {
var _local6 = dt / speed;
var _local7 = ((_local6 * (_local6 - 1)) * GRAVITY) / 2;
var _local8 = sx / _local6;
var _local5 = sy / _local6;
var _local4 = (_local7 - mcBall.vh) / _local6;
var _local3 = 0;
var _local2 = mcBall.vy;
var _local1 = mcBall.vh;
while (true) {
_local1 = _local1 + (_local4 - _local3);
_local3 = _local3 + GRAVITY;
_local2 = _local2 + _local5;
if (_local1 < 0) {
return(0);
}
if ((mcBall.side == 0) && (_local2 < 0)) {
if (_local1 > (NET_H + 10)) {
return(1);
}
return(0);
}
if ((mcBall.side == 1) && (_local2 > 0)) {
if (_local1 > (NET_H + 10)) {
return(1);
}
return(0);
}
}
}
function move_ball() {
if (mcBall.moving != 1) {
return(undefined);
}
mcBall.vh = mcBall.vh + (mcBall.up - mcBall.down);
if (mcBall.vh < 0) {
mcBall.up = ((mcBall.down - mcBall.up) * 2) / 3;
if (mcBall.up < 1.3) {
mcBall.vh = 0;
mcBall.moving = 0;
defaultefact();
}
defaultefact();
mcBall.down = 0;
mcBall.vh = 0;
if (WM_HIT) {
mcBall.ax = 0;
mcBall.ay = 0;
} else {
mcBall.ax = (mcBall.ax * 3) / 5;
mcBall.ay = (mcBall.ay * 3) / 5;
}
mcBall.bound++;
mcBall.vx = mcBall.vx + mcBall.ax;
mcBall.vy = mcBall.vy + mcBall.ay;
draw_ball();
mcBound._x = mcBall._x;
mcBound._y = mcBall._y;
mcBound.gotoAndStop(2);
if (mcBall.bound == 1) {
if (rally_cnt <= 1) {
if (check_out_serve()) {
set_result(RESULT_FAULT);
}
} else if (check_out()) {
set_result(RESULT_OUT);
}
} else if (mcBall.bound == 2) {
set_result(RESULT_MISS);
}
sndBound.start();
draw_ball();
} else {
mcBall.down = mcBall.down + GRAVITY;
if (WM_HIT) {
mcBall.ax = 0;
mcBall.ay = 0;
}
mcBall.vx = mcBall.vx + mcBall.ax;
mcBall.vy = mcBall.vy + mcBall.ay;
draw_ball();
}
}
function draw_ball() {
if (ballefact) {
if (efact_array.length >= 6) {
efact_array.shift();
}
var i = 0;
while (i < efact_array.length) {
var efacts_mc = eval ("efact_mc" + i);
efacts_mc._x = efact_array[i].x;
efacts_mc._y = efact_array[i].y;
efacts_mc._xscale = efact_array[i].xscale * (0.1 * (i + 3));
efacts_mc._yscale = efact_array[i].yscale * (0.1 * (i + 3));
efacts_mc._visible = true;
i++;
}
}
var _loc1 = (1 + ((mcBall.vy / COURT_H) / 10));
var _loc3 = (mcBall.vx * _loc1);
var _loc2 = (mcBall.vy / 2);
var _loc4 = (mcBall.vh * _loc1);
mcBall._x = SCREEN_OX + _loc3;
mcBall._y = (SCREEN_OY + _loc2) - _loc4;
mcBall._xscale = 100 * _loc1;
mcBall._yscale = 100 * _loc1;
if (ballefact) {
var efact_object = new Object();
efact_object.x = mcBall._x;
efact_object.y = mcBall._y;
efact_object.xscale = mcBall._xscale;
efact_object.yscale = mcBall._yscale;
efact_array.push(efact_object);
}
mcBallShadow._x = SCREEN_OX + _loc3;
mcBallShadow._y = SCREEN_OY + _loc2;
}
function check_out_serve() {
var _local1;
var _local3;
var _local2;
var _local4;
if (server == 0) {
if (serve_pos > 0) {
_local1 = -COURT_W;
_local2 = 0;
} else {
_local1 = 0;
_local2 = COURT_W;
}
_local3 = -SERVE_H;
_local4 = 0;
} else {
if (serve_pos > 0) {
_local1 = 0;
_local2 = COURT_W;
} else {
_local1 = -COURT_W;
_local2 = 0;
}
_local3 = 0;
_local4 = SERVE_H;
}
if (mcBall.vx < _local1) {
return(1);
}
if (mcBall.vx > _local2) {
return(1);
}
if (mcBall.vy < _local3) {
return(1);
}
if (mcBall.vy > _local4) {
return(1);
}
return(0);
}
function check_out() {
var _local3;
var _local1;
var _local4;
var _local2;
_local3 = -COURT_W;
_local4 = COURT_W;
if (mcBall.side == 0) {
_local1 = -COURT_H;
_local2 = 0;
} else {
_local1 = 0;
_local2 = COURT_H;
}
if (mcBall.vx < _local3) {
return(1);
}
if (mcBall.vx > _local4) {
return(1);
}
if (mcBall.vy < _local1) {
return(1);
}
if (mcBall.vy > _local2) {
return(1);
}
return(0);
}
function set_result(res) {
if (play_result > 0) {
return(undefined);
}
play_result = res;
switch (res) {
case RESULT_FAULT :
fault_cnt++;
if (fault_cnt == 1) {
_parent.mcMes.mes_txt = _root.language_Fault[_root.localization_language_nr];
} else {
_parent.mcMes.mes_txt = _root.language_DoubleF[_root.localization_language_nr];
play_winner = ((server == 0) ? 1 : 0);
}
_parent.mcMes.gotoAndStop("mes");
break;
case RESULT_OUT :
_parent.mcMes.mes_txt = _root.language_Out[_root.localization_language_nr];
sndOut.start();
play_winner = ((mcBall.side == 0) ? 1 : 0);
_parent.mcMes.gotoAndStop("mes");
break;
case RESULT_MISS :
if (_parent.match_mode == 1) {
sndApp.start();
}
play_winner = mcBall.side;
start_score();
break;
case RESULT_VOLLEY :
play_winner = server;
start_score();
}
}
function start_score() {
if (mcPlayer0.power < 100) {
_parent.power1_mc.pressTipZ_mc._visible = false;
_parent.power1_mc.pressTipY_mc._visible = false;
}
if (mcPlayer1.power < 100) {
_parent.power2_mc.pressTip_mc._visible = false;
}
if (play_winner < 0) {
init_play();
return(undefined);
}
point[play_winner]++;
if (point[play_winner] > 3) {
if (point[0] == point[1]) {
_parent.score_txt = "DEUCE";
_parent.mcMes.mes_txt = _parent.score_txt;
_parent.mcMes.gotoAndStop("score");
} else if (Math.abs(point[0] - point[1]) <= 1) {
_parent.score_txt = (_root.language_Adv[_root.localization_language_nr] + " ") + pname[play_winner];
_parent.mcMes.mes_txt = (_root.language_Adv[_root.localization_language_nr] + " ") + pname[play_winner];
_parent.mcMes.gotoAndStop("score");
} else {
game_winner = play_winner;
gpoint[game_winner]++;
_parent.mcMes.mes_txt = (_root.language_GWB[_root.localization_language_nr] + " ") + pname[play_winner];
if (_root.localization_language_nr == 8) {
_parent.mcMes.mes_txt = (pname[play_winner] + " ") + _root.language_GWB[_root.localization_language_nr];
}
if (_root.localization_language_nr == 15) {
_parent.mcMes.mes_txt = (pname[play_winner] + " ") + _root.language_GWB[_root.localization_language_nr];
}
_parent.mcMes.gotoAndStop("game");
if (game_winner == 0) {
sndWin.start();
} else if (_root.playermode == 12) {
sndWin.start();
}
_root.playmc_array[game_winner]._parent.stat = PS_AFTER;
_root.playmc_array[1 - game_winner]._parent.stat = PS_AFTER;
_root.playmc_array[game_winner].gotoAndStop("win");
_root.playmc_array[1 - game_winner].gotoAndStop("lose");
return(undefined);
}
} else {
var _local4 = point[server];
var _local5 = point[receiver];
var _local3 = [0, 15, 30, 40];
_parent.score_txt = (_local3[point[0]] + " - ") + _local3[point[1]];
_parent.play1fenshu = _local3[point[0]];
_parent.play2fenshu = _local3[point[1]];
_parent.mcMes.mes_txt = (_local3[point[0]] + " - ") + _local3[point[1]];
_parent.mcMes.gotoAndStop("score");
}
if (play_winner == 1) {
if (_root.playermode == 12) {
sndPoint.start();
}
_root.player_array[1].score = _root.player_array[1].score + 300;
_root.playmc_array[1].gotoAndStop("win");
_root.playmc_array[0].gotoAndStop("lose");
_root.playmc_array[1]._parent.stat = PS_AFTER;
_root.playmc_array[0]._parent.stat = PS_AFTER;
} else {
sndPoint.start();
_root.player_array[0].score = _root.player_array[0].score + 300;
_root.playmc_array[1].gotoAndStop("lose");
_root.playmc_array[0].gotoAndStop("win");
_root.playmc_array[1]._parent.stat = PS_AFTER;
_root.playmc_array[0]._parent.stat = PS_AFTER;
}
}
function after_score() {
fault_cnt = 0;
play_winner = -1;
serve_pos = ((serve_pos == 1) ? -1 : 1);
init_play();
}
function after_game_winner() {
if ((gpoint[game_winner] >= 3) && (Math.abs(gpoint[0] - gpoint[1]) > 1)) {
if (_parent.match_mode == 1) {
sndApp2.start();
}
_parent.score_txt = "";
if (gpoint[0] > gpoint[1]) {
match_winner = 0;
_root.winer = 0;
_parent.mcMes.gotoAndStop("win");
} else {
_root.winer = 1;
match_winner = 1;
if (_root.playermode != 12) {
_parent.mcMes.gotoAndPlay("lose");
} else {
_parent.mcMes.gotoAndStop("win");
}
}
} else {
junum++;
_parent.playsnum = (_root.language_Game[_root.localization_language_nr] + " ") + (gpoint[game_winner] + 1);
_parent.mcMes.gotoAndStop("inplay");
server = ((server == 0) ? 1 : 0);
receiver = ((server == 0) ? 1 : 0);
init_game();
}
}
function after_match() {
if (_parent.match_mode == 0) {
_root.gotoAndStop(1);
} else if (match_winner == 0) {
_parent.playname1 = pname[0];
_parent.playname2 = pname[1];
_parent.result_txt[_parent.kaisen] = (gpoint[0] + " - ") + gpoint[1];
_parent.play1fenshu = gpoint[0];
_parent.play2fenshu = gpoint[1];
_parent.after_match();
} else {
_root.gotoAndStop(1);
}
}
function swapPlay() {
_root.playmc_array.reverse();
}
function end_match_quit() {
_root.gotoAndStop(1);
}
function defaultefact() {
ballefact = false;
eface_array.splice(0);
var i = 0;
while (i < 6) {
eval ("efact_mc" + i)._x = efactsrc_array[i].x;
eval ("efact_mc" + i)._y = efactsrc_array[i].y;
eval ("efact_mc" + i)._visible = false;
i++;
}
}
function scrollscreen() {
if (!canscroll) {
mcy = 150;
} else if ((mcBall.vy >= -500) && (mcBall.vy <= 500)) {
mcy = 96;
} else if (mcBall.vy < -500) {
mcy = 96 - (mcBall.vy + 500);
if (mcy > 216) {
mcy = 216;
}
} else if (mcBall.vy > 500) {
mcy = 96 - (mcBall.vy - 500);
if (mcy < -33.9) {
mcy = -33.9;
}
}
this._parent.lavel_mc._y = mcy;
}
function setcontrol() {
if (_root.playermode != 12) {
key1_array = _root.key1_array.slice();
} else {
key1_array = _root.key12_array.slice();
key2_array = _root.key2_array.slice();
}
}
function onKeyDownFunc() {
var _local1 = Key.getCode();
if (((((_local1 == key1_array[4]) || (_local1 == key1_array[5])) || (_local1 == key1_array[6])) && (mcPlayer0.stat == PS_WAIT)) && (mcPlayer0.power == 100)) {
start_power(0);
}
}
function onKeyDownFunc2() {
var _local1 = Key.getCode();
if (((((_local1 == key2_array[4]) || (_local1 == key2_array[5])) || (_local1 == key2_array[6])) && (mcPlayer1.stat == PS_WAIT)) && (mcPlayer1.power == 100)) {
start_power(1);
}
}
stop();
var filter = (new flash.filters.GlowFilter(65280, 0, 0, 0, 1, 3, false, false));
var filterArray = new Array();
filterArray.push(filter);
mcPlayer0.filters = filterArray;
var filter2 = (new flash.filters.GlowFilter(65280, 0, 0, 0, 1, 3, false, false));
var filterArray2 = new Array();
filterArray2.push(filter2);
mcPlayer1.filters = filterArray2;
if (_root.soundid == 1) {
sndBound = new Sound();
sndBound.attachSound("Bound.wav");
sndHit = new Sound();
sndHit.attachSound("Hit.wav");
sndApp = new Sound();
sndApp.attachSound("app.wav");
sndApp2 = new Sound();
sndApp2.attachSound("app2.wav");
sndOut = new Sound();
sndOut.attachSound("SE_Out");
sndPoint = new Sound();
sndPoint.attachSound("SE_Point");
sndNet = new Sound();
sndNet.attachSound("SE_Net");
sndWin = new Sound();
sndWin.attachSound("SE_Win");
}
COURT_W = 160;
COURT_H = 350;
SERVE_H = 200;
SCREEN_OX = 290;
SCREEN_OY = 220;
mcNet._y = SCREEN_OY;
NET_H = 40;
TOSS_H = 50;
GRAVITY = 0.8;
PS_WAIT = 1;
PS_MOVE = 2;
PS_STROKE = 3;
PS_SERVE = 4;
PS_TOSS = 5;
PS_FREEZE = 6;
PS_AFTER = 7;
PS_POWER = 8;
ST_FORE = 1;
ST_BACK = 2;
ST_SMASH = 3;
ST_LEFTJIU = 4;
ST_RIGHTJIU = 5;
HIT_X1_FORE = -10;
HIT_X2_FORE = 60;
HIT_X1_BACK = -60;
HIT_X2_BACK = 10;
HIT_X1_SMASH = -30;
HIT_X2_SMASH = 50;
HIT_Y1 = -100;
HIT_Y2 = 60;
HIT_Z = 120;
WM_WAIT = 1;
WM_MOVE = 2;
WM_HIT = false;
RESULT_FAULT = 1;
RESULT_OUT = 2;
RESULT_MISS = 3;
RESULT_VOLLEY = 4;
pname = new Array(2);
i = 0;
while (i < 2) {
pname[i] = _parent.pname[i];
mc = eval ("mcPlayer" + i);
_root.playmc_array[i] = mc.play_mc;
mc.gotoAndStop(_root.player_array[i].id + 1);
if (_root.playermode == 11) {
if (i == 0) {
mc.forehand = 20 + (1 * _parent.player_data[i][0]);
mc.backhand = 20 + (0.5 * _parent.player_data[i][1]);
mc.serve = 30 + (3 * _parent.player_data[i][2]);
mc.footwork = 6 + (0.3 * _parent.player_data[i][3]);
mc.netplay = _parent.player_data[i][4];
mc.tech = _parent.player_data[i][5];
} else {
if (_root.mode == "esay") {
mc.forehand = 15 + (1 * _parent.player_data[i][0]);
mc.backhand = 15 + (0.5 * _parent.player_data[i][1]);
mc.serve = 20 + (0.5 * _parent.player_data[i][2]);
mc.footwork = 2 + (0.3 * _parent.player_data[i][3]);
mc.netplay = _parent.player_data[i][4];
mc.tech = _parent.player_data[i][5];
}
if (_root.mode == "normal") {
mc.forehand = 18 + (1 * _parent.player_data[i][0]);
mc.backhand = 18 + (0.5 * _parent.player_data[i][1]);
mc.serve = 25 + (0.5 * _parent.player_data[i][2]);
mc.footwork = 4 + (0.3 * _parent.player_data[i][3]);
mc.netplay = _parent.player_data[i][4];
mc.tech = _parent.player_data[i][5];
}
if (_root.mode == "hard") {
mc.forehand = 20 + (1 * _parent.player_data[i][0]);
mc.backhand = 20 + (0.5 * _parent.player_data[i][1]);
mc.serve = 30 + (3 * _parent.player_data[i][2]);
mc.footwork = 6 + (0.3 * _parent.player_data[i][3]);
mc.netplay = _parent.player_data[i][4];
mc.tech = _parent.player_data[i][5];
}
}
} else {
mc.forehand = 18 + (1 * _parent.player_data[i][0]);
mc.backhand = 18 + (0.5 * _parent.player_data[i][1]);
mc.serve = 25 + (0.5 * _parent.player_data[i][2]);
mc.footwork = 3 + (0.3 * _parent.player_data[i][3]);
mc.netplay = _parent.player_data[i][4];
mc.tech = _parent.player_data[i][5];
}
mc.power = 0;
i++;
}
var srcpower;
var srcpower2;
ballefact = false;
var efact_array = new Array();
var efactsrc_array = new Array();
var i = 0;
while (i < 6) {
efactsrc_array[i] = new Object();
efactsrc_array[i].x = eval ("efact_mc" + i)._x;
efactsrc_array[i].y = eval ("efact_mc" + i)._y;
i++;
}
server = 0;
receiver = 1;
gpoint = [0, 0];
junum = 1;
addpower = false;
startpresstime = 0;
endpresstime = 0;
powertype = 0;
powertype2 = 0;
var key1_array = new Array();
var key2_array = new Array();
var canscroll = true;
setcontrol();
init_game();
onEnterFrame = function () {
if (_root.firstStart) {
user_action();
if (_root.playermode == 12) {
user_action2();
} else {
move_enemy();
}
move_ball();
scrollscreen();
}
};
Symbol 3037 MovieClip Frame 2
function init_hit() {
var i = 0;
while (i < 10) {
eval ("hitmc" + i).canhit = true;
i++;
}
}
function init_game() {
serve_pos = 1;
play_winner = -1;
fault_cnt = 0;
point = [0, 0];
_parent.score_txt = " 0 - 0 ";
_parent.play1fenshu = 0;
_parent.play2fenshu = 0;
init_play();
}
function init_play() {
rally_cnt = 0;
play_result = 0;
_parent.mcMes.gotoAndStop("inplay");
var _local4 = 0;
while (_local4 < 2) {
var _local3 = _root.playmc_array[_local4]._parent;
var _local5 = _local3.filters[0];
_local5.alpha = 0;
_local5.blurX = 0;
_local5.blurY = 0;
_local3.filters = new Array(_local5);
_local3.vy = COURT_H + 20;
if (_local4 == 1) {
_local3.vy = _local3.vy * -1;
}
if (server == _local4) {
_local3.vx = serve_pos * 20;
start_serve(_local4);
} else {
_local3.vx = ((serve_pos * (-COURT_W)) * 2) / 3;
_local3.stat = PS_WAIT;
_local3.play_mc.gotoAndStop("wait");
_local3.wm = WM_WAIT;
}
if (server == 1) {
canscroll = false;
_local3.vx = _local3.vx * -1;
}
player_position(_local4);
_local3.net_flg = 0;
_local4++;
}
init_ball();
init_hit();
debug_txt = "";
var _local7 = new Object();
_local7.onKeyDown = onKeyDownFunc;
Key.addListener(_local7);
if (_root.playermode == 12) {
var _local6 = new Object();
_local6.onKeyDown = onKeyDownFunc2;
Key.addListener(_local6);
}
}
function user_action() {
mc = _root.playmc_array[0]._parent;
switch (mc.stat) {
case PS_SERVE :
check_pad();
if ((pad_trig || (pad_trig1)) || (pad_trig2)) {
start_toss(0);
}
if (pad_hori == 0) {
move_cnt = 0;
} else {
var _local4 = mc.footwork;
mc.vx = mc.vx + (pad_hori * _local4);
if (serve_pos == 1) {
if (mc.vx <= 20) {
mc.vx = 20;
}
if (mc.vx >= 200) {
mc.vx = 200;
}
} else {
if (mc.vx >= -20) {
mc.vx = -20;
}
if (mc.vx <= -200) {
mc.vx = -200;
}
}
player_position(0);
if (pad_hori < 0) {
mc.play_mc.gotoAndStop("serveleft");
} else {
mc.play_mc.gotoAndStop("serveright");
}
}
break;
case PS_TOSS :
check_pad();
mc.cnt++;
if (mc.cnt > 8) {
if (pad_trig) {
start_stroke_user(0);
powertype = 0;
}
if (pad_trig1) {
start_stroke_user(0);
powertype = 1;
}
if (pad_trig2) {
start_stroke_user(0);
powertype = 2;
}
}
if (mc.cnt == 7) {
start_toss_ball(0);
}
break;
case PS_POWER :
check_pad();
mc.play_mc.gotoAndStop("power");
mcPlayer0.power = 0;
var _local3 = mcPlayer0.filters[0];
_local3.alpha = 1;
_local3.color = 16711680 /* 0xFF0000 */;
_local3.blurX = 20;
_local3.blurY = 20;
mcPlayer0.filters = new Array(_local3);
powertype = 7;
_parent.power1_mc.pressTipZ_mc._visible = false;
_parent.power1_mc.pressTipY_mc._visible = false;
if (pad_up) {
start_stroke_user(0);
_local3 = mcPlayer0.filters[0];
_local3.alpha = 0;
_local3.blurX = 0;
_local3.blurY = 0;
mcPlayer0.filters = new Array(_local3);
}
break;
case PS_STROKE :
mc.cnt++;
if (mc.cnt == 3) {
if (check_hit(0)) {
set_ball_dest_user(powertype);
powertype = 0;
if (Math.floor(mc.power) < 100) {
mc.power = mc.power + 5;
}
if (Math.floor(mc.power) >= 100) {
mc.power = 100;
}
_root.player_array[0].score = _root.player_array[0].score + 10;
if (_root.playermode != 12) {
if (_root.playmc_array[1]._parent.stat == PS_WAIT) {
mcPlayer1.stat = PS_FREEZE;
mcPlayer1.cnt = 0;
mcPlayer1.gotoAndStop("wait");
_root.playmc_array[1]._parent.stat = PS_FREEZE;
_root.playmc_array[1]._parent.cnt = 0;
_root.playmc_array[1].gotoAndStop("wait");
}
}
} else {
check_hitman(0);
}
}
break;
case PS_WAIT :
mc.cnt++;
check_pad();
if ((pad_vart == 0) && (pad_hori == 0)) {
mc.play_mc.gotoAndStop("wait");
move_cnt = 0;
} else {
var _local4 = mc.footwork;
mc.vx = mc.vx + (pad_hori * _local4);
mc.vy = mc.vy + (pad_vart * _local4);
if (mc.vx > 230) {
mc.vx = 230;
}
if (mc.vx < -270) {
mc.vx = -270;
}
if (mc.vy > 520) {
mc.vy = 520;
}
if (mc.vy < -20) {
mc.vy = -20;
}
if ((mc.vy < 120) && (mc.vx < -220)) {
mc.vx = -220;
}
player_position(0);
if (pad_hori < 0) {
mc.play_mc.gotoAndStop("left");
} else {
mc.play_mc.gotoAndStop("right");
}
}
if (mc.power == 100) {
} else {
if (pad_trig) {
start_stroke_user(0);
powertype = 0;
}
if (pad_trig1) {
start_stroke_user(0);
powertype = 1;
}
if (!pad_trig2) {
break;
}
start_stroke_user(0);
powertype = 2;
}
}
}
function user_action2() {
mc = _root.playmc_array[1]._parent;
switch (mc.stat) {
case PS_SERVE :
check_pad2();
if ((pad_trig2 || (pad_trig21)) || (pad_trig22)) {
start_toss(1);
}
if (pad_hori2 == 0) {
move_cnt = 0;
} else {
var _local5 = mc.footwork;
mc.vx = mc.vx + (pad_hori2 * _local5);
if (serve_pos == -1) {
if (mc.vx <= 20) {
mc.vx = 20;
}
if (mc.vx >= 200) {
mc.vx = 200;
}
} else {
if (mc.vx >= -20) {
mc.vx = -20;
}
if (mc.vx <= -200) {
mc.vx = -200;
}
}
player_position(1);
if (pad_hori2 < 0) {
mc.play_mc.gotoAndStop("serveleft");
} else {
mc.play_mc.gotoAndStop("serveright");
}
}
break;
case PS_TOSS :
check_pad2();
mc.cnt++;
if (mc.cnt > 8) {
if (pad_trig2) {
start_stroke_user2(1);
powertype2 = 0;
}
if (pad_trig21) {
start_stroke_user2(1);
powertype2 = 1;
}
if (pad_trig22) {
start_stroke_user2(1);
powertype2 = 2;
}
var _local6 = new mx.transitions.Tween(this._parent.lavel_mc, "_y", mx.transitions.easing.None.easeOut, 150, 96, 2, true);
_local6.onMotionFinished = function () {
canscroll = true;
};
}
if (mc.cnt == 7) {
start_toss_ball(1);
}
break;
case PS_POWER :
check_pad2();
mc.cnt++;
mc.play_mc.gotoAndStop("power");
mcPlayer1.power = 0;
var _local4 = mcPlayer1.filters[0];
_local4.alpha = 1;
_local4.color = 16711680 /* 0xFF0000 */;
_local4.blurX = 20;
_local4.blurY = 20;
mcPlayer1.filters = new Array(_local4);
powertype2 = 7;
_parent.power2_mc.pressTip_mc._visible = false;
if (pad_up2) {
start_stroke_user2(1);
_local4 = mcPlayer1.filters[0];
_local4.alpha = 0;
_local4.blurX = 0;
_local4.blurY = 0;
mcPlayer1.filters = new Array(_local4);
}
break;
case PS_STROKE :
mc.cnt++;
if (mc.cnt == 3) {
if (check_hit(1)) {
set_ball_dest_user2(powertype2);
powertype2 = 0;
if (Math.floor(mc.power) < 100) {
mc.power = mc.power + 5;
}
if (Math.floor(mc.power) >= 100) {
mc.power = 100;
}
_root.player_array[1].score = _root.player_array[1].score + 10;
} else {
check_hitman(1);
}
}
break;
case PS_WAIT :
mc.cnt++;
check_pad2();
if ((pad_vart2 == 0) && (pad_hori2 == 0)) {
mc.play_mc.gotoAndStop("wait");
move_cnt = 0;
} else {
var _local5 = mc.footwork;
mc.vx = mc.vx + (pad_hori2 * _local5);
mc.vy = mc.vy + (pad_vart2 * _local5);
if (mc.vx > 230) {
mc.vx = 230;
}
if (mc.vx < -270) {
mc.vx = -270;
}
if (mc.vy <= -420) {
mc.vy = -420;
}
if ((mc.vy > -210) && (mc.vx < -210)) {
mc.vx = -210;
}
player_position(1);
if (pad_hori2 < 0) {
mc.play_mc.gotoAndStop("right");
} else {
mc.play_mc.gotoAndStop("left");
}
}
if (mc.power == 100) {
} else {
if (pad_trig2) {
start_stroke_user2(1);
powertype2 = 0;
}
if (pad_trig21) {
start_stroke_user2(1);
powertype2 = 1;
}
if (!pad_trig22) {
break;
}
start_stroke_user2(1);
powertype2 = 1;
}
}
}
function check_pad() {
pad_vart = 0;
pad_up = false;
if (Key.isDown(key1_array[3])) {
pad_vart = 1;
}
if (Key.isDown(key1_array[2])) {
pad_vart = -1;
}
pad_hori = 0;
if (Key.isDown(key1_array[0])) {
pad_hori = -1;
}
if (Key.isDown(key1_array[1])) {
pad_hori = 1;
}
pad_trig = Key.isDown(key1_array[4]);
pad_trig1 = Key.isDown(key1_array[5]);
pad_trig2 = Key.isDown(key1_array[6]);
if (((pad_trig == false) && (pad_trig1 == false)) && (pad_trig2 == false)) {
pad_up = true;
}
}
function check_pad2() {
pad_vart2 = 0;
pad_up2 = false;
if (Key.isDown(key2_array[3])) {
pad_vart2 = 1;
}
if (Key.isDown(key2_array[2])) {
pad_vart2 = -1;
}
pad_hori2 = 0;
if (Key.isDown(key2_array[0])) {
pad_hori2 = -1;
}
if (Key.isDown(key2_array[1])) {
pad_hori2 = 1;
}
pad_trig2 = Key.isDown(key2_array[4]);
pad_trig21 = Key.isDown(key2_array[5]);
pad_trig22 = Key.isDown(key2_array[6]);
if (((pad_trig2 == false) && (pad_trig21 == false)) && (pad_trig22 == false)) {
pad_up2 = true;
}
}
function start_power(pn) {
var _local2 = _root.playmc_array[pn]._parent;
srcpower = _local2.power;
_local2.stat = PS_POWER;
_local2.cnt = 0;
}
function start_serve(pn) {
var _local2 = _root.playmc_array[pn]._parent;
_local2.stat = PS_SERVE;
_local2.cnt = 0;
_local2.play_mc.gotoAndStop("serve");
}
function start_toss(pn) {
var _local2 = _root.playmc_array[pn]._parent;
_local2.stat = PS_TOSS;
_local2.play_mc.gotoAndStop("toss");
_local2.cnt = 0;
}
function start_stroke_user(pn) {
var _local2 = _root.playmc_array[pn]._parent;
_local2.stat = PS_STROKE;
_local2.cnt = 0;
var _local3 = mcBall.vx + (mcBall.ax * 2);
if (((mcBall.vh > 70) && (_local3 > (_local2.vx + HIT_X1_SMASH))) && (_local3 < (_local2.vx + HIT_X2_SMASH))) {
_local2.stroke_type = ST_SMASH;
_local2.hit_x1 = HIT_X1_SMASH;
_local2.hit_x2 = HIT_X2_SMASH;
_local2.play_mc.gotoAndStop("smash");
} else if ((mcBall.vx + (mcBall.ax * 3)) < _local2.vx) {
if ((Math.floor(Math.abs((mcBall.vx + (mcBall.ax * 3)) - _local2.vx)) > 60) && (mcBall.side == 1)) {
_local2.stroke_type = ST_LEFTJIU;
_local2.hit_x1 = HIT_X1_BACK;
_local2.hit_x2 = HIT_X2_BACK - 40;
mcShadow0._visible = false;
_local2.play_mc.gotoAndStop("leftjiu");
} else {
_local2.stroke_type = ST_BACK;
_local2.hit_x1 = HIT_X1_BACK;
_local2.hit_x2 = HIT_X2_BACK;
_local2.play_mc.gotoAndStop("back");
}
} else if ((Math.floor(Math.abs((mcBall.vx + (mcBall.ax * 3)) - _local2.vx)) > 60) && (mcBall.side == 1)) {
_local2.stroke_type = ST_RIGHTJIU;
_local2.hit_x1 = HIT_X1_FORE;
_local2.hit_x2 = HIT_X2_FORE + 40;
mcShadow0._visible = false;
_local2.play_mc.gotoAndStop("rightjiu");
} else {
_local2.stroke_type = ST_FORE;
_local2.hit_x1 = HIT_X1_FORE;
_local2.hit_x2 = HIT_X2_FORE;
_local2.play_mc.gotoAndStop("fore");
}
_local2.hit_y1 = HIT_Y1;
_local2.hit_y2 = HIT_Y2;
}
function start_stroke_user2(pn) {
var _local2 = _root.playmc_array[pn]._parent;
_local2.stat = PS_STROKE;
_local2.cnt = 0;
var _local3 = mcBall.vx + (mcBall.ax * 2);
if (((mcBall.vh > 70) && (_local3 > (_local2.vx + HIT_X1_SMASH))) && (_local3 < (_local2.vx + HIT_X2_SMASH))) {
_local2.stroke_type = ST_SMASH;
_local2.hit_x1 = HIT_X1_SMASH;
_local2.hit_x2 = HIT_X2_SMASH;
_local2.play_mc.gotoAndStop("smash");
} else if ((mcBall.vx + (mcBall.ax * 3)) < _local2.vx) {
if ((Math.floor(Math.abs((mcBall.vx + (mcBall.ax * 3)) - _local2.vx)) > 60) && (mcBall.side == 0)) {
_local2.stroke_type = ST_LEFTJIU;
_local2.hit_x1 = HIT_X1_BACK;
_local2.hit_x2 = HIT_X2_BACK - 40;
_local2.play_mc.gotoAndStop("leftjiu");
} else {
_local2.stroke_type = ST_BACK;
_local2.hit_x1 = HIT_X1_BACK;
_local2.hit_x2 = HIT_X2_BACK;
_local2.play_mc.gotoAndStop("back");
}
} else if ((Math.floor(Math.abs((mcBall.vx + (mcBall.ax * 3)) - _local2.vx)) > 60) && (mcBall.side == 0)) {
_local2.stroke_type = ST_RIGHTJIU;
_local2.hit_x1 = HIT_X1_FORE;
_local2.hit_x2 = HIT_X2_FORE + 40;
mcShadow1._visible = false;
_local2.play_mc.gotoAndStop("rightjiu");
} else {
_local2.stroke_type = ST_FORE;
_local2.hit_x1 = HIT_X1_FORE;
_local2.hit_x2 = HIT_X2_FORE;
mcShadow1._visible = false;
_local2.play_mc.gotoAndStop("fore");
}
_local2.hit_y1 = HIT_Y1;
_local2.hit_y2 = HIT_Y2;
}
function check_hit(pn) {
var _local2 = _root.playmc_array[pn]._parent;
var _local3 = mcBall;
if (mcBall.vx < (_local2.vx + _local2.hit_x1)) {
return(0);
}
if (mcBall.vx > (_local2.vx + _local2.hit_x2)) {
return(0);
}
if (mcBall.vy < (_local2.vy + _local2.hit_y1)) {
return(0);
}
if (mcBall.vy > (_local2.vy + _local2.hit_y2)) {
return(0);
}
if (mcBall.vh > HIT_Z) {
return(0);
}
return(1);
}
function set_ball_dest_user(type) {
if (mcBall.side == 0) {
return(undefined);
}
check_pad();
var _local3 = 1;
if (pad_hori < 0) {
_local3 = 0;
}
if (pad_hori > 0) {
_local3 = 2;
}
var _local4 = 1;
if (pad_vart < 0) {
_local4 = 0;
}
if (pad_vart > 0) {
_local4 = 2;
}
var _local2;
var _local7;
var _local6;
var _local11;
if (rally_cnt == 0) {
if (serve_pos > 0) {
_local2 = -COURT_W;
_local7 = 0;
} else {
_local2 = 0;
_local7 = COURT_W;
}
_local6 = -SERVE_H;
_local11 = (-SERVE_H) / 2;
} else {
_local2 = -COURT_W;
_local7 = COURT_W;
_local6 = -COURT_H;
_local11 = (-COURT_H) / 3;
}
var _local9 = (_local7 - _local2) / 3;
var _local10 = (_local11 - _local6) / 3;
var _local12 = (_local2 + (_local9 * _local3)) + (Math.random() * _local9);
var _local13 = (_local6 + (_local10 * _local4)) + (Math.random() * _local10);
if (type == 0) {
mc.forehand = 25 + (1 * mc._parent._parent.player_data[0][0]);
mc.backhand = 25 + (0.5 * mc._parent._parent.player_data[0][1]);
mc.serve = 30 + (3 * mc._parent._parent.player_data[0][2]);
efact = false;
}
if (type == 1) {
mc.forehand = 20 + (1 * mc._parent._parent.player_data[0][0]);
mc.backhand = 20 + (0.5 * mc._parent._parent.player_data[0][1]);
mc.serve = 25 + (3 * mc._parent._parent.player_data[0][2]);
efact = false;
}
if (type == 2) {
mc.forehand = 15 + (1 * mc._parent._parent.player_data[0][0]);
mc.backhand = 15 + (0.5 * mc._parent._parent.player_data[0][1]);
mc.serve = 20 + (3 * mc._parent._parent.player_data[0][2]);
efact = false;
}
if (type == 3) {
mc.forehand = 60 + (1 * mc._parent._parent.player_data[0][0]);
mc.backhand = 60 + (0.5 * mc._parent._parent.player_data[0][1]);
mc.serve = 60 + (3 * mc._parent._parent.player_data[0][2]);
efact = true;
}
if (type == 7) {
mc.forehand = 80 + (1 * mc._parent._parent.player_data[0][0]);
mc.backhand = 80 + (0.5 * mc._parent._parent.player_data[0][1]);
mc.serve = 80 + (3 * mc._parent._parent.player_data[0][2]);
efact = true;
}
var _local5 = mc.forehand;
if ((_root.playmc_array[0]._parent.stroke_type == ST_BACK) || (_root.playmc_array[0]._parent.stroke_type == ST_LEFTJIU)) {
_local5 = mc.backhand;
}
if (_root.playmc_array[0]._parent.stroke_type == ST_SMASH) {
_local5 = mc.serve;
}
start_move_ball(_local12, _local13, 0, _local5, efact);
}
function set_ball_dest_user2(type) {
if (mcBall.side == 1) {
return(undefined);
}
check_pad2();
var _local3 = 1;
if (pad_hori < 0) {
_local3 = 0;
}
if (pad_hori > 0) {
_local3 = 2;
}
var _local4 = 1;
if (pad_vart < 0) {
_local4 = 0;
}
if (pad_vart > 0) {
_local4 = 2;
}
var _local2;
var _local7;
var _local6;
var _local11;
if (rally_cnt == 0) {
if (serve_pos > 0) {
_local2 = -COURT_W;
_local7 = 0;
} else {
_local2 = 0;
_local7 = COURT_W;
}
_local6 = -SERVE_H;
_local11 = (-SERVE_H) / 2;
} else {
_local2 = -COURT_W;
_local7 = COURT_W;
_local6 = -COURT_H;
_local11 = (-COURT_H) / 3;
}
var _local9 = (_local7 - _local2) / 3;
var _local10 = (_local11 - _local6) / 3;
var _local12 = -1 * ((_local2 + (_local9 * _local3)) + (Math.random() * _local9));
var _local13 = -1 * ((_local6 + (_local10 * _local4)) + (Math.random() * _local10));
if (type == 0) {
mc.forehand = 25 + (1 * mc._parent._parent.player_data[1][0]);
mc.backhand = 25 + (0.5 * mc._parent._parent.player_data[1][1]);
mc.serve = 30 + (3 * mc._parent._parent.player_data[1][2]);
efact = false;
}
if (type == 1) {
mc.forehand = 20 + (1 * mc._parent._parent.player_data[1][0]);
mc.backhand = 20 + (0.5 * mc._parent._parent.player_data[1][1]);
mc.serve = 25 + (3 * mc._parent._parent.player_data[1][2]);
efact = false;
}
if (type == 2) {
mc.forehand = 15 + (1 * mc._parent._parent.player_data[1][0]);
mc.backhand = 15 + (0.5 * mc._parent._parent.player_data[1][1]);
mc.serve = 20 + (3 * mc._parent._parent.player_data[1][2]);
efact = false;
}
if (type == 3) {
mc.forehand = 60 + (1 * mc._parent._parent.player_data[1][0]);
mc.backhand = 60 + (0.5 * mc._parent._parent.player_data[1][1]);
mc.serve = 60 + (3 * mc._parent._parent.player_data[1][2]);
efact = true;
}
if (type == 7) {
mc.forehand = 80 + (1 * mc._parent._parent.player_data[1][0]);
mc.backhand = 80 + (0.5 * mc._parent._parent.player_data[1][1]);
mc.serve = 80 + (3 * mc._parent._parent.player_data[1][2]);
efact = true;
}
var _local5 = mc.forehand;
if (_root.playmc_array[1]._parent.stroke_type == ST_BACK) {
_local5 = mc.backhand;
}
if (_root.playmc_array[1]._parent.stroke_type == ST_SMASH) {
_local5 = mc.serve;
}
start_move_ball(_local12, _local13, 1, _local5, efact);
}
function start_wait(pn) {
var _local2 = _root.playmc_array[pn]._parent;
if ((_local2.stat == PS_STROKE) && (_local2.stroke_type == ST_SMASH)) {
var _local4 = -20;
if (pn == 1) {
_local4 = _local4 * -1;
}
_local2.vy = _local2.vy + _local4;
if ((pn == 0) && (_local2.vy < 0)) {
_local2.vy = 0;
}
if ((pn == 1) && (_local2.vy > 0)) {
_local2.vy = 0;
}
player_position(pn);
}
if ((_local2.stat == PS_STROKE) && (_local2.stroke_type == ST_LEFTJIU)) {
_local2.vx = _local2.vx - 80;
player_position(pn);
}
if ((_local2.stat == PS_STROKE) && (_local2.stroke_type == ST_RIGHTJIU)) {
_local2.vx = _local2.vx + 80;
player_position(pn);
}
_local2.stat = PS_WAIT;
_local2.play_mc.gotoAndStop("wait");
if ((pn == 1) && (mcBall.vy < _local2.vy)) {
_local2.stat = PS_AFTER;
_local2.play_mc.gotoAndStop("lose");
}
if (_local2.net_flg == 0) {
if (_local2.netplay > (Math.random() * 20)) {
_local2.net_flg = 1;
}
}
_local2.wm = WM_MOVE;
_local2.dest_x = 0;
_local2.dest_y = -COURT_H;
if (_local2.net_flg) {
_local2.dest_x = mcBall.dx / 3;
_local2.dest_y = -150;
}
}
function move_enemy() {
var _local3 = _root.playmc_array[1]._parent;
switch (_local3.stat) {
case PS_SERVE :
_local3.cnt++;
_local3.powertype2 = 0;
var _local7 = _local3.filters[0];
_local7.alpha = 0;
_local7.blurX = 0;
_local7.blurY = 0;
_local3.filters = new Array(_local7);
if (_local3.cnt > 10) {
start_toss(1);
}
break;
case PS_TOSS :
_local3.cnt++;
if (_local3.cnt == 7) {
start_toss_ball(1);
var _local9 = new mx.transitions.Tween(this._parent.lavel_mc, "_y", mx.transitions.easing.None.easeOut, 150, 96, 2, true);
_local9.onMotionFinished = function () {
canscroll = true;
};
}
if (_local3.cnt > 22) {
start_stroke_com(1);
}
break;
case PS_WAIT :
_local3.powertype2 = 0;
if (!_local3.ispower) {
_local7 = _local3.filters[0];
_local7.alpha = 0;
_local7.blurX = 0;
_local7.blurY = 0;
_local3.filters = new Array(_local7);
}
if (_local3.wm == WM_MOVE) {
var _local6 = _local3.footwork;
var _local8 = 0;
var _local4 = 0;
if (_local3.vy < (_local3.dest_y - 10)) {
_local3.vy = _local3.vy + _local6;
} else if (_local3.vy > (_local3.dest_y + 10)) {
_local3.vy = _local3.vy - _local6;
} else {
_local8++;
}
if (_local8 == 0) {
if (_local3.vx > 0) {
_local4 = 1;
} else {
_local4 = -1;
}
}
if (_local3.vx < (_local3.dest_x - 10)) {
_local3.vx = _local3.vx + _local6;
_local3.play_mc.gotoAndStop("left");
_local4 = -1;
} else if (_local3.vx > (_local3.dest_x + 10)) {
_local3.vx = _local3.vx - _local6;
_local3.play_mc.gotoAndStop("right");
_local4 = 1;
} else {
_local8++;
}
if (_local8 == 2) {
if (((_local3.power == 100) && ((_local3.ispower == false) || (_local3.ispower == undefined))) && (mcBall.vy < 0)) {
_local3.ispower = true;
}
if (_local3.ispower) {
_local3.play_mc.gotoAndStop("power");
if (_root.mode == "easy") {
_local3.powertype2 = 3;
var _local5 = _local3.filters[0];
_local5.alpha = 1;
_local5.color = 65280;
_local5.blurX = 20;
_local5.blurY = 20;
_local3.filters = new Array(_local5);
} else {
_local3.powertype2 = 7;
var _local5 = _local3.filters[0];
_local5.alpha = 1;
_local5.color = 16711680 /* 0xFF0000 */;
_local5.blurX = 20;
_local5.blurY = 20;
_local3.filters = new Array(_local5);
}
} else {
_local3.wm = WM_WAIT;
_local3.play_mc.gotoAndStop("wait");
}
} else {
if (_local4 < 0) {
_local3.play_mc.gotoAndStop("left");
}
if (_local4 > 0) {
_local3.play_mc.gotoAndStop("right");
}
}
player_position(1);
}
if ((mcBall.vy + (mcBall.ay * 4)) < _local3.vy) {
if (Math.abs((mcBall.vx + (mcBall.ax * 4)) - _local3.vx) < 60) {
start_stroke_com(1);
_local3.ispower = false;
_local7 = _local3.filters[0];
_local7.alpha = 0;
_local7.blurX = 0;
_local7.blurY = 0;
_local3.filters = new Array(_local7);
}
}
break;
case PS_STROKE :
_local3.cnt++;
if (_local3.cnt == 3) {
if (check_hit(1)) {
set_ball_dest_com();
if (_local3.power < 100) {
_local3.power = _local3.power + 5;
}
if (_local3.power >= 100) {
_local3.power = 100;
}
} else {
check_hitman(1);
}
}
_local7 = _local3.filters[0];
_local7.alpha = 0;
_local7.blurX = 0;
_local7.blurY = 0;
_local3.filters = new Array(_local7);
if (_local3.powertype2 == 3) {
_local3.power = 50;
}
if (_local3.powertype2 == 7) {
_local3.power = 0;
}
break;
case PS_FREEZE :
_local3.cnt++;
_local7 = _local3.filters[0];
_local7.alpha = 0;
_local7.blurX = 0;
_local7.blurY = 0;
_local3.filters = new Array(_local7);
if (_local3.cnt > 10) {
if (_local3.vy > mcBall.dy) {
_local3.dest_x = ((mcBall.ax / mcBall.ay) * (_local3.vy - mcBall.vy)) + mcBall.vx;
_local3.dest_y = _local3.vy;
} else {
_local3.dest_x = mcBall.dx + (mcBall.ax * 5);
_local3.dest_y = mcBall.dy + (mcBall.ay * 5);
}
_local3.stat = PS_WAIT;
_local3.wm = WM_MOVE;
}
break;
}
}
function start_stroke_com(pn) {
var _local2 = _root.playmc_array[pn]._parent;
_local2.stat = PS_STROKE;
_local2.cnt = 0;
var _local3 = mcBall.vx + (mcBall.ax * 2);
if (((mcBall.vh > 70) && (_local3 > (_local2.vx - HIT_X2_SMASH))) && (_local3 < (_local2.vx - HIT_X1_SMASH))) {
_local2.stroke_type = ST_SMASH;
_local2.hit_x1 = -HIT_X2_SMASH;
_local2.hit_x2 = -HIT_X1_SMASH;
_local2.play_mc.gotoAndStop("smash");
} else if ((mcBall.vx + (mcBall.ax * 3)) > _local2.vx) {
if (Math.floor(Math.abs((mcBall.vx + (mcBall.ax * 3)) - _local2.vx)) > 60) {
_local2.stroke_type = ST_RIGHTJIU;
_local2.hit_x1 = -HIT_X2_BACK;
_local2.hit_x2 = -HIT_X1_BACK;
_local2.play_mc.gotoAndStop("rightjiu");
} else {
_local2.stroke_type = ST_BACK;
_local2.hit_x1 = -HIT_X2_BACK;
_local2.hit_x2 = -HIT_X1_BACK;
_local2.play_mc.gotoAndStop("back");
}
} else if (Math.floor(Math.abs((mcBall.vx + (mcBall.ax * 3)) - _local2.vx)) > 60) {
_local2.stroke_type = ST_LEFTJIU;
_local2.hit_x1 = -HIT_X2_FORE;
_local2.hit_x2 = -HIT_X1_FORE;
mcShadow1._visible = false;
_local2.play_mc.gotoAndStop("leftjiu");
} else {
_local2.stroke_type = ST_FORE;
_local2.hit_x1 = -HIT_X2_FORE;
_local2.hit_x2 = -HIT_X1_FORE;
mcShadow1._visible = false;
_local2.play_mc.gotoAndStop("fore");
}
_local2.hit_y1 = -HIT_Y2;
_local2.hit_y2 = -HIT_Y1;
}
function set_ball_dest_com() {
var _local8 = Math.floor(Math.random() * 3);
var _local10 = Math.floor(Math.random() * 3);
var _local4;
var _local5;
var _local6;
var _local9;
if (rally_cnt == 0) {
if (serve_pos > 0) {
_local4 = -COURT_W;
_local5 = 0;
} else {
_local4 = 0;
_local5 = COURT_W;
}
_local6 = -SERVE_H;
_local9 = (-SERVE_H) / 2;
} else {
if (_root.playmc_array[1]._parent.tech > (Math.random() * 10)) {
if (_root.playmc_array[0].vx < 0) {
_local8 = 0;
} else {
_local8 = 2;
}
}
if (_root.playmc_array[1]._parent.net_flg) {
_local10 = Math.floor(Math.random() * 2);
}
_local4 = -COURT_W;
_local5 = COURT_W;
_local6 = -COURT_H;
_local9 = (-COURT_H) / 3;
}
var _local12 = (_local5 - _local4) / 3;
var _local11 = (_local9 - _local6) / 3;
var _local2 = (_local4 + (_local12 * _local8)) + (Math.random() * _local12);
var _local3 = (_local6 + (_local11 * _local10)) + (Math.random() * _local11);
_local2 = _local2 * -1;
_local3 = _local3 * -1;
if (((_local2 < 0) && (_root.playmc_array[0]._parent.vx < 0)) || ((_local2 > 0) && (_root.playmc_array[0]._parent.vx > 0))) {
if ((Math.abs(Math.abs(_local2) - Math.abs(_root.playmc_array[0]._parent.vx)) > 80) && ((_root.mode == "normal") || (_root.mode == "easy"))) {
if (_local2 < 0) {
_local2 = _local2 + 80;
} else {
_local2 = _local2 - 80;
}
}
} else if (_local2 < 0) {
_local2 = _local2 + 80;
} else {
_local2 = _local2 - 80;
}
mc = _root.playmc_array[1]._parent;
var _local7 = mc.forehand;
if (_root.playmc_array[1]._parent.stroke_type == ST_BACK) {
_local7 = mc.backhand;
}
if (_root.playmc_array[1]._parent.stroke_type == ST_SMASH) {
_local7 = mc.serve;
}
if (mc.powertype2 == 3) {
start_move_ball(_local2, _local3, 1, 60, true);
}
if (mc.powertype2 == 7) {
start_move_ball(_local2, _local3, 1, 80, true);
} else {
start_move_ball(_local2, _local3, 1, _local7, false);
}
mc.powertype2 = 0;
mc.ispower = false;
}
function player_position(n) {
var mc = eval ("mcPlayer" + n);
var per = (1 + ((mc.vy / COURT_H) / 10));
var x = (mc.vx * per);
var y = (mc.vy / 2);
mc._x = SCREEN_OX + x;
mc._y = SCREEN_OY + y;
mc._xscale = 60 * per;
mc._yscale = 60 * per;
var mc2 = eval ("mcShadow" + n);
mc2._visible = true;
mc2._x = mc._x;
mc2._y = mc._y;
}
function check_hitman(pn) {
var _local2 = _root.playmc_array[pn];
if ((((Math.abs(mcBall.vx) - Math.abs(_local2._parent.vx)) <= 5) && ((Math.abs(mcBall.vy) - Math.abs(_local2._parent.vy)) <= 3)) && (mcBall.hitTest(_local2.hit_mc))) {
WM_HIT = true;
}
}
function init_ball() {
var _local2 = _root.playmc_array[server]._parent;
mcBall._y = 100;
mcBallShadow._x = 100;
mcBall.ax = 0;
mcBall.ay = 0;
mcBall.vx = _local2.vx;
mcBall.vy = _local2.vy;
mcBall.vh = 0;
mcBall.up = 0;
mcBall.down = 0;
mcBall.side = 0;
WM_HIT = false;
if (server == 0) {
mcBall.side = 1;
}
mcBall.area = 0;
if (server == 1) {
mcBall.area = 1;
}
mcBall.moving = 0;
mcBall._visible = false;
mcBallShadow._visible = false;
}
function start_toss_ball(pn) {
var _local3 = _root.playmc_array[pn]._parent;
mcBall.ax = 0;
mcBall.ay = 0;
var _local2 = 10;
if (pn == 1) {
_local2 = _local2 * -1;
}
mcBall.vx = _local3.vx + _local2;
mcBall.vy = _local3.vy;
mcBall.vh = TOSS_H;
mcBall.up = 10;
mcBall.down = 0;
mcBall.side = 0;
if (pn == 0) {
mcBall.side = 1;
}
mcBall.bound = 0;
mcBall.moving = 1;
mcBall._visible = true;
mcBallShadow._visible = true;
}
function start_move_ball(dx, dy, side, max_speed, efact) {
if ((rally_cnt == 1) && (mcBall.bound == 0)) {
set_result(RESULT_VOLLEY);
}
mcBall.side = side;
mcBall.dx = dx;
mcBall.dy = dy;
var _local2 = mcBall.dx - mcBall.vx;
var _local3 = mcBall.dy - mcBall.vy;
var _local4 = Math.sqrt((_local2 * _local2) + (_local3 * _local3));
i = 0;
while (i < 5) {
var _local1 = max_speed - (i * 4);
if (check_hit_net(_local2, _local3, _local1, _local4) == 1) {
break;
}
i++;
}
var _local5 = _local4 / _local1;
var _local7 = ((_local5 * (_local5 - 1)) * GRAVITY) / 2;
mcBall.ax = _local2 / _local5;
mcBall.ay = _local3 / _local5;
mcBall.up = (_local7 - mcBall.vh) / _local5;
mcBall.down = 0;
mcBall.bound = 0;
rally_cnt++;
sndHit.start();
ballefact = efact;
}
function check_hit_net(sx, sy, speed, dt) {
var _local6 = dt / speed;
var _local7 = ((_local6 * (_local6 - 1)) * GRAVITY) / 2;
var _local8 = sx / _local6;
var _local5 = sy / _local6;
var _local4 = (_local7 - mcBall.vh) / _local6;
var _local3 = 0;
var _local2 = mcBall.vy;
var _local1 = mcBall.vh;
while (true) {
_local1 = _local1 + (_local4 - _local3);
_local3 = _local3 + GRAVITY;
_local2 = _local2 + _local5;
if (_local1 < 0) {
return(0);
}
if ((mcBall.side == 0) && (_local2 < 0)) {
if (_local1 > (NET_H + 10)) {
return(1);
}
return(0);
}
if ((mcBall.side == 1) && (_local2 > 0)) {
if (_local1 > (NET_H + 10)) {
return(1);
}
return(0);
}
}
}
function move_ball() {
if (mcBall.moving != 1) {
return(undefined);
}
mcBall.vh = mcBall.vh + (mcBall.up - mcBall.down);
if (mcBall.vh < 0) {
mcBall.up = ((mcBall.down - mcBall.up) * 2) / 3;
if (mcBall.up < 1.3) {
mcBall.vh = 0;
mcBall.moving = 0;
defaultefact();
}
defaultefact();
mcBall.down = 0;
mcBall.vh = 0;
if (WM_HIT) {
mcBall.ax = 0;
mcBall.ay = 0;
} else {
mcBall.ax = (mcBall.ax * 3) / 5;
mcBall.ay = (mcBall.ay * 3) / 5;
}
mcBall.bound++;
mcBall.vx = mcBall.vx + mcBall.ax;
mcBall.vy = mcBall.vy + mcBall.ay;
draw_ball();
mcBound._x = mcBall._x;
mcBound._y = mcBall._y;
mcBound.gotoAndStop(2);
if (mcBall.bound == 1) {
if (rally_cnt <= 1) {
if (check_out_serve()) {
set_result(RESULT_FAULT);
}
} else if (check_out()) {
set_result(RESULT_OUT);
}
} else if (mcBall.bound == 2) {
set_result(RESULT_MISS);
}
sndBound.start();
draw_ball();
} else {
mcBall.down = mcBall.down + GRAVITY;
if (WM_HIT) {
mcBall.ax = 0;
mcBall.ay = 0;
}
mcBall.vx = mcBall.vx + mcBall.ax;
mcBall.vy = mcBall.vy + mcBall.ay;
draw_ball();
}
}
function draw_ball() {
if (ballefact) {
if (efact_array.length >= 6) {
efact_array.shift();
}
var i = 0;
while (i < efact_array.length) {
var efacts_mc = eval ("efact_mc" + i);
efacts_mc._x = efact_array[i].x;
efacts_mc._y = efact_array[i].y;
efacts_mc._xscale = efact_array[i].xscale * (0.1 * (i + 3));
efacts_mc._yscale = efact_array[i].yscale * (0.1 * (i + 3));
efacts_mc._visible = true;
i++;
}
}
var _loc1 = (1 + ((mcBall.vy / COURT_H) / 10));
var _loc3 = (mcBall.vx * _loc1);
var _loc2 = (mcBall.vy / 2);
var _loc4 = (mcBall.vh * _loc1);
mcBall._x = SCREEN_OX + _loc3;
mcBall._y = (SCREEN_OY + _loc2) - _loc4;
mcBall._xscale = 100 * _loc1;
mcBall._yscale = 100 * _loc1;
if (ballefact) {
var efact_object = new Object();
efact_object.x = mcBall._x;
efact_object.y = mcBall._y;
efact_object.xscale = mcBall._xscale;
efact_object.yscale = mcBall._yscale;
efact_array.push(efact_object);
}
mcBallShadow._x = SCREEN_OX + _loc3;
mcBallShadow._y = SCREEN_OY + _loc2;
}
function check_out_serve() {
var _local1;
var _local3;
var _local2;
var _local4;
if (server == 0) {
if (serve_pos > 0) {
_local1 = -COURT_W;
_local2 = 0;
} else {
_local1 = 0;
_local2 = COURT_W;
}
_local3 = -SERVE_H;
_local4 = 0;
} else {
if (serve_pos > 0) {
_local1 = 0;
_local2 = COURT_W;
} else {
_local1 = -COURT_W;
_local2 = 0;
}
_local3 = 0;
_local4 = SERVE_H;
}
if (mcBall.vx < _local1) {
return(1);
}
if (mcBall.vx > _local2) {
return(1);
}
if (mcBall.vy < _local3) {
return(1);
}
if (mcBall.vy > _local4) {
return(1);
}
return(0);
}
function check_out() {
var _local3;
var _local1;
var _local4;
var _local2;
_local3 = -COURT_W;
_local4 = COURT_W;
if (mcBall.side == 0) {
_local1 = -COURT_H;
_local2 = 0;
} else {
_local1 = 0;
_local2 = COURT_H;
}
if (mcBall.vx < _local3) {
return(1);
}
if (mcBall.vx > _local4) {
return(1);
}
if (mcBall.vy < _local1) {
return(1);
}
if (mcBall.vy > _local2) {
return(1);
}
return(0);
}
function set_result(res) {
if (play_result > 0) {
return(undefined);
}
play_result = res;
switch (res) {
case RESULT_FAULT :
fault_cnt++;
if (fault_cnt == 1) {
_parent.mcMes.mes_txt = _root.language_Fault[_root.localization_language_nr];
} else {
_parent.mcMes.mes_txt = "DOUBLE FAULT";
_parent.mcMes.mes_txt = _root.language_DoubleF[_root.localization_language_nr];
play_winner = ((server == 0) ? 1 : 0);
}
_parent.mcMes.gotoAndStop("mes");
break;
case RESULT_OUT :
_parent.mcMes.mes_txt = _root.language_Out[_root.localization_language_nr];
sndOut.start();
play_winner = ((mcBall.side == 0) ? 1 : 0);
_parent.mcMes.gotoAndStop("mes");
break;
case RESULT_MISS :
if (_parent.match_mode == 1) {
sndApp.start();
}
play_winner = mcBall.side;
start_score();
break;
case RESULT_VOLLEY :
play_winner = server;
start_score();
}
}
function start_score() {
if (mcPlayer0.power < 100) {
_parent.power1_mc.pressTipZ_mc._visible = false;
_parent.power1_mc.pressTipY_mc._visible = false;
}
if (mcPlayer1.power < 100) {
_parent.power2_mc.pressTip_mc._visible = false;
}
if (play_winner < 0) {
init_play();
return(undefined);
}
point[play_winner]++;
if (point[play_winner] > 3) {
if (point[0] == point[1]) {
_parent.score_txt = "DEUCE";
_parent.mcMes.mes_txt = _parent.score_txt;
_parent.mcMes.gotoAndStop("score");
} else if (Math.abs(point[0] - point[1]) <= 1) {
_parent.score_txt = (_root.language_Adv[_root.localization_language_nr] + " ") + pname[play_winner];
_parent.mcMes.mes_txt = (_root.language_Adv[_root.localization_language_nr] + " ") + pname[play_winner];
_parent.mcMes.gotoAndStop("score");
} else {
game_winner = play_winner;
gpoint[game_winner]++;
_parent.mcMes.mes_txt = (_root.language_GWB[_root.localization_language_nr] + " ") + pname[play_winner];
if (_root.localization_language_nr == 8) {
_parent.mcMes.mes_txt = (pname[play_winner] + " ") + _root.language_GWB[_root.localization_language_nr];
}
if (_root.localization_language_nr == 15) {
_parent.mcMes.mes_txt = (pname[play_winner] + " ") + _root.language_GWB[_root.localization_language_nr];
}
_parent.mcMes.gotoAndStop("game");
if (game_winner == 0) {
sndWin.start();
} else if (_root.playermode == 12) {
sndWin.start();
}
_root.playmc_array[game_winner]._parent.stat = PS_AFTER;
_root.playmc_array[1 - game_winner]._parent.stat = PS_AFTER;
_root.playmc_array[game_winner].gotoAndStop("win");
_root.playmc_array[1 - game_winner].gotoAndStop("lose");
return(undefined);
}
} else {
var _local4 = point[server];
var _local5 = point[receiver];
var _local3 = [0, 15, 30, 40];
_parent.score_txt = (_local3[point[0]] + " - ") + _local3[point[1]];
_parent.play1fenshu = _local3[point[0]];
_parent.play2fenshu = _local3[point[1]];
_parent.mcMes.mes_txt = (_local3[point[0]] + " - ") + _local3[point[1]];
_parent.mcMes.gotoAndStop("score");
}
if (play_winner == 1) {
if (_root.playermode == 12) {
sndPoint.start();
}
_root.player_array[1].score = _root.player_array[1].score + 300;
_root.playmc_array[1].gotoAndStop("win");
_root.playmc_array[0].gotoAndStop("lose");
_root.playmc_array[1]._parent.stat = PS_AFTER;
_root.playmc_array[0]._parent.stat = PS_AFTER;
} else {
sndPoint.start();
_root.player_array[0].score = _root.player_array[0].score + 300;
_root.playmc_array[1].gotoAndStop("lose");
_root.playmc_array[0].gotoAndStop("win");
_root.playmc_array[1]._parent.stat = PS_AFTER;
_root.playmc_array[0]._parent.stat = PS_AFTER;
}
}
function after_score() {
fault_cnt = 0;
play_winner = -1;
serve_pos = ((serve_pos == 1) ? -1 : 1);
init_play();
}
function after_game_winner() {
if ((gpoint[game_winner] >= 3) && (Math.abs(gpoint[0] - gpoint[1]) > 1)) {
if (_parent.match_mode == 1) {
sndApp2.start();
}
_parent.score_txt = "";
if (gpoint[0] > gpoint[1]) {
match_winner = 0;
_root.winer = 0;
_parent.mcMes.gotoAndStop("win");
} else {
_root.winer = 1;
match_winner = 1;
if (_root.playermode != 12) {
_parent.mcMes.gotoAndPlay("lose");
} else {
_parent.mcMes.gotoAndStop("win");
}
}
} else {
junum++;
_parent.playsnum = (_root.language_Game[_root.localization_language_nr] + " ") + (gpoint[game_winner] + 1);
_parent.mcMes.gotoAndStop("inplay");
server = ((server == 0) ? 1 : 0);
receiver = ((server == 0) ? 1 : 0);
init_game();
}
}
function after_match() {
if (_parent.match_mode == 0) {
_root.gotoAndStop(1);
} else if (match_winner == 0) {
_parent.playname1 = pname[0];
_parent.playname2 = pname[1];
_parent.result_txt[_parent.kaisen] = (gpoint[0] + " - ") + gpoint[1];
_parent.play1fenshu = gpoint[0];
_parent.play2fenshu = gpoint[1];
_parent.after_match();
} else {
_root.gotoAndStop(1);
}
}
function swapPlay() {
_root.playmc_array.reverse();
}
function end_match_quit() {
_root.gotoAndStop(1);
}
function defaultefact() {
ballefact = false;
eface_array.splice(0);
var i = 0;
while (i < 6) {
eval ("efact_mc" + i)._x = efactsrc_array[i].x;
eval ("efact_mc" + i)._y = efactsrc_array[i].y;
eval ("efact_mc" + i)._visible = false;
i++;
}
}
function scrollscreen() {
if (!canscroll) {
mcy = 150;
} else if ((mcBall.vy >= -500) && (mcBall.vy <= 500)) {
mcy = 96;
} else if (mcBall.vy < -500) {
mcy = 96 - (mcBall.vy + 500);
if (mcy > 216) {
mcy = 216;
}
} else if (mcBall.vy > 500) {
mcy = 96 - (mcBall.vy - 500);
if (mcy < -33.9) {
mcy = -33.9;
}
}
this._parent.lavel_mc._y = mcy;
}
function setcontrol() {
if (_root.playermode != 12) {
key1_array = _root.key1_array.slice();
} else {
key1_array = _root.key12_array.slice();
key2_array = _root.key2_array.slice();
}
}
function onKeyDownFunc() {
var _local1 = Key.getCode();
if (((((_local1 == key1_array[4]) || (_local1 == key1_array[5])) || (_local1 == key1_array[6])) && (mcPlayer0.stat == PS_WAIT)) && (mcPlayer0.power == 100)) {
start_power(0);
}
}
function onKeyDownFunc2() {
var _local1 = Key.getCode();
if (((((_local1 == key2_array[4]) || (_local1 == key2_array[5])) || (_local1 == key2_array[6])) && (mcPlayer1.stat == PS_WAIT)) && (mcPlayer1.power == 100)) {
start_power(1);
}
}
stop();
var filter = (new flash.filters.GlowFilter(65280, 0, 0, 0, 1, 3, false, false));
var filterArray = new Array();
filterArray.push(filter);
mcPlayer0.filters = filterArray;
var filter2 = (new flash.filters.GlowFilter(65280, 0, 0, 0, 1, 3, false, false));
var filterArray2 = new Array();
filterArray2.push(filter2);
mcPlayer1.filters = filterArray2;
if (_root.soundid == 1) {
sndBound = new Sound();
sndBound.attachSound("Bound.wav");
sndHit = new Sound();
sndHit.attachSound("Hit.wav");
sndApp = new Sound();
sndApp.attachSound("app.wav");
sndApp2 = new Sound();
sndApp2.attachSound("app2.wav");
sndOut = new Sound();
sndOut.attachSound("SE_Out");
sndPoint = new Sound();
sndPoint.attachSound("SE_Point");
sndNet = new Sound();
sndNet.attachSound("SE_Net");
sndWin = new Sound();
sndWin.attachSound("SE_Win");
}
COURT_W = 160;
COURT_H = 350;
SERVE_H = 200;
SCREEN_OX = 290;
SCREEN_OY = 220;
mcNet._y = SCREEN_OY;
NET_H = 40;
TOSS_H = 50;
GRAVITY = 0.8;
PS_WAIT = 1;
PS_MOVE = 2;
PS_STROKE = 3;
PS_SERVE = 4;
PS_TOSS = 5;
PS_FREEZE = 6;
PS_AFTER = 7;
PS_POWER = 8;
ST_FORE = 1;
ST_BACK = 2;
ST_SMASH = 3;
ST_LEFTJIU = 4;
ST_RIGHTJIU = 5;
HIT_X1_FORE = -10;
HIT_X2_FORE = 60;
HIT_X1_BACK = -60;
HIT_X2_BACK = 10;
HIT_X1_SMASH = -30;
HIT_X2_SMASH = 50;
HIT_Y1 = -100;
HIT_Y2 = 60;
HIT_Z = 120;
WM_WAIT = 1;
WM_MOVE = 2;
WM_HIT = false;
RESULT_FAULT = 1;
RESULT_OUT = 2;
RESULT_MISS = 3;
RESULT_VOLLEY = 4;
pname = new Array(2);
i = 0;
while (i < 2) {
pname[i] = _parent.pname[i];
mc = eval ("mcPlayer" + i);
_root.playmc_array[i] = mc.play_mc;
mc.gotoAndStop(_root.player_array[i].id + 1);
if (_root.playermode == 11) {
if (i == 0) {
mc.forehand = 20 + (1 * _parent.player_data[i][0]);
mc.backhand = 20 + (0.5 * _parent.player_data[i][1]);
mc.serve = 30 + (3 * _parent.player_data[i][2]);
mc.footwork = 6 + (0.3 * _parent.player_data[i][3]);
mc.netplay = _parent.player_data[i][4];
mc.tech = _parent.player_data[i][5];
} else {
if (_root.mode == "esay") {
mc.forehand = 15 + (1 * _parent.player_data[i][0]);
mc.backhand = 15 + (0.5 * _parent.player_data[i][1]);
mc.serve = 20 + (0.5 * _parent.player_data[i][2]);
mc.footwork = 2 + (0.3 * _parent.player_data[i][3]);
mc.netplay = _parent.player_data[i][4];
mc.tech = _parent.player_data[i][5];
}
if (_root.mode == "normal") {
mc.forehand = 18 + (1 * _parent.player_data[i][0]);
mc.backhand = 18 + (0.5 * _parent.player_data[i][1]);
mc.serve = 25 + (0.5 * _parent.player_data[i][2]);
mc.footwork = 4 + (0.3 * _parent.player_data[i][3]);
mc.netplay = _parent.player_data[i][4];
mc.tech = _parent.player_data[i][5];
}
if (_root.mode == "hard") {
mc.forehand = 20 + (1 * _parent.player_data[i][0]);
mc.backhand = 20 + (0.5 * _parent.player_data[i][1]);
mc.serve = 30 + (3 * _parent.player_data[i][2]);
mc.footwork = 6 + (0.3 * _parent.player_data[i][3]);
mc.netplay = _parent.player_data[i][4];
mc.tech = _parent.player_data[i][5];
}
}
} else {
mc.forehand = 18 + (1 * _parent.player_data[i][0]);
mc.backhand = 18 + (0.5 * _parent.player_data[i][1]);
mc.serve = 25 + (0.5 * _parent.player_data[i][2]);
mc.footwork = 3 + (0.3 * _parent.player_data[i][3]);
mc.netplay = _parent.player_data[i][4];
mc.tech = _parent.player_data[i][5];
}
mc.power = 0;
i++;
}
var srcpower;
var srcpower2;
ballefact = false;
var efact_array = new Array();
var efactsrc_array = new Array();
var i = 0;
while (i < 6) {
efactsrc_array[i] = new Object();
efactsrc_array[i].x = eval ("efact_mc" + i)._x;
efactsrc_array[i].y = eval ("efact_mc" + i)._y;
i++;
}
server = 0;
receiver = 1;
gpoint = [0, 0];
junum = 1;
addpower = false;
startpresstime = 0;
endpresstime = 0;
powertype = 0;
powertype2 = 0;
var key1_array = new Array();
var key2_array = new Array();
var canscroll = true;
setcontrol();
init_game();
onEnterFrame = function () {
if (_root.firstStart) {
user_action();
if (_root.playermode == 12) {
user_action2();
} else {
move_enemy();
}
move_ball();
scrollscreen();
}
};
Symbol 3037 MovieClip Frame 3
function init_hit() {
var i = 0;
while (i < 10) {
eval ("hitmc" + i).canhit = true;
i++;
}
}
function init_game() {
serve_pos = 1;
play_winner = -1;
fault_cnt = 0;
point = [0, 0];
_parent.score_txt = " 0 - 0 ";
_parent.play1fenshu = 0;
_parent.play2fenshu = 0;
init_play();
}
function init_play() {
rally_cnt = 0;
play_result = 0;
_parent.mcMes.gotoAndStop("inplay");
var _local4 = 0;
while (_local4 < 2) {
var _local3 = _root.playmc_array[_local4]._parent;
var _local5 = _local3.filters[0];
_local5.alpha = 0;
_local5.blurX = 0;
_local5.blurY = 0;
_local3.filters = new Array(_local5);
_local3.vy = COURT_H + 20;
if (_local4 == 1) {
_local3.vy = _local3.vy * -1;
}
if (server == _local4) {
_local3.vx = serve_pos * 20;
start_serve(_local4);
} else {
_local3.vx = ((serve_pos * (-COURT_W)) * 2) / 3;
_local3.stat = PS_WAIT;
_local3.play_mc.gotoAndStop("wait");
_local3.wm = WM_WAIT;
}
if (server == 1) {
canscroll = false;
_local3.vx = _local3.vx * -1;
}
player_position(_local4);
_local3.net_flg = 0;
_local4++;
}
init_ball();
init_hit();
debug_txt = "";
var _local7 = new Object();
_local7.onKeyDown = onKeyDownFunc;
Key.addListener(_local7);
if (_root.playermode == 12) {
var _local6 = new Object();
_local6.onKeyDown = onKeyDownFunc2;
Key.addListener(_local6);
}
}
function user_action() {
mc = _root.playmc_array[0]._parent;
switch (mc.stat) {
case PS_SERVE :
check_pad();
if ((pad_trig || (pad_trig1)) || (pad_trig2)) {
start_toss(0);
}
if (pad_hori == 0) {
move_cnt = 0;
} else {
var _local4 = mc.footwork;
mc.vx = mc.vx + (pad_hori * _local4);
if (serve_pos == 1) {
if (mc.vx <= 20) {
mc.vx = 20;
}
if (mc.vx >= 200) {
mc.vx = 200;
}
} else {
if (mc.vx >= -20) {
mc.vx = -20;
}
if (mc.vx <= -200) {
mc.vx = -200;
}
}
player_position(0);
if (pad_hori < 0) {
mc.play_mc.gotoAndStop("serveleft");
} else {
mc.play_mc.gotoAndStop("serveright");
}
}
break;
case PS_TOSS :
check_pad();
mc.cnt++;
if (mc.cnt > 8) {
if (pad_trig) {
start_stroke_user(0);
powertype = 0;
}
if (pad_trig1) {
start_stroke_user(0);
powertype = 1;
}
if (pad_trig2) {
start_stroke_user(0);
powertype = 2;
}
}
if (mc.cnt == 7) {
start_toss_ball(0);
}
break;
case PS_POWER :
check_pad();
mc.play_mc.gotoAndStop("power");
mcPlayer0.power = 0;
var _local3 = mcPlayer0.filters[0];
_local3.alpha = 1;
_local3.color = 16711680 /* 0xFF0000 */;
_local3.blurX = 20;
_local3.blurY = 20;
mcPlayer0.filters = new Array(_local3);
powertype = 7;
_parent.power1_mc.pressTipZ_mc._visible = false;
_parent.power1_mc.pressTipY_mc._visible = false;
if (pad_up) {
start_stroke_user(0);
_local3 = mcPlayer0.filters[0];
_local3.alpha = 0;
_local3.blurX = 0;
_local3.blurY = 0;
mcPlayer0.filters = new Array(_local3);
}
break;
case PS_STROKE :
mc.cnt++;
if (mc.cnt == 3) {
if (check_hit(0)) {
set_ball_dest_user(powertype);
powertype = 0;
if (Math.floor(mc.power) < 100) {
mc.power = mc.power + 5;
}
if (Math.floor(mc.power) >= 100) {
mc.power = 100;
}
_root.player_array[0].score = _root.player_array[0].score + 10;
if (_root.playermode != 12) {
if (_root.playmc_array[1]._parent.stat == PS_WAIT) {
mcPlayer1.stat = PS_FREEZE;
mcPlayer1.cnt = 0;
mcPlayer1.gotoAndStop("wait");
_root.playmc_array[1]._parent.stat = PS_FREEZE;
_root.playmc_array[1]._parent.cnt = 0;
_root.playmc_array[1].gotoAndStop("wait");
}
}
} else {
check_hitman(0);
}
}
break;
case PS_WAIT :
mc.cnt++;
check_pad();
if ((pad_vart == 0) && (pad_hori == 0)) {
mc.play_mc.gotoAndStop("wait");
move_cnt = 0;
} else {
var _local4 = mc.footwork;
mc.vx = mc.vx + (pad_hori * _local4);
mc.vy = mc.vy + (pad_vart * _local4);
if (mc.vx > 230) {
mc.vx = 230;
}
if (mc.vx < -270) {
mc.vx = -270;
}
if (mc.vy > 520) {
mc.vy = 520;
}
if (mc.vy < -20) {
mc.vy = -20;
}
player_position(0);
if (pad_hori < 0) {
mc.play_mc.gotoAndStop("left");
} else {
mc.play_mc.gotoAndStop("right");
}
}
if (mc.power == 100) {
} else {
if (pad_trig) {
start_stroke_user(0);
powertype = 0;
}
if (pad_trig1) {
start_stroke_user(0);
powertype = 1;
}
if (!pad_trig2) {
break;
}
start_stroke_user(0);
powertype = 2;
}
}
}
function user_action2() {
mc = _root.playmc_array[1]._parent;
switch (mc.stat) {
case PS_SERVE :
check_pad2();
if ((pad_trig2 || (pad_trig21)) || (pad_trig22)) {
start_toss(1);
}
if (pad_hori2 == 0) {
move_cnt = 0;
} else {
var _local5 = mc.footwork;
mc.vx = mc.vx + (pad_hori2 * _local5);
if (serve_pos == -1) {
if (mc.vx <= 20) {
mc.vx = 20;
}
if (mc.vx >= 200) {
mc.vx = 200;
}
} else {
if (mc.vx >= -20) {
mc.vx = -20;
}
if (mc.vx <= -200) {
mc.vx = -200;
}
}
player_position(1);
if (pad_hori2 < 0) {
mc.play_mc.gotoAndStop("serveleft");
} else {
mc.play_mc.gotoAndStop("serveright");
}
}
break;
case PS_TOSS :
check_pad2();
mc.cnt++;
if (mc.cnt > 8) {
if (pad_trig2) {
start_stroke_user2(1);
powertype2 = 0;
}
if (pad_trig21) {
start_stroke_user2(1);
powertype2 = 1;
}
if (pad_trig22) {
start_stroke_user2(1);
powertype2 = 2;
}
var _local6 = new mx.transitions.Tween(this._parent.lavel_mc, "_y", mx.transitions.easing.None.easeOut, 150, 96, 2, true);
_local6.onMotionFinished = function () {
canscroll = true;
};
}
if (mc.cnt == 7) {
start_toss_ball(1);
}
break;
case PS_POWER :
check_pad2();
mc.cnt++;
mc.play_mc.gotoAndStop("power");
mcPlayer1.power = 0;
var _local4 = mcPlayer1.filters[0];
_local4.alpha = 1;
_local4.color = 16711680 /* 0xFF0000 */;
_local4.blurX = 20;
_local4.blurY = 20;
mcPlayer1.filters = new Array(_local4);
powertype2 = 7;
_parent.power2_mc.pressTip_mc._visible = false;
if (pad_up2) {
start_stroke_user2(1);
_local4 = mcPlayer0.filters[0];
_local4.alpha = 0;
_local4.blurX = 0;
_local4.blurY = 0;
mcPlayer0.filters = new Array(_local4);
}
break;
case PS_STROKE :
mc.cnt++;
if (mc.cnt == 3) {
if (check_hit(1)) {
set_ball_dest_user2(powertype2);
powertype2 = 0;
if (Math.floor(mc.power) < 100) {
mc.power = mc.power + 5;
}
if (Math.floor(mc.power) >= 100) {
mc.power = 100;
}
_root.player_array[1].score = _root.player_array[1].score + 10;
} else {
check_hitman(1);
}
}
break;
case PS_WAIT :
mc.cnt++;
check_pad2();
if ((pad_vart2 == 0) && (pad_hori2 == 0)) {
mc.play_mc.gotoAndStop("wait");
move_cnt = 0;
} else {
var _local5 = mc.footwork;
mc.vx = mc.vx + (pad_hori2 * _local5);
mc.vy = mc.vy + (pad_vart2 * _local5);
if (mc.vx > 230) {
mc.vx = 230;
}
if (mc.vx < -270) {
mc.vx = -270;
}
if (mc.vy <= -420) {
mc.vy = -420;
}
player_position(1);
if (pad_hori2 < 0) {
mc.play_mc.gotoAndStop("right");
} else {
mc.play_mc.gotoAndStop("left");
}
}
if (mc.power == 100) {
} else {
if (pad_trig2) {
start_stroke_user2(1);
powertype2 = 0;
}
if (pad_trig21) {
start_stroke_user2(1);
powertype2 = 1;
}
if (!pad_trig22) {
break;
}
start_stroke_user2(1);
powertype2 = 1;
}
}
}
function check_pad() {
pad_vart = 0;
pad_up = false;
if (Key.isDown(key1_array[3])) {
pad_vart = 1;
}
if (Key.isDown(key1_array[2])) {
pad_vart = -1;
}
pad_hori = 0;
if (Key.isDown(key1_array[0])) {
pad_hori = -1;
}
if (Key.isDown(key1_array[1])) {
pad_hori = 1;
}
pad_trig = Key.isDown(key1_array[4]);
pad_trig1 = Key.isDown(key1_array[5]);
pad_trig2 = Key.isDown(key1_array[6]);
if (((pad_trig == false) && (pad_trig1 == false)) && (pad_trig2 == false)) {
pad_up = true;
}
}
function check_pad2() {
pad_vart2 = 0;
pad_up2 = false;
if (Key.isDown(key2_array[3])) {
pad_vart2 = 1;
}
if (Key.isDown(key2_array[2])) {
pad_vart2 = -1;
}
pad_hori2 = 0;
if (Key.isDown(key2_array[0])) {
pad_hori2 = -1;
}
if (Key.isDown(key2_array[1])) {
pad_hori2 = 1;
}
pad_trig2 = Key.isDown(key2_array[4]);
pad_trig21 = Key.isDown(key2_array[5]);
pad_trig22 = Key.isDown(key2_array[6]);
if (((pad_trig2 == false) && (pad_trig21 == false)) && (pad_trig22 == false)) {
pad_up2 = true;
}
}
function start_power(pn) {
var _local2 = _root.playmc_array[pn]._parent;
srcpower = _local2.power;
_local2.stat = PS_POWER;
_local2.cnt = 0;
}
function start_serve(pn) {
var _local2 = _root.playmc_array[pn]._parent;
_local2.stat = PS_SERVE;
_local2.cnt = 0;
_local2.play_mc.gotoAndStop("serve");
}
function start_toss(pn) {
var _local2 = _root.playmc_array[pn]._parent;
_local2.stat = PS_TOSS;
_local2.play_mc.gotoAndStop("toss");
_local2.cnt = 0;
}
function start_stroke_user(pn) {
var _local2 = _root.playmc_array[pn]._parent;
_local2.stat = PS_STROKE;
_local2.cnt = 0;
var _local3 = mcBall.vx + (mcBall.ax * 2);
if (((mcBall.vh > 70) && (_local3 > (_local2.vx + HIT_X1_SMASH))) && (_local3 < (_local2.vx + HIT_X2_SMASH))) {
_local2.stroke_type = ST_SMASH;
_local2.hit_x1 = HIT_X1_SMASH;
_local2.hit_x2 = HIT_X2_SMASH;
_local2.play_mc.gotoAndStop("smash");
} else if ((mcBall.vx + (mcBall.ax * 3)) < _local2.vx) {
if ((Math.floor(Math.abs((mcBall.vx + (mcBall.ax * 3)) - _local2.vx)) > 60) && (mcBall.side == 1)) {
_local2.stroke_type = ST_LEFTJIU;
_local2.hit_x1 = HIT_X1_BACK;
_local2.hit_x2 = HIT_X2_BACK - 40;
mcShadow0._visible = false;
_local2.play_mc.gotoAndStop("leftjiu");
} else {
_local2.stroke_type = ST_BACK;
_local2.hit_x1 = HIT_X1_BACK;
_local2.hit_x2 = HIT_X2_BACK;
_local2.play_mc.gotoAndStop("back");
}
} else if ((Math.floor(Math.abs((mcBall.vx + (mcBall.ax * 3)) - _local2.vx)) > 60) && (mcBall.side == 1)) {
_local2.stroke_type = ST_RIGHTJIU;
_local2.hit_x1 = HIT_X1_FORE;
_local2.hit_x2 = HIT_X2_FORE + 40;
mcShadow0._visible = false;
_local2.play_mc.gotoAndStop("rightjiu");
} else {
_local2.stroke_type = ST_FORE;
_local2.hit_x1 = HIT_X1_FORE;
_local2.hit_x2 = HIT_X2_FORE;
_local2.play_mc.gotoAndStop("fore");
}
_local2.hit_y1 = HIT_Y1;
_local2.hit_y2 = HIT_Y2;
}
function start_stroke_user2(pn) {
var _local2 = _root.playmc_array[pn]._parent;
_local2.stat = PS_STROKE;
_local2.cnt = 0;
var _local3 = mcBall.vx + (mcBall.ax * 2);
if (((mcBall.vh > 70) && (_local3 > (_local2.vx + HIT_X1_SMASH))) && (_local3 < (_local2.vx + HIT_X2_SMASH))) {
_local2.stroke_type = ST_SMASH;
_local2.hit_x1 = HIT_X1_SMASH;
_local2.hit_x2 = HIT_X2_SMASH;
_local2.play_mc.gotoAndStop("smash");
} else if ((mcBall.vx + (mcBall.ax * 3)) < _local2.vx) {
if ((Math.floor(Math.abs((mcBall.vx + (mcBall.ax * 3)) - _local2.vx)) > 60) && (mcBall.side == 0)) {
_local2.stroke_type = ST_LEFTJIU;
_local2.hit_x1 = HIT_X1_BACK;
_local2.hit_x2 = HIT_X2_BACK - 40;
_local2.play_mc.gotoAndStop("leftjiu");
} else {
_local2.stroke_type = ST_BACK;
_local2.hit_x1 = HIT_X1_BACK;
_local2.hit_x2 = HIT_X2_BACK;
_local2.play_mc.gotoAndStop("back");
}
} else if ((Math.floor(Math.abs((mcBall.vx + (mcBall.ax * 3)) - _local2.vx)) > 60) && (mcBall.side == 0)) {
_local2.stroke_type = ST_RIGHTJIU;
_local2.hit_x1 = HIT_X1_FORE;
_local2.hit_x2 = HIT_X2_FORE + 40;
mcShadow1._visible = false;
_local2.play_mc.gotoAndStop("rightjiu");
} else {
_local2.stroke_type = ST_FORE;
_local2.hit_x1 = HIT_X1_FORE;
_local2.hit_x2 = HIT_X2_FORE;
mcShadow1._visible = false;
_local2.play_mc.gotoAndStop("fore");
}
_local2.hit_y1 = HIT_Y1;
_local2.hit_y2 = HIT_Y2;
}
function check_hit(pn) {
var _local2 = _root.playmc_array[pn]._parent;
var _local3 = mcBall;
if (mcBall.vx < (_local2.vx + _local2.hit_x1)) {
return(0);
}
if (mcBall.vx > (_local2.vx + _local2.hit_x2)) {
return(0);
}
if (mcBall.vy < (_local2.vy + _local2.hit_y1)) {
return(0);
}
if (mcBall.vy > (_local2.vy + _local2.hit_y2)) {
return(0);
}
if (mcBall.vh > HIT_Z) {
return(0);
}
return(1);
}
function set_ball_dest_user(type) {
if (mcBall.side == 0) {
return(undefined);
}
check_pad();
var _local3 = 1;
if (pad_hori < 0) {
_local3 = 0;
}
if (pad_hori > 0) {
_local3 = 2;
}
var _local4 = 1;
if (pad_vart < 0) {
_local4 = 0;
}
if (pad_vart > 0) {
_local4 = 2;
}
var _local2;
var _local7;
var _local6;
var _local11;
if (rally_cnt == 0) {
if (serve_pos > 0) {
_local2 = -COURT_W;
_local7 = 0;
} else {
_local2 = 0;
_local7 = COURT_W;
}
_local6 = -SERVE_H;
_local11 = (-SERVE_H) / 2;
} else {
_local2 = -COURT_W;
_local7 = COURT_W;
_local6 = -COURT_H;
_local11 = (-COURT_H) / 3;
}
var _local9 = (_local7 - _local2) / 3;
var _local10 = (_local11 - _local6) / 3;
var _local12 = (_local2 + (_local9 * _local3)) + (Math.random() * _local9);
var _local13 = (_local6 + (_local10 * _local4)) + (Math.random() * _local10);
if (type == 0) {
mc.forehand = 25 + (1 * mc._parent._parent.player_data[0][0]);
mc.backhand = 25 + (0.5 * mc._parent._parent.player_data[0][1]);
mc.serve = 30 + (3 * mc._parent._parent.player_data[0][2]);
efact = false;
}
if (type == 1) {
mc.forehand = 20 + (1 * mc._parent._parent.player_data[0][0]);
mc.backhand = 20 + (0.5 * mc._parent._parent.player_data[0][1]);
mc.serve = 25 + (3 * mc._parent._parent.player_data[0][2]);
efact = false;
}
if (type == 2) {
mc.forehand = 15 + (1 * mc._parent._parent.player_data[0][0]);
mc.backhand = 15 + (0.5 * mc._parent._parent.player_data[0][1]);
mc.serve = 20 + (3 * mc._parent._parent.player_data[0][2]);
efact = false;
}
if (type == 3) {
mc.forehand = 60 + (1 * mc._parent._parent.player_data[0][0]);
mc.backhand = 60 + (0.5 * mc._parent._parent.player_data[0][1]);
mc.serve = 60 + (3 * mc._parent._parent.player_data[0][2]);
efact = true;
}
if (type == 7) {
mc.forehand = 80 + (1 * mc._parent._parent.player_data[0][0]);
mc.backhand = 80 + (0.5 * mc._parent._parent.player_data[0][1]);
mc.serve = 80 + (3 * mc._parent._parent.player_data[0][2]);
efact = true;
}
var _local5 = mc.forehand;
if ((_root.playmc_array[0]._parent.stroke_type == ST_BACK) || (_root.playmc_array[0]._parent.stroke_type == ST_LEFTJIU)) {
_local5 = mc.backhand;
}
if (_root.playmc_array[0]._parent.stroke_type == ST_SMASH) {
_local5 = mc.serve;
}
start_move_ball(_local12, _local13, 0, _local5, efact);
}
function set_ball_dest_user2(type) {
if (mcBall.side == 1) {
return(undefined);
}
check_pad2();
var _local3 = 1;
if (pad_hori < 0) {
_local3 = 0;
}
if (pad_hori > 0) {
_local3 = 2;
}
var _local4 = 1;
if (pad_vart < 0) {
_local4 = 0;
}
if (pad_vart > 0) {
_local4 = 2;
}
var _local2;
var _local7;
var _local6;
var _local11;
if (rally_cnt == 0) {
if (serve_pos > 0) {
_local2 = -COURT_W;
_local7 = 0;
} else {
_local2 = 0;
_local7 = COURT_W;
}
_local6 = -SERVE_H;
_local11 = (-SERVE_H) / 2;
} else {
_local2 = -COURT_W;
_local7 = COURT_W;
_local6 = -COURT_H;
_local11 = (-COURT_H) / 3;
}
var _local9 = (_local7 - _local2) / 3;
var _local10 = (_local11 - _local6) / 3;
var _local12 = -1 * ((_local2 + (_local9 * _local3)) + (Math.random() * _local9));
var _local13 = -1 * ((_local6 + (_local10 * _local4)) + (Math.random() * _local10));
if (type == 0) {
mc.forehand = 25 + (1 * mc._parent._parent.player_data[1][0]);
mc.backhand = 25 + (0.5 * mc._parent._parent.player_data[1][1]);
mc.serve = 30 + (3 * mc._parent._parent.player_data[1][2]);
efact = false;
}
if (type == 1) {
mc.forehand = 20 + (1 * mc._parent._parent.player_data[1][0]);
mc.backhand = 20 + (0.5 * mc._parent._parent.player_data[1][1]);
mc.serve = 25 + (3 * mc._parent._parent.player_data[1][2]);
efact = false;
}
if (type == 2) {
mc.forehand = 15 + (1 * mc._parent._parent.player_data[1][0]);
mc.backhand = 15 + (0.5 * mc._parent._parent.player_data[1][1]);
mc.serve = 20 + (3 * mc._parent._parent.player_data[1][2]);
efact = false;
}
if (type == 3) {
mc.forehand = 60 + (1 * mc._parent._parent.player_data[1][0]);
mc.backhand = 60 + (0.5 * mc._parent._parent.player_data[1][1]);
mc.serve = 60 + (3 * mc._parent._parent.player_data[1][2]);
efact = true;
}
if (type == 7) {
mc.forehand = 80 + (1 * mc._parent._parent.player_data[1][0]);
mc.backhand = 80 + (0.5 * mc._parent._parent.player_data[1][1]);
mc.serve = 80 + (3 * mc._parent._parent.player_data[1][2]);
efact = true;
}
var _local5 = mc.forehand;
if (_root.playmc_array[1]._parent.stroke_type == ST_BACK) {
_local5 = mc.backhand;
}
if (_root.playmc_array[1]._parent.stroke_type == ST_SMASH) {
_local5 = mc.serve;
}
start_move_ball(_local12, _local13, 1, _local5, efact);
}
function start_wait(pn) {
var _local2 = _root.playmc_array[pn]._parent;
if ((_local2.stat == PS_STROKE) && (_local2.stroke_type == ST_SMASH)) {
var _local4 = -20;
if (pn == 1) {
_local4 = _local4 * -1;
}
_local2.vy = _local2.vy + _local4;
if ((pn == 0) && (_local2.vy < 0)) {
_local2.vy = 0;
}
if ((pn == 1) && (_local2.vy > 0)) {
_local2.vy = 0;
}
player_position(pn);
}
if ((_local2.stat == PS_STROKE) && (_local2.stroke_type == ST_LEFTJIU)) {
_local2.vx = _local2.vx - 80;
player_position(pn);
}
if ((_local2.stat == PS_STROKE) && (_local2.stroke_type == ST_RIGHTJIU)) {
_local2.vx = _local2.vx + 80;
player_position(pn);
}
_local2.stat = PS_WAIT;
_local2.play_mc.gotoAndStop("wait");
if ((pn == 1) && (mcBall.vy < _local2.vy)) {
_local2.stat = PS_AFTER;
_local2.play_mc.gotoAndStop("lose");
}
if (_local2.net_flg == 0) {
if (_local2.netplay > (Math.random() * 20)) {
_local2.net_flg = 1;
}
}
_local2.wm = WM_MOVE;
_local2.dest_x = 0;
_local2.dest_y = -COURT_H;
if (_local2.net_flg) {
_local2.dest_x = mcBall.dx / 3;
_local2.dest_y = -150;
}
}
function move_enemy() {
var _local3 = _root.playmc_array[1]._parent;
switch (_local3.stat) {
case PS_SERVE :
_local3.cnt++;
_local3.powertype2 = 0;
var _local7 = _local3.filters[0];
_local7.alpha = 0;
_local7.blurX = 0;
_local7.blurY = 0;
_local3.filters = new Array(_local7);
if (_local3.cnt > 10) {
start_toss(1);
}
break;
case PS_TOSS :
_local3.cnt++;
if (_local3.cnt == 7) {
start_toss_ball(1);
var _local9 = new mx.transitions.Tween(this._parent.lavel_mc, "_y", mx.transitions.easing.None.easeOut, 150, 96, 2, true);
_local9.onMotionFinished = function () {
canscroll = true;
};
}
if (_local3.cnt > 22) {
start_stroke_com(1);
}
break;
case PS_WAIT :
_local3.powertype2 = 0;
if (!_local3.ispower) {
_local7 = _local3.filters[0];
_local7.alpha = 0;
_local7.blurX = 0;
_local7.blurY = 0;
_local3.filters = new Array(_local7);
}
if (_local3.wm == WM_MOVE) {
var _local6 = _local3.footwork;
var _local8 = 0;
var _local4 = 0;
if (_local3.vy < (_local3.dest_y - 10)) {
_local3.vy = _local3.vy + _local6;
} else if (_local3.vy > (_local3.dest_y + 10)) {
_local3.vy = _local3.vy - _local6;
} else {
_local8++;
}
if (_local8 == 0) {
if (_local3.vx > 0) {
_local4 = 1;
} else {
_local4 = -1;
}
}
if (_local3.vx < (_local3.dest_x - 10)) {
_local3.vx = _local3.vx + _local6;
_local3.play_mc.gotoAndStop("left");
_local4 = -1;
} else if (_local3.vx > (_local3.dest_x + 10)) {
_local3.vx = _local3.vx - _local6;
_local3.play_mc.gotoAndStop("right");
_local4 = 1;
} else {
_local8++;
}
if (_local8 == 2) {
if (((_local3.power == 100) && ((_local3.ispower == false) || (_local3.ispower == undefined))) && (mcBall.vy < 0)) {
_local3.ispower = true;
}
if (_local3.ispower) {
_local3.play_mc.gotoAndStop("power");
if (_root.mode == "easy") {
_local3.powertype2 = 3;
var _local5 = _local3.filters[0];
_local5.alpha = 1;
_local5.color = 65280;
_local5.blurX = 20;
_local5.blurY = 20;
_local3.filters = new Array(_local5);
} else {
_local3.powertype2 = 7;
var _local5 = _local3.filters[0];
_local5.alpha = 1;
_local5.color = 16711680 /* 0xFF0000 */;
_local5.blurX = 20;
_local5.blurY = 20;
_local3.filters = new Array(_local5);
}
} else {
_local3.wm = WM_WAIT;
_local3.play_mc.gotoAndStop("wait");
}
} else {
if (_local4 < 0) {
_local3.play_mc.gotoAndStop("left");
}
if (_local4 > 0) {
_local3.play_mc.gotoAndStop("right");
}
}
player_position(1);
}
if ((mcBall.vy + (mcBall.ay * 4)) < _local3.vy) {
if (Math.abs((mcBall.vx + (mcBall.ax * 4)) - _local3.vx) < 60) {
start_stroke_com(1);
_local3.ispower = false;
_local7 = _local3.filters[0];
_local7.alpha = 0;
_local7.blurX = 0;
_local7.blurY = 0;
_local3.filters = new Array(_local7);
}
}
break;
case PS_STROKE :
_local3.cnt++;
if (_local3.cnt == 3) {
if (check_hit(1)) {
set_ball_dest_com();
if (_local3.power < 100) {
_local3.power = _local3.power + 5;
}
if (_local3.power >= 100) {
_local3.power = 100;
}
} else {
check_hitman(1);
}
}
_local7 = _local3.filters[0];
_local7.alpha = 0;
_local7.blurX = 0;
_local7.blurY = 0;
_local3.filters = new Array(_local7);
if (_local3.powertype2 == 3) {
_local3.power = 50;
}
if (_local3.powertype2 == 7) {
_local3.power = 0;
}
break;
case PS_FREEZE :
_local3.cnt++;
_local7 = _local3.filters[0];
_local7.alpha = 0;
_local7.blurX = 0;
_local7.blurY = 0;
_local3.filters = new Array(_local7);
if (_local3.cnt > 10) {
if (_local3.vy > mcBall.dy) {
_local3.dest_x = ((mcBall.ax / mcBall.ay) * (_local3.vy - mcBall.vy)) + mcBall.vx;
_local3.dest_y = _local3.vy;
} else {
_local3.dest_x = mcBall.dx + (mcBall.ax * 5);
_local3.dest_y = mcBall.dy + (mcBall.ay * 5);
}
_local3.stat = PS_WAIT;
_local3.wm = WM_MOVE;
}
break;
}
}
function start_stroke_com(pn) {
var _local2 = _root.playmc_array[pn]._parent;
_local2.stat = PS_STROKE;
_local2.cnt = 0;
var _local3 = mcBall.vx + (mcBall.ax * 2);
if (((mcBall.vh > 70) && (_local3 > (_local2.vx - HIT_X2_SMASH))) && (_local3 < (_local2.vx - HIT_X1_SMASH))) {
_local2.stroke_type = ST_SMASH;
_local2.hit_x1 = -HIT_X2_SMASH;
_local2.hit_x2 = -HIT_X1_SMASH;
_local2.play_mc.gotoAndStop("smash");
} else if ((mcBall.vx + (mcBall.ax * 3)) > _local2.vx) {
if (Math.floor(Math.abs((mcBall.vx + (mcBall.ax * 3)) - _local2.vx)) > 60) {
_local2.stroke_type = ST_RIGHTJIU;
_local2.hit_x1 = -HIT_X2_BACK;
_local2.hit_x2 = -HIT_X1_BACK;
_local2.play_mc.gotoAndStop("rightjiu");
} else {
_local2.stroke_type = ST_BACK;
_local2.hit_x1 = -HIT_X2_BACK;
_local2.hit_x2 = -HIT_X1_BACK;
_local2.play_mc.gotoAndStop("back");
}
} else if (Math.floor(Math.abs((mcBall.vx + (mcBall.ax * 3)) - _local2.vx)) > 60) {
_local2.stroke_type = ST_LEFTJIU;
_local2.hit_x1 = -HIT_X2_FORE;
_local2.hit_x2 = -HIT_X1_FORE;
mcShadow1._visible = false;
_local2.play_mc.gotoAndStop("leftjiu");
} else {
_local2.stroke_type = ST_FORE;
_local2.hit_x1 = -HIT_X2_FORE;
_local2.hit_x2 = -HIT_X1_FORE;
mcShadow1._visible = false;
_local2.play_mc.gotoAndStop("fore");
}
_local2.hit_y1 = -HIT_Y2;
_local2.hit_y2 = -HIT_Y1;
}
function set_ball_dest_com() {
var _local8 = Math.floor(Math.random() * 3);
var _local10 = Math.floor(Math.random() * 3);
var _local4;
var _local5;
var _local6;
var _local9;
if (rally_cnt == 0) {
if (serve_pos > 0) {
_local4 = -COURT_W;
_local5 = 0;
} else {
_local4 = 0;
_local5 = COURT_W;
}
_local6 = -SERVE_H;
_local9 = (-SERVE_H) / 2;
} else {
if (_root.playmc_array[1]._parent.tech > (Math.random() * 10)) {
if (_root.playmc_array[0].vx < 0) {
_local8 = 0;
} else {
_local8 = 2;
}
}
if (_root.playmc_array[1]._parent.net_flg) {
_local10 = Math.floor(Math.random() * 2);
}
_local4 = -COURT_W;
_local5 = COURT_W;
_local6 = -COURT_H;
_local9 = (-COURT_H) / 3;
}
var _local12 = (_local5 - _local4) / 3;
var _local11 = (_local9 - _local6) / 3;
var _local2 = (_local4 + (_local12 * _local8)) + (Math.random() * _local12);
var _local3 = (_local6 + (_local11 * _local10)) + (Math.random() * _local11);
_local2 = _local2 * -1;
_local3 = _local3 * -1;
if (((_local2 < 0) && (_root.playmc_array[0]._parent.vx < 0)) || ((_local2 > 0) && (_root.playmc_array[0]._parent.vx > 0))) {
if ((Math.abs(Math.abs(_local2) - Math.abs(_root.playmc_array[0]._parent.vx)) > 80) && ((_root.mode == "normal") || (_root.mode == "easy"))) {
if (_local2 < 0) {
_local2 = _local2 + 80;
} else {
_local2 = _local2 - 80;
}
}
} else if (_local2 < 0) {
_local2 = _local2 + 80;
} else {
_local2 = _local2 - 80;
}
mc = _root.playmc_array[1]._parent;
var _local7 = mc.forehand;
if (_root.playmc_array[1]._parent.stroke_type == ST_BACK) {
_local7 = mc.backhand;
}
if (_root.playmc_array[1]._parent.stroke_type == ST_SMASH) {
_local7 = mc.serve;
}
if (mc.powertype2 == 3) {
start_move_ball(_local2, _local3, 1, 60, true);
}
if (mc.powertype2 == 7) {
start_move_ball(_local2, _local3, 1, 80, true);
} else {
start_move_ball(_local2, _local3, 1, _local7, false);
}
mc.powertype2 = 0;
mc.ispower = false;
}
function player_position(n) {
var mc = eval ("mcPlayer" + n);
var per = (1 + ((mc.vy / COURT_H) / 10));
var x = (mc.vx * per);
var y = (mc.vy / 2);
mc._x = SCREEN_OX + x;
mc._y = SCREEN_OY + y;
mc._xscale = 60 * per;
mc._yscale = 60 * per;
var mc2 = eval ("mcShadow" + n);
mc2._visible = true;
mc2._x = mc._x;
mc2._y = mc._y;
}
function check_hitman(pn) {
var _local2 = _root.playmc_array[pn];
if ((((Math.abs(mcBall.vx) - Math.abs(_local2._parent.vx)) <= 5) && ((Math.abs(mcBall.vy) - Math.abs(_local2._parent.vy)) <= 3)) && (mcBall.hitTest(_local2.hit_mc))) {
WM_HIT = true;
}
}
function init_ball() {
var _local2 = _root.playmc_array[server]._parent;
mcBall._y = 100;
mcBallShadow._x = 100;
mcBall.ax = 0;
mcBall.ay = 0;
mcBall.vx = _local2.vx;
mcBall.vy = _local2.vy;
mcBall.vh = 0;
mcBall.up = 0;
mcBall.down = 0;
mcBall.side = 0;
WM_HIT = false;
if (server == 0) {
mcBall.side = 1;
}
mcBall.area = 0;
if (server == 1) {
mcBall.area = 1;
}
mcBall.moving = 0;
mcBall._visible = false;
mcBallShadow._visible = false;
}
function start_toss_ball(pn) {
var _local3 = _root.playmc_array[pn]._parent;
mcBall.ax = 0;
mcBall.ay = 0;
var _local2 = 10;
if (pn == 1) {
_local2 = _local2 * -1;
}
mcBall.vx = _local3.vx + _local2;
mcBall.vy = _local3.vy;
mcBall.vh = TOSS_H;
mcBall.up = 10;
mcBall.down = 0;
mcBall.side = 0;
if (pn == 0) {
mcBall.side = 1;
}
mcBall.bound = 0;
mcBall.moving = 1;
mcBall._visible = true;
mcBallShadow._visible = true;
}
function start_move_ball(dx, dy, side, max_speed, efact) {
if ((rally_cnt == 1) && (mcBall.bound == 0)) {
set_result(RESULT_VOLLEY);
}
mcBall.side = side;
mcBall.dx = dx;
mcBall.dy = dy;
var _local2 = mcBall.dx - mcBall.vx;
var _local3 = mcBall.dy - mcBall.vy;
var _local4 = Math.sqrt((_local2 * _local2) + (_local3 * _local3));
i = 0;
while (i < 5) {
var _local1 = max_speed - (i * 4);
if (check_hit_net(_local2, _local3, _local1, _local4) == 1) {
break;
}
i++;
}
var _local5 = _local4 / _local1;
var _local7 = ((_local5 * (_local5 - 1)) * GRAVITY) / 2;
mcBall.ax = _local2 / _local5;
mcBall.ay = _local3 / _local5;
mcBall.up = (_local7 - mcBall.vh) / _local5;
mcBall.down = 0;
mcBall.bound = 0;
rally_cnt++;
sndHit.start();
ballefact = efact;
}
function check_hit_net(sx, sy, speed, dt) {
var _local6 = dt / speed;
var _local7 = ((_local6 * (_local6 - 1)) * GRAVITY) / 2;
var _local8 = sx / _local6;
var _local5 = sy / _local6;
var _local4 = (_local7 - mcBall.vh) / _local6;
var _local3 = 0;
var _local2 = mcBall.vy;
var _local1 = mcBall.vh;
while (true) {
_local1 = _local1 + (_local4 - _local3);
_local3 = _local3 + GRAVITY;
_local2 = _local2 + _local5;
if (_local1 < 0) {
return(0);
}
if ((mcBall.side == 0) && (_local2 < 0)) {
if (_local1 > (NET_H + 10)) {
return(1);
}
return(0);
}
if ((mcBall.side == 1) && (_local2 > 0)) {
if (_local1 > (NET_H + 10)) {
return(1);
}
return(0);
}
}
}
function move_ball() {
if (mcBall.moving != 1) {
return(undefined);
}
mcBall.vh = mcBall.vh + (mcBall.up - mcBall.down);
if (mcBall.vh < 0) {
mcBall.up = ((mcBall.down - mcBall.up) * 2) / 3;
if (mcBall.up < 1.3) {
mcBall.vh = 0;
mcBall.moving = 0;
defaultefact();
}
defaultefact();
mcBall.down = 0;
mcBall.vh = 0;
if (WM_HIT) {
mcBall.ax = 0;
mcBall.ay = 0;
} else {
mcBall.ax = (mcBall.ax * 3) / 5;
mcBall.ay = (mcBall.ay * 3) / 5;
}
mcBall.bound++;
mcBall.vx = mcBall.vx + mcBall.ax;
mcBall.vy = mcBall.vy + mcBall.ay;
draw_ball();
mcBound._x = mcBall._x;
mcBound._y = mcBall._y;
mcBound.gotoAndStop(2);
if (mcBall.bound == 1) {
if (rally_cnt <= 1) {
if (check_out_serve()) {
set_result(RESULT_FAULT);
}
} else if (check_out()) {
set_result(RESULT_OUT);
}
} else if (mcBall.bound == 2) {
set_result(RESULT_MISS);
}
sndBound.start();
draw_ball();
} else {
mcBall.down = mcBall.down + GRAVITY;
if (WM_HIT) {
mcBall.ax = 0;
mcBall.ay = 0;
}
mcBall.vx = mcBall.vx + mcBall.ax;
mcBall.vy = mcBall.vy + mcBall.ay;
draw_ball();
}
}
function draw_ball() {
if (ballefact) {
if (efact_array.length >= 6) {
efact_array.shift();
}
var i = 0;
while (i < efact_array.length) {
var efacts_mc = eval ("efact_mc" + i);
efacts_mc._x = efact_array[i].x;
efacts_mc._y = efact_array[i].y;
efacts_mc._xscale = efact_array[i].xscale * (0.1 * (i + 3));
efacts_mc._yscale = efact_array[i].yscale * (0.1 * (i + 3));
efacts_mc._visible = true;
i++;
}
}
var _loc1 = (1 + ((mcBall.vy / COURT_H) / 10));
var _loc3 = (mcBall.vx * _loc1);
var _loc2 = (mcBall.vy / 2);
var _loc4 = (mcBall.vh * _loc1);
mcBall._x = SCREEN_OX + _loc3;
mcBall._y = (SCREEN_OY + _loc2) - _loc4;
mcBall._xscale = 100 * _loc1;
mcBall._yscale = 100 * _loc1;
if (ballefact) {
var efact_object = new Object();
efact_object.x = mcBall._x;
efact_object.y = mcBall._y;
efact_object.xscale = mcBall._xscale;
efact_object.yscale = mcBall._yscale;
efact_array.push(efact_object);
}
mcBallShadow._x = SCREEN_OX + _loc3;
mcBallShadow._y = SCREEN_OY + _loc2;
}
function check_out_serve() {
var _local1;
var _local3;
var _local2;
var _local4;
if (server == 0) {
if (serve_pos > 0) {
_local1 = -COURT_W;
_local2 = 0;
} else {
_local1 = 0;
_local2 = COURT_W;
}
_local3 = -SERVE_H;
_local4 = 0;
} else {
if (serve_pos > 0) {
_local1 = 0;
_local2 = COURT_W;
} else {
_local1 = -COURT_W;
_local2 = 0;
}
_local3 = 0;
_local4 = SERVE_H;
}
if (mcBall.vx < _local1) {
return(1);
}
if (mcBall.vx > _local2) {
return(1);
}
if (mcBall.vy < _local3) {
return(1);
}
if (mcBall.vy > _local4) {
return(1);
}
return(0);
}
function check_out() {
var _local3;
var _local1;
var _local4;
var _local2;
_local3 = -COURT_W;
_local4 = COURT_W;
if (mcBall.side == 0) {
_local1 = -COURT_H;
_local2 = 0;
} else {
_local1 = 0;
_local2 = COURT_H;
}
if (mcBall.vx < _local3) {
return(1);
}
if (mcBall.vx > _local4) {
return(1);
}
if (mcBall.vy < _local1) {
return(1);
}
if (mcBall.vy > _local2) {
return(1);
}
return(0);
}
function set_result(res) {
if (play_result > 0) {
return(undefined);
}
play_result = res;
switch (res) {
case RESULT_FAULT :
fault_cnt++;
if (fault_cnt == 1) {
_parent.mcMes.mes_txt = _root.language_Fault[_root.localization_language_nr];
} else {
_parent.mcMes.mes_txt = _root.language_DoubleF[_root.localization_language_nr];
play_winner = ((server == 0) ? 1 : 0);
}
_parent.mcMes.gotoAndStop("mes");
break;
case RESULT_OUT :
_parent.mcMes.mes_txt = _root.language_Out[_root.localization_language_nr];
sndOut.start();
play_winner = ((mcBall.side == 0) ? 1 : 0);
_parent.mcMes.gotoAndStop("mes");
break;
case RESULT_MISS :
if (_parent.match_mode == 1) {
sndApp.start();
}
play_winner = mcBall.side;
start_score();
break;
case RESULT_VOLLEY :
play_winner = server;
start_score();
}
}
function start_score() {
if (mcPlayer0.power < 100) {
_parent.power1_mc.pressTipZ_mc._visible = false;
_parent.power1_mc.pressTipY_mc._visible = false;
}
if (mcPlayer1.power < 100) {
_parent.power2_mc.pressTip_mc._visible = false;
}
if (play_winner < 0) {
init_play();
return(undefined);
}
point[play_winner]++;
if (point[play_winner] > 3) {
if (point[0] == point[1]) {
_parent.score_txt = "DEUCE";
_parent.mcMes.mes_txt = _parent.score_txt;
_parent.mcMes.gotoAndStop("score");
} else if (Math.abs(point[0] - point[1]) <= 1) {
_parent.score_txt = (_root.language_Adv[_root.localization_language_nr] + " ") + pname[play_winner];
_parent.mcMes.mes_txt = (_root.language_Adv[_root.localization_language_nr] + " ") + pname[play_winner];
_parent.mcMes.gotoAndStop("score");
} else {
game_winner = play_winner;
gpoint[game_winner]++;
_parent.mcMes.mes_txt = (_root.language_GWB[_root.localization_language_nr] + " ") + pname[play_winner];
if (_root.localization_language_nr == 8) {
_parent.mcMes.mes_txt = (pname[play_winner] + " ") + _root.language_GWB[_root.localization_language_nr];
}
if (_root.localization_language_nr == 15) {
_parent.mcMes.mes_txt = (pname[play_winner] + " ") + _root.language_GWB[_root.localization_language_nr];
}
_parent.mcMes.gotoAndStop("game");
if (game_winner == 0) {
sndWin.start();
} else if (_root.playermode == 12) {
sndWin.start();
}
_root.playmc_array[game_winner]._parent.stat = PS_AFTER;
_root.playmc_array[1 - game_winner]._parent.stat = PS_AFTER;
_root.playmc_array[game_winner].gotoAndStop("win");
_root.playmc_array[1 - game_winner].gotoAndStop("lose");
return(undefined);
}
} else {
var _local4 = point[server];
var _local5 = point[receiver];
var _local3 = [0, 15, 30, 40];
_parent.score_txt = (_local3[point[0]] + " - ") + _local3[point[1]];
_parent.play1fenshu = _local3[point[0]];
_parent.play2fenshu = _local3[point[1]];
_parent.mcMes.mes_txt = (_local3[point[0]] + " - ") + _local3[point[1]];
_parent.mcMes.gotoAndStop("score");
}
if (play_winner == 1) {
if (_root.playermode == 12) {
sndPoint.start();
}
_root.player_array[1].score = _root.player_array[1].score + 300;
_root.playmc_array[1].gotoAndStop("win");
_root.playmc_array[0].gotoAndStop("lose");
_root.playmc_array[1]._parent.stat = PS_AFTER;
_root.playmc_array[0]._parent.stat = PS_AFTER;
} else {
sndPoint.start();
_root.player_array[0].score = _root.player_array[0].score + 300;
_root.playmc_array[1].gotoAndStop("lose");
_root.playmc_array[0].gotoAndStop("win");
_root.playmc_array[1]._parent.stat = PS_AFTER;
_root.playmc_array[0]._parent.stat = PS_AFTER;
}
}
function after_score() {
fault_cnt = 0;
play_winner = -1;
serve_pos = ((serve_pos == 1) ? -1 : 1);
init_play();
}
function after_game_winner() {
if ((gpoint[game_winner] >= 3) && (Math.abs(gpoint[0] - gpoint[1]) > 1)) {
if (_parent.match_mode == 1) {
sndApp2.start();
}
_parent.score_txt = "";
if (gpoint[0] > gpoint[1]) {
match_winner = 0;
_root.winer = 0;
_parent.mcMes.gotoAndStop("win");
} else {
_root.winer = 1;
match_winner = 1;
if (_root.playermode != 12) {
_parent.mcMes.gotoAndPlay("lose");
} else {
_parent.mcMes.gotoAndStop("win");
}
}
} else {
junum++;
_parent.playsnum = (_root.language_Game[_root.localization_language_nr] + " ") + (gpoint[game_winner] + 1);
_parent.mcMes.gotoAndStop("inplay");
server = ((server == 0) ? 1 : 0);
receiver = ((server == 0) ? 1 : 0);
init_game();
}
}
function after_match() {
if (_parent.match_mode == 0) {
_root.gotoAndStop(1);
} else if (match_winner == 0) {
_parent.result_txt[_parent.kaisen] = (gpoint[0] + " - ") + gpoint[1];
_parent.play1fenshu = gpoint[0];
_parent.play2fenshu = gpoint[1];
_parent.after_match();
} else {
_root.gotoAndStop(1);
}
}
function swapPlay() {
_root.playmc_array.reverse();
}
function end_match_quit() {
_root.gotoAndStop(1);
}
function defaultefact() {
ballefact = false;
eface_array.splice(0);
var i = 0;
while (i < 6) {
eval ("efact_mc" + i)._x = efactsrc_array[i].x;
eval ("efact_mc" + i)._y = efactsrc_array[i].y;
eval ("efact_mc" + i)._visible = false;
i++;
}
}
function scrollscreen() {
if (!canscroll) {
mcy = 150;
} else if ((mcBall.vy >= -500) && (mcBall.vy <= 500)) {
mcy = 96;
} else if (mcBall.vy < -500) {
mcy = 96 - (mcBall.vy + 500);
if (mcy > 216) {
mcy = 216;
}
} else if (mcBall.vy > 500) {
mcy = 96 - (mcBall.vy - 500);
if (mcy < -33.9) {
mcy = -33.9;
}
}
this._parent.lavel_mc._y = mcy;
}
function setcontrol() {
if (_root.playermode != 12) {
key1_array = _root.key1_array.slice();
} else {
key1_array = _root.key12_array.slice();
key2_array = _root.key2_array.slice();
}
}
function onKeyDownFunc() {
var _local1 = Key.getCode();
if (((((_local1 == key1_array[4]) || (_local1 == key1_array[5])) || (_local1 == key1_array[6])) && (mcPlayer0.stat == PS_WAIT)) && (mcPlayer0.power == 100)) {
start_power(0);
}
}
function onKeyDownFunc2() {
var _local1 = Key.getCode();
if (((((_local1 == key2_array[4]) || (_local1 == key2_array[5])) || (_local1 == key2_array[6])) && (mcPlayer1.stat == PS_WAIT)) && (mcPlayer1.power == 100)) {
start_power(1);
}
}
stop();
var filter = (new flash.filters.GlowFilter(65280, 0, 0, 0, 1, 3, false, false));
var filterArray = new Array();
filterArray.push(filter);
mcPlayer0.filters = filterArray;
var filter2 = (new flash.filters.GlowFilter(65280, 0, 0, 0, 1, 3, false, false));
var filterArray2 = new Array();
filterArray2.push(filter2);
mcPlayer1.filters = filterArray2;
if (_root.soundid == 1) {
sndBound = new Sound();
sndBound.attachSound("Bound.wav");
sndHit = new Sound();
sndHit.attachSound("Hit.wav");
sndApp = new Sound();
sndApp.attachSound("app.wav");
sndApp2 = new Sound();
sndApp2.attachSound("app2.wav");
sndOut = new Sound();
sndOut.attachSound("SE_Out");
sndPoint = new Sound();
sndPoint.attachSound("SE_Point");
sndNet = new Sound();
sndNet.attachSound("SE_Net");
sndWin = new Sound();
sndWin.attachSound("SE_Win");
}
COURT_W = 160;
COURT_H = 350;
SERVE_H = 200;
SCREEN_OX = 290;
SCREEN_OY = 220;
mcNet._y = SCREEN_OY;
NET_H = 40;
TOSS_H = 50;
GRAVITY = 0.8;
PS_WAIT = 1;
PS_MOVE = 2;
PS_STROKE = 3;
PS_SERVE = 4;
PS_TOSS = 5;
PS_FREEZE = 6;
PS_AFTER = 7;
PS_POWER = 8;
ST_FORE = 1;
ST_BACK = 2;
ST_SMASH = 3;
ST_LEFTJIU = 4;
ST_RIGHTJIU = 5;
HIT_X1_FORE = -10;
HIT_X2_FORE = 60;
HIT_X1_BACK = -60;
HIT_X2_BACK = 10;
HIT_X1_SMASH = -30;
HIT_X2_SMASH = 50;
HIT_Y1 = -100;
HIT_Y2 = 60;
HIT_Z = 120;
WM_WAIT = 1;
WM_MOVE = 2;
WM_HIT = false;
RESULT_FAULT = 1;
RESULT_OUT = 2;
RESULT_MISS = 3;
RESULT_VOLLEY = 4;
pname = new Array(2);
i = 0;
while (i < 2) {
pname[i] = _parent.pname[i];
mc = eval ("mcPlayer" + i);
_root.playmc_array[i] = mc.play_mc;
mc.gotoAndStop(_root.player_array[i].id + 1);
if (_root.playermode == 11) {
if (i == 0) {
mc.forehand = 20 + (1 * _parent.player_data[i][0]);
mc.backhand = 20 + (0.5 * _parent.player_data[i][1]);
mc.serve = 30 + (3 * _parent.player_data[i][2]);
mc.footwork = 6 + (0.3 * _parent.player_data[i][3]);
mc.netplay = _parent.player_data[i][4];
mc.tech = _parent.player_data[i][5];
} else {
if (_root.mode == "esay") {
mc.forehand = 15 + (1 * _parent.player_data[i][0]);
mc.backhand = 15 + (0.5 * _parent.player_data[i][1]);
mc.serve = 20 + (0.5 * _parent.player_data[i][2]);
mc.footwork = 2 + (0.3 * _parent.player_data[i][3]);
mc.netplay = _parent.player_data[i][4];
mc.tech = _parent.player_data[i][5];
}
if (_root.mode == "normal") {
mc.forehand = 18 + (1 * _parent.player_data[i][0]);
mc.backhand = 18 + (0.5 * _parent.player_data[i][1]);
mc.serve = 25 + (0.5 * _parent.player_data[i][2]);
mc.footwork = 4 + (0.3 * _parent.player_data[i][3]);
mc.netplay = _parent.player_data[i][4];
mc.tech = _parent.player_data[i][5];
}
if (_root.mode == "hard") {
mc.forehand = 20 + (1 * _parent.player_data[i][0]);
mc.backhand = 20 + (0.5 * _parent.player_data[i][1]);
mc.serve = 30 + (3 * _parent.player_data[i][2]);
mc.footwork = 6 + (0.3 * _parent.player_data[i][3]);
mc.netplay = _parent.player_data[i][4];
mc.tech = _parent.player_data[i][5];
}
}
} else {
mc.forehand = 18 + (1 * _parent.player_data[i][0]);
mc.backhand = 18 + (0.5 * _parent.player_data[i][1]);
mc.serve = 25 + (0.5 * _parent.player_data[i][2]);
mc.footwork = 3 + (0.3 * _parent.player_data[i][3]);
mc.netplay = _parent.player_data[i][4];
mc.tech = _parent.player_data[i][5];
}
mc.power = 0;
i++;
}
var srcpower;
var srcpower2;
ballefact = false;
var efact_array = new Array();
var efactsrc_array = new Array();
var i = 0;
while (i < 6) {
efactsrc_array[i] = new Object();
efactsrc_array[i].x = eval ("efact_mc" + i)._x;
efactsrc_array[i].y = eval ("efact_mc" + i)._y;
i++;
}
server = 0;
receiver = 1;
gpoint = [0, 0];
junum = 1;
addpower = false;
startpresstime = 0;
endpresstime = 0;
powertype = 0;
powertype2 = 0;
var key1_array = new Array();
var key2_array = new Array();
var canscroll = true;
setcontrol();
init_game();
onEnterFrame = function () {
if (_root.firstStart) {
user_action();
if (_root.playermode == 12) {
user_action2();
} else {
move_enemy();
}
move_ball();
scrollscreen();
}
};
Symbol 3045 MovieClip Frame 1
stop();
power_light._visible = false;
pressTip_mc._visible = false;
Symbol 3071 MovieClip Frame 1
gotoAndStop(_root.localization_language_nr);
Symbol 3082 MovieClip Frame 1
gotoAndStop(_root.localization_language_nr);
Symbol 3097 MovieClip Frame 1
gotoAndStop(_root.localization_language_nr);
Symbol 3098 MovieClip Frame 1
pname0 = _root.main_mc.lavel_mc.pname[0];
pname1 = _root.main_mc.lavel_mc.pname[1];
gpoint0 = _root.main_mc.lavel_mc.gpoint[0];
gpoint1 = _root.main_mc.lavel_mc.gpoint[1];
Symbol 3098 MovieClip Frame 30
stop();
var thismc = this;
var myListener = new Object();
myListener.onKeyDown = function () {
Key.removeListener(myListener);
gotoAndStop (1);
thismc._parent.after_space();
};
Key.addListener(myListener);
Symbol 3101 MovieClip Frame 30
stop();
var myListener = new Object();
myListener.onKeyDown = function () {
var _local2 = Key.removeListener(myListener);
gotoAndStop (1);
_root.main_mc.after_match();
};
Key.addListener(myListener);
Symbol 3103 MovieClip Frame 2
stop();
Symbol 3103 MovieClip Frame 8
stop();
cnt = 0;
onEnterFrame = function () {
cnt++;
if (cnt < 30) {
return(undefined);
}
delete onEnterFrame;
_parent.lavel_mc.start_score();
};
Symbol 3103 MovieClip Frame 13
stop();
cnt = 0;
onEnterFrame = function () {
cnt++;
if (cnt < 80) {
return(undefined);
}
delete onEnterFrame;
gotoAndStop ("inplay");
_parent.lavel_mc.after_score();
};
Symbol 3103 MovieClip Frame 19
function after_space() {
_root.main_mc.lavel_mc.after_game_winner();
}
stop();
Symbol 3103 MovieClip Frame 25
stop();
_root.firstStart = false;
if (_root.playermode != 12) {
winner_txt = _root.language_YW[_root.localization_language_nr];
} else {
winner_txt = (_root.player_array[_root.winer].playname + " ") + _root.language_YW[_root.localization_language_nr];
}
Symbol 3103 MovieClip Frame 30
function after_space() {
_parent.lavel_mc.after_match();
}
stop();
Symbol 3106 Button
on (press) {
if (_root.localization_language_nr == 2) {
var time = new Date().getTime();
b = _root.SortT();
a = _root.hex_average(((String(_global.gameID) + _root.player_array[0].score) + b) + time);
_root.DrawLine(a, b, 10, 10, 15, 15);
c = _global.strqq;
_root.senturl(_root.player_array[0].score, b, c, time);
_root.gotoAndStop("init");
} else {
submitscore();
}
}
Symbol 3107 MovieClip Frame 7
if (_root.playermode == 21) {
_root.player_array[0].score = _root.player_array[0].score + 2000;
} else {
_root.player_array[0].score = _root.player_array[0].score + 400;
}
winscore.text = _root.player_array[0].score;
if (_root._root.localization_language_nr == 2) {
winname.text = "\u73A9\u5BB6";
} else {
winname.text = _root.player_array[0].playname;
}
Symbol 3107 MovieClip Frame 30
function submitscore() {
var _local4 = SharedObject.getLocal("userHighScore");
if (_local4.data.highScore == undefined) {
_local4.data.highScore = [];
_local4.data.highScore[0] = {score:_root.player_array[0].score, name:winname.text};
} else {
done = false;
var _local3 = 0;
while (_local3 < _local4.data.highScore.length) {
if (_root.player_array[0].score >= _local4.data.highScore[_local3].score) {
_local4.data.highScore.splice(_local3, 0, {score:_root.player_array[0].score, name:winname.text});
done = true;
break;
}
_local3++;
}
if (done == false) {
_local4.data.highScore.push({score:_root.player_array[0].score, name:winname.text});
}
}
_local4.flush();
this._x = -500;
_root.createEmptyMovieClip("hh", _root.getNextHighestDepth());
_root.hh.attachMovie("highscore", "highscore", 20);
if (_root.soundid == 1) {
stopAllSounds();
_root.bg_sound.start(_root.bg_sound.position / 1000, 1);
_root.bg_sound.onSoundComplete = function () {
if (_root.soundid == 1) {
stopAllSounds();
_root.bg_sound.start(0, 999);
}
};
}
}
stop();
stopAllSounds();
if (_root.soundid == 1) {
_root.win_sound.start(0, 1);
}
Symbol 3109 MovieClip Frame 1
function tdat_shuffle(pn) {
user_player = pn;
var tmp;
if (pn > 0) {
tmp = eval ("tdat" + pn);
this["tdat" + pn] = tdat0;
tdat0 = tmp;
}
i = 1;
while (i < 16) {
r = 1 + Math.floor(Math.random() * 15);
tmp = eval ("tdat" + i);
this["tdat" + i] = eval ("tdat" + r);
this["tdat" + r] = tmp;
i++;
}
}
pname = [_root.player_array[0].playname, _root.player_array[1].playname];
player_data = [[5, 3, 6, 4, 0, 0], [4, 5, 4, 5, 5, 0]];
tdat0 = "787765" + _root.allplayer_array[0];
tdat1 = "989520" + _root.allplayer_array[1];
tdat2 = "567420" + _root.allplayer_array[2];
tdat3 = "687789" + _root.allplayer_array[3];
tdat4 = "346430" + _root.allplayer_array[4];
tdat5 = "768524" + _root.allplayer_array[5];
tdat6 = "979746" + _root.allplayer_array[6];
tdat7 = "887657" + _root.allplayer_array[7];
Symbol 3109 MovieClip Frame 2
lavel_mc.gotoAndStop("lavel" + _root.lavel);
Symbol 3109 MovieClip Frame 121
_root.gameStart = true;
_root.firstStart = true;
if (_root.lavel == 1) {
if ((_root.playermode == 11) || (_root.playermode == 12)) {
match_mode = 0;
} else {
kaisen = 0;
match_mode = 1;
result_txt = new Array();
match_name = ["1st MATCH", "2nd MATCH", "SEMI FINAL", "FINAL MATCH"];
match_txt = match_name[kaisen];
}
}
k = 0;
Symbol 3109 MovieClip Frame 122
function after_match() {
_root.lavel++;
kaisen++;
if ((_root.playermode == 11) || (_root.playermode == 12)) {
mcMes._visible = false;
_root.main_mc.gotoAndStop("ending");
} else {
_root.main_mc.gotoAndStop("tournament");
}
}
stop();
if (k == 0) {
playsnum = _root.language_Game[_root.localization_language_nr] + " 1";
playname1 = _root.player_array[0].playname;
playname2 = _root.player_array[1].playname;
_root.player_array[0].scoreNum = 0;
_root.player_array[1].scoreNum = 0;
if ((_root.lavel == 1) && (_root.playermode == 21)) {
_root.player_array[0].score = 0;
_root.player_array[1].score = 0;
} else {
_root.player_array[0].score = 0;
_root.player_array[1].score = 0;
}
onEnterFrame = function () {
play1fenshuNum = _root.player_array[0].score;
play2fenshuNum = _root.player_array[1].score;
};
power1_mc.id = 0;
power2_mc.id = 1;
power1_mc.pressTipZ_mc.press_txt = _root.key_arr[lavel_mc.key1_array[6]];
power1_mc.pressTipY_mc.press_txt = _root.key_arr[lavel_mc.key1_array[4]];
power2_mc.pressTip_mc.press_txt = _root.key_arr[lavel_mc.key2_array[4]];
var i = 1;
while (i < 3) {
this[("power" + i) + "_mc"].onEnterFrame = function () {
if (_root.playmc_array[this.id]._parent.power < 0) {
_root.playmc_array[this.id]._parent.power = 0;
}
this.power_mc._width = 112.4 * (_root.playmc_array[this.id]._parent.power / 100);
_root.playmc_array[this.id]._parent.power = Math.round(_root.playmc_array[this.id]._parent.power);
if (_root.playmc_array[this.id]._parent.power > 98) {
_root.playmc_array[this.id]._parent.power = 100;
this.power_light._visible = true;
if ((_root.playermode != 12) && (this.id == 0)) {
this.pressTipZ_mc._visible = true;
}
if ((_root.playermode == 12) && (this.id == 0)) {
this.pressTipY_mc._visible = true;
}
if ((_root.playermode == 12) && (this.id == 1)) {
this.pressTip_mc._visible = true;
}
} else {
this.power_light._visible = false;
}
};
i++;
}
k++;
}
Symbol 3109 MovieClip Frame 123
stop();
stop();
kaisen = 0;
match_mode = 1;
result_txt = new Array();
Symbol 3109 MovieClip Frame 127
stop();
stopAllSounds();
if (_root.soundid == 1) {
_root.level_map_sound.start(0, 1);
}
var i = 0;
while (i < _root.playerSort_array.length) {
j = i + 1;
mc["country" + j]["country" + j].gotoAndStop(_root.playerSort_array[i].id + 1);
if (_root.playerSort_array[i].id != _root.sel) {
mc["country" + j]["country" + j].p1._visible = false;
} else {
mc["country" + j].gotoAndStop("lavel" + _root.lavel);
}
i++;
}
var i = 0;
while (i < _root.first_array.length) {
mc["country" + (_root.first_array[i] + 1)].gotoAndStop("lavel2");
i++;
}
if (_root.lavel >= 3) {
mc["country" + (_root.snd_array[0] + 1)].gotoAndStop("lavel3");
}
if (_root.lavel == 3) {
mc.allline.line3.gotoAndPlay(2);
}
_root.pcsel_array.shift();
_root.player_array[1].id = _root.playerSort_array[_root.pcsel_array[0]].id;
_root.player_array[1].playname = _root.playerSort_array[_root.pcsel_array[0]].playname;
if ((kaisen == 1) && (_root.pcsel_array[0] <= 3)) {
mc.allline.line21.gotoAndPlay(2);
} else if (kaisen == 1) {
mc.allline.line22.gotoAndPlay(2);
}
mc.onRelease = function () {
if (_root.lavel <= 3) {
_root.player_array[0].score = _root.player_array[0].score + 500;
if (_root.soundid == 1) {
_root.levelsoundid = _root.levelsoundid + 1;
if (_root.levelsoundid > 3) {
_root.levelsoundid = 0;
}
_root.level_sound.attachSound(_root.levelsound_array[_root.levelsoundid].id);
_root.level_sound.start(0, 999);
}
this._parent.gotoAndPlay("play");
} else {
this._parent.gotoAndStop("ending");
}
};
Symbol 3109 MovieClip Frame 137
stop();
if (_root.playermode == 12) {
nextFrame();
}
Symbol 3109 MovieClip Frame 138
stop();