Frame 1
function GoldG(Get) {
_root.Gold = _root.Gold + Math.round(Get * _root.BGold);
update();
}
function GoldL(Lose) {
_root.Gold = _root.Gold - Lose;
update();
}
function drop(onX, onY) {
if (random(100) >= 40) {
var _local2 = _root.attachMovie("Coin02", "Coin02" + _root.getNextHighestDepth(), _root.getNextHighestDepth());
_local2._x = onX;
_local2._y = onY;
} else {
var _local2 = _root.attachMovie("Bombies", "Bombies" + _root.getNextHighestDepth(), _root.getNextHighestDepth());
_local2._x = onX;
_local2._y = onY;
_local2.style = random(2) + 1;
}
}
function update() {
_root.Nave.updateBombs();
_root.CPanel.barSH.moves._xscale = (_root.Nave.curSH / _root.Nave.maxSH) * 100;
_root.CPanel.barHP.moves._xscale = (_root.Nave.curHP / _root.Nave.maxHP) * 100;
_root.CPanel.curTXT.text = _root.Nave.curHP;
_root.CPanel.maxTXT.text = _root.Nave.maxHP;
_root.CPanel.curSTXT.text = _root.Nave.curSH;
_root.CPanel.maxSTXT.text = _root.Nave.maxSH;
_root.CPanel.scoreTXT.text = _root.score;
_root.CPanel.GoldTXT.text = _root.Gold;
}
function doSomething1() {
getURL ("http://www.furaffinity.net/user/shenhibiki", (window = blank));
}
function doSomething3() {
getURL ("https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=5864973", (window = blank));
}
speed = 1;
cadencia = 10;
damage = 3;
naveHP = 10;
naveSH = 5;
regHP = 0;
regSH = 1;
BType = 1;
BLevel = 1;
BSpeed = 1;
BGold = 1;
Gold = 0;
Stage.scaleMode = "noScale";
MENU = new ContextMenu();
MENU.builtInItems.play = false;
MENU.builtInItems.forward_back = false;
MENU.builtInItems.loop = false;
MENU.builtInItems.print = false;
MENU.builtInItems.rewind = false;
MENU.builtInItems.save = false;
MENU.builtInItems.zoom = false;
Functioned1 = new ContextMenuItem("Flash by Shen Hibiki", doSomething1);
Functioned3 = new ContextMenuItem("-DONATE?-", doSomething3);
Functioned3.separatorBefore = true;
MENU.customItems.push(Functioned1);
MENU.customItems.push(Functioned3);
_root.menu = MENU;
Frame 2
score = 0;
stop();
Frame 3
MenuPW._visible = false;
stop();
Symbol 3 MovieClip [Bala01] Frame 1
#initclip 24
Object.registerClass("Bala01", Bala01);
#endinitclip
Symbol 8 MovieClip [Enemy01] Frame 1
#initclip 13
Object.registerClass("Enemy01", Enemy01);
#endinitclip
Symbol 11 MovieClip [Bala02] Frame 1
#initclip 14
Object.registerClass("Bala02", Bala02);
#endinitclip
Symbol 14 MovieClip [Bala03] Frame 1
#initclip 15
Object.registerClass("Bala03", Bala03);
#endinitclip
Symbol 17 MovieClip [EBala01] Frame 1
#initclip 16
Object.registerClass("EBala01", EBala01);
#endinitclip
Symbol 26 MovieClip [Enemy02] Frame 1
#initclip 17
Object.registerClass("Enemy02", Enemy02);
#endinitclip
Symbol 26 MovieClip [Enemy02] Frame 22
gotoAndPlay (7);
Symbol 33 MovieClip [Boom01] Frame 1
#initclip 18
Object.registerClass("Boom01", Boom01);
#endinitclip
Symbol 36 MovieClip [Coin02] Frame 1
#initclip 19
Object.registerClass("Coin02", Coin02);
#endinitclip
Symbol 39 MovieClip [Coin01] Frame 1
#initclip 20
Object.registerClass("Coin01", Coin01);
#endinitclip
Symbol 44 MovieClip [Bombies] Frame 1
#initclip 21
Object.registerClass("Bombies", Bombies);
#endinitclip
Symbol 50 MovieClip Frame 1
stop();
Symbol 59 MovieClip [Nave] Frame 1
#initclip 22
Object.registerClass("Nave", Nave);
#endinitclip
Symbol 61 MovieClip [EnemyGenerator] Frame 1
#initclip 23
Object.registerClass("EnemyGenerator", EG);
#endinitclip
Symbol 81 MovieClip Frame 3
stop();
Symbol 85 Button
on (release) {
BNiv();
}
Symbol 87 Button
on (release) {
BCad();
}
Symbol 89 Button
on (release) {
BHP();
}
Symbol 91 Button
on (release) {
BSH();
}
Symbol 102 MovieClip Frame 2
function BHP() {
if (_root.Gold >= PHP) {
_root.GoldL(PHP);
_root.naveHP = _root.naveHP + 5;
Prices();
}
}
function BSH() {
if (_root.Gold >= PSH) {
_root.GoldL(PSH);
_root.naveSH = _root.naveSH + 1;
Prices();
}
}
function BNiv() {
if ((_root.Gold >= PNiv) && (_root.BLevel < 10)) {
_root.GoldL(PNiv);
_root.BLevel = _root.BLevel + 1;
PNiv = _root.BLevel * 10;
Prices();
}
}
function BCad() {
if ((_root.Gold >= PCad) && (_root.cadencia > 5)) {
_root.GoldL(PCad);
_root.cadencia = _root.cadencia - 0.5;
PCad = Math.round((11 - _root.cadencia) * 15);
Prices();
}
}
function Prices() {
PNivTxt.text = PNiv;
NivTxt.text = _root.BLevel;
PCadTxt.text = PCad;
CadTxt.text = _root.cadencia;
PHPTxt.text = PHP;
HPTxt.text = _root.naveHP;
PSHTxt.text = PSH;
SHTxt.text = _root.naveSH;
}
stop();
PNiv = _root.BLevel * 10;
PCad = Math.round((11 - _root.cadencia) * 15);
PHP = 50;
PSH = 25;
Prices();
Symbol 116 MovieClip [__Packages.Enemy01] Frame 0
class Enemy01 extends MovieClip
{
var speed, killed, HP, score, _y, hitTest, removeMovieClip, _x;
function Enemy01 () {
super();
}
function onLoad() {
speed = 7;
killed = 0;
HP = 5;
score = 10;
}
function onEnterFrame() {
if (_root.Nave.pausa == false) {
_y = _y + speed;
if (hitTest(_root.Nave.HitArea)) {
_root.Nave.damage(HP);
explode();
}
}
if (_y > 610) {
removeMovieClip();
}
}
function explode() {
var _local3 = _root.attachMovie("Boom01", "Boom01" + _root.getNextHighestDepth(), _root.getNextHighestDepth());
_local3._x = _x;
_local3._y = _y;
removeMovieClip();
}
function damage(dam) {
HP = HP - dam;
if (HP <= 0) {
_root.score = _root.score + score;
if ((random(100) + 1) >= 80) {
_root.drop(_x, _y);
}
_root.Nave.update();
explode();
}
}
}
Symbol 117 MovieClip [__Packages.Bala02] Frame 0
class Bala02 extends MovieClip
{
var speed, removeMovieClip, _y, _x, slide, hitTest;
function Bala02 () {
super();
}
function onLoad() {
speed = 10 * _root.BSpeed;
}
function onEnterFrame() {
if (_root._currentframe <= 2) {
removeMovieClip();
}
if (_root.Nave.pausa == false) {
_y = _y - speed;
_x = _x + slide;
if (_y < -10) {
removeMovieClip();
}
for (var _local3 in _root.EG.enemies) {
if (hitTest(_root.EG.enemies[_local3].HitArea)) {
removeMovieClip();
_root.EG.enemies[_local3].damage(_root.damage * 1.5);
}
}
}
}
}
Symbol 118 MovieClip [__Packages.Bala03] Frame 0
class Bala03 extends MovieClip
{
var speed, removeMovieClip, _y, _x, slide, hitTest;
function Bala03 () {
super();
}
function onLoad() {
speed = 10 * _root.BSpeed;
}
function onEnterFrame() {
if (_root._currentframe <= 2) {
removeMovieClip();
}
if (_root.Nave.pausa == false) {
_y = _y - speed;
_x = _x + slide;
if (_y < -10) {
removeMovieClip();
}
for (var _local3 in _root.EG.enemies) {
if (hitTest(_root.EG.enemies[_local3].HitArea)) {
removeMovieClip();
_root.EG.enemies[_local3].damage(_root.damage * 2);
}
}
}
}
}
Symbol 119 MovieClip [__Packages.EBala01] Frame 0
class EBala01 extends MovieClip
{
var dir, _y, tarY, _x, tarX, removeMovieClip, hitTest;
function EBala01 () {
super();
}
function onLoad() {
dir = (Math.atan2(tarY - _y, tarX - _x) * 180) / Math.PI;
}
function onEnterFrame() {
if (_root.Nave.CoinShower > 0) {
var _local3 = _root.CapaJuego.attachMovie("Coin01", "Coin01" + _root.CapaJuego.getNextHighestDepth(), _root.CapaJuego.getNextHighestDepth());
_local3._x = _x;
_local3._y = _y;
removeMovieClip();
}
if (_root._currentframe <= 2) {
removeMovieClip();
}
if (_root.Nave.pausa == false) {
_x = _x + (Math.cos((dir * Math.PI) / 180) * 10);
_y = _y + (Math.sin((dir * Math.PI) / 180) * 10);
if (hitTest(_root.Nave)) {
_root.Nave.damage(2);
removeMovieClip();
}
if (_y > 610) {
removeMovieClip();
}
}
}
}
Symbol 120 MovieClip [__Packages.Enemy02] Frame 0
class Enemy02 extends MovieClip
{
var speed, killed, cadencia, HP, score, _y, hitTest, _x, removeMovieClip;
function Enemy02 () {
super();
}
function onLoad() {
speed = 0;
killed = 0;
cadencia = 10;
HP = 7;
score = 15;
}
function onEnterFrame() {
if (_root.Nave.pausa == false) {
_y = _y + speed;
if (hitTest(_root.Nave.HitArea)) {
_root.Nave.damage(HP);
explode();
}
cadencia = cadencia - 1;
if ((cadencia <= 0) && (_root.Nave.alive == true)) {
var _local3 = _root.CapaJuego.attachMovie("EBala01", "EBala01" + _root.CapaJuego.getNextHighestDepth(), _root.CapaJuego.getNextHighestDepth());
_local3._x = _x;
_local3._y = _y;
cadencia = _root.cadencia;
_local3.tarX = _root.Nave._x;
_local3.tarY = _root.Nave._y;
cadencia = 40;
}
}
}
function explode() {
var _local3 = _root.attachMovie("Boom01", "Boom01" + _root.getNextHighestDepth(), _root.getNextHighestDepth());
_local3._x = _x;
_local3._y = _y;
removeMovieClip();
}
function damage(dam) {
HP = HP - dam;
if (HP <= 0) {
_root.score = _root.score + score;
if ((random(100) + 1) >= 60) {
_root.drop(_x, _y);
}
_root.Nave.update();
explode();
}
}
}
Symbol 121 MovieClip [__Packages.Boom01] Frame 0
class Boom01 extends MovieClip
{
var _totalframes, _currentframe, removeMovieClip;
function Boom01 () {
super();
}
function onEnterFrame() {
if (_currentframe == _totalframes) {
removeMovieClip();
}
}
}
Symbol 122 MovieClip [__Packages.Coin02] Frame 0
class Coin02 extends MovieClip
{
var _y, removeMovieClip, hitTest;
function Coin02 () {
super();
}
function onEnterFrame() {
if (_root.Nave.pausa == false) {
_y = _y + 3;
if (_root._currentframe <= 2) {
removeMovieClip();
}
if (hitTest(_root.Nave.HitArea)) {
_root.GoldG(10);
removeMovieClip();
}
if (_y > 610) {
removeMovieClip();
}
}
}
}
Symbol 123 MovieClip [__Packages.Coin01] Frame 0
class Coin01 extends MovieClip
{
var _y, removeMovieClip, hitTest;
function Coin01 () {
super();
}
function onEnterFrame() {
if (_root.Nave.pausa == false) {
_y = _y + 3;
if (_root._currentframe <= 2) {
removeMovieClip();
}
if (hitTest(_root.Nave.HitArea)) {
_root.GoldG(1);
removeMovieClip();
}
if (_y > 610) {
removeMovieClip();
}
}
}
}
Symbol 124 MovieClip [__Packages.Bombies] Frame 0
class Bombies extends MovieClip
{
var _y, gotoAndStop, style, removeMovieClip, hitTest;
function Bombies () {
super();
}
function onEnterFrame() {
if (_root.Nave.pausa == false) {
_y = _y + 3;
gotoAndStop(style + 1);
if (_root._currentframe <= 2) {
removeMovieClip();
}
if (hitTest(_root.Nave.HitArea)) {
_root.Nave.PlusBomb(style);
removeMovieClip();
}
if (_y > 610) {
removeMovieClip();
}
}
}
}
Symbol 125 MovieClip [__Packages.Nave] Frame 0
class Nave extends MovieClip
{
var speed, mov_x, mov_y, wait, cadencia, _x, _y, CoinShower, maxHP, curHP, maxSH, curSH, regHP, regSH, bombs, alive, pausa, pausaW, _visible, gotoAndStop, Dwait;
function Nave () {
super();
}
function onLoad() {
speed = _root.speed;
mov_x = 0;
mov_y = 0;
wait = 0;
cadencia = 0;
_x = 200;
_y = 550;
CoinShower = 0;
maxHP = _root.naveHP;
curHP = maxHP;
maxSH = _root.naveSH;
curSH = maxSH;
regHP = 100;
regSH = 100;
bombs = [];
alive = true;
pausa = false;
pausaW = 0;
_visible = true;
_root.Paused._visible = false;
_root.Again._visible = false;
gotoAndStop(3);
update();
Dwait = 0;
}
function update() {
_root.update();
}
function onEnterFrame() {
pausaW = pausaW - 1;
CoinShower = CoinShower - 1;
if ((Key.isDown(80) && (pausaW <= 0)) && (alive == true)) {
if (pausa == false) {
pausa = true;
_root.Paused._visible = true;
_root.MenuPW._visible = true;
} else {
pausa = false;
_root.Paused._visible = false;
_root.MenuPW._visible = false;
}
pausaW = 10;
}
if (pausa == false) {
if (alive == true) {
if (Key.isDown(39) || (Key.isDown(68))) {
mov_x = mov_x + speed;
}
if (Key.isDown(37) || (Key.isDown(65))) {
mov_x = mov_x + (-speed);
}
if (Key.isDown(38) || (Key.isDown(87))) {
mov_y = mov_y + (-speed);
}
if (Key.isDown(40) || (Key.isDown(83))) {
mov_y = mov_y + speed;
}
_x = _x + mov_x;
_y = _y + mov_y;
mov_x = mov_x * 0.85;
mov_y = mov_y * 0.85;
if (mov_x > 15) {
mov_x = 15;
}
if (mov_y > 15) {
mov_y = 15;
}
if (mov_x > 3) {
gotoAndStop(2);
}
if (mov_x < -3) {
gotoAndStop(4);
}
if (mov_x > 6) {
gotoAndStop(1);
}
if (mov_x < -6) {
gotoAndStop(5);
}
if ((mov_x > -3) && (mov_x < 3)) {
gotoAndStop(3);
}
if ((mov_y >= -0.3) && (mov_y <= 0.3)) {
mov_y = 0;
}
if ((mov_x >= -0.3) && (mov_x <= 0.3)) {
mov_x = 0;
}
if (_x < 15) {
_x = 15;
}
if (_x > 385) {
_x = 385;
}
if (_y < 13) {
_y = 13;
}
if (_y > 583) {
_y = 583;
}
cadencia = cadencia - 1;
if (Key.isDown(32) && (cadencia <= 0)) {
cadencia = _root.cadencia;
if (_root.BType == 1) {
if (_root.BLevel == 1) {
B01(0, 0);
}
if (_root.BLevel == 2) {
B02(0, 0);
}
if (_root.BLevel == 3) {
B01(0.5, 0);
B01(-0.5, 0);
}
if (_root.BLevel == 4) {
B02(0.5, 0);
B02(-0.5, 0);
}
if (_root.BLevel == 5) {
B03(0.5, 0);
B03(-0.5, 0);
}
if (_root.BLevel == 6) {
B01(0.5, 3);
B02(0, 0);
B01(-0.5, 3);
}
if (_root.BLevel == 7) {
B01(0.5, 3);
B03(0, 0);
B01(-0.5, 3);
}
if (_root.BLevel == 8) {
B02(0.5, 3);
B02(0, 0);
B02(-0.5, 3);
}
if (_root.BLevel == 9) {
B02(0.5, 3);
B03(0, 0);
B02(-0.5, 3);
}
if (_root.BLevel == 10) {
B03(0.5, 3);
B03(0, 0);
B03(-0.5, 3);
}
}
}
if (curHP < maxHP) {
regHP = regHP - _root.regHP;
}
if (regHP <= 0) {
curHP = curHP + 1;
regHP = 100;
_root.update();
}
if (curSH < maxSH) {
regSH = regSH - _root.regSH;
}
if (regSH <= 0) {
curSH = curSH + 1;
regSH = 100;
_root.update();
}
Dwait = Dwait - 1;
if (Key.isDown(16) && (Dwait <= 0)) {
UseBomb();
Dwait = 10;
}
}
}
}
function Gold(Get) {
_root.Gold = _root.Gold + Math.round(Get * _root.BGold);
update();
trace(_root.Gold);
}
function damage(dam) {
dam = Math.round(dam);
if (dam >= curSH) {
dam = dam - curSH;
curSH = 0;
curHP = curHP - dam;
} else {
curSH = curSH - dam;
_root.Nave.escudo.play();
}
if (curHP <= 0) {
curHP = 0;
_x = -50;
_visible = false;
alive = false;
_root.Again._visible = true;
}
update();
_root.prepare();
}
function B01(slide, offset) {
var _local3 = _root.CapaJuego.attachMovie("Bala01", "Bala01" + _root.CapaJuego.getNextHighestDepth(), _root.CapaJuego.getNextHighestDepth());
_local3._x = _x;
_local3._y = _y - (15 - offset);
_local3.slide = slide;
}
function B02(slide, offset) {
var _local3 = _root.CapaJuego.attachMovie("Bala02", "Bala02" + _root.CapaJuego.getNextHighestDepth(), _root.CapaJuego.getNextHighestDepth());
_local3._x = _x;
_local3._y = _y - (15 - offset);
_local3.slide = slide;
}
function B03(slide, offset) {
var _local3 = _root.CapaJuego.attachMovie("Bala03", "Bala03" + _root.CapaJuego.getNextHighestDepth(), _root.CapaJuego.getNextHighestDepth());
_local3._x = _x;
_local3._y = _y - (15 - offset);
_local3.slide = slide;
}
function PlusBomb(style) {
if (bombs.length < 5) {
bombs[bombs.length] = style;
_root.Nave.gotBomb.play();
} else {
_root.score = _root.score + 50;
}
update();
}
function UseBomb() {
if (bombs.length > 0) {
if (bombs[bombs.length - 1] == 1) {
Bomba1();
}
if (bombs[bombs.length - 1] == 2) {
Bomba2();
}
bombs.pop();
update();
}
}
function updateBombs() {
if (bombs[0] != undefined) {
_root.CPanel.B1.gotoAndStop(bombs[0]);
} else {
_root.CPanel.B1.gotoAndStop(3);
}
if (bombs[1] != undefined) {
_root.CPanel.B2.gotoAndStop(bombs[1]);
} else {
_root.CPanel.B2.gotoAndStop(3);
}
if (bombs[2] != undefined) {
_root.CPanel.B3.gotoAndStop(bombs[2]);
} else {
_root.CPanel.B3.gotoAndStop(3);
}
if (bombs[3] != undefined) {
_root.CPanel.B4.gotoAndStop(bombs[3]);
} else {
_root.CPanel.B4.gotoAndStop(3);
}
if (bombs[4] != undefined) {
_root.CPanel.B5.gotoAndStop(bombs[4]);
} else {
_root.CPanel.B5.gotoAndStop(3);
}
}
function Bomba1() {
_root.Flash.play();
for (var _local2 in _root.EG.enemies) {
_root.EG.enemies[_local2].damage(50);
}
}
function Bomba2() {
_root.Flash.play();
CoinShower = 5;
}
}
Symbol 126 MovieClip [__Packages.EG] Frame 0
class EG extends MovieClip
{
var cadenciaA, cadenciaB, enemies;
function EG () {
super();
}
function onLoad() {
cadenciaA = 0;
cadenciaB = 90;
enemies = [];
}
function onEnterFrame() {
if (_root.Nave.pausa == false) {
cadenciaA = cadenciaA - 1;
cadenciaB = cadenciaB - 1;
if ((cadenciaA <= 0) && (_root.Nave.alive == true)) {
var _local3 = _root.CapaJuego.attachMovie("Enemy01", "Enemy01" + _root.CapaJuego.getNextHighestDepth(), _root.CapaJuego.getNextHighestDepth());
_local3._x = random(350) + 25;
_local3._y = -15;
cadenciaA = 30;
enemies.push(_local3);
}
if ((cadenciaB <= 0) && (_root.Nave.alive == true)) {
var _local3 = _root.CapaJuego.attachMovie("Enemy02", "Enemy02" + _root.CapaJuego.getNextHighestDepth(), _root.CapaJuego.getNextHighestDepth());
_local3._x = random(350) + 25;
_local3._y = random(50) + 10;
cadenciaB = 70;
enemies.push(_local3);
}
}
}
}
Symbol 127 MovieClip [__Packages.Bala01] Frame 0
class Bala01 extends MovieClip
{
var speed, removeMovieClip, _y, _x, slide, hitTest;
function Bala01 () {
super();
}
function onLoad() {
speed = 10 * _root.BSpeed;
}
function onEnterFrame() {
if (_root._currentframe <= 2) {
removeMovieClip();
}
if (_root.Nave.pausa == false) {
_y = _y - speed;
_x = _x + slide;
if (_y < -10) {
removeMovieClip();
}
for (var _local3 in _root.EG.enemies) {
if (hitTest(_root.EG.enemies[_local3].HitArea)) {
removeMovieClip();
_root.EG.enemies[_local3].damage(_root.damage);
}
}
}
}
}
Symbol 105 Button
on (release) {
play();
}
Symbol 110 Button
on (release) {
for (var i in _root.EG.enemies) {
_root.EG.enemies[i].explode();
}
MenuPW._visible = true;
gotoAndPlay (2);
}
Symbol 114 MovieClip Frame 1
stop();