Section 1
//CDK (com.coreyoneil.collision.CDK)
package com.coreyoneil.collision {
import flash.display.*;
import flash.geom.*;
import flash.utils.*;
import flash.text.*;
import flash.errors.*;
public class CDK {
private var colorTransform1:ColorTransform;
private var colorTransform2:ColorTransform;
private var _returnAngleType:String;
private var pixels1:ByteArray;
private var pixels2:ByteArray;
private var bmdResample:BitmapData;
private var _returnAngle:Boolean;
private var transMatrix2:Matrix;
private var rect1:Rectangle;
private var rect2:Rectangle;
private var transMatrix1:Matrix;
protected var objectCheckArray:Array;
private var _alphaThreshold:Number;
private var item1Registration:Point;
private var bmd1:BitmapData;
private var bmd2:BitmapData;
protected var objectArray:Array;
private var item2Registration:Point;
protected var objectCollisionArray:Array;
private var _numChildren:uint;
private var colorExclusionArray:Array;
public function CDK():void{
if (getQualifiedClassName(this) == "com.coreyoneil.collision::CDK"){
throw (new Error("CDK is an abstract class and is not meant for instantiation - use CollisionGroup or CollisionList"));
};
init();
}
public function get returnAngle():Boolean{
return (_returnAngle);
}
public function set returnAngle(_arg1:Boolean):void{
_returnAngle = _arg1;
}
private function init():void{
objectCheckArray = [];
objectCollisionArray = [];
objectArray = [];
colorExclusionArray = [];
_alphaThreshold = 0;
_returnAngle = true;
_returnAngleType = "RADIANS";
}
protected function findCollisions(_arg1, _arg2):void{
var item1_isText:Boolean;
var item2_isText:Boolean;
var item1xDiff:Number;
var item1yDiff:Number;
var currentObj:*;
var k:uint;
var value1:uint;
var value2:uint;
var collisionPoint:Number;
var overlap:Boolean;
var overlapping:Array;
var locY:Number;
var locX:Number;
var locStage:Point;
var hasColors:int;
var pixelLength:int;
var alpha1:uint;
var alpha2:uint;
var colorFlag:Boolean;
var red1:uint;
var red2:uint;
var green1:uint;
var green2:uint;
var blue1:uint;
var blue2:uint;
var colorObj:Object;
var aPlus:uint;
var aMinus:uint;
var rPlus:uint;
var rMinus:uint;
var gPlus:uint;
var gMinus:uint;
var bPlus:uint;
var bMinus:uint;
var item1Flags:uint;
var item2Flags:uint;
var n:uint;
var angle:Number;
var recordedCollision:Object;
var item1 = _arg1;
var item2 = _arg2;
item1_isText = false;
item2_isText = false;
if ((item1 is TextField)){
item1_isText = ((item1.antiAliasType)=="advanced") ? true : false;
item1.antiAliasType = ((item1.antiAliasType)=="advanced") ? "normal" : item1.antiAliasType;
};
if ((item2 is TextField)){
item2_isText = ((item2.antiAliasType)=="advanced") ? true : false;
item2.antiAliasType = ((item2.antiAliasType)=="advanced") ? "normal" : item2.antiAliasType;
};
colorTransform1 = item1.transform.colorTransform;
colorTransform2 = item2.transform.colorTransform;
item1Registration = new Point();
item2Registration = new Point();
item1Registration = item1.localToGlobal(item1Registration);
item2Registration = item2.localToGlobal(item2Registration);
bmd1 = new BitmapData(item1.width, item1.height, true, 0xFFFFFF);
bmd2 = new BitmapData(item1.width, item1.height, true, 0xFFFFFF);
transMatrix1 = item1.transform.matrix;
currentObj = item1;
while (currentObj.parent != null) {
transMatrix1.concat(currentObj.parent.transform.matrix);
currentObj = currentObj.parent;
};
rect1 = item1.getBounds(currentObj);
if (item1 != currentObj){
rect1.x = (rect1.x + currentObj.x);
rect1.y = (rect1.y + currentObj.y);
};
var _local4 = (item1Registration.x - rect1.left);
item1xDiff = _local4;
transMatrix1.tx = _local4;
_local4 = (item1Registration.y - rect1.top);
item1yDiff = _local4;
transMatrix1.ty = _local4;
transMatrix2 = item2.transform.matrix;
currentObj = item2;
while (currentObj.parent != null) {
transMatrix2.concat(currentObj.parent.transform.matrix);
currentObj = currentObj.parent;
};
transMatrix2.tx = (item2Registration.x - rect1.left);
transMatrix2.ty = (item2Registration.y - rect1.top);
bmd1.draw(item1, transMatrix1, colorTransform1, null, null, true);
bmd2.draw(item2, transMatrix2, colorTransform2, null, null, true);
pixels1 = bmd1.getPixels(new Rectangle(0, 0, bmd1.width, bmd1.height));
pixels2 = bmd2.getPixels(new Rectangle(0, 0, bmd1.width, bmd1.height));
k = 0;
value1 = 0;
value2 = 0;
collisionPoint = -1;
overlap = false;
overlapping = [];
hasColors = colorExclusionArray.length;
pixels1.position = 0;
pixels2.position = 0;
pixelLength = pixels1.length;
while (k < pixelLength) {
k = pixels1.position;
try {
value1 = pixels1.readUnsignedInt();
value2 = pixels2.readUnsignedInt();
} catch(e:EOFError) {
break;
};
alpha1 = ((value1 >> 24) & 0xFF);
alpha2 = ((value2 >> 24) & 0xFF);
if ((((alpha1 > _alphaThreshold)) && ((alpha2 > _alphaThreshold)))){
colorFlag = false;
if (hasColors){
red1 = ((value1 >> 16) & 0xFF);
red2 = ((value2 >> 16) & 0xFF);
green1 = ((value1 >> 8) & 0xFF);
green2 = ((value2 >> 8) & 0xFF);
blue1 = (value1 & 0xFF);
blue2 = (value2 & 0xFF);
n = 0;
while (n < hasColors) {
colorObj = Object(colorExclusionArray[n]);
item1Flags = 0;
item2Flags = 0;
if ((((blue1 >= colorObj.bMinus)) && ((blue1 <= colorObj.bPlus)))){
item1Flags = (item1Flags + 1);
};
if ((((blue2 >= colorObj.bMinus)) && ((blue2 <= colorObj.bPlus)))){
item2Flags = (item2Flags + 1);
};
if ((((green1 >= colorObj.gMinus)) && ((green1 <= colorObj.gPlus)))){
item1Flags = (item1Flags + 1);
};
if ((((green2 >= colorObj.gMinus)) && ((green2 <= colorObj.gPlus)))){
item2Flags = (item2Flags + 1);
};
if ((((red1 >= colorObj.rMinus)) && ((red1 <= colorObj.rPlus)))){
item1Flags = (item1Flags + 1);
};
if ((((red2 >= colorObj.rMinus)) && ((red2 <= colorObj.rPlus)))){
item2Flags = (item2Flags + 1);
};
if ((((alpha1 >= colorObj.aMinus)) && ((alpha1 <= colorObj.aPlus)))){
item1Flags = (item1Flags + 1);
};
if ((((alpha2 >= colorObj.aMinus)) && ((alpha2 <= colorObj.aPlus)))){
item2Flags = (item2Flags + 1);
};
if ((((item1Flags == 4)) || ((item2Flags == 4)))){
colorFlag = true;
};
n = (n + 1);
};
};
if (!colorFlag){
overlap = true;
collisionPoint = (k >> 2);
locY = (collisionPoint / bmd1.width);
locX = (collisionPoint % bmd1.width);
locY = (locY - item1yDiff);
locX = (locX - item1xDiff);
locStage = item1.localToGlobal(new Point(locX, locY));
overlapping.push(locStage);
};
};
};
if (overlap){
angle = (_returnAngle) ? findAngle(item1, item2) : 0;
recordedCollision = {object1:item1, object2:item2, angle:angle, overlapping:overlapping};
objectCollisionArray.push(recordedCollision);
};
if (item1_isText){
item1.antiAliasType = "advanced";
};
if (item2_isText){
item2.antiAliasType = "advanced";
};
_local4 = false;
item2_isText = _local4;
item1_isText = _local4;
}
public function dispose():void{
objectArray = [];
}
public function excludeColor(_arg1:uint, _arg2:uint=0xFF, _arg3:uint=20, _arg4:uint=20, _arg5:uint=20):void{
var _local6:int;
var _local7:uint;
var _local8:uint;
var _local9:uint;
var _local10:uint;
var _local11:uint;
var _local12:uint;
var _local13:uint;
var _local14:uint;
var _local15:uint;
var _local16:Object;
_local6 = colorExclusionArray.length;
_local7 = 0;
while (_local7 < _local6) {
if (colorExclusionArray[_local7].color == _arg1){
throw (new Error((("Color could not be added - color already in the exclusion list [" + _arg1) + "]")));
};
_local7++;
};
_local8 = (((_arg1 >> 24) & 0xFF) + _arg2);
_local9 = (_local8 - (_arg2 << 1));
_local10 = (((_arg1 >> 16) & 0xFF) + _arg3);
_local11 = (_local10 - (_arg3 << 1));
_local12 = (((_arg1 >> 8) & 0xFF) + _arg4);
_local13 = (_local12 - (_arg4 << 1));
_local14 = ((_arg1 & 0xFF) + _arg5);
_local15 = (_local14 - (_arg5 << 1));
_local16 = {color:_arg1, aPlus:_local8, aMinus:_local9, rPlus:_local10, rMinus:_local11, gPlus:_local12, gMinus:_local13, bPlus:_local14, bMinus:_local15};
colorExclusionArray.push(_local16);
}
public function get numChildren():uint{
return (objectArray.length);
}
public function get alphaThreshold():Number{
return (_alphaThreshold);
}
public function removeItem(_arg1):void{
var _local2:int;
_local2 = objectArray.indexOf(_arg1);
if (_local2 > -1){
objectArray.splice(_local2, 1);
} else {
throw (new Error((_arg1 + " could not be removed - object not found in item list.")));
};
}
public function set returnAngleType(_arg1:String):void{
_arg1 = _arg1.toUpperCase();
switch (_arg1){
case "DEGREES":
case "DEGREE":
case "DEG":
case "DEGS":
_returnAngleType = "DEGREES";
break;
case "RADIANS":
case "RADIAN":
case "RAD":
case "RADS":
_returnAngleType = "RADIANS";
break;
default:
throw (new Error("returnAngleType expects 'DEGREES' or 'RADIANS'"));
};
}
private function findAngle(_arg1:DisplayObject, _arg2:DisplayObject):Number{
var center:Point;
var pixels:ByteArray;
var columnHeight:uint;
var rowWidth:uint;
var pixel:uint;
var thisAlpha:uint;
var lastAlpha:int;
var edgeArray:Array;
var hasColors:int;
var j:uint;
var edgePoint:int;
var numEdges:int;
var slopeYAvg:Number;
var slopeXAvg:Number;
var average:Number;
var k:uint;
var upperLimit:int;
var colorFlag:Boolean;
var red1:uint;
var green1:uint;
var blue1:uint;
var colorObj:Object;
var a:uint;
var r:uint;
var g:uint;
var b:uint;
var item1Flags:uint;
var n:uint;
var item1 = _arg1;
var item2 = _arg2;
center = new Point((item1.width >> 1), (item1.height >> 1));
pixels = pixels2;
transMatrix2.tx = (transMatrix2.tx + center.x);
transMatrix2.ty = (transMatrix2.ty + center.y);
bmdResample = new BitmapData((item1.width << 1), (item1.height << 1), true, 0xFFFFFF);
bmdResample.draw(item2, transMatrix2, colorTransform2, null, null, true);
pixels = bmdResample.getPixels(new Rectangle(0, 0, bmdResample.width, bmdResample.height));
center.x = (bmdResample.width >> 1);
center.y = (bmdResample.height >> 1);
columnHeight = Math.round(bmdResample.height);
rowWidth = Math.round(bmdResample.width);
edgeArray = [];
hasColors = colorExclusionArray.length;
j = 0;
while (j < columnHeight) {
k = ((j * rowWidth) << 2);
pixels.position = k;
lastAlpha = -1;
upperLimit = (((j + 1) * rowWidth) << 2);
while (k < upperLimit) {
k = pixels.position;
try {
pixel = pixels.readUnsignedInt();
} catch(e:EOFError) {
break;
};
thisAlpha = ((pixel >> 24) & 0xFF);
if (lastAlpha == -1){
lastAlpha = thisAlpha;
} else {
if (thisAlpha > _alphaThreshold){
colorFlag = false;
if (hasColors){
red1 = ((pixel >> 16) & 0xFF);
green1 = ((pixel >> 8) & 0xFF);
blue1 = (pixel & 0xFF);
n = 0;
while (n < hasColors) {
colorObj = Object(colorExclusionArray[n]);
item1Flags = 0;
if ((((blue1 >= colorObj.bMinus)) && ((blue1 <= colorObj.bPlus)))){
item1Flags = (item1Flags + 1);
};
if ((((green1 >= colorObj.gMinus)) && ((green1 <= colorObj.gPlus)))){
item1Flags = (item1Flags + 1);
};
if ((((red1 >= colorObj.rMinus)) && ((red1 <= colorObj.rPlus)))){
item1Flags = (item1Flags + 1);
};
if ((((thisAlpha >= colorObj.aMinus)) && ((thisAlpha <= colorObj.aPlus)))){
item1Flags = (item1Flags + 1);
};
if (item1Flags == 4){
colorFlag = true;
};
n = (n + 1);
};
};
if (!colorFlag){
edgeArray.push((k >> 2));
};
};
};
};
j = (j + 1);
};
numEdges = edgeArray.length;
slopeYAvg = 0;
slopeXAvg = 0;
j = 0;
while (j < numEdges) {
edgePoint = int(edgeArray[j]);
slopeYAvg = (slopeYAvg + (center.y - (edgePoint / rowWidth)));
slopeXAvg = (slopeXAvg + ((edgePoint % rowWidth) - center.x));
j = (j + 1);
};
average = -(Math.atan2(slopeYAvg, slopeXAvg));
average = ((_returnAngleType == "RADIANS")) ? average : (average * 57.2957795);
return (average);
}
public function addItem(_arg1):void{
if ((_arg1 is DisplayObject)){
objectArray.push(_arg1);
} else {
throw (new Error((("Cannot add item: " + _arg1) + " - item must be a Display Object.")));
};
}
public function get returnAngleType():String{
return (_returnAngleType);
}
public function set alphaThreshold(_arg1:Number):void{
if ((((_arg1 <= 1)) && ((_arg1 >= 0)))){
_alphaThreshold = (_arg1 * 0xFF);
} else {
throw (new Error("alphaThreshold expects a value from 0 to 1"));
};
}
public function removeExcludeColor(_arg1:uint):void{
var _local2:Boolean;
var _local3:int;
var _local4:uint;
_local2 = false;
_local3 = colorExclusionArray.length;
_local4 = 0;
while (_local4 < _local3) {
if (colorExclusionArray[_local4].color == _arg1){
colorExclusionArray.splice(_local4, 1);
_local2 = true;
break;
};
_local4++;
};
if (!_local2){
throw (new Error((("Color could not be removed - color not found in exclusion list [" + _arg1) + "]")));
};
}
protected function clearArrays():void{
objectCheckArray = [];
objectCollisionArray = [];
}
}
}//package com.coreyoneil.collision
Section 2
//CollisionList (com.coreyoneil.collision.CollisionList)
package com.coreyoneil.collision {
import flash.display.*;
public class CollisionList extends CDK {
public function CollisionList(_arg1, ... _args):void{
var _local3:uint;
super();
addItem(_arg1);
_local3 = 0;
while (_local3 < _args.length) {
addItem(_args[_local3]);
_local3++;
};
}
public function swapTarget(_arg1):void{
if ((_arg1 is DisplayObject)){
objectArray[0] = _arg1;
} else {
throw (new Error((("Cannot swap target: " + _arg1) + " - item must be a Display Object.")));
};
}
public function checkCollisions():Array{
var _local1:uint;
var _local2:*;
var _local3:DisplayObject;
var _local4:uint;
clearArrays();
_local1 = objectArray.length;
_local2 = DisplayObject(objectArray[0]);
_local4 = 1;
while (_local4 < _local1) {
_local3 = DisplayObject(objectArray[_local4]);
if (_local2.hitTestObject(_local3)){
if ((_local3.width * _local3.height) > (_local2.width * _local2.height)){
objectCheckArray.push([_local2, _local3]);
} else {
objectCheckArray.push([_local3, _local2]);
};
};
_local4++;
};
_local1 = objectCheckArray.length;
_local4 = 0;
while (_local4 < _local1) {
findCollisions(DisplayObject(objectCheckArray[_local4][0]), DisplayObject(objectCheckArray[_local4][1]));
_local4++;
};
return (objectCollisionArray);
}
override public function removeItem(_arg1):void{
var _local2:int;
_local2 = objectArray.indexOf(_arg1);
if (_local2 > 0){
objectArray.splice(_local2, 1);
} else {
if (_local2 == 0){
throw (new Error("You cannot remove the target from CollisionList. Use swapTarget to change the target."));
};
throw (new Error((_arg1 + " could not be removed - object not found in item list.")));
};
}
}
}//package com.coreyoneil.collision
Section 3
//AboutButton_160 (copminigame_fla.AboutButton_160)
package copminigame_fla {
import flash.display.*;
public dynamic class AboutButton_160 extends MovieClip {
public var _Press:MovieClip;
public var _Up:MovieClip;
public var _Over:MovieClip;
public function AboutButton_160(){
addFrameScript(0, frame1, 6, frame7, 14, frame15);
}
function frame7(){
_Up.visible = false;
_Over.visible = true;
_Over.gotoAndPlay(1);
_Press.visible = false;
stop();
}
function frame1(){
_Up.visible = true;
_Over.visible = false;
_Press.visible = false;
stop();
}
function frame15(){
_Up.visible = false;
_Over.visible = false;
_Press.visible = true;
_Press.gotoAndPlay(1);
stop();
}
}
}//package copminigame_fla
Section 4
//AboutButtonOver_165 (copminigame_fla.AboutButtonOver_165)
package copminigame_fla {
import flash.display.*;
public dynamic class AboutButtonOver_165 extends MovieClip {
public function AboutButtonOver_165(){
addFrameScript(6, frame7);
}
function frame7(){
stop();
}
}
}//package copminigame_fla
Section 5
//AboutButtonPress_161 (copminigame_fla.AboutButtonPress_161)
package copminigame_fla {
import flash.display.*;
public dynamic class AboutButtonPress_161 extends MovieClip {
public function AboutButtonPress_161(){
addFrameScript(9, frame10);
}
function frame10(){
stop();
}
}
}//package copminigame_fla
Section 6
//BigExplosion_88 (copminigame_fla.BigExplosion_88)
package copminigame_fla {
import flash.display.*;
public dynamic class BigExplosion_88 extends MovieClip {
public function BigExplosion_88(){
addFrameScript(0, frame1, 19, frame20);
}
function frame1(){
stop();
}
function frame20(){
stop();
}
}
}//package copminigame_fla
Section 7
//BoostBar_77 (copminigame_fla.BoostBar_77)
package copminigame_fla {
import flash.display.*;
public dynamic class BoostBar_77 extends MovieClip {
public var Mask:MovieClip;
}
}//package copminigame_fla
Section 8
//BoxArtEnglish_157 (copminigame_fla.BoxArtEnglish_157)
package copminigame_fla {
import flash.display.*;
public dynamic class BoxArtEnglish_157 extends MovieClip {
public function BoxArtEnglish_157(){
addFrameScript(0, frame1, 4, frame5);
}
function frame1(){
if (parent.parent.parent.parent["mLang"] != "US"){
gotoAndStop("_UK");
} else {
stop();
};
}
function frame5(){
stop();
}
}
}//package copminigame_fla
Section 9
//EasyButton_172 (copminigame_fla.EasyButton_172)
package copminigame_fla {
import flash.display.*;
public dynamic class EasyButton_172 extends MovieClip {
public var _Press:MovieClip;
public var _Up:MovieClip;
public var _Over:MovieClip;
public function EasyButton_172(){
addFrameScript(0, frame1, 6, frame7, 14, frame15);
}
function frame7(){
_Up.visible = false;
_Over.visible = true;
_Over.gotoAndPlay(1);
_Press.visible = false;
stop();
}
function frame1(){
_Up.visible = true;
_Over.visible = false;
_Press.visible = false;
stop();
}
function frame15(){
_Up.visible = false;
_Over.visible = false;
_Press.visible = true;
_Press.gotoAndPlay(1);
stop();
}
}
}//package copminigame_fla
Section 10
//EasyButtonOver_176 (copminigame_fla.EasyButtonOver_176)
package copminigame_fla {
import flash.display.*;
public dynamic class EasyButtonOver_176 extends MovieClip {
public function EasyButtonOver_176(){
addFrameScript(19, frame20);
}
function frame20(){
stop();
}
}
}//package copminigame_fla
Section 11
//EasyButtonPress_173 (copminigame_fla.EasyButtonPress_173)
package copminigame_fla {
import flash.display.*;
public dynamic class EasyButtonPress_173 extends MovieClip {
public function EasyButtonPress_173(){
addFrameScript(14, frame15);
}
function frame15(){
stop();
}
}
}//package copminigame_fla
Section 12
//EnemyArt_60 (copminigame_fla.EnemyArt_60)
package copminigame_fla {
import flash.display.*;
public dynamic class EnemyArt_60 extends MovieClip {
public function EnemyArt_60(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package copminigame_fla
Section 13
//GoButton_151 (copminigame_fla.GoButton_151)
package copminigame_fla {
import flash.display.*;
public dynamic class GoButton_151 extends MovieClip {
public var _Press:MovieClip;
public var _Up:MovieClip;
public var _Over:MovieClip;
public function GoButton_151(){
addFrameScript(0, frame1, 6, frame7, 14, frame15);
}
function frame7(){
_Up.visible = false;
_Over.visible = true;
_Over.gotoAndPlay(1);
_Press.visible = false;
stop();
}
function frame1(){
_Up.visible = true;
_Over.visible = false;
_Press.visible = false;
stop();
}
function frame15(){
_Up.visible = false;
_Over.visible = false;
_Press.visible = true;
_Press.gotoAndPlay(1);
stop();
}
}
}//package copminigame_fla
Section 14
//GoButtonOver_153 (copminigame_fla.GoButtonOver_153)
package copminigame_fla {
import flash.display.*;
public dynamic class GoButtonOver_153 extends MovieClip {
public function GoButtonOver_153(){
addFrameScript(9, frame10);
}
function frame10(){
stop();
}
}
}//package copminigame_fla
Section 15
//GoButtonPress_155 (copminigame_fla.GoButtonPress_155)
package copminigame_fla {
import flash.display.*;
public dynamic class GoButtonPress_155 extends MovieClip {
public function GoButtonPress_155(){
addFrameScript(9, frame10);
}
function frame10(){
stop();
}
}
}//package copminigame_fla
Section 16
//HardButton_167 (copminigame_fla.HardButton_167)
package copminigame_fla {
import flash.display.*;
public dynamic class HardButton_167 extends MovieClip {
public var _Press:MovieClip;
public var _Up:MovieClip;
public var _Over:MovieClip;
public function HardButton_167(){
addFrameScript(0, frame1, 6, frame7, 14, frame15);
}
function frame7(){
_Up.visible = false;
_Over.visible = true;
_Over.gotoAndPlay(1);
_Press.visible = false;
stop();
}
function frame1(){
_Up.visible = true;
_Over.visible = false;
_Press.visible = false;
stop();
}
function frame15(){
_Up.visible = false;
_Over.visible = false;
_Press.visible = true;
_Press.gotoAndPlay(1);
stop();
}
}
}//package copminigame_fla
Section 17
//HardButtonOver_171 (copminigame_fla.HardButtonOver_171)
package copminigame_fla {
import flash.display.*;
public dynamic class HardButtonOver_171 extends MovieClip {
public function HardButtonOver_171(){
addFrameScript(19, frame20);
}
function frame20(){
stop();
}
}
}//package copminigame_fla
Section 18
//HardButtonPress_168 (copminigame_fla.HardButtonPress_168)
package copminigame_fla {
import flash.display.*;
public dynamic class HardButtonPress_168 extends MovieClip {
public function HardButtonPress_168(){
addFrameScript(14, frame15);
}
function frame15(){
stop();
}
}
}//package copminigame_fla
Section 19
//MoreInfoButton_112 (copminigame_fla.MoreInfoButton_112)
package copminigame_fla {
import flash.display.*;
public dynamic class MoreInfoButton_112 extends MovieClip {
public var _Press:MovieClip;
public var _Up:MovieClip;
public var _Over:MovieClip;
public function MoreInfoButton_112(){
addFrameScript(0, frame1, 6, frame7, 14, frame15);
}
function frame7(){
_Up.visible = false;
_Over.visible = true;
_Over.gotoAndPlay(1);
_Press.visible = false;
stop();
}
function frame1(){
_Up.visible = true;
_Over.visible = false;
_Press.visible = false;
stop();
}
function frame15(){
_Up.visible = false;
_Over.visible = false;
_Press.visible = true;
_Press.gotoAndPlay(1);
stop();
}
}
}//package copminigame_fla
Section 20
//MoreInfoButtonOver_115 (copminigame_fla.MoreInfoButtonOver_115)
package copminigame_fla {
import flash.display.*;
public dynamic class MoreInfoButtonOver_115 extends MovieClip {
public function MoreInfoButtonOver_115(){
addFrameScript(4, frame5);
}
function frame5(){
stop();
}
}
}//package copminigame_fla
Section 21
//MoreInfoButtonPress_113 (copminigame_fla.MoreInfoButtonPress_113)
package copminigame_fla {
import flash.display.*;
public dynamic class MoreInfoButtonPress_113 extends MovieClip {
public function MoreInfoButtonPress_113(){
addFrameScript(9, frame10);
}
function frame10(){
stop();
}
}
}//package copminigame_fla
Section 22
//Music_185 (copminigame_fla.Music_185)
package copminigame_fla {
import flash.display.*;
public dynamic class Music_185 extends MovieClip {
public function Music_185(){
addFrameScript(0, frame1, 10, frame11, 20, frame21);
}
function frame1(){
stop();
}
function frame21(){
gotoAndStop("_hold");
}
function frame11(){
gotoAndStop("_hold");
}
}
}//package copminigame_fla
Section 23
//OrderButtonOver_110 (copminigame_fla.OrderButtonOver_110)
package copminigame_fla {
import flash.display.*;
public dynamic class OrderButtonOver_110 extends MovieClip {
public function OrderButtonOver_110(){
addFrameScript(4, frame5);
}
function frame5(){
stop();
}
}
}//package copminigame_fla
Section 24
//OrderButtonPress_108 (copminigame_fla.OrderButtonPress_108)
package copminigame_fla {
import flash.display.*;
public dynamic class OrderButtonPress_108 extends MovieClip {
public function OrderButtonPress_108(){
addFrameScript(9, frame10);
}
function frame10(){
stop();
}
}
}//package copminigame_fla
Section 25
//OrderGameButton_107 (copminigame_fla.OrderGameButton_107)
package copminigame_fla {
import flash.display.*;
public dynamic class OrderGameButton_107 extends MovieClip {
public var _Press:MovieClip;
public var _Up:MovieClip;
public var _Over:MovieClip;
public function OrderGameButton_107(){
addFrameScript(0, frame1, 6, frame7, 14, frame15);
}
function frame7(){
_Up.visible = false;
_Over.visible = true;
_Over.gotoAndPlay(1);
_Press.visible = false;
stop();
}
function frame1(){
_Up.visible = true;
_Over.visible = false;
_Press.visible = false;
stop();
}
function frame15(){
_Up.visible = false;
_Over.visible = false;
_Press.visible = true;
_Press.gotoAndPlay(1);
stop();
}
}
}//package copminigame_fla
Section 26
//PlayerArt_57 (copminigame_fla.PlayerArt_57)
package copminigame_fla {
import flash.display.*;
public dynamic class PlayerArt_57 extends MovieClip {
public function PlayerArt_57(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package copminigame_fla
Section 27
//PlayNowButton_178 (copminigame_fla.PlayNowButton_178)
package copminigame_fla {
import flash.display.*;
public dynamic class PlayNowButton_178 extends MovieClip {
public var _Press:MovieClip;
public var _Up:MovieClip;
public var _Over:MovieClip;
public function PlayNowButton_178(){
addFrameScript(0, frame1, 6, frame7, 14, frame15);
}
function frame7(){
_Up.visible = false;
_Over.visible = true;
_Over.gotoAndPlay(1);
_Press.visible = false;
stop();
}
function frame1(){
_Up.visible = true;
_Over.visible = false;
_Press.visible = false;
stop();
}
function frame15(){
_Up.visible = false;
_Over.visible = false;
_Press.visible = true;
_Press.gotoAndPlay(1);
stop();
}
}
}//package copminigame_fla
Section 28
//PlayNowOver_182 (copminigame_fla.PlayNowOver_182)
package copminigame_fla {
import flash.display.*;
public dynamic class PlayNowOver_182 extends MovieClip {
public function PlayNowOver_182(){
addFrameScript(19, frame20);
}
function frame20(){
stop();
}
}
}//package copminigame_fla
Section 29
//PlayNowPress_179 (copminigame_fla.PlayNowPress_179)
package copminigame_fla {
import flash.display.*;
public dynamic class PlayNowPress_179 extends MovieClip {
public function PlayNowPress_179(){
addFrameScript(14, frame15);
}
function frame15(){
stop();
}
}
}//package copminigame_fla
Section 30
//PoliceLightBlueAim_33 (copminigame_fla.PoliceLightBlueAim_33)
package copminigame_fla {
import flash.display.*;
import flash.events.*;
public dynamic class PoliceLightBlueAim_33 extends MovieClip {
public var Light:MovieClip;
public function PoliceLightBlueAim_33(){
addFrameScript(0, frame1);
}
function frame1(){
addEventListener(Event.ENTER_FRAME, Loop);
}
public function Loop(_arg1:Event):void{
Light.rotation = (Light.rotation + 20);
}
}
}//package copminigame_fla
Section 31
//PoliceLightRedAnim_35 (copminigame_fla.PoliceLightRedAnim_35)
package copminigame_fla {
import flash.display.*;
import flash.events.*;
public dynamic class PoliceLightRedAnim_35 extends MovieClip {
public var Light:MovieClip;
public function PoliceLightRedAnim_35(){
addFrameScript(0, frame1);
}
function frame1(){
addEventListener(Event.ENTER_FRAME, Loop);
}
public function Loop(_arg1:Event):void{
Light.rotation = (Light.rotation + 20);
}
}
}//package copminigame_fla
Section 32
//ReplayButton_96 (copminigame_fla.ReplayButton_96)
package copminigame_fla {
import flash.display.*;
public dynamic class ReplayButton_96 extends MovieClip {
public var _Press:MovieClip;
public var _Up:MovieClip;
public var _Over:MovieClip;
public function ReplayButton_96(){
addFrameScript(0, frame1, 6, frame7, 14, frame15);
}
function frame7(){
_Up.visible = false;
_Over.visible = true;
_Over.gotoAndPlay(1);
_Press.visible = false;
stop();
}
function frame1(){
_Up.visible = true;
_Over.visible = false;
_Press.visible = false;
stop();
}
function frame15(){
_Up.visible = false;
_Over.visible = false;
_Press.visible = true;
_Press.gotoAndPlay(1);
stop();
}
}
}//package copminigame_fla
Section 33
//ReplayButtonOver_100 (copminigame_fla.ReplayButtonOver_100)
package copminigame_fla {
import flash.display.*;
public dynamic class ReplayButtonOver_100 extends MovieClip {
public function ReplayButtonOver_100(){
addFrameScript(4, frame5);
}
function frame5(){
stop();
}
}
}//package copminigame_fla
Section 34
//ReplayButtonPress_97 (copminigame_fla.ReplayButtonPress_97)
package copminigame_fla {
import flash.display.*;
public dynamic class ReplayButtonPress_97 extends MovieClip {
public function ReplayButtonPress_97(){
addFrameScript(9, frame10);
}
function frame10(){
stop();
}
}
}//package copminigame_fla
Section 35
//SendButton_135 (copminigame_fla.SendButton_135)
package copminigame_fla {
import flash.display.*;
public dynamic class SendButton_135 extends MovieClip {
public var _Press:MovieClip;
public var _Up:MovieClip;
public var _Over:MovieClip;
public function SendButton_135(){
addFrameScript(0, frame1, 6, frame7, 14, frame15);
}
function frame7(){
_Up.visible = false;
_Over.visible = true;
_Over.gotoAndPlay(1);
_Press.visible = false;
stop();
}
function frame1(){
_Up.visible = true;
_Over.visible = false;
_Press.visible = false;
stop();
}
function frame15(){
_Up.visible = false;
_Over.visible = false;
_Press.visible = true;
_Press.gotoAndPlay(1);
stop();
}
}
}//package copminigame_fla
Section 36
//SendButtonOver_137 (copminigame_fla.SendButtonOver_137)
package copminigame_fla {
import flash.display.*;
public dynamic class SendButtonOver_137 extends MovieClip {
public function SendButtonOver_137(){
addFrameScript(9, frame10);
}
function frame10(){
stop();
}
}
}//package copminigame_fla
Section 37
//SendButtonPress_139 (copminigame_fla.SendButtonPress_139)
package copminigame_fla {
import flash.display.*;
public dynamic class SendButtonPress_139 extends MovieClip {
public function SendButtonPress_139(){
addFrameScript(9, frame10);
}
function frame10(){
stop();
}
}
}//package copminigame_fla
Section 38
//SendFriendButton_102 (copminigame_fla.SendFriendButton_102)
package copminigame_fla {
import flash.display.*;
public dynamic class SendFriendButton_102 extends MovieClip {
public var _Press:MovieClip;
public var _Up:MovieClip;
public var _Over:MovieClip;
public function SendFriendButton_102(){
addFrameScript(0, frame1, 6, frame7, 14, frame15);
}
function frame7(){
_Up.visible = false;
_Over.visible = true;
_Over.gotoAndPlay(1);
_Press.visible = false;
stop();
}
function frame1(){
_Up.visible = true;
_Over.visible = false;
_Press.visible = false;
stop();
}
function frame15(){
_Up.visible = false;
_Over.visible = false;
_Press.visible = true;
_Press.gotoAndPlay(1);
stop();
}
}
}//package copminigame_fla
Section 39
//SendFriendButtonOver_105 (copminigame_fla.SendFriendButtonOver_105)
package copminigame_fla {
import flash.display.*;
public dynamic class SendFriendButtonOver_105 extends MovieClip {
public function SendFriendButtonOver_105(){
addFrameScript(4, frame5);
}
function frame5(){
stop();
}
}
}//package copminigame_fla
Section 40
//SendFriendButtonPress_103 (copminigame_fla.SendFriendButtonPress_103)
package copminigame_fla {
import flash.display.*;
public dynamic class SendFriendButtonPress_103 extends MovieClip {
public function SendFriendButtonPress_103(){
addFrameScript(9, frame10);
}
function frame10(){
stop();
}
}
}//package copminigame_fla
Section 41
//Sfx_184 (copminigame_fla.Sfx_184)
package copminigame_fla {
import flash.display.*;
public dynamic class Sfx_184 extends MovieClip {
public function Sfx_184(){
addFrameScript(0, frame1, 10, frame11, 20, frame21, 30, frame31, 40, frame41, 50, frame51, 60, frame61, 70, frame71, 80, frame81, 90, frame91, 100, frame101, 110, frame111, 120, frame121, 130, frame131, 181, frame182, 195, frame196, 205, frame206, 215, frame216, 225, frame226, 235, frame236, 250, frame251, 260, frame261, 270, frame271, 280, frame281, 290, frame291);
}
function frame71(){
gotoAndStop("_hold");
}
function frame281(){
gotoAndStop("_hold");
}
function frame206(){
gotoAndStop("_hold");
}
function frame81(){
gotoAndStop("_hold");
}
function frame291(){
gotoAndStop("_hold");
}
function frame91(){
gotoAndStop("_hold");
}
function frame226(){
gotoAndStop("_hold");
}
function frame1(){
stop();
}
function frame182(){
gotoAndStop("_hold");
}
function frame216(){
gotoAndStop("_hold");
}
function frame21(){
gotoAndStop("_hold");
}
function frame111(){
gotoAndStop("_hold");
}
function frame101(){
gotoAndStop("_hold");
}
function frame196(){
gotoAndStop("_hold");
}
function frame236(){
gotoAndStop("_hold");
}
function frame31(){
gotoAndStop("_hold");
}
function frame11(){
trace("_stop");
gotoAndStop("_hold");
}
function frame41(){
gotoAndStop("_hold");
}
function frame121(){
gotoAndStop("_hold");
}
function frame251(){
gotoAndStop("_hold");
}
function frame131(){
gotoAndStop("_hold");
}
function frame51(){
gotoAndStop("_hold");
}
function frame261(){
gotoAndStop("_hold");
}
function frame61(){
gotoAndStop("_hold");
}
function frame271(){
gotoAndStop("_hold");
}
}
}//package copminigame_fla
Section 42
//SoundOffInd_191 (copminigame_fla.SoundOffInd_191)
package copminigame_fla {
import flash.display.*;
import flash.text.*;
public dynamic class SoundOffInd_191 extends MovieClip {
public var Text:TextField;
}
}//package copminigame_fla
Section 43
//SoundOnInd_190 (copminigame_fla.SoundOnInd_190)
package copminigame_fla {
import flash.display.*;
import flash.text.*;
public dynamic class SoundOnInd_190 extends MovieClip {
public var Text:TextField;
}
}//package copminigame_fla
Section 44
//AILayer (AILayer)
package {
import flash.display.*;
public class AILayer extends MovieClip {
public var mAINodes:Array;
public var _10:MovieClip;
public var _11:MovieClip;
public var _13:MovieClip;
public var _14:MovieClip;
public var _15:MovieClip;
public var _16:MovieClip;
public var _17:MovieClip;
public var _18:MovieClip;
public var _12:MovieClip;
public var _19:MovieClip;
public var _20:MovieClip;
public var _21:MovieClip;
public var _22:MovieClip;
public var _23:MovieClip;
public var _24:MovieClip;
public var _26:MovieClip;
public var _27:MovieClip;
public var _28:MovieClip;
public var _29:MovieClip;
public var _25:MovieClip;
public var _30:MovieClip;
public var _31:MovieClip;
public var _32:MovieClip;
public var _33:MovieClip;
public var _34:MovieClip;
public var _35:MovieClip;
public var _36:MovieClip;
public var _37:MovieClip;
public var _38:MovieClip;
public var _39:MovieClip;
public var _40:MovieClip;
public var _41:MovieClip;
public var _43:MovieClip;
public var _45:MovieClip;
public var _47:MovieClip;
public var _48:MovieClip;
public var _44:MovieClip;
public var _49:MovieClip;
public var _42:MovieClip;
public var _46:MovieClip;
public var _50:MovieClip;
public var _51:MovieClip;
public var _52:MovieClip;
public var _53:MovieClip;
public var _54:MovieClip;
public var _55:MovieClip;
public var _58:MovieClip;
public var _59:MovieClip;
public var _56:MovieClip;
public var _57:MovieClip;
public var _61:MovieClip;
public var _62:MovieClip;
public var _64:MovieClip;
public var _66:MovieClip;
public var _63:MovieClip;
public var _65:MovieClip;
public var _69:MovieClip;
public var _60:MovieClip;
public var _67:MovieClip;
public var _68:MovieClip;
public var _72:MovieClip;
public var _70:MovieClip;
public var _71:MovieClip;
public var _73:MovieClip;
public var _0:MovieClip;
public var _1:MovieClip;
public var _2:MovieClip;
public var _3:MovieClip;
public var _4:MovieClip;
public var _5:MovieClip;
public var _6:MovieClip;
public var _8:MovieClip;
public var _9:MovieClip;
public var _7:MovieClip;
public function AILayer(){
mAINodes = new Array(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73);
alpha = 0;
}
}
}//package
Section 45
//App (App)
package {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.text.*;
import flash.net.*;
public class App extends MovieClip {
public var mLocal:Localization;
public var mMuted:Boolean;
public var Shell:MovieClip;
public var Game:MovieClip;
public var AppControl:MovieClip;
public var mMode:String;
public var SoundManager:MovieClip;
public function App(){
trace("App ()");
mMuted = false;
}
function Init():void{
trace((name + " >> Init ()"));
mLocal = new Localization(this, parent["mLang"]);
mLocal.LocalizeText();
SetMode("Shell");
AppControl.Init();
}
function SetMode(_arg1:String):void{
trace(("pMode == " + _arg1));
if (_arg1 == "Shell"){
Shell.visible = true;
Game.visible = false;
SoundManager.StopMusic();
SoundManager.PlayMusic("_theme1");
Shell.Init();
};
if (_arg1 == "Game"){
if (mMode == "Shell"){
AppControl.gotoAndPlay("_inGame");
};
Shell.visible = false;
Game.visible = true;
Game.Init();
};
mMode = _arg1;
}
function MuteSound():void{
mMuted = true;
SoundManager.MuteSound();
}
function UnmuteSound():void{
mMuted = false;
if (mMode == "Shell"){
SoundManager.PlayMusic("_theme1");
} else {
SoundManager.PlayMusic("_theme2");
};
}
}
}//package
Section 46
//AppControl (AppControl)
package {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.text.*;
import flash.net.*;
public class AppControl extends MovieClip {
public var SoundOnButton:MovieClip;
public var RestartButton:MovieClip;
public var InstructionsButton:MovieClip;
public var SoundOffButton:MovieClip;
public var QuitButton:MovieClip;
public var SoundOffInd:MovieClip;
public var SoundOnInd:MovieClip;
public function AppControl(){
addFrameScript(0, frame1, 9, frame10);
trace("AppControl ()");
}
function OnRestartOver(_arg1:MouseEvent):void{
RestartButton.gotoAndStop("_over");
}
function OnQuitUp(_arg1:MouseEvent):void{
QuitButton.gotoAndStop("_up");
}
function Init():void{
trace((name + " >> Init ()"));
QuitButton.addEventListener(MouseEvent.CLICK, OnQuitButton);
QuitButton.addEventListener(MouseEvent.ROLL_OUT, OnQuitUp);
QuitButton.addEventListener(MouseEvent.ROLL_OVER, OnQuitOver);
RestartButton.addEventListener(MouseEvent.CLICK, OnRestartButton);
RestartButton.addEventListener(MouseEvent.ROLL_OUT, OnRestartUp);
RestartButton.addEventListener(MouseEvent.ROLL_OVER, OnRestartOver);
InstructionsButton.addEventListener(MouseEvent.CLICK, OnInstructionsButton);
InstructionsButton.addEventListener(MouseEvent.ROLL_OUT, OnInstructionsUp);
InstructionsButton.addEventListener(MouseEvent.ROLL_OVER, OnInstructionsOver);
SoundOnButton.addEventListener(MouseEvent.CLICK, OnSoundOnButton);
SoundOffButton.addEventListener(MouseEvent.CLICK, OnSoundOffButton);
SoundOnButton.visible = false;
SoundOffButton.visible = true;
SoundOnInd.Text.textColor = 0xFF0000;
SoundOffInd.Text.textColor = 0xFFFFFF;
}
function OnInstructionsOver(_arg1:MouseEvent):void{
InstructionsButton.gotoAndStop("_over");
}
function OnSoundOffButton(_arg1:MouseEvent):void{
var _local2 = parent;
_local2["MuteSound"]();
SoundOnButton.visible = true;
SoundOffButton.visible = false;
SoundOnInd.Text.textColor = 0xFFFFFF;
SoundOffInd.Text.textColor = 0xFF0000;
}
function frame10(){
stop();
}
function OnRestartButton(_arg1:MouseEvent):void{
RestartButton.gotoAndStop("_press");
var _local2 = parent;
_local2["SetMode"]("Game");
}
function frame1(){
stop();
}
function OnSoundOnButton(_arg1:MouseEvent):void{
var _local2 = parent;
_local2["UnmuteSound"]();
SoundOnButton.visible = false;
SoundOffButton.visible = true;
SoundOnInd.Text.textColor = 0xFF0000;
SoundOffInd.Text.textColor = 0xFFFFFF;
}
function OnInstructionsButton(_arg1:MouseEvent):void{
InstructionsButton.gotoAndStop("_press");
if (parent["mMode"] == "Shell"){
parent["Shell"].MainMenu.Hide("PlayNow");
} else {
if (parent["mMode"] == "Game"){
parent["Game"].Hud.ShowPop("InstructionsPop");
parent["Game"].PauseGame();
};
};
}
function OnQuitButton(_arg1:MouseEvent):void{
QuitButton.gotoAndStop("_press");
parent["Game"].StopGameLoop();
var _local2 = parent;
_local2["SetMode"]("Shell");
}
function OnRestartUp(_arg1:MouseEvent):void{
RestartButton.gotoAndStop("_up");
}
function OnQuitOver(_arg1:MouseEvent):void{
QuitButton.gotoAndStop("_over");
}
function OnInstructionsUp(_arg1:MouseEvent):void{
InstructionsButton.gotoAndStop("_up");
}
}
}//package
Section 47
//BaseSprite (BaseSprite)
package {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.utils.*;
import flash.text.*;
import flash.net.*;
public class BaseSprite extends MovieClip {
public const mFMathPi180:Number = 0.0174532925199433;
public const mFMathArtRotRatio:Number = 2.5531914893617;
public const mFMath180Pi:Number = 57.2957795130823;
public var mDefaultFric:Number;
public var mDriveMaxAccel:int;
public var mAng:Number;
public var mGameStage:MovieClip;
public var mTotalTime:int;
public var mPlayerSkid:Boolean;
public var mTotalForce:Number;
public var start:Number;
public var mStartTime:int;
public var mColForceX:Number;
public var mCue:MovieClip;
public var mOilSlick:Boolean;
public var RightFlame:MovieClip;
public var mColForceY:Number;
public var mSoundManager:MovieClip;
public var mPlayerSkidTime:int;
public var mThrottle:int;
public var mArt:MovieClip;
public var LeftEmiter:MovieClip;
public var TestEnd:Number;
public var RightEmiter:MovieClip;
public var mSpriteLayer:MovieClip;
public var mTiremarksLayer:MovieClip;
public var mXpos:Number;
public var mFric:Number;
public var mMass:int;
public var mProps:MovieClip;
public var mColAng:Number;
public var mEnemySkidTime:int;
public var mMtmAng:Number;
public var mEnemySkid:Boolean;
public var mBoost:int;
public var mAccelY:Number;
public var mAccelX:Number;
public var mYpos:Number;
public var LeftFlame:MovieClip;
public var mBoostLife:Number;
public var mAccelAng:Number;
public var mSteer:Number;
public var mDrivePowerX:Number;
public var mDrivePowerY:Number;
public var mTalkingHeads:MovieClip;
public var mForceX:Number;
public var mForceY:Number;
public var mDialogueCues:Array;
public var TimerStarted:Boolean;
public var mBoostOn:Boolean;
public var mRangeTime:int;
public var mTiremarkBool:Boolean;
public var mDriveForce:Number;
public var mDriveAccel:int;
public var mBombTimer:int;
public var mOilSlickTime:int;
public var mDrivePower:int;
public var mGameStageX:Number;
public var mGameStageY:Number;
public var mOilSlickBool:Boolean;
public var mGame:MovieClip;
public function BaseSprite(){
trace((name + " >> BaseSprite ()"));
mSteer = 0;
mThrottle = 0;
mBoost = 0;
mBoostLife = 0;
mBoostOn = false;
mDrivePower = 0;
mDrivePowerX = 0;
mDrivePowerY = 0;
mDriveMaxAccel = 550;
mDriveAccel = 0;
mForceX = 0;
mForceY = 0;
mPlayerSkid = false;
mEnemySkid = false;
mPlayerSkidTime = 0;
mEnemySkidTime = 0;
mAng = rotation;
mXpos = x;
mYpos = y;
mMass = 1200;
mColAng = 0;
mAccelAng = 0;
mColForceX = 0;
mColForceY = 0;
mMtmAng = 0;
TimerStarted = false;
mOilSlick = false;
mTiremarkBool = false;
mOilSlickBool = false;
alpha = 0.01;
}
function OnOilSlick():void{
mOilSlickTime++;
mOilSlick = true;
mColAng = 180;
mFric = 0.99;
}
function OnCntrlRt():void{
if (mBoostOn){
mFric = (mDefaultFric * 0.9);
} else {
mFric = (mDefaultFric * 0.93);
};
if (mSteer < 1){
mSteer = (mSteer + 0.25);
};
}
function OnCtrlSpace():void{
StartBoost();
}
function AddWorldCol(_arg1:Number):void{
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
mDriveAccel = (mDriveAccel * 0.5);
_local2 = (2 + ((Math.abs(mForceX) + Math.abs(mForceY)) / 10));
if (mBoostOn){
_local2 = (2 + ((Math.abs(mForceX) + Math.abs(mForceY)) / 5));
};
if (_local2 < 2.5){
_local2 = 3;
};
trace(_local2);
_local3 = _arg1;
if (_local3 < -180){
_local3 = (_local3 + 360);
} else {
if (_local3 > 180){
_local3 = (_local3 - 360);
};
};
_local4 = (_local3 * mFMathPi180);
_local5 = Math.sin(_local4);
_local6 = Math.cos(_local4);
mColForceX = (_local2 * (_local5 * -1));
mColForceY = (_local2 * _local6);
_local7 = (_local3 - rotation);
if (_local7 > 90){
_local7 = (_local7 - 180);
} else {
if (_local7 < -90){
_local7 = (_local7 + 180);
};
};
if (_local7 < -180){
_local7 = (_local7 + 360);
} else {
if (_local7 > 180){
_local7 = (_local7 - 360);
};
};
if (_local7 > 15){
mColForceX = (mColForceX * 0.35);
mColForceY = (mColForceY * 0.35);
};
if (_local7 < -15){
mColForceX = (mColForceX * 0.35);
mColForceY = (mColForceY * 0.35);
};
_local3 = (_local3 * 0.5);
if (rotation < 90){
mColAng = (_local3 * -1);
} else {
mColAng = _local3;
};
mDriveAccel = (mDriveAccel * 0.5);
}
function UpdateBoost():void{
var _local1:Point;
var _local2:Point;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
mGame.UpdateBoostVal();
_local1 = new Point(LeftFlame.x, LeftFlame.y);
_local1 = localToGlobal(_local1);
_local2 = new Point(RightFlame.x, RightFlame.y);
_local2 = localToGlobal(_local2);
_local3 = (_local1.x - mGameStageX);
_local4 = (_local1.y - mGameStageY);
_local5 = (_local2.x - mGameStageX);
_local6 = (_local2.y - mGameStageY);
mSpriteLayer.FlameLayer.AddFlame(_local3, _local4, mMtmAng);
mSpriteLayer.FlameLayer.AddFlame(_local5, _local6, mMtmAng);
}
function OnCntrlDn():void{
if (mDriveAccel < mDriveMaxAccel){
mDriveAccel = (mDriveAccel + 20);
};
mThrottle = -1;
}
function OnCntrlUp():void{
if (mSpriteLayer.mColTimer == 0){
if ((((mDriveAccel < 200)) && ((mThrottle == 0)))){
if (name == "PlayerSprite"){
mPlayerSkid = true;
mPlayerSkidTime = 0;
mSoundManager.PlaySfx("_peel");
};
};
if (mDriveAccel < mDriveMaxAccel){
mDriveAccel = (mDriveAccel + 20);
};
mThrottle = 1;
};
}
function Decelerate():void{
mThrottle = 0;
if (mDriveAccel > 0){
mDriveAccel = (mDriveAccel - 20);
} else {
mDriveAccel = 0;
};
}
function StopBoost():void{
parent.parent.parent["mBoostOn"] = false;
mBoost = 0;
mBoostOn = false;
}
function StartBoost():void{
var _local1:Number;
_local1 = parent.parent.parent["mPlayerData"].Boost;
if ((((_local1 > 0)) && ((mBoostOn == false)))){
parent.parent.parent["mBoostOn"] = true;
mBoost = 450;
mBoostOn = true;
mSoundManager.PlaySfx("_boost");
};
}
function UpdateArt():void{
var _local1:Number;
var _local2:int;
mArt.x = x;
mArt.y = y;
_local1 = rotation;
if (_local1 < 0){
_local1 = (_local1 + 360);
};
_local2 = Math.round((_local1 / mFMathArtRotRatio));
mArt.gotoAndStop(_local2);
}
function StopSteer():void{
mFric = mDefaultFric;
mSteer = 0;
}
function GetDialogueCues():void{
var _local1:int;
var _local2:int;
var _local3:Number;
var _local4:Number;
var _local5:String;
_local1 = mDialogueCues.length;
_local2 = 0;
while (_local2 < _local1) {
mCue = mDialogueCues[_local2];
if (mCue){
_local3 = (mCue.x - x);
_local4 = (mCue.y - y);
_local5 = mCue.name;
_local3 = ((_local3 < 0)) ? _local3 = (_local3 * -1);
_local3 : _local3 = (_local3 * 1);
_local3;
_local4 = ((_local4 < 0)) ? _local4 = (_local4 * -1);
_local4 : _local4 = (_local4 * 1);
_local4;
if ((((_local3 < 500)) && ((_local4 < 500)))){
if (_local5 == "_0"){
mSoundManager.PlaySfx("_radio");
mTalkingHeads.ShowDialogue(0);
} else {
if (_local5 == "_1"){
mTalkingHeads.ShowDialogue(1);
} else {
if (_local5 == "_2"){
mSoundManager.PlaySfx("_radio");
mTalkingHeads.ShowDialogue(2);
} else {
if (_local5 == "_3"){
mTalkingHeads.ShowDialogue(3);
} else {
if (_local5 == "_4"){
mSoundManager.PlaySfx("_radio");
mTalkingHeads.ShowDialogue(4);
} else {
if (_local5 == "_5"){
mTalkingHeads.ShowDialogue(5);
} else {
if (_local5 == "_6"){
mSoundManager.PlaySfx("_radio");
mTalkingHeads.ShowDialogue(6);
} else {
if (_local5 == "_7"){
mSoundManager.PlaySfx("_radio");
mTalkingHeads.ShowDialogue(7);
};
};
};
};
};
};
};
};
mDialogueCues.splice(_local2, 1);
};
};
_local2++;
};
}
function UpdateOilSlick():void{
var _local1:Point;
var _local2:Point;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
if (mOilSlickTime < 45){
mOilSlickTime++;
mColAng = 180;
mFric = 0.85;
if (mOilSlickTime > 5){
_local1 = new Point(LeftEmiter.x, LeftEmiter.y);
_local1 = localToGlobal(_local1);
_local2 = new Point(RightEmiter.x, RightEmiter.y);
_local2 = localToGlobal(_local2);
_local3 = (_local1.x - mGameStageX);
_local4 = (_local1.y - mGameStageY);
_local5 = (_local2.x - mGameStageX);
_local6 = (_local2.y - mGameStageY);
if (mOilSlickTime < 40){
_local7 = 1;
} else {
_local7 = ((mOilSlickTime - 45) / 5);
};
mSpriteLayer.TiremarksLayer.AddOilmark(_local3, _local4, mMtmAng, _local7);
mSpriteLayer.TiremarksLayer.AddOilmark(_local5, _local6, mMtmAng, _local7);
};
} else {
mOilSlick = false;
mOilSlickTime = 0;
mFric = mDefaultFric;
};
}
function UpdateSprite():void{
var _local1:Number;
var _local2:Number;
mGameStageX = mGameStage.x;
mGameStageY = mGameStage.y;
mAng = rotation;
mXpos = x;
mYpos = y;
if (mBoostOn){
UpdateBoost();
};
SetThrottle();
mDriveForce = (mDrivePower / mMass);
mDrivePowerX = (mDrivePowerX + (mDriveForce * Math.sin((mAng * mFMathPi180))));
mDrivePowerY = (mDrivePowerY + ((mDriveForce * Math.cos((mAng * mFMathPi180))) * -1));
mForceX = mDrivePowerX;
mForceY = mDrivePowerY;
mAccelAng = (mAccelAng + ((mSteer * (mDrivePower / (mMass * 2))) + (mColAng * 0.1)));
_local1 = (mXpos - (mXpos + mForceX));
_local2 = (mYpos - (mYpos + mForceY));
mMtmAng = ((90 + (Math.atan2(_local2, _local1) * mFMath180Pi)) - 180);
if (mAccelAng > 15){
mAccelAng = 15;
};
if (mAccelAng < -15){
mAccelAng = -15;
};
if (mOilSlick){
UpdateOilSlick();
};
x = (x + (mForceX + (mColForceX * 8)));
y = (y + (mForceY + (mColForceY * 8)));
rotation = (mAng + mAccelAng);
GetSkid();
UpdateArt();
GetDialogueCues();
mDrivePower = ((Math.abs(mDrivePower) > 0.01)) ? (mDrivePower * mFric) : 0;
mDrivePowerX = ((Math.abs(mDrivePowerX) > 0.01)) ? (mDrivePowerX * mFric) : 0;
mDrivePowerY = ((Math.abs(mDrivePowerY) > 0.01)) ? (mDrivePowerY * mFric) : 0;
mAccelAng = ((Math.abs(mAccelAng) > 0.01)) ? (mAccelAng * mFric) : 0;
mForceX = ((Math.abs(mForceX) > 0.01)) ? (mForceX * mFric) : 0;
mForceY = ((Math.abs(mForceY) > 0.01)) ? (mForceY * mFric) : 0;
mColForceX = ((Math.abs(mColForceX) > 0.01)) ? (mColForceX * 0.9) : 0;
mColForceY = ((Math.abs(mColForceY) > 0.01)) ? (mColForceY * 0.9) : 0;
mColAng = 0;
}
function AddCol(_arg1:Number, _arg2:Number, _arg3:Number):void{
var _local4:Number;
var _local5:Number;
mDrivePower = (mDrivePower * 0.5);
if (name == "EnemySprite"){
mDrivePower = 0;
mDrivePowerX = 0;
mDrivePowerY = 0;
mForceX = 0;
mForceY = 0;
};
_local4 = _arg3;
if (Math.abs(_local4) < 1){
if (name == "PlayerSprite"){
_local4 = -1;
};
if (name == "EnemySprite"){
_local4 = 1;
};
};
mColForceX = (_local4 * Math.sin((_arg1 * mFMathPi180)));
mColForceY = ((_local4 * Math.cos((_arg1 * mFMathPi180))) * -1);
_local5 = ((_arg1 - (_arg2 - Math.abs(_arg1))) * -1);
if (_local5 < -180){
_local5 = (_local5 + 360);
} else {
if (_local5 > 180){
_local5 = (_local5 - 360);
};
};
if ((((_local5 < 90)) && ((_local5 > 0)))){
_local5 = 90;
} else {
if ((((_local5 > -90)) && ((_local5 < 0)))){
_local5 = -90;
} else {
if (_local5 == 0){
_local5 = 90;
};
};
};
mColAng = _local5;
}
function OnCntrlLt():void{
if (mBoostOn){
mFric = (mDefaultFric * 0.9);
} else {
mFric = (mDefaultFric * 0.93);
};
if (mSteer > -1){
mSteer = (mSteer - 0.25);
};
}
function SetThrottle():void{
mDrivePower = (mDrivePower + ((mDriveAccel + mBoost) * mThrottle));
}
function GetSkid():void{
var _local1:Number;
var _local2:Point;
var _local3:Point;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
if ((((mAccelAng > 5)) || ((mAccelAng < -5)))){
_local1 = Math.floor((Math.random() * 3));
if (name == "PlayerSprite"){
if (!mPlayerSkid){
if (_local1 == 0){
mSoundManager.PlaySfx("_skid1");
};
if (_local1 == 1){
mSoundManager.PlaySfx("_skid2");
};
if (_local1 == 2){
mSoundManager.PlaySfx("_skid3");
};
mPlayerSkid = true;
};
};
};
if (mPlayerSkid){
if (mPlayerSkidTime < 20){
mPlayerSkidTime++;
if (name == "PlayerSprite"){
if (mTiremarkBool){
_local2 = new Point(LeftEmiter.x, LeftEmiter.y);
_local2 = localToGlobal(_local2);
_local3 = new Point(RightEmiter.x, RightEmiter.y);
_local3 = localToGlobal(_local3);
_local4 = (_local2.x - mGameStageX);
_local5 = (_local2.y - mGameStageY);
_local6 = (_local3.x - mGameStageX);
_local7 = (_local3.y - mGameStageY);
mSpriteLayer.TiremarksLayer.AddTiremark(_local4, _local5, mMtmAng);
mSpriteLayer.TiremarksLayer.AddTiremark(_local6, _local7, mMtmAng);
mTiremarkBool = false;
} else {
mTiremarkBool = true;
};
};
} else {
mPlayerSkid = false;
mPlayerSkidTime = 0;
};
};
}
}
}//package
Section 48
//Bomb (Bomb)
package {
public class Bomb extends Prop {
public function Bomb(){
addFrameScript(10, frame11, 29, frame30);
mType = "Bomb";
}
function frame30(){
stop();
}
function frame11(){
stop();
}
}
}//package
Section 49
//Bubble (Bubble)
package {
import flash.display.*;
import flash.text.*;
public class Bubble extends MovieClip {
public var PrintText:TextField;
}
}//package
Section 50
//BuildingsLayer (BuildingsLayer)
package {
import flash.display.*;
public class BuildingsLayer extends MovieClip {
function Init():void{
trace((name + " >> Init ()"));
x = 0;
y = 0;
}
function Loop():void{
}
}
}//package
Section 51
//CarExplosion (CarExplosion)
package {
public class CarExplosion extends Prop {
public function CarExplosion(){
addFrameScript(48, frame49);
}
function frame49(){
var _local1 = parent;
_local1["OnCarExplosion"]();
_local1 = parent;
_local1["RemoveFX"](this);
stop();
}
}
}//package
Section 52
//ChiefHead (ChiefHead)
package {
public class ChiefHead extends TalkingHeadClass {
public function ChiefHead(){
addFrameScript(0, frame1, 9, frame10, 19, frame20);
}
function frame10(){
stop();
}
function frame1(){
stop();
}
function frame20(){
stop();
}
}
}//package
Section 53
//COPMiniGame (COPMiniGame)
package {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.text.*;
import flash.net.*;
public class COPMiniGame extends MovieClip {
public var App:MovieClip;
public var mLocal:Localization;
public var mLocales:Array;
public var mLanguages:Array;
public var mLocale:String;
public var Bar:MovieClip;
public var mFlashVars;
public var mLang:String;
public var LoadPct:TextField;
public function COPMiniGame(){
addFrameScript(0, frame1, 4, frame5);
mLocales = new Array("en-US", "en-GB", "de-DE", "es-ES", "fr-FR", "it-IT", "nl-NL");
mLanguages = new Array("US", "GB", "DE", "ES", "FR", "IT", "NL");
mLocale = mLocales[0];
mLang = mLanguages[0];
mLocal = new Localization(this, mLang);
mLocal.LocalizeText();
}
function Init():void{
stage.quality = StageQuality.MEDIUM;
trace((name + " >> Init ()"));
App.Init();
}
function ThisLoadComplete():void{
var _local1:String;
var _local2:int;
var _local3:String;
mFlashVars = LoaderInfo(this.root.loaderInfo).parameters;
_local1 = mFlashVars.locale;
if (mFlashVars == undefined){
_local1 = "en-US";
};
_local2 = 0;
for each (_local3 in mLocales) {
if (_local1 == mLocales[_local2]){
mLocale = mLocales[_local2];
mLang = mLanguages[_local2];
};
_local2++;
};
gotoAndStop("_show");
}
function frame1(){
Preload();
MochiBot.track(this, "becd05d9");
}
function frame5(){
OnShow();
}
function LoadCheck(_arg1:ProgressEvent):void{
var _local2:Number;
_local2 = ((_arg1.bytesLoaded / _arg1.bytesTotal) * 100);
Bar.scaleX = (_local2 / 100);
LoadPct.text = (int(_local2) + "%");
if (_local2 == 100){
ThisLoadComplete();
gotoAndStop("_show");
};
}
function OnShow():void{
Init();
}
function Preload():void{
stop();
this.loaderInfo.addEventListener(ProgressEvent.PROGRESS, LoadCheck);
}
}
}//package
Section 54
//Countdown (Countdown)
package {
import flash.display.*;
public class Countdown extends MovieClip {
public function Countdown(){
addFrameScript(0, frame1, 77, frame78, 105, frame106);
}
function frame78(){
OnGo();
}
public function Show():void{
gotoAndPlay("_show");
}
public function OnGo():void{
var _local1 = parent.parent;
_local1["StartGameLoop"]();
}
function frame106(){
stop();
}
function frame1(){
stop();
}
}
}//package
Section 55
//Crash (Crash)
package {
public class Crash extends Prop {
public function Crash(){
addFrameScript(4, frame5);
mType = "Crash";
}
function frame5(){
stop();
var _local1 = parent;
_local1["RemoveFX"](this);
}
}
}//package
Section 56
//DialogueBubble (DialogueBubble)
package {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.text.*;
import flash.net.*;
public class DialogueBubble extends MovieClip {
public var Bubble:MovieClip;
public function DialogueBubble(){
addFrameScript(0, frame1, 9, frame10, 19, frame20);
}
public function Show():void{
gotoAndPlay("_show");
}
function frame10(){
stop();
}
public function Hide():void{
gotoAndPlay("_hide");
}
function frame1(){
stop();
}
function frame20(){
stop();
}
public function SetText(_arg1:String):void{
Bubble.PrintText.textColor = 0xFFFFFF;
Bubble.PrintText.text = _arg1;
}
}
}//package
Section 57
//DialogueCueLayer (DialogueCueLayer)
package {
import flash.display.*;
public class DialogueCueLayer extends MovieClip {
public var mDialogueCues:Array;
public var _0:MovieClip;
public var _2:MovieClip;
public var _4:MovieClip;
public var _6:MovieClip;
public var _1:MovieClip;
public var _3:MovieClip;
public var _5:MovieClip;
public var _7:MovieClip;
public function DialogueCueLayer(){
alpha = 0;
}
public function Init(){
mDialogueCues = new Array(_0, _1, _2, _3, _4, _5, _6, _7);
}
}
}//package
Section 58
//EnemyLifeBar (EnemyLifeBar)
package {
public class EnemyLifeBar extends LifeBar {
}
}//package
Section 59
//EnemySprite (EnemySprite)
package {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.utils.*;
import flash.text.*;
import flash.net.*;
public class EnemySprite extends BaseSprite {
public var mBombNum:int;
public var mAiPole:int;
public var mInitX:int;
public var mInitY:int;
public var mTarg:MovieClip;
public var mNodeInt:int;
public function EnemySprite(){
mInitX = x;
mInitY = y;
}
function UpdateAI():void{
var _local1:Number;
var _local2:Number;
var _local3:Number;
if ((((mSpriteLayer.mWorldColTimer == 0)) && ((mSpriteLayer.mColTimer == 0)))){
mBombTimer = 0;
_local1 = (mTarg.x - x);
_local2 = (mTarg.y - y);
_local3 = ((90 + (Math.atan2(_local2, _local1) * mFMath180Pi)) * mAiPole);
if (_local3 < -180){
_local3 = (_local3 + 360);
} else {
if (_local3 > 180){
_local3 = (_local3 - 360);
};
};
if (((((_local3 - rotation) > 3)) || (((_local3 - rotation) < -3)))){
if (rotation < _local3){
OnCntrlRt();
} else {
if (rotation > _local3){
OnCntrlLt();
};
};
} else {
mAiPole = 1;
rotation = _local3;
StopSteer();
};
} else {
if ((((mSpriteLayer.mColTimer == 0)) && ((mSpriteLayer.mWorldColTimer > 0)))){
mAiPole = 1;
} else {
Decelerate();
StopSteer();
};
};
}
function Loop():void{
var _local1:Number;
var _local2:Number;
mTarg = mSpriteLayer.AILayer.mAINodes[mNodeInt];
if (mTarg){
_local1 = (mTarg.x - x);
_local2 = (mTarg.y - y);
_local1 = ((_local1 < 0)) ? _local1 = (_local1 * -1);
_local1 : _local1 = (_local1 * 1);
_local1;
_local2 = ((_local2 < 0)) ? _local2 = (_local2 * -1);
_local2 : _local2 = (_local2 * 1);
_local2;
if ((((_local1 < 100)) && ((_local2 < 100)))){
mNodeInt++;
} else {
if (mAiPole == 1){
OnCntrlUp();
} else {
OnCntrlDn();
};
};
UpdateAI();
UpdateSprite();
} else {
mGame.LoseGameTimeOut();
};
EmitBombTimer();
}
function EmitBombTimer():void{
if (mBombTimer >= 125){
EmitBomb();
mBombTimer = 0;
} else {
mBombTimer++;
};
}
function Init():void{
trace((name + " >> Init ()"));
mSpriteLayer = parent.parent["SpriteLayer"];
mSoundManager = parent.parent.parent.parent["SoundManager"];
mGame = parent.parent.parent.parent["Game"];
mGameStage = parent.parent.parent["GameStage"];
mProps = parent["mPropsClip"];
mTiremarksLayer = parent["TiremarksLayer"];
mArt = parent["EnemyArt"];
mTalkingHeads = parent.parent.parent["Hud"].TalkingHeads;
mDialogueCues = parent["DialogueCueLayer"].mDialogueCues;
x = mInitX;
y = mInitY;
rotation = 0;
mNodeInt = 0;
mDefaultFric = 0.85;
mBombNum = 0;
mDrivePower = 0;
mDrivePowerX = 0;
mDrivePowerY = 0;
mDriveAccel = 0;
mForceX = 0;
mForceY = 0;
mPlayerSkid = false;
mEnemySkid = false;
mColAng = 0;
mAccelAng = 0;
mColForceX = 0;
mColForceY = 0;
mAiPole = 1;
UpdateArt();
}
function EmitBomb():void{
var _local1:Number;
var _local2:Bomb;
var _local3:Object;
_local1 = Math.floor((Math.random() * 2));
_local2 = new Bomb();
_local2.name = ("Bomb" + mBombNum);
mProps.addChild(_local2);
_local2.y = (y + 88);
if (_local1 == 0){
_local2.x = (x - 40);
_local2.gotoAndPlay("_left");
};
if (_local1 == 1){
_local2.x = ((x + width) + 40);
_local2.gotoAndPlay("_right");
};
_local3 = new Object();
_local3.clip = _local2.name;
_local3.xPos = _local2.x;
_local3.yPos = _local2.y;
mSpriteLayer.mPropsArr[mSpriteLayer.mPropsArr.length] = _local3;
mBombNum++;
}
}
}//package
Section 60
//Explosion (Explosion)
package {
public class Explosion extends Prop {
public function Explosion(){
addFrameScript(32, frame33);
mType = "Explosion";
}
function frame33(){
stop();
var _local1 = parent;
_local1["RemoveFX"](this);
}
}
}//package
Section 61
//Flame (Flame)
package {
public class Flame extends Prop {
public function Flame(){
addFrameScript(4, frame5, 5, frame6);
}
function frame6(){
stop();
}
function frame5(){
var _local1 = parent;
_local1["RemoveFlame"](this);
}
}
}//package
Section 62
//FlameLayer (FlameLayer)
package {
import flash.display.*;
public class FlameLayer extends MovieClip {
function AddFlame(_arg1:Number, _arg2:Number, _arg3:Number):void{
var _local4:MovieClip;
_local4 = new Flame();
_local4.x = _arg1;
_local4.y = _arg2;
_local4.rotation = _arg3;
_local4.alpha = 0.5;
addChild(_local4);
}
function RemoveFlame(_arg1:MovieClip):void{
removeChild(_arg1);
}
}
}//package
Section 63
//FxLayer (FxLayer)
package {
import flash.display.*;
public class FxLayer extends MovieClip {
function OnCarExplosion():void{
var _local1 = parent.parent.parent;
_local1["EndGameCallBack"]();
}
function RemoveFX(_arg1:MovieClip):void{
removeChild(_arg1);
}
function AddFx(_arg1:String, _arg2:Number, _arg3:Number):void{
var _local4:MovieClip;
if (_arg1 == "Explosion"){
_local4 = new Explosion();
};
if (_arg1 == "CarExplosion"){
_local4 = new CarExplosion();
};
if (_arg1 == "Crash"){
_local4 = new Crash();
};
_local4.x = _arg2;
_local4.y = _arg3;
addChild(_local4);
}
}
}//package
Section 64
//Game (Game)
package {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.text.*;
import flash.net.*;
public class Game extends MovieClip {
public var mDifficulty:int;// = 0
public var GameStage:MovieClip;
public var mGameWin:Boolean;
public var mPlayerData:Object;
public var mEnemyData:Object;
public var mTimerScore:int;
public var mBoostOn:Boolean;
public var Hud:MovieClip;
public function Game(){
mDifficulty = 0;
super();
addFrameScript(0, frame1, 6, frame7);
}
function StopGameLoop():void{
removeEventListener(Event.ENTER_FRAME, GameLoop);
}
function LoseGameCrash():void{
var _local1:Number;
var _local2:Number;
parent["SoundManager"].PlaySfx("_explosion2");
mGameWin = false;
StopGameLoop();
_local1 = GameStage.SpriteLayer.PlayerSprite.x;
_local2 = GameStage.SpriteLayer.PlayerSprite.y;
GameStage.SpriteLayer.FxLayer.AddFx("CarExplosion", _local1, _local2);
}
function Init():void{
trace((name + " >> Init ()"));
trace(("mDifficulty == " + mDifficulty));
StopGameLoop();
mPlayerData = new Object();
mEnemyData = new Object();
mPlayerData.Life = 100;
mEnemyData.Life = 100;
mPlayerData.Boost = 0;
mBoostOn = false;
mGameWin = false;
mTimerScore = 0;
GameStage.Init("PlayerSprite");
Hud.Init();
Hud.Countdown.Show();
parent["SoundManager"].PlaySfx("_engineStart1");
gotoAndPlay("_show");
}
function StartGameLoop():void{
parent["SoundManager"].StopMusic();
parent["SoundManager"].PlayMusic("_theme2");
addEventListener(Event.ENTER_FRAME, GameLoop);
}
function UpdateLifeVal(_arg1:String, _arg2:int):void{
var _local3:int;
if (_arg1 == "PlayerSprite"){
if (!mBoostOn){
_local3 = (mPlayerData.Life - _arg2);
if (_local3 < 0){
_local3 = 0;
LoseGameCrash();
};
mPlayerData.Life = _local3;
Hud.UpdateLifeBar(_arg1, _local3);
};
};
if (_arg1 == "EnemySprite"){
_local3 = (mEnemyData.Life - _arg2);
if (_local3 < 0){
_local3 = 0;
WinGame();
};
mEnemyData.Life = _local3;
Hud.UpdateLifeBar(_arg1, _local3);
};
}
function frame1(){
stop();
}
function frame7(){
stop();
}
function UnpauseGame():void{
addEventListener(Event.ENTER_FRAME, GameLoop);
}
function UpdateBoostVal():void{
if (mPlayerData.Boost > 0.2){
mPlayerData.Boost = (mPlayerData.Boost - 0.2);
} else {
mPlayerData.Boost = 0;
GameStage.SpriteLayer.PlayerSprite.StopBoost();
};
Hud.UpdateBoostBar(mPlayerData.Boost);
}
function LoseGameTimeOut():void{
var _local1:Number;
var _local2:Number;
mGameWin = false;
StopGameLoop();
_local1 = GameStage.SpriteLayer.PlayerSprite.x;
_local2 = GameStage.SpriteLayer.PlayerSprite.y;
parent["SoundManager"].PlaySfx("_bigExplosion");
parent["SoundManager"].PlaySfx("_explosion2");
Hud.BigExplosion.gotoAndPlay("_show");
GameStage.SpriteLayer.FxLayer.AddFx("CarExplosion", _local1, _local2);
}
function AddBoost():void{
if ((mPlayerData.Boost + 25) < 100){
mPlayerData.Boost = (mPlayerData.Boost + 25);
} else {
mPlayerData.Boost = 100;
};
Hud.UpdateBoostBar(mPlayerData.Boost);
}
function WinGame():void{
var _local1:Number;
var _local2:Number;
parent["SoundManager"].PlaySfx("_explosion2");
mGameWin = true;
StopGameLoop();
_local1 = GameStage.SpriteLayer.EnemySprite.x;
_local2 = GameStage.SpriteLayer.EnemySprite.y;
GameStage.SpriteLayer.FxLayer.AddFx("CarExplosion", _local1, _local2);
}
function EndGameCallBack():void{
parent["SoundManager"].StopMusic();
parent["SoundManager"].PlayMusic("_theme1");
Hud.TalkingHeads.HideAll();
if (mGameWin){
Hud.mTimerScore = (mTimerScore / 30);
Hud.ShowPop("WinGamePop");
} else {
Hud.ShowPop("LoseGamePop");
};
}
function GameLoop(_arg1:Event):void{
var _local2:int;
_local2 = (mTimerScore / 30);
GameStage.Loop();
Hud.Loop(_local2);
mTimerScore++;
}
function PauseGame():void{
StopGameLoop();
}
}
}//package
Section 65
//GameStage (GameStage)
package {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.text.*;
import flash.net.*;
public class GameStage extends MovieClip {
public var mInitY:Number;
public var mFirstInit:Boolean;
public var mInitCamX:Number;
public var mInitCamY:Number;
public var BuildingCollisions:MovieClip;
public var SpriteLayer:MovieClip;
public var mCamClip:MovieClip;
public var mInitX:Number;
public function GameStage(){
mInitX = x;
mInitY = y;
mFirstInit = false;
}
function Init(_arg1:String):void{
trace((name + " >> Init ()"));
x = mInitX;
y = mInitY;
if (!mFirstInit){
mCamClip = SpriteLayer[_arg1];
mInitCamX = mCamClip.x;
mInitCamY = mCamClip.y;
mFirstInit = true;
};
SpriteLayer.Init();
}
function SetCameraPos():void{
var _local1:Number;
var _local2:Number;
_local1 = (mInitCamY - mCamClip.y);
_local2 = (mInitCamX - mCamClip.x);
x = _local2;
if (_local1 > mInitY){
y = _local1;
};
}
function Loop():void{
SpriteLayer.Loop();
SetCameraPos();
}
}
}//package
Section 66
//HeroHead (HeroHead)
package {
public class HeroHead extends TalkingHeadClass {
public function HeroHead(){
addFrameScript(0, frame1, 9, frame10, 19, frame20);
}
function frame10(){
stop();
}
function frame1(){
stop();
}
function frame20(){
stop();
}
}
}//package
Section 67
//Hud (Hud)
package {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.utils.*;
import flash.text.*;
import flash.net.*;
public class Hud extends MovieClip {
public const mFMath180Pi:Number = 57.2957795130823;
public var mPlayerSprite:MovieClip;
public var BigExplosion:MovieClip;
public var LoseGamePop:MovieClip;
public var Countdown:MovieClip;
public var Waypoint:MovieClip;
public var InstructionsPop:MovieClip;
public var PlayerBar:MovieClip;
public var BoostBar:MovieClip;
public var EnemyBar:MovieClip;
public var TalkingHeads:MovieClip;
public var mTimerScore:int;
public var WinGamePop:MovieClip;
public var SendToAFriend:MovieClip;
public var mEnemySprite:MovieClip;
public var vPrint:TextField;
public var GameTime:TextField;
function UpdateWaypoint():void{
var _local1:Number;
var _local2:Number;
var _local3:Number;
_local1 = (mEnemySprite.x - mPlayerSprite.x);
_local2 = (mEnemySprite.y - mPlayerSprite.y);
_local3 = (90 + (Math.atan2(_local2, _local1) * mFMath180Pi));
Waypoint.rotation = _local3;
}
function Init():void{
HidePops();
UpdateLifeBar("EnemySprite", 100);
UpdateLifeBar("PlayerSprite", 100);
UpdateBoostBar(0);
TalkingHeads.Init();
BigExplosion.gotoAndStop(1);
mTimerScore = 0;
UpdateGameTime(mTimerScore);
mPlayerSprite = parent["GameStage"].SpriteLayer.PlayerSprite;
mEnemySprite = parent["GameStage"].SpriteLayer.EnemySprite;
}
function UpdateLifeBar(_arg1:String, _arg2:int):void{
if (_arg1 == "PlayerSprite"){
PlayerBar.UpdateBar(_arg2);
} else {
if (_arg1 == "EnemySprite"){
EnemyBar.UpdateBar(_arg2);
};
};
}
function ShowPop(_arg1:String):void{
var _local2:String;
HidePops();
_local2 = _arg1;
if (_local2 == "LoseGamePop"){
LoseGamePop.Init();
LoseGamePop.Show();
} else {
if (_local2 == "WinGamePop"){
WinGamePop.Init();
WinGamePop.Show(mTimerScore);
} else {
if (_local2 == "InstructionsPop"){
InstructionsPop.Init();
InstructionsPop.Show();
} else {
if (_local2 == "SendToAFriend"){
SendToAFriend.Init();
SendToAFriend.Show();
};
};
};
};
}
function UpdateBoostBar(_arg1:Number):void{
BoostBar.Mask.scaleY = (_arg1 / 100);
}
function Loop(_arg1:int):void{
UpdateWaypoint();
UpdateGameTime(_arg1);
}
function HidePops():void{
LoseGamePop.visible = false;
WinGamePop.visible = false;
InstructionsPop.visible = false;
}
function UpdateGameTime(_arg1:int):void{
GameTime.textColor = 0xFFFFFF;
GameTime.text = String(_arg1);
}
}
}//package
Section 68
//Hydrant (Hydrant)
package {
public class Hydrant extends Prop {
public function Hydrant(){
addFrameScript(0, frame1);
mType = "Hydrant";
}
function frame1(){
stop();
}
}
}//package
Section 69
//Instructions (Instructions)
package {
import flash.display.*;
import flash.events.*;
public class Instructions extends MovieClip {
public var GoButton:MovieClip;
public function Instructions(){
addFrameScript(0, frame1, 14, frame15, 23, frame24);
GoButton.addEventListener(MouseEvent.CLICK, OnGoButton);
GoButton.addEventListener(MouseEvent.ROLL_OVER, OnGoOver);
GoButton.addEventListener(MouseEvent.ROLL_OUT, OnGoUp);
}
function Show():void{
gotoAndPlay("_show");
}
function Init():void{
trace((name + " >> Init ()"));
Show();
}
function frame1(){
stop();
}
function Hide():void{
gotoAndPlay("_hide");
}
function frame24(){
OnHide();
}
function OnGoButton(_arg1:MouseEvent):void{
GoButton.gotoAndStop("_press");
Hide();
}
function frame15(){
stop();
}
function OnGoUp(_arg1:MouseEvent):void{
GoButton.gotoAndStop("_up");
}
function OnGoOver(_arg1:MouseEvent):void{
GoButton.gotoAndStop("_over");
}
function OnHide():void{
var _local1 = parent;
_local1["OpenGame"]();
gotoAndStop(1);
}
}
}//package
Section 70
//InstructionsPop (InstructionsPop)
package {
import flash.display.*;
import flash.events.*;
public class InstructionsPop extends MovieClip {
public var CloseButton:MovieClip;
public function InstructionsPop(){
addFrameScript(0, frame1, 14, frame15, 21, frame22);
CloseButton.addEventListener(MouseEvent.CLICK, OnCloseButton);
}
function Show():void{
visible = true;
gotoAndPlay("_show");
}
function Init():void{
gotoAndStop(1);
trace((name + " >> Init ()"));
}
function Hide():void{
gotoAndPlay("_hide");
}
function frame1(){
stop();
}
function frame22(){
OnHide();
}
function frame15(){
stop();
}
function OnCloseButton(_arg1:MouseEvent):void{
Hide();
}
function OnHide():void{
var _local1 = parent.parent;
_local1["UnpauseGame"]();
gotoAndStop(1);
visible = false;
}
}
}//package
Section 71
//KeyboardInput (KeyboardInput)
package {
import flash.display.*;
import flash.events.*;
import flash.ui.*;
public class KeyboardInput {
public var mStage:Stage;
public var mClient:MovieClip;
public function KeyboardInput(_arg1:MovieClip, _arg2:Stage){
mClient = _arg1;
mStage = _arg2;
mStage.addEventListener(KeyboardEvent.KEY_DOWN, OnKeyDown);
mStage.addEventListener(KeyboardEvent.KEY_UP, OnKeyUp);
}
public function OnKeyDown(_arg1:KeyboardEvent):void{
mClient.OnKeyDown(_arg1.keyCode);
}
public function OnKeyUp(_arg1:KeyboardEvent):void{
mClient.OnKeyUp(_arg1.keyCode);
}
}
}//package
Section 72
//LifeBar (LifeBar)
package {
import flash.display.*;
public class LifeBar extends MovieClip {
public var Bar:MovieClip;
function UpdateBar(_arg1:Number):void{
Bar.scaleY = (_arg1 * 0.01);
}
}
}//package
Section 73
//Localization (Localization)
package {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.net.*;
public class Localization {
public var mLang:String;
public var mClipNum:int;
public var mRoot:Object;
public var mTotalClipsArr:Array;
public var mData:Object;
public var mClient:Object;
public var mLocTable:LocalizationTable;
public function Localization(_arg1:MovieClip, _arg2:String){
mLang = _arg2;
mRoot = _arg1;
mClient = _arg1;
mLocTable = new LocalizationTable(mLang);
}
function LocalizeText():void{
var _local1:Object;
var _local2:int;
var _local3:Array;
trace("LocalizeText ()");
_local3 = new Array();
mTotalClipsArr = new Array();
_local3[0] = mClient;
GetClips(_local3, mTotalClipsArr);
}
function ShowYellowError(_arg1:Object):void{
var _local2:String;
_local2 = _arg1.text;
_arg1.text = ((("No Entry(" + mLang) + "): ") + _local2);
_arg1.textColor = 0xFFCC00;
}
function PrintLocalString(_arg1:Object):void{
var _local2:String;
var _local3:String;
_local2 = _arg1.text;
if (_local2.charAt(0) == "$"){
_local3 = mLocTable.GetLocalString(_local2);
if (((((!((_local3 == ""))) && (!((_local3.charAt(0) == "!"))))) && (!((_local3.charAt(0) == "*"))))){
_arg1.text = _local3;
} else {
ShowYellowError(_arg1);
};
} else {
ShowRedError(_arg1);
};
}
function GetClips(_arg1:Array, _arg2:Array):void{
var _local3:int;
var _local4:Array;
var _local5:Array;
var _local6:Array;
var _local7:int;
var _local8:int;
var _local9:Object;
var _local10:int;
var _local11:int;
_local4 = _arg2;
_local5 = new Array();
_local6 = new Array();
_local7 = _arg1.length;
_local8 = _local4.length;
_local10 = 0;
while (_local10 < _local7) {
_local3 = _arg1[_local10]["numChildren"];
_local11 = 0;
while (_local11 < _local3) {
_local9 = _arg1[_local10]["getChildAt"](_local11);
if (((((!((_local9 == "[object TextField]"))) && (!((_local9 == "[object Shape]"))))) && (!((_local9 == "[object StaticText]"))))){
_local5[_local5.length] = _local9;
} else {
if (_local9 == "[object TextField]"){
PrintLocalString(_local9);
};
};
_local11++;
};
_local10++;
};
_local6 = _local4.concat(_local5);
if (_local6.length > _local8){
mTotalClipsArr = _local6;
GetClips(_local5, mTotalClipsArr);
};
}
function ShowRedError(_arg1:Object):void{
var _local2:String;
_local2 = _arg1.text;
_arg1.text = ("*Error: " + _local2);
_arg1.textColor = 0xFF0000;
}
function LocalizeString(_arg1:String):String{
var _local2:String;
_local2 = mLocTable.GetLocalString(_arg1);
return (_local2);
}
}
}//package
Section 74
//LocalizationTable (LocalizationTable)
package {
public class LocalizationTable {
public var mLang:String;
public function LocalizationTable(_arg1:String){
mLang = _arg1;
trace("LocalizationTable ()");
}
function GetLocalString(_arg1:String):String{
var _local2:String;
if (_arg1 == "$Loading"){
trace(("pString == " + _arg1));
switch (mLang){
case "US":
_local2 = "LOADING";
break;
case "GB":
_local2 = "LOADING";
break;
case "DE":
_local2 = "";
break;
case "ES":
_local2 = "";
break;
case "FR":
_local2 = "";
break;
case "IT":
_local2 = "";
break;
case "NL":
_local2 = "";
break;
default:
_local2 = ("!" + _arg1);
};
trace(("vRetString == " + _local2));
} else {
if (_arg1 == "$BroughtToYouBy"){
trace(("pString == " + _arg1));
switch (mLang){
case "US":
_local2 = "BROUGHT TO YOU BY:";
break;
case "GB":
_local2 = "BROUGHT TO YOU BY:";
break;
case "DE":
_local2 = "";
break;
case "ES":
_local2 = "";
break;
case "FR":
_local2 = "";
break;
case "IT":
_local2 = "";
break;
case "NL":
_local2 = "";
break;
default:
_local2 = ("!" + _arg1);
};
trace(("vRetString == " + _local2));
} else {
if (_arg1 == "$TitleGameInfo"){
switch (mLang){
case "US":
_local2 = "YOU ARE DAN MILES. AS A FORMER CRIMINAL TURNED COP, ONLY YOU CAN WORK BOTH SIDES OF THE LAW AND SAVE THE CITY FROM TERRORIST ATTACKS.";
break;
case "GB":
_local2 = "YOU ARE DAN MILES. AS A FORMER CRIMINAL TURNED COP, ONLY YOU CAN WORK BOTH SIDES OF THE LAW AND SAVE THE CITY FROM TERRORIST ATTACKS.";
break;
case "DE":
_local2 = "";
break;
case "ES":
_local2 = "";
break;
case "FR":
_local2 = "";
break;
case "IT":
_local2 = "";
break;
case "NL":
_local2 = "";
break;
default:
_local2 = ("!" + _arg1);
};
} else {
if (_arg1 == "$Congratulations"){
switch (mLang){
case "US":
_local2 = "CONGRATULATIONS!";
break;
case "GB":
_local2 = "CONGRATULATIONS!";
break;
case "DE":
_local2 = "";
break;
case "ES":
_local2 = "";
break;
case "FR":
_local2 = "";
break;
case "IT":
_local2 = "";
break;
case "NL":
_local2 = "";
break;
default:
_local2 = ("!" + _arg1);
};
} else {
if (_arg1 == "$YouSavedCityHall"){
switch (mLang){
case "US":
_local2 = "YOU SAVED CITY HALL";
break;
case "GB":
_local2 = "YOU SAVED CITY HALL";
break;
case "DE":
_local2 = "";
break;
case "ES":
_local2 = "";
break;
case "FR":
_local2 = "";
break;
case "IT":
_local2 = "";
break;
case "NL":
_local2 = "";
break;
default:
_local2 = ("!" + _arg1);
};
} else {
if (_arg1 == "$Instructions"){
switch (mLang){
case "US":
_local2 = "INSTRUCTIONS";
break;
case "GB":
_local2 = "INSTRUCTIONS";
break;
case "DE":
_local2 = "";
break;
case "ES":
_local2 = "";
break;
case "FR":
_local2 = "";
break;
case "IT":
_local2 = "";
break;
case "NL":
_local2 = "";
break;
default:
_local2 = ("!" + _arg1);
};
} else {
if (_arg1 == "$YourFriendsEmail"){
switch (mLang){
case "US":
_local2 = "YOUR FRIEND'S EMAIL:";
break;
case "GB":
_local2 = "YOUR FRIEND'S EMAIL:";
break;
case "DE":
_local2 = "";
break;
case "ES":
_local2 = "";
break;
case "FR":
_local2 = "";
break;
case "IT":
_local2 = "";
break;
case "NL":
_local2 = "";
break;
default:
_local2 = ("!" + _arg1);
};
} else {
if (_arg1 == "$Quit"){
switch (mLang){
case "US":
_local2 = "QUIT";
break;
case "GB":
_local2 = "QUIT";
break;
case "DE":
_local2 = "";
break;
case "ES":
_local2 = "";
break;
case "FR":
_local2 = "";
break;
case "IT":
_local2 = "";
break;
case "NL":
_local2 = "";
break;
default:
_local2 = ("!" + _arg1);
};
} else {
if (_arg1 == "$Restart"){
switch (mLang){
case "US":
_local2 = "RESTART";
break;
case "GB":
_local2 = "RESTART";
break;
case "DE":
_local2 = "";
break;
case "ES":
_local2 = "";
break;
case "FR":
_local2 = "";
break;
case "IT":
_local2 = "";
break;
case "NL":
_local2 = "";
break;
default:
_local2 = ("!" + _arg1);
};
} else {
if (_arg1 == "$PlayNow"){
switch (mLang){
case "US":
_local2 = "PLAY NOW";
break;
case "GB":
_local2 = "PLAY NOW";
break;
case "DE":
_local2 = "";
break;
case "ES":
_local2 = "";
break;
case "FR":
_local2 = "";
break;
case "IT":
_local2 = "";
break;
case "NL":
_local2 = "";
break;
default:
_local2 = ("!" + _arg1);
};
} else {
if (_arg1 == "$Difficulty"){
switch (mLang){
case "US":
_local2 = "DIFFICULTY";
break;
case "GB":
_local2 = "DIFFICULTY";
break;
case "DE":
_local2 = "";
break;
case "ES":
_local2 = "";
break;
case "FR":
_local2 = "";
break;
case "IT":
_local2 = "";
break;
case "NL":
_local2 = "";
break;
default:
_local2 = ("!" + _arg1);
};
} else {
if (_arg1 == "$Easy"){
switch (mLang){
case "US":
_local2 = "EASY";
break;
case "GB":
_local2 = "EASY";
break;
case "DE":
_local2 = "";
break;
case "ES":
_local2 = "";
break;
case "FR":
_local2 = "";
break;
case "IT":
_local2 = "";
break;
case "NL":
_local2 = "";
break;
default:
_local2 = ("!" + _arg1);
};
} else {
if (_arg1 == "$Hard"){
switch (mLang){
case "US":
_local2 = "HARD";
break;
case "GB":
_local2 = "HARD";
break;
case "DE":
_local2 = "";
break;
case "ES":
_local2 = "";
break;
case "FR":
_local2 = "";
break;
case "IT":
_local2 = "";
break;
case "NL":
_local2 = "";
break;
default:
_local2 = ("!" + _arg1);
};
} else {
if (_arg1 == "$On"){
switch (mLang){
case "US":
_local2 = "ON";
break;
case "GB":
_local2 = "ON";
break;
case "DE":
_local2 = "";
break;
case "ES":
_local2 = "";
break;
case "FR":
_local2 = "";
break;
case "IT":
_local2 = "";
break;
case "NL":
_local2 = "";
break;
default:
_local2 = ("!" + _arg1);
};
} else {
if (_arg1 == "$Off"){
switch (mLang){
case "US":
_local2 = "Off";
break;
case "GB":
_local2 = "Off";
break;
case "DE":
_local2 = "";
break;
case "ES":
_local2 = "";
break;
case "FR":
_local2 = "";
break;
case "IT":
_local2 = "";
break;
case "NL":
_local2 = "";
break;
default:
_local2 = ("!" + _arg1);
};
} else {
if (_arg1 == "$Sound:"){
switch (mLang){
case "US":
_local2 = "SOUND:";
break;
case "GB":
_local2 = "SOUND:";
break;
case "DE":
_local2 = "";
break;
case "ES":
_local2 = "";
break;
case "FR":
_local2 = "";
break;
case "IT":
_local2 = "";
break;
case "NL":
_local2 = "";
break;
default:
_local2 = ("!" + _arg1);
};
} else {
if (_arg1 == "$Time:"){
switch (mLang){
case "US":
_local2 = "TIME:";
break;
case "GB":
_local2 = "TIME:";
break;
case "DE":
_local2 = "";
break;
case "ES":
_local2 = "";
break;
case "FR":
_local2 = "";
break;
case "IT":
_local2 = "";
break;
case "NL":
_local2 = "";
break;
default:
_local2 = ("!" + _arg1);
};
} else {
if (_arg1 == "$InstructionsSteer"){
switch (mLang){
case "US":
_local2 = "Use the arrow keys, or WASD to steer.";
break;
case "GB":
_local2 = "Use the arrow keys, or WASD to steer.";
break;
case "DE":
_local2 = "";
break;
case "ES":
_local2 = "";
break;
case "FR":
_local2 = "";
break;
case "IT":
_local2 = "";
break;
case "NL":
_local2 = "";
break;
default:
_local2 = ("!" + _arg1);
};
} else {
if (_arg1 == "$InstructionsBoost"){
switch (mLang){
case "US":
_local2 = "Pick up Police Sirens to build your BOOST meter. Use the SPACEBAR to get an extra boost of speed!";
break;
case "GB":
_local2 = "Pick up Police Sirens to build your BOOST meter. Use the SPACEBAR to get an extra boost of speed!";
break;
case "DE":
_local2 = "";
break;
case "ES":
_local2 = "";
break;
case "FR":
_local2 = "";
break;
case "IT":
_local2 = "";
break;
case "NL":
_local2 = "";
break;
default:
_local2 = ("!" + _arg1);
};
} else {
if (_arg1 == "$InstructionsTerrorists"){
switch (mLang){
case "US":
_local2 = "Ram the terrorists out of commission before they blow up city hall. Watch out, they're armed!";
break;
case "GB":
_local2 = "Ram the terrorists out of commission before they blow up city hall. Watch out, they're armed!";
break;
case "DE":
_local2 = "";
break;
case "ES":
_local2 = "";
break;
case "FR":
_local2 = "";
break;
case "IT":
_local2 = "";
break;
case "NL":
_local2 = "";
break;
default:
_local2 = ("!" + _arg1);
};
} else {
if (_arg1 == "$Go"){
switch (mLang){
case "US":
_local2 = "GO!";
break;
case "GB":
_local2 = "GO!";
break;
case "DE":
_local2 = "";
break;
case "ES":
_local2 = "";
break;
case "FR":
_local2 = "";
break;
case "IT":
_local2 = "";
break;
case "NL":
_local2 = "";
break;
default:
_local2 = ("!" + _arg1);
};
} else {
if (_arg1 == "$Boost"){
switch (mLang){
case "US":
_local2 = "BOOST";
break;
case "GB":
_local2 = "BOOST";
break;
case "DE":
_local2 = "";
break;
case "ES":
_local2 = "";
break;
case "FR":
_local2 = "";
break;
case "IT":
_local2 = "";
break;
case "NL":
_local2 = "";
break;
default:
_local2 = ("!" + _arg1);
};
} else {
if (_arg1 == "$YourScore"){
switch (mLang){
case "US":
_local2 = "YOUR SCORE:";
break;
case "GB":
_local2 = "YOUR SCORE:";
break;
case "DE":
_local2 = "";
break;
case "ES":
_local2 = "";
break;
case "FR":
_local2 = "";
break;
case "IT":
_local2 = "";
break;
case "NL":
_local2 = "";
break;
default:
_local2 = ("!" + _arg1);
};
} else {
if (_arg1 == "$YouBeatTheBadGuyIn:"){
switch (mLang){
case "US":
_local2 = "YOU BEAT THE BAD GUY IN:";
break;
case "GB":
_local2 = "YOU BEAT THE BAD GUY IN:";
break;
case "DE":
_local2 = "";
break;
case "ES":
_local2 = "";
break;
case "FR":
_local2 = "";
break;
case "IT":
_local2 = "";
break;
case "NL":
_local2 = "";
break;
default:
_local2 = ("!" + _arg1);
};
} else {
if (_arg1 == "$Seconds"){
switch (mLang){
case "US":
_local2 = "SECONDS";
break;
case "GB":
_local2 = "SECONDS";
break;
case "DE":
_local2 = "";
break;
case "ES":
_local2 = "";
break;
case "FR":
_local2 = "";
break;
case "IT":
_local2 = "";
break;
case "NL":
_local2 = "";
break;
default:
_local2 = ("!" + _arg1);
};
} else {
if (_arg1 == "$Replay"){
switch (mLang){
case "US":
_local2 = "REPLAY";
break;
case "GB":
_local2 = "REPLAY";
break;
case "DE":
_local2 = "";
break;
case "ES":
_local2 = "";
break;
case "FR":
_local2 = "";
break;
case "IT":
_local2 = "";
break;
case "NL":
_local2 = "";
break;
default:
_local2 = ("!" + _arg1);
};
} else {
if (_arg1 == "$OrderTheGame"){
switch (mLang){
case "US":
_local2 = "ORDER THE GAME";
break;
case "GB":
_local2 = "ORDER THE GAME";
break;
case "DE":
_local2 = "";
break;
case "ES":
_local2 = "";
break;
case "FR":
_local2 = "";
break;
case "IT":
_local2 = "";
break;
case "NL":
_local2 = "";
break;
default:
_local2 = ("!" + _arg1);
};
} else {
if (_arg1 == "$SendToAFriend"){
switch (mLang){
case "US":
_local2 = "SEND TO A FRIEND";
break;
case "GB":
_local2 = "SEND TO A FRIEND";
break;
case "DE":
_local2 = "";
break;
case "ES":
_local2 = "";
break;
case "FR":
_local2 = "";
break;
case "IT":
_local2 = "";
break;
case "NL":
_local2 = "";
break;
default:
_local2 = ("!" + _arg1);
};
} else {
if (_arg1 == "$Send"){
switch (mLang){
case "US":
_local2 = "SEND";
break;
case "GB":
_local2 = "SEND";
break;
case "DE":
_local2 = "";
break;
case "ES":
_local2 = "";
break;
case "FR":
_local2 = "";
break;
case "IT":
_local2 = "";
break;
case "NL":
_local2 = "";
break;
default:
_local2 = ("!" + _arg1);
};
} else {
if (_arg1 == "$EmailSent"){
switch (mLang){
case "US":
_local2 = "EMAIL SENT!";
break;
case "GB":
_local2 = "EMAIL SENT!";
break;
case "DE":
_local2 = "";
break;
case "ES":
_local2 = "";
break;
case "FR":
_local2 = "";
break;
case "IT":
_local2 = "";
break;
case "NL":
_local2 = "";
break;
default:
_local2 = ("!" + _arg1);
};
} else {
if (_arg1 == "$MoreAboutCop"){
switch (mLang){
case "US":
_local2 = "MORE ABOUT C.O.P.";
break;
case "GB":
_local2 = "MORE ABOUT C.O.P.";
break;
case "DE":
_local2 = "";
break;
case "ES":
_local2 = "";
break;
case "FR":
_local2 = "";
break;
case "IT":
_local2 = "";
break;
case "NL":
_local2 = "";
break;
default:
_local2 = ("!" + _arg1);
};
} else {
if (_arg1 == "$GameOver"){
switch (mLang){
case "US":
_local2 = "GAME OVER";
break;
case "GB":
_local2 = "GAME OVER";
break;
case "DE":
_local2 = "";
break;
case "ES":
_local2 = "";
break;
case "FR":
_local2 = "";
break;
case "IT":
_local2 = "";
break;
case "NL":
_local2 = "";
break;
default:
_local2 = ("!" + _arg1);
};
} else {
if (_arg1 == "$CityHallDestroyed"){
switch (mLang){
case "US":
_local2 = "CITY HALL WAS DESTROYED";
break;
case "GB":
_local2 = "CITY HALL WAS DESTROYED";
break;
case "DE":
_local2 = "";
break;
case "ES":
_local2 = "";
break;
case "FR":
_local2 = "";
break;
case "IT":
_local2 = "";
break;
case "NL":
_local2 = "";
break;
default:
_local2 = ("!" + _arg1);
};
} else {
if (_arg1 == "$ChiefDialogue0"){
switch (mLang){
case "US":
_local2 = "The terrorists are planning to blow up city hall! Stop them!";
break;
case "GB":
_local2 = "The terrorists are planning to blow up city hall! Stop them!";
break;
case "DE":
_local2 = "";
break;
case "ES":
_local2 = "";
break;
case "FR":
_local2 = "";
break;
case "IT":
_local2 = "";
break;
case "NL":
_local2 = "";
break;
default:
_local2 = ("!" + _arg1);
};
} else {
if (_arg1 == "$ChiefDialogue1"){
switch (mLang){
case "US":
_local2 = "Ram them Officer Miles!";
break;
case "GB":
_local2 = "Ram them Officer Miles!";
break;
case "DE":
_local2 = "";
break;
case "ES":
_local2 = "";
break;
case "FR":
_local2 = "";
break;
case "IT":
_local2 = "";
break;
case "NL":
_local2 = "";
break;
default:
_local2 = ("!" + _arg1);
};
} else {
if (_arg1 == "$ChiefDialogue2"){
switch (mLang){
case "US":
_local2 = "They’re halfway to City Hall!";
break;
case "GB":
_local2 = "They’re halfway to City Hall!";
break;
case "DE":
_local2 = "";
break;
case "ES":
_local2 = "";
break;
case "FR":
_local2 = "";
break;
case "IT":
_local2 = "";
break;
case "NL":
_local2 = "";
break;
default:
_local2 = ("!" + _arg1);
};
} else {
if (_arg1 == "$ChiefDialogue3"){
switch (mLang){
case "US":
_local2 = "Move it officer! You’re losing them!";
break;
case "GB":
_local2 = "Move it officer! You’re losing them!";
break;
case "DE":
_local2 = "";
break;
case "ES":
_local2 = "";
break;
case "FR":
_local2 = "";
break;
case "IT":
_local2 = "";
break;
case "NL":
_local2 = "";
break;
default:
_local2 = ("!" + _arg1);
};
} else {
if (_arg1 == "$ChiefDialogue4"){
switch (mLang){
case "US":
_local2 = "Oh no, it’s too late...";
break;
case "GB":
_local2 = "Oh no, it’s too late...";
break;
case "DE":
_local2 = "";
break;
case "ES":
_local2 = "";
break;
case "FR":
_local2 = "";
break;
case "IT":
_local2 = "";
break;
case "NL":
_local2 = "";
break;
default:
_local2 = ("!" + _arg1);
};
} else {
if (_arg1 == "$HeroDialogue0"){
switch (mLang){
case "US":
_local2 = "They’re toast!";
break;
case "GB":
_local2 = "They’re toast!";
break;
case "DE":
_local2 = "";
break;
case "ES":
_local2 = "";
break;
case "FR":
_local2 = "";
break;
case "IT":
_local2 = "";
break;
case "NL":
_local2 = "";
break;
default:
_local2 = ("!" + _arg1);
};
} else {
if (_arg1 == "$HeroDialogue1"){
switch (mLang){
case "US":
_local2 = "There’s no way they’re getting by me!";
break;
case "GB":
_local2 = "There’s no way they’re getting by me!";
break;
case "DE":
_local2 = "";
break;
case "ES":
_local2 = "";
break;
case "FR":
_local2 = "";
break;
case "IT":
_local2 = "";
break;
case "NL":
_local2 = "";
break;
default:
_local2 = ("!" + _arg1);
};
} else {
if (_arg1 == "$HeroDialogue2"){
switch (mLang){
case "US":
_local2 = "I’m on it!";
break;
case "GB":
_local2 = "I’m on it!";
break;
case "DE":
_local2 = "";
break;
case "ES":
_local2 = "";
break;
case "FR":
_local2 = "";
break;
case "IT":
_local2 = "";
break;
case "NL":
_local2 = "";
break;
default:
_local2 = ("!" + _arg1);
};
} else {
if (_arg1 == "$TerroristDialogue0"){
switch (mLang){
case "US":
_local2 = "Hahahaha, you’ll never catch me copper!";
break;
case "GB":
_local2 = "Hahahaha, you’ll never catch me copper!";
break;
case "DE":
_local2 = "";
break;
case "ES":
_local2 = "";
break;
case "FR":
_local2 = "";
break;
case "IT":
_local2 = "";
break;
case "NL":
_local2 = "";
break;
default:
_local2 = ("!" + _arg1);
};
} else {
if (_arg1 == "$TerroristDialogue1"){
switch (mLang){
case "US":
_local2 = "Prepare to meet your maker!";
break;
case "GB":
_local2 = "Prepare to meet your maker!";
break;
case "DE":
_local2 = "";
break;
case "ES":
_local2 = "";
break;
case "FR":
_local2 = "";
break;
case "IT":
_local2 = "";
break;
case "NL":
_local2 = "";
break;
default:
_local2 = ("!" + _arg1);
};
} else {
if (_arg1 == "$TerroristDialogue2"){
switch (mLang){
case "US":
_local2 = "You call that driving? Pathetic.";
break;
case "GB":
_local2 = "You call that driving? Pathetic.";
break;
case "DE":
_local2 = "";
break;
case "ES":
_local2 = "";
break;
case "FR":
_local2 = "";
break;
case "IT":
_local2 = "";
break;
case "NL":
_local2 = "";
break;
default:
_local2 = ("!" + _arg1);
};
} else {
if (_arg1 == "$TerroristTaunt0"){
switch (mLang){
case "US":
_local2 = "I've got you now!";
break;
case "GB":
_local2 = "I've got you now!";
break;
case "DE":
_local2 = "";
break;
case "ES":
_local2 = "";
break;
case "FR":
_local2 = "";
break;
case "IT":
_local2 = "";
break;
case "NL":
_local2 = "";
break;
default:
_local2 = ("!" + _arg1);
};
} else {
if (_arg1 == "$TerroristTaunt1"){
switch (mLang){
case "US":
_local2 = "You'll have to do better than that!";
break;
case "GB":
_local2 = "You'll have to do better than that!";
break;
case "DE":
_local2 = "";
break;
case "ES":
_local2 = "";
break;
case "FR":
_local2 = "";
break;
case "IT":
_local2 = "";
break;
case "NL":
_local2 = "";
break;
default:
_local2 = ("!" + _arg1);
};
} else {
if (_arg1 == "$TerroristTaunt2"){
switch (mLang){
case "US":
_local2 = "You can't stop me!";
break;
case "GB":
_local2 = "You can't stop me!";
break;
case "DE":
_local2 = "";
break;
case "ES":
_local2 = "";
break;
case "FR":
_local2 = "";
break;
case "IT":
_local2 = "";
break;
case "NL":
_local2 = "";
break;
default:
_local2 = ("!" + _arg1);
};
} else {
if (_arg1 == "$TerroristTaunt3"){
switch (mLang){
case "US":
_local2 = "You're mine!";
break;
case "GB":
_local2 = "You're mine!";
break;
case "DE":
_local2 = "";
break;
case "ES":
_local2 = "";
break;
case "FR":
_local2 = "";
break;
case "IT":
_local2 = "";
break;
case "NL":
_local2 = "";
break;
default:
_local2 = ("!" + _arg1);
};
} else {
if (_arg1 == "$RewardMessage0"){
switch (mLang){
case "US":
_local2 = "You're the toughest C.O.P in town!";
break;
case "GB":
_local2 = "You're the toughest C.O.P in town!";
break;
case "DE":
_local2 = "";
break;
case "ES":
_local2 = "";
break;
case "FR":
_local2 = "";
break;
case "IT":
_local2 = "";
break;
case "NL":
_local2 = "";
break;
default:
_local2 = ("!" + _arg1);
};
} else {
if (_arg1 == "$RewardMessage1"){
switch (mLang){
case "US":
_local2 = "Good driving but you could do better.";
break;
case "GB":
_local2 = "Good driving but you could do better.";
break;
case "DE":
_local2 = "";
break;
case "ES":
_local2 = "";
break;
case "FR":
_local2 = "";
break;
case "IT":
_local2 = "";
break;
case "NL":
_local2 = "";
break;
default:
_local2 = ("!" + _arg1);
};
} else {
if (_arg1 == "$RewardMessage2"){
switch (mLang){
case "US":
_local2 = "Some training in the academy would do you good.";
break;
case "GB":
_local2 = "Some training in the academy would do you good.";
break;
case "DE":
_local2 = "";
break;
case "ES":
_local2 = "";
break;
case "FR":
_local2 = "";
break;
case "IT":
_local2 = "";
break;
case "NL":
_local2 = "";
break;
default:
_local2 = ("!" + _arg1);
};
} else {
_local2 = "*Error: No entry in StringTable.as";
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
return (_local2);
}
}
}//package
Section 75
//LoseGamePop (LoseGamePop)
package {
import flash.display.*;
import flash.events.*;
import flash.net.*;
public class LoseGamePop extends MovieClip {
public var OrderButton:MovieClip;
public var mExitVar:String;
public var ReplayButton:MovieClip;
public var SendFriendButton:MovieClip;
public var InfoButton:MovieClip;
public function LoseGamePop(){
addFrameScript(0, frame1, 16, frame17, 29, frame30, 39, frame40);
ReplayButton.addEventListener(MouseEvent.CLICK, OnReplayButton);
ReplayButton.addEventListener(MouseEvent.ROLL_OVER, OnReplayOver);
ReplayButton.addEventListener(MouseEvent.ROLL_OUT, OnReplayUp);
InfoButton.addEventListener(MouseEvent.CLICK, OnInfoButton);
InfoButton.addEventListener(MouseEvent.ROLL_OVER, OnInfoOver);
InfoButton.addEventListener(MouseEvent.ROLL_OUT, OnInfoUp);
SendFriendButton.addEventListener(MouseEvent.CLICK, OnSendFriendButton);
SendFriendButton.addEventListener(MouseEvent.ROLL_OVER, OnSendFriendOver);
SendFriendButton.addEventListener(MouseEvent.ROLL_OUT, OnSendFriendUp);
OrderButton.addEventListener(MouseEvent.CLICK, OnOrderButton);
OrderButton.addEventListener(MouseEvent.ROLL_OVER, OnOrderOver);
OrderButton.addEventListener(MouseEvent.ROLL_OUT, OnOrderUp);
}
function OnReplayUp(_arg1:MouseEvent):void{
ReplayButton.gotoAndStop("_up");
}
function OnOrderOver(_arg1:MouseEvent):void{
OrderButton.gotoAndStop("_over");
}
function Show():void{
visible = true;
gotoAndPlay("_show");
}
function Init():void{
trace((name + " >> Init ()"));
mExitVar = "";
gotoAndStop(1);
}
function OnSendFriendOver(_arg1:MouseEvent):void{
SendFriendButton.gotoAndStop("_over");
}
function OnSendFriendButton(_arg1:MouseEvent):void{
SendFriendButton.gotoAndStop("_press");
mExitVar = "SendFriend";
Hide();
}
function OnSendFriendUp(_arg1:MouseEvent):void{
SendFriendButton.gotoAndStop("_up");
}
function Hide():void{
if (visible){
if (mExitVar == "Replay"){
gotoAndPlay("_replayHide");
} else {
gotoAndPlay("_hide");
};
};
}
function frame1(){
stop();
}
function frame17(){
stop();
}
function OnOrderUp(_arg1:MouseEvent):void{
OrderButton.gotoAndStop("_up");
}
function frame30(){
OnHide();
}
function OnReplayButton(_arg1:MouseEvent):void{
ReplayButton.gotoAndStop("_press");
mExitVar = "Replay";
Hide();
}
function OnOrderButton(_arg1:MouseEvent):void{
var _local2:URLRequest;
OrderButton.gotoAndStop("_press");
_local2 = new URLRequest("http://coptherecruit.ubi.com/buynow?utm_source=partnersites&utm_medium=flashgame_buynow&utm_campaign=COP");
navigateToURL(_local2);
}
function frame40(){
OnHide();
}
function OnReplayOver(_arg1:MouseEvent):void{
ReplayButton.gotoAndStop("_over");
}
function OnInfoOver(_arg1:MouseEvent):void{
InfoButton.gotoAndStop("_over");
}
function OnInfoUp(_arg1:MouseEvent):void{
InfoButton.gotoAndStop("_up");
}
function OnHide():void{
if (mExitVar == "Replay"){
var _local1 = parent.parent.parent;
_local1["SetMode"]("Game");
} else {
if (mExitVar == "SendFriend"){
_local1 = parent;
_local1["ShowPop"]("SendToAFriend");
};
};
gotoAndStop(1);
visible = false;
}
function OnInfoButton(_arg1:MouseEvent):void{
var _local2:URLRequest;
InfoButton.gotoAndStop("_press");
_local2 = new URLRequest("http://coptherecruit.ubi.com?utm_source=partnersites&utm_medium=flashgame&utm_campaign=COP");
navigateToURL(_local2);
}
}
}//package
Section 76
//Mailbox (Mailbox)
package {
public class Mailbox extends Prop {
public function Mailbox(){
addFrameScript(0, frame1);
mType = "Mailbox";
}
function frame1(){
stop();
}
}
}//package
Section 77
//MainMenu (MainMenu)
package {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.net.*;
public class MainMenu extends MovieClip {
public var mExitVar:String;
public var HardButton:MovieClip;
public var EasyButton:MovieClip;
public var TitleText:MovieClip;
public var PlayNowButton:MovieClip;
public var AboutButton:MovieClip;
public function MainMenu(){
addFrameScript(0, frame1, 44, frame45, 59, frame60, 83, frame84);
PlayNowButton.addEventListener(MouseEvent.CLICK, OnPlayNowButton);
PlayNowButton.addEventListener(MouseEvent.ROLL_OVER, OnPlayNowOver);
PlayNowButton.addEventListener(MouseEvent.ROLL_OUT, OnPlayNowUp);
AboutButton.addEventListener(MouseEvent.CLICK, OnAboutButton);
AboutButton.addEventListener(MouseEvent.ROLL_OVER, OnAboutOver);
AboutButton.addEventListener(MouseEvent.ROLL_OUT, OnAboutUp);
EasyButton.addEventListener(MouseEvent.CLICK, OnEasyButton);
EasyButton.addEventListener(MouseEvent.ROLL_OVER, OnEasyOver);
EasyButton.addEventListener(MouseEvent.ROLL_OUT, OnEasyUp);
HardButton.addEventListener(MouseEvent.CLICK, OnHardButton);
HardButton.addEventListener(MouseEvent.ROLL_OVER, OnHardOver);
HardButton.addEventListener(MouseEvent.ROLL_OUT, OnHardUp);
}
function OnAboutUp(_arg1:MouseEvent):void{
AboutButton.gotoAndStop("_up");
}
function OnPlayNowUp(_arg1:MouseEvent):void{
PlayNowButton.gotoAndStop("_up");
}
function OnPlayNowButton(_arg1:MouseEvent):void{
PlayNowButton.gotoAndStop("_press");
ShowDifficultySelect();
}
function OnEasyUp(_arg1:MouseEvent):void{
EasyButton.gotoAndStop("_up");
}
function frame84(){
OnHide();
}
function Init():void{
trace((name + " >> Init ()"));
Show();
}
function Show():void{
gotoAndPlay("_show");
}
function OnEasyOver(_arg1:MouseEvent):void{
EasyButton.gotoAndStop("_over");
}
function OnHardButton(_arg1:MouseEvent):void{
HardButton.gotoAndStop("_press");
parent.parent["Game"].mDifficulty = 1;
Hide("PlayNow");
}
function Hide(_arg1:String):void{
mExitVar = _arg1;
gotoAndPlay("_hide");
}
function frame1(){
stop();
}
function OnEasyButton(_arg1:MouseEvent):void{
EasyButton.gotoAndStop("_press");
parent.parent["Game"].mDifficulty = 0;
Hide("PlayNow");
}
function OnPlayNowOver(_arg1:MouseEvent):void{
PlayNowButton.gotoAndStop("_over");
}
function OnAboutButton(_arg1:MouseEvent):void{
var _local2:URLRequest;
AboutButton.gotoAndStop("_press");
_local2 = new URLRequest("http://coptherecruit.ubi.com?utm_source=partnersites&utm_medium=flashgame&utm_campaign=COP");
navigateToURL(_local2);
}
function frame45(){
stop();
}
function OnHardOver(_arg1:MouseEvent):void{
HardButton.gotoAndStop("_over");
}
function OnAboutOver(_arg1:MouseEvent):void{
AboutButton.gotoAndStop("_over");
}
function OnHardUp(_arg1:MouseEvent):void{
HardButton.gotoAndStop("_up");
}
function ShowDifficultySelect():void{
gotoAndPlay("_showDifficulty");
}
function OnHide():void{
if (mExitVar == "PlayNow"){
var _local1 = parent;
_local1["SetScreen"]("Instructions");
};
gotoAndStop(1);
}
function frame60(){
stop();
}
}
}//package
Section 78
//MochiBot (MochiBot)
package {
import flash.display.*;
import flash.net.*;
import flash.system.*;
public dynamic class MochiBot extends Sprite {
public static function track(_arg1:Sprite, _arg2:String):MochiBot{
var _local3:MochiBot;
var _local4:String;
var _local5:URLVariables;
var _local6:String;
var _local7:URLRequest;
var _local8:Loader;
if (Security.sandboxType == "localWithFile"){
return (null);
};
_local3 = new (MochiBot);
_arg1.addChild(_local3);
Security.allowDomain("*");
Security.allowInsecureDomain("*");
_local4 = "http://core.mochibot.com/my/core.swf";
_local5 = new URLVariables();
_local5["sb"] = Security.sandboxType;
_local5["v"] = Capabilities.version;
_local5["swfid"] = _arg2;
_local5["mv"] = "8";
_local5["fv"] = "9";
_local6 = _local3.root.loaderInfo.loaderURL;
if (_local6.indexOf("http") == 0){
_local5["url"] = _local6;
} else {
_local5["url"] = "local";
};
_local7 = new URLRequest(_local4);
_local7.contentType = "application/x-www-form-urlencoded";
_local7.method = URLRequestMethod.POST;
_local7.data = _local5;
_local8 = new Loader();
_local3.addChild(_local8);
_local8.load(_local7);
return (_local3);
}
}
}//package
Section 79
//Oilmark (Oilmark)
package {
public class Oilmark extends Prop {
public function Oilmark(){
addFrameScript(81, frame82, 82, frame83);
}
function frame82(){
var _local1 = parent;
_local1["RemoveTiremark"](this);
}
function frame83(){
stop();
}
}
}//package
Section 80
//OilSlick (OilSlick)
package {
public class OilSlick extends Prop {
public function OilSlick(){
mType = "OilSlick";
}
}
}//package
Section 81
//PlayerLifeBar (PlayerLifeBar)
package {
public class PlayerLifeBar extends LifeBar {
}
}//package
Section 82
//PlayerSprite (PlayerSprite)
package {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.utils.*;
import flash.text.*;
import flash.net.*;
public class PlayerSprite extends BaseSprite {
public var mKeyRt:Boolean;
public var KeyInput:Object;
public var mInitX:Number;
public var mKeyUp:Boolean;
public var mInitY:Number;
public var mKeyDn:Boolean;
public var mKeySpace:Boolean;
public var mKeyLt:Boolean;
public function PlayerSprite(){
KeyInput = new KeyboardInput(this, stage);
mInitX = x;
mInitY = y;
}
function OnKeyUp(_arg1:int):void{
if ((((_arg1 == 37)) || ((_arg1 == 65)))){
mKeyLt = false;
};
if ((((_arg1 == 38)) || ((_arg1 == 87)))){
mKeyUp = false;
};
if ((((_arg1 == 39)) || ((_arg1 == 68)))){
mKeyRt = false;
};
if ((((_arg1 == 40)) || ((_arg1 == 83)))){
mKeyDn = false;
};
if (_arg1 == 32){
mKeySpace = false;
};
}
function OnKeyDown(_arg1:int):void{
if ((((_arg1 == 37)) || ((_arg1 == 65)))){
mKeyLt = true;
};
if ((((_arg1 == 38)) || ((_arg1 == 87)))){
mKeyUp = true;
};
if ((((_arg1 == 39)) || ((_arg1 == 68)))){
mKeyRt = true;
};
if ((((_arg1 == 40)) || ((_arg1 == 83)))){
mKeyDn = true;
};
if (_arg1 == 32){
mKeySpace = true;
};
}
function Loop():void{
if (mKeyUp){
OnCntrlUp();
};
if (mKeyDn){
OnCntrlDn();
};
if (mKeyLt){
OnCntrlLt();
};
if (mKeyRt){
OnCntrlRt();
};
if (mKeySpace){
OnCtrlSpace();
};
if (!mKeySpace){
StopBoost();
};
if (((!(mKeyUp)) && (!(mKeyDn)))){
Decelerate();
};
if (((!(mKeyLt)) && (!(mKeyRt)))){
StopSteer();
};
UpdateSprite();
}
function Init():void{
trace((name + " >> Init ()"));
mSpriteLayer = parent.parent["SpriteLayer"];
mSoundManager = parent.parent.parent.parent["SoundManager"];
mGame = parent.parent.parent.parent["Game"];
mGameStage = parent.parent.parent["GameStage"];
mProps = parent["mPropsClip"];
mTiremarksLayer = parent["TiremarksLayer"];
mArt = parent["PlayerArt"];
mTalkingHeads = parent.parent.parent["Hud"].TalkingHeads;
mDialogueCues = parent["DialogueCueLayer"].mDialogueCues;
x = mInitX;
y = mInitY;
rotation = 0;
mDriveAccel = 0;
mDrivePower = 0;
mDrivePowerX = 0;
mDrivePowerY = 0;
mAccelAng = 0;
mColAng = 0;
mDefaultFric = 0.86;
mColForceX = 0;
mColForceY = 0;
UpdateArt();
}
}
}//package
Section 83
//Prop (Prop)
package {
import flash.display.*;
public class Prop extends MovieClip {
public var mRot:Number;
public var mAccelY:Number;
public var mAccelX:Number;
public var mType:String;
public var mX:Number;
public var mY:Number;
function ResetProp():void{
x = mX;
y = mY;
rotation = mRot;
gotoAndStop(1);
visible = true;
alpha = 1;
mAccelX = 0;
mAccelY = 0;
}
function AnimateCrash():void{
if (alpha > 0.05){
x = (x + mAccelX);
y = (y + mAccelY);
mAccelX = (mAccelX * 0.8);
mAccelY = (mAccelY * 0.8);
alpha = (alpha * 0.85);
} else {
alpha = 0;
visible = false;
};
}
function CrashProp(_arg1:Number, _arg2:Number):void{
mAccelX = (_arg1 * 2);
mAccelY = (_arg2 * 2);
}
}
}//package
Section 84
//ScoreInd (ScoreInd)
package {
import flash.display.*;
import flash.text.*;
public class ScoreInd extends MovieClip {
public var mLocal:Localization;
public var mLang:String;
public var ScoreText:TextField;
public var RewardMessage:TextField;
function Show():void{
visible = true;
gotoAndPlay("_show");
}
function Init(_arg1:int):void{
var _local2:String;
mLocal = parent.parent.parent.parent.parent["mLocal"];
ScoreText.textColor = 0xFFFFFF;
ScoreText.text = String(_arg1);
RewardMessage.textColor = 0xFFFFFF;
if (_arg1 < 70){
_local2 = mLocal.LocalizeString("$RewardMessage0");
} else {
if ((((_arg1 > 70)) && ((_arg1 < 100)))){
_local2 = mLocal.LocalizeString("$RewardMessage1");
} else {
if (_arg1 > 100){
_local2 = mLocal.LocalizeString("$RewardMessage2");
};
};
};
RewardMessage.text = _local2;
}
}
}//package
Section 85
//SendToAFriend (SendToAFriend)
package {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.text.*;
import flash.net.*;
public class SendToAFriend extends MovieClip {
public var SendButton:MovieClip;
public var mExitVar:String;
public var CancelButton:MovieClip;
public var Email:TextField;
public function SendToAFriend(){
addFrameScript(0, frame1, 9, frame10, 20, frame21, 24, frame25, 31, frame32);
CancelButton.addEventListener(MouseEvent.CLICK, OnCancelButton);
SendButton.addEventListener(MouseEvent.CLICK, OnSendButton);
SendButton.addEventListener(MouseEvent.ROLL_OVER, OnSendOver);
SendButton.addEventListener(MouseEvent.ROLL_OUT, OnSendUp);
}
function OnCancelButton(_arg1:MouseEvent):void{
Hide();
}
function OnSendUp(_arg1:MouseEvent):void{
SendButton.gotoAndStop("_up");
}
function Show():void{
gotoAndPlay("_show");
}
function Init():void{
trace((name + " >> Init ()"));
Show();
}
function OnSendButton(_arg1:MouseEvent):void{
SendButton.gotoAndStop("_press");
SendMail();
}
function frame10(){
stop();
}
function Hide():void{
gotoAndPlay("_hide");
}
function frame1(){
stop();
}
function frame25(){
stop();
}
function SendMail():void{
var _local1:Object;
var _local2:URLRequest;
var _local3:URLVariables;
var _local4:URLLoader;
_local2 = new URLRequest("http://coptherecruit.ubi.com/sendtoafriend.php");
_local2.method = URLRequestMethod.POST;
_local3 = new URLVariables();
_local3.email_address = Email.text;
_local3.locale = parent.parent.parent.parent["mLocale"];
_local2.data = _local3;
_local4 = new URLLoader(_local2);
_local4.dataFormat = URLLoaderDataFormat.VARIABLES;
_local4.addEventListener(Event.COMPLETE, OnMailSuccess);
_local4.load(_local2);
gotoAndPlay("_sent");
}
function frame21(){
stop();
}
function OnSendOver(_arg1:MouseEvent):void{
SendButton.gotoAndStop("_over");
}
function frame32(){
OnHide();
}
public function OnMailSuccess(_arg1:Event):void{
trace("OnMailSuccess ()");
trace(_arg1.target.data);
}
function OnHide():void{
if (parent.parent["mGameWin"] == true){
var _local1 = parent;
_local1["ShowPop"]("WinGamePop");
} else {
_local1 = parent;
_local1["ShowPop"]("LoseGamePop");
};
gotoAndStop(1);
}
}
}//package
Section 86
//Shell (Shell)
package {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.text.*;
import flash.net.*;
public class Shell extends MovieClip {
public var MainMenu:MovieClip;
public var mScreens:Array;
public var Instructions:MovieClip;
public function Shell(){
mScreens = new Array(MainMenu, Instructions);
}
function Init():void{
trace((name + " >> Init ()"));
SetScreen("MainMenu");
}
function SetScreen(_arg1:String):void{
var _local2:int;
var _local3:MovieClip;
var _local4:MovieClip;
var _local5:int;
_local2 = mScreens.length;
_local4 = this[_arg1];
_local5 = 0;
while (_local5 < _local2) {
_local3 = mScreens[_local5];
if (_local4 == _local3){
_local3.visible = true;
_local3.Init();
} else {
_local3.visible = false;
};
_local5++;
};
}
function OpenGame():void{
var _local1 = parent;
_local1["SetMode"]("Game");
}
}
}//package
Section 87
//Siren (Siren)
package {
public class Siren extends Prop {
public function Siren(){
mType = "Siren";
}
}
}//package
Section 88
//SlowSign (SlowSign)
package {
public class SlowSign extends Prop {
public function SlowSign(){
addFrameScript(0, frame1);
mType = "SlowSign";
}
function frame1(){
stop();
}
}
}//package
Section 89
//SoundManager (SoundManager)
package {
import flash.display.*;
import flash.media.*;
public class SoundManager extends MovieClip {
public var Music:MovieClip;
public var Sfx:MovieClip;
public var mChannel:SoundChannel;
public var mRoot:MovieClip;
public function SoundManager(){
trace("SoundManager ()");
}
function StopSfx():void{
Sfx.gotoAndPlay("_stop");
SoundMixer.stopAll();
}
function StopMusic():void{
Music.gotoAndPlay("_stop");
SoundMixer.stopAll();
}
function StopAll():void{
SoundMixer.stopAll();
}
function PlayMusic(_arg1:String):void{
if (parent["mMuted"] == false){
Music.gotoAndPlay(_arg1);
};
}
function MuteSound():void{
SoundMixer.stopAll();
}
function PlaySfx(_arg1:String):void{
if (parent["mMuted"] == false){
Sfx.gotoAndPlay(_arg1);
};
}
}
}//package
Section 90
//SpikeStrip (SpikeStrip)
package {
public class SpikeStrip extends Prop {
public function SpikeStrip(){
mType = "SpikeStrip";
}
}
}//package
Section 91
//SpriteLayer (SpriteLayer)
package {
import flash.display.*;
import flash.events.*;
import com.coreyoneil.collision.*;
import flash.geom.*;
import flash.utils.*;
import flash.text.*;
import flash.net.*;
public class SpriteLayer extends MovieClip {
public const mFMath180Pi:Number = 57.2957795130823;
public const mFMathPi180:Number = 0.0174532925199433;
public var AILayer:MovieClip;
public var mPlayerSpike:Boolean;
private var mWorldCol:CollisionList;
public var FlameLayer:MovieClip;
public var mPropsClip:MovieClip;
public var PlayerSprite:MovieClip;
public var mCrashPropsArr:Array;
public var TiremarksLayer:MovieClip;
public var mCurseTimer:int;
public var Props:MovieClip;
public var mEnemySlick:Boolean;
public var mColTimer:int;
public var mPropsArr:Array;
public var FxLayer:MovieClip;
private var mPropsCol:CollisionList;
public var mTalkingHeads:MovieClip;
public var mPlayerSlick:Boolean;
public var EnemySprite:MovieClip;
public var PlayerArt:MovieClip;
public var mFirstInit:Boolean;
private var mSoundManager:MovieClip;
public var mEnemySpike:Boolean;
public var TestLine:MovieClip;
public var EnemyArt:MovieClip;
public var mWorldColTimer:int;
private var mPlayerCol:CollisionList;
public var DialogueCueLayer:MovieClip;
private var mGame:MovieClip;
function AddCrashProp(_arg1:MovieClip):void{
mCrashPropsArr[mCrashPropsArr.length] = _arg1;
}
function Init():void{
var _local1:int;
var _local2:Array;
var _local3:int;
var _local4:MovieClip;
var _local5:Object;
trace((name + " >> Init ()"));
mSoundManager = parent.parent.parent["SoundManager"];
mGame = parent.parent.parent["Game"];
mTalkingHeads = parent.parent["Hud"].TalkingHeads;
if (!mFirstInit){
CreateProps();
mFirstInit = true;
};
mColTimer = 0;
mCurseTimer = 0;
mWorldColTimer = 0;
DialogueCueLayer.Init();
PlayerSprite.Init();
EnemySprite.Init();
mWorldCol = new CollisionList(parent["BuildingCollisions"]);
mWorldCol.returnAngle = true;
mWorldCol.addItem(PlayerSprite);
mWorldCol.addItem(EnemySprite);
mPlayerCol = new CollisionList(PlayerSprite);
mPlayerCol.returnAngle = true;
mPlayerCol.addItem(EnemySprite);
mPropsCol = new CollisionList(mPropsClip);
mPropsCol.returnAngle = true;
mPropsCol.addItem(PlayerSprite);
mPropsCol.addItem(EnemySprite);
mCrashPropsArr = new Array();
_local1 = mPropsClip["numChildren"];
_local2 = new Array();
_local3 = 0;
while (_local3 < _local1) {
_local4 = mPropsClip["getChildAt"](_local3);
if (_local4.mType != "Bomb"){
_local5 = new Object();
if (_local4.mType == "SpikeStrip"){
if (mGame.mDifficulty == 1){
_local5.clip = _local4.name;
_local5.xPos = _local4.mX;
_local5.yPos = _local4.mY;
_local2[_local3] = _local5;
_local4.ResetProp();
} else {
_local4.visible = false;
};
} else {
if (_local4.mType == "OilSlick"){
if (mGame.mDifficulty == 1){
_local5.clip = _local4.name;
_local5.xPos = _local4.mX;
_local5.yPos = _local4.mY;
_local2[_local3] = _local5;
_local4.ResetProp();
} else {
_local4.visible = false;
};
} else {
_local5.clip = _local4.name;
_local5.xPos = _local4.mX;
_local5.yPos = _local4.mY;
_local2[_local3] = _local5;
_local4.ResetProp();
};
};
} else {
mPropsClip.removeChild(_local4);
_local1--;
_local3--;
};
_local3++;
};
mPropsArr = _local2;
}
function GetWorldCol():void{
var _local1:Array;
var _local2:int;
var _local3:int;
var _local4:Object;
var _local5:MovieClip;
var _local6:String;
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:Number;
_local1 = mWorldCol.checkCollisions();
_local2 = _local1.length;
if ((((_local2 > 0)) && ((mWorldColTimer == 0)))){
_local3 = 0;
while (_local3 < _local2) {
_local4 = _local1[_local3];
_local5 = _local1[_local3].object1;
_local6 = _local5.name;
_local7 = _local5.rotation;
_local8 = _local4.angle;
_local9 = (_local8 * mFMath180Pi);
_local10 = (((_local9 + ((_local7 - 180) * -1)) - 90) + _local7);
this[_local6].AddWorldCol(_local10);
PlayCollisionSound();
mGame.UpdateLifeVal(_local6, 2);
_local3++;
};
mWorldColTimer++;
} else {
if ((((mWorldColTimer > 0)) && ((mWorldColTimer < 3)))){
mWorldColTimer++;
} else {
mWorldColTimer = 0;
};
};
}
function PlayCollisionSound():void{
var _local1:Number;
_local1 = Math.floor((Math.random() * 4));
if (_local1 == 0){
mSoundManager.PlaySfx("_collision1");
};
if (_local1 == 1){
mSoundManager.PlaySfx("_collision2");
};
if (_local1 == 2){
mSoundManager.PlaySfx("_collision3");
};
if (_local1 == 3){
mSoundManager.PlaySfx("_collision4");
};
}
function CreateProps():void{
var _local1:int;
var _local2:int;
var _local3:Object;
var _local4:Object;
var _local5:MovieClip;
_local1 = Props["numChildren"];
mPropsArr = new Array();
mPropsClip = new MovieClip();
addChild(mPropsClip);
_local2 = 0;
while (_local2 < _local1) {
_local3 = new Object();
_local4 = Props["getChildAt"](_local2);
if (_local4.mType == "SpikeStrip"){
_local5 = new SpikeStrip();
} else {
if (_local4.mType == "OilSlick"){
_local5 = new OilSlick();
} else {
if (_local4.mType == "Hydrant"){
_local5 = new Hydrant();
} else {
if (_local4.mType == "Mailbox"){
_local5 = new Mailbox();
} else {
if (_local4.mType == "StoplightFront"){
_local5 = new StoplightFront();
} else {
if (_local4.mType == "StoplightSide"){
_local5 = new StoplightSide();
} else {
if (_local4.mType == "StopSign"){
_local5 = new StopSign();
} else {
if (_local4.mType == "SlowSign"){
_local5 = new SlowSign();
} else {
if (_local4.mType == "Siren"){
_local5 = new Siren();
};
};
};
};
};
};
};
};
};
_local5.name = ("Prop" + _local2);
_local5.mX = _local4.x;
_local5.mY = _local4.y;
_local5.mRot = _local4.rotation;
mPropsClip.addChild(_local5);
_local3.clip = _local5.name;
_local3.xPos = _local5.mX;
_local3.yPos = _local5.mY;
mPropsArr[mPropsArr.length] = _local3;
_local2++;
};
swapChildren(Props, mPropsClip);
removeChild(Props);
}
function GetPropsCol():void{
var _local1:Array;
var _local2:Object;
var _local3:Object;
var _local4:MovieClip;
var _local5:int;
var _local6:int;
var _local7:int;
var _local8:Object;
var _local9:int;
var _local10:int;
var _local11:int;
var _local12:int;
var _local13:MovieClip;
var _local14:String;
_local1 = mPropsCol.checkCollisions();
if (_local1.length){
for each (_local2 in _local1) {
_local3 = _local2;
_local4 = _local2.object1;
_local7 = 0;
for each (_local8 in mPropsArr) {
_local5 = _local8.xPos;
_local6 = _local8.yPos;
_local9 = _local4.x;
_local10 = _local4.y;
_local11 = (_local9 - _local5);
_local12 = (_local10 - _local6);
if ((((_local11 <= 75)) && ((_local11 >= -75)))){
if ((((_local12 <= 75)) && ((_local12 >= -75)))){
_local13 = mPropsClip["getChildByName"](_local8.clip);
_local14 = _local13.mType;
if (_local13.visible){
if (_local14 == "Siren"){
if (_local4.name == "PlayerSprite"){
mSoundManager.PlaySfx("_beep1");
mGame.AddBoost();
_local13.visible = false;
return;
};
} else {
if (_local14 == "SpikeStrip"){
if (_local4.name == "EnemySprite"){
if (!mEnemySpike){
EnemySprite.mDriveAccel = (EnemySprite.mDriveAccel * 0.75);
mEnemySpike = true;
mGame.UpdateLifeVal("EnemySprite", 5);
mSoundManager.PlaySfx("_spikeStrip");
return;
};
} else {
if (_local4.name == "PlayerSprite"){
if (!mPlayerSpike){
PlayerSprite.mDriveAccel = (PlayerSprite.mDriveAccel * 0.75);
mPlayerSpike = true;
mGame.UpdateLifeVal("PlayerSprite", 5);
mSoundManager.PlaySfx("_spikeStrip");
return;
};
};
};
} else {
if (_local14 == "OilSlick"){
if (_local4.name == "EnemySprite"){
if (!mEnemySlick){
EnemySprite.OnOilSlick();
mEnemySlick = true;
return;
};
} else {
if (_local4.name == "PlayerSprite"){
if (!mPlayerSlick){
PlayerSprite.OnOilSlick();
mPlayerSlick = true;
return;
};
};
};
} else {
if (_local14 == "Bomb"){
_local4.mDriveAccel = (_local4.mDriveAccel * 0.5);
mSoundManager.PlaySfx("_explosion1");
FxLayer.AddFx("Explosion", _local13.x, _local13.y);
mPropsClip.removeChild(_local13);
mGame.UpdateLifeVal(_local4.name, 5);
mPropsArr.splice(_local7, 1);
return;
};
if (_local14 == "Hydrant"){
mSoundManager.PlaySfx("_hydrant");
mPropsArr.splice(_local7, 1);
_local13.gotoAndStop(2);
_local13.CrashProp(_local4.mForceX, _local4.mForceY);
AddCrashProp(_local13);
return;
};
if ((((_local14 == "StoplightFront")) || ((_local14 == "StoplightSide")))){
mSoundManager.PlaySfx("_pole");
mPropsArr.splice(_local7, 1);
_local13.gotoAndStop(2);
_local13.CrashProp(_local4.mForceX, _local4.mForceY);
AddCrashProp(_local13);
return;
};
if (_local14 == "Mailbox"){
mSoundManager.PlaySfx("_mailbox");
mPropsArr.splice(_local7, 1);
_local13.gotoAndStop(2);
_local13.CrashProp(_local4.mForceX, _local4.mForceY);
AddCrashProp(_local13);
return;
};
if (_local14 == "StopSign"){
mSoundManager.PlaySfx("_sign");
mPropsArr.splice(_local7, 1);
_local13.gotoAndStop(2);
_local13.CrashProp(_local4.mForceX, _local4.mForceY);
AddCrashProp(_local13);
return;
};
if (_local14 == "SlowSign"){
mSoundManager.PlaySfx("_sign");
mPropsArr.splice(_local7, 1);
_local13.gotoAndStop(2);
_local13.CrashProp(_local4.mForceX, _local4.mForceY);
AddCrashProp(_local13);
return;
};
};
};
};
return;
};
};
};
_local7++;
};
};
} else {
mPlayerSpike = false;
mEnemySpike = false;
mPlayerSlick = false;
mEnemySlick = false;
};
}
function Loop():void{
var _local1:int;
PlayerSprite.Loop();
EnemySprite.Loop();
GetWorldCol();
GetCarCol();
GetPropsCol();
if (mCrashPropsArr.length > 0){
_local1 = 0;
while (_local1 < mCrashPropsArr.length) {
if (mCrashPropsArr[_local1].alpha > 0){
mCrashPropsArr[_local1].AnimateCrash();
} else {
mCrashPropsArr.splice(_local1, 1);
};
_local1++;
};
};
}
function GetCarCol():void{
var _local1:Array;
var _local2:int;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:Number;
var _local11:Boolean;
var _local12:Number;
var _local13:Number;
var _local14:Number;
var _local15:Number;
var _local16:Number;
var _local17:Number;
_local1 = mPlayerCol.checkCollisions();
_local2 = _local1.length;
if ((((_local2 > 0)) && ((mColTimer == 0)))){
_local3 = PlayerSprite.x;
_local4 = PlayerSprite.y;
_local5 = EnemySprite.x;
_local6 = EnemySprite.y;
_local7 = PlayerSprite.mMtmAng;
_local8 = EnemySprite.mMtmAng;
_local9 = ((PlayerSprite.mThrottle >= 0)) ? 1 : -1;
_local10 = ((EnemySprite.mThrottle >= 0)) ? 1 : -1;
_local11 = ((Math.abs((PlayerSprite.mDriveForce * 2)) > Math.abs(EnemySprite.mDriveForce))) ? true : false;
_local12 = (_local3 - _local5);
_local13 = (_local4 - _local6);
_local14 = (_local5 - _local3);
_local15 = (_local6 - _local4);
_local16 = ((90 + (Math.atan2(_local13, _local12) * mFMath180Pi)) - 180);
_local17 = (90 + (Math.atan2(_local15, _local14) * mFMath180Pi));
FxLayer.AddFx("Crash", (_local3 - (_local12 / 2)), (_local4 - (_local13 / 2)));
EnemySprite.AddCol(_local16, _local7, (PlayerSprite.mDriveForce * _local9));
PlayerSprite.AddCol(_local17, _local8, ((EnemySprite.mDriveForce / 10) * _local10));
if (mGame.mDifficulty){
mGame.UpdateLifeVal("EnemySprite", 3);
} else {
mGame.UpdateLifeVal("EnemySprite", 4);
};
mColTimer++;
PlayCollisionSound();
} else {
if ((((mColTimer < 6)) && ((mColTimer > 0)))){
mColTimer++;
} else {
mColTimer = 0;
};
};
if ((((mCurseTimer > 0)) && ((mCurseTimer < 240)))){
mCurseTimer++;
} else {
mCurseTimer = 0;
};
}
}
}//package
Section 92
//StoplightFront (StoplightFront)
package {
public class StoplightFront extends Prop {
public function StoplightFront(){
addFrameScript(0, frame1);
mType = "StoplightFront";
}
function frame1(){
stop();
}
}
}//package
Section 93
//StoplightSide (StoplightSide)
package {
public class StoplightSide extends Prop {
public function StoplightSide(){
addFrameScript(0, frame1);
mType = "StoplightSide";
}
function frame1(){
stop();
}
}
}//package
Section 94
//StopSign (StopSign)
package {
public class StopSign extends Prop {
public function StopSign(){
addFrameScript(0, frame1);
mType = "StopSign";
}
function frame1(){
stop();
}
}
}//package
Section 95
//TalkingHeadClass (TalkingHeadClass)
package {
import flash.display.*;
public class TalkingHeadClass extends MovieClip {
public function Show():void{
gotoAndPlay("_show");
}
public function Hide():void{
gotoAndPlay("_hide");
}
}
}//package
Section 96
//TalkingHeads (TalkingHeads)
package {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.text.*;
import flash.net.*;
public class TalkingHeads extends MovieClip {
public var mLocal:Localization;
public var mOpenBubbles:Array;
public var HeroHead:MovieClip;
public var RightDialogue:MovieClip;
public var LeftDialogue:MovieClip;
public var mHideTimerNum:int;
public var mOpenHeads:Array;
public var mLang:String;
public var ChiefHead:MovieClip;
public var TerroristHead:MovieClip;
public var mDialogueNum:int;
public var mResponseTimerNum:int;
public function TalkingHeads(){
mResponseTimerNum = 0;
mHideTimerNum = 0;
mOpenHeads = new Array();
mOpenBubbles = new Array();
}
function ShowBubble(_arg1:String, _arg2:String):void{
if (_arg1 == "Left"){
LeftDialogue.SetText(_arg2);
LeftDialogue.Show();
};
if (_arg1 == "Right"){
RightDialogue.SetText(_arg2);
RightDialogue.Show();
};
mOpenBubbles[mOpenBubbles.length] = _arg1;
}
function HideTimer(_arg1:Event):void{
if (mHideTimerNum >= 90){
HideAll();
mHideTimerNum = 0;
removeEventListener(Event.ENTER_FRAME, HideTimer);
} else {
mHideTimerNum++;
};
}
function ShowDialogue(_arg1:int):void{
mDialogueNum = _arg1;
if (mDialogueNum == 0){
ShowBubble("Left", mLocal.LocalizeString("$ChiefDialogue0"));
ShowHead("Chief");
addEventListener(Event.ENTER_FRAME, ResponseTimer);
};
if (mDialogueNum == 1){
ShowBubble("Left", mLocal.LocalizeString("$TerroristDialogue0"));
ShowHead("Terrorist");
mHideTimerNum = 0;
addEventListener(Event.ENTER_FRAME, HideTimer);
};
if (mDialogueNum == 2){
ShowBubble("Left", mLocal.LocalizeString("$ChiefDialogue1"));
ShowHead("Chief");
mHideTimerNum = 0;
addEventListener(Event.ENTER_FRAME, HideTimer);
};
if (mDialogueNum == 3){
ShowBubble("Left", mLocal.LocalizeString("$TerroristDialogue1"));
ShowHead("Terrorist");
mHideTimerNum = 0;
addEventListener(Event.ENTER_FRAME, HideTimer);
};
if (mDialogueNum == 4){
ShowBubble("Left", mLocal.LocalizeString("$ChiefDialogue2"));
ShowHead("Chief");
addEventListener(Event.ENTER_FRAME, ResponseTimer);
};
if (mDialogueNum == 5){
ShowBubble("Left", mLocal.LocalizeString("$TerroristDialogue2"));
ShowHead("Terrorist");
mHideTimerNum = 0;
addEventListener(Event.ENTER_FRAME, HideTimer);
};
if (mDialogueNum == 6){
ShowBubble("Left", mLocal.LocalizeString("$ChiefDialogue3"));
ShowHead("Chief");
addEventListener(Event.ENTER_FRAME, ResponseTimer);
};
if (mDialogueNum == 7){
ShowBubble("Left", mLocal.LocalizeString("$ChiefDialogue4"));
ShowHead("Chief");
mHideTimerNum = 0;
addEventListener(Event.ENTER_FRAME, HideTimer);
};
}
function Init():void{
mLocal = parent.parent.parent.parent["mLocal"];
}
function HideHead(_arg1:String):void{
if (_arg1 == "Chief"){
ChiefHead.Hide();
};
if (_arg1 == "Terrorist"){
TerroristHead.Hide();
};
if (_arg1 == "Hero"){
HeroHead.Hide();
};
}
function ResponseTimer(_arg1:Event):void{
if (mResponseTimerNum >= 45){
if (mDialogueNum == 0){
ShowBubble("Right", mLocal.LocalizeString("$HeroDialogue0"));
ShowHead("Hero");
mHideTimerNum = 0;
addEventListener(Event.ENTER_FRAME, HideTimer);
};
if (mDialogueNum == 1){
};
if (mDialogueNum == 2){
};
if (mDialogueNum == 3){
};
if (mDialogueNum == 4){
ShowBubble("Right", mLocal.LocalizeString("$HeroDialogue1"));
ShowHead("Hero");
mHideTimerNum = 0;
addEventListener(Event.ENTER_FRAME, HideTimer);
};
if (mDialogueNum == 5){
};
if (mDialogueNum == 6){
ShowBubble("Right", mLocal.LocalizeString("$HeroDialogue2"));
ShowHead("Hero");
mHideTimerNum = 0;
addEventListener(Event.ENTER_FRAME, HideTimer);
};
if (mDialogueNum == 7){
};
mResponseTimerNum = 0;
removeEventListener(Event.ENTER_FRAME, ResponseTimer);
} else {
mResponseTimerNum++;
};
}
function HideBubble(_arg1:String):void{
if (_arg1 == "Left"){
LeftDialogue.Hide();
};
if (_arg1 == "Right"){
RightDialogue.Hide();
};
}
function ShowHead(_arg1:String):void{
if (_arg1 == "Chief"){
ChiefHead.Show();
};
if (_arg1 == "Terrorist"){
TerroristHead.Show();
};
if (_arg1 == "Hero"){
HeroHead.Show();
};
mOpenHeads[mOpenHeads.length] = _arg1;
}
function PlayCurse():void{
var _local1:Number;
if ((((mHideTimerNum == 0)) && ((mResponseTimerNum == 0)))){
HideAll();
_local1 = Math.floor((Math.random() * 4));
if (_local1 == 0){
ShowBubble("Left", mLocal.LocalizeString("$TerroristTaunt0"));
ShowHead("Terrorist");
mHideTimerNum = 0;
addEventListener(Event.ENTER_FRAME, HideTimer);
};
if (_local1 == 1){
ShowBubble("Left", mLocal.LocalizeString("$TerroristTaunt1"));
ShowHead("Terrorist");
mHideTimerNum = 0;
addEventListener(Event.ENTER_FRAME, HideTimer);
};
if (_local1 == 2){
ShowBubble("Left", mLocal.LocalizeString("$TerroristTaunt2"));
ShowHead("Terrorist");
mHideTimerNum = 0;
addEventListener(Event.ENTER_FRAME, HideTimer);
};
if (_local1 == 3){
ShowBubble("Left", mLocal.LocalizeString("$TerroristTaunt3"));
ShowHead("Terrorist");
mHideTimerNum = 0;
addEventListener(Event.ENTER_FRAME, HideTimer);
};
};
}
function HideAll():void{
var _local1:int;
_local1 = 0;
while (_local1 < mOpenBubbles.length) {
HideBubble(mOpenBubbles[_local1]);
HideHead(mOpenHeads[_local1]);
_local1++;
};
removeEventListener(Event.ENTER_FRAME, ResponseTimer);
removeEventListener(Event.ENTER_FRAME, HideTimer);
mOpenBubbles = new Array();
mOpenHeads = new Array();
}
}
}//package
Section 97
//TerroristHead (TerroristHead)
package {
public class TerroristHead extends TalkingHeadClass {
public function TerroristHead(){
addFrameScript(0, frame1, 9, frame10, 19, frame20);
}
function frame10(){
stop();
}
function frame1(){
stop();
}
function frame20(){
stop();
}
}
}//package
Section 98
//Tiremark (Tiremark)
package {
public class Tiremark extends Prop {
public function Tiremark(){
addFrameScript(39, frame40, 40, frame41);
}
function frame40(){
var _local1 = parent;
_local1["RemoveTiremark"](this);
}
function frame41(){
stop();
}
}
}//package
Section 99
//TiremarksLayer (TiremarksLayer)
package {
import flash.display.*;
public class TiremarksLayer extends MovieClip {
function AddTiremark(_arg1:Number, _arg2:Number, _arg3:Number):void{
var _local4:MovieClip;
_local4 = new Tiremark();
_local4.x = _arg1;
_local4.y = _arg2;
_local4.rotation = _arg3;
addChild(_local4);
}
function AddOilmark(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):void{
var _local5:MovieClip;
_local5 = new Oilmark();
_local5.x = _arg1;
_local5.y = _arg2;
_local5.rotation = _arg3;
_local5.alpha = _arg4;
addChild(_local5);
}
function RemoveTiremark(_arg1:MovieClip):void{
removeChild(_arg1);
}
}
}//package
Section 100
//WinGamePop (WinGamePop)
package {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.text.*;
import flash.net.*;
public class WinGamePop extends MovieClip {
public var OrderButton:MovieClip;
public var mExitVar:String;
public var ScoreInd:MovieClip;
public var ReplayButton:MovieClip;
public var SendFriendButton:MovieClip;
public var InfoButton:MovieClip;
public function WinGamePop(){
addFrameScript(0, frame1, 16, frame17, 29, frame30, 39, frame40);
ReplayButton.addEventListener(MouseEvent.CLICK, OnReplayButton);
ReplayButton.addEventListener(MouseEvent.ROLL_OVER, OnReplayOver);
ReplayButton.addEventListener(MouseEvent.ROLL_OUT, OnReplayUp);
InfoButton.addEventListener(MouseEvent.CLICK, OnInfoButton);
InfoButton.addEventListener(MouseEvent.ROLL_OVER, OnInfoOver);
InfoButton.addEventListener(MouseEvent.ROLL_OUT, OnInfoUp);
SendFriendButton.addEventListener(MouseEvent.CLICK, OnSendFriendButton);
SendFriendButton.addEventListener(MouseEvent.ROLL_OVER, OnSendFriendOver);
SendFriendButton.addEventListener(MouseEvent.ROLL_OUT, OnSendFriendUp);
OrderButton.addEventListener(MouseEvent.CLICK, OnOrderButton);
OrderButton.addEventListener(MouseEvent.ROLL_OVER, OnOrderOver);
OrderButton.addEventListener(MouseEvent.ROLL_OUT, OnOrderUp);
}
function OnReplayUp(_arg1:MouseEvent):void{
ReplayButton.gotoAndStop("_up");
}
function OnOrderOver(_arg1:MouseEvent):void{
OrderButton.gotoAndStop("_over");
}
function Show(_arg1:int):void{
ScoreInd.Init(_arg1);
visible = true;
gotoAndPlay("_show");
}
function Init():void{
mExitVar = "";
gotoAndStop(1);
trace((name + " >> Init ()"));
}
function OnSendFriendOver(_arg1:MouseEvent):void{
SendFriendButton.gotoAndStop("_over");
}
function OnSendFriendButton(_arg1:MouseEvent):void{
SendFriendButton.gotoAndStop("_press");
mExitVar = "SendFriend";
Hide();
}
function OnSendFriendUp(_arg1:MouseEvent):void{
SendFriendButton.gotoAndStop("_up");
}
function Hide():void{
if (visible){
if (mExitVar == "Replay"){
gotoAndPlay("_replayHide");
} else {
gotoAndPlay("_hide");
};
};
}
function frame1(){
stop();
}
function frame17(){
stop();
}
function OnOrderUp(_arg1:MouseEvent):void{
OrderButton.gotoAndStop("_up");
}
function frame30(){
OnHide();
}
function OnReplayButton(_arg1:MouseEvent):void{
ReplayButton.gotoAndStop("_press");
mExitVar = "Replay";
Hide();
}
function OnOrderButton(_arg1:MouseEvent):void{
var _local2:URLRequest;
OrderButton.gotoAndStop("_press");
_local2 = new URLRequest("http://coptherecruit.ubi.com/buynow?utm_source=partnersites&utm_medium=flashgame_buynow&utm_campaign=COP");
navigateToURL(_local2);
}
function frame40(){
OnHide();
}
function OnReplayOver(_arg1:MouseEvent):void{
ReplayButton.gotoAndStop("_over");
}
function OnInfoOver(_arg1:MouseEvent):void{
InfoButton.gotoAndStop("_over");
}
function OnInfoUp(_arg1:MouseEvent):void{
InfoButton.gotoAndStop("_up");
}
function OnHide():void{
if (mExitVar == "Replay"){
var _local1 = parent.parent.parent;
_local1["SetMode"]("Game");
} else {
if (mExitVar == "SendFriend"){
_local1 = parent;
_local1["ShowPop"]("SendToAFriend");
};
};
gotoAndStop(1);
visible = false;
}
function OnInfoButton(_arg1:MouseEvent):void{
var _local2:URLRequest;
InfoButton.gotoAndStop("_press");
_local2 = new URLRequest("http://coptherecruit.ubi.com?utm_source=partnersites&utm_medium=flashgame&utm_campaign=COP");
navigateToURL(_local2);
}
}
}//package