Frame 1
_root.stop();
this._quality = "HIGH";
this._x = 0;
this._y = 0;
var lengthBoundLeft = 130;
var lengthBoundRight = 768;
var heightBoundTop = 130;
var heightBoundBottom = 450;
stageBoundry = function (name) {
var _local1 = name;
if (_local1._x <= lengthBoundLeft) {
_local1._x = lengthBoundLeft;
}
if (_local1._x >= lengthBoundRight) {
_local1._x = lengthBoundRight;
}
if (_local1._y <= heightBoundTop) {
_local1._y = heightBoundTop;
}
if (_local1._y >= heightBoundBottom) {
_local1._y = heightBoundBottom;
}
};
_root.createEmptyMovieClip("start", 97);
_root.createEmptyMovieClip("backgroundLayer", 1);
_root.createEmptyMovieClip("foregroundLayer", 114);
_root.createEmptyMovieClip("terrainLayer", 3);
_root.createEmptyMovieClip("projectileLayer", 99);
_root.createEmptyMovieClip("enemyLayer", 98);
_root.createEmptyMovieClip("enemyprojectileLayer", 96);
_root.createEmptyMovieClip("lifeBar", 2);
_root.createEmptyMovieClip("powerupLayer", 101);
_root.createEmptyMovieClip("bossLayer", 95);
_root.createEmptyMovieClip("bossLifeBar", 104);
_root.createEmptyMovieClip("bossprojectileLayer", 93);
_root.createEmptyMovieClip("textLayer", 115);
deadW.swapDepths(100);
setup = function () {
hitPoints_txt.text = "Hit Points";
projectileCount = 0;
fireRate = 10;
score = 0;
lives = 10;
level = "Thrion: Forest Planet";
score_txt.text = score;
lives_txt.text = lives;
level_txt.text = level;
lifeBar.attachMovie("lifeBar", "lifeBar", 2);
lifeBar._x = lengthBoundLeft + 450;
lifeBar._y = heightBoundTop - 60;
lifeBar._xscale = lives * 15;
weaponType = 0;
deadW._visible = true;
deadW._x = 135;
deadW._y = 250;
deadW.Speed = 10;
deadW.Weapon = ["bullet", "laser", "laser2", "laser3", "wave", "wave2", "wave3"];
speed1_txt.text = "Speed";
speed2_txt.text = deadW.Speed;
enemyCount = 0;
enemyTime = 0;
enemyRate = 30;
thisEnemy = ["asteroid", "enemy1", "enemy2", "enemy3", "enemybullet", "boss1"];
enemyNumber = 0;
enemyForward();
shotCount = 0;
bossFight = false;
bossAttack = 0;
powerupCount = 0;
powerupRate = 30;
bgScroll(0, 100, 2);
terrainScroll(0, 100, 5.5);
foregroundScroll(0, 100, 6);
snd = 100;
bulletSfx = new Sound();
bulletSfx.attachSound("sfxbullet2");
bulletSfx.setVolume(snd);
powerupSfx = new Sound();
powerupSfx.attachSound("sfxpow");
explodeSfx = new Sound();
explodeSfx.attachSound("sfxexplode");
bossdieSfx = new Sound();
bossdieSfx.attachSound("sfxbossdie");
warningSfx = new Sound();
warningSfx.attachSound("sfxwarning");
shipdieSfx = new Sound();
shipdieSfx.attachSound("sfxdeadW");
winSfx = new Sound();
winSfx.attachSound("winSfx");
};
winScroll = function () {
var _local1 = this;
winSfx.start(0, 1);
backgroundLayer.attachMovie("winScreen", "bg", 1);
backgroundLayer._x = 0;
backgroundLayer._y = 300;
scrollXBg = 2;
scrollY = ySpeed;
backgroundLayer.onEnterFrame = function () {
var _local1 = this;
bulletSfx.setVolume(snd);
snd--;
if (snd <= 0) {
snd = 0;
}
_local1._x--;
_local1._alpha++;
if (_local1._x <= -768) {
_local1._x = 0;
}
};
};
bgScroll = function (xLoc, yLoc, xSpeed) {
var _local1 = this;
backgroundLayer.attachMovie("bg_skyLayer", "bg", 1);
backgroundLayer._x = xLoc;
backgroundLayer._y = yLoc;
scrollXBg = xSpeed;
backgroundLayer.onEnterFrame = function () {
var _local1 = this;
_local1._x = _local1._x - scrollXBg;
if (_local1._x <= -5000) {
scrollXBg = 1;
}
if (_local1._x <= -8000) {
scrollXBg = 0;
}
};
};
terrainScroll = function (xLoc, yLoc, xSpeed) {
var _local1 = this;
terrainLayer._x = xLoc;
terrainLayer._y = yLoc;
scrollXTer = xSpeed;
terrainLayer.attachMovie("bg_midLayer", "tp", 3);
terrainLayer.onEnterFrame = function () {
var _local1 = this;
_local1._x = _local1._x - scrollXTer;
if (_local1._x <= -15000) {
_local1.removeMovieClip;
}
};
};
foregroundScroll = function (xLoc, yLoc, xSpeed) {
var _local1 = this;
foregroundLayer.attachMovie("bg_frontLayer", "tf", 4);
foregroundLayer._x = xLoc;
foregroundLayer._y = yLoc;
scrollXFor = xSpeed;
foregroundLayer.onEnterFrame = function () {
var _local1 = this;
_local1._x = _local1._x - scrollXFor;
if (_local1._x <= -8800) {
_local1.swapDepths(4);
}
if (_local1._x <= -15000) {
_local1.removeMovieClip;
}
};
};
deadW._visible = false;
deadW.onEnterFrame = function () {
var _local1 = this;
_root._x = 0;
_root._y = 0;
start.attachMovie("startButton", "startButton", 100);
start._x = lengthBoundRight / 2;
start._y = heightBoundBottom / 2;
start.onPress = function () {
start._visible = false;
setup();
};
if (Key.isDown(38)) {
_local1._y = _local1._y - deadW.Speed;
}
if (Key.isDown(40)) {
_local1._y = _local1._y + deadW.Speed;
}
if (Key.isDown(37)) {
_local1._x = _local1._x - deadW.Speed;
}
if (Key.isDown(39)) {
_local1._x = _local1._x + deadW.Speed;
}
if (foregroundLayer._x == -9600) {
warningSfx.start(0, 1);
loadBoss(lengthBoundRight - 100, heightBoundTop + 200, 15, 7);
}
if (Key.isDown(Key.Space) && (fireRate < 1)) {
createProjectile(deadW.Weapon[weaponType], _local1._x + 4, _local1._y, 20, 0);
}
fireRate++;
fireRate = fireRate % 6;
stageBoundry(deadW);
sx = (Math.random() * 100) + 80;
rndy = Math.floor(Math.random() * 3);
if (bossFight == false) {
if ((enemyTime == 0) && (deadW._visible == true)) {
if (rndy > 1) {
rndy = rndy * -1;
}
if (score < 35) {
enemyNumber = 0;
}
if (score >= 70) {
enemyNumber = 1;
}
if (score >= 105) {
enemyNumber = 2;
}
if (score >= 140) {
enemyNumber = 3;
enemyReverse();
}
if (score >= 175) {
enemyForward();
enemyNumber = 1;
}
if (score >= 210) {
enemyNumber = 2;
}
createEnemy(thisEnemy[enemyNumber], enemy1Xpos, sx + 100, rndy, sx / 20);
createEnemy(thisEnemy[enemyNumber], enemy2Xpos, sx + 200, rndy, sx / 20);
createEnemy(thisEnemy[enemyNumber], enemy3Xpos, sx + 300, rndy, sx / 20);
}
enemyTime++;
enemyTime = enemyTime % 45;
}
};
enemyForward = function () {
enemy1Xpos = lengthBoundRight - 50;
enemy2Xpos = lengthBoundRight + 50;
enemy3Xpos = lengthBoundRight + 100;
};
enemyReverse = function () {
enemy1Xpos = lengthBoundLeft - 50;
enemy2Xpos = lengthBoundLeft - 85;
enemy3Xpos = lengthBoundLeft - 120;
};
createProjectile = function (type, x, y, dx, dy) {
var _local2 = this;
probability = Math.floor(Math.random() * 100);
var nm = ("proj" + projectileCount);
projectileLayer.attachMovie(type, nm, projectileCount);
projectileLayer[nm]._x = x;
projectileLayer[nm]._y = y;
projectileLayer[nm].dx = dx;
projectileLayer[nm].dy = dy;
bulletSfx.start(0, 1);
projectileLayer[nm].onEnterFrame = function () {
var _local2 = this;
_local2._x = _local2._x + _local2.dx;
_local2._y = _local2._y + _local2.dy;
if (_local2._x > lengthBoundRight) {
_local2.removeMovieClip();
}
var _local3 = 0;
while (_local3 < 10) {
var _local1 = "enemy" + _local3;
if (_local2.hitTest(enemyLayer[_local1]) && (enemyLayer[_local1]._currentFrame == 1)) {
if (probability >= 85) {
callPowerup(5, lengthBoundLeft + 320, heightBoundTop - 300);
}
enemyLayer[_local1].play();
explodeSfx.start(0, 1);
enemyLayer[_local1].attachMovie("explosion", "exp", 80);
score++;
score_txt.text = score;
_local2.removeMovieClip();
}
if (_local2.hitTest(bossLayer)) {
bossLayer.attachMovie("explosion", "exp", 80);
_local2.removeMovieClip();
}
_local3++;
}
};
projectileCount++;
projectileCount = projectileCount % 5;
};
createEnemy = function (type, x, y, dy, asMov) {
var _local1 = this;
var _local2 = "enemy" + enemyCount;
enemyLayer.attachMovie(type, _local2, enemyCount);
enemyLayer[_local2]._x = x;
enemyLayer[_local2]._y = y;
enemyLayer[_local2].dy = dy;
enemyLayer[_local2].mov = asMov;
enemyLayer[_local2].onEnterFrame = function () {
var _local1 = this;
if (enemyNumber == 0) {
enemyTime = enemyTime % 25;
_local1._rotation++;
_local1._x = _local1._x - (10 + _local1.mov);
_local1._y = _local1._y + _local1.dy;
}
if (enemyNumber == 1) {
enemyTime = enemyTime % 8;
_local1._x = _local1._x - (25 + _local1.mov);
_local1._y = _local1._y + _local1.dy;
}
if (enemyNumber == 2) {
enemyTime = enemyTime % 35;
_local1._x = _local1._x - (13 + _local1.mov);
_local1._y = _local1._y + _local1.dy;
if (enemyTime <= 10) {
enemyProjectile(thisEnemy[4], _local1._x, _local1._y, 35, 0);
}
}
if (enemyNumber == 3) {
enemyTime = enemyTime % 25;
_local1._x = _local1._x + (5 + _local1.mov);
_local1._y = _local1._y + _local1.dy;
}
if ((_local1._currentframe == 1) && (_local1.hitTest(deadW._x, deadW._y, true))) {
lifeCheck();
_local1.removeMovieClip();
}
if (((_local1._x < (lengthBoundLeft - 130)) || (_local1._y < heightBoundTop)) || (_local1._y >= (heightBoundBottom + 100))) {
_local1.removeMovieClip();
}
};
enemyCount++;
enemyCount = enemyCount % 10;
};
callPowerup = function (frame, xLine, yLine) {
var _local1 = this;
var _local2 = "pwrup" + powerupCount;
powerupLayer.attachMovie("powerUp", _local2, powerupCount);
myPower = Math.floor(Math.random() * frame) + 1;
powerupLayer[_local2]._x = xLine;
powerupLayer[_local2].xBar = xLine;
powerupLayer[_local2]._y = yLine;
powerupLayer[_local2].dy = (Math.random() * 3) + 10;
powerupLayer[_local2].t = Math.random() * 12.56;
powerupLayer[_local2].onEnterFrame = function () {
var _local1 = this;
_local1._x = _local1.xBar + (Math.sin(_local1.t) * 200);
_local1._y = _local1._y + _local1.dy;
_local1.t = _local1.t + 0.1;
textLayer._x = deadW._x - 25;
textLayer._y = deadW._y - 30;
_local1.gotoAndStop(myPower);
if ((myPower == 1) && (_local1.hitTest(deadW))) {
textLayer.attachMovie("txt_speedup", "txt", 115);
deadW.Speed = deadW.Speed + 2;
if (deadW.Speed >= 22) {
deadW.Speed = 10;
}
speed2_txt.text = deadW.Speed;
score = score + 10;
score_txt.text = score;
powerupSfx.start(0, 1);
_local1.removeMovieClip();
}
if ((myPower == 2) && (_local1.hitTest(deadW))) {
textLayer.attachMovie("txt_wave", "txt", 115);
score = score + 10;
score_txt.text = score;
if (weaponType == 4) {
bulletSfx.attachSound("sfxwave2");
weaponType = 5;
weaponStrength = 0.5;
} else if (weaponType == 5) {
weaponType = 6;
weaponStrength = 1;
} else {
bulletSfx.attachSound("sfxwave1");
weaponType = 4;
weaponStrength = 0.25;
}
deadW.Weapon[weaponType];
status_txt.text = deadW.Weapon[weaponType];
powerupSfx.start(0, 1);
_local1.removeMovieClip();
}
if ((myPower == 3) && (_local1.hitTest(deadW))) {
textLayer.attachMovie("txt_lifeup", "txt", 115);
score = score + 10;
score_txt.text = score;
lives = lives + 3;
if (lives >= 10) {
lives = 10;
}
lives_txt.text = lives;
lifeBar._xscale = lives * 15;
powerupSfx.start(0, 1);
_local1.removeMovieClip();
}
if ((myPower == 4) && (_local1.hitTest(deadW))) {
textLayer.attachMovie("txt_laser", "txt", 115);
score = score + 10;
score_txt.text = score;
if (weaponType == 1) {
weaponType = 2;
weaponStrength = 0.5;
} else if (weaponType == 2) {
weaponType = 3;
weaponStrength = 0.1;
} else {
weaponType = 1;
weaponStrength = 0.25;
}
deadW.Weapon[weaponType];
status_txt.text = deadW.Weapon[weaponType];
bulletSfx.attachSound("sfxlaser");
powerupSfx.start(0, 1);
_local1.removeMovieClip();
}
if ((myPower == 5) && (_local1.hitTest(deadW))) {
textLayer.attachMovie("txt_20points", "txt", 115);
score = score + 20;
score_txt.text = score;
powerupSfx.start(0, 1);
_local1.removeMovieClip();
}
if ((_local1._x < (lengthBoundLeft - 130)) || (_local1._y >= heightBoundBottom)) {
_local1.removeMovieClip();
}
};
powerupCount++;
powerupCount = powerupCount % 3;
};
enemyProjectile = function (type, x, y, dx, dy) {
var _local1 = this;
var _local2 = "shot" + shotCount;
enemyprojectileLayer.attachMovie(type, _local2, shotCount);
enemyprojectileLayer[_local2]._x = x;
enemyprojectileLayer[_local2]._y = y;
enemyprojectileLayer[_local2].dx = dx;
enemyprojectileLayer[_local2].dy = dy;
enemyprojectileLayer[_local2].onEnterFrame = function () {
var _local1 = this;
_local1._x = _local1._x - _local1.dx;
_local1._y = _local1._y - _local1.dy;
if (_local1._x <= (lengthBoundLeft - 130)) {
_local1.removeMovieClip;
}
if ((_local1._currentframe == 1) && (_local1.hitTest(deadW))) {
_local1.play();
_local1.removeMovieClip();
lifeCheck();
}
};
shotCount++;
shotCount = shotCount % 3;
};
lifeCheck = function () {
var _local1 = _root;
lives = lives - 0.5;
lives_txt.text = lives;
lifeBar._xscale = lives * 15;
deadW.attachMovie("explosion", "exp", 80);
if (lives <= 0) {
shipdieSfx.start(0, 1);
deadW.play();
deadW.attachMovie("explosion", "exp", 80);
_local1.gotoAndStop(2);
_local1.removeMovieClip();
textLayer.removeMovieClip();
terrainLayer.removeMovieClip();
powerupLayer.removeMovieClip();
foregroundLayer.removeMovieClip();
enemyLayer.removeMovieClip();
bossLayer.removeMovieClip();
bossLifebar.removeMovieClip();
projectileLayer.removeMovieClip();
enemyprojectileLayer.removeMovieClip();
backgroundLayer.removeMovieClip();
lifebar.removeMovieClip();
deadW.removeMovieClip();
Mouse.show();
_local1.onMouseDown = function () {
_root.gotoAndStop(1);
};
}
};
winCheck = function () {
winSfx.start(0, 1);
bossdieSfx.start(0, 1);
backgroundLayer._alpha = 0;
_root.gotoAndStop(3);
_root.removeMovieClip();
textLayer.removeMovieClip();
terrainLayer.removeMovieClip();
powerupLayer.removeMovieClip();
foregroundLayer.removeMovieClip();
enemyLayer.removeMovieClip();
bossLayer.removeMovieClip();
bossLifebar.removeMovieClip();
projectileLayer.removeMovieClip();
enemyprojectileLayer.removeMovieClip();
lifebar.removeMovieClip();
winScroll();
};
loadBoss = function (xPos, yPos, xMov, yMov) {
var _local1 = this;
enemyForward();
bossFight = true;
bossDefeat = false;
bossLife = 200;
bossLayer._x = xPos;
bossLayer._y = yPos;
bossLayer.bx = xMov;
bossLayer.by = yMov;
bossLifeBar.attachMovie("lifeBar", "bss_LB", 104);
bossLifeBar._x = lengthBoundLeft + 50;
bossLifeBar._y = heightBoundTop - 10;
bossLayer.attachMovie("boss1", "bss", 90);
bossLayer.onEnterFrame = function () {
var _local1 = this;
if ((bossLife <= 0) && (bossAttack == 14)) {
_local1.attachMovie("boss2", "bss", 91);
bossdieSfx.start(0, 1);
bossDefeat = true;
}
bossLifeBar._xscale = bossLife * 2;
_local1._x = _local1._x - _local1.bx;
_local1._y = _local1._y + _local1.by;
if (bossAttack == 0) {
enemyNumber = 1;
enemyProjectile(thisEnemy[4], _local1._x, _local1._y, 25, 0);
createEnemy(thisEnemy[enemyNumber], enemy1Xpos, sx + 100, rndy * 4, -rndy);
createEnemy(thisEnemy[enemyNumber], enemy2Xpos, sx + 300, rndy * -4, -rndy);
if (bossLife <= 9) {
textLayer._x = lengthBoundLeft + 300;
textLayer._y = heightBoundTop + 20;
textLayer.attachMovie("FinishHim", "txt", 115);
}
}
if (_local1._x < 200) {
_local1.bx = _local1.bx * -1;
}
if (_local1._x >= (lengthBoundRight - 100)) {
_local1.bx = _local1.bx * -1;
}
if (_local1._y <= (heightBoundTop + 50)) {
_local1.by = _local1.by * -1;
}
if (_local1._y >= heightBoundBottom) {
_local1.by = _local1.by * -1;
}
if (bossDefeat == true) {
bossAttack = 5;
backgroundLayer._alpha = backgroundLayer._alpha - 2;
foregroundLayer._alpha = foregroundLayer._alpha - 2;
terrainLayer._alpha = terrainLayer._alpha - 2;
textLayer._x = lengthBoundLeft + 300;
textLayer._y = heightBoundTop + 20;
textLayer.attachMovie("GetIt", "txt", 115);
bossLifebar.removeMovieClip();
_local1._rotation = _local1._rotation - 2;
_local1.attachMovie("Blade", "Blade", 90);
if (_local1.hitTest(deadW)) {
winSfx.start(0, 1);
winCheck();
}
} else {
if (_local1.hitTest(projectileLayer)) {
bossLife = bossLife - (1 + weaponStrength);
}
if (_local1.hitTest(deadW)) {
lifeCheck();
}
bossAttack++;
bossAttack = bossAttack % 15;
}
};
};
Frame 2
score_txt.text = "score " + score;
Instance of Symbol 191 MovieClip in Frame 2
on (release) {
stopAllSounds();
}
Frame 3
stop();
Symbol 26 MovieClip Frame 1
_root.stop();
PercentLoaded = (_root.getBytesLoaded() / _root.getBytesTotal()) * 100;
if (PercentLoaded != 100) {
setProperty(bar, _xscale , PercentLoaded);
} else {
gotoAndStop ("loaded");
}
Symbol 26 MovieClip Frame 2
gotoAndPlay (1);
Symbol 61 MovieClip [powerUp] Frame 1
stop();
Symbol 61 MovieClip [powerUp] Frame 2
stop();
Symbol 61 MovieClip [powerUp] Frame 3
stop();
Symbol 61 MovieClip [powerUp] Frame 4
stop();
Symbol 61 MovieClip [powerUp] Frame 5
stop();
Symbol 65 MovieClip [enemy1] Frame 1
stop();
Symbol 65 MovieClip [enemy1] Frame 5
this.removeMovieClip();
Symbol 71 MovieClip [explosion] Frame 21
this.removeMovieClip();
Symbol 75 MovieClip [enemy2] Frame 1
stop();
Symbol 75 MovieClip [enemy2] Frame 5
this.removeMovieClip();
Symbol 82 MovieClip [asteroid] Frame 1
stop();
Symbol 82 MovieClip [asteroid] Frame 6
this.removeMovieClip();
Symbol 101 MovieClip [enemybullet] Frame 1
stop();
Symbol 101 MovieClip [enemybullet] Frame 7
this.removeMovieClip;
Symbol 116 MovieClip [enemy3] Frame 1
stop();
Symbol 116 MovieClip [enemy3] Frame 5
this.removeMovieClip();
Symbol 122 MovieClip [txt_20points] Frame 10
this.removeMovieClip();
Symbol 125 MovieClip [txt_speedup] Frame 10
this.removeMovieClip();
Symbol 128 MovieClip [txt_lifeup] Frame 10
this.removeMovieClip();
Symbol 131 MovieClip [txt_wave] Frame 10
this.removeMovieClip();
Symbol 134 MovieClip [txt_laser] Frame 10
this.removeMovieClip();
Symbol 149 MovieClip Frame 7
play();
Symbol 152 MovieClip [Dead Wing] Frame 1
stop();
Symbol 152 MovieClip [Dead Wing] Frame 32
this._visible = false;