Frame 4
tb = getBytesTotal();
lb = getBytesLoaded();
v = int((lb / tb) * 100);
thebar.setValue(v);
if (lb < tb) {
gotoAndPlay(_currentframe - 1);
} else if (thebar.mv == thebar.thebar._x) {
play();
} else {
gotoAndPlay(_currentframe - 1);
}
Frame 98
stop();
Frame 101
var lives = 3;
var score = 0;
var score2 = 0;
var level = 1;
gover._visible = false;
nexlevel._visible = false;
Frame 102
stop();
txtScore.text = score;
txtLives.text = lives;
txtLevel.text = level;
Symbol 11 MovieClip Frame 1
function setValue(v) {
mv = (v / 100) * 144;
}
var mv = 0;
Instance of Symbol 10 MovieClip in Symbol 11 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_parent.thebar._x < _parent.mv) {
if ((_parent.mv - _parent.thebar._x) >= 2) {
_parent.thebar._x = _parent.thebar._x + 2;
} else {
_parent.thebar._x++;
}
}
}
Symbol 21 Button
on (release) {
gotoAndStop (99);
}
Symbol 25 Button
on (release) {
gotoAndPlay (100);
}
Symbol 30 Button
on (release) {
getURL ("http://www.funflashgames.com/", "_blank");
}
Symbol 34 Button
on (release) {
getURL ("http://www.funflashgames.com/freecontent.html", "_blank");
}
Symbol 38 MovieClip Frame 1
stop();
Symbol 41 MovieClip Frame 1
stop();
Symbol 44 MovieClip Frame 1
stop();
Symbol 47 MovieClip Frame 1
stop();
Symbol 50 MovieClip Frame 1
stop();
Symbol 54 Button
on (release) {
gotoAndStop (98);
}
Symbol 60 Button
on (release) {
getURL ("mailto:aqlahmad@hotmail.com");
}
Symbol 67 Button
on (release) {
_parent.gotoAndStop("gamehome");
}
Symbol 85 MovieClip Frame 1
var isMoving = false;
var dir = 2;
Symbol 87 MovieClip Frame 1
way1._visible = (way2._visible = (way3._visible = false));
Instance of Symbol 86 MovieClip in Symbol 87 MovieClip Frame 1
onClipEvent (enterFrame) {
var no = _parent.mynumber;
var manbase = _parent._parent.man.base;
if ((no == 1) || (no == 12)) {
return(undefined);
}
if ((no > (manbase + 2)) || (no < (manbase - 1))) {
return(undefined);
}
r = int(Math.random() * 100);
r2 = int(Math.random() * 10) + 1;
if (r < 5) {
var templimit = 0;
if (no == 2) {
templimit = 3;
} else if (_parent._parent._parent.level > 3) {
templimit = 4;
} else {
templimit = 3;
}
if (r2 < templimit) {
w = _parent["way" + r2];
if (w.isMoving != true) {
w.isMoving = true;
w._visible = true;
if (w.dir != 1) {
w.dir = 1;
} else {
w.dir = 2;
}
}
}
}
var i = 1;
while (i <= 3) {
w = _parent["way" + i];
if ((w.dir == 1) && (w.isMoving == true)) {
w._x = w._x + 3;
if (w._x >= 800) {
w.isMoving = false;
w._visible = false;
}
}
if ((w.dir == 2) && (w.isMoving == true)) {
w._x = w._x - 3;
if (w._x <= 0) {
w.isMoving = false;
w._visible = false;
}
}
i++;
}
}
Symbol 98 MovieClip Frame 1
var jumping = false;
stop();
Symbol 98 MovieClip Frame 14
gotoAndStop (1);
Symbol 98 MovieClip Frame 56
stop();
Symbol 113 MovieClip Frame 1
function stopIt() {
onEnterFrame = null;
man.gotoAndPlay("missed");
bat._visible = false;
play();
}
function increaseScore(scr) {
_parent.score = _parent.score + scr;
_parent.score2 = _parent.score2 + scr;
_parent.txtScore.text = _parent.score;
if (_parent.score2 >= 1000) {
_parent.score2 = 0;
_parent.lives++;
_parent.txtLives.text = _parent.lives;
}
}
var bflying = false;
var missed = false;
var bx;
man.dx = man._x;
man.dy = man._y;
man.inAir = true;
man.base = 2;
var points = man.base;
p1._visible = (p12._visible = false);
_parent.nexlevel._visible = false;
door._visible = false;
bases = new Array();
var i = 1;
while (i <= 12) {
bases[i] = this["p" + i]._y;
this["p" + i].mynumber = i;
i++;
}
kx = int(Math.random() * 500);
ky = int(Math.random() * 8) + 1;
chabi._x = -270 + kx;
chabi._y = bases[ky + 2] + 20;
chabi._visible = true;
onEnterFrame = function () {
if (Key.isDown(38)) {
if ((man.jumping == false) && (man.inAir == false)) {
man.dy = man._y - 120;
man.jumping = true;
man.inAir = true;
_parent.jumpsound.play();
man.gotoAndStop("jump");
}
}
if (Key.isDown(39)) {
man._xscale = 100;
if (man.inAir == true) {
man.dx = man._x + 5;
} else {
man.dx = man._x + 10;
}
}
if (Key.isDown(37)) {
man._xscale = -100;
if (man.inAir == true) {
man.dx = man._x - 5;
} else {
man.dx = man._x - 10;
}
}
var base;
if ((man.jumping == false) && (man.inAir == true)) {
var i = 1;
while (i <= 12) {
if ((bases[i] > man._y) && (bases[i + 1] < man._y)) {
base = i;
}
i++;
}
if ((bases[base] - 4) <= man._y) {
man._y = bases[base];
man.dy = man._y;
man.base = base;
man.gotoAndStop(1);
man.inAir = false;
if (points < man.base) {
points = man.base;
increaseScore(10);
}
if (man.base == 1) {
missed = true;
_parent.diesound.play();
stopIt();
}
}
}
if ((man.jumping == false) && (man.inAir == true)) {
man.dy = man._y + 15;
}
dx = Math.round(man.dx - man._x, 2);
if (((Math.abs(dx) < 1) && (Math.abs(dx) > 0)) || (dx == 0)) {
man._x = man.dx;
} else if (!man.inAir) {
man._x = man._x + (dx / 2);
if (man._x <= -273) {
man._x = (man.dx = 263);
} else if (man._x >= 273) {
man._x = (man.dx = -263);
}
man.nextFrame();
} else {
man._x = man._x + (dx / 4);
if (man._x <= -273) {
man._x = (man.dx = 263);
} else if (man._x >= 273) {
man._x = (man.dx = -263);
}
man.gotoAndStop("jump");
}
dy = Math.round(man.dy - man._y, 2);
if ((dy == 0) && (man.jumping == true)) {
man.jumping = false;
}
if (((Math.abs(dy) < 1) && (Math.abs(dy) > 0)) || (dy == 0)) {
man._y = man.dy;
} else {
man._y = man._y + (dy / 5);
}
if (man.jumping == true) {
p = this["p" + (man.base + 1)];
if (man.hitTest(p)) {
if (((man.hitTest(p.way1.hit) || (man.hitTest(p.way2.hit))) || (man.hitTest(p.way3.hit))) && ((man._x >= -273) && (man._x <= 273))) {
man.gotoAndStop("jump");
} else {
man.dy = man._y;
man.jumping = false;
man.gotoAndStop("jump");
}
}
}
if (man.inAir == false) {
p = this["p" + man.base];
if ((man._x >= -273) && (man._x <= 273)) {
if ((man.hitTest(p.way1.hit) || (man.hitTest(p.way2.hit))) || (man.hitTest(p.way3.hit))) {
if (man.base != 1) {
man.inAir = true;
_parent.fallsound.play();
man._y = man._y + 4;
}
}
}
}
ff = -bases[man.base];
ny = ff + 200;
dny = ny - _y;
if (Math.abs(dny) < 10) {
if ((_y + dny) <= 400) {
_y = 400;
} else {
_y = (_y + dny);
}
} else if ((_y + dny) <= 400) {
_y = 400;
} else {
_y = (_y + (dny / 2));
}
if (chabi._visible == true) {
if (man.hitTest(chabi)) {
_parent.keysound.play();
chabi._visible = false;
door._visible = true;
findkey._visible = false;
increaseScore(50);
}
}
if (door._visible == true) {
if (man.hitTest(door.door)) {
increaseScore(10);
onEnterFrame = null;
play();
}
}
ttv = int(Math.random() * 50);
if ((bflying == false) && (ttv < (_parent.gamelevel + 1))) {
by = int(Math.random() * 3);
by2 = int(Math.random() * 2);
if (int(man.base) == 0) {
man.base = 2;
}
bat._y = bases[man.base + by] - 15;
if (by2 == 0) {
bat._x = -278;
bat.x2 = 278;
bx = 4;
bat._visible = true;
_parent.batsound.play();
bflying = true;
} else {
bat._x = 278;
bat.x2 = -278;
bx = -4;
bat._visible = true;
bflying = true;
}
} else if (bx > 0) {
if (bat._x >= 278) {
bflying = false;
bat._visible = false;
} else {
bat._x = bat._x + bx;
}
} else if (bat._x <= -278) {
bflying = false;
bat._visible = false;
} else {
bat._x = bat._x + bx;
}
if (man.hitTest(bat.sting)) {
missed = true;
_parent.diesound.play();
stopIt();
}
};
stop();
Symbol 113 MovieClip Frame 22
if (missed == true) {
_parent.lives--;
_parent.txtLives.text = _parent.lives;
if (_parent.lives == 0) {
gotoAndStop (23);
_parent.gover._visible = true;
} else {
gotoAndPlay (65);
}
} else {
gotoAndPlay (28);
}
Symbol 113 MovieClip Frame 28
_parent.level++;
_parent.txtLevel.text = _parent.level;
_parent.nexlevel.txtNext.text = _parent.level;
_parent.nexlevel._visible = true;