Frame 1
stop();
Stage.showMenu = false;
Frame 2
stop();
Frame 3
function mydate() {
var _local2 = new Date();
month = _local2.getUTCMonth() + 1;
if (month < 10) {
month = "0" + month;
}
dat = _local2.getUTCDate();
if (dat < 10) {
dat = "0" + dat;
}
hours = _local2.getUTCHours();
if (hours < 10) {
hours = "0" + hours;
}
minutes = _local2.getUTCMinutes();
if (minutes < 10) {
minutes = "0" + minutes;
}
seconds = _local2.getUTCSeconds();
if (seconds < 10) {
seconds = "0" + seconds;
}
_root.fulldatestring = ((((((((((_local2.getUTCFullYear() + "-") + month) + "-") + dat) + "T") + hours) + ":") + minutes) + ":") + seconds) + "Z";
trace("start time" + fulldatestring);
}
stop();
bg_snd = new Sound();
bg_snd.attachSound("bgSound");
bg_snd.start("bgSound", 1000);
Frame 4
function countdown() {
if (gameplay) {
_global.Total_sec--;
if (_global.Total_sec == 10) {
_root.game_sound1.gotoAndPlay("time_snd");
}
if (_global.Total_sec == 0) {
clearInterval(time_reduce);
clearInterval(bomb_timer);
_root.gotoAndPlay("over");
}
_root.G_time.text = _global.Total_sec;
}
}
function buildGrid() {
var _local3 = 1;
while (_local3 <= game.rows) {
var _local2 = 1;
while (_local2 <= game.columns) {
var _local4 = (("cell" + _local2) + "_") + _local3;
var _local5 = (_local2 - 1) * game.spacing;
var _local6 = (_local3 - 1) * game.spacing;
game.path.attachMovie("cell", _local4, ++game.depth);
k = game.path[_local4].tile.gotoAndStop(block[_local3 - 1][_local2 - 1]);
var _local7 = block[_local3 - 1][_local2 - 1];
game.path[_local4]._x = _local5;
game.path[_local4]._y = _local6;
if (block[_local3 - 1][_local2 - 1] == 4) {
_global.Total_coins++;
if (_global.level == 3) {
pp = game.path.attachMovie("coin1", _local4 + "coin1", game.depth1++);
} else {
pp = game.path.attachMovie("coin", _local4 + "coin", game.depth1++);
}
pp._x = _local5;
pp._y = _local6;
}
if (block[_local3 - 1][_local2 - 1] == 3) {
_global.pps = game.path.attachMovie("tower", _local4 + "tower", game.depth1++);
pps._x = _local5;
pps._y = _local6;
}
if (block[_local3 - 1][_local2 - 1] == 5) {
_global.Total_enemy++;
_global.ppe = game.path.attachMovie("enemy1", "enemy1", game.depth1++);
ppe._x = _local5;
ppe._y = _local6;
}
if (block[_local3 - 1][_local2 - 1] == 6) {
_global.Total_enemy++;
_global.ppe = game.path.attachMovie("enemy2", "enemy2", game.depth1++);
ppe._x = _local5;
ppe._y = _local6;
}
if (block[_local3 - 1][_local2 - 1] == 7) {
_global.Total_enemy++;
_global.ppe = game.path.attachMovie("enemy3", "enemy3", game.depth1++);
ppe._x = _local5;
ppe._y = _local6;
}
if (block[_local3 - 1][_local2 - 1] == 8) {
_global.Total_enemy++;
_global.ppe = game.path.attachMovie("enemy4", "enemy4", game.depth1++);
ppe._x = _local5;
ppe._y = _local6;
}
if (block[_local3 - 1][_local2 - 1] == 9) {
_global.Total_enemy++;
_global.ppe = game.path.attachMovie("enemy5", "enemy5", game.depth1++);
ppe._x = _local5;
ppe._y = _local6;
}
game[_local4] = {x:_local2, y:_local3, name:_local4, type:_local7, clip:game.path[_local4]};
_local2++;
}
_local3++;
}
}
function gameClicked(mx, my) {
var _local3 = Math.ceil(mx / game.spacing);
var _local4 = Math.ceil(my / game.spacing);
var _local5 = (("cell" + _local3) + "_") + _local4;
var _local2 = game[_local5];
pp = game.path.attachMovie("bomb1", "mybomb", game.depth3);
pp._x = _local2.clip._x;
pp._y = _local2.clip._y;
clearInterval(bomb_timer);
bomb_timer = setInterval(this, "bombDirection", 2000, pp._x, pp._y);
}
function bombDirection(x_pos, y_pos) {
_root.game_sound.gotoAndPlay("bomb_snd");
y_down = 0;
y_up = 0;
x_right = 0;
x_left = 0;
clearInterval(bomb_timer);
removeMovieClip(_root.grid.mybomb);
var _local10 = 1;
while (_local10 <= (game.bombsize + 1)) {
y_down = y_down + game.spacing;
var _local11 = Math.ceil(x_pos / game.spacing) + 1;
var _local12 = Math.ceil((y_pos + y_down) / game.spacing);
var _local3 = (("cell" + _local11) + "_") + _local12;
ob = game[_local3];
if ((game[_local3].type == 2) || (game[_local3].type == undefined)) {
break;
}
if (game[_local3].type != undefined) {
if (game[_local3].type == 3) {
gg = _local3 + "tower";
removeMovieClip(_root.grid[gg]);
game[_local3].type = 1;
_global.score = _global.score + 100;
_root.gscore.text = _global.score;
_global.total_tower = _global.total_tower - 1;
}
pp = game.path.attachMovie("bomb", _local3 + "bombani", game.depth6 + _local10);
pp._x = ob.clip._x;
pp._y = ob.clip._y;
}
_local10++;
}
_local10 = game.bombsize;
while (_local10 >= 1) {
y_up = y_up + game.spacing;
var _local6 = Math.ceil(x_pos / game.spacing) + 1;
var _local7 = Math.ceil((y_pos - y_up) / game.spacing) + 1;
var _local4 = (("cell" + _local6) + "_") + _local7;
ob = game[_local4];
if ((game[_local4].type == 2) || (game[_local4].type == undefined)) {
break;
}
if (game[_local4].type != undefined) {
if (game[_local4].type == 3) {
gg = _local4 + "tower";
removeMovieClip(_root.grid[gg]);
game[_local4].type = 1;
_global.score = _global.score + 100;
_root.gscore.text = _global.score;
_global.total_tower = _global.total_tower - 1;
}
pp = game.path.attachMovie("bomb", _local4 + "bombani", (game.depth5 + _local10) + 25);
pp._x = ob.clip._x;
pp._y = ob.clip._y;
}
_local10--;
}
_local10 = 1;
while (_local10 <= game.bombsize) {
x_right = x_right + game.spacing;
var _local13 = Math.ceil((x_pos + x_right) / game.spacing);
var _local14 = Math.ceil(y_pos / game.spacing) + 1;
var _local3 = (("cell" + _local13) + "_") + _local14;
ob = game[_local3];
if ((game[_local3].type == 2) || (game[_local3].type == undefined)) {
break;
}
if (game[_local3].type != undefined) {
if (game[_local3].type == 3) {
gg = _local3 + "tower";
removeMovieClip(_root.grid[gg]);
game[_local3].type = 1;
_global.score = _global.score + 100;
_root.gscore.text = _global.score;
_global.total_tower = _global.total_tower - 1;
}
pp1 = game.path.attachMovie("bomb", _local3 + "bombani", game.depth5++);
pp1._x = ob.clip._x;
pp1._y = ob.clip._y;
}
_local10++;
}
_local10 = game.bombsize;
while (_local10 >= 1) {
x_left = x_left + game.spacing;
var _local6 = Math.ceil((x_pos - x_left) / game.spacing) + 1;
var _local7 = Math.ceil(y_pos / game.spacing) + 1;
var _local5 = (("cell" + _local6) + "_") + _local7;
ob = game[_local5];
if ((game[_local5].type == 2) || (game[_local5].type == undefined)) {
break;
}
if (game[_local5].type != undefined) {
if (game[_local5].type == 3) {
gg = _local5 + "tower";
removeMovieClip(_root.grid[gg]);
game[_local5].type = 1;
_global.score = _global.score + 100;
_root.gscore.text = _global.score;
_global.total_tower = _global.total_tower - 1;
}
pp = game.path.attachMovie("bomb", _local5 + "bombani", game.depth5++);
pp._x = ob.clip._x;
pp._y = ob.clip._y;
}
_local10--;
}
}
function resetPlayer() {
_root.grid.ball.gotoAndPlay(47);
}
function initializeBall() {
_global.mydir = "int";
game.speed = 4;
game.path.ball.swapDepths(7000);
if (_global.level == 1) {
game.ball = {startx:1, starty:1, clip:game.path.ball};
} else if (_global.level == 2) {
game.ball = {startx:3, starty:2, clip:game.path.ball};
} else if (_global.level == 3) {
game.ball = {startx:1, starty:2, clip:game.path.ball};
}
var _local2 = ((game.ball.startx - 1) * game.spacing) + (game.spacing / 2);
var _local3 = ((game.ball.starty - 1) * game.spacing) + (game.spacing / 2);
game.ball.clip._x = _local2;
game.ball.clip._y = _local3;
game.ball.x = _local2;
game.ball.y = _local3;
game.ball.radius = game.ball.clip._width / 2;
}
function moveBall(dir) {
if (_global.die_status == 0) {
ob = game.ball;
sp = 0;
_global.mydir = dir;
if (dir == "right") {
var _local5 = ((ob.x + ob.radius) + game.speed) + sp;
var _local6 = ob.y - ob.radius;
var _local4 = Math.ceil(_local5 / game.spacing);
var _local7 = Math.ceil(_local6 / game.spacing);
var _local3 = game[(("cell" + _local4) + "_") + _local7];
var _local9 = ((ob.x + ob.radius) + game.speed) + sp;
var _local11 = ob.y + ob.radius;
var _local8 = Math.ceil(_local9 / game.spacing);
var _local10 = Math.ceil(_local11 / game.spacing);
var _local2 = game[(("cell" + _local8) + "_") + _local10];
if (((_local3.type == 2) || (_local3.type == undefined)) || (_local3.type == 3)) {
return(undefined);
}
if (((_local2.type == 2) || (_local2.type == undefined)) || (_local2.type == 3)) {
return(undefined);
}
ob.x = ob.x + game.speed;
ob.clip._x = ob.x;
} else if (dir == "left") {
var _local5 = ((ob.x - ob.radius) - game.speed) - sp;
var _local6 = ob.y - ob.radius;
var _local4 = Math.ceil(_local5 / game.spacing);
var _local7 = Math.ceil(_local6 / game.spacing);
var _local3 = game[(("cell" + _local4) + "_") + _local7];
var _local9 = ((ob.x - ob.radius) - game.speed) - sp;
var _local11 = ob.y + ob.radius;
var _local8 = Math.ceil(_local9 / game.spacing);
var _local10 = Math.ceil(_local11 / game.spacing);
var _local2 = game[(("cell" + _local8) + "_") + _local10];
if (((_local3.type == 2) || (_local3.type == undefined)) || (_local3.type == 3)) {
return(undefined);
}
if (((_local2.type == 2) || (_local2.type == undefined)) || (_local2.type == 3)) {
return(undefined);
}
ob.x = ob.x - game.speed;
ob.clip._x = ob.x;
} else if (dir == "up") {
var _local5 = ob.x + ob.radius;
var _local6 = ((ob.y - ob.radius) - game.speed) - sp;
var _local4 = Math.ceil(_local5 / game.spacing);
var _local7 = Math.ceil(_local6 / game.spacing);
var _local3 = game[(("cell" + _local4) + "_") + _local7];
var _local9 = ob.x - ob.radius;
var _local11 = ((ob.y - ob.radius) - game.speed) - sp;
var _local8 = Math.ceil(_local9 / game.spacing);
var _local10 = Math.ceil(_local11 / game.spacing);
var _local2 = game[(("cell" + _local8) + "_") + _local10];
if (((_local3.type == 2) || (_local3.type == undefined)) || (_local3.type == 3)) {
return(undefined);
}
if (((_local2.type == 2) || (_local2.type == undefined)) || (_local2.type == 3)) {
return(undefined);
}
ob.y = ob.y - game.speed;
ob.clip._y = ob.y;
} else if (dir == "down") {
var _local5 = ob.x - ob.radius;
var _local6 = ((ob.y + ob.radius) + game.speed) + sp;
var _local4 = Math.ceil(_local5 / game.spacing);
var _local7 = Math.ceil(_local6 / game.spacing);
var _local3 = game[(("cell" + _local4) + "_") + _local7];
var _local9 = ob.x + ob.radius;
var _local11 = ((ob.y + ob.radius) + game.speed) + sp;
var _local8 = Math.ceil(_local9 / game.spacing);
var _local10 = Math.ceil(_local11 / game.spacing);
var _local2 = game[(("cell" + _local8) + "_") + _local10];
if (((_local3.type == 2) || (_local3.type == undefined)) || (_local3.type == 3)) {
return(undefined);
}
if (((_local2.type == 2) || (_local2.type == undefined)) || (_local2.type == 3)) {
return(undefined);
}
ob.y = ob.y + game.speed;
ob.clip._y = ob.y;
}
}
}
game = {};
game.columns = 16;
game.rows = 16;
game.bombsize = 5;
game.spacing = 25;
game.depth = 1000;
game.depth1 = 2001;
game.depth3 = 3001;
game.depth4 = 4001;
game.depth5 = 8501;
game.depth6 = 9000;
game.path = _root.grid;
game.numberOfTypes = 8;
flag = 0;
_global.Total_coins = 0;
_global.Total_enemy = 0;
_global.mydir = "up";
_global.die_status = 0;
_global.die_status1 = 0;
_global.coin_count = 0;
_global.enemy_kill_count = 0;
if (_global.level == 1) {
_global.Total_life = 3;
_global.score = 0;
_global.Total_sec = 120;
_global.total_tower = 10;
} else if (_global.level == 2) {
_global.total_tower = 12;
_global.Total_sec = 100;
} else if (_global.level == 3) {
_global.total_tower = 12;
_global.Total_sec = 80;
}
_root.gscore.text = _global.score;
_root.level_text.text = _global.level;
_global.gameplay = true;
if (_global.level == 1) {
_root.game_bg1.gotoAndStop(1);
block = [[1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2], [1, 1, 1, 2, 3, 2, 1, 1, 2, 1, 1, 2, 1, 4, 1, 3], [2, 2, 1, 2, 4, 2, 1, 3, 2, 1, 2, 1, 1, 1, 2, 2], [2, 2, 1, 1, 1, 1, 1, 1, 1, 5, 1, 1, 1, 1, 1, 2], [2, 2, 2, 1, 2, 2, 1, 2, 2, 2, 2, 1, 2, 2, 1, 2], [3, 1, 4, 1, 1, 1, 1, 1, 4, 1, 1, 1, 1, 1, 1, 2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2, 3, 1, 1, 4, 1, 2, 2, 1, 1, 3, 1, 1, 2, 1, 2]];
}
clearInterval(time_reduce);
time_reduce = setInterval(this, "countdown", 1000);
_root.onEnterFrame = function () {
if (_global.die_status == 0) {
if (Key.isDown(39)) {
_root.grid.ball.gotoAndPlay("right");
moveBall("right");
} else if (Key.isDown(37)) {
_root.grid.ball.gotoAndPlay("left");
moveBall("left");
}
if (Key.isDown(38)) {
_root.grid.ball.gotoAndPlay("up");
moveBall("up");
} else if (Key.isDown(40)) {
_root.grid.ball.gotoAndPlay("down");
moveBall("down");
}
if ((((!Key.isDown(38)) && (!Key.isDown(37))) && (!Key.isDown(39))) && (!Key.isDown(40))) {
switch (_global.mydir) {
case "left" :
_root.grid.ball.gotoAndStop("left_stop");
break;
case "right" :
_root.grid.ball.gotoAndStop("right_stop");
break;
case "up" :
_root.grid.ball.gotoAndStop("up_stop");
break;
case "down" :
_root.grid.ball.gotoAndStop("down_stop");
}
}
if (Key.isDown(32)) {
if (flag == 0) {
var _local3 = _root.grid.ball._x;
var _local4 = _root.grid.ball._y;
gameClicked(_local3, _local4);
flag = 1;
}
}
} else if (_global.die_status1 == 0) {
if (_global.mydir == "int") {
_global.mydir = "right";
_global.die_status1 = 1;
_root.grid.ball.gotoAndStop("down_die");
} else {
_global.die_status1 = 1;
_root.grid.ball.gotoAndStop(_global.mydir + "_die");
}
}
};
buildGrid();
initializeBall();
stop();
Instance of Symbol 306 MovieClip "life_mc" in Frame 4
onClipEvent (enterFrame) {
this.gotoAndStop(_global.Total_life);
if (_global.Total_life <= 0) {
_root.gotoAndStop("over");
}
}
Frame 11
stop();
if (_global.level == 3) {
this.level_indi_mc.gotoAndPlay("f3");
}
if (_global.level == 2) {
this.level_indi_mc.gotoAndPlay("f2");
}
if (_global.level == 1) {
_root.level_indi_mc.gotoAndPlay("cool");
}
Instance of Symbol 329 MovieClip in Frame 11
onClipEvent (load) {
_root.myscore.text = _global.score + (_global.Total_sec * 10);
_root.total_enemy_score.text = _global.enemy_kill_count * 200;
_root.total_coin_score.text = _global.coin_count * 50;
_root.bonus.text = _global.Total_sec * 10;
}
Frame 12
stop();
clearInterval(time_reduce);
clearInterval(bomb_timer);
trace("over");
Instance of Symbol 329 MovieClip in Frame 12
onClipEvent (load) {
_global.score = _global.score + (_global.Total_sec * 10);
_root.myscore.text = _global.score;
_root.total_enemy_score.text = _global.enemy_kill_count * 200;
_root.total_coin_score.text = _global.coin_count * 50;
_root.bonus.text = _global.Total_sec * 10;
}
Instance of Symbol 364 MovieClip "gamealert1" in Frame 12
onClipEvent (load) {
var t1 = "Baatman the mad Podafone have struck at the Office. Activate Signal Points.";
var t2 = "Baatman the mad Podafone have struck at the Department Store . Activate Signal Points.";
if (_global.level == 1) {
this.gametext1.text = t1;
} else if (_global.level == 2) {
this.gametext1.text = t2;
}
}
Frame 13
stop();
clearInterval(time_reduce);
clearInterval(bomb_timer);
score = _root.myscore.text;
close_btn._visible = false;
submit_btn.onPress = function () {
trace("start changed time" + _root.fulldatestring);
userid = "voo";
var result_lv = new LoadVars();
result_lv.onLoad = function (success) {
if (success) {
trace("success : " + result_lv);
} else {
trace("Error connecting to server.");
}
};
var _local2 = new LoadVars();
_local2.score = score;
_local2.evttype = "End";
_local2.gameid = 605;
_local2.gamestarttime = _root.fulldatestring;
trace(_local2);
_local2.sendAndLoad("https://www.zapak.com/getscore.z", result_lv, "POST");
trace(result_lv);
lBoard_mc.gotoAndPlay(2);
lBoard_mc._visible = true;
submit_btn.enabled = false;
submit_btn._alpha = 50;
};
stop();
Instance of Symbol 374 MovieClip in Frame 13
onClipEvent (load) {
_root.myscore.text = _global.score;
_root.total_enemy_score.text = _global.enemy_kill_count * 200;
_root.total_coin_score.text = _global.coin_count * 50;
}
Instance of Symbol 393 MovieClip "game_alert" in Frame 13
onClipEvent (load) {
var t1 = "Connection Dropped. Try Again to Reconnect Reliance Mobile.";
var t2 = "Connection Dropped. Try Again to Reconnect Reliance Mobile.";
var t3 = "Good Going Baatman. The city thanks you for activating Reliance connections.";
if (((_global.Total_life > 0) && (_global.Total_sec > 0)) && (_global.level == 3)) {
this.gameovertext.text = t3;
} else if (_global.Total_life > 0) {
this.gameovertext.text = t1;
} else {
this.gameovertext.text = t2;
}
}
Symbol 16 MovieClip [bomb] Frame 13
stop();
if (this.hitTest(_root.grid.enemy1)) {
if (_root.grid.enemy1._currentframe != 5) {
_global.score = _global.score + 200;
_root.gscore.text = _global.score;
_global.enemy_kill_count = _global.enemy_kill_count + 1;
_root.grid.enemy1.gotoAndStop(5);
}
trace("enemy count" + enemy_kill_count);
}
if (this.hitTest(_root.grid.enemy2)) {
if (_root.grid.enemy2._currentframe != 5) {
_global.score = _global.score + 200;
_root.gscore.text = _global.score;
_global.enemy_kill_count = _global.enemy_kill_count + 1;
_root.grid.enemy2.gotoAndStop(5);
}
}
if (this.hitTest(_root.grid.enemy3)) {
if (_root.grid.enemy3._currentframe != 5) {
_global.score = _global.score + 200;
_root.gscore.text = _global.score;
_global.enemy_kill_count = _global.enemy_kill_count + 1;
_root.grid.enemy3.gotoAndStop(5);
}
}
if (this.hitTest(_root.grid.enemy4)) {
if (_root.grid.enemy4._currentframe != 5) {
_global.score = _global.score + 200;
_root.gscore.text = _global.score;
_global.enemy_kill_count = _global.enemy_kill_count + 1;
_root.grid.enemy4.gotoAndStop(5);
}
}
if (this.hitTest(_root.grid.enemy5)) {
if (_root.grid.enemy5._currentframe != 5) {
_global.score = _global.score + 200;
_root.gscore.text = _global.score;
_global.enemy_kill_count = _global.enemy_kill_count + 1;
_root.grid.enemy5.gotoAndStop(5);
}
}
if (_global.die_status == 0) {
if (this.hitTest(_root.grid.ball)) {
_global.die_status = 1;
}
}
if (((_global.total_tower <= 0) && (_global.coin_count == _global.Total_coins)) && (_global.enemy_kill_count == _global.Total_enemy)) {
_root.gotoAndPlay("levelindictor");
}
_root.flag = 0;
removeMovieClip(this);
Symbol 58 MovieClip Frame 1
play();
Symbol 58 MovieClip Frame 11
stop();
gg = this._parent._name;
removeMovieClip(_root.grid[gg]);
Symbol 59 MovieClip [enemy1] Frame 1
#initclip 5
_global.Custom3 = function () {
};
Custom3.prototype = new MovieClip();
Custom3.prototype.onLoad = function () {
Custom3.prototype.cc = 1;
Custom3.prototype.speed = 2;
if (_global.level == 1) {
this.gotoAndStop(3);
}
if (_global.level == 2) {
this.gotoAndStop(4);
}
if (_global.level == 3) {
this.gotoAndStop(3);
}
};
Custom3.prototype.onEnterFrame = function () {
if (this._currentframe != 5) {
if (_global.level == 1) {
if (this._x > 320) {
Custom3.prototype.cc = -1;
this.gotoAndStop(2);
} else if (this._x < 60) {
Custom3.prototype.cc = 1;
this.gotoAndStop(3);
}
this._x = this._x + (Custom3.prototype.speed * Custom3.prototype.cc);
}
if (_global.level == 2) {
if (this._y > 225) {
Custom3.prototype.cc = -1;
this.gotoAndStop(1);
} else if (this._y < 50) {
Custom3.prototype.cc = 1;
this.gotoAndStop(4);
}
this._y = this._y + (Custom3.prototype.speed * Custom3.prototype.cc);
}
if (_global.level == 3) {
if (this._x > 50) {
Custom3.prototype.cc = -1;
this.gotoAndStop(2);
} else if (this._x < 0) {
Custom3.prototype.cc = 1;
this.gotoAndStop(3);
}
this._x = this._x + (Custom3.prototype.speed * Custom3.prototype.cc);
}
if (_global.die_status == 0) {
if (this.hitTest(_root.grid.ball)) {
_global.die_status = 1;
}
}
}
};
Object.registerClass("enemy1", Custom3);
#endinitclip
stop();
Symbol 60 MovieClip [enemy3] Frame 1
#initclip 4
_global.Custom11 = function () {
};
Custom11.prototype = new MovieClip();
Custom11.prototype.onLoad = function () {
Custom11.prototype.cc = 1;
Custom11.prototype.speed = 2;
if ((_global.level == 1) || (_global.level == 2)) {
this.gotoAndStop(3);
}
if (_global.level == 3) {
this.gotoAndStop(4);
}
};
Custom11.prototype.onEnterFrame = function () {
if (this._currentframe != 5) {
if (_global.level == 1) {
if (this._x > 150) {
Custom11.prototype.cc = -1;
this.gotoAndStop(2);
} else if (this._x < 25) {
Custom11.prototype.cc = 1;
this.gotoAndStop(3);
}
this._x = this._x + (Custom11.prototype.speed * Custom11.prototype.cc);
}
if (_global.level == 2) {
if (this._x > 350) {
Custom11.prototype.cc = -1;
this.gotoAndStop(2);
} else if (this._x < 300) {
Custom11.prototype.cc = 1;
this.gotoAndStop(3);
}
this._x = this._x + (Custom11.prototype.speed * Custom11.prototype.cc);
}
if (_global.level == 3) {
if (this._y > 175) {
Custom11.prototype.cc = -1;
this.gotoAndStop(1);
} else if (this._y < 100) {
Custom11.prototype.cc = 1;
this.gotoAndStop(4);
}
this._y = this._y + (Custom11.prototype.speed * Custom11.prototype.cc);
}
if (_global.die_status == 0) {
if (this.hitTest(_root.grid.ball)) {
_global.die_status = 1;
}
}
}
};
Object.registerClass("enemy3", Custom11);
#endinitclip
stop();
Symbol 61 MovieClip [enemy4] Frame 1
#initclip 3
_global.Custom12 = function () {
};
Custom12.prototype = new MovieClip();
Custom12.prototype.onLoad = function () {
Custom12.prototype.cc = 1;
Custom12.prototype.speed = 2;
if (_global.level == 2) {
this.gotoAndStop(4);
}
if (_global.level == 3) {
this.gotoAndStop(4);
}
};
Custom12.prototype.onEnterFrame = function () {
if (this._currentframe != 5) {
if (_global.level == 2) {
if (this._y > 150) {
Custom12.prototype.cc = -1;
this.gotoAndStop(1);
} else if (this._y < 50) {
Custom12.prototype.cc = 1;
this.gotoAndStop(4);
}
this._y = this._y + (Custom12.prototype.speed * Custom12.prototype.cc);
}
if (_global.level == 3) {
if (this._x > 300) {
Custom12.prototype.cc = -1;
this.gotoAndStop(4);
} else if (this._x < 275) {
Custom12.prototype.cc = 1;
this.gotoAndStop(1);
}
this._x = this._x + (Custom12.prototype.speed * Custom12.prototype.cc);
}
if (_global.die_status == 0) {
if (this.hitTest(_root.grid.ball)) {
_global.die_status = 1;
}
}
}
};
Object.registerClass("enemy4", Custom12);
#endinitclip
stop();
Symbol 62 MovieClip [enemy5] Frame 1
#initclip 2
_global.Custom13 = function () {
};
Custom13.prototype = new MovieClip();
Custom13.prototype.onLoad = function () {
Custom13.prototype.cc = 1;
Custom13.prototype.speed = 2;
if (_global.level == 2) {
this.gotoAndStop(3);
}
if (_global.level == 3) {
this.gotoAndStop(4);
}
};
Custom13.prototype.onEnterFrame = function () {
if (this._currentframe != 5) {
if (_global.level == 2) {
if (this._x > 300) {
Custom13.prototype.cc = -1;
this.gotoAndStop(2);
} else if (this._x < 225) {
Custom13.prototype.cc = 1;
this.gotoAndStop(3);
}
this._x = this._x + (Custom13.prototype.speed * Custom13.prototype.cc);
}
if (_global.level == 3) {
if (this._y > 220) {
Custom13.prototype.cc = -1;
this.gotoAndStop(1);
} else if (this._y < 155) {
Custom13.prototype.cc = 1;
this.gotoAndStop(4);
}
this._y = this._y + (Custom13.prototype.speed * Custom13.prototype.cc);
}
if (_global.die_status == 0) {
if (this.hitTest(_root.grid.ball)) {
_global.die_status = 1;
}
}
}
};
Object.registerClass("enemy5", Custom13);
#endinitclip
stop();
Symbol 63 MovieClip [enemy2] Frame 1
#initclip 1
_global.Custom10 = function () {
};
Custom10.prototype = new MovieClip();
Custom10.prototype.onLoad = function () {
Custom10.prototype.cc = 1;
Custom10.prototype.speed = 2;
if (_global.level == 1) {
this.gotoAndStop(4);
}
if (_global.level == 2) {
this.gotoAndStop(4);
}
if (_global.level == 3) {
this.gotoAndStop(4);
}
};
Custom10.prototype.onEnterFrame = function () {
if (this._currentframe != 5) {
if (_global.level == 1) {
if (this._y > 300) {
Custom10.prototype.cc = -1;
this.gotoAndStop(1);
} else if (this._y < 175) {
Custom10.prototype.cc = 1;
this.gotoAndStop(4);
}
this._y = this._y + (Custom10.prototype.speed * Custom10.prototype.cc);
}
if (_global.level == 2) {
if (this._y > 350) {
Custom10.prototype.cc = -1;
this.gotoAndStop(1);
} else if (this._y < 150) {
Custom10.prototype.cc = 1;
this.gotoAndStop(4);
}
this._y = this._y + (Custom10.prototype.speed * Custom10.prototype.cc);
}
if (_global.level == 3) {
if (this._x > 100) {
Custom10.prototype.cc = -1;
this.gotoAndStop(2);
} else if (this._x < 50) {
Custom10.prototype.cc = 1;
this.gotoAndStop(3);
}
this._x = this._x + (Custom10.prototype.speed * Custom10.prototype.cc);
}
if (_global.die_status == 0) {
if (this.hitTest(_root.grid.ball)) {
_global.die_status = 1;
}
}
}
};
Object.registerClass("enemy2", Custom10);
#endinitclip
stop();
Symbol 89 Button
on (press) {
gotoAndPlay ("ins2");
}
Symbol 108 MovieClip [coin] Frame 1
#initclip 7
_global.Custom1 = function () {
};
Custom1.prototype = new MovieClip();
Custom1.prototype.onEnterFrame = function () {
if (this._currentframe == 1) {
if (this.hitTest(_root.grid.ball)) {
_global.score = _global.score + 50;
_root.gscore.text = _global.score;
_root.game_sound.gotoAndPlay("coin_snd");
_global.coin_count = _global.coin_count + 1;
this.gotoAndPlay(2);
}
}
};
Object.registerClass("coin", Custom1);
#endinitclip
stop();
Symbol 108 MovieClip [coin] Frame 32
stop();
removeMovieClip(this);
if (((_global.total_tower <= 0) && (_global.coin_count == _global.Total_coins)) && (_global.enemy_kill_count == _global.Total_enemy)) {
_root.gotoAndPlay("levelindictor");
}
Symbol 110 Button
on (press) {
removeMovieClip(this);
_root.play_btn.enabled = true;
_root.ins_btn.enabled = true;
}
Symbol 111 MovieClip [game_help] Frame 1
_root.play_btn.enabled = false;
_root.ins_btn.enabled = false;
stop();
Symbol 111 MovieClip [game_help] Frame 2
stop();
Symbol 124 MovieClip Frame 16
_global.die_status = 0;
_global.die_status1 = 0;
stop();
Symbol 153 MovieClip Frame 15
_global.Total_life = _global.Total_life - 1;
_root.initializeBall();
_root.grid.ball.gotoAndStop("int");
Symbol 154 MovieClip Frame 15
_global.Total_life = _global.Total_life - 1;
_root.initializeBall();
_root.grid.ball.gotoAndStop("int");
Symbol 159 MovieClip Frame 15
_global.Total_life = _global.Total_life - 1;
_root.initializeBall();
_root.grid.ball.gotoAndStop("int");
Symbol 164 MovieClip Frame 15
_global.Total_life = _global.Total_life - 1;
_root.initializeBall();
_root.grid.ball.gotoAndStop("int");
Symbol 165 MovieClip [char] Frame 1
stop();
Symbol 165 MovieClip [char] Frame 5
stop();
Symbol 165 MovieClip [char] Frame 19
stop();
Symbol 165 MovieClip [char] Frame 26
stop();
Symbol 165 MovieClip [char] Frame 33
stop();
Symbol 165 MovieClip [char] Frame 41
stop();
Symbol 165 MovieClip [char] Frame 50
stop();
Symbol 165 MovieClip [char] Frame 56
stop();
Symbol 165 MovieClip [char] Frame 61
stop();
Symbol 165 MovieClip [char] Frame 72
stop();
Symbol 165 MovieClip [char] Frame 86
stop();
Symbol 165 MovieClip [char] Frame 102
stop();
Symbol 165 MovieClip [char] Frame 116
stop();
Symbol 167 MovieClip [coin1] Frame 1
#initclip 6
_global.Custom1 = function () {
};
Custom1.prototype = new MovieClip();
Custom1.prototype.onEnterFrame = function () {
if (this._currentframe == 1) {
if (this.hitTest(_root.grid.ball)) {
_global.score = _global.score + 50;
_root.gscore.text = _global.score;
_root.game_sound.gotoAndPlay("coin_snd");
_global.coin_count = _global.coin_count + 1;
this.gotoAndPlay(2);
}
}
};
Object.registerClass("coin1", Custom1);
#endinitclip
stop();
Symbol 167 MovieClip [coin1] Frame 32
stop();
removeMovieClip(this);
if (((_global.total_tower <= 0) && (_global.coin_count == _global.Total_coins)) && (_global.enemy_kill_count == _global.Total_enemy)) {
_root.gotoAndPlay("levelindictor");
}
Symbol 174 MovieClip [game_bg1] Frame 1
stop();
Symbol 229 MovieClip Frame 11
stop();
Symbol 234 MovieClip Frame 100
_parent.gotoAndPlay("instructions");
Symbol 257 Button
on (release) {
_root.gotoAndPlay("start");
}
Symbol 264 MovieClip Frame 117
stop();
Symbol 288 Button
on (release) {
c = attachMovie("game_help", "help", 100);
c._x = 200;
c._y = 100;
}
Symbol 291 Button
on (release) {
_root.mydate();
_global.level = 1;
removeMovieClip(_root.help);
gotoAndPlay ("opening");
}
Symbol 297 MovieClip Frame 1
stop();
Symbol 297 MovieClip Frame 16
gotoAndPlay (1);
Symbol 297 MovieClip Frame 50
gotoAndPlay (1);
Symbol 297 MovieClip Frame 61
gotoAndPlay (1);
Symbol 306 MovieClip Frame 1
stop();
Symbol 318 MovieClip Frame 1
stop();
Symbol 333 MovieClip Frame 93
stop();
Symbol 345 MovieClip Frame 1
stop();
Symbol 345 MovieClip Frame 2
play();
trace("pp");
Symbol 345 MovieClip Frame 50
function wait() {
clearInterval(m);
_root.gotoAndPlay("complete");
}
m = setInterval(this, "wait", 2000);
stop();
Symbol 345 MovieClip Frame 51
play();
Symbol 345 MovieClip Frame 102
function wait() {
clearInterval(m);
_root.gotoAndPlay("complete");
}
m = setInterval(this, "wait", 2000);
stop();
Symbol 345 MovieClip Frame 103
play();
Symbol 345 MovieClip Frame 453
function wait() {
clearInterval(m);
_root.gotoAndPlay("over");
}
m = setInterval(this, "wait", 2000);
stop();
Symbol 362 Button
on (release) {
gotoAndPlay ("start");
_global.level = _global.level + 1;
}
Symbol 382 Button
on (release) {
_global.level = 1;
gotoAndPlay ("start");
}
Symbol 396 Button
on (release) {
_global.level = 1;
_root.gotoAndPlay("start");
}
Symbol 402 MovieClip Frame 1
stop();
Symbol 402 MovieClip Frame 61
function sBoard() {
arrLen = returnXML.firstChild.childNodes[0].childNodes.length;
trace(arrLen);
var _local1 = 0;
while (_local1 < arrLen) {
if (returnXML.firstChild.childNodes[0].childNodes[_local1].nodeName == "leaderboard") {
arrNum = _local1;
}
_local1++;
}
arrLength = returnXML.firstChild.childNodes[0].childNodes[arrNum].childNodes.length;
_local1 = 0;
while (_local1 < arrLength) {
if (_local1 == 0) {
dayScore = returnXML.firstChild.childNodes[0].childNodes[arrNum].childNodes[_local1].firstChild;
} else if (_local1 == 1) {
topScore = returnXML.firstChild.childNodes[0].childNodes[arrNum].childNodes[_local1];
} else {
user_id = returnXML.firstChild.childNodes[0].childNodes[arrNum].childNodes[_local1].attributes.userid;
score = returnXML.firstChild.childNodes[0].childNodes[arrNum].childNodes[_local1].childNodes[1].firstChild;
item = {Username:user_id, Score:score};
userIdArray[_local1] = user_id;
scoreArray[_local1] = score;
grdsBoardId.addItem(item);
}
_local1++;
}
var _local2 = userIdArray.length;
while (_local2 >= 0) {
if ((userIdArray[_local2] != undefined) && (scoreArray[_local2] != undefined)) {
sBoardId = ((userIdArray[_local2] + " ..... ") + newline) + sBoardId;
sBoardScore = (scoreArray[_local2] + newline) + sBoardScore;
}
_local2--;
}
}
stop();
flag = true;
userIdArray = new Array();
scoreArray = new Array();
sBoardId.html = true;
sBoardId.htmlText = "<b><i> this is bold text </i></b>";
var sxml = (("<?xml version=\"1.0\"?><zapakscorecaptureAPI version=\"1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"><game evttype=\"start\" gameid=\"605\" gamestarttime=\"" + _root.fulldatestring) + "\" getboard=\"1\"></game><scoredata /></zapakscorecaptureAPI>");
var returnXML = new XML();
var sendXML = new XML(sxml);
var url = "https://www.zapak.com/getxmlscore.z";
trace("xml" + sxml);
sendXML.sendAndLoad(url, returnXML);
returnXML.onLoad = function (success) {
sBoard();
_root.fulldatestring = null;
};