Instance of Symbol 43 MovieClip in Frame 1
//component parameters
onClipEvent (initialize) {
scoreLocation = "_root.score";
}
Frame 2
if (_framesloaded < _totalframes) {
gotoAndPlay(_currentframe - 1);
} else {
play();
}
Frame 3
hiscore._visible = false;
Frame 5
var lives = 3;
var level = 1;
setScore(0);
globalSound = new Sound();
var music = new Sound();
music.attachSound("music");
music.start(0, 0);
stop();
Frame 13
function init(n, x, y) {
var _l2 = _root;
var _l1 = 0;
while (_l1 < n) {
_l2.attachMovie("partic", "partic" + _l1, _l1 + 200);
_l2["partic" + _l1]._x = x;
_l2["partic" + _l1]._y = y;
var _l3 = (Math.random() * 50);
_l2["partic" + _l1]._xscale = _l2["partic" + _l1]._xscale + _l3;
_l2["partic" + _l1]._yscale = _l2["partic" + _l1]._yscale + _l3;
_l2["partic" + _l1].freeFall();
_l1++;
}
}
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 _l1 = this;
_l1.onEnterFrame = function () {
var _l1 = this;
if (typeof(_l1.mode) == "undefined") {
dir = ((Math.random() > 0.5) ? 1 : -1);
_l1.mode = 1;
_l1.speedx = (2.5 * Math.random()) * dir;
_l1.accel = 2.5 * Math.random();
_l1.factor = Math.random();
if (_l1.factor < 0.2) {
_l1.factor = _l1.factor + 0.2;
}
_l1.count = 2;
}
if (_l1.mode == 1) {
if (_l1.accel > 0) {
_l1._x = _l1._x - _l1.speedx;
_l1._y = _l1._y - _l1.accel;
_l1._rotation = _l1._rotation - _l1.accel;
if ((--_l1.count) < 0) {
_l1.accel = _l1.accel - _l1.factor;
_l1.count = 2;
}
} else {
_l1.mode = 2;
}
}
if (_l1.mode == 2) {
_l1._x = _l1._x - _l1.speedx;
_l1._y = _l1._y + _l1.accel;
_l1._rotation = _l1._rotation - _l1.accel;
if ((--_l1.count) < 0) {
_l1.accel = _l1.accel + _l1.factor;
_l1.count = 2;
}
if (_l1._y > 370) {
killMC(_l1);
}
}
};
};
Frame 14
var dx = 4;
var dy = -4;
hole._visible = false;
lives_mc.gotoAndStop(lives + 1);
Instance of Symbol 96 MovieClip in Frame 38
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();
setScore(_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 59
gameOn = true;
var boing_sound = new Sound();
boing_sound.attachSound("boing");
var fall_sound = new Sound();
fall_sound.attachSound("splash");
var ice_sound = new Sound();
ice_sound.attachSound("ice");
Frame 78
stop();
Frame 87
if (lives <= 0) {
gotoAndPlay (88);
} else {
gotoAndPlay (14);
}
Instance of Symbol 105 MovieClip "hiscore" in Frame 88
onClipEvent (load) {
this._visible = true;
}
Frame 97
var i = 0;
while (i < 20) {
removeMovieClip(this["cube" + i]);
i++;
}
stop();
Instance of Symbol 105 MovieClip "hiscore" in Frame 97
onClipEvent (load) {
}
Frame 104
gotoAndPlay (5);
Frame 107
level++;
if (((level + 1) % 2) == 0) {
if (lives < 3) {
lives++;
}
}
txtLvl.text = level;
lvl.lvl.text = level;
Frame 115
stop();
Frame 123
gotoAndPlay (13);
Symbol 46 Button
on (release, keyPress "<Enter>") {
gotoAndPlay (13);
}
Symbol 47 Button
on (release) {
getURL ("http://www.miniclip.com", "_blank");
}
Symbol 51 MovieClip Frame 1
stop();
Symbol 57 Button
on (release) {
if (globalSound.getVolume() > 0) {
globalSound.setVolume(0);
} else {
globalSound.setVolume(100);
}
}
Symbol 69 MovieClip Frame 49
_parent.play();
stop();
Symbol 70 MovieClip Frame 1
stop();
Symbol 80 MovieClip Frame 1
if (!init) {
init = 1;
}
Symbol 85 MovieClip Frame 1
if (!init) {
init = 1;
var size = random(100);
_xscale = (_xscale + size);
_yscale = (_yscale + size);
_rotation = random(360);
gotoAndStop(random(_totalframes) + 1);
}
Symbol 100 Button
on (keyPress "<Space>") {
lever._xscale = lever._xscale * -1;
}
Symbol 104 Button
on (release) {
_visible = false;
_parent.play();
}
Symbol 113 Button
on (release, keyPress "<Enter>") {
_parent.play();
}