Frame 1
total = Math.round(getBytesTotal() / 1340);
loaded = Math.round(getBytesLoaded() / 1340);
kbs = ((("" + loaded) + "/") + total) + "kB";
percent = Math.round((loaded / total) * 100) + "%";
if (_root.getBytesLoaded() == _root.getBytesTotal()) {
gotoAndPlay (3);
}
Frame 2
gotoAndPlay (1);
Frame 3
gotoAndStop (4);
Frame 4
fscommand ("trapallkeys", "true");
stop();
_root.tileXY = 35;
_root.gameLevel = 1;
_root.gameLives = 5;
_root.gameMode = "";
var sndWin1 = new Sound();
sndWin1.attachSound("win1.mp3");
var sndWin2 = new Sound();
sndWin2.attachSound("win2.mp3");
function generateMap(level) {
var _local1 = _root;
var _local2 = level;
var _local3 = true;
if (_local2 == 1) {
_local1.gameMainColor = "Violet";
_local1.gameFlowers = "1";
map[0] = new Array(0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0);
map[1] = new Array(0, 0, 0, 0, 0, 0, 1, 5, 5, 5, 5, 5, 1);
map[2] = new Array(1, 1, 1, 1, 1, 1, 1, 5, 0, 0, 0, 5, 1);
map[3] = new Array(8, 5, 5, 5, 5, 5, 5, 5, 0, 9, 5, 5, 1);
map[4] = new Array(1, 1, 1, 1, 1, 1, 1, 5, 0, 0, 0, 5, 1);
map[5] = new Array(0, 0, 0, 0, 0, 0, 1, 5, 5, 5, 5, 5, 1);
map[6] = new Array(0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0);
} else if (_local2 == 2) {
_local1.gameMainColor = "Blue";
_local1.gameFlowers = "2";
map[0] = new Array(0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1);
map[1] = new Array(0, 8, 5, 5, 5, 1, 0, 0, 0, 0, 0, 1, 5, 5, 1);
map[2] = new Array(0, 0, 1, 1, 5, 1, 1, 1, 0, 0, 0, 1, 5, 5, 1);
map[3] = new Array(0, 0, 0, 1, 5, 5, 5, 1, 0, 0, 0, 1, 1, 1, 1);
map[4] = new Array(0, 0, 0, 1, 1, 1, 5, 1, 1, 1, 0, 0, 0, 0, 0);
map[5] = new Array(0, 0, 0, 0, 0, 1, 5, 5, 5, 1, 0, 0, 0, 0, 0);
map[6] = new Array(0, 0, 0, 0, 0, 1, 1, 1, 5, 1, 1, 1, 0, 0, 0);
map[7] = new Array(1, 1, 1, 1, 0, 0, 0, 1, 5, 5, 5, 1, 0, 0, 0);
map[8] = new Array(1, 5, 5, 1, 0, 0, 0, 1, 1, 1, 5, 1, 1, 0, 0);
map[9] = new Array(1, 5, 5, 1, 0, 0, 0, 0, 0, 1, 5, 5, 5, 9, 0);
map[10] = new Array(1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0);
} else if (_local2 == 3) {
_local1.gameMainColor = "Violet";
_local1.gameFlowers = "4";
map[0] = new Array(0, 0, 0, 1, 5, 5, 5, 5, 5, 1, 0, 0, 0);
map[1] = new Array(1, 1, 1, 1, 5, 0, 0, 0, 5, 1, 1, 1, 1);
map[2] = new Array(1, 5, 5, 5, 5, 0, 9, 0, 5, 5, 5, 5, 1);
map[3] = new Array(1, 5, 1, 1, 5, 0, 5, 0, 5, 1, 1, 5, 1);
map[4] = new Array(1, 5, 1, 1, 5, 5, 5, 5, 5, 1, 1, 5, 1);
map[5] = new Array(1, 5, 1, 1, 1, 1, 5, 1, 1, 1, 1, 5, 1);
map[6] = new Array(1, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 1);
map[7] = new Array(1, 1, 1, 1, 5, 0, 0, 0, 5, 1, 1, 1, 1);
map[8] = new Array(0, 0, 0, 1, 5, 5, 5, 5, 5, 1, 0, 0, 0);
map[9] = new Array(0, 0, 0, 1, 1, 1, 5, 1, 1, 1, 0, 0, 0);
map[10] = new Array(0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0);
} else if (_local2 == 904) {
_local1.gameMainColor = "Blue";
_local1.gameFlowers = "1";
map[0] = new Array(0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0);
map[1] = new Array(1, 1, 1, 5, 5, 5, 5, 8, 5, 5, 5, 5, 1, 1, 1);
map[2] = new Array(1, 5, 5, 5, 1, 5, 1, 1, 1, 5, 1, 5, 5, 5, 1);
map[3] = new Array(1, 5, 1, 1, 1, 5, 5, 5, 5, 5, 1, 1, 1, 5, 1);
map[4] = new Array(1, 5, 5, 5, 5, 5, 0, 0, 0, 5, 5, 5, 5, 5, 1);
map[5] = new Array(1, 5, 1, 1, 1, 5, 0, 9, 0, 5, 1, 1, 1, 5, 1);
map[6] = new Array(1, 5, 5, 5, 1, 5, 0, 5, 0, 5, 1, 5, 5, 5, 1);
map[7] = new Array(1, 1, 1, 5, 1, 5, 5, 5, 5, 5, 1, 5, 1, 1, 1);
map[8] = new Array(0, 0, 1, 5, 1, 1, 1, 5, 1, 1, 1, 5, 1, 0, 0);
map[9] = new Array(0, 0, 1, 5, 5, 5, 5, 5, 5, 5, 5, 5, 1, 0, 0);
map[10] = new Array(0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0);
} else if (_local2 == 5) {
_local1.gameMainColor = "Violet";
_local1.gameFlowers = "2";
map[0] = new Array(0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0);
map[1] = new Array(0, 1, 5, 5, 5, 1, 1, 1, 5, 5, 5, 1, 0);
map[2] = new Array(0, 1, 5, 0, 5, 5, 5, 5, 5, 0, 5, 1, 0);
map[3] = new Array(0, 1, 5, 5, 5, 1, 1, 1, 5, 5, 5, 1, 0);
map[4] = new Array(0, 0, 1, 5, 1, 0, 0, 0, 1, 5, 1, 0, 0);
map[5] = new Array(8, 5, 5, 5, 1, 0, 0, 0, 1, 5, 5, 5, 9);
map[6] = new Array(0, 0, 1, 5, 1, 0, 0, 0, 1, 5, 1, 0, 0);
map[7] = new Array(0, 1, 5, 5, 5, 1, 1, 1, 5, 5, 5, 1, 0);
map[8] = new Array(0, 1, 5, 0, 5, 5, 5, 5, 5, 0, 5, 1, 0);
map[9] = new Array(0, 1, 5, 5, 5, 1, 1, 1, 5, 5, 5, 1, 0);
map[10] = new Array(0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0);
} else if (_local2 == 906) {
_local1.gameMainColor = "Pink";
_local1.gameFlowers = "5";
map[0] = new Array(0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0);
map[1] = new Array(0, 0, 0, 0, 0, 1, 5, 5, 5, 1, 0, 0, 0, 0, 0);
map[2] = new Array(1, 1, 1, 1, 1, 1, 5, 1, 5, 1, 1, 1, 1, 1, 1);
map[3] = new Array(1, 5, 5, 5, 1, 5, 5, 5, 5, 5, 5, 0, 0, 0, 1);
map[4] = new Array(1, 5, 8, 5, 5, 5, 1, 5, 1, 1, 5, 5, 9, 0, 1);
map[5] = new Array(1, 5, 5, 5, 1, 5, 5, 5, 5, 5, 5, 0, 0, 0, 1);
map[6] = new Array(1, 1, 1, 1, 1, 1, 5, 1, 5, 1, 1, 1, 1, 1, 1);
map[7] = new Array(0, 0, 0, 0, 0, 1, 5, 5, 5, 1, 0, 0, 0, 0, 0);
map[8] = new Array(0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0);
} else if (_local2 == 7) {
_local1.gameMainColor = "Pink";
_local1.gameFlowers = "3";
map[0] = new Array(0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0);
map[1] = new Array(0, 0, 1, 5, 5, 5, 1, 1, 1, 0, 0);
map[2] = new Array(0, 8, 5, 5, 0, 5, 5, 5, 5, 1, 0);
map[3] = new Array(0, 0, 1, 5, 5, 5, 1, 1, 5, 1, 0);
map[4] = new Array(1, 5, 5, 5, 1, 1, 1, 5, 5, 5, 1);
map[5] = new Array(1, 5, 0, 5, 1, 1, 1, 5, 0, 5, 1);
map[6] = new Array(1, 5, 5, 5, 1, 1, 1, 5, 5, 5, 1);
map[7] = new Array(0, 1, 5, 1, 1, 5, 5, 5, 0, 0, 0);
map[8] = new Array(0, 1, 5, 5, 5, 5, 0, 5, 5, 9, 0);
map[9] = new Array(0, 1, 1, 1, 1, 5, 5, 5, 0, 0, 0);
map[10] = new Array(0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0);
} else if (_local2 == 8) {
_local1.gameMainColor = "Red";
_local1.gameFlowers = "4";
map[0] = new Array(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1);
map[1] = new Array(1, 5, 5, 5, 5, 9, 5, 5, 5, 5, 1);
map[2] = new Array(1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1);
map[3] = new Array(1, 5, 5, 5, 1, 5, 1, 5, 5, 5, 1);
map[4] = new Array(1, 5, 1, 1, 1, 5, 1, 1, 1, 5, 1);
map[5] = new Array(1, 5, 5, 5, 5, 5, 5, 5, 5, 5, 1);
map[6] = new Array(1, 5, 1, 1, 1, 5, 1, 1, 1, 5, 1);
map[7] = new Array(1, 5, 5, 5, 1, 5, 1, 5, 5, 5, 1);
map[8] = new Array(1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1);
map[9] = new Array(1, 5, 5, 5, 5, 8, 5, 5, 5, 5, 1);
map[10] = new Array(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1);
} else if (_local2 == 9) {
_local1.gameMainColor = "Violet";
_local1.gameFlowers = "3";
map[0] = new Array(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0);
map[1] = new Array(1, 5, 5, 5, 1, 5, 5, 5, 1, 5, 5, 5, 0, 9, 0);
map[2] = new Array(1, 5, 0, 5, 1, 5, 0, 5, 1, 5, 0, 5, 0, 5, 0);
map[3] = new Array(1, 5, 0, 5, 1, 5, 0, 5, 1, 5, 0, 5, 1, 5, 1);
map[4] = new Array(1, 5, 5, 5, 1, 5, 5, 5, 1, 5, 5, 5, 1, 5, 1);
map[5] = new Array(1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1);
map[6] = new Array(1, 5, 1, 5, 5, 5, 1, 5, 5, 5, 1, 5, 5, 5, 1);
map[7] = new Array(1, 5, 1, 5, 0, 5, 1, 5, 0, 5, 1, 5, 0, 5, 1);
map[8] = new Array(1, 5, 1, 5, 0, 5, 1, 5, 0, 5, 1, 5, 0, 5, 1);
map[9] = new Array(1, 5, 1, 5, 5, 5, 1, 5, 5, 5, 1, 5, 5, 5, 1);
map[10] = new Array(1, 8, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1);
} else if (_local2 == 910) {
_local1.gameMainColor = "Blue";
_local1.gameFlowers = "5";
map[0] = new Array(0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0);
map[1] = new Array(0, 1, 5, 5, 5, 9, 5, 5, 5, 1, 0);
map[2] = new Array(1, 5, 5, 1, 1, 5, 1, 1, 5, 5, 1);
map[3] = new Array(1, 5, 1, 1, 5, 5, 5, 1, 1, 5, 1);
map[4] = new Array(1, 5, 1, 5, 5, 1, 5, 5, 1, 5, 1);
map[5] = new Array(1, 5, 5, 5, 1, 1, 1, 5, 5, 5, 1);
map[6] = new Array(1, 5, 1, 5, 5, 1, 5, 5, 1, 5, 1);
map[7] = new Array(1, 5, 1, 1, 5, 5, 5, 1, 1, 5, 1);
map[8] = new Array(1, 5, 5, 1, 1, 5, 1, 1, 5, 5, 1);
map[9] = new Array(0, 1, 5, 5, 5, 8, 5, 5, 5, 1, 0);
map[10] = new Array(0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0);
} else if (_local2 == 10) {
_local1.gameMainColor = "Violet";
_local1.gameFlowers = "1";
map[0] = new Array(0, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0);
map[1] = new Array(1, 5, 5, 5, 1, 0, 0, 1, 5, 5, 5, 1, 0, 0, 0);
map[2] = new Array(1, 5, 1, 5, 1, 0, 1, 5, 5, 1, 5, 5, 1, 0, 0);
map[3] = new Array(1, 5, 1, 5, 5, 1, 5, 5, 1, 0, 1, 5, 5, 1, 0);
map[4] = new Array(1, 5, 1, 1, 5, 5, 5, 1, 0, 0, 0, 1, 5, 5, 1);
map[5] = new Array(1, 8, 5, 5, 5, 0, 5, 5, 5, 9, 5, 5, 5, 5, 0);
map[6] = new Array(1, 5, 1, 1, 5, 5, 5, 1, 0, 0, 0, 1, 5, 5, 1);
map[7] = new Array(1, 5, 1, 5, 5, 1, 5, 5, 1, 0, 1, 5, 5, 1, 0);
map[8] = new Array(1, 5, 1, 5, 1, 0, 1, 5, 5, 1, 5, 5, 1, 0, 0);
map[9] = new Array(1, 5, 5, 5, 1, 0, 0, 1, 5, 5, 5, 1, 0, 0, 0);
map[10] = new Array(0, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0);
} else if (_local2 == 12) {
_local1.gameMainColor = "Blue";
_local1.gameFlowers = "2";
map[0] = new Array(0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0);
map[1] = new Array(0, 0, 0, 0, 1, 5, 5, 5, 1, 0, 0, 0, 0, 0, 0);
map[2] = new Array(1, 1, 1, 1, 1, 5, 1, 5, 1, 1, 1, 0, 0, 0, 0);
map[3] = new Array(5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 1, 0, 0, 0);
map[4] = new Array(5, 1, 5, 1, 1, 1, 1, 1, 5, 1, 5, 1, 0, 0, 0);
map[5] = new Array(5, 5, 5, 1, 5, 5, 5, 1, 5, 5, 5, 1, 0, 0, 0);
map[6] = new Array(0, 5, 0, 1, 5, 1, 5, 1, 1, 1, 5, 1, 1, 0, 0);
map[7] = new Array(0, 9, 0, 1, 5, 5, 5, 5, 5, 5, 5, 5, 5, 1, 0);
map[8] = new Array(0, 5, 5, 5, 5, 1, 1, 1, 1, 1, 5, 1, 5, 1, 0);
map[9] = new Array(0, 1, 5, 1, 5, 1, 0, 0, 0, 1, 5, 5, 5, 5, 8);
map[10] = new Array(0, 1, 5, 5, 5, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0);
} else if (_local2 == 6) {
_local1.gameMainColor = "Violet";
_local1.gameFlowers = "4";
map[0] = new Array(0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0);
map[1] = new Array(0, 1, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 1, 0);
map[2] = new Array(0, 1, 5, 0, 0, 5, 1, 1, 5, 0, 0, 5, 1, 0);
map[3] = new Array(0, 1, 5, 0, 5, 5, 5, 5, 5, 5, 0, 5, 1, 0);
map[4] = new Array(0, 1, 5, 5, 5, 1, 5, 5, 1, 5, 5, 5, 1, 0);
map[5] = new Array(8, 5, 5, 1, 1, 1, 5, 5, 1, 1, 1, 5, 5, 9);
map[6] = new Array(0, 1, 5, 5, 5, 1, 5, 5, 1, 5, 5, 5, 1, 0);
map[7] = new Array(0, 1, 5, 0, 5, 5, 5, 5, 5, 5, 0, 5, 1, 0);
map[8] = new Array(0, 1, 5, 0, 0, 5, 1, 1, 5, 0, 0, 5, 1, 0);
map[9] = new Array(0, 1, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 1, 0);
map[10] = new Array(0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0);
} else if (_local2 == 14) {
_local1.gameMainColor = "Blue";
_local1.gameFlowers = "1";
map[0] = new Array(0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0);
map[1] = new Array(0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0);
map[2] = new Array(0, 0, 0, 1, 5, 5, 5, 1, 0, 0, 0);
map[3] = new Array(0, 1, 1, 5, 5, 1, 5, 5, 1, 1, 0);
map[4] = new Array(1, 5, 5, 5, 1, 1, 1, 5, 5, 5, 1);
map[5] = new Array(1, 5, 1, 5, 5, 5, 5, 5, 1, 5, 1);
map[6] = new Array(1, 5, 5, 5, 1, 5, 1, 5, 5, 5, 1);
map[7] = new Array(0, 1, 1, 5, 1, 5, 1, 5, 1, 1, 0);
map[8] = new Array(0, 0, 1, 5, 5, 8, 5, 5, 1, 0, 0);
map[9] = new Array(0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0);
} else if (_local2 == 15) {
_local1.gameMainColor = "Violet";
_local1.gameFlowers = "2";
map[0] = new Array(0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0);
map[1] = new Array(0, 0, 0, 0, 0, 0, 1, 5, 5, 5, 1, 0, 0, 0, 0);
map[2] = new Array(1, 1, 1, 1, 1, 1, 1, 5, 1, 5, 5, 1, 0, 0, 0);
map[3] = new Array(5, 5, 5, 5, 5, 5, 5, 5, 1, 1, 5, 5, 1, 0, 0);
map[4] = new Array(5, 0, 0, 0, 5, 1, 1, 5, 5, 5, 5, 5, 5, 1, 0);
map[5] = new Array(5, 5, 9, 0, 5, 1, 1, 5, 1, 1, 5, 1, 5, 5, 8);
map[6] = new Array(5, 0, 0, 0, 5, 1, 1, 5, 5, 5, 5, 5, 5, 1, 0);
map[7] = new Array(5, 5, 5, 5, 5, 5, 5, 5, 1, 1, 5, 5, 1, 0, 0);
map[8] = new Array(1, 1, 1, 1, 1, 1, 1, 5, 1, 5, 5, 1, 0, 0, 0);
map[9] = new Array(0, 0, 0, 0, 0, 0, 1, 5, 5, 5, 1, 0, 0, 0, 0);
map[10] = new Array(0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0);
} else if (_local2 == 4) {
_local1.gameMainColor = "Pink";
_local1.gameFlowers = "5";
map[0] = new Array(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1);
map[1] = new Array(1, 5, 5, 5, 5, 5, 5, 5, 5, 5, 1);
map[2] = new Array(1, 5, 1, 1, 1, 1, 1, 1, 1, 5, 1);
map[3] = new Array(1, 5, 1, 5, 5, 5, 5, 5, 1, 5, 1);
map[4] = new Array(1, 5, 1, 5, 0, 0, 0, 5, 1, 5, 1);
map[5] = new Array(1, 5, 1, 5, 0, 9, 0, 5, 1, 5, 1);
map[6] = new Array(1, 5, 1, 5, 0, 5, 0, 5, 1, 5, 1);
map[7] = new Array(1, 5, 1, 5, 5, 5, 1, 5, 1, 5, 1);
map[8] = new Array(1, 5, 1, 1, 1, 1, 1, 5, 1, 5, 1);
map[9] = new Array(1, 5, 5, 5, 5, 5, 5, 5, 1, 5, 1);
map[10] = new Array(1, 1, 1, 1, 1, 1, 1, 1, 0, 8, 0);
} else if (_local2 == 17) {
_local1.gameMainColor = "Pink";
_local1.gameFlowers = "3";
map[0] = new Array(0, 0, 0, 0, 0, 1, 1, 8, 1, 1, 0, 0, 0, 0, 0);
map[1] = new Array(0, 0, 0, 0, 1, 5, 5, 5, 5, 5, 1, 0, 0, 0, 0);
map[2] = new Array(0, 0, 0, 1, 5, 5, 1, 1, 1, 5, 5, 1, 0, 0, 0);
map[3] = new Array(0, 1, 1, 1, 5, 1, 1, 1, 1, 1, 5, 1, 1, 1, 0);
map[4] = new Array(1, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 1);
map[5] = new Array(5, 5, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 5);
map[6] = new Array(5, 1, 1, 5, 5, 1, 0, 0, 0, 1, 5, 5, 1, 1, 5);
map[7] = new Array(5, 1, 1, 5, 5, 1, 0, 9, 0, 1, 5, 5, 1, 1, 5);
map[8] = new Array(5, 5, 1, 1, 1, 1, 0, 5, 0, 1, 1, 1, 1, 1, 5);
map[9] = new Array(1, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 1);
map[10] = new Array(0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0);
} else if (_local2 == 18) {
_local1.gameMainColor = "Red";
_local1.gameFlowers = "4";
map[0] = new Array(0, 0, 0, 0, 0, 1, 5, 5, 5, 1, 0, 0, 0, 0, 0);
map[1] = new Array(0, 0, 0, 0, 1, 5, 5, 8, 5, 5, 1, 0, 0, 0, 0);
map[2] = new Array(0, 0, 0, 1, 5, 5, 1, 5, 1, 5, 5, 1, 0, 0, 0);
map[3] = new Array(0, 0, 1, 5, 5, 1, 1, 5, 1, 1, 5, 5, 1, 0, 0);
map[4] = new Array(0, 1, 5, 5, 1, 1, 5, 5, 5, 1, 1, 5, 5, 1, 0);
map[5] = new Array(0, 1, 5, 5, 5, 5, 5, 1, 5, 5, 5, 5, 5, 1, 0);
map[6] = new Array(1, 1, 1, 5, 1, 5, 5, 5, 5, 5, 1, 5, 1, 1, 1);
map[7] = new Array(5, 1, 1, 5, 1, 5, 0, 0, 0, 5, 1, 5, 1, 1, 5);
map[8] = new Array(5, 5, 1, 5, 5, 5, 0, 9, 0, 5, 5, 5, 1, 5, 5);
map[9] = new Array(5, 5, 1, 5, 1, 5, 0, 5, 0, 5, 1, 5, 1, 5, 5);
map[10] = new Array(5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5);
} else if (_local2 == 19) {
_local1.gameMainColor = "Violet";
_local1.gameFlowers = "3";
map[0] = new Array(0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0);
map[1] = new Array(0, 0, 0, 1, 5, 5, 5, 5, 5, 1, 0, 0, 0);
map[2] = new Array(0, 0, 0, 1, 5, 1, 1, 1, 5, 1, 0, 0, 0);
map[3] = new Array(0, 0, 1, 5, 5, 5, 5, 5, 5, 5, 1, 0, 0);
map[4] = new Array(0, 1, 1, 5, 1, 1, 1, 1, 1, 5, 1, 0, 0);
map[5] = new Array(8, 5, 5, 5, 1, 5, 5, 5, 1, 5, 5, 5, 9);
map[6] = new Array(0, 1, 1, 5, 1, 1, 1, 1, 1, 5, 1, 0, 0);
map[7] = new Array(0, 0, 1, 5, 5, 5, 5, 5, 5, 5, 1, 0, 0);
map[8] = new Array(0, 0, 0, 1, 5, 1, 1, 1, 5, 1, 0, 0, 0);
map[9] = new Array(0, 0, 0, 1, 5, 5, 5, 5, 5, 1, 0, 0, 0);
map[10] = new Array(0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0);
} else if (_local2 == 20) {
_local1.gameMainColor = "Blue";
_local1.gameFlowers = "5";
map[0] = new Array(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1);
map[1] = new Array(1, 5, 5, 5, 5, 5, 5, 5, 5, 5, 1);
map[2] = new Array(1, 5, 8, 1, 5, 1, 1, 1, 1, 5, 1);
map[3] = new Array(1, 5, 1, 1, 5, 5, 5, 5, 5, 5, 1);
map[4] = new Array(1, 5, 5, 5, 5, 1, 1, 5, 1, 5, 1);
map[5] = new Array(1, 5, 1, 5, 1, 5, 5, 5, 5, 5, 1);
map[6] = new Array(1, 5, 1, 5, 1, 5, 0, 0, 0, 5, 1);
map[7] = new Array(1, 5, 1, 5, 5, 5, 0, 9, 5, 5, 1);
map[8] = new Array(1, 5, 1, 5, 1, 1, 0, 5, 0, 5, 1);
map[9] = new Array(1, 5, 5, 5, 5, 5, 5, 5, 5, 5, 1);
map[10] = new Array(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1);
} else {
_local3 = false;
}
_local1.mapXOffset = 275 - (((map[0].length - 1) * _local1.tileXY) / 2);
_local1.mapYOffset = 206.5 - (((map.length - 1) * _local1.tileXY) / 2);
return(_local3);
}
Instance of Symbol 59 MovieClip [mcMenuFlower] "mcMenuFlower1" in Frame 4
onClipEvent (load) {
this.rotateMe = false;
}
onClipEvent (enterFrame) {
if (this.rotateMe) {
this._rotation = this._rotation + 9;
}
}
Frame 5
function drawIt(object, theMap) {
var _local1 = _root;
_local1.attachMovie("empty", "tiles", 1);
var _local2 = 0;
var y = 0;
while (y < theMap.length) {
var _local3 = 0;
while (_local3 < theMap[0].length) {
_local2 = _local3 + (y * 20);
if (theMap[y][_local3] == MAP_BLOCK1) {
_local1.tiles.attachMovie("mcFlowers0", "tile_" + _local2, _local2);
} else if (theMap[y][_local3] == MAP_PATH1) {
_local1.tiles.attachMovie("mcFlowers" + _local1.gameFlowers, "tile_" + _local2, _local2);
} else if (theMap[y][_local3] == MAP_START) {
object.px = _local3;
object.py = y;
object._x = (_local1.tileXY * object.px) + _local1.mapXOffset;
object._y = (_local1.tileXY * object.py) + _local1.mapYOffset;
_local1.tiles.attachMovie("mcStart" + _local1.gameMainColor, "tile_" + _local2, _local2);
} else if (theMap[y][_local3] == MAP_FINISH) {
_local1.tiles.attachMovie("mcFinish" + _local1.gameMainColor, "tile_" + _local2, _local2 + 1000);
}
_local1.tiles["tile_" + _local2]._x = (_local3 * _local1.tileXY) + _local1.mapXOffset;
_local1.tiles["tile_" + _local2]._y = (y * _local1.tileXY) + _local1.mapYOffset;
_local1.tiles["tile_" + _local2].xStep = _local3;
_local1.tiles["tile_" + _local2].yStep = y;
_local3++;
}
y++;
}
}
function hideIt(object, theMap) {
var _local3 = theMap;
var pos = 0;
var _local2 = 0;
while (_local2 < _local3.length) {
var _local1 = 0;
while (_local1 < _local3[0].length) {
pos = _local1 + (_local2 * 20);
if (_local3[_local2][_local1] == MAP_BLOCK1) {
_root.tiles["tile_" + pos].play();
} else if (_local3[_local2][_local1] == MAP_PATH1) {
_root.tiles["tile_" + pos].play();
} else if (_local3[_local2][_local1] == MAP_START) {
_root.tiles["tile_" + pos].play();
} else if (_local3[_local2][_local1] == MAP_FINISH) {
_root.tiles["tile_" + pos].play();
}
_local1++;
}
_local2++;
}
}
stop();
MAP_NOTHING = 0;
MAP_BLOCK1 = 1;
MAP_PATH1 = 5;
MAP_START = 8;
MAP_FINISH = 9;
BUG_FRAME_NORMAL = 68;
STATE_NONE = 0;
STATE_NEXT_LEVEL = 9;
_root.mapXOffset = 0;
_root.mapYOffset = 0;
map = new Array();
if (!generateMap(_root.gameLevel)) {
gotoAndPlay (7);
}
_root.attachMovie("mcBugs" + _root.gameMainColor, "mcHero", 1000);
drawIt(mcHero, map);
mcHero.movePixCount = 0;
mcHero.xMove = 0;
mcHero.yMove = 0;
mcHero.walking = false;
mcHero._rotation = -90;
mcHero.onEnterFrame = function () {
var _local1 = this;
if (_local1.walking == true) {
_local1.movePixCount = _local1.movePixCount + 5;
_local1._x = _local1._x + _local1.xMove;
_local1._y = _local1._y + _local1.yMove;
if (_local1.movePixCount >= _root.tileXY) {
_local1.movePixCount = 0;
_local1.walking = false;
_local1.px = _local1.px + (_local1.xMove / 5);
_local1.py = _local1.py + (_local1.yMove / 5);
_local1.xMove = 0;
_local1.yMove = 0;
if (map[_local1.py][_local1.px] == MAP_FINISH) {
hideIt(_local1, map);
_local1.play();
if (random(100) > 50) {
sndWin1.start();
} else {
sndWin2.start();
}
}
}
}
if (_local1._currentframe == BUG_FRAME_NORMAL) {
if (_local1.walking == false) {
if (Key.isDown(37) && (map[_local1.py][_local1.px - 1] > MAP_BLOCK1)) {
_local1.xMove = -5;
_local1.walking = true;
_local1._rotation = 90;
} else if (Key.isDown(39) && (map[_local1.py][_local1.px + 1] > MAP_BLOCK1)) {
_local1.xMove = 5;
_local1.walking = true;
_local1._rotation = -90;
} else if (Key.isDown(38) && (map[_local1.py - 1][_local1.px] > MAP_BLOCK1)) {
_local1.yMove = -5;
_local1.walking = true;
_local1._rotation = 180;
} else if (Key.isDown(40) && (map[_local1.py + 1][_local1.px] > MAP_BLOCK1)) {
_local1.yMove = 5;
_local1.walking = true;
_local1._rotation = 0;
}
}
}
if (_local1._currentframe >= _local1._totalframes) {
_root.gameState = STATE_NEXT_LEVEL;
gotoAndPlay (6);
}
};
Frame 6
_root.gameLevel = _root.gameLevel + 1;
gotoAndPlay (5);
Frame 7
_root.tiles.removeMovieClip();
_root.mcHero.removeMovieClip();
stop();
Frame 8
_root.tiles.removeMovieClip();
_root.mcHero.removeMovieClip();
stop();
Symbol 5 MovieClip [mcBugsViolet] Frame 68
stop();
Symbol 5 MovieClip [mcBugsViolet] Frame 113
stop();
Symbol 8 MovieClip [mcBugsPink] Frame 68
stop();
Symbol 8 MovieClip [mcBugsPink] Frame 113
stop();
Symbol 11 MovieClip [mcBugsRed] Frame 68
stop();
Symbol 11 MovieClip [mcBugsRed] Frame 113
stop();
Symbol 14 MovieClip [mcBugsBlue] Frame 68
stop();
Symbol 17 MovieClip [mcFlowers0] Frame 35
stop();
Symbol 17 MovieClip [mcFlowers0] Frame 65
stop();
Symbol 20 MovieClip [mcFlowers5] Frame 35
stop();
Symbol 20 MovieClip [mcFlowers5] Frame 65
stop();
Symbol 23 MovieClip [mcFlowers4] Frame 35
stop();
Symbol 23 MovieClip [mcFlowers4] Frame 65
stop();
Symbol 26 MovieClip [mcFlowers3] Frame 35
stop();
Symbol 26 MovieClip [mcFlowers3] Frame 65
stop();
Symbol 29 MovieClip [mcFlowers2] Frame 35
stop();
Symbol 29 MovieClip [mcFlowers2] Frame 65
stop();
Symbol 32 MovieClip [mcStartPink] Frame 35
stop();
Symbol 32 MovieClip [mcStartPink] Frame 65
stop();
Symbol 35 MovieClip [mcStartRed] Frame 35
stop();
Symbol 35 MovieClip [mcStartRed] Frame 65
stop();
Symbol 38 MovieClip [mcStartViolet] Frame 35
stop();
Symbol 38 MovieClip [mcStartViolet] Frame 65
stop();
Symbol 41 MovieClip [mcStartBlue] Frame 35
stop();
Symbol 41 MovieClip [mcStartBlue] Frame 65
stop();
Symbol 44 MovieClip [mcFlowers1] Frame 35
stop();
Symbol 44 MovieClip [mcFlowers1] Frame 65
stop();
Symbol 48 MovieClip [mcFinishViolet] Frame 10
stop();
Symbol 48 MovieClip [mcFinishViolet] Frame 27
stop();
Symbol 51 MovieClip [mcFinishPink] Frame 10
stop();
Symbol 51 MovieClip [mcFinishPink] Frame 27
stop();
Symbol 54 MovieClip [mcFinishRed] Frame 10
stop();
Symbol 54 MovieClip [mcFinishRed] Frame 27
stop();
Symbol 57 MovieClip [mcFinishBlue] Frame 10
stop();
Symbol 57 MovieClip [mcFinishBlue] Frame 27
stop();
Symbol 74 Button
on (release) {
getURL ("http://www.midoritech.com/?ref=ladybugs1", "_blank");
}
Symbol 77 Button
on (release) {
getURL ("http://www.bravekidgames.com/?ref=ladybugs1", "_blank");
}
Symbol 83 Button
on (release) {
play();
}
on (rollOver) {
mcMenuFlower1.rotateMe = true;
}
on (rollOut) {
mcMenuFlower1.rotateMe = false;
}
Symbol 89 Button
on (release, keyPress "<Escape>") {
_root.tiles.removeMovieClip();
_root.mcHero.removeMovieClip();
_root.gameLevel = 1;
gotoAndPlay (8);
}
on (keyPress "<Enter>") {
gotoAndPlay (6);
}
Symbol 93 Button
on (release, keyPress "<Escape>") {
_root.tiles.removeMovieClip();
_root.mcHero.removeMovieClip();
_root.gameLevel = 1;
gotoAndPlay (4);
}
on (keyPress "<Enter>") {
gotoAndPlay (4);
}
Symbol 96 Button
on (release) {
getURL ("http://www.bravekidgames.com/product.php?id=ladybug&ref=ladybugs1", "_blank");
}