Section 1
//MD5 (com.adobe.crypto.MD5)
package com.adobe.crypto {
import com.adobe.utils.*;
public class MD5 {
private static function ff(_arg1:int, _arg2:int, _arg3:int, _arg4:int, _arg5:int, _arg6:int, _arg7:int):int{
return (transform(f, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7));
}
private static function createBlocks(_arg1:String):Array{
var _local2:Array;
var _local3:int;
var _local4:int;
var _local5:int;
_local2 = new Array();
_local3 = (_arg1.length * 8);
_local4 = 0xFF;
_local5 = 0;
while (_local5 < _local3) {
_local2[(_local5 >> 5)] = (_local2[(_local5 >> 5)] | ((_arg1.charCodeAt((_local5 / 8)) & _local4) << (_local5 % 32)));
_local5 = (_local5 + 8);
};
_local2[(_local3 >> 5)] = (_local2[(_local3 >> 5)] | (128 << (_local3 % 32)));
_local2[((((_local3 + 64) >>> 9) << 4) + 14)] = _local3;
return (_local2);
}
private static function ii(_arg1:int, _arg2:int, _arg3:int, _arg4:int, _arg5:int, _arg6:int, _arg7:int):int{
return (transform(i, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7));
}
private static function f(_arg1:int, _arg2:int, _arg3:int):int{
return (((_arg1 & _arg2) | (~(_arg1) & _arg3)));
}
private static function g(_arg1:int, _arg2:int, _arg3:int):int{
return (((_arg1 & _arg3) | (_arg2 & ~(_arg3))));
}
private static function h(_arg1:int, _arg2:int, _arg3:int):int{
return (((_arg1 ^ _arg2) ^ _arg3));
}
private static function i(_arg1:int, _arg2:int, _arg3:int):int{
return ((_arg2 ^ (_arg1 | ~(_arg3))));
}
private static function transform(_arg1:Function, _arg2:int, _arg3:int, _arg4:int, _arg5:int, _arg6:int, _arg7:int, _arg8:int):int{
var _local9:int;
_local9 = (((_arg2 + int(_arg1(_arg3, _arg4, _arg5))) + _arg6) + _arg8);
return ((IntUtil.rol(_local9, _arg7) + _arg3));
}
private static function hh(_arg1:int, _arg2:int, _arg3:int, _arg4:int, _arg5:int, _arg6:int, _arg7:int):int{
return (transform(h, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7));
}
public static function hash(_arg1:String):String{
var _local2:int;
var _local3:int;
var _local4:int;
var _local5:int;
var _local6:int;
var _local7:int;
var _local8:int;
var _local9:int;
var _local10:Array;
var _local11:int;
var _local12:int;
_local2 = 1732584193;
_local3 = -271733879;
_local4 = -1732584194;
_local5 = 271733878;
_local10 = createBlocks(_arg1);
_local11 = _local10.length;
_local12 = 0;
while (_local12 < _local11) {
_local6 = _local2;
_local7 = _local3;
_local8 = _local4;
_local9 = _local5;
_local2 = ff(_local2, _local3, _local4, _local5, _local10[(_local12 + 0)], 7, -680876936);
_local5 = ff(_local5, _local2, _local3, _local4, _local10[(_local12 + 1)], 12, -389564586);
_local4 = ff(_local4, _local5, _local2, _local3, _local10[(_local12 + 2)], 17, 606105819);
_local3 = ff(_local3, _local4, _local5, _local2, _local10[(_local12 + 3)], 22, -1044525330);
_local2 = ff(_local2, _local3, _local4, _local5, _local10[(_local12 + 4)], 7, -176418897);
_local5 = ff(_local5, _local2, _local3, _local4, _local10[(_local12 + 5)], 12, 1200080426);
_local4 = ff(_local4, _local5, _local2, _local3, _local10[(_local12 + 6)], 17, -1473231341);
_local3 = ff(_local3, _local4, _local5, _local2, _local10[(_local12 + 7)], 22, -45705983);
_local2 = ff(_local2, _local3, _local4, _local5, _local10[(_local12 + 8)], 7, 1770035416);
_local5 = ff(_local5, _local2, _local3, _local4, _local10[(_local12 + 9)], 12, -1958414417);
_local4 = ff(_local4, _local5, _local2, _local3, _local10[(_local12 + 10)], 17, -42063);
_local3 = ff(_local3, _local4, _local5, _local2, _local10[(_local12 + 11)], 22, -1990404162);
_local2 = ff(_local2, _local3, _local4, _local5, _local10[(_local12 + 12)], 7, 1804603682);
_local5 = ff(_local5, _local2, _local3, _local4, _local10[(_local12 + 13)], 12, -40341101);
_local4 = ff(_local4, _local5, _local2, _local3, _local10[(_local12 + 14)], 17, -1502002290);
_local3 = ff(_local3, _local4, _local5, _local2, _local10[(_local12 + 15)], 22, 1236535329);
_local2 = gg(_local2, _local3, _local4, _local5, _local10[(_local12 + 1)], 5, -165796510);
_local5 = gg(_local5, _local2, _local3, _local4, _local10[(_local12 + 6)], 9, -1069501632);
_local4 = gg(_local4, _local5, _local2, _local3, _local10[(_local12 + 11)], 14, 643717713);
_local3 = gg(_local3, _local4, _local5, _local2, _local10[(_local12 + 0)], 20, -373897302);
_local2 = gg(_local2, _local3, _local4, _local5, _local10[(_local12 + 5)], 5, -701558691);
_local5 = gg(_local5, _local2, _local3, _local4, _local10[(_local12 + 10)], 9, 38016083);
_local4 = gg(_local4, _local5, _local2, _local3, _local10[(_local12 + 15)], 14, -660478335);
_local3 = gg(_local3, _local4, _local5, _local2, _local10[(_local12 + 4)], 20, -405537848);
_local2 = gg(_local2, _local3, _local4, _local5, _local10[(_local12 + 9)], 5, 568446438);
_local5 = gg(_local5, _local2, _local3, _local4, _local10[(_local12 + 14)], 9, -1019803690);
_local4 = gg(_local4, _local5, _local2, _local3, _local10[(_local12 + 3)], 14, -187363961);
_local3 = gg(_local3, _local4, _local5, _local2, _local10[(_local12 + 8)], 20, 1163531501);
_local2 = gg(_local2, _local3, _local4, _local5, _local10[(_local12 + 13)], 5, -1444681467);
_local5 = gg(_local5, _local2, _local3, _local4, _local10[(_local12 + 2)], 9, -51403784);
_local4 = gg(_local4, _local5, _local2, _local3, _local10[(_local12 + 7)], 14, 1735328473);
_local3 = gg(_local3, _local4, _local5, _local2, _local10[(_local12 + 12)], 20, -1926607734);
_local2 = hh(_local2, _local3, _local4, _local5, _local10[(_local12 + 5)], 4, -378558);
_local5 = hh(_local5, _local2, _local3, _local4, _local10[(_local12 + 8)], 11, -2022574463);
_local4 = hh(_local4, _local5, _local2, _local3, _local10[(_local12 + 11)], 16, 1839030562);
_local3 = hh(_local3, _local4, _local5, _local2, _local10[(_local12 + 14)], 23, -35309556);
_local2 = hh(_local2, _local3, _local4, _local5, _local10[(_local12 + 1)], 4, -1530992060);
_local5 = hh(_local5, _local2, _local3, _local4, _local10[(_local12 + 4)], 11, 1272893353);
_local4 = hh(_local4, _local5, _local2, _local3, _local10[(_local12 + 7)], 16, -155497632);
_local3 = hh(_local3, _local4, _local5, _local2, _local10[(_local12 + 10)], 23, -1094730640);
_local2 = hh(_local2, _local3, _local4, _local5, _local10[(_local12 + 13)], 4, 681279174);
_local5 = hh(_local5, _local2, _local3, _local4, _local10[(_local12 + 0)], 11, -358537222);
_local4 = hh(_local4, _local5, _local2, _local3, _local10[(_local12 + 3)], 16, -722521979);
_local3 = hh(_local3, _local4, _local5, _local2, _local10[(_local12 + 6)], 23, 76029189);
_local2 = hh(_local2, _local3, _local4, _local5, _local10[(_local12 + 9)], 4, -640364487);
_local5 = hh(_local5, _local2, _local3, _local4, _local10[(_local12 + 12)], 11, -421815835);
_local4 = hh(_local4, _local5, _local2, _local3, _local10[(_local12 + 15)], 16, 530742520);
_local3 = hh(_local3, _local4, _local5, _local2, _local10[(_local12 + 2)], 23, -995338651);
_local2 = ii(_local2, _local3, _local4, _local5, _local10[(_local12 + 0)], 6, -198630844);
_local5 = ii(_local5, _local2, _local3, _local4, _local10[(_local12 + 7)], 10, 1126891415);
_local4 = ii(_local4, _local5, _local2, _local3, _local10[(_local12 + 14)], 15, -1416354905);
_local3 = ii(_local3, _local4, _local5, _local2, _local10[(_local12 + 5)], 21, -57434055);
_local2 = ii(_local2, _local3, _local4, _local5, _local10[(_local12 + 12)], 6, 1700485571);
_local5 = ii(_local5, _local2, _local3, _local4, _local10[(_local12 + 3)], 10, -1894986606);
_local4 = ii(_local4, _local5, _local2, _local3, _local10[(_local12 + 10)], 15, -1051523);
_local3 = ii(_local3, _local4, _local5, _local2, _local10[(_local12 + 1)], 21, -2054922799);
_local2 = ii(_local2, _local3, _local4, _local5, _local10[(_local12 + 8)], 6, 1873313359);
_local5 = ii(_local5, _local2, _local3, _local4, _local10[(_local12 + 15)], 10, -30611744);
_local4 = ii(_local4, _local5, _local2, _local3, _local10[(_local12 + 6)], 15, -1560198380);
_local3 = ii(_local3, _local4, _local5, _local2, _local10[(_local12 + 13)], 21, 1309151649);
_local2 = ii(_local2, _local3, _local4, _local5, _local10[(_local12 + 4)], 6, -145523070);
_local5 = ii(_local5, _local2, _local3, _local4, _local10[(_local12 + 11)], 10, -1120210379);
_local4 = ii(_local4, _local5, _local2, _local3, _local10[(_local12 + 2)], 15, 718787259);
_local3 = ii(_local3, _local4, _local5, _local2, _local10[(_local12 + 9)], 21, -343485551);
_local2 = (_local2 + _local6);
_local3 = (_local3 + _local7);
_local4 = (_local4 + _local8);
_local5 = (_local5 + _local9);
_local12 = (_local12 + 16);
};
return ((((IntUtil.toHex(_local2) + IntUtil.toHex(_local3)) + IntUtil.toHex(_local4)) + IntUtil.toHex(_local5)));
}
private static function gg(_arg1:int, _arg2:int, _arg3:int, _arg4:int, _arg5:int, _arg6:int, _arg7:int):int{
return (transform(g, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7));
}
}
}//package com.adobe.crypto
Section 2
//IntUtil (com.adobe.utils.IntUtil)
package com.adobe.utils {
public class IntUtil {
private static var hexChars:String = "0123456789abcdef";
public static function toHex(_arg1:int, _arg2:Boolean=false):String{
var _local3:String;
var _local4:int;
var _local5:int;
_local3 = "";
if (_arg2){
_local4 = 0;
while (_local4 < 4) {
_local3 = (_local3 + (hexChars.charAt(((_arg1 >> (((3 - _local4) * 8) + 4)) & 15)) + hexChars.charAt(((_arg1 >> ((3 - _local4) * 8)) & 15))));
_local4++;
};
} else {
_local5 = 0;
while (_local5 < 4) {
_local3 = (_local3 + (hexChars.charAt(((_arg1 >> ((_local5 * 8) + 4)) & 15)) + hexChars.charAt(((_arg1 >> (_local5 * 8)) & 15))));
_local5++;
};
};
return (_local3);
}
public static function ror(_arg1:int, _arg2:int):uint{
var _local3:int;
_local3 = (32 - _arg2);
return (((_arg1 << _local3) | (_arg1 >>> (32 - _local3))));
}
public static function rol(_arg1:int, _arg2:int):int{
return (((_arg1 << _arg2) | (_arg1 >>> (32 - _arg2))));
}
}
}//package com.adobe.utils
Section 3
//Tracker (com.memecounter.Tracker)
package com.memecounter {
import flash.display.*;
import flash.events.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
public class Tracker {
private static var ori_dom:String;
private static var lurl:String;
private static var _isReady:Boolean = false;
public static var a:uint = 0;
public static var root:DisplayObject;
public static var c:uint;
public static var d:String = "";
private static var _isInited:Boolean = false;
public static var fpv:String = "";
private static var l:Loader;
private static var tracker:MovieClip;
public static var da:Array = ["distralytics.com", "distralytics.co.uk"];
private static function loadError(_arg1:Event):void{
a++;
lc();
}
public static function init(_arg1:uint, _arg2:DisplayObject):void{
var _local3:uint;
if (!_isInited){
_isInited = true;
c = _arg1;
root = _arg2;
_local3 = 0;
while (_local3 < da.length) {
Security.allowDomain(da[_local3], ((c + ".c.") + da[_local3]), ("*." + da[_local3]));
_local3++;
};
ori_dom = (root.loaderInfo.parameters.hasOwnProperty("ori_dom")) ? root.loaderInfo.parameters.ori_dom : "";
d = ((ori_dom)!="") ? ori_dom : ((root.loaderInfo.loaderURL.split("/")[0].indexOf("http"))==-1) ? "Local" : root.loaderInfo.loaderURL.split("/")[2].split("?")[0];
fpv = Capabilities.version.split(" ")[1].split(",")[0];
lurl = ((((((((("/control/tracking/trackerAS3.swf" + "?c=") + c) + "&r=") + Math.floor((Math.random() * 10000000000))) + "&d=") + d) + "&p=") + fpv) + "&as=3");
l = new Loader();
l.contentLoaderInfo.addEventListener(Event.INIT, loadComplete);
l.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, loadError);
lc();
};
}
public static function get isReady():Boolean{
return (isReady);
}
public static function kvClick(_arg1:uint):void{
if (_isReady){
tracker.kvClick(_arg1);
};
}
public static function kvCountry():String{
if (_isReady){
return (tracker.kvCountry());
};
return ("");
}
public static function kvEvent(_arg1:uint):void{
if (_isReady){
tracker.kvEvent(_arg1);
};
}
private static function lc():void{
var _local1:String;
_local1 = (((("http://" + c) + ".c.") + da[(a % da.length)]) + lurl);
Security.allowDomain(_local1);
l.load(new URLRequest(_local1));
}
private static function loadComplete(_arg1:Event):void{
tracker = _arg1.target.content;
tracker.init(getDefinitionByName("com.memecounter.Tracker"), root);
_isReady = true;
}
}
}//package com.memecounter
Section 4
//MatrixTransformer (fl.motion.MatrixTransformer)
package fl.motion {
import flash.geom.*;
public class MatrixTransformer {
public static function getSkewY(_arg1:Matrix):Number{
return ((Math.atan2(_arg1.b, _arg1.a) * (180 / Math.PI)));
}
public static function getScaleX(_arg1:Matrix):Number{
return (Math.sqrt(((_arg1.a * _arg1.a) + (_arg1.b * _arg1.b))));
}
public static function getScaleY(_arg1:Matrix):Number{
return (Math.sqrt(((_arg1.c * _arg1.c) + (_arg1.d * _arg1.d))));
}
public static function setSkewXRadians(_arg1:Matrix, _arg2:Number):void{
var _local3:Number;
_local3 = getScaleY(_arg1);
_arg1.c = (-(_local3) * Math.sin(_arg2));
_arg1.d = (_local3 * Math.cos(_arg2));
}
public static function setRotation(_arg1:Matrix, _arg2:Number):void{
setRotationRadians(_arg1, (_arg2 * (Math.PI / 180)));
}
public static function rotateAroundInternalPoint(_arg1:Matrix, _arg2:Number, _arg3:Number, _arg4:Number):void{
var _local5:Point;
_local5 = new Point(_arg2, _arg3);
_local5 = _arg1.transformPoint(_local5);
_arg1.tx = (_arg1.tx - _local5.x);
_arg1.ty = (_arg1.ty - _local5.y);
_arg1.rotate((_arg4 * (Math.PI / 180)));
_arg1.tx = (_arg1.tx + _local5.x);
_arg1.ty = (_arg1.ty + _local5.y);
}
public static function setSkewX(_arg1:Matrix, _arg2:Number):void{
setSkewXRadians(_arg1, (_arg2 * (Math.PI / 180)));
}
public static function setSkewY(_arg1:Matrix, _arg2:Number):void{
setSkewYRadians(_arg1, (_arg2 * (Math.PI / 180)));
}
public static function setScaleX(_arg1:Matrix, _arg2:Number):void{
var _local3:Number;
var _local4:Number;
var _local5:Number;
_local3 = getScaleX(_arg1);
if (_local3){
_local4 = (_arg2 / _local3);
_arg1.a = (_arg1.a * _local4);
_arg1.b = (_arg1.b * _local4);
} else {
_local5 = getSkewYRadians(_arg1);
_arg1.a = (Math.cos(_local5) * _arg2);
_arg1.b = (Math.sin(_local5) * _arg2);
};
}
public static function setScaleY(_arg1:Matrix, _arg2:Number):void{
var _local3:Number;
var _local4:Number;
var _local5:Number;
_local3 = getScaleY(_arg1);
if (_local3){
_local4 = (_arg2 / _local3);
_arg1.c = (_arg1.c * _local4);
_arg1.d = (_arg1.d * _local4);
} else {
_local5 = getSkewXRadians(_arg1);
_arg1.c = (-(Math.sin(_local5)) * _arg2);
_arg1.d = (Math.cos(_local5) * _arg2);
};
}
public static function setRotationRadians(_arg1:Matrix, _arg2:Number):void{
var _local3:Number;
var _local4:Number;
_local3 = getRotationRadians(_arg1);
_local4 = getSkewXRadians(_arg1);
setSkewXRadians(_arg1, ((_local4 + _arg2) - _local3));
setSkewYRadians(_arg1, _arg2);
}
public static function setSkewYRadians(_arg1:Matrix, _arg2:Number):void{
var _local3:Number;
_local3 = getScaleX(_arg1);
_arg1.a = (_local3 * Math.cos(_arg2));
_arg1.b = (_local3 * Math.sin(_arg2));
}
public static function getSkewX(_arg1:Matrix):Number{
return ((Math.atan2(-(_arg1.c), _arg1.d) * (180 / Math.PI)));
}
public static function getSkewYRadians(_arg1:Matrix):Number{
return (Math.atan2(_arg1.b, _arg1.a));
}
public static function getSkewXRadians(_arg1:Matrix):Number{
return (Math.atan2(-(_arg1.c), _arg1.d));
}
public static function getRotation(_arg1:Matrix):Number{
return ((getRotationRadians(_arg1) * (180 / Math.PI)));
}
public static function rotateAroundExternalPoint(_arg1:Matrix, _arg2:Number, _arg3:Number, _arg4:Number):void{
_arg1.tx = (_arg1.tx - _arg2);
_arg1.ty = (_arg1.ty - _arg3);
_arg1.rotate((_arg4 * (Math.PI / 180)));
_arg1.tx = (_arg1.tx + _arg2);
_arg1.ty = (_arg1.ty + _arg3);
}
public static function getRotationRadians(_arg1:Matrix):Number{
return (getSkewYRadians(_arg1));
}
public static function matchInternalPointWithExternal(_arg1:Matrix, _arg2:Point, _arg3:Point):void{
var _local4:Point;
var _local5:Number;
var _local6:Number;
_local4 = _arg1.transformPoint(_arg2);
_local5 = (_arg3.x - _local4.x);
_local6 = (_arg3.y - _local4.y);
_arg1.tx = (_arg1.tx + _local5);
_arg1.ty = (_arg1.ty + _local6);
}
}
}//package fl.motion
Section 5
//ArrowKeys (koko.ArrowKeys)
package koko {
import flash.events.*;
public class ArrowKeys {
var target_root;
public static var leftArrow;
public static var downArrow:Boolean = false;
public static var rightArrow;
public static var upArrow;
public function ArrowKeys(){
target_root = SetStage.root_target;
super();
target_root.stage.addEventListener(KeyboardEvent.KEY_DOWN, fnKeyDown);
target_root.stage.addEventListener(KeyboardEvent.KEY_UP, fnKeyUp);
}
public function fnKeyUp(_arg1:KeyboardEvent){
switch (_arg1.keyCode){
case 37:
leftArrow = false;
break;
case 39:
rightArrow = false;
break;
case 38:
upArrow = false;
break;
case 40:
downArrow = false;
break;
};
}
public function fnKeyDown(_arg1:KeyboardEvent){
switch (_arg1.keyCode){
case 37:
leftArrow = true;
break;
case 39:
rightArrow = true;
break;
case 38:
upArrow = true;
break;
case 40:
downArrow = true;
break;
};
}
}
}//package koko
Section 6
//BlitMap (koko.BlitMap)
package koko {
import flash.display.*;
public class BlitMap extends MovieClip {
public var numberOfBlits:int;
public var blitMapObj;
public var bMapData:BitmapData;
public var blitMapData:BitmapData;
public var blitMapHolder:Bitmap;
public var colorArray:Array;
public var target_root:Sprite;
public var colorArrayStr:Array;
public function BlitMap(){
target_root = SetStage.root_target;
blitMapData = new BitmapData(1440, 1440, true, 0xFFFFFF);
blitMapHolder = new Bitmap(blitMapData);
blitMapObj = new Object();
colorArray = new Array(0xFFFFFF, 0xFEFEFE, 0xFDFDFD, 0xFEFEFE, 0xFBFBFB, 0xFAFAFA, 0xF9F9F9, 0xF8F8F8);
colorArrayStr = new Array("ffffff", "fefefe", "fdfdfd", "fefefe", "fbfbfb", "fafafa", "f9f9f9", "f8f8f8");
super();
addFrameScript(0, frame1);
}
public function addBlitMapObject(_arg1:int, _arg2:Number, _arg3:Number, _arg4, _arg5):void{
var _local6:*;
var _local7:MovieClip;
var _local8:*;
var _local9:*;
var _local10:BitmapData;
var _local11:Bitmap;
_local6 = 1;
while (_local6 <= _arg1) {
_local7 = new MovieClip();
_local7.x = _arg2;
_local7.y = _arg3;
_local7.name = ("blit" + _local6);
addChild(_local7);
_local8 = _arg4;
_local9 = _arg5;
_local10 = new BitmapData(_local8, _local9, false, colorArray[(_local6 - 1)]);
_local11 = new Bitmap(_local10);
_local11.name = "inner";
_local11.x = (0 - (_local8 / 2));
_local11.y = (0 - (_local9 / 2));
_local7.addChild(_local11);
_local6++;
};
}
public function drawBlitMap(){
blitMapData.draw(this);
}
function frame1(){
stop();
}
public function setupBlitMap1(){
removeBlitMapObjects();
this.gotoAndStop(1);
bMapData = null;
bMapData = new bMap1(0, 0);
blitMapData.draw(bMapData);
addBlitMapObject(blitMapObj.numberOfBlits, blitMapObj.x, blitMapObj.y, blitMapObj.w, blitMapObj.h);
}
public function setupBlitMap4(){
removeBlitMapObjects();
this.gotoAndStop(4);
bMapData = null;
bMapData = new bMap4(0, 0);
blitMapData.draw(bMapData);
addBlitMapObject(blitMapObj.numberOfBlits, blitMapObj.x, blitMapObj.y, blitMapObj.w, blitMapObj.h);
}
public function setupBlitMap3(){
removeBlitMapObjects();
this.gotoAndStop(3);
bMapData = null;
bMapData = new bMap3(0, 0);
blitMapData.draw(bMapData);
addBlitMapObject(blitMapObj.numberOfBlits, blitMapObj.x, blitMapObj.y, blitMapObj.w, blitMapObj.h);
}
public function removeBlitMapObjects(){
var _local1:*;
_local1 = 1;
while (_local1 <= 8) {
removeChild(getChildByName(("blit" + _local1)));
_local1++;
};
}
public function setupBlitMap2(){
removeBlitMapObjects();
this.gotoAndStop(2);
bMapData = null;
bMapData = new bMap2(0, 0);
blitMapData.draw(bMapData);
addBlitMapObject(blitMapObj.numberOfBlits, blitMapObj.x, blitMapObj.y, blitMapObj.w, blitMapObj.h);
}
public function getPixelValue(_arg1, _arg2, _arg3, _arg4):uint{
var _local5:uint;
if (_arg3){
_local5 = blitMapData.getPixel(_arg1, _arg2);
} else {
_local5 = bMapData.getPixel(_arg1, _arg2);
};
return (_local5);
}
public function setupBlitMap5(){
removeBlitMapObjects();
this.gotoAndStop(5);
bMapData = null;
bMapData = new bMap5(0, 0);
blitMapData.draw(bMapData);
addBlitMapObject(blitMapObj.numberOfBlits, blitMapObj.x, blitMapObj.y, blitMapObj.w, blitMapObj.h);
}
public function buildBlitMap(_arg1:int, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number):void{
blitMapObj.numberOfBlits = _arg1;
blitMapObj.x = _arg2;
blitMapObj.y = _arg3;
blitMapObj.w = _arg4;
blitMapObj.h = _arg5;
target_root.addChildAt(this, 0);
this.gotoAndStop(2);
addBlitMapObject(_arg1, _arg2, _arg3, _arg4, _arg5);
target_root.addChildAt(blitMapHolder, 1);
}
}
}//package koko
Section 7
//ConvertDegrees (koko.ConvertDegrees)
package koko {
public class ConvertDegrees {
private var _radian:Number;
private var _degree:Number;
public function convertToDegree(_arg1:Number){
_degree = ((_arg1 * 180) / Math.PI);
return (_degree);
}
public function convertToRadian(_arg1:Number){
_radian = ((_arg1 * Math.PI) / 180);
return (_radian);
}
}
}//package koko
Section 8
//ConvertTime (koko.ConvertTime)
package koko {
public class ConvertTime {
public function convertTime(_arg1):String{
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:String;
_local2 = Math.floor((_arg1 / 1000));
_local3 = Math.floor(((_arg1 - (_local2 * 1000)) / 10));
if (_local3 < 10){
_local3 = ("0" + _local3);
};
_local4 = Math.floor((_local2 / 60));
_local5 = (_local2 - (60 * _local4));
if (_local5 < 10){
_local5 = ("0" + _local5);
};
_local6 = ((((_local4 + ":") + _local5) + ":") + _local3);
return (_local6);
}
}
}//package koko
Section 9
//parseXMLDoc (koko.parseXMLDoc)
package koko {
import flash.events.*;
import flash.net.*;
public class parseXMLDoc {
private var _xmlDoc:XML;
private var _urlLoader:URLLoader;
public function returnXML():XML{
return (_xmlDoc);
}
public function pXML(_arg1, _arg2){
var _local3:URLRequest;
_xmlDoc = null;
_local3 = new URLRequest(_arg1);
_local3.data = _arg2;
_local3.method = URLRequestMethod.POST;
_urlLoader = new URLLoader();
_urlLoader.addEventListener(Event.COMPLETE, completeListener);
_urlLoader.load(_local3);
}
public function completeListener(_arg1:Event){
_xmlDoc = new XML(_urlLoader.data);
return (_xmlDoc.toXMLString());
}
}
}//package koko
Section 10
//Pythag (koko.Pythag)
package koko {
public class Pythag {
private var _a:Number;
private var _h:Number;
private var _o:Number;
public function findOppositeLength(_arg1, _arg2):Number{
_o = (Math.sin(_arg1) * _arg2);
return (_o);
}
public function findNewXY(_arg1, _arg2, _arg3, _arg4):Array{
var _local5:*;
var _local6:*;
var _local7:Array;
var _local8:*;
var _local9:*;
_local5 = findAdjascentLength(_arg3, _arg4);
_local6 = findOppositeLength(_arg3, _arg4);
_local7 = new Array();
_local8 = (_arg1 + _local5);
_local9 = (_arg2 + _local6);
_local7[0] = _local8;
_local7[1] = _local9;
return (_local7);
}
public function findAdjascentLength(_arg1, _arg2):Number{
_a = (Math.cos(_arg1) * _arg2);
return (_a);
}
public function findHypotenuseLength(_arg1, _arg2:Number){
_h = Math.sqrt((Math.pow(_arg1, 2) + Math.pow(_arg2, 2)));
return (_h);
}
public function findAngle(_arg1, _arg2, _arg3, _arg4){
var _local5:Number;
var _local6:Number;
var _local7:Number;
_local5 = (_arg1 - _arg3);
_local6 = (_arg2 - _arg4);
_local7 = Math.atan2(_local6, _local5);
return (_local7);
}
}
}//package koko
Section 11
//SetStage (koko.SetStage)
package koko {
import flash.display.*;
public class SetStage extends Sprite {
public static var root_target:Sprite;
public function SetStage(_arg1:Sprite){
root_target = _arg1;
}
}
}//package koko
Section 12
//URLUtil (koko.URLUtil)
package koko {
import flash.external.*;
public class URLUtil {
protected static const WINDOW_OPEN_FUNCTION:String = "window.open";
public static function openWindow(_arg1:String, _arg2:String="_blank", _arg3:String=""):void{
ExternalInterface.call(WINDOW_OPEN_FUNCTION, _arg1, _arg2, _arg3);
}
}
}//package koko
Section 13
//blitMapCollisionReaction (micromachines.blitMapCollisionReaction)
package micromachines {
public class blitMapCollisionReaction {
private var _rv:Number;// = 0
private var _rx:Number;
private var _ry:Number;
private var _reaction:Object;
public var back:DrawBackground;
public var colorArrayStr:Array;
public function blitMapCollisionReaction(){
back = new DrawBackground();
_reaction = new Object();
_rv = 0;
colorArrayStr = new Array("ffffff", "fefefe", "fdfdfd", "fefefe", "fbfbfb", "fafafa", "f9f9f9", "f8f8f8");
super();
}
public function rotateCar(_arg1, _arg2, _arg3):Number{
if ((((((((((_arg1 == 13)) || ((_arg1 == 4)))) || ((_arg1 == 7)))) || ((_arg1 == 10)))) || ((_arg1 == 1)))){
_arg2 = (_arg2 - _arg3);
} else {
if ((((((((((_arg1 == 15)) || ((_arg1 == 6)))) || ((_arg1 == 9)))) || ((_arg1 == 12)))) || ((_arg1 == 3)))){
_arg2 = (_arg2 + _arg3);
};
};
return (_arg2);
}
public function hitWall(_arg1, _arg2, _arg3, _arg4, _arg5){
if (_arg1 == _arg3){
_rx = _arg1;
} else {
_rx = _arg3;
};
if (_arg2 == _arg4){
_ry = _arg2;
} else {
_ry = _arg4;
};
}
public function react(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9, _arg10, _arg11){
var _local12:*;
var _local13:*;
var _local14:Array;
var _local15:Number;
var _local16:Number;
var _local17:Boolean;
var _local18:*;
_local12 = false;
_local13 = false;
_local14 = new Array();
_rx = _arg2;
_ry = _arg3;
_rv = _arg8;
_reaction.groundFriction = 1;
_reaction.groundHandlingOffset = 40;
_reaction._handlingOffset = 0;
_reaction.rot = _arg9;
_reaction.blowup = false;
_local17 = false;
_reaction.bounce = false;
_reaction.jump = false;
_reaction.boost = false;
_reaction.handlingOffset = 0;
switch (_arg1){
case "87e075":
case "91e075":
case "2de075":
case "37e075":
case "41e075":
case "4be075":
case "55e075":
case "5fe075":
case "69e075":
case "73e075":
case "7de075":
case "7bcf3e":
_reaction.handlingOffset = -20;
break;
case "999966":
_reaction.handlingOffset = 40;
break;
case "ff6600":
_arg8 = 30;
_reaction.boost = true;
break;
case "f37021":
case "ff3300":
_reaction.jump = true;
break;
case "33ffcc":
case "3cffcc":
case "46ffcc":
case "50ffcc":
case "5affcc":
case "64ffcc":
case "6effcc":
case "78ffcc":
case "82ffcc":
case "8cffcc":
case "96ffcc":
_reaction.handlingOffset = 10;
break;
case "ebe811":
case "e5e53c":
case "ebe711":
_local15 = ((_arg2 - _arg4) * 3);
_local16 = ((_arg3 - _arg5) * 3);
if (_arg10 > 4){
_reaction.rot = rotateCar(_arg10, _reaction.rot, 5);
_arg2 = _arg6;
_arg3 = _arg7;
};
_arg8 = (_arg8 / 1.05);
if ((((_arg8 < 3)) && ((_arg8 > 0)))){
_arg8 = 3;
};
if (_arg8 > 4){
_arg8 = (0 - (_arg8 / 2));
};
_local12 = true;
break;
case "27b573":
_local17 = true;
break;
case "ec68a6":
_arg8 = 1;
break;
case "ed168c":
_reaction.groundFriction = 0.7;
_reaction.groundHandlingOffset = 6;
_reaction.bounce = true;
break;
case "990099":
case "9900cc":
_reaction.groundFriction = 0.6;
_reaction.groundHandlingOffset = 5;
_reaction.handlingOffset = 20;
_reaction.bounce = true;
break;
case "663300":
_reaction.groundFriction = 0.5;
_reaction.groundHandlingOffset = 8;
_reaction.handlingOffset = 20;
break;
case "336600":
case "27b573":
_reaction.groundHandlingOffset = 10;
break;
case "ec2024":
case "ed1f24":
case "ff0000":
_reaction.blowup = true;
case "93186e":
_reaction.groundFriction = 0.7;
_reaction.groundHandlingOffset = 5;
_reaction.handlingOffset = -20;
_reaction.bounce = true;
break;
case "ed69a7":
_reaction.groundFriction = 0.6;
_reaction.groundHandlingOffset = 4;
_reaction.handlingOffset = -10;
break;
case "c01d73":
_reaction.groundFriction = 0.7;
_reaction.groundMaxSpeed = 2;
_reaction._handlingOffset = 20;
break;
};
_local18 = 0;
while (_local18 < 8) {
if ((((_arg1 == colorArrayStr[_local18])) && (!((colorArrayStr[_local18] == _arg11))))){
_arg2 = _arg6;
_arg3 = _arg7;
if ((((((((((_arg10 == 13)) || ((_arg10 == 4)))) || ((_arg10 == 7)))) || ((_arg10 == 10)))) || ((_arg10 == 1)))){
_reaction.rot = (_reaction.rot - 5);
} else {
if ((((((((((_arg10 == 15)) || ((_arg10 == 6)))) || ((_arg10 == 9)))) || ((_arg10 == 12)))) || ((_arg10 == 3)))){
_reaction.rot = (_reaction.rot + 5);
};
};
if (_arg10 <= 10){
if (_arg8 < 3){
};
} else {
if (_arg10 >= 13){
_arg8 = (_arg8 / 1.8);
};
};
_local13 = true;
};
_local18++;
};
if (_arg1 == "0"){
};
_reaction.cv = _arg8;
_reaction.x = _arg2;
_reaction.y = _arg3;
_reaction.collision = _local12;
_reaction.carCollision = _local13;
_reaction.fall = _local17;
return (_reaction);
}
}
}//package micromachines
Section 14
//BlitMapUser (micromachines.BlitMapUser)
package micromachines {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import koko.*;
import flash.utils.*;
public class BlitMapUser extends BlitMap {
private var _currentRev:int;// = 1
private var _collisionDetection;
private var _convertDegrees;
private var _oldRev:int;// = 1
private var _numberOfCars:int;// = 1
public var carPath:Array;
private var _currentTime:int;
private var _endResults:Array;
private var drawTimer:Timer;
private var _pythag;
private var _trafficLights;
private var _maxLaps:int;// = 3
private var _levels;
private var _raceOver:Boolean;// = false
private var gameTimer:Timer;
private var _startRace;// = true
private var _startTime:int;
public var back:DrawBackground;
private var _positions:Array;
private var _playerPosition:MovieClip;
private var _gameSounds;
private var _raceTrack;// = 1
private var _menuShown:Boolean;// = false
public var levelWayPoints:Array;
private var _collisionReact:Array;
private var _covertTime;
private var _finalPositions:Array;
private var _levelHandlingOffset:int;
private var car:Array;
public var _menus;
public function BlitMapUser(){
back = new DrawBackground();
_collisionDetection = new blitMapCollisionReaction();
_convertDegrees = new ConvertDegrees();
_pythag = new Pythag();
_collisionReact = new Array();
_numberOfCars = 1;
_startRace = true;
_trafficLights = new trafficLights();
_playerPosition = new gameScreenPositions();
car = new Array();
_positions = new Array();
_finalPositions = new Array();
_endResults = new Array();
_menus = new Menus();
_levels = new Levels();
_covertTime = new ConvertTime();
_gameSounds = new GameSounds();
_currentRev = 1;
_oldRev = 1;
_raceTrack = 1;
_maxLaps = 3;
_raceOver = false;
_menuShown = false;
gameTimer = new Timer(30, 0);
drawTimer = new Timer(10, 0);
super();
}
public function moveBlitMapObject(_arg1:TimerEvent):void{
var _local2:*;
_local2 = 0;
while (_local2 < (_numberOfCars - 1)) {
positionBlit(car[_local2], false);
_local2++;
};
setLapCounter();
setTime();
}
public function checkStartRace():void{
var _local1:*;
if (_startRace){
if (_trafficLights.currentFrame >= 90){
_startRace = false;
_local1 = 0;
while (_local1 < (_numberOfCars - 1)) {
car[_local1].allowMove = true;
_local1++;
};
_startTime = getTimer();
};
};
}
public function resetBlitPosition(_arg1){
var _local2:*;
var _local3:Object;
var _local4:Object;
var _local5:*;
var _local6:*;
_local2 = (_arg1.currentWayPoint - 1);
if (_local2 == -1){
_arg1.lap--;
_local2 = (levelWayPoints.length - 1);
};
if (_arg1._user){
_gameSounds.playReplaceCar();
};
_local3 = levelWayPoints[_local2];
_arg1.Foint = _local2;
_local4 = levelWayPoints[_arg1.currentWayPoint];
_local5 = _pythag.findAngle(_local3.ax, _local3.ay, _local3.ax1, _local3.ay1);
_local6 = (_convertDegrees.convertToDegree(_local5) + 90);
_arg1._rotationActual = _local6;
_arg1.rotationTarget = (Math.round((_local6 / 5)) * 5);
_arg1._velocityCurrent = 0;
_arg1._wayPoint--;
_arg1._targetBlit.x = _local3.ax;
_arg1._targetBlit.y = _local3.ay;
_arg1.targetx = _local3.ax1;
_arg1.targety = _local3.ay1;
}
public function beginGame(_arg1){
var _local2:Array;
_local2 = new Array(0, 10, 10, 10, 25, 5);
_levelHandlingOffset = _local2[_arg1];
_raceTrack = _arg1;
gameTimer.start();
drawTimer.start();
back.drawMap(_raceTrack, car[0]._col);
_trafficLights.gotoAndPlay(2);
_gameSounds.playRev(1);
}
public function beginEndRaceSequence(){
var _local1:*;
var _local2:*;
var _local3:*;
_raceOver = true;
_gameSounds.stopRev();
_gameSounds.stopScreech();
_local1 = (_currentTime - _startTime);
_menus.endRace();
_local2 = _endResults.length;
_local3 = _local2;
while (_local3 < _finalPositions.length) {
_endResults.push(_finalPositions[_local3]);
_local3++;
};
_menus.endRacePositions(_endResults, _local2, _covertTime.convertTime(_local1), _local1);
}
public function controlAI(_arg1){
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
var _local8:Number;
var _local9:Number;
_local2 = _arg1._targetBlit;
_local3 = carPath[_arg1._wayPoint];
_local4 = _pythag.findAngle(_local2.x, _local2.y, _arg1.targetx, _arg1.targety);
_local5 = Math.abs(_pythag.findHypotenuseLength((_arg1.targetx - _local2.x), (_arg1.targety - _local2.y)));
_local6 = (_convertDegrees.convertToDegree(_local4) + 90);
_arg1.rotationTarget = (Math.round((_local6 / 5)) * 5);
_local7 = _arg1._rotationActual;
while (_local7 > 270) {
_local7 = (_local7 - 360);
};
while (_local7 < -90) {
_local7 = (_local7 + 360);
};
controlSpeedDirection(_arg1, 2);
if (_arg1._allowRot == 0){
if (_local7 > _arg1.rotationTarget){
_local8 = (_local7 - _arg1.rotationTarget);
_local9 = (Math.abs((-90 - _arg1.rotationTarget)) + (270 - _local7));
if ((((_local8 < _local9)) && ((_local8 > 10)))){
controlSpeedDirection(_arg1, 0);
} else {
if ((((_local9 < _local8)) && ((_local9 > 10)))){
controlSpeedDirection(_arg1, 1);
};
};
} else {
if (_local7 < _arg1.rotationTarget){
_local8 = (_arg1.rotationTarget - _local7);
_local9 = (Math.abs((-90 - _local7)) + (270 - _arg1.rotationTarget));
if ((((_local8 < _local9)) && ((_local8 > 10)))){
controlSpeedDirection(_arg1, 1);
} else {
if ((((_local9 < _local8)) && ((_local9 > 10)))){
controlSpeedDirection(_arg1, 0);
};
};
};
};
} else {
_arg1._allowRot--;
};
if (_local5 < 40){
_arg1._wayPoint++;
_arg1.targetx = ((_local3.ax + (Math.random() * 6)) - 3);
_arg1.targety = ((_local3.ay + (Math.random() * 6)) - 3);
if (_arg1._wayPoint == carPath.length){
_arg1._wayPoint = 0;
};
};
controlSpeedDirection(_arg1, 3);
}
public function endRace(){
if (_menus.checkTransition()){
back._playerPosition.gotoAndStop(2);
};
}
public function setTime(){
var _local1:*;
if (((!(_raceOver)) && (!(_startRace)))){
_currentTime = getTimer();
_local1 = _covertTime.convertTime((_currentTime - _startTime));
back.setTimeText(_local1);
} else {
if (_startRace){
back.setTimeText("0:00:00");
};
};
}
public function setupTimers(){
gameTimer.addEventListener(TimerEvent.TIMER, moveBlitMapObject);
drawTimer.addEventListener(TimerEvent.TIMER, drawBlitMapObject);
}
public function setupWayPoints(_arg1){
levelWayPoints = _levels[(("buildLevel" + _arg1) + "WayPoints")]();
carPath = _levels[("buildLevel" + _arg1)]();
}
public function checkWayPoints(_arg1){
var _local2:Object;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
var _local8:*;
var _local9:Number;
var _local10:*;
_local2 = levelWayPoints[_arg1.currentWayPoint];
_local3 = getPixelValue(_arg1._targetBlit.x, _arg1._targetBlit.y, false, 0);
_local3 = _local3.toString(16);
_local4 = _local2.col;
_local5 = _arg1.currentWayPoint;
_local6 = (_local5 + 1);
_local7 = (_local5 - 1);
_local8 = (_local5 - 2);
if (_local6 == levelWayPoints.length){
_local6 = 0;
};
if (_local5 == 0){
_local7 = (levelWayPoints.length - 1);
_local8 = (levelWayPoints.length - 2);
};
if (_local7 == 0){
_local8 = (levelWayPoints.length - 1);
};
_local9 = NaN;
_local10 = 0;
while (_local10 < levelWayPoints.length) {
if (_local3 == levelWayPoints[_local10].col){
_local9 = _local10;
};
_local10++;
};
if (_local10 == levelWayPoints.length){
_local10 = (levelWayPoints.length - 1);
};
if ((((((((((_local9 == _local5)) || ((_local9 == _local6)))) || ((_local9 == _local7)))) || ((_local9 == _local8)))) || (isNaN(_local9)))){
if (_arg1._user){
back.setLap(_arg1.currentLap);
};
if (_local9 == _local6){
_arg1.currentWayPoint = _local6;
if (_local6 == 0){
_arg1.currentLap++;
if ((((_arg1.currentLap > _maxLaps)) && (!(_arg1.finishedRace)))){
_arg1.currentLap = 9;
_endResults.push({num:_arg1._carNum, col:_arg1._col});
_arg1._handlingActual = _arg1._handlingMax;
_arg1._velocityMax = 10;
if (_arg1._user){
beginEndRaceSequence();
};
_arg1.currentWayPoint = 1;
_arg1._user = false;
_arg1.finishedRace = true;
};
};
};
} else {
_arg1.allowMove = false;
back.explodeCar(_arg1._carNum);
if (_arg1._user){
_gameSounds.playExplode();
};
};
}
public function checkRevCounter(_arg1){
if (_arg1._user){
_currentRev = Math.ceil(((10 / _arg1._velocityMax) * _arg1._velocityCurrent));
if (_currentRev > 10){
_currentRev = 10;
};
if (_currentRev < 0){
_currentRev = 1;
};
if (_currentRev != _oldRev){
_gameSounds.stopRev();
_gameSounds.playRev(_currentRev);
_oldRev = _currentRev;
};
};
}
public function addBlitMapUser(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:int, _arg6:int, _arg7:int, _arg8:int, _arg9:int, _arg10:int, _arg11:Number, _arg12:Number, _arg13:Number, _arg14:Number, _arg15:Boolean, _arg16:String, _arg17:String, _arg18:int, _arg19:int, _arg20:int){
var _local21:*;
car[(_numberOfCars - 1)] = null;
car[(_numberOfCars - 1)] = new Object();
_local21 = car[(_numberOfCars - 1)];
_local21._aspect = _arg11;
_local21._velocityMinimum = _arg1;
_local21._velocityTemp = (_arg1 + _arg2);
_local21._velocityMax = (_arg1 + ((_arg2 / _arg5) * _arg8));
_local21._velocityCurrent = 0;
_local21._velocityAspect = (_local21._velocityCurrent * _arg11);
_local21._accel = ((_arg3 / _arg6) * _arg9);
_local21._handlingMax = _arg4;
_local21._handlingActual = ((_arg4 / _arg7) * _arg10);
_local21._handlingSpeedOffset = 0;
_local21._bWidth = _arg13;
_local21._bHeight = _arg14;
_local21._bHandling = 0;
_local21._handlingOffset = 0;
_local21._bRotation = 0;
_local21._rotationActual = 180;
_local21._rotationHandling = 0;
_local21._rotationTarget = 0;
_local21._friction = _arg12;
_local21._user = _arg15;
_local21._collisionReact = new Array();
_local21._groundFriction = 1;
_local21._groundOffset = 400;
_local21._wayPoint = 0;
_local21._allowRot = 0;
_local21.circuitDirection = _arg17;
_local21.allowMove = false;
_local21.fall = false;
_local21._targetBlit = this.getChildByName(_arg16);
_local21._targetBlit.x = carPath[0].ax;
if ((_arg19 / 2) < Math.ceil((_arg19 / 2))){
_local21._targetBlit.x = (carPath[0].ax - 15);
};
_local21._targetBlit.y = (carPath[0].ay - (_arg19 * -15));
_local21.targetx = ((carPath[0].ax + (Math.random() * 30)) - 15);
_local21.targety = ((carPath[0].ay + (Math.random() * 30)) - 15);
_local21._carNum = _arg18;
_local21._col = _arg20;
_local21.blitColor = colorArrayStr[(_arg18 - 1)];
_local21.currentLap = 1;
_local21.wayPointDistance = 0;
_local21.currentWayPoint = 0;
_local21.finishedRace = false;
_numberOfCars++;
}
public function checkCarFrame(_arg1){
var _local2:*;
_local2 = back.returnFrame(_arg1._carNum);
if ((((_local2 == 2)) || ((_local2 == 65)))){
resetBlitPosition(_arg1);
_arg1.allowMove = true;
_arg1.fall = false;
};
}
public function drawBlitMapObject(_arg1:TimerEvent):void{
var _local2:*;
var _local3:*;
var _local4:*;
_local2 = Math.ceil(car[0]._targetBlit.x);
_local3 = Math.ceil(car[0]._targetBlit.y);
back.drawGameBitmap((_local2 / car[0]._aspect), (_local3 / car[0]._aspect));
_local4 = 0;
while (_local4 < (_numberOfCars - 1)) {
positionBlit(car[_local4], true);
_local4++;
};
back.drawUpperLevel((_local2 / car[0]._aspect), (_local3 / car[0]._aspect));
_arg1.updateAfterEvent();
drawBlitMap();
}
public function endLevel(){
gameTimer.stop();
drawTimer.stop();
back.resetMap();
}
public function removeBlitMapUser(){
var _local1:*;
_numberOfCars = 1;
_startRace = true;
_raceOver = false;
_menuShown = false;
_positions = new Array();
_finalPositions = new Array();
_endResults = new Array();
_local1 = 0;
while (_local1 < 8) {
car[_local1] = null;
_local1++;
};
}
public function repositionBlit(_arg1){
_arg1._velocityCurrent = _arg1._collisionReact.cv;
_arg1._groundFriction = _arg1._collisionReact.groundFriction;
_arg1._groundOffset = _arg1._collisionReact.groundHandlingOffset;
_arg1._targetBlit.x = _arg1._collisionReact.x;
_arg1._targetBlit.y = _arg1._collisionReact.y;
}
public function controlHandling(_arg1){
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
var _local8:*;
_local2 = _arg1._rotationActual;
_local3 = _arg1._rotationHandling;
_local4 = _arg1._aspect;
_local5 = _arg1._targetBlit.x;
_local6 = _arg1._targetBlit.y;
_local7 = (_local2 - _local3);
if (_local7 > 80){
_local3 = (_local2 - 80);
} else {
if (_local7 < -80){
_local3 = (_local2 + 80);
};
};
if ((((_local7 > 25)) || ((_local7 < -25)))){
if (!_arg1._user){
_arg1._velocityCurrent = (_arg1._velocityCurrent * 0.9);
};
};
if ((((_local7 > 30)) || ((_local7 < -30)))){
_local8 = (_local2 + 180);
back.drawSkidMarks((_local5 / _local4), (_local6 / _local4), _local8);
if (((_arg1._user) && ((_arg1._velocityCurrent > 2)))){
_gameSounds.startScreech();
};
} else {
if (_arg1._user){
_gameSounds.stopScreech();
};
};
if (_local3 < _local2){
_local3 = (_local3 + (_local7 * ((_arg1._handlingActual / _arg1._handlingMax) / _arg1._handlingSpeedOffset)));
if (_local3 > _local2){
_local3 = _local2;
};
} else {
if (_local3 > _local2){
_local3 = (_local3 + (_local7 * ((_arg1._handlingActual / _arg1._handlingMax) / _arg1._handlingSpeedOffset)));
if (_local3 < _local2){
_local3 = _local2;
};
};
};
_arg1._rotationActual = _local2;
_arg1._rotationHandling = _local3;
}
public function controlSpeedDirection(_arg1, _arg2){
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
var _local8:*;
var _local9:*;
var _local10:Number;
_local3 = _arg1._velocityCurrent;
_local4 = _arg1._velocityMax;
_local5 = _arg1._velocityTemp;
_local6 = _arg1._groundOffset;
_local7 = _arg1._friction;
_local8 = _arg1._groundFriction;
_local9 = _arg1._accel;
switch (_arg2){
case 0:
_arg1._bRotation = (0 - _arg1._handlingMax);
break;
case 1:
_arg1._bRotation = _arg1._handlingMax;
break;
case 2:
_arg1._bRotation = 0;
break;
case 3:
_local10 = _local6;
if (_local3 < 0){
_local3 = ((_local3 * _local7) + _local9);
};
if ((((_local3 < _local4)) && ((_local3 < _local10)))){
_local3 = (_local3 + _local9);
} else {
_local3 = (_local3 * _local8);
};
break;
case 4:
if (_local3 > 0){
_local3 = ((_local3 * _local7) - _local9);
};
if (_local3 > (0 - _local4)){
_local3 = (_local3 - _local9);
_local3 = (_local3 * _local8);
};
break;
case 5:
if (_local3 > 0){
_local3 = (_local3 * _local7);
_local3 = (_local3 * _local8);
if (_local3 < 0){
_local3 = 0;
};
} else {
if (_local3 < 0){
_local3 = (_local3 * _local7);
_local3 = (_local3 * _local8);
if (_local3 > 0){
_local3 = 0;
};
};
};
break;
};
_arg1._velocityAspect = (_local3 * _arg1._aspect);
_arg1._handlingSpeedOffset = Math.abs(((_local3 / _local5) * (_levelHandlingOffset + _arg1._handlingOffset)));
_arg1._velocityCurrent = _local3;
}
public function setBlitControlValues(_arg1){
if (ArrowKeys.leftArrow){
controlSpeedDirection(_arg1, 0);
} else {
if (ArrowKeys.rightArrow){
controlSpeedDirection(_arg1, 1);
} else {
if (((!(ArrowKeys.leftArrow)) && (!(ArrowKeys.rightArrow)))){
controlSpeedDirection(_arg1, 2);
};
};
};
if (ArrowKeys.upArrow){
controlSpeedDirection(_arg1, 3);
} else {
if (ArrowKeys.downArrow){
controlSpeedDirection(_arg1, 4);
} else {
if (((!(ArrowKeys.upArrow)) && (!(ArrowKeys.downArrow)))){
controlSpeedDirection(_arg1, 5);
};
};
};
}
public function positionBlit(_arg1, _arg2){
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
var _local8:Boolean;
var _local9:*;
var _local10:*;
var _local11:int;
var _local12:Array;
var _local13:Array;
var _local14:Array;
var _local15:*;
var _local16:*;
var _local17:*;
var _local18:*;
var _local19:*;
var _local20:*;
var _local21:*;
var _local22:*;
_local3 = _arg1._targetBlit;
_local4 = (_arg1._rotationActual + 180);
checkStartRace();
if (((!(_arg1.allowMove)) && (!(_startRace)))){
checkCarFrame(_arg1);
};
if (!_arg2){
lapCounter(_arg1);
};
if (((!(_arg2)) && (_arg1.allowMove))){
if (_arg1._user){
setBlitControlValues(_arg1);
} else {
controlAI(_arg1);
};
controlHandling(_arg1);
_local5 = _local3.x;
_local6 = _local3.y;
_arg1._rotationActual = (_arg1._rotationActual + _arg1._bRotation);
_local3.rotation = _arg1._rotationActual;
_local7 = _convertDegrees.convertToRadian((_arg1._rotationHandling + 90));
_local4 = (_arg1._rotationActual + 180);
_local8 = false;
_local9 = 1;
while (_local9 <= 3) {
_local10 = _pythag.findNewXY(_local3.x, _local3.y, _local7, (_arg1._velocityAspect / 3));
_local11 = 0;
_local12 = new Array(-7.5, 0, 7.5, -7.5, 0, 7.5, -7.5, 0, 7.5, -7.5, 0, 7.5, -7.5, 0, 7.5);
_local13 = new Array(-10, (-10 - 10), -5, (-5 - 5), 0, 0, 0, 5, 5, 5, 10, 10, 10);
_local14 = new Array(5, 7, 3, 5, 7, 3, 8, 4, 6, 8, 4, 6, 11, 4, 9);
if (!_local8){
_local3.x = _local10[0];
_local3.y = _local10[1];
_local15 = 1;
while (_local15 <= 15) {
_local16 = (_local12[(_local15 - 1)] * _arg1._aspect);
_local17 = (_local13[(_local15 - 1)] * _arg1._aspect);
_local18 = _local3.localToGlobal(new Point(_local16, _local17));
_local19 = ((_local12[_local14[(_local15 - 1)]] / 3) * _arg1._aspect);
_local20 = ((_local13[_local14[(_local15 - 1)]] / 3) * _arg1._aspect);
_local21 = _local3.localToGlobal(new Point(_local19, _local20));
if (_arg1._user){
};
_local22 = getPixelValue(_local18.x, _local18.y, true, _local5);
_local22 = _local22.toString(16);
if (!_local8){
_arg1._collisionReact = _collisionDetection.react(_local22, _local3.x, _local3.y, _local5, _local6, _local21.x, _local21.y, _arg1._velocityCurrent, _arg1._rotationActual, _local15, _arg1.blitColor);
};
_arg1._handlingOffset = _arg1._collisionReact.handlingOffset;
if (!_local8){
if (((_arg1._collisionReact.carCollision) || (_arg1._collisionReact.collision))){
repositionBlit(_arg1);
_local8 = true;
_arg1._rotationActual = _arg1._collisionReact.rot;
if (!_arg1._collisionReact.carCollision){
_arg1._allowRot = 10;
};
};
};
if (_arg1._collisionReact.blowup){
_arg1.allowMove = false;
back.explodeCar(_arg1._carNum);
if (_arg1._user){
_gameSounds.playExplode();
};
};
if (_arg1._collisionReact.fall){
_local11++;
};
_local15++;
};
if (_local11 >= 6){
if (_arg1._user){
_gameSounds.playCarFall();
};
_local8 = true;
_arg1._velocityCurrent = 0;
_arg1.fall = true;
back.fallCar(_arg1._carNum);
_arg1.allowMove = false;
};
if (_arg1._collisionReact.bounce){
back.bounceCar(_arg1._carNum);
};
if (_arg1._collisionReact.jump){
back.jump(_arg1._carNum);
};
if (_arg1._collisionReact.boost){
back.boost(_arg1._carNum);
};
};
_local9++;
};
if (!_local8){
repositionBlit(_arg1);
} else {
if (((_arg1._user) && ((_arg1._velocityCurrent < 2)))){
_gameSounds.playBump();
};
};
checkWayPoints(_arg1);
checkRevCounter(_arg1);
};
if (_arg2){
if (_arg1._user){
back.drawPlayersCar(x, y, _local4);
} else {
back.drawComputerCar((_local3.x / _arg1._aspect), (_local3.y / _arg1._aspect), _local4, (car[0]._targetBlit.x / car[0]._aspect), (car[0]._targetBlit.y / car[0]._aspect), _arg1._carNum);
};
};
}
public function lapCounter(_arg1):void{
var _local2:Object;
var _local3:*;
var _local4:*;
var _local5:String;
_local2 = levelWayPoints[_arg1.currentWayPoint];
_local3 = Math.abs((_local2.ax1 - _arg1._targetBlit.x));
_local4 = Math.abs((_local2.ay1 - _arg1._targetBlit.y));
_arg1.wayPointDistance = _pythag.findHypotenuseLength(_local3, _local4);
if (_arg1.currentWayPoint < 10){
_local5 = ("0" + _arg1.currentWayPoint.toString());
} else {
_local5 = _arg1.currentWayPoint.toString();
};
_positions.push({user:_arg1._user, dist:_arg1.wayPointDistance, lap:_arg1.currentLap, wayPoint:_local5, num:_arg1._carNum, col:_arg1._col});
}
public function setLapCounter():void{
var _local1:*;
_finalPositions = new Array();
_positions.sortOn(["lap", "wayPoint", "dist"], [Array.DESCENDING, Array.DESCENDING, Array.NUMERIC]);
_local1 = 0;
while (_local1 < _positions.length) {
_finalPositions.push(_positions[_local1]);
if (((_positions[_local1].user) && (!(_raceOver)))){
back.setPos((_local1 + 1));
};
if ((((_endResults.length == 7)) && (!(_raceOver)))){
back.setPos(8);
};
_local1++;
};
_positions = new Array();
}
}
}//package micromachines
Section 15
//DrawBackground (micromachines.DrawBackground)
package micromachines {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import com.memecounter.*;
import koko.*;
import fl.motion.*;
public class DrawBackground extends MovieClip {
private var _carMatrixTransformer;
private var _firstRun;// = false
private var _carMatrix:Matrix;
public var _playerPosition:MovieClip;
private var _trafficLights;
private var _groundBackground:BitmapData;
private var _ge;
private var _skidMarksBitmapData:BitmapData;
private var _carData2:MovieClip;
private var _carData4:MovieClip;
private var _carData6:MovieClip;
private var _carData1:MovieClip;
private var _carData3:MovieClip;
private var _carData5:MovieClip;
private var target_root;
private var _carData8:MovieClip;
private var _gameBackgroundBitmapData:BitmapData;
private var _carData7:MovieClip;
private var _gameBackgroundBitmap:Bitmap;
public static var _mapUpperBitmapData:BitmapData = new BitmapData(2880, 2880);
public static var _mapBitmapData:BitmapData;
public function DrawBackground(){
target_root = SetStage.root_target;
_ge = new GameEngine();
_trafficLights = new trafficLights();
_playerPosition = new gameScreenPositions();
_groundBackground = new BitmapData(520, 390);
_gameBackgroundBitmapData = new BitmapData(520, 390, false, 0xFFFFFF);
_gameBackgroundBitmap = new Bitmap(_gameBackgroundBitmapData);
_skidMarksBitmapData = new Skid(0, 0);
_firstRun = false;
_carMatrix = new Matrix();
_carMatrixTransformer = new Matrix();
super();
}
public function setTimeText(_arg1):void{
_playerPosition.currentTime.text = _arg1;
_playerPosition.currentTime1.text = _arg1;
}
public function drawGameBitmap(_arg1, _arg2){
var _local3:Rectangle;
var _local4:Rectangle;
var _local5:Point;
_local3 = new Rectangle((_arg1 - 270), (_arg2 - 210), 520, 390);
_local4 = new Rectangle(0, 0, 520, 390);
_local5 = new Point(0, 0);
_gameBackgroundBitmapData.copyPixels(_groundBackground, _local4, _local5);
_gameBackgroundBitmapData.copyPixels(_mapBitmapData, _local3, _local5);
}
public function bounceCar(_arg1):void{
var _local2:*;
_local2 = this[("_carData" + _arg1)];
if (_local2.currentFrame == 2){
_local2.gotoAndPlay("bounce");
};
}
public function drawPlayersCar(_arg1, _arg2, _arg3){
var _local4:*;
_carMatrix = new Matrix();
_carMatrix.translate(260, 195);
_local4 = MatrixTransformer.rotateAroundInternalPoint(_carMatrix, 10, 15, _arg3);
_gameBackgroundBitmapData.draw(_carData1, _carMatrix, null, null, null, true);
}
public function jump(_arg1):void{
var _local2:*;
_local2 = this[("_carData" + _arg1)];
_local2.gotoAndPlay("jump");
}
public function explodeCar(_arg1):void{
var _local2:*;
_local2 = this[("_carData" + _arg1)];
_local2.gotoAndPlay("explode");
}
public function returnFrame(_arg1):int{
var _local2:*;
_local2 = this[("_carData" + _arg1)];
return (_local2.currentFrame);
}
public function drawUpperLevel(_arg1, _arg2){
var _local3:Rectangle;
var _local4:Rectangle;
var _local5:Point;
_local3 = new Rectangle((_arg1 - 270), (_arg2 - 210), 520, 390);
_local4 = new Rectangle(0, 0, 520, 390);
_local5 = new Point(0, 0);
_gameBackgroundBitmapData.copyPixels(_mapUpperBitmapData, _local3, _local5);
}
public function fallCar(_arg1):void{
var _local2:*;
_local2 = this[("_carData" + _arg1)];
_local2.gotoAndPlay("fall");
}
public function drawMap(_arg1, _arg2){
var _local3:*;
_mapBitmapData = null;
_mapUpperBitmapData = null;
switch (_arg1){
case 1:
_mapBitmapData = new Map(0, 0);
_mapUpperBitmapData = new MapUpper(0, 0);
break;
case 2:
_mapBitmapData = new Map1(0, 0);
_mapUpperBitmapData = new MapUpper1(0, 0);
break;
case 3:
_mapBitmapData = new Map2(0, 0);
_mapUpperBitmapData = new MapUpper2(0, 0);
break;
case 4:
_mapBitmapData = new Map3(0, 0);
_mapUpperBitmapData = new MapUpper3(0, 0);
break;
case 5:
_mapBitmapData = new Map4(0, 0);
_mapUpperBitmapData = new MapUpper4(0, 0);
break;
};
_local3 = 1;
while (_local3 <= 8) {
this[("_carData" + _local3)] = null;
this[("_carData" + _local3)] = new Car1();
this[("_carData" + _local3)].stop();
this[("_carData" + _local3)].car_mc.gotoAndStop(((_arg2 + _local3) - 1));
_local3++;
};
if (!_firstRun){
target_root.addChildAt(_gameBackgroundBitmap, 2);
target_root.addChildAt(_trafficLights, 3);
target_root.addChildAt(_playerPosition, 4);
_playerPosition.restart_race_btn.addEventListener(MouseEvent.MOUSE_UP, restartRace);
_playerPosition.mainMenu_btn.addEventListener(MouseEvent.MOUSE_UP, inGameMainMenu);
_firstRun = true;
};
_trafficLights.gotoAndPlay(2);
}
public function restartRace(_arg1:MouseEvent){
Tracker.kvEvent(913);
_ge.stopRace();
_ge.startNextRace();
}
public function setPos(_arg1):void{
_playerPosition.pos_mc.gotoAndStop(_arg1);
}
public function resetMap(){
}
public function inGameMainMenu(_arg1:MouseEvent){
_ge.modifyQuitToMenu();
}
public function drawCarData(){
}
public function drawSkidMarks(_arg1, _arg2, _arg3){
var _local4:*;
_carMatrix = new Matrix();
_carMatrix.translate(_arg1, _arg2);
_local4 = MatrixTransformer.rotateAroundInternalPoint(_carMatrix, 10, 15, _arg3);
_mapBitmapData.draw(_skidMarksBitmapData, _carMatrix, null, null, null, true);
}
public function boost(_arg1):void{
var _local2:*;
_local2 = this[("_carData" + _arg1)];
if (_local2.currentFrame <= 3){
_local2.gotoAndPlay("boost");
};
}
public function drawComputerCar(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6){
var _local7:*;
var _local8:*;
_local7 = this[("_carData" + _arg6)];
_carMatrix = new Matrix();
_carMatrix.translate(((_arg1 - _arg4) + 260), ((_arg2 - _arg5) + 195));
_local8 = MatrixTransformer.rotateAroundInternalPoint(_carMatrix, 10, 15, _arg3);
_gameBackgroundBitmapData.draw(_local7, _carMatrix, null, null, null, true);
}
public function setLap(_arg1):void{
_playerPosition.lap_mc.gotoAndStop(_arg1);
}
}
}//package micromachines
Section 16
//GameEngine (micromachines.GameEngine)
package micromachines {
import flash.display.*;
import flash.events.*;
import com.memecounter.*;
import koko.*;
import flash.net.*;
import com.adobe.crypto.*;
public class GameEngine extends MovieClip {
private const ASPECT = 0.5;
private const CARWIDTH = 15;
private const CARHEIGHT = 20;
private var _loadXML;
public var blitMap:BlitMap;
private var _gameSounds;
public var _highscoresArray:Array;
public var arrowKeys:ArrowKeys;
private var circuitDirection;// = "cw"
private var _MD5;
private var _bestTrackTimes;
public var player:PlayersCar;
public var back:DrawBackground;
public static var _cookie:SharedObject = SharedObject.getLocal("pgpcookiedata");
public static var _comPoints1:int = 6;
public static var _comPoints2:int = 6;
public static var _comPoints3:int = 6;
public static var blitMapUser;
public static var _tournamentTrack:Array = new Array();
public static var _userPoints1:int = 5;
public static var _userPoints2:int = 5;
public static var _userPoints3:int = 5;
public static var _userCarColour:int = 1;
public static var _userPointsAllowed:int = 15;
private static var target_root;
public static var _track = 4;
public static var _singleRace:Boolean = false;
public static var _difficulty = "easy";
public static var pos1 = 1;
public static var pos2 = 2;
public static var pos3 = 3;
public static var pos4 = 4;
public static var pos5 = 5;
public static var pos6 = 6;
public static var pos7 = 7;
public static var pos8 = 8;
public static var _tournamentTime:Array = new Array();
public static var _token;
public static var _menus;
public function GameEngine(){
_gameSounds = new GameSounds();
circuitDirection = "cw";
_MD5 = new MD5();
_bestTrackTimes = new Array();
super();
}
public function sendInvites(_arg1, _arg2){
var _local3:URLVariables;
_local3 = new URLVariables();
_local3.action = "league_invite";
_local3.token = _token;
_local3.league_name = _cookie.data.leaguename;
_local3.league_id = _cookie.data.league;
_local3.league_invites = _arg1;
_local3.league_invite_sender = _cookie.data.email;
_local3.rand = Math.ceil((Math.random() * 1000000));
sendData("http://partmastergp.viral-game.co.uk/data.php", _local3, invitesHandeler);
}
public function leagueTimeSubmitted(_arg1:Event){
loadLeagueScores();
}
public function setTrack(_arg1):void{
_track = _arg1;
setupSingleRace();
}
public function stopRace():void{
_gameSounds.stopRev();
blitMapUser.removeBlitMapUser();
blitMapUser.endLevel();
}
public function modifyQuitToMenu(){
_menus.modifyQuitToMenu1();
}
public function writeUnlockablesToCookie(_arg1){
_cookie.data.unlock1 = _arg1.unlock1;
_cookie.data.unlock2 = _arg1.unlock2;
_cookie.data.unlock3 = _arg1.unlock3;
}
public function setupGame():void{
var _local1 = blitMapUser;
_local1[("setupBlitMap" + _track)]();
blitMapUser.setupWayPoints(_track);
if (_difficulty == "hard"){
blitMapUser.addBlitMapUser(10, 13, 0.4, 5, 10, 10, 5, _userPoints1, _userPoints2, _userPoints3, ASPECT, 0.96, CARWIDTH, CARHEIGHT, true, "blit1", circuitDirection, 1, pos1, _userCarColour);
blitMapUser.addBlitMapUser(10, 13, 0.4, 10, 10, 10, 10, (_comPoints1 + 3), (_comPoints2 + 4), (_comPoints3 + 4), ASPECT, 0.96, CARWIDTH, CARHEIGHT, false, "blit2", circuitDirection, 2, pos2, (_userCarColour + 1));
blitMapUser.addBlitMapUser(10, 13, 0.4, 10, 10, 10, 10, (_comPoints1 + 2), (_comPoints2 + 3), (_comPoints3 + 3), ASPECT, 0.96, CARWIDTH, CARHEIGHT, false, "blit3", circuitDirection, 3, pos3, (_userCarColour + 2));
blitMapUser.addBlitMapUser(10, 13, 0.4, 10, 10, 10, 10, _comPoints1, _comPoints2, (_comPoints3 + 2), ASPECT, 0.96, CARWIDTH, CARHEIGHT, false, "blit4", circuitDirection, 4, pos4, (_userCarColour + 3));
blitMapUser.addBlitMapUser(10, 13, 0.4, 10, 10, 10, 10, _comPoints1, _comPoints2, (_comPoints3 + 1), ASPECT, 0.96, CARWIDTH, CARHEIGHT, false, "blit5", circuitDirection, 5, pos5, (_userCarColour + 4));
blitMapUser.addBlitMapUser(10, 13, 0.4, 10, 10, 10, 10, (_comPoints1 - 1), (_comPoints2 - 1), (_comPoints3 + 2), ASPECT, 0.96, CARWIDTH, CARHEIGHT, false, "blit6", circuitDirection, 6, pos6, (_userCarColour + 5));
blitMapUser.addBlitMapUser(10, 13, 0.4, 10, 10, 10, 10, (_comPoints1 - 2), (_comPoints2 - 2), (_comPoints3 + 1), ASPECT, 0.96, CARWIDTH, CARHEIGHT, false, "blit7", circuitDirection, 7, pos7, (_userCarColour + 6));
blitMapUser.addBlitMapUser(10, 13, 0.4, 10, 10, 10, 10, (_comPoints1 - 3), (_comPoints2 - 3), (_comPoints3 + 1), ASPECT, 0.96, CARWIDTH, CARHEIGHT, false, "blit8", circuitDirection, 8, pos8, (_userCarColour + 7));
} else {
blitMapUser.addBlitMapUser(10, 11, 0.4, 5, 10, 10, 5, _userPoints1, _userPoints2, _userPoints3, ASPECT, 0.96, CARWIDTH, CARHEIGHT, true, "blit1", circuitDirection, 1, pos1, _userCarColour);
blitMapUser.addBlitMapUser(10, 11, 0.4, 10, 10, 10, 10, (_comPoints1 + 1), (_comPoints2 + 1), (_comPoints3 + 1), ASPECT, 0.96, CARWIDTH, CARHEIGHT, false, "blit2", circuitDirection, 2, pos2, (_userCarColour + 1));
blitMapUser.addBlitMapUser(10, 11, 0.4, 10, 10, 10, 10, _comPoints1, (_comPoints2 + 1), (_comPoints3 + 1), ASPECT, 0.96, CARWIDTH, CARHEIGHT, false, "blit3", circuitDirection, 3, pos3, (_userCarColour + 2));
blitMapUser.addBlitMapUser(10, 11, 0.4, 10, 10, 10, 10, (_comPoints1 + 1), _comPoints2, (_comPoints3 + 1), ASPECT, 0.96, CARWIDTH, CARHEIGHT, false, "blit4", circuitDirection, 4, pos4, (_userCarColour + 3));
blitMapUser.addBlitMapUser(10, 11, 0.4, 10, 10, 10, 10, (_comPoints1 - 1), (_comPoints2 - 1), (_comPoints3 - 1), ASPECT, 0.96, CARWIDTH, CARHEIGHT, false, "blit5", circuitDirection, 5, pos5, (_userCarColour + 4));
blitMapUser.addBlitMapUser(10, 11, 0.4, 10, 10, 10, 10, (_comPoints1 - 2), (_comPoints2 - 2), (_comPoints3 - 2), ASPECT, 0.96, CARWIDTH, CARHEIGHT, false, "blit6", circuitDirection, 6, pos6, (_userCarColour + 5));
blitMapUser.addBlitMapUser(10, 11, 0.4, 10, 10, 10, 10, (_comPoints1 - 4), (_comPoints2 - 4), (_comPoints3 - 4), ASPECT, 0.96, CARWIDTH, CARHEIGHT, false, "blit7", circuitDirection, 7, pos7, (_userCarColour + 6));
blitMapUser.addBlitMapUser(10, 11, 0.4, 10, 10, 10, 10, (_comPoints1 - 5), (_comPoints2 - 5), (_comPoints3 - 5), ASPECT, 0.96, CARWIDTH, CARHEIGHT, false, "blit8", circuitDirection, 8, pos8, (_userCarColour + 7));
};
blitMapUser.beginGame(_track);
}
public function invitesHandeler(_arg1:Event){
var _local2:URLLoader;
var _local3:URLVariables;
_local2 = URLLoader(_arg1.target);
_local3 = new URLVariables(_local2.data);
if (_local3.league_invite){
_menus.inviteMoreFriends();
};
}
public function addNewLeagueData(_arg1:Event){
var _local2:URLLoader;
var _local3:URLVariables;
var _local4:URLVariables;
_local2 = URLLoader(_arg1.target);
_local3 = new URLVariables(_local2.data);
if (_local3.league_id > 990){
_cookie.data.league = _local3.league_id;
_local4 = new URLVariables();
_local4.action = "league_invite";
_local4.token = _token;
_local4.league_name = _cookie.data.leaguename;
_local4.league_id = _cookie.data.league;
_local4.rand = Math.ceil((Math.random() * 1000000));
_local4.league_invites = _cookie.data.email;
_local4.league_invite_sender = _cookie.data.email;
sendData("http://partmastergp.viral-game.co.uk/data.php", _local4, leagueCreated);
} else {
clearLeagueCookie();
_menus.createServerBusy();
};
}
public function sendLeagueID(_arg1, _arg2){
var _local3:URLVariables;
var _local4:String;
_local3 = new URLVariables();
_local3.action = "league_join";
_local3.token = _token;
_local3.league_id = _arg1.v3;
_local3.player_email = _arg1.v4;
_local3.player_name = _arg1.v5;
_cookie = SharedObject.getLocal("pgpcookiedata");
_cookie.data.email = _arg1.v4;
_cookie.data.nickname = _arg1.v5;
_local4 = _cookie.flush();
sendData("http://partmastergp.viral-game.co.uk/data.php", _local3, _arg2);
}
public function returnPoints():Array{
var _local1:*;
_local1 = new Array(_userPoints1, _userPoints2, _userPoints3, _userPointsAllowed);
return (_local1);
}
public function loadLeagueScores(){
var _local1:URLVariables;
var _local2:*;
var _local3:*;
_local1 = new URLVariables();
_local1.action = "league_get_times";
_local1.league_id = _cookie.data.league;
_local1.player_email = _cookie.data.email;
_local1.rand = Math.ceil((Math.random() * 10000));
_local2 = 1;
while (_local2 <= 5) {
_local3 = _cookie.data[(("leagueTrack" + _local2) + "Time")];
if (_local3 != null){
_bestTrackTimes[(_local2 - 1)] = _local3;
} else {
_bestTrackTimes[(_local2 - 1)] = 0;
};
_local2++;
};
loadXML("http://partmastergp.viral-game.co.uk/data.php", _local1);
}
public function loadXML(_arg1, _arg2){
_highscoresArray = new Array();
_loadXML = new parseXMLDoc();
_loadXML.pXML(_arg1, _arg2);
target_root.addEventListener(Event.ENTER_FRAME, checkLoadedXML);
}
public function sendData(_arg1:String, _arg2, _arg3):void{
var _local4:URLRequest;
var _local5:URLLoader;
_local4 = new URLRequest(_arg1);
_local5 = new URLLoader();
_local4.data = _arg2;
_local4.method = URLRequestMethod.POST;
_local5.addEventListener(Event.COMPLETE, _arg3);
_local5.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);
_local5.load(_local4);
}
public function createNewLeague(_arg1, _arg2){
var _local3:URLVariables;
var _local4:String;
_local3 = new URLVariables();
_local3.action = "league_create";
_local3.token = _token;
_local3.league_name = _arg1.league_name;
_local3.league_public = _arg1.pub;
_local3.rand = Math.ceil((Math.random() * 1000000));
_local3.league_invite_sender = _arg1.email;
_cookie.data.email = _arg1.email;
_cookie.data.nickname = _arg1.nickname;
_cookie.data.leaguename = _arg1.league_name;
_local4 = _cookie.flush();
sendData("http://partmastergp.viral-game.co.uk/data.php", _local3, _arg2);
}
public function timesSubmitted(_arg1:Event){
_menus.GPcompEntered();
}
public function loadTournamentScores(){
var _local1:URLVariables;
_local1 = new URLVariables();
_local1.action = "tournament_get_times";
_local1.rand = Math.ceil((Math.random() * 10000));
loadXML("http://partmastergp.viral-game.co.uk/data.php", _local1);
}
public function ioErrorHandler(_arg1:IOErrorEvent){
clearLeagueCookie();
_menus.serverBusy();
}
public function setPositions(_arg1):void{
pos1 = _arg1[0].num;
pos2 = _arg1[1].num;
pos3 = _arg1[2].num;
pos4 = _arg1[3].num;
pos5 = _arg1[4].num;
pos6 = _arg1[5].num;
pos7 = _arg1[6].num;
pos8 = _arg1[7].num;
}
public function returnTrack():int{
return (_track);
}
public function submitCompetition(_arg1){
var _local2:URLVariables;
_local2 = new URLVariables();
_local2.action = "competition_submit_details";
_local2.token = _token;
_local2.player_name = _arg1.playerName;
_local2.player_email = _arg1.email;
sendData("http://partmastergp.viral-game.co.uk/data.php", _local2, compEntered);
}
public function resetTournamentTimes(){
_tournamentTime = new Array();
_tournamentTrack = new Array();
}
public function clearLeagueCookie(){
var _local1:String;
_cookie.data.league = null;
_cookie.data.leaguename = null;
_cookie.data.email = null;
_cookie.data.nickname = null;
_local1 = _cookie.flush();
}
public function compEntered(_arg1:Event){
var _local2:URLLoader;
var _local3:URLVariables;
Tracker.kvEvent(894);
_local2 = URLLoader(_arg1.target);
_local3 = new URLVariables(_local2.data);
if (_local3.competition_submit_details == "true"){
_menus.compEntered();
} else {
_menus.compAlreadyEntered();
};
}
public function saveTournamentTimes(_arg1){
_tournamentTime.push(_arg1);
_tournamentTrack.push(_track);
}
public function returnToken():String{
return (_token);
}
public function checkLoadedXML(_arg1:Event){
var _local2:XML;
_local2 = _loadXML.returnXML();
if (_local2 != null){
target_root.removeEventListener(Event.ENTER_FRAME, checkLoadedXML);
organiseXML(_local2);
};
}
public function loadToken(_arg1:Event):void{
var _local2:URLLoader;
var _local3:URLVariables;
var _local4:String;
var _local5:*;
var _local6:*;
var _local7:*;
var _local8:*;
_local2 = URLLoader(_arg1.target);
_local3 = new URLVariables(_local2.data);
_token = _local3.token;
_local4 = _token.substr(28, 8);
_local5 = MD5.hash(_local4);
_local6 = Math.ceil((Math.random() * 1000000));
_local7 = Math.ceil((Math.random() * 1000000));
_local8 = Math.ceil((Math.random() * 1000000));
_token = (((MD5.hash(_local6) + MD5.hash(_local7)) + _local5) + MD5.hash(_local8));
}
public function leagueCreated(_arg1:Event){
var _local2:String;
loadLeagueScores();
_local2 = _cookie.flush();
_menus.loadLeagueScreen1();
}
public function returnCookie():Object{
var _local1:*;
_local1 = new Object();
_local1.league = _cookie.data.league;
_local1.email = _cookie.data.email;
_local1.nickname = _cookie.data.nickname;
_local1.unlock1 = _cookie.data.unlock1;
_local1.unlock2 = _cookie.data.unlock2;
_local1.unlock3 = _cookie.data.unlock3;
return (_local1);
}
public function submitGPTimes(_arg1){
var _local2:URLVariables;
_local2 = new URLVariables();
_local2.action = "tournament_submit_times";
_local2.token = _token;
_local2.player_name = _arg1.playerName;
_local2.player_email = _arg1.email;
_local2.track_id = _tournamentTrack.toString();
_local2.track_time = _tournamentTime.toString();
sendData("http://partmastergp.viral-game.co.uk/data.php", _local2, timesSubmitted);
}
public function setDifficulty(_arg1){
_difficulty = _arg1;
}
public function writeLeagueToCookie(_arg1){
_cookie.data.league = _arg1.league;
}
public function setupSingleRace():void{
_userPoints1 = 5;
_userPoints2 = 5;
_userPoints3 = 5;
_comPoints1 = 7;
_comPoints2 = 8;
_comPoints3 = 8;
_userPointsAllowed = 21;
}
public function setCarColour(_arg1){
_userCarColour = _arg1;
}
public function submitLeagueTime(_arg1){
var _local2:URLVariables;
var _local3:String;
_local2 = new URLVariables();
_local2.action = "league_submit_times";
_local2.token = _token;
_local2.league_name = _cookie.data.leaguename;
_local2.league_id = _cookie.data.league;
_local2.player_name = _cookie.data.nickname;
_local2.player_email = _cookie.data.email;
_local2.track_time = _arg1;
_local2.track_id = _track;
sendData("http://partmastergp.viral-game.co.uk/data.php", _local2, leagueTimeSubmitted);
if ((((((_cookie.data[(("leagueTrack" + _track) + "Time")] > _arg1)) || ((_cookie.data[(("leagueTrack" + _track) + "Time")] == 0)))) || ((_cookie.data[(("leagueTrack" + _track) + "Time")] == null)))){
_cookie.data[(("leagueTrack" + _track) + "Time")] = _arg1;
};
_local3 = _cookie.flush();
_cookie = SharedObject.getLocal("pgpcookiedata");
}
public function setNextTrack():int{
_userPointsAllowed = (_userPointsAllowed + 2);
_comPoints1++;
_comPoints2++;
_comPoints3++;
_track++;
return (_track);
}
public function setupGrandPrix():void{
if (_difficulty == "hard"){
_userPoints1 = 6;
_userPoints2 = 6;
_userPoints3 = 7;
_comPoints1 = 6;
_comPoints2 = 6;
_comPoints3 = 6;
_userPointsAllowed = 19;
} else {
_userPoints1 = 5;
_userPoints2 = 5;
_userPoints3 = 5;
_comPoints1 = 5;
_comPoints2 = 5;
_comPoints3 = 5;
_userPointsAllowed = 15;
};
}
public function setPoints(_arg1){
_userPoints1 = _arg1[0];
_userPoints2 = _arg1[1];
_userPoints3 = _arg1[2];
}
public function startNextRace():void{
setupGame();
}
public function buildGameEngine():void{
var _local1:URLVariables;
_local1 = new URLVariables();
_local1.action = "token_generate";
sendData("http://partmastergp.viral-game.co.uk/data.php", _local1, loadToken);
_gameSounds.startMenuMusic();
target_root = SetStage.root_target;
_menus = new Menus();
back = new DrawBackground();
arrowKeys = new ArrowKeys();
blitMapUser = new BlitMapUser();
blitMapUser.setupTimers();
blitMapUser.buildBlitMap(8, 15, 245, (CARWIDTH * ASPECT), (CARHEIGHT * ASPECT));
_menus.buildMenus();
}
public function organiseXML(_arg1:XML){
var _local2:XML;
var _local3:*;
var _local4:*;
var _local5:Array;
var _local6:*;
var _local7:*;
var _local8:Object;
_local2 = _arg1;
_highscoresArray = new Array();
_local3 = 1;
while (_local3 <= _local2.daily_scores.track.length()) {
_local4 = _local2.daily_scores.track[(_local3 - 1)];
_local5 = new Array();
_local6 = 1;
while (_local6 <= _local4.entry.length()) {
_local7 = _local4.entry[(_local6 - 1)];
_local8 = new Object();
_local8.player_name = _local7.attributes()[0].toString();
_local8.track_time = _local7.attributes()[1].toString();
_local5.push(_local8);
_local6++;
};
_highscoresArray.push(_local5);
_local3++;
};
_menus.setLeaguePositions(_highscoresArray, _track, _bestTrackTimes);
}
public function loadLeagueData(_arg1:Event){
var _local2:URLLoader;
var _local3:URLVariables;
var _local4:String;
_local2 = URLLoader(_arg1.target);
_local3 = new URLVariables(_local2.data);
_menus.invalidLeagueID();
if (_local3.league_join == "true"){
_cookie = SharedObject.getLocal("pgpcookiedata");
_cookie.data.leaguename = _local3.league_name;
_cookie.data.league = _local3.league_id;
_local4 = _cookie.flush();
loadLeagueScores();
_menus.loadLeagueScreen();
Tracker.kvEvent(893);
} else {
clearLeagueCookie();
};
}
}
}//package micromachines
Section 17
//GameSounds (micromachines.GameSounds)
package micromachines {
import flash.display.*;
import flash.events.*;
import flash.media.*;
public class GameSounds extends Sprite {
public var _rev10:rev10;
public var _bump:bump;
private var _screechVolume;// = 0
public var _replaceCar:replaceCar;
private var _screechPlaying:Boolean;// = false
public var _carFall:carFall;
public var _explode:explode;
public var _rev0:rev1;
public var _rev1:rev1;
public var _rev2:rev2;
public var _rev3:rev3;
public var _rev4:rev4;
public var _rev5:rev5;
public var _rev6:rev6;
public var _rev7:rev7;
public var _rev8:rev8;
public var _rev9:rev9;
public var _music1:menuMusic;
private var _musicVolume;// = 1
public var _screech:screech;
public static var _screechSound:SoundChannel;
public static var _musicSound:SoundChannel;
public static var _revSound:SoundChannel;
public static var _music2:raceMusic = new raceMusic();
public static var _explodeSound:SoundChannel;
public static var _replaceCarSound:SoundChannel;
public static var _bumpSound:SoundChannel;
public static var _carFallSound:SoundChannel;
public function GameSounds(){
_rev0 = new rev1();
_rev1 = new rev1();
_rev2 = new rev2();
_rev3 = new rev3();
_rev4 = new rev4();
_rev5 = new rev5();
_rev6 = new rev6();
_rev7 = new rev7();
_rev8 = new rev8();
_rev9 = new rev9();
_rev10 = new rev10();
_screech = new screech();
_bump = new bump();
_music1 = new menuMusic();
_explode = new explode();
_carFall = new carFall();
_replaceCar = new replaceCar();
_musicVolume = 1;
_screechPlaying = false;
_screechVolume = 0;
super();
}
public function fadeMusic(_arg1:Event){
var _local2:SoundTransform;
_musicVolume = (_musicVolume - 0.05);
_local2 = _musicSound.soundTransform;
_local2.volume = _musicVolume;
_musicSound.soundTransform = _local2;
if (_musicVolume <= 0.15){
removeEventListener(Event.ENTER_FRAME, fadeMusic);
_local2.volume = _musicVolume;
_musicSound.soundTransform = _local2;
};
}
public function playExplode(){
_explodeSound = _explode.play();
}
public function stopRev(){
_revSound.stop();
}
public function stopMusic(){
_musicSound.stop();
_musicVolume = 1;
}
public function setScreech(){
var _local1:SoundTransform;
_screechSound = _screech.play(0, 20000);
_local1 = _screechSound.soundTransform;
_local1.volume = _screechVolume;
_screechSound.soundTransform = _local1;
}
public function startScreech(){
var _local1:SoundTransform;
_screechVolume = 1;
_local1 = _screechSound.soundTransform;
_local1.volume = _screechVolume;
_screechSound.soundTransform = _local1;
}
public function playBump(){
_bumpSound = _bump.play();
}
public function startRaceMusic(){
_musicSound = _music2.play(0, 9999);
}
public function playCarFall(){
_carFallSound = _carFall.play();
}
public function stopScreech(){
var _local1:SoundTransform;
_screechVolume = 0;
_local1 = _screechSound.soundTransform;
_local1.volume = _screechVolume;
_screechSound.soundTransform = _local1;
}
public function playRev(_arg1){
_revSound = this[("_rev" + _arg1)].play(0, 9999);
}
public function playReplaceCar(){
_replaceCarSound = _replaceCar.play();
}
public function startMenuMusic(){
_musicSound = _music1.play(0, 9999);
}
public function startFadeMusic(){
addEventListener(Event.ENTER_FRAME, fadeMusic);
}
}
}//package micromachines
Section 18
//Levels (micromachines.Levels)
package micromachines {
public class Levels {
public function buildLevel5WayPoints():Array{
var _local1:*;
_local1 = new Array({col:"ccff", ax:218, ay:797, ax1:246, ay1:736}, {col:"accff", ax:343, ay:620, ax1:386, ay1:585}, {col:"14ccff", ax:415, ay:415, ax1:409, ay1:361}, {col:"1eccff", ax:0x0200, ay:221, ax1:579, ay1:221}, {col:"28ccff", ax:746, ay:223, ax1:800, ay1:247}, {col:"32ccff", ax:874, ay:315, ax1:921, ay1:298}, {col:"3cccff", ax:1126, ay:240, ax1:1172, ay1:252}, {col:"46ccff", ax:1260, ay:348, ax1:1256, ay1:384}, {col:"50ccff", ax:1201, ay:612, ax1:1220, ay1:750}, {col:"33ffcc", ax:1194, ay:759, ax1:1240, ay1:804}, {col:"3cffcc", ax:1182, ay:986, ax1:1136, ay1:980}, {col:"46ffcc", ax:970, ay:912, ax1:945, ay1:873}, {col:"50ffcc", ax:776, ay:777, ax1:724, ay1:838}, {col:"5affcc", ax:703, ay:877, ax1:719, ay1:906}, {col:"64ffcc", ax:794, ay:1003, ax1:853, ay1:1019}, {col:"6effcc", ax:1060, ay:1074, ax1:1127, ay1:1091}, {col:"78ffcc", ax:1240, ay:1139, ax1:1243, ay1:1167}, {col:"82ffcc", ax:1228, ay:1206, ax1:1185, ay1:1216}, {col:"8cffcc", ax:945, ay:1161, ax1:872, ay1:1186}, {col:"96ffcc", ax:628, ay:1199, ax1:577, ay1:1199}, {col:"5accff", ax:351, ay:1199, ax1:284, ay1:1169}, {col:"64ccff", ax:265, ay:951, ax1:252, ay:1898});
return (_local1);
}
public function buildLevel4WayPoints():Array{
var _local1:*;
_local1 = new Array({col:"87e075", ax:1127, ay:357, ax1:1113, ay1:333}, {col:"91e075", ax:848, ay:242, ax1:645, ay1:232}, {col:"37c0e2", ax:523, ay:246, ax1:451, ay1:261}, {col:"32c0e2", ax:342, ay:300, ax1:273, ay1:348}, {col:"2dc0e2", ax:238, ay:414, ax1:321, ay1:562}, {col:"2de075", ax:326, ay:596, ax1:405, ay1:619}, {col:"37e075", ax:781, ay:551, ax1:819, ay1:510}, {col:"41e075", ax:896, ay:425, ax1:931, ay1:420}, {col:"4be075", ax:951, ay:428, ax1:960, ay1:460}, {col:"55e075", ax:950, ay:504, ax1:922, ay1:550}, {col:"5fe075", ax:985, ay:666, ax1:1068, ay1:694}, {col:"69e075", ax:1099, ay:713, ax1:1092, ay1:756}, {col:"69c0e2", ax:1072, ay:781, ax1:1000, ay1:789}, {col:"64c0e2", ax:922, ay:790, ax1:756, ay1:775}, {col:"73e075", ax:574, ay:780, ax1:462, ay1:790}, {col:"7de075", ax:343, ay:843, ax1:301, ay1:871}, {col:"5fc0e2", ax:228, ay:1025, ax1:240, ay1:1069}, {col:"5ac0e2", ax:0xFF, ay:1185, ax1:288, ay1:1206}, {col:"55c0e2", ax:393, ay:1207, ax1:463, ay1:1168}, {col:"50c0e2", ax:548, ay:1114, ax1:630, ay1:1110}, {col:"4bc0e2", ax:713, ay:1069, ax1:774, ay1:1084}, {col:"46c0e2", ax:855, ay:1128, ax1:942, ay1:1153}, {col:"41c0e2", ax:1166, ay:1022, ax1:1188, ay1:949}, {col:"3cc0e2", ax:1224, ay:693, ax1:1216, ay1:616});
return (_local1);
}
public function buildLevel3WayPoints():Array{
var _local1:*;
_local1 = new Array({col:"ffff", ax:342, ay:424, ax1:362, ay1:414}, {col:"5ffff", ax:386, ay:375, ax1:406, ay1:379}, {col:"affff", ax:430, ay:388, ax1:446, ay1:392}, {col:"fffff", ax:639, ay:357, ax1:658, ay1:365}, {col:"14ffff", ax:752, ay:431, ax1:756, ay1:457}, {col:"19ffff", ax:764, ay:689, ax1:773, ay1:704}, {col:"1effff", ax:843, ay:864, ax1:850, ay1:914}, {col:"23ffff", ax:957, ay:1013, ax1:965, ay1:992}, {col:"28ffff", ax:1007, ay:959, ax1:998, ay1:934}, {col:"2dffff", ax:969, ay:859, ax1:975, ay1:833}, {col:"32ffff", ax:988, ay:800, ax1:1023, ay1:785}, {col:"37ffff", ax:1051, ay:764, ax1:1060, ay1:734}, {col:"3cffff", ax:1064, ay:689, ax1:1044, ay1:681}, {col:"41ffff", ax:869, ay:588, ax1:862, ay1:565}, {col:"46ffff", ax:866, ay:515, ax1:881, ay1:500}, {col:"4bffff", ax:1058, ay:466, ax1:1068, ay1:478}, {col:"50ffff", ax:1192, ay:703, ax1:1183, ay1:746}, {col:"55ffff", ax:1157, ay:1049, ax1:1159, ay1:1072}, {col:"5affff", ax:959, ay:1171, ax1:920, ay1:1163}, {col:"5fffff", ax:697, ay:1161, ax1:660, ay1:1164}, {col:"64ffff", ax:458, ay:1181, ax1:421, ay1:1168}, {col:"69ffff", ax:362, ay:1089, ax1:357, ay1:1042}, {col:"6effff", ax:331, ay:867, ax1:335, ay1:851}, {col:"73ffff", ax:333, ay:666, ax1:339, ay1:603});
return (_local1);
}
public function buildLevel2WayPoints():Array{
var _local1:*;
_local1 = new Array({col:"5dbff", ax:205, ay:721, ax1:268, ay1:397}, {col:"5d7ff", ax:415, ay:276, ax1:480, ay1:0xFF}, {col:"5d2ff", ax:583, ay:285, ax1:585, ay1:346}, {col:"5cdff", ax:544, ay:409, ax1:480, ay1:424}, {col:"c8ff", ax:400, ay:436, ax1:346, ay1:487}, {col:"c3ff", ax:321, ay:652, ax1:319, ay1:754}, {col:"beff", ax:315, ay:960, ax1:321, ay1:0x0400}, {col:"b9ff", ax:396, ay:1095, ax1:441, ay1:1042}, {col:"b4ff", ax:469, ay:963, ax1:459, ay1:888}, {col:"afff", ax:462, ay:664, ax1:484, ay1:595}, {col:"aaff", ax:606, ay:489, ax1:645, ay1:456}, {col:"a5ff", ax:712, ay:337, ax1:774, ay1:298}, {col:"a0ff", ax:901, ay:247, ax1:1000, ay1:282}, {col:"9bff", ax:1152, ay:411, ax1:1192, ay1:454}, {col:"96ff", ax:1214, ay:601, ax1:1233, ay1:648}, {col:"91ff", ax:1180, ay:862, ax1:1138, ay1:904}, {col:"8cff", ax:915, ay:900, ax1:846, ay1:862}, {col:"87ff", ax:652, ay:843, ax1:631, ay1:897}, {col:"82ff", ax:789, ay:1051, ax1:850, ay1:1054}, {col:"7dff", ax:1023, ay:1060, ax1:1060, ay1:1059}, {col:"78ff", ax:1116, ay:1066, ax1:1131, ay1:1102}, {col:"73ff", ax:1125, ay:1153, ax1:1093, ay1:1173}, {col:"6eff", ax:1039, ay:1173, ax1:987, ay1:1183}, {col:"69ff", ax:811, ay:1206, ax1:760, ay1:1212}, {col:"64ff", ax:408, ay:1222, ax1:307, ay1:1206}, {col:"5fff", ax:202, ay:710, ax1:206, ay1:661});
return (_local1);
}
public function buildLevel1WayPoints():Array{
var _local1:*;
_local1 = new Array({col:"16c1f3", ax:1010, ay:774, ax1:1016, ay1:688}, {col:"2ac4f4", ax:1054, ay:582, ax1:1080, ay1:500}, {col:"40c8f4", ax:1044, ay:582, ax1:992, ay1:376}, {col:"57cbf5", ax:954, ay:350, ax1:904, ay1:326}, {col:"6ccff6", ax:782, ay:408, ax1:758, ay1:424}, {col:"7dd3f7", ax:584, ay:416, ax1:542, ay1:400}, {col:"8dd8f8", ax:454, ay:398, ax1:416, ay1:408}, {col:"9cdcf9", ax:306, ay:462, ax1:280, ay1:472}, {col:"b1f0", ax:266, ay:574, ax1:278, ay1:598}, {col:"b4f1", ax:508, ay:888, ax1:524, ay1:908}, {col:"b7f1", ax:784, ay:1124, ax1:804, ay1:1134}, {col:"baf2", ax:934, ay:1124, ax1:950, ay1:1108}, {col:"bdf2", ax:1058, ay:927, ax1:1049, ay1:826});
return (_local1);
}
public function buildLevel1():Array{
var _local1:*;
_local1 = new Array({ax:1080, ay:925}, {ax:1051, ay:813}, {ax:1018, ay:770}, {ax:1007, ay:737}, {ax:1009, ay:692}, {ax:1033, ay:614}, {ax:1110, ay:490}, {ax:1016, ay:366}, {ax:936, ay:338}, {ax:829, ay:370}, {ax:727, ay:421}, {ax:598, ay:414}, {ax:470, ay:392}, {ax:350, ay:426}, {ax:279, ay:490}, {ax:278, ay:582}, {ax:328, ay:688}, {ax:385, ay:757}, {ax:438, ay:814}, {ax:499, ay:880}, {ax:561, ay:941}, {ax:642, ay:1015}, {ax:707, ay:1084}, {ax:777, ay:1128}, {ax:847, ay:1144}, {ax:920, ay:1130}, {ax:951, ay:1104}, {ax:1005, ay:1021}, {ax:1048, ay:968});
return (_local1);
}
public function buildLevel2():Array{
var _local1:*;
_local1 = new Array({ax:202, ay:721}, {ax:196, ay:579}, {ax:223, ay:468}, {ax:288, ay:372}, {ax:418, ay:261}, {ax:508, ay:243}, {ax:580, ay:282}, {ax:586, ay:340}, {ax:558, ay:396}, {ax:490, ay:420}, {ax:397, ay:445}, {ax:337, ay:495}, {ax:294, ay:609}, {ax:298, ay:711}, {ax:313, ay:915}, {ax:319, ay:1006}, {ax:321, ay:1045}, {ax:363, ay:1080}, {ax:426, ay:1078}, {ax:480, ay:1035}, {ax:471, ay:910}, {ax:447, ay:744}, {ax:450, ay:642}, {ax:474, ay:571}, {ax:559, ay:486}, {ax:679, ay:402}, {ax:747, ay:316}, {ax:883, ay:261}, {ax:0x0400, ay:289}, {ax:1126, ay:376}, {ax:1191, ay:477}, {ax:1245, ay:606}, {ax:1240, ay:754}, {ax:1227, ay:804}, {ax:1119, ay:891}, {ax:1000, ay:907}, {ax:874, ay:880}, {ax:777, ay:844}, {ax:679, ay:844}, {ax:627, ay:885}, {ax:625, ay:945}, {ax:661, ay:1014}, {ax:736, ay:1048}, {ax:831, ay:1078}, {ax:948, ay:1063}, {ax:1035, ay:1041}, {ax:1113, ay:1066}, {ax:1138, ay:1126}, {ax:1105, ay:1165}, {ax:1021, ay:1190}, {ax:886, ay:1190}, {ax:690, ay:1190}, {ax:237, ay:1190}, {ax:225, ay:1083}, {ax:186, ay:897});
return (_local1);
}
public function buildLevel3():Array{
var _local1:*;
_local1 = new Array({ax:334, ay:664}, {ax:319, ay:507}, {ax:345, ay:425}, {ax:391, ay:393}, {ax:432, ay:387}, {ax:550, ay:368}, {ax:654, ay:357}, {ax:725, ay:389}, {ax:762, ay:498}, {ax:746, ay:641}, {ax:832, ay:899}, {ax:870, ay:957}, {ax:939, ay:991}, {ax:989, ay:973}, {ax:1004, ay:921}, {ax:990, ay:857}, {ax:1011, ay:783}, {ax:1084, ay:726}, {ax:1039, ay:685}, {ax:959, ay:636}, {ax:893, ay:614}, {ax:874, ay:520}, {ax:939, ay:463}, {ax:1046, ay:454}, {ax:1140, ay:556}, {ax:1183, ay:660}, {ax:1179, ay:796}, {ax:1170, ay:954}, {ax:1148, ay:1073}, {ax:1052, ay:1174}, {ax:863, ay:1230}, {ax:631, ay:1227}, {ax:450, ay:1181}, {ax:364, ay:1063}, {ax:321, ay:846});
return (_local1);
}
public function buildLevel4():Array{
var _local1:*;
_local1 = new Array({ax:1228, ay:700}, {ax:1173, ay:418}, {ax:1099, ay:315}, {ax:1011, ay:261}, {ax:799, ay:229}, {ax:489, ay:241}, {ax:298, ay:343}, {ax:0x0100, ay:486}, {ax:322, ay:603}, {ax:489, ay:636}, {ax:693, ay:597}, {ax:817, ay:501}, {ax:883, ay:444}, {ax:924, ay:435}, {ax:942, ay:463}, {ax:936, ay:523}, {ax:922, ay:586}, {ax:930, ay:627}, {ax:1000, ay:658}, {ax:1066, ay:693}, {ax:1106, ay:738}, {ax:1086, ay:769}, {ax:1036, ay:796}, {ax:900, ay:799}, {ax:0x0303, ay:778}, {ax:526, ay:786}, {ax:361, ay:816}, {ax:264, ay:927}, {ax:229, ay:1041}, {ax:249, ay:1162}, {ax:306, ay:1186}, {ax:421, ay:1182}, {ax:582, ay:1119}, {ax:706, ay:1074}, {ax:822, ay:1110}, {ax:986, ay:1166}, {ax:1142, ay:1068}, {ax:1203, ay:967}, {ax:1230, ay:805});
return (_local1);
}
public function buildLevel5():Array{
var _local1:*;
_local1 = new Array({ax:258, ay:953}, {ax:232, ay:790}, {ax:329, ay:622}, {ax:420, ay:517}, {ax:407, ay:407}, {ax:403, ay:313}, {ax:478, ay:212}, {ax:764, ay:233}, {ax:857, ay:298}, {ax:987, ay:279}, {ax:1131, ay:252}, {ax:1235, ay:290}, {ax:1276, ay:460}, {ax:1200, ay:610}, {ax:1225, ay:779}, {ax:1231, ay:902}, {ax:1167, ay:985}, {ax:1025, ay:956}, {ax:920, ay:839}, {ax:817, ay:802}, {ax:738, ay:833}, {ax:734, ay:928}, {ax:784, ay:1002}, {ax:979, ay:1057}, {ax:1225, ay:1136}, {ax:1115, ay:1242}, {ax:951, ay:1181}, {ax:800, ay:1204}, {ax:658, ay:1204}, {ax:332, ay:1200}, {ax:250, ay:1129});
return (_local1);
}
}
}//package micromachines
Section 19
//Menus (micromachines.Menus)
package micromachines {
import flash.display.*;
import flash.events.*;
import com.memecounter.*;
import koko.*;
import flash.net.*;
import flash.text.*;
public class Menus extends MovieClip {
public var _leaguePositions:Array;
private var _colour:int;
public var _gameSounds;
private var _ge;
private var _covertTime;
private var _endPositions:Array;
public var _publicLeague;// = "1"
public var _menuContainer;
private var _bestTrackTimes;
public static var _race1Animation = new race1Animation();
public static var _leagueMenu1:MovieClip = new createALeague();
public static var _leagueMenu2:MovieClip = new createALeague1();
public static var _leagueMenu3:MovieClip = new createALeague2();
public static var _leagueMenu4:MovieClip = new createALeague3();
private static var _racePositionsQuit:Boolean = false;
private static var _points:Array = new Array(0, 0, 0);
public static var _cookie:SharedObject;
public static var _mainMenu:MovieClip = new MainMenu();
public static var _sendToFriend = new sendToFriend();
public static var _racePositions:MovieClip = new racePositions();
public static var _race6Animation = new race6Animation();
public static var _enterCompetition = new enterCompetition();
public static var _hideMenu;
public static var _race2Animation = new race2Animation();
public static var _quitMenu = new confirmQuit();
public static var _transition1:MovieClip = new transition();
private static var _leagueRace:Boolean;
public static var _race3Animation = new race3Animation();
public static var _runFunction;
public static var _blackBorder:blackBorder = new blackBorder();
private static var target_root = SetStage.root_target;
public static var _singleRaceMenu = new singleRaceMenu();
public static var _modifyMenu:MovieClip = new modifyCarMenu();
public static var _showMenu;
private static var _singleRace:Boolean;
public static var _race4Animation = new race4Animation();
private static var _track = 1;
public static var _colourMenu:MovieClip = new carColourMenu();
public static var _grandPrixFinished = new grandPrixFinished();
private static var _tournamentRace:Boolean;
public static var _serverBusy = new serverBusy();
public static var _difficultySelect:MovieClip = new difficultySelect();
public static var _race5Animation = new race5Animation();
public function Menus(){
_ge = new GameEngine();
_menuContainer = new Sprite();
_gameSounds = new GameSounds();
_covertTime = new ConvertTime();
_leaguePositions = new Array();
_bestTrackTimes = new Array();
_publicLeague = "1";
super();
}
public function modifyQuitToMenu(_arg1:MouseEvent){
if (_tournamentRace){
_racePositionsQuit = false;
_quitMenu.gotoAndStop(2);
} else {
transitionBetweenMenus(_modifyMenu, _mainMenu, false);
_modifyMenu.modifyExplanation.ani_mc.gotoAndPlay(1015);
_modifyMenu.modifyExplanation.gotoAndStop(1);
removeModifyPoints();
};
}
public function colour8(_arg1:MouseEvent):void{
_modifyMenu.car_mc.gotoAndStop(8);
_colourMenu.car_mc.gotoAndStop(8);
}
public function startRace2Animation(){
_gameSounds.startFadeMusic();
transitionBetweenMenus(_racePositions, _race2Animation, false);
addEventListener(Event.ENTER_FRAME, race2AnimationProgress);
}
public function compSubmit(_arg1:MouseEvent){
var _local2:*;
if (((!((_enterCompetition.playerName.text == ""))) || (!((_enterCompetition.email.text == ""))))){
_local2 = new Object();
_local2.playerName = _enterCompetition.playerName.text;
_local2.email = _enterCompetition.email.text;
_ge.submitCompetition(_local2);
_enterCompetition.gotoAndStop(3);
};
}
public function buildEndRaceScreen(){
_menuContainer.addChild(_racePositions);
_racePositions.tryAgain_btn.addEventListener(MouseEvent.MOUSE_UP, tryAgain);
_racePositions.nextRace_btn.addEventListener(MouseEvent.MOUSE_UP, nextRace);
_racePositions.backToLeague_btn.addEventListener(MouseEvent.MOUSE_UP, backToLeague);
_racePositions.backToSingleRace_btn.addEventListener(MouseEvent.MOUSE_UP, backToSingleRace);
_racePositions.mainMenu_btn.addEventListener(MouseEvent.MOUSE_UP, racePosMainMenu);
}
public function checkPoints():int{
var _local1:*;
_local1 = (_points[3] - ((_points[0] + _points[1]) + _points[2]));
return (_local1);
}
public function compTerms(_arg1:MouseEvent){
Tracker.kvClick(695);
URLUtil.openWindow("http://partmastergp.viral-game.co.uk/terms.htm");
}
public function quitYes(_arg1:MouseEvent):void{
if (_racePositionsQuit){
_ge.stopRace();
_ge.setTrack(1);
_gameSounds.stopMusic();
_gameSounds.startMenuMusic();
transitionBetweenMenus(_racePositions, _mainMenu, false);
} else {
transitionBetweenMenus(_modifyMenu, _mainMenu, false);
};
_modifyMenu.modifyExplanation.ani_mc.gotoAndPlay(1015);
_modifyMenu.modifyExplanation.gotoAndStop(1);
removeModifyPoints();
}
public function createLeagueMainMenu(_arg1:MouseEvent){
transitionBetweenMenus(_leagueMenu3, _mainMenu, false);
}
public function trackRaceStarts(){
if (_leagueRace){
switch (_track){
case 1:
Tracker.kvEvent(901);
break;
case 2:
Tracker.kvEvent(902);
break;
case 3:
Tracker.kvEvent(903);
break;
case 4:
Tracker.kvEvent(904);
break;
case 5:
Tracker.kvEvent(905);
break;
};
};
if (_singleRace){
switch (_track){
case 1:
Tracker.kvEvent(906);
break;
case 2:
Tracker.kvEvent(907);
break;
case 3:
Tracker.kvEvent(908);
break;
case 4:
Tracker.kvEvent(909);
break;
case 5:
Tracker.kvEvent(910);
break;
};
};
}
public function race1AnimationProgress(_arg1:Event){
if (_race1Animation.ani_mc != null){
if (_race1Animation.ani_mc.currentFrame > 290){
_race1Animation.ani_mc.gotoAndStop(1);
Tracker.kvEvent(896);
transitionBetweenMenus(_race1Animation, "none", true);
removeEventListener(Event.ENTER_FRAME, race1AnimationProgress);
_gameSounds.stopMusic();
_gameSounds.startRaceMusic();
if (_race1Animation.ani_mc.currentFrame >= 1000){
Tracker.kvEvent(915);
};
};
};
}
public function startRace4Animation(){
_gameSounds.startFadeMusic();
transitionBetweenMenus(_racePositions, _race4Animation, false);
addEventListener(Event.ENTER_FRAME, race4AnimationProgress);
}
public function buildSingleRaceMenu(){
_menuContainer.addChild(_leagueMenu2);
_singleRaceMenu.mainMenu_btn.addEventListener(MouseEvent.MOUSE_UP, singleMainMenu);
_singleRaceMenu.beginRace_btn.addEventListener(MouseEvent.MOUSE_UP, singleBeginRace);
_singleRaceMenu.track1_btn.addEventListener(MouseEvent.MOUSE_UP, blmTrack1);
_singleRaceMenu.track2_btn.addEventListener(MouseEvent.MOUSE_UP, blmTrack2);
_singleRaceMenu.track3_btn.addEventListener(MouseEvent.MOUSE_UP, blmTrack3);
_singleRaceMenu.track4_btn.addEventListener(MouseEvent.MOUSE_UP, blmTrack4);
_singleRaceMenu.track5_btn.addEventListener(MouseEvent.MOUSE_UP, blmTrack5);
_singleRaceMenu.startGP_btn.addEventListener(MouseEvent.MOUSE_UP, startNewGP);
_menuContainer.addChild(_singleRaceMenu);
}
public function setLeaguePositions(_arg1:Array, _arg2, _arg3){
_leaguePositions = _arg1;
_bestTrackTimes = _arg3;
displayTimes(_arg2);
}
public function inviteFriends(_arg1:MouseEvent){
var _local2:String;
var _local3:*;
_local2 = "";
_local3 = 1;
while (_local3 < 6) {
if (_leagueMenu4[("email" + _local3)].text != ""){
if (_local3 != 1){
_local2 = (_local2 + ("," + _leagueMenu4[("email" + _local3)].text));
} else {
_local2 = (_local2 + _leagueMenu4[("email" + _local3)].text);
};
};
_local3++;
};
_leagueMenu4.gotoAndStop(3);
_ge.sendInvites(_local2, _ge.invitesHandeler);
}
public function race2AnimationProgress(_arg1:Event){
if (_race2Animation.ani_mc != null){
if (_race2Animation.ani_mc.currentFrame > 495){
_race2Animation.ani_mc.gotoAndStop(1);
Tracker.kvEvent(897);
transitionBetweenMenus(_race2Animation, _modifyMenu, false);
removeEventListener(Event.ENTER_FRAME, race2AnimationProgress);
_gameSounds.stopMusic();
_gameSounds.startMenuMusic();
_runFunction = explainBonusPoints();
setModifyPoints();
if (_race2Animation.ani_mc.currentFrame >= 1000){
Tracker.kvEvent(916);
};
};
};
}
public function createLeague(_arg1:MouseEvent):void{
var _local2:SharedObject;
_track = 1;
_leagueMenu2.glow_mc.gotoAndStop(1);
_singleRaceMenu.glow_mc.gotoAndStop(1);
_leagueMenu2.selectedLevel_mc.gotoAndStop(1);
_singleRaceMenu.selectedLevel_mc.gotoAndStop(1);
_ge.setTrack(1);
_leagueRace = true;
_singleRace = false;
_tournamentRace = false;
_local2 = SharedObject.getLocal("pgpcookiedata");
if (_local2.data.league != null){
_ge.loadLeagueScores();
_leagueMenu2.leagueText_mc.leagueName.text = _local2.data.leaguename;
transitionBetweenMenus(_mainMenu, _leagueMenu2, false);
} else {
transitionBetweenMenus(_mainMenu, _leagueMenu1, false);
};
_ge.setDifficulty("hard");
_ge.setupSingleRace();
}
public function blmInvite(_arg1:MouseEvent){
transitionBetweenMenus(_leagueMenu2, _leagueMenu4, false);
}
public function endRace(){
transitionBetweenMenus("none", _racePositions, false);
}
public function modifyNextButton(_arg1:MouseEvent):void{
_ge.setPoints(_points);
removeModifyPoints();
transitionBetweenMenus(_modifyMenu, "none", true);
trackRaceStarts();
_gameSounds.stopMusic();
_gameSounds.startRaceMusic();
if (_modifyMenu.modifyExplanation.ani_mc != null){
_modifyMenu.modifyExplanation.ani_mc.gotoAndPlay(1015);
};
_modifyMenu.modifyExplanation.gotoAndStop(1);
}
public function createNewLeague(_arg1:MouseEvent){
var _local2:Object;
if (((((!((_leagueMenu3.leaguename.text == ""))) && (!((_leagueMenu3.email.text == ""))))) && (!((_leagueMenu3.nickname.text == ""))))){
_local2 = new Object();
_local2.league_name = _leagueMenu3.leaguename.text;
_local2.email = _leagueMenu3.email.text;
_local2.nickname = _leagueMenu3.nickname.text;
_local2.pub = _publicLeague;
_ge.createNewLeague(_local2, _ge.addNewLeagueData);
_leagueMenu3.gotoAndStop(3);
Tracker.kvEvent(892);
};
}
public function visitKokoLink(_arg1:MouseEvent){
Tracker.kvClick(697);
URLUtil.openWindow("http://www.kokodigital.co.uk");
}
public function GPSubmit(_arg1:MouseEvent){
var _local2:*;
if (((!((_grandPrixFinished.playerName.text == ""))) || (!((_grandPrixFinished.email.text == ""))))){
_local2 = new Object();
_local2.playerName = _grandPrixFinished.playerName.text;
_local2.email = _grandPrixFinished.email.text;
_ge.submitGPTimes(_local2);
_grandPrixFinished.gotoAndStop(3);
};
}
public function nextRace(_arg1:MouseEvent):void{
var _local2:*;
_ge.stopRace();
_local2 = _ge.setNextTrack();
var _local3 = this;
_local3[(("startRace" + _local2) + "Animation")]();
}
public function buildEnterCompetition():void{
_enterCompetition.submit_btn.addEventListener(MouseEvent.MOUSE_UP, compSubmit);
_enterCompetition.terms_btn.addEventListener(MouseEvent.MOUSE_UP, compTerms);
_enterCompetition.privacy_btn.addEventListener(MouseEvent.MOUSE_UP, compPrivacy);
_enterCompetition.mainMenu_btn.addEventListener(MouseEvent.MOUSE_UP, compMainMenu);
_menuContainer.addChild(_enterCompetition);
}
public function race3AnimationProgress(_arg1:Event){
if (_race3Animation.ani_mc != null){
if (_race3Animation.ani_mc.currentFrame > 760){
_race3Animation.ani_mc.gotoAndStop(1);
Tracker.kvEvent(898);
transitionBetweenMenus(_race3Animation, _modifyMenu, false);
removeEventListener(Event.ENTER_FRAME, race3AnimationProgress);
_gameSounds.stopMusic();
_gameSounds.startMenuMusic();
setModifyPoints();
if (_race3Animation.ani_mc.currentFrame >= 1000){
Tracker.kvEvent(917);
};
};
};
}
public function quitNo(_arg1:MouseEvent):void{
_quitMenu.gotoAndStop(1);
}
public function buildAnimationSkipButtons(){
_race1Animation.skip_btn.addEventListener(MouseEvent.MOUSE_UP, skipMovie);
_race2Animation.skip_btn.addEventListener(MouseEvent.MOUSE_UP, skipMovie);
_race3Animation.skip_btn.addEventListener(MouseEvent.MOUSE_UP, skipMovie);
_race4Animation.skip_btn.addEventListener(MouseEvent.MOUSE_UP, skipMovie);
_race5Animation.skip_btn.addEventListener(MouseEvent.MOUSE_UP, skipMovie);
_race6Animation.skip_btn.addEventListener(MouseEvent.MOUSE_UP, skipMovie);
}
public function tryAgain(_arg1:MouseEvent):void{
var _local2:*;
Tracker.kvEvent(914);
_local2 = _ge.returnTrack();
_ge.stopRace();
if (_local2 != 1){
setModifyPoints();
transitionBetweenMenus(_racePositions, _modifyMenu, false);
} else {
transitionBetweenMenus(_racePositions, "none", false);
_ge.startNextRace();
};
}
public function buildLeagueMenu1(){
_menuContainer.addChild(_leagueMenu1);
_leagueMenu1.login_btn.addEventListener(MouseEvent.MOUSE_UP, joinLeague);
_leagueMenu1.createLeague_btn.addEventListener(MouseEvent.MOUSE_UP, createNewLeagueButtonPress);
_leagueMenu1.mainMenu_btn.addEventListener(MouseEvent.MOUSE_UP, loginMainMenu);
}
public function buildLeagueMenu2(){
_menuContainer.addChild(_leagueMenu2);
_leagueMenu2.mainMenu_btn.addEventListener(MouseEvent.MOUSE_UP, blmMainMenu);
_leagueMenu2.beginRace_btn.addEventListener(MouseEvent.MOUSE_UP, blmBeginRace);
_leagueMenu2.track1_btn.addEventListener(MouseEvent.MOUSE_UP, blmTrack1);
_leagueMenu2.track2_btn.addEventListener(MouseEvent.MOUSE_UP, blmTrack2);
_leagueMenu2.track3_btn.addEventListener(MouseEvent.MOUSE_UP, blmTrack3);
_leagueMenu2.track4_btn.addEventListener(MouseEvent.MOUSE_UP, blmTrack4);
_leagueMenu2.track5_btn.addEventListener(MouseEvent.MOUSE_UP, blmTrack5);
_leagueMenu2.invite_btn.addEventListener(MouseEvent.MOUSE_UP, blmInvite);
_leagueMenu2.logout_btn.addEventListener(MouseEvent.MOUSE_UP, blmLogout);
}
public function buildLeagueMenu3(){
_menuContainer.addChild(_leagueMenu3);
_leagueMenu3.mainMenu_btn.addEventListener(MouseEvent.MOUSE_UP, createLeagueMainMenu);
_leagueMenu3.create_btn.addEventListener(MouseEvent.MOUSE_UP, createNewLeague);
_leagueMenu3.back_btn.addEventListener(MouseEvent.MOUSE_UP, createLeagueBack);
_leagueMenu3.tickBox_mc.buttonMode = true;
_leagueMenu3.tickBox_mc.addEventListener(MouseEvent.MOUSE_UP, tickBoxPublic);
}
public function buildLeagueMenu4(){
_menuContainer.addChild(_leagueMenu4);
_leagueMenu4.invite_btn.addEventListener(MouseEvent.MOUSE_UP, inviteFriends);
_leagueMenu4.logout_btn.addEventListener(MouseEvent.MOUSE_UP, inviteLogout);
_leagueMenu4.back_btn.addEventListener(MouseEvent.MOUSE_UP, inviteBack);
}
public function explainBonusPoints(){
_modifyMenu.modifyExplanation.gotoAndStop(2);
}
public function checkTransition():Boolean{
var _local1:*;
_local1 = false;
if (_transition1.currentFrame == 14){
_local1 = true;
};
return (_local1);
}
public function closeTAF(_arg1:MouseEvent){
_sendToFriend.gotoAndStop(1);
}
public function backToLeague(_arg1:MouseEvent):void{
Tracker.kvEvent(912);
_gameSounds.stopMusic();
_gameSounds.startMenuMusic();
_ge.stopRace();
transitionBetweenMenus(_racePositions, _leagueMenu2, false);
}
public function race4AnimationProgress(_arg1:Event){
if (_race4Animation.ani_mc != null){
if (_race4Animation.ani_mc.currentFrame > 680){
_race4Animation.ani_mc.gotoAndStop(1);
Tracker.kvEvent(899);
transitionBetweenMenus(_race4Animation, _modifyMenu, false);
removeEventListener(Event.ENTER_FRAME, race4AnimationProgress);
_gameSounds.stopMusic();
_gameSounds.startMenuMusic();
setModifyPoints();
if (_race4Animation.ani_mc.currentFrame >= 1000){
Tracker.kvEvent(918);
};
};
};
}
public function startRace6Animation(){
_gameSounds.startFadeMusic();
transitionBetweenMenus(_racePositions, _race6Animation, false);
addEventListener(Event.ENTER_FRAME, race6AnimationProgress);
}
public function backToSingleRace(_arg1:MouseEvent){
_ge.stopRace();
_gameSounds.stopMusic();
_gameSounds.startMenuMusic();
transitionBetweenMenus(_racePositions, _singleRaceMenu, false);
}
public function modifyQuitToMenu1(){
_racePositionsQuit = true;
_quitMenu.gotoAndStop(2);
}
public function invalidLeagueID(){
_leagueMenu1.leagueid.text = "INVALID";
}
public function colourMainMenu(_arg1:MouseEvent):void{
transitionBetweenMenus(_colourMenu, _mainMenu, false);
}
public function race5AnimationProgress(_arg1:Event){
if (_race5Animation.ani_mc != null){
if (_race5Animation.ani_mc.currentFrame > 740){
_race5Animation.ani_mc.gotoAndStop(1);
Tracker.kvEvent(900);
transitionBetweenMenus(_race5Animation, _modifyMenu, false);
removeEventListener(Event.ENTER_FRAME, race5AnimationProgress);
_gameSounds.stopMusic();
_gameSounds.startMenuMusic();
setModifyPoints();
if (_race5Animation.ani_mc.currentFrame >= 1000){
Tracker.kvEvent(919);
};
};
};
}
public function race6AnimationProgress(_arg1:Event){
if (_race6Animation.ani_mc != null){
if (_race6Animation.ani_mc.currentFrame > 875){
_race6Animation.ani_mc.gotoAndStop(1);
Tracker.kvEvent(891);
transitionBetweenMenus(_race6Animation, _grandPrixFinished, false);
removeEventListener(Event.ENTER_FRAME, race6AnimationProgress);
_gameSounds.stopMusic();
_gameSounds.startMenuMusic();
setModifyPoints();
if (_race6Animation.ani_mc.currentFrame >= 1000){
Tracker.kvEvent(920);
};
};
};
}
public function blmLogout(_arg1:MouseEvent){
_ge.clearLeagueCookie();
transitionBetweenMenus(_leagueMenu2, _leagueMenu1, false);
}
public function loadLeagueScreen1(){
_cookie = SharedObject.getLocal("pgpcookiedata");
_leagueMenu2.leagueText_mc.leagueName.text = _cookie.data.leaguename;
transitionBetweenMenus(_leagueMenu3, _leagueMenu2, false);
}
public function buildEndGrandPrix():void{
_grandPrixFinished.submit_btn.addEventListener(MouseEvent.MOUSE_UP, GPSubmit);
_grandPrixFinished.terms_btn.addEventListener(MouseEvent.MOUSE_UP, compTerms);
_grandPrixFinished.privacy_btn.addEventListener(MouseEvent.MOUSE_UP, compPrivacy);
_grandPrixFinished.mainMenu_btn.addEventListener(MouseEvent.MOUSE_UP, endGPMainMenu);
_grandPrixFinished.viewTimes_btn.addEventListener(MouseEvent.MOUSE_UP, endGPSingleRace);
_menuContainer.addChild(_grandPrixFinished);
}
public function removeModifyPoints(){
_modifyMenu.removeEventListener(Event.ENTER_FRAME, setPointsLeft);
}
public function GPcompEntered(){
_grandPrixFinished.gotoAndStop(4);
}
public function compMainMenu(_arg1:MouseEvent){
transitionBetweenMenus(_enterCompetition, _mainMenu, false);
}
public function buildSendToAFriend(){
_menuContainer.addChild(_sendToFriend);
_sendToFriend.send_btn.addEventListener(MouseEvent.MOUSE_UP, sendEmail);
_sendToFriend.close_btn.addEventListener(MouseEvent.MOUSE_UP, closeTAF);
}
public function colourNextButton(_arg1:MouseEvent):void{
transitionBetweenMenus(_colourMenu, _race1Animation, false);
_ge.setCarColour(_colourMenu.car_mc.currentFrame);
_gameSounds.startFadeMusic();
addEventListener(Event.ENTER_FRAME, race1AnimationProgress);
}
public function setPro(_arg1:MouseEvent){
_ge.setDifficulty("hard");
_ge.setupGrandPrix();
transitionBetweenMenus(_difficultySelect, _colourMenu, false);
}
public function compAlreadyEntered(){
_enterCompetition.gotoAndStop(5);
}
public function blmBeginRace(_arg1:MouseEvent){
removeModifyPoints();
setModifyPoints();
transitionBetweenMenus(_leagueMenu2, _modifyMenu, false);
}
public function sendEmail(_arg1:MouseEvent){
var _local2:URLRequest;
var _local3:URLVariables;
if (((((((!((_sendToFriend.yourName.text == ""))) && (!((_sendToFriend.yourEmail.text == ""))))) && (!((_sendToFriend.friendName.text == ""))))) && (!((_sendToFriend.friendEmail.text == ""))))){
_local2 = new URLRequest("http://partmastergp.viral-game.co.uk/mail.php");
_local3 = new URLVariables();
_local3.yourname = _sendToFriend.yourName.text;
_local3.youremail = _sendToFriend.yourEmail.text;
_local3.friendname = _sendToFriend.friendName.text;
_local3.friendemail = _sendToFriend.friendEmail.text;
_local2.data = _local3;
_local2.method = URLRequestMethod.POST;
sendToURL(_local2);
_sendToFriend.friendName.text = "";
_sendToFriend.friendEmail.text = "";
_sendToFriend.gotoAndStop(11);
Tracker.kvEvent(895);
};
}
public function tickBoxPublic(_arg1:MouseEvent){
if (_leagueMenu3.tickBox_mc.currentFrame == 1){
_leagueMenu3.tickBox_mc.gotoAndStop(2);
_publicLeague = "0";
} else {
_leagueMenu3.tickBox_mc.gotoAndStop(1);
_publicLeague = "1";
};
}
public function skipMovie(_arg1:MouseEvent){
if (_race1Animation.ani_mc != null){
_race1Animation.ani_mc.gotoAndStop(1000);
};
if (_race2Animation.ani_mc != null){
_race2Animation.ani_mc.gotoAndStop(1000);
};
if (_race3Animation.ani_mc != null){
_race3Animation.ani_mc.gotoAndStop(1000);
};
if (_race4Animation.ani_mc != null){
_race4Animation.ani_mc.gotoAndStop(1000);
};
if (_race5Animation.ani_mc != null){
_race5Animation.ani_mc.gotoAndStop(1000);
};
if (_race6Animation.ani_mc != null){
_race6Animation.ani_mc.gotoAndStop(1000);
};
}
public function playGrandPrix(_arg1:MouseEvent):void{
Tracker.kvEvent(890);
_track = 1;
_ge.setTrack(1);
_ge.resetTournamentTimes();
_leagueRace = false;
_singleRace = false;
_tournamentRace = true;
playTransition();
_hideMenu = _mainMenu;
_showMenu = _colourMenu;
_ge.setupGrandPrix();
transitionBetweenMenus(_mainMenu, _difficultySelect, false);
}
public function buildQuitMenu():void{
_quitMenu.no_btn.addEventListener(MouseEvent.MOUSE_UP, quitNo);
_quitMenu.yes_btn.addEventListener(MouseEvent.MOUSE_UP, quitYes);
_menuContainer.addChild(_quitMenu);
}
public function singleMainMenu(_arg1:MouseEvent){
transitionBetweenMenus(_singleRaceMenu, _mainMenu, false);
}
public function buildMenus():void{
target_root.addChild(_menuContainer);
buildMainMenu();
buildColourSelector();
buildModifyCarMenu();
buildEndRaceScreen();
buildLeagueMenu1();
buildLeagueMenu2();
buildLeagueMenu3();
buildLeagueMenu4();
buildSingleRaceMenu();
buildEnterCompetition();
buildEndGrandPrix();
_menuContainer.addChild(_race1Animation);
_menuContainer.addChild(_race2Animation);
_menuContainer.addChild(_race3Animation);
_menuContainer.addChild(_race4Animation);
_menuContainer.addChild(_race5Animation);
_menuContainer.addChild(_race6Animation);
buildDifficultyMenu();
buildQuitMenu();
buildAnimationSkipButtons();
_menuContainer.addChild(_transition1);
buildBlackBorder();
buildSendToAFriend();
_menuContainer.addChild(_serverBusy);
_mainMenu.gotoAndPlay(2);
}
public function startRace3Animation(){
_gameSounds.startFadeMusic();
transitionBetweenMenus(_racePositions, _race3Animation, false);
addEventListener(Event.ENTER_FRAME, race3AnimationProgress);
}
public function clearRaceTimes():void{
_leagueMenu2.times_mc.name1.text = (_singleRaceMenu.times_mc.name1.text = "");
_leagueMenu2.times_mc.time1.text = (_singleRaceMenu.times_mc.time1.text = "");
_leagueMenu2.times_mc.name2.text = (_singleRaceMenu.times_mc.name2.text = "");
_leagueMenu2.times_mc.time2.text = (_singleRaceMenu.times_mc.time2.text = "");
_leagueMenu2.times_mc.name3.text = (_singleRaceMenu.times_mc.name3.text = "");
_leagueMenu2.times_mc.time3.text = (_singleRaceMenu.times_mc.time3.text = "");
}
public function blmMainMenu(_arg1:MouseEvent){
transitionBetweenMenus(_leagueMenu2, _mainMenu, false);
}
public function startNewGP(_arg1:MouseEvent){
Tracker.kvEvent(890);
_track = 1;
_ge.setTrack(1);
_ge.resetTournamentTimes();
_leagueRace = false;
_singleRace = false;
_tournamentRace = true;
_ge.setupGrandPrix();
transitionBetweenMenus(_singleRaceMenu, _difficultySelect, false);
}
public function setAmateur(_arg1:MouseEvent){
_ge.setDifficulty("easy");
_ge.setupGrandPrix();
transitionBetweenMenus(_difficultySelect, _colourMenu, false);
}
public function buildMainMenu():void{
_menuContainer.addChild(_mainMenu);
_mainMenu.singleRace_btn.addEventListener(MouseEvent.MOUSE_UP, playSingleRace);
_mainMenu.grandPrixMode_btn.addEventListener(MouseEvent.MOUSE_UP, playGrandPrix);
_mainMenu.enterCompetition_btn.addEventListener(MouseEvent.MOUSE_UP, enterCompetition);
_mainMenu.visitPartmaster_btn.addEventListener(MouseEvent.MOUSE_UP, visitPartmasterLink);
_mainMenu.createLeague_btn.addEventListener(MouseEvent.MOUSE_UP, createLeague);
}
public function loginMainMenu(_arg1:MouseEvent){
transitionBetweenMenus(_leagueMenu1, _mainMenu, false);
}
public function endGPSingleRace(_arg1:MouseEvent){
_ge.loadTournamentScores();
transitionBetweenMenus(_grandPrixFinished, _singleRaceMenu, false);
}
public function startRace5Animation(){
_gameSounds.startFadeMusic();
transitionBetweenMenus(_racePositions, _race5Animation, false);
addEventListener(Event.ENTER_FRAME, race5AnimationProgress);
}
public function showTAF(_arg1:MouseEvent){
_sendToFriend.gotoAndPlay(2);
}
public function compEntered(){
_enterCompetition.gotoAndStop(4);
}
public function buildModifyCarMenu():void{
_modifyMenu.plus1_btn.addEventListener(MouseEvent.MOUSE_UP, plus1);
_modifyMenu.minus1_btn.addEventListener(MouseEvent.MOUSE_UP, minus1);
_modifyMenu.plus2_btn.addEventListener(MouseEvent.MOUSE_UP, plus2);
_modifyMenu.minus2_btn.addEventListener(MouseEvent.MOUSE_UP, minus2);
_modifyMenu.plus3_btn.addEventListener(MouseEvent.MOUSE_UP, plus3);
_modifyMenu.minus3_btn.addEventListener(MouseEvent.MOUSE_UP, minus3);
_modifyMenu.next_btn.addEventListener(MouseEvent.MOUSE_UP, modifyNextButton);
_modifyMenu.mainMenu_btn.addEventListener(MouseEvent.MOUSE_UP, modifyQuitToMenu);
_menuContainer.addChild(_modifyMenu);
}
public function compPrivacy(_arg1:MouseEvent){
Tracker.kvClick(696);
URLUtil.openWindow("http://www.partmaster.co.uk/cgi-bin/staticbasic.pl?content=privacy");
}
public function loadLeagueScreen(){
_cookie = SharedObject.getLocal("pgpcookiedata");
_leagueMenu2.leagueText_mc.leagueName.text = _cookie.data.leaguename;
transitionBetweenMenus(_leagueMenu1, _leagueMenu2, false);
}
public function endRacePositions(_arg1, _arg2, _arg3, _arg4){
var _local5:*;
if (_leagueRace){
_ge.submitLeagueTime(_arg4);
};
if (((_tournamentRace) && ((_arg2 <= 3)))){
_ge.saveTournamentTimes(_arg4);
};
_endPositions = _arg1;
_ge.setPositions(_endPositions);
_local5 = 1;
while (_local5 <= 8) {
_racePositions[(("car" + [_local5]) + "_mc")].car_mc.gotoAndStop(_arg1[(_local5 - 1)].col);
if (_local5 != _arg2){
_racePositions.comPlayer_mc[("t" + _local5)].text = "computer";
} else {
_racePositions.comPlayer_mc[("t" + _local5)].text = "player";
};
_local5++;
};
_racePositions.lapTime.text = _arg3;
if (_leagueRace){
_racePositions.tryAgain_btn.y = 2000;
_racePositions.backToSingleRace_btn.y = 2000;
_racePositions.backToLeague_btn.y = 340;
_racePositions.nextRace_btn.y = 2000;
} else {
if (_singleRace){
_racePositions.tryAgain_btn.y = 2000;
_racePositions.backToSingleRace_btn.y = 340;
_racePositions.backToLeague_btn.y = 2000;
_racePositions.nextRace_btn.y = 2000;
} else {
if (_arg2 <= 3){
_racePositions.tryAgain_btn.y = 2000;
_racePositions.backToLeague_btn.y = 2000;
_racePositions.backToSingleRace_btn.y = 2000;
_racePositions.nextRace_btn.y = 340;
} else {
_racePositions.tryAgain_btn.y = 340;
_racePositions.nextRace_btn.y = 2000;
_racePositions.backToLeague_btn.y = 2000;
_racePositions.backToSingleRace_btn.y = 2000;
};
};
};
}
public function blmTrack1(_arg1:MouseEvent){
_singleRaceMenu.leagueText_mc.trackName.text = (_leagueMenu2.leagueText_mc.trackName.text = "THE OFFICE");
_leagueMenu2.glow_mc.gotoAndStop(1);
_singleRaceMenu.glow_mc.gotoAndStop(1);
_leagueMenu2.selectedLevel_mc.gotoAndStop(1);
_singleRaceMenu.selectedLevel_mc.gotoAndStop(1);
_track = 1;
_ge.setTrack(1);
displayTimes(1);
}
public function blmTrack2(_arg1:MouseEvent){
_singleRaceMenu.leagueText_mc.trackName.text = (_leagueMenu2.leagueText_mc.trackName.text = "THE GARDEN");
_leagueMenu2.glow_mc.gotoAndStop(2);
_singleRaceMenu.glow_mc.gotoAndStop(2);
_leagueMenu2.selectedLevel_mc.gotoAndStop(2);
_singleRaceMenu.selectedLevel_mc.gotoAndStop(2);
_track = 2;
_ge.setTrack(2);
displayTimes(2);
}
public function blmTrack3(_arg1:MouseEvent){
_singleRaceMenu.leagueText_mc.trackName.text = (_leagueMenu2.leagueText_mc.trackName.text = "THE BEDROOM");
_leagueMenu2.glow_mc.gotoAndStop(3);
_singleRaceMenu.glow_mc.gotoAndStop(3);
_leagueMenu2.selectedLevel_mc.gotoAndStop(3);
_singleRaceMenu.selectedLevel_mc.gotoAndStop(3);
_track = 3;
_ge.setTrack(3);
displayTimes(3);
}
public function inviteBack(_arg1:MouseEvent){
transitionBetweenMenus(_leagueMenu4, _leagueMenu2, false);
}
public function difficultyMainMenu(_arg1:MouseEvent){
transitionBetweenMenus(_difficultySelect, _mainMenu, false);
}
public function GPcompAlreadyEntered(){
_grandPrixFinished.gotoAndStop(5);
}
public function blmTrack5(_arg1:MouseEvent){
_singleRaceMenu.leagueText_mc.trackName.text = (_leagueMenu2.leagueText_mc.trackName.text = "THE KITCHEN");
_leagueMenu2.glow_mc.gotoAndStop(5);
_singleRaceMenu.glow_mc.gotoAndStop(5);
_leagueMenu2.selectedLevel_mc.gotoAndStop(5);
_singleRaceMenu.selectedLevel_mc.gotoAndStop(5);
_track = 5;
_ge.setTrack(5);
displayTimes(5);
}
public function racePosMainMenu(_arg1:MouseEvent){
if (_tournamentRace){
_racePositionsQuit = true;
_quitMenu.gotoAndStop(2);
} else {
transitionBetweenMenus(_racePositions, _mainMenu, false);
removeModifyPoints();
};
}
public function displayTimes(_arg1){
clearRaceTimes();
_leagueMenu2.times_mc.time4.text = _covertTime.convertTime(_bestTrackTimes[(_arg1 - 1)]);
if (_leaguePositions[(_arg1 - 1)][0] != undefined){
_singleRaceMenu.times_mc.name1.text = (_leagueMenu2.times_mc.name1.text = _leaguePositions[(_arg1 - 1)][0].player_name.toUpperCase());
_singleRaceMenu.times_mc.time1.text = (_leagueMenu2.times_mc.time1.text = _covertTime.convertTime(_leaguePositions[(_arg1 - 1)][0].track_time));
};
if (_leaguePositions[(_arg1 - 1)][1] != undefined){
_singleRaceMenu.times_mc.name2.text = (_leagueMenu2.times_mc.name2.text = _leaguePositions[(_arg1 - 1)][1].player_name.toUpperCase());
_singleRaceMenu.times_mc.time2.text = (_leagueMenu2.times_mc.time2.text = _covertTime.convertTime(_leaguePositions[(_arg1 - 1)][1].track_time));
};
if (_leaguePositions[(_arg1 - 1)][2] != undefined){
_singleRaceMenu.times_mc.name3.text = (_leagueMenu2.times_mc.name3.text = _leaguePositions[(_arg1 - 1)][2].player_name.toUpperCase());
_singleRaceMenu.times_mc.time3.text = (_leagueMenu2.times_mc.time3.text = _covertTime.convertTime(_leaguePositions[(_arg1 - 1)][2].track_time));
};
}
public function playSingleRace(_arg1:MouseEvent):void{
_track = 1;
_leagueMenu2.glow_mc.gotoAndStop(1);
_singleRaceMenu.glow_mc.gotoAndStop(1);
_leagueMenu2.selectedLevel_mc.gotoAndStop(1);
_singleRaceMenu.selectedLevel_mc.gotoAndStop(1);
_ge.setTrack(1);
_leagueRace = false;
_singleRace = true;
_tournamentRace = false;
_ge.loadTournamentScores();
_ge.setDifficulty("easy");
transitionBetweenMenus(_mainMenu, _singleRaceMenu, false);
_ge.setupGrandPrix();
}
public function playTransition():void{
_transition1.gotoAndPlay(2);
}
public function singleBeginRace(_arg1:MouseEvent){
removeModifyPoints();
setModifyPoints();
transitionBetweenMenus(_singleRaceMenu, _modifyMenu, false);
}
public function inviteMoreFriends(){
_leagueMenu4.gotoAndStop(4);
}
public function blmTrack4(_arg1:MouseEvent){
_singleRaceMenu.leagueText_mc.trackName.text = (_leagueMenu2.leagueText_mc.trackName.text = "THE LOUNGE");
_leagueMenu2.glow_mc.gotoAndStop(4);
_singleRaceMenu.glow_mc.gotoAndStop(4);
_leagueMenu2.selectedLevel_mc.gotoAndStop(4);
_singleRaceMenu.selectedLevel_mc.gotoAndStop(4);
_track = 4;
_ge.setTrack(4);
displayTimes(4);
}
public function buildBlackBorder(){
_blackBorder.partmasterLink_btn.addEventListener(MouseEvent.MOUSE_UP, visitPartmasterLink);
_blackBorder.partmasterLink1_btn.addEventListener(MouseEvent.MOUSE_UP, visitPartmasterLink);
_blackBorder.kokoLink_btn.addEventListener(MouseEvent.MOUSE_UP, visitKokoLink);
_blackBorder.visitpartmaster_btn.addEventListener(MouseEvent.MOUSE_UP, visitPartmasterLink);
_blackBorder.taf_btn.addEventListener(MouseEvent.MOUSE_UP, showTAF);
_menuContainer.addChild(_blackBorder);
_blackBorder.gotoAndPlay(2);
}
public function minus1(_arg1:MouseEvent):void{
var _local2:*;
if (_points[0] > 1){
_local2 = _points[0];
_local2--;
_points[0] = _local2;
};
}
public function minus2(_arg1:MouseEvent):void{
var _local2:*;
if (_points[1] > 1){
_local2 = _points[1];
_local2--;
_points[1] = _local2;
};
}
public function minus3(_arg1:MouseEvent):void{
var _local2:*;
if (_points[2] > 1){
_local2 = _points[2];
_local2--;
_points[2] = _local2;
};
}
public function setPointsLeft(_arg1:Event){
var _local2:*;
if (((((((!((_points[0] == null))) && (!((_points[1] == null))))) && (!((_points[2] == null))))) && (!((_points[3] == null))))){
_local2 = (_points[3] - ((_points[0] + _points[1]) + _points[2]));
};
if (_local2 != null){
if (_local2 < 10){
if (_local2 != 0){
_local2 = ("0" + _local2);
};
};
};
if (((((((!((_modifyMenu.speed_mc == null))) && (!((_modifyMenu.acceleration_mc == null))))) && (!((_modifyMenu.handling_mc == null))))) && (!((_modifyMenu.pointsLeft.text == null))))){
_modifyMenu.pointsLeft.text = _local2;
_modifyMenu.speed_mc.gotoAndStop(_points[0]);
_modifyMenu.acceleration_mc.gotoAndStop(_points[1]);
_modifyMenu.handling_mc.gotoAndStop(_points[2]);
};
}
public function buildDifficultyMenu(){
_difficultySelect.amateur_btn.addEventListener(MouseEvent.MOUSE_UP, setAmateur);
_difficultySelect.pro_btn.addEventListener(MouseEvent.MOUSE_UP, setPro);
_difficultySelect.mainMenu_btn.addEventListener(MouseEvent.MOUSE_UP, difficultyMainMenu);
_menuContainer.addChild(_difficultySelect);
}
public function enterCompetition(_arg1:MouseEvent):void{
transitionBetweenMenus(_mainMenu, _enterCompetition, false);
}
public function createLeagueBack(_arg1:MouseEvent){
transitionBetweenMenus(_leagueMenu3, _leagueMenu1, false);
}
public function startMenuMusic():void{
_gameSounds.stopMusic();
_gameSounds.startMenuMusic();
_runFunction = "";
}
public function buildColourSelector():void{
_colourMenu.col1.addEventListener(MouseEvent.MOUSE_UP, colour1);
_colourMenu.col2.addEventListener(MouseEvent.MOUSE_UP, colour2);
_colourMenu.col3.addEventListener(MouseEvent.MOUSE_UP, colour3);
_colourMenu.col4.addEventListener(MouseEvent.MOUSE_UP, colour4);
_colourMenu.col5.addEventListener(MouseEvent.MOUSE_UP, colour5);
_colourMenu.col6.addEventListener(MouseEvent.MOUSE_UP, colour6);
_colourMenu.col7.addEventListener(MouseEvent.MOUSE_UP, colour7);
_colourMenu.col8.addEventListener(MouseEvent.MOUSE_UP, colour8);
_colourMenu.next_btn.addEventListener(MouseEvent.MOUSE_UP, colourNextButton);
_colourMenu.mainMenu_btn.addEventListener(MouseEvent.MOUSE_UP, colourMainMenu);
_menuContainer.addChild(_colourMenu);
}
public function visitPartmasterLink(_arg1:MouseEvent):void{
Tracker.kvClick(694);
URLUtil.openWindow("http://www.partmaster.co.uk");
}
public function serverBusy(){
Tracker.kvEvent(911);
_serverBusy.gotoAndPlay(2);
}
public function createNewLeagueButtonPress(_arg1:MouseEvent){
transitionBetweenMenus(_leagueMenu1, _leagueMenu3, false);
}
public function plus3(_arg1:MouseEvent):void{
var _local2:*;
if ((((checkPoints() > 0)) && ((_points[2] < 10)))){
_local2 = _points[2];
_local2++;
_points[2] = _local2;
};
}
public function setModifyPoints(){
_points = _ge.returnPoints();
_modifyMenu.addEventListener(Event.ENTER_FRAME, setPointsLeft);
}
public function colour2(_arg1:MouseEvent):void{
_modifyMenu.car_mc.gotoAndStop(2);
_colourMenu.car_mc.gotoAndStop(2);
}
public function colour3(_arg1:MouseEvent):void{
_modifyMenu.car_mc.gotoAndStop(3);
_colourMenu.car_mc.gotoAndStop(3);
}
public function colour4(_arg1:MouseEvent):void{
_modifyMenu.car_mc.gotoAndStop(4);
_colourMenu.car_mc.gotoAndStop(4);
}
public function colour5(_arg1:MouseEvent):void{
_modifyMenu.car_mc.gotoAndStop(5);
_colourMenu.car_mc.gotoAndStop(5);
}
public function transitionBetweenMenus(_arg1, _arg2, _arg3){
playTransition();
_hideMenu = _arg1;
_showMenu = _arg2;
if (_arg3){
_ge.setupGame();
_gameSounds.setScreech();
};
addEventListener(Event.ENTER_FRAME, hideMenu);
}
public function plus1(_arg1:MouseEvent):void{
var _local2:*;
if ((((checkPoints() > 0)) && ((_points[0] < 10)))){
_local2 = _points[0];
_local2++;
_points[0] = _local2;
};
}
public function plus2(_arg1:MouseEvent):void{
var _local2:*;
if ((((checkPoints() > 0)) && ((_points[1] < 10)))){
_local2 = _points[1];
_local2++;
_points[1] = _local2;
};
}
public function colour6(_arg1:MouseEvent):void{
_modifyMenu.car_mc.gotoAndStop(6);
_colourMenu.car_mc.gotoAndStop(6);
}
public function colour7(_arg1:MouseEvent):void{
_modifyMenu.car_mc.gotoAndStop(7);
_colourMenu.car_mc.gotoAndStop(7);
}
public function inviteLogout(_arg1:MouseEvent){
_ge.clearLeagueCookie();
transitionBetweenMenus(_leagueMenu4, _leagueMenu1, false);
}
public function colour1(_arg1:MouseEvent):void{
_modifyMenu.car_mc.gotoAndStop(1);
_colourMenu.car_mc.gotoAndStop(1);
}
public function createServerBusy(){
Tracker.kvEvent(911);
_leagueMenu3.gotoAndStop(4);
}
public function joinLeague(_arg1:MouseEvent){
var _local2:*;
_local2 = new Object();
_local2.v1 = "league_join";
_local2.v2 = _ge.returnToken();
_local2.v3 = _leagueMenu1.leagueid.text;
_local2.v4 = _leagueMenu1.email.text;
_local2.v5 = _leagueMenu1.nickname.text;
_ge.sendLeagueID(_local2, _ge.loadLeagueData);
}
public function hideMenu(_arg1:Event){
if (checkTransition()){
if (_hideMenu != "none"){
_hideMenu.gotoAndStop(1);
};
if (_showMenu != "none"){
_showMenu.gotoAndPlay(2);
};
if (_modifyMenu.modifyExplanation.currentFrame == 2){
};
_runFunction;
_runFunction = "";
_quitMenu.gotoAndStop(1);
removeEventListener(Event.ENTER_FRAME, hideMenu);
};
}
public function endGPMainMenu(_arg1:MouseEvent){
transitionBetweenMenus(_grandPrixFinished, _mainMenu, false);
}
}
}//package micromachines
Section 20
//PlayersCar (micromachines.PlayersCar)
package micromachines {
import flash.display.*;
import flash.events.*;
import koko.*;
public class PlayersCar extends MovieClip {
private static var speed = 10;
public function PlayersCar(){
addEventListener(Event.ENTER_FRAME, moveCar);
}
public function moveCar(_arg1:Event){
if (ArrowKeys.leftArrow){
this.x = (this.x - speed);
} else {
if (ArrowKeys.rightArrow){
this.x = (this.x + speed);
};
};
if (ArrowKeys.upArrow){
this.y = (this.y - speed);
} else {
if (ArrowKeys.downArrow){
this.y = (this.y + speed);
};
};
}
}
}//package micromachines
Section 21
//blackBorder1_159 (partmastergp_fla.blackBorder1_159)
package partmastergp_fla {
import flash.display.*;
public dynamic class blackBorder1_159 extends MovieClip {
public function blackBorder1_159(){
addFrameScript(9, frame10);
}
function frame10(){
stop();
}
}
}//package partmastergp_fla
Section 22
//breakingNews_17 (partmastergp_fla.breakingNews_17)
package partmastergp_fla {
import flash.display.*;
public dynamic class breakingNews_17 extends MovieClip {
public var newsTicker_mc:MovieClip;
public function breakingNews_17(){
addFrameScript(0, frame1);
}
function frame1(){
newsTicker_mc.gotoAndPlay(Math.ceil((Math.random() * 600)));
}
}
}//package partmastergp_fla
Section 23
//caeSelector_122 (partmastergp_fla.caeSelector_122)
package partmastergp_fla {
import flash.display.*;
public dynamic class caeSelector_122 extends MovieClip {
public function caeSelector_122(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package partmastergp_fla
Section 24
//carHolder_88 (partmastergp_fla.carHolder_88)
package partmastergp_fla {
import flash.display.*;
public dynamic class carHolder_88 extends MovieClip {
public function carHolder_88(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package partmastergp_fla
Section 25
//comPlayer_141 (partmastergp_fla.comPlayer_141)
package partmastergp_fla {
import flash.display.*;
import flash.text.*;
public dynamic class comPlayer_141 extends MovieClip {
public var t2:TextField;
public var t3:TextField;
public var t7:TextField;
public var t1:TextField;
public var t5:TextField;
public var t8:TextField;
public var t4:TextField;
public var t6:TextField;
}
}//package partmastergp_fla
Section 26
//gameover_27 (partmastergp_fla.gameover_27)
package partmastergp_fla {
import flash.display.*;
public dynamic class gameover_27 extends MovieClip {
public function gameover_27(){
addFrameScript(880, frame881);
}
function frame881(){
stop();
}
}
}//package partmastergp_fla
Section 27
//glow_52 (partmastergp_fla.glow_52)
package partmastergp_fla {
import flash.display.*;
public dynamic class glow_52 extends MovieClip {
public function glow_52(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package partmastergp_fla
Section 28
//kokoIntro_153 (partmastergp_fla.kokoIntro_153)
package partmastergp_fla {
import flash.display.*;
import flash.events.*;
import flash.net.*;
public dynamic class kokoIntro_153 extends MovieClip {
public var koko_btn:SimpleButton;
public function kokoIntro_153(){
addFrameScript(60, frame61, 116, frame117);
}
public function kokoDigital(_arg1:MouseEvent){
navigateToURL(new URLRequest("http://www.kokodigital.co.uk"), "_blank");
}
function frame117(){
MovieClip(parent).play();
stop();
}
function frame61(){
koko_btn.addEventListener(MouseEvent.MOUSE_UP, kokoDigital);
}
}
}//package partmastergp_fla
Section 29
//KokoLeaf_157 (partmastergp_fla.KokoLeaf_157)
package partmastergp_fla {
import flash.display.*;
public dynamic class KokoLeaf_157 extends MovieClip {
public function KokoLeaf_157(){
addFrameScript(77, frame78);
}
function frame78(){
stop();
}
}
}//package partmastergp_fla
Section 30
//KokoLeafUp_154 (partmastergp_fla.KokoLeafUp_154)
package partmastergp_fla {
import flash.display.*;
public dynamic class KokoLeafUp_154 extends MovieClip {
public function KokoLeafUp_154(){
addFrameScript(84, frame85);
}
function frame85(){
stop();
}
}
}//package partmastergp_fla
Section 31
//lap_96 (partmastergp_fla.lap_96)
package partmastergp_fla {
import flash.display.*;
public dynamic class lap_96 extends MovieClip {
public function lap_96(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package partmastergp_fla
Section 32
//leagueText_48 (partmastergp_fla.leagueText_48)
package partmastergp_fla {
import flash.display.*;
import flash.text.*;
public dynamic class leagueText_48 extends MovieClip {
public var leagueName:TextField;
public var trackName:TextField;
}
}//package partmastergp_fla
Section 33
//leagueText1_67 (partmastergp_fla.leagueText1_67)
package partmastergp_fla {
import flash.display.*;
import flash.text.*;
public dynamic class leagueText1_67 extends MovieClip {
public var trackName:TextField;
}
}//package partmastergp_fla
Section 34
//levelSelectOverlay_65 (partmastergp_fla.levelSelectOverlay_65)
package partmastergp_fla {
import flash.display.*;
public dynamic class levelSelectOverlay_65 extends MovieClip {
public var track_mc:MovieClip;
}
}//package partmastergp_fla
Section 35
//MainTimeline (partmastergp_fla.MainTimeline)
package partmastergp_fla {
import flash.display.*;
import flash.events.*;
import com.memecounter.*;
import koko.*;
import flash.net.*;
import micromachines.*;
import flash.system.*;
public dynamic class MainTimeline extends MovieClip {
public var needle_mc:MovieClip;
public var request:URLRequest;
public var target_root:SetStage;
public var gameEngine:GameEngine;
public var myLoader:Loader;
public function MainTimeline(){
addFrameScript(0, frame1, 2, frame3, 12, frame13);
}
function frame3(){
stop();
}
function frame1(){
MochiBot.track(this, "206a93fd");
Tracker.init(409, root);
request = new URLRequest("http://www.viralchart.com/tracker.php?media=805&f=F");
request.method = URLRequestMethod.GET;
sendToURL(request);
myLoader = new Loader();
myLoader.contentLoaderInfo.addEventListener(Event.OPEN, showPreloader);
myLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, showLoadResult);
addEventListener(Event.ENTER_FRAME, preloader);
Security.loadPolicyFile("http://www.viral-game.co.uk/crossdomain.xml");
Security.loadPolicyFile("http://partmastergp.viral-game.co.uk/crossdomain.xml");
Security.allowDomain("*");
stop();
}
function frame13(){
target_root = new SetStage(this);
gameEngine = new GameEngine();
gameEngine.buildGameEngine();
stop();
}
public function preloader(_arg1:Event):void{
var _local2:*;
var _local3:*;
var _local4:int;
_local2 = stage.loaderInfo.bytesTotal;
_local3 = stage.loaderInfo.bytesLoaded;
_local4 = (_local3 * (220 / _local2));
needle_mc.rotation = (-110 + _local4);
if (_local4 >= 215){
removeEventListener(Event.ENTER_FRAME, preloader);
gotoAndPlay(2);
};
}
public function showLoadResult(_arg1:Event){
}
public function showPreloader(_arg1:Event){
stop();
}
}
}//package partmastergp_fla
Section 36
//performanceIndicators_125 (partmastergp_fla.performanceIndicators_125)
package partmastergp_fla {
import flash.display.*;
public dynamic class performanceIndicators_125 extends MovieClip {
public var col1:MovieClip;
public var col3:MovieClip;
public function performanceIndicators_125(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package partmastergp_fla
Section 37
//position_95 (partmastergp_fla.position_95)
package partmastergp_fla {
import flash.display.*;
public dynamic class position_95 extends MovieClip {
public function position_95(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package partmastergp_fla
Section 38
//race2a_21 (partmastergp_fla.race2a_21)
package partmastergp_fla {
import flash.display.*;
public dynamic class race2a_21 extends MovieClip {
public function race2a_21(){
addFrameScript(510, frame511);
}
function frame511(){
stop();
}
}
}//package partmastergp_fla
Section 39
//race2BContainmer_130 (partmastergp_fla.race2BContainmer_130)
package partmastergp_fla {
import flash.display.*;
public dynamic class race2BContainmer_130 extends MovieClip {
public var ani_mc:MovieClip;
public function race2BContainmer_130(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
ani_mc.gotoAndPlay(1);
stop();
}
}
}//package partmastergp_fla
Section 40
//race3_12 (partmastergp_fla.race3_12)
package partmastergp_fla {
import flash.display.*;
public dynamic class race3_12 extends MovieClip {
public function race3_12(){
addFrameScript(764, frame765);
}
function frame765(){
stop();
}
}
}//package partmastergp_fla
Section 41
//race4_23 (partmastergp_fla.race4_23)
package partmastergp_fla {
import flash.display.*;
public dynamic class race4_23 extends MovieClip {
public function race4_23(){
addFrameScript(685, frame686);
}
function frame686(){
stop();
}
}
}//package partmastergp_fla
Section 42
//race5_25 (partmastergp_fla.race5_25)
package partmastergp_fla {
import flash.display.*;
public dynamic class race5_25 extends MovieClip {
public function race5_25(){
addFrameScript(746, frame747);
}
function frame747(){
stop();
}
}
}//package partmastergp_fla
Section 43
//spriteHolder_9 (partmastergp_fla.spriteHolder_9)
package partmastergp_fla {
import flash.display.*;
public dynamic class spriteHolder_9 extends MovieClip {
public function spriteHolder_9(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package partmastergp_fla
Section 44
//tickBox_32 (partmastergp_fla.tickBox_32)
package partmastergp_fla {
import flash.display.*;
public dynamic class tickBox_32 extends MovieClip {
public function tickBox_32(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package partmastergp_fla
Section 45
//timeHolder_51 (partmastergp_fla.timeHolder_51)
package partmastergp_fla {
import flash.display.*;
import flash.text.*;
public dynamic class timeHolder_51 extends MovieClip {
public var time1:TextField;
public var time2:TextField;
public var name1:TextField;
public var name3:TextField;
public var time3:TextField;
public var name2:TextField;
public var time4:TextField;
}
}//package partmastergp_fla
Section 46
//Timeline_14 (partmastergp_fla.Timeline_14)
package partmastergp_fla {
import flash.display.*;
public dynamic class Timeline_14 extends MovieClip {
public function Timeline_14(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package partmastergp_fla
Section 47
//blackBorder (blackBorder)
package {
import flash.display.*;
public dynamic class blackBorder extends MovieClip {
public var visitpartmaster_btn:SimpleButton;
public var kokoLink_btn:SimpleButton;
public var taf_btn:SimpleButton;
public var partmasterLink_btn:SimpleButton;
public var partmasterLink1_btn:SimpleButton;
public function blackBorder(){
addFrameScript(9, frame10, 10, frame11);
}
function frame10(){
stop();
}
function frame11(){
stop();
}
}
}//package
Section 48
//bMap1 (bMap1)
package {
import flash.display.*;
public dynamic class bMap1 extends BitmapData {
public function bMap1(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 49
//bMap2 (bMap2)
package {
import flash.display.*;
public dynamic class bMap2 extends BitmapData {
public function bMap2(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 50
//bMap3 (bMap3)
package {
import flash.display.*;
public dynamic class bMap3 extends BitmapData {
public function bMap3(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 51
//bMap4 (bMap4)
package {
import flash.display.*;
public dynamic class bMap4 extends BitmapData {
public function bMap4(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 52
//bMap5 (bMap5)
package {
import flash.display.*;
public dynamic class bMap5 extends BitmapData {
public function bMap5(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 53
//bump (bump)
package {
import flash.media.*;
public dynamic class bump extends Sound {
}
}//package
Section 54
//Car1 (Car1)
package {
import flash.display.*;
public dynamic class Car1 extends MovieClip {
public var car_mc:MovieClip;
public function Car1(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 26, frame27, 43, frame44, 71, frame72, 86, frame87, 98, frame99);
}
function frame72(){
gotoAndStop(2);
}
function frame87(){
gotoAndStop(2);
}
function frame3(){
prevFrame();
}
function frame1(){
stop();
}
function frame2(){
stop();
}
function frame27(){
gotoAndPlay("reform");
}
function frame99(){
gotoAndStop(2);
}
function frame44(){
gotoAndStop(2);
}
}
}//package
Section 55
//Car2 (Car2)
package {
import flash.display.*;
public dynamic class Car2 extends BitmapData {
public function Car2(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 56
//carColourMenu (carColourMenu)
package {
import flash.display.*;
public dynamic class carColourMenu extends MovieClip {
public var next_btn:SimpleButton;
public var mainMenu_btn:SimpleButton;
public var col3:SimpleButton;
public var col5:SimpleButton;
public var col7:SimpleButton;
public var col2:SimpleButton;
public var col4:SimpleButton;
public var col6:SimpleButton;
public var col1:SimpleButton;
public var col8:SimpleButton;
public var car_mc:MovieClip;
public function carColourMenu(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package
Section 57
//carFall (carFall)
package {
import flash.media.*;
public dynamic class carFall extends Sound {
}
}//package
Section 58
//confirmQuit (confirmQuit)
package {
import flash.display.*;
public dynamic class confirmQuit extends MovieClip {
public var yes_btn:SimpleButton;
public var no_btn:SimpleButton;
public function confirmQuit(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 59
//createALeague (createALeague)
package {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.net.*;
import flash.media.*;
import flash.text.*;
import flash.utils.*;
import flash.system.*;
import flash.external.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class createALeague extends MovieClip {
public var mainMenu_btn:SimpleButton;
public var nickname:TextField;
public var createLeague_btn:SimpleButton;
public var leagueid:TextField;
public var login_btn:SimpleButton;
public var email:TextField;
public function createALeague(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
leagueid.tabIndex = 201;
email.tabIndex = 202;
nickname.tabIndex = 203;
email.addEventListener(Event.CHANGE, textChanged);
stop();
}
public function textChanged(_arg1:Event):void{
var _local2:String;
_local2 = _arg1.target.text.slice((_arg1.target.text.length - 1), _arg1.target.text.length);
if (_local2 == "\""){
_arg1.target.text = (_arg1.target.text.slice(0, (_arg1.target.text.length - 1)) + "@");
};
}
}
}//package
Section 60
//createALeague1 (createALeague1)
package {
import flash.display.*;
public dynamic class createALeague1 extends MovieClip {
public var selectedLevel_mc:MovieClip;
public var track1_btn:SimpleButton;
public var invite_btn:SimpleButton;
public var logout_btn:SimpleButton;
public var times_mc:MovieClip;
public var track4_btn:SimpleButton;
public var track2_btn:SimpleButton;
public var mainMenu_btn:SimpleButton;
public var glow_mc:MovieClip;
public var beginRace_btn:SimpleButton;
public var leagueText_mc:MovieClip;
public var track3_btn:SimpleButton;
public var track5_btn:SimpleButton;
public function createALeague1(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
beginRace_btn.tabIndex = 6;
invite_btn.tabIndex = 8;
logout_btn.tabIndex = 9;
mainMenu_btn.tabIndex = 7;
stop();
}
}
}//package
Section 61
//createALeague2 (createALeague2)
package {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.net.*;
import flash.media.*;
import flash.text.*;
import flash.utils.*;
import flash.system.*;
import flash.external.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class createALeague2 extends MovieClip {
public var back_btn:SimpleButton;
public var mainMenu_btn:SimpleButton;
public var nickname:TextField;
public var tickBox_mc:MovieClip;
public var create_btn:SimpleButton;
public var leaguename:TextField;
public var email:TextField;
public function createALeague2(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4);
}
function frame3(){
stop();
}
function frame1(){
stop();
}
function frame4(){
stop();
}
function frame2(){
leaguename.tabIndex = 301;
email.tabIndex = 302;
nickname.tabIndex = 303;
email.addEventListener(Event.CHANGE, textChanged);
stop();
}
public function textChanged(_arg1:Event):void{
var _local2:String;
_local2 = _arg1.target.text.slice((_arg1.target.text.length - 1), _arg1.target.text.length);
if (_local2 == "\""){
_arg1.target.text = (_arg1.target.text.slice(0, (_arg1.target.text.length - 1)) + "@");
};
}
}
}//package
Section 62
//createALeague3 (createALeague3)
package {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.net.*;
import flash.media.*;
import flash.text.*;
import flash.utils.*;
import flash.system.*;
import flash.external.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class createALeague3 extends MovieClip {
public var back_btn:SimpleButton;
public var email3:TextField;
public var email6:TextField;
public var email1:TextField;
public var email2:TextField;
public var invite_btn:SimpleButton;
public var logout_btn:SimpleButton;
public var email4:TextField;
public var email5:TextField;
public function createALeague3(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4);
}
function frame3(){
stop();
}
function frame1(){
stop();
}
function frame4(){
email6.tabIndex = 406;
email5.tabIndex = 405;
email4.tabIndex = 404;
email3.tabIndex = 403;
email2.tabIndex = 402;
email1.tabIndex = 401;
email1.addEventListener(Event.CHANGE, textChanged);
email2.addEventListener(Event.CHANGE, textChanged);
email3.addEventListener(Event.CHANGE, textChanged);
email4.addEventListener(Event.CHANGE, textChanged);
email5.addEventListener(Event.CHANGE, textChanged);
email6.addEventListener(Event.CHANGE, textChanged);
stop();
}
function frame2(){
email6.tabIndex = 406;
email5.tabIndex = 405;
email4.tabIndex = 404;
email3.tabIndex = 403;
email2.tabIndex = 402;
email1.tabIndex = 401;
email1.addEventListener(Event.CHANGE, textChanged);
email2.addEventListener(Event.CHANGE, textChanged);
email3.addEventListener(Event.CHANGE, textChanged);
email4.addEventListener(Event.CHANGE, textChanged);
email5.addEventListener(Event.CHANGE, textChanged);
email6.addEventListener(Event.CHANGE, textChanged);
stop();
}
public function textChanged(_arg1:Event):void{
var _local2:String;
_local2 = _arg1.target.text.slice((_arg1.target.text.length - 1), _arg1.target.text.length);
if (_local2 == "\""){
_arg1.target.text = (_arg1.target.text.slice(0, (_arg1.target.text.length - 1)) + "@");
};
}
}
}//package
Section 63
//difficultySelect (difficultySelect)
package {
import flash.display.*;
public dynamic class difficultySelect extends MovieClip {
public var amateur_btn:SimpleButton;
public var mainMenu_btn:SimpleButton;
public var pro_btn:SimpleButton;
public function difficultySelect(){
addFrameScript(0, frame1, 24, frame25);
}
function frame1(){
stop();
}
function frame25(){
stop();
}
}
}//package
Section 64
//enterCompetition (enterCompetition)
package {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.net.*;
import flash.media.*;
import flash.text.*;
import flash.utils.*;
import flash.system.*;
import flash.external.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class enterCompetition extends MovieClip {
public var playerName:TextField;
public var privacy_btn:SimpleButton;
public var mainMenu_btn:SimpleButton;
public var terms_btn:SimpleButton;
public var submit_btn:SimpleButton;
public var email:TextField;
public function enterCompetition(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5);
}
function frame3(){
stop();
}
function frame1(){
stop();
}
function frame4(){
stop();
}
function frame2(){
terms_btn.tabIndex = 504;
privacy_btn.tabIndex = 505;
playerName.tabIndex = 501;
email.tabIndex = 502;
submit_btn.tabIndex = 503;
mainMenu_btn.tabIndex = 506;
email.addEventListener(Event.CHANGE, textChanged);
stop();
}
function frame5(){
terms_btn.tabIndex = 504;
privacy_btn.tabIndex = 505;
playerName.tabIndex = 501;
email.tabIndex = 502;
submit_btn.tabIndex = 503;
email.addEventListener(Event.CHANGE, textChanged);
stop();
}
public function textChanged(_arg1:Event):void{
var _local2:String;
_local2 = _arg1.target.text.slice((_arg1.target.text.length - 1), _arg1.target.text.length);
if (_local2 == "\""){
_arg1.target.text = (_arg1.target.text.slice(0, (_arg1.target.text.length - 1)) + "@");
};
}
}
}//package
Section 65
//explode (explode)
package {
import flash.media.*;
public dynamic class explode extends Sound {
}
}//package
Section 66
//gameScreenPositions (gameScreenPositions)
package {
import flash.display.*;
import flash.text.*;
public dynamic class gameScreenPositions extends MovieClip {
public var currentTime1:TextField;
public var restart_race_btn:SimpleButton;
public var mainMenu_btn:SimpleButton;
public var pos_mc:MovieClip;
public var lap_mc:MovieClip;
public var currentTime:TextField;
public function gameScreenPositions(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 67
//grandPrixFinished (grandPrixFinished)
package {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.net.*;
import flash.media.*;
import flash.text.*;
import flash.utils.*;
import flash.system.*;
import flash.external.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class grandPrixFinished extends MovieClip {
public var playerName:TextField;
public var privacy_btn:SimpleButton;
public var mainMenu_btn:SimpleButton;
public var terms_btn:SimpleButton;
public var submit_btn:SimpleButton;
public var email:TextField;
public var viewTimes_btn:SimpleButton;
public function grandPrixFinished(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5);
}
function frame3(){
stop();
}
function frame1(){
stop();
}
function frame4(){
stop();
}
function frame2(){
playerName.tabIndex = 601;
email.tabIndex = 602;
email.addEventListener(Event.CHANGE, textChanged);
stop();
}
function frame5(){
stop();
}
public function textChanged(_arg1:Event):void{
var _local2:String;
_local2 = _arg1.target.text.slice((_arg1.target.text.length - 1), _arg1.target.text.length);
if (_local2 == "\""){
_arg1.target.text = (_arg1.target.text.slice(0, (_arg1.target.text.length - 1)) + "@");
};
}
}
}//package
Section 68
//MainMenu (MainMenu)
package {
import flash.display.*;
public dynamic class MainMenu extends MovieClip {
public var enterCompetition_btn:SimpleButton;
public var singleRace_btn:SimpleButton;
public var visitPartmaster_btn:SimpleButton;
public var createLeague_btn:SimpleButton;
public var grandPrixMode_btn:SimpleButton;
public function MainMenu(){
addFrameScript(0, frame1, 62, frame63);
}
function frame1(){
stop();
}
function frame63(){
stop();
}
}
}//package
Section 69
//Map (Map)
package {
import flash.display.*;
public dynamic class Map extends BitmapData {
public function Map(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 70
//Map1 (Map1)
package {
import flash.display.*;
public dynamic class Map1 extends BitmapData {
public function Map1(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 71
//Map2 (Map2)
package {
import flash.display.*;
public dynamic class Map2 extends BitmapData {
public function Map2(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 72
//Map3 (Map3)
package {
import flash.display.*;
public dynamic class Map3 extends BitmapData {
public function Map3(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 73
//Map4 (Map4)
package {
import flash.display.*;
public dynamic class Map4 extends BitmapData {
public function Map4(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 74
//MapUpper (MapUpper)
package {
import flash.display.*;
public dynamic class MapUpper extends BitmapData {
public function MapUpper(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 75
//MapUpper1 (MapUpper1)
package {
import flash.display.*;
public dynamic class MapUpper1 extends BitmapData {
public function MapUpper1(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 76
//MapUpper2 (MapUpper2)
package {
import flash.display.*;
public dynamic class MapUpper2 extends BitmapData {
public function MapUpper2(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 77
//MapUpper3 (MapUpper3)
package {
import flash.display.*;
public dynamic class MapUpper3 extends BitmapData {
public function MapUpper3(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 78
//MapUpper4 (MapUpper4)
package {
import flash.display.*;
public dynamic class MapUpper4 extends BitmapData {
public function MapUpper4(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 79
//menuMusic (menuMusic)
package {
import flash.media.*;
public dynamic class menuMusic extends Sound {
}
}//package
Section 80
//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 81
//modifyCarMenu (modifyCarMenu)
package {
import flash.display.*;
import flash.text.*;
public dynamic class modifyCarMenu extends MovieClip {
public var next_btn:SimpleButton;
public var plus1_btn:SimpleButton;
public var handling_mc:MovieClip;
public var minus2_btn:SimpleButton;
public var mainMenu_btn:SimpleButton;
public var plus2_btn:SimpleButton;
public var pointsLeft:TextField;
public var speed_mc:MovieClip;
public var acceleration_mc:MovieClip;
public var minus1_btn:SimpleButton;
public var minus3_btn:SimpleButton;
public var car_mc:MovieClip;
public var plus3_btn:SimpleButton;
public var modifyExplanation:MovieClip;
public function modifyCarMenu(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package
Section 82
//race1 (race1)
package {
import flash.display.*;
public dynamic class race1 extends MovieClip {
public function race1(){
addFrameScript(292, frame293);
}
function frame293(){
stop();
}
}
}//package
Section 83
//race1Animation (race1Animation)
package {
import flash.display.*;
public dynamic class race1Animation extends MovieClip {
public var skip_btn:SimpleButton;
public var ani_mc:race1;
public function race1Animation(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
ani_mc.gotoAndPlay(1);
stop();
}
}
}//package
Section 84
//race2Animation (race2Animation)
package {
import flash.display.*;
public dynamic class race2Animation extends MovieClip {
public var skip_btn:SimpleButton;
public var ani_mc:MovieClip;
public function race2Animation(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
ani_mc.gotoAndPlay(1);
stop();
}
}
}//package
Section 85
//race3Animation (race3Animation)
package {
import flash.display.*;
public dynamic class race3Animation extends MovieClip {
public var skip_btn:SimpleButton;
public var ani_mc:MovieClip;
public function race3Animation(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
ani_mc.gotoAndPlay(1);
stop();
}
}
}//package
Section 86
//race4Animation (race4Animation)
package {
import flash.display.*;
public dynamic class race4Animation extends MovieClip {
public var skip_btn:SimpleButton;
public var ani_mc:MovieClip;
public function race4Animation(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
ani_mc.gotoAndPlay(1);
stop();
}
}
}//package
Section 87
//race5Animation (race5Animation)
package {
import flash.display.*;
public dynamic class race5Animation extends MovieClip {
public var skip_btn:SimpleButton;
public var ani_mc:MovieClip;
public function race5Animation(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
ani_mc.gotoAndPlay(2);
stop();
}
}
}//package
Section 88
//race6Animation (race6Animation)
package {
import flash.display.*;
public dynamic class race6Animation extends MovieClip {
public var skip_btn:SimpleButton;
public var ani_mc:MovieClip;
public function race6Animation(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
ani_mc.gotoAndPlay(1);
stop();
}
}
}//package
Section 89
//raceMusic (raceMusic)
package {
import flash.media.*;
public dynamic class raceMusic extends Sound {
}
}//package
Section 90
//racePositions (racePositions)
package {
import flash.display.*;
import flash.text.*;
public dynamic class racePositions extends MovieClip {
public var nextRace_btn:SimpleButton;
public var lapTime:TextField;
public var car6_mc:Car1;
public var comPlayer_mc:MovieClip;
public var car1_mc:Car1;
public var mainMenu_btn:SimpleButton;
public var car7_mc:Car1;
public var tryAgain_btn:SimpleButton;
public var car2_mc:Car1;
public var car4_mc:Car1;
public var backToLeague_btn:SimpleButton;
public var car5_mc:Car1;
public var backToSingleRace_btn:SimpleButton;
public var car8_mc:Car1;
public var car3_mc:Car1;
public function racePositions(){
addFrameScript(0, frame1, 48, frame49);
}
function frame1(){
stop();
}
function frame49(){
stop();
}
}
}//package
Section 91
//redCar (redCar)
package {
import flash.display.*;
public dynamic class redCar extends BitmapData {
public function redCar(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 92
//replaceCar (replaceCar)
package {
import flash.media.*;
public dynamic class replaceCar extends Sound {
}
}//package
Section 93
//rev1 (rev1)
package {
import flash.media.*;
public dynamic class rev1 extends Sound {
}
}//package
Section 94
//rev10 (rev10)
package {
import flash.media.*;
public dynamic class rev10 extends Sound {
}
}//package
Section 95
//rev2 (rev2)
package {
import flash.media.*;
public dynamic class rev2 extends Sound {
}
}//package
Section 96
//rev3 (rev3)
package {
import flash.media.*;
public dynamic class rev3 extends Sound {
}
}//package
Section 97
//rev4 (rev4)
package {
import flash.media.*;
public dynamic class rev4 extends Sound {
}
}//package
Section 98
//rev5 (rev5)
package {
import flash.media.*;
public dynamic class rev5 extends Sound {
}
}//package
Section 99
//rev6 (rev6)
package {
import flash.media.*;
public dynamic class rev6 extends Sound {
}
}//package
Section 100
//rev7 (rev7)
package {
import flash.media.*;
public dynamic class rev7 extends Sound {
}
}//package
Section 101
//rev8 (rev8)
package {
import flash.media.*;
public dynamic class rev8 extends Sound {
}
}//package
Section 102
//rev9 (rev9)
package {
import flash.media.*;
public dynamic class rev9 extends Sound {
}
}//package
Section 103
//screech (screech)
package {
import flash.media.*;
public dynamic class screech extends Sound {
}
}//package
Section 104
//sendToFriend (sendToFriend)
package {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.net.*;
import flash.media.*;
import flash.text.*;
import flash.utils.*;
import flash.system.*;
import flash.external.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class sendToFriend extends MovieClip {
public var send_btn:SimpleButton;
public var yourEmail:TextField;
public var friendName:TextField;
public var yourName:TextField;
public var close_btn:SimpleButton;
public var friendEmail:TextField;
public function sendToFriend(){
addFrameScript(0, frame1, 4, frame5, 9, frame10, 10, frame11);
}
function frame10(){
yourEmail.addEventListener(Event.CHANGE, textChanged);
friendEmail.addEventListener(Event.CHANGE, textChanged);
stop();
}
function frame1(){
stop();
}
function frame5(){
yourName.tabIndex = 100;
yourEmail.tabIndex = 101;
friendName.tabIndex = 102;
friendEmail.tabIndex = 103;
}
function frame11(){
stop();
}
public function textChanged(_arg1:Event):void{
var _local2:String;
_local2 = _arg1.target.text.slice((_arg1.target.text.length - 1), _arg1.target.text.length);
if (_local2 == "\""){
_arg1.target.text = (_arg1.target.text.slice(0, (_arg1.target.text.length - 1)) + "@");
};
}
}
}//package
Section 105
//serverBusy (serverBusy)
package {
import flash.display.*;
public dynamic class serverBusy extends MovieClip {
public function serverBusy(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 106
//singleRaceMenu (singleRaceMenu)
package {
import flash.display.*;
public dynamic class singleRaceMenu extends MovieClip {
public var selectedLevel_mc:MovieClip;
public var track1_btn:SimpleButton;
public var invite_btn:SimpleButton;
public var logout_btn:SimpleButton;
public var times_mc:MovieClip;
public var track4_btn:SimpleButton;
public var track2_btn:SimpleButton;
public var mainMenu_btn:SimpleButton;
public var glow_mc:MovieClip;
public var beginRace_btn:SimpleButton;
public var leagueText_mc:MovieClip;
public var track3_btn:SimpleButton;
public var startGP_btn:SimpleButton;
public var track5_btn:SimpleButton;
public function singleRaceMenu(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package
Section 107
//Skid (Skid)
package {
import flash.display.*;
public dynamic class Skid extends BitmapData {
public function Skid(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 108
//tokenMC (tokenMC)
package {
import flash.display.*;
import flash.text.*;
public dynamic class tokenMC extends MovieClip {
public var token:TextField;
}
}//package
Section 109
//trafficLights (trafficLights)
package {
import flash.display.*;
public dynamic class trafficLights extends MovieClip {
public function trafficLights(){
addFrameScript(0, frame1, 119, frame120);
}
function frame1(){
stop();
}
function frame120(){
stop();
}
}
}//package
Section 110
//transition (transition)
package {
import flash.display.*;
public dynamic class transition extends MovieClip {
public function transition(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package