Frame 1
var sValidateUrl = "http://www.hastars.com/flashgame/haExtreme/validateScore.asp";
var sSetScoreUrl = "http://www.hastars.com/flashgame/haExtreme/setScoreBoard.asp";
var sGetScoreUrl = "http://www.hastars.com/flashgame/haExtreme/getScoreBoard.asp";
fscommand ("showmenu", "false");
fscommand ("fullscreen", "false");
fscommand ("allowscale", "true");
stop();
Frame 2
stop();
Frame 3
function detectKey(obj, iMoveDis) {
if (Key.isDown(Key.UP)) {
_root.iTouch++;
if (0 < (obj._y - iMoveDis)) {
obj._y = obj._y - iMoveDis;
}
} else if (Key.isDown(Key.DOWN)) {
_root.iTouch++;
if ((obj._y + iMoveDis) < _root.I_SCREEN_HEIGHT) {
obj._y = obj._y + iMoveDis;
}
}
if (Key.isDown(Key.LEFT)) {
_root.iTouch++;
if (0 < (obj._x - iMoveDis)) {
obj._x = obj._x - iMoveDis;
}
} else if (Key.isDown(Key.RIGHT)) {
_root.iTouch++;
if ((obj._x + iMoveDis) < _root.I_SCREEN_WIDTH) {
obj._x = obj._x + iMoveDis;
}
}
}
function genBullet(sB, iB, iT) {
if (iT == 0) {
_root.attachMovie(sB, sB + iB, iB);
_root[sB + iB].mcRealBullet.iBulletV = _root.iBulletV;
_root[sB + iB].mcRealBullet.iType = iT;
_root[sB + iB].mcRealBullet.gotoAndStop(random(5) + 1);
} else if (iT == 1) {
_root.mcStatus.gotoAndPlay("highSpeed");
_root.attachMovie(sB, sB + iB, iB);
_root[sB + iB].mcRealBullet.iBulletV = _root.iBulletV * 1.5;
_root[sB + iB].mcRealBullet.iType = iT;
_root[sB + iB].mcRealBullet.gotoAndStop("highSpeed");
} else if (iT == 2) {
_root.mcStatus.gotoAndPlay("tracing");
_root.attachMovie(sB, sB + iB, iB);
_root[sB + iB].mcRealBullet.iBulletV = _root.iBulletV;
_root[sB + iB].mcRealBullet.iType = iT;
_root[sB + iB].mcRealBullet.gotoAndStop("tracing");
}
}
function getRank(i) {
if (i < 3) {
return("Protozoan!");
}
if (i < 6) {
return("Monkey cup!");
}
if (i < 9) {
return("Coelenterate!");
}
if (i < 12) {
return("Echinoderm!");
}
if (i < 15) {
return("Reptile!");
}
if (i < 18) {
return("Mammal!");
}
if (i < 21) {
return("Primate!");
}
if (i < 24) {
return("Human being!");
}
if (i < 27) {
return("Sportsman!");
}
if (i < 30) {
return("Olympic champion!");
}
if (i < 33) {
return("Street fighter!");
}
if (i < 36) {
return("King of fighter!");
}
if (i < 39) {
return("X-Man!");
}
if (i < 42) {
return("Spiderman!");
}
if (i < 45) {
return("Superman!");
}
if (i < 48) {
return("Sprite!");
}
if (i < 51) {
return("Angel!");
}
return("God!");
}
var I_SCREEN_WIDTH = 400;
var I_SCREEN_HEIGHT = 300;
var iBulletV = 3;
var iRoleV = 2;
var iDropStep = 3;
var iFPS = 24;
var I_TRACING_ACC = 2;
var S_BULLET = "mcBullet";
var I_HIGHSPEED_STEP = 4;
var I_TRACING_STEP = 5;
var sndBoom = new Sound(mcRole);
sndBoom.attachSound("sndBoom");
var sndBg = new Sound(_root);
sndBg.attachSound("sndBg");
var sndNormal = new Sound();
sndNormal.attachSound("sndNormal");
var sndHighspeed = new Sound();
sndHighspeed.attachSound("sndHighspeed");
var sndTracing = new Sound();
sndTracing.attachSound("sndTracing");
Frame 4
var iScore = 0;
var iFramesPlayed = 0;
var iTouch = 0;
var iBulletNo = 0;
iBulletNo = 0;
while (iBulletNo < 50) {
genBullet(S_BULLET, iBulletNo, 0);
iBulletNo++;
}
sndBg.start(0, 99999);
stop();
Instance of Symbol 54 MovieClip in Frame 4
onClipEvent (load) {
}
onClipEvent (enterFrame) {
_root.iFramesPlayed++;
_root.detectKey(_root.mcRole, _root.iRoleV);
if ((_root.iFramesPlayed % (_root.iFPS * _root.iDropStep)) == 0) {
_root.iBulletNo++;
if ((_root.iFramesPlayed % ((_root.iFPS * _root.iDropStep) * _root.I_HIGHSPEED_STEP)) == 0) {
_root.genBullet(_root.S_BULLET, _root.iBulletNo, 1);
_root.sndHighspeed.start();
} else if ((_root.iFramesPlayed % ((_root.iFPS * _root.iDropStep) * _root.I_TRACING_STEP)) == 0) {
_root.genBullet(_root.S_BULLET, _root.iBulletNo, 2);
_root.sndTracing.start();
} else {
_root.genBullet(_root.S_BULLET, _root.iBulletNo, 0);
_root.sndNormal.start();
}
}
}
Frame 5
iScore = Math.floor((iFramesPlayed / iFPS) * 1000) / 1000;
i = 0;
while (i < (iBulletNo + 1)) {
_root[S_BULLET + i].removeMovieClip();
i++;
}
sndBg.stop("sndBg");
if ((1 < (iScore / iTouch)) && (10 < iScore)) {
gotoAndStop (7);
}
txtTime = iScore;
txtBulletNo = iBulletNo;
txtRank = getRank(iScore);
stop();
Frame 6
stop();
Frame 7
stop();
Symbol 13 MovieClip Frame 1
stop();
Symbol 13 MovieClip Frame 2
stop();
Symbol 13 MovieClip Frame 3
stop();
Symbol 13 MovieClip Frame 4
stop();
Symbol 13 MovieClip Frame 5
stop();
Symbol 13 MovieClip Frame 6
stop();
Symbol 13 MovieClip Frame 7
stop();
Instance of Symbol 13 MovieClip "mcRealBullet" in Symbol 14 MovieClip [mcBullet] Frame 1
onClipEvent (load) {
function initPos() {
var iRnd = random(4);
if (iRnd == 0) {
_parent._x = Math.floor((Math.random() * I_SCREEN_WIDTH) + 1);
_parent._y = 0;
} else if (iRnd == 1) {
_parent._x = I_SCREEN_WIDTH;
_parent._y = Math.floor((Math.random() * I_SCREEN_HEIGHT) + 1);
} else if (iRnd == 2) {
_parent._x = Math.floor((Math.random() * I_SCREEN_WIDTH) + 1);
_parent._y = I_SCREEN_HEIGHT;
} else if (iRnd == 3) {
_parent._x = 0;
_parent._y = Math.floor((Math.random() * I_SCREEN_HEIGHT) + 1);
}
}
function aim() {
var fBias = Math.random();
if (0.8 < fBias) {
iV = Math.sqrt((((_root.mcRole._x * fBias) - _parent._x) * ((_root.mcRole._x * fBias) - _parent._x)) + (((_root.mcRole._y * fBias) - _parent._y) * ((_root.mcRole._y * fBias) - _parent._y)));
iXV = (((_root.mcRole._x * fBias) - _parent._x) / iV) * iBulletV;
iYV = (((_root.mcRole._y * fBias) - _parent._y) / iV) * iBulletV;
} else {
iV = Math.sqrt(((_root.mcRole._x - _parent._x) * (_root.mcRole._x - _parent._x)) + ((_root.mcRole._y - _parent._y) * (_root.mcRole._y - _parent._y)));
iXV = ((_root.mcRole._x - _parent._x) / iV) * iBulletV;
iYV = ((_root.mcRole._y - _parent._y) / iV) * iBulletV;
}
}
var iV;
var iXV;
var iYV;
var I_SCREEN_WIDTH = _root.I_SCREEN_WIDTH;
var I_SCREEN_HEIGHT = _root.I_SCREEN_HEIGHT;
var i;
initPos();
aim();
}
onClipEvent (enterFrame) {
_parent._x = _parent._x + iXV;
_parent._y = _parent._y + iYV;
if (iType == 2) {
if (_root.mcRole._x < _parent._x) {
_parent._x = _parent._x - _root.I_TRACING_ACC;
} else if (_parent._x < _root.mcRole._x) {
_parent._x = _parent._x + _root.I_TRACING_ACC;
}
if (_root.mcRole._y < _parent._y) {
_parent._y = _parent._y - _root.I_TRACING_ACC;
} else if (_parent._y < _root.mcRole._y) {
_parent._y = _parent._y + _root.I_TRACING_ACC;
}
}
if (I_SCREEN_WIDTH < _parent._x) {
initPos();
aim();
} else if (_parent._x < 0) {
initPos();
aim();
} else if (I_SCREEN_HEIGHT < _parent._y) {
initPos();
aim();
} else if (_parent._y < 0) {
initPos();
aim();
}
if (_parent.hitTest(_root.mcRole)) {
_root.sndBoom.start();
_root.nextFrame();
}
}
Instance of Symbol 20 MovieClip "loaderReal_mc" in Symbol 21 MovieClip Frame 1
onClipEvent (load) {
totalFileSize = _root.getBytesTotal();
}
onClipEvent (enterFrame) {
bytesLoaded = _root.getBytesLoaded();
amountLoaded = bytesLoaded / totalFileSize;
percentLoaded = int(100 * amountLoaded);
loaderPercent_txt = percentLoaded + "%";
if (amountLoaded >= 1) {
_root.gotoAndStop(2);
}
}
Symbol 47 Button
on (release, keyPress "<Enter>") {
gotoAndPlay (3);
}
Symbol 51 MovieClip Frame 1
stop();
Symbol 51 MovieClip Frame 25
gotoAndStop (1);
Symbol 51 MovieClip Frame 49
gotoAndStop (1);
Symbol 66 Button
on (release, keyPress "<Enter>") {
_root.gotoAndPlay("game_over");
}
Symbol 76 Button
on (release, keyPress "<Enter>") {
_root.gotoAndPlay("playing");
}
Symbol 84 Button
on (release, keyPress "<Enter>") {
if (!mcSend.isSend) {
mcSend.isSend = true;
mcSend.sPlayer = sPlayer;
mcSend.iScore = _root.iScore;
mcSend.loadVariables(_root.sSetScoreUrl, "POST");
}
}
Symbol 120 MovieClip Frame 1
var iScore = _root.iScore;
txtScore = iScore;
this.mcValidate.iScore = this.iScore;
this.mcValidate.loadVariables(_root.sValidateUrl, "POST");
stop();
Instance of Symbol 69 MovieClip "mcValidate" in Symbol 120 MovieClip Frame 1
onClipEvent (load) {
var sPass = "";
}
onClipEvent (data) {
if (sPass == "y") {
_parent.gotoAndStop(2);
} else {
_parent.gotoAndStop(3);
}
}
Symbol 120 MovieClip Frame 2
stop();
Instance of Symbol 77 MovieClip "mcSend" in Symbol 120 MovieClip Frame 2
onClipEvent (load) {
var sPass = "";
var isSend = false;
}
onClipEvent (data) {
if (sPass == "y") {
_parent.gotoAndStop(3);
}
}
Symbol 120 MovieClip Frame 3
stop();
Instance of Symbol 118 MovieClip "mcScoreTable" in Symbol 120 MovieClip Frame 3
onClipEvent (load) {
var testNo = getTimer();
this.loadVariables(_root.sGetScoreUrl, "POST");
}
onClipEvent (data) {
}
Symbol 122 Button
on (release, keyPress "<Enter>") {
_root.gotoAndPlay("playing");
}