Frame 4 (249 B)
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 (56 B)
var lives = 3;
var level = 1;
var score = 0;
stop();
Frame 106 (2.73 KiB) ●
function init(n, x, y) {
var _local2 = _root;
var _local1 = 0;
while (_local1 < n) {
_local2.attachMovie("partic", "partic" + _local1, _local1 + 200);
_local2["partic" + _local1]._x = x;
_local2["partic" + _local1]._y = y;
var _local3 = Math.random() * 50;
_local2["partic" + _local1]._xscale = _local2["partic" + _local1]._xscale + _local3;
_local2["partic" + _local1]._yscale = _local2["partic" + _local1]._yscale + _local3;
_local2["partic" + _local1].freeFall();
_local1++;
}
}
function runparticles(x, y) {
init(10, x, y);
}
function killMC(which) {
which.removeMovieClip();
}
var gameOn = false;
hole._visible = false;
txtLvl.text = level;
if (level == 1) {
brick1._visible = false;
brick2._visible = false;
brick3._visible = false;
} else if (level == 2) {
brick1._visible = false;
brick2._visible = true;
brick3._visible = false;
} else if (level == 3) {
brick1._visible = false;
brick2._visible = true;
brick3._visible = true;
} else {
brick1._visible = true;
brick2._visible = true;
brick3._visible = true;
}
var i = 0;
while (i < 10) {
if (i == 0) {
cube = cube0;
} else {
cube = cube0.duplicateMovieClip("cube" + i, i);
}
cube.gotoAndStop(i + 1);
cube._x = cube0._x + (i * 50);
cube._visible = true;
i++;
}
var i = 0;
while (i < 10) {
cube = cube0.duplicateMovieClip("cube" + (10 + i), i + 10);
cube._alpha = 100;
cube._y = cube0._y + 25;
cube.gotoAndStop(i + 1);
cube._x = cube0._x + (i * 50);
cube._visible = true;
i++;
}
MovieClip.prototype.freeFall = function () {
var _local1 = this;
_local1.onEnterFrame = function () {
var _local1 = this;
if (typeof(_local1.mode) == "undefined") {
dir = ((Math.random() > 0.5) ? 1 : -1);
_local1.mode = 1;
_local1.speedx = (2.5 * Math.random()) * dir;
_local1.accel = 2.5 * Math.random();
_local1.factor = Math.random();
if (_local1.factor < 0.2) {
_local1.factor = _local1.factor + 0.2;
}
_local1.count = 2;
}
if (_local1.mode == 1) {
if (_local1.accel > 0) {
_local1._x = _local1._x - _local1.speedx;
_local1._y = _local1._y - _local1.accel;
_local1._rotation = _local1._rotation - _local1.accel;
if ((--_local1.count) < 0) {
_local1.accel = _local1.accel - _local1.factor;
_local1.count = 2;
}
} else {
_local1.mode = 2;
}
}
if (_local1.mode == 2) {
_local1._x = _local1._x - _local1.speedx;
_local1._y = _local1._y + _local1.accel;
_local1._rotation = _local1._rotation - _local1.accel;
if ((--_local1.count) < 0) {
_local1.accel = _local1.accel + _local1.factor;
_local1.count = 2;
}
if (_local1._y > 370) {
killMC(_local1);
}
}
};
};
Frame 107 (84 B)
var dx = 4;
var dy = -4;
hole._visible = false;
lives_mc.gotoAndStop(lives + 1);
Instance of Symbol 83 MovieClip in Frame 131 (3.88 KiB) ●
onClipEvent (enterFrame) {
if (Key.isDown(37)) {
_parent.lever._x = _parent.lever._x - 5;
if (_parent.lever._x < 55) {
_parent.lever._x = 55;
}
}
if (Key.isDown(39)) {
_parent.lever._x = _parent.lever._x + 5;
if (_parent.lever._x > 495) {
_parent.lever._x = 495;
}
}
if (_parent.gameOn == true) {
_parent.x = _parent.lever._x;
if (_parent.dx > 0) {
_parent.pingu._xscale = 100;
} else {
_parent.pingu._xscale = -100;
}
if (_parent.pingu._x <= 10) {
_parent.dx = _parent.dx * -1;
}
if (_parent.pingu._x >= 540) {
_parent.dx = _parent.dx * -1;
}
_parent.pingu._y = _parent.pingu._y + _parent.dy;
if ((_parent.dy < 0) && (_parent.pingu._y >= 350)) {
_parent.pingu._y = 345;
}
_parent.pingu._x = _parent.pingu._x + _parent.dx;
if (_parent.dy < 8) {
_parent.dy = _parent.dy + 0.18;
}
if (_parent.dy > 0) {
if (Math.abs(_parent.dx) > 1) {
if (_parent.dx < 0) {
_parent.dx = _parent.dx + 0.01;
} else {
_parent.dx = _parent.dx - 0.01;
}
}
}
if (_parent.pingu._y < 200) {
var i = 0;
while (i < 20) {
thecube = _parent["cube" + i];
if (thecube._visible == true) {
if (thecube.hitTest(_parent.pingu)) {
thecube._visible = false;
_parent.ice_sound.start();
_parent.score = _parent.score + 10;
_parent.txtScr.text = _parent.score;
_parent.runparticles(thecube._x, thecube._y);
pandcdiff = _parent.pingu._x - thecube._x;
_parent.dx = (2 * pandcdiff) / 35;
_parent.dy = 3;
blocksflag = false;
var i = 0;
while (i < 20) {
thecube = _parent["cube" + i];
if (thecube._visible == true) {
blocksflag = true;
}
i++;
}
if (blocksflag == false) {
_parent.gameOn = false;
_parent.gotoAndPlay("nextLevel");
}
}
}
i++;
}
}
brickflag = false;
if (_parent.level == 1) {
} else if (_parent.level == 2) {
if (_parent.pingu.hitTest(_parent.brick2)) {
brickflag = true;
}
} else if (_parent.level == 3) {
if (_parent.pingu.hitTest(_parent.brick2) || (_parent.pingu.hitTest(_parent.brick3))) {
brickflag = true;
}
} else if ((_parent.pingu.hitTest(_parent.brick1) || (_parent.pingu.hitTest(_parent.brick2))) || (_parent.pingu.hitTest(_parent.brick3))) {
brickflag = true;
}
if (brickflag) {
_parent.dx = _parent.dx * -1;
_parent.dy = _parent.dy * -1;
_parent.pingu._x = _parent.pingu._x + _parent.dx;
_parent.pingu._y = _parent.pingu._y + _parent.dy;
}
if (_parent.pingu._y >= 350) {
px = _parent.pingu._x;
lx = _parent.lever._x;
flag = false;
if (_parent.lever._xscale > 0) {
if ((px > lx) && (px < (lx + 50))) {
flag = true;
diff = px - lx;
}
} else if ((px < lx) && (px > (lx - 50))) {
flag = true;
diff = lx - px;
}
if (flag == true) {
_parent.boing_sound.start();
if (diff > 30) {
diff = 30;
}
diffraction = diff / 30;
if (diff == 1) {
diff = 2;
}
_parent.dy = -(6 + (diffraction * 3));
if (_parent.lever._xscale > 0) {
_parent.pingu._x = _parent.lever._x - 44;
} else {
_parent.pingu._x = _parent.lever._x + 44;
}
_parent.dx = _parent.dx * -1;
if (diffraction != 1) {
if (_parent.dx < 0) {
_parent.dx = -4 * diffraction;
} else {
_parent.dx = 4 * diffraction;
}
} else {
_parent.dx = _parent.dx * 0.1;
}
_parent.lever._xscale = _parent.lever._xscale * -1;
} else if (_parent.pingu._y >= 370) {
_parent.pingu._visible = false;
_parent.fall_sound.start();
_parent.fall2_sound.start();
_parent.hole._x = _parent.pingu._x;
_parent.hole._visible = true;
_parent.lives--;
_parent.lives_mc.gotoAndStop(_parent.lives + 1);
_parent.hole.gotoAndPlay(1);
_parent.gameOn = false;
}
}
}
}
Frame 182 (274 B)
gameOn = true;
var boing_sound = new Sound();
boing_sound.attachSound("boing");
var fall_sound = new Sound();
fall_sound.attachSound("fall");
var fall2_sound = new Sound();
fall2_sound.attachSound("fall2");
var ice_sound = new Sound();
ice_sound.attachSound("ice");
Frame 201 (8 B)
stop();
Frame 210 (88 B)
if (lives <= 0) {
gotoAndPlay ("gameOver");
} else {
gotoAndPlay ("start3");
}
Frame 220 (8 B)
stop();
Frame 227 (104 B)
var i = 0;
while (i < 20) {
removeMovieClip(this["cube" + i]);
i++;
}
gotoAndPlay ("start1");
Frame 230 (126 B)
level++;
if (((level + 1) % 2) == 0) {
if (lives < 3) {
lives++;
}
}
txtLvl.text = level;
lvl.lvl.text = level;
Frame 238 (8 B)
stop();
Frame 246 (24 B)
gotoAndPlay ("start2");
Symbol 15 MovieClip Frame 1 (63 B)
function setValue(v) {
mv = (v / 100) * 144;
}
var mv = 0;
Instance of Symbol 14 MovieClip in Symbol 15 MovieClip Frame 1 (208 B)
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 27 Button (67 B)
on (release, keyPress "<Enter>") {
gotoAndPlay ("start2");
}
Symbol 31 Button (42 B)
on (release) {
gotoAndStop ("credits");
}
Symbol 36 Button (69 B)
on (release) {
getURL ("http://www.funflashgames.com/", "_blank");
}
Symbol 40 Button (85 B)
on (release) {
getURL ("http://www.funflashgames.com/freecontent.html", "_blank");
}
Symbol 45 Button (41 B)
on (release) {
gotoAndPlay ("start1");
}
Symbol 47 Button (78 B)
on (release) {
getURL ("http://www.quickflashgames.com/", "_blank", "GET");
}
Symbol 72 MovieClip Frame 49 (25 B)
_parent.play();
stop();
Symbol 73 MovieClip Frame 1 (8 B)
stop();
Symbol 87 Button (70 B)
on (keyPress "<Space>") {
lever._xscale = lever._xscale * -1;
}
Symbol 93 Button (59 B)
on (release, keyPress "<Enter>") {
_parent.play();
}
Symbol 100 Button (59 B)
on (release, keyPress "<Enter>") {
_parent.play();
}