Frame 1
stop();
Frame 5
var level = 0;
var score = 0;
var lives = 3;
Frame 7
level++;
Frame 9
function Destroy(drop) {
var _local2 = drop;
var _local1 = _local2.num;
game.layer0["shade" + _local1].removeMovieClip();
game.layer2["shade" + _local1].removeMovieClip();
game.layer3["shade" + _local1].removeMovieClip();
game.layer4["shade" + _local1].removeMovieClip();
_local2.removeMovieClip();
remaining--;
_local2 = null;
if (_local1 == 0) {
if (messages._visible == false) {
messages.gotoAndStop(4);
messages._visible = true;
arrow._visible = false;
lives--;
lives_mc.gotoAndStop(lives + 1);
if (lives == 0) {
messages.gotoAndStop(2);
messages._visible = true;
}
arrow._visible = false;
}
} else if (gameOn == true) {
if (remaining == 1) {
if (game.drop0.num == undefined) {
if (messages._visible == false) {
messages.gotoAndStop(4);
messages._visible = true;
lives--;
lives_mc.gotoAndStop(lives + 1);
if (lives == 0) {
messages.gotoAndStop(2);
messages._visible = true;
}
arrow._visible = false;
}
} else if (messages._visible == false) {
messages.gotoAndStop(3);
messages._visible = true;
lives_mc.gotoAndStop(lives + 1);
if (lives == 0) {
messages.gotoAndStop(2);
messages._visible = true;
}
arrow._visible = false;
}
}
}
}
function colliding(drop1, drop2) {
var x1 = drop1._x;
var _local2 = drop2._x;
var _local3 = drop1._y;
var _local1 = drop2._y;
var dist = Math.sqrt(((_local2 - x1) * (_local2 - x1)) + ((_local1 - _local3) * (_local1 - _local3)));
var thresh = (((drop1.size * 0.84) / 2) + ((drop2.size * 0.84) / 2));
if (dist < thresh) {
return(true);
}
return(false);
}
function resizeDrop(drop, newSize) {
var _local1 = drop;
var _local2 = newSize;
_local1.size = _local2;
_local1._xscale = (_local1._yscale = _local2);
game.layer0["shade" + _local1.num]._xscale = (game.layer0["shade" + _local1.num]._yscale = _local2 * 1.2);
game.layer2["drop" + _local1.num]._xscale = (game.layer2["drop" + _local1.num]._yscale = _local2 - 3);
if (game.layer2["drop" + _local1.num]._xscale < 0) {
game.layer2["drop" + _local1.num]._xscale = (game.layer2["drop" + _local1.num]._yscale = 0);
}
game.layer3["drop" + _local1.num]._xscale = (game.layer3["drop" + _local1.num]._yscale = _local2 - 6);
if (game.layer3["drop" + _local1.num]._xscale < 0) {
game.layer3["drop" + _local1.num]._xscale = (game.layer3["drop" + _local1.num]._yscale = 0);
}
game.layer4["drop" + _local1.num]._xscale = (game.layer4["drop" + _local1.num]._yscale = _local2 - 9);
if (game.layer4["drop" + _local1.num]._xscale < 0) {
game.layer4["drop" + _local1.num]._xscale = (game.layer4["drop" + _local1.num]._yscale = 0);
}
}
function drawDrop(n, size, x, y) {
var _local2 = n;
var _local3 = size;
var _local1 = game.layer1.attachMovie("drop", "drop" + _local2, _local2);
game["drop" + _local2] = _local1;
game["drop" + _local2].size = _local3;
var drop_color = new Color(_local1);
drop_color.setRGB(3749427);
_local1._xscale = _local3;
_local1._yscale = _local3;
_local1._x = x;
_local1._y = y;
_local1.num = _local2;
first_drop = _local1;
last_drop = _local1;
shade = game.layer0.attachMovie("shadow", "shade" + _local2, _local2);
shade._xscale = _local3 * 1.2;
shade._yscale = _local3 * 1.2;
shade._x = x - 5;
shade._y = y;
_local1 = game.layer2.attachMovie("drop", "drop" + _local2, _local2);
var drop_color = new Color(_local1);
drop_color.setRGB(8684162);
_local1._xscale = (_local1._yscale = first_drop._xscale - 3);
_local1._x = last_drop._x;
_local1._y = y;
last_drop = _local1;
_local1 = game.layer3.attachMovie("drop", "drop" + _local2, _local2);
var drop_color = new Color(_local1);
drop_color.setRGB(14671839);
_local1._xscale = (_local1._yscale = first_drop._xscale - 6);
_local1._x = last_drop._x;
_local1._y = y;
last_drop = _local1;
_local1 = game.layer4.attachMovie("drop", "drop" + _local2, _local2);
var drop_color = new Color(_local1);
drop_color.setRGB(16777215);
drop_color.setTransform(new_color);
_local1._xscale = (_local1._yscale = first_drop._xscale - 9);
_local1._x = last_drop._x;
_local1._y = y;
last_drop = _local1;
}
function dropDroplets() {
var i = 0;
while (i < dropscount) {
if (i == 0) {
var _local3 = sizes0;
} else if ((i % 2) == 0) {
var _local3 = sizes1;
} else {
var _local3 = sizes2;
}
var _local1 = false;
do {
x = random(width);
y = random(height);
_local1 = false;
var _local2 = 0;
while (_local2 < i) {
drp = game["drop" + _local2];
dx = Math.abs(drp._x - x);
dy = Math.abs(drp._y - y);
if ((dx <= ((_local3 / 2) + (drp._xscale / 2))) && (dy <= ((_local3 / 2) + (drp._xscale / 2)))) {
_local1 = true;
}
_local2++;
}
} while (_local1 == true);
drawDrop(i, _local3, x, y);
i++;
}
var i = 1;
while (i < dropscount) {
var n;
var drop = game["drop" + i];
do {
var _local1 = true;
n = random(dropscount);
if (n == i) {
_local1 = false;
}
} while (_local1 == false);
drop.after = game["drop" + n];
i++;
}
}
function setAfter(drop) {
var _local1 = drop;
var found = false;
var _local2 = 0;
while (_local2 < dropscount) {
var _local3 = game["drop" + _local2];
if (_local3.num != undefined) {
if (_local1.num != _local3.num) {
if (_local3.size <= _local1.size) {
_local1.after = _local3;
found = true;
return;
}
}
}
_local2++;
}
if (found == false) {
_local2 = 1;
while (_local2 < dropscount) {
var _local3 = game["drop" + _local2];
if (_local3.num != undefined) {
if (_local1.num != _local3.num) {
_local1.after = _local3;
found = true;
return;
}
}
_local2++;
}
if (found == false) {
_local1.after = game.drop0;
}
}
}
function cleanUp() {
game.layer0.removeMovieClip();
game.layer1.removeMovieClip();
game.layer2.removeMovieClip();
game.layer3.removeMovieClip();
game.layer4.removeMovieClip();
game.layer5.removeMovieClip();
}
var gameOn = false;
var width = 550;
var height = 350;
var arrow;
var gameOn = false;
lives_mc.gotoAndStop(lives + 1);
messages.gotoAndStop(1);
messages.level = level;
messages._visible = true;
switch (level) {
case 1 :
dropscount = 5;
sizes0 = 30;
sizes1 = 25;
sizes2 = 25;
break;
case 2 :
dropscount = 10;
sizes0 = 25;
sizes1 = 20;
sizes2 = 20;
break;
case 3 :
dropscount = 15;
sizes0 = 25;
sizes1 = 20;
sizes2 = 20;
break;
case 4 :
dropscount = 15;
sizes0 = 20;
sizes1 = 20;
sizes2 = 20;
break;
case 5 :
dropscount = 20;
sizes0 = 20;
sizes1 = 20;
sizes2 = 20;
break;
case 6 :
dropscount = 20;
sizes0 = 20;
sizes1 = 25;
sizes2 = 20;
break;
default :
dropscount = 25;
sizes0 = 15;
sizes1 = 20;
sizes2 = 15;
}
var remaining = dropscount;
attachMovie("layer", "game", 10);
game._x = 0;
game._y = 0;
var i = 0;
while (i < 6) {
game.attachMovie("layer", "layer" + i, 10 + i);
game["layer" + i]._x = 0;
game["layer" + i]._y = 0;
i++;
}
arrow = game.layer5.attachMovie("arrow", "arrow", 10);
arrow._visible = false;
star = game.layer5.attachMovie("star", "star", 12);
dropDroplets();
star._x = game.drop0._x;
star._y = game.drop0._y;
attachMovie("looper", "looper", 10000);
looper.onEnterFrame = function () {
if (gameOn == false) {
} else {
if (messages._visible == true) {
arrow._visible = false;
} else {
arrow._visible = true;
}
var j = 0;
while (j < dropscount) {
var _local1 = game["drop" + j];
if (_local1.num != undefined) {
if ((_local1.getting != true) && (_local1.dying != true)) {
var _local2 = 0;
while (_local2 < dropscount) {
var _local3 = game["drop" + _local2];
if (((!(_local3.num === undefined)) && (_local1.num != undefined)) && (_local3.num != _local1.num)) {
if (((colliding(_local3, _local1) == true) && (_local3.dying != true)) && (_local3.getting != true)) {
var tempDrop;
if (_local3.size > _local1.size) {
tempDrop = _local3;
_local3 = _local1;
_local1 = tempDrop;
}
_local1.getting = true;
_local1.gettingFrom = _local3;
_local1.gettingNum = _local3.size;
_local1.incre = 5 / _local3.size;
_local3.dying = true;
_local3.dyingFor = _local1;
var angle = ((Math.atan2(_local3._y - _local1._y, _local3._x - _local1._x) * 180) / Math.PI);
_local3._x = _local1._x + ((_local1.size / 2) * Math.cos((angle * Math.PI) / 180));
_local3._y = _local1._y + ((_local1.size / 2) * Math.sin((angle * Math.PI) / 180));
_local3.dyingNum = _local3.size;
_local3.decre = 1;
}
}
_local2++;
}
}
}
j++;
}
var _local2 = 0;
while (_local2 < dropscount) {
var _local3 = game["drop" + _local2];
if (_local3.num != undefined) {
if (_local3.dying == true) {
_local3.dyingNum--;
resizeDrop(_local3, _local3.size - _local3.decre);
var angle = ((Math.atan2(_local3._y - _local3.dyingFor._y, _local3._x - _local3.dyingFor._x) * 180) / Math.PI);
if (Math.abs(angle) > 30) {
}
_local3._x = _local3.dyingFor._x + (((_local3.dyingFor.size - 9) / 2) * Math.cos((angle * Math.PI) / 180));
_local3._y = _local3.dyingFor._y + (((_local3.dyingFor.size - 9) / 2) * Math.sin((angle * Math.PI) / 180));
_local3.merger._visible = true;
_local3._rotation = angle - 90;
game.layer2["drop" + _local3.num].merger._visible = true;
game.layer2["drop" + _local3.num]._rotation = angle - 90;
game.layer3["drop" + _local3.num].merger._visible = true;
game.layer3["drop" + _local3.num]._rotation = angle - 90;
game.layer4["drop" + _local3.num].merger._visible = true;
game.layer4["drop" + _local3.num]._rotation = angle - 90;
if (_local3.dyingNum <= 0) {
_local3.dyingNum = 0;
_local3.dying = false;
Destroy(_local3);
}
}
if (_local3.getting == true) {
_local3.gettingNum--;
resizeDrop(_local3, _local3.size + _local3.incre);
if (_local3.gettingNum <= 0) {
_local3.gettingNum = 0;
_local3.getting = false;
if (_local3.num == 0) {
score = score + 5;
}
setAfter(_local3);
}
}
}
_local2++;
}
arrow._x = _xmouse;
arrow._y = _ymouse;
if (arrow._y > 350) {
arrow._y = 350;
}
if (arrow._y < 0) {
arrow._y = 0;
}
if (arrow._x > 550) {
arrow._x = 550;
}
if (arrow._x < 0) {
arrow._x = 0;
}
_local2 = 0;
while (_local2 < dropscount) {
var _local3 = null;
_local3 = game.drop0;
var angle = ((Math.atan2(arrow._y - _local3._y, arrow._x - _local3._x) * 180) / Math.PI);
arrow._rotation = angle + 90;
_local3._x = _local3._x + (1 * Math.cos((angle * Math.PI) / 180));
_local3._y = _local3._y + (1 * Math.sin((angle * Math.PI) / 180));
_local2 = 1;
while (_local2 < dropscount) {
_local3 = game["drop" + _local2];
if (_local3.num != undefined) {
if ((_local3.getting != true) && (_local3.dying != true)) {
if (_local3.after.num != undefined) {
var angle = ((Math.atan2(_local3.after._y - _local3._y, _local3.after._x - _local3._x) * 180) / Math.PI);
_local3._x = _local3._x + (0.5 * Math.cos((angle * Math.PI) / 180));
_local3._y = _local3._y + (0.5 * Math.sin((angle * Math.PI) / 180));
} else {
setAfter(_local3);
}
}
}
_local2++;
}
star._x = game.drop0._x;
star._y = game.drop0._y;
_local2 = 0;
while (_local2 < dropscount) {
_local3 = game["drop" + _local2];
if (_local3.num != undefined) {
shade = game.layer0["shade" + _local2];
shade._x = _local3._x - 5;
shade._y = _local3._y;
var drop2 = game.layer2["drop" + _local2];
drop2._x = _local3._x;
drop2._y = _local3._y;
var drop3 = game.layer3["drop" + _local2];
drop3._x = drop2._x;
drop3._y = drop2._y;
var drop4 = game.layer4["drop" + _local2];
drop4._x = drop3._x;
drop4._y = drop3._y;
}
_local2++;
}
_local2++;
}
}
};
stop();
Frame 11
stop();
Frame 17
highscores_mc.LoadScores("player_name", "mercurydrops", 12, 3, 0, 0, "", false);
stop();
Frame 20
highscores_mc.LoadScores(myplayername, "mercurydrops", score, level, 0, 0, "", true);
stop();
Symbol 12 MovieClip [drop] Frame 1
merger._visible = false;
Symbol 22 Button
on (release) {
gotoAndPlay ("newgame");
}
Symbol 26 Button
on (release) {
gotoAndPlay ("viewscores");
}
Symbol 32 MovieClip Frame 4
stop();
Symbol 42 Button
on (release) {
this._visible = false;
_parent.gameOn = true;
}
Symbol 47 Button
on (release) {
this._visible = false;
_parent.gameOn = false;
_parent.cleanUp();
_parent.gotoAndStop("title");
}
Symbol 51 Button
on (release) {
this._visible = false;
_parent.gameOn = false;
_parent.cleanUp();
_parent.gotoAndPlay("sendScores");
}
Symbol 56 Button
on (release) {
this._visible = false;
_parent.gameOn = false;
_parent.cleanUp();
_parent.gotoAndPlay("levelUp");
}
Symbol 59 Button
on (release) {
this._visible = false;
_parent.gameOn = false;
_parent.cleanUp();
_parent.gotoAndPlay("again");
}
Symbol 63 Button
on (release) {
txt_str = new String(myplayername);
while (txt_str.charAt(0) == " ") {
txt_str = txt_str.substring(1, txt_str.length);
}
while (txt_str.charAt(txt_str.length - 1) == " ") {
txt_str = txt_str.substring(0, txt_str.length - 1);
}
if (txt_str.length > 0) {
gotoAndPlay ("sendScores2");
}
}
Symbol 81 MovieClip Frame 2
function LoadScores(player_name, game_name, score1, score2, score3, score4, score_date, isUpdate) {
sender_lv.game_name2 = game_name;
sender_lv.isUpdate = isUpdate;
sender_lv.player = player_name;
sender_lv.email = "";
sender_lv.score1 = score1;
sender_lv.score2 = score2;
sender_lv.score3 = score3;
sender_lv.score4 = score4;
sender_lv.sendAndLoad("/scores.php", receiver_lv, "POST");
}
var sender_lv = new LoadVars();
var receiver_lv = new LoadVars();
receiver_lv.barholder = this;
var i = 0;
while (i < 20) {
if (i == 0) {
bar = score_bar_mc_0;
} else {
bar = score_bar_mc_0.duplicateMovieClip("score_bar_mc_" + i, i);
}
bar._visible = true;
bar._x = score_bar_mc_0._x;
bar._y = score_bar_mc_0._y + (i * score_bar_mc_0._height);
bar.txtNo.text = (i + 1) + ".";
bar.txtName.text = "---";
bar.txtScore1.text = "---";
bar.txtScore2.text = "---";
bar.txtDate.text = "---";
i++;
}
receiver_lv.onLoad = function (success) {
var _local2 = this;
my_xml = new XML(_local2.xml);
var _local1 = 0;
while (_local1 < my_xml.firstChild.childNodes.length) {
_local2.barholder["score_bar_mc_" + _local1].txtName.text = my_xml.firstChild.childNodes[_local1].attributes.player;
_local2.barholder["score_bar_mc_" + _local1].txtScore1.text = my_xml.firstChild.childNodes[_local1].attributes.score1;
_local2.barholder["score_bar_mc_" + _local1].txtScore2.text = my_xml.firstChild.childNodes[_local1].attributes.score2;
_local2.barholder["score_bar_mc_" + _local1].txtDate.text = my_xml.firstChild.childNodes[_local1].attributes.datetime;
_local1++;
}
_local2.barholder.nextFrame();
};
stop();
Symbol 81 MovieClip Frame 3
stop();
Symbol 86 Button
on (release) {
gotoAndStop ("title");
}
Symbol 87 Button
on (release) {
getURL ("http://www.quickflashgames.com/");
}