Frame 1
var total = this.getBytesTotal();
var loaded = this.getBytesLoaded();
var percent = Math.round((loaded * 100) / total);
if (percent == 100) {
gotoAndStop ("start");
}
System.security.allowDomain("*");
mochi.MochiServices.connect("1ecaf9b56a11c48f");
Frame 3
gotoAndPlay (1);
Frame 4
var framerate = 30;
fscommand ("allowscale", true);
fscommand ("showmenu", false);
Mouse.hide();
Frame 5
this.attachMovie("pointer", "pointer", this.getNextHighestDepth());
pointer.onEnterFrame = function () {
this._x = _root._xmouse;
this._y = _root._ymouse;
};
stop();
Symbol 13 Button
on (release) {
_parent.gotoAndPlay("play");
}
Symbol 18 Button
on (release) {
gotoAndStop ("instruction");
}
Symbol 22 Button
on (release) {
getURL ("http://www.trialpay.com/productpage/?c=e365a7d&tid=6rGiGxp", "_blank");
}
Symbol 26 Button
on (release) {
getURL ("http://www.legacygames.com/download_games/41/fever_frenzy/", "_blank");
}
Symbol 29 Button
on (release) {
mochi.MochiScores.setBoardID("12bde22fb578431e");
var scoreQuery = {onClose:function () {
}, onError:function (arg2) {
}};
mochi.MochiScores.showLeaderboard(scoreQuery);
}
Symbol 42 Button
on (release) {
gotoAndStop ("start");
}
Symbol 58 Button
on (release) {
mochi.MochiScores.setBoardID("12bde22fb578431e");
var scoreQuery = {score:totalscore.vl, onClose:function () {
}, onError:function (arg2) {
}};
mochi.MochiScores.showLeaderboard(scoreQuery);
}
Symbol 84 Button
on (release) {
_parent.totalscore = 0;
_parent.scr_txt.text = "00";
_parent.gotoAndPlay("introduce");
}
Symbol 90 Button
on (release) {
gotoAndStop ("topresearch");
}
Symbol 96 Button
on (release) {
gotoAndStop ("topscore");
}
Symbol 100 MovieClip [menu] Frame 1
stop();
Symbol 100 MovieClip [menu] Frame 2
stop();
Symbol 100 MovieClip [menu] Frame 3
stop();
Symbol 100 MovieClip [menu] Frame 4
stop();
Symbol 100 MovieClip [menu] Frame 5
stop();
topScorer = new LoadVars();
topScorer.onLoad = function () {
pos_txt.text = "";
nm_txt.text = "";
scr_txt.text = "";
if (topScorer.result_lv == "ok") {
i = 0;
while (i < topScorer.rows) {
pos_txt.text = pos_txt.text + ((i + 1) + newline);
nm_txt.text = nm_txt.text + (topScorer["player" + i] + newline);
scr_txt.text = scr_txt.text + (topScorer["score" + i] + newline);
i++;
}
}
};
topScorer.sendAndLoad("showLeaderboard.php", topScorer, "POST");
Symbol 100 MovieClip [menu] Frame 6
stop();
topResearcher = new LoadVars();
topResearcher.onLoad = function () {
pos_txt.text = "";
nm_txt.text = "";
scr_txt.text = "";
if (topResearcher.result_lv == "ok") {
i = 0;
while (i < topResearcher.rows) {
pos_txt.text = pos_txt.text + ((i + 1) + newline);
nm_txt.text = nm_txt.text + (topResearcher["player" + i] + newline);
scr_txt.text = scr_txt.text + (topResearcher["particles" + i] + newline);
i++;
}
}
};
topResearcher.sendAndLoad("showTopResearchers.php", topResearcher, "POST");
Symbol 126 MovieClip [particles] Frame 1
stop();
Symbol 126 MovieClip [particles] Frame 6
stop();
Symbol 150 MovieClip Frame 1
stop();
Symbol 151 MovieClip [bowl] Frame 1
stop();
Symbol 151 MovieClip [bowl] Frame 6
stop();
Symbol 151 MovieClip [bowl] Frame 11
gotoAndStop (1);
Symbol 151 MovieClip [bowl] Frame 32
if (this.isWOO) {
gotoAndPlay ("blinking");
} else {
gotoAndStop (1);
}
Symbol 158 MovieClip [score_mc] Frame 1
obj.stt.autoSize = (obj.vl.autoSize = true);
stop();
Symbol 162 MovieClip [wootext] Frame 1
txt.autoSize = true;
Symbol 164 MovieClip [woo_timer] Frame 1
time_txt.autoSize = true;
Symbol 196 MovieClip [__Packages.mochi.MochiScores] Frame 0
class mochi.MochiScores
{
static var boardID, onClose, onError;
function MochiScores () {
}
static function setBoardID(boardID) {
mochi.MochiScores.boardID = boardID;
mochi.MochiServices.send("scores_setBoardID", {boardID:boardID});
}
static function getBoardID() {
return(boardID);
}
static function showLeaderboard(options) {
if (options.clip != null) {
if ((options.clip != mochi.MochiServices.__get__clip()) || (mochi.MochiServices.__get__childClip()._target == undefined)) {
mochi.MochiServices.disconnect();
mochi.MochiServices.connect(mochi.MochiServices.__get__id(), options.clip);
}
delete options.clip;
}
if (options.name != null) {
if (typeof(options.name) == "object") {
if (options.name.text != undefined) {
options.name = options.name.text;
}
}
}
if (options.score != null) {
if (typeof(options.score) == "object") {
if (options.score.text != undefined) {
options.score = options.score.text;
}
}
}
if (options.onDisplay != null) {
options.onDisplay();
} else {
mochi.MochiServices.__get__clip().stop();
}
if (options.onClose != null) {
onClose = options.onClose;
} else {
onClose = function () {
mochi.MochiServices.__get__clip().play();
};
}
if (options.onError != null) {
onError = options.onError;
} else {
onError = onClose;
}
if (options.boardID == null) {
if (boardID != null) {
options.boardID = boardID;
}
}
mochi.MochiServices.send("scores_showLeaderboard", {options:options}, null, doClose);
}
static function closeLeaderboard() {
mochi.MochiServices.send("scores_closeLeaderboard");
}
static function getPlayerInfo(callbackObj, callbackMethod) {
mochi.MochiServices.send("scores_getPlayerInfo", null, callbackObj, callbackMethod);
}
static function submit(score, name, callbackObj, callbackMethod) {
mochi.MochiServices.send("scores_submit", {score:score, name:name}, callbackObj, callbackMethod);
}
static function requestList(callbackObj, callbackMethod) {
mochi.MochiServices.send("scores_requestList", null, callbackObj, callbackMethod);
}
static function scoresArrayToObjects(scores) {
var _local5 = {};
var _local1;
var _local4;
var _local2;
var _local6;
for (var _local8 in scores) {
if (typeof(scores[_local8]) == "object") {
if ((scores[_local8].cols != null) && (scores[_local8].rows != null)) {
_local5[_local8] = [];
_local2 = scores[_local8];
_local4 = 0;
while (_local4 < _local2.rows.length) {
_local6 = {};
_local1 = 0;
while (_local1 < _local2.cols.length) {
_local6[_local2.cols[_local1]] = _local2.rows[_local4][_local1];
_local1++;
}
_local5[_local8].push(_local6);
_local4++;
}
} else {
_local5[_local8] = {};
for (var _local7 in scores[_local8]) {
_local5[_local8][_local7] = scores[_local8][_local7];
}
}
} else {
_local5[_local8] = scores[_local8];
}
}
return(_local5);
}
static function doClose(args) {
if (args.error == true) {
if (args.errorCode == undefined) {
args.errorCode = "IOError";
}
onError.apply(null, [args.errorCode]);
} else {
onClose.apply();
}
}
}
Symbol 197 MovieClip [__Packages.mochi.MochiServices] Frame 0
class mochi.MochiServices
{
static var _id, _container, _clip, _sendChannelName, _rcvChannelName, __get__comChannelName, onError, _listenChannel, _rcvChannel, _loader, _loaderListener, _sendChannel;
function MochiServices () {
}
static function get id() {
return(_id);
}
static function get clip() {
return(_container);
}
static function get childClip() {
return(_clip);
}
static function getVersion() {
return("1.32");
}
static function allowDomains(server) {
var _local1 = server.split("/")[2].split(":")[0];
if (System.security) {
if (System.security.allowDomain) {
System.security.allowDomain("*");
System.security.allowDomain(_local1);
}
if (System.security.allowInsecureDomain) {
System.security.allowInsecureDomain("*");
System.security.allowInsecureDomain(_local1);
}
}
return(_local1);
}
static function get isNetworkAvailable() {
if (System.security) {
var _local1 = System.security;
if (_local1.sandboxType == "localWithFile") {
return(false);
}
}
return(true);
}
static function set comChannelName(val) {
if (val != undefined) {
if (val.length > 3) {
_sendChannelName = val + "_fromgame";
_rcvChannelName = val;
initComChannels();
}
}
//return(__get__comChannelName());
}
static function get connected() {
return(_connected);
}
static function connect(id, clip, onError) {
if ((!_connected) && (_clip == undefined)) {
trace("MochiServices Connecting...");
_connecting = true;
init(id, clip);
}
if (onError != undefined) {
mochi.MochiServices.onError = onError;
} else if (mochi.MochiServices.onError == undefined) {
mochi.MochiServices.onError = function (errorCode) {
trace(errorCode);
};
}
}
static function disconnect() {
if (_connected || (_connecting)) {
_connecting = (_connected = false);
flush(true);
if (_clip != undefined) {
_clip.removeMovieClip();
delete _clip;
}
_listenChannel.close();
_rcvChannel.close();
}
}
static function init(id, clip) {
_id = id;
if (clip != undefined) {
_container = clip;
} else {
_container = _root;
}
loadCommunicator(id, _container);
}
static function loadCommunicator(id, clip) {
var _local2 = "_mochiservices_com_" + id;
if (_clip != null) {
return(_clip);
}
if (!isNetworkAvailable) {
return(null);
}
allowDomains(_gatewayURL);
_clip = clip.createEmptyMovieClip(_local2, 10336, false);
_loader = new MovieClipLoader();
if (_loaderListener.waitInterval != null) {
clearInterval(_loaderListener.waitInterval);
}
_loaderListener = {};
_loaderListener.onLoadError = function (target_mc, errorCode, httpStatus) {
trace("MochiServices could not load.");
mochi.MochiServices.disconnect();
mochi.MochiServices.onError.apply(null, [errorCode]);
};
_loaderListener.onLoadStart = function (target_mc) {
this.isLoading = true;
};
_loaderListener.startTime = getTimer();
_loaderListener.wait = function () {
if ((getTimer() - this.startTime) > 10000) {
if (!this.isLoading) {
mochi.MochiServices.disconnect();
mochi.MochiServices.onError.apply(null, ["IOError"]);
}
clearInterval(this.waitInterval);
}
};
_loaderListener.waitInterval = setInterval(_loaderListener, "wait", 1000);
_loader.addListener(_loaderListener);
_loader.loadClip(_gatewayURL, _clip);
_sendChannel = new LocalConnection();
_sendChannel._queue = [];
_rcvChannel = new LocalConnection();
_rcvChannel.allowDomain = function (d) {
return(true);
};
_rcvChannel.allowInsecureDomain = _rcvChannel.allowDomain;
_rcvChannel._nextcallbackID = 0;
_rcvChannel._callbacks = {};
listen();
return(_clip);
}
static function onStatus(infoObject) {
if (!(infoObject.level === "error")) {
} else {
_connected = false;
_listenChannel.connect(_listenChannelName);
}
}
static function listen() {
_listenChannel = new LocalConnection();
_listenChannel.handshake = function (args) {
mochi.MochiServices.__set__comChannelName(args.newChannel);
};
_listenChannel.allowDomain = function (d) {
return(true);
};
_listenChannel.allowInsecureDomain = _listenChannel.allowDomain;
_listenChannel.connect(_listenChannelName);
trace("Waiting for MochiAds services to connect...");
}
static function initComChannels() {
if (!_connected) {
_sendChannel.onStatus = function (infoObject) {
mochi.MochiServices.onStatus(infoObject);
};
_sendChannel.send(_sendChannelName, "onReceive", {methodName:"handshakeDone"});
_sendChannel.send(_sendChannelName, "onReceive", {methodName:"registerGame", id:_id, clip:_clip, version:getVersion()});
_rcvChannel.onStatus = function (infoObject) {
mochi.MochiServices.onStatus(infoObject);
};
_rcvChannel.onReceive = function (pkg) {
var _local5 = pkg.callbackID;
var _local4 = this._callbacks[_local5];
if (!_local4) {
return(undefined);
}
var _local2 = _local4.callbackMethod;
var _local3 = _local4.callbackObject;
if (_local3 && (typeof(_local2) == "string")) {
_local2 = _local3[_local2];
}
if (_local2 != undefined) {
_local2.apply(_local3, pkg.args);
}
delete this._callbacks[_local5];
};
_rcvChannel.onError = function () {
mochi.MochiServices.onError.apply(null, ["IOError"]);
};
_rcvChannel.connect(_rcvChannelName);
trace("connected!");
_connecting = false;
_connected = true;
_listenChannel.close();
while (_sendChannel._queue.length > 0) {
_sendChannel.send(_sendChannelName, "onReceive", _sendChannel._queue.shift());
}
}
}
static function flush(error) {
var _local1;
var _local2;
while (_sendChannel._queue.length > 0) {
_local1 = _sendChannel._queue.shift();
if (_local1.callbackID != null) {
_local2 = _rcvChannel._callbacks[_local1.callbackID];
}
delete _rcvChannel._callbacks[_local1.callbackID];
if (error) {
handleError(_local1.args, _local2.callbackObject, _local2.callbackMethod);
}
}
}
static function handleError(args, callbackObject, callbackMethod) {
if (args != null) {
if (args.onError != null) {
args.onError.apply(null, ["NotConnected"]);
}
if ((args.options != null) && (args.options.onError != null)) {
args.options.onError.apply(null, ["NotConnected"]);
}
}
if (callbackMethod != null) {
args = {};
args.error = true;
args.errorCode = "NotConnected";
if ((callbackObject != null) && (typeof(callbackMethod) == "string")) {
callbackObject[callbackMethod](args);
} else if (callbackMethod != null) {
callbackMethod.apply(args);
}
}
}
static function send(methodName, args, callbackObject, callbackMethod) {
if (_connected) {
_sendChannel.send(_sendChannelName, "onReceive", {methodName:methodName, args:args, callbackID:_rcvChannel._nextcallbackID});
} else {
if ((_clip == undefined) || (!_connecting)) {
onError.apply(null, ["NotConnected"]);
handleError(args, callbackObject, callbackMethod);
flush(true);
return(undefined);
}
_sendChannel._queue.push({methodName:methodName, args:args, callbackID:_rcvChannel._nextcallbackID});
}
_rcvChannel._callbacks[_rcvChannel._nextcallbackID] = {callbackObject:callbackObject, callbackMethod:callbackMethod};
_rcvChannel._nextcallbackID++;
}
static var _gatewayURL = "http://www.mochiads.com/static/lib/services/services.swf";
static var _listenChannelName = "__mochiservices";
static var _connecting = false;
static var _connected = false;
}
Symbol 171 MovieClip Frame 172
stop();
_parent.play();
Symbol 185 MovieClip Frame 1
stop();
Symbol 185 MovieClip Frame 13
gotoAndPlay (2);
Symbol 190 MovieClip Frame 1
var heart = Math.round((_parent.ptcNum / _parent.overflow) * 100);
msk._yscale = heart;
stop();
Symbol 191 MovieClip Frame 1
function randRange(min, max) {
var _local1 = Math.floor(Math.random() * ((max - min) + 1)) + min;
return(_local1);
}
function fadein(obj) {
obj._alpha = 0;
obj.onEnterFrame = function () {
if (this._alpha <= 100) {
this._alpha = this._alpha + 9;
} else {
delete obj.onEnterFrame;
}
};
}
function fadeout(obj) {
obj._alpha = 100;
obj.onEnterFrame = function () {
if (this._alpha > 0) {
this._alpha = this._alpha - 3;
} else {
delete obj.onEnterFrame;
removeMovieClip(obj);
}
};
}
var root = this;
var ArrayLoaded = false;
var ConfigLoaded = false;
var bg_music = new Sound();
bg_music.attachSound("music_bg.mp3");
var matchWithDishSound = new Sound();
matchWithDishSound.attachSound("good.wav");
matchWithDishSound.setVolume(70);
startParticleTypeNumber = 10;
overflowParticlesNumber = 40;
overflowMetterBlink = 95;
addParticleTime = 2;
addParticlePerTime = 2;
startBowlsNumber = 2;
timeNextLevel1 = 15;
timeNextLevel2 = 45;
firstWoo = 5;
dropNumber = 5;
wooRemain = 10;
macroSize = 100;
normalSize = 50;
microSize = 50;
normalScore = 100;
wooScore = 50;
var sizeArr = new Array(macroSize, normalSize, microSize);
colorName = ["White", "Green", "Orange", "Pink", "Blue", "Dark Green", "Light Blue", "Red"];
colorArr = ["0xFFFFFF", "0x00FF00", "0xFF9900", "0xFF00FF", "0x0202DB", "0x009900", "0x00FFFF", "0xFF0000"];
colorArrLength = colorName.length;
var wooTypeCase = new Array("C", "C", "P", "S");
wooTypeCaseLength = wooTypeCase.length;
randomMove = function () {
i = 0;
while (i < ptcCount) {
var _local1 = ptc["ptc" + i];
if (!_local1.inDrag) {
_local1._rotation = _local1._rotation + _local1.rotateSpd;
_local1.sign_x = ((_local1.x_new > _local1._x) ? 1 : -1);
_local1.dx = Math.abs(_local1.x_new - _local1._x);
(((_local1.dx > _local1.speed) || (_local1.dx < (-_local1.speed))) ? ((_local1._x = _local1._x + (_local1.sign_x * _local1.speed))) : ((_local1.x_new = Math.random() * moveWid)));
_local1.sign_y = ((_local1.y_new > _local1._y) ? 1 : -1);
_local1.dy = Math.abs(_local1.y_new - _local1._y);
(((_local1.dy > _local1.speed) || (_local1.dy < (-_local1.speed))) ? ((_local1._y = _local1._y + (_local1.sign_y * _local1.speed))) : ((_local1.y_new = Math.random() * moveHei)));
}
i++;
}
};
bubble_move = function () {
var _local3 = 0;
var _local4 = 8;
while (_local3 < _local4) {
bubble.attachMovie("bubble_obj", "bubble" + _local3, _local3);
var _local2 = bubble["bubble" + _local3];
_local2.speed = randRange(5, 10) / 10;
_local2.sizeScale = randRange(5, 10) / 10;
_local2._xscale = (_local2._yscale = 100 * _local2.sizeScale);
_local2._x = ptc._x + (Math.random() * moveWid);
_local2._y = ptc._y + (Math.random() * moveHei);
_local2.onEnterFrame = function () {
this._y = this._y - (2 * this.speed);
if (this._y < ptc._y) {
this._y = ptc._y + moveHei;
this._x = ptc._x + (Math.random() * moveWid);
this.speed = randRange(5, 10) / 10;
}
};
_local3++;
}
};
bubble_move();
var arrXML = new XML("<microscope><colorType><color code=\"0xFFFFFF\" name=\"White\"/><color code=\"0x00FF00\" name=\"Green\"/><color code=\"0xFF9900\" name=\"Orange\"/><color code=\"0xFF00FF\" name=\"Pink\"/><color code=\"0x0202DB\" name=\"Blue\"/><color code=\"0x009900\" name=\"Dark Green\"/><color code=\"0x00FFFF\" name=\"Light Blue\"/><color code=\"0xFF0000\" name=\"Red\"/></colorType><wooType><type>C</type><type>C</type><type>P</type><type>S</type></wooType></microscope>");
arrXML.ignoreWhite = true;
if (!menu) {
this.attachMovie("menu", "menu", this.getNextHighestDepth());
}
menu.gotoAndStop("start");
stop();
Symbol 191 MovieClip Frame 8
function countFunc() {
if (countLv < timeNextLevel2) {
countLv++;
}
addPtcCount++;
if (addPtcCount >= addPtcTime) {
addPtc();
addPtcCount = 0;
}
if ((countLv == timeNextLevel1) || (countLv == timeNextLevel2)) {
nextLevel();
}
}
function check_bowl(xm, ym) {
var _local4;
if (xm < ptc._x) {
n = 0;
while (n < lv) {
if ((((xm > this["bowlXpos" + n]) && (xm < (this["bowlXpos" + n] + bowlWidth))) && (ym > this["bowlYpos" + n])) && (ym < (this["bowlYpos" + n] + bowlHeight))) {
_local4 = n;
}
n++;
}
}
return(_local4);
}
removeMovieClip("menu");
gameOver = false;
bg_music.start(0, 999);
var matchDrop = 0;
cnt_txt.text = "00:" + count;
var countLv = 0;
var addPtcCount = 0;
countInterval = setInterval(countFunc, 1000);
overflowmeter.gotoAndStop(1);
i = 0;
while (i < 4) {
if (bowls["bowl" + i]) {
removeMovieClip(bowls["bowl" + i]);
}
i++;
}
if (ptcCount) {
f = 0;
while (f < ptcCount) {
removeMovieClip(ptc["ptc" + f]);
f++;
}
}
var strandTypes = 7;
var bowlWidth = 95;
var bowlHeight = 84;
ptc._x = 320;
ptc._y = 12;
moveWid = 340;
moveHei = 390;
var bowlXpos0 = 210;
var bowlYpos0 = 60;
var bowlXpos1 = 160;
var bowlYpos1 = 140;
var bowlXpos2 = 155;
var bowlYpos2 = 230;
var bowlXpos3 = 190;
var bowlYpos3 = 320;
var ptcNum = new Number(startParticleTypeNumber);
var addPtcTime = new Number(addParticleTime);
var overflow = new Number(overflowParticlesNumber);
var normalScore = new Number(normalScore);
var wooScore = new Number(wooScore);
var overflowMetterBlink = new Number(overflowMetterBlink);
ptcCount = ptcNum;
var addPtcEverytime = new Number(addParticlePerTime);
var totalParticleCaptured = 0;
var totalscore = 0;
var lv = new Number(startBowlsNumber);
var dishChosen = 0;
overflowmeter.msk._yscale = Math.round((ptcNum / overflow) * 100);
var wooBowl;
var requestStr = [];
var requestCol = [];
var strandTypeArr = [];
var colorTypeArr = [];
i = 0;
while (i < (strandTypes - 1)) {
strandTypeArr.push(0);
i++;
}
i = 0;
while (i < colorArrLength) {
colorTypeArr.push(0);
i++;
}
bowlNotWoo = [];
var wooIsOn = false;
var currentWooType = 0;
setWoo = function () {
wooIsOn = true;
var _local2 = new String(wooTypeCase[currentWooType]);
var _local1 = 0;
while (_local1 < _local2.length) {
wooType = _local2.substr(_local1, 1);
switch (wooType) {
case "S" :
woo("shape");
break;
case "C" :
woo("color");
break;
case "P" :
woo("size");
}
_local1++;
}
((currentWooType == (wooTypeCaseLength - 1)) ? ((currentWooType = 0)) : (currentWooType++));
var wooTime = 0;
timeDisplayWoo = setInterval(function () {
wooTime++;
if (wooTime > wooRemain) {
clearInterval(timeDisplayWoo);
endWoo();
wooIsOn = false;
wooTime = 0;
}
}, 1000);
};
woo = function (type) {
i = 0;
while (i < lv) {
if (bowls["bowl" + i].inWoo == false) {
bowlNotWoo.push(i);
}
i++;
}
var _local2 = randRange(0, bowlNotWoo.length - 1);
var tgt = bowls["bowl" + bowlNotWoo[_local2]];
wooBowl = _local2;
tgt.attachMovie("woo_timer", "woo_timer", this.getNextHighestDepth());
tgt.woo_timer._y = 55;
var wooTime = wooRemain;
tgt.wooTimer = setInterval(function () {
tgt.woo_timer.time_txt.text = wooTime;
if (wooTime <= 0) {
clearInterval(tgt.wooTimer);
wooTime = wooRemain;
} else {
wooTime--;
}
}, 1000);
setBowlPropertie(bowlNotWoo[_local2], type);
tgt.inWoo = true;
tgt.gotoAndPlay("blinking");
delete bowlNotWoo;
bowlNotWoo = [];
};
endWoo = function () {
wooBowl = null;
i = 0;
while (i < lv) {
if (bowls["bowl" + i].inWoo == true) {
bowls["bowl" + i].inWoo = false;
replacebowls(bowls["bowl" + i], i);
}
i++;
}
};
addPtc = function () {
if (ptcNum >= overflow) {
clearInterval(countInterval);
i = 0;
while (i < ptcCount) {
var _local1 = ptc["ptc" + i];
_local1.inDrag = true;
i++;
}
gotoAndStop ("end");
} else {
i = ptcCount;
while (i < (ptcCount + addPtcEverytime)) {
if (!ptc["ptc" + i]) {
ptc.attachMovie("particles", "ptc" + i, ptc.getNextHighestDepth());
ptcNum++;
var _local1 = ptc["ptc" + i];
cfgParticles(_local1, i);
}
i++;
}
ptcCount = ptcCount + addPtcEverytime;
}
var _local2 = Math.round((ptcNum / overflow) * 100);
overflowmeter.msk._yscale = _local2;
if ((_local2 >= overflowMetterBlink) && (overflowmeter.bg._currentframe == 1)) {
overflowmeter.bg.gotoAndPlay(2);
} else if ((_local2 < overflowMetterBlink) && (overflowmeter.bg._currentframe != 1)) {
overflowmeter.bg.gotoAndStop(1);
}
};
init_particles = function () {
i = 0;
while (i < ptcCount) {
if (!ptc["ptc" + i]) {
ptc.attachMovie("particles", "ptc" + i, ptc.getNextHighestDepth());
var _local1 = ptc["ptc" + i];
cfgParticles(_local1, i);
}
i++;
}
};
cfgParticles = function (tgt, num) {
if ((particleMissing == true) && (wooIsOn == false)) {
strType = missingParticleType[0];
colorNum = missingParticleColor[0];
missingParticleType.splice(0, 1);
missingParticleColor.splice(0, 1);
if (missingParticleType.length == 0) {
particleMissing = false;
}
} else {
strType = randRange(0, strandTypes - 1);
colorNum = randRange(0, colorArrLength - 1);
}
colorVl = colorArr[colorNum];
sizeVl = sizeArr[randRange(0, sizeArr.length - 1)];
strandTypeArr[strType]++;
colorTypeArr[colorNum]++;
tgt.ptc_mc.attachMovie("strand" + strType, "str", tgt.ptc_mc.getNextHighestDepth());
tgt.strType = strType;
tgt.catching = false;
tgt._y = Math.random() * moveHei;
requestStr.push(strType);
requestCol.push(colorNum);
tgt._xscale = (tgt._yscale = sizeVl);
tgt.sizeType = sizeVl;
var _local3 = new Color(tgt.ptc_mc.str);
_local3.setRGB(colorVl);
tgt.colorType = colorNum;
checkType(num);
tgt.speed = randRange(5, 15) / 10;
tgt._x = Math.random() * moveWid;
tgt.xWay = randRange(-9, 9) / 10;
tgt.yWay = randRange(-9, 9) / 10;
tgt.xNew = Math.random() * moveWid;
tgt.yNew = Math.random() * moveHei;
tgt.rotateSpd = randRange(-9, 9) / 10;
tgt.onPress = function () {
if ((!gameOver) && (tgt.catching == false)) {
var tgt = this;
tgt._x = tgt._parent._xmouse;
tgt._y = tgt._parent._ymouse;
tgt.startDrag();
tgt.inDrag = true;
}
};
tgt.onRelease = function () {
if ((!gameOver) && (tgt.catching == false)) {
var tgt = this;
var _local2 = check_bowl(_xmouse, _ymouse);
tgt.stopDrag();
if (_local2 != undefined) {
dishChosen = _local2;
checkToCatch(tgt);
} else {
tgt.inDrag = false;
}
tgt.gotoAndStop(1);
}
};
tgt.onRollOver = function () {
if (!gameOver) {
this.swapDepths(ptc.getNextHighestDepth());
this.gotoAndPlay("over");
}
};
tgt.onRollOut = function () {
if (!gameOver) {
this.gotoAndPlay("out");
}
};
};
bowlStrType = [];
bowlColorType = [];
setBowlPropertie = function (n, opt) {
var _local2 = bowls["bowl" + n];
_local2.choseBowl = false;
_local2._x = this["bowlXpos" + n];
_local2._y = this["bowlYpos" + n];
removeMovieClip(_local2.model.ptc);
removeMovieClip(_local2.model.woo_timer);
removeMovieClip(_local2.model.txtmc);
if (opt == "init") {
_local2.dish.gotoAndStop("normal");
_local2.wooCase = 0;
_local2.inWoo = false;
var _local5 = randRange(0, requestStr.length - 1);
var _local6 = requestStr[_local5];
if (_local6 == undefined) {
i = 0;
while (i < ptcCount) {
if (ptc["ptc" + i] != undefined) {
requestStr.push(ptc["ptc" + i].strType);
requestCol.push(ptc["ptc" + i].colorType);
}
i++;
}
_local5 = randRange(0, requestStr.length - 1);
_local6 = requestStr[_local5];
}
var _local8 = colorArr[requestCol[_local5]];
_local2.scoretxt.gotoAndStop(1);
_local2.setScore = normalScore;
_local2.model.attachMovie("strand" + _local6, "ptc", bowls.getNextHighestDepth());
_local2.strType = _local6;
_local2.model.ptc._x = (_local2.model.ptc._y = 22);
_local2.model.ptc._width = (_local2.model.ptc._height = 40);
var _local9 = new Color(_local2.model.ptc);
var _local10 = new Color(_local2.scoretxt.mc);
_local2.colorType = requestCol[_local5];
_local9.setRGB(_local8);
_local10.setRGB(_local8);
requestStr.splice(_local5, 1);
requestCol.splice(_local5, 1);
bowlStrType.push(_local2.strType);
bowlColorType.push(_local2.colorType);
} else if (opt == "shape") {
_local2.dish.gotoAndStop("woo");
_local2.txt.text = "Type:";
_local2.scoretxt.gotoAndStop("woo");
_local2.setScore = wooScore;
var _local3 = 1;
var _local4 = 0;
i = 0;
while (i < strandTypeArr.length) {
if (strandTypeArr[i] > strandTypeArr[_local3]) {
_local3 = i;
}
if ((strandTypeArr[i] < strandTypeArr[_local3]) && (strandTypeArr[i] > strandTypeArr[_local4])) {
_local4 = i;
}
i++;
}
anotherBowlSameWoo = false;
j = 0;
while (j < lv) {
if (bowls["bowl" + j].wooCase == 1) {
anotherBowlSameWoo = true;
}
j++;
}
((anotherBowlSameWoo == true) ? ((case2 = _local4)) : ((case2 = _local3)));
_local2.strType = case2;
_local2.wooCase = 1;
anotherBowlSameWoo = false;
_local2.model.attachMovie("strand" + case2, "ptc", _local2.model.getNextHighestDepth());
_local2.model.ptc._width = (_local2.model.ptc._height = 40);
_local2.model.ptc._x = 20;
_local2.model.ptc._y = 40;
var _local9 = new Color(_local2.model.ptc);
var _local10 = new Color(_local2.scoretxt.mc);
_local9.setRGB(0);
_local10.setRGB(0);
} else if (opt == "color") {
_local2.dish.gotoAndStop("woo");
_local2.txt.text = "Color:";
_local2.scoretxt.gotoAndStop("woo");
_local2.setScore = wooScore;
maxColorTypeNode = 1;
secondColorTypeNode = 0;
anotherBowlSameWoo = false;
i = 0;
while (i < colorTypeArr.length) {
if (colorTypeArr[i] > colorTypeArr[maxColorTypeNode]) {
maxColorTypeNode = i;
if (secondColorTypeNode == maxColorTypeNode) {
secondColorTypeNode = i + 1;
}
}
if ((colorTypeArr[i] < colorTypeArr[maxColorTypeNode]) && (colorTypeArr[i] > colorTypeArr[secondColorTypeNode])) {
secondColorTypeNode = i;
}
i++;
}
j = 0;
while (j < lv) {
if (bowls["bowl" + j].wooCase == 2) {
anotherBowlSameWoo = true;
}
j++;
}
_local2.wooCase = 2;
((anotherBowlSameWoo == true) ? ((case2 = secondColorTypeNode)) : ((case2 = maxColorTypeNode)));
_local2.model.attachMovie("wootext", "txtmc", _local2.model.getNextHighestDepth());
_local2.model.txtmc._y = 20;
_local2.model.txtmc.txt.text = colorName[case2];
var _local8 = colorArr[case2];
_local2.colorType = case2;
var _local9 = new Color(_local2.model.txtmc);
var _local10 = new Color(_local2.scoretxt.mc);
_local9.setRGB(_local8);
_local10.setRGB(_local8);
} else if (opt == "size") {
_local2.dish.gotoAndStop("woo");
_local2.txt.text = "Size:";
_local2.scoretxt.gotoAndStop("woo");
_local2.setScore = wooScore;
_local2.wooCase = 3;
var case2 = randRange(0, 1);
_local2.model.attachMovie("wootext", "txtmc", _local2.model.getNextHighestDepth());
_local2.model.txtmc._y = 20;
_local2.model.txtmc.txt.text = ((case2 == 0) ? "small" : "BIG");
_local2.sizeType = ((case2 == 0) ? (sizeArr[2]) : (sizeArr[0]));
var _local9 = new Color(_local2.model.txtmc);
var _local10 = new Color(_local2.scoretxt.mc);
_local9.setRGB(0);
_local10.setRGB(0);
}
fadein(_local2);
};
replacebowls = function (obj, n) {
obj._alpha = 100;
obj.onEnterFrame = function () {
if (this._alpha > 0) {
this._alpha = this._alpha - 3;
} else {
delete obj.onEnterFrame;
removeMovieClip(obj);
bowls.attachMovie("bowl", "bowl" + n, bowls.getNextHighestDepth());
setBowlPropertie(n, "init");
}
};
};
initBowls = function () {
n = 0;
while (n < lv) {
if (!bowls["bowl" + n]) {
bowls.attachMovie("bowl", "bowl" + n, bowls.getNextHighestDepth());
setBowlPropertie(n, "init");
}
n++;
}
};
missingParticleType = [];
missingParticleColor = [];
var particleMissing = false;
catchingParticle = function (obj) {
j = 0;
while (j < bowlStrType.length) {
if ((bowls["bowl" + dishChosen].strType == bowlStrType[j]) && (bowls["bowl" + dishChosen].colorType == bowlColorType[j])) {
bowlStrType.splice(j, 1);
bowlColorType.splice(j, 1);
}
j++;
}
matchWithDishSound.start();
i = 0;
while (i < requestStr.length) {
if ((obj.strType == requestStr[i]) && (obj.colorType == requestCol[i])) {
requestStr.splice(i, 1);
requestCol.splice(i, 1);
}
i++;
}
obj._rotation = 0;
obj._width = (obj._height = 40);
obj._x = (bowls["bowl" + dishChosen]._x - obj._parent._x) + 60;
obj._y = (bowls["bowl" + dishChosen]._y - obj._parent._y) + 45;
if (bowls["bowl" + dishChosen].wooCase != 0) {
k = 0;
while (k < lv) {
if (((bowls["bowl" + k].wooCase == 0) && (obj.strType == bowls["bowl" + k].strType)) && (obj.colorType == bowls["bowl" + k].colorType)) {
missingParticleType.push(obj.strType);
missingParticleColor.push(obj.colorType);
particleMissing = true;
}
k++;
}
}
strandTypeArr[obj.strType]--;
colorTypeArr[obj.colorType]--;
ptcNum--;
totalParticleCaptured++;
var _local2 = Math.round((ptcNum / overflow) * 100);
overflowmeter.msk._yscale = _local2;
totalscore = totalscore + bowls["bowl" + dishChosen].setScore;
scr_txt.text = totalscore;
fadeout(obj);
obj.catching = true;
};
checkToCatch = function (obj) {
var _local2 = bowls["bowl" + dishChosen];
if (dishChosen != undefined) {
if (_local2.wooCase == 0) {
if ((obj.strType == _local2.strType) && (obj.colorType == _local2.colorType)) {
catchingParticle(obj);
if (wooIsOn == false) {
matchDrop++;
}
if (matchDrop == dropNumber) {
replacebowls(bowls["bowl" + dishChosen], dishChosen);
setWoo();
matchDrop = 0;
} else {
replacebowls(bowls["bowl" + dishChosen], dishChosen);
}
} else {
obj.inDrag = false;
}
} else if (_local2.wooCase == 1) {
((obj.strType == _local2.strType) ? (catchingParticle(obj)) : ((obj.inDrag = false)));
} else if (_local2.wooCase == 2) {
((obj.colorType == _local2.colorType) ? (catchingParticle(obj)) : ((obj.inDrag = false)));
} else if (_local2.wooCase == 3) {
if (_local2.sizeType == macroSize) {
((obj.sizeType == _local2.sizeType) ? (catchingParticle(obj)) : ((obj.inDrag = false)));
} else {
((obj.sizeType != macroSize) ? (catchingParticle(obj)) : ((obj.inDrag = false)));
}
}
dishChosen = 0;
}
};
nextLevel = function () {
if (lv < 4) {
lv++;
initBowls();
}
};
this.onEnterFrame = function () {
var _local1 = check_bowl(_xmouse, _ymouse);
var _local2 = bowls["bowl" + _local1];
if (_local1 != undefined) {
if (!_local2.choseBowl) {
_local2.choseBowl = true;
_local2.gotoAndPlay(2);
n = 0;
while (n < lv) {
if (bowls["bowl" + n].choseBowl) {
if (n != _local1) {
bowls["bowl" + n].choseBowl = false;
if (bowls["bowl" + n].inWoo == false) {
bowls["bowl" + n].gotoAndPlay("out");
}
}
}
n++;
}
}
} else {
n = 0;
while (n < lv) {
if (bowls["bowl" + n].choseBowl) {
bowls["bowl" + n].choseBowl = false;
bowls["bowl" + n].gotoAndPlay("out");
}
n++;
}
}
randomMove();
};
init_particles();
initBowls();
stop();
Symbol 191 MovieClip Frame 17
i = 0;
while (i < ptcTypeNum) {
var tgt = ptc["ptc" + i];
tgt.inDrag = true;
i++;
}
gameOver = true;
bg_music.stop();
overflowmeter.bg.gotoAndStop(1);
if (!menu) {
this.attachMovie("menu", "menu", this.getNextHighestDepth());
}
menu.gotoAndStop("score");
menu.totalscore.stt.text = "SCORE";
menu.totalscore.vl.text = totalscore;
menu.totalParticleCaptured.stt.text = "PARTICLES CAPTURED";
menu.totalParticleCaptured.vl.text = totalParticleCaptured;
upScore = function () {
postScore = new LoadVars();
postScore.onLoad = function () {
if ((postScore.result = "updated")) {
menu.gotoAndStop("topscore");
}
};
postScore.playerName = menu.playerName.text;
postScore.gameScore = totalscore;
postScore.particleCapture = totalParticleCaptured;
postScore.result = "sending";
postScore.sendAndLoad("updateScore.php", postScore, "POST");
};
menu.playAgain_btn.onRelease = function () {
totalscore = 0;
scr_txt.text = "00";
gotoAndPlay ("play");
};
menu.mainMenu_btn.onRelease = function () {
totalscore = 0;
scr_txt.text = "00";
gotoAndPlay ("introduce");
};
menu.viewtop_btn.onRelease = function () {
menu.nextFrame();
menu.smt_btn.onRelease = function () {
if (menu.playerName.text != "") {
upScore();
} else {
menu.stt.text = "Retype your name.";
}
};
menu.skip_btn.onRelease = function () {
menu.gotoAndStop("topscore");
};
};
stop();
Symbol 195 Button
on (release) {
getURL ("http://www.legacygames.com/", "_blank");
}