Frame 1
percent = Math.floor((getBytesLoaded() / getBytesTotal()) * 100);
percenttext.text = percent + "%";
loaderbar._xscale = (getBytesLoaded() / getBytesTotal()) * 100;
spinner._rotation = spinner._rotation + ((getBytesLoaded() / getBytesTotal()) * 100);
Instance of Symbol 13 MovieClip "loaderbar" in Frame 1
onClipEvent (enterFrame) {
loaderbar._xscale = _root.bytesLoaded / _root.bytesTotal;
}
Frame 2
if (percent == 100) {
gotoAndPlay (3);
} else {
gotoAndPlay (1);
}
Frame 13
stop();
Frame 16
var soundon = 1;
var soundtext = "on";
var qualif = "high";
var nopower = 0;
var noptext = "off";
var shrink = 0;
var shrinktext = "off";
var trans = 0;
var transtext = "off";
var TwoP = 0;
var TwoPtext = "off";
var musvol = 100;
Frame 17
if (_root.soundon == 1) {
menusong = new Sound();
menusong.attachSound("menusong");
menusong.setVolume(musvol);
menusong.start(0, 100);
}
stop();
Instance of Symbol 98 MovieClip "volslide" in Frame 19
onClipEvent (load) {
_parent.volslide.volbar._x = -100 + (_root.musvol * 2);
}
onClipEvent (enterFrame) {
_root.musvol = (_parent.volslide.volbar._x / 2) + 50;
_parent.menusong.setVolume(_root.musvol);
}
Frame 20
if (_root.soundon == 1) {
duelsong = new Sound();
duelsong.attachSound("duelsong");
duelsong.setVolume(musvol);
duelsong.start(0, 100);
}
var redhealth = 20;
var bluehealth = 20;
if (_root.shrink == 1) {
_root.blueship1._xscale = 50;
_root.redship1._xscale = 50;
_root.blueship1._yscale = 50;
_root.redship1._yscale = 50;
}
Instance of Symbol 130 MovieClip in Frame 20
onClipEvent (enterFrame) {
this._xscale = 5 * _root.bluehealth;
if (_root.bluehealth <= 0) {
this._alpha = 0;
_root.bluehealth = 60;
stopAllSounds();
_root.blueship.gotoAndPlay(4);
}
}
Instance of Symbol 133 MovieClip in Frame 20
onClipEvent (enterFrame) {
this._xscale = 5 * _root.redhealth;
if (_root.redhealth <= 0) {
this._alpha = 0;
_root.redhealth = 60;
stopAllSounds();
_root.redship.gotoAndPlay(4);
}
}
Frame 33
stop();
var bluedeltay = 0;
var bluetext = "+speed";
var redtext = "+speed";
_root.bluetextbox._alpha = 0;
_root.redtextbox._alpha = 0;
var bluespeed = 8;
var redspeed = 8;
var reddeltay = 0;
var bluedeltax = 0;
var reddeltax = 0;
var bluefirst = 0;
var redfirst = 0;
var reddeath = 0;
var bluedeath = 0;
var shotlimred = 4;
var shotlimblue = 4;
var powerchance = 75;
if (_root.shrink == 1) {
_root.blueship._xscale = 50;
_root.redship._xscale = 50;
_root.blueship._yscale = 50;
_root.redship._yscale = 50;
_root.blueshot._xscale = 50;
_root.redshot._xscale = 50;
_root.blueshot._yscale = 50;
_root.redshot._yscale = 50;
var redspeed = 6;
var bluespeed = 6;
}
Instance of Symbol 187 MovieClip "bluetextbox" in Frame 33
onClipEvent (enterFrame) {
if (_root.bluetextbox._alpha >= 0) {
_root.bluetextbox._alpha = _root.bluetextbox._alpha - 3;
}
}
Instance of Symbol 189 MovieClip "redtextbox" in Frame 33
onClipEvent (enterFrame) {
if (_root.redtextbox._alpha > 0) {
_root.redtextbox._alpha = _root.redtextbox._alpha - 3;
}
}
Instance of Symbol 174 MovieClip "redship" in Frame 33
onClipEvent (load) {
shottime = 4;
}
onClipEvent (enterFrame) {
redrotate = this._rotation;
if (_root.reddeltax >= _root.redspeed) {
_root.reddeltax = _root.redspeed;
}
if (_root.reddeltax <= (-_root.redspeed)) {
_root.reddeltax = -_root.redspeed;
}
if (_root.reddeltay >= _root.redspeed) {
_root.reddeltay = _root.redspeed;
}
if (_root.reddeltay <= (-_root.redspeed)) {
_root.reddeltay = -_root.redspeed;
}
if (_root.reddeath == 0) {
if (Key.isDown(83)) {
_root.reddeltay = _root.reddeltay / 1.1;
_root.reddeltax = _root.reddeltax / 1.1;
if (Math.round(_root.reddeltax) == 0) {
_root.reddeltax = 0;
}
if (Math.round(_root.reddeltay) == 0) {
_root.reddeltay = 0;
}
tellTarget (_root.redship) {
gotoAndStop (3);
};
}
}
if (_root.reddeath == 0) {
if (Key.isDown(87)) {
redradian = (_root.redship._rotation * Math.PI) / 180;
_root.reddeltay = _root.reddeltay - (Math.cos(redradian) / 2);
_root.reddeltax = _root.reddeltax + (Math.sin(redradian) / 2);
_root.redship._y = _root.redship._y + _root.reddeltay;
_root.redship._x = _root.redship._x + _root.reddeltax;
tellTarget (_root.redship) {
gotoAndStop (2);
};
} else {
tellTarget (_root.redship) {
gotoAndStop (1);
_root.redship._y = _root.redship._y + _root.reddeltay;
_root.redship._x = _root.redship._x + _root.reddeltax;
};
}
}
if (_root.reddeath == 0) {
if (Key.isDown(65)) {
_root.redship._rotation = _root.redship._rotation - 8;
}
}
if (_root.reddeath == 0) {
if (Key.isDown(68)) {
_root.redship._rotation = _root.redship._rotation + 8;
}
}
if (_root.redship._x < -15) {
_root.redship._x = 615;
}
if (_root.redship._x > 615) {
_root.redship._x = -15;
}
if (_root.redship._y > 615) {
_root.redship._y = -15;
}
if (_root.redship._y < -15) {
_root.redship._y = 615;
}
if (_root.reddeath == 0) {
if (Key.isDown(16)) {
if (shottime == _root.shotlimred) {
_root.redshot.duplicateMovieClip("redshot" + _root.redfirst, _root.redfirst);
_root.redfirst = _root.redfirst + 1;
if (_root.redfirst >= 1000) {
_root.redfirst = 1;
}
shotsound = new Sound();
shotsound.attachSound("shotsound");
shotsound.start();
shottime = 1;
}
}
}
shottime = shottime + 1;
if (shottime >= _root.shotlimred) {
shottime = _root.shotlimred;
}
if (this.hitTest(_root.blueship._x, _root.blueship._y, false)) {
_root.bluehealth = _root.bluehealth - 2;
_root.reddeltay = _root.reddeltay * -1;
_root.reddeltax = _root.reddeltax * -1;
_root.redship._y = _root.redship._y + _root.reddeltay;
_root.redship._x = _root.redship._x + _root.reddeltax;
}
}
Instance of Symbol 178 MovieClip "blueship" in Frame 33
onClipEvent (load) {
shottime = 4;
}
onClipEvent (enterFrame) {
if (_root.TwoP == 1) {
if (_root.bluedeltax >= _root.bluespeed) {
_root.bluedeltax = _root.bluespeed;
}
if (_root.bluedeltax <= (-_root.bluespeed)) {
_root.bluedeltax = -_root.bluespeed;
}
if (_root.bluedeltay >= _root.bluespeed) {
_root.bluedeltay = _root.bluespeed;
}
if (_root.bluedeltay <= (-_root.bluespeed)) {
_root.bluedeltay = -_root.bluespeed;
}
if (_root.bluedeath == 0) {
if (Key.isDown(40)) {
_root.bluedeltay = _root.bluedeltay / 1.1;
_root.bluedeltax = _root.bluedeltax / 1.1;
if (Math.round(_root.bluedeltax) == 0) {
_root.bluedeltax = 0;
}
if (Math.round(_root.bluedeltay) == 0) {
_root.bluedeltay = 0;
}
tellTarget (_root.blueship) {
gotoAndStop (3);
};
}
}
if (_root.bluedeath == 0) {
if (Key.isDown(38)) {
blueradian = (_root.blueship._rotation * Math.PI) / 180;
_root.bluedeltay = _root.bluedeltay - (Math.cos(blueradian) / 2);
_root.bluedeltax = _root.bluedeltax + (Math.sin(blueradian) / 2);
_root.blueship._y = _root.blueship._y + _root.bluedeltay;
_root.blueship._x = _root.blueship._x + _root.bluedeltax;
tellTarget (this) {
gotoAndStop (2);
};
} else {
tellTarget (this) {
gotoAndStop (1);
_root.blueship._y = _root.blueship._y + _root.bluedeltay;
_root.blueship._x = _root.blueship._x + _root.bluedeltax;
};
}
}
if (_root.bluedeath == 0) {
if (Key.isDown(37)) {
_root.blueship._rotation = _root.blueship._rotation - 8;
}
}
if (_root.bluedeath == 0) {
if (Key.isDown(39)) {
_root.blueship._rotation = _root.blueship._rotation + 8;
}
}
if (((_root.bluedeath == 0) && (Key.isDown(32))) && (shottime == _root.shotlimblue)) {
_root.blueshot.duplicateMovieClip("blueshot" + _root.bluefirst, _root.bluefirst);
_root.bluefirst = _root.bluefirst + 1;
if (_root.bluefirst >= 1000) {
_root.bluefirst = 1;
}
shotsound = new Sound();
shotsound.attachSound("shotsound");
shotsound.start();
shottime = 1;
}
shottime = shottime + 1;
if (shottime >= _root.shotlimblue) {
shottime = _root.shotlimblue;
}
}
if ((_root.TwoP == 0) && (_root.bluedeath == 0)) {
if (_root.bluedeltax >= _root.bluespeed) {
_root.bluedeltax = _root.bluespeed;
}
if (_root.bluedeltax <= (-_root.bluespeed)) {
_root.bluedeltax = -_root.bluespeed;
}
if (_root.bluedeltay >= _root.bluespeed) {
_root.bluedeltay = _root.bluespeed;
}
if (_root.bluedeltay <= (-_root.bluespeed)) {
_root.bluedeltay = -_root.bluespeed;
}
Rise = _root.redship._y - this._y;
Run = _root.redship._x - this._x;
Dist = Math.sqrt((Rise * Rise) + (Run * Run));
AngleRad = Math.atan(Rise / Run);
AngleDeg = Math.abs(90 + (AngleRad * 57.2957795130823));
if (Run < 0) {
AngleDeg = -(180 - AngleDeg);
}
AngleDif = this._rotation - AngleDeg;
if (_root.bluedeath == 0) {
if ((this._rotation < AngleDeg) && (AngleDif > -180)) {
this._rotation = this._rotation + 8;
}
if ((this._rotation > AngleDeg) && (AngleDif < 180)) {
this._rotation = this._rotation - 8;
}
if (AngleDif < -180) {
this._rotation = this._rotation - 8;
}
if (AngleDif > 180) {
this._rotation = this._rotation + 8;
}
}
if (_root.bluedeath == 0) {
if (Math.abs(AngleDif) < 30) {
blueradian = (_root.blueship._rotation * Math.PI) / 180;
_root.bluedeltay = _root.bluedeltay - (Math.cos(blueradian) / 2);
_root.bluedeltax = _root.bluedeltax + (Math.sin(blueradian) / 2);
_root.blueship._y = _root.blueship._y + _root.bluedeltay;
_root.blueship._x = _root.blueship._x + _root.bluedeltax;
tellTarget (this) {
gotoAndStop (2);
};
} else {
tellTarget (this) {
gotoAndStop (1);
_root.blueship._y = _root.blueship._y + _root.bluedeltay;
_root.blueship._x = _root.blueship._x + _root.bluedeltax;
};
}
}
if ((Math.abs(AngleDif) > 90) && (_root.bluedeath == 0)) {
_root.bluedeltay = _root.bluedeltay / 1.1;
_root.bluedeltax = _root.bluedeltax / 1.1;
if (Math.round(_root.bluedeltax) == 0) {
_root.bluedeltax = 0;
}
if (Math.round(_root.bluedeltay) == 0) {
_root.bluedeltay = 0;
}
tellTarget (_root.blueship) {
gotoAndStop (3);
};
}
if (((_root.bluedeath == 0) && (Math.abs(AngleDif) < 15)) && (shottime == _root.shotlimblue)) {
_root.blueshot.duplicateMovieClip("blueshot" + _root.bluefirst, _root.bluefirst);
_root.bluefirst = _root.bluefirst + 1;
if (_root.bluefirst >= 1000) {
_root.bluefirst = 1;
}
shotsound = new Sound();
shotsound.attachSound("shotsound");
shotsound.start();
shottime = 1;
}
shottime = shottime + 1;
if (shottime >= _root.shotlimblue) {
shottime = _root.shotlimblue;
}
}
if (_root.blueship._x < -15) {
_root.blueship._x = 615;
}
if (_root.blueship._x > 615) {
_root.blueship._x = -15;
}
if (_root.blueship._y > 615) {
_root.blueship._y = -15;
}
if (_root.blueship._y < -15) {
_root.blueship._y = 615;
}
if (this.hitTest(_root.redship._x, _root.redship._y, false)) {
_root.redhealth = _root.redhealth - 2;
_root.bluedeltay = _root.bluedeltay * -1;
_root.bluedeltax = _root.bluedeltax * -1;
_root.blueship._y = _root.blueship._y + _root.bluedeltay;
_root.blueship._x = _root.blueship._x + _root.bluedeltax;
}
}
Instance of Symbol 202 MovieClip in Frame 33
onClipEvent (enterFrame) {
if (_root.nopower == 0) {
chance = Math.round(Math.random() * 600);
}
if (chance == _root.powerchance) {
this._x = Math.random() * 600;
this._y = Math.random() * 600;
t = 1;
}
if (_root.blueship.hitTest(this._x, this._y, false)) {
this._x = -50;
this._y = -50;
_root.bluehealth = _root.bluehealth + 5;
if (_root.bluehealth > 20) {
_root.bluehealth = 20;
pickup = new Sound();
pickup.attachSound("pickup");
pickup.start();
_root.bluetext = "+health";
_root.bluetextbox._alpha = 100;
}
}
if (_root.redship.hitTest(this._x, this._y, false)) {
this._x = -50;
this._y = -50;
_root.redhealth = _root.redhealth + 5;
if (_root.redhealth > 20) {
_root.redhealth = 20;
pickup = new Sound();
pickup.attachSound("pickup");
pickup.start();
_root.redtext = "+health";
_root.redtextbox._alpha = 100;
}
}
t = t + 1;
if (t == 150) {
this._x = -50;
this._y = -50;
}
}
Instance of Symbol 215 MovieClip in Frame 33
onClipEvent (enterFrame) {
if (_root.nopower == 0) {
chance = Math.round(Math.random() * 500);
}
if (chance == _root.powerchance) {
this._x = Math.random() * 600;
this._y = Math.random() * 600;
t = 1;
}
if (_root.blueship.hitTest(this._x, this._y, false)) {
this._x = -50;
this._y = -50;
if (_root.shotlimblue != 2) {
_root.shotlimblue = _root.shotlimblue - 1;
pickup = new Sound();
pickup.attachSound("pickup");
pickup.start();
_root.bluetext = "+weapons";
_root.bluetextbox._alpha = 100;
}
}
if (_root.redship.hitTest(this._x, this._y, false)) {
this._x = -50;
this._y = -50;
if (_root.shotlimred != 2) {
_root.shotlimred = _root.shotlimred - 1;
pickup = new Sound();
pickup.attachSound("pickup");
pickup.start();
_root.redtext = "+weapons";
_root.redtextbox._alpha = 100;
}
}
t = t + 1;
if (t == 150) {
this._x = -50;
this._y = -50;
}
}
Instance of Symbol 228 MovieClip in Frame 33
onClipEvent (enterFrame) {
if (_root.nopower == 0) {
chance = Math.round(Math.random() * 500);
}
if (chance == _root.powerchance) {
this._x = Math.random() * 600;
this._y = Math.random() * 600;
t = 1;
}
if (_root.blueship.hitTest(this._x, this._y, false)) {
this._x = -50;
this._y = -50;
_root.bluespeed = _root.bluespeed + 4;
pickup = new Sound();
pickup.attachSound("pickup");
pickup.start();
_root.bluetext = "+speed";
_root.bluetextbox._alpha = 100;
}
if (_root.redship.hitTest(this._x, this._y, false)) {
this._x = -50;
this._y = -50;
_root.redspeed = _root.redspeed + 4;
pickup = new Sound();
pickup.attachSound("pickup");
pickup.start();
_root.redtext = "+speed";
_root.redtextbox._alpha = 100;
}
t = t + 1;
if (t == 150) {
this._x = -50;
this._y = -50;
}
}
Instance of Symbol 231 MovieClip "redshot" in Frame 33
onClipEvent (load) {
if (_root.redfirst != 0) {
this._rotation = _root.redship._rotation;
shotradian = (this._rotation * Math.PI) / 180;
this._x = _root.redship._x;
this._y = _root.redship._y;
}
t = 0;
}
onClipEvent (enterFrame) {
t = t + 1;
if (t == 35) {
this.removeMovieClip();
}
this._y = this._y - (Math.cos(shotradian) * 12);
this._x = this._x + (Math.sin(shotradian) * 12);
if (this.hitTest(_root.blueship._x, _root.blueship._y, false) == true) {
if (_root.bluedeath == 0) {
_root.bluehealth = _root.bluehealth - 1;
hitsound = new Sound();
hitsound.attachSound("hitsound");
hitsound.start();
this.removeMovieClip();
}
}
if (this._name != "redshot") {
if (this._x < -15) {
this._x = 615;
}
if (this._y < -15) {
this._y = 615;
}
if (this._x > 615) {
this._x = -15;
}
if (this._y > 615) {
this._y = -15;
}
}
}
Instance of Symbol 232 MovieClip "blueshot" in Frame 33
onClipEvent (load) {
if (_root.bluefirst != 0) {
this._rotation = _root.blueship._rotation;
shotradian = (this._rotation * Math.PI) / 180;
this._x = _root.blueship._x;
this._y = _root.blueship._y;
}
t = 0;
}
onClipEvent (enterFrame) {
t = t + 1;
if (t == 35) {
this.removeMovieClip();
}
this._y = this._y - (Math.cos(shotradian) * 12);
this._x = this._x + (Math.sin(shotradian) * 12);
if (this.hitTest(_root.redship._x, _root.redship._y, false) == true) {
if (_root.reddeath == 0) {
_root.redhealth = _root.redhealth - 1;
hitsound = new Sound();
hitsound.attachSound("hitsound");
hitsound.start();
this.removeMovieClip();
}
}
if (this._name != "blueshot") {
if (this._x < -15) {
this._x = 615;
}
if (this._y < -15) {
this._y = 615;
}
if (this._x > 615) {
this._x = -15;
}
if (this._y > 615) {
this._y = -15;
}
}
}
Frame 34
if (_root.soundon == 1) {
victory = new Sound();
victory.attachSound("victory");
victory.start();
}
Frame 45
stop();
Frame 46
if (_root.soundon == 1) {
victory = new Sound();
victory.attachSound("victory");
victory.start();
}
Frame 57
stop();
Symbol 27 Button
on (release) {
gotoAndPlay (14);
}
Symbol 35 Button
on (release) {
gotoAndStop (19);
}
Symbol 38 Button
on (release) {
gotoAndStop (18);
}
Symbol 40 Button
on (release) {
stopAllSounds();
gotoAndPlay (20);
}
Symbol 45 MovieClip Frame 3
gotoAndPlay (1);
Symbol 50 MovieClip Frame 3
gotoAndPlay (1);
Symbol 65 MovieClip Frame 1
stop();
Symbol 74 Button
on (release) {
stopAllSounds();
gotoAndStop (17);
}
Symbol 94 Button
on (release) {
if (_root.TwoP == 0) {
_root.TwoP = 2;
_root.TwoPtext = "on";
}
if (_root.TwoP == 1) {
_root.TwoP = 0;
_root.TwoPtext = "off";
}
if (_root.TwoP == 2) {
_root.TwoP = 1;
}
}
Symbol 96 Button
on (press) {
startDrag (_parent.volslide.volbar, false, -100, 0, 100, 0);
}
on (release, dragOut) {
stopDrag();
}
Symbol 102 Button
on (release) {
if (_root.shrink == 0) {
_root.shrink = 2;
_root.shrinktext = "on";
}
if (_root.shrink == 1) {
_root.shrink = 0;
_root.shrinktext = "off";
}
if (_root.shrink == 2) {
_root.shrink = 1;
}
}
Symbol 107 Button
on (release) {
if (_root.nopower == 0) {
_root.nopower = 2;
_root.noptext = "on";
}
if (_root.nopower == 1) {
_root.nopower = 0;
_root.noptext = "off";
}
if (_root.nopower == 2) {
_root.nopower = 1;
}
}
Symbol 111 Button
on (release) {
_root.backg.gotoAndStop(6);
}
Symbol 113 Button
on (release) {
_root.backg.gotoAndStop(5);
}
Symbol 115 Button
on (release) {
_root.backg.gotoAndStop(4);
}
Symbol 117 Button
on (release) {
_root.backg.gotoAndStop(3);
}
Symbol 119 Button
on (release) {
_root.backg.gotoAndStop(2);
}
Symbol 121 Button
on (release) {
_root.backg.gotoAndStop(1);
}
Symbol 123 Button
on (release) {
toggleHighQuality();
if (_root.qualif == "high") {
_root.qualif = "change";
}
if (_root.qualif == "low") {
_root.qualif = "high";
}
if (_root.qualif == "change") {
_root.qualif = "low";
}
}
Symbol 128 Button
on (release) {
if (_root.soundon == 0) {
_root.soundon = 2;
_root.soundtext = "on";
menusong = new Sound();
menusong.attachSound("menusong");
menusong.start(0, 100);
}
if (_root.soundon == 1) {
_root.soundon = 0;
_root.soundtext = "off";
stopAllSounds();
}
if (_root.soundon == 2) {
_root.soundon = 1;
}
}
Symbol 139 MovieClip Frame 3
gotoAndPlay (1);
Symbol 174 MovieClip Frame 1
stop();
Symbol 174 MovieClip Frame 4
_root.reddelatx = 0;
_root.reddelaty = 0;
_root.reddeath = 1;
_root.redship._rotation = 180;
_root.redship.play();
Symbol 174 MovieClip Frame 21
this.stop();
_root.gotoAndPlay(34);
Symbol 177 MovieClip Frame 3
gotoAndPlay (1);
Symbol 178 MovieClip Frame 1
stop();
Symbol 178 MovieClip Frame 4
_root.bluedelatx = 0;
_root.bluedelaty = 0;
_root.bluedeath = 1;
_root.blueship._rotation = 180;
_root.blueship.play;
Symbol 178 MovieClip Frame 21
this.stop();
tellTarget (_root) {
gotoAndPlay (46);
};
Symbol 238 Button
on (release) {
gotoAndStop (17);
}