Frame 1
var stage = 1;
Frame 3
stop();
Frame 5
var gameState = 0;
var randomList = new Array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10);
Instance of Symbol 21 MovieClip "ladybug2" in Frame 7
onClipEvent (load) {
if (_root.stage < 2) {
this._visible = false;
}
}
Instance of Symbol 21 MovieClip "ladybug3" in Frame 7
onClipEvent (load) {
if (_root.stage < 3) {
this._visible = false;
}
}
Instance of Symbol 21 MovieClip "ladybug4" in Frame 7
onClipEvent (load) {
if (_root.stage < 4) {
this._visible = false;
}
}
Instance of Symbol 21 MovieClip "ladybug5" in Frame 7
onClipEvent (load) {
if (_root.stage < 5) {
this._visible = false;
}
}
Instance of Symbol 21 MovieClip "ladybug8" in Frame 7
onClipEvent (load) {
if (_root.stage < 8) {
this._visible = false;
}
}
Instance of Symbol 21 MovieClip "ladybug7" in Frame 7
onClipEvent (load) {
if (_root.stage < 7) {
this._visible = false;
}
}
Instance of Symbol 21 MovieClip "ladybug9" in Frame 7
onClipEvent (load) {
if (_root.stage < 9) {
this._visible = false;
}
}
Instance of Symbol 21 MovieClip "ladybug6" in Frame 7
onClipEvent (load) {
if (_root.stage < 6) {
this._visible = false;
}
}
Frame 8
if (gameState < 0) {
if (stage >= 2) {
stage--;
}
gotoAndPlay (9);
} else if (gameState == 0) {
gotoAndPlay (7);
} else if (gameState < 40) {
gameState++;
gotoAndPlay (7);
} else {
this.stage++;
if (stage >= 10) {
gotoAndPlay (142);
} else {
gotoAndPlay (82);
}
}
Frame 9
i = 0;
while (i < 10) {
mc = _root["ladybug" + i];
if (mc.fall == false) {
mc._visible = false;
} else {
mc._alpha = 100;
}
i++;
}
Frame 81
gotoAndPlay (3);
Frame 141
gotoAndPlay (5);
Frame 250
this.stage = 1;
gotoAndPlay (3);
Symbol 5 MovieClip Frame 2
bytesLoaded = _root.getBytesLoaded();
total = _root.getBytesTotal();
parsent = bytesLoaded / total;
if (bytesLoaded < total) {
this.loading._y = parsent * 480;
} else {
gotoAndPlay (1);
}
Symbol 18 Button
on (release) {
gotoAndPlay (5);
}
Symbol 21 MovieClip Frame 1
stop();
var rotate = true;
var speed = ((Math.random() * 7) + 3);
i = Math.floor(Math.random() * _root.randomList.length);
var rotateSpeed = (_root.randomList[i] + (Math.random() / 2));
_root.randomList.splice(i, 1);
if (Math.random() < 0.5) {
rotateSpeed = rotateSpeed * -1;
}
var soundCollide = new Sound(this);
soundCollide.attachSound("02");
var blink = 0;
var fall = false;
this.onMouseDown = function () {
this.rotate = false;
};
this.onMouseUp = function () {
this.rotate = true;
};
this.onEnterFrame = function () {
if (this.blink > 0) {
this.blink--;
if (this.blink % 2) {
this._alpha = 0;
} else {
this._alpha = 100;
}
}
if (_root.gameState != 0) {
return(undefined);
}
if (this.rotate == true) {
this._rotation = this._rotation + this.rotateSpeed;
if (this._rotation < 0) {
this._rotation = this._rotation + 360;
}
if (this._rotation >= 360) {
this._rotation = this._rotation - 360;
}
} else {
radian = (Math.PI * this._rotation) / 180;
this._x = this._x + (Math.cos(radian) * this.speed);
this._y = this._y + (Math.sin(radian) * this.speed);
}
if (this._visible == true) {
i = 0;
while (i < 10) {
mc = _root["ladybug" + i];
if (mc._visible == true) {
if (this != mc) {
x = mc._x - this._x;
y = mc._y - this._y;
length = Math.sqrt((x * x) + (y * y));
if (length < 30) {
mc._visible = false;
this.blink = 15;
soundCollide.start(0, 0);
}
}
}
i++;
}
x = 240 - this._x;
y = 240 - this._y;
length = Math.sqrt((x * x) + (y * y));
if (length >= 190) {
_root.gameState = -1;
this.fall = true;
}
}
left = 0;
i = 0;
while (i < 10) {
mc = _root["ladybug" + i];
if (mc._visible == true) {
left++;
}
i++;
}
if (left <= 1) {
_root.gameState = 1;
}
};