Section 1
//SHA1 (com.adobe.crypto.SHA1)
package com.adobe.crypto {
import flash.utils.*;
import com.adobe.utils.*;
public class SHA1 {
private static function hashBlocks(_arg1:Array):ByteArray{
var _local2:int;
var _local3:int;
var _local4:int;
var _local5:int;
var _local6:int;
var _local7:int;
var _local8:Array;
var _local9:int;
var _local10:ByteArray;
var _local11:int;
var _local12:int;
var _local13:int;
var _local14:int;
var _local15:int;
var _local16:int;
var _local17:int;
_local2 = 1732584193;
_local3 = 4023233417;
_local4 = 2562383102;
_local5 = 271733878;
_local6 = 3285377520;
_local7 = _arg1.length;
_local8 = new Array(80);
_local9 = 0;
while (_local9 < _local7) {
_local11 = _local2;
_local12 = _local3;
_local13 = _local4;
_local14 = _local5;
_local15 = _local6;
_local16 = 0;
while (_local16 < 80) {
if (_local16 < 16){
_local8[_local16] = _arg1[(_local9 + _local16)];
} else {
_local8[_local16] = IntUtil.rol((((_local8[(_local16 - 3)] ^ _local8[(_local16 - 8)]) ^ _local8[(_local16 - 14)]) ^ _local8[(_local16 - 16)]), 1);
};
_local17 = ((((IntUtil.rol(_local11, 5) + f(_local16, _local12, _local13, _local14)) + _local15) + int(_local8[_local16])) + k(_local16));
_local15 = _local14;
_local14 = _local13;
_local13 = IntUtil.rol(_local12, 30);
_local12 = _local11;
_local11 = _local17;
_local16++;
};
_local2 = (_local2 + _local11);
_local3 = (_local3 + _local12);
_local4 = (_local4 + _local13);
_local5 = (_local5 + _local14);
_local6 = (_local6 + _local15);
_local9 = (_local9 + 16);
};
_local10 = new ByteArray();
_local10.writeInt(_local2);
_local10.writeInt(_local3);
_local10.writeInt(_local4);
_local10.writeInt(_local5);
_local10.writeInt(_local6);
_local10.position = 0;
return (_local10);
}
private static function createBlocksFromByteArray(_arg1:ByteArray):Array{
var _local2:int;
var _local3:Array;
var _local4:int;
var _local5:int;
var _local6:int;
_local2 = _arg1.position;
_arg1.position = 0;
_local3 = new Array();
_local4 = (_arg1.length * 8);
_local5 = 0xFF;
_local6 = 0;
while (_local6 < _local4) {
_local3[(_local6 >> 5)] = (_local3[(_local6 >> 5)] | ((_arg1.readByte() & _local5) << (24 - (_local6 % 32))));
_local6 = (_local6 + 8);
};
_local3[(_local4 >> 5)] = (_local3[(_local4 >> 5)] | (128 << (24 - (_local4 % 32))));
_local3[((((_local4 + 64) >> 9) << 4) + 15)] = _local4;
_arg1.position = _local2;
return (_local3);
}
private static function f(_arg1:int, _arg2:int, _arg3:int, _arg4:int):int{
if (_arg1 < 20){
return (((_arg2 & _arg3) | (~(_arg2) & _arg4)));
};
if (_arg1 < 40){
return (((_arg2 ^ _arg3) ^ _arg4));
};
if (_arg1 < 60){
return ((((_arg2 & _arg3) | (_arg2 & _arg4)) | (_arg3 & _arg4)));
};
return (((_arg2 ^ _arg3) ^ _arg4));
}
private static function k(_arg1:int):int{
if (_arg1 < 20){
return (1518500249);
};
if (_arg1 < 40){
return (1859775393);
};
if (_arg1 < 60){
return (2400959708);
};
return (3395469782);
}
private static function createBlocksFromString(_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) << (24 - (_local5 % 32))));
_local5 = (_local5 + 8);
};
_local2[(_local3 >> 5)] = (_local2[(_local3 >> 5)] | (128 << (24 - (_local3 % 32))));
_local2[((((_local3 + 64) >> 9) << 4) + 15)] = _local3;
return (_local2);
}
public static function hashBytes(_arg1:ByteArray):String{
var _local2:Array;
var _local3:ByteArray;
_local2 = _slot1.createBlocksFromByteArray(_arg1);
_local3 = hashBlocks(_local2);
return (((((IntUtil.toHex(_local3.readInt(), true) + IntUtil.toHex(_local3.readInt(), true)) + IntUtil.toHex(_local3.readInt(), true)) + IntUtil.toHex(_local3.readInt(), true)) + IntUtil.toHex(_local3.readInt(), true)));
}
public static function hash(_arg1:String):String{
var _local2:Array;
var _local3:ByteArray;
_local2 = createBlocksFromString(_arg1);
_local3 = hashBlocks(_local2);
return (((((IntUtil.toHex(_local3.readInt(), true) + IntUtil.toHex(_local3.readInt(), true)) + IntUtil.toHex(_local3.readInt(), true)) + IntUtil.toHex(_local3.readInt(), true)) + IntUtil.toHex(_local3.readInt(), true)));
}
}
}//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
//AnimatedModel (com.doof.animationengine.AnimatedModel)
package com.doof.animationengine {
import flash.events.*;
import flash.display.*;
public class AnimatedModel extends Sprite {
private var _jointRotation:Array;
private var _animationSpeed:Number;
private var _totalFrames:int;
public var _currentFrame:Number;
private var _inputAnimations:Array;
private var _jointDistance:Array;
private var _weightings:Array;
private var _modelSegments:Array;
private var _modelJoints:Array;
private static var DEG_TO_RAD:Number = (Math.PI / 180);
private static var RAD_TO_DEG:Number = (180 / Math.PI);
public function AnimatedModel(_arg1:Array, _arg2:Array, _arg3:Array):void{
_inputAnimations = _arg1;
_weightings = _arg2;
_modelJoints = _arg3;
_modelSegments = new Array();
_jointRotation = new Array();
_jointDistance = new Array();
init();
}
private function init():void{
_currentFrame = 1;
_animationSpeed = 1;
_totalFrames = _inputAnimations[0].totalFrames;
buildSegmentsArray();
normaliseWeights();
buildJoints();
}
private function rotateSegments():void{
var _local1:int;
var _local2:int;
var _local3:Number;
_local1 = 0;
while (_local1 < _modelSegments.length) {
_local3 = 0;
_local2 = 0;
while (_local2 < _inputAnimations.length) {
_local3 = (_local3 + (_inputAnimations[_local2].getChildByName(_modelSegments[_local1]).rotation * _weightings[_local2]));
_local2++;
};
getChildByName(_modelSegments[_local1]).rotation = _local3;
_local1++;
};
}
private function lockJoint(_arg1:int):void{
var _local2:int;
var _local3:Number;
var _local4:Number;
_local3 = 0;
_local4 = 0;
_local2 = 0;
while (_local2 < _inputAnimations.length) {
_local3 = (_local3 + (_inputAnimations[_local2].getChildByName(_modelJoints[_arg1][0]).x * _weightings[_local2]));
_local4 = (_local4 + (_inputAnimations[_local2].getChildByName(_modelJoints[_arg1][0]).y * _weightings[_local2]));
_local2++;
};
getChildByName(_modelJoints[_arg1][0]).x = _local3;
getChildByName(_modelJoints[_arg1][0]).y = _local4;
}
public function normaliseWeights():void{
var _local1:int;
var _local2:Number;
_local2 = 0;
_local1 = 0;
while (_local1 < _weightings.length) {
_local2 = (_local2 + _weightings[_local1]);
_local1++;
};
_local1 = 0;
while (_local1 < _weightings.length) {
_weightings[_local1] = (_weightings[_local1] / _local2);
_local1++;
};
}
private function buildJoints():void{
var _local1:int;
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
_local1 = 0;
while (_local1 < _modelJoints.length) {
_local2 = getChildByName(_modelJoints[_local1][0]).x;
_local3 = getChildByName(_modelJoints[_local1][1]).x;
_local4 = getChildByName(_modelJoints[_local1][0]).y;
_local5 = getChildByName(_modelJoints[_local1][1]).y;
_local6 = Math.sqrt((Math.pow((_local2 - _local3), 2) + Math.pow((_local4 - _local5), 2)));
_local7 = (Math.atan2((_local4 - _local5), (_local2 - _local3)) - (getChildByName(_modelJoints[_local1][1]).rotation * DEG_TO_RAD));
_jointDistance.push(_local6);
_jointRotation.push(_local7);
_local1++;
};
}
public function set animationSpeed(_arg1:Number):void{
_animationSpeed = _arg1;
}
public function set weightings(_arg1:Array):void{
_weightings = _arg1;
normaliseWeights();
}
private function gotoAnimationFrame(_arg1:Number):void{
var _local2:int;
_local2 = 0;
while (_local2 < _inputAnimations.length) {
_inputAnimations[_local2].gotoAndStop(_arg1);
_local2++;
};
}
private function positionJoints():void{
var _local1:int;
var _local2:Number;
var _local3:Number;
var _local4:Number;
_local1 = 0;
while (_local1 < _modelJoints.length) {
_local2 = (_jointRotation[_local1] + (getChildByName(_modelJoints[_local1][1]).rotation * DEG_TO_RAD));
_local3 = (Math.cos(_local2) * _jointDistance[_local1]);
_local4 = (Math.sin(_local2) * _jointDistance[_local1]);
_local3 = (_local3 + getChildByName(_modelJoints[_local1][1]).x);
_local4 = (_local4 + getChildByName(_modelJoints[_local1][1]).y);
getChildByName(_modelJoints[_local1][0]).x = _local3;
getChildByName(_modelJoints[_local1][0]).y = _local4;
if (_modelJoints[_local1][0] == _modelJoints[_local1][1]){
lockJoint(_local1);
};
_local1++;
};
}
private function buildSegmentsArray():void{
var _local1:int;
_local1 = 0;
while (_local1 < numChildren) {
_modelSegments.push(getChildAt(_local1).name);
_local1++;
};
}
public function animate():void{
gotoAnimationFrame(Math.round(_currentFrame));
rotateSegments();
positionJoints();
_currentFrame = (_currentFrame + _animationSpeed);
if (_currentFrame > _totalFrames){
_currentFrame = (_currentFrame - (Math.floor((_currentFrame / _totalFrames)) * _totalFrames));
};
}
}
}//package com.doof.animationengine
Section 4
//Player1Model (com.doof.animationengine.Player1Model)
package com.doof.animationengine {
import flash.display.*;
public class Player1Model extends AnimatedModel {
public var chest:MovieClip;
public var upperArm1:MovieClip;
public var upperArm2:MovieClip;
public var lowerLeg1:MovieClip;
public var lowerLeg2:MovieClip;
public var upperLeg1:MovieClip;
public var upperLeg2:MovieClip;
public var head:MovieClip;
public var lowerArm2:MovieClip;
public var torso:MovieClip;
public var lowerArm1:MovieClip;
public function Player1Model():void{
var _local1:Array;
var _local2:Array;
var _local3:Array;
_local1 = new Array();
_local1.push(new running());
_local1.push(new standing());
_local1.push(new startBlock1());
_local1.push(new startBlock2());
_local1.push(new hurdling());
_local1.push(new longJump2());
_local1.push(new tripleJump1());
_local1.push(new tripleJump2());
_local1.push(new winning());
_local2 = new Array();
_local2.push(0);
_local2.push(0);
_local2.push(100);
_local2.push(0);
_local2.push(0);
_local2.push(0);
_local2.push(0);
_local3 = new Array();
_local3.push(["head", "head"]);
_local3.push(["chest", "head"]);
_local3.push(["upperArm1", "chest"]);
_local3.push(["upperArm2", "chest"]);
_local3.push(["lowerArm1", "upperArm1"]);
_local3.push(["lowerArm2", "upperArm2"]);
_local3.push(["torso", "chest"]);
_local3.push(["upperLeg1", "torso"]);
_local3.push(["upperLeg2", "torso"]);
_local3.push(["lowerLeg1", "upperLeg1"]);
_local3.push(["lowerLeg2", "upperLeg2"]);
super(_local1, _local2, _local3);
}
}
}//package com.doof.animationengine
Section 5
//Controls (com.doof.trackandfield.Controls)
package com.doof.trackandfield {
import flash.events.*;
import flash.display.*;
public class Controls extends EventDispatcher {
private var _keySwitch:int;// = 1
private var _runPressReady:Boolean;// = true
public static var JUMP_PRESSED:String = "jumpPressed";
public static var RUN_PRESSED:String = "runPressed";
public static var JUMP_RELEASED:String = "jumpReleased";
public function Controls(_arg1:Stage){
_runPressReady = true;
_keySwitch = 1;
super();
_arg1.addEventListener(KeyboardEvent.KEY_DOWN, keyDownListener);
_arg1.addEventListener(KeyboardEvent.KEY_UP, keyUpListener);
}
private function keyUpListener(_arg1:KeyboardEvent):void{
if (_arg1.keyCode == 191){
_runPressReady = true;
};
if (_arg1.keyCode == 32){
dispatchEvent(new Event(JUMP_RELEASED));
};
}
private function keyDownListener(_arg1:KeyboardEvent):void{
if (_keySwitch == 1){
if (_arg1.keyCode == 37){
_keySwitch = 2;
dispatchEvent(new Event(RUN_PRESSED));
};
} else {
if (_arg1.keyCode == 39){
_keySwitch = 1;
dispatchEvent(new Event(RUN_PRESSED));
};
};
if (_arg1.keyCode == 32){
dispatchEvent(new Event(JUMP_PRESSED));
};
}
}
}//package com.doof.trackandfield
Section 6
//DoofBot (com.doof.trackandfield.DoofBot)
package com.doof.trackandfield {
import flash.events.*;
import flash.display.*;
import flash.net.*;
import flash.system.*;
public class DoofBot {
private static var doofBotStartURL:String = "http://www.doof.com/spoof/doofbot/ping/start/";
private static var doofBotEndURL:String = "http://www.doof.com/spoof/doofbot/ping/end/";
private static var doofBotInitURL:String = "http://www.doof.com/spoof/doofbot/ping/init/";
public function DoofBot(){
trace("no instantiation needed, please use the static methods");
Security.loadPolicyFile("http://www.doof.com/crossdomain.xml");
}
public static function init(_arg1:Object, _arg2:String):void{
var gameID:String;
var hostURL:String;
var sendVars:URLVariables;
var request:URLRequest;
var loader:URLLoader;
var trackCompleteHandler:*;
var trackErrorHandler:*;
var stageRef = _arg1;
var gameName = _arg2;
trackCompleteHandler = function (_arg1:Event):void{
var _local2:URLLoader;
trace("DoofBot tracking info sent!");
_local2 = URLLoader(_arg1.target);
trace(("DoofBot php sent me: " + _local2.data.toString()));
};
trackErrorHandler = function (_arg1:IOErrorEvent):void{
trace("Sorry, DoofBot tracking failed!");
trace(("Error: " + _arg1));
};
Security.allowDomain("*");
Security.allowInsecureDomain("*");
Security.loadPolicyFile("http://www.doof.com/crossdomain.xml");
gameID = gameName;
hostURL = stageRef.loaderInfo.url;
trace(("DoofBot gameID: " + gameID));
trace(("DoofBot hostURL: " + hostURL));
sendVars = new URLVariables();
sendVars.gameID = gameID;
sendVars.hostURL = hostURL;
sendVars.rnd = Math.floor((Math.random() * 1000));
request = new URLRequest(doofBotInitURL);
loader = new URLLoader();
loader.dataFormat = URLLoaderDataFormat.TEXT;
request.data = sendVars;
request.method = URLRequestMethod.POST;
loader.addEventListener(Event.COMPLETE, trackCompleteHandler);
loader.addEventListener(IOErrorEvent.IO_ERROR, trackErrorHandler);
loader.load(request);
}
public static function end(_arg1:Object, _arg2:String):void{
var gameID:String;
var hostURL:String;
var sendVars:URLVariables;
var request:URLRequest;
var loader:URLLoader;
var trackCompleteHandler:*;
var trackErrorHandler:*;
var stageRef = _arg1;
var gameName = _arg2;
trackCompleteHandler = function (_arg1:Event):void{
var _local2:URLLoader;
trace("DoofBot tracking info sent!");
_local2 = URLLoader(_arg1.target);
trace(("DoofBot php sent me: " + _local2.data.toString()));
};
trackErrorHandler = function (_arg1:IOErrorEvent):void{
trace("Sorry, DoofBot tracking failed!");
trace(("Error: " + _arg1));
};
Security.allowDomain("*");
Security.allowInsecureDomain("*");
Security.loadPolicyFile("http://www.doof.com/crossdomain.xml");
gameID = gameName;
hostURL = stageRef.loaderInfo.url;
trace(("DoofBot gameID: " + gameID));
trace(("DoofBot hostURL: " + hostURL));
sendVars = new URLVariables();
sendVars.gameID = gameID;
sendVars.hostURL = hostURL;
sendVars.rnd = Math.floor((Math.random() * 1000));
request = new URLRequest(doofBotEndURL);
loader = new URLLoader();
loader.dataFormat = URLLoaderDataFormat.TEXT;
request.data = sendVars;
request.method = URLRequestMethod.POST;
loader.addEventListener(Event.COMPLETE, trackCompleteHandler);
loader.addEventListener(IOErrorEvent.IO_ERROR, trackErrorHandler);
loader.load(request);
}
public static function start(_arg1:Object, _arg2:String):void{
var gameID:String;
var hostURL:String;
var sendVars:URLVariables;
var request:URLRequest;
var loader:URLLoader;
var trackCompleteHandler:*;
var trackErrorHandler:*;
var stageRef = _arg1;
var gameName = _arg2;
trackCompleteHandler = function (_arg1:Event):void{
var _local2:URLLoader;
trace("DoofBot tracking info sent!");
_local2 = URLLoader(_arg1.target);
trace(("DoofBot php sent me: " + _local2.data.toString()));
};
trackErrorHandler = function (_arg1:IOErrorEvent):void{
trace("Sorry, DoofBot tracking failed!");
trace(("Error: " + _arg1));
};
Security.allowDomain("*");
Security.allowInsecureDomain("*");
Security.loadPolicyFile("http://www.doof.com/crossdomain.xml");
gameID = gameName;
hostURL = stageRef.loaderInfo.url;
trace(("DoofBot gameID: " + gameID));
trace(("DoofBot hostURL: " + hostURL));
sendVars = new URLVariables();
sendVars.gameID = gameID;
sendVars.hostURL = hostURL;
sendVars.rnd = Math.floor((Math.random() * 1000));
request = new URLRequest(doofBotStartURL);
loader = new URLLoader();
loader.dataFormat = URLLoaderDataFormat.TEXT;
request.data = sendVars;
request.method = URLRequestMethod.POST;
loader.addEventListener(Event.COMPLETE, trackCompleteHandler);
loader.addEventListener(IOErrorEvent.IO_ERROR, trackErrorHandler);
loader.load(request);
}
}
}//package com.doof.trackandfield
Section 7
//HurdleGame (com.doof.trackandfield.HurdleGame)
package com.doof.trackandfield {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.media.*;
import com.doof.animationengine.*;
import flash.text.*;
import flash.filters.*;
public class HurdleGame extends Sprite {
private var _startBlockWeight:Number;// = 0
private var _jumpMomentum2:Number;// = 0
private var _HUD:MovieClip;
private var _startBlockTweenTimer:Timer;
private var _player1:Player1Model;
private var _player2:Player1Model;
private var _initX:Number;
private var _initY:Number;
private var _raceFinished:Boolean;// = false
private var _finishTime2:Number;// = 0
private var _finishTime1:Number;// = 0
private var _runPower:Number;// = 3.5
private var _gameScreen:HurdleScreen;
private var _raceTime:Number;// = 0
private var _hurdleControls:Controls;
private var _raceStarted:Boolean;// = false
private var _runPower2:Number;// = 1.43
private var _jumpMomentum:Number;// = 0
private var _hurdleNumber:int;// = 0
private var _initX2:Number;
private var _momentum1:Number;// = 0
private var _momentum2:Number;// = 0
private var _gravity:Number;// = 4
private var _initY2:Number;
private var _hurdleNumber2:int;// = 0
private var _hurdlesArray:Array;
private var _jumpPower2:Number;// = 3
private var _countDownNum:int;// = 2
private var _cam1X:Number;
private var _soundStepNumber:Number;// = 0
private var _inertia:Number;// = 0.98
private var _countDownTimer:Timer;
private var _m10Distance:Number;// = 800
private var _raceFinishTime:Number;
private var _nextCalled:Boolean;// = false
private var _winWeight:Number;// = 0
private var _jumpPower:Number;// = 25
private var _foul:Boolean;// = false
public function HurdleGame():void{
_gameScreen = new HurdleScreen();
_countDownNum = 2;
_inertia = 0.98;
_m10Distance = 800;
_raceTime = 0;
_raceFinished = false;
_gravity = 4;
_hurdlesArray = new Array();
_hurdleNumber = 0;
_hurdleNumber2 = 0;
_raceStarted = false;
_foul = false;
_nextCalled = false;
_momentum1 = 0;
_finishTime1 = 0;
_runPower = 3.5;
_jumpPower = 25;
_jumpMomentum = 0;
_momentum2 = 0;
_finishTime2 = 0;
_runPower2 = 1.43;
_jumpPower2 = 3;
_jumpMomentum2 = 0;
_winWeight = 0;
_startBlockWeight = 0;
_soundStepNumber = 0;
_HUD = new GameHUD();
super();
}
private function startCountDown():void{
_startBlockTweenTimer = new Timer(20, 0);
_startBlockTweenTimer.addEventListener(TimerEvent.TIMER, startTweener);
_startBlockTweenTimer.start();
_countDownTimer = new Timer(3000, 0);
_countDownTimer.addEventListener(TimerEvent.TIMER, checkCountDown);
_countDownTimer.start();
_HUD.countDownTXT.text = "";
_HUD.countdown.gotoAndPlay("onYourMarks");
setStartBlockPosition1();
}
private function enterFrameHandler(_arg1:Event):void{
if (_foul){
return;
};
movePlayer1();
movePlayer2();
animatePlayer1();
animatePlayer2();
updateHUD();
checkDistance();
incrementRaceTimer();
controlPlayer2();
checkHurdles();
}
private function checkCountDown(_arg1:TimerEvent):void{
var _local2:Array;
var _local3:Sound;
_countDownNum--;
if (_countDownNum == 1){
_HUD.countdown.gotoAndPlay("getSet");
startControls();
};
if (_countDownNum == 0){
if (!_raceStarted){
_local3 = new gunSND();
_local3.play(0, 1);
};
_HUD.countdown.gotoAndPlay("go");
_raceStarted = true;
startGameHandlers();
_local2 = new Array();
_startBlockWeight = 1;
_local2.push(0);
_local2.push(0);
_local2.push(0);
_local2.push(_startBlockWeight);
_local2.push(0);
_local2.push(0);
_local2.push(0);
_local2.push(0);
_local2.push(0);
_player1.weightings = _local2;
_player1.normaliseWeights();
_player2.weightings = _local2;
_player2.normaliseWeights();
};
if (_countDownNum == -1){
_HUD.countDownTXT.text = "";
stopCountDown();
};
}
private function incrementRaceTimer():void{
_raceTime = (_raceTime + 42);
}
private function runPressedHandler(_arg1:Event):void{
if (!_raceStarted){
destroy();
Object(parent).nextGame(-1);
_HUD.countDownTXT.text = "";
_foul = true;
} else {
_momentum1 = (_momentum1 + _runPower);
};
}
private function movePlayer1():void{
var _local1:Number;
var _local2:int;
var _local3:int;
var _local4:int;
var _local5:int;
var _local6:int;
var _local7:Sound;
_momentum1 = (_momentum1 * _inertia);
if (Math.abs(_momentum1) < 2.5){
_momentum1 = 0;
};
_player1.x = (_player1.x + (_momentum1 / 2));
if (_player1.y < _initY){
_player1.y = (_player1.y + _jumpMomentum);
_jumpMomentum = (_jumpMomentum + _gravity);
} else {
_player1.y = _initY;
_jumpMomentum = 0;
};
if (_player1.y == _initY){
_soundStepNumber = (_soundStepNumber + _momentum1);
if (_soundStepNumber > 150){
_soundStepNumber = 0;
_local7 = new footSND();
_local7.play(0, 1);
};
};
_gameScreen.shadow1.x = (_player1.x - 50);
_cam1X = (_cam1X + ((_player1.x - _cam1X) / 6));
if (_cam1X < 220){
_cam1X = 220;
};
_gameScreen.x = -((_cam1X - (stage.stageWidth / 3)));
_local1 = Math.abs(_gameScreen.x);
_local2 = Math.floor((_local1 / _gameScreen.crowdHolder.mc.width));
_gameScreen.crowdHolder.x = (_gameScreen.crowdHolder.mc.width * _local2);
_local3 = Math.floor((_local1 / _gameScreen.bannerHolder.mc.width));
_gameScreen.bannerHolder.x = (_gameScreen.bannerHolder.mc.width * _local3);
_local4 = Math.floor((_local1 / _gameScreen.grassHolder.mc.width));
_gameScreen.grassHolder.x = (_gameScreen.grassHolder.mc.width * _local4);
_local5 = Math.floor((_local1 / _gameScreen.track2Holder.mc.width));
_gameScreen.track2Holder.x = (_gameScreen.track2Holder.mc.width * _local5);
_local6 = Math.floor((_local1 / _gameScreen.track1Holder.mc.width));
_gameScreen.track1Holder.x = (_gameScreen.track1Holder.mc.width * _local6);
}
private function movePlayer2():void{
_momentum2 = (_momentum2 * _inertia);
if (((_raceFinished) && ((Math.abs(_momentum2) < 4)))){
_momentum2 = 0;
};
_player2.x = (_player2.x + (_momentum2 / 2));
if (_player2.y < _initY2){
_player2.y = (_player2.y + _jumpMomentum2);
_jumpMomentum2 = (_jumpMomentum2 + _gravity);
} else {
_player2.y = _initY2;
_jumpMomentum2 = 0;
};
_gameScreen.shadow2.x = (_player2.x - 50);
}
private function stopCountDown():void{
_countDownTimer.removeEventListener(TimerEvent.TIMER, checkCountDown);
_countDownTimer.stop();
_startBlockTweenTimer.removeEventListener(TimerEvent.TIMER, startTweener);
_startBlockTweenTimer.stop();
}
private function jumpPressedHandler(_arg1:Event):void{
if (!_raceStarted){
destroy();
Object(parent).nextGame(-1);
_HUD.countDownTXT.text = "";
_foul = true;
} else {
if (_player1.y == _initY){
_jumpMomentum = (_jumpMomentum - _jumpPower);
_player1.y = (_player1.y - _jumpPower);
};
};
}
private function stopControls():void{
_hurdleControls.removeEventListener(Controls.RUN_PRESSED, runPressedHandler);
}
public function init():void{
var _local1:int;
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:int;
var _local8:MovieClip;
var _local9:MovieClip;
var _local10:Class;
var _local11:MovieClip;
var _local12:int;
var _local13:MovieClip;
var _local14:MovieClip;
var _local15:MovieClip;
var _local16:MovieClip;
var _local17:MovieClip;
var _local18:MovieClip;
var _local19:MovieClip;
var _local20:Sprite;
stage.focus = this;
addChild(_gameScreen);
_gameScreen.cacheAsBitmap = true;
_initX = _gameScreen.player1.x;
_initY = _gameScreen.player1.y;
_initX2 = _gameScreen.player2.x;
_initY2 = _gameScreen.player2.y;
_local1 = 2;
_local2 = _gameScreen.crowdHolder.mc.width;
_local3 = _gameScreen.bannerHolder.mc.width;
_local4 = _gameScreen.grassHolder.mc.width;
_local5 = _gameScreen.track2Holder.mc.width;
_local6 = _gameScreen.track1Holder.mc.width;
_local7 = 1;
while (_local7 <= _local1) {
_local13 = MovieClip(_gameScreen.crowdHolder.addChild(new CrowdElement()));
_local13.x = (_local7 * _local2);
_local14 = MovieClip(_gameScreen.bannerHolder.addChild(new BannerElement()));
_local14.x = (_local7 * _local3);
_local15 = MovieClip(_gameScreen.grassHolder.addChild(new GrassElement()));
_local15.x = (_local7 * _local4);
_local16 = MovieClip(_gameScreen.track2Holder.addChild(new Track2Element()));
_local16.x = (_local7 * _local5);
_local17 = MovieClip(_gameScreen.track1Holder.addChild(new Track1Element()));
_local17.x = (_local7 * _local6);
_local7++;
};
_local8 = MovieClip(_gameScreen.linesHolder.addChild(new Line1Element()));
_local8.x = (_initX + 35);
_local8.scaleX = -1;
_local7 = 1;
while (_local7 <= 10) {
_local18 = MovieClip(_gameScreen.hurdleHolder1.addChild(new HurdleElement()));
_local18.x = ((_local7 * _m10Distance) + _initX);
_local19 = MovieClip(_gameScreen.hurdleHolder2.addChild(new HurdleElement()));
_local19.x = (((_local7 * _m10Distance) + _initX) - _local19.width);
_hurdlesArray.push(_local18);
_local20 = Sprite(_gameScreen.hurdleHolder2.addChild(new TrackMarkerElement()));
_local20.x = (_local19.x + 20);
_local20.distanceTXT.text = ((_local7 * 10) + "M");
_local7++;
};
_local9 = MovieClip(_gameScreen.linesHolder.addChild(new FinishLine2Element()));
_local9.x = (((11 * _m10Distance) + _initX) + 35);
_hurdleControls = new Controls(stage);
_momentum1 = 0;
_local10 = Object(parent)._playerAthlete;
_player1 = Player1Model(_gameScreen.p1Holder.addChild(new (_local10)));
_player1.x = _gameScreen.player1.x;
_player1.y = _gameScreen.player1.y;
_player1.scaleX = -(_gameScreen.player1.scaleX);
_player1.scaleY = _gameScreen.player1.scaleY;
_local11 = MovieClip(_player1.upperLeg1.addChild(new shortFlag()));
_local11.gotoAndStop(Object(parent)._playerCountry);
_local11.x = (_local11.x - 40);
_local11.y = (_local11.y + 40);
_player1.head.stop();
_gameScreen.player1.visible = false;
_gameScreen.player1 = null;
_cam1X = 0;
_momentum2 = 0;
_local12 = Math.ceil((Math.random() * 4));
if (_local12 == 1){
_player2 = Player1Model(_gameScreen.p2Holder.addChild(new player1Sprite()));
};
if (_local12 == 2){
_player2 = Player1Model(_gameScreen.p2Holder.addChild(new player2Sprite()));
};
if (_local12 == 3){
_player2 = Player1Model(_gameScreen.p2Holder.addChild(new player3Sprite()));
};
if (_local12 == 4){
_player2 = Player1Model(_gameScreen.p2Holder.addChild(new player4Sprite()));
};
_player2.x = _gameScreen.player2.x;
_player2.y = _gameScreen.player2.y;
_player2.scaleX = -(_gameScreen.player2.scaleX);
_player2.scaleY = _gameScreen.player2.scaleY;
_player2.head.stop();
_gameScreen.player2.visible = false;
_gameScreen.player2 = null;
movePlayer1();
movePlayer2();
addChild(_HUD);
startCountDown();
}
private function checkDistance():void{
var _local1:Number;
_local1 = ((_player1.x - _initX) / _m10Distance);
if (((((_local1 * 10) > 110)) && (!(_raceFinished)))){
stopControls();
_raceFinishTime = (_raceTime / 1000);
_raceFinished = true;
if (_raceFinishTime < 15){
_winWeight = (_winWeight + 10);
};
};
}
private function startControls():void{
_hurdleControls.addEventListener(Controls.RUN_PRESSED, runPressedHandler);
_hurdleControls.addEventListener(Controls.JUMP_PRESSED, jumpPressedHandler);
}
private function animatePlayer1(){
var _local1:Array;
var _local2:Number;
var _local3:Number;
_player1.animationSpeed = (_momentum1 / 5);
_local1 = new Array();
_local2 = (_momentum1 / 55);
if (_local2 > 1){
_local2 = 1;
};
if (_local2 > 0.5){
_player1.head.play();
} else {
_player1.head.gotoAndStop(1);
};
_local1.push(_local2);
_local1.push((1 - _local2));
_local1.push(0);
_local1.push(_startBlockWeight);
_local3 = ((_initY - _player1.y) / 15);
if (_local3 < 0){
_local3 = 0;
};
_local1.push(_local3);
_local1.push(0);
_local1.push(0);
_local1.push(0);
_local1.push(_winWeight);
_startBlockWeight = (_startBlockWeight * 0.5);
_player1.weightings = _local1;
_player1.normaliseWeights();
_player1.animate();
}
private function animatePlayer2(){
var _local1:Array;
var _local2:Number;
var _local3:Number;
_player2.animationSpeed = (_momentum2 / 5);
_local1 = new Array();
_local2 = (_momentum2 / 55);
if (_local2 > 1){
_local2 = 1;
};
if (_local2 > 0.5){
_player2.head.play();
} else {
_player2.head.gotoAndStop(1);
};
_local1.push(_local2);
_local1.push((1 - _local2));
_local1.push(0);
_local1.push(_startBlockWeight);
_local3 = ((_initY2 - _player2.y) / 15);
if (_local3 < 0){
_local3 = 0;
};
_local1.push(_local3);
_local1.push(0);
_local1.push(0);
_local1.push(0);
_local1.push(0);
_player2.weightings = _local1;
_player2.normaliseWeights();
_player2.animate();
}
private function setStartBlockPosition1():void{
var _local1:Array;
_local1 = new Array();
_local1.push(0);
_local1.push(0);
_local1.push(1);
_local1.push(0);
_local1.push(0);
_local1.push(0);
_local1.push(0);
_local1.push(0);
_local1.push(0);
_player1.weightings = _local1;
_player1.normaliseWeights();
_player1.animate();
_player2.weightings = _local1;
_player2.normaliseWeights();
_player2.animate();
}
private function controlPlayer2():void{
var _local1:Number;
if (!_raceFinished){
_momentum2 = (_momentum2 + _runPower2);
if (_hurdleNumber2 < 10){
_local1 = Math.abs((_player2.x - _hurdlesArray[_hurdleNumber2].x));
if ((((_local1 < 170)) && ((_player2.y == _initY2)))){
_hurdleNumber2++;
_jumpMomentum2 = (_jumpMomentum2 - _jumpPower);
_player2.y = (_player2.y + _jumpMomentum2);
};
};
};
}
private function updateHUD():void{
var _local1:Sound;
if (!_raceFinished){
_HUD.distanceTXT.text = ((((_player1.x - _initX) / _m10Distance) * 10).toFixed(1) + " metres");
_HUD.timeTXT.text = ((_raceTime / 1000).toFixed(3) + " seconds");
} else {
_HUD.distanceTXT.text = (110 + " metres");
_HUD.timeTXT.text = (_raceFinishTime.toFixed(3) + " seconds");
if (!_nextCalled){
Object(parent).nextGame(_raceFinishTime.toFixed(3));
if (_raceFinishTime.toFixed(3) < 15){
_local1 = new qualifySND();
_local1.play(0, 1);
};
};
_nextCalled = true;
};
}
private function startTweener(_arg1:TimerEvent):void{
var _local2:Array;
if ((((_countDownNum <= 1)) && ((_countDownNum > 0)))){
_local2 = new Array();
_local2.push(0);
_local2.push(0);
_local2.push(1);
_local2.push(_startBlockWeight);
_local2.push(0);
_local2.push(0);
_local2.push(0);
_local2.push(0);
_local2.push(0);
_startBlockWeight = (_startBlockWeight + 0.2);
_player1.weightings = _local2;
_player1.normaliseWeights();
_player1.animate();
_player2.weightings = _local2;
_player2.normaliseWeights();
_player2.animate();
};
}
private function stopGameHandlers():void{
removeEventListener(Event.ENTER_FRAME, enterFrameHandler);
stopControls();
}
private function checkHurdles():void{
var _local1:Number;
var _local2:Number;
var _local3:Number;
if (_hurdleNumber < 10){
_local1 = ((_player1.x - _hurdlesArray[_hurdleNumber].x) * 2.5);
_local2 = ((_initY - _player1.y) * 0.6);
_local3 = Math.sqrt((Math.pow(_local1, 2) + Math.pow(_local2, 2)));
if (_local3 < 65){
_hurdlesArray[_hurdleNumber].gotoAndStop(2);
_momentum1 = (_momentum1 * 0.65);
};
if (_player1.x > _hurdlesArray[_hurdleNumber].x){
_hurdleNumber++;
};
};
}
public function destroy():void{
stopGameHandlers();
}
private function startGameHandlers():void{
addEventListener(Event.ENTER_FRAME, enterFrameHandler);
startControls();
}
}
}//package com.doof.trackandfield
Section 8
//LongJumpGame (com.doof.trackandfield.LongJumpGame)
package com.doof.trackandfield {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.media.*;
import com.doof.animationengine.*;
import flash.text.*;
import flash.filters.*;
public class LongJumpGame extends Sprite {
private var _foul:Boolean;// = false
private var _startBlockWeight:Number;// = 0
private var _jumpPower:Number;// = 10
private var _momentum1:Number;// = 0
private var _gravity:Number;// = 4.5
private var _player1:Player1Model;
private var _sandPlayed:Boolean;// = false
private var _HUD:MovieClip;
private var _initX:Number;
private var _angleChangeStarted:Boolean;// = false
private var _cam1X:Number;
private var _soundStepNumber:Number;// = 0
private var _angleChangeEnded:Boolean;// = false
private var _initY:Number;
private var _inertia:Number;// = 0.98
private var _backupX:Number;
private var _runPower:Number;// = 3.5
private var _gameScreen:LongJumpScreen;
private var _finishTime1:Number;// = 0
private var _m10Distance:Number;// = 800
private var _jumpMomentum:Number;// = 0
private var _jumpWeight:Number;// = 0
private var _nextCalled:Boolean;// = false
private var _buttonPushed:Boolean;// = false
private var _longJumpControls:Controls;
public function LongJumpGame():void{
_gameScreen = new LongJumpScreen();
_inertia = 0.98;
_m10Distance = 800;
_angleChangeStarted = false;
_angleChangeEnded = false;
_jumpWeight = 0;
_foul = false;
_buttonPushed = false;
_nextCalled = false;
_momentum1 = 0;
_jumpPower = 10;
_gravity = 4.5;
_jumpMomentum = 0;
_finishTime1 = 0;
_runPower = 3.5;
_startBlockWeight = 0;
_soundStepNumber = 0;
_sandPlayed = false;
_HUD = new JumpHUD();
super();
}
public function destroy():void{
stopGameHandlers();
}
private function changeAngle():void{
var _local1:Number;
var _local2:Number;
if (!_foul){
_HUD.jumpAngle.angleQuarter.rotation = (_HUD.jumpAngle.angleQuarter.rotation - 6.5);
if (_HUD.jumpAngle.angleQuarter.rotation < -90){
_HUD.jumpAngle.angleQuarter.rotation = -90;
_angleChangeStarted = false;
_local1 = (_HUD.jumpAngle.angleQuarter.rotation * (Math.PI / 180));
_local2 = (_momentum1 + _jumpPower);
_momentum1 = (Math.cos(_local1) * _local2);
_jumpMomentum = (Math.sin(_local1) * _local2);
stopControls();
_angleChangeEnded = true;
};
};
}
public function init():void{
var _local1:int;
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:int;
var _local7:MovieClip;
var _local8:MovieClip;
var _local9:Class;
var _local10:MovieClip;
var _local11:MovieClip;
var _local12:MovieClip;
var _local13:MovieClip;
var _local14:MovieClip;
stage.focus = this;
addChild(_gameScreen);
_gameScreen.cacheAsBitmap = true;
_initX = _gameScreen.player1.x;
_initY = _gameScreen.player1.y;
_local1 = 2;
_local2 = _gameScreen.crowdHolder.mc.width;
_local3 = _gameScreen.bannerHolder.mc.width;
_local4 = _gameScreen.grassHolder.mc.width;
_local5 = _gameScreen.track1Holder.mc.width;
_local6 = 1;
while (_local6 <= _local1) {
_local11 = MovieClip(_gameScreen.crowdHolder.addChild(new CrowdElement()));
_local11.x = (_local6 * _local2);
_local12 = MovieClip(_gameScreen.bannerHolder.addChild(new BannerElement()));
_local12.x = (_local6 * _local3);
_local13 = MovieClip(_gameScreen.grassHolder.addChild(new GrassElement()));
_local13.x = (_local6 * _local4);
_local14 = MovieClip(_gameScreen.track1Holder.addChild(new Track3Element()));
_local14.x = (_local6 * _local5);
_local6++;
};
_local7 = MovieClip(_gameScreen.sandBoxHolder.addChild(new SandBox1Element()));
_local7.x = (4 * _m10Distance);
_local8 = MovieClip(_gameScreen.sandBoxHolder.addChild(new JumpPadElement()));
_local8.x = (_local7.x - 100);
_longJumpControls = new Controls(stage);
_momentum1 = 0;
_local9 = Object(parent)._playerAthlete;
_player1 = Player1Model(_gameScreen.p1Holder.addChild(new (_local9)));
_player1.x = _gameScreen.player1.x;
_player1.y = _gameScreen.player1.y;
_player1.scaleX = -(_gameScreen.player1.scaleX);
_player1.scaleY = _gameScreen.player1.scaleY;
_local10 = MovieClip(_player1.upperLeg1.addChild(new shortFlag()));
_local10.gotoAndStop(Object(parent)._playerCountry);
_local10.x = (_local10.x - 40);
_local10.y = (_local10.y + 40);
_gameScreen.player1.visible = false;
_gameScreen.player1 = null;
_player1.head.stop();
_cam1X = 0;
movePlayer1();
addChild(_HUD);
startGameHandlers();
}
private function enterFrameHandler(_arg1:Event):void{
movePlayer1();
animatePlayer1();
updateHUD();
checkFoul();
if (_angleChangeStarted){
changeAngle();
};
}
private function checkDistance():void{
var _local1:Number;
_local1 = (((_player1.x - _initX) / _m10Distance) * 10);
}
private function startGameHandlers():void{
addEventListener(Event.ENTER_FRAME, enterFrameHandler);
startControls();
}
private function startControls():void{
_longJumpControls.addEventListener(Controls.RUN_PRESSED, runPressedHandler);
_longJumpControls.addEventListener(Controls.JUMP_PRESSED, jumpPressedHandler);
_longJumpControls.addEventListener(Controls.JUMP_RELEASED, jumpReleasedHandler);
}
private function checkFoul():void{
if ((((_player1.x > ((_m10Distance * 4) - 70))) && (!(_buttonPushed)))){
stopControls();
_HUD.messageTXT.text = "";
_foul = true;
if (!_nextCalled){
Object(parent).nextGame(-1);
};
_nextCalled = true;
};
}
private function movePlayer1():void{
var _local1:Number;
var _local2:int;
var _local3:int;
var _local4:int;
var _local5:int;
var _local6:Sound;
var _local7:Number;
var _local8:Sound;
var _local9:Sound;
if ((((_player1.y == _initY)) && (!(_angleChangeStarted)))){
_momentum1 = (_momentum1 * _inertia);
_soundStepNumber = (_soundStepNumber + _momentum1);
if (_soundStepNumber > 150){
_soundStepNumber = 0;
_local6 = new footSND();
_local6.play(0, 1);
};
};
if (Math.abs(_momentum1) < 2.5){
_momentum1 = 0;
};
_player1.x = (_player1.x + (_momentum1 / 2));
if (!_angleChangeStarted){
_backupX = _player1.x;
} else {
_player1.x = _backupX;
};
_jumpMomentum = (_jumpMomentum + _gravity);
_player1.y = (_player1.y + (_jumpMomentum / 2));
if (!_angleChangeEnded){
if (_player1.y > _initY){
_player1.y = _initY;
_jumpMomentum = 0;
};
} else {
if (_player1.y > (_initY + 50)){
_player1.y = (_initY + 50);
_jumpMomentum = 0;
_momentum1 = 0;
if (!_sandPlayed){
_local8 = new sandSND();
_local8.play(0, 1);
_sandPlayed = true;
};
_local7 = (((_player1.x - ((4 * _m10Distance) + 0x0101)) / 100) + 4);
if (_local7 > 0){
_HUD.distanceTXT.text = (_local7.toFixed(3) + " metres");
if (!_nextCalled){
Object(parent).nextGame(_local7.toFixed(3));
if (_local7.toFixed(3) > 6.5){
_local9 = new qualifySND();
_local9.play(0, 1);
};
};
_nextCalled = true;
} else {
_HUD.messageTXT.text = "";
if (!_nextCalled){
Object(parent).nextGame(-1);
};
_nextCalled = true;
};
};
};
_cam1X = (_cam1X + ((_player1.x - _cam1X) / 1));
if (_cam1X < 220){
_cam1X = 220;
};
_gameScreen.shadow1.x = (_player1.x - 50);
_gameScreen.x = -((_cam1X - (stage.stageWidth / 3)));
_local1 = Math.abs(_gameScreen.x);
_local2 = Math.floor((_local1 / _gameScreen.crowdHolder.mc.width));
_gameScreen.crowdHolder.x = (_gameScreen.crowdHolder.mc.width * _local2);
_local3 = Math.floor((_local1 / _gameScreen.bannerHolder.mc.width));
_gameScreen.bannerHolder.x = (_gameScreen.bannerHolder.mc.width * _local3);
_local4 = Math.floor((_local1 / _gameScreen.grassHolder.mc.width));
_gameScreen.grassHolder.x = (_gameScreen.grassHolder.mc.width * _local4);
_local5 = Math.floor((_local1 / _gameScreen.track1Holder.mc.width));
_gameScreen.track1Holder.x = (_gameScreen.track1Holder.mc.width * _local5);
}
private function animatePlayer1():void{
var _local1:Array;
var _local2:Number;
_player1.animationSpeed = (_momentum1 / 5);
_local1 = new Array();
_local2 = (_momentum1 / 55);
if (_local2 > 1){
_local2 = 1;
};
if (_local2 > 0.5){
_player1.head.play();
} else {
_player1.head.gotoAndStop(1);
};
_local1.push(_local2);
_local1.push((1 - _local2));
_local1.push(0);
_local1.push(0);
_local1.push(0);
_local1.push(_jumpWeight);
_local1.push(0);
_local1.push(0);
_local1.push(0);
if (_angleChangeEnded){
_jumpWeight = (_jumpWeight + 0.5);
_player1.animationSpeed = 4;
if (_player1._currentFrame >= 90){
_player1._currentFrame = 90;
};
};
if (_angleChangeStarted){
_local1 = new Array();
_local1.push(0);
_local1.push(0);
_local1.push(0);
_local1.push(0);
_local1.push(0);
_local1.push(1);
_local1.push(0);
_local1.push(0);
_local1.push(0);
_player1._currentFrame = 1;
};
_player1.weightings = _local1;
_player1.normaliseWeights();
_player1.animate();
}
private function updateHUD():void{
if (!_angleChangeEnded){
_HUD.distanceTXT.text = (0 + " metres");
};
}
private function runPressedHandler(_arg1:Event):void{
_momentum1 = (_momentum1 + _runPower);
}
private function jumpPressedHandler(_arg1:Event):void{
_buttonPushed = true;
if (!_angleChangeStarted){
_angleChangeStarted = true;
};
}
private function stopGameHandlers():void{
removeEventListener(Event.ENTER_FRAME, enterFrameHandler);
stopControls();
}
private function jumpReleasedHandler(_arg1:Event):void{
var _local2:Number;
var _local3:Number;
var _local4:Sound;
if (!_foul){
_angleChangeStarted = false;
_angleChangeEnded = true;
_local2 = (_HUD.jumpAngle.angleQuarter.rotation * (Math.PI / 180));
_local3 = (_momentum1 + _jumpPower);
_momentum1 = (Math.cos(_local2) * _local3);
_jumpMomentum = (Math.sin(_local2) * _local3);
stopControls();
_player1._currentFrame = 1;
_local4 = new gruntSND();
_local4.play(0, 1);
};
}
private function stopControls():void{
_longJumpControls.removeEventListener(Controls.RUN_PRESSED, runPressedHandler);
_longJumpControls.removeEventListener(Controls.JUMP_PRESSED, jumpPressedHandler);
_longJumpControls.removeEventListener(Controls.JUMP_RELEASED, jumpReleasedHandler);
}
}
}//package com.doof.trackandfield
Section 9
//Main (com.doof.trackandfield.Main)
package com.doof.trackandfield {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.media.*;
import flash.net.*;
import flash.system.*;
import flash.filters.*;
public dynamic class Main extends MovieClip {
public var _tripleJumpScore:int;// = 0
public var _gameArray:Array;
public var _hurdleScore:int;// = 0
public var _lastScore:Number;// = 0
public var _individualLeaderboard:MovieClip;
private var _countrySelect:MovieClip;
public var _introTextArray:Array;
private var _introScreen:MovieClip;
public var _scoreArray:Array;
public var _playerScore:int;// = 0
private var _falseStart:Boolean;// = false
public var _playerName:String;
private var _nextGameTimer:Timer;
private var _connector:Connector;
private var _resultScreen:ResultScreen;
public var _game:Object;
public var _sprintScore:int;// = 0
public var _titleSoundChannel:SoundChannel;
public var _gameNum:int;// = 0
private var _overDown:Boolean;// = false
public var _finalResultScreen:FinalResults;
public var _introSoundChannel:SoundChannel;
private var _qualified:Boolean;// = true
public var _sprintFalseStart:int;// = 0
public var _eventNameArray:Array;
public var _hurdleFalseStart:int;// = 0
private var _characterSelect:MovieClip;
public var _totalScore:int;// = 0
public var _internationalLeaderboard:MovieClip;
private var _title:MovieClip;
public var _playerCountry:String;
private var _splashScreen:MovieClip;
public var _playerAthlete:Class;
public var _endScreen:EndScreen;
private var _overUp:Boolean;// = false
public var _TestPHPResults:TestPHPResults;
public var _longJumpScore:int;// = 0
public function Main():void{
_connector = new Connector();
_splashScreen = new SplashScreen();
_title = new TitleScreen();
_countrySelect = new CountrySelect();
_characterSelect = new CharacterSelect();
_introScreen = new IntroScreen();
_individualLeaderboard = new LeaderboardIndividual();
_internationalLeaderboard = new LeaderboardInternational();
_finalResultScreen = new FinalResults();
_endScreen = new EndScreen();
_gameNum = 0;
_gameArray = new Array();
_eventNameArray = new Array();
_scoreArray = new Array();
_introTextArray = new Array();
_sprintScore = 0;
_sprintFalseStart = 0;
_hurdleScore = 0;
_hurdleFalseStart = 0;
_longJumpScore = 0;
_tripleJumpScore = 0;
_totalScore = 0;
_resultScreen = new ResultScreen();
_qualified = true;
_falseStart = false;
_overUp = false;
_overDown = false;
_playerAthlete = player1Sprite;
_playerScore = 0;
_lastScore = 0;
super();
Security.allowDomain("*");
Security.allowInsecureDomain("*");
DoofBot.init(this, "TrackStar");
MochiBot.track(this, "5cc76576");
init();
}
public function nextGameLoad(_arg1:Number):void{
var _local2:Sound;
var _local3:Number;
var _local4:Number;
var _local5:Sound;
trace("next game loading");
_nextGameTimer.removeEventListener(TimerEvent.TIMER, nextGameLoad);
_nextGameTimer.stop();
_arg1 = _lastScore;
_falseStart = false;
if (!_scoreArray[_gameNum]){
_resultScreen.board.eventNameTXT.text = _eventNameArray[_gameNum];
_resultScreen.board.nameTXT.text = _playerName;
if (_gameNum < 2){
_resultScreen.board.attempt1TXT.text = _playerName;
_resultScreen.board.nameTXT.text = "RESULT.";
_resultScreen.board.smallGuy.gotoAndStop((_gameNum + 1));
if ((((((_gameNum == 0)) && ((_arg1 > 12)))) || ((((_gameNum == 0)) && ((_arg1 == -1)))))){
trace("failed to qualify for 100M sprint");
_sprintFalseStart++;
if (_sprintFalseStart > 1){
_qualified = false;
} else {
_falseStart = true;
};
if (_arg1 > 12){
_qualified = false;
_falseStart = false;
};
};
if ((((((_gameNum == 0)) && ((_arg1 > -1)))) && ((_arg1 <= 12)))){
_sprintScore = ((30 - _arg1) * 100);
};
if ((((((_gameNum == 1)) && ((_arg1 > 15)))) || ((((_gameNum == 1)) && ((_arg1 == -1)))))){
trace("failed to qualify for 110M hurdles");
_hurdleFalseStart++;
if (_hurdleFalseStart > 1){
_qualified = false;
} else {
_falseStart = true;
};
if (_arg1 > 15){
_qualified = false;
_falseStart = false;
};
};
if ((((((_gameNum == 1)) && ((_arg1 > -1)))) && ((_arg1 <= 15)))){
_hurdleScore = ((30 - _arg1) * 100);
};
if (_arg1 != -1){
_resultScreen.board.result1TXT.text = (_arg1 + " S");
} else {
_resultScreen.board.result1TXT.text = "FALSE START";
};
_resultScreen.board.result2TXT.text = "";
_resultScreen.board.result3TXT.text = "";
_resultScreen.board.attempt2TXT.text = "";
_resultScreen.board.attempt3TXT.text = "";
};
if (!_falseStart){
_scoreArray.push(_arg1);
};
if (_gameNum == 2){
_resultScreen.board.smallGuy.gotoAndStop(3);
if (_arg1 != -1){
_resultScreen.board.result1TXT.text = (_arg1 + " M");
} else {
_resultScreen.board.result1TXT.text = "FOUL";
};
_resultScreen.board.result2TXT.text = "";
_resultScreen.board.result3TXT.text = "";
_resultScreen.board.attempt1TXT.text = "ATTEMPT 1.";
_resultScreen.board.attempt2TXT.text = "";
_resultScreen.board.attempt3TXT.text = "";
};
if (_gameNum == 3){
_resultScreen.board.smallGuy.gotoAndStop(3);
if (_arg1 != -1){
_resultScreen.board.result2TXT.text = (_arg1 + " M");
} else {
_resultScreen.board.result2TXT.text = "FOUL";
};
_resultScreen.board.result3TXT.text = "";
_resultScreen.board.attempt1TXT.text = "ATTEMPT 1.";
_resultScreen.board.attempt2TXT.text = "ATTEMPT 2.";
_resultScreen.board.attempt3TXT.text = "";
};
if (_gameNum == 4){
_resultScreen.board.smallGuy.gotoAndStop(3);
if (_arg1 != -1){
_resultScreen.board.result3TXT.text = (_arg1 + " M");
} else {
_resultScreen.board.result3TXT.text = "FOUL";
};
_resultScreen.board.attempt1TXT.text = "ATTEMPT 1.";
_resultScreen.board.attempt2TXT.text = "ATTEMPT 2.";
_resultScreen.board.attempt3TXT.text = "ATTEMPT 3.";
_local3 = Math.max(_scoreArray[2], _scoreArray[3], _scoreArray[4]);
trace(_local3);
if (_local3 < 6.5){
trace("failed to qualify for long jump");
_qualified = false;
} else {
if (_local3 < 0){
_local3 = 0;
};
_longJumpScore = (_local3 * 100);
};
};
if (_gameNum == 5){
_resultScreen.board.smallGuy.gotoAndStop(4);
if (_arg1 != -1){
_resultScreen.board.result1TXT.text = (_arg1 + " M");
} else {
_resultScreen.board.result1TXT.text = "FOUL";
};
_resultScreen.board.result2TXT.text = "";
_resultScreen.board.result3TXT.text = "";
_resultScreen.board.attempt1TXT.text = "ATTEMPT 1.";
_resultScreen.board.attempt2TXT.text = "";
_resultScreen.board.attempt3TXT.text = "";
};
if (_gameNum == 6){
_resultScreen.board.smallGuy.gotoAndStop(4);
if (_arg1 != -1){
_resultScreen.board.result2TXT.text = (_arg1 + " M");
} else {
_resultScreen.board.result2TXT.text = "FOUL";
};
_resultScreen.board.result3TXT.text = "";
_resultScreen.board.attempt1TXT.text = "ATTEMPT 1.";
_resultScreen.board.attempt2TXT.text = "ATTEMPT 2.";
_resultScreen.board.attempt3TXT.text = "";
};
if (_gameNum == 7){
_resultScreen.board.smallGuy.gotoAndStop(4);
if (_arg1 != -1){
_resultScreen.board.result3TXT.text = (_arg1 + " M");
} else {
_resultScreen.board.result3TXT.text = "FOUL";
};
_resultScreen.board.attempt1TXT.text = "ATTEMPT 1.";
_resultScreen.board.attempt2TXT.text = "ATTEMPT 2.";
_resultScreen.board.attempt3TXT.text = "ATTEMPT 3.";
_local4 = Math.max(_scoreArray[5], _scoreArray[6], _scoreArray[7]);
if (_local4 < 0){
_local4 = 0;
};
_local5 = new qualifySND();
_local5.play(0, 1);
_tripleJumpScore = (_local4 * 100);
};
_local2 = new resultSND();
_introSoundChannel = _local2.play(0, 1);
_resultScreen.gotoAndPlay("show");
addChild(_resultScreen);
_resultScreen.board.nextBTN.addEventListener(MouseEvent.CLICK, destroyAndLoadNext);
};
}
private function setName(_arg1:MouseEvent):void{
_playerName = _characterSelect.playerNameTXT.text.toUpperCase();
if (_playerName == ""){
_playerName = "PLAYER";
};
_characterSelect.startBTN.removeEventListener(MouseEvent.CLICK, setName);
removeChild(_characterSelect);
loadIntro();
}
public function outDownHandler(_arg1:MouseEvent):void{
_overDown = false;
}
public function startIndividualHandlers():void{
_individualLeaderboard.nextBTN.addEventListener(MouseEvent.CLICK, showInternational);
}
private function setCharacter2(_arg1:MouseEvent):void{
_characterSelect.player1.gotoAndStop(1);
_characterSelect.player2.gotoAndStop(2);
_characterSelect.player3.gotoAndStop(1);
_characterSelect.player4.gotoAndStop(1);
_playerAthlete = player2Sprite;
}
private function setCharacter3(_arg1:MouseEvent):void{
_characterSelect.player1.gotoAndStop(1);
_characterSelect.player2.gotoAndStop(1);
_characterSelect.player3.gotoAndStop(2);
_characterSelect.player4.gotoAndStop(1);
_playerAthlete = player3Sprite;
}
private function setCharacter4(_arg1:MouseEvent):void{
_characterSelect.player1.gotoAndStop(1);
_characterSelect.player2.gotoAndStop(1);
_characterSelect.player3.gotoAndStop(1);
_characterSelect.player4.gotoAndStop(2);
_playerAthlete = player4Sprite;
}
private function setCharacter1(_arg1:MouseEvent):void{
_characterSelect.player1.gotoAndStop(2);
_characterSelect.player2.gotoAndStop(1);
_characterSelect.player3.gotoAndStop(1);
_characterSelect.player4.gotoAndStop(1);
_playerAthlete = player1Sprite;
}
public function scrollCheck(_arg1:Event):void{
if (_overUp){
_internationalLeaderboard.scores.y = (_internationalLeaderboard.scores.y + 3);
};
if (_overDown){
_internationalLeaderboard.scores.y = (_internationalLeaderboard.scores.y - 3);
};
if (_internationalLeaderboard.scores.y > 82){
_internationalLeaderboard.scores.y = 82;
};
if (_internationalLeaderboard.scores.y < -370){
_internationalLeaderboard.scores.y = -370;
};
}
private function startCharacterSelectHandlers():void{
_characterSelect.player1.addEventListener(MouseEvent.CLICK, setCharacter1);
_characterSelect.player2.addEventListener(MouseEvent.CLICK, setCharacter2);
_characterSelect.player3.addEventListener(MouseEvent.CLICK, setCharacter3);
_characterSelect.player4.addEventListener(MouseEvent.CLICK, setCharacter4);
}
private function gigyaShare(_arg1:MouseEvent):void{
var mcWF:MovieClip;
var ModuleID:String;
var cfg:Object;
var ldr:Loader;
var url:String;
var urlReq:URLRequest;
var e = _arg1;
Security.allowDomain("cdn.gigya.com");
Security.allowInsecureDomain("cdn.gigya.com");
mcWF = new MovieClip();
addChild(mcWF).name = "mcWF";
mcWF.x = 0;
mcWF.y = 0;
ModuleID = "PostModule1";
cfg = {};
cfg["width"] = "640";
cfg["height"] = "400";
cfg["bookmarkURL"] = "http://www.doof.com/#/games/TrackStar";
cfg["widgetTitle"] = "Track Star";
cfg["advancedTracking"] = "true";
cfg["partner"] = "177341";
cfg["UIConfig"] = "<config><display showDesktop=\"true\" showEmail=\"true\" useTransitions=\"true\" showBookmark=\"true\" codeBoxHeight=\"auto\" showCodeBox=\"true\" showCloseButton=\"true\" bulletinChecked=\"false\" networksWithCodeBox=\"\"></display><body corner-roundness=\"8;8;8;8\"><background frame-color=\"Transparent\" gradient-color-begin=\"#353535\" gradient-color-end=\"#606060\" corner-roundness=\"8;8;8;8\"></background><controls size=\"11\" bold=\"true\"><snbuttons iconsOnly=\"false\" type=\"textUnder\" frame-color=\"#6D0000\" background-color=\"#FFFFFF\" over-background-color=\"#FFFFFF\" color=\"#CACACA\" corner-roundness=\"0;8;8;8\" gradient-color-begin=\"#8A8A8A\" gradient-color-end=\"#000000\" font=\"Arial\" size=\"11\" bold=\"false\" over-gradient-color-begin=\"#AAAAAA\" over-gradient-color-end=\"#000000\" over-color=\"#F4F4F4\" down-color=\"#000000\"><more frame-color=\"Transparent\"></more></snbuttons><textboxes frame-color=\"#000000\" color=\"#AAAAAA\" corner-roundness=\"0;0;0;0\" gradient-color-begin=\"#202020\" gradient-color-end=\"#0B0B0B\" font=\"Arial\" bold=\"false\"><codeboxes color=\"#EAEAEA\" frame-color=\"#8A8A8A\" gradient-color-begin=\"#000000\" font=\"Arial\" bold=\"false\"></codeboxes><inputs frame-color=\"#6D0000\"></inputs><dropdowns frame-color=\"#6D0000\" handle-gradient-color-begin=\"#B60000\" handle-gradient-color-end=\"#6D0000\" handle-over-gradient-color-begin=\"#FF0000\" handle-over-gradient-color-end=\"#DA0000\" handle-down-gradient-color-begin=\"#FF0000\" handle-down-gradient-color-end=\"#6D0000\" background-color=\"#6D0000\" gradient-color-begin=\"#000000\" font=\"Arial\" bold=\"false\"></dropdowns></textboxes><buttons frame-color=\"#FF0000\" gradient-color-begin=\"#FF2424\" gradient-color-end=\"#6D0000\" color=\"#F4F4F4\" corner-roundness=\"0;8;8;8\" font=\"Arial\" size=\"10\" bold=\"false\" down-frame-color=\"#000000\" over-gradient-color-begin=\"#DA0000\" down-gradient-color-begin=\"#910000\" over-gradient-color-end=\"#DA0000\" down-gradient-color-end=\"#FF0000\" over-color=\"#F4F4F4\"><post-buttons gradient-color-begin=\"#FF4949\" gradient-color-end=\"#6D0000\"></post-buttons></buttons><listboxes corner-roundness=\"5;5;5;5\"></listboxes><servicemarker gradient-color-begin=\"#DA0000\" gradient-color-end=\"#DA0000\"></servicemarker></controls><texts color=\"#FFFFFF\" font=\"Arial\" size=\"10\"><privacy color=\"#959595\" size=\"11\"></privacy><headers size=\"11\" bold=\"true\"></headers><labels size=\"11\" bold=\"true\"></labels><messages color=\"#D5D5D5\" frame-thickness=\"0\" corner-roundness=\"0;0;0;0\" gradient-color-begin=\"#B60000\" gradient-color-end=\"#000000\" size=\"11\" bold=\"true\"></messages><links color=\"#DFDFDF\" underline=\"false\" size=\"11\" bold=\"true\" over-color=\"#FFFFFF\"></links></texts></body></config>";
cfg["defaultContent"] = "<object width=\"640\" height=\"400\"> <param name=\"movie\" value=\"http://static.doof.com/content/static/games/TrackStar/TrackStarWidget.swf\"></param> <param name=\"wmode\" value=\"transparent\"></param> <embed src=\"http://static.doof.com/content/static/games/TrackStar/TrackStarWidget.swf\" type=\"application/x-shockwave-flash\" wmode=\"transparent\" width=\"640\" height=\"400\"></embed></object>";
cfg["onPostProfile"] = function (_arg1:Object):void{
trace(((((("event fired eventObj.type=" + _arg1.type) + " eventObj.network=") + _arg1.network) + " eventObj.partnerData=") + _arg1.partnerData));
};
cfg["onLoad"] = function (_arg1:Object):void{
trace(((("event fired eventObj.type=" + _arg1.type) + "eventObj.ModuleID=") + _arg1.ModuleID));
};
cfg["onClose"] = function (_arg1:Object):void{
mcWF.visible = false;
removeChild(mcWF);
};
ldr = new Loader();
url = ("http://cdn.gigya.com/WildFire/swf/wildfireInAS3.swf?ModuleID=" + ModuleID);
urlReq = new URLRequest(url);
mcWF[ModuleID] = cfg;
ldr.load(urlReq);
mcWF.addChild(ldr);
}
private function getURL(_arg1:String, _arg2:String=null):void{
var req:URLRequest;
var url = _arg1;
var window = _arg2;
req = new URLRequest(url);
try {
navigateToURL(req, window);
} catch(e:Error) {
trace("Navigate to URL failed", e.message);
};
}
public function showLeaderboards(_arg1:MouseEvent):void{
addChild(new loadingScreen());
_TestPHPResults.startPHP();
startIndividualHandlers();
startInternationalHandlers();
}
public function outUpHandler(_arg1:MouseEvent):void{
_overUp = false;
}
public function showInternational(_arg1:MouseEvent):void{
_individualLeaderboard.nextBTN.removeEventListener(MouseEvent.CLICK, showInternational);
addChild(_internationalLeaderboard);
}
public function restartGame(_arg1:MouseEvent):void{
var _local2:int;
SoundMixer.stopAll();
removeChild(_individualLeaderboard);
removeChild(_internationalLeaderboard);
removeChild(_endScreen);
_splashScreen = new SplashScreen();
_title = new TitleScreen();
_countrySelect = new CountrySelect();
_characterSelect = new CharacterSelect();
_introScreen = new IntroScreen();
_individualLeaderboard = new LeaderboardIndividual();
_finalResultScreen = new FinalResults();
_game = new Object();
_gameNum = 0;
_gameArray = new Array();
_eventNameArray = new Array();
_scoreArray = new Array();
_introTextArray = new Array();
_sprintScore = 0;
_sprintFalseStart = 0;
_hurdleScore = 0;
_hurdleFalseStart = 0;
_longJumpScore = 0;
_tripleJumpScore = 0;
_totalScore = 0;
_resultScreen = new ResultScreen();
_nextGameTimer = null;
_qualified = true;
_falseStart = false;
_overUp = false;
_overDown = false;
_playerName = null;
_playerAthlete = player1Sprite;
_playerCountry = null;
_playerScore = 0;
_lastScore = 0;
_TestPHPResults = null;
_titleSoundChannel = null;
_introSoundChannel = null;
_local2 = 0;
while (_local2 < numChildren) {
getChildAt(_local2).visible = false;
removeChildAt(_local2);
_local2++;
};
init();
}
private function stopCharacterSelectHandlers():void{
_characterSelect.player1.removeEventListener(MouseEvent.CLICK, setCharacter1);
_characterSelect.player2.removeEventListener(MouseEvent.CLICK, setCharacter2);
_characterSelect.player3.removeEventListener(MouseEvent.CLICK, setCharacter3);
_characterSelect.player4.removeEventListener(MouseEvent.CLICK, setCharacter4);
}
private function startCharacterSelect():void{
addChild(_characterSelect);
stopCountrySelectHandlers();
removeChild(_countrySelect);
_characterSelect.startBTN.addEventListener(MouseEvent.CLICK, setName);
_characterSelect.player1.buttonMode = true;
_characterSelect.player2.buttonMode = true;
_characterSelect.player3.buttonMode = true;
_characterSelect.player4.buttonMode = true;
_characterSelect.player1.gotoAndStop(2);
_characterSelect.player2.gotoAndStop(1);
_characterSelect.player3.gotoAndStop(1);
_characterSelect.player4.gotoAndStop(1);
_characterSelect.player1.sprinter.head.gotoAndStop(1);
_characterSelect.player2.sprinter.head.gotoAndStop(1);
_characterSelect.player3.sprinter.head.gotoAndStop(1);
_characterSelect.player4.sprinter.head.gotoAndStop(1);
startCharacterSelectHandlers();
}
public function readInternationalString(_arg1:String):Array{
var _local2:String;
var _local3:Array;
var _local4:Array;
var _local5:int;
var _local6:int;
var _local7:Array;
var _local8:Object;
_local2 = _arg1;
trace(("string before: " + _local2));
if (_local2.substr(_local2.length, -1) == "|"){
_local2 = _local2.substr(0, (_local2.length - 1));
};
trace(("string after: " + _local2));
_local3 = new Array();
_local4 = _local2.split("|");
_local5 = 0;
while (_local5 < _local4.length) {
_local7 = _local4[_local5].split(",");
trace(_local7.toString());
_local8 = {country:_local7[0], score:_local7[1]};
_local3.push(_local8);
_local5++;
};
_local6 = 0;
while (_local6 < _local3.length) {
_local8 = _local3[_local6];
trace(_local8.country);
trace(_local8.score);
_local6++;
};
return (_local3);
}
private function setCountry(_arg1:MouseEvent):void{
_playerCountry = _arg1.target.name;
startCharacterSelect();
}
private function instructionsClickHandler(_arg1:MouseEvent):void{
_instructions.startBTN.removeEventListener(MouseEvent.CLICK, instructionsClickHandler);
loadGame();
removeChild(_instructions);
}
private function doofLinkClickedHandler(_arg1:MouseEvent):void{
getURL("http://www.doof.com/?ref=trackstar", "_blank");
}
private function init():void{
addChild(_connector);
_TestPHPResults = new TestPHPResults(this);
_splashScreen.addEventListener(MouseEvent.CLICK, doofLinkClickedHandler);
_splashScreen.buttonMode = true;
_splashScreen.useHandCursor = true;
addChild(_splashScreen);
addEventListener(Event.ENTER_FRAME, checkSplash);
MochiAd.showPreGameAd({clip:root, id:"32e727ecf006d3b7", res:"640x400", ad_finished:this.adFinished});
_gameArray.push(new SprintGame());
_eventNameArray.push("100M SPRINT");
_introTextArray.push("Finish the race in under 12 seconds to qualify for the next event.\n\nRun by pressing the left and right arrow keys alternately.".toUpperCase());
_gameArray.push(new HurdleGame());
_eventNameArray.push("110M HURDLE");
_introTextArray.push("Finish the race in under 15 seconds to qualify for the next event.\n\nRun by pressing the left and right arrow keys alternately, press Space to jump".toUpperCase());
_gameArray.push(new LongJumpGame());
_eventNameArray.push("LONG JUMP");
_introTextArray.push("Jump over 6.5m to qualify for the next event.\n\nRun by pressing the left and right arrow keys alternately. Hold Space to angle your jump, let go to release".toUpperCase());
_gameArray.push(new LongJumpGame());
_eventNameArray.push("LONG JUMP");
_introTextArray.push("");
_gameArray.push(new LongJumpGame());
_eventNameArray.push("LONG JUMP");
_introTextArray.push("");
_gameArray.push(new TripleJumpGame());
_eventNameArray.push("TRIPLE JUMP");
_introTextArray.push("Jump as far as you can to complete this event.\n\nRun by pressing the left and right arrow keys alternately, for each of your 3 jumps hold space to angle, let go to release".toUpperCase());
_gameArray.push(new TripleJumpGame());
_eventNameArray.push("TRIPLE JUMP");
_introTextArray.push("");
_gameArray.push(new TripleJumpGame());
_eventNameArray.push("TRIPLE JUMP");
_introTextArray.push("");
}
private function titleClickHandler(_arg1:MouseEvent):void{
DoofBot.start(this, "TrackStar");
addChild(_countrySelect);
setCountrySelectHandlers();
_title.startBTN.removeEventListener(MouseEvent.CLICK, titleClickHandler);
removeChild(_title);
_connector.gameStarted(0);
}
private function startTitle():void{
var _local1:Sound;
_local1 = new titleSND();
_introSoundChannel = _local1.play(0, 99999999999);
addChild(_title);
_title.startBTN.addEventListener(MouseEvent.CLICK, titleClickHandler);
removeChild(_splashScreen);
}
private function loadIntro():void{
var _local1:Sound;
if (_introTextArray[_gameNum] != ""){
if (_gameNum > 0){
_local1 = new titleSND();
_introSoundChannel = _local1.play(0, 99999999999);
};
_introScreen.smallGuy.stop();
_introScreen.eventNameTXT.text = _eventNameArray[_gameNum];
_introScreen.introTXT.text = _introTextArray[_gameNum];
_introScreen.nextBTN.addEventListener(MouseEvent.CLICK, closeIntro);
addChild(_introScreen);
} else {
loadGame();
};
}
public function scrollDownHandler(_arg1:MouseEvent):void{
_overDown = true;
}
public function sendGameEnded(_arg1:MouseEvent):void{
var _local2:String;
DoofBot.end(this, "TrackStar");
_connector.gameStat("country", _playerCountry);
_connector.gameStat("name", _playerName);
_connector.gameEnded(_totalScore);
_local2 = this.loaderInfo.url;
if (_local2.search("doof.com") == -1){
_endScreen.scoreTXT.text = _totalScore;
_endScreen.replayBTN.addEventListener(MouseEvent.CLICK, restartGame);
_endScreen.doofBTN.addEventListener(MouseEvent.CLICK, doofLinkClickedHandler);
_endScreen.shareBTN.addEventListener(MouseEvent.CLICK, gigyaShare);
addChild(_endScreen);
};
}
public function startScrollHandlers():void{
_internationalLeaderboard.upBTN.addEventListener(MouseEvent.MOUSE_OVER, scrollUpHandler);
_internationalLeaderboard.downBTN.addEventListener(MouseEvent.MOUSE_OVER, scrollDownHandler);
_internationalLeaderboard.upBTN.addEventListener(MouseEvent.MOUSE_OUT, outUpHandler);
_internationalLeaderboard.downBTN.addEventListener(MouseEvent.MOUSE_OUT, outDownHandler);
addEventListener(Event.ENTER_FRAME, scrollCheck);
}
private function closeIntro(_arg1:MouseEvent):void{
_introScreen.nextBTN.removeEventListener(MouseEvent.CLICK, closeIntro);
removeChild(_introScreen);
loadGame();
}
private function setCountrySelectHandlers():void{
var _local1:int;
var _local2:String;
_local1 = 0;
while (_local1 < _countrySelect.numChildren) {
_local2 = _countrySelect.getChildAt(_local1).name.substr(0, 4);
if (_local2 != "inst"){
_countrySelect.getChildAt(_local1).addEventListener(MouseEvent.CLICK, setCountry);
};
_local1++;
};
}
public function nextGame(_arg1:Number):void{
if (_gameNum < 2){
_lastScore = _arg1;
_nextGameTimer = new Timer(2000);
_nextGameTimer.addEventListener(TimerEvent.TIMER, nextGameLoad);
_nextGameTimer.start();
} else {
_lastScore = _arg1;
nextGameLoad(_arg1);
};
}
private function checkSplash(_arg1:Event):void{
if (_splashScreen.currentFrame >= _splashScreen.totalFrames){
removeEventListener(Event.ENTER_FRAME, checkSplash);
startTitle();
};
}
public function populateIntLeaderboard(_arg1:Array):void{
var _local2:int;
var _local3:int;
_local2 = 0;
while (_local2 < _arg1.length) {
_local3 = (_local2 + 1);
if ((((_arg1[_local2].country == null)) || ((_arg1[_local2].country == undefined)))){
_arg1[_local2].country = "";
};
if ((((_arg1[_local2].score == null)) || ((_arg1[_local2].score == undefined)))){
_arg1[_local2].score = "";
};
_internationalLeaderboard.scores[("row" + _local3)].rankTXT.text = _local3;
_internationalLeaderboard.scores[("row" + _local3)].flag.gotoAndStop(_arg1[_local2].country);
_internationalLeaderboard.scores[("row" + _local3)].scoreTXT.text = _arg1[_local2].score;
_local2++;
};
}
public function destroyAndLoadNext(_arg1:MouseEvent):void{
_resultScreen.board.nextBTN.removeEventListener(MouseEvent.CLICK, destroyAndLoadNext);
if (!_falseStart){
_gameArray[_gameNum].destroy();
removeChild(_gameArray[_gameNum]);
delete _gameArray[_gameNum];
_gameArray[_gameNum] = null;
_gameNum++;
} else {
removeChild(_gameArray[_gameNum]);
delete _gameArray[_gameNum];
_gameArray[_gameNum] = null;
if (_gameNum == 0){
_gameArray[_gameNum] = new SprintGame();
};
if (_gameNum == 1){
_gameArray[_gameNum] = new HurdleGame();
};
};
removeChild(_resultScreen);
if (!_qualified){
gameOver();
return;
};
if (_gameNum == _gameArray.length){
gameOver();
} else {
loadIntro();
};
}
public function populateIndLeaderboard(_arg1:Array):void{
var _local2:int;
var _local3:int;
var _local4:int;
var _local5:GlowFilter;
var _local6:Array;
_local2 = 0;
while ((((_local2 < _arg1.length)) && ((_local2 < 9)))) {
_local4 = (_local2 + 1);
if ((((((_arg1[_local2].country == _playerCountry)) && ((_arg1[_local2].score == _totalScore)))) && ((_arg1[_local2].name == _playerName)))){
_local5 = new GlowFilter(0xFFCC00, 1, 5, 5, 2);
_local6 = new Array();
_local6.push(_local5);
_individualLeaderboard[("row" + _local4)].filters = _local6;
};
if ((((_arg1[_local2].rank == null)) || ((_arg1[_local2].rank == undefined)))){
_arg1[_local2].rank = "";
};
if ((((_arg1[_local2].country == null)) || ((_arg1[_local2].country == undefined)))){
_arg1[_local2].country = "";
};
if ((((_arg1[_local2].name == null)) || ((_arg1[_local2].name == undefined)))){
_arg1[_local2].name = "";
};
if ((((_arg1[_local2].score == null)) || ((_arg1[_local2].score == undefined)))){
_arg1[_local2].score = "";
};
_individualLeaderboard[("row" + _local4)].rankTXT.text = _arg1[_local2].rank;
_individualLeaderboard[("row" + _local4)].flag.gotoAndStop(_arg1[_local2].country);
_individualLeaderboard[("row" + _local4)].nameTXT.text = _arg1[_local2].name;
_individualLeaderboard[("row" + _local4)].scoreTXT.text = _arg1[_local2].score;
_local2++;
};
_local3 = (_arg1.length + 1);
while (_local3 <= 9) {
_individualLeaderboard[("row" + _local3)].visible = false;
_local3++;
};
}
private function adFinished():void{
removeEventListener(Event.ENTER_FRAME, checkSplash);
startTitle();
}
public function readIndividualString(_arg1:String):Array{
var _local2:String;
var _local3:Array;
var _local4:Array;
var _local5:int;
var _local6:int;
var _local7:Array;
var _local8:Object;
_local2 = _arg1;
trace(("string before: " + _local2));
if (_local2.substr(_local2.length, -1) == "|"){
_local2 = _local2.substr(0, (_local2.length - 1));
};
trace(("string after: " + _local2));
_local3 = new Array();
_local4 = _local2.split("|");
_local5 = 0;
while (_local5 < _local4.length) {
_local7 = _local4[_local5].split(",");
trace(_local7.toString());
_local8 = {rank:_local7[0], name:_local7[1], country:_local7[2], score:_local7[3]};
_local3.push(_local8);
_local5++;
};
_local6 = 0;
while (_local6 < _local3.length) {
_local8 = _local3[_local6];
trace(_local8.rank);
trace(_local8.name);
trace(_local8.country);
trace(_local8.score);
_local6++;
};
return (_local3);
}
public function startInternationalHandlers():void{
_internationalLeaderboard.nextBTN.addEventListener(MouseEvent.CLICK, sendGameEnded);
}
private function stopCountrySelectHandlers():void{
var _local1:int;
var _local2:String;
_local1 = 0;
while (_local1 < _countrySelect.numChildren) {
_local2 = _countrySelect.getChildAt(_local1).name.substr(0, 4);
if (_local2 != "inst"){
_countrySelect.getChildAt(_local1).removeEventListener(MouseEvent.CLICK, setCountry);
};
_local1++;
};
}
public function scrollUpHandler(_arg1:MouseEvent):void{
_overUp = true;
}
public function gameOver():void{
_totalScore = (((_sprintScore + _hurdleScore) + _longJumpScore) + _tripleJumpScore);
if (_gameNum < 7){
_finalResultScreen.board.eventNameTXT.text = "FAILED TO QUALIFY";
};
_finalResultScreen.board.sprintScoreTXT.text = _sprintScore;
_finalResultScreen.board.hurdleScoreTXT.text = _hurdleScore;
_finalResultScreen.board.longJumpScoreTXT.text = _longJumpScore;
_finalResultScreen.board.tripleJumpScoreTXT.text = _tripleJumpScore;
_finalResultScreen.board.totalScoreTXT.text = _totalScore;
_finalResultScreen.board.nextBTN.addEventListener(MouseEvent.CLICK, showLeaderboards);
addChild(_finalResultScreen);
}
private function loadGame():void{
var _local1:Sound;
_introSoundChannel.stop();
_local1 = new introSND();
_introSoundChannel = _local1.play(0, 1);
_game = Object(addChild(_gameArray[_gameNum]));
_game.init();
}
}
}//package com.doof.trackandfield
Section 10
//SprintGame (com.doof.trackandfield.SprintGame)
package com.doof.trackandfield {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.media.*;
import com.doof.animationengine.*;
import flash.text.*;
import flash.filters.*;
public class SprintGame extends Sprite {
private var _initX2:Number;
private var _winWeight:Number;// = 0
private var _momentum1:Number;// = 0
private var _momentum2:Number;// = 0
private var _sprintControls:Controls;
private var _startBlockTweenTimer:Timer;
private var _player1:Player1Model;
private var _startBlockWeight:Number;// = 0
private var _HUD:MovieClip;
private var _initX:Number;
private var _cam1X:Number;
private var _countDownNum:int;// = 2
private var _player2:Player1Model;
private var _raceFinished:Boolean;// = false
private var _soundStepNumber:Number;// = 0
private var _inertia:Number;// = 0.98
private var _finishTime2:Number;// = 0
private var _finishTime1:Number;// = 0
private var _runPower:Number;// = 3.5
private var _countDownTimer:Timer;
private var _gameScreen:SprintScreen;
private var _raceTime:Number;// = 0
private var _m10Distance:Number;// = 800
private var _raceStarted:Boolean;// = false
private var _runPower2:Number;// = 1.63
private var _raceFinishTime:Number;
private var _nextCalled:Boolean;// = false
private var _foul:Boolean;// = false
public function SprintGame():void{
_gameScreen = new SprintScreen();
_countDownNum = 2;
_inertia = 0.98;
_m10Distance = 800;
_raceTime = 0;
_raceFinished = false;
_raceStarted = false;
_foul = false;
_nextCalled = false;
_momentum1 = 0;
_finishTime1 = 0;
_runPower = 3.5;
_momentum2 = 0;
_finishTime2 = 0;
_runPower2 = 1.63;
_startBlockWeight = 0;
_winWeight = 0;
_soundStepNumber = 0;
_HUD = new GameHUD();
super();
}
public function destroy():void{
stopGameHandlers();
}
public function init():void{
var _local1:int;
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:int;
var _local8:MovieClip;
var _local9:MovieClip;
var _local10:Class;
var _local11:MovieClip;
var _local12:int;
var _local13:MovieClip;
var _local14:MovieClip;
var _local15:MovieClip;
var _local16:MovieClip;
var _local17:MovieClip;
var _local18:MovieClip;
var _local19:Sprite;
trace("init() called successfully.");
trace(("stage= " + stage));
trace(("this= " + this));
stage.focus = this;
addChild(_gameScreen);
_gameScreen.cacheAsBitmap = true;
_initX = _gameScreen.player1.x;
_initX2 = _gameScreen.player2.x;
_local1 = 2;
_local2 = _gameScreen.crowdHolder.mc.width;
_local3 = _gameScreen.bannerHolder.mc.width;
_local4 = _gameScreen.grassHolder.mc.width;
_local5 = _gameScreen.track2Holder.mc.width;
_local6 = _gameScreen.track1Holder.mc.width;
_local7 = 1;
while (_local7 <= _local1) {
_local13 = MovieClip(_gameScreen.crowdHolder.addChild(new CrowdElement()));
_local13.x = (_local7 * _local2);
_local14 = MovieClip(_gameScreen.bannerHolder.addChild(new BannerElement()));
_local14.x = (_local7 * _local3);
_local15 = MovieClip(_gameScreen.grassHolder.addChild(new GrassElement()));
_local15.x = (_local7 * _local4);
_local16 = MovieClip(_gameScreen.track2Holder.addChild(new Track2Element()));
_local16.x = (_local7 * _local5);
_local17 = MovieClip(_gameScreen.track1Holder.addChild(new Track1Element()));
_local17.x = (_local7 * _local6);
_local7++;
};
_local8 = MovieClip(_gameScreen.linesHolder.addChild(new Line1Element()));
_local8.x = (_initX - 35);
_local7 = 1;
while (_local7 < 10) {
_local18 = MovieClip(_gameScreen.linesHolder.addChild(new Line1Element()));
_local18.x = ((_local7 * _m10Distance) + _initX);
_local19 = Sprite(_gameScreen.linesHolder.addChild(new TrackMarkerElement()));
_local19.x = (((_local7 * _m10Distance) + _initX) + 100);
_local19.distanceTXT.text = ((_local7 * 10) + "M");
_local7++;
};
_local9 = MovieClip(_gameScreen.linesHolder.addChild(new FinishLine1Element()));
_local9.x = ((10 * _m10Distance) + _initX);
_sprintControls = new Controls(stage);
_momentum1 = 0;
_local10 = Object(parent)._playerAthlete;
_player1 = Player1Model(_gameScreen.p1Holder.addChild(new (_local10)));
_player1.x = _gameScreen.player1.x;
_player1.y = _gameScreen.player1.y;
_player1.scaleX = -(_gameScreen.player1.scaleX);
_player1.scaleY = _gameScreen.player1.scaleY;
_local11 = MovieClip(_player1.upperLeg1.addChild(new shortFlag()));
_local11.gotoAndStop(Object(parent)._playerCountry);
_local11.x = (_local11.x - 40);
_local11.y = (_local11.y + 40);
_gameScreen.player1.visible = false;
_gameScreen.player1 = null;
_player1.head.stop();
_cam1X = 0;
_momentum2 = 0;
_local12 = Math.ceil((Math.random() * 4));
if (_local12 == 1){
_player2 = Player1Model(_gameScreen.p2Holder.addChild(new player1Sprite()));
};
if (_local12 == 2){
_player2 = Player1Model(_gameScreen.p2Holder.addChild(new player2Sprite()));
};
if (_local12 == 3){
_player2 = Player1Model(_gameScreen.p2Holder.addChild(new player3Sprite()));
};
if (_local12 == 4){
_player2 = Player1Model(_gameScreen.p2Holder.addChild(new player4Sprite()));
};
_player2.x = _gameScreen.player2.x;
_player2.y = _gameScreen.player2.y;
_player2.scaleX = -(_gameScreen.player2.scaleX);
_player2.scaleY = _gameScreen.player2.scaleY;
_gameScreen.player2.visible = false;
_gameScreen.player2 = null;
_player2.head.stop();
movePlayer1();
movePlayer2();
addChild(_HUD);
startCountDown();
}
private function enterFrameHandler(_arg1:Event):void{
if (_foul){
return;
};
movePlayer1();
movePlayer2();
animatePlayer1();
animatePlayer2();
updateHUD();
checkDistance();
incrementRaceTimer();
controlPlayer2();
}
private function checkCountDown(_arg1:TimerEvent):void{
var _local2:Array;
var _local3:Sound;
_countDownNum--;
if (_countDownNum == 1){
_HUD.countdown.gotoAndPlay("getSet");
startControls();
};
if (_countDownNum == 0){
if (!_raceStarted){
_local3 = new gunSND();
_local3.play(0, 1);
};
_HUD.countdown.gotoAndPlay("go");
_raceStarted = true;
startGameHandlers();
_local2 = new Array();
_startBlockWeight = 1;
_local2.push(0);
_local2.push(0);
_local2.push(0);
_local2.push(_startBlockWeight);
_local2.push(0);
_local2.push(0);
_local2.push(0);
_local2.push(0);
_local2.push(0);
_player1.weightings = _local2;
_player1.normaliseWeights();
_player2.weightings = _local2;
_player2.normaliseWeights();
};
if (_countDownNum == -1){
_HUD.countDownTXT.text = "";
stopCountDown();
};
}
private function checkDistance():void{
var _local1:Number;
_local1 = ((_player1.x - _initX) / _m10Distance);
if (((((_local1 * 10) > 100)) && (!(_raceFinished)))){
stopControls();
_raceFinishTime = (_raceTime / 1000);
_raceFinished = true;
if (_raceFinishTime < 12){
_winWeight = (_winWeight + 10);
};
};
}
private function startControls():void{
_sprintControls.addEventListener(Controls.RUN_PRESSED, runPressedHandler);
}
private function startCountDown():void{
_startBlockTweenTimer = new Timer(20, 0);
_startBlockTweenTimer.addEventListener(TimerEvent.TIMER, startTweener);
_startBlockTweenTimer.start();
_countDownTimer = new Timer(3000, 0);
_countDownTimer.addEventListener(TimerEvent.TIMER, checkCountDown);
_countDownTimer.start();
_HUD.countDownTXT.text = "";
_HUD.countdown.gotoAndPlay("onYourMarks");
setStartBlockPosition1();
}
private function startGameHandlers():void{
addEventListener(Event.ENTER_FRAME, enterFrameHandler);
startControls();
}
private function incrementRaceTimer():void{
_raceTime = (_raceTime + 42);
}
private function controlPlayer2():void{
if (!_raceFinished){
_momentum2 = (_momentum2 + _runPower2);
};
}
private function movePlayer1():void{
var _local1:Number;
var _local2:int;
var _local3:int;
var _local4:int;
var _local5:int;
var _local6:int;
_momentum1 = (_momentum1 * _inertia);
if (Math.abs(_momentum1) < 2.5){
_momentum1 = 0;
};
_player1.x = (_player1.x + (_momentum1 / 2));
_gameScreen.shadow1.x = (_player1.x - 50);
_cam1X = (_cam1X + ((_player1.x - _cam1X) / 6));
if (_cam1X < 220){
_cam1X = 220;
};
_gameScreen.x = -((_cam1X - (stage.stageWidth / 3)));
_local1 = Math.abs(_gameScreen.x);
_local2 = Math.floor((_local1 / _gameScreen.crowdHolder.mc.width));
_gameScreen.crowdHolder.x = (_gameScreen.crowdHolder.mc.width * _local2);
_local3 = Math.floor((_local1 / _gameScreen.bannerHolder.mc.width));
_gameScreen.bannerHolder.x = (_gameScreen.bannerHolder.mc.width * _local3);
_local4 = Math.floor((_local1 / _gameScreen.grassHolder.mc.width));
_gameScreen.grassHolder.x = (_gameScreen.grassHolder.mc.width * _local4);
_local5 = Math.floor((_local1 / _gameScreen.track2Holder.mc.width));
_gameScreen.track2Holder.x = (_gameScreen.track2Holder.mc.width * _local5);
_local6 = Math.floor((_local1 / _gameScreen.track1Holder.mc.width));
_gameScreen.track1Holder.x = (_gameScreen.track1Holder.mc.width * _local6);
}
private function movePlayer2():void{
_momentum2 = (_momentum2 * _inertia);
if (((_raceFinished) && ((Math.abs(_momentum2) < 4)))){
_momentum2 = 0;
};
_player2.x = (_player2.x + (_momentum2 / 2));
_gameScreen.shadow2.x = (_player2.x - 50);
}
private function setStartBlockPosition1():void{
var _local1:Array;
_local1 = new Array();
_local1.push(0);
_local1.push(0);
_local1.push(1);
_local1.push(0);
_local1.push(0);
_local1.push(0);
_local1.push(0);
_local1.push(0);
_local1.push(0);
_player1.weightings = _local1;
_player1.normaliseWeights();
_player1.animate();
_player2.weightings = _local1;
_player2.normaliseWeights();
_player2.animate();
}
private function updateHUD():void{
var _local1:Sound;
if (!_raceFinished){
_HUD.distanceTXT.text = ((((_player1.x - _initX) / _m10Distance) * 10).toFixed(1) + " metres");
_HUD.timeTXT.text = ((_raceTime / 1000).toFixed(3) + " seconds");
} else {
_HUD.distanceTXT.text = (100 + " metres");
_HUD.timeTXT.text = (_raceFinishTime.toFixed(3) + " seconds");
if (!_nextCalled){
Object(parent).nextGame(_raceFinishTime.toFixed(3));
if (_raceFinishTime.toFixed(3) < 12){
_local1 = new qualifySND();
_local1.play(0, 1);
};
};
_nextCalled = true;
};
}
private function animatePlayer1(){
var _local1:Array;
var _local2:Number;
var _local3:Sound;
_soundStepNumber = (_soundStepNumber + _momentum1);
if (_soundStepNumber > 150){
_soundStepNumber = 0;
_local3 = new footSND();
_local3.play(0, 1);
};
_player1.animationSpeed = (_momentum1 / 5);
_local1 = new Array();
_local2 = (_momentum1 / 55);
if (_local2 > 1){
_local2 = 1;
};
if (_local2 > 0.5){
_player1.head.play();
} else {
_player1.head.gotoAndStop(1);
};
_local1.push(_local2);
_local1.push((1 - _local2));
_local1.push(0);
_local1.push(_startBlockWeight);
_local1.push(0);
_local1.push(0);
_local1.push(0);
_local1.push(0);
_local1.push(_winWeight);
_startBlockWeight = (_startBlockWeight * 0.75);
_player1.weightings = _local1;
_player1.normaliseWeights();
_player1.animate();
}
private function stopCountDown():void{
_countDownTimer.removeEventListener(TimerEvent.TIMER, checkCountDown);
_countDownTimer.stop();
_startBlockTweenTimer.removeEventListener(TimerEvent.TIMER, startTweener);
_startBlockTweenTimer.stop();
}
private function runPressedHandler(_arg1:Event):void{
if (!_raceStarted){
Object(parent).nextGame(-1);
_HUD.countDownTXT.text = "";
_foul = true;
destroy();
};
_momentum1 = (_momentum1 + _runPower);
}
private function startTweener(_arg1:TimerEvent):void{
var _local2:Array;
if ((((_countDownNum <= 1)) && ((_countDownNum > 0)))){
_local2 = new Array();
_local2.push(0);
_local2.push(0);
_local2.push(1);
_local2.push(_startBlockWeight);
_local2.push(0);
_local2.push(0);
_local2.push(0);
_local2.push(0);
_local2.push(0);
_startBlockWeight = (_startBlockWeight + 0.2);
_player1.weightings = _local2;
_player1.normaliseWeights();
_player1._currentFrame = 1;
_player1.animate();
_player2.weightings = _local2;
_player2.normaliseWeights();
_player2._currentFrame = 1;
_player2.animate();
};
}
private function stopGameHandlers():void{
removeEventListener(Event.ENTER_FRAME, enterFrameHandler);
stopControls();
}
private function animatePlayer2(){
var _local1:Array;
var _local2:Number;
_player2.animationSpeed = (_momentum2 / 5);
_local1 = new Array();
_local2 = (_momentum2 / 55);
if (_local2 > 1){
_local2 = 1;
};
if (_local2 > 0.5){
_player2.head.play();
} else {
_player2.head.gotoAndStop(1);
};
_local1.push(_local2);
_local1.push((1 - _local2));
_local1.push(0);
_local1.push(_startBlockWeight);
_local1.push(0);
_local1.push(0);
_local1.push(0);
_local1.push(0);
_local1.push(0);
_player2.weightings = _local1;
_player2.normaliseWeights();
_player2.animate();
}
private function stopControls():void{
_sprintControls.removeEventListener(Controls.RUN_PRESSED, runPressedHandler);
}
}
}//package com.doof.trackandfield
Section 11
//TestPHPResults (com.doof.trackandfield.TestPHPResults)
package com.doof.trackandfield {
import flash.events.*;
import flash.display.*;
import com.adobe.crypto.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.system.*;
public class TestPHPResults extends MovieClip {
public var _parentRef:Object;
public var _team:String;
public var _timeStamp:String;
public var _hashedKey:String;
public var _score:Number;
public var _stats:String;
public static var key:String = "-n8#$hphfcnsrxhg7oh9n&r+7rthtniRS?oh";
public function TestPHPResults(_arg1:Object):void{
_parentRef = _arg1;
}
private function buildHashKey():void{
var _local1:String;
_local1 = key.concat(_timeStamp);
_local1 = getSHA1(_local1);
_hashedKey = _local1;
trace(("hashed time.key: " + _local1));
sendScore();
}
private function sendCompleteHandler(_arg1:Event):void{
var _local2:URLLoader;
_local2 = URLLoader(_arg1.target);
trace(("php sent me: " + _local2.data.toString()));
loadIndividuals(1000);
}
private function loadInternationals():void{
var _local1:URLVariables;
var _local2:URLRequest;
var _local3:URLLoader;
_local1 = new URLVariables();
_local1.rnd = Math.floor((Math.random() * 1000));
_local2 = new URLRequest("http://www.doof.com/spoof/olympics/index.php/scores/get_international/");
_local3 = new URLLoader();
_local3.dataFormat = URLLoaderDataFormat.TEXT;
_local2.data = _local1;
_local2.method = URLRequestMethod.POST;
_local3.addEventListener(Event.COMPLETE, internationalsCompleteHandler);
_local3.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);
_local3.load(_local2);
}
private function loadIndividuals(_arg1:int):void{
var _local2:URLVariables;
var _local3:URLRequest;
var _local4:URLLoader;
_local2 = new URLVariables();
_local2.score = _parentRef._totalScore;
_local2.name = _parentRef._playerName;
_local2.rnd = Math.floor((Math.random() * 1000));
_local3 = new URLRequest("http://www.doof.com/spoof/olympics/index.php/scores/get_individual/");
_local4 = new URLLoader();
_local4.dataFormat = URLLoaderDataFormat.TEXT;
_local3.data = _local2;
_local3.method = URLRequestMethod.POST;
_local4.addEventListener(Event.COMPLETE, individualsCompleteHandler);
_local4.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);
_local4.load(_local3);
}
private function sendData(_arg1:String, _arg2:Object):void{
var _local3:URLRequest;
var _local4:URLLoader;
_local3 = new URLRequest(_arg1);
_local4 = new URLLoader();
_local4.dataFormat = URLLoaderDataFormat.TEXT;
_local3.data = _arg2;
_local3.method = URLRequestMethod.POST;
_local4.addEventListener(Event.COMPLETE, sendCompleteHandler);
_local4.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);
_local4.load(_local3);
}
private function getSHA1(_arg1:String):String{
var _local2:String;
_local2 = SHA1.hash(_arg1);
return (_local2);
}
private function internationalsCompleteHandler(_arg1:Event):void{
var _local2:URLLoader;
var _local3:String;
var _local4:Array;
_local2 = URLLoader(_arg1.target);
_local3 = _local2.data.toString();
_local4 = _parentRef.readInternationalString(_local3);
_parentRef.populateIntLeaderboard(_local4);
_parentRef.startScrollHandlers();
}
private function ioErrorHandler(_arg1:IOErrorEvent):void{
trace(("io error generated by " + _arg1.target));
}
private function individualsCompleteHandler(_arg1:Event):void{
var _local2:URLLoader;
var _local3:String;
var _local4:Array;
var _local5:Sound;
_local2 = URLLoader(_arg1.target);
_local3 = _local2.data.toString();
_local4 = _parentRef.readIndividualString(_local3);
_parentRef.populateIndLeaderboard(_local4);
_parentRef.addChild(_parentRef._individualLeaderboard);
_local5 = new titleSND();
_parentRef._introSoundChannel = _local5.play(0, 99999999999);
loadInternationals();
_parentRef._finalResultScreen.board.nextBTN.removeEventListener(MouseEvent.CLICK, _parentRef.showLeaderboards);
}
private function loadTimeCompleteHandler(_arg1:Event):void{
var _local2:URLLoader;
_local2 = URLLoader(_arg1.target);
trace(("time received: " + _local2.data.toString()));
_timeStamp = _local2.data.toString();
buildHashKey();
}
public function startPHP():void{
trace("starting PHP");
Security.allowDomain("*");
Security.allowInsecureDomain("*");
trace("loading crossdomain policy from http://www.doof.com/crossdomain.xml");
Security.loadPolicyFile("http://www.doof.com/crossdomain.xml");
loadTimeURL("http://www.doof.com/spoof/olympics/index.php/timestamp/get/");
}
private function loadTimeURL(_arg1:String):void{
var rnd:Number;
var loader:URLLoader;
var request:URLRequest;
var urlString = _arg1;
rnd = Math.floor((Math.random() * 1000));
urlString = urlString.concat(rnd);
loader = new URLLoader();
loader.addEventListener(Event.COMPLETE, loadTimeCompleteHandler);
loader.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);
request = new URLRequest(urlString);
try {
loader.load(request);
} catch(error:Error) {
trace("Unable to load requested document.");
};
}
private function sendScore():void{
var _local1:URLVariables;
_local1 = new URLVariables();
_local1.key = _hashedKey;
_local1.country = _parentRef._playerCountry;
_local1.score = _parentRef._totalScore;
_local1.name = _parentRef._playerName;
_local1.rnd = Math.floor((Math.random() * 1000));
trace(("Flash is sending vars: " + _local1.toString()));
sendData("http://www.doof.com/spoof/olympics/index.php/scores/process/", _local1);
}
}
}//package com.doof.trackandfield
Section 12
//TripleJumpGame (com.doof.trackandfield.TripleJumpGame)
package com.doof.trackandfield {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.media.*;
import com.doof.animationengine.*;
import flash.text.*;
import flash.filters.*;
public class TripleJumpGame extends Sprite {
private var _jumpPower:Number;// = 20
private var _momentum1:Number;// = 0
private var _gravity:Number;// = 4.5
private var _footWeight:Number;// = 0
private var _player1:Player1Model;
private var _tripleJumpControls:Controls;
private var _HUD:MovieClip;
private var _angleChangeStarted:Boolean;// = false
private var _initX:Number;
private var _cam1X:Number;
private var _pushed:Boolean;// = false
private var _sandSoundPlayed:Boolean;// = false
private var _soundStepNumber:Number;// = 0
private var _angleChangeEnded:Boolean;// = false
private var _initY:Number;
private var _inertia:Number;// = 0.98
private var _backupX:Number;
private var _backupMomentum:Number;// = 0
private var _maxRunTime:Number;// = 4
private var _gameScreen:TripleJumpScreen;
private var _finishTime1:Number;// = 0
private var _runPower:Number;// = 3.5
private var _m10Distance:Number;// = 800
private var _footWeight2:Number;// = 0
private var _runTime:Number;// = 0
private var _jumpNumber:int;// = 0
private var _jumpMomentum:Number;// = 0
private var _jumpWeight:Number;// = 0
private var _nextCalled:Boolean;// = false
private var _foul:Boolean;// = false
public function TripleJumpGame():void{
_gameScreen = new TripleJumpScreen();
_inertia = 0.98;
_m10Distance = 800;
_angleChangeStarted = false;
_angleChangeEnded = false;
_jumpNumber = 0;
_pushed = false;
_jumpWeight = 0;
_footWeight = 0;
_footWeight2 = 0;
_foul = false;
_maxRunTime = 4;
_runTime = 0;
_nextCalled = false;
_momentum1 = 0;
_backupMomentum = 0;
_jumpPower = 20;
_gravity = 4.5;
_jumpMomentum = 0;
_finishTime1 = 0;
_runPower = 3.5;
_HUD = new JumpHUD();
_soundStepNumber = 0;
_sandSoundPlayed = false;
super();
}
public function destroy():void{
stopGameHandlers();
}
private function stopRunControls():void{
_tripleJumpControls.removeEventListener(Controls.RUN_PRESSED, runPressedHandler);
}
private function changeAngle():void{
var _local1:Number;
var _local2:Number;
if (!_foul){
_HUD.jumpAngle.angleQuarter.rotation = (_HUD.jumpAngle.angleQuarter.rotation - 10.5);
if (_HUD.jumpAngle.angleQuarter.rotation < -90){
_HUD.jumpAngle.angleQuarter.rotation = -90;
_angleChangeStarted = false;
_local1 = (_HUD.jumpAngle.angleQuarter.rotation * (Math.PI / 180));
_local2 = (_momentum1 + _jumpPower);
_momentum1 = (Math.cos(_local1) * _local2);
_jumpMomentum = (Math.sin(_local1) * _local2);
stopControls();
_angleChangeEnded = true;
};
};
}
public function init():void{
var _local1:int;
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:int;
var _local7:MovieClip;
var _local8:MovieClip;
var _local9:MovieClip;
var _local10:Class;
var _local11:MovieClip;
var _local12:MovieClip;
var _local13:MovieClip;
var _local14:MovieClip;
var _local15:MovieClip;
stage.focus = this;
addChild(_gameScreen);
_gameScreen.cacheAsBitmap = true;
_initX = _gameScreen.player1.x;
_initY = _gameScreen.player1.y;
_local1 = 2;
_local2 = _gameScreen.crowdHolder.mc.width;
_local3 = _gameScreen.bannerHolder.mc.width;
_local4 = _gameScreen.grassHolder.mc.width;
_local5 = _gameScreen.track1Holder.mc.width;
_local6 = 1;
while (_local6 <= _local1) {
_local12 = MovieClip(_gameScreen.crowdHolder.addChild(new CrowdElement()));
_local12.x = (_local6 * _local2);
_local13 = MovieClip(_gameScreen.bannerHolder.addChild(new BannerElement()));
_local13.x = (_local6 * _local3);
_local14 = MovieClip(_gameScreen.grassHolder.addChild(new GrassElement()));
_local14.x = (_local6 * _local4);
_local15 = MovieClip(_gameScreen.track1Holder.addChild(new Track3Element()));
_local15.x = (_local6 * _local5);
_local6++;
};
_local7 = MovieClip(_gameScreen.sandBoxHolder.addChild(new SandBox2Element()));
_local7.x = (5 * _m10Distance);
_local8 = MovieClip(_gameScreen.sandBoxHolder.addChild(new JumpPadElement()));
_local8.x = (_local7.x - 100);
_local9 = MovieClip(_gameScreen.sandBoxHolder.addChild(new TripleStartLineElement()));
_local9.x = (2.5 * _m10Distance);
_tripleJumpControls = new Controls(stage);
_momentum1 = 0;
_local10 = Object(parent)._playerAthlete;
_player1 = Player1Model(_gameScreen.p1Holder.addChild(new (_local10)));
_player1.x = _gameScreen.player1.x;
_player1.y = _gameScreen.player1.y;
_player1.scaleX = -(_gameScreen.player1.scaleX);
_player1.scaleY = _gameScreen.player1.scaleY;
_local11 = MovieClip(_player1.upperLeg1.addChild(new shortFlag()));
_local11.gotoAndStop(Object(parent)._playerCountry);
_local11.x = (_local11.x - 40);
_local11.y = (_local11.y + 40);
_gameScreen.player1.visible = false;
_gameScreen.player1 = null;
_player1.head.stop();
_cam1X = 0;
movePlayer1();
addChild(_HUD);
startGameHandlers();
}
private function enterFrameHandler(_arg1:Event):void{
movePlayer1();
animatePlayer1();
updateHUD();
checkFoul();
if (_angleChangeStarted){
changeAngle();
};
}
private function checkDistance():void{
var _local1:Number;
_local1 = (((_player1.x - _initX) / _m10Distance) * 10);
}
private function startGameHandlers():void{
addEventListener(Event.ENTER_FRAME, enterFrameHandler);
startControls();
}
private function startControls():void{
_tripleJumpControls.addEventListener(Controls.RUN_PRESSED, runPressedHandler);
_tripleJumpControls.addEventListener(Controls.JUMP_PRESSED, jumpPressedHandler);
_tripleJumpControls.addEventListener(Controls.JUMP_RELEASED, jumpReleasedHandler);
}
private function jumpReleasedHandler(_arg1:Event):void{
var _local2:Number;
var _local3:Sound;
var _local4:Number;
if (((!(_foul)) && (_angleChangeStarted))){
_angleChangeStarted = false;
_angleChangeEnded = true;
_local2 = (_HUD.jumpAngle.angleQuarter.rotation * (Math.PI / 180));
if (_jumpNumber == 0){
_local4 = (_momentum1 + _jumpPower);
} else {
_local4 = (_backupMomentum + _jumpPower);
};
_momentum1 = (Math.cos(_local2) * _local4);
_jumpMomentum = (Math.sin(_local2) * _local4);
_jumpNumber++;
if (_jumpNumber == 3){
_player1._currentFrame = 1;
};
stopControls();
_local3 = new gruntSND();
_local3.play(0, 1);
};
}
private function checkFoul():void{
if ((((_player1.x > ((_m10Distance * 2.5) + 20))) && ((_jumpNumber <= 0)))){
stopControls();
_HUD.messageTXT.text = "";
_foul = true;
if (!_nextCalled){
Object(parent).nextGame(-1);
};
_nextCalled = true;
};
}
private function animatePlayer1():void{
var _local1:Array;
var _local2:Number;
_player1.animationSpeed = (_momentum1 / 5);
_local1 = new Array();
_local2 = (_momentum1 / 55);
if (_local2 > 1){
_local2 = 1;
};
if (_local2 > 0.5){
_player1.head.play();
} else {
_player1.head.gotoAndStop(1);
};
if (((_angleChangeEnded) && ((_jumpNumber >= 3)))){
_footWeight = 0;
_jumpWeight = (_jumpWeight + 0.5);
_player1.animationSpeed = 4;
if (_player1._currentFrame >= 90){
_player1._currentFrame = 90;
};
};
if (((_angleChangeEnded) && ((_jumpNumber == 1)))){
_runWeight = 0;
_footWeight2 = (_footWeight2 + 3);
};
if (((_angleChangeEnded) && ((_jumpNumber == 2)))){
_footWeight2 = (_footWeight2 / 2);
_footWeight = (_footWeight + 5);
};
if (_jumpNumber == 3){
_footWeight = 0;
_footWeight2 = 0;
};
_local1.push(_local2);
_local1.push((1 - _local2));
_local1.push(0);
_local1.push(0);
_local1.push(0);
_local1.push(_jumpWeight);
_local1.push(_footWeight);
_local1.push(_footWeight2);
_local1.push(0);
_player1.weightings = _local1;
_player1.normaliseWeights();
_player1.animate();
}
private function movePlayer1():void{
var _local1:Number;
var _local2:int;
var _local3:int;
var _local4:int;
var _local5:int;
var _local6:Sound;
var _local7:Number;
var _local8:Sound;
var _local9:Sound;
if ((((_player1.y == _initY)) && (!(_angleChangeStarted)))){
_soundStepNumber = (_soundStepNumber + _momentum1);
if (_soundStepNumber > 150){
_soundStepNumber = 0;
_local6 = new footSND();
_local6.play(0, 1);
};
if ((((_jumpNumber <= 0)) || (_foul))){
_momentum1 = (_momentum1 * _inertia);
};
if (_pushed){
_runTime++;
if (_runTime > _maxRunTime){
stopControls();
_HUD.messageTXT.text = "";
_foul = true;
if (!_nextCalled){
Object(parent).nextGame(-1);
};
_nextCalled = true;
};
};
};
if (Math.abs(_momentum1) < 2.5){
_momentum1 = 0;
};
_player1.x = (_player1.x + (_momentum1 / 2));
if (!_angleChangeStarted){
_backupX = _player1.x;
if (_jumpNumber == 0){
_backupMomentum = _momentum1;
};
} else {
_player1.x = _backupX;
};
if (!_angleChangeEnded){
if (_player1.y > _initY){
_player1.y = _initY;
_jumpMomentum = 0;
};
} else {
_jumpMomentum = (_jumpMomentum + _gravity);
_player1.y = (_player1.y + (_jumpMomentum / 2));
if (_player1.y > (_initY + 50)){
_player1.y = (_initY + 50);
_jumpMomentum = 0;
_momentum1 = 0;
if (_jumpNumber >= 3){
if (!_sandSoundPlayed){
_local8 = new sandSND();
_local8.play(0, 1);
_sandSoundPlayed = true;
};
_local7 = (((_player1.x - ((5 * _m10Distance) + 0x0101)) / 100) + 16);
_HUD.distanceTXT.text = (_local7.toFixed(3) + " metres");
if (!_nextCalled){
Object(parent).nextGame(_local7.toFixed(3));
_local9 = new qualifySND();
_local9.play(0, 1);
};
_nextCalled = true;
} else {
_runTime = 0;
_jumpWeight = 0;
_angleChangeStarted = false;
_angleChangeEnded = false;
_HUD.jumpAngle.angleQuarter.rotation = 0;
_momentum1 = 0;
startControls();
stopRunControls();
};
};
};
_cam1X = (_cam1X + ((_player1.x - _cam1X) / 1));
if (_cam1X < 220){
_cam1X = 220;
};
_gameScreen.shadow1.x = (_player1.x - 50);
_gameScreen.x = -((_cam1X - (stage.stageWidth / 3)));
_local1 = Math.abs(_gameScreen.x);
_local2 = Math.floor((_local1 / _gameScreen.crowdHolder.mc.width));
_gameScreen.crowdHolder.x = (_gameScreen.crowdHolder.mc.width * _local2);
_local3 = Math.floor((_local1 / _gameScreen.bannerHolder.mc.width));
_gameScreen.bannerHolder.x = (_gameScreen.bannerHolder.mc.width * _local3);
_local4 = Math.floor((_local1 / _gameScreen.grassHolder.mc.width));
_gameScreen.grassHolder.x = (_gameScreen.grassHolder.mc.width * _local4);
_local5 = Math.floor((_local1 / _gameScreen.track1Holder.mc.width));
_gameScreen.track1Holder.x = (_gameScreen.track1Holder.mc.width * _local5);
}
private function updateHUD():void{
if (!_angleChangeEnded){
_HUD.distanceTXT.text = (0 + " metres");
};
}
private function runPressedHandler(_arg1:Event):void{
_momentum1 = (_momentum1 + _runPower);
}
private function jumpPressedHandler(_arg1:Event):void{
_pushed = true;
if (!_angleChangeStarted){
_footWeight = 10;
_angleChangeStarted = true;
};
}
private function stopGameHandlers():void{
removeEventListener(Event.ENTER_FRAME, enterFrameHandler);
stopControls();
}
private function stopControls():void{
_tripleJumpControls.removeEventListener(Controls.RUN_PRESSED, runPressedHandler);
_tripleJumpControls.removeEventListener(Controls.JUMP_PRESSED, jumpPressedHandler);
_tripleJumpControls.removeEventListener(Controls.JUMP_RELEASED, jumpReleasedHandler);
}
}
}//package com.doof.trackandfield
Section 13
//GameConnectorAS3 (com.tmgc.gameconnector.GameConnectorAS3)
package com.tmgc.gameconnector {
public dynamic class GameConnectorAS3 extends Connector {
}
}//package com.tmgc.gameconnector
Section 14
//bannerHolder_43 (TrackAndField_fla.bannerHolder_43)
package TrackAndField_fla {
import flash.display.*;
public dynamic class bannerHolder_43 extends MovieClip {
public var mc:BannerElement;
}
}//package TrackAndField_fla
Section 15
//countdown_32 (TrackAndField_fla.countdown_32)
package TrackAndField_fla {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.system.*;
import flash.filters.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.geom.*;
import flash.ui.*;
public dynamic class countdown_32 extends MovieClip {
public function countdown_32(){
addFrameScript(17, frame18, 36, frame37, 55, frame56);
}
function frame18(){
stop();
}
function frame37(){
stop();
}
function frame56(){
stop();
visible = false;
parent.removeChild(this);
}
}
}//package TrackAndField_fla
Section 16
//crowdHolder_41 (TrackAndField_fla.crowdHolder_41)
package TrackAndField_fla {
import flash.display.*;
public dynamic class crowdHolder_41 extends MovieClip {
public var mc:CrowdElement;
}
}//package TrackAndField_fla
Section 17
//grassHolder_45 (TrackAndField_fla.grassHolder_45)
package TrackAndField_fla {
import flash.display.*;
public dynamic class grassHolder_45 extends MovieClip {
public var mc:GrassElement;
}
}//package TrackAndField_fla
Section 18
//jump_angle_37 (TrackAndField_fla.jump_angle_37)
package TrackAndField_fla {
import flash.display.*;
public dynamic class jump_angle_37 extends MovieClip {
public var angleQuarter:MovieClip;
}
}//package TrackAndField_fla
Section 19
//leaderboardRow_218 (TrackAndField_fla.leaderboardRow_218)
package TrackAndField_fla {
import flash.display.*;
import flash.text.*;
public dynamic class leaderboardRow_218 extends MovieClip {
public var flag:MovieClip;
public var rankTXT:TextField;
public var scoreTXT:TextField;
public var nameTXT:TextField;
}
}//package TrackAndField_fla
Section 20
//leaderboardRow2_225 (TrackAndField_fla.leaderboardRow2_225)
package TrackAndField_fla {
import flash.display.*;
import flash.text.*;
public dynamic class leaderboardRow2_225 extends MovieClip {
public var flag:MovieClip;
public var rankTXT:TextField;
public var scoreTXT:TextField;
}
}//package TrackAndField_fla
Section 21
//scoreboard_final_13 (TrackAndField_fla.scoreboard_final_13)
package TrackAndField_fla {
import flash.display.*;
import flash.text.*;
public dynamic class scoreboard_final_13 extends MovieClip {
public var eventNameTXT:TextField;
public var hurdleScoreTXT:TextField;
public var nextBTN:SimpleButton;
public var tripleJumpScoreTXT:TextField;
public var longJumpScoreTXT:TextField;
public var sprintScoreTXT:TextField;
public var totalScoreTXT:TextField;
}
}//package TrackAndField_fla
Section 22
//scoreboard_results_5 (TrackAndField_fla.scoreboard_results_5)
package TrackAndField_fla {
import flash.display.*;
import flash.text.*;
public dynamic class scoreboard_results_5 extends MovieClip {
public var eventNameTXT:TextField;
public var result1TXT:TextField;
public var attempt2TXT:TextField;
public var nextBTN:SimpleButton;
public var result2TXT:TextField;
public var attempt3TXT:TextField;
public var attempt1TXT:TextField;
public var smallGuy:MovieClip;
public var result3TXT:TextField;
public var nameTXT:TextField;
}
}//package TrackAndField_fla
Section 23
//scrollScores_224 (TrackAndField_fla.scrollScores_224)
package TrackAndField_fla {
import flash.display.*;
public dynamic class scrollScores_224 extends MovieClip {
public var row12:MovieClip;
public var row13:MovieClip;
public var row16:MovieClip;
public var row14:MovieClip;
public var row17:MovieClip;
public var row18:MovieClip;
public var row19:MovieClip;
public var row1:MovieClip;
public var row20:MovieClip;
public var row3:MovieClip;
public var row4:MovieClip;
public var row7:MovieClip;
public var row2:MovieClip;
public var row10:MovieClip;
public var row11:MovieClip;
public var row5:MovieClip;
public var row15:MovieClip;
public var row6:MovieClip;
public var row9:MovieClip;
public var row8:MovieClip;
}
}//package TrackAndField_fla
Section 24
//sprinter_2_button_244 (TrackAndField_fla.sprinter_2_button_244)
package TrackAndField_fla {
import flash.display.*;
public dynamic class sprinter_2_button_244 extends MovieClip {
public var sprinter:MovieClip;
}
}//package TrackAndField_fla
Section 25
//sprinter_2_select_245 (TrackAndField_fla.sprinter_2_select_245)
package TrackAndField_fla {
import flash.display.*;
public dynamic class sprinter_2_select_245 extends MovieClip {
public var head:MovieClip;
}
}//package TrackAndField_fla
Section 26
//sprinter_3_button_254 (TrackAndField_fla.sprinter_3_button_254)
package TrackAndField_fla {
import flash.display.*;
public dynamic class sprinter_3_button_254 extends MovieClip {
public var sprinter:MovieClip;
}
}//package TrackAndField_fla
Section 27
//sprinter_3_select_265 (TrackAndField_fla.sprinter_3_select_265)
package TrackAndField_fla {
import flash.display.*;
public dynamic class sprinter_3_select_265 extends MovieClip {
public var head:MovieClip;
}
}//package TrackAndField_fla
Section 28
//sprinter_4_button_264 (TrackAndField_fla.sprinter_4_button_264)
package TrackAndField_fla {
import flash.display.*;
public dynamic class sprinter_4_button_264 extends MovieClip {
public var sprinter:MovieClip;
}
}//package TrackAndField_fla
Section 29
//sprinter_4_select_255 (TrackAndField_fla.sprinter_4_select_255)
package TrackAndField_fla {
import flash.display.*;
public dynamic class sprinter_4_select_255 extends MovieClip {
public var head:MovieClip;
}
}//package TrackAndField_fla
Section 30
//sprinter_button_234 (TrackAndField_fla.sprinter_button_234)
package TrackAndField_fla {
import flash.display.*;
public dynamic class sprinter_button_234 extends MovieClip {
public var sprinter:MovieClip;
}
}//package TrackAndField_fla
Section 31
//sprinter_select_235 (TrackAndField_fla.sprinter_select_235)
package TrackAndField_fla {
import flash.display.*;
public dynamic class sprinter_select_235 extends MovieClip {
public var chest:MovieClip;
public var lowerArm2:MovieClip;
public var torso:MovieClip;
public var upperArm1:MovieClip;
public var upperArm2:MovieClip;
public var lowerLeg1:MovieClip;
public var lowerLeg2:MovieClip;
public var upperLeg2:MovieClip;
public var upperLeg1:MovieClip;
public var head:MovieClip;
public var lowerArm1:MovieClip;
}
}//package TrackAndField_fla
Section 32
//track1Holder_49 (TrackAndField_fla.track1Holder_49)
package TrackAndField_fla {
import flash.display.*;
public dynamic class track1Holder_49 extends MovieClip {
public var mc:Track1Element;
}
}//package TrackAndField_fla
Section 33
//track2Holder_47 (TrackAndField_fla.track2Holder_47)
package TrackAndField_fla {
import flash.display.*;
public dynamic class track2Holder_47 extends MovieClip {
public var mc:Track2Element;
}
}//package TrackAndField_fla
Section 34
//track3Holder_83 (TrackAndField_fla.track3Holder_83)
package TrackAndField_fla {
import flash.display.*;
public dynamic class track3Holder_83 extends MovieClip {
public var mc:Track3Element;
}
}//package TrackAndField_fla
Section 35
//BannerElement (BannerElement)
package {
import flash.display.*;
public dynamic class BannerElement extends MovieClip {
}
}//package
Section 36
//CharacterSelect (CharacterSelect)
package {
import flash.display.*;
import flash.text.*;
public dynamic class CharacterSelect extends MovieClip {
public var player1:MovieClip;
public var player2:MovieClip;
public var player3:MovieClip;
public var player4:MovieClip;
public var startBTN:SimpleButton;
public var playerNameTXT:TextField;
}
}//package
Section 37
//Connector (Connector)
package {
import flash.events.*;
import flash.display.*;
import flash.net.*;
public class Connector extends MovieClip {
private var _onStage:Boolean;
private var _localConnection:LocalConnection;
private var _doofConnectionName:String;// = "doof"
private var _stopGame:Function;
public function Connector():void{
_doofConnectionName = "doof";
super();
trace("allowing all domains");
_localConnection = new LocalConnection();
_localConnection.addEventListener(StatusEvent.STATUS, onStatus);
_localConnection.allowDomain("*");
_onStage = false;
}
public function get stopGame():Function{
return (_stopGame);
}
public function gameStatList(_arg1:Array):void{
if (checkWarning()){
return;
};
trace(("GameConnectorAS3.gameStatList() stats=" + _arg1.toString()));
_localConnection.send(doofConnectionName, "gameStatList", _arg1);
}
public function gameStarted(_arg1:Number):void{
if (checkWarning()){
return;
};
trace(("GameConnectorAS3.gameStarted() initialScore=" + String(_arg1)));
_localConnection.send(doofConnectionName, "gameStarted", _arg1);
}
public function gameStat(_arg1:String, _arg2:String):void{
if (checkWarning()){
return;
};
trace(((("GameConnectorAS3.gameStat() statName=" + _arg1) + ", statValue=") + _arg2));
_localConnection.send(doofConnectionName, "gameStat", _arg1, _arg2);
}
private function addToStage():void{
Object(parent).stage.addChild(this);
}
private function checkWarning():Boolean{
if (parent){
if (!_onStage){
addToStage();
};
return (false);
//unresolved jump
};
trace("WARNING: The Doof GameConnectorAS3 must be added to a DisplayObject/DisplayList to successfully communicate with the Doof API!");
trace("Please add the connector instance to a DisplayObject/DisplayList by using addChild(connector);");
return (true);
}
public function set stopGame(_arg1:Function):void{
_stopGame = _arg1;
}
private function onStatus(_arg1:StatusEvent):void{
switch (_arg1.level){
case "status":
trace("AS3 LocalConnection.send() succeeded");
break;
case "error":
trace("AS3 LocalConnection.send() failed");
break;
};
}
public function gameScore(_arg1:Number):void{
if (checkWarning()){
return;
};
trace(("GameConnectorAS3.gameScore() score=" + String(_arg1)));
_localConnection.send(doofConnectionName, "gameScore", _arg1);
}
public function get doofConnectionName():String{
try {
_doofConnectionName = LoaderInfo(this.root.loaderInfo).parameters["doofConnectionName"];
} catch(error:Error) {
_doofConnectionName = "doof";
};
if ((((_doofConnectionName == null)) || ((_doofConnectionName.length == 0)))){
_doofConnectionName = "doof";
};
return (_doofConnectionName);
}
public function gameEnded(_arg1:Number):void{
if (checkWarning()){
return;
};
trace(("GameConnectorAS3.gameEnded() finalScore=" + String(_arg1)));
_localConnection.send(doofConnectionName, "gameEnded", _arg1);
}
}
}//package
Section 38
//CountrySelect (CountrySelect)
package {
import flash.display.*;
public dynamic class CountrySelect extends MovieClip {
public var japan:SimpleButton;
public var skorea:SimpleButton;
public var france:SimpleButton;
public var iran:SimpleButton;
public var russia:SimpleButton;
public var india:SimpleButton;
public var china:SimpleButton;
public var brazil:SimpleButton;
public var usa:SimpleButton;
public var australia:SimpleButton;
public var morroco:SimpleButton;
public var nigeria:SimpleButton;
public var uk:SimpleButton;
public var cameroon:SimpleButton;
public var germany:SimpleButton;
public var mexico:SimpleButton;
public var italy:SimpleButton;
public var jamaica:SimpleButton;
public var spain:SimpleButton;
public var pakistan:SimpleButton;
}
}//package
Section 39
//CrowdElement (CrowdElement)
package {
import flash.display.*;
public dynamic class CrowdElement extends MovieClip {
}
}//package
Section 40
//EndScreen (EndScreen)
package {
import flash.display.*;
import flash.text.*;
public dynamic class EndScreen extends MovieClip {
public var replayBTN:SimpleButton;
public var doofBTN:SimpleButton;
public var scoreTXT:TextField;
public var shareBTN:SimpleButton;
}
}//package
Section 41
//FinalResults (FinalResults)
package {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.system.*;
import flash.filters.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.geom.*;
import flash.ui.*;
public dynamic class FinalResults extends MovieClip {
public var board:MovieClip;
public function FinalResults(){
addFrameScript(14, frame15);
}
function frame15(){
stop();
}
}
}//package
Section 42
//FinishLine1Element (FinishLine1Element)
package {
import flash.display.*;
public dynamic class FinishLine1Element extends MovieClip {
}
}//package
Section 43
//FinishLine2Element (FinishLine2Element)
package {
import flash.display.*;
public dynamic class FinishLine2Element extends MovieClip {
}
}//package
Section 44
//footSND (footSND)
package {
import flash.media.*;
public dynamic class footSND extends Sound {
}
}//package
Section 45
//GameHUD (GameHUD)
package {
import flash.display.*;
import flash.text.*;
public dynamic class GameHUD extends MovieClip {
public var countdown:MovieClip;
public var distanceTXT:TextField;
public var countDownTXT:TextField;
public var timeTXT:TextField;
}
}//package
Section 46
//GrassElement (GrassElement)
package {
import flash.display.*;
public dynamic class GrassElement extends MovieClip {
}
}//package
Section 47
//gruntSND (gruntSND)
package {
import flash.media.*;
public dynamic class gruntSND extends Sound {
}
}//package
Section 48
//gunSND (gunSND)
package {
import flash.media.*;
public dynamic class gunSND extends Sound {
}
}//package
Section 49
//HurdleElement (HurdleElement)
package {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.system.*;
import flash.filters.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.geom.*;
import flash.ui.*;
public dynamic class HurdleElement extends MovieClip {
public function HurdleElement(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package
Section 50
//HurdleScreen (HurdleScreen)
package {
import flash.display.*;
public dynamic class HurdleScreen extends MovieClip {
public var grassHolder:MovieClip;
public var p2Holder:MovieClip;
public var shadow2:MovieClip;
public var shadow1:MovieClip;
public var hurdleHolder1:MovieClip;
public var hurdleHolder2:MovieClip;
public var player1:player3Sprite;
public var player2:player2Sprite;
public var track1Holder:MovieClip;
public var linesHolder:MovieClip;
public var crowdHolder:MovieClip;
public var p1Holder:MovieClip;
public var track2Holder:MovieClip;
public var bannerHolder:MovieClip;
}
}//package
Section 51
//hurdling (hurdling)
package {
import flash.display.*;
public dynamic class hurdling extends MovieClip {
public var chest:MovieClip;
public var lowerArm2:MovieClip;
public var torso:MovieClip;
public var upperArm1:MovieClip;
public var upperArm2:MovieClip;
public var lowerLeg1:MovieClip;
public var lowerLeg2:MovieClip;
public var upperLeg2:MovieClip;
public var upperLeg1:MovieClip;
public var head:MovieClip;
public var lowerArm1:MovieClip;
}
}//package
Section 52
//InstructionsScreen (InstructionsScreen)
package {
import flash.display.*;
public dynamic class InstructionsScreen extends MovieClip {
}
}//package
Section 53
//IntroScreen (IntroScreen)
package {
import flash.display.*;
import flash.text.*;
public dynamic class IntroScreen extends MovieClip {
public var eventNameTXT:TextField;
public var nextBTN:SimpleButton;
public var introTXT:TextField;
public var smallGuy:MovieClip;
}
}//package
Section 54
//introSND (introSND)
package {
import flash.media.*;
public dynamic class introSND extends Sound {
}
}//package
Section 55
//JumpHUD (JumpHUD)
package {
import flash.display.*;
import flash.text.*;
public dynamic class JumpHUD extends MovieClip {
public var distanceTXT:TextField;
public var jumpAngle:MovieClip;
public var messageTXT:TextField;
}
}//package
Section 56
//JumpPadElement (JumpPadElement)
package {
import flash.display.*;
public dynamic class JumpPadElement extends MovieClip {
}
}//package
Section 57
//LeaderboardIndividual (LeaderboardIndividual)
package {
import flash.display.*;
public dynamic class LeaderboardIndividual extends MovieClip {
public var nextBTN:SimpleButton;
public var row1:MovieClip;
public var row2:MovieClip;
public var row3:MovieClip;
public var row4:MovieClip;
public var row7:MovieClip;
public var row9:MovieClip;
public var row5:MovieClip;
public var row6:MovieClip;
public var row8:MovieClip;
}
}//package
Section 58
//LeaderboardInternational (LeaderboardInternational)
package {
import flash.display.*;
public dynamic class LeaderboardInternational extends MovieClip {
public var scores:MovieClip;
public var downBTN:SimpleButton;
public var alphaMask:MovieClip;
public var nextBTN:SimpleButton;
public var upBTN:SimpleButton;
}
}//package
Section 59
//Line1Element (Line1Element)
package {
import flash.display.*;
public dynamic class Line1Element extends MovieClip {
}
}//package
Section 60
//loadingScreen (loadingScreen)
package {
import flash.display.*;
public dynamic class loadingScreen extends MovieClip {
}
}//package
Section 61
//longJump (longJump)
package {
import flash.display.*;
public dynamic class longJump extends MovieClip {
public var chest:MovieClip;
public var lowerArm2:MovieClip;
public var torso:MovieClip;
public var upperArm1:MovieClip;
public var upperArm2:MovieClip;
public var lowerLeg1:MovieClip;
public var lowerLeg2:MovieClip;
public var upperLeg2:MovieClip;
public var upperLeg1:MovieClip;
public var head:MovieClip;
public var lowerArm1:MovieClip;
}
}//package
Section 62
//longJump2 (longJump2)
package {
import flash.display.*;
public dynamic class longJump2 extends MovieClip {
public var chest:MovieClip;
public var lowerArm2:MovieClip;
public var torso:MovieClip;
public var upperArm1:MovieClip;
public var upperArm2:MovieClip;
public var lowerLeg1:MovieClip;
public var lowerLeg2:MovieClip;
public var upperLeg2:MovieClip;
public var upperLeg1:MovieClip;
public var head:MovieClip;
public var lowerArm1:MovieClip;
}
}//package
Section 63
//LongJumpScreen (LongJumpScreen)
package {
import flash.display.*;
public dynamic class LongJumpScreen extends MovieClip {
public var grassHolder:MovieClip;
public var shadow1:MovieClip;
public var sandBoxHolder:MovieClip;
public var player1:player3Sprite;
public var track1Holder:MovieClip;
public var linesHolder:MovieClip;
public var crowdHolder:MovieClip;
public var p1Holder:MovieClip;
public var bannerHolder:MovieClip;
}
}//package
Section 64
//MochiAd (MochiAd)
package {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
public class MochiAd {
public static function getVersion():String{
return ("2.5");
}
public static function showClickAwayAd(_arg1:Object):void{
var DEFAULTS:Object;
var clip:Object;
var ad_timeout:Number;
var mc:MovieClip;
var wh:Array;
var w:Number;
var h:Number;
var chk:MovieClip;
var sendHostProgress:Boolean;
var options = _arg1;
DEFAULTS = {ad_timeout:2000, regpt:"o", method:"showClickAwayAd", res:"300x250", no_bg:true, ad_started:function ():void{
}, ad_finished:function ():void{
}, ad_loaded:function (_arg1:Number, _arg2:Number):void{
}, ad_failed:function ():void{
trace("[MochiAd] Couldn't load an ad, make sure your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_skipped:function ():void{
}};
options = _slot1._parseOptions(options, DEFAULTS);
clip = options.clip;
ad_timeout = options.ad_timeout;
delete options.ad_timeout;
if (!_slot1.load(options)){
options.ad_failed();
options.ad_finished();
return;
};
options.ad_started();
mc = clip._mochiad;
mc["onUnload"] = function ():void{
_slot1._cleanup(mc);
options.ad_finished();
};
wh = _slot1._getRes(options, clip);
w = wh[0];
h = wh[1];
mc.x = (w * 0.5);
mc.y = (h * 0.5);
chk = createEmptyMovieClip(mc, "_mochiad_wait", 3);
chk.ad_timeout = ad_timeout;
chk.started = getTimer();
chk.showing = false;
mc.unloadAd = function ():void{
_slot1.unload(clip);
};
mc.adLoaded = options.ad_loaded;
mc.adSkipped = options.ad_skipped;
mc.rpc = function (_arg1:Number, _arg2:Object):void{
_slot1.rpc(clip, _arg1, _arg2);
};
sendHostProgress = false;
mc.regContLC = function (_arg1:String):void{
mc._containerLCName = _arg1;
};
chk["onEnterFrame"] = function ():void{
var _local1:Object;
var _local2:Number;
var _local3:Boolean;
var _local4:Number;
if (!this.parent){
delete this.onEnterFrame;
return;
};
_local1 = this.parent._mochiad_ctr;
_local2 = (getTimer() - this.started);
_local3 = false;
if (!chk.showing){
_local4 = this.parent._mochiad_ctr.contentLoaderInfo.bytesTotal;
if (_local4 > 0){
chk.showing = true;
_local3 = true;
chk.started = getTimer();
} else {
if (_local2 > chk.ad_timeout){
options.ad_failed();
_local3 = true;
};
};
};
if (this.root == null){
_local3 = true;
};
if (_local3){
delete this.onEnterFrame;
};
};
doOnEnterFrame(chk);
}
public static function _isNetworkAvailable():Boolean{
return (!((Security.sandboxType == "localWithFile")));
}
public static function _allowDomains(_arg1:String):String{
var _local2:String;
_local2 = _arg1.split("/")[2].split(":")[0];
Security.allowDomain("*");
Security.allowDomain(_local2);
Security.allowInsecureDomain("*");
Security.allowInsecureDomain(_local2);
return (_local2);
}
public static function unload(_arg1:Object):Boolean{
if (((_arg1.clip) && (_arg1.clip._mochiad))){
_arg1 = _arg1.clip;
};
if (_arg1.origFrameRate != undefined){
_arg1.stage.frameRate = _arg1.origFrameRate;
};
if (!_arg1._mochiad){
return (false);
};
if (_arg1._mochiad._containerLCName != undefined){
_arg1._mochiad.lc.send(_arg1._mochiad._containerLCName, "notify", {id:"unload"});
};
if (_arg1._mochiad.onUnload){
_arg1._mochiad.onUnload();
};
delete _arg1._mochiad_loaded;
delete _arg1._mochiad;
return (true);
}
public static function showInterLevelAd(_arg1:Object):void{
var DEFAULTS:Object;
var clip:Object;
var ad_msec:Number;
var ad_timeout:Number;
var fadeout_time:Number;
var mc:MovieClip;
var wh:Array;
var w:Number;
var h:Number;
var chk:MovieClip;
var options = _arg1;
DEFAULTS = {ad_timeout:2000, fadeout_time:250, regpt:"o", method:"showTimedAd", ad_started:function ():void{
if ((this.clip is MovieClip)){
this.clip.stop();
} else {
throw (new Error("MochiAd.showInterLevelAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers."));
};
}, ad_finished:function ():void{
if ((this.clip is MovieClip)){
this.clip.play();
} else {
throw (new Error("MochiAd.showInterLevelAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers."));
};
}, ad_loaded:function (_arg1:Number, _arg2:Number):void{
}, ad_failed:function ():void{
trace("[MochiAd] Couldn't load an ad, make sure your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_skipped:function ():void{
}};
options = _slot1._parseOptions(options, DEFAULTS);
clip = options.clip;
ad_msec = 11000;
ad_timeout = options.ad_timeout;
delete options.ad_timeout;
fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!_slot1.load(options)){
options.ad_failed();
options.ad_finished();
return;
};
options.ad_started();
mc = clip._mochiad;
mc["onUnload"] = function ():void{
_slot1._cleanup(mc);
options.ad_finished();
};
wh = _slot1._getRes(options, clip);
w = wh[0];
h = wh[1];
mc.x = (w * 0.5);
mc.y = (h * 0.5);
chk = createEmptyMovieClip(mc, "_mochiad_wait", 3);
chk.ad_msec = ad_msec;
chk.ad_timeout = ad_timeout;
chk.started = getTimer();
chk.showing = false;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function ():void{
var _local1:Number;
if (!this.parent){
delete this.onEnterFrame;
delete this.fadeFunction;
return;
};
_local1 = (100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time)));
if (_local1 > 0){
this.parent.alpha = (_local1 * 0.01);
} else {
_slot1.unload(clip);
delete this["onEnterFrame"];
};
};
mc.unloadAd = function ():void{
_slot1.unload(clip);
};
mc.adLoaded = options.ad_loaded;
mc.adSkipped = options.ad_skipped;
mc.adjustProgress = function (_arg1:Number):void{
var _local2:Object;
_local2 = mc._mochiad_wait;
_local2.server_control = true;
_local2.showing = true;
_local2.started = getTimer();
_local2.ad_msec = (_arg1 - 250);
};
mc.rpc = function (_arg1:Number, _arg2:Object):void{
_slot1.rpc(clip, _arg1, _arg2);
};
chk["onEnterFrame"] = function ():void{
var _local1:Object;
var _local2:Number;
var _local3:Boolean;
var _local4:Number;
if (!this.parent){
delete this.onEnterFrame;
delete this.fadeFunction;
return;
};
_local1 = this.parent._mochiad_ctr;
_local2 = (getTimer() - this.started);
_local3 = false;
if (!chk.showing){
_local4 = this.parent._mochiad_ctr.contentLoaderInfo.bytesTotal;
if (_local4 > 0){
chk.showing = true;
chk.started = getTimer();
_slot1.adShowing(clip);
} else {
if (_local2 > chk.ad_timeout){
options.ad_failed();
_local3 = true;
};
};
};
if (_local2 > chk.ad_msec){
_local3 = true;
};
if (_local3){
if (this.server_control){
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = this.fadeFunction;
};
};
};
doOnEnterFrame(chk);
}
public static function _parseOptions(_arg1:Object, _arg2:Object):Object{
var _local3:Object;
var _local4:String;
var _local5:Array;
var _local6:Number;
var _local7:Array;
_local3 = {};
for (_local4 in _arg2) {
_local3[_local4] = _arg2[_local4];
};
if (_arg1){
for (_local4 in _arg1) {
_local3[_local4] = _arg1[_local4];
};
};
if (_local3.clip == undefined){
throw (new Error("MochiAd is missing the 'clip' parameter. This should be a MovieClip, Sprite or an instance of a class that extends MovieClip or Sprite."));
};
_arg1 = _local3.clip.loaderInfo.parameters.mochiad_options;
if (_arg1){
_local5 = _arg1.split("&");
_local6 = 0;
while (_local6 < _local5.length) {
_local7 = _local5[_local6].split("=");
_local3[unescape(_local7[0])] = unescape(_local7[1]);
_local6++;
};
};
if (_local3.id == "test"){
trace("[MochiAd] WARNING: Using the MochiAds test identifier, make sure to use the code from your dashboard, not this example!");
};
return (_local3);
}
public static function _cleanup(_arg1:Object):void{
var idx:Number;
var k:String;
var lc:LocalConnection;
var f:Function;
var mc = _arg1;
if (("lc" in mc)){
lc = mc.lc;
f = function ():void{
try {
lc.client = null;
lc.close();
} catch(e:Error) {
};
};
setTimeout(f, 0);
};
idx = DisplayObjectContainer(mc).numChildren;
while (idx > 0) {
idx = (idx - 1);
DisplayObjectContainer(mc).removeChildAt(idx);
};
for (k in mc) {
delete mc[k];
};
}
public static function load(_arg1:Object):MovieClip{
var DEFAULTS:Object;
var clip:Object;
var depth:Number;
var mc:MovieClip;
var wh:Array;
var lv:URLVariables;
var k:String;
var server:String;
var hostname:String;
var lc:LocalConnection;
var name:String;
var loader:Loader;
var g:Function;
var req:URLRequest;
var v:Object;
var options = _arg1;
DEFAULTS = {server:"http://x.mochiads.com/srv/1/", method:"load", depth:10333, id:"_UNKNOWN_"};
options = _slot1._parseOptions(options, DEFAULTS);
options.swfv = 9;
options.mav = _slot1.getVersion();
clip = options.clip;
if (!_slot1._isNetworkAvailable()){
return (null);
};
try {
if (clip._mochiad_loaded){
return (null);
};
} catch(e:Error) {
throw (new Error("MochiAd requires a clip that is an instance of a dynamic class. If your class extends Sprite or MovieClip, you must make it dynamic."));
};
depth = options.depth;
delete options.depth;
mc = createEmptyMovieClip(clip, "_mochiad", depth);
wh = _slot1._getRes(options, clip);
options.res = ((wh[0] + "x") + wh[1]);
options.server = (options.server + options.id);
delete options.id;
clip._mochiad_loaded = true;
if (clip.loaderInfo.loaderURL.indexOf("http") == 0){
options.as3_swf = clip.loaderInfo.loaderURL;
};
lv = new URLVariables();
for (k in options) {
v = options[k];
if (!(v is Function)){
lv[k] = v;
};
};
server = lv.server;
delete lv.server;
hostname = _allowDomains(server);
lc = new LocalConnection();
lc.client = mc;
name = ["", Math.floor(new Date().getTime()), Math.floor((Math.random() * 999999))].join("_");
lc.allowDomain("*", "localhost");
lc.allowInsecureDomain("*", "localhost");
lc.connect(name);
mc.lc = lc;
mc.lcName = name;
lv.lc = name;
lv.st = getTimer();
loader = new Loader();
g = function (_arg1:Object):void{
_arg1.target.removeEventListener(_arg1.type, arguments.callee);
_slot1.unload(clip);
};
loader.contentLoaderInfo.addEventListener(Event.UNLOAD, g);
req = new URLRequest((server + ".swf"));
req.contentType = "application/x-www-form-urlencoded";
req.method = URLRequestMethod.POST;
req.data = lv;
loader.load(req);
mc.addChild(loader);
mc._mochiad_ctr = loader;
return (mc);
}
public static function runMethod(_arg1:Object, _arg2:String, _arg3:Array):Object{
var _local4:Array;
var _local5:Number;
_local4 = _arg2.split(".");
_local5 = 0;
while (_local5 < (_local4.length - 1)) {
if ((((_arg1[_local4[_local5]] == undefined)) || ((_arg1[_local4[_local5]] == null)))){
return (undefined);
};
_arg1 = _arg1[_local4[_local5]];
_local5++;
};
if (typeof(_arg1[_local4[_local5]]) == "function"){
return (_arg1[_local4[_local5]].apply(_arg1, _arg3));
};
return (undefined);
}
public static function createEmptyMovieClip(_arg1:Object, _arg2:String, _arg3:Number):MovieClip{
var _local4:MovieClip;
_local4 = new MovieClip();
if (((false) && (_arg3))){
_arg1.addChildAt(_local4, _arg3);
} else {
_arg1.addChild(_local4);
};
_arg1[_arg2] = _local4;
_local4["_name"] = _arg2;
return (_local4);
}
public static function _getRes(_arg1:Object, _arg2:Object):Array{
var _local3:Object;
var _local4:Number;
var _local5:Number;
var _local6:Array;
_local3 = _arg2.getBounds(_arg2.root);
_local4 = 0;
_local5 = 0;
if (typeof(_arg1.res) != "undefined"){
_local6 = _arg1.res.split("x");
_local4 = parseFloat(_local6[0]);
_local5 = parseFloat(_local6[1]);
} else {
_local4 = _local3.width;
_local5 = _local3.height;
};
if ((((_local4 == 0)) || ((_local5 == 0)))){
_local4 = _arg2.stage.stageWidth;
_local5 = _arg2.stage.stageHeight;
};
return ([_local4, _local5]);
}
public static function adShowing(_arg1:Object):void{
_arg1.origFrameRate = _arg1.stage.frameRate;
_arg1.stage.frameRate = 30;
}
public static function getValue(_arg1:Object, _arg2:String):Object{
var _local3:Array;
var _local4:Number;
_local3 = _arg2.split(".");
_local4 = 0;
while (_local4 < (_local3.length - 1)) {
if ((((_arg1[_local3[_local4]] == undefined)) || ((_arg1[_local3[_local4]] == null)))){
return (undefined);
};
_arg1 = _arg1[_local3[_local4]];
_local4++;
};
return (_arg1[_local3[_local4]]);
}
public static function rpc(_arg1:Object, _arg2:Number, _arg3:Object):void{
var _local4:Object;
var _local5:Object;
switch (_arg3.id){
case "setValue":
_slot1.setValue(_arg1, _arg3.objectName, _arg3.value);
break;
case "getValue":
_local4 = _slot1.getValue(_arg1, _arg3.objectName);
_arg1._mochiad.lc.send(_arg1._mochiad._containerLCName, "rpcResult", _arg2, _local4);
break;
case "runMethod":
_local5 = _slot1.runMethod(_arg1, _arg3.method, _arg3.args);
_arg1._mochiad.lc.send(_arg1._mochiad._containerLCName, "rpcResult", _arg2, _local5);
break;
default:
trace(("[mochiads rpc] unknown rpc id: " + _arg3.id));
};
}
public static function setValue(_arg1:Object, _arg2:String, _arg3:Object):void{
var _local4:Array;
var _local5:Number;
_local4 = _arg2.split(".");
_local5 = 0;
while (_local5 < (_local4.length - 1)) {
if ((((_arg1[_local4[_local5]] == undefined)) || ((_arg1[_local4[_local5]] == null)))){
return;
};
_arg1 = _arg1[_local4[_local5]];
_local5++;
};
_arg1[_local4[_local5]] = _arg3;
}
public static function showPreGameAd(_arg1:Object):void{
var DEFAULTS:Object;
var clip:Object;
var ad_msec:Number;
var ad_timeout:Number;
var fadeout_time:Number;
var mc:MovieClip;
var wh:Array;
var w:Number;
var h:Number;
var chk:MovieClip;
var bar:MovieClip;
var bar_color:Number;
var bar_background:Number;
var bar_outline:Number;
var backing_mc:MovieClip;
var backing:Object;
var inside_mc:MovieClip;
var inside:Object;
var outline_mc:MovieClip;
var outline:Object;
var complete:Boolean;
var unloaded:Boolean;
var f:Function;
var sendHostProgress:Boolean;
var r:MovieClip;
var options = _arg1;
DEFAULTS = {ad_timeout:3000, fadeout_time:250, regpt:"o", method:"showPreloaderAd", color:0xFF8A00, background:16777161, outline:13994812, no_progress_bar:false, ad_started:function ():void{
if ((this.clip is MovieClip)){
this.clip.stop();
} else {
throw (new Error("MochiAd.showPreGameAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers."));
};
}, ad_finished:function ():void{
if ((this.clip is MovieClip)){
this.clip.play();
} else {
throw (new Error("MochiAd.showPreGameAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers."));
};
}, ad_loaded:function (_arg1:Number, _arg2:Number):void{
}, ad_failed:function ():void{
trace("[MochiAd] Couldn't load an ad, make sure your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_skipped:function ():void{
}, ad_progress:function (_arg1:Number):void{
}};
options = _slot1._parseOptions(options, DEFAULTS);
if ("c862232051e0a94e1c3609b3916ddb17".substr(0) == "dfeada81ac97cde83665f81c12da7def"){
options.ad_started();
setTimeout(options.ad_finished, 100);
return;
};
clip = options.clip;
ad_msec = 11000;
ad_timeout = options.ad_timeout;
delete options.ad_timeout;
fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!_slot1.load(options)){
options.ad_failed();
options.ad_finished();
return;
};
options.ad_started();
mc = clip._mochiad;
mc["onUnload"] = function ():void{
var fn:Function;
_slot1._cleanup(mc);
fn = function ():void{
options.ad_finished();
};
setTimeout(fn, 100);
};
wh = _slot1._getRes(options, clip);
w = wh[0];
h = wh[1];
mc.x = (w * 0.5);
mc.y = (h * 0.5);
chk = createEmptyMovieClip(mc, "_mochiad_wait", 3);
chk.x = (w * -0.5);
chk.y = (h * -0.5);
bar = createEmptyMovieClip(chk, "_mochiad_bar", 4);
if (options.no_progress_bar){
bar.visible = false;
delete options.no_progress_bar;
} else {
bar.x = 10;
bar.y = (h - 20);
};
bar_color = options.color;
delete options.color;
bar_background = options.background;
delete options.background;
bar_outline = options.outline;
delete options.outline;
backing_mc = createEmptyMovieClip(bar, "_outline", 1);
backing = backing_mc.graphics;
backing.beginFill(bar_background);
backing.moveTo(0, 0);
backing.lineTo((w - 20), 0);
backing.lineTo((w - 20), 10);
backing.lineTo(0, 10);
backing.lineTo(0, 0);
backing.endFill();
inside_mc = createEmptyMovieClip(bar, "_inside", 2);
inside = inside_mc.graphics;
inside.beginFill(bar_color);
inside.moveTo(0, 0);
inside.lineTo((w - 20), 0);
inside.lineTo((w - 20), 10);
inside.lineTo(0, 10);
inside.lineTo(0, 0);
inside.endFill();
inside_mc.scaleX = 0;
outline_mc = createEmptyMovieClip(bar, "_outline", 3);
outline = outline_mc.graphics;
outline.lineStyle(0, bar_outline, 100);
outline.moveTo(0, 0);
outline.lineTo((w - 20), 0);
outline.lineTo((w - 20), 10);
outline.lineTo(0, 10);
outline.lineTo(0, 0);
chk.ad_msec = ad_msec;
chk.ad_timeout = ad_timeout;
chk.started = getTimer();
chk.showing = false;
chk.last_pcnt = 0;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function ():void{
var _local1:Number;
_local1 = (100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time)));
if (_local1 > 0){
this.parent.alpha = (_local1 * 0.01);
} else {
_slot1.unload(clip);
delete this["onEnterFrame"];
};
};
complete = false;
unloaded = false;
f = function (_arg1:Event):void{
_arg1.target.removeEventListener(_arg1.type, arguments.callee);
complete = true;
if (unloaded){
_slot1.unload(clip);
};
};
clip.loaderInfo.addEventListener(Event.COMPLETE, f);
if ((clip.root is MovieClip)){
r = (clip.root as MovieClip);
if (r.framesLoaded >= r.totalFrames){
complete = true;
};
};
mc.unloadAd = function ():void{
unloaded = true;
if (complete){
_slot1.unload(clip);
};
};
mc.adLoaded = options.ad_loaded;
mc.adSkipped = options.ad_skipped;
mc.adjustProgress = function (_arg1:Number):void{
var _local2:Object;
_local2 = mc._mochiad_wait;
_local2.server_control = true;
_local2.showing = true;
_local2.started = getTimer();
_local2.ad_msec = _arg1;
};
mc.rpc = function (_arg1:Number, _arg2:Object):void{
_slot1.rpc(clip, _arg1, _arg2);
};
mc.rpcTestFn = function (_arg1:String):Object{
trace(("[MOCHIAD rpcTestFn] " + _arg1));
return (_arg1);
};
mc.regContLC = function (_arg1:String):void{
mc._containerLCName = _arg1;
};
sendHostProgress = false;
mc.sendHostLoadProgress = function (_arg1:String):void{
sendHostProgress = true;
};
chk["onEnterFrame"] = function ():void{
var _local1:Object;
var _local2:Object;
var _local3:Number;
var _local4:Boolean;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Object;
var _local10:Number;
var _local11:Number;
if (((!(this.parent)) || (!(this.parent.parent)))){
delete this["onEnterFrame"];
return;
};
_local1 = this.parent.parent.root;
_local2 = this.parent._mochiad_ctr;
_local3 = (getTimer() - this.started);
_local4 = false;
_local5 = _local1.loaderInfo.bytesTotal;
_local6 = _local1.loaderInfo.bytesLoaded;
if (complete){
_local6 = Math.max(1, _local6);
_local5 = _local6;
};
_local7 = ((100 * _local6) / _local5);
_local8 = ((100 * _local3) / chk.ad_msec);
_local9 = this._mochiad_bar._inside;
_local10 = Math.min(100, Math.min(((_local7) || (0)), _local8));
_local10 = Math.max(this.last_pcnt, _local10);
this.last_pcnt = _local10;
_local9.scaleX = (_local10 * 0.01);
options.ad_progress(_local10);
if (sendHostProgress){
clip._mochiad.lc.send(clip._mochiad._containerLCName, "notify", {id:"hostLoadPcnt", pcnt:_local7});
if (_local7 == 100){
sendHostProgress = false;
};
};
if (!chk.showing){
_local11 = this.parent._mochiad_ctr.contentLoaderInfo.bytesTotal;
if (_local11 > 0){
chk.showing = true;
chk.started = getTimer();
_slot1.adShowing(clip);
} else {
if ((((_local3 > chk.ad_timeout)) && ((_local7 == 100)))){
options.ad_failed();
_local4 = true;
};
};
};
if (_local3 > chk.ad_msec){
_local4 = true;
};
if (((complete) && (_local4))){
if (this.server_control){
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = chk.fadeFunction;
};
};
};
doOnEnterFrame(chk);
}
public static function showPreloaderAd(_arg1:Object):void{
trace("[MochiAd] DEPRECATED: showPreloaderAd was renamed to showPreGameAd in 2.0");
_slot1.showPreGameAd(_arg1);
}
public static function showTimedAd(_arg1:Object):void{
trace("[MochiAd] DEPRECATED: showTimedAd was renamed to showInterLevelAd in 2.0");
_slot1.showInterLevelAd(_arg1);
}
public static function doOnEnterFrame(_arg1:MovieClip):void{
var f:Function;
var mc = _arg1;
f = function (_arg1:Object):void{
if (((("onEnterFrame" in mc)) && (mc.onEnterFrame))){
mc.onEnterFrame();
} else {
_arg1.target.removeEventListener(_arg1.type, arguments.callee);
};
};
mc.addEventListener(Event.ENTER_FRAME, f);
}
}
}//package
Section 65
//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 66
//player1Sprite (player1Sprite)
package {
import com.doof.animationengine.*;
public dynamic class player1Sprite extends Player1Model {
}
}//package
Section 67
//player2Sprite (player2Sprite)
package {
import com.doof.animationengine.*;
public dynamic class player2Sprite extends Player1Model {
}
}//package
Section 68
//player3Sprite (player3Sprite)
package {
import com.doof.animationengine.*;
public dynamic class player3Sprite extends Player1Model {
}
}//package
Section 69
//player4Sprite (player4Sprite)
package {
import com.doof.animationengine.*;
public dynamic class player4Sprite extends Player1Model {
}
}//package
Section 70
//qualifySND (qualifySND)
package {
import flash.media.*;
public dynamic class qualifySND extends Sound {
}
}//package
Section 71
//ResultScreen (ResultScreen)
package {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.system.*;
import flash.filters.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.geom.*;
import flash.ui.*;
public dynamic class ResultScreen extends MovieClip {
public var board:MovieClip;
public function ResultScreen(){
addFrameScript(14, frame15, 29, frame30);
}
function frame15(){
stop();
}
function frame30(){
stop();
}
}
}//package
Section 72
//resultSND (resultSND)
package {
import flash.media.*;
public dynamic class resultSND extends Sound {
}
}//package
Section 73
//running (running)
package {
import flash.display.*;
public dynamic class running extends MovieClip {
public var chest:MovieClip;
public var lowerArm2:MovieClip;
public var torso:MovieClip;
public var upperArm1:MovieClip;
public var upperArm2:MovieClip;
public var lowerLeg1:MovieClip;
public var lowerLeg2:MovieClip;
public var upperLeg2:MovieClip;
public var upperLeg1:MovieClip;
public var head:MovieClip;
public var lowerArm1:MovieClip;
}
}//package
Section 74
//SandBox1Element (SandBox1Element)
package {
import flash.display.*;
public dynamic class SandBox1Element extends MovieClip {
}
}//package
Section 75
//SandBox2Element (SandBox2Element)
package {
import flash.display.*;
public dynamic class SandBox2Element extends MovieClip {
}
}//package
Section 76
//sandSND (sandSND)
package {
import flash.media.*;
public dynamic class sandSND extends Sound {
}
}//package
Section 77
//shortFlag (shortFlag)
package {
import flash.display.*;
public dynamic class shortFlag extends MovieClip {
}
}//package
Section 78
//SplashScreen (SplashScreen)
package {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.system.*;
import flash.filters.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.geom.*;
import flash.ui.*;
public dynamic class SplashScreen extends MovieClip {
public var logo:MovieClip;
public function SplashScreen(){
addFrameScript(49, frame50);
}
function frame50(){
logo.stop();
}
}
}//package
Section 79
//SprintScreen (SprintScreen)
package {
import flash.display.*;
public dynamic class SprintScreen extends MovieClip {
public var grassHolder:MovieClip;
public var p2Holder:MovieClip;
public var shadow2:MovieClip;
public var shadow1:MovieClip;
public var player1:player1Sprite;
public var player2:player2Sprite;
public var track1Holder:MovieClip;
public var linesHolder:MovieClip;
public var crowdHolder:MovieClip;
public var p1Holder:MovieClip;
public var track2Holder:MovieClip;
public var bannerHolder:MovieClip;
}
}//package
Section 80
//standing (standing)
package {
import flash.display.*;
public dynamic class standing extends MovieClip {
public var chest:MovieClip;
public var lowerArm2:MovieClip;
public var torso:MovieClip;
public var upperArm1:MovieClip;
public var upperArm2:MovieClip;
public var lowerLeg1:MovieClip;
public var lowerLeg2:MovieClip;
public var upperLeg2:MovieClip;
public var upperLeg1:MovieClip;
public var head:MovieClip;
public var lowerArm1:MovieClip;
}
}//package
Section 81
//startBlock1 (startBlock1)
package {
import flash.display.*;
public dynamic class startBlock1 extends MovieClip {
public var chest:MovieClip;
public var lowerArm2:MovieClip;
public var torso:MovieClip;
public var upperArm1:MovieClip;
public var upperArm2:MovieClip;
public var lowerLeg1:MovieClip;
public var lowerLeg2:MovieClip;
public var upperLeg2:MovieClip;
public var upperLeg1:MovieClip;
public var head:MovieClip;
public var lowerArm1:MovieClip;
}
}//package
Section 82
//startBlock2 (startBlock2)
package {
import flash.display.*;
public dynamic class startBlock2 extends MovieClip {
public var chest:MovieClip;
public var lowerArm2:MovieClip;
public var torso:MovieClip;
public var upperArm1:MovieClip;
public var upperArm2:MovieClip;
public var lowerLeg1:MovieClip;
public var lowerLeg2:MovieClip;
public var upperLeg2:MovieClip;
public var upperLeg1:MovieClip;
public var head:MovieClip;
public var lowerArm1:MovieClip;
}
}//package
Section 83
//starting (starting)
package {
import flash.display.*;
public dynamic class starting extends MovieClip {
public var chest:MovieClip;
public var lowerArm2:MovieClip;
public var torso:MovieClip;
public var upperArm1:MovieClip;
public var upperArm2:MovieClip;
public var lowerLeg1:MovieClip;
public var lowerLeg2:MovieClip;
public var upperLeg2:MovieClip;
public var upperLeg1:MovieClip;
public var head:MovieClip;
public var lowerArm1:MovieClip;
}
}//package
Section 84
//TitleScreen (TitleScreen)
package {
import flash.display.*;
public dynamic class TitleScreen extends MovieClip {
public var startBTN:SimpleButton;
}
}//package
Section 85
//titleSND (titleSND)
package {
import flash.media.*;
public dynamic class titleSND extends Sound {
}
}//package
Section 86
//Track1Element (Track1Element)
package {
import flash.display.*;
public dynamic class Track1Element extends MovieClip {
}
}//package
Section 87
//Track2Element (Track2Element)
package {
import flash.display.*;
public dynamic class Track2Element extends MovieClip {
}
}//package
Section 88
//Track3Element (Track3Element)
package {
import flash.display.*;
public dynamic class Track3Element extends MovieClip {
}
}//package
Section 89
//TrackMarkerElement (TrackMarkerElement)
package {
import flash.display.*;
import flash.text.*;
public dynamic class TrackMarkerElement extends MovieClip {
public var distanceTXT:TextField;
}
}//package
Section 90
//tripleJump1 (tripleJump1)
package {
import flash.display.*;
public dynamic class tripleJump1 extends MovieClip {
public var chest:MovieClip;
public var lowerArm2:MovieClip;
public var torso:MovieClip;
public var upperArm1:MovieClip;
public var upperArm2:MovieClip;
public var lowerLeg1:MovieClip;
public var lowerLeg2:MovieClip;
public var upperLeg2:MovieClip;
public var upperLeg1:MovieClip;
public var head:MovieClip;
public var lowerArm1:MovieClip;
}
}//package
Section 91
//tripleJump2 (tripleJump2)
package {
import flash.display.*;
public dynamic class tripleJump2 extends MovieClip {
public var chest:MovieClip;
public var lowerArm2:MovieClip;
public var torso:MovieClip;
public var upperArm1:MovieClip;
public var upperArm2:MovieClip;
public var lowerLeg1:MovieClip;
public var lowerLeg2:MovieClip;
public var upperLeg2:MovieClip;
public var upperLeg1:MovieClip;
public var head:MovieClip;
public var lowerArm1:MovieClip;
}
}//package
Section 92
//TripleJumpScreen (TripleJumpScreen)
package {
import flash.display.*;
public dynamic class TripleJumpScreen extends MovieClip {
public var grassHolder:MovieClip;
public var shadow1:MovieClip;
public var sandBoxHolder:MovieClip;
public var player1:player3Sprite;
public var track1Holder:MovieClip;
public var linesHolder:MovieClip;
public var crowdHolder:MovieClip;
public var p1Holder:MovieClip;
public var bannerHolder:MovieClip;
}
}//package
Section 93
//TripleStartLineElement (TripleStartLineElement)
package {
import flash.display.*;
public dynamic class TripleStartLineElement extends MovieClip {
}
}//package
Section 94
//winning (winning)
package {
import flash.display.*;
public dynamic class winning extends MovieClip {
public var chest:MovieClip;
public var lowerArm2:MovieClip;
public var torso:MovieClip;
public var upperArm1:MovieClip;
public var upperArm2:MovieClip;
public var lowerLeg1:MovieClip;
public var lowerLeg2:MovieClip;
public var upperLeg2:MovieClip;
public var upperLeg1:MovieClip;
public var head:MovieClip;
public var lowerArm1:MovieClip;
}
}//package