Combined Code
movieClip 4 Sweat {
#initclip
Object.registerClass('Sweat', Sweat);
#endinitclip
}
movieClip 137 Endingclip {
#initclip
Object.registerClass('Endingclip', Ending);
#endinitclip
}
// unknown tag 88 length 106
movieClip 140 Play Again {
}
movieClip 142 Instructions {
}
movieClip 145 Mako {
#initclip
Object.registerClass('Mako', Mako);
#endinitclip
}
// unknown tag 88 length 96
movieClip 148 Text {
#initclip
Object.registerClass('Text', Game);
#endinitclip
}
movieClip 151 Sakurai {
#initclip
Object.registerClass('Sakurai', Sakurai);
#endinitclip
}
movieClip 157 __Packages.Ending {
#initclip
if (!_global.Ending) {
var v1 = function () {
super();
};
_global.Ending = v1;
_global.Ending extends MovieClip;
var v2 = v1.prototype;
v2.onEnterFrame = function () {
if (this._currentframe == this._totalframes) {
this.stop();
}
};
ASSetPropFlags(_global.Ending.prototype, null, 1);
}
#endinitclip
}
movieClip 158 __Packages.Mako {
#initclip
if (!_global.Mako) {
var v1 = function () {
super();
};
_global.Mako = v1;
_global.Mako extends MovieClip;
var v2 = v1.prototype;
v2.onLoad = function () {};
v2.onEnterFrame = function () {
if (this.gameStart == true) {
if (Key.isDown(39)) {
if (this._x > 580) {
} else {
this._x += this.speed;
}
}
if (Key.isDown(37)) {
if (this._x < 20) {
} else {
this._x -= this.speed;
}
}
if (Key.isDown(38)) {
if (this._y < 20) {
} else {
this._y -= this.speed;
}
}
if (Key.isDown(40)) {
if (this._y > 580) {
} else {
this._y += this.speed;
}
}
}
if (this.isDead == true) {
if (this._xscale < 1000) {
this.die();
} else {
_root.startButton.gameEnd();
}
}
if (Key.isDown(32)) {
trace(this._x);
trace(this._y);
}
};
v2.defeat = function () {
this.isDead = true;
};
v2.die = function () {
this._rotation += 10;
this._xscale += 10;
this._yscale += 10;
};
v2.speed = 10;
v2.gameStart = false;
v2.isDead = false;
ASSetPropFlags(_global.Mako.prototype, null, 1);
}
#endinitclip
}
movieClip 159 __Packages.Game {
#initclip
if (!_global.Game) {
var v1 = function () {
super();
};
_global.Game = v1;
_global.Game extends MovieClip;
var v2 = v1.prototype;
v2.onLoad = function () {
_root.bgMusic = new Sound();
this.startingX = _root.mako._x;
this.startingY = _root.mako._y;
_root.playAgain._visible = false;
_root.sakurai._visible = false;
_root.mako._visible = false;
this.resetScore();
_root.scoreText._visible = false;
_root.countdown._visible = false;
_root.startButton.onPress = function () {
this.gameStart();
};
_root.playAgain.onPress = function () {
_root.startButton.gameReset();
};
};
v2.onEnterFrame = function () {
if (this.count == 30) {
_root.countdown.text = 2;
}
if (this.count == 60) {
_root.countdown.text = 1;
}
if (this.count == 90) {
_root.countdown.text = 0;
}
if (this.count == 120) {
_root.countdown.text = 'GO!';
_root.sakurai.gameStart = true;
}
if (this.count == 150) {
_root.countdown.text = '';
this.gameStarted = true;
}
if (this.gameStarted == true) {
this.updateScore();
}
if (_root.mako.gameStart == true) {
++this.count;
}
};
v2.gameStart = function () {
this.count = 0;
this.resetScore();
_root.startButton._visible = false;
_root.instructions._visible = false;
_root.scoreText._visible = true;
_root.sakurai._visible = true;
_root.mako._visible = true;
_root.countdown._visible = true;
_root.mako.gameStart = true;
_root.countdown.text = 3;
this.playMusic();
};
v2.gameOver = function () {
_root.sakurai.gameStart = false;
_root.mako.gameStart = false;
this.gameStarted = false;
_root.mako.defeat();
};
v2.updateScore = function () {
++this.score;
_root.scoreText.text = this.score;
};
v2.resetScore = function () {
this.score = 0;
_root.scoreText.text = this.score;
};
v2.gameEnd = function () {
_root.mako.isDead = false;
_root.sakurai._visible = false;
_root.mako._visible = false;
_root.countdown._visible = false;
this.finalScore = this.score;
_root.sakurai.maxLimit = 15;
if (this.finalScore > this.highScore) {
this.highScore = this.finalScore;
}
_root.scoreText.text = 'Final Score: ' + this.finalScore;
var v3 = _root.attachMovie('Endingclip', 'Endingclip', _root.getNextHighestDepth());
v3._x = 140;
v3._y = 212;
_root.playAgain._visible = true;
};
v2.gameReset = function () {
_root.Endingclip.removeMovieClip();
_root.mako._xscale = 100;
_root.mako._yscale = 100;
_root.mako._rotation = 0;
_root.mako._x = this.startingX;
_root.mako._y = this.startingY;
_root.startButton._visible = true;
_root.scoreText._visible = true;
_root.playAgain._visible = false;
_root.scoreText.text = 'High Score: ' + this.highScore;
_root.Endingclip.removeMovieClip();
};
v2.playMusic = function () {
_root.bgMusic.stop();
_root.bgMusic.attachSound('Nichijou_op.mp3');
_root.bgMusic.start(0, 1000);
};
v2.highScore = 0;
v2.finalScore = 0;
v2.count = 0;
v2.gameStarted = false;
ASSetPropFlags(_global.Game.prototype, null, 1);
}
#endinitclip
}
movieClip 160 __Packages.Sakurai {
#initclip
if (!_global.Sakurai) {
var v1 = function () {
super();
};
_global.Sakurai = v1;
_global.Sakurai extends MovieClip;
var v2 = v1.prototype;
v2.onEnterFrame = function () {
if (this.gameStart == true && this.limit2 > this.maxLimit2) {
this.limit2 = 0;
this.bulletAngle = Math.random() * 360 * -1;
var v3 = _root.attachMovie('Sweat', 'Sweat' + _root.getNextHighestDepth(), _root.getNextHighestDepth());
this.swapDepths(v3);
v3._x = this._x + 150 * Math.cos(this.bulletAngle * this.radians);
v3._y = this._y + 150 * Math.sin(this.bulletAngle * this.radians);
var v4 = this.bulletAngle * this.radians;
v3.xSpeed = Math.cos(v4) * v3.speed;
v3.ySpeed = Math.sin(v4) * v3.speed;
v3._rotation = _root.sakurai.bulletAngle + 150;
this.bulletAngle += 20;
v3 = _root.attachMovie('Sweat', 'Sweat' + _root.getNextHighestDepth(), _root.getNextHighestDepth());
this.swapDepths(v3);
v3._x = this._x + 150 * Math.cos(this.bulletAngle * this.radians);
v3._y = this._y + 150 * Math.sin(this.bulletAngle * this.radians);
v4 = this.bulletAngle * this.radians;
v3.xSpeed = Math.cos(v4) * v3.speed;
v3.ySpeed = Math.sin(v4) * v3.speed;
v3._rotation = _root.sakurai.bulletAngle + 150;
this.bulletAngle -= 40;
v3 = _root.attachMovie('Sweat', 'Sweat' + _root.getNextHighestDepth(), _root.getNextHighestDepth());
this.swapDepths(v3);
v3._x = this._x + 150 * Math.cos(this.bulletAngle * this.radians);
v3._y = this._y + 150 * Math.sin(this.bulletAngle * this.radians);
v4 = this.bulletAngle * this.radians;
v3.xSpeed = Math.cos(v4) * v3.speed;
v3.ySpeed = Math.sin(v4) * v3.speed;
v3._rotation = _root.sakurai.bulletAngle + 150;
} else {
++this.limit2;
}
if (this.gameStart == true && this.limit > this.maxLimit && _root.scoreText.text >= 800) {
this.limit = 0;
var v3 = _root.attachMovie('Sweat', 'Sweat' + _root.getNextHighestDepth(), _root.getNextHighestDepth());
this.swapDepths(v3);
v3._x = this._x + 150 * Math.cos(+this.angle * this.radians);
v3._y = this._y + 150 * Math.sin(+this.angle * this.radians);
v3._xscale = 80;
v3._yscale = 80;
var v4 = +this.angle * this.radians;
v3.xSpeed = Math.cos(v4) * v3.speed;
v3.ySpeed = Math.sin(v4) * v3.speed;
v3._rotation = +this.angle + 150;
v3 = _root.attachMovie('Sweat', 'Sweat' + _root.getNextHighestDepth(), _root.getNextHighestDepth());
this.swapDepths(v3);
v3._x = this._x + 150 * Math.cos((-30 + this.angle) * this.radians);
v3._y = this._y + 150 * Math.sin((-30 + this.angle) * this.radians);
v4 = (-30 + this.angle) * this.radians;
v3.xSpeed = Math.cos(v4) * v3.speed;
v3.ySpeed = Math.sin(v4) * v3.speed;
v3._rotation = -30 + this.angle + 150;
v3 = _root.attachMovie('Sweat', 'Sweat' + _root.getNextHighestDepth(), _root.getNextHighestDepth());
this.swapDepths(v3);
v3._x = this._x + 150 * Math.cos((-60 + this.angle) * this.radians);
v3._y = this._y + 150 * Math.sin((-60 + this.angle) * this.radians);
v3._xscale = 80;
v3._yscale = 80;
v4 = (-60 + this.angle) * this.radians;
v3.xSpeed = Math.cos(v4) * v3.speed;
v3.ySpeed = Math.sin(v4) * v3.speed;
v3._rotation = -60 + this.angle + 150;
v3 = _root.attachMovie('Sweat', 'Sweat' + _root.getNextHighestDepth(), _root.getNextHighestDepth());
this.swapDepths(v3);
v3._x = this._x + 150 * Math.cos((-90 + this.angle) * this.radians);
v3._y = this._y + 150 * Math.sin((-90 + this.angle) * this.radians);
v4 = (-90 + this.angle) * this.radians;
v3.xSpeed = Math.cos(v4) * v3.speed;
v3.ySpeed = Math.sin(v4) * v3.speed;
v3._rotation = -90 + this.angle + 150;
v3 = _root.attachMovie('Sweat', 'Sweat' + _root.getNextHighestDepth(), _root.getNextHighestDepth());
this.swapDepths(v3);
v3._x = this._x + 150 * Math.cos((-120 + this.angle) * this.radians);
v3._y = this._y + 150 * Math.sin((-120 + this.angle) * this.radians);
v3._xscale = 80;
v3._yscale = 80;
v4 = (-120 + this.angle) * this.radians;
v3.xSpeed = Math.cos(v4) * v3.speed;
v3.ySpeed = Math.sin(v4) * v3.speed;
v3._rotation = -120 + this.angle + 150;
v3 = _root.attachMovie('Sweat', 'Sweat' + _root.getNextHighestDepth(), _root.getNextHighestDepth());
this.swapDepths(v3);
v3._x = this._x + 150 * Math.cos((-150 + this.angle) * this.radians);
v3._y = this._y + 150 * Math.sin((-150 + this.angle) * this.radians);
v4 = (-150 + this.angle) * this.radians;
v3.xSpeed = Math.cos(v4) * v3.speed;
v3.ySpeed = Math.sin(v4) * v3.speed;
v3._rotation = -150 + this.angle + 150;
v3 = _root.attachMovie('Sweat', 'Sweat' + _root.getNextHighestDepth(), _root.getNextHighestDepth());
this.swapDepths(v3);
v3._x = this._x + 150 * Math.cos((-180 + this.angle) * this.radians);
v3._y = this._y + 150 * Math.sin((-180 + this.angle) * this.radians);
v3._xscale = 80;
v3._yscale = 80;
v4 = (-180 + this.angle) * this.radians;
v3.xSpeed = Math.cos(v4) * v3.speed;
v3.ySpeed = Math.sin(v4) * v3.speed;
v3._rotation = -180 + this.angle + 150;
v3 = _root.attachMovie('Sweat', 'Sweat' + _root.getNextHighestDepth(), _root.getNextHighestDepth());
this.swapDepths(v3);
v3._x = this._x + 150 * Math.cos((-210 + this.angle) * this.radians);
v3._y = this._y + 150 * Math.sin((-210 + this.angle) * this.radians);
v4 = (-210 + this.angle) * this.radians;
v3.xSpeed = Math.cos(v4) * v3.speed;
v3.ySpeed = Math.sin(v4) * v3.speed;
v3._rotation = -210 + this.angle + 150;
v3 = _root.attachMovie('Sweat', 'Sweat' + _root.getNextHighestDepth(), _root.getNextHighestDepth());
this.swapDepths(v3);
v3._x = this._x + 150 * Math.cos((-240 + this.angle) * this.radians);
v3._y = this._y + 150 * Math.sin((-240 + this.angle) * this.radians);
v3._xscale = 80;
v3._yscale = 80;
v4 = (-240 + this.angle) * this.radians;
v3.xSpeed = Math.cos(v4) * v3.speed;
v3.ySpeed = Math.sin(v4) * v3.speed;
v3._rotation = -240 + this.angle + 150;
v3 = _root.attachMovie('Sweat', 'Sweat' + _root.getNextHighestDepth(), _root.getNextHighestDepth());
this.swapDepths(v3);
v3._x = this._x + 150 * Math.cos((-270 + this.angle) * this.radians);
v3._y = this._y + 150 * Math.sin((-270 + this.angle) * this.radians);
v4 = (-270 + this.angle) * this.radians;
v3.xSpeed = Math.cos(v4) * v3.speed;
v3.ySpeed = Math.sin(v4) * v3.speed;
v3._rotation = -270 + this.angle + 150;
v3 = _root.attachMovie('Sweat', 'Sweat' + _root.getNextHighestDepth(), _root.getNextHighestDepth());
this.swapDepths(v3);
v3._x = this._x + 150 * Math.cos((-300 + this.angle) * this.radians);
v3._y = this._y + 150 * Math.sin((-300 + this.angle) * this.radians);
v3._xscale = 80;
v3._yscale = 80;
v4 = (-300 + this.angle) * this.radians;
v3.xSpeed = Math.cos(v4) * v3.speed;
v3.ySpeed = Math.sin(v4) * v3.speed;
v3._rotation = -300 + this.angle + 150;
v3 = _root.attachMovie('Sweat', 'Sweat' + _root.getNextHighestDepth(), _root.getNextHighestDepth());
this.swapDepths(v3);
v3._x = this._x + 150 * Math.cos((-330 + this.angle) * this.radians);
v3._y = this._y + 150 * Math.sin((-330 + this.angle) * this.radians);
v4 = (-330 + this.angle) * this.radians;
v3.xSpeed = Math.cos(v4) * v3.speed;
v3.ySpeed = Math.sin(v4) * v3.speed;
v3._rotation = -330 + this.angle + 150;
this.angle += 7.5;
} else {
++this.limit;
}
if (_root.scoreText.text >= 1000 && this.maxLimit != 5) {
this.maxLimit = 10;
}
if (_root.scoreText.text >= 1500) {
this.maxLimit = 5;
}
if (_root.scoreText.text >= 2000) {
this.maxLimit2 = 3;
}
if (this.hitTest(_root.mako._x, _root.mako._y, true) && _root.startButton.gameStarted == true) {
_root.startButton.gameOver();
}
};
v2.num = 0;
v2.angle = 0;
v2.bulletAngle = 0;
v2.bulletAngle2 = -90;
v2.radians = 0.0174532925199433;
v2.setting = 0;
v2.setting2 = 0;
v2.limit = 0;
v2.limit2 = 0;
v2.maxLimit = 15;
v2.maxLimit2 = 6;
v2.gameStart = false;
ASSetPropFlags(_global.Sakurai.prototype, null, 1);
}
#endinitclip
}
movieClip 161 __Packages.Sweat {
#initclip
if (!_global.Sweat) {
var v1 = function () {
super();
};
_global.Sweat = v1;
_global.Sweat extends MovieClip;
var v2 = v1.prototype;
v2.onLoad = function () {};
v2.onEnterFrame = function () {
this._x += this.xSpeed;
this._y += this.ySpeed;
if (this._x > 600 || this._x < 0 || this._y > 600 || this._y < 0) {
this.kill();
}
if (this.hitTest(_root.mako._x, _root.mako._y, true)) {
this.kill();
_root.startButton.gameOver();
}
};
v2.kill = function () {
this.removeMovieClip();
};
v2.speed = 5;
ASSetPropFlags(_global.Sweat.prototype, null, 1);
}
#endinitclip
}