Section 1
//MD5 (com.adobe.crypto.MD5)
package com.adobe.crypto {
import flash.utils.*;
import com.adobe.utils.*;
public class MD5 {
public static var digest:ByteArray;
private static function ff(_arg1:int, _arg2:int, _arg3:int, _arg4:int, _arg5:int, _arg6:int, _arg7:int):int{
return (transform(f, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7));
}
private static function f(_arg1:int, _arg2:int, _arg3:int):int{
return (((_arg1 & _arg2) | (~(_arg1) & _arg3)));
}
private static function g(_arg1:int, _arg2:int, _arg3:int):int{
return (((_arg1 & _arg3) | (_arg2 & ~(_arg3))));
}
private static function h(_arg1:int, _arg2:int, _arg3:int):int{
return (((_arg1 ^ _arg2) ^ _arg3));
}
private static function i(_arg1:int, _arg2:int, _arg3:int):int{
return ((_arg2 ^ (_arg1 | ~(_arg3))));
}
private static function transform(_arg1:Function, _arg2:int, _arg3:int, _arg4:int, _arg5:int, _arg6:int, _arg7:int, _arg8:int):int{
var _local9:int = (((_arg2 + int(_arg1(_arg3, _arg4, _arg5))) + _arg6) + _arg8);
return ((IntUtil.rol(_local9, _arg7) + _arg3));
}
private static function hh(_arg1:int, _arg2:int, _arg3:int, _arg4:int, _arg5:int, _arg6:int, _arg7:int):int{
return (transform(h, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7));
}
public static function hash(_arg1:String):String{
var _local2:ByteArray = new ByteArray();
_local2.writeUTFBytes(_arg1);
return (hashBinary(_local2));
}
private static function createBlocks(_arg1:ByteArray):Array{
var _local2:Array = new Array();
var _local3:int = (_arg1.length * 8);
var _local4 = 0xFF;
var _local5:int;
while (_local5 < _local3) {
_local2[int((_local5 >> 5))] = (_local2[int((_local5 >> 5))] | ((_arg1[(_local5 / 8)] & _local4) << (_local5 % 32)));
_local5 = (_local5 + 8);
};
_local2[int((_local3 >> 5))] = (_local2[int((_local3 >> 5))] | (128 << (_local3 % 32)));
_local2[int(((((_local3 + 64) >>> 9) << 4) + 14))] = _local3;
return (_local2);
}
public static function hashBinary(_arg1:ByteArray):String{
var _local6:int;
var _local7:int;
var _local8:int;
var _local9:int;
var _local2 = 1732584193;
var _local3 = -271733879;
var _local4 = -1732584194;
var _local5 = 271733878;
var _local10:Array = createBlocks(_arg1);
var _local11:int = _local10.length;
var _local12:int;
while (_local12 < _local11) {
_local6 = _local2;
_local7 = _local3;
_local8 = _local4;
_local9 = _local5;
_local2 = ff(_local2, _local3, _local4, _local5, _local10[int((_local12 + 0))], 7, -680876936);
_local5 = ff(_local5, _local2, _local3, _local4, _local10[int((_local12 + 1))], 12, -389564586);
_local4 = ff(_local4, _local5, _local2, _local3, _local10[int((_local12 + 2))], 17, 606105819);
_local3 = ff(_local3, _local4, _local5, _local2, _local10[int((_local12 + 3))], 22, -1044525330);
_local2 = ff(_local2, _local3, _local4, _local5, _local10[int((_local12 + 4))], 7, -176418897);
_local5 = ff(_local5, _local2, _local3, _local4, _local10[int((_local12 + 5))], 12, 1200080426);
_local4 = ff(_local4, _local5, _local2, _local3, _local10[int((_local12 + 6))], 17, -1473231341);
_local3 = ff(_local3, _local4, _local5, _local2, _local10[int((_local12 + 7))], 22, -45705983);
_local2 = ff(_local2, _local3, _local4, _local5, _local10[int((_local12 + 8))], 7, 1770035416);
_local5 = ff(_local5, _local2, _local3, _local4, _local10[int((_local12 + 9))], 12, -1958414417);
_local4 = ff(_local4, _local5, _local2, _local3, _local10[int((_local12 + 10))], 17, -42063);
_local3 = ff(_local3, _local4, _local5, _local2, _local10[int((_local12 + 11))], 22, -1990404162);
_local2 = ff(_local2, _local3, _local4, _local5, _local10[int((_local12 + 12))], 7, 1804603682);
_local5 = ff(_local5, _local2, _local3, _local4, _local10[int((_local12 + 13))], 12, -40341101);
_local4 = ff(_local4, _local5, _local2, _local3, _local10[int((_local12 + 14))], 17, -1502002290);
_local3 = ff(_local3, _local4, _local5, _local2, _local10[int((_local12 + 15))], 22, 1236535329);
_local2 = gg(_local2, _local3, _local4, _local5, _local10[int((_local12 + 1))], 5, -165796510);
_local5 = gg(_local5, _local2, _local3, _local4, _local10[int((_local12 + 6))], 9, -1069501632);
_local4 = gg(_local4, _local5, _local2, _local3, _local10[int((_local12 + 11))], 14, 643717713);
_local3 = gg(_local3, _local4, _local5, _local2, _local10[int((_local12 + 0))], 20, -373897302);
_local2 = gg(_local2, _local3, _local4, _local5, _local10[int((_local12 + 5))], 5, -701558691);
_local5 = gg(_local5, _local2, _local3, _local4, _local10[int((_local12 + 10))], 9, 38016083);
_local4 = gg(_local4, _local5, _local2, _local3, _local10[int((_local12 + 15))], 14, -660478335);
_local3 = gg(_local3, _local4, _local5, _local2, _local10[int((_local12 + 4))], 20, -405537848);
_local2 = gg(_local2, _local3, _local4, _local5, _local10[int((_local12 + 9))], 5, 568446438);
_local5 = gg(_local5, _local2, _local3, _local4, _local10[int((_local12 + 14))], 9, -1019803690);
_local4 = gg(_local4, _local5, _local2, _local3, _local10[int((_local12 + 3))], 14, -187363961);
_local3 = gg(_local3, _local4, _local5, _local2, _local10[int((_local12 + 8))], 20, 1163531501);
_local2 = gg(_local2, _local3, _local4, _local5, _local10[int((_local12 + 13))], 5, -1444681467);
_local5 = gg(_local5, _local2, _local3, _local4, _local10[int((_local12 + 2))], 9, -51403784);
_local4 = gg(_local4, _local5, _local2, _local3, _local10[int((_local12 + 7))], 14, 1735328473);
_local3 = gg(_local3, _local4, _local5, _local2, _local10[int((_local12 + 12))], 20, -1926607734);
_local2 = hh(_local2, _local3, _local4, _local5, _local10[int((_local12 + 5))], 4, -378558);
_local5 = hh(_local5, _local2, _local3, _local4, _local10[int((_local12 + 8))], 11, -2022574463);
_local4 = hh(_local4, _local5, _local2, _local3, _local10[int((_local12 + 11))], 16, 1839030562);
_local3 = hh(_local3, _local4, _local5, _local2, _local10[int((_local12 + 14))], 23, -35309556);
_local2 = hh(_local2, _local3, _local4, _local5, _local10[int((_local12 + 1))], 4, -1530992060);
_local5 = hh(_local5, _local2, _local3, _local4, _local10[int((_local12 + 4))], 11, 1272893353);
_local4 = hh(_local4, _local5, _local2, _local3, _local10[int((_local12 + 7))], 16, -155497632);
_local3 = hh(_local3, _local4, _local5, _local2, _local10[int((_local12 + 10))], 23, -1094730640);
_local2 = hh(_local2, _local3, _local4, _local5, _local10[int((_local12 + 13))], 4, 681279174);
_local5 = hh(_local5, _local2, _local3, _local4, _local10[int((_local12 + 0))], 11, -358537222);
_local4 = hh(_local4, _local5, _local2, _local3, _local10[int((_local12 + 3))], 16, -722521979);
_local3 = hh(_local3, _local4, _local5, _local2, _local10[int((_local12 + 6))], 23, 76029189);
_local2 = hh(_local2, _local3, _local4, _local5, _local10[int((_local12 + 9))], 4, -640364487);
_local5 = hh(_local5, _local2, _local3, _local4, _local10[int((_local12 + 12))], 11, -421815835);
_local4 = hh(_local4, _local5, _local2, _local3, _local10[int((_local12 + 15))], 16, 530742520);
_local3 = hh(_local3, _local4, _local5, _local2, _local10[int((_local12 + 2))], 23, -995338651);
_local2 = ii(_local2, _local3, _local4, _local5, _local10[int((_local12 + 0))], 6, -198630844);
_local5 = ii(_local5, _local2, _local3, _local4, _local10[int((_local12 + 7))], 10, 1126891415);
_local4 = ii(_local4, _local5, _local2, _local3, _local10[int((_local12 + 14))], 15, -1416354905);
_local3 = ii(_local3, _local4, _local5, _local2, _local10[int((_local12 + 5))], 21, -57434055);
_local2 = ii(_local2, _local3, _local4, _local5, _local10[int((_local12 + 12))], 6, 1700485571);
_local5 = ii(_local5, _local2, _local3, _local4, _local10[int((_local12 + 3))], 10, -1894986606);
_local4 = ii(_local4, _local5, _local2, _local3, _local10[int((_local12 + 10))], 15, -1051523);
_local3 = ii(_local3, _local4, _local5, _local2, _local10[int((_local12 + 1))], 21, -2054922799);
_local2 = ii(_local2, _local3, _local4, _local5, _local10[int((_local12 + 8))], 6, 1873313359);
_local5 = ii(_local5, _local2, _local3, _local4, _local10[int((_local12 + 15))], 10, -30611744);
_local4 = ii(_local4, _local5, _local2, _local3, _local10[int((_local12 + 6))], 15, -1560198380);
_local3 = ii(_local3, _local4, _local5, _local2, _local10[int((_local12 + 13))], 21, 1309151649);
_local2 = ii(_local2, _local3, _local4, _local5, _local10[int((_local12 + 4))], 6, -145523070);
_local5 = ii(_local5, _local2, _local3, _local4, _local10[int((_local12 + 11))], 10, -1120210379);
_local4 = ii(_local4, _local5, _local2, _local3, _local10[int((_local12 + 2))], 15, 718787259);
_local3 = ii(_local3, _local4, _local5, _local2, _local10[int((_local12 + 9))], 21, -343485551);
_local2 = (_local2 + _local6);
_local3 = (_local3 + _local7);
_local4 = (_local4 + _local8);
_local5 = (_local5 + _local9);
_local12 = (_local12 + 16);
};
digest = new ByteArray();
digest.writeInt(_local2);
digest.writeInt(_local3);
digest.writeInt(_local4);
digest.writeInt(_local5);
digest.position = 0;
return ((((IntUtil.toHex(_local2) + IntUtil.toHex(_local3)) + IntUtil.toHex(_local4)) + IntUtil.toHex(_local5)));
}
private static function gg(_arg1:int, _arg2:int, _arg3:int, _arg4:int, _arg5:int, _arg6:int, _arg7:int):int{
return (transform(g, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7));
}
private static function ii(_arg1:int, _arg2:int, _arg3:int, _arg4:int, _arg5:int, _arg6:int, _arg7:int):int{
return (transform(i, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7));
}
public static function hashBytes(_arg1:ByteArray):String{
return (hashBinary(_arg1));
}
}
}//package com.adobe.crypto
Section 2
//PNGEncoder (com.adobe.images.PNGEncoder)
package com.adobe.images {
import flash.display.*;
import flash.geom.*;
import flash.utils.*;
public class PNGEncoder {
private static var crcTableComputed:Boolean = false;
private static var crcTable:Array;
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 encode(_arg1:BitmapData):ByteArray{
var _local6:uint;
var _local7: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 _local5:int;
while (_local5 < _arg1.height) {
_local4.writeByte(0);
if (!_arg1.transparent){
_local7 = 0;
while (_local7 < _arg1.width) {
_local6 = _arg1.getPixel(_local7, _local5);
_local4.writeUnsignedInt(uint((((_local6 & 0xFFFFFF) << 8) | 0xFF)));
_local7++;
};
} else {
_local7 = 0;
while (_local7 < _arg1.width) {
_local6 = _arg1.getPixel32(_local7, _local5);
_local4.writeUnsignedInt(uint((((_local6 & 0xFFFFFF) << 8) | (_local6 >>> 24))));
_local7++;
};
};
_local5++;
};
_local4.compress();
writeChunk(_local2, 1229209940, _local4);
writeChunk(_local2, 1229278788, null);
return (_local2);
}
}
}//package com.adobe.images
Section 3
//JSON (com.adobe.serialization.json.JSON)
package com.adobe.serialization.json {
public class JSON {
public static function decode(_arg1:String){
var _local2:JSONDecoder = new JSONDecoder(_arg1);
return (_local2.getValue());
}
public static function encode(_arg1:Object):String{
var _local2:JSONEncoder = new JSONEncoder(_arg1);
return (_local2.getString());
}
}
}//package com.adobe.serialization.json
Section 4
//JSONDecoder (com.adobe.serialization.json.JSONDecoder)
package com.adobe.serialization.json {
public class JSONDecoder {
private var value;
private var tokenizer:JSONTokenizer;
private var token:JSONToken;
public function JSONDecoder(_arg1:String){
tokenizer = new JSONTokenizer(_arg1);
nextToken();
value = parseValue();
}
private function parseObject():Object{
var _local2:String;
var _local1:Object = new Object();
nextToken();
if (token.type == JSONTokenType.RIGHT_BRACE){
return (_local1);
};
while (true) {
if (token.type == JSONTokenType.STRING){
_local2 = String(token.value);
nextToken();
if (token.type == JSONTokenType.COLON){
nextToken();
_local1[_local2] = parseValue();
nextToken();
if (token.type == JSONTokenType.RIGHT_BRACE){
return (_local1);
};
if (token.type == JSONTokenType.COMMA){
nextToken();
} else {
tokenizer.parseError(("Expecting } or , but found " + token.value));
};
} else {
tokenizer.parseError(("Expecting : but found " + token.value));
};
} else {
tokenizer.parseError(("Expecting string but found " + token.value));
};
};
return (null);
}
private function parseValue():Object{
if (token == null){
tokenizer.parseError("Unexpected end of input");
};
switch (token.type){
case JSONTokenType.LEFT_BRACE:
return (parseObject());
case JSONTokenType.LEFT_BRACKET:
return (parseArray());
case JSONTokenType.STRING:
case JSONTokenType.NUMBER:
case JSONTokenType.TRUE:
case JSONTokenType.FALSE:
case JSONTokenType.NULL:
return (token.value);
default:
tokenizer.parseError(("Unexpected " + token.value));
};
return (null);
}
private function nextToken():JSONToken{
return ((token = tokenizer.getNextToken()));
}
public function getValue(){
return (value);
}
private function parseArray():Array{
var _local1:Array = new Array();
nextToken();
if (token.type == JSONTokenType.RIGHT_BRACKET){
return (_local1);
};
while (true) {
_local1.push(parseValue());
nextToken();
if (token.type == JSONTokenType.RIGHT_BRACKET){
return (_local1);
};
if (token.type == JSONTokenType.COMMA){
nextToken();
} else {
tokenizer.parseError(("Expecting ] or , but found " + token.value));
};
};
return (null);
}
}
}//package com.adobe.serialization.json
Section 5
//JSONEncoder (com.adobe.serialization.json.JSONEncoder)
package com.adobe.serialization.json {
import flash.utils.*;
public class JSONEncoder {
private var jsonString:String;
public function JSONEncoder(_arg1){
jsonString = convertToString(_arg1);
}
private function escapeString(_arg1:String):String{
var _local3:String;
var _local6:String;
var _local7:String;
var _local2 = "";
var _local4:Number = _arg1.length;
var _local5:int;
while (_local5 < _local4) {
_local3 = _arg1.charAt(_local5);
switch (_local3){
case "\"":
_local2 = (_local2 + "\\\"");
break;
case "\\":
_local2 = (_local2 + "\\\\");
break;
case "\b":
_local2 = (_local2 + "\\b");
break;
case "\f":
_local2 = (_local2 + "\\f");
break;
case "\n":
_local2 = (_local2 + "\\n");
break;
case "\r":
_local2 = (_local2 + "\\r");
break;
case "\t":
_local2 = (_local2 + "\\t");
break;
default:
if (_local3 < " "){
_local6 = _local3.charCodeAt(0).toString(16);
_local7 = ((_local6.length == 2)) ? "00" : "000";
_local2 = (_local2 + (("\\u" + _local7) + _local6));
} else {
_local2 = (_local2 + _local3);
};
};
_local5++;
};
return ((("\"" + _local2) + "\""));
}
private function arrayToString(_arg1:Array):String{
var _local2 = "";
var _local3:int;
while (_local3 < _arg1.length) {
if (_local2.length > 0){
_local2 = (_local2 + ",");
};
_local2 = (_local2 + convertToString(_arg1[_local3]));
_local3++;
};
return ((("[" + _local2) + "]"));
}
public function getString():String{
return (jsonString);
}
private function objectToString(_arg1:Object):String{
var value:Object;
var key:String;
var v:XML;
var o = _arg1;
var s = "";
var classInfo:XML = describeType(o);
if (classInfo.@name.toString() == "Object"){
for (key in o) {
value = o[key];
if ((value is Function)){
} else {
if (s.length > 0){
s = (s + ",");
};
s = (s + ((escapeString(key) + ":") + convertToString(value)));
};
};
} else {
for each (v in classInfo..*.(((name() == "variable")) || ((name() == "accessor")))) {
if (s.length > 0){
s = (s + ",");
};
s = (s + ((escapeString(v.@name.toString()) + ":") + convertToString(o[v.@name])));
};
};
return ((("{" + s) + "}"));
}
private function convertToString(_arg1):String{
if ((_arg1 is String)){
return (escapeString((_arg1 as String)));
};
if ((_arg1 is Number)){
return ((isFinite((_arg1 as Number))) ? _arg1.toString() : "null");
} else {
if ((_arg1 is Boolean)){
return ((_arg1) ? "true" : "false");
} else {
if ((_arg1 is Array)){
return (arrayToString((_arg1 as Array)));
};
if ((((_arg1 is Object)) && (!((_arg1 == null))))){
return (objectToString(_arg1));
};
};
};
return ("null");
}
}
}//package com.adobe.serialization.json
Section 6
//JSONParseError (com.adobe.serialization.json.JSONParseError)
package com.adobe.serialization.json {
public class JSONParseError extends Error {
private var _location:int;
private var _text:String;
public function JSONParseError(_arg1:String="", _arg2:int=0, _arg3:String=""){
super(_arg1);
name = "JSONParseError";
_location = _arg2;
_text = _arg3;
}
public function get location():int{
return (_location);
}
public function get text():String{
return (_text);
}
}
}//package com.adobe.serialization.json
Section 7
//JSONToken (com.adobe.serialization.json.JSONToken)
package com.adobe.serialization.json {
public class JSONToken {
private var _value:Object;
private var _type:int;
public function JSONToken(_arg1:int=-1, _arg2:Object=null){
_type = _arg1;
_value = _arg2;
}
public function get value():Object{
return (_value);
}
public function get type():int{
return (_type);
}
public function set type(_arg1:int):void{
_type = _arg1;
}
public function set value(_arg1:Object):void{
_value = _arg1;
}
}
}//package com.adobe.serialization.json
Section 8
//JSONTokenizer (com.adobe.serialization.json.JSONTokenizer)
package com.adobe.serialization.json {
public class JSONTokenizer {
private var loc:int;
private var ch:String;
private var obj:Object;
private var jsonString:String;
public function JSONTokenizer(_arg1:String){
jsonString = _arg1;
loc = 0;
nextChar();
}
private function skipComments():void{
if (ch == "/"){
nextChar();
switch (ch){
case "/":
do {
nextChar();
} while (((!((ch == "\n"))) && (!((ch == "")))));
nextChar();
break;
case "*":
nextChar();
while (true) {
if (ch == "*"){
nextChar();
if (ch == "/"){
nextChar();
break;
};
} else {
nextChar();
};
if (ch == ""){
parseError("Multi-line comment not closed");
};
};
break;
default:
parseError((("Unexpected " + ch) + " encountered (expecting '/' or '*' )"));
};
};
}
private function isDigit(_arg1:String):Boolean{
return ((((_arg1 >= "0")) && ((_arg1 <= "9"))));
}
private function readString():JSONToken{
var _local3:String;
var _local4:int;
var _local1:JSONToken = new JSONToken();
_local1.type = JSONTokenType.STRING;
var _local2 = "";
nextChar();
while (((!((ch == "\""))) && (!((ch == ""))))) {
if (ch == "\\"){
nextChar();
switch (ch){
case "\"":
_local2 = (_local2 + "\"");
break;
case "/":
_local2 = (_local2 + "/");
break;
case "\\":
_local2 = (_local2 + "\\");
break;
case "b":
_local2 = (_local2 + "\b");
break;
case "f":
_local2 = (_local2 + "\f");
break;
case "n":
_local2 = (_local2 + "\n");
break;
case "r":
_local2 = (_local2 + "\r");
break;
case "t":
_local2 = (_local2 + "\t");
break;
case "u":
_local3 = "";
_local4 = 0;
while (_local4 < 4) {
if (!isHexDigit(nextChar())){
parseError((" Excepted a hex digit, but found: " + ch));
};
_local3 = (_local3 + ch);
_local4++;
};
_local2 = (_local2 + String.fromCharCode(parseInt(_local3, 16)));
break;
default:
_local2 = (_local2 + ("\\" + ch));
};
} else {
_local2 = (_local2 + ch);
};
nextChar();
};
if (ch == ""){
parseError("Unterminated string literal");
};
nextChar();
_local1.value = _local2;
return (_local1);
}
private function nextChar():String{
return ((ch = jsonString.charAt(loc++)));
}
public function getNextToken():JSONToken{
var _local2:String;
var _local3:String;
var _local4:String;
var _local1:JSONToken = new JSONToken();
skipIgnored();
switch (ch){
case "{":
_local1.type = JSONTokenType.LEFT_BRACE;
_local1.value = "{";
nextChar();
break;
case "}":
_local1.type = JSONTokenType.RIGHT_BRACE;
_local1.value = "}";
nextChar();
break;
case "[":
_local1.type = JSONTokenType.LEFT_BRACKET;
_local1.value = "[";
nextChar();
break;
case "]":
_local1.type = JSONTokenType.RIGHT_BRACKET;
_local1.value = "]";
nextChar();
break;
case ",":
_local1.type = JSONTokenType.COMMA;
_local1.value = ",";
nextChar();
break;
case ":":
_local1.type = JSONTokenType.COLON;
_local1.value = ":";
nextChar();
break;
case "t":
_local2 = ((("t" + nextChar()) + nextChar()) + nextChar());
if (_local2 == "true"){
_local1.type = JSONTokenType.TRUE;
_local1.value = true;
nextChar();
} else {
parseError(("Expecting 'true' but found " + _local2));
};
break;
case "f":
_local3 = (((("f" + nextChar()) + nextChar()) + nextChar()) + nextChar());
if (_local3 == "false"){
_local1.type = JSONTokenType.FALSE;
_local1.value = false;
nextChar();
} else {
parseError(("Expecting 'false' but found " + _local3));
};
break;
case "n":
_local4 = ((("n" + nextChar()) + nextChar()) + nextChar());
if (_local4 == "null"){
_local1.type = JSONTokenType.NULL;
_local1.value = null;
nextChar();
} else {
parseError(("Expecting 'null' but found " + _local4));
};
break;
case "\"":
_local1 = readString();
break;
default:
if (((isDigit(ch)) || ((ch == "-")))){
_local1 = readNumber();
} else {
if (ch == ""){
return (null);
};
parseError((("Unexpected " + ch) + " encountered"));
};
};
return (_local1);
}
private function skipWhite():void{
while (isWhiteSpace(ch)) {
nextChar();
};
}
public function parseError(_arg1:String):void{
throw (new JSONParseError(_arg1, loc, jsonString));
}
private function isWhiteSpace(_arg1:String):Boolean{
return ((((((((_arg1 == " ")) || ((_arg1 == "\t")))) || ((_arg1 == "\n")))) || ((_arg1 == "\r"))));
}
private function skipIgnored():void{
var _local1:int;
do {
_local1 = loc;
skipWhite();
skipComments();
} while (_local1 != loc);
}
private function isHexDigit(_arg1:String):Boolean{
var _local2:String = _arg1.toUpperCase();
return (((isDigit(_arg1)) || ((((_local2 >= "A")) && ((_local2 <= "F"))))));
}
private function readNumber():JSONToken{
var _local1:JSONToken = new JSONToken();
_local1.type = JSONTokenType.NUMBER;
var _local2 = "";
if (ch == "-"){
_local2 = (_local2 + "-");
nextChar();
};
if (!isDigit(ch)){
parseError("Expecting a digit");
};
if (ch == "0"){
_local2 = (_local2 + ch);
nextChar();
if (isDigit(ch)){
parseError("A digit cannot immediately follow 0");
};
} else {
while (isDigit(ch)) {
_local2 = (_local2 + ch);
nextChar();
};
};
if (ch == "."){
_local2 = (_local2 + ".");
nextChar();
if (!isDigit(ch)){
parseError("Expecting a digit");
};
while (isDigit(ch)) {
_local2 = (_local2 + ch);
nextChar();
};
};
if ((((ch == "e")) || ((ch == "E")))){
_local2 = (_local2 + "e");
nextChar();
if ((((ch == "+")) || ((ch == "-")))){
_local2 = (_local2 + ch);
nextChar();
};
if (!isDigit(ch)){
parseError("Scientific notation number needs exponent value");
};
while (isDigit(ch)) {
_local2 = (_local2 + ch);
nextChar();
};
};
var _local3:Number = Number(_local2);
if (((isFinite(_local3)) && (!(isNaN(_local3))))){
_local1.value = _local3;
return (_local1);
};
parseError((("Number " + _local3) + " is not valid!"));
return (null);
}
}
}//package com.adobe.serialization.json
Section 9
//JSONTokenType (com.adobe.serialization.json.JSONTokenType)
package com.adobe.serialization.json {
public class JSONTokenType {
public static const NUMBER:int = 11;
public static const FALSE:int = 8;
public static const RIGHT_BRACKET:int = 4;
public static const NULL:int = 9;
public static const TRUE:int = 7;
public static const RIGHT_BRACE:int = 2;
public static const UNKNOWN:int = -1;
public static const COMMA:int = 0;
public static const LEFT_BRACKET:int = 3;
public static const STRING:int = 10;
public static const LEFT_BRACE:int = 1;
public static const COLON:int = 6;
}
}//package com.adobe.serialization.json
Section 10
//IntUtil (com.adobe.utils.IntUtil)
package com.adobe.utils {
public class IntUtil {
private static var hexChars:String = "0123456789abcdef";
public static function toHex(_arg1:int, _arg2:Boolean=false):String{
var _local4:int;
var _local5:int;
var _local3 = "";
if (_arg2){
_local4 = 0;
while (_local4 < 4) {
_local3 = (_local3 + (hexChars.charAt(((_arg1 >> (((3 - _local4) * 8) + 4)) & 15)) + hexChars.charAt(((_arg1 >> ((3 - _local4) * 8)) & 15))));
_local4++;
};
} else {
_local5 = 0;
while (_local5 < 4) {
_local3 = (_local3 + (hexChars.charAt(((_arg1 >> ((_local5 * 8) + 4)) & 15)) + hexChars.charAt(((_arg1 >> (_local5 * 8)) & 15))));
_local5++;
};
};
return (_local3);
}
public static function ror(_arg1:int, _arg2:int):uint{
var _local3:int = (32 - _arg2);
return (((_arg1 << _local3) | (_arg1 >>> (32 - _local3))));
}
public static function rol(_arg1:int, _arg2:int):int{
return (((_arg1 << _arg2) | (_arg1 >>> (32 - _arg2))));
}
}
}//package com.adobe.utils
Section 11
//AdDisplay (com.newgrounds.AdDisplay)
package com.newgrounds {
import flash.events.*;
import flash.display.*;
import flash.net.*;
import flash.system.*;
public class AdDisplay extends Sprite {
private var _adURLLoader:URLLoader;
private var _ad:Loader;
private var _mask:Shape;
private static const REMOVED_FROM_STAGE:String = "removedFromStage";
private static var _currentAdUrl:URLRequest;
private static var _adResetTime:Number = 0;
public function AdDisplay(_arg1:String){
var adFeedURL = _arg1;
super();
var adRect:Shape = new Shape();
adRect.graphics.beginFill(0);
adRect.graphics.moveTo(0, 0);
adRect.graphics.lineTo(300, 0);
adRect.graphics.lineTo(300, 250);
adRect.graphics.lineTo(0, 250);
adRect.graphics.lineTo(0, 0);
adRect.graphics.endFill();
_mask = new Shape();
_mask.graphics.beginFill(0);
_mask.graphics.moveTo(0, 0);
_mask.graphics.lineTo(300, 0);
_mask.graphics.lineTo(300, 250);
_mask.graphics.lineTo(0, 250);
_mask.graphics.lineTo(0, 0);
_mask.graphics.endFill();
addChild(adRect);
addChild(_mask);
_adURLLoader = new URLLoader();
_adURLLoader.addEventListener(Event.COMPLETE, onAdFeedLoaded);
_adURLLoader.addEventListener(IOErrorEvent.IO_ERROR, onAdError);
_adURLLoader.addEventListener(SecurityErrorEvent.SECURITY_ERROR, onAdError);
if (((adFeedURL) && (hasAdElapsed))){
if (adFeedURL.indexOf("?") > -1){
_currentAdUrl = new URLRequest(((adFeedURL + "&random=") + Math.random()));
} else {
_currentAdUrl = new URLRequest(((adFeedURL + "?random=") + Math.random()));
};
};
if (_currentAdUrl){
try {
_adURLLoader.load(_currentAdUrl);
} catch(e:Error) {
onAdError(null);
};
} else {
trace("[NewgroundsAPI] :: No ad feed URL supplied to Newgrounds API ad!");
};
if (NewgroundsAPI.isFlashVersion(9, 0, 28)){
addEventListener(REMOVED_FROM_STAGE, onRemovedFromStage);
};
}
private function onAdFeedLoaded(_arg1:Event):void{
var _local2:URLLoader = URLLoader(_arg1.target);
if (_local2.data){
loadAd(String(_local2.data));
} else {
dispatchEvent(new APIEvent(APIEvent.AD_ATTACHED, false, new APIError("FLASH_ADS_NOT_APPROVED", "Unable to render ad")));
};
}
private function onAdError(_arg1:Event):void{
dispatchEvent(new APIEvent(APIEvent.AD_ATTACHED, false, new APIError("FLASH_ADS_NOT_APPROVED", "Unable to render ad")));
removeAd();
}
private function onAdFeedError(_arg1:Event):void{
trace("[NewgroundsAPI] :: Unable to load ad feed!");
}
private function loadAd(_arg1:String):void{
_arg1 = "http://server.cpmstar.com/adviewas2.swf?poolid=731&subpoolid=10077";
if (_ad){
removeAd();
};
_ad = new Loader();
addChild(_ad);
trace(_arg1);
_ad.contentLoaderInfo.addEventListener(Event.COMPLETE, onAdLoaded);
_ad.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, onAdError);
_ad.load(new URLRequest(_arg1), new LoaderContext(false, new ApplicationDomain(null)));
}
private function onAdLoaded(_arg1:Event):void{
trace("[NewgroundsAPI] :: Ad loaded!");
dispatchEvent(new APIEvent(APIEvent.AD_ATTACHED, true));
}
public function removeAd():void{
removeEventListener(REMOVED_FROM_STAGE, onRemovedFromStage);
if (_adURLLoader){
try {
_adURLLoader.close();
} catch(e:Error) {
};
};
if (_ad){
trace("[NewgroundsAPI] :: Ad removed");
try {
_ad.close();
} catch(e:Error) {
};
try {
Object(_ad).unloadAndStop(true);
} catch(e:Error) {
_ad.unload();
};
if (_ad.parent){
_ad.parent.removeChild(_ad);
};
};
_ad = null;
}
private function onRemovedFromStage(_arg1:Event):void{
removeAd();
}
private function get hasAdElapsed():Boolean{
var _local1:Date = new Date();
if (_local1.getTime() >= _adResetTime){
_adResetTime = (_local1.getTime() + ((1000 * 60) * 5));
return (true);
};
return (false);
}
}
}//package com.newgrounds
Section 12
//APIError (com.newgrounds.APIError)
package com.newgrounds {
import flash.utils.*;
public class APIError {
public var alias:String;
public var message:String;
public var name:String;
public var code:Number;// = 0
private static const always_caps:Array = new Array("API", "URL", "ID");
public static const error_names:Object = init_names();
public static const aliases:Array = new Array("UNKNOWN_ERROR", "INVALID_API_ID", "MISSING_PARAM", "INVALID_STAT_ID", "INVALID_COMMAND_ID", "FLASH_ADS_NOT_APPROVED", "PERMISSION_DENIED", "IDENTIFICATION_REQUIRED", "INVALID_EMAIL_ADDRESS", "BANNED_USER", "SESSION_EXPIRED", "INVALID_SCORE", "INVALID_MEDAL", "INVALID_FOLDER", "FILE_NOT_FOUND", "SITE_ID_REQUIRED", "UPLOAD_IN_PROGRESS", "USER_CANCELLED", "CONFIRM_REQUEST", "CONNECTION_FAILED");
public static const error_codes:Object = init_codes();
public function APIError(_arg1, _arg2:String){
if ((_arg1 is String)){
_arg1 = error_codes[_arg1];
} else {
if (!(_arg1 is uint)){
_arg1 = 0;
};
};
code = _arg1;
message = _arg2;
name = error_names[_arg1];
alias = aliases[_arg1];
}
public function isError():Boolean{
return (true);
}
private static function init_names():Array{
var _local3:Array;
var _local4:uint;
var _local5:String;
var _local1:Array = new Array();
var _local2:uint;
while (_local2 < aliases.length) {
_local3 = aliases[_local2].toLowerCase().split("_");
_local4 = 0;
while (_local4 < _local3.length) {
_local3[_local4] = (_local3[_local4].substr(0, 1).toUpperCase() + _local3[_local4].substr(1, _local3[_local4].length));
for each (_local5 in always_caps) {
if (_local3[_local4].toUpperCase() == _local5){
_local3[_local4] = _local3[_local4].toUpperCase();
};
};
_local4++;
};
_local1[_local2] = _local3.join(" ");
_local2++;
};
return (_local1);
}
public static function init_codes():Dictionary{
var _local1:Dictionary = new Dictionary();
var _local2:uint;
while (_local2 < aliases.length) {
_local1[aliases[_local2]] = _local2;
_local2++;
};
return (_local1);
}
}
}//package com.newgrounds
Section 13
//APIEvent (com.newgrounds.APIEvent)
package com.newgrounds {
import flash.events.*;
public class APIEvent extends Event {
private var _success:Boolean;
private var _target;
private var _data;
public static const AD_ATTACHED:String = "adAttached";
public static const FILE_PRIVS_LOADED:String = "filePrivsLoaded";
public static const ADS_APPROVED:String = "adsApproved";
public static const MEDALS_LOADED:String = "medalsLoaded";
public static const MEDAL_UNLOCKED:String = "medalUnlocked";
public static const METADATA_LOADED:String = "metadataLoaded";
public static const NEW_VERSION_AVAILABLE:String = "newVersionAvailable";
public static const FILE_SAVED:String = "fileSaved";
public static const EVENT_LOGGED:String = "eventLogged";
public static const SCORE_POSTED:String = "scorePosted";
public static const VOTE_COMPLETE:String = "voteComplete";
public static const FILE_LOADED:String = "fileLoaded";
public static const QUERY_COMPLETE:String = "queryComplete";
public static const SCORES_LOADED:String = "scoresLoaded";
public static const HOST_BLOCKED:String = "hostBlocked";
public static const MOVIE_CONNECTED:String = "movieConnected";
public function APIEvent(_arg1:String, _arg2:Boolean=true, _arg3=undefined){
super(_arg1);
_data = _arg3;
_success = _arg2;
}
public function get data(){
return (_data);
}
public function get success():Boolean{
return (_success);
}
}
}//package com.newgrounds
Section 14
//BaseN (com.newgrounds.BaseN)
package com.newgrounds {
import flash.utils.*;
public class BaseN {
private var _hashVal:Dictionary;
private var _hashIndex:String;
private var _base:Number;
public function BaseN(_arg1:String=null){
if (_arg1){
_hashIndex = _arg1;
} else {
_hashIndex = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ`~@#$%^&*()+|;/";
};
_base = _hashIndex.length;
_hashVal = new Dictionary();
var _local2:uint;
while (_local2 < _base) {
_hashVal[_hashIndex.charAt(_local2)] = _local2;
_local2++;
};
}
public function encode(_arg1:Number, _arg2:uint=1):String{
var _local3:String = _arg1.toString();
var _local4 = "";
if (_local3.charAt(0) == "-"){
_local4 = "-";
_local3 = _local3.substring(1);
};
var _local5:Array = _local3.split(".", 2);
_local4 = (_local4 + baseNEncoder(_local5[0], _arg2));
if (_local5.length > 1){
_local4 = (_local4 + ("." + baseNEncoder(_local5[1])));
};
return (_local4);
}
private function baseNDecoder(_arg1:String):uint{
var _local2:uint;
var _local3:uint;
while (_local3 < _arg1.length) {
_local2 = (_local2 * _base);
_local2 = (_local2 + _hashVal[_arg1.charAt(_local3)]);
_local3++;
};
return (_local2);
}
public function decode(_arg1:String):Number{
var _local2 = "";
if (_arg1.charAt(0) == "-"){
_local2 = "-";
_arg1 = _arg1.substring(1);
};
var _local3:Array = _arg1.split(".", 2);
_local2 = (_local2 + baseNDecoder(_local3[0]));
if (_local3.length > 1){
_local2 = (_local2 + ".");
_local2 = (_local2 + baseNDecoder(_local3[1]));
};
return (Number(_local2));
}
private function baseNEncoder(_arg1:uint, _arg2:uint=1):String{
var _local3 = "";
var _local4:uint = _arg1;
while (_local4 != 0) {
_local3 = (_hashIndex.charAt((_local4 % _base)) + _local3);
_local4 = (_local4 / _base);
};
if (_arg2){
while (_local3.length < _arg2) {
_local3 = (_hashIndex.charAt(0) + _local3);
};
};
return (_local3);
}
}
}//package com.newgrounds
Section 15
//Medal (com.newgrounds.Medal)
package com.newgrounds {
import flash.events.*;
import flash.display.*;
import flash.net.*;
import flash.system.*;
public class Medal {
private var _unlocked:Boolean;// = false
private var _iconLoader:Loader;
private var _difficultyId:uint;
private var _icon:BitmapData;
private var _value:uint;
private var _iconUrl:URLRequest;
private var _name:String;
private var _id:uint;
private static const DIFFICULT_NAMES:Array = [null, "Easy", "Moderate", "Challenging", "Difficult", "Brutal"];
private static const DEFAULT_ICON:BitmapData = new BitmapData(50, 50, false, 0);
public function Medal(_arg1:uint, _arg2:String, _arg3:uint, _arg4:uint, _arg5:Boolean, _arg6:String){
var id = _arg1;
var name = _arg2;
var value = _arg3;
var difficulty = _arg4;
var unlocked = _arg5;
var iconUrl = _arg6;
_icon = DEFAULT_ICON;
super();
_id = id;
_name = name;
_value = value;
_difficultyId = difficulty;
_unlocked = unlocked;
if (iconUrl){
_iconUrl = new URLRequest(iconUrl);
_iconLoader = new Loader();
_iconLoader.contentLoaderInfo.addEventListener(Event.INIT, onIconLoaderInit);
_iconLoader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, onIconLoaderError);
_iconLoader.contentLoaderInfo.addEventListener(SecurityErrorEvent.SECURITY_ERROR, onIconLoaderError);
_iconLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, onIconLoaderComplete);
try {
_iconLoader.load(_iconUrl, new LoaderContext(true));
} catch(e:Error) {
onIconLoaderError(null);
};
};
}
public function get icon():BitmapData{
return (_icon);
}
public function set unlocked(_arg1:Boolean):void{
_unlocked = _arg1;
}
public function get bytesLoaded():uint{
return ((_iconLoader) ? _iconLoader.contentLoaderInfo.bytesLoaded : 0);
}
public function get name():String{
return (_name);
}
private function onIconLoaderComplete(_arg1:Event):void{
trace((((("[NewgroundsAPI] :: Successfully loaded medal icon for " + name) + " (") + _iconUrl.url.split("/").pop()) + ")"));
var _local2:Bitmap = (_iconLoader.content as Bitmap);
_icon = _local2.bitmapData;
_iconLoader.unload();
_iconLoader = null;
}
public function get bytesTotal():uint{
return ((_iconLoader) ? _iconLoader.contentLoaderInfo.bytesTotal : 0);
}
public function get id():uint{
return (_id);
}
public function unlock():void{
if (!_unlocked){
NewgroundsAPI.unlockMedal(this);
};
}
private function onIconLoaderError(_arg1:IOErrorEvent):void{
trace((((("[NewgroundsAPI WARNING] :: Failed to load medal icon for " + name) + " (") + _iconUrl.url.split("/").pop()) + ")"));
_iconLoader.unload();
_iconLoader = null;
}
private function onIconLoaderInit(_arg1:Event):void{
trace((((("[NewgroundsAPI] :: Loading medal icon for " + name) + " (") + _iconUrl.url.split("/").pop()) + ")"));
}
public function get unlocked():Boolean{
return (_unlocked);
}
public function createIconBitmap():Bitmap{
return (new Bitmap(icon));
}
public function toString():String{
return (_name);
}
public function get value():uint{
return (_value);
}
public function get difficultyId():uint{
return (_difficultyId);
}
public function get difficulty():String{
return (DIFFICULT_NAMES[_difficultyId]);
}
public static function createFromObject(_arg1:Object):Medal{
return (new Medal(_arg1.medal_id, _arg1.medal_name, _arg1.medal_value, _arg1.medal_difficulty, _arg1.medal_unlocked, _arg1.medal_icon));
}
}
}//package com.newgrounds
Section 16
//NewgroundsAPI (com.newgrounds.NewgroundsAPI)
package com.newgrounds {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import com.adobe.serialization.json.*;
import com.adobe.images.*;
import flash.net.*;
import com.adobe.crypto.*;
import flash.system.*;
public class NewgroundsAPI {
private static const COMMANDS_WIKI_URL:String = "http://www.newgrounds.com/wiki/flashapi/commands/";
private static const AD_TERMS_URL:String = "http://www.newgrounds.com/wiki/flashads/terms/";
private static const GATEWAY_URL:String = "http://www.ngads.com/gateway_v2.php";
private static var connected:Boolean;
private static var user_id:uint;
private static var _initialized:Boolean = false;
private static var user_email:String;
private static var _saveFilePath:String;
private static var publisher_id:uint;
private static var debug:Boolean;
private static var do_echo:Boolean = false;
private static var ad_url:String;
private static var _saveGroups:Array = [];
private static var session_id:String;
public static var errors:Dictionary = APIError.init_codes();
private static var timeoutTimer:Timer = new Timer(8000, 1);
private static var _medals:Array;
private static var user_name:String;
private static var period_aliases:Object = {t:{name:"Today", alias:"TODAY"}, p:{name:"Yesterday", alias:"YESTERDAY"}, w:{name:"This Week", alias:"THIS_WEEK"}, m:{name:"This Month", alias:"THIS_MONTH"}, y:{name:"This Year", alias:"THIS_YEAR"}, a:{name:"All-Time", alias:"ALL_TIME"}};
private static var tracker_id:uint;
private static var movie_id:String;
private static var _scoreboards:Array = new Array();
private static var _eventDispatcher:EventDispatcher = new EventDispatcher();
private static var encryption_key:String;
private static var host:String;
private static var compressor:BaseN = new BaseN(compression_radix);
private static var score_page_counts:Object = new Object();
private static var _adsApproved:Boolean = false;
private static var _preload:Boolean = true;
private static var version:String;
public static var periods:Object = getPeriodAliases();
private static var root:DisplayObject;
private static var _inSaveQuery:Boolean;
private static var compression_radix:String = "/g8236klvBQ#&|;Zb*7CEA59%s`Oue1wziFp$rDVY@TKxUPWytSaGHJ>dmoMR^<0~4qNLhc(I+fjn)X";
private static var _preloadAssets:Array = [];
private static var sharedObjects:Object = new Object();
private static var _saveFile:SaveFile;
public static function setMovieVersion(_arg1:String):void{
if (((_arg1) && (!((_arg1 == ""))))){
version = _arg1;
};
}
public static function get preload():Boolean{
return (_preload);
}
public static function unlockMedal(_arg1:Medal, _arg2:Boolean=false):void{
var _local3:Object;
var _local4:Object;
if (!_arg1){
sendError({command_id:getCommandID("unlockMedal")}, new APIError("MISSING_PARAM", "missing required medal name"));
return;
};
if (((hasUserSession()) || (debugMode))){
sendMessage((("Attempting to unlock '" + _arg1.name) + "'"));
if (_arg1.unlocked){
sendWarning((("Medal '" + _arg1.name) + "' is already unlocked!"));
return;
};
_local3 = new Object();
_local3.medal_id = _arg1.id;
if (_arg2){
_local3.get_score = _arg2;
};
sendSecureCommand("unlockMedal", _local3);
} else {
sendMessage(("Locally unlocking " + _arg1.name));
if (_arg1.unlocked){
sendWarning((("Medal '" + _arg1.name) + "' is already unlocked!"));
return;
};
_arg1.unlocked = true;
_local4 = loadLocal("medals_unlocked");
if (!_local4){
_local4 = new Object();
};
_local4[_arg1.id.toString()] = true;
saveLocal("medals_unlocked", _local4);
callListener(APIEvent.MEDAL_UNLOCKED, true, _arg1);
};
}
public static function set preload(_arg1:Boolean):void{
_preload = _arg1;
}
private static function getHost():String{
return (host);
}
private static function uncompressHex(_arg1:String):String{
var _local4:uint;
var _local6:String;
var _local7:uint;
var _local8:String;
var _local2:uint = uint(_arg1.charAt(0));
var _local3 = "";
var _local5:uint = 1;
while (_local5 < _arg1.length) {
_local6 = _arg1.substr(_local5, 4);
_local7 = uint(compressor.decode(_local6));
_local8 = _local7.toString(16);
if ((_local5 + 4) < _arg1.length){
_local4 = 6;
} else {
_local4 = _local2;
};
while (_local8.length < _local4) {
_local8 = ("0" + _local8);
};
_local3 = (_local3 + _local8);
_local5 = (_local5 + 4);
};
return (_local3);
}
public static function isFlashVersion(_arg1:uint, _arg2:uint=0, _arg3:uint=0, _arg4:uint=0):Boolean{
var _local6:Array = Capabilities.version.split(" ")[1].split(",");
var _local7:Array = arguments;
var _local8:uint;
while (_local8 < _local7.length) {
_local6[_local8] = uint(_local6[_local8]);
_local8++;
};
_local8 = 0;
while (_local8 < _local7.length) {
if (_local6[_local8] > _local7[_local8]){
return (true);
};
if (_local6[_local8] < _local7[_local8]){
return (false);
};
_local8++;
};
return (true);
}
public static function getMedalByName(_arg1:String):Medal{
var _local2:Medal;
for each (_local2 in _medals) {
if (_local2.name == _arg1){
return (_local2);
};
};
return (null);
}
public static function hasUserEmail():Boolean{
return (((!((user_email == null))) && (!((user_email == "")))));
}
public static function loadLocal(_arg1:String){
var sharedObj:SharedObject;
var save_id = _arg1;
try {
if (!sharedObjects[save_id]){
sharedObjects[save_id] = SharedObject.getLocal(((("ng_ap_secure_" + movie_id) + "_") + save_id));
};
sharedObj = sharedObjects[save_id];
if (((((sharedObj) && (sharedObj.data))) && (sharedObj.data[save_id]))){
return (decodeData(sharedObj.data[save_id]));
} else {
return (null);
};
} catch(e:Error) {
sendWarning(("loadLocal ERROR: " + e));
return (null);
};
}
private static function callListener(_arg1:String, _arg2:Boolean=true, _arg3=undefined):void{
dispatchEvent(new APIEvent(_arg1, _arg2, _arg3));
}
public static function sendSecureCommand(_arg1:String, _arg2:Object, _arg3:Object=null, _arg4:Object=null, _arg5=null):void{
if (((((!(debug)) && (!(hasUserSession())))) && (!(hasUserEmail())))){
sendError({command_id:getCommandID(_arg1)}, new APIError("IDENTIFICATION_REQUIRED", (("You must be logged in or provide an e-mail address ( using NewgroundsAPI.setUserEmail(\"name@domain.com\"); ) to use " + _arg1) + "().")));
return;
};
if (!_arg1){
fatalError("Missing command", "sendSecureCommand");
};
if (!_arg2){
fatalError("Missing secure_params", "sendSecureCommand");
};
if (!_arg3){
_arg3 = new Object();
};
var _local6 = "";
var _local7:uint;
while (_local7 < 16) {
_local6 = (_local6 + compression_radix.charAt(Math.floor((Math.random() * compression_radix.length))));
_local7++;
};
if (((debug) && (!(session_id)))){
_arg2.session_id = "";
} else {
_arg2.session_id = session_id;
};
_arg2.as_version = 3;
_arg2.user_email = user_email;
_arg2.publisher_id = publisher_id;
_arg2.seed = _local6;
_arg2.command_id = getCommandID(_arg1);
var _local8:String = MD5.hash(_local6);
var _local9:String = RC4.encrypt(JSON.encode(_arg2), encryption_key);
var _local10:String = (_local8 + _local9);
_arg3.secure = compressHex(_local10);
sendCommand("securePacket", _arg3, false, _arg4, _arg5);
}
private static function echo(_arg1:String):void{
if (do_echo){
trace(_arg1);
};
}
private static function populateScoreBoards(_arg1:Array):void{
_scoreboards = [];
var _local2:uint;
while (_local2 < _arg1.length) {
_scoreboards.push(new ScoreBoard(_arg1[_local2].id, _arg1[_local2].name));
_local2++;
};
}
private static function populateSaveGroups(_arg1:Array):void{
var _local3:SaveGroup;
_saveGroups = [];
var _local2:uint;
while (_local2 < _arg1.length) {
_local3 = SaveGroup.createFromObject(_arg1[_local2]);
_saveGroups.push(_local3);
_local2++;
};
}
public static function createAd():AdDisplay{
sendMessage("You may see a security sandbox violation. This is normal!");
return (new AdDisplay(ad_url));
}
public static function getSaveGroupById(_arg1:uint):SaveGroup{
if (((!(_saveGroups)) || ((_saveGroups.length < 1)))){
sendWarning("No save groups found");
return (null);
};
var _local2:uint;
while (_local2 < _saveGroups.length) {
if (_saveGroups[_local2].id == _arg1){
return (_saveGroups[_local2]);
};
_local2++;
};
return (null);
}
private static function dispatchEvent(_arg1:Event):void{
_eventDispatcher.dispatchEvent(_arg1);
echo(("Fired Event: " + _arg1.type));
}
public static function removeEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false):void{
_eventDispatcher.removeEventListener(_arg1, _arg2, _arg3);
}
public static function addEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false, _arg4:uint=0, _arg5:Boolean=false):void{
_eventDispatcher.addEventListener(_arg1, _arg2, _arg3, _arg4, _arg5);
}
private static function getPeriodAliases():Object{
var _local2:String;
var _local1:Object = new Object();
for (_local2 in period_aliases) {
_local1[period_aliases[_local2].alias] = _local2;
};
return (_local1);
}
public static function setUserEmail(_arg1:String):void{
user_email = _arg1;
}
public static function hasUserSession():Boolean{
return (((((!((session_id == null))) && (!((session_id == ""))))) && (!((publisher_id == 0)))));
}
public static function executeSaveQuery(_arg1:SaveGroupQuery):void{
sendCommand("lookupSaveFiles", {publisher_id:publisher_id, group_id:_arg1.groupId, query:JSON.encode(_arg1.toObject())}, false, null, _arg1);
trace(JSON.encode(_arg1.toObject()));
}
private static function getCommandName(_arg1:String):String{
return (_arg1);
}
public static function getScoreBoardById(_arg1:uint):ScoreBoard{
var _local2:ScoreBoard;
for each (_local2 in _scoreboards) {
if (_local2.id == _arg1){
return (_local2);
};
};
return (null);
}
private static function compressHex(_arg1:String):String{
var _local2:uint = (_arg1.length % 6);
var _local3 = "";
var _local4:uint;
while (_local4 < _arg1.length) {
_local3 = (_local3 + compressor.encode(uint(("0x" + _arg1.substr(_local4, 6))), 4));
_local4 = (_local4 + 6);
};
return ((_local2.toString() + _local3));
}
public static function get medals():Array{
return ((_medals) ? _medals.concat() : []);
}
public static function connectMovie(_arg1:LoaderInfo, _arg2:String, _arg3:String):void{
if (!_arg1){
fatalError("Null loaderInfo paremeter passed in to connectMovie!", "");
return;
};
host = _arg1.url;
if ((((host.indexOf("http://") > -1)) || ((host.indexOf("https://") > -1)))){
host = host.split("/")[2].toLowerCase();
} else {
host = "localhost";
};
var _local4:Object = _arg1.parameters;
debug = !(isPublishedHost());
if (((!(debug)) && (_local4))){
if (_local4.NewgroundsAPI_UserName){
user_name = _local4.NewgroundsAPI_UserName;
};
if (_local4.NewgroundsAPI_UserID){
user_id = _local4.NewgroundsAPI_UserID;
};
if (_local4.NewgroundsAPI_PublisherID){
publisher_id = _local4.NewgroundsAPI_PublisherID;
};
if (_local4.NewgroundsAPI_SessionID){
session_id = _local4.NewgroundsAPI_SessionID;
};
} else {
publisher_id = 1;
session_id = "D3bu64p1U53R";
user_id = 10;
user_name = "API-Debugger";
};
if (connected){
return;
};
timeoutTimer.start();
if (!_arg2){
fatalError("NewgroundsAPI.connectMovie() - missing required movie_id parameter", "connectMovie");
};
movie_id = String(_arg2);
tracker_id = uint(movie_id.substring(0, movie_id.indexOf(":")));
encryption_key = _arg3;
connected = true;
sendCommand("connectMovie", {host:getHost(), movie_version:version});
}
private static function sendError(_arg1:Object, _arg2:APIError):void{
trace(((((("[NewgroundsAPI ERROR] :: " + getCommandName(_arg1.command_id)) + "() - ") + _arg2.name) + ":\n\t\t\t\t") + _arg2.message));
}
public static function sendMessage(_arg1:String, _arg2:Boolean=false):void{
var _local3:String = ("[NewgroundsAPI] :: " + _arg1);
trace(_local3);
}
public static function newSaveFile(_arg1:String):SaveFile{
var _local2:SaveGroup = getSaveGroupByName(_arg1);
if (_local2){
return (new SaveFile(_local2));
};
sendError({command_id:"newSaveFile"}, new APIError("INVALID_SAVE_GROUP", (("'" + _local2) + "' is not a valid save group.")));
return (null);
}
public static function get bytesLoaded():uint{
var _local2:*;
var _local1:uint = root.loaderInfo.bytesLoaded;
if (_preload){
for each (_local2 in _preloadAssets) {
_local1 = (_local1 + _local2.bytesLoaded);
};
};
return (_local1);
}
public static function unlockMedalByName(_arg1:String, _arg2:Boolean=false):void{
trace("B");
var _local3:Medal = getMedalByName(_arg1);
if (_local3){
unlockMedal(_local3, _arg2);
};
}
static function reportAssetFailed(_arg1):void{
var _local2:uint;
while (_local2 < _preloadAssets.length) {
if (_arg1 == _preloadAssets[_local2]){
_preloadAssets.splice(_local2, 1);
return;
};
_local2++;
};
}
public static function connectionTimeOut(_arg1:Event=null):void{
dispatchEvent(new APIEvent(APIEvent.MOVIE_CONNECTED, false, new APIError("CONNECTION_FAILED", "Connection to NewgroundsAPI gateway timed out.")));
}
static function reportNewAsset(_arg1):void{
_preloadAssets.push(_arg1);
}
public static function unlockMedalById(_arg1:uint, _arg2:Boolean=false):void{
trace("A");
var _local3:Medal = getMedalById(_arg1);
if (_local3){
unlockMedal(_local3, _arg2);
};
}
private static function fatalError(_arg1:String, _arg2:String):void{
if (_arg2){
_arg1 = (_arg1 + ((("\n\tSee " + COMMANDS_WIKI_URL) + _arg2.toLowerCase()) + " for additional information."));
};
throw (new Error(("***ERROR*** class=NewgroundsAPI\n\n" + _arg1)));
}
public static function get adsApproved():Boolean{
return (_adsApproved);
}
public static function hasPublisher():Boolean{
return (!((publisher_id == 0)));
}
public static function getScoreBoardByName(_arg1:String):ScoreBoard{
var _local2:ScoreBoard;
for each (_local2 in _scoreboards) {
if (_local2.name == _arg1){
return (_local2);
};
};
return (null);
}
private static function sendNotice(_arg1:String, _arg2:String=null):void{
if (_arg2){
_arg1 = (_arg1 + ((("\n[NewgroundsAPI NOTICE] :: \tSee " + COMMANDS_WIKI_URL) + _arg2.toLowerCase()) + " for additional information."));
};
trace(("[NewgroundsAPI NOTICE] :: " + _arg1));
}
public static function get debugMode():Boolean{
return (debug);
}
public static function loadCustomLink(_arg1:String):void{
sendCommand("loadCustomLink", {host:getHost(), link:_arg1}, true);
}
public static function get bytesTotal():uint{
var _local2:*;
var _local1:uint = root.loaderInfo.bytesTotal;
if (_preload){
for each (_local2 in _preloadAssets) {
_local1 = (_local1 + Math.max(_local2.bytesTotal, 1));
};
};
return (_local1);
}
public static function checkFilePrivledges(_arg1:SaveFile):void{
sendCommand("checkFilePrivs", {group:_arg1.groupId, filename:_arg1.name, user_id:(user_id) ? user_id : 0, publisher_id:publisher_id});
}
public static function get percentLoaded():Number{
return ((bytesLoaded / bytesTotal));
}
public static function isPublishedHost():Boolean{
return (((!((getHost() == "localhost"))) && ((getHost().indexOf("file://") == -1))));
}
private static function assertInitialized():Boolean{
if (!_initialized){
return (false);
};
return (true);
}
public static function createSaveQuery(_arg1:String):SaveGroupQuery{
var _local2:SaveGroup = getSaveGroupByName(_arg1);
if (_local2){
return (_local2.createQuery());
};
return (null);
}
public static function loadMySite():void{
sendCommand("loadMySite", {host:getHost()});
}
public static function getMedalById(_arg1:uint):Medal{
var _local2:Medal;
for each (_local2 in _medals) {
if (_local2.id == _arg1){
return (_local2);
};
};
return (null);
}
public static function getOfficialVersionURL():String{
var _local1:String = ((((((GATEWAY_URL + "?tracker_id=") + movie_id) + "&command_id=") + getCommandID("loadOfficalVersion")) + "&seed=") + Math.random());
if (debug){
_local1 = (_local1 + "&debug=1");
};
return (_local1);
}
public static function loadNewgrounds():void{
sendCommand("loadNewgrounds", {host:getHost()}, true);
}
public static function saveFile(_arg1:SaveFile, _arg2:Boolean=false):void{
var _local3:Object = _arg1.toObject();
_local3.user_name = user_name;
_local3.overwrite = (_arg2) ? 1 : 0;
var _local4:ByteArray = new ByteArray();
if ((_arg1.contents is ByteArray)){
_local4.writeByte(0);
_local4.writeBytes(_arg1.contents);
} else {
_local4.writeByte(1);
_local4.writeObject(_arg1.contents);
};
_local4.compress();
var _local5:Object = new Object();
_local5.file = _local4;
if (_arg1.thumbnail){
_local5.thumbnail = PNGEncoder.encode(_arg1.thumbnail);
};
sendSecureCommand("saveFile", _local3, null, _local5, _arg1);
}
public static function loadScores(_arg1:ScoreBoard):void{
var _local2 = "loadScores";
if (!_arg1.id){
sendError({command_id:getCommandID(_local2)}, new APIError("MISSING_PARAM", "missing required ScoreBoard instance"));
return;
};
if (!hasUserSession()){
callListener(APIEvent.SCORES_LOADED, false, new APIError("SITE_ID_REQUIRED", (("Host '" + getHost()) + "' does not have high scores enabled")));
return;
};
var _local3:Object = {};
_local3.publisher_id = publisher_id;
_local3.period = _arg1.period;
_local3.board = _arg1.id;
_local3.num_results = _arg1.num_results;
_local3.page = _arg1.page;
sendCommand(_local2, _local3);
}
public static function rateSaveFile(_arg1:SaveFile, _arg2:SaveRating, _arg3:Number):void{
sendSecureCommand("rateSaveFile", {group:_arg1.groupId, save_id:_arg1.id, rating_id:_arg2.id, vote:_arg3, user_id:user_id}, null, null, _arg1);
}
public static function logCustomEvent(_arg1:String):void{
sendCommand("logCustomEvent", {host:getHost(), event:_arg1});
}
public static function decodeData(_arg1:String){
return (JSON.decode(RC4.decrypt(uncompressHex(_arg1), encryption_key)));
}
public static function postScore(_arg1:String, _arg2:uint, _arg3:Boolean=false):void{
if (((((!(_arg1)) || ((_arg1 == "")))) || (isNaN(_arg2)))){
sendError({command_id:getCommandID("postScore")}, new APIError("MISSING_PARAM", "missing required parameter(s)"));
return;
};
sendSecureCommand("postScore", {user_name:user_name, board:_arg1, value:_arg2, get_best:_arg3, publisher_id:publisher_id});
}
private static function onCommandComplete(_arg1:Event):void{
var _local4:Object;
var _local5:APIError;
var _local2:SmartURLLoader = SmartURLLoader(_arg1.target);
echo((("INPUT: \n" + _local2.response) + "\n"));
var _local3:uint;
while (_local3 < _preloadAssets.length) {
if (_preloadAssets[_local3] == _local2){
_preloadAssets.splice(_local3, 1);
break;
};
_local3++;
};
if (_local2.response){
_local4 = JSON.decode(_local2.response);
} else {
_local4 = {success:false};
};
if (!_local4.success){
trace(("Error: " + _local4));
_local5 = new APIError(_local4.error_code, _local4.error_msg);
sendError(_local4, _local5);
} else {
_local4.owner = _local2.owner;
doEvent(_local4);
};
}
private static function sendCommand(_arg1:String, _arg2:Object, _arg3:Boolean=false, _arg4:Object=null, _arg5=null):void{
var _local7:String;
var _local8:String;
var _local9:String;
if (((!(connected)) && (!((_arg1 == "connectMovie"))))){
_local7 = (("NewgroundsAPI." + _arg1) + "() - NewgroundsAPI.connectMovie() must be called before this command can be called\n");
fatalError(_local7, "connectMovie");
};
var _local6:SmartURLLoader = new SmartURLLoader();
_local6.addVariable("command_id", getCommandID(_arg1));
_local6.addVariable("tracker_id", movie_id);
if (debug){
_local6.addVariable("debug", 1);
};
if ((((_arg1 == "connectMovie")) && (preload))){
_local6.addVariable("preload", 1);
};
if (_arg2){
for (_local8 in _arg2) {
_local6.addVariable(_local8, _arg2[_local8]);
};
};
if (_arg4){
for (_local9 in _arg4) {
_local6.addFile(_local9, _arg4[_local9], _local9);
};
};
if (_arg3){
_local6.method = URLRequestMethod.GET;
} else {
_local6.method = URLRequestMethod.POST;
};
_local6.preventCache = true;
if (_arg3){
_local6.openBrowser = true;
_local6.method = URLRequestMethod.GET;
} else {
_local6.addEventListener(Event.COMPLETE, onCommandComplete);
_local6.addEventListener(IOErrorEvent.IO_ERROR, onCommandError);
_local6.addEventListener(SecurityErrorEvent.SECURITY_ERROR, onCommandError);
_local6.method = URLRequestMethod.POST;
};
_local6.owner = _arg5;
_local6.load(GATEWAY_URL);
}
public static function encodeData(_arg1:Object):String{
return (compressHex(RC4.encrypt(JSON.encode(_arg1), encryption_key)));
}
private static function populateMedals(_arg1:Array):void{
var _local2:uint;
var _local3:Object;
if (_medals === null){
_medals = new Array();
_local2 = 0;
while (_local2 < _arg1.length) {
_local3 = _arg1[_local2];
_medals.push(Medal.createFromObject(_local3));
_local2++;
};
};
}
public static function getPeriodAlias(_arg1:String):String{
var _local2:String;
for (_local2 in period_aliases) {
if (_local2 == _arg1){
return (period_aliases[_local2].alias);
};
};
return (null);
}
public static function loadMedals():void{
if (_medals){
dispatchEvent(new APIEvent(APIEvent.MEDALS_LOADED, true, medals));
return;
};
var _local1:Object = new Object();
if (hasUserSession()){
_local1.publisher_id = publisher_id;
_local1.user_id = user_id;
};
sendCommand("getMedals", _local1);
}
public static function saveLocal(_arg1:String, _arg2:Object, _arg3:uint=0):void{
var sharedObj:SharedObject;
var save_id = _arg1;
var save_data = _arg2;
var size_allocation = _arg3;
try {
if (!sharedObjects[save_id]){
sharedObjects[save_id] = SharedObject.getLocal(((("ng_ap_secure_" + movie_id) + "_") + save_id));
};
sharedObj = sharedObjects[save_id];
sharedObj.data[save_id] = encodeData(save_data);
sharedObj.flush();
} catch(e:Error) {
sendWarning(("saveLocal ERROR: " + e));
};
}
private static function doEvent(_arg1:Object):void{
var _local2:String;
var _local3:Object;
var _local4:String;
var _local5:Boolean;
var _local6:ScoreBoard;
var _local7:Array;
var _local8:*;
var _local9:String;
var _local10:Medal;
var _local11:uint;
var _local12:Object;
var _local13:SaveFile;
var _local14:uint;
switch (getCommandName(_arg1.command_id)){
case "connectMovie":
timeoutTimer.stop();
sendMessage("You have successfully connected to the Newgrounds API Gateway");
sendMessage((("Movie identified as \"" + _arg1.movie_name) + "\""));
callListener(APIEvent.MOVIE_CONNECTED, _arg1.success, {movie_name:_arg1.movie_name});
_local5 = false;
if (_arg1.ad_status === -1){
_local2 = "This movie was not approved to run Flash Ads.";
sendWarning(_local2);
sendWarning((("visit " + AD_TERMS_URL) + " to view our approval guidelines"));
if (!_arg1.ad_url){
callListener(APIEvent.ADS_APPROVED, false, new APIError("FLASH_ADS_NOT_APPROVED", _local2));
} else {
_local5 = true;
};
} else {
if (_arg1.ad_status === 0){
_local2 = "Flash Ads are currently awaiting approval.";
sendNotice(_local2);
if (!_arg1.ad_url){
callListener(APIEvent.ADS_APPROVED, false, new APIError("FLASH_ADS_NOT_APPROVED", _local2));
} else {
_local5 = true;
};
};
};
if (_arg1.ad_url){
ad_url = unescape(_arg1.ad_url);
if (!_local5){
sendMessage("This movie has been approved to run Flash Ads!");
};
callListener(APIEvent.ADS_APPROVED, true);
_adsApproved = true;
};
if (_arg1.deny_host){
_local2 = (getHost() + " does not have permission to run this movie!");
sendWarning(_local2);
sendWarning(("\tUpdate your API configuration to unblock " + getHost()));
callListener(APIEvent.HOST_BLOCKED, true, {movie_url:unescape(_arg1.movie_url), redirect_url:getOfficialVersionURL()});
};
if (_arg1.movie_version){
sendWarning("According to your API Configuration, this version is out of date.");
if (version){
sendWarning(("\tThe this movie is version " + version));
};
sendWarning(("\tThe most current version is " + _arg1.movie_version));
callListener(APIEvent.NEW_VERSION_AVAILABLE, true, {movie_version:_arg1.movie_version, movie_url:unescape(_arg1.movie_url), redirect_url:getOfficialVersionURL()});
};
if (_arg1.request_portal_url){
sendCommand("setPortalID", {portal_url:host});
};
if (preload){
sendCommand("preloadSettings", {publisher_id:publisher_id, user_id:user_id});
};
break;
case "preloadSettings":
if (_arg1.medals){
populateMedals(_arg1.medals);
if (((!(hasUserSession())) && (!(debugMode)))){
echo("Checking for SharedObject Medals...");
_local8 = loadLocal("medals_unlocked");
if (_local8){
for (_local9 in _local8) {
if (_local8[_local9]){
_local10 = getMedalById(uint(_local9));
echo(("Now unlocking " + _local10.name));
_local10.unlocked = true;
};
};
};
};
};
if (_arg1.save_groups){
populateSaveGroups(_arg1.save_groups);
};
if (_arg1.save_file_path){
_saveFilePath = (_arg1.save_file_path + "/");
};
if (_arg1.score_boards){
populateScoreBoards(_arg1.score_boards);
};
callListener(APIEvent.METADATA_LOADED);
break;
case "logCustomEvent":
if (_arg1.success){
sendMessage((("Event '" + _arg1.event) + "' was logged."));
};
callListener(APIEvent.EVENT_LOGGED, _arg1.success, {event:_arg1.event});
break;
case "postScore":
if (_arg1.success){
_local4 = "User";
if (user_email){
_local4 = user_email;
} else {
if (user_name){
_local4 = user_name;
};
};
_local6 = getScoreBoardById(_arg1.board);
if (_local6){
sendMessage((((((_local4 + " posted ") + _arg1.value) + " to '") + _local6.name) + "'"));
};
_local3 = {score:_arg1.score, value:_arg1.value, username:_local4};
};
callListener(APIEvent.SCORE_POSTED, _arg1.success, _local3);
break;
case "loadScores":
_local3 = new Object();
_local6 = getScoreBoardById(_arg1.board);
if (_local6){
_local6.setScores(_arg1.scores, _arg1.period, _arg1.page, _arg1.num_results);
};
callListener(APIEvent.SCORES_LOADED, _arg1.success, _local6);
break;
case "unlockMedal":
if (_medals){
_local10 = getMedalByName(_arg1.medal_name);
if (_local10.unlocked){
return;
};
_local10.unlocked = true;
callListener(APIEvent.MEDAL_UNLOCKED, _arg1.success, _local10);
};
break;
case "getMedals":
populateMedals(_arg1.medals);
callListener(APIEvent.MEDALS_LOADED, _arg1.success, _local3);
break;
case "lookupSaveFiles":
_local7 = [];
_local11 = 0;
while (_local11 < _arg1.files.length) {
_local12 = _arg1.files[_local11];
_local13 = new SaveFile(getSaveGroupById(_arg1.group_id));
_local13.name = _local12.filename;
_local13.id = _local12.save_id;
_local13.description = _local12.description;
_local13.thumbnailUrl = _local12.thumb;
_local13.fileUrl = (_saveFilePath + _local12.file);
if (((_local12.keys) && (_local12.keys.length))){
_local14 = 0;
while (_local14 < _local12.keys.length) {
_local13.setKey(_local12.keys[_local14].id, _local12.keys[_local14].value);
_local14++;
};
};
if (((_local12.ratings) && (_local12.ratings.length))){
_local14 = 0;
while (_local14 < _local12.ratings.length) {
_local13.setRating(_local12.ratings[_local14].id, _local12.ratings[_local14].votes, _local12.ratings[_local14].score);
_local14++;
};
};
_local7.push(_local13);
_local11++;
};
_arg1.owner.dispatchEvent(new APIEvent(APIEvent.QUERY_COMPLETE, _arg1.success, _local7));
break;
case "rateSaveFile":
_local13 = _arg1.owner;
if (_arg1.success){
_local13.setRating(_arg1.rating_id, _arg1.votes, _arg1.score);
};
_local13.dispatchEvent(new APIEvent(APIEvent.VOTE_COMPLETE, _arg1.success, _arg1));
break;
case "saveFile":
_local3 = {save_id:_arg1.save_id, filename:_arg1.filename, file_url:_arg1.file_url, thumbnail:_arg1.thumbnail, icon:_arg1.icon};
_arg1.owner.dispatchEvent(new APIEvent(APIEvent.FILE_SAVED, _arg1.success, _local3));
break;
case "checkFilePrivs":
_local3 = {filename:_arg1.filename, folder:_arg1.folder, can_read:_arg1.can_read, can_write:_arg1.can_write};
callListener(APIEvent.FILE_PRIVS_LOADED, _arg1.success, _local3);
break;
};
}
public static function hasEventListener(_arg1:String):Boolean{
return (_eventDispatcher.hasEventListener(_arg1));
}
public static function getSaveGroupByName(_arg1:String):SaveGroup{
if (((!(_saveGroups)) || ((_saveGroups.length < 1)))){
sendWarning("No save groups found");
return (null);
};
var _local2:uint;
while (_local2 < _saveGroups.length) {
if (_saveGroups[_local2].name == _arg1){
return (_saveGroups[_local2]);
};
_local2++;
};
return (null);
}
public static function isNewgrounds():Boolean{
return ((((publisher_id == 1)) || ((getHost().toLowerCase().indexOf("ungrounded.net") > -1))));
}
private static function getCommandID(_arg1:String):String{
return (_arg1);
}
public static function getPeriodName(_arg1:String):String{
var _local2:String;
for (_local2 in period_aliases) {
if (_local2 == _arg1){
return (period_aliases[_local2].name);
};
};
return (null);
}
private static function sendWarning(_arg1:String, _arg2:String=null):void{
if (_arg2){
_arg1 = (_arg1 + ((("\n[NewgroundsAPI WARNING] :: \tSee " + COMMANDS_WIKI_URL) + _arg2.toLowerCase()) + " for additional information."));
};
trace(("[NewgroundsAPI WARNING] :: " + _arg1));
}
private static function onCommandError(_arg1:Event):void{
var _local2:SmartURLLoader = SmartURLLoader(_arg1.target);
var _local3:uint;
while (_local3 < _preloadAssets.length) {
if (_preloadAssets[_local3] == _local2){
_preloadAssets.splice(_local3, 1);
break;
};
_local3++;
};
}
}
}//package com.newgrounds
Section 17
//RC4 (com.newgrounds.RC4)
package com.newgrounds {
public class RC4 {
private static var mykey:Array = new Array(0xFF);
private static var sbox:Array = new Array(0xFF);
private static function charsToHex(_arg1:Array):String{
var _local2:String = new String("");
var _local3:Array = new Array("0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f");
var _local4:uint;
while (_local4 < _arg1.length) {
_local2 = (_local2 + (_local3[(_arg1[_local4] >> 4)] + _local3[(_arg1[_local4] & 15)]));
_local4++;
};
return (_local2);
}
public static function encrypt(_arg1:String, _arg2:String):String{
var _local3:Array = strToChars(_arg1);
var _local4:Array = strToChars(_arg2);
var _local5:Array = calculate(_local3, _local4);
return (charsToHex(_local5));
}
private static function hexToChars(_arg1:String):Array{
var _local2:Array = new Array();
var _local3:uint = ((_arg1.substr(0, 2))=="0x") ? 2 : 0;
while (_local3 < _arg1.length) {
_local2.push(parseInt(_arg1.substr(_local3, 2), 16));
_local3 = (_local3 + 2);
};
return (_local2);
}
public static function encryptbin(_arg1:String, _arg2:String):Array{
var _local3:Array = strToChars(_arg1);
var _local4:Array = strToChars(_arg2);
var _local5:Array = calculate(_local3, _local4);
return (_local5);
}
public static function decrypt(_arg1:String, _arg2:String):String{
var _local3:Array = hexToChars(_arg1);
var _local4:Array = strToChars(_arg2);
var _local5:Array = calculate(_local3, _local4);
return (charsToStr(_local5));
}
private static function strToChars(_arg1:String):Array{
var _local2:Array = new Array();
var _local3:uint;
while (_local3 < _arg1.length) {
_local2.push(_arg1.charCodeAt(_local3));
_local3++;
};
return (_local2);
}
private static function calculate(_arg1:Array, _arg2:Array):Array{
var _local6:uint;
var _local7:uint;
var _local8:uint;
var _local10:uint;
initialize(_arg2);
var _local3:uint;
var _local4:uint;
var _local5:Array = new Array();
var _local9:uint;
while (_local9 < _arg1.length) {
_local3 = ((_local3 + 1) % 0x0100);
_local4 = ((_local4 + sbox[_local3]) % 0x0100);
_local7 = sbox[_local3];
sbox[_local3] = sbox[_local4];
sbox[_local4] = _local7;
_local10 = ((sbox[_local3] + sbox[_local4]) % 0x0100);
_local6 = sbox[_local10];
_local8 = (_arg1[_local9] ^ _local6);
_local5.push(_local8);
_local9++;
};
return (_local5);
}
private static function initialize(_arg1:Array):void{
var _local3:uint;
var _local2:uint;
var _local4:uint = _arg1.length;
var _local5:uint;
while (_local5 <= 0xFF) {
mykey[_local5] = _arg1[(_local5 % _local4)];
sbox[_local5] = _local5;
_local5++;
};
_local5 = 0;
while (_local5 <= 0xFF) {
_local2 = (((_local2 + sbox[_local5]) + mykey[_local5]) % 0x0100);
_local3 = sbox[_local5];
sbox[_local5] = sbox[_local2];
sbox[_local2] = _local3;
_local5++;
};
}
private static function charsToStr(_arg1:Array):String{
var _local2:String = new String("");
var _local3:uint;
while (_local3 < _arg1.length) {
_local2 = (_local2 + String.fromCharCode(_arg1[_local3]));
_local3++;
};
return (_local2);
}
}
}//package com.newgrounds
Section 18
//SaveFile (com.newgrounds.SaveFile)
package com.newgrounds {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.net.*;
public class SaveFile extends EventDispatcher {
private var _group:SaveGroup;
private var _id:uint;
private var _thumbnailUrl:String;
private var _status:uint;
private var _keys:Dictionary;
private var _fileUrl:String;
private var _filename:String;
private var _ratings:Dictionary;
private var _contents;
private var _thumbnail:BitmapData;
private var _description:String;
public function SaveFile(_arg1:SaveGroup){
_keys = new Dictionary();
_ratings = new Dictionary();
_group = _arg1;
_description = "";
}
public function get description():String{
return (_description);
}
public function sendRating(_arg1:String, _arg2:Number):void{
var _local3:SaveRating = _group.getRatingByName(_arg1);
if (!_local3){
trace((("[NewgroundsAPISaveFile] " + _arg1) + " is not a recognized save file"));
return;
};
if ((((_arg2 < _local3.minValue)) || ((_arg2 > _local3.maxValue)))){
trace(((("[NewgroundsAPISaveFile] Vote must be between " + _local3.minValue) + " and ") + _local3.maxValue));
return;
};
_local3.voted = true;
NewgroundsAPI.rateSaveFile(this, _local3, _arg2);
}
public function set thumbnailUrl(_arg1:String):void{
_thumbnailUrl = _arg1;
}
public function get groupId():uint{
return (_group.id);
}
public function get name():String{
return (_filename);
}
override public function toString():String{
var _local2:Object;
var _local3:Object;
var _local1 = (((((("Save File " + _filename) + " ID: ") + _id) + "\n ") + _description) + "\n");
for each (_local2 in _keys) {
_local1 = (_local1 + ((((" " + _group.getKeyById(_local2.id).name) + ": ") + _local2.val) + "\n"));
};
for each (_local3 in _ratings) {
_local1 = (_local1 + ((((((" " + _group.getRatingById(_local3.id).name) + "\n Score: ") + _local3.score) + " Votes: ") + _local3.votes) + "\n"));
};
return (_local1);
}
public function save():void{
NewgroundsAPI.saveFile(this);
}
public function set name(_arg1:String):void{
_filename = _arg1;
}
public function set thumbnail(_arg1:BitmapData):void{
if (_thumbnail){
_thumbnail.dispose();
};
_thumbnail = _arg1.clone();
}
public function get groupType():uint{
return (_group.type);
}
public function get id():uint{
return (_id);
}
public function setKey(_arg1, _arg2):void{
var _local3:SaveKey;
if ((_local3 is String)){
_local3 = _group.getKeyByName(_arg1);
} else {
_local3 = _group.getKeyById(_arg1);
};
if (_local3){
_keys[_local3] = {id:_local3.id, val:_arg2};
};
}
public function setRating(_arg1, _arg2:Number, _arg3:Number):void{
var _local4:SaveRating;
if ((_arg1 is String)){
_local4 = _group.getRatingByName(_arg1);
} else {
_local4 = _group.getRatingById(_arg1);
};
if (_local4){
_ratings[_local4] = {id:_local4.id, name:_local4.name, votes:_arg2, score:_arg3};
};
}
public function toObject():Object{
var _local2:Object;
var _local1:Object = {group:groupId, filename:name, description:description, shared:true};
_local1.keys = [];
for each (_local2 in _keys) {
_local1.push({id:_local2.id, value:_local2.val});
};
return (_local1);
}
public function get contents(){
return (_contents);
}
public function get thumbnailUrl():String{
return (_thumbnailUrl);
}
public function get shared():Boolean{
return (true);
}
public function getRating(_arg1):Object{
var _local2:SaveRating;
if ((_arg1 is String)){
_local2 = _group.getRatingByName(_arg1);
} else {
_local2 = _group.getRatingById(_arg1);
};
if (_local2){
return (_ratings[_local2]);
};
return (null);
}
public function getKey(_arg1){
var _local2:SaveKey;
if ((_local2 is String)){
_local2 = _group.getKeyByName(_arg1);
} else {
_local2 = _group.getKeyById(_arg1);
};
if (_local2){
return (_keys[_local2]);
};
return (null);
}
public function get groupName():String{
return (_group.name);
}
public function get fileUrl():String{
return (_fileUrl);
}
public function get thumbnail():BitmapData{
return (_thumbnail);
}
public function loadContents():void{
var _local1:SmartURLLoader;
if (_fileUrl){
_local1 = new SmartURLLoader();
_local1.responseFormat = URLLoaderDataFormat.BINARY;
_local1.addEventListener(Event.COMPLETE, onContentsLoaded);
_local1.load(_fileUrl);
};
}
public function set fileUrl(_arg1:String):void{
_fileUrl = _arg1;
}
public function set id(_arg1:uint):void{
_id = _arg1;
}
public function set description(_arg1:String):void{
_description = _arg1;
}
public function set contents(_arg1):void{
_contents = _arg1;
}
private function onContentsLoaded(_arg1:Event):void{
var _local2:ByteArray = _arg1.target.response;
_local2.uncompress();
var _local3:uint = _local2.readUnsignedByte();
if (_local3 == 0){
_contents = new ByteArray();
_contents.writeBytes(_local2, 1);
} else {
_contents = _local2.readObject();
};
dispatchEvent(new APIEvent(APIEvent.FILE_LOADED, true, contents));
}
}
}//package com.newgrounds
Section 19
//SaveGroup (com.newgrounds.SaveGroup)
package com.newgrounds {
public class SaveGroup {
private var _id:uint;
private var _keys:Array;
private var _type:uint;
private var _name:String;
private var _ratings:Array;
private var _files:Array;
public static const TYPE_SYSTEM:uint = 0;
public static const TYPE_PRIVATE:uint = 1;
public static const TYPE_MODERATED:uint = 3;
public static const TYPE_PUBLIC:uint = 2;
public function SaveGroup(_arg1:uint, _arg2:String, _arg3:uint){
_name = _arg2;
_id = _arg1;
_type = _arg3;
_ratings = [];
_keys = [];
_files = [];
}
public function toString():String{
return ((((((("SaveGroup { name: " + _name) + ", id: ") + _id) + ", keys: ") + _keys) + "}"));
}
public function getRatingById(_arg1:uint):SaveRating{
var _local2:uint;
while (_local2 < _ratings.length) {
if (_ratings[_local2].id == _arg1){
return (_ratings[_local2]);
};
_local2++;
};
return (null);
}
public function getKeyByName(_arg1:String):SaveKey{
var _local2:uint;
while (_local2 < _keys.length) {
if (_keys[_local2].name == _arg1){
return (_keys[_local2]);
};
_local2++;
};
return (null);
}
public function get name():String{
return (_name);
}
public function getKeyById(_arg1:uint):SaveKey{
var _local2:uint;
while (_local2 < _keys.length) {
if (_keys[_local2].id == _arg1){
return (_keys[_local2]);
};
_local2++;
};
return (null);
}
public function addRating(_arg1:SaveRating):void{
_ratings.push(_arg1);
}
public function get id():uint{
return (_id);
}
public function createQuery():SaveGroupQuery{
return (new SaveGroupQuery(this));
}
public function get keys():Array{
return (_keys.concat());
}
public function getRatingByName(_arg1:String):SaveRating{
var _local2:uint;
while (_local2 < _ratings.length) {
if (_ratings[_local2].name == _arg1){
return (_ratings[_local2]);
};
_local2++;
};
return (null);
}
public function get ratings():Array{
return (_ratings.concat());
}
public function get type():uint{
return (_type);
}
public function addKey(_arg1:SaveKey):void{
_keys.push(_arg1);
}
public static function createFromObject(_arg1:Object):SaveGroup{
var _local4:Object;
var _local5:Object;
var _local2:SaveGroup = new SaveGroup(_arg1.group_id, _arg1.group_name, _arg1.group_type);
var _local3:uint;
while (_local3 < _arg1.keys.length) {
_local4 = _arg1.keys[_local3];
_local2.addKey(new SaveKey(_local4.id, _local4.name, _local4.type));
_local3++;
};
_local3 = 0;
while (_local3 < _arg1.ratings.length) {
_local5 = _arg1.ratings[_local3];
_local2.addRating(new SaveRating(_local5.id, _local5.name, _local5.float, _local5.min, _local5.max));
_local3++;
};
return (_local2);
}
}
}//package com.newgrounds
Section 20
//SaveGroupQuery (com.newgrounds.SaveGroupQuery)
package com.newgrounds {
import flash.events.*;
public class SaveGroupQuery extends EventDispatcher {
private var _group:SaveGroup;
private var _fileConditions:Array;
private var _ratingConditions:Array;
private var _resultsPerPage:uint;
private var _sortConditions:Array;
private var _lookupRatings:Array;
private var _randomizeResults:Boolean;
private var _lookupKeys:Array;
private var _page:uint;
private var _groupBy:Array;
private var _keyConditions:Array;
public static const UPDATED_ON:uint = 5;
public static const TABLE_RATINGS:uint = 3;
public static const TABLE_FILES:uint = 1;
public static const TOTAL_VOTES:String = "votes";
public static const AUTHOR_ID:uint = 1;
public static const FILE_STATUS:uint = 7;
public static const TABLE_KEYS:uint = 2;
public static const FILE_NAME:uint = 3;
public static const SCORE:String = "score";
public static const TOTAL_VIEWS:uint = 6;
public static const CREATED_ON:uint = 4;
public static const FILE_ID:uint = 0;
public static const AUTHOR_NAME:uint = 2;
public function SaveGroupQuery(_arg1:SaveGroup){
_group = _arg1;
reset();
}
public function addKeyCondition(_arg1:String, _arg2:String, _arg3):void{
var _local4:SaveKey = _group.getKeyByName(_arg1);
if (!_local4){
return;
};
if (!checkValue(_arg3, _local4.type)){
return;
};
_keyConditions.push({key:_local4.id, operator:_arg2, value:_arg3});
}
public function sortOn(_arg1:uint, _arg2:Boolean=false):void{
addSortCondition(TABLE_FILES, _arg1, _arg2);
}
public function set isRandomized(_arg1:Boolean):void{
_randomizeResults = _arg1;
}
public function get isRandomized():Boolean{
return (_randomizeResults);
}
public function groupByRating(_arg1:String):void{
var _local2:SaveRating = _group.getRatingByName(_arg1);
if (!_local2){
return;
};
_groupBy.push({table:TABLE_RATINGS, field:_local2.id});
}
public function execute():void{
NewgroundsAPI.executeSaveQuery(this);
}
public function get page():uint{
return (_page);
}
public function groupByKey(_arg1:String):void{
var _local2:SaveKey = _group.getKeyByName(_arg1);
if (!_local2){
return;
};
_groupBy.push({table:TABLE_KEYS, field:_local2.id});
}
public function sortOnKey(_arg1:String, _arg2:Boolean=false):void{
addSortCondition(TABLE_KEYS, _group.getKeyByName(_arg1).id, _arg2);
}
public function toObject():Object{
var _local1:Object = {page:_page, num_results:_resultsPerPage};
if (isRandomized){
_local1.randomize = 1;
};
if (((_fileConditions) && ((_fileConditions.length > 0)))){
_local1.file_conditions = _fileConditions;
};
if (((_keyConditions) && ((_keyConditions.length > 0)))){
_local1.key_conditions = _keyConditions;
};
if (((_ratingConditions) && ((_ratingConditions.length > 0)))){
_local1.rating_conditions = _ratingConditions;
};
if (((_sortConditions) && ((_sortConditions.length > 0)))){
_local1.sort_conditions = _sortConditions;
};
if (((_lookupKeys) && ((_lookupKeys.length > 0)))){
_local1.lookup_keys = _lookupKeys;
};
if (((_lookupRatings) && ((_lookupRatings.length > 0)))){
_local1.lookup_ratings = _lookupRatings;
};
if (((_groupBy) && ((_groupBy.length > 0)))){
_local1.group_by = _groupBy;
};
return (_local1);
}
public function reset():void{
_fileConditions = [];
_keyConditions = [];
_ratingConditions = [];
_sortConditions = [];
_groupBy = [];
_lookupKeys = [];
_lookupRatings = [];
_randomizeResults = false;
_resultsPerPage = 20;
_page = 1;
}
public function includeKey(_arg1:String):void{
var _local2:SaveKey = _group.getKeyByName(_arg1);
if (_local2){
_lookupKeys.push(_local2.id);
};
}
private function checkValue(_arg1, _arg2:uint):Boolean{
return (true);
}
public function set page(_arg1:uint):void{
_page = _arg1;
}
public function addRatingCondition(_arg1:String, _arg2:String, _arg3, _arg4:String="score"):void{
var _local5:SaveRating = _group.getRatingByName(_arg1);
if (!_local5){
return;
};
_ratingConditions.push({rating:_local5.id, operator:_arg2, value:_arg3, column:_arg4});
}
public function includeRating(_arg1:String):void{
var _local2:SaveRating = _group.getRatingByName(_arg1);
if (_local2){
_lookupRatings.push(_local2.id);
};
}
public function sortOnRating(_arg1:String, _arg2:Boolean=false, _arg3:String="score"):void{
addSortCondition(TABLE_RATINGS, _group.getRatingByName(_arg1).id, _arg2, _arg3);
}
public function set resultsPerPage(_arg1:uint):void{
_resultsPerPage = _arg1;
}
public function excludeRating(_arg1:String):void{
var _local2:SaveRating = _group.getRatingByName(_arg1);
var _local3:uint;
while (_local3 < _lookupRatings.length) {
if (_lookupRatings[_local3] == _local2.id){
_lookupRatings.splice(_local3, 1);
return;
};
_local3++;
};
}
public function addFileCondition(_arg1:uint, _arg2:String, _arg3):void{
_fileConditions.push({field:_arg1, operator:_arg2, value:_arg3});
}
public function excludeKey(_arg1:String):void{
var _local2:SaveKey = _group.getKeyByName(_arg1);
var _local3:uint;
while (_local3 < _lookupKeys.length) {
if (_lookupKeys[_local3] == _local2.id){
_lookupKeys.splice(_local3, 1);
return;
};
_local3++;
};
}
public function get resultsPerPage():uint{
return (_resultsPerPage);
}
public function get groupId():uint{
return (_group.id);
}
override public function toString():String{
return ("");
}
private function addSortCondition(_arg1:uint, _arg2:uint, _arg3:Boolean=false, _arg4=null):void{
var _local5:Object = {table:_arg1, field:_arg2, desc:_arg3};
if (_arg4){
_local5.extra = _arg4;
};
_sortConditions.push(_local5);
}
public function groupBy(_arg1:uint):void{
_groupBy.push({table:TABLE_FILES, field:_arg1});
}
public function get group():SaveGroup{
return (_group);
}
}
}//package com.newgrounds
Section 21
//SaveKey (com.newgrounds.SaveKey)
package com.newgrounds {
public class SaveKey {
private var _id:uint;
private var _type:uint;
private var _name:String;
public static const TYPE_BOOLEAN:uint = 4;
public static const TYPE_STRING:uint = 3;
public static const TYPE_FLOAT:uint = 1;
public static const TYPE_INTEGER:uint = 2;
public function SaveKey(_arg1:uint, _arg2:String, _arg3:uint){
_id = _arg1;
_name = _arg2;
_type = _arg3;
}
public function isValueValid(_arg1):Boolean{
if (_type == TYPE_INTEGER){
return ((((_arg1 is int)) || ((_arg1 is uint))));
};
if (_type == TYPE_FLOAT){
return ((((((_arg1 is int)) || ((_arg1 is uint)))) || ((_arg1 is Number))));
};
if (_type == TYPE_STRING){
return ((_arg1 is String));
};
if (_type == TYPE_BOOLEAN){
return ((((((((_arg1 is Boolean)) || ((_arg1 === 0)))) || ((_arg1 === 1)))) || ((_arg1 == ""))));
};
return (false);
}
public function get name():String{
return (_name);
}
public function get type():uint{
return (_type);
}
public function get id():uint{
return (_id);
}
public function toString():String{
return (_name);
}
}
}//package com.newgrounds
Section 22
//SaveRating (com.newgrounds.SaveRating)
package com.newgrounds {
public class SaveRating {
private var _voted:Boolean;
private var _name:String;
private var _maxValue:Number;
private var _isFloat:Boolean;
private var _id:uint;
private var _minValue:Number;
public function SaveRating(_arg1:uint, _arg2:String, _arg3:Boolean, _arg4:Number=-INF, _arg5:Number=INF){
_id = _arg1;
_name = _arg2;
_isFloat = _arg3;
_minValue = _arg4;
_maxValue = _arg5;
}
public function get voted():Boolean{
return (_voted);
}
public function set voted(_arg1:Boolean):void{
_voted = _arg1;
}
public function toString():String{
return (_name);
}
public function get maxValue():Number{
return (_maxValue);
}
public function get name():String{
return (_name);
}
public function get isFloat():Boolean{
return (_isFloat);
}
public function get id():uint{
return (_id);
}
public function get minValue():Number{
return (_minValue);
}
}
}//package com.newgrounds
Section 23
//Score (com.newgrounds.Score)
package com.newgrounds {
public class Score {
private var _board:ScoreBoard;
private var _position:uint;
private var _numeric_value:uint;
private var _value:String;
private var _username:String;
public function Score(_arg1:ScoreBoard, _arg2:Number, _arg3:String, _arg4:String, _arg5:uint){
_board = _arg1;
_position = _arg2;
_username = _arg3;
_value = _arg4;
_numeric_value = _arg5;
}
public function get board():ScoreBoard{
return (_board);
}
public function get position():uint{
return (_position);
}
public function get value():String{
return (_value);
}
public function get username():String{
return (_username);
}
public function get numeric_value():uint{
return (_numeric_value);
}
}
}//package com.newgrounds
Section 24
//ScoreBoard (com.newgrounds.ScoreBoard)
package com.newgrounds {
import flash.events.*;
public class ScoreBoard extends EventDispatcher {
private var _scores:Array;
private var _name:String;
private var _page:uint;// = 1
private var _period:String;// = "Today"
private var _id:uint;
private var _num_results:uint;// = 10
public function ScoreBoard(_arg1:uint, _arg2:String){
_name = _arg2;
_id = _arg1;
_scores = [];
}
public function get period():String{
return (_period);
}
public function get id():Number{
return (_id);
}
function setScores(_arg1:Array, _arg2:String, _arg3:Number, _arg4:Number):void{
var _local6:uint;
_period = _arg2;
_page = _arg3;
_num_results = _arg4;
_scores = [];
var _local5:uint;
while (_local5 < _arg1.length) {
_local6 = (((_num_results * (_page - 1)) + 1) + _local5);
_scores.push(new Score(this, _local6, _arg1[_local5].username, _arg1[_local5].value, _arg1[_local5].numeric_value));
_local5++;
};
}
public function get scores():Array{
return (_scores);
}
public function exists():Boolean{
return ((_id > 0));
}
public function get name():String{
return (_name);
}
public function get page():uint{
return (_page);
}
public function postScore(_arg1:uint, _arg2:Boolean):void{
NewgroundsAPI.postScore(_name, _arg1, _arg2);
}
public function get num_results():uint{
return (_num_results);
}
public function loadScores(_arg1:String, _arg2:uint, _arg3:uint):void{
_period = _arg1;
if (((!(_period)) || ((_period == "")))){
_period = "Today";
};
_page = _arg2;
_num_results = _arg3;
NewgroundsAPI.loadScores(this);
}
}
}//package com.newgrounds
Section 25
//SmartURLLoader (com.newgrounds.SmartURLLoader)
package com.newgrounds {
import flash.events.*;
import flash.utils.*;
import flash.net.*;
import flash.errors.*;
public class SmartURLLoader extends EventDispatcher {
private var _urlRequest:URLRequest;
private var _method:String;// = "GET"
private var _files:Dictionary;
private var _hasVariables:Boolean;
private var _dataFormat:String;// = "text"
private var _urlLoader:URLLoader;
private var _preventCache:Boolean;// = false
private var _variables:Dictionary;
public var owner;
private var _openBrowser:Boolean;// = false
private static const CRLF:String = "
";
private static var _loaders:Dictionary = new Dictionary();
public function SmartURLLoader(){
_urlRequest = new URLRequest();
_variables = new Dictionary();
}
public function get response(){
return (_urlLoader.data);
}
public function set method(_arg1:String):void{
if (((hasFiles) && ((_arg1 == URLRequestMethod.GET)))){
throw (new IllegalOperationError("GET cannot be used to upload files."));
};
_method = _arg1;
}
private function onIOError(_arg1:IOErrorEvent):void{
dispatchEvent(_arg1);
dispose();
}
public function addVariable(_arg1:String, _arg2=""):void{
_variables[_arg1] = _arg2;
if (_arg2){
_hasVariables = true;
};
}
private function onSecurityError(_arg1:SecurityErrorEvent):void{
dispatchEvent(_arg1);
dispose();
}
public function get preventCache():Boolean{
return (_preventCache);
}
public function addFile(_arg1:String, _arg2:ByteArray, _arg3:String, _arg4:String="application/octect-stream"):void{
method = URLRequestMethod.POST;
if (!_files){
_files = new Dictionary();
};
_files[_arg1] = new File(_arg1, _arg2, _arg3, _arg4);
}
public function get openBrowser():Boolean{
return (_openBrowser);
}
public function set preventCache(_arg1:Boolean):void{
_preventCache = _arg1;
}
public function get responseFormat():String{
return (_dataFormat);
}
private function onComplete(_arg1:Event):void{
dispatchEvent(_arg1);
dispose();
}
public function dispose():void{
_files = null;
_variables = null;
if (_urlLoader){
_urlLoader.removeEventListener(Event.COMPLETE, onComplete);
_urlLoader.removeEventListener(ProgressEvent.PROGRESS, onProgress);
_urlLoader.removeEventListener(IOErrorEvent.IO_ERROR, onIOError);
_urlLoader.removeEventListener(HTTPStatusEvent.HTTP_STATUS, onHTTPStatus);
_urlLoader.removeEventListener(SecurityErrorEvent.SECURITY_ERROR, onSecurityError);
_urlLoader = null;
};
_urlRequest = null;
_loaders[this] = null;
}
public function get method():String{
return (_method);
}
public function close():void{
try {
_urlLoader.close();
} catch(e:Error) {
};
}
private function buildMultipartData(_arg1:String):ByteArray{
var _local3:String;
var _local4:File;
var _local2:ByteArray = new ByteArray();
_local2.endian = Endian.BIG_ENDIAN;
_arg1 = ("--" + _arg1);
for (_local3 in _variables) {
_local2.writeUTFBytes((_arg1 + CRLF));
_local2.writeUTFBytes(((("Content-Disposition: form-data; name=\"" + _local3) + "\"") + CRLF));
_local2.writeUTFBytes(CRLF);
_local2.writeUTFBytes((_variables[_local3] + CRLF));
};
if (hasFiles){
for each (_local4 in _files) {
_local2.writeUTFBytes((_arg1 + CRLF));
_local2.writeUTFBytes(("Content-Disposition: form-data; name=\"Filename\"" + CRLF));
_local2.writeUTFBytes(CRLF);
_local2.writeUTFBytes((_local4.fileName + CRLF));
_local2.writeUTFBytes((_arg1 + CRLF));
_local2.writeUTFBytes(((((("Content-Disposition: form-data; name=\"" + _local4.dataField) + "\"; filename=\"") + _local4.fileName) + "\"") + CRLF));
_local2.writeUTFBytes((("Content-Type: " + _local4.contentType) + CRLF));
_local2.writeUTFBytes(CRLF);
_local2.writeBytes(_local4.data);
_local2.writeUTFBytes(CRLF);
};
_local2.writeUTFBytes((_arg1 + CRLF));
_local2.writeUTFBytes(("Content-Disposition: form-data; name=\"Upload\"" + CRLF));
_local2.writeUTFBytes(CRLF);
_local2.writeUTFBytes(("Submit Query" + CRLF));
};
_local2.writeUTFBytes((_arg1 + "--"));
_local2.position = 0;
trace(_local2.readUTFBytes(_local2.length));
_local2.position = 0;
return (_local2);
}
public function clearVariables():void{
_variables = new Dictionary();
}
private function onProgress(_arg1:ProgressEvent):void{
dispatchEvent(_arg1);
}
public function load(_arg1:String):void{
var urlVariables:URLVariables;
var key:String;
var boundary:String;
var i:uint;
var event:SecurityErrorEvent;
var url = _arg1;
_urlRequest.url = url;
if (_preventCache){
url = (url + ("?seed=" + Math.random()));
if (_hasVariables){
url = (url + "&");
};
};
_urlRequest.method = _method;
if ((((_urlRequest.method == URLRequestMethod.GET)) || (!(hasFiles)))){
_urlRequest.contentType = "application/x-www-form-urlencoded";
if (_hasVariables){
urlVariables = new URLVariables();
for (key in _variables) {
urlVariables[key] = _variables[key];
};
_urlRequest.data = urlVariables;
};
} else {
boundary = "";
i = 0;
while (i < 32) {
boundary = (boundary + String.fromCharCode(uint((97 + (Math.random() * 25)))));
i = (i + 1);
};
_urlRequest.contentType = (("multipart/form-data; boundary=\"" + boundary) + "\"");
_urlRequest.data = buildMultipartData(boundary);
};
if (openBrowser){
navigateToURL(_urlRequest, "_blank");
} else {
_urlLoader = new URLLoader();
_urlLoader.dataFormat = _dataFormat;
_urlLoader.addEventListener(Event.COMPLETE, onComplete);
_urlLoader.addEventListener(ProgressEvent.PROGRESS, onProgress);
_urlLoader.addEventListener(IOErrorEvent.IO_ERROR, onIOError);
_urlLoader.addEventListener(HTTPStatusEvent.HTTP_STATUS, onHTTPStatus);
_urlLoader.addEventListener(SecurityErrorEvent.SECURITY_ERROR, onSecurityError);
_loaders[_urlLoader] = this;
try {
_urlLoader.load(_urlRequest);
} catch(error:Error) {
event = new SecurityErrorEvent(SecurityErrorEvent.SECURITY_ERROR, false, false, error.message);
onSecurityError(event);
};
};
}
public function set responseFormat(_arg1:String):void{
_dataFormat = _arg1;
}
public function clearFiles():void{
_files = null;
}
private function onHTTPStatus(_arg1:HTTPStatusEvent):void{
dispatchEvent(_arg1);
}
public function set openBrowser(_arg1:Boolean):void{
_openBrowser = _arg1;
}
public function get hasFiles():Boolean{
return (Boolean(_files));
}
}
}//package com.newgrounds
import flash.utils.*;
class File {
private var dataField:String;
private var contentType:String;
private var fileName:String;
private var data:ByteArray;
private function File(_arg1:String, _arg2:ByteArray, _arg3:String="Filedata", _arg4:String="application/octet-stream"){
this.fileName = _arg1;
this.data = _arg2;
this.dataField = _arg3;
this.contentType = _arg4;
}
}
Section 26
//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 27
//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 28
//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 29
//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 30
//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 31
//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 32
//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 33
//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 34
//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 35
//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 36
//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 37
//IBorder (mx.core.IBorder)
package mx.core {
public interface IBorder {
function get borderMetrics():EdgeMetrics;
}
}//package mx.core
Section 38
//IFlexAsset (mx.core.IFlexAsset)
package mx.core {
public interface IFlexAsset {
}
}//package mx.core
Section 39
//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 40
//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 41
//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 42
//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 43
//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 44
//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 45
//NameUtil (mx.utils.NameUtil)
package mx.utils {
import mx.core.*;
import flash.display.*;
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 46
//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 47
//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 48
//Log (SWFStats.Log)
package SWFStats {
import flash.events.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
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 49
//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 50
//ArmorMain (ArmorMain)
package {
import flash.events.*;
import General.*;
public class ArmorMain extends Main {
public var agi;
public var gameOverBaseC_ARMOR:Class;
public var ui_leaderboardC_ARMOR:Class;
public var armorIntroC:Class;
public var ui_optionsC_ARMOR:Class;
public var ui_pauseC_ARMOR:Class;
public function ArmorMain(){
armorIntroC = ArmorMain_armorIntroC;
ui_leaderboardC_ARMOR = ArmorMain_ui_leaderboardC_ARMOR;
ui_pauseC_ARMOR = ArmorMain_ui_pauseC_ARMOR;
ui_optionsC_ARMOR = ArmorMain_ui_optionsC_ARMOR;
gameOverBaseC_ARMOR = ArmorMain_gameOverBaseC_ARMOR;
super();
MainRef.kongLink = "http://www.armorgames.com/";
gameOverBaseC = gameOverBaseC_ARMOR;
}
override public function submitKongScores():void{
agi.showScoreboardSubmit(scorekeeper.score);
addChild(agi);
}
override public function setupOptionsPauseLeaderboard():void{
leaderboardScreen = new ui_leaderboardC_ARMOR();
addChild(leaderboardScreen);
leaderboardScreen.gotoAndStop(1);
optionsScreen = new ui_optionsC_ARMOR();
addChild(optionsScreen);
optionsScreen.gotoAndStop(1);
pauseScreen = new ui_pauseC_ARMOR();
addChild(pauseScreen);
new OptionsBoard(pauseScreen.board);
pauseScreen.gotoAndStop(1);
Util.ButtonReg(pauseScreen.board.btn_restart, pauseScreenRestart);
Util.ButtonReg(pauseScreen.board.btn_resume, pauseScreenResume);
}
override public function addedToStage(_arg1:Event):void{
input = new Input(this);
stage.frameRate = 30;
stage.addEventListener(KeyboardEvent.KEY_DOWN, keydown);
}
override public function muteToggle():void{
if (gameStarted){
super.muteToggle();
};
}
override public function doIntros():void{
var _local1:* = new armorIntroC();
addChild(_local1);
currIntro = _local1;
_local1.addEventListener(MouseEvent.CLICK, MainRef.gotoKong, false, 0, true);
_local1.x = 30;
_local1.y = 24;
}
override public function enterFrame(_arg1:Event):void{
if (introNum == 0){
if (currIntro.armor.currentFrame == currIntro.armor.totalFrames){
doMikengregIntro();
};
};
super.enterFrame(_arg1);
}
override public function toTitle():void{
super.toTitle();
stage.frameRate = 30;
}
}
}//package
Section 51
//ArmorMain_armorIntroC (ArmorMain_armorIntroC)
package {
import flash.display.*;
import mx.core.*;
public class ArmorMain_armorIntroC extends MovieClipAsset {
public var txt_timeList:DisplayObject;
public var popup1:DisplayObject;
public var mountains:DisplayObject;
public var popup3:DisplayObject;
public var skier: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 txt_score: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 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 armor: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 txt_loading:DisplayObject;
public var head:DisplayObject;
public var btn_resume:DisplayObject;
public var popup2:DisplayObject;
public var flip:DisplayObject;
public var leaderboard:DisplayObject;
}
}//package
Section 52
//ArmorMain_gameOverBaseC_ARMOR (ArmorMain_gameOverBaseC_ARMOR)
package {
import flash.display.*;
import mx.core.*;
public class ArmorMain_gameOverBaseC_ARMOR extends MovieClipAsset {
public var txt_timeList: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 txt_score: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 txt_loading:DisplayObject;
public var head:DisplayObject;
public var btn_resume:DisplayObject;
public var flip:DisplayObject;
public var leaderboard:DisplayObject;
public var skier:DisplayObject;
}
}//package
Section 53
//ArmorMain_ui_leaderboardC_ARMOR (ArmorMain_ui_leaderboardC_ARMOR)
package {
import flash.display.*;
import mx.core.*;
public class ArmorMain_ui_leaderboardC_ARMOR extends MovieClipAsset {
public var txt_timeList: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 txt_score: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 txt_loading:DisplayObject;
public var head:DisplayObject;
public var btn_resume:DisplayObject;
public var flip:DisplayObject;
public var leaderboard:DisplayObject;
public var skier:DisplayObject;
}
}//package
Section 54
//ArmorMain_ui_optionsC_ARMOR (ArmorMain_ui_optionsC_ARMOR)
package {
import flash.display.*;
import mx.core.*;
public class ArmorMain_ui_optionsC_ARMOR extends MovieClipAsset {
public var txt_timeList: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 txt_score: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 txt_loading:DisplayObject;
public var head:DisplayObject;
public var btn_resume:DisplayObject;
public var flip:DisplayObject;
public var leaderboard:DisplayObject;
public var skier:DisplayObject;
}
}//package
Section 55
//ArmorMain_ui_pauseC_ARMOR (ArmorMain_ui_pauseC_ARMOR)
package {
import flash.display.*;
import mx.core.*;
public class ArmorMain_ui_pauseC_ARMOR extends MovieClipAsset {
public var txt_timeList: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 txt_score: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 txt_loading:DisplayObject;
public var head:DisplayObject;
public var btn_resume:DisplayObject;
public var flip:DisplayObject;
public var leaderboard:DisplayObject;
public var skier:DisplayObject;
}
}//package
Section 56
//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 57
//BGManagerFastest_bg0C (BGManagerFastest_bg0C)
package {
import flash.display.*;
import mx.core.*;
public class BGManagerFastest_bg0C extends SpriteAsset {
public var txt_timeList: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 txt_score: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 txt_loading:DisplayObject;
public var head:DisplayObject;
public var btn_resume:DisplayObject;
public var flip:DisplayObject;
public var leaderboard:DisplayObject;
public var skier:DisplayObject;
}
}//package
Section 58
//BGManagerFastest_bg1C (BGManagerFastest_bg1C)
package {
import flash.display.*;
import mx.core.*;
public class BGManagerFastest_bg1C extends SpriteAsset {
public var txt_timeList: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 txt_score: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 txt_loading:DisplayObject;
public var head:DisplayObject;
public var btn_resume:DisplayObject;
public var flip:DisplayObject;
public var leaderboard:DisplayObject;
public var skier:DisplayObject;
}
}//package
Section 59
//BGManagerFastest_bg2C (BGManagerFastest_bg2C)
package {
import flash.display.*;
import mx.core.*;
public class BGManagerFastest_bg2C extends SpriteAsset {
public var txt_timeList: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 txt_score: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 txt_loading:DisplayObject;
public var head:DisplayObject;
public var btn_resume:DisplayObject;
public var flip:DisplayObject;
public var leaderboard:DisplayObject;
public var skier:DisplayObject;
}
}//package
Section 60
//BGManagerFastest_bgDownC (BGManagerFastest_bgDownC)
package {
import flash.display.*;
import mx.core.*;
public class BGManagerFastest_bgDownC extends MovieClipAsset {
public var txt_timeList: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 txt_score: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 txt_loading:DisplayObject;
public var head:DisplayObject;
public var btn_resume:DisplayObject;
public var flip:DisplayObject;
public var leaderboard:DisplayObject;
public var skier:DisplayObject;
}
}//package
Section 61
//BGManagerFastest_bgUpC (BGManagerFastest_bgUpC)
package {
import flash.display.*;
import mx.core.*;
public class BGManagerFastest_bgUpC extends MovieClipAsset {
public var txt_timeList: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 txt_score: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 txt_loading:DisplayObject;
public var head:DisplayObject;
public var btn_resume:DisplayObject;
public var flip:DisplayObject;
public var leaderboard:DisplayObject;
public var skier:DisplayObject;
}
}//package
Section 62
//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 63
//BigJump_dangerSignC (BigJump_dangerSignC)
package {
import flash.display.*;
import mx.core.*;
public class BigJump_dangerSignC extends SpriteAsset {
public var txt_timeList:DisplayObject;
public var popup1:DisplayObject;
public var mountains:DisplayObject;
public var popup3:DisplayObject;
public var skier: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 txt_score: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 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 armor: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 txt_loading:DisplayObject;
public var head:DisplayObject;
public var btn_resume:DisplayObject;
public var popup2:DisplayObject;
public var flip:DisplayObject;
public var leaderboard:DisplayObject;
}
}//package
Section 64
//BigJump_gateIncomingOrangeC (BigJump_gateIncomingOrangeC)
package {
import flash.display.*;
import mx.core.*;
public class BigJump_gateIncomingOrangeC extends SpriteAsset {
public var txt_timeList:DisplayObject;
public var popup1:DisplayObject;
public var mountains:DisplayObject;
public var popup3:DisplayObject;
public var skier: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 txt_score: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 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 armor: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 txt_loading:DisplayObject;
public var head:DisplayObject;
public var btn_resume:DisplayObject;
public var popup2:DisplayObject;
public var flip:DisplayObject;
public var leaderboard:DisplayObject;
}
}//package
Section 65
//BigJump_incomingCoverC (BigJump_incomingCoverC)
package {
import flash.display.*;
import mx.core.*;
public class BigJump_incomingCoverC extends SpriteAsset {
public var txt_timeList:DisplayObject;
public var popup1:DisplayObject;
public var mountains:DisplayObject;
public var popup3:DisplayObject;
public var skier: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 txt_score: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 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 armor: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 txt_loading:DisplayObject;
public var head:DisplayObject;
public var btn_resume:DisplayObject;
public var popup2:DisplayObject;
public var flip:DisplayObject;
public var leaderboard:DisplayObject;
}
}//package
Section 66
//BigJump_jump200C (BigJump_jump200C)
package {
import flash.display.*;
import mx.core.*;
public class BigJump_jump200C extends SpriteAsset {
public var txt_timeList:DisplayObject;
public var popup1:DisplayObject;
public var mountains:DisplayObject;
public var popup3:DisplayObject;
public var skier: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 txt_score: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 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 armor: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 txt_loading:DisplayObject;
public var head:DisplayObject;
public var btn_resume:DisplayObject;
public var popup2:DisplayObject;
public var flip:DisplayObject;
public var leaderboard:DisplayObject;
}
}//package
Section 67
//BigJump_jump400C (BigJump_jump400C)
package {
import flash.display.*;
import mx.core.*;
public class BigJump_jump400C extends SpriteAsset {
public var txt_timeList:DisplayObject;
public var popup1:DisplayObject;
public var mountains:DisplayObject;
public var popup3:DisplayObject;
public var skier: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 txt_score: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 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 armor: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 txt_loading:DisplayObject;
public var head:DisplayObject;
public var btn_resume:DisplayObject;
public var popup2:DisplayObject;
public var flip:DisplayObject;
public var leaderboard:DisplayObject;
}
}//package
Section 68
//BigJump_jump600C (BigJump_jump600C)
package {
import flash.display.*;
import mx.core.*;
public class BigJump_jump600C extends SpriteAsset {
public var txt_timeList:DisplayObject;
public var popup1:DisplayObject;
public var mountains:DisplayObject;
public var popup3:DisplayObject;
public var skier: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 txt_score: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 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 armor: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 txt_loading:DisplayObject;
public var head:DisplayObject;
public var btn_resume:DisplayObject;
public var popup2:DisplayObject;
public var flip:DisplayObject;
public var leaderboard:DisplayObject;
}
}//package
Section 69
//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 70
//EndgameScreen (EndgameScreen)
package {
import flash.events.*;
import flash.display.*;
import flash.net.*;
import General.*;
import SWFStats.*;
public class EndgameScreen extends Sprite {
public var state:String;// = "center"
public var endgameSplash;
public var gameOverBase;
public var options:OptionsBoard;
public var endgameSplashC:Class;
public function EndgameScreen(){
endgameSplashC = EndgameScreen_endgameSplashC;
super();
gameOverBase = new MainRef.ref.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 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 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");
MainRef.urlNavigate("http://mikengreg.com");
}
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");
MainRef.urlNavigate("http://www.joestump.com");
}
public function toOptions(_arg1:MouseEvent):void{
state = "left";
}
public function twitterz(_arg1:MouseEvent):void{
Log.CustomMetric("twitterz", "links");
var _local2:String = Util.CommaFormat(MainRef.ref.scorekeeper.score);
if (MainRef.ref.howIdie == "drawSelf"){
MainRef.urlNavigate((((("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"));
} else {
if (MainRef.ref.howIdie == "killGate"){
MainRef.urlNavigate((((("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"));
} else {
MainRef.urlNavigate((((("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"));
};
};
}
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"){
MainRef.urlNavigate((((("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."));
} else {
if (MainRef.ref.howIdie == "killGate"){
MainRef.urlNavigate((((("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."));
} else {
MainRef.urlNavigate((((("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) + "."));
};
};
}
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 71
//EndgameScreen_endgameSplashC (EndgameScreen_endgameSplashC)
package {
import flash.display.*;
import mx.core.*;
public class EndgameScreen_endgameSplashC extends MovieClipAsset {
public var txt_timeList: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 txt_score: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 txt_loading:DisplayObject;
public var head:DisplayObject;
public var btn_resume:DisplayObject;
public var flip:DisplayObject;
public var leaderboard:DisplayObject;
public var skier:DisplayObject;
}
}//package
Section 72
//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 73
//Gate_gateC (Gate_gateC)
package {
import flash.display.*;
import mx.core.*;
public class Gate_gateC extends SpriteAsset {
public var txt_timeList:DisplayObject;
public var popup1:DisplayObject;
public var mountains:DisplayObject;
public var popup3:DisplayObject;
public var skier: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 txt_score: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 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 armor: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 txt_loading:DisplayObject;
public var head:DisplayObject;
public var btn_resume:DisplayObject;
public var popup2:DisplayObject;
public var flip:DisplayObject;
public var leaderboard:DisplayObject;
}
}//package
Section 74
//Gate_gateHitC (Gate_gateHitC)
package {
import flash.display.*;
import mx.core.*;
public class Gate_gateHitC extends SpriteAsset {
public var txt_timeList:DisplayObject;
public var popup1:DisplayObject;
public var mountains:DisplayObject;
public var popup3:DisplayObject;
public var skier: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 txt_score: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 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 armor: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 txt_loading:DisplayObject;
public var head:DisplayObject;
public var btn_resume:DisplayObject;
public var popup2:DisplayObject;
public var flip:DisplayObject;
public var leaderboard:DisplayObject;
}
}//package
Section 75
//Gate_gateIncomingGreenC (Gate_gateIncomingGreenC)
package {
import flash.display.*;
import mx.core.*;
public class Gate_gateIncomingGreenC extends SpriteAsset {
public var txt_timeList:DisplayObject;
public var popup1:DisplayObject;
public var mountains:DisplayObject;
public var popup3:DisplayObject;
public var skier: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 txt_score: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 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 armor: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 txt_loading:DisplayObject;
public var head:DisplayObject;
public var btn_resume:DisplayObject;
public var popup2:DisplayObject;
public var flip:DisplayObject;
public var leaderboard:DisplayObject;
}
}//package
Section 76
//Gate_gateIncomingRedC (Gate_gateIncomingRedC)
package {
import flash.display.*;
import mx.core.*;
public class Gate_gateIncomingRedC extends SpriteAsset {
public var txt_timeList:DisplayObject;
public var popup1:DisplayObject;
public var mountains:DisplayObject;
public var popup3:DisplayObject;
public var skier: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 txt_score: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 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 armor: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 txt_loading:DisplayObject;
public var head:DisplayObject;
public var btn_resume:DisplayObject;
public var popup2:DisplayObject;
public var flip:DisplayObject;
public var leaderboard:DisplayObject;
}
}//package
Section 77
//Gate_gateIncomingYellowC (Gate_gateIncomingYellowC)
package {
import flash.display.*;
import mx.core.*;
public class Gate_gateIncomingYellowC extends SpriteAsset {
public var txt_timeList:DisplayObject;
public var popup1:DisplayObject;
public var mountains:DisplayObject;
public var popup3:DisplayObject;
public var skier: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 txt_score: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 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 armor: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 txt_loading:DisplayObject;
public var head:DisplayObject;
public var btn_resume:DisplayObject;
public var popup2:DisplayObject;
public var flip:DisplayObject;
public var leaderboard:DisplayObject;
}
}//package
Section 78
//Gate_gateMissC (Gate_gateMissC)
package {
import flash.display.*;
import mx.core.*;
public class Gate_gateMissC extends SpriteAsset {
public var txt_timeList:DisplayObject;
public var popup1:DisplayObject;
public var mountains:DisplayObject;
public var popup3:DisplayObject;
public var skier: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 txt_score: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 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 armor: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 txt_loading:DisplayObject;
public var head:DisplayObject;
public var btn_resume:DisplayObject;
public var popup2:DisplayObject;
public var flip:DisplayObject;
public var leaderboard:DisplayObject;
}
}//package
Section 79
//Gate_incomingCoverC (Gate_incomingCoverC)
package {
import flash.display.*;
import mx.core.*;
public class Gate_incomingCoverC extends SpriteAsset {
public var txt_timeList:DisplayObject;
public var popup1:DisplayObject;
public var mountains:DisplayObject;
public var popup3:DisplayObject;
public var skier: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 txt_score: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 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 armor: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 txt_loading:DisplayObject;
public var head:DisplayObject;
public var btn_resume:DisplayObject;
public var popup2:DisplayObject;
public var flip:DisplayObject;
public var leaderboard:DisplayObject;
}
}//package
Section 80
//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;
};
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 81
//HeightmapRunner_arrowSkierC (HeightmapRunner_arrowSkierC)
package {
import flash.display.*;
import mx.core.*;
public class HeightmapRunner_arrowSkierC extends SpriteAsset {
public var txt_timeList:DisplayObject;
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_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 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 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 txt_loading:DisplayObject;
public var btn_resume:DisplayObject;
public var leaderboard:DisplayObject;
public var skier:DisplayObject;
}
}//package
Section 82
//HeightmapRunner_fx_starsC (HeightmapRunner_fx_starsC)
package {
import flash.display.*;
import mx.core.*;
public class HeightmapRunner_fx_starsC extends MovieClipAsset {
public var txt_timeList:DisplayObject;
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_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 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 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 txt_loading:DisplayObject;
public var btn_resume:DisplayObject;
public var leaderboard:DisplayObject;
public var skier:DisplayObject;
}
}//package
Section 83
//HeightmapRunner_headphonesC (HeightmapRunner_headphonesC)
package {
import flash.display.*;
import mx.core.*;
public class HeightmapRunner_headphonesC extends SpriteAsset {
public var txt_timeList:DisplayObject;
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_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 skierFalling:DisplayObject;
public var btn_restart:DisplayObject;
public var btn_prev:DisplayObject;
public var btn_sponsor:DisplayObject;
public var tips: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 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 txt_loading:DisplayObject;
public var btn_resume:DisplayObject;
public var leaderboard:DisplayObject;
public var skier:DisplayObject;
}
}//package
Section 84
//HeightmapRunner_headphonesPutOnC (HeightmapRunner_headphonesPutOnC)
package {
import flash.display.*;
import mx.core.*;
public class HeightmapRunner_headphonesPutOnC extends MovieClipAsset {
public var txt_timeList:DisplayObject;
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_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 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 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 txt_loading:DisplayObject;
public var btn_resume:DisplayObject;
public var leaderboard:DisplayObject;
public var skier:DisplayObject;
}
}//package
Section 85
//HeightmapRunner_impactParticleC (HeightmapRunner_impactParticleC)
package {
import flash.display.*;
import mx.core.*;
public class HeightmapRunner_impactParticleC extends MovieClipAsset {
public var txt_timeList:DisplayObject;
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_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 skierFalling:DisplayObject;
public var btn_restart:DisplayObject;
public var btn_prev:DisplayObject;
public var btn_sponsor:DisplayObject;
public var tips: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 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 txt_loading:DisplayObject;
public var btn_resume:DisplayObject;
public var leaderboard:DisplayObject;
public var skier:DisplayObject;
}
}//package
Section 86
//HeightmapRunner_skierAirC (HeightmapRunner_skierAirC)
package {
import flash.display.*;
import mx.core.*;
public class HeightmapRunner_skierAirC extends MovieClipAsset {
public var txt_timeList:DisplayObject;
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_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 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 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 txt_loading:DisplayObject;
public var btn_resume:DisplayObject;
public var leaderboard:DisplayObject;
public var skier:DisplayObject;
}
}//package
Section 87
//HeightmapRunner_skierFastC (HeightmapRunner_skierFastC)
package {
import flash.display.*;
import mx.core.*;
public class HeightmapRunner_skierFastC extends MovieClipAsset {
public var txt_timeList:DisplayObject;
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_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 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 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 txt_loading:DisplayObject;
public var btn_resume:DisplayObject;
public var leaderboard:DisplayObject;
public var skier:DisplayObject;
}
}//package
Section 88
//HeightmapRunner_skierGroundC (HeightmapRunner_skierGroundC)
package {
import flash.display.*;
import mx.core.*;
public class HeightmapRunner_skierGroundC extends MovieClipAsset {
public var txt_timeList:DisplayObject;
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_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 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 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 txt_loading:DisplayObject;
public var btn_resume:DisplayObject;
public var leaderboard:DisplayObject;
public var skier:DisplayObject;
}
}//package
Section 89
//HeightmapRunner_skierGroundSlowC (HeightmapRunner_skierGroundSlowC)
package {
import flash.display.*;
import mx.core.*;
public class HeightmapRunner_skierGroundSlowC extends MovieClipAsset {
public var txt_timeList:DisplayObject;
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_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 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 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 txt_loading:DisplayObject;
public var btn_resume:DisplayObject;
public var leaderboard:DisplayObject;
public var skier:DisplayObject;
}
}//package
Section 90
//HeightmapRunner_skierKilledC (HeightmapRunner_skierKilledC)
package {
import flash.display.*;
import mx.core.*;
public class HeightmapRunner_skierKilledC extends MovieClipAsset {
public var txt_timeList:DisplayObject;
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_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 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 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 txt_loading:DisplayObject;
public var btn_resume:DisplayObject;
public var leaderboard:DisplayObject;
public var skier:DisplayObject;
}
}//package
Section 91
//HeightmapRunner_trick1C (HeightmapRunner_trick1C)
package {
import flash.display.*;
import mx.core.*;
public class HeightmapRunner_trick1C extends MovieClipAsset {
public var txt_timeList:DisplayObject;
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_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 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 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 txt_loading:DisplayObject;
public var btn_resume:DisplayObject;
public var leaderboard:DisplayObject;
public var skier:DisplayObject;
}
}//package
Section 92
//HeightmapRunner_trick2C (HeightmapRunner_trick2C)
package {
import flash.display.*;
import mx.core.*;
public class HeightmapRunner_trick2C extends MovieClipAsset {
public var txt_timeList:DisplayObject;
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_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 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 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 txt_loading:DisplayObject;
public var btn_resume:DisplayObject;
public var leaderboard:DisplayObject;
public var skier:DisplayObject;
}
}//package
Section 93
//HeightmapRunner_trick3C (HeightmapRunner_trick3C)
package {
import flash.display.*;
import mx.core.*;
public class HeightmapRunner_trick3C extends MovieClipAsset {
public var txt_timeList:DisplayObject;
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_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 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 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 txt_loading:DisplayObject;
public var btn_resume:DisplayObject;
public var leaderboard:DisplayObject;
public var skier:DisplayObject;
}
}//package
Section 94
//HeightmapRunner_trick4C (HeightmapRunner_trick4C)
package {
import flash.display.*;
import mx.core.*;
public class HeightmapRunner_trick4C extends MovieClipAsset {
public var txt_timeList:DisplayObject;
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_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 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 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 txt_loading:DisplayObject;
public var btn_resume:DisplayObject;
public var leaderboard:DisplayObject;
public var skier:DisplayObject;
}
}//package
Section 95
//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 96
//KillGate_arrowRedBlankC (KillGate_arrowRedBlankC)
package {
import flash.display.*;
import mx.core.*;
public class KillGate_arrowRedBlankC extends SpriteAsset {
public var txt_timeList:DisplayObject;
public var popup1:DisplayObject;
public var mountains:DisplayObject;
public var popup3:DisplayObject;
public var skier: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 txt_score: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 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 armor: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 txt_loading:DisplayObject;
public var head:DisplayObject;
public var btn_resume:DisplayObject;
public var popup2:DisplayObject;
public var flip:DisplayObject;
public var leaderboard:DisplayObject;
}
}//package
Section 97
//KillGate_gateRedC (KillGate_gateRedC)
package {
import flash.display.*;
import mx.core.*;
public class KillGate_gateRedC extends SpriteAsset {
public var txt_timeList:DisplayObject;
public var popup1:DisplayObject;
public var mountains:DisplayObject;
public var popup3:DisplayObject;
public var skier: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 txt_score: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 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 armor: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 txt_loading:DisplayObject;
public var head:DisplayObject;
public var btn_resume:DisplayObject;
public var popup2:DisplayObject;
public var flip:DisplayObject;
public var leaderboard:DisplayObject;
}
}//package
Section 98
//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 99
//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 obstacleLayer:Sprite;
public var jumps:Array;
public var pauseScreen;
public var scorekeeper:Scorekeeper;
public var redball:HeightmapRunner;
public var newmousex:int;
public var speedText:TextField;
public var endgameScreen:EndgameScreen;
public var newmousey:int;
public var fx_flakeC:Class;
public var flakes:Array;
public var statSubmitDebug:TextField;
public var replayMode:Boolean;
public var ui_leaderboardC:Class;
public var targetTimer:int;// = 100
public var gameStarted:Boolean;// = false
public var blurMult:Number;// = 0.02
public var fxFadeIn:int;// = 30
public var deathSpeed:String;
public var leaderboardScreen;
public var snowflakeActiveC:Class;
public var currentPlay:int;// = 0
public var startTime:uint;
public var inkJar:Number;// = 1
public var terrainSliverBMP:BitmapData;
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 gameFrame:uint;// = 0
public var spawnMgr:SpawnManager;
public var jumpScoreLayer:Sprite;
public var ui_optionsC:Class;
public var optionsScreen;
public var atTitleScreen:Boolean;// = false
public var blurMode:Boolean;// = true
public var terrainBitmap:Bitmap;
public var finalRainbowPos:Point;
public var heightmap:Array;
public var rainbowSize:Number;// = 40
public var kongapi:KongAPI;
public var titleScreen;
public var ui_titleC:Class;
public var cursorEnabled;
public var sliverWidth:int;// = 1
public var ui_pauseC:Class;
public var frameNumber:uint;// = 0
public var localLeaderboard:Leaderboard;
public var rainbowGrowth:Number;// = 0.002
public var paused:Boolean;// = false
public var snowflakeC:Class;
public var pauseRestart:Boolean;// = false
public var sceneryLayer:Sprite;
public var sceneryTimer:int;// = 10
public var totalGameTime:uint;
public var rainbowAlpha:Number;// = 0
public var perfectTunnelCount:int;// = 0
public var gameOverBaseC:Class;
public var cursor:Sprite;
public var currIntro;
public var chopinTimer:int;// = -1
public var muted:Boolean;// = false
public var bmd:BitmapData;
public var scrollSpeed:int;// = 10
public var scrollers:Array;
public var introNum:int;// = 0
public var fpsDisplay:FpsCounter;
public var lastHMX:int;
public var bgManager:BGManagerFastest;
public var realXOffset:int;// = 0
public var rainbowAmount:Number;// = 0
public var mouseXSaveIter:int;// = 10
public var firstGo:Boolean;// = true
public var mikengregIntroC:Class;
public var obstacles:Array;
public var input:Input;
public var slopemap:Array;
public var kongIntroC:Class;
public var crashTimer:int;// = 0
public var howIdie:String;
public var cursorDisabled;
public var lastRainbowPos:Point;
public var replayMap:Array;
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;
gameOverBaseC = Main_gameOverBaseC;
kongIntroC = Main_kongIntroC;
mikengregIntroC = Main_mikengregIntroC;
ui_titleC = Main_ui_titleC;
super();
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);
setupOptionsPauseLeaderboard();
lastTime = getTimer();
SoundMgr.setFXVolume(0);
if (stage == null){
addEventListener(Event.ADDED_TO_STAGE, addedToStage);
} else {
addedToStage(null);
};
doIntros();
}
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 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 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 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 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 mDown(_arg1:MouseEvent):void{
if (((atTitleScreen) && ((currIntro == null)))){
startGame();
};
}
public function muteToggle():void{
if (!muted){
SoundMixer.soundTransform = new SoundTransform(0);
} else {
SoundMixer.soundTransform = new SoundTransform(1);
};
muted = !(muted);
}
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.removeEventListener(MouseEvent.CLICK, MainRef.gotoKong);
currIntro.stop();
if ((this is ArmorMain)){
currIntro.armor.stop();
};
SoundMixer.stopAll();
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 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 setupOptionsPauseLeaderboard():void{
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);
}
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 tunnelGateHit():void{
if (inkJar > 0){
inkJar = (inkJar + 0.25);
};
perfectTunnelCount++;
scorekeeper.crossTunnelGate();
if (perfectTunnelCount == 40){
scorekeeper.perfectTunnel();
};
}
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 toEndgameScreen():void{
TipManager.dispenseWithTheTip();
endgameScreen = new EndgameScreen();
addChild(endgameScreen);
endgameScreen.refresh(totalGameTime, scorekeeper.score, redball.x);
}
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 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"){
muteToggle();
};
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 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 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 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 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 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 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 findLastHeight(_arg1:int):int{
var _local2:int = _arg1;
while (_local2 > 0) {
if (heightmap[_local2] < 490){
return (_local2);
};
_local2--;
};
return (0);
}
public function doIntros():void{
var _local1:* = new kongIntroC();
addChild(_local1);
currIntro = _local1;
_local1.addEventListener(MouseEvent.CLICK, MainRef.gotoKong, false, 0, true);
}
public function landHighJump(_arg1:int):void{
}
}
}//package
Section 100
//Main_fx_flakeC (Main_fx_flakeC)
package {
import flash.display.*;
import mx.core.*;
public class Main_fx_flakeC extends MovieClipAsset {
public var txt_loading:DisplayObject;
}
}//package
Section 101
//Main_gameOverBaseC (Main_gameOverBaseC)
package {
import flash.display.*;
import mx.core.*;
public class Main_gameOverBaseC extends MovieClipAsset {
public var txt_timeList:DisplayObject;
public var txt_score:DisplayObject;
public var btn_next:DisplayObject;
public var btn_twitter:DisplayObject;
public var btn_leaderboards:DisplayObject;
public var credits:DisplayObject;
public var options:DisplayObject;
public var btn_sfxOn:DisplayObject;
public var btn_aaOn:DisplayObject;
public var btn_bgmOn:DisplayObject;
public var skierFalling:DisplayObject;
public var btn_restart:DisplayObject;
public var btn_stump:DisplayObject;
public var btn_prev:DisplayObject;
public var btn_sponsor:DisplayObject;
public var tips:DisplayObject;
public var btn_options:DisplayObject;
public var txt_scoreList:DisplayObject;
public var btn_facebook:DisplayObject;
public var txt_time: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 txt_loading:DisplayObject;
public var btn_resume:DisplayObject;
public var leaderboard:DisplayObject;
public var skier:DisplayObject;
}
}//package
Section 102
//Main_kongIntroC (Main_kongIntroC)
package {
import flash.display.*;
import mx.core.*;
public class Main_kongIntroC extends MovieClipAsset {
public var txt_loading:DisplayObject;
}
}//package
Section 103
//Main_mikengregIntroC (Main_mikengregIntroC)
package {
import flash.display.*;
import mx.core.*;
public class Main_mikengregIntroC extends MovieClipAsset {
public var txt_loading:DisplayObject;
}
}//package
Section 104
//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 txt_loading: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 105
//Main_snowflakeC (Main_snowflakeC)
package {
import flash.display.*;
import mx.core.*;
public class Main_snowflakeC extends SpriteAsset {
public var txt_loading:DisplayObject;
}
}//package
Section 106
//Main_ui_leaderboardC (Main_ui_leaderboardC)
package {
import flash.display.*;
import mx.core.*;
public class Main_ui_leaderboardC extends MovieClipAsset {
public var txt_timeList:DisplayObject;
public var txt_score:DisplayObject;
public var btn_next:DisplayObject;
public var btn_twitter:DisplayObject;
public var btn_leaderboards:DisplayObject;
public var credits:DisplayObject;
public var options:DisplayObject;
public var btn_sfxOn:DisplayObject;
public var btn_aaOn:DisplayObject;
public var btn_bgmOn:DisplayObject;
public var skierFalling:DisplayObject;
public var btn_restart:DisplayObject;
public var btn_stump:DisplayObject;
public var btn_prev:DisplayObject;
public var btn_sponsor:DisplayObject;
public var tips:DisplayObject;
public var btn_options:DisplayObject;
public var txt_scoreList:DisplayObject;
public var btn_facebook:DisplayObject;
public var txt_time: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 txt_loading:DisplayObject;
public var btn_resume:DisplayObject;
public var leaderboard:DisplayObject;
public var skier:DisplayObject;
}
}//package
Section 107
//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 txt_loading: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 108
//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 txt_loading:DisplayObject;
public var btn_resume:DisplayObject;
public var btn_blurOn:DisplayObject;
public var btn_sponsor:DisplayObject;
}
}//package
Section 109
//Main_ui_titleC (Main_ui_titleC)
package {
import flash.display.*;
import mx.core.*;
public class Main_ui_titleC extends MovieClipAsset {
public var txt_loading:DisplayObject;
}
}//package
Section 110
//MainRef (MainRef)
package {
import flash.events.*;
import flash.net.*;
import SWFStats.*;
public class MainRef {
public static var ref:Main;
public static var kongLink:String = "http://www.kongregate.com/?gamereferral=solipskier";
public static function gotoKong(_arg1:Event):void{
Log.CustomMetric("kongd", "links");
urlNavigate(kongLink);
}
public static function urlNavigate(_arg1:String):void{
navigateToURL(new URLRequest(_arg1), "_blank");
}
public static function gotoMikengreg(_arg1:Event):void{
Log.CustomMetric("mikengregd", "links");
urlNavigate("http://www.mikengreg.com");
}
public static function gotoSolipRedirect(_arg1:Event):void{
Log.CustomMetric("mobile", "links");
urlNavigate("http://mikengreg.com/solip_redirect");
}
}
}//package
Section 111
//NewgroundsEndgameScreen (NewgroundsEndgameScreen)
package {
import com.newgrounds.*;
public class NewgroundsEndgameScreen extends EndgameScreen {
public function NewgroundsEndgameScreen(){
var _local1:ScoreBoard = new ScoreBoard(0, "Top Score");
}
}
}//package
Section 112
//NewgroundsMain (NewgroundsMain)
package {
import flash.events.*;
import flash.display.*;
import General.*;
import com.newgrounds.*;
public class NewgroundsMain extends Main {
public var ui_pauseC_NG:Class;
public var ui_leaderboardC_NG:Class;
public var ui_optionsC_NG:Class;
public var gameOverBaseC_NG:Class;
public var ngIntroC:Class;
public function NewgroundsMain(){
ngIntroC = NewgroundsMain_ngIntroC;
ui_leaderboardC_NG = NewgroundsMain_ui_leaderboardC_NG;
ui_pauseC_NG = NewgroundsMain_ui_pauseC_NG;
ui_optionsC_NG = NewgroundsMain_ui_optionsC_NG;
gameOverBaseC_NG = NewgroundsMain_gameOverBaseC_NG;
super();
MainRef.kongLink = "http://www.newgrounds.com";
gameOverBaseC = gameOverBaseC_NG;
NewgroundsAPI.loadMedals();
}
override public function addedToStage(_arg1:Event):void{
input = new Input(this);
stage.frameRate = 30;
stage.addEventListener(KeyboardEvent.KEY_DOWN, keydown);
}
override public function setupOptionsPauseLeaderboard():void{
leaderboardScreen = new ui_leaderboardC_NG();
addChild(leaderboardScreen);
leaderboardScreen.gotoAndStop(1);
optionsScreen = new ui_optionsC_NG();
addChild(optionsScreen);
optionsScreen.gotoAndStop(1);
pauseScreen = new ui_pauseC_NG();
addChild(pauseScreen);
new OptionsBoard(pauseScreen.board);
pauseScreen.gotoAndStop(1);
Util.ButtonReg(pauseScreen.board.btn_restart, pauseScreenRestart);
Util.ButtonReg(pauseScreen.board.btn_resume, pauseScreenResume);
}
override public function doIntros():void{
var _local1:* = new ngIntroC();
addChild(_local1);
currIntro = _local1;
_local1.addEventListener(MouseEvent.CLICK, MainRef.gotoKong, false, 0, true);
}
override public function enterFrame(_arg1:Event):void{
super.enterFrame(_arg1);
if (!gameStarted){
return;
};
if (scorekeeper.score > 1000000){
NewgroundsAPI.getMedalByName("Bronze Medal in Awesomeness").unlock();
};
if (scorekeeper.score > 100000000){
NewgroundsAPI.getMedalByName("Gold Medal in Awesomeness").unlock();
};
if (scorekeeper.mult > 50){
NewgroundsAPI.getMedalByName("Wicked Tricks").unlock();
};
if (scorekeeper.mult > 100){
NewgroundsAPI.getMedalByName("Awesome Combo!").unlock();
};
if (((!(redball.headphonesSecure)) && (!(redball.killGateHit)))){
NewgroundsAPI.getMedalByName("Where'd All My Tunes Go At?!").unlock();
};
}
override public function submitKongScores():void{
}
override public function landHighJump(_arg1:int):void{
if (_arg1 > 100000){
NewgroundsAPI.getMedalByName("Nice Jump").unlock();
};
if (_arg1 > 1000000){
NewgroundsAPI.getMedalByName("Sick Air!").unlock();
};
}
override public function toEndgameScreen():void{
TipManager.dispenseWithTheTip();
endgameScreen = new NewgroundsEndgameScreen();
addChild(endgameScreen);
endgameScreen.refresh(totalGameTime, scorekeeper.score, redball.x);
}
}
}//package
Section 113
//NewgroundsMain_gameOverBaseC_NG (NewgroundsMain_gameOverBaseC_NG)
package {
import flash.display.*;
import mx.core.*;
public class NewgroundsMain_gameOverBaseC_NG extends MovieClipAsset {
public var txt_timeList:DisplayObject;
public var txt_score:DisplayObject;
public var btn_next:DisplayObject;
public var btn_twitter:DisplayObject;
public var btn_leaderboards:DisplayObject;
public var credits:DisplayObject;
public var options:DisplayObject;
public var btn_sfxOn:DisplayObject;
public var btn_aaOn:DisplayObject;
public var btn_bgmOn:DisplayObject;
public var skierFalling:DisplayObject;
public var btn_restart:DisplayObject;
public var btn_stump:DisplayObject;
public var btn_prev:DisplayObject;
public var btn_sponsor:DisplayObject;
public var tips:DisplayObject;
public var btn_options:DisplayObject;
public var txt_scoreList:DisplayObject;
public var btn_facebook:DisplayObject;
public var txt_time: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 txt_loading:DisplayObject;
public var btn_resume:DisplayObject;
public var leaderboard:DisplayObject;
public var skier:DisplayObject;
}
}//package
Section 114
//NewgroundsMain_ngIntroC (NewgroundsMain_ngIntroC)
package {
import flash.display.*;
import mx.core.*;
public class NewgroundsMain_ngIntroC extends MovieClipAsset {
public var txt_timeList:DisplayObject;
public var txt_score:DisplayObject;
public var btn_next:DisplayObject;
public var btn_twitter:DisplayObject;
public var btn_leaderboards:DisplayObject;
public var credits:DisplayObject;
public var options:DisplayObject;
public var btn_sfxOn:DisplayObject;
public var btn_aaOn:DisplayObject;
public var btn_bgmOn:DisplayObject;
public var skierFalling:DisplayObject;
public var btn_restart:DisplayObject;
public var btn_stump:DisplayObject;
public var btn_prev:DisplayObject;
public var btn_sponsor:DisplayObject;
public var tips:DisplayObject;
public var btn_options:DisplayObject;
public var txt_scoreList:DisplayObject;
public var btn_facebook:DisplayObject;
public var txt_time: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 txt_loading:DisplayObject;
public var btn_resume:DisplayObject;
public var leaderboard:DisplayObject;
public var skier:DisplayObject;
}
}//package
Section 115
//NewgroundsMain_ui_leaderboardC_NG (NewgroundsMain_ui_leaderboardC_NG)
package {
import flash.display.*;
import mx.core.*;
public class NewgroundsMain_ui_leaderboardC_NG extends MovieClipAsset {
public var txt_timeList:DisplayObject;
public var txt_score:DisplayObject;
public var btn_next:DisplayObject;
public var btn_twitter:DisplayObject;
public var btn_leaderboards:DisplayObject;
public var credits:DisplayObject;
public var options:DisplayObject;
public var btn_sfxOn:DisplayObject;
public var btn_aaOn:DisplayObject;
public var btn_bgmOn:DisplayObject;
public var skierFalling:DisplayObject;
public var btn_restart:DisplayObject;
public var btn_stump:DisplayObject;
public var btn_prev:DisplayObject;
public var btn_sponsor:DisplayObject;
public var tips:DisplayObject;
public var btn_options:DisplayObject;
public var txt_scoreList:DisplayObject;
public var btn_facebook:DisplayObject;
public var txt_time: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 txt_loading:DisplayObject;
public var btn_resume:DisplayObject;
public var leaderboard:DisplayObject;
public var skier:DisplayObject;
}
}//package
Section 116
//NewgroundsMain_ui_optionsC_NG (NewgroundsMain_ui_optionsC_NG)
package {
import flash.display.*;
import mx.core.*;
public class NewgroundsMain_ui_optionsC_NG extends MovieClipAsset {
public var txt_timeList:DisplayObject;
public var txt_score:DisplayObject;
public var btn_next:DisplayObject;
public var btn_twitter:DisplayObject;
public var btn_leaderboards:DisplayObject;
public var credits:DisplayObject;
public var options:DisplayObject;
public var btn_sfxOn:DisplayObject;
public var btn_aaOn:DisplayObject;
public var btn_bgmOn:DisplayObject;
public var skierFalling:DisplayObject;
public var btn_restart:DisplayObject;
public var btn_stump:DisplayObject;
public var btn_prev:DisplayObject;
public var btn_sponsor:DisplayObject;
public var tips:DisplayObject;
public var btn_options:DisplayObject;
public var txt_scoreList:DisplayObject;
public var btn_facebook:DisplayObject;
public var txt_time: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 txt_loading:DisplayObject;
public var btn_resume:DisplayObject;
public var leaderboard:DisplayObject;
public var skier:DisplayObject;
}
}//package
Section 117
//NewgroundsMain_ui_pauseC_NG (NewgroundsMain_ui_pauseC_NG)
package {
import flash.display.*;
import mx.core.*;
public class NewgroundsMain_ui_pauseC_NG extends MovieClipAsset {
public var txt_timeList:DisplayObject;
public var txt_score:DisplayObject;
public var btn_next:DisplayObject;
public var btn_twitter:DisplayObject;
public var btn_leaderboards:DisplayObject;
public var credits:DisplayObject;
public var options:DisplayObject;
public var btn_sfxOn:DisplayObject;
public var btn_aaOn:DisplayObject;
public var btn_bgmOn:DisplayObject;
public var skierFalling:DisplayObject;
public var btn_restart:DisplayObject;
public var btn_stump:DisplayObject;
public var btn_prev:DisplayObject;
public var btn_sponsor:DisplayObject;
public var tips:DisplayObject;
public var btn_options:DisplayObject;
public var txt_scoreList:DisplayObject;
public var btn_facebook:DisplayObject;
public var txt_time: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 txt_loading:DisplayObject;
public var btn_resume:DisplayObject;
public var leaderboard:DisplayObject;
public var skier:DisplayObject;
}
}//package
Section 118
//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 119
//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 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 txt_score: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 txt_loading:DisplayObject;
public var head:DisplayObject;
public var btn_resume:DisplayObject;
public var flip:DisplayObject;
public var leaderboard:DisplayObject;
public var skier:DisplayObject;
}
}//package
Section 120
//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 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 txt_score: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 txt_loading:DisplayObject;
public var head:DisplayObject;
public var btn_resume:DisplayObject;
public var flip:DisplayObject;
public var leaderboard:DisplayObject;
public var skier:DisplayObject;
}
}//package
Section 121
//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 122
//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 123
//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 124
//SceneryMgr_impactParticleC (SceneryMgr_impactParticleC)
package {
import flash.display.*;
import mx.core.*;
public class SceneryMgr_impactParticleC extends MovieClipAsset {
public var txt_timeList: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 txt_score: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 txt_loading:DisplayObject;
public var head:DisplayObject;
public var btn_resume:DisplayObject;
public var flip:DisplayObject;
public var leaderboard:DisplayObject;
public var skier:DisplayObject;
}
}//package
Section 125
//SceneryMgr_lodgeC (SceneryMgr_lodgeC)
package {
import flash.display.*;
import mx.core.*;
public class SceneryMgr_lodgeC extends SpriteAsset {
public var txt_timeList: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 txt_score: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 txt_loading:DisplayObject;
public var head:DisplayObject;
public var btn_resume:DisplayObject;
public var flip:DisplayObject;
public var leaderboard:DisplayObject;
public var skier:DisplayObject;
}
}//package
Section 126
//SceneryMgr_outhouseC (SceneryMgr_outhouseC)
package {
import flash.display.*;
import mx.core.*;
public class SceneryMgr_outhouseC extends SpriteAsset {
public var txt_timeList: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 txt_score: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 txt_loading:DisplayObject;
public var head:DisplayObject;
public var btn_resume:DisplayObject;
public var flip:DisplayObject;
public var leaderboard:DisplayObject;
public var skier:DisplayObject;
}
}//package
Section 127
//SceneryMgr_skisC (SceneryMgr_skisC)
package {
import flash.display.*;
import mx.core.*;
public class SceneryMgr_skisC extends SpriteAsset {
public var txt_timeList: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 txt_score: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 txt_loading:DisplayObject;
public var head:DisplayObject;
public var btn_resume:DisplayObject;
public var flip:DisplayObject;
public var leaderboard:DisplayObject;
public var skier:DisplayObject;
}
}//package
Section 128
//SceneryMgr_snowboardC (SceneryMgr_snowboardC)
package {
import flash.display.*;
import mx.core.*;
public class SceneryMgr_snowboardC extends SpriteAsset {
public var txt_timeList: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 txt_score: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 txt_loading:DisplayObject;
public var head:DisplayObject;
public var btn_resume:DisplayObject;
public var flip:DisplayObject;
public var leaderboard:DisplayObject;
public var skier:DisplayObject;
}
}//package
Section 129
//SceneryMgr_tree1C (SceneryMgr_tree1C)
package {
import flash.display.*;
import mx.core.*;
public class SceneryMgr_tree1C extends SpriteAsset {
public var txt_timeList: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 txt_score: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 txt_loading:DisplayObject;
public var head:DisplayObject;
public var btn_resume:DisplayObject;
public var flip:DisplayObject;
public var leaderboard:DisplayObject;
public var skier:DisplayObject;
}
}//package
Section 130
//SceneryMgr_tree2C (SceneryMgr_tree2C)
package {
import flash.display.*;
import mx.core.*;
public class SceneryMgr_tree2C extends SpriteAsset {
public var txt_timeList: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 txt_score: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 txt_loading:DisplayObject;
public var head:DisplayObject;
public var btn_resume:DisplayObject;
public var flip:DisplayObject;
public var leaderboard:DisplayObject;
public var skier:DisplayObject;
}
}//package
Section 131
//SceneryMgr_tree3C (SceneryMgr_tree3C)
package {
import flash.display.*;
import mx.core.*;
public class SceneryMgr_tree3C extends SpriteAsset {
public var txt_timeList: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 txt_score: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 txt_loading:DisplayObject;
public var head:DisplayObject;
public var btn_resume:DisplayObject;
public var flip:DisplayObject;
public var leaderboard:DisplayObject;
public var skier:DisplayObject;
}
}//package
Section 132
//SceneryMgr_tree4C (SceneryMgr_tree4C)
package {
import flash.display.*;
import mx.core.*;
public class SceneryMgr_tree4C extends SpriteAsset {
public var txt_timeList: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 txt_score: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 txt_loading:DisplayObject;
public var head:DisplayObject;
public var btn_resume:DisplayObject;
public var flip:DisplayObject;
public var leaderboard:DisplayObject;
public var skier:DisplayObject;
}
}//package
Section 133
//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);
MainRef.ref.landHighJump(_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 134
//Scorekeeper_hud_bonusC (Scorekeeper_hud_bonusC)
package {
import flash.display.*;
import mx.core.*;
public class Scorekeeper_hud_bonusC extends SpriteAsset {
public var txt_timeList:DisplayObject;
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_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 skierFalling:DisplayObject;
public var btn_restart:DisplayObject;
public var btn_prev:DisplayObject;
public var btn_sponsor:DisplayObject;
public var tips: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 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 txt_loading:DisplayObject;
public var btn_resume:DisplayObject;
public var leaderboard:DisplayObject;
public var skier:DisplayObject;
}
}//package
Section 135
//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_score:DisplayObject;
public var btn_next:DisplayObject;
public var txt_bonus:DisplayObject;
public var btn_twitter:DisplayObject;
public var btn_leaderboards:DisplayObject;
public var credits:DisplayObject;
public var options:DisplayObject;
public var btn_sfxOn:DisplayObject;
public var btn_aaOn:DisplayObject;
public var btn_bgmOn:DisplayObject;
public var skierFalling:DisplayObject;
public var btn_restart:DisplayObject;
public var btn_stump:DisplayObject;
public var btn_prev:DisplayObject;
public var btn_sponsor:DisplayObject;
public var tips:DisplayObject;
public var btn_options:DisplayObject;
public var txt_scoreList:DisplayObject;
public var btn_facebook:DisplayObject;
public var txt_time:DisplayObject;
public var popup: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 txt_loading:DisplayObject;
public var btn_resume:DisplayObject;
public var leaderboard:DisplayObject;
public var skier:DisplayObject;
}
}//package
Section 136
//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_timeList:DisplayObject;
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_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 skierFalling:DisplayObject;
public var btn_restart:DisplayObject;
public var btn_prev:DisplayObject;
public var btn_sponsor:DisplayObject;
public var tips: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 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 txt_loading:DisplayObject;
public var btn_resume:DisplayObject;
public var leaderboard:DisplayObject;
public var skier:DisplayObject;
}
}//package
Section 137
//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_score:DisplayObject;
public var btn_next:DisplayObject;
public var btn_twitter:DisplayObject;
public var btn_leaderboards:DisplayObject;
public var credits:DisplayObject;
public var options:DisplayObject;
public var btn_sfxOn:DisplayObject;
public var btn_aaOn:DisplayObject;
public var btn_bgmOn:DisplayObject;
public var skierFalling:DisplayObject;
public var btn_restart:DisplayObject;
public var btn_stump:DisplayObject;
public var btn_prev:DisplayObject;
public var btn_sponsor:DisplayObject;
public var tips:DisplayObject;
public var btn_options:DisplayObject;
public var txt_scoreList:DisplayObject;
public var btn_facebook:DisplayObject;
public var txt_time:DisplayObject;
public var popup: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 txt_loading:DisplayObject;
public var btn_resume:DisplayObject;
public var leaderboard:DisplayObject;
public var skier:DisplayObject;
}
}//package
Section 138
//Scorekeeper_hud_scoreC (Scorekeeper_hud_scoreC)
package {
import flash.display.*;
import mx.core.*;
public class Scorekeeper_hud_scoreC extends SpriteAsset {
public var txt_timeList:DisplayObject;
public var txt_score:DisplayObject;
public var btn_next:DisplayObject;
public var txt_bonus:DisplayObject;
public var btn_twitter: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 skierFalling:DisplayObject;
public var btn_restart:DisplayObject;
public var btn_stump:DisplayObject;
public var btn_prev:DisplayObject;
public var btn_sponsor:DisplayObject;
public var tips:DisplayObject;
public var btn_options:DisplayObject;
public var txt_scoreList:DisplayObject;
public var btn_facebook:DisplayObject;
public var txt_time:DisplayObject;
public var popup:DisplayObject;
public var txt_mph: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 txt_loading:DisplayObject;
public var btn_resume:DisplayObject;
public var leaderboard:DisplayObject;
public var skier:DisplayObject;
}
}//package
Section 139
//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 140
//SolipskierNewgrounds (SolipskierNewgrounds)
package {
import com.newgrounds.*;
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import General.*;
import SWFStats.*;
import flash.text.*;
public class SolipskierNewgrounds extends MovieClip {
public var playBtn:MovieClip;
public var input:Input;
public var preloaderC:Class;
public var preloader;
public var ngAd:DisplayObject;
public function SolipskierNewgrounds(){
preloaderC = SolipskierNewgrounds_preloaderC;
super();
NewgroundsAPI.connectMovie(stage.loaderInfo, "13976:IJRHJplY", "RiHRUmkDkdNMt4DyzqwMREsazMqaoEMV");
NewgroundsAPI.addEventListener(APIEvent.METADATA_LOADED, metadataIsGo);
}
public function playBtnClick(_arg1:MouseEvent):void{
removeChild(playBtn);
playBtn = null;
removeChild(preloader);
addChild(new (getDefinitionByName("NewgroundsMain")));
removeEventListener(Event.ENTER_FRAME, enterFrame);
removeChild(ngAd);
}
public function metadataIsGo(_arg1:APIEvent):void{
var _local5:TextField;
var _local2:Array = stage.loaderInfo.url.split("://");
var _local3:Array = _local2[1].split("/");
if (((((stage.loaderInfo.url.match("uploads.ungrounded.net")) || ((_local3[0] == "")))) || (_local3[0].match("mikengreg")))){
Log.View(376, "42e427e1-c618-444d-9853-5054d6f6c6f5", root.loaderInfo.loaderURL);
addEventListener(Event.ENTER_FRAME, enterFrame);
preloader = new preloaderC();
addChild(preloader);
preloader.gotoAndStop(1);
} else {
_local5 = new TextField();
_local5.text = ("domain == " + stage.loaderInfo.url);
addChild(_local5);
_local5.x = (_local5.y = 100);
_local5.textColor = 0xFF0000;
};
var _local4:DisplayObject = NewgroundsAPI.createAd();
_local4.x = (400 - (_local4.width * 0.5));
_local4.y = (400 - (_local4.height * 0.5));
ngAd = _local4;
addChild(ngAd);
ngAd.x = (ngAd.x + 240);
ngAd.y = (ngAd.y - 100);
ngAd.width = (ngAd.width - 40);
ngAd.height = (ngAd.height - 40);
}
public function enterFrame(_arg1:Event):void{
preloader.gotoAndStop(Math.round(((stage.loaderInfo.bytesLoaded / stage.loaderInfo.bytesTotal) * 100)));
if ((((currentLabel == "start")) && ((playBtn == null)))){
playBtn = new MovieClip();
playBtn.graphics.beginFill(0);
playBtn.graphics.drawRect(0, 0, 200, 50);
playBtn.graphics.endFill();
playBtn.alpha = 0;
playBtn.useHandCursor = true;
playBtn.buttonMode = true;
playBtn.addEventListener(MouseEvent.CLICK, playBtnClick, false, 0, true);
playBtn.x = 568;
playBtn.y = 382;
addChild(playBtn);
preloader.txt_loading.text = "PLAY";
TextField(preloader.txt_loading).autoSize = TextFieldAutoSize.RIGHT;
};
}
}
}//package
Section 141
//SolipskierNewgrounds_preloaderC (SolipskierNewgrounds_preloaderC)
package {
import mx.core.*;
import flash.display.*;
public class SolipskierNewgrounds_preloaderC extends MovieClipAsset {
public var txt_loading:DisplayObject;
}
}//package
Section 142
//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 143
//SoundMgr_bgm_chopinEtude (SoundMgr_bgm_chopinEtude)
package {
import flash.display.*;
import mx.core.*;
public class SoundMgr_bgm_chopinEtude extends SoundAsset {
public var txt_timeList:DisplayObject;
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_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 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 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 txt_loading:DisplayObject;
public var btn_resume:DisplayObject;
public var leaderboard:DisplayObject;
public var skier:DisplayObject;
}
}//package
Section 144
//SoundMgr_bgm_speedMetal (SoundMgr_bgm_speedMetal)
package {
import flash.display.*;
import mx.core.*;
public class SoundMgr_bgm_speedMetal extends SoundAsset {
public var txt_timeList:DisplayObject;
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_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 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 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 txt_loading:DisplayObject;
public var btn_resume:DisplayObject;
public var leaderboard:DisplayObject;
public var skier:DisplayObject;
}
}//package
Section 145
//SoundMgr_bgm_windSoundC (SoundMgr_bgm_windSoundC)
package {
import flash.display.*;
import mx.core.*;
public class SoundMgr_bgm_windSoundC extends SoundAsset {
public var txt_timeList:DisplayObject;
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_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 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 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 txt_loading:DisplayObject;
public var btn_resume:DisplayObject;
public var leaderboard:DisplayObject;
public var skier:DisplayObject;
}
}//package
Section 146
//SoundMgr_sfx_gateKillC (SoundMgr_sfx_gateKillC)
package {
import mx.core.*;
public class SoundMgr_sfx_gateKillC extends SoundAsset {
}
}//package
Section 147
//SoundMgr_sfx_gateMissC (SoundMgr_sfx_gateMissC)
package {
import flash.display.*;
import mx.core.*;
public class SoundMgr_sfx_gateMissC extends SoundAsset {
public var txt_timeList:DisplayObject;
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_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 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 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 txt_loading:DisplayObject;
public var btn_resume:DisplayObject;
public var leaderboard:DisplayObject;
public var skier:DisplayObject;
}
}//package
Section 148
//SoundMgr_sfx_gatePickupC (SoundMgr_sfx_gatePickupC)
package {
import flash.display.*;
import mx.core.*;
public class SoundMgr_sfx_gatePickupC extends SoundAsset {
public var txt_timeList:DisplayObject;
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_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 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 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 txt_loading:DisplayObject;
public var btn_resume:DisplayObject;
public var leaderboard:DisplayObject;
public var skier:DisplayObject;
}
}//package
Section 149
//SoundMgr_sfx_jumpCheer1 (SoundMgr_sfx_jumpCheer1)
package {
import flash.display.*;
import mx.core.*;
public class SoundMgr_sfx_jumpCheer1 extends SoundAsset {
public var txt_timeList:DisplayObject;
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_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 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 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 txt_loading:DisplayObject;
public var btn_resume:DisplayObject;
public var leaderboard:DisplayObject;
public var skier:DisplayObject;
}
}//package
Section 150
//SoundMgr_sfx_jumpCheer1C (SoundMgr_sfx_jumpCheer1C)
package {
import flash.display.*;
import mx.core.*;
public class SoundMgr_sfx_jumpCheer1C extends SoundAsset {
public var txt_timeList:DisplayObject;
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_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 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 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 txt_loading:DisplayObject;
public var btn_resume:DisplayObject;
public var leaderboard:DisplayObject;
public var skier:DisplayObject;
}
}//package
Section 151
//SoundMgr_sfx_jumpCheer2 (SoundMgr_sfx_jumpCheer2)
package {
import flash.display.*;
import mx.core.*;
public class SoundMgr_sfx_jumpCheer2 extends SoundAsset {
public var txt_timeList:DisplayObject;
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_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 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 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 txt_loading:DisplayObject;
public var btn_resume:DisplayObject;
public var leaderboard:DisplayObject;
public var skier:DisplayObject;
}
}//package
Section 152
//SoundMgr_sfx_jumpCheer2C (SoundMgr_sfx_jumpCheer2C)
package {
import flash.display.*;
import mx.core.*;
public class SoundMgr_sfx_jumpCheer2C extends SoundAsset {
public var txt_timeList:DisplayObject;
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_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 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 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 txt_loading:DisplayObject;
public var btn_resume:DisplayObject;
public var leaderboard:DisplayObject;
public var skier:DisplayObject;
}
}//package
Section 153
//SoundMgr_sfx_jumpLandingC (SoundMgr_sfx_jumpLandingC)
package {
import flash.display.*;
import mx.core.*;
public class SoundMgr_sfx_jumpLandingC extends SoundAsset {
public var txt_timeList:DisplayObject;
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_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 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 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 txt_loading:DisplayObject;
public var btn_resume:DisplayObject;
public var leaderboard:DisplayObject;
public var skier:DisplayObject;
}
}//package
Section 154
//SoundMgr_sfx_jumpTrick (SoundMgr_sfx_jumpTrick)
package {
import flash.display.*;
import mx.core.*;
public class SoundMgr_sfx_jumpTrick extends SoundAsset {
public var txt_timeList:DisplayObject;
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_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 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 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 txt_loading:DisplayObject;
public var btn_resume:DisplayObject;
public var leaderboard:DisplayObject;
public var skier:DisplayObject;
}
}//package
Section 155
//SoundMgr_sfx_recordScratch (SoundMgr_sfx_recordScratch)
package {
import flash.display.*;
import mx.core.*;
public class SoundMgr_sfx_recordScratch extends SoundAsset {
public var txt_timeList:DisplayObject;
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_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 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 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 txt_loading:DisplayObject;
public var btn_resume:DisplayObject;
public var leaderboard:DisplayObject;
public var skier:DisplayObject;
}
}//package
Section 156
//SoundMgr_sfx_skiNoiseC (SoundMgr_sfx_skiNoiseC)
package {
import flash.display.*;
import mx.core.*;
public class SoundMgr_sfx_skiNoiseC extends SoundAsset {
public var txt_timeList:DisplayObject;
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_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 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 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 txt_loading:DisplayObject;
public var btn_resume:DisplayObject;
public var leaderboard:DisplayObject;
public var skier:DisplayObject;
}
}//package
Section 157
//SoundMgr_sfx_speedBoostC (SoundMgr_sfx_speedBoostC)
package {
import flash.display.*;
import mx.core.*;
public class SoundMgr_sfx_speedBoostC extends SoundAsset {
public var txt_timeList:DisplayObject;
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_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 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 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 txt_loading:DisplayObject;
public var btn_resume:DisplayObject;
public var leaderboard:DisplayObject;
public var skier:DisplayObject;
}
}//package
Section 158
//SoundMgr_sfx_tunnelHitC (SoundMgr_sfx_tunnelHitC)
package {
import flash.display.*;
import mx.core.*;
public class SoundMgr_sfx_tunnelHitC extends SoundAsset {
public var txt_timeList:DisplayObject;
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_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 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 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 txt_loading:DisplayObject;
public var btn_resume:DisplayObject;
public var leaderboard:DisplayObject;
public var skier:DisplayObject;
}
}//package
Section 159
//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 160
//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 161
//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 162
//TunnelGate_gateIncomingBlueC (TunnelGate_gateIncomingBlueC)
package {
import flash.display.*;
import mx.core.*;
public class TunnelGate_gateIncomingBlueC extends SpriteAsset {
public var txt_timeList:DisplayObject;
public var popup1:DisplayObject;
public var mountains:DisplayObject;
public var popup3:DisplayObject;
public var skier: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 txt_score: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 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 armor: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 txt_loading:DisplayObject;
public var head:DisplayObject;
public var btn_resume:DisplayObject;
public var popup2:DisplayObject;
public var flip:DisplayObject;
public var leaderboard:DisplayObject;
}
}//package
Section 163
//TunnelGate_grayBlankC (TunnelGate_grayBlankC)
package {
import flash.display.*;
import mx.core.*;
public class TunnelGate_grayBlankC extends SpriteAsset {
public var txt_timeList:DisplayObject;
public var popup1:DisplayObject;
public var mountains:DisplayObject;
public var popup3:DisplayObject;
public var skier: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 txt_score: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 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 armor: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 txt_loading:DisplayObject;
public var head:DisplayObject;
public var btn_resume:DisplayObject;
public var popup2:DisplayObject;
public var flip:DisplayObject;
public var leaderboard:DisplayObject;
}
}//package
Section 164
//TunnelGate_tgateC (TunnelGate_tgateC)
package {
import flash.display.*;
import mx.core.*;
public class TunnelGate_tgateC extends SpriteAsset {
public var txt_timeList:DisplayObject;
public var popup1:DisplayObject;
public var mountains:DisplayObject;
public var popup3:DisplayObject;
public var skier: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 txt_score: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 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 armor: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 txt_loading:DisplayObject;
public var head:DisplayObject;
public var btn_resume:DisplayObject;
public var popup2:DisplayObject;
public var flip:DisplayObject;
public var leaderboard:DisplayObject;
}
}//package
Section 165
//TunnelGate_tgateHitC (TunnelGate_tgateHitC)
package {
import flash.display.*;
import mx.core.*;
public class TunnelGate_tgateHitC extends SpriteAsset {
public var txt_timeList:DisplayObject;
public var popup1:DisplayObject;
public var mountains:DisplayObject;
public var popup3:DisplayObject;
public var skier: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 txt_score: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 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 armor: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 txt_loading:DisplayObject;
public var head:DisplayObject;
public var btn_resume:DisplayObject;
public var popup2:DisplayObject;
public var flip:DisplayObject;
public var leaderboard:DisplayObject;
}
}//package
Section 166
//TunnelGate_tgateMissC (TunnelGate_tgateMissC)
package {
import flash.display.*;
import mx.core.*;
public class TunnelGate_tgateMissC extends SpriteAsset {
public var txt_timeList:DisplayObject;
public var popup1:DisplayObject;
public var mountains:DisplayObject;
public var popup3:DisplayObject;
public var skier: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 txt_score: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 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 armor: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 txt_loading:DisplayObject;
public var head:DisplayObject;
public var btn_resume:DisplayObject;
public var popup2:DisplayObject;
public var flip:DisplayObject;
public var leaderboard:DisplayObject;
}
}//package