Combined Code
movieClip 2 normalbullet {
}
movieClip 5 {
}
movieClip 6 enemy1 {
}
// unknown tag 88 length 63
button 13 {
on (release) {
_root.reset();
this.removeMovieClip();
}
}
movieClip 14 lend {
frame 27 {
stop();
}
}
frame 1 {
function levelEnd() {
stopAllSounds();
player.blocked = true;
eval(blackscreen)._visible = 1;
var v2 = _root.attachMovie('lend', 'lend', _root.getNextHighestDepth());
v2._x = Stage.width / 2;
v2._y = Stage.height / 2;
}
function reset() {
player.blocked = false;
player.levelEnded = false;
player.lives = maxLives;
player.enemytime = 65;
eval(blackscreen)._visible = 0;
score = 0;
player.shoot = maxShoot;
player.kitty._x = 0;
player.kitty._y = 0;
}
totalenemycount = 1;
score = 0;
upgraded = 0;
eval(blackscreen)._visible = 0;
maxLives = 1;
}
movieClip 21 {
}
movieClip 22 {
}
instance player of movieClip 22 {
onClipEvent (load) {
speed = 20;
shoot = maxShoot;
maxShoot = 20;
counter = 0;
ecounter = 0;
enemytimer = 0;
enemytime = 65;
enemyID = 0;
enemySpeed = 10;
autoShoot = false;
lives = 1;
blocked = false;
levelEnded = false;
bulletType = 'normalbullet';
bulletspeed = 30;
r = _width / 2;
}
onClipEvent (enterFrame) {
_root.scoreBar.htmlText = _root.score;
if (lives <= 0 && !levelEnded) {
_root.levelEnd();
levelEnded = true;
}
if (blocked) {
i = 0;
while (i <= ecounter) {
_root['enemy' + i].removeMovieClip();
++i;
}
i = 0;
while (i <= counter) {
_root['bullet' + i].removeMovieClip();
++i;
}
}
if (!blocked) {
++enemytimer;
if (enemytimer > enemytime) {
enemytimer = 0;
enemyID = random(_root.totalenemycount) + 1;
enemyY = random(Stage.height - 150) + 50;
var enemyMC = _root.attachMovie('enemy' + enemyID, 'enemy' + ecounter, _root.getNextHighestDepth());
++ecounter;
enemyMC._y = enemyY;
enemyMC._x = Stage.width + 70;
enemyMC.onEnterFrame = function () {
if (this._x < -50) {
this.removeMovieClip();
_root.score -= 500;
--lives;
++enemytime;
}
this._x -= enemySpeed;
i = 0;
while (i <= counter) {
if (_root.player['bullet' + i].hitTest(this.hitbox)) {
loadMovie('', this);
loadMovie('', _root.player['bullet' + i]);
_root.score += 100;
if (enemytime > 20) {
--enemytime;
}
}
++i;
}
};
}
++shoot;
if (Key.isDown(38)) {
kitty._y -= speed;
}
if (Key.isDown(40)) {
kitty._y += speed;
}
if (kitty._y < -320) {
kitty._y += speed;
}
if (kitty._y > 200) {
kitty._y -= speed;
}
if (Key.isDown(20)) {
if (autoshoot) {
autoshoot = false;
} else {
autoshoot = true;
}
}
if (autoshoot ? shoot >= maxShoot : (Key.isDown(32) && shoot >= maxShoot)) {
shoot = 0;
var bulletMC = attachMovie(bulletType, 'bullet' + counter, getNextHighestDepth());
++counter;
bulletMC._y = kitty._y;
bulletMC._x = kitty._x + 125;
bulletMC.onEnterFrame = function () {
if (this._x > 1000) {
this.removeMovieClip();
}
this._x += bulletspeed;
};
}
}
}
}
movieClip 25 {
}
movieClip 29 {
}