STORY   LOOP   FURRY   PORN   GAMES
• C •   SERVICES [?] [R] RND   POPULAR
Archived flashes:
228129
/disc/ · /res/     /show/ · /fap/ · /gg/ · /swf/P0001 · P2561 · P5121

<div style="position:absolute;top:-99px;left:-99px;"><img src="http://swfchan.com:57475/22130499?noj=FRM22130499-15DC" width="1" height="1"></div>

85447720.swf

This is the info page for
Flash #12292

(Click the ID number above for more basic data on this flash file.)


Text
Actions

127kb / 3000 kb
93%

Visit ArmorGames.com While You Wait!

<p align="center"><font face="_typewriter_18pt_st" size="18" color="#ffffff"><b>Visit</b></font></p><p align="center"><font face="_typewriter_18pt_st" size="18" color="#cbebfe"><b>ProbeHumanity.com</b></font></p><p align="center"></p><p align="center"><font face="_typewriter_18pt_st" size="18" color="#ffffff"><b>For Tips, Tricks, Cheats and News </b></font></p><p align="center"><font face="_typewriter_18pt_st" size="18" color="#ffffff"><b>on the Alien Abduction Series</b></font></p>

The Moon
Rulez #1

PLAY

HOW TO PLAY

HIGH SCORES

UNLOCK STUFF

SETTINGS

CREDITS

PLAY MORE GAMES

BACK

<p align="center"><font face="Spidershank" size="22" color="#ffffff"><b>Developed By</b></font></p><p align="center"><font face="Spidershank" size="27" color="#3399ff"><b> Jared Riley</b><font size="22"><b> </b></font></font></p><p align="center"><font face="Spidershank" size="20" color="#00ccff"><a href="mailto:info@herointeractive.com"><b>Hero Interactive, LCC</b></a></font></p><p align="center"></p>

Special Thanks To
Ethan Watrall
Brian Winn
Steph Orvis

<p align="center"><font face="Spidershank" size="27" color="#ffffff"><b>Based Off of Alien Abduction</b></font></p><p align="center"><font face="Spidershank" size="18" color="#ffffff"><b>by</b></font></p><p align="center"><font face="Spidershank" size="22" color="#0099ff"><a href="http://www.jjchandler.com"><b>JJ Chandler</b></a></font></p><p align="center"><font face="Spidershank" size="22" color="#0099ff"><a href="http://www.msu.edu/~flower49"><b>Amanda Flowers</b></a></font></p><p align="center"><font face="Spidershank" size="22" color="#0099ff"><a href="http://www.msu.edu/~mulhol11/"><b>Mike Mulholland</b></a></font></p><p align="center"><font face="Spidershank" size="22" color="#0099ff"><a href="http://www.herointeractive.com"><b>Jared Riley</b></a></font></p>

Alien Abduction II

<p align="center"><font face="_sans" size="16" color="#ffffff">Welcome to Alien Abduction II</font></p><p align="center"></p><p align="center"><font face="_sans" size="14" color="#ffffff">This tutorial will help get you familiar with the <sbr />game. &nbsp;To continue, just click &quot;Next&quot; below.</font></p>

<p align="center"><font face="_sans" size="16" color="#ffffff">Welcome to Alien Abduction II</font></p><p align="center"></p><p align="center"><font face="_sans" size="14" color="#ffffff">This tutorial will help get you familiar with the <sbr />game. &nbsp;To continue, just click &quot;Next&quot; below.</font></p>

<p align="center"><font face="_sans" size="16" color="#ffffff">Welcome to Alien Abduction II</font></p><p align="center"></p><p align="center"><font face="_sans" size="14" color="#ffffff">This tutorial will help get you familiar with the <sbr />game. &nbsp;To continue, just click &quot;Next&quot; below.</font></p>

<p align="center"><font face="_sans" size="16" color="#ffffff">Welcome to the Alien Abduction II</font></p><p align="center"></p><p align="center"><font face="_sans" size="14" color="#ffffff">This tutorial will help get you familiar with the <sbr />game. &nbsp;To continue, just click &quot;Next&quot; below.</font></p>

This is your ship.  Yup, it's you.

It may not look like much, nor have any
weapons, but it does have a very handy
tool...

This is your ship.  Yup, it's you.

It may not look like much, nor have any
weapons, but it does have a very handy
tool...

This is your ship.  Yup, it's you.

It may not look like much, nor have any
weapons, but it does have a very handy
tool...

Use the arrow keys to move the
spaceship in the desired direction.

With most levels, there will be more stuff
off the screen to the left and to the right. 
Just keep flying in the direction you want
and the screen will pan over.

This is your ship.  Yup, it's you.

It may not look like much, nor have any
weapons, but it does have a very handy
tool...

Use the arrow keys to move the
spaceship in the desired direction.

With most levels, there will be more stuff
off the screen to the left and to the right. 
Just keep flying in the direction you want
and the screen will pan over.

Use the arrow keys to move the
spaceship in the desired direction.

With most levels, there will be more stuff
off the screen to the left and to the right. 
Just keep flying in the direction you want
and the screen will pan over.

Use the spacebar to activate your tractor
beam.

This handy beam can pick up all sorts of
stuff... like rocks, igloos, tanks, and of
course, people!

Use the arrow keys to move the
spaceship in the desired direction.

With most levels, there will be more stuff
off the screen to the left and to the right. 
Just keep flying in the direction you want
and the screen will pan over.

P

E

Your mission is to collect as many
specimens, aka people, for probing until
your "Purple People Meter" is full.

Once full, you'll get to continue to the next
level.

The yellow bar above your people meter
is your energy indicator.  As you leave
your beam on, your ship's power will
drain.

When energy reaches 0, you're beam will
shut down temporarily, dropping anything
you've picked up.

Your mission is to collect as many
specimens, aka people, for probing until
your "Purple People Meter" is full.

Once full, you'll get to continue to the next
level.

The yellow bar above your people meter
is your energy indicator.  As you leave
your beam on, your ship's power will
drain.

When energy reaches 0, you're beam will
shut down temporarily, dropping anything
you've picked up.

The yellow bar above your people meter
is your energy indicator.  As you leave
your beam on, your ship's power will
drain.

When energy reaches 0, you're beam will
shut down temporarily, dropping anything
you've picked up.

The yellow bar above your people meter
is your energy indicator.  As you leave
your beam on, your ship's power will
drain.

When energy reaches 0, you're beam will
shut down temporarily, dropping anything
you've picked up.

Watch out for pesky MIB agents.

They can't be beamed up (because of
their anti-beam shields of course) and if
they spot you, they'll take a picture and
run away.

Watch out for pesky MIB agents.

They can't be beamed up (because of
their anti-beam shields of course) and if
they spot you, they'll take a picture and
run away.

Watch out for pesky MIB agents.

They can't be beamed up (because of
their anti-beam shields of course) and if
they spot you, they'll take a picture and
run away.

Agents that have spotted you are
indicated by a rotating circle.

In order to stop the agents once they've
spotted you, you'll need to drop
something, anything, on them to kill them.

Watch out for pesky MIB agents.

They can't be beamed up (because of
their anti-beam shields of course) and if
they spot you, they'll take a picture and
run away.

Agents that have spotted you are
indicated by a rotating circle.

In order to stop the agents once they've
spotted you, you'll need to drop
something, anything, on them to kill them.

Agents that have spotted you are
indicated by a rotating circle.

In order to stop the agents once they've
spotted you, you'll need to drop
something, anything, on them to kill them.

Agents that have spotted you are
indicated by a rotating circle.

In order to stop the agents once they've
spotted you, you'll need to drop
something, anything, on them to kill them.

Your best bet is to stay out of view of the
agents.

Remember:  agents can only see a short
distance in front of them.

Your best bet is to stay out of view of the
agents.

Remember:  agents can only see a short
distance in front of them.

Your best bet is to stay out of view of the
agents.

Remember:  agents can only see a short
distance in front of them.

=

= Energy drops to 0

=

= You lose a life

You also face a number of other
enemies, including helicopters, space
ships, and hell demons.

Air units will fire blue energy sapping orbs
that will drop your energy down to 0.

Ground units will fire red orbs that will kill
you on impact.

Your best bet is to stay out of view of the
agents.

Remember:  agents can only see a short
distance in front of them.

You also face a number of other
enemies, including helicopters, space
ships, and hell demons.

Air units will fire blue energy sapping orbs
that will drop your energy down to 0.

Ground units will fire red orbs that will kill
you on impact.

=

= Energy drops to 0

=

= You lose a life

You also face a number of other
enemies, including helicopters, space
ships, and hell demons.

Air units will fire blue energy sapping orbs
that will drop your energy down to 0.

Ground units will fire red orbs that will kill
you on impact.

You also face a number of other
enemies, including helicopters, space
ships, and hell demons.

Air units will fire blue energy sapping orbs
that will drop your energy down to 0.

Ground units will fire red orbs that will kill
you on impact.

Two other points to remember:

1) You can find little purple orbs scattered
around the levels.  Not only can you pick
these up to unlock extra content, but if
you're in a bind, they can also be used as
weapons to drop on your enemies!

2) You can press 'p' at anytime to pause
the game.  From the pause menu you
can quit and get to the main screen.

Good Luck!

Two other points to remember:

1) You can find little purple orbs scattered
around the levels.  Not only can you pick
these up to unlock extra content, but if
you're in a bind, they can also be used as
weapons to drop on your enemies!

2) You can press 'p' at anytime to pause
the game.  From the pause menu you
can quit and get to the main screen.

Good Luck!

NeXT

Users with Bagunk profiles are highlighted Blue.

VIEW ALL SCORES

High Score Board

Now loading...

Name

People

POwered  By

. COM

k

n

u

g

a

BUY

USE ORIG.

USE NEW

Play Level

UNLOCK EXTRAS

( 2 PTS )

OUTAKE #1

OUTAKE #2

OUTAKE #3

OUTAKE #4

OUTAKE #5

OUTAKE #6

OUTAKE #7

ORIG. SONG #1

ORIG. SONG #2

ORIG. SONG #3

ORIG. SONG #4

SPACESHIP

BONUS LEVEL

Ok, so they aren't AmAzInG extras (in fact, some are just plain lame), but there was a lot of extra content that didn't make it in the final game.   Here's your chance to check some of the stuff out, and even unlock alternate content.

COST:

Unlock Extras!

Various Points

SETTINGS

vIDEO

MUSIC

SOUNDS

Low

Medium

High

On

Off

On

Off

BACK

56

Not Too Shabby!

GAME OVER

X

MAIN MENU

SUBMIT SCORE

PlAY MORE GAMES

X

0

1:30:00

Sounds

20pts!

GO TO MAIN MENU

Game Paused

0

Your Name Here

Click HERE to Login to Bagunk and Submit

<p align="center"><font face="_sans" size="14" color="#ffffff">You need a Bagunk.com account. If you don&apos;t have one, but want to link <sbr />the score to a profile, <font color="#66ccff"><a href="http://www.bagunk.com/" target = "_blank"><b>CLICK HERE</b></a></font> to create one quick!</font></p>

SUBMIT

- or -

SUBMIT SCORE

0

1:30:00

Do Not Enter

Do Not E

0

1:30:00

0

1:30:00

0

1:30:00

Whoops! Lose
something?

0

LEVEL

0

1:30:00

0

1:30:00

Hangar A

Research Bunker

Tank Research

Space Research

Welcome to Fabulous
Area 51

Nuclear Testing
Zone

Hangar A

Hangar B

Hangar C

0

1:30:00

0

1:30:00

0

1:30:00

0

1:30:00

ActionScript [AS1/AS2]

Frame 1
stop(); _global.bonusPoints = 0; _global.shipUsed = 1; _global.arrPurchased = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); _global.myMusicPlayer = new Music(); _global.SoundManager = new SoundPlayer(); _global.musicOn = true; _global.soundOn = true;
Instance of Symbol 304 MovieClip in Frame 1
onClipEvent (load) { myFlag = 0; Counter = -1; totalFileSize = _root.getBytesTotal(); startBytes = _root.getBytesLoaded(); _root.continueButton._visible = false; } onClipEvent (enterFrame) { if (Counter == -1) { bytesLoaded = _root.getBytesLoaded(); amountLoaded = bytesLoaded / totalFileSize; percentLoaded = int(100 * amountLoaded); _root.preloader.inside._xscale = percentLoaded; myMessageOne = ((int(bytesLoaded / 1024) + "kb / ") + int(totalFileSize / 1024)) + "kb"; myMessageOne = ((myMessageOne + newline) + percentLoaded) + "%"; _root.loadingVars = myMessageOne; if ((amountLoaded >= 1) && (myFlag == 0)) { myFlag = 1; _root.continueButton._visible = true; _root.loadingText = "Loading Completed"; Counter = 20; } } else if (Counter == 0) { okToPlay = true; siteURL = "http://www.herointeractive.com"; siteURL2 = "http://herointeractive.com"; if ((_url.substr(0, siteURL.length) == siteURL) || (_url.substr(0, siteURL2.length) == siteURL2)) { okToPlay = true; } if (okToPlay) { _root.gotoAndPlay("endBufferAudio"); } } else { Counter--; } }
Frame 2
stop();
Instance of Symbol 304 MovieClip in Frame 2
onClipEvent (load) { } onClipEvent (enterFrame) { }
Frame 3
function initializeLevel(currentLevel, nextLevel, leftMax, rightMax, nonDestructable, timeToWin, peopleToGet) { var _local1 = _global; var _local2 = _root; identifierNumber = currentLevel; myNextLevel = nextLevel; panLimitLeft = leftMax; panLimitRight = rightMax; nonDestructableType = nonDestructable; timeToBeat = timeToWin; _local1.totalPeopleToGet = peopleToGet; if (_local1.tempLives < 0) { _local1.livesLeft = 3; } else { _local1.livesLeft = _local1.tempLives; } energyFlag = 0; pickUpFlag = 0; dropSpeed = 0; groundLevel = _local2.truck._y; truckFlag = 0; dx = 0; dy = 0; if (_local1.tempPeople < 0) { _local1.currentPeople = 0; } else { _local1.currentPeople = _local1.tempPeople; } _local1.tempPeople = 0; _local1.tempLives = 0; _local1.tempFrame = identifierNumber; if (timeToBeat == -1) { _local1.nextTime = -1; _local2.updateTimer(); } else { if ((_local1.nextTime == -1) && (timeToBeat != -1)) { _local1.nextTime = 0; } if (_local1.nextTime != -1) { if (_local1.stolenTime == 0) { _local1.nextTime = getTimer() + (timeToBeat * 1000); } else { _local1.nextTime = _local1.nextTime + (getTimer() - _local1.stolenTime); _local1.stolenTime = 0; } } } _local1.stolenTime = 0; if (_local1.shipUsed == 1) { _local2.ship.gotoAndStop("ship1"); } else { _local2.ship.gotoAndStop("ship2"); } } function addPersonType(myLinkage, myType, myWeight) { availPeople.push({linkage:myLinkage, type:myType, weight:myWeight}); } function playSound(soundName) { if (_global.volume == true) { mySoundPlayer.PlaySound(soundName); } } function startMusicDownload(music) { var _local1 = _global; if (_local1.musicOn == true) { _local1.mySound.stop(); _local1.mySound.attachSound(music); _local1.mySound.start(0, 99); _local1.mySound.setVolume(myVolume); } else { _root.volumeClip.gotoAndStop(2); _local1.mySound.stop(); } mySong = music; } function toggleMusic() { var _local1 = _global; if (_local1.volume == true) { _local1.mySound.attachSound(mySong); _local1.mySound.start(0, 99); _local1.mySound.setVolume(myVolume); _local1.musicOn = true; } else { _local1.mySound.stop(); _local1.mySound.setVolume(myVolume); _local1.musicOn = false; } } function updateTimer() { var _local1 = _global; if (_local1.nextTime == -1) { timeText = "NO LIMIT"; } else { myTime = _local1.nextTime - getTimer(); mySecs = math.floor(myTime / 1000); if (mySecs == 0) { _local1.livesLeft = 0; prepareForFrameChange(false, 0); } if (mySecs > 60) { someSeconds = myTime / 1000; someMinutes = someSeconds / 60; if (someSeconds > 59) { someSeconds = someSeconds - (Math.floor(someMinutes) * 60); } if (someSeconds < 10) { textMinutes = someMinutes; timeText = (Math.floor(textMinutes) + ":0") + Math.floor(someSeconds); } else if (someSeconds == 0) { textMinutes = someMinutes; timeText = Math.floor(textMinutes) + ":00"; } else { textMinutes = someMinutes; timeText = (Math.floor(textMinutes) + ":") + Math.floor(someSeconds); } } else { timeText = Math.floor(mySecs); } } } function updateLives(lifeNum) { var _local1 = lifeNum; if (_local1 < 0) { _local1 = 0; } lives = _local1; } function prepareForFrameChange(newLevel, levelNum) { var _local1 = _global; var _local2 = _root; _local1.tempLives = _local1.livesLeft; _local1.tempPeople = _local1.currentPeople; cleanScreen(); if ((_local1.livesLeft > 0) && (newLevel == false)) { _local1.stolenTime = getTimer(); _local2.goToAndPlay("loseLife"); } else if ((_local1.livesLeft > 0) && (newLevel == true)) { _local1.tempPeople = -1; _local1.tempFrame = levelNum; _local2.goToAndPlay("levelText"); } else if (_local1.livesLeft == 0) { _local2.goToAndPlay("endGame"); } } function cleanScreen() { var _local1 = _root; i = 0; while (i < objectArray.length) { _local1[objectArray[i].Name].removeMovieClip(); i++; } i = 0; while (i < deadArray.length) { _local1[deadArray[i]].removeMovieClip(); i++; } i = 0; while (i < targetArray_Name.length) { _local1[targetArray_Name[i]].removeMovieClip(); i++; } i = 0; while (i < bulletArray.length) { _local1[bulletArray[i]].removeMovieClip(); i++; } } function setPeopleTimer(mPeople, pFrequency) { var _local1 = _root; myZ2 = Math.round(_local1.z2._y); myZ1 = Math.round(_local1.z1._y); _local1.z1._y = -50; _local1.z2._y = -50; i = myZ1; while (i < myZ2) { zArray.push(i); zStack.push(1); i++; } percentFrequency = pFrequency; maxPeople = mPeople; } function runTimer() { if (numPeople != maxPeople) { if (random(255) < percentFrequency) { numPeople++; addPersonDynamic(false); } } } function rangeInUse(minZ, maxZ) { var _local2 = maxZ; var _local3 = minZ; var _local1 = false; i = 0; while (i < objectArray.length) { if ((objectArray[i].ZStack >= _local3) && (objectArray[i].ZStack <= _local2)) { _local1 = true; } i++; } return(_local1); } function startBeamTags() { var _local1 = _root; i = 0; while (i < objectArray.length) { if (_local1.beam.hitTest(_local1[objectArray[i].Name]) == true) { if (objectArray[i].Beamed == 0) { _local1[objectArray[i].Name].goToAndPlay("beamed"); objectArray[i].Beamed = 1; objectArray[i].Dy = 0; if (objectArray[i].Type == "tank") { _local1[objectArray[i].Name].HoldFire(); } } if (objectArray[i].Beamed == 2) { _local1[objectArray[i].Name].goToAndStop("endbeam"); objectArray[i].Beamed = 1; objectArray[i].Dy = 0; } } i++; } } function debugStatus() { trace("Name type beamed timer"); trace("----------------------------------------"); i = 0; while (i < objectArray.length) { trace((((((((((objectArray[i].Name + " ") + objectArray[i].Type) + " ") + objectArray[i].Beamed) + " ") + objectArray[i].Timer) + " ") + objectArray[i].Spotted) + " ") + objectArray[i].Direction); i++; } trace("----------------------------------------"); } function removeBeamTags() { var _local1 = _root; i = 0; while (i < objectArray.length) { if ((objectArray[i].Beamed == 1) && (objectArray[i].Type != "agent")) { objectArray[i].Beamed = 2; objectArray[i].FallHeight = _local1[objectArray[i].Name]._y; } else if ((objectArray[i].Beamed == 1) && (objectArray[i].Type == "agent")) { objectArray[i].Beamed = 0; objectArray[i].Timer = 1; } i++; } } function addUnit(name, newSpeed, myLinkage, givenType) { var _local1 = _root; var _local2 = name; var _local3 = newSpeed; tempX = _local1[_local2]._x; tempY = _local1[_local2]._y; wantY = Math.round(tempY); flag = -1; myZStack = -1; i = 0; while (i < zArray.length) { if (zArray[i] == wantY) { flag = i; myZstack = zStack[i]; } i++; } if (flag != -1) { zArray.splice(flag, 1); zStack.splice(flag, 1); } _local1[_local2]._visible = false; _local2 = givenType + identifierNumber; identifierNumber++; _local1.attachMovie(myLinkage, _local2, wantY * 100); if (givenType == "tank") { _local1[_local2].SetFireRate(40); tankArray.push({track:wantY, occupied:true, tank:_local2}); } _local1[_local2]._x = tempX; _local1[_local2]._y = tempY; x = 275; if ((_local1[_local2]._x <= x) && (_local3 != 0)) { dir = _local3; _local1[_local2]._xscale = -Math.abs(_local1[_local2]._xscale); if (myLinkage == "antiAir") { _local1[_local2]._xscale = _local1[_local2]._xscale * -1; } } else { dir = -1 * _local3; } var groundLevel = Math.round(_local1[_local2]._y + (_local1[_local2]._height / 2)); objectArray.push({Name:_local2, Beamed:0, Type:givenType, Ground:groundLevel, Dx:0, Dy:0, Timer:0, Spotted:0, Linkage:myLinkage, ZStack:myZStack, Direction:dir, FallHeight:0}); return(_local2); } function generateEthan() { addPersonDynamic(true); } function addPersonDynamic(isEthan) { if (zArray.length == 0) { return(null); } if (isEthan == false) { r = random(2); switch (r) { case 0 : var _local3 = 0; var _local2 = -1; var _local1 = 0; while (_local1 < availPeople.length) { _local3 = _local3 + availPeople[_local1].weight; _local1++; } var chosenWeight = Math.round(Math.random() * _local3); _local1 = 0; while (_local1 < availPeople.length) { if ((chosenWeight > _local2) && (chosenWeight <= (_local2 + availPeople[_local1].weight))) { myGuy = availPeople[_local1].linkage; myType = availPeople[_local1].type; break; } _local2 = _local2 + availPeople[_local1].weight; _local1++; } break; case 1 : myGuy = "MIB"; myType = "agent"; } } else { myGuy = "ethan"; myType = "person"; } r = random(zArray.length); z = zArray[r]; zs = zStack[r]; zArray.splice(r, 1); zStack.splice(r, 1); name = "unique" + identifierNumber; identifierNumber++; _root.attachMovie(myGuy, name, z * 100); r = random(2); if (r == 0) { x = _root.boundingbox._x + (_root.boundingbox._width / 2); } else { x = _root.boundingbox._x - (_root.boundingbox._width / 2); } _root[name]._x = x; _root[name]._y = z; x = _root.hills._x; if (_root[name]._x <= x) { dir = 1; if (myType == "agent") { _root[name]._xscale = -Math.abs(_root[name]._xscale); } } else { dir = -1; if (myType != "agent") { _root[name]._xscale = -Math.abs(_root[name]._xscale); } } _root[name].goToAndPlay("walk"); objectArray.push({Name:name, Beamed:0, Type:myType, Ground:z, Dx:0, Dy:0, Timer:0, Spotted:0, Linkage:myGuy, ZStack:zs, Direction:dir, FallHeight:0}); return(undefined); } function addTank(name, newSpeed, myLinkage, myTrack) { var _local1 = _root; var _local3 = myTrack; var _local2 = "tank"; if (tanksToUse == "red") { _local2 = "redTank"; } if (tanksToUse == "white") { _local2 = "whiteTank"; } _local1.attachMovie(_local2, name, _local3 * 100); r = random(2); if (r == 0) { x = _local1.boundingbox._x + (_local1.boundingbox._width / 2); } else { x = _local1.boundingbox._x - (_local1.boundingbox._width / 2); } _local1[name]._x = x; if (tanksToUse == "red") { _local1[name].SetFireRate(15); } else if (tanksToUse == "white") { _local1[name].SetFireRate(25); } else { _local1[name].SetFireRate(40); } _local1[name]._y = _local3; x = _local1.hills._x; if (_local1[name]._x <= x) { dir = 1; _local1[name]._xscale = _local1[name]._xscale * -1; } else { dir = -1; } _local1[name].goToAndPlay("idle"); objectArray.push({Name:name, Beamed:0, Type:"tank", Ground:_local3, Dx:0, Dy:0, Timer:0, Spotted:0, Linkage:"tank", ZStack:999999, Direction:dir, FallHeight:0}); } function makePeopleMove() { var _local1 = _root; var _local3 = _global; var queueRemoval = new Array(); i = 0; while (i < objectArray.length) { if (objectArray[i].Beamed == 0) { if (objectArray[i].Timer == 1) { if (_local3.debug == true) { trace(i); } if (_local1[objectArray[i].Name]._x < _local1.ship._x) { objectArray[i].Direction = -3; if (objectArray[i].Type == "person") { _local1[objectArray[i].Name]._xscale = -Math.abs(_local1[objectArray[i].Name]._xscale); } else if (objectArray[i].Type == "agent") { _local1[objectArray[i].Name]._xscale = Math.abs(_local1[objectArray[i].Name]._xscale); if (objectArray[i].Spotted == 0) { createTarget(i); objectArray[i].Spotted = 1; } } } else { objectArray[i].Direction = 3; if (objectArray[i].Type == "person") { _local1[objectArray[i].Name]._xscale = Math.abs(_local1[objectArray[i].Name]._xscale); } else if (objectArray[i].Type == "agent") { _local1[objectArray[i].Name]._xscale = -Math.abs(_local1[objectArray[i].Name]._xscale); if (objectArray[i].Spotted == 0) { createTarget(i); objectArray[i].Spotted = 1; } } } _local1[objectArray[i].Name].gotoandplay("run"); } if (objectArray[i].Timer > 0) { objectArray[i].Timer--; } _local1[objectArray[i].Name]._x = _local1[objectArray[i].Name]._x + objectArray[i].Direction; if ((_local1[objectArray[i].Name]._x < (_local1.boundingbox._x - (_local1.boundingbox._width / 2))) && (objectArray[i].Direction < 0)) { if (objectArray[i].Spotted == 1) { _local3.livesLeft--; _local1.updateLives(_local3.livesLeft); _local1.prepareForFrameChange(false, 0); if (_local3.livesLeft != 0) { var randSound = (Math.round(Math.random() * 5) + 1); } } if (objectArray[i].Type == "tank") { OpenTrack(objectArray[i].Name); } queueRemoval.push({name:objectArray[i].Name, detach:true, debNum:1}); } else if ((_local1[objectArray[i].Name]._x > (_local1.boundingbox._x + (_local1.boundingbox._width / 2))) && (objectArray[i].Direction > 0)) { if (objectArray[i].Spotted == 1) { _local3.livesLeft--; _local1.updateLives(_local3.livesLeft); _local1.prepareForFrameChange(false, 0); if (_local3.livesLeft != 0) { var randSound = (Math.round(Math.random() * 5) + 1); } } if (objectArray[i].Type == "tank") { OpenTrack(objectArray[i].Name); } queueRemoval.push({name:objectArray[i].Name, detach:true, debNum:2}); } } i++; } var _local2 = 0; while (_local2 < queueRemoval.length) { removeObject(queueRemoval[_local2].name, queueRemoval[_local2].detach, queueRemoval[_local2].debNum); _local2++; } tanksAim(); } function removeObject(objectName, removeFromScreen, debugNum) { var _local2 = removeFromScreen; var _local3 = _root; i = -1; var _local1 = 0; while (_local1 < objectArray.length) { if (objectArray[_local1].Name == objectName) { i = _local1; if (objectArray[_local1].Type != "tank") { zArray.push(objectArray[_local1].Ground); zStack.push(objectArray[_local1].ZStack); } if ((objectArray[_local1].Type != "object") && (objectArray[_local1].Type != "tank")) { numPeople--; } if (objectArray[_local1].Spotted == 1) { removeTarget(i); } if (_local2) { _local3[objectArray[_local1].Name].removeMovieClip(); } objectArray.splice(_local1, 1); return; } _local1++; } } function updateEnergyBar(current, total, flag) { var _local1 = _root; frac = current / total; _local1.energy._xscale = frac * 100; if (flag == 1) { _local1.energy.goToAndStop(2); } else { _local1.energy.goToAndStop(1); } } function updatePeopleBar(current, total) { var _local1 = current; var _local2 = total; var _local3 = _root; frac = _local1 / _local2; _local3.peopleToGo._xscale = frac * 100; myFrame = 10; frac = (_local1 / _local2) * 100; if (frac < 10) { myFrame = 1; } else if ((frac >= 10) && (frac < 20)) { myFrame = 2; } else if ((frac >= 20) && (frac < 30)) { myFrame = 3; } else if ((frac >= 30) && (frac < 40)) { myFrame = 4; } else if ((frac >= 40) && (frac < 50)) { myFrame = 5; } else if ((frac >= 50) && (frac < 60)) { myFrame = 6; } else if ((frac >= 60) && (frac < 70)) { myFrame = 7; } else if ((frac >= 70) && (frac < 80)) { myFrame = 8; } else if ((frac >= 80) && (frac < 90)) { myFrame = 9; } else if ((frac >= 90) && (frac <= 100)) { myFrame = 10; } if (oldValue != myFrame) { _local3.peopleToGo.goToAndStop(myFrame); } oldValue = myFrame; if ((_local1 == (_local2 - 2)) && (almostFlag == false)) { var randSound = (Math.round(Math.random() * 4) + 1); _local3.playSound("good" + randSound); almostFlag = true; } if (_local1 == _local2) { prepareForFrameChange(true, myNextLevel); } } function spotship() { var _local1 = _root; i = 0; while (i < objectArray.length) { if (((objectArray[i].Beamed == 0) && ((objectArray[i].Type == "person") || (objectArray[i].Type == "agent"))) && ((objectArray[i].Direction == 1) || (objectArray[i].Direction == -1))) { myDist = getDistance(i); if (myDist <= 175) { if (((objectArray[i].Direction == 1) && (_local1[objectArray[i].Name]._x < _local1.ship._x)) && (_local1[objectArray[i].Name]._x >= 50)) { _local1[objectArray[i].Name].gotoandplay("spot"); objectArray[i].Direction = 0; objectArray[i].Timer = 30; } else if (((objectArray[i].Direction == -1) && (_local1[objectArray[i].Name]._x > _local1.ship._x)) && (_local1[objectArray[i].Name]._x <= 500)) { _local1[objectArray[i].Name].gotoandplay("spot"); objectArray[i].Direction = 0; objectArray[i].Timer = 30; } } } i++; } } function tanksAim() { var _local3 = _root; var _local2 = 0; while (_local2 < objectArray.length) { if ((objectArray[_local2].Beamed == 0) && (objectArray[_local2].Type == "tank")) { var tankName = objectArray[_local2].Name; var point = {x:_local3[tankName].cannon._x, y:_local3[tankName].cannon._y}; _local3[tankName].localToGlobal(point); var op = (_local3.ship._y - point.y); var adj = (_local3.ship._x - point.x); if (adj == 0) { adj = 1; } var _local1 = (Math.atan(op / adj) * 180) / Math.PI; if (_local1 < 0) { _local1 = _local1 * -1; } if (_local1 > 90) { _local1 = 90; } if (_local1 < 20) { _local1 = 20; } _local3[tankName].cannon._rotation = _local1; } _local2++; } } function StartTankGenerator(min, max, color) { tanksToUse = color; blnUseTanks = true; tankSpawnTimeMin = min; tankSpawnTimeMax = max; tankCounter = Math.round(Math.random() * (tankSpawnTimeMax - tankSpawnTimeMin)) + tankSpawnTimeMin; } function TankGenerator() { if (blnUseTanks == true) { intAvailFlag = -1; var _local1 = 0; while (_local1 < tankArray.length) { if (tankArray[_local1].occupied == false) { intAvailFlag = _local1; break; } _local1++; } if (intAvailFlag != -1) { if (tankCounter == 0) { var _local2 = "tank" + identifierNumber; identifierNumber++; tankArray[intAvailFlag].occupied = true; tankArray[intAvailFlag].tank = _local2; addTank(_local2, 3, "tank", tankArray[intAvailFlag].track); tankCounter = Math.round(Math.random() * (tankSpawnTimeMax - tankSpawnTimeMin)) + tankSpawnTimeMin; } else { tankCounter--; } } } } function OpenTrack(tankName) { var _local2 = tankName; var _local1 = 0; while (_local1 < tankArray.length) { if (tankArray[_local1].tank == _local2) { tankArray[_local1].tank = ""; tankArray[_local1].occupied = false; trace(("track " + _local1) + " is open"); } _local1++; } } function LaunchBullet(bulletName, startX, startY, directionX, directionY) { var _local1 = bulletName; var _local3 = _root; var _local2 = ""; if ((substring(_local1, 0, 18)) == "bullet_helicopter_") { _local2 = "bullet air"; } else { _local2 = "bullet ground"; } _local3.attachMovie(_local2, _local1, bulletDepth); _local3[_local1]._x = startX; _local3[_local1]._y = startY; _local3[_local1].SetMovement(directionX, directionY); bulletArray.push(_local1); bulletDepth++; } function DetectBulletHits() { var _local1 = _root; var _local3 = new Array(); var _local2 = 0; while (_local2 < bulletArray.length) { distancex = _local1[bulletArray[_local2]]._x - _local1.ship._x; distancey = _local1[bulletArray[_local2]]._y - _local1.ship._y; if (Math.sqrt((distancex * distancex) + (distancey * distancey)) <= 19) { if ((substring(bulletArray[_local2], 0, 18)) == "bullet_helicopter_") { shipEnergy = 0; energyFlag = 1; _local1.ship.explosion.gotoAndPlay("shock"); _local3.push(bulletArray[_local2]); } else { _local1.ship.explosion.gotoAndPlay("explode"); _local1.playSound("explosion"); if (deathCounter == -1) { deathCounter = 16; } _local3.push(bulletArray[_local2]); } } _local2++; } _local2 = 0; while (_local2 < _local3.length) { RemoveBullet(_local3[_local2]); _local2++; } } function ObjectCleanup(itemName) { var _local1 = itemName; if (_local1.substr(0, 4) == "tank") { OpenTrack(_local1); } _root[_local1].removeMovieClip(); } function RemoveBullet(itemName) { var _local3 = itemName; var _local2 = -1; var _local1 = 0; while (_local1 < bulletArray.length) { if (bulletArray[_local1] == _local3) { _local2 = _local1; break; } _local1++; } if (_local2 != -1) { bulletArray.splice(_local2, 1); _root[_local3].removeMovieClip(); } } function addHelicopter(itemName, minSpawn, maxSpawn, mySpeed) { var _local1 = minSpawn; var _local2 = Math.round(Math.random() * (maxSpawn - _local1)) + _local1; heliArray.push({name:itemName, min:_local1, max:maxSpawn, counter:_local2, speed:mySpeed, inFlight:false, hasFired:false, isFiring:false}); } function ManageHelicopters() { var _local2 = _root; var _local1 = 0; while (_local1 < heliArray.length) { if (heliArray[_local1].inFlight == false) { if (heliArray[_local1].counter == 0) { heliArray[_local1].inFlight = true; _local2[heliArray[_local1].name]._x; r = random(2); if (r == 0) { x = _local2.boundingbox._x + (_local2.boundingbox._width / 2); _local2[heliArray[_local1].name]._xscale = 100; heliArray[_local1].speed = -Math.abs(heliArray[_local1].speed); } else { x = (_local2.boundingbox._x - (_local2.boundingbox._width / 2)) - _local2[heliArray[_local1].name]._width; _local2[heliArray[_local1].name]._xscale = -100; heliArray[_local1].speed = Math.abs(heliArray[_local1].speed); } _local2[heliArray[_local1].name]._x = x; var y = (Math.round(Math.random() * 151) + 53); _local2[heliArray[_local1].name]._y = y; } else { heliArray[_local1].counter--; } } else { if (heliArray[_local1].isFiring == false) { _local2[heliArray[_local1].name]._x = _local2[heliArray[_local1].name]._x + heliArray[_local1].speed; } if ((heliArray[_local1].hasFired == false) && (heliArray[_local1].isFiring == false)) { if (((_local2[heliArray[_local1].name]._x - _local2[heliArray[_local1].name]._width) > 0) && ((_local2[heliArray[_local1].name]._x + _local2[heliArray[_local1].name]._width) < Stage.width)) { _local2[heliArray[_local1].name].gotoAndPlay("shoot"); heliArray[_local1].isFiring = true; trace(heliArray[_local1].name + " has fired"); } } if (heliArray[_local1].hasFired == true) { if (((_local2[heliArray[_local1].name]._x + _local2[heliArray[_local1].name]._width) < (_local2.boundingbox._x - (_local2.boundingbox._width / 2))) || ((_local2[heliArray[_local1].name]._x - _local2[heliArray[_local1].name]._width) > (_local2.boundingbox._x + (_local2.boundingbox._width / 2)))) { trace("out of bounds"); heliArray[_local1].inFlight = false; var _local3 = Math.round(Math.random() * (heliArray[_local1].max - heliArray[_local1].min)) + heliArray[_local1].min; heliArray[_local1].counter = _local3; heliArray[_local1].hasFired = false; heliArray[_local1].isFiring = false; } } } _local1++; } } function HelicopterFire(name) { var _local3 = name; var _local2 = 0; var _local1 = 0; while (_local1 < heliArray.length) { if (heliArray[_local1].name == _local3) { _local2 = _local1; break; } _local1++; } var myName = ("bullet_helicopter_" + identifierNumber); identifierNumber++; var point = {x:_root[_local3].emitter1._x, y:_root[_local3].emitter1._y}; _root[_local3].localToGlobal(point); var bulletSpeed = 0; trace("helicopter speed is: " + heliArray[_local2].speed); if (heliArray[_local2].speed > 0) { bulletSpeed = heliArray[_local2].speed + 2; } else { bulletSpeed = heliArray[_local2].speed - 2; } LaunchBullet(myName, point.x, point.Y, bulletSpeed, 0); } function HelicopterDoneFiring(name) { var _local2 = name; var _local1 = 0; while (_local1 < heliArray.length) { if (heliArray[_local1].name == _local2) { heliArray[_local1].isFiring = false; heliArray[_local1].hasFired = true; return; } _local1++; } } function getDistance(i) { var _local1 = _root; distancex = _local1[objectArray[i].Name]._x - _local1.ship._x; distancey = _local1[objectArray[i].Name]._y - _local1.ship._y; return(Math.sqrt((distancex * distancex) + (distancey * distancey))); } function beamHorizontalAndVertical(asscheese, assY) { var _local1 = _root; var _local2 = asscheese; var _local3 = assY; i = 0; while (i < objectArray.length) { if ((objectArray[i].Beamed == 1) && (objectArray[i].Type != "agent")) { objectArray[i].Dx = _local2; if ((_local1.ship._x > 100) && (_local1.ship._X < 450)) { _local1[objectArray[i].Name]._x = _local1[objectArray[i].Name]._x + _local2; } if ((_local1.ship._y > 50) && (_local1.ship._y < 250)) { _local1[objectArray[i].Name]._y = _local1[objectArray[i].Name]._y + _local3; if (_local1[objectArray[i].Name]._y > objectArray[i].Ground) { _local1[objectArray[i].Name]._y = objectArray[i].Ground; } } } i++; } } function beamMeUp() { var _local1 = _root; var _local2 = new Array(); i = 0; while (i < objectArray.length) { if (objectArray[i].Type != "agent") { if (objectArray[i].Beamed == 1) { if (((objectArray[i].Type == "object") || (objectArray[i].Type == "tank")) && (objectArray[i].Linkage != "BonusIcon")) { maxheight = (_local1.ship._y + (_local1.ship._height / 2)) + (_local1[objectArray[i].Name]._height / 2); if (_local1[objectArray[i].Name]._y > maxheight) { _local1[objectArray[i].Name]._y = _local1[objectArray[i].Name]._y - 2; } } else if (_local1[objectArray[i].Name]._y > _local1.ship._y) { _local1[objectArray[i].Name]._y = _local1[objectArray[i].Name]._y - 2; } else if (objectArray[i].Beamed == 1) { _local1[objectArray[i].Name]._y = -20; objectArray[i].Beamed = 2; _local2.push({name:objectArray[i].Name, detach:true, debNum:4}); if (objectArray[i].Linkage != "BonusIcon") { if ((objectArray[i].Linkage != "person2") && (objectArray[i].Linkage != "person5")) { var scream = Math.round(Math.random() * 8); trace(scream); if (scream == 4) { playSound("maleEnjoy"); } else { playSound("maleScream"); } } else { playSound("maleScream"); } var scream = Math.round(Math.random() * 12); if (scream == 8) { var randSound = (Math.round(Math.random() * 3) + 1); _local1.playSound("rand" + randSound); } _global.currentPeople++; _global.totalPeople++; _local1.display._x = _local1.ship._x; _local1.display._y = _local1.ship._y; _local1.display.goToAndPlay("people"); } else { playSound("bonusSound"); _global.bonusPoints++; _local1.display._x = _local1.ship._x; _local1.display._y = _local1.ship._y; _local1.display.goToAndPlay("points"); } } if (_local1[objectArray[i].Name]._x < _local1.ship._x) { _local1[objectArray[i].Name]._x = _local1[objectArray[i].Name]._x + 1; if (_local1[objectArray[i].Name]._x >= _local1.ship._x) { _local1[objectArray[i].Name]._x = _local1.ship._x; } } if (_local1[objectArray[i].Name]._x > _local1.ship._x) { _local1[objectArray[i].Name]._x = _local1[objectArray[i].Name]._x - 1; if (_local1[objectArray[i].Name]._x <= _local1.ship._x) { _local1[objectArray[i].Name]._x = _local1.ship._x; } } } else { if (objectArray[i].Beamed == 2) { _local1[objectArray[i].Name].goToAndPlay("falling"); } if ((_local1[objectArray[i].Name]._y + (_local1[objectArray[i].Name]._height / 2)) == objectArray[i].Ground) { } else if (_local1[objectArray[i].Name]._y > 0) { _local1[objectArray[i].Name]._y = _local1[objectArray[i].Name]._y + objectArray[i].Dy; objectArray[i].Dy = objectArray[i].Dy + gravity; if (objectArray[i].Dy > yTerminalVelocity) { objectArray[i].Dy = yTerminalVelocity; } _local1[objectArray[i].Name]._x = _local1[objectArray[i].Name]._x + objectArray[i].Dx; if ((_local1[objectArray[i].Name]._y + (_local1[objectArray[i].Name]._height / 2)) >= objectArray[i].Ground) { useFriction = xGroundFriction; } else { useFriction = xFriction; } if ((objectArray[i].Dx >= -0.4) && (objectArray[i].Dx <= 0.4)) { objectArray[i].Dx = 0; } if (objectArray[i].Dx < 0) { objectArray[i].Dx = objectArray[i].Dx + useFriction; } if (objectArray[i].Dx > 0) { objectArray[i].Dx = objectArray[i].Dx - useFriction; } if ((_local1[objectArray[i].Name]._y + (_local1[objectArray[i].Name]._height / 2)) >= objectArray[i].Ground) { if (objectArray[i].Beamed == 2) { if ((objectArray[i].Ground - objectArray[i].FallHeight) < 20) { if (objectArray[i].Type == "tank") { _local1[objectArray[i].Name].gotoAndPlay("idle"); } else if (objectArray[i].Type == "person") { _local1[objectArray[i].Name].gotoAndPlay("run"); objectArray[i].Timer = 1; } if (objectArray[i].Type == "tank") { _local1[objectArray[i].Name].OpenFire(); } root[objectArray[i].Name]._y = objectArray[i].Ground; objectArray[i].Beamed = 0; } else { _local1[objectArray[i].Name].gotoAndPlay("collision"); _local1[objectArray[i].Name]._y = objectArray[i].Ground; if (objectArray[i].Linkage != nonDestructableType) { objectArray[i].Beamed = 3; } else { objectArray[i].Beamed = 0; } j = 0; while (j < objectArray.length) { if ((objectArray[j].Beamed == 0) && (_local1[objectArray[i].Name].hitTest(_local1[objectArray[j].Name]) == true)) { if (((objectArray[j].Type == "tank") && (objectArray[i].Type != "tank")) && ((objectArray[j].Type == "tank") && (objectArray[i].Type != "object"))) { } else { objectArray[j].Direction = 0; tempY = _local1[objectArray[j].Name]._y - (_local1[objectArray[i].Name].height / 100); howFar = objectArray[j].ZStack; objectArray[j].ZStack++; _local1[objectArray[i].Name].swapDepths((objectArray[j].Ground * 100) + howFar); _local1[objectArray[i].Name]._y = tempY; } if ((((objectArray[j].Type == "agent") || (objectArray[j].Type == "person")) || ((objectArray[j].Type == "tank") && (objectArray[i].Type == "tank"))) && (objectArray[j].Linkage != nonDestructableType)) { _local1[objectArray[j].Name].goToAndPlay("collision"); if (objectArray[j].Type == "tank") { _local1[objectArray[j].Name].HoldFire(); } deadArray.push(objectArray[j].Name); _local2.push({name:objectArray[j].Name, detach:false, debNum:5}); } } j++; } if (objectArray[i].Linkage != nonDestructableType) { deadArray.push(objectArray[i].Name); _local2.push({name:objectArray[i].Name, detach:false, debNum:6}); } } } objectArray[i].Dy = 0; } else if (objectArray[i].Beamed == 2) { hitFlag = false; if ((objectArray[i].Ground - objectArray[i].FallHeight) >= 20) { j = 0; while (j < objectArray.length) { if ((objectArray[j].Beamed == 0) && (_local1[objectArray[i].Name].hitTest(_local1[objectArray[j].Name]) == true)) { if (((objectArray[j].Type == "tank") && (objectArray[i].Type != "tank")) && ((objectArray[j].Type == "tank") && (objectArray[i].Type != "object"))) { } else { hitFlag = true; _local1[objectArray[i].Name].goToAndPlay("collision"); objectArray[j].Direction = 0; tempY = _local1[objectArray[j].Name]._y - _local1[objectArray[i].Name].height; howFar = objectArray[j].ZStack; objectArray[j].ZStack++; _local1[objectArray[i].Name].swapDepths((objectArray[j].Ground * 100) + howFar); _local1[objectArray[i].Name]._y = tempY; objectArray[i].Dy = 0; } if ((((((objectArray[j].Type == "agent") || (objectArray[j].Type == "person")) || (objectArray[j].Linkage == "bear")) || ((objectArray[j].Type == "tank") && (objectArray[i].Type == "tank"))) || ((objectArray[j].Type == "tank") && (objectArray[i].Type == "object"))) && (objectArray[j].Linkage != nonDestructableType)) { _local1[objectArray[j].Name].goToAndPlay("collision"); if (objectArray[j].Type == "tank") { _local1[objectArray[j].Name].HoldFire(); } deadArray.push(objectArray[j].Name); _local2.push({name:objectArray[j].Name, detach:false, debNum:5}); } break; } j++; } if (hitFlag == true) { if (objectArray[i].Linkage != nonDestructableType) { objectArray[i].Beamed = 3; } else { objectArray[i].Beamed = 0; } if (objectArray[i].Linkage != nonDestructableType) { deadArray.push(objectArray[i].Name); _local2.push({name:objectArray[i].Name, detach:false, debNum:6}); } } } } } } } else if (objectArray[i].Beamed == 1) { if (_local1.beam.hitTest(_local1[objectArray[i].Name]) == eval("False")) { objectArray[i].Beamed = 0; objectArray[i].Timer = 1; } } i++; } var _local3 = 0; while (_local3 < _local2.length) { removeObject(_local2[_local3].name, _local2[_local3].detach, _local2[_local3].debNum); _local3++; } } function moveTargets() { var _local1 = _root; if (targetArray_Name.length != 0) { i = 0; while (i < targetArray_Name.length) { if (targetArray_Frames[i] == 0) { myX = _local1[targetArray_Target[i]]._x; myY = _local1[targetArray_Target[i]]._y; } else { myX = _local1[targetArray_Name[i]]._x + ((_local1[targetArray_Target[i]]._x - _local1[targetArray_Name[i]]._x) / targetArray_Frames[i]); myY = _local1[targetArray_Name[i]]._y + ((_local1[targetArray_Target[i]]._y - _local1[targetArray_Name[i]]._y) / targetArray_Frames[i]); targetArray_Frames[i]--; } _local1[targetArray_Name[i]]._x = myX; _local1[targetArray_Name[i]]._y = myY; i++; } } } function createTarget(myTarget) { var _local1 = _root; name = "unique" + identifierNumber; identifierNumber++; _local1.attachMovie("manTarget", name, z3); z3++; targetArray_Name.push(name); targetArray_Target.push(objectArray[myTarget].Name); targetArray_Frames.push(15); _local1[name]._x = 275; _local1[name]._y = -60; } function removeTarget(myTarget) { var _local1 = myTarget; var _local2 = _root; i = 0; while (i < targetArray_Name.length) { if (targetArray_Target[i] == objectArray[_local1].Name) { _local2[targetArray_Name[i]].removeMovieClip(); targetArray_Name.splice(i, 1); targetArray_Target.splice(i, 1); targetArray_Frames.splice(i, 1); } i++; } } function moveScene(d) { var _local1 = d; var _local2 = _root; if (((panAmount + _local1) > panLimitLeft) and ((panAmount + _local1) < panLimitRight)) { panAmount = panAmount + _local1; trees._x = trees._x + (_local1 * 1); bushes._x = bushes._x + (_local1 * 0.8); hills._x = hills._x + (_local1 * 0.4); boundingbox._x = boundingbox._x + (_local1 * 1); i = 0; while (i < objectArray.length) { if ((((objectArray[i].Beamed == 0) || (objectArray[i].Beamed == 3)) || (objectArray[i].Beamed == 2)) || (objectArray[i].Type == "agent")) { _local2[objectArray[i].Name]._x = _local2[objectArray[i].Name]._x + _local1; } i++; } var i = 0; while (i < heliArray.length) { if (heliArray[i].inFlight == true) { _local2[heliArray[i].name]._x = _local2[heliArray[i].name]._x + _local1; } i++; } i = 0; while (i < deadArray.length) { _local2[deadArray[i]]._x = _local2[deadArray[i]]._x + _local1; i++; } i = 0; while (i < bulletArray.length) { _local2[bulletArray[i]]._x = _local2[bulletArray[i]]._x + _local1; i++; } return(0); } return(1); } function runLevel() { var _local1 = _root; var _local2 = _global; if (buttonCoolDown == 0) { if (Key.isDown(80) || (Key.isDown(27))) { buttonCoolDown = 10; if (_local2.gamePaused == false) { _local1.paused.gotoAndPlay("show"); _local2.gamePaused = true; intPauseTime = getTimer(); } else { _local1.paused.gotoAndPlay("hide"); _local2.gamePaused = false; if (_local2.nextTime != -1) { _local2.nextTime = _local2.nextTime + (getTimer() - intPauseTime); } intPauseTime = 0; } } } else { buttonCoolDown--; } if (_local2.gamePaused == false) { if (deathCounter == -1) { if (Key.isDown(39) && (!Key.isDown(37))) { dx = dx + sensitivity; if (dx > terminalVelocity) { dx = terminalVelocity; } } if (Key.isDown(37) && (!Key.isDown(39))) { dx = dx - sensitivity; if (dx < (terminalVelocity * -1)) { dx = terminalVelocity * -1; } } if (Key.isDown(40) && (!Key.isDown(38))) { dy = dy + sensitivity; if (dy > terminalVelocity) { dy = terminalVelocity; } } if (Key.isDown(38) && (!Key.isDown(40))) { dy = dy - sensitivity; if (dy < (terminalVelocity * -1)) { dy = terminalVelocity * -1; } } } } if (Key.isDown(68)) { _local2.debug = true; _local1.debugStatus(); } else { _local2.debug = false; } if (Key.isDown(16) && (Key.isDown(49))) { _local1.prepareForFrameChange(true, 5); _local2.gamePaused = false; _local2.cheated = true; } if (Key.isDown(16) && (Key.isDown(50))) { _local1.prepareForFrameChange(true, 10); _local2.gamePaused = false; _local2.cheated = true; } if (Key.isDown(16) && (Key.isDown(51))) { _local1.prepareForFrameChange(true, 15); _local2.gamePaused = false; _local2.cheated = true; } if (Key.isDown(16) && (Key.isDown(52))) { _local1.prepareForFrameChange(true, 20); _local2.gamePaused = false; _local2.cheated = true; } if (Key.isDown(16) && (Key.isDown(53))) { _local1.prepareForFrameChange(true, 25); _local2.gamePaused = false; _local2.cheated = true; } if (Key.isDown(16) && (Key.isDown(54))) { _local1.prepareForFrameChange(true, 30); _local2.gamePaused = false; _local2.cheated = true; } if (Key.isDown(16) && (Key.isDown(55))) { _local1.prepareForFrameChange(true, 35); _local2.gamePaused = false; _local2.cheated = true; } if (Key.isDown(16) && (Key.isDown(56))) { _local1.prepareForFrameChange(true, 40); _local2.gamePaused = false; _local2.cheated = true; } if (Key.isDown(16) && (Key.isDown(57))) { _local1.prepareForFrameChange(true, 45); _local2.gamePaused = false; _local2.cheated = true; } if (Key.isDown(16) && (Key.isDown(48))) { _local1.prepareForFrameChange(true, 50); _local2.gamePaused = false; _local2.cheated = true; } if (_local2.gamePaused == false) { if ((!Key.isDown(37)) && (!Key.isDown(39))) { if (dx > 0) { dx = dx - airFriction; } if (dx < 0) { dx = dx + airFriction; } if ((dx >= -0.3) && (dx <= 0.3)) { dx = 0; } } if ((!Key.isDown(38)) && (!Key.isDown(40))) { if (dy > 0) { dy = dy - airFriction; } if (dy < 0) { dy = dy + airFriction; } if ((dy >= -0.3) && (dy <= 0.3)) { dy = 0; } } if (Key.isDown(32) && (energyFlag == 0)) { _local1.beam.gotoandstop(2); shipEnergy = shipEnergy - beamCost; if (shipEnergy < 0) { shipEnergy = 0; energyFlag = 1; } beamFlag = true; _local1.startBeamTags(); } else { beamFlag = false; _local1.beam.gotoandstop(1); shipEnergy = shipEnergy + rechargeRate; if (shipEnergy > totalEnergy) { shipEnergy = totalEnergy; energyFlag = 0; } _local1.removeBeamTags(); } _local1.beamMeUp(); _local1.updateEnergyBar(shipEnergy, totalEnergy, energyFlag); _local1.ship._x = _local1.ship._x + dx; _local1.ship._y = _local1.ship._y + dy; if (beamFlag == true) { _local1.beamHorizontalAndVertical(dx, dy); } if (_local2.shipUsed == 1) { _local1.ship.inside._rotation = dx * 2.5; } if (_local1.ship._x > 450) { _local1.ship._x = 450; } if (_local1.ship._x < 100) { _local1.ship._x = 100; } if (_local1.ship._y < 50) { _local1.ship._y = 50; dy = 0; } if (_local1.ship._y > 250) { _local1.ship._y = 250; dy = 0; } _local1.shadow._x = _local1.ship._x; _local1.beam._x = _local1.ship._x; _local1.beam._y = (_local1.ship._y + (_local1.ship._y / 8)) + 35; _local1.beam._xscale = 50 + ((_local1.ship._y / 2.5) / 2); _local1.beam._yscale = 50 + ((_local1.ship._y / 2.5) / 2); _local1.shadow._alpha = _local1.ship._y / 4; _local1.shadow._xscale = 300 - _local1.ship._y; _local1.shadow._yscale = 300 - _local1.ship._y; varFlag = 0; if ((_local1.ship._x <= 100) && (dx < 0)) { varFlag = _local1.moveScene(-1 * dx); } else if ((_local1.ship._x >= 450) && (dx > 0)) { varFlag = _local1.moveScene(-1 * dx); } if (varFlag == 1) { dx = 0; } _local1.runTimer(); _local1.TankGenerator(); _local1.ManageHelicopters(); _local1.spotship(); _local1.makePeopleMove(); _local1.DetectBulletHits(); _local1.updatePeopleBar(_local2.currentPeople, _local2.totalPeopleToGet); _local1.moveTargets(); if (deathCounter >= 0) { if (deathCounter == 0) { _local2.livesLeft--; _local1.updateLives(_local2.livesLeft); _local1.prepareForFrameChange(false, 0); if (_local2.livesLeft != 0) { var randSound = (Math.round(Math.random() * 5) + 1); } } else { deathCounter--; } } if (_local2.nextTime != -1) { _local1.updateTimer(); } } } stop(); myNextLevel = 10; _global.debug = false; nonDestructableType = "rock"; panLimitLeft = -300; panLimitRight = 300; panAmount = 0; oldValue = 0; numPeople = 0; maxPeople = 0; percentFrequency = 0; zArray = new Array(); zStack = new Array(); z3 = 10000; objectArray = new Array(); bulletArray = new Array(); deadArray = new Array(); targetArray_Name = new Array(); targetArray_Target = new Array(); targetArray_Frames = new Array(); availPeople = new Array(); myVolume = 100; mySong = "Nothing"; myZ1 = 0; myZ2 = 0; terminalVelocity = 8; sensitivity = 0.4; totalEnergy = 200; shipEnergy = 200; rechargeRate = 2; beamCost = 2; timeToBeat = 180; airFriction = 0.15; xFriction = 0.15; xGroundFriction = 0.4; gravity = 0.4; yTerminalVelocity = 15; energyFlag = 0; pickUpFlag = 0; dropSpeed = 0; groundLevel = _root.truck._y; truckFlag = 0; dx = 0; dy = 0; tankArray = new Array(); tankSpawnTimeMin = 0; tankSpawnTimeMax = 0; tankCounter = -1; blnUseTanks = false; tanksToUse = "green"; heliArray = new Array(); bulletDepth = 30000; _global.totalPeopleToGet = 5; identifierNumber = 5; var mySoundPlayer = new SoundPlayer(); buttonCoolDown = 0; intPauseTime = 0; deathCounter = -1; almostFlag = false; _global.tempLives = -1; _global.tempPeople = -1; _global.lives = 3; _global.totalPeople = 0; _global.tempFrame = 5; _global.nextTime = 0; _global.stolenTime = 0; _global.volume = true; _global.mySound = new Sound(); _global.gamePaused = false; _global.cheated = false; stop();
Instance of Symbol 304 MovieClip in Frame 3
onClipEvent (load) { if (_global.musicOn == true) { _global.myMusicPlayer.SetTrack("titleMusic"); _global.myMusicPlayer.SetMaxVolume(100); _global.myMusicPlayer.PlayWithCrossFade(3); } } onClipEvent (enterFrame) { _global.myMusicPlayer.RunPlayer(); }
Frame 4
function endGame() { var _local1 = _global; trace(_local1.tempFrame); if ((_local1.tempFrame == 17) || (_local1.cheated == true)) { _root.submitButton._visible = false; } else { _root.submitButton._visible = true; } finalScore = _local1.totalPeople; if (_local1.totalPeople == 0) { youLose = "Take a bow, worst game ever..."; } else if ((_local1.totalPeople >= 1) && (_local1.totalPeople < 5)) { youLose = "Looks like a probee was flying the ship..."; } else if ((_local1.totalPeople >= 6) && (_local1.totalPeople < 15)) { youLose = "Maybe probing isn't for you..."; } else if ((_local1.totalPeople >= 16) && (_local1.totalPeople < 25)) { youLose = "Try a little harder..."; } else if ((_local1.totalPeople >= 26) && (_local1.totalPeople < 35)) { youLose = "You must have slacked off at probing school..."; } else if ((_local1.totalPeople >= 36) && (_local1.totalPeople < 45)) { youLose = "Not too shabby!"; } else if ((_local1.totalPeople >= 46) && (_local1.totalPeople < 75)) { youLose = "Sweet Job!"; } else if ((_local1.totalPeople >= 76) && (_local1.totalPeople < 95)) { youLose = "Whoa, a little over quota perhaps?"; } else if ((_local1.totalPeople >= 96) && (_local1.totalPeople < 105)) { youLose = "You're a little too good at this..."; } else { youLose = "Wait, what do you do for a living?"; } } stop();
Instance of Symbol 364 MovieClip in Frame 4
on (rollOver) { var playForward = 1; var frameCounter = 1; var holdCounter = 9; } on (rollOut) { if (playForward != 3) { playForward = 2; } } onClipEvent (enterFrame) { if ((playForward == 1) && (frameCounter < 12)) { this.nextFrame(); frameCounter++; } else if (playForward == 2) { this.prevFrame(); frameCounter--; } else if (playForward == 3) { holdCounter--; if (holdCounter == 0) { _root.gotoAndPlay("menuScreen"); playForward = 0; } } } on (release) { _global.SoundManager.PlaySound("button_hit"); this.gotoAndPlay("flash"); playForward = 3; }
Instance of Symbol 364 MovieClip "submitButton" in Frame 4
on (rollOver) { var playForward = 1; var frameCounter = 1; var holdCounter = 9; } on (rollOut) { if (playForward != 3) { playForward = 2; } } onClipEvent (enterFrame) { if ((playForward == 1) && (frameCounter < 12)) { this.nextFrame(); frameCounter++; } else if (playForward == 2) { this.prevFrame(); frameCounter--; } else if (playForward == 3) { holdCounter--; if (holdCounter == 0) { _root.gotoAndPlay("submitScore"); playForward = 0; } } } on (release) { _global.SoundManager.PlaySound("button_hit"); this.gotoAndPlay("flash"); playForward = 3; }
Instance of Symbol 611 MovieClip in Frame 4
onClipEvent (load) { _root.endGame(); }
Instance of Symbol 364 MovieClip in Frame 4
on (rollOver) { var playForward = 1; var frameCounter = 1; var holdCounter = 9; } on (rollOut) { if (playForward != 3) { playForward = 2; } } onClipEvent (enterFrame) { if ((playForward == 1) && (frameCounter < 12)) { this.nextFrame(); frameCounter++; } else if (playForward == 2) { this.prevFrame(); frameCounter--; } else if (playForward == 3) { holdCounter--; if (holdCounter == 0) { getURL ("http://www.armorgames.com", "_blank"); playForward = 0; } } } on (release) { _global.SoundManager.PlaySound("button_hit"); this.gotoAndPlay("flash"); playForward = 3; }
Frame 5
function initializeLevel(currentLevel, nextLevel, leftMax, rightMax, nonDestructable, timeToWin, peopleToGet) { var _local1 = _global; var _local2 = _root; identifierNumber = currentLevel; myNextLevel = nextLevel; panLimitLeft = leftMax; panLimitRight = rightMax; nonDestructableType = nonDestructable; timeToBeat = timeToWin; _local1.totalPeopleToGet = peopleToGet; if (_local1.tempLives < 0) { _local1.livesLeft = 3; } else { _local1.livesLeft = _local1.tempLives; } energyFlag = 0; pickUpFlag = 0; dropSpeed = 0; groundLevel = _local2.truck._y; truckFlag = 0; dx = 0; dy = 0; if (_local1.tempPeople < 0) { _local1.currentPeople = 0; } else { _local1.currentPeople = _local1.tempPeople; } _local1.tempPeople = 0; _local1.tempLives = 0; _local1.tempFrame = identifierNumber; if (timeToBeat == -1) { _local1.nextTime = -1; _local2.updateTimer(); } else { if ((_local1.nextTime == -1) && (timeToBeat != -1)) { _local1.nextTime = 0; } if (_local1.nextTime != -1) { if (_local1.stolenTime == 0) { _local1.nextTime = getTimer() + (timeToBeat * 1000); } else { _local1.nextTime = _local1.nextTime + (getTimer() - _local1.stolenTime); _local1.stolenTime = 0; } } } _local1.stolenTime = 0; if (_local1.shipUsed == 1) { _local2.ship.gotoAndStop("ship1"); } else { _local2.ship.gotoAndStop("ship2"); } } function addPersonType(myLinkage, myType, myWeight) { availPeople.push({linkage:myLinkage, type:myType, weight:myWeight}); } function playSound(soundName) { if (_global.volume == true) { mySoundPlayer.PlaySound(soundName); } } function startMusicDownload(music) { var _local1 = _global; if (_local1.musicOn == true) { _local1.mySound.stop(); _local1.mySound.attachSound(music); _local1.mySound.start(0, 99); _local1.mySound.setVolume(myVolume); } else { _root.volumeClip.gotoAndStop(2); _local1.mySound.stop(); } mySong = music; } function toggleMusic() { var _local1 = _global; if (_local1.volume == true) { _local1.mySound.attachSound(mySong); _local1.mySound.start(0, 99); _local1.mySound.setVolume(myVolume); _local1.musicOn = true; } else { _local1.mySound.stop(); _local1.mySound.setVolume(myVolume); _local1.musicOn = false; } } function updateTimer() { var _local1 = _global; if (_local1.nextTime == -1) { timeText = "NO LIMIT"; } else { myTime = _local1.nextTime - getTimer(); mySecs = math.floor(myTime / 1000); if (mySecs == 0) { _local1.livesLeft = 0; prepareForFrameChange(false, 0); } if (mySecs > 60) { someSeconds = myTime / 1000; someMinutes = someSeconds / 60; if (someSeconds > 59) { someSeconds = someSeconds - (Math.floor(someMinutes) * 60); } if (someSeconds < 10) { textMinutes = someMinutes; timeText = (Math.floor(textMinutes) + ":0") + Math.floor(someSeconds); } else if (someSeconds == 0) { textMinutes = someMinutes; timeText = Math.floor(textMinutes) + ":00"; } else { textMinutes = someMinutes; timeText = (Math.floor(textMinutes) + ":") + Math.floor(someSeconds); } } else { timeText = Math.floor(mySecs); } } } function updateLives(lifeNum) { var _local1 = lifeNum; if (_local1 < 0) { _local1 = 0; } lives = _local1; } function prepareForFrameChange(newLevel, levelNum) { var _local1 = _global; var _local2 = _root; _local1.tempLives = _local1.livesLeft; _local1.tempPeople = _local1.currentPeople; cleanScreen(); if ((_local1.livesLeft > 0) && (newLevel == false)) { _local1.stolenTime = getTimer(); _local2.goToAndPlay("loseLife"); } else if ((_local1.livesLeft > 0) && (newLevel == true)) { _local1.tempPeople = -1; _local1.tempFrame = levelNum; _local2.goToAndPlay("levelText"); } else if (_local1.livesLeft == 0) { _local2.goToAndPlay("endGame"); } } function cleanScreen() { var _local1 = _root; i = 0; while (i < objectArray.length) { _local1[objectArray[i].Name].removeMovieClip(); i++; } i = 0; while (i < deadArray.length) { _local1[deadArray[i]].removeMovieClip(); i++; } i = 0; while (i < targetArray_Name.length) { _local1[targetArray_Name[i]].removeMovieClip(); i++; } i = 0; while (i < bulletArray.length) { _local1[bulletArray[i]].removeMovieClip(); i++; } } function setPeopleTimer(mPeople, pFrequency) { var _local1 = _root; myZ2 = Math.round(_local1.z2._y); myZ1 = Math.round(_local1.z1._y); _local1.z1._y = -50; _local1.z2._y = -50; i = myZ1; while (i < myZ2) { zArray.push(i); zStack.push(1); i++; } percentFrequency = pFrequency; maxPeople = mPeople; } function runTimer() { if (numPeople != maxPeople) { if (random(255) < percentFrequency) { numPeople++; addPersonDynamic(false); } } } function rangeInUse(minZ, maxZ) { var _local2 = maxZ; var _local3 = minZ; var _local1 = false; i = 0; while (i < objectArray.length) { if ((objectArray[i].ZStack >= _local3) && (objectArray[i].ZStack <= _local2)) { _local1 = true; } i++; } return(_local1); } function startBeamTags() { var _local1 = _root; i = 0; while (i < objectArray.length) { if (_local1.beam.hitTest(_local1[objectArray[i].Name]) == true) { if (objectArray[i].Beamed == 0) { _local1[objectArray[i].Name].goToAndPlay("beamed"); objectArray[i].Beamed = 1; objectArray[i].Dy = 0; if (objectArray[i].Type == "tank") { _local1[objectArray[i].Name].HoldFire(); } } if (objectArray[i].Beamed == 2) { _local1[objectArray[i].Name].goToAndStop("endbeam"); objectArray[i].Beamed = 1; objectArray[i].Dy = 0; } } i++; } } function debugStatus() { trace("Name type beamed timer"); trace("----------------------------------------"); i = 0; while (i < objectArray.length) { trace((((((((((objectArray[i].Name + " ") + objectArray[i].Type) + " ") + objectArray[i].Beamed) + " ") + objectArray[i].Timer) + " ") + objectArray[i].Spotted) + " ") + objectArray[i].Direction); i++; } trace("----------------------------------------"); } function removeBeamTags() { var _local1 = _root; i = 0; while (i < objectArray.length) { if ((objectArray[i].Beamed == 1) && (objectArray[i].Type != "agent")) { objectArray[i].Beamed = 2; objectArray[i].FallHeight = _local1[objectArray[i].Name]._y; } else if ((objectArray[i].Beamed == 1) && (objectArray[i].Type == "agent")) { objectArray[i].Beamed = 0; objectArray[i].Timer = 1; } i++; } } function addUnit(name, newSpeed, myLinkage, givenType) { var _local1 = _root; var _local2 = name; var _local3 = newSpeed; tempX = _local1[_local2]._x; tempY = _local1[_local2]._y; wantY = Math.round(tempY); flag = -1; myZStack = -1; i = 0; while (i < zArray.length) { if (zArray[i] == wantY) { flag = i; myZstack = zStack[i]; } i++; } if (flag != -1) { zArray.splice(flag, 1); zStack.splice(flag, 1); } _local1[_local2]._visible = false; _local2 = givenType + identifierNumber; identifierNumber++; _local1.attachMovie(myLinkage, _local2, wantY * 100); if (givenType == "tank") { _local1[_local2].SetFireRate(40); tankArray.push({track:wantY, occupied:true, tank:_local2}); } _local1[_local2]._x = tempX; _local1[_local2]._y = tempY; x = 275; if ((_local1[_local2]._x <= x) && (_local3 != 0)) { dir = _local3; _local1[_local2]._xscale = -Math.abs(_local1[_local2]._xscale); if (myLinkage == "antiAir") { _local1[_local2]._xscale = _local1[_local2]._xscale * -1; } } else { dir = -1 * _local3; } var groundLevel = Math.round(_local1[_local2]._y + (_local1[_local2]._height / 2)); objectArray.push({Name:_local2, Beamed:0, Type:givenType, Ground:groundLevel, Dx:0, Dy:0, Timer:0, Spotted:0, Linkage:myLinkage, ZStack:myZStack, Direction:dir, FallHeight:0}); return(_local2); } function generateEthan() { addPersonDynamic(true); } function addPersonDynamic(isEthan) { if (zArray.length == 0) { return(null); } if (isEthan == false) { r = random(2); switch (r) { case 0 : var _local3 = 0; var _local2 = -1; var _local1 = 0; while (_local1 < availPeople.length) { _local3 = _local3 + availPeople[_local1].weight; _local1++; } var chosenWeight = Math.round(Math.random() * _local3); _local1 = 0; while (_local1 < availPeople.length) { if ((chosenWeight > _local2) && (chosenWeight <= (_local2 + availPeople[_local1].weight))) { myGuy = availPeople[_local1].linkage; myType = availPeople[_local1].type; break; } _local2 = _local2 + availPeople[_local1].weight; _local1++; } break; case 1 : myGuy = "MIB"; myType = "agent"; } } else { myGuy = "ethan"; myType = "person"; } r = random(zArray.length); z = zArray[r]; zs = zStack[r]; zArray.splice(r, 1); zStack.splice(r, 1); name = "unique" + identifierNumber; identifierNumber++; _root.attachMovie(myGuy, name, z * 100); r = random(2); if (r == 0) { x = _root.boundingbox._x + (_root.boundingbox._width / 2); } else { x = _root.boundingbox._x - (_root.boundingbox._width / 2); } _root[name]._x = x; _root[name]._y = z; x = _root.hills._x; if (_root[name]._x <= x) { dir = 1; if (myType == "agent") { _root[name]._xscale = -Math.abs(_root[name]._xscale); } } else { dir = -1; if (myType != "agent") { _root[name]._xscale = -Math.abs(_root[name]._xscale); } } _root[name].goToAndPlay("walk"); objectArray.push({Name:name, Beamed:0, Type:myType, Ground:z, Dx:0, Dy:0, Timer:0, Spotted:0, Linkage:myGuy, ZStack:zs, Direction:dir, FallHeight:0}); return(undefined); } function addTank(name, newSpeed, myLinkage, myTrack) { var _local1 = _root; var _local3 = myTrack; var _local2 = "tank"; if (tanksToUse == "red") { _local2 = "redTank"; } if (tanksToUse == "white") { _local2 = "whiteTank"; } _local1.attachMovie(_local2, name, _local3 * 100); r = random(2); if (r == 0) { x = _local1.boundingbox._x + (_local1.boundingbox._width / 2); } else { x = _local1.boundingbox._x - (_local1.boundingbox._width / 2); } _local1[name]._x = x; if (tanksToUse == "red") { _local1[name].SetFireRate(15); } else if (tanksToUse == "white") { _local1[name].SetFireRate(25); } else { _local1[name].SetFireRate(40); } _local1[name]._y = _local3; x = _local1.hills._x; if (_local1[name]._x <= x) { dir = 1; _local1[name]._xscale = _local1[name]._xscale * -1; } else { dir = -1; } _local1[name].goToAndPlay("idle"); objectArray.push({Name:name, Beamed:0, Type:"tank", Ground:_local3, Dx:0, Dy:0, Timer:0, Spotted:0, Linkage:"tank", ZStack:999999, Direction:dir, FallHeight:0}); } function makePeopleMove() { var _local1 = _root; var _local3 = _global; var queueRemoval = new Array(); i = 0; while (i < objectArray.length) { if (objectArray[i].Beamed == 0) { if (objectArray[i].Timer == 1) { if (_local3.debug == true) { trace(i); } if (_local1[objectArray[i].Name]._x < _local1.ship._x) { objectArray[i].Direction = -3; if (objectArray[i].Type == "person") { _local1[objectArray[i].Name]._xscale = -Math.abs(_local1[objectArray[i].Name]._xscale); } else if (objectArray[i].Type == "agent") { _local1[objectArray[i].Name]._xscale = Math.abs(_local1[objectArray[i].Name]._xscale); if (objectArray[i].Spotted == 0) { createTarget(i); objectArray[i].Spotted = 1; } } } else { objectArray[i].Direction = 3; if (objectArray[i].Type == "person") { _local1[objectArray[i].Name]._xscale = Math.abs(_local1[objectArray[i].Name]._xscale); } else if (objectArray[i].Type == "agent") { _local1[objectArray[i].Name]._xscale = -Math.abs(_local1[objectArray[i].Name]._xscale); if (objectArray[i].Spotted == 0) { createTarget(i); objectArray[i].Spotted = 1; } } } _local1[objectArray[i].Name].gotoandplay("run"); } if (objectArray[i].Timer > 0) { objectArray[i].Timer--; } _local1[objectArray[i].Name]._x = _local1[objectArray[i].Name]._x + objectArray[i].Direction; if ((_local1[objectArray[i].Name]._x < (_local1.boundingbox._x - (_local1.boundingbox._width / 2))) && (objectArray[i].Direction < 0)) { if (objectArray[i].Spotted == 1) { _local3.livesLeft--; _local1.updateLives(_local3.livesLeft); _local1.prepareForFrameChange(false, 0); if (_local3.livesLeft != 0) { var randSound = (Math.round(Math.random() * 5) + 1); } } if (objectArray[i].Type == "tank") { OpenTrack(objectArray[i].Name); } queueRemoval.push({name:objectArray[i].Name, detach:true, debNum:1}); } else if ((_local1[objectArray[i].Name]._x > (_local1.boundingbox._x + (_local1.boundingbox._width / 2))) && (objectArray[i].Direction > 0)) { if (objectArray[i].Spotted == 1) { _local3.livesLeft--; _local1.updateLives(_local3.livesLeft); _local1.prepareForFrameChange(false, 0); if (_local3.livesLeft != 0) { var randSound = (Math.round(Math.random() * 5) + 1); } } if (objectArray[i].Type == "tank") { OpenTrack(objectArray[i].Name); } queueRemoval.push({name:objectArray[i].Name, detach:true, debNum:2}); } } i++; } var _local2 = 0; while (_local2 < queueRemoval.length) { removeObject(queueRemoval[_local2].name, queueRemoval[_local2].detach, queueRemoval[_local2].debNum); _local2++; } tanksAim(); } function removeObject(objectName, removeFromScreen, debugNum) { var _local2 = removeFromScreen; var _local3 = _root; i = -1; var _local1 = 0; while (_local1 < objectArray.length) { if (objectArray[_local1].Name == objectName) { i = _local1; if (objectArray[_local1].Type != "tank") { zArray.push(objectArray[_local1].Ground); zStack.push(objectArray[_local1].ZStack); } if ((objectArray[_local1].Type != "object") && (objectArray[_local1].Type != "tank")) { numPeople--; } if (objectArray[_local1].Spotted == 1) { removeTarget(i); } if (_local2) { _local3[objectArray[_local1].Name].removeMovieClip(); } objectArray.splice(_local1, 1); return; } _local1++; } } function updateEnergyBar(current, total, flag) { var _local1 = _root; frac = current / total; _local1.energy._xscale = frac * 100; if (flag == 1) { _local1.energy.goToAndStop(2); } else { _local1.energy.goToAndStop(1); } } function updatePeopleBar(current, total) { var _local1 = current; var _local2 = total; var _local3 = _root; frac = _local1 / _local2; _local3.peopleToGo._xscale = frac * 100; myFrame = 10; frac = (_local1 / _local2) * 100; if (frac < 10) { myFrame = 1; } else if ((frac >= 10) && (frac < 20)) { myFrame = 2; } else if ((frac >= 20) && (frac < 30)) { myFrame = 3; } else if ((frac >= 30) && (frac < 40)) { myFrame = 4; } else if ((frac >= 40) && (frac < 50)) { myFrame = 5; } else if ((frac >= 50) && (frac < 60)) { myFrame = 6; } else if ((frac >= 60) && (frac < 70)) { myFrame = 7; } else if ((frac >= 70) && (frac < 80)) { myFrame = 8; } else if ((frac >= 80) && (frac < 90)) { myFrame = 9; } else if ((frac >= 90) && (frac <= 100)) { myFrame = 10; } if (oldValue != myFrame) { _local3.peopleToGo.goToAndStop(myFrame); } oldValue = myFrame; if ((_local1 == (_local2 - 2)) && (almostFlag == false)) { var randSound = (Math.round(Math.random() * 4) + 1); _local3.playSound("good" + randSound); almostFlag = true; } if (_local1 == _local2) { prepareForFrameChange(true, myNextLevel); } } function spotship() { var _local1 = _root; i = 0; while (i < objectArray.length) { if (((objectArray[i].Beamed == 0) && ((objectArray[i].Type == "person") || (objectArray[i].Type == "agent"))) && ((objectArray[i].Direction == 1) || (objectArray[i].Direction == -1))) { myDist = getDistance(i); if (myDist <= 175) { if (((objectArray[i].Direction == 1) && (_local1[objectArray[i].Name]._x < _local1.ship._x)) && (_local1[objectArray[i].Name]._x >= 50)) { _local1[objectArray[i].Name].gotoandplay("spot"); objectArray[i].Direction = 0; objectArray[i].Timer = 30; } else if (((objectArray[i].Direction == -1) && (_local1[objectArray[i].Name]._x > _local1.ship._x)) && (_local1[objectArray[i].Name]._x <= 500)) { _local1[objectArray[i].Name].gotoandplay("spot"); objectArray[i].Direction = 0; objectArray[i].Timer = 30; } } } i++; } } function tanksAim() { var _local3 = _root; var _local2 = 0; while (_local2 < objectArray.length) { if ((objectArray[_local2].Beamed == 0) && (objectArray[_local2].Type == "tank")) { var tankName = objectArray[_local2].Name; var point = {x:_local3[tankName].cannon._x, y:_local3[tankName].cannon._y}; _local3[tankName].localToGlobal(point); var op = (_local3.ship._y - point.y); var adj = (_local3.ship._x - point.x); if (adj == 0) { adj = 1; } var _local1 = (Math.atan(op / adj) * 180) / Math.PI; if (_local1 < 0) { _local1 = _local1 * -1; } if (_local1 > 90) { _local1 = 90; } if (_local1 < 20) { _local1 = 20; } _local3[tankName].cannon._rotation = _local1; } _local2++; } } function StartTankGenerator(min, max, color) { tanksToUse = color; blnUseTanks = true; tankSpawnTimeMin = min; tankSpawnTimeMax = max; tankCounter = Math.round(Math.random() * (tankSpawnTimeMax - tankSpawnTimeMin)) + tankSpawnTimeMin; } function TankGenerator() { if (blnUseTanks == true) { intAvailFlag = -1; var _local1 = 0; while (_local1 < tankArray.length) { if (tankArray[_local1].occupied == false) { intAvailFlag = _local1; break; } _local1++; } if (intAvailFlag != -1) { if (tankCounter == 0) { var _local2 = "tank" + identifierNumber; identifierNumber++; tankArray[intAvailFlag].occupied = true; tankArray[intAvailFlag].tank = _local2; addTank(_local2, 3, "tank", tankArray[intAvailFlag].track); tankCounter = Math.round(Math.random() * (tankSpawnTimeMax - tankSpawnTimeMin)) + tankSpawnTimeMin; } else { tankCounter--; } } } } function OpenTrack(tankName) { var _local2 = tankName; var _local1 = 0; while (_local1 < tankArray.length) { if (tankArray[_local1].tank == _local2) { tankArray[_local1].tank = ""; tankArray[_local1].occupied = false; trace(("track " + _local1) + " is open"); } _local1++; } } function LaunchBullet(bulletName, startX, startY, directionX, directionY) { var _local1 = bulletName; var _local3 = _root; var _local2 = ""; if ((substring(_local1, 0, 18)) == "bullet_helicopter_") { _local2 = "bullet air"; } else { _local2 = "bullet ground"; } _local3.attachMovie(_local2, _local1, bulletDepth); _local3[_local1]._x = startX; _local3[_local1]._y = startY; _local3[_local1].SetMovement(directionX, directionY); bulletArray.push(_local1); bulletDepth++; } function DetectBulletHits() { var _local1 = _root; var _local3 = new Array(); var _local2 = 0; while (_local2 < bulletArray.length) { distancex = _local1[bulletArray[_local2]]._x - _local1.ship._x; distancey = _local1[bulletArray[_local2]]._y - _local1.ship._y; if (Math.sqrt((distancex * distancex) + (distancey * distancey)) <= 19) { if ((substring(bulletArray[_local2], 0, 18)) == "bullet_helicopter_") { shipEnergy = 0; energyFlag = 1; _local1.ship.explosion.gotoAndPlay("shock"); _local3.push(bulletArray[_local2]); } else { _local1.ship.explosion.gotoAndPlay("explode"); _local1.playSound("explosion"); if (deathCounter == -1) { deathCounter = 16; } _local3.push(bulletArray[_local2]); } } _local2++; } _local2 = 0; while (_local2 < _local3.length) { RemoveBullet(_local3[_local2]); _local2++; } } function ObjectCleanup(itemName) { var _local1 = itemName; if (_local1.substr(0, 4) == "tank") { OpenTrack(_local1); } _root[_local1].removeMovieClip(); } function RemoveBullet(itemName) { var _local3 = itemName; var _local2 = -1; var _local1 = 0; while (_local1 < bulletArray.length) { if (bulletArray[_local1] == _local3) { _local2 = _local1; break; } _local1++; } if (_local2 != -1) { bulletArray.splice(_local2, 1); _root[_local3].removeMovieClip(); } } function addHelicopter(itemName, minSpawn, maxSpawn, mySpeed) { var _local1 = minSpawn; var _local2 = Math.round(Math.random() * (maxSpawn - _local1)) + _local1; heliArray.push({name:itemName, min:_local1, max:maxSpawn, counter:_local2, speed:mySpeed, inFlight:false, hasFired:false, isFiring:false}); } function ManageHelicopters() { var _local2 = _root; var _local1 = 0; while (_local1 < heliArray.length) { if (heliArray[_local1].inFlight == false) { if (heliArray[_local1].counter == 0) { heliArray[_local1].inFlight = true; _local2[heliArray[_local1].name]._x; r = random(2); if (r == 0) { x = _local2.boundingbox._x + (_local2.boundingbox._width / 2); _local2[heliArray[_local1].name]._xscale = 100; heliArray[_local1].speed = -Math.abs(heliArray[_local1].speed); } else { x = (_local2.boundingbox._x - (_local2.boundingbox._width / 2)) - _local2[heliArray[_local1].name]._width; _local2[heliArray[_local1].name]._xscale = -100; heliArray[_local1].speed = Math.abs(heliArray[_local1].speed); } _local2[heliArray[_local1].name]._x = x; var y = (Math.round(Math.random() * 151) + 53); _local2[heliArray[_local1].name]._y = y; } else { heliArray[_local1].counter--; } } else { if (heliArray[_local1].isFiring == false) { _local2[heliArray[_local1].name]._x = _local2[heliArray[_local1].name]._x + heliArray[_local1].speed; } if ((heliArray[_local1].hasFired == false) && (heliArray[_local1].isFiring == false)) { if (((_local2[heliArray[_local1].name]._x - _local2[heliArray[_local1].name]._width) > 0) && ((_local2[heliArray[_local1].name]._x + _local2[heliArray[_local1].name]._width) < Stage.width)) { _local2[heliArray[_local1].name].gotoAndPlay("shoot"); heliArray[_local1].isFiring = true; trace(heliArray[_local1].name + " has fired"); } } if (heliArray[_local1].hasFired == true) { if (((_local2[heliArray[_local1].name]._x + _local2[heliArray[_local1].name]._width) < (_local2.boundingbox._x - (_local2.boundingbox._width / 2))) || ((_local2[heliArray[_local1].name]._x - _local2[heliArray[_local1].name]._width) > (_local2.boundingbox._x + (_local2.boundingbox._width / 2)))) { trace("out of bounds"); heliArray[_local1].inFlight = false; var _local3 = Math.round(Math.random() * (heliArray[_local1].max - heliArray[_local1].min)) + heliArray[_local1].min; heliArray[_local1].counter = _local3; heliArray[_local1].hasFired = false; heliArray[_local1].isFiring = false; } } } _local1++; } } function HelicopterFire(name) { var _local3 = name; var _local2 = 0; var _local1 = 0; while (_local1 < heliArray.length) { if (heliArray[_local1].name == _local3) { _local2 = _local1; break; } _local1++; } var myName = ("bullet_helicopter_" + identifierNumber); identifierNumber++; var point = {x:_root[_local3].emitter1._x, y:_root[_local3].emitter1._y}; _root[_local3].localToGlobal(point); var bulletSpeed = 0; trace("helicopter speed is: " + heliArray[_local2].speed); if (heliArray[_local2].speed > 0) { bulletSpeed = heliArray[_local2].speed + 2; } else { bulletSpeed = heliArray[_local2].speed - 2; } LaunchBullet(myName, point.x, point.Y, bulletSpeed, 0); } function HelicopterDoneFiring(name) { var _local2 = name; var _local1 = 0; while (_local1 < heliArray.length) { if (heliArray[_local1].name == _local2) { heliArray[_local1].isFiring = false; heliArray[_local1].hasFired = true; return; } _local1++; } } function getDistance(i) { var _local1 = _root; distancex = _local1[objectArray[i].Name]._x - _local1.ship._x; distancey = _local1[objectArray[i].Name]._y - _local1.ship._y; return(Math.sqrt((distancex * distancex) + (distancey * distancey))); } function beamHorizontalAndVertical(asscheese, assY) { var _local1 = _root; var _local2 = asscheese; var _local3 = assY; i = 0; while (i < objectArray.length) { if ((objectArray[i].Beamed == 1) && (objectArray[i].Type != "agent")) { objectArray[i].Dx = _local2; if ((_local1.ship._x > 100) && (_local1.ship._X < 450)) { _local1[objectArray[i].Name]._x = _local1[objectArray[i].Name]._x + _local2; } if ((_local1.ship._y > 50) && (_local1.ship._y < 250)) { _local1[objectArray[i].Name]._y = _local1[objectArray[i].Name]._y + _local3; if (_local1[objectArray[i].Name]._y > objectArray[i].Ground) { _local1[objectArray[i].Name]._y = objectArray[i].Ground; } } } i++; } } function beamMeUp() { var _local1 = _root; var _local2 = new Array(); i = 0; while (i < objectArray.length) { if (objectArray[i].Type != "agent") { if (objectArray[i].Beamed == 1) { if (((objectArray[i].Type == "object") || (objectArray[i].Type == "tank")) && (objectArray[i].Linkage != "BonusIcon")) { maxheight = (_local1.ship._y + (_local1.ship._height / 2)) + (_local1[objectArray[i].Name]._height / 2); if (_local1[objectArray[i].Name]._y > maxheight) { _local1[objectArray[i].Name]._y = _local1[objectArray[i].Name]._y - 2; } } else if (_local1[objectArray[i].Name]._y > _local1.ship._y) { _local1[objectArray[i].Name]._y = _local1[objectArray[i].Name]._y - 2; } else if (objectArray[i].Beamed == 1) { _local1[objectArray[i].Name]._y = -20; objectArray[i].Beamed = 2; _local2.push({name:objectArray[i].Name, detach:true, debNum:4}); if (objectArray[i].Linkage != "BonusIcon") { if ((objectArray[i].Linkage != "person2") && (objectArray[i].Linkage != "person5")) { var scream = Math.round(Math.random() * 8); trace(scream); if (scream == 4) { playSound("maleEnjoy"); } else { playSound("maleScream"); } } else { playSound("maleScream"); } var scream = Math.round(Math.random() * 12); if (scream == 8) { var randSound = (Math.round(Math.random() * 3) + 1); _local1.playSound("rand" + randSound); } _global.currentPeople++; _global.totalPeople++; _local1.display._x = _local1.ship._x; _local1.display._y = _local1.ship._y; _local1.display.goToAndPlay("people"); } else { playSound("bonusSound"); _global.bonusPoints++; _local1.display._x = _local1.ship._x; _local1.display._y = _local1.ship._y; _local1.display.goToAndPlay("points"); } } if (_local1[objectArray[i].Name]._x < _local1.ship._x) { _local1[objectArray[i].Name]._x = _local1[objectArray[i].Name]._x + 1; if (_local1[objectArray[i].Name]._x >= _local1.ship._x) { _local1[objectArray[i].Name]._x = _local1.ship._x; } } if (_local1[objectArray[i].Name]._x > _local1.ship._x) { _local1[objectArray[i].Name]._x = _local1[objectArray[i].Name]._x - 1; if (_local1[objectArray[i].Name]._x <= _local1.ship._x) { _local1[objectArray[i].Name]._x = _local1.ship._x; } } } else { if (objectArray[i].Beamed == 2) { _local1[objectArray[i].Name].goToAndPlay("falling"); } if ((_local1[objectArray[i].Name]._y + (_local1[objectArray[i].Name]._height / 2)) == objectArray[i].Ground) { } else if (_local1[objectArray[i].Name]._y > 0) { _local1[objectArray[i].Name]._y = _local1[objectArray[i].Name]._y + objectArray[i].Dy; objectArray[i].Dy = objectArray[i].Dy + gravity; if (objectArray[i].Dy > yTerminalVelocity) { objectArray[i].Dy = yTerminalVelocity; } _local1[objectArray[i].Name]._x = _local1[objectArray[i].Name]._x + objectArray[i].Dx; if ((_local1[objectArray[i].Name]._y + (_local1[objectArray[i].Name]._height / 2)) >= objectArray[i].Ground) { useFriction = xGroundFriction; } else { useFriction = xFriction; } if ((objectArray[i].Dx >= -0.4) && (objectArray[i].Dx <= 0.4)) { objectArray[i].Dx = 0; } if (objectArray[i].Dx < 0) { objectArray[i].Dx = objectArray[i].Dx + useFriction; } if (objectArray[i].Dx > 0) { objectArray[i].Dx = objectArray[i].Dx - useFriction; } if ((_local1[objectArray[i].Name]._y + (_local1[objectArray[i].Name]._height / 2)) >= objectArray[i].Ground) { if (objectArray[i].Beamed == 2) { if ((objectArray[i].Ground - objectArray[i].FallHeight) < 20) { if (objectArray[i].Type == "tank") { _local1[objectArray[i].Name].gotoAndPlay("idle"); } else if (objectArray[i].Type == "person") { _local1[objectArray[i].Name].gotoAndPlay("run"); objectArray[i].Timer = 1; } if (objectArray[i].Type == "tank") { _local1[objectArray[i].Name].OpenFire(); } root[objectArray[i].Name]._y = objectArray[i].Ground; objectArray[i].Beamed = 0; } else { _local1[objectArray[i].Name].gotoAndPlay("collision"); _local1[objectArray[i].Name]._y = objectArray[i].Ground; if (objectArray[i].Linkage != nonDestructableType) { objectArray[i].Beamed = 3; } else { objectArray[i].Beamed = 0; } j = 0; while (j < objectArray.length) { if ((objectArray[j].Beamed == 0) && (_local1[objectArray[i].Name].hitTest(_local1[objectArray[j].Name]) == true)) { if (((objectArray[j].Type == "tank") && (objectArray[i].Type != "tank")) && ((objectArray[j].Type == "tank") && (objectArray[i].Type != "object"))) { } else { objectArray[j].Direction = 0; tempY = _local1[objectArray[j].Name]._y - (_local1[objectArray[i].Name].height / 100); howFar = objectArray[j].ZStack; objectArray[j].ZStack++; _local1[objectArray[i].Name].swapDepths((objectArray[j].Ground * 100) + howFar); _local1[objectArray[i].Name]._y = tempY; } if ((((objectArray[j].Type == "agent") || (objectArray[j].Type == "person")) || ((objectArray[j].Type == "tank") && (objectArray[i].Type == "tank"))) && (objectArray[j].Linkage != nonDestructableType)) { _local1[objectArray[j].Name].goToAndPlay("collision"); if (objectArray[j].Type == "tank") { _local1[objectArray[j].Name].HoldFire(); } deadArray.push(objectArray[j].Name); _local2.push({name:objectArray[j].Name, detach:false, debNum:5}); } } j++; } if (objectArray[i].Linkage != nonDestructableType) { deadArray.push(objectArray[i].Name); _local2.push({name:objectArray[i].Name, detach:false, debNum:6}); } } } objectArray[i].Dy = 0; } else if (objectArray[i].Beamed == 2) { hitFlag = false; if ((objectArray[i].Ground - objectArray[i].FallHeight) >= 20) { j = 0; while (j < objectArray.length) { if ((objectArray[j].Beamed == 0) && (_local1[objectArray[i].Name].hitTest(_local1[objectArray[j].Name]) == true)) { if (((objectArray[j].Type == "tank") && (objectArray[i].Type != "tank")) && ((objectArray[j].Type == "tank") && (objectArray[i].Type != "object"))) { } else { hitFlag = true; _local1[objectArray[i].Name].goToAndPlay("collision"); objectArray[j].Direction = 0; tempY = _local1[objectArray[j].Name]._y - _local1[objectArray[i].Name].height; howFar = objectArray[j].ZStack; objectArray[j].ZStack++; _local1[objectArray[i].Name].swapDepths((objectArray[j].Ground * 100) + howFar); _local1[objectArray[i].Name]._y = tempY; objectArray[i].Dy = 0; } if ((((((objectArray[j].Type == "agent") || (objectArray[j].Type == "person")) || (objectArray[j].Linkage == "bear")) || ((objectArray[j].Type == "tank") && (objectArray[i].Type == "tank"))) || ((objectArray[j].Type == "tank") && (objectArray[i].Type == "object"))) && (objectArray[j].Linkage != nonDestructableType)) { _local1[objectArray[j].Name].goToAndPlay("collision"); if (objectArray[j].Type == "tank") { _local1[objectArray[j].Name].HoldFire(); } deadArray.push(objectArray[j].Name); _local2.push({name:objectArray[j].Name, detach:false, debNum:5}); } break; } j++; } if (hitFlag == true) { if (objectArray[i].Linkage != nonDestructableType) { objectArray[i].Beamed = 3; } else { objectArray[i].Beamed = 0; } if (objectArray[i].Linkage != nonDestructableType) { deadArray.push(objectArray[i].Name); _local2.push({name:objectArray[i].Name, detach:false, debNum:6}); } } } } } } } else if (objectArray[i].Beamed == 1) { if (_local1.beam.hitTest(_local1[objectArray[i].Name]) == eval("False")) { objectArray[i].Beamed = 0; objectArray[i].Timer = 1; } } i++; } var _local3 = 0; while (_local3 < _local2.length) { removeObject(_local2[_local3].name, _local2[_local3].detach, _local2[_local3].debNum); _local3++; } } function moveTargets() { var _local1 = _root; if (targetArray_Name.length != 0) { i = 0; while (i < targetArray_Name.length) { if (targetArray_Frames[i] == 0) { myX = _local1[targetArray_Target[i]]._x; myY = _local1[targetArray_Target[i]]._y; } else { myX = _local1[targetArray_Name[i]]._x + ((_local1[targetArray_Target[i]]._x - _local1[targetArray_Name[i]]._x) / targetArray_Frames[i]); myY = _local1[targetArray_Name[i]]._y + ((_local1[targetArray_Target[i]]._y - _local1[targetArray_Name[i]]._y) / targetArray_Frames[i]); targetArray_Frames[i]--; } _local1[targetArray_Name[i]]._x = myX; _local1[targetArray_Name[i]]._y = myY; i++; } } } function createTarget(myTarget) { var _local1 = _root; name = "unique" + identifierNumber; identifierNumber++; _local1.attachMovie("manTarget", name, z3); z3++; targetArray_Name.push(name); targetArray_Target.push(objectArray[myTarget].Name); targetArray_Frames.push(15); _local1[name]._x = 275; _local1[name]._y = -60; } function removeTarget(myTarget) { var _local1 = myTarget; var _local2 = _root; i = 0; while (i < targetArray_Name.length) { if (targetArray_Target[i] == objectArray[_local1].Name) { _local2[targetArray_Name[i]].removeMovieClip(); targetArray_Name.splice(i, 1); targetArray_Target.splice(i, 1); targetArray_Frames.splice(i, 1); } i++; } } function moveScene(d) { var _local1 = d; var _local2 = _root; if (((panAmount + _local1) > panLimitLeft) and ((panAmount + _local1) < panLimitRight)) { panAmount = panAmount + _local1; trees._x = trees._x + (_local1 * 1); bushes._x = bushes._x + (_local1 * 0.8); hills._x = hills._x + (_local1 * 0.4); boundingbox._x = boundingbox._x + (_local1 * 1); i = 0; while (i < objectArray.length) { if ((((objectArray[i].Beamed == 0) || (objectArray[i].Beamed == 3)) || (objectArray[i].Beamed == 2)) || (objectArray[i].Type == "agent")) { _local2[objectArray[i].Name]._x = _local2[objectArray[i].Name]._x + _local1; } i++; } var i = 0; while (i < heliArray.length) { if (heliArray[i].inFlight == true) { _local2[heliArray[i].name]._x = _local2[heliArray[i].name]._x + _local1; } i++; } i = 0; while (i < deadArray.length) { _local2[deadArray[i]]._x = _local2[deadArray[i]]._x + _local1; i++; } i = 0; while (i < bulletArray.length) { _local2[bulletArray[i]]._x = _local2[bulletArray[i]]._x + _local1; i++; } return(0); } return(1); } function runLevel() { var _local1 = _root; var _local2 = _global; if (buttonCoolDown == 0) { if (Key.isDown(80) || (Key.isDown(27))) { buttonCoolDown = 10; if (_local2.gamePaused == false) { _local1.paused.gotoAndPlay("show"); _local2.gamePaused = true; intPauseTime = getTimer(); } else { _local1.paused.gotoAndPlay("hide"); _local2.gamePaused = false; if (_local2.nextTime != -1) { _local2.nextTime = _local2.nextTime + (getTimer() - intPauseTime); } intPauseTime = 0; } } } else { buttonCoolDown--; } if (_local2.gamePaused == false) { if (deathCounter == -1) { if (Key.isDown(39) && (!Key.isDown(37))) { dx = dx + sensitivity; if (dx > terminalVelocity) { dx = terminalVelocity; } } if (Key.isDown(37) && (!Key.isDown(39))) { dx = dx - sensitivity; if (dx < (terminalVelocity * -1)) { dx = terminalVelocity * -1; } } if (Key.isDown(40) && (!Key.isDown(38))) { dy = dy + sensitivity; if (dy > terminalVelocity) { dy = terminalVelocity; } } if (Key.isDown(38) && (!Key.isDown(40))) { dy = dy - sensitivity; if (dy < (terminalVelocity * -1)) { dy = terminalVelocity * -1; } } } } if (Key.isDown(68)) { _local2.debug = true; _local1.debugStatus(); } else { _local2.debug = false; } if (Key.isDown(16) && (Key.isDown(49))) { _local1.prepareForFrameChange(true, 5); _local2.gamePaused = false; _local2.cheated = true; } if (Key.isDown(16) && (Key.isDown(50))) { _local1.prepareForFrameChange(true, 10); _local2.gamePaused = false; _local2.cheated = true; } if (Key.isDown(16) && (Key.isDown(51))) { _local1.prepareForFrameChange(true, 15); _local2.gamePaused = false; _local2.cheated = true; } if (Key.isDown(16) && (Key.isDown(52))) { _local1.prepareForFrameChange(true, 20); _local2.gamePaused = false; _local2.cheated = true; } if (Key.isDown(16) && (Key.isDown(53))) { _local1.prepareForFrameChange(true, 25); _local2.gamePaused = false; _local2.cheated = true; } if (Key.isDown(16) && (Key.isDown(54))) { _local1.prepareForFrameChange(true, 30); _local2.gamePaused = false; _local2.cheated = true; } if (Key.isDown(16) && (Key.isDown(55))) { _local1.prepareForFrameChange(true, 35); _local2.gamePaused = false; _local2.cheated = true; } if (Key.isDown(16) && (Key.isDown(56))) { _local1.prepareForFrameChange(true, 40); _local2.gamePaused = false; _local2.cheated = true; } if (Key.isDown(16) && (Key.isDown(57))) { _local1.prepareForFrameChange(true, 45); _local2.gamePaused = false; _local2.cheated = true; } if (Key.isDown(16) && (Key.isDown(48))) { _local1.prepareForFrameChange(true, 50); _local2.gamePaused = false; _local2.cheated = true; } if (_local2.gamePaused == false) { if ((!Key.isDown(37)) && (!Key.isDown(39))) { if (dx > 0) { dx = dx - airFriction; } if (dx < 0) { dx = dx + airFriction; } if ((dx >= -0.3) && (dx <= 0.3)) { dx = 0; } } if ((!Key.isDown(38)) && (!Key.isDown(40))) { if (dy > 0) { dy = dy - airFriction; } if (dy < 0) { dy = dy + airFriction; } if ((dy >= -0.3) && (dy <= 0.3)) { dy = 0; } } if (Key.isDown(32) && (energyFlag == 0)) { _local1.beam.gotoandstop(2); shipEnergy = shipEnergy - beamCost; if (shipEnergy < 0) { shipEnergy = 0; energyFlag = 1; } beamFlag = true; _local1.startBeamTags(); } else { beamFlag = false; _local1.beam.gotoandstop(1); shipEnergy = shipEnergy + rechargeRate; if (shipEnergy > totalEnergy) { shipEnergy = totalEnergy; energyFlag = 0; } _local1.removeBeamTags(); } _local1.beamMeUp(); _local1.updateEnergyBar(shipEnergy, totalEnergy, energyFlag); _local1.ship._x = _local1.ship._x + dx; _local1.ship._y = _local1.ship._y + dy; if (beamFlag == true) { _local1.beamHorizontalAndVertical(dx, dy); } if (_local2.shipUsed == 1) { _local1.ship.inside._rotation = dx * 2.5; } if (_local1.ship._x > 450) { _local1.ship._x = 450; } if (_local1.ship._x < 100) { _local1.ship._x = 100; } if (_local1.ship._y < 50) { _local1.ship._y = 50; dy = 0; } if (_local1.ship._y > 250) { _local1.ship._y = 250; dy = 0; } _local1.shadow._x = _local1.ship._x; _local1.beam._x = _local1.ship._x; _local1.beam._y = (_local1.ship._y + (_local1.ship._y / 8)) + 35; _local1.beam._xscale = 50 + ((_local1.ship._y / 2.5) / 2); _local1.beam._yscale = 50 + ((_local1.ship._y / 2.5) / 2); _local1.shadow._alpha = _local1.ship._y / 4; _local1.shadow._xscale = 300 - _local1.ship._y; _local1.shadow._yscale = 300 - _local1.ship._y; varFlag = 0; if ((_local1.ship._x <= 100) && (dx < 0)) { varFlag = _local1.moveScene(-1 * dx); } else if ((_local1.ship._x >= 450) && (dx > 0)) { varFlag = _local1.moveScene(-1 * dx); } if (varFlag == 1) { dx = 0; } _local1.runTimer(); _local1.TankGenerator(); _local1.ManageHelicopters(); _local1.spotship(); _local1.makePeopleMove(); _local1.DetectBulletHits(); _local1.updatePeopleBar(_local2.currentPeople, _local2.totalPeopleToGet); _local1.moveTargets(); if (deathCounter >= 0) { if (deathCounter == 0) { _local2.livesLeft--; _local1.updateLives(_local2.livesLeft); _local1.prepareForFrameChange(false, 0); if (_local2.livesLeft != 0) { var randSound = (Math.round(Math.random() * 5) + 1); } } else { deathCounter--; } } if (_local2.nextTime != -1) { _local1.updateTimer(); } } } stop(); myNextLevel = 10; _global.debug = false; nonDestructableType = "rock"; panLimitLeft = -300; panLimitRight = 300; panAmount = 0; oldValue = 0; numPeople = 0; maxPeople = 0; percentFrequency = 0; zArray = new Array(); zStack = new Array(); z3 = 10000; objectArray = new Array(); bulletArray = new Array(); deadArray = new Array(); targetArray_Name = new Array(); targetArray_Target = new Array(); targetArray_Frames = new Array(); availPeople = new Array(); myVolume = 100; mySong = "Nothing"; myZ1 = 0; myZ2 = 0; terminalVelocity = 8; sensitivity = 0.4; totalEnergy = 200; shipEnergy = 200; rechargeRate = 2; beamCost = 2; timeToBeat = 180; airFriction = 0.15; xFriction = 0.15; xGroundFriction = 0.4; gravity = 0.4; yTerminalVelocity = 15; energyFlag = 0; pickUpFlag = 0; dropSpeed = 0; groundLevel = _root.truck._y; truckFlag = 0; dx = 0; dy = 0; tankArray = new Array(); tankSpawnTimeMin = 0; tankSpawnTimeMax = 0; tankCounter = -1; blnUseTanks = false; tanksToUse = "green"; heliArray = new Array(); bulletDepth = 30000; _global.totalPeopleToGet = 5; identifierNumber = 5; var mySoundPlayer = new SoundPlayer(); buttonCoolDown = 0; intPauseTime = 0; deathCounter = -1; almostFlag = false;
Instance of Symbol 304 MovieClip in Frame 5
onClipEvent (load) { _root.initializeLevel(5, 10, -400, 400, "igloo", -1, 5); _root.updateLives(_global.livesLeft); _root.setPeopleTimer(20, 2); _root.addPersonType("eskimo", "person", 25); _root.addPersonType("ethan", "person", 25); _root.addUnit("igloo1", 0, "igloo", "object"); _root.addUnit("igloo2", 0, "igloo", "object"); _root.addUnit("igloo3", 0, "igloo", "object"); _root.addUnit("igloo4", 0, "igloo", "object"); levelTrack = "arctic level"; _root.startMusicDownload(levelTrack); } onClipEvent (enterFrame) { _root.runLevel(); }
Instance of Symbol 657 MovieClip "volumeClip" in Frame 5
onClipEvent (load) { if (_global.volume == true) { volumeClip.goToAndPlay("volumeOn"); } else { volumeClip.goToAndPlay("volumeOff"); } } on (release) { if (_global.volume == true) { _global.volume = false; _root.volumeClip.nextFrame(); _root.toggleMusic(); } else { _global.volume = true; _root.volumeClip.prevFrame(); _root.toggleMusic(); } }
Frame 7
function submitScore() { if (this.playerName_txt.text == "Your Name Here") { _global.SoundManager.PlaySound("nocando"); } else { myScoreSaver.SendScores(this.playerName_txt.text, _global.totalPeople); _root.gotoAndPlay("menuScreen"); } } function loginScore() { trace("login score"); myScoreSaver.UserLogin(_global.totalPeople); _root.gotoAndPlay("menuScreen"); } function endGameScore() { this.finalScore_txt.text = _global.totalPeople; } stop(); var myScoreSaver = new BagunkScores(); myScoreSaver.SetCode("7uKYpxwrYqUbLQ7J"); myScoreSaver.SetGameID(302);
Instance of Symbol 364 MovieClip in Frame 7
on (rollOver) { var playForward = 1; var frameCounter = 1; var holdCounter = 9; } on (rollOut) { if (playForward != 3) { playForward = 2; } } onClipEvent (enterFrame) { if ((playForward == 1) && (frameCounter < 12)) { this.nextFrame(); frameCounter++; } else if (playForward == 2) { this.prevFrame(); frameCounter--; } else if (playForward == 3) { holdCounter--; if (holdCounter == 0) { _root.gotoAndPlay("menuScreen"); playForward = 0; } } } on (release) { _global.SoundManager.PlaySound("button_hit"); this.gotoAndPlay("flash"); playForward = 3; }
Instance of Symbol 364 MovieClip in Frame 7
on (rollOver) { var playForward = 1; var frameCounter = 1; var holdCounter = 9; } on (rollOut) { if (playForward != 3) { playForward = 2; } } onClipEvent (enterFrame) { if ((playForward == 1) && (frameCounter < 12)) { this.nextFrame(); frameCounter++; } else if (playForward == 2) { this.prevFrame(); frameCounter--; } else if (playForward == 3) { holdCounter--; if (holdCounter == 0) { this._parent.submitScore(); playForward = 0; } } } on (release) { _global.SoundManager.PlaySound("button_hit"); this.gotoAndPlay("flash"); playForward = 3; }
Instance of Symbol 611 MovieClip in Frame 7
onClipEvent (load) { _root.endGameScore(); }
Frame 10
function initializeLevel(currentLevel, nextLevel, leftMax, rightMax, nonDestructable, timeToWin, peopleToGet) { var _local1 = _global; var _local2 = _root; identifierNumber = currentLevel; myNextLevel = nextLevel; panLimitLeft = leftMax; panLimitRight = rightMax; nonDestructableType = nonDestructable; timeToBeat = timeToWin; _local1.totalPeopleToGet = peopleToGet; if (_local1.tempLives < 0) { _local1.livesLeft = 3; } else { _local1.livesLeft = _local1.tempLives; } energyFlag = 0; pickUpFlag = 0; dropSpeed = 0; groundLevel = _local2.truck._y; truckFlag = 0; dx = 0; dy = 0; if (_local1.tempPeople < 0) { _local1.currentPeople = 0; } else { _local1.currentPeople = _local1.tempPeople; } _local1.tempPeople = 0; _local1.tempLives = 0; _local1.tempFrame = identifierNumber; if (timeToBeat == -1) { _local1.nextTime = -1; _local2.updateTimer(); } else { if ((_local1.nextTime == -1) && (timeToBeat != -1)) { _local1.nextTime = 0; } if (_local1.nextTime != -1) { if (_local1.stolenTime == 0) { _local1.nextTime = getTimer() + (timeToBeat * 1000); } else { _local1.nextTime = _local1.nextTime + (getTimer() - _local1.stolenTime); _local1.stolenTime = 0; } } } _local1.stolenTime = 0; if (_local1.shipUsed == 1) { _local2.ship.gotoAndStop("ship1"); } else { _local2.ship.gotoAndStop("ship2"); } } function addPersonType(myLinkage, myType, myWeight) { availPeople.push({linkage:myLinkage, type:myType, weight:myWeight}); } function playSound(soundName) { if (_global.volume == true) { mySoundPlayer.PlaySound(soundName); } } function startMusicDownload(music) { var _local1 = _global; if (_local1.musicOn == true) { _local1.mySound.stop(); _local1.mySound.attachSound(music); _local1.mySound.start(0, 99); _local1.mySound.setVolume(myVolume); } else { _root.volumeClip.gotoAndStop(2); _local1.mySound.stop(); } mySong = music; } function toggleMusic() { var _local1 = _global; if (_local1.volume == true) { _local1.mySound.attachSound(mySong); _local1.mySound.start(0, 99); _local1.mySound.setVolume(myVolume); _local1.musicOn = true; } else { _local1.mySound.stop(); _local1.mySound.setVolume(myVolume); _local1.musicOn = false; } } function updateTimer() { var _local1 = _global; if (_local1.nextTime == -1) { timeText = "NO LIMIT"; } else { myTime = _local1.nextTime - getTimer(); mySecs = math.floor(myTime / 1000); if (mySecs == 0) { _local1.livesLeft = 0; prepareForFrameChange(false, 0); } if (mySecs > 60) { someSeconds = myTime / 1000; someMinutes = someSeconds / 60; if (someSeconds > 59) { someSeconds = someSeconds - (Math.floor(someMinutes) * 60); } if (someSeconds < 10) { textMinutes = someMinutes; timeText = (Math.floor(textMinutes) + ":0") + Math.floor(someSeconds); } else if (someSeconds == 0) { textMinutes = someMinutes; timeText = Math.floor(textMinutes) + ":00"; } else { textMinutes = someMinutes; timeText = (Math.floor(textMinutes) + ":") + Math.floor(someSeconds); } } else { timeText = Math.floor(mySecs); } } } function updateLives(lifeNum) { var _local1 = lifeNum; if (_local1 < 0) { _local1 = 0; } lives = _local1; } function prepareForFrameChange(newLevel, levelNum) { var _local1 = _global; var _local2 = _root; _local1.tempLives = _local1.livesLeft; _local1.tempPeople = _local1.currentPeople; cleanScreen(); if ((_local1.livesLeft > 0) && (newLevel == false)) { _local1.stolenTime = getTimer(); _local2.goToAndPlay("loseLife"); } else if ((_local1.livesLeft > 0) && (newLevel == true)) { _local1.tempPeople = -1; _local1.tempFrame = levelNum; _local2.goToAndPlay("levelText"); } else if (_local1.livesLeft == 0) { _local2.goToAndPlay("endGame"); } } function cleanScreen() { var _local1 = _root; i = 0; while (i < objectArray.length) { _local1[objectArray[i].Name].removeMovieClip(); i++; } i = 0; while (i < deadArray.length) { _local1[deadArray[i]].removeMovieClip(); i++; } i = 0; while (i < targetArray_Name.length) { _local1[targetArray_Name[i]].removeMovieClip(); i++; } i = 0; while (i < bulletArray.length) { _local1[bulletArray[i]].removeMovieClip(); i++; } } function setPeopleTimer(mPeople, pFrequency) { var _local1 = _root; myZ2 = Math.round(_local1.z2._y); myZ1 = Math.round(_local1.z1._y); _local1.z1._y = -50; _local1.z2._y = -50; i = myZ1; while (i < myZ2) { zArray.push(i); zStack.push(1); i++; } percentFrequency = pFrequency; maxPeople = mPeople; } function runTimer() { if (numPeople != maxPeople) { if (random(255) < percentFrequency) { numPeople++; addPersonDynamic(false); } } } function rangeInUse(minZ, maxZ) { var _local2 = maxZ; var _local3 = minZ; var _local1 = false; i = 0; while (i < objectArray.length) { if ((objectArray[i].ZStack >= _local3) && (objectArray[i].ZStack <= _local2)) { _local1 = true; } i++; } return(_local1); } function startBeamTags() { var _local1 = _root; i = 0; while (i < objectArray.length) { if (_local1.beam.hitTest(_local1[objectArray[i].Name]) == true) { if (objectArray[i].Beamed == 0) { _local1[objectArray[i].Name].goToAndPlay("beamed"); objectArray[i].Beamed = 1; objectArray[i].Dy = 0; if (objectArray[i].Type == "tank") { _local1[objectArray[i].Name].HoldFire(); } } if (objectArray[i].Beamed == 2) { _local1[objectArray[i].Name].goToAndStop("endbeam"); objectArray[i].Beamed = 1; objectArray[i].Dy = 0; } } i++; } } function debugStatus() { trace("Name type beamed timer"); trace("----------------------------------------"); i = 0; while (i < objectArray.length) { trace((((((((((objectArray[i].Name + " ") + objectArray[i].Type) + " ") + objectArray[i].Beamed) + " ") + objectArray[i].Timer) + " ") + objectArray[i].Spotted) + " ") + objectArray[i].Direction); i++; } trace("----------------------------------------"); } function removeBeamTags() { var _local1 = _root; i = 0; while (i < objectArray.length) { if ((objectArray[i].Beamed == 1) && (objectArray[i].Type != "agent")) { objectArray[i].Beamed = 2; objectArray[i].FallHeight = _local1[objectArray[i].Name]._y; } else if ((objectArray[i].Beamed == 1) && (objectArray[i].Type == "agent")) { objectArray[i].Beamed = 0; objectArray[i].Timer = 1; } i++; } } function addUnit(name, newSpeed, myLinkage, givenType) { var _local1 = _root; var _local2 = name; var _local3 = newSpeed; tempX = _local1[_local2]._x; tempY = _local1[_local2]._y; wantY = Math.round(tempY); flag = -1; myZStack = -1; i = 0; while (i < zArray.length) { if (zArray[i] == wantY) { flag = i; myZstack = zStack[i]; } i++; } if (flag != -1) { zArray.splice(flag, 1); zStack.splice(flag, 1); } _local1[_local2]._visible = false; _local2 = givenType + identifierNumber; identifierNumber++; _local1.attachMovie(myLinkage, _local2, wantY * 100); if (givenType == "tank") { _local1[_local2].SetFireRate(40); tankArray.push({track:wantY, occupied:true, tank:_local2}); } _local1[_local2]._x = tempX; _local1[_local2]._y = tempY; x = 275; if ((_local1[_local2]._x <= x) && (_local3 != 0)) { dir = _local3; _local1[_local2]._xscale = -Math.abs(_local1[_local2]._xscale); if (myLinkage == "antiAir") { _local1[_local2]._xscale = _local1[_local2]._xscale * -1; } } else { dir = -1 * _local3; } var groundLevel = Math.round(_local1[_local2]._y + (_local1[_local2]._height / 2)); objectArray.push({Name:_local2, Beamed:0, Type:givenType, Ground:groundLevel, Dx:0, Dy:0, Timer:0, Spotted:0, Linkage:myLinkage, ZStack:myZStack, Direction:dir, FallHeight:0}); return(_local2); } function generateEthan() { addPersonDynamic(true); } function addPersonDynamic(isEthan) { if (zArray.length == 0) { return(null); } if (isEthan == false) { r = random(2); switch (r) { case 0 : var _local3 = 0; var _local2 = -1; var _local1 = 0; while (_local1 < availPeople.length) { _local3 = _local3 + availPeople[_local1].weight; _local1++; } var chosenWeight = Math.round(Math.random() * _local3); _local1 = 0; while (_local1 < availPeople.length) { if ((chosenWeight > _local2) && (chosenWeight <= (_local2 + availPeople[_local1].weight))) { myGuy = availPeople[_local1].linkage; myType = availPeople[_local1].type; break; } _local2 = _local2 + availPeople[_local1].weight; _local1++; } break; case 1 : myGuy = "MIB"; myType = "agent"; } } else { myGuy = "ethan"; myType = "person"; } r = random(zArray.length); z = zArray[r]; zs = zStack[r]; zArray.splice(r, 1); zStack.splice(r, 1); name = "unique" + identifierNumber; identifierNumber++; _root.attachMovie(myGuy, name, z * 100); r = random(2); if (r == 0) { x = _root.boundingbox._x + (_root.boundingbox._width / 2); } else { x = _root.boundingbox._x - (_root.boundingbox._width / 2); } _root[name]._x = x; _root[name]._y = z; x = _root.hills._x; if (_root[name]._x <= x) { dir = 1; if (myType == "agent") { _root[name]._xscale = -Math.abs(_root[name]._xscale); } } else { dir = -1; if (myType != "agent") { _root[name]._xscale = -Math.abs(_root[name]._xscale); } } _root[name].goToAndPlay("walk"); objectArray.push({Name:name, Beamed:0, Type:myType, Ground:z, Dx:0, Dy:0, Timer:0, Spotted:0, Linkage:myGuy, ZStack:zs, Direction:dir, FallHeight:0}); return(undefined); } function addTank(name, newSpeed, myLinkage, myTrack) { var _local1 = _root; var _local3 = myTrack; var _local2 = "tank"; if (tanksToUse == "red") { _local2 = "redTank"; } if (tanksToUse == "white") { _local2 = "whiteTank"; } _local1.attachMovie(_local2, name, _local3 * 100); r = random(2); if (r == 0) { x = _local1.boundingbox._x + (_local1.boundingbox._width / 2); } else { x = _local1.boundingbox._x - (_local1.boundingbox._width / 2); } _local1[name]._x = x; if (tanksToUse == "red") { _local1[name].SetFireRate(15); } else if (tanksToUse == "white") { _local1[name].SetFireRate(25); } else { _local1[name].SetFireRate(40); } _local1[name]._y = _local3; x = _local1.hills._x; if (_local1[name]._x <= x) { dir = 1; _local1[name]._xscale = _local1[name]._xscale * -1; } else { dir = -1; } _local1[name].goToAndPlay("idle"); objectArray.push({Name:name, Beamed:0, Type:"tank", Ground:_local3, Dx:0, Dy:0, Timer:0, Spotted:0, Linkage:"tank", ZStack:999999, Direction:dir, FallHeight:0}); } function makePeopleMove() { var _local1 = _root; var _local3 = _global; var queueRemoval = new Array(); i = 0; while (i < objectArray.length) { if (objectArray[i].Beamed == 0) { if (objectArray[i].Timer == 1) { if (_local3.debug == true) { trace(i); } if (_local1[objectArray[i].Name]._x < _local1.ship._x) { objectArray[i].Direction = -3; if (objectArray[i].Type == "person") { _local1[objectArray[i].Name]._xscale = -Math.abs(_local1[objectArray[i].Name]._xscale); } else if (objectArray[i].Type == "agent") { _local1[objectArray[i].Name]._xscale = Math.abs(_local1[objectArray[i].Name]._xscale); if (objectArray[i].Spotted == 0) { createTarget(i); objectArray[i].Spotted = 1; } } } else { objectArray[i].Direction = 3; if (objectArray[i].Type == "person") { _local1[objectArray[i].Name]._xscale = Math.abs(_local1[objectArray[i].Name]._xscale); } else if (objectArray[i].Type == "agent") { _local1[objectArray[i].Name]._xscale = -Math.abs(_local1[objectArray[i].Name]._xscale); if (objectArray[i].Spotted == 0) { createTarget(i); objectArray[i].Spotted = 1; } } } _local1[objectArray[i].Name].gotoandplay("run"); } if (objectArray[i].Timer > 0) { objectArray[i].Timer--; } _local1[objectArray[i].Name]._x = _local1[objectArray[i].Name]._x + objectArray[i].Direction; if ((_local1[objectArray[i].Name]._x < (_local1.boundingbox._x - (_local1.boundingbox._width / 2))) && (objectArray[i].Direction < 0)) { if (objectArray[i].Spotted == 1) { _local3.livesLeft--; _local1.updateLives(_local3.livesLeft); _local1.prepareForFrameChange(false, 0); if (_local3.livesLeft != 0) { var randSound = (Math.round(Math.random() * 5) + 1); } } if (objectArray[i].Type == "tank") { OpenTrack(objectArray[i].Name); } queueRemoval.push({name:objectArray[i].Name, detach:true, debNum:1}); } else if ((_local1[objectArray[i].Name]._x > (_local1.boundingbox._x + (_local1.boundingbox._width / 2))) && (objectArray[i].Direction > 0)) { if (objectArray[i].Spotted == 1) { _local3.livesLeft--; _local1.updateLives(_local3.livesLeft); _local1.prepareForFrameChange(false, 0); if (_local3.livesLeft != 0) { var randSound = (Math.round(Math.random() * 5) + 1); } } if (objectArray[i].Type == "tank") { OpenTrack(objectArray[i].Name); } queueRemoval.push({name:objectArray[i].Name, detach:true, debNum:2}); } } i++; } var _local2 = 0; while (_local2 < queueRemoval.length) { removeObject(queueRemoval[_local2].name, queueRemoval[_local2].detach, queueRemoval[_local2].debNum); _local2++; } tanksAim(); } function removeObject(objectName, removeFromScreen, debugNum) { var _local2 = removeFromScreen; var _local3 = _root; i = -1; var _local1 = 0; while (_local1 < objectArray.length) { if (objectArray[_local1].Name == objectName) { i = _local1; if (objectArray[_local1].Type != "tank") { zArray.push(objectArray[_local1].Ground); zStack.push(objectArray[_local1].ZStack); } if ((objectArray[_local1].Type != "object") && (objectArray[_local1].Type != "tank")) { numPeople--; } if (objectArray[_local1].Spotted == 1) { removeTarget(i); } if (_local2) { _local3[objectArray[_local1].Name].removeMovieClip(); } objectArray.splice(_local1, 1); return; } _local1++; } } function updateEnergyBar(current, total, flag) { var _local1 = _root; frac = current / total; _local1.energy._xscale = frac * 100; if (flag == 1) { _local1.energy.goToAndStop(2); } else { _local1.energy.goToAndStop(1); } } function updatePeopleBar(current, total) { var _local1 = current; var _local2 = total; var _local3 = _root; frac = _local1 / _local2; _local3.peopleToGo._xscale = frac * 100; myFrame = 10; frac = (_local1 / _local2) * 100; if (frac < 10) { myFrame = 1; } else if ((frac >= 10) && (frac < 20)) { myFrame = 2; } else if ((frac >= 20) && (frac < 30)) { myFrame = 3; } else if ((frac >= 30) && (frac < 40)) { myFrame = 4; } else if ((frac >= 40) && (frac < 50)) { myFrame = 5; } else if ((frac >= 50) && (frac < 60)) { myFrame = 6; } else if ((frac >= 60) && (frac < 70)) { myFrame = 7; } else if ((frac >= 70) && (frac < 80)) { myFrame = 8; } else if ((frac >= 80) && (frac < 90)) { myFrame = 9; } else if ((frac >= 90) && (frac <= 100)) { myFrame = 10; } if (oldValue != myFrame) { _local3.peopleToGo.goToAndStop(myFrame); } oldValue = myFrame; if ((_local1 == (_local2 - 2)) && (almostFlag == false)) { var randSound = (Math.round(Math.random() * 4) + 1); _local3.playSound("good" + randSound); almostFlag = true; } if (_local1 == _local2) { prepareForFrameChange(true, myNextLevel); } } function spotship() { var _local1 = _root; i = 0; while (i < objectArray.length) { if (((objectArray[i].Beamed == 0) && ((objectArray[i].Type == "person") || (objectArray[i].Type == "agent"))) && ((objectArray[i].Direction == 1) || (objectArray[i].Direction == -1))) { myDist = getDistance(i); if (myDist <= 175) { if (((objectArray[i].Direction == 1) && (_local1[objectArray[i].Name]._x < _local1.ship._x)) && (_local1[objectArray[i].Name]._x >= 50)) { _local1[objectArray[i].Name].gotoandplay("spot"); objectArray[i].Direction = 0; objectArray[i].Timer = 30; } else if (((objectArray[i].Direction == -1) && (_local1[objectArray[i].Name]._x > _local1.ship._x)) && (_local1[objectArray[i].Name]._x <= 500)) { _local1[objectArray[i].Name].gotoandplay("spot"); objectArray[i].Direction = 0; objectArray[i].Timer = 30; } } } i++; } } function tanksAim() { var _local3 = _root; var _local2 = 0; while (_local2 < objectArray.length) { if ((objectArray[_local2].Beamed == 0) && (objectArray[_local2].Type == "tank")) { var tankName = objectArray[_local2].Name; var point = {x:_local3[tankName].cannon._x, y:_local3[tankName].cannon._y}; _local3[tankName].localToGlobal(point); var op = (_local3.ship._y - point.y); var adj = (_local3.ship._x - point.x); if (adj == 0) { adj = 1; } var _local1 = (Math.atan(op / adj) * 180) / Math.PI; if (_local1 < 0) { _local1 = _local1 * -1; } if (_local1 > 90) { _local1 = 90; } if (_local1 < 20) { _local1 = 20; } _local3[tankName].cannon._rotation = _local1; } _local2++; } } function StartTankGenerator(min, max, color) { tanksToUse = color; blnUseTanks = true; tankSpawnTimeMin = min; tankSpawnTimeMax = max; tankCounter = Math.round(Math.random() * (tankSpawnTimeMax - tankSpawnTimeMin)) + tankSpawnTimeMin; } function TankGenerator() { if (blnUseTanks == true) { intAvailFlag = -1; var _local1 = 0; while (_local1 < tankArray.length) { if (tankArray[_local1].occupied == false) { intAvailFlag = _local1; break; } _local1++; } if (intAvailFlag != -1) { if (tankCounter == 0) { var _local2 = "tank" + identifierNumber; identifierNumber++; tankArray[intAvailFlag].occupied = true; tankArray[intAvailFlag].tank = _local2; addTank(_local2, 3, "tank", tankArray[intAvailFlag].track); tankCounter = Math.round(Math.random() * (tankSpawnTimeMax - tankSpawnTimeMin)) + tankSpawnTimeMin; } else { tankCounter--; } } } } function OpenTrack(tankName) { var _local2 = tankName; var _local1 = 0; while (_local1 < tankArray.length) { if (tankArray[_local1].tank == _local2) { tankArray[_local1].tank = ""; tankArray[_local1].occupied = false; trace(("track " + _local1) + " is open"); } _local1++; } } function LaunchBullet(bulletName, startX, startY, directionX, directionY) { var _local1 = bulletName; var _local3 = _root; var _local2 = ""; if ((substring(_local1, 0, 18)) == "bullet_helicopter_") { _local2 = "bullet air"; } else { _local2 = "bullet ground"; } _local3.attachMovie(_local2, _local1, bulletDepth); _local3[_local1]._x = startX; _local3[_local1]._y = startY; _local3[_local1].SetMovement(directionX, directionY); bulletArray.push(_local1); bulletDepth++; } function DetectBulletHits() { var _local1 = _root; var _local3 = new Array(); var _local2 = 0; while (_local2 < bulletArray.length) { distancex = _local1[bulletArray[_local2]]._x - _local1.ship._x; distancey = _local1[bulletArray[_local2]]._y - _local1.ship._y; if (Math.sqrt((distancex * distancex) + (distancey * distancey)) <= 19) { if ((substring(bulletArray[_local2], 0, 18)) == "bullet_helicopter_") { shipEnergy = 0; energyFlag = 1; _local1.ship.explosion.gotoAndPlay("shock"); _local3.push(bulletArray[_local2]); } else { _local1.ship.explosion.gotoAndPlay("explode"); _local1.playSound("explosion"); if (deathCounter == -1) { deathCounter = 16; } _local3.push(bulletArray[_local2]); } } _local2++; } _local2 = 0; while (_local2 < _local3.length) { RemoveBullet(_local3[_local2]); _local2++; } } function ObjectCleanup(itemName) { var _local1 = itemName; if (_local1.substr(0, 4) == "tank") { OpenTrack(_local1); } _root[_local1].removeMovieClip(); } function RemoveBullet(itemName) { var _local3 = itemName; var _local2 = -1; var _local1 = 0; while (_local1 < bulletArray.length) { if (bulletArray[_local1] == _local3) { _local2 = _local1; break; } _local1++; } if (_local2 != -1) { bulletArray.splice(_local2, 1); _root[_local3].removeMovieClip(); } } function addHelicopter(itemName, minSpawn, maxSpawn, mySpeed) { var _local1 = minSpawn; var _local2 = Math.round(Math.random() * (maxSpawn - _local1)) + _local1; heliArray.push({name:itemName, min:_local1, max:maxSpawn, counter:_local2, speed:mySpeed, inFlight:false, hasFired:false, isFiring:false}); } function ManageHelicopters() { var _local2 = _root; var _local1 = 0; while (_local1 < heliArray.length) { if (heliArray[_local1].inFlight == false) { if (heliArray[_local1].counter == 0) { heliArray[_local1].inFlight = true; _local2[heliArray[_local1].name]._x; r = random(2); if (r == 0) { x = _local2.boundingbox._x + (_local2.boundingbox._width / 2); _local2[heliArray[_local1].name]._xscale = 100; heliArray[_local1].speed = -Math.abs(heliArray[_local1].speed); } else { x = (_local2.boundingbox._x - (_local2.boundingbox._width / 2)) - _local2[heliArray[_local1].name]._width; _local2[heliArray[_local1].name]._xscale = -100; heliArray[_local1].speed = Math.abs(heliArray[_local1].speed); } _local2[heliArray[_local1].name]._x = x; var y = (Math.round(Math.random() * 151) + 53); _local2[heliArray[_local1].name]._y = y; } else { heliArray[_local1].counter--; } } else { if (heliArray[_local1].isFiring == false) { _local2[heliArray[_local1].name]._x = _local2[heliArray[_local1].name]._x + heliArray[_local1].speed; } if ((heliArray[_local1].hasFired == false) && (heliArray[_local1].isFiring == false)) { if (((_local2[heliArray[_local1].name]._x - _local2[heliArray[_local1].name]._width) > 0) && ((_local2[heliArray[_local1].name]._x + _local2[heliArray[_local1].name]._width) < Stage.width)) { _local2[heliArray[_local1].name].gotoAndPlay("shoot"); heliArray[_local1].isFiring = true; trace(heliArray[_local1].name + " has fired"); } } if (heliArray[_local1].hasFired == true) { if (((_local2[heliArray[_local1].name]._x + _local2[heliArray[_local1].name]._width) < (_local2.boundingbox._x - (_local2.boundingbox._width / 2))) || ((_local2[heliArray[_local1].name]._x - _local2[heliArray[_local1].name]._width) > (_local2.boundingbox._x + (_local2.boundingbox._width / 2)))) { trace("out of bounds"); heliArray[_local1].inFlight = false; var _local3 = Math.round(Math.random() * (heliArray[_local1].max - heliArray[_local1].min)) + heliArray[_local1].min; heliArray[_local1].counter = _local3; heliArray[_local1].hasFired = false; heliArray[_local1].isFiring = false; } } } _local1++; } } function HelicopterFire(name) { var _local3 = name; var _local2 = 0; var _local1 = 0; while (_local1 < heliArray.length) { if (heliArray[_local1].name == _local3) { _local2 = _local1; break; } _local1++; } var myName = ("bullet_helicopter_" + identifierNumber); identifierNumber++; var point = {x:_root[_local3].emitter1._x, y:_root[_local3].emitter1._y}; _root[_local3].localToGlobal(point); var bulletSpeed = 0; trace("helicopter speed is: " + heliArray[_local2].speed); if (heliArray[_local2].speed > 0) { bulletSpeed = heliArray[_local2].speed + 2; } else { bulletSpeed = heliArray[_local2].speed - 2; } LaunchBullet(myName, point.x, point.Y, bulletSpeed, 0); } function HelicopterDoneFiring(name) { var _local2 = name; var _local1 = 0; while (_local1 < heliArray.length) { if (heliArray[_local1].name == _local2) { heliArray[_local1].isFiring = false; heliArray[_local1].hasFired = true; return; } _local1++; } } function getDistance(i) { var _local1 = _root; distancex = _local1[objectArray[i].Name]._x - _local1.ship._x; distancey = _local1[objectArray[i].Name]._y - _local1.ship._y; return(Math.sqrt((distancex * distancex) + (distancey * distancey))); } function beamHorizontalAndVertical(asscheese, assY) { var _local1 = _root; var _local2 = asscheese; var _local3 = assY; i = 0; while (i < objectArray.length) { if ((objectArray[i].Beamed == 1) && (objectArray[i].Type != "agent")) { objectArray[i].Dx = _local2; if ((_local1.ship._x > 100) && (_local1.ship._X < 450)) { _local1[objectArray[i].Name]._x = _local1[objectArray[i].Name]._x + _local2; } if ((_local1.ship._y > 50) && (_local1.ship._y < 250)) { _local1[objectArray[i].Name]._y = _local1[objectArray[i].Name]._y + _local3; if (_local1[objectArray[i].Name]._y > objectArray[i].Ground) { _local1[objectArray[i].Name]._y = objectArray[i].Ground; } } } i++; } } function beamMeUp() { var _local1 = _root; var _local2 = new Array(); i = 0; while (i < objectArray.length) { if (objectArray[i].Type != "agent") { if (objectArray[i].Beamed == 1) { if (((objectArray[i].Type == "object") || (objectArray[i].Type == "tank")) && (objectArray[i].Linkage != "BonusIcon")) { maxheight = (_local1.ship._y + (_local1.ship._height / 2)) + (_local1[objectArray[i].Name]._height / 2); if (_local1[objectArray[i].Name]._y > maxheight) { _local1[objectArray[i].Name]._y = _local1[objectArray[i].Name]._y - 2; } } else if (_local1[objectArray[i].Name]._y > _local1.ship._y) { _local1[objectArray[i].Name]._y = _local1[objectArray[i].Name]._y - 2; } else if (objectArray[i].Beamed == 1) { _local1[objectArray[i].Name]._y = -20; objectArray[i].Beamed = 2; _local2.push({name:objectArray[i].Name, detach:true, debNum:4}); if (objectArray[i].Linkage != "BonusIcon") { if ((objectArray[i].Linkage != "person2") && (objectArray[i].Linkage != "person5")) { var scream = Math.round(Math.random() * 8); trace(scream); if (scream == 4) { playSound("maleEnjoy"); } else { playSound("maleScream"); } } else { playSound("maleScream"); } var scream = Math.round(Math.random() * 12); if (scream == 8) { var randSound = (Math.round(Math.random() * 3) + 1); _local1.playSound("rand" + randSound); } _global.currentPeople++; _global.totalPeople++; _local1.display._x = _local1.ship._x; _local1.display._y = _local1.ship._y; _local1.display.goToAndPlay("people"); } else { playSound("bonusSound"); _global.bonusPoints++; _local1.display._x = _local1.ship._x; _local1.display._y = _local1.ship._y; _local1.display.goToAndPlay("points"); } } if (_local1[objectArray[i].Name]._x < _local1.ship._x) { _local1[objectArray[i].Name]._x = _local1[objectArray[i].Name]._x + 1; if (_local1[objectArray[i].Name]._x >= _local1.ship._x) { _local1[objectArray[i].Name]._x = _local1.ship._x; } } if (_local1[objectArray[i].Name]._x > _local1.ship._x) { _local1[objectArray[i].Name]._x = _local1[objectArray[i].Name]._x - 1; if (_local1[objectArray[i].Name]._x <= _local1.ship._x) { _local1[objectArray[i].Name]._x = _local1.ship._x; } } } else { if (objectArray[i].Beamed == 2) { _local1[objectArray[i].Name].goToAndPlay("falling"); } if ((_local1[objectArray[i].Name]._y + (_local1[objectArray[i].Name]._height / 2)) == objectArray[i].Ground) { } else if (_local1[objectArray[i].Name]._y > 0) { _local1[objectArray[i].Name]._y = _local1[objectArray[i].Name]._y + objectArray[i].Dy; objectArray[i].Dy = objectArray[i].Dy + gravity; if (objectArray[i].Dy > yTerminalVelocity) { objectArray[i].Dy = yTerminalVelocity; } _local1[objectArray[i].Name]._x = _local1[objectArray[i].Name]._x + objectArray[i].Dx; if ((_local1[objectArray[i].Name]._y + (_local1[objectArray[i].Name]._height / 2)) >= objectArray[i].Ground) { useFriction = xGroundFriction; } else { useFriction = xFriction; } if ((objectArray[i].Dx >= -0.4) && (objectArray[i].Dx <= 0.4)) { objectArray[i].Dx = 0; } if (objectArray[i].Dx < 0) { objectArray[i].Dx = objectArray[i].Dx + useFriction; } if (objectArray[i].Dx > 0) { objectArray[i].Dx = objectArray[i].Dx - useFriction; } if ((_local1[objectArray[i].Name]._y + (_local1[objectArray[i].Name]._height / 2)) >= objectArray[i].Ground) { if (objectArray[i].Beamed == 2) { if ((objectArray[i].Ground - objectArray[i].FallHeight) < 20) { if (objectArray[i].Type == "tank") { _local1[objectArray[i].Name].gotoAndPlay("idle"); } else if (objectArray[i].Type == "person") { _local1[objectArray[i].Name].gotoAndPlay("run"); objectArray[i].Timer = 1; } if (objectArray[i].Type == "tank") { _local1[objectArray[i].Name].OpenFire(); } root[objectArray[i].Name]._y = objectArray[i].Ground; objectArray[i].Beamed = 0; } else { _local1[objectArray[i].Name].gotoAndPlay("collision"); _local1[objectArray[i].Name]._y = objectArray[i].Ground; if (objectArray[i].Linkage != nonDestructableType) { objectArray[i].Beamed = 3; } else { objectArray[i].Beamed = 0; } j = 0; while (j < objectArray.length) { if ((objectArray[j].Beamed == 0) && (_local1[objectArray[i].Name].hitTest(_local1[objectArray[j].Name]) == true)) { if (((objectArray[j].Type == "tank") && (objectArray[i].Type != "tank")) && ((objectArray[j].Type == "tank") && (objectArray[i].Type != "object"))) { } else { objectArray[j].Direction = 0; tempY = _local1[objectArray[j].Name]._y - (_local1[objectArray[i].Name].height / 100); howFar = objectArray[j].ZStack; objectArray[j].ZStack++; _local1[objectArray[i].Name].swapDepths((objectArray[j].Ground * 100) + howFar); _local1[objectArray[i].Name]._y = tempY; } if ((((objectArray[j].Type == "agent") || (objectArray[j].Type == "person")) || ((objectArray[j].Type == "tank") && (objectArray[i].Type == "tank"))) && (objectArray[j].Linkage != nonDestructableType)) { _local1[objectArray[j].Name].goToAndPlay("collision"); if (objectArray[j].Type == "tank") { _local1[objectArray[j].Name].HoldFire(); } deadArray.push(objectArray[j].Name); _local2.push({name:objectArray[j].Name, detach:false, debNum:5}); } } j++; } if (objectArray[i].Linkage != nonDestructableType) { deadArray.push(objectArray[i].Name); _local2.push({name:objectArray[i].Name, detach:false, debNum:6}); } } } objectArray[i].Dy = 0; } else if (objectArray[i].Beamed == 2) { hitFlag = false; if ((objectArray[i].Ground - objectArray[i].FallHeight) >= 20) { j = 0; while (j < objectArray.length) { if ((objectArray[j].Beamed == 0) && (_local1[objectArray[i].Name].hitTest(_local1[objectArray[j].Name]) == true)) { if (((objectArray[j].Type == "tank") && (objectArray[i].Type != "tank")) && ((objectArray[j].Type == "tank") && (objectArray[i].Type != "object"))) { } else { hitFlag = true; _local1[objectArray[i].Name].goToAndPlay("collision"); objectArray[j].Direction = 0; tempY = _local1[objectArray[j].Name]._y - _local1[objectArray[i].Name].height; howFar = objectArray[j].ZStack; objectArray[j].ZStack++; _local1[objectArray[i].Name].swapDepths((objectArray[j].Ground * 100) + howFar); _local1[objectArray[i].Name]._y = tempY; objectArray[i].Dy = 0; } if ((((((objectArray[j].Type == "agent") || (objectArray[j].Type == "person")) || (objectArray[j].Linkage == "bear")) || ((objectArray[j].Type == "tank") && (objectArray[i].Type == "tank"))) || ((objectArray[j].Type == "tank") && (objectArray[i].Type == "object"))) && (objectArray[j].Linkage != nonDestructableType)) { _local1[objectArray[j].Name].goToAndPlay("collision"); if (objectArray[j].Type == "tank") { _local1[objectArray[j].Name].HoldFire(); } deadArray.push(objectArray[j].Name); _local2.push({name:objectArray[j].Name, detach:false, debNum:5}); } break; } j++; } if (hitFlag == true) { if (objectArray[i].Linkage != nonDestructableType) { objectArray[i].Beamed = 3; } else { objectArray[i].Beamed = 0; } if (objectArray[i].Linkage != nonDestructableType) { deadArray.push(objectArray[i].Name); _local2.push({name:objectArray[i].Name, detach:false, debNum:6}); } } } } } } } else if (objectArray[i].Beamed == 1) { if (_local1.beam.hitTest(_local1[objectArray[i].Name]) == eval("False")) { objectArray[i].Beamed = 0; objectArray[i].Timer = 1; } } i++; } var _local3 = 0; while (_local3 < _local2.length) { removeObject(_local2[_local3].name, _local2[_local3].detach, _local2[_local3].debNum); _local3++; } } function moveTargets() { var _local1 = _root; if (targetArray_Name.length != 0) { i = 0; while (i < targetArray_Name.length) { if (targetArray_Frames[i] == 0) { myX = _local1[targetArray_Target[i]]._x; myY = _local1[targetArray_Target[i]]._y; } else { myX = _local1[targetArray_Name[i]]._x + ((_local1[targetArray_Target[i]]._x - _local1[targetArray_Name[i]]._x) / targetArray_Frames[i]); myY = _local1[targetArray_Name[i]]._y + ((_local1[targetArray_Target[i]]._y - _local1[targetArray_Name[i]]._y) / targetArray_Frames[i]); targetArray_Frames[i]--; } _local1[targetArray_Name[i]]._x = myX; _local1[targetArray_Name[i]]._y = myY; i++; } } } function createTarget(myTarget) { var _local1 = _root; name = "unique" + identifierNumber; identifierNumber++; _local1.attachMovie("manTarget", name, z3); z3++; targetArray_Name.push(name); targetArray_Target.push(objectArray[myTarget].Name); targetArray_Frames.push(15); _local1[name]._x = 275; _local1[name]._y = -60; } function removeTarget(myTarget) { var _local1 = myTarget; var _local2 = _root; i = 0; while (i < targetArray_Name.length) { if (targetArray_Target[i] == objectArray[_local1].Name) { _local2[targetArray_Name[i]].removeMovieClip(); targetArray_Name.splice(i, 1); targetArray_Target.splice(i, 1); targetArray_Frames.splice(i, 1); } i++; } } function moveScene(d) { var _local1 = d; var _local2 = _root; if (((panAmount + _local1) > panLimitLeft) and ((panAmount + _local1) < panLimitRight)) { panAmount = panAmount + _local1; trees._x = trees._x + (_local1 * 1); bushes._x = bushes._x + (_local1 * 0.8); hills._x = hills._x + (_local1 * 0.4); boundingbox._x = boundingbox._x + (_local1 * 1); i = 0; while (i < objectArray.length) { if ((((objectArray[i].Beamed == 0) || (objectArray[i].Beamed == 3)) || (objectArray[i].Beamed == 2)) || (objectArray[i].Type == "agent")) { _local2[objectArray[i].Name]._x = _local2[objectArray[i].Name]._x + _local1; } i++; } var i = 0; while (i < heliArray.length) { if (heliArray[i].inFlight == true) { _local2[heliArray[i].name]._x = _local2[heliArray[i].name]._x + _local1; } i++; } i = 0; while (i < deadArray.length) { _local2[deadArray[i]]._x = _local2[deadArray[i]]._x + _local1; i++; } i = 0; while (i < bulletArray.length) { _local2[bulletArray[i]]._x = _local2[bulletArray[i]]._x + _local1; i++; } return(0); } return(1); } function runLevel() { var _local1 = _root; var _local2 = _global; if (buttonCoolDown == 0) { if (Key.isDown(80) || (Key.isDown(27))) { buttonCoolDown = 10; if (_local2.gamePaused == false) { _local1.paused.gotoAndPlay("show"); _local2.gamePaused = true; intPauseTime = getTimer(); } else { _local1.paused.gotoAndPlay("hide"); _local2.gamePaused = false; if (_local2.nextTime != -1) { _local2.nextTime = _local2.nextTime + (getTimer() - intPauseTime); } intPauseTime = 0; } } } else { buttonCoolDown--; } if (_local2.gamePaused == false) { if (deathCounter == -1) { if (Key.isDown(39) && (!Key.isDown(37))) { dx = dx + sensitivity; if (dx > terminalVelocity) { dx = terminalVelocity; } } if (Key.isDown(37) && (!Key.isDown(39))) { dx = dx - sensitivity; if (dx < (terminalVelocity * -1)) { dx = terminalVelocity * -1; } } if (Key.isDown(40) && (!Key.isDown(38))) { dy = dy + sensitivity; if (dy > terminalVelocity) { dy = terminalVelocity; } } if (Key.isDown(38) && (!Key.isDown(40))) { dy = dy - sensitivity; if (dy < (terminalVelocity * -1)) { dy = terminalVelocity * -1; } } } } if (Key.isDown(68)) { _local2.debug = true; _local1.debugStatus(); } else { _local2.debug = false; } if (Key.isDown(16) && (Key.isDown(49))) { _local1.prepareForFrameChange(true, 5); _local2.gamePaused = false; _local2.cheated = true; } if (Key.isDown(16) && (Key.isDown(50))) { _local1.prepareForFrameChange(true, 10); _local2.gamePaused = false; _local2.cheated = true; } if (Key.isDown(16) && (Key.isDown(51))) { _local1.prepareForFrameChange(true, 15); _local2.gamePaused = false; _local2.cheated = true; } if (Key.isDown(16) && (Key.isDown(52))) { _local1.prepareForFrameChange(true, 20); _local2.gamePaused = false; _local2.cheated = true; } if (Key.isDown(16) && (Key.isDown(53))) { _local1.prepareForFrameChange(true, 25); _local2.gamePaused = false; _local2.cheated = true; } if (Key.isDown(16) && (Key.isDown(54))) { _local1.prepareForFrameChange(true, 30); _local2.gamePaused = false; _local2.cheated = true; } if (Key.isDown(16) && (Key.isDown(55))) { _local1.prepareForFrameChange(true, 35); _local2.gamePaused = false; _local2.cheated = true; } if (Key.isDown(16) && (Key.isDown(56))) { _local1.prepareForFrameChange(true, 40); _local2.gamePaused = false; _local2.cheated = true; } if (Key.isDown(16) && (Key.isDown(57))) { _local1.prepareForFrameChange(true, 45); _local2.gamePaused = false; _local2.cheated = true; } if (Key.isDown(16) && (Key.isDown(48))) { _local1.prepareForFrameChange(true, 50); _local2.gamePaused = false; _local2.cheated = true; } if (_local2.gamePaused == false) { if ((!Key.isDown(37)) && (!Key.isDown(39))) { if (dx > 0) { dx = dx - airFriction; } if (dx < 0) { dx = dx + airFriction; } if ((dx >= -0.3) && (dx <= 0.3)) { dx = 0; } } if ((!Key.isDown(38)) && (!Key.isDown(40))) { if (dy > 0) { dy = dy - airFriction; } if (dy < 0) { dy = dy + airFriction; } if ((dy >= -0.3) && (dy <= 0.3)) { dy = 0; } } if (Key.isDown(32) && (energyFlag == 0)) { _local1.beam.gotoandstop(2); shipEnergy = shipEnergy - beamCost; if (shipEnergy < 0) { shipEnergy = 0; energyFlag = 1; } beamFlag = true; _local1.startBeamTags(); } else { beamFlag = false; _local1.beam.gotoandstop(1); shipEnergy = shipEnergy + rechargeRate; if (shipEnergy > totalEnergy) { shipEnergy = totalEnergy; energyFlag = 0; } _local1.removeBeamTags(); } _local1.beamMeUp(); _local1.updateEnergyBar(shipEnergy, totalEnergy, energyFlag); _local1.ship._x = _local1.ship._x + dx; _local1.ship._y = _local1.ship._y + dy; if (beamFlag == true) { _local1.beamHorizontalAndVertical(dx, dy); } if (_local2.shipUsed == 1) { _local1.ship.inside._rotation = dx * 2.5; } if (_local1.ship._x > 450) { _local1.ship._x = 450; } if (_local1.ship._x < 100) { _local1.ship._x = 100; } if (_local1.ship._y < 50) { _local1.ship._y = 50; dy = 0; } if (_local1.ship._y > 250) { _local1.ship._y = 250; dy = 0; } _local1.shadow._x = _local1.ship._x; _local1.beam._x = _local1.ship._x; _local1.beam._y = (_local1.ship._y + (_local1.ship._y / 8)) + 35; _local1.beam._xscale = 50 + ((_local1.ship._y / 2.5) / 2); _local1.beam._yscale = 50 + ((_local1.ship._y / 2.5) / 2); _local1.shadow._alpha = _local1.ship._y / 4; _local1.shadow._xscale = 300 - _local1.ship._y; _local1.shadow._yscale = 300 - _local1.ship._y; varFlag = 0; if ((_local1.ship._x <= 100) && (dx < 0)) { varFlag = _local1.moveScene(-1 * dx); } else if ((_local1.ship._x >= 450) && (dx > 0)) { varFlag = _local1.moveScene(-1 * dx); } if (varFlag == 1) { dx = 0; } _local1.runTimer(); _local1.TankGenerator(); _local1.ManageHelicopters(); _local1.spotship(); _local1.makePeopleMove(); _local1.DetectBulletHits(); _local1.updatePeopleBar(_local2.currentPeople, _local2.totalPeopleToGet); _local1.moveTargets(); if (deathCounter >= 0) { if (deathCounter == 0) { _local2.livesLeft--; _local1.updateLives(_local2.livesLeft); _local1.prepareForFrameChange(false, 0); if (_local2.livesLeft != 0) { var randSound = (Math.round(Math.random() * 5) + 1); } } else { deathCounter--; } } if (_local2.nextTime != -1) { _local1.updateTimer(); } } } stop(); myNextLevel = 10; _global.debug = false; nonDestructableType = "rock"; panLimitLeft = -300; panLimitRight = 300; panAmount = 0; oldValue = 0; numPeople = 0; maxPeople = 0; percentFrequency = 0; zArray = new Array(); zStack = new Array(); z3 = 10000; objectArray = new Array(); bulletArray = new Array(); deadArray = new Array(); targetArray_Name = new Array(); targetArray_Target = new Array(); targetArray_Frames = new Array(); availPeople = new Array(); myVolume = 100; mySong = "Nothing"; myZ1 = 0; myZ2 = 0; terminalVelocity = 8; sensitivity = 0.4; totalEnergy = 200; shipEnergy = 200; rechargeRate = 2; beamCost = 2; timeToBeat = 180; airFriction = 0.15; xFriction = 0.15; xGroundFriction = 0.4; gravity = 0.4; yTerminalVelocity = 15; energyFlag = 0; pickUpFlag = 0; dropSpeed = 0; groundLevel = _root.truck._y; truckFlag = 0; dx = 0; dy = 0; tankArray = new Array(); tankSpawnTimeMin = 0; tankSpawnTimeMax = 0; tankCounter = -1; blnUseTanks = false; tanksToUse = "green"; heliArray = new Array(); bulletDepth = 30000; _global.totalPeopleToGet = 5; identifierNumber = 5; var mySoundPlayer = new SoundPlayer(); buttonCoolDown = 0; intPauseTime = 0; deathCounter = -1; almostFlag = false;
Instance of Symbol 304 MovieClip in Frame 10
onClipEvent (load) { _root.initializeLevel(10, 15, -500, 500, "", 300, 10); _root.updateLives(_global.livesLeft); _root.setPeopleTimer(20, 3); _root.addPersonType("person4", "person", 25); _root.addPersonType("person5", "person", 25); _root.addPersonType("person3", "person", 25); _root.addPersonType("ethan", "person", 25); levelTrack = "night level"; _root.startMusicDownload(levelTrack); } onClipEvent (enterFrame) { _root.runLevel(); }
Instance of Symbol 657 MovieClip "volumeClip" in Frame 10
onClipEvent (load) { if (_global.volume == true) { volumeClip.goToAndPlay("volumeOn"); } else { volumeClip.goToAndPlay("volumeOff"); } } on (release) { if (_global.volume == true) { _global.volume = false; _root.volumeClip.nextFrame(); _root.toggleMusic(); } else { _global.volume = true; _root.volumeClip.prevFrame(); _root.toggleMusic(); } }
Frame 15
function initializeLevel(currentLevel, nextLevel, leftMax, rightMax, nonDestructable, timeToWin, peopleToGet) { var _local1 = _global; var _local2 = _root; identifierNumber = currentLevel; myNextLevel = nextLevel; panLimitLeft = leftMax; panLimitRight = rightMax; nonDestructableType = nonDestructable; timeToBeat = timeToWin; _local1.totalPeopleToGet = peopleToGet; if (_local1.tempLives < 0) { _local1.livesLeft = 3; } else { _local1.livesLeft = _local1.tempLives; } energyFlag = 0; pickUpFlag = 0; dropSpeed = 0; groundLevel = _local2.truck._y; truckFlag = 0; dx = 0; dy = 0; if (_local1.tempPeople < 0) { _local1.currentPeople = 0; } else { _local1.currentPeople = _local1.tempPeople; } _local1.tempPeople = 0; _local1.tempLives = 0; _local1.tempFrame = identifierNumber; if (timeToBeat == -1) { _local1.nextTime = -1; _local2.updateTimer(); } else { if ((_local1.nextTime == -1) && (timeToBeat != -1)) { _local1.nextTime = 0; } if (_local1.nextTime != -1) { if (_local1.stolenTime == 0) { _local1.nextTime = getTimer() + (timeToBeat * 1000); } else { _local1.nextTime = _local1.nextTime + (getTimer() - _local1.stolenTime); _local1.stolenTime = 0; } } } _local1.stolenTime = 0; if (_local1.shipUsed == 1) { _local2.ship.gotoAndStop("ship1"); } else { _local2.ship.gotoAndStop("ship2"); } } function addPersonType(myLinkage, myType, myWeight) { availPeople.push({linkage:myLinkage, type:myType, weight:myWeight}); } function playSound(soundName) { if (_global.volume == true) { mySoundPlayer.PlaySound(soundName); } } function startMusicDownload(music) { var _local1 = _global; if (_local1.musicOn == true) { _local1.mySound.stop(); _local1.mySound.attachSound(music); _local1.mySound.start(0, 99); _local1.mySound.setVolume(myVolume); } else { _root.volumeClip.gotoAndStop(2); _local1.mySound.stop(); } mySong = music; } function toggleMusic() { var _local1 = _global; if (_local1.volume == true) { _local1.mySound.attachSound(mySong); _local1.mySound.start(0, 99); _local1.mySound.setVolume(myVolume); _local1.musicOn = true; } else { _local1.mySound.stop(); _local1.mySound.setVolume(myVolume); _local1.musicOn = false; } } function updateTimer() { var _local1 = _global; if (_local1.nextTime == -1) { timeText = "NO LIMIT"; } else { myTime = _local1.nextTime - getTimer(); mySecs = math.floor(myTime / 1000); if (mySecs == 0) { _local1.livesLeft = 0; prepareForFrameChange(false, 0); } if (mySecs > 60) { someSeconds = myTime / 1000; someMinutes = someSeconds / 60; if (someSeconds > 59) { someSeconds = someSeconds - (Math.floor(someMinutes) * 60); } if (someSeconds < 10) { textMinutes = someMinutes; timeText = (Math.floor(textMinutes) + ":0") + Math.floor(someSeconds); } else if (someSeconds == 0) { textMinutes = someMinutes; timeText = Math.floor(textMinutes) + ":00"; } else { textMinutes = someMinutes; timeText = (Math.floor(textMinutes) + ":") + Math.floor(someSeconds); } } else { timeText = Math.floor(mySecs); } } } function updateLives(lifeNum) { var _local1 = lifeNum; if (_local1 < 0) { _local1 = 0; } lives = _local1; } function prepareForFrameChange(newLevel, levelNum) { var _local1 = _global; var _local2 = _root; _local1.tempLives = _local1.livesLeft; _local1.tempPeople = _local1.currentPeople; cleanScreen(); if ((_local1.livesLeft > 0) && (newLevel == false)) { _local1.stolenTime = getTimer(); _local2.goToAndPlay("loseLife"); } else if ((_local1.livesLeft > 0) && (newLevel == true)) { _local1.tempPeople = -1; _local1.tempFrame = levelNum; _local2.goToAndPlay("levelText"); } else if (_local1.livesLeft == 0) { _local2.goToAndPlay("endGame"); } } function cleanScreen() { var _local1 = _root; i = 0; while (i < objectArray.length) { _local1[objectArray[i].Name].removeMovieClip(); i++; } i = 0; while (i < deadArray.length) { _local1[deadArray[i]].removeMovieClip(); i++; } i = 0; while (i < targetArray_Name.length) { _local1[targetArray_Name[i]].removeMovieClip(); i++; } i = 0; while (i < bulletArray.length) { _local1[bulletArray[i]].removeMovieClip(); i++; } } function setPeopleTimer(mPeople, pFrequency) { var _local1 = _root; myZ2 = Math.round(_local1.z2._y); myZ1 = Math.round(_local1.z1._y); _local1.z1._y = -50; _local1.z2._y = -50; i = myZ1; while (i < myZ2) { zArray.push(i); zStack.push(1); i++; } percentFrequency = pFrequency; maxPeople = mPeople; } function runTimer() { if (numPeople != maxPeople) { if (random(255) < percentFrequency) { numPeople++; addPersonDynamic(false); } } } function rangeInUse(minZ, maxZ) { var _local2 = maxZ; var _local3 = minZ; var _local1 = false; i = 0; while (i < objectArray.length) { if ((objectArray[i].ZStack >= _local3) && (objectArray[i].ZStack <= _local2)) { _local1 = true; } i++; } return(_local1); } function startBeamTags() { var _local1 = _root; i = 0; while (i < objectArray.length) { if (_local1.beam.hitTest(_local1[objectArray[i].Name]) == true) { if (objectArray[i].Beamed == 0) { _local1[objectArray[i].Name].goToAndPlay("beamed"); objectArray[i].Beamed = 1; objectArray[i].Dy = 0; if (objectArray[i].Type == "tank") { _local1[objectArray[i].Name].HoldFire(); } } if (objectArray[i].Beamed == 2) { _local1[objectArray[i].Name].goToAndStop("endbeam"); objectArray[i].Beamed = 1; objectArray[i].Dy = 0; } } i++; } } function debugStatus() { trace("Name type beamed timer"); trace("----------------------------------------"); i = 0; while (i < objectArray.length) { trace((((((((((objectArray[i].Name + " ") + objectArray[i].Type) + " ") + objectArray[i].Beamed) + " ") + objectArray[i].Timer) + " ") + objectArray[i].Spotted) + " ") + objectArray[i].Direction); i++; } trace("----------------------------------------"); } function removeBeamTags() { var _local1 = _root; i = 0; while (i < objectArray.length) { if ((objectArray[i].Beamed == 1) && (objectArray[i].Type != "agent")) { objectArray[i].Beamed = 2; objectArray[i].FallHeight = _local1[objectArray[i].Name]._y; } else if ((objectArray[i].Beamed == 1) && (objectArray[i].Type == "agent")) { objectArray[i].Beamed = 0; objectArray[i].Timer = 1; } i++; } } function addUnit(name, newSpeed, myLinkage, givenType) { var _local1 = _root; var _local2 = name; var _local3 = newSpeed; tempX = _local1[_local2]._x; tempY = _local1[_local2]._y; wantY = Math.round(tempY); flag = -1; myZStack = -1; i = 0; while (i < zArray.length) { if (zArray[i] == wantY) { flag = i; myZstack = zStack[i]; } i++; } if (flag != -1) { zArray.splice(flag, 1); zStack.splice(flag, 1); } _local1[_local2]._visible = false; _local2 = givenType + identifierNumber; identifierNumber++; _local1.attachMovie(myLinkage, _local2, wantY * 100); if (givenType == "tank") { _local1[_local2].SetFireRate(40); tankArray.push({track:wantY, occupied:true, tank:_local2}); } _local1[_local2]._x = tempX; _local1[_local2]._y = tempY; x = 275; if ((_local1[_local2]._x <= x) && (_local3 != 0)) { dir = _local3; _local1[_local2]._xscale = -Math.abs(_local1[_local2]._xscale); if (myLinkage == "antiAir") { _local1[_local2]._xscale = _local1[_local2]._xscale * -1; } } else { dir = -1 * _local3; } var groundLevel = Math.round(_local1[_local2]._y + (_local1[_local2]._height / 2)); objectArray.push({Name:_local2, Beamed:0, Type:givenType, Ground:groundLevel, Dx:0, Dy:0, Timer:0, Spotted:0, Linkage:myLinkage, ZStack:myZStack, Direction:dir, FallHeight:0}); return(_local2); } function generateEthan() { addPersonDynamic(true); } function addPersonDynamic(isEthan) { if (zArray.length == 0) { return(null); } if (isEthan == false) { r = random(2); switch (r) { case 0 : var _local3 = 0; var _local2 = -1; var _local1 = 0; while (_local1 < availPeople.length) { _local3 = _local3 + availPeople[_local1].weight; _local1++; } var chosenWeight = Math.round(Math.random() * _local3); _local1 = 0; while (_local1 < availPeople.length) { if ((chosenWeight > _local2) && (chosenWeight <= (_local2 + availPeople[_local1].weight))) { myGuy = availPeople[_local1].linkage; myType = availPeople[_local1].type; break; } _local2 = _local2 + availPeople[_local1].weight; _local1++; } break; case 1 : myGuy = "MIB"; myType = "agent"; } } else { myGuy = "ethan"; myType = "person"; } r = random(zArray.length); z = zArray[r]; zs = zStack[r]; zArray.splice(r, 1); zStack.splice(r, 1); name = "unique" + identifierNumber; identifierNumber++; _root.attachMovie(myGuy, name, z * 100); r = random(2); if (r == 0) { x = _root.boundingbox._x + (_root.boundingbox._width / 2); } else { x = _root.boundingbox._x - (_root.boundingbox._width / 2); } _root[name]._x = x; _root[name]._y = z; x = _root.hills._x; if (_root[name]._x <= x) { dir = 1; if (myType == "agent") { _root[name]._xscale = -Math.abs(_root[name]._xscale); } } else { dir = -1; if (myType != "agent") { _root[name]._xscale = -Math.abs(_root[name]._xscale); } } _root[name].goToAndPlay("walk"); objectArray.push({Name:name, Beamed:0, Type:myType, Ground:z, Dx:0, Dy:0, Timer:0, Spotted:0, Linkage:myGuy, ZStack:zs, Direction:dir, FallHeight:0}); return(undefined); } function addTank(name, newSpeed, myLinkage, myTrack) { var _local1 = _root; var _local3 = myTrack; var _local2 = "tank"; if (tanksToUse == "red") { _local2 = "redTank"; } if (tanksToUse == "white") { _local2 = "whiteTank"; } _local1.attachMovie(_local2, name, _local3 * 100); r = random(2); if (r == 0) { x = _local1.boundingbox._x + (_local1.boundingbox._width / 2); } else { x = _local1.boundingbox._x - (_local1.boundingbox._width / 2); } _local1[name]._x = x; if (tanksToUse == "red") { _local1[name].SetFireRate(15); } else if (tanksToUse == "white") { _local1[name].SetFireRate(25); } else { _local1[name].SetFireRate(40); } _local1[name]._y = _local3; x = _local1.hills._x; if (_local1[name]._x <= x) { dir = 1; _local1[name]._xscale = _local1[name]._xscale * -1; } else { dir = -1; } _local1[name].goToAndPlay("idle"); objectArray.push({Name:name, Beamed:0, Type:"tank", Ground:_local3, Dx:0, Dy:0, Timer:0, Spotted:0, Linkage:"tank", ZStack:999999, Direction:dir, FallHeight:0}); } function makePeopleMove() { var _local1 = _root; var _local3 = _global; var queueRemoval = new Array(); i = 0; while (i < objectArray.length) { if (objectArray[i].Beamed == 0) { if (objectArray[i].Timer == 1) { if (_local3.debug == true) { trace(i); } if (_local1[objectArray[i].Name]._x < _local1.ship._x) { objectArray[i].Direction = -3; if (objectArray[i].Type == "person") { _local1[objectArray[i].Name]._xscale = -Math.abs(_local1[objectArray[i].Name]._xscale); } else if (objectArray[i].Type == "agent") { _local1[objectArray[i].Name]._xscale = Math.abs(_local1[objectArray[i].Name]._xscale); if (objectArray[i].Spotted == 0) { createTarget(i); objectArray[i].Spotted = 1; } } } else { objectArray[i].Direction = 3; if (objectArray[i].Type == "person") { _local1[objectArray[i].Name]._xscale = Math.abs(_local1[objectArray[i].Name]._xscale); } else if (objectArray[i].Type == "agent") { _local1[objectArray[i].Name]._xscale = -Math.abs(_local1[objectArray[i].Name]._xscale); if (objectArray[i].Spotted == 0) { createTarget(i); objectArray[i].Spotted = 1; } } } _local1[objectArray[i].Name].gotoandplay("run"); } if (objectArray[i].Timer > 0) { objectArray[i].Timer--; } _local1[objectArray[i].Name]._x = _local1[objectArray[i].Name]._x + objectArray[i].Direction; if ((_local1[objectArray[i].Name]._x < (_local1.boundingbox._x - (_local1.boundingbox._width / 2))) && (objectArray[i].Direction < 0)) { if (objectArray[i].Spotted == 1) { _local3.livesLeft--; _local1.updateLives(_local3.livesLeft); _local1.prepareForFrameChange(false, 0); if (_local3.livesLeft != 0) { var randSound = (Math.round(Math.random() * 5) + 1); } } if (objectArray[i].Type == "tank") { OpenTrack(objectArray[i].Name); } queueRemoval.push({name:objectArray[i].Name, detach:true, debNum:1}); } else if ((_local1[objectArray[i].Name]._x > (_local1.boundingbox._x + (_local1.boundingbox._width / 2))) && (objectArray[i].Direction > 0)) { if (objectArray[i].Spotted == 1) { _local3.livesLeft--; _local1.updateLives(_local3.livesLeft); _local1.prepareForFrameChange(false, 0); if (_local3.livesLeft != 0) { var randSound = (Math.round(Math.random() * 5) + 1); } } if (objectArray[i].Type == "tank") { OpenTrack(objectArray[i].Name); } queueRemoval.push({name:objectArray[i].Name, detach:true, debNum:2}); } } i++; } var _local2 = 0; while (_local2 < queueRemoval.length) { removeObject(queueRemoval[_local2].name, queueRemoval[_local2].detach, queueRemoval[_local2].debNum); _local2++; } tanksAim(); } function removeObject(objectName, removeFromScreen, debugNum) { var _local2 = removeFromScreen; var _local3 = _root; i = -1; var _local1 = 0; while (_local1 < objectArray.length) { if (objectArray[_local1].Name == objectName) { i = _local1; if (objectArray[_local1].Type != "tank") { zArray.push(objectArray[_local1].Ground); zStack.push(objectArray[_local1].ZStack); } if ((objectArray[_local1].Type != "object") && (objectArray[_local1].Type != "tank")) { numPeople--; } if (objectArray[_local1].Spotted == 1) { removeTarget(i); } if (_local2) { _local3[objectArray[_local1].Name].removeMovieClip(); } objectArray.splice(_local1, 1); return; } _local1++; } } function updateEnergyBar(current, total, flag) { var _local1 = _root; frac = current / total; _local1.energy._xscale = frac * 100; if (flag == 1) { _local1.energy.goToAndStop(2); } else { _local1.energy.goToAndStop(1); } } function updatePeopleBar(current, total) { var _local1 = current; var _local2 = total; var _local3 = _root; frac = _local1 / _local2; _local3.peopleToGo._xscale = frac * 100; myFrame = 10; frac = (_local1 / _local2) * 100; if (frac < 10) { myFrame = 1; } else if ((frac >= 10) && (frac < 20)) { myFrame = 2; } else if ((frac >= 20) && (frac < 30)) { myFrame = 3; } else if ((frac >= 30) && (frac < 40)) { myFrame = 4; } else if ((frac >= 40) && (frac < 50)) { myFrame = 5; } else if ((frac >= 50) && (frac < 60)) { myFrame = 6; } else if ((frac >= 60) && (frac < 70)) { myFrame = 7; } else if ((frac >= 70) && (frac < 80)) { myFrame = 8; } else if ((frac >= 80) && (frac < 90)) { myFrame = 9; } else if ((frac >= 90) && (frac <= 100)) { myFrame = 10; } if (oldValue != myFrame) { _local3.peopleToGo.goToAndStop(myFrame); } oldValue = myFrame; if ((_local1 == (_local2 - 2)) && (almostFlag == false)) { var randSound = (Math.round(Math.random() * 4) + 1); _local3.playSound("good" + randSound); almostFlag = true; } if (_local1 == _local2) { prepareForFrameChange(true, myNextLevel); } } function spotship() { var _local1 = _root; i = 0; while (i < objectArray.length) { if (((objectArray[i].Beamed == 0) && ((objectArray[i].Type == "person") || (objectArray[i].Type == "agent"))) && ((objectArray[i].Direction == 1) || (objectArray[i].Direction == -1))) { myDist = getDistance(i); if (myDist <= 175) { if (((objectArray[i].Direction == 1) && (_local1[objectArray[i].Name]._x < _local1.ship._x)) && (_local1[objectArray[i].Name]._x >= 50)) { _local1[objectArray[i].Name].gotoandplay("spot"); objectArray[i].Direction = 0; objectArray[i].Timer = 30; } else if (((objectArray[i].Direction == -1) && (_local1[objectArray[i].Name]._x > _local1.ship._x)) && (_local1[objectArray[i].Name]._x <= 500)) { _local1[objectArray[i].Name].gotoandplay("spot"); objectArray[i].Direction = 0; objectArray[i].Timer = 30; } } } i++; } } function tanksAim() { var _local3 = _root; var _local2 = 0; while (_local2 < objectArray.length) { if ((objectArray[_local2].Beamed == 0) && (objectArray[_local2].Type == "tank")) { var tankName = objectArray[_local2].Name; var point = {x:_local3[tankName].cannon._x, y:_local3[tankName].cannon._y}; _local3[tankName].localToGlobal(point); var op = (_local3.ship._y - point.y); var adj = (_local3.ship._x - point.x); if (adj == 0) { adj = 1; } var _local1 = (Math.atan(op / adj) * 180) / Math.PI; if (_local1 < 0) { _local1 = _local1 * -1; } if (_local1 > 90) { _local1 = 90; } if (_local1 < 20) { _local1 = 20; } _local3[tankName].cannon._rotation = _local1; } _local2++; } } function StartTankGenerator(min, max, color) { tanksToUse = color; blnUseTanks = true; tankSpawnTimeMin = min; tankSpawnTimeMax = max; tankCounter = Math.round(Math.random() * (tankSpawnTimeMax - tankSpawnTimeMin)) + tankSpawnTimeMin; } function TankGenerator() { if (blnUseTanks == true) { intAvailFlag = -1; var _local1 = 0; while (_local1 < tankArray.length) { if (tankArray[_local1].occupied == false) { intAvailFlag = _local1; break; } _local1++; } if (intAvailFlag != -1) { if (tankCounter == 0) { var _local2 = "tank" + identifierNumber; identifierNumber++; tankArray[intAvailFlag].occupied = true; tankArray[intAvailFlag].tank = _local2; addTank(_local2, 3, "tank", tankArray[intAvailFlag].track); tankCounter = Math.round(Math.random() * (tankSpawnTimeMax - tankSpawnTimeMin)) + tankSpawnTimeMin; } else { tankCounter--; } } } } function OpenTrack(tankName) { var _local2 = tankName; var _local1 = 0; while (_local1 < tankArray.length) { if (tankArray[_local1].tank == _local2) { tankArray[_local1].tank = ""; tankArray[_local1].occupied = false; trace(("track " + _local1) + " is open"); } _local1++; } } function LaunchBullet(bulletName, startX, startY, directionX, directionY) { var _local1 = bulletName; var _local3 = _root; var _local2 = ""; if ((substring(_local1, 0, 18)) == "bullet_helicopter_") { _local2 = "bullet air"; } else { _local2 = "bullet ground"; } _local3.attachMovie(_local2, _local1, bulletDepth); _local3[_local1]._x = startX; _local3[_local1]._y = startY; _local3[_local1].SetMovement(directionX, directionY); bulletArray.push(_local1); bulletDepth++; } function DetectBulletHits() { var _local1 = _root; var _local3 = new Array(); var _local2 = 0; while (_local2 < bulletArray.length) { distancex = _local1[bulletArray[_local2]]._x - _local1.ship._x; distancey = _local1[bulletArray[_local2]]._y - _local1.ship._y; if (Math.sqrt((distancex * distancex) + (distancey * distancey)) <= 19) { if ((substring(bulletArray[_local2], 0, 18)) == "bullet_helicopter_") { shipEnergy = 0; energyFlag = 1; _local1.ship.explosion.gotoAndPlay("shock"); _local3.push(bulletArray[_local2]); } else { _local1.ship.explosion.gotoAndPlay("explode"); _local1.playSound("explosion"); if (deathCounter == -1) { deathCounter = 16; } _local3.push(bulletArray[_local2]); } } _local2++; } _local2 = 0; while (_local2 < _local3.length) { RemoveBullet(_local3[_local2]); _local2++; } } function ObjectCleanup(itemName) { var _local1 = itemName; if (_local1.substr(0, 4) == "tank") { OpenTrack(_local1); } _root[_local1].removeMovieClip(); } function RemoveBullet(itemName) { var _local3 = itemName; var _local2 = -1; var _local1 = 0; while (_local1 < bulletArray.length) { if (bulletArray[_local1] == _local3) { _local2 = _local1; break; } _local1++; } if (_local2 != -1) { bulletArray.splice(_local2, 1); _root[_local3].removeMovieClip(); } } function addHelicopter(itemName, minSpawn, maxSpawn, mySpeed) { var _local1 = minSpawn; var _local2 = Math.round(Math.random() * (maxSpawn - _local1)) + _local1; heliArray.push({name:itemName, min:_local1, max:maxSpawn, counter:_local2, speed:mySpeed, inFlight:false, hasFired:false, isFiring:false}); } function ManageHelicopters() { var _local2 = _root; var _local1 = 0; while (_local1 < heliArray.length) { if (heliArray[_local1].inFlight == false) { if (heliArray[_local1].counter == 0) { heliArray[_local1].inFlight = true; _local2[heliArray[_local1].name]._x; r = random(2); if (r == 0) { x = _local2.boundingbox._x + (_local2.boundingbox._width / 2); _local2[heliArray[_local1].name]._xscale = 100; heliArray[_local1].speed = -Math.abs(heliArray[_local1].speed); } else { x = (_local2.boundingbox._x - (_local2.boundingbox._width / 2)) - _local2[heliArray[_local1].name]._width; _local2[heliArray[_local1].name]._xscale = -100; heliArray[_local1].speed = Math.abs(heliArray[_local1].speed); } _local2[heliArray[_local1].name]._x = x; var y = (Math.round(Math.random() * 151) + 53); _local2[heliArray[_local1].name]._y = y; } else { heliArray[_local1].counter--; } } else { if (heliArray[_local1].isFiring == false) { _local2[heliArray[_local1].name]._x = _local2[heliArray[_local1].name]._x + heliArray[_local1].speed; } if ((heliArray[_local1].hasFired == false) && (heliArray[_local1].isFiring == false)) { if (((_local2[heliArray[_local1].name]._x - _local2[heliArray[_local1].name]._width) > 0) && ((_local2[heliArray[_local1].name]._x + _local2[heliArray[_local1].name]._width) < Stage.width)) { _local2[heliArray[_local1].name].gotoAndPlay("shoot"); heliArray[_local1].isFiring = true; trace(heliArray[_local1].name + " has fired"); } } if (heliArray[_local1].hasFired == true) { if (((_local2[heliArray[_local1].name]._x + _local2[heliArray[_local1].name]._width) < (_local2.boundingbox._x - (_local2.boundingbox._width / 2))) || ((_local2[heliArray[_local1].name]._x - _local2[heliArray[_local1].name]._width) > (_local2.boundingbox._x + (_local2.boundingbox._width / 2)))) { trace("out of bounds"); heliArray[_local1].inFlight = false; var _local3 = Math.round(Math.random() * (heliArray[_local1].max - heliArray[_local1].min)) + heliArray[_local1].min; heliArray[_local1].counter = _local3; heliArray[_local1].hasFired = false; heliArray[_local1].isFiring = false; } } } _local1++; } } function HelicopterFire(name) { var _local3 = name; var _local2 = 0; var _local1 = 0; while (_local1 < heliArray.length) { if (heliArray[_local1].name == _local3) { _local2 = _local1; break; } _local1++; } var myName = ("bullet_helicopter_" + identifierNumber); identifierNumber++; var point = {x:_root[_local3].emitter1._x, y:_root[_local3].emitter1._y}; _root[_local3].localToGlobal(point); var bulletSpeed = 0; trace("helicopter speed is: " + heliArray[_local2].speed); if (heliArray[_local2].speed > 0) { bulletSpeed = heliArray[_local2].speed + 2; } else { bulletSpeed = heliArray[_local2].speed - 2; } LaunchBullet(myName, point.x, point.Y, bulletSpeed, 0); } function HelicopterDoneFiring(name) { var _local2 = name; var _local1 = 0; while (_local1 < heliArray.length) { if (heliArray[_local1].name == _local2) { heliArray[_local1].isFiring = false; heliArray[_local1].hasFired = true; return; } _local1++; } } function getDistance(i) { var _local1 = _root; distancex = _local1[objectArray[i].Name]._x - _local1.ship._x; distancey = _local1[objectArray[i].Name]._y - _local1.ship._y; return(Math.sqrt((distancex * distancex) + (distancey * distancey))); } function beamHorizontalAndVertical(asscheese, assY) { var _local1 = _root; var _local2 = asscheese; var _local3 = assY; i = 0; while (i < objectArray.length) { if ((objectArray[i].Beamed == 1) && (objectArray[i].Type != "agent")) { objectArray[i].Dx = _local2; if ((_local1.ship._x > 100) && (_local1.ship._X < 450)) { _local1[objectArray[i].Name]._x = _local1[objectArray[i].Name]._x + _local2; } if ((_local1.ship._y > 50) && (_local1.ship._y < 250)) { _local1[objectArray[i].Name]._y = _local1[objectArray[i].Name]._y + _local3; if (_local1[objectArray[i].Name]._y > objectArray[i].Ground) { _local1[objectArray[i].Name]._y = objectArray[i].Ground; } } } i++; } } function beamMeUp() { var _local1 = _root; var _local2 = new Array(); i = 0; while (i < objectArray.length) { if (objectArray[i].Type != "agent") { if (objectArray[i].Beamed == 1) { if (((objectArray[i].Type == "object") || (objectArray[i].Type == "tank")) && (objectArray[i].Linkage != "BonusIcon")) { maxheight = (_local1.ship._y + (_local1.ship._height / 2)) + (_local1[objectArray[i].Name]._height / 2); if (_local1[objectArray[i].Name]._y > maxheight) { _local1[objectArray[i].Name]._y = _local1[objectArray[i].Name]._y - 2; } } else if (_local1[objectArray[i].Name]._y > _local1.ship._y) { _local1[objectArray[i].Name]._y = _local1[objectArray[i].Name]._y - 2; } else if (objectArray[i].Beamed == 1) { _local1[objectArray[i].Name]._y = -20; objectArray[i].Beamed = 2; _local2.push({name:objectArray[i].Name, detach:true, debNum:4}); if (objectArray[i].Linkage != "BonusIcon") { if ((objectArray[i].Linkage != "person2") && (objectArray[i].Linkage != "person5")) { var scream = Math.round(Math.random() * 8); trace(scream); if (scream == 4) { playSound("maleEnjoy"); } else { playSound("maleScream"); } } else { playSound("maleScream"); } var scream = Math.round(Math.random() * 12); if (scream == 8) { var randSound = (Math.round(Math.random() * 3) + 1); _local1.playSound("rand" + randSound); } _global.currentPeople++; _global.totalPeople++; _local1.display._x = _local1.ship._x; _local1.display._y = _local1.ship._y; _local1.display.goToAndPlay("people"); } else { playSound("bonusSound"); _global.bonusPoints++; _local1.display._x = _local1.ship._x; _local1.display._y = _local1.ship._y; _local1.display.goToAndPlay("points"); } } if (_local1[objectArray[i].Name]._x < _local1.ship._x) { _local1[objectArray[i].Name]._x = _local1[objectArray[i].Name]._x + 1; if (_local1[objectArray[i].Name]._x >= _local1.ship._x) { _local1[objectArray[i].Name]._x = _local1.ship._x; } } if (_local1[objectArray[i].Name]._x > _local1.ship._x) { _local1[objectArray[i].Name]._x = _local1[objectArray[i].Name]._x - 1; if (_local1[objectArray[i].Name]._x <= _local1.ship._x) { _local1[objectArray[i].Name]._x = _local1.ship._x; } } } else { if (objectArray[i].Beamed == 2) { _local1[objectArray[i].Name].goToAndPlay("falling"); } if ((_local1[objectArray[i].Name]._y + (_local1[objectArray[i].Name]._height / 2)) == objectArray[i].Ground) { } else if (_local1[objectArray[i].Name]._y > 0) { _local1[objectArray[i].Name]._y = _local1[objectArray[i].Name]._y + objectArray[i].Dy; objectArray[i].Dy = objectArray[i].Dy + gravity; if (objectArray[i].Dy > yTerminalVelocity) { objectArray[i].Dy = yTerminalVelocity; } _local1[objectArray[i].Name]._x = _local1[objectArray[i].Name]._x + objectArray[i].Dx; if ((_local1[objectArray[i].Name]._y + (_local1[objectArray[i].Name]._height / 2)) >= objectArray[i].Ground) { useFriction = xGroundFriction; } else { useFriction = xFriction; } if ((objectArray[i].Dx >= -0.4) && (objectArray[i].Dx <= 0.4)) { objectArray[i].Dx = 0; } if (objectArray[i].Dx < 0) { objectArray[i].Dx = objectArray[i].Dx + useFriction; } if (objectArray[i].Dx > 0) { objectArray[i].Dx = objectArray[i].Dx - useFriction; } if ((_local1[objectArray[i].Name]._y + (_local1[objectArray[i].Name]._height / 2)) >= objectArray[i].Ground) { if (objectArray[i].Beamed == 2) { if ((objectArray[i].Ground - objectArray[i].FallHeight) < 20) { if (objectArray[i].Type == "tank") { _local1[objectArray[i].Name].gotoAndPlay("idle"); } else if (objectArray[i].Type == "person") { _local1[objectArray[i].Name].gotoAndPlay("run"); objectArray[i].Timer = 1; } if (objectArray[i].Type == "tank") { _local1[objectArray[i].Name].OpenFire(); } root[objectArray[i].Name]._y = objectArray[i].Ground; objectArray[i].Beamed = 0; } else { _local1[objectArray[i].Name].gotoAndPlay("collision"); _local1[objectArray[i].Name]._y = objectArray[i].Ground; if (objectArray[i].Linkage != nonDestructableType) { objectArray[i].Beamed = 3; } else { objectArray[i].Beamed = 0; } j = 0; while (j < objectArray.length) { if ((objectArray[j].Beamed == 0) && (_local1[objectArray[i].Name].hitTest(_local1[objectArray[j].Name]) == true)) { if (((objectArray[j].Type == "tank") && (objectArray[i].Type != "tank")) && ((objectArray[j].Type == "tank") && (objectArray[i].Type != "object"))) { } else { objectArray[j].Direction = 0; tempY = _local1[objectArray[j].Name]._y - (_local1[objectArray[i].Name].height / 100); howFar = objectArray[j].ZStack; objectArray[j].ZStack++; _local1[objectArray[i].Name].swapDepths((objectArray[j].Ground * 100) + howFar); _local1[objectArray[i].Name]._y = tempY; } if ((((objectArray[j].Type == "agent") || (objectArray[j].Type == "person")) || ((objectArray[j].Type == "tank") && (objectArray[i].Type == "tank"))) && (objectArray[j].Linkage != nonDestructableType)) { _local1[objectArray[j].Name].goToAndPlay("collision"); if (objectArray[j].Type == "tank") { _local1[objectArray[j].Name].HoldFire(); } deadArray.push(objectArray[j].Name); _local2.push({name:objectArray[j].Name, detach:false, debNum:5}); } } j++; } if (objectArray[i].Linkage != nonDestructableType) { deadArray.push(objectArray[i].Name); _local2.push({name:objectArray[i].Name, detach:false, debNum:6}); } } } objectArray[i].Dy = 0; } else if (objectArray[i].Beamed == 2) { hitFlag = false; if ((objectArray[i].Ground - objectArray[i].FallHeight) >= 20) { j = 0; while (j < objectArray.length) { if ((objectArray[j].Beamed == 0) && (_local1[objectArray[i].Name].hitTest(_local1[objectArray[j].Name]) == true)) { if (((objectArray[j].Type == "tank") && (objectArray[i].Type != "tank")) && ((objectArray[j].Type == "tank") && (objectArray[i].Type != "object"))) { } else { hitFlag = true; _local1[objectArray[i].Name].goToAndPlay("collision"); objectArray[j].Direction = 0; tempY = _local1[objectArray[j].Name]._y - _local1[objectArray[i].Name].height; howFar = objectArray[j].ZStack; objectArray[j].ZStack++; _local1[objectArray[i].Name].swapDepths((objectArray[j].Ground * 100) + howFar); _local1[objectArray[i].Name]._y = tempY; objectArray[i].Dy = 0; } if ((((((objectArray[j].Type == "agent") || (objectArray[j].Type == "person")) || (objectArray[j].Linkage == "bear")) || ((objectArray[j].Type == "tank") && (objectArray[i].Type == "tank"))) || ((objectArray[j].Type == "tank") && (objectArray[i].Type == "object"))) && (objectArray[j].Linkage != nonDestructableType)) { _local1[objectArray[j].Name].goToAndPlay("collision"); if (objectArray[j].Type == "tank") { _local1[objectArray[j].Name].HoldFire(); } deadArray.push(objectArray[j].Name); _local2.push({name:objectArray[j].Name, detach:false, debNum:5}); } break; } j++; } if (hitFlag == true) { if (objectArray[i].Linkage != nonDestructableType) { objectArray[i].Beamed = 3; } else { objectArray[i].Beamed = 0; } if (objectArray[i].Linkage != nonDestructableType) { deadArray.push(objectArray[i].Name); _local2.push({name:objectArray[i].Name, detach:false, debNum:6}); } } } } } } } else if (objectArray[i].Beamed == 1) { if (_local1.beam.hitTest(_local1[objectArray[i].Name]) == eval("False")) { objectArray[i].Beamed = 0; objectArray[i].Timer = 1; } } i++; } var _local3 = 0; while (_local3 < _local2.length) { removeObject(_local2[_local3].name, _local2[_local3].detach, _local2[_local3].debNum); _local3++; } } function moveTargets() { var _local1 = _root; if (targetArray_Name.length != 0) { i = 0; while (i < targetArray_Name.length) { if (targetArray_Frames[i] == 0) { myX = _local1[targetArray_Target[i]]._x; myY = _local1[targetArray_Target[i]]._y; } else { myX = _local1[targetArray_Name[i]]._x + ((_local1[targetArray_Target[i]]._x - _local1[targetArray_Name[i]]._x) / targetArray_Frames[i]); myY = _local1[targetArray_Name[i]]._y + ((_local1[targetArray_Target[i]]._y - _local1[targetArray_Name[i]]._y) / targetArray_Frames[i]); targetArray_Frames[i]--; } _local1[targetArray_Name[i]]._x = myX; _local1[targetArray_Name[i]]._y = myY; i++; } } } function createTarget(myTarget) { var _local1 = _root; name = "unique" + identifierNumber; identifierNumber++; _local1.attachMovie("manTarget", name, z3); z3++; targetArray_Name.push(name); targetArray_Target.push(objectArray[myTarget].Name); targetArray_Frames.push(15); _local1[name]._x = 275; _local1[name]._y = -60; } function removeTarget(myTarget) { var _local1 = myTarget; var _local2 = _root; i = 0; while (i < targetArray_Name.length) { if (targetArray_Target[i] == objectArray[_local1].Name) { _local2[targetArray_Name[i]].removeMovieClip(); targetArray_Name.splice(i, 1); targetArray_Target.splice(i, 1); targetArray_Frames.splice(i, 1); } i++; } } function moveScene(d) { var _local1 = d; var _local2 = _root; if (((panAmount + _local1) > panLimitLeft) and ((panAmount + _local1) < panLimitRight)) { panAmount = panAmount + _local1; trees._x = trees._x + (_local1 * 1); bushes._x = bushes._x + (_local1 * 0.8); hills._x = hills._x + (_local1 * 0.4); boundingbox._x = boundingbox._x + (_local1 * 1); i = 0; while (i < objectArray.length) { if ((((objectArray[i].Beamed == 0) || (objectArray[i].Beamed == 3)) || (objectArray[i].Beamed == 2)) || (objectArray[i].Type == "agent")) { _local2[objectArray[i].Name]._x = _local2[objectArray[i].Name]._x + _local1; } i++; } var i = 0; while (i < heliArray.length) { if (heliArray[i].inFlight == true) { _local2[heliArray[i].name]._x = _local2[heliArray[i].name]._x + _local1; } i++; } i = 0; while (i < deadArray.length) { _local2[deadArray[i]]._x = _local2[deadArray[i]]._x + _local1; i++; } i = 0; while (i < bulletArray.length) { _local2[bulletArray[i]]._x = _local2[bulletArray[i]]._x + _local1; i++; } return(0); } return(1); } function runLevel() { var _local1 = _root; var _local2 = _global; if (buttonCoolDown == 0) { if (Key.isDown(80) || (Key.isDown(27))) { buttonCoolDown = 10; if (_local2.gamePaused == false) { _local1.paused.gotoAndPlay("show"); _local2.gamePaused = true; intPauseTime = getTimer(); } else { _local1.paused.gotoAndPlay("hide"); _local2.gamePaused = false; if (_local2.nextTime != -1) { _local2.nextTime = _local2.nextTime + (getTimer() - intPauseTime); } intPauseTime = 0; } } } else { buttonCoolDown--; } if (_local2.gamePaused == false) { if (deathCounter == -1) { if (Key.isDown(39) && (!Key.isDown(37))) { dx = dx + sensitivity; if (dx > terminalVelocity) { dx = terminalVelocity; } } if (Key.isDown(37) && (!Key.isDown(39))) { dx = dx - sensitivity; if (dx < (terminalVelocity * -1)) { dx = terminalVelocity * -1; } } if (Key.isDown(40) && (!Key.isDown(38))) { dy = dy + sensitivity; if (dy > terminalVelocity) { dy = terminalVelocity; } } if (Key.isDown(38) && (!Key.isDown(40))) { dy = dy - sensitivity; if (dy < (terminalVelocity * -1)) { dy = terminalVelocity * -1; } } } } if (Key.isDown(68)) { _local2.debug = true; _local1.debugStatus(); } else { _local2.debug = false; } if (Key.isDown(16) && (Key.isDown(49))) { _local1.prepareForFrameChange(true, 5); _local2.gamePaused = false; _local2.cheated = true; } if (Key.isDown(16) && (Key.isDown(50))) { _local1.prepareForFrameChange(true, 10); _local2.gamePaused = false; _local2.cheated = true; } if (Key.isDown(16) && (Key.isDown(51))) { _local1.prepareForFrameChange(true, 15); _local2.gamePaused = false; _local2.cheated = true; } if (Key.isDown(16) && (Key.isDown(52))) { _local1.prepareForFrameChange(true, 20); _local2.gamePaused = false; _local2.cheated = true; } if (Key.isDown(16) && (Key.isDown(53))) { _local1.prepareForFrameChange(true, 25); _local2.gamePaused = false; _local2.cheated = true; } if (Key.isDown(16) && (Key.isDown(54))) { _local1.prepareForFrameChange(true, 30); _local2.gamePaused = false; _local2.cheated = true; } if (Key.isDown(16) && (Key.isDown(55))) { _local1.prepareForFrameChange(true, 35); _local2.gamePaused = false; _local2.cheated = true; } if (Key.isDown(16) && (Key.isDown(56))) { _local1.prepareForFrameChange(true, 40); _local2.gamePaused = false; _local2.cheated = true; } if (Key.isDown(16) && (Key.isDown(57))) { _local1.prepareForFrameChange(true, 45); _local2.gamePaused = false; _local2.cheated = true; } if (Key.isDown(16) && (Key.isDown(48))) { _local1.prepareForFrameChange(true, 50); _local2.gamePaused = false; _local2.cheated = true; } if (_local2.gamePaused == false) { if ((!Key.isDown(37)) && (!Key.isDown(39))) { if (dx > 0) { dx = dx - airFriction; } if (dx < 0) { dx = dx + airFriction; } if ((dx >= -0.3) && (dx <= 0.3)) { dx = 0; } } if ((!Key.isDown(38)) && (!Key.isDown(40))) { if (dy > 0) { dy = dy - airFriction; } if (dy < 0) { dy = dy + airFriction; } if ((dy >= -0.3) && (dy <= 0.3)) { dy = 0; } } if (Key.isDown(32) && (energyFlag == 0)) { _local1.beam.gotoandstop(2); shipEnergy = shipEnergy - beamCost; if (shipEnergy < 0) { shipEnergy = 0; energyFlag = 1; } beamFlag = true; _local1.startBeamTags(); } else { beamFlag = false; _local1.beam.gotoandstop(1); shipEnergy = shipEnergy + rechargeRate; if (shipEnergy > totalEnergy) { shipEnergy = totalEnergy; energyFlag = 0; } _local1.removeBeamTags(); } _local1.beamMeUp(); _local1.updateEnergyBar(shipEnergy, totalEnergy, energyFlag); _local1.ship._x = _local1.ship._x + dx; _local1.ship._y = _local1.ship._y + dy; if (beamFlag == true) { _local1.beamHorizontalAndVertical(dx, dy); } if (_local2.shipUsed == 1) { _local1.ship.inside._rotation = dx * 2.5; } if (_local1.ship._x > 450) { _local1.ship._x = 450; } if (_local1.ship._x < 100) { _local1.ship._x = 100; } if (_local1.ship._y < 50) { _local1.ship._y = 50; dy = 0; } if (_local1.ship._y > 250) { _local1.ship._y = 250; dy = 0; } _local1.shadow._x = _local1.ship._x; _local1.beam._x = _local1.ship._x; _local1.beam._y = (_local1.ship._y + (_local1.ship._y / 8)) + 35; _local1.beam._xscale = 50 + ((_local1.ship._y / 2.5) / 2); _local1.beam._yscale = 50 + ((_local1.ship._y / 2.5) / 2); _local1.shadow._alpha = _local1.ship._y / 4; _local1.shadow._xscale = 300 - _local1.ship._y; _local1.shadow._yscale = 300 - _local1.ship._y; varFlag = 0; if ((_local1.ship._x <= 100) && (dx < 0)) { varFlag = _local1.moveScene(-1 * dx); } else if ((_local1.ship._x >= 450) && (dx > 0)) { varFlag = _local1.moveScene(-1 * dx); } if (varFlag == 1) { dx = 0; } _local1.runTimer(); _local1.TankGenerator(); _local1.ManageHelicopters(); _local1.spotship(); _local1.makePeopleMove(); _local1.DetectBulletHits(); _local1.updatePeopleBar(_local2.currentPeople, _local2.totalPeopleToGet); _local1.moveTargets(); if (deathCounter >= 0) { if (deathCounter == 0) { _local2.livesLeft--; _local1.updateLives(_local2.livesLeft); _local1.prepareForFrameChange(false, 0); if (_local2.livesLeft != 0) { var randSound = (Math.round(Math.random() * 5) + 1); } } else { deathCounter--; } } if (_local2.nextTime != -1) { _local1.updateTimer(); } } } stop(); myNextLevel = 10; _global.debug = false; nonDestructableType = "rock"; panLimitLeft = -300; panLimitRight = 300; panAmount = 0; oldValue = 0; numPeople = 0; maxPeople = 0; percentFrequency = 0; zArray = new Array(); zStack = new Array(); z3 = 10000; objectArray = new Array(); bulletArray = new Array(); deadArray = new Array(); targetArray_Name = new Array(); targetArray_Target = new Array(); targetArray_Frames = new Array(); availPeople = new Array(); myVolume = 100; mySong = "Nothing"; myZ1 = 0; myZ2 = 0; terminalVelocity = 8; sensitivity = 0.4; totalEnergy = 200; shipEnergy = 200; rechargeRate = 2; beamCost = 2; timeToBeat = 180; airFriction = 0.15; xFriction = 0.15; xGroundFriction = 0.4; gravity = 0.4; yTerminalVelocity = 15; energyFlag = 0; pickUpFlag = 0; dropSpeed = 0; groundLevel = _root.truck._y; truckFlag = 0; dx = 0; dy = 0; tankArray = new Array(); tankSpawnTimeMin = 0; tankSpawnTimeMax = 0; tankCounter = -1; blnUseTanks = false; tanksToUse = "green"; heliArray = new Array(); bulletDepth = 30000; _global.totalPeopleToGet = 5; identifierNumber = 5; var mySoundPlayer = new SoundPlayer(); buttonCoolDown = 0; intPauseTime = 0; deathCounter = -1; almostFlag = false;
Instance of Symbol 304 MovieClip in Frame 15
onClipEvent (load) { _root.initializeLevel(15, 20, -260, 260, "", 300, 15); _root.updateLives(_global.livesLeft); _root.setPeopleTimer(20, 5); _root.addPersonType("person1", "person", 25); _root.addPersonType("person2", "person", 25); _root.addPersonType("Brian", "person", 25); _root.addPersonType("person6", "person", 25); _root.addPersonType("ethan", "person", 25); _root.addUnit("bonus2", 0, "BonusIcon", "object"); _root.addHelicopter("heli 1", 40, 100, 6); _root.addHelicopter("heli 2", 60, 120, 6); _root.addHelicopter("heli 3", 60, 120, 6); levelTrack = "city level"; _root.startMusicDownload(levelTrack); } onClipEvent (enterFrame) { _root.runLevel(); }
Instance of Symbol 657 MovieClip "volumeClip" in Frame 15
onClipEvent (load) { if (_global.volume == true) { volumeClip.goToAndPlay("volumeOn"); } else { volumeClip.goToAndPlay("volumeOff"); } } on (release) { if (_global.volume == true) { _global.volume = false; _root.volumeClip.nextFrame(); _root.toggleMusic(); } else { _global.volume = true; _root.volumeClip.prevFrame(); _root.toggleMusic(); } }
Frame 17
function initializeLevel(currentLevel, nextLevel, leftMax, rightMax, nonDestructable, timeToWin, peopleToGet) { var _local1 = _global; var _local2 = _root; identifierNumber = currentLevel; myNextLevel = nextLevel; panLimitLeft = leftMax; panLimitRight = rightMax; nonDestructableType = nonDestructable; timeToBeat = timeToWin; _local1.totalPeopleToGet = peopleToGet; if (_local1.tempLives < 0) { _local1.livesLeft = 3; } else { _local1.livesLeft = _local1.tempLives; } energyFlag = 0; pickUpFlag = 0; dropSpeed = 0; groundLevel = _local2.truck._y; truckFlag = 0; dx = 0; dy = 0; if (_local1.tempPeople < 0) { _local1.currentPeople = 0; } else { _local1.currentPeople = _local1.tempPeople; } _local1.tempPeople = 0; _local1.tempLives = 0; _local1.tempFrame = identifierNumber; if (timeToBeat == -1) { _local1.nextTime = -1; _local2.updateTimer(); } else { if ((_local1.nextTime == -1) && (timeToBeat != -1)) { _local1.nextTime = 0; } if (_local1.nextTime != -1) { if (_local1.stolenTime == 0) { _local1.nextTime = getTimer() + (timeToBeat * 1000); } else { _local1.nextTime = _local1.nextTime + (getTimer() - _local1.stolenTime); _local1.stolenTime = 0; } } } _local1.stolenTime = 0; if (_local1.shipUsed == 1) { _local2.ship.gotoAndStop("ship1"); } else { _local2.ship.gotoAndStop("ship2"); } } function addPersonType(myLinkage, myType, myWeight) { availPeople.push({linkage:myLinkage, type:myType, weight:myWeight}); } function playSound(soundName) { if (_global.volume == true) { mySoundPlayer.PlaySound(soundName); } } function startMusicDownload(music) { var _local1 = _global; if (_local1.musicOn == true) { _local1.mySound.stop(); _local1.mySound.attachSound(music); _local1.mySound.start(0, 99); _local1.mySound.setVolume(myVolume); } else { _root.volumeClip.gotoAndStop(2); _local1.mySound.stop(); } mySong = music; } function toggleMusic() { var _local1 = _global; if (_local1.volume == true) { _local1.mySound.attachSound(mySong); _local1.mySound.start(0, 99); _local1.mySound.setVolume(myVolume); _local1.musicOn = true; } else { _local1.mySound.stop(); _local1.mySound.setVolume(myVolume); _local1.musicOn = false; } } function updateTimer() { var _local1 = _global; if (_local1.nextTime == -1) { timeText = "NO LIMIT"; } else { myTime = _local1.nextTime - getTimer(); mySecs = math.floor(myTime / 1000); if (mySecs == 0) { _local1.livesLeft = 0; prepareForFrameChange(false, 0); } if (mySecs > 60) { someSeconds = myTime / 1000; someMinutes = someSeconds / 60; if (someSeconds > 59) { someSeconds = someSeconds - (Math.floor(someMinutes) * 60); } if (someSeconds < 10) { textMinutes = someMinutes; timeText = (Math.floor(textMinutes) + ":0") + Math.floor(someSeconds); } else if (someSeconds == 0) { textMinutes = someMinutes; timeText = Math.floor(textMinutes) + ":00"; } else { textMinutes = someMinutes; timeText = (Math.floor(textMinutes) + ":") + Math.floor(someSeconds); } } else { timeText = Math.floor(mySecs); } } } function updateLives(lifeNum) { var _local1 = lifeNum; if (_local1 < 0) { _local1 = 0; } lives = _local1; } function prepareForFrameChange(newLevel, levelNum) { var _local1 = _global; var _local2 = _root; _local1.tempLives = _local1.livesLeft; _local1.tempPeople = _local1.currentPeople; cleanScreen(); if ((_local1.livesLeft > 0) && (newLevel == false)) { _local1.stolenTime = getTimer(); _local2.goToAndPlay("loseLife"); } else if ((_local1.livesLeft > 0) && (newLevel == true)) { _local1.tempPeople = -1; _local1.tempFrame = levelNum; _local2.goToAndPlay("levelText"); } else if (_local1.livesLeft == 0) { _local2.goToAndPlay("endGame"); } } function cleanScreen() { var _local1 = _root; i = 0; while (i < objectArray.length) { _local1[objectArray[i].Name].removeMovieClip(); i++; } i = 0; while (i < deadArray.length) { _local1[deadArray[i]].removeMovieClip(); i++; } i = 0; while (i < targetArray_Name.length) { _local1[targetArray_Name[i]].removeMovieClip(); i++; } i = 0; while (i < bulletArray.length) { _local1[bulletArray[i]].removeMovieClip(); i++; } } function setPeopleTimer(mPeople, pFrequency) { var _local1 = _root; myZ2 = Math.round(_local1.z2._y); myZ1 = Math.round(_local1.z1._y); _local1.z1._y = -50; _local1.z2._y = -50; i = myZ1; while (i < myZ2) { zArray.push(i); zStack.push(1); i++; } percentFrequency = pFrequency; maxPeople = mPeople; } function runTimer() { if (numPeople != maxPeople) { if (random(255) < percentFrequency) { numPeople++; addPersonDynamic(false); } } } function rangeInUse(minZ, maxZ) { var _local2 = maxZ; var _local3 = minZ; var _local1 = false; i = 0; while (i < objectArray.length) { if ((objectArray[i].ZStack >= _local3) && (objectArray[i].ZStack <= _local2)) { _local1 = true; } i++; } return(_local1); } function startBeamTags() { var _local1 = _root; i = 0; while (i < objectArray.length) { if (_local1.beam.hitTest(_local1[objectArray[i].Name]) == true) { if (objectArray[i].Beamed == 0) { _local1[objectArray[i].Name].goToAndPlay("beamed"); objectArray[i].Beamed = 1; objectArray[i].Dy = 0; if (objectArray[i].Type == "tank") { _local1[objectArray[i].Name].HoldFire(); } } if (objectArray[i].Beamed == 2) { _local1[objectArray[i].Name].goToAndStop("endbeam"); objectArray[i].Beamed = 1; objectArray[i].Dy = 0; } } i++; } } function debugStatus() { trace("Name type beamed timer"); trace("----------------------------------------"); i = 0; while (i < objectArray.length) { trace((((((((((objectArray[i].Name + " ") + objectArray[i].Type) + " ") + objectArray[i].Beamed) + " ") + objectArray[i].Timer) + " ") + objectArray[i].Spotted) + " ") + objectArray[i].Direction); i++; } trace("----------------------------------------"); } function removeBeamTags() { var _local1 = _root; i = 0; while (i < objectArray.length) { if ((objectArray[i].Beamed == 1) && (objectArray[i].Type != "agent")) { objectArray[i].Beamed = 2; objectArray[i].FallHeight = _local1[objectArray[i].Name]._y; } else if ((objectArray[i].Beamed == 1) && (objectArray[i].Type == "agent")) { objectArray[i].Beamed = 0; objectArray[i].Timer = 1; } i++; } } function addUnit(name, newSpeed, myLinkage, givenType) { var _local1 = _root; var _local2 = name; var _local3 = newSpeed; tempX = _local1[_local2]._x; tempY = _local1[_local2]._y; wantY = Math.round(tempY); flag = -1; myZStack = -1; i = 0; while (i < zArray.length) { if (zArray[i] == wantY) { flag = i; myZstack = zStack[i]; } i++; } if (flag != -1) { zArray.splice(flag, 1); zStack.splice(flag, 1); } _local1[_local2]._visible = false; _local2 = givenType + identifierNumber; identifierNumber++; _local1.attachMovie(myLinkage, _local2, wantY * 100); if (givenType == "tank") { _local1[_local2].SetFireRate(40); tankArray.push({track:wantY, occupied:true, tank:_local2}); } _local1[_local2]._x = tempX; _local1[_local2]._y = tempY; x = 275; if ((_local1[_local2]._x <= x) && (_local3 != 0)) { dir = _local3; _local1[_local2]._xscale = -Math.abs(_local1[_local2]._xscale); if (myLinkage == "antiAir") { _local1[_local2]._xscale = _local1[_local2]._xscale * -1; } } else { dir = -1 * _local3; } var groundLevel = Math.round(_local1[_local2]._y + (_local1[_local2]._height / 2)); objectArray.push({Name:_local2, Beamed:0, Type:givenType, Ground:groundLevel, Dx:0, Dy:0, Timer:0, Spotted:0, Linkage:myLinkage, ZStack:myZStack, Direction:dir, FallHeight:0}); return(_local2); } function generateEthan() { addPersonDynamic(true); } function addPersonDynamic(isEthan) { if (zArray.length == 0) { return(null); } if (isEthan == false) { r = random(2); switch (r) { case 0 : var _local3 = 0; var _local2 = -1; var _local1 = 0; while (_local1 < availPeople.length) { _local3 = _local3 + availPeople[_local1].weight; _local1++; } var chosenWeight = Math.round(Math.random() * _local3); _local1 = 0; while (_local1 < availPeople.length) { if ((chosenWeight > _local2) && (chosenWeight <= (_local2 + availPeople[_local1].weight))) { myGuy = availPeople[_local1].linkage; myType = availPeople[_local1].type; break; } _local2 = _local2 + availPeople[_local1].weight; _local1++; } break; case 1 : myGuy = "MIB"; myType = "agent"; } } else { myGuy = "ethan"; myType = "person"; } r = random(zArray.length); z = zArray[r]; zs = zStack[r]; zArray.splice(r, 1); zStack.splice(r, 1); name = "unique" + identifierNumber; identifierNumber++; _root.attachMovie(myGuy, name, z * 100); r = random(2); if (r == 0) { x = _root.boundingbox._x + (_root.boundingbox._width / 2); } else { x = _root.boundingbox._x - (_root.boundingbox._width / 2); } _root[name]._x = x; _root[name]._y = z; x = _root.hills._x; if (_root[name]._x <= x) { dir = 1; if (myType == "agent") { _root[name]._xscale = -Math.abs(_root[name]._xscale); } } else { dir = -1; if (myType != "agent") { _root[name]._xscale = -Math.abs(_root[name]._xscale); } } _root[name].goToAndPlay("walk"); objectArray.push({Name:name, Beamed:0, Type:myType, Ground:z, Dx:0, Dy:0, Timer:0, Spotted:0, Linkage:myGuy, ZStack:zs, Direction:dir, FallHeight:0}); return(undefined); } function addTank(name, newSpeed, myLinkage, myTrack) { var _local1 = _root; var _local3 = myTrack; var _local2 = "tank"; if (tanksToUse == "red") { _local2 = "redTank"; } if (tanksToUse == "white") { _local2 = "whiteTank"; } _local1.attachMovie(_local2, name, _local3 * 100); r = random(2); if (r == 0) { x = _local1.boundingbox._x + (_local1.boundingbox._width / 2); } else { x = _local1.boundingbox._x - (_local1.boundingbox._width / 2); } _local1[name]._x = x; if (tanksToUse == "red") { _local1[name].SetFireRate(15); } else if (tanksToUse == "white") { _local1[name].SetFireRate(25); } else { _local1[name].SetFireRate(40); } _local1[name]._y = _local3; x = _local1.hills._x; if (_local1[name]._x <= x) { dir = 1; _local1[name]._xscale = _local1[name]._xscale * -1; } else { dir = -1; } _local1[name].goToAndPlay("idle"); objectArray.push({Name:name, Beamed:0, Type:"tank", Ground:_local3, Dx:0, Dy:0, Timer:0, Spotted:0, Linkage:"tank", ZStack:999999, Direction:dir, FallHeight:0}); } function makePeopleMove() { var _local1 = _root; var _local3 = _global; var queueRemoval = new Array(); i = 0; while (i < objectArray.length) { if (objectArray[i].Beamed == 0) { if (objectArray[i].Timer == 1) { if (_local3.debug == true) { trace(i); } if (_local1[objectArray[i].Name]._x < _local1.ship._x) { objectArray[i].Direction = -3; if (objectArray[i].Type == "person") { _local1[objectArray[i].Name]._xscale = -Math.abs(_local1[objectArray[i].Name]._xscale); } else if (objectArray[i].Type == "agent") { _local1[objectArray[i].Name]._xscale = Math.abs(_local1[objectArray[i].Name]._xscale); if (objectArray[i].Spotted == 0) { createTarget(i); objectArray[i].Spotted = 1; } } } else { objectArray[i].Direction = 3; if (objectArray[i].Type == "person") { _local1[objectArray[i].Name]._xscale = Math.abs(_local1[objectArray[i].Name]._xscale); } else if (objectArray[i].Type == "agent") { _local1[objectArray[i].Name]._xscale = -Math.abs(_local1[objectArray[i].Name]._xscale); if (objectArray[i].Spotted == 0) { createTarget(i); objectArray[i].Spotted = 1; } } } _local1[objectArray[i].Name].gotoandplay("run"); } if (objectArray[i].Timer > 0) { objectArray[i].Timer--; } _local1[objectArray[i].Name]._x = _local1[objectArray[i].Name]._x + objectArray[i].Direction; if ((_local1[objectArray[i].Name]._x < (_local1.boundingbox._x - (_local1.boundingbox._width / 2))) && (objectArray[i].Direction < 0)) { if (objectArray[i].Spotted == 1) { _local3.livesLeft--; _local1.updateLives(_local3.livesLeft); _local1.prepareForFrameChange(false, 0); if (_local3.livesLeft != 0) { var randSound = (Math.round(Math.random() * 5) + 1); } } if (objectArray[i].Type == "tank") { OpenTrack(objectArray[i].Name); } queueRemoval.push({name:objectArray[i].Name, detach:true, debNum:1}); } else if ((_local1[objectArray[i].Name]._x > (_local1.boundingbox._x + (_local1.boundingbox._width / 2))) && (objectArray[i].Direction > 0)) { if (objectArray[i].Spotted == 1) { _local3.livesLeft--; _local1.updateLives(_local3.livesLeft); _local1.prepareForFrameChange(false, 0); if (_local3.livesLeft != 0) { var randSound = (Math.round(Math.random() * 5) + 1); } } if (objectArray[i].Type == "tank") { OpenTrack(objectArray[i].Name); } queueRemoval.push({name:objectArray[i].Name, detach:true, debNum:2}); } } i++; } var _local2 = 0; while (_local2 < queueRemoval.length) { removeObject(queueRemoval[_local2].name, queueRemoval[_local2].detach, queueRemoval[_local2].debNum); _local2++; } tanksAim(); } function removeObject(objectName, removeFromScreen, debugNum) { var _local2 = removeFromScreen; var _local3 = _root; i = -1; var _local1 = 0; while (_local1 < objectArray.length) { if (objectArray[_local1].Name == objectName) { i = _local1; if (objectArray[_local1].Type != "tank") { zArray.push(objectArray[_local1].Ground); zStack.push(objectArray[_local1].ZStack); } if ((objectArray[_local1].Type != "object") && (objectArray[_local1].Type != "tank")) { numPeople--; } if (objectArray[_local1].Spotted == 1) { removeTarget(i); } if (_local2) { _local3[objectArray[_local1].Name].removeMovieClip(); } objectArray.splice(_local1, 1); return; } _local1++; } } function updateEnergyBar(current, total, flag) { var _local1 = _root; frac = current / total; _local1.energy._xscale = frac * 100; if (flag == 1) { _local1.energy.goToAndStop(2); } else { _local1.energy.goToAndStop(1); } } function updatePeopleBar(current, total) { var _local1 = current; var _local2 = total; var _local3 = _root; frac = _local1 / _local2; _local3.peopleToGo._xscale = frac * 100; myFrame = 10; frac = (_local1 / _local2) * 100; if (frac < 10) { myFrame = 1; } else if ((frac >= 10) && (frac < 20)) { myFrame = 2; } else if ((frac >= 20) && (frac < 30)) { myFrame = 3; } else if ((frac >= 30) && (frac < 40)) { myFrame = 4; } else if ((frac >= 40) && (frac < 50)) { myFrame = 5; } else if ((frac >= 50) && (frac < 60)) { myFrame = 6; } else if ((frac >= 60) && (frac < 70)) { myFrame = 7; } else if ((frac >= 70) && (frac < 80)) { myFrame = 8; } else if ((frac >= 80) && (frac < 90)) { myFrame = 9; } else if ((frac >= 90) && (frac <= 100)) { myFrame = 10; } if (oldValue != myFrame) { _local3.peopleToGo.goToAndStop(myFrame); } oldValue = myFrame; if ((_local1 == (_local2 - 2)) && (almostFlag == false)) { var randSound = (Math.round(Math.random() * 4) + 1); _local3.playSound("good" + randSound); almostFlag = true; } if (_local1 == _local2) { prepareForFrameChange(true, myNextLevel); } } function spotship() { var _local1 = _root; i = 0; while (i < objectArray.length) { if (((objectArray[i].Beamed == 0) && ((objectArray[i].Type == "person") || (objectArray[i].Type == "agent"))) && ((objectArray[i].Direction == 1) || (objectArray[i].Direction == -1))) { myDist = getDistance(i); if (myDist <= 175) { if (((objectArray[i].Direction == 1) && (_local1[objectArray[i].Name]._x < _local1.ship._x)) && (_local1[objectArray[i].Name]._x >= 50)) { _local1[objectArray[i].Name].gotoandplay("spot"); objectArray[i].Direction = 0; objectArray[i].Timer = 30; } else if (((objectArray[i].Direction == -1) && (_local1[objectArray[i].Name]._x > _local1.ship._x)) && (_local1[objectArray[i].Name]._x <= 500)) { _local1[objectArray[i].Name].gotoandplay("spot"); objectArray[i].Direction = 0; objectArray[i].Timer = 30; } } } i++; } } function tanksAim() { var _local3 = _root; var _local2 = 0; while (_local2 < objectArray.length) { if ((objectArray[_local2].Beamed == 0) && (objectArray[_local2].Type == "tank")) { var tankName = objectArray[_local2].Name; var point = {x:_local3[tankName].cannon._x, y:_local3[tankName].cannon._y}; _local3[tankName].localToGlobal(point); var op = (_local3.ship._y - point.y); var adj = (_local3.ship._x - point.x); if (adj == 0) { adj = 1; } var _local1 = (Math.atan(op / adj) * 180) / Math.PI; if (_local1 < 0) { _local1 = _local1 * -1; } if (_local1 > 90) { _local1 = 90; } if (_local1 < 20) { _local1 = 20; } _local3[tankName].cannon._rotation = _local1; } _local2++; } } function StartTankGenerator(min, max, color) { tanksToUse = color; blnUseTanks = true; tankSpawnTimeMin = min; tankSpawnTimeMax = max; tankCounter = Math.round(Math.random() * (tankSpawnTimeMax - tankSpawnTimeMin)) + tankSpawnTimeMin; } function TankGenerator() { if (blnUseTanks == true) { intAvailFlag = -1; var _local1 = 0; while (_local1 < tankArray.length) { if (tankArray[_local1].occupied == false) { intAvailFlag = _local1; break; } _local1++; } if (intAvailFlag != -1) { if (tankCounter == 0) { var _local2 = "tank" + identifierNumber; identifierNumber++; tankArray[intAvailFlag].occupied = true; tankArray[intAvailFlag].tank = _local2; addTank(_local2, 3, "tank", tankArray[intAvailFlag].track); tankCounter = Math.round(Math.random() * (tankSpawnTimeMax - tankSpawnTimeMin)) + tankSpawnTimeMin; } else { tankCounter--; } } } } function OpenTrack(tankName) { var _local2 = tankName; var _local1 = 0; while (_local1 < tankArray.length) { if (tankArray[_local1].tank == _local2) { tankArray[_local1].tank = ""; tankArray[_local1].occupied = false; trace(("track " + _local1) + " is open"); } _local1++; } } function LaunchBullet(bulletName, startX, startY, directionX, directionY) { var _local1 = bulletName; var _local3 = _root; var _local2 = ""; if ((substring(_local1, 0, 18)) == "bullet_helicopter_") { _local2 = "bullet air"; } else { _local2 = "bullet ground"; } _local3.attachMovie(_local2, _local1, bulletDepth); _local3[_local1]._x = startX; _local3[_local1]._y = startY; _local3[_local1].SetMovement(directionX, directionY); bulletArray.push(_local1); bulletDepth++; } function DetectBulletHits() { var _local1 = _root; var _local3 = new Array(); var _local2 = 0; while (_local2 < bulletArray.length) { distancex = _local1[bulletArray[_local2]]._x - _local1.ship._x; distancey = _local1[bulletArray[_local2]]._y - _local1.ship._y; if (Math.sqrt((distancex * distancex) + (distancey * distancey)) <= 19) { if ((substring(bulletArray[_local2], 0, 18)) == "bullet_helicopter_") { shipEnergy = 0; energyFlag = 1; _local1.ship.explosion.gotoAndPlay("shock"); _local3.push(bulletArray[_local2]); } else { _local1.ship.explosion.gotoAndPlay("explode"); _local1.playSound("explosion"); if (deathCounter == -1) { deathCounter = 16; } _local3.push(bulletArray[_local2]); } } _local2++; } _local2 = 0; while (_local2 < _local3.length) { RemoveBullet(_local3[_local2]); _local2++; } } function ObjectCleanup(itemName) { var _local1 = itemName; if (_local1.substr(0, 4) == "tank") { OpenTrack(_local1); } _root[_local1].removeMovieClip(); } function RemoveBullet(itemName) { var _local3 = itemName; var _local2 = -1; var _local1 = 0; while (_local1 < bulletArray.length) { if (bulletArray[_local1] == _local3) { _local2 = _local1; break; } _local1++; } if (_local2 != -1) { bulletArray.splice(_local2, 1); _root[_local3].removeMovieClip(); } } function addHelicopter(itemName, minSpawn, maxSpawn, mySpeed) { var _local1 = minSpawn; var _local2 = Math.round(Math.random() * (maxSpawn - _local1)) + _local1; heliArray.push({name:itemName, min:_local1, max:maxSpawn, counter:_local2, speed:mySpeed, inFlight:false, hasFired:false, isFiring:false}); } function ManageHelicopters() { var _local2 = _root; var _local1 = 0; while (_local1 < heliArray.length) { if (heliArray[_local1].inFlight == false) { if (heliArray[_local1].counter == 0) { heliArray[_local1].inFlight = true; _local2[heliArray[_local1].name]._x; r = random(2); if (r == 0) { x = _local2.boundingbox._x + (_local2.boundingbox._width / 2); _local2[heliArray[_local1].name]._xscale = 100; heliArray[_local1].speed = -Math.abs(heliArray[_local1].speed); } else { x = (_local2.boundingbox._x - (_local2.boundingbox._width / 2)) - _local2[heliArray[_local1].name]._width; _local2[heliArray[_local1].name]._xscale = -100; heliArray[_local1].speed = Math.abs(heliArray[_local1].speed); } _local2[heliArray[_local1].name]._x = x; var y = (Math.round(Math.random() * 151) + 53); _local2[heliArray[_local1].name]._y = y; } else { heliArray[_local1].counter--; } } else { if (heliArray[_local1].isFiring == false) { _local2[heliArray[_local1].name]._x = _local2[heliArray[_local1].name]._x + heliArray[_local1].speed; } if ((heliArray[_local1].hasFired == false) && (heliArray[_local1].isFiring == false)) { if (((_local2[heliArray[_local1].name]._x - _local2[heliArray[_local1].name]._width) > 0) && ((_local2[heliArray[_local1].name]._x + _local2[heliArray[_local1].name]._width) < Stage.width)) { _local2[heliArray[_local1].name].gotoAndPlay("shoot"); heliArray[_local1].isFiring = true; trace(heliArray[_local1].name + " has fired"); } } if (heliArray[_local1].hasFired == true) { if (((_local2[heliArray[_local1].name]._x + _local2[heliArray[_local1].name]._width) < (_local2.boundingbox._x - (_local2.boundingbox._width / 2))) || ((_local2[heliArray[_local1].name]._x - _local2[heliArray[_local1].name]._width) > (_local2.boundingbox._x + (_local2.boundingbox._width / 2)))) { trace("out of bounds"); heliArray[_local1].inFlight = false; var _local3 = Math.round(Math.random() * (heliArray[_local1].max - heliArray[_local1].min)) + heliArray[_local1].min; heliArray[_local1].counter = _local3; heliArray[_local1].hasFired = false; heliArray[_local1].isFiring = false; } } } _local1++; } } function HelicopterFire(name) { var _local3 = name; var _local2 = 0; var _local1 = 0; while (_local1 < heliArray.length) { if (heliArray[_local1].name == _local3) { _local2 = _local1; break; } _local1++; } var myName = ("bullet_helicopter_" + identifierNumber); identifierNumber++; var point = {x:_root[_local3].emitter1._x, y:_root[_local3].emitter1._y}; _root[_local3].localToGlobal(point); var bulletSpeed = 0; trace("helicopter speed is: " + heliArray[_local2].speed); if (heliArray[_local2].speed > 0) { bulletSpeed = heliArray[_local2].speed + 2; } else { bulletSpeed = heliArray[_local2].speed - 2; } LaunchBullet(myName, point.x, point.Y, bulletSpeed, 0); } function HelicopterDoneFiring(name) { var _local2 = name; var _local1 = 0; while (_local1 < heliArray.length) { if (heliArray[_local1].name == _local2) { heliArray[_local1].isFiring = false; heliArray[_local1].hasFired = true; return; } _local1++; } } function getDistance(i) { var _local1 = _root; distancex = _local1[objectArray[i].Name]._x - _local1.ship._x; distancey = _local1[objectArray[i].Name]._y - _local1.ship._y; return(Math.sqrt((distancex * distancex) + (distancey * distancey))); } function beamHorizontalAndVertical(asscheese, assY) { var _local1 = _root; var _local2 = asscheese; var _local3 = assY; i = 0; while (i < objectArray.length) { if ((objectArray[i].Beamed == 1) && (objectArray[i].Type != "agent")) { objectArray[i].Dx = _local2; if ((_local1.ship._x > 100) && (_local1.ship._X < 450)) { _local1[objectArray[i].Name]._x = _local1[objectArray[i].Name]._x + _local2; } if ((_local1.ship._y > 50) && (_local1.ship._y < 250)) { _local1[objectArray[i].Name]._y = _local1[objectArray[i].Name]._y + _local3; if (_local1[objectArray[i].Name]._y > objectArray[i].Ground) { _local1[objectArray[i].Name]._y = objectArray[i].Ground; } } } i++; } } function beamMeUp() { var _local1 = _root; var _local2 = new Array(); i = 0; while (i < objectArray.length) { if (objectArray[i].Type != "agent") { if (objectArray[i].Beamed == 1) { if (((objectArray[i].Type == "object") || (objectArray[i].Type == "tank")) && (objectArray[i].Linkage != "BonusIcon")) { maxheight = (_local1.ship._y + (_local1.ship._height / 2)) + (_local1[objectArray[i].Name]._height / 2); if (_local1[objectArray[i].Name]._y > maxheight) { _local1[objectArray[i].Name]._y = _local1[objectArray[i].Name]._y - 2; } } else if (_local1[objectArray[i].Name]._y > _local1.ship._y) { _local1[objectArray[i].Name]._y = _local1[objectArray[i].Name]._y - 2; } else if (objectArray[i].Beamed == 1) { _local1[objectArray[i].Name]._y = -20; objectArray[i].Beamed = 2; _local2.push({name:objectArray[i].Name, detach:true, debNum:4}); if (objectArray[i].Linkage != "BonusIcon") { if ((objectArray[i].Linkage != "person2") && (objectArray[i].Linkage != "person5")) { var scream = Math.round(Math.random() * 8); trace(scream); if (scream == 4) { playSound("maleEnjoy"); } else { playSound("maleScream"); } } else { playSound("maleScream"); } var scream = Math.round(Math.random() * 12); if (scream == 8) { var randSound = (Math.round(Math.random() * 3) + 1); _local1.playSound("rand" + randSound); } _global.currentPeople++; _global.totalPeople++; _local1.display._x = _local1.ship._x; _local1.display._y = _local1.ship._y; _local1.display.goToAndPlay("people"); } else { playSound("bonusSound"); _global.bonusPoints++; _local1.display._x = _local1.ship._x; _local1.display._y = _local1.ship._y; _local1.display.goToAndPlay("points"); } } if (_local1[objectArray[i].Name]._x < _local1.ship._x) { _local1[objectArray[i].Name]._x = _local1[objectArray[i].Name]._x + 1; if (_local1[objectArray[i].Name]._x >= _local1.ship._x) { _local1[objectArray[i].Name]._x = _local1.ship._x; } } if (_local1[objectArray[i].Name]._x > _local1.ship._x) { _local1[objectArray[i].Name]._x = _local1[objectArray[i].Name]._x - 1; if (_local1[objectArray[i].Name]._x <= _local1.ship._x) { _local1[objectArray[i].Name]._x = _local1.ship._x; } } } else { if (objectArray[i].Beamed == 2) { _local1[objectArray[i].Name].goToAndPlay("falling"); } if ((_local1[objectArray[i].Name]._y + (_local1[objectArray[i].Name]._height / 2)) == objectArray[i].Ground) { } else if (_local1[objectArray[i].Name]._y > 0) { _local1[objectArray[i].Name]._y = _local1[objectArray[i].Name]._y + objectArray[i].Dy; objectArray[i].Dy = objectArray[i].Dy + gravity; if (objectArray[i].Dy > yTerminalVelocity) { objectArray[i].Dy = yTerminalVelocity; } _local1[objectArray[i].Name]._x = _local1[objectArray[i].Name]._x + objectArray[i].Dx; if ((_local1[objectArray[i].Name]._y + (_local1[objectArray[i].Name]._height / 2)) >= objectArray[i].Ground) { useFriction = xGroundFriction; } else { useFriction = xFriction; } if ((objectArray[i].Dx >= -0.4) && (objectArray[i].Dx <= 0.4)) { objectArray[i].Dx = 0; } if (objectArray[i].Dx < 0) { objectArray[i].Dx = objectArray[i].Dx + useFriction; } if (objectArray[i].Dx > 0) { objectArray[i].Dx = objectArray[i].Dx - useFriction; } if ((_local1[objectArray[i].Name]._y + (_local1[objectArray[i].Name]._height / 2)) >= objectArray[i].Ground) { if (objectArray[i].Beamed == 2) { if ((objectArray[i].Ground - objectArray[i].FallHeight) < 20) { if (objectArray[i].Type == "tank") { _local1[objectArray[i].Name].gotoAndPlay("idle"); } else if (objectArray[i].Type == "person") { _local1[objectArray[i].Name].gotoAndPlay("run"); objectArray[i].Timer = 1; } if (objectArray[i].Type == "tank") { _local1[objectArray[i].Name].OpenFire(); } root[objectArray[i].Name]._y = objectArray[i].Ground; objectArray[i].Beamed = 0; } else { _local1[objectArray[i].Name].gotoAndPlay("collision"); _local1[objectArray[i].Name]._y = objectArray[i].Ground; if (objectArray[i].Linkage != nonDestructableType) { objectArray[i].Beamed = 3; } else { objectArray[i].Beamed = 0; } j = 0; while (j < objectArray.length) { if ((objectArray[j].Beamed == 0) && (_local1[objectArray[i].Name].hitTest(_local1[objectArray[j].Name]) == true)) { if (((objectArray[j].Type == "tank") && (objectArray[i].Type != "tank")) && ((objectArray[j].Type == "tank") && (objectArray[i].Type != "object"))) { } else { objectArray[j].Direction = 0; tempY = _local1[objectArray[j].Name]._y - (_local1[objectArray[i].Name].height / 100); howFar = objectArray[j].ZStack; objectArray[j].ZStack++; _local1[objectArray[i].Name].swapDepths((objectArray[j].Ground * 100) + howFar); _local1[objectArray[i].Name]._y = tempY; } if ((((objectArray[j].Type == "agent") || (objectArray[j].Type == "person")) || ((objectArray[j].Type == "tank") && (objectArray[i].Type == "tank"))) && (objectArray[j].Linkage != nonDestructableType)) { _local1[objectArray[j].Name].goToAndPlay("collision"); if (objectArray[j].Type == "tank") { _local1[objectArray[j].Name].HoldFire(); } deadArray.push(objectArray[j].Name); _local2.push({name:objectArray[j].Name, detach:false, debNum:5}); } } j++; } if (objectArray[i].Linkage != nonDestructableType) { deadArray.push(objectArray[i].Name); _local2.push({name:objectArray[i].Name, detach:false, debNum:6}); } } } objectArray[i].Dy = 0; } else if (objectArray[i].Beamed == 2) { hitFlag = false; if ((objectArray[i].Ground - objectArray[i].FallHeight) >= 20) { j = 0; while (j < objectArray.length) { if ((objectArray[j].Beamed == 0) && (_local1[objectArray[i].Name].hitTest(_local1[objectArray[j].Name]) == true)) { if (((objectArray[j].Type == "tank") && (objectArray[i].Type != "tank")) && ((objectArray[j].Type == "tank") && (objectArray[i].Type != "object"))) { } else { hitFlag = true; _local1[objectArray[i].Name].goToAndPlay("collision"); objectArray[j].Direction = 0; tempY = _local1[objectArray[j].Name]._y - _local1[objectArray[i].Name].height; howFar = objectArray[j].ZStack; objectArray[j].ZStack++; _local1[objectArray[i].Name].swapDepths((objectArray[j].Ground * 100) + howFar); _local1[objectArray[i].Name]._y = tempY; objectArray[i].Dy = 0; } if ((((((objectArray[j].Type == "agent") || (objectArray[j].Type == "person")) || (objectArray[j].Linkage == "bear")) || ((objectArray[j].Type == "tank") && (objectArray[i].Type == "tank"))) || ((objectArray[j].Type == "tank") && (objectArray[i].Type == "object"))) && (objectArray[j].Linkage != nonDestructableType)) { _local1[objectArray[j].Name].goToAndPlay("collision"); if (objectArray[j].Type == "tank") { _local1[objectArray[j].Name].HoldFire(); } deadArray.push(objectArray[j].Name); _local2.push({name:objectArray[j].Name, detach:false, debNum:5}); } break; } j++; } if (hitFlag == true) { if (objectArray[i].Linkage != nonDestructableType) { objectArray[i].Beamed = 3; } else { objectArray[i].Beamed = 0; } if (objectArray[i].Linkage != nonDestructableType) { deadArray.push(objectArray[i].Name); _local2.push({name:objectArray[i].Name, detach:false, debNum:6}); } } } } } } } else if (objectArray[i].Beamed == 1) { if (_local1.beam.hitTest(_local1[objectArray[i].Name]) == eval("False")) { objectArray[i].Beamed = 0; objectArray[i].Timer = 1; } } i++; } var _local3 = 0; while (_local3 < _local2.length) { removeObject(_local2[_local3].name, _local2[_local3].detach, _local2[_local3].debNum); _local3++; } } function moveTargets() { var _local1 = _root; if (targetArray_Name.length != 0) { i = 0; while (i < targetArray_Name.length) { if (targetArray_Frames[i] == 0) { myX = _local1[targetArray_Target[i]]._x; myY = _local1[targetArray_Target[i]]._y; } else { myX = _local1[targetArray_Name[i]]._x + ((_local1[targetArray_Target[i]]._x - _local1[targetArray_Name[i]]._x) / targetArray_Frames[i]); myY = _local1[targetArray_Name[i]]._y + ((_local1[targetArray_Target[i]]._y - _local1[targetArray_Name[i]]._y) / targetArray_Frames[i]); targetArray_Frames[i]--; } _local1[targetArray_Name[i]]._x = myX; _local1[targetArray_Name[i]]._y = myY; i++; } } } function createTarget(myTarget) { var _local1 = _root; name = "unique" + identifierNumber; identifierNumber++; _local1.attachMovie("manTarget", name, z3); z3++; targetArray_Name.push(name); targetArray_Target.push(objectArray[myTarget].Name); targetArray_Frames.push(15); _local1[name]._x = 275; _local1[name]._y = -60; } function removeTarget(myTarget) { var _local1 = myTarget; var _local2 = _root; i = 0; while (i < targetArray_Name.length) { if (targetArray_Target[i] == objectArray[_local1].Name) { _local2[targetArray_Name[i]].removeMovieClip(); targetArray_Name.splice(i, 1); targetArray_Target.splice(i, 1); targetArray_Frames.splice(i, 1); } i++; } } function moveScene(d) { var _local1 = d; var _local2 = _root; if (((panAmount + _local1) > panLimitLeft) and ((panAmount + _local1) < panLimitRight)) { panAmount = panAmount + _local1; trees._x = trees._x + (_local1 * 1); bushes._x = bushes._x + (_local1 * 0.8); hills._x = hills._x + (_local1 * 0.4); boundingbox._x = boundingbox._x + (_local1 * 1); i = 0; while (i < objectArray.length) { if ((((objectArray[i].Beamed == 0) || (objectArray[i].Beamed == 3)) || (objectArray[i].Beamed == 2)) || (objectArray[i].Type == "agent")) { _local2[objectArray[i].Name]._x = _local2[objectArray[i].Name]._x + _local1; } i++; } var i = 0; while (i < heliArray.length) { if (heliArray[i].inFlight == true) { _local2[heliArray[i].name]._x = _local2[heliArray[i].name]._x + _local1; } i++; } i = 0; while (i < deadArray.length) { _local2[deadArray[i]]._x = _local2[deadArray[i]]._x + _local1; i++; } i = 0; while (i < bulletArray.length) { _local2[bulletArray[i]]._x = _local2[bulletArray[i]]._x + _local1; i++; } return(0); } return(1); } function runLevel() { var _local1 = _root; var _local2 = _global; if (buttonCoolDown == 0) { if (Key.isDown(80) || (Key.isDown(27))) { buttonCoolDown = 10; if (_local2.gamePaused == false) { _local1.paused.gotoAndPlay("show"); _local2.gamePaused = true; intPauseTime = getTimer(); } else { _local1.paused.gotoAndPlay("hide"); _local2.gamePaused = false; if (_local2.nextTime != -1) { _local2.nextTime = _local2.nextTime + (getTimer() - intPauseTime); } intPauseTime = 0; } } } else { buttonCoolDown--; } if (_local2.gamePaused == false) { if (deathCounter == -1) { if (Key.isDown(39) && (!Key.isDown(37))) { dx = dx + sensitivity; if (dx > terminalVelocity) { dx = terminalVelocity; } } if (Key.isDown(37) && (!Key.isDown(39))) { dx = dx - sensitivity; if (dx < (terminalVelocity * -1)) { dx = terminalVelocity * -1; } } if (Key.isDown(40) && (!Key.isDown(38))) { dy = dy + sensitivity; if (dy > terminalVelocity) { dy = terminalVelocity; } } if (Key.isDown(38) && (!Key.isDown(40))) { dy = dy - sensitivity; if (dy < (terminalVelocity * -1)) { dy = terminalVelocity * -1; } } } } if (Key.isDown(68)) { _local2.debug = true; _local1.debugStatus(); } else { _local2.debug = false; } if (Key.isDown(16) && (Key.isDown(49))) { _local1.prepareForFrameChange(true, 5); _local2.gamePaused = false; _local2.cheated = true; } if (Key.isDown(16) && (Key.isDown(50))) { _local1.prepareForFrameChange(true, 10); _local2.gamePaused = false; _local2.cheated = true; } if (Key.isDown(16) && (Key.isDown(51))) { _local1.prepareForFrameChange(true, 15); _local2.gamePaused = false; _local2.cheated = true; } if (Key.isDown(16) && (Key.isDown(52))) { _local1.prepareForFrameChange(true, 20); _local2.gamePaused = false; _local2.cheated = true; } if (Key.isDown(16) && (Key.isDown(53))) { _local1.prepareForFrameChange(true, 25); _local2.gamePaused = false; _local2.cheated = true; } if (Key.isDown(16) && (Key.isDown(54))) { _local1.prepareForFrameChange(true, 30); _local2.gamePaused = false; _local2.cheated = true; } if (Key.isDown(16) && (Key.isDown(55))) { _local1.prepareForFrameChange(true, 35); _local2.gamePaused = false; _local2.cheated = true; } if (Key.isDown(16) && (Key.isDown(56))) { _local1.prepareForFrameChange(true, 40); _local2.gamePaused = false; _local2.cheated = true; } if (Key.isDown(16) && (Key.isDown(57))) { _local1.prepareForFrameChange(true, 45); _local2.gamePaused = false; _local2.cheated = true; } if (Key.isDown(16) && (Key.isDown(48))) { _local1.prepareForFrameChange(true, 50); _local2.gamePaused = false; _local2.cheated = true; } if (_local2.gamePaused == false) { if ((!Key.isDown(37)) && (!Key.isDown(39))) { if (dx > 0) { dx = dx - airFriction; } if (dx < 0) { dx = dx + airFriction; } if ((dx >= -0.3) && (dx <= 0.3)) { dx = 0; } } if ((!Key.isDown(38)) && (!Key.isDown(40))) { if (dy > 0) { dy = dy - airFriction; } if (dy < 0) { dy = dy + airFriction; } if ((dy >= -0.3) && (dy <= 0.3)) { dy = 0; } } if (Key.isDown(32) && (energyFlag == 0)) { _local1.beam.gotoandstop(2); shipEnergy = shipEnergy - beamCost; if (shipEnergy < 0) { shipEnergy = 0; energyFlag = 1; } beamFlag = true; _local1.startBeamTags(); } else { beamFlag = false; _local1.beam.gotoandstop(1); shipEnergy = shipEnergy + rechargeRate; if (shipEnergy > totalEnergy) { shipEnergy = totalEnergy; energyFlag = 0; } _local1.removeBeamTags(); } _local1.beamMeUp(); _local1.updateEnergyBar(shipEnergy, totalEnergy, energyFlag); _local1.ship._x = _local1.ship._x + dx; _local1.ship._y = _local1.ship._y + dy; if (beamFlag == true) { _local1.beamHorizontalAndVertical(dx, dy); } if (_local2.shipUsed == 1) { _local1.ship.inside._rotation = dx * 2.5; } if (_local1.ship._x > 450) { _local1.ship._x = 450; } if (_local1.ship._x < 100) { _local1.ship._x = 100; } if (_local1.ship._y < 50) { _local1.ship._y = 50; dy = 0; } if (_local1.ship._y > 250) { _local1.ship._y = 250; dy = 0; } _local1.shadow._x = _local1.ship._x; _local1.beam._x = _local1.ship._x; _local1.beam._y = (_local1.ship._y + (_local1.ship._y / 8)) + 35; _local1.beam._xscale = 50 + ((_local1.ship._y / 2.5) / 2); _local1.beam._yscale = 50 + ((_local1.ship._y / 2.5) / 2); _local1.shadow._alpha = _local1.ship._y / 4; _local1.shadow._xscale = 300 - _local1.ship._y; _local1.shadow._yscale = 300 - _local1.ship._y; varFlag = 0; if ((_local1.ship._x <= 100) && (dx < 0)) { varFlag = _local1.moveScene(-1 * dx); } else if ((_local1.ship._x >= 450) && (dx > 0)) { varFlag = _local1.moveScene(-1 * dx); } if (varFlag == 1) { dx = 0; } _local1.runTimer(); _local1.TankGenerator(); _local1.ManageHelicopters(); _local1.spotship(); _local1.makePeopleMove(); _local1.DetectBulletHits(); _local1.updatePeopleBar(_local2.currentPeople, _local2.totalPeopleToGet); _local1.moveTargets(); if (deathCounter >= 0) { if (deathCounter == 0) { _local2.livesLeft--; _local1.updateLives(_local2.livesLeft); _local1.prepareForFrameChange(false, 0); if (_local2.livesLeft != 0) { var randSound = (Math.round(Math.random() * 5) + 1); } } else { deathCounter--; } } if (_local2.nextTime != -1) { _local1.updateTimer(); } } } stop(); myNextLevel = 10; _global.debug = false; nonDestructableType = "rock"; panLimitLeft = -300; panLimitRight = 300; panAmount = 0; oldValue = 0; numPeople = 0; maxPeople = 0; percentFrequency = 0; zArray = new Array(); zStack = new Array(); z3 = 10000; objectArray = new Array(); bulletArray = new Array(); deadArray = new Array(); targetArray_Name = new Array(); targetArray_Target = new Array(); targetArray_Frames = new Array(); availPeople = new Array(); myVolume = 100; mySong = "Nothing"; myZ1 = 0; myZ2 = 0; terminalVelocity = 8; sensitivity = 0.4; totalEnergy = 200; shipEnergy = 200; rechargeRate = 2; beamCost = 2; timeToBeat = 180; airFriction = 0.15; xFriction = 0.15; xGroundFriction = 0.4; gravity = 0.4; yTerminalVelocity = 15; energyFlag = 0; pickUpFlag = 0; dropSpeed = 0; groundLevel = _root.truck._y; truckFlag = 0; dx = 0; dy = 0; tankArray = new Array(); tankSpawnTimeMin = 0; tankSpawnTimeMax = 0; tankCounter = -1; blnUseTanks = false; tanksToUse = "green"; heliArray = new Array(); bulletDepth = 30000; _global.totalPeopleToGet = 5; identifierNumber = 5; var mySoundPlayer = new SoundPlayer(); buttonCoolDown = 0; intPauseTime = 0; deathCounter = -1; almostFlag = false;
Instance of Symbol 304 MovieClip in Frame 17
onClipEvent (load) { _root.initializeLevel(17, 5, -200, 20, "", 60, 100); _root.updateLives(_global.livesLeft); _root.setPeopleTimer(30, 15); _root.addPersonType("person1", "person", 25); _root.addPersonType("person2", "person", 25); _root.addPersonType("person3", "person", 25); _root.addPersonType("ethan", "person", 25); levelTrack = "bonus"; _root.startMusicDownload(levelTrack); } onClipEvent (enterFrame) { _root.runLevel(); }
Instance of Symbol 657 MovieClip "volumeClip" in Frame 17
onClipEvent (load) { if (_global.volume == true) { volumeClip.goToAndPlay("volumeOn"); } else { volumeClip.goToAndPlay("volumeOff"); } } on (release) { if (_global.volume == true) { _global.volume = false; _root.volumeClip.nextFrame(); _root.toggleMusic(); } else { _global.volume = true; _root.volumeClip.prevFrame(); _root.toggleMusic(); } }
Frame 20
function initializeLevel(currentLevel, nextLevel, leftMax, rightMax, nonDestructable, timeToWin, peopleToGet) { var _local1 = _global; var _local2 = _root; identifierNumber = currentLevel; myNextLevel = nextLevel; panLimitLeft = leftMax; panLimitRight = rightMax; nonDestructableType = nonDestructable; timeToBeat = timeToWin; _local1.totalPeopleToGet = peopleToGet; if (_local1.tempLives < 0) { _local1.livesLeft = 3; } else { _local1.livesLeft = _local1.tempLives; } energyFlag = 0; pickUpFlag = 0; dropSpeed = 0; groundLevel = _local2.truck._y; truckFlag = 0; dx = 0; dy = 0; if (_local1.tempPeople < 0) { _local1.currentPeople = 0; } else { _local1.currentPeople = _local1.tempPeople; } _local1.tempPeople = 0; _local1.tempLives = 0; _local1.tempFrame = identifierNumber; if (timeToBeat == -1) { _local1.nextTime = -1; _local2.updateTimer(); } else { if ((_local1.nextTime == -1) && (timeToBeat != -1)) { _local1.nextTime = 0; } if (_local1.nextTime != -1) { if (_local1.stolenTime == 0) { _local1.nextTime = getTimer() + (timeToBeat * 1000); } else { _local1.nextTime = _local1.nextTime + (getTimer() - _local1.stolenTime); _local1.stolenTime = 0; } } } _local1.stolenTime = 0; if (_local1.shipUsed == 1) { _local2.ship.gotoAndStop("ship1"); } else { _local2.ship.gotoAndStop("ship2"); } } function addPersonType(myLinkage, myType, myWeight) { availPeople.push({linkage:myLinkage, type:myType, weight:myWeight}); } function playSound(soundName) { if (_global.volume == true) { mySoundPlayer.PlaySound(soundName); } } function startMusicDownload(music) { var _local1 = _global; if (_local1.musicOn == true) { _local1.mySound.stop(); _local1.mySound.attachSound(music); _local1.mySound.start(0, 99); _local1.mySound.setVolume(myVolume); } else { _root.volumeClip.gotoAndStop(2); _local1.mySound.stop(); } mySong = music; } function toggleMusic() { var _local1 = _global; if (_local1.volume == true) { _local1.mySound.attachSound(mySong); _local1.mySound.start(0, 99); _local1.mySound.setVolume(myVolume); _local1.musicOn = true; } else { _local1.mySound.stop(); _local1.mySound.setVolume(myVolume); _local1.musicOn = false; } } function updateTimer() { var _local1 = _global; if (_local1.nextTime == -1) { timeText = "NO LIMIT"; } else { myTime = _local1.nextTime - getTimer(); mySecs = math.floor(myTime / 1000); if (mySecs == 0) { _local1.livesLeft = 0; prepareForFrameChange(false, 0); } if (mySecs > 60) { someSeconds = myTime / 1000; someMinutes = someSeconds / 60; if (someSeconds > 59) { someSeconds = someSeconds - (Math.floor(someMinutes) * 60); } if (someSeconds < 10) { textMinutes = someMinutes; timeText = (Math.floor(textMinutes) + ":0") + Math.floor(someSeconds); } else if (someSeconds == 0) { textMinutes = someMinutes; timeText = Math.floor(textMinutes) + ":00"; } else { textMinutes = someMinutes; timeText = (Math.floor(textMinutes) + ":") + Math.floor(someSeconds); } } else { timeText = Math.floor(mySecs); } } } function updateLives(lifeNum) { var _local1 = lifeNum; if (_local1 < 0) { _local1 = 0; } lives = _local1; } function prepareForFrameChange(newLevel, levelNum) { var _local1 = _global; var _local2 = _root; _local1.tempLives = _local1.livesLeft; _local1.tempPeople = _local1.currentPeople; cleanScreen(); if ((_local1.livesLeft > 0) && (newLevel == false)) { _local1.stolenTime = getTimer(); _local2.goToAndPlay("loseLife"); } else if ((_local1.livesLeft > 0) && (newLevel == true)) { _local1.tempPeople = -1; _local1.tempFrame = levelNum; _local2.goToAndPlay("levelText"); } else if (_local1.livesLeft == 0) { _local2.goToAndPlay("endGame"); } } function cleanScreen() { var _local1 = _root; i = 0; while (i < objectArray.length) { _local1[objectArray[i].Name].removeMovieClip(); i++; } i = 0; while (i < deadArray.length) { _local1[deadArray[i]].removeMovieClip(); i++; } i = 0; while (i < targetArray_Name.length) { _local1[targetArray_Name[i]].removeMovieClip(); i++; } i = 0; while (i < bulletArray.length) { _local1[bulletArray[i]].removeMovieClip(); i++; } } function setPeopleTimer(mPeople, pFrequency) { var _local1 = _root; myZ2 = Math.round(_local1.z2._y); myZ1 = Math.round(_local1.z1._y); _local1.z1._y = -50; _local1.z2._y = -50; i = myZ1; while (i < myZ2) { zArray.push(i); zStack.push(1); i++; } percentFrequency = pFrequency; maxPeople = mPeople; } function runTimer() { if (numPeople != maxPeople) { if (random(255) < percentFrequency) { numPeople++; addPersonDynamic(false); } } } function rangeInUse(minZ, maxZ) { var _local2 = maxZ; var _local3 = minZ; var _local1 = false; i = 0; while (i < objectArray.length) { if ((objectArray[i].ZStack >= _local3) && (objectArray[i].ZStack <= _local2)) { _local1 = true; } i++; } return(_local1); } function startBeamTags() { var _local1 = _root; i = 0; while (i < objectArray.length) { if (_local1.beam.hitTest(_local1[objectArray[i].Name]) == true) { if (objectArray[i].Beamed == 0) { _local1[objectArray[i].Name].goToAndPlay("beamed"); objectArray[i].Beamed = 1; objectArray[i].Dy = 0; if (objectArray[i].Type == "tank") { _local1[objectArray[i].Name].HoldFire(); } } if (objectArray[i].Beamed == 2) { _local1[objectArray[i].Name].goToAndStop("endbeam"); objectArray[i].Beamed = 1; objectArray[i].Dy = 0; } } i++; } } function debugStatus() { trace("Name type beamed timer"); trace("----------------------------------------"); i = 0; while (i < objectArray.length) { trace((((((((((objectArray[i].Name + " ") + objectArray[i].Type) + " ") + objectArray[i].Beamed) + " ") + objectArray[i].Timer) + " ") + objectArray[i].Spotted) + " ") + objectArray[i].Direction); i++; } trace("----------------------------------------"); } function removeBeamTags() { var _local1 = _root; i = 0; while (i < objectArray.length) { if ((objectArray[i].Beamed == 1) && (objectArray[i].Type != "agent")) { objectArray[i].Beamed = 2; objectArray[i].FallHeight = _local1[objectArray[i].Name]._y; } else if ((objectArray[i].Beamed == 1) && (objectArray[i].Type == "agent")) { objectArray[i].Beamed = 0; objectArray[i].Timer = 1; } i++; } } function addUnit(name, newSpeed, myLinkage, givenType) { var _local1 = _root; var _local2 = name; var _local3 = newSpeed; tempX = _local1[_local2]._x; tempY = _local1[_local2]._y; wantY = Math.round(tempY); flag = -1; myZStack = -1; i = 0; while (i < zArray.length) { if (zArray[i] == wantY) { flag = i; myZstack = zStack[i]; } i++; } if (flag != -1) { zArray.splice(flag, 1); zStack.splice(flag, 1); } _local1[_local2]._visible = false; _local2 = givenType + identifierNumber; identifierNumber++; _local1.attachMovie(myLinkage, _local2, wantY * 100); if (givenType == "tank") { _local1[_local2].SetFireRate(40); tankArray.push({track:wantY, occupied:true, tank:_local2}); } _local1[_local2]._x = tempX; _local1[_local2]._y = tempY; x = 275; if ((_local1[_local2]._x <= x) && (_local3 != 0)) { dir = _local3; _local1[_local2]._xscale = -Math.abs(_local1[_local2]._xscale); if (myLinkage == "antiAir") { _local1[_local2]._xscale = _local1[_local2]._xscale * -1; } } else { dir = -1 * _local3; } var groundLevel = Math.round(_local1[_local2]._y + (_local1[_local2]._height / 2)); objectArray.push({Name:_local2, Beamed:0, Type:givenType, Ground:groundLevel, Dx:0, Dy:0, Timer:0, Spotted:0, Linkage:myLinkage, ZStack:myZStack, Direction:dir, FallHeight:0}); return(_local2); } function generateEthan() { addPersonDynamic(true); } function addPersonDynamic(isEthan) { if (zArray.length == 0) { return(null); } if (isEthan == false) { r = random(2); switch (r) { case 0 : var _local3 = 0; var _local2 = -1; var _local1 = 0; while (_local1 < availPeople.length) { _local3 = _local3 + availPeople[_local1].weight; _local1++; } var chosenWeight = Math.round(Math.random() * _local3); _local1 = 0; while (_local1 < availPeople.length) { if ((chosenWeight > _local2) && (chosenWeight <= (_local2 + availPeople[_local1].weight))) { myGuy = availPeople[_local1].linkage; myType = availPeople[_local1].type; break; } _local2 = _local2 + availPeople[_local1].weight; _local1++; } break; case 1 : myGuy = "MIB"; myType = "agent"; } } else { myGuy = "ethan"; myType = "person"; } r = random(zArray.length); z = zArray[r]; zs = zStack[r]; zArray.splice(r, 1); zStack.splice(r, 1); name = "unique" + identifierNumber; identifierNumber++; _root.attachMovie(myGuy, name, z * 100); r = random(2); if (r == 0) { x = _root.boundingbox._x + (_root.boundingbox._width / 2); } else { x = _root.boundingbox._x - (_root.boundingbox._width / 2); } _root[name]._x = x; _root[name]._y = z; x = _root.hills._x; if (_root[name]._x <= x) { dir = 1; if (myType == "agent") { _root[name]._xscale = -Math.abs(_root[name]._xscale); } } else { dir = -1; if (myType != "agent") { _root[name]._xscale = -Math.abs(_root[name]._xscale); } } _root[name].goToAndPlay("walk"); objectArray.push({Name:name, Beamed:0, Type:myType, Ground:z, Dx:0, Dy:0, Timer:0, Spotted:0, Linkage:myGuy, ZStack:zs, Direction:dir, FallHeight:0}); return(undefined); } function addTank(name, newSpeed, myLinkage, myTrack) { var _local1 = _root; var _local3 = myTrack; var _local2 = "tank"; if (tanksToUse == "red") { _local2 = "redTank"; } if (tanksToUse == "white") { _local2 = "whiteTank"; } _local1.attachMovie(_local2, name, _local3 * 100); r = random(2); if (r == 0) { x = _local1.boundingbox._x + (_local1.boundingbox._width / 2); } else { x = _local1.boundingbox._x - (_local1.boundingbox._width / 2); } _local1[name]._x = x; if (tanksToUse == "red") { _local1[name].SetFireRate(15); } else if (tanksToUse == "white") { _local1[name].SetFireRate(25); } else { _local1[name].SetFireRate(40); } _local1[name]._y = _local3; x = _local1.hills._x; if (_local1[name]._x <= x) { dir = 1; _local1[name]._xscale = _local1[name]._xscale * -1; } else { dir = -1; } _local1[name].goToAndPlay("idle"); objectArray.push({Name:name, Beamed:0, Type:"tank", Ground:_local3, Dx:0, Dy:0, Timer:0, Spotted:0, Linkage:"tank", ZStack:999999, Direction:dir, FallHeight:0}); } function makePeopleMove() { var _local1 = _root; var _local3 = _global; var queueRemoval = new Array(); i = 0; while (i < objectArray.length) { if (objectArray[i].Beamed == 0) { if (objectArray[i].Timer == 1) { if (_local3.debug == true) { trace(i); } if (_local1[objectArray[i].Name]._x < _local1.ship._x) { objectArray[i].Direction = -3; if (objectArray[i].Type == "person") { _local1[objectArray[i].Name]._xscale = -Math.abs(_local1[objectArray[i].Name]._xscale); } else if (objectArray[i].Type == "agent") { _local1[objectArray[i].Name]._xscale = Math.abs(_local1[objectArray[i].Name]._xscale); if (objectArray[i].Spotted == 0) { createTarget(i); objectArray[i].Spotted = 1; } } } else { objectArray[i].Direction = 3; if (objectArray[i].Type == "person") { _local1[objectArray[i].Name]._xscale = Math.abs(_local1[objectArray[i].Name]._xscale); } else if (objectArray[i].Type == "agent") { _local1[objectArray[i].Name]._xscale = -Math.abs(_local1[objectArray[i].Name]._xscale); if (objectArray[i].Spotted == 0) { createTarget(i); objectArray[i].Spotted = 1; } } } _local1[objectArray[i].Name].gotoandplay("run"); } if (objectArray[i].Timer > 0) { objectArray[i].Timer--; } _local1[objectArray[i].Name]._x = _local1[objectArray[i].Name]._x + objectArray[i].Direction; if ((_local1[objectArray[i].Name]._x < (_local1.boundingbox._x - (_local1.boundingbox._width / 2))) && (objectArray[i].Direction < 0)) { if (objectArray[i].Spotted == 1) { _local3.livesLeft--; _local1.updateLives(_local3.livesLeft); _local1.prepareForFrameChange(false, 0); if (_local3.livesLeft != 0) { var randSound = (Math.round(Math.random() * 5) + 1); } } if (objectArray[i].Type == "tank") { OpenTrack(objectArray[i].Name); } queueRemoval.push({name:objectArray[i].Name, detach:true, debNum:1}); } else if ((_local1[objectArray[i].Name]._x > (_local1.boundingbox._x + (_local1.boundingbox._width / 2))) && (objectArray[i].Direction > 0)) { if (objectArray[i].Spotted == 1) { _local3.livesLeft--; _local1.updateLives(_local3.livesLeft); _local1.prepareForFrameChange(false, 0); if (_local3.livesLeft != 0) { var randSound = (Math.round(Math.random() * 5) + 1); } } if (objectArray[i].Type == "tank") { OpenTrack(objectArray[i].Name); } queueRemoval.push({name:objectArray[i].Name, detach:true, debNum:2}); } } i++; } var _local2 = 0; while (_local2 < queueRemoval.length) { removeObject(queueRemoval[_local2].name, queueRemoval[_local2].detach, queueRemoval[_local2].debNum); _local2++; } tanksAim(); } function removeObject(objectName, removeFromScreen, debugNum) { var _local2 = removeFromScreen; var _local3 = _root; i = -1; var _local1 = 0; while (_local1 < objectArray.length) { if (objectArray[_local1].Name == objectName) { i = _local1; if (objectArray[_local1].Type != "tank") { zArray.push(objectArray[_local1].Ground); zStack.push(objectArray[_local1].ZStack); } if ((objectArray[_local1].Type != "object") && (objectArray[_local1].Type != "tank")) { numPeople--; } if (objectArray[_local1].Spotted == 1) { removeTarget(i); } if (_local2) { _local3[objectArray[_local1].Name].removeMovieClip(); } objectArray.splice(_local1, 1); return; } _local1++; } } function updateEnergyBar(current, total, flag) { var _local1 = _root; frac = current / total; _local1.energy._xscale = frac * 100; if (flag == 1) { _local1.energy.goToAndStop(2); } else { _local1.energy.goToAndStop(1); } } function updatePeopleBar(current, total) { var _local1 = current; var _local2 = total; var _local3 = _root; frac = _local1 / _local2; _local3.peopleToGo._xscale = frac * 100; myFrame = 10; frac = (_local1 / _local2) * 100; if (frac < 10) { myFrame = 1; } else if ((frac >= 10) && (frac < 20)) { myFrame = 2; } else if ((frac >= 20) && (frac < 30)) { myFrame = 3; } else if ((frac >= 30) && (frac < 40)) { myFrame = 4; } else if ((frac >= 40) && (frac < 50)) { myFrame = 5; } else if ((frac >= 50) && (frac < 60)) { myFrame = 6; } else if ((frac >= 60) && (frac < 70)) { myFrame = 7; } else if ((frac >= 70) && (frac < 80)) { myFrame = 8; } else if ((frac >= 80) && (frac < 90)) { myFrame = 9; } else if ((frac >= 90) && (frac <= 100)) { myFrame = 10; } if (oldValue != myFrame) { _local3.peopleToGo.goToAndStop(myFrame); } oldValue = myFrame; if ((_local1 == (_local2 - 2)) && (almostFlag == false)) { var randSound = (Math.round(Math.random() * 4) + 1); _local3.playSound("good" + randSound); almostFlag = true; } if (_local1 == _local2) { prepareForFrameChange(true, myNextLevel); } } function spotship() { var _local1 = _root; i = 0; while (i < objectArray.length) { if (((objectArray[i].Beamed == 0) && ((objectArray[i].Type == "person") || (objectArray[i].Type == "agent"))) && ((objectArray[i].Direction == 1) || (objectArray[i].Direction == -1))) { myDist = getDistance(i); if (myDist <= 175) { if (((objectArray[i].Direction == 1) && (_local1[objectArray[i].Name]._x < _local1.ship._x)) && (_local1[objectArray[i].Name]._x >= 50)) { _local1[objectArray[i].Name].gotoandplay("spot"); objectArray[i].Direction = 0; objectArray[i].Timer = 30; } else if (((objectArray[i].Direction == -1) && (_local1[objectArray[i].Name]._x > _local1.ship._x)) && (_local1[objectArray[i].Name]._x <= 500)) { _local1[objectArray[i].Name].gotoandplay("spot"); objectArray[i].Direction = 0; objectArray[i].Timer = 30; } } } i++; } } function tanksAim() { var _local3 = _root; var _local2 = 0; while (_local2 < objectArray.length) { if ((objectArray[_local2].Beamed == 0) && (objectArray[_local2].Type == "tank")) { var tankName = objectArray[_local2].Name; var point = {x:_local3[tankName].cannon._x, y:_local3[tankName].cannon._y}; _local3[tankName].localToGlobal(point); var op = (_local3.ship._y - point.y); var adj = (_local3.ship._x - point.x); if (adj == 0) { adj = 1; } var _local1 = (Math.atan(op / adj) * 180) / Math.PI; if (_local1 < 0) { _local1 = _local1 * -1; } if (_local1 > 90) { _local1 = 90; } if (_local1 < 20) { _local1 = 20; } _local3[tankName].cannon._rotation = _local1; } _local2++; } } function StartTankGenerator(min, max, color) { tanksToUse = color; blnUseTanks = true; tankSpawnTimeMin = min; tankSpawnTimeMax = max; tankCounter = Math.round(Math.random() * (tankSpawnTimeMax - tankSpawnTimeMin)) + tankSpawnTimeMin; } function TankGenerator() { if (blnUseTanks == true) { intAvailFlag = -1; var _local1 = 0; while (_local1 < tankArray.length) { if (tankArray[_local1].occupied == false) { intAvailFlag = _local1; break; } _local1++; } if (intAvailFlag != -1) { if (tankCounter == 0) { var _local2 = "tank" + identifierNumber; identifierNumber++; tankArray[intAvailFlag].occupied = true; tankArray[intAvailFlag].tank = _local2; addTank(_local2, 3, "tank", tankArray[intAvailFlag].track); tankCounter = Math.round(Math.random() * (tankSpawnTimeMax - tankSpawnTimeMin)) + tankSpawnTimeMin; } else { tankCounter--; } } } } function OpenTrack(tankName) { var _local2 = tankName; var _local1 = 0; while (_local1 < tankArray.length) { if (tankArray[_local1].tank == _local2) { tankArray[_local1].tank = ""; tankArray[_local1].occupied = false; trace(("track " + _local1) + " is open"); } _local1++; } } function LaunchBullet(bulletName, startX, startY, directionX, directionY) { var _local1 = bulletName; var _local3 = _root; var _local2 = ""; if ((substring(_local1, 0, 18)) == "bullet_helicopter_") { _local2 = "bullet air"; } else { _local2 = "bullet ground"; } _local3.attachMovie(_local2, _local1, bulletDepth); _local3[_local1]._x = startX; _local3[_local1]._y = startY; _local3[_local1].SetMovement(directionX, directionY); bulletArray.push(_local1); bulletDepth++; } function DetectBulletHits() { var _local1 = _root; var _local3 = new Array(); var _local2 = 0; while (_local2 < bulletArray.length) { distancex = _local1[bulletArray[_local2]]._x - _local1.ship._x; distancey = _local1[bulletArray[_local2]]._y - _local1.ship._y; if (Math.sqrt((distancex * distancex) + (distancey * distancey)) <= 19) { if ((substring(bulletArray[_local2], 0, 18)) == "bullet_helicopter_") { shipEnergy = 0; energyFlag = 1; _local1.ship.explosion.gotoAndPlay("shock"); _local3.push(bulletArray[_local2]); } else { _local1.ship.explosion.gotoAndPlay("explode"); _local1.playSound("explosion"); if (deathCounter == -1) { deathCounter = 16; } _local3.push(bulletArray[_local2]); } } _local2++; } _local2 = 0; while (_local2 < _local3.length) { RemoveBullet(_local3[_local2]); _local2++; } } function ObjectCleanup(itemName) { var _local1 = itemName; if (_local1.substr(0, 4) == "tank") { OpenTrack(_local1); } _root[_local1].removeMovieClip(); } function RemoveBullet(itemName) { var _local3 = itemName; var _local2 = -1; var _local1 = 0; while (_local1 < bulletArray.length) { if (bulletArray[_local1] == _local3) { _local2 = _local1; break; } _local1++; } if (_local2 != -1) { bulletArray.splice(_local2, 1); _root[_local3].removeMovieClip(); } } function addHelicopter(itemName, minSpawn, maxSpawn, mySpeed) { var _local1 = minSpawn; var _local2 = Math.round(Math.random() * (maxSpawn - _local1)) + _local1; heliArray.push({name:itemName, min:_local1, max:maxSpawn, counter:_local2, speed:mySpeed, inFlight:false, hasFired:false, isFiring:false}); } function ManageHelicopters() { var _local2 = _root; var _local1 = 0; while (_local1 < heliArray.length) { if (heliArray[_local1].inFlight == false) { if (heliArray[_local1].counter == 0) { heliArray[_local1].inFlight = true; _local2[heliArray[_local1].name]._x; r = random(2); if (r == 0) { x = _local2.boundingbox._x + (_local2.boundingbox._width / 2); _local2[heliArray[_local1].name]._xscale = 100; heliArray[_local1].speed = -Math.abs(heliArray[_local1].speed); } else { x = (_local2.boundingbox._x - (_local2.boundingbox._width / 2)) - _local2[heliArray[_local1].name]._width; _local2[heliArray[_local1].name]._xscale = -100; heliArray[_local1].speed = Math.abs(heliArray[_local1].speed); } _local2[heliArray[_local1].name]._x = x; var y = (Math.round(Math.random() * 151) + 53); _local2[heliArray[_local1].name]._y = y; } else { heliArray[_local1].counter--; } } else { if (heliArray[_local1].isFiring == false) { _local2[heliArray[_local1].name]._x = _local2[heliArray[_local1].name]._x + heliArray[_local1].speed; } if ((heliArray[_local1].hasFired == false) && (heliArray[_local1].isFiring == false)) { if (((_local2[heliArray[_local1].name]._x - _local2[heliArray[_local1].name]._width) > 0) && ((_local2[heliArray[_local1].name]._x + _local2[heliArray[_local1].name]._width) < Stage.width)) { _local2[heliArray[_local1].name].gotoAndPlay("shoot"); heliArray[_local1].isFiring = true; trace(heliArray[_local1].name + " has fired"); } } if (heliArray[_local1].hasFired == true) { if (((_local2[heliArray[_local1].name]._x + _local2[heliArray[_local1].name]._width) < (_local2.boundingbox._x - (_local2.boundingbox._width / 2))) || ((_local2[heliArray[_local1].name]._x - _local2[heliArray[_local1].name]._width) > (_local2.boundingbox._x + (_local2.boundingbox._width / 2)))) { trace("out of bounds"); heliArray[_local1].inFlight = false; var _local3 = Math.round(Math.random() * (heliArray[_local1].max - heliArray[_local1].min)) + heliArray[_local1].min; heliArray[_local1].counter = _local3; heliArray[_local1].hasFired = false; heliArray[_local1].isFiring = false; } } } _local1++; } } function HelicopterFire(name) { var _local3 = name; var _local2 = 0; var _local1 = 0; while (_local1 < heliArray.length) { if (heliArray[_local1].name == _local3) { _local2 = _local1; break; } _local1++; } var myName = ("bullet_helicopter_" + identifierNumber); identifierNumber++; var point = {x:_root[_local3].emitter1._x, y:_root[_local3].emitter1._y}; _root[_local3].localToGlobal(point); var bulletSpeed = 0; trace("helicopter speed is: " + heliArray[_local2].speed); if (heliArray[_local2].speed > 0) { bulletSpeed = heliArray[_local2].speed + 2; } else { bulletSpeed = heliArray[_local2].speed - 2; } LaunchBullet(myName, point.x, point.Y, bulletSpeed, 0); } function HelicopterDoneFiring(name) { var _local2 = name; var _local1 = 0; while (_local1 < heliArray.length) { if (heliArray[_local1].name == _local2) { heliArray[_local1].isFiring = false; heliArray[_local1].hasFired = true; return; } _local1++; } } function getDistance(i) { var _local1 = _root; distancex = _local1[objectArray[i].Name]._x - _local1.ship._x; distancey = _local1[objectArray[i].Name]._y - _local1.ship._y; return(Math.sqrt((distancex * distancex) + (distancey * distancey))); } function beamHorizontalAndVertical(asscheese, assY) { var _local1 = _root; var _local2 = asscheese; var _local3 = assY; i = 0; while (i < objectArray.length) { if ((objectArray[i].Beamed == 1) && (objectArray[i].Type != "agent")) { objectArray[i].Dx = _local2; if ((_local1.ship._x > 100) && (_local1.ship._X < 450)) { _local1[objectArray[i].Name]._x = _local1[objectArray[i].Name]._x + _local2; } if ((_local1.ship._y > 50) && (_local1.ship._y < 250)) { _local1[objectArray[i].Name]._y = _local1[objectArray[i].Name]._y + _local3; if (_local1[objectArray[i].Name]._y > objectArray[i].Ground) { _local1[objectArray[i].Name]._y = objectArray[i].Ground; } } } i++; } } function beamMeUp() { var _local1 = _root; var _local2 = new Array(); i = 0; while (i < objectArray.length) { if (objectArray[i].Type != "agent") { if (objectArray[i].Beamed == 1) { if (((objectArray[i].Type == "object") || (objectArray[i].Type == "tank")) && (objectArray[i].Linkage != "BonusIcon")) { maxheight = (_local1.ship._y + (_local1.ship._height / 2)) + (_local1[objectArray[i].Name]._height / 2); if (_local1[objectArray[i].Name]._y > maxheight) { _local1[objectArray[i].Name]._y = _local1[objectArray[i].Name]._y - 2; } } else if (_local1[objectArray[i].Name]._y > _local1.ship._y) { _local1[objectArray[i].Name]._y = _local1[objectArray[i].Name]._y - 2; } else if (objectArray[i].Beamed == 1) { _local1[objectArray[i].Name]._y = -20; objectArray[i].Beamed = 2; _local2.push({name:objectArray[i].Name, detach:true, debNum:4}); if (objectArray[i].Linkage != "BonusIcon") { if ((objectArray[i].Linkage != "person2") && (objectArray[i].Linkage != "person5")) { var scream = Math.round(Math.random() * 8); trace(scream); if (scream == 4) { playSound("maleEnjoy"); } else { playSound("maleScream"); } } else { playSound("maleScream"); } var scream = Math.round(Math.random() * 12); if (scream == 8) { var randSound = (Math.round(Math.random() * 3) + 1); _local1.playSound("rand" + randSound); } _global.currentPeople++; _global.totalPeople++; _local1.display._x = _local1.ship._x; _local1.display._y = _local1.ship._y; _local1.display.goToAndPlay("people"); } else { playSound("bonusSound"); _global.bonusPoints++; _local1.display._x = _local1.ship._x; _local1.display._y = _local1.ship._y; _local1.display.goToAndPlay("points"); } } if (_local1[objectArray[i].Name]._x < _local1.ship._x) { _local1[objectArray[i].Name]._x = _local1[objectArray[i].Name]._x + 1; if (_local1[objectArray[i].Name]._x >= _local1.ship._x) { _local1[objectArray[i].Name]._x = _local1.ship._x; } } if (_local1[objectArray[i].Name]._x > _local1.ship._x) { _local1[objectArray[i].Name]._x = _local1[objectArray[i].Name]._x - 1; if (_local1[objectArray[i].Name]._x <= _local1.ship._x) { _local1[objectArray[i].Name]._x = _local1.ship._x; } } } else { if (objectArray[i].Beamed == 2) { _local1[objectArray[i].Name].goToAndPlay("falling"); } if ((_local1[objectArray[i].Name]._y + (_local1[objectArray[i].Name]._height / 2)) == objectArray[i].Ground) { } else if (_local1[objectArray[i].Name]._y > 0) { _local1[objectArray[i].Name]._y = _local1[objectArray[i].Name]._y + objectArray[i].Dy; objectArray[i].Dy = objectArray[i].Dy + gravity; if (objectArray[i].Dy > yTerminalVelocity) { objectArray[i].Dy = yTerminalVelocity; } _local1[objectArray[i].Name]._x = _local1[objectArray[i].Name]._x + objectArray[i].Dx; if ((_local1[objectArray[i].Name]._y + (_local1[objectArray[i].Name]._height / 2)) >= objectArray[i].Ground) { useFriction = xGroundFriction; } else { useFriction = xFriction; } if ((objectArray[i].Dx >= -0.4) && (objectArray[i].Dx <= 0.4)) { objectArray[i].Dx = 0; } if (objectArray[i].Dx < 0) { objectArray[i].Dx = objectArray[i].Dx + useFriction; } if (objectArray[i].Dx > 0) { objectArray[i].Dx = objectArray[i].Dx - useFriction; } if ((_local1[objectArray[i].Name]._y + (_local1[objectArray[i].Name]._height / 2)) >= objectArray[i].Ground) { if (objectArray[i].Beamed == 2) { if ((objectArray[i].Ground - objectArray[i].FallHeight) < 20) { if (objectArray[i].Type == "tank") { _local1[objectArray[i].Name].gotoAndPlay("idle"); } else if (objectArray[i].Type == "person") { _local1[objectArray[i].Name].gotoAndPlay("run"); objectArray[i].Timer = 1; } if (objectArray[i].Type == "tank") { _local1[objectArray[i].Name].OpenFire(); } root[objectArray[i].Name]._y = objectArray[i].Ground; objectArray[i].Beamed = 0; } else { _local1[objectArray[i].Name].gotoAndPlay("collision"); _local1[objectArray[i].Name]._y = objectArray[i].Ground; if (objectArray[i].Linkage != nonDestructableType) { objectArray[i].Beamed = 3; } else { objectArray[i].Beamed = 0; } j = 0; while (j < objectArray.length) { if ((objectArray[j].Beamed == 0) && (_local1[objectArray[i].Name].hitTest(_local1[objectArray[j].Name]) == true)) { if (((objectArray[j].Type == "tank") && (objectArray[i].Type != "tank")) && ((objectArray[j].Type == "tank") && (objectArray[i].Type != "object"))) { } else { objectArray[j].Direction = 0; tempY = _local1[objectArray[j].Name]._y - (_local1[objectArray[i].Name].height / 100); howFar = objectArray[j].ZStack; objectArray[j].ZStack++; _local1[objectArray[i].Name].swapDepths((objectArray[j].Ground * 100) + howFar); _local1[objectArray[i].Name]._y = tempY; } if ((((objectArray[j].Type == "agent") || (objectArray[j].Type == "person")) || ((objectArray[j].Type == "tank") && (objectArray[i].Type == "tank"))) && (objectArray[j].Linkage != nonDestructableType)) { _local1[objectArray[j].Name].goToAndPlay("collision"); if (objectArray[j].Type == "tank") { _local1[objectArray[j].Name].HoldFire(); } deadArray.push(objectArray[j].Name); _local2.push({name:objectArray[j].Name, detach:false, debNum:5}); } } j++; } if (objectArray[i].Linkage != nonDestructableType) { deadArray.push(objectArray[i].Name); _local2.push({name:objectArray[i].Name, detach:false, debNum:6}); } } } objectArray[i].Dy = 0; } else if (objectArray[i].Beamed == 2) { hitFlag = false; if ((objectArray[i].Ground - objectArray[i].FallHeight) >= 20) { j = 0; while (j < objectArray.length) { if ((objectArray[j].Beamed == 0) && (_local1[objectArray[i].Name].hitTest(_local1[objectArray[j].Name]) == true)) { if (((objectArray[j].Type == "tank") && (objectArray[i].Type != "tank")) && ((objectArray[j].Type == "tank") && (objectArray[i].Type != "object"))) { } else { hitFlag = true; _local1[objectArray[i].Name].goToAndPlay("collision"); objectArray[j].Direction = 0; tempY = _local1[objectArray[j].Name]._y - _local1[objectArray[i].Name].height; howFar = objectArray[j].ZStack; objectArray[j].ZStack++; _local1[objectArray[i].Name].swapDepths((objectArray[j].Ground * 100) + howFar); _local1[objectArray[i].Name]._y = tempY; objectArray[i].Dy = 0; } if ((((((objectArray[j].Type == "agent") || (objectArray[j].Type == "person")) || (objectArray[j].Linkage == "bear")) || ((objectArray[j].Type == "tank") && (objectArray[i].Type == "tank"))) || ((objectArray[j].Type == "tank") && (objectArray[i].Type == "object"))) && (objectArray[j].Linkage != nonDestructableType)) { _local1[objectArray[j].Name].goToAndPlay("collision"); if (objectArray[j].Type == "tank") { _local1[objectArray[j].Name].HoldFire(); } deadArray.push(objectArray[j].Name); _local2.push({name:objectArray[j].Name, detach:false, debNum:5}); } break; } j++; } if (hitFlag == true) { if (objectArray[i].Linkage != nonDestructableType) { objectArray[i].Beamed = 3; } else { objectArray[i].Beamed = 0; } if (objectArray[i].Linkage != nonDestructableType) { deadArray.push(objectArray[i].Name); _local2.push({name:objectArray[i].Name, detach:false, debNum:6}); } } } } } } } else if (objectArray[i].Beamed == 1) { if (_local1.beam.hitTest(_local1[objectArray[i].Name]) == eval("False")) { objectArray[i].Beamed = 0; objectArray[i].Timer = 1; } } i++; } var _local3 = 0; while (_local3 < _local2.length) { removeObject(_local2[_local3].name, _local2[_local3].detach, _local2[_local3].debNum); _local3++; } } function moveTargets() { var _local1 = _root; if (targetArray_Name.length != 0) { i = 0; while (i < targetArray_Name.length) { if (targetArray_Frames[i] == 0) { myX = _local1[targetArray_Target[i]]._x; myY = _local1[targetArray_Target[i]]._y; } else { myX = _local1[targetArray_Name[i]]._x + ((_local1[targetArray_Target[i]]._x - _local1[targetArray_Name[i]]._x) / targetArray_Frames[i]); myY = _local1[targetArray_Name[i]]._y + ((_local1[targetArray_Target[i]]._y - _local1[targetArray_Name[i]]._y) / targetArray_Frames[i]); targetArray_Frames[i]--; } _local1[targetArray_Name[i]]._x = myX; _local1[targetArray_Name[i]]._y = myY; i++; } } } function createTarget(myTarget) { var _local1 = _root; name = "unique" + identifierNumber; identifierNumber++; _local1.attachMovie("manTarget", name, z3); z3++; targetArray_Name.push(name); targetArray_Target.push(objectArray[myTarget].Name); targetArray_Frames.push(15); _local1[name]._x = 275; _local1[name]._y = -60; } function removeTarget(myTarget) { var _local1 = myTarget; var _local2 = _root; i = 0; while (i < targetArray_Name.length) { if (targetArray_Target[i] == objectArray[_local1].Name) { _local2[targetArray_Name[i]].removeMovieClip(); targetArray_Name.splice(i, 1); targetArray_Target.splice(i, 1); targetArray_Frames.splice(i, 1); } i++; } } function moveScene(d) { var _local1 = d; var _local2 = _root; if (((panAmount + _local1) > panLimitLeft) and ((panAmount + _local1) < panLimitRight)) { panAmount = panAmount + _local1; trees._x = trees._x + (_local1 * 1); bushes._x = bushes._x + (_local1 * 0.8); hills._x = hills._x + (_local1 * 0.4); boundingbox._x = boundingbox._x + (_local1 * 1); i = 0; while (i < objectArray.length) { if ((((objectArray[i].Beamed == 0) || (objectArray[i].Beamed == 3)) || (objectArray[i].Beamed == 2)) || (objectArray[i].Type == "agent")) { _local2[objectArray[i].Name]._x = _local2[objectArray[i].Name]._x + _local1; } i++; } var i = 0; while (i < heliArray.length) { if (heliArray[i].inFlight == true) { _local2[heliArray[i].name]._x = _local2[heliArray[i].name]._x + _local1; } i++; } i = 0; while (i < deadArray.length) { _local2[deadArray[i]]._x = _local2[deadArray[i]]._x + _local1; i++; } i = 0; while (i < bulletArray.length) { _local2[bulletArray[i]]._x = _local2[bulletArray[i]]._x + _local1; i++; } return(0); } return(1); } function runLevel() { var _local1 = _root; var _local2 = _global; if (buttonCoolDown == 0) { if (Key.isDown(80) || (Key.isDown(27))) { buttonCoolDown = 10; if (_local2.gamePaused == false) { _local1.paused.gotoAndPlay("show"); _local2.gamePaused = true; intPauseTime = getTimer(); } else { _local1.paused.gotoAndPlay("hide"); _local2.gamePaused = false; if (_local2.nextTime != -1) { _local2.nextTime = _local2.nextTime + (getTimer() - intPauseTime); } intPauseTime = 0; } } } else { buttonCoolDown--; } if (_local2.gamePaused == false) { if (deathCounter == -1) { if (Key.isDown(39) && (!Key.isDown(37))) { dx = dx + sensitivity; if (dx > terminalVelocity) { dx = terminalVelocity; } } if (Key.isDown(37) && (!Key.isDown(39))) { dx = dx - sensitivity; if (dx < (terminalVelocity * -1)) { dx = terminalVelocity * -1; } } if (Key.isDown(40) && (!Key.isDown(38))) { dy = dy + sensitivity; if (dy > terminalVelocity) { dy = terminalVelocity; } } if (Key.isDown(38) && (!Key.isDown(40))) { dy = dy - sensitivity; if (dy < (terminalVelocity * -1)) { dy = terminalVelocity * -1; } } } } if (Key.isDown(68)) { _local2.debug = true; _local1.debugStatus(); } else { _local2.debug = false; } if (Key.isDown(16) && (Key.isDown(49))) { _local1.prepareForFrameChange(true, 5); _local2.gamePaused = false; _local2.cheated = true; } if (Key.isDown(16) && (Key.isDown(50))) { _local1.prepareForFrameChange(true, 10); _local2.gamePaused = false; _local2.cheated = true; } if (Key.isDown(16) && (Key.isDown(51))) { _local1.prepareForFrameChange(true, 15); _local2.gamePaused = false; _local2.cheated = true; } if (Key.isDown(16) && (Key.isDown(52))) { _local1.prepareForFrameChange(true, 20); _local2.gamePaused = false; _local2.cheated = true; } if (Key.isDown(16) && (Key.isDown(53))) { _local1.prepareForFrameChange(true, 25); _local2.gamePaused = false; _local2.cheated = true; } if (Key.isDown(16) && (Key.isDown(54))) { _local1.prepareForFrameChange(true, 30); _local2.gamePaused = false; _local2.cheated = true; } if (Key.isDown(16) && (Key.isDown(55))) { _local1.prepareForFrameChange(true, 35); _local2.gamePaused = false; _local2.cheated = true; } if (Key.isDown(16) && (Key.isDown(56))) { _local1.prepareForFrameChange(true, 40); _local2.gamePaused = false; _local2.cheated = true; } if (Key.isDown(16) && (Key.isDown(57))) { _local1.prepareForFrameChange(true, 45); _local2.gamePaused = false; _local2.cheated = true; } if (Key.isDown(16) && (Key.isDown(48))) { _local1.prepareForFrameChange(true, 50); _local2.gamePaused = false; _local2.cheated = true; } if (_local2.gamePaused == false) { if ((!Key.isDown(37)) && (!Key.isDown(39))) { if (dx > 0) { dx = dx - airFriction; } if (dx < 0) { dx = dx + airFriction; } if ((dx >= -0.3) && (dx <= 0.3)) { dx = 0; } } if ((!Key.isDown(38)) && (!Key.isDown(40))) { if (dy > 0) { dy = dy - airFriction; } if (dy < 0) { dy = dy + airFriction; } if ((dy >= -0.3) && (dy <= 0.3)) { dy = 0; } } if (Key.isDown(32) && (energyFlag == 0)) { _local1.beam.gotoandstop(2); shipEnergy = shipEnergy - beamCost; if (shipEnergy < 0) { shipEnergy = 0; energyFlag = 1; } beamFlag = true; _local1.startBeamTags(); } else { beamFlag = false; _local1.beam.gotoandstop(1); shipEnergy = shipEnergy + rechargeRate; if (shipEnergy > totalEnergy) { shipEnergy = totalEnergy; energyFlag = 0; } _local1.removeBeamTags(); } _local1.beamMeUp(); _local1.updateEnergyBar(shipEnergy, totalEnergy, energyFlag); _local1.ship._x = _local1.ship._x + dx; _local1.ship._y = _local1.ship._y + dy; if (beamFlag == true) { _local1.beamHorizontalAndVertical(dx, dy); } if (_local2.shipUsed == 1) { _local1.ship.inside._rotation = dx * 2.5; } if (_local1.ship._x > 450) { _local1.ship._x = 450; } if (_local1.ship._x < 100) { _local1.ship._x = 100; } if (_local1.ship._y < 50) { _local1.ship._y = 50; dy = 0; } if (_local1.ship._y > 250) { _local1.ship._y = 250; dy = 0; } _local1.shadow._x = _local1.ship._x; _local1.beam._x = _local1.ship._x; _local1.beam._y = (_local1.ship._y + (_local1.ship._y / 8)) + 35; _local1.beam._xscale = 50 + ((_local1.ship._y / 2.5) / 2); _local1.beam._yscale = 50 + ((_local1.ship._y / 2.5) / 2); _local1.shadow._alpha = _local1.ship._y / 4; _local1.shadow._xscale = 300 - _local1.ship._y; _local1.shadow._yscale = 300 - _local1.ship._y; varFlag = 0; if ((_local1.ship._x <= 100) && (dx < 0)) { varFlag = _local1.moveScene(-1 * dx); } else if ((_local1.ship._x >= 450) && (dx > 0)) { varFlag = _local1.moveScene(-1 * dx); } if (varFlag == 1) { dx = 0; } _local1.runTimer(); _local1.TankGenerator(); _local1.ManageHelicopters(); _local1.spotship(); _local1.makePeopleMove(); _local1.DetectBulletHits(); _local1.updatePeopleBar(_local2.currentPeople, _local2.totalPeopleToGet); _local1.moveTargets(); if (deathCounter >= 0) { if (deathCounter == 0) { _local2.livesLeft--; _local1.updateLives(_local2.livesLeft); _local1.prepareForFrameChange(false, 0); if (_local2.livesLeft != 0) { var randSound = (Math.round(Math.random() * 5) + 1); } } else { deathCounter--; } } if (_local2.nextTime != -1) { _local1.updateTimer(); } } } stop(); myNextLevel = 10; _global.debug = false; nonDestructableType = "rock"; panLimitLeft = -300; panLimitRight = 300; panAmount = 0; oldValue = 0; numPeople = 0; maxPeople = 0; percentFrequency = 0; zArray = new Array(); zStack = new Array(); z3 = 10000; objectArray = new Array(); bulletArray = new Array(); deadArray = new Array(); targetArray_Name = new Array(); targetArray_Target = new Array(); targetArray_Frames = new Array(); availPeople = new Array(); myVolume = 100; mySong = "Nothing"; myZ1 = 0; myZ2 = 0; terminalVelocity = 8; sensitivity = 0.4; totalEnergy = 200; shipEnergy = 200; rechargeRate = 2; beamCost = 2; timeToBeat = 180; airFriction = 0.15; xFriction = 0.15; xGroundFriction = 0.4; gravity = 0.4; yTerminalVelocity = 15; energyFlag = 0; pickUpFlag = 0; dropSpeed = 0; groundLevel = _root.truck._y; truckFlag = 0; dx = 0; dy = 0; tankArray = new Array(); tankSpawnTimeMin = 0; tankSpawnTimeMax = 0; tankCounter = -1; blnUseTanks = false; tanksToUse = "green"; heliArray = new Array(); bulletDepth = 30000; _global.totalPeopleToGet = 5; identifierNumber = 5; var mySoundPlayer = new SoundPlayer(); buttonCoolDown = 0; intPauseTime = 0; deathCounter = -1; almostFlag = false;
Instance of Symbol 304 MovieClip in Frame 20
onClipEvent (load) { _root.initializeLevel(20, 25, -300, 300, "rock", 240, 15); _root.updateLives(_global.livesLeft); _root.setPeopleTimer(20, 4); _root.addPersonType("person1", "person", 25); _root.addPersonType("person2", "person", 25); _root.addPersonType("person3", "person", 25); _root.addPersonType("ethan", "person", 25); _root.addUnit("bonus2", 0, "BonusIcon", "object"); _root.addUnit("rock1", 0, "rock", "object"); _root.addUnit("rock3", 0, "rock", "object"); _root.addUnit("rock4", 0, "rock", "object"); _root.addUnit("rock5", 0, "rock", "object"); _root.addUnit("rock7", 0, "rock", "object"); _root.addHelicopter("heli 1", 40, 100, 6); _root.addHelicopter("heli 2", 60, 120, 6); _root.addHelicopter("heli 3", 60, 120, 6); _root.addHelicopter("heli 4", 40, 100, 6); _root.addHelicopter("heli 5", 80, 120, 6); _root.addHelicopter("heli 6", 80, 200, 6); levelTrack = "forest level"; _root.startMusicDownload(levelTrack); } onClipEvent (enterFrame) { _root.runLevel(); }
Instance of Symbol 657 MovieClip "volumeClip" in Frame 20
onClipEvent (load) { if (_global.volume == true) { volumeClip.goToAndPlay("volumeOn"); } else { volumeClip.goToAndPlay("volumeOff"); } } on (release) { if (_global.volume == true) { _global.volume = false; _root.volumeClip.nextFrame(); _root.toggleMusic(); } else { _global.volume = true; _root.volumeClip.prevFrame(); _root.toggleMusic(); } }
Frame 21
function setText() { r = random(10); switch (r) { case 0 : text = "Whoops!\nLose Something?"; return; case 1 : text = "Better try again!"; return; case 2 : text = "Not a good prober..."; return; case 3 : text = "There goes another life..."; return; case 4 : text = "Running out of chances..."; return; case 5 : text = "Had better be more careful..."; return; case 6 : text = "Enjoy TABLOIDS?"; return; case 7 : text = "Maybe they didn't see that..."; return; case 8 : text = "Wanna lose?"; return; case 9 : text = "Tip: Don't let agents spot you!"; } } stop();
Instance of Symbol 654 MovieClip in Frame 21
onClipEvent (load) { _global.aTimer = 45; r = random(10); _root.setText(); } onClipEvent (enterFrame) { if (_global.aTimer < 1) { _root.goToAndPlay(_global.tempFrame); } else { _global.aTimer--; } }
Frame 22
function setLevelText() { myNum = _global.tempFrame / 5; if (_global.tempFrame != 17) { _root.levelWords._alpha = 100; currentLevel = myNum; } else { currentLevel = "Ethan Egg"; _root.levelWords._alpha = 0; } } function turnDownSound() { _global.mySound.setVolume(tempVolume); tempVolume = tempVolume - 2; if (tempVolume < 0) { tempVolume = 0; } } stop(); tempVolume = 80;
Instance of Symbol 814 MovieClip "levelWords" in Frame 22
onClipEvent (load) { _root.setLevelText(); _global.aTimer = 45; } onClipEvent (enterFrame) { if (_global.aTimer < 1) { _root.goToAndPlay(_global.tempFrame); } else { _global.aTimer--; } _root.turnDownSound(); }
Frame 25
function initializeLevel(currentLevel, nextLevel, leftMax, rightMax, nonDestructable, timeToWin, peopleToGet) { var _local1 = _global; var _local2 = _root; identifierNumber = currentLevel; myNextLevel = nextLevel; panLimitLeft = leftMax; panLimitRight = rightMax; nonDestructableType = nonDestructable; timeToBeat = timeToWin; _local1.totalPeopleToGet = peopleToGet; if (_local1.tempLives < 0) { _local1.livesLeft = 3; } else { _local1.livesLeft = _local1.tempLives; } energyFlag = 0; pickUpFlag = 0; dropSpeed = 0; groundLevel = _local2.truck._y; truckFlag = 0; dx = 0; dy = 0; if (_local1.tempPeople < 0) { _local1.currentPeople = 0; } else { _local1.currentPeople = _local1.tempPeople; } _local1.tempPeople = 0; _local1.tempLives = 0; _local1.tempFrame = identifierNumber; if (timeToBeat == -1) { _local1.nextTime = -1; _local2.updateTimer(); } else { if ((_local1.nextTime == -1) && (timeToBeat != -1)) { _local1.nextTime = 0; } if (_local1.nextTime != -1) { if (_local1.stolenTime == 0) { _local1.nextTime = getTimer() + (timeToBeat * 1000); } else { _local1.nextTime = _local1.nextTime + (getTimer() - _local1.stolenTime); _local1.stolenTime = 0; } } } _local1.stolenTime = 0; if (_local1.shipUsed == 1) { _local2.ship.gotoAndStop("ship1"); } else { _local2.ship.gotoAndStop("ship2"); } } function addPersonType(myLinkage, myType, myWeight) { availPeople.push({linkage:myLinkage, type:myType, weight:myWeight}); } function playSound(soundName) { if (_global.volume == true) { mySoundPlayer.PlaySound(soundName); } } function startMusicDownload(music) { var _local1 = _global; if (_local1.musicOn == true) { _local1.mySound.stop(); _local1.mySound.attachSound(music); _local1.mySound.start(0, 99); _local1.mySound.setVolume(myVolume); } else { _root.volumeClip.gotoAndStop(2); _local1.mySound.stop(); } mySong = music; } function toggleMusic() { var _local1 = _global; if (_local1.volume == true) { _local1.mySound.attachSound(mySong); _local1.mySound.start(0, 99); _local1.mySound.setVolume(myVolume); _local1.musicOn = true; } else { _local1.mySound.stop(); _local1.mySound.setVolume(myVolume); _local1.musicOn = false; } } function updateTimer() { var _local1 = _global; if (_local1.nextTime == -1) { timeText = "NO LIMIT"; } else { myTime = _local1.nextTime - getTimer(); mySecs = math.floor(myTime / 1000); if (mySecs == 0) { _local1.livesLeft = 0; prepareForFrameChange(false, 0); } if (mySecs > 60) { someSeconds = myTime / 1000; someMinutes = someSeconds / 60; if (someSeconds > 59) { someSeconds = someSeconds - (Math.floor(someMinutes) * 60); } if (someSeconds < 10) { textMinutes = someMinutes; timeText = (Math.floor(textMinutes) + ":0") + Math.floor(someSeconds); } else if (someSeconds == 0) { textMinutes = someMinutes; timeText = Math.floor(textMinutes) + ":00"; } else { textMinutes = someMinutes; timeText = (Math.floor(textMinutes) + ":") + Math.floor(someSeconds); } } else { timeText = Math.floor(mySecs); } } } function updateLives(lifeNum) { var _local1 = lifeNum; if (_local1 < 0) { _local1 = 0; } lives = _local1; } function prepareForFrameChange(newLevel, levelNum) { var _local1 = _global; var _local2 = _root; _local1.tempLives = _local1.livesLeft; _local1.tempPeople = _local1.currentPeople; cleanScreen(); if ((_local1.livesLeft > 0) && (newLevel == false)) { _local1.stolenTime = getTimer(); _local2.goToAndPlay("loseLife"); } else if ((_local1.livesLeft > 0) && (newLevel == true)) { _local1.tempPeople = -1; _local1.tempFrame = levelNum; _local2.goToAndPlay("levelText"); } else if (_local1.livesLeft == 0) { _local2.goToAndPlay("endGame"); } } function cleanScreen() { var _local1 = _root; i = 0; while (i < objectArray.length) { _local1[objectArray[i].Name].removeMovieClip(); i++; } i = 0; while (i < deadArray.length) { _local1[deadArray[i]].removeMovieClip(); i++; } i = 0; while (i < targetArray_Name.length) { _local1[targetArray_Name[i]].removeMovieClip(); i++; } i = 0; while (i < bulletArray.length) { _local1[bulletArray[i]].removeMovieClip(); i++; } } function setPeopleTimer(mPeople, pFrequency) { var _local1 = _root; myZ2 = Math.round(_local1.z2._y); myZ1 = Math.round(_local1.z1._y); _local1.z1._y = -50; _local1.z2._y = -50; i = myZ1; while (i < myZ2) { zArray.push(i); zStack.push(1); i++; } percentFrequency = pFrequency; maxPeople = mPeople; } function runTimer() { if (numPeople != maxPeople) { if (random(255) < percentFrequency) { numPeople++; addPersonDynamic(false); } } } function rangeInUse(minZ, maxZ) { var _local2 = maxZ; var _local3 = minZ; var _local1 = false; i = 0; while (i < objectArray.length) { if ((objectArray[i].ZStack >= _local3) && (objectArray[i].ZStack <= _local2)) { _local1 = true; } i++; } return(_local1); } function startBeamTags() { var _local1 = _root; i = 0; while (i < objectArray.length) { if (_local1.beam.hitTest(_local1[objectArray[i].Name]) == true) { if (objectArray[i].Beamed == 0) { _local1[objectArray[i].Name].goToAndPlay("beamed"); objectArray[i].Beamed = 1; objectArray[i].Dy = 0; if (objectArray[i].Type == "tank") { _local1[objectArray[i].Name].HoldFire(); } } if (objectArray[i].Beamed == 2) { _local1[objectArray[i].Name].goToAndStop("endbeam"); objectArray[i].Beamed = 1; objectArray[i].Dy = 0; } } i++; } } function debugStatus() { trace("Name type beamed timer"); trace("----------------------------------------"); i = 0; while (i < objectArray.length) { trace((((((((((objectArray[i].Name + " ") + objectArray[i].Type) + " ") + objectArray[i].Beamed) + " ") + objectArray[i].Timer) + " ") + objectArray[i].Spotted) + " ") + objectArray[i].Direction); i++; } trace("----------------------------------------"); } function removeBeamTags() { var _local1 = _root; i = 0; while (i < objectArray.length) { if ((objectArray[i].Beamed == 1) && (objectArray[i].Type != "agent")) { objectArray[i].Beamed = 2; objectArray[i].FallHeight = _local1[objectArray[i].Name]._y; } else if ((objectArray[i].Beamed == 1) && (objectArray[i].Type == "agent")) { objectArray[i].Beamed = 0; objectArray[i].Timer = 1; } i++; } } function addUnit(name, newSpeed, myLinkage, givenType) { var _local1 = _root; var _local2 = name; var _local3 = newSpeed; tempX = _local1[_local2]._x; tempY = _local1[_local2]._y; wantY = Math.round(tempY); flag = -1; myZStack = -1; i = 0; while (i < zArray.length) { if (zArray[i] == wantY) { flag = i; myZstack = zStack[i]; } i++; } if (flag != -1) { zArray.splice(flag, 1); zStack.splice(flag, 1); } _local1[_local2]._visible = false; _local2 = givenType + identifierNumber; identifierNumber++; _local1.attachMovie(myLinkage, _local2, wantY * 100); if (givenType == "tank") { _local1[_local2].SetFireRate(40); tankArray.push({track:wantY, occupied:true, tank:_local2}); } _local1[_local2]._x = tempX; _local1[_local2]._y = tempY; x = 275; if ((_local1[_local2]._x <= x) && (_local3 != 0)) { dir = _local3; _local1[_local2]._xscale = -Math.abs(_local1[_local2]._xscale); if (myLinkage == "antiAir") { _local1[_local2]._xscale = _local1[_local2]._xscale * -1; } } else { dir = -1 * _local3; } var groundLevel = Math.round(_local1[_local2]._y + (_local1[_local2]._height / 2)); objectArray.push({Name:_local2, Beamed:0, Type:givenType, Ground:groundLevel, Dx:0, Dy:0, Timer:0, Spotted:0, Linkage:myLinkage, ZStack:myZStack, Direction:dir, FallHeight:0}); return(_local2); } function generateEthan() { addPersonDynamic(true); } function addPersonDynamic(isEthan) { if (zArray.length == 0) { return(null); } if (isEthan == false) { r = random(2); switch (r) { case 0 : var _local3 = 0; var _local2 = -1; var _local1 = 0; while (_local1 < availPeople.length) { _local3 = _local3 + availPeople[_local1].weight; _local1++; } var chosenWeight = Math.round(Math.random() * _local3); _local1 = 0; while (_local1 < availPeople.length) { if ((chosenWeight > _local2) && (chosenWeight <= (_local2 + availPeople[_local1].weight))) { myGuy = availPeople[_local1].linkage; myType = availPeople[_local1].type; break; } _local2 = _local2 + availPeople[_local1].weight; _local1++; } break; case 1 : myGuy = "MIB"; myType = "agent"; } } else { myGuy = "ethan"; myType = "person"; } r = random(zArray.length); z = zArray[r]; zs = zStack[r]; zArray.splice(r, 1); zStack.splice(r, 1); name = "unique" + identifierNumber; identifierNumber++; _root.attachMovie(myGuy, name, z * 100); r = random(2); if (r == 0) { x = _root.boundingbox._x + (_root.boundingbox._width / 2); } else { x = _root.boundingbox._x - (_root.boundingbox._width / 2); } _root[name]._x = x; _root[name]._y = z; x = _root.hills._x; if (_root[name]._x <= x) { dir = 1; if (myType == "agent") { _root[name]._xscale = -Math.abs(_root[name]._xscale); } } else { dir = -1; if (myType != "agent") { _root[name]._xscale = -Math.abs(_root[name]._xscale); } } _root[name].goToAndPlay("walk"); objectArray.push({Name:name, Beamed:0, Type:myType, Ground:z, Dx:0, Dy:0, Timer:0, Spotted:0, Linkage:myGuy, ZStack:zs, Direction:dir, FallHeight:0}); return(undefined); } function addTank(name, newSpeed, myLinkage, myTrack) { var _local1 = _root; var _local3 = myTrack; var _local2 = "tank"; if (tanksToUse == "red") { _local2 = "redTank"; } if (tanksToUse == "white") { _local2 = "whiteTank"; } _local1.attachMovie(_local2, name, _local3 * 100); r = random(2); if (r == 0) { x = _local1.boundingbox._x + (_local1.boundingbox._width / 2); } else { x = _local1.boundingbox._x - (_local1.boundingbox._width / 2); } _local1[name]._x = x; if (tanksToUse == "red") { _local1[name].SetFireRate(15); } else if (tanksToUse == "white") { _local1[name].SetFireRate(25); } else { _local1[name].SetFireRate(40); } _local1[name]._y = _local3; x = _local1.hills._x; if (_local1[name]._x <= x) { dir = 1; _local1[name]._xscale = _local1[name]._xscale * -1; } else { dir = -1; } _local1[name].goToAndPlay("idle"); objectArray.push({Name:name, Beamed:0, Type:"tank", Ground:_local3, Dx:0, Dy:0, Timer:0, Spotted:0, Linkage:"tank", ZStack:999999, Direction:dir, FallHeight:0}); } function makePeopleMove() { var _local1 = _root; var _local3 = _global; var queueRemoval = new Array(); i = 0; while (i < objectArray.length) { if (objectArray[i].Beamed == 0) { if (objectArray[i].Timer == 1) { if (_local3.debug == true) { trace(i); } if (_local1[objectArray[i].Name]._x < _local1.ship._x) { objectArray[i].Direction = -3; if (objectArray[i].Type == "person") { _local1[objectArray[i].Name]._xscale = -Math.abs(_local1[objectArray[i].Name]._xscale); } else if (objectArray[i].Type == "agent") { _local1[objectArray[i].Name]._xscale = Math.abs(_local1[objectArray[i].Name]._xscale); if (objectArray[i].Spotted == 0) { createTarget(i); objectArray[i].Spotted = 1; } } } else { objectArray[i].Direction = 3; if (objectArray[i].Type == "person") { _local1[objectArray[i].Name]._xscale = Math.abs(_local1[objectArray[i].Name]._xscale); } else if (objectArray[i].Type == "agent") { _local1[objectArray[i].Name]._xscale = -Math.abs(_local1[objectArray[i].Name]._xscale); if (objectArray[i].Spotted == 0) { createTarget(i); objectArray[i].Spotted = 1; } } } _local1[objectArray[i].Name].gotoandplay("run"); } if (objectArray[i].Timer > 0) { objectArray[i].Timer--; } _local1[objectArray[i].Name]._x = _local1[objectArray[i].Name]._x + objectArray[i].Direction; if ((_local1[objectArray[i].Name]._x < (_local1.boundingbox._x - (_local1.boundingbox._width / 2))) && (objectArray[i].Direction < 0)) { if (objectArray[i].Spotted == 1) { _local3.livesLeft--; _local1.updateLives(_local3.livesLeft); _local1.prepareForFrameChange(false, 0); if (_local3.livesLeft != 0) { var randSound = (Math.round(Math.random() * 5) + 1); } } if (objectArray[i].Type == "tank") { OpenTrack(objectArray[i].Name); } queueRemoval.push({name:objectArray[i].Name, detach:true, debNum:1}); } else if ((_local1[objectArray[i].Name]._x > (_local1.boundingbox._x + (_local1.boundingbox._width / 2))) && (objectArray[i].Direction > 0)) { if (objectArray[i].Spotted == 1) { _local3.livesLeft--; _local1.updateLives(_local3.livesLeft); _local1.prepareForFrameChange(false, 0); if (_local3.livesLeft != 0) { var randSound = (Math.round(Math.random() * 5) + 1); } } if (objectArray[i].Type == "tank") { OpenTrack(objectArray[i].Name); } queueRemoval.push({name:objectArray[i].Name, detach:true, debNum:2}); } } i++; } var _local2 = 0; while (_local2 < queueRemoval.length) { removeObject(queueRemoval[_local2].name, queueRemoval[_local2].detach, queueRemoval[_local2].debNum); _local2++; } tanksAim(); } function removeObject(objectName, removeFromScreen, debugNum) { var _local2 = removeFromScreen; var _local3 = _root; i = -1; var _local1 = 0; while (_local1 < objectArray.length) { if (objectArray[_local1].Name == objectName) { i = _local1; if (objectArray[_local1].Type != "tank") { zArray.push(objectArray[_local1].Ground); zStack.push(objectArray[_local1].ZStack); } if ((objectArray[_local1].Type != "object") && (objectArray[_local1].Type != "tank")) { numPeople--; } if (objectArray[_local1].Spotted == 1) { removeTarget(i); } if (_local2) { _local3[objectArray[_local1].Name].removeMovieClip(); } objectArray.splice(_local1, 1); return; } _local1++; } } function updateEnergyBar(current, total, flag) { var _local1 = _root; frac = current / total; _local1.energy._xscale = frac * 100; if (flag == 1) { _local1.energy.goToAndStop(2); } else { _local1.energy.goToAndStop(1); } } function updatePeopleBar(current, total) { var _local1 = current; var _local2 = total; var _local3 = _root; frac = _local1 / _local2; _local3.peopleToGo._xscale = frac * 100; myFrame = 10; frac = (_local1 / _local2) * 100; if (frac < 10) { myFrame = 1; } else if ((frac >= 10) && (frac < 20)) { myFrame = 2; } else if ((frac >= 20) && (frac < 30)) { myFrame = 3; } else if ((frac >= 30) && (frac < 40)) { myFrame = 4; } else if ((frac >= 40) && (frac < 50)) { myFrame = 5; } else if ((frac >= 50) && (frac < 60)) { myFrame = 6; } else if ((frac >= 60) && (frac < 70)) { myFrame = 7; } else if ((frac >= 70) && (frac < 80)) { myFrame = 8; } else if ((frac >= 80) && (frac < 90)) { myFrame = 9; } else if ((frac >= 90) && (frac <= 100)) { myFrame = 10; } if (oldValue != myFrame) { _local3.peopleToGo.goToAndStop(myFrame); } oldValue = myFrame; if ((_local1 == (_local2 - 2)) && (almostFlag == false)) { var randSound = (Math.round(Math.random() * 4) + 1); _local3.playSound("good" + randSound); almostFlag = true; } if (_local1 == _local2) { prepareForFrameChange(true, myNextLevel); } } function spotship() { var _local1 = _root; i = 0; while (i < objectArray.length) { if (((objectArray[i].Beamed == 0) && ((objectArray[i].Type == "person") || (objectArray[i].Type == "agent"))) && ((objectArray[i].Direction == 1) || (objectArray[i].Direction == -1))) { myDist = getDistance(i); if (myDist <= 175) { if (((objectArray[i].Direction == 1) && (_local1[objectArray[i].Name]._x < _local1.ship._x)) && (_local1[objectArray[i].Name]._x >= 50)) { _local1[objectArray[i].Name].gotoandplay("spot"); objectArray[i].Direction = 0; objectArray[i].Timer = 30; } else if (((objectArray[i].Direction == -1) && (_local1[objectArray[i].Name]._x > _local1.ship._x)) && (_local1[objectArray[i].Name]._x <= 500)) { _local1[objectArray[i].Name].gotoandplay("spot"); objectArray[i].Direction = 0; objectArray[i].Timer = 30; } } } i++; } } function tanksAim() { var _local3 = _root; var _local2 = 0; while (_local2 < objectArray.length) { if ((objectArray[_local2].Beamed == 0) && (objectArray[_local2].Type == "tank")) { var tankName = objectArray[_local2].Name; var point = {x:_local3[tankName].cannon._x, y:_local3[tankName].cannon._y}; _local3[tankName].localToGlobal(point); var op = (_local3.ship._y - point.y); var adj = (_local3.ship._x - point.x); if (adj == 0) { adj = 1; } var _local1 = (Math.atan(op / adj) * 180) / Math.PI; if (_local1 < 0) { _local1 = _local1 * -1; } if (_local1 > 90) { _local1 = 90; } if (_local1 < 20) { _local1 = 20; } _local3[tankName].cannon._rotation = _local1; } _local2++; } } function StartTankGenerator(min, max, color) { tanksToUse = color; blnUseTanks = true; tankSpawnTimeMin = min; tankSpawnTimeMax = max; tankCounter = Math.round(Math.random() * (tankSpawnTimeMax - tankSpawnTimeMin)) + tankSpawnTimeMin; } function TankGenerator() { if (blnUseTanks == true) { intAvailFlag = -1; var _local1 = 0; while (_local1 < tankArray.length) { if (tankArray[_local1].occupied == false) { intAvailFlag = _local1; break; } _local1++; } if (intAvailFlag != -1) { if (tankCounter == 0) { var _local2 = "tank" + identifierNumber; identifierNumber++; tankArray[intAvailFlag].occupied = true; tankArray[intAvailFlag].tank = _local2; addTank(_local2, 3, "tank", tankArray[intAvailFlag].track); tankCounter = Math.round(Math.random() * (tankSpawnTimeMax - tankSpawnTimeMin)) + tankSpawnTimeMin; } else { tankCounter--; } } } } function OpenTrack(tankName) { var _local2 = tankName; var _local1 = 0; while (_local1 < tankArray.length) { if (tankArray[_local1].tank == _local2) { tankArray[_local1].tank = ""; tankArray[_local1].occupied = false; trace(("track " + _local1) + " is open"); } _local1++; } } function LaunchBullet(bulletName, startX, startY, directionX, directionY) { var _local1 = bulletName; var _local3 = _root; var _local2 = ""; if ((substring(_local1, 0, 18)) == "bullet_helicopter_") { _local2 = "bullet air"; } else { _local2 = "bullet ground"; } _local3.attachMovie(_local2, _local1, bulletDepth); _local3[_local1]._x = startX; _local3[_local1]._y = startY; _local3[_local1].SetMovement(directionX, directionY); bulletArray.push(_local1); bulletDepth++; } function DetectBulletHits() { var _local1 = _root; var _local3 = new Array(); var _local2 = 0; while (_local2 < bulletArray.length) { distancex = _local1[bulletArray[_local2]]._x - _local1.ship._x; distancey = _local1[bulletArray[_local2]]._y - _local1.ship._y; if (Math.sqrt((distancex * distancex) + (distancey * distancey)) <= 19) { if ((substring(bulletArray[_local2], 0, 18)) == "bullet_helicopter_") { shipEnergy = 0; energyFlag = 1; _local1.ship.explosion.gotoAndPlay("shock"); _local3.push(bulletArray[_local2]); } else { _local1.ship.explosion.gotoAndPlay("explode"); _local1.playSound("explosion"); if (deathCounter == -1) { deathCounter = 16; } _local3.push(bulletArray[_local2]); } } _local2++; } _local2 = 0; while (_local2 < _local3.length) { RemoveBullet(_local3[_local2]); _local2++; } } function ObjectCleanup(itemName) { var _local1 = itemName; if (_local1.substr(0, 4) == "tank") { OpenTrack(_local1); } _root[_local1].removeMovieClip(); } function RemoveBullet(itemName) { var _local3 = itemName; var _local2 = -1; var _local1 = 0; while (_local1 < bulletArray.length) { if (bulletArray[_local1] == _local3) { _local2 = _local1; break; } _local1++; } if (_local2 != -1) { bulletArray.splice(_local2, 1); _root[_local3].removeMovieClip(); } } function addHelicopter(itemName, minSpawn, maxSpawn, mySpeed) { var _local1 = minSpawn; var _local2 = Math.round(Math.random() * (maxSpawn - _local1)) + _local1; heliArray.push({name:itemName, min:_local1, max:maxSpawn, counter:_local2, speed:mySpeed, inFlight:false, hasFired:false, isFiring:false}); } function ManageHelicopters() { var _local2 = _root; var _local1 = 0; while (_local1 < heliArray.length) { if (heliArray[_local1].inFlight == false) { if (heliArray[_local1].counter == 0) { heliArray[_local1].inFlight = true; _local2[heliArray[_local1].name]._x; r = random(2); if (r == 0) { x = _local2.boundingbox._x + (_local2.boundingbox._width / 2); _local2[heliArray[_local1].name]._xscale = 100; heliArray[_local1].speed = -Math.abs(heliArray[_local1].speed); } else { x = (_local2.boundingbox._x - (_local2.boundingbox._width / 2)) - _local2[heliArray[_local1].name]._width; _local2[heliArray[_local1].name]._xscale = -100; heliArray[_local1].speed = Math.abs(heliArray[_local1].speed); } _local2[heliArray[_local1].name]._x = x; var y = (Math.round(Math.random() * 151) + 53); _local2[heliArray[_local1].name]._y = y; } else { heliArray[_local1].counter--; } } else { if (heliArray[_local1].isFiring == false) { _local2[heliArray[_local1].name]._x = _local2[heliArray[_local1].name]._x + heliArray[_local1].speed; } if ((heliArray[_local1].hasFired == false) && (heliArray[_local1].isFiring == false)) { if (((_local2[heliArray[_local1].name]._x - _local2[heliArray[_local1].name]._width) > 0) && ((_local2[heliArray[_local1].name]._x + _local2[heliArray[_local1].name]._width) < Stage.width)) { _local2[heliArray[_local1].name].gotoAndPlay("shoot"); heliArray[_local1].isFiring = true; trace(heliArray[_local1].name + " has fired"); } } if (heliArray[_local1].hasFired == true) { if (((_local2[heliArray[_local1].name]._x + _local2[heliArray[_local1].name]._width) < (_local2.boundingbox._x - (_local2.boundingbox._width / 2))) || ((_local2[heliArray[_local1].name]._x - _local2[heliArray[_local1].name]._width) > (_local2.boundingbox._x + (_local2.boundingbox._width / 2)))) { trace("out of bounds"); heliArray[_local1].inFlight = false; var _local3 = Math.round(Math.random() * (heliArray[_local1].max - heliArray[_local1].min)) + heliArray[_local1].min; heliArray[_local1].counter = _local3; heliArray[_local1].hasFired = false; heliArray[_local1].isFiring = false; } } } _local1++; } } function HelicopterFire(name) { var _local3 = name; var _local2 = 0; var _local1 = 0; while (_local1 < heliArray.length) { if (heliArray[_local1].name == _local3) { _local2 = _local1; break; } _local1++; } var myName = ("bullet_helicopter_" + identifierNumber); identifierNumber++; var point = {x:_root[_local3].emitter1._x, y:_root[_local3].emitter1._y}; _root[_local3].localToGlobal(point); var bulletSpeed = 0; trace("helicopter speed is: " + heliArray[_local2].speed); if (heliArray[_local2].speed > 0) { bulletSpeed = heliArray[_local2].speed + 2; } else { bulletSpeed = heliArray[_local2].speed - 2; } LaunchBullet(myName, point.x, point.Y, bulletSpeed, 0); } function HelicopterDoneFiring(name) { var _local2 = name; var _local1 = 0; while (_local1 < heliArray.length) { if (heliArray[_local1].name == _local2) { heliArray[_local1].isFiring = false; heliArray[_local1].hasFired = true; return; } _local1++; } } function getDistance(i) { var _local1 = _root; distancex = _local1[objectArray[i].Name]._x - _local1.ship._x; distancey = _local1[objectArray[i].Name]._y - _local1.ship._y; return(Math.sqrt((distancex * distancex) + (distancey * distancey))); } function beamHorizontalAndVertical(asscheese, assY) { var _local1 = _root; var _local2 = asscheese; var _local3 = assY; i = 0; while (i < objectArray.length) { if ((objectArray[i].Beamed == 1) && (objectArray[i].Type != "agent")) { objectArray[i].Dx = _local2; if ((_local1.ship._x > 100) && (_local1.ship._X < 450)) { _local1[objectArray[i].Name]._x = _local1[objectArray[i].Name]._x + _local2; } if ((_local1.ship._y > 50) && (_local1.ship._y < 250)) { _local1[objectArray[i].Name]._y = _local1[objectArray[i].Name]._y + _local3; if (_local1[objectArray[i].Name]._y > objectArray[i].Ground) { _local1[objectArray[i].Name]._y = objectArray[i].Ground; } } } i++; } } function beamMeUp() { var _local1 = _root; var _local2 = new Array(); i = 0; while (i < objectArray.length) { if (objectArray[i].Type != "agent") { if (objectArray[i].Beamed == 1) { if (((objectArray[i].Type == "object") || (objectArray[i].Type == "tank")) && (objectArray[i].Linkage != "BonusIcon")) { maxheight = (_local1.ship._y + (_local1.ship._height / 2)) + (_local1[objectArray[i].Name]._height / 2); if (_local1[objectArray[i].Name]._y > maxheight) { _local1[objectArray[i].Name]._y = _local1[objectArray[i].Name]._y - 2; } } else if (_local1[objectArray[i].Name]._y > _local1.ship._y) { _local1[objectArray[i].Name]._y = _local1[objectArray[i].Name]._y - 2; } else if (objectArray[i].Beamed == 1) { _local1[objectArray[i].Name]._y = -20; objectArray[i].Beamed = 2; _local2.push({name:objectArray[i].Name, detach:true, debNum:4}); if (objectArray[i].Linkage != "BonusIcon") { if ((objectArray[i].Linkage != "person2") && (objectArray[i].Linkage != "person5")) { var scream = Math.round(Math.random() * 8); trace(scream); if (scream == 4) { playSound("maleEnjoy"); } else { playSound("maleScream"); } } else { playSound("maleScream"); } var scream = Math.round(Math.random() * 12); if (scream == 8) { var randSound = (Math.round(Math.random() * 3) + 1); _local1.playSound("rand" + randSound); } _global.currentPeople++; _global.totalPeople++; _local1.display._x = _local1.ship._x; _local1.display._y = _local1.ship._y; _local1.display.goToAndPlay("people"); } else { playSound("bonusSound"); _global.bonusPoints++; _local1.display._x = _local1.ship._x; _local1.display._y = _local1.ship._y; _local1.display.goToAndPlay("points"); } } if (_local1[objectArray[i].Name]._x < _local1.ship._x) { _local1[objectArray[i].Name]._x = _local1[objectArray[i].Name]._x + 1; if (_local1[objectArray[i].Name]._x >= _local1.ship._x) { _local1[objectArray[i].Name]._x = _local1.ship._x; } } if (_local1[objectArray[i].Name]._x > _local1.ship._x) { _local1[objectArray[i].Name]._x = _local1[objectArray[i].Name]._x - 1; if (_local1[objectArray[i].Name]._x <= _local1.ship._x) { _local1[objectArray[i].Name]._x = _local1.ship._x; } } } else { if (objectArray[i].Beamed == 2) { _local1[objectArray[i].Name].goToAndPlay("falling"); } if ((_local1[objectArray[i].Name]._y + (_local1[objectArray[i].Name]._height / 2)) == objectArray[i].Ground) { } else if (_local1[objectArray[i].Name]._y > 0) { _local1[objectArray[i].Name]._y = _local1[objectArray[i].Name]._y + objectArray[i].Dy; objectArray[i].Dy = objectArray[i].Dy + gravity; if (objectArray[i].Dy > yTerminalVelocity) { objectArray[i].Dy = yTerminalVelocity; } _local1[objectArray[i].Name]._x = _local1[objectArray[i].Name]._x + objectArray[i].Dx; if ((_local1[objectArray[i].Name]._y + (_local1[objectArray[i].Name]._height / 2)) >= objectArray[i].Ground) { useFriction = xGroundFriction; } else { useFriction = xFriction; } if ((objectArray[i].Dx >= -0.4) && (objectArray[i].Dx <= 0.4)) { objectArray[i].Dx = 0; } if (objectArray[i].Dx < 0) { objectArray[i].Dx = objectArray[i].Dx + useFriction; } if (objectArray[i].Dx > 0) { objectArray[i].Dx = objectArray[i].Dx - useFriction; } if ((_local1[objectArray[i].Name]._y + (_local1[objectArray[i].Name]._height / 2)) >= objectArray[i].Ground) { if (objectArray[i].Beamed == 2) { if ((objectArray[i].Ground - objectArray[i].FallHeight) < 20) { if (objectArray[i].Type == "tank") { _local1[objectArray[i].Name].gotoAndPlay("idle"); } else if (objectArray[i].Type == "person") { _local1[objectArray[i].Name].gotoAndPlay("run"); objectArray[i].Timer = 1; } if (objectArray[i].Type == "tank") { _local1[objectArray[i].Name].OpenFire(); } root[objectArray[i].Name]._y = objectArray[i].Ground; objectArray[i].Beamed = 0; } else { _local1[objectArray[i].Name].gotoAndPlay("collision"); _local1[objectArray[i].Name]._y = objectArray[i].Ground; if (objectArray[i].Linkage != nonDestructableType) { objectArray[i].Beamed = 3; } else { objectArray[i].Beamed = 0; } j = 0; while (j < objectArray.length) { if ((objectArray[j].Beamed == 0) && (_local1[objectArray[i].Name].hitTest(_local1[objectArray[j].Name]) == true)) { if (((objectArray[j].Type == "tank") && (objectArray[i].Type != "tank")) && ((objectArray[j].Type == "tank") && (objectArray[i].Type != "object"))) { } else { objectArray[j].Direction = 0; tempY = _local1[objectArray[j].Name]._y - (_local1[objectArray[i].Name].height / 100); howFar = objectArray[j].ZStack; objectArray[j].ZStack++; _local1[objectArray[i].Name].swapDepths((objectArray[j].Ground * 100) + howFar); _local1[objectArray[i].Name]._y = tempY; } if ((((objectArray[j].Type == "agent") || (objectArray[j].Type == "person")) || ((objectArray[j].Type == "tank") && (objectArray[i].Type == "tank"))) && (objectArray[j].Linkage != nonDestructableType)) { _local1[objectArray[j].Name].goToAndPlay("collision"); if (objectArray[j].Type == "tank") { _local1[objectArray[j].Name].HoldFire(); } deadArray.push(objectArray[j].Name); _local2.push({name:objectArray[j].Name, detach:false, debNum:5}); } } j++; } if (objectArray[i].Linkage != nonDestructableType) { deadArray.push(objectArray[i].Name); _local2.push({name:objectArray[i].Name, detach:false, debNum:6}); } } } objectArray[i].Dy = 0; } else if (objectArray[i].Beamed == 2) { hitFlag = false; if ((objectArray[i].Ground - objectArray[i].FallHeight) >= 20) { j = 0; while (j < objectArray.length) { if ((objectArray[j].Beamed == 0) && (_local1[objectArray[i].Name].hitTest(_local1[objectArray[j].Name]) == true)) { if (((objectArray[j].Type == "tank") && (objectArray[i].Type != "tank")) && ((objectArray[j].Type == "tank") && (objectArray[i].Type != "object"))) { } else { hitFlag = true; _local1[objectArray[i].Name].goToAndPlay("collision"); objectArray[j].Direction = 0; tempY = _local1[objectArray[j].Name]._y - _local1[objectArray[i].Name].height; howFar = objectArray[j].ZStack; objectArray[j].ZStack++; _local1[objectArray[i].Name].swapDepths((objectArray[j].Ground * 100) + howFar); _local1[objectArray[i].Name]._y = tempY; objectArray[i].Dy = 0; } if ((((((objectArray[j].Type == "agent") || (objectArray[j].Type == "person")) || (objectArray[j].Linkage == "bear")) || ((objectArray[j].Type == "tank") && (objectArray[i].Type == "tank"))) || ((objectArray[j].Type == "tank") && (objectArray[i].Type == "object"))) && (objectArray[j].Linkage != nonDestructableType)) { _local1[objectArray[j].Name].goToAndPlay("collision"); if (objectArray[j].Type == "tank") { _local1[objectArray[j].Name].HoldFire(); } deadArray.push(objectArray[j].Name); _local2.push({name:objectArray[j].Name, detach:false, debNum:5}); } break; } j++; } if (hitFlag == true) { if (objectArray[i].Linkage != nonDestructableType) { objectArray[i].Beamed = 3; } else { objectArray[i].Beamed = 0; } if (objectArray[i].Linkage != nonDestructableType) { deadArray.push(objectArray[i].Name); _local2.push({name:objectArray[i].Name, detach:false, debNum:6}); } } } } } } } else if (objectArray[i].Beamed == 1) { if (_local1.beam.hitTest(_local1[objectArray[i].Name]) == eval("False")) { objectArray[i].Beamed = 0; objectArray[i].Timer = 1; } } i++; } var _local3 = 0; while (_local3 < _local2.length) { removeObject(_local2[_local3].name, _local2[_local3].detach, _local2[_local3].debNum); _local3++; } } function moveTargets() { var _local1 = _root; if (targetArray_Name.length != 0) { i = 0; while (i < targetArray_Name.length) { if (targetArray_Frames[i] == 0) { myX = _local1[targetArray_Target[i]]._x; myY = _local1[targetArray_Target[i]]._y; } else { myX = _local1[targetArray_Name[i]]._x + ((_local1[targetArray_Target[i]]._x - _local1[targetArray_Name[i]]._x) / targetArray_Frames[i]); myY = _local1[targetArray_Name[i]]._y + ((_local1[targetArray_Target[i]]._y - _local1[targetArray_Name[i]]._y) / targetArray_Frames[i]); targetArray_Frames[i]--; } _local1[targetArray_Name[i]]._x = myX; _local1[targetArray_Name[i]]._y = myY; i++; } } } function createTarget(myTarget) { var _local1 = _root; name = "unique" + identifierNumber; identifierNumber++; _local1.attachMovie("manTarget", name, z3); z3++; targetArray_Name.push(name); targetArray_Target.push(objectArray[myTarget].Name); targetArray_Frames.push(15); _local1[name]._x = 275; _local1[name]._y = -60; } function removeTarget(myTarget) { var _local1 = myTarget; var _local2 = _root; i = 0; while (i < targetArray_Name.length) { if (targetArray_Target[i] == objectArray[_local1].Name) { _local2[targetArray_Name[i]].removeMovieClip(); targetArray_Name.splice(i, 1); targetArray_Target.splice(i, 1); targetArray_Frames.splice(i, 1); } i++; } } function moveScene(d) { var _local1 = d; var _local2 = _root; if (((panAmount + _local1) > panLimitLeft) and ((panAmount + _local1) < panLimitRight)) { panAmount = panAmount + _local1; trees._x = trees._x + (_local1 * 1); bushes._x = bushes._x + (_local1 * 0.8); hills._x = hills._x + (_local1 * 0.4); boundingbox._x = boundingbox._x + (_local1 * 1); i = 0; while (i < objectArray.length) { if ((((objectArray[i].Beamed == 0) || (objectArray[i].Beamed == 3)) || (objectArray[i].Beamed == 2)) || (objectArray[i].Type == "agent")) { _local2[objectArray[i].Name]._x = _local2[objectArray[i].Name]._x + _local1; } i++; } var i = 0; while (i < heliArray.length) { if (heliArray[i].inFlight == true) { _local2[heliArray[i].name]._x = _local2[heliArray[i].name]._x + _local1; } i++; } i = 0; while (i < deadArray.length) { _local2[deadArray[i]]._x = _local2[deadArray[i]]._x + _local1; i++; } i = 0; while (i < bulletArray.length) { _local2[bulletArray[i]]._x = _local2[bulletArray[i]]._x + _local1; i++; } return(0); } return(1); } function runLevel() { var _local1 = _root; var _local2 = _global; if (buttonCoolDown == 0) { if (Key.isDown(80) || (Key.isDown(27))) { buttonCoolDown = 10; if (_local2.gamePaused == false) { _local1.paused.gotoAndPlay("show"); _local2.gamePaused = true; intPauseTime = getTimer(); } else { _local1.paused.gotoAndPlay("hide"); _local2.gamePaused = false; if (_local2.nextTime != -1) { _local2.nextTime = _local2.nextTime + (getTimer() - intPauseTime); } intPauseTime = 0; } } } else { buttonCoolDown--; } if (_local2.gamePaused == false) { if (deathCounter == -1) { if (Key.isDown(39) && (!Key.isDown(37))) { dx = dx + sensitivity; if (dx > terminalVelocity) { dx = terminalVelocity; } } if (Key.isDown(37) && (!Key.isDown(39))) { dx = dx - sensitivity; if (dx < (terminalVelocity * -1)) { dx = terminalVelocity * -1; } } if (Key.isDown(40) && (!Key.isDown(38))) { dy = dy + sensitivity; if (dy > terminalVelocity) { dy = terminalVelocity; } } if (Key.isDown(38) && (!Key.isDown(40))) { dy = dy - sensitivity; if (dy < (terminalVelocity * -1)) { dy = terminalVelocity * -1; } } } } if (Key.isDown(68)) { _local2.debug = true; _local1.debugStatus(); } else { _local2.debug = false; } if (Key.isDown(16) && (Key.isDown(49))) { _local1.prepareForFrameChange(true, 5); _local2.gamePaused = false; _local2.cheated = true; } if (Key.isDown(16) && (Key.isDown(50))) { _local1.prepareForFrameChange(true, 10); _local2.gamePaused = false; _local2.cheated = true; } if (Key.isDown(16) && (Key.isDown(51))) { _local1.prepareForFrameChange(true, 15); _local2.gamePaused = false; _local2.cheated = true; } if (Key.isDown(16) && (Key.isDown(52))) { _local1.prepareForFrameChange(true, 20); _local2.gamePaused = false; _local2.cheated = true; } if (Key.isDown(16) && (Key.isDown(53))) { _local1.prepareForFrameChange(true, 25); _local2.gamePaused = false; _local2.cheated = true; } if (Key.isDown(16) && (Key.isDown(54))) { _local1.prepareForFrameChange(true, 30); _local2.gamePaused = false; _local2.cheated = true; } if (Key.isDown(16) && (Key.isDown(55))) { _local1.prepareForFrameChange(true, 35); _local2.gamePaused = false; _local2.cheated = true; } if (Key.isDown(16) && (Key.isDown(56))) { _local1.prepareForFrameChange(true, 40); _local2.gamePaused = false; _local2.cheated = true; } if (Key.isDown(16) && (Key.isDown(57))) { _local1.prepareForFrameChange(true, 45); _local2.gamePaused = false; _local2.cheated = true; } if (Key.isDown(16) && (Key.isDown(48))) { _local1.prepareForFrameChange(true, 50); _local2.gamePaused = false; _local2.cheated = true; } if (_local2.gamePaused == false) { if ((!Key.isDown(37)) && (!Key.isDown(39))) { if (dx > 0) { dx = dx - airFriction; } if (dx < 0) { dx = dx + airFriction; } if ((dx >= -0.3) && (dx <= 0.3)) { dx = 0; } } if ((!Key.isDown(38)) && (!Key.isDown(40))) { if (dy > 0) { dy = dy - airFriction; } if (dy < 0) { dy = dy + airFriction; } if ((dy >= -0.3) && (dy <= 0.3)) { dy = 0; } } if (Key.isDown(32) && (energyFlag == 0)) { _local1.beam.gotoandstop(2); shipEnergy = shipEnergy - beamCost; if (shipEnergy < 0) { shipEnergy = 0; energyFlag = 1; } beamFlag = true; _local1.startBeamTags(); } else { beamFlag = false; _local1.beam.gotoandstop(1); shipEnergy = shipEnergy + rechargeRate; if (shipEnergy > totalEnergy) { shipEnergy = totalEnergy; energyFlag = 0; } _local1.removeBeamTags(); } _local1.beamMeUp(); _local1.updateEnergyBar(shipEnergy, totalEnergy, energyFlag); _local1.ship._x = _local1.ship._x + dx; _local1.ship._y = _local1.ship._y + dy; if (beamFlag == true) { _local1.beamHorizontalAndVertical(dx, dy); } if (_local2.shipUsed == 1) { _local1.ship.inside._rotation = dx * 2.5; } if (_local1.ship._x > 450) { _local1.ship._x = 450; } if (_local1.ship._x < 100) { _local1.ship._x = 100; } if (_local1.ship._y < 50) { _local1.ship._y = 50; dy = 0; } if (_local1.ship._y > 250) { _local1.ship._y = 250; dy = 0; } _local1.shadow._x = _local1.ship._x; _local1.beam._x = _local1.ship._x; _local1.beam._y = (_local1.ship._y + (_local1.ship._y / 8)) + 35; _local1.beam._xscale = 50 + ((_local1.ship._y / 2.5) / 2); _local1.beam._yscale = 50 + ((_local1.ship._y / 2.5) / 2); _local1.shadow._alpha = _local1.ship._y / 4; _local1.shadow._xscale = 300 - _local1.ship._y; _local1.shadow._yscale = 300 - _local1.ship._y; varFlag = 0; if ((_local1.ship._x <= 100) && (dx < 0)) { varFlag = _local1.moveScene(-1 * dx); } else if ((_local1.ship._x >= 450) && (dx > 0)) { varFlag = _local1.moveScene(-1 * dx); } if (varFlag == 1) { dx = 0; } _local1.runTimer(); _local1.TankGenerator(); _local1.ManageHelicopters(); _local1.spotship(); _local1.makePeopleMove(); _local1.DetectBulletHits(); _local1.updatePeopleBar(_local2.currentPeople, _local2.totalPeopleToGet); _local1.moveTargets(); if (deathCounter >= 0) { if (deathCounter == 0) { _local2.livesLeft--; _local1.updateLives(_local2.livesLeft); _local1.prepareForFrameChange(false, 0); if (_local2.livesLeft != 0) { var randSound = (Math.round(Math.random() * 5) + 1); } } else { deathCounter--; } } if (_local2.nextTime != -1) { _local1.updateTimer(); } } } stop(); myNextLevel = 10; _global.debug = false; nonDestructableType = "rock"; panLimitLeft = -300; panLimitRight = 300; panAmount = 0; oldValue = 0; numPeople = 0; maxPeople = 0; percentFrequency = 0; zArray = new Array(); zStack = new Array(); z3 = 10000; objectArray = new Array(); bulletArray = new Array(); deadArray = new Array(); targetArray_Name = new Array(); targetArray_Target = new Array(); targetArray_Frames = new Array(); availPeople = new Array(); myVolume = 100; mySong = "Nothing"; myZ1 = 0; myZ2 = 0; terminalVelocity = 8; sensitivity = 0.4; totalEnergy = 200; shipEnergy = 200; rechargeRate = 2; beamCost = 2; timeToBeat = 180; airFriction = 0.15; xFriction = 0.15; xGroundFriction = 0.4; gravity = 0.4; yTerminalVelocity = 15; energyFlag = 0; pickUpFlag = 0; dropSpeed = 0; groundLevel = _root.truck._y; truckFlag = 0; dx = 0; dy = 0; tankArray = new Array(); tankSpawnTimeMin = 0; tankSpawnTimeMax = 0; tankCounter = -1; blnUseTanks = false; tanksToUse = "green"; heliArray = new Array(); bulletDepth = 30000; _global.totalPeopleToGet = 5; identifierNumber = 5; var mySoundPlayer = new SoundPlayer(); buttonCoolDown = 0; intPauseTime = 0; deathCounter = -1; almostFlag = false;
Instance of Symbol 304 MovieClip in Frame 25
onClipEvent (load) { _root.initializeLevel(25, 30, -500, 500, "", 300, 15); _root.updateLives(_global.livesLeft); _root.setPeopleTimer(18, 4); _root.addPersonType("person1", "person", 25); _root.addPersonType("person2", "person", 25); _root.addPersonType("person3", "person", 25); _root.addPersonType("ethan", "person", 25); _root.addUnit("tank1", 2, "tank", "tank"); _root.addUnit("tank2", 2, "tank", "tank"); _root.addUnit("bonus1", 0, "BonusIcon", "object"); _root.addUnit("bonus2", 0, "BonusIcon", "object"); _root.addHelicopter("heli 1", 40, 100, 6); _root.addHelicopter("heli 2", 90, 200, 6); _root.addHelicopter("heli 3", 120, 220, 6); _root.StartTankGenerator(30, 80, "green"); levelTrack = "mountains level"; _root.startMusicDownload(levelTrack); } onClipEvent (enterFrame) { _root.runLevel(); }
Instance of Symbol 657 MovieClip "volumeClip" in Frame 25
onClipEvent (load) { if (_global.volume == true) { volumeClip.goToAndPlay("volumeOn"); } else { volumeClip.goToAndPlay("volumeOff"); } } on (release) { if (_global.volume == true) { _global.volume = false; _root.volumeClip.nextFrame(); _root.toggleMusic(); } else { _global.volume = true; _root.volumeClip.prevFrame(); _root.toggleMusic(); } }
Frame 30
function initializeLevel(currentLevel, nextLevel, leftMax, rightMax, nonDestructable, timeToWin, peopleToGet) { var _local1 = _global; var _local2 = _root; identifierNumber = currentLevel; myNextLevel = nextLevel; panLimitLeft = leftMax; panLimitRight = rightMax; nonDestructableType = nonDestructable; timeToBeat = timeToWin; _local1.totalPeopleToGet = peopleToGet; if (_local1.tempLives < 0) { _local1.livesLeft = 3; } else { _local1.livesLeft = _local1.tempLives; } energyFlag = 0; pickUpFlag = 0; dropSpeed = 0; groundLevel = _local2.truck._y; truckFlag = 0; dx = 0; dy = 0; if (_local1.tempPeople < 0) { _local1.currentPeople = 0; } else { _local1.currentPeople = _local1.tempPeople; } _local1.tempPeople = 0; _local1.tempLives = 0; _local1.tempFrame = identifierNumber; if (timeToBeat == -1) { _local1.nextTime = -1; _local2.updateTimer(); } else { if ((_local1.nextTime == -1) && (timeToBeat != -1)) { _local1.nextTime = 0; } if (_local1.nextTime != -1) { if (_local1.stolenTime == 0) { _local1.nextTime = getTimer() + (timeToBeat * 1000); } else { _local1.nextTime = _local1.nextTime + (getTimer() - _local1.stolenTime); _local1.stolenTime = 0; } } } _local1.stolenTime = 0; if (_local1.shipUsed == 1) { _local2.ship.gotoAndStop("ship1"); } else { _local2.ship.gotoAndStop("ship2"); } } function addPersonType(myLinkage, myType, myWeight) { availPeople.push({linkage:myLinkage, type:myType, weight:myWeight}); } function playSound(soundName) { if (_global.volume == true) { mySoundPlayer.PlaySound(soundName); } } function startMusicDownload(music) { var _local1 = _global; if (_local1.musicOn == true) { _local1.mySound.stop(); _local1.mySound.attachSound(music); _local1.mySound.start(0, 99); _local1.mySound.setVolume(myVolume); } else { _root.volumeClip.gotoAndStop(2); _local1.mySound.stop(); } mySong = music; } function toggleMusic() { var _local1 = _global; if (_local1.volume == true) { _local1.mySound.attachSound(mySong); _local1.mySound.start(0, 99); _local1.mySound.setVolume(myVolume); _local1.musicOn = true; } else { _local1.mySound.stop(); _local1.mySound.setVolume(myVolume); _local1.musicOn = false; } } function updateTimer() { var _local1 = _global; if (_local1.nextTime == -1) { timeText = "NO LIMIT"; } else { myTime = _local1.nextTime - getTimer(); mySecs = math.floor(myTime / 1000); if (mySecs == 0) { _local1.livesLeft = 0; prepareForFrameChange(false, 0); } if (mySecs > 60) { someSeconds = myTime / 1000; someMinutes = someSeconds / 60; if (someSeconds > 59) { someSeconds = someSeconds - (Math.floor(someMinutes) * 60); } if (someSeconds < 10) { textMinutes = someMinutes; timeText = (Math.floor(textMinutes) + ":0") + Math.floor(someSeconds); } else if (someSeconds == 0) { textMinutes = someMinutes; timeText = Math.floor(textMinutes) + ":00"; } else { textMinutes = someMinutes; timeText = (Math.floor(textMinutes) + ":") + Math.floor(someSeconds); } } else { timeText = Math.floor(mySecs); } } } function updateLives(lifeNum) { var _local1 = lifeNum; if (_local1 < 0) { _local1 = 0; } lives = _local1; } function prepareForFrameChange(newLevel, levelNum) { var _local1 = _global; var _local2 = _root; _local1.tempLives = _local1.livesLeft; _local1.tempPeople = _local1.currentPeople; cleanScreen(); if ((_local1.livesLeft > 0) && (newLevel == false)) { _local1.stolenTime = getTimer(); _local2.goToAndPlay("loseLife"); } else if ((_local1.livesLeft > 0) && (newLevel == true)) { _local1.tempPeople = -1; _local1.tempFrame = levelNum; _local2.goToAndPlay("levelText"); } else if (_local1.livesLeft == 0) { _local2.goToAndPlay("endGame"); } } function cleanScreen() { var _local1 = _root; i = 0; while (i < objectArray.length) { _local1[objectArray[i].Name].removeMovieClip(); i++; } i = 0; while (i < deadArray.length) { _local1[deadArray[i]].removeMovieClip(); i++; } i = 0; while (i < targetArray_Name.length) { _local1[targetArray_Name[i]].removeMovieClip(); i++; } i = 0; while (i < bulletArray.length) { _local1[bulletArray[i]].removeMovieClip(); i++; } } function setPeopleTimer(mPeople, pFrequency) { var _local1 = _root; myZ2 = Math.round(_local1.z2._y); myZ1 = Math.round(_local1.z1._y); _local1.z1._y = -50; _local1.z2._y = -50; i = myZ1; while (i < myZ2) { zArray.push(i); zStack.push(1); i++; } percentFrequency = pFrequency; maxPeople = mPeople; } function runTimer() { if (numPeople != maxPeople) { if (random(255) < percentFrequency) { numPeople++; addPersonDynamic(false); } } } function rangeInUse(minZ, maxZ) { var _local2 = maxZ; var _local3 = minZ; var _local1 = false; i = 0; while (i < objectArray.length) { if ((objectArray[i].ZStack >= _local3) && (objectArray[i].ZStack <= _local2)) { _local1 = true; } i++; } return(_local1); } function startBeamTags() { var _local1 = _root; i = 0; while (i < objectArray.length) { if (_local1.beam.hitTest(_local1[objectArray[i].Name]) == true) { if (objectArray[i].Beamed == 0) { _local1[objectArray[i].Name].goToAndPlay("beamed"); objectArray[i].Beamed = 1; objectArray[i].Dy = 0; if (objectArray[i].Type == "tank") { _local1[objectArray[i].Name].HoldFire(); } } if (objectArray[i].Beamed == 2) { _local1[objectArray[i].Name].goToAndStop("endbeam"); objectArray[i].Beamed = 1; objectArray[i].Dy = 0; } } i++; } } function debugStatus() { trace("Name type beamed timer"); trace("----------------------------------------"); i = 0; while (i < objectArray.length) { trace((((((((((objectArray[i].Name + " ") + objectArray[i].Type) + " ") + objectArray[i].Beamed) + " ") + objectArray[i].Timer) + " ") + objectArray[i].Spotted) + " ") + objectArray[i].Direction); i++; } trace("----------------------------------------"); } function removeBeamTags() { var _local1 = _root; i = 0; while (i < objectArray.length) { if ((objectArray[i].Beamed == 1) && (objectArray[i].Type != "agent")) { objectArray[i].Beamed = 2; objectArray[i].FallHeight = _local1[objectArray[i].Name]._y; } else if ((objectArray[i].Beamed == 1) && (objectArray[i].Type == "agent")) { objectArray[i].Beamed = 0; objectArray[i].Timer = 1; } i++; } } function addUnit(name, newSpeed, myLinkage, givenType) { var _local1 = _root; var _local2 = name; var _local3 = newSpeed; tempX = _local1[_local2]._x; tempY = _local1[_local2]._y; wantY = Math.round(tempY); flag = -1; myZStack = -1; i = 0; while (i < zArray.length) { if (zArray[i] == wantY) { flag = i; myZstack = zStack[i]; } i++; } if (flag != -1) { zArray.splice(flag, 1); zStack.splice(flag, 1); } _local1[_local2]._visible = false; _local2 = givenType + identifierNumber; identifierNumber++; _local1.attachMovie(myLinkage, _local2, wantY * 100); if (givenType == "tank") { _local1[_local2].SetFireRate(40); tankArray.push({track:wantY, occupied:true, tank:_local2}); } _local1[_local2]._x = tempX; _local1[_local2]._y = tempY; x = 275; if ((_local1[_local2]._x <= x) && (_local3 != 0)) { dir = _local3; _local1[_local2]._xscale = -Math.abs(_local1[_local2]._xscale); if (myLinkage == "antiAir") { _local1[_local2]._xscale = _local1[_local2]._xscale * -1; } } else { dir = -1 * _local3; } var groundLevel = Math.round(_local1[_local2]._y + (_local1[_local2]._height / 2)); objectArray.push({Name:_local2, Beamed:0, Type:givenType, Ground:groundLevel, Dx:0, Dy:0, Timer:0, Spotted:0, Linkage:myLinkage, ZStack:myZStack, Direction:dir, FallHeight:0}); return(_local2); } function generateEthan() { addPersonDynamic(true); } function addPersonDynamic(isEthan) { if (zArray.length == 0) { return(null); } if (isEthan == false) { r = random(2); switch (r) { case 0 : var _local3 = 0; var _local2 = -1; var _local1 = 0; while (_local1 < availPeople.length) { _local3 = _local3 + availPeople[_local1].weight; _local1++; } var chosenWeight = Math.round(Math.random() * _local3); _local1 = 0; while (_local1 < availPeople.length) { if ((chosenWeight > _local2) && (chosenWeight <= (_local2 + availPeople[_local1].weight))) { myGuy = availPeople[_local1].linkage; myType = availPeople[_local1].type; break; } _local2 = _local2 + availPeople[_local1].weight; _local1++; } break; case 1 : myGuy = "MIB"; myType = "agent"; } } else { myGuy = "ethan"; myType = "person"; } r = random(zArray.length); z = zArray[r]; zs = zStack[r]; zArray.splice(r, 1); zStack.splice(r, 1); name = "unique" + identifierNumber; identifierNumber++; _root.attachMovie(myGuy, name, z * 100); r = random(2); if (r == 0) { x = _root.boundingbox._x + (_root.boundingbox._width / 2); } else { x = _root.boundingbox._x - (_root.boundingbox._width / 2); } _root[name]._x = x; _root[name]._y = z; x = _root.hills._x; if (_root[name]._x <= x) { dir = 1; if (myType == "agent") { _root[name]._xscale = -Math.abs(_root[name]._xscale); } } else { dir = -1; if (myType != "agent") { _root[name]._xscale = -Math.abs(_root[name]._xscale); } } _root[name].goToAndPlay("walk"); objectArray.push({Name:name, Beamed:0, Type:myType, Ground:z, Dx:0, Dy:0, Timer:0, Spotted:0, Linkage:myGuy, ZStack:zs, Direction:dir, FallHeight:0}); return(undefined); } function addTank(name, newSpeed, myLinkage, myTrack) { var _local1 = _root; var _local3 = myTrack; var _local2 = "tank"; if (tanksToUse == "red") { _local2 = "redTank"; } if (tanksToUse == "white") { _local2 = "whiteTank"; } _local1.attachMovie(_local2, name, _local3 * 100); r = random(2); if (r == 0) { x = _local1.boundingbox._x + (_local1.boundingbox._width / 2); } else { x = _local1.boundingbox._x - (_local1.boundingbox._width / 2); } _local1[name]._x = x; if (tanksToUse == "red") { _local1[name].SetFireRate(15); } else if (tanksToUse == "white") { _local1[name].SetFireRate(25); } else { _local1[name].SetFireRate(40); } _local1[name]._y = _local3; x = _local1.hills._x; if (_local1[name]._x <= x) { dir = 1; _local1[name]._xscale = _local1[name]._xscale * -1; } else { dir = -1; } _local1[name].goToAndPlay("idle"); objectArray.push({Name:name, Beamed:0, Type:"tank", Ground:_local3, Dx:0, Dy:0, Timer:0, Spotted:0, Linkage:"tank", ZStack:999999, Direction:dir, FallHeight:0}); } function makePeopleMove() { var _local1 = _root; var _local3 = _global; var queueRemoval = new Array(); i = 0; while (i < objectArray.length) { if (objectArray[i].Beamed == 0) { if (objectArray[i].Timer == 1) { if (_local3.debug == true) { trace(i); } if (_local1[objectArray[i].Name]._x < _local1.ship._x) { objectArray[i].Direction = -3; if (objectArray[i].Type == "person") { _local1[objectArray[i].Name]._xscale = -Math.abs(_local1[objectArray[i].Name]._xscale); } else if (objectArray[i].Type == "agent") { _local1[objectArray[i].Name]._xscale = Math.abs(_local1[objectArray[i].Name]._xscale); if (objectArray[i].Spotted == 0) { createTarget(i); objectArray[i].Spotted = 1; } } } else { objectArray[i].Direction = 3; if (objectArray[i].Type == "person") { _local1[objectArray[i].Name]._xscale = Math.abs(_local1[objectArray[i].Name]._xscale); } else if (objectArray[i].Type == "agent") { _local1[objectArray[i].Name]._xscale = -Math.abs(_local1[objectArray[i].Name]._xscale); if (objectArray[i].Spotted == 0) { createTarget(i); objectArray[i].Spotted = 1; } } } _local1[objectArray[i].Name].gotoandplay("run"); } if (objectArray[i].Timer > 0) { objectArray[i].Timer--; } _local1[objectArray[i].Name]._x = _local1[objectArray[i].Name]._x + objectArray[i].Direction; if ((_local1[objectArray[i].Name]._x < (_local1.boundingbox._x - (_local1.boundingbox._width / 2))) && (objectArray[i].Direction < 0)) { if (objectArray[i].Spotted == 1) { _local3.livesLeft--; _local1.updateLives(_local3.livesLeft); _local1.prepareForFrameChange(false, 0); if (_local3.livesLeft != 0) { var randSound = (Math.round(Math.random() * 5) + 1); } } if (objectArray[i].Type == "tank") { OpenTrack(objectArray[i].Name); } queueRemoval.push({name:objectArray[i].Name, detach:true, debNum:1}); } else if ((_local1[objectArray[i].Name]._x > (_local1.boundingbox._x + (_local1.boundingbox._width / 2))) && (objectArray[i].Direction > 0)) { if (objectArray[i].Spotted == 1) { _local3.livesLeft--; _local1.updateLives(_local3.livesLeft); _local1.prepareForFrameChange(false, 0); if (_local3.livesLeft != 0) { var randSound = (Math.round(Math.random() * 5) + 1); } } if (objectArray[i].Type == "tank") { OpenTrack(objectArray[i].Name); } queueRemoval.push({name:objectArray[i].Name, detach:true, debNum:2}); } } i++; } var _local2 = 0; while (_local2 < queueRemoval.length) { removeObject(queueRemoval[_local2].name, queueRemoval[_local2].detach, queueRemoval[_local2].debNum); _local2++; } tanksAim(); } function removeObject(objectName, removeFromScreen, debugNum) { var _local2 = removeFromScreen; var _local3 = _root; i = -1; var _local1 = 0; while (_local1 < objectArray.length) { if (objectArray[_local1].Name == objectName) { i = _local1; if (objectArray[_local1].Type != "tank") { zArray.push(objectArray[_local1].Ground); zStack.push(objectArray[_local1].ZStack); } if ((objectArray[_local1].Type != "object") && (objectArray[_local1].Type != "tank")) { numPeople--; } if (objectArray[_local1].Spotted == 1) { removeTarget(i); } if (_local2) { _local3[objectArray[_local1].Name].removeMovieClip(); } objectArray.splice(_local1, 1); return; } _local1++; } } function updateEnergyBar(current, total, flag) { var _local1 = _root; frac = current / total; _local1.energy._xscale = frac * 100; if (flag == 1) { _local1.energy.goToAndStop(2); } else { _local1.energy.goToAndStop(1); } } function updatePeopleBar(current, total) { var _local1 = current; var _local2 = total; var _local3 = _root; frac = _local1 / _local2; _local3.peopleToGo._xscale = frac * 100; myFrame = 10; frac = (_local1 / _local2) * 100; if (frac < 10) { myFrame = 1; } else if ((frac >= 10) && (frac < 20)) { myFrame = 2; } else if ((frac >= 20) && (frac < 30)) { myFrame = 3; } else if ((frac >= 30) && (frac < 40)) { myFrame = 4; } else if ((frac >= 40) && (frac < 50)) { myFrame = 5; } else if ((frac >= 50) && (frac < 60)) { myFrame = 6; } else if ((frac >= 60) && (frac < 70)) { myFrame = 7; } else if ((frac >= 70) && (frac < 80)) { myFrame = 8; } else if ((frac >= 80) && (frac < 90)) { myFrame = 9; } else if ((frac >= 90) && (frac <= 100)) { myFrame = 10; } if (oldValue != myFrame) { _local3.peopleToGo.goToAndStop(myFrame); } oldValue = myFrame; if ((_local1 == (_local2 - 2)) && (almostFlag == false)) { var randSound = (Math.round(Math.random() * 4) + 1); _local3.playSound("good" + randSound); almostFlag = true; } if (_local1 == _local2) { prepareForFrameChange(true, myNextLevel); } } function spotship() { var _local1 = _root; i = 0; while (i < objectArray.length) { if (((objectArray[i].Beamed == 0) && ((objectArray[i].Type == "person") || (objectArray[i].Type == "agent"))) && ((objectArray[i].Direction == 1) || (objectArray[i].Direction == -1))) { myDist = getDistance(i); if (myDist <= 175) { if (((objectArray[i].Direction == 1) && (_local1[objectArray[i].Name]._x < _local1.ship._x)) && (_local1[objectArray[i].Name]._x >= 50)) { _local1[objectArray[i].Name].gotoandplay("spot"); objectArray[i].Direction = 0; objectArray[i].Timer = 30; } else if (((objectArray[i].Direction == -1) && (_local1[objectArray[i].Name]._x > _local1.ship._x)) && (_local1[objectArray[i].Name]._x <= 500)) { _local1[objectArray[i].Name].gotoandplay("spot"); objectArray[i].Direction = 0; objectArray[i].Timer = 30; } } } i++; } } function tanksAim() { var _local3 = _root; var _local2 = 0; while (_local2 < objectArray.length) { if ((objectArray[_local2].Beamed == 0) && (objectArray[_local2].Type == "tank")) { var tankName = objectArray[_local2].Name; var point = {x:_local3[tankName].cannon._x, y:_local3[tankName].cannon._y}; _local3[tankName].localToGlobal(point); var op = (_local3.ship._y - point.y); var adj = (_local3.ship._x - point.x); if (adj == 0) { adj = 1; } var _local1 = (Math.atan(op / adj) * 180) / Math.PI; if (_local1 < 0) { _local1 = _local1 * -1; } if (_local1 > 90) { _local1 = 90; } if (_local1 < 20) { _local1 = 20; } _local3[tankName].cannon._rotation = _local1; } _local2++; } } function StartTankGenerator(min, max, color) { tanksToUse = color; blnUseTanks = true; tankSpawnTimeMin = min; tankSpawnTimeMax = max; tankCounter = Math.round(Math.random() * (tankSpawnTimeMax - tankSpawnTimeMin)) + tankSpawnTimeMin; } function TankGenerator() { if (blnUseTanks == true) { intAvailFlag = -1; var _local1 = 0; while (_local1 < tankArray.length) { if (tankArray[_local1].occupied == false) { intAvailFlag = _local1; break; } _local1++; } if (intAvailFlag != -1) { if (tankCounter == 0) { var _local2 = "tank" + identifierNumber; identifierNumber++; tankArray[intAvailFlag].occupied = true; tankArray[intAvailFlag].tank = _local2; addTank(_local2, 3, "tank", tankArray[intAvailFlag].track); tankCounter = Math.round(Math.random() * (tankSpawnTimeMax - tankSpawnTimeMin)) + tankSpawnTimeMin; } else { tankCounter--; } } } } function OpenTrack(tankName) { var _local2 = tankName; var _local1 = 0; while (_local1 < tankArray.length) { if (tankArray[_local1].tank == _local2) { tankArray[_local1].tank = ""; tankArray[_local1].occupied = false; trace(("track " + _local1) + " is open"); } _local1++; } } function LaunchBullet(bulletName, startX, startY, directionX, directionY) { var _local1 = bulletName; var _local3 = _root; var _local2 = ""; if ((substring(_local1, 0, 18)) == "bullet_helicopter_") { _local2 = "bullet air"; } else { _local2 = "bullet ground"; } _local3.attachMovie(_local2, _local1, bulletDepth); _local3[_local1]._x = startX; _local3[_local1]._y = startY; _local3[_local1].SetMovement(directionX, directionY); bulletArray.push(_local1); bulletDepth++; } function DetectBulletHits() { var _local1 = _root; var _local3 = new Array(); var _local2 = 0; while (_local2 < bulletArray.length) { distancex = _local1[bulletArray[_local2]]._x - _local1.ship._x; distancey = _local1[bulletArray[_local2]]._y - _local1.ship._y; if (Math.sqrt((distancex * distancex) + (distancey * distancey)) <= 19) { if ((substring(bulletArray[_local2], 0, 18)) == "bullet_helicopter_") { shipEnergy = 0; energyFlag = 1; _local1.ship.explosion.gotoAndPlay("shock"); _local3.push(bulletArray[_local2]); } else { _local1.ship.explosion.gotoAndPlay("explode"); _local1.playSound("explosion"); if (deathCounter == -1) { deathCounter = 16; } _local3.push(bulletArray[_local2]); } } _local2++; } _local2 = 0; while (_local2 < _local3.length) { RemoveBullet(_local3[_local2]); _local2++; } } function ObjectCleanup(itemName) { var _local1 = itemName; if (_local1.substr(0, 4) == "tank") { OpenTrack(_local1); } _root[_local1].removeMovieClip(); } function RemoveBullet(itemName) { var _local3 = itemName; var _local2 = -1; var _local1 = 0; while (_local1 < bulletArray.length) { if (bulletArray[_local1] == _local3) { _local2 = _local1; break; } _local1++; } if (_local2 != -1) { bulletArray.splice(_local2, 1); _root[_local3].removeMovieClip(); } } function addHelicopter(itemName, minSpawn, maxSpawn, mySpeed) { var _local1 = minSpawn; var _local2 = Math.round(Math.random() * (maxSpawn - _local1)) + _local1; heliArray.push({name:itemName, min:_local1, max:maxSpawn, counter:_local2, speed:mySpeed, inFlight:false, hasFired:false, isFiring:false}); } function ManageHelicopters() { var _local2 = _root; var _local1 = 0; while (_local1 < heliArray.length) { if (heliArray[_local1].inFlight == false) { if (heliArray[_local1].counter == 0) { heliArray[_local1].inFlight = true; _local2[heliArray[_local1].name]._x; r = random(2); if (r == 0) { x = _local2.boundingbox._x + (_local2.boundingbox._width / 2); _local2[heliArray[_local1].name]._xscale = 100; heliArray[_local1].speed = -Math.abs(heliArray[_local1].speed); } else { x = (_local2.boundingbox._x - (_local2.boundingbox._width / 2)) - _local2[heliArray[_local1].name]._width; _local2[heliArray[_local1].name]._xscale = -100; heliArray[_local1].speed = Math.abs(heliArray[_local1].speed); } _local2[heliArray[_local1].name]._x = x; var y = (Math.round(Math.random() * 151) + 53); _local2[heliArray[_local1].name]._y = y; } else { heliArray[_local1].counter--; } } else { if (heliArray[_local1].isFiring == false) { _local2[heliArray[_local1].name]._x = _local2[heliArray[_local1].name]._x + heliArray[_local1].speed; } if ((heliArray[_local1].hasFired == false) && (heliArray[_local1].isFiring == false)) { if (((_local2[heliArray[_local1].name]._x - _local2[heliArray[_local1].name]._width) > 0) && ((_local2[heliArray[_local1].name]._x + _local2[heliArray[_local1].name]._width) < Stage.width)) { _local2[heliArray[_local1].name].gotoAndPlay("shoot"); heliArray[_local1].isFiring = true; trace(heliArray[_local1].name + " has fired"); } } if (heliArray[_local1].hasFired == true) { if (((_local2[heliArray[_local1].name]._x + _local2[heliArray[_local1].name]._width) < (_local2.boundingbox._x - (_local2.boundingbox._width / 2))) || ((_local2[heliArray[_local1].name]._x - _local2[heliArray[_local1].name]._width) > (_local2.boundingbox._x + (_local2.boundingbox._width / 2)))) { trace("out of bounds"); heliArray[_local1].inFlight = false; var _local3 = Math.round(Math.random() * (heliArray[_local1].max - heliArray[_local1].min)) + heliArray[_local1].min; heliArray[_local1].counter = _local3; heliArray[_local1].hasFired = false; heliArray[_local1].isFiring = false; } } } _local1++; } } function HelicopterFire(name) { var _local3 = name; var _local2 = 0; var _local1 = 0; while (_local1 < heliArray.length) { if (heliArray[_local1].name == _local3) { _local2 = _local1; break; } _local1++; } var myName = ("bullet_helicopter_" + identifierNumber); identifierNumber++; var point = {x:_root[_local3].emitter1._x, y:_root[_local3].emitter1._y}; _root[_local3].localToGlobal(point); var bulletSpeed = 0; trace("helicopter speed is: " + heliArray[_local2].speed); if (heliArray[_local2].speed > 0) { bulletSpeed = heliArray[_local2].speed + 2; } else { bulletSpeed = heliArray[_local2].speed - 2; } LaunchBullet(myName, point.x, point.Y, bulletSpeed, 0); } function HelicopterDoneFiring(name) { var _local2 = name; var _local1 = 0; while (_local1 < heliArray.length) { if (heliArray[_local1].name == _local2) { heliArray[_local1].isFiring = false; heliArray[_local1].hasFired = true; return; } _local1++; } } function getDistance(i) { var _local1 = _root; distancex = _local1[objectArray[i].Name]._x - _local1.ship._x; distancey = _local1[objectArray[i].Name]._y - _local1.ship._y; return(Math.sqrt((distancex * distancex) + (distancey * distancey))); } function beamHorizontalAndVertical(asscheese, assY) { var _local1 = _root; var _local2 = asscheese; var _local3 = assY; i = 0; while (i < objectArray.length) { if ((objectArray[i].Beamed == 1) && (objectArray[i].Type != "agent")) { objectArray[i].Dx = _local2; if ((_local1.ship._x > 100) && (_local1.ship._X < 450)) { _local1[objectArray[i].Name]._x = _local1[objectArray[i].Name]._x + _local2; } if ((_local1.ship._y > 50) && (_local1.ship._y < 250)) { _local1[objectArray[i].Name]._y = _local1[objectArray[i].Name]._y + _local3; if (_local1[objectArray[i].Name]._y > objectArray[i].Ground) { _local1[objectArray[i].Name]._y = objectArray[i].Ground; } } } i++; } } function beamMeUp() { var _local1 = _root; var _local2 = new Array(); i = 0; while (i < objectArray.length) { if (objectArray[i].Type != "agent") { if (objectArray[i].Beamed == 1) { if (((objectArray[i].Type == "object") || (objectArray[i].Type == "tank")) && (objectArray[i].Linkage != "BonusIcon")) { maxheight = (_local1.ship._y + (_local1.ship._height / 2)) + (_local1[objectArray[i].Name]._height / 2); if (_local1[objectArray[i].Name]._y > maxheight) { _local1[objectArray[i].Name]._y = _local1[objectArray[i].Name]._y - 2; } } else if (_local1[objectArray[i].Name]._y > _local1.ship._y) { _local1[objectArray[i].Name]._y = _local1[objectArray[i].Name]._y - 2; } else if (objectArray[i].Beamed == 1) { _local1[objectArray[i].Name]._y = -20; objectArray[i].Beamed = 2; _local2.push({name:objectArray[i].Name, detach:true, debNum:4}); if (objectArray[i].Linkage != "BonusIcon") { if ((objectArray[i].Linkage != "person2") && (objectArray[i].Linkage != "person5")) { var scream = Math.round(Math.random() * 8); trace(scream); if (scream == 4) { playSound("maleEnjoy"); } else { playSound("maleScream"); } } else { playSound("maleScream"); } var scream = Math.round(Math.random() * 12); if (scream == 8) { var randSound = (Math.round(Math.random() * 3) + 1); _local1.playSound("rand" + randSound); } _global.currentPeople++; _global.totalPeople++; _local1.display._x = _local1.ship._x; _local1.display._y = _local1.ship._y; _local1.display.goToAndPlay("people"); } else { playSound("bonusSound"); _global.bonusPoints++; _local1.display._x = _local1.ship._x; _local1.display._y = _local1.ship._y; _local1.display.goToAndPlay("points"); } } if (_local1[objectArray[i].Name]._x < _local1.ship._x) { _local1[objectArray[i].Name]._x = _local1[objectArray[i].Name]._x + 1; if (_local1[objectArray[i].Name]._x >= _local1.ship._x) { _local1[objectArray[i].Name]._x = _local1.ship._x; } } if (_local1[objectArray[i].Name]._x > _local1.ship._x) { _local1[objectArray[i].Name]._x = _local1[objectArray[i].Name]._x - 1; if (_local1[objectArray[i].Name]._x <= _local1.ship._x) { _local1[objectArray[i].Name]._x = _local1.ship._x; } } } else { if (objectArray[i].Beamed == 2) { _local1[objectArray[i].Name].goToAndPlay("falling"); } if ((_local1[objectArray[i].Name]._y + (_local1[objectArray[i].Name]._height / 2)) == objectArray[i].Ground) { } else if (_local1[objectArray[i].Name]._y > 0) { _local1[objectArray[i].Name]._y = _local1[objectArray[i].Name]._y + objectArray[i].Dy; objectArray[i].Dy = objectArray[i].Dy + gravity; if (objectArray[i].Dy > yTerminalVelocity) { objectArray[i].Dy = yTerminalVelocity; } _local1[objectArray[i].Name]._x = _local1[objectArray[i].Name]._x + objectArray[i].Dx; if ((_local1[objectArray[i].Name]._y + (_local1[objectArray[i].Name]._height / 2)) >= objectArray[i].Ground) { useFriction = xGroundFriction; } else { useFriction = xFriction; } if ((objectArray[i].Dx >= -0.4) && (objectArray[i].Dx <= 0.4)) { objectArray[i].Dx = 0; } if (objectArray[i].Dx < 0) { objectArray[i].Dx = objectArray[i].Dx + useFriction; } if (objectArray[i].Dx > 0) { objectArray[i].Dx = objectArray[i].Dx - useFriction; } if ((_local1[objectArray[i].Name]._y + (_local1[objectArray[i].Name]._height / 2)) >= objectArray[i].Ground) { if (objectArray[i].Beamed == 2) { if ((objectArray[i].Ground - objectArray[i].FallHeight) < 20) { if (objectArray[i].Type == "tank") { _local1[objectArray[i].Name].gotoAndPlay("idle"); } else if (objectArray[i].Type == "person") { _local1[objectArray[i].Name].gotoAndPlay("run"); objectArray[i].Timer = 1; } if (objectArray[i].Type == "tank") { _local1[objectArray[i].Name].OpenFire(); } root[objectArray[i].Name]._y = objectArray[i].Ground; objectArray[i].Beamed = 0; } else { _local1[objectArray[i].Name].gotoAndPlay("collision"); _local1[objectArray[i].Name]._y = objectArray[i].Ground; if (objectArray[i].Linkage != nonDestructableType) { objectArray[i].Beamed = 3; } else { objectArray[i].Beamed = 0; } j = 0; while (j < objectArray.length) { if ((objectArray[j].Beamed == 0) && (_local1[objectArray[i].Name].hitTest(_local1[objectArray[j].Name]) == true)) { if (((objectArray[j].Type == "tank") && (objectArray[i].Type != "tank")) && ((objectArray[j].Type == "tank") && (objectArray[i].Type != "object"))) { } else { objectArray[j].Direction = 0; tempY = _local1[objectArray[j].Name]._y - (_local1[objectArray[i].Name].height / 100); howFar = objectArray[j].ZStack; objectArray[j].ZStack++; _local1[objectArray[i].Name].swapDepths((objectArray[j].Ground * 100) + howFar); _local1[objectArray[i].Name]._y = tempY; } if ((((objectArray[j].Type == "agent") || (objectArray[j].Type == "person")) || ((objectArray[j].Type == "tank") && (objectArray[i].Type == "tank"))) && (objectArray[j].Linkage != nonDestructableType)) { _local1[objectArray[j].Name].goToAndPlay("collision"); if (objectArray[j].Type == "tank") { _local1[objectArray[j].Name].HoldFire(); } deadArray.push(objectArray[j].Name); _local2.push({name:objectArray[j].Name, detach:false, debNum:5}); } } j++; } if (objectArray[i].Linkage != nonDestructableType) { deadArray.push(objectArray[i].Name); _local2.push({name:objectArray[i].Name, detach:false, debNum:6}); } } } objectArray[i].Dy = 0; } else if (objectArray[i].Beamed == 2) { hitFlag = false; if ((objectArray[i].Ground - objectArray[i].FallHeight) >= 20) { j = 0; while (j < objectArray.length) { if ((objectArray[j].Beamed == 0) && (_local1[objectArray[i].Name].hitTest(_local1[objectArray[j].Name]) == true)) { if (((objectArray[j].Type == "tank") && (objectArray[i].Type != "tank")) && ((objectArray[j].Type == "tank") && (objectArray[i].Type != "object"))) { } else { hitFlag = true; _local1[objectArray[i].Name].goToAndPlay("collision"); objectArray[j].Direction = 0; tempY = _local1[objectArray[j].Name]._y - _local1[objectArray[i].Name].height; howFar = objectArray[j].ZStack; objectArray[j].ZStack++; _local1[objectArray[i].Name].swapDepths((objectArray[j].Ground * 100) + howFar); _local1[objectArray[i].Name]._y = tempY; objectArray[i].Dy = 0; } if ((((((objectArray[j].Type == "agent") || (objectArray[j].Type == "person")) || (objectArray[j].Linkage == "bear")) || ((objectArray[j].Type == "tank") && (objectArray[i].Type == "tank"))) || ((objectArray[j].Type == "tank") && (objectArray[i].Type == "object"))) && (objectArray[j].Linkage != nonDestructableType)) { _local1[objectArray[j].Name].goToAndPlay("collision"); if (objectArray[j].Type == "tank") { _local1[objectArray[j].Name].HoldFire(); } deadArray.push(objectArray[j].Name); _local2.push({name:objectArray[j].Name, detach:false, debNum:5}); } break; } j++; } if (hitFlag == true) { if (objectArray[i].Linkage != nonDestructableType) { objectArray[i].Beamed = 3; } else { objectArray[i].Beamed = 0; } if (objectArray[i].Linkage != nonDestructableType) { deadArray.push(objectArray[i].Name); _local2.push({name:objectArray[i].Name, detach:false, debNum:6}); } } } } } } } else if (objectArray[i].Beamed == 1) { if (_local1.beam.hitTest(_local1[objectArray[i].Name]) == eval("False")) { objectArray[i].Beamed = 0; objectArray[i].Timer = 1; } } i++; } var _local3 = 0; while (_local3 < _local2.length) { removeObject(_local2[_local3].name, _local2[_local3].detach, _local2[_local3].debNum); _local3++; } } function moveTargets() { var _local1 = _root; if (targetArray_Name.length != 0) { i = 0; while (i < targetArray_Name.length) { if (targetArray_Frames[i] == 0) { myX = _local1[targetArray_Target[i]]._x; myY = _local1[targetArray_Target[i]]._y; } else { myX = _local1[targetArray_Name[i]]._x + ((_local1[targetArray_Target[i]]._x - _local1[targetArray_Name[i]]._x) / targetArray_Frames[i]); myY = _local1[targetArray_Name[i]]._y + ((_local1[targetArray_Target[i]]._y - _local1[targetArray_Name[i]]._y) / targetArray_Frames[i]); targetArray_Frames[i]--; } _local1[targetArray_Name[i]]._x = myX; _local1[targetArray_Name[i]]._y = myY; i++; } } } function createTarget(myTarget) { var _local1 = _root; name = "unique" + identifierNumber; identifierNumber++; _local1.attachMovie("manTarget", name, z3); z3++; targetArray_Name.push(name); targetArray_Target.push(objectArray[myTarget].Name); targetArray_Frames.push(15); _local1[name]._x = 275; _local1[name]._y = -60; } function removeTarget(myTarget) { var _local1 = myTarget; var _local2 = _root; i = 0; while (i < targetArray_Name.length) { if (targetArray_Target[i] == objectArray[_local1].Name) { _local2[targetArray_Name[i]].removeMovieClip(); targetArray_Name.splice(i, 1); targetArray_Target.splice(i, 1); targetArray_Frames.splice(i, 1); } i++; } } function moveScene(d) { var _local1 = d; var _local2 = _root; if (((panAmount + _local1) > panLimitLeft) and ((panAmount + _local1) < panLimitRight)) { panAmount = panAmount + _local1; trees._x = trees._x + (_local1 * 1); bushes._x = bushes._x + (_local1 * 0.8); hills._x = hills._x + (_local1 * 0.4); boundingbox._x = boundingbox._x + (_local1 * 1); i = 0; while (i < objectArray.length) { if ((((objectArray[i].Beamed == 0) || (objectArray[i].Beamed == 3)) || (objectArray[i].Beamed == 2)) || (objectArray[i].Type == "agent")) { _local2[objectArray[i].Name]._x = _local2[objectArray[i].Name]._x + _local1; } i++; } var i = 0; while (i < heliArray.length) { if (heliArray[i].inFlight == true) { _local2[heliArray[i].name]._x = _local2[heliArray[i].name]._x + _local1; } i++; } i = 0; while (i < deadArray.length) { _local2[deadArray[i]]._x = _local2[deadArray[i]]._x + _local1; i++; } i = 0; while (i < bulletArray.length) { _local2[bulletArray[i]]._x = _local2[bulletArray[i]]._x + _local1; i++; } return(0); } return(1); } function runLevel() { var _local1 = _root; var _local2 = _global; if (buttonCoolDown == 0) { if (Key.isDown(80) || (Key.isDown(27))) { buttonCoolDown = 10; if (_local2.gamePaused == false) { _local1.paused.gotoAndPlay("show"); _local2.gamePaused = true; intPauseTime = getTimer(); } else { _local1.paused.gotoAndPlay("hide"); _local2.gamePaused = false; if (_local2.nextTime != -1) { _local2.nextTime = _local2.nextTime + (getTimer() - intPauseTime); } intPauseTime = 0; } } } else { buttonCoolDown--; } if (_local2.gamePaused == false) { if (deathCounter == -1) { if (Key.isDown(39) && (!Key.isDown(37))) { dx = dx + sensitivity; if (dx > terminalVelocity) { dx = terminalVelocity; } } if (Key.isDown(37) && (!Key.isDown(39))) { dx = dx - sensitivity; if (dx < (terminalVelocity * -1)) { dx = terminalVelocity * -1; } } if (Key.isDown(40) && (!Key.isDown(38))) { dy = dy + sensitivity; if (dy > terminalVelocity) { dy = terminalVelocity; } } if (Key.isDown(38) && (!Key.isDown(40))) { dy = dy - sensitivity; if (dy < (terminalVelocity * -1)) { dy = terminalVelocity * -1; } } } } if (Key.isDown(68)) { _local2.debug = true; _local1.debugStatus(); } else { _local2.debug = false; } if (Key.isDown(16) && (Key.isDown(49))) { _local1.prepareForFrameChange(true, 5); _local2.gamePaused = false; _local2.cheated = true; } if (Key.isDown(16) && (Key.isDown(50))) { _local1.prepareForFrameChange(true, 10); _local2.gamePaused = false; _local2.cheated = true; } if (Key.isDown(16) && (Key.isDown(51))) { _local1.prepareForFrameChange(true, 15); _local2.gamePaused = false; _local2.cheated = true; } if (Key.isDown(16) && (Key.isDown(52))) { _local1.prepareForFrameChange(true, 20); _local2.gamePaused = false; _local2.cheated = true; } if (Key.isDown(16) && (Key.isDown(53))) { _local1.prepareForFrameChange(true, 25); _local2.gamePaused = false; _local2.cheated = true; } if (Key.isDown(16) && (Key.isDown(54))) { _local1.prepareForFrameChange(true, 30); _local2.gamePaused = false; _local2.cheated = true; } if (Key.isDown(16) && (Key.isDown(55))) { _local1.prepareForFrameChange(true, 35); _local2.gamePaused = false; _local2.cheated = true; } if (Key.isDown(16) && (Key.isDown(56))) { _local1.prepareForFrameChange(true, 40); _local2.gamePaused = false; _local2.cheated = true; } if (Key.isDown(16) && (Key.isDown(57))) { _local1.prepareForFrameChange(true, 45); _local2.gamePaused = false; _local2.cheated = true; } if (Key.isDown(16) && (Key.isDown(48))) { _local1.prepareForFrameChange(true, 50); _local2.gamePaused = false; _local2.cheated = true; } if (_local2.gamePaused == false) { if ((!Key.isDown(37)) && (!Key.isDown(39))) { if (dx > 0) { dx = dx - airFriction; } if (dx < 0) { dx = dx + airFriction; } if ((dx >= -0.3) && (dx <= 0.3)) { dx = 0; } } if ((!Key.isDown(38)) && (!Key.isDown(40))) { if (dy > 0) { dy = dy - airFriction; } if (dy < 0) { dy = dy + airFriction; } if ((dy >= -0.3) && (dy <= 0.3)) { dy = 0; } } if (Key.isDown(32) && (energyFlag == 0)) { _local1.beam.gotoandstop(2); shipEnergy = shipEnergy - beamCost; if (shipEnergy < 0) { shipEnergy = 0; energyFlag = 1; } beamFlag = true; _local1.startBeamTags(); } else { beamFlag = false; _local1.beam.gotoandstop(1); shipEnergy = shipEnergy + rechargeRate; if (shipEnergy > totalEnergy) { shipEnergy = totalEnergy; energyFlag = 0; } _local1.removeBeamTags(); } _local1.beamMeUp(); _local1.updateEnergyBar(shipEnergy, totalEnergy, energyFlag); _local1.ship._x = _local1.ship._x + dx; _local1.ship._y = _local1.ship._y + dy; if (beamFlag == true) { _local1.beamHorizontalAndVertical(dx, dy); } if (_local2.shipUsed == 1) { _local1.ship.inside._rotation = dx * 2.5; } if (_local1.ship._x > 450) { _local1.ship._x = 450; } if (_local1.ship._x < 100) { _local1.ship._x = 100; } if (_local1.ship._y < 50) { _local1.ship._y = 50; dy = 0; } if (_local1.ship._y > 250) { _local1.ship._y = 250; dy = 0; } _local1.shadow._x = _local1.ship._x; _local1.beam._x = _local1.ship._x; _local1.beam._y = (_local1.ship._y + (_local1.ship._y / 8)) + 35; _local1.beam._xscale = 50 + ((_local1.ship._y / 2.5) / 2); _local1.beam._yscale = 50 + ((_local1.ship._y / 2.5) / 2); _local1.shadow._alpha = _local1.ship._y / 4; _local1.shadow._xscale = 300 - _local1.ship._y; _local1.shadow._yscale = 300 - _local1.ship._y; varFlag = 0; if ((_local1.ship._x <= 100) && (dx < 0)) { varFlag = _local1.moveScene(-1 * dx); } else if ((_local1.ship._x >= 450) && (dx > 0)) { varFlag = _local1.moveScene(-1 * dx); } if (varFlag == 1) { dx = 0; } _local1.runTimer(); _local1.TankGenerator(); _local1.ManageHelicopters(); _local1.spotship(); _local1.makePeopleMove(); _local1.DetectBulletHits(); _local1.updatePeopleBar(_local2.currentPeople, _local2.totalPeopleToGet); _local1.moveTargets(); if (deathCounter >= 0) { if (deathCounter == 0) { _local2.livesLeft--; _local1.updateLives(_local2.livesLeft); _local1.prepareForFrameChange(false, 0); if (_local2.livesLeft != 0) { var randSound = (Math.round(Math.random() * 5) + 1); } } else { deathCounter--; } } if (_local2.nextTime != -1) { _local1.updateTimer(); } } } stop(); myNextLevel = 10; _global.debug = false; nonDestructableType = "rock"; panLimitLeft = -300; panLimitRight = 300; panAmount = 0; oldValue = 0; numPeople = 0; maxPeople = 0; percentFrequency = 0; zArray = new Array(); zStack = new Array(); z3 = 10000; objectArray = new Array(); bulletArray = new Array(); deadArray = new Array(); targetArray_Name = new Array(); targetArray_Target = new Array(); targetArray_Frames = new Array(); availPeople = new Array(); myVolume = 100; mySong = "Nothing"; myZ1 = 0; myZ2 = 0; terminalVelocity = 8; sensitivity = 0.4; totalEnergy = 200; shipEnergy = 200; rechargeRate = 2; beamCost = 2; timeToBeat = 180; airFriction = 0.15; xFriction = 0.15; xGroundFriction = 0.4; gravity = 0.4; yTerminalVelocity = 15; energyFlag = 0; pickUpFlag = 0; dropSpeed = 0; groundLevel = _root.truck._y; truckFlag = 0; dx = 0; dy = 0; tankArray = new Array(); tankSpawnTimeMin = 0; tankSpawnTimeMax = 0; tankCounter = -1; blnUseTanks = false; tanksToUse = "green"; heliArray = new Array(); bulletDepth = 30000; _global.totalPeopleToGet = 5; identifierNumber = 5; var mySoundPlayer = new SoundPlayer(); buttonCoolDown = 0; intPauseTime = 0; deathCounter = -1; almostFlag = false;
Instance of Symbol 304 MovieClip in Frame 30
onClipEvent (load) { _root.initializeLevel(30, 35, -500, 500, "", 180, 15); _root.updateLives(_global.livesLeft); _root.setPeopleTimer(25, 4); _root.addPersonType("person1", "person", 25); _root.addPersonType("person2", "person", 25); _root.addPersonType("person3", "person", 25); _root.addPersonType("ethan", "person", 25); _root.addUnit("rock6", 0, "desert_rock", "object"); _root.addUnit("rock7", 0, "desert_rock", "object"); _root.addUnit("rock8", 0, "desert_rock", "object"); _root.addUnit("rock9", 0, "desert_rock", "object"); _root.addUnit("rock10", 0, "desert_rock", "object"); _root.addUnit("rock11", 0, "desert_rock", "object"); _root.addUnit("tank1", 0, "antiAir", "tank"); _root.addUnit("tank2", 0, "antiAir", "tank"); var gunName = _root.addUnit("tank3", 0, "antiAir", "tank"); _root[gunName]._xscale = _root[gunName]._xscale * -1; _root.addUnit("bonus1", 0, "BonusIcon", "object"); _root.addUnit("bonus2", 0, "BonusIcon", "object"); levelTrack = "desert level"; _root.startMusicDownload(levelTrack); } onClipEvent (enterFrame) { _root.runLevel(); }
Instance of Symbol 657 MovieClip "volumeClip" in Frame 30
onClipEvent (load) { if (_global.volume == true) { volumeClip.goToAndPlay("volumeOn"); } else { volumeClip.goToAndPlay("volumeOff"); } } on (release) { if (_global.volume == true) { _global.volume = false; _root.volumeClip.nextFrame(); _root.toggleMusic(); } else { _global.volume = true; _root.volumeClip.prevFrame(); _root.toggleMusic(); } }
Frame 35
function initializeLevel(currentLevel, nextLevel, leftMax, rightMax, nonDestructable, timeToWin, peopleToGet) { var _local1 = _global; var _local2 = _root; identifierNumber = currentLevel; myNextLevel = nextLevel; panLimitLeft = leftMax; panLimitRight = rightMax; nonDestructableType = nonDestructable; timeToBeat = timeToWin; _local1.totalPeopleToGet = peopleToGet; if (_local1.tempLives < 0) { _local1.livesLeft = 3; } else { _local1.livesLeft = _local1.tempLives; } energyFlag = 0; pickUpFlag = 0; dropSpeed = 0; groundLevel = _local2.truck._y; truckFlag = 0; dx = 0; dy = 0; if (_local1.tempPeople < 0) { _local1.currentPeople = 0; } else { _local1.currentPeople = _local1.tempPeople; } _local1.tempPeople = 0; _local1.tempLives = 0; _local1.tempFrame = identifierNumber; if (timeToBeat == -1) { _local1.nextTime = -1; _local2.updateTimer(); } else { if ((_local1.nextTime == -1) && (timeToBeat != -1)) { _local1.nextTime = 0; } if (_local1.nextTime != -1) { if (_local1.stolenTime == 0) { _local1.nextTime = getTimer() + (timeToBeat * 1000); } else { _local1.nextTime = _local1.nextTime + (getTimer() - _local1.stolenTime); _local1.stolenTime = 0; } } } _local1.stolenTime = 0; if (_local1.shipUsed == 1) { _local2.ship.gotoAndStop("ship1"); } else { _local2.ship.gotoAndStop("ship2"); } } function addPersonType(myLinkage, myType, myWeight) { availPeople.push({linkage:myLinkage, type:myType, weight:myWeight}); } function playSound(soundName) { if (_global.volume == true) { mySoundPlayer.PlaySound(soundName); } } function startMusicDownload(music) { var _local1 = _global; if (_local1.musicOn == true) { _local1.mySound.stop(); _local1.mySound.attachSound(music); _local1.mySound.start(0, 99); _local1.mySound.setVolume(myVolume); } else { _root.volumeClip.gotoAndStop(2); _local1.mySound.stop(); } mySong = music; } function toggleMusic() { var _local1 = _global; if (_local1.volume == true) { _local1.mySound.attachSound(mySong); _local1.mySound.start(0, 99); _local1.mySound.setVolume(myVolume); _local1.musicOn = true; } else { _local1.mySound.stop(); _local1.mySound.setVolume(myVolume); _local1.musicOn = false; } } function updateTimer() { var _local1 = _global; if (_local1.nextTime == -1) { timeText = "NO LIMIT"; } else { myTime = _local1.nextTime - getTimer(); mySecs = math.floor(myTime / 1000); if (mySecs == 0) { _local1.livesLeft = 0; prepareForFrameChange(false, 0); } if (mySecs > 60) { someSeconds = myTime / 1000; someMinutes = someSeconds / 60; if (someSeconds > 59) { someSeconds = someSeconds - (Math.floor(someMinutes) * 60); } if (someSeconds < 10) { textMinutes = someMinutes; timeText = (Math.floor(textMinutes) + ":0") + Math.floor(someSeconds); } else if (someSeconds == 0) { textMinutes = someMinutes; timeText = Math.floor(textMinutes) + ":00"; } else { textMinutes = someMinutes; timeText = (Math.floor(textMinutes) + ":") + Math.floor(someSeconds); } } else { timeText = Math.floor(mySecs); } } } function updateLives(lifeNum) { var _local1 = lifeNum; if (_local1 < 0) { _local1 = 0; } lives = _local1; } function prepareForFrameChange(newLevel, levelNum) { var _local1 = _global; var _local2 = _root; _local1.tempLives = _local1.livesLeft; _local1.tempPeople = _local1.currentPeople; cleanScreen(); if ((_local1.livesLeft > 0) && (newLevel == false)) { _local1.stolenTime = getTimer(); _local2.goToAndPlay("loseLife"); } else if ((_local1.livesLeft > 0) && (newLevel == true)) { _local1.tempPeople = -1; _local1.tempFrame = levelNum; _local2.goToAndPlay("levelText"); } else if (_local1.livesLeft == 0) { _local2.goToAndPlay("endGame"); } } function cleanScreen() { var _local1 = _root; i = 0; while (i < objectArray.length) { _local1[objectArray[i].Name].removeMovieClip(); i++; } i = 0; while (i < deadArray.length) { _local1[deadArray[i]].removeMovieClip(); i++; } i = 0; while (i < targetArray_Name.length) { _local1[targetArray_Name[i]].removeMovieClip(); i++; } i = 0; while (i < bulletArray.length) { _local1[bulletArray[i]].removeMovieClip(); i++; } } function setPeopleTimer(mPeople, pFrequency) { var _local1 = _root; myZ2 = Math.round(_local1.z2._y); myZ1 = Math.round(_local1.z1._y); _local1.z1._y = -50; _local1.z2._y = -50; i = myZ1; while (i < myZ2) { zArray.push(i); zStack.push(1); i++; } percentFrequency = pFrequency; maxPeople = mPeople; } function runTimer() { if (numPeople != maxPeople) { if (random(255) < percentFrequency) { numPeople++; addPersonDynamic(false); } } } function rangeInUse(minZ, maxZ) { var _local2 = maxZ; var _local3 = minZ; var _local1 = false; i = 0; while (i < objectArray.length) { if ((objectArray[i].ZStack >= _local3) && (objectArray[i].ZStack <= _local2)) { _local1 = true; } i++; } return(_local1); } function startBeamTags() { var _local1 = _root; i = 0; while (i < objectArray.length) { if (_local1.beam.hitTest(_local1[objectArray[i].Name]) == true) { if (objectArray[i].Beamed == 0) { _local1[objectArray[i].Name].goToAndPlay("beamed"); objectArray[i].Beamed = 1; objectArray[i].Dy = 0; if (objectArray[i].Type == "tank") { _local1[objectArray[i].Name].HoldFire(); } } if (objectArray[i].Beamed == 2) { _local1[objectArray[i].Name].goToAndStop("endbeam"); objectArray[i].Beamed = 1; objectArray[i].Dy = 0; } } i++; } } function debugStatus() { trace("Name type beamed timer"); trace("----------------------------------------"); i = 0; while (i < objectArray.length) { trace((((((((((objectArray[i].Name + " ") + objectArray[i].Type) + " ") + objectArray[i].Beamed) + " ") + objectArray[i].Timer) + " ") + objectArray[i].Spotted) + " ") + objectArray[i].Direction); i++; } trace("----------------------------------------"); } function removeBeamTags() { var _local1 = _root; i = 0; while (i < objectArray.length) { if ((objectArray[i].Beamed == 1) && (objectArray[i].Type != "agent")) { objectArray[i].Beamed = 2; objectArray[i].FallHeight = _local1[objectArray[i].Name]._y; } else if ((objectArray[i].Beamed == 1) && (objectArray[i].Type == "agent")) { objectArray[i].Beamed = 0; objectArray[i].Timer = 1; } i++; } } function addUnit(name, newSpeed, myLinkage, givenType) { var _local1 = _root; var _local2 = name; var _local3 = newSpeed; tempX = _local1[_local2]._x; tempY = _local1[_local2]._y; wantY = Math.round(tempY); flag = -1; myZStack = -1; i = 0; while (i < zArray.length) { if (zArray[i] == wantY) { flag = i; myZstack = zStack[i]; } i++; } if (flag != -1) { zArray.splice(flag, 1); zStack.splice(flag, 1); } _local1[_local2]._visible = false; _local2 = givenType + identifierNumber; identifierNumber++; _local1.attachMovie(myLinkage, _local2, wantY * 100); if (givenType == "tank") { _local1[_local2].SetFireRate(40); tankArray.push({track:wantY, occupied:true, tank:_local2}); } _local1[_local2]._x = tempX; _local1[_local2]._y = tempY; x = 275; if ((_local1[_local2]._x <= x) && (_local3 != 0)) { dir = _local3; _local1[_local2]._xscale = -Math.abs(_local1[_local2]._xscale); if (myLinkage == "antiAir") { _local1[_local2]._xscale = _local1[_local2]._xscale * -1; } } else { dir = -1 * _local3; } var groundLevel = Math.round(_local1[_local2]._y + (_local1[_local2]._height / 2)); objectArray.push({Name:_local2, Beamed:0, Type:givenType, Ground:groundLevel, Dx:0, Dy:0, Timer:0, Spotted:0, Linkage:myLinkage, ZStack:myZStack, Direction:dir, FallHeight:0}); return(_local2); } function generateEthan() { addPersonDynamic(true); } function addPersonDynamic(isEthan) { if (zArray.length == 0) { return(null); } if (isEthan == false) { r = random(2); switch (r) { case 0 : var _local3 = 0; var _local2 = -1; var _local1 = 0; while (_local1 < availPeople.length) { _local3 = _local3 + availPeople[_local1].weight; _local1++; } var chosenWeight = Math.round(Math.random() * _local3); _local1 = 0; while (_local1 < availPeople.length) { if ((chosenWeight > _local2) && (chosenWeight <= (_local2 + availPeople[_local1].weight))) { myGuy = availPeople[_local1].linkage; myType = availPeople[_local1].type; break; } _local2 = _local2 + availPeople[_local1].weight; _local1++; } break; case 1 : myGuy = "MIB"; myType = "agent"; } } else { myGuy = "ethan"; myType = "person"; } r = random(zArray.length); z = zArray[r]; zs = zStack[r]; zArray.splice(r, 1); zStack.splice(r, 1); name = "unique" + identifierNumber; identifierNumber++; _root.attachMovie(myGuy, name, z * 100); r = random(2); if (r == 0) { x = _root.boundingbox._x + (_root.boundingbox._width / 2); } else { x = _root.boundingbox._x - (_root.boundingbox._width / 2); } _root[name]._x = x; _root[name]._y = z; x = _root.hills._x; if (_root[name]._x <= x) { dir = 1; if (myType == "agent") { _root[name]._xscale = -Math.abs(_root[name]._xscale); } } else { dir = -1; if (myType != "agent") { _root[name]._xscale = -Math.abs(_root[name]._xscale); } } _root[name].goToAndPlay("walk"); objectArray.push({Name:name, Beamed:0, Type:myType, Ground:z, Dx:0, Dy:0, Timer:0, Spotted:0, Linkage:myGuy, ZStack:zs, Direction:dir, FallHeight:0}); return(undefined); } function addTank(name, newSpeed, myLinkage, myTrack) { var _local1 = _root; var _local3 = myTrack; var _local2 = "tank"; if (tanksToUse == "red") { _local2 = "redTank"; } if (tanksToUse == "white") { _local2 = "whiteTank"; } _local1.attachMovie(_local2, name, _local3 * 100); r = random(2); if (r == 0) { x = _local1.boundingbox._x + (_local1.boundingbox._width / 2); } else { x = _local1.boundingbox._x - (_local1.boundingbox._width / 2); } _local1[name]._x = x; if (tanksToUse == "red") { _local1[name].SetFireRate(15); } else if (tanksToUse == "white") { _local1[name].SetFireRate(25); } else { _local1[name].SetFireRate(40); } _local1[name]._y = _local3; x = _local1.hills._x; if (_local1[name]._x <= x) { dir = 1; _local1[name]._xscale = _local1[name]._xscale * -1; } else { dir = -1; } _local1[name].goToAndPlay("idle"); objectArray.push({Name:name, Beamed:0, Type:"tank", Ground:_local3, Dx:0, Dy:0, Timer:0, Spotted:0, Linkage:"tank", ZStack:999999, Direction:dir, FallHeight:0}); } function makePeopleMove() { var _local1 = _root; var _local3 = _global; var queueRemoval = new Array(); i = 0; while (i < objectArray.length) { if (objectArray[i].Beamed == 0) { if (objectArray[i].Timer == 1) { if (_local3.debug == true) { trace(i); } if (_local1[objectArray[i].Name]._x < _local1.ship._x) { objectArray[i].Direction = -3; if (objectArray[i].Type == "person") { _local1[objectArray[i].Name]._xscale = -Math.abs(_local1[objectArray[i].Name]._xscale); } else if (objectArray[i].Type == "agent") { _local1[objectArray[i].Name]._xscale = Math.abs(_local1[objectArray[i].Name]._xscale); if (objectArray[i].Spotted == 0) { createTarget(i); objectArray[i].Spotted = 1; } } } else { objectArray[i].Direction = 3; if (objectArray[i].Type == "person") { _local1[objectArray[i].Name]._xscale = Math.abs(_local1[objectArray[i].Name]._xscale); } else if (objectArray[i].Type == "agent") { _local1[objectArray[i].Name]._xscale = -Math.abs(_local1[objectArray[i].Name]._xscale); if (objectArray[i].Spotted == 0) { createTarget(i); objectArray[i].Spotted = 1; } } } _local1[objectArray[i].Name].gotoandplay("run"); } if (objectArray[i].Timer > 0) { objectArray[i].Timer--; } _local1[objectArray[i].Name]._x = _local1[objectArray[i].Name]._x + objectArray[i].Direction; if ((_local1[objectArray[i].Name]._x < (_local1.boundingbox._x - (_local1.boundingbox._width / 2))) && (objectArray[i].Direction < 0)) { if (objectArray[i].Spotted == 1) { _local3.livesLeft--; _local1.updateLives(_local3.livesLeft); _local1.prepareForFrameChange(false, 0); if (_local3.livesLeft != 0) { var randSound = (Math.round(Math.random() * 5) + 1); } } if (objectArray[i].Type == "tank") { OpenTrack(objectArray[i].Name); } queueRemoval.push({name:objectArray[i].Name, detach:true, debNum:1}); } else if ((_local1[objectArray[i].Name]._x > (_local1.boundingbox._x + (_local1.boundingbox._width / 2))) && (objectArray[i].Direction > 0)) { if (objectArray[i].Spotted == 1) { _local3.livesLeft--; _local1.updateLives(_local3.livesLeft); _local1.prepareForFrameChange(false, 0); if (_local3.livesLeft != 0) { var randSound = (Math.round(Math.random() * 5) + 1); } } if (objectArray[i].Type == "tank") { OpenTrack(objectArray[i].Name); } queueRemoval.push({name:objectArray[i].Name, detach:true, debNum:2}); } } i++; } var _local2 = 0; while (_local2 < queueRemoval.length) { removeObject(queueRemoval[_local2].name, queueRemoval[_local2].detach, queueRemoval[_local2].debNum); _local2++; } tanksAim(); } function removeObject(objectName, removeFromScreen, debugNum) { var _local2 = removeFromScreen; var _local3 = _root; i = -1; var _local1 = 0; while (_local1 < objectArray.length) { if (objectArray[_local1].Name == objectName) { i = _local1; if (objectArray[_local1].Type != "tank") { zArray.push(objectArray[_local1].Ground); zStack.push(objectArray[_local1].ZStack); } if ((objectArray[_local1].Type != "object") && (objectArray[_local1].Type != "tank")) { numPeople--; } if (objectArray[_local1].Spotted == 1) { removeTarget(i); } if (_local2) { _local3[objectArray[_local1].Name].removeMovieClip(); } objectArray.splice(_local1, 1); return; } _local1++; } } function updateEnergyBar(current, total, flag) { var _local1 = _root; frac = current / total; _local1.energy._xscale = frac * 100; if (flag == 1) { _local1.energy.goToAndStop(2); } else { _local1.energy.goToAndStop(1); } } function updatePeopleBar(current, total) { var _local1 = current; var _local2 = total; var _local3 = _root; frac = _local1 / _local2; _local3.peopleToGo._xscale = frac * 100; myFrame = 10; frac = (_local1 / _local2) * 100; if (frac < 10) { myFrame = 1; } else if ((frac >= 10) && (frac < 20)) { myFrame = 2; } else if ((frac >= 20) && (frac < 30)) { myFrame = 3; } else if ((frac >= 30) && (frac < 40)) { myFrame = 4; } else if ((frac >= 40) && (frac < 50)) { myFrame = 5; } else if ((frac >= 50) && (frac < 60)) { myFrame = 6; } else if ((frac >= 60) && (frac < 70)) { myFrame = 7; } else if ((frac >= 70) && (frac < 80)) { myFrame = 8; } else if ((frac >= 80) && (frac < 90)) { myFrame = 9; } else if ((frac >= 90) && (frac <= 100)) { myFrame = 10; } if (oldValue != myFrame) { _local3.peopleToGo.goToAndStop(myFrame); } oldValue = myFrame; if ((_local1 == (_local2 - 2)) && (almostFlag == false)) { var randSound = (Math.round(Math.random() * 4) + 1); _local3.playSound("good" + randSound); almostFlag = true; } if (_local1 == _local2) { prepareForFrameChange(true, myNextLevel); } } function spotship() { var _local1 = _root; i = 0; while (i < objectArray.length) { if (((objectArray[i].Beamed == 0) && ((objectArray[i].Type == "person") || (objectArray[i].Type == "agent"))) && ((objectArray[i].Direction == 1) || (objectArray[i].Direction == -1))) { myDist = getDistance(i); if (myDist <= 175) { if (((objectArray[i].Direction == 1) && (_local1[objectArray[i].Name]._x < _local1.ship._x)) && (_local1[objectArray[i].Name]._x >= 50)) { _local1[objectArray[i].Name].gotoandplay("spot"); objectArray[i].Direction = 0; objectArray[i].Timer = 30; } else if (((objectArray[i].Direction == -1) && (_local1[objectArray[i].Name]._x > _local1.ship._x)) && (_local1[objectArray[i].Name]._x <= 500)) { _local1[objectArray[i].Name].gotoandplay("spot"); objectArray[i].Direction = 0; objectArray[i].Timer = 30; } } } i++; } } function tanksAim() { var _local3 = _root; var _local2 = 0; while (_local2 < objectArray.length) { if ((objectArray[_local2].Beamed == 0) && (objectArray[_local2].Type == "tank")) { var tankName = objectArray[_local2].Name; var point = {x:_local3[tankName].cannon._x, y:_local3[tankName].cannon._y}; _local3[tankName].localToGlobal(point); var op = (_local3.ship._y - point.y); var adj = (_local3.ship._x - point.x); if (adj == 0) { adj = 1; } var _local1 = (Math.atan(op / adj) * 180) / Math.PI; if (_local1 < 0) { _local1 = _local1 * -1; } if (_local1 > 90) { _local1 = 90; } if (_local1 < 20) { _local1 = 20; } _local3[tankName].cannon._rotation = _local1; } _local2++; } } function StartTankGenerator(min, max, color) { tanksToUse = color; blnUseTanks = true; tankSpawnTimeMin = min; tankSpawnTimeMax = max; tankCounter = Math.round(Math.random() * (tankSpawnTimeMax - tankSpawnTimeMin)) + tankSpawnTimeMin; } function TankGenerator() { if (blnUseTanks == true) { intAvailFlag = -1; var _local1 = 0; while (_local1 < tankArray.length) { if (tankArray[_local1].occupied == false) { intAvailFlag = _local1; break; } _local1++; } if (intAvailFlag != -1) { if (tankCounter == 0) { var _local2 = "tank" + identifierNumber; identifierNumber++; tankArray[intAvailFlag].occupied = true; tankArray[intAvailFlag].tank = _local2; addTank(_local2, 3, "tank", tankArray[intAvailFlag].track); tankCounter = Math.round(Math.random() * (tankSpawnTimeMax - tankSpawnTimeMin)) + tankSpawnTimeMin; } else { tankCounter--; } } } } function OpenTrack(tankName) { var _local2 = tankName; var _local1 = 0; while (_local1 < tankArray.length) { if (tankArray[_local1].tank == _local2) { tankArray[_local1].tank = ""; tankArray[_local1].occupied = false; trace(("track " + _local1) + " is open"); } _local1++; } } function LaunchBullet(bulletName, startX, startY, directionX, directionY) { var _local1 = bulletName; var _local3 = _root; var _local2 = ""; if ((substring(_local1, 0, 18)) == "bullet_helicopter_") { _local2 = "bullet air"; } else { _local2 = "bullet ground"; } _local3.attachMovie(_local2, _local1, bulletDepth); _local3[_local1]._x = startX; _local3[_local1]._y = startY; _local3[_local1].SetMovement(directionX, directionY); bulletArray.push(_local1); bulletDepth++; } function DetectBulletHits() { var _local1 = _root; var _local3 = new Array(); var _local2 = 0; while (_local2 < bulletArray.length) { distancex = _local1[bulletArray[_local2]]._x - _local1.ship._x; distancey = _local1[bulletArray[_local2]]._y - _local1.ship._y; if (Math.sqrt((distancex * distancex) + (distancey * distancey)) <= 19) { if ((substring(bulletArray[_local2], 0, 18)) == "bullet_helicopter_") { shipEnergy = 0; energyFlag = 1; _local1.ship.explosion.gotoAndPlay("shock"); _local3.push(bulletArray[_local2]); } else { _local1.ship.explosion.gotoAndPlay("explode"); _local1.playSound("explosion"); if (deathCounter == -1) { deathCounter = 16; } _local3.push(bulletArray[_local2]); } } _local2++; } _local2 = 0; while (_local2 < _local3.length) { RemoveBullet(_local3[_local2]); _local2++; } } function ObjectCleanup(itemName) { var _local1 = itemName; if (_local1.substr(0, 4) == "tank") { OpenTrack(_local1); } _root[_local1].removeMovieClip(); } function RemoveBullet(itemName) { var _local3 = itemName; var _local2 = -1; var _local1 = 0; while (_local1 < bulletArray.length) { if (bulletArray[_local1] == _local3) { _local2 = _local1; break; } _local1++; } if (_local2 != -1) { bulletArray.splice(_local2, 1); _root[_local3].removeMovieClip(); } } function addHelicopter(itemName, minSpawn, maxSpawn, mySpeed) { var _local1 = minSpawn; var _local2 = Math.round(Math.random() * (maxSpawn - _local1)) + _local1; heliArray.push({name:itemName, min:_local1, max:maxSpawn, counter:_local2, speed:mySpeed, inFlight:false, hasFired:false, isFiring:false}); } function ManageHelicopters() { var _local2 = _root; var _local1 = 0; while (_local1 < heliArray.length) { if (heliArray[_local1].inFlight == false) { if (heliArray[_local1].counter == 0) { heliArray[_local1].inFlight = true; _local2[heliArray[_local1].name]._x; r = random(2); if (r == 0) { x = _local2.boundingbox._x + (_local2.boundingbox._width / 2); _local2[heliArray[_local1].name]._xscale = 100; heliArray[_local1].speed = -Math.abs(heliArray[_local1].speed); } else { x = (_local2.boundingbox._x - (_local2.boundingbox._width / 2)) - _local2[heliArray[_local1].name]._width; _local2[heliArray[_local1].name]._xscale = -100; heliArray[_local1].speed = Math.abs(heliArray[_local1].speed); } _local2[heliArray[_local1].name]._x = x; var y = (Math.round(Math.random() * 151) + 53); _local2[heliArray[_local1].name]._y = y; } else { heliArray[_local1].counter--; } } else { if (heliArray[_local1].isFiring == false) { _local2[heliArray[_local1].name]._x = _local2[heliArray[_local1].name]._x + heliArray[_local1].speed; } if ((heliArray[_local1].hasFired == false) && (heliArray[_local1].isFiring == false)) { if (((_local2[heliArray[_local1].name]._x - _local2[heliArray[_local1].name]._width) > 0) && ((_local2[heliArray[_local1].name]._x + _local2[heliArray[_local1].name]._width) < Stage.width)) { _local2[heliArray[_local1].name].gotoAndPlay("shoot"); heliArray[_local1].isFiring = true; trace(heliArray[_local1].name + " has fired"); } } if (heliArray[_local1].hasFired == true) { if (((_local2[heliArray[_local1].name]._x + _local2[heliArray[_local1].name]._width) < (_local2.boundingbox._x - (_local2.boundingbox._width / 2))) || ((_local2[heliArray[_local1].name]._x - _local2[heliArray[_local1].name]._width) > (_local2.boundingbox._x + (_local2.boundingbox._width / 2)))) { trace("out of bounds"); heliArray[_local1].inFlight = false; var _local3 = Math.round(Math.random() * (heliArray[_local1].max - heliArray[_local1].min)) + heliArray[_local1].min; heliArray[_local1].counter = _local3; heliArray[_local1].hasFired = false; heliArray[_local1].isFiring = false; } } } _local1++; } } function HelicopterFire(name) { var _local3 = name; var _local2 = 0; var _local1 = 0; while (_local1 < heliArray.length) { if (heliArray[_local1].name == _local3) { _local2 = _local1; break; } _local1++; } var myName = ("bullet_helicopter_" + identifierNumber); identifierNumber++; var point = {x:_root[_local3].emitter1._x, y:_root[_local3].emitter1._y}; _root[_local3].localToGlobal(point); var bulletSpeed = 0; trace("helicopter speed is: " + heliArray[_local2].speed); if (heliArray[_local2].speed > 0) { bulletSpeed = heliArray[_local2].speed + 2; } else { bulletSpeed = heliArray[_local2].speed - 2; } LaunchBullet(myName, point.x, point.Y, bulletSpeed, 0); } function HelicopterDoneFiring(name) { var _local2 = name; var _local1 = 0; while (_local1 < heliArray.length) { if (heliArray[_local1].name == _local2) { heliArray[_local1].isFiring = false; heliArray[_local1].hasFired = true; return; } _local1++; } } function getDistance(i) { var _local1 = _root; distancex = _local1[objectArray[i].Name]._x - _local1.ship._x; distancey = _local1[objectArray[i].Name]._y - _local1.ship._y; return(Math.sqrt((distancex * distancex) + (distancey * distancey))); } function beamHorizontalAndVertical(asscheese, assY) { var _local1 = _root; var _local2 = asscheese; var _local3 = assY; i = 0; while (i < objectArray.length) { if ((objectArray[i].Beamed == 1) && (objectArray[i].Type != "agent")) { objectArray[i].Dx = _local2; if ((_local1.ship._x > 100) && (_local1.ship._X < 450)) { _local1[objectArray[i].Name]._x = _local1[objectArray[i].Name]._x + _local2; } if ((_local1.ship._y > 50) && (_local1.ship._y < 250)) { _local1[objectArray[i].Name]._y = _local1[objectArray[i].Name]._y + _local3; if (_local1[objectArray[i].Name]._y > objectArray[i].Ground) { _local1[objectArray[i].Name]._y = objectArray[i].Ground; } } } i++; } } function beamMeUp() { var _local1 = _root; var _local2 = new Array(); i = 0; while (i < objectArray.length) { if (objectArray[i].Type != "agent") { if (objectArray[i].Beamed == 1) { if (((objectArray[i].Type == "object") || (objectArray[i].Type == "tank")) && (objectArray[i].Linkage != "BonusIcon")) { maxheight = (_local1.ship._y + (_local1.ship._height / 2)) + (_local1[objectArray[i].Name]._height / 2); if (_local1[objectArray[i].Name]._y > maxheight) { _local1[objectArray[i].Name]._y = _local1[objectArray[i].Name]._y - 2; } } else if (_local1[objectArray[i].Name]._y > _local1.ship._y) { _local1[objectArray[i].Name]._y = _local1[objectArray[i].Name]._y - 2; } else if (objectArray[i].Beamed == 1) { _local1[objectArray[i].Name]._y = -20; objectArray[i].Beamed = 2; _local2.push({name:objectArray[i].Name, detach:true, debNum:4}); if (objectArray[i].Linkage != "BonusIcon") { if ((objectArray[i].Linkage != "person2") && (objectArray[i].Linkage != "person5")) { var scream = Math.round(Math.random() * 8); trace(scream); if (scream == 4) { playSound("maleEnjoy"); } else { playSound("maleScream"); } } else { playSound("maleScream"); } var scream = Math.round(Math.random() * 12); if (scream == 8) { var randSound = (Math.round(Math.random() * 3) + 1); _local1.playSound("rand" + randSound); } _global.currentPeople++; _global.totalPeople++; _local1.display._x = _local1.ship._x; _local1.display._y = _local1.ship._y; _local1.display.goToAndPlay("people"); } else { playSound("bonusSound"); _global.bonusPoints++; _local1.display._x = _local1.ship._x; _local1.display._y = _local1.ship._y; _local1.display.goToAndPlay("points"); } } if (_local1[objectArray[i].Name]._x < _local1.ship._x) { _local1[objectArray[i].Name]._x = _local1[objectArray[i].Name]._x + 1; if (_local1[objectArray[i].Name]._x >= _local1.ship._x) { _local1[objectArray[i].Name]._x = _local1.ship._x; } } if (_local1[objectArray[i].Name]._x > _local1.ship._x) { _local1[objectArray[i].Name]._x = _local1[objectArray[i].Name]._x - 1; if (_local1[objectArray[i].Name]._x <= _local1.ship._x) { _local1[objectArray[i].Name]._x = _local1.ship._x; } } } else { if (objectArray[i].Beamed == 2) { _local1[objectArray[i].Name].goToAndPlay("falling"); } if ((_local1[objectArray[i].Name]._y + (_local1[objectArray[i].Name]._height / 2)) == objectArray[i].Ground) { } else if (_local1[objectArray[i].Name]._y > 0) { _local1[objectArray[i].Name]._y = _local1[objectArray[i].Name]._y + objectArray[i].Dy; objectArray[i].Dy = objectArray[i].Dy + gravity; if (objectArray[i].Dy > yTerminalVelocity) { objectArray[i].Dy = yTerminalVelocity; } _local1[objectArray[i].Name]._x = _local1[objectArray[i].Name]._x + objectArray[i].Dx; if ((_local1[objectArray[i].Name]._y + (_local1[objectArray[i].Name]._height / 2)) >= objectArray[i].Ground) { useFriction = xGroundFriction; } else { useFriction = xFriction; } if ((objectArray[i].Dx >= -0.4) && (objectArray[i].Dx <= 0.4)) { objectArray[i].Dx = 0; } if (objectArray[i].Dx < 0) { objectArray[i].Dx = objectArray[i].Dx + useFriction; } if (objectArray[i].Dx > 0) { objectArray[i].Dx = objectArray[i].Dx - useFriction; } if ((_local1[objectArray[i].Name]._y + (_local1[objectArray[i].Name]._height / 2)) >= objectArray[i].Ground) { if (objectArray[i].Beamed == 2) { if ((objectArray[i].Ground - objectArray[i].FallHeight) < 20) { if (objectArray[i].Type == "tank") { _local1[objectArray[i].Name].gotoAndPlay("idle"); } else if (objectArray[i].Type == "person") { _local1[objectArray[i].Name].gotoAndPlay("run"); objectArray[i].Timer = 1; } if (objectArray[i].Type == "tank") { _local1[objectArray[i].Name].OpenFire(); } root[objectArray[i].Name]._y = objectArray[i].Ground; objectArray[i].Beamed = 0; } else { _local1[objectArray[i].Name].gotoAndPlay("collision"); _local1[objectArray[i].Name]._y = objectArray[i].Ground; if (objectArray[i].Linkage != nonDestructableType) { objectArray[i].Beamed = 3; } else { objectArray[i].Beamed = 0; } j = 0; while (j < objectArray.length) { if ((objectArray[j].Beamed == 0) && (_local1[objectArray[i].Name].hitTest(_local1[objectArray[j].Name]) == true)) { if (((objectArray[j].Type == "tank") && (objectArray[i].Type != "tank")) && ((objectArray[j].Type == "tank") && (objectArray[i].Type != "object"))) { } else { objectArray[j].Direction = 0; tempY = _local1[objectArray[j].Name]._y - (_local1[objectArray[i].Name].height / 100); howFar = objectArray[j].ZStack; objectArray[j].ZStack++; _local1[objectArray[i].Name].swapDepths((objectArray[j].Ground * 100) + howFar); _local1[objectArray[i].Name]._y = tempY; } if ((((objectArray[j].Type == "agent") || (objectArray[j].Type == "person")) || ((objectArray[j].Type == "tank") && (objectArray[i].Type == "tank"))) && (objectArray[j].Linkage != nonDestructableType)) { _local1[objectArray[j].Name].goToAndPlay("collision"); if (objectArray[j].Type == "tank") { _local1[objectArray[j].Name].HoldFire(); } deadArray.push(objectArray[j].Name); _local2.push({name:objectArray[j].Name, detach:false, debNum:5}); } } j++; } if (objectArray[i].Linkage != nonDestructableType) { deadArray.push(objectArray[i].Name); _local2.push({name:objectArray[i].Name, detach:false, debNum:6}); } } } objectArray[i].Dy = 0; } else if (objectArray[i].Beamed == 2) { hitFlag = false; if ((objectArray[i].Ground - objectArray[i].FallHeight) >= 20) { j = 0; while (j < objectArray.length) { if ((objectArray[j].Beamed == 0) && (_local1[objectArray[i].Name].hitTest(_local1[objectArray[j].Name]) == true)) { if (((objectArray[j].Type == "tank") && (objectArray[i].Type != "tank")) && ((objectArray[j].Type == "tank") && (objectArray[i].Type != "object"))) { } else { hitFlag = true; _local1[objectArray[i].Name].goToAndPlay("collision"); objectArray[j].Direction = 0; tempY = _local1[objectArray[j].Name]._y - _local1[objectArray[i].Name].height; howFar = objectArray[j].ZStack; objectArray[j].ZStack++; _local1[objectArray[i].Name].swapDepths((objectArray[j].Ground * 100) + howFar); _local1[objectArray[i].Name]._y = tempY; objectArray[i].Dy = 0; } if ((((((objectArray[j].Type == "agent") || (objectArray[j].Type == "person")) || (objectArray[j].Linkage == "bear")) || ((objectArray[j].Type == "tank") && (objectArray[i].Type == "tank"))) || ((objectArray[j].Type == "tank") && (objectArray[i].Type == "object"))) && (objectArray[j].Linkage != nonDestructableType)) { _local1[objectArray[j].Name].goToAndPlay("collision"); if (objectArray[j].Type == "tank") { _local1[objectArray[j].Name].HoldFire(); } deadArray.push(objectArray[j].Name); _local2.push({name:objectArray[j].Name, detach:false, debNum:5}); } break; } j++; } if (hitFlag == true) { if (objectArray[i].Linkage != nonDestructableType) { objectArray[i].Beamed = 3; } else { objectArray[i].Beamed = 0; } if (objectArray[i].Linkage != nonDestructableType) { deadArray.push(objectArray[i].Name); _local2.push({name:objectArray[i].Name, detach:false, debNum:6}); } } } } } } } else if (objectArray[i].Beamed == 1) { if (_local1.beam.hitTest(_local1[objectArray[i].Name]) == eval("False")) { objectArray[i].Beamed = 0; objectArray[i].Timer = 1; } } i++; } var _local3 = 0; while (_local3 < _local2.length) { removeObject(_local2[_local3].name, _local2[_local3].detach, _local2[_local3].debNum); _local3++; } } function moveTargets() { var _local1 = _root; if (targetArray_Name.length != 0) { i = 0; while (i < targetArray_Name.length) { if (targetArray_Frames[i] == 0) { myX = _local1[targetArray_Target[i]]._x; myY = _local1[targetArray_Target[i]]._y; } else { myX = _local1[targetArray_Name[i]]._x + ((_local1[targetArray_Target[i]]._x - _local1[targetArray_Name[i]]._x) / targetArray_Frames[i]); myY = _local1[targetArray_Name[i]]._y + ((_local1[targetArray_Target[i]]._y - _local1[targetArray_Name[i]]._y) / targetArray_Frames[i]); targetArray_Frames[i]--; } _local1[targetArray_Name[i]]._x = myX; _local1[targetArray_Name[i]]._y = myY; i++; } } } function createTarget(myTarget) { var _local1 = _root; name = "unique" + identifierNumber; identifierNumber++; _local1.attachMovie("manTarget", name, z3); z3++; targetArray_Name.push(name); targetArray_Target.push(objectArray[myTarget].Name); targetArray_Frames.push(15); _local1[name]._x = 275; _local1[name]._y = -60; } function removeTarget(myTarget) { var _local1 = myTarget; var _local2 = _root; i = 0; while (i < targetArray_Name.length) { if (targetArray_Target[i] == objectArray[_local1].Name) { _local2[targetArray_Name[i]].removeMovieClip(); targetArray_Name.splice(i, 1); targetArray_Target.splice(i, 1); targetArray_Frames.splice(i, 1); } i++; } } function moveScene(d) { var _local1 = d; var _local2 = _root; if (((panAmount + _local1) > panLimitLeft) and ((panAmount + _local1) < panLimitRight)) { panAmount = panAmount + _local1; trees._x = trees._x + (_local1 * 1); bushes._x = bushes._x + (_local1 * 0.8); hills._x = hills._x + (_local1 * 0.4); boundingbox._x = boundingbox._x + (_local1 * 1); i = 0; while (i < objectArray.length) { if ((((objectArray[i].Beamed == 0) || (objectArray[i].Beamed == 3)) || (objectArray[i].Beamed == 2)) || (objectArray[i].Type == "agent")) { _local2[objectArray[i].Name]._x = _local2[objectArray[i].Name]._x + _local1; } i++; } var i = 0; while (i < heliArray.length) { if (heliArray[i].inFlight == true) { _local2[heliArray[i].name]._x = _local2[heliArray[i].name]._x + _local1; } i++; } i = 0; while (i < deadArray.length) { _local2[deadArray[i]]._x = _local2[deadArray[i]]._x + _local1; i++; } i = 0; while (i < bulletArray.length) { _local2[bulletArray[i]]._x = _local2[bulletArray[i]]._x + _local1; i++; } return(0); } return(1); } function runLevel() { var _local1 = _root; var _local2 = _global; if (buttonCoolDown == 0) { if (Key.isDown(80) || (Key.isDown(27))) { buttonCoolDown = 10; if (_local2.gamePaused == false) { _local1.paused.gotoAndPlay("show"); _local2.gamePaused = true; intPauseTime = getTimer(); } else { _local1.paused.gotoAndPlay("hide"); _local2.gamePaused = false; if (_local2.nextTime != -1) { _local2.nextTime = _local2.nextTime + (getTimer() - intPauseTime); } intPauseTime = 0; } } } else { buttonCoolDown--; } if (_local2.gamePaused == false) { if (deathCounter == -1) { if (Key.isDown(39) && (!Key.isDown(37))) { dx = dx + sensitivity; if (dx > terminalVelocity) { dx = terminalVelocity; } } if (Key.isDown(37) && (!Key.isDown(39))) { dx = dx - sensitivity; if (dx < (terminalVelocity * -1)) { dx = terminalVelocity * -1; } } if (Key.isDown(40) && (!Key.isDown(38))) { dy = dy + sensitivity; if (dy > terminalVelocity) { dy = terminalVelocity; } } if (Key.isDown(38) && (!Key.isDown(40))) { dy = dy - sensitivity; if (dy < (terminalVelocity * -1)) { dy = terminalVelocity * -1; } } } } if (Key.isDown(68)) { _local2.debug = true; _local1.debugStatus(); } else { _local2.debug = false; } if (Key.isDown(16) && (Key.isDown(49))) { _local1.prepareForFrameChange(true, 5); _local2.gamePaused = false; _local2.cheated = true; } if (Key.isDown(16) && (Key.isDown(50))) { _local1.prepareForFrameChange(true, 10); _local2.gamePaused = false; _local2.cheated = true; } if (Key.isDown(16) && (Key.isDown(51))) { _local1.prepareForFrameChange(true, 15); _local2.gamePaused = false; _local2.cheated = true; } if (Key.isDown(16) && (Key.isDown(52))) { _local1.prepareForFrameChange(true, 20); _local2.gamePaused = false; _local2.cheated = true; } if (Key.isDown(16) && (Key.isDown(53))) { _local1.prepareForFrameChange(true, 25); _local2.gamePaused = false; _local2.cheated = true; } if (Key.isDown(16) && (Key.isDown(54))) { _local1.prepareForFrameChange(true, 30); _local2.gamePaused = false; _local2.cheated = true; } if (Key.isDown(16) && (Key.isDown(55))) { _local1.prepareForFrameChange(true, 35); _local2.gamePaused = false; _local2.cheated = true; } if (Key.isDown(16) && (Key.isDown(56))) { _local1.prepareForFrameChange(true, 40); _local2.gamePaused = false; _local2.cheated = true; } if (Key.isDown(16) && (Key.isDown(57))) { _local1.prepareForFrameChange(true, 45); _local2.gamePaused = false; _local2.cheated = true; } if (Key.isDown(16) && (Key.isDown(48))) { _local1.prepareForFrameChange(true, 50); _local2.gamePaused = false; _local2.cheated = true; } if (_local2.gamePaused == false) { if ((!Key.isDown(37)) && (!Key.isDown(39))) { if (dx > 0) { dx = dx - airFriction; } if (dx < 0) { dx = dx + airFriction; } if ((dx >= -0.3) && (dx <= 0.3)) { dx = 0; } } if ((!Key.isDown(38)) && (!Key.isDown(40))) { if (dy > 0) { dy = dy - airFriction; } if (dy < 0) { dy = dy + airFriction; } if ((dy >= -0.3) && (dy <= 0.3)) { dy = 0; } } if (Key.isDown(32) && (energyFlag == 0)) { _local1.beam.gotoandstop(2); shipEnergy = shipEnergy - beamCost; if (shipEnergy < 0) { shipEnergy = 0; energyFlag = 1; } beamFlag = true; _local1.startBeamTags(); } else { beamFlag = false; _local1.beam.gotoandstop(1); shipEnergy = shipEnergy + rechargeRate; if (shipEnergy > totalEnergy) { shipEnergy = totalEnergy; energyFlag = 0; } _local1.removeBeamTags(); } _local1.beamMeUp(); _local1.updateEnergyBar(shipEnergy, totalEnergy, energyFlag); _local1.ship._x = _local1.ship._x + dx; _local1.ship._y = _local1.ship._y + dy; if (beamFlag == true) { _local1.beamHorizontalAndVertical(dx, dy); } if (_local2.shipUsed == 1) { _local1.ship.inside._rotation = dx * 2.5; } if (_local1.ship._x > 450) { _local1.ship._x = 450; } if (_local1.ship._x < 100) { _local1.ship._x = 100; } if (_local1.ship._y < 50) { _local1.ship._y = 50; dy = 0; } if (_local1.ship._y > 250) { _local1.ship._y = 250; dy = 0; } _local1.shadow._x = _local1.ship._x; _local1.beam._x = _local1.ship._x; _local1.beam._y = (_local1.ship._y + (_local1.ship._y / 8)) + 35; _local1.beam._xscale = 50 + ((_local1.ship._y / 2.5) / 2); _local1.beam._yscale = 50 + ((_local1.ship._y / 2.5) / 2); _local1.shadow._alpha = _local1.ship._y / 4; _local1.shadow._xscale = 300 - _local1.ship._y; _local1.shadow._yscale = 300 - _local1.ship._y; varFlag = 0; if ((_local1.ship._x <= 100) && (dx < 0)) { varFlag = _local1.moveScene(-1 * dx); } else if ((_local1.ship._x >= 450) && (dx > 0)) { varFlag = _local1.moveScene(-1 * dx); } if (varFlag == 1) { dx = 0; } _local1.runTimer(); _local1.TankGenerator(); _local1.ManageHelicopters(); _local1.spotship(); _local1.makePeopleMove(); _local1.DetectBulletHits(); _local1.updatePeopleBar(_local2.currentPeople, _local2.totalPeopleToGet); _local1.moveTargets(); if (deathCounter >= 0) { if (deathCounter == 0) { _local2.livesLeft--; _local1.updateLives(_local2.livesLeft); _local1.prepareForFrameChange(false, 0); if (_local2.livesLeft != 0) { var randSound = (Math.round(Math.random() * 5) + 1); } } else { deathCounter--; } } if (_local2.nextTime != -1) { _local1.updateTimer(); } } } stop(); myNextLevel = 10; _global.debug = false; nonDestructableType = "rock"; panLimitLeft = -300; panLimitRight = 300; panAmount = 0; oldValue = 0; numPeople = 0; maxPeople = 0; percentFrequency = 0; zArray = new Array(); zStack = new Array(); z3 = 10000; objectArray = new Array(); bulletArray = new Array(); deadArray = new Array(); targetArray_Name = new Array(); targetArray_Target = new Array(); targetArray_Frames = new Array(); availPeople = new Array(); myVolume = 100; mySong = "Nothing"; myZ1 = 0; myZ2 = 0; terminalVelocity = 8; sensitivity = 0.4; totalEnergy = 200; shipEnergy = 200; rechargeRate = 2; beamCost = 2; timeToBeat = 180; airFriction = 0.15; xFriction = 0.15; xGroundFriction = 0.4; gravity = 0.4; yTerminalVelocity = 15; energyFlag = 0; pickUpFlag = 0; dropSpeed = 0; groundLevel = _root.truck._y; truckFlag = 0; dx = 0; dy = 0; tankArray = new Array(); tankSpawnTimeMin = 0; tankSpawnTimeMax = 0; tankCounter = -1; blnUseTanks = false; tanksToUse = "green"; heliArray = new Array(); bulletDepth = 30000; _global.totalPeopleToGet = 5; identifierNumber = 5; var mySoundPlayer = new SoundPlayer(); buttonCoolDown = 0; intPauseTime = 0; deathCounter = -1; almostFlag = false;
Instance of Symbol 304 MovieClip in Frame 35
onClipEvent (load) { _root.initializeLevel(35, 40, -700, 700, "", 300, 20); _root.updateLives(_global.livesLeft); _root.setPeopleTimer(25, 5); _root.addPersonType("ethan", "person", 25); _root.addPersonType("Astronaut", "person", 25); _root.addUnit("tank4", 2, "tank", "tank"); _root.addUnit("bonus1", 0, "BonusIcon", "object"); _root.addUnit("bonus2", 0, "BonusIcon", "object"); _root.addUnit("gun1", 0, "antiAir", "tank"); _root.addUnit("gun2", 0, "antiAir", "tank"); _root.addUnit("gun3", 0, "antiAir", "tank"); var gunName = _root.addUnit("gun4", 0, "antiAir", "tank"); _root[gunName]._xscale = _root[gunName]._xscale * -1; _root.addHelicopter("jet1", 40, 100, 10); _root.addHelicopter("jet2", 90, 200, 10); _root.addHelicopter("heli 1", 130, 250, 10); _root.StartTankGenerator(50, 80, "green"); _root.flash.swapDepths(100000); levelTrack = "area 51 level"; _root.startMusicDownload(levelTrack); } onClipEvent (enterFrame) { _root.runLevel(); }
Instance of Symbol 657 MovieClip "volumeClip" in Frame 35
onClipEvent (load) { if (_global.volume == true) { volumeClip.goToAndPlay("volumeOn"); } else { volumeClip.goToAndPlay("volumeOff"); } } on (release) { if (_global.volume == true) { _global.volume = false; _root.volumeClip.nextFrame(); _root.toggleMusic(); } else { _global.volume = true; _root.volumeClip.prevFrame(); _root.toggleMusic(); } }
Frame 40
function initializeLevel(currentLevel, nextLevel, leftMax, rightMax, nonDestructable, timeToWin, peopleToGet) { var _local1 = _global; var _local2 = _root; identifierNumber = currentLevel; myNextLevel = nextLevel; panLimitLeft = leftMax; panLimitRight = rightMax; nonDestructableType = nonDestructable; timeToBeat = timeToWin; _local1.totalPeopleToGet = peopleToGet; if (_local1.tempLives < 0) { _local1.livesLeft = 3; } else { _local1.livesLeft = _local1.tempLives; } energyFlag = 0; pickUpFlag = 0; dropSpeed = 0; groundLevel = _local2.truck._y; truckFlag = 0; dx = 0; dy = 0; if (_local1.tempPeople < 0) { _local1.currentPeople = 0; } else { _local1.currentPeople = _local1.tempPeople; } _local1.tempPeople = 0; _local1.tempLives = 0; _local1.tempFrame = identifierNumber; if (timeToBeat == -1) { _local1.nextTime = -1; _local2.updateTimer(); } else { if ((_local1.nextTime == -1) && (timeToBeat != -1)) { _local1.nextTime = 0; } if (_local1.nextTime != -1) { if (_local1.stolenTime == 0) { _local1.nextTime = getTimer() + (timeToBeat * 1000); } else { _local1.nextTime = _local1.nextTime + (getTimer() - _local1.stolenTime); _local1.stolenTime = 0; } } } _local1.stolenTime = 0; if (_local1.shipUsed == 1) { _local2.ship.gotoAndStop("ship1"); } else { _local2.ship.gotoAndStop("ship2"); } } function addPersonType(myLinkage, myType, myWeight) { availPeople.push({linkage:myLinkage, type:myType, weight:myWeight}); } function playSound(soundName) { if (_global.volume == true) { mySoundPlayer.PlaySound(soundName); } } function startMusicDownload(music) { var _local1 = _global; if (_local1.musicOn == true) { _local1.mySound.stop(); _local1.mySound.attachSound(music); _local1.mySound.start(0, 99); _local1.mySound.setVolume(myVolume); } else { _root.volumeClip.gotoAndStop(2); _local1.mySound.stop(); } mySong = music; } function toggleMusic() { var _local1 = _global; if (_local1.volume == true) { _local1.mySound.attachSound(mySong); _local1.mySound.start(0, 99); _local1.mySound.setVolume(myVolume); _local1.musicOn = true; } else { _local1.mySound.stop(); _local1.mySound.setVolume(myVolume); _local1.musicOn = false; } } function updateTimer() { var _local1 = _global; if (_local1.nextTime == -1) { timeText = "NO LIMIT"; } else { myTime = _local1.nextTime - getTimer(); mySecs = math.floor(myTime / 1000); if (mySecs == 0) { _local1.livesLeft = 0; prepareForFrameChange(false, 0); } if (mySecs > 60) { someSeconds = myTime / 1000; someMinutes = someSeconds / 60; if (someSeconds > 59) { someSeconds = someSeconds - (Math.floor(someMinutes) * 60); } if (someSeconds < 10) { textMinutes = someMinutes; timeText = (Math.floor(textMinutes) + ":0") + Math.floor(someSeconds); } else if (someSeconds == 0) { textMinutes = someMinutes; timeText = Math.floor(textMinutes) + ":00"; } else { textMinutes = someMinutes; timeText = (Math.floor(textMinutes) + ":") + Math.floor(someSeconds); } } else { timeText = Math.floor(mySecs); } } } function updateLives(lifeNum) { var _local1 = lifeNum; if (_local1 < 0) { _local1 = 0; } lives = _local1; } function prepareForFrameChange(newLevel, levelNum) { var _local1 = _global; var _local2 = _root; _local1.tempLives = _local1.livesLeft; _local1.tempPeople = _local1.currentPeople; cleanScreen(); if ((_local1.livesLeft > 0) && (newLevel == false)) { _local1.stolenTime = getTimer(); _local2.goToAndPlay("loseLife"); } else if ((_local1.livesLeft > 0) && (newLevel == true)) { _local1.tempPeople = -1; _local1.tempFrame = levelNum; _local2.goToAndPlay("levelText"); } else if (_local1.livesLeft == 0) { _local2.goToAndPlay("endGame"); } } function cleanScreen() { var _local1 = _root; i = 0; while (i < objectArray.length) { _local1[objectArray[i].Name].removeMovieClip(); i++; } i = 0; while (i < deadArray.length) { _local1[deadArray[i]].removeMovieClip(); i++; } i = 0; while (i < targetArray_Name.length) { _local1[targetArray_Name[i]].removeMovieClip(); i++; } i = 0; while (i < bulletArray.length) { _local1[bulletArray[i]].removeMovieClip(); i++; } } function setPeopleTimer(mPeople, pFrequency) { var _local1 = _root; myZ2 = Math.round(_local1.z2._y); myZ1 = Math.round(_local1.z1._y); _local1.z1._y = -50; _local1.z2._y = -50; i = myZ1; while (i < myZ2) { zArray.push(i); zStack.push(1); i++; } percentFrequency = pFrequency; maxPeople = mPeople; } function runTimer() { if (numPeople != maxPeople) { if (random(255) < percentFrequency) { numPeople++; addPersonDynamic(false); } } } function rangeInUse(minZ, maxZ) { var _local2 = maxZ; var _local3 = minZ; var _local1 = false; i = 0; while (i < objectArray.length) { if ((objectArray[i].ZStack >= _local3) && (objectArray[i].ZStack <= _local2)) { _local1 = true; } i++; } return(_local1); } function startBeamTags() { var _local1 = _root; i = 0; while (i < objectArray.length) { if (_local1.beam.hitTest(_local1[objectArray[i].Name]) == true) { if (objectArray[i].Beamed == 0) { _local1[objectArray[i].Name].goToAndPlay("beamed"); objectArray[i].Beamed = 1; objectArray[i].Dy = 0; if (objectArray[i].Type == "tank") { _local1[objectArray[i].Name].HoldFire(); } } if (objectArray[i].Beamed == 2) { _local1[objectArray[i].Name].goToAndStop("endbeam"); objectArray[i].Beamed = 1; objectArray[i].Dy = 0; } } i++; } } function debugStatus() { trace("Name type beamed timer"); trace("----------------------------------------"); i = 0; while (i < objectArray.length) { trace((((((((((objectArray[i].Name + " ") + objectArray[i].Type) + " ") + objectArray[i].Beamed) + " ") + objectArray[i].Timer) + " ") + objectArray[i].Spotted) + " ") + objectArray[i].Direction); i++; } trace("----------------------------------------"); } function removeBeamTags() { var _local1 = _root; i = 0; while (i < objectArray.length) { if ((objectArray[i].Beamed == 1) && (objectArray[i].Type != "agent")) { objectArray[i].Beamed = 2; objectArray[i].FallHeight = _local1[objectArray[i].Name]._y; } else if ((objectArray[i].Beamed == 1) && (objectArray[i].Type == "agent")) { objectArray[i].Beamed = 0; objectArray[i].Timer = 1; } i++; } } function addUnit(name, newSpeed, myLinkage, givenType) { var _local1 = _root; var _local2 = name; var _local3 = newSpeed; tempX = _local1[_local2]._x; tempY = _local1[_local2]._y; wantY = Math.round(tempY); flag = -1; myZStack = -1; i = 0; while (i < zArray.length) { if (zArray[i] == wantY) { flag = i; myZstack = zStack[i]; } i++; } if (flag != -1) { zArray.splice(flag, 1); zStack.splice(flag, 1); } _local1[_local2]._visible = false; _local2 = givenType + identifierNumber; identifierNumber++; _local1.attachMovie(myLinkage, _local2, wantY * 100); if (givenType == "tank") { _local1[_local2].SetFireRate(40); tankArray.push({track:wantY, occupied:true, tank:_local2}); } _local1[_local2]._x = tempX; _local1[_local2]._y = tempY; x = 275; if ((_local1[_local2]._x <= x) && (_local3 != 0)) { dir = _local3; _local1[_local2]._xscale = -Math.abs(_local1[_local2]._xscale); if (myLinkage == "antiAir") { _local1[_local2]._xscale = _local1[_local2]._xscale * -1; } } else { dir = -1 * _local3; } var groundLevel = Math.round(_local1[_local2]._y + (_local1[_local2]._height / 2)); objectArray.push({Name:_local2, Beamed:0, Type:givenType, Ground:groundLevel, Dx:0, Dy:0, Timer:0, Spotted:0, Linkage:myLinkage, ZStack:myZStack, Direction:dir, FallHeight:0}); return(_local2); } function generateEthan() { addPersonDynamic(true); } function addPersonDynamic(isEthan) { if (zArray.length == 0) { return(null); } if (isEthan == false) { r = random(2); switch (r) { case 0 : var _local3 = 0; var _local2 = -1; var _local1 = 0; while (_local1 < availPeople.length) { _local3 = _local3 + availPeople[_local1].weight; _local1++; } var chosenWeight = Math.round(Math.random() * _local3); _local1 = 0; while (_local1 < availPeople.length) { if ((chosenWeight > _local2) && (chosenWeight <= (_local2 + availPeople[_local1].weight))) { myGuy = availPeople[_local1].linkage; myType = availPeople[_local1].type; break; } _local2 = _local2 + availPeople[_local1].weight; _local1++; } break; case 1 : myGuy = "MIB"; myType = "agent"; } } else { myGuy = "ethan"; myType = "person"; } r = random(zArray.length); z = zArray[r]; zs = zStack[r]; zArray.splice(r, 1); zStack.splice(r, 1); name = "unique" + identifierNumber; identifierNumber++; _root.attachMovie(myGuy, name, z * 100); r = random(2); if (r == 0) { x = _root.boundingbox._x + (_root.boundingbox._width / 2); } else { x = _root.boundingbox._x - (_root.boundingbox._width / 2); } _root[name]._x = x; _root[name]._y = z; x = _root.hills._x; if (_root[name]._x <= x) { dir = 1; if (myType == "agent") { _root[name]._xscale = -Math.abs(_root[name]._xscale); } } else { dir = -1; if (myType != "agent") { _root[name]._xscale = -Math.abs(_root[name]._xscale); } } _root[name].goToAndPlay("walk"); objectArray.push({Name:name, Beamed:0, Type:myType, Ground:z, Dx:0, Dy:0, Timer:0, Spotted:0, Linkage:myGuy, ZStack:zs, Direction:dir, FallHeight:0}); return(undefined); } function addTank(name, newSpeed, myLinkage, myTrack) { var _local1 = _root; var _local3 = myTrack; var _local2 = "tank"; if (tanksToUse == "red") { _local2 = "redTank"; } if (tanksToUse == "white") { _local2 = "whiteTank"; } _local1.attachMovie(_local2, name, _local3 * 100); r = random(2); if (r == 0) { x = _local1.boundingbox._x + (_local1.boundingbox._width / 2); } else { x = _local1.boundingbox._x - (_local1.boundingbox._width / 2); } _local1[name]._x = x; if (tanksToUse == "red") { _local1[name].SetFireRate(15); } else if (tanksToUse == "white") { _local1[name].SetFireRate(25); } else { _local1[name].SetFireRate(40); } _local1[name]._y = _local3; x = _local1.hills._x; if (_local1[name]._x <= x) { dir = 1; _local1[name]._xscale = _local1[name]._xscale * -1; } else { dir = -1; } _local1[name].goToAndPlay("idle"); objectArray.push({Name:name, Beamed:0, Type:"tank", Ground:_local3, Dx:0, Dy:0, Timer:0, Spotted:0, Linkage:"tank", ZStack:999999, Direction:dir, FallHeight:0}); } function makePeopleMove() { var _local1 = _root; var _local3 = _global; var queueRemoval = new Array(); i = 0; while (i < objectArray.length) { if (objectArray[i].Beamed == 0) { if (objectArray[i].Timer == 1) { if (_local3.debug == true) { trace(i); } if (_local1[objectArray[i].Name]._x < _local1.ship._x) { objectArray[i].Direction = -3; if (objectArray[i].Type == "person") { _local1[objectArray[i].Name]._xscale = -Math.abs(_local1[objectArray[i].Name]._xscale); } else if (objectArray[i].Type == "agent") { _local1[objectArray[i].Name]._xscale = Math.abs(_local1[objectArray[i].Name]._xscale); if (objectArray[i].Spotted == 0) { createTarget(i); objectArray[i].Spotted = 1; } } } else { objectArray[i].Direction = 3; if (objectArray[i].Type == "person") { _local1[objectArray[i].Name]._xscale = Math.abs(_local1[objectArray[i].Name]._xscale); } else if (objectArray[i].Type == "agent") { _local1[objectArray[i].Name]._xscale = -Math.abs(_local1[objectArray[i].Name]._xscale); if (objectArray[i].Spotted == 0) { createTarget(i); objectArray[i].Spotted = 1; } } } _local1[objectArray[i].Name].gotoandplay("run"); } if (objectArray[i].Timer > 0) { objectArray[i].Timer--; } _local1[objectArray[i].Name]._x = _local1[objectArray[i].Name]._x + objectArray[i].Direction; if ((_local1[objectArray[i].Name]._x < (_local1.boundingbox._x - (_local1.boundingbox._width / 2))) && (objectArray[i].Direction < 0)) { if (objectArray[i].Spotted == 1) { _local3.livesLeft--; _local1.updateLives(_local3.livesLeft); _local1.prepareForFrameChange(false, 0); if (_local3.livesLeft != 0) { var randSound = (Math.round(Math.random() * 5) + 1); } } if (objectArray[i].Type == "tank") { OpenTrack(objectArray[i].Name); } queueRemoval.push({name:objectArray[i].Name, detach:true, debNum:1}); } else if ((_local1[objectArray[i].Name]._x > (_local1.boundingbox._x + (_local1.boundingbox._width / 2))) && (objectArray[i].Direction > 0)) { if (objectArray[i].Spotted == 1) { _local3.livesLeft--; _local1.updateLives(_local3.livesLeft); _local1.prepareForFrameChange(false, 0); if (_local3.livesLeft != 0) { var randSound = (Math.round(Math.random() * 5) + 1); } } if (objectArray[i].Type == "tank") { OpenTrack(objectArray[i].Name); } queueRemoval.push({name:objectArray[i].Name, detach:true, debNum:2}); } } i++; } var _local2 = 0; while (_local2 < queueRemoval.length) { removeObject(queueRemoval[_local2].name, queueRemoval[_local2].detach, queueRemoval[_local2].debNum); _local2++; } tanksAim(); } function removeObject(objectName, removeFromScreen, debugNum) { var _local2 = removeFromScreen; var _local3 = _root; i = -1; var _local1 = 0; while (_local1 < objectArray.length) { if (objectArray[_local1].Name == objectName) { i = _local1; if (objectArray[_local1].Type != "tank") { zArray.push(objectArray[_local1].Ground); zStack.push(objectArray[_local1].ZStack); } if ((objectArray[_local1].Type != "object") && (objectArray[_local1].Type != "tank")) { numPeople--; } if (objectArray[_local1].Spotted == 1) { removeTarget(i); } if (_local2) { _local3[objectArray[_local1].Name].removeMovieClip(); } objectArray.splice(_local1, 1); return; } _local1++; } } function updateEnergyBar(current, total, flag) { var _local1 = _root; frac = current / total; _local1.energy._xscale = frac * 100; if (flag == 1) { _local1.energy.goToAndStop(2); } else { _local1.energy.goToAndStop(1); } } function updatePeopleBar(current, total) { var _local1 = current; var _local2 = total; var _local3 = _root; frac = _local1 / _local2; _local3.peopleToGo._xscale = frac * 100; myFrame = 10; frac = (_local1 / _local2) * 100; if (frac < 10) { myFrame = 1; } else if ((frac >= 10) && (frac < 20)) { myFrame = 2; } else if ((frac >= 20) && (frac < 30)) { myFrame = 3; } else if ((frac >= 30) && (frac < 40)) { myFrame = 4; } else if ((frac >= 40) && (frac < 50)) { myFrame = 5; } else if ((frac >= 50) && (frac < 60)) { myFrame = 6; } else if ((frac >= 60) && (frac < 70)) { myFrame = 7; } else if ((frac >= 70) && (frac < 80)) { myFrame = 8; } else if ((frac >= 80) && (frac < 90)) { myFrame = 9; } else if ((frac >= 90) && (frac <= 100)) { myFrame = 10; } if (oldValue != myFrame) { _local3.peopleToGo.goToAndStop(myFrame); } oldValue = myFrame; if ((_local1 == (_local2 - 2)) && (almostFlag == false)) { var randSound = (Math.round(Math.random() * 4) + 1); _local3.playSound("good" + randSound); almostFlag = true; } if (_local1 == _local2) { prepareForFrameChange(true, myNextLevel); } } function spotship() { var _local1 = _root; i = 0; while (i < objectArray.length) { if (((objectArray[i].Beamed == 0) && ((objectArray[i].Type == "person") || (objectArray[i].Type == "agent"))) && ((objectArray[i].Direction == 1) || (objectArray[i].Direction == -1))) { myDist = getDistance(i); if (myDist <= 175) { if (((objectArray[i].Direction == 1) && (_local1[objectArray[i].Name]._x < _local1.ship._x)) && (_local1[objectArray[i].Name]._x >= 50)) { _local1[objectArray[i].Name].gotoandplay("spot"); objectArray[i].Direction = 0; objectArray[i].Timer = 30; } else if (((objectArray[i].Direction == -1) && (_local1[objectArray[i].Name]._x > _local1.ship._x)) && (_local1[objectArray[i].Name]._x <= 500)) { _local1[objectArray[i].Name].gotoandplay("spot"); objectArray[i].Direction = 0; objectArray[i].Timer = 30; } } } i++; } } function tanksAim() { var _local3 = _root; var _local2 = 0; while (_local2 < objectArray.length) { if ((objectArray[_local2].Beamed == 0) && (objectArray[_local2].Type == "tank")) { var tankName = objectArray[_local2].Name; var point = {x:_local3[tankName].cannon._x, y:_local3[tankName].cannon._y}; _local3[tankName].localToGlobal(point); var op = (_local3.ship._y - point.y); var adj = (_local3.ship._x - point.x); if (adj == 0) { adj = 1; } var _local1 = (Math.atan(op / adj) * 180) / Math.PI; if (_local1 < 0) { _local1 = _local1 * -1; } if (_local1 > 90) { _local1 = 90; } if (_local1 < 20) { _local1 = 20; } _local3[tankName].cannon._rotation = _local1; } _local2++; } } function StartTankGenerator(min, max, color) { tanksToUse = color; blnUseTanks = true; tankSpawnTimeMin = min; tankSpawnTimeMax = max; tankCounter = Math.round(Math.random() * (tankSpawnTimeMax - tankSpawnTimeMin)) + tankSpawnTimeMin; } function TankGenerator() { if (blnUseTanks == true) { intAvailFlag = -1; var _local1 = 0; while (_local1 < tankArray.length) { if (tankArray[_local1].occupied == false) { intAvailFlag = _local1; break; } _local1++; } if (intAvailFlag != -1) { if (tankCounter == 0) { var _local2 = "tank" + identifierNumber; identifierNumber++; tankArray[intAvailFlag].occupied = true; tankArray[intAvailFlag].tank = _local2; addTank(_local2, 3, "tank", tankArray[intAvailFlag].track); tankCounter = Math.round(Math.random() * (tankSpawnTimeMax - tankSpawnTimeMin)) + tankSpawnTimeMin; } else { tankCounter--; } } } } function OpenTrack(tankName) { var _local2 = tankName; var _local1 = 0; while (_local1 < tankArray.length) { if (tankArray[_local1].tank == _local2) { tankArray[_local1].tank = ""; tankArray[_local1].occupied = false; trace(("track " + _local1) + " is open"); } _local1++; } } function LaunchBullet(bulletName, startX, startY, directionX, directionY) { var _local1 = bulletName; var _local3 = _root; var _local2 = ""; if ((substring(_local1, 0, 18)) == "bullet_helicopter_") { _local2 = "bullet air"; } else { _local2 = "bullet ground"; } _local3.attachMovie(_local2, _local1, bulletDepth); _local3[_local1]._x = startX; _local3[_local1]._y = startY; _local3[_local1].SetMovement(directionX, directionY); bulletArray.push(_local1); bulletDepth++; } function DetectBulletHits() { var _local1 = _root; var _local3 = new Array(); var _local2 = 0; while (_local2 < bulletArray.length) { distancex = _local1[bulletArray[_local2]]._x - _local1.ship._x; distancey = _local1[bulletArray[_local2]]._y - _local1.ship._y; if (Math.sqrt((distancex * distancex) + (distancey * distancey)) <= 19) { if ((substring(bulletArray[_local2], 0, 18)) == "bullet_helicopter_") { shipEnergy = 0; energyFlag = 1; _local1.ship.explosion.gotoAndPlay("shock"); _local3.push(bulletArray[_local2]); } else { _local1.ship.explosion.gotoAndPlay("explode"); _local1.playSound("explosion"); if (deathCounter == -1) { deathCounter = 16; } _local3.push(bulletArray[_local2]); } } _local2++; } _local2 = 0; while (_local2 < _local3.length) { RemoveBullet(_local3[_local2]); _local2++; } } function ObjectCleanup(itemName) { var _local1 = itemName; if (_local1.substr(0, 4) == "tank") { OpenTrack(_local1); } _root[_local1].removeMovieClip(); } function RemoveBullet(itemName) { var _local3 = itemName; var _local2 = -1; var _local1 = 0; while (_local1 < bulletArray.length) { if (bulletArray[_local1] == _local3) { _local2 = _local1; break; } _local1++; } if (_local2 != -1) { bulletArray.splice(_local2, 1); _root[_local3].removeMovieClip(); } } function addHelicopter(itemName, minSpawn, maxSpawn, mySpeed) { var _local1 = minSpawn; var _local2 = Math.round(Math.random() * (maxSpawn - _local1)) + _local1; heliArray.push({name:itemName, min:_local1, max:maxSpawn, counter:_local2, speed:mySpeed, inFlight:false, hasFired:false, isFiring:false}); } function ManageHelicopters() { var _local2 = _root; var _local1 = 0; while (_local1 < heliArray.length) { if (heliArray[_local1].inFlight == false) { if (heliArray[_local1].counter == 0) { heliArray[_local1].inFlight = true; _local2[heliArray[_local1].name]._x; r = random(2); if (r == 0) { x = _local2.boundingbox._x + (_local2.boundingbox._width / 2); _local2[heliArray[_local1].name]._xscale = 100; heliArray[_local1].speed = -Math.abs(heliArray[_local1].speed); } else { x = (_local2.boundingbox._x - (_local2.boundingbox._width / 2)) - _local2[heliArray[_local1].name]._width; _local2[heliArray[_local1].name]._xscale = -100; heliArray[_local1].speed = Math.abs(heliArray[_local1].speed); } _local2[heliArray[_local1].name]._x = x; var y = (Math.round(Math.random() * 151) + 53); _local2[heliArray[_local1].name]._y = y; } else { heliArray[_local1].counter--; } } else { if (heliArray[_local1].isFiring == false) { _local2[heliArray[_local1].name]._x = _local2[heliArray[_local1].name]._x + heliArray[_local1].speed; } if ((heliArray[_local1].hasFired == false) && (heliArray[_local1].isFiring == false)) { if (((_local2[heliArray[_local1].name]._x - _local2[heliArray[_local1].name]._width) > 0) && ((_local2[heliArray[_local1].name]._x + _local2[heliArray[_local1].name]._width) < Stage.width)) { _local2[heliArray[_local1].name].gotoAndPlay("shoot"); heliArray[_local1].isFiring = true; trace(heliArray[_local1].name + " has fired"); } } if (heliArray[_local1].hasFired == true) { if (((_local2[heliArray[_local1].name]._x + _local2[heliArray[_local1].name]._width) < (_local2.boundingbox._x - (_local2.boundingbox._width / 2))) || ((_local2[heliArray[_local1].name]._x - _local2[heliArray[_local1].name]._width) > (_local2.boundingbox._x + (_local2.boundingbox._width / 2)))) { trace("out of bounds"); heliArray[_local1].inFlight = false; var _local3 = Math.round(Math.random() * (heliArray[_local1].max - heliArray[_local1].min)) + heliArray[_local1].min; heliArray[_local1].counter = _local3; heliArray[_local1].hasFired = false; heliArray[_local1].isFiring = false; } } } _local1++; } } function HelicopterFire(name) { var _local3 = name; var _local2 = 0; var _local1 = 0; while (_local1 < heliArray.length) { if (heliArray[_local1].name == _local3) { _local2 = _local1; break; } _local1++; } var myName = ("bullet_helicopter_" + identifierNumber); identifierNumber++; var point = {x:_root[_local3].emitter1._x, y:_root[_local3].emitter1._y}; _root[_local3].localToGlobal(point); var bulletSpeed = 0; trace("helicopter speed is: " + heliArray[_local2].speed); if (heliArray[_local2].speed > 0) { bulletSpeed = heliArray[_local2].speed + 2; } else { bulletSpeed = heliArray[_local2].speed - 2; } LaunchBullet(myName, point.x, point.Y, bulletSpeed, 0); } function HelicopterDoneFiring(name) { var _local2 = name; var _local1 = 0; while (_local1 < heliArray.length) { if (heliArray[_local1].name == _local2) { heliArray[_local1].isFiring = false; heliArray[_local1].hasFired = true; return; } _local1++; } } function getDistance(i) { var _local1 = _root; distancex = _local1[objectArray[i].Name]._x - _local1.ship._x; distancey = _local1[objectArray[i].Name]._y - _local1.ship._y; return(Math.sqrt((distancex * distancex) + (distancey * distancey))); } function beamHorizontalAndVertical(asscheese, assY) { var _local1 = _root; var _local2 = asscheese; var _local3 = assY; i = 0; while (i < objectArray.length) { if ((objectArray[i].Beamed == 1) && (objectArray[i].Type != "agent")) { objectArray[i].Dx = _local2; if ((_local1.ship._x > 100) && (_local1.ship._X < 450)) { _local1[objectArray[i].Name]._x = _local1[objectArray[i].Name]._x + _local2; } if ((_local1.ship._y > 50) && (_local1.ship._y < 250)) { _local1[objectArray[i].Name]._y = _local1[objectArray[i].Name]._y + _local3; if (_local1[objectArray[i].Name]._y > objectArray[i].Ground) { _local1[objectArray[i].Name]._y = objectArray[i].Ground; } } } i++; } } function beamMeUp() { var _local1 = _root; var _local2 = new Array(); i = 0; while (i < objectArray.length) { if (objectArray[i].Type != "agent") { if (objectArray[i].Beamed == 1) { if (((objectArray[i].Type == "object") || (objectArray[i].Type == "tank")) && (objectArray[i].Linkage != "BonusIcon")) { maxheight = (_local1.ship._y + (_local1.ship._height / 2)) + (_local1[objectArray[i].Name]._height / 2); if (_local1[objectArray[i].Name]._y > maxheight) { _local1[objectArray[i].Name]._y = _local1[objectArray[i].Name]._y - 2; } } else if (_local1[objectArray[i].Name]._y > _local1.ship._y) { _local1[objectArray[i].Name]._y = _local1[objectArray[i].Name]._y - 2; } else if (objectArray[i].Beamed == 1) { _local1[objectArray[i].Name]._y = -20; objectArray[i].Beamed = 2; _local2.push({name:objectArray[i].Name, detach:true, debNum:4}); if (objectArray[i].Linkage != "BonusIcon") { if ((objectArray[i].Linkage != "person2") && (objectArray[i].Linkage != "person5")) { var scream = Math.round(Math.random() * 8); trace(scream); if (scream == 4) { playSound("maleEnjoy"); } else { playSound("maleScream"); } } else { playSound("maleScream"); } var scream = Math.round(Math.random() * 12); if (scream == 8) { var randSound = (Math.round(Math.random() * 3) + 1); _local1.playSound("rand" + randSound); } _global.currentPeople++; _global.totalPeople++; _local1.display._x = _local1.ship._x; _local1.display._y = _local1.ship._y; _local1.display.goToAndPlay("people"); } else { playSound("bonusSound"); _global.bonusPoints++; _local1.display._x = _local1.ship._x; _local1.display._y = _local1.ship._y; _local1.display.goToAndPlay("points"); } } if (_local1[objectArray[i].Name]._x < _local1.ship._x) { _local1[objectArray[i].Name]._x = _local1[objectArray[i].Name]._x + 1; if (_local1[objectArray[i].Name]._x >= _local1.ship._x) { _local1[objectArray[i].Name]._x = _local1.ship._x; } } if (_local1[objectArray[i].Name]._x > _local1.ship._x) { _local1[objectArray[i].Name]._x = _local1[objectArray[i].Name]._x - 1; if (_local1[objectArray[i].Name]._x <= _local1.ship._x) { _local1[objectArray[i].Name]._x = _local1.ship._x; } } } else { if (objectArray[i].Beamed == 2) { _local1[objectArray[i].Name].goToAndPlay("falling"); } if ((_local1[objectArray[i].Name]._y + (_local1[objectArray[i].Name]._height / 2)) == objectArray[i].Ground) { } else if (_local1[objectArray[i].Name]._y > 0) { _local1[objectArray[i].Name]._y = _local1[objectArray[i].Name]._y + objectArray[i].Dy; objectArray[i].Dy = objectArray[i].Dy + gravity; if (objectArray[i].Dy > yTerminalVelocity) { objectArray[i].Dy = yTerminalVelocity; } _local1[objectArray[i].Name]._x = _local1[objectArray[i].Name]._x + objectArray[i].Dx; if ((_local1[objectArray[i].Name]._y + (_local1[objectArray[i].Name]._height / 2)) >= objectArray[i].Ground) { useFriction = xGroundFriction; } else { useFriction = xFriction; } if ((objectArray[i].Dx >= -0.4) && (objectArray[i].Dx <= 0.4)) { objectArray[i].Dx = 0; } if (objectArray[i].Dx < 0) { objectArray[i].Dx = objectArray[i].Dx + useFriction; } if (objectArray[i].Dx > 0) { objectArray[i].Dx = objectArray[i].Dx - useFriction; } if ((_local1[objectArray[i].Name]._y + (_local1[objectArray[i].Name]._height / 2)) >= objectArray[i].Ground) { if (objectArray[i].Beamed == 2) { if ((objectArray[i].Ground - objectArray[i].FallHeight) < 20) { if (objectArray[i].Type == "tank") { _local1[objectArray[i].Name].gotoAndPlay("idle"); } else if (objectArray[i].Type == "person") { _local1[objectArray[i].Name].gotoAndPlay("run"); objectArray[i].Timer = 1; } if (objectArray[i].Type == "tank") { _local1[objectArray[i].Name].OpenFire(); } root[objectArray[i].Name]._y = objectArray[i].Ground; objectArray[i].Beamed = 0; } else { _local1[objectArray[i].Name].gotoAndPlay("collision"); _local1[objectArray[i].Name]._y = objectArray[i].Ground; if (objectArray[i].Linkage != nonDestructableType) { objectArray[i].Beamed = 3; } else { objectArray[i].Beamed = 0; } j = 0; while (j < objectArray.length) { if ((objectArray[j].Beamed == 0) && (_local1[objectArray[i].Name].hitTest(_local1[objectArray[j].Name]) == true)) { if (((objectArray[j].Type == "tank") && (objectArray[i].Type != "tank")) && ((objectArray[j].Type == "tank") && (objectArray[i].Type != "object"))) { } else { objectArray[j].Direction = 0; tempY = _local1[objectArray[j].Name]._y - (_local1[objectArray[i].Name].height / 100); howFar = objectArray[j].ZStack; objectArray[j].ZStack++; _local1[objectArray[i].Name].swapDepths((objectArray[j].Ground * 100) + howFar); _local1[objectArray[i].Name]._y = tempY; } if ((((objectArray[j].Type == "agent") || (objectArray[j].Type == "person")) || ((objectArray[j].Type == "tank") && (objectArray[i].Type == "tank"))) && (objectArray[j].Linkage != nonDestructableType)) { _local1[objectArray[j].Name].goToAndPlay("collision"); if (objectArray[j].Type == "tank") { _local1[objectArray[j].Name].HoldFire(); } deadArray.push(objectArray[j].Name); _local2.push({name:objectArray[j].Name, detach:false, debNum:5}); } } j++; } if (objectArray[i].Linkage != nonDestructableType) { deadArray.push(objectArray[i].Name); _local2.push({name:objectArray[i].Name, detach:false, debNum:6}); } } } objectArray[i].Dy = 0; } else if (objectArray[i].Beamed == 2) { hitFlag = false; if ((objectArray[i].Ground - objectArray[i].FallHeight) >= 20) { j = 0; while (j < objectArray.length) { if ((objectArray[j].Beamed == 0) && (_local1[objectArray[i].Name].hitTest(_local1[objectArray[j].Name]) == true)) { if (((objectArray[j].Type == "tank") && (objectArray[i].Type != "tank")) && ((objectArray[j].Type == "tank") && (objectArray[i].Type != "object"))) { } else { hitFlag = true; _local1[objectArray[i].Name].goToAndPlay("collision"); objectArray[j].Direction = 0; tempY = _local1[objectArray[j].Name]._y - _local1[objectArray[i].Name].height; howFar = objectArray[j].ZStack; objectArray[j].ZStack++; _local1[objectArray[i].Name].swapDepths((objectArray[j].Ground * 100) + howFar); _local1[objectArray[i].Name]._y = tempY; objectArray[i].Dy = 0; } if ((((((objectArray[j].Type == "agent") || (objectArray[j].Type == "person")) || (objectArray[j].Linkage == "bear")) || ((objectArray[j].Type == "tank") && (objectArray[i].Type == "tank"))) || ((objectArray[j].Type == "tank") && (objectArray[i].Type == "object"))) && (objectArray[j].Linkage != nonDestructableType)) { _local1[objectArray[j].Name].goToAndPlay("collision"); if (objectArray[j].Type == "tank") { _local1[objectArray[j].Name].HoldFire(); } deadArray.push(objectArray[j].Name); _local2.push({name:objectArray[j].Name, detach:false, debNum:5}); } break; } j++; } if (hitFlag == true) { if (objectArray[i].Linkage != nonDestructableType) { objectArray[i].Beamed = 3; } else { objectArray[i].Beamed = 0; } if (objectArray[i].Linkage != nonDestructableType) { deadArray.push(objectArray[i].Name); _local2.push({name:objectArray[i].Name, detach:false, debNum:6}); } } } } } } } else if (objectArray[i].Beamed == 1) { if (_local1.beam.hitTest(_local1[objectArray[i].Name]) == eval("False")) { objectArray[i].Beamed = 0; objectArray[i].Timer = 1; } } i++; } var _local3 = 0; while (_local3 < _local2.length) { removeObject(_local2[_local3].name, _local2[_local3].detach, _local2[_local3].debNum); _local3++; } } function moveTargets() { var _local1 = _root; if (targetArray_Name.length != 0) { i = 0; while (i < targetArray_Name.length) { if (targetArray_Frames[i] == 0) { myX = _local1[targetArray_Target[i]]._x; myY = _local1[targetArray_Target[i]]._y; } else { myX = _local1[targetArray_Name[i]]._x + ((_local1[targetArray_Target[i]]._x - _local1[targetArray_Name[i]]._x) / targetArray_Frames[i]); myY = _local1[targetArray_Name[i]]._y + ((_local1[targetArray_Target[i]]._y - _local1[targetArray_Name[i]]._y) / targetArray_Frames[i]); targetArray_Frames[i]--; } _local1[targetArray_Name[i]]._x = myX; _local1[targetArray_Name[i]]._y = myY; i++; } } } function createTarget(myTarget) { var _local1 = _root; name = "unique" + identifierNumber; identifierNumber++; _local1.attachMovie("manTarget", name, z3); z3++; targetArray_Name.push(name); targetArray_Target.push(objectArray[myTarget].Name); targetArray_Frames.push(15); _local1[name]._x = 275; _local1[name]._y = -60; } function removeTarget(myTarget) { var _local1 = myTarget; var _local2 = _root; i = 0; while (i < targetArray_Name.length) { if (targetArray_Target[i] == objectArray[_local1].Name) { _local2[targetArray_Name[i]].removeMovieClip(); targetArray_Name.splice(i, 1); targetArray_Target.splice(i, 1); targetArray_Frames.splice(i, 1); } i++; } } function moveScene(d) { var _local1 = d; var _local2 = _root; if (((panAmount + _local1) > panLimitLeft) and ((panAmount + _local1) < panLimitRight)) { panAmount = panAmount + _local1; trees._x = trees._x + (_local1 * 1); bushes._x = bushes._x + (_local1 * 0.8); hills._x = hills._x + (_local1 * 0.4); boundingbox._x = boundingbox._x + (_local1 * 1); i = 0; while (i < objectArray.length) { if ((((objectArray[i].Beamed == 0) || (objectArray[i].Beamed == 3)) || (objectArray[i].Beamed == 2)) || (objectArray[i].Type == "agent")) { _local2[objectArray[i].Name]._x = _local2[objectArray[i].Name]._x + _local1; } i++; } var i = 0; while (i < heliArray.length) { if (heliArray[i].inFlight == true) { _local2[heliArray[i].name]._x = _local2[heliArray[i].name]._x + _local1; } i++; } i = 0; while (i < deadArray.length) { _local2[deadArray[i]]._x = _local2[deadArray[i]]._x + _local1; i++; } i = 0; while (i < bulletArray.length) { _local2[bulletArray[i]]._x = _local2[bulletArray[i]]._x + _local1; i++; } return(0); } return(1); } function runLevel() { var _local1 = _root; var _local2 = _global; if (buttonCoolDown == 0) { if (Key.isDown(80) || (Key.isDown(27))) { buttonCoolDown = 10; if (_local2.gamePaused == false) { _local1.paused.gotoAndPlay("show"); _local2.gamePaused = true; intPauseTime = getTimer(); } else { _local1.paused.gotoAndPlay("hide"); _local2.gamePaused = false; if (_local2.nextTime != -1) { _local2.nextTime = _local2.nextTime + (getTimer() - intPauseTime); } intPauseTime = 0; } } } else { buttonCoolDown--; } if (_local2.gamePaused == false) { if (deathCounter == -1) { if (Key.isDown(39) && (!Key.isDown(37))) { dx = dx + sensitivity; if (dx > terminalVelocity) { dx = terminalVelocity; } } if (Key.isDown(37) && (!Key.isDown(39))) { dx = dx - sensitivity; if (dx < (terminalVelocity * -1)) { dx = terminalVelocity * -1; } } if (Key.isDown(40) && (!Key.isDown(38))) { dy = dy + sensitivity; if (dy > terminalVelocity) { dy = terminalVelocity; } } if (Key.isDown(38) && (!Key.isDown(40))) { dy = dy - sensitivity; if (dy < (terminalVelocity * -1)) { dy = terminalVelocity * -1; } } } } if (Key.isDown(68)) { _local2.debug = true; _local1.debugStatus(); } else { _local2.debug = false; } if (Key.isDown(16) && (Key.isDown(49))) { _local1.prepareForFrameChange(true, 5); _local2.gamePaused = false; _local2.cheated = true; } if (Key.isDown(16) && (Key.isDown(50))) { _local1.prepareForFrameChange(true, 10); _local2.gamePaused = false; _local2.cheated = true; } if (Key.isDown(16) && (Key.isDown(51))) { _local1.prepareForFrameChange(true, 15); _local2.gamePaused = false; _local2.cheated = true; } if (Key.isDown(16) && (Key.isDown(52))) { _local1.prepareForFrameChange(true, 20); _local2.gamePaused = false; _local2.cheated = true; } if (Key.isDown(16) && (Key.isDown(53))) { _local1.prepareForFrameChange(true, 25); _local2.gamePaused = false; _local2.cheated = true; } if (Key.isDown(16) && (Key.isDown(54))) { _local1.prepareForFrameChange(true, 30); _local2.gamePaused = false; _local2.cheated = true; } if (Key.isDown(16) && (Key.isDown(55))) { _local1.prepareForFrameChange(true, 35); _local2.gamePaused = false; _local2.cheated = true; } if (Key.isDown(16) && (Key.isDown(56))) { _local1.prepareForFrameChange(true, 40); _local2.gamePaused = false; _local2.cheated = true; } if (Key.isDown(16) && (Key.isDown(57))) { _local1.prepareForFrameChange(true, 45); _local2.gamePaused = false; _local2.cheated = true; } if (Key.isDown(16) && (Key.isDown(48))) { _local1.prepareForFrameChange(true, 50); _local2.gamePaused = false; _local2.cheated = true; } if (_local2.gamePaused == false) { if ((!Key.isDown(37)) && (!Key.isDown(39))) { if (dx > 0) { dx = dx - airFriction; } if (dx < 0) { dx = dx + airFriction; } if ((dx >= -0.3) && (dx <= 0.3)) { dx = 0; } } if ((!Key.isDown(38)) && (!Key.isDown(40))) { if (dy > 0) { dy = dy - airFriction; } if (dy < 0) { dy = dy + airFriction; } if ((dy >= -0.3) && (dy <= 0.3)) { dy = 0; } } if (Key.isDown(32) && (energyFlag == 0)) { _local1.beam.gotoandstop(2); shipEnergy = shipEnergy - beamCost; if (shipEnergy < 0) { shipEnergy = 0; energyFlag = 1; } beamFlag = true; _local1.startBeamTags(); } else { beamFlag = false; _local1.beam.gotoandstop(1); shipEnergy = shipEnergy + rechargeRate; if (shipEnergy > totalEnergy) { shipEnergy = totalEnergy; energyFlag = 0; } _local1.removeBeamTags(); } _local1.beamMeUp(); _local1.updateEnergyBar(shipEnergy, totalEnergy, energyFlag); _local1.ship._x = _local1.ship._x + dx; _local1.ship._y = _local1.ship._y + dy; if (beamFlag == true) { _local1.beamHorizontalAndVertical(dx, dy); } if (_local2.shipUsed == 1) { _local1.ship.inside._rotation = dx * 2.5; } if (_local1.ship._x > 450) { _local1.ship._x = 450; } if (_local1.ship._x < 100) { _local1.ship._x = 100; } if (_local1.ship._y < 50) { _local1.ship._y = 50; dy = 0; } if (_local1.ship._y > 250) { _local1.ship._y = 250; dy = 0; } _local1.shadow._x = _local1.ship._x; _local1.beam._x = _local1.ship._x; _local1.beam._y = (_local1.ship._y + (_local1.ship._y / 8)) + 35; _local1.beam._xscale = 50 + ((_local1.ship._y / 2.5) / 2); _local1.beam._yscale = 50 + ((_local1.ship._y / 2.5) / 2); _local1.shadow._alpha = _local1.ship._y / 4; _local1.shadow._xscale = 300 - _local1.ship._y; _local1.shadow._yscale = 300 - _local1.ship._y; varFlag = 0; if ((_local1.ship._x <= 100) && (dx < 0)) { varFlag = _local1.moveScene(-1 * dx); } else if ((_local1.ship._x >= 450) && (dx > 0)) { varFlag = _local1.moveScene(-1 * dx); } if (varFlag == 1) { dx = 0; } _local1.runTimer(); _local1.TankGenerator(); _local1.ManageHelicopters(); _local1.spotship(); _local1.makePeopleMove(); _local1.DetectBulletHits(); _local1.updatePeopleBar(_local2.currentPeople, _local2.totalPeopleToGet); _local1.moveTargets(); if (deathCounter >= 0) { if (deathCounter == 0) { _local2.livesLeft--; _local1.updateLives(_local2.livesLeft); _local1.prepareForFrameChange(false, 0); if (_local2.livesLeft != 0) { var randSound = (Math.round(Math.random() * 5) + 1); } } else { deathCounter--; } } if (_local2.nextTime != -1) { _local1.updateTimer(); } } } stop(); myNextLevel = 10; _global.debug = false; nonDestructableType = "rock"; panLimitLeft = -300; panLimitRight = 300; panAmount = 0; oldValue = 0; numPeople = 0; maxPeople = 0; percentFrequency = 0; zArray = new Array(); zStack = new Array(); z3 = 10000; objectArray = new Array(); bulletArray = new Array(); deadArray = new Array(); targetArray_Name = new Array(); targetArray_Target = new Array(); targetArray_Frames = new Array(); availPeople = new Array(); myVolume = 100; mySong = "Nothing"; myZ1 = 0; myZ2 = 0; terminalVelocity = 8; sensitivity = 0.4; totalEnergy = 200; shipEnergy = 200; rechargeRate = 2; beamCost = 2; timeToBeat = 180; airFriction = 0.15; xFriction = 0.15; xGroundFriction = 0.4; gravity = 0.4; yTerminalVelocity = 15; energyFlag = 0; pickUpFlag = 0; dropSpeed = 0; groundLevel = _root.truck._y; truckFlag = 0; dx = 0; dy = 0; tankArray = new Array(); tankSpawnTimeMin = 0; tankSpawnTimeMax = 0; tankCounter = -1; blnUseTanks = false; tanksToUse = "green"; heliArray = new Array(); bulletDepth = 30000; _global.totalPeopleToGet = 5; identifierNumber = 5; var mySoundPlayer = new SoundPlayer(); buttonCoolDown = 0; intPauseTime = 0; deathCounter = -1; almostFlag = false;
Instance of Symbol 304 MovieClip in Frame 40
onClipEvent (load) { _root.initializeLevel(40, 45, -780, 780, "", -1, 25); _root.updateLives(_global.livesLeft); _root.setPeopleTimer(20, 5); _root.addPersonType("ethan", "person", 25); _root.addPersonType("Astronaut", "person", 25); _root.addUnit("tank1", 2, "whiteTank", "tank"); _root.addUnit("tank2", 2, "whiteTank", "tank"); _root.addUnit("tank3", 2, "whiteTank", "tank"); _root.addUnit("tank4", 2, "whiteTank", "tank"); _root.addUnit("tank5", 2, "whiteTank", "tank"); _root.addUnit("tank6", 2, "whiteTank", "tank"); _root.addUnit("bonus4", 0, "BonusIcon", "object"); _root.addUnit("bonus5", 0, "BonusIcon", "object"); _root.addUnit("bonus3", 0, "BonusIcon", "object"); _root.addHelicopter("space1", 40, 100, 9); _root.addHelicopter("space2", 90, 200, 9); _root.addHelicopter("space3", 20, 200, 9); _root.addHelicopter("space4", 60, 220, 9); _root.StartTankGenerator(50, 80, "white"); levelTrack = "moon level"; _root.startMusicDownload(levelTrack); } onClipEvent (enterFrame) { _root.runLevel(); }
Instance of Symbol 657 MovieClip "volumeClip" in Frame 40
onClipEvent (load) { if (_global.volume == true) { volumeClip.goToAndPlay("volumeOn"); } else { volumeClip.goToAndPlay("volumeOff"); } } on (release) { if (_global.volume == true) { _global.volume = false; _root.volumeClip.nextFrame(); _root.toggleMusic(); } else { _global.volume = true; _root.volumeClip.prevFrame(); _root.toggleMusic(); } }
Frame 45
function initializeLevel(currentLevel, nextLevel, leftMax, rightMax, nonDestructable, timeToWin, peopleToGet) { var _local1 = _global; var _local2 = _root; identifierNumber = currentLevel; myNextLevel = nextLevel; panLimitLeft = leftMax; panLimitRight = rightMax; nonDestructableType = nonDestructable; timeToBeat = timeToWin; _local1.totalPeopleToGet = peopleToGet; if (_local1.tempLives < 0) { _local1.livesLeft = 3; } else { _local1.livesLeft = _local1.tempLives; } energyFlag = 0; pickUpFlag = 0; dropSpeed = 0; groundLevel = _local2.truck._y; truckFlag = 0; dx = 0; dy = 0; if (_local1.tempPeople < 0) { _local1.currentPeople = 0; } else { _local1.currentPeople = _local1.tempPeople; } _local1.tempPeople = 0; _local1.tempLives = 0; _local1.tempFrame = identifierNumber; if (timeToBeat == -1) { _local1.nextTime = -1; _local2.updateTimer(); } else { if ((_local1.nextTime == -1) && (timeToBeat != -1)) { _local1.nextTime = 0; } if (_local1.nextTime != -1) { if (_local1.stolenTime == 0) { _local1.nextTime = getTimer() + (timeToBeat * 1000); } else { _local1.nextTime = _local1.nextTime + (getTimer() - _local1.stolenTime); _local1.stolenTime = 0; } } } _local1.stolenTime = 0; if (_local1.shipUsed == 1) { _local2.ship.gotoAndStop("ship1"); } else { _local2.ship.gotoAndStop("ship2"); } } function addPersonType(myLinkage, myType, myWeight) { availPeople.push({linkage:myLinkage, type:myType, weight:myWeight}); } function playSound(soundName) { if (_global.volume == true) { mySoundPlayer.PlaySound(soundName); } } function startMusicDownload(music) { var _local1 = _global; if (_local1.musicOn == true) { _local1.mySound.stop(); _local1.mySound.attachSound(music); _local1.mySound.start(0, 99); _local1.mySound.setVolume(myVolume); } else { _root.volumeClip.gotoAndStop(2); _local1.mySound.stop(); } mySong = music; } function toggleMusic() { var _local1 = _global; if (_local1.volume == true) { _local1.mySound.attachSound(mySong); _local1.mySound.start(0, 99); _local1.mySound.setVolume(myVolume); _local1.musicOn = true; } else { _local1.mySound.stop(); _local1.mySound.setVolume(myVolume); _local1.musicOn = false; } } function updateTimer() { var _local1 = _global; if (_local1.nextTime == -1) { timeText = "NO LIMIT"; } else { myTime = _local1.nextTime - getTimer(); mySecs = math.floor(myTime / 1000); if (mySecs == 0) { _local1.livesLeft = 0; prepareForFrameChange(false, 0); } if (mySecs > 60) { someSeconds = myTime / 1000; someMinutes = someSeconds / 60; if (someSeconds > 59) { someSeconds = someSeconds - (Math.floor(someMinutes) * 60); } if (someSeconds < 10) { textMinutes = someMinutes; timeText = (Math.floor(textMinutes) + ":0") + Math.floor(someSeconds); } else if (someSeconds == 0) { textMinutes = someMinutes; timeText = Math.floor(textMinutes) + ":00"; } else { textMinutes = someMinutes; timeText = (Math.floor(textMinutes) + ":") + Math.floor(someSeconds); } } else { timeText = Math.floor(mySecs); } } } function updateLives(lifeNum) { var _local1 = lifeNum; if (_local1 < 0) { _local1 = 0; } lives = _local1; } function prepareForFrameChange(newLevel, levelNum) { var _local1 = _global; var _local2 = _root; _local1.tempLives = _local1.livesLeft; _local1.tempPeople = _local1.currentPeople; cleanScreen(); if ((_local1.livesLeft > 0) && (newLevel == false)) { _local1.stolenTime = getTimer(); _local2.goToAndPlay("loseLife"); } else if ((_local1.livesLeft > 0) && (newLevel == true)) { _local1.tempPeople = -1; _local1.tempFrame = levelNum; _local2.goToAndPlay("levelText"); } else if (_local1.livesLeft == 0) { _local2.goToAndPlay("endGame"); } } function cleanScreen() { var _local1 = _root; i = 0; while (i < objectArray.length) { _local1[objectArray[i].Name].removeMovieClip(); i++; } i = 0; while (i < deadArray.length) { _local1[deadArray[i]].removeMovieClip(); i++; } i = 0; while (i < targetArray_Name.length) { _local1[targetArray_Name[i]].removeMovieClip(); i++; } i = 0; while (i < bulletArray.length) { _local1[bulletArray[i]].removeMovieClip(); i++; } } function setPeopleTimer(mPeople, pFrequency) { var _local1 = _root; myZ2 = Math.round(_local1.z2._y); myZ1 = Math.round(_local1.z1._y); _local1.z1._y = -50; _local1.z2._y = -50; i = myZ1; while (i < myZ2) { zArray.push(i); zStack.push(1); i++; } percentFrequency = pFrequency; maxPeople = mPeople; } function runTimer() { if (numPeople != maxPeople) { if (random(255) < percentFrequency) { numPeople++; addPersonDynamic(false); } } } function rangeInUse(minZ, maxZ) { var _local2 = maxZ; var _local3 = minZ; var _local1 = false; i = 0; while (i < objectArray.length) { if ((objectArray[i].ZStack >= _local3) && (objectArray[i].ZStack <= _local2)) { _local1 = true; } i++; } return(_local1); } function startBeamTags() { var _local1 = _root; i = 0; while (i < objectArray.length) { if (_local1.beam.hitTest(_local1[objectArray[i].Name]) == true) { if (objectArray[i].Beamed == 0) { _local1[objectArray[i].Name].goToAndPlay("beamed"); objectArray[i].Beamed = 1; objectArray[i].Dy = 0; if (objectArray[i].Type == "tank") { _local1[objectArray[i].Name].HoldFire(); } } if (objectArray[i].Beamed == 2) { _local1[objectArray[i].Name].goToAndStop("endbeam"); objectArray[i].Beamed = 1; objectArray[i].Dy = 0; } } i++; } } function debugStatus() { trace("Name type beamed timer"); trace("----------------------------------------"); i = 0; while (i < objectArray.length) { trace((((((((((objectArray[i].Name + " ") + objectArray[i].Type) + " ") + objectArray[i].Beamed) + " ") + objectArray[i].Timer) + " ") + objectArray[i].Spotted) + " ") + objectArray[i].Direction); i++; } trace("----------------------------------------"); } function removeBeamTags() { var _local1 = _root; i = 0; while (i < objectArray.length) { if ((objectArray[i].Beamed == 1) && (objectArray[i].Type != "agent")) { objectArray[i].Beamed = 2; objectArray[i].FallHeight = _local1[objectArray[i].Name]._y; } else if ((objectArray[i].Beamed == 1) && (objectArray[i].Type == "agent")) { objectArray[i].Beamed = 0; objectArray[i].Timer = 1; } i++; } } function addUnit(name, newSpeed, myLinkage, givenType) { var _local1 = _root; var _local2 = name; var _local3 = newSpeed; tempX = _local1[_local2]._x; tempY = _local1[_local2]._y; wantY = Math.round(tempY); flag = -1; myZStack = -1; i = 0; while (i < zArray.length) { if (zArray[i] == wantY) { flag = i; myZstack = zStack[i]; } i++; } if (flag != -1) { zArray.splice(flag, 1); zStack.splice(flag, 1); } _local1[_local2]._visible = false; _local2 = givenType + identifierNumber; identifierNumber++; _local1.attachMovie(myLinkage, _local2, wantY * 100); if (givenType == "tank") { _local1[_local2].SetFireRate(40); tankArray.push({track:wantY, occupied:true, tank:_local2}); } _local1[_local2]._x = tempX; _local1[_local2]._y = tempY; x = 275; if ((_local1[_local2]._x <= x) && (_local3 != 0)) { dir = _local3; _local1[_local2]._xscale = -Math.abs(_local1[_local2]._xscale); if (myLinkage == "antiAir") { _local1[_local2]._xscale = _local1[_local2]._xscale * -1; } } else { dir = -1 * _local3; } var groundLevel = Math.round(_local1[_local2]._y + (_local1[_local2]._height / 2)); objectArray.push({Name:_local2, Beamed:0, Type:givenType, Ground:groundLevel, Dx:0, Dy:0, Timer:0, Spotted:0, Linkage:myLinkage, ZStack:myZStack, Direction:dir, FallHeight:0}); return(_local2); } function generateEthan() { addPersonDynamic(true); } function addPersonDynamic(isEthan) { if (zArray.length == 0) { return(null); } if (isEthan == false) { r = random(2); switch (r) { case 0 : var _local3 = 0; var _local2 = -1; var _local1 = 0; while (_local1 < availPeople.length) { _local3 = _local3 + availPeople[_local1].weight; _local1++; } var chosenWeight = Math.round(Math.random() * _local3); _local1 = 0; while (_local1 < availPeople.length) { if ((chosenWeight > _local2) && (chosenWeight <= (_local2 + availPeople[_local1].weight))) { myGuy = availPeople[_local1].linkage; myType = availPeople[_local1].type; break; } _local2 = _local2 + availPeople[_local1].weight; _local1++; } break; case 1 : myGuy = "MIB"; myType = "agent"; } } else { myGuy = "ethan"; myType = "person"; } r = random(zArray.length); z = zArray[r]; zs = zStack[r]; zArray.splice(r, 1); zStack.splice(r, 1); name = "unique" + identifierNumber; identifierNumber++; _root.attachMovie(myGuy, name, z * 100); r = random(2); if (r == 0) { x = _root.boundingbox._x + (_root.boundingbox._width / 2); } else { x = _root.boundingbox._x - (_root.boundingbox._width / 2); } _root[name]._x = x; _root[name]._y = z; x = _root.hills._x; if (_root[name]._x <= x) { dir = 1; if (myType == "agent") { _root[name]._xscale = -Math.abs(_root[name]._xscale); } } else { dir = -1; if (myType != "agent") { _root[name]._xscale = -Math.abs(_root[name]._xscale); } } _root[name].goToAndPlay("walk"); objectArray.push({Name:name, Beamed:0, Type:myType, Ground:z, Dx:0, Dy:0, Timer:0, Spotted:0, Linkage:myGuy, ZStack:zs, Direction:dir, FallHeight:0}); return(undefined); } function addTank(name, newSpeed, myLinkage, myTrack) { var _local1 = _root; var _local3 = myTrack; var _local2 = "tank"; if (tanksToUse == "red") { _local2 = "redTank"; } if (tanksToUse == "white") { _local2 = "whiteTank"; } _local1.attachMovie(_local2, name, _local3 * 100); r = random(2); if (r == 0) { x = _local1.boundingbox._x + (_local1.boundingbox._width / 2); } else { x = _local1.boundingbox._x - (_local1.boundingbox._width / 2); } _local1[name]._x = x; if (tanksToUse == "red") { _local1[name].SetFireRate(15); } else if (tanksToUse == "white") { _local1[name].SetFireRate(25); } else { _local1[name].SetFireRate(40); } _local1[name]._y = _local3; x = _local1.hills._x; if (_local1[name]._x <= x) { dir = 1; _local1[name]._xscale = _local1[name]._xscale * -1; } else { dir = -1; } _local1[name].goToAndPlay("idle"); objectArray.push({Name:name, Beamed:0, Type:"tank", Ground:_local3, Dx:0, Dy:0, Timer:0, Spotted:0, Linkage:"tank", ZStack:999999, Direction:dir, FallHeight:0}); } function makePeopleMove() { var _local1 = _root; var _local3 = _global; var queueRemoval = new Array(); i = 0; while (i < objectArray.length) { if (objectArray[i].Beamed == 0) { if (objectArray[i].Timer == 1) { if (_local3.debug == true) { trace(i); } if (_local1[objectArray[i].Name]._x < _local1.ship._x) { objectArray[i].Direction = -3; if (objectArray[i].Type == "person") { _local1[objectArray[i].Name]._xscale = -Math.abs(_local1[objectArray[i].Name]._xscale); } else if (objectArray[i].Type == "agent") { _local1[objectArray[i].Name]._xscale = Math.abs(_local1[objectArray[i].Name]._xscale); if (objectArray[i].Spotted == 0) { createTarget(i); objectArray[i].Spotted = 1; } } } else { objectArray[i].Direction = 3; if (objectArray[i].Type == "person") { _local1[objectArray[i].Name]._xscale = Math.abs(_local1[objectArray[i].Name]._xscale); } else if (objectArray[i].Type == "agent") { _local1[objectArray[i].Name]._xscale = -Math.abs(_local1[objectArray[i].Name]._xscale); if (objectArray[i].Spotted == 0) { createTarget(i); objectArray[i].Spotted = 1; } } } _local1[objectArray[i].Name].gotoandplay("run"); } if (objectArray[i].Timer > 0) { objectArray[i].Timer--; } _local1[objectArray[i].Name]._x = _local1[objectArray[i].Name]._x + objectArray[i].Direction; if ((_local1[objectArray[i].Name]._x < (_local1.boundingbox._x - (_local1.boundingbox._width / 2))) && (objectArray[i].Direction < 0)) { if (objectArray[i].Spotted == 1) { _local3.livesLeft--; _local1.updateLives(_local3.livesLeft); _local1.prepareForFrameChange(false, 0); if (_local3.livesLeft != 0) { var randSound = (Math.round(Math.random() * 5) + 1); } } if (objectArray[i].Type == "tank") { OpenTrack(objectArray[i].Name); } queueRemoval.push({name:objectArray[i].Name, detach:true, debNum:1}); } else if ((_local1[objectArray[i].Name]._x > (_local1.boundingbox._x + (_local1.boundingbox._width / 2))) && (objectArray[i].Direction > 0)) { if (objectArray[i].Spotted == 1) { _local3.livesLeft--; _local1.updateLives(_local3.livesLeft); _local1.prepareForFrameChange(false, 0); if (_local3.livesLeft != 0) { var randSound = (Math.round(Math.random() * 5) + 1); } } if (objectArray[i].Type == "tank") { OpenTrack(objectArray[i].Name); } queueRemoval.push({name:objectArray[i].Name, detach:true, debNum:2}); } } i++; } var _local2 = 0; while (_local2 < queueRemoval.length) { removeObject(queueRemoval[_local2].name, queueRemoval[_local2].detach, queueRemoval[_local2].debNum); _local2++; } tanksAim(); } function removeObject(objectName, removeFromScreen, debugNum) { var _local2 = removeFromScreen; var _local3 = _root; i = -1; var _local1 = 0; while (_local1 < objectArray.length) { if (objectArray[_local1].Name == objectName) { i = _local1; if (objectArray[_local1].Type != "tank") { zArray.push(objectArray[_local1].Ground); zStack.push(objectArray[_local1].ZStack); } if ((objectArray[_local1].Type != "object") && (objectArray[_local1].Type != "tank")) { numPeople--; } if (objectArray[_local1].Spotted == 1) { removeTarget(i); } if (_local2) { _local3[objectArray[_local1].Name].removeMovieClip(); } objectArray.splice(_local1, 1); return; } _local1++; } } function updateEnergyBar(current, total, flag) { var _local1 = _root; frac = current / total; _local1.energy._xscale = frac * 100; if (flag == 1) { _local1.energy.goToAndStop(2); } else { _local1.energy.goToAndStop(1); } } function updatePeopleBar(current, total) { var _local1 = current; var _local2 = total; var _local3 = _root; frac = _local1 / _local2; _local3.peopleToGo._xscale = frac * 100; myFrame = 10; frac = (_local1 / _local2) * 100; if (frac < 10) { myFrame = 1; } else if ((frac >= 10) && (frac < 20)) { myFrame = 2; } else if ((frac >= 20) && (frac < 30)) { myFrame = 3; } else if ((frac >= 30) && (frac < 40)) { myFrame = 4; } else if ((frac >= 40) && (frac < 50)) { myFrame = 5; } else if ((frac >= 50) && (frac < 60)) { myFrame = 6; } else if ((frac >= 60) && (frac < 70)) { myFrame = 7; } else if ((frac >= 70) && (frac < 80)) { myFrame = 8; } else if ((frac >= 80) && (frac < 90)) { myFrame = 9; } else if ((frac >= 90) && (frac <= 100)) { myFrame = 10; } if (oldValue != myFrame) { _local3.peopleToGo.goToAndStop(myFrame); } oldValue = myFrame; if ((_local1 == (_local2 - 2)) && (almostFlag == false)) { var randSound = (Math.round(Math.random() * 4) + 1); _local3.playSound("good" + randSound); almostFlag = true; } if (_local1 == _local2) { prepareForFrameChange(true, myNextLevel); } } function spotship() { var _local1 = _root; i = 0; while (i < objectArray.length) { if (((objectArray[i].Beamed == 0) && ((objectArray[i].Type == "person") || (objectArray[i].Type == "agent"))) && ((objectArray[i].Direction == 1) || (objectArray[i].Direction == -1))) { myDist = getDistance(i); if (myDist <= 175) { if (((objectArray[i].Direction == 1) && (_local1[objectArray[i].Name]._x < _local1.ship._x)) && (_local1[objectArray[i].Name]._x >= 50)) { _local1[objectArray[i].Name].gotoandplay("spot"); objectArray[i].Direction = 0; objectArray[i].Timer = 30; } else if (((objectArray[i].Direction == -1) && (_local1[objectArray[i].Name]._x > _local1.ship._x)) && (_local1[objectArray[i].Name]._x <= 500)) { _local1[objectArray[i].Name].gotoandplay("spot"); objectArray[i].Direction = 0; objectArray[i].Timer = 30; } } } i++; } } function tanksAim() { var _local3 = _root; var _local2 = 0; while (_local2 < objectArray.length) { if ((objectArray[_local2].Beamed == 0) && (objectArray[_local2].Type == "tank")) { var tankName = objectArray[_local2].Name; var point = {x:_local3[tankName].cannon._x, y:_local3[tankName].cannon._y}; _local3[tankName].localToGlobal(point); var op = (_local3.ship._y - point.y); var adj = (_local3.ship._x - point.x); if (adj == 0) { adj = 1; } var _local1 = (Math.atan(op / adj) * 180) / Math.PI; if (_local1 < 0) { _local1 = _local1 * -1; } if (_local1 > 90) { _local1 = 90; } if (_local1 < 20) { _local1 = 20; } _local3[tankName].cannon._rotation = _local1; } _local2++; } } function StartTankGenerator(min, max, color) { tanksToUse = color; blnUseTanks = true; tankSpawnTimeMin = min; tankSpawnTimeMax = max; tankCounter = Math.round(Math.random() * (tankSpawnTimeMax - tankSpawnTimeMin)) + tankSpawnTimeMin; } function TankGenerator() { if (blnUseTanks == true) { intAvailFlag = -1; var _local1 = 0; while (_local1 < tankArray.length) { if (tankArray[_local1].occupied == false) { intAvailFlag = _local1; break; } _local1++; } if (intAvailFlag != -1) { if (tankCounter == 0) { var _local2 = "tank" + identifierNumber; identifierNumber++; tankArray[intAvailFlag].occupied = true; tankArray[intAvailFlag].tank = _local2; addTank(_local2, 3, "tank", tankArray[intAvailFlag].track); tankCounter = Math.round(Math.random() * (tankSpawnTimeMax - tankSpawnTimeMin)) + tankSpawnTimeMin; } else { tankCounter--; } } } } function OpenTrack(tankName) { var _local2 = tankName; var _local1 = 0; while (_local1 < tankArray.length) { if (tankArray[_local1].tank == _local2) { tankArray[_local1].tank = ""; tankArray[_local1].occupied = false; trace(("track " + _local1) + " is open"); } _local1++; } } function LaunchBullet(bulletName, startX, startY, directionX, directionY) { var _local1 = bulletName; var _local3 = _root; var _local2 = ""; if ((substring(_local1, 0, 18)) == "bullet_helicopter_") { _local2 = "bullet air"; } else { _local2 = "bullet ground"; } _local3.attachMovie(_local2, _local1, bulletDepth); _local3[_local1]._x = startX; _local3[_local1]._y = startY; _local3[_local1].SetMovement(directionX, directionY); bulletArray.push(_local1); bulletDepth++; } function DetectBulletHits() { var _local1 = _root; var _local3 = new Array(); var _local2 = 0; while (_local2 < bulletArray.length) { distancex = _local1[bulletArray[_local2]]._x - _local1.ship._x; distancey = _local1[bulletArray[_local2]]._y - _local1.ship._y; if (Math.sqrt((distancex * distancex) + (distancey * distancey)) <= 19) { if ((substring(bulletArray[_local2], 0, 18)) == "bullet_helicopter_") { shipEnergy = 0; energyFlag = 1; _local1.ship.explosion.gotoAndPlay("shock"); _local3.push(bulletArray[_local2]); } else { _local1.ship.explosion.gotoAndPlay("explode"); _local1.playSound("explosion"); if (deathCounter == -1) { deathCounter = 16; } _local3.push(bulletArray[_local2]); } } _local2++; } _local2 = 0; while (_local2 < _local3.length) { RemoveBullet(_local3[_local2]); _local2++; } } function ObjectCleanup(itemName) { var _local1 = itemName; if (_local1.substr(0, 4) == "tank") { OpenTrack(_local1); } _root[_local1].removeMovieClip(); } function RemoveBullet(itemName) { var _local3 = itemName; var _local2 = -1; var _local1 = 0; while (_local1 < bulletArray.length) { if (bulletArray[_local1] == _local3) { _local2 = _local1; break; } _local1++; } if (_local2 != -1) { bulletArray.splice(_local2, 1); _root[_local3].removeMovieClip(); } } function addHelicopter(itemName, minSpawn, maxSpawn, mySpeed) { var _local1 = minSpawn; var _local2 = Math.round(Math.random() * (maxSpawn - _local1)) + _local1; heliArray.push({name:itemName, min:_local1, max:maxSpawn, counter:_local2, speed:mySpeed, inFlight:false, hasFired:false, isFiring:false}); } function ManageHelicopters() { var _local2 = _root; var _local1 = 0; while (_local1 < heliArray.length) { if (heliArray[_local1].inFlight == false) { if (heliArray[_local1].counter == 0) { heliArray[_local1].inFlight = true; _local2[heliArray[_local1].name]._x; r = random(2); if (r == 0) { x = _local2.boundingbox._x + (_local2.boundingbox._width / 2); _local2[heliArray[_local1].name]._xscale = 100; heliArray[_local1].speed = -Math.abs(heliArray[_local1].speed); } else { x = (_local2.boundingbox._x - (_local2.boundingbox._width / 2)) - _local2[heliArray[_local1].name]._width; _local2[heliArray[_local1].name]._xscale = -100; heliArray[_local1].speed = Math.abs(heliArray[_local1].speed); } _local2[heliArray[_local1].name]._x = x; var y = (Math.round(Math.random() * 151) + 53); _local2[heliArray[_local1].name]._y = y; } else { heliArray[_local1].counter--; } } else { if (heliArray[_local1].isFiring == false) { _local2[heliArray[_local1].name]._x = _local2[heliArray[_local1].name]._x + heliArray[_local1].speed; } if ((heliArray[_local1].hasFired == false) && (heliArray[_local1].isFiring == false)) { if (((_local2[heliArray[_local1].name]._x - _local2[heliArray[_local1].name]._width) > 0) && ((_local2[heliArray[_local1].name]._x + _local2[heliArray[_local1].name]._width) < Stage.width)) { _local2[heliArray[_local1].name].gotoAndPlay("shoot"); heliArray[_local1].isFiring = true; trace(heliArray[_local1].name + " has fired"); } } if (heliArray[_local1].hasFired == true) { if (((_local2[heliArray[_local1].name]._x + _local2[heliArray[_local1].name]._width) < (_local2.boundingbox._x - (_local2.boundingbox._width / 2))) || ((_local2[heliArray[_local1].name]._x - _local2[heliArray[_local1].name]._width) > (_local2.boundingbox._x + (_local2.boundingbox._width / 2)))) { trace("out of bounds"); heliArray[_local1].inFlight = false; var _local3 = Math.round(Math.random() * (heliArray[_local1].max - heliArray[_local1].min)) + heliArray[_local1].min; heliArray[_local1].counter = _local3; heliArray[_local1].hasFired = false; heliArray[_local1].isFiring = false; } } } _local1++; } } function HelicopterFire(name) { var _local3 = name; var _local2 = 0; var _local1 = 0; while (_local1 < heliArray.length) { if (heliArray[_local1].name == _local3) { _local2 = _local1; break; } _local1++; } var myName = ("bullet_helicopter_" + identifierNumber); identifierNumber++; var point = {x:_root[_local3].emitter1._x, y:_root[_local3].emitter1._y}; _root[_local3].localToGlobal(point); var bulletSpeed = 0; trace("helicopter speed is: " + heliArray[_local2].speed); if (heliArray[_local2].speed > 0) { bulletSpeed = heliArray[_local2].speed + 2; } else { bulletSpeed = heliArray[_local2].speed - 2; } LaunchBullet(myName, point.x, point.Y, bulletSpeed, 0); } function HelicopterDoneFiring(name) { var _local2 = name; var _local1 = 0; while (_local1 < heliArray.length) { if (heliArray[_local1].name == _local2) { heliArray[_local1].isFiring = false; heliArray[_local1].hasFired = true; return; } _local1++; } } function getDistance(i) { var _local1 = _root; distancex = _local1[objectArray[i].Name]._x - _local1.ship._x; distancey = _local1[objectArray[i].Name]._y - _local1.ship._y; return(Math.sqrt((distancex * distancex) + (distancey * distancey))); } function beamHorizontalAndVertical(asscheese, assY) { var _local1 = _root; var _local2 = asscheese; var _local3 = assY; i = 0; while (i < objectArray.length) { if ((objectArray[i].Beamed == 1) && (objectArray[i].Type != "agent")) { objectArray[i].Dx = _local2; if ((_local1.ship._x > 100) && (_local1.ship._X < 450)) { _local1[objectArray[i].Name]._x = _local1[objectArray[i].Name]._x + _local2; } if ((_local1.ship._y > 50) && (_local1.ship._y < 250)) { _local1[objectArray[i].Name]._y = _local1[objectArray[i].Name]._y + _local3; if (_local1[objectArray[i].Name]._y > objectArray[i].Ground) { _local1[objectArray[i].Name]._y = objectArray[i].Ground; } } } i++; } } function beamMeUp() { var _local1 = _root; var _local2 = new Array(); i = 0; while (i < objectArray.length) { if (objectArray[i].Type != "agent") { if (objectArray[i].Beamed == 1) { if (((objectArray[i].Type == "object") || (objectArray[i].Type == "tank")) && (objectArray[i].Linkage != "BonusIcon")) { maxheight = (_local1.ship._y + (_local1.ship._height / 2)) + (_local1[objectArray[i].Name]._height / 2); if (_local1[objectArray[i].Name]._y > maxheight) { _local1[objectArray[i].Name]._y = _local1[objectArray[i].Name]._y - 2; } } else if (_local1[objectArray[i].Name]._y > _local1.ship._y) { _local1[objectArray[i].Name]._y = _local1[objectArray[i].Name]._y - 2; } else if (objectArray[i].Beamed == 1) { _local1[objectArray[i].Name]._y = -20; objectArray[i].Beamed = 2; _local2.push({name:objectArray[i].Name, detach:true, debNum:4}); if (objectArray[i].Linkage != "BonusIcon") { if ((objectArray[i].Linkage != "person2") && (objectArray[i].Linkage != "person5")) { var scream = Math.round(Math.random() * 8); trace(scream); if (scream == 4) { playSound("maleEnjoy"); } else { playSound("maleScream"); } } else { playSound("maleScream"); } var scream = Math.round(Math.random() * 12); if (scream == 8) { var randSound = (Math.round(Math.random() * 3) + 1); _local1.playSound("rand" + randSound); } _global.currentPeople++; _global.totalPeople++; _local1.display._x = _local1.ship._x; _local1.display._y = _local1.ship._y; _local1.display.goToAndPlay("people"); } else { playSound("bonusSound"); _global.bonusPoints++; _local1.display._x = _local1.ship._x; _local1.display._y = _local1.ship._y; _local1.display.goToAndPlay("points"); } } if (_local1[objectArray[i].Name]._x < _local1.ship._x) { _local1[objectArray[i].Name]._x = _local1[objectArray[i].Name]._x + 1; if (_local1[objectArray[i].Name]._x >= _local1.ship._x) { _local1[objectArray[i].Name]._x = _local1.ship._x; } } if (_local1[objectArray[i].Name]._x > _local1.ship._x) { _local1[objectArray[i].Name]._x = _local1[objectArray[i].Name]._x - 1; if (_local1[objectArray[i].Name]._x <= _local1.ship._x) { _local1[objectArray[i].Name]._x = _local1.ship._x; } } } else { if (objectArray[i].Beamed == 2) { _local1[objectArray[i].Name].goToAndPlay("falling"); } if ((_local1[objectArray[i].Name]._y + (_local1[objectArray[i].Name]._height / 2)) == objectArray[i].Ground) { } else if (_local1[objectArray[i].Name]._y > 0) { _local1[objectArray[i].Name]._y = _local1[objectArray[i].Name]._y + objectArray[i].Dy; objectArray[i].Dy = objectArray[i].Dy + gravity; if (objectArray[i].Dy > yTerminalVelocity) { objectArray[i].Dy = yTerminalVelocity; } _local1[objectArray[i].Name]._x = _local1[objectArray[i].Name]._x + objectArray[i].Dx; if ((_local1[objectArray[i].Name]._y + (_local1[objectArray[i].Name]._height / 2)) >= objectArray[i].Ground) { useFriction = xGroundFriction; } else { useFriction = xFriction; } if ((objectArray[i].Dx >= -0.4) && (objectArray[i].Dx <= 0.4)) { objectArray[i].Dx = 0; } if (objectArray[i].Dx < 0) { objectArray[i].Dx = objectArray[i].Dx + useFriction; } if (objectArray[i].Dx > 0) { objectArray[i].Dx = objectArray[i].Dx - useFriction; } if ((_local1[objectArray[i].Name]._y + (_local1[objectArray[i].Name]._height / 2)) >= objectArray[i].Ground) { if (objectArray[i].Beamed == 2) { if ((objectArray[i].Ground - objectArray[i].FallHeight) < 20) { if (objectArray[i].Type == "tank") { _local1[objectArray[i].Name].gotoAndPlay("idle"); } else if (objectArray[i].Type == "person") { _local1[objectArray[i].Name].gotoAndPlay("run"); objectArray[i].Timer = 1; } if (objectArray[i].Type == "tank") { _local1[objectArray[i].Name].OpenFire(); } root[objectArray[i].Name]._y = objectArray[i].Ground; objectArray[i].Beamed = 0; } else { _local1[objectArray[i].Name].gotoAndPlay("collision"); _local1[objectArray[i].Name]._y = objectArray[i].Ground; if (objectArray[i].Linkage != nonDestructableType) { objectArray[i].Beamed = 3; } else { objectArray[i].Beamed = 0; } j = 0; while (j < objectArray.length) { if ((objectArray[j].Beamed == 0) && (_local1[objectArray[i].Name].hitTest(_local1[objectArray[j].Name]) == true)) { if (((objectArray[j].Type == "tank") && (objectArray[i].Type != "tank")) && ((objectArray[j].Type == "tank") && (objectArray[i].Type != "object"))) { } else { objectArray[j].Direction = 0; tempY = _local1[objectArray[j].Name]._y - (_local1[objectArray[i].Name].height / 100); howFar = objectArray[j].ZStack; objectArray[j].ZStack++; _local1[objectArray[i].Name].swapDepths((objectArray[j].Ground * 100) + howFar); _local1[objectArray[i].Name]._y = tempY; } if ((((objectArray[j].Type == "agent") || (objectArray[j].Type == "person")) || ((objectArray[j].Type == "tank") && (objectArray[i].Type == "tank"))) && (objectArray[j].Linkage != nonDestructableType)) { _local1[objectArray[j].Name].goToAndPlay("collision"); if (objectArray[j].Type == "tank") { _local1[objectArray[j].Name].HoldFire(); } deadArray.push(objectArray[j].Name); _local2.push({name:objectArray[j].Name, detach:false, debNum:5}); } } j++; } if (objectArray[i].Linkage != nonDestructableType) { deadArray.push(objectArray[i].Name); _local2.push({name:objectArray[i].Name, detach:false, debNum:6}); } } } objectArray[i].Dy = 0; } else if (objectArray[i].Beamed == 2) { hitFlag = false; if ((objectArray[i].Ground - objectArray[i].FallHeight) >= 20) { j = 0; while (j < objectArray.length) { if ((objectArray[j].Beamed == 0) && (_local1[objectArray[i].Name].hitTest(_local1[objectArray[j].Name]) == true)) { if (((objectArray[j].Type == "tank") && (objectArray[i].Type != "tank")) && ((objectArray[j].Type == "tank") && (objectArray[i].Type != "object"))) { } else { hitFlag = true; _local1[objectArray[i].Name].goToAndPlay("collision"); objectArray[j].Direction = 0; tempY = _local1[objectArray[j].Name]._y - _local1[objectArray[i].Name].height; howFar = objectArray[j].ZStack; objectArray[j].ZStack++; _local1[objectArray[i].Name].swapDepths((objectArray[j].Ground * 100) + howFar); _local1[objectArray[i].Name]._y = tempY; objectArray[i].Dy = 0; } if ((((((objectArray[j].Type == "agent") || (objectArray[j].Type == "person")) || (objectArray[j].Linkage == "bear")) || ((objectArray[j].Type == "tank") && (objectArray[i].Type == "tank"))) || ((objectArray[j].Type == "tank") && (objectArray[i].Type == "object"))) && (objectArray[j].Linkage != nonDestructableType)) { _local1[objectArray[j].Name].goToAndPlay("collision"); if (objectArray[j].Type == "tank") { _local1[objectArray[j].Name].HoldFire(); } deadArray.push(objectArray[j].Name); _local2.push({name:objectArray[j].Name, detach:false, debNum:5}); } break; } j++; } if (hitFlag == true) { if (objectArray[i].Linkage != nonDestructableType) { objectArray[i].Beamed = 3; } else { objectArray[i].Beamed = 0; } if (objectArray[i].Linkage != nonDestructableType) { deadArray.push(objectArray[i].Name); _local2.push({name:objectArray[i].Name, detach:false, debNum:6}); } } } } } } } else if (objectArray[i].Beamed == 1) { if (_local1.beam.hitTest(_local1[objectArray[i].Name]) == eval("False")) { objectArray[i].Beamed = 0; objectArray[i].Timer = 1; } } i++; } var _local3 = 0; while (_local3 < _local2.length) { removeObject(_local2[_local3].name, _local2[_local3].detach, _local2[_local3].debNum); _local3++; } } function moveTargets() { var _local1 = _root; if (targetArray_Name.length != 0) { i = 0; while (i < targetArray_Name.length) { if (targetArray_Frames[i] == 0) { myX = _local1[targetArray_Target[i]]._x; myY = _local1[targetArray_Target[i]]._y; } else { myX = _local1[targetArray_Name[i]]._x + ((_local1[targetArray_Target[i]]._x - _local1[targetArray_Name[i]]._x) / targetArray_Frames[i]); myY = _local1[targetArray_Name[i]]._y + ((_local1[targetArray_Target[i]]._y - _local1[targetArray_Name[i]]._y) / targetArray_Frames[i]); targetArray_Frames[i]--; } _local1[targetArray_Name[i]]._x = myX; _local1[targetArray_Name[i]]._y = myY; i++; } } } function createTarget(myTarget) { var _local1 = _root; name = "unique" + identifierNumber; identifierNumber++; _local1.attachMovie("manTarget", name, z3); z3++; targetArray_Name.push(name); targetArray_Target.push(objectArray[myTarget].Name); targetArray_Frames.push(15); _local1[name]._x = 275; _local1[name]._y = -60; } function removeTarget(myTarget) { var _local1 = myTarget; var _local2 = _root; i = 0; while (i < targetArray_Name.length) { if (targetArray_Target[i] == objectArray[_local1].Name) { _local2[targetArray_Name[i]].removeMovieClip(); targetArray_Name.splice(i, 1); targetArray_Target.splice(i, 1); targetArray_Frames.splice(i, 1); } i++; } } function moveScene(d) { var _local1 = d; var _local2 = _root; if (((panAmount + _local1) > panLimitLeft) and ((panAmount + _local1) < panLimitRight)) { panAmount = panAmount + _local1; trees._x = trees._x + (_local1 * 1); bushes._x = bushes._x + (_local1 * 0.8); hills._x = hills._x + (_local1 * 0.4); boundingbox._x = boundingbox._x + (_local1 * 1); i = 0; while (i < objectArray.length) { if ((((objectArray[i].Beamed == 0) || (objectArray[i].Beamed == 3)) || (objectArray[i].Beamed == 2)) || (objectArray[i].Type == "agent")) { _local2[objectArray[i].Name]._x = _local2[objectArray[i].Name]._x + _local1; } i++; } var i = 0; while (i < heliArray.length) { if (heliArray[i].inFlight == true) { _local2[heliArray[i].name]._x = _local2[heliArray[i].name]._x + _local1; } i++; } i = 0; while (i < deadArray.length) { _local2[deadArray[i]]._x = _local2[deadArray[i]]._x + _local1; i++; } i = 0; while (i < bulletArray.length) { _local2[bulletArray[i]]._x = _local2[bulletArray[i]]._x + _local1; i++; } return(0); } return(1); } function runLevel() { var _local1 = _root; var _local2 = _global; if (buttonCoolDown == 0) { if (Key.isDown(80) || (Key.isDown(27))) { buttonCoolDown = 10; if (_local2.gamePaused == false) { _local1.paused.gotoAndPlay("show"); _local2.gamePaused = true; intPauseTime = getTimer(); } else { _local1.paused.gotoAndPlay("hide"); _local2.gamePaused = false; if (_local2.nextTime != -1) { _local2.nextTime = _local2.nextTime + (getTimer() - intPauseTime); } intPauseTime = 0; } } } else { buttonCoolDown--; } if (_local2.gamePaused == false) { if (deathCounter == -1) { if (Key.isDown(39) && (!Key.isDown(37))) { dx = dx + sensitivity; if (dx > terminalVelocity) { dx = terminalVelocity; } } if (Key.isDown(37) && (!Key.isDown(39))) { dx = dx - sensitivity; if (dx < (terminalVelocity * -1)) { dx = terminalVelocity * -1; } } if (Key.isDown(40) && (!Key.isDown(38))) { dy = dy + sensitivity; if (dy > terminalVelocity) { dy = terminalVelocity; } } if (Key.isDown(38) && (!Key.isDown(40))) { dy = dy - sensitivity; if (dy < (terminalVelocity * -1)) { dy = terminalVelocity * -1; } } } } if (Key.isDown(68)) { _local2.debug = true; _local1.debugStatus(); } else { _local2.debug = false; } if (Key.isDown(16) && (Key.isDown(49))) { _local1.prepareForFrameChange(true, 5); _local2.gamePaused = false; _local2.cheated = true; } if (Key.isDown(16) && (Key.isDown(50))) { _local1.prepareForFrameChange(true, 10); _local2.gamePaused = false; _local2.cheated = true; } if (Key.isDown(16) && (Key.isDown(51))) { _local1.prepareForFrameChange(true, 15); _local2.gamePaused = false; _local2.cheated = true; } if (Key.isDown(16) && (Key.isDown(52))) { _local1.prepareForFrameChange(true, 20); _local2.gamePaused = false; _local2.cheated = true; } if (Key.isDown(16) && (Key.isDown(53))) { _local1.prepareForFrameChange(true, 25); _local2.gamePaused = false; _local2.cheated = true; } if (Key.isDown(16) && (Key.isDown(54))) { _local1.prepareForFrameChange(true, 30); _local2.gamePaused = false; _local2.cheated = true; } if (Key.isDown(16) && (Key.isDown(55))) { _local1.prepareForFrameChange(true, 35); _local2.gamePaused = false; _local2.cheated = true; } if (Key.isDown(16) && (Key.isDown(56))) { _local1.prepareForFrameChange(true, 40); _local2.gamePaused = false; _local2.cheated = true; } if (Key.isDown(16) && (Key.isDown(57))) { _local1.prepareForFrameChange(true, 45); _local2.gamePaused = false; _local2.cheated = true; } if (Key.isDown(16) && (Key.isDown(48))) { _local1.prepareForFrameChange(true, 50); _local2.gamePaused = false; _local2.cheated = true; } if (_local2.gamePaused == false) { if ((!Key.isDown(37)) && (!Key.isDown(39))) { if (dx > 0) { dx = dx - airFriction; } if (dx < 0) { dx = dx + airFriction; } if ((dx >= -0.3) && (dx <= 0.3)) { dx = 0; } } if ((!Key.isDown(38)) && (!Key.isDown(40))) { if (dy > 0) { dy = dy - airFriction; } if (dy < 0) { dy = dy + airFriction; } if ((dy >= -0.3) && (dy <= 0.3)) { dy = 0; } } if (Key.isDown(32) && (energyFlag == 0)) { _local1.beam.gotoandstop(2); shipEnergy = shipEnergy - beamCost; if (shipEnergy < 0) { shipEnergy = 0; energyFlag = 1; } beamFlag = true; _local1.startBeamTags(); } else { beamFlag = false; _local1.beam.gotoandstop(1); shipEnergy = shipEnergy + rechargeRate; if (shipEnergy > totalEnergy) { shipEnergy = totalEnergy; energyFlag = 0; } _local1.removeBeamTags(); } _local1.beamMeUp(); _local1.updateEnergyBar(shipEnergy, totalEnergy, energyFlag); _local1.ship._x = _local1.ship._x + dx; _local1.ship._y = _local1.ship._y + dy; if (beamFlag == true) { _local1.beamHorizontalAndVertical(dx, dy); } if (_local2.shipUsed == 1) { _local1.ship.inside._rotation = dx * 2.5; } if (_local1.ship._x > 450) { _local1.ship._x = 450; } if (_local1.ship._x < 100) { _local1.ship._x = 100; } if (_local1.ship._y < 50) { _local1.ship._y = 50; dy = 0; } if (_local1.ship._y > 250) { _local1.ship._y = 250; dy = 0; } _local1.shadow._x = _local1.ship._x; _local1.beam._x = _local1.ship._x; _local1.beam._y = (_local1.ship._y + (_local1.ship._y / 8)) + 35; _local1.beam._xscale = 50 + ((_local1.ship._y / 2.5) / 2); _local1.beam._yscale = 50 + ((_local1.ship._y / 2.5) / 2); _local1.shadow._alpha = _local1.ship._y / 4; _local1.shadow._xscale = 300 - _local1.ship._y; _local1.shadow._yscale = 300 - _local1.ship._y; varFlag = 0; if ((_local1.ship._x <= 100) && (dx < 0)) { varFlag = _local1.moveScene(-1 * dx); } else if ((_local1.ship._x >= 450) && (dx > 0)) { varFlag = _local1.moveScene(-1 * dx); } if (varFlag == 1) { dx = 0; } _local1.runTimer(); _local1.TankGenerator(); _local1.ManageHelicopters(); _local1.spotship(); _local1.makePeopleMove(); _local1.DetectBulletHits(); _local1.updatePeopleBar(_local2.currentPeople, _local2.totalPeopleToGet); _local1.moveTargets(); if (deathCounter >= 0) { if (deathCounter == 0) { _local2.livesLeft--; _local1.updateLives(_local2.livesLeft); _local1.prepareForFrameChange(false, 0); if (_local2.livesLeft != 0) { var randSound = (Math.round(Math.random() * 5) + 1); } } else { deathCounter--; } } if (_local2.nextTime != -1) { _local1.updateTimer(); } } } stop(); myNextLevel = 10; _global.debug = false; nonDestructableType = "rock"; panLimitLeft = -300; panLimitRight = 300; panAmount = 0; oldValue = 0; numPeople = 0; maxPeople = 0; percentFrequency = 0; zArray = new Array(); zStack = new Array(); z3 = 10000; objectArray = new Array(); bulletArray = new Array(); deadArray = new Array(); targetArray_Name = new Array(); targetArray_Target = new Array(); targetArray_Frames = new Array(); availPeople = new Array(); myVolume = 100; mySong = "Nothing"; myZ1 = 0; myZ2 = 0; terminalVelocity = 8; sensitivity = 0.4; totalEnergy = 200; shipEnergy = 200; rechargeRate = 2; beamCost = 2; timeToBeat = 180; airFriction = 0.15; xFriction = 0.15; xGroundFriction = 0.4; gravity = 0.4; yTerminalVelocity = 15; energyFlag = 0; pickUpFlag = 0; dropSpeed = 0; groundLevel = _root.truck._y; truckFlag = 0; dx = 0; dy = 0; tankArray = new Array(); tankSpawnTimeMin = 0; tankSpawnTimeMax = 0; tankCounter = -1; blnUseTanks = false; tanksToUse = "green"; heliArray = new Array(); bulletDepth = 30000; _global.totalPeopleToGet = 5; identifierNumber = 5; var mySoundPlayer = new SoundPlayer(); buttonCoolDown = 0; intPauseTime = 0; deathCounter = -1; almostFlag = false;
Instance of Symbol 304 MovieClip in Frame 45
onClipEvent (load) { _root.initializeLevel(45, 50, -700, 700, "", 180, 15); _root.updateLives(_global.livesLeft); _root.setPeopleTimer(30, 6); _root.addPersonType("ethan", "person", 25); _root.addPersonType("person1", "person", 25); _root.addPersonType("person2", "person", 25); _root.addPersonType("person3", "person", 25); _root.addPersonType("person4", "person", 25); _root.addPersonType("person5", "person", 25); _root.addPersonType("person6", "person", 25); _root.addPersonType("eskimo", "person", 25); _root.addPersonType("Astronaut", "person", 25); _root.addUnit("bonus1", 0, "BonusIcon", "object"); _root.addUnit("bonus2", 0, "BonusIcon", "object"); _root.addUnit("bonus3", 0, "BonusIcon", "object"); _root.addHelicopter("angel1", 20, 40, 6); _root.addHelicopter("angel2", 20, 40, 6); _root.addHelicopter("angel3", 40, 80, 6); _root.addHelicopter("angel4", 40, 80, 6); _root.addHelicopter("angel5", 80, 160, 6); _root.addHelicopter("angel6", 160, 320, 6); _root.addHelicopter("angel7", 160, 320, 6); _root.addHelicopter("angel8", 80, 160, 6); _root.addHelicopter("angel9", 80, 160, 6); _root.flash.swapDepths(100000); levelTrack = "heaven level"; _root.startMusicDownload(levelTrack); } onClipEvent (enterFrame) { _root.runLevel(); }
Instance of Symbol 657 MovieClip "volumeClip" in Frame 45
onClipEvent (load) { if (_global.volume == true) { volumeClip.goToAndPlay("volumeOn"); } else { volumeClip.goToAndPlay("volumeOff"); } } on (release) { if (_global.volume == true) { _global.volume = false; _root.volumeClip.nextFrame(); _root.toggleMusic(); } else { _global.volume = true; _root.volumeClip.prevFrame(); _root.toggleMusic(); } }
Frame 50
function initializeLevel(currentLevel, nextLevel, leftMax, rightMax, nonDestructable, timeToWin, peopleToGet) { var _local1 = _global; var _local2 = _root; identifierNumber = currentLevel; myNextLevel = nextLevel; panLimitLeft = leftMax; panLimitRight = rightMax; nonDestructableType = nonDestructable; timeToBeat = timeToWin; _local1.totalPeopleToGet = peopleToGet; if (_local1.tempLives < 0) { _local1.livesLeft = 3; } else { _local1.livesLeft = _local1.tempLives; } energyFlag = 0; pickUpFlag = 0; dropSpeed = 0; groundLevel = _local2.truck._y; truckFlag = 0; dx = 0; dy = 0; if (_local1.tempPeople < 0) { _local1.currentPeople = 0; } else { _local1.currentPeople = _local1.tempPeople; } _local1.tempPeople = 0; _local1.tempLives = 0; _local1.tempFrame = identifierNumber; if (timeToBeat == -1) { _local1.nextTime = -1; _local2.updateTimer(); } else { if ((_local1.nextTime == -1) && (timeToBeat != -1)) { _local1.nextTime = 0; } if (_local1.nextTime != -1) { if (_local1.stolenTime == 0) { _local1.nextTime = getTimer() + (timeToBeat * 1000); } else { _local1.nextTime = _local1.nextTime + (getTimer() - _local1.stolenTime); _local1.stolenTime = 0; } } } _local1.stolenTime = 0; if (_local1.shipUsed == 1) { _local2.ship.gotoAndStop("ship1"); } else { _local2.ship.gotoAndStop("ship2"); } } function addPersonType(myLinkage, myType, myWeight) { availPeople.push({linkage:myLinkage, type:myType, weight:myWeight}); } function playSound(soundName) { if (_global.volume == true) { mySoundPlayer.PlaySound(soundName); } } function startMusicDownload(music) { var _local1 = _global; if (_local1.musicOn == true) { _local1.mySound.stop(); _local1.mySound.attachSound(music); _local1.mySound.start(0, 99); _local1.mySound.setVolume(myVolume); } else { _root.volumeClip.gotoAndStop(2); _local1.mySound.stop(); } mySong = music; } function toggleMusic() { var _local1 = _global; if (_local1.volume == true) { _local1.mySound.attachSound(mySong); _local1.mySound.start(0, 99); _local1.mySound.setVolume(myVolume); _local1.musicOn = true; } else { _local1.mySound.stop(); _local1.mySound.setVolume(myVolume); _local1.musicOn = false; } } function updateTimer() { var _local1 = _global; if (_local1.nextTime == -1) { timeText = "NO LIMIT"; } else { myTime = _local1.nextTime - getTimer(); mySecs = math.floor(myTime / 1000); if (mySecs == 0) { _local1.livesLeft = 0; prepareForFrameChange(false, 0); } if (mySecs > 60) { someSeconds = myTime / 1000; someMinutes = someSeconds / 60; if (someSeconds > 59) { someSeconds = someSeconds - (Math.floor(someMinutes) * 60); } if (someSeconds < 10) { textMinutes = someMinutes; timeText = (Math.floor(textMinutes) + ":0") + Math.floor(someSeconds); } else if (someSeconds == 0) { textMinutes = someMinutes; timeText = Math.floor(textMinutes) + ":00"; } else { textMinutes = someMinutes; timeText = (Math.floor(textMinutes) + ":") + Math.floor(someSeconds); } } else { timeText = Math.floor(mySecs); } } } function updateLives(lifeNum) { var _local1 = lifeNum; if (_local1 < 0) { _local1 = 0; } lives = _local1; } function prepareForFrameChange(newLevel, levelNum) { var _local1 = _global; var _local2 = _root; _local1.tempLives = _local1.livesLeft; _local1.tempPeople = _local1.currentPeople; cleanScreen(); if ((_local1.livesLeft > 0) && (newLevel == false)) { _local1.stolenTime = getTimer(); _local2.goToAndPlay("loseLife"); } else if ((_local1.livesLeft > 0) && (newLevel == true)) { _local1.tempPeople = -1; _local1.tempFrame = levelNum; _local2.goToAndPlay("levelText"); } else if (_local1.livesLeft == 0) { _local2.goToAndPlay("endGame"); } } function cleanScreen() { var _local1 = _root; i = 0; while (i < objectArray.length) { _local1[objectArray[i].Name].removeMovieClip(); i++; } i = 0; while (i < deadArray.length) { _local1[deadArray[i]].removeMovieClip(); i++; } i = 0; while (i < targetArray_Name.length) { _local1[targetArray_Name[i]].removeMovieClip(); i++; } i = 0; while (i < bulletArray.length) { _local1[bulletArray[i]].removeMovieClip(); i++; } } function setPeopleTimer(mPeople, pFrequency) { var _local1 = _root; myZ2 = Math.round(_local1.z2._y); myZ1 = Math.round(_local1.z1._y); _local1.z1._y = -50; _local1.z2._y = -50; i = myZ1; while (i < myZ2) { zArray.push(i); zStack.push(1); i++; } percentFrequency = pFrequency; maxPeople = mPeople; } function runTimer() { if (numPeople != maxPeople) { if (random(255) < percentFrequency) { numPeople++; addPersonDynamic(false); } } } function rangeInUse(minZ, maxZ) { var _local2 = maxZ; var _local3 = minZ; var _local1 = false; i = 0; while (i < objectArray.length) { if ((objectArray[i].ZStack >= _local3) && (objectArray[i].ZStack <= _local2)) { _local1 = true; } i++; } return(_local1); } function startBeamTags() { var _local1 = _root; i = 0; while (i < objectArray.length) { if (_local1.beam.hitTest(_local1[objectArray[i].Name]) == true) { if (objectArray[i].Beamed == 0) { _local1[objectArray[i].Name].goToAndPlay("beamed"); objectArray[i].Beamed = 1; objectArray[i].Dy = 0; if (objectArray[i].Type == "tank") { _local1[objectArray[i].Name].HoldFire(); } } if (objectArray[i].Beamed == 2) { _local1[objectArray[i].Name].goToAndStop("endbeam"); objectArray[i].Beamed = 1; objectArray[i].Dy = 0; } } i++; } } function debugStatus() { trace("Name type beamed timer"); trace("----------------------------------------"); i = 0; while (i < objectArray.length) { trace((((((((((objectArray[i].Name + " ") + objectArray[i].Type) + " ") + objectArray[i].Beamed) + " ") + objectArray[i].Timer) + " ") + objectArray[i].Spotted) + " ") + objectArray[i].Direction); i++; } trace("----------------------------------------"); } function removeBeamTags() { var _local1 = _root; i = 0; while (i < objectArray.length) { if ((objectArray[i].Beamed == 1) && (objectArray[i].Type != "agent")) { objectArray[i].Beamed = 2; objectArray[i].FallHeight = _local1[objectArray[i].Name]._y; } else if ((objectArray[i].Beamed == 1) && (objectArray[i].Type == "agent")) { objectArray[i].Beamed = 0; objectArray[i].Timer = 1; } i++; } } function addUnit(name, newSpeed, myLinkage, givenType) { var _local1 = _root; var _local2 = name; var _local3 = newSpeed; tempX = _local1[_local2]._x; tempY = _local1[_local2]._y; wantY = Math.round(tempY); flag = -1; myZStack = -1; i = 0; while (i < zArray.length) { if (zArray[i] == wantY) { flag = i; myZstack = zStack[i]; } i++; } if (flag != -1) { zArray.splice(flag, 1); zStack.splice(flag, 1); } _local1[_local2]._visible = false; _local2 = givenType + identifierNumber; identifierNumber++; _local1.attachMovie(myLinkage, _local2, wantY * 100); if (givenType == "tank") { _local1[_local2].SetFireRate(40); tankArray.push({track:wantY, occupied:true, tank:_local2}); } _local1[_local2]._x = tempX; _local1[_local2]._y = tempY; x = 275; if ((_local1[_local2]._x <= x) && (_local3 != 0)) { dir = _local3; _local1[_local2]._xscale = -Math.abs(_local1[_local2]._xscale); if (myLinkage == "antiAir") { _local1[_local2]._xscale = _local1[_local2]._xscale * -1; } } else { dir = -1 * _local3; } var groundLevel = Math.round(_local1[_local2]._y + (_local1[_local2]._height / 2)); objectArray.push({Name:_local2, Beamed:0, Type:givenType, Ground:groundLevel, Dx:0, Dy:0, Timer:0, Spotted:0, Linkage:myLinkage, ZStack:myZStack, Direction:dir, FallHeight:0}); return(_local2); } function generateEthan() { addPersonDynamic(true); } function addPersonDynamic(isEthan) { if (zArray.length == 0) { return(null); } if (isEthan == false) { r = random(2); switch (r) { case 0 : var _local3 = 0; var _local2 = -1; var _local1 = 0; while (_local1 < availPeople.length) { _local3 = _local3 + availPeople[_local1].weight; _local1++; } var chosenWeight = Math.round(Math.random() * _local3); _local1 = 0; while (_local1 < availPeople.length) { if ((chosenWeight > _local2) && (chosenWeight <= (_local2 + availPeople[_local1].weight))) { myGuy = availPeople[_local1].linkage; myType = availPeople[_local1].type; break; } _local2 = _local2 + availPeople[_local1].weight; _local1++; } break; case 1 : myGuy = "MIB"; myType = "agent"; } } else { myGuy = "ethan"; myType = "person"; } r = random(zArray.length); z = zArray[r]; zs = zStack[r]; zArray.splice(r, 1); zStack.splice(r, 1); name = "unique" + identifierNumber; identifierNumber++; _root.attachMovie(myGuy, name, z * 100); r = random(2); if (r == 0) { x = _root.boundingbox._x + (_root.boundingbox._width / 2); } else { x = _root.boundingbox._x - (_root.boundingbox._width / 2); } _root[name]._x = x; _root[name]._y = z; x = _root.hills._x; if (_root[name]._x <= x) { dir = 1; if (myType == "agent") { _root[name]._xscale = -Math.abs(_root[name]._xscale); } } else { dir = -1; if (myType != "agent") { _root[name]._xscale = -Math.abs(_root[name]._xscale); } } _root[name].goToAndPlay("walk"); objectArray.push({Name:name, Beamed:0, Type:myType, Ground:z, Dx:0, Dy:0, Timer:0, Spotted:0, Linkage:myGuy, ZStack:zs, Direction:dir, FallHeight:0}); return(undefined); } function addTank(name, newSpeed, myLinkage, myTrack) { var _local1 = _root; var _local3 = myTrack; var _local2 = "tank"; if (tanksToUse == "red") { _local2 = "redTank"; } if (tanksToUse == "white") { _local2 = "whiteTank"; } _local1.attachMovie(_local2, name, _local3 * 100); r = random(2); if (r == 0) { x = _local1.boundingbox._x + (_local1.boundingbox._width / 2); } else { x = _local1.boundingbox._x - (_local1.boundingbox._width / 2); } _local1[name]._x = x; if (tanksToUse == "red") { _local1[name].SetFireRate(15); } else if (tanksToUse == "white") { _local1[name].SetFireRate(25); } else { _local1[name].SetFireRate(40); } _local1[name]._y = _local3; x = _local1.hills._x; if (_local1[name]._x <= x) { dir = 1; _local1[name]._xscale = _local1[name]._xscale * -1; } else { dir = -1; } _local1[name].goToAndPlay("idle"); objectArray.push({Name:name, Beamed:0, Type:"tank", Ground:_local3, Dx:0, Dy:0, Timer:0, Spotted:0, Linkage:"tank", ZStack:999999, Direction:dir, FallHeight:0}); } function makePeopleMove() { var _local1 = _root; var _local3 = _global; var queueRemoval = new Array(); i = 0; while (i < objectArray.length) { if (objectArray[i].Beamed == 0) { if (objectArray[i].Timer == 1) { if (_local3.debug == true) { trace(i); } if (_local1[objectArray[i].Name]._x < _local1.ship._x) { objectArray[i].Direction = -3; if (objectArray[i].Type == "person") { _local1[objectArray[i].Name]._xscale = -Math.abs(_local1[objectArray[i].Name]._xscale); } else if (objectArray[i].Type == "agent") { _local1[objectArray[i].Name]._xscale = Math.abs(_local1[objectArray[i].Name]._xscale); if (objectArray[i].Spotted == 0) { createTarget(i); objectArray[i].Spotted = 1; } } } else { objectArray[i].Direction = 3; if (objectArray[i].Type == "person") { _local1[objectArray[i].Name]._xscale = Math.abs(_local1[objectArray[i].Name]._xscale); } else if (objectArray[i].Type == "agent") { _local1[objectArray[i].Name]._xscale = -Math.abs(_local1[objectArray[i].Name]._xscale); if (objectArray[i].Spotted == 0) { createTarget(i); objectArray[i].Spotted = 1; } } } _local1[objectArray[i].Name].gotoandplay("run"); } if (objectArray[i].Timer > 0) { objectArray[i].Timer--; } _local1[objectArray[i].Name]._x = _local1[objectArray[i].Name]._x + objectArray[i].Direction; if ((_local1[objectArray[i].Name]._x < (_local1.boundingbox._x - (_local1.boundingbox._width / 2))) && (objectArray[i].Direction < 0)) { if (objectArray[i].Spotted == 1) { _local3.livesLeft--; _local1.updateLives(_local3.livesLeft); _local1.prepareForFrameChange(false, 0); if (_local3.livesLeft != 0) { var randSound = (Math.round(Math.random() * 5) + 1); } } if (objectArray[i].Type == "tank") { OpenTrack(objectArray[i].Name); } queueRemoval.push({name:objectArray[i].Name, detach:true, debNum:1}); } else if ((_local1[objectArray[i].Name]._x > (_local1.boundingbox._x + (_local1.boundingbox._width / 2))) && (objectArray[i].Direction > 0)) { if (objectArray[i].Spotted == 1) { _local3.livesLeft--; _local1.updateLives(_local3.livesLeft); _local1.prepareForFrameChange(false, 0); if (_local3.livesLeft != 0) { var randSound = (Math.round(Math.random() * 5) + 1); } } if (objectArray[i].Type == "tank") { OpenTrack(objectArray[i].Name); } queueRemoval.push({name:objectArray[i].Name, detach:true, debNum:2}); } } i++; } var _local2 = 0; while (_local2 < queueRemoval.length) { removeObject(queueRemoval[_local2].name, queueRemoval[_local2].detach, queueRemoval[_local2].debNum); _local2++; } tanksAim(); } function removeObject(objectName, removeFromScreen, debugNum) { var _local2 = removeFromScreen; var _local3 = _root; i = -1; var _local1 = 0; while (_local1 < objectArray.length) { if (objectArray[_local1].Name == objectName) { i = _local1; if (objectArray[_local1].Type != "tank") { zArray.push(objectArray[_local1].Ground); zStack.push(objectArray[_local1].ZStack); } if ((objectArray[_local1].Type != "object") && (objectArray[_local1].Type != "tank")) { numPeople--; } if (objectArray[_local1].Spotted == 1) { removeTarget(i); } if (_local2) { _local3[objectArray[_local1].Name].removeMovieClip(); } objectArray.splice(_local1, 1); return; } _local1++; } } function updateEnergyBar(current, total, flag) { var _local1 = _root; frac = current / total; _local1.energy._xscale = frac * 100; if (flag == 1) { _local1.energy.goToAndStop(2); } else { _local1.energy.goToAndStop(1); } } function updatePeopleBar(current, total) { var _local1 = current; var _local2 = total; var _local3 = _root; frac = _local1 / _local2; _local3.peopleToGo._xscale = frac * 100; myFrame = 10; frac = (_local1 / _local2) * 100; if (frac < 10) { myFrame = 1; } else if ((frac >= 10) && (frac < 20)) { myFrame = 2; } else if ((frac >= 20) && (frac < 30)) { myFrame = 3; } else if ((frac >= 30) && (frac < 40)) { myFrame = 4; } else if ((frac >= 40) && (frac < 50)) { myFrame = 5; } else if ((frac >= 50) && (frac < 60)) { myFrame = 6; } else if ((frac >= 60) && (frac < 70)) { myFrame = 7; } else if ((frac >= 70) && (frac < 80)) { myFrame = 8; } else if ((frac >= 80) && (frac < 90)) { myFrame = 9; } else if ((frac >= 90) && (frac <= 100)) { myFrame = 10; } if (oldValue != myFrame) { _local3.peopleToGo.goToAndStop(myFrame); } oldValue = myFrame; if ((_local1 == (_local2 - 2)) && (almostFlag == false)) { var randSound = (Math.round(Math.random() * 4) + 1); _local3.playSound("good" + randSound); almostFlag = true; } if (_local1 == _local2) { prepareForFrameChange(true, myNextLevel); } } function spotship() { var _local1 = _root; i = 0; while (i < objectArray.length) { if (((objectArray[i].Beamed == 0) && ((objectArray[i].Type == "person") || (objectArray[i].Type == "agent"))) && ((objectArray[i].Direction == 1) || (objectArray[i].Direction == -1))) { myDist = getDistance(i); if (myDist <= 175) { if (((objectArray[i].Direction == 1) && (_local1[objectArray[i].Name]._x < _local1.ship._x)) && (_local1[objectArray[i].Name]._x >= 50)) { _local1[objectArray[i].Name].gotoandplay("spot"); objectArray[i].Direction = 0; objectArray[i].Timer = 30; } else if (((objectArray[i].Direction == -1) && (_local1[objectArray[i].Name]._x > _local1.ship._x)) && (_local1[objectArray[i].Name]._x <= 500)) { _local1[objectArray[i].Name].gotoandplay("spot"); objectArray[i].Direction = 0; objectArray[i].Timer = 30; } } } i++; } } function tanksAim() { var _local3 = _root; var _local2 = 0; while (_local2 < objectArray.length) { if ((objectArray[_local2].Beamed == 0) && (objectArray[_local2].Type == "tank")) { var tankName = objectArray[_local2].Name; var point = {x:_local3[tankName].cannon._x, y:_local3[tankName].cannon._y}; _local3[tankName].localToGlobal(point); var op = (_local3.ship._y - point.y); var adj = (_local3.ship._x - point.x); if (adj == 0) { adj = 1; } var _local1 = (Math.atan(op / adj) * 180) / Math.PI; if (_local1 < 0) { _local1 = _local1 * -1; } if (_local1 > 90) { _local1 = 90; } if (_local1 < 20) { _local1 = 20; } _local3[tankName].cannon._rotation = _local1; } _local2++; } } function StartTankGenerator(min, max, color) { tanksToUse = color; blnUseTanks = true; tankSpawnTimeMin = min; tankSpawnTimeMax = max; tankCounter = Math.round(Math.random() * (tankSpawnTimeMax - tankSpawnTimeMin)) + tankSpawnTimeMin; } function TankGenerator() { if (blnUseTanks == true) { intAvailFlag = -1; var _local1 = 0; while (_local1 < tankArray.length) { if (tankArray[_local1].occupied == false) { intAvailFlag = _local1; break; } _local1++; } if (intAvailFlag != -1) { if (tankCounter == 0) { var _local2 = "tank" + identifierNumber; identifierNumber++; tankArray[intAvailFlag].occupied = true; tankArray[intAvailFlag].tank = _local2; addTank(_local2, 3, "tank", tankArray[intAvailFlag].track); tankCounter = Math.round(Math.random() * (tankSpawnTimeMax - tankSpawnTimeMin)) + tankSpawnTimeMin; } else { tankCounter--; } } } } function OpenTrack(tankName) { var _local2 = tankName; var _local1 = 0; while (_local1 < tankArray.length) { if (tankArray[_local1].tank == _local2) { tankArray[_local1].tank = ""; tankArray[_local1].occupied = false; trace(("track " + _local1) + " is open"); } _local1++; } } function LaunchBullet(bulletName, startX, startY, directionX, directionY) { var _local1 = bulletName; var _local3 = _root; var _local2 = ""; if ((substring(_local1, 0, 18)) == "bullet_helicopter_") { _local2 = "bullet air"; } else { _local2 = "bullet ground"; } _local3.attachMovie(_local2, _local1, bulletDepth); _local3[_local1]._x = startX; _local3[_local1]._y = startY; _local3[_local1].SetMovement(directionX, directionY); bulletArray.push(_local1); bulletDepth++; } function DetectBulletHits() { var _local1 = _root; var _local3 = new Array(); var _local2 = 0; while (_local2 < bulletArray.length) { distancex = _local1[bulletArray[_local2]]._x - _local1.ship._x; distancey = _local1[bulletArray[_local2]]._y - _local1.ship._y; if (Math.sqrt((distancex * distancex) + (distancey * distancey)) <= 19) { if ((substring(bulletArray[_local2], 0, 18)) == "bullet_helicopter_") { shipEnergy = 0; energyFlag = 1; _local1.ship.explosion.gotoAndPlay("shock"); _local3.push(bulletArray[_local2]); } else { _local1.ship.explosion.gotoAndPlay("explode"); _local1.playSound("explosion"); if (deathCounter == -1) { deathCounter = 16; } _local3.push(bulletArray[_local2]); } } _local2++; } _local2 = 0; while (_local2 < _local3.length) { RemoveBullet(_local3[_local2]); _local2++; } } function ObjectCleanup(itemName) { var _local1 = itemName; if (_local1.substr(0, 4) == "tank") { OpenTrack(_local1); } _root[_local1].removeMovieClip(); } function RemoveBullet(itemName) { var _local3 = itemName; var _local2 = -1; var _local1 = 0; while (_local1 < bulletArray.length) { if (bulletArray[_local1] == _local3) { _local2 = _local1; break; } _local1++; } if (_local2 != -1) { bulletArray.splice(_local2, 1); _root[_local3].removeMovieClip(); } } function addHelicopter(itemName, minSpawn, maxSpawn, mySpeed) { var _local1 = minSpawn; var _local2 = Math.round(Math.random() * (maxSpawn - _local1)) + _local1; heliArray.push({name:itemName, min:_local1, max:maxSpawn, counter:_local2, speed:mySpeed, inFlight:false, hasFired:false, isFiring:false}); } function ManageHelicopters() { var _local2 = _root; var _local1 = 0; while (_local1 < heliArray.length) { if (heliArray[_local1].inFlight == false) { if (heliArray[_local1].counter == 0) { heliArray[_local1].inFlight = true; _local2[heliArray[_local1].name]._x; r = random(2); if (r == 0) { x = _local2.boundingbox._x + (_local2.boundingbox._width / 2); _local2[heliArray[_local1].name]._xscale = 100; heliArray[_local1].speed = -Math.abs(heliArray[_local1].speed); } else { x = (_local2.boundingbox._x - (_local2.boundingbox._width / 2)) - _local2[heliArray[_local1].name]._width; _local2[heliArray[_local1].name]._xscale = -100; heliArray[_local1].speed = Math.abs(heliArray[_local1].speed); } _local2[heliArray[_local1].name]._x = x; var y = (Math.round(Math.random() * 151) + 53); _local2[heliArray[_local1].name]._y = y; } else { heliArray[_local1].counter--; } } else { if (heliArray[_local1].isFiring == false) { _local2[heliArray[_local1].name]._x = _local2[heliArray[_local1].name]._x + heliArray[_local1].speed; } if ((heliArray[_local1].hasFired == false) && (heliArray[_local1].isFiring == false)) { if (((_local2[heliArray[_local1].name]._x - _local2[heliArray[_local1].name]._width) > 0) && ((_local2[heliArray[_local1].name]._x + _local2[heliArray[_local1].name]._width) < Stage.width)) { _local2[heliArray[_local1].name].gotoAndPlay("shoot"); heliArray[_local1].isFiring = true; trace(heliArray[_local1].name + " has fired"); } } if (heliArray[_local1].hasFired == true) { if (((_local2[heliArray[_local1].name]._x + _local2[heliArray[_local1].name]._width) < (_local2.boundingbox._x - (_local2.boundingbox._width / 2))) || ((_local2[heliArray[_local1].name]._x - _local2[heliArray[_local1].name]._width) > (_local2.boundingbox._x + (_local2.boundingbox._width / 2)))) { trace("out of bounds"); heliArray[_local1].inFlight = false; var _local3 = Math.round(Math.random() * (heliArray[_local1].max - heliArray[_local1].min)) + heliArray[_local1].min; heliArray[_local1].counter = _local3; heliArray[_local1].hasFired = false; heliArray[_local1].isFiring = false; } } } _local1++; } } function HelicopterFire(name) { var _local3 = name; var _local2 = 0; var _local1 = 0; while (_local1 < heliArray.length) { if (heliArray[_local1].name == _local3) { _local2 = _local1; break; } _local1++; } var myName = ("bullet_helicopter_" + identifierNumber); identifierNumber++; var point = {x:_root[_local3].emitter1._x, y:_root[_local3].emitter1._y}; _root[_local3].localToGlobal(point); var bulletSpeed = 0; trace("helicopter speed is: " + heliArray[_local2].speed); if (heliArray[_local2].speed > 0) { bulletSpeed = heliArray[_local2].speed + 2; } else { bulletSpeed = heliArray[_local2].speed - 2; } LaunchBullet(myName, point.x, point.Y, bulletSpeed, 0); } function HelicopterDoneFiring(name) { var _local2 = name; var _local1 = 0; while (_local1 < heliArray.length) { if (heliArray[_local1].name == _local2) { heliArray[_local1].isFiring = false; heliArray[_local1].hasFired = true; return; } _local1++; } } function getDistance(i) { var _local1 = _root; distancex = _local1[objectArray[i].Name]._x - _local1.ship._x; distancey = _local1[objectArray[i].Name]._y - _local1.ship._y; return(Math.sqrt((distancex * distancex) + (distancey * distancey))); } function beamHorizontalAndVertical(asscheese, assY) { var _local1 = _root; var _local2 = asscheese; var _local3 = assY; i = 0; while (i < objectArray.length) { if ((objectArray[i].Beamed == 1) && (objectArray[i].Type != "agent")) { objectArray[i].Dx = _local2; if ((_local1.ship._x > 100) && (_local1.ship._X < 450)) { _local1[objectArray[i].Name]._x = _local1[objectArray[i].Name]._x + _local2; } if ((_local1.ship._y > 50) && (_local1.ship._y < 250)) { _local1[objectArray[i].Name]._y = _local1[objectArray[i].Name]._y + _local3; if (_local1[objectArray[i].Name]._y > objectArray[i].Ground) { _local1[objectArray[i].Name]._y = objectArray[i].Ground; } } } i++; } } function beamMeUp() { var _local1 = _root; var _local2 = new Array(); i = 0; while (i < objectArray.length) { if (objectArray[i].Type != "agent") { if (objectArray[i].Beamed == 1) { if (((objectArray[i].Type == "object") || (objectArray[i].Type == "tank")) && (objectArray[i].Linkage != "BonusIcon")) { maxheight = (_local1.ship._y + (_local1.ship._height / 2)) + (_local1[objectArray[i].Name]._height / 2); if (_local1[objectArray[i].Name]._y > maxheight) { _local1[objectArray[i].Name]._y = _local1[objectArray[i].Name]._y - 2; } } else if (_local1[objectArray[i].Name]._y > _local1.ship._y) { _local1[objectArray[i].Name]._y = _local1[objectArray[i].Name]._y - 2; } else if (objectArray[i].Beamed == 1) { _local1[objectArray[i].Name]._y = -20; objectArray[i].Beamed = 2; _local2.push({name:objectArray[i].Name, detach:true, debNum:4}); if (objectArray[i].Linkage != "BonusIcon") { if ((objectArray[i].Linkage != "person2") && (objectArray[i].Linkage != "person5")) { var scream = Math.round(Math.random() * 8); trace(scream); if (scream == 4) { playSound("maleEnjoy"); } else { playSound("maleScream"); } } else { playSound("maleScream"); } var scream = Math.round(Math.random() * 12); if (scream == 8) { var randSound = (Math.round(Math.random() * 3) + 1); _local1.playSound("rand" + randSound); } _global.currentPeople++; _global.totalPeople++; _local1.display._x = _local1.ship._x; _local1.display._y = _local1.ship._y; _local1.display.goToAndPlay("people"); } else { playSound("bonusSound"); _global.bonusPoints++; _local1.display._x = _local1.ship._x; _local1.display._y = _local1.ship._y; _local1.display.goToAndPlay("points"); } } if (_local1[objectArray[i].Name]._x < _local1.ship._x) { _local1[objectArray[i].Name]._x = _local1[objectArray[i].Name]._x + 1; if (_local1[objectArray[i].Name]._x >= _local1.ship._x) { _local1[objectArray[i].Name]._x = _local1.ship._x; } } if (_local1[objectArray[i].Name]._x > _local1.ship._x) { _local1[objectArray[i].Name]._x = _local1[objectArray[i].Name]._x - 1; if (_local1[objectArray[i].Name]._x <= _local1.ship._x) { _local1[objectArray[i].Name]._x = _local1.ship._x; } } } else { if (objectArray[i].Beamed == 2) { _local1[objectArray[i].Name].goToAndPlay("falling"); } if ((_local1[objectArray[i].Name]._y + (_local1[objectArray[i].Name]._height / 2)) == objectArray[i].Ground) { } else if (_local1[objectArray[i].Name]._y > 0) { _local1[objectArray[i].Name]._y = _local1[objectArray[i].Name]._y + objectArray[i].Dy; objectArray[i].Dy = objectArray[i].Dy + gravity; if (objectArray[i].Dy > yTerminalVelocity) { objectArray[i].Dy = yTerminalVelocity; } _local1[objectArray[i].Name]._x = _local1[objectArray[i].Name]._x + objectArray[i].Dx; if ((_local1[objectArray[i].Name]._y + (_local1[objectArray[i].Name]._height / 2)) >= objectArray[i].Ground) { useFriction = xGroundFriction; } else { useFriction = xFriction; } if ((objectArray[i].Dx >= -0.4) && (objectArray[i].Dx <= 0.4)) { objectArray[i].Dx = 0; } if (objectArray[i].Dx < 0) { objectArray[i].Dx = objectArray[i].Dx + useFriction; } if (objectArray[i].Dx > 0) { objectArray[i].Dx = objectArray[i].Dx - useFriction; } if ((_local1[objectArray[i].Name]._y + (_local1[objectArray[i].Name]._height / 2)) >= objectArray[i].Ground) { if (objectArray[i].Beamed == 2) { if ((objectArray[i].Ground - objectArray[i].FallHeight) < 20) { if (objectArray[i].Type == "tank") { _local1[objectArray[i].Name].gotoAndPlay("idle"); } else if (objectArray[i].Type == "person") { _local1[objectArray[i].Name].gotoAndPlay("run"); objectArray[i].Timer = 1; } if (objectArray[i].Type == "tank") { _local1[objectArray[i].Name].OpenFire(); } root[objectArray[i].Name]._y = objectArray[i].Ground; objectArray[i].Beamed = 0; } else { _local1[objectArray[i].Name].gotoAndPlay("collision"); _local1[objectArray[i].Name]._y = objectArray[i].Ground; if (objectArray[i].Linkage != nonDestructableType) { objectArray[i].Beamed = 3; } else { objectArray[i].Beamed = 0; } j = 0; while (j < objectArray.length) { if ((objectArray[j].Beamed == 0) && (_local1[objectArray[i].Name].hitTest(_local1[objectArray[j].Name]) == true)) { if (((objectArray[j].Type == "tank") && (objectArray[i].Type != "tank")) && ((objectArray[j].Type == "tank") && (objectArray[i].Type != "object"))) { } else { objectArray[j].Direction = 0; tempY = _local1[objectArray[j].Name]._y - (_local1[objectArray[i].Name].height / 100); howFar = objectArray[j].ZStack; objectArray[j].ZStack++; _local1[objectArray[i].Name].swapDepths((objectArray[j].Ground * 100) + howFar); _local1[objectArray[i].Name]._y = tempY; } if ((((objectArray[j].Type == "agent") || (objectArray[j].Type == "person")) || ((objectArray[j].Type == "tank") && (objectArray[i].Type == "tank"))) && (objectArray[j].Linkage != nonDestructableType)) { _local1[objectArray[j].Name].goToAndPlay("collision"); if (objectArray[j].Type == "tank") { _local1[objectArray[j].Name].HoldFire(); } deadArray.push(objectArray[j].Name); _local2.push({name:objectArray[j].Name, detach:false, debNum:5}); } } j++; } if (objectArray[i].Linkage != nonDestructableType) { deadArray.push(objectArray[i].Name); _local2.push({name:objectArray[i].Name, detach:false, debNum:6}); } } } objectArray[i].Dy = 0; } else if (objectArray[i].Beamed == 2) { hitFlag = false; if ((objectArray[i].Ground - objectArray[i].FallHeight) >= 20) { j = 0; while (j < objectArray.length) { if ((objectArray[j].Beamed == 0) && (_local1[objectArray[i].Name].hitTest(_local1[objectArray[j].Name]) == true)) { if (((objectArray[j].Type == "tank") && (objectArray[i].Type != "tank")) && ((objectArray[j].Type == "tank") && (objectArray[i].Type != "object"))) { } else { hitFlag = true; _local1[objectArray[i].Name].goToAndPlay("collision"); objectArray[j].Direction = 0; tempY = _local1[objectArray[j].Name]._y - _local1[objectArray[i].Name].height; howFar = objectArray[j].ZStack; objectArray[j].ZStack++; _local1[objectArray[i].Name].swapDepths((objectArray[j].Ground * 100) + howFar); _local1[objectArray[i].Name]._y = tempY; objectArray[i].Dy = 0; } if ((((((objectArray[j].Type == "agent") || (objectArray[j].Type == "person")) || (objectArray[j].Linkage == "bear")) || ((objectArray[j].Type == "tank") && (objectArray[i].Type == "tank"))) || ((objectArray[j].Type == "tank") && (objectArray[i].Type == "object"))) && (objectArray[j].Linkage != nonDestructableType)) { _local1[objectArray[j].Name].goToAndPlay("collision"); if (objectArray[j].Type == "tank") { _local1[objectArray[j].Name].HoldFire(); } deadArray.push(objectArray[j].Name); _local2.push({name:objectArray[j].Name, detach:false, debNum:5}); } break; } j++; } if (hitFlag == true) { if (objectArray[i].Linkage != nonDestructableType) { objectArray[i].Beamed = 3; } else { objectArray[i].Beamed = 0; } if (objectArray[i].Linkage != nonDestructableType) { deadArray.push(objectArray[i].Name); _local2.push({name:objectArray[i].Name, detach:false, debNum:6}); } } } } } } } else if (objectArray[i].Beamed == 1) { if (_local1.beam.hitTest(_local1[objectArray[i].Name]) == eval("False")) { objectArray[i].Beamed = 0; objectArray[i].Timer = 1; } } i++; } var _local3 = 0; while (_local3 < _local2.length) { removeObject(_local2[_local3].name, _local2[_local3].detach, _local2[_local3].debNum); _local3++; } } function moveTargets() { var _local1 = _root; if (targetArray_Name.length != 0) { i = 0; while (i < targetArray_Name.length) { if (targetArray_Frames[i] == 0) { myX = _local1[targetArray_Target[i]]._x; myY = _local1[targetArray_Target[i]]._y; } else { myX = _local1[targetArray_Name[i]]._x + ((_local1[targetArray_Target[i]]._x - _local1[targetArray_Name[i]]._x) / targetArray_Frames[i]); myY = _local1[targetArray_Name[i]]._y + ((_local1[targetArray_Target[i]]._y - _local1[targetArray_Name[i]]._y) / targetArray_Frames[i]); targetArray_Frames[i]--; } _local1[targetArray_Name[i]]._x = myX; _local1[targetArray_Name[i]]._y = myY; i++; } } } function createTarget(myTarget) { var _local1 = _root; name = "unique" + identifierNumber; identifierNumber++; _local1.attachMovie("manTarget", name, z3); z3++; targetArray_Name.push(name); targetArray_Target.push(objectArray[myTarget].Name); targetArray_Frames.push(15); _local1[name]._x = 275; _local1[name]._y = -60; } function removeTarget(myTarget) { var _local1 = myTarget; var _local2 = _root; i = 0; while (i < targetArray_Name.length) { if (targetArray_Target[i] == objectArray[_local1].Name) { _local2[targetArray_Name[i]].removeMovieClip(); targetArray_Name.splice(i, 1); targetArray_Target.splice(i, 1); targetArray_Frames.splice(i, 1); } i++; } } function moveScene(d) { var _local1 = d; var _local2 = _root; if (((panAmount + _local1) > panLimitLeft) and ((panAmount + _local1) < panLimitRight)) { panAmount = panAmount + _local1; trees._x = trees._x + (_local1 * 1); bushes._x = bushes._x + (_local1 * 0.8); hills._x = hills._x + (_local1 * 0.4); boundingbox._x = boundingbox._x + (_local1 * 1); i = 0; while (i < objectArray.length) { if ((((objectArray[i].Beamed == 0) || (objectArray[i].Beamed == 3)) || (objectArray[i].Beamed == 2)) || (objectArray[i].Type == "agent")) { _local2[objectArray[i].Name]._x = _local2[objectArray[i].Name]._x + _local1; } i++; } var i = 0; while (i < heliArray.length) { if (heliArray[i].inFlight == true) { _local2[heliArray[i].name]._x = _local2[heliArray[i].name]._x + _local1; } i++; } i = 0; while (i < deadArray.length) { _local2[deadArray[i]]._x = _local2[deadArray[i]]._x + _local1; i++; } i = 0; while (i < bulletArray.length) { _local2[bulletArray[i]]._x = _local2[bulletArray[i]]._x + _local1; i++; } return(0); } return(1); } function runLevel() { var _local1 = _root; var _local2 = _global; if (buttonCoolDown == 0) { if (Key.isDown(80) || (Key.isDown(27))) { buttonCoolDown = 10; if (_local2.gamePaused == false) { _local1.paused.gotoAndPlay("show"); _local2.gamePaused = true; intPauseTime = getTimer(); } else { _local1.paused.gotoAndPlay("hide"); _local2.gamePaused = false; if (_local2.nextTime != -1) { _local2.nextTime = _local2.nextTime + (getTimer() - intPauseTime); } intPauseTime = 0; } } } else { buttonCoolDown--; } if (_local2.gamePaused == false) { if (deathCounter == -1) { if (Key.isDown(39) && (!Key.isDown(37))) { dx = dx + sensitivity; if (dx > terminalVelocity) { dx = terminalVelocity; } } if (Key.isDown(37) && (!Key.isDown(39))) { dx = dx - sensitivity; if (dx < (terminalVelocity * -1)) { dx = terminalVelocity * -1; } } if (Key.isDown(40) && (!Key.isDown(38))) { dy = dy + sensitivity; if (dy > terminalVelocity) { dy = terminalVelocity; } } if (Key.isDown(38) && (!Key.isDown(40))) { dy = dy - sensitivity; if (dy < (terminalVelocity * -1)) { dy = terminalVelocity * -1; } } } } if (Key.isDown(68)) { _local2.debug = true; _local1.debugStatus(); } else { _local2.debug = false; } if (Key.isDown(16) && (Key.isDown(49))) { _local1.prepareForFrameChange(true, 5); _local2.gamePaused = false; _local2.cheated = true; } if (Key.isDown(16) && (Key.isDown(50))) { _local1.prepareForFrameChange(true, 10); _local2.gamePaused = false; _local2.cheated = true; } if (Key.isDown(16) && (Key.isDown(51))) { _local1.prepareForFrameChange(true, 15); _local2.gamePaused = false; _local2.cheated = true; } if (Key.isDown(16) && (Key.isDown(52))) { _local1.prepareForFrameChange(true, 20); _local2.gamePaused = false; _local2.cheated = true; } if (Key.isDown(16) && (Key.isDown(53))) { _local1.prepareForFrameChange(true, 25); _local2.gamePaused = false; _local2.cheated = true; } if (Key.isDown(16) && (Key.isDown(54))) { _local1.prepareForFrameChange(true, 30); _local2.gamePaused = false; _local2.cheated = true; } if (Key.isDown(16) && (Key.isDown(55))) { _local1.prepareForFrameChange(true, 35); _local2.gamePaused = false; _local2.cheated = true; } if (Key.isDown(16) && (Key.isDown(56))) { _local1.prepareForFrameChange(true, 40); _local2.gamePaused = false; _local2.cheated = true; } if (Key.isDown(16) && (Key.isDown(57))) { _local1.prepareForFrameChange(true, 45); _local2.gamePaused = false; _local2.cheated = true; } if (Key.isDown(16) && (Key.isDown(48))) { _local1.prepareForFrameChange(true, 50); _local2.gamePaused = false; _local2.cheated = true; } if (_local2.gamePaused == false) { if ((!Key.isDown(37)) && (!Key.isDown(39))) { if (dx > 0) { dx = dx - airFriction; } if (dx < 0) { dx = dx + airFriction; } if ((dx >= -0.3) && (dx <= 0.3)) { dx = 0; } } if ((!Key.isDown(38)) && (!Key.isDown(40))) { if (dy > 0) { dy = dy - airFriction; } if (dy < 0) { dy = dy + airFriction; } if ((dy >= -0.3) && (dy <= 0.3)) { dy = 0; } } if (Key.isDown(32) && (energyFlag == 0)) { _local1.beam.gotoandstop(2); shipEnergy = shipEnergy - beamCost; if (shipEnergy < 0) { shipEnergy = 0; energyFlag = 1; } beamFlag = true; _local1.startBeamTags(); } else { beamFlag = false; _local1.beam.gotoandstop(1); shipEnergy = shipEnergy + rechargeRate; if (shipEnergy > totalEnergy) { shipEnergy = totalEnergy; energyFlag = 0; } _local1.removeBeamTags(); } _local1.beamMeUp(); _local1.updateEnergyBar(shipEnergy, totalEnergy, energyFlag); _local1.ship._x = _local1.ship._x + dx; _local1.ship._y = _local1.ship._y + dy; if (beamFlag == true) { _local1.beamHorizontalAndVertical(dx, dy); } if (_local2.shipUsed == 1) { _local1.ship.inside._rotation = dx * 2.5; } if (_local1.ship._x > 450) { _local1.ship._x = 450; } if (_local1.ship._x < 100) { _local1.ship._x = 100; } if (_local1.ship._y < 50) { _local1.ship._y = 50; dy = 0; } if (_local1.ship._y > 250) { _local1.ship._y = 250; dy = 0; } _local1.shadow._x = _local1.ship._x; _local1.beam._x = _local1.ship._x; _local1.beam._y = (_local1.ship._y + (_local1.ship._y / 8)) + 35; _local1.beam._xscale = 50 + ((_local1.ship._y / 2.5) / 2); _local1.beam._yscale = 50 + ((_local1.ship._y / 2.5) / 2); _local1.shadow._alpha = _local1.ship._y / 4; _local1.shadow._xscale = 300 - _local1.ship._y; _local1.shadow._yscale = 300 - _local1.ship._y; varFlag = 0; if ((_local1.ship._x <= 100) && (dx < 0)) { varFlag = _local1.moveScene(-1 * dx); } else if ((_local1.ship._x >= 450) && (dx > 0)) { varFlag = _local1.moveScene(-1 * dx); } if (varFlag == 1) { dx = 0; } _local1.runTimer(); _local1.TankGenerator(); _local1.ManageHelicopters(); _local1.spotship(); _local1.makePeopleMove(); _local1.DetectBulletHits(); _local1.updatePeopleBar(_local2.currentPeople, _local2.totalPeopleToGet); _local1.moveTargets(); if (deathCounter >= 0) { if (deathCounter == 0) { _local2.livesLeft--; _local1.updateLives(_local2.livesLeft); _local1.prepareForFrameChange(false, 0); if (_local2.livesLeft != 0) { var randSound = (Math.round(Math.random() * 5) + 1); } } else { deathCounter--; } } if (_local2.nextTime != -1) { _local1.updateTimer(); } } } stop(); myNextLevel = 10; _global.debug = false; nonDestructableType = "rock"; panLimitLeft = -300; panLimitRight = 300; panAmount = 0; oldValue = 0; numPeople = 0; maxPeople = 0; percentFrequency = 0; zArray = new Array(); zStack = new Array(); z3 = 10000; objectArray = new Array(); bulletArray = new Array(); deadArray = new Array(); targetArray_Name = new Array(); targetArray_Target = new Array(); targetArray_Frames = new Array(); availPeople = new Array(); myVolume = 100; mySong = "Nothing"; myZ1 = 0; myZ2 = 0; terminalVelocity = 8; sensitivity = 0.4; totalEnergy = 200; shipEnergy = 200; rechargeRate = 2; beamCost = 2; timeToBeat = 180; airFriction = 0.15; xFriction = 0.15; xGroundFriction = 0.4; gravity = 0.4; yTerminalVelocity = 15; energyFlag = 0; pickUpFlag = 0; dropSpeed = 0; groundLevel = _root.truck._y; truckFlag = 0; dx = 0; dy = 0; tankArray = new Array(); tankSpawnTimeMin = 0; tankSpawnTimeMax = 0; tankCounter = -1; blnUseTanks = false; tanksToUse = "green"; heliArray = new Array(); bulletDepth = 30000; _global.totalPeopleToGet = 5; identifierNumber = 5; var mySoundPlayer = new SoundPlayer(); buttonCoolDown = 0; intPauseTime = 0; deathCounter = -1; almostFlag = false;
Instance of Symbol 304 MovieClip in Frame 50
onClipEvent (load) { _root.initializeLevel(50, 50, -700, 700, "", 600, 10000); _root.updateLives(_global.livesLeft); _root.setPeopleTimer(30, 6); _root.addPersonType("ethan", "person", 25); _root.addPersonType("person1", "person", 25); _root.addPersonType("person2", "person", 25); _root.addPersonType("person3", "person", 25); _root.addPersonType("person4", "person", 25); _root.addPersonType("person5", "person", 25); _root.addPersonType("person6", "person", 25); _root.addPersonType("eskimo", "person", 25); _root.addPersonType("Astronaut", "person", 25); _root.addUnit("bonus5", 0, "BonusIcon", "object"); _root.addUnit("bonus2", 0, "BonusIcon", "object"); _root.addUnit("bonus3", 0, "BonusIcon", "object"); _root.addUnit("tank1", 2, "redTank", "tank"); _root.addUnit("tank4", 2, "redTank", "tank"); _root.addUnit("tank3", 2, "redTank", "tank"); _root.addUnit("tank5", 2, "redTank", "tank"); _root.addHelicopter("demon1", 20, 40, 6); _root.addHelicopter("demon2", 50, 100, 6); _root.addHelicopter("demon3", 60, 120, 6); _root.addHelicopter("demon4", 70, 130, 6); _root.addHelicopter("demon5", 80, 200, 6); _root.addHelicopter("demon6", 50, 100, 6); _root.addHelicopter("demon7", 50, 100, 6); _root.addHelicopter("demon8", 50, 100, 6); _root.StartTankGenerator(10, 80, "red"); _root.flash.swapDepths(100000); levelTrack = "hell level"; _root.startMusicDownload(levelTrack); } onClipEvent (enterFrame) { _root.runLevel(); }
Instance of Symbol 657 MovieClip "volumeClip" in Frame 50
onClipEvent (load) { if (_global.volume == true) { volumeClip.goToAndPlay("volumeOn"); } else { volumeClip.goToAndPlay("volumeOff"); } } on (release) { if (_global.volume == true) { _global.volume = false; _root.volumeClip.nextFrame(); _root.toggleMusic(); } else { _global.volume = true; _root.volumeClip.prevFrame(); _root.toggleMusic(); } }
Frame 51
gotoAndPlay ("endBufferAudio");
Frame 100
gotoAndPlay (2);
Symbol 32 MovieClip [person5] Frame 1
stop();
Symbol 32 MovieClip [person5] Frame 2
stop();
Symbol 32 MovieClip [person5] Frame 3
play();
Symbol 32 MovieClip [person5] Frame 5
gotoAndPlay ("beamed");
Symbol 32 MovieClip [person5] Frame 6
stop();
Symbol 32 MovieClip [person5] Frame 7
play();
Symbol 32 MovieClip [person5] Frame 11
gotoAndPlay ("walk");
Symbol 32 MovieClip [person5] Frame 12
play();
Symbol 32 MovieClip [person5] Frame 16
gotoAndPlay ("run");
Symbol 32 MovieClip [person5] Frame 17
play();
Symbol 32 MovieClip [person5] Frame 54
stop();
Symbol 50 MovieClip [person6] Frame 1
stop();
Symbol 50 MovieClip [person6] Frame 2
stop();
Symbol 50 MovieClip [person6] Frame 3
play();
Symbol 50 MovieClip [person6] Frame 5
gotoAndPlay ("beamed");
Symbol 50 MovieClip [person6] Frame 6
stop();
Symbol 50 MovieClip [person6] Frame 7
play();
Symbol 50 MovieClip [person6] Frame 11
gotoAndPlay ("walk");
Symbol 50 MovieClip [person6] Frame 12
play();
Symbol 50 MovieClip [person6] Frame 16
gotoAndPlay ("run");
Symbol 50 MovieClip [person6] Frame 17
play();
Symbol 50 MovieClip [person6] Frame 54
stop();
Symbol 68 MovieClip [person3] Frame 1
stop();
Symbol 68 MovieClip [person3] Frame 2
stop();
Symbol 68 MovieClip [person3] Frame 3
play();
Symbol 68 MovieClip [person3] Frame 5
gotoAndPlay ("beamed");
Symbol 68 MovieClip [person3] Frame 6
stop();
Symbol 68 MovieClip [person3] Frame 7
play();
Symbol 68 MovieClip [person3] Frame 11
gotoAndPlay ("walk");
Symbol 68 MovieClip [person3] Frame 12
play();
Symbol 68 MovieClip [person3] Frame 14
gotoAndPlay ("run");
Symbol 68 MovieClip [person3] Frame 15
play();
Symbol 68 MovieClip [person3] Frame 52
stop();
Symbol 71 MovieClip [truck] Frame 1
stop();
Symbol 71 MovieClip [truck] Frame 40
stop();
Symbol 71 MovieClip [truck] Frame 41
stop();
Symbol 71 MovieClip [truck] Frame 60
stop();
Symbol 76 MovieClip [bullet] Frame 1
#initclip 13 Object.registerClass("bullet", Bullet); #endinitclip
Symbol 80 MovieClip Frame 10
gotoAndPlay ("move");
Symbol 88 MovieClip Frame 25
stop();
Symbol 91 MovieClip Frame 8
stop();
Symbol 103 MovieClip Frame 13
stop();
Symbol 104 MovieClip [redTank] Frame 1
#initclip 7 Object.registerClass("redTank", Tank); #endinitclip
Symbol 104 MovieClip [redTank] Frame 4
gotoAndPlay ("idle");
Symbol 104 MovieClip [redTank] Frame 8
gotoAndPlay ("beamed");
Symbol 104 MovieClip [redTank] Frame 9
_root.playSound("explosion");
Symbol 104 MovieClip [redTank] Frame 40
_root.ObjectCleanup(this._name); stop();
Symbol 106 MovieClip Frame 10
gotoAndPlay ("move");
Symbol 111 MovieClip Frame 25
stop();
Symbol 112 MovieClip [whiteTank] Frame 1
#initclip 8 Object.registerClass("whiteTank", Tank); #endinitclip
Symbol 112 MovieClip [whiteTank] Frame 4
gotoAndPlay ("idle");
Symbol 112 MovieClip [whiteTank] Frame 8
gotoAndPlay ("beamed");
Symbol 112 MovieClip [whiteTank] Frame 9
_root.playSound("explosion");
Symbol 112 MovieClip [whiteTank] Frame 40
_root.ObjectCleanup(this._name); stop();
Symbol 116 MovieClip [antiAir] Frame 1
#initclip 9 Object.registerClass("antiAir", Tank); #endinitclip
Symbol 116 MovieClip [antiAir] Frame 2
gotoAndPlay ("idle");
Symbol 116 MovieClip [antiAir] Frame 3
_root.playSound("explosion");
Symbol 116 MovieClip [antiAir] Frame 16
stop();
Symbol 122 MovieClip Frame 40
gotoAndPlay (1);
Symbol 123 MovieClip [BonusIcon] Frame 1
stop();
Symbol 123 MovieClip [BonusIcon] Frame 2
stop();
Symbol 123 MovieClip [BonusIcon] Frame 6
stop();
Symbol 132 MovieClip [bullet ground] Frame 1
#initclip 10 Object.registerClass("bullet ground", Bullet); #endinitclip
Symbol 134 MovieClip Frame 10
gotoAndPlay ("move");
Symbol 139 MovieClip Frame 25
stop();
Symbol 140 MovieClip [tank] Frame 1
#initclip 11 Object.registerClass("tank", Tank); #endinitclip
Symbol 140 MovieClip [tank] Frame 4
gotoAndPlay ("idle");
Symbol 140 MovieClip [tank] Frame 8
gotoAndPlay ("beamed");
Symbol 140 MovieClip [tank] Frame 9
_root.playSound("explosion");
Symbol 140 MovieClip [tank] Frame 40
_root.ObjectCleanup(this._name); stop();
Symbol 147 MovieClip [bullet air] Frame 1
#initclip 12 Object.registerClass("bullet air", Bullet); #endinitclip
Symbol 165 MovieClip [Astronaut] Frame 1
stop();
Symbol 165 MovieClip [Astronaut] Frame 2
stop();
Symbol 165 MovieClip [Astronaut] Frame 3
play();
Symbol 165 MovieClip [Astronaut] Frame 4
gotoAndPlay ("beamed");
Symbol 165 MovieClip [Astronaut] Frame 5
gotoAndPlay ("beamed");
Symbol 165 MovieClip [Astronaut] Frame 6
stop();
Symbol 165 MovieClip [Astronaut] Frame 7
play();
Symbol 165 MovieClip [Astronaut] Frame 10
gotoAndPlay ("walk");
Symbol 165 MovieClip [Astronaut] Frame 11
gotoAndPlay ("walk");
Symbol 165 MovieClip [Astronaut] Frame 12
play();
Symbol 165 MovieClip [Astronaut] Frame 16
gotoAndPlay ("run");
Symbol 165 MovieClip [Astronaut] Frame 17
play();
Symbol 165 MovieClip [Astronaut] Frame 54
stop();
Symbol 182 MovieClip [eskimo] Frame 1
stop();
Symbol 182 MovieClip [eskimo] Frame 2
stop();
Symbol 182 MovieClip [eskimo] Frame 3
play();
Symbol 182 MovieClip [eskimo] Frame 5
gotoAndPlay ("beamed");
Symbol 182 MovieClip [eskimo] Frame 6
stop();
Symbol 182 MovieClip [eskimo] Frame 7
play();
Symbol 182 MovieClip [eskimo] Frame 11
gotoAndPlay ("walk");
Symbol 182 MovieClip [eskimo] Frame 12
play();
Symbol 182 MovieClip [eskimo] Frame 16
gotoAndPlay ("run");
Symbol 182 MovieClip [eskimo] Frame 17
play();
Symbol 182 MovieClip [eskimo] Frame 54
stop();
Symbol 203 MovieClip [person4] Frame 1
stop();
Symbol 203 MovieClip [person4] Frame 2
stop();
Symbol 203 MovieClip [person4] Frame 3
play();
Symbol 203 MovieClip [person4] Frame 5
gotoAndPlay ("beamed");
Symbol 203 MovieClip [person4] Frame 6
stop();
Symbol 203 MovieClip [person4] Frame 7
play();
Symbol 203 MovieClip [person4] Frame 11
gotoAndPlay ("walk");
Symbol 203 MovieClip [person4] Frame 12
play();
Symbol 203 MovieClip [person4] Frame 16
gotoAndPlay ("run");
Symbol 203 MovieClip [person4] Frame 17
play();
Symbol 203 MovieClip [person4] Frame 54
stop();
Symbol 222 MovieClip [person1] Frame 1
stop();
Symbol 222 MovieClip [person1] Frame 2
stop();
Symbol 222 MovieClip [person1] Frame 3
play();
Symbol 222 MovieClip [person1] Frame 5
gotoAndPlay ("beamed");
Symbol 222 MovieClip [person1] Frame 6
stop();
Symbol 222 MovieClip [person1] Frame 7
play();
Symbol 222 MovieClip [person1] Frame 11
gotoAndPlay ("walk");
Symbol 222 MovieClip [person1] Frame 12
play();
Symbol 222 MovieClip [person1] Frame 16
gotoAndPlay ("run");
Symbol 222 MovieClip [person1] Frame 17
play();
Symbol 222 MovieClip [person1] Frame 54
stop();
Symbol 243 MovieClip [person2] Frame 1
stop();
Symbol 243 MovieClip [person2] Frame 2
stop();
Symbol 243 MovieClip [person2] Frame 3
play();
Symbol 243 MovieClip [person2] Frame 5
gotoAndPlay ("beamed");
Symbol 243 MovieClip [person2] Frame 6
stop();
Symbol 243 MovieClip [person2] Frame 7
play();
Symbol 243 MovieClip [person2] Frame 11
gotoAndPlay ("walk");
Symbol 243 MovieClip [person2] Frame 12
play();
Symbol 243 MovieClip [person2] Frame 16
gotoAndPlay ("run");
Symbol 243 MovieClip [person2] Frame 18
play();
Symbol 243 MovieClip [person2] Frame 55
stop();
Symbol 261 MovieClip [ethan] Frame 1
stop();
Symbol 261 MovieClip [ethan] Frame 2
stop();
Instance of Symbol 246 MovieClip in Symbol 261 MovieClip [ethan] Frame 2
on (release) { _root.prepareForFrameChange(true, 17); }
Symbol 261 MovieClip [ethan] Frame 3
play();
Symbol 261 MovieClip [ethan] Frame 5
gotoAndPlay ("beamed");
Symbol 261 MovieClip [ethan] Frame 6
stop();
Symbol 261 MovieClip [ethan] Frame 7
play();
Symbol 261 MovieClip [ethan] Frame 11
gotoAndPlay ("walk");
Symbol 261 MovieClip [ethan] Frame 12
play();
Symbol 261 MovieClip [ethan] Frame 16
gotoAndPlay ("run");
Symbol 261 MovieClip [ethan] Frame 17
play();
Symbol 261 MovieClip [ethan] Frame 54
stop();
Symbol 279 MovieClip [Brian] Frame 1
stop();
Symbol 279 MovieClip [Brian] Frame 2
stop();
Symbol 279 MovieClip [Brian] Frame 3
play();
Symbol 279 MovieClip [Brian] Frame 5
gotoAndPlay ("beamed");
Symbol 279 MovieClip [Brian] Frame 6
stop();
Symbol 279 MovieClip [Brian] Frame 7
play();
Symbol 279 MovieClip [Brian] Frame 11
gotoAndPlay ("walk");
Symbol 279 MovieClip [Brian] Frame 12
play();
Symbol 279 MovieClip [Brian] Frame 16
gotoAndPlay ("run");
Symbol 279 MovieClip [Brian] Frame 17
play();
Symbol 279 MovieClip [Brian] Frame 54
stop();
Symbol 299 MovieClip [MIB] Frame 25
stop();
Symbol 299 MovieClip [MIB] Frame 33
stop();
Symbol 299 MovieClip [MIB] Frame 39
gotoAndPlay ("walk");
Symbol 299 MovieClip [MIB] Frame 44
gotoAndPlay ("run");
Symbol 299 MovieClip [MIB] Frame 45
stop();
Symbol 317 Button
on (release) { getURL ("http://www.armorgames.com", "_blank"); }
Symbol 1050 MovieClip [__Packages.SoundPlayer] Frame 0
class SoundPlayer { var channelsAvailable; function SoundPlayer () { var _local1 = this; _local1.channelsAvailable = new Array(true, true, true, true); _local1.channel1 = new Sound(); _local1.channel2 = new Sound(); _local1.channel3 = new Sound(); _local1.channel4 = new Sound(); _local1.externalSoundVolume = 100; } function CleanSounds(intIndex) { channelsAvailable[intIndex] = true; } function PlaySound(linkIdentifier) { var _local1 = this; var _local2 = linkIdentifier; if (_global.soundOn == true) { var thisRef = _local1; if (_local1.channelsAvailable[0] == true) { _local1.channelsAvailable[0] = false; delete _local1.channel1; _local1.channel1 = new Sound(); _local1.channel1.attachSound(_local2); _local1.channel1.setVolume(100); _local1.channel1.start(0, 0); _local1.channel1.onSoundComplete = function () { thisRef.CleanSounds(0); }; } else if (_local1.channelsAvailable[1] == true) { _local1.channelsAvailable[1] = false; delete _local1.channel2; _local1.channel2 = new Sound(); _local1.channel2.attachSound(_local2); _local1.channel2.setVolume(100); _local1.channel2.start(0, 0); _local1.channel2.onSoundComplete = function () { thisRef.CleanSounds(1); }; } else if (_local1.channelsAvailable[2] == true) { _local1.channelsAvailable[2] = false; delete _local1.channel3; _local1.channel3 = new Sound(); _local1.channel3.attachSound(_local2); _local1.channel3.setVolume(100); _local1.channel3.start(0, 0); _local1.channel3.onSoundComplete = function () { thisRef.CleanSounds(2); }; } else if (_local1.channelsAvailable[3] == true) { _local1.channelsAvailable[3] = false; delete _local1.channel1; _local1.channel4 = new Sound(); _local1.channel4.attachSound(_local2); _local1.channel4.setVolume(100); _local1.channel4.start(0, 0); _local1.channel4.onSoundComplete = function () { thisRef.CleanSounds(3); }; } else { _local1.channelsAvailable[0] = false; delete _local1.channel1; _local1.channel1 = new Sound(); _local1.channel1.attachSound(_local2); _local1.channel1.setVolume(100); _local1.channel1.start(0, 0); _local1.channel1.onSoundComplete = function () { thisRef.CleanSounds(0); }; } } } function PlayExternalSound(urlPath) { var _local1 = this; var _local2 = urlPath; var thisRef = _local1; if (_local1.channelsAvailable[0] == true) { _local1.channelsAvailable[0] = false; delete _local1.channel1; _local1.channel1 = new Sound(); _local1.channel1.loadSound(_local2, false); _local1.channel1.setVolume(_local1.externalSoundVolume); _local1.channel1.onLoad = function (loadedOK) { if (loadedOK) { this.start(); } }; _local1.channel1.onSoundComplete = function () { thisRef.CleanSounds(0); }; } else if (_local1.channelsAvailable[1] == true) { _local1.channelsAvailable[1] = false; delete _local1.channel2; _local1.channel2 = new Sound(); _local1.channel2.loadSound(_local2, false); _local1.channel2.setVolume(_local1.externalSoundVolume); _local1.channel2.onLoad = function (loadedOK) { if (loadedOK) { this.start(); } }; _local1.channel2.onSoundComplete = function () { thisRef.CleanSounds(1); }; } else if (_local1.channelsAvailable[2] == true) { _local1.channelsAvailable[2] = false; delete _local1.channel3; _local1.channel3 = new Sound(); _local1.channel3.loadSound(_local2, false); _local1.channel3.setVolume(_local1.externalSoundVolume); _local1.channel3.onLoad = function (loadedOK) { if (loadedOK) { this.start(); } }; _local1.channel3.onSoundComplete = function () { thisRef.CleanSounds(2); }; } else if (_local1.channelsAvailable[3] == true) { _local1.channelsAvailable[3] = false; delete _local1.channel4; _local1.channel4 = new Sound(); _local1.channel4.loadSound(_local2, false); _local1.channel4.setVolume(_local1.externalSoundVolume); _local1.channel4.onLoad = function (loadedOK) { if (loadedOK) { this.start(); } }; _local1.channel4.onSoundComplete = function () { thisRef.CleanSounds(3); }; } else { _local1.channelsAvailable[0] = false; delete _local1.channel1; _local1.channel1 = new Sound(); _local1.channel1.loadSound(_local2, false); _local1.channel1.setVolume(_local1.externalSoundVolume); _local1.channel1.onLoad = function (loadedOK) { if (loadedOK) { this.start(); } }; _local1.channel1.onSoundComplete = function () { thisRef.CleanSounds(0); }; } } }
Symbol 1051 MovieClip [__Packages.Music] Frame 0
class Music { var maxVolume, mySound, state; function Music () { var _local1 = this; _local1.mySound = new Sound(); _local1.volume = 100; _local1.currentTrack = ""; _local1.inCrossfade = false; _local1.state = false; _local1.changeSongs = true; _local1.maxVolume = 100; } function SetMaxVolume(vol) { maxVolume = vol; } function SetTrack(setMusic) { var _local1 = this; if (setMusic == _local1.currentTrack) { _local1.changeSongs = false; } else { _local1.changeSongs = true; _local1.currentTrack = setMusic; } } function Play() { var _local1 = this; _local1.mySound.stop(); _local1.mySound.attachSound(_local1.currentTrack); _local1.volume = _local1.maxVolume; _local1.mySound.setVolume(_local1.volume); _local1.mySound.start(0, 2000); _local1.state = true; } function Stop() { mySound.stop(); state = false; } function PlayWithCrossFade(secondDuration) { var _local1 = this; if (_local1.changeSongs == true) { if (_local1.state == true) { _local1.inCrossfade = true; _local1.targetVolume = 0; var _local2 = secondDuration * 30; _local1.volumeSpeed = (_local1.targetVolume - _local1.volume) / (_local2 / 2); } else { _local1.mySound.stop(); _local1.mySound.attachSound(_local1.currentTrack); _local1.mySound.start(0, 2000); _local1.state = true; _local1.inCrossfade = false; _local1.targetVolume = _local1.maxVolume; _local1.volume = 0; _local1.mySound.setVolume(0); var _local2 = secondDuration * 30; _local1.volumeSpeed = (_local1.targetVolume - _local1.volume) / _local2; } } } function RunPlayer() { var _local1 = this; if (_local1.targetVolume != _local1.volume) { var _local2; _local2 = _local1.volume + _local1.volumeSpeed; if ((_local1.volumeSpeed < 0) && (_local2 < 0)) { _local2 = 0; } else if ((_local1.volumeSpeed > 0) && (_local2 > _local1.targetVolume)) { _local2 = _local1.targetVolume; } _local1.volume = _local2; _local1.mySound.setVolume(_local2); } if (_local1.inCrossfade == true) { if (_local1.volume <= 0) { _local1.volumeSpeed = _local1.volumeSpeed * -1; _local1.inCrossfade = false; _local1.targetVolume = _local1.maxVolume; _local1.mySound.stop(); _local1.mySound.attachSound(_local1.currentTrack); _local1.mySound.setVolume(0); _local1.mySound.start(0, 2000); _local1.state = true; } } } }
Symbol 1052 MovieClip [__Packages.Tank] Frame 0
class Tank extends MovieClip { var blnHoldFire; function Tank () { var _local1 = this; super(); _local1.intFireTimer = 0; _local1.counter = -1; _local1.bulletID = 1; _local1.blnHoldFire = false; } function SetFireRate(myInt) { var _local1 = this; _local1.intFireTimer = myInt; _local1.counter = _local1.intFireTimer; } function onEnterFrame() { var _local1 = this; if (_global.gamePaused == false) { if (_local1.blnHoldFire == false) { if (_local1.counter == 0) { if ((_local1._x > 0) && ((_local1._x + _local1._width) < Stage.width)) { _local1.FireBullet(); _local1.counter = _local1.intFireTimer; } } else { _local1.counter--; } } } } function FireBullet() { var _local1 = this; var _local2 = _root; var bulletName = ((_local1._name + "_bullet_") + _local1.bulletID); _local1.bulletID++; var _local3 = {x:_local2[_local1._name].cannon.emmitter._x, y:_local2[_local1._name].cannon.emmitter._y}; _local2[_local1._name].cannon.localToGlobal(_local3); if (_local2[_local1._name]._xscale > 0) { var startX = _local3.x; var startY = _local3.y; var directionX = ((Math.cos((Math.PI * (_local2[_local1._name].cannon._rotation - 15)) / 180) * 4) * -1); var directionY = ((Math.sin((Math.PI * (_local2[_local1._name].cannon._rotation - 15)) / 180) * 4) * -1); } else { var startX = _local3.x; var startY = _local3.y; var directionX = (Math.cos((Math.PI * _local2[_local1._name].cannon._rotation) / 180) * 4); var directionY = (Math.sin((Math.PI * _local2[_local1._name].cannon._rotation) / 180) * -4); } _local2.LaunchBullet(bulletName, startX, startY, directionX, directionY); } function OpenFire() { blnHoldFire = false; } function HoldFire() { blnHoldFire = true; } }
Symbol 1053 MovieClip [__Packages.Bullet] Frame 0
class Bullet extends MovieClip { var moveX, moveY; function Bullet () { super(); moveX = 0; moveY = 0; } function SetMovement(myX, myY) { moveX = myX; moveY = myY; } function onEnterFrame() { var _local1 = this; var _local2 = _root; if (_global.gamePaused == false) { _local1._x = _local1._x + _local1.moveX; _local1._y = _local1._y + _local1.moveY; if (((_local1._y < 0) || (_local1._x < (_local2.boundingbox._x - (_local2.boundingbox._width / 2)))) || (_local1._x > (_local2.boundingbox._x + (_local2.boundingbox._width / 2)))) { _local2.RemoveBullet(_local1._name); } } } }
Symbol 1054 MovieClip [__Packages.BagunkScores] Frame 0
class BagunkScores { var intGameID, strConnectionKey, xmlLoader; function BagunkScores () { var _local1 = this; _local1.strFilePath = "http://www.bagunk.com/receiveScores.php"; _local1.loadVarObject = new LoadVars(); _local1.xmlLoader = new XML(); } function SetGameID(id) { intGameID = id; } function SetCode(passwordString) { strConnectionKey = passwordString; } function SendScores(username, score) { var _local1 = this; var _local3 = new ScoreEncrypter(128, 128); var _local2 = String(score); var rijndael_hash = _local3.encrypt(_local2, _local1.strConnectionKey, "ECB"); _local1.loadVarObject.name = username; _local1.loadVarObject.score = rijndael_hash; _local1.loadVarObject.gameID = _local1.intGameID; _local1.loadVarObject.pageMode = 1; _local1.loadVarObject.send(_local1.strFilePath, "_blank", "POST"); } function UserLogin(score) { var _local1 = this; var _local3 = new ScoreEncrypter(128, 128); var _local2 = String(score); var rijndael_hash = _local3.encrypt(_local2, _local1.strConnectionKey, "ECB"); _local1.loadVarObject.gameID = _local1.intGameID; _local1.loadVarObject.score = rijndael_hash; _local1.loadVarObject.pageMode = 2; _local1.loadVarObject.send(_local1.strFilePath, "_blank", "POST"); } function GetScores() { var thisRef = this; xmlLoader.ignoreWhite = true; xmlLoader.onLoad = function (blnSuccess) { thisRef.scoreArray = new Array(); if (blnSuccess) { var strProfileLink = this.firstChild.attributes.userProfilePage; var currentNode = this.firstChild.firstChild; if (currentNode.attributes.blnSuccess == 0) { trace("Bagunk Scores Loading Failed!"); } currentNode = currentNode.nextSibling; var _local1 = currentNode.firstChild; while (_local1) { var strUsername = _local1.attributes.username; var _local3 = _local1.attributes.verified; var _local2 = _local1.attributes.score; var strProfileURL = (strProfileLink + _local1.attributes.userID); thisRef.scoreArray.push({username:strUsername, verified:_local3, score:_local2, profileURL:strProfileURL}); _local1 = _local1.nextSibling; } thisRef.OnGetScoresCompleted(thisRef.scoreArray); } }; xmlLoader.load("http://www.bagunk.com/sendScores.php?gameID=" + intGameID); } }
Symbol 1055 MovieClip [__Packages.ScoreEncrypter] Frame 0
class ScoreEncrypter { var Nb; function ScoreEncrypter (keySize, blockSize) { var _local1 = this; var _local2 = blockSize; var _local3 = keySize; if (_local3 != null) { _local1.keySize = _local3; } if (_local2 != null) { _local1.blockSize = _local2; } _local1.roundsArray = [0, 0, 0, 0, [0, 0, 0, 0, 10, 0, 12, 0, 14], 0, [0, 0, 0, 0, 12, 0, 12, 0, 14], 0, [0, 0, 0, 0, 14, 0, 14, 0, 14]]; _local1.shiftOffsets = [0, 0, 0, 0, [0, 1, 2, 3], 0, [0, 1, 2, 3], 0, [0, 1, 3, 4]]; _local1.Nb = _local2 / 32; _local1.Nk = _local3 / 32; _local1.Nr = _local1.roundsArray[_local1.Nk][_local1.Nb]; } function encrypt(src, key, mode) { var ct = new Array(); var aBlock = new Array(); var _local3 = blockSize / 8; if (mode == "CBC") { ct = getRandomBytes(_local3); } var chars = formatPlaintext(strToChars(src)); var expandedKey = keyExpansion(strToChars(key)); var _local2 = 0; while (_local2 < (chars.length / _local3)) { aBlock = chars.slice(_local2 * _local3, (_local2 + 1) * _local3); if (mode == "CBC") { var _local1 = 0; while (_local1 < _local3) { aBlock[_local1] = aBlock[_local1] ^ ct[(_local2 * _local3) + _local1]; _local1++; } } ct = ct.concat(encryption(aBlock, expandedKey)); _local2++; } return(charsToHex(ct)); } function decrypt(src, key, mode) { var pt = new Array(); var aBlock = new Array(); var chars = hexToChars(src); var _local3 = blockSize / 8; var expandedKey = keyExpansion(strToChars(key)); var _local2 = (chars.length / _local3) - 1; while (_local2 > 0) { aBlock = decryption(chars.slice(_local2 * _local3, (_local2 + 1) * _local3), expandedKey); if (mode == "CBC") { var _local1 = 0; while (_local1 < _local3) { pt[((_local2 - 1) * _local3) + _local1] = aBlock[_local1] ^ chars[((_local2 - 1) * _local3) + _local1]; _local1++; } } else { pt = aBlock.concat(pt); } _local2--; } if (mode == "ECB") { pt = decryption(chars.slice(0, _local3), expandedKey).concat(pt); } return(charsToStr(pt)); } function cyclicShiftLeft(src, pos) { var _local1 = src; var _local2 = _local1.slice(0, pos); _local1 = _local1.slice(pos).concat(_local2); return(_local1); } function xtime(poly) { var _local1 = poly; _local1 = _local1 << 1; if (!(_local1 & 256)) { return(_local1); } return(_local1 ^ 283); } function mult_GF256(x, y) { var _local2 = y; var _local3 = 0; var _local1 = 1; while (_local1 < 256) { if (x & _local1) { _local3 = _local3 ^ _local2; } _local1 = _local1 * 2; _local2 = xtime(_local2); } return(_local3); } function byteSub(state, dir) { var _local3 = state; if (dir == "encrypt") { var S = SBox; } else { var S = SBoxInverse; } var _local2 = 0; while (_local2 < 4) { var _local1 = 0; while (_local1 < Nb) { _local3[_local2][_local1] = S[_local3[_local2][_local1]]; _local1++; } _local2++; } } function shiftRow(state, dir) { var _local2 = this; var _local3 = state; var _local1 = 1; while (_local1 < 4) { if (dir == "encrypt") { _local3[_local1] = _local2.cyclicShiftLeft(_local3[_local1], _local2.shiftOffsets[_local2.Nb][_local1]); } else { _local3[_local1] = _local2.cyclicShiftLeft(_local3[_local1], _local2.Nb - _local2.shiftOffsets[_local2.Nb][_local1]); } _local1++; } } function mixColumn(state, dir) { var _local2 = state; var _local3 = this; var b = new Array(); var _local1 = 0; while (_local1 < _local3.Nb) { var i = 0; while (i < 4) { if (dir == "encrypt") { b[i] = ((_local3.mult_GF256(_local2[i][_local1], 2) ^ _local3.mult_GF256(_local2[(i + 1) % 4][_local1], 3)) ^ _local2[(i + 2) % 4][_local1]) ^ _local2[(i + 3) % 4][_local1]; } else { b[i] = ((_local3.mult_GF256(_local2[i][_local1], 14) ^ _local3.mult_GF256(_local2[(i + 1) % 4][_local1], 11)) ^ _local3.mult_GF256(_local2[(i + 2) % 4][_local1], 13)) ^ _local3.mult_GF256(_local2[(i + 3) % 4][_local1], 9); } i++; } var i = 0; while (i < 4) { _local2[i][_local1] = b[i]; i++; } _local1++; } } function addRoundKey(state, roundKey) { var _local2 = roundKey; var _local3 = state; var _local1 = 0; while (_local1 < Nb) { _local3[0][_local1] = _local3[0][_local1] ^ (_local2[_local1] & 255); _local3[1][_local1] = _local3[1][_local1] ^ ((_local2[_local1] >> 8) & 255); _local3[2][_local1] = _local3[2][_local1] ^ ((_local2[_local1] >> 16) & 255); _local3[3][_local1] = _local3[3][_local1] ^ ((_local2[_local1] >> 24) & 255); _local1++; } } function keyExpansion(key) { var _local1 = this; var _local2 = 0; _local1.Nk = _local1.keySize / 32; _local1.Nb = _local1.blockSize / 32; var expandedKey = new Array(); _local1.Nr = _local1.roundsArray[_local1.Nk][_local1.Nb]; var _local3 = 0; while (_local3 < _local1.Nk) { expandedKey[_local3] = ((key[4 * _local3] | (key[(4 * _local3) + 1] << 8)) | (key[(4 * _local3) + 2] << 16)) | (key[(4 * _local3) + 3] << 24); _local3++; } _local3 = _local1.Nk; while (_local3 < (_local1.Nb * (_local1.Nr + 1))) { _local2 = expandedKey[_local3 - 1]; if ((_local3 % _local1.Nk) == 0) { _local2 = (((_local1.SBox[(_local2 >> 8) & 255] | (_local1.SBox[(_local2 >> 16) & 255] << 8)) | (_local1.SBox[(_local2 >> 24) & 255] << 16)) | (_local1.SBox[_local2 & 255] << 24)) ^ _local1.Rcon[Math.floor(_local3 / _local1.Nk) - 1]; } else if ((_local1.Nk > 6) && ((_local3 % _local1.Nk) == 4)) { _local2 = (((_local1.SBox[(_local2 >> 24) & 255] << 24) | (_local1.SBox[(_local2 >> 16) & 255] << 16)) | (_local1.SBox[(_local2 >> 8) & 255] << 8)) | _local1.SBox[_local2 & 255]; } expandedKey[_local3] = expandedKey[_local3 - _local1.Nk] ^ _local2; _local3++; } return(expandedKey); } function Round(state, roundKey) { var _local1 = this; var _local2 = state; _local1.byteSub(_local2, "encrypt"); _local1.shiftRow(_local2, "encrypt"); _local1.mixColumn(_local2, "encrypt"); _local1.addRoundKey(_local2, roundKey); } function InverseRound(state, roundKey) { var _local1 = this; var _local2 = state; _local1.addRoundKey(_local2, roundKey); _local1.mixColumn(_local2, "decrypt"); _local1.shiftRow(_local2, "decrypt"); _local1.byteSub(_local2, "decrypt"); } function FinalRound(state, roundKey) { var _local1 = this; var _local2 = state; _local1.byteSub(_local2, "encrypt"); _local1.shiftRow(_local2, "encrypt"); _local1.addRoundKey(_local2, roundKey); } function InverseFinalRound(state, roundKey) { var _local1 = this; var _local2 = state; _local1.addRoundKey(_local2, roundKey); _local1.shiftRow(_local2, "decrypt"); _local1.byteSub(_local2, "decrypt"); } function encryption(block, expandedKey) { var _local2 = this; var _local3 = block; _local3 = _local2.packBytes(_local3); _local2.addRoundKey(_local3, expandedKey); var _local1 = 1; while (_local1 < _local2.Nr) { _local2.Round(_local3, expandedKey.slice(_local2.Nb * _local1, _local2.Nb * (_local1 + 1))); _local1++; } _local2.FinalRound(_local3, expandedKey.slice(_local2.Nb * _local2.Nr)); return(_local2.unpackBytes(_local3)); } function decryption(block, expandedKey) { var _local2 = this; var _local3 = block; _local3 = _local2.packBytes(_local3); _local2.InverseFinalRound(_local3, expandedKey.slice(_local2.Nb * _local2.Nr)); var _local1 = _local2.Nr - 1; while (_local1 > 0) { _local2.InverseRound(_local3, expandedKey.slice(_local2.Nb * _local1, _local2.Nb * (_local1 + 1))); _local1--; } _local2.addRoundKey(_local3, expandedKey); return(_local2.unpackBytes(_local3)); } function packBytes(octets) { var _local3 = octets; var _local2 = new Array(); _local2[0] = new Array(); _local2[1] = new Array(); _local2[2] = new Array(); _local2[3] = new Array(); var _local1 = 0; while (_local1 < _local3.length) { _local2[0][_local1 / 4] = _local3[_local1]; _local2[1][_local1 / 4] = _local3[_local1 + 1]; _local2[2][_local1 / 4] = _local3[_local1 + 2]; _local2[3][_local1 / 4] = _local3[_local1 + 3]; _local1 = _local1 + 4; } return(_local2); } function unpackBytes(packed) { var _local3 = packed; var _local1 = new Array(); var _local2 = 0; while (_local2 < _local3[0].length) { _local1[_local1.length] = _local3[0][_local2]; _local1[_local1.length] = _local3[1][_local2]; _local1[_local1.length] = _local3[2][_local2]; _local1[_local1.length] = _local3[3][_local2]; _local2++; } return(_local1); } function formatPlaintext(plaintext) { var _local3 = plaintext; var _local2 = blockSize / 8; var _local1 = _local2 - (_local3.length % _local2); while ((_local1 > 0) && (_local1 < _local2)) { _local3[_local3.length] = 0; _local1--; } return(_local3); } function getRandomBytes(howMany) { var _local3 = howMany; var _local2 = new Array(); var _local1 = 0; while (_local1 < _local3) { _local2[_local1] = Math.round(Math.random() * 255); _local1++; } return(_local2); } function hexToChars(hex) { var _local2 = hex; var _local3 = new Array(); var _local1 = ((_local2.substr(0, 2) == "0x") ? 2 : 0); while (_local1 < _local2.length) { _local3.push(parseInt(_local2.substr(_local1, 2), 16)); _local1 = _local1 + 2; } return(_local3); } function charsToHex(chars) { var _local2 = chars; var result = new String(""); var _local3 = new Array("0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f"); var _local1 = 0; while (_local1 < _local2.length) { result = result + (_local3[_local2[_local1] >> 4] + _local3[_local2[_local1] & 15]); _local1++; } return(result); } function charsToStr(chars) { var _local2 = chars; var _local3 = new String(""); var _local1 = 0; while (_local1 < _local2.length) { _local3 = _local3 + String.fromCharCode(_local2[_local1]); _local1++; } return(_local3); } function strToChars(str) { var _local2 = str; var _local3 = new Array(); var _local1 = 0; while (_local1 < _local2.length) { _local3.push(_local2.charCodeAt(_local1)); _local1++; } return(_local3); } var Rcon = [1, 2, 4, 8, 16, 32, 64, 128, 27, 54, 108, 216, 171, 77, 154, 47, 94, 188, 99, 198, 151, 53, 106, 212, 179, 125, 250, 239, 197, 145]; var SBox = [99, 124, 119, 123, 242, 107, 111, 197, 48, 1, 103, 43, 254, 215, 171, 118, 202, 130, 201, 125, 250, 89, 71, 240, 173, 212, 162, 175, 156, 164, 114, 192, 183, 253, 147, 38, 54, 63, 247, 204, 52, 165, 229, 241, 113, 216, 49, 21, 4, 199, 35, 195, 24, 150, 5, 154, 7, 18, 128, 226, 235, 39, 178, 117, 9, 131, 44, 26, 27, 110, 90, 160, 82, 59, 214, 179, 41, 227, 47, 132, 83, 209, 0, 237, 32, 252, 177, 91, 106, 203, 190, 57, 74, 76, 88, 207, 208, 239, 170, 251, 67, 77, 51, 133, 69, 249, 2, 127, 80, 60, 159, 168, 81, 163, 64, 143, 146, 157, 56, 245, 188, 182, 218, 33, 16, 255, 243, 210, 205, 12, 19, 236, 95, 151, 68, 23, 196, 167, 126, 61, 100, 93, 25, 115, 96, 129, 79, 220, 34, 42, 144, 136, 70, 238, 184, 20, 222, 94, 11, 219, 224, 50, 58, 10, 73, 6, 36, 92, 194, 211, 172, 98, 145, 149, 228, 121, 231, 200, 55, 109, 141, 213, 78, 169, 108, 86, 244, 234, 101, 122, 174, 8, 186, 120, 37, 46, 28, 166, 180, 198, 232, 221, 116, 31, 75, 189, 139, 138, 112, 62, 181, 102, 72, 3, 246, 14, 97, 53, 87, 185, 134, 193, 29, 158, 225, 248, 152, 17, 105, 217, 142, 148, 155, 30, 135, 233, 206, 85, 40, 223, 140, 161, 137, 13, 191, 230, 66, 104, 65, 153, 45, 15, 176, 84, 187, 22]; var SBoxInverse = [82, 9, 106, 213, 48, 54, 165, 56, 191, 64, 163, 158, 129, 243, 215, 251, 124, 227, 57, 130, 155, 47, 255, 135, 52, 142, 67, 68, 196, 222, 233, 203, 84, 123, 148, 50, 166, 194, 35, 61, 238, 76, 149, 11, 66, 250, 195, 78, 8, 46, 161, 102, 40, 217, 36, 178, 118, 91, 162, 73, 109, 139, 209, 37, 114, 248, 246, 100, 134, 104, 152, 22, 212, 164, 92, 204, 93, 101, 182, 146, 108, 112, 72, 80, 253, 237, 185, 218, 94, 21, 70, 87, 167, 141, 157, 132, 144, 216, 171, 0, 140, 188, 211, 10, 247, 228, 88, 5, 184, 179, 69, 6, 208, 44, 30, 143, 202, 63, 15, 2, 193, 175, 189, 3, 1, 19, 138, 107, 58, 145, 17, 65, 79, 103, 220, 234, 151, 242, 207, 206, 240, 180, 230, 115, 150, 172, 116, 34, 231, 173, 53, 133, 226, 249, 55, 232, 28, 117, 223, 110, 71, 241, 26, 113, 29, 41, 197, 137, 111, 183, 98, 14, 170, 24, 190, 27, 252, 86, 62, 75, 198, 210, 121, 32, 154, 219, 192, 254, 120, 205, 90, 244, 31, 221, 168, 51, 136, 7, 199, 49, 177, 18, 16, 89, 39, 128, 236, 95, 96, 81, 127, 169, 25, 181, 74, 13, 45, 229, 122, 159, 147, 201, 156, 239, 160, 224, 59, 77, 174, 42, 245, 176, 200, 235, 187, 60, 131, 83, 153, 97, 23, 43, 4, 126, 186, 119, 214, 38, 225, 105, 20, 99, 85, 33, 12, 125]; var blockSize = 128; var keySize = 128; }
Instance of Symbol 330 MovieClip in Symbol 337 MovieClip Frame 1
on (release) { getURL ("http://www.armorgames.com", "_blank"); }
Instance of Symbol 330 MovieClip in Symbol 337 MovieClip Frame 151
on (release) { getURL ("http://www.herointeractive.com", "_blank"); }
Instance of Symbol 330 MovieClip in Symbol 337 MovieClip Frame 310
on (release) { getURL ("http://www.herointeractive.com", "_blank"); }
Symbol 337 MovieClip Frame 337
_root.play();
Symbol 364 MovieClip Frame 1
stop();
Symbol 364 MovieClip Frame 12
stop();
Symbol 364 MovieClip Frame 22
gotoAndPlay (1);
Symbol 370 MovieClip Frame 1
stop();
Symbol 370 MovieClip Frame 15
stop(); this.insideMan.gotoAndPlay("spot");
Symbol 422 MovieClip Frame 1
stop();
Symbol 422 MovieClip Frame 30
stop();
Symbol 422 MovieClip Frame 115
gotoAndPlay ("hide");
Symbol 435 MovieClip Frame 1
stop();
Symbol 435 MovieClip Frame 2
stop();
Symbol 460 MovieClip Frame 1
stop();
Symbol 460 MovieClip Frame 2
stop();
Symbol 475 MovieClip Frame 1
stop();
Symbol 475 MovieClip Frame 2
stop();
Symbol 475 MovieClip Frame 3
stop();
Symbol 475 MovieClip Frame 4
stop();
Symbol 475 MovieClip Frame 5
stop();
Symbol 475 MovieClip Frame 6
stop();
Symbol 475 MovieClip Frame 7
stop();
Symbol 475 MovieClip Frame 8
stop();
Symbol 475 MovieClip Frame 9
stop();
Symbol 475 MovieClip Frame 10
stop();
Symbol 504 MovieClip Frame 1
stop();
Symbol 504 MovieClip Frame 9
_root.HelicopterFire(this._name);
Symbol 504 MovieClip Frame 18
_root.HelicopterDoneFiring(this._name); gotoAndPlay ("flying");
Symbol 520 MovieClip Frame 60
stop();
Symbol 520 MovieClip Frame 105
stop();
Symbol 520 MovieClip Frame 280
stop();
Symbol 520 MovieClip Frame 300
stop();
Symbol 520 MovieClip Frame 301
this.test.gotoAndPlay("beamed");
Symbol 520 MovieClip Frame 320
stop();
Symbol 520 MovieClip Frame 400
this.test.gotoAndPlay("falling");
Symbol 520 MovieClip Frame 414
this.test.gotoAndPlay("collision");
Symbol 520 MovieClip Frame 441
stop();
Symbol 520 MovieClip Frame 461
stop();
Symbol 520 MovieClip Frame 462
this.test2.gotoAndPlay("spot");
Symbol 520 MovieClip Frame 482
stop();
Symbol 520 MovieClip Frame 503
stop();
Symbol 520 MovieClip Frame 524
stop();
Symbol 520 MovieClip Frame 545
stop();
Symbol 545 Button
on (release) { this._parent.Buy(this._name); } on (rollOver) { this._parent.Details(this._name); } on (rollOut) { this._parent.Reset(); }
Symbol 548 Button
on (rollOver) { this._parent.Details(this._name); } on (rollOut) { this._parent.Reset(); }
Symbol 555 Button
on (release) { this._parent.PlayPause(this._name); } on (rollOver) { this._parent.Details(this._name); } on (rollOut) { this._parent.Reset(); }
Symbol 561 Button
on (release) { this._parent.ToggleShip(); } on (rollOver) { this._parent.Details(this._name); } on (rollOut) { this._parent.Reset(); }
Symbol 564 Button
on (release) { this._parent.ToggleShip(); } on (rollOver) { this._parent.Details(this._name); } on (rollOut) { this._parent.Reset(); }
Symbol 570 Button
on (release) { this._parent.PlayLevel(); } on (rollOver) { this._parent.Details(this._name); } on (rollOut) { this._parent.Reset(); }
Symbol 571 MovieClip Frame 1
stop();
Symbol 571 MovieClip Frame 23
stop();
Symbol 571 MovieClip Frame 37
stop();
Symbol 571 MovieClip Frame 38
stop();
Symbol 571 MovieClip Frame 52
stop();
Symbol 591 MovieClip Frame 1
stop();
Symbol 591 MovieClip Frame 2
stop();
Symbol 605 MovieClip Frame 1
stop();
Instance of Symbol 364 MovieClip in Symbol 605 MovieClip Frame 1
on (rollOver) { var playForward = 1; var frameCounter = 1; var holdCounter = 9; } on (rollOut) { if (playForward != 3) { playForward = 2; } } onClipEvent (enterFrame) { if ((playForward == 1) && (frameCounter < 12)) { this.nextFrame(); frameCounter++; } else if (playForward == 2) { this.prevFrame(); frameCounter--; } else if (playForward == 3) { holdCounter--; if (holdCounter == 0) { trace("hit"); this._parent._parent.play(); playForward = 0; } } } on (release) { _global.SoundManager.PlaySound("button_hit"); this.gotoAndPlay("flash"); playForward = 3; }
Symbol 605 MovieClip Frame 10
stop();
Symbol 605 MovieClip Frame 20
function AdvanceTutorial() { var _local2 = this; var _local1 = "tag" + tutorialPage; _local2.tutorial.gotoAndPlay(_local1); tutorialPage++; if (tutorialPage == 11) { _local2.nextButton._visible = false; _local2.nextText._visible = false; } } stop(); if (_global.musicOn == true) { _global.myMusicPlayer.SetTrack("tutorial music"); _global.myMusicPlayer.SetMaxVolume(100); _global.myMusicPlayer.PlayWithCrossFade(3); } this.tutorial.gotoAndPlay(1); this.nextButton._visible = true; this.nextText._visible = true; var tutorialPage = 1;
Instance of Symbol 364 MovieClip in Symbol 605 MovieClip Frame 20
on (rollOver) { var playForward = 1; var frameCounter = 1; var holdCounter = 9; } on (rollOut) { if (playForward != 3) { playForward = 2; } } onClipEvent (enterFrame) { if ((playForward == 1) && (frameCounter < 12)) { this.nextFrame(); frameCounter++; } else if (playForward == 2) { this.prevFrame(); frameCounter--; } else if (playForward == 3) { holdCounter--; if (holdCounter == 0) { trace("hit"); this._parent._parent.play(); if (_global.musicOn == true) { _global.myMusicPlayer.SetTrack("titleMusic"); _global.myMusicPlayer.SetMaxVolume(100); _global.myMusicPlayer.PlayWithCrossFade(3); } playForward = 0; } } } on (release) { _global.SoundManager.PlaySound("button_hit"); this.gotoAndPlay("flash"); playForward = 3; }
Instance of Symbol 364 MovieClip "nextButton" in Symbol 605 MovieClip Frame 20
on (rollOver) { var playForward = 1; var frameCounter = 1; var holdCounter = 9; } on (rollOut) { if (playForward != 3) { playForward = 2; } } onClipEvent (enterFrame) { if ((playForward == 1) && (frameCounter < 12)) { this.nextFrame(); frameCounter++; } else if (playForward == 2) { this.prevFrame(); frameCounter--; } else if (playForward == 3) { holdCounter--; if (holdCounter <= 0) { trace("hit"); this._parent.AdvanceTutorial(); playForward = 0; } } } on (release) { _global.SoundManager.PlaySound("button_hit"); this.gotoAndPlay("flash"); playForward = 3; }
Symbol 605 MovieClip Frame 30
var myScoreSaver = new BagunkScores(); myScoreSaver.SetCode("7uKYpxwrYqUbLQ7J"); myScoreSaver.SetGameID(302); myScoreSaver.OnGetScoresCompleted = function (myScores) { var _local2 = myScores; var names = ""; var scores = ""; var _local3 = new Array(); var myFormat_fmt = new TextFormat(); myFormat_fmt.bold = true; myFormat_fmt.color = 8572415 /* 0x82CDFF */; var _local1 = 0; while (_local1 < _local2.length) { if (_local2[_local1].verified == 1) { var startIndex = names.length; var endIndex = (names.length + _local2[_local1].username.length); _local3.push({start:startIndex, end:endIndex, url:_local2[_local1].profileURL}); } names = (names + _local2[_local1].username) + newline; scores = (scores + _local2[_local1].score) + newline; _local1++; } _root.mainScreen.otherMenu.name_txt.text = names; _root.mainScreen.otherMenu.score_txt.text = scores; _local1 = 0; while (_local1 < _local3.length) { myFormat_fmt.url = _local3[_local1].url; trace(myFormat_fmt.url); _root.mainScreen.otherMenu.name_txt.setTextFormat(_local3[_local1].start, _local3[_local1].end, myFormat_fmt); _local1++; } }; myScoreSaver.GetScores(); stop();
Instance of Symbol 364 MovieClip in Symbol 605 MovieClip Frame 30
on (rollOver) { var playForward = 1; var frameCounter = 1; var holdCounter = 9; } on (rollOut) { if (playForward != 3) { playForward = 2; } } onClipEvent (enterFrame) { if ((playForward == 1) && (frameCounter < 12)) { this.nextFrame(); frameCounter++; } else if (playForward == 2) { this.prevFrame(); frameCounter--; } else if (playForward == 3) { holdCounter--; if (holdCounter == 0) { trace("hit"); this._parent._parent.play(); playForward = 0; } } } on (release) { _global.SoundManager.PlaySound("button_hit"); this.gotoAndPlay("flash"); playForward = 3; }
Instance of Symbol 364 MovieClip in Symbol 605 MovieClip Frame 30
on (rollOver) { var playForward = 1; var frameCounter = 1; var holdCounter = 9; } on (rollOut) { if (playForward != 3) { playForward = 2; } } onClipEvent (enterFrame) { if ((playForward == 1) && (frameCounter < 12)) { this.nextFrame(); frameCounter++; } else if (playForward == 2) { this.prevFrame(); frameCounter--; } else if (playForward == 3) { holdCounter--; if (holdCounter == 0) { trace("hit"); getURL ("http://www.bagunk.com/scores.php?profile=302", "_blank"); playForward = 0; } } } on (release) { _global.SoundManager.PlaySound("button_hit"); this.gotoAndPlay("flash"); playForward = 3; }
Instance of Symbol 540 MovieClip in Symbol 605 MovieClip Frame 30
on (release) { getURL ("http://www.bagunk.com/developers.php"); }
Symbol 605 MovieClip Frame 40
function Reset() { var _local1 = this; _local1.description_txt.text = "Ok, so they aren't AmAzInG extras (in fact, some are just plain lame), but there was a lot of extra content that didn't make it in the final game. Here's your chance to check some of the stuff out, and even unlock alternate content. "; _local1.title_txt.text = "Unlock Extras!"; _local1.cost_txt.text = "Various Points"; } function ToggleShip() { var _local1 = _global; if (_local1.shipUsed == 1) { _local1.shipUsed = 2; this.ship.gotoAndPlay("finished3"); } else { _local1.shipUsed = 1; this.ship.gotoAndPlay("finished2"); } } function PlayLevel() { _global.tempFrame = 17; _root.gotoAndPlay("levelText"); } function Start() { var _local1 = this; var _local2 = _global; _local1.Reset(); _local1.UpdatePoints(); _local2.arrPurchased; if (_local2.arrPurchased[0] == 1) { _local1.sound1.gotoAndPlay("finished1"); } if (_local2.arrPurchased[1] == 1) { _local1.sound2.gotoAndPlay("finished1"); } if (_local2.arrPurchased[2] == 1) { _local1.sound3.gotoAndPlay("finished1"); } if (_local2.arrPurchased[3] == 1) { _local1.sound4.gotoAndPlay("finished1"); } if (_local2.arrPurchased[4] == 1) { _local1.sound5.gotoAndPlay("finished1"); } if (_local2.arrPurchased[5] == 1) { _local1.sound6.gotoAndPlay("finished1"); } if (_local2.arrPurchased[6] == 1) { _local1.sound7.gotoAndPlay("finished1"); } if (_local2.arrPurchased[7] == 1) { _local1.song1.gotoAndPlay("finished1"); } if (_local2.arrPurchased[8] == 1) { _local1.song2.gotoAndPlay("finished1"); } if (_local2.arrPurchased[9] == 1) { _local1.song3.gotoAndPlay("finished1"); } if (_local2.arrPurchased[10] == 1) { _local1.song4.gotoAndPlay("finished1"); } if (_local2.arrPurchased[11] == 1) { _local1.song5.gotoAndPlay("finished1"); } if (_local2.arrPurchased[12] == 1) { if (_local2.shipUsed == 1) { _local1.ship.gotoAndPlay("finished2"); } else { _local1.ship.gotoAndPlay("finished3"); } } if (_local2.arrPurchased[13] == 1) { _local1.level.gotoAndPlay("finished4"); } } function UpdatePoints() { this.points_txt.text = ("( " + _global.bonusPoints) + " PTS )"; } function Buy(objectName) { var _local1 = _global; var _local2 = this; var _local3 = objectName; if (_local3 == "sound1") { if (_local1.bonusPoints >= 1) { _local1.bonusPoints = _local1.bonusPoints - 1; _local2.sound1.gotoAndPlay("purchased"); _local1.SoundManager.PlaySound("unlock"); _local1.arrPurchased[0] = 1; } else { _local1.SoundManager.PlaySound("nocando"); } } else if (_local3 == "sound2") { if (_local1.bonusPoints >= 1) { _local1.bonusPoints = _local1.bonusPoints - 1; _local2.sound2.gotoAndPlay("purchased"); _local1.SoundManager.PlaySound("unlock"); _local1.arrPurchased[1] = 1; } else { _local1.SoundManager.PlaySound("nocando"); } } else if (_local3 == "sound3") { if (_local1.bonusPoints >= 1) { _local1.bonusPoints = _local1.bonusPoints - 1; _local2.sound3.gotoAndPlay("purchased"); _local1.SoundManager.PlaySound("unlock"); _local1.arrPurchased[2] = 1; } else { _local1.SoundManager.PlaySound("nocando"); } } else if (_local3 == "sound4") { if (_local1.bonusPoints >= 1) { _local1.bonusPoints = _local1.bonusPoints - 1; _local2.sound4.gotoAndPlay("purchased"); _local1.SoundManager.PlaySound("unlock"); _local1.arrPurchased[3] = 1; } else { _local1.SoundManager.PlaySound("nocando"); } } else if (_local3 == "sound5") { if (_local1.bonusPoints >= 1) { _local1.bonusPoints = _local1.bonusPoints - 1; _local2.sound5.gotoAndPlay("purchased"); _local1.SoundManager.PlaySound("unlock"); _local1.arrPurchased[4] = 1; } else { _local1.SoundManager.PlaySound("nocando"); } } else if (_local3 == "sound6") { if (_local1.bonusPoints >= 1) { _local1.bonusPoints = _local1.bonusPoints - 1; _local2.sound6.gotoAndPlay("purchased"); _local1.SoundManager.PlaySound("unlock"); _local1.arrPurchased[5] = 1; } else { _local1.SoundManager.PlaySound("nocando"); } } else if (_local3 == "sound7") { if (_local1.bonusPoints >= 1) { _local1.bonusPoints = _local1.bonusPoints - 1; _local2.sound7.gotoAndPlay("purchased"); _local1.SoundManager.PlaySound("unlock"); _local1.arrPurchased[6] = 1; } else { _local1.SoundManager.PlaySound("nocando"); } } else if (_local3 == "song1") { if (_local1.bonusPoints >= 3) { _local1.bonusPoints = _local1.bonusPoints - 3; _local2.song1.gotoAndPlay("purchased"); _local1.SoundManager.PlaySound("unlock"); _local1.arrPurchased[7] = 1; } else { _local1.SoundManager.PlaySound("nocando"); } } else if (_local3 == "song2") { if (_local1.bonusPoints >= 3) { _local1.bonusPoints = _local1.bonusPoints - 3; _local2.song2.gotoAndPlay("purchased"); _local1.SoundManager.PlaySound("unlock"); _local1.arrPurchased[8] = 1; } else { _local1.SoundManager.PlaySound("nocando"); } } else if (_local3 == "song3") { if (_local1.bonusPoints >= 3) { _local1.bonusPoints = _local1.bonusPoints - 3; _local2.song3.gotoAndPlay("purchased"); _local1.SoundManager.PlaySound("unlock"); _local1.arrPurchased[9] = 1; } else { _local1.SoundManager.PlaySound("nocando"); } } else if (_local3 == "song4") { if (_local1.bonusPoints >= 3) { _local1.bonusPoints = _local1.bonusPoints - 3; _local2.song4.gotoAndPlay("purchased"); _local1.SoundManager.PlaySound("unlock"); _local1.arrPurchased[10] = 1; } else { _local1.SoundManager.PlaySound("nocando"); } } else if (_local3 == "song5") { if (_local1.bonusPoints >= 3) { _local1.bonusPoints = _local1.bonusPoints - 3; _local2.song5.gotoAndPlay("purchased"); _local1.SoundManager.PlaySound("unlock"); _local1.arrPurchased[11] = 1; } else { _local1.SoundManager.PlaySound("nocando"); } } else if (_local3 == "ship") { if (_local1.bonusPoints >= 10) { _local1.bonusPoints = _local1.bonusPoints - 10; _local2.ship.gotoAndPlay("purchasedShip"); _local1.SoundManager.PlaySound("unlock"); _local1.arrPurchased[12] = 1; } else { _local1.SoundManager.PlaySound("nocando"); } } else if (_local3 == "level") { if (_local1.bonusPoints >= 15) { _local1.bonusPoints = _local1.bonusPoints - 15; _local2.level.gotoAndPlay("purchasedLevel"); _local1.SoundManager.PlaySound("unlock"); _local1.arrPurchased[13] = 1; } else { _local1.SoundManager.PlaySound("nocando"); } } _local2.UpdatePoints(); } function PlayPause(objectName) { var _local1 = _global; var _local2 = objectName; if (_local2 == "sound1") { _local1.myMusicPlayer.Stop(); _local1.SoundManager.PlaySound("outtake1"); } else if (_local2 == "sound2") { _local1.myMusicPlayer.Stop(); _local1.SoundManager.PlaySound("outtake2"); } else if (_local2 == "sound3") { _local1.myMusicPlayer.Stop(); _local1.SoundManager.PlaySound("outtake3"); } else if (_local2 == "sound4") { _local1.myMusicPlayer.Stop(); _local1.SoundManager.PlaySound("outtake4"); } else if (_local2 == "sound5") { _local1.myMusicPlayer.Stop(); _local1.SoundManager.PlaySound("outtake5"); } else if (_local2 == "sound6") { _local1.myMusicPlayer.Stop(); _local1.SoundManager.PlaySound("outtake6"); } else if (_local2 == "sound7") { _local1.myMusicPlayer.Stop(); _local1.SoundManager.PlaySound("outtake7"); } else if (_local2 == "song1") { _local1.myMusicPlayer.SetTrack("city"); _local1.myMusicPlayer.SetMaxVolume(100); _local1.myMusicPlayer.PlayWithCrossFade(3); } else if (_local2 == "song2") { _local1.myMusicPlayer.SetTrack("forest"); _local1.myMusicPlayer.SetMaxVolume(100); _local1.myMusicPlayer.PlayWithCrossFade(3); } else if (_local2 == "song3") { _local1.myMusicPlayer.SetTrack("space"); _local1.myMusicPlayer.SetMaxVolume(100); _local1.myMusicPlayer.PlayWithCrossFade(3); } else if (_local2 == "song4") { _local1.myMusicPlayer.SetTrack("farm"); _local1.myMusicPlayer.SetMaxVolume(100); _local1.myMusicPlayer.PlayWithCrossFade(3); } else if (_local2 == "song5") { _local1.SoundManager.PlaySound("outtake1"); } } function Details(objectName) { var _local1 = this; var _local2 = objectName; if (_local2 == "sound1") { _local1.description_txt.text = "Want to hear the developers being stupid and screwing around while recording the alien voices? Here's your chance."; _local1.title_txt.text = "OUTAKE #1"; _local1.cost_txt.text = "1 PT"; } else if (_local2 == "sound2") { _local1.description_txt.text = "Want to hear the developers being stupid and screwing around while recording the alien voices? Here's your chance."; _local1.title_txt.text = "OUTAKE #2"; _local1.cost_txt.text = "1 PT"; } else if (_local2 == "sound3") { _local1.description_txt.text = "Want to hear the developers being stupid and screwing around while recording the alien voices? Here's your chance."; _local1.title_txt.text = "OUTAKE #3"; _local1.cost_txt.text = "1 PT"; } else if (_local2 == "sound4") { _local1.description_txt.text = "Want to hear the developers being stupid and screwing around while recording the alien voices? Here's your chance."; _local1.title_txt.text = "OUTAKE #4"; _local1.cost_txt.text = "1 PT"; } else if (_local2 == "sound5") { _local1.description_txt.text = "Want to hear the developers being stupid and screwing around while recording the alien voices? Here's your chance."; _local1.title_txt.text = "OUTAKE #5"; _local1.cost_txt.text = "1 PT"; } else if (_local2 == "sound6") { _local1.description_txt.text = "Want to hear the developers being stupid and screwing around while recording the alien voices? Here's your chance."; _local1.title_txt.text = "OUTAKE #6"; _local1.cost_txt.text = "1 PT"; } else if (_local2 == "sound7") { _local1.description_txt.text = "Want to hear the developers being stupid and screwing around while recording the alien voices? Here's your chance."; _local1.title_txt.text = "OUTAKE #7"; _local1.cost_txt.text = "1 PT"; } else if (_local2 == "song1") { _local1.description_txt.text = "Unlock one of the songs from the original Alien Abduction game."; _local1.title_txt.text = "ORIGINAL SONG #1"; _local1.cost_txt.text = "3 PTS"; } else if (_local2 == "song2") { _local1.description_txt.text = "Unlock one of the songs from the original Alien Abduction game."; _local1.title_txt.text = "ORIGINAL SONG #2"; _local1.cost_txt.text = "3 PTS"; } else if (_local2 == "song3") { _local1.description_txt.text = "Unlock one of the songs from the original Alien Abduction game."; _local1.title_txt.text = "ORIGINAL SONG #3"; _local1.cost_txt.text = "3 PTS"; } else if (_local2 == "song4") { _local1.description_txt.text = "Unlock one of the songs from the original Alien Abduction game."; _local1.title_txt.text = "ORIGINAL SONG #4"; _local1.cost_txt.text = "3 PTS"; } else if (_local2 == "song5") { _local1.description_txt.text = "Unlock one of the songs from the original Alien Abduction game."; _local1.title_txt.text = "ORIGINAL SONG #5"; _local1.cost_txt.text = "3 PTS"; } else if (_local2 == "ship") { _local1.description_txt.text = "Unlock the original flying saucer from Alien Abduction I. Once purchased, you'll be able to set the original space craft design as your in-game playable avatar."; _local1.title_txt.text = "UNLOCK AAI SPACESHIP"; _local1.cost_txt.text = "10 PTS"; } else if (_local2 == "level") { _local1.description_txt.text = "Yup, there's a bonus level. Nothing but a silly waste with it's pink sky, dancing flowers, and smiling sun. But hey, don't you just want to try it out anyways?"; _local1.title_txt.text = "PLAY BONUS LEVEL"; _local1.cost_txt.text = "15 PTS"; } } stop(); if (_global.musicOn == true) { _global.myMusicPlayer.SetTrack("unlock shop music"); _global.myMusicPlayer.SetMaxVolume(100); _global.myMusicPlayer.PlayWithCrossFade(3); }
Instance of Symbol 364 MovieClip in Symbol 605 MovieClip Frame 40
on (rollOver) { var playForward = 1; var frameCounter = 1; var holdCounter = 9; } on (rollOut) { if (playForward != 3) { playForward = 2; } } onClipEvent (enterFrame) { if ((playForward == 1) && (frameCounter < 12)) { this.nextFrame(); frameCounter++; } else if (playForward == 2) { this.prevFrame(); frameCounter--; } else if (playForward == 3) { holdCounter--; if (holdCounter == 0) { trace("hit"); if (_global.musicOn == true) { _global.myMusicPlayer.SetTrack("titleMusic"); _global.myMusicPlayer.SetMaxVolume(100); _global.myMusicPlayer.PlayWithCrossFade(3); } this._parent._parent.play(); playForward = 0; } } } on (release) { _global.SoundManager.PlaySound("button_hit"); this.gotoAndPlay("flash"); playForward = 3; }
Instance of Symbol 571 MovieClip "sound1" in Symbol 605 MovieClip Frame 40
onClipEvent (load) { this._parent.Start(); }
Symbol 605 MovieClip Frame 50
stop();
Instance of Symbol 364 MovieClip in Symbol 605 MovieClip Frame 50
on (rollOver) { var playForward = 1; var frameCounter = 1; var holdCounter = 9; } on (rollOut) { if (playForward != 3) { playForward = 2; } } onClipEvent (enterFrame) { if ((playForward == 1) && (frameCounter < 12)) { this.nextFrame(); frameCounter++; } else if (playForward == 2) { this.prevFrame(); frameCounter--; } else if (playForward == 3) { holdCounter--; if (holdCounter == 0) { trace("hit"); this._parent._parent.play(); playForward = 0; } } } on (release) { _global.SoundManager.PlaySound("button_hit"); this.gotoAndPlay("flash"); playForward = 3; }
Instance of Symbol 591 MovieClip "low" in Symbol 605 MovieClip Frame 50
onClipEvent (load) { if (_quality == "LOW") { this.gotoAndStop("on"); } } on (rollOver) { this.gotoAndStop("on"); } on (rollOut) { if (_quality != "LOW") { this.gotoAndStop("off"); } } on (release) { _quality = "LOW"; this._parent.high.gotoAndStop("off"); this._parent.med.gotoAndStop("off"); }
Instance of Symbol 591 MovieClip "med" in Symbol 605 MovieClip Frame 50
onClipEvent (load) { if (_quality == "MEDIUM") { this.gotoAndStop("on"); } } on (rollOver) { this.gotoAndStop("on"); } on (rollOut) { if (_quality != "MEDIUM") { this.gotoAndStop("off"); } } on (release) { _quality = "MEDIUM"; this._parent.high.gotoAndStop("off"); this._parent.low.gotoAndStop("off"); }
Instance of Symbol 591 MovieClip "high" in Symbol 605 MovieClip Frame 50
onClipEvent (load) { if (_quality == "HIGH") { this.gotoAndStop("on"); } } on (rollOver) { this.gotoAndStop("on"); } on (rollOut) { if (_quality != "HIGH") { this.gotoAndStop("off"); } } on (release) { _quality = "HIGH"; this._parent.low.gotoAndStop("off"); this._parent.med.gotoAndStop("off"); }
Instance of Symbol 591 MovieClip "musicOn" in Symbol 605 MovieClip Frame 50
onClipEvent (load) { if (_global.musicOn == true) { this.gotoAndStop("on"); } } on (rollOver) { this.gotoAndStop("on"); } on (rollOut) { if (_global.musicOn != true) { this.gotoAndStop("off"); } } on (release) { _global.musicOn = true; this._parent.musicOff.gotoAndStop("off"); _global.myMusicPlayer.SetTrack("titleMusic"); _global.myMusicPlayer.SetMaxVolume(100); _global.myMusicPlayer.PlayWithCrossFade(3); }
Instance of Symbol 591 MovieClip "musicOff" in Symbol 605 MovieClip Frame 50
onClipEvent (load) { if (_global.musicOn == false) { this.gotoAndStop("on"); } } on (rollOver) { this.gotoAndStop("on"); } on (rollOut) { if (_global.musicOn == true) { this.gotoAndStop("off"); } } on (release) { _global.musicOn = false; this._parent.musicOn.gotoAndStop("off"); _global.myMusicPlayer.Stop(); }
Instance of Symbol 591 MovieClip "soundsOn" in Symbol 605 MovieClip Frame 50
onClipEvent (load) { if (_global.soundOn == true) { this.gotoAndStop("on"); } } on (rollOver) { this.gotoAndStop("on"); } on (rollOut) { if (_global.soundOn != true) { this.gotoAndStop("off"); } } on (release) { _global.soundOn = true; this._parent.soundsOff.gotoAndStop("off"); }
Instance of Symbol 591 MovieClip "soundsOff" in Symbol 605 MovieClip Frame 50
onClipEvent (load) { if (_global.soundOn == false) { this.gotoAndStop("on"); } } on (rollOver) { this.gotoAndStop("on"); } on (rollOut) { if (_global.soundOn == true) { this.gotoAndStop("off"); } } on (release) { _global.soundOn = false; this._parent.soundsOn.gotoAndStop("off"); }
Instance of Symbol 364 MovieClip in Symbol 606 MovieClip Frame 1
on (rollOver) { var playForward = 1; var frameCounter = 1; } on (rollOut) { if (playForward != 3) { playForward = 2; } } onClipEvent (enterFrame) { if ((playForward == 1) && (frameCounter < 12)) { this.nextFrame(); frameCounter++; trace(frameCounter); } else if (playForward == 2) { this.prevFrame(); } } on (release) { this.gotoAndPlay("flash"); playForward = 3; }
Instance of Symbol 364 MovieClip in Symbol 606 MovieClip Frame 1
on (rollOver) { var playForward = 1; var frameCounter = 1; } on (rollOut) { if (playForward != 3) { playForward = 2; } } onClipEvent (enterFrame) { if ((playForward == 1) && (frameCounter < 12)) { this.nextFrame(); frameCounter++; trace(frameCounter); } else if (playForward == 2) { this.prevFrame(); } } on (release) { this.gotoAndPlay("flash"); playForward = 3; }
Instance of Symbol 364 MovieClip in Symbol 606 MovieClip Frame 1
on (rollOver) { var playForward = 1; var frameCounter = 1; } on (rollOut) { if (playForward != 3) { playForward = 2; } } onClipEvent (enterFrame) { if ((playForward == 1) && (frameCounter < 12)) { this.nextFrame(); frameCounter++; trace(frameCounter); } else if (playForward == 2) { this.prevFrame(); } } on (release) { this.gotoAndPlay("flash"); playForward = 3; }
Instance of Symbol 364 MovieClip in Symbol 606 MovieClip Frame 1
on (rollOver) { var playForward = 1; var frameCounter = 1; } on (rollOut) { if (playForward != 3) { playForward = 2; } } onClipEvent (enterFrame) { if ((playForward == 1) && (frameCounter < 12)) { this.nextFrame(); frameCounter++; trace(frameCounter); } else if (playForward == 2) { this.prevFrame(); } } on (release) { this.gotoAndPlay("flash"); playForward = 3; }
Instance of Symbol 364 MovieClip in Symbol 606 MovieClip Frame 1
on (rollOver) { var playForward = 1; var frameCounter = 1; } on (rollOut) { if (playForward != 3) { playForward = 2; } } onClipEvent (enterFrame) { if ((playForward == 1) && (frameCounter < 12)) { this.nextFrame(); frameCounter++; trace(frameCounter); } else if (playForward == 2) { this.prevFrame(); } } on (release) { this.gotoAndPlay("flash"); playForward = 3; }
Symbol 606 MovieClip Frame 17
_global.SoundManager.PlaySound("swoosh2");
Instance of Symbol 370 MovieClip in Symbol 606 MovieClip Frame 17
on (rollOver) { this.gotoAndPlay("open"); } on (rollOut) { this.gotoAndPlay("closed"); } on (release) { getURL ("http://www.armorgames.com", "_blank"); }
Symbol 606 MovieClip Frame 40
_global.SoundManager.PlaySound("swoosh"); _global.SoundManager.PlaySound("swoosh2");
Instance of Symbol 364 MovieClip in Symbol 606 MovieClip Frame 40
on (rollOver) { var playForward = 1; var frameCounter = 1; } on (rollOut) { if (playForward != 3) { playForward = 2; } } onClipEvent (enterFrame) { if ((playForward == 1) && (frameCounter < 12)) { this.nextFrame(); frameCounter++; trace(frameCounter); } else if (playForward == 2) { this.prevFrame(); } } on (release) { this.gotoAndPlay("flash"); playForward = 3; }
Symbol 606 MovieClip Frame 43
_global.SoundManager.PlaySound("swoosh"); _global.SoundManager.PlaySound("swoosh2");
Symbol 606 MovieClip Frame 46
_global.SoundManager.PlaySound("swoosh");
Symbol 606 MovieClip Frame 49
_global.SoundManager.PlaySound("swoosh");
Instance of Symbol 364 MovieClip in Symbol 606 MovieClip Frame 50
on (rollOver) { var playForward = 1; var frameCounter = 1; var holdCounter = 9; } on (rollOut) { if (playForward != 3) { playForward = 2; } } onClipEvent (enterFrame) { if ((playForward == 1) && (frameCounter < 12)) { this.nextFrame(); frameCounter++; } else if (playForward == 2) { this.prevFrame(); frameCounter--; } else if (playForward == 3) { holdCounter--; if (holdCounter == 0) { _root.gotoAndPlay("levelText"); playForward = 0; } } } on (release) { _global.SoundManager.PlaySound("button_hit"); this.gotoAndPlay("flash"); playForward = 3; }
Symbol 606 MovieClip Frame 52
_global.SoundManager.PlaySound("swoosh");
Instance of Symbol 364 MovieClip in Symbol 606 MovieClip Frame 53
on (rollOver) { var playForward = 1; var frameCounter = 1; var holdCounter = 9; } on (rollOut) { if (playForward != 3) { playForward = 2; } } onClipEvent (enterFrame) { if ((playForward == 1) && (frameCounter < 12)) { this.nextFrame(); frameCounter++; } else if (playForward == 2) { this.prevFrame(); frameCounter--; } else if (playForward == 3) { holdCounter--; if (holdCounter == 0) { trace("hit"); this._parent.gotoAndPlay("slideOut"); playForward = 0; } } } on (release) { _global.SoundManager.PlaySound("button_hit"); this._parent.otherMenu.gotoAndStop("how"); this._parent.otherMenu.tutorial.gotoAndPlay(1); this._parent.otherMenu.nextButton._visible = true; this._parent.otherMenu.nextText._visible = true; this.gotoAndPlay("flash"); playForward = 3; }
Symbol 606 MovieClip Frame 55
_global.SoundManager.PlaySound("swoosh");
Instance of Symbol 364 MovieClip in Symbol 606 MovieClip Frame 56
on (rollOver) { var playForward = 1; var frameCounter = 1; var holdCounter = 9; } on (rollOut) { if (playForward != 3) { playForward = 2; } } onClipEvent (enterFrame) { if ((playForward == 1) && (frameCounter < 12)) { this.nextFrame(); frameCounter++; } else if (playForward == 2) { this.prevFrame(); frameCounter--; } else if (playForward == 3) { holdCounter--; if (holdCounter == 0) { trace("hit"); this._parent.gotoAndPlay("slideOut"); playForward = 0; } } } on (release) { _global.SoundManager.PlaySound("button_hit"); this._parent.otherMenu.gotoAndStop("scores"); this.gotoAndPlay("flash"); playForward = 3; }
Instance of Symbol 364 MovieClip in Symbol 606 MovieClip Frame 59
on (rollOver) { var playForward = 1; var frameCounter = 1; var holdCounter = 9; } on (rollOut) { if (playForward != 3) { playForward = 2; } } onClipEvent (enterFrame) { if ((playForward == 1) && (frameCounter < 12)) { this.nextFrame(); frameCounter++; } else if (playForward == 2) { this.prevFrame(); frameCounter--; } else if (playForward == 3) { holdCounter--; if (holdCounter == 0) { trace("hit"); this._parent.gotoAndPlay("slideOut"); playForward = 0; } } } on (release) { _global.SoundManager.PlaySound("button_hit"); this._parent.otherMenu.gotoAndStop("bonus"); this.gotoAndPlay("flash"); playForward = 3; }
Instance of Symbol 364 MovieClip in Symbol 606 MovieClip Frame 62
on (rollOver) { var playForward = 1; var frameCounter = 1; var holdCounter = 9; } on (rollOut) { if (playForward != 3) { playForward = 2; } } onClipEvent (enterFrame) { if ((playForward == 1) && (frameCounter < 12)) { this.nextFrame(); frameCounter++; } else if (playForward == 2) { this.prevFrame(); frameCounter--; } else if (playForward == 3) { holdCounter--; if (holdCounter == 0) { trace("hit"); this._parent.gotoAndPlay("slideOut"); playForward = 0; } } } on (release) { _global.SoundManager.PlaySound("button_hit"); this._parent.otherMenu.gotoAndStop("settings"); this.gotoAndPlay("flash"); playForward = 3; }
Instance of Symbol 364 MovieClip in Symbol 606 MovieClip Frame 65
on (rollOver) { var playForward = 1; var frameCounter = 1; var holdCounter = 9; } on (rollOut) { if (playForward != 3) { playForward = 2; } } onClipEvent (enterFrame) { if ((playForward == 1) && (frameCounter < 12)) { this.nextFrame(); frameCounter++; } else if (playForward == 2) { this.prevFrame(); frameCounter--; } else if (playForward == 3) { holdCounter--; if (holdCounter == 0) { trace("hit"); this._parent.gotoAndPlay("slideOut"); playForward = 0; } } } on (release) { _global.SoundManager.PlaySound("button_hit"); this._parent.otherMenu.gotoAndStop("credits"); this.gotoAndPlay("flash"); playForward = 3; }
Symbol 606 MovieClip Frame 69
stop();
Instance of Symbol 364 MovieClip in Symbol 606 MovieClip Frame 69
on (rollOver) { var playForward = 1; var frameCounter = 1; var holdCounter = 9; } on (rollOut) { if (playForward != 3) { playForward = 2; } } onClipEvent (enterFrame) { if ((playForward == 1) && (frameCounter < 12)) { this.nextFrame(); frameCounter++; } else if (playForward == 2) { this.prevFrame(); frameCounter--; } else if (playForward == 3) { holdCounter--; if (holdCounter == 0) { trace("hit"); getURL ("http://www.armorgames.com", "_blank"); playForward = 0; } } } on (release) { _global.SoundManager.PlaySound("button_hit"); this.gotoAndPlay("flash"); playForward = 3; }
Instance of Symbol 364 MovieClip in Symbol 606 MovieClip Frame 70
on (rollOver) { var playForward = 1; var frameCounter = 1; var holdCounter = 9; } on (rollOut) { if (playForward != 3) { playForward = 2; } } onClipEvent (enterFrame) { if ((playForward == 1) && (frameCounter < 12)) { this.nextFrame(); frameCounter++; } else if (playForward == 2) { this.prevFrame(); } else if (playForward == 3) { holdCounter--; if (holdCounter == 0) { trace("hit"); this._parent.gotoAndPlay("slideOut"); playForward = 0; } } } on (release) { this.gotoAndPlay("flash"); playForward = 3; }
Instance of Symbol 364 MovieClip in Symbol 606 MovieClip Frame 70
on (rollOver) { var playForward = 1; var frameCounter = 1; } on (rollOut) { if (playForward != 3) { playForward = 2; } } onClipEvent (enterFrame) { if ((playForward == 1) && (frameCounter < 12)) { this.nextFrame(); frameCounter++; trace(frameCounter); } else if (playForward == 2) { this.prevFrame(); } } on (release) { this.gotoAndPlay("flash"); playForward = 3; }
Instance of Symbol 364 MovieClip in Symbol 606 MovieClip Frame 70
on (rollOver) { var playForward = 1; var frameCounter = 1; } on (rollOut) { if (playForward != 3) { playForward = 2; } } onClipEvent (enterFrame) { if ((playForward == 1) && (frameCounter < 12)) { this.nextFrame(); frameCounter++; trace(frameCounter); } else if (playForward == 2) { this.prevFrame(); } } on (release) { this.gotoAndPlay("flash"); playForward = 3; }
Instance of Symbol 364 MovieClip in Symbol 606 MovieClip Frame 70
on (rollOver) { var playForward = 1; var frameCounter = 1; } on (rollOut) { if (playForward != 3) { playForward = 2; } } onClipEvent (enterFrame) { if ((playForward == 1) && (frameCounter < 12)) { this.nextFrame(); frameCounter++; trace(frameCounter); } else if (playForward == 2) { this.prevFrame(); } } on (release) { this.gotoAndPlay("flash"); playForward = 3; }
Instance of Symbol 364 MovieClip in Symbol 606 MovieClip Frame 70
on (rollOver) { var playForward = 1; var frameCounter = 1; } on (rollOut) { if (playForward != 3) { playForward = 2; } } onClipEvent (enterFrame) { if ((playForward == 1) && (frameCounter < 12)) { this.nextFrame(); frameCounter++; trace(frameCounter); } else if (playForward == 2) { this.prevFrame(); } } on (release) { this.gotoAndPlay("flash"); playForward = 3; }
Instance of Symbol 364 MovieClip in Symbol 606 MovieClip Frame 70
on (rollOver) { var playForward = 1; var frameCounter = 1; } on (rollOut) { if (playForward != 3) { playForward = 2; } } onClipEvent (enterFrame) { if ((playForward == 1) && (frameCounter < 12)) { this.nextFrame(); frameCounter++; trace(frameCounter); } else if (playForward == 2) { this.prevFrame(); } } on (release) { this.gotoAndPlay("flash"); playForward = 3; }
Symbol 606 MovieClip Frame 86
stop();
Instance of Symbol 364 MovieClip in Symbol 606 MovieClip Frame 86
on (rollOver) { var playForward = 1; var frameCounter = 1; var holdCounter = 9; } on (rollOut) { if (playForward != 3) { playForward = 2; } } onClipEvent (enterFrame) { if ((playForward == 1) && (frameCounter < 12)) { this.nextFrame(); frameCounter++; } else if (playForward == 2) { this.prevFrame(); } else if (playForward == 3) { holdCounter--; if (holdCounter == 0) { trace("hit"); playForward = 0; } } } on (release) { this.gotoAndPlay("flash"); playForward = 3; }
Symbol 606 MovieClip Frame 102
gotoAndPlay ("stopMain");
Instance of Symbol 364 MovieClip in Symbol 606 MovieClip Frame 102
on (rollOver) { var playForward = 1; var frameCounter = 1; var holdCounter = 9; } on (rollOut) { if (playForward != 3) { playForward = 2; } } onClipEvent (enterFrame) { if ((playForward == 1) && (frameCounter < 12)) { this.nextFrame(); frameCounter++; } else if (playForward == 2) { this.prevFrame(); frameCounter--; } else if (playForward == 3) { holdCounter--; if (holdCounter == 0) { trace("hit"); this._parent.gotoAndPlay("slideOut"); playForward = 0; } } } on (release) { this.gotoAndPlay("flash"); playForward = 3; }
Symbol 625 MovieClip Frame 1
r = random(200); r = r + 50; gotoAndPlay(r);
Symbol 639 MovieClip Frame 1
stop();
Symbol 639 MovieClip Frame 2
stop();
Symbol 657 MovieClip Frame 1
stop();
Symbol 657 MovieClip Frame 2
stop();
Symbol 664 MovieClip Frame 1
stop();
Symbol 667 MovieClip Frame 1
stop();
Symbol 667 MovieClip Frame 2
if (_global.bonusPoints == 1) { this.points.points_txt.text = _global.bonusPoints + " pt!"; } else { this.points.points_txt.text = _global.bonusPoints + " pts!"; }
Symbol 667 MovieClip Frame 32
stop();
Symbol 667 MovieClip Frame 33
if (_global.totalPeople == 1) { this.points.points_txt.text = _global.totalPeople + " person!"; } else { this.points.points_txt.text = _global.totalPeople + " people!"; }
Symbol 667 MovieClip Frame 63
stop();
Symbol 671 Button
on (release) { _root.cleanScreen(); _root.gotoAndPlay("menuScreen"); }
Symbol 674 MovieClip Frame 1
stop();
Symbol 674 MovieClip Frame 2
stop();
Symbol 683 Button
on (release) { trace("release button"); _root.loginScore(); }
Symbol 698 MovieClip Frame 1
play();
Symbol 731 MovieClip Frame 1
r = random(30); gotoAndPlay(r);
Symbol 738 MovieClip Frame 1
r = random(120); gotoAndPlay(r);
Symbol 755 MovieClip Frame 1
r = random(50); gotoAndPlay(r); gotoAndPlay(r);
Symbol 766 MovieClip Frame 80
gotoAndPlay (1);
Symbol 779 MovieClip Frame 13
gotoAndPlay (1);
Symbol 862 MovieClip [desert_rock] Frame 1
stop();
Symbol 862 MovieClip [desert_rock] Frame 30
stop();
Symbol 862 MovieClip [desert_rock] Frame 80
stop();
Symbol 904 MovieClip Frame 2
var randomNum = Math.round(Math.random() * 1000); gotoAndPlay(randomNum);
Symbol 904 MovieClip Frame 1000
_root.flash.gotoAndPlay("flash");
Symbol 904 MovieClip Frame 1082
gotoAndPlay ("start explode");
Symbol 941 MovieClip Frame 1
stop();
Symbol 941 MovieClip Frame 2
_root.HelicopterFire(this._name); _root.HelicopterDoneFiring(this._name); gotoAndPlay ("flying");
Symbol 944 MovieClip Frame 1
stop();
Symbol 944 MovieClip Frame 17
gotoAndStop ("off"); stop();
Symbol 954 MovieClip Frame 1
stop();
Symbol 954 MovieClip Frame 11
_root.HelicopterFire(this._name);
Symbol 954 MovieClip Frame 20
_root.HelicopterDoneFiring(this._name); gotoAndPlay ("flying");
Symbol 977 MovieClip Frame 1
stop();
Symbol 977 MovieClip Frame 2
trace(this._name + " just reached shooting");
Symbol 977 MovieClip Frame 3
trace(this._name + " just reached second frame of shooting");
Symbol 977 MovieClip Frame 12
_root.HelicopterFire(this._name);
Symbol 977 MovieClip Frame 21
_root.HelicopterDoneFiring(this._name); this.gotoAndPlay("flying");
Symbol 1012 MovieClip Frame 1
stop();
Symbol 1012 MovieClip Frame 14
_root.HelicopterFire(this._name);
Symbol 1012 MovieClip Frame 23
_root.HelicopterDoneFiring(this._name); this.gotoAndPlay("flying");
Symbol 1013 MovieClip Frame 1
var jump = Math.round(Math.random() * 300); this.gotoAndPlay(jump);

Library Items

Symbol 1 Sound [outtake7]
Symbol 2 Sound [outtake6]
Symbol 3 Sound [outtake5]
Symbol 4 Sound [unlock]
Symbol 5 Sound [swoosh2]
Symbol 6 Sound [swoosh]
Symbol 7 Sound [button_hit]
Symbol 8 Sound [nocando]
Symbol 9 Sound [outtake4]
Symbol 10 Sound [outtake3]
Symbol 11 Sound [outtake2]
Symbol 12 Sound [outtake1]
Symbol 13 Sound [night level]Used by:Timeline
Symbol 14 GraphicUsed by:32
Symbol 15 GraphicUsed by:32
Symbol 16 GraphicUsed by:32
Symbol 17 GraphicUsed by:32
Symbol 18 GraphicUsed by:32
Symbol 19 GraphicUsed by:32
Symbol 20 GraphicUsed by:32
Symbol 21 GraphicUsed by:32
Symbol 22 GraphicUsed by:32
Symbol 23 GraphicUsed by:32
Symbol 24 GraphicUsed by:32
Symbol 25 GraphicUsed by:32
Symbol 26 GraphicUsed by:32
Symbol 27 GraphicUsed by:32
Symbol 28 GraphicUsed by:32
Symbol 29 GraphicUsed by:32 261
Symbol 30 GraphicUsed by:32
Symbol 31 GraphicUsed by:32
Symbol 32 MovieClip [person5]Uses:14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
Symbol 33 GraphicUsed by:50
Symbol 34 GraphicUsed by:50
Symbol 35 GraphicUsed by:50
Symbol 36 GraphicUsed by:50
Symbol 37 GraphicUsed by:50
Symbol 38 GraphicUsed by:50
Symbol 39 GraphicUsed by:50
Symbol 40 GraphicUsed by:50
Symbol 41 GraphicUsed by:50
Symbol 42 GraphicUsed by:50
Symbol 43 GraphicUsed by:50
Symbol 44 GraphicUsed by:50
Symbol 45 GraphicUsed by:50
Symbol 46 GraphicUsed by:50
Symbol 47 GraphicUsed by:50
Symbol 48 GraphicUsed by:50
Symbol 49 GraphicUsed by:50
Symbol 50 MovieClip [person6]Uses:33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
Symbol 51 GraphicUsed by:68
Symbol 52 GraphicUsed by:68
Symbol 53 GraphicUsed by:68
Symbol 54 GraphicUsed by:68
Symbol 55 GraphicUsed by:68
Symbol 56 GraphicUsed by:68
Symbol 57 GraphicUsed by:68
Symbol 58 GraphicUsed by:68
Symbol 59 GraphicUsed by:68
Symbol 60 GraphicUsed by:68
Symbol 61 GraphicUsed by:68
Symbol 62 GraphicUsed by:68
Symbol 63 GraphicUsed by:68
Symbol 64 GraphicUsed by:68
Symbol 65 GraphicUsed by:68 165 182 279
Symbol 66 GraphicUsed by:68
Symbol 67 GraphicUsed by:68
Symbol 68 MovieClip [person3]Uses:51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67
Symbol 69 GraphicUsed by:71
Symbol 70 GraphicUsed by:71
Symbol 71 MovieClip [truck]Uses:69 70
Symbol 72 GraphicUsed by:73
Symbol 73 MovieClip [person0]Uses:72
Symbol 74 GraphicUsed by:76
Symbol 75 GraphicUsed by:76
Symbol 76 MovieClip [bullet]Uses:74 75
Symbol 77 GraphicUsed by:80
Symbol 78 GraphicUsed by:80 106 134
Symbol 79 GraphicUsed by:80 106 134
Symbol 80 MovieClipUses:77 78 79Used by:104
Symbol 81 GraphicUsed by:104 112 116 140
Symbol 82 GraphicUsed by:85
Symbol 83 GraphicUsed by:84
Symbol 84 MovieClipUses:83Used by:85 108 114 136 496 504 941 954 975
Symbol 85 MovieClipUses:82 84Used by:88 104
Symbol 86 GraphicUsed by:87
Symbol 87 MovieClipUses:86Used by:104
Symbol 88 MovieClipUses:85Used by:104
Symbol 89 GraphicUsed by:103
Symbol 90 GraphicUsed by:91
Symbol 91 MovieClipUses:90Used by:103
Symbol 92 GraphicUsed by:103
Symbol 93 GraphicUsed by:103
Symbol 94 GraphicUsed by:103
Symbol 95 GraphicUsed by:103
Symbol 96 GraphicUsed by:103
Symbol 97 GraphicUsed by:103
Symbol 98 GraphicUsed by:103
Symbol 99 GraphicUsed by:103
Symbol 100 GraphicUsed by:103
Symbol 101 GraphicUsed by:103
Symbol 102 GraphicUsed by:103
Symbol 103 MovieClipUses:89 91 92 93 94 95 96 97 98 99 100 101 102Used by:104 112 116 140 422
Symbol 104 MovieClip [redTank]Uses:80 81 85 87 88 103Used by:Timeline
Symbol 105 GraphicUsed by:106
Symbol 106 MovieClipUses:105 78 79Used by:112
Symbol 107 GraphicUsed by:108
Symbol 108 MovieClipUses:107 84Used by:111 112
Symbol 109 GraphicUsed by:110
Symbol 110 MovieClipUses:109Used by:112
Symbol 111 MovieClipUses:108Used by:112
Symbol 112 MovieClip [whiteTank]Uses:106 81 108 110 111 103Used by:Timeline
Symbol 113 GraphicUsed by:114
Symbol 114 MovieClipUses:113 84Used by:116
Symbol 115 GraphicUsed by:116
Symbol 116 MovieClip [antiAir]Uses:81 114 115 103Used by:Timeline
Symbol 117 GraphicUsed by:118
Symbol 118 MovieClip [rock]Uses:117Used by:Timeline
Symbol 119 GraphicUsed by:122
Symbol 120 GraphicUsed by:122 299
Symbol 121 GraphicUsed by:122
Symbol 122 MovieClipUses:119 120 121Used by:123
Symbol 123 MovieClip [BonusIcon]Uses:122Used by:Timeline
Symbol 124 GraphicUsed by:125
Symbol 125 MovieClip [igloo]Uses:124Used by:Timeline
Symbol 126 GraphicUsed by:132
Symbol 127 GraphicUsed by:132
Symbol 128 GraphicUsed by:132
Symbol 129 GraphicUsed by:132
Symbol 130 GraphicUsed by:132
Symbol 131 GraphicUsed by:132
Symbol 132 MovieClip [bullet ground]Uses:126 127 128 129 130 131Used by:520
Symbol 133 GraphicUsed by:134
Symbol 134 MovieClipUses:133 78 79Used by:140
Symbol 135 GraphicUsed by:136
Symbol 136 MovieClipUses:135 84Used by:139 140
Symbol 137 GraphicUsed by:138
Symbol 138 MovieClipUses:137Used by:140
Symbol 139 MovieClipUses:136Used by:140
Symbol 140 MovieClip [tank]Uses:134 81 136 138 139 103Used by:520 940  Timeline
Symbol 141 GraphicUsed by:147
Symbol 142 GraphicUsed by:147
Symbol 143 GraphicUsed by:147
Symbol 144 GraphicUsed by:147
Symbol 145 GraphicUsed by:147
Symbol 146 GraphicUsed by:147
Symbol 147 MovieClip [bullet air]Uses:141 142 143 144 145 146Used by:520
Symbol 148 GraphicUsed by:149
Symbol 149 MovieClip [manTarget]Uses:148Used by:520
Symbol 150 GraphicUsed by:165
Symbol 151 GraphicUsed by:165
Symbol 152 GraphicUsed by:165
Symbol 153 GraphicUsed by:165
Symbol 154 GraphicUsed by:165
Symbol 155 GraphicUsed by:165
Symbol 156 GraphicUsed by:165
Symbol 157 GraphicUsed by:165
Symbol 158 GraphicUsed by:165
Symbol 159 GraphicUsed by:165
Symbol 160 GraphicUsed by:165
Symbol 161 GraphicUsed by:165
Symbol 162 GraphicUsed by:165
Symbol 163 GraphicUsed by:165
Symbol 164 GraphicUsed by:165
Symbol 165 MovieClip [Astronaut]Uses:150 151 152 153 154 155 156 157 158 159 160 161 162 163 65 164Used by:605
Symbol 166 GraphicUsed by:182
Symbol 167 GraphicUsed by:182
Symbol 168 GraphicUsed by:182
Symbol 169 GraphicUsed by:182
Symbol 170 GraphicUsed by:182
Symbol 171 GraphicUsed by:182
Symbol 172 GraphicUsed by:182
Symbol 173 GraphicUsed by:182
Symbol 174 GraphicUsed by:182
Symbol 175 GraphicUsed by:182
Symbol 176 GraphicUsed by:182
Symbol 177 GraphicUsed by:182
Symbol 178 GraphicUsed by:182
Symbol 179 GraphicUsed by:182
Symbol 180 GraphicUsed by:182
Symbol 181 GraphicUsed by:182
Symbol 182 MovieClip [eskimo]Uses:166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 65 181Used by:605
Symbol 183 GraphicUsed by:203
Symbol 184 GraphicUsed by:203
Symbol 185 GraphicUsed by:203
Symbol 186 GraphicUsed by:203
Symbol 187 GraphicUsed by:203
Symbol 188 GraphicUsed by:203
Symbol 189 GraphicUsed by:203
Symbol 190 GraphicUsed by:203
Symbol 191 GraphicUsed by:203
Symbol 192 GraphicUsed by:203
Symbol 193 GraphicUsed by:203
Symbol 194 GraphicUsed by:203
Symbol 195 GraphicUsed by:203
Symbol 196 GraphicUsed by:203
Symbol 197 GraphicUsed by:203
Symbol 198 GraphicUsed by:203
Symbol 199 GraphicUsed by:203
Symbol 200 GraphicUsed by:203
Symbol 201 GraphicUsed by:203
Symbol 202 GraphicUsed by:203
Symbol 203 MovieClip [person4]Uses:183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202Used by:605
Symbol 204 GraphicUsed by:222
Symbol 205 GraphicUsed by:222
Symbol 206 GraphicUsed by:222
Symbol 207 GraphicUsed by:222
Symbol 208 GraphicUsed by:222
Symbol 209 GraphicUsed by:222
Symbol 210 GraphicUsed by:222
Symbol 211 GraphicUsed by:222
Symbol 212 GraphicUsed by:222
Symbol 213 GraphicUsed by:222
Symbol 214 GraphicUsed by:222
Symbol 215 GraphicUsed by:222
Symbol 216 GraphicUsed by:222
Symbol 217 GraphicUsed by:222
Symbol 218 GraphicUsed by:222
Symbol 219 GraphicUsed by:222
Symbol 220 GraphicUsed by:222
Symbol 221 GraphicUsed by:222
Symbol 222 MovieClip [person1]Uses:204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221Used by:605
Symbol 223 GraphicUsed by:243
Symbol 224 GraphicUsed by:243
Symbol 225 GraphicUsed by:243
Symbol 226 GraphicUsed by:243
Symbol 227 GraphicUsed by:243
Symbol 228 GraphicUsed by:243
Symbol 229 GraphicUsed by:243
Symbol 230 GraphicUsed by:243
Symbol 231 GraphicUsed by:243
Symbol 232 GraphicUsed by:243
Symbol 233 GraphicUsed by:243
Symbol 234 GraphicUsed by:243
Symbol 235 GraphicUsed by:243
Symbol 236 GraphicUsed by:243
Symbol 237 GraphicUsed by:243
Symbol 238 GraphicUsed by:243
Symbol 239 GraphicUsed by:243
Symbol 240 GraphicUsed by:243
Symbol 241 GraphicUsed by:243
Symbol 242 GraphicUsed by:243
Symbol 243 MovieClip [person2]Uses:223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242Used by:520 605
Symbol 244 GraphicUsed by:261
Symbol 245 GraphicUsed by:246
Symbol 246 MovieClipUses:245Used by:261
Symbol 247 GraphicUsed by:261
Symbol 248 GraphicUsed by:261
Symbol 249 GraphicUsed by:261
Symbol 250 GraphicUsed by:261
Symbol 251 GraphicUsed by:261
Symbol 252 GraphicUsed by:261
Symbol 253 GraphicUsed by:261
Symbol 254 GraphicUsed by:261
Symbol 255 GraphicUsed by:261
Symbol 256 GraphicUsed by:261
Symbol 257 GraphicUsed by:261
Symbol 258 GraphicUsed by:261
Symbol 259 GraphicUsed by:261
Symbol 260 GraphicUsed by:261
Symbol 261 MovieClip [ethan]Uses:244 246 247 248 249 250 251 252 253 254 255 256 257 258 259 29 260Used by:605
Symbol 262 GraphicUsed by:279
Symbol 263 GraphicUsed by:279
Symbol 264 GraphicUsed by:279
Symbol 265 GraphicUsed by:279
Symbol 266 GraphicUsed by:279
Symbol 267 GraphicUsed by:279
Symbol 268 GraphicUsed by:279
Symbol 269 GraphicUsed by:279
Symbol 270 GraphicUsed by:279
Symbol 271 GraphicUsed by:279
Symbol 272 GraphicUsed by:279
Symbol 273 GraphicUsed by:279
Symbol 274 GraphicUsed by:279
Symbol 275 GraphicUsed by:279
Symbol 276 GraphicUsed by:279
Symbol 277 GraphicUsed by:279
Symbol 278 GraphicUsed by:279
Symbol 279 MovieClip [Brian]Uses:262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 65 277 278Used by:605
Symbol 280 GraphicUsed by:299
Symbol 281 GraphicUsed by:299
Symbol 282 GraphicUsed by:299
Symbol 283 GraphicUsed by:299
Symbol 284 GraphicUsed by:299
Symbol 285 GraphicUsed by:299
Symbol 286 GraphicUsed by:299
Symbol 287 GraphicUsed by:299
Symbol 288 GraphicUsed by:299
Symbol 289 GraphicUsed by:299
Symbol 290 GraphicUsed by:299
Symbol 291 GraphicUsed by:299
Symbol 292 GraphicUsed by:299
Symbol 293 GraphicUsed by:299
Symbol 294 GraphicUsed by:299
Symbol 295 GraphicUsed by:299
Symbol 296 GraphicUsed by:299
Symbol 297 GraphicUsed by:299
Symbol 298 GraphicUsed by:299
Symbol 299 MovieClip [MIB]Uses:280 281 282 120 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298Used by:370 520
Symbol 300 BitmapUsed by:301 676 809 811
Symbol 301 GraphicUses:300Used by:945  Timeline
Symbol 302 FontUsed by:303 658 725 726
Symbol 303 TextUses:302Used by:304
Symbol 304 MovieClipUses:303Used by:Timeline
Symbol 305 FontUsed by:306
Symbol 306 EditableTextUses:305Used by:Timeline
Symbol 307 GraphicUsed by:308
Symbol 308 MovieClipUses:307Used by:313
Symbol 309 GraphicUsed by:311
Symbol 310 GraphicUsed by:311
Symbol 311 MovieClipUses:309 310Used by:313
Symbol 312 GraphicUsed by:313
Symbol 313 MovieClipUses:308 311 312Used by:Timeline
Symbol 314 FontUsed by:315
Symbol 315 EditableTextUses:314Used by:317
Symbol 316 GraphicUsed by:317
Symbol 317 ButtonUses:315 316Used by:Timeline
Symbol 1050 MovieClip [__Packages.SoundPlayer]
Symbol 1051 MovieClip [__Packages.Music]
Symbol 1052 MovieClip [__Packages.Tank]
Symbol 1053 MovieClip [__Packages.Bullet]
Symbol 1054 MovieClip [__Packages.BagunkScores]
Symbol 1055 MovieClip [__Packages.ScoreEncrypter]
Symbol 318 GraphicUsed by:319
Symbol 319 MovieClipUses:318Used by:337
Symbol 320 GraphicUsed by:324
Symbol 321 GraphicUsed by:322
Symbol 322 MovieClipUses:321Used by:324
Symbol 323 GraphicUsed by:324
Symbol 324 MovieClipUses:320 322 323Used by:337
Symbol 325 GraphicUsed by:326
Symbol 326 MovieClipUses:325Used by:337
Symbol 327 GraphicUsed by:328
Symbol 328 MovieClipUses:327Used by:337
Symbol 329 GraphicUsed by:330
Symbol 330 MovieClipUses:329Used by:337
Symbol 331 GraphicUsed by:337
Symbol 332 SoundUsed by:337
Symbol 333 BitmapUsed by:334
Symbol 334 GraphicUses:333Used by:337
Symbol 335 FontUsed by:336
Symbol 336 EditableTextUses:335Used by:337
Symbol 337 MovieClipUses:319 324 326 328 330 331 332 334 336Used by:Timeline
Symbol 338 GraphicUsed by:Timeline
Symbol 339 GraphicUsed by:346
Symbol 340 GraphicUsed by:346
Symbol 341 GraphicUsed by:342
Symbol 342 MovieClipUses:341Used by:346
Symbol 343 GraphicUsed by:346
Symbol 344 GraphicUsed by:346
Symbol 345 GraphicUsed by:346
Symbol 346 MovieClipUses:339 340 342 343 344 345Used by:606 945
Symbol 347 GraphicUsed by:348
Symbol 348 MovieClipUses:347Used by:606  Timeline
Symbol 349 GraphicUsed by:350
Symbol 350 MovieClipUses:349Used by:606  Timeline
Symbol 351 GraphicUsed by:606  Timeline
Symbol 352 GraphicUsed by:357
Symbol 353 GraphicUsed by:357
Symbol 354 GraphicUsed by:357
Symbol 355 FontUsed by:356 526 527 543 558 563 568 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 596 597 598 599 600 601 602 665 678 911 915 916 917 933 936 937 938 939
Symbol 356 EditableTextUses:355Used by:357
Symbol 357 MovieClipUses:352 353 354 356Used by:606  Timeline
Symbol 358 GraphicUsed by:606
Symbol 359 GraphicUsed by:364
Symbol 360 GraphicUsed by:364
Symbol 361 GraphicUsed by:364
Symbol 362 GraphicUsed by:364
Symbol 363 GraphicUsed by:364
Symbol 364 MovieClipUses:359 360 361 362 363Used by:605 606  Timeline
Symbol 365 GraphicUsed by:370
Symbol 366 GraphicUsed by:370
Symbol 367 GraphicUsed by:370
Symbol 368 GraphicUsed by:370
Symbol 369 GraphicUsed by:370
Symbol 370 MovieClipUses:365 366 367 368 299 369Used by:606
Symbol 371 GraphicUsed by:606
Symbol 372 GraphicUsed by:606
Symbol 373 GraphicUsed by:606
Symbol 374 GraphicUsed by:606
Symbol 375 GraphicUsed by:606
Symbol 376 GraphicUsed by:606
Symbol 377 GraphicUsed by:606
Symbol 378 GraphicUsed by:606
Symbol 379 GraphicUsed by:606
Symbol 380 GraphicUsed by:606
Symbol 381 GraphicUsed by:606
Symbol 382 FontUsed by:383 384 385 386 387 388 389 390 392 393 394 395 521 523 524 525 528 529 530 531 572 573 592 593 594 595 607 608 609 612 613 614 615 644 645 652 677 685 687 711 712 759 760 781 782 806 807 810 812 813 825 826 845 846 942 943 947 948 978 979 1019 1020
Symbol 383 TextUses:382Used by:606
Symbol 384 TextUses:382Used by:606
Symbol 385 TextUses:382Used by:606
Symbol 386 TextUses:382Used by:606
Symbol 387 TextUses:382Used by:606
Symbol 388 TextUses:382Used by:606
Symbol 389 TextUses:382Used by:606
Symbol 390 TextUses:382Used by:605
Symbol 391 GraphicUsed by:605
Symbol 392 EditableTextUses:382 668Used by:605
Symbol 393 TextUses:382Used by:605
Symbol 394 EditableTextUses:382 668Used by:605
Symbol 395 TextUses:382Used by:605
Symbol 396 GraphicUsed by:401
Symbol 397 GraphicUsed by:401
Symbol 398 GraphicUsed by:401
Symbol 399 GraphicUsed by:401
Symbol 400 GraphicUsed by:401
Symbol 401 MovieClipUses:396 397 398 399 400Used by:435 520
Symbol 402 GraphicUsed by:435
Symbol 403 GraphicUsed by:421
Symbol 404 GraphicUsed by:421
Symbol 405 GraphicUsed by:421
Symbol 406 GraphicUsed by:421
Symbol 407 GraphicUsed by:421
Symbol 408 GraphicUsed by:421
Symbol 409 GraphicUsed by:421
Symbol 410 GraphicUsed by:421
Symbol 411 GraphicUsed by:421
Symbol 412 GraphicUsed by:421
Symbol 413 GraphicUsed by:421
Symbol 414 GraphicUsed by:421
Symbol 415 GraphicUsed by:421
Symbol 416 GraphicUsed by:421
Symbol 417 GraphicUsed by:421
Symbol 418 GraphicUsed by:421
Symbol 419 GraphicUsed by:421
Symbol 420 GraphicUsed by:421
Symbol 421 MovieClipUses:403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420Used by:422
Symbol 422 MovieClipUses:103 421Used by:435
Symbol 423 GraphicUsed by:434
Symbol 424 GraphicUsed by:431
Symbol 425 GraphicUsed by:431
Symbol 426 GraphicUsed by:431
Symbol 427 GraphicUsed by:431
Symbol 428 GraphicUsed by:431
Symbol 429 GraphicUsed by:431
Symbol 430 GraphicUsed by:431
Symbol 431 MovieClipUses:424 425 426 427 428 429 430Used by:434 694
Symbol 432 GraphicUsed by:434
Symbol 433 GraphicUsed by:434
Symbol 434 MovieClipUses:423 431 432 433Used by:435 940
Symbol 435 MovieClipUses:401 402 422 434Used by:520  Timeline
Symbol 436 FontUsed by:437 438 439 440 441 445 446 448 449 450 452 456 457 477 478 479 480 481 482 483 484 485 486 487 488 489 491 492 493 494 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 684
Symbol 437 EditableTextUses:436Used by:520
Symbol 438 EditableTextUses:436Used by:520
Symbol 439 EditableTextUses:436Used by:520
Symbol 440 EditableTextUses:436Used by:520
Symbol 441 EditableTextUses:436Used by:520
Symbol 442 GraphicUsed by:444
Symbol 443 GraphicUsed by:444
Symbol 444 MovieClipUses:442 443Used by:520
Symbol 445 EditableTextUses:436Used by:520
Symbol 446 EditableTextUses:436Used by:520
Symbol 447 GraphicUsed by:520
Symbol 448 EditableTextUses:436Used by:520
Symbol 449 EditableTextUses:436Used by:520
Symbol 450 EditableTextUses:436Used by:520
Symbol 451 GraphicUsed by:520
Symbol 452 EditableTextUses:436Used by:520
Symbol 453 GraphicUsed by:455
Symbol 454 GraphicUsed by:455
Symbol 455 MovieClipUses:453 454Used by:520 639 701
Symbol 456 EditableTextUses:436Used by:520
Symbol 457 EditableTextUses:436Used by:520
Symbol 458 GraphicUsed by:460
Symbol 459 GraphicUsed by:460
Symbol 460 MovieClipUses:458 459Used by:520  Timeline
Symbol 461 GraphicUsed by:520  Timeline
Symbol 462 FontUsed by:463 464
Symbol 463 TextUses:462Used by:520  Timeline
Symbol 464 TextUses:462Used by:520  Timeline
Symbol 465 GraphicUsed by:475
Symbol 466 GraphicUsed by:475
Symbol 467 GraphicUsed by:475
Symbol 468 GraphicUsed by:475
Symbol 469 GraphicUsed by:475
Symbol 470 GraphicUsed by:475
Symbol 471 GraphicUsed by:475
Symbol 472 GraphicUsed by:475
Symbol 473 GraphicUsed by:475
Symbol 474 GraphicUsed by:475
Symbol 475 MovieClipUses:465 466 467 468 469 470 471 472 473 474Used by:520  Timeline
Symbol 476 GraphicUsed by:520
Symbol 477 EditableTextUses:436Used by:520
Symbol 478 EditableTextUses:436Used by:520
Symbol 479 EditableTextUses:436Used by:520
Symbol 480 EditableTextUses:436Used by:520
Symbol 481 EditableTextUses:436Used by:520
Symbol 482 EditableTextUses:436Used by:520
Symbol 483 EditableTextUses:436Used by:520
Symbol 484 EditableTextUses:436Used by:520
Symbol 485 EditableTextUses:436Used by:520
Symbol 486 EditableTextUses:436Used by:520
Symbol 487 EditableTextUses:436Used by:520
Symbol 488 EditableTextUses:436Used by:520
Symbol 489 EditableTextUses:436Used by:520
Symbol 490 GraphicUsed by:520
Symbol 491 EditableTextUses:436Used by:520
Symbol 492 EditableTextUses:436Used by:520
Symbol 493 EditableTextUses:436Used by:520
Symbol 494 EditableTextUses:436Used by:520
Symbol 495 GraphicUsed by:496
Symbol 496 MovieClipUses:495 84Used by:504
Symbol 497 GraphicUsed by:504
Symbol 498 GraphicUsed by:500
Symbol 499 GraphicUsed by:500
Symbol 500 MovieClipUses:498 499Used by:504
Symbol 501 GraphicUsed by:503
Symbol 502 GraphicUsed by:503
Symbol 503 MovieClipUses:501 502Used by:504
Symbol 504 MovieClipUses:496 497 500 503 84Used by:520  Timeline
Symbol 505 EditableTextUses:436Used by:520
Symbol 506 EditableTextUses:436Used by:520
Symbol 507 EditableTextUses:436Used by:520
Symbol 508 EditableTextUses:436Used by:520
Symbol 509 EditableTextUses:436Used by:520
Symbol 510 EditableTextUses:436Used by:520
Symbol 511 EditableTextUses:436Used by:520
Symbol 512 EditableTextUses:436Used by:520
Symbol 513 EditableTextUses:436Used by:520
Symbol 514 EditableTextUses:436Used by:520
Symbol 515 EditableTextUses:436Used by:520
Symbol 516 EditableTextUses:436Used by:520
Symbol 517 EditableTextUses:436Used by:520
Symbol 518 EditableTextUses:436Used by:520
Symbol 519 EditableTextUses:436Used by:520
Symbol 520 MovieClipUses:435 437 438 439 440 441 444 445 446 401 447 448 449 450 451 452 455 456 457 460 461 463 464 475 476 243 477 478 479 480 481 299 482 483 484 485 149 486 487 488 489 490 491 492 493 494 504 505 147 506 140 507 132 508 509 510 511 512 513 514 515 516 517 518 519Used by:605
Symbol 521 TextUses:382Used by:522
Symbol 522 MovieClipUses:521Used by:605
Symbol 523 TextUses:382Used by:605
Symbol 524 TextUses:382Used by:605
Symbol 525 TextUses:382Used by:605
Symbol 526 EditableTextUses:355Used by:605
Symbol 527 EditableTextUses:355Used by:605
Symbol 528 TextUses:382Used by:605
Symbol 529 TextUses:382Used by:605
Symbol 530 TextUses:382Used by:605
Symbol 531 TextUses:382Used by:605
Symbol 532 GraphicUsed by:540
Symbol 533 GraphicUsed by:540
Symbol 534 FontUsed by:535 536 537 538 539
Symbol 535 TextUses:534Used by:540
Symbol 536 TextUses:534Used by:540
Symbol 537 TextUses:534Used by:540
Symbol 538 TextUses:534Used by:540
Symbol 539 TextUses:534Used by:540
Symbol 540 MovieClipUses:532 533 535 536 537 538 539Used by:605
Symbol 541 GraphicUsed by:571
Symbol 542 GraphicUsed by:571 591
Symbol 543 EditableTextUses:355Used by:545 550
Symbol 544 GraphicUsed by:545 550
Symbol 545 ButtonUses:543 544Used by:571
Symbol 546 GraphicUsed by:571
Symbol 547 GraphicUsed by:548 671 944
Symbol 548 ButtonUses:547Used by:571
Symbol 549 GraphicUsed by:571
Symbol 550 ButtonUses:543 544Used by:571
Symbol 551 GraphicUsed by:571
Symbol 552 GraphicUsed by:554 555
Symbol 553 GraphicUsed by:554 555
Symbol 554 ButtonUses:552 553Used by:571
Symbol 555 ButtonUses:552 553Used by:571
Symbol 556 GraphicUsed by:571
Symbol 557 GraphicUsed by:571
Symbol 558 EditableTextUses:355Used by:560 561
Symbol 559 GraphicUsed by:560 561 564 569 570
Symbol 560 ButtonUses:558 559Used by:571
Symbol 561 ButtonUses:558 559Used by:571
Symbol 562 GraphicUsed by:571
Symbol 563 EditableTextUses:355Used by:564
Symbol 564 ButtonUses:563 559Used by:571
Symbol 565 GraphicUsed by:571
Symbol 566 GraphicUsed by:571
Symbol 567 GraphicUsed by:571
Symbol 568 EditableTextUses:355Used by:569 570
Symbol 569 ButtonUses:568 559Used by:571
Symbol 570 ButtonUses:568 559Used by:571
Symbol 571 MovieClipUses:541 542 545 546 548 549 550 551 554 555 556 557 560 561 562 564 565 566 567 569 570Used by:605
Symbol 572 TextUses:382Used by:605
Symbol 573 EditableTextUses:382Used by:605
Symbol 574 EditableTextUses:355Used by:605
Symbol 575 EditableTextUses:355Used by:605
Symbol 576 EditableTextUses:355Used by:605
Symbol 577 EditableTextUses:355Used by:605
Symbol 578 EditableTextUses:355Used by:605
Symbol 579 EditableTextUses:355Used by:605
Symbol 580 EditableTextUses:355Used by:605
Symbol 581 EditableTextUses:355Used by:605
Symbol 582 EditableTextUses:355Used by:605
Symbol 583 EditableTextUses:355Used by:605
Symbol 584 EditableTextUses:355Used by:605
Symbol 585 EditableTextUses:355Used by:605
Symbol 586 EditableTextUses:355Used by:605
Symbol 587 EditableTextUses:355Used by:605
Symbol 588 EditableTextUses:355Used by:605
Symbol 589 EditableTextUses:355Used by:605
Symbol 590 EditableTextUses:355Used by:605
Symbol 591 MovieClipUses:542Used by:605
Symbol 592 TextUses:382Used by:605
Symbol 593 TextUses:382Used by:605
Symbol 594 TextUses:382Used by:605
Symbol 595 TextUses:382Used by:605
Symbol 596 EditableTextUses:355Used by:605
Symbol 597 EditableTextUses:355Used by:605
Symbol 598 EditableTextUses:355Used by:605
Symbol 599 EditableTextUses:355Used by:605
Symbol 600 EditableTextUses:355Used by:605
Symbol 601 EditableTextUses:355Used by:605
Symbol 602 EditableTextUses:355Used by:605
Symbol 603 FontUsed by:604
Symbol 604 TextUses:603Used by:605
Symbol 605 MovieClipUses:364 390 391 392 393 279 261 243 222 203 182 165 394 395 520 522 523 524 525 526 527 528 529 530 531 540 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 604Used by:606
Symbol 606 MovieClipUses:346 348 350 351 357 358 364 370 371 372 373 374 375 376 377 378 379 380 381 383 384 385 386 387 388 389 605Used by:Timeline
Symbol 607 EditableTextUses:382Used by:Timeline
Symbol 608 EditableTextUses:382Used by:Timeline
Symbol 609 TextUses:382Used by:Timeline
Symbol 610 GraphicUsed by:611
Symbol 611 MovieClipUses:610Used by:Timeline
Symbol 612 TextUses:382Used by:Timeline
Symbol 613 TextUses:382Used by:Timeline
Symbol 614 TextUses:382Used by:Timeline
Symbol 615 TextUses:382Used by:Timeline
Symbol 616 GraphicUsed by:Timeline
Symbol 617 GraphicUsed by:626
Symbol 618 GraphicUsed by:625
Symbol 619 GraphicUsed by:625
Symbol 620 GraphicUsed by:625
Symbol 621 GraphicUsed by:625
Symbol 622 GraphicUsed by:625
Symbol 623 GraphicUsed by:625
Symbol 624 GraphicUsed by:625
Symbol 625 MovieClipUses:618 619 620 621 622 623 624Used by:626 790
Symbol 626 MovieClipUses:617 625Used by:Timeline
Symbol 627 GraphicUsed by:628
Symbol 628 MovieClipUses:627Used by:Timeline
Symbol 629 GraphicUsed by:Timeline
Symbol 630 GraphicUsed by:636
Symbol 631 GraphicUsed by:633
Symbol 632 GraphicUsed by:633
Symbol 633 MovieClipUses:631 632Used by:636
Symbol 634 GraphicUsed by:635
Symbol 635 MovieClipUses:634Used by:636
Symbol 636 MovieClipUses:630 633 635Used by:Timeline
Symbol 637 GraphicUsed by:638
Symbol 638 MovieClipUses:637Used by:Timeline
Symbol 639 MovieClipUses:455Used by:Timeline
Symbol 640 GraphicUsed by:Timeline
Symbol 641 GraphicUsed by:Timeline
Symbol 642 GraphicUsed by:Timeline
Symbol 643 GraphicUsed by:Timeline
Symbol 644 TextUses:382Used by:Timeline
Symbol 645 EditableTextUses:382Used by:Timeline
Symbol 646 GraphicUsed by:647
Symbol 647 MovieClipUses:646Used by:Timeline
Symbol 648 GraphicUsed by:649
Symbol 649 MovieClipUses:648Used by:Timeline
Symbol 650 GraphicUsed by:651
Symbol 651 MovieClipUses:650Used by:Timeline
Symbol 652 EditableTextUses:382Used by:Timeline
Symbol 653 GraphicUsed by:654
Symbol 654 MovieClipUses:653Used by:657  Timeline
Symbol 655 GraphicUsed by:657
Symbol 656 GraphicUsed by:657
Symbol 657 MovieClipUses:654 655 656Used by:Timeline
Symbol 658 TextUses:302Used by:664
Symbol 659 Sound [maleScream]Used by:664
Symbol 660 Sound [explosion]Used by:664  Timeline
Symbol 661 Sound [maleEnjoy]Used by:664  Timeline
Symbol 662 Sound [camera]Used by:664
Symbol 663 Sound [femaleEnjoy]Used by:664
Symbol 664 MovieClipUses:658 659 660 661 662 663Used by:Timeline
Symbol 665 EditableTextUses:355Used by:666
Symbol 666 MovieClipUses:665Used by:667
Symbol 667 MovieClipUses:666Used by:Timeline
Symbol 668 FontUsed by:392 394 669 672
Symbol 669 TextUses:668Used by:671
Symbol 670 GraphicUsed by:671
Symbol 671 ButtonUses:669 670 547Used by:674
Symbol 672 TextUses:668Used by:673
Symbol 673 MovieClipUses:672Used by:674
Symbol 674 MovieClipUses:671 673Used by:Timeline
Symbol 675 Sound [city]Used by:Timeline
Symbol 676 GraphicUses:300Used by:Timeline
Symbol 677 EditableTextUses:382Used by:Timeline
Symbol 678 EditableTextUses:355Used by:Timeline
Symbol 679 GraphicUsed by:683
Symbol 680 FontUsed by:681 686
Symbol 681 TextUses:680Used by:683
Symbol 682 GraphicUsed by:683
Symbol 683 ButtonUses:679 681 682Used by:Timeline
Symbol 684 EditableTextUses:436Used by:Timeline
Symbol 685 TextUses:382Used by:Timeline
Symbol 686 TextUses:680Used by:Timeline
Symbol 687 TextUses:382Used by:Timeline
Symbol 688 GraphicUsed by:Timeline
Symbol 689 GraphicUsed by:690
Symbol 690 MovieClipUses:689Used by:Timeline
Symbol 691 GraphicUsed by:701
Symbol 692 GraphicUsed by:701
Symbol 693 GraphicUsed by:694
Symbol 694 MovieClipUses:693 431Used by:695
Symbol 695 MovieClipUses:694Used by:701
Symbol 696 GraphicUsed by:698
Symbol 697 GraphicUsed by:698
Symbol 698 MovieClipUses:696 697Used by:701
Symbol 699 GraphicUsed by:700
Symbol 700 MovieClipUses:699Used by:701
Symbol 701 MovieClipUses:691 692 695 455 698 700Used by:Timeline
Symbol 702 GraphicUsed by:703
Symbol 703 MovieClipUses:702Used by:Timeline
Symbol 704 GraphicUsed by:705
Symbol 705 MovieClipUses:704Used by:Timeline
Symbol 706 GraphicUsed by:710
Symbol 707 GraphicUsed by:708
Symbol 708 MovieClipUses:707Used by:710
Symbol 709 GraphicUsed by:710
Symbol 710 MovieClipUses:706 708 709Used by:Timeline
Symbol 711 EditableTextUses:382Used by:Timeline
Symbol 712 EditableTextUses:382Used by:Timeline
Symbol 713 GraphicUsed by:714
Symbol 714 MovieClipUses:713Used by:Timeline
Symbol 715 GraphicUsed by:718
Symbol 716 GraphicUsed by:717
Symbol 717 MovieClipUses:716Used by:718
Symbol 718 MovieClipUses:715 717Used by:Timeline
Symbol 719 GraphicUsed by:720
Symbol 720 MovieClipUses:719Used by:Timeline
Symbol 721 GraphicUsed by:727
Symbol 722 GraphicUsed by:727
Symbol 723 GraphicUsed by:727
Symbol 724 GraphicUsed by:727
Symbol 725 TextUses:302Used by:727
Symbol 726 TextUses:302Used by:727
Symbol 727 MovieClipUses:721 722 723 724 725 726Used by:758
Symbol 728 GraphicUsed by:734
Symbol 729 GraphicUsed by:731
Symbol 730 GraphicUsed by:731
Symbol 731 MovieClipUses:729 730Used by:734
Symbol 732 GraphicUsed by:734
Symbol 733 GraphicUsed by:734
Symbol 734 MovieClipUses:728 731 732 733Used by:758
Symbol 735 GraphicUsed by:742
Symbol 736 GraphicUsed by:738
Symbol 737 GraphicUsed by:738
Symbol 738 MovieClipUses:736 737Used by:742 745
Symbol 739 GraphicUsed by:740
Symbol 740 MovieClipUses:739Used by:742 745
Symbol 741 GraphicUsed by:742
Symbol 742 MovieClipUses:735 738 740 741Used by:758
Symbol 743 GraphicUsed by:745
Symbol 744 GraphicUsed by:745
Symbol 745 MovieClipUses:743 738 740 744Used by:758
Symbol 746 GraphicUsed by:747
Symbol 747 MovieClipUses:746Used by:758
Symbol 748 GraphicUsed by:758
Symbol 749 GraphicUsed by:755
Symbol 750 GraphicUsed by:755
Symbol 751 GraphicUsed by:755
Symbol 752 GraphicUsed by:755
Symbol 753 GraphicUsed by:755
Symbol 754 GraphicUsed by:755
Symbol 755 MovieClipUses:749 750 751 752 753 754Used by:758
Symbol 756 GraphicUsed by:757
Symbol 757 MovieClipUses:756Used by:758
Symbol 758 MovieClipUses:727 734 742 745 747 748 755 757Used by:Timeline
Symbol 759 EditableTextUses:382Used by:Timeline
Symbol 760 EditableTextUses:382Used by:Timeline
Symbol 761 GraphicUsed by:Timeline
Symbol 762 GraphicUsed by:763
Symbol 763 MovieClipUses:762Used by:767  Timeline
Symbol 764 GraphicUsed by:766
Symbol 765 GraphicUsed by:766
Symbol 766 MovieClipUses:764 765Used by:767
Symbol 767 MovieClipUses:763 766Used by:Timeline
Symbol 768 GraphicUsed by:Timeline
Symbol 769 GraphicUsed by:779
Symbol 770 GraphicUsed by:779
Symbol 771 GraphicUsed by:779
Symbol 772 GraphicUsed by:779
Symbol 773 GraphicUsed by:779
Symbol 774 GraphicUsed by:779
Symbol 775 GraphicUsed by:779
Symbol 776 GraphicUsed by:779
Symbol 777 GraphicUsed by:779
Symbol 778 GraphicUsed by:779
Symbol 779 MovieClipUses:769 770 771 772 773 774 775 776 777 778Used by:780
Symbol 780 MovieClipUses:779Used by:Timeline
Symbol 781 EditableTextUses:382Used by:Timeline
Symbol 782 EditableTextUses:382Used by:Timeline
Symbol 783 Sound [bonus]Used by:Timeline
Symbol 784 GraphicUsed by:Timeline
Symbol 785 GraphicUsed by:790
Symbol 786 GraphicUsed by:788
Symbol 787 GraphicUsed by:788
Symbol 788 MovieClipUses:786 787Used by:790  Timeline
Symbol 789 GraphicUsed by:790
Symbol 790 MovieClipUses:785 788 789 625Used by:Timeline
Symbol 791 GraphicUsed by:792
Symbol 792 MovieClipUses:791Used by:Timeline
Symbol 793 GraphicUsed by:804
Symbol 794 GraphicUsed by:804
Symbol 795 GraphicUsed by:804 817
Symbol 796 GraphicUsed by:804 817
Symbol 797 GraphicUsed by:804 817
Symbol 798 GraphicUsed by:804 817
Symbol 799 GraphicUsed by:804 817
Symbol 800 GraphicUsed by:804 817
Symbol 801 GraphicUsed by:804 817
Symbol 802 GraphicUsed by:804 817
Symbol 803 GraphicUsed by:804 817
Symbol 804 MovieClipUses:793 794 795 796 797 798 799 800 801 802 803Used by:805
Symbol 805 MovieClipUses:804Used by:Timeline
Symbol 806 EditableTextUses:382Used by:Timeline
Symbol 807 EditableTextUses:382Used by:Timeline
Symbol 808 Sound [forest]Used by:Timeline
Symbol 809 GraphicUses:300Used by:Timeline
Symbol 810 EditableTextUses:382Used by:Timeline
Symbol 811 GraphicUses:300Used by:Timeline
Symbol 812 EditableTextUses:382Used by:Timeline
Symbol 813 TextUses:382Used by:814
Symbol 814 MovieClipUses:813Used by:Timeline
Symbol 815 GraphicUsed by:Timeline
Symbol 816 GraphicUsed by:817
Symbol 817 MovieClipUses:816 795 796 797 798 799 800 801 802 803Used by:820
Symbol 818 GraphicUsed by:820
Symbol 819 GraphicUsed by:820
Symbol 820 MovieClipUses:817 818 819Used by:Timeline
Symbol 821 GraphicUsed by:822
Symbol 822 MovieClipUses:821Used by:Timeline
Symbol 823 GraphicUsed by:824
Symbol 824 MovieClipUses:823Used by:Timeline
Symbol 825 EditableTextUses:382Used by:Timeline
Symbol 826 EditableTextUses:382Used by:Timeline
Symbol 827 GraphicUsed by:Timeline
Symbol 828 GraphicUsed by:829
Symbol 829 MovieClipUses:828Used by:844  Timeline
Symbol 830 GraphicUsed by:831 840
Symbol 831 MovieClipUses:830Used by:834
Symbol 832 GraphicUsed by:833
Symbol 833 MovieClipUses:832Used by:834
Symbol 834 MovieClipUses:831 833Used by:836
Symbol 835 GraphicUsed by:836
Symbol 836 MovieClipUses:834 835Used by:841
Symbol 837 GraphicUsed by:838
Symbol 838 MovieClipUses:837Used by:841
Symbol 839 GraphicUsed by:840
Symbol 840 MovieClipUses:839 830Used by:841
Symbol 841 MovieClipUses:836 838 840Used by:Timeline
Symbol 842 GraphicUsed by:Timeline
Symbol 843 GraphicUsed by:844
Symbol 844 MovieClipUses:843 829Used by:Timeline
Symbol 845 EditableTextUses:382Used by:Timeline
Symbol 846 EditableTextUses:382Used by:Timeline
Symbol 847 GraphicUsed by:862
Symbol 848 GraphicUsed by:862
Symbol 849 GraphicUsed by:862
Symbol 850 GraphicUsed by:862
Symbol 851 GraphicUsed by:862
Symbol 852 GraphicUsed by:862
Symbol 853 GraphicUsed by:862
Symbol 854 GraphicUsed by:862
Symbol 855 GraphicUsed by:862
Symbol 856 GraphicUsed by:862
Symbol 857 GraphicUsed by:862
Symbol 858 GraphicUsed by:862
Symbol 859 GraphicUsed by:862
Symbol 860 GraphicUsed by:862
Symbol 861 GraphicUsed by:862
Symbol 862 MovieClip [desert_rock]Uses:847 848 849 850 851 852 853 854 855 856 857 858 859 860 861Used by:Timeline
Symbol 863 Sound [space]Used by:Timeline
Symbol 864 GraphicUsed by:865
Symbol 865 MovieClipUses:864Used by:Timeline
Symbol 866 GraphicUsed by:905
Symbol 867 GraphicUsed by:904
Symbol 868 GraphicUsed by:904
Symbol 869 GraphicUsed by:904
Symbol 870 GraphicUsed by:904
Symbol 871 GraphicUsed by:904
Symbol 872 GraphicUsed by:904
Symbol 873 GraphicUsed by:904
Symbol 874 GraphicUsed by:904
Symbol 875 GraphicUsed by:904
Symbol 876 GraphicUsed by:904
Symbol 877 GraphicUsed by:904
Symbol 878 GraphicUsed by:904
Symbol 879 GraphicUsed by:904
Symbol 880 GraphicUsed by:904
Symbol 881 GraphicUsed by:904
Symbol 882 GraphicUsed by:904
Symbol 883 GraphicUsed by:904
Symbol 884 GraphicUsed by:904
Symbol 885 GraphicUsed by:904
Symbol 886 GraphicUsed by:904
Symbol 887 GraphicUsed by:904
Symbol 888 GraphicUsed by:904
Symbol 889 GraphicUsed by:904
Symbol 890 GraphicUsed by:904
Symbol 891 GraphicUsed by:904
Symbol 892 GraphicUsed by:904
Symbol 893 GraphicUsed by:904
Symbol 894 GraphicUsed by:904
Symbol 895 GraphicUsed by:904
Symbol 896 GraphicUsed by:904
Symbol 897 GraphicUsed by:904
Symbol 898 GraphicUsed by:904
Symbol 899 GraphicUsed by:904
Symbol 900 GraphicUsed by:904
Symbol 901 GraphicUsed by:904
Symbol 902 GraphicUsed by:904
Symbol 903 GraphicUsed by:904
Symbol 904 MovieClipUses:867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903Used by:905
Symbol 905 MovieClipUses:866 904Used by:Timeline
Symbol 906 GraphicUsed by:907
Symbol 907 MovieClipUses:906Used by:Timeline
Symbol 908 GraphicUsed by:Timeline
Symbol 909 GraphicUsed by:940
Symbol 910 GraphicUsed by:940
Symbol 911 EditableTextUses:355Used by:940
Symbol 912 GraphicUsed by:940
Symbol 913 GraphicUsed by:940 954
Symbol 914 GraphicUsed by:940
Symbol 915 EditableTextUses:355Used by:940
Symbol 916 EditableTextUses:355Used by:940
Symbol 917 EditableTextUses:355Used by:940
Symbol 918 GraphicUsed by:919
Symbol 919 MovieClipUses:918Used by:940
Symbol 920 GraphicUsed by:940
Symbol 921 GraphicUsed by:940
Symbol 922 GraphicUsed by:940 941
Symbol 923 GraphicUsed by:940
Symbol 924 GraphicUsed by:940
Symbol 925 GraphicUsed by:931
Symbol 926 GraphicUsed by:928
Symbol 927 GraphicUsed by:928
Symbol 928 MovieClipUses:926 927Used by:931
Symbol 929 GraphicUsed by:931
Symbol 930 GraphicUsed by:931
Symbol 931 MovieClipUses:925 928 929 930Used by:940
Symbol 932 GraphicUsed by:940
Symbol 933 EditableTextUses:355Used by:940
Symbol 934 GraphicUsed by:935
Symbol 935 MovieClipUses:934Used by:940
Symbol 936 EditableTextUses:355Used by:940
Symbol 937 EditableTextUses:355Used by:940
Symbol 938 EditableTextUses:355Used by:940
Symbol 939 EditableTextUses:355Used by:940
Symbol 940 MovieClipUses:909 910 434 911 912 140 913 914 915 916 917 919 920 921 922 923 924 931 932 933 935 936 937 938 939Used by:Timeline
Symbol 941 MovieClipUses:922 84Used by:Timeline
Symbol 942 EditableTextUses:382Used by:Timeline
Symbol 943 EditableTextUses:382Used by:Timeline
Symbol 944 MovieClipUses:547Used by:Timeline
Symbol 945 MovieClipUses:301 346Used by:Timeline
Symbol 946 GraphicUsed by:Timeline
Symbol 947 EditableTextUses:382Used by:Timeline
Symbol 948 EditableTextUses:382Used by:Timeline
Symbol 949 GraphicUsed by:953
Symbol 950 GraphicUsed by:953
Symbol 951 GraphicUsed by:953
Symbol 952 GraphicUsed by:953
Symbol 953 MovieClipUses:949 950 951 952Used by:954
Symbol 954 MovieClipUses:953 913 84Used by:Timeline
Symbol 955 GraphicUsed by:Timeline
Symbol 956 GraphicUsed by:958
Symbol 957 GraphicUsed by:958
Symbol 958 MovieClipUses:956 957Used by:Timeline
Symbol 959 GraphicUsed by:960 977
Symbol 960 MovieClipUses:959Used by:962 977
Symbol 961 GraphicUsed by:962
Symbol 962 MovieClipUses:960 961Used by:Timeline
Symbol 963 GraphicUsed by:Timeline
Symbol 964 GraphicUsed by:966
Symbol 965 GraphicUsed by:966
Symbol 966 MovieClipUses:964 965Used by:Timeline
Symbol 967 GraphicUsed by:968 970 977
Symbol 968 MovieClipUses:967Used by:977
Symbol 969 GraphicUsed by:977
Symbol 970 MovieClipUses:967Used by:977
Symbol 971 GraphicUsed by:977
Symbol 972 GraphicUsed by:977
Symbol 973 GraphicUsed by:977
Symbol 974 GraphicUsed by:975
Symbol 975 MovieClipUses:974 84Used by:977 1012
Symbol 976 GraphicUsed by:977
Symbol 977 MovieClipUses:960 968 969 970 959 967 971 972 973 975 976Used by:Timeline
Symbol 978 EditableTextUses:382Used by:Timeline
Symbol 979 EditableTextUses:382Used by:Timeline
Symbol 980 GraphicUsed by:Timeline
Symbol 981 GraphicUsed by:982
Symbol 982 MovieClipUses:981Used by:983
Symbol 983 MovieClipUses:982Used by:1014
Symbol 984 GraphicUsed by:1014
Symbol 985 GraphicUsed by:986
Symbol 986 MovieClipUses:985Used by:1012
Symbol 987 GraphicUsed by:1012
Symbol 988 GraphicUsed by:1012
Symbol 989 GraphicUsed by:1012
Symbol 990 GraphicUsed by:991
Symbol 991 MovieClipUses:990Used by:1012
Symbol 992 GraphicUsed by:1012
Symbol 993 GraphicUsed by:1012
Symbol 994 GraphicUsed by:1012
Symbol 995 GraphicUsed by:1012
Symbol 996 GraphicUsed by:1012
Symbol 997 GraphicUsed by:1012
Symbol 998 GraphicUsed by:1012
Symbol 999 GraphicUsed by:1012
Symbol 1000 GraphicUsed by:1012
Symbol 1001 GraphicUsed by:1012
Symbol 1002 GraphicUsed by:1012
Symbol 1003 GraphicUsed by:1012
Symbol 1004 GraphicUsed by:1012
Symbol 1005 GraphicUsed by:1012
Symbol 1006 GraphicUsed by:1012
Symbol 1007 GraphicUsed by:1012
Symbol 1008 GraphicUsed by:1012
Symbol 1009 GraphicUsed by:1012
Symbol 1010 GraphicUsed by:1012
Symbol 1011 GraphicUsed by:1012
Symbol 1012 MovieClipUses:986 987 988 989 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 975 1006 1007 1008 1009 1010 1011Used by:1013  Timeline
Symbol 1013 MovieClipUses:1012Used by:1014
Symbol 1014 MovieClipUses:983 984 1013Used by:Timeline
Symbol 1015 GraphicUsed by:1016
Symbol 1016 MovieClipUses:1015Used by:Timeline
Symbol 1017 GraphicUsed by:1018
Symbol 1018 MovieClipUses:1017Used by:Timeline
Symbol 1019 EditableTextUses:382Used by:Timeline
Symbol 1020 EditableTextUses:382Used by:Timeline
Symbol 1021 Sound [mountains level]Used by:Timeline
Symbol 1022 Sound [moon level]Used by:Timeline
Symbol 1023 Sound [hell level]Used by:Timeline
Symbol 1024 Sound [heaven level]Used by:Timeline
Symbol 1025 Sound [forest level]Used by:Timeline
Symbol 1026 Sound [city level]Used by:Timeline
Symbol 1027 Sound [area 51 level]Used by:Timeline
Symbol 1028 Sound [arctic level]Used by:Timeline
Symbol 1029 Sound [farm]Used by:Timeline
Symbol 1030 Sound [titleMusic]Used by:Timeline
Symbol 1031 Sound [tutorial music]Used by:Timeline
Symbol 1032 Sound [unlock shop music]Used by:Timeline
Symbol 1033 Sound [bad1]Used by:Timeline
Symbol 1034 Sound [bad2]Used by:Timeline
Symbol 1035 Sound [bad3]Used by:Timeline
Symbol 1036 Sound [bad4]Used by:Timeline
Symbol 1037 Sound [bad5]Used by:Timeline
Symbol 1038 Sound [bad6]Used by:Timeline
Symbol 1039 Sound [good1]Used by:Timeline
Symbol 1040 Sound [good2]Used by:Timeline
Symbol 1041 Sound [good3]Used by:Timeline
Symbol 1042 Sound [good4]Used by:Timeline
Symbol 1043 Sound [good5]Used by:Timeline
Symbol 1044 Sound [rand1]Used by:Timeline
Symbol 1045 Sound [rand2]Used by:Timeline
Symbol 1046 Sound [rand3]Used by:Timeline
Symbol 1047 Sound [rand4]Used by:Timeline
Symbol 1048 Sound [desert level]Used by:Timeline
Symbol 1049 Sound [bonusSound]Used by:Timeline

Instance Names

"preloader"Frame 1Symbol 313 MovieClip
"mainScreen"Frame 3Symbol 606 MovieClip
"submitButton"Frame 4Symbol 364 MovieClip
"hills"Frame 5Symbol 626 MovieClip
"bushes"Frame 5Symbol 628 MovieClip
"trees"Frame 5Symbol 636 MovieClip
"igloo3"Frame 5Symbol 125 MovieClip [igloo]
"igloo2"Frame 5Symbol 125 MovieClip [igloo]
"igloo1"Frame 5Symbol 125 MovieClip [igloo]
"igloo4"Frame 5Symbol 125 MovieClip [igloo]
"shadow"Frame 5Symbol 638 MovieClip
"beam"Frame 5Symbol 639 MovieClip
"ship"Frame 5Symbol 435 MovieClip
"energy"Frame 5Symbol 460 MovieClip
"peopleToGo"Frame 5Symbol 475 MovieClip
"boundingbox"Frame 5Symbol 647 MovieClip
"z2"Frame 5Symbol 649 MovieClip
"z1"Frame 5Symbol 651 MovieClip
"volumeClip"Frame 5Symbol 657 MovieClip
"sounds"Frame 5Symbol 664 MovieClip
"display"Frame 5Symbol 667 MovieClip
"paused"Frame 5Symbol 674 MovieClip
"finalScore_txt"Frame 7Symbol 677 EditableText
"playerName_txt"Frame 7Symbol 678 EditableText
"hills"Frame 10Symbol 701 MovieClip
"bushes"Frame 10Symbol 703 MovieClip
"trees"Frame 10Symbol 710 MovieClip
"shadow"Frame 10Symbol 638 MovieClip
"beam"Frame 10Symbol 639 MovieClip
"ship"Frame 10Symbol 435 MovieClip
"energy"Frame 10Symbol 460 MovieClip
"peopleToGo"Frame 10Symbol 475 MovieClip
"z1"Frame 10Symbol 651 MovieClip
"z2"Frame 10Symbol 649 MovieClip
"volumeClip"Frame 10Symbol 657 MovieClip
"sounds"Frame 10Symbol 664 MovieClip
"display"Frame 10Symbol 667 MovieClip
"paused"Frame 10Symbol 674 MovieClip
"hills"Frame 15Symbol 718 MovieClip
"bushes"Frame 15Symbol 720 MovieClip
"trees"Frame 15Symbol 758 MovieClip
"shadow"Frame 15Symbol 638 MovieClip
"beam"Frame 15Symbol 639 MovieClip
"ship"Frame 15Symbol 435 MovieClip
"energy"Frame 15Symbol 460 MovieClip
"peopleToGo"Frame 15Symbol 475 MovieClip
"boundingbox"Frame 15Symbol 647 MovieClip
"z2"Frame 15Symbol 649 MovieClip
"z1"Frame 15Symbol 651 MovieClip
"volumeClip"Frame 15Symbol 657 MovieClip
"sounds"Frame 15Symbol 664 MovieClip
"display"Frame 15Symbol 667 MovieClip
"heli 2"Frame 15Symbol 504 MovieClip
"heli 1"Frame 15Symbol 504 MovieClip
"heli 3"Frame 15Symbol 504 MovieClip
"bonus2"Frame 15Symbol 123 MovieClip [BonusIcon]
"hills"Frame 17Symbol 767 MovieClip
"trees"Frame 17Symbol 780 MovieClip
"shadow"Frame 17Symbol 638 MovieClip
"beam"Frame 17Symbol 639 MovieClip
"ship"Frame 17Symbol 435 MovieClip
"energy"Frame 17Symbol 460 MovieClip
"peopleToGo"Frame 17Symbol 475 MovieClip
"z2"Frame 17Symbol 649 MovieClip
"z1"Frame 17Symbol 651 MovieClip
"volumeClip"Frame 17Symbol 657 MovieClip
"sounds"Frame 17Symbol 664 MovieClip
"display"Frame 17Symbol 667 MovieClip
"paused"Frame 17Symbol 674 MovieClip
"hills"Frame 20Symbol 790 MovieClip
"bushes"Frame 20Symbol 788 MovieClip
"shadow"Frame 20Symbol 638 MovieClip
"rock4"Frame 20Symbol 118 MovieClip [rock]
"rock5"Frame 20Symbol 118 MovieClip [rock]
"rock7"Frame 20Symbol 118 MovieClip [rock]
"rock1"Frame 20Symbol 118 MovieClip [rock]
"rock3"Frame 20Symbol 118 MovieClip [rock]
"trees"Frame 20Symbol 805 MovieClip
"beam"Frame 20Symbol 639 MovieClip
"ship"Frame 20Symbol 435 MovieClip
"energy"Frame 20Symbol 460 MovieClip
"peopleToGo"Frame 20Symbol 475 MovieClip
"z2"Frame 20Symbol 649 MovieClip
"z1"Frame 20Symbol 651 MovieClip
"volumeClip"Frame 20Symbol 657 MovieClip
"sounds"Frame 20Symbol 664 MovieClip
"display"Frame 20Symbol 667 MovieClip
"heli 1"Frame 20Symbol 504 MovieClip
"heli 2"Frame 20Symbol 504 MovieClip
"heli 3"Frame 20Symbol 504 MovieClip
"heli 6"Frame 20Symbol 504 MovieClip
"heli 5"Frame 20Symbol 504 MovieClip
"heli 4"Frame 20Symbol 504 MovieClip
"bonus2"Frame 20Symbol 123 MovieClip [BonusIcon]
"levelWords"Frame 22Symbol 814 MovieClip
"hills"Frame 25Symbol 820 MovieClip
"bushes"Frame 25Symbol 822 MovieClip
"trees"Frame 25Symbol 824 MovieClip
"shadow"Frame 25Symbol 638 MovieClip
"beam"Frame 25Symbol 639 MovieClip
"ship"Frame 25Symbol 435 MovieClip
"energy"Frame 25Symbol 460 MovieClip
"peopleToGo"Frame 25Symbol 475 MovieClip
"boundingbox"Frame 25Symbol 647 MovieClip
"z1"Frame 25Symbol 651 MovieClip
"z2"Frame 25Symbol 649 MovieClip
"tank1"Frame 25Symbol 140 MovieClip [tank]
"tank2"Frame 25Symbol 140 MovieClip [tank]
"volumeClip"Frame 25Symbol 657 MovieClip
"sounds"Frame 25Symbol 664 MovieClip
"bonus2"Frame 25Symbol 123 MovieClip [BonusIcon]
"bonus1"Frame 25Symbol 123 MovieClip [BonusIcon]
"display"Frame 25Symbol 667 MovieClip
"heli 1"Frame 25Symbol 504 MovieClip
"heli 2"Frame 25Symbol 504 MovieClip
"heli 3"Frame 25Symbol 504 MovieClip
"paused"Frame 25Symbol 674 MovieClip
"hills"Frame 30Symbol 763 MovieClip
"bonus1"Frame 30Symbol 123 MovieClip [BonusIcon]
"bushes"Frame 30Symbol 841 MovieClip
"trees"Frame 30Symbol 844 MovieClip
"shadow"Frame 30Symbol 638 MovieClip
"beam"Frame 30Symbol 639 MovieClip
"ship"Frame 30Symbol 435 MovieClip
"energy"Frame 30Symbol 460 MovieClip
"peopleToGo"Frame 30Symbol 475 MovieClip
"boundingbox"Frame 30Symbol 647 MovieClip
"z2"Frame 30Symbol 649 MovieClip
"z1"Frame 30Symbol 651 MovieClip
"volumeClip"Frame 30Symbol 657 MovieClip
"sounds"Frame 30Symbol 664 MovieClip
"rock6"Frame 30Symbol 862 MovieClip [desert_rock]
"rock7"Frame 30Symbol 862 MovieClip [desert_rock]
"rock8"Frame 30Symbol 862 MovieClip [desert_rock]
"rock9"Frame 30Symbol 862 MovieClip [desert_rock]
"rock11"Frame 30Symbol 862 MovieClip [desert_rock]
"rock10"Frame 30Symbol 862 MovieClip [desert_rock]
"tank1"Frame 30Symbol 116 MovieClip [antiAir]
"display"Frame 30Symbol 667 MovieClip
"tank2"Frame 30Symbol 116 MovieClip [antiAir]
"tank3"Frame 30Symbol 116 MovieClip [antiAir]
"bonus2"Frame 30Symbol 123 MovieClip [BonusIcon]
"hills"Frame 35Symbol 905 MovieClip
"bushes"Frame 35Symbol 907 MovieClip
"trees"Frame 35Symbol 940 MovieClip
"gun1"Frame 35Symbol 116 MovieClip [antiAir]
"gun2"Frame 35Symbol 116 MovieClip [antiAir]
"gun3"Frame 35Symbol 116 MovieClip [antiAir]
"tank4"Frame 35Symbol 140 MovieClip [tank]
"gun4"Frame 35Symbol 116 MovieClip [antiAir]
"heli 1"Frame 35Symbol 504 MovieClip
"shadow"Frame 35Symbol 638 MovieClip
"jet1"Frame 35Symbol 941 MovieClip
"jet2"Frame 35Symbol 941 MovieClip
"bonus2"Frame 35Symbol 123 MovieClip [BonusIcon]
"bonus1"Frame 35Symbol 123 MovieClip [BonusIcon]
"beam"Frame 35Symbol 639 MovieClip
"ship"Frame 35Symbol 435 MovieClip
"energy"Frame 35Symbol 460 MovieClip
"peopleToGo"Frame 35Symbol 475 MovieClip
"z1"Frame 35Symbol 651 MovieClip
"z2"Frame 35Symbol 649 MovieClip
"volumeClip"Frame 35Symbol 657 MovieClip
"sounds"Frame 35Symbol 664 MovieClip
"display"Frame 35Symbol 667 MovieClip
"flash"Frame 35Symbol 944 MovieClip
"hills"Frame 40Symbol 348 MovieClip
"bushes"Frame 40Symbol 350 MovieClip
"trees"Frame 40Symbol 357 MovieClip
"shadow"Frame 40Symbol 638 MovieClip
"bonus3"Frame 40Symbol 123 MovieClip [BonusIcon]
"bonus4"Frame 40Symbol 123 MovieClip [BonusIcon]
"bonus5"Frame 40Symbol 123 MovieClip [BonusIcon]
"beam"Frame 40Symbol 639 MovieClip
"ship"Frame 40Symbol 435 MovieClip
"energy"Frame 40Symbol 460 MovieClip
"peopleToGo"Frame 40Symbol 475 MovieClip
"boundingbox"Frame 40Symbol 647 MovieClip
"z1"Frame 40Symbol 651 MovieClip
"z2"Frame 40Symbol 649 MovieClip
"tank1"Frame 40Symbol 112 MovieClip [whiteTank]
"tank2"Frame 40Symbol 112 MovieClip [whiteTank]
"tank4"Frame 40Symbol 112 MovieClip [whiteTank]
"tank3"Frame 40Symbol 112 MovieClip [whiteTank]
"tank5"Frame 40Symbol 112 MovieClip [whiteTank]
"tank6"Frame 40Symbol 112 MovieClip [whiteTank]
"volumeClip"Frame 40Symbol 657 MovieClip
"sounds"Frame 40Symbol 664 MovieClip
"display"Frame 40Symbol 667 MovieClip
"space1"Frame 40Symbol 954 MovieClip
"space2"Frame 40Symbol 954 MovieClip
"space4"Frame 40Symbol 954 MovieClip
"space3"Frame 40Symbol 954 MovieClip
"hills"Frame 45Symbol 958 MovieClip
"bushes"Frame 45Symbol 962 MovieClip
"trees"Frame 45Symbol 966 MovieClip
"shadow"Frame 45Symbol 638 MovieClip
"angel1"Frame 45Symbol 977 MovieClip
"angel2"Frame 45Symbol 977 MovieClip
"angel3"Frame 45Symbol 977 MovieClip
"angel4"Frame 45Symbol 977 MovieClip
"angel5"Frame 45Symbol 977 MovieClip
"angel6"Frame 45Symbol 977 MovieClip
"angel7"Frame 45Symbol 977 MovieClip
"angel8"Frame 45Symbol 977 MovieClip
"angel9"Frame 45Symbol 977 MovieClip
"bonus1"Frame 45Symbol 123 MovieClip [BonusIcon]
"bonus2"Frame 45Symbol 123 MovieClip [BonusIcon]
"bonus3"Frame 45Symbol 123 MovieClip [BonusIcon]
"beam"Frame 45Symbol 639 MovieClip
"ship"Frame 45Symbol 435 MovieClip
"energy"Frame 45Symbol 460 MovieClip
"peopleToGo"Frame 45Symbol 475 MovieClip
"boundingbox"Frame 45Symbol 647 MovieClip
"z2"Frame 45Symbol 649 MovieClip
"z1"Frame 45Symbol 651 MovieClip
"volumeClip"Frame 45Symbol 657 MovieClip
"sounds"Frame 45Symbol 664 MovieClip
"display"Frame 45Symbol 667 MovieClip
"flash"Frame 45Symbol 944 MovieClip
"hills"Frame 50Symbol 1014 MovieClip
"bushes"Frame 50Symbol 1016 MovieClip
"trees"Frame 50Symbol 1018 MovieClip
"shadow"Frame 50Symbol 638 MovieClip
"tank1"Frame 50Symbol 104 MovieClip [redTank]
"tank3"Frame 50Symbol 104 MovieClip [redTank]
"tank4"Frame 50Symbol 104 MovieClip [redTank]
"demon1"Frame 50Symbol 1012 MovieClip
"demon2"Frame 50Symbol 1012 MovieClip
"demon3"Frame 50Symbol 1012 MovieClip
"demon4"Frame 50Symbol 1012 MovieClip
"demon5"Frame 50Symbol 1012 MovieClip
"tank5"Frame 50Symbol 104 MovieClip [redTank]
"demon6"Frame 50Symbol 1012 MovieClip
"demon7"Frame 50Symbol 1012 MovieClip
"demon8"Frame 50Symbol 1012 MovieClip
"bonus5"Frame 50Symbol 123 MovieClip [BonusIcon]
"bonus2"Frame 50Symbol 123 MovieClip [BonusIcon]
"bonus3"Frame 50Symbol 123 MovieClip [BonusIcon]
"beam"Frame 50Symbol 639 MovieClip
"ship"Frame 50Symbol 435 MovieClip
"energy"Frame 50Symbol 460 MovieClip
"peopleToGo"Frame 50Symbol 475 MovieClip
"boundingbox"Frame 50Symbol 647 MovieClip
"z2"Frame 50Symbol 649 MovieClip
"z1"Frame 50Symbol 651 MovieClip
"volumeClip"Frame 50Symbol 657 MovieClip
"sounds"Frame 50Symbol 664 MovieClip
"display"Frame 50Symbol 667 MovieClip
"flash"Frame 50Symbol 944 MovieClip
"emmitter"Symbol 85 MovieClip Frame 1Symbol 84 MovieClip
"cannon"Symbol 88 MovieClip Frame 1Symbol 85 MovieClip
"cannon"Symbol 104 MovieClip [redTank] Frame 1Symbol 85 MovieClip
"emmitter"Symbol 108 MovieClip Frame 1Symbol 84 MovieClip
"cannon"Symbol 111 MovieClip Frame 1Symbol 108 MovieClip
"cannon"Symbol 112 MovieClip [whiteTank] Frame 1Symbol 108 MovieClip
"emmitter"Symbol 114 MovieClip Frame 1Symbol 84 MovieClip
"cannon"Symbol 116 MovieClip [antiAir] Frame 1Symbol 114 MovieClip
"emmitter"Symbol 136 MovieClip Frame 1Symbol 84 MovieClip
"cannon"Symbol 139 MovieClip Frame 1Symbol 136 MovieClip
"cannon"Symbol 140 MovieClip [tank] Frame 1Symbol 136 MovieClip
"inside"Symbol 313 MovieClip Frame 1Symbol 308 MovieClip
"insideMan"Symbol 370 MovieClip Frame 2Symbol 299 MovieClip [MIB]
"inside"Symbol 435 MovieClip Frame 1Symbol 401 MovieClip
"explosion"Symbol 435 MovieClip Frame 1Symbol 422 MovieClip
"inside"Symbol 435 MovieClip Frame 2Symbol 434 MovieClip
"emmitter"Symbol 496 MovieClip Frame 1Symbol 84 MovieClip
"emitter1"Symbol 504 MovieClip Frame 9Symbol 84 MovieClip
"emitter2"Symbol 504 MovieClip Frame 9Symbol 84 MovieClip
"inside"Symbol 520 MovieClip Frame 115Symbol 401 MovieClip
"inside"Symbol 520 MovieClip Frame 281Symbol 435 MovieClip
"energy"Symbol 520 MovieClip Frame 301Symbol 460 MovieClip
"peopleToGo"Symbol 520 MovieClip Frame 301Symbol 475 MovieClip
"test"Symbol 520 MovieClip Frame 301Symbol 243 MovieClip [person2]
"test2"Symbol 520 MovieClip Frame 442Symbol 299 MovieClip [MIB]
"nextButton"Symbol 605 MovieClip Frame 20Symbol 364 MovieClip
"tutorial"Symbol 605 MovieClip Frame 20Symbol 520 MovieClip
"nextText"Symbol 605 MovieClip Frame 20Symbol 522 MovieClip
"name_txt"Symbol 605 MovieClip Frame 30Symbol 526 EditableText
"score_txt"Symbol 605 MovieClip Frame 30Symbol 527 EditableText
"sound1"Symbol 605 MovieClip Frame 40Symbol 571 MovieClip
"sound2"Symbol 605 MovieClip Frame 40Symbol 571 MovieClip
"sound3"Symbol 605 MovieClip Frame 40Symbol 571 MovieClip
"sound4"Symbol 605 MovieClip Frame 40Symbol 571 MovieClip
"sound5"Symbol 605 MovieClip Frame 40Symbol 571 MovieClip
"sound6"Symbol 605 MovieClip Frame 40Symbol 571 MovieClip
"sound7"Symbol 605 MovieClip Frame 40Symbol 571 MovieClip
"song1"Symbol 605 MovieClip Frame 40Symbol 571 MovieClip
"song2"Symbol 605 MovieClip Frame 40Symbol 571 MovieClip
"song3"Symbol 605 MovieClip Frame 40Symbol 571 MovieClip
"song4"Symbol 605 MovieClip Frame 40Symbol 571 MovieClip
"ship"Symbol 605 MovieClip Frame 40Symbol 571 MovieClip
"level"Symbol 605 MovieClip Frame 40Symbol 571 MovieClip
"points_txt"Symbol 605 MovieClip Frame 40Symbol 573 EditableText
"description_txt"Symbol 605 MovieClip Frame 40Symbol 587 EditableText
"title_txt"Symbol 605 MovieClip Frame 40Symbol 589 EditableText
"cost_txt"Symbol 605 MovieClip Frame 40Symbol 590 EditableText
"low"Symbol 605 MovieClip Frame 50Symbol 591 MovieClip
"med"Symbol 605 MovieClip Frame 50Symbol 591 MovieClip
"high"Symbol 605 MovieClip Frame 50Symbol 591 MovieClip
"musicOn"Symbol 605 MovieClip Frame 50Symbol 591 MovieClip
"musicOff"Symbol 605 MovieClip Frame 50Symbol 591 MovieClip
"soundsOn"Symbol 605 MovieClip Frame 50Symbol 591 MovieClip
"soundsOff"Symbol 605 MovieClip Frame 50Symbol 591 MovieClip
"hills"Symbol 606 MovieClip Frame 1Symbol 348 MovieClip
"bushes"Symbol 606 MovieClip Frame 1Symbol 350 MovieClip
"trees"Symbol 606 MovieClip Frame 1Symbol 357 MovieClip
"otherMenu"Symbol 606 MovieClip Frame 40Symbol 605 MovieClip
"beam"Symbol 639 MovieClip Frame 2Symbol 455 MovieClip
"points_txt"Symbol 666 MovieClip Frame 1Symbol 665 EditableText
"points"Symbol 667 MovieClip Frame 2Symbol 666 MovieClip
"points"Symbol 667 MovieClip Frame 33Symbol 666 MovieClip
"bushes"Symbol 836 MovieClip Frame 1Symbol 834 MovieClip
"bushes"Symbol 841 MovieClip Frame 1Symbol 836 MovieClip
"atombomb"Symbol 905 MovieClip Frame 1Symbol 904 MovieClip
"atombomb"Symbol 905 MovieClip Frame 1Symbol 904 MovieClip
"atombomb"Symbol 905 MovieClip Frame 1Symbol 904 MovieClip
"atombomb"Symbol 905 MovieClip Frame 1Symbol 904 MovieClip
"atombomb"Symbol 905 MovieClip Frame 1Symbol 904 MovieClip
"atombomb"Symbol 905 MovieClip Frame 1Symbol 904 MovieClip
"ship"Symbol 940 MovieClip Frame 1Symbol 434 MovieClip
"emitter1"Symbol 941 MovieClip Frame 2Symbol 84 MovieClip
"emitter1"Symbol 954 MovieClip Frame 1Symbol 84 MovieClip
"emitter"Symbol 975 MovieClip Frame 1Symbol 84 MovieClip
"emitter1"Symbol 977 MovieClip Frame 12Symbol 975 MovieClip
"emitter1"Symbol 1012 MovieClip Frame 14Symbol 975 MovieClip

Special Tags

ExportAssets (56)Timeline Frame 1Symbol 1 as "outtake7"
ExportAssets (56)Timeline Frame 1Symbol 2 as "outtake6"
ExportAssets (56)Timeline Frame 1Symbol 3 as "outtake5"
ExportAssets (56)Timeline Frame 1Symbol 4 as "unlock"
ExportAssets (56)Timeline Frame 1Symbol 5 as "swoosh2"
ExportAssets (56)Timeline Frame 1Symbol 6 as "swoosh"
ExportAssets (56)Timeline Frame 1Symbol 7 as "button_hit"
ExportAssets (56)Timeline Frame 1Symbol 8 as "nocando"
ExportAssets (56)Timeline Frame 1Symbol 9 as "outtake4"
ExportAssets (56)Timeline Frame 1Symbol 10 as "outtake3"
ExportAssets (56)Timeline Frame 1Symbol 11 as "outtake2"
ExportAssets (56)Timeline Frame 1Symbol 12 as "outtake1"
ExportAssets (56)Timeline Frame 1Symbol 13 as "night level"
ExportAssets (56)Timeline Frame 1Symbol 32 as "person5"
ExportAssets (56)Timeline Frame 1Symbol 50 as "person6"
ExportAssets (56)Timeline Frame 1Symbol 68 as "person3"
ExportAssets (56)Timeline Frame 1Symbol 71 as "truck"
ExportAssets (56)Timeline Frame 1Symbol 73 as "person0"
ExportAssets (56)Timeline Frame 1Symbol 76 as "bullet"
ExportAssets (56)Timeline Frame 1Symbol 104 as "redTank"
ExportAssets (56)Timeline Frame 1Symbol 112 as "whiteTank"
ExportAssets (56)Timeline Frame 1Symbol 116 as "antiAir"
ExportAssets (56)Timeline Frame 1Symbol 118 as "rock"
ExportAssets (56)Timeline Frame 1Symbol 123 as "BonusIcon"
ExportAssets (56)Timeline Frame 1Symbol 125 as "igloo"
ExportAssets (56)Timeline Frame 1Symbol 132 as "bullet ground"
ExportAssets (56)Timeline Frame 1Symbol 140 as "tank"
ExportAssets (56)Timeline Frame 1Symbol 147 as "bullet air"
ExportAssets (56)Timeline Frame 1Symbol 149 as "manTarget"
ExportAssets (56)Timeline Frame 1Symbol 165 as "Astronaut"
ExportAssets (56)Timeline Frame 1Symbol 182 as "eskimo"
ExportAssets (56)Timeline Frame 1Symbol 203 as "person4"
ExportAssets (56)Timeline Frame 1Symbol 222 as "person1"
ExportAssets (56)Timeline Frame 1Symbol 243 as "person2"
ExportAssets (56)Timeline Frame 1Symbol 261 as "ethan"
ExportAssets (56)Timeline Frame 1Symbol 279 as "Brian"
ExportAssets (56)Timeline Frame 1Symbol 299 as "MIB"
ExportAssets (56)Timeline Frame 1Symbol 1050 as "__Packages.SoundPlayer"
ExportAssets (56)Timeline Frame 1Symbol 1051 as "__Packages.Music"
ExportAssets (56)Timeline Frame 1Symbol 1052 as "__Packages.Tank"
ExportAssets (56)Timeline Frame 1Symbol 1053 as "__Packages.Bullet"
ExportAssets (56)Timeline Frame 1Symbol 1054 as "__Packages.BagunkScores"
ExportAssets (56)Timeline Frame 1Symbol 1055 as "__Packages.ScoreEncrypter"
ExportAssets (56)Timeline Frame 5Symbol 659 as "maleScream"
ExportAssets (56)Timeline Frame 5Symbol 660 as "explosion"
ExportAssets (56)Timeline Frame 5Symbol 661 as "maleEnjoy"
ExportAssets (56)Timeline Frame 5Symbol 662 as "camera"
ExportAssets (56)Timeline Frame 5Symbol 663 as "femaleEnjoy"
ExportAssets (56)Timeline Frame 5Symbol 675 as "city"
ExportAssets (56)Timeline Frame 17Symbol 783 as "bonus"
ExportAssets (56)Timeline Frame 20Symbol 808 as "forest"
ExportAssets (56)Timeline Frame 30Symbol 862 as "desert_rock"
ExportAssets (56)Timeline Frame 30Symbol 863 as "space"
ExportAssets (56)Timeline Frame 52Symbol 1021 as "mountains level"
ExportAssets (56)Timeline Frame 53Symbol 1022 as "moon level"
ExportAssets (56)Timeline Frame 54Symbol 1023 as "hell level"
ExportAssets (56)Timeline Frame 55Symbol 1024 as "heaven level"
ExportAssets (56)Timeline Frame 56Symbol 1025 as "forest level"
ExportAssets (56)Timeline Frame 57Symbol 1026 as "city level"
ExportAssets (56)Timeline Frame 59Symbol 1027 as "area 51 level"
ExportAssets (56)Timeline Frame 60Symbol 1028 as "arctic level"
ExportAssets (56)Timeline Frame 62Symbol 1029 as "farm"
ExportAssets (56)Timeline Frame 65Symbol 1030 as "titleMusic"
ExportAssets (56)Timeline Frame 66Symbol 1031 as "tutorial music"
ExportAssets (56)Timeline Frame 67Symbol 1032 as "unlock shop music"
ExportAssets (56)Timeline Frame 68Symbol 1033 as "bad1"
ExportAssets (56)Timeline Frame 69Symbol 1034 as "bad2"
ExportAssets (56)Timeline Frame 70Symbol 1035 as "bad3"
ExportAssets (56)Timeline Frame 71Symbol 1036 as "bad4"
ExportAssets (56)Timeline Frame 72Symbol 1037 as "bad5"
ExportAssets (56)Timeline Frame 73Symbol 1038 as "bad6"
ExportAssets (56)Timeline Frame 74Symbol 1039 as "good1"
ExportAssets (56)Timeline Frame 75Symbol 1040 as "good2"
ExportAssets (56)Timeline Frame 76Symbol 1041 as "good3"
ExportAssets (56)Timeline Frame 77Symbol 1042 as "good4"
ExportAssets (56)Timeline Frame 78Symbol 1043 as "good5"
ExportAssets (56)Timeline Frame 79Symbol 1044 as "rand1"
ExportAssets (56)Timeline Frame 80Symbol 1045 as "rand2"
ExportAssets (56)Timeline Frame 81Symbol 1046 as "rand3"
ExportAssets (56)Timeline Frame 82Symbol 1047 as "rand4"
ExportAssets (56)Timeline Frame 83Symbol 1048 as "desert level"
ExportAssets (56)Timeline Frame 86Symbol 1049 as "bonusSound"

Labels

"menuScreen"Frame 3
"title"Frame 3
"endGame"Frame 4
"submitScore"Frame 7
"loseLife"Frame 21
"levelText"Frame 22
"bufferAudio"Frame 51
"endBufferAudio"Frame 100
"idle"Symbol 32 MovieClip [person5] Frame 1
"spot"Symbol 32 MovieClip [person5] Frame 2
"beamed"Symbol 32 MovieClip [person5] Frame 3
"falling"Symbol 32 MovieClip [person5] Frame 6
"walk"Symbol 32 MovieClip [person5] Frame 7
"run"Symbol 32 MovieClip [person5] Frame 12
"collision"Symbol 32 MovieClip [person5] Frame 17
"idle"Symbol 50 MovieClip [person6] Frame 1
"spot"Symbol 50 MovieClip [person6] Frame 2
"beamed"Symbol 50 MovieClip [person6] Frame 3
"falling"Symbol 50 MovieClip [person6] Frame 6
"walk"Symbol 50 MovieClip [person6] Frame 7
"run"Symbol 50 MovieClip [person6] Frame 12
"collision"Symbol 50 MovieClip [person6] Frame 17
"idle"Symbol 68 MovieClip [person3] Frame 1
"spot"Symbol 68 MovieClip [person3] Frame 2
"beamed"Symbol 68 MovieClip [person3] Frame 3
"falling"Symbol 68 MovieClip [person3] Frame 6
"walk"Symbol 68 MovieClip [person3] Frame 7
"run"Symbol 68 MovieClip [person3] Frame 12
"collision"Symbol 68 MovieClip [person3] Frame 15
"idle"Symbol 71 MovieClip [truck] Frame 1
"beamed"Symbol 71 MovieClip [truck] Frame 2
"endbeam"Symbol 71 MovieClip [truck] Frame 41
"collision"Symbol 71 MovieClip [truck] Frame 42
"move"Symbol 80 MovieClip Frame 1
"idle"Symbol 104 MovieClip [redTank] Frame 1
"beamed"Symbol 104 MovieClip [redTank] Frame 5
"collision"Symbol 104 MovieClip [redTank] Frame 9
"move"Symbol 106 MovieClip Frame 1
"idle"Symbol 112 MovieClip [whiteTank] Frame 1
"beamed"Symbol 112 MovieClip [whiteTank] Frame 5
"collision"Symbol 112 MovieClip [whiteTank] Frame 9
"idle"Symbol 116 MovieClip [antiAir] Frame 1
"collision"Symbol 116 MovieClip [antiAir] Frame 3
"idle"Symbol 123 MovieClip [BonusIcon] Frame 1
"beamed"Symbol 123 MovieClip [BonusIcon] Frame 2
"collision"Symbol 123 MovieClip [BonusIcon] Frame 3
"move"Symbol 134 MovieClip Frame 1
"idle"Symbol 140 MovieClip [tank] Frame 1
"beamed"Symbol 140 MovieClip [tank] Frame 5
"collision"Symbol 140 MovieClip [tank] Frame 9
"idle"Symbol 165 MovieClip [Astronaut] Frame 1
"spot"Symbol 165 MovieClip [Astronaut] Frame 2
"beamed"Symbol 165 MovieClip [Astronaut] Frame 3
"falling"Symbol 165 MovieClip [Astronaut] Frame 6
"walk"Symbol 165 MovieClip [Astronaut] Frame 7
"run"Symbol 165 MovieClip [Astronaut] Frame 12
"collision"Symbol 165 MovieClip [Astronaut] Frame 17
"idle"Symbol 182 MovieClip [eskimo] Frame 1
"spot"Symbol 182 MovieClip [eskimo] Frame 2
"beamed"Symbol 182 MovieClip [eskimo] Frame 3
"falling"Symbol 182 MovieClip [eskimo] Frame 6
"walk"Symbol 182 MovieClip [eskimo] Frame 7
"run"Symbol 182 MovieClip [eskimo] Frame 12
"collision"Symbol 182 MovieClip [eskimo] Frame 17
"idle"Symbol 203 MovieClip [person4] Frame 1
"spot"Symbol 203 MovieClip [person4] Frame 2
"beamed"Symbol 203 MovieClip [person4] Frame 3
"falling"Symbol 203 MovieClip [person4] Frame 6
"walk"Symbol 203 MovieClip [person4] Frame 7
"run"Symbol 203 MovieClip [person4] Frame 12
"collision"Symbol 203 MovieClip [person4] Frame 17
"idle"Symbol 222 MovieClip [person1] Frame 1
"spot"Symbol 222 MovieClip [person1] Frame 2
"beamed"Symbol 222 MovieClip [person1] Frame 3
"falling"Symbol 222 MovieClip [person1] Frame 6
"walk"Symbol 222 MovieClip [person1] Frame 7
"run"Symbol 222 MovieClip [person1] Frame 12
"collision"Symbol 222 MovieClip [person1] Frame 17
"idle"Symbol 243 MovieClip [person2] Frame 1
"spot"Symbol 243 MovieClip [person2] Frame 2
"beamed"Symbol 243 MovieClip [person2] Frame 3
"falling"Symbol 243 MovieClip [person2] Frame 6
"walk"Symbol 243 MovieClip [person2] Frame 7
"run"Symbol 243 MovieClip [person2] Frame 12
"collision"Symbol 243 MovieClip [person2] Frame 18
"idle"Symbol 261 MovieClip [ethan] Frame 1
"spot"Symbol 261 MovieClip [ethan] Frame 2
"beamed"Symbol 261 MovieClip [ethan] Frame 3
"falling"Symbol 261 MovieClip [ethan] Frame 6
"walk"Symbol 261 MovieClip [ethan] Frame 7
"run"Symbol 261 MovieClip [ethan] Frame 12
"collision"Symbol 261 MovieClip [ethan] Frame 17
"idle"Symbol 279 MovieClip [Brian] Frame 1
"spot"Symbol 279 MovieClip [Brian] Frame 2
"beamed"Symbol 279 MovieClip [Brian] Frame 3
"falling"Symbol 279 MovieClip [Brian] Frame 6
"walk"Symbol 279 MovieClip [Brian] Frame 7
"run"Symbol 279 MovieClip [Brian] Frame 12
"collision"Symbol 279 MovieClip [Brian] Frame 17
"idle"Symbol 299 MovieClip [MIB] Frame 1
"spot"Symbol 299 MovieClip [MIB] Frame 2
"beamed"Symbol 299 MovieClip [MIB] Frame 26
"falling"Symbol 299 MovieClip [MIB] Frame 34
"walk"Symbol 299 MovieClip [MIB] Frame 35
"run"Symbol 299 MovieClip [MIB] Frame 40
"collision"Symbol 299 MovieClip [MIB] Frame 45
"flash"Symbol 364 MovieClip Frame 13
"closed"Symbol 370 MovieClip Frame 1
"open"Symbol 370 MovieClip Frame 2
"hide"Symbol 422 MovieClip Frame 1
"explode"Symbol 422 MovieClip Frame 2
"shock"Symbol 422 MovieClip Frame 31
"ship1"Symbol 435 MovieClip Frame 1
"ship2"Symbol 435 MovieClip Frame 2
"flying"Symbol 504 MovieClip Frame 1
"shoot"Symbol 504 MovieClip Frame 2
"tag0"Symbol 520 MovieClip Frame 1
"tag1"Symbol 520 MovieClip Frame 61
"tag2"Symbol 520 MovieClip Frame 106
"tag3"Symbol 520 MovieClip Frame 281
"tag4"Symbol 520 MovieClip Frame 301
"tag5"Symbol 520 MovieClip Frame 321
"tag6"Symbol 520 MovieClip Frame 442
"tag7"Symbol 520 MovieClip Frame 462
"tag8"Symbol 520 MovieClip Frame 483
"tag9"Symbol 520 MovieClip Frame 504
"tag10"Symbol 520 MovieClip Frame 525
"buy"Symbol 571 MovieClip Frame 1
"purchased"Symbol 571 MovieClip Frame 10
"finished1"Symbol 571 MovieClip Frame 23
"purchasedShip"Symbol 571 MovieClip Frame 24
"finished2"Symbol 571 MovieClip Frame 37
"finished3"Symbol 571 MovieClip Frame 38
"purchasedLevel"Symbol 571 MovieClip Frame 39
"finished4"Symbol 571 MovieClip Frame 52
"off"Symbol 591 MovieClip Frame 1
"on"Symbol 591 MovieClip Frame 2
"main"Symbol 605 MovieClip Frame 1
"credits"Symbol 605 MovieClip Frame 10
"how"Symbol 605 MovieClip Frame 20
"scores"Symbol 605 MovieClip Frame 30
"bonus"Symbol 605 MovieClip Frame 40
"settings"Symbol 605 MovieClip Frame 50
"stopMain"Symbol 606 MovieClip Frame 69
"slideOut"Symbol 606 MovieClip Frame 70
"volumeOn"Symbol 657 MovieClip Frame 1
"volumeOff"Symbol 657 MovieClip Frame 2
"hide"Symbol 667 MovieClip Frame 1
"points"Symbol 667 MovieClip Frame 2
"people"Symbol 667 MovieClip Frame 33
"hide"Symbol 674 MovieClip Frame 1
"show"Symbol 674 MovieClip Frame 2
"beamed"Symbol 698 MovieClip Frame 1
"falling"Symbol 700 MovieClip Frame 1
"idle"Symbol 862 MovieClip [desert_rock] Frame 1
"beamed"Symbol 862 MovieClip [desert_rock] Frame 2
"collision"Symbol 862 MovieClip [desert_rock] Frame 31
"off"Symbol 904 MovieClip Frame 1
"start explode"Symbol 904 MovieClip Frame 2
"explode"Symbol 904 MovieClip Frame 1000
"flying"Symbol 941 MovieClip Frame 1
"shoot"Symbol 941 MovieClip Frame 2
"off"Symbol 944 MovieClip Frame 1
"flash"Symbol 944 MovieClip Frame 2
"flying"Symbol 954 MovieClip Frame 1
"shoot"Symbol 954 MovieClip Frame 2
"flying"Symbol 977 MovieClip Frame 1
"shoot"Symbol 977 MovieClip Frame 2
"flying"Symbol 1012 MovieClip Frame 1
"shoot"Symbol 1012 MovieClip Frame 2

Dynamic Text Variables

_root.loadingVarsSymbol 306 EditableText"127kb / 3000 kb 93%"
_root.finalScoreSymbol 607 EditableText"56"
_root.youLoseSymbol 608 EditableText"Not Too Shabby!"
_root.livesSymbol 645 EditableText"0"
_root.timeTextSymbol 652 EditableText"1:30:00"
_root.livesSymbol 711 EditableText"0"
_root.timeTextSymbol 712 EditableText"1:30:00"
_root.livesSymbol 759 EditableText"0"
_root.timeTextSymbol 760 EditableText"1:30:00"
_root.livesSymbol 781 EditableText"0"
_root.timeTextSymbol 782 EditableText"1:30:00"
_root.livesSymbol 806 EditableText"0"
_root.timeTextSymbol 807 EditableText"1:30:00"
_root.textSymbol 810 EditableText"Whoops! Lose something?"
_root.currentLevelSymbol 812 EditableText"0"
_root.livesSymbol 825 EditableText"0"
_root.timeTextSymbol 826 EditableText"1:30:00"
_root.livesSymbol 845 EditableText"0"
_root.timeTextSymbol 846 EditableText"1:30:00"
_root.livesSymbol 942 EditableText"0"
_root.timeTextSymbol 943 EditableText"1:30:00"
_root.livesSymbol 947 EditableText"0"
_root.timeTextSymbol 948 EditableText"1:30:00"
_root.livesSymbol 978 EditableText"0"
_root.timeTextSymbol 979 EditableText"1:30:00"
_root.livesSymbol 1019 EditableText"0"
_root.timeTextSymbol 1020 EditableText"1:30:00"




http://swfchan.com/3/12292/info.shtml
Created: 6/6 -2019 05:32:49 Last modified: 6/6 -2019 05:32:49 Server time: 15/05 -2024 00:40:37