Section 1
//FpsCounter (General.FpsCounter)
package General {
import flash.display.*;
import flash.system.*;
import flash.utils.*;
import flash.text.*;
public class FpsCounter extends Sprite {
private var avgCount2:int;// = 30
private var oldT:uint;
private var mfpsCount:int;// = 0
public var textBox2:TextField;
public var textBox3:TextField;
private var avgCount:int;// = 30
public var textBox:TextField;
private var mfpsCount2:int;// = 0
public function FpsCounter(){
textBox = new TextField();
textBox.text = "...";
textBox.textColor = 11145540;
textBox.selectable = false;
textBox2 = new TextField();
textBox2.text = "...";
textBox2.width = 150;
textBox2.textColor = 11145540;
textBox2.selectable = false;
textBox2.y = 15;
textBox3 = new TextField();
textBox3.text = "...";
textBox3.textColor = 11145540;
textBox3.selectable = false;
textBox3.y = 30;
oldT = getTimer();
addChild(textBox);
addChild(textBox2);
addChild(textBox3);
}
public function update():void{
var _local1:uint = getTimer();
var _local2:uint = (_local1 - oldT);
mfpsCount = (mfpsCount + _local2);
if (avgCount < 1){
textBox.text = String((Math.round((1000 / (mfpsCount / 30))) + " fps average"));
avgCount = 30;
mfpsCount = 0;
};
avgCount--;
oldT = getTimer();
textBox3.text = (Math.round((System.totalMemory / (0x0400 * 0x0400))) + " MB used");
}
public function updateEnd():void{
}
public function updatePhys(_arg1:uint):void{
var _local2:uint = getTimer();
var _local3:uint = (_local2 - _arg1);
mfpsCount2 = (mfpsCount2 + _local3);
if (avgCount2 < 1){
textBox2.text = String((((("Physics step: " + Math.round((mfpsCount2 / 30))) + " ms (") + Math.round((1000 / (mfpsCount2 / 30)))) + " fps)"));
avgCount2 = 30;
mfpsCount2 = 0;
};
avgCount2--;
}
}
}//package General
Section 2
//Input (General.Input)
package General {
import flash.events.*;
import flash.display.*;
public class Input {
private static var keyArr:Array;
private static var keyBuffer:Array;
public static var mouseReleased:Boolean = false;
public static var mouseDragY:Number = 0;
public static var mouseOver:Boolean = false;
public static var mouse:Sprite = new Sprite();
public static var timeSinceLastKey = 0;
public static var mousePressed:Boolean = false;
public static var mouseOffsetX:Number = 0;
public static var mouseOffsetY:Number = 0;
public static var ascii:Array;
public static var mouseX:Number = 0;
public static var initialized:Boolean = false;
public static var mouseY:Number = 0;
private static var bufferSize:int;
public static var m_stageMc:Sprite;
public static var mouseDown:Boolean = false;
public static var lastKey:int = 0;
private static var keyState:Array;
public static var keys:Array;
public static var mouseDragX:Number = 0;
public function Input(_arg1:Sprite){
initialized = true;
m_stageMc = _arg1;
ascii = new Array(222);
fillAscii();
keyState = new Array(222);
keyArr = new Array();
var _local2:int;
while (_local2 < 222) {
keyState[_local2] = new int(0);
if (ascii[_local2] != undefined){
keyArr.push(_local2);
};
_local2++;
};
bufferSize = 5;
keyBuffer = new Array(bufferSize);
var _local3:int;
while (_local3 < bufferSize) {
keyBuffer[_local3] = new Array(0, 0);
_local3++;
};
_arg1.stage.addEventListener(KeyboardEvent.KEY_DOWN, keyPress, false, 0, true);
_arg1.stage.addEventListener(KeyboardEvent.KEY_UP, keyRelease, false, 0, true);
_arg1.stage.addEventListener(MouseEvent.MOUSE_DOWN, mousePress, false, 0, true);
mouse.graphics.lineStyle(0.1, 0, 100);
mouse.graphics.moveTo(0, 0);
mouse.graphics.lineTo(0, 0.1);
}
public function mouseLeave(_arg1:Event){
if (mouseDown){
m_stageMc.stage.removeEventListener(MouseEvent.MOUSE_UP, mouseRelease);
m_stageMc.stage.removeEventListener(Event.MOUSE_LEAVE, mouseLeave);
};
mouseReleased = mouseDown;
mouseDown = false;
}
public function keyPress(_arg1:KeyboardEvent){
keyState[_arg1.keyCode] = Math.max(keyState[_arg1.keyCode], 1);
lastKey = _arg1.keyCode;
}
private function fillAscii(){
ascii[65] = "A";
ascii[66] = "B";
ascii[67] = "C";
ascii[68] = "D";
ascii[69] = "E";
ascii[70] = "F";
ascii[71] = "G";
ascii[72] = "H";
ascii[73] = "I";
ascii[74] = "J";
ascii[75] = "K";
ascii[76] = "L";
ascii[77] = "M";
ascii[78] = "N";
ascii[79] = "O";
ascii[80] = "P";
ascii[81] = "Q";
ascii[82] = "R";
ascii[83] = "S";
ascii[84] = "T";
ascii[85] = "U";
ascii[86] = "V";
ascii[87] = "W";
ascii[88] = "X";
ascii[89] = "Y";
ascii[90] = "Z";
ascii[48] = "0";
ascii[49] = "1";
ascii[50] = "2";
ascii[51] = "3";
ascii[52] = "4";
ascii[53] = "5";
ascii[54] = "6";
ascii[55] = "7";
ascii[56] = "8";
ascii[57] = "9";
ascii[32] = "Spacebar";
ascii[17] = "Ctrl";
ascii[16] = "Shift";
ascii[192] = "~";
ascii[38] = "up";
ascii[40] = "down";
ascii[37] = "left";
ascii[39] = "right";
ascii[96] = "Numpad 0";
ascii[97] = "Numpad 1";
ascii[98] = "Numpad 2";
ascii[99] = "Numpad 3";
ascii[100] = "Numpad 4";
ascii[101] = "Numpad 5";
ascii[102] = "Numpad 6";
ascii[103] = "Numpad 7";
ascii[104] = "Numpad 8";
ascii[105] = "Numpad 9";
ascii[111] = "Numpad /";
ascii[106] = "Numpad *";
ascii[109] = "Numpad -";
ascii[107] = "Numpad +";
ascii[110] = "Numpad .";
ascii[45] = "Insert";
ascii[46] = "Delete";
ascii[33] = "Page Up";
ascii[34] = "Page Down";
ascii[35] = "End";
ascii[36] = "Home";
ascii[112] = "F1";
ascii[113] = "F2";
ascii[114] = "F3";
ascii[115] = "F4";
ascii[116] = "F5";
ascii[117] = "F6";
ascii[118] = "F7";
ascii[119] = "F8";
ascii[188] = ",";
ascii[190] = ".";
ascii[186] = ";";
ascii[222] = "'";
ascii[219] = "[";
ascii[221] = "]";
ascii[189] = "-";
ascii[187] = "+";
ascii[220] = "\\";
ascii[191] = "/";
ascii[9] = "TAB";
ascii[8] = "Backspace";
}
public function mouseMove(_arg1:MouseEvent){
if (mouseDown != _arg1.buttonDown){
mouseDown = _arg1.buttonDown;
mouseReleased = !(_arg1.buttonDown);
mousePressed = _arg1.buttonDown;
mouseDragX = 0;
mouseDragY = 0;
};
mouseX = (_arg1.stageX - m_stageMc.x);
mouseY = (_arg1.stageY - m_stageMc.y);
mouseOffsetX = (mouseX - mouse.x);
mouseOffsetY = (mouseY - mouse.y);
if (mouseDown){
mouseDragX = (mouseDragX + mouseOffsetX);
mouseDragY = (mouseDragY + mouseOffsetY);
};
mouse.x = mouseX;
mouse.y = mouseY;
}
public function keyRelease(_arg1:KeyboardEvent){
keyState[_arg1.keyCode] = -1;
var _local2:int = (bufferSize - 1);
while (_local2 > 0) {
keyBuffer[_local2] = keyBuffer[(_local2 - 1)];
_local2--;
};
keyBuffer[0] = [_arg1.keyCode, 0];
}
public function mouseRelease(_arg1:MouseEvent){
mouseDown = false;
mouseReleased = true;
m_stageMc.stage.removeEventListener(MouseEvent.MOUSE_UP, mouseRelease);
m_stageMc.stage.removeEventListener(Event.MOUSE_LEAVE, mouseLeave);
}
public function mousePress(_arg1:MouseEvent){
mousePressed = true;
mouseDown = true;
mouseDragX = 0;
mouseDragY = 0;
m_stageMc.stage.addEventListener(MouseEvent.MOUSE_UP, mouseRelease, false, 0, true);
m_stageMc.stage.addEventListener(Event.MOUSE_LEAVE, mouseLeave, false, 0, true);
}
public static function isKeysDown(_arg1:Array):int{
var _local3:*;
var _local2:int;
for each (_local3 in _arg1) {
if ((_local3 is int)){
if (isKeyDown(int(_local3))){
_local2++;
};
} else {
if ((_local3 is String)){
if (isKeyDownS(String(_local3))){
_local2++;
};
};
};
};
return (_local2);
}
public static function getKeyHold(_arg1:int):int{
return (Math.max(0, keyState[_arg1]));
}
public static function isKeyPressed(_arg1:int):Boolean{
timeSinceLastKey = 0;
return ((keyState[_arg1] == 1));
}
public static function isKeyDown(_arg1:int):Boolean{
return ((keyState[_arg1] > 0));
}
public static function getKeyString(_arg1:uint):String{
return (ascii[_arg1]);
}
public static function isKeyDownS(_arg1:String):Boolean{
return (isKeyDown(getStringKey(_arg1)));
}
private static function fillKeys(){
keys = new Array();
keys["A"] = 65;
keys["B"] = 66;
keys["C"] = 67;
keys["D"] = 68;
keys["E"] = 69;
keys["F"] = 70;
keys["G"] = 71;
keys["H"] = 72;
keys["I"] = 73;
keys["J"] = 74;
keys["K"] = 75;
keys["L"] = 76;
keys["M"] = 77;
keys["N"] = 78;
keys["O"] = 79;
keys["P"] = 80;
keys["Q"] = 81;
keys["R"] = 82;
keys["S"] = 83;
keys["T"] = 84;
keys["U"] = 85;
keys["V"] = 86;
keys["W"] = 87;
keys["X"] = 88;
keys["Y"] = 89;
keys["Z"] = 90;
keys["0"] = 48;
keys["1"] = 49;
keys["2"] = 50;
keys["3"] = 51;
keys["4"] = 52;
keys["5"] = 53;
keys["6"] = 54;
keys["7"] = 55;
keys["8"] = 56;
keys["9"] = 57;
keys["Spacebar"] = 32;
keys["Ctrl"] = 17;
keys["Shift"] = 16;
keys["~"] = 192;
keys["up"] = 38;
keys["down"] = 40;
keys["left"] = 37;
keys["right"] = 39;
keys["Numpad 0"] = 96;
keys["Numpad 1"] = 97;
keys["Numpad 2"] = 98;
keys["Numpad 3"] = 99;
keys["Numpad 4"] = 100;
keys["Numpad 5"] = 101;
keys["Numpad 6"] = 102;
keys["Numpad 7"] = 103;
keys["Numpad 8"] = 104;
keys["Numpad 9"] = 105;
keys["Numpad /"] = 111;
keys["Numpad *"] = 106;
keys["Numpad -"] = 109;
keys["Numpad +"] = 107;
keys["Numpad ."] = 110;
keys["Insert"] = 45;
keys["Delete"] = 46;
keys["Page Up"] = 33;
keys["Page Down"] = 34;
keys["End"] = 35;
keys["Home"] = 36;
keys["F1"] = 112;
keys["F2"] = 113;
keys["F3"] = 114;
keys["F4"] = 115;
keys["F5"] = 116;
keys["F6"] = 117;
keys["F7"] = 118;
keys["F8"] = 119;
keys[","] = 188;
keys["."] = 190;
keys[";"] = 186;
keys["'"] = 222;
keys["["] = 219;
keys["]"] = 221;
keys["-"] = 189;
keys["+"] = 187;
keys["\\"] = 220;
keys["/"] = 191;
keys["TAB"] = 9;
keys["Backspace"] = 8;
}
public static function isKeyReleased(_arg1:int):Boolean{
return ((keyState[_arg1] == -1));
}
public static function isKeyInBuffer(_arg1:int, _arg2:int, _arg3:int){
return ((((keyBuffer[_arg2][0] == _arg1)) && ((keyBuffer[_arg2][1] <= _arg3))));
}
public static function update(){
var _local1:int;
while (_local1 < keyArr.length) {
if (keyState[keyArr[_local1]] != 0){
var _local3 = keyState;
var _local4 = keyArr[_local1];
var _local5 = (_local3[_local4] + 1);
_local3[_local4] = _local5;
};
_local1++;
};
var _local2:int;
while (_local2 < bufferSize) {
_local3 = keyBuffer[_local2];
_local4 = 1;
_local5 = (_local3[_local4] + 1);
_local3[_local4] = _local5;
_local2++;
};
mouseReleased = false;
mousePressed = false;
mouseOver = false;
}
public static function getStringKey(_arg1:String):int{
if (keys == null){
fillKeys();
};
return (keys[_arg1]);
}
}
}//package General
Section 3
//KongAPI (General.KongAPI)
package General {
import flash.events.*;
import flash.display.*;
import flash.net.*;
public class KongAPI {
public var kongregate;
public function KongAPI(_arg1:Stage){
var _local2:Object = LoaderInfo(_arg1.loaderInfo).parameters;
var _local3:String = _local2.api_path;
if (_local3 == null){
_local3 = "http://www.kongregate.com/flash/API_AS3_Local.swf";
};
trace(("API path: " + _local3));
var _local4:URLRequest = new URLRequest(_local3);
var _local5:Loader = new Loader();
_local5.contentLoaderInfo.addEventListener(Event.COMPLETE, loadComplete);
_local5.load(_local4);
_arg1.addChild(_local5);
}
public function submitScore(_arg1:Number):void{
kongregate.scores.submit(_arg1);
}
public function submitStat(_arg1:Number, _arg2:String):void{
kongregate.stats.submit(_arg2, _arg1);
}
public function loadComplete(_arg1:Event):void{
kongregate = _arg1.target.content;
kongregate.services.connect();
trace(("\n" + kongregate.services));
trace(("\n" + kongregate.user));
trace(("\n" + kongregate.scores));
trace(("\n" + kongregate.stats));
}
}
}//package General
Section 4
//SoundEffect (General.SoundEffect)
package General {
import flash.events.*;
import flash.system.*;
import flash.utils.*;
import flash.media.*;
public class SoundEffect extends EventDispatcher {
public var lastTime:int;
public var channels:Array;
public var fx:Boolean;// = true
public var loop:Boolean;
public var retrigger:int;
public var handle:String;
public var cl:Class;
public var pausedVolume:Number;// = 1
public var limit:int;
public var pausePos:uint;// = 0
public function SoundEffect(_arg1:String, _arg2:ApplicationDomain, _arg3:int, _arg4:int, _arg5:Boolean=false){
handle = _arg1;
if (_arg2 != null){
cl = Class(_arg2.getDefinition(handle));
};
retrigger = _arg3;
limit = _arg4;
loop = _arg5;
channels = new Array();
lastTime = -1000;
}
public function stop():void{
var _local1:SoundChannel;
for each (_local1 in channels) {
_local1.stop();
};
channels = new Array();
}
public function pause():void{
if (channels.length <= 0){
return;
};
pausedVolume = volume;
while (channels.length > 0) {
pausePos = SoundChannel(channels[0]).position;
SoundChannel(channels[0]).stop();
channels.shift();
};
}
public function play(_arg1:Boolean=false, _arg2:Number=1):void{
var _local3:Sound;
var _local4:SoundChannel;
if (((((getTimer() - lastTime) > retrigger)) && ((channels.length < limit)))){
lastTime = getTimer();
_local3 = new cl();
if (((!(_arg1)) && (!(loop)))){
_local4 = _local3.play(0, 0, new SoundTransform(_arg2));
} else {
_local4 = _local3.play(0, 1000, new SoundTransform(_arg2));
};
if (_local4 == null){
return;
};
_local4.addEventListener(Event.SOUND_COMPLETE, instanceComplete);
channels.push(_local4);
};
}
public function setVol(_arg1:Number):void{
var _local2:SoundChannel;
for each (_local2 in channels) {
_local2.soundTransform = new SoundTransform(_arg1);
};
}
public function get volume():Number{
if (channels[0]){
return (channels[0].soundTransform.volume);
};
return (0);
}
public function instanceComplete(_arg1:Event):void{
var _local2:int;
while (_local2 < channels.length) {
if (channels[_local2] == _arg1.currentTarget){
dispatchEvent(new Event("instanceComplete"));
Util.ArrayRemoveItem(_arg1.currentTarget, channels);
return;
};
_local2++;
};
}
public function set volume(_arg1:Number):void{
var _local2:SoundChannel;
for each (_local2 in channels) {
_local2.soundTransform = new SoundTransform(_arg1);
};
}
public function unpause():void{
var _local2:SoundChannel;
if (pausePos == 0){
return;
};
var _local1:Sound = new cl();
if (!loop){
_local2 = _local1.play(pausePos, 0, new SoundTransform(pausedVolume));
} else {
_local2 = _local1.play(pausePos, 1000, new SoundTransform(pausedVolume));
};
if (_local2 == null){
return;
};
_local2.addEventListener(Event.SOUND_COMPLETE, instanceComplete);
channels.push(_local2);
pausePos = 0;
pausedVolume = 1;
}
}
}//package General
Section 5
//SoundEffectEmbeded (General.SoundEffectEmbeded)
package General {
public class SoundEffectEmbeded extends SoundEffect {
public function SoundEffectEmbeded(_arg1:String, _arg2:Class, _arg3:int, _arg4:int, _arg5:Boolean=false){
super(_arg1, null, _arg3, _arg4, _arg5);
cl = _arg2;
}
}
}//package General
Section 6
//Util (General.Util)
package General {
import flash.events.*;
import flash.geom.*;
import flash.display.*;
public class Util {
public static function PerpVec(_arg1:Point):Point{
var _local2:Point = new Point(-(_arg1.y), _arg1.x);
return (_local2);
}
public static function Rand(_arg1:Number):Number{
return ((Math.random() * _arg1));
}
public static function Dist(_arg1, _arg2):Number{
return (new Point((_arg1.x - _arg2.x), (_arg1.y - _arg2.y)).length);
}
public static function ButtonUnReg(_arg1, _arg2:Function):void{
_arg1.removeEventListener(MouseEvent.CLICK, _arg2);
}
public static function formatTimeHMS(_arg1:uint):String{
var _local2:int = int((_arg1 / ((1000 * 60) * 60)));
_arg1 = (_arg1 - (((_local2 * 1000) * 60) * 60));
var _local3 = "00";
if ((((_local2 > 0)) && ((_local2 < 10)))){
_local3 = ("0" + _local2);
} else {
if (_local2 >= 10){
_local3 = _local2.toString();
};
};
var _local4:int = int((_arg1 / (1000 * 60)));
_arg1 = (_arg1 - ((_local4 * 1000) * 60));
var _local5 = "00";
if ((((_local4 > 0)) && ((_local4 < 10)))){
_local5 = ("0" + _local4);
} else {
if (_local4 >= 10){
_local5 = _local4.toString();
};
};
var _local6:int = int((_arg1 / 1000));
var _local7 = "00";
if ((((_local6 > 0)) && ((_local6 < 10)))){
_local7 = ("0" + _local6);
} else {
if (_local6 >= 10){
_local7 = _local6.toString();
};
};
var _local8:String = ((((_local3 + ":") + _local5) + ":") + _local7);
return (_local8);
}
public static function RayCircleIntersect(_arg1:Point, _arg2:Point, _arg3:Point, _arg4:Number):Boolean{
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Point = new Point();
_local9.x = (_arg2.x - _arg1.x);
_local9.y = (_arg2.y - _arg1.y);
_local5 = ((_local9.x * _local9.x) + (_local9.y * _local9.y));
_local6 = (2 * ((_local9.x * (_arg1.x - _arg3.x)) + (_local9.y * (_arg1.y - _arg3.y))));
_local7 = ((_arg3.x * _arg3.x) + (_arg3.y * _arg3.y));
_local7 = (_local7 + ((_arg1.x * _arg1.x) + (_arg1.y * _arg1.y)));
_local7 = (_local7 - (2 * ((_arg3.x * _arg1.x) + (_arg3.y * _arg1.y))));
_local7 = (_local7 - (_arg4 * _arg4));
_local8 = ((_local6 * _local6) - ((4 * _local5) * _local7));
if (_local8 < 0){
return (false);
};
return (true);
}
public static function DotProduct(_arg1:Point, _arg2:Point):Number{
return (((_arg1.x * _arg2.x) + (_arg1.y * _arg2.y)));
}
public static function ArrayRemoveItem(_arg1, _arg2:Array):Array{
var _local3:int;
while (_local3 < _arg2.length) {
if (_arg2[_local3] == _arg1){
if (_local3 == (_arg2.length - 1)){
_arg2.pop();
} else {
_arg2[_local3] = _arg2.pop();
_local3--;
};
};
_local3++;
};
return (_arg2);
}
public static function DistP(_arg1, _arg2):Point{
return (new Point((_arg1.x - _arg2.x), (_arg1.y - _arg2.y)));
}
public static function VectorProjection(_arg1:Point, _arg2:Point):Point{
var _local3:Number = ((_arg1.x * _arg2.x) + (_arg1.y * _arg2.y));
var _local4:Point = new Point();
_local4.x = ((_local3 / ((_arg2.x * _arg2.x) + (_arg2.y * _arg2.y))) * _arg2.x);
_local4.y = ((_local3 / ((_arg2.x * _arg2.x) + (_arg2.y * _arg2.y))) * _arg2.y);
return (_local4);
}
public static function CommaFormat(_arg1:Number):String{
var _local2:String = _arg1.toString();
var _local3:int = _local2.indexOf(".");
if (_local3 == -1){
_local3 = _local2.length;
};
while ((_local3 = (_local3 - 3)) > 0) {
_local2 = ((_local2.substring(0, _local3) + ",") + _local2.substr(_local3));
};
return (_local2);
}
public static function duplicateDisplayObject(_arg1:DisplayObject, _arg2:Boolean=false):DisplayObject{
var _local5:Rectangle;
var _local3:Class = Object(_arg1).constructor;
var _local4:DisplayObject = new (_local3);
_local4.transform = _arg1.transform;
_local4.filters = _arg1.filters;
_local4.cacheAsBitmap = _arg1.cacheAsBitmap;
_local4.opaqueBackground = _arg1.opaqueBackground;
if (_arg1.scale9Grid){
_local5 = _arg1.scale9Grid;
_local4.scale9Grid = _local5;
};
if (((_arg2) && (_arg1.parent))){
_arg1.parent.addChild(_local4);
};
return (_local4);
}
public static function VectorSubtract(_arg1:Point, _arg2:Point):Point{
return (new Point((_arg1.x - _arg2.x), (_arg1.y - _arg2.y)));
}
public static function formatTimeMS(_arg1:uint):String{
var _local2:int = int((_arg1 / (1000 * 60)));
_arg1 = (_arg1 - ((_local2 * 1000) * 60));
var _local3 = "00";
if ((((_local2 > 0)) && ((_local2 < 10)))){
_local3 = ("0" + _local2);
} else {
if (_local2 >= 10){
_local3 = _local2.toString();
};
};
var _local4:int = int((_arg1 / 1000));
var _local5 = "00";
if ((((_local4 > 0)) && ((_local4 < 10)))){
_local5 = ("0" + _local4);
} else {
if (_local4 >= 10){
_local5 = _local4.toString();
};
};
var _local6:String = ((_local3 + ":") + _local5);
return (_local6);
}
public static function ClosestXYObj(_arg1, _arg2:Array){
var _local4:*;
var _local5:*;
var _local3:int = int.MAX_VALUE;
for each (_local5 in _arg2) {
if (Dist(_arg1, _local5) < _local3){
_local3 = Dist(_arg1, _local5);
_local4 = _local5;
};
};
return (_local4);
}
public static function VectorRotate(_arg1:Point, _arg2:Number):Point{
var _local3:Matrix = new Matrix();
_local3.rotate((_arg2 * (Math.PI / 180)));
return (_local3.transformPoint(_arg1));
}
public static function RandAdj(_arg1:Number):Number{
return ((Rand(_arg1) - (_arg1 / 2)));
}
public static function ButtonReg(_arg1, _arg2:Function):void{
_arg1.useHandCursor = true;
_arg1.addEventListener(MouseEvent.CLICK, _arg2, false, 0, true);
}
public static function Normalize(_arg1:Point):Point{
var _local2:Point = new Point();
if (_arg1.length != 0){
_local2.x = (_arg1.x / _arg1.length);
_local2.y = (_arg1.y / _arg1.length);
};
return (_local2);
}
public static function formatTimeHMSms(_arg1:uint):String{
var _local2:int = int((_arg1 / ((1000 * 60) * 60)));
_arg1 = (_arg1 - (((_local2 * 1000) * 60) * 60));
var _local3 = "00";
if ((((_local2 > 0)) && ((_local2 < 10)))){
_local3 = ("0" + _local2);
} else {
if (_local2 >= 10){
_local3 = _local2.toString();
};
};
var _local4:int = int((_arg1 / (1000 * 60)));
_arg1 = (_arg1 - ((_local4 * 1000) * 60));
var _local5 = "00";
if ((((_local4 > 0)) && ((_local4 < 10)))){
_local5 = ("0" + _local4);
} else {
if (_local4 >= 10){
_local5 = _local4.toString();
};
};
var _local6:int = int((_arg1 / 1000));
_arg1 = (_arg1 - (_local6 * 1000));
var _local7 = "00";
if ((((_local6 > 0)) && ((_local6 < 10)))){
_local7 = ("0" + _local6);
} else {
if (_local6 >= 10){
_local7 = _local6.toString();
};
};
var _local8:int = int((_arg1 / 10));
var _local9 = "00";
if ((((_local8 > 0)) && ((_local8 < 10)))){
_local9 = ("0" + _local8);
} else {
if (_local8 >= 10){
_local9 = _local8.toString();
};
};
var _local10:String = ((((((_local3 + ":") + _local5) + ":") + _local7) + ":") + _local9);
return (_local10);
}
public static function VectorMult(_arg1:Point, _arg2:Number):Point{
_arg1.x = (_arg1.x * _arg2);
_arg1.y = (_arg1.y * _arg2);
return (_arg1);
}
public static function VectorToAngle(_arg1:Point):Number{
var _local2:Number = (Math.atan((_arg1.y / _arg1.x)) * (180 / Math.PI));
if (_arg1.x < 0){
_local2 = (_local2 + 180);
};
return (_local2);
}
public static function ArrayAddNoDup(_arg1, _arg2:Array):Array{
var _local3:*;
for each (_local3 in _arg2) {
if (_local3 == _arg1){
return (_arg2);
};
};
_arg2.push(_arg1);
return (_arg2);
}
public static function getTimeMS_ms(_arg1:String):int{
var _local2:String = _arg1.split(":")[0];
var _local3:String = _arg1.split(":")[1];
var _local4:int = ((parseInt(_local2) * 60) * 1000);
var _local5:int = (parseInt(_local3) * 1000);
return ((_local4 + _local5));
}
public static function VectorAdd(_arg1:Point, _arg2:Point):Point{
return (new Point((_arg1.x + _arg2.x), (_arg1.y + _arg2.y)));
}
}
}//package General
Section 7
//ButtonAsset (mx.core.ButtonAsset)
package mx.core {
public class ButtonAsset extends FlexSimpleButton implements IFlexAsset, IFlexDisplayObject {
private var _measuredHeight:Number;
private var _measuredWidth:Number;
mx_internal static const VERSION:String = "3.4.1.10084";
public function ButtonAsset(){
_measuredWidth = width;
_measuredHeight = height;
}
public function get measuredWidth():Number{
return (_measuredWidth);
}
public function get measuredHeight():Number{
return (_measuredHeight);
}
public function setActualSize(_arg1:Number, _arg2:Number):void{
width = _arg1;
height = _arg2;
}
public function move(_arg1:Number, _arg2:Number):void{
this.x = _arg1;
this.y = _arg2;
}
}
}//package mx.core
Section 8
//EdgeMetrics (mx.core.EdgeMetrics)
package mx.core {
public class EdgeMetrics {
public var top:Number;
public var left:Number;
public var bottom:Number;
public var right:Number;
mx_internal static const VERSION:String = "3.4.1.10084";
public static const EMPTY:EdgeMetrics = new EdgeMetrics(0, 0, 0, 0);
;
public function EdgeMetrics(_arg1:Number=0, _arg2:Number=0, _arg3:Number=0, _arg4:Number=0){
this.left = _arg1;
this.top = _arg2;
this.right = _arg3;
this.bottom = _arg4;
}
public function clone():EdgeMetrics{
return (new EdgeMetrics(left, top, right, bottom));
}
}
}//package mx.core
Section 9
//FlexMovieClip (mx.core.FlexMovieClip)
package mx.core {
import flash.display.*;
import mx.utils.*;
public class FlexMovieClip extends MovieClip {
mx_internal static const VERSION:String = "3.4.1.10084";
public function FlexMovieClip(){
super();
try {
name = NameUtil.createUniqueName(this);
} catch(e:Error) {
};
}
override public function toString():String{
return (NameUtil.displayObjectToString(this));
}
}
}//package mx.core
Section 10
//FlexSimpleButton (mx.core.FlexSimpleButton)
package mx.core {
import flash.display.*;
import mx.utils.*;
public class FlexSimpleButton extends SimpleButton {
mx_internal static const VERSION:String = "3.4.1.10084";
public function FlexSimpleButton(){
super();
try {
name = NameUtil.createUniqueName(this);
} catch(e:Error) {
};
}
override public function toString():String{
return (NameUtil.displayObjectToString(this));
}
}
}//package mx.core
Section 11
//FlexSprite (mx.core.FlexSprite)
package mx.core {
import flash.display.*;
import mx.utils.*;
public class FlexSprite extends Sprite {
mx_internal static const VERSION:String = "3.4.1.10084";
public function FlexSprite(){
super();
try {
name = NameUtil.createUniqueName(this);
} catch(e:Error) {
};
}
override public function toString():String{
return (NameUtil.displayObjectToString(this));
}
}
}//package mx.core
Section 12
//IBorder (mx.core.IBorder)
package mx.core {
public interface IBorder {
function get borderMetrics():EdgeMetrics;
}
}//package mx.core
Section 13
//IFlexAsset (mx.core.IFlexAsset)
package mx.core {
public interface IFlexAsset {
}
}//package mx.core
Section 14
//IFlexDisplayObject (mx.core.IFlexDisplayObject)
package mx.core {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.accessibility.*;
public interface IFlexDisplayObject extends IBitmapDrawable, IEventDispatcher {
function get visible():Boolean;
function get rotation():Number;
function localToGlobal(_arg1:Point):Point;
function get name():String;
function set width(_arg1:Number):void;
function get measuredHeight():Number;
function get blendMode():String;
function get scale9Grid():Rectangle;
function set name(_arg1:String):void;
function set scaleX(_arg1:Number):void;
function set scaleY(_arg1:Number):void;
function get measuredWidth():Number;
function get accessibilityProperties():AccessibilityProperties;
function set scrollRect(_arg1:Rectangle):void;
function get cacheAsBitmap():Boolean;
function globalToLocal(_arg1:Point):Point;
function get height():Number;
function set blendMode(_arg1:String):void;
function get parent():DisplayObjectContainer;
function getBounds(_arg1:DisplayObject):Rectangle;
function get opaqueBackground():Object;
function set scale9Grid(_arg1:Rectangle):void;
function setActualSize(_arg1:Number, _arg2:Number):void;
function set alpha(_arg1:Number):void;
function set accessibilityProperties(_arg1:AccessibilityProperties):void;
function get width():Number;
function hitTestPoint(_arg1:Number, _arg2:Number, _arg3:Boolean=false):Boolean;
function set cacheAsBitmap(_arg1:Boolean):void;
function get scaleX():Number;
function get scaleY():Number;
function get scrollRect():Rectangle;
function get mouseX():Number;
function get mouseY():Number;
function set height(_arg1:Number):void;
function set mask(_arg1:DisplayObject):void;
function getRect(_arg1:DisplayObject):Rectangle;
function get alpha():Number;
function set transform(_arg1:Transform):void;
function move(_arg1:Number, _arg2:Number):void;
function get loaderInfo():LoaderInfo;
function get root():DisplayObject;
function hitTestObject(_arg1:DisplayObject):Boolean;
function set opaqueBackground(_arg1:Object):void;
function set visible(_arg1:Boolean):void;
function get mask():DisplayObject;
function set x(_arg1:Number):void;
function set y(_arg1:Number):void;
function get transform():Transform;
function set filters(_arg1:Array):void;
function get x():Number;
function get y():Number;
function get filters():Array;
function set rotation(_arg1:Number):void;
function get stage():Stage;
}
}//package mx.core
Section 15
//IRepeaterClient (mx.core.IRepeaterClient)
package mx.core {
public interface IRepeaterClient {
function get instanceIndices():Array;
function set instanceIndices(_arg1:Array):void;
function get isDocument():Boolean;
function set repeaters(_arg1:Array):void;
function initializeRepeaterArrays(_arg1:IRepeaterClient):void;
function get repeaters():Array;
function set repeaterIndices(_arg1:Array):void;
function get repeaterIndices():Array;
}
}//package mx.core
Section 16
//MovieClipAsset (mx.core.MovieClipAsset)
package mx.core {
public class MovieClipAsset extends FlexMovieClip implements IFlexAsset, IFlexDisplayObject, IBorder {
private var _measuredHeight:Number;
private var _measuredWidth:Number;
mx_internal static const VERSION:String = "3.4.1.10084";
public function MovieClipAsset(){
_measuredWidth = width;
_measuredHeight = height;
}
public function get measuredWidth():Number{
return (_measuredWidth);
}
public function get measuredHeight():Number{
return (_measuredHeight);
}
public function setActualSize(_arg1:Number, _arg2:Number):void{
width = _arg1;
height = _arg2;
}
public function move(_arg1:Number, _arg2:Number):void{
this.x = _arg1;
this.y = _arg2;
}
public function get borderMetrics():EdgeMetrics{
if (scale9Grid == null){
return (EdgeMetrics.EMPTY);
};
return (new EdgeMetrics(scale9Grid.left, scale9Grid.top, Math.ceil((measuredWidth - scale9Grid.right)), Math.ceil((measuredHeight - scale9Grid.bottom))));
}
}
}//package mx.core
Section 17
//mx_internal (mx.core.mx_internal)
package mx.core {
public namespace mx_internal = "http://www.adobe.com/2006/flex/mx/internal";
}//package mx.core
Section 18
//SoundAsset (mx.core.SoundAsset)
package mx.core {
import flash.media.*;
public class SoundAsset extends Sound implements IFlexAsset {
mx_internal static const VERSION:String = "3.4.1.10084";
}
}//package mx.core
Section 19
//SpriteAsset (mx.core.SpriteAsset)
package mx.core {
public class SpriteAsset extends FlexSprite implements IFlexAsset, IFlexDisplayObject, IBorder {
private var _measuredHeight:Number;
private var _measuredWidth:Number;
mx_internal static const VERSION:String = "3.4.1.10084";
public function SpriteAsset(){
_measuredWidth = width;
_measuredHeight = height;
}
public function get measuredWidth():Number{
return (_measuredWidth);
}
public function get measuredHeight():Number{
return (_measuredHeight);
}
public function setActualSize(_arg1:Number, _arg2:Number):void{
width = _arg1;
height = _arg2;
}
public function move(_arg1:Number, _arg2:Number):void{
this.x = _arg1;
this.y = _arg2;
}
public function get borderMetrics():EdgeMetrics{
if (scale9Grid == null){
return (EdgeMetrics.EMPTY);
};
return (new EdgeMetrics(scale9Grid.left, scale9Grid.top, Math.ceil((measuredWidth - scale9Grid.right)), Math.ceil((measuredHeight - scale9Grid.bottom))));
}
}
}//package mx.core
Section 20
//NameUtil (mx.utils.NameUtil)
package mx.utils {
import flash.display.*;
import mx.core.*;
import flash.utils.*;
public class NameUtil {
mx_internal static const VERSION:String = "3.4.1.10084";
private static var counter:int = 0;
public static function displayObjectToString(_arg1:DisplayObject):String{
var result:String;
var o:DisplayObject;
var s:String;
var indices:Array;
var displayObject = _arg1;
try {
o = displayObject;
while (o != null) {
if (((((o.parent) && (o.stage))) && ((o.parent == o.stage)))){
break;
};
s = o.name;
if ((o is IRepeaterClient)){
indices = IRepeaterClient(o).instanceIndices;
if (indices){
s = (s + (("[" + indices.join("][")) + "]"));
};
};
result = ((result == null)) ? s : ((s + ".") + result);
o = o.parent;
};
} catch(e:SecurityError) {
};
return (result);
}
public static function createUniqueName(_arg1:Object):String{
if (!_arg1){
return (null);
};
var _local2:String = getQualifiedClassName(_arg1);
var _local3:int = _local2.indexOf("::");
if (_local3 != -1){
_local2 = _local2.substr((_local3 + 2));
};
var _local4:int = _local2.charCodeAt((_local2.length - 1));
if ((((_local4 >= 48)) && ((_local4 <= 57)))){
_local2 = (_local2 + "_");
};
return ((_local2 + counter++));
}
}
}//package mx.utils
Section 21
//Encode (SWFStats.Encode)
package SWFStats {
import flash.display.*;
import flash.utils.*;
public class Encode {
private static const BASE64_CHARS:String = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
private static var crcTableComputed:Boolean = false;
private static var hex_chr:String = "0123456789abcdef";
private static var crcTable:Array;
private static function ff(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Number):Number{
return (cmn(bitOR(bitAND(_arg2, _arg3), bitAND(~(_arg2), _arg4)), _arg1, _arg2, _arg5, _arg6, _arg7));
}
private static function hh(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Number):Number{
return (cmn(bitXOR(bitXOR(_arg2, _arg3), _arg4), _arg1, _arg2, _arg5, _arg6, _arg7));
}
private static function cmn(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number):Number{
return (addme(rol(addme(addme(_arg2, _arg1), addme(_arg4, _arg6)), _arg5), _arg3));
}
private static function gg(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Number):Number{
return (cmn(bitOR(bitAND(_arg2, _arg4), bitAND(_arg3, ~(_arg4))), _arg1, _arg2, _arg5, _arg6, _arg7));
}
private static function bitAND(_arg1:Number, _arg2:Number):Number{
var _local3:Number = ((_arg1 & 1) & (_arg2 & 1));
var _local4:Number = ((_arg1 >>> 1) & (_arg2 >>> 1));
return (((_local4 << 1) | _local3));
}
private static function writeChunk(_arg1:ByteArray, _arg2:uint, _arg3:ByteArray):void{
var _local8:uint;
var _local9:uint;
var _local10:uint;
if (!crcTableComputed){
crcTableComputed = true;
crcTable = [];
_local9 = 0;
while (_local9 < 0x0100) {
_local8 = _local9;
_local10 = 0;
while (_local10 < 8) {
if ((_local8 & 1)){
_local8 = uint((uint(3988292384) ^ uint((_local8 >>> 1))));
} else {
_local8 = uint((_local8 >>> 1));
};
_local10++;
};
crcTable[_local9] = _local8;
_local9++;
};
};
var _local4:uint;
if (_arg3 != null){
_local4 = _arg3.length;
};
_arg1.writeUnsignedInt(_local4);
var _local5:uint = _arg1.position;
_arg1.writeUnsignedInt(_arg2);
if (_arg3 != null){
_arg1.writeBytes(_arg3);
};
var _local6:uint = _arg1.position;
_arg1.position = _local5;
_local8 = 4294967295;
var _local7:int;
while (_local7 < (_local6 - _local5)) {
_local8 = uint((crcTable[((_local8 ^ _arg1.readUnsignedByte()) & uint(0xFF))] ^ uint((_local8 >>> 8))));
_local7++;
};
_local8 = uint((_local8 ^ uint(4294967295)));
_arg1.position = _local6;
_arg1.writeUnsignedInt(_local8);
}
public static function Base64(_arg1:ByteArray):String{
var _local3:Array;
var _local5:uint;
var _local6:uint;
var _local7:uint;
var _local2 = "";
var _local4:Array = new Array(4);
_arg1.position = 0;
while (_arg1.bytesAvailable > 0) {
_local3 = new Array();
_local5 = 0;
while ((((_local5 < 3)) && ((_arg1.bytesAvailable > 0)))) {
_local3[_local5] = _arg1.readUnsignedByte();
_local5++;
};
_local4[0] = ((_local3[0] & 252) >> 2);
_local4[1] = (((_local3[0] & 3) << 4) | (_local3[1] >> 4));
_local4[2] = (((_local3[1] & 15) << 2) | (_local3[2] >> 6));
_local4[3] = (_local3[2] & 63);
_local6 = _local3.length;
while (_local6 < 3) {
_local4[(_local6 + 1)] = 64;
_local6++;
};
_local7 = 0;
while (_local7 < _local4.length) {
_local2 = (_local2 + BASE64_CHARS.charAt(_local4[_local7]));
_local7++;
};
};
return (_local2);
}
public static function PNG(_arg1:BitmapData):ByteArray{
var _local5:uint;
var _local6:int;
var _local2:ByteArray = new ByteArray();
_local2.writeUnsignedInt(2303741511);
_local2.writeUnsignedInt(218765834);
var _local3:ByteArray = new ByteArray();
_local3.writeInt(_arg1.width);
_local3.writeInt(_arg1.height);
_local3.writeUnsignedInt(134610944);
_local3.writeByte(0);
writeChunk(_local2, 1229472850, _local3);
var _local4:ByteArray = new ByteArray();
var _local7:int;
while (_local7 < _arg1.height) {
_local4.writeByte(0);
if (!_arg1.transparent){
_local6 = 0;
while (_local6 < _arg1.width) {
_local5 = _arg1.getPixel(_local6, _local7);
_local4.writeUnsignedInt(uint((((_local5 & 0xFFFFFF) << 8) | 0xFF)));
_local6++;
};
} else {
_local6 = 0;
while (_local6 < _arg1.width) {
_local5 = _arg1.getPixel32(_local6, _local7);
_local4.writeUnsignedInt(uint((((_local5 & 0xFFFFFF) << 8) | (_local5 >>> 24))));
_local6++;
};
};
_local7++;
};
_local4.compress();
writeChunk(_local2, 1229209940, _local4);
writeChunk(_local2, 1229278788, null);
return (_local2);
}
private static function ii(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Number):Number{
return (cmn(bitXOR(_arg3, bitOR(_arg2, ~(_arg4))), _arg1, _arg2, _arg5, _arg6, _arg7));
}
private static function rol(_arg1:Number, _arg2:Number):Number{
return (((_arg1 << _arg2) | (_arg1 >>> (32 - _arg2))));
}
private static function bitOR(_arg1:Number, _arg2:Number):Number{
var _local3:Number = ((_arg1 & 1) | (_arg2 & 1));
var _local4:Number = ((_arg1 >>> 1) | (_arg2 >>> 1));
return (((_local4 << 1) | _local3));
}
private static function rhex(_arg1:Number):String{
var _local3:int;
var _local2 = "";
_local3 = 0;
while (_local3 <= 3) {
_local2 = (_local2 + (hex_chr.charAt(((_arg1 >> ((_local3 * 8) + 4)) & 15)) + hex_chr.charAt(((_arg1 >> (_local3 * 8)) & 15))));
_local3++;
};
return (_local2);
}
private static function addme(_arg1:Number, _arg2:Number):Number{
var _local3:Number = ((_arg1 & 0xFFFF) + (_arg2 & 0xFFFF));
var _local4:Number = (((_arg1 >> 16) + (_arg2 >> 16)) + (_local3 >> 16));
return (((_local4 << 16) | (_local3 & 0xFFFF)));
}
private static function bitXOR(_arg1:Number, _arg2:Number):Number{
var _local3:Number = ((_arg1 & 1) ^ (_arg2 & 1));
var _local4:Number = ((_arg1 >>> 1) ^ (_arg2 >>> 1));
return (((_local4 << 1) | _local3));
}
public static function MD5(_arg1:String):String{
var _local7:int;
var _local8:Number;
var _local9:Number;
var _local10:Number;
var _local11:Number;
var _local2:Array = str2blks_MD5(_arg1);
var _local3:Number = 1732584193;
var _local4:Number = -271733879;
var _local5:Number = -1732584194;
var _local6:Number = 271733878;
_local7 = 0;
while (_local7 < _local2.length) {
_local8 = _local3;
_local9 = _local4;
_local10 = _local5;
_local11 = _local6;
_local3 = ff(_local3, _local4, _local5, _local6, _local2[(_local7 + 0)], 7, -680876936);
_local6 = ff(_local6, _local3, _local4, _local5, _local2[(_local7 + 1)], 12, -389564586);
_local5 = ff(_local5, _local6, _local3, _local4, _local2[(_local7 + 2)], 17, 606105819);
_local4 = ff(_local4, _local5, _local6, _local3, _local2[(_local7 + 3)], 22, -1044525330);
_local3 = ff(_local3, _local4, _local5, _local6, _local2[(_local7 + 4)], 7, -176418897);
_local6 = ff(_local6, _local3, _local4, _local5, _local2[(_local7 + 5)], 12, 1200080426);
_local5 = ff(_local5, _local6, _local3, _local4, _local2[(_local7 + 6)], 17, -1473231341);
_local4 = ff(_local4, _local5, _local6, _local3, _local2[(_local7 + 7)], 22, -45705983);
_local3 = ff(_local3, _local4, _local5, _local6, _local2[(_local7 + 8)], 7, 1770035416);
_local6 = ff(_local6, _local3, _local4, _local5, _local2[(_local7 + 9)], 12, -1958414417);
_local5 = ff(_local5, _local6, _local3, _local4, _local2[(_local7 + 10)], 17, -42063);
_local4 = ff(_local4, _local5, _local6, _local3, _local2[(_local7 + 11)], 22, -1990404162);
_local3 = ff(_local3, _local4, _local5, _local6, _local2[(_local7 + 12)], 7, 1804603682);
_local6 = ff(_local6, _local3, _local4, _local5, _local2[(_local7 + 13)], 12, -40341101);
_local5 = ff(_local5, _local6, _local3, _local4, _local2[(_local7 + 14)], 17, -1502002290);
_local4 = ff(_local4, _local5, _local6, _local3, _local2[(_local7 + 15)], 22, 1236535329);
_local3 = gg(_local3, _local4, _local5, _local6, _local2[(_local7 + 1)], 5, -165796510);
_local6 = gg(_local6, _local3, _local4, _local5, _local2[(_local7 + 6)], 9, -1069501632);
_local5 = gg(_local5, _local6, _local3, _local4, _local2[(_local7 + 11)], 14, 643717713);
_local4 = gg(_local4, _local5, _local6, _local3, _local2[(_local7 + 0)], 20, -373897302);
_local3 = gg(_local3, _local4, _local5, _local6, _local2[(_local7 + 5)], 5, -701558691);
_local6 = gg(_local6, _local3, _local4, _local5, _local2[(_local7 + 10)], 9, 38016083);
_local5 = gg(_local5, _local6, _local3, _local4, _local2[(_local7 + 15)], 14, -660478335);
_local4 = gg(_local4, _local5, _local6, _local3, _local2[(_local7 + 4)], 20, -405537848);
_local3 = gg(_local3, _local4, _local5, _local6, _local2[(_local7 + 9)], 5, 568446438);
_local6 = gg(_local6, _local3, _local4, _local5, _local2[(_local7 + 14)], 9, -1019803690);
_local5 = gg(_local5, _local6, _local3, _local4, _local2[(_local7 + 3)], 14, -187363961);
_local4 = gg(_local4, _local5, _local6, _local3, _local2[(_local7 + 8)], 20, 1163531501);
_local3 = gg(_local3, _local4, _local5, _local6, _local2[(_local7 + 13)], 5, -1444681467);
_local6 = gg(_local6, _local3, _local4, _local5, _local2[(_local7 + 2)], 9, -51403784);
_local5 = gg(_local5, _local6, _local3, _local4, _local2[(_local7 + 7)], 14, 1735328473);
_local4 = gg(_local4, _local5, _local6, _local3, _local2[(_local7 + 12)], 20, -1926607734);
_local3 = hh(_local3, _local4, _local5, _local6, _local2[(_local7 + 5)], 4, -378558);
_local6 = hh(_local6, _local3, _local4, _local5, _local2[(_local7 + 8)], 11, -2022574463);
_local5 = hh(_local5, _local6, _local3, _local4, _local2[(_local7 + 11)], 16, 1839030562);
_local4 = hh(_local4, _local5, _local6, _local3, _local2[(_local7 + 14)], 23, -35309556);
_local3 = hh(_local3, _local4, _local5, _local6, _local2[(_local7 + 1)], 4, -1530992060);
_local6 = hh(_local6, _local3, _local4, _local5, _local2[(_local7 + 4)], 11, 1272893353);
_local5 = hh(_local5, _local6, _local3, _local4, _local2[(_local7 + 7)], 16, -155497632);
_local4 = hh(_local4, _local5, _local6, _local3, _local2[(_local7 + 10)], 23, -1094730640);
_local3 = hh(_local3, _local4, _local5, _local6, _local2[(_local7 + 13)], 4, 681279174);
_local6 = hh(_local6, _local3, _local4, _local5, _local2[(_local7 + 0)], 11, -358537222);
_local5 = hh(_local5, _local6, _local3, _local4, _local2[(_local7 + 3)], 16, -722521979);
_local4 = hh(_local4, _local5, _local6, _local3, _local2[(_local7 + 6)], 23, 76029189);
_local3 = hh(_local3, _local4, _local5, _local6, _local2[(_local7 + 9)], 4, -640364487);
_local6 = hh(_local6, _local3, _local4, _local5, _local2[(_local7 + 12)], 11, -421815835);
_local5 = hh(_local5, _local6, _local3, _local4, _local2[(_local7 + 15)], 16, 530742520);
_local4 = hh(_local4, _local5, _local6, _local3, _local2[(_local7 + 2)], 23, -995338651);
_local3 = ii(_local3, _local4, _local5, _local6, _local2[(_local7 + 0)], 6, -198630844);
_local6 = ii(_local6, _local3, _local4, _local5, _local2[(_local7 + 7)], 10, 1126891415);
_local5 = ii(_local5, _local6, _local3, _local4, _local2[(_local7 + 14)], 15, -1416354905);
_local4 = ii(_local4, _local5, _local6, _local3, _local2[(_local7 + 5)], 21, -57434055);
_local3 = ii(_local3, _local4, _local5, _local6, _local2[(_local7 + 12)], 6, 1700485571);
_local6 = ii(_local6, _local3, _local4, _local5, _local2[(_local7 + 3)], 10, -1894986606);
_local5 = ii(_local5, _local6, _local3, _local4, _local2[(_local7 + 10)], 15, -1051523);
_local4 = ii(_local4, _local5, _local6, _local3, _local2[(_local7 + 1)], 21, -2054922799);
_local3 = ii(_local3, _local4, _local5, _local6, _local2[(_local7 + 8)], 6, 1873313359);
_local6 = ii(_local6, _local3, _local4, _local5, _local2[(_local7 + 15)], 10, -30611744);
_local5 = ii(_local5, _local6, _local3, _local4, _local2[(_local7 + 6)], 15, -1560198380);
_local4 = ii(_local4, _local5, _local6, _local3, _local2[(_local7 + 13)], 21, 1309151649);
_local3 = ii(_local3, _local4, _local5, _local6, _local2[(_local7 + 4)], 6, -145523070);
_local6 = ii(_local6, _local3, _local4, _local5, _local2[(_local7 + 11)], 10, -1120210379);
_local5 = ii(_local5, _local6, _local3, _local4, _local2[(_local7 + 2)], 15, 718787259);
_local4 = ii(_local4, _local5, _local6, _local3, _local2[(_local7 + 9)], 21, -343485551);
_local3 = addme(_local3, _local8);
_local4 = addme(_local4, _local9);
_local5 = addme(_local5, _local10);
_local6 = addme(_local6, _local11);
_local7 = (_local7 + 16);
};
return ((((rhex(_local3) + rhex(_local4)) + rhex(_local5)) + rhex(_local6)));
}
private static function str2blks_MD5(_arg1:String):Array{
var _local4:int;
var _local2:Number = (((_arg1.length + 8) >> 6) + 1);
var _local3:Array = new Array((_local2 * 16));
_local4 = 0;
while (_local4 < (_local2 * 16)) {
_local3[_local4] = 0;
_local4++;
};
_local4 = 0;
while (_local4 < _arg1.length) {
_local3[(_local4 >> 2)] = (_local3[(_local4 >> 2)] | (_arg1.charCodeAt(_local4) << ((((_arg1.length * 8) + _local4) % 4) * 8)));
_local4++;
};
_local3[(_local4 >> 2)] = (_local3[(_local4 >> 2)] | (128 << ((((_arg1.length * 8) + _local4) % 4) * 8)));
var _local5:int = (_arg1.length * 8);
_local3[((_local2 * 16) - 2)] = (_local5 & 0xFF);
_local3[((_local2 * 16) - 2)] = (_local3[((_local2 * 16) - 2)] | (((_local5 >>> 8) & 0xFF) << 8));
_local3[((_local2 * 16) - 2)] = (_local3[((_local2 * 16) - 2)] | (((_local5 >>> 16) & 0xFF) << 16));
_local3[((_local2 * 16) - 2)] = (_local3[((_local2 * 16) - 2)] | (((_local5 >>> 24) & 0xFF) << 24));
return (_local3);
}
}
}//package SWFStats
Section 22
//HighScores (SWFStats.HighScores)
package SWFStats {
import flash.events.*;
import flash.net.*;
public class HighScores {
private static var ScoresCallback:Function;
private static var FacebookScoresCallback:Function;
private static var SubmitCallback:Function;
public static function Scores(_arg1:Boolean, _arg2:String, _arg3:Function, _arg4:String="alltime"):void{
ScoresCallback = _arg3;
var _local5:URLLoader = new URLLoader();
_local5.addEventListener(Event.COMPLETE, ScoresFinished);
_local5.addEventListener(IOErrorEvent.IO_ERROR, ScoresError);
_local5.addEventListener(HTTPStatusEvent.HTTP_STATUS, StatusChange);
_local5.addEventListener(SecurityErrorEvent.SECURITY_ERROR, ScoresError);
_local5.load(new URLRequest(((((((((((("http://utils.swfstats.com/leaderboards/get.aspx?guid=" + Log.GUID) + "&swfid=") + Log.SWFID) + "&url=") + (((_arg1) || ((Log.SourceUrl == null)))) ? "global" : Log.SourceUrl) + "&table=") + _arg2) + "&mode=") + _arg4) + "&") + Math.random())));
}
public static function FacebookScores(_arg1:String, _arg2:Function, _arg3:Array=null, _arg4:String="alltime"):void{
FacebookScoresCallback = _arg2;
var _local5:URLLoader = new URLLoader();
_local5.addEventListener(Event.COMPLETE, FacebookScoresFinished);
_local5.addEventListener(IOErrorEvent.IO_ERROR, FacebookScoresError);
_local5.addEventListener(HTTPStatusEvent.HTTP_STATUS, StatusChange);
_local5.addEventListener(SecurityErrorEvent.SECURITY_ERROR, ScoresError);
_local5.load(new URLRequest(((((((((((("http://utils.swfstats.com/leaderboards/getfb.aspx?guid=" + Log.GUID) + "&swfid=") + Log.SWFID) + "&table=") + _arg1) + "&friendlist=") + ((_arg3)!=null) ? _arg3.join(",") : "") + "&mode=") + _arg4) + "&") + Math.random())));
}
private static function FacebookScoresError(_arg1:Event):void{
FacebookScoresCallback(null);
FacebookScoresCallback = null;
}
private static function StatusChange(... _args):void{
}
private static function SubmitFinished(_arg1:Event):void{
if (SubmitCallback == null){
return;
};
SubmitCallback(((_arg1.target as URLLoader).data == "true"));
SubmitCallback = null;
}
private static function ScoresError(_arg1:Event):void{
ScoresCallback(null);
ScoresCallback = null;
}
private static function SubmitError(_arg1:Event):void{
}
private static function ScoresFinished(_arg1:Event):void{
ScoresCallback(ProcessScores((_arg1.target as URLLoader)));
ScoresCallback = null;
}
private static function ProcessScores(_arg1:URLLoader):Array{
var _local5:String;
var _local6:int;
var _local7:int;
var _local8:int;
var _local10:XML;
var _local2:XML = XML(_arg1["data"]);
var _local3:XMLList = _local2["entry"];
var _local4:Array = new Array();
var _local9:Date = new Date();
for each (_local10 in _local3) {
_local5 = _local10["sdate"];
_local6 = int(_local5.substring((_local5.lastIndexOf("/") + 1)));
_local7 = int(_local5.substring(0, _local5.indexOf("/")));
_local8 = int(_local5.substring((_local5.indexOf("/") + 1)).substring(0, 2));
_local9.setFullYear(_local6, _local7, _local8);
_local4.push({Name:_local10["name"], Points:_local10["points"], Website:_local10["website"], Rank:(_local4.length + 1), SDate:_local9});
};
return (_local4);
}
private static function FacebookScoresFinished(_arg1:Event):void{
FacebookScoresCallback(ProcessScores((_arg1.target as URLLoader)));
FacebookScoresCallback = null;
}
public static function Submit(_arg1:String, _arg2:int, _arg3:String, _arg4:Function, _arg5:Boolean=false):void{
SubmitCallback = _arg4;
var _local6:URLLoader = new URLLoader();
_local6.addEventListener(Event.COMPLETE, SubmitFinished);
_local6.addEventListener(IOErrorEvent.IO_ERROR, SubmitError);
_local6.addEventListener(HTTPStatusEvent.HTTP_STATUS, StatusChange);
_local6.addEventListener(SecurityErrorEvent.SECURITY_ERROR, ScoresError);
_local6.load(new URLRequest(((((((((((((((((("http://utils.swfstats.com/leaderboards/save.aspx?guid=" + Log.GUID) + "&swfid=") + Log.SWFID) + "&url=") + Log.SourceUrl) + "&table=") + _arg3) + "&name=") + _arg1) + "&score=") + _arg2) + "&auth=") + Encode.MD5((Log.SourceUrl + _arg2.toString()))) + "&fb=") + (_arg5) ? "1" : "0") + "&r=") + Math.random())));
}
}
}//package SWFStats
Section 23
//Log (SWFStats.Log)
package SWFStats {
import flash.events.*;
import flash.utils.*;
import flash.system.*;
import flash.net.*;
import flash.external.*;
public final class Log {
private static const PingR:Timer = new Timer(30000);
private static const PingF:Timer = new Timer(60000);
public static var GUID:String = "";
private static var Plays:int = 0;
public static var Enabled:Boolean = false;
private static var Request:LogRequest = new LogRequest();
private static var Pings:int = 0;
public static var Queue:Boolean = true;
public static var SourceUrl:String;
private static var HighestGoal:int = 0;
private static var FirstPing:Boolean = true;
public static var SWFID:int = 0;
private static function SaveCookie(_arg1:String, _arg2:int):void{
var _local3:SharedObject = SharedObject.getLocal("swfstats");
_local3.data[_arg1] = _arg2.toString();
_local3.flush();
}
public static function View(_arg1:int=0, _arg2:String="", _arg3:String=""):void{
if (SWFID > 0){
return;
};
SWFID = _arg1;
GUID = _arg2;
Enabled = true;
if ((((SWFID == 0)) || ((GUID == "")))){
Enabled = false;
return;
};
if (((((!((_arg3.indexOf("http://") == 0))) && (!((Security.sandboxType == "localWithNetwork"))))) && (!((Security.sandboxType == "localTrusted"))))){
Enabled = false;
return;
};
SourceUrl = GetUrl(_arg3);
if ((((SourceUrl == null)) || ((SourceUrl == "")))){
Enabled = false;
return;
};
Security.allowDomain("http://tracker.swfstats.com/");
Security.allowInsecureDomain("http://tracker.swfstats.com/");
Security.loadPolicyFile("http://tracker.swfstats.com/crossdomain.xml");
Security.allowDomain("http://utils.swfstats.com/");
Security.allowInsecureDomain("http://utils.swfstats.com/");
Security.loadPolicyFile("http://utils.swfstats.com/crossdomain.xml");
var _local4:int = GetCookie("views");
_local4++;
SaveCookie("views", _local4);
Send(("v/" + _local4), true);
PingF.addEventListener(TimerEvent.TIMER, PingServer);
PingF.start();
}
public static function LevelCounterMetric(_arg1:String, _arg2):void{
if (!Enabled){
return;
};
Send(((("lc/" + Clean(_arg1)) + "/") + Clean(_arg2)));
}
private static function Clean(_arg1:String):String{
return (escape(_arg1.replace("/", "\\").replace("~", "-")));
}
public static function Play():void{
if (!Enabled){
return;
};
Plays++;
Send(("p/" + Plays));
}
private static function Send(_arg1:String, _arg2:Boolean=false):void{
Request.Queue(_arg1);
if (((((Request.Ready) || (_arg2))) || (!(Queue)))){
Request.Send();
Request = new LogRequest();
};
}
private static function GetUrl(_arg1:String):String{
var url:String;
var defaulturl = _arg1;
if (ExternalInterface.available){
try {
url = String(ExternalInterface.call("window.location.href.toString"));
} catch(s:Error) {
url = defaulturl;
};
} else {
if (defaulturl.indexOf("http://") == 0){
url = defaulturl;
};
};
if ((((((url == null)) || ((url == "")))) || ((url == "null")))){
if ((((Security.sandboxType == "localWithNetwork")) || ((Security.sandboxType == "localTrusted")))){
url = "http://local-testing/";
} else {
url = null;
};
};
return (url);
}
public static function LevelRangedMetric(_arg1:String, _arg2, _arg3:int):void{
if (!Enabled){
return;
};
Send(((((("lr/" + Clean(_arg1)) + "/") + Clean(_arg2)) + "/") + _arg3));
}
private static function GetCookie(_arg1:String):int{
var _local2:SharedObject = SharedObject.getLocal("swfstats");
if (_local2.data[_arg1] == undefined){
return (0);
};
return (int(_local2.data[_arg1]));
}
public static function Goal(_arg1:int, _arg2:String):void{
}
private static function PingServer(... _args):void{
if (!Enabled){
return;
};
Pings++;
Send(((("t/" + (FirstPing) ? "y" : "n") + "/") + Pings), true);
if (FirstPing){
PingF.stop();
PingR.addEventListener(TimerEvent.TIMER, PingServer);
PingR.start();
FirstPing = false;
};
}
public static function LevelAverageMetric(_arg1:String, _arg2, _arg3:int):void{
if (!Enabled){
return;
};
Send(((((("la/" + Clean(_arg1)) + "/") + Clean(_arg2)) + "/") + _arg3));
}
public static function CustomMetric(_arg1:String, _arg2:String=null):void{
if (!Enabled){
return;
};
if (_arg2 == null){
_arg2 = "";
};
Send(((("c/" + Clean(_arg1)) + "/") + Clean(_arg2)));
}
}
}//package SWFStats
Section 24
//LogRequest (SWFStats.LogRequest)
package SWFStats {
import flash.events.*;
import flash.net.*;
public final class LogRequest {
private var Data:String;// = ""
public var Ready:Boolean;// = false
private var Pieces:int;
private static var Failed:int = 0;
private function IOErrorHandler(_arg1:IOErrorEvent):void{
Failed++;
}
public function Queue(_arg1:String):void{
if (Failed > 3){
return;
};
this.Pieces++;
this.Data = (this.Data + (((this.Data == "")) ? "" : "~" + _arg1));
if ((((this.Pieces == 8)) || ((this.Data.length > 300)))){
this.Ready = true;
};
}
private function SecurityErrorHandler(_arg1:SecurityErrorEvent):void{
}
private function StatusChange(_arg1:HTTPStatusEvent):void{
}
public function Send():void{
var _local1:URLLoader = new URLLoader();
_local1.addEventListener(IOErrorEvent.IO_ERROR, this.IOErrorHandler);
_local1.addEventListener(HTTPStatusEvent.HTTP_STATUS, this.StatusChange);
_local1.addEventListener(SecurityErrorEvent.SECURITY_ERROR, this.SecurityErrorHandler);
_local1.load(new URLRequest((((((((((("http://tracker.swfstats.com/Games/q.aspx?guid=" + Log.GUID) + "&swfid=") + Log.SWFID) + "&q=") + this.Data) + "&url=") + Log.SourceUrl) + "&") + Math.random()) + "z")));
}
}
}//package SWFStats
Section 25
//BGManagerFastest (BGManagerFastest)
package {
import flash.events.*;
import flash.geom.*;
import flash.display.*;
import flash.utils.*;
import flash.filters.*;
public class BGManagerFastest extends Sprite {
public var bgUpC:Class;
public var bg0:Sprite;
public var bg1:Sprite;
public var bg2:Sprite;
public var bg0Accum:Number;// = 0
public var defaultBG0y:Number;
public var bgDownC:Class;
public var bg0X:Number;// = 0
public var defaultBG1y:Number;
public var bg0C:Class;
public var bg0W:Number;
public var bg1Accum:Number;// = 0
public var transformDown:Boolean;// = false
public var transformUp:Boolean;// = false
public var bg1C:Class;
public var BG_SCALE:Number;// = 1
public var bgDownAnim;
public var bmp0:Bitmap;
public var bmp1:Bitmap;
public var bmp2:Bitmap;
public var bg1W:Number;
public var bg1X:Number;// = 0
public var defaultBG2y:Number;
public var bg2Accum:Number;// = 0
public var bg2C:Class;
public var SCROLL_MULT:Number;// = 1
public var bg2W:Number;
public var bg2X:Number;// = 0
public var bgUpAnim;
public var BMD0:BitmapData;
public var BMD1:BitmapData;
public var BMD2:BitmapData;
public function BGManagerFastest(){
bg0C = BGManagerFastest_bg0C;
bg1C = BGManagerFastest_bg1C;
bg2C = BGManagerFastest_bg2C;
bgDownC = BGManagerFastest_bgDownC;
bgUpC = BGManagerFastest_bgUpC;
super();
bg0 = new bg0C();
bg0.scaleX = (bg0.scaleY = BG_SCALE);
BMD0 = new BitmapData((int(bg0.width) * 1.5), int(bg0.height), true, 0);
bmp0 = new Bitmap(BMD0);
BMD0.draw(bg0, new Matrix(BG_SCALE, 0, 0, BG_SCALE, 0, 0));
addChild(bmp0);
bmp0.scaleX = (bmp0.scaleY = (1 / BG_SCALE));
bg0W = bg0.width;
bmp0.y = 0;
bmp0.x = 0;
defaultBG0y = bmp0.y;
bg1 = new bg1C();
bg1.scaleX = (bg1.scaleY = BG_SCALE);
BMD1 = new BitmapData((bg1.width * 1.5), bg1.height, true, 0);
bmp1 = new Bitmap(BMD1);
BMD1.draw(bg1, new Matrix(BG_SCALE, 0, 0, BG_SCALE, 0, 0));
bmp1.scaleX = (bmp1.scaleY = (1 / BG_SCALE));
bg1W = bg1.width;
bmp1.y = ((432 - bg1.height) * BG_SCALE);
bmp1.x = 0;
defaultBG1y = bmp1.y;
bg2 = new bg2C();
bg2.scaleX = (bg2.scaleY = BG_SCALE);
BMD2 = new BitmapData((bg2.width * 1.5), bg2.height, true, 0);
bmp2 = new Bitmap(BMD2);
BMD2.draw(bg2, new Matrix(BG_SCALE, 0, 0, BG_SCALE, 0, 0));
addChild(bmp2);
bmp2.scaleX = (bmp2.scaleY = (1 / BG_SCALE));
bg2W = bg2.width;
bmp2.y = (432 - bg2.height);
bmp2.x = 0;
defaultBG2y = bmp2.y;
addEventListener(Event.ENTER_FRAME, enterFrame);
bgDownAnim = new bgDownC();
bgDownAnim.clouds.removeChildAt(0);
bgDownAnim.trees.removeChildAt(0);
bgDownAnim.mountains.removeChildAt(0);
bgDownAnim.gotoAndStop(1);
addChild(bgDownAnim);
bgUpAnim = new bgUpC();
bgUpAnim.clouds.removeChildAt(0);
bgUpAnim.trees.removeChildAt(0);
bgUpAnim.mountains.removeChildAt(0);
bgUpAnim.gotoAndStop(1);
addChild(bgUpAnim);
}
public function bmpsToDefaultY():void{
bmp0.y = defaultBG0y;
bmp1.y = defaultBG1y;
bmp2.y = defaultBG2y;
}
public function bmpsToZeroY():void{
bmp0.y = (bmp1.y = (bmp2.y = 0));
}
public function bmpsBackToPage():void{
bmpsToDefaultY();
addChild(bmp0);
addChild(bmp1);
addChild(bmp2);
}
public function transformIn():void{
transformUp = true;
bgUpAnim.clouds.addChild(bmp0);
bgUpAnim.mountains.addChild(bmp1);
bgUpAnim.trees.addChild(bmp2);
bmp0.y = (bmp1.y = (bmp2.y = 0));
bgUpAnim.gotoAndPlay(1);
}
public function transformOut():void{
transformDown = true;
bgDownAnim.clouds.addChild(bmp0);
bgDownAnim.mountains.addChild(bmp1);
bgDownAnim.trees.addChild(bmp2);
bmp0.y = (bmp1.y = (bmp2.y = 0));
bgDownAnim.gotoAndPlay(1);
}
public function clearBGAnims():void{
if (transformDown){
bgDownAnim.clouds.removeChildAt(0);
bgDownAnim.trees.removeChildAt(0);
bgDownAnim.mountains.removeChildAt(0);
} else {
if (transformUp){
bgUpAnim.clouds.removeChildAt(0);
bgUpAnim.trees.removeChildAt(0);
bgUpAnim.mountains.removeChildAt(0);
};
};
}
public function scroll(_arg1:Number):void{
var _local2:Rectangle;
}
public function enterFrame(_arg1:Event):void{
if (transformDown){
if (bgDownAnim.currentFrame == bgDownAnim.totalFrames){
bgDownAnim.gotoAndStop(1);
clearBGAnims();
transformDown = false;
dispatchEvent(new Event("downTransformComplete"));
};
};
if (transformUp){
if (bgUpAnim.currentFrame == bgUpAnim.totalFrames){
bgUpAnim.gotoAndStop(1);
clearBGAnims();
bmpsBackToPage();
transformUp = false;
};
};
}
}
}//package
Section 26
//BGManagerFastest_bg0C (BGManagerFastest_bg0C)
package {
import flash.display.*;
import mx.core.*;
public class BGManagerFastest_bg0C extends SpriteAsset {
public var txt_score:DisplayObject;
public var popup1:DisplayObject;
public var mountains:DisplayObject;
public var popup3:DisplayObject;
public var txt_bonus:DisplayObject;
public var trees:DisplayObject;
public var btn_leaderboards:DisplayObject;
public var popup2:DisplayObject;
public var txt_mult:DisplayObject;
public var btn_sfxOn:DisplayObject;
public var btn_aaOn:DisplayObject;
public var btn_bgmOn:DisplayObject;
public var txt_bonusCopy:DisplayObject;
public var popup:DisplayObject;
public var btn_restart:DisplayObject;
public var btn_sponsor:DisplayObject;
public var txt_meters:DisplayObject;
public var txt_scoreList:DisplayObject;
public var btn_options:DisplayObject;
public var txt_mph:DisplayObject;
public var clouds:DisplayObject;
public var btn_mobile:DisplayObject;
public var board:DisplayObject;
public var head:DisplayObject;
public var btn_blurOn:DisplayObject;
public var btn_back:DisplayObject;
public var flip:DisplayObject;
public var btn_resume:DisplayObject;
public var txt_timeList:DisplayObject;
}
}//package
Section 27
//BGManagerFastest_bg1C (BGManagerFastest_bg1C)
package {
import flash.display.*;
import mx.core.*;
public class BGManagerFastest_bg1C extends SpriteAsset {
public var txt_score:DisplayObject;
public var popup1:DisplayObject;
public var mountains:DisplayObject;
public var popup3:DisplayObject;
public var txt_bonus:DisplayObject;
public var trees:DisplayObject;
public var btn_leaderboards:DisplayObject;
public var popup2:DisplayObject;
public var txt_mult:DisplayObject;
public var btn_sfxOn:DisplayObject;
public var btn_aaOn:DisplayObject;
public var btn_bgmOn:DisplayObject;
public var txt_bonusCopy:DisplayObject;
public var popup:DisplayObject;
public var btn_restart:DisplayObject;
public var btn_sponsor:DisplayObject;
public var txt_meters:DisplayObject;
public var txt_scoreList:DisplayObject;
public var btn_options:DisplayObject;
public var txt_mph:DisplayObject;
public var clouds:DisplayObject;
public var btn_mobile:DisplayObject;
public var board:DisplayObject;
public var head:DisplayObject;
public var btn_blurOn:DisplayObject;
public var btn_back:DisplayObject;
public var flip:DisplayObject;
public var btn_resume:DisplayObject;
public var txt_timeList:DisplayObject;
}
}//package
Section 28
//BGManagerFastest_bg2C (BGManagerFastest_bg2C)
package {
import flash.display.*;
import mx.core.*;
public class BGManagerFastest_bg2C extends SpriteAsset {
public var txt_score:DisplayObject;
public var popup1:DisplayObject;
public var mountains:DisplayObject;
public var popup3:DisplayObject;
public var txt_bonus:DisplayObject;
public var trees:DisplayObject;
public var btn_leaderboards:DisplayObject;
public var popup2:DisplayObject;
public var txt_mult:DisplayObject;
public var btn_sfxOn:DisplayObject;
public var btn_aaOn:DisplayObject;
public var btn_bgmOn:DisplayObject;
public var txt_bonusCopy:DisplayObject;
public var popup:DisplayObject;
public var btn_restart:DisplayObject;
public var btn_sponsor:DisplayObject;
public var txt_meters:DisplayObject;
public var txt_scoreList:DisplayObject;
public var btn_options:DisplayObject;
public var txt_mph:DisplayObject;
public var clouds:DisplayObject;
public var btn_mobile:DisplayObject;
public var board:DisplayObject;
public var head:DisplayObject;
public var btn_blurOn:DisplayObject;
public var btn_back:DisplayObject;
public var flip:DisplayObject;
public var btn_resume:DisplayObject;
public var txt_timeList:DisplayObject;
}
}//package
Section 29
//BGManagerFastest_bgDownC (BGManagerFastest_bgDownC)
package {
import flash.display.*;
import mx.core.*;
public class BGManagerFastest_bgDownC extends MovieClipAsset {
public var txt_score:DisplayObject;
public var popup1:DisplayObject;
public var mountains:DisplayObject;
public var popup3:DisplayObject;
public var txt_bonus:DisplayObject;
public var trees:DisplayObject;
public var btn_leaderboards:DisplayObject;
public var popup2:DisplayObject;
public var txt_mult:DisplayObject;
public var btn_sfxOn:DisplayObject;
public var btn_aaOn:DisplayObject;
public var btn_bgmOn:DisplayObject;
public var txt_bonusCopy:DisplayObject;
public var popup:DisplayObject;
public var btn_restart:DisplayObject;
public var btn_sponsor:DisplayObject;
public var txt_meters:DisplayObject;
public var txt_scoreList:DisplayObject;
public var btn_options:DisplayObject;
public var txt_mph:DisplayObject;
public var clouds:DisplayObject;
public var btn_mobile:DisplayObject;
public var board:DisplayObject;
public var head:DisplayObject;
public var btn_blurOn:DisplayObject;
public var btn_back:DisplayObject;
public var flip:DisplayObject;
public var btn_resume:DisplayObject;
public var txt_timeList:DisplayObject;
}
}//package
Section 30
//BGManagerFastest_bgUpC (BGManagerFastest_bgUpC)
package {
import flash.display.*;
import mx.core.*;
public class BGManagerFastest_bgUpC extends MovieClipAsset {
public var txt_score:DisplayObject;
public var popup1:DisplayObject;
public var mountains:DisplayObject;
public var popup3:DisplayObject;
public var txt_bonus:DisplayObject;
public var trees:DisplayObject;
public var btn_leaderboards:DisplayObject;
public var popup2:DisplayObject;
public var txt_mult:DisplayObject;
public var btn_sfxOn:DisplayObject;
public var btn_aaOn:DisplayObject;
public var btn_bgmOn:DisplayObject;
public var txt_bonusCopy:DisplayObject;
public var popup:DisplayObject;
public var btn_restart:DisplayObject;
public var btn_sponsor:DisplayObject;
public var txt_meters:DisplayObject;
public var txt_scoreList:DisplayObject;
public var btn_options:DisplayObject;
public var txt_mph:DisplayObject;
public var clouds:DisplayObject;
public var btn_mobile:DisplayObject;
public var board:DisplayObject;
public var head:DisplayObject;
public var btn_blurOn:DisplayObject;
public var btn_back:DisplayObject;
public var flip:DisplayObject;
public var btn_resume:DisplayObject;
public var txt_timeList:DisplayObject;
}
}//package
Section 31
//BigJump (BigJump)
package {
import flash.events.*;
import flash.display.*;
import flash.text.*;
public class BigJump extends Scroller {
public var dangerSign;
public var size:int;
public var rangeText:TextField;
public var wwidth:Number;
public var blinkTimer:int;// = 3
public var incomingCover;
public var hudCanvas:Sprite;
public var passed:Boolean;// = false
public var range:int;
public static var dangerSignC:Class = BigJump_dangerSignC;
public static var gateIncomingOrangeC:Class = BigJump_gateIncomingOrangeC;
public static var incomingCoverC:Class = BigJump_incomingCoverC;
public static var jump600C:Class = BigJump_jump600C;
public static var jump400C:Class = BigJump_jump400C;
public static var jump200C:Class = BigJump_jump200C;
public function BigJump(_arg1:HeightmapRunner, _arg2:Sprite, _arg3:Sprite, _arg4:int){
super(_arg1, _arg2);
hudCanvas = _arg3;
size = _arg4;
incomingGraphic = new gateIncomingOrangeC();
if (size == 0){
wwidth = 200;
} else {
if (size == 1){
wwidth = 400;
} else {
wwidth = 600;
};
};
dangerSign = new dangerSignC();
hudCanvas.addChild(dangerSign);
dangerSign.visible = false;
incomingGraphic.scaleX = (incomingGraphic.scaleY = (size + 1));
incomingCover = new incomingCoverC();
incomingGraphic.addChild(incomingCover);
if (incomingCover.txt_meters){
incomingCover.txt_meters.visible = false;
};
}
public function drawCheck(_arg1:Number):Boolean{
if ((((_arg1 > x)) && ((_arg1 < (x + (wwidth * 1.2)))))){
return (true);
};
return (false);
}
override public function update():void{
super.update();
if (!killflag){
if (x < -((1000 + width))){
killflag = true;
} else {
killflag = false;
};
};
if (dangerSign){
dangerSign.visible = true;
dangerSign.x = (x - 1000);
if (((killflag) && (dangerSign.parent))){
dangerSign.parent.removeChild(dangerSign);
dangerSign = null;
};
};
if (((killflag) && (incomingGraphic.parent))){
incomingGraphic.parent.removeChild(incomingGraphic);
} else {
if (incomingGraphic.parent == null){
canvas.addChild(incomingGraphic);
};
};
incomingGraphic.y = 200;
incomingGraphic.x = 0x0300;
if (((((!(passed)) && ((x < runner.x)))) && (false))){
passed = true;
if (runner.passedJump == null){
runner.passedJump = this;
};
};
range = int(((x - 0x0300) * 0.1));
incomingGraphic.x = (0x0300 - (range * 0.3));
incomingGraphic.x = (0x0300 - ((range * range) * 0.001));
if (range > 200){
incomingCover.alpha = 1;
} else {
incomingCover.alpha = (range / 200);
};
incomingGraphic.txt_meters.text = "jump";
if ((((numChildren == 0)) && ((range < 50)))){
if (size == 0){
addChild(new jump200C());
} else {
if (size == 1){
addChild(new jump400C());
} else {
addChild(new jump600C());
};
};
};
if ((((range > 0)) && ((range < 400)))){
blinkTimer--;
if (blinkTimer <= 0){
blinkTimer = 3;
incomingGraphic.visible = !(incomingGraphic.visible);
incomingGraphic.visible = true;
};
} else {
incomingGraphic.visible = false;
};
}
}
}//package
Section 32
//BigJump_dangerSignC (BigJump_dangerSignC)
package {
import flash.display.*;
import mx.core.*;
public class BigJump_dangerSignC extends SpriteAsset {
public var txt_timeList:DisplayObject;
public var txt_score:DisplayObject;
public var popup1:DisplayObject;
public var mountains:DisplayObject;
public var popup3:DisplayObject;
public var txt_bonus:DisplayObject;
public var trees:DisplayObject;
public var btn_twitter:DisplayObject;
public var btn_next:DisplayObject;
public var btn_leaderboards:DisplayObject;
public var credits:DisplayObject;
public var options:DisplayObject;
public var txt_mult:DisplayObject;
public var btn_sfxOn:DisplayObject;
public var btn_aaOn:DisplayObject;
public var btn_bgmOn:DisplayObject;
public var txt_bonusCopy:DisplayObject;
public var popup2:DisplayObject;
public var skierFalling:DisplayObject;
public var btn_restart:DisplayObject;
public var btn_prev:DisplayObject;
public var btn_sponsor:DisplayObject;
public var tips:DisplayObject;
public var txt_meters:DisplayObject;
public var btn_stump:DisplayObject;
public var txt_time:DisplayObject;
public var txt_scoreList:DisplayObject;
public var btn_facebook:DisplayObject;
public var popup:DisplayObject;
public var btn_options:DisplayObject;
public var txt_mph:DisplayObject;
public var clouds:DisplayObject;
public var share:DisplayObject;
public var btn_mikengreg:DisplayObject;
public var btn_mobile:DisplayObject;
public var board:DisplayObject;
public var btn_blurOn:DisplayObject;
public var btn_back:DisplayObject;
public var flip:DisplayObject;
public var head:DisplayObject;
public var btn_resume:DisplayObject;
public var leaderboard:DisplayObject;
public var skier:DisplayObject;
}
}//package
Section 33
//BigJump_gateIncomingOrangeC (BigJump_gateIncomingOrangeC)
package {
import flash.display.*;
import mx.core.*;
public class BigJump_gateIncomingOrangeC extends SpriteAsset {
public var txt_timeList:DisplayObject;
public var txt_score:DisplayObject;
public var popup1:DisplayObject;
public var mountains:DisplayObject;
public var popup3:DisplayObject;
public var txt_bonus:DisplayObject;
public var trees:DisplayObject;
public var btn_twitter:DisplayObject;
public var btn_next:DisplayObject;
public var btn_leaderboards:DisplayObject;
public var credits:DisplayObject;
public var options:DisplayObject;
public var txt_mult:DisplayObject;
public var btn_sfxOn:DisplayObject;
public var btn_aaOn:DisplayObject;
public var btn_bgmOn:DisplayObject;
public var txt_bonusCopy:DisplayObject;
public var popup2:DisplayObject;
public var skierFalling:DisplayObject;
public var btn_restart:DisplayObject;
public var btn_prev:DisplayObject;
public var btn_sponsor:DisplayObject;
public var tips:DisplayObject;
public var txt_meters:DisplayObject;
public var btn_stump:DisplayObject;
public var txt_time:DisplayObject;
public var txt_scoreList:DisplayObject;
public var btn_facebook:DisplayObject;
public var popup:DisplayObject;
public var btn_options:DisplayObject;
public var txt_mph:DisplayObject;
public var clouds:DisplayObject;
public var share:DisplayObject;
public var btn_mikengreg:DisplayObject;
public var btn_mobile:DisplayObject;
public var board:DisplayObject;
public var btn_blurOn:DisplayObject;
public var btn_back:DisplayObject;
public var flip:DisplayObject;
public var head:DisplayObject;
public var btn_resume:DisplayObject;
public var leaderboard:DisplayObject;
public var skier:DisplayObject;
}
}//package
Section 34
//BigJump_incomingCoverC (BigJump_incomingCoverC)
package {
import flash.display.*;
import mx.core.*;
public class BigJump_incomingCoverC extends SpriteAsset {
public var txt_timeList:DisplayObject;
public var txt_score:DisplayObject;
public var popup1:DisplayObject;
public var mountains:DisplayObject;
public var popup3:DisplayObject;
public var txt_bonus:DisplayObject;
public var trees:DisplayObject;
public var btn_twitter:DisplayObject;
public var btn_next:DisplayObject;
public var btn_leaderboards:DisplayObject;
public var credits:DisplayObject;
public var options:DisplayObject;
public var txt_mult:DisplayObject;
public var btn_sfxOn:DisplayObject;
public var btn_aaOn:DisplayObject;
public var btn_bgmOn:DisplayObject;
public var txt_bonusCopy:DisplayObject;
public var popup2:DisplayObject;
public var skierFalling:DisplayObject;
public var btn_restart:DisplayObject;
public var btn_prev:DisplayObject;
public var btn_sponsor:DisplayObject;
public var tips:DisplayObject;
public var txt_meters:DisplayObject;
public var btn_stump:DisplayObject;
public var txt_time:DisplayObject;
public var txt_scoreList:DisplayObject;
public var btn_facebook:DisplayObject;
public var popup:DisplayObject;
public var btn_options:DisplayObject;
public var txt_mph:DisplayObject;
public var clouds:DisplayObject;
public var share:DisplayObject;
public var btn_mikengreg:DisplayObject;
public var btn_mobile:DisplayObject;
public var board:DisplayObject;
public var btn_blurOn:DisplayObject;
public var btn_back:DisplayObject;
public var flip:DisplayObject;
public var head:DisplayObject;
public var btn_resume:DisplayObject;
public var leaderboard:DisplayObject;
public var skier:DisplayObject;
}
}//package
Section 35
//BigJump_jump200C (BigJump_jump200C)
package {
import flash.display.*;
import mx.core.*;
public class BigJump_jump200C extends SpriteAsset {
public var txt_timeList:DisplayObject;
public var txt_score:DisplayObject;
public var popup1:DisplayObject;
public var mountains:DisplayObject;
public var popup3:DisplayObject;
public var txt_bonus:DisplayObject;
public var trees:DisplayObject;
public var btn_twitter:DisplayObject;
public var btn_next:DisplayObject;
public var btn_leaderboards:DisplayObject;
public var credits:DisplayObject;
public var options:DisplayObject;
public var txt_mult:DisplayObject;
public var btn_sfxOn:DisplayObject;
public var btn_aaOn:DisplayObject;
public var btn_bgmOn:DisplayObject;
public var txt_bonusCopy:DisplayObject;
public var popup2:DisplayObject;
public var skierFalling:DisplayObject;
public var btn_restart:DisplayObject;
public var btn_prev:DisplayObject;
public var btn_sponsor:DisplayObject;
public var tips:DisplayObject;
public var txt_meters:DisplayObject;
public var btn_stump:DisplayObject;
public var txt_time:DisplayObject;
public var txt_scoreList:DisplayObject;
public var btn_facebook:DisplayObject;
public var popup:DisplayObject;
public var btn_options:DisplayObject;
public var txt_mph:DisplayObject;
public var clouds:DisplayObject;
public var share:DisplayObject;
public var btn_mikengreg:DisplayObject;
public var btn_mobile:DisplayObject;
public var board:DisplayObject;
public var btn_blurOn:DisplayObject;
public var btn_back:DisplayObject;
public var flip:DisplayObject;
public var head:DisplayObject;
public var btn_resume:DisplayObject;
public var leaderboard:DisplayObject;
public var skier:DisplayObject;
}
}//package
Section 36
//BigJump_jump400C (BigJump_jump400C)
package {
import flash.display.*;
import mx.core.*;
public class BigJump_jump400C extends SpriteAsset {
public var txt_timeList:DisplayObject;
public var txt_score:DisplayObject;
public var popup1:DisplayObject;
public var mountains:DisplayObject;
public var popup3:DisplayObject;
public var txt_bonus:DisplayObject;
public var trees:DisplayObject;
public var btn_twitter:DisplayObject;
public var btn_next:DisplayObject;
public var btn_leaderboards:DisplayObject;
public var credits:DisplayObject;
public var options:DisplayObject;
public var txt_mult:DisplayObject;
public var btn_sfxOn:DisplayObject;
public var btn_aaOn:DisplayObject;
public var btn_bgmOn:DisplayObject;
public var txt_bonusCopy:DisplayObject;
public var popup2:DisplayObject;
public var skierFalling:DisplayObject;
public var btn_restart:DisplayObject;
public var btn_prev:DisplayObject;
public var btn_sponsor:DisplayObject;
public var tips:DisplayObject;
public var txt_meters:DisplayObject;
public var btn_stump:DisplayObject;
public var txt_time:DisplayObject;
public var txt_scoreList:DisplayObject;
public var btn_facebook:DisplayObject;
public var popup:DisplayObject;
public var btn_options:DisplayObject;
public var txt_mph:DisplayObject;
public var clouds:DisplayObject;
public var share:DisplayObject;
public var btn_mikengreg:DisplayObject;
public var btn_mobile:DisplayObject;
public var board:DisplayObject;
public var btn_blurOn:DisplayObject;
public var btn_back:DisplayObject;
public var flip:DisplayObject;
public var head:DisplayObject;
public var btn_resume:DisplayObject;
public var leaderboard:DisplayObject;
public var skier:DisplayObject;
}
}//package
Section 37
//BigJump_jump600C (BigJump_jump600C)
package {
import flash.display.*;
import mx.core.*;
public class BigJump_jump600C extends SpriteAsset {
public var txt_timeList:DisplayObject;
public var txt_score:DisplayObject;
public var popup1:DisplayObject;
public var mountains:DisplayObject;
public var popup3:DisplayObject;
public var txt_bonus:DisplayObject;
public var trees:DisplayObject;
public var btn_twitter:DisplayObject;
public var btn_next:DisplayObject;
public var btn_leaderboards:DisplayObject;
public var credits:DisplayObject;
public var options:DisplayObject;
public var txt_mult:DisplayObject;
public var btn_sfxOn:DisplayObject;
public var btn_aaOn:DisplayObject;
public var btn_bgmOn:DisplayObject;
public var txt_bonusCopy:DisplayObject;
public var popup2:DisplayObject;
public var skierFalling:DisplayObject;
public var btn_restart:DisplayObject;
public var btn_prev:DisplayObject;
public var btn_sponsor:DisplayObject;
public var tips:DisplayObject;
public var txt_meters:DisplayObject;
public var btn_stump:DisplayObject;
public var txt_time:DisplayObject;
public var txt_scoreList:DisplayObject;
public var btn_facebook:DisplayObject;
public var popup:DisplayObject;
public var btn_options:DisplayObject;
public var txt_mph:DisplayObject;
public var clouds:DisplayObject;
public var share:DisplayObject;
public var btn_mikengreg:DisplayObject;
public var btn_mobile:DisplayObject;
public var board:DisplayObject;
public var btn_blurOn:DisplayObject;
public var btn_back:DisplayObject;
public var flip:DisplayObject;
public var head:DisplayObject;
public var btn_resume:DisplayObject;
public var leaderboard:DisplayObject;
public var skier:DisplayObject;
}
}//package
Section 38
//DeadZone (DeadZone)
package {
import flash.display.*;
public class DeadZone extends Scroller {
public function DeadZone(_arg1:HeightmapRunner, _arg2:Sprite){
super(_arg1, _arg2);
graphics.beginFill(0xFF0000);
graphics.drawRect(0, 0, 40, 400);
graphics.endFill();
}
override public function update():void{
super.update();
if ((((runner.x > x)) && ((runner.x < (x + width))))){
if ((((runner.y > y)) && ((runner.y < (y + height))))){
runner.drawMe(0xFF00);
};
};
}
public function checkDrawX(_arg1:Number):Boolean{
if ((((_arg1 > x)) && ((_arg1 < (x + width))))){
return (false);
};
return (true);
}
}
}//package
Section 39
//EndgameScreen (EndgameScreen)
package {
import flash.events.*;
import flash.display.*;
import flash.net.*;
import General.*;
import SWFStats.*;
public class EndgameScreen extends Sprite {
public var options:OptionsBoard;
public var gameOverBaseC:Class;
public var state:String;// = "center"
public var endgameSplash;
public var gameOverBase;
public var endgameSplashC:Class;
public function EndgameScreen(){
gameOverBaseC = EndgameScreen_gameOverBaseC;
endgameSplashC = EndgameScreen_endgameSplashC;
super();
gameOverBase = new gameOverBaseC();
addChild(gameOverBase);
gameOverBase.tips.tips.gotoAndStop(1);
options = new OptionsBoard(gameOverBase.options);
gameOverBase.stop();
addEventListener(Event.ENTER_FRAME, enterFrame, false, 0, true);
}
public function toLeaderboard(_arg1:MouseEvent):void{
state = "right";
}
public function unRegisterButtons():void{
Util.ButtonUnReg(gameOverBase.tips.btn_next, nextTip);
Util.ButtonUnReg(gameOverBase.tips.btn_prev, prevTip);
Util.ButtonUnReg(gameOverBase.board.btn_restart, endgameRestart);
Util.ButtonUnReg(gameOverBase.board.btn_leaderboards, toLeaderboard);
Util.ButtonUnReg(gameOverBase.board.btn_options, toOptions);
Util.ButtonUnReg(gameOverBase.leaderboard.btn_back, toCenter);
Util.ButtonUnReg(gameOverBase.leaderboard.btn_options, toOptions);
Util.ButtonUnReg(gameOverBase.options.btn_leaderboards, toLeaderboard);
Util.ButtonUnReg(gameOverBase.options.btn_back, toCenter);
Util.ButtonUnReg(gameOverBase.credits.btn_stump, toStump);
Util.ButtonUnReg(gameOverBase.credits.btn_mikengreg, toMikengreg);
Util.ButtonUnReg(gameOverBase.share.btn_twitter, twitterz);
Util.ButtonUnReg(gameOverBase.share.btn_facebook, facebookd);
Util.ButtonUnReg(gameOverBase.share.btn_mobile, toMobile);
Util.ButtonUnReg(gameOverBase.board.btn_sponsor, MainRef.gotoKong);
Util.ButtonUnReg(gameOverBase.leaderboard.btn_sponsor, MainRef.gotoKong);
options.unRegisterButtons();
}
public function endgameRestart(_arg1:MouseEvent):void{
unRegisterButtons();
MainRef.ref.toTitle();
removeChild(gameOverBase);
gameOverBase = null;
removeEventListener(Event.ENTER_FRAME, enterFrame);
}
public function toMikengreg(_arg1:MouseEvent):void{
Log.CustomMetric("mikengregd", "links");
navigateToURL(new URLRequest("http://mikengreg.com"), "_blank");
}
public function refresh(_arg1:uint, _arg2:int, _arg3:Number):void{
if (_arg2 > 100000000){
Log.CustomMetric("beat 100,000,000", "scores");
} else {
if (_arg2 > 10000000){
Log.CustomMetric("beat 10,000,000", "scores");
} else {
if (_arg2 > 500000){
Log.CustomMetric("beat 500,000", "scores");
} else {
if (_arg2 < 1500){
Log.CustomMetric("less than 1,500", "scores");
};
};
};
};
Log.CustomMetric(MainRef.ref.howIdie, "how_i_die");
gameOverBase.board.txt_time.text = Util.formatTimeHMSms(_arg1);
gameOverBase.board.txt_score.text = Util.CommaFormat(_arg2);
gameOverBase.gotoAndPlay(1);
gameOverBase.skierFalling.x = _arg3;
gameOverBase.skierFalling.gotoAndPlay(1);
gameOverBase.tips.tips.gotoAndStop(Math.ceil((gameOverBase.tips.tips.totalFrames * Math.random())));
var _local4:String = TipManager.dispenseWithTheTip();
if (_local4 != ""){
gameOverBase.tips.tips.gotoAndStop(_local4);
};
x = 0;
state = "center";
endgameSplash = null;
MainRef.ref.localLeaderboard.fillBoard(gameOverBase.leaderboard);
this.registerButtons();
}
public function toStump(_arg1:MouseEvent):void{
Log.CustomMetric("joestumpd", "links");
navigateToURL(new URLRequest("http://www.joestump.com"), "_blank");
}
public function toOptions(_arg1:MouseEvent):void{
state = "left";
}
public function registerButtons():void{
Util.ButtonReg(gameOverBase.tips.btn_next, nextTip);
Util.ButtonReg(gameOverBase.tips.btn_prev, prevTip);
Util.ButtonReg(gameOverBase.board.btn_restart, endgameRestart);
Util.ButtonReg(gameOverBase.board.btn_leaderboards, toLeaderboard);
Util.ButtonReg(gameOverBase.board.btn_options, toOptions);
Util.ButtonReg(gameOverBase.leaderboard.btn_back, toCenter);
Util.ButtonReg(gameOverBase.leaderboard.btn_options, toOptions);
Util.ButtonReg(gameOverBase.options.btn_leaderboards, toLeaderboard);
Util.ButtonReg(gameOverBase.options.btn_back, toCenter);
Util.ButtonReg(gameOverBase.credits.btn_stump, toStump);
Util.ButtonReg(gameOverBase.credits.btn_mikengreg, toMikengreg);
Util.ButtonReg(gameOverBase.share.btn_twitter, twitterz);
Util.ButtonReg(gameOverBase.share.btn_facebook, facebookd);
Util.ButtonReg(gameOverBase.share.btn_mobile, toMobile);
Util.ButtonReg(gameOverBase.board.btn_sponsor, MainRef.gotoKong);
Util.ButtonReg(gameOverBase.leaderboard.btn_sponsor, MainRef.gotoKong);
options.registerButtons();
}
public function twitterz(_arg1:MouseEvent):void{
Log.CustomMetric("twitterz", "links");
var _local2:String = Util.CommaFormat(MainRef.ref.scorekeeper.score);
if (MainRef.ref.howIdie == "drawSelf"){
navigateToURL(new URLRequest((((("http://twitter.com/home?status=RIP Solipskier. While smashing his face into a cliff at " + MainRef.ref.deathSpeed) + " km/h was dumb, he did achieve ") + _local2) + " points. http://solipskier.com")), "_blank");
} else {
if (MainRef.ref.howIdie == "killGate"){
navigateToURL(new URLRequest((((("http://twitter.com/home?status=RIP Solipskier. His flesh was ripped from his skis at " + MainRef.ref.deathSpeed) + " km/h. Though he did have ") + _local2) + " points. http://solipskier.com")), "_blank");
} else {
navigateToURL(new URLRequest((((("http://twitter.com/home?status=RIP Solipskier. The earth opened up and he fell into the abyss at " + MainRef.ref.deathSpeed) + " km/h. Remember his score of ") + _local2) + ". http://solipskier.com")), "_blank");
};
};
}
public function nextTip(_arg1:MouseEvent):void{
if (gameOverBase.tips.tips.currentFrame == gameOverBase.tips.tips.totalFrames){
gameOverBase.tips.tips.gotoAndStop(1);
} else {
gameOverBase.tips.tips.nextFrame();
};
}
public function facebookd(_arg1:MouseEvent):void{
Log.CustomMetric("facebookd", "links");
var _local2:String = MainRef.ref.scorekeeper.score.toString();
if (MainRef.ref.howIdie == "drawSelf"){
navigateToURL(new URLRequest((((("http://www.facebook.com/sharer.php?u=http://mikengreg.com/solipskier/fb.php?RIP Solipskier. While smashing his face into a cliff at " + MainRef.ref.deathSpeed) + " kmh was dumb. He did achieve ") + _local2) + " points.")), "_blank");
} else {
if (MainRef.ref.howIdie == "killGate"){
navigateToURL(new URLRequest((((("http://www.facebook.com/sharer.php?u=http://mikengreg.com/solipskier/fb.php?RIP Solipskier. His flesh was ripped from his skis at " + MainRef.ref.deathSpeed) + " kmh. Though he did have ") + _local2) + " points.")), "_blank");
} else {
navigateToURL(new URLRequest((((("http://www.facebook.com/sharer.php?u=http://mikengreg.com/solipskier/fb.php?RIP Solipskier. The earth opened up and he fell into the abyss at " + MainRef.ref.deathSpeed) + " kmh. Remember his score of ") + _local2) + ".")), "_blank");
};
};
}
public function toCenter(_arg1:MouseEvent):void{
state = "center";
}
public function enterFrame(_arg1:Event):void{
if (state == "left"){
x = (x + ((0x0300 - x) * 0.1));
} else {
if (state == "center"){
x = (x + ((0 - x) * 0.1));
} else {
if (state == "right"){
x = (x + ((-768 - x) * 0.1));
};
};
};
if (gameOverBase.currentFrame == gameOverBase.totalFrames){
gameOverBase.stop();
gameOverBase.skierFalling.gotoAndStop(gameOverBase.currentFrame);
};
if (gameOverBase.currentLabel == "middle"){
gameOverBase.stop();
gameOverBase.skierFalling.gotoAndStop(gameOverBase.currentFrame);
};
if ((((gameOverBase.currentLabel == "splash")) && (!(endgameSplash)))){
SoundMgr.playSound("jumpLanding");
endgameSplash = new endgameSplashC();
gameOverBase.skierFalling.addChild(endgameSplash);
endgameSplash.y = 432;
endgameSplash.scaleX = (endgameSplash.scaleY = 2);
MainRef.ref.chopinTimer = 1000;
SoundMgr.stopSound("windSound");
};
if (endgameSplash){
if (endgameSplash.currentFrame == endgameSplash.totalFrames){
gameOverBase.skierFalling.visible = false;
if (endgameSplash.parent != null){
MainRef.ref.submitKongScores();
endgameSplash.parent.removeChild(endgameSplash);
};
};
};
}
public function prevTip(_arg1:MouseEvent):void{
if (gameOverBase.tips.tips.currentFrame == 1){
gameOverBase.tips.tips.gotoAndStop(gameOverBase.tips.tips.totalFrames);
} else {
gameOverBase.tips.tips.prevFrame();
};
}
public function toMobile(_arg1:MouseEvent):void{
MainRef.gotoSolipRedirect(_arg1);
}
}
}//package
Section 40
//EndgameScreen_endgameSplashC (EndgameScreen_endgameSplashC)
package {
import flash.display.*;
import mx.core.*;
public class EndgameScreen_endgameSplashC extends MovieClipAsset {
public var txt_timeList:DisplayObject;
public var txt_score:DisplayObject;
public var popup1:DisplayObject;
public var mountains:DisplayObject;
public var popup3:DisplayObject;
public var txt_bonus:DisplayObject;
public var trees:DisplayObject;
public var btn_twitter:DisplayObject;
public var btn_next:DisplayObject;
public var btn_leaderboards:DisplayObject;
public var credits:DisplayObject;
public var options:DisplayObject;
public var txt_mult:DisplayObject;
public var btn_sfxOn:DisplayObject;
public var btn_aaOn:DisplayObject;
public var btn_bgmOn:DisplayObject;
public var txt_bonusCopy:DisplayObject;
public var popup2:DisplayObject;
public var skierFalling:DisplayObject;
public var btn_restart:DisplayObject;
public var btn_prev:DisplayObject;
public var btn_sponsor:DisplayObject;
public var tips:DisplayObject;
public var txt_meters:DisplayObject;
public var btn_stump:DisplayObject;
public var txt_time:DisplayObject;
public var txt_scoreList:DisplayObject;
public var btn_facebook:DisplayObject;
public var popup:DisplayObject;
public var btn_options:DisplayObject;
public var txt_mph:DisplayObject;
public var clouds:DisplayObject;
public var share:DisplayObject;
public var btn_mikengreg:DisplayObject;
public var btn_mobile:DisplayObject;
public var board:DisplayObject;
public var btn_blurOn:DisplayObject;
public var btn_back:DisplayObject;
public var flip:DisplayObject;
public var head:DisplayObject;
public var btn_resume:DisplayObject;
public var leaderboard:DisplayObject;
public var skier:DisplayObject;
}
}//package
Section 41
//EndgameScreen_gameOverBaseC (EndgameScreen_gameOverBaseC)
package {
import flash.display.*;
import mx.core.*;
public class EndgameScreen_gameOverBaseC extends MovieClipAsset {
public var txt_timeList:DisplayObject;
public var txt_score:DisplayObject;
public var popup1:DisplayObject;
public var mountains:DisplayObject;
public var popup3:DisplayObject;
public var txt_bonus:DisplayObject;
public var trees:DisplayObject;
public var btn_twitter:DisplayObject;
public var btn_next:DisplayObject;
public var btn_leaderboards:DisplayObject;
public var credits:DisplayObject;
public var options:DisplayObject;
public var txt_mult:DisplayObject;
public var btn_sfxOn:DisplayObject;
public var btn_aaOn:DisplayObject;
public var btn_bgmOn:DisplayObject;
public var txt_bonusCopy:DisplayObject;
public var popup2:DisplayObject;
public var skierFalling:DisplayObject;
public var btn_restart:DisplayObject;
public var btn_prev:DisplayObject;
public var btn_sponsor:DisplayObject;
public var tips:DisplayObject;
public var txt_meters:DisplayObject;
public var btn_stump:DisplayObject;
public var txt_time:DisplayObject;
public var txt_scoreList:DisplayObject;
public var btn_facebook:DisplayObject;
public var popup:DisplayObject;
public var btn_options:DisplayObject;
public var txt_mph:DisplayObject;
public var clouds:DisplayObject;
public var share:DisplayObject;
public var btn_mikengreg:DisplayObject;
public var btn_mobile:DisplayObject;
public var board:DisplayObject;
public var btn_blurOn:DisplayObject;
public var btn_back:DisplayObject;
public var flip:DisplayObject;
public var head:DisplayObject;
public var btn_resume:DisplayObject;
public var leaderboard:DisplayObject;
public var skier:DisplayObject;
}
}//package
Section 42
//Gate (Gate)
package {
import flash.events.*;
import flash.display.*;
import flash.text.*;
import General.*;
public class Gate extends Scroller {
public var type:int;
public var gateIncomingRedC:Class;
public var rangeText:TextField;
public var gateMissC:Class;
public var gateIncomingGreenC:Class;
public var gateC:Class;
public var hudCanvas:Sprite;
public var passed:Boolean;// = false
public var incomingCover;
public var r:Number;
public var incomingCoverC:Class;
public var gateHitC:Class;
public var range:int;
public var gateIncomingYellowC:Class;
public function Gate(_arg1:HeightmapRunner, _arg2:Sprite, _arg3:Sprite, _arg4:int, _arg5:Number, _arg6:Number){
gateIncomingGreenC = Gate_gateIncomingGreenC;
gateIncomingYellowC = Gate_gateIncomingYellowC;
gateIncomingRedC = Gate_gateIncomingRedC;
incomingCoverC = Gate_incomingCoverC;
gateC = Gate_gateC;
gateHitC = Gate_gateHitC;
gateMissC = Gate_gateMissC;
super(_arg1, _arg2);
hudCanvas = _arg3;
type = _arg4;
rangeText = new TextField();
if (type == 2){
graphics.lineStyle(6, 0xFF00);
rangeText.textColor = 0xFF00;
incomingGraphic = new gateIncomingGreenC();
} else {
if (type == 1){
graphics.lineStyle(6, 0xFF00);
rangeText.textColor = 0xFF00;
incomingGraphic = new gateIncomingGreenC();
} else {
graphics.lineStyle(6, 0xFF00);
rangeText.textColor = 0xFF00;
incomingGraphic = new gateIncomingGreenC();
};
};
if ((this is TunnelGate)){
graphics.lineStyle(6, 0xFF);
rangeText.textColor = 0xFF;
};
r = _arg5;
y = _arg6;
x = 2000;
if (!(this is TunnelGate)){
addChild(new gateC());
};
rangeText = incomingGraphic.txt_meters;
incomingCover = new incomingCoverC();
if (incomingCover.txt_meters){
incomingCover.txt_meters.visible = false;
};
}
override public function update():void{
super.update();
if (incomingCover.parent == null){
incomingGraphic.addChild(incomingCover);
};
if (((killflag) && (incomingGraphic.parent))){
incomingGraphic.parent.removeChild(incomingGraphic);
} else {
if (incomingGraphic.parent == null){
hudCanvas.addChild(incomingGraphic);
};
};
if (!(this is TunnelGate)){
incomingGraphic.y = y;
};
incomingGraphic.x = 0x0300;
range = int(((x - 0x0300) * 0.1));
incomingGraphic.x = (0x0300 - ((range * range) * 0.001));
if (range > 300){
incomingCover.alpha = 1;
} else {
incomingCover.alpha = (range / 300);
};
if (rangeText){
rangeText.text = range.toString();
};
if ((((range < 0)) || ((range > 500)))){
incomingGraphic.visible = false;
} else {
incomingGraphic.visible = true;
};
if (!passed){
if (x < runner.x){
passed = true;
if (Math.abs((y - runner.y)) < (r + 25)){
graphics.lineStyle(4, 0xFF00);
success();
} else {
graphics.lineStyle(4, 0xFF0000);
failure();
};
};
};
}
public function success():void{
if (!runner.grounded){
runner.boostTimer = (runner.boostTimer + 60);
SoundMgr.playSound("speedBoost");
} else {
SoundMgr.playSound("gatePickup");
};
MainRef.ref.scorekeeper.crossGate();
removeChildAt(0);
addChild(new gateHitC());
TipManager.Signal_gateHit(runner.grounded);
}
public function failure():void{
if ((((runner.y > 0)) || (runner.grounded))){
SoundMgr.playSound("gateMiss");
MainRef.ref.scorekeeper.missGate();
removeChildAt(0);
addChild(new gateMissC());
} else {
SoundMgr.playSound("tunnelHit");
MainRef.ref.scorekeeper.jumpGate();
};
}
}
}//package
Section 43
//Gate_gateC (Gate_gateC)
package {
import flash.display.*;
import mx.core.*;
public class Gate_gateC extends SpriteAsset {
public var txt_timeList:DisplayObject;
public var txt_score:DisplayObject;
public var popup1:DisplayObject;
public var mountains:DisplayObject;
public var popup3:DisplayObject;
public var txt_bonus:DisplayObject;
public var trees:DisplayObject;
public var btn_twitter:DisplayObject;
public var btn_next:DisplayObject;
public var btn_leaderboards:DisplayObject;
public var credits:DisplayObject;
public var options:DisplayObject;
public var txt_mult:DisplayObject;
public var btn_sfxOn:DisplayObject;
public var btn_aaOn:DisplayObject;
public var btn_bgmOn:DisplayObject;
public var txt_bonusCopy:DisplayObject;
public var popup2:DisplayObject;
public var skierFalling:DisplayObject;
public var btn_restart:DisplayObject;
public var btn_prev:DisplayObject;
public var btn_sponsor:DisplayObject;
public var tips:DisplayObject;
public var txt_meters:DisplayObject;
public var btn_stump:DisplayObject;
public var txt_time:DisplayObject;
public var txt_scoreList:DisplayObject;
public var btn_facebook:DisplayObject;
public var popup:DisplayObject;
public var btn_options:DisplayObject;
public var txt_mph:DisplayObject;
public var clouds:DisplayObject;
public var share:DisplayObject;
public var btn_mikengreg:DisplayObject;
public var btn_mobile:DisplayObject;
public var board:DisplayObject;
public var btn_blurOn:DisplayObject;
public var btn_back:DisplayObject;
public var flip:DisplayObject;
public var head:DisplayObject;
public var btn_resume:DisplayObject;
public var leaderboard:DisplayObject;
public var skier:DisplayObject;
}
}//package
Section 44
//Gate_gateHitC (Gate_gateHitC)
package {
import flash.display.*;
import mx.core.*;
public class Gate_gateHitC extends SpriteAsset {
public var txt_timeList:DisplayObject;
public var txt_score:DisplayObject;
public var popup1:DisplayObject;
public var mountains:DisplayObject;
public var popup3:DisplayObject;
public var txt_bonus:DisplayObject;
public var trees:DisplayObject;
public var btn_twitter:DisplayObject;
public var btn_next:DisplayObject;
public var btn_leaderboards:DisplayObject;
public var credits:DisplayObject;
public var options:DisplayObject;
public var txt_mult:DisplayObject;
public var btn_sfxOn:DisplayObject;
public var btn_aaOn:DisplayObject;
public var btn_bgmOn:DisplayObject;
public var txt_bonusCopy:DisplayObject;
public var popup2:DisplayObject;
public var skierFalling:DisplayObject;
public var btn_restart:DisplayObject;
public var btn_prev:DisplayObject;
public var btn_sponsor:DisplayObject;
public var tips:DisplayObject;
public var txt_meters:DisplayObject;
public var btn_stump:DisplayObject;
public var txt_time:DisplayObject;
public var txt_scoreList:DisplayObject;
public var btn_facebook:DisplayObject;
public var popup:DisplayObject;
public var btn_options:DisplayObject;
public var txt_mph:DisplayObject;
public var clouds:DisplayObject;
public var share:DisplayObject;
public var btn_mikengreg:DisplayObject;
public var btn_mobile:DisplayObject;
public var board:DisplayObject;
public var btn_blurOn:DisplayObject;
public var btn_back:DisplayObject;
public var flip:DisplayObject;
public var head:DisplayObject;
public var btn_resume:DisplayObject;
public var leaderboard:DisplayObject;
public var skier:DisplayObject;
}
}//package
Section 45
//Gate_gateIncomingGreenC (Gate_gateIncomingGreenC)
package {
import flash.display.*;
import mx.core.*;
public class Gate_gateIncomingGreenC extends SpriteAsset {
public var txt_timeList:DisplayObject;
public var txt_score:DisplayObject;
public var popup1:DisplayObject;
public var mountains:DisplayObject;
public var popup3:DisplayObject;
public var txt_bonus:DisplayObject;
public var trees:DisplayObject;
public var btn_twitter:DisplayObject;
public var btn_next:DisplayObject;
public var btn_leaderboards:DisplayObject;
public var credits:DisplayObject;
public var options:DisplayObject;
public var txt_mult:DisplayObject;
public var btn_sfxOn:DisplayObject;
public var btn_aaOn:DisplayObject;
public var btn_bgmOn:DisplayObject;
public var txt_bonusCopy:DisplayObject;
public var popup2:DisplayObject;
public var skierFalling:DisplayObject;
public var btn_restart:DisplayObject;
public var btn_prev:DisplayObject;
public var btn_sponsor:DisplayObject;
public var tips:DisplayObject;
public var txt_meters:DisplayObject;
public var btn_stump:DisplayObject;
public var txt_time:DisplayObject;
public var txt_scoreList:DisplayObject;
public var btn_facebook:DisplayObject;
public var popup:DisplayObject;
public var btn_options:DisplayObject;
public var txt_mph:DisplayObject;
public var clouds:DisplayObject;
public var share:DisplayObject;
public var btn_mikengreg:DisplayObject;
public var btn_mobile:DisplayObject;
public var board:DisplayObject;
public var btn_blurOn:DisplayObject;
public var btn_back:DisplayObject;
public var flip:DisplayObject;
public var head:DisplayObject;
public var btn_resume:DisplayObject;
public var leaderboard:DisplayObject;
public var skier:DisplayObject;
}
}//package
Section 46
//Gate_gateIncomingRedC (Gate_gateIncomingRedC)
package {
import flash.display.*;
import mx.core.*;
public class Gate_gateIncomingRedC extends SpriteAsset {
public var txt_timeList:DisplayObject;
public var txt_score:DisplayObject;
public var popup1:DisplayObject;
public var mountains:DisplayObject;
public var popup3:DisplayObject;
public var txt_bonus:DisplayObject;
public var trees:DisplayObject;
public var btn_twitter:DisplayObject;
public var btn_next:DisplayObject;
public var btn_leaderboards:DisplayObject;
public var credits:DisplayObject;
public var options:DisplayObject;
public var txt_mult:DisplayObject;
public var btn_sfxOn:DisplayObject;
public var btn_aaOn:DisplayObject;
public var btn_bgmOn:DisplayObject;
public var txt_bonusCopy:DisplayObject;
public var popup2:DisplayObject;
public var skierFalling:DisplayObject;
public var btn_restart:DisplayObject;
public var btn_prev:DisplayObject;
public var btn_sponsor:DisplayObject;
public var tips:DisplayObject;
public var txt_meters:DisplayObject;
public var btn_stump:DisplayObject;
public var txt_time:DisplayObject;
public var txt_scoreList:DisplayObject;
public var btn_facebook:DisplayObject;
public var popup:DisplayObject;
public var btn_options:DisplayObject;
public var txt_mph:DisplayObject;
public var clouds:DisplayObject;
public var share:DisplayObject;
public var btn_mikengreg:DisplayObject;
public var btn_mobile:DisplayObject;
public var board:DisplayObject;
public var btn_blurOn:DisplayObject;
public var btn_back:DisplayObject;
public var flip:DisplayObject;
public var head:DisplayObject;
public var btn_resume:DisplayObject;
public var leaderboard:DisplayObject;
public var skier:DisplayObject;
}
}//package
Section 47
//Gate_gateIncomingYellowC (Gate_gateIncomingYellowC)
package {
import flash.display.*;
import mx.core.*;
public class Gate_gateIncomingYellowC extends SpriteAsset {
public var txt_timeList:DisplayObject;
public var txt_score:DisplayObject;
public var popup1:DisplayObject;
public var mountains:DisplayObject;
public var popup3:DisplayObject;
public var txt_bonus:DisplayObject;
public var trees:DisplayObject;
public var btn_twitter:DisplayObject;
public var btn_next:DisplayObject;
public var btn_leaderboards:DisplayObject;
public var credits:DisplayObject;
public var options:DisplayObject;
public var txt_mult:DisplayObject;
public var btn_sfxOn:DisplayObject;
public var btn_aaOn:DisplayObject;
public var btn_bgmOn:DisplayObject;
public var txt_bonusCopy:DisplayObject;
public var popup2:DisplayObject;
public var skierFalling:DisplayObject;
public var btn_restart:DisplayObject;
public var btn_prev:DisplayObject;
public var btn_sponsor:DisplayObject;
public var tips:DisplayObject;
public var txt_meters:DisplayObject;
public var btn_stump:DisplayObject;
public var txt_time:DisplayObject;
public var txt_scoreList:DisplayObject;
public var btn_facebook:DisplayObject;
public var popup:DisplayObject;
public var btn_options:DisplayObject;
public var txt_mph:DisplayObject;
public var clouds:DisplayObject;
public var share:DisplayObject;
public var btn_mikengreg:DisplayObject;
public var btn_mobile:DisplayObject;
public var board:DisplayObject;
public var btn_blurOn:DisplayObject;
public var btn_back:DisplayObject;
public var flip:DisplayObject;
public var head:DisplayObject;
public var btn_resume:DisplayObject;
public var leaderboard:DisplayObject;
public var skier:DisplayObject;
}
}//package
Section 48
//Gate_gateMissC (Gate_gateMissC)
package {
import flash.display.*;
import mx.core.*;
public class Gate_gateMissC extends SpriteAsset {
public var txt_timeList:DisplayObject;
public var txt_score:DisplayObject;
public var popup1:DisplayObject;
public var mountains:DisplayObject;
public var popup3:DisplayObject;
public var txt_bonus:DisplayObject;
public var trees:DisplayObject;
public var btn_twitter:DisplayObject;
public var btn_next:DisplayObject;
public var btn_leaderboards:DisplayObject;
public var credits:DisplayObject;
public var options:DisplayObject;
public var txt_mult:DisplayObject;
public var btn_sfxOn:DisplayObject;
public var btn_aaOn:DisplayObject;
public var btn_bgmOn:DisplayObject;
public var txt_bonusCopy:DisplayObject;
public var popup2:DisplayObject;
public var skierFalling:DisplayObject;
public var btn_restart:DisplayObject;
public var btn_prev:DisplayObject;
public var btn_sponsor:DisplayObject;
public var tips:DisplayObject;
public var txt_meters:DisplayObject;
public var btn_stump:DisplayObject;
public var txt_time:DisplayObject;
public var txt_scoreList:DisplayObject;
public var btn_facebook:DisplayObject;
public var popup:DisplayObject;
public var btn_options:DisplayObject;
public var txt_mph:DisplayObject;
public var clouds:DisplayObject;
public var share:DisplayObject;
public var btn_mikengreg:DisplayObject;
public var btn_mobile:DisplayObject;
public var board:DisplayObject;
public var btn_blurOn:DisplayObject;
public var btn_back:DisplayObject;
public var flip:DisplayObject;
public var head:DisplayObject;
public var btn_resume:DisplayObject;
public var leaderboard:DisplayObject;
public var skier:DisplayObject;
}
}//package
Section 49
//Gate_incomingCoverC (Gate_incomingCoverC)
package {
import flash.display.*;
import mx.core.*;
public class Gate_incomingCoverC extends SpriteAsset {
public var txt_timeList:DisplayObject;
public var txt_score:DisplayObject;
public var popup1:DisplayObject;
public var mountains:DisplayObject;
public var popup3:DisplayObject;
public var txt_bonus:DisplayObject;
public var trees:DisplayObject;
public var btn_twitter:DisplayObject;
public var btn_next:DisplayObject;
public var btn_leaderboards:DisplayObject;
public var credits:DisplayObject;
public var options:DisplayObject;
public var txt_mult:DisplayObject;
public var btn_sfxOn:DisplayObject;
public var btn_aaOn:DisplayObject;
public var btn_bgmOn:DisplayObject;
public var txt_bonusCopy:DisplayObject;
public var popup2:DisplayObject;
public var skierFalling:DisplayObject;
public var btn_restart:DisplayObject;
public var btn_prev:DisplayObject;
public var btn_sponsor:DisplayObject;
public var tips:DisplayObject;
public var txt_meters:DisplayObject;
public var btn_stump:DisplayObject;
public var txt_time:DisplayObject;
public var txt_scoreList:DisplayObject;
public var btn_facebook:DisplayObject;
public var popup:DisplayObject;
public var btn_options:DisplayObject;
public var txt_mph:DisplayObject;
public var clouds:DisplayObject;
public var share:DisplayObject;
public var btn_mikengreg:DisplayObject;
public var btn_mobile:DisplayObject;
public var board:DisplayObject;
public var btn_blurOn:DisplayObject;
public var btn_back:DisplayObject;
public var flip:DisplayObject;
public var head:DisplayObject;
public var btn_resume:DisplayObject;
public var leaderboard:DisplayObject;
public var skier:DisplayObject;
}
}//package
Section 50
//HeightmapRunner (HeightmapRunner)
package {
import flash.geom.*;
import flash.display.*;
import General.*;
import SWFStats.*;
public class HeightmapRunner extends Sprite {
public var trick3C:Class;
public var scarf:Scarf;
public var skierKilledC:Class;
public var fx_starsC:Class;
public var airTimer:int;// = 0
public var trick4C:Class;
public var flashTimer:int;// = 10
public var trick1;
public var trick2;
public var trick3;
public var trick4;
public var skierGroundC:Class;
public var impact;
public var speed:Number;// = 0
public var currTrick:int;// = 0
public var skierGroundSlow;
public var scarfTimer:int;// = 30
public var headphonesC:Class;
public var boostTimer:int;// = 0
public var dead:Boolean;// = false
public var grounded:Boolean;// = false
public var bmpRotator:Sprite;
public var getOuttaTheWayTimer:int;// = 0
public var headphonesOn:Boolean;// = false
public var trickinTimer:int;// = 0
public var trickz:Array;
public var skierFastC:Class;
public var lastY:Number;
public var stickTimer:int;// = 0
public var killGateHit:Boolean;// = false
public var skierKilled;
public var trickCount:int;// = 0
public var skierGround;
public var headphoneiny:Number;// = 0
public var headphonesPutOn;
public var maxHeight:Number;// = 0
public var headphones;
public var fxStars;
public var headphoneinx:Number;// = 0
public var trickin:Boolean;// = false
public var main:Main;
public var headphonesPutOnC:Class;
public var skierGroundSlowC:Class;
public var passedJump:BigJump;
public var headphonesSecure:Boolean;// = true
public var trick1C:Class;
public var savedHeadPos:Point;
public var spaceDown:Boolean;// = false
public var slopemap:Array;
public var heightmap:Array;
public var lastScarfPos:Point;
public var impactParticleC:Class;
public var trick2C:Class;
public var skierAirC:Class;
public var offscreenBMP:Bitmap;
public var musicOn:Boolean;// = false
public var skierAir;
public var arrowSkierC:Class;
public var inx:Number;// = 0
public var iny:Number;// = 0
public var arrowSkier;
public var skierFast;
public function HeightmapRunner(_arg1:Array, _arg2:Array){
impactParticleC = HeightmapRunner_impactParticleC;
arrowSkierC = HeightmapRunner_arrowSkierC;
skierGroundC = HeightmapRunner_skierGroundC;
skierGroundSlowC = HeightmapRunner_skierGroundSlowC;
skierFastC = HeightmapRunner_skierFastC;
skierAirC = HeightmapRunner_skierAirC;
trick1C = HeightmapRunner_trick1C;
trick2C = HeightmapRunner_trick2C;
trick3C = HeightmapRunner_trick3C;
trick4C = HeightmapRunner_trick4C;
skierKilledC = HeightmapRunner_skierKilledC;
headphonesC = HeightmapRunner_headphonesC;
headphonesPutOnC = HeightmapRunner_headphonesPutOnC;
fx_starsC = HeightmapRunner_fx_starsC;
super();
main = MainRef.ref;
headphones = new headphonesC();
scarf = new Scarf();
scaleX = (scaleY = 0.65);
impact = new impactParticleC();
addChild(impact);
impact.gotoAndStop(impact.totalFrames);
impact.rotation = -30;
impact.x = -4;
impact.y = 2;
heightmap = _arg1;
slopemap = _arg2;
skierGroundSlow = new skierGroundSlowC();
addChild(skierGroundSlow);
skierGroundSlow.y = 3;
x = 100;
skierGround = new skierGroundC();
addChild(skierGround);
skierGround.y = 3;
skierGround.visible = false;
skierFast = new skierFastC();
addChild(skierFast);
skierFast.y = 3;
skierFast.visible = false;
skierAir = new skierAirC();
addChild(skierAir);
skierAir.y = 3;
skierAir.visible = false;
trick1 = new trick1C();
addChild(trick1);
trick1.y = 3;
trick1.visible = false;
trick2 = new trick2C();
addChild(trick2);
trick2.y = 3;
trick2.visible = false;
trick3 = new trick3C();
addChild(trick3);
trick3.y = 3;
trick3.visible = false;
trick4 = new trick4C();
addChild(trick4);
trick4.y = 3;
trick4.visible = false;
skierKilled = new skierKilledC();
addChild(skierKilled);
skierKilled.y = 3;
skierKilled.visible = false;
trickz = new Array(trick1, trick2, trick3, trick4);
headphonesPutOn = new headphonesPutOnC();
addChild(headphonesPutOn);
headphonesPutOn.visible = false;
headphonesPutOn.y = 3;
arrowSkier = new arrowSkierC();
offscreenBMP = new Bitmap(new BitmapData(64, 64));
offscreenBMP.bitmapData.draw(this);
offscreenBMP.alpha = 0.5;
bmpRotator = new Sprite();
bmpRotator.addChild(offscreenBMP);
offscreenBMP.x = -32;
offscreenBMP.y = -32;
arrowSkier.addChild(bmpRotator);
bmpRotator.y = 32;
bmpRotator.x = 20;
lastScarfPos = new Point(0, 0);
scarf.setLength(1);
}
public function getKilled():void{
SoundMgr.playSound("gateKill");
SoundMgr.stopSound("skiNoise");
killGateHit = true;
skierKilled.gotoAndPlay(1);
}
public function update():void{
var _local4:Matrix;
var _local5:Object;
var _local6:int;
var _local7:*;
var _local8:Number;
var _local9:Number;
var _local10:Number;
var _local11:Number;
var _local12:Number;
var _local13:int;
var _local14:*;
var _local15:*;
var _local16:Point;
var _local17:*;
var _local18:Number;
if ((((((Math.abs((y - 225)) < 40)) && ((Math.abs((y - lastY)) < 2)))) && (!(MainRef.ref.spawnMgr.signalRedHit)))){
getOuttaTheWayTimer++;
} else {
getOuttaTheWayTimer = 0;
};
trace(getOuttaTheWayTimer);
if (getOuttaTheWayTimer > 100){
MainRef.ref.spawnMgr.signalRedHit = true;
getOuttaTheWayTimer = 0;
};
lastY = y;
if (!main.paused){
if (fxStars){
fxStars.nextFrame();
if (fxStars.currentFrame == fxStars.totalFrames){
fxStars.parent.removeChild(fxStars);
fxStars = null;
};
};
if (trickin){
trickinTimer++;
if (trickinTimer > 20){
trickCount++;
trickinTimer = 0;
if (trickCount == 1){
main.scorekeeper.trick();
} else {
if (trickCount == 2){
main.scorekeeper.doubleTrick();
} else {
if (trickCount >= 3){
main.scorekeeper.tripleTrick();
};
};
};
trickz[currTrick].visible = false;
currTrick = Math.floor((Math.random() * trickz.length));
if (trickz[currTrick].hasOwnProperty("currentFrame")){
trickz[currTrick].gotoAndPlay(1);
};
if (fxStars){
if (fxStars.parent){
fxStars.parent.removeChild(fxStars);
};
};
fxStars = new fx_starsC();
addChildAt(fxStars, 0);
fxStars.rotation = (Math.random() * 360);
fxStars.y = -15;
};
} else {
trickCount = 0;
trickinTimer = 0;
};
if (!dead){
visible = true;
};
if (dead){
passedJump = null;
};
if (killGateHit){
grounded = false;
trickin = false;
};
if (!grounded){
SoundMgr.stopSound("skiNoise");
};
if ((((y < 0)) && ((maxHeight > y)))){
maxHeight = y;
};
if (y < -25){
_local4 = new Matrix(0.5, 0, 0, 0.5, 32, 54);
offscreenBMP.bitmapData.fillRect(new Rectangle(0, 0, offscreenBMP.bitmapData.width, offscreenBMP.bitmapData.height), 0);
offscreenBMP.bitmapData.draw(this, _local4);
parent.addChild(arrowSkier);
arrowSkier.x = x;
arrowSkier.y = 10;
arrowSkier.txt_meters.text = Math.floor(-(y)).toString();
bmpRotator.rotation = rotation;
} else {
if (arrowSkier.parent){
arrowSkier.parent.removeChild(arrowSkier);
};
};
};
if (killGateHit){
skierKilled.visible = true;
if (skierKilled.currentFrame == skierKilled.totalFrames){
skierKilled.gotoAndPlay("loop");
};
for each (_local5 in trickz) {
_local5.visible = false;
if (_local5.hasOwnProperty("currentFrame")){
_local5.gotoAndStop(1);
};
};
skierFast.visible = false;
skierGroundSlow.visible = false;
skierGround.visible = false;
skierAir.visible = false;
} else {
if (grounded){
skierKilled.visible = false;
trickin = false;
for each (_local5 in trickz) {
_local5.visible = false;
if (_local5.hasOwnProperty("currentFrame")){
_local5.gotoAndStop(1);
};
};
skierAir.visible = false;
if (speed < 10){
skierFast.visible = false;
skierGroundSlow.visible = true;
skierGround.visible = false;
} else {
if (speed < 25){
skierFast.visible = false;
skierGroundSlow.visible = false;
skierGround.visible = true;
} else {
skierFast.visible = true;
skierGroundSlow.visible = false;
skierGround.visible = false;
};
};
} else {
if (!trickin){
skierKilled.visible = false;
for each (_local5 in trickz) {
_local5.visible = false;
};
skierFast.visible = false;
skierGroundSlow.visible = false;
skierGround.visible = false;
skierAir.visible = true;
if (killGateHit){
trick2.visible = true;
trick2.play();
skierAir.visible = false;
};
} else {
skierKilled.visible = false;
skierFast.visible = false;
skierGroundSlow.visible = false;
skierGround.visible = false;
skierAir.visible = false;
trickz[currTrick].visible = true;
};
};
};
if (main.paused){
_local6 = 0;
while (_local6 < numChildren) {
_local7 = getChildAt(_local6);
if (((_local7.visible) && (_local7.hasOwnProperty("currentFrame")))){
MovieClip(_local7).stop();
if (((_local7.hasOwnProperty("flip")) && (!((MovieClip(_local7).flip == null))))){
MovieClip(_local7).flip.stop();
};
};
_local6++;
};
return;
};
if (impact.currentFrame == impact.totalFrames){
impact.stop();
};
if (y > (432 + 50)){
if (!killGateHit){
MainRef.ref.howIdie = "fallDown";
MainRef.ref.deathSpeed = Math.round(speed).toString();
TipManager.Died_checkForJump(this, main.jumps);
};
dead = true;
return;
};
if (inx < 0){
inx = 0;
};
if ((((speed < 10)) && ((stickTimer <= 2)))){
stickTimer = 2;
};
x = (x + (inx - speed));
y = (y + iny);
flashTimer--;
if (flashTimer < 0){
};
if (((grounded) && (Input.mouseDown))){
if (((parent.mouseX - x) - speed) < 40){
inx = (inx * 0.95);
if (((parent.mouseX - x) - speed) < 20){
inx = (inx * 0.92);
if (((parent.mouseX - x) - speed) < 10){
inx = (inx * 0.85);
};
};
};
};
var _local1:int = heightmap[int(x)];
if (((((((!(grounded)) && ((_local1 > 490)))) && (!(trickin)))) && (!(killGateHit)))){
trickin = true;
currTrick = Math.floor((Math.random() * trickz.length));
trickz[currTrick].visible = true;
if (trickz[currTrick].hasOwnProperty("currentFrame")){
trickz[currTrick].gotoAndPlay(1);
};
};
if (((grounded) && (trickin))){
trickin = false;
trickz[currTrick].visible = false;
};
if (((!(Input.isKeyDownS("Spacebar"))) && (spaceDown))){
spaceDown = false;
trace(iny);
};
if (Input.isKeyDownS("Spacebar")){
spaceDown = true;
};
stickTimer--;
if (stickTimer > 0){
if (grounded){
if (_local1 > 450){
stickTimer = 0;
} else {
if ((_local1 - y) < 10){
if (iny < -5){
iny = -5;
};
y = (_local1 + 2);
} else {
stickTimer = 0;
};
};
};
};
if (grounded){
if ((((_local1 < 490)) && ((iny > -((10 + (inx * 1))))))){
if ((_local1 - 10) < y){
y = (_local1 + 1);
iny = (iny * 0.4);
} else {
trace("lossy loss");
inx = (inx * 0.95);
};
};
};
if ((((y > _local1)) && (!(killGateHit)))){
_local8 = (y - _local1);
if (((((!(killGateHit)) && ((_local8 > (40 + (speed * 0.5)))))) && ((_local8 > (iny * 2))))){
TipManager.Died_drewOverSelf();
TipManager.Died_checkForJump(this, main.jumps);
if (!killGateHit){
MainRef.ref.howIdie = "drawSelf";
MainRef.ref.deathSpeed = Math.round(speed).toString();
getKilled();
};
trace(((("PROBLEM! " + _local8) + " iny*2 == ") + (iny * 2)));
return;
};
_local9 = 0;
_local10 = 0;
_local11 = 0;
_local12 = (inx * 2);
if (_local12 > 100){
_local12 = 100;
};
_local6 = int((x - (_local12 * 2)));
while (_local6 < (int(x) + (_local12 * 2))) {
if (_local6 < 0){
_local6 = 0;
};
if (_local6 >= slopemap.length){
} else {
_local11 = (slopemap[_local6] - slopemap[(_local6 - 1)]);
if (_local11 > 10){
break;
};
_local9 = (_local9 + (slopemap[_local6] * 0.25));
_local10 = (_local10 + Math.abs(_local11));
};
_local6++;
};
if (isNaN(_local9)){
trace("nan");
};
rotation = (_local9 * 1.5);
if (((((!(grounded)) && ((airTimer > 10)))) && ((_local9 > 0)))){
_local9 = (_local9 * 4);
iny = (iny + 5);
stickTimer = 10;
if (passedJump){
_local13 = (x - passedJump.x);
main.scorekeeper.jumpScore(_local13);
passedJump = null;
};
};
if (_local10 > 2){
};
iny = (iny + (_local9 * 0.7));
if (_local9 < 0){
inx = (inx + (_local9 * 0.1));
} else {
if ((_local9 / inx) < 0.5){
inx = (inx + (_local9 * 0.6));
} else {
inx = (inx + (_local9 * 0.25));
};
};
if (iny > 4){
iny = 4;
};
y = _local1;
if (inx < 3){
inx = 3;
};
} else {
rotation = (iny * 3);
iny = (iny + 0.65);
};
if (grounded){
if (y > (_local1 - 5)){
grounded = true;
} else {
SoundMgr.stopSound("skiNoise");
grounded = false;
};
};
if (!grounded){
if (y >= _local1){
if (maxHeight < 0){
main.scorekeeper.jumpScore(-(maxHeight));
};
maxHeight = 0;
if ((((_local1 < 460)) && (!(killGateHit)))){
SoundMgr.playSound("skiNoise");
SoundMgr.playSound("jumpLanding");
};
grounded = true;
impact.gotoAndPlay(0);
if (headphonesPutOn.currentFrame == 1){
headphonesPutOn.gotoAndPlay(2);
};
} else {
grounded = false;
};
};
if (boostTimer > 0){
boostTimer--;
inx = (inx + 1);
};
if (!grounded){
airTimer++;
} else {
airTimer = 0;
};
if (inx < 6){
inx = (inx + 1);
};
var _local2:Number = main.scorekeeper.mult;
if (inx > (36 + _local2)){
inx = (36 + _local2);
};
if (iny > 45){
iny = 45;
};
if (iny < (-14 - _local2)){
iny = (-14 - _local2);
};
if (iny < -45){
iny = -45;
};
var _local3:Number = (((main.cursor.x / 26) + 10) + _local2);
if ((((inx > _local3)) && (grounded))){
inx = _local3;
};
if (((grounded) && ((main.cursor.x < 200)))){
inx = (inx * 0.97);
};
if (((Input.isKeyDownS("A")) && ((inx > 10)))){
inx = (inx * 0.95);
};
speed = (Math.floor(((x - 100) / 7)) + _local2);
if (inx == 0){
speed = 0;
};
if (x < 50){
speed = (speed * (0.5 + ((x - 50) / -50)));
};
if ((((scarf.parent == null)) && (!((parent == null))))){
parent.addChildAt(scarf, (parent.getChildIndex(this) - 1));
} else {
if ((((parent == null)) && (!((scarf.parent == null))))){
scarf.parent.removeChild(scarf);
};
};
scarfTimer--;
if (((!((scarf.parent == null))) && (!((parent == null))))){
_local16 = new Point();
_local6 = 0;
while (_local6 < numChildren) {
_local17 = getChildAt(_local6);
if (_local17.visible){
_local15 = _local17;
if (_local17.hasOwnProperty("flip")){
if (_local17.flip != null){
_local16.x = _local17.flip.head.x;
_local16.y = _local17.flip.head.y;
_local16 = DisplayObject(_local17.flip).localToGlobal(_local16);
_local14 = _local17.flip.head;
};
};
if (_local17.hasOwnProperty("head")){
if (_local17.head != null){
_local16.x = _local17.head.x;
_local16.y = _local17.head.y;
_local16 = DisplayObject(_local17).localToGlobal(_local16);
_local14 = _local17.head;
};
};
};
if (((headphonesSecure) && (!((_local14 == null))))){
_local14.addChild(headphones);
};
_local6++;
};
if (_local14 == null){
_local16 = savedHeadPos;
} else {
savedHeadPos = _local16;
};
_local16 = scarf.parent.globalToLocal(_local16);
if (headphonesSecure){
headphones.x = (headphones.y = 0);
};
if (((headphonesSecure) && ((((((speed > 70)) && ((Math.random() < 0.04)))) || (killGateHit))))){
Log.CustomMetric("lost headphones");
TipManager.Signal_musicOut();
headphonesSecure = false;
parent.addChild(headphones);
headphones.x = _local16.x;
headphones.y = _local16.y;
SoundMgr.stopSound("bgmMetal");
headphoneinx = -4;
headphoneiny = 2;
SoundMgr.playSound("recordScratch");
};
if (!headphonesSecure){
headphones.x = (headphones.x + headphoneinx);
headphones.y = (headphones.y + headphoneiny);
headphoneinx = (headphoneinx - 2);
headphoneiny = (headphoneiny + 2);
headphones.rotation = (headphones.rotation + inx);
};
scarf.x = _local16.x;
scarf.y = _local16.y;
scarf.updateD(((_local16.x - lastScarfPos.x) - speed), ((lastScarfPos.y - _local16.y) * 2));
lastScarfPos = _local16;
};
if (scarfTimer < 0){
_local18 = Math.floor(Math.pow((main.scorekeeper.multTimer / 200), 2));
if (scarf.sections.length <= _local18){
if (scarf.sections.length < 32){
scarf.addBone();
scarf.addBone();
};
} else {
if (scarf.sections.length >= _local18){
scarf.removeBone();
scarf.removeBone();
};
};
};
if (!headphonesOn){
headphones.visible = false;
} else {
headphones.visible = true;
};
if (headphonesOn == false){
if (grounded){
headphonesPutOn.play();
};
if (headphonesPutOn.currentFrame != 1){
for each (_local5 in trickz) {
_local5.visible = false;
};
skierKilled.visible = false;
skierFast.visible = false;
skierGroundSlow.visible = false;
skierGround.visible = false;
skierAir.visible = false;
headphonesPutOn.visible = true;
} else {
headphonesPutOn.visible = false;
};
if (headphonesPutOn.currentFrame == headphonesPutOn.totalFrames){
headphonesOn = true;
};
if ((((headphonesPutOn.currentLabel == "musicOn")) && (!(musicOn)))){
musicOn = true;
SoundMgr.playSound("bgmMetal");
};
};
if (headphonesOn){
headphonesPutOn.visible = false;
};
}
public function drawMe(_arg1:uint):void{
graphics.lineStyle(4, _arg1);
graphics.drawCircle(0, 0, 10);
flashTimer = 20;
}
}
}//package
Section 51
//HeightmapRunner_arrowSkierC (HeightmapRunner_arrowSkierC)
package {
import flash.display.*;
import mx.core.*;
public class HeightmapRunner_arrowSkierC extends SpriteAsset {
public var txt_score:DisplayObject;
public var popup:DisplayObject;
public var popup1:DisplayObject;
public var popup3:DisplayObject;
public var popup2:DisplayObject;
public var txt_scoreList:DisplayObject;
public var btn_options:DisplayObject;
public var txt_mph:DisplayObject;
public var txt_bonus:DisplayObject;
public var btn_leaderboards:DisplayObject;
public var btn_sfxOn:DisplayObject;
public var txt_mult:DisplayObject;
public var btn_bgmOn:DisplayObject;
public var txt_bonusCopy:DisplayObject;
public var board:DisplayObject;
public var btn_blurOn:DisplayObject;
public var btn_back:DisplayObject;
public var btn_resume:DisplayObject;
public var btn_aaOn:DisplayObject;
public var btn_sponsor:DisplayObject;
public var txt_meters:DisplayObject;
public var txt_timeList:DisplayObject;
public var btn_restart:DisplayObject;
public var btn_mobile:DisplayObject;
}
}//package
Section 52
//HeightmapRunner_fx_starsC (HeightmapRunner_fx_starsC)
package {
import flash.display.*;
import mx.core.*;
public class HeightmapRunner_fx_starsC extends MovieClipAsset {
public var txt_score:DisplayObject;
public var popup1:DisplayObject;
public var popup3:DisplayObject;
public var popup2:DisplayObject;
public var txt_bonus:DisplayObject;
public var btn_leaderboards:DisplayObject;
public var txt_mult:DisplayObject;
public var btn_sfxOn:DisplayObject;
public var btn_aaOn:DisplayObject;
public var btn_bgmOn:DisplayObject;
public var txt_bonusCopy:DisplayObject;
public var popup:DisplayObject;
public var btn_restart:DisplayObject;
public var btn_sponsor:DisplayObject;
public var txt_meters:DisplayObject;
public var txt_scoreList:DisplayObject;
public var btn_options:DisplayObject;
public var txt_mph:DisplayObject;
public var btn_mobile:DisplayObject;
public var board:DisplayObject;
public var head:DisplayObject;
public var btn_blurOn:DisplayObject;
public var btn_back:DisplayObject;
public var flip:DisplayObject;
public var btn_resume:DisplayObject;
public var txt_timeList:DisplayObject;
}
}//package
Section 53
//HeightmapRunner_headphonesC (HeightmapRunner_headphonesC)
package {
import flash.display.*;
import mx.core.*;
public class HeightmapRunner_headphonesC extends SpriteAsset {
public var txt_scoreList:DisplayObject;
public var txt_score:DisplayObject;
public var popup:DisplayObject;
public var popup1:DisplayObject;
public var popup3:DisplayObject;
public var popup2:DisplayObject;
public var txt_bonus:DisplayObject;
public var btn_options:DisplayObject;
public var txt_mph:DisplayObject;
public var btn_leaderboards:DisplayObject;
public var btn_sfxOn:DisplayObject;
public var txt_mult:DisplayObject;
public var btn_bgmOn:DisplayObject;
public var txt_bonusCopy:DisplayObject;
public var board:DisplayObject;
public var btn_blurOn:DisplayObject;
public var btn_back:DisplayObject;
public var btn_resume:DisplayObject;
public var btn_aaOn:DisplayObject;
public var btn_sponsor:DisplayObject;
public var txt_timeList:DisplayObject;
public var btn_restart:DisplayObject;
public var btn_mobile:DisplayObject;
}
}//package
Section 54
//HeightmapRunner_headphonesPutOnC (HeightmapRunner_headphonesPutOnC)
package {
import flash.display.*;
import mx.core.*;
public class HeightmapRunner_headphonesPutOnC extends MovieClipAsset {
public var txt_score:DisplayObject;
public var popup1:DisplayObject;
public var popup3:DisplayObject;
public var popup2:DisplayObject;
public var txt_bonus:DisplayObject;
public var btn_leaderboards:DisplayObject;
public var txt_mult:DisplayObject;
public var btn_sfxOn:DisplayObject;
public var btn_aaOn:DisplayObject;
public var btn_bgmOn:DisplayObject;
public var txt_bonusCopy:DisplayObject;
public var popup:DisplayObject;
public var btn_restart:DisplayObject;
public var btn_sponsor:DisplayObject;
public var txt_meters:DisplayObject;
public var txt_scoreList:DisplayObject;
public var btn_options:DisplayObject;
public var txt_mph:DisplayObject;
public var btn_mobile:DisplayObject;
public var board:DisplayObject;
public var head:DisplayObject;
public var btn_blurOn:DisplayObject;
public var btn_back:DisplayObject;
public var flip:DisplayObject;
public var btn_resume:DisplayObject;
public var txt_timeList:DisplayObject;
}
}//package
Section 55
//HeightmapRunner_impactParticleC (HeightmapRunner_impactParticleC)
package {
import flash.display.*;
import mx.core.*;
public class HeightmapRunner_impactParticleC extends MovieClipAsset {
public var txt_scoreList:DisplayObject;
public var txt_score:DisplayObject;
public var popup:DisplayObject;
public var popup1:DisplayObject;
public var popup3:DisplayObject;
public var popup2:DisplayObject;
public var txt_bonus:DisplayObject;
public var btn_options:DisplayObject;
public var txt_mph:DisplayObject;
public var btn_leaderboards:DisplayObject;
public var btn_sfxOn:DisplayObject;
public var txt_mult:DisplayObject;
public var btn_bgmOn:DisplayObject;
public var txt_bonusCopy:DisplayObject;
public var board:DisplayObject;
public var btn_blurOn:DisplayObject;
public var btn_back:DisplayObject;
public var btn_resume:DisplayObject;
public var btn_aaOn:DisplayObject;
public var btn_sponsor:DisplayObject;
public var txt_timeList:DisplayObject;
public var btn_restart:DisplayObject;
public var btn_mobile:DisplayObject;
}
}//package
Section 56
//HeightmapRunner_skierAirC (HeightmapRunner_skierAirC)
package {
import flash.display.*;
import mx.core.*;
public class HeightmapRunner_skierAirC extends MovieClipAsset {
public var txt_score:DisplayObject;
public var popup1:DisplayObject;
public var popup3:DisplayObject;
public var popup2:DisplayObject;
public var txt_bonus:DisplayObject;
public var btn_leaderboards:DisplayObject;
public var txt_mult:DisplayObject;
public var btn_sfxOn:DisplayObject;
public var btn_aaOn:DisplayObject;
public var btn_bgmOn:DisplayObject;
public var txt_bonusCopy:DisplayObject;
public var popup:DisplayObject;
public var btn_restart:DisplayObject;
public var btn_sponsor:DisplayObject;
public var txt_meters:DisplayObject;
public var txt_scoreList:DisplayObject;
public var btn_options:DisplayObject;
public var txt_mph:DisplayObject;
public var btn_mobile:DisplayObject;
public var board:DisplayObject;
public var head:DisplayObject;
public var btn_blurOn:DisplayObject;
public var btn_back:DisplayObject;
public var flip:DisplayObject;
public var btn_resume:DisplayObject;
public var txt_timeList:DisplayObject;
}
}//package
Section 57
//HeightmapRunner_skierFastC (HeightmapRunner_skierFastC)
package {
import flash.display.*;
import mx.core.*;
public class HeightmapRunner_skierFastC extends MovieClipAsset {
public var txt_score:DisplayObject;
public var popup1:DisplayObject;
public var popup3:DisplayObject;
public var popup2:DisplayObject;
public var txt_bonus:DisplayObject;
public var btn_leaderboards:DisplayObject;
public var txt_mult:DisplayObject;
public var btn_sfxOn:DisplayObject;
public var btn_aaOn:DisplayObject;
public var btn_bgmOn:DisplayObject;
public var txt_bonusCopy:DisplayObject;
public var popup:DisplayObject;
public var btn_restart:DisplayObject;
public var btn_sponsor:DisplayObject;
public var txt_meters:DisplayObject;
public var txt_scoreList:DisplayObject;
public var btn_options:DisplayObject;
public var txt_mph:DisplayObject;
public var btn_mobile:DisplayObject;
public var board:DisplayObject;
public var head:DisplayObject;
public var btn_blurOn:DisplayObject;
public var btn_back:DisplayObject;
public var flip:DisplayObject;
public var btn_resume:DisplayObject;
public var txt_timeList:DisplayObject;
}
}//package
Section 58
//HeightmapRunner_skierGroundC (HeightmapRunner_skierGroundC)
package {
import flash.display.*;
import mx.core.*;
public class HeightmapRunner_skierGroundC extends MovieClipAsset {
public var txt_score:DisplayObject;
public var popup1:DisplayObject;
public var popup3:DisplayObject;
public var popup2:DisplayObject;
public var txt_bonus:DisplayObject;
public var btn_leaderboards:DisplayObject;
public var txt_mult:DisplayObject;
public var btn_sfxOn:DisplayObject;
public var btn_aaOn:DisplayObject;
public var btn_bgmOn:DisplayObject;
public var txt_bonusCopy:DisplayObject;
public var popup:DisplayObject;
public var btn_restart:DisplayObject;
public var btn_sponsor:DisplayObject;
public var txt_meters:DisplayObject;
public var txt_scoreList:DisplayObject;
public var btn_options:DisplayObject;
public var txt_mph:DisplayObject;
public var btn_mobile:DisplayObject;
public var board:DisplayObject;
public var head:DisplayObject;
public var btn_blurOn:DisplayObject;
public var btn_back:DisplayObject;
public var flip:DisplayObject;
public var btn_resume:DisplayObject;
public var txt_timeList:DisplayObject;
}
}//package
Section 59
//HeightmapRunner_skierGroundSlowC (HeightmapRunner_skierGroundSlowC)
package {
import flash.display.*;
import mx.core.*;
public class HeightmapRunner_skierGroundSlowC extends MovieClipAsset {
public var txt_score:DisplayObject;
public var popup1:DisplayObject;
public var popup3:DisplayObject;
public var popup2:DisplayObject;
public var txt_bonus:DisplayObject;
public var btn_leaderboards:DisplayObject;
public var txt_mult:DisplayObject;
public var btn_sfxOn:DisplayObject;
public var btn_aaOn:DisplayObject;
public var btn_bgmOn:DisplayObject;
public var txt_bonusCopy:DisplayObject;
public var popup:DisplayObject;
public var btn_restart:DisplayObject;
public var btn_sponsor:DisplayObject;
public var txt_meters:DisplayObject;
public var txt_scoreList:DisplayObject;
public var btn_options:DisplayObject;
public var txt_mph:DisplayObject;
public var btn_mobile:DisplayObject;
public var board:DisplayObject;
public var head:DisplayObject;
public var btn_blurOn:DisplayObject;
public var btn_back:DisplayObject;
public var flip:DisplayObject;
public var btn_resume:DisplayObject;
public var txt_timeList:DisplayObject;
}
}//package
Section 60
//HeightmapRunner_skierKilledC (HeightmapRunner_skierKilledC)
package {
import flash.display.*;
import mx.core.*;
public class HeightmapRunner_skierKilledC extends MovieClipAsset {
public var txt_score:DisplayObject;
public var popup1:DisplayObject;
public var popup3:DisplayObject;
public var popup2:DisplayObject;
public var txt_bonus:DisplayObject;
public var btn_leaderboards:DisplayObject;
public var txt_mult:DisplayObject;
public var btn_sfxOn:DisplayObject;
public var btn_aaOn:DisplayObject;
public var btn_bgmOn:DisplayObject;
public var txt_bonusCopy:DisplayObject;
public var popup:DisplayObject;
public var btn_restart:DisplayObject;
public var btn_sponsor:DisplayObject;
public var txt_meters:DisplayObject;
public var txt_scoreList:DisplayObject;
public var btn_options:DisplayObject;
public var txt_mph:DisplayObject;
public var btn_mobile:DisplayObject;
public var board:DisplayObject;
public var head:DisplayObject;
public var btn_blurOn:DisplayObject;
public var btn_back:DisplayObject;
public var flip:DisplayObject;
public var btn_resume:DisplayObject;
public var txt_timeList:DisplayObject;
}
}//package
Section 61
//HeightmapRunner_trick1C (HeightmapRunner_trick1C)
package {
import flash.display.*;
import mx.core.*;
public class HeightmapRunner_trick1C extends MovieClipAsset {
public var txt_score:DisplayObject;
public var popup1:DisplayObject;
public var popup3:DisplayObject;
public var popup2:DisplayObject;
public var txt_bonus:DisplayObject;
public var btn_leaderboards:DisplayObject;
public var txt_mult:DisplayObject;
public var btn_sfxOn:DisplayObject;
public var btn_aaOn:DisplayObject;
public var btn_bgmOn:DisplayObject;
public var txt_bonusCopy:DisplayObject;
public var popup:DisplayObject;
public var btn_restart:DisplayObject;
public var btn_sponsor:DisplayObject;
public var txt_meters:DisplayObject;
public var txt_scoreList:DisplayObject;
public var btn_options:DisplayObject;
public var txt_mph:DisplayObject;
public var btn_mobile:DisplayObject;
public var board:DisplayObject;
public var head:DisplayObject;
public var btn_blurOn:DisplayObject;
public var btn_back:DisplayObject;
public var flip:DisplayObject;
public var btn_resume:DisplayObject;
public var txt_timeList:DisplayObject;
}
}//package
Section 62
//HeightmapRunner_trick2C (HeightmapRunner_trick2C)
package {
import flash.display.*;
import mx.core.*;
public class HeightmapRunner_trick2C extends MovieClipAsset {
public var txt_score:DisplayObject;
public var popup1:DisplayObject;
public var popup3:DisplayObject;
public var popup2:DisplayObject;
public var txt_bonus:DisplayObject;
public var btn_leaderboards:DisplayObject;
public var txt_mult:DisplayObject;
public var btn_sfxOn:DisplayObject;
public var btn_aaOn:DisplayObject;
public var btn_bgmOn:DisplayObject;
public var txt_bonusCopy:DisplayObject;
public var popup:DisplayObject;
public var btn_restart:DisplayObject;
public var btn_sponsor:DisplayObject;
public var txt_meters:DisplayObject;
public var txt_scoreList:DisplayObject;
public var btn_options:DisplayObject;
public var txt_mph:DisplayObject;
public var btn_mobile:DisplayObject;
public var board:DisplayObject;
public var head:DisplayObject;
public var btn_blurOn:DisplayObject;
public var btn_back:DisplayObject;
public var flip:DisplayObject;
public var btn_resume:DisplayObject;
public var txt_timeList:DisplayObject;
}
}//package
Section 63
//HeightmapRunner_trick3C (HeightmapRunner_trick3C)
package {
import flash.display.*;
import mx.core.*;
public class HeightmapRunner_trick3C extends MovieClipAsset {
public var txt_score:DisplayObject;
public var popup1:DisplayObject;
public var popup3:DisplayObject;
public var popup2:DisplayObject;
public var txt_bonus:DisplayObject;
public var btn_leaderboards:DisplayObject;
public var txt_mult:DisplayObject;
public var btn_sfxOn:DisplayObject;
public var btn_aaOn:DisplayObject;
public var btn_bgmOn:DisplayObject;
public var txt_bonusCopy:DisplayObject;
public var popup:DisplayObject;
public var btn_restart:DisplayObject;
public var btn_sponsor:DisplayObject;
public var txt_meters:DisplayObject;
public var txt_scoreList:DisplayObject;
public var btn_options:DisplayObject;
public var txt_mph:DisplayObject;
public var btn_mobile:DisplayObject;
public var board:DisplayObject;
public var head:DisplayObject;
public var btn_blurOn:DisplayObject;
public var btn_back:DisplayObject;
public var flip:DisplayObject;
public var btn_resume:DisplayObject;
public var txt_timeList:DisplayObject;
}
}//package
Section 64
//HeightmapRunner_trick4C (HeightmapRunner_trick4C)
package {
import flash.display.*;
import mx.core.*;
public class HeightmapRunner_trick4C extends MovieClipAsset {
public var txt_score:DisplayObject;
public var popup1:DisplayObject;
public var popup3:DisplayObject;
public var popup2:DisplayObject;
public var txt_bonus:DisplayObject;
public var btn_leaderboards:DisplayObject;
public var txt_mult:DisplayObject;
public var btn_sfxOn:DisplayObject;
public var btn_aaOn:DisplayObject;
public var btn_bgmOn:DisplayObject;
public var txt_bonusCopy:DisplayObject;
public var popup:DisplayObject;
public var btn_restart:DisplayObject;
public var btn_sponsor:DisplayObject;
public var txt_meters:DisplayObject;
public var txt_scoreList:DisplayObject;
public var btn_options:DisplayObject;
public var txt_mph:DisplayObject;
public var btn_mobile:DisplayObject;
public var board:DisplayObject;
public var head:DisplayObject;
public var btn_blurOn:DisplayObject;
public var btn_back:DisplayObject;
public var flip:DisplayObject;
public var btn_resume:DisplayObject;
public var txt_timeList:DisplayObject;
}
}//package
Section 65
//KillGate (KillGate)
package {
import flash.display.*;
import General.*;
public class KillGate extends Gate {
public var arrowRedBlankC:Class;
public var gateRedC:Class;
public function KillGate(_arg1:HeightmapRunner, _arg2:Sprite, _arg3:Sprite, _arg4:int, _arg5:Number, _arg6:Number){
arrowRedBlankC = KillGate_arrowRedBlankC;
gateRedC = KillGate_gateRedC;
super(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6);
incomingCover = new arrowRedBlankC();
removeChildAt(0);
incomingGraphic = new gateIncomingRedC();
rangeText = incomingGraphic.txt_meters;
addChild(new gateRedC());
r = (r - 25);
}
override public function failure():void{
removeChildAt(0);
addChild(new gateHitC());
if (runner.y < 0){
SoundMgr.playSound("tunnelHit");
MainRef.ref.scorekeeper.jumpGate();
};
MainRef.ref.scorekeeper.killgatesDodged++;
}
override public function success():void{
if (!runner.killGateHit){
MainRef.ref.howIdie = "killGate";
MainRef.ref.deathSpeed = Math.round(runner.speed).toString();
runner.getKilled();
};
}
override public function update():void{
super.update();
}
}
}//package
Section 66
//KillGate_arrowRedBlankC (KillGate_arrowRedBlankC)
package {
import flash.display.*;
import mx.core.*;
public class KillGate_arrowRedBlankC extends SpriteAsset {
public var txt_timeList:DisplayObject;
public var txt_score:DisplayObject;
public var popup1:DisplayObject;
public var mountains:DisplayObject;
public var popup3:DisplayObject;
public var txt_bonus:DisplayObject;
public var trees:DisplayObject;
public var btn_twitter:DisplayObject;
public var btn_next:DisplayObject;
public var btn_leaderboards:DisplayObject;
public var credits:DisplayObject;
public var options:DisplayObject;
public var txt_mult:DisplayObject;
public var btn_sfxOn:DisplayObject;
public var btn_aaOn:DisplayObject;
public var btn_bgmOn:DisplayObject;
public var txt_bonusCopy:DisplayObject;
public var popup2:DisplayObject;
public var skierFalling:DisplayObject;
public var btn_restart:DisplayObject;
public var btn_prev:DisplayObject;
public var btn_sponsor:DisplayObject;
public var tips:DisplayObject;
public var txt_meters:DisplayObject;
public var btn_stump:DisplayObject;
public var txt_time:DisplayObject;
public var txt_scoreList:DisplayObject;
public var btn_facebook:DisplayObject;
public var popup:DisplayObject;
public var btn_options:DisplayObject;
public var txt_mph:DisplayObject;
public var clouds:DisplayObject;
public var share:DisplayObject;
public var btn_mikengreg:DisplayObject;
public var btn_mobile:DisplayObject;
public var board:DisplayObject;
public var btn_blurOn:DisplayObject;
public var btn_back:DisplayObject;
public var flip:DisplayObject;
public var head:DisplayObject;
public var btn_resume:DisplayObject;
public var leaderboard:DisplayObject;
public var skier:DisplayObject;
}
}//package
Section 67
//KillGate_gateRedC (KillGate_gateRedC)
package {
import flash.display.*;
import mx.core.*;
public class KillGate_gateRedC extends SpriteAsset {
public var txt_timeList:DisplayObject;
public var txt_score:DisplayObject;
public var popup1:DisplayObject;
public var mountains:DisplayObject;
public var popup3:DisplayObject;
public var txt_bonus:DisplayObject;
public var trees:DisplayObject;
public var btn_twitter:DisplayObject;
public var btn_next:DisplayObject;
public var btn_leaderboards:DisplayObject;
public var credits:DisplayObject;
public var options:DisplayObject;
public var txt_mult:DisplayObject;
public var btn_sfxOn:DisplayObject;
public var btn_aaOn:DisplayObject;
public var btn_bgmOn:DisplayObject;
public var txt_bonusCopy:DisplayObject;
public var popup2:DisplayObject;
public var skierFalling:DisplayObject;
public var btn_restart:DisplayObject;
public var btn_prev:DisplayObject;
public var btn_sponsor:DisplayObject;
public var tips:DisplayObject;
public var txt_meters:DisplayObject;
public var btn_stump:DisplayObject;
public var txt_time:DisplayObject;
public var txt_scoreList:DisplayObject;
public var btn_facebook:DisplayObject;
public var popup:DisplayObject;
public var btn_options:DisplayObject;
public var txt_mph:DisplayObject;
public var clouds:DisplayObject;
public var share:DisplayObject;
public var btn_mikengreg:DisplayObject;
public var btn_mobile:DisplayObject;
public var board:DisplayObject;
public var btn_blurOn:DisplayObject;
public var btn_back:DisplayObject;
public var flip:DisplayObject;
public var head:DisplayObject;
public var btn_resume:DisplayObject;
public var leaderboard:DisplayObject;
public var skier:DisplayObject;
}
}//package
Section 68
//Leaderboard (Leaderboard)
package {
import flash.net.*;
import flash.text.*;
import General.*;
public class Leaderboard {
public var sharedObj:SharedObject;
public var leaderboardData:Object;
public function Leaderboard(){
loadLocalData();
}
public function update():void{
sharedObj.data.leaderboardData = leaderboardData;
sharedObj.flush();
}
public function fillBoard(_arg1):void{
var _local2:Array = (leaderboardData.scores as Array);
var _local3:Array = (leaderboardData.times as Array);
var _local4:TextField = _arg1.txt_scoreList;
var _local5:TextField = _arg1.txt_timeList;
_local4.text = "";
_local5.text = "";
var _local6:int;
while (_local6 < 5) {
_local4.appendText((((("#" + (_local6 + 1)) + " ") + Util.CommaFormat(_local2[_local6])) + "\n"));
_local5.appendText((((("#" + (_local6 + 1)) + " ") + Util.formatTimeHMSms(_local3[_local6])) + "\n"));
_local6++;
};
}
public function logScore(_arg1:int, _arg2:int):void{
var _local3:Array = (leaderboardData.scores as Array);
var _local4:Array = (leaderboardData.times as Array);
if (_arg1 > _local3[4]){
_local3.pop();
_local3.push(_arg1);
};
if (_arg2 > _local4[4]){
_local4.pop();
_local4.push(_arg2);
};
leaderboardData.scores = _local3.sort((Array.DESCENDING | Array.NUMERIC));
leaderboardData.times = _local4.sort((Array.DESCENDING | Array.NUMERIC));
update();
}
public function loadLocalData():void{
sharedObj = SharedObject.getLocal("solipskier_leaderboard", "/", false);
if (((sharedObj) && (sharedObj.data.leaderboardData))){
leaderboardData = sharedObj.data.leaderboardData;
} else {
leaderboardData = new Object();
leaderboardData.scores = [0, 0, 0, 0, 0];
leaderboardData.times = [0, 0, 0, 0, 0];
sharedObj.data.leaderboardData = leaderboardData;
};
}
}
}//package
Section 69
//Main (Main)
package {
import flash.events.*;
import flash.geom.*;
import flash.display.*;
import flash.system.*;
import flash.utils.*;
import flash.text.*;
import General.*;
import SWFStats.*;
import flash.media.*;
public class Main extends Sprite {
public var cursorDisabled;
public var obstacleLayer:Sprite;
public var jumps:Array;
public var pauseScreen;
public var scorekeeper:Scorekeeper;
public var lastRainbowPos:Point;
public var redball:HeightmapRunner;
public var newmousex:int;
public var speedText:TextField;
public var ui_pauseC:Class;
public var sliverWidth:int;// = 1
public var flakes:Array;
public var localLeaderboard:Leaderboard;
public var newmousey:int;
public var frameNumber:uint;// = 0
public var statSubmitDebug:TextField;
public var replayMode:Boolean;
public var cursorEnabled;
public var paused:Boolean;// = false
public var snowflakeC:Class;
public var targetTimer:int;// = 100
public var gameStarted:Boolean;// = false
public var blurMult:Number;// = 0.02
public var ui_leaderboardC:Class;
public var pauseRestart:Boolean;// = false
public var fxFadeIn:int;// = 30
public var sceneryLayer:Sprite;
public var rainbowGrowth:Number;// = 0.002
public var deathSpeed:String;
public var totalGameTime:uint;
public var endgameScreen:EndgameScreen;
public var rainbowAlpha:Number;// = 0
public var leaderboardScreen;
public var sceneryTimer:int;// = 10
public var snowflakeActiveC:Class;
public var currentPlay:int;// = 0
public var startTime:uint;
public var inkJar:Number;// = 1
public var cursor:Sprite;
public var terrainSliverBMP:BitmapData;
public var currIntro;
public var perfectTunnelCount:int;// = 0
public var muted:Boolean;// = false
public var bmd:BitmapData;
public var scrollSpeed:int;// = 10
public var scrollers:Array;
public var lastX:int;// = 0
public var lastTime:uint;
public var rainbowBitmap:Bitmap;
public var lastmousex:int;
public var lastmousey:int;
public var drawThisFrame:Boolean;// = false
public var soundMgr:SoundMgr;
public var chopinTimer:int;// = -1
public var fpsDisplay:FpsCounter;
public var gameFrame:uint;// = 0
public var introNum:int;// = 0
public var spawnMgr:SpawnManager;
public var bgManager:BGManagerFastest;
public var jumpScoreLayer:Sprite;
public var ui_optionsC:Class;
public var optionsScreen;
public var lastHMX:int;
public var mouseXSaveIter:int;// = 10
public var atTitleScreen:Boolean;// = false
public var blurMode:Boolean;// = true
public var mikengregIntroC:Class;
public var rainbowAmount:Number;// = 0
public var firstGo:Boolean;// = true
public var terrainBitmap:Bitmap;
public var input:Input;
public var obstacles:Array;
public var slopemap:Array;
public var kongIntroC:Class;
public var heightmap:Array;
public var rainbowSize:Number;// = 40
public var realXOffset:int;// = 0
public var finalRainbowPos:Point;
public var kongapi:KongAPI;
public var crashTimer:int;// = 0
public var howIdie:String;
public var titleScreen;
public var replayMap:Array;
public var fx_flakeC:Class;
public var ui_titleC:Class;
public static var rainbowSliver:BitmapData;
public function Main(){
var _local1:int;
snowflakeC = Main_snowflakeC;
snowflakeActiveC = Main_snowflakeActiveC;
fx_flakeC = Main_fx_flakeC;
ui_leaderboardC = Main_ui_leaderboardC;
ui_pauseC = Main_ui_pauseC;
ui_optionsC = Main_ui_optionsC;
kongIntroC = Main_kongIntroC;
mikengregIntroC = Main_mikengregIntroC;
ui_titleC = Main_ui_titleC;
super();
SoundMixer.soundTransform = new SoundTransform(0);
localLeaderboard = new Leaderboard();
MainRef.ref = this;
rainbowSliver = new BitmapData(4, 80);
rainbowSliver.fillRect(new Rectangle(0, 0, 4, 16), 4293496628);
rainbowSliver.fillRect(new Rectangle(0, 16, 4, 16), 4293066847);
rainbowSliver.fillRect(new Rectangle(0, 32, 4, 16), 4286921357);
rainbowSliver.fillRect(new Rectangle(0, 48, 4, 16), 4278220222);
rainbowSliver.fillRect(new Rectangle(0, 64, 4, 16), 4278230871);
rainbowBitmap = new Bitmap(new BitmapData(0x0300, 432, true, 0));
terrainSliverBMP = new BitmapData(sliverWidth, 500);
terrainSliverBMP.fillRect(new Rectangle(0, 0, sliverWidth, 10), 4290822336);
terrainSliverBMP.fillRect(new Rectangle(0, 10, sliverWidth, 15), 4289374890);
terrainSliverBMP.fillRect(new Rectangle(0, 25, sliverWidth, 20), 4287795858);
terrainSliverBMP.fillRect(new Rectangle(0, 45, sliverWidth, 500), 4286151033);
SceneryMgr.initialize();
SoundMgr.initialize(ApplicationDomain.currentDomain);
SoundEffect(SoundMgr.sounds["windSound"]).volume = 0.1;
fpsDisplay = new FpsCounter();
fpsDisplay.x = 670;
addEventListener(Event.ENTER_FRAME, enterFrame);
bgManager = new BGManagerFastest();
addChild(bgManager);
bgManager.visible = false;
bgManager.addEventListener("downTransformComplete", bgTransformDown);
heightmap = new Array(0x0300);
_local1 = 0;
while (_local1 < 0x0300) {
heightmap[_local1] = 500;
_local1++;
};
slopemap = new Array(0x0300);
_local1 = 0;
while (_local1 < 0x0300) {
slopemap[_local1] = 0;
_local1++;
};
redball = new HeightmapRunner(heightmap, slopemap);
redball.y = -20;
redball.dead = true;
jumpScoreLayer = new Sprite();
scorekeeper = new Scorekeeper(redball);
addChild(scorekeeper);
sceneryLayer = new Sprite();
addChild(sceneryLayer);
bmd = new BitmapData(0x0300, 432, true, 0);
terrainBitmap = new Bitmap(bmd);
addChild(terrainBitmap);
addChild(rainbowBitmap);
obstacleLayer = new Sprite();
addChild(obstacleLayer);
addChild(redball);
addChild(jumpScoreLayer);
scrollers = new Array();
obstacles = new Array();
jumps = new Array();
flakes = new Array();
cursor = new Sprite();
cursorEnabled = new snowflakeActiveC();
cursor.addChild(cursorEnabled);
cursorDisabled = new snowflakeC();
cursor.addChild(cursorDisabled);
cursorEnabled.visible = false;
addChild(cursor);
cursor.visible = false;
speedText = new TextField();
speedText.textColor = 0xFF0000;
speedText.y = 40;
speedText.scaleX = (speedText.scaleY = 2);
spawnMgr = new SpawnManager(this, redball, scrollers, obstacles, jumps);
titleScreen = new ui_titleC();
titleScreen.gotoAndPlay(1);
addEventListener(MouseEvent.MOUSE_DOWN, mDown);
leaderboardScreen = new ui_leaderboardC();
addChild(leaderboardScreen);
leaderboardScreen.gotoAndStop(1);
optionsScreen = new ui_optionsC();
addChild(optionsScreen);
optionsScreen.gotoAndStop(1);
pauseScreen = new ui_pauseC();
addChild(pauseScreen);
new OptionsBoard(pauseScreen.board);
pauseScreen.gotoAndStop(1);
Util.ButtonReg(pauseScreen.board.btn_restart, pauseScreenRestart);
Util.ButtonReg(pauseScreen.board.btn_resume, pauseScreenResume);
lastTime = getTimer();
SoundMgr.setFXVolume(0);
if (stage == null){
addEventListener(Event.ADDED_TO_STAGE, addedToStage);
} else {
addedToStage(null);
};
doIntros();
}
public function findLastHeight(_arg1:int):int{
var _local2:int = _arg1;
while (_local2 > 0) {
if (heightmap[_local2] < 490){
return (_local2);
};
_local2--;
};
return (0);
}
public function addedToStage(_arg1:Event):void{
input = new Input(this);
stage.frameRate = 30;
stage.addEventListener(KeyboardEvent.KEY_DOWN, keydown);
kongapi = new KongAPI(stage);
}
public function checkDrawAgainstDeadzones(_arg1:Number):Boolean{
var _local2:Scroller;
for each (_local2 in scrollers) {
if ((_local2 is DeadZone)){
if (!DeadZone(_local2).checkDrawX(_arg1)){
return (false);
};
};
};
return (true);
}
public function tunnelGateHit():void{
if (inkJar > 0){
inkJar = (inkJar + 0.25);
};
perfectTunnelCount++;
scorekeeper.crossTunnelGate();
if (perfectTunnelCount == 40){
scorekeeper.perfectTunnel();
};
}
public function spawnFlake():void{
var _local1:* = new fx_flakeC();
_local1.x = cursor.x;
_local1.y = cursor.y;
stage.addChild(_local1);
_local1.rotation = (Math.random() * 360);
_local1.scaleX = (_local1.scaleX - (Math.random() * 0.5));
_local1.scaleY = (_local1.scaleY - (Math.random() * 0.5));
flakes.push(_local1);
}
public function toEndgameScreen():void{
TipManager.dispenseWithTheTip();
endgameScreen = new EndgameScreen();
addChild(endgameScreen);
endgameScreen.refresh(totalGameTime, scorekeeper.score, redball.x);
}
public function removeObstacle(_arg1:Scroller):void{
var _local2:int;
while (_local2 < obstacles.length) {
if (obstacles[_local2] == _arg1){
obstacles.splice(_local2, 1);
_local2--;
};
_local2++;
};
}
public function heightmapSet(_arg1:int, _arg2:int, _arg3:Boolean=false):Boolean{
var _local7:BigJump;
if (_arg1 >= 0x0300){
_arg1 = 767;
};
if (!_arg3){
if (!Input.mouseDown){
heightmap[_arg1] = 500;
return (false);
};
for each (_local7 in jumps) {
if ((((_local7.x < 1200)) && (_local7.drawCheck(_arg1)))){
heightmap[_arg1] = 500;
return (false);
};
};
};
heightmap[_arg1] = _arg2;
lastHMX = _arg1;
terrainDraw(_arg1, _arg2, 0);
var _local4:int = int((_arg2 - heightmap[lastX]));
var _local5:int = int((_arg1 - lastX));
var _local6:Number = (_local4 / _local5);
if (lastX >= 0){
sliverLoop(lastX, _local5, _local6);
slopemap[_arg1] = _local6;
};
return (true);
}
public function startGame():void{
currentPlay++;
Log.Play();
TipManager.initi();
totalGameTime = 0;
gameFrame = 0;
redball.scarf.setLength(0);
redball.scarfTimer = 30;
redball.scarf.visible = (redball.headphones.visible = true);
redball.headphonesPutOn.gotoAndStop(1);
redball.headphonesOn = false;
redball.musicOn = false;
redball.headphones.rotation = 0;
redball.headphonesSecure = true;
SoundMgr.playSound("windSound");
spawnMgr.resetDifficultyRamp();
lastX = -1;
redball.passedJump = null;
atTitleScreen = false;
gameStarted = true;
redball.x = mouseX;
redball.y = 0;
redball.dead = false;
redball.visible = true;
cursor.visible = true;
cursor.x = terrainBitmap.mouseX;
cursor.y = terrainBitmap.mouseY;
scorekeeper.enable();
removeChild(titleScreen);
var _local1:int;
while (_local1 < terrainBitmap.mouseX) {
heightmapSet(_local1, terrainBitmap.mouseY, true);
lastX = _local1;
_local1 = (_local1 + 6);
};
startTime = getTimer();
}
public function enterFrame(_arg1:Event):void{
var _local3:int;
var _local4:Scroller;
var _local8:Scroller;
if (currIntro){
if (currIntro.currentFrame == currIntro.totalFrames){
if (introNum == 0){
doMikengregIntro();
} else {
killIntros();
};
};
};
if (statSubmitDebug){
addChild(statSubmitDebug);
};
if (this.fxFadeIn > 0){
fxFadeIn--;
SoundMgr.setFXVolume(((30 - fxFadeIn) / 30));
};
TipManager.update(redball);
frameNumber++;
var _local2:int = (getTimer() - lastTime);
lastTime = getTimer();
if (((!(paused)) && (gameStarted))){
totalGameTime = (totalGameTime + _local2);
};
if (titleScreen.currentFrame == titleScreen.totalFrames){
titleScreen.gotoAndStop(titleScreen.totalFrames);
};
if (pauseScreen.currentFrame == 8){
pauseScreen.gotoAndStop(8);
};
if (pauseScreen.currentFrame == pauseScreen.totalFrames){
pauseScreen.gotoAndStop(pauseScreen.totalFrames);
};
if (leaderboardScreen.currentFrame == 8){
leaderboardScreen.gotoAndStop(8);
};
if (leaderboardScreen.currentFrame == leaderboardScreen.totalFrames){
leaderboardScreen.gotoAndStop(leaderboardScreen.totalFrames);
};
if (optionsScreen.currentFrame == 8){
optionsScreen.gotoAndStop(8);
};
if (optionsScreen.currentFrame == optionsScreen.totalFrames){
optionsScreen.gotoAndStop(optionsScreen.totalFrames);
};
fpsDisplay.update();
_local3 = 0;
while (_local3 < flakes.length) {
if (flakes[_local3].currentFrame == flakes[_local3].totalFrames){
stage.removeChild(flakes[_local3]);
flakes.splice(_local3, 1);
_local3--;
};
_local3++;
};
if (chopinTimer > 0){
chopinTimer = (chopinTimer - _local2);
if (chopinTimer <= 0){
SoundMgr.playSound("bgmChopin");
};
};
scorekeeper.update();
if (paused){
redball.update();
return;
};
drawThisFrame = false;
speedText.text = int(redball.inx).toString();
if ((((obstacles.length <= 2)) && (!(redball.dead)))){
if (obstacles.length > 0){
spawnMgr.spawnNewShitDiffRamp(obstacles[(obstacles.length - 1)].x);
} else {
spawnMgr.spawnNewShitDiffRamp(4000);
};
};
cleanDeadScrollers();
for each (_local4 in scrollers) {
_local4.update();
};
if (redball.dead){
SoundMgr.stopSound("skiNosie");
};
if (gameStarted){
redball.update();
if (scrollSpeed > 12){
sceneryTimer = (sceneryTimer - scrollSpeed);
} else {
sceneryTimer = (sceneryTimer - 4);
};
if (sceneryTimer <= 0){
sceneryTimer = (10 + Math.floor((Math.random() * 10)));
if (Input.mouseDown){
spawnMgr.spawnScenery();
};
};
};
if (!redball.dead){
scrollSpeed = int(redball.speed);
} else {
scrollSpeed = 6;
};
if (scrollSpeed < 0){
scrollSpeed = 0;
};
var _local5:Number = (0.1 + ((scrollSpeed * scrollSpeed) / (70 * 70)));
if (_local5 > 1){
_local5 = 1;
};
SoundEffect(SoundMgr.sounds["windSound"]).volume = (_local5 * SoundMgr.fxVol);
var _local6:int = (terrainBitmap.mouseX - lastmousex);
var _local7:int = (terrainBitmap.mouseY - lastmousey);
newmousex = int((lastmousex + (_local6 * 0.25)));
newmousey = int((lastmousey + (_local7 * 0.25)));
bmd.scroll(-(scrollSpeed), 0);
rainbowBitmap.bitmapData.scroll(-(scrollSpeed), 0);
realXOffset = (realXOffset + scrollSpeed);
otherThing(scrollSpeed);
lastX = (lastX - scrollSpeed);
_local3 = 0;
while (_local3 < scrollSpeed) {
heightmap.shift();
heightmap.push(500);
slopemap.shift();
slopemap.push(0);
_local3++;
};
bmd.fillRect(new Rectangle((0x0300 - scrollSpeed), 0, scrollSpeed, 432), 0);
rainbowBitmap.bitmapData.fillRect(new Rectangle((0x0300 - scrollSpeed), 0, scrollSpeed, 432), 0);
if (!gameStarted){
return;
};
spawnMgr.update();
rainbowTrail(-(scrollSpeed));
if (redball.dead){
if ((((endgameScreen == null)) || ((endgameScreen.parent == null)))){
gameOver();
};
for each (_local8 in obstacles) {
_local8.killflag = true;
if (_local8.parent){
_local8.parent.removeChild(_local8);
};
if (((_local8.incomingGraphic) && (_local8.incomingGraphic.parent))){
_local8.incomingGraphic.parent.removeChild(_local8.incomingGraphic);
};
};
redball.speed = 0;
cursor.y = terrainBitmap.mouseY;
cursor.x = terrainBitmap.mouseX;
return;
};
cursor.x = (cursor.x - scrollSpeed);
cursorEnabled.visible = false;
cursorDisabled.visible = true;
if (((((((!(Input.mouseDown)) || ((inkJar <= 0)))) || (redball.dead))) || (redball.killGateHit))){
cursor.y = terrainBitmap.mouseY;
cursor.x = terrainBitmap.mouseX;
if (heightmap[int(cursor.x)] > 470){
heightmapSet(int(cursor.x), 480);
};
lastX = 0;
} else {
if (cursor.x < terrainBitmap.mouseX){
cursor.x = (cursor.x + ((terrainBitmap.mouseX - cursor.x) * 0.5));
if ((terrainBitmap.mouseY - cursor.y) < (-(scrollSpeed) * 2)){
if ((terrainBitmap.mouseY - cursor.y) < (-(scrollSpeed) * 4)){
cursor.y = (cursor.y - (scrollSpeed * 2));
} else {
cursor.y = (cursor.y + ((terrainBitmap.mouseY - cursor.y) * 0.5));
};
} else {
cursor.y = (cursor.y + ((terrainBitmap.mouseY - cursor.y) * 0.35));
};
if (cursor.x >= 0x0300){
cursor.x = 767;
};
if (cursor.x <= 0){
cursor.x = 0;
};
if (cursor.y >= 432){
cursor.y = 431;
};
if (cursor.y <= 0){
cursor.y = 0;
};
if (heightmap[int(cursor.x)] > 470){
spawnFlake();
cursorEnabled.visible = true;
cursorDisabled.visible = false;
if (heightmapSet(int(cursor.x), int(cursor.y))){
lastX = int(cursor.x);
drawThisFrame = true;
} else {
lastX = -1;
drawThisFrame = false;
};
};
};
};
gameFrame++;
if (drawThisFrame){
if (scrollSpeed > 30){
inkJar = (inkJar - (0.02 * 0));
} else {
inkJar = (inkJar - ((0.02 * (scrollSpeed / 30)) * 0));
};
} else {
if (!Input.mouseDown){
inkJar = (inkJar + 0.05);
};
};
if (inkJar <= 0){
inkJar = 0;
};
if (inkJar >= 1){
inkJar = 1;
};
cursor.scaleX = (cursor.scaleY = inkJar);
}
public function keydown(_arg1:KeyboardEvent):void{
var _local2:TextField;
trace(Input.ascii[_arg1.keyCode]);
if (((gameStarted) && ((Input.ascii[_arg1.keyCode] == "P")))){
if (paused){
SoundMgr.sounds["bgmMetal"].unpause();
SoundMgr.sounds["windSound"].unpause();
} else {
SoundMgr.sounds["bgmMetal"].pause();
SoundMgr.sounds["windSound"].pause();
};
paused = !(paused);
if (paused){
pauseScreen.gotoAndPlay(2);
} else {
pauseScreen.gotoAndPlay(9);
};
};
if (Input.ascii[_arg1.keyCode] == "M"){
if (!muted){
SoundMixer.soundTransform = new SoundTransform(0);
} else {
SoundMixer.soundTransform = new SoundTransform(1);
};
muted = !(muted);
};
if (Input.ascii[_arg1.keyCode] == "~"){
if (!statSubmitDebug){
_local2 = new TextField();
_local2.autoSize = TextFieldAutoSize.LEFT;
_local2.multiline = true;
_local2.text = "HELLO";
} else {
_local2.visible = !(_local2.visible);
};
};
}
public function scoreSubmitd(_arg1:Boolean):void{
trace(("SCORE SUBMITTED: " + _arg1));
}
public function killIntros():void{
removeChild(currIntro);
currIntro = null;
bgManager.visible = true;
toTitle();
SoundMixer.soundTransform = new SoundTransform(1);
SoundMgr.playSound("windSound", 0.1);
}
public function bgScroll(_arg1:Number):void{
var _local2:Rectangle;
if (_arg1 < 0){
return;
};
bgManager.bg0Accum = (bgManager.bg0Accum + (((-(_arg1) * 0.24) * bgManager.BG_SCALE) * bgManager.SCROLL_MULT));
var _local3:int = int(bgManager.bg0Accum);
bgManager.bg0Accum = (bgManager.bg0Accum - _local3);
_local2 = new Rectangle(0, 0, -(_local3), bgManager.BMD0.height);
bgManager.BMD0.copyPixels(bgManager.BMD0, _local2, new Point(bgManager.bg0W, 0));
bgManager.BMD0.scroll(_local3, 0);
bgManager.bg0X = (bgManager.bg0X + _local3);
bgManager.bg1Accum = (bgManager.bg1Accum + (((-(_arg1) * 0.48) * bgManager.BG_SCALE) * bgManager.SCROLL_MULT));
var _local4:int = int(bgManager.bg1Accum);
bgManager.bg1Accum = (bgManager.bg1Accum - _local4);
_local2 = new Rectangle(0, 0, -(_local4), bgManager.BMD1.height);
bgManager.BMD1.copyPixels(bgManager.BMD1, _local2, new Point(bgManager.bg1W, 0));
bgManager.BMD1.scroll(_local4, 0);
bgManager.bg1X = (bgManager.bg1X + _local4);
bgManager.bg2Accum = (bgManager.bg2Accum + (((-(_arg1) * 0.6) * bgManager.BG_SCALE) * bgManager.SCROLL_MULT));
var _local5:int = int(bgManager.bg2Accum);
bgManager.bg2Accum = (bgManager.bg2Accum - _local5);
_local2 = new Rectangle(0, 0, -(_local5), bgManager.BMD2.height);
bgManager.BMD2.copyPixels(bgManager.BMD2, _local2, new Point(bgManager.bg2W, 0));
bgManager.BMD2.scroll(_local5, 0);
bgManager.bg2X = (bgManager.bg2X + _local5);
}
public function toTitle():void{
SoundMgr.stopSound("bgmChopin");
chopinTimer = -1;
bgManager.transformIn();
if (((!((endgameScreen == null))) && (endgameScreen.parent))){
endgameScreen.parent.removeChild(endgameScreen);
};
endgameScreen = null;
atTitleScreen = true;
redball.visible = false;
redball.dead = true;
cursor.visible = false;
scorekeeper.mult = 1;
scorekeeper.score = 0;
scorekeeper.topMulti = 0;
scorekeeper.starsEarned = 0;
scorekeeper.greatHighJumps = 0;
scorekeeper.topSpeed = 0;
scorekeeper.cumulBuzzPoints = 0;
scorekeeper.cumulHighJumpPoints = 0;
scorekeeper.perfectTunnels = 0;
scorekeeper.killgatesDodged = 0;
addChild(titleScreen);
if (stage){
stage.focus = stage;
};
}
public function crash():void{
trace("crash");
redball.visible = false;
crashTimer = 30;
}
public function cleanDeadScrollers():void{
var _local1:int;
while (_local1 < scrollers.length) {
if (scrollers[_local1].killflag){
if ((((scrollers[_local1] is Gate)) || ((scrollers[_local1] is BigJump)))){
removeObstacle(scrollers[_local1]);
};
if ((scrollers[_local1] is BigJump)){
removeJump(scrollers[_local1]);
};
if (scrollers[_local1].parent){
scrollers[_local1].parent.removeChild(scrollers[_local1]);
};
while (scrollers[_local1].numChildren > 0) {
scrollers[_local1].removeChildAt(0);
};
scrollers.splice(_local1, 1);
_local1--;
};
_local1++;
};
}
public function mDown(_arg1:MouseEvent):void{
if (((atTitleScreen) && ((currIntro == null)))){
startGame();
};
}
public function otherThing(_arg1:Number):void{
var _local2:Rectangle;
if (_arg1 < 0){
return;
};
bgManager.bg0Accum = (bgManager.bg0Accum + (((-(_arg1) * 0.24) * bgManager.BG_SCALE) * bgManager.SCROLL_MULT));
var _local3:int = int(bgManager.bg0Accum);
bgManager.bg0Accum = (bgManager.bg0Accum - _local3);
_local2 = new Rectangle(0, 0, -(_local3), bgManager.BMD0.height);
bgManager.BMD0.copyPixels(bgManager.BMD0, _local2, new Point(bgManager.bg0W, 0));
bgManager.BMD0.scroll(_local3, 0);
bgManager.bg0X = (bgManager.bg0X + _local3);
bgManager.bg1Accum = (bgManager.bg1Accum + (((-(_arg1) * 0.48) * bgManager.BG_SCALE) * bgManager.SCROLL_MULT));
var _local4:int = int(bgManager.bg1Accum);
bgManager.bg1Accum = (bgManager.bg1Accum - _local4);
_local2 = new Rectangle(0, 0, -(_local4), bgManager.BMD1.height);
bgManager.BMD1.copyPixels(bgManager.BMD1, _local2, new Point(bgManager.bg1W, 0));
bgManager.BMD1.scroll(_local4, 0);
bgManager.bg1X = (bgManager.bg1X + _local4);
bgManager.bg2Accum = (bgManager.bg2Accum + (((-(_arg1) * 0.6) * bgManager.BG_SCALE) * bgManager.SCROLL_MULT));
var _local5:int = int(bgManager.bg2Accum);
bgManager.bg2Accum = (bgManager.bg2Accum - _local5);
_local2 = new Rectangle(0, 0, -(_local5), bgManager.BMD2.height);
bgManager.BMD2.copyPixels(bgManager.BMD2, _local2, new Point(bgManager.bg2W, 0));
bgManager.BMD2.scroll(_local5, 0);
bgManager.bg2X = (bgManager.bg2X + _local5);
}
public function pauseScreenRestart(_arg1:MouseEvent):void{
SoundMgr.sounds["bgmMetal"].unpause();
SoundMgr.sounds["windSound"].unpause();
paused = false;
pauseScreen.gotoAndPlay(12);
redball.dead = true;
gameOver();
pauseRestart = true;
}
public function sliverLoop(_arg1:Number, _arg2:int, _arg3:Number):void{
var _local4:int;
var _local5 = 1;
while (_local5 < _arg2) {
heightmap[(_local5 + _arg1)] = (heightmap[_arg1] + (_arg3 * _local5));
_local4++;
if (_local4 >= sliverWidth){
terrainDraw((_local5 + _arg1), heightmap[(_local5 + _arg1)], _arg3);
_local4 = 0;
};
slopemap[(_local5 + _arg1)] = _arg3;
_local5++;
};
}
public function pauseScreenResume(_arg1:MouseEvent):void{
SoundMgr.sounds["bgmMetal"].unpause();
SoundMgr.sounds["windSound"].unpause();
paused = false;
pauseScreen.gotoAndPlay(12);
}
public function doMikengregIntro():void{
introNum = 1;
removeChild(currIntro);
currIntro = new mikengregIntroC();
addChild(currIntro);
currIntro.addEventListener(MouseEvent.CLICK, MainRef.gotoMikengreg, false, 0, true);
}
public function removeJump(_arg1:BigJump):void{
var _local2:int;
while (_local2 < jumps.length) {
if (jumps[_local2] == _arg1){
jumps.splice(_local2, 1);
_local2--;
};
_local2++;
};
}
public function drawRainbow(_arg1:Point, _arg2:Point, _arg3:Number):void{
if (_arg3 < 80){
return;
};
var _local4:Point = new Point((_arg2.x - _arg1.x), (_arg2.y - _arg1.y));
var _local5:Number = (_local4.y / _local4.x);
var _local6:Matrix = new Matrix(1, 0, 0, 1, 0, 0);
var _local7:int = _arg1.x;
while (_local7 < _arg2.x) {
rainbowSize = _arg3;
_local6.a = (rainbowSize / 40);
_local6.d = (rainbowSize / 40);
_local6.tx = _local7;
_local6.ty = ((((_arg1.y + ((_local7 - _arg1.x) * _local5)) - 18) - (rainbowSize * 0.33)) + Util.RandAdj(1));
rainbowBitmap.bitmapData.copyPixels(rainbowSliver, new Rectangle(0, 0, rainbowSliver.width, rainbowSliver.height), new Point(_local6.tx, _local6.ty));
_local7 = (_local7 + 4);
};
}
public function terrainDraw(_arg1:int, _arg2:int, _arg3:Number):void{
if (_arg3 < -10){
bmd.fillRect(new Rectangle(_arg1, _arg2, 1, 500), 4294901760);
} else {
bmd.copyPixels(terrainSliverBMP, new Rectangle(0, 0, sliverWidth, 500), new Point(_arg1, _arg2));
};
}
public function submitKongScores():void{
kongapi.submitScore(scorekeeper.score);
kongapi.submitStat(scorekeeper.score, "Score");
kongapi.submitStat(scorekeeper.topMulti, "Top Multiplier");
kongapi.submitStat((totalGameTime / 1000), "Longest Run");
kongapi.submitStat(scorekeeper.greatHighJumps, "Great High Jumps");
kongapi.submitStat(scorekeeper.starsEarned, "Stars Earned");
kongapi.submitStat(scorekeeper.topSpeed, "Top Speed");
kongapi.submitStat(scorekeeper.cumulBuzzPoints, "Cumulative Buzz the Tower");
kongapi.submitStat(scorekeeper.cumulHighJumpPoints, "Cumulative High Jump Score");
kongapi.submitStat(scorekeeper.perfectTunnels, "Top Perfect Tunnels");
kongapi.submitStat(scorekeeper.killgatesDodged, "Top Killgates Dodged");
}
public function gameOver():void{
var _local3:Scroller;
replayMode = false;
replayMap = [];
Log.LevelAverageMetric("Score", currentPlay, scorekeeper.score);
Log.LevelAverageMetric("BestMulti", currentPlay, scorekeeper.topMulti);
Log.LevelAverageMetric("Time", currentPlay, (totalGameTime / 1000));
Log.LevelAverageMetric("AveragePlayTime", 1, (totalGameTime / 1000));
localLeaderboard.logScore(scorekeeper.score, totalGameTime);
HighScores.Submit("testerab", uint(scorekeeper.score), "New Score", scoreSubmitd, false);
HighScores.Submit("tester", (totalGameTime / 1000), "GameTimeInSeconds", null, false);
scorekeeper.clearBonusPopups();
redball.scarf.visible = (redball.headphones.visible = false);
SoundMgr.stopSound("bgmMetal");
var _local1:int = getChildIndex(sceneryLayer);
removeChild(sceneryLayer);
sceneryLayer = new Sprite();
addChildAt(sceneryLayer, _local1);
bgManager.transformOut();
cursor.visible = false;
gameStarted = false;
redball.visible = false;
redball.killGateHit = false;
redball.inx = (redball.iny = 0);
redball.speed = 0;
redball.boostTimer = 0;
scorekeeper.disable();
var _local2:int;
while (_local2 < heightmap.length) {
heightmap[_local2] = 500;
_local2++;
};
bmd.fillRect(new Rectangle(0, 0, bmd.width, bmd.height), 0);
rainbowBitmap.bitmapData.fillRect(new Rectangle(0, 0, bmd.width, bmd.height), 0);
for each (_local3 in scrollers) {
_local3.killflag = true;
_local3.update();
};
cleanDeadScrollers();
while (jumpScoreLayer.numChildren > 0) {
jumpScoreLayer.removeChildAt(0);
};
}
public function bgTransformDown(_arg1:Event):void{
if (pauseRestart){
pauseRestart = false;
toTitle();
} else {
if (!gameStarted){
toEndgameScreen();
};
};
}
public function rainbowTrail(_arg1:int):void{
if (redball.scarf.sections.length <= 31){
lastRainbowPos = null;
return;
};
var _local2:Point = Util.VectorAdd(new Point(redball.scarf.sections[(redball.scarf.sections.length - 1)].x, redball.scarf.sections[(redball.scarf.sections.length - 1)].y), new Point(redball.scarf.x, redball.scarf.y));
_local2 = redball.scarf.rainbowPos;
_local2 = DisplayObject(redball.scarf.sections[(redball.scarf.sections.length - 1)].parent).localToGlobal(_local2);
_local2.x = (_local2.x + 2);
_local2.y = (_local2.y + 5);
if (((redball.trickin) && ((redball.scarf.sections[(redball.scarf.sections.length - 1)].height > 40)))){
if (firstGo){
firstGo = false;
} else {
if (lastRainbowPos == null){
lastRainbowPos = new Point(_local2.x, _local2.y);
return;
};
lastRainbowPos.x = (lastRainbowPos.x + _arg1);
drawRainbow(lastRainbowPos, _local2, redball.scarf.sections[(redball.scarf.sections.length - 1)].height);
lastRainbowPos = _local2;
};
} else {
firstGo = true;
lastRainbowPos = null;
};
}
public function doIntros():void{
var _local1:* = new kongIntroC();
addChild(_local1);
currIntro = _local1;
_local1.addEventListener(MouseEvent.CLICK, MainRef.gotoKong, false, 0, true);
}
}
}//package
Section 70
//Main_fx_flakeC (Main_fx_flakeC)
package {
import mx.core.*;
public class Main_fx_flakeC extends MovieClipAsset {
}
}//package
Section 71
//Main_kongIntroC (Main_kongIntroC)
package {
import mx.core.*;
public class Main_kongIntroC extends MovieClipAsset {
}
}//package
Section 72
//Main_mikengregIntroC (Main_mikengregIntroC)
package {
import mx.core.*;
public class Main_mikengregIntroC extends MovieClipAsset {
}
}//package
Section 73
//Main_snowflakeActiveC (Main_snowflakeActiveC)
package {
import flash.display.*;
import mx.core.*;
public class Main_snowflakeActiveC extends SpriteAsset {
public var btn_sfxOn:DisplayObject;
public var btn_aaOn:DisplayObject;
public var btn_bgmOn:DisplayObject;
public var btn_mobile:DisplayObject;
public var board:DisplayObject;
public var btn_restart:DisplayObject;
public var btn_resume:DisplayObject;
public var btn_back:DisplayObject;
public var btn_blurOn:DisplayObject;
public var btn_sponsor:DisplayObject;
public var btn_leaderboards:DisplayObject;
}
}//package
Section 74
//Main_snowflakeC (Main_snowflakeC)
package {
import mx.core.*;
public class Main_snowflakeC extends SpriteAsset {
}
}//package
Section 75
//Main_ui_leaderboardC (Main_ui_leaderboardC)
package {
import flash.display.*;
import mx.core.*;
public class Main_ui_leaderboardC extends MovieClipAsset {
public var txt_scoreList:DisplayObject;
public var btn_leaderboards:DisplayObject;
public var btn_sfxOn:DisplayObject;
public var btn_aaOn:DisplayObject;
public var btn_bgmOn:DisplayObject;
public var btn_mobile:DisplayObject;
public var board:DisplayObject;
public var btn_blurOn:DisplayObject;
public var btn_back:DisplayObject;
public var btn_restart:DisplayObject;
public var btn_resume:DisplayObject;
public var btn_sponsor:DisplayObject;
public var txt_timeList:DisplayObject;
public var btn_options:DisplayObject;
}
}//package
Section 76
//Main_ui_optionsC (Main_ui_optionsC)
package {
import flash.display.*;
import mx.core.*;
public class Main_ui_optionsC extends MovieClipAsset {
public var btn_sfxOn:DisplayObject;
public var btn_aaOn:DisplayObject;
public var btn_bgmOn:DisplayObject;
public var btn_mobile:DisplayObject;
public var board:DisplayObject;
public var btn_restart:DisplayObject;
public var btn_resume:DisplayObject;
public var btn_back:DisplayObject;
public var btn_blurOn:DisplayObject;
public var btn_sponsor:DisplayObject;
public var btn_leaderboards:DisplayObject;
}
}//package
Section 77
//Main_ui_pauseC (Main_ui_pauseC)
package {
import flash.display.*;
import mx.core.*;
public class Main_ui_pauseC extends MovieClipAsset {
public var btn_sfxOn:DisplayObject;
public var btn_aaOn:DisplayObject;
public var btn_bgmOn:DisplayObject;
public var btn_mobile:DisplayObject;
public var board:DisplayObject;
public var btn_restart:DisplayObject;
public var btn_resume:DisplayObject;
public var btn_blurOn:DisplayObject;
public var btn_sponsor:DisplayObject;
}
}//package
Section 78
//Main_ui_titleC (Main_ui_titleC)
package {
import mx.core.*;
public class Main_ui_titleC extends MovieClipAsset {
}
}//package
Section 79
//MainRef (MainRef)
package {
import flash.events.*;
import flash.net.*;
import SWFStats.*;
public class MainRef {
public static var ref:Main;
public static function gotoKong(_arg1:Event):void{
Log.CustomMetric("kongd", "links");
navigateToURL(new URLRequest("http://www.kongregate.com/?gamereferral=solipskier"), "_blank");
}
public static function gotoMikengreg(_arg1:Event):void{
Log.CustomMetric("mikengregd", "links");
navigateToURL(new URLRequest("http://www.mikengreg.com"), "_blank");
}
public static function gotoSolipRedirect(_arg1:Event):void{
Log.CustomMetric("mobile", "links");
navigateToURL(new URLRequest("http://mikengreg.com/solip_redirect"), "_blank");
}
}
}//package
Section 80
//OptionsBoard (OptionsBoard)
package {
import flash.events.*;
import flash.display.*;
import General.*;
public class OptionsBoard {
var btn_aaLo;
var btn_bgmOff;
public var ui_switchOffC:Class;
var btn_sfxOn;
var btn_aaOn;
var btn_bgmOn;
var btn_blurOff;
public var ui_switchLoC:Class;
var btn_blurOn;
var btn_sfxOff;
var board:MovieClip;
public function OptionsBoard(_arg1:MovieClip){
ui_switchLoC = OptionsBoard_ui_switchLoC;
ui_switchOffC = OptionsBoard_ui_switchOffC;
super();
board = _arg1;
btn_sfxOn = board.btn_sfxOn;
btn_sfxOff = new ui_switchOffC();
dupOnButton(btn_sfxOff, board.btn_sfxOn, board);
btn_sfxOff.name = "btn_sfxOff";
btn_bgmOn = board.btn_bgmOn;
btn_bgmOff = new ui_switchOffC();
dupOnButton(btn_bgmOff, board.btn_bgmOn, board);
btn_bgmOff.name = "btn_bgmOff";
btn_aaOn = board.btn_aaOn;
btn_aaLo = new ui_switchLoC();
dupOnButton(btn_aaLo, board.btn_aaOn, board);
btn_aaLo.name = "btn_bgmOff";
btn_blurOn = board.btn_blurOn;
btn_blurOff = new ui_switchOffC();
dupOnButton(btn_blurOff, board.btn_blurOn, board);
btn_blurOff.name = "btn_bgmOff";
registerButtons();
board.addEventListener(Event.ENTER_FRAME, enterFrame);
}
public function swap(_arg1, _arg2):void{
_arg1.visible = false;
_arg1.mouseEnabled = false;
_arg2.visible = true;
_arg2.mouseEnabled = true;
}
public function bgmOnClick(_arg1:MouseEvent):void{
SoundMgr.setMusicVolume(1);
}
public function unRegisterButtons():void{
Util.ButtonUnReg(board.btn_sfxOn, sfxOffClick);
Util.ButtonUnReg(btn_sfxOff, sfxOnClick);
Util.ButtonUnReg(board.btn_bgmOn, bgmOffClick);
Util.ButtonUnReg(btn_bgmOff, bgmOnClick);
Util.ButtonUnReg(board.btn_aaOn, aaLoClick);
Util.ButtonUnReg(btn_aaLo, aaHiClick);
Util.ButtonUnReg(board.btn_blurOn, blurOffClick);
Util.ButtonUnReg(btn_blurOff, blurOnClick);
Util.ButtonUnReg(board.btn_sponsor, MainRef.gotoKong);
if (board.btn_mobile){
Util.ButtonUnReg(board.btn_mobile, MainRef.gotoSolipRedirect);
};
}
public function aaHiClick(_arg1:MouseEvent):void{
MainRef.ref.stage.quality = StageQuality.HIGH;
}
public function bgmOffClick(_arg1:MouseEvent):void{
SoundMgr.setMusicVolume(0);
}
public function dupOnButton(_arg1, _arg2, _arg3):void{
_arg3.addChild(_arg1);
_arg1.visible = false;
_arg1.x = _arg2.x;
_arg1.y = _arg2.y;
_arg1.mouseEnabled = false;
}
public function aaLoClick(_arg1:MouseEvent):void{
MainRef.ref.stage.quality = StageQuality.LOW;
}
public function registerButtons():void{
Util.ButtonReg(board.btn_sfxOn, sfxOffClick);
Util.ButtonReg(btn_sfxOff, sfxOnClick);
Util.ButtonReg(board.btn_bgmOn, bgmOffClick);
Util.ButtonReg(btn_bgmOff, bgmOnClick);
Util.ButtonReg(board.btn_aaOn, aaLoClick);
Util.ButtonReg(btn_aaLo, aaHiClick);
Util.ButtonReg(board.btn_blurOn, blurOffClick);
Util.ButtonReg(btn_blurOff, blurOnClick);
Util.ButtonReg(board.btn_sponsor, MainRef.gotoKong);
if (board.btn_mobile){
Util.ButtonReg(board.btn_mobile, MainRef.gotoSolipRedirect);
};
}
public function blurOffClick(_arg1:MouseEvent):void{
MainRef.ref.blurMode = false;
}
public function sfxOnClick(_arg1:MouseEvent):void{
SoundMgr.setFXVolume(1);
}
public function blurOnClick(_arg1:MouseEvent):void{
MainRef.ref.blurMode = true;
}
public function enterFrame(_arg1:Event):void{
if ((((SoundMgr.fxVol == 1)) && ((btn_sfxOff.visible == true)))){
swap(btn_sfxOff, btn_sfxOn);
};
if ((((SoundMgr.fxVol == 0)) && ((btn_sfxOn.visible == true)))){
swap(btn_sfxOn, btn_sfxOff);
};
if ((((SoundMgr.musicVol == 1)) && ((btn_bgmOff.visible == true)))){
swap(btn_bgmOff, btn_bgmOn);
};
if ((((SoundMgr.musicVol == 0)) && ((btn_bgmOn.visible == true)))){
swap(btn_bgmOn, btn_bgmOff);
};
if (((MainRef.ref.blurMode) && ((btn_blurOff.visible == true)))){
swap(btn_blurOff, btn_blurOn);
};
if (((!(MainRef.ref.blurMode)) && ((btn_blurOn.visible == true)))){
swap(btn_blurOn, btn_blurOff);
};
if ((((MainRef.ref.stage.quality == "HIGH")) && ((btn_aaLo.visible == true)))){
swap(btn_aaLo, btn_aaOn);
};
if ((((MainRef.ref.stage.quality == "LOW")) && ((btn_aaOn.visible == true)))){
swap(btn_aaOn, btn_aaLo);
};
}
public function sfxOffClick(_arg1:MouseEvent):void{
SoundMgr.setFXVolume(0);
}
}
}//package
Section 81
//OptionsBoard_ui_switchLoC (OptionsBoard_ui_switchLoC)
package {
import flash.display.*;
import mx.core.*;
public class OptionsBoard_ui_switchLoC extends ButtonAsset {
public var txt_timeList:DisplayObject;
public var txt_score:DisplayObject;
public var popup1:DisplayObject;
public var mountains:DisplayObject;
public var popup3:DisplayObject;
public var txt_bonus:DisplayObject;
public var trees:DisplayObject;
public var btn_twitter:DisplayObject;
public var btn_next:DisplayObject;
public var btn_leaderboards:DisplayObject;
public var credits:DisplayObject;
public var options:DisplayObject;
public var txt_mult:DisplayObject;
public var btn_sfxOn:DisplayObject;
public var btn_aaOn:DisplayObject;
public var btn_bgmOn:DisplayObject;
public var txt_bonusCopy:DisplayObject;
public var popup2:DisplayObject;
public var skierFalling:DisplayObject;
public var btn_restart:DisplayObject;
public var btn_prev:DisplayObject;
public var btn_sponsor:DisplayObject;
public var tips:DisplayObject;
public var txt_meters:DisplayObject;
public var btn_stump:DisplayObject;
public var txt_time:DisplayObject;
public var txt_scoreList:DisplayObject;
public var btn_facebook:DisplayObject;
public var popup:DisplayObject;
public var btn_options:DisplayObject;
public var txt_mph:DisplayObject;
public var clouds:DisplayObject;
public var share:DisplayObject;
public var btn_mikengreg:DisplayObject;
public var btn_mobile:DisplayObject;
public var board:DisplayObject;
public var btn_blurOn:DisplayObject;
public var btn_back:DisplayObject;
public var flip:DisplayObject;
public var head:DisplayObject;
public var btn_resume:DisplayObject;
public var leaderboard:DisplayObject;
public var skier:DisplayObject;
}
}//package
Section 82
//OptionsBoard_ui_switchOffC (OptionsBoard_ui_switchOffC)
package {
import flash.display.*;
import mx.core.*;
public class OptionsBoard_ui_switchOffC extends ButtonAsset {
public var txt_timeList:DisplayObject;
public var txt_score:DisplayObject;
public var popup1:DisplayObject;
public var mountains:DisplayObject;
public var popup3:DisplayObject;
public var txt_bonus:DisplayObject;
public var trees:DisplayObject;
public var btn_twitter:DisplayObject;
public var btn_next:DisplayObject;
public var btn_leaderboards:DisplayObject;
public var credits:DisplayObject;
public var options:DisplayObject;
public var txt_mult:DisplayObject;
public var btn_sfxOn:DisplayObject;
public var btn_aaOn:DisplayObject;
public var btn_bgmOn:DisplayObject;
public var txt_bonusCopy:DisplayObject;
public var popup2:DisplayObject;
public var skierFalling:DisplayObject;
public var btn_restart:DisplayObject;
public var btn_prev:DisplayObject;
public var btn_sponsor:DisplayObject;
public var tips:DisplayObject;
public var txt_meters:DisplayObject;
public var btn_stump:DisplayObject;
public var txt_time:DisplayObject;
public var txt_scoreList:DisplayObject;
public var btn_facebook:DisplayObject;
public var popup:DisplayObject;
public var btn_options:DisplayObject;
public var txt_mph:DisplayObject;
public var clouds:DisplayObject;
public var share:DisplayObject;
public var btn_mikengreg:DisplayObject;
public var btn_mobile:DisplayObject;
public var board:DisplayObject;
public var btn_blurOn:DisplayObject;
public var btn_back:DisplayObject;
public var flip:DisplayObject;
public var head:DisplayObject;
public var btn_resume:DisplayObject;
public var leaderboard:DisplayObject;
public var skier:DisplayObject;
}
}//package
Section 83
//Scarf (Scarf)
package {
import flash.geom.*;
import flash.display.*;
import flash.utils.*;
import General.*;
public class Scarf extends Scroller {
public var rotations:Array;
public var lastTime:uint;
public var base:Sprite;
public var flashPeriod:int;// = 2
public var colorIter:int;// = 0
public var lastinx:Number;
public var lastiny:Number;
public var sections:Array;
public var colors:Array;
public var flashTimer:int;// = 0
public var finalWidth:Number;// = 0.05
public var flashShortTimer:int;// = 2
public var drawdFinal:Boolean;// = false
public var rainbowPos:Point;
public function Scarf(){
super(null, null);
base = new Sprite();
graphics.lineStyle(1, 0xFF00);
colors = new Array(4293496628, 4293066847, 4286921357, 4278220222, 4278230871);
sections = new Array();
rotations = new Array();
var _local1:ScarfBone = new ScarfBone();
colorIter++;
_local1.boneParent = base;
sections.push(_local1);
addChild(_local1);
rainbowPos = new Point(0, 0);
}
public function addBone():void{
var _local1:ScarfBone = new ScarfBone();
colorIter++;
if (colorIter >= colors.length){
colorIter = 0;
};
_local1.boneParent = sections[(sections.length - 1)];
sections.push(_local1);
addChild(_local1);
var _local2:int = (sections.length - 1);
var _local3:Number = 0;
_local3 = (Math.log(((_local2 + 5) * 0.25)) * 10);
_local1.lineWidth = _local3;
_local1.draw();
rainbowPos.x = sections[(sections.length - 1)].x;
rainbowPos.y = sections[(sections.length - 1)].y;
if (_local1.height > 80){
_local1.height = 80;
};
_local1.visible = false;
}
public function updateD(_arg1:Number, _arg2:Number):void{
var _local8:ScarfBone;
if (_arg1 > 0){
_arg1 = (_arg1 * -1);
};
var _local3:int = (getTimer() - lastTime);
lastTime = getTimer();
flashTimer = (flashTimer - _local3);
if (flashTimer > 0){
visible = !(visible);
} else {
visible = true;
};
if (MainRef.ref.redball.trickin){
MainRef.ref.rainbowBitmap.visible = visible;
} else {
MainRef.ref.rainbowBitmap.visible = true;
};
lastinx = _arg1;
lastiny = _arg2;
var _local4:Point = new Point();
var _local5:Point = new Point();
var _local6:Point = new Point(_arg1, _arg2);
var _local7:ScarfBone = sections[0];
for each (_local8 in sections) {
_local8.visible = true;
_local8.iny = (_local8.iny + (_arg2 + Util.RandAdj((_local6.length * 1))));
_local8.inx = (_local8.inx + (_arg1 + Util.RandAdj((_local6.length * 1))));
_local8.iny = (_local8.iny + (4 + Util.RandAdj(2)));
_local8.x = (_local8.x + _local8.inx);
_local8.y = (_local8.y + _local8.iny);
_local4.x = (_local8.x - _local8.boneParent.x);
_local4.y = (_local8.y - _local8.boneParent.y);
if (_local4.length > 4){
_local5 = Util.Normalize(_local4);
_local8.inx = ((_local5.x * 0) + (_local8.inx * 0.2));
_local8.iny = ((_local5.y * 0) + (_local8.iny * 0.2));
_local8.x = ((_local5.x * 4) + _local8.boneParent.x);
_local8.y = ((_local5.y * 4) + _local8.boneParent.y);
};
if (_local8.x < _local7.x){
_local7 = _local8;
};
};
rainbowPos.x = _local7.x;
rainbowPos.y = _local7.y;
}
override public function update():void{
var _local1:Point;
super.update();
}
public function removeBone():void{
if (sections.length == 1){
return;
};
var _local1:ScarfBone = sections.pop();
removeChild(_local1);
colorIter--;
if (colorIter < 0){
colorIter = (colors.length - 1);
};
if (sections.length > 0){
rainbowPos.x = sections[(sections.length - 1)].x;
rainbowPos.y = sections[(sections.length - 1)].y;
};
}
public function setLength(_arg1:int):void{
if (_arg1 < 1){
_arg1 = 1;
};
while (sections.length < _arg1) {
addBone();
};
while (sections.length > _arg1) {
removeBone();
};
}
override public function setBlur(_arg1:Number, _arg2:Number):void{
}
}
}//package
import flash.display.*;
class ScarfBone extends Sprite {
public var lineWidth:Number;// = 2
public var inx:Number;// = 0
public var iny:Number;// = 0
public var boneParent:DisplayObject;
private function ScarfBone(){
}
public function draw():void{
var _local1:Bitmap = new Bitmap(Main.rainbowSliver, PixelSnapping.ALWAYS);
_local1.height = (lineWidth * 5);
_local1.y = -((_local1.height * 0.5));
addChild(_local1);
}
}
Section 84
//Scenery (Scenery)
package {
import flash.display.*;
public class Scenery extends Scroller {
public var heightmap:Array;
public var splashPart:MovieClip;
public var fallSpeed:Number;// = -30
public function Scenery(_arg1:HeightmapRunner, _arg2:Sprite, _arg3:Array, _arg4:Number, _arg5:Boolean=false){
super(_arg1, _arg2);
var _local6:* = SceneryMgr.gimmeArt();
if (_local6 != null){
addChild(_local6);
};
if (_arg5){
x = (_arg4 + (8 * int(_arg1.speed)));
y = -10;
fallSpeed = 10;
} else {
x = ((_arg4 - (width * 0.5)) + (Math.random() * 10));
y = ((_arg3[int(x)] + height) + 50);
fallSpeed = -30;
if (_local6 != null){
splashPart = SceneryMgr.gimmeSnowimpact();
splashPart.gotoAndStop(1);
};
};
heightmap = _arg3;
setBlur(_arg1.speed, fallSpeed);
}
override public function update():void{
super.update();
y = (y + fallSpeed);
if (((((splashPart) && ((splashPart.currentFrame < splashPart.totalFrames)))) && ((splashPart.currentFrame > 1)))){
splashPart.nextFrame();
};
if (x > 0){
if (fallSpeed < 0){
if (y < heightmap[int(x)]){
fallSpeed = 0;
y = heightmap[int(x)];
if (((splashPart) && ((splashPart.currentFrame <= splashPart.totalFrames)))){
splashPart.nextFrame();
};
};
} else {
fallSpeed = (fallSpeed + 2);
setBlur((((runner.speed * 0.1) * runner.speed) * 0.1), fallSpeed);
if (y > heightmap[int(x)]){
fallSpeed = 0;
y = heightmap[int(x)];
if (splashPart == null){
splashPart = SceneryMgr.gimmeSnowimpact();
splashPart.scaleX = (splashPart.scaleY = (width / splashPart.width));
};
};
};
} else {
killflag = true;
};
}
}
}//package
Section 85
//SceneryMgr (SceneryMgr)
package {
public class SceneryMgr {
public static var skisC:Class = SceneryMgr_skisC;
public static var lodgeC:Class = SceneryMgr_lodgeC;
public static var allAssets:Array;
public static var tree3C:Class = SceneryMgr_tree3C;
public static var assets2:Array;
public static var tree1C:Class = SceneryMgr_tree1C;
public static var assets4:Array;
public static var assets1:Array;
public static var impactParticleC:Class = SceneryMgr_impactParticleC;
public static var assets3:Array;
public static var snowboardC:Class = SceneryMgr_snowboardC;
public static var tree4C:Class = SceneryMgr_tree4C;
public static var tree2C:Class = SceneryMgr_tree2C;
public static var outhouseC:Class = SceneryMgr_outhouseC;
public static function gimmeArt(){
var _local1:int = Math.floor((Math.random() * 4));
var _local2:* = allAssets[_local1].shift();
if (_local2.parent == null){
allAssets[_local1].push(_local2);
return (_local2);
};
allAssets[_local1].unshift(_local2);
return (null);
}
public static function gimmeSnowimpact(){
return (new impactParticleC());
}
public static function initialize():void{
assets1 = [new tree1C(), new tree1C(), new tree2C(), new tree3C(), new tree4C()];
assets2 = [new tree2C(), new lodgeC(), new outhouseC(), new tree4C()];
assets3 = [new tree4C(), new tree2C(), new tree3C(), new outhouseC()];
assets4 = [new tree3C(), new lodgeC(), new tree1C(), new tree2C()];
allAssets = [assets1, assets2, assets3, assets4];
}
}
}//package
Section 86
//SceneryMgr_impactParticleC (SceneryMgr_impactParticleC)
package {
import flash.display.*;
import mx.core.*;
public class SceneryMgr_impactParticleC extends MovieClipAsset {
public var txt_timeList:DisplayObject;
public var txt_score:DisplayObject;
public var popup1:DisplayObject;
public var mountains:DisplayObject;
public var popup3:DisplayObject;
public var txt_bonus:DisplayObject;
public var trees:DisplayObject;
public var btn_twitter:DisplayObject;
public var btn_next:DisplayObject;
public var btn_leaderboards:DisplayObject;
public var credits:DisplayObject;
public var options:DisplayObject;
public var txt_mult:DisplayObject;
public var btn_sfxOn:DisplayObject;
public var btn_aaOn:DisplayObject;
public var btn_bgmOn:DisplayObject;
public var txt_bonusCopy:DisplayObject;
public var popup2:DisplayObject;
public var skierFalling:DisplayObject;
public var btn_restart:DisplayObject;
public var btn_prev:DisplayObject;
public var btn_sponsor:DisplayObject;
public var tips:DisplayObject;
public var txt_meters:DisplayObject;
public var btn_stump:DisplayObject;
public var txt_time:DisplayObject;
public var txt_scoreList:DisplayObject;
public var btn_facebook:DisplayObject;
public var popup:DisplayObject;
public var btn_options:DisplayObject;
public var txt_mph:DisplayObject;
public var clouds:DisplayObject;
public var share:DisplayObject;
public var btn_mikengreg:DisplayObject;
public var btn_mobile:DisplayObject;
public var board:DisplayObject;
public var btn_blurOn:DisplayObject;
public var btn_back:DisplayObject;
public var flip:DisplayObject;
public var head:DisplayObject;
public var btn_resume:DisplayObject;
public var leaderboard:DisplayObject;
public var skier:DisplayObject;
}
}//package
Section 87
//SceneryMgr_lodgeC (SceneryMgr_lodgeC)
package {
import flash.display.*;
import mx.core.*;
public class SceneryMgr_lodgeC extends SpriteAsset {
public var txt_timeList:DisplayObject;
public var txt_score:DisplayObject;
public var popup1:DisplayObject;
public var mountains:DisplayObject;
public var popup3:DisplayObject;
public var txt_bonus:DisplayObject;
public var trees:DisplayObject;
public var btn_twitter:DisplayObject;
public var btn_next:DisplayObject;
public var btn_leaderboards:DisplayObject;
public var credits:DisplayObject;
public var options:DisplayObject;
public var txt_mult:DisplayObject;
public var btn_sfxOn:DisplayObject;
public var btn_aaOn:DisplayObject;
public var btn_bgmOn:DisplayObject;
public var txt_bonusCopy:DisplayObject;
public var popup2:DisplayObject;
public var skierFalling:DisplayObject;
public var btn_restart:DisplayObject;
public var btn_prev:DisplayObject;
public var btn_sponsor:DisplayObject;
public var tips:DisplayObject;
public var txt_meters:DisplayObject;
public var btn_stump:DisplayObject;
public var txt_time:DisplayObject;
public var txt_scoreList:DisplayObject;
public var btn_facebook:DisplayObject;
public var popup:DisplayObject;
public var btn_options:DisplayObject;
public var txt_mph:DisplayObject;
public var clouds:DisplayObject;
public var share:DisplayObject;
public var btn_mikengreg:DisplayObject;
public var btn_mobile:DisplayObject;
public var board:DisplayObject;
public var btn_blurOn:DisplayObject;
public var btn_back:DisplayObject;
public var flip:DisplayObject;
public var head:DisplayObject;
public var btn_resume:DisplayObject;
public var leaderboard:DisplayObject;
public var skier:DisplayObject;
}
}//package
Section 88
//SceneryMgr_outhouseC (SceneryMgr_outhouseC)
package {
import flash.display.*;
import mx.core.*;
public class SceneryMgr_outhouseC extends SpriteAsset {
public var txt_timeList:DisplayObject;
public var txt_score:DisplayObject;
public var popup1:DisplayObject;
public var mountains:DisplayObject;
public var popup3:DisplayObject;
public var txt_bonus:DisplayObject;
public var trees:DisplayObject;
public var btn_twitter:DisplayObject;
public var btn_next:DisplayObject;
public var btn_leaderboards:DisplayObject;
public var credits:DisplayObject;
public var options:DisplayObject;
public var txt_mult:DisplayObject;
public var btn_sfxOn:DisplayObject;
public var btn_aaOn:DisplayObject;
public var btn_bgmOn:DisplayObject;
public var txt_bonusCopy:DisplayObject;
public var popup2:DisplayObject;
public var skierFalling:DisplayObject;
public var btn_restart:DisplayObject;
public var btn_prev:DisplayObject;
public var btn_sponsor:DisplayObject;
public var tips:DisplayObject;
public var txt_meters:DisplayObject;
public var btn_stump:DisplayObject;
public var txt_time:DisplayObject;
public var txt_scoreList:DisplayObject;
public var btn_facebook:DisplayObject;
public var popup:DisplayObject;
public var btn_options:DisplayObject;
public var txt_mph:DisplayObject;
public var clouds:DisplayObject;
public var share:DisplayObject;
public var btn_mikengreg:DisplayObject;
public var btn_mobile:DisplayObject;
public var board:DisplayObject;
public var btn_blurOn:DisplayObject;
public var btn_back:DisplayObject;
public var flip:DisplayObject;
public var head:DisplayObject;
public var btn_resume:DisplayObject;
public var leaderboard:DisplayObject;
public var skier:DisplayObject;
}
}//package
Section 89
//SceneryMgr_skisC (SceneryMgr_skisC)
package {
import flash.display.*;
import mx.core.*;
public class SceneryMgr_skisC extends SpriteAsset {
public var txt_timeList:DisplayObject;
public var txt_score:DisplayObject;
public var popup1:DisplayObject;
public var mountains:DisplayObject;
public var popup3:DisplayObject;
public var txt_bonus:DisplayObject;
public var trees:DisplayObject;
public var btn_twitter:DisplayObject;
public var btn_next:DisplayObject;
public var btn_leaderboards:DisplayObject;
public var credits:DisplayObject;
public var options:DisplayObject;
public var txt_mult:DisplayObject;
public var btn_sfxOn:DisplayObject;
public var btn_aaOn:DisplayObject;
public var btn_bgmOn:DisplayObject;
public var txt_bonusCopy:DisplayObject;
public var popup2:DisplayObject;
public var skierFalling:DisplayObject;
public var btn_restart:DisplayObject;
public var btn_prev:DisplayObject;
public var btn_sponsor:DisplayObject;
public var tips:DisplayObject;
public var txt_meters:DisplayObject;
public var btn_stump:DisplayObject;
public var txt_time:DisplayObject;
public var txt_scoreList:DisplayObject;
public var btn_facebook:DisplayObject;
public var popup:DisplayObject;
public var btn_options:DisplayObject;
public var txt_mph:DisplayObject;
public var clouds:DisplayObject;
public var share:DisplayObject;
public var btn_mikengreg:DisplayObject;
public var btn_mobile:DisplayObject;
public var board:DisplayObject;
public var btn_blurOn:DisplayObject;
public var btn_back:DisplayObject;
public var flip:DisplayObject;
public var head:DisplayObject;
public var btn_resume:DisplayObject;
public var leaderboard:DisplayObject;
public var skier:DisplayObject;
}
}//package
Section 90
//SceneryMgr_snowboardC (SceneryMgr_snowboardC)
package {
import flash.display.*;
import mx.core.*;
public class SceneryMgr_snowboardC extends SpriteAsset {
public var txt_timeList:DisplayObject;
public var txt_score:DisplayObject;
public var popup1:DisplayObject;
public var mountains:DisplayObject;
public var popup3:DisplayObject;
public var txt_bonus:DisplayObject;
public var trees:DisplayObject;
public var btn_twitter:DisplayObject;
public var btn_next:DisplayObject;
public var btn_leaderboards:DisplayObject;
public var credits:DisplayObject;
public var options:DisplayObject;
public var txt_mult:DisplayObject;
public var btn_sfxOn:DisplayObject;
public var btn_aaOn:DisplayObject;
public var btn_bgmOn:DisplayObject;
public var txt_bonusCopy:DisplayObject;
public var popup2:DisplayObject;
public var skierFalling:DisplayObject;
public var btn_restart:DisplayObject;
public var btn_prev:DisplayObject;
public var btn_sponsor:DisplayObject;
public var tips:DisplayObject;
public var txt_meters:DisplayObject;
public var btn_stump:DisplayObject;
public var txt_time:DisplayObject;
public var txt_scoreList:DisplayObject;
public var btn_facebook:DisplayObject;
public var popup:DisplayObject;
public var btn_options:DisplayObject;
public var txt_mph:DisplayObject;
public var clouds:DisplayObject;
public var share:DisplayObject;
public var btn_mikengreg:DisplayObject;
public var btn_mobile:DisplayObject;
public var board:DisplayObject;
public var btn_blurOn:DisplayObject;
public var btn_back:DisplayObject;
public var flip:DisplayObject;
public var head:DisplayObject;
public var btn_resume:DisplayObject;
public var leaderboard:DisplayObject;
public var skier:DisplayObject;
}
}//package
Section 91
//SceneryMgr_tree1C (SceneryMgr_tree1C)
package {
import flash.display.*;
import mx.core.*;
public class SceneryMgr_tree1C extends SpriteAsset {
public var txt_timeList:DisplayObject;
public var txt_score:DisplayObject;
public var popup1:DisplayObject;
public var mountains:DisplayObject;
public var popup3:DisplayObject;
public var txt_bonus:DisplayObject;
public var trees:DisplayObject;
public var btn_twitter:DisplayObject;
public var btn_next:DisplayObject;
public var btn_leaderboards:DisplayObject;
public var credits:DisplayObject;
public var options:DisplayObject;
public var txt_mult:DisplayObject;
public var btn_sfxOn:DisplayObject;
public var btn_aaOn:DisplayObject;
public var btn_bgmOn:DisplayObject;
public var txt_bonusCopy:DisplayObject;
public var popup2:DisplayObject;
public var skierFalling:DisplayObject;
public var btn_restart:DisplayObject;
public var btn_prev:DisplayObject;
public var btn_sponsor:DisplayObject;
public var tips:DisplayObject;
public var txt_meters:DisplayObject;
public var btn_stump:DisplayObject;
public var txt_time:DisplayObject;
public var txt_scoreList:DisplayObject;
public var btn_facebook:DisplayObject;
public var popup:DisplayObject;
public var btn_options:DisplayObject;
public var txt_mph:DisplayObject;
public var clouds:DisplayObject;
public var share:DisplayObject;
public var btn_mikengreg:DisplayObject;
public var btn_mobile:DisplayObject;
public var board:DisplayObject;
public var btn_blurOn:DisplayObject;
public var btn_back:DisplayObject;
public var flip:DisplayObject;
public var head:DisplayObject;
public var btn_resume:DisplayObject;
public var leaderboard:DisplayObject;
public var skier:DisplayObject;
}
}//package
Section 92
//SceneryMgr_tree2C (SceneryMgr_tree2C)
package {
import flash.display.*;
import mx.core.*;
public class SceneryMgr_tree2C extends SpriteAsset {
public var txt_timeList:DisplayObject;
public var txt_score:DisplayObject;
public var popup1:DisplayObject;
public var mountains:DisplayObject;
public var popup3:DisplayObject;
public var txt_bonus:DisplayObject;
public var trees:DisplayObject;
public var btn_twitter:DisplayObject;
public var btn_next:DisplayObject;
public var btn_leaderboards:DisplayObject;
public var credits:DisplayObject;
public var options:DisplayObject;
public var txt_mult:DisplayObject;
public var btn_sfxOn:DisplayObject;
public var btn_aaOn:DisplayObject;
public var btn_bgmOn:DisplayObject;
public var txt_bonusCopy:DisplayObject;
public var popup2:DisplayObject;
public var skierFalling:DisplayObject;
public var btn_restart:DisplayObject;
public var btn_prev:DisplayObject;
public var btn_sponsor:DisplayObject;
public var tips:DisplayObject;
public var txt_meters:DisplayObject;
public var btn_stump:DisplayObject;
public var txt_time:DisplayObject;
public var txt_scoreList:DisplayObject;
public var btn_facebook:DisplayObject;
public var popup:DisplayObject;
public var btn_options:DisplayObject;
public var txt_mph:DisplayObject;
public var clouds:DisplayObject;
public var share:DisplayObject;
public var btn_mikengreg:DisplayObject;
public var btn_mobile:DisplayObject;
public var board:DisplayObject;
public var btn_blurOn:DisplayObject;
public var btn_back:DisplayObject;
public var flip:DisplayObject;
public var head:DisplayObject;
public var btn_resume:DisplayObject;
public var leaderboard:DisplayObject;
public var skier:DisplayObject;
}
}//package
Section 93
//SceneryMgr_tree3C (SceneryMgr_tree3C)
package {
import flash.display.*;
import mx.core.*;
public class SceneryMgr_tree3C extends SpriteAsset {
public var txt_timeList:DisplayObject;
public var txt_score:DisplayObject;
public var popup1:DisplayObject;
public var mountains:DisplayObject;
public var popup3:DisplayObject;
public var txt_bonus:DisplayObject;
public var trees:DisplayObject;
public var btn_twitter:DisplayObject;
public var btn_next:DisplayObject;
public var btn_leaderboards:DisplayObject;
public var credits:DisplayObject;
public var options:DisplayObject;
public var txt_mult:DisplayObject;
public var btn_sfxOn:DisplayObject;
public var btn_aaOn:DisplayObject;
public var btn_bgmOn:DisplayObject;
public var txt_bonusCopy:DisplayObject;
public var popup2:DisplayObject;
public var skierFalling:DisplayObject;
public var btn_restart:DisplayObject;
public var btn_prev:DisplayObject;
public var btn_sponsor:DisplayObject;
public var tips:DisplayObject;
public var txt_meters:DisplayObject;
public var btn_stump:DisplayObject;
public var txt_time:DisplayObject;
public var txt_scoreList:DisplayObject;
public var btn_facebook:DisplayObject;
public var popup:DisplayObject;
public var btn_options:DisplayObject;
public var txt_mph:DisplayObject;
public var clouds:DisplayObject;
public var share:DisplayObject;
public var btn_mikengreg:DisplayObject;
public var btn_mobile:DisplayObject;
public var board:DisplayObject;
public var btn_blurOn:DisplayObject;
public var btn_back:DisplayObject;
public var flip:DisplayObject;
public var head:DisplayObject;
public var btn_resume:DisplayObject;
public var leaderboard:DisplayObject;
public var skier:DisplayObject;
}
}//package
Section 94
//SceneryMgr_tree4C (SceneryMgr_tree4C)
package {
import flash.display.*;
import mx.core.*;
public class SceneryMgr_tree4C extends SpriteAsset {
public var txt_timeList:DisplayObject;
public var txt_score:DisplayObject;
public var popup1:DisplayObject;
public var mountains:DisplayObject;
public var popup3:DisplayObject;
public var txt_bonus:DisplayObject;
public var trees:DisplayObject;
public var btn_twitter:DisplayObject;
public var btn_next:DisplayObject;
public var btn_leaderboards:DisplayObject;
public var credits:DisplayObject;
public var options:DisplayObject;
public var txt_mult:DisplayObject;
public var btn_sfxOn:DisplayObject;
public var btn_aaOn:DisplayObject;
public var btn_bgmOn:DisplayObject;
public var txt_bonusCopy:DisplayObject;
public var popup2:DisplayObject;
public var skierFalling:DisplayObject;
public var btn_restart:DisplayObject;
public var btn_prev:DisplayObject;
public var btn_sponsor:DisplayObject;
public var tips:DisplayObject;
public var txt_meters:DisplayObject;
public var btn_stump:DisplayObject;
public var txt_time:DisplayObject;
public var txt_scoreList:DisplayObject;
public var btn_facebook:DisplayObject;
public var popup:DisplayObject;
public var btn_options:DisplayObject;
public var txt_mph:DisplayObject;
public var clouds:DisplayObject;
public var share:DisplayObject;
public var btn_mikengreg:DisplayObject;
public var btn_mobile:DisplayObject;
public var board:DisplayObject;
public var btn_blurOn:DisplayObject;
public var btn_back:DisplayObject;
public var flip:DisplayObject;
public var head:DisplayObject;
public var btn_resume:DisplayObject;
public var leaderboard:DisplayObject;
public var skier:DisplayObject;
}
}//package
Section 95
//Scorekeeper (Scorekeeper)
package {
import flash.events.*;
import flash.display.*;
import flash.system.*;
import flash.utils.*;
import General.*;
public class Scorekeeper extends Sprite {
public var tunnelBonusScore:int;// = 0
public var lastTime:uint;
public var bonusHudCounter:int;// = 0
public var hud_pu_basicC:Class;
public var tunnelDone:Boolean;// = false
public var tunnelBonusThing;
public var bonusHuds:Array;
public var jumpPopup;
public var cumulHighJumpPoints:int;// = 0
public var runner:HeightmapRunner;
public var starsEarned:int;// = 0
public var hud_scoreC:Class;
public var jumpedGates:int;// = 0
public var perfectTunnels:int;// = 0
public var hud_pu_starC:Class;
private var score__m:int;// = 0
public var bonusPopups:Array;
public var hud_score;
public var hud_bonusC:Class;
public var cumulBuzzPoints:int;// = 0
public var starGo:Boolean;// = false
private var mult__m:Number;// = 1
public var hud_pu_jumpC:Class;
public var topMulti:Number;// = 0
public var topSpeed:int;// = 0
public var multTimer:int;// = 0
public var killgatesDodged:int;// = 0
public var starPopup;
public var greatHighJumps:int;// = 0
public function Scorekeeper(_arg1:HeightmapRunner){
hud_scoreC = Scorekeeper_hud_scoreC;
hud_bonusC = Scorekeeper_hud_bonusC;
hud_pu_basicC = Scorekeeper_hud_pu_basicC;
hud_pu_jumpC = Scorekeeper_hud_pu_jumpC;
hud_pu_starC = Scorekeeper_hud_pu_starC;
super();
runner = _arg1;
bonusHuds = new Array();
bonusPopups = new Array();
hud_score = new hud_scoreC();
addChild(hud_score);
hud_score.txt_mult.text = "1";
hud_score.txt_mph.text = "6";
hud_score.txt_score.text = "0";
jumpPopup = new hud_pu_jumpC();
MainRef.ref.jumpScoreLayer.addChild(jumpPopup);
jumpPopup.gotoAndStop(1);
starPopup = new hud_pu_starC();
MainRef.ref.jumpScoreLayer.addChild(starPopup);
starPopup.gotoAndStop(1);
starPopup.x = -400;
visible = false;
lastTime = getTimer();
this.mouseEnabled = false;
this.mouseChildren = false;
}
public function doubleTrick():void{
mult = (mult + 0.5);
var _local1:int = int(((5 * mult) * Math.floor(MainRef.ref.redball.speed)));
score = (score + _local1);
resetMultTimer();
}
public function enable():void{
visible = true;
}
public function jumpScore(_arg1:Number):void{
if (jumpPopup.currentFrame != 1){
return;
};
if (starPopup.currentFrame > 1){
starGo = true;
};
var _local2:int = Math.floor((_arg1 / 180));
trace(("GREWAT HIGH JOUMPS == " + greatHighJumps));
if (_local2 > 0){
if (_local2 <= 1){
jumpPopup.popup1.txt_bonus.text = 1;
jumpPopup.popup2.txt_bonus.text = 1;
jumpPopup.popup3.txt_bonus.text = 1;
} else {
if (_local2 >= 9){
jumpPopup.popup1.txt_bonus.text = 9;
jumpPopup.popup2.txt_bonus.text = 9;
jumpPopup.popup3.txt_bonus.text = 9;
} else {
if (_local2 >= 7){
jumpPopup.popup1.txt_bonus.text = (_local2 + Math.floor((Math.random() * 2)));
jumpPopup.popup2.txt_bonus.text = (_local2 + Math.floor((Math.random() * 1)));
jumpPopup.popup3.txt_bonus.text = (_local2 + Math.floor((Math.random() * 2)));
} else {
jumpPopup.popup1.txt_bonus.text = (_local2 + Math.floor((Math.random() * 3)));
jumpPopup.popup2.txt_bonus.text = (_local2 + Math.floor((Math.random() * 2)));
jumpPopup.popup3.txt_bonus.text = (_local2 + Math.floor((Math.random() * 3)));
};
};
};
if (_local2 >= 5){
SoundMgr.playSound("cheer1");
};
if (_local2 >= 8){
SoundMgr.playSound("cheer2");
};
jumpPopup.gotoAndPlay(2);
TipManager.Signal_offscreenJump(jumpedGates);
gotBonus("High Jump", (_local2 * _local2), 16759385);
};
jumpedGates = 0;
}
public function get score():int{
return ((score__m + 13));
}
public function tripleTrick():void{
mult = (mult + 1);
var _local1:int = int(((10 * mult) * Math.floor(MainRef.ref.redball.speed)));
score = (score + _local1);
resetMultTimer();
}
public function jumpGate():void{
if (MainRef.ref.redball.grounded){
return;
};
jumpedGates++;
resetMultTimer();
mult = (mult + (jumpedGates * 0.25));
starScore(jumpedGates);
starsEarned++;
}
public function tunnelGateMiss():void{
}
public function set score(_arg1:int):void{
score__m = (_arg1 - 13);
}
public function crossGate():void{
resetMultTimer();
if (!MainRef.ref.redball.grounded){
mult = (mult + 2);
MainRef.ref.scorekeeper.gotBonus("Buzz the Tower", 30, 12049702);
} else {
mult = (mult + 1);
score = (score + int(((5 * mult) * Math.floor(MainRef.ref.redball.speed))));
};
}
public function hudTextUpdate():void{
hud_score.txt_mult.text = Math.floor(mult).toString();
hud_score.txt_mph.text = Math.floor(MainRef.ref.redball.speed).toString();
hud_score.txt_score.text = Util.CommaFormat(score).toString();
}
public function spawnTunnelBonusThing():void{
tunnelDone = false;
tunnelBonusThing = new hud_pu_basicC();
tunnelBonusScore = 0;
tunnelBonusThing.popup.txt_bonus.textColor = 2461662;
tunnelBonusThing.popup.txt_bonus.text = ("+" + Util.CommaFormat(tunnelBonusScore));
addChild(tunnelBonusThing);
}
public function get mult():Number{
return ((mult__m - 2));
}
public function clearBonusPopups():void{
starGo = false;
while (bonusPopups.length > 0) {
removeChild(bonusPopups.shift());
};
if (tunnelBonusThing != null){
tunnelBonusThing.gotoAndStop(1);
};
}
public function tunnelComplete(_arg1:int, _arg2:int):void{
if (_arg1 == _arg2){
MainRef.ref.redball.boostTimer = (MainRef.ref.redball.boostTimer + 60);
mult = (mult + 5);
resetMultTimer();
gotBonus("Perfect Tunnel", ((tunnelBonusScore * mult) * 0.3), 2461662, false, false);
tunnelBonusThing.popup.txt_bonus.text = ("+" + Util.CommaFormat(((tunnelBonusScore * mult) * 0.3)));
} else {
gotBonus("Tunnel Complete", tunnelBonusScore, 2461662, false, false);
};
tunnelDone = true;
}
public function update():void{
var _local2:int;
var _local1:uint = (getTimer() - lastTime);
lastTime = getTimer();
if (MainRef.ref.paused){
_local1 = 0;
};
if (jumpPopup.parent == null){
MainRef.ref.jumpScoreLayer.addChild(jumpPopup);
};
if (starPopup.parent == null){
MainRef.ref.jumpScoreLayer.addChild(starPopup);
};
if (mult > topMulti){
topMulti = mult;
};
if (MainRef.ref.redball.speed > topSpeed){
topSpeed = MainRef.ref.redball.speed;
};
if (multTimer > 0){
multTimer = (multTimer - _local1);
if (multTimer <= 0){
multTimer = 0;
mult = 1;
};
};
if (MainRef.ref.gameStarted){
score = (score + (((mult * MainRef.ref.scrollSpeed) * _local1) / 30));
};
hudTextUpdate();
if (bonusHuds.length > 0){
bonusHudCounter = (bonusHudCounter - _local1);
if (bonusHudCounter <= 0){
removeChild(bonusHuds.shift());
bonusHudCounter = 2000;
};
};
if ((((bonusHuds.length > 8)) && ((bonusHudCounter > 100)))){
bonusHudCounter = 100;
};
_local2 = 0;
while (_local2 < bonusHuds.length) {
bonusHuds[_local2].y = (bonusHuds[_local2].y + ((((_local2 * bonusHuds[_local2].height) + 35) - bonusHuds[_local2].y) * 0.1));
_local2++;
};
_local2 = 0;
while (_local2 < bonusPopups.length) {
bonusPopups[_local2].x = (runner.x - 850);
bonusPopups[_local2].y = (runner.y - 120);
if (bonusPopups[_local2].y < 50){
bonusPopups[_local2].y = 50;
};
if (bonusPopups[_local2].currentFrame == bonusPopups[_local2].totalFrames){
removeChild(bonusPopups[_local2]);
bonusPopups.splice(_local2, 1);
_local2--;
};
_local2++;
};
if (jumpPopup.currentFrame == 1){
jumpPopup.gotoAndStop(1);
};
if (starPopup.currentFrame == 1){
starGo = false;
starPopup.gotoAndStop(1);
};
if (starPopup.currentLabel == "hold"){
if (!starGo){
starPopup.stop();
} else {
starPopup.play();
};
};
starPopup.x = (runner.x - 1050);
starPopup.y = (runner.y - 100);
if (starPopup.x < -650){
starPopup.x = -650;
};
if (starPopup.y < 75){
starPopup.y = 75;
};
if (tunnelBonusThing){
tunnelBonusThing.x = (runner.x - 850);
tunnelBonusThing.y = (runner.y - 120);
if (tunnelBonusThing.currentLabel == "hold"){
tunnelBonusThing.stop();
};
if (tunnelDone){
tunnelBonusThing.nextFrame();
};
if (tunnelBonusThing.currentFrame == tunnelBonusThing.totalFrames){
tunnelBonusThing.parent.removeChild(tunnelBonusThing);
tunnelBonusThing = null;
};
};
}
public function crossTunnelGate():void{
mult = (mult + 0.25);
resetMultTimer();
updateTunnelBonusScore(((1 * mult) * Math.floor(MainRef.ref.redball.speed)));
}
public function popupBonus(_arg1:int, _arg2:uint, _arg3:Boolean=true):void{
if (_arg3){
_arg1 = (_arg1 * (MainRef.ref.scrollSpeed * mult));
};
var _local4:* = new hud_pu_basicC();
_local4.popup.txt_bonus.text = ("+" + Util.CommaFormat(_arg1));
_local4.popup.txt_bonus.textColor = _arg2;
bonusPopups.push(_local4);
addChild(_local4);
_local4.x = (runner.x - 850);
_local4.y = (runner.y - 120);
}
public function perfectTunnel():void{
score = (score + int((40 * mult)));
perfectTunnels++;
}
public function trick():void{
mult = (mult + 0.25);
var _local1:int = int(((2 * mult) * Math.floor(MainRef.ref.redball.speed)));
score = (score + _local1);
resetMultTimer();
}
public function resetMultTimer():void{
multTimer = 3000;
}
public function set mult(_arg1:Number):void{
mult__m = (_arg1 + 2);
}
public function disable():void{
var _local1:*;
starPopup.gotoAndStop(1);
jumpPopup.gotoAndStop(1);
for each (_local1 in bonusHuds) {
if (_local1.parent){
_local1.parent.removeChild(_local1);
};
};
bonusHuds = [];
visible = false;
}
public function starScore(_arg1:int):void{
if (starPopup.currentFrame == 1){
starPopup.gotoAndPlay(2);
};
starPopup.popup.gotoAndStop(_arg1.toString());
}
public function gotBonus(_arg1:String, _arg2:int, _arg3:uint, _arg4:Boolean=true, _arg5:Boolean=true):void{
if (_arg5){
popupBonus(_arg2, _arg3);
};
if (_arg4){
_arg2 = (_arg2 * (MainRef.ref.scrollSpeed * mult));
};
if (bonusHudCounter < 0){
bonusHudCounter = 2000;
};
if (bonusHuds.length > 6){
removeChild(bonusHuds.shift());
};
var _local6:* = new hud_bonusC();
bonusHuds.push(_local6);
_local6.txt_bonus.text = ("+" + Util.CommaFormat(_arg2));
_local6.txt_bonus.textColor = _arg3;
_local6.txt_bonusCopy.text = _arg1;
_local6.x = 90;
addChildAt(_local6, 0);
score = (score + _arg2);
if (_arg1 == "High Jump"){
if (greatHighJumps < _arg2){
greatHighJumps = _arg2;
};
cumulHighJumpPoints = (cumulHighJumpPoints + _arg2);
};
if (_arg1 == "Buzz the Tower"){
cumulBuzzPoints = (cumulBuzzPoints + _arg2);
};
}
public function updateTunnelBonusScore(_arg1:int):void{
if (tunnelBonusThing == null){
spawnTunnelBonusThing();
};
tunnelBonusScore = (tunnelBonusScore + _arg1);
tunnelBonusThing.popup.txt_bonus.text = ("+" + Util.CommaFormat(tunnelBonusScore));
}
public function missGate():void{
mult = (mult * 0.5);
if (mult < 1){
mult = 1;
};
multTimer = (multTimer * 0.5);
runner.scarf.flashTimer = 500;
}
}
}//package
Section 96
//Scorekeeper_hud_bonusC (Scorekeeper_hud_bonusC)
package {
import flash.display.*;
import mx.core.*;
public class Scorekeeper_hud_bonusC extends SpriteAsset {
public var txt_scoreList:DisplayObject;
public var txt_score:DisplayObject;
public var popup:DisplayObject;
public var popup1:DisplayObject;
public var popup3:DisplayObject;
public var popup2:DisplayObject;
public var txt_bonus:DisplayObject;
public var btn_options:DisplayObject;
public var txt_mph:DisplayObject;
public var btn_leaderboards:DisplayObject;
public var btn_sfxOn:DisplayObject;
public var txt_mult:DisplayObject;
public var btn_bgmOn:DisplayObject;
public var txt_bonusCopy:DisplayObject;
public var board:DisplayObject;
public var btn_blurOn:DisplayObject;
public var btn_back:DisplayObject;
public var btn_resume:DisplayObject;
public var btn_aaOn:DisplayObject;
public var btn_sponsor:DisplayObject;
public var txt_timeList:DisplayObject;
public var btn_restart:DisplayObject;
public var btn_mobile:DisplayObject;
}
}//package
Section 97
//Scorekeeper_hud_pu_basicC (Scorekeeper_hud_pu_basicC)
package {
import flash.display.*;
import mx.core.*;
public class Scorekeeper_hud_pu_basicC extends MovieClipAsset {
public var txt_timeList:DisplayObject;
public var txt_scoreList:DisplayObject;
public var txt_bonus:DisplayObject;
public var btn_leaderboards:DisplayObject;
public var btn_sfxOn:DisplayObject;
public var btn_aaOn:DisplayObject;
public var btn_bgmOn:DisplayObject;
public var btn_mobile:DisplayObject;
public var board:DisplayObject;
public var btn_blurOn:DisplayObject;
public var btn_back:DisplayObject;
public var btn_restart:DisplayObject;
public var btn_resume:DisplayObject;
public var popup:DisplayObject;
public var btn_sponsor:DisplayObject;
public var btn_options:DisplayObject;
}
}//package
Section 98
//Scorekeeper_hud_pu_jumpC (Scorekeeper_hud_pu_jumpC)
package {
import flash.display.*;
import mx.core.*;
public class Scorekeeper_hud_pu_jumpC extends MovieClipAsset {
public var txt_scoreList:DisplayObject;
public var txt_score:DisplayObject;
public var popup:DisplayObject;
public var popup1:DisplayObject;
public var popup3:DisplayObject;
public var popup2:DisplayObject;
public var txt_bonus:DisplayObject;
public var btn_options:DisplayObject;
public var txt_mph:DisplayObject;
public var btn_leaderboards:DisplayObject;
public var btn_sfxOn:DisplayObject;
public var btn_aaOn:DisplayObject;
public var txt_mult:DisplayObject;
public var btn_bgmOn:DisplayObject;
public var btn_mobile:DisplayObject;
public var board:DisplayObject;
public var btn_blurOn:DisplayObject;
public var btn_back:DisplayObject;
public var btn_resume:DisplayObject;
public var btn_sponsor:DisplayObject;
public var txt_timeList:DisplayObject;
public var btn_restart:DisplayObject;
}
}//package
Section 99
//Scorekeeper_hud_pu_starC (Scorekeeper_hud_pu_starC)
package {
import flash.display.*;
import mx.core.*;
public class Scorekeeper_hud_pu_starC extends MovieClipAsset {
public var txt_timeList:DisplayObject;
public var txt_scoreList:DisplayObject;
public var btn_leaderboards:DisplayObject;
public var btn_sfxOn:DisplayObject;
public var btn_aaOn:DisplayObject;
public var btn_bgmOn:DisplayObject;
public var btn_mobile:DisplayObject;
public var board:DisplayObject;
public var btn_blurOn:DisplayObject;
public var btn_back:DisplayObject;
public var btn_restart:DisplayObject;
public var btn_resume:DisplayObject;
public var popup:DisplayObject;
public var btn_sponsor:DisplayObject;
public var btn_options:DisplayObject;
}
}//package
Section 100
//Scorekeeper_hud_scoreC (Scorekeeper_hud_scoreC)
package {
import flash.display.*;
import mx.core.*;
public class Scorekeeper_hud_scoreC extends SpriteAsset {
public var txt_scoreList:DisplayObject;
public var txt_score:DisplayObject;
public var popup:DisplayObject;
public var txt_bonus:DisplayObject;
public var btn_options:DisplayObject;
public var txt_mph:DisplayObject;
public var btn_leaderboards:DisplayObject;
public var btn_sfxOn:DisplayObject;
public var btn_aaOn:DisplayObject;
public var txt_mult:DisplayObject;
public var btn_bgmOn:DisplayObject;
public var btn_mobile:DisplayObject;
public var board:DisplayObject;
public var btn_blurOn:DisplayObject;
public var btn_back:DisplayObject;
public var btn_restart:DisplayObject;
public var btn_resume:DisplayObject;
public var btn_sponsor:DisplayObject;
public var txt_timeList:DisplayObject;
}
}//package
Section 101
//Scroller (Scroller)
package {
import flash.display.*;
import flash.filters.*;
public class Scroller extends Sprite {
public var incomingGraphic;
public var killflag:Boolean;// = false
public var runner:HeightmapRunner;
public var blurX:Number;
public var blurY:Number;
public var canvas:Sprite;
public static var blurMult:Number = -1;
public function Scroller(_arg1:HeightmapRunner, _arg2:Sprite){
if (blurMult == -1){
blurMult = MainRef.ref.blurMult;
};
canvas = _arg2;
runner = _arg1;
}
public function update():void{
x = (x - int(runner.speed));
if (x < -((40 + width))){
killflag = true;
};
setBlur(((runner.speed * runner.speed) * blurMult), 0);
if (((!(parent)) && ((x < 900)))){
canvas.addChild(this);
};
}
public function setBlur(_arg1:Number, _arg2:Number):void{
if (MainRef.ref.blurMode){
if (parent == null){
return;
};
if ((_arg1 - (width * 0.5)) > 1000){
return;
};
if (_arg1 > 50){
_arg1 = 50;
};
_arg1 = Math.floor(_arg1);
_arg2 = 0;
if (((!((blurX == _arg1))) || (!((blurY == _arg2))))){
filters = [new BlurFilter(_arg1, _arg2)];
blurX = _arg1;
blurY = _arg2;
};
};
}
}
}//package
Section 102
//Solipskier (Solipskier)
package {
import flash.events.*;
import flash.display.*;
import General.*;
import SWFStats.*;
import flash.utils.*;
public class Solipskier extends MovieClip {
public var preloader;
public var input:Input;
public var preloaderC:Class;
public function Solipskier(){
preloaderC = Solipskier_preloaderC;
super();
var _local1:Array = stage.loaderInfo.url.split("://");
var _local2:Array = _local1[1].split("/");
Log.View(376, "42e427e1-c618-444d-9853-5054d6f6c6f5", root.loaderInfo.loaderURL);
addEventListener(Event.ENTER_FRAME, enterFrame);
preloader = new preloaderC();
addChild(preloader);
preloader.gotoAndStop(1);
}
public function enterFrame(_arg1:Event):void{
preloader.gotoAndStop(Math.round(((stage.loaderInfo.bytesLoaded / stage.loaderInfo.bytesTotal) * 100)));
if (currentLabel == "start"){
removeChild(preloader);
addChild(new (getDefinitionByName("Main")));
removeEventListener(Event.ENTER_FRAME, enterFrame);
};
}
}
}//package
Section 103
//Solipskier_preloaderC (Solipskier_preloaderC)
package {
import mx.core.*;
public class Solipskier_preloaderC extends MovieClipAsset {
}
}//package
Section 104
//SoundMgr (SoundMgr)
package {
import flash.display.*;
import flash.system.*;
import General.*;
import flash.media.*;
public class SoundMgr {
public static var sfx_gateMissC:Class = SoundMgr_sfx_gateMissC;
public static var effects:Array;
public static var sfx_tunnelHitC:Class = SoundMgr_sfx_tunnelHitC;
public static var bgm_windSoundC:Class = SoundMgr_bgm_windSoundC;
public static var sfx_jumpCheer2C:Class = SoundMgr_sfx_jumpCheer2C;
public static var maxInstance:int = 8;
public static var musicChannel:SoundChannel;
public static var sfx_skiNoiseC:Class = SoundMgr_sfx_skiNoiseC;
public static var fxVol:Number;
public static var sfx_jumpTrick:Class = SoundMgr_sfx_jumpTrick;
public static var ad:ApplicationDomain;
public static var sfx_recordScratch:Class = SoundMgr_sfx_recordScratch;
public static var sfx_gatePickupC:Class = SoundMgr_sfx_gatePickupC;
public static var sounds:Array;
public static var bgm_chopinEtude:Class = SoundMgr_bgm_chopinEtude;
public static var sfx_jumpCheer1:Class = SoundMgr_sfx_jumpCheer1;
public static var sfx_jumpCheer2:Class = SoundMgr_sfx_jumpCheer2;
public static var sfx_jumpLandingC:Class = SoundMgr_sfx_jumpLandingC;
public static var bgm_speedMetal:Class = SoundMgr_bgm_speedMetal;
public static var sfx_gateKillC:Class = SoundMgr_sfx_gateKillC;
public static var sfx_speedBoostC:Class = SoundMgr_sfx_speedBoostC;
public static var musicVol:Number;
public static var sfx_jumpCheer1C:Class = SoundMgr_sfx_jumpCheer1C;
public static var musics:Array;
public static function setFXVolume(_arg1:Number):void{
var _local2:SoundEffect;
for each (_local2 in effects) {
if ((((_arg1 == 1)) && ((_local2.handle == "windSound")))){
trace("no");
} else {
_local2.setVol(_arg1);
};
};
fxVol = _arg1;
}
public static function initialize(_arg1:ApplicationDomain){
var _local2:SoundEffect;
ad = _arg1;
sounds = new Array();
sounds["gateKill"] = new SoundEffectEmbeded("gateKill", sfx_gateKillC, 10, 10);
sounds["gateMiss"] = new SoundEffectEmbeded("gateMiss", sfx_gateMissC, 10, 10);
sounds["gatePickup"] = new SoundEffectEmbeded("gatePickup", sfx_gatePickupC, 10, 10);
sounds["skiNoise"] = new SoundEffectEmbeded("skiNoise", sfx_skiNoiseC, 10, 10, true);
sounds["speedBoost"] = new SoundEffectEmbeded("speedBoost", sfx_speedBoostC, 10, 10);
sounds["windSound"] = new SoundEffectEmbeded("windSound", bgm_windSoundC, 10, 10, true);
sounds["jumpLanding"] = new SoundEffectEmbeded("jumpLanding", sfx_jumpLandingC, 10, 10);
sounds["jumpCheer1"] = new SoundEffectEmbeded("jumpCheer1", sfx_jumpCheer1C, 10, 10);
sounds["jumpCheer2"] = new SoundEffectEmbeded("jumpCheer2", sfx_jumpCheer2C, 10, 10);
sounds["tunnelHit"] = new SoundEffectEmbeded("tunnelHit", sfx_tunnelHitC, 10, 10);
sounds["bgmChopin"] = new SoundEffectEmbeded("bgmChopin", bgm_chopinEtude, 10, 10, true);
sounds["bgmMetal"] = new SoundEffectEmbeded("bgmMetal", bgm_speedMetal, 10, 10, true);
sounds["recordScratch"] = new SoundEffectEmbeded("recordScratch", sfx_recordScratch, 10, 10);
sounds["cheer1"] = new SoundEffectEmbeded("cheer1", sfx_jumpCheer1, 10, 10);
sounds["cheer2"] = new SoundEffectEmbeded("cheer2", sfx_jumpCheer2, 10, 10);
sounds["jumpTrick"] = new SoundEffectEmbeded("jumpTrick", sfx_jumpTrick, 10, 10);
musicChannel = new SoundChannel();
effects = new Array();
effects.push(sounds["gateKill"]);
effects.push(sounds["gateMiss"]);
effects.push(sounds["gatePickup"]);
effects.push(sounds["skiNoise"]);
effects.push(sounds["speedBoost"]);
effects.push(sounds["windSound"]);
effects.push(sounds["jumpLanding"]);
effects.push(sounds["jumpCheer1"]);
effects.push(sounds["jumpCheer2"]);
effects.push(sounds["tunnelHit"]);
effects.push(sounds["recordScratch"]);
effects.push(sounds["cheer1"]);
effects.push(sounds["cheer2"]);
effects.push(sounds["jumpTrick"]);
musics = new Array();
musics.push(sounds["bgmMetal"]);
musics.push(sounds["bgmChopin"]);
for each (_local2 in musics) {
_local2.fx = false;
};
musicVol = (fxVol = 1);
}
public static function stopSound(_arg1:String):void{
if (sounds[_arg1] != null){
sounds[_arg1].stop();
};
}
public static function playSound(_arg1:String, _arg2:Number=1):void{
if (sounds[_arg1] != null){
if (_arg1.match("music")){
sounds[_arg1].play(true);
} else {
if (sounds[_arg1].fx){
sounds[_arg1].play(false, (_arg2 * fxVol));
} else {
sounds[_arg1].play(false, (_arg2 * musicVol));
};
};
if (sounds[_arg1].fx){
sounds[_arg1].setVol(fxVol);
} else {
sounds[_arg1].setVol(musicVol);
};
};
}
public static function setMusicVolume(_arg1:Number):void{
var _local2:SoundEffect;
for each (_local2 in musics) {
_local2.setVol(_arg1);
};
musicVol = _arg1;
}
}
}//package
Section 105
//SoundMgr_bgm_chopinEtude (SoundMgr_bgm_chopinEtude)
package {
import flash.display.*;
import mx.core.*;
public class SoundMgr_bgm_chopinEtude extends SoundAsset {
public var txt_score:DisplayObject;
public var popup1:DisplayObject;
public var popup3:DisplayObject;
public var popup2:DisplayObject;
public var txt_bonus:DisplayObject;
public var btn_leaderboards:DisplayObject;
public var txt_mult:DisplayObject;
public var btn_sfxOn:DisplayObject;
public var btn_aaOn:DisplayObject;
public var btn_bgmOn:DisplayObject;
public var txt_bonusCopy:DisplayObject;
public var popup:DisplayObject;
public var btn_restart:DisplayObject;
public var btn_sponsor:DisplayObject;
public var txt_meters:DisplayObject;
public var txt_scoreList:DisplayObject;
public var btn_options:DisplayObject;
public var txt_mph:DisplayObject;
public var btn_mobile:DisplayObject;
public var board:DisplayObject;
public var head:DisplayObject;
public var btn_blurOn:DisplayObject;
public var btn_back:DisplayObject;
public var flip:DisplayObject;
public var btn_resume:DisplayObject;
public var txt_timeList:DisplayObject;
}
}//package
Section 106
//SoundMgr_bgm_speedMetal (SoundMgr_bgm_speedMetal)
package {
import flash.display.*;
import mx.core.*;
public class SoundMgr_bgm_speedMetal extends SoundAsset {
public var txt_score:DisplayObject;
public var popup1:DisplayObject;
public var popup3:DisplayObject;
public var popup2:DisplayObject;
public var txt_bonus:DisplayObject;
public var btn_leaderboards:DisplayObject;
public var txt_mult:DisplayObject;
public var btn_sfxOn:DisplayObject;
public var btn_aaOn:DisplayObject;
public var btn_bgmOn:DisplayObject;
public var txt_bonusCopy:DisplayObject;
public var popup:DisplayObject;
public var btn_restart:DisplayObject;
public var btn_sponsor:DisplayObject;
public var txt_meters:DisplayObject;
public var txt_scoreList:DisplayObject;
public var btn_options:DisplayObject;
public var txt_mph:DisplayObject;
public var btn_mobile:DisplayObject;
public var board:DisplayObject;
public var head:DisplayObject;
public var btn_blurOn:DisplayObject;
public var btn_back:DisplayObject;
public var flip:DisplayObject;
public var btn_resume:DisplayObject;
public var txt_timeList:DisplayObject;
}
}//package
Section 107
//SoundMgr_bgm_windSoundC (SoundMgr_bgm_windSoundC)
package {
import flash.display.*;
import mx.core.*;
public class SoundMgr_bgm_windSoundC extends SoundAsset {
public var txt_score:DisplayObject;
public var popup1:DisplayObject;
public var popup3:DisplayObject;
public var popup2:DisplayObject;
public var txt_bonus:DisplayObject;
public var btn_leaderboards:DisplayObject;
public var txt_mult:DisplayObject;
public var btn_sfxOn:DisplayObject;
public var btn_aaOn:DisplayObject;
public var btn_bgmOn:DisplayObject;
public var txt_bonusCopy:DisplayObject;
public var popup:DisplayObject;
public var btn_restart:DisplayObject;
public var btn_sponsor:DisplayObject;
public var txt_meters:DisplayObject;
public var txt_scoreList:DisplayObject;
public var btn_options:DisplayObject;
public var txt_mph:DisplayObject;
public var btn_mobile:DisplayObject;
public var board:DisplayObject;
public var head:DisplayObject;
public var btn_blurOn:DisplayObject;
public var btn_back:DisplayObject;
public var flip:DisplayObject;
public var btn_resume:DisplayObject;
public var txt_timeList:DisplayObject;
}
}//package
Section 108
//SoundMgr_sfx_gateKillC (SoundMgr_sfx_gateKillC)
package {
import mx.core.*;
public class SoundMgr_sfx_gateKillC extends SoundAsset {
}
}//package
Section 109
//SoundMgr_sfx_gateMissC (SoundMgr_sfx_gateMissC)
package {
import flash.display.*;
import mx.core.*;
public class SoundMgr_sfx_gateMissC extends SoundAsset {
public var txt_score:DisplayObject;
public var popup1:DisplayObject;
public var popup3:DisplayObject;
public var popup2:DisplayObject;
public var txt_bonus:DisplayObject;
public var btn_leaderboards:DisplayObject;
public var txt_mult:DisplayObject;
public var btn_sfxOn:DisplayObject;
public var btn_aaOn:DisplayObject;
public var btn_bgmOn:DisplayObject;
public var txt_bonusCopy:DisplayObject;
public var popup:DisplayObject;
public var btn_restart:DisplayObject;
public var btn_sponsor:DisplayObject;
public var txt_meters:DisplayObject;
public var txt_scoreList:DisplayObject;
public var btn_options:DisplayObject;
public var txt_mph:DisplayObject;
public var btn_mobile:DisplayObject;
public var board:DisplayObject;
public var head:DisplayObject;
public var btn_blurOn:DisplayObject;
public var btn_back:DisplayObject;
public var flip:DisplayObject;
public var btn_resume:DisplayObject;
public var txt_timeList:DisplayObject;
}
}//package
Section 110
//SoundMgr_sfx_gatePickupC (SoundMgr_sfx_gatePickupC)
package {
import flash.display.*;
import mx.core.*;
public class SoundMgr_sfx_gatePickupC extends SoundAsset {
public var txt_score:DisplayObject;
public var popup1:DisplayObject;
public var popup3:DisplayObject;
public var popup2:DisplayObject;
public var txt_bonus:DisplayObject;
public var btn_leaderboards:DisplayObject;
public var txt_mult:DisplayObject;
public var btn_sfxOn:DisplayObject;
public var btn_aaOn:DisplayObject;
public var btn_bgmOn:DisplayObject;
public var txt_bonusCopy:DisplayObject;
public var popup:DisplayObject;
public var btn_restart:DisplayObject;
public var btn_sponsor:DisplayObject;
public var txt_meters:DisplayObject;
public var txt_scoreList:DisplayObject;
public var btn_options:DisplayObject;
public var txt_mph:DisplayObject;
public var btn_mobile:DisplayObject;
public var board:DisplayObject;
public var head:DisplayObject;
public var btn_blurOn:DisplayObject;
public var btn_back:DisplayObject;
public var flip:DisplayObject;
public var btn_resume:DisplayObject;
public var txt_timeList:DisplayObject;
}
}//package
Section 111
//SoundMgr_sfx_jumpCheer1 (SoundMgr_sfx_jumpCheer1)
package {
import flash.display.*;
import mx.core.*;
public class SoundMgr_sfx_jumpCheer1 extends SoundAsset {
public var txt_score:DisplayObject;
public var popup1:DisplayObject;
public var popup3:DisplayObject;
public var popup2:DisplayObject;
public var txt_bonus:DisplayObject;
public var btn_leaderboards:DisplayObject;
public var txt_mult:DisplayObject;
public var btn_sfxOn:DisplayObject;
public var btn_aaOn:DisplayObject;
public var btn_bgmOn:DisplayObject;
public var txt_bonusCopy:DisplayObject;
public var popup:DisplayObject;
public var btn_restart:DisplayObject;
public var btn_sponsor:DisplayObject;
public var txt_meters:DisplayObject;
public var txt_scoreList:DisplayObject;
public var btn_options:DisplayObject;
public var txt_mph:DisplayObject;
public var btn_mobile:DisplayObject;
public var board:DisplayObject;
public var head:DisplayObject;
public var btn_blurOn:DisplayObject;
public var btn_back:DisplayObject;
public var flip:DisplayObject;
public var btn_resume:DisplayObject;
public var txt_timeList:DisplayObject;
}
}//package
Section 112
//SoundMgr_sfx_jumpCheer1C (SoundMgr_sfx_jumpCheer1C)
package {
import flash.display.*;
import mx.core.*;
public class SoundMgr_sfx_jumpCheer1C extends SoundAsset {
public var txt_score:DisplayObject;
public var popup1:DisplayObject;
public var popup3:DisplayObject;
public var popup2:DisplayObject;
public var txt_bonus:DisplayObject;
public var btn_leaderboards:DisplayObject;
public var txt_mult:DisplayObject;
public var btn_sfxOn:DisplayObject;
public var btn_aaOn:DisplayObject;
public var btn_bgmOn:DisplayObject;
public var txt_bonusCopy:DisplayObject;
public var popup:DisplayObject;
public var btn_restart:DisplayObject;
public var btn_sponsor:DisplayObject;
public var txt_meters:DisplayObject;
public var txt_scoreList:DisplayObject;
public var btn_options:DisplayObject;
public var txt_mph:DisplayObject;
public var btn_mobile:DisplayObject;
public var board:DisplayObject;
public var head:DisplayObject;
public var btn_blurOn:DisplayObject;
public var btn_back:DisplayObject;
public var flip:DisplayObject;
public var btn_resume:DisplayObject;
public var txt_timeList:DisplayObject;
}
}//package
Section 113
//SoundMgr_sfx_jumpCheer2 (SoundMgr_sfx_jumpCheer2)
package {
import flash.display.*;
import mx.core.*;
public class SoundMgr_sfx_jumpCheer2 extends SoundAsset {
public var txt_score:DisplayObject;
public var popup1:DisplayObject;
public var popup3:DisplayObject;
public var popup2:DisplayObject;
public var txt_bonus:DisplayObject;
public var btn_leaderboards:DisplayObject;
public var txt_mult:DisplayObject;
public var btn_sfxOn:DisplayObject;
public var btn_aaOn:DisplayObject;
public var btn_bgmOn:DisplayObject;
public var txt_bonusCopy:DisplayObject;
public var popup:DisplayObject;
public var btn_restart:DisplayObject;
public var btn_sponsor:DisplayObject;
public var txt_meters:DisplayObject;
public var txt_scoreList:DisplayObject;
public var btn_options:DisplayObject;
public var txt_mph:DisplayObject;
public var btn_mobile:DisplayObject;
public var board:DisplayObject;
public var head:DisplayObject;
public var btn_blurOn:DisplayObject;
public var btn_back:DisplayObject;
public var flip:DisplayObject;
public var btn_resume:DisplayObject;
public var txt_timeList:DisplayObject;
}
}//package
Section 114
//SoundMgr_sfx_jumpCheer2C (SoundMgr_sfx_jumpCheer2C)
package {
import flash.display.*;
import mx.core.*;
public class SoundMgr_sfx_jumpCheer2C extends SoundAsset {
public var txt_score:DisplayObject;
public var popup1:DisplayObject;
public var popup3:DisplayObject;
public var popup2:DisplayObject;
public var txt_bonus:DisplayObject;
public var btn_leaderboards:DisplayObject;
public var txt_mult:DisplayObject;
public var btn_sfxOn:DisplayObject;
public var btn_aaOn:DisplayObject;
public var btn_bgmOn:DisplayObject;
public var txt_bonusCopy:DisplayObject;
public var popup:DisplayObject;
public var btn_restart:DisplayObject;
public var btn_sponsor:DisplayObject;
public var txt_meters:DisplayObject;
public var txt_scoreList:DisplayObject;
public var btn_options:DisplayObject;
public var txt_mph:DisplayObject;
public var btn_mobile:DisplayObject;
public var board:DisplayObject;
public var head:DisplayObject;
public var btn_blurOn:DisplayObject;
public var btn_back:DisplayObject;
public var flip:DisplayObject;
public var btn_resume:DisplayObject;
public var txt_timeList:DisplayObject;
}
}//package
Section 115
//SoundMgr_sfx_jumpLandingC (SoundMgr_sfx_jumpLandingC)
package {
import flash.display.*;
import mx.core.*;
public class SoundMgr_sfx_jumpLandingC extends SoundAsset {
public var txt_score:DisplayObject;
public var popup1:DisplayObject;
public var popup3:DisplayObject;
public var popup2:DisplayObject;
public var txt_bonus:DisplayObject;
public var btn_leaderboards:DisplayObject;
public var txt_mult:DisplayObject;
public var btn_sfxOn:DisplayObject;
public var btn_aaOn:DisplayObject;
public var btn_bgmOn:DisplayObject;
public var txt_bonusCopy:DisplayObject;
public var popup:DisplayObject;
public var btn_restart:DisplayObject;
public var btn_sponsor:DisplayObject;
public var txt_meters:DisplayObject;
public var txt_scoreList:DisplayObject;
public var btn_options:DisplayObject;
public var txt_mph:DisplayObject;
public var btn_mobile:DisplayObject;
public var board:DisplayObject;
public var head:DisplayObject;
public var btn_blurOn:DisplayObject;
public var btn_back:DisplayObject;
public var flip:DisplayObject;
public var btn_resume:DisplayObject;
public var txt_timeList:DisplayObject;
}
}//package
Section 116
//SoundMgr_sfx_jumpTrick (SoundMgr_sfx_jumpTrick)
package {
import flash.display.*;
import mx.core.*;
public class SoundMgr_sfx_jumpTrick extends SoundAsset {
public var txt_score:DisplayObject;
public var popup1:DisplayObject;
public var popup3:DisplayObject;
public var popup2:DisplayObject;
public var txt_bonus:DisplayObject;
public var btn_leaderboards:DisplayObject;
public var txt_mult:DisplayObject;
public var btn_sfxOn:DisplayObject;
public var btn_aaOn:DisplayObject;
public var btn_bgmOn:DisplayObject;
public var txt_bonusCopy:DisplayObject;
public var popup:DisplayObject;
public var btn_restart:DisplayObject;
public var btn_sponsor:DisplayObject;
public var txt_meters:DisplayObject;
public var txt_scoreList:DisplayObject;
public var btn_options:DisplayObject;
public var txt_mph:DisplayObject;
public var btn_mobile:DisplayObject;
public var board:DisplayObject;
public var head:DisplayObject;
public var btn_blurOn:DisplayObject;
public var btn_back:DisplayObject;
public var flip:DisplayObject;
public var btn_resume:DisplayObject;
public var txt_timeList:DisplayObject;
}
}//package
Section 117
//SoundMgr_sfx_recordScratch (SoundMgr_sfx_recordScratch)
package {
import flash.display.*;
import mx.core.*;
public class SoundMgr_sfx_recordScratch extends SoundAsset {
public var txt_score:DisplayObject;
public var popup1:DisplayObject;
public var popup3:DisplayObject;
public var popup2:DisplayObject;
public var txt_bonus:DisplayObject;
public var btn_leaderboards:DisplayObject;
public var txt_mult:DisplayObject;
public var btn_sfxOn:DisplayObject;
public var btn_aaOn:DisplayObject;
public var btn_bgmOn:DisplayObject;
public var txt_bonusCopy:DisplayObject;
public var popup:DisplayObject;
public var btn_restart:DisplayObject;
public var btn_sponsor:DisplayObject;
public var txt_meters:DisplayObject;
public var txt_scoreList:DisplayObject;
public var btn_options:DisplayObject;
public var txt_mph:DisplayObject;
public var btn_mobile:DisplayObject;
public var board:DisplayObject;
public var head:DisplayObject;
public var btn_blurOn:DisplayObject;
public var btn_back:DisplayObject;
public var flip:DisplayObject;
public var btn_resume:DisplayObject;
public var txt_timeList:DisplayObject;
}
}//package
Section 118
//SoundMgr_sfx_skiNoiseC (SoundMgr_sfx_skiNoiseC)
package {
import flash.display.*;
import mx.core.*;
public class SoundMgr_sfx_skiNoiseC extends SoundAsset {
public var txt_score:DisplayObject;
public var popup1:DisplayObject;
public var popup3:DisplayObject;
public var popup2:DisplayObject;
public var txt_bonus:DisplayObject;
public var btn_leaderboards:DisplayObject;
public var txt_mult:DisplayObject;
public var btn_sfxOn:DisplayObject;
public var btn_aaOn:DisplayObject;
public var btn_bgmOn:DisplayObject;
public var txt_bonusCopy:DisplayObject;
public var popup:DisplayObject;
public var btn_restart:DisplayObject;
public var btn_sponsor:DisplayObject;
public var txt_meters:DisplayObject;
public var txt_scoreList:DisplayObject;
public var btn_options:DisplayObject;
public var txt_mph:DisplayObject;
public var btn_mobile:DisplayObject;
public var board:DisplayObject;
public var head:DisplayObject;
public var btn_blurOn:DisplayObject;
public var btn_back:DisplayObject;
public var flip:DisplayObject;
public var btn_resume:DisplayObject;
public var txt_timeList:DisplayObject;
}
}//package
Section 119
//SoundMgr_sfx_speedBoostC (SoundMgr_sfx_speedBoostC)
package {
import flash.display.*;
import mx.core.*;
public class SoundMgr_sfx_speedBoostC extends SoundAsset {
public var txt_score:DisplayObject;
public var popup1:DisplayObject;
public var popup3:DisplayObject;
public var popup2:DisplayObject;
public var txt_bonus:DisplayObject;
public var btn_leaderboards:DisplayObject;
public var txt_mult:DisplayObject;
public var btn_sfxOn:DisplayObject;
public var btn_aaOn:DisplayObject;
public var btn_bgmOn:DisplayObject;
public var txt_bonusCopy:DisplayObject;
public var popup:DisplayObject;
public var btn_restart:DisplayObject;
public var btn_sponsor:DisplayObject;
public var txt_meters:DisplayObject;
public var txt_scoreList:DisplayObject;
public var btn_options:DisplayObject;
public var txt_mph:DisplayObject;
public var btn_mobile:DisplayObject;
public var board:DisplayObject;
public var head:DisplayObject;
public var btn_blurOn:DisplayObject;
public var btn_back:DisplayObject;
public var flip:DisplayObject;
public var btn_resume:DisplayObject;
public var txt_timeList:DisplayObject;
}
}//package
Section 120
//SoundMgr_sfx_tunnelHitC (SoundMgr_sfx_tunnelHitC)
package {
import flash.display.*;
import mx.core.*;
public class SoundMgr_sfx_tunnelHitC extends SoundAsset {
public var txt_score:DisplayObject;
public var popup1:DisplayObject;
public var popup3:DisplayObject;
public var popup2:DisplayObject;
public var txt_bonus:DisplayObject;
public var btn_leaderboards:DisplayObject;
public var txt_mult:DisplayObject;
public var btn_sfxOn:DisplayObject;
public var btn_aaOn:DisplayObject;
public var btn_bgmOn:DisplayObject;
public var txt_bonusCopy:DisplayObject;
public var popup:DisplayObject;
public var btn_restart:DisplayObject;
public var btn_sponsor:DisplayObject;
public var txt_meters:DisplayObject;
public var txt_scoreList:DisplayObject;
public var btn_options:DisplayObject;
public var txt_mph:DisplayObject;
public var btn_mobile:DisplayObject;
public var board:DisplayObject;
public var head:DisplayObject;
public var btn_blurOn:DisplayObject;
public var btn_back:DisplayObject;
public var flip:DisplayObject;
public var btn_resume:DisplayObject;
public var txt_timeList:DisplayObject;
}
}//package
Section 121
//SpawnManager (SpawnManager)
package {
import flash.utils.*;
public class SpawnManager {
public var main:Main;
public var lastTime:uint;
public var obstacles:Array;
public var jumps:Array;
public var signalRedHit:Boolean;// = false
public var currDifficulty:int;
public var redball:HeightmapRunner;
public var difficulties:Array;
public var scrollers:Array;
public function SpawnManager(_arg1:Main, _arg2:HeightmapRunner, _arg3:Array, _arg4:Array, _arg5:Array){
var _local6:DifficultySetting;
super();
main = _arg1;
redball = _arg2;
scrollers = _arg3;
obstacles = _arg4;
jumps = _arg5;
difficulties = new Array();
_local6 = new DifficultySetting(1, 0, 0.2, 20, 10, 0, 20);
difficulties.push(_local6);
_local6 = new DifficultySetting(1, 0.05, 0.2, 25, 12, 0.1, 20);
difficulties.push(_local6);
_local6 = new DifficultySetting(1, 0.1, 0.2, 25, 12, 0.15, 20);
difficulties.push(_local6);
_local6 = new DifficultySetting(1, 0.2, 0.2, 25, 12, 0.25, 20);
difficulties.push(_local6);
_local6 = new DifficultySetting(1, 0.3, 0.2, 25, 12, 0.3, 20);
difficulties.push(_local6);
_local6 = new DifficultySetting(1, 0.4, 0.3, 30, 15, 0.35, 20);
difficulties.push(_local6);
_local6 = new DifficultySetting(1, 0.6, 0.3, 40, 20, 0.5, 20);
difficulties.push(_local6);
_local6 = new DifficultySetting(1, 0.8, 0.3, 40, 20, 0.6, 20);
difficulties.push(_local6);
_local6 = new DifficultySetting(1, 1, 0.4, 50, 20, 0.75, 200);
difficulties.push(_local6);
}
public function spawnUsingSetting(_arg1:DifficultySetting, _arg2:Number):void{
var _local4:Scroller;
var _local5:Array;
var _local7:Number;
var _local3:Number = (_arg2 + 2000);
if (((signalRedHit) && ((_arg1.killgateRate > 0)))){
_local4 = spawnKillGate();
_local4.x = _local3;
_local4.y = 200;
_local3 = (_local3 + 2000);
signalRedHit = false;
return;
};
var _local6:int;
while (_local6 < 2) {
_local7 = Math.random();
if (_local7 < _arg1.gateRate){
_local4 = spawnGate();
_local4.x = _local3;
_local3 = (_local3 + 2000);
_local4 = spawnGate();
_local4.x = _local3;
_local3 = (_local3 + 2000);
_local4 = spawnGate();
_local4.x = _local3;
_local3 = (_local3 + 2000);
} else {
if (_local7 < (_arg1.gateRate + _arg1.killgateRate)){
_local4 = spawnKillGate();
_local4.x = _local3;
_local3 = (_local3 + 2000);
} else {
if (_local7 < ((_arg1.gateRate + _arg1.killgateRate) + _arg1.jumpRate)){
_local4 = spawnJump((Math.random() * 2));
_local4.x = _local3;
_local3 = (_local3 + 2000);
} else {
_local5 = spawnTunnel(_arg1.tunnelLength, _arg1.tunnelVariance, _local3);
_local3 = (spawnTunnel(_arg1.tunnelLength, _arg1.tunnelVariance, _local3)[(_local5.length - 1)].x + 2000);
};
};
};
_local6++;
};
}
public function update():void{
var _local1:uint = (getTimer() - lastTime);
lastTime = getTimer();
difficulties[currDifficulty].timeleft = (difficulties[currDifficulty].timeleft - _local1);
if ((((difficulties[currDifficulty].timeleft <= 0)) && ((currDifficulty < (difficulties.length - 1))))){
currDifficulty++;
};
}
public function spawnTunnel(_arg1:int, _arg2:Number, _arg3:Number=0):Array{
var _local8:TunnelGate;
var _local9:int;
var _local4:Array = [];
main.perfectTunnelCount = 0;
var _local5:Number = -10;
var _local6:Number = 320;
if (Math.random() < 0.5){
_local6 = 80;
};
var _local7:int;
while (_local7 < 40) {
_local8 = new TunnelGate(redball, main.obstacleLayer, main.jumpScoreLayer, 1, 70, _local6);
_local8.x = ((_local7 * 200) + _arg3);
if (_local7 == 0){
_local8.first = true;
};
scrollers.push(_local8);
obstacles.push(_local8);
_local4.push(_local8);
if (_local7 > 0){
_local4[(_local7 - 1)].nextGate = _local8;
};
_local9 = 0;
while (_local9 < 1) {
_local6 = (_local6 + _local5);
if (_local6 > 320){
_local5 = -(_arg2);
};
if (_local6 < 80){
_local5 = _arg2;
};
_local5 = (_local5 + ((Math.random() * _arg2) - (_arg2 * 0.5)));
_local9++;
};
_local7++;
};
return (_local4);
}
public function spawnJump(_arg1:int=-1):BigJump{
var _local2:BigJump = new BigJump(redball, main.obstacleLayer, main.jumpScoreLayer, int(Math.floor((Math.random() * 3))));
if (_arg1 != -1){
_local2 = new BigJump(redball, main.obstacleLayer, main.jumpScoreLayer, _arg1);
};
_local2.x = 6000;
scrollers.push(_local2);
obstacles.push(_local2);
jumps.push(_local2);
return (_local2);
}
public function resetDifficultyRamp():void{
var _local1:DifficultySetting;
for each (_local1 in difficulties) {
_local1.timeleft = _local1.time;
};
currDifficulty = 0;
lastTime = getTimer();
}
public function spawnGateSet():void{
var _local2:int;
var _local3:Gate;
var _local1:int;
while (_local1 < 10) {
_local2 = Math.floor((Math.random() * 3));
_local3 = new Gate(redball, main.obstacleLayer, main.jumpScoreLayer, _local2, 90, ((_local2 * 100) + 100));
_local3.x = (_local3.x * (_local1 + 2));
scrollers.push(_local3);
obstacles.push(_local3);
_local1++;
};
}
public function spawnKillGate(_arg1:int=-1):KillGate{
var _local2:int = Math.floor((Math.random() * 3));
while (_local2 == _arg1) {
_local2 = Math.floor((Math.random() * 3));
};
var _local3:KillGate = new KillGate(redball, main.obstacleLayer, main.jumpScoreLayer, _local2, 90, ((_local2 * 100) + 100));
scrollers.push(_local3);
obstacles.push(_local3);
return (_local3);
}
public function spawnGate():Gate{
var _local1:int = Math.floor((Math.random() * 3));
var _local2:Gate = new Gate(redball, main.obstacleLayer, main.jumpScoreLayer, _local1, 90, ((_local1 * 100) + 100));
scrollers.push(_local2);
obstacles.push(_local2);
return (_local2);
}
public function spawnScenery():void{
var _local1:Scenery = new Scenery(redball, main.sceneryLayer, main.heightmap, (main.lastHMX - 50), false);
scrollers.push(_local1);
}
public function spawnJumpSet():void{
var _local2:BigJump;
var _local1:int;
while (_local1 < 5) {
_local2 = spawnJump();
_local2.x = (_local2.x * (_local1 + 1));
_local1++;
};
}
public function spawnMediumSet():void{
var _local2:Scroller;
var _local3:Array;
var _local5:Number;
var _local6:TunnelGate;
var _local1:Number = 5000;
var _local4:int;
while (_local4 < 20) {
_local5 = Math.random();
if (_local5 < 0.33){
_local2 = spawnJump(0);
_local2.x = _local1;
_local1 = (_local1 + 3000);
} else {
if (_local5 < 0.75){
_local2 = spawnGate();
_local2.x = _local1;
_local1 = (_local1 + 2000);
_local2 = spawnGate();
_local2.x = _local1;
_local1 = (_local1 + 2000);
} else {
_local3 = spawnTunnel(20, 10);
for each (_local6 in _local3) {
_local6.x = (_local6.x + _local1);
};
_local1 = (_local3[(_local3.length - 1)].x + 2000);
};
};
_local4++;
};
}
public function spawnNewShitDiffRamp(_arg1:Number):void{
spawnUsingSetting(difficulties[currDifficulty], _arg1);
}
public function spawnHardSet(_arg1:Number):void{
var _local3:Scroller;
var _local4:Array;
var _local6:Number;
var _local7:TunnelGate;
var _local2:Number = (_arg1 + 2000);
var _local5:int;
while (_local5 < 2) {
_local6 = Math.random();
if (_local6 < 0.2){
_local3 = spawnJump((Math.random() * 2));
_local3.x = _local2;
_local2 = (_local2 + 2000);
} else {
if (_local6 < 0.1){
_local3 = spawnKillGate();
_local3.x = _local2;
_local2 = (_local2 + 2000);
} else {
if (_local6 < 0.9){
_local3 = spawnGate();
_local3.x = _local2;
_local2 = (_local2 + 2000);
_local3 = spawnGate();
_local3.x = _local2;
_local2 = (_local2 + 2000);
} else {
_local4 = spawnTunnel(40, 10);
for each (_local7 in _local4) {
_local7.x = (_local7.x + _local2);
};
_local2 = (_local4[(_local4.length - 1)].x + 2000);
};
};
};
_local5++;
};
}
}
}//package
class DifficultySetting {
public var tunnelRate:Number;
public var killgateRate:Number;
public var gateRate:Number;
public var time:int;
public var jumpRate:Number;
public var timeleft:int;
public var tunnelLength:int;
public var tunnelVariance:Number;
private function DifficultySetting(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:int, _arg5:Number, _arg6:Number, _arg7:int){
var _local8:Number = (((_arg1 + _arg2) + _arg3) + _arg6);
gateRate = (_arg1 / _local8);
killgateRate = (_arg2 / _local8);
tunnelRate = (_arg3 / _local8);
jumpRate = (_arg6 / _local8);
tunnelLength = _arg4;
tunnelVariance = _arg5;
time = (_arg7 * 1000);
timeleft = (_arg7 * 1000);
}
}
Section 122
//TipManager (TipManager)
package {
import flash.utils.*;
import General.*;
import SWFStats.*;
public class TipManager {
public static var tunnelGates:int;
public static var possibleTips:Array;
public static var lastTime:uint;
public static var timeAccum:uint;
public static var bestOffscreenJump:int;
public static var musicOut:Boolean;
public static var speedAccum:uint;
public static var gatesHit:int;
public static var frameAccum:uint;
public static var mouseDownFrames:uint;
public static var jumpedOffScreen:Boolean;
public static var gatesJumped:int;
public static var tunnelGatesHit:int;
public static function Signal_tunnelGatePassed(_arg1:Boolean):void{
tunnelGates++;
if (_arg1){
tunnelGatesHit++;
};
}
public static function Check_averageFPS():void{
var _local1:Number;
if (timeAccum > 10000){
_local1 = (frameAccum / (timeAccum / 1000));
trace(("AVE FPS: " + _local1));
if (_local1 < 27){
possibleTips.push("badFPS");
};
};
}
public static function Died_killgate():void{
possibleTips.push("gateDie");
}
public static function dispenseWithTheTip():String{
var _local2:String;
var _local1 = "";
Check_averageSpeed();
Check_buttonHoldDown();
Check_gatesJumped();
Check_offscreenJumps();
Check_tunnelGatesMissed();
Check_averageFPS();
if ((((possibleTips.length < 1)) && (musicOut))){
possibleTips.push("musicOut");
};
trace(possibleTips);
for each (_local2 in possibleTips) {
Log.CustomMetric(_local2, "Tips");
};
if (possibleTips.length > 0){
_local1 = possibleTips[Math.floor((Math.random() * possibleTips.length))];
};
return (_local1);
}
public static function Signal_musicOut():void{
musicOut = true;
}
public static function update(_arg1:HeightmapRunner):void{
var _local2:int = (getTimer() - lastTime);
lastTime = getTimer();
speedAccum = (speedAccum + _arg1.speed);
timeAccum = (timeAccum + _local2);
frameAccum++;
if (Input.mouseDown){
mouseDownFrames++;
};
}
public static function Check_buttonHoldDown():void{
if ((mouseDownFrames / frameAccum) > 0.9){
possibleTips.push("clickHold");
};
}
public static function Died_checkForJump(_arg1:HeightmapRunner, _arg2:Array):void{
var _local3:BigJump;
for each (_local3 in _arg2) {
if ((((_arg1.x > (_local3.x - 100))) && ((_arg1.x < ((_local3.x + _local3.wwidth) + (10 * _arg1.speed)))))){
possibleTips.push("jumpDie");
};
};
}
public static function Check_gatesJumped():void{
if ((((gatesHit > 10)) && ((gatesJumped < 30)))){
if ((gatesJumped / gatesHit) < 0.2){
possibleTips.push("gateJump");
};
};
}
public static function initi():void{
possibleTips = new Array();
speedAccum = 0;
timeAccum = 0;
frameAccum = 0;
mouseDownFrames = 0;
gatesHit = 0;
gatesJumped = 0;
tunnelGates = 0;
tunnelGatesHit = 0;
jumpedOffScreen = false;
bestOffscreenJump = 0;
musicOut = false;
lastTime = getTimer();
}
public static function Check_averageSpeed():void{
var _local1:Number;
if (timeAccum > 10000){
_local1 = (speedAccum / frameAccum);
if (_local1 < 24){
possibleTips.push("badSpeed");
};
};
}
public static function Check_tunnelGatesMissed():void{
if (tunnelGates > 40){
if (((((tunnelGatesHit / tunnelGates) > 0.5)) && (((tunnelGatesHit / tunnelGates) < 0.85)))){
possibleTips.push("tunnelMiss");
};
};
}
public static function Check_offscreenJumps():void{
if (timeAccum > 20000){
if (!jumpedOffScreen){
possibleTips.push("jumpMiss");
} else {
if (bestOffscreenJump < 3){
possibleTips.push("jumpLow");
};
};
};
}
public static function Signal_offscreenJump(_arg1:int):void{
jumpedOffScreen = true;
if (bestOffscreenJump < _arg1){
bestOffscreenJump = _arg1;
};
}
public static function Died_drewOverSelf():void{
possibleTips.push("drawDie");
}
public static function Signal_gateHit(_arg1:Boolean):void{
gatesHit++;
if (!_arg1){
gatesJumped++;
};
}
}
}//package
Section 123
//TunnelGate (TunnelGate)
package {
import flash.display.*;
public class TunnelGate extends Gate {
public var crossedGates:int;// = 0
public var tgateC:Class;
public var nextGate:TunnelGate;
public var blinkTimer:int;// = 3
public var tgateMissC:Class;
public var tgateHitC:Class;
public var first:Boolean;// = false
public var totalGates:int;// = 0
public var gateIncomingBlueC:Class;
public var grayBlankC:Class;
public function TunnelGate(_arg1:HeightmapRunner, _arg2:Sprite, _arg3:Sprite, _arg4:int, _arg5:Number, _arg6:Number){
gateIncomingBlueC = TunnelGate_gateIncomingBlueC;
tgateC = TunnelGate_tgateC;
tgateHitC = TunnelGate_tgateHitC;
tgateMissC = TunnelGate_tgateMissC;
grayBlankC = TunnelGate_grayBlankC;
super(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6);
incomingCover = new grayBlankC();
incomingCover.txt_meters.visible = false;
incomingGraphic = new gateIncomingBlueC();
rangeText = null;
incomingGraphic.y = y;
addChild(new tgateC());
}
override public function success():void{
SoundMgr.playSound("tunnelHit");
if (runner.boostTimer < 30){
runner.boostTimer = (runner.boostTimer + 3);
};
MainRef.ref.tunnelGateHit();
removeChildAt(0);
addChild(new tgateHitC());
if (nextGate == null){
MainRef.ref.scorekeeper.tunnelComplete((totalGates + 1), (crossedGates + 1));
} else {
nextGate.totalGates = (totalGates + 1);
nextGate.crossedGates = (crossedGates + 1);
};
TipManager.Signal_tunnelGatePassed(true);
}
override public function failure():void{
MainRef.ref.scorekeeper.tunnelGateMiss();
removeChildAt(0);
addChild(new tgateMissC());
if (nextGate == null){
MainRef.ref.scorekeeper.tunnelComplete((totalGates + 1), crossedGates);
} else {
nextGate.totalGates = (totalGates + 1);
nextGate.crossedGates = crossedGates;
};
TipManager.Signal_tunnelGatePassed(false);
}
override public function update():void{
super.update();
if (((((first) && ((range < 500)))) && ((x > 0x0300)))){
incomingGraphic.y = (incomingGraphic.y + ((y - incomingGraphic.y) * 0.1));
blinkTimer--;
if (blinkTimer <= 0){
blinkTimer = 3;
incomingGraphic.visible = !(incomingGraphic.visible);
incomingGraphic.visible = true;
};
} else {
if (((((first) && (nextGate))) && ((range < 500)))){
nextGate.incomingGraphic.y = incomingGraphic.y;
nextGate.first = true;
first = false;
};
incomingGraphic.visible = false;
};
}
}
}//package
Section 124
//TunnelGate_gateIncomingBlueC (TunnelGate_gateIncomingBlueC)
package {
import flash.display.*;
import mx.core.*;
public class TunnelGate_gateIncomingBlueC extends SpriteAsset {
public var txt_timeList:DisplayObject;
public var txt_score:DisplayObject;
public var popup1:DisplayObject;
public var mountains:DisplayObject;
public var popup3:DisplayObject;
public var txt_bonus:DisplayObject;
public var trees:DisplayObject;
public var btn_twitter:DisplayObject;
public var btn_next:DisplayObject;
public var btn_leaderboards:DisplayObject;
public var credits:DisplayObject;
public var options:DisplayObject;
public var txt_mult:DisplayObject;
public var btn_sfxOn:DisplayObject;
public var btn_aaOn:DisplayObject;
public var btn_bgmOn:DisplayObject;
public var txt_bonusCopy:DisplayObject;
public var popup2:DisplayObject;
public var skierFalling:DisplayObject;
public var btn_restart:DisplayObject;
public var btn_prev:DisplayObject;
public var btn_sponsor:DisplayObject;
public var tips:DisplayObject;
public var txt_meters:DisplayObject;
public var btn_stump:DisplayObject;
public var txt_time:DisplayObject;
public var txt_scoreList:DisplayObject;
public var btn_facebook:DisplayObject;
public var popup:DisplayObject;
public var btn_options:DisplayObject;
public var txt_mph:DisplayObject;
public var clouds:DisplayObject;
public var share:DisplayObject;
public var btn_mikengreg:DisplayObject;
public var btn_mobile:DisplayObject;
public var board:DisplayObject;
public var btn_blurOn:DisplayObject;
public var btn_back:DisplayObject;
public var flip:DisplayObject;
public var head:DisplayObject;
public var btn_resume:DisplayObject;
public var leaderboard:DisplayObject;
public var skier:DisplayObject;
}
}//package
Section 125
//TunnelGate_grayBlankC (TunnelGate_grayBlankC)
package {
import flash.display.*;
import mx.core.*;
public class TunnelGate_grayBlankC extends SpriteAsset {
public var txt_timeList:DisplayObject;
public var txt_score:DisplayObject;
public var popup1:DisplayObject;
public var mountains:DisplayObject;
public var popup3:DisplayObject;
public var txt_bonus:DisplayObject;
public var trees:DisplayObject;
public var btn_twitter:DisplayObject;
public var btn_next:DisplayObject;
public var btn_leaderboards:DisplayObject;
public var credits:DisplayObject;
public var options:DisplayObject;
public var txt_mult:DisplayObject;
public var btn_sfxOn:DisplayObject;
public var btn_aaOn:DisplayObject;
public var btn_bgmOn:DisplayObject;
public var txt_bonusCopy:DisplayObject;
public var popup2:DisplayObject;
public var skierFalling:DisplayObject;
public var btn_restart:DisplayObject;
public var btn_prev:DisplayObject;
public var btn_sponsor:DisplayObject;
public var tips:DisplayObject;
public var txt_meters:DisplayObject;
public var btn_stump:DisplayObject;
public var txt_time:DisplayObject;
public var txt_scoreList:DisplayObject;
public var btn_facebook:DisplayObject;
public var popup:DisplayObject;
public var btn_options:DisplayObject;
public var txt_mph:DisplayObject;
public var clouds:DisplayObject;
public var share:DisplayObject;
public var btn_mikengreg:DisplayObject;
public var btn_mobile:DisplayObject;
public var board:DisplayObject;
public var btn_blurOn:DisplayObject;
public var btn_back:DisplayObject;
public var flip:DisplayObject;
public var head:DisplayObject;
public var btn_resume:DisplayObject;
public var leaderboard:DisplayObject;
public var skier:DisplayObject;
}
}//package
Section 126
//TunnelGate_tgateC (TunnelGate_tgateC)
package {
import flash.display.*;
import mx.core.*;
public class TunnelGate_tgateC extends SpriteAsset {
public var txt_timeList:DisplayObject;
public var txt_score:DisplayObject;
public var popup1:DisplayObject;
public var mountains:DisplayObject;
public var popup3:DisplayObject;
public var txt_bonus:DisplayObject;
public var trees:DisplayObject;
public var btn_twitter:DisplayObject;
public var btn_next:DisplayObject;
public var btn_leaderboards:DisplayObject;
public var credits:DisplayObject;
public var options:DisplayObject;
public var txt_mult:DisplayObject;
public var btn_sfxOn:DisplayObject;
public var btn_aaOn:DisplayObject;
public var btn_bgmOn:DisplayObject;
public var txt_bonusCopy:DisplayObject;
public var popup2:DisplayObject;
public var skierFalling:DisplayObject;
public var btn_restart:DisplayObject;
public var btn_prev:DisplayObject;
public var btn_sponsor:DisplayObject;
public var tips:DisplayObject;
public var txt_meters:DisplayObject;
public var btn_stump:DisplayObject;
public var txt_time:DisplayObject;
public var txt_scoreList:DisplayObject;
public var btn_facebook:DisplayObject;
public var popup:DisplayObject;
public var btn_options:DisplayObject;
public var txt_mph:DisplayObject;
public var clouds:DisplayObject;
public var share:DisplayObject;
public var btn_mikengreg:DisplayObject;
public var btn_mobile:DisplayObject;
public var board:DisplayObject;
public var btn_blurOn:DisplayObject;
public var btn_back:DisplayObject;
public var flip:DisplayObject;
public var head:DisplayObject;
public var btn_resume:DisplayObject;
public var leaderboard:DisplayObject;
public var skier:DisplayObject;
}
}//package
Section 127
//TunnelGate_tgateHitC (TunnelGate_tgateHitC)
package {
import flash.display.*;
import mx.core.*;
public class TunnelGate_tgateHitC extends SpriteAsset {
public var txt_timeList:DisplayObject;
public var txt_score:DisplayObject;
public var popup1:DisplayObject;
public var mountains:DisplayObject;
public var popup3:DisplayObject;
public var txt_bonus:DisplayObject;
public var trees:DisplayObject;
public var btn_twitter:DisplayObject;
public var btn_next:DisplayObject;
public var btn_leaderboards:DisplayObject;
public var credits:DisplayObject;
public var options:DisplayObject;
public var txt_mult:DisplayObject;
public var btn_sfxOn:DisplayObject;
public var btn_aaOn:DisplayObject;
public var btn_bgmOn:DisplayObject;
public var txt_bonusCopy:DisplayObject;
public var popup2:DisplayObject;
public var skierFalling:DisplayObject;
public var btn_restart:DisplayObject;
public var btn_prev:DisplayObject;
public var btn_sponsor:DisplayObject;
public var tips:DisplayObject;
public var txt_meters:DisplayObject;
public var btn_stump:DisplayObject;
public var txt_time:DisplayObject;
public var txt_scoreList:DisplayObject;
public var btn_facebook:DisplayObject;
public var popup:DisplayObject;
public var btn_options:DisplayObject;
public var txt_mph:DisplayObject;
public var clouds:DisplayObject;
public var share:DisplayObject;
public var btn_mikengreg:DisplayObject;
public var btn_mobile:DisplayObject;
public var board:DisplayObject;
public var btn_blurOn:DisplayObject;
public var btn_back:DisplayObject;
public var flip:DisplayObject;
public var head:DisplayObject;
public var btn_resume:DisplayObject;
public var leaderboard:DisplayObject;
public var skier:DisplayObject;
}
}//package
Section 128
//TunnelGate_tgateMissC (TunnelGate_tgateMissC)
package {
import flash.display.*;
import mx.core.*;
public class TunnelGate_tgateMissC extends SpriteAsset {
public var txt_timeList:DisplayObject;
public var txt_score:DisplayObject;
public var popup1:DisplayObject;
public var mountains:DisplayObject;
public var popup3:DisplayObject;
public var txt_bonus:DisplayObject;
public var trees:DisplayObject;
public var btn_twitter:DisplayObject;
public var btn_next:DisplayObject;
public var btn_leaderboards:DisplayObject;
public var credits:DisplayObject;
public var options:DisplayObject;
public var txt_mult:DisplayObject;
public var btn_sfxOn:DisplayObject;
public var btn_aaOn:DisplayObject;
public var btn_bgmOn:DisplayObject;
public var txt_bonusCopy:DisplayObject;
public var popup2:DisplayObject;
public var skierFalling:DisplayObject;
public var btn_restart:DisplayObject;
public var btn_prev:DisplayObject;
public var btn_sponsor:DisplayObject;
public var tips:DisplayObject;
public var txt_meters:DisplayObject;
public var btn_stump:DisplayObject;
public var txt_time:DisplayObject;
public var txt_scoreList:DisplayObject;
public var btn_facebook:DisplayObject;
public var popup:DisplayObject;
public var btn_options:DisplayObject;
public var txt_mph:DisplayObject;
public var clouds:DisplayObject;
public var share:DisplayObject;
public var btn_mikengreg:DisplayObject;
public var btn_mobile:DisplayObject;
public var board:DisplayObject;
public var btn_blurOn:DisplayObject;
public var btn_back:DisplayObject;
public var flip:DisplayObject;
public var head:DisplayObject;
public var btn_resume:DisplayObject;
public var leaderboard:DisplayObject;
public var skier:DisplayObject;
}
}//package