Frame 1
stop();
Frame 3
function scoreSendDB(game_id, user_id, game_score, game_time) {
trace("DB\uC5F0\uACB0");
var sendVars = new LoadVars();
var recVars = new LoadVars();
var rankurl = "http://www.gameangel.com/System/gameangel/game_rank.proc.php";
sendVars.uid = game_id;
sendVars.mid = user_id;
sendVars.pt = game_score;
sendVars.rt = game_time;
sendVars.ot1 = _root.ot1;
sendVars.ot2 = _root.ot2;
sendVars.ot3 = _root.ot3;
sendVars.ot4 = _root.ot4;
sendVars.ot5 = _root.ot5;
var i = 1;
while (i < 6) {
if (((eval ("ot" + i) == null) || (eval ("ot" + i) == undefined)) || (eval ("ot" + i) == "")) {
sendVars["ot" + i] = "";
} else {
sendVars["ot" + i] = _root["ot" + i];
}
i++;
}
sendVars.sendAndLoad(rankurl, recVars, "POST");
recVars.onLoad = function (success) {
_root.AS.gameRankView(recVars.nick, recVars.rank);
trace(recVars.nick + recVars.rank);
};
}
trace(this);
this.stop();
Instance of Symbol 157 MovieClip in Frame 3
//component parameters
onClipEvent (construct) {
gameVolume = 100;
centerX = 191;
centerY = 191;
radius = 180;
ballRadius = 30;
ballName = "ball";
centerName = "centerMC";
nextName = "nextMC";
boxName = "scorebox";
scoreName = "scoreMC";
gameoverName = "gameover";
gameoverRank = "gameRank";
}
Symbol 16 Button
on (release) {
_root.AS.GameStart();
}
Symbol 18 Button
on (release) {
stopAllSounds();
_root.gotoAndStop("INTRO", 1);
}
Symbol 19 MovieClip [gameRank] Frame 1
stop();
Symbol 28 MovieClip [ball2] Frame 1
this.stop();
Symbol 61 MovieClip [ball] Frame 1
this.stop();
Symbol 63 MovieClip [scorebox] Frame 1
this.speed = 3;
this.onEnterFrame = function () {
this._y = this._y - this.speed;
if (this.speed >= 1) {
this.speed = this.speed * 0.9;
} else {
this.removeMovieClip();
}
};
this.stop();
Symbol 65 MovieClip Frame 22
stop();
Symbol 66 MovieClip [gameover] Frame 15
this.stop();
Symbol 84 Button
on (release) {
_root.gotoAndStop("Game", 1);
}
Symbol 89 Button
on (release) {
_root.gotoAndStop("p");
}
Symbol 90 MovieClip Frame 1
stop();
Symbol 97 Button
on (release) {
getURL ("http://www.gameangel.com", "_blank");
}
Symbol 105 Button
on (release) {
getURL ("http://www.gameangel.com", "_blank");
}
Symbol 141 Button
on (release) {
_parent.AS.soundOnOff();
}
Symbol 144 MovieClip Frame 1
this.stop();
Symbol 144 MovieClip Frame 6
this.stop();
Symbol 148 Button
on (release) {
_parent.AS.pauseOnOff();
}
Symbol 151 MovieClip Frame 1
this.stop();
Symbol 151 MovieClip Frame 6
this.stop();
Symbol 157 MovieClip Frame 1
function BallXY(MC) {
d = this.radius - ((MC.r / 360) * 50);
var _local3 = (MC.r * Math.PI) / 180;
MC._x = (d * Math.cos(_local3)) + this.centerX;
MC._y = (d * Math.sin(_local3)) + this.centerY;
if (MC.r > this.maxRotation) {
MC.removeMovieClip();
}
}
function distanceMC(MC1, MC2) {
if ((MC1 != undefined) && (MC2 != undefined)) {
var _local2 = MC1._x - MC2._x;
var _local1 = MC1._y - MC2._y;
return(Math.sqrt((_local2 * _local2) + (_local1 * _local1)));
}
return(1000);
}
function rotationMC(MC) {
var _local3 = MC._x - centerX;
var _local2 = MC._y - centerY;
var _local1 = (Math.atan2(_local2, _local3) * 180) / Math.PI;
if (_local1 < 0) {
return(360 + _local1);
}
return(_local1);
}
function rotationXY(x1, y1, x2, y2) {
var _local3 = x1 - x2;
var _local2 = y1 - y2;
var _local1 = (Math.atan2(_local2, _local3) * 180) / Math.PI;
if (_local1 < 0) {
return(360 + _local1);
}
return(_local1);
}
function MouseLine() {
var _local3 = this.rotationXY(_parent._xmouse, _parent._ymouse, this.lineMC._x, this.lineMC._y);
this.lineMC._rotation = _local3;
if (_local3 < 0) {
_local3 = _local3 + 360;
}
this.lineMC.BOX._x = (this.radius - ((_local3 / 360) * 50)) + (this.ballRadius / 2);
}
function unSet() {
this.gameplay = false;
if (_parent.GAMEOVER != undefined) {
_parent.GAMEOVER.removeMovieClip();
}
var _local3 = this.prevMC;
while (true) {
if (_local3.prevMC == undefined) {
_local3.removeMovieClip();
break;
}
_local3 = _local3.prevMC;
_local3.nextMC.removeMovieClip();
}
this.prevMC = undefined;
this.centerMC.removeMovieClip();
this.centerTmp.removeMovieClip();
this.screwTmp.removeMovieClip();
this.centerMC = undefined;
this.centerTmp = undefined;
this.screwTmp = undefined;
stopAllSounds();
}
function GameStart() {
this.Setup();
}
function Setup() {
this.unSet();
var _local3 = 0;
var _local2 = 0;
while (_local2 < 20000) {
d = this.radius - ((_local3 / 360) * this.maxDistance);
_local3 = _local3 + ((Math.atan2(1, d) * 180) / Math.PI);
var _local4 = (_local3 * Math.PI) / 180;
var _local6 = Math.round(((d * Math.cos(_local4)) + this.centerX) * 10) / 10;
var _local5 = Math.round(((d * Math.sin(_local4)) + this.centerY) * 10) / 10;
this.circleXY[_local2] = [_local6, _local5];
if (_local3 > this.maxRotation) {
break;
}
_local2++;
}
this.centerTmp = this.gameMC.attachMovie(this.ballName, "centerTmp", this.Depths);
this.centerTmp._x = this.gameMC[this.centerName]._x;
this.centerTmp._y = this.gameMC[this.centerName]._y;
this.centerTmp.gotoAndStop(this.AddBallFrame());
this.screwTmp = this.gameMC.attachMovie(this.ballName, "screwTmp", this.Depths + 1);
this.screwTmp._x = this.gameMC[this.nextName]._x;
this.screwTmp._y = this.gameMC[this.nextName]._y;
this.screwTmp.gotoAndStop(this.AddBallFrame());
this.lineMC._x = this.centerX;
this.lineMC._y = this.centerY;
this.lineMC.swapDepths((this.Depths + this.Bmax) + 2);
this.slotMC.tx = this.slotMC._x;
this.slotMC.ty = this.slotMC._y;
this.slotMC.swapDepths((this.Depths + this.Bmax) + 3);
this.gameMC.HELP.swapDepths((this.Depths + this.Bmax) + 4);
this.gameMC.PAUSE.swapDepths((this.Depths + this.Bmax) + 5);
this.shoot = false;
this.shootMove = 0;
this.Bnum = 1;
this.comboNum = 0;
this.maxCombo = 0;
this.TotalScore = 0;
this.CountBall = 0;
this.displayScore();
this.gameplay = true;
this.soundPlay("title", 1);
this.startMC.gotoAndStop("OFF");
this.startTime = getTimer();
if (this._visible == true) {
this._visible = false;
}
}
function GameOver() {
this.gameplay = false;
var _local3 = Math.floor((getTimer() - this.startTime) / 1000);
trace("play_time - " + _local3);
if ((((((_root.uid == undefined) || (_root.ot1 == undefined)) || (this.TotalScore <= 0)) || (this.TotalScore == undefined)) || (_local3 <= 0)) || (_local3 == undefined)) {
trace((((("\uC798\uBABB\uB41C \uAC12\uC774 \uB4E4\uC5B4\uC634 this.TotalScore : " + this.TotalScore) + "play_time:") + _local3) + " this.startTime") + this.startTime);
gameRankView();
} else {
trace("\uB7AD\uD0B9\uC5F0\uACB0");
this._parent.scoreSendDB(_root.ot1, _root.uid, this.TotalScore, _local3);
}
}
function gameRankView(nickName, rankNum) {
if (!nickName) {
var _local3 = _parent.attachMovie(this.gameoverName, "GAMEOVER", this.Depths + 20001);
_local3._x = this.centerX;
_local3._y = this.centerY;
_local3._visible = true;
this.startMC._y = _local3._y + 100;
this.startMC.gotoAndStop("ON");
} else {
var _local3 = _parent.attachMovie(this.gameoverRank, "GAMEOVER", this.Depths + 20001);
_local3._x = this.centerX - 100;
_local3._y = this.centerY;
_local3._visible = true;
_local3.my_nickName = nickName;
_local3.my_score = this.TotalScore;
_local3.my_gameRank = rankNum;
}
this.soundPlay("title", 1);
}
function AddBallFrame() {
var _local4 = 0;
if (random(lightningRand) == 0) {
_local4 = lightningFrame;
} else {
var _local3 = this.ballMaxCount;
var _local2 = 0;
while (_local2 < this.ballMaxArr.length) {
if (this.ballMaxArr[_local2] > this.CountBall) {
_local3 = _local2 + this.ballMaxMin;
break;
}
_local2++;
}
if (_local3 > this.ballMaxCount) {
_local3 = this.ballMaxCount;
}
_local4 = random(_local3) + 1;
this.ballMaxNum = _local3;
}
return(_local4);
}
function AddBall(mv) {
var _local3 = this.gameMC.attachMovie(this.ballName, "B" + this.Bnum, (this.Bnum + this.Depths) + 2);
_local3.Bnum = this.Bnum;
this.Bnum++;
if (this.Bnum >= this.Bmax) {
this.Bnum = 1;
}
_local3.num = -10;
_local3.mv = mv;
_local3.prevMC = undefined;
_local3.nextMC = undefined;
if (mv == 0) {
_local3._x = this.centerX;
_local3._y = this.centerY;
} else {
_local3._x = _parent.AS.circleXY[_local3.num][0];
_local3._y = _parent.AS.circleXY[_local3.num][1];
}
_local3.gotoAndStop(this.AddBallFrame());
return(_local3);
}
function AddCenterBall() {
var _local2 = this.AddBall(0);
_local2.swapDepths((this.Depths + this.Bmax) + 1);
this.centerMC = _local2;
this.shoot = false;
_local2.gotoAndStop(this.centerTmp._currentframe);
this.centerTmp.gotoAndStop(this.AddBallFrame());
}
function AddScrewBall() {
var _local2 = this.AddBall(1);
if (this.prevMC != undefined) {
_local2.prevMC = this.prevMC;
this.prevMC.nextMC = _local2;
}
this.prevMC = _local2;
_local2.gotoAndStop(this.screwTmp._currentframe);
this.screwTmp.gotoAndStop(this.AddBallFrame());
}
function displayScore() {
_parent.scoreMC.TXT = this.TotalScore;
}
function deleteBall(tMC, score) {
if (tMC != undefined) {
if (tMC.prevMC != undefined) {
tMC.prevMC.nextMC = tMC.nextMC;
}
if (tMC.nextMC != undefined) {
tMC.nextMC.prevMC = tMC.prevMC;
} else {
this.prevMC = tMC.prevMC;
tMC.prevMC.nextMC = undefined;
}
if (score > 0) {
this.CountBall++;
var _local3 = this.gameMC.attachMovie(this.boxName, "box" + tMC.Bnum, (this.Depths + tMC.Bnum) + 5000);
_local3._x = tMC._x;
_local3._y = tMC._y;
_local3.TXT = score;
this.TotalScore = this.TotalScore + score;
this.displayScore();
}
tMC.removeMovieClip();
}
}
function insertBall(tMC) {
if (tMC != undefined) {
var _local3 = this.rotationMC(tMC);
if (_local3 < this.shootRotation) {
this.centerMC.num = tMC.num + this.ballRadius;
this.centerMC.prevMC = tMC.prevMC;
this.centerMC.nextMC = tMC;
if (tMC.prevMC != undefined) {
tMC.prevMC.nextMC = this.centerMC;
}
tMC.prevMC = this.centerMC;
} else {
this.centerMC.num = tMC.num - this.ballRadius;
this.centerMC.prevMC = tMC;
this.centerMC.nextMC = tMC.nextMC;
if (tMC.nextMC != undefined) {
tMC.nextMC.prevMC = this.centerMC;
} else {
this.prevMC = this.centerMC;
}
tMC.nextMC = this.centerMC;
}
this.centerMC.swapDepths(this.centerMC.Bnum + this.Depths);
}
}
function getSameBall(cMC, ops) {
var _local4 = 1;
var _local5 = cMC._currentframe;
var _local2 = cMC;
while (_local2.prevMC != undefined) {
if (_local2.prevMC._currentframe == _local5) {
if ((ops == 1) || ((_local2.prevMC.num - _local2.num) <= this.ballRadius)) {
_local2 = _local2.prevMC;
_local4++;
} else {
break;
}
} else {
break;
}
}
var _local3 = cMC.nextMC;
while (_local3 != undefined) {
if (_local3._currentframe == _local5) {
if ((ops == 1) || ((_local3.prevMC.num - _local3.num) <= this.ballRadius)) {
_local3 = _local3.nextMC;
_local4++;
} else {
break;
}
} else {
break;
}
}
if (_local4 >= 3) {
return(_local2);
}
return(undefined);
}
function sameDeleteBall(tMC) {
if (tMC.prevMC != undefined) {
tMC.prevMC.mv = 0;
}
if (this.comboMC == undefined) {
this.comboNum = 1;
} else {
this.comboNum++;
if (this.comboNum > this.maxCombo) {
this.maxCombo = this.comboNum;
}
}
var _local4 = this.comboNum * this.comboNum;
if (_local4 < 2) {
_local4 = 2;
}
var _local5 = tMC._currentframe;
while (tMC != undefined) {
if (tMC._currentframe == _local5) {
var _local2 = tMC;
tMC = tMC.nextMC;
if ((_local2.num - _local2.nextMC.num) <= this.ballRadius) {
this.deleteBall(_local2, _local4);
} else {
this.deleteBall(_local2, _local4);
break;
}
} else {
break;
}
}
this.soundPlay("explore", 1);
}
function colorDeleteBall(Fnum) {
var _local3 = this.prevMC;
while (true) {
if (_local3 == undefined) {
break;
}
var _local2 = _local3;
_local3 = _local3.prevMC;
if (_local2._currentframe == Fnum) {
this.deleteBall(_local2, 1);
_local2.mv = 0;
}
}
}
function moveHitBall() {
if (this.prevMC != undefined) {
var _local3;
var _local2 = this.prevMC;
while (true) {
var _local4 = this.distanceMC(this.centerMC, _local2);
if (_local4 <= this.ballRadius) {
if ((_local3 != undefined) && (_local4 < this.distanceMC(this.centerMC, _local3))) {
_local3 = _local2;
} else {
_local3 = _local2;
}
}
if (_local2.prevMC == undefined) {
break;
}
_local2 = _local2.prevMC;
}
if (_local3 != undefined) {
this.insertBall(_local3);
if ((this.centerMC._currentframe == this.lightningFrame) && (_local3._currentframe == this.lightningFrame)) {
this.deleteBall(this.centerMC, 0);
this.deleteBall(_local3, 0);
this.soundPlay("bomb", 1);
} else if (this.centerMC._currentframe == this.lightningFrame) {
this.deleteBall(this.centerMC, 0);
this.colorDeleteBall(_local3._currentframe);
this.soundPlay("bomb", 1);
} else if (_local3._currentframe == this.lightningFrame) {
this.deleteBall(_local3, 0);
this.colorDeleteBall(this.centerMC._currentframe);
this.soundPlay("bomb", 1);
} else {
this.comboNum = 1;
var _local5 = this.getSameBall(this.centerMC, 0);
if (_local5 != undefined) {
var _local6 = _local5.prevMC;
this.sameDeleteBall(_local5);
if (_local6 != undefined) {
this.getComboBall(_local6);
}
}
}
this.centerMC = undefined;
_local3 = undefined;
}
}
}
function moveCenterBall() {
this.shootMove = this.shootMove + this.shootSpeed;
var _local2 = (this.shootRotation * Math.PI) / 180;
this.centerMC._x = (this.shootMove * Math.cos(_local2)) + this.centerX;
this.centerMC._y = (this.shootMove * Math.sin(_local2)) + this.centerY;
var _local3 = this.radius - ((this.shootRotation / 360) * 50);
if (this.shootMove > _local3) {
this.centerMC.removeMovieClip();
this.centerMC = undefined;
} else {
this.moveHitBall();
}
}
function moveScrewBall() {
var _local2 = this.prevMC;
if (_local2.num < this.ballRadius) {
_local2.num++;
}
while (true) {
if (_local2.prevMC != undefined) {
if ((_local2.prevMC.num - _local2.num) <= this.ballRadius) {
_local2.prevMC.num = _local2.num + this.ballRadius;
}
}
if (_local2.num >= this.circleXY.length) {
this.GameOver();
break;
}
if (_local2.num < 0) {
_local2._x = this.circleXY[0][0];
_local2._y = this.circleXY[0][1] + (_local2.num * 7);
this.slotMC._y = this.slotMC.ty + _local2.num;
} else {
_local2._x = this.circleXY[_local2.num][0];
_local2._y = this.circleXY[_local2.num][1];
}
if (_local2.prevMC == undefined) {
break;
}
_local2 = _local2.prevMC;
}
}
function getComboBall(cMC) {
if ((cMC != undefined) && (cMC.nextMC != undefined)) {
if (cMC._currentframe == cMC.nextMC._currentframe) {
if (this.getSameBall(cMC, 1) != undefined) {
this.comboMC = cMC;
this.soundPlay("combo", 1);
}
}
}
}
function moveComboBall() {
if ((this.comboMC != undefined) && (this.comboMC.nextMC != undefined)) {
var _local3 = (this.comboMC.num - this.comboMC.nextMC.num) - this.ballRadius;
if (_local3 > this.backSpeed) {
_local3 = this.backSpeed;
}
var _local2 = this.comboMC;
while (true) {
_local2.num = _local2.num - _local3;
_local2._x = this.circleXY[_local2.num][0];
_local2._y = this.circleXY[_local2.num][1];
if (_local2.prevMC == undefined) {
break;
}
_local2 = _local2.prevMC;
}
if (_local3 <= 0) {
var _local4 = this.getSameBall(this.comboMC, 0);
if (_local4 != undefined) {
var _local5 = _local4.prevMC;
this.sameDeleteBall(_local4);
if (_local5 != undefined) {
this.getComboBall(_local5);
}
} else {
this.comboMC = undefined;
}
}
} else {
this.comboMC = undefined;
}
}
function helpOnOff() {
if (this.helpOn == true) {
this.gameMC.HELP._visible = false;
this.helpMC.gotoAndStop("OFF");
this.helpOn = false;
} else {
this.gameMC.HELP._visible = true;
this.helpMC.gotoAndStop("ON");
this.helpOn = true;
}
}
function soundOnOff() {
if (this.soundOn == true) {
this.soundMC.gotoAndStop("OFF");
this.soundOn = false;
stopAllSounds();
} else {
this.soundMC.gotoAndStop("ON");
this.soundOn = true;
}
}
function pauseOnOff() {
if (this.pauseOn == true) {
this.gameMC.PAUSE._visible = false;
this.pauseMC.gotoAndStop("OFF");
this.pauseOn = false;
} else {
this.gameMC.PAUSE._visible = true;
this.pauseMC.gotoAndStop("ON");
this.pauseOn = true;
}
}
function soundPlay(name, loop) {
if ((this.soundOn == true) && (this.gameVolume > 0)) {
this.soundObj[name].start(0, loop);
this.soundObj[name].setVolume(this.gameVolume);
}
}
function sendRankScore(score, score_play) {
if (_root.dbconnect == "yes") {
sendObj = new LoadVars();
loadObj = new LoadVars();
sendObj.gametype = _root.gametype;
sendObj.userid = _root.userid;
sendObj.score = int(score) + 969696;
sendObj.score_play = score_play;
sendObj.sendAndLoad((_root.dir + "game_record.") + _root.scripttype, loadObj, "POST");
loadObj.onLoad = function () {
};
}
}
System.useCodepage = true;
this._name = "AS";
var gameMC = _parent.GAME;
var startMC = _parent.STARTBUTTON;
this.startMC.swapDepths(20001);
var f = 0;
var Bnum = 1;
var Bmax = 10000;
var Depths = 100;
var circleXY = [];
var centerTmp = undefined;
var screwTmp = undefined;
var centerMC = undefined;
var shoot = false;
var shootRotation = 0;
var shootMove = 0;
var shootSpeed = 15;
var backSpeed = 8;
var lineMC = this.gameMC.LINEMC;
var slotMC = this.gameMC.SLOTMC;
var prevMC = undefined;
var comboMC = undefined;
var comboNum = 0;
var maxCombo = 0;
var gameplay = false;
var TotalScore = 0;
var ballMaxNum = ((ballMaxMin = 4));
var ballMaxCount = 9;
var ballMaxArr = [30, 500, 1000, 2000, 3000, 5000, 10000, 30000, 50000];
var lightningFrame = 10;
var lightningRand = 180;
var CountBall = 0;
var maxRotation = 920;
var maxDistance = 45;
var HitAreaX1 = 10;
var HitAreaY1 = 10;
var HitAreaX2 = 410;
var HitAreaX2 = 410;
var startTime = 0;
var test = false;
this.onEnterFrame = function () {
var _local5 = false;
if ((this.pauseOn == false) && (this.gameplay == true)) {
if (this.comboMC == undefined) {
this.f = this.f + 1;
if (this.f >= this.ballRadius) {
this.f = 0;
this.AddScrewBall();
}
this.MouseLine();
if (this.prevMC != undefined) {
this.moveScrewBall();
}
if (this.shoot == true) {
this.moveCenterBall();
}
if (this.centerMC == undefined) {
this.AddCenterBall();
}
var _local4 = _parent._xmouse;
var _local3 = _parent._ymouse;
if ((((_local4 >= this.HitAreaX1) && (_local4 <= this.HitAreaX2)) && (_local3 >= this.HitAreaY1)) && (_local3 <= this.HitAreaX2)) {
_local5 = true;
}
} else {
this.moveComboBall();
}
}
if (_local5) {
this.lineMC.gotoAndStop(2);
} else {
this.lineMC.gotoAndStop(1);
}
if (this.test) {
_parent.TXT = (((("ball: " + this.CountBall) + ", combo: ") + this.maxCombo) + ", Kind: ") + this.ballMaxNum;
}
};
this.onMouseDown = function () {
if (((((this.pauseOn == false) && (this.helpOn == false)) && (this.gameplay == true)) && (this.centerMC != undefined)) && (this.shoot == false)) {
var _local4 = _parent._xmouse;
var _local3 = _parent._ymouse;
if ((((_local4 >= this.HitAreaX1) && (_local4 <= this.HitAreaX2)) && (_local3 >= this.HitAreaY1)) && (_local3 <= this.HitAreaX2)) {
this.shootRotation = this.rotationXY(_local4, _local3, this.centerX, this.centerY);
this.shoot = true;
this.shootMove = 0;
this.soundPlay("shoot", 1);
}
}
};
this.onUnload = function () {
this.unSet();
this.lineMC.removeMovieClip();
this.slotMC.removeMovieClip();
};
this.stop();
var helpOn = false;
var helpMC = _parent.helpMC;
this.helpMC.gotoAndStop("OFF");
this.gameMC.HELP._visible = false;
var soundOn = true;
var soundMC = _parent.soundMC;
this.soundMC.gotoAndStop("ON");
var pauseOn = false;
var pauseMC = _parent.pauseMC;
this.pauseMC.gotoAndStop("OFF");
this.gameMC.PAUSE._visible = false;
var soundName = ["title", "shoot", "explore", "combo", "bomb"];
var soundObj = Array();
if (this.gameVolume < 0) {
this.gameVolume = 0;
}
if (this.gameVolume > 1000) {
this.gameVolume = 1000;
}
var i = 0;
while (i <= soundName.length) {
soundObj[soundName[i]] = new Sound();
soundObj[soundName[i]].attachSound(soundName[i]);
i++;
}
Symbol 177 Button
on (release) {
_parent.AS.GameStart();
}
Symbol 179 MovieClip Frame 8
stop();
Symbol 180 MovieClip Frame 1
this.stop();
Symbol 180 MovieClip Frame 6
this.stop();
Symbol 185 MovieClip Frame 1
this.stop();