Combined Code
// unknown tag 88 length 73
movieClip 7 GameoverScreen {
}
movieClip 9 Fritzl {
frame 1 {
function health() {
if (this._width < 55) {
_root.sc += 50;
this.removeMovieClip();
} else {
this._xscale = _root.resizeFritzl;
this._yscale = _root.resizeFritzl;
if (_root.resizeFritzl > 25) {
_root.resizeFritzl /= 2;
}
newname = 'Fritzl' + _root.nrFritzl;
this.duplicateMovieClip(newname, _root.getNextHighestDepth());
++_root.nrFritzl;
}
}
var FritzlWidth = 0;
var newname;
var mySpeed = 2;
var timer = 12;
var yled = 5;
this.onEnterFrame = function () {
this._x += mySpeed;
if (this._x > 800) {
_root.life -= 1;
this.removeMovieClip();
}
if (timer >= 12) {
dir = Math.ceil(Math.random() * 2);
timer = 0;
}
if (dir == 1) {
this._y -= yled;
} else {
if (dir == 2) {
this._y += yled;
} else {
if (dir == 0) {
this._y += 0;
}
}
}
if (this._y > 570) {
this._y -= yled;
}
if (this._y < 25) {
this._y += yled;
}
++timer;
if (this._x > 800) {
_root.life -= 1;
this.removeMovieClip();
}
};
}
}
movieClip 11 Bullet {
frame 1 {
this.onEnterFrame = function () {
i = 0;
while (i < _root.nrEnemies) {
if (this.hitTest(_root['Enemy0' + i])) {
_root['Enemy0' + i].healthPR();
this.removeMovieClip();
}
if (this.hitTest(_root.Enemy0)) {
_root.Enemy0.healthPR();
this.removeMovieClip();
}
++i;
}
k = 0;
while (k < 4) {
if (this.hitTest(_root.Fritzl)) {
_root.Fritzl.health();
this.removeMovieClip();
}
if (this.hitTest(_root['Fritzl' + k])) {
_root['Fritzl' + k].health();
this.removeMovieClip();
}
++k;
}
this._x -= 12;
if (this._x < -20) {
this.removeMovieClip();
}
};
}
}
movieClip 16 Enemy {
}
movieClip 24 {
}
movieClip 30 {
}
movieClip 31 dude {
}
movieClip 35 Symbol 2 {
}
frame 1 {
var sc = 0;
var i = 0;
var lol = 0;
var life = 99;
var nrEnemies = 3;
var shootcounter = 0;
var shootframe = 12;
var shoot = false;
var BossSpawn = true;
var nrFritzl = 0;
var resizeFritzl = 50;
var Musik = 0;
i = 0;
while (i < nrEnemies) {
_root.Enemy0.duplicateMovieClip('Enemy0' + i, _root.getNextHighestDepth());
++i;
}
this.onEnterFrame = function () {
BackDrop.gotoAndStop(1);
_root.BackgroundMusic = new Sound();
_root.BackgroundMusic.attachSound('BackGroundMusik');
if (Musik == 0) {
_root.BackgroundMusic.start(0, 999);
++Musik;
}
if (Key.isDown(39)) {
Ship.gotoAndStop(2);
if (Ship.hitTest(800, Ship._y, true)) {
Ship._x -= 5;
}
Ship._x += 5;
} else {
if (Key.isDown(37)) {
Ship.gotoAndStop(2);
if (Ship.hitTest(0, Ship._y, true)) {
Ship._x += 5;
}
Ship._x -= 5;
} else {
if (Key.isDown(38)) {
Ship.gotoAndStop(3);
if (Ship.hitTest(Ship._x, 0, true)) {
Ship._y += 5;
}
Ship._y -= 5;
} else {
if (Key.isDown(40)) {
Ship.gotoAndStop(3);
if (Ship.hitTest(Ship._x, 600, true)) {
Ship._y -= 5;
}
Ship._y += 5;
} else {
Ship.gotoAndStop(1);
}
}
}
}
if (shootcounter < shootframe) {
shootcounter += 1;
}
if (shootcounter >= shootframe) {
shoot = true;
shootcounter = 0;
}
if (Key.isDown(32) && shoot == true) {
++i;
_root.attachMovie('Bullet', 'Bullet' + i, _root.getNextHighestDepth());
_root['Bullet' + i]._x = Ship._x - 44;
_root['Bullet' + i]._y = Ship._y - 30;
shoot = false;
}
if (life == 0) {
_root.attachMovie('GameoverScreen', 'GameoverScreen', _root.getNextHighestDepth());
}
if (sc >= 10 && BossSpawn == true) {
_root.attachMovie('Fritzl', 'Fritzl', _root.getNextHighestDepth());
_root.Fritzl._y = 300;
BossSpawn = false;
}
};
}
instance of movieClip 35 Symbol 2 {
onClipEvent (enterFrame) {
this.gotoAndStop(1);
if (_root.sc >= 50) {
this.gotoAndStop(2);
}
}
}
movieClip 36 {
}
instance Ship of movieClip 36 {
onClipEvent (load) {
function reset() {
this._x = 750;
this._y = 300;
}
reset();
}
onClipEvent (enterFrame) {
if (this.hitTest(800, Ship._y, true)) {
Ship._x -= 5;
}
i = 0;
while (i < _root.nrEnemies) {
if (this.hitTest(_root['Enemy0' + i]) || this.hitTest(_root[Enemy0])) {
_root.life -= 1;
reset();
k = 0;
while (k < _root.nrEnemies) {
_root['Enemy0' + k].restart();
_root.Enemy0.restart();
++k;
}
}
++i;
}
}
}
instance Enemy0 of movieClip 16 Enemy {
onClipEvent (load) {
function resetPR() {
this.gotoAndStop(1);
k = 2;
var v3 = 12;
enemyY = Math.random() * 600;
this._y = enemyY;
var v2 = -100 - Math.random() * 300;
this._x = v2;
mySpeed = Math.ceil(Math.random() * 3) + 1;
yled = 5;
}
function resetPB() {
this.gotoAndStop(2);
k = 4;
var v3 = 12;
enemyY = Math.random() * 600;
this._y = enemyY;
var v2 = -100 - Math.random() * 300;
this._x = v2;
mySpeed = Math.ceil(Math.random() * 3) + 1;
yled = 5;
}
function restart() {
if (_root.sc < 50) {
resetPR();
} else {
if (_root.sc > 50) {
resetPB();
}
}
}
function healthPR() {
function healthPB() {
k -= 1;
if (k <= 0) {
_root.sc += 100;
restart();
}
}
k -= 1;
if (k <= 0) {
_root.sc += 10;
restart();
}
}
var k;
var enemyY;
restart();
}
onClipEvent (enterFrame) {
this._x += mySpeed;
if (this._x > 800) {
_root.life -= 1;
restart();
}
if (timer >= 12) {
var dir = Math.ceil(Math.random() * 2);
timer = 0;
}
if (dir == 1) {
this._y -= yled;
} else {
if (dir == 2) {
this._y += yled;
} else {
if (dir == 0) {
this._y += 0;
}
}
}
if (this._y > 570) {
this._y -= yled;
}
if (this._y < 25) {
this._y += yled;
}
if (this._y > enemyY + 50) {
this._y -= yled;
}
if (this._y < enemyY - 50) {
this._y += yled;
}
++timer;
}
}