Section 1
//agame_com_intro_animatie_59 (madsteroids_01_fla.agame_com_intro_animatie_59)
package madsteroids_01_fla {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import flash.ui.*;
import flash.filters.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.geom.*;
import flash.system.*;
public dynamic class agame_com_intro_animatie_59 extends MovieClip {
public function agame_com_intro_animatie_59(){
addFrameScript(88, frame89);
}
function frame89(){
stop();
}
}
}//package madsteroids_01_fla
Section 2
//branding_aligned_center_6 (madsteroids_01_fla.branding_aligned_center_6)
package madsteroids_01_fla {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import flash.ui.*;
import flash.filters.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.geom.*;
import flash.system.*;
public dynamic class branding_aligned_center_6 extends MovieClip {
public function branding_aligned_center_6(){
addFrameScript(0, frame1);
}
function frame1(){
gotoAndStop(language.branding_nr);
}
}
}//package madsteroids_01_fla
Section 3
//enemyIntro_109 (madsteroids_01_fla.enemyIntro_109)
package madsteroids_01_fla {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import flash.ui.*;
import flash.filters.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.geom.*;
import flash.system.*;
public dynamic class enemyIntro_109 extends MovieClip {
public function enemyIntro_109(){
addFrameScript(13, frame14, 48, frame49, 95, frame96);
}
function frame14(){
if (GameEngine.getInstance().getSoundOn()){
Main.getInstance().fStijgopSND.play();
};
}
function frame96(){
stop();
}
function frame49(){
if (GameEngine.getInstance().getSoundOn()){
Main.getInstance().fTiefighterSND.play();
};
}
}
}//package madsteroids_01_fla
Section 4
//ExplosionMovieclip_88 (madsteroids_01_fla.ExplosionMovieclip_88)
package madsteroids_01_fla {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import flash.ui.*;
import flash.filters.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.geom.*;
import flash.system.*;
public dynamic class ExplosionMovieclip_88 extends MovieClip {
public function ExplosionMovieclip_88(){
addFrameScript(15, frame16);
}
function frame16(){
stop();
}
}
}//package madsteroids_01_fla
Section 5
//game_com_cn_intro_animatie_65 (madsteroids_01_fla.game_com_cn_intro_animatie_65)
package madsteroids_01_fla {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import flash.ui.*;
import flash.filters.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.geom.*;
import flash.system.*;
public dynamic class game_com_cn_intro_animatie_65 extends MovieClip {
public function game_com_cn_intro_animatie_65(){
addFrameScript(88, frame89);
}
function frame89(){
stop();
}
}
}//package madsteroids_01_fla
Section 6
//gamesgames_intro_animatie_55 (madsteroids_01_fla.gamesgames_intro_animatie_55)
package madsteroids_01_fla {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import flash.ui.*;
import flash.filters.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.geom.*;
import flash.system.*;
public dynamic class gamesgames_intro_animatie_55 extends MovieClip {
public function gamesgames_intro_animatie_55(){
addFrameScript(89, frame90, 90, frame91);
}
function frame90(){
}
function frame91(){
stop();
}
}
}//package madsteroids_01_fla
Section 7
//girlsgogames_com_intro_animatie_62 (madsteroids_01_fla.girlsgogames_com_intro_animatie_62)
package madsteroids_01_fla {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import flash.ui.*;
import flash.filters.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.geom.*;
import flash.system.*;
public dynamic class girlsgogames_com_intro_animatie_62 extends MovieClip {
public function girlsgogames_com_intro_animatie_62(){
addFrameScript(88, frame89);
}
function frame89(){
stop();
}
}
}//package madsteroids_01_fla
Section 8
//intro_54 (madsteroids_01_fla.intro_54)
package madsteroids_01_fla {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import flash.ui.*;
import flash.filters.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.geom.*;
import flash.system.*;
public dynamic class intro_54 extends MovieClip {
public var hitarea:MovieClip;
public function intro_54(){
addFrameScript(0, frame1);
}
function frame1(){
if (language.portal == "family"){
gotoAndStop(1);
};
if (language.portal == "tweens"){
gotoAndStop(2);
};
if (language.portal == "girl"){
gotoAndStop(3);
};
if (language.portal == "game_com_cn"){
gotoAndStop(4);
};
}
}
}//package madsteroids_01_fla
Section 9
//intro_hitarea_58 (madsteroids_01_fla.intro_hitarea_58)
package madsteroids_01_fla {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import flash.ui.*;
import flash.filters.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.geom.*;
import flash.system.*;
public dynamic class intro_hitarea_58 extends MovieClip {
public var button_intro:SimpleButton;
public function intro_hitarea_58(){
addFrameScript(89, frame90);
}
function frame90(){
stop();
}
}
}//package madsteroids_01_fla
Section 10
//musicnoot_75 (madsteroids_01_fla.musicnoot_75)
package madsteroids_01_fla {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import flash.ui.*;
import flash.filters.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.geom.*;
import flash.system.*;
public dynamic class musicnoot_75 extends MovieClip {
public function musicnoot_75(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package madsteroids_01_fla
Section 11
//shield_101 (madsteroids_01_fla.shield_101)
package madsteroids_01_fla {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import flash.ui.*;
import flash.filters.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.geom.*;
import flash.system.*;
public dynamic class shield_101 extends MovieClip {
public function shield_101(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package madsteroids_01_fla
Section 12
//shipAnim_112 (madsteroids_01_fla.shipAnim_112)
package madsteroids_01_fla {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import flash.ui.*;
import flash.filters.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.geom.*;
import flash.system.*;
public dynamic class shipAnim_112 extends MovieClip {
public function shipAnim_112(){
addFrameScript(14, frame15);
}
function frame15(){
stop();
}
}
}//package madsteroids_01_fla
Section 13
//spaceBackground_1 (madsteroids_01_fla.spaceBackground_1)
package madsteroids_01_fla {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import flash.ui.*;
import flash.filters.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.geom.*;
import flash.system.*;
public dynamic class spaceBackground_1 extends MovieClip {
public function spaceBackground_1(){
addFrameScript(9, frame10);
}
function frame10(){
stop();
}
}
}//package madsteroids_01_fla
Section 14
//spacecraftEnter_97 (madsteroids_01_fla.spacecraftEnter_97)
package madsteroids_01_fla {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import flash.ui.*;
import flash.filters.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.geom.*;
import flash.system.*;
public dynamic class spacecraftEnter_97 extends MovieClip {
public function spacecraftEnter_97(){
addFrameScript(40, frame41);
}
function frame41(){
stop();
}
}
}//package madsteroids_01_fla
Section 15
//spaceCraftMC_100 (madsteroids_01_fla.spaceCraftMC_100)
package madsteroids_01_fla {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import flash.ui.*;
import flash.filters.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.geom.*;
import flash.system.*;
public dynamic class spaceCraftMC_100 extends MovieClip {
public function spaceCraftMC_100(){
addFrameScript(74, frame75);
}
function frame75(){
gotoAndStop(1);
}
}
}//package madsteroids_01_fla
Section 16
//spaceshipExit_99 (madsteroids_01_fla.spaceshipExit_99)
package madsteroids_01_fla {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import flash.ui.*;
import flash.filters.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.geom.*;
import flash.system.*;
public dynamic class spaceshipExit_99 extends MovieClip {
public function spaceshipExit_99(){
addFrameScript(37, frame38);
}
function frame38(){
stop();
}
}
}//package madsteroids_01_fla
Section 17
//startAnim_73 (madsteroids_01_fla.startAnim_73)
package madsteroids_01_fla {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import flash.ui.*;
import flash.filters.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.geom.*;
import flash.system.*;
public dynamic class startAnim_73 extends MovieClip {
public function startAnim_73(){
addFrameScript(0, frame1, 4, frame5, 8, frame9);
}
function frame5(){
stop();
}
function frame9(){
stop();
}
function frame1(){
stop();
}
}
}//package madsteroids_01_fla
Section 18
//text1_5 (madsteroids_01_fla.text1_5)
package madsteroids_01_fla {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import flash.ui.*;
import flash.filters.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.geom.*;
import flash.system.*;
public dynamic class text1_5 extends MovieClip {
public function text1_5(){
addFrameScript(0, frame1);
}
function frame1(){
gotoAndStop(language.language_nr);
}
}
}//package madsteroids_01_fla
Section 19
//Utils (nl.mad.utils.Utils)
package nl.mad.utils {
public class Utils {
public static function random(_arg1:int, _arg2:int=2147483647):int{
if (_arg2 == int.MAX_VALUE){
return (Math.floor((Math.random() * _arg1)));
};
return ((_arg1 + Math.round((Math.random() * (_arg2 - _arg1)))));
}
}
}//package nl.mad.utils
Section 20
//VectorCalc (nl.mad.vector.VectorCalc)
package nl.mad.vector {
public class VectorCalc {
public static function getDist(_arg1, _arg2):Number{
return (Math.sqrt(((_arg1 * _arg1) + (_arg2 * _arg2))));
}
public static function getVectorRot(_arg1, _arg2):Number{
return (((Math.atan2(_arg2, _arg1) * 180) / Math.PI));
}
}
}//package nl.mad.vector
Section 21
//Aimer (Aimer)
package {
import flash.events.*;
import flash.display.*;
import nl.mad.vector.*;
public class Aimer extends MovieClip {
private var fBeam:MovieClip;
private var fMode:String;
private static var fInstance:Aimer = null;
public function Aimer(){
if (fInstance != null){
return;
};
fInstance = this;
fMode = "iddle";
this.x = -100;
this.y = 0;
fBeam = new Beam();
GameEngine.getInstance().fBulletHolder.addChild(fBeam);
fBeam.y = -200;
this.addEventListener(Event.ENTER_FRAME, EnterFrame);
}
public function setAimXY(_arg1, _arg2):void{
this.x = _arg1;
this.y = _arg2;
}
public function setMode(_arg1):void{
fMode = _arg1;
}
private function EnterFrame(_arg1:Event):void{
var _local2:*;
switch (fMode){
case "moving":
_local2 = GameEngine.getInstance().fShip.getXYROT();
fBeam.x = _local2[0];
fBeam.y = _local2[1];
fBeam.rotation = VectorCalc.getVectorRot((this.x - GameEngine.getInstance().fShip.x), (this.y - GameEngine.getInstance().fShip.y));
fBeam.iBeam.width = VectorCalc.getDist((GameEngine.getInstance().fShip.x - this.x), (GameEngine.getInstance().fShip.y - this.y));
break;
};
}
public function kill():void{
this.removeEventListener(Event.ENTER_FRAME, EnterFrame);
GameEngine.getInstance().fBulletHolder.removeChild(this);
}
public static function getInstance():Aimer{
if (fInstance == null){
return (new (Aimer));
};
return (fInstance);
}
}
}//package
Section 22
//Beam (Beam)
package {
import flash.display.*;
public dynamic class Beam extends MovieClip {
public var iBeam:MovieClip;
}
}//package
Section 23
//BigExpl (BigExpl)
package {
import flash.media.*;
public dynamic class BigExpl extends Sound {
}
}//package
Section 24
//BigExpl2 (BigExpl2)
package {
import flash.media.*;
public dynamic class BigExpl2 extends Sound {
}
}//package
Section 25
//BigExpl3 (BigExpl3)
package {
import flash.media.*;
public dynamic class BigExpl3 extends Sound {
}
}//package
Section 26
//BigExpl4 (BigExpl4)
package {
import flash.media.*;
public dynamic class BigExpl4 extends Sound {
}
}//package
Section 27
//Bonus (Bonus)
package {
import flash.events.*;
import flash.display.*;
import nl.mad.utils.*;
import flash.media.*;
public class Bonus extends MovieClip {
private var fSpeed:Number;
private var fShieldupSND:Sound;
private var fWeaponSND:Sound;
private var fGameEngine:MovieClip;
private var fBonusHolder:Sprite;
private var fSpeedupSND:Sound;
private var fStageH:int;
private var fMain:MovieClip;
private var fMode:String;
private var fStageW:int;
public function Bonus(_arg1, _arg2, _arg3, _arg4=0, _arg5=0){
fGameEngine = _arg1;
fSpeed = 1;
fBonusHolder = _arg2;
fMain = _arg3;
fStageW = fGameEngine.gStageW;
fStageH = fGameEngine.gStageH;
fWeaponSND = new WeaponSND();
fSpeedupSND = new SpeedupSND();
fShieldupSND = new ShieldupSND();
if ((((_arg4 == 0)) && ((_arg5 == 0)))){
fMode = "moveRight";
this.x = -40;
this.y = Utils.random(40, (fStageH - 40));
} else {
fMode = "standing";
this.x = _arg4;
this.y = _arg5;
};
this.addEventListener(Event.ENTER_FRAME, EnterFrame);
}
public function kill(_arg1=1):void{
switch (GameEngine.getInstance().getBonusMode()){
case 1:
if (((GameEngine.getInstance().getSoundOn()) && (_arg1))){
fSpeedupSND.play();
GameEngine.getInstance().fClickSND.play();
GameEngine.getInstance().fShip.addSpeed(2);
GameEngine.getInstance().setInfoText("EXTRA SPEED");
};
break;
case 2:
if (((GameEngine.getInstance().getSoundOn()) && (_arg1))){
fWeaponSND.play();
GameEngine.getInstance().fClickSND.play();
GameEngine.getInstance().setInfoText("POWER WEAPON!");
GameEngine.getInstance().setWeaponMode(2);
};
break;
case 3:
if (((GameEngine.getInstance().getSoundOn()) && (_arg1))){
fShieldupSND.play();
GameEngine.getInstance().fClickSND.play();
GameEngine.getInstance().setInfoText("SHIELD UP");
GameEngine.getInstance().fShip.setInvinceTime((8 * 30));
GameEngine.getInstance().fShip.iShield.gotoAndStop(2);
};
break;
};
GameEngine.getInstance().setBonusMode();
this.removeEventListener(Event.ENTER_FRAME, EnterFrame);
fBonusHolder.removeChild(this);
}
private function EnterFrame(_arg1:Event):void{
switch (fMode){
case "moveRight":
this.x = (this.x + fSpeed);
if (this.x > (fStageW + 40)){
kill(0);
};
break;
case "standing":
break;
};
}
}
}//package
Section 28
//Bullet (Bullet)
package {
import flash.events.*;
import flash.display.*;
import nl.mad.vector.*;
import flash.media.*;
public class Bullet extends MovieClip {
private var fOrigXscale:Number;
private var fStraal:Number;
private var fMeteorHolder:Sprite;
private var fShotSND0:Sound;
private var fShotSND1:Sound;
private var fShotSND2:Sound;
private var fActive:Boolean;
private var fStageH:Number;
private var fRot:Number;
private var fBulletHolder:Sprite;
private var fXspeed:Number;
private var fOrigYscale:Number;
private var fStageW:Number;
private var fMode:String;
private var fMeteor:MovieClip;
private var fYspeed:Number;
private var fDepth:Number;
private var fMain:MovieClip;
public function Bullet(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9, _arg10, _arg11=true){
fMain = _arg1;
fStageW = fMain.gStageW;
fStageH = fMain.gStageH;
fMeteorHolder = _arg8;
fMode = "running";
fRot = _arg2;
fActive = true;
fBulletHolder = _arg6;
fStraal = (_arg5 + _arg9);
fXspeed = (fStraal * Math.cos(((fRot * Math.PI) / 180)));
fYspeed = (fStraal * Math.sin(((fRot * Math.PI) / 180)));
var _local12:* = ((_arg7 / 2) + this.width);
var _local13:* = (_local12 * Math.cos(((fRot * Math.PI) / 180)));
var _local14:* = (_local12 * Math.sin(((fRot * Math.PI) / 180)));
this.x = (_arg3 + _local13);
this.y = (_arg4 + _local14);
this.scaleX = _arg10;
this.scaleY = _arg10;
this.rotation = fRot;
this.visible = _arg11;
fShotSND0 = new Shot();
fShotSND1 = new Shot1();
fShotSND2 = new Shot2();
this.addEventListener(Event.ENTER_FRAME, EnterFrame);
}
private function checkCollission():void{
var _local2:*;
var _local1:int;
while (_local1 < fMeteorHolder.numChildren) {
_local2 = fMeteorHolder.getChildAt(_local1);
if (!_local2.fBullet){
if (VectorCalc.getDist((this.x - _local2.x), (this.y - _local2.y)) < ((0.8 * _local2.width) / 2)){
doHit(_local2);
break;
};
};
_local1++;
};
}
public function doHit(_arg1):void{
var _local4:int;
var _local5:*;
var _local6:*;
var _local7:*;
fXspeed = _arg1.fXspeed;
fYspeed = _arg1.fYspeed;
fMain.addParticles(Math.round((_arg1.fWidth / 2)), this.x, this.y, (fRot + 180), 1, 13);
var _local2:* = _arg1.setEnergy(-2);
var _local3:* = 0;
if (_local2 == 0){
_local4 = 0;
while (_local4 < GameEngine.getInstance().fMeteorHolder.numChildren) {
_local5 = GameEngine.getInstance().fMeteorHolder.getChildAt(_local4);
if (!_local5.fBullet){
_local6 = VectorCalc.getDist((this.x - _local5.x), (this.y - _local5.y));
if (_local6 < 100){
_local3 = VectorCalc.getVectorRot((_local5.x - this.x), (_local5.y - this.y));
_local5.doForce(_local3, (1 - (_local6 / 100)));
};
};
_local4++;
};
} else {
_local3 = fRot;
_arg1.doForce(_local3, (1 / 10));
};
if (GameEngine.getInstance().getSoundOn()){
_local7 = this[("fShotSND" + 2)];
_local7.play();
};
fActive = false;
}
private function EnterFrame(_arg1:Event):void{
switch (fMode){
case "running":
this.x = (this.x + fXspeed);
this.y = (this.y + fYspeed);
checkCollission();
checkBorders();
if (!fActive){
kill();
};
break;
};
}
private function kill():void{
if (GameEngine.getInstance().getWeaponMode() == 2){
Aimer.getInstance().setAimXY(this.x, this.y);
};
this.removeEventListener(Event.ENTER_FRAME, EnterFrame);
fBulletHolder.removeChild(this);
}
private function checkBorders():void{
if (this.x > (fStageW + 5)){
fActive = false;
} else {
if (this.x < -5){
fActive = false;
} else {
if (this.y > (fStageH + 5)){
fActive = false;
} else {
if (this.y < -5){
fActive = false;
};
};
};
};
}
}
}//package
Section 29
//Click (Click)
package {
import flash.media.*;
public dynamic class Click extends Sound {
}
}//package
Section 30
//Clicker (Clicker)
package {
import flash.display.*;
public dynamic class Clicker extends MovieClip {
}
}//package
Section 31
//DisplayOverlay (DisplayOverlay)
package {
import flash.events.*;
import flash.display.*;
import flash.text.*;
import flash.utils.*;
public class DisplayOverlay extends MovieClip {
private var fLifeMode:String;
public var iMovie:MovieClip;
private var fInfoWait:int;
private var fLifeShowTime:int;
public var iFPS:TextField;
public var iLifes:MovieClip;
private var fScoreShowTime:int;
private var fLifeY:int;
private var fStartTime:Number;
private var fGameEngine:MovieClip;
private var fScoreMode:String;
private var fFrameCount:Number;
public var iScore:MovieClip;
private var fFPSOnOff:Boolean;
public var iInfo:MovieClip;
public var iInfoTXT:TextField;
public function DisplayOverlay(_arg1){
fGameEngine = _arg1;
fFPSOnOff = false;
fFrameCount = 0;
fStartTime = getTimer();
iFPS.text = "";
fInfoWait = 0;
fLifeY = iLifes.y;
setLifes(4);
setScore(0);
iMovie.gotoAndStop(96);
this.addEventListener(Event.ENTER_FRAME, EnterFrame);
if (!fFPSOnOff){
iFPS.text = String("");
};
if (fGameEngine.getFirstTime() == 1){
this.iInfo.gotoAndStop(1);
} else {
this.iInfo.gotoAndStop(10);
};
}
public function setLifes(_arg1):void{
iLifes.gotoAndStop((5 - _arg1));
iLifes.y = fLifeY;
fLifeMode = "show";
fLifeShowTime = 40;
}
private function doScore():void{
switch (fScoreMode){
case "show":
if (--fScoreShowTime <= 0){
fScoreMode = "away";
};
break;
case "away":
if (iScore.alpha > 0){
iScore.alpha = (iScore.alpha - 0.05);
};
break;
};
}
private function EnterFrame(_arg1:Event):void{
if (fGameEngine.getFirstTime() != 1){
if (this.iInfo.currentFrame == 1){
this.iInfo.gotoAndStop(2);
fInfoWait = (2.5 * 30);
};
};
if (this.iInfo.currentFrame == 2){
if (--fInfoWait < 0){
this.iInfo.gotoAndStop(10);
};
};
doScore();
doLifes();
if (fFPSOnOff){
FPS();
};
}
private function FPS():void{
fFrameCount++;
var _local1:* = getTimer();
if ((_local1 - fStartTime) >= 1000){
fStartTime = (fStartTime + 1000);
iFPS.text = (String(fFrameCount) + " FPS");
fFrameCount = 0;
};
}
private function kill():void{
fGameEngine.removeChild(this);
}
private function doLifes():void{
switch (fLifeMode){
case "show":
if (--fLifeShowTime <= 0){
fLifeMode = "away";
};
break;
case "away":
if (iLifes.y > -10){
iLifes.y = (iLifes.y - 0.5);
};
break;
};
}
public function setScore(_arg1):void{
fScoreMode = "show";
iScore.iScoreText.text = _arg1;
iScore.alpha = 1;
fScoreShowTime = 40;
}
}
}//package
Section 32
//Enemy (Enemy)
package {
import flash.events.*;
import flash.display.*;
import nl.mad.vector.*;
import nl.mad.utils.*;
import flash.media.*;
public class Enemy extends MovieClip {
public var fWidth:Number;
private var fStraal:Number;
public var iShip:MovieClip;
private var fOldEnergy:Number;
private var fEnergy:Number;
public var fBullet:Boolean;
private var fStageH:Number;
private var fRot:Number;
public var fXspeed:Number;
private var fSession:Number;
private var fNewRot:Number;
private var fStageW:Number;
private var fLaserSND:Sound;
public var fHeight:Number;
public var fYspeed:Number;
private var fRotSpeed:Number;
private var fExplSND:Sound;
private var fMeteorHolder:Sprite;
private var fMain:MovieClip;
public function Enemy(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7){
var _local8:*;
var _local9:int;
super();
fMain = _arg1;
fBullet = false;
fStageW = fMain.gStageW;
fStageH = fMain.gStageH;
fMeteorHolder = _arg2;
fEnergy = _arg3;
fOldEnergy = fEnergy;
fWidth = (this.width / 2);
fHeight = (this.height / 2);
fSession = _arg7;
fExplSND = new BigExpl2();
fLaserSND = new LaserSND();
if (_arg5 == 0){
_local9 = Utils.random(1, 4);
switch (Utils.random(1, 4)){
case 1:
this.x = (-(fWidth) * 1.4);
this.y = Utils.random(0, fStageH);
break;
case 2:
this.x = (fStageW + (fWidth * 1.4));
this.y = Utils.random(0, fStageH);
break;
case 3:
this.x = Utils.random(0, fStageW);
this.y = (-(fHeight) * 1.4);
break;
case 4:
this.x = Utils.random(0, fStageW);
this.y = (fStageH + (fHeight * 1.4));
break;
};
fRot = Utils.random(0, (2 * 360));
fNewRot = fRot;
} else {
this.x = _arg5;
this.y = _arg6;
fRot = Utils.random(30, 150);
};
if (Utils.random(2) == 0){
_local8 = -1;
} else {
_local8 = 1;
};
fRotSpeed = (_local8 * (Utils.random(0, 30) / 10));
fStraal = (_arg4 + ((Utils.random(0, 10) - 5) / 10));
fXspeed = (fStraal * Math.cos(((fRot * Math.PI) / 180)));
fYspeed = (fStraal * Math.sin(((fRot * Math.PI) / 180)));
if (_local9 < 3){
if (Math.abs(fXspeed) < 1){
fXspeed = 1;
};
} else {
if (Math.abs(fYspeed) < 1){
fYspeed = 1;
};
};
this.addEventListener(Event.ENTER_FRAME, EnterFrame);
}
public function setEnergy(_arg1):void{
fEnergy = (fEnergy + _arg1);
if (fEnergy <= 0){
fEnergy = 0;
fMain.addScore(5);
kill();
};
}
private function kill(_arg1=1):void{
Main.getInstance().initShake(7, (0.6 * Main.getInstance().fMaxStraal));
if (GameEngine.getInstance().getSoundOn()){
this.fExplSND.play();
};
fMain.addParticles((20 + Utils.random(20)), this.x, this.y, 360, 3, 20);
fMain.addParticles((70 + Utils.random(60)), this.x, this.y, 360, 6, 20);
this.removeEventListener(Event.ENTER_FRAME, EnterFrame);
fMeteorHolder.removeChild(this);
}
private function checkBorders():void{
if (this.x > (fStageW + (fWidth * 1.2))){
this.x = (-(fWidth) * 1.2);
} else {
if (this.x < (-(fWidth) * 1.2)){
this.x = (fStageW + (fWidth * 1.2));
} else {
if (this.y > (fStageH + (fHeight * 1.2))){
this.y = (-(fHeight) * 1.2);
} else {
if (this.y < (-(fHeight) * 1.2)){
this.y = (fStageH + (fHeight * 1.2));
};
};
};
};
}
public function getEnergy():Number{
return (fEnergy);
}
private function checkSession():void{
if (fSession != fMain.getSession()){
fOldEnergy = 0;
kill(0);
};
}
public function getHalfWidth():Number{
return (fWidth);
}
private function EnterFrame(_arg1:Event):void{
if (Utils.random(60) == 1){
fNewRot = VectorCalc.getVectorRot((GameEngine.getInstance().fShip.x - this.x), (GameEngine.getInstance().fShip.y - this.y));
fNewRot = (fNewRot + 360);
} else {
if (Utils.random(60) == 1){
fNewRot = Utils.random(0, (2 * 360));
};
};
if ((fRot + 6) < fNewRot){
fRot = (fRot + 6);
} else {
if ((fRot - 6) > fNewRot){
fRot = (fRot - 6);
} else {
fRot = fNewRot;
};
};
fXspeed = (fStraal * Math.cos(((fRot * Math.PI) / 180)));
fYspeed = (fStraal * Math.sin(((fRot * Math.PI) / 180)));
this.x = (this.x + fXspeed);
this.y = (this.y + fYspeed);
this.rotation = fRot;
checkBorders();
checkSession();
if (this.iShip.currentFrame == 49){
if (Utils.random(2) == 1){
if (GameEngine.getInstance().getSoundOn()){
fLaserSND.play();
};
fMain.createEnemyBullet(fRot, this.x, this.y);
};
} else {
if (this.iShip.currentFrame == 99){
if (Utils.random(2) == 1){
if (GameEngine.getInstance().getSoundOn()){
fLaserSND.play();
};
fMain.createEnemyBullet(fRot, this.x, this.y);
};
};
};
}
public function doForce(_arg1, _arg2):void{
}
}
}//package
Section 33
//EnemyBullet (EnemyBullet)
package {
import flash.events.*;
import flash.display.*;
import flash.media.*;
public class EnemyBullet extends MovieClip {
public var fWidth:Number;
private var fStraal:Number;
private var fExplSND0:Sound;
private var fMeteorHolder:Sprite;
public var fBullet:Boolean;
private var fOldEnergy:Number;
private var fExplSND2:Sound;
private var fEnergy:Number;
private var fStageH:Number;
private var fRot:Number;
public var fXspeed:Number;
private var fSession:Number;
private var fStageW:Number;
public var fHeight:Number;
public var fYspeed:Number;
private var fRotSpeed:Number;
private var fExplSND1:Sound;
private var fMain:MovieClip;
public function EnemyBullet(_arg1, _arg2, _arg3, _arg4, _arg5){
fMain = GameEngine.getInstance();
fMeteorHolder = _arg5;
fRot = _arg1;
fBullet = true;
fStageW = fMain.gStageW;
fStageH = fMain.gStageH;
fWidth = this.width;
fHeight = this.width;
fStraal = 15;
fXspeed = (fStraal * Math.cos(((fRot * Math.PI) / 180)));
fYspeed = (fStraal * Math.sin(((fRot * Math.PI) / 180)));
this.x = (_arg3 + (5 * fXspeed));
this.y = (_arg4 + (5 * fYspeed));
this.rotation = fRot;
this.addEventListener(Event.ENTER_FRAME, EnterFrame);
}
private function kill():void{
this.removeEventListener(Event.ENTER_FRAME, EnterFrame);
fMeteorHolder.removeChild(this);
}
private function EnterFrame(_arg1:Event):void{
this.x = (this.x + fXspeed);
this.y = (this.y + fYspeed);
checkBorders();
}
private function checkBorders():void{
if (this.x > (fStageW + (fWidth * 1.4))){
kill();
} else {
if (this.x < (-(fWidth) * 1.4)){
kill();
} else {
if (this.y > (fStageH + (fHeight * 1.4))){
kill();
} else {
if (this.y < (-(fHeight) * 1.4)){
kill();
};
};
};
};
}
public function doForce(_arg1, _arg2):void{
}
}
}//package
Section 34
//Expl (Expl)
package {
import flash.media.*;
public dynamic class Expl extends Sound {
}
}//package
Section 35
//Flash (Flash)
package {
import flash.events.*;
import flash.display.*;
public class Flash extends MovieClip {
private var fFXHolder:Sprite;
private var fStartFrame:int;
private var fYspeed:Number;
private var fXspeed:Number;
private var fEndFrame:int;
public function Flash(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9){
fFXHolder = _arg3;
fStartFrame = _arg4;
fEndFrame = _arg5;
fXspeed = _arg8;
fYspeed = _arg9;
this.x = _arg1;
this.y = _arg2;
this.scaleX = _arg6;
this.scaleY = _arg7;
this.gotoAndPlay(fStartFrame);
this.addEventListener(Event.ENTER_FRAME, EnterFrame);
}
private function EnterFrame(_arg1:Event):void{
this.x = (this.x + fXspeed);
this.y = (this.y + fYspeed);
if (this.currentFrame >= fEndFrame){
kill(this, fFXHolder);
};
}
private function kill(_arg1, _arg2):void{
_arg1.removeEventListener(Event.ENTER_FRAME, EnterFrame);
_arg2.removeChild(_arg1);
}
}
}//package
Section 36
//FlvPlayer (FlvPlayer)
package {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.net.*;
public class FlvPlayer extends MovieClip {
private var vidIndex:int;
private var fConnection:NetConnection;
private var stream2:NetStream;
private var stream1:NetStream;
private var stream3:NetStream;
private var fVideoURL1:String;
private var fVideoURL2:String;
private var fVideoURL3:String;
private var video:Video;
public function FlvPlayer(){
vidIndex = 1;
fVideoURL1 = "http://89.200.201.254/beroemdworden/336x280_VID_ONE.flv";
fVideoURL2 = "http://89.200.201.254/beroemdworden/336x280_VID_TWO.flv";
fVideoURL3 = "http://89.200.201.254/beroemdworden/336x280_VID_THREE.flv";
fConnection = new NetConnection();
fConnection.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler);
fConnection.addEventListener(SecurityErrorEvent.SECURITY_ERROR, securityErrorHandler);
fConnection.connect(null);
}
private function attachVid(_arg1, _arg2){
video.attachNetStream(_arg2);
_arg2.play(_arg1);
if (++vidIndex > 3){
vidIndex = 1;
};
}
private function connectStream():void{
stream1 = new NetStream(fConnection);
stream1.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler);
stream1.addEventListener(AsyncErrorEvent.ASYNC_ERROR, asyncErrorHandler);
stream2 = new NetStream(fConnection);
stream2.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler);
stream2.addEventListener(AsyncErrorEvent.ASYNC_ERROR, asyncErrorHandler);
stream3 = new NetStream(fConnection);
stream3.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler);
stream3.addEventListener(AsyncErrorEvent.ASYNC_ERROR, asyncErrorHandler);
video = new Video();
video.width = 380;
video.height = 400;
addChild(video);
attachVid(fVideoURL1, stream1);
}
private function securityErrorHandler(_arg1:SecurityErrorEvent):void{
trace(("securityErrorHandler: " + _arg1));
}
private function netStatusHandler(_arg1:NetStatusEvent):void{
switch (_arg1.info.code){
case "NetConnection.Connect.Success":
connectStream();
break;
case "NetStream.Play.StreamNotFound":
trace(("Unable to locate video: " + fVideoURL1));
break;
case "NetStream.Play.Stop":
switch (vidIndex){
case 1:
attachVid(fVideoURL1, stream1);
break;
case 2:
attachVid(fVideoURL2, stream2);
break;
case 3:
attachVid(fVideoURL3, stream3);
break;
};
break;
};
}
private function asyncErrorHandler(_arg1:AsyncErrorEvent):void{
}
}
}//package
Section 37
//FlyawaySND (FlyawaySND)
package {
import flash.media.*;
public dynamic class FlyawaySND extends Sound {
}
}//package
Section 38
//FlyinSND (FlyinSND)
package {
import flash.media.*;
public dynamic class FlyinSND extends Sound {
}
}//package
Section 39
//GameEngine (GameEngine)
package {
import flash.events.*;
import flash.display.*;
import nl.mad.utils.*;
import flash.media.*;
import flash.ui.*;
import flash.filters.*;
public class GameEngine extends MovieClip {
private var fShipHolder:Sprite;
private var fWeaponTime:int;
private var fDoMovie:Boolean;// = true
private var fMode:String;
private var fSoundOn:Boolean;// = true
private var fLifes:int;
private var fDisplayOverlay:MovieClip;
private var fMenuSND:Sound;
public var fClickSND:Sound;
private var fSession:int;
public var gStageH:Number;
private var fNewhiscoreSND:Sound;
public var gStageW:Number;
private var fBonusHolder:Sprite;
public var iHolder:MovieClip;
private var fBackHolder:Sprite;
private var fFXHolder:Sprite;
private var fAddBonus:Boolean;
private var fBonusExtraScore:int;
private var fBonusMode:int;
private var fStartSND0:Sound;
private var fStartSND1:Sound;
private var fMeteorAmount:int;
private var fMenuScreen:MovieClip;
private var fMeteor:MovieClip;
private var fVideo:FlvPlayer;
private var fBonusScore:int;
public var fLevel:int;
public var fShip:Ship;
private var fLevelSND:Sound;
private var fScore:int;
public var fBulletHolder:Sprite;
private var fFirstTime:Boolean;
private var fWeaponMode:int;
private var fHiscore:int;
public var fAimer:MovieClip;
private var fInfoTextTime:int;
public var fMeteorHolder:Sprite;
private static var fInstance:GameEngine = null;
public function GameEngine(){
if (fInstance != null){
return;
};
fInstance = this;
gStageW = 475;
gStageH = 500;
fBackHolder = new Sprite();
addChild(fBackHolder);
fMeteorHolder = new MovieClip();
addChild(fMeteorHolder);
fBulletHolder = new Sprite();
addChild(fBulletHolder);
fBonusHolder = new Sprite();
addChild(fBonusHolder);
fShipHolder = new Sprite();
addChild(fShipHolder);
fFXHolder = new Sprite();
addChild(fFXHolder);
fMenuScreen = new MenuScreen(this, gStageW, gStageH);
Main.getInstance().iMenuHolder.addChild(fMenuScreen);
var _local1:int;
while (_local1 < 110) {
fBackHolder.addChild(new Star(this));
_local1++;
};
fMode = "menu";
this.addEventListener(Event.ENTER_FRAME, EnterFrame);
fMeteorAmount = 1;
fSession = 1;
fLevel = 0;
setScore(0);
setHiscore(250);
fAddBonus = true;
fFirstTime = false;
fBonusScore = 100;
createMeteor(1, 12, 2, 0, 0);
createMeteor(1, 8, 3, 0, 0);
createMeteor(1, 6, 3, 0, 0);
createMeteor(1, 4, 2, 0, 0);
createMeteor(1, 2, 2, 0, 0);
fClickSND = new Click();
fMenuSND = new MenuSND();
fLevelSND = new LevelSND();
fStartSND0 = new StartSND();
fStartSND1 = new StartSND2();
fInfoTextTime = -1;
fNewhiscoreSND = new NewhiscoreSND();
}
private function checkHiscore(_arg1){
if (_arg1 > fHiscore){
setHiscore(_arg1);
if (this.getSoundOn()){
fNewhiscoreSND.play();
};
};
}
public function addParticles(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6){
var _local8:*;
var _local7:int;
while (_local7 < _arg1) {
if (_arg4 == 360){
_local8 = Utils.random(360);
} else {
_local8 = ((_arg4 + Utils.random(120)) - 60);
};
fFXHolder.addChild(new Particle(this, _local8, _arg2, _arg3, fFXHolder, _arg5, _arg6));
_local7++;
};
}
public function createEnemyBullet(_arg1, _arg2, _arg3):void{
var _local4:* = new EnemyBullet(_arg1, fLevel, _arg2, _arg3, fMeteorHolder);
fMeteorHolder.addChild(_local4);
}
private function checkLevelUp():void{
if (fMeteorHolder.numChildren == 0){
fMode = "waitMovieShip";
fShip.doAwayMovie();
};
}
public function getSoundOn():Boolean{
return (fSoundOn);
}
public function getMode():String{
return (fMode);
}
public function setBonusMode():void{
fBonusMode++;
if (fBonusMode > 3){
fBonusMode = 1;
};
}
public function onDown(_arg1:MouseEvent):void{
if (fMode == "running"){
fShip.doClick();
};
}
private function LevelUp():void{
var _local1:*;
var _local2:*;
fLevel++;
if (this.getSoundOn()){
fLevelSND.play();
};
fDoMovie = true;
if ((fLevel % 4) == 0){
createMeteor(1, (18 + (fLevel / 4)), (1 + (0.3 * fLevel)), 0, 0);
} else {
if (getLevel() == 1){
_local1 = (((gStageW / 2) + Utils.random(0, (gStageW / 2))) - (gStageW / 4));
_local2 = -60;
createMeteor(fMeteorAmount, 12, (1 + (0.5 * fLevel)), _local1, _local2, 1);
} else {
if (getLevel() == 2){
createMeteor(fMeteorAmount, 6, (1 + (0.5 * fLevel)), 0, 0);
} else {
createMeteor(fMeteorAmount, 12, (1 + (0.5 * fLevel)), 0, 0);
};
};
fMeteorAmount++;
};
}
public function getLifes():int{
return (fLifes);
}
private function setScore(_arg1){
fScore = _arg1;
fMenuScreen.iScoreTXT.text = fScore;
}
public function setFirstTime(_arg1):void{
fFirstTime = _arg1;
}
public function getSession():int{
return (fSession);
}
private function resetInfoText():void{
if (--fInfoTextTime > 0){
} else {
setInfoText("");
fInfoTextTime = -1;
};
}
private function setHiscore(_arg1){
fHiscore = _arg1;
fMenuScreen.iHiscoreTXT.text = fHiscore;
}
public function addScore(_arg1):void{
fScore = (fScore + _arg1);
fDisplayOverlay.setScore(fScore);
}
public function setInfoText(_arg1){
fDisplayOverlay.iInfoTXT.text = _arg1;
if (_arg1 != ""){
fInfoTextTime = 60;
};
}
public function startEnemyMovie():void{
fDisplayOverlay.iMovie.gotoAndPlay(1);
fMode = "waitEnemyMovie";
}
public function getDisplay():MovieClip{
return (fDisplayOverlay);
}
public function initMenu():void{
Main.getInstance().iMenuHolder.addChild(fMenuScreen);
if (fSoundOn){
fMenuScreen.iSoundButton.gotoAndStop(1);
fMenuSND.play();
} else {
fMenuScreen.iSoundButton.gotoAndStop(2);
};
setScore(fScore);
checkHiscore(fScore);
fMenuScreen.addEventListener(Event.ENTER_FRAME, fMenuScreen.EnterFrame);
Main.getInstance().removeChild(fDisplayOverlay);
fShipHolder.removeChild(fShip);
fMode = "menu";
}
private function EnterFrame(_arg1:Event):void{
switch (fMode){
case "wait":
break;
case "menu":
if (Utils.random(30) == 1){
switch (Utils.random(2)){
case 0:
addParticles((40 + Utils.random(60)), Utils.random(gStageW), Utils.random(gStageH), 360, 2, 20);
break;
case 1:
addParticles((40 + Utils.random(60)), Utils.random(gStageW), Utils.random(gStageH), 360, 4, 20);
break;
};
};
break;
case "running":
fShip.doClick();
checkLevelUp();
checkBonus();
resetInfoText();
if (fWeaponMode == 2){
if (--fWeaponTime <= 0){
setWeaponMode(1);
};
};
break;
case "waitEnemyMovie":
if (fDisplayOverlay.iMovie.currentFrame == 96){
createEnemy(1, (fLevel * 50), (1 + (0.5 * fLevel)), 0, 0);
fMode = "running";
fDoMovie = false;
fShip.doInMovie();
};
resetInfoText();
break;
};
}
public function startUp():void{
fLevel = 0;
fSession++;
if (this.getSoundOn()){
this[("fStartSND" + Utils.random(2))].play();
};
fMeteorAmount = 1;
fShip = new Ship(this, fBulletHolder, fMeteorHolder, fBonusHolder);
fShipHolder.addChild(fShip);
fDisplayOverlay = new DisplayOverlay(this);
Main.getInstance().addChild(fDisplayOverlay);
fDisplayOverlay.iMovie.gotoAndStop(96);
fDisplayOverlay.scaleX = 1.26;
fDisplayOverlay.scaleY = 1.26;
setInfoText("");
setWeaponMode(1);
fScore = 0;
fLifes = 4;
fAddBonus = true;
fBonusScore = 100;
fBonusMode = 1;
fBonusExtraScore = 0;
if (this.getSoundOn()){
fClickSND.play();
};
fMode = "wait";
}
public function getBonusMode():int{
return (fBonusMode);
}
public function getShipRot():Number{
if (fShip != null){
return (fShip.getRot());
};
return (0);
}
public function endShipMovie():void{
fMode = "running";
LevelUp();
}
public function getLevel():int{
return (fLevel);
}
public function addFlash(_arg1, _arg2, _arg3, _arg4, _arg5:Number=1, _arg6:Number=1, _arg7:Number=0, _arg8:Number=0):void{
fFXHolder.addChild(new Flash(_arg1, _arg2, fFXHolder, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8));
}
public function getWeaponMode():Number{
return (fWeaponMode);
}
public function onUp(_arg1:MouseEvent):void{
if (fMode == "running"){
fShip.undoClick();
};
}
public function addLifes(_arg1):void{
fLifes = (fLifes + _arg1);
fDisplayOverlay.setLifes(fLifes);
}
public function createMeteor(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6=0):void{
var _local8:*;
var _local7:int;
while (_local7 < _arg1) {
_local8 = new Meteor(this, fMeteorHolder, _arg2, _arg3, _arg4, _arg5, fSession, _arg6);
fMeteorHolder.addChild(_local8);
_local7++;
};
}
public function setWeaponMode(_arg1):void{
fWeaponMode = _arg1;
switch (_arg1){
case 1:
break;
case 2:
fWeaponTime = (12 * 30);
break;
};
}
public function getScore():int{
return (fScore);
}
public function getFirstTime():Boolean{
return (fFirstTime);
}
public function createEnemy(_arg1, _arg2, _arg3, _arg4, _arg5):void{
var _local7:*;
var _local6:int;
while (_local6 < _arg1) {
_local7 = new Enemy(this, fMeteorHolder, _arg2, _arg3, _arg4, _arg5, fSession);
fMeteorHolder.addChild(_local7);
_local6++;
};
}
private function checkBonus():void{
if (fScore >= fBonusScore){
fBonusScore = (fBonusScore + (200 + fBonusExtraScore));
fBonusExtraScore = (fBonusExtraScore + 20);
fBonusHolder.addChild(new Bonus(this, fBonusHolder, this));
};
}
public function musicOnOff():void{
fClickSND.play();
if (fSoundOn){
fMenuScreen.iSoundButton.gotoAndStop(2);
fSoundOn = false;
} else {
fMenuScreen.iSoundButton.gotoAndStop(1);
fSoundOn = true;
};
}
public static function getInstance():GameEngine{
if (fInstance == null){
return (new (GameEngine));
};
return (fInstance);
}
}
}//package
Section 40
//GameoverSND (GameoverSND)
package {
import flash.media.*;
public dynamic class GameoverSND extends Sound {
}
}//package
Section 41
//language (language)
package {
import flash.net.*;
public class language {
public static var localConnection = new LocalConnection();
public static var _languageNum:uint = 0;
public static var _languageBox:Array = new Array();
public static var SpillGroupUrl:Array = new Array();
public static var gamename = "madsteroids";
public static function get url2():String{
var _local1:int;
while (_local1 < SpillGroupUrl.length) {
if (localConnection.domain == SpillGroupUrl[_local1]){
return (_languageBox[_languageNum].url2);
};
_local1++;
};
return (_languageBox[_languageNum].url2);
}
public static function get language_nr():String{
return (_languageBox[_languageNum].language_nr);
}
public static function get portal():String{
return (_languageBox[_languageNum].portal);
}
public static function set Language(_arg1:Object):void{
var domainextention:int;
var domainname:int;
var languageVersion = _arg1;
var returnDomain:* = function (_arg1:String):String{
var _local2:String = new String();
var _local3:uint = 7;
while (_local3 < _arg1.length) {
if (_arg1.charAt(_local3) == "/"){
break;
};
_local2 = (_local2 + _arg1.charAt(_local3));
_local3++;
};
return (_local2);
};
var hostingdomain = "";
var myList:String = localConnection.domain;
var myArray:Array = myList.split(".");
if (myArray.length <= 3){
domainextention = (myArray.length - 1);
domainname = (myArray.length - 2);
hostingdomain = ((myArray[domainname] + ".") + myArray[domainextention]);
} else {
hostingdomain = localConnection.domain;
};
var language1:* = new languageItem();
language1.url1 = ((("http://www.agame.com/moregames/?utm_medium=brandedgames_external&utm_campaign=" + gamename) + "&utm_source=") + hostingdomain);
language1.url2 = ("http://www.agame.com/moregames/?utm_medium=brandedgames_internal&utm_campaign=" + gamename);
language1.language_nr = 1;
language1.branding_nr = 1;
language1.portal = "tweens";
_languageBox.push(language1);
var language2:* = new languageItem();
language2.url1 = "http://www.game.com.cn/moregames/";
language2.url2 = "http://www.game.com.cn/moregames/";
language2.language_nr = 2;
language2.branding_nr = 2;
language2.portal = "game_com_cn";
_languageBox.push(language2);
var language3:* = new languageItem();
language3.url1 = ((("http://www.spel.nl/moregames/?utm_medium=brandedgames_external&utm_campaign=" + gamename) + "&utm_source=") + hostingdomain);
language3.url2 = ("http://www.spel.nl/moregames/?utm_medium=brandedgames_internal&utm_campaign=" + gamename);
language3.language_nr = 3;
language3.branding_nr = 4;
language3.portal = "tweens";
_languageBox.push(language3);
var language4:* = new languageItem();
language4.url1 = ((("http://www.jeu.fr/moregames/?utm_medium=brandedgames_external&utm_campaign=" + gamename) + "&utm_source=") + hostingdomain);
language4.url2 = ("http://www.jeu.fr/moregames/?utm_medium=brandedgames_internal&utm_campaign=" + gamename);
language4.language_nr = 4;
language4.branding_nr = 5;
language4.portal = "tweens";
_languageBox.push(language4);
var language5:* = new languageItem();
language5.url1 = ((("http://www.spielen.com/moregames/?utm_medium=brandedgames_external&utm_campaign=" + gamename) + "&utm_source=") + hostingdomain);
language5.url2 = ("http://www.spielen.com/moregames/?utm_medium=brandedgames_internal&utm_campaign=" + gamename);
language5.language_nr = 5;
language5.branding_nr = 6;
language5.portal = "tweens";
_languageBox.push(language5);
var language6:* = new languageItem();
language6.url1 = ((("http://www.minigry.pl/moregames/?utm_medium=brandedgames_external&utm_campaign=" + gamename) + "&utm_source=") + hostingdomain);
language6.url2 = ("http://www.minigry.pl/moregames/?utm_medium=brandedgames_internal&utm_campaign=" + gamename);
language6.language_nr = 6;
language6.branding_nr = 14;
language6.portal = "tweens";
_languageBox.push(language6);
var language7:* = new languageItem();
language7.url1 = ((("http://www.spel.eu/moregames/?utm_medium=brandedgames_external&utm_campaign=" + gamename) + "&utm_source=") + hostingdomain);
language7.url2 = ("http://www.spel.eu/moregames/?utm_medium=brandedgames_internal&utm_campaign=" + gamename);
language7.language_nr = 7;
language7.branding_nr = 9;
language7.portal = "tweens";
_languageBox.push(language7);
var language8:* = new languageItem();
language8.url1 = ((("http://www.giocaregratis.it/moregames/?utm_medium=brandedgames_external&utm_campaign=" + gamename) + "&utm_source=") + hostingdomain);
language8.url2 = ("http://www.giocaregratis.it/moregames/?utm_medium=brandedgames_internal&utm_campaign=" + gamename);
language8.language_nr = 8;
language8.branding_nr = 8;
language8.portal = "tweens";
_languageBox.push(language8);
var language9:* = new languageItem();
language9.url1 = ((("http://www.zapjuegos.com/moregames/?utm_medium=brandedgames_external&utm_campaign=" + gamename) + "&utm_source=") + hostingdomain);
language9.url2 = ("http://www.zapjuegos.com/moregames/?utm_medium=brandedgames_internal&utm_campaign=" + gamename);
language9.language_nr = 9;
language9.branding_nr = 3;
language9.portal = "tweens";
_languageBox.push(language9);
var language10:* = new languageItem();
language10.url1 = ((("http://www.clickjogos.com/moregames/?utm_medium=brandedgames_external&utm_campaign=" + gamename) + "&utm_source=") + hostingdomain);
language10.url2 = ("http://www.clickjogos.com/moregames/?utm_medium=brandedgames_internal&utm_campaign=" + gamename);
language10.language_nr = 11;
language10.branding_nr = 7;
language10.portal = "tweens";
_languageBox.push(language10);
var language11:* = new languageItem();
language11.url1 = ((("http://www.games.co.id/moregames/?utm_medium=brandedgames_external&utm_campaign=" + gamename) + "&utm_source=") + hostingdomain);
language11.url2 = ("http://www.games.co.id/moregames/?utm_medium=brandedgames_internal&utm_campaign=" + gamename);
language11.language_nr = 13;
language11.branding_nr = 13;
language11.portal = "tweens";
_languageBox.push(language11);
var language12:* = new languageItem();
language12.url1 = ((("http://www.flashgames.ru/moregames/?utm_medium=brandedgames_external&utm_campaign=" + gamename) + "&utm_source=") + hostingdomain);
language12.url2 = ("http://www.flashgames.ru/moregames/?utm_medium=brandedgames_internal&utm_campaign=" + gamename);
language12.language_nr = 12;
language12.branding_nr = 11;
language12.portal = "tweens";
_languageBox.push(language12);
var language13:* = new languageItem();
language13.url1 = ((("http://www.mygames.co.uk/moregames/?utm_medium=brandedgames_external&utm_campaign=" + gamename) + "&utm_source=") + hostingdomain);
language13.url2 = ("http://www.mygames.co.uk/moregames/?utm_medium=brandedgames_internal&utm_campaign=" + gamename);
language13.language_nr = 16;
language13.branding_nr = 10;
language13.portal = "tweens";
_languageBox.push(language13);
var language14:* = new languageItem();
language14.url1 = ((("http://www.game.co.in/moregames/?utm_medium=brandedgames_external&utm_campaign=" + gamename) + "&utm_source=") + hostingdomain);
language14.url2 = ("http://www.game.co.in/moregames/?utm_medium=brandedgames_internal&utm_campaign=" + gamename);
language14.language_nr = 16;
language14.branding_nr = 12;
language14.portal = "tweens";
_languageBox.push(language14);
var language15:* = new languageItem();
language15.url1 = ((("http://www.asoyun.com/moregames/?utm_medium=brandedgames_external&utm_campaign=" + gamename) + "&utm_source=") + hostingdomain);
language15.url2 = ("http://www.asoyun.com/moregames/?utm_medium=brandedgames_internal&utm_campaign=" + gamename);
language15.language_nr = 14;
language15.branding_nr = 15;
language15.portal = "tweens";
_languageBox.push(language15);
var language16:* = new languageItem();
language16.url1 = ((("http://www.game.com.my/moregames/?utm_medium=brandedgames_external&utm_campaign=" + gamename) + "&utm_source=") + hostingdomain);
language16.url2 = ("http://www.game.com.my/moregames/?utm_medium=brandedgames_internal&utm_campaign=" + gamename);
language16.language_nr = 15;
language16.branding_nr = 16;
language16.portal = "tweens";
_languageBox.push(language16);
var language17:* = new languageItem();
language17.url1 = ((("http://www.ojogos.pt/moregames/?utm_medium=brandedgames_external&utm_campaign=" + gamename) + "&utm_source=") + hostingdomain);
language17.url2 = ("http://www.ojogos.pt/moregames/?utm_medium=brandedgames_internal&utm_campaign=" + gamename);
language17.language_nr = 10;
language17.branding_nr = 42;
language17.portal = "family";
_languageBox.push(language17);
var language18:* = new languageItem();
language18.url1 = ((("http://www.egames.jp/moregames/?utm_medium=brandedgames_external&utm_campaign=" + gamename) + "&utm_source=") + hostingdomain);
language18.url2 = ("http://www.egames.jp/moregames/?utm_medium=brandedgames_internal&utm_campaign=" + gamename);
language18.language_nr = 17;
language18.branding_nr = 44;
language18.portal = "tweens";
_languageBox.push(language18);
SpillGroupUrl.push("localhost");
SpillGroupUrl.push("www8.agame.com");
if ((((((languageVersion is Number)) || ((languageVersion is uint)))) || ((languageVersion is int)))){
_languageNum = (Number(languageVersion) - 1);
};
}
public static function get url1():String{
var _local1:int;
while (_local1 < SpillGroupUrl.length) {
if (localConnection.domain == SpillGroupUrl[_local1]){
return (_languageBox[_languageNum].url2);
};
_local1++;
};
return (_languageBox[_languageNum].url1);
}
public static function get branding_nr():String{
return (_languageBox[_languageNum].branding_nr);
}
}
}//package
class languageItem {
public var url1:String;
public var url2:String;
public var language_nr:int;
public var portal:String;
public var branding_nr:int;
private function languageItem(){
}
}
Section 42
//LaserSND (LaserSND)
package {
import flash.media.*;
public dynamic class LaserSND extends Sound {
}
}//package
Section 43
//LevelSND (LevelSND)
package {
import flash.media.*;
public dynamic class LevelSND extends Sound {
}
}//package
Section 44
//Main (Main)
package {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.net.*;
import flash.ui.*;
public class Main extends MovieClip {
private var fStraal:Number;
private var fBackground:Sprite;
public var fStijgopSND:Sound;
public var iMoreGamesLogo:MovieClip;
public var request:URLRequest;
private var fRot:Number;
private var fStageH:Number;
private var fGameEngine:MovieClip;
public var button_mainscreen_moregames:SimpleButton;
private var fStageW:Number;
public var intro:MovieClip;
public var iBack:MovieClip;
public var iHolder:MovieClip;
public var fTiefighterSND:Sound;
public var fMaxStraal:Number;
public var iMenuHolder:MovieClip;
private var fRotSpeed:Number;
private static var fInstance = null;
public function Main(){
addFrameScript(0, frame1);
super();
if (fInstance != null){
trace("Error: attempted to create more than one instance of Main");
return;
};
fInstance = this;
fStageW = 475;
fStageH = 500;
fTiefighterSND = new Tiefighter();
fStijgopSND = new Stijgop();
fRot = 0;
fStraal = 0;
fMaxStraal = 44;
fRotSpeed = 0;
fGameEngine = new GameEngine();
iHolder.addChild(fGameEngine);
iBack.gotoAndStop(10);
this.addEventListener(Event.ENTER_FRAME, EnterFrame);
}
public function onCLick1(_arg1:Event){
if (language.language_nr == 2){
request = new URLRequest(language.url1);
} else {
request = new URLRequest((language.url1 + "&utm_content=logo_intro"));
};
navigateToURL(request, "_blank");
}
public function onCLick3(_arg1:Event){
if (language.language_nr == 2){
request = new URLRequest(language.url1);
} else {
request = new URLRequest((language.url1 + "&utm_content=button_gameover_moregames"));
};
navigateToURL(request, "_blank");
}
public function onCLick4(_arg1:Event){
if (language.language_nr == 2){
request = new URLRequest(language.url1);
} else {
request = new URLRequest((language.url1 + "&utm_content=button_highscore_3000games"));
};
navigateToURL(request, "_blank");
}
public function onCLick2(_arg1:Event){
if (language.language_nr == 2){
request = new URLRequest(language.url1);
} else {
request = new URLRequest((language.url1 + "&utm_content=button_mainscreen_moregames"));
};
navigateToURL(request, "_blank");
}
private function EnterFrame(_arg1:Event):void{
iHolder.x = (fStraal * Math.sin(((fRot * Math.PI) / 180)));
iHolder.y = ((fStraal * Math.sin(((fRot * Math.PI) / 180))) * Math.sin((((2 * fRot) * Math.PI) / 180)));
fRot = (fRot + fRotSpeed);
fRotSpeed = (fRotSpeed + 1);
if ((fStraal - 1) >= 0){
fStraal = (fStraal - 1);
} else {
fStraal = 0;
};
}
public function initShake(_arg1, _arg2):void{
fRot = 0;
fRotSpeed = _arg1;
fStraal = _arg2;
}
function frame1(){
stop();
localConnection = new LocalConnection();
language.Language = 1;
intro.hitarea.button_intro.addEventListener(MouseEvent.CLICK, onCLick1);
button_mainscreen_moregames.addEventListener(MouseEvent.CLICK, onCLick2);
}
public static function getInstance():Main{
if (fInstance == null){
return (new (Main));
};
return (fInstance);
}
}
}//package
Section 45
//MenuScreen (MenuScreen)
package {
import flash.events.*;
import flash.display.*;
import flash.text.*;
public class MenuScreen extends MovieClip {
public var iScroller:MovieClip;
public var iScoreTXT:TextField;
public var iHiscoreTXT:TextField;
public var iStartButton:MovieClip;
private var fStageH:int;
public var iSoundButton:MovieClip;
var fGameEngine:MovieClip;
private var fStageW:int;
public function MenuScreen(_arg1, _arg2:int=0, _arg3:int=0){
fStageW = _arg2;
fStageH = _arg3;
fGameEngine = _arg1;
iStartButton.addEventListener(MouseEvent.MOUSE_UP, onUp);
iStartButton.addEventListener(MouseEvent.ROLL_OVER, RollOver);
iStartButton.addEventListener(MouseEvent.ROLL_OUT, RollOut);
iSoundButton.addEventListener(MouseEvent.MOUSE_UP, onMusicUp);
this.iScroller.x = (fStageW + 200);
this.addEventListener(Event.ENTER_FRAME, EnterFrame);
this.x = 0;
this.y = 0;
}
private function onMusicUp(_arg1:MouseEvent):void{
GameEngine.getInstance().musicOnOff();
}
private function doScroller():void{
this.iScroller.x = (this.iScroller.x - 1);
if (this.iScroller.x < -(this.iScroller.width)){
this.iScroller.x = (200 + fStageW);
};
}
private function RollOut(_arg1:MouseEvent):void{
iStartButton.gotoAndPlay(6);
}
private function kill():void{
Main.getInstance().iMenuHolder.removeChild(this);
Main.getInstance().button_mainscreen_moregames.visible = false;
Main.getInstance().iMoreGamesLogo.visible = false;
this.removeEventListener(Event.ENTER_FRAME, EnterFrame);
}
private function RollOver(_arg1:MouseEvent):void{
iStartButton.gotoAndPlay(2);
}
public function EnterFrame(_arg1:Event):void{
doScroller();
}
private function onUp(_arg1:MouseEvent):void{
fGameEngine.startUp();
kill();
}
}
}//package
Section 46
//MenuSND (MenuSND)
package {
import flash.media.*;
public dynamic class MenuSND extends Sound {
}
}//package
Section 47
//Meteor (Meteor)
package {
import flash.events.*;
import flash.display.*;
import nl.mad.utils.*;
import flash.media.*;
public class Meteor extends MovieClip {
public var fWidth:Number;
private var fStraal:Number;
private var fExplSND2:Sound;
public var fBullet:Boolean;
private var fEnergy:Number;
private var fForceStraal:Number;
private var fStageH:Number;
private var fRot:Number;
private var fStageW:Number;
private var fForcePerc:Number;
public var fHeight:Number;
private var fRotSpeed:Number;
private var fMain:MovieClip;
private var fOldEnergy:Number;
private var fSession:Number;
private var fForceXspeed:Number;
public var fXspeed:Number;
private var fForceYspeed:Number;
public var fYspeed:Number;
public var iMeteor:MovieClip;
private var fExplSND0:Sound;
private var fExplSND1:Sound;
private var fMeteorHolder:Sprite;
public function Meteor(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8=0){
var _local9:*;
var _local10:int;
super();
fMain = _arg1;
fBullet = false;
fStageW = fMain.gStageW;
fStageH = fMain.gStageH;
fMeteorHolder = _arg2;
fEnergy = _arg3;
this.width = (10 * fEnergy);
this.height = (10 * fEnergy);
fOldEnergy = fEnergy;
fWidth = (this.width / 2);
fHeight = (this.height / 2);
fSession = _arg7;
fExplSND0 = new BigExpl();
fExplSND1 = new BigExpl3();
fExplSND2 = new BigExpl4();
if (_arg5 == 0){
_local10 = Utils.random(1, 4);
switch (Utils.random(1, 4)){
case 1:
this.x = (-(fWidth) * 1.1);
this.y = Utils.random(0, fStageH);
break;
case 2:
this.x = (fStageW + (fWidth * 1.1));
this.y = Utils.random(0, fStageH);
break;
case 3:
this.x = Utils.random(0, fStageW);
this.y = (-(fHeight) * 1.1);
break;
case 4:
this.x = Utils.random(0, fStageW);
this.y = (fStageH + (fHeight * 1.1));
break;
};
fRot = Utils.random(0, 360);
} else {
this.x = _arg5;
this.y = _arg6;
if (_arg8 != 0){
fRot = Utils.random(80, 100);
} else {
fRot = Utils.random(0, 360);
};
};
if (Utils.random(2) == 0){
_local9 = -1;
} else {
_local9 = 1;
};
fRotSpeed = (_local9 * (Utils.random(0, 30) / 10));
fStraal = (_arg4 + ((Utils.random(0, 10) - 5) / 10));
fXspeed = (fStraal * Math.cos(((fRot * Math.PI) / 180)));
fYspeed = (fStraal * Math.sin(((fRot * Math.PI) / 180)));
fForceXspeed = 0;
fForceYspeed = 0;
fForcePerc = 0;
fForceStraal = 0;
this.iMeteor.gotoAndStop(Utils.random(1, 60));
if (_arg5 == 0){
if (_local10 < 3){
if (Math.abs(fXspeed) < 1){
fXspeed = 1;
};
} else {
if (Math.abs(fYspeed) < 1){
fYspeed = 1;
};
};
};
this.addEventListener(Event.ENTER_FRAME, EnterFrame);
}
public function setEnergy(_arg1):Number{
fEnergy = (fEnergy + _arg1);
if (fEnergy <= 0){
fEnergy = 0;
fMain.addScore(5);
kill();
};
return (fEnergy);
}
private function EnterFrame(_arg1:Event):void{
this.x = (this.x + (fXspeed + ((fForceXspeed * fForcePerc) / 30)));
this.y = (this.y + (fYspeed + ((fForceYspeed * fForcePerc) / 30)));
this.rotation = (this.rotation + fRotSpeed);
if ((fForcePerc - 1) >= 0){
fForcePerc--;
};
checkBorders();
checkSession();
}
public function getEnergy():Number{
return (fEnergy);
}
public function getHalfWidth():Number{
return (fWidth);
}
private function checkBorders():void{
if (this.x > (fStageW + (fWidth * 1.1))){
this.x = (-(fWidth) * 1.1);
} else {
if (this.x < (-(fWidth) * 1.1)){
this.x = (fStageW + (fWidth * 1.1));
} else {
if (this.y > (fStageH + (fHeight * 1.1))){
this.y = (-(fHeight) * 1.1);
} else {
if (this.y < (-(fHeight) * 1.1)){
this.y = (fStageH + (fHeight * 1.1));
};
};
};
};
}
public function doForce(_arg1, _arg2):void{
if ((5 * _arg2) > ((fForceStraal * fForcePerc) / 30)){
fForcePerc = 30;
fForceStraal = (5 * _arg2);
fForceXspeed = (fForceStraal * Math.cos(((_arg1 * Math.PI) / 180)));
fForceYspeed = (fForceStraal * Math.sin(((_arg1 * Math.PI) / 180)));
};
}
private function kill(_arg1=1):void{
if (_arg1){
if (GameEngine.getInstance().getSoundOn()){
this[("fExplSND" + Utils.random(3))].play();
};
fMain.addParticles((2 * Math.round(fWidth)), this.x, this.y, 360, 2, 20);
fMain.addFlash(this.x, this.y, 1, 7, ((3 * this.width) / 100), ((3 * this.height) / 100));
} else {
fMain.addFlash(this.x, this.y, 1, 7, ((3 * this.width) / 100), ((3 * this.height) / 100));
};
var _local2:* = Math.round((fOldEnergy / 1.5));
if (_local2 > 1){
fMain.createMeteor(2, _local2, fStraal, this.x, this.y);
};
this.removeEventListener(Event.ENTER_FRAME, EnterFrame);
fMeteorHolder.removeChild(this);
}
private function checkSession():void{
if (fSession != fMain.getSession()){
fOldEnergy = 0;
kill(0);
};
}
}
}//package
Section 48
//NewhiscoreSND (NewhiscoreSND)
package {
import flash.media.*;
public dynamic class NewhiscoreSND extends Sound {
}
}//package
Section 49
//Particle (Particle)
package {
import flash.events.*;
import flash.display.*;
import nl.mad.utils.*;
public class Particle extends MovieClip {
private var fStraal:Number;
private var fOrigXscale:Number;
private var fStageH:Number;
private var fRot:Number;
private var fYSpeed:Number;
private var fOrigYscale:Number;
private var fGravSpeed:Number;
private var fEndFrame:Number;
private var fStageW:Number;
public var iDriehoek:MovieClip;
private var fGrav:Number;
private var fFrame:int;
private var fXSpeed:Number;
private var fRotSpeed:Number;
private var fBackHolder:Sprite;
private var fDepth:Number;
private var fMain:MovieClip;
public function Particle(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7){
fMain = _arg1;
fRot = _arg2;
fBackHolder = _arg5;
fGrav = 0.1;
fGravSpeed = 0.1;
fEndFrame = _arg7;
fFrame = _arg6;
if (fFrame == 3){
fGrav = 0.4;
fRotSpeed = ((Utils.random(2) - 1) * Utils.random(30));
this.rotation = Utils.random(360);
} else {
this.rotation = fRot;
};
this.gotoAndStop(_arg6);
fOrigXscale = this.scaleX;
fOrigYscale = this.scaleY;
fDepth = (Utils.random(1, 10) / 10);
fStageW = fMain.gStageW;
fStageH = fMain.gStageH;
this.scaleX = fDepth;
this.scaleY = fDepth;
fStraal = (1 + (10 * fDepth));
this.x = _arg3;
this.y = _arg4;
fXSpeed = (fStraal * Math.cos(((fRot * Math.PI) / 180)));
fYSpeed = (fStraal * Math.sin(((fRot * Math.PI) / 180)));
this.addEventListener(Event.ENTER_FRAME, EnterFrame);
}
private function EnterFrame(_arg1:Event):void{
if (fFrame == 3){
this.rotation = (this.rotation + fRotSpeed);
};
this.x = (this.x + fXSpeed);
this.y = (this.y + (fYSpeed + fGrav));
fGrav = (fGrav + fGravSpeed);
if (--fEndFrame <= 0){
kill();
} else {
checkBorders();
};
}
private function resetStar():void{
kill();
}
private function kill():void{
this.removeEventListener(Event.ENTER_FRAME, EnterFrame);
fBackHolder.removeChild(this);
}
private function checkBorders(){
if (this.x > (fStageW + 40)){
resetStar();
} else {
if (this.x < -40){
resetStar();
} else {
if (this.y > (fStageH + 40)){
resetStar();
} else {
if (this.y < -40){
resetStar();
};
};
};
};
}
}
}//package
Section 50
//ShieldupSND (ShieldupSND)
package {
import flash.media.*;
public dynamic class ShieldupSND extends Sound {
}
}//package
Section 51
//Ship (Ship)
package {
import flash.events.*;
import flash.display.*;
import nl.mad.vector.*;
import nl.mad.utils.*;
import flash.media.*;
import flash.ui.*;
public class Ship extends MovieClip {
private var fOrigXscale:Number;
private var fStraal:Number;
private var fGameoverSND:Sound;
private var fShipDestroyedSND0:Sound;
private var fShipDestroyedSND1:Sound;
private var fDeadMaxTime:Number;
private var fSpeed:Number;
public var iShip0:MovieClip;
public var iShip1:MovieClip;
public var iShip2:MovieClip;
private var fStageH:int;
private var fRot:Number;
private var fBonusHolder:Sprite;
private var fStageW:int;
private var fOrigYscale:Number;
private var fInvinceWait:Number;
private var fDist:Number;
public var iShield:MovieClip;
private var fExplSND:Sound;
private var fOldRot:Number;
private var fMode:String;
private var fMaxStraal:Number;
private var fShootMaxTime:Number;
private var fMeteorHolder:Sprite;
private var fShootTime:Number;
private var fMaxSpeed:Number;
private var fTransp:Boolean;
private var fBulletHolder:Sprite;
private var fXspeed:Number;
private var fDeadTime:Number;
private var fEndFrame:int;
private var fCenterFrame:int;
private var fFlyawaySND:Sound;
private var fInvinceTime:Number;
private var fClicked:Boolean;
private var fWeaponMode:int;
private var fYspeed:Number;
private var fFlyinSND:Sound;
private var fMain:MovieClip;
private var fDepth:Number;
private var fInvinceMaxTime:Number;
public function Ship(_arg1, _arg2, _arg3, _arg4){
fMain = _arg1;
if (fMain.getFirstTime()){
fWeaponMode = 0;
} else {
fWeaponMode = 1;
};
fBulletHolder = _arg2;
fMeteorHolder = _arg3;
fBonusHolder = _arg4;
fStageW = fMain.gStageW;
fStageH = fMain.gStageH;
fOrigXscale = this.scaleX;
fOrigYscale = this.scaleY;
fShootMaxTime = 4;
fShootTime = fShootMaxTime;
fSpeed = 7;
fRot = 0;
fOldRot = 0;
fDeadMaxTime = 50;
fInvinceMaxTime = 90;
fInvinceTime = fInvinceMaxTime;
fInvinceWait = 0;
fTransp = false;
fMode = "waitIntroMovie";
fMaxStraal = 0;
fStraal = fMaxStraal;
fDepth = (Utils.random(1, 100) / 100);
this.iShip1.gotoAndStop("empty");
this.iShip2.gotoAndStop("empty");
this.iShip0.gotoAndPlay(1);
fClicked = false;
this.x = (fStageW / 2);
this.y = (fStageH / 2);
this.addEventListener(Event.ENTER_FRAME, EnterFrame);
fExplSND = new Expl();
fShipDestroyedSND0 = new ShipDestroyedSND();
fShipDestroyedSND1 = new ShipDestroyed2SND();
fGameoverSND = new GameoverSND();
fFlyawaySND = new FlyawaySND();
fFlyinSND = new FlyinSND();
if (GameEngine.getInstance().getSoundOn()){
fFlyinSND.play();
};
}
private function addBullet(_arg1=8, _arg2=true, _arg3=1):void{
var _local4:* = new Bullet(fMain, fRot, this.x, this.y, fStraal, fBulletHolder, this.iShip1.width, fMeteorHolder, _arg1, _arg3, _arg2);
fBulletHolder.addChild(_local4);
}
public function getXYROT():Array{
return ([this.x, this.y, fRot]);
}
public function doAwayMovie():void{
this.alpha = 1;
this.iShip0.gotoAndStop("empty");
this.iShip1.gotoAndStop("empty");
this.iShip2.gotoAndPlay(1);
if (GameEngine.getInstance().getSoundOn()){
fFlyawaySND.play();
};
fMode = "waitOutMovie";
if (GameEngine.getInstance().fShip.iShield.currentFrame != 1){
GameEngine.getInstance().fShip.iShield.gotoAndStop(1);
};
}
public function getRot():Number{
return (fRot);
}
public function undoClick():void{
if (fMode == "moving"){
fClicked = false;
fMaxStraal = 0;
};
}
private function EnterFrame(_arg1:Event):void{
switch (fMode){
case "waitIntroMovie":
aimShip();
if (this.iShip0.currentFrame == 41){
GameEngine.getInstance().endShipMovie();
fMode = "moving";
this.iShip0.gotoAndStop("empty");
this.iShip2.gotoAndStop("empty");
this.iShip1.gotoAndPlay(1);
};
break;
case "waitLevelInMovie":
aimShip();
if (this.iShip0.currentFrame == 41){
fMode = "moving";
this.iShip0.gotoAndStop("empty");
this.iShip2.gotoAndStop("empty");
this.iShip1.gotoAndPlay(1);
};
break;
case "waitOutMovie":
aimShip();
if (this.iShip2.currentFrame == 37){
if (((GameEngine.getInstance().fLevel + 1) % 2) == 0){
GameEngine.getInstance().startEnemyMovie();
fMode = "wait";
} else {
fMode = "waitIntroMovie";
this.iShip1.gotoAndStop("empty");
this.iShip2.gotoAndStop("empty");
this.iShip0.gotoAndPlay(1);
if (GameEngine.getInstance().getSoundOn()){
fFlyinSND.play();
};
};
};
break;
case "waitInMovie":
aimShip();
if (this.iShip0.currentFrame == 41){
fMode = "moving";
this.iShip0.gotoAndStop("empty");
this.iShip2.gotoAndStop("empty");
this.iShip1.gotoAndPlay(1);
};
break;
case "moving":
aimShip();
getMouseDist();
followMouse();
switch (GameEngine.getInstance().getWeaponMode()){
case 2:
if (fShootTime-- <= 0){
fShootTime = 2;
addBullet(14, true, 2);
};
break;
default:
if (fShootTime-- <= 0){
fShootTime = fShootMaxTime;
addBullet();
};
break;
};
if (fInvinceTime > 0){
fInvinceTime--;
if (GameEngine.getInstance().fShip.iShield.currentFrame != 2){
if (++fInvinceWait == 2){
fInvinceWait = 0;
if (fTransp){
this.alpha = 1;
fTransp = false;
} else {
this.alpha = 0.4;
fTransp = true;
};
};
} else {
if (fInvinceTime < 30){
if (++fInvinceWait == 2){
fInvinceWait = 0;
if (fTransp){
this.alpha = 1;
fTransp = false;
} else {
this.alpha = 0.4;
fTransp = true;
};
};
};
};
} else {
if (GameEngine.getInstance().fShip.iShield.currentFrame != 1){
GameEngine.getInstance().fShip.iShield.gotoAndStop(1);
};
if (fTransp){
this.alpha = 1;
fTransp = false;
};
checkCollission();
};
checkBonusHit();
break;
case "killed":
this.x = (this.x + fXspeed);
this.y = (this.y + fYspeed);
if (fDeadTime-- <= 0){
if (fMain.getLifes() < 0){
fMain.initMenu();
fMode = "idle";
} else {
fMaxStraal = 0;
this.visible = true;
this.iShip1.gotoAndStop("empty");
this.iShip2.gotoAndStop("empty");
this.iShip0.gotoAndPlay(1);
if (GameEngine.getInstance().getSoundOn()){
fFlyinSND.play();
};
fMode = "waitInMovie";
this.x = (fStageW / 2);
this.y = (fStageH / 2);
fMain.addFlash(this.x, this.y, 1, 7, 1.5, 1.5);
fInvinceTime = fInvinceMaxTime;
};
};
break;
};
}
public function addSpeed(_arg1):void{
fSpeed = (fSpeed + _arg1);
}
private function getMouseDist():void{
fDist = VectorCalc.getDist((fMain.mouseX - this.x), (fMain.mouseY - this.y));
}
public function doClick():void{
if (fMode == "moving"){
fClicked = true;
fMaxStraal = fSpeed;
};
}
private function doPickUp(_arg1){
_arg1.kill();
fMain.addParticles((40 + Utils.random(60)), this.x, this.y, 360, 1, 13);
}
private function doHit(_arg1):void{
var _local2:*;
if (fMode != "killed"){
fXspeed = _arg1.fXspeed;
fYspeed = _arg1.fYspeed;
fMain.addFlash(this.x, this.y, 1, 7, 1.5, 1.5);
fMain.addParticles((20 + Utils.random(20)), this.x, this.y, 360, 3, 20);
fMain.addParticles((40 + Utils.random(60)), this.x, this.y, 360, 4, 20);
if (GameEngine.getInstance().getSoundOn()){
fExplSND.play();
};
Main.getInstance().iBack.gotoAndPlay(2);
this.visible = false;
if (fMain.getLifes() == 0){
_local2 = fMain.getDisplay();
_local2.iInfo.gotoAndStop(3);
Main.getInstance().button_mainscreen_moregames.visible = true;
Main.getInstance().iMoreGamesLogo.visible = true;
fDeadTime = (2 * fDeadMaxTime);
Main.getInstance().initShake(7, (1.3 * Main.getInstance().fMaxStraal));
if (GameEngine.getInstance().getSoundOn()){
fGameoverSND.play();
};
} else {
if (GameEngine.getInstance().getSoundOn()){
this[("fShipDestroyedSND" + Utils.random(2))].play();
};
Main.getInstance().initShake(7, Main.getInstance().fMaxStraal);
fDeadTime = fDeadMaxTime;
};
fClicked = false;
fMode = "killed";
fMain.addLifes(-1);
};
}
private function aimShip():void{
fRot = (this.rotation = VectorCalc.getVectorRot((fMain.mouseX - this.x), (fMain.mouseY - this.y)));
}
private function checkCollission():void{
var _local2:*;
var _local1:int;
while (_local1 < fMeteorHolder.numChildren) {
_local2 = fMeteorHolder.getChildAt(_local1);
if (VectorCalc.getDist((this.x - _local2.x), (this.y - _local2.y)) < (4 + (_local2.width / 2))){
doHit(_local2);
};
_local1++;
};
}
private function checkBonusHit(){
var _local2:Bonus;
var _local1:int;
while (_local1 < fBonusHolder.numChildren) {
_local2 = Bonus(fBonusHolder.getChildAt(_local1));
if (_local2.hitTestObject(this)){
doPickUp(_local2);
};
_local1++;
};
}
public function setInvinceTime(_arg1){
fInvinceTime = _arg1;
}
public function doInMovie():void{
this.alpha = 1;
fMode = "waitIntroMovie";
this.iShip1.gotoAndStop("empty");
this.iShip2.gotoAndStop("empty");
this.iShip0.gotoAndPlay(1);
if (GameEngine.getInstance().getSoundOn()){
fFlyinSND.play();
};
if (GameEngine.getInstance().fShip.iShield.currentFrame != 1){
GameEngine.getInstance().fShip.iShield.gotoAndStop(1);
};
}
private function followMouse():void{
var _local1:* = 1;
if (fDist < 25){
_local1 = 0;
} else {
if (fDist < 50){
_local1 = ((fDist - 25) / 25);
};
};
fStraal = (_local1 * fMaxStraal);
var _local2:* = (fStraal * Math.cos(((fRot * Math.PI) / 180)));
var _local3:* = (fStraal * Math.sin(((fRot * Math.PI) / 180)));
this.x = (this.x + (_local2 * _local1));
this.y = (this.y + (_local3 * _local1));
}
}
}//package
Section 52
//ShipDestroyed2SND (ShipDestroyed2SND)
package {
import flash.media.*;
public dynamic class ShipDestroyed2SND extends Sound {
}
}//package
Section 53
//ShipDestroyedSND (ShipDestroyedSND)
package {
import flash.media.*;
public dynamic class ShipDestroyedSND extends Sound {
}
}//package
Section 54
//Shot (Shot)
package {
import flash.media.*;
public dynamic class Shot extends Sound {
}
}//package
Section 55
//Shot1 (Shot1)
package {
import flash.media.*;
public dynamic class Shot1 extends Sound {
}
}//package
Section 56
//Shot2 (Shot2)
package {
import flash.media.*;
public dynamic class Shot2 extends Sound {
}
}//package
Section 57
//SpeedupSND (SpeedupSND)
package {
import flash.media.*;
public dynamic class SpeedupSND extends Sound {
}
}//package
Section 58
//Star (Star)
package {
import flash.events.*;
import flash.display.*;
import nl.mad.utils.*;
public class Star extends MovieClip {
private var fStraal:Number;
private var fMain:MovieClip;
private var fBorder:int;
private var fRot:Number;
private var fStageH:Number;
private var fOrigYscale:Number;
private var fOrigXscale:Number;
private var fDepth:Number;
private var fStageW:Number;
public function Star(_arg1){
fMain = _arg1;
fOrigXscale = this.scaleX;
fOrigYscale = this.scaleY;
fDepth = (Utils.random(1, 100) / 100);
fStageW = fMain.gStageW;
fStageH = fMain.gStageH;
this.scaleX = fDepth;
this.scaleY = fDepth;
fStraal = (1 + (10 * fDepth));
fStraal = (fStraal * 0.2);
this.x = Utils.random(0, fStageW);
this.y = Utils.random(0, fStageH);
fBorder = (Main.getInstance().fMaxStraal + 2);
this.addEventListener(Event.ENTER_FRAME, EnterFrame);
}
private function EnterFrame(_arg1:Event):void{
fRot = (fMain.getShipRot() - 180);
var _local2:* = (fStraal * Math.cos(((fRot * Math.PI) / 180)));
var _local3:* = (fStraal * Math.sin(((fRot * Math.PI) / 180)));
this.x = (this.x + _local2);
this.y = (this.y + _local3);
if (this.x > (fStageW + fBorder)){
this.x = (this.x - (fStageW + (2 * fBorder)));
} else {
if (this.x < -(fBorder)){
this.x = (this.x + (fStageW + (2 * fBorder)));
} else {
if (this.y > (fStageH + fBorder)){
this.y = (this.y - (fStageH + (2 * fBorder)));
} else {
if (this.y < -(fBorder)){
this.y = (this.y + (fStageH + (2 * fBorder)));
};
};
};
};
}
}
}//package
Section 59
//StartSND (StartSND)
package {
import flash.media.*;
public dynamic class StartSND extends Sound {
}
}//package
Section 60
//StartSND2 (StartSND2)
package {
import flash.media.*;
public dynamic class StartSND2 extends Sound {
}
}//package
Section 61
//Stijgop (Stijgop)
package {
import flash.media.*;
public dynamic class Stijgop extends Sound {
}
}//package
Section 62
//Tiefighter (Tiefighter)
package {
import flash.media.*;
public dynamic class Tiefighter extends Sound {
}
}//package
Section 63
//WeaponSND (WeaponSND)
package {
import flash.media.*;
public dynamic class WeaponSND extends Sound {
}
}//package