Combined Code
frame 1 {
play();
}
movieClip 5 {
}
frame 3 {
tFrame = _root._totalframes;
ifFrameLoaded (tFrame) {
gotoAndStop(5);
}
}
frame 4 {
prevFrame();
}
frame 5 {
play();
}
button 10 {
on (release) {
gotoAndStop(740);
}
}
frame 739 {
stop();
}
button 25 {
on (release) {
gotoAndStop(740);
}
}
frame 740 {
function FuncInit() {
ListeSpaces = new Array();
colspace = 3;
maxspace = 8;
points = 0;
j = 1;
while (colspace >= j) {
i = 0;
while (i < maxspace) {
duplicateMovieClip(j + 'space', j + 'space' + i, 10 * j + i);
eval(j + 'space' + i)._x = 15 + 30 * i;
++i;
}
++j;
}
gameover.counter = 3;
_root.live0._visible = 1;
_root.live1._visible = 1;
_root.live2._visible = 1;
with (eval(_root.spaceship)) {
_visible = true;
gotoAndStop(1);
moveSpeed = 10;
_root.laser._visible = false;
laserCounter = 1;
maxLasers = 4;
depthCounter = 1;
}
}
}
frame 740 {
function FuncGameOver() {
gameover.gotoAndPlay(2);
spaceship._visible = false;
live0._visible = 0;
live1._visible = 0;
live2._visible = 0;
i = 1;
while (ListeSpaces.length >= i) {
var KelSpace = ListeSpaces[i];
this[KelSpace].removeMovieClip();
++i;
}
}
}
frame 740 {
play();
}
button 32 {
on (release) {
getURL('http://www.margarida-romero.net', '_blank');
getURL('http://www.schawack.com', '_blank');
}
}
frame 741 {
FuncInit();
stop();
}
button 35 {
on (release) {
gotoAndStop(1);
_parent.gotoAndPlay(1);
}
}
movieClip 37 {
frame 1 {
stop();
}
frame 2 {
j = 1;
while (j < _parent.colspace) {
i = 0;
while (i < _parent.maxspace) {
removeMovieClip(_root[j + 'space' + i]);
++i;
}
++j;
}
play();
}
frame 18 {
stop();
}
}
instance gameover of movieClip 37 {
onClipEvent (enterFrame) {
if (_root.computer._visible == false) {
if (counter == 0) {
_parent.FuncGameOver();
}
if (counter == 1) {
_root.live1._visible = 0;
}
if (counter == 2) {
_root.live2._visible = 0;
}
}
}
}
movieClip 38 {
}
movieClip 39 {
frame 1 {
stop();
}
frame 2 {
play();
}
frame 3 {
--_root.gameover.counter;
}
}
instance spaceship of movieClip 39 {
onClipEvent (load) {
moveSpeed = 10;
_root.laser._visible = false;
laserCounter = 1;
maxLasers = 4;
depthCounter = 1;
}
onClipEvent (enterFrame) {
if (Key.isDown(39) and this._x < 290) {
this._x += moveSpeed;
} else {
if (Key.isDown(37) and 10 < this._x) {
this._x -= moveSpeed;
}
}
if (Key.isDown(32) and maxLasers >= laserCounter) {
++laserCounter;
_root.laser.duplicateMovieClip('laser' + depthCounter, depthCounter);
_root['laser' + depthCounter]._visible = true;
++depthCounter;
if (maxLasers < depthCounter) {
depthCounter = 1;
}
}
}
}
movieClip 41 {
frame 1 {
stop();
}
}
instance laser of movieClip 41 {
onClipEvent (load) {
laserMoveSpeed = 10;
this._x = _root.spaceship._x;
this._y = _root.spaceship._y - 10;
}
onClipEvent (enterFrame) {
if (this._name != 'laser') {
this._y -= laserMoveSpeed;
if (this._y < 0) {
--_root.spaceship.laserCounter;
this.removeMovieClip();
}
if (this._currentframe == this._totalframes) {
--_root.spaceship.laserCounter;
this.removeMovieClip();
}
maxspace = 8;
j = 1;
while (j < 7) {
i = 0;
while (i < maxspace) {
if (this.hitTest(_root[j + 'space' + i])) {
tellTarget ('this') {
gotoAndPlay(2);
}
}
++i;
}
++j;
}
}
}
}
button 42 {
on (release) {
_visible = 0;
_parent.gotoAndPlay(1);
}
}
movieClip 44 {
}
instance computer of movieClip 44 {
onClipEvent (load) {
_visible = false;
total = _parent.colspace * _parent.maxspace;
laserCounter = 1;
maxLasers = 10;
depthCounter = 1;
}
onClipEvent (enterFrame) {
if (this.total == 0) {
_visible = true;
}
if (maxLasers >= laserCounter) {
++laserCounter;
_root.shot.duplicateMovieClip('shot' + depthCounter, depthCounter + 1200);
++depthCounter;
if (maxLasers < depthCounter) {
depthCounter = 1;
}
}
}
}
movieClip 46 {
frame 1 {
stop();
}
frame 2 {
play();
}
frame 4 {
--_root.computer.total;
_root.points += 20;
this.removeMovieClip();
stop();
}
}
instance 3space of movieClip 46 {
onClipEvent (load) {
_parent.ListeSpaces.push(_name);
speed = 2;
dir = 1;
distance = 0;
SpaceDead = false;
}
onClipEvent (enterFrame) {
i = 1;
while (_root.spaceship.maxLasers >= i) {
if (this.hitTest(_root['laser' + i])) {
this.gotoAndPlay(2);
SpaceDead = true;
}
++i;
}
if (SpaceDead == false) {
this._x += speed * dir;
++distance;
if (30 < distance) {
distance = 0;
dir *= -1;
}
if (random(48) == 3) {
_root.computer.x = this._x;
_root.computer.y = this._y;
_root.computer.h = this._height;
}
}
}
}
instance 1space of movieClip 46 {
onClipEvent (load) {
_parent.ListeSpaces.push(_name);
speed = 2;
dir = 1;
distance = 0;
SpaceDead = false;
}
onClipEvent (enterFrame) {
i = 1;
while (_root.spaceship.maxLasers >= i) {
if (this.hitTest(_root['laser' + i])) {
this.gotoAndPlay(2);
SpaceDead = true;
}
++i;
}
if (SpaceDead == false) {
this._x += speed * dir;
++distance;
if (30 < distance) {
distance = 0;
dir *= -1;
}
if (random(48) == 1) {
_root.computer.x = this._x;
_root.computer.y = this._y;
_root.computer.h = this._height;
}
}
}
}
instance 2space of movieClip 46 {
onClipEvent (load) {
_parent.ListeSpaces.push(_name);
speed = 2;
dir = 1;
distance = 0;
SpaceDead = false;
}
onClipEvent (enterFrame) {
i = 1;
while (_root.spaceship.maxLasers >= i) {
if (this.hitTest(_root['laser' + i])) {
this.gotoAndPlay(2);
SpaceDead = true;
}
++i;
}
if (280 < _y) {
_parent.FuncGameOver();
}
if (SpaceDead == false) {
this._x += speed * dir;
++distance;
if (30 < distance) {
distance = 0;
dir *= -1;
}
if (random(48) == 2) {
_root.computer.x = this._x;
_root.computer.y = this._y;
_root.computer.h = this._height;
}
}
}
}
instance shot of movieClip 41 {
onClipEvent (load) {
laserMoveSpeed = 2;
this._x = _root.computer.x;
this._y = _root.computer.y + _root.computer.h;
if (this._name != 'shot') {
this._visible = true;
} else {
this._visible = false;
}
}
onClipEvent (enterFrame) {
if (this._name != 'shot') {
this._y += laserMoveSpeed;
if (300 < this._y) {
--_root.computer.laserCounter;
this.removeMovieClip();
}
if (this._currentframe == this._totalframes) {
--_root.computer.laserCounter;
this.removeMovieClip();
}
if (this.hitTest(_root.spaceship)) {
tellTarget ('this') {
gotoAndPlay(2);
}
_root.spaceship.gotoAndPlay(2);
}
}
}
}
movieClip 47 {
frame 1 {
play();
}
frame 15 {
i = 1;
while (_parent.ListeSpaces.length >= i) {
var KelSpace = _parent.ListeSpaces[i];
_parent[KelSpace]._y += 2;
++i;
}
}
}