Instance of Symbol 117 MovieClip in Frame 1
onClipEvent (load) {
function startMusic() {
BGM.stop();
BGM.attachSound("Music start");
BGM.start();
music = 1;
}
highscore = SharedObject.getLocal("highscore");
if (highscore.data.score == undefined) {
highscore.data.score = 0;
}
highscore.flush();
BGM = new Sound(this);
BGM.onSoundComplete = function () {
if (music <= 2) {
BGM.attachSound("Music");
BGM.start();
}
};
}
Instance of Symbol 11 MovieClip "flame" in Symbol 12 MovieClip Frame 1
onClipEvent (enterFrame) {
_xscale = (_parent._parent.xvel * 15);
_yscale = (_parent._parent.xvel * 15);
}
Symbol 13 MovieClip [Bomb] Frame 1
threat = true;
xvel = (((random(2) * 2) + 3) * _parent.Dedede.strength) * 0.05;
t = 90 / xvel;
yvel = (50 / t) - (0.3 * t);
delete t;
Instance of Symbol 12 MovieClip "fuse" in Symbol 13 MovieClip [Bomb] Frame 1
onClipEvent (enterFrame) {
_rotation = (_rotation - (10 * _parent.xvel));
with (_parent) {
_x = _x - xvel;
yvel = yvel + 0.6;
_y = _y + yvel;
if (_y >= (_parent.kirby._y - 16)) {
if (threat && (!_parent.kirby.open)) {
_parent.kirby.bounce("bomb");
threat = false;
counter = 40;
yvel = yvel * (-0.05 * (random(10) + 5));
xvel = xvel * ((random(25) + 50) / 100);
} else if (threat && (_parent.kirby.open)) {
_parent.kirby.swallow("bomb");
removeMovieClip();
}
if ((yvel > 0.1) && (_y >= _parent.kirby._y)) {
yvel = 0;
xvel = 0;
_y = _parent.kirby._y;
}
}
if (!threat) {
counter--;
_alpha = counter * 4;
if (counter <= 0) {
removeMovieClip();
}
}
}
}
Symbol 19 MovieClip [Egg] Frame 1
threat = true;
xvel = (((random(2) * 2) + 3) * _parent.Dedede.strength) * 0.05;
t = 90 / xvel;
yvel = (50 / t) - (0.3 * t);
delete t;
Instance of Symbol 15 MovieClip [EggShell] in Symbol 19 MovieClip [Egg] Frame 1
onClipEvent (enterFrame) {
_rotation = (_rotation - (10 * _parent.xvel));
with (_parent) {
_x = _x - xvel;
yvel = yvel + 0.6;
_y = _y + yvel;
if (_y >= (_parent.kirby._y - 16)) {
if (threat && (!_parent.kirby.open)) {
_parent.kirby.bounce("egg");
threat = false;
counter = 40;
yvel = yvel * (-0.05 * (random(10) + 5));
xvel = xvel * ((random(25) + 50) / 100);
} else if (threat && (_parent.kirby.open)) {
_parent.kirby.swallow("egg");
removeMovieClip();
}
if ((yvel > 0.1) && (_y >= _parent.kirby._y)) {
yvel = 0;
xvel = 0;
_y = _parent.kirby._y;
}
}
if (!threat) {
counter--;
_alpha = counter * 4;
if (counter <= 0) {
removeMovieClip();
}
}
}
}
Instance of Symbol 18 MovieClip [EggLine] "shell-line" in Symbol 19 MovieClip [Egg] Frame 1
onClipEvent (enterFrame) {
_rotation = (_rotation - (10 * _parent.xvel));
}
Symbol 20 MovieClip [EggCount] Frame 1
gotoAndStop (1);
Symbol 20 MovieClip [EggCount] Frame 8
stop();
Instance of Symbol 11 MovieClip "chickman" in Symbol 26 MovieClip [Chick] Frame 1
onClipEvent (enterFrame) {
with (_parent) {
if (_currentframe <= 14) {
_x = _x + 1.5;
}
_x = _x + 1;
}
}
Symbol 26 MovieClip [Chick] Frame 60
removeMovieClip(this);
Symbol 37 MovieClip Frame 50
gotoAndPlay (1);
Symbol 42 MovieClip Frame 50
gotoAndPlay (1);
Symbol 70 Button
on (release) {
_parent.totalEggs = _parent.totalEggs - 5;
}
Symbol 71 Button
on (release) {
_parent.totalEggs = _parent.totalEggs + 5;
}
Symbol 74 Button
on (release) {
_parent.reset();
_parent.score.okay = false;
}
Symbol 94 MovieClip Frame 1
function bounce(item) {
if (playing) {
gotoAndPlay (2);
SFX.attachSound("bounce");
SFX.start();
}
}
function swallow(item) {
gotoAndPlay (7);
SFX.attachSound("swallow");
SFX.start();
if (item == "bomb") {
gotoAndPlay (11);
SFX.attachSound("explosion");
SFX.start();
playing = false;
open = false;
lost = true;
_parent.Dedede.gotoAndStop(9);
_parent.score.update(_parent.manager.eggs, _parent.totalEggs);
} else if (item == "egg") {
_parent.manager.addEgg();
}
}
function lose() {
playing = false;
left = _parent.manager.eggs;
_parent.score.update(_parent.manager.eggs, _parent.totalEggs);
_parent.Dedede.gotoAndStop(9);
gotoAndPlay (66);
}
function win() {
playing = false;
left = _parent.manager.eggs;
_parent.score.update(_parent.manager.eggs, _parent.totalEggs);
_parent.Dedede.gotoAndPlay(10);
gotoAndPlay (31);
}
SFX = new Sound(this);
Symbol 94 MovieClip Frame 5
gotoAndStop (1);
Symbol 94 MovieClip Frame 10
gotoAndStop (6);
Symbol 94 MovieClip Frame 30
stop();
_parent.BGM.stop();
_parent.music = 3;
_parent.BGM.attachSound("lose");
_parent.BGM.start();
Symbol 94 MovieClip Frame 40
_parent.BGM.stop();
_parent.music = 3;
_parent.BGM.attachSound("win");
_parent.BGM.start();
Symbol 94 MovieClip Frame 65
if (left > 0) {
chickman.attachMovie("Chick", "Chick" + left, left);
left--;
gotoAndPlay (45);
} else {
stop();
}
Symbol 94 MovieClip Frame 80
stop();
_parent.BGM.stop();
_parent.music = 3;
_parent.BGM.attachSound("lose");
_parent.BGM.start();
Symbol 107 MovieClip Frame 1
function throwItem(item) {
gotoAndPlay (2);
_parent.attachMovie(item, item + throwcount, throwcount);
_parent[item + throwcount]._x = 70;
_parent[item + throwcount]._y = -25;
if (freq < 30) {
freq = freq + (0.5 / freq);
}
if (item == "Egg") {
eggThrow++;
}
}
Symbol 107 MovieClip Frame 8
gotoAndStop (1);
Symbol 107 MovieClip Frame 31
gotoAndPlay (10);
Symbol 111 MovieClip Frame 1
_yscale = (random(50) + 30);
_xscale = (random(50) + 30);
_rotation = (random(45) * 8);
gotoAndStop(random(10) + 1);
Symbol 116 MovieClip Frame 1
function reset() {
ms = 0;
s = 0;
m = 0;
}
function update(msadd) {
ms = ms + msadd;
if (ms >= 100) {
s = s + int(ms / 100);
ms = ms - 100;
}
if (int(ms) == 0) {
msec.text = "00";
} else if (ms < 10) {
msec.text = "0" + int(ms);
} else {
msec.text = int(ms);
}
if (s >= 60) {
m = m + int(s / 60);
s = s - 60;
}
if (int(s) == 0) {
sec.text = "00";
} else if (s < 10) {
sec.text = "0" + s;
} else {
sec.text = s;
}
if (int(m) == 0) {
min.text = "00";
} else if (m < 10) {
min.text = "0" + m;
} else {
min.text = m;
}
}
Symbol 117 MovieClip Frame 1
stop();
hs.text = "HIGHSCORE: " + highscore.data.score;
Instance of Symbol 42 MovieClip in Symbol 117 MovieClip Frame 1
onClipEvent (enterFrame) {
onMouseDown = function () {
_parent.gotoAndStop(2);
};
if (Key.isDown(32)) {
_parent.gotoAndStop(2);
}
}
Symbol 117 MovieClip Frame 2
function reset() {
Dedede.reset();
Kirby.reset();
manager.reset();
time.reset();
time2.reset();
startMusic();
hs00.text = (hs01.text = highscore.data.score);
}
hs00.text = (hs01.text = highscore.data.score);
totalEggs = 30;
Dedede.reset();
manager.reset();
Kirby.playing = false;
Instance of Symbol 76 MovieClip "score" in Symbol 117 MovieClip Frame 2
onClipEvent (load) {
function update(caught, total) {
cat = caught;
tot = total;
points = int(((10 * cat) / tot) * cat);
okay = true;
if (points > _parent.highscore.data.score) {
_parent.highscore.data.score = points;
}
}
gotoAndStop (1);
okay = false;
}
onClipEvent (enterFrame) {
if (_parent.Kirby.playing || (!okay)) {
_y = (((_y * 4) + 150) / 5);
} else {
_y = (((_y * 4) + 30) / 5);
}
}
Instance of Symbol 94 MovieClip "Kirby" in Symbol 117 MovieClip Frame 2
onClipEvent (load) {
function reset() {
pushed = false;
open = false;
playing = true;
lost = false;
}
pushed = false;
open = false;
playing = false;
}
onClipEvent (enterFrame) {
if (lost && (_currentframe <= 10)) {
gotoAndPlay (11);
}
if (playing) {
if (Key.isDown(32)) {
if ((!pushed) || (_currentframe < 5)) {
pushed = true;
open = true;
gotoAndStop (6);
}
} else {
if (_currentframe > 5) {
gotoAndStop (1);
}
pushed = false;
open = false;
}
}
}
Instance of Symbol 107 MovieClip "Dedede" in Symbol 117 MovieClip Frame 2
onClipEvent (load) {
function reset() {
eggThrow = 0;
timer = 0;
throwcount = 0;
freq = 12 + (_parent.totalEggs / 60);
chanceEgg = 50;
chanceBomb = 20;
pause = 0;
dueBomb = 0;
}
reset();
gotoAndStop (9);
}
onClipEvent (enterFrame) {
if (_parent.Kirby.playing && ((pause--) < 0)) {
timer = timer + freq;
}
chanceBomb = (freq / 10) + 16;
chanceEgg = 80;
if (timer > 100) {
timer = timer - 100;
throwcount++;
strength = (freq * 0.1) + 20;
var choice = random(100);
if (choice <= (chanceBomb * ((dueBomb + 5) / 10))) {
throwItem("Bomb");
pause = random(3);
dueBomb = 0;
} else if (choice <= 20) {
throwcount--;
} else {
throwItem("Egg");
}
dueBomb++;
if (choice <= 5) {
pause = random(5) + 5;
}
}
if (eggThrow >= _parent.totalEggs) {
if (pause < 0) {
pause = 1;
}
pause = pause + 2;
}
if (((pause == 50) || (pause == 51)) && (_parent.Kirby.playing)) {
if (_parent.manager.eggs == 0) {
_parent.Kirby.lose();
} else {
_parent.Kirby.win();
}
}
}
Instance of Symbol 111 MovieClip "manager" in Symbol 117 MovieClip Frame 2
onClipEvent (load) {
function reset() {
var i = 1;
while (i <= totalEggs) {
removeMovieClip(_parent["EggCount" + i]);
i++;
}
totalEggs = _parent.totalEggs;
removeMovieClip(_parent);
scale = 4800 / (totalEggs + 120);
epr = int(240 / (7 * (scale / 25)));
eggs = 0;
row = 0;
var r = 0;
var i = 1;
while (i <= totalEggs) {
_parent.attachMovie("EggCount", "EggCount" + i, (2 * i) + 499);
_parent["EggCount" + i]._x = ((-(scale / 12.5)) - 120) + ((7 * (scale / 25)) * (i - (r * epr)));
_parent["EggCount" + i]._y = ((scale / 12.5) - 116) + ((7 * (scale / 25)) * r);
_parent["EggCount" + i]._yscale = (_parent["EggCount" + i]._xscale = scale);
if ((i % epr) == 0) {
r++;
}
i++;
}
}
function addEgg() {
eggs++;
_parent["EggCount" + eggs].play();
}
totalEggs = 20;
size = 5000 / (totalEggs + 100);
epr = int(240 / (7 * (size / 25)));
eggs = 0;
row = 0;
reset(20);
}
Instance of Symbol 76 MovieClip "prompt" in Symbol 117 MovieClip Frame 2
onClipEvent (load) {
gotoAndStop (2);
}
onClipEvent (enterFrame) {
with (_parent) {
if (totalEggs < 20) {
totalEggs = 20;
} else if (totalEggs > 240) {
totalEggs = 240;
}
}
totalCount = _parent.totalEggs;
if (_parent.Kirby.playing) {
_y = (((_y * 4) + -175) / 5);
} else {
_y = (((_y * 4) + -35) / 5);
}
}
Instance of Symbol 116 MovieClip "time2" in Symbol 117 MovieClip Frame 2
onClipEvent (load) {
reset();
}
onClipEvent (enterFrame) {
if (_parent.Kirby.playing) {
update(3.33333333333333);
}
}
Instance of Symbol 116 MovieClip "time" in Symbol 117 MovieClip Frame 2
onClipEvent (load) {
reset();
}
onClipEvent (enterFrame) {
if (_parent.Kirby.playing) {
update(3.33333333333333);
}
}