Frame 1
this.stop();
this.loading_mc.onEnterFrame = function () {
if (_root.getBytesTotal() == _root.getBytesLoaded()) {
_root.gotoAndPlay("opening");
}
};
Frame 2
function SoundManager() {
this.init();
}
function mameMgr() {
this.init();
}
function init() {
this.gameLevel = 0;
this.MAIN.createEmptyMovieClip("mame", 2);
this.MAIN.createEmptyMovieClip("shadow", 0);
this.MAIN.dpCnt = 0;
_global.TIMER.init();
_global.mMGR.init();
_global.SCORE.init();
_global.COMBO.init();
}
function createMame(num) {
var i = 0;
while (i < num) {
var dpCnt = this.MAIN.dpCnt;
var path = this.MAIN.mame;
var mcname = ("mame" + dpCnt);
path.attachMovie("mameSymbol", mcname, dpCnt);
var tmc = path[mcname];
tmc._x = (tmc._cx = (tmc._ox = (275 + (Math.random() * 100)) - 50));
tmc._y = (tmc._cy = (tmc._oy = (121 + (Math.random() * 100)) - 50));
path = this.MAIN.shadow;
path.attachMovie("mameShadowSymbol", mcname, dpCnt);
var tmcs = path[mcname];
tmcs._x = tmc._x + 5;
tmcs._y = tmc._y + 5;
tmcs._rotation = tmc._rotation;
tmc.shadow = tmcs;
this.MAIN.dpCnt++;
tmc._myGroup = 1;
mMgr.addGroup(1);
i++;
}
}
function onTimeUp() {
trace("timeup");
_root.gotoAndStop("timeup");
}
function onCombo() {
trace("combo");
_global.COMBOEFFECT.gotoAndPlay(2);
_global.SoundMgr.start(30, 100);
}
function onComplete() {
this.gameLevel = this.gameLevel + 1;
if ((this.gameLevel % 3) == 0) {
this.fly_mc.start();
}
_global.TIMER.setReduce(0.1 + (this.gameLevel * 0.021));
_global.TIMER.addTime(20);
_global.SoundMgr.start(50, 100);
this.createMame(12);
}
function startGame() {
_global.TIMER.startTimer();
this.gotoAndStop("main");
}
SoundManager.prototype._soundList;
SoundManager.prototype._channelList;
SoundManager.prototype.init = function () {
this._soundList = new Array(255);
this._channelList = new Array(24);
};
SoundManager.prototype.attachSound = function (idName, idNum) {
trace((("attachSound ID=" + idNum) + ": ") + idName);
this._soundList[idNum] = idName;
return(true);
};
SoundManager.prototype.getSoundName = function (idNum) {
return(this._soundList[idNum]);
};
SoundManager.prototype.start = function (id, vol) {
var s;
var cl = this._channelList;
var imax = cl.length;
var i = 0;
while (i < imax) {
if (!cl[i]) {
s = new Sound();
s.id = id;
s._parent = this;
s.attachSound(this._soundList[id]);
s.onSoundComplete = this.soundComplete;
s.setVolume(vol);
s.start();
cl[i] = s;
return(true);
}
i++;
}
};
SoundManager.prototype.soundComplete = function () {
this._parent.onEnd(this.id);
};
SoundManager.prototype.onEnd = function (id) {
delete this._channelList[id];
this._channelList[id] = null;
};
MameMgr.prototype.init = function () {
this._gKey = new Array();
this._gkey[0] = "FIELD";
this._gkey[1] = "DISH0";
this._gkey[2] = "DISH1";
this._gkey[3] = "DISH2";
this._gkey[4] = "DRAG";
this._group = new Array();
this._group[0] = 0;
this._group[1] = 0;
this._group[2] = 0;
this._group[3] = 0;
this._group[4] = 0;
};
MameMgr.prototype.setGroup = function (pb, nb) {
this._group[pb] = this._group[pb] - 1;
this._group[nb] = this._group[nb] + 1;
this.onSetGroup();
if (this.checkComplete()) {
this.onComplete();
}
};
MameMgr.prototype.addGroup = function (g) {
this._group[g] = this._group[g] + 1;
this.onAddGroup();
};
MameMgr.prototype.checkComplete = function () {
if (this._group[0]) {
return(false);
}
if (this._group[1]) {
return(false);
}
if (this._group[4]) {
return(false);
}
return(true);
};
MameMgr.prototype.getScore = function () {
var g = this._group;
return(g[2] + g[3]);
};
MameMgr.prototype.dump = function () {
var imax = this._group.length;
var i = 0;
while (i < imax) {
trace((this._gKey[i] + ": ") + this._group[i]);
i++;
}
};
MameMgr.prototype.onComplete = function () {
trace("complete!!");
};
MameMgr.prototype.onSetGroup = function () {
};
_global.SoundMgr = new SoundManager();
_global.SoundMgr.attachSound("s0", 10);
_global.SoundMgr.attachSound("s0", 20);
_global.SoundMgr.attachSound("comboEffect", 30);
_global.SoundMgr.attachSound("timer", 31);
_global.SoundMgr.attachSound("hashi", 40);
_global.SoundMgr.attachSound("timer", 50);
_global.SoundMgr.attachSound("dead", 60);
_global.DISHR = _root.dishR;
_global.DISHW = _root.dishW;
_global.DISHB = _root.dishB;
_global.SCORE = _root.score_mc;
_global.COMBO = _root.combo_mc;
_global.TIMER = _root.timer_mc;
_global.COMBOEFFECT = _root.comboEffect_mc;
_global.mMgr = new MameMgr();
_global.mMgr.onComplete = function () {
_root.onComplete();
};
_global.mMgr.onSetGroup = function () {
var s = this.getScore();
_global.SCORE.setScore(s);
};
this.hand_mc.onEnterFrame = function () {
this._x = _xmouse;
this._y = _ymouse;
this._rotation = ((_xmouse - (Stage.width / 2)) / 15) - ((_ymouse - (Stage.height / 2)) / 10);
this.fuku_mc._rotation = (_xmouse - (Stage.width / 2)) / 10;
};
this.dragStart = function (col) {
_global.soundMgr.start(40, 100);
this.hand_mc.gotoAndPlay(2);
this.hand_mc.hand_mc.gotoAndStop(3);
this.hand_mc.hand_mc.mame_mc.gotoAndStop(col);
};
this.dragEnd = function () {
this.hand_mc.gotoAndStop(1);
};
this.onMissClick = function () {
_global.soundMgr.start(40, 100);
this.hand_mc.gotoAndPlay(4);
};
this.bg_btn.useHandCursor = false;
this.bg_btn.onPress = function () {
_global.soundMgr.start(40, 100);
this._parent.hand_mc.gotoAndStop(11);
};
this.bg_btn.onRelease = function () {
this._parent.hand_mc.gotoAndStop(1);
};
this.bg_btn.onReleaseOutside = function () {
this._parent.hand_mc.gotoAndStop(1);
};
this.MAIN = this.main_mc;
this._quality = "medium";
this.init();
this.createMame(12);
this.stop();
this.start_btn.onRelease = function () {
_root.startGame();
};
Instance of Symbol 68 MovieClip "score_mc" in Frame 2
/* no clip actions */
Frame 4
this.stop();
Frame 5
this.stop();
Symbol 8 Button
on (press) {
this.missClick();
}
Symbol 10 Button
on (press) {
this.dragStart();
_root.dragStart(this._col);
this.startDrag();
}
on (release) {
this.dragEnd();
_root.dragEnd();
this.stopDrag();
}
on (releaseOutside) {
this.dragEnd();
_root.dragEnd();
this.stopDrag();
}
Symbol 12 MovieClip [MameSymbol] Frame 1
#initclip 1
function Mame() {
this.init();
}
Mame.prototype = new MovieClip();
Mame.prototype._col;
Mame.prototype._cx;
Mame.prototype._cy;
Mame.prototype._cz;
Mame.prototype._ox;
Mame.prototype._oy;
Mame.prototype._vx;
Mame.prototype._vy;
Mame.prototype._vz;
Mame.prototype._ax;
Mame.prototype._ay;
Mame.prototype._g;
Mame.prototype._rv = 0;
Mame.prototype._f = 0.95;
Mame.prototype._isDrag = false;
Mame.prototype.init = function () {
var col = (Math.round(Math.random()) + 1);
this._col = col;
this.gotoAndStop(col);
this._cx = this._x;
this._cy = this._y;
this._rotation = Math.random() * 360;
};
Mame.prototype.stepRot = function () {
this._rv = this._rv * this._f;
this._rotation = this._rotation + this._rv;
if (Math.abs(this._rv) < 3) {
this._rotation = Math.round(this._rotation);
delete this.onEnterFrame;
}
this.view();
};
Mame.prototype.step = function () {
this._vx = this._vx * this._f;
this._vy = this._vy * this._f;
this._vz = (this._vz * 0.95) - 1.5;
this._cx = this._cx + this._vx;
this._cy = this._cy + this._vy;
this._cz = this._cz + this._vz;
this._rv = this._rv * this._f;
this._rotation = this._rotation + this._rv;
if (this._cx < 10) {
this._cx = 10;
this._vx = Math.abs(this._vx);
} else if (this._cx > 540) {
this._cx = 540;
this._vx = -Math.abs(this._vx);
}
if (this._cy < 10) {
this._cy = 10;
this._vy = Math.abs(this._vy);
} else if (this._cy > 390) {
this._cy = 390;
this._vy = -Math.abs(this._vy);
}
if (this._cz < 0) {
this._cz = 0;
this._vz = Math.abs(this._vz) * 0.8;
this._vx = this._vx * 0.8;
this._vy = this._vy * 0.8;
if (this._vz > 1.5) {
_global.SoundMgr.start(10, this._vz * 20);
}
}
this.view();
if ((((Math.abs(this._vx) < 0.9) && (Math.abs(this._vy) < 0.9)) && (this._cz < 1)) && (Math.abs(this._vz < 0.7))) {
this._x = Math.round(this._cx);
this._y = Math.round(this._cy);
if (this.hitTest(_global.DISHR)) {
_global.mMgr.setGroup(this._myGroup, 1);
_global.COMBO.resetValue();
this._myGroup = 1;
} else if (this.hitTest(_global.DISHW) && (this._col == 1)) {
_global.mMgr.setGroup(this._myGroup, 2);
_global.COMBO.addValue(1);
_global.TIMER.addTime(1 + (_root.gameLevel * 0.25));
this._myGroup = 2;
} else if (this.hitTest(_global.DISHB) && (this._col == 2)) {
_global.mMgr.setGroup(this._myGroup, 3);
_global.COMBO.addValue(1);
_global.TIMER.addTime(1 + (_root.gameLevel * 0.25));
this._myGroup = 3;
} else {
_global.mMgr.setGroup(this._myGroup, 0);
_global.COMBO.resetValue();
this._myGroup = 0;
}
if (Math.abs(this._rv) > 3) {
this.onEnterFrame = this.stepRot;
} else {
this._rotation = Math.round(this._rotation);
delete this.onEnterFrame;
}
}
};
Mame.prototype.missClick = function () {
this._vx = (Math.random() * 40) - 20;
this._vy = (Math.random() * 40) - 20;
this._vz = (Math.random() * 15) + (Math.random() * 15);
this._rv = (Math.random() * 140) - 70;
this.onEnterFrame = this.step;
_global.SoundMgr.start(20, 100);
_global.mMgr.setGroup(this._myGroup, 0);
this._myGroup = 0;
this.onMissClick();
};
Mame.prototype.dragStart = function () {
this.swapDepths(_root.MAIN.dpCnt++);
this._isDrag = 1;
this._ox = this._cx;
this._oy = this._cy;
this._cx = _xmouse;
this._cy = _ymouse;
this._view();
this._alpha = 0;
this.onEnterFrame = this.dragStep;
_global.mMgr.setGroup(this._myGroup, 4);
this._myGroup = 4;
};
Mame.prototype.dragStep = function () {
this._ox = this._cx;
this._oy = this._cy;
this._cx = _xmouse;
this._cy = _ymouse;
this._cz = 20;
this.view();
};
Mame.prototype.dragEnd = function () {
this._isDrag = 0;
this._alpha = 100;
this._vx = (this._cx - this._ox) * 2;
this._vy = (this._cy - this._oy) * 2;
var v = Math.sqrt((this._vx * this._vx) + (this._vy * this._vy));
this._rv = (v * Math.round(Math.random() * 10)) - 1;
this._vz = -5;
this.onEnterFrame = this.step;
_global.mMgr.setGroup(this._myGroup, 0);
this._myGroup = 0;
};
Mame.prototype.view = function () {
this._x = Math.round(this._cx);
this._y = Math.round(this._cy - this._cz);
this.shadow._x = (this._cx + 5) + Math.round(this._cz * 0.5);
this.shadow._y = (this._cy + 5) + Math.round(this._cz * 0.5);
this.shadow._rotation = this._rotation;
};
Mame.prototype.onMissClick = function () {
this.swapDepths(_root.MAIN.dpCnt++);
_global.COMBO.resetValue();
_root.onMissClick();
};
Object.registerClass("MameSymbol", Mame);
#endinitclip
this.stop();
Symbol 12 MovieClip [MameSymbol] Frame 2
this.stop();
Symbol 38 MovieClip Frame 1
function start() {
this._x = -100;
this._y = -100;
this._vx = 0;
this._vy = 0;
this._tx = Math.random() * 550;
this._ty = Math.random() * 400;
this._cnt = 300;
this.onEnterFrame = this.step1;
}
function end() {
}
function step1() {
if (Math.random() < 0.3) {
this._tx = (Math.random() * 450) + 50;
this._ty = (Math.random() * 300) + 50;
}
if ((this._cnt--) < 0) {
this._tx = -1000;
this._ty = -1000;
this.onEnterFrame = this.step2;
}
this.step_basic();
}
function step2() {
if ((this._x < -100) && (this._y < -100)) {
delete this.onEnterFrame;
}
this.step_basic();
}
function step3() {
}
function step_basic() {
var dx = (this._tx - this._x);
var dy = (this._ty - this._y);
var dist = Math.sqrt((dx * dx) + (dy * dy));
if (dist != 0) {
var ax = ((dx / dist) * 1.5);
var ay = ((dy / dist) * 1.5);
}
this._vx = (this._vx * 0.98) + ax;
this._vy = (this._vy * 0.98) + ay;
this._x = this._x + this._vx;
this._y = this._y + this._vy;
this._x = Math.round(this._x);
this._y = Math.round(this._y);
var rad = Math.atan2(this._vy, this._vx);
this._rotation = (rad * 180) / 3.14;
}
this.onEnterFrame = function () {
};
this.mc_btn.onPress = function () {
_global.soundMgr.start(60, 30);
trace("dead");
delete this._parent.onEnterFrame;
_global.TIMER.addTime(35);
_global.COMBO.reset();
this._parent.gotoAndPlay("dead");
};
Symbol 38 MovieClip Frame 4
this.gotoAndPlay(2);
Symbol 38 MovieClip Frame 9
this._x = -10000;
this._y = -10000;
Symbol 48 MovieClip Frame 1
this.stop();
Symbol 48 MovieClip Frame 2
this.stop();
Symbol 49 MovieClip Frame 1
this.stop();
Symbol 49 MovieClip Frame 2
this.stop();
Symbol 49 MovieClip Frame 3
this.stop();
Symbol 55 MovieClip Frame 1
this.hand_mc.gotoAndStop(1);
this.Stop();
Symbol 55 MovieClip Frame 2
Symbol 55 MovieClip Frame 3
this.stop();
Symbol 55 MovieClip Frame 4
this.hand_mc.gotoAndStop(1);
Symbol 55 MovieClip Frame 5
this.hand_mc.gotoAndStop(2);
Symbol 55 MovieClip Frame 6
this.hand_mc.gotoAndStop(1);
Symbol 55 MovieClip Frame 7
this.hand_mc.gotoAndStop(2);
Symbol 55 MovieClip Frame 8
this.hand_mc.gotoAndStop(1);
Symbol 55 MovieClip Frame 9
this.hand_mc.gotoAndStop(2);
Symbol 55 MovieClip Frame 10
this.gotoAndStop(1);
Symbol 55 MovieClip Frame 11
this.hand_mc.gotoAndStop(2);
Symbol 61 MovieClip Frame 1
this.onEnterFrame = function () {
};
this.init = function () {
this._reduce = 0.1;
this.timebar_mc._xscale = 100;
};
this.startTimer = function () {
this._time = 100;
this._maxTime = 100;
this.onEnterFrame = this.step;
this.timebar_mc.play();
};
this.step = function () {
this._time = this._time - this._reduce;
this.view();
if (this._time <= 0) {
this.onTimeUp();
delete this.onEnterFrame;
}
};
this.addTime = function (at) {
this._time = this._time + at;
if (this._time > this._maxTime) {
this._time = this._maxTime;
}
};
this.setReduce = function (val) {
this._reduce = val;
};
this.view = function () {
var xs = this.timebar_mc._xscale;
this.timebar_mc._xscale = xs + ((((this._time / this._maxTime) * 100) - xs) * 0.2);
};
this.onTenPercent = function () {
_global.soundMgr.start(50, 100);
};
this.onTimeUp = function () {
_root.onTimeUp();
};
this.init();
this.timebar_mc.stop();
Symbol 68 MovieClip Frame 1
function init() {
this._score = 0;
}
function addScore(s) {
this._score = this._score + s;
this.gotoAndPlay(2);
}
function setScore(s) {
if (s != this._score) {
this._score = s;
this.gotoAndPlay(2);
}
}
function getScore(s) {
return(this._score);
}
this.stop();
Symbol 74 MovieClip Frame 1
function init() {
this._value = 0;
}
function setValue(v) {
if (this._value != v) {
this._value = v;
if (this._value != 1) {
this.gotoAndPlay("set");
}
}
}
function addValue(v) {
this._value = this._value + v;
switch (this._value) {
case 5 :
_global.Timer.addTime(1);
_root.onCombo();
break;
case 10 :
_global.Timer.addTime(3);
_root.onCombo();
break;
case 20 :
_global.Timer.addTime(9);
_root.onCombo();
break;
case 40 :
_global.Timer.addTime(22);
_root.onCombo();
break;
case 80 :
_global.Timer.addTime(55);
_root.onCombo();
break;
case 160 :
_global.Timer.addTime(100);
_root.onCombo();
break;
case 320 :
_global.Timer.addTime(100);
_root.onCombo();
}
_global.soundMgr.start(31, 50);
if (this._value != 1) {
this.gotoAndPlay("set");
}
}
function getValue() {
return(this._value);
}
function resetValue() {
this._value = 0;
this.gotoAndStop(2);
}
this._value = 0;
this.stop();
Symbol 74 MovieClip Frame 2
this.stop();
Symbol 74 MovieClip Frame 5
this.stop();
Symbol 79 MovieClip Frame 1
this.stop();
Symbol 86 Button
on (press) {
_root.startGame();
}
Symbol 91 Button
on (release) {
_root.gotoAndPlay("opening");
}
Symbol 94 MovieClip Frame 11
this.stop();