[Tools][Expand/Collapse All]Note that automatic extraction of ActionScript 3 is still pretty much unsupported by swfchan. AS1/AS2 works okay most of the time.Frame 1 (598 B)
stop();
_global.GLOBAL_URL = url;
_global.GLOBAL_GAME = game;
_global.GLOBAL_SCORESURL = scoresurl;
_global.initialVolume = 80;
_level0.Mtextmenu.gotoAndStop(4);
_level0.Bhighscores.onPress = function () {
getURL (_global.GLOBAL_SCORESURL, "_blank");
};
_level0.Babout.onPress = function () {
_level0.Mtextmenu.gotoAndStop(3);
};
_level0.Binfo.onPress = function () {
_level0.Mtextmenu.gotoAndStop(2);
};
_level0.Bplay.onPress = function () {
gotoAndStop (2);
};
if (!mySoundObj) {
_global.mySoundObj = new Sound();
_global.mySoundObj.setVolume(_global.initialVolume);
}
Frame 2 (135 B)
stop();
if (!myGameEngine) {
var myGameEngine = new GameEngine();
_global.__rootObject = myGameEngine;
}
myGameEngine.FcInit();
Frame 3 (558 B)
function fc_disablebuttons() {
_level0.Msendscore.Bsendscore1.enabled = false;
_level0.Bplay.enabled = false;
}
function fc_enablebuttons(entry_scorebutton) {
if (entry_scorebutton != false) {
_level0.Msendscore.Bsendscore1.enabled = true;
} else {
_level0.Msendscore.Bsendscore1._alpha = 60;
}
_level0.Bplay.enabled = true;
}
stop();
_level0.Mtextmenu.gotoAndStop("framegameover");
var myScore1 = myGameEngine.__playerPoints;
_level0.Bplay.onPress = function () {
gotoAndStop (2);
};
delete myGameEngine;
_global.__rootObject;
Frame 4 (557 B)
function fc_disablebuttons() {
_level0.Msendscore.Bsendscore1.enabled = false;
_level0.Bplay.enabled = false;
}
function fc_enablebuttons(entry_scorebutton) {
if (entry_scorebutton != false) {
_level0.Msendscore.Bsendscore1.enabled = true;
} else {
_level0.Msendscore.Bsendscore1._alpha = 60;
}
_level0.Bplay.enabled = true;
}
stop();
_level0.Mtextmenu.gotoAndStop("framegamewon");
var myScore1 = myGameEngine.__playerPoints;
_level0.Bplay.onPress = function () {
gotoAndStop (2);
};
delete myGameEngine;
_global.__rootObject;
Frame 5 (125 B)
stop();
_level0.Mtextmenu.gotoAndStop("framenextlevel");
_level0.Bnextlevel.onPress = function () {
gotoAndStop (2);
};
Symbol 46 MovieClip Frame 1 (8 B)
stop();
Symbol 46 MovieClip Frame 100 (8 B)
stop();
Symbol 81 MovieClip Frame 45 (17 B)
gotoAndPlay (1);
Symbol 82 MovieClip Frame 34 (17 B)
gotoAndPlay (1);
Symbol 83 MovieClip [attachMovie_computercar] Frame 1 (8 B)
stop();
Symbol 103 MovieClip Frame 1 (8 B)
stop();
Symbol 103 MovieClip Frame 30 (17 B)
gotoAndStop (1);
Symbol 119 MovieClip Frame 1 (8 B)
stop();
Symbol 119 MovieClip Frame 30 (17 B)
gotoAndStop (1);
Symbol 123 MovieClip Frame 1 (8 B)
stop();
Symbol 123 MovieClip Frame 30 (17 B)
gotoAndStop (1);
Symbol 146 MovieClip Frame 1 (8 B)
stop();
Symbol 146 MovieClip Frame 30 (17 B)
gotoAndStop (1);
Symbol 167 MovieClip Frame 1 (8 B)
stop();
Symbol 167 MovieClip Frame 19 (17 B)
gotoAndStop (1);
Symbol 191 MovieClip Frame 1 (8 B)
stop();
Symbol 191 MovieClip Frame 30 (17 B)
gotoAndStop (1);
Symbol 205 MovieClip Frame 1 (8 B)
stop();
Symbol 205 MovieClip Frame 30 (17 B)
gotoAndStop (1);
Symbol 231 MovieClip Frame 1 (8 B)
stop();
Symbol 231 MovieClip Frame 23 (17 B)
gotoAndStop (1);
Symbol 232 MovieClip Frame 1 (8 B)
stop();
Symbol 232 MovieClip Frame 2 (8 B)
stop();
Symbol 232 MovieClip Frame 3 (8 B)
stop();
Symbol 232 MovieClip Frame 4 (8 B)
stop();
Symbol 232 MovieClip Frame 5 (8 B)
stop();
Symbol 232 MovieClip Frame 6 (8 B)
stop();
Symbol 232 MovieClip Frame 7 (8 B)
stop();
Symbol 232 MovieClip Frame 8 (8 B)
stop();
Symbol 232 MovieClip Frame 9 (8 B)
stop();
Symbol 233 MovieClip [attachMovie_playercar] Frame 1 (8 B)
stop();
Symbol 233 MovieClip [attachMovie_playercar] Frame 2 (8 B)
stop();
Symbol 236 MovieClip Frame 34 (8 B)
stop();
Symbol 237 MovieClip [attachMovie_computercar3] Frame 1 (8 B)
stop();
Symbol 240 MovieClip [attachMovie_computercar1] Frame 1 (8 B)
stop();
Symbol 243 MovieClip [attachMovie_computercar2] Frame 1 (8 B)
stop();
Symbol 258 MovieClip Frame 1 (8 B)
stop();
Symbol 258 MovieClip Frame 100 (8 B)
stop();
Symbol 264 MovieClip Frame 1 (8 B)
stop();
Symbol 269 MovieClip Frame 1 (8 B)
stop();
Symbol 269 MovieClip Frame 2 (8 B)
stop();
Symbol 274 MovieClip [attachMovie_textpoints] Frame 65 (24 B)
this.removeMovieClip();
Symbol 278 MovieClip [attachMovie_briefing] Frame 140 (24 B)
this.removeMovieClip();
Symbol 284 Button (66 B)
on (press) {
getURL ("http://www.funflashgames.com", "_blank");
}
Symbol 289 MovieClip Frame 1 (8 B)
stop();
Symbol 309 Button (68 B)
on (release) {
getURL ("http://www.funflashgames.com", "_blank");
}
Symbol 312 Button (68 B)
on (release) {
getURL ("http://www.funflashgames.com", "_blank");
}
Symbol 315 Button (90 B)
on (release) {
getURL ("http://www.funflashgames.com/pages/FreeContent.htm", "_blank");
}
Symbol 353 MovieClip [__Packages.GameEngine] Frame 0 (25.28 KiB) ● ● ●
class GameEngine
{
var __playerMovie, __playerMovieCar, __playerWeapon, __mapsSpeed, __playerSpeedX, __gameMODE, __playerWeaponHitArea, __myBgSoundObj, __myEngineSoundObj, __menuMovie, __playerDamageValue, __signalGameOver, __signalGameWon, __signalLevelCompleted, __playerDead, __computerBossMovie, __computerBossObj, __id2, __id1;
function GameEngine () {
FcUpdateLifes(Get_playerLifesInitial());
}
function Get_mapsArrayLength() {
return(__mapsArray.length);
}
function Get_playerMovie() {
return(__playerMovie);
}
function Get_playerMovieCar() {
return(__playerMovieCar);
}
function Get_playerWeapon() {
return(__playerWeapon);
}
function Get_mapsSpeed() {
if (__mapsSpeed < 0) {
__mapsSpeed = 0;
}
return(__mapsSpeed);
}
function Get_mapsSpeedMin() {
return(__mapsSpeedMin);
}
function Get_mapsSpeedMax() {
return(__mapsSpeedMax);
}
function Get_mapsSpeedIncrement() {
return(__mapsSpeedIncrement);
}
function Get_playerSpeedXFactor() {
return(__playerSpeedX);
}
function Get_playerSpeedX() {
__playerSpeedX = __playerSpeedXFactor * __mapsSpeed;
return(__playerSpeedX);
}
function Get_playerSpeedXCollisionMove() {
__playerSpeedX = __playerSpeedXFactor * __mapsSpeed;
if (__playerSpeedX == 0) {
return(2);
}
return(__playerSpeedX);
}
function Get_playerSpeedY() {
return(__playerSpeedY);
}
function Get_maxRotation() {
return(__maxRotation);
}
function Get_rotationAngle() {
return(__rotationAngle);
}
function Get_mapsTotalHeight() {
return(__mapsTotalHeight);
}
function Get_computersInitialNumber() {
return(__computersInitialNumber);
}
function Get_computerSpeedX() {
return(__computerSpeedX);
}
function Get_computerObjLength() {
return(__computerObj.length);
}
function Get_computerSpeedYMin() {
return(__computerSpeedYMin);
}
function Get_computerSpeedYMax() {
return(__computerSpeedYMax);
}
function Get_gameLevel() {
return(__gameLevel);
}
function Get_gameMaxLevels() {
return(__gameMaxLevels);
}
function Get_gameMODE() {
return(__gameMODE);
}
function Get_minFireInterval() {
return(__minFireInterval);
}
function Get_lastFireInterval() {
return(__lastFireInterval);
}
function Get_fireSpeed() {
return(__fireSpeed);
}
function Get_playerWeaponHitArea() {
return(__playerWeaponHitArea);
}
function Get_myBgSoundObj() {
return(__myBgSoundObj);
}
function Get_myEngineSoundObj() {
return(__myEngineSoundObj);
}
function Get_menuMovie() {
return(__menuMovie);
}
function Get_playerDamageValue() {
return(Math.floor(__playerDamageValue));
}
function Get_playerDamageValueMin() {
return(__playerDamageValueMin);
}
function Get_playerDamageValueMax() {
return(__playerDamageValueMax);
}
function Get_playerLifes() {
if (__playerLifes < 0) {
__playerLifes = 0;
}
return(__playerLifes);
}
function Get_playerLifesInitial() {
return(__playerLifesInitial);
}
function Get_playerPoints() {
if (__playerPoints < 0) {
__playerPoints = 0;
}
return(__playerPoints);
}
function Get_signalGameOver() {
return(__signalGameOver);
}
function Get_signalGameWon() {
return(__signalGameWon);
}
function Get_signalLevelCompleted() {
return(__signalLevelCompleted);
}
function Get_playerDead() {
return(__playerDead);
}
function Set_playerMovie(entry_value) {
__playerMovie = entry_value;
}
function Set_playerMovieCar(entry_value) {
__playerMovieCar = entry_value;
}
function Set_mapsSpeed(entry_value) {
__mapsSpeed = entry_value;
}
function Set_mapsSpeedMin(entry_value) {
__mapsSpeedMin = entry_value;
}
function Set_mapsSpeedMax(entry_value) {
__mapsSpeedMax = entry_value;
}
function Set_mapsSpeedIncrement(entry_value) {
__mapsSpeedIncrement = entry_value;
}
function Set_mapsTotalHeight(entry_value) {
__mapsTotalHeight = entry_value;
}
function Set_gameLevel(entry_value) {
__gameLevel = entry_value;
}
function Set_gameMODE(entry_value) {
__gameMODE = entry_value;
}
function Set_playerWeapon(entry_value) {
__playerWeapon = entry_value;
}
function Set_lastFireInterval(entry_value) {
__lastFireInterval = entry_value;
}
function Set_playerWeaponHitArea(entry_value) {
__playerWeaponHitArea = entry_value;
}
function Set_myBgSoundObj(entry_value) {
__myBgSoundObj = entry_value;
}
function Set_myEngineSoundObj(entry_value) {
__myEngineSoundObj = entry_value;
}
function Set_menuMovie(entry_value) {
__menuMovie = entry_value;
}
function Set_playerDamageValue(entry_value) {
__playerDamageValue = entry_value;
if (__playerDamageValue >= __playerDamageValueMax) {
__playerDamageValue = __playerDamageValueMax;
}
}
function Set_playerLifes(entry_value) {
__playerLifes = __playerLifes + entry_value;
}
function Set_playerPoints(entry_value) {
__playerPoints = __playerPoints + entry_value;
}
function Set_signalGameOver(entry_value) {
__signalGameOver = entry_value;
}
function Set_signalGameWon(entry_value) {
__signalGameWon = entry_value;
}
function Set_signalLevelCompleted(entry_value) {
__signalLevelCompleted = entry_value;
}
function Set_playerDead(entry_value) {
__playerDead = entry_value;
}
function Check_signalGameOver() {
if (Get_signalGameOver() == true) {
FcEndGame();
Set_signalGameOver(false);
Set_gameMODE("gameover");
_level0.gotoAndStop("gameover");
}
}
function Check_signalGameWon() {
if (Get_signalGameWon() == true) {
FcEndGame();
Set_signalGameWon(false);
Set_gameMODE("gamewon");
_level0.gotoAndStop("gamewon");
}
}
function Check_signalLevelCompleted() {
if (Get_signalLevelCompleted() == true) {
Set_signalLevelCompleted(false);
if (!FcTestGameWon()) {
FcRemoveUnwantedContent();
Set_gameMODE("nextlevel");
_level0.gotoAndStop("nextlevel");
} else {
Set_signalGameWon(true);
}
}
}
function FcInit() {
Set_gameMODE("game");
FcOnEnterFrame();
FcPositionMap();
FcPositionComputer();
FcPositionPlayer();
FcPositionMenu();
FcInitPoints();
Set_mapsSpeed(Get_mapsSpeedMin());
FcUpdateLifes(0);
FcUpdateLevel();
FcTargetSounds();
}
function FcMoveMaps() {
var _local2 = 0;
while (_local2 < Get_mapsArrayLength()) {
if (_local2 == (Get_mapsArrayLength() - 1)) {
var _local3 = 0;
} else {
var _local3 = _local2 + 1;
}
__mapsArray[_local2]._y = __mapsArray[_local2]._y + Get_mapsSpeed();
if (__mapsArray[_local2]._y > 0) {
__mapsArray[_local3]._y = __mapsArray[_local2]._y - __mapsArray[_local2]._height;
}
_local2++;
}
}
function FcDetectKeys() {
var _local3 = Key.isDown(37);
var _local2 = Key.isDown(39);
var _local5 = Key.isDown(38);
var _local4 = Key.isDown(40);
var _local6 = Key.isDown(32);
if (_local5) {
FcControlVolume(Get_myEngineSoundObj(), 100);
if (Get_mapsSpeed() < Get_mapsSpeedMax()) {
Set_mapsSpeed(Get_mapsSpeed() + Get_mapsSpeedIncrement());
Get_playerMovie()._y = Get_playerMovie()._y - Get_playerSpeedY();
} else {
Set_mapsSpeed(Get_mapsSpeedMax());
}
} else if (_local4) {
if (Get_mapsSpeed() > Get_mapsSpeedMin()) {
Set_mapsSpeed(Get_mapsSpeed() - Get_mapsSpeedIncrement());
Get_playerMovie()._y = Get_playerMovie()._y + Get_playerSpeedY();
} else {
Set_mapsSpeed(Get_mapsSpeedMin());
FcControlVolume(Get_myEngineSoundObj(), 0);
}
}
FcTestCollisions();
if (_local3) {
Get_playerMovie()._x = Get_playerMovie()._x - Get_playerSpeedX();
FcRotatePlayer(-Get_rotationAngle());
} else if (_local2) {
Get_playerMovie()._x = Get_playerMovie()._x + Get_playerSpeedX();
FcRotatePlayer(Get_rotationAngle());
} else if ((!_local3) && (!_local2)) {
FcRotatePlayer(0);
}
if (_local6) {
FcHit();
}
}
function FcRotatePlayer(entry_value) {
var _local2 = Get_playerMovie()._rotation;
if (((entry_value > 0) && (_local2 < Get_maxRotation())) && (Get_mapsSpeed() > 0)) {
if (_local2 < 0) {
Get_playerMovie()._rotation = 0;
}
Get_playerMovie()._rotation = Get_playerMovie()._rotation + entry_value;
} else if (((entry_value < 0) && (_local2 > (-Get_maxRotation()))) && (Get_mapsSpeed() > 0)) {
if (_local2 > 0) {
Get_playerMovie()._rotation = 0;
}
Get_playerMovie()._rotation = Get_playerMovie()._rotation + entry_value;
} else if ((entry_value == 0) && (Get_mapsSpeed() > 0)) {
if (_local2 < (-Get_rotationAngle())) {
Get_playerMovie()._rotation = Get_playerMovie()._rotation + (2 * Get_rotationAngle());
} else if ((_local2 > (-Get_rotationAngle())) && (_local2 < 0)) {
Get_playerMovie()._rotation = 0;
} else if (Get_playerMovie()._rotation > Get_rotationAngle()) {
Get_playerMovie()._rotation = Get_playerMovie()._rotation - (2 * Get_rotationAngle());
} else if ((_local2 < (-Get_rotationAngle())) && (_local2 > 0)) {
Get_playerMovie()._rotation = 0;
}
}
}
function FcOnEnterFrame() {
var objReference = this;
_level0.onEnterFrame = function () {
objReference.FcMoveMaps();
if (objReference.Get_playerDead() == false) {
objReference.FcDetectKeys();
}
objReference.FcComputersBrain();
objReference.FcTestWeaponHit();
objReference.watch("__signalGameOver", _global.__rootObject.Check_signalGameOver());
objReference.watch("__signalGameWon", _global.__rootObject.Check_signalGameWon());
objReference.watch("__signalLevelCompleted", _global.__rootObject.Check_signalLevelCompleted());
};
}
function FcTestCollisions() {
var _local4 = 0;
while (_local4 < Get_mapsArrayLength()) {
var _local7 = {x:Get_playerMovie().Mhit1._x, y:Get_playerMovie().Mhit1._y};
Get_playerMovie().localToGlobal(_local7);
var _local5 = {x:Get_playerMovie().Mhit2._x, y:Get_playerMovie().Mhit2._y};
Get_playerMovie().localToGlobal(_local5);
if (__mapsArray[_local4].Mmask.hitTest(_local7.x, _local7.y, true)) {
FcAttachPlaySound(_global.mySoundObj, "attachSound_hit", 0, 1);
FcRotatePlayer(0);
Get_playerMovie()._x = Get_playerMovie()._x + (4 * Get_playerSpeedX());
FcAssignDamage(FcCalculateDamagePlayer());
} else if (__mapsArray[_local4].Mmask.hitTest(_local5.x, _local5.y, true)) {
FcAttachPlaySound(_global.mySoundObj, "attachSound_hit", 0, 1);
FcRotatePlayer(0);
Get_playerMovie()._x = Get_playerMovie()._x - (4 * Get_playerSpeedX());
FcAssignDamage(FcCalculateDamagePlayer());
}
_local4++;
}
var _local3 = 1;
while (_local3 < Get_computerObjLength()) {
if (Get_playerMovieCar().hitTest(__computerMovie[_local3].Mmaskv1) && (__computerObj[_local3].Get_computerDead() != true)) {
FcAttachPlaySound(_global.mySoundObj, "attachSound_hit", 0, 1);
FcRotatePlayer(0);
Get_playerMovie()._x = Get_playerMovie()._x - (4 * Get_playerSpeedXCollisionMove());
FcAssignDamage(FcCalculateDamagePlayer());
__computerObj[_local3].Set_xTempPosition(__computerObj[_local3].Get_xTempPosition() + (2 * __computerObj[_local3].Get_xSpeed()));
__computerMovie[_local3]._x = __computerObj[_local3].Get_xTempPosition();
__computerObj[_local3].FcAssignDamage(FcCalculateDamageComputer());
} else if (Get_playerMovieCar().hitTest(__computerMovie[_local3].Mmaskv2) && (__computerObj[_local3].Get_computerDead() != true)) {
FcAttachPlaySound(_global.mySoundObj, "attachSound_hit", 0, 1);
FcRotatePlayer(0);
Get_playerMovie()._x = Get_playerMovie()._x + (4 * Get_playerSpeedXCollisionMove());
FcAssignDamage(FcCalculateDamagePlayer());
__computerObj[_local3].Set_xTempPosition(__computerObj[_local3].Get_xTempPosition() - (2 * __computerObj[_local3].Get_xSpeed()));
__computerMovie[_local3]._x = __computerObj[_local3].Get_xTempPosition();
__computerObj[_local3].FcAssignDamage(FcCalculateDamageComputer());
}
_local3++;
}
if (Get_playerMovieCar().hitTest(__computerBossMovie.Mmaskv1) && (__computerBossObj.Get_computerDead() != true)) {
FcAttachPlaySound(_global.mySoundObj, "attachSound_hit", 0, 1);
FcRotatePlayer(0);
Get_playerMovie()._x = Get_playerMovie()._x - (4 * Get_playerSpeedXCollisionMove());
FcAssignDamage(FcCalculateDamagePlayer());
__computerBossObj.Set_xTempPosition(__computerBossObj.Get_xTempPosition() + (2 * __computerBossObj.Get_xSpeed()));
__computerBossMovie._x = __computerBossObj.Get_xTempPosition();
__computerBossObj.FcAssignDamage(FcCalculateDamageComputerBoss());
} else if (Get_playerMovieCar().hitTest(__computerBossMovie.Mmaskv2) && (__computerBossObj.Get_computerDead() != true)) {
FcAttachPlaySound(_global.mySoundObj, "attachSound_hit", 0, 1);
FcRotatePlayer(0);
Get_playerMovie()._x = Get_playerMovie()._x + (4 * Get_playerSpeedXCollisionMove());
FcAssignDamage(FcCalculateDamagePlayer());
__computerBossObj.Set_xTempPosition(__computerBossObj.Get_xTempPosition() - (2 * __computerBossObj.Get_xSpeed()));
__computerBossMovie._x = __computerBossObj.Get_xTempPosition();
__computerBossObj.FcAssignDamage(FcCalculateDamageComputerBoss());
}
var _local6 = 0;
while (_local6 < Get_mapsArrayLength()) {
if (Get_playerMovieCar().hitTest(__mapsArray[_local6].Moil1)) {
if (Get_mapsSpeed() > 2) {
Set_mapsSpeed(Get_mapsSpeed() - Get_mapsSpeedIncrement());
Get_playerMovie()._y = Get_playerMovie()._y + Get_playerSpeedY();
if (Get_mapsSpeed() > 2) {
Set_mapsSpeed(Get_mapsSpeed() - Get_mapsSpeedIncrement());
Get_playerMovie()._y = Get_playerMovie()._y + Get_playerSpeedY();
if (Get_mapsSpeed() > 2) {
Set_mapsSpeed(Get_mapsSpeed() - Get_mapsSpeedIncrement());
Get_playerMovie()._y = Get_playerMovie()._y + Get_playerSpeedY();
}
}
}
}
_local6++;
}
}
function FcPositionPlayer() {
Set_playerDead(false);
FcUpdateDamage(Get_playerDamageValueMin());
var myPlayerMovie = _level0.attachMovie("attachMovie_playercar", "NEWattachMovie_playercar", _level0.getNextHighestDepth());
Set_playerMovie(myPlayerMovie);
Set_playerMovieCar(myPlayerMovie.Mcar);
Get_playerMovie()._x = (Stage.width / 2) + Get_playerMovie()._width;
Get_playerMovie()._y = Stage.height - Get_playerMovieCar()._height;
myPlayerMovie.Mweapons.gotoAndStop(Get_gameLevel());
Set_playerWeapon(eval ("myPlayerMovie.Mweapons.Mw" + Get_gameLevel()));
Set_playerWeaponHitArea(undefined);
}
function FcRemovePlayer() {
Get_playerMovie().removeMovieClip();
}
function FcPositionComputer() {
var _local2 = 1;
while (_local2 <= Get_computersInitialNumber()) {
__computerObj[_local2] = new GameEngineComputer(this, ("COMPUTER" + _local2) + "attachMovie", Stage.width / 2, (-Stage.height) - (100 * _local2));
__computerMovie[_local2] = __computerObj[_local2].FcInitComputer("attachMovie_computercar" + _local2, _level0.getNextHighestDepth(), Get_computerSpeedX(), FcGenerateRandom(Get_computerSpeedYMin(), Get_computerSpeedYMax()));
_local2++;
}
__computerBossObj = new GameEngineComputerBoss(this, "NEWattachMovie_computercar", Stage.width / 3, (-Stage.height) - 100);
__computerBossMovie = __computerBossObj.FcInitComputer("attachMovie_computercar", _level0.getNextHighestDepth(), Get_computerSpeedX(), Get_computerSpeedYMax() - 1);
}
function FcRemoveComputer() {
var _local2 = Get_computersInitialNumber();
while (_local2 >= 1) {
__computerObj.splice(_local2, 1);
__computerMovie[_local2].removeMovieClip();
_local2--;
}
__computerBossMovie.removeMovieClip();
}
function FcPositionMap() {
Set_mapsTotalHeight(0);
var _local3 = 1;
while (_local3 <= 5) {
var _local2 = _level0.attachMovie("attachMovie_road" + _local3, "NEWattachMovie_road" + _local3, _level0.getNextHighestDepth());
_local2._x = 0;
_local2._y = -Get_mapsTotalHeight();
_local2.cacheAsBitmap = true;
Set_mapsTotalHeight(Get_mapsTotalHeight() + _local2._height);
__mapsArray.push(_local2);
_local3++;
}
}
function FcRemoveMap() {
var _local2 = 5;
while (_local2 >= 0) {
__mapsArray[_local2].removeMovieClip();
__mapsArray.splice(_local2, 1);
_local2--;
}
}
function FcPositionMenu() {
FcBriefing();
var _local2 = _level0.attachMovie("attachMovie_gamemenu", "NEWattachMovie_gamemenu", _level0.getNextHighestDepth());
Set_menuMovie(_local2);
Get_menuMovie()._x = 0;
Get_menuMovie()._y = 0;
}
function FcRemoveMenu() {
Get_menuMovie().removeMovieClip();
}
function FcComputersBrain() {
var _local2 = 1;
while (_local2 < Get_computerObjLength()) {
__computerObj[_local2].FcMoveComputer(Get_mapsSpeed());
_local2++;
}
var _local3 = 0;
while (_local3 <= 1) {
__computerBossObj.FcMoveComputer(Get_mapsSpeed());
__computerBossObj.FcAdaptSpeed();
_local3++;
}
}
function FcGenerateRandom(entry_start, entry_end) {
var _local1 = Math.floor(Math.random() * ((entry_end - entry_start) + 1)) + entry_start;
return(_local1);
}
function FcCalculateDamageComputer() {
var _local2 = Math.floor(2 * Get_mapsSpeed());
return(_local2);
}
function FcCalculateDamageComputerBoss() {
var _local2 = Math.floor(Get_mapsSpeed());
return(_local2);
}
function FcCalculateDamagePlayer() {
var _local2 = Math.floor(Get_mapsSpeed());
return(_local2);
}
function FcAssignDamage(entry_damageValue) {
if ((Get_playerDamageValue() >= Get_playerDamageValueMax()) && (Get_playerDead() == false)) {
Set_playerDead(true);
FcAttachPlaySound(_global.mySoundObj, "attachSound_explode2", 0, 1);
FcUpdateLifes(-1);
Get_playerMovie().gotoAndStop(2);
__id2 = setInterval(this, "go2", 250);
} else if (Get_playerDamageValue() < Get_playerDamageValueMax()) {
FcUpdateDamage(Get_playerDamageValue() + entry_damageValue);
}
}
function go2() {
var _local2 = Get_mapsSpeed();
while (_local2 >= Get_mapsSpeedMin()) {
Set_mapsSpeed(Get_mapsSpeed() - Get_mapsSpeedIncrement());
if (Get_mapsSpeed() == 0) {
FcTestGameOver();
FcRemovePlayer();
FcPositionPlayer();
clearInterval(__id2);
}
_local2--;
}
}
function FcHit() {
var _local5 = getTimer();
if (__playerWeaponType[Get_gameLevel()] == "hit") {
Get_playerWeapon().play();
if (!Get_playerWeaponHitArea()) {
Set_playerWeaponHitArea(Get_playerWeapon().Mhitarea);
}
Set_lastFireInterval(getTimer());
} else if (__playerWeaponType[Get_gameLevel()] == "fire") {
if ((!_level0.NEWattachMovie_fire) && (FcCheckMinInterval(Get_lastFireInterval(), Get_minFireInterval(), _local5))) {
FcAttachPlaySound(_global.mySoundObj, "attachSound_weapon" + Get_gameLevel(), 0, 1);
Get_playerWeapon().play();
Set_lastFireInterval(getTimer());
var _local4 = _level0.attachMovie("attachMovie_fire" + Get_gameLevel(), "NEWattachMovie_fire", _level0.getNextHighestDepth());
var _local3 = {x:Get_playerWeapon()._x, y:Get_playerWeapon()._y};
Get_playerMovie().localToGlobal(_local3);
_local4._x = _local3.x;
_local4._y = _local3.y;
__id1 = setInterval(this, "go1", 10, _local4);
if (!Get_playerWeaponHitArea()) {
Set_playerWeaponHitArea(_level0.NEWattachMovie_fire);
}
}
}
}
function FcTestWeaponHit() {
if (Get_playerWeaponHitArea().hitTest(__computerBossMovie) && (__computerBossObj.Get_computerDead() != true)) {
if (__playerWeaponType[Get_gameLevel()] == "fire") {
clearInterval(__id1);
Get_playerWeaponHitArea().removeMovieClip();
}
__computerBossObj.FcAssignDamage(FcCalculateDamageComputerBoss());
}
FcTestLevelCompleted();
var _local2 = 1;
while (_local2 < Get_computerObjLength()) {
if (Get_playerWeaponHitArea().hitTest(__computerMovie[_local2]) && (__computerObj.Get_computerDead() != true)) {
if (__playerWeaponType[Get_gameLevel()] == "fire") {
clearInterval(__id1);
Get_playerWeaponHitArea().removeMovieClip();
}
__computerObj[_local2].FcAssignDamage(100);
}
_local2++;
}
}
function go1(entry_referencemc) {
entry_referencemc._y = entry_referencemc._y - Get_fireSpeed();
if (entry_referencemc._y < 22) {
clearInterval(__id1);
entry_referencemc.removeMovieClip();
}
}
function FcAttachPlaySound(entry_soundObj, entry_linkage, entry_playstart, entry_loop) {
entry_soundObj.attachSound(entry_linkage);
entry_soundObj.start(entry_playstart, entry_loop);
}
function FcTargetSounds() {
__myEngineSoundObj = new Sound("MsoundENGINE");
__myEngineSoundObj.setVolume(100);
__myEngineSoundObj.start();
__myBgSoundObj = new Sound("MsoundBG");
__myBgSoundObj.setVolume(30);
__myBgSoundObj.start();
Set_myBgSoundObj(__myBgSoundObj);
Set_myEngineSoundObj(__myEngineSoundObj);
FcVolume();
FcDisplayVolume();
}
function FcVolume() {
var objReference = this;
Get_menuMovie().Bsound.onPress = function () {
if (_global.mySoundObj.getVolume() == 0) {
_global.mySoundObj.setVolume(_global.initialVolume);
} else if (_global.mySoundObj.getVolume() == _global.initialVolume) {
_global.mySoundObj.setVolume(0);
}
objReference.FcDisplayVolume();
};
}
function FcDisplayVolume() {
if (_global.mySoundObj.getVolume() == 0) {
Get_menuMovie().Bsound.gotoAndStop(2);
} else if (_global.mySoundObj.getVolume() == _global.initialVolume) {
Get_menuMovie().Bsound.gotoAndStop(1);
}
}
function FcCheckMinInterval(entry_lastInterval, entry_minInterval, entry_currentValue) {
if (Number(entry_lastInterval + entry_minInterval) < entry_currentValue) {
return(true);
}
return(false);
}
function FcControlVolume(entry_soundObj, entry_volume) {
entry_soundObj.setVolume(entry_volume);
}
function FcUpdateLifes(entry_addlifes) {
Set_playerLifes(entry_addlifes);
Get_menuMovie().Mlifes.gotoAndStop(Get_playerLifes() + 1);
}
function FcUpdateDamage(entry_damage) {
Set_playerDamageValue(entry_damage);
Get_menuMovie().Mdamage.gotoAndStop(Get_playerDamageValue());
}
function FcUpdatePoints(entry_addpoints) {
Set_playerPoints(entry_addpoints);
Get_menuMovie().Tpoints.text = Get_playerPoints();
if (entry_addpoints != 0) {
FcAttachTextPoints(entry_addpoints);
}
}
function FcInitPoints(entry_referenceobj) {
Get_menuMovie().Tpoints.text = Get_playerPoints();
}
function FcUpdateLevel() {
var _local2 = Get_gameLevel();
if (_local2 < 10) {
_local2 = "0" + _local2;
}
Get_menuMovie().Tlevel.text = _local2;
}
function FcEndGame() {
delete _level.onEnterFrame;
FcRemoveUnwantedContent();
}
function FcRemoveUnwantedContent() {
Get_myBgSoundObj().stop();
Get_myEngineSoundObj().stop();
delete __myBgSoundObj;
delete __myEngineSoundObj;
_level0.NEWattachMovie_fire.removeMovieClip();
_level0.NEWattachMovie_textpoints.removeMovieClip();
FcRemoveMap();
FcRemoveComputer();
FcRemovePlayer();
FcRemoveMenu();
}
function FcTestGameOver() {
if (Get_playerLifes() <= 0) {
Set_signalGameOver(true);
return(true);
}
return(false);
}
function FcTestGameWon() {
if (Get_gameLevel() > Get_gameMaxLevels()) {
Set_signalGameWon(true);
return(true);
}
return(false);
}
function FcTestLevelCompleted() {
if ((__computerBossObj.Get_computerDead() == true) && (__computerBossMovie._y < 0)) {
Set_signalLevelCompleted(true);
Set_gameLevel(Get_gameLevel() + 1);
return(true);
}
}
function FcGoNextLevel() {
Set_gameMODE("game");
}
function FcAttachTextPoints(entry_value) {
var _local2 = _level0.attachMovie("attachMovie_textpoints", "NEWattachMovie_textpoints", _level0.getNextHighestDepth());
_local2.Mtextpoints.Ttextpoints.text = entry_value;
_local2._x = Get_playerMovie()._x;
_local2._y = Get_playerMovie()._y;
}
function FcBriefing() {
var _local2 = _level0.attachMovie("attachMovie_briefing", "NEWattachMovie_briefing", _level0.getNextHighestDepth());
_local2.Mbrief.Tbrief.htmlText = ("Find the Dog Catcher <br/> and use <font color='#ffff66'>" + __playerWeaponName[Get_gameLevel()]) + "</font> <br/> to eliminate it !!!";
_local2._x = 0;
_local2._y = 50;
}
var __mapsArray = [];
var __mapsTotalHeight = 0;
var __mapsSpeedMin = 0;
var __mapsSpeedMax = 20;
var __mapsSpeedIncrement = 0.25;
var __playerSpeedXFactor = 0.4;
var __playerSpeedY = 1;
var __gameLevel = 1;
var __gameMaxLevels = 9;
var __fireSpeed = 5;
var __minFireInterval = 1000;
var __lastFireInterval = 0;
var __pointsArray = [5000, -200];
var __maxRotation = 7;
var __rotationAngle = 1;
var __playerWeaponType = ["", "hit", "hit", "hit", "hit", "fire", "hit", "hit", "fire", "fire"];
var __playerWeaponName = ["", "The Wood Hammer", "The Tennis Rocket", "The Laser", "The Iron Hammer", "The Cannon", "The Baseball Bat", "The Flames Weapon", "The Ink Trower", "The Missiles Weapon"];
var __playerLifes = 0;
var __playerLifesInitial = 3;
var __playerPoints = 0;
var __playerDamageValueMin = 1;
var __playerDamageValueMax = 100;
var __computerSpeedX = 3;
var __computerSpeedYMin = 12;
var __computerSpeedYMax = 16;
var __computersInitialNumber = 3;
var __computerObj = [];
var __computerMovie = [];
}
Symbol 354 MovieClip [__Packages.GameEngineComputer] Frame 0 (13.36 KiB) ● ●
class GameEngineComputer
{
var __xSpeed, __ySpeed, __ySpeedAbsolute, __xStartPosition, __yStartPosition, __xTempPosition, __yTempPosition, __attachName, __computerReference, __initialXSpeed, __initialYSpeed, __objectReference, __ySpeedMin, __ySpeedMax, __computerDead;
function GameEngineComputer (entry_objectReference, entry_NEWattach, entry_xStartPosition, entry_yStartPosition) {
Set_objectReference(entry_objectReference);
Set_attachName(entry_NEWattach);
Set_xStartPosition(entry_xStartPosition);
Set_yStartPosition(entry_yStartPosition);
Set_ySpeedMin(Get_objectReference().Get_computerSpeedYMin());
Set_ySpeedMax(Get_objectReference().Get_computerSpeedYMax());
}
function Get_xSpeed() {
return(__xSpeed);
}
function Get_ySpeed() {
return(__ySpeed);
}
function Get_ySpeedAbsolute() {
return(__ySpeedAbsolute);
}
function Get_xStartPosition() {
return(__xStartPosition);
}
function Get_yStartPosition() {
return(__yStartPosition);
}
function Get_xTempPosition() {
return(__xTempPosition);
}
function Get_yTempPosition() {
return(__yTempPosition);
}
function Get_atatchName() {
return(__attachName);
}
function Get_computerReference() {
return(__computerReference);
}
function Get_initialXSpeed() {
return(__initialXSpeed);
}
function Get_initialYSpeed() {
return(__initialYSpeed);
}
function Get_minMoveInterval() {
return(__minMoveInterval);
}
function Get_lastMoveTime() {
return(__lastMoveTime);
}
function Get_objectReference() {
return(__objectReference);
}
function Get_ySpeedMin() {
return(__ySpeedMin);
}
function Get_ySpeedMax() {
return(__ySpeedMax);
}
function Get_damageValue() {
return(Math.floor(__damageValue));
}
function Get_damageValueMax() {
return(__damageValueMax);
}
function Get_damageValueMin() {
return(__damageValueMin);
}
function Get_computerDead() {
return(__computerDead);
}
function Get_typeOfMove() {
return(__typeOfMove);
}
function Set_xSpeed(entry_value) {
__xSpeed = entry_value;
}
function Set_ySpeed(entry_value) {
__ySpeed = entry_value;
if (__ySpeed < 0) {
__ySpeed = 0;
}
}
function Set_ySpeedAbsolute(entry_value) {
__ySpeedAbsolute = entry_value;
}
function Set_xStartPosition(entry_value) {
__xStartPosition = Math.round(entry_value);
}
function Set_yStartPosition(entry_value) {
__yStartPosition = Math.round(entry_value);
}
function Set_xTempPosition(entry_value) {
__xTempPosition = entry_value;
}
function Set_yTempPosition(entry_value) {
__yTempPosition = entry_value;
}
function Set_attachName(entry_value) {
__attachName = entry_value;
}
function Set_computerReference(entry_value) {
__computerReference = entry_value;
}
function Set_initialXSpeed(entry_value) {
__initialXSpeed = entry_value;
}
function Set_initialYSpeed(entry_value) {
__initialYSpeed = entry_value;
}
function Set_lastMoveTime(entry_value) {
__lastMoveTime = entry_value;
}
function Set_minMoveInterval(entry_value) {
__minMoveInterval = entry_value;
}
function Set_objectReference(entry_value) {
__objectReference = entry_value;
}
function Set_ySpeedMin(entry_value) {
__ySpeedMin = entry_value;
}
function Set_ySpeedMax(entry_value) {
__ySpeedMax = entry_value;
}
function Set_damageValue(entry_value) {
__damageValue = entry_value;
if (__damageValue >= __damageValueMax) {
__damageValue = __damageValueMax;
}
}
function Set_computerDead(entry_value) {
__computerDead = entry_value;
}
function Set_typeOfMove(entry_value) {
__typeOfMove = entry_value;
}
function FcInitComputer(entry_attach, entry_depth, entry_xSpeed, entry_ySpeed) {
FcNoDamageCar();
Set_computerDead(false);
var _local2 = _level0.attachMovie(entry_attach, Get_atatchName(), entry_depth);
_local2.cacheAsBitmap = true;
Set_computerReference(_local2);
Set_xTempPosition(Get_xStartPosition());
Set_yTempPosition(Get_yStartPosition());
Set_initialXSpeed(entry_xSpeed);
Set_initialYSpeed(entry_ySpeed);
Set_xSpeed(entry_xSpeed);
Set_ySpeed(entry_ySpeed);
_local2._x = Get_xTempPosition();
_local2._y = Get_yTempPosition();
return(_local2);
}
function FcMoveComputer(entry_mapSpeed) {
Set_ySpeedAbsolute(entry_mapSpeed - Get_ySpeed());
if (!FcReturnFrontMovement()) {
Set_yTempPosition(Get_yTempPosition() + Get_ySpeedAbsolute());
Get_computerReference()._y = Get_yTempPosition();
} else if (!FcReturnRightMovement()) {
Set_xTempPosition(Get_xTempPosition() + Get_xSpeed());
Get_computerReference()._x = Get_xTempPosition();
} else if (!FcReturnLeftMovement()) {
Set_xTempPosition(Get_xTempPosition() - Get_xSpeed());
Get_computerReference()._x = Get_xTempPosition();
} else {
Set_xTempPosition(Get_xTempPosition() - Get_ySpeedAbsolute());
Get_computerReference()._x = Get_xTempPosition();
}
FcArbitraryMove();
FcTestCollisionWithMap();
FcPositionComputer();
}
function FcReturnFrontMovement() {
var _local2 = 1;
while (_local2 < Get_objectReference().Get_computerObjLength()) {
if (Get_computerReference() != Get_objectReference().__computerMovie[_local2]) {
var _local5 = {xOffset:0, yOffset:0};
var _local6 = {xOffset:0, yOffset:5 * Get_ySpeedAbsolute()};
var _local3 = new CollisionDetection();
var _local4 = _local3.FcCollisionDetectionRectangleRectangle(Get_objectReference().__computerMovie[_local2], Get_computerReference(), _local5, _local6);
if (_local4 == true) {
return(true);
}
}
_local2++;
}
if (Get_computerReference() != Get_objectReference().__computerBossMovie) {
var _local5 = {xOffset:0, yOffset:0};
var _local6 = {xOffset:0, yOffset:2 * Get_ySpeedAbsolute()};
var _local3 = new CollisionDetection();
var _local4 = _local3.FcCollisionDetectionRectangleRectangle(Get_objectReference().__computerBossMovie, Get_computerReference(), _local5, _local6);
if (_local4 == true) {
return(true);
}
}
return(false);
}
function FcReturnRightMovement() {
var _local2 = 1;
while (_local2 < Get_objectReference().Get_computerObjLength()) {
if (Get_computerReference() != Get_objectReference().__computerMovie[_local2]) {
var _local5 = {xOffset:0, yOffset:0};
var _local6 = {xOffset:Get_xSpeed(), yOffset:0};
var _local3 = new CollisionDetection();
var _local4 = _local3.FcCollisionDetectionRectangleRectangle(Get_objectReference().__computerMovie[_local2], Get_computerReference(), _local5, _local6);
if (_local4 == true) {
return(true);
}
}
_local2++;
}
if (Get_computerReference() != Get_objectReference().__computerBossMovie) {
var _local5 = {xOffset:0, yOffset:0};
var _local6 = {xOffset:Get_xSpeed(), yOffset:0};
var _local3 = new CollisionDetection();
var _local4 = _local3.FcCollisionDetectionRectangleRectangle(Get_objectReference().__computerBossMovie, Get_computerReference(), _local5, _local6);
if (_local4 == true) {
return(true);
}
}
return(false);
}
function FcReturnLeftMovement() {
var _local2 = 1;
while (_local2 < Get_objectReference().Get_computerObjLength()) {
if (Get_computerReference() != Get_objectReference().__computerMovie[_local2]) {
var _local5 = {xOffset:0, yOffset:0};
var _local6 = {xOffset:-Get_xSpeed(), yOffset:0};
var _local3 = new CollisionDetection();
var _local4 = _local3.FcCollisionDetectionRectangleRectangle(Get_objectReference().__computerMovie[_local2], Get_computerReference(), _local5, _local6);
if (_local4 == true) {
return(true);
}
}
_local2++;
}
if (Get_computerReference() != Get_objectReference().__computerBossMovie) {
var _local5 = {xOffset:0, yOffset:0};
var _local6 = {xOffset:-Get_xSpeed(), yOffset:0};
var _local3 = new CollisionDetection();
var _local4 = _local3.FcCollisionDetectionRectangleRectangle(Get_objectReference().__computerBossMovie, Get_computerReference(), _local5, _local6);
if (_local4 == true) {
return(true);
}
}
return(false);
}
function FcPositionComputer() {
if ((((Get_yTempPosition() > (2 * Stage.height)) || (Get_yTempPosition() < (-2 * Stage.height))) || (Get_computerReference()._x < 0)) || (Get_computerReference()._x > Stage.width)) {
FcResetDamageIndicator();
FcNoDamageCar();
Set_computerDead(false);
Set_xTempPosition(Get_xStartPosition());
Set_yTempPosition(Get_yStartPosition());
Get_computerReference()._x = Get_xTempPosition();
Get_computerReference()._y = Get_yTempPosition();
FcTestCollisionWithMap();
Set_ySpeed(FcGenerateRandom(Get_ySpeedMin(), Get_ySpeedMax()));
Set_xSpeed(Get_initialXSpeed());
}
}
function FcTestCollisionWithMap() {
var _local2 = 0;
while (_local2 < Get_objectReference().Get_mapsArrayLength()) {
var _local4 = {x:Get_computerReference().Mhit1._x, y:Get_computerReference().Mhit1._y - 150};
Get_computerReference().localToGlobal(_local4);
var _local3 = {x:Get_computerReference().Mhit2._x, y:Get_computerReference().Mhit2._y - 150};
Get_computerReference().localToGlobal(_local3);
var _local6 = {x:Get_computerReference().Mhit1._x, y:Get_computerReference().Mhit1._y};
Get_computerReference().localToGlobal(_local6);
var _local5 = {x:Get_computerReference().Mhit2._x, y:Get_computerReference().Mhit2._y};
Get_computerReference().localToGlobal(_local5);
if (Get_objectReference().__mapsArray[_local2].Mmask.hitTest(_local4.x, _local4.y, true)) {
Set_xTempPosition(Get_xTempPosition() + Get_xSpeed());
Get_computerReference()._x = Get_xTempPosition();
FcResetArbitraryMove2("right");
} else if (Get_objectReference().__mapsArray[_local2].Mmask.hitTest(_local3.x, _local3.y, true)) {
Set_xTempPosition(Get_xTempPosition() - Get_xSpeed());
Get_computerReference()._x = Get_xTempPosition();
FcResetArbitraryMove2("left");
} else if (Get_objectReference().__mapsArray[_local2].Mmask.hitTest(_local6.x, _local6.y, true)) {
Set_xTempPosition(Get_xTempPosition() + (4 * Get_xSpeed()));
Get_computerReference()._x = Get_xTempPosition();
FcResetArbitraryMove2("right");
} else if (Get_objectReference().__mapsArray[_local2].Mmask.hitTest(_local5.x, _local5.y, true)) {
Set_xTempPosition(Get_xTempPosition() - (4 * Get_xSpeed()));
Get_computerReference()._x = Get_xTempPosition();
FcResetArbitraryMove2("left");
}
_local2++;
}
}
function FcArbitraryMove() {
var _local3 = getTimer();
if (_local3 > (Get_lastMoveTime() + Get_minMoveInterval())) {
var _local2 = FcGenerateRandom(0, 1);
if (_local2 == 0) {
if (!FcReturnLeftMovement()) {
Set_xTempPosition(Get_xTempPosition() - Get_xSpeed());
Get_computerReference()._x = Get_xTempPosition();
}
} else if (_local2 == 1) {
if (!FcReturnRightMovement()) {
Set_xTempPosition(Get_xTempPosition() + Get_xSpeed());
Get_computerReference()._x = Get_xTempPosition();
}
}
Set_lastMoveTime(getTimer());
Set_minMoveInterval(FcGenerateRandom(100, 1000));
}
}
function FcResetArbitraryMove2(entry_where) {
Set_typeOfMove(entry_where);
Set_minMoveInterval(FcGenerateRandom(500, 1000));
Set_lastMoveTime(getTimer());
}
function FcArbitraryMove2() {
var _local3 = getTimer();
if (_local3 > (Get_lastMoveTime() + Get_minMoveInterval())) {
var _local2 = FcGenerateRandom(0, 1);
if (_local2 == 1) {
var _local4 = "left";
} else if (_local2 == 0) {
var _local4 = "right";
}
FcResetArbitraryMove2(_local4);
} else if (_local3 < (Get_lastMoveTime() + Get_minMoveInterval())) {
if (Get_typeOfMove() == "right") {
if (!FcReturnRightMovement()) {
Set_xTempPosition(Get_xTempPosition() + Get_xSpeed());
Get_computerReference()._x = Get_xTempPosition();
} else {
FcResetArbitraryMove2("left");
}
}
if (Get_typeOfMove() == "left") {
if (!FcReturnLeftMovement()) {
Set_xTempPosition(Get_xTempPosition() - Get_xSpeed());
Get_computerReference()._x = Get_xTempPosition();
} else {
FcResetArbitraryMove2("right");
}
}
}
}
function FcGenerateRandom(entry_start, entry_end) {
var _local1 = Math.floor(Math.random() * ((entry_end - entry_start) + 1)) + entry_start;
return(_local1);
}
function FcAssignDamage(entry_damageValue) {
if (Get_damageValue() < Get_damageValueMax()) {
Set_damageValue(Get_damageValue() + entry_damageValue);
}
if ((entry_damageValue >= Get_damageValueMax()) && (Get_computerDead() != true)) {
FcDamageCar();
Get_objectReference().FcUpdatePoints(Get_objectReference().__pointsArray[1]);
}
}
function FcDamageCar() {
Set_computerDead(true);
Get_objectReference().FcAttachPlaySound(_global.mySoundObj, "attachSound_explode", 0, 1);
Set_ySpeed(0);
Set_xSpeed(0);
Get_computerReference().gotoAndStop(2);
Get_computerReference()._rotation = FcGenerateRandom(0, 10);
}
function FcNoDamageCar() {
Get_computerReference().gotoAndStop(1);
Get_computerReference()._rotation = 0;
Set_damageValue(Get_damageValueMin());
}
function FcResetDamageIndicator() {
Get_computerReference().Mdamage.gotoAndStop(1);
}
var __damageValue = 1;
var __damageValueMax = 100;
var __damageValueMin = 1;
var __minMoveInterval = 1000;
var __lastMoveTime = 0;
var __typeOfMove = "right";
}
Symbol 355 MovieClip [__Packages.CollisionDetection] Frame 0 (1.55 KiB) ●
class CollisionDetection
{
function CollisionDetection () {
}
function FcCollisionDetectionRectangleRectangle(entry_mc1, entry_mc2, entry_offsetObj1, entry_offsetObj2) {
var _local3 = FcReturnMcCorners(entry_mc1);
var _local2 = FcReturnMcCorners(entry_mc2);
var _local9 = _local3.x + entry_offsetObj1.xOffset;
var _local13 = (_local9 + _local3.width) + entry_offsetObj1.xOffset;
var _local7 = _local3.y + entry_offsetObj1.yOffset;
var _local11 = (_local7 + _local3.height) + entry_offsetObj1.yOffset;
var _local8 = _local2.x + entry_offsetObj2.xOffset;
var _local12 = (_local8 + _local2.width) + entry_offsetObj2.xOffset;
var _local5 = _local2.y + entry_offsetObj2.yOffset;
var _local10 = (_local5 + _local2.height) + entry_offsetObj2.yOffset;
if (((_local13 > _local8) && (_local9 < _local12)) && ((_local11 > _local5) && (_local7 < _local10))) {
return(true);
}
return(false);
}
function FcReturnMcCorners(entry_mc) {
var _local7 = new flash.geom.Transform(entry_mc);
var _local4 = entry_mc.getBounds();
var _local5 = _local4.xMin;
var _local8 = _local4.xMax;
var _local6 = _local4.yMin;
var _local9 = _local4.yMax;
var _local1 = new Object();
_local1.x = entry_mc._x;
_local1.y = entry_mc._y;
_local1.width = entry_mc._width;
_local1.height = entry_mc._height;
var _local2 = new Object();
_local2.x = _local1.x + _local5;
_local2.y = _local1.y + _local6;
_local2.width = _local1.width;
_local2.height = _local1.height;
return(_local2);
}
}
Symbol 356 MovieClip [__Packages.GameEngineComputerBoss] Frame 0 (3.22 KiB) ●
class GameEngineComputerBoss extends GameEngineComputer
{
var __ySpeedOld, FcResetDamageIndicator, FcNoDamageCar, Set_computerDead, Get_atatchName, Set_computerReference, Set_xTempPosition, Get_xStartPosition, Set_yTempPosition, Get_yStartPosition, Set_initialXSpeed, Set_initialYSpeed, Set_xSpeed, Set_ySpeed, Get_xTempPosition, Get_yTempPosition, Get_objectReference, Get_computerReference, Get_damageValueMax, Get_damageValue, Get_computerDead, FcArbitraryMove2, Get_ySpeed, Set_damageValue;
function GameEngineComputerBoss (entry_objectReference, entry_NEWattach, entry_xStartPosition, entry_yStartPosition) {
super.Set_objectReference(entry_objectReference);
super.Set_attachName(entry_NEWattach);
super.Set_xStartPosition(entry_xStartPosition);
super.Set_yStartPosition(entry_yStartPosition);
}
function Get_playerMinDistance() {
return(__playerMinDistance);
}
function Get_ySpeedOld() {
return(__ySpeedOld);
}
function Get_checkSpeedChange() {
return(__checkSpeedChange);
}
function Set_ySpeedOld(entry_value) {
__ySpeedOld = entry_value;
}
function Set_checkSpeedChange(entry_value) {
__checkSpeedChange = entry_value;
}
function FcInitComputer(entry_attach, entry_depth, entry_xSpeed, entry_ySpeed) {
FcResetDamageIndicator();
FcNoDamageCar();
Set_computerDead(false);
var _local2 = _level0.attachMovie(entry_attach, Get_atatchName(), entry_depth);
_local2.cacheAsBitmap = true;
Set_computerReference(_local2);
Set_xTempPosition(Get_xStartPosition());
Set_yTempPosition(Get_yStartPosition());
Set_initialXSpeed(entry_xSpeed);
Set_initialYSpeed(entry_ySpeed);
Set_xSpeed(entry_xSpeed);
Set_ySpeed(entry_ySpeed);
_local2._x = Get_xTempPosition();
_local2._y = Get_yTempPosition();
return(_local2);
}
function FcAdaptSpeed() {
if ((((Get_computerReference()._y + Get_playerMinDistance()) > Get_objectReference().Get_playerMovie()._y) && (Get_damageValue() < Get_damageValueMax())) && (Get_computerDead() != true)) {
FcArbitraryMove2();
if (Get_checkSpeedChange() != true) {
Set_ySpeedOld(Get_ySpeed());
}
Set_checkSpeedChange(true);
Set_ySpeed(Get_objectReference().Get_mapsSpeed());
} else if (((Get_ySpeedOld() != undefined) && ((Get_computerReference()._y + Get_playerMinDistance()) < Get_objectReference().Get_playerMovie()._y)) && (Get_computerDead() != true)) {
Set_ySpeed(Get_ySpeedOld());
Set_checkSpeedChange(false);
}
}
function FcAssignDamage(entry_damageValue) {
if (Get_damageValue() >= Get_damageValueMax()) {
Get_objectReference().FcUpdatePoints(Get_objectReference().__pointsArray[0]);
FcDamageCar();
} else if (Get_damageValue() < Get_damageValueMax()) {
Set_damageValue(Get_damageValue() + entry_damageValue);
Get_computerReference().Mdamage.gotoAndStop(Get_damageValue());
}
}
function FcDamageCar() {
Get_objectReference().FcAttachPlaySound(_global.mySoundObj, "attachSound_explode", 0, 1);
Set_computerDead(true);
Set_ySpeed(Get_objectReference().Get_mapsSpeedMax() + 1);
Get_computerReference().gotoAndStop(2);
}
var __ySpeedMin = 19;
var __ySpeedMax = 19;
var __playerMinDistance = 125;
var __checkSpeedChange = false;
}
Symbol 337 MovieClip Frame 8 (17 B)
gotoAndPlay (1);
Symbol 337 MovieClip Frame 16 (17 B)
gotoAndPlay (9);
Symbol 342 MovieClip Frame 1 (942 B)
stop();
if (_parent.myScore1 <= 0) {
gotoAndStop (2);
}
Tendscore1.text = _parent.myScore1;
Bsendscore1.onPress = function () {
if ((Musername1.Ttext.text != "your name here") && (Musername1.Ttext.text != "")) {
_global.GLOBAL_USER = Musername1.Ttext.text;
fc_disablebuttons();
var _local4 = new LoadVars();
_local4.onLoad = function (success) {
if (success) {
_parent.fc_enablebuttons(false);
getURL (_global.GLOBAL_SCORESURL, "_blank");
if (_parent.myScore2 > 0) {
gotoAndStop (2);
} else {
gotoAndStop (3);
}
} else {
_parent.fc_enablebuttons(false);
}
};
var _local3 = new LoadVars();
_local3.game = _global.GLOBAL_GAME;
_local3.user = _global.GLOBAL_USER;
_local3.password = "vGyH834K";
_local3.scores = _parent.myScore1;
_local3.sendAndLoad(_global.GLOBAL_URL, _local4, "GET");
} else {
Musername1.gotoAndPlay(9);
}
};
Symbol 342 MovieClip Frame 2 (8 B)
stop();