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;
_local9 = (((_arg2 + int(_arg1(_arg3, _arg4, _arg5))) + _arg6) + _arg8);
return ((IntUtil.rol(_local9, _arg7) + _arg3));
}
private static function hh(_arg1:int, _arg2:int, _arg3:int, _arg4:int, _arg5:int, _arg6:int, _arg7:int):int{
return (transform(h, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7));
}
public static function hash(_arg1:String):String{
var _local2:ByteArray;
_local2 = new ByteArray();
_local2.writeUTFBytes(_arg1);
return (hashBinary(_local2));
}
private static function createBlocks(_arg1:ByteArray):Array{
var _local2:Array;
var _local3:int;
var _local4:int;
var _local5:int;
_local2 = new Array();
_local3 = (_arg1.length * 8);
_local4 = 0xFF;
_local5 = 0;
while (_local5 < _local3) {
_local2[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 _local2:int;
var _local3:int;
var _local4:int;
var _local5:int;
var _local6:int;
var _local7:int;
var _local8:int;
var _local9:int;
var _local10:Array;
var _local11:int;
var _local12:int;
_local2 = 1732584193;
_local3 = -271733879;
_local4 = -1732584194;
_local5 = 271733878;
_local10 = createBlocks(_arg1);
_local11 = _local10.length;
_local12 = 0;
while (_local12 < _local11) {
_local6 = _local2;
_local7 = _local3;
_local8 = _local4;
_local9 = _local5;
_local2 = ff(_local2, _local3, _local4, _local5, _local10[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
//JSON (com.adobe.serialization.json.JSON)
package com.adobe.serialization.json {
public class JSON {
public static function decode(_arg1:String){
var _local2:JSONDecoder;
_local2 = new JSONDecoder(_arg1);
return (_local2.getValue());
}
public static function encode(_arg1:Object):String{
var _local2:JSONEncoder;
_local2 = new JSONEncoder(_arg1);
return (_local2.getString());
}
}
}//package com.adobe.serialization.json
Section 3
//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 nextToken():JSONToken{
return ((token = tokenizer.getNextToken()));
}
private function parseObject():Object{
var _local1:Object;
var _local2:String;
_local1 = 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 parseArray():Array{
var _local1:Array;
_local1 = 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);
}
public function getValue(){
return (value);
}
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);
}
}
}//package com.adobe.serialization.json
Section 4
//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 arrayToString(_arg1:Array):String{
var _local2:String;
var _local3:int;
_local2 = "";
_local3 = 0;
while (_local3 < _arg1.length) {
if (_local2.length > 0){
_local2 = (_local2 + ",");
};
_local2 = (_local2 + convertToString(_arg1[_local3]));
_local3++;
};
return ((("[" + _local2) + "]"));
}
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");
}
private function escapeString(_arg1:String):String{
var _local2:String;
var _local3:String;
var _local4:Number;
var _local5:int;
var _local6:String;
var _local7:String;
_local2 = "";
_local4 = _arg1.length;
_local5 = 0;
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 objectToString(_arg1:Object):String{
var s:String;
var classInfo:XML;
var value:Object;
var key:String;
var v:XML;
var o = _arg1;
s = "";
classInfo = 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) + "}"));
}
public function getString():String{
return (jsonString);
}
}
}//package com.adobe.serialization.json
Section 5
//JSONParseError (com.adobe.serialization.json.JSONParseError)
package com.adobe.serialization.json {
public class JSONParseError extends Error {
private var _text:String;
private var _location:int;
public function JSONParseError(_arg1:String="", _arg2:int=0, _arg3:String=""){
super(_arg1);
name = "JSONParseError";
_location = _arg2;
_text = _arg3;
}
public function get text():String{
return (_text);
}
public function get location():int{
return (_location);
}
}
}//package com.adobe.serialization.json
Section 6
//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 set value(_arg1:Object):void{
_value = _arg1;
}
public function get value():Object{
return (_value);
}
public function set type(_arg1:int):void{
_type = _arg1;
}
public function get type():int{
return (_type);
}
}
}//package com.adobe.serialization.json
Section 7
//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 readNumber():JSONToken{
var _local1:JSONToken;
var _local2:String;
var _local3:Number;
_local1 = new JSONToken();
_local1.type = JSONTokenType.NUMBER;
_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();
};
};
_local3 = Number(_local2);
if (((isFinite(_local3)) && (!(isNaN(_local3))))){
_local1.value = _local3;
return (_local1);
};
parseError((("Number " + _local3) + " is not valid!"));
return (null);
}
private function nextChar():String{
return ((ch = jsonString.charAt(loc++)));
}
public function getNextToken():JSONToken{
var _local1:JSONToken;
var _local2:String;
var _local3:String;
var _local4:String;
_local1 = 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();
};
}
private function isWhiteSpace(_arg1:String):Boolean{
return ((((((((_arg1 == " ")) || ((_arg1 == "\t")))) || ((_arg1 == "\n")))) || ((_arg1 == "\r"))));
}
public function parseError(_arg1:String):void{
throw (new JSONParseError(_arg1, loc, jsonString));
}
private function skipIgnored():void{
var _local1:int;
do {
_local1 = loc;
skipWhite();
skipComments();
} while (_local1 != loc);
}
private function isHexDigit(_arg1:String):Boolean{
var _local2:String;
_local2 = _arg1.toUpperCase();
return (((isDigit(_arg1)) || ((((_local2 >= "A")) && ((_local2 <= "F"))))));
}
private function readString():JSONToken{
var _local1:JSONToken;
var _local2:String;
var _local3:String;
var _local4:int;
_local1 = new JSONToken();
_local1.type = JSONTokenType.STRING;
_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);
}
}
}//package com.adobe.serialization.json
Section 8
//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 9
//IntUtil (com.adobe.utils.IntUtil)
package com.adobe.utils {
public class IntUtil {
private static var hexChars:String = "0123456789abcdef";
public static function toHex(_arg1:int, _arg2:Boolean=false):String{
var _local3:String;
var _local4:int;
var _local5:int;
_local3 = "";
if (_arg2){
_local4 = 0;
while (_local4 < 4) {
_local3 = (_local3 + (hexChars.charAt(((_arg1 >> (((3 - _local4) * 8) + 4)) & 15)) + hexChars.charAt(((_arg1 >> ((3 - _local4) * 8)) & 15))));
_local4++;
};
} else {
_local5 = 0;
while (_local5 < 4) {
_local3 = (_local3 + (hexChars.charAt(((_arg1 >> ((_local5 * 8) + 4)) & 15)) + hexChars.charAt(((_arg1 >> (_local5 * 8)) & 15))));
_local5++;
};
};
return (_local3);
}
public static function ror(_arg1:int, _arg2:int):uint{
var _local3:int;
_local3 = (32 - _arg2);
return (((_arg1 << _local3) | (_arg1 >>> (32 - _local3))));
}
public static function rol(_arg1:int, _arg2:int):int{
return (((_arg1 << _arg2) | (_arg1 >>> (32 - _arg2))));
}
}
}//package com.adobe.utils
Section 10
//StringUtil (com.adobe.utils.StringUtil)
package com.adobe.utils {
public class StringUtil {
public static function beginsWith(_arg1:String, _arg2:String):Boolean{
return ((_arg2 == _arg1.substring(0, _arg2.length)));
}
public static function trim(_arg1:String):String{
return (_slot1.ltrim(_slot1.rtrim(_arg1)));
}
public static function stringsAreEqual(_arg1:String, _arg2:String, _arg3:Boolean):Boolean{
if (_arg3){
return ((_arg1 == _arg2));
};
return ((_arg1.toUpperCase() == _arg2.toUpperCase()));
}
public static function replace(_arg1:String, _arg2:String, _arg3:String):String{
var _local4:String;
var _local5:Boolean;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
_local4 = new String();
_local5 = false;
_local6 = _arg1.length;
_local7 = _arg2.length;
_local8 = 0;
while (_local8 < _local6) {
if (_arg1.charAt(_local8) == _arg2.charAt(0)){
_local5 = true;
_local9 = 0;
while (_local9 < _local7) {
if (_arg1.charAt((_local8 + _local9)) != _arg2.charAt(_local9)){
_local5 = false;
break;
};
_local9++;
};
//unresolved if
_local4 = (_local4 + _arg3);
_local8 = (_local8 + (_local7 - 1));
} else {
_local4 = (_local4 + _arg1.charAt(_local8));
};
_local8++;
};
return (_local4);
}
public static function rtrim(_arg1:String):String{
var _local2:Number;
var _local3:Number;
_local2 = _arg1.length;
_local3 = _local2;
while (_local3 > 0) {
if (_arg1.charCodeAt((_local3 - 1)) > 32){
return (_arg1.substring(0, _local3));
};
_local3--;
};
return ("");
}
public static function endsWith(_arg1:String, _arg2:String):Boolean{
return ((_arg2 == _arg1.substring((_arg1.length - _arg2.length))));
}
public static function stringHasValue(_arg1:String):Boolean{
return (((!((_arg1 == null))) && ((_arg1.length > 0))));
}
public static function remove(_arg1:String, _arg2:String):String{
return (_slot1.replace(_arg1, _arg2, ""));
}
public static function ltrim(_arg1:String):String{
var _local2:Number;
var _local3:Number;
_local2 = _arg1.length;
_local3 = 0;
while (_local3 < _local2) {
if (_arg1.charCodeAt(_local3) > 32){
return (_arg1.substring(_local3));
};
_local3++;
};
return ("");
}
}
}//package com.adobe.utils
Section 11
//Base64 (com.dynamicflash.util.Base64)
package com.dynamicflash.util {
import flash.utils.*;
public class Base64 {
public static const version:String = "1.1.0";
private static const BASE64_CHARS:String = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
public function Base64(){
throw (new Error("Base64 class is static container only"));
}
public static function encode(_arg1:String):String{
var _local2:ByteArray;
_local2 = new ByteArray();
_local2.writeUTFBytes(_arg1);
return (encodeByteArray(_local2));
}
public static function encodeByteArray(_arg1:ByteArray):String{
var _local2:String;
var _local3:Array;
var _local4:Array;
var _local5:uint;
var _local6:uint;
var _local7:uint;
_local2 = "";
_local4 = 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 decode(_arg1:String):String{
var _local2:ByteArray;
_local2 = decodeToByteArray(_arg1);
return (_local2.readUTFBytes(_local2.length));
}
public static function decodeToByteArray(_arg1:String):ByteArray{
var _local2:ByteArray;
var _local3:Array;
var _local4:Array;
var _local5:uint;
var _local6:uint;
var _local7:uint;
_local2 = new ByteArray();
_local3 = new Array(4);
_local4 = new Array(3);
_local5 = 0;
while (_local5 < _arg1.length) {
_local6 = 0;
while ((((_local6 < 4)) && (((_local5 + _local6) < _arg1.length)))) {
_local3[_local6] = BASE64_CHARS.indexOf(_arg1.charAt((_local5 + _local6)));
_local6++;
};
_local4[0] = ((_local3[0] << 2) + ((_local3[1] & 48) >> 4));
_local4[1] = (((_local3[1] & 15) << 4) + ((_local3[2] & 60) >> 2));
_local4[2] = (((_local3[2] & 3) << 6) + _local3[3]);
_local7 = 0;
while (_local7 < _local4.length) {
if (_local3[(_local7 + 1)] == 64){
break;
};
_local2.writeByte(_local4[_local7]);
_local7++;
};
_local5 = (_local5 + 4);
};
_local2.position = 0;
return (_local2);
}
}
}//package com.dynamicflash.util
Section 12
//KongregateEvent (com.kongregate.as3.client.events.KongregateEvent)
package com.kongregate.as3.client.events {
import flash.events.*;
public class KongregateEvent extends Event {
public static const COMPLETE:String = "component_api_available";
public function KongregateEvent(_arg1:String){
super(_arg1);
}
}
}//package com.kongregate.as3.client.events
Section 13
//AbstractShadowService (com.kongregate.as3.client.services.AbstractShadowService)
package com.kongregate.as3.client.services {
import flash.events.*;
public class AbstractShadowService extends EventDispatcher {
protected function alert(_arg1:String, _arg2:String, _arg3="", _arg4:String=""):void{
trace(((((((("Kongregate API: " + _arg1) + ".") + _arg2) + "(") + _arg3) + ") ") + _arg4));
}
}
}//package com.kongregate.as3.client.services
Section 14
//HighScoreServiceShadow (com.kongregate.as3.client.services.HighScoreServiceShadow)
package com.kongregate.as3.client.services {
public class HighScoreServiceShadow extends AbstractShadowService implements IHighScoreServices {
private var mode:String;
public function HighScoreServiceShadow(){
mode = "";
}
public function submit(_arg1:Number, _arg2:String=null):void{
alert("IHighScoreServices", "submit", arguments);
}
public function connect():Boolean{
alert("IKongregateServices", "connect");
return (true);
}
public function requestList(_arg1:Function):void{
alert("IHighScoreServices", "requestList", "", (("[Mode: " + mode) + "]"));
_arg1({success:false});
}
public function setMode(_arg1:String):void{
alert("IHighScoreServices", "setMode", arguments);
this.mode = _arg1;
}
}
}//package com.kongregate.as3.client.services
Section 15
//IHighScoreServices (com.kongregate.as3.client.services.IHighScoreServices)
package com.kongregate.as3.client.services {
public interface IHighScoreServices {
function setMode(_arg1:String):void;
function submit(_arg1:Number, _arg2:String=null):void;
function requestList(_arg1:Function):void;
}
}//package com.kongregate.as3.client.services
Section 16
//IKongregateServices (com.kongregate.as3.client.services.IKongregateServices)
package com.kongregate.as3.client.services {
import flash.events.*;
public interface IKongregateServices extends IEventDispatcher {
function getPlayerInfo(_arg1:Function):void;
function connect(_arg1:Number=-1):Boolean;
}
}//package com.kongregate.as3.client.services
Section 17
//IStatServices (com.kongregate.as3.client.services.IStatServices)
package com.kongregate.as3.client.services {
public interface IStatServices {
function submitArray(_arg1:Array):void;
function submit(_arg1:String, _arg2:Number):void;
}
}//package com.kongregate.as3.client.services
Section 18
//IUserServices (com.kongregate.as3.client.services.IUserServices)
package com.kongregate.as3.client.services {
public interface IUserServices {
function getName():String;
function getPlayerInfo(_arg1:Function):void;
}
}//package com.kongregate.as3.client.services
Section 19
//KongregateServiceShadow (com.kongregate.as3.client.services.KongregateServiceShadow)
package com.kongregate.as3.client.services {
public class KongregateServiceShadow extends AbstractShadowService implements IKongregateServices {
public function getName():String{
alert("IKongregateServices", "getName");
return ("Guest");
}
public function connect(_arg1:Number=-1):Boolean{
alert("IKongregateServices", "connect", arguments);
return (true);
}
public function getPlayerInfo(_arg1:Function):void{
alert("IKongregateServices", "getPlayerInfo");
_arg1(new Object());
}
}
}//package com.kongregate.as3.client.services
Section 20
//StatServiceShadow (com.kongregate.as3.client.services.StatServiceShadow)
package com.kongregate.as3.client.services {
public class StatServiceShadow extends AbstractShadowService implements IStatServices {
public function submitArray(_arg1:Array):void{
alert("IStatServices", "submitArray", arguments);
}
public function submit(_arg1:String, _arg2:Number):void{
alert("IStatServices", "submitStat", arguments);
}
}
}//package com.kongregate.as3.client.services
Section 21
//UserServiceShadow (com.kongregate.as3.client.services.UserServiceShadow)
package com.kongregate.as3.client.services {
public class UserServiceShadow extends AbstractShadowService implements IUserServices {
public function getName():String{
alert("UserService", "getName");
return ("Guest");
}
public function getPlayerInfo(_arg1:Function):void{
alert("UserService", "getPlayerInfo");
_arg1({isGuest:true, name:"Guest", points:0, level:0, isMode:false, isAdmin:false, isDeveloper:false, avatarPath:"", chatAvatarPath:""});
}
}
}//package com.kongregate.as3.client.services
Section 22
//IAPIBootstrap (com.kongregate.as3.client.IAPIBootstrap)
package com.kongregate.as3.client {
import flash.events.*;
import flash.display.*;
public interface IAPIBootstrap {
function init(_arg1:Event=null, _arg2:Stage=null):void;
function hideLog():void;
function showLog(_arg1:int=0):void;
}
}//package com.kongregate.as3.client
Section 23
//KongregateAPI (com.kongregate.as3.client.KongregateAPI)
package com.kongregate.as3.client {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import com.kongregate.as3.client.services.*;
import com.kongregate.as3.client.events.*;
import flash.system.*;
import flash.net.*;
import flash.errors.*;
public class KongregateAPI extends Sprite {
private const VERSION:Number = 1;
private var loader:Loader;
private var loadedDomain:ApplicationDomain;
private static const CLASS_USER:String = "com.kongregate.as3.client.services.UserServices";
private static const CLASS_STATS:String = "com.kongregate.as3.client.services.StatServices";
private static const CLASS_SERVICES:String = "com.kongregate.as3.client.services.KongregateServices";
private static const CLASS_SCORES:String = "com.kongregate.as3.client.services.HighScoreServices";
private static const DEBUG_API_URL:String = "//Linuxpc/kongregate/public/flash/API_AS3.swf";
private static var _connected:Boolean;
private static var kUser:IUserServices;
private static var _loaded:Boolean;
private static var kServices:IKongregateServices;
private static var kScores:IHighScoreServices;
private static var mInstance:KongregateAPI;
private static var kStats:IStatServices;
private static var kAPI:IAPIBootstrap;
public function KongregateAPI(){
if (mInstance != null){
throw (new Error("Warning: KongregateAPI has been added to stage more than once or accessed improperly. Use getInstance() or a stage reference to access."));
};
mInstance = this;
this.addEventListener(Event.ADDED_TO_STAGE, init, false, 0, true);
}
public function get loaded():Boolean{
return (_loaded);
}
public function get connected():Boolean{
return (_connected);
}
private function alertConnected(_arg1:TimerEvent=null):void{
var _local2:KongregateEvent;
var _local3:Boolean;
_local2 = new KongregateEvent(KongregateEvent.COMPLETE);
_local3 = this.dispatchEvent(_local2);
}
private function init(_arg1:Event):void{
var _local2:Object;
var _local3:String;
var _local4:URLRequest;
var _local5:LoaderContext;
this.removeEventListener(Event.ADDED_TO_STAGE, init);
_loaded = false;
_connected = false;
_local2 = LoaderInfo(root.loaderInfo).parameters;
_local3 = _local2.api_path;
if (_local3 == null){
trace("Alert: Kongregate API could not be loaded, due to local testing. API will load when the game is uploaded.");
createShadowServices();
return;
};
Security.allowDomain("*.kongregate.com");
Security.allowDomain("kongregatetrunk.com");
_local4 = new URLRequest(_local3);
_local5 = new LoaderContext(false);
_local5.applicationDomain = ApplicationDomain.currentDomain;
_local5.securityDomain = SecurityDomain.currentDomain;
loader = new Loader();
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, loadComplete);
loader.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);
loader.load(_local4, _local5);
}
public function get api():IAPIBootstrap{
return (kAPI);
}
private function loadComplete(_arg1:Event):void{
getServices();
}
public function get scores():IHighScoreServices{
return (kScores);
}
private function ioErrorHandler(_arg1:IOErrorEvent):void{
throw (new IOError(("API file not found. " + _arg1)));
}
public function get services():IKongregateServices{
return (kServices);
}
public function get stats():IStatServices{
return (kStats);
}
private function createShadowServices():void{
var _local1:Timer;
trace(">>> Kongregate Shadow Services instantiated for local development..");
kServices = new KongregateServiceShadow();
kScores = new HighScoreServiceShadow();
kStats = new StatServiceShadow();
kUser = new UserServiceShadow();
_local1 = new Timer(200, 1);
_local1.addEventListener(TimerEvent.TIMER_COMPLETE, alertConnected);
_local1.start();
_connected = true;
}
public function get user():IUserServices{
return (kUser);
}
private function getServices():void{
var _local1:ApplicationDomain;
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
_local1 = ApplicationDomain.currentDomain;
kAPI = IAPIBootstrap(loader.getChildAt(0));
this.addChild(loader);
_local2 = _local1.getDefinition(CLASS_SERVICES);
trace(_local2);
kServices = _local2.getInstance();
_local3 = _local1.getDefinition(CLASS_SCORES);
kScores = _local3.getInstance();
_local4 = _local1.getDefinition(CLASS_STATS);
kStats = _local4.getInstance();
_local5 = _local1.getDefinition(CLASS_USER);
kUser = _local5.getInstance();
kServices.connect(VERSION);
_loaded = true;
_connected = true;
alertConnected();
}
public static function getInstance():KongregateAPI{
if (!mInstance){
throw (new IllegalOperationError("You must add the Kongregate API component to the stage before attempting to access it."));
};
return (mInstance);
}
}
}//package com.kongregate.as3.client
Section 24
//BaseN (com.newgrounds.BaseN)
package com.newgrounds {
import flash.utils.*;
public class BaseN {
private var _hashIndex:String;
private var _base:Number;
private var _hashVal:Dictionary;
public function BaseN(_arg1:String=null){
var _local2:uint;
super();
if (_arg1){
_hashIndex = _arg1;
} else {
_hashIndex = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ`~@#$%^&*()+|;/";
};
_base = _hashIndex.length;
_hashVal = new Dictionary();
_local2 = 0;
while (_local2 < _base) {
_hashVal[_hashIndex.charAt(_local2)] = _local2;
_local2++;
};
}
private function baseNDecoder(_arg1:String):uint{
var _local2:uint;
var _local3:uint;
_local2 = 0;
_local3 = 0;
while (_local3 < _arg1.length) {
_local2 = (_local2 * _base);
_local2 = (_local2 + _hashVal[_arg1.charAt(_local3)]);
_local3++;
};
return (_local2);
}
public function decode(_arg1:String):Number{
var _local2:String;
var _local3:Array;
_local2 = "";
if (_arg1.charAt(0) == "-"){
_local2 = "-";
_arg1 = _arg1.substring(1);
};
_local3 = _arg1.split(".", 2);
_local2 = (_local2 + baseNDecoder(_local3[0]));
if (_local3.length > 1){
_local2 = (_local2 + ".");
_local2 = (_local2 + baseNDecoder(_local3[1]));
};
return (Number(_local2));
}
public function encode(_arg1:Number, _arg2:uint=1):String{
var _local3:String;
var _local4:String;
var _local5:Array;
_local3 = _arg1.toString();
_local4 = "";
if (_local3.charAt(0) == "-"){
_local4 = "-";
_local3 = _local3.substring(1);
};
_local5 = _local3.split(".", 2);
_local4 = (_local4 + baseNEncoder(_local5[0], _arg2));
if (_local5.length > 1){
_local4 = (_local4 + ("." + baseNEncoder(_local5[1])));
};
return (_local4);
}
private function baseNEncoder(_arg1:uint, _arg2:uint=1):String{
var _local3:String;
var _local4:uint;
_local3 = "";
_local4 = _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 25
//NewgroundsAPI (com.newgrounds.NewgroundsAPI)
package com.newgrounds {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import com.adobe.serialization.json.*;
import com.adobe.crypto.*;
import flash.system.*;
import flash.text.*;
import flash.net.*;
public class NewgroundsAPI extends EventDispatcher {
private static const COMMANDS_WIKI_URL:String = "http://www.newgrounds.com/wiki/flashapi/commands/";
public static const events:Object = {MOVIE_CONNECTED:1, ADS_APPROVED:2, AD_ATTACHED:3, HOST_BLOCKED:4, NEW_VERSION_AVAILABLE:5, EVENT_LOGGED:6, SCORE_POSTED:7, SCORES_LOADED:8, MEDAL_UNLOCKED:9, MEDALS_LOADED:10, FILE_PRIVS_LOADED:11, FILE_SAVED:12};
private static const AD_TERMS_URL:String = "http://www.newgrounds.com/wiki/flashads/terms/";
private static const REMOVED_FROM_STAGE:String = "removedFromStage";
private static const GATEWAY_URL:String = "http://www.ngads.com/gateway_v2.php";
private static var connected:Boolean;
private static var error_format:TextFormat;
private static var user_id:Number;
private static var _initialized:Boolean = false;
private static var ad_swf_url:String;
private static var ad:Loader;
private static var user_email:String;
private static var ad_reset:Number = 0;
private static var publisher_id:Number;
private static var listeners:Array = setDefaultListeners();
private static var debug:Boolean;
private static var normal_format:TextFormat;
private static var do_echo:Boolean = false;
private static var ad_url:String;
private static var medals:Array = null;
private static var session_id:String;
private static var timeoutTimer:Timer;
public static var errors:Dictionary = NewgroundsAPIError.init_codes();
private static var adURLLoader:URLLoader;
private static var tracker_id:uint;
private static var user_name:String;
private static var movie_id:String;
private static var adContainer:Sprite;
private static var encryption_key:String;
private static var flashAdTarget:DisplayObjectContainer;
private static var host:String;
private static var loaders:Array = [];
private static var compressor:BaseN = new BaseN(compression_radix);
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 score_page_counts:Object = new Object();
private static var version:String;
private static var link_format:TextFormat;
public static var periods:Object = getPeriodAliases();
private static var root:DisplayObject;
private static var compression_radix:String = "/g8236klvBQ#&|;Zb*7CEA59%s`Oue1wziFp$rDVY@TKxUPWytSaGHJ>dmoMR^<0~4qNLhc(I+fjn)X";
private static var sharedObjects:Object = new Object();
private static var header_format:TextFormat;
private static var save_file = null;
public static function setMovieVersion(_arg1:String):void{
if (_arg1){
version = String(_arg1);
};
}
public static function unlockMedal(_arg1:String, _arg2:Boolean=false):void{
var _local3:Object;
if (!_arg1){
sendError({command_id:getCommandID("unlockMedal")}, new NewgroundsAPIError("MISSING_PARAM", "missing required medal name"));
return;
};
_local3 = new Object();
_local3.medal = _arg1;
_local3.get_score = _arg2;
sendSecureCommand("unlockMedal", _local3);
}
private static function uncompressHex(_arg1:String):String{
var _local2:uint;
var _local3:String;
var _local4:uint;
var _local5:uint;
var _local6:String;
var _local7:uint;
var _local8:String;
_local2 = uint(_arg1.charAt(0));
_local3 = "";
_local5 = 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;
var _local7:Array;
var _local8:uint;
_local6 = Capabilities.version.split(" ")[1].split(",");
_local7 = arguments;
_local8 = 0;
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 loadLocal(_arg1:String){
var _local2:SharedObject;
if (!sharedObjects[_arg1]){
sharedObjects[_arg1] = SharedObject.getLocal(((("ng_ap_secure_" + movie_id) + "_") + _arg1));
};
_local2 = sharedObjects[_arg1];
_local2.flush();
if (_local2.data[_arg1]){
return (decodeData(sharedObjects.data[_arg1]));
};
return (null);
}
public static function hasUserEmail():Boolean{
return (((!((user_email == null))) && (!((user_email == "")))));
}
private static function getHost():String{
return (host);
}
public static function getYesterdaysScores(_arg1:String, _arg2:Object):void{
getScores(_arg1, "y", _arg2, "getYesterdaysScores");
}
public static function onNewVersionAvailable(_arg1:Object, _arg2:Object):void{
}
private static function echo(_arg1:String):void{
if (do_echo){
trace(_arg1);
};
}
public static function attachFlashAd(_arg1:DisplayObjectContainer):void{
var _local2:URLRequest;
Security.allowDomain("http://server.cpmstar.com");
Security.allowDomain("http://www.cpmstar.com");
Security.allowDomain("https://server.cpmstar.com");
Security.allowDomain("https://www.cpmstar.com");
Security.allowInsecureDomain("http://server.cpmstar.com");
Security.allowInsecureDomain("http://www.cpmstar.com");
Security.allowInsecureDomain("https://server.cpmstar.com");
Security.allowInsecureDomain("https://www.cpmstar.com");
flashAdTarget = _arg1;
sendMessage("You may get a security sandbox violation from this ad. This is nothing to worry about!");
if (resetAdTimer()){
if (ad_url){
adURLLoader = new URLLoader();
adURLLoader.addEventListener(Event.COMPLETE, adLoaderHandler);
adURLLoader.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);
if (ad_url.indexOf("?") > -1){
_local2 = new URLRequest(((ad_url + "&random=") + Math.random()));
adURLLoader.load(_local2);
} else {
_local2 = new URLRequest(((ad_url + "?random=") + Math.random()));
adURLLoader.load(_local2);
};
};
} else {
renderAd(_arg1);
};
}
public static function getThisMonthsScores(_arg1:String, _arg2:Object):void{
getScores(_arg1, "m", _arg2, "getThisMonthsScores");
}
public static function getScores(_arg1:String, _arg2:String, _arg3:Object=null, _arg4:String=null):void{
var _local5:String;
if (!_arg3){
_arg3 = new Object();
};
if (!hasUserSession()){
callListener(events.SCORES_LOADED, false, new NewgroundsAPIError("SITE_ID_REQUIRED", (("Host '" + getHost()) + "' does not have high scores enabled")));
return;
};
_arg3.publisher_id = publisher_id;
_arg3.period = _arg2;
_arg3.score = _arg1;
if (_arg3.user_id){
_local5 = _arg2;
} else {
_local5 = (_arg2 + "-u");
};
if (score_page_counts[_local5] == undefined){
_arg3.request_page_count = true;
};
sendCommand("getScores", _arg3);
}
public static function sendSecureCommand(_arg1:String, _arg2:Object, _arg3:Object=null, _arg4:Object=null):void{
var _local5:String;
var _local6:uint;
var _local7:String;
var _local8:String;
var _local9:String;
if (((((!(debug)) && (!(hasUserSession())))) && (!(hasUserEmail())))){
sendError({command_id:getCommandID(_arg1)}, new NewgroundsAPIError("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();
};
_local5 = "";
_local6 = 0;
while (_local6 < 16) {
_local5 = (_local5 + compression_radix.charAt(Math.floor((Math.random() * compression_radix.length))));
_local6++;
};
if (debug){
_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 = _local5;
_arg2.command_id = getCommandID(_arg1);
_local7 = MD5.hash(_local5);
_local8 = RC4.encrypt(JSON.encode(_arg2), encryption_key);
_local9 = (_local7 + _local8);
_arg3.secure = compressHex(_local9);
sendCommand("securePacket", _arg3, false, _arg4);
}
private static function initTextFormats():void{
if (!error_format){
error_format = new TextFormat();
error_format.font = "Arial Black";
error_format.size = 48;
error_format.color = 0xFF0000;
};
if (!header_format){
header_format = new TextFormat();
header_format.font = "Arial Black";
header_format.size = 24;
header_format.color = 0xFFFFFF;
};
if (!normal_format){
normal_format = new TextFormat();
normal_format.font = "Arial";
normal_format.bold = true;
normal_format.size = 12;
normal_format.color = 0xFFFFFF;
};
if (!link_format){
link_format = new TextFormat();
link_format.color = 0xFFFF00;
link_format.underline = true;
};
}
private static function getCommandName(_arg1:String):String{
return (_arg1);
}
private static function getPeriodAliases():Object{
var _local1:Object;
var _local2:String;
_local1 = new Object();
for (_local2 in period_aliases) {
_local1[period_aliases[_local2].alias] = _local2;
};
return (_local1);
}
public static function removeEventListener(_arg1:uint):void{
delete listeners[_arg1];
}
public static function getThisWeeksScores(_arg1:String, _arg2:Object):void{
getScores(_arg1, "w", _arg2, "getThisWeeksScores");
}
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 getMedals():Array{
return (medals);
}
public static function addEventListener(_arg1:uint, _arg2:Function, _arg3:Object=null):void{
listeners[_arg1] = {listener:_arg2, params:_arg3};
}
private static function callListener(_arg1:uint, _arg2:Boolean, _arg3=undefined, _arg4=undefined):void{
echo(("Fired Event: " + getEventName(_arg1)));
if (listeners[_arg1]){
if ((_arg3 is NewgroundsAPIError)){
listeners[_arg1].listener({event:_arg1, success:_arg2, error:_arg3, target:_arg4}, listeners[_arg1].params);
} else {
listeners[_arg1].listener({event:_arg1, success:_arg2, data:_arg3, target:_arg4}, listeners[_arg1].params);
};
};
}
private static function compressHex(_arg1:String):String{
var _local2:uint;
var _local3:String;
var _local4:uint;
_local2 = (_arg1.length % 6);
_local3 = "";
_local4 = 0;
while (_local4 < _arg1.length) {
_local3 = (_local3 + compressor.encode(uint(("0x" + _arg1.substr(_local4, 6))), 4));
_local4 = (_local4 + 6);
};
return ((_local2.toString() + _local3));
}
private static function adLoaderHandler(_arg1:Event):void{
var _local2:URLLoader;
_local2 = URLLoader(_arg1.target);
if (_local2.data){
ad_swf_url = String(_local2.data);
} else {
ad_swf_url = null;
};
renderAd(flashAdTarget);
}
public static function checkFilePrivs(_arg1:String, _arg2:String):void{
var _local3:uint;
var _local4:Object;
if (user_id){
_local3 = user_id;
} else {
_local3 = 0;
};
_local4 = {folder:_arg1, filename:_arg2, user_id:_local3, publisher_id:publisher_id};
sendCommand("checkFilePrivs", _local4);
}
public static function connectMovie(_arg1:DisplayObject, _arg2:String, _arg3:String, _arg4:Boolean):void{
initialize(_arg1);
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;
debug = _arg4;
connected = true;
sendCommand("connectMovie", {host:getHost(), movie_version:version});
}
private static function sendMessage(_arg1:String, _arg2:Boolean=false):String{
var _local3:String;
_local3 = ("[NewgroundsAPI] :: " + _arg1);
if (_arg2){
return (_local3);
};
trace(_local3);
return (null);
}
private static function renderAd(_arg1:DisplayObjectContainer):void{
var _local2:Shape;
var _local3:Shape;
if (ad){
removeAd();
};
if (ad_swf_url){
_local2 = new Shape();
_local2.graphics.beginFill(0);
_local2.graphics.moveTo(0, 0);
_local2.graphics.lineTo(300, 0);
_local2.graphics.lineTo(300, 250);
_local2.graphics.lineTo(0, 250);
_local2.graphics.lineTo(0, 0);
_local2.graphics.endFill();
_local3 = new Shape();
_local3.graphics.beginFill(0);
_local3.graphics.moveTo(0, 0);
_local3.graphics.lineTo(300, 0);
_local3.graphics.lineTo(300, 250);
_local3.graphics.lineTo(0, 250);
_local3.graphics.lineTo(0, 0);
_local3.graphics.endFill();
ad = new Loader();
adContainer = new Sprite();
adContainer.addChild(_local2);
adContainer.addChild(ad);
adContainer.addChild(_local3);
ad.mask = _local3;
_arg1.addChild(adContainer);
if (isFlashVersion(9, 0, 28)){
adContainer.addEventListener(REMOVED_FROM_STAGE, removeAdHandler);
};
ad.load(new URLRequest(ad_swf_url));
callListener(events.AD_ATTACHED, true, null, _arg1);
} else {
callListener(events.AD_ATTACHED, false, new NewgroundsAPIError("FLASH_ADS_NOT_APPROVED", "Unable to render ad"));
};
}
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)));
}
private static function ioErrorHandler(_arg1:IOErrorEvent):void{
sendWarning(("Ad failed to load:" + _arg1.toString()));
}
private static function sendError(_arg1:Object, _arg2:NewgroundsAPIError):void{
trace(((((("[NewgroundsAPI ERROR] :: " + getCommandName(_arg1.command_id)) + "() - ") + _arg2.name) + ":\n\t\t\t\t") + _arg2.message));
}
public static function connectionTimeOut(_arg1:Event=null):void{
callListener(events.MOVIE_CONNECTED, false, new NewgroundsAPIError("CONNECTION_FAILED", "Connection to NewgroundsAPI gateway timed out."));
}
private static function setDefaultListeners():Array{
var _local1:Array;
_local1 = new Array();
_local1[events.HOST_BLOCKED] = {listener:doBlockHost};
_local1[events.NEW_VERSION_AVAILABLE] = {listener:onNewVersionAvailable};
return (_local1);
}
public static function hasPublisher():Boolean{
return (!((publisher_id == 0)));
}
public static function getEventName(_arg1:uint):String{
var _local2:String;
for (_local2 in events) {
if (events[_local2] == _arg1){
return (_local2);
};
};
return (undefined);
}
public static function initialize(_arg1:DisplayObject):void{
var _local2:Object;
if (_initialized){
return;
};
_initialized = true;
_slot1.root = _arg1;
timeoutTimer = new Timer(8000, 1);
if (_arg1.loaderInfo){
_local2 = _arg1.loaderInfo.parameters;
host = _arg1.loaderInfo.url;
};
if (_local2){
user_name = _local2.NewgroundsAPI_UserName;
user_id = _local2.NewgroundsAPI_UserID;
publisher_id = _local2.NewgroundsAPI_PublisherID;
session_id = _local2.NewgroundsAPI_SessionID;
} else {
publisher_id = 1;
session_id = null;
user_id = 0;
user_name = "Guest";
};
if ((((host.indexOf("http://") > -1)) || ((host.indexOf("https://") > -1)))){
host = host.split("/")[2].toLowerCase();
} else {
host = "localhost";
};
}
private static function removeAdHandler(_arg1:Event):void{
removeAd();
}
private static function resetAdTimer():Boolean{
var _local1:Date;
if (!ad_url){
return (false);
};
_local1 = new Date();
if (_local1.getTime() >= ad_reset){
ad_reset = (_local1.getTime() + ((1000 * 60) * 5));
return (true);
};
return (false);
}
public static function loadCustomLink(_arg1:String):void{
sendCommand("loadCustomLink", {host:getHost(), link:_arg1}, true);
}
public static function loadMySite():void{
sendCommand("loadMySite", {host:getHost()});
}
public static function saveFile(_arg1:String, _arg2:String, _arg3:Object, _arg4):void{
}
public static function getTodaysScores(_arg1:String, _arg2:Object):void{
getScores(_arg1, "t", _arg2, "getTodaysScores");
}
private static function doBlockHost(_arg1:Object):void{
}
private static function sendCommand(_arg1:String, _arg2:Object, _arg3:Boolean=false, _arg4:Object=null):void{
var _local5:URLVariables;
var _local6:String;
var _local7:URLRequest;
var _local8:String;
var _local9:Array;
var _local10:String;
var _local11:URLLoader;
if (((!(connected)) && (!((_arg1 == "connectMovie"))))){
_local8 = (("NewgroundsAPI." + _arg1) + "() - NewgroundsAPI.connectMovie() must be called before this command can be called\n");
fatalError(_local8, "connectMovie");
};
_local5 = new URLVariables();
_local5.command_id = getCommandID(_arg1);
_local5.tracker_id = movie_id;
if (debug){
_local5.debug = debug;
};
if (_arg2){
for (_local6 in _arg2) {
_local5[_local6] = _arg2[_local6];
};
};
if (_arg4){
for (_local6 in _arg4) {
_local5[_local6] = _arg4[_local6];
};
};
echo((("OUTPUT: \n" + JSON.encode(_local5)) + "\n"));
_local7 = new URLRequest(((GATEWAY_URL + "?seed=") + Math.random()));
_local7.data = _local5;
if (_arg3){
_local7.method = URLRequestMethod.GET;
_local7.data = _local5;
navigateToURL(_local7, "_blank");
} else {
_local9 = new Array();
for (_local10 in _local5) {
_local9.push(((_local10 + "=") + escape(_local5[_local10])));
};
echo(((("POST " + GATEWAY_URL) + "?") + _local9.join("&")));
_local7.method = URLRequestMethod.POST;
_local11 = new URLLoader();
_local11.addEventListener(Event.COMPLETE, loaderHandler);
loaders.push(_local11);
_local11.load(_local7);
trace(_local7.data);
};
}
public static function getConfirmation(_arg1:String, _arg2:uint, _arg3:String, _arg4:Object, _arg5:String, _arg6:String):void{
}
private static function loaderHandler(_arg1:Event):void{
var _local2:URLLoader;
var _local3:uint;
var _local4:Object;
var _local5:NewgroundsAPIError;
_local2 = URLLoader(_arg1.target);
echo((("INPUT: \n" + _local2.data) + "\n"));
_local3 = 0;
while (_local3 < loaders.length) {
if (loaders[_local3] == _local2){
loaders.splice(_local3, 1);
break;
};
_local3++;
};
if (_local2.data){
_local4 = JSON.decode(_local2.data);
} else {
_local4 = {success:false};
};
if (!_local4.success){
_local5 = new NewgroundsAPIError(_local4.error_code, _local4.error_msg);
sendError(_local4, _local5);
} else {
doEvent(_local4);
};
}
public static function loadNewgrounds():void{
sendCommand("loadNewgrounds", {host:getHost()}, true);
}
public static function getOfficialVersionURL():String{
var _local1:String;
_local1 = ((((((GATEWAY_URL + "?tracker_id=") + movie_id) + "&command_id=") + getCommandID("loadOfficalVersion")) + "&seed=") + Math.random());
if (debug){
_local1 = (_local1 + "&debug=1");
};
return (_local1);
}
public static function getFiles(_arg1:String, _arg2:Object):void{
}
public static function logCustomEvent(_arg1:String):void{
sendCommand("logCustomEvent", {host:getHost(), event:_arg1});
}
public static function removeAd():void{
if (adURLLoader){
try {
adURLLoader.close();
} catch(e:Error) {
};
adURLLoader = null;
};
if (ad){
try {
ad.close();
} catch(e:Error) {
};
try {
Object(ad).unloadAndStop(true);
trace("uas");
} catch(e:Error) {
ad.unload();
};
if (ad.parent){
ad.parent.removeChild(ad);
};
};
if (adContainer){
if (isFlashVersion(9, 0, 28, 0)){
adContainer.removeEventListener(REMOVED_FROM_STAGE, removeAdHandler);
};
if (adContainer.parent){
adContainer.parent.removeChild(adContainer);
};
};
ad = null;
adContainer = null;
}
public static function postScore(_arg1:String, _arg2:Number, _arg3:Boolean):void{
sendSecureCommand("postScore", {score:_arg1, value:_arg2, get_best:_arg3});
}
public static function finishFileSave(_arg1:String, _arg2:String, _arg3:String, _arg4:Boolean, _arg5, _arg6):void{
}
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 decodeData(_arg1:String){
return (JSON.decode(RC4.decrypt(uncompressHex(_arg1), encryption_key)));
}
public static function encodeData(_arg1:Object):String{
return (compressHex(RC4.encrypt(JSON.encode(_arg1), encryption_key)));
}
public static function getThisYearsScores(_arg1:String, _arg2:Object):void{
getScores(_arg1, "y", _arg2, "getThisYearsScores");
}
private static function doEvent(_arg1:Object):void{
var _local2:String;
var _local3:Object;
var _local4:String;
var _local5:Boolean;
var _local6:String;
var _local7: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(events.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(events.ADS_APPROVED, false, new NewgroundsAPIError("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(events.ADS_APPROVED, false, new NewgroundsAPIError("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(events.ADS_APPROVED, 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(events.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(events.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});
};
break;
case "logCustomEvent":
if (_arg1.success){
sendMessage((("Event '" + _arg1.event) + "' was logged."));
};
callListener(events.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;
};
};
sendMessage((((((_local4 + " posted ") + _arg1.value) + " to '") + _arg1.score) + "'"));
_local3 = {score:_arg1.score, value:_arg1.value, username:_local4};
};
callListener(events.SCORE_POSTED, _arg1.success, _local3);
break;
case "getScores":
if (_arg1.user_id){
_local6 = _arg1.period;
} else {
_local6 = (_arg1.period + "-u");
};
if (_arg1.total_pages){
score_page_counts[_local6] = _arg1.total_pages;
};
_local3.user_id = _arg1.user_id;
_local3.current_page = _arg1.current_page;
_local3.total_pages = score_page_counts[_local6];
_local3.scores = _arg1.scores;
_local3.period = getPeriodName(_arg1.period);
callListener(events.SCORES_LOADED, _arg1.success, _local3);
break;
case "unlockMedal":
if (medals){
_local7 = 0;
while (_local7 < medals.length) {
if (medals[_local7].medal_name === _arg1.medal_name){
medals[_local7].medal_unlocked = true;
break;
};
_local7++;
};
};
_local3 = {medal_name:_arg1.medal_name, medal_value:_arg1.medal_value, medal_difficulty:_arg1.medal_difficulty};
callListener(events.MEDAL_UNLOCKED, _arg1.success, _local3);
break;
case "getMedals":
medals = _arg1.medals;
_local3 = {medals:_arg1.medals};
callListener(events.MEDALS_LOADED, _arg1.success, _local3);
break;
case "getFiles":
break;
case "getSystemFiles":
break;
case "saveFile":
save_file = null;
_local3 = {file_id:_arg1.file_id, filename:_arg1.filename, file_url:_arg1.file_url, thumbnail:_arg1.thumbnail, icon:_arg1.icon};
callListener(events.FILE_SAVED, _arg1.success, _local3);
break;
case "checkFilePrivs":
if (save_file){
save_file.checkPrivs(_arg1);
} else {
_local3 = {filename:_arg1.filename, folder:_arg1.folder, can_read:_arg1.can_read, can_write:_arg1.can_write};
callListener(events.FILE_PRIVS_LOADED, _arg1.success, _local3);
};
break;
};
}
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{
var _local1:Object;
if (medals){
callListener(events.MEDALS_LOADED, true, {medals:medals});
return;
};
_local1 = new Object();
if (hasUserSession()){
_local1.publisher_id = publisher_id;
_local1.user_id = user_id;
};
sendCommand("getMedals", _local1);
}
public static function saveLocal(_arg1:String, _arg2, _arg3:uint=0):void{
var _local4:SharedObject;
if (!sharedObjects[_arg1]){
sharedObjects[_arg1] = SharedObject.getLocal(((("ng_ap_secure_" + movie_id) + "_") + _arg1));
};
_local4 = sharedObjects[_arg1];
_local4.data[_arg1] = encodeData(_arg2);
_local4.flush();
}
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));
}
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 getAlltimeScores(_arg1:String, _arg2:Object):void{
getScores(_arg1, "a", _arg2, "getAlltimeScores");
}
}
}//package com.newgrounds
Section 26
//NewgroundsAPIError (com.newgrounds.NewgroundsAPIError)
package com.newgrounds {
import flash.utils.*;
public class NewgroundsAPIError {
public var message:String;
public var name:String;
public var code:Number;// = 0
public var alias:String;
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 NewgroundsAPIError(_arg1, _arg2:String){
code = 0;
super();
if ((_arg1 is String)){
_arg1 = error_codes[_arg1];
} else {
if (!(_arg1 is uint)){
_arg1 = 0;
};
};
trace(_arg1);
code = _arg1;
message = _arg2;
name = error_names[_arg1];
trace(name);
alias = aliases[_arg1];
}
public function isError():Boolean{
return (true);
}
private static function init_names():Array{
var _local1:Array;
var _local2:uint;
var _local3:Array;
var _local4:uint;
var _local5:String;
_local1 = new Array();
_local2 = 0;
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;
var _local2:uint;
_local1 = new Dictionary();
_local2 = 0;
while (_local2 < aliases.length) {
_local1[aliases[_local2]] = _local2;
_local2++;
};
return (_local1);
}
}
}//package com.newgrounds
Section 27
//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;
var _local3:Array;
var _local4:uint;
_local2 = new String("");
_local3 = new Array("0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f");
_local4 = 0;
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;
var _local4:Array;
var _local5:Array;
_local3 = strToChars(_arg1);
_local4 = strToChars(_arg2);
_local5 = calculate(_local3, _local4);
return (charsToHex(_local5));
}
private static function hexToChars(_arg1:String):Array{
var _local2:Array;
var _local3:uint;
_local2 = new Array();
_local3 = ((_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;
var _local4:Array;
var _local5:Array;
_local3 = strToChars(_arg1);
_local4 = strToChars(_arg2);
_local5 = calculate(_local3, _local4);
return (_local5);
}
public static function decrypt(_arg1:String, _arg2:String):String{
var _local3:Array;
var _local4:Array;
var _local5:Array;
_local3 = hexToChars(_arg1);
_local4 = strToChars(_arg2);
_local5 = calculate(_local3, _local4);
return (charsToStr(_local5));
}
private static function strToChars(_arg1:String):Array{
var _local2:Array;
var _local3:uint;
_local2 = new Array();
_local3 = 0;
while (_local3 < _arg1.length) {
_local2.push(_arg1.charCodeAt(_local3));
_local3++;
};
return (_local2);
}
private static function calculate(_arg1:Array, _arg2:Array):Array{
var _local3:uint;
var _local4:uint;
var _local5:Array;
var _local6:uint;
var _local7:uint;
var _local8:uint;
var _local9:uint;
var _local10:uint;
initialize(_arg2);
_local3 = 0;
_local4 = 0;
_local5 = new Array();
_local9 = 0;
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 _local2:uint;
var _local3:uint;
var _local4:uint;
var _local5:uint;
_local2 = 0;
_local4 = _arg1.length;
_local5 = 0;
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;
var _local3:uint;
_local2 = new String("");
_local3 = 0;
while (_local3 < _arg1.length) {
_local2 = (_local2 + String.fromCharCode(_arg1[_local3]));
_local3++;
};
return (_local2);
}
}
}//package com.newgrounds
Section 28
//BaseButton (fl.controls.BaseButton)
package fl.controls {
import flash.events.*;
import flash.display.*;
import fl.core.*;
import flash.utils.*;
import fl.events.*;
public class BaseButton extends UIComponent {
protected var _selected:Boolean;// = false
private var unlockedMouseState:String;
protected var pressTimer:Timer;
protected var mouseState:String;
protected var background:DisplayObject;
private var _mouseStateLocked:Boolean;// = false
protected var _autoRepeat:Boolean;// = false
private static var defaultStyles:Object = {upSkin:"Button_upSkin", downSkin:"Button_downSkin", overSkin:"Button_overSkin", disabledSkin:"Button_disabledSkin", selectedDisabledSkin:"Button_selectedDisabledSkin", selectedUpSkin:"Button_selectedUpSkin", selectedDownSkin:"Button_selectedDownSkin", selectedOverSkin:"Button_selectedOverSkin", focusRectSkin:null, focusRectPadding:null, repeatDelay:500, repeatInterval:35};
public function BaseButton(){
_selected = false;
_autoRepeat = false;
_mouseStateLocked = false;
super();
buttonMode = true;
mouseChildren = false;
useHandCursor = false;
setupMouseEvents();
setMouseState("up");
pressTimer = new Timer(1, 0);
pressTimer.addEventListener(TimerEvent.TIMER, buttonDown, false, 0, true);
}
protected function endPress():void{
pressTimer.reset();
}
public function set mouseStateLocked(_arg1:Boolean):void{
_mouseStateLocked = _arg1;
if (_arg1 == false){
setMouseState(unlockedMouseState);
} else {
unlockedMouseState = mouseState;
};
}
public function get autoRepeat():Boolean{
return (_autoRepeat);
}
public function set autoRepeat(_arg1:Boolean):void{
_autoRepeat = _arg1;
}
override public function set enabled(_arg1:Boolean):void{
super.enabled = _arg1;
mouseEnabled = _arg1;
}
public function get selected():Boolean{
return (_selected);
}
protected function mouseEventHandler(_arg1:MouseEvent):void{
if (_arg1.type == MouseEvent.MOUSE_DOWN){
setMouseState("down");
startPress();
} else {
if ((((_arg1.type == MouseEvent.ROLL_OVER)) || ((_arg1.type == MouseEvent.MOUSE_UP)))){
setMouseState("over");
endPress();
} else {
if (_arg1.type == MouseEvent.ROLL_OUT){
setMouseState("up");
endPress();
};
};
};
}
public function setMouseState(_arg1:String):void{
if (_mouseStateLocked){
unlockedMouseState = _arg1;
return;
};
if (mouseState == _arg1){
return;
};
mouseState = _arg1;
invalidate(InvalidationType.STATE);
}
protected function startPress():void{
if (_autoRepeat){
pressTimer.delay = Number(getStyleValue("repeatDelay"));
pressTimer.start();
};
dispatchEvent(new ComponentEvent(ComponentEvent.BUTTON_DOWN, true));
}
protected function buttonDown(_arg1:TimerEvent):void{
if (!_autoRepeat){
endPress();
return;
};
if (pressTimer.currentCount == 1){
pressTimer.delay = Number(getStyleValue("repeatInterval"));
};
dispatchEvent(new ComponentEvent(ComponentEvent.BUTTON_DOWN, true));
}
public function set selected(_arg1:Boolean):void{
if (_selected == _arg1){
return;
};
_selected = _arg1;
invalidate(InvalidationType.STATE);
}
override public function get enabled():Boolean{
return (super.enabled);
}
override protected function draw():void{
if (isInvalid(InvalidationType.STYLES, InvalidationType.STATE)){
drawBackground();
invalidate(InvalidationType.SIZE, false);
};
if (isInvalid(InvalidationType.SIZE)){
drawLayout();
};
super.draw();
}
protected function setupMouseEvents():void{
addEventListener(MouseEvent.ROLL_OVER, mouseEventHandler, false, 0, true);
addEventListener(MouseEvent.MOUSE_DOWN, mouseEventHandler, false, 0, true);
addEventListener(MouseEvent.MOUSE_UP, mouseEventHandler, false, 0, true);
addEventListener(MouseEvent.ROLL_OUT, mouseEventHandler, false, 0, true);
}
protected function drawLayout():void{
background.width = width;
background.height = height;
}
protected function drawBackground():void{
var _local1:String;
var _local2:DisplayObject;
_local1 = (enabled) ? mouseState : "disabled";
if (selected){
_local1 = (("selected" + _local1.substr(0, 1).toUpperCase()) + _local1.substr(1));
};
_local1 = (_local1 + "Skin");
_local2 = background;
background = getDisplayObjectInstance(getStyleValue(_local1));
addChildAt(background, 0);
if (((!((_local2 == null))) && (!((_local2 == background))))){
removeChild(_local2);
};
}
public static function getStyleDefinition():Object{
return (defaultStyles);
}
}
}//package fl.controls
Section 29
//Button (fl.controls.Button)
package fl.controls {
import flash.display.*;
import fl.core.*;
import fl.managers.*;
public class Button extends LabelButton implements IFocusManagerComponent {
protected var emphasizedBorder:DisplayObject;
protected var _emphasized:Boolean;// = false
private static var defaultStyles:Object = {emphasizedSkin:"Button_emphasizedSkin", emphasizedPadding:2};
public static var createAccessibilityImplementation:Function;
public function Button(){
_emphasized = false;
super();
}
override public function drawFocus(_arg1:Boolean):void{
var _local2:Number;
var _local3:*;
super.drawFocus(_arg1);
if (_arg1){
_local2 = Number(getStyleValue("emphasizedPadding"));
if ((((_local2 < 0)) || (!(_emphasized)))){
_local2 = 0;
};
_local3 = getStyleValue("focusRectPadding");
_local3 = ((_local3)==null) ? 2 : _local3;
_local3 = (_local3 + _local2);
uiFocusRect.x = -(_local3);
uiFocusRect.y = -(_local3);
uiFocusRect.width = (width + (_local3 * 2));
uiFocusRect.height = (height + (_local3 * 2));
};
}
public function set emphasized(_arg1:Boolean):void{
_emphasized = _arg1;
invalidate(InvalidationType.STYLES);
}
override protected function draw():void{
if (((isInvalid(InvalidationType.STYLES)) || (isInvalid(InvalidationType.SIZE)))){
drawEmphasized();
};
super.draw();
if (emphasizedBorder != null){
setChildIndex(emphasizedBorder, (numChildren - 1));
};
}
public function get emphasized():Boolean{
return (_emphasized);
}
override protected function initializeAccessibility():void{
if (Button.createAccessibilityImplementation != null){
Button.createAccessibilityImplementation(this);
};
}
protected function drawEmphasized():void{
var _local1:Object;
var _local2:Number;
if (emphasizedBorder != null){
removeChild(emphasizedBorder);
};
emphasizedBorder = null;
if (!_emphasized){
return;
};
_local1 = getStyleValue("emphasizedSkin");
if (_local1 != null){
emphasizedBorder = getDisplayObjectInstance(_local1);
};
if (emphasizedBorder != null){
addChildAt(emphasizedBorder, 0);
_local2 = Number(getStyleValue("emphasizedPadding"));
emphasizedBorder.x = (emphasizedBorder.y = -(_local2));
emphasizedBorder.width = (width + (_local2 * 2));
emphasizedBorder.height = (height + (_local2 * 2));
};
}
public static function getStyleDefinition():Object{
return (UIComponent.mergeStyles(LabelButton.getStyleDefinition(), defaultStyles));
}
}
}//package fl.controls
Section 30
//ButtonLabelPlacement (fl.controls.ButtonLabelPlacement)
package fl.controls {
public class ButtonLabelPlacement {
public static const TOP:String = "top";
public static const LEFT:String = "left";
public static const BOTTOM:String = "bottom";
public static const RIGHT:String = "right";
}
}//package fl.controls
Section 31
//ColorPicker (fl.controls.ColorPicker)
package fl.controls {
import flash.events.*;
import flash.display.*;
import fl.core.*;
import fl.managers.*;
import flash.geom.*;
import fl.events.*;
import flash.text.*;
import flash.ui.*;
public class ColorPicker extends UIComponent implements IFocusManagerComponent {
protected var paletteBG:DisplayObject;
protected var customColors:Array;
protected var palette:Sprite;
protected var isOpen:Boolean;// = false
protected var swatchButton:BaseButton;
protected var selectedSwatch:Sprite;
protected var textFieldBG:DisplayObject;
protected var colorWell:DisplayObject;
protected var rollOverColor:int;// = -1
protected var colorHash:Object;
protected var swatchSelectedSkin:DisplayObject;
protected var _showTextField:Boolean;// = true
protected var currRowIndex:int;
protected var doOpen:Boolean;// = false
protected var currColIndex:int;
protected var swatchMap:Array;
protected var _selectedColor:uint;
protected var _editable:Boolean;// = true
public var textField:TextField;
protected var swatches:Sprite;
protected static const SWATCH_STYLES:Object = {disabledSkin:"swatchSkin", downSkin:"swatchSkin", overSkin:"swatchSkin", upSkin:"swatchSkin"};
protected static const POPUP_BUTTON_STYLES:Object = {disabledSkin:"disabledSkin", downSkin:"downSkin", overSkin:"overSkin", upSkin:"upSkin"};
public static var defaultColors:Array;
private static var defaultStyles:Object = {upSkin:"ColorPicker_upSkin", disabledSkin:"ColorPicker_disabledSkin", overSkin:"ColorPicker_overSkin", downSkin:"ColorPicker_downSkin", colorWell:"ColorPicker_colorWell", swatchSkin:"ColorPicker_swatchSkin", swatchSelectedSkin:"ColorPicker_swatchSelectedSkin", swatchWidth:10, swatchHeight:10, columnCount:18, swatchPadding:1, textFieldSkin:"ColorPicker_textFieldSkin", textFieldWidth:null, textFieldHeight:null, textPadding:3, background:"ColorPicker_backgroundSkin", backgroundPadding:5, textFormat:null, focusRectSkin:null, focusRectPadding:null, embedFonts:false};
public function ColorPicker(){
rollOverColor = -1;
_editable = true;
_showTextField = true;
isOpen = false;
doOpen = false;
super();
}
public function set imeMode(_arg1:String):void{
_imeMode = _arg1;
}
protected function drawSwatchHighlight():void{
var _local1:Object;
var _local2:Number;
cleanUpSelected();
_local1 = getStyleValue("swatchSelectedSkin");
_local2 = (getStyleValue("swatchPadding") as Number);
if (_local1 != null){
swatchSelectedSkin = getDisplayObjectInstance(_local1);
swatchSelectedSkin.x = 0;
swatchSelectedSkin.y = 0;
swatchSelectedSkin.width = ((getStyleValue("swatchWidth") as Number) + 2);
swatchSelectedSkin.height = ((getStyleValue("swatchHeight") as Number) + 2);
};
}
protected function setColorWellColor(_arg1:ColorTransform):void{
if (!colorWell){
return;
};
colorWell.transform.colorTransform = _arg1;
}
override protected function isOurFocus(_arg1:DisplayObject):Boolean{
return ((((_arg1 == textField)) || (super.isOurFocus(_arg1))));
}
public function open():void{
var _local1:IFocusManager;
if (!_enabled){
return;
};
doOpen = true;
_local1 = focusManager;
if (_local1){
_local1.defaultButtonEnabled = false;
};
invalidate(InvalidationType.STATE);
}
protected function setTextEditable():void{
if (!showTextField){
return;
};
textField.type = (editable) ? TextFieldType.INPUT : TextFieldType.DYNAMIC;
textField.selectable = editable;
}
protected function createSwatch(_arg1:uint):Sprite{
var _local2:Sprite;
var _local3:BaseButton;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Graphics;
_local2 = new Sprite();
_local3 = new BaseButton();
_local3.focusEnabled = false;
_local4 = (getStyleValue("swatchWidth") as Number);
_local5 = (getStyleValue("swatchHeight") as Number);
_local3.setSize(_local4, _local5);
_local3.transform.colorTransform = new ColorTransform(0, 0, 0, 1, (_arg1 >> 16), ((_arg1 >> 8) & 0xFF), (_arg1 & 0xFF), 0);
copyStylesToChild(_local3, SWATCH_STYLES);
_local3.mouseEnabled = false;
_local3.drawNow();
_local3.name = "color";
_local2.addChild(_local3);
_local6 = (getStyleValue("swatchPadding") as Number);
_local7 = _local2.graphics;
_local7.beginFill(0);
_local7.drawRect(-(_local6), -(_local6), (_local4 + (_local6 * 2)), (_local5 + (_local6 * 2)));
_local7.endFill();
_local2.addEventListener(MouseEvent.CLICK, onSwatchClick, false, 0, true);
_local2.addEventListener(MouseEvent.MOUSE_OVER, onSwatchOver, false, 0, true);
_local2.addEventListener(MouseEvent.MOUSE_OUT, onSwatchOut, false, 0, true);
return (_local2);
}
protected function onSwatchOut(_arg1:MouseEvent):void{
var _local2:ColorTransform;
_local2 = _arg1.target.transform.colorTransform;
dispatchEvent(new ColorPickerEvent(ColorPickerEvent.ITEM_ROLL_OUT, _local2.color));
}
override protected function keyDownHandler(_arg1:KeyboardEvent):void{
var _local2:ColorTransform;
var _local3:Sprite;
switch (_arg1.keyCode){
case Keyboard.SHIFT:
case Keyboard.CONTROL:
return;
};
if (_arg1.ctrlKey){
switch (_arg1.keyCode){
case Keyboard.DOWN:
open();
break;
case Keyboard.UP:
close();
break;
};
return;
};
if (!isOpen){
switch (_arg1.keyCode){
case Keyboard.UP:
case Keyboard.DOWN:
case Keyboard.LEFT:
case Keyboard.RIGHT:
case Keyboard.SPACE:
open();
return;
};
};
textField.maxChars = ((((_arg1.keyCode == "#".charCodeAt(0))) || ((textField.text.indexOf("#") > -1)))) ? 7 : 6;
switch (_arg1.keyCode){
case Keyboard.TAB:
_local3 = findSwatch(_selectedColor);
setSwatchHighlight(_local3);
return;
case Keyboard.HOME:
currColIndex = (currRowIndex = 0);
break;
case Keyboard.END:
currColIndex = (swatchMap[(swatchMap.length - 1)].length - 1);
currRowIndex = (swatchMap.length - 1);
break;
case Keyboard.PAGE_DOWN:
currRowIndex = (swatchMap.length - 1);
break;
case Keyboard.PAGE_UP:
currRowIndex = 0;
break;
case Keyboard.ESCAPE:
if (isOpen){
selectedColor = _selectedColor;
};
close();
return;
case Keyboard.ENTER:
return;
case Keyboard.UP:
currRowIndex = Math.max(-1, (currRowIndex - 1));
if (currRowIndex == -1){
currRowIndex = (swatchMap.length - 1);
};
break;
case Keyboard.DOWN:
currRowIndex = Math.min(swatchMap.length, (currRowIndex + 1));
if (currRowIndex == swatchMap.length){
currRowIndex = 0;
};
break;
case Keyboard.RIGHT:
currColIndex = Math.min(swatchMap[currRowIndex].length, (currColIndex + 1));
if (currColIndex == swatchMap[currRowIndex].length){
currColIndex = 0;
currRowIndex = Math.min(swatchMap.length, (currRowIndex + 1));
if (currRowIndex == swatchMap.length){
currRowIndex = 0;
};
};
break;
case Keyboard.LEFT:
currColIndex = Math.max(-1, (currColIndex - 1));
if (currColIndex == -1){
currColIndex = (swatchMap[currRowIndex].length - 1);
currRowIndex = Math.max(-1, (currRowIndex - 1));
if (currRowIndex == -1){
currRowIndex = (swatchMap.length - 1);
};
};
break;
default:
return;
};
_local2 = swatchMap[currRowIndex][currColIndex].getChildByName("color").transform.colorTransform;
rollOverColor = _local2.color;
setColorWellColor(_local2);
setSwatchHighlight(swatchMap[currRowIndex][currColIndex]);
setColorText(_local2.color);
}
public function get editable():Boolean{
return (_editable);
}
override protected function focusInHandler(_arg1:FocusEvent):void{
super.focusInHandler(_arg1);
setIMEMode(true);
}
protected function onStageClick(_arg1:MouseEvent):void{
if (((!(contains((_arg1.target as DisplayObject)))) && (!(palette.contains((_arg1.target as DisplayObject)))))){
selectedColor = _selectedColor;
close();
};
}
protected function onSwatchOver(_arg1:MouseEvent):void{
var _local2:BaseButton;
var _local3:ColorTransform;
_local2 = (_arg1.target.getChildByName("color") as BaseButton);
_local3 = _local2.transform.colorTransform;
setColorWellColor(_local3);
setSwatchHighlight((_arg1.target as Sprite));
setColorText(_local3.color);
dispatchEvent(new ColorPickerEvent(ColorPickerEvent.ITEM_ROLL_OVER, _local3.color));
}
override public function set enabled(_arg1:Boolean):void{
super.enabled = _arg1;
if (!_arg1){
close();
};
swatchButton.enabled = _arg1;
}
override protected function keyUpHandler(_arg1:KeyboardEvent):void{
var _local2:uint;
var _local3:ColorTransform;
var _local4:String;
var _local5:Sprite;
if (!isOpen){
return;
};
_local3 = new ColorTransform();
if (((editable) && (showTextField))){
_local4 = textField.text;
if (_local4.indexOf("#") > -1){
_local4 = _local4.replace(/^\s+|\s+$/g, "");
_local4 = _local4.replace(/#/g, "");
};
_local2 = parseInt(_local4, 16);
_local5 = findSwatch(_local2);
setSwatchHighlight(_local5);
_local3.color = _local2;
setColorWellColor(_local3);
} else {
_local2 = rollOverColor;
_local3.color = _local2;
};
if (_arg1.keyCode != Keyboard.ENTER){
return;
};
dispatchEvent(new ColorPickerEvent(ColorPickerEvent.ENTER, _local2));
_selectedColor = rollOverColor;
setColorText(_local3.color);
rollOverColor = _local3.color;
dispatchEvent(new ColorPickerEvent(ColorPickerEvent.CHANGE, selectedColor));
close();
}
protected function drawBG():void{
var _local1:Object;
var _local2:Number;
_local1 = getStyleValue("background");
if (_local1 != null){
paletteBG = (getDisplayObjectInstance(_local1) as Sprite);
};
if (paletteBG == null){
return;
};
_local2 = Number(getStyleValue("backgroundPadding"));
paletteBG.width = (Math.max((showTextField) ? textFieldBG.width : 0, swatches.width) + (_local2 * 2));
paletteBG.height = ((swatches.y + swatches.height) + _local2);
palette.addChildAt(paletteBG, 0);
}
protected function positionTextField():void{
var _local1:Number;
var _local2:Number;
if (!showTextField){
return;
};
_local1 = (getStyleValue("backgroundPadding") as Number);
_local2 = (getStyleValue("textPadding") as Number);
textFieldBG.x = (paletteBG.x + _local1);
textFieldBG.y = (paletteBG.y + _local1);
textField.x = (textFieldBG.x + _local2);
textField.y = (textFieldBG.y + _local2);
}
protected function setEmbedFonts():void{
var _local1:Object;
_local1 = getStyleValue("embedFonts");
if (_local1 != null){
textField.embedFonts = _local1;
};
}
public function set showTextField(_arg1:Boolean):void{
invalidate(InvalidationType.STYLES);
_showTextField = _arg1;
}
protected function addStageListener(_arg1:Event=null):void{
stage.addEventListener(MouseEvent.MOUSE_DOWN, onStageClick, false, 0, true);
}
protected function drawPalette():void{
if (isOpen){
stage.removeChild(palette);
};
palette = new Sprite();
drawTextField();
drawSwatches();
drawBG();
}
protected function showPalette():void{
var _local1:Sprite;
if (isOpen){
positionPalette();
return;
};
addEventListener(Event.ENTER_FRAME, addCloseListener, false, 0, true);
stage.addChild(palette);
isOpen = true;
positionPalette();
dispatchEvent(new Event(Event.OPEN));
stage.focus = textField;
_local1 = selectedSwatch;
if (_local1 == null){
_local1 = findSwatch(_selectedColor);
};
setSwatchHighlight(_local1);
}
public function set editable(_arg1:Boolean):void{
_editable = _arg1;
invalidate(InvalidationType.STATE);
}
public function set colors(_arg1:Array):void{
customColors = _arg1;
invalidate(InvalidationType.DATA);
}
protected function drawTextField():void{
var _local1:Number;
var _local2:Number;
var _local3:Object;
var _local4:TextFormat;
var _local5:TextFormat;
if (!showTextField){
return;
};
_local1 = (getStyleValue("backgroundPadding") as Number);
_local2 = (getStyleValue("textPadding") as Number);
textFieldBG = getDisplayObjectInstance(getStyleValue("textFieldSkin"));
if (textFieldBG != null){
palette.addChild(textFieldBG);
textFieldBG.x = (textFieldBG.y = _local1);
};
_local3 = UIComponent.getStyleDefinition();
_local4 = (enabled) ? (_local3.defaultTextFormat as TextFormat) : (_local3.defaultDisabledTextFormat as TextFormat);
textField.setTextFormat(_local4);
_local5 = (getStyleValue("textFormat") as TextFormat);
if (_local5 != null){
textField.setTextFormat(_local5);
} else {
_local5 = _local4;
};
textField.defaultTextFormat = _local5;
setEmbedFonts();
textField.restrict = "A-Fa-f0-9#";
textField.maxChars = 6;
palette.addChild(textField);
textField.text = " #888888 ";
textField.height = (textField.textHeight + 3);
textField.width = (textField.textWidth + 3);
textField.text = "";
textField.x = (textField.y = (_local1 + _local2));
textFieldBG.width = (textField.width + (_local2 * 2));
textFieldBG.height = (textField.height + (_local2 * 2));
setTextEditable();
}
protected function setColorText(_arg1:uint):void{
if (textField == null){
return;
};
textField.text = ("#" + colorToString(_arg1));
}
protected function colorToString(_arg1:uint):String{
var _local2:String;
_local2 = _arg1.toString(16);
while (_local2.length < 6) {
_local2 = ("0" + _local2);
};
return (_local2);
}
public function get imeMode():String{
return (_imeMode);
}
public function set selectedColor(_arg1:uint):void{
var _local2:ColorTransform;
if (!_enabled){
return;
};
_selectedColor = _arg1;
rollOverColor = -1;
currColIndex = (currRowIndex = 0);
_local2 = new ColorTransform();
_local2.color = _arg1;
setColorWellColor(_local2);
invalidate(InvalidationType.DATA);
}
override protected function focusOutHandler(_arg1:FocusEvent):void{
if (_arg1.relatedObject == textField){
setFocus();
return;
};
if (isOpen){
close();
};
super.focusOutHandler(_arg1);
setIMEMode(false);
}
protected function onPopupButtonClick(_arg1:MouseEvent):void{
if (isOpen){
close();
} else {
open();
};
}
protected function positionPalette():void{
var _local1:Point;
var _local2:Number;
_local1 = swatchButton.localToGlobal(new Point(0, 0));
_local2 = (getStyleValue("backgroundPadding") as Number);
if ((_local1.x + palette.width) > stage.stageWidth){
palette.x = ((_local1.x - palette.width) << 0);
} else {
palette.x = (((_local1.x + swatchButton.width) + _local2) << 0);
};
palette.y = (Math.max(0, Math.min(_local1.y, (stage.stageHeight - palette.height))) << 0);
}
public function get hexValue():String{
if (colorWell == null){
return (colorToString(0));
};
return (colorToString(colorWell.transform.colorTransform.color));
}
override public function get enabled():Boolean{
return (super.enabled);
}
protected function setSwatchHighlight(_arg1:Sprite):void{
var _local2:Number;
var _local3:*;
if (_arg1 == null){
if (palette.contains(swatchSelectedSkin)){
palette.removeChild(swatchSelectedSkin);
};
return;
} else {
if (((!(palette.contains(swatchSelectedSkin))) && ((colors.length > 0)))){
palette.addChild(swatchSelectedSkin);
} else {
if (!colors.length){
return;
};
};
};
_local2 = (getStyleValue("swatchPadding") as Number);
palette.setChildIndex(swatchSelectedSkin, (palette.numChildren - 1));
swatchSelectedSkin.x = ((swatches.x + _arg1.x) - 1);
swatchSelectedSkin.y = ((swatches.y + _arg1.y) - 1);
_local3 = _arg1.getChildByName("color").transform.colorTransform.color;
currColIndex = colorHash[_local3].col;
currRowIndex = colorHash[_local3].row;
}
protected function onSwatchClick(_arg1:MouseEvent):void{
var _local2:ColorTransform;
_local2 = _arg1.target.getChildByName("color").transform.colorTransform;
_selectedColor = _local2.color;
dispatchEvent(new ColorPickerEvent(ColorPickerEvent.CHANGE, selectedColor));
close();
}
override protected function draw():void{
if (isInvalid(InvalidationType.STYLES, InvalidationType.DATA)){
setStyles();
drawPalette();
setEmbedFonts();
invalidate(InvalidationType.DATA, false);
invalidate(InvalidationType.STYLES, false);
};
if (isInvalid(InvalidationType.DATA)){
drawSwatchHighlight();
setColorDisplay();
};
if (isInvalid(InvalidationType.STATE)){
setTextEditable();
if (doOpen){
doOpen = false;
showPalette();
};
colorWell.visible = enabled;
};
if (isInvalid(InvalidationType.SIZE, InvalidationType.STYLES)){
swatchButton.setSize(width, height);
swatchButton.drawNow();
colorWell.width = width;
colorWell.height = height;
};
super.draw();
}
protected function drawSwatches():void{
var _local1:Number;
var _local2:Number;
var _local3:uint;
var _local4:uint;
var _local5:Number;
var _local6:Number;
var _local7:uint;
var _local8:int;
var _local9:uint;
var _local10:Sprite;
_local1 = (getStyleValue("backgroundPadding") as Number);
_local2 = (showTextField) ? ((textFieldBG.y + textFieldBG.height) + _local1) : _local1;
swatches = new Sprite();
palette.addChild(swatches);
swatches.x = _local1;
swatches.y = _local2;
_local3 = (getStyleValue("columnCount") as uint);
_local4 = (getStyleValue("swatchPadding") as uint);
_local5 = (getStyleValue("swatchWidth") as Number);
_local6 = (getStyleValue("swatchHeight") as Number);
colorHash = {};
swatchMap = [];
_local7 = Math.min(0x0400, colors.length);
_local8 = -1;
_local9 = 0;
while (_local9 < _local7) {
_local10 = createSwatch(colors[_local9]);
_local10.x = ((_local5 + _local4) * (_local9 % _local3));
if (_local10.x == 0){
swatchMap.push([_local10]);
_local8++;
} else {
swatchMap[_local8].push(_local10);
};
colorHash[colors[_local9]] = {swatch:_local10, row:_local8, col:(swatchMap[_local8].length - 1)};
_local10.y = (Math.floor((_local9 / _local3)) * (_local6 + _local4));
swatches.addChild(_local10);
_local9++;
};
}
override protected function configUI():void{
var _local1:uint;
super.configUI();
tabChildren = false;
if (_slot1.defaultColors == null){
_slot1.defaultColors = [];
_local1 = 0;
while (_local1 < 216) {
_slot1.defaultColors.push(((((((((_local1 / 6) % 3) << 0) + (((_local1 / 108) << 0) * 3)) * 51) << 16) | (((_local1 % 6) * 51) << 8)) | ((((_local1 / 18) << 0) % 6) * 51)));
_local1++;
};
};
colorHash = {};
swatchMap = [];
textField = new TextField();
textField.tabEnabled = false;
swatchButton = new BaseButton();
swatchButton.focusEnabled = false;
swatchButton.useHandCursor = false;
swatchButton.autoRepeat = false;
swatchButton.setSize(25, 25);
swatchButton.addEventListener(MouseEvent.CLICK, onPopupButtonClick, false, 0, true);
addChild(swatchButton);
palette = new Sprite();
palette.tabChildren = false;
palette.cacheAsBitmap = true;
}
public function get showTextField():Boolean{
return (_showTextField);
}
public function get colors():Array{
return (((customColors)!=null) ? customColors : _slot1.defaultColors);
}
protected function findSwatch(_arg1:uint):Sprite{
var _local2:Object;
if (!swatchMap.length){
return (null);
};
_local2 = colorHash[_arg1];
if (_local2 != null){
return (_local2.swatch);
};
return (null);
}
protected function setColorDisplay():void{
var _local1:ColorTransform;
var _local2:Sprite;
if (!swatchMap.length){
return;
};
_local1 = new ColorTransform(0, 0, 0, 1, (_selectedColor >> 16), ((_selectedColor >> 8) & 0xFF), (_selectedColor & 0xFF), 0);
setColorWellColor(_local1);
setColorText(_selectedColor);
_local2 = findSwatch(_selectedColor);
setSwatchHighlight(_local2);
if (((swatchMap.length) && ((colorHash[_selectedColor] == undefined)))){
cleanUpSelected();
};
}
protected function cleanUpSelected():void{
if (((swatchSelectedSkin) && (palette.contains(swatchSelectedSkin)))){
palette.removeChild(swatchSelectedSkin);
};
}
public function get selectedColor():uint{
if (colorWell == null){
return (0);
};
return (colorWell.transform.colorTransform.color);
}
private function addCloseListener(_arg1:Event){
removeEventListener(Event.ENTER_FRAME, addCloseListener);
if (!isOpen){
return;
};
addStageListener();
}
protected function removeStageListener(_arg1:Event=null):void{
stage.removeEventListener(MouseEvent.MOUSE_DOWN, onStageClick, false);
}
protected function setStyles():void{
var _local1:DisplayObject;
var _local2:Object;
_local1 = colorWell;
_local2 = getStyleValue("colorWell");
if (_local2 != null){
colorWell = (getDisplayObjectInstance(_local2) as DisplayObject);
};
addChildAt(colorWell, getChildIndex(swatchButton));
copyStylesToChild(swatchButton, POPUP_BUTTON_STYLES);
swatchButton.drawNow();
if (((((!((_local1 == null))) && (contains(_local1)))) && (!((_local1 == colorWell))))){
removeChild(_local1);
};
}
public function close():void{
var _local1:IFocusManager;
if (isOpen){
stage.removeChild(palette);
isOpen = false;
dispatchEvent(new Event(Event.CLOSE));
};
_local1 = focusManager;
if (_local1){
_local1.defaultButtonEnabled = true;
};
removeStageListener();
cleanUpSelected();
}
public static function getStyleDefinition():Object{
return (defaultStyles);
}
}
}//package fl.controls
Section 32
//LabelButton (fl.controls.LabelButton)
package fl.controls {
import flash.events.*;
import flash.display.*;
import fl.core.*;
import fl.managers.*;
import fl.events.*;
import flash.text.*;
import flash.ui.*;
public class LabelButton extends BaseButton implements IFocusManagerComponent {
protected var _labelPlacement:String;// = "right"
protected var _toggle:Boolean;// = false
protected var icon:DisplayObject;
protected var oldMouseState:String;
protected var mode:String;// = "center"
public var textField:TextField;
protected var _label:String;// = "Label"
private static var defaultStyles:Object = {icon:null, upIcon:null, downIcon:null, overIcon:null, disabledIcon:null, selectedDisabledIcon:null, selectedUpIcon:null, selectedDownIcon:null, selectedOverIcon:null, textFormat:null, disabledTextFormat:null, textPadding:5, embedFonts:false};
public static var createAccessibilityImplementation:Function;
public function LabelButton(){
_labelPlacement = ButtonLabelPlacement.RIGHT;
_toggle = false;
_label = "Label";
mode = "center";
super();
}
protected function toggleSelected(_arg1:MouseEvent):void{
selected = !(selected);
dispatchEvent(new Event(Event.CHANGE, true));
}
public function get labelPlacement():String{
return (_labelPlacement);
}
override protected function keyDownHandler(_arg1:KeyboardEvent):void{
if (!enabled){
return;
};
if (_arg1.keyCode == Keyboard.SPACE){
if (oldMouseState == null){
oldMouseState = mouseState;
};
setMouseState("down");
startPress();
};
}
protected function setEmbedFont(){
var _local1:Object;
_local1 = getStyleValue("embedFonts");
if (_local1 != null){
textField.embedFonts = _local1;
};
}
override protected function keyUpHandler(_arg1:KeyboardEvent):void{
if (!enabled){
return;
};
if (_arg1.keyCode == Keyboard.SPACE){
setMouseState(oldMouseState);
oldMouseState = null;
endPress();
dispatchEvent(new MouseEvent(MouseEvent.CLICK));
};
}
override public function get selected():Boolean{
return ((_toggle) ? _selected : false);
}
public function set labelPlacement(_arg1:String):void{
_labelPlacement = _arg1;
invalidate(InvalidationType.SIZE);
}
public function set toggle(_arg1:Boolean):void{
if (((!(_arg1)) && (super.selected))){
selected = false;
};
_toggle = _arg1;
if (_toggle){
addEventListener(MouseEvent.CLICK, toggleSelected, false, 0, true);
} else {
removeEventListener(MouseEvent.CLICK, toggleSelected);
};
invalidate(InvalidationType.STATE);
}
public function get label():String{
return (_label);
}
override public function set selected(_arg1:Boolean):void{
_selected = _arg1;
if (_toggle){
invalidate(InvalidationType.STATE);
};
}
override protected function draw():void{
if (textField.text != _label){
label = _label;
};
if (isInvalid(InvalidationType.STYLES, InvalidationType.STATE)){
drawBackground();
drawIcon();
drawTextFormat();
invalidate(InvalidationType.SIZE, false);
};
if (isInvalid(InvalidationType.SIZE)){
drawLayout();
};
if (isInvalid(InvalidationType.SIZE, InvalidationType.STYLES)){
if (((isFocused) && (focusManager.showFocusIndicator))){
drawFocus(true);
};
};
validate();
}
public function get toggle():Boolean{
return (_toggle);
}
override protected function configUI():void{
super.configUI();
textField = new TextField();
textField.type = TextFieldType.DYNAMIC;
textField.selectable = false;
addChild(textField);
}
override protected function drawLayout():void{
var _local1:Number;
var _local2:String;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
_local1 = Number(getStyleValue("textPadding"));
_local2 = ((((icon == null)) && ((mode == "center")))) ? ButtonLabelPlacement.TOP : _labelPlacement;
textField.height = (textField.textHeight + 4);
_local3 = (textField.textWidth + 4);
_local4 = (textField.textHeight + 4);
_local5 = ((icon)==null) ? 0 : (icon.width + _local1);
_local6 = ((icon)==null) ? 0 : (icon.height + _local1);
textField.visible = (label.length > 0);
if (icon != null){
icon.x = Math.round(((width - icon.width) / 2));
icon.y = Math.round(((height - icon.height) / 2));
};
if (textField.visible == false){
textField.width = 0;
textField.height = 0;
} else {
if ((((_local2 == ButtonLabelPlacement.BOTTOM)) || ((_local2 == ButtonLabelPlacement.TOP)))){
_local7 = Math.max(0, Math.min(_local3, (width - (2 * _local1))));
if ((height - 2) > _local4){
_local8 = _local4;
} else {
_local8 = (height - 2);
};
_local3 = _local7;
textField.width = _local3;
_local4 = _local8;
textField.height = _local4;
textField.x = Math.round(((width - _local3) / 2));
textField.y = Math.round(((((height - textField.height) - _local6) / 2) + ((_local2)==ButtonLabelPlacement.BOTTOM) ? _local6 : 0));
if (icon != null){
icon.y = Math.round(((_local2)==ButtonLabelPlacement.BOTTOM) ? (textField.y - _local6) : ((textField.y + textField.height) + _local1));
};
} else {
_local7 = Math.max(0, Math.min(_local3, ((width - _local5) - (2 * _local1))));
_local3 = _local7;
textField.width = _local3;
textField.x = Math.round(((((width - _local3) - _local5) / 2) + ((_local2)!=ButtonLabelPlacement.LEFT) ? _local5 : 0));
textField.y = Math.round(((height - textField.height) / 2));
if (icon != null){
icon.x = Math.round(((_local2)!=ButtonLabelPlacement.LEFT) ? (textField.x - _local5) : ((textField.x + _local3) + _local1));
};
};
};
super.drawLayout();
}
override protected function initializeAccessibility():void{
if (LabelButton.createAccessibilityImplementation != null){
LabelButton.createAccessibilityImplementation(this);
};
}
protected function drawIcon():void{
var _local1:DisplayObject;
var _local2:String;
var _local3:Object;
_local1 = icon;
_local2 = (enabled) ? mouseState : "disabled";
if (selected){
_local2 = (("selected" + _local2.substr(0, 1).toUpperCase()) + _local2.substr(1));
};
_local2 = (_local2 + "Icon");
_local3 = getStyleValue(_local2);
if (_local3 == null){
_local3 = getStyleValue("icon");
};
if (_local3 != null){
icon = getDisplayObjectInstance(_local3);
};
if (icon != null){
addChildAt(icon, 1);
};
if (((!((_local1 == null))) && (!((_local1 == icon))))){
removeChild(_local1);
};
}
public function set label(_arg1:String):void{
_label = _arg1;
if (textField.text != _label){
textField.text = _label;
dispatchEvent(new ComponentEvent(ComponentEvent.LABEL_CHANGE));
};
invalidate(InvalidationType.SIZE);
invalidate(InvalidationType.STYLES);
}
protected function drawTextFormat():void{
var _local1:Object;
var _local2:TextFormat;
var _local3:TextFormat;
_local1 = UIComponent.getStyleDefinition();
_local2 = (enabled) ? (_local1.defaultTextFormat as TextFormat) : (_local1.defaultDisabledTextFormat as TextFormat);
textField.setTextFormat(_local2);
_local3 = (getStyleValue((enabled) ? "textFormat" : "disabledTextFormat") as TextFormat);
if (_local3 != null){
textField.setTextFormat(_local3);
} else {
_local3 = _local2;
};
textField.defaultTextFormat = _local3;
setEmbedFont();
}
public static function getStyleDefinition():Object{
return (mergeStyles(defaultStyles, BaseButton.getStyleDefinition()));
}
}
}//package fl.controls
Section 33
//RadioButton (fl.controls.RadioButton)
package fl.controls {
import flash.events.*;
import flash.display.*;
import fl.managers.*;
import flash.ui.*;
public class RadioButton extends LabelButton implements IFocusManagerGroup {
protected var _value:Object;
protected var defaultGroupName:String;// = "RadioButtonGroup"
protected var _group:RadioButtonGroup;
private static var defaultStyles:Object = {icon:null, upIcon:"RadioButton_upIcon", downIcon:"RadioButton_downIcon", overIcon:"RadioButton_overIcon", disabledIcon:"RadioButton_disabledIcon", selectedDisabledIcon:"RadioButton_selectedDisabledIcon", selectedUpIcon:"RadioButton_selectedUpIcon", selectedDownIcon:"RadioButton_selectedDownIcon", selectedOverIcon:"RadioButton_selectedOverIcon", focusRectSkin:null, focusRectPadding:null, textFormat:null, disabledTextFormat:null, embedFonts:null, textPadding:5};
public static var createAccessibilityImplementation:Function;
public function RadioButton(){
defaultGroupName = "RadioButtonGroup";
super();
mode = "border";
groupName = defaultGroupName;
}
override public function drawFocus(_arg1:Boolean):void{
var _local2:Number;
super.drawFocus(_arg1);
if (_arg1){
_local2 = Number(getStyleValue("focusRectPadding"));
uiFocusRect.x = (background.x - _local2);
uiFocusRect.y = (background.y - _local2);
uiFocusRect.width = (background.width + (_local2 * 2));
uiFocusRect.height = (background.height + (_local2 * 2));
};
}
private function setThis():void{
var _local1:RadioButtonGroup;
_local1 = _group;
if (_local1 != null){
if (_local1.selection != this){
_local1.selection = this;
};
} else {
super.selected = true;
};
}
override public function get autoRepeat():Boolean{
return (false);
}
override public function set autoRepeat(_arg1:Boolean):void{
}
protected function handleClick(_arg1:MouseEvent):void{
if (_group == null){
return;
};
_group.dispatchEvent(new MouseEvent(MouseEvent.CLICK, true));
}
override protected function keyDownHandler(_arg1:KeyboardEvent):void{
switch (_arg1.keyCode){
case Keyboard.DOWN:
setNext(!(_arg1.ctrlKey));
_arg1.stopPropagation();
break;
case Keyboard.UP:
setPrev(!(_arg1.ctrlKey));
_arg1.stopPropagation();
break;
case Keyboard.LEFT:
setPrev(!(_arg1.ctrlKey));
_arg1.stopPropagation();
break;
case Keyboard.RIGHT:
setNext(!(_arg1.ctrlKey));
_arg1.stopPropagation();
break;
case Keyboard.SPACE:
setThis();
_toggle = false;
default:
super.keyDownHandler(_arg1);
break;
};
}
private function setNext(_arg1:Boolean=true):void{
var _local2:RadioButtonGroup;
var _local3:IFocusManager;
var _local4:int;
var _local5:Number;
var _local6:int;
var _local7:*;
_local2 = _group;
if (_local2 == null){
return;
};
_local3 = focusManager;
if (_local3){
_local3.showFocusIndicator = true;
};
_local4 = _local2.getRadioButtonIndex(this);
_local5 = _local2.numRadioButtons;
_local6 = _local4;
if (_local4 != -1){
do {
_local6++;
_local6 = ((_local6)>(_local2.numRadioButtons - 1)) ? 0 : _local6;
_local7 = _local2.getRadioButtonAt(_local6);
if (((_local7) && (_local7.enabled))){
if (_arg1){
_local2.selection = _local7;
};
_local7.setFocus();
return;
};
if (((_arg1) && (!((_local2.getRadioButtonAt(_local6) == _local2.selection))))){
_local2.selection = this;
};
this.drawFocus(true);
} while (_local6 != _local4);
};
}
public function get group():RadioButtonGroup{
return (_group);
}
override protected function keyUpHandler(_arg1:KeyboardEvent):void{
super.keyUpHandler(_arg1);
if ((((_arg1.keyCode == Keyboard.SPACE)) && (!(_toggle)))){
_toggle = true;
};
}
override public function get selected():Boolean{
return (super.selected);
}
override public function set toggle(_arg1:Boolean):void{
throw (new Error("Warning: You cannot change a RadioButtons toggle."));
}
public function set value(_arg1:Object):void{
_value = _arg1;
}
public function set group(_arg1:RadioButtonGroup):void{
groupName = _arg1.name;
}
override public function set selected(_arg1:Boolean):void{
if ((((_arg1 == false)) || (selected))){
return;
};
if (_group != null){
_group.selection = this;
} else {
super.selected = _arg1;
};
}
override protected function draw():void{
super.draw();
}
override public function get toggle():Boolean{
return (true);
}
override protected function configUI():void{
var _local1:Shape;
var _local2:Graphics;
super.configUI();
super.toggle = true;
_local1 = new Shape();
_local2 = _local1.graphics;
_local2.beginFill(0, 0);
_local2.drawRect(0, 0, 100, 100);
_local2.endFill();
background = (_local1 as DisplayObject);
addChildAt(background, 0);
addEventListener(MouseEvent.CLICK, handleClick, false, 0, true);
}
public function set groupName(_arg1:String):void{
if (_group != null){
_group.removeRadioButton(this);
_group.removeEventListener(Event.CHANGE, handleChange);
};
_group = ((_arg1)==null) ? null : RadioButtonGroup.getGroup(_arg1);
if (_group != null){
_group.addRadioButton(this);
_group.addEventListener(Event.CHANGE, handleChange, false, 0, true);
};
}
public function get value():Object{
return (_value);
}
override protected function drawLayout():void{
var _local1:Number;
super.drawLayout();
_local1 = Number(getStyleValue("textPadding"));
switch (_labelPlacement){
case ButtonLabelPlacement.RIGHT:
icon.x = _local1;
textField.x = (icon.x + (icon.width + _local1));
background.width = ((textField.x + textField.width) + _local1);
background.height = (Math.max(textField.height, icon.height) + (_local1 * 2));
break;
case ButtonLabelPlacement.LEFT:
icon.x = ((width - icon.width) - _local1);
textField.x = (((width - icon.width) - (_local1 * 2)) - textField.width);
background.width = ((textField.width + icon.width) + (_local1 * 3));
background.height = (Math.max(textField.height, icon.height) + (_local1 * 2));
break;
case ButtonLabelPlacement.TOP:
case ButtonLabelPlacement.BOTTOM:
background.width = (Math.max(textField.width, icon.width) + (_local1 * 2));
background.height = ((textField.height + icon.height) + (_local1 * 3));
break;
};
background.x = Math.min((icon.x - _local1), (textField.x - _local1));
background.y = Math.min((icon.y - _local1), (textField.y - _local1));
}
override protected function drawBackground():void{
}
override protected function initializeAccessibility():void{
if (RadioButton.createAccessibilityImplementation != null){
RadioButton.createAccessibilityImplementation(this);
};
}
public function get groupName():String{
return (((_group)==null) ? null : _group.name);
}
private function setPrev(_arg1:Boolean=true):void{
var _local2:RadioButtonGroup;
var _local3:IFocusManager;
var _local4:int;
var _local5:int;
var _local6:*;
_local2 = _group;
if (_local2 == null){
return;
};
_local3 = focusManager;
if (_local3){
_local3.showFocusIndicator = true;
};
_local4 = _local2.getRadioButtonIndex(this);
_local5 = _local4;
if (_local4 != -1){
do {
--_local5;
_local5 = ((_local5)==-1) ? (_local2.numRadioButtons - 1) : _local5;
_local6 = _local2.getRadioButtonAt(_local5);
if (((_local6) && (_local6.enabled))){
if (_arg1){
_local2.selection = _local6;
};
_local6.setFocus();
return;
};
if (((_arg1) && (!((_local2.getRadioButtonAt(_local5) == _local2.selection))))){
_local2.selection = this;
};
this.drawFocus(true);
} while (_local5 != _local4);
};
}
protected function handleChange(_arg1:Event):void{
super.selected = (_group.selection == this);
dispatchEvent(new Event(Event.CHANGE, true));
}
public static function getStyleDefinition():Object{
return (defaultStyles);
}
}
}//package fl.controls
Section 34
//RadioButtonGroup (fl.controls.RadioButtonGroup)
package fl.controls {
import flash.events.*;
public class RadioButtonGroup extends EventDispatcher {
protected var _selection:RadioButton;
protected var radioButtons:Array;
protected var _name:String;
private static var groups:Object;
private static var groupCount:uint = 0;
public function RadioButtonGroup(_arg1:String){
_name = _arg1;
radioButtons = [];
registerGroup(this);
}
public function getRadioButtonIndex(_arg1:RadioButton):int{
var _local2:int;
var _local3:RadioButton;
_local2 = 0;
while (_local2 < radioButtons.length) {
_local3 = (radioButtons[_local2] as RadioButton);
if (_local3 == _arg1){
return (_local2);
};
_local2++;
};
return (-1);
}
public function get numRadioButtons():int{
return (radioButtons.length);
}
public function get name():String{
return (_name);
}
public function get selection():RadioButton{
return (_selection);
}
public function set selection(_arg1:RadioButton):void{
if ((((((_selection == _arg1)) || ((_arg1 == null)))) || ((getRadioButtonIndex(_arg1) == -1)))){
return;
};
_selection = _arg1;
dispatchEvent(new Event(Event.CHANGE, true));
}
public function set selectedData(_arg1:Object):void{
var _local2:int;
var _local3:RadioButton;
_local2 = 0;
while (_local2 < radioButtons.length) {
_local3 = (radioButtons[_local2] as RadioButton);
if (_local3.value == _arg1){
selection = _local3;
return;
};
_local2++;
};
}
public function removeRadioButton(_arg1:RadioButton):void{
var _local2:int;
_local2 = getRadioButtonIndex(_arg1);
if (_local2 != -1){
radioButtons.splice(_local2, 1);
};
if (_selection == _arg1){
_selection = null;
};
}
public function addRadioButton(_arg1:RadioButton):void{
if (_arg1.groupName != name){
_arg1.groupName = name;
return;
};
radioButtons.push(_arg1);
if (_arg1.selected){
selection = _arg1;
};
}
public function getRadioButtonAt(_arg1:int):RadioButton{
return (RadioButton(radioButtons[_arg1]));
}
public function get selectedData():Object{
var _local1:RadioButton;
_local1 = _selection;
return (((_local1)==null) ? null : _local1.value);
}
public static function getGroup(_arg1:String):RadioButtonGroup{
var _local2:RadioButtonGroup;
if (groups == null){
groups = {};
};
_local2 = (groups[_arg1] as RadioButtonGroup);
if (_local2 == null){
_local2 = new RadioButtonGroup(_arg1);
if ((++groupCount % 20) == 0){
cleanUpGroups();
};
};
return (_local2);
}
private static function registerGroup(_arg1:RadioButtonGroup):void{
if (groups == null){
groups = {};
};
groups[_arg1.name] = _arg1;
}
private static function cleanUpGroups():void{
var _local1:String;
var _local2:RadioButtonGroup;
for (_local1 in groups) {
_local2 = (groups[_local1] as RadioButtonGroup);
if (_local2.radioButtons.length == 0){
delete groups[_local1];
};
};
}
}
}//package fl.controls
Section 35
//Slider (fl.controls.Slider)
package fl.controls {
import flash.events.*;
import flash.display.*;
import fl.core.*;
import fl.managers.*;
import fl.events.*;
import flash.ui.*;
public class Slider extends UIComponent implements IFocusManagerComponent {
protected var _direction:String;
protected var _liveDragging:Boolean;// = false
protected var _value:Number;// = 0
protected var _snapInterval:Number;// = 0
protected var _minimum:Number;// = 0
protected var _maximum:Number;// = 10
protected var track:BaseButton;
protected var _tickInterval:Number;// = 0
protected var tickContainer:Sprite;
protected var thumb:BaseButton;
protected static const TICK_STYLES:Object = {upSkin:"tickSkin"};
protected static const TRACK_STYLES:Object = {upSkin:"sliderTrackSkin", overSkin:"sliderTrackSkin", downSkin:"sliderTrackSkin", disabledSkin:"sliderTrackDisabledSkin"};
protected static const THUMB_STYLES:Object = {upSkin:"thumbUpSkin", overSkin:"thumbOverSkin", downSkin:"thumbDownSkin", disabledSkin:"thumbDisabledSkin"};
protected static var defaultStyles:Object = {thumbUpSkin:"SliderThumb_upSkin", thumbOverSkin:"SliderThumb_overSkin", thumbDownSkin:"SliderThumb_downSkin", thumbDisabledSkin:"SliderThumb_disabledSkin", sliderTrackSkin:"SliderTrack_skin", sliderTrackDisabledSkin:"SliderTrack_disabledSkin", tickSkin:"SliderTick_skin", focusRectSkin:null, focusRectPadding:null};
public function Slider(){
_direction = SliderDirection.HORIZONTAL;
_minimum = 0;
_maximum = 10;
_value = 0;
_tickInterval = 0;
_snapInterval = 0;
_liveDragging = false;
super();
setStyles();
}
public function get minimum():Number{
return (_minimum);
}
public function set minimum(_arg1:Number):void{
_minimum = _arg1;
this.value = Math.max(_arg1, this.value);
invalidate(InvalidationType.DATA);
}
public function get maximum():Number{
return (_maximum);
}
protected function positionThumb():void{
thumb.x = ((((_direction)==SliderDirection.VERTICAL) ? ((maximum - minimum) - value) : (value - minimum) / (maximum - minimum)) * _width);
}
protected function clearTicks():void{
if (((!(tickContainer)) || (!(tickContainer.parent)))){
return;
};
removeChild(tickContainer);
}
protected function onTrackClick(_arg1:MouseEvent):void{
calculateValue(track.mouseX, InteractionInputType.MOUSE, SliderEventClickTarget.TRACK);
if (!liveDragging){
dispatchEvent(new SliderEvent(SliderEvent.CHANGE, value, SliderEventClickTarget.TRACK, InteractionInputType.MOUSE));
};
}
public function set maximum(_arg1:Number):void{
_maximum = _arg1;
this.value = Math.min(_arg1, this.value);
invalidate(InvalidationType.DATA);
}
public function get liveDragging():Boolean{
return (_liveDragging);
}
protected function doDrag(_arg1:MouseEvent):void{
var _local2:Number;
var _local3:Number;
_local2 = (_width / snapInterval);
_local3 = track.mouseX;
calculateValue(_local3, InteractionInputType.MOUSE, SliderEventClickTarget.THUMB);
dispatchEvent(new SliderEvent(SliderEvent.THUMB_DRAG, value, SliderEventClickTarget.THUMB, InteractionInputType.MOUSE));
}
override protected function keyDownHandler(_arg1:KeyboardEvent):void{
var _local2:uint;
var _local3:Number;
var _local4:Boolean;
if (!enabled){
return;
};
_local2 = ((snapInterval)>0) ? snapInterval : 1;
_local4 = (direction == SliderDirection.HORIZONTAL);
if ((((((_arg1.keyCode == Keyboard.DOWN)) && (!(_local4)))) || ((((_arg1.keyCode == Keyboard.LEFT)) && (_local4))))){
_local3 = (value - _local2);
} else {
if ((((((_arg1.keyCode == Keyboard.UP)) && (!(_local4)))) || ((((_arg1.keyCode == Keyboard.RIGHT)) && (_local4))))){
_local3 = (value + _local2);
} else {
if ((((((_arg1.keyCode == Keyboard.PAGE_DOWN)) && (!(_local4)))) || ((((_arg1.keyCode == Keyboard.HOME)) && (_local4))))){
_local3 = minimum;
} else {
if ((((((_arg1.keyCode == Keyboard.PAGE_UP)) && (!(_local4)))) || ((((_arg1.keyCode == Keyboard.END)) && (_local4))))){
_local3 = maximum;
};
};
};
};
if (!isNaN(_local3)){
_arg1.stopPropagation();
doSetValue(_local3, InteractionInputType.KEYBOARD, null, _arg1.keyCode);
};
}
override public function set enabled(_arg1:Boolean):void{
if (enabled == _arg1){
return;
};
super.enabled = _arg1;
track.enabled = (thumb.enabled = _arg1);
}
protected function thumbPressHandler(_arg1:MouseEvent):void{
stage.addEventListener(MouseEvent.MOUSE_MOVE, doDrag, false, 0, true);
stage.addEventListener(MouseEvent.MOUSE_UP, thumbReleaseHandler, false, 0, true);
dispatchEvent(new SliderEvent(SliderEvent.THUMB_PRESS, value, InteractionInputType.MOUSE, SliderEventClickTarget.THUMB));
}
public function get snapInterval():Number{
return (_snapInterval);
}
protected function thumbReleaseHandler(_arg1:MouseEvent):void{
stage.removeEventListener(MouseEvent.MOUSE_MOVE, doDrag);
stage.removeEventListener(MouseEvent.MOUSE_UP, thumbReleaseHandler);
dispatchEvent(new SliderEvent(SliderEvent.THUMB_RELEASE, value, InteractionInputType.MOUSE, SliderEventClickTarget.THUMB));
dispatchEvent(new SliderEvent(SliderEvent.CHANGE, value, SliderEventClickTarget.THUMB, InteractionInputType.MOUSE));
}
public function set liveDragging(_arg1:Boolean):void{
_liveDragging = _arg1;
}
public function set value(_arg1:Number):void{
doSetValue(_arg1);
}
public function set direction(_arg1:String):void{
var _local2:Boolean;
_direction = _arg1;
_local2 = (_direction == SliderDirection.VERTICAL);
if (isLivePreview){
if (_local2){
setScaleY(-1);
y = track.height;
} else {
setScaleY(1);
y = 0;
};
positionThumb();
return;
};
if (((_local2) && (componentInspectorSetting))){
if ((rotation % 90) == 0){
setScaleY(-1);
};
};
if (!componentInspectorSetting){
rotation = (_local2) ? 90 : 0;
};
}
public function set tickInterval(_arg1:Number):void{
_tickInterval = _arg1;
invalidate(InvalidationType.SIZE);
}
override public function get enabled():Boolean{
return (super.enabled);
}
override protected function draw():void{
if (isInvalid(InvalidationType.STYLES)){
setStyles();
invalidate(InvalidationType.SIZE, false);
};
if (isInvalid(InvalidationType.SIZE)){
track.setSize(_width, track.height);
track.drawNow();
thumb.drawNow();
};
if (tickInterval > 0){
drawTicks();
} else {
clearTicks();
};
positionThumb();
super.draw();
}
override protected function configUI():void{
super.configUI();
thumb = new BaseButton();
thumb.setSize(13, 13);
thumb.autoRepeat = false;
addChild(thumb);
thumb.addEventListener(MouseEvent.MOUSE_DOWN, thumbPressHandler, false, 0, true);
track = new BaseButton();
track.move(0, 0);
track.setSize(80, 4);
track.autoRepeat = false;
track.useHandCursor = false;
track.addEventListener(MouseEvent.CLICK, onTrackClick, false, 0, true);
addChildAt(track, 0);
}
public function set snapInterval(_arg1:Number):void{
_snapInterval = _arg1;
}
public function get value():Number{
return (_value);
}
public function get direction():String{
return (_direction);
}
public function get tickInterval():Number{
return (_tickInterval);
}
override public function setSize(_arg1:Number, _arg2:Number):void{
if ((((_direction == SliderDirection.VERTICAL)) && (!(isLivePreview)))){
super.setSize(_arg2, _arg1);
} else {
super.setSize(_arg1, _arg2);
};
invalidate(InvalidationType.SIZE);
}
protected function drawTicks():void{
var _local1:Number;
var _local2:Number;
var _local3:Number;
var _local4:uint;
var _local5:DisplayObject;
clearTicks();
tickContainer = new Sprite();
_local1 = ((maximum)<1) ? (tickInterval / 100) : tickInterval;
_local2 = ((maximum - minimum) / _local1);
_local3 = (_width / _local2);
_local4 = 0;
while (_local4 <= _local2) {
_local5 = getDisplayObjectInstance(getStyleValue("tickSkin"));
_local5.x = (_local3 * _local4);
_local5.y = ((track.y - _local5.height) - 2);
tickContainer.addChild(_local5);
_local4++;
};
addChild(tickContainer);
}
protected function calculateValue(_arg1:Number, _arg2:String, _arg3:String, _arg4:int=undefined):void{
var _local5:Number;
_local5 = ((_arg1 / _width) * (maximum - minimum));
if (_direction == SliderDirection.VERTICAL){
_local5 = (maximum - _local5);
} else {
_local5 = (minimum + _local5);
};
doSetValue(_local5, _arg2, _arg3, _arg4);
}
protected function getPrecision(_arg1:Number):Number{
var _local2:String;
_local2 = _arg1.toString();
if (_local2.indexOf(".") == -1){
return (0);
};
return (_local2.split(".").pop().length);
}
protected function doSetValue(_arg1:Number, _arg2:String=null, _arg3:String=null, _arg4:int=undefined):void{
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
_local5 = _value;
if (((!((_snapInterval == 0))) && (!((_snapInterval == 1))))){
_local6 = Math.pow(10, getPrecision(snapInterval));
_local7 = (_snapInterval * _local6);
_local8 = Math.round((_arg1 * _local6));
_local9 = (Math.round((_local8 / _local7)) * _local7);
_arg1 = (_local9 / _local6);
_value = Math.max(minimum, Math.min(maximum, _arg1));
} else {
_value = Math.max(minimum, Math.min(maximum, Math.round(_arg1)));
};
if (((!((_local5 == _value))) && (((((liveDragging) && (!((_arg3 == null))))) || ((_arg2 == InteractionInputType.KEYBOARD)))))){
dispatchEvent(new SliderEvent(SliderEvent.CHANGE, value, _arg3, _arg2, _arg4));
};
positionThumb();
}
protected function setStyles():void{
copyStylesToChild(thumb, THUMB_STYLES);
copyStylesToChild(track, TRACK_STYLES);
}
public static function getStyleDefinition():Object{
return (defaultStyles);
}
}
}//package fl.controls
Section 36
//SliderB (fl.controls.SliderB)
package fl.controls {
import flash.display.*;
public dynamic class SliderB extends MovieClip {
}
}//package fl.controls
Section 37
//SliderDirection (fl.controls.SliderDirection)
package fl.controls {
public class SliderDirection {
public static var HORIZONTAL:String = "horizontal";
public static var VERTICAL:String = "vertical";
}
}//package fl.controls
Section 38
//ComponentShim (fl.core.ComponentShim)
package fl.core {
import flash.display.*;
public dynamic class ComponentShim extends MovieClip {
}
}//package fl.core
Section 39
//InvalidationType (fl.core.InvalidationType)
package fl.core {
public class InvalidationType {
public static const SIZE:String = "size";
public static const ALL:String = "all";
public static const DATA:String = "data";
public static const SCROLL:String = "scroll";
public static const STATE:String = "state";
public static const STYLES:String = "styles";
public static const SELECTED:String = "selected";
public static const RENDERER_STYLES:String = "rendererStyles";
}
}//package fl.core
Section 40
//UIComponent (fl.core.UIComponent)
package fl.core {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import fl.managers.*;
import fl.events.*;
import flash.system.*;
import flash.text.*;
public class UIComponent extends Sprite {
protected var _enabled:Boolean;// = true
private var _mouseFocusEnabled:Boolean;// = true
protected var startHeight:Number;
protected var _height:Number;
protected var _oldIMEMode:String;// = null
protected var startWidth:Number;
public var focusTarget:IFocusManagerComponent;
protected var errorCaught:Boolean;// = false
protected var uiFocusRect:DisplayObject;
protected var _width:Number;
public var version:String;// = "3.0.0.15"
protected var isFocused:Boolean;// = false
protected var callLaterMethods:Dictionary;
private var _focusEnabled:Boolean;// = true
private var tempText:TextField;
protected var invalidateFlag:Boolean;// = false
protected var _inspector:Boolean;// = false
protected var sharedStyles:Object;
protected var invalidHash:Object;
protected var isLivePreview:Boolean;// = false
protected var _imeMode:String;// = null
protected var instanceStyles:Object;
protected var _x:Number;
protected var _y:Number;
public static var inCallLaterPhase:Boolean = false;
private static var defaultStyles:Object = {focusRectSkin:"focusRectSkin", focusRectPadding:2, textFormat:new TextFormat("_sans", 11, 0, false, false, false, "", "", TextFormatAlign.LEFT, 0, 0, 0, 0), disabledTextFormat:new TextFormat("_sans", 11, 0x999999, false, false, false, "", "", TextFormatAlign.LEFT, 0, 0, 0, 0), defaultTextFormat:new TextFormat("_sans", 11, 0, false, false, false, "", "", TextFormatAlign.LEFT, 0, 0, 0, 0), defaultDisabledTextFormat:new TextFormat("_sans", 11, 0x999999, false, false, false, "", "", TextFormatAlign.LEFT, 0, 0, 0, 0)};
public static var createAccessibilityImplementation:Function;
private static var focusManagers:Dictionary = new Dictionary(false);
public function UIComponent(){
version = "3.0.0.15";
isLivePreview = false;
invalidateFlag = false;
_enabled = true;
isFocused = false;
_focusEnabled = true;
_mouseFocusEnabled = true;
_imeMode = null;
_oldIMEMode = null;
errorCaught = false;
_inspector = false;
super();
instanceStyles = {};
sharedStyles = {};
invalidHash = {};
callLaterMethods = new Dictionary();
StyleManager.registerInstance(this);
configUI();
invalidate(InvalidationType.ALL);
tabEnabled = (this is IFocusManagerComponent);
focusRect = false;
if (tabEnabled){
addEventListener(FocusEvent.FOCUS_IN, focusInHandler);
addEventListener(FocusEvent.FOCUS_OUT, focusOutHandler);
addEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler);
addEventListener(KeyboardEvent.KEY_UP, keyUpHandler);
};
initializeFocusManager();
addEventListener(Event.ENTER_FRAME, hookAccessibility, false, 0, true);
}
public function drawFocus(_arg1:Boolean):void{
var _local2:Number;
isFocused = _arg1;
if (((!((uiFocusRect == null))) && (contains(uiFocusRect)))){
removeChild(uiFocusRect);
uiFocusRect = null;
};
if (_arg1){
uiFocusRect = (getDisplayObjectInstance(getStyleValue("focusRectSkin")) as Sprite);
if (uiFocusRect == null){
return;
};
_local2 = Number(getStyleValue("focusRectPadding"));
uiFocusRect.x = -(_local2);
uiFocusRect.y = -(_local2);
uiFocusRect.width = (width + (_local2 * 2));
uiFocusRect.height = (height + (_local2 * 2));
addChildAt(uiFocusRect, 0);
};
}
private function callLaterDispatcher(_arg1:Event):void{
var _local2:Dictionary;
var _local3:Object;
if (_arg1.type == Event.ADDED_TO_STAGE){
removeEventListener(Event.ADDED_TO_STAGE, callLaterDispatcher);
stage.addEventListener(Event.RENDER, callLaterDispatcher, false, 0, true);
stage.invalidate();
return;
};
_arg1.target.removeEventListener(Event.RENDER, callLaterDispatcher);
if (stage == null){
addEventListener(Event.ADDED_TO_STAGE, callLaterDispatcher, false, 0, true);
return;
};
inCallLaterPhase = true;
_local2 = callLaterMethods;
for (_local3 in _local2) {
_local3();
delete _local2[_local3];
};
inCallLaterPhase = false;
}
private function addedHandler(_arg1:Event):void{
removeEventListener("addedToStage", addedHandler);
initializeFocusManager();
}
protected function getStyleValue(_arg1:String):Object{
return (((instanceStyles[_arg1])==null) ? sharedStyles[_arg1] : instanceStyles[_arg1]);
}
protected function isOurFocus(_arg1:DisplayObject):Boolean{
return ((_arg1 == this));
}
override public function get scaleX():Number{
return ((width / startWidth));
}
override public function get scaleY():Number{
return ((height / startHeight));
}
override public function set height(_arg1:Number):void{
if (_height == _arg1){
return;
};
setSize(width, _arg1);
}
protected function keyDownHandler(_arg1:KeyboardEvent):void{
}
protected function focusInHandler(_arg1:FocusEvent):void{
var _local2:IFocusManager;
if (isOurFocus((_arg1.target as DisplayObject))){
_local2 = focusManager;
if (((_local2) && (_local2.showFocusIndicator))){
drawFocus(true);
isFocused = true;
};
};
}
public function setStyle(_arg1:String, _arg2:Object):void{
if ((((instanceStyles[_arg1] === _arg2)) && (!((_arg2 is TextFormat))))){
return;
};
instanceStyles[_arg1] = _arg2;
invalidate(InvalidationType.STYLES);
}
override public function get visible():Boolean{
return (super.visible);
}
public function get componentInspectorSetting():Boolean{
return (_inspector);
}
override public function get x():Number{
return ((isNaN(_x)) ? super.x : _x);
}
override public function get y():Number{
return ((isNaN(_y)) ? super.y : _y);
}
protected function setIMEMode(_arg1:Boolean){
var enabled = _arg1;
if (_imeMode != null){
if (enabled){
IME.enabled = true;
_oldIMEMode = IME.conversionMode;
try {
if (((!(errorCaught)) && (!((IME.conversionMode == IMEConversionMode.UNKNOWN))))){
IME.conversionMode = _imeMode;
};
errorCaught = false;
} catch(e:Error) {
errorCaught = true;
throw (new Error(("IME mode not supported: " + _imeMode)));
};
} else {
if (((!((IME.conversionMode == IMEConversionMode.UNKNOWN))) && (!((_oldIMEMode == IMEConversionMode.UNKNOWN))))){
IME.conversionMode = _oldIMEMode;
};
IME.enabled = false;
};
};
}
public function set enabled(_arg1:Boolean):void{
if (_arg1 == _enabled){
return;
};
_enabled = _arg1;
invalidate(InvalidationType.STATE);
}
public function setSharedStyle(_arg1:String, _arg2:Object):void{
if ((((sharedStyles[_arg1] === _arg2)) && (!((_arg2 is TextFormat))))){
return;
};
sharedStyles[_arg1] = _arg2;
if (instanceStyles[_arg1] == null){
invalidate(InvalidationType.STYLES);
};
}
protected function keyUpHandler(_arg1:KeyboardEvent):void{
}
public function set focusEnabled(_arg1:Boolean):void{
_focusEnabled = _arg1;
}
override public function set scaleX(_arg1:Number):void{
setSize((startWidth * _arg1), height);
}
public function get mouseFocusEnabled():Boolean{
return (_mouseFocusEnabled);
}
override public function set scaleY(_arg1:Number):void{
setSize(width, (startHeight * _arg1));
}
protected function getDisplayObjectInstance(_arg1:Object):DisplayObject{
var classDef:Object;
var skin = _arg1;
classDef = null;
if ((skin is Class)){
return ((new (skin) as DisplayObject));
};
if ((skin is DisplayObject)){
(skin as DisplayObject).x = 0;
(skin as DisplayObject).y = 0;
return ((skin as DisplayObject));
};
try {
classDef = getDefinitionByName(skin.toString());
} catch(e:Error) {
try {
classDef = (loaderInfo.applicationDomain.getDefinition(skin.toString()) as Object);
} catch(e:Error) {
};
};
if (classDef == null){
return (null);
};
return ((new (classDef) as DisplayObject));
}
protected function copyStylesToChild(_arg1:UIComponent, _arg2:Object):void{
var _local3:String;
for (_local3 in _arg2) {
_arg1.setStyle(_local3, getStyleValue(_arg2[_local3]));
};
}
protected function beforeComponentParameters():void{
}
protected function callLater(_arg1:Function):void{
if (inCallLaterPhase){
return;
};
callLaterMethods[_arg1] = true;
if (stage != null){
stage.addEventListener(Event.RENDER, callLaterDispatcher, false, 0, true);
stage.invalidate();
} else {
addEventListener(Event.ADDED_TO_STAGE, callLaterDispatcher, false, 0, true);
};
}
protected function createFocusManager():void{
if (focusManagers[stage] == null){
focusManagers[stage] = new FocusManager(stage);
};
}
override public function set visible(_arg1:Boolean):void{
var _local2:String;
if (super.visible == _arg1){
return;
};
super.visible = _arg1;
_local2 = (_arg1) ? ComponentEvent.SHOW : ComponentEvent.HIDE;
dispatchEvent(new ComponentEvent(_local2, true));
}
protected function hookAccessibility(_arg1:Event):void{
removeEventListener(Event.ENTER_FRAME, hookAccessibility);
initializeAccessibility();
}
public function set componentInspectorSetting(_arg1:Boolean):void{
_inspector = _arg1;
if (_inspector){
beforeComponentParameters();
} else {
afterComponentParameters();
};
}
override public function set x(_arg1:Number):void{
move(_arg1, _y);
}
public function drawNow():void{
draw();
}
override public function set y(_arg1:Number):void{
move(_x, _arg1);
}
protected function checkLivePreview():Boolean{
var className:String;
if (parent == null){
return (false);
};
try {
className = getQualifiedClassName(parent);
} catch(e:Error) {
};
return ((className == "fl.livepreview::LivePreviewParent"));
}
protected function focusOutHandler(_arg1:FocusEvent):void{
if (isOurFocus((_arg1.target as DisplayObject))){
drawFocus(false);
isFocused = false;
};
}
public function set mouseFocusEnabled(_arg1:Boolean):void{
_mouseFocusEnabled = _arg1;
}
public function getFocus():InteractiveObject{
if (stage){
return (stage.focus);
};
return (null);
}
protected function validate():void{
invalidHash = {};
}
override public function get height():Number{
return (_height);
}
public function invalidate(_arg1:String="all", _arg2:Boolean=true):void{
invalidHash[_arg1] = true;
if (_arg2){
this.callLater(draw);
};
}
public function get enabled():Boolean{
return (_enabled);
}
protected function getScaleX():Number{
return (super.scaleX);
}
protected function getScaleY():Number{
return (super.scaleY);
}
public function get focusEnabled():Boolean{
return (_focusEnabled);
}
protected function afterComponentParameters():void{
}
protected function draw():void{
if (isInvalid(InvalidationType.SIZE, InvalidationType.STYLES)){
if (((isFocused) && (focusManager.showFocusIndicator))){
drawFocus(true);
};
};
validate();
}
protected function configUI():void{
var _local1:Number;
var _local2:Number;
var _local3:Number;
isLivePreview = checkLivePreview();
_local1 = rotation;
rotation = 0;
_local2 = super.width;
_local3 = super.height;
var _local4 = 1;
super.scaleY = _local4;
super.scaleX = _local4;
setSize(_local2, _local3);
move(super.x, super.y);
rotation = _local1;
startWidth = _local2;
startHeight = _local3;
if (numChildren > 0){
removeChildAt(0);
};
}
protected function setScaleX(_arg1:Number):void{
super.scaleX = _arg1;
}
protected function setScaleY(_arg1:Number):void{
super.scaleY = _arg1;
}
private function initializeFocusManager():void{
if (stage == null){
addEventListener(Event.ADDED_TO_STAGE, addedHandler, false, 0, true);
} else {
createFocusManager();
};
}
public function set focusManager(_arg1:IFocusManager):void{
UIComponent.focusManagers[this] = _arg1;
}
public function clearStyle(_arg1:String):void{
setStyle(_arg1, null);
}
protected function isInvalid(_arg1:String, ... _args):Boolean{
if (((invalidHash[_arg1]) || (invalidHash[InvalidationType.ALL]))){
return (true);
};
while (_args.length > 0) {
if (invalidHash[_args.pop()]){
return (true);
};
};
return (false);
}
public function setSize(_arg1:Number, _arg2:Number):void{
_width = _arg1;
_height = _arg2;
invalidate(InvalidationType.SIZE);
dispatchEvent(new ComponentEvent(ComponentEvent.RESIZE, false));
}
override public function set width(_arg1:Number):void{
if (_width == _arg1){
return;
};
setSize(_arg1, height);
}
public function setFocus():void{
if (stage){
stage.focus = this;
};
}
protected function initializeAccessibility():void{
if (UIComponent.createAccessibilityImplementation != null){
UIComponent.createAccessibilityImplementation(this);
};
}
public function get focusManager():IFocusManager{
var _local1:DisplayObject;
_local1 = this;
while (_local1) {
if (UIComponent.focusManagers[_local1] != null){
return (IFocusManager(UIComponent.focusManagers[_local1]));
};
_local1 = _local1.parent;
};
return (null);
}
override public function get width():Number{
return (_width);
}
public function move(_arg1:Number, _arg2:Number):void{
_x = _arg1;
_y = _arg2;
super.x = Math.round(_arg1);
super.y = Math.round(_arg2);
dispatchEvent(new ComponentEvent(ComponentEvent.MOVE));
}
public function validateNow():void{
invalidate(InvalidationType.ALL, false);
draw();
}
public function getStyle(_arg1:String):Object{
return (instanceStyles[_arg1]);
}
public static function getStyleDefinition():Object{
return (defaultStyles);
}
public static function mergeStyles(... _args):Object{
var _local2:Object;
var _local3:uint;
var _local4:uint;
var _local5:Object;
var _local6:String;
_local2 = {};
_local3 = _args.length;
_local4 = 0;
while (_local4 < _local3) {
_local5 = _args[_local4];
for (_local6 in _local5) {
if (_local2[_local6] != null){
} else {
_local2[_local6] = _args[_local4][_local6];
};
};
_local4++;
};
return (_local2);
}
}
}//package fl.core
Section 41
//ColorPickerEvent (fl.events.ColorPickerEvent)
package fl.events {
import flash.events.*;
public class ColorPickerEvent extends Event {
protected var _color:uint;
public static const ITEM_ROLL_OUT:String = "itemRollOut";
public static const ITEM_ROLL_OVER:String = "itemRollOver";
public static const CHANGE:String = "change";
public static const ENTER:String = "enter";
public function ColorPickerEvent(_arg1:String, _arg2:uint){
super(_arg1, true);
_color = _arg2;
}
override public function toString():String{
return (formatToString("ColorPickerEvent", "type", "bubbles", "cancelable", "color"));
}
public function get color():uint{
return (_color);
}
override public function clone():Event{
return (new ColorPickerEvent(type, color));
}
}
}//package fl.events
Section 42
//ComponentEvent (fl.events.ComponentEvent)
package fl.events {
import flash.events.*;
public class ComponentEvent extends Event {
public static const HIDE:String = "hide";
public static const BUTTON_DOWN:String = "buttonDown";
public static const MOVE:String = "move";
public static const RESIZE:String = "resize";
public static const ENTER:String = "enter";
public static const LABEL_CHANGE:String = "labelChange";
public static const SHOW:String = "show";
public function ComponentEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false){
super(_arg1, _arg2, _arg3);
}
override public function toString():String{
return (formatToString("ComponentEvent", "type", "bubbles", "cancelable"));
}
override public function clone():Event{
return (new ComponentEvent(type, bubbles, cancelable));
}
}
}//package fl.events
Section 43
//InteractionInputType (fl.events.InteractionInputType)
package fl.events {
public class InteractionInputType {
public static const MOUSE:String = "mouse";
public static const KEYBOARD:String = "keyboard";
}
}//package fl.events
Section 44
//SliderEvent (fl.events.SliderEvent)
package fl.events {
import flash.events.*;
public class SliderEvent extends Event {
protected var _triggerEvent:String;
protected var _keyCode:Number;
protected var _value:Number;
protected var _clickTarget:String;
public static const CHANGE:String = "change";
public static const THUMB_PRESS:String = "thumbPress";
public static const THUMB_DRAG:String = "thumbDrag";
public static const THUMB_RELEASE:String = "thumbRelease";
public function SliderEvent(_arg1:String, _arg2:Number, _arg3:String, _arg4:String, _arg5:int=0){
_value = _arg2;
_keyCode = _arg5;
_triggerEvent = _arg4;
_clickTarget = _arg3;
super(_arg1);
}
public function get clickTarget():String{
return (_clickTarget);
}
override public function clone():Event{
return (new SliderEvent(type, _value, _clickTarget, _triggerEvent, _keyCode));
}
override public function toString():String{
return (formatToString("SliderEvent", "type", "value", "bubbles", "cancelable", "keyCode", "triggerEvent", "clickTarget"));
}
public function get triggerEvent():String{
return (_triggerEvent);
}
public function get value():Number{
return (_value);
}
public function get keyCode():Number{
return (_keyCode);
}
}
}//package fl.events
Section 45
//SliderEventClickTarget (fl.events.SliderEventClickTarget)
package fl.events {
public class SliderEventClickTarget {
public static const TRACK:String = "track";
public static const THUMB:String = "thumb";
}
}//package fl.events
Section 46
//FocusManager (fl.managers.FocusManager)
package fl.managers {
import flash.events.*;
import flash.display.*;
import fl.controls.*;
import fl.core.*;
import flash.utils.*;
import flash.text.*;
import flash.ui.*;
public class FocusManager implements IFocusManager {
private var focusableObjects:Dictionary;
private var _showFocusIndicator:Boolean;// = true
private var defButton:Button;
private var focusableCandidates:Array;
private var _form:DisplayObjectContainer;
private var _defaultButtonEnabled:Boolean;// = true
private var activated:Boolean;// = false
private var _defaultButton:Button;
private var calculateCandidates:Boolean;// = true
private var lastFocus:InteractiveObject;
private var lastAction:String;
public function FocusManager(_arg1:DisplayObjectContainer){
activated = false;
calculateCandidates = true;
_showFocusIndicator = true;
_defaultButtonEnabled = true;
super();
focusableObjects = new Dictionary(true);
if (_arg1 != null){
_form = _arg1;
addFocusables(DisplayObject(_arg1));
_arg1.addEventListener(Event.ADDED, addedHandler);
_arg1.addEventListener(Event.REMOVED, removedHandler);
activate();
};
}
public function get showFocusIndicator():Boolean{
return (_showFocusIndicator);
}
private function getIndexOfNextObject(_arg1:int, _arg2:Boolean, _arg3:Boolean, _arg4:String):int{
var _local5:int;
var _local6:int;
var _local7:DisplayObject;
var _local8:IFocusManagerGroup;
var _local9:int;
var _local10:DisplayObject;
var _local11:IFocusManagerGroup;
_local5 = focusableCandidates.length;
_local6 = _arg1;
while (true) {
if (_arg2){
_arg1--;
} else {
_arg1++;
};
if (_arg3){
if (((_arg2) && ((_arg1 < 0)))){
break;
};
if (((!(_arg2)) && ((_arg1 == _local5)))){
break;
};
} else {
_arg1 = ((_arg1 + _local5) % _local5);
if (_local6 == _arg1){
break;
};
};
if (isValidFocusCandidate(focusableCandidates[_arg1], _arg4)){
_local7 = DisplayObject(findFocusManagerComponent(focusableCandidates[_arg1]));
if ((_local7 is IFocusManagerGroup)){
_local8 = IFocusManagerGroup(_local7);
_local9 = 0;
while (_local9 < focusableCandidates.length) {
_local10 = focusableCandidates[_local9];
if ((_local10 is IFocusManagerGroup)){
_local11 = IFocusManagerGroup(_local10);
if ((((_local11.groupName == _local8.groupName)) && (_local11.selected))){
_arg1 = _local9;
break;
};
};
_local9++;
};
};
return (_arg1);
};
};
return (_arg1);
}
public function set form(_arg1:DisplayObjectContainer):void{
_form = _arg1;
}
private function addFocusables(_arg1:DisplayObject, _arg2:Boolean=false):void{
var focusable:IFocusManagerComponent;
var io:InteractiveObject;
var doc:DisplayObjectContainer;
var i:int;
var child:DisplayObject;
var o = _arg1;
var skipTopLevel = _arg2;
if (!skipTopLevel){
if ((o is IFocusManagerComponent)){
focusable = IFocusManagerComponent(o);
if (focusable.focusEnabled){
if (((focusable.tabEnabled) && (isTabVisible(o)))){
focusableObjects[o] = true;
calculateCandidates = true;
};
o.addEventListener(Event.TAB_ENABLED_CHANGE, tabEnabledChangeHandler);
o.addEventListener(Event.TAB_INDEX_CHANGE, tabIndexChangeHandler);
};
} else {
if ((o is InteractiveObject)){
io = (o as InteractiveObject);
if (((((io) && (io.tabEnabled))) && ((findFocusManagerComponent(io) == io)))){
focusableObjects[io] = true;
calculateCandidates = true;
};
io.addEventListener(Event.TAB_ENABLED_CHANGE, tabEnabledChangeHandler);
io.addEventListener(Event.TAB_INDEX_CHANGE, tabIndexChangeHandler);
};
};
};
if ((o is DisplayObjectContainer)){
doc = DisplayObjectContainer(o);
o.addEventListener(Event.TAB_CHILDREN_CHANGE, tabChildrenChangeHandler);
if ((((((doc is Stage)) || ((doc.parent is Stage)))) || (doc.tabChildren))){
i = 0;
while (i < doc.numChildren) {
try {
child = doc.getChildAt(i);
if (child != null){
addFocusables(doc.getChildAt(i));
};
} catch(error:SecurityError) {
};
i = (i + 1);
};
};
};
}
private function getChildIndex(_arg1:DisplayObjectContainer, _arg2:DisplayObject):int{
return (_arg1.getChildIndex(_arg2));
}
private function mouseFocusChangeHandler(_arg1:FocusEvent):void{
if ((_arg1.relatedObject is TextField)){
return;
};
_arg1.preventDefault();
}
private function focusOutHandler(_arg1:FocusEvent):void{
var _local2:InteractiveObject;
_local2 = (_arg1.target as InteractiveObject);
}
private function isValidFocusCandidate(_arg1:DisplayObject, _arg2:String):Boolean{
var _local3:IFocusManagerGroup;
if (!isEnabledAndVisible(_arg1)){
return (false);
};
if ((_arg1 is IFocusManagerGroup)){
_local3 = IFocusManagerGroup(_arg1);
if (_arg2 == _local3.groupName){
return (false);
};
};
return (true);
}
public function findFocusManagerComponent(_arg1:InteractiveObject):InteractiveObject{
var _local2:InteractiveObject;
_local2 = _arg1;
while (_arg1) {
if ((((_arg1 is IFocusManagerComponent)) && (IFocusManagerComponent(_arg1).focusEnabled))){
return (_arg1);
};
_arg1 = _arg1.parent;
};
return (_local2);
}
private function sortFocusableObjectsTabIndex():void{
var _local1:Object;
var _local2:InteractiveObject;
focusableCandidates = [];
for (_local1 in focusableObjects) {
_local2 = InteractiveObject(_local1);
if (((_local2.tabIndex) && (!(isNaN(Number(_local2.tabIndex)))))){
focusableCandidates.push(_local2);
};
};
focusableCandidates.sort(sortByTabIndex);
}
private function removeFocusables(_arg1:DisplayObject):void{
var _local2:Object;
var _local3:DisplayObject;
if ((_arg1 is DisplayObjectContainer)){
_arg1.removeEventListener(Event.TAB_CHILDREN_CHANGE, tabChildrenChangeHandler);
_arg1.removeEventListener(Event.TAB_INDEX_CHANGE, tabIndexChangeHandler);
for (_local2 in focusableObjects) {
_local3 = DisplayObject(_local2);
if (DisplayObjectContainer(_arg1).contains(_local3)){
if (_local3 == lastFocus){
lastFocus = null;
};
_local3.removeEventListener(Event.TAB_ENABLED_CHANGE, tabEnabledChangeHandler);
delete focusableObjects[_local2];
calculateCandidates = true;
};
};
};
}
private function addedHandler(_arg1:Event):void{
var _local2:DisplayObject;
_local2 = DisplayObject(_arg1.target);
if (_local2.stage){
addFocusables(DisplayObject(_arg1.target));
};
}
private function getTopLevelFocusTarget(_arg1:InteractiveObject):InteractiveObject{
while (_arg1 != InteractiveObject(form)) {
if ((((((((_arg1 is IFocusManagerComponent)) && (IFocusManagerComponent(_arg1).focusEnabled))) && (IFocusManagerComponent(_arg1).mouseFocusEnabled))) && (UIComponent(_arg1).enabled))){
return (_arg1);
};
_arg1 = _arg1.parent;
if (_arg1 == null){
break;
};
};
return (null);
}
private function tabChildrenChangeHandler(_arg1:Event):void{
var _local2:DisplayObjectContainer;
if (_arg1.target != _arg1.currentTarget){
return;
};
calculateCandidates = true;
_local2 = DisplayObjectContainer(_arg1.target);
if (_local2.tabChildren){
addFocusables(_local2, true);
} else {
removeFocusables(_local2);
};
}
public function sendDefaultButtonEvent():void{
defButton.dispatchEvent(new MouseEvent(MouseEvent.CLICK));
}
public function getFocus():InteractiveObject{
var _local1:InteractiveObject;
_local1 = form.stage.focus;
return (findFocusManagerComponent(_local1));
}
private function isEnabledAndVisible(_arg1:DisplayObject):Boolean{
var _local2:DisplayObjectContainer;
var _local3:TextField;
var _local4:SimpleButton;
_local2 = DisplayObject(form).parent;
while (_arg1 != _local2) {
if ((_arg1 is UIComponent)){
if (!UIComponent(_arg1).enabled){
return (false);
};
} else {
if ((_arg1 is TextField)){
_local3 = TextField(_arg1);
if ((((_local3.type == TextFieldType.DYNAMIC)) || (!(_local3.selectable)))){
return (false);
};
} else {
if ((_arg1 is SimpleButton)){
_local4 = SimpleButton(_arg1);
if (!_local4.enabled){
return (false);
};
};
};
};
if (!_arg1.visible){
return (false);
};
_arg1 = _arg1.parent;
};
return (true);
}
public function set defaultButton(_arg1:Button):void{
var _local2:Button;
_local2 = (_arg1) ? Button(_arg1) : null;
if (_local2 != _defaultButton){
if (_defaultButton){
_defaultButton.emphasized = false;
};
if (defButton){
defButton.emphasized = false;
};
_defaultButton = _local2;
defButton = _local2;
if (_local2){
_local2.emphasized = true;
};
};
}
private function deactivateHandler(_arg1:Event):void{
var _local2:InteractiveObject;
_local2 = InteractiveObject(_arg1.target);
}
public function setFocus(_arg1:InteractiveObject):void{
if ((_arg1 is IFocusManagerComponent)){
IFocusManagerComponent(_arg1).setFocus();
} else {
form.stage.focus = _arg1;
};
}
private function setFocusToNextObject(_arg1:FocusEvent):void{
var _local2:InteractiveObject;
if (!hasFocusableObjects()){
return;
};
_local2 = getNextFocusManagerComponent(_arg1.shiftKey);
if (_local2){
setFocus(_local2);
};
}
private function hasFocusableObjects():Boolean{
var _local1:Object;
for (_local1 in focusableObjects) {
return (true);
};
return (false);
}
private function tabIndexChangeHandler(_arg1:Event):void{
calculateCandidates = true;
}
private function sortFocusableObjects():void{
var _local1:Object;
var _local2:InteractiveObject;
focusableCandidates = [];
for (_local1 in focusableObjects) {
_local2 = InteractiveObject(_local1);
if (((((_local2.tabIndex) && (!(isNaN(Number(_local2.tabIndex)))))) && ((_local2.tabIndex > 0)))){
sortFocusableObjectsTabIndex();
return;
};
focusableCandidates.push(_local2);
};
focusableCandidates.sort(sortByDepth);
}
private function keyFocusChangeHandler(_arg1:FocusEvent):void{
showFocusIndicator = true;
if ((((((_arg1.keyCode == Keyboard.TAB)) || ((_arg1.keyCode == 0)))) && (!(_arg1.isDefaultPrevented())))){
setFocusToNextObject(_arg1);
_arg1.preventDefault();
};
}
private function getIndexOfFocusedObject(_arg1:DisplayObject):int{
var _local2:int;
var _local3:int;
_local2 = focusableCandidates.length;
_local3 = 0;
_local3 = 0;
while (_local3 < _local2) {
if (focusableCandidates[_local3] == _arg1){
return (_local3);
};
_local3++;
};
return (-1);
}
public function hideFocus():void{
}
private function removedHandler(_arg1:Event):void{
var _local2:int;
var _local3:DisplayObject;
var _local4:InteractiveObject;
_local3 = DisplayObject(_arg1.target);
if ((((_local3 is IFocusManagerComponent)) && ((focusableObjects[_local3] == true)))){
if (_local3 == lastFocus){
IFocusManagerComponent(lastFocus).drawFocus(false);
lastFocus = null;
};
_local3.removeEventListener(Event.TAB_ENABLED_CHANGE, tabEnabledChangeHandler);
delete focusableObjects[_local3];
calculateCandidates = true;
} else {
if ((((_local3 is InteractiveObject)) && ((focusableObjects[_local3] == true)))){
_local4 = (_local3 as InteractiveObject);
if (_local4){
if (_local4 == lastFocus){
lastFocus = null;
};
delete focusableObjects[_local4];
calculateCandidates = true;
};
_local3.addEventListener(Event.TAB_ENABLED_CHANGE, tabEnabledChangeHandler);
};
};
removeFocusables(_local3);
}
private function sortByDepth(_arg1:InteractiveObject, _arg2:InteractiveObject):Number{
var _local3:String;
var _local4:String;
var _local5:int;
var _local6:String;
var _local7:String;
var _local8:String;
var _local9:DisplayObject;
var _local10:DisplayObject;
_local3 = "";
_local4 = "";
_local8 = "0000";
_local9 = DisplayObject(_arg1);
_local10 = DisplayObject(_arg2);
while (((!((_local9 == DisplayObject(form)))) && (_local9.parent))) {
_local5 = getChildIndex(_local9.parent, _local9);
_local6 = _local5.toString(16);
if (_local6.length < 4){
_local7 = (_local8.substring(0, (4 - _local6.length)) + _local6);
};
_local3 = (_local7 + _local3);
_local9 = _local9.parent;
};
while (((!((_local10 == DisplayObject(form)))) && (_local10.parent))) {
_local5 = getChildIndex(_local10.parent, _local10);
_local6 = _local5.toString(16);
if (_local6.length < 4){
_local7 = (_local8.substring(0, (4 - _local6.length)) + _local6);
};
_local4 = (_local7 + _local4);
_local10 = _local10.parent;
};
return (((_local3 > _local4)) ? 1 : ((_local3 < _local4)) ? -1 : 0);
}
public function get defaultButton():Button{
return (_defaultButton);
}
private function activateHandler(_arg1:Event):void{
var _local2:InteractiveObject;
_local2 = InteractiveObject(_arg1.target);
if (lastFocus){
if ((lastFocus is IFocusManagerComponent)){
IFocusManagerComponent(lastFocus).setFocus();
} else {
form.stage.focus = lastFocus;
};
};
lastAction = "ACTIVATE";
}
public function showFocus():void{
}
public function set defaultButtonEnabled(_arg1:Boolean):void{
_defaultButtonEnabled = _arg1;
}
public function getNextFocusManagerComponent(_arg1:Boolean=false):InteractiveObject{
var _local2:DisplayObject;
var _local3:String;
var _local4:int;
var _local5:Boolean;
var _local6:int;
var _local7:int;
var _local8:IFocusManagerGroup;
if (!hasFocusableObjects()){
return (null);
};
if (calculateCandidates){
sortFocusableObjects();
calculateCandidates = false;
};
_local2 = form.stage.focus;
_local2 = DisplayObject(findFocusManagerComponent(InteractiveObject(_local2)));
_local3 = "";
if ((_local2 is IFocusManagerGroup)){
_local8 = IFocusManagerGroup(_local2);
_local3 = _local8.groupName;
};
_local4 = getIndexOfFocusedObject(_local2);
_local5 = false;
_local6 = _local4;
if (_local4 == -1){
if (_arg1){
_local4 = focusableCandidates.length;
};
_local5 = true;
};
_local7 = getIndexOfNextObject(_local4, _arg1, _local5, _local3);
return (findFocusManagerComponent(focusableCandidates[_local7]));
}
private function mouseDownHandler(_arg1:MouseEvent):void{
var _local2:InteractiveObject;
if (_arg1.isDefaultPrevented()){
return;
};
_local2 = getTopLevelFocusTarget(InteractiveObject(_arg1.target));
if (!_local2){
return;
};
showFocusIndicator = false;
if (((((!((_local2 == lastFocus))) || ((lastAction == "ACTIVATE")))) && (!((_local2 is TextField))))){
setFocus(_local2);
};
lastAction = "MOUSEDOWN";
}
private function isTabVisible(_arg1:DisplayObject):Boolean{
var _local2:DisplayObjectContainer;
_local2 = _arg1.parent;
while (((((_local2) && (!((_local2 is Stage))))) && (!(((_local2.parent) && ((_local2.parent is Stage))))))) {
if (!_local2.tabChildren){
return (false);
};
_local2 = _local2.parent;
};
return (true);
}
public function get nextTabIndex():int{
return (0);
}
private function keyDownHandler(_arg1:KeyboardEvent):void{
if (_arg1.keyCode == Keyboard.TAB){
lastAction = "KEY";
if (calculateCandidates){
sortFocusableObjects();
calculateCandidates = false;
};
};
if (((((((defaultButtonEnabled) && ((_arg1.keyCode == Keyboard.ENTER)))) && (defaultButton))) && (defButton.enabled))){
sendDefaultButtonEvent();
};
}
private function focusInHandler(_arg1:FocusEvent):void{
var _local2:InteractiveObject;
var _local3:Button;
_local2 = InteractiveObject(_arg1.target);
if (form.contains(_local2)){
lastFocus = findFocusManagerComponent(InteractiveObject(_local2));
if ((lastFocus is Button)){
_local3 = Button(lastFocus);
if (defButton){
defButton.emphasized = false;
defButton = _local3;
_local3.emphasized = true;
};
} else {
if (((defButton) && (!((defButton == _defaultButton))))){
defButton.emphasized = false;
defButton = _defaultButton;
_defaultButton.emphasized = true;
};
};
};
}
private function tabEnabledChangeHandler(_arg1:Event):void{
var _local2:InteractiveObject;
var _local3:Boolean;
calculateCandidates = true;
_local2 = InteractiveObject(_arg1.target);
_local3 = (focusableObjects[_local2] == true);
if (_local2.tabEnabled){
if (((!(_local3)) && (isTabVisible(_local2)))){
if (!(_local2 is IFocusManagerComponent)){
_local2.focusRect = false;
};
focusableObjects[_local2] = true;
};
} else {
if (_local3){
delete focusableObjects[_local2];
};
};
}
public function set showFocusIndicator(_arg1:Boolean):void{
_showFocusIndicator = _arg1;
}
public function get form():DisplayObjectContainer{
return (_form);
}
private function sortByTabIndex(_arg1:InteractiveObject, _arg2:InteractiveObject):int{
return (((_arg1.tabIndex > _arg2.tabIndex)) ? 1 : ((_arg1.tabIndex < _arg2.tabIndex)) ? -1 : sortByDepth(_arg1, _arg2));
}
public function activate():void{
if (activated){
return;
};
form.stage.addEventListener(FocusEvent.MOUSE_FOCUS_CHANGE, mouseFocusChangeHandler, false, 0, true);
form.stage.addEventListener(FocusEvent.KEY_FOCUS_CHANGE, keyFocusChangeHandler, false, 0, true);
form.addEventListener(FocusEvent.FOCUS_IN, focusInHandler, true);
form.addEventListener(FocusEvent.FOCUS_OUT, focusOutHandler, true);
form.stage.addEventListener(Event.ACTIVATE, activateHandler, false, 0, true);
form.stage.addEventListener(Event.DEACTIVATE, deactivateHandler, false, 0, true);
form.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
form.addEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler, true);
activated = true;
if (lastFocus){
setFocus(lastFocus);
};
}
public function deactivate():void{
form.stage.removeEventListener(FocusEvent.MOUSE_FOCUS_CHANGE, mouseFocusChangeHandler);
form.stage.removeEventListener(FocusEvent.KEY_FOCUS_CHANGE, keyFocusChangeHandler);
form.removeEventListener(FocusEvent.FOCUS_IN, focusInHandler, true);
form.removeEventListener(FocusEvent.FOCUS_OUT, focusOutHandler, true);
form.stage.removeEventListener(Event.ACTIVATE, activateHandler);
form.stage.removeEventListener(Event.DEACTIVATE, deactivateHandler);
form.removeEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
form.removeEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler, true);
activated = false;
}
public function get defaultButtonEnabled():Boolean{
return (_defaultButtonEnabled);
}
}
}//package fl.managers
Section 47
//IFocusManager (fl.managers.IFocusManager)
package fl.managers {
import flash.display.*;
import fl.controls.*;
public interface IFocusManager {
function getFocus():InteractiveObject;
function deactivate():void;
function set defaultButton(_arg1:Button):void;
function set showFocusIndicator(_arg1:Boolean):void;
function get defaultButtonEnabled():Boolean;
function get nextTabIndex():int;
function get defaultButton():Button;
function get showFocusIndicator():Boolean;
function setFocus(_arg1:InteractiveObject):void;
function activate():void;
function showFocus():void;
function set defaultButtonEnabled(_arg1:Boolean):void;
function hideFocus():void;
function findFocusManagerComponent(_arg1:InteractiveObject):InteractiveObject;
function getNextFocusManagerComponent(_arg1:Boolean=false):InteractiveObject;
}
}//package fl.managers
Section 48
//IFocusManagerComponent (fl.managers.IFocusManagerComponent)
package fl.managers {
public interface IFocusManagerComponent {
function set focusEnabled(_arg1:Boolean):void;
function drawFocus(_arg1:Boolean):void;
function setFocus():void;
function get focusEnabled():Boolean;
function get tabEnabled():Boolean;
function get tabIndex():int;
function get mouseFocusEnabled():Boolean;
}
}//package fl.managers
Section 49
//IFocusManagerGroup (fl.managers.IFocusManagerGroup)
package fl.managers {
public interface IFocusManagerGroup {
function set groupName(_arg1:String):void;
function set selected(_arg1:Boolean):void;
function get groupName():String;
function get selected():Boolean;
}
}//package fl.managers
Section 50
//StyleManager (fl.managers.StyleManager)
package fl.managers {
import fl.core.*;
import flash.utils.*;
import flash.text.*;
public class StyleManager {
private var globalStyles:Object;
private var classToDefaultStylesDict:Dictionary;
private var styleToClassesHash:Object;
private var classToStylesDict:Dictionary;
private var classToInstancesDict:Dictionary;
private static var _instance:StyleManager;
public function StyleManager(){
styleToClassesHash = {};
classToInstancesDict = new Dictionary(true);
classToStylesDict = new Dictionary(true);
classToDefaultStylesDict = new Dictionary(true);
globalStyles = UIComponent.getStyleDefinition();
}
public static function clearComponentStyle(_arg1:Object, _arg2:String):void{
var _local3:Class;
var _local4:Object;
_local3 = getClassDef(_arg1);
_local4 = getInstance().classToStylesDict[_local3];
if (((!((_local4 == null))) && (!((_local4[_arg2] == null))))){
delete _local4[_arg2];
invalidateComponentStyle(_local3, _arg2);
};
}
private static function getClassDef(_arg1:Object):Class{
var component = _arg1;
if ((component is Class)){
return ((component as Class));
};
try {
return ((getDefinitionByName(getQualifiedClassName(component)) as Class));
} catch(e:Error) {
if ((component is UIComponent)){
try {
return ((component.loaderInfo.applicationDomain.getDefinition(getQualifiedClassName(component)) as Class));
} catch(e:Error) {
};
};
};
return (null);
}
public static function clearStyle(_arg1:String):void{
setStyle(_arg1, null);
}
public static function setComponentStyle(_arg1:Object, _arg2:String, _arg3:Object):void{
var _local4:Class;
var _local5:Object;
_local4 = getClassDef(_arg1);
_local5 = getInstance().classToStylesDict[_local4];
if (_local5 == null){
_local5 = (getInstance().classToStylesDict[_local4] = {});
};
if (_local5 == _arg3){
return;
};
_local5[_arg2] = _arg3;
invalidateComponentStyle(_local4, _arg2);
}
private static function setSharedStyles(_arg1:UIComponent):void{
var _local2:StyleManager;
var _local3:Class;
var _local4:Object;
var _local5:String;
_local2 = getInstance();
_local3 = getClassDef(_arg1);
_local4 = _local2.classToDefaultStylesDict[_local3];
for (_local5 in _local4) {
_arg1.setSharedStyle(_local5, getSharedStyle(_arg1, _local5));
};
}
public static function getComponentStyle(_arg1:Object, _arg2:String):Object{
var _local3:Class;
var _local4:Object;
_local3 = getClassDef(_arg1);
_local4 = getInstance().classToStylesDict[_local3];
return (((_local4)==null) ? null : _local4[_arg2]);
}
private static function getInstance(){
if (_instance == null){
_instance = new (StyleManager);
};
return (_instance);
}
private static function invalidateComponentStyle(_arg1:Class, _arg2:String):void{
var _local3:Dictionary;
var _local4:Object;
var _local5:UIComponent;
_local3 = getInstance().classToInstancesDict[_arg1];
if (_local3 == null){
return;
};
for (_local4 in _local3) {
_local5 = (_local4 as UIComponent);
if (_local5 == null){
} else {
_local5.setSharedStyle(_arg2, getSharedStyle(_local5, _arg2));
};
};
}
private static function invalidateStyle(_arg1:String):void{
var _local2:Dictionary;
var _local3:Object;
_local2 = getInstance().styleToClassesHash[_arg1];
if (_local2 == null){
return;
};
for (_local3 in _local2) {
invalidateComponentStyle(Class(_local3), _arg1);
};
}
public static function registerInstance(_arg1:UIComponent):void{
var inst:StyleManager;
var classDef:Class;
var target:Class;
var defaultStyles:Object;
var styleToClasses:Object;
var n:String;
var instance = _arg1;
inst = getInstance();
classDef = getClassDef(instance);
if (classDef == null){
return;
};
if (inst.classToInstancesDict[classDef] == null){
inst.classToInstancesDict[classDef] = new Dictionary(true);
target = classDef;
while (defaultStyles == null) {
if (target["getStyleDefinition"] != null){
defaultStyles = target["getStyleDefinition"]();
break;
};
try {
target = (instance.loaderInfo.applicationDomain.getDefinition(getQualifiedSuperclassName(target)) as Class);
} catch(err:Error) {
try {
target = (getDefinitionByName(getQualifiedSuperclassName(target)) as Class);
} catch(e:Error) {
defaultStyles = UIComponent.getStyleDefinition();
break;
};
};
};
styleToClasses = inst.styleToClassesHash;
for (n in defaultStyles) {
if (styleToClasses[n] == null){
styleToClasses[n] = new Dictionary(true);
};
styleToClasses[n][classDef] = true;
};
inst.classToDefaultStylesDict[classDef] = defaultStyles;
inst.classToStylesDict[classDef] = {};
};
inst.classToInstancesDict[classDef][instance] = true;
setSharedStyles(instance);
}
public static function getStyle(_arg1:String):Object{
return (getInstance().globalStyles[_arg1]);
}
private static function getSharedStyle(_arg1:UIComponent, _arg2:String):Object{
var _local3:Class;
var _local4:StyleManager;
var _local5:Object;
_local3 = getClassDef(_arg1);
_local4 = getInstance();
_local5 = _local4.classToStylesDict[_local3][_arg2];
if (_local5 != null){
return (_local5);
};
_local5 = _local4.globalStyles[_arg2];
if (_local5 != null){
return (_local5);
};
return (_local4.classToDefaultStylesDict[_local3][_arg2]);
}
public static function setStyle(_arg1:String, _arg2:Object):void{
var _local3:Object;
_local3 = getInstance().globalStyles;
if ((((_local3[_arg1] === _arg2)) && (!((_arg2 is TextFormat))))){
return;
};
_local3[_arg1] = _arg2;
invalidateStyle(_arg1);
}
}
}//package fl.managers
Section 51
//1010_37 (spewer_fla.1010_37)
package spewer_fla {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.geom.*;
import flash.media.*;
import flash.system.*;
import flash.text.*;
import flash.net.*;
import flash.ui.*;
import flash.errors.*;
import flash.accessibility.*;
import flash.filters.*;
public dynamic class 1010_37 extends MovieClip {
public function 1010_37(){
addFrameScript(0, frame1);
}
function frame1(){
gotoAndPlay(Math.ceil((Math.random() * 10)));
}
}
}//package spewer_fla
Section 52
//2dlinkcontainer_31 (spewer_fla.2dlinkcontainer_31)
package spewer_fla {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.geom.*;
import flash.media.*;
import flash.system.*;
import flash.text.*;
import flash.net.*;
import flash.ui.*;
import flash.errors.*;
import flash.accessibility.*;
import flash.filters.*;
public dynamic class 2dlinkcontainer_31 extends MovieClip {
public var hitButton:SimpleButton;
public function 2dlinkcontainer_31(){
addFrameScript(0, frame1);
}
public function goto2D(_arg1:MouseEvent){
var req:URLRequest;
var e = _arg1;
req = new URLRequest("http://www.2DArray.net");
try {
navigateToURL(req, "_blank");
} catch(e:Error) {
trace("Navigate to URL failed", e.message);
};
}
function frame1(){
hitButton.addEventListener(MouseEvent.CLICK, goto2D);
}
}
}//package spewer_fla
Section 53
//ani1_187 (spewer_fla.ani1_187)
package spewer_fla {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.geom.*;
import flash.media.*;
import flash.system.*;
import flash.text.*;
import flash.net.*;
import flash.ui.*;
import flash.errors.*;
import flash.accessibility.*;
import flash.filters.*;
public dynamic class ani1_187 extends MovieClip {
public var anim:MovieClip;
public function ani1_187(){
addFrameScript(0, frame1);
}
function frame1(){
if (Math.random() < 0.8){
gotoAndStop(2);
} else {
gotoAndStop((Math.floor((Math.random() * 6)) + 3));
};
}
}
}//package spewer_fla
Section 54
//BGmoniters_185 (spewer_fla.BGmoniters_185)
package spewer_fla {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.geom.*;
import flash.media.*;
import flash.system.*;
import flash.text.*;
import flash.net.*;
import flash.ui.*;
import flash.errors.*;
import flash.accessibility.*;
import flash.filters.*;
public dynamic class BGmoniters_185 extends MovieClip {
public function BGmoniters_185(){
addFrameScript(0, frame1);
}
function frame1(){
gotoAndStop(Math.ceil((Math.random() * 4)));
}
}
}//package spewer_fla
Section 55
//body01_320 (spewer_fla.body01_320)
package spewer_fla {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.geom.*;
import flash.media.*;
import flash.system.*;
import flash.text.*;
import flash.net.*;
import flash.ui.*;
import flash.errors.*;
import flash.accessibility.*;
import flash.filters.*;
public dynamic class body01_320 extends MovieClip {
public function body01_320(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package spewer_fla
Section 56
//bodyparts_316 (spewer_fla.bodyparts_316)
package spewer_fla {
import flash.display.*;
public dynamic class bodyparts_316 extends MovieClip {
public var foot1:MovieClip;
public var foot2:MovieClip;
public var body:MovieClip;
public var tail1:MovieClip;
public var tail2:MovieClip;
}
}//package spewer_fla
Section 57
//chaptersonpause_161 (spewer_fla.chaptersonpause_161)
package spewer_fla {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.geom.*;
import flash.media.*;
import flash.system.*;
import flash.text.*;
import flash.net.*;
import flash.ui.*;
import flash.errors.*;
import flash.accessibility.*;
import flash.filters.*;
public dynamic class chaptersonpause_161 extends MovieClip {
public var chapters:MovieClip;
public function chaptersonpause_161(){
addFrameScript(0, frame1);
}
function frame1(){
visible = (root.gameMode == "story");
if (root.unlockedLevel <= 54){
chapters.gotoAndStop(1);
} else {
chapters.gotoAndStop(2);
};
}
}
}//package spewer_fla
Section 58
//cutscenefadeout_60 (spewer_fla.cutscenefadeout_60)
package spewer_fla {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.geom.*;
import flash.media.*;
import flash.system.*;
import flash.text.*;
import flash.net.*;
import flash.ui.*;
import flash.errors.*;
import flash.accessibility.*;
import flash.filters.*;
public dynamic class cutscenefadeout_60 extends MovieClip {
public function cutscenefadeout_60(){
addFrameScript(60, frame61);
}
function frame61(){
stop();
}
}
}//package spewer_fla
Section 59
//dblinkcontainer_41 (spewer_fla.dblinkcontainer_41)
package spewer_fla {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.geom.*;
import flash.media.*;
import flash.system.*;
import flash.text.*;
import flash.net.*;
import flash.ui.*;
import flash.errors.*;
import flash.accessibility.*;
import flash.filters.*;
public dynamic class dblinkcontainer_41 extends MovieClip {
public var hitButton:SimpleButton;
public function dblinkcontainer_41(){
addFrameScript(0, frame1);
}
public function gotoDB(_arg1:MouseEvent){
var req:URLRequest;
var e = _arg1;
req = new URLRequest("http://dbsoundworks.com/");
try {
navigateToURL(req, "_blank");
} catch(e:Error) {
trace("Navigate to URL failed", e.message);
};
}
function frame1(){
hitButton.addEventListener(MouseEvent.CLICK, gotoDB);
}
}
}//package spewer_fla
Section 60
//deletebox_52 (spewer_fla.deletebox_52)
package spewer_fla {
import flash.display.*;
import flash.text.*;
public dynamic class deletebox_52 extends MovieClip {
public var doneButton:SimpleButton;
public var textBox:TextField;
}
}//package spewer_fla
Section 61
//doc_195 (spewer_fla.doc_195)
package spewer_fla {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.geom.*;
import flash.media.*;
import flash.system.*;
import flash.text.*;
import flash.net.*;
import flash.ui.*;
import flash.errors.*;
import flash.accessibility.*;
import flash.filters.*;
public dynamic class doc_195 extends MovieClip {
public function doc_195(){
addFrameScript(173, frame174);
}
function frame174(){
parent.gotoAndStop(1);
}
}
}//package spewer_fla
Section 62
//doc_196 (spewer_fla.doc_196)
package spewer_fla {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.geom.*;
import flash.media.*;
import flash.system.*;
import flash.text.*;
import flash.net.*;
import flash.ui.*;
import flash.errors.*;
import flash.accessibility.*;
import flash.filters.*;
public dynamic class doc_196 extends MovieClip {
public function doc_196(){
addFrameScript(203, frame204);
}
function frame204(){
parent.gotoAndStop(1);
}
}
}//package spewer_fla
Section 63
//doc_197 (spewer_fla.doc_197)
package spewer_fla {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.geom.*;
import flash.media.*;
import flash.system.*;
import flash.text.*;
import flash.net.*;
import flash.ui.*;
import flash.errors.*;
import flash.accessibility.*;
import flash.filters.*;
public dynamic class doc_197 extends MovieClip {
public function doc_197(){
addFrameScript(76, frame77);
}
function frame77(){
parent.gotoAndStop(1);
}
}
}//package spewer_fla
Section 64
//doc_202 (spewer_fla.doc_202)
package spewer_fla {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.geom.*;
import flash.media.*;
import flash.system.*;
import flash.text.*;
import flash.net.*;
import flash.ui.*;
import flash.errors.*;
import flash.accessibility.*;
import flash.filters.*;
public dynamic class doc_202 extends MovieClip {
public var anim:MovieClip;
public function doc_202(){
addFrameScript(0, frame1);
}
function frame1(){
if (Math.random() < 0.8){
gotoAndStop(2);
} else {
gotoAndStop((Math.floor((Math.random() * 5)) + 3));
};
}
}
}//package spewer_fla
Section 65
//doc2_203 (spewer_fla.doc2_203)
package spewer_fla {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.geom.*;
import flash.media.*;
import flash.system.*;
import flash.text.*;
import flash.net.*;
import flash.ui.*;
import flash.errors.*;
import flash.accessibility.*;
import flash.filters.*;
public dynamic class doc2_203 extends MovieClip {
public function doc2_203(){
addFrameScript(12, frame13);
}
function frame13(){
parent.gotoAndStop(1);
}
}
}//package spewer_fla
Section 66
//doc2_212 (spewer_fla.doc2_212)
package spewer_fla {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.geom.*;
import flash.media.*;
import flash.system.*;
import flash.text.*;
import flash.net.*;
import flash.ui.*;
import flash.errors.*;
import flash.accessibility.*;
import flash.filters.*;
public dynamic class doc2_212 extends MovieClip {
public function doc2_212(){
addFrameScript(112, frame113);
}
function frame113(){
parent.gotoAndStop(1);
}
}
}//package spewer_fla
Section 67
//doc2_213 (spewer_fla.doc2_213)
package spewer_fla {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.geom.*;
import flash.media.*;
import flash.system.*;
import flash.text.*;
import flash.net.*;
import flash.ui.*;
import flash.errors.*;
import flash.accessibility.*;
import flash.filters.*;
public dynamic class doc2_213 extends MovieClip {
public function doc2_213(){
addFrameScript(61, frame62);
}
function frame62(){
parent.gotoAndStop(1);
}
}
}//package spewer_fla
Section 68
//doc2_215 (spewer_fla.doc2_215)
package spewer_fla {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.geom.*;
import flash.media.*;
import flash.system.*;
import flash.text.*;
import flash.net.*;
import flash.ui.*;
import flash.errors.*;
import flash.accessibility.*;
import flash.filters.*;
public dynamic class doc2_215 extends MovieClip {
public function doc2_215(){
addFrameScript(123, frame124);
}
function frame124(){
parent.gotoAndStop(1);
}
}
}//package spewer_fla
Section 69
//doc2_216 (spewer_fla.doc2_216)
package spewer_fla {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.geom.*;
import flash.media.*;
import flash.system.*;
import flash.text.*;
import flash.net.*;
import flash.ui.*;
import flash.errors.*;
import flash.accessibility.*;
import flash.filters.*;
public dynamic class doc2_216 extends MovieClip {
public function doc2_216(){
addFrameScript(107, frame108);
}
function frame108(){
parent.gotoAndStop(1);
}
}
}//package spewer_fla
Section 70
//doc2erace_217 (spewer_fla.doc2erace_217)
package spewer_fla {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.geom.*;
import flash.media.*;
import flash.system.*;
import flash.text.*;
import flash.net.*;
import flash.ui.*;
import flash.errors.*;
import flash.accessibility.*;
import flash.filters.*;
public dynamic class doc2erace_217 extends MovieClip {
public function doc2erace_217(){
addFrameScript(29, frame30);
}
function frame30(){
parent.gotoAndStop(1);
}
}
}//package spewer_fla
Section 71
//doc3_225 (spewer_fla.doc3_225)
package spewer_fla {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.geom.*;
import flash.media.*;
import flash.system.*;
import flash.text.*;
import flash.net.*;
import flash.ui.*;
import flash.errors.*;
import flash.accessibility.*;
import flash.filters.*;
public dynamic class doc3_225 extends MovieClip {
public var anim:MovieClip;
public function doc3_225(){
addFrameScript(0, frame1);
}
function frame1(){
if (Math.random() < 0.3){
gotoAndStop(2);
} else {
gotoAndStop((Math.floor((Math.random() * 6)) + 3));
};
}
}
}//package spewer_fla
Section 72
//doc3lab1_219 (spewer_fla.doc3lab1_219)
package spewer_fla {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.geom.*;
import flash.media.*;
import flash.system.*;
import flash.text.*;
import flash.net.*;
import flash.ui.*;
import flash.errors.*;
import flash.accessibility.*;
import flash.filters.*;
public dynamic class doc3lab1_219 extends MovieClip {
public function doc3lab1_219(){
addFrameScript(228, frame229);
}
function frame229(){
parent.gotoAndStop(1);
}
}
}//package spewer_fla
Section 73
//doc3upclose_238 (spewer_fla.doc3upclose_238)
package spewer_fla {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.geom.*;
import flash.media.*;
import flash.system.*;
import flash.text.*;
import flash.net.*;
import flash.ui.*;
import flash.errors.*;
import flash.accessibility.*;
import flash.filters.*;
public dynamic class doc3upclose_238 extends MovieClip {
public function doc3upclose_238(){
addFrameScript(58, frame59);
}
function frame59(){
parent.gotoAndStop(1);
parent.scaleX = -(parent.scaleX);
}
}
}//package spewer_fla
Section 74
//doc3upupclose1_236 (spewer_fla.doc3upupclose1_236)
package spewer_fla {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.geom.*;
import flash.media.*;
import flash.system.*;
import flash.text.*;
import flash.net.*;
import flash.ui.*;
import flash.errors.*;
import flash.accessibility.*;
import flash.filters.*;
public dynamic class doc3upupclose1_236 extends MovieClip {
public function doc3upupclose1_236(){
addFrameScript(262, frame263);
}
function frame263(){
parent.gotoAndStop(1);
parent.scaleX = -(parent.scaleX);
}
}
}//package spewer_fla
Section 75
//doc3walk1_226 (spewer_fla.doc3walk1_226)
package spewer_fla {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.geom.*;
import flash.media.*;
import flash.system.*;
import flash.text.*;
import flash.net.*;
import flash.ui.*;
import flash.errors.*;
import flash.accessibility.*;
import flash.filters.*;
public dynamic class doc3walk1_226 extends MovieClip {
public function doc3walk1_226(){
addFrameScript(119, frame120);
}
function frame120(){
parent.gotoAndStop(1);
parent.scaleX = -(parent.scaleX);
}
}
}//package spewer_fla
Section 76
//doc3walk2_228 (spewer_fla.doc3walk2_228)
package spewer_fla {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.geom.*;
import flash.media.*;
import flash.system.*;
import flash.text.*;
import flash.net.*;
import flash.ui.*;
import flash.errors.*;
import flash.accessibility.*;
import flash.filters.*;
public dynamic class doc3walk2_228 extends MovieClip {
public function doc3walk2_228(){
addFrameScript(119, frame120);
}
function frame120(){
parent.gotoAndStop(1);
parent.scaleX = -(parent.scaleX);
}
}
}//package spewer_fla
Section 77
//doc3walk3_231 (spewer_fla.doc3walk3_231)
package spewer_fla {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.geom.*;
import flash.media.*;
import flash.system.*;
import flash.text.*;
import flash.net.*;
import flash.ui.*;
import flash.errors.*;
import flash.accessibility.*;
import flash.filters.*;
public dynamic class doc3walk3_231 extends MovieClip {
public function doc3walk3_231(){
addFrameScript(199, frame200);
}
function frame200(){
parent.gotoAndStop(1);
parent.scaleX = -(parent.scaleX);
}
}
}//package spewer_fla
Section 78
//doc3walk4_233 (spewer_fla.doc3walk4_233)
package spewer_fla {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.geom.*;
import flash.media.*;
import flash.system.*;
import flash.text.*;
import flash.net.*;
import flash.ui.*;
import flash.errors.*;
import flash.accessibility.*;
import flash.filters.*;
public dynamic class doc3walk4_233 extends MovieClip {
public function doc3walk4_233(){
addFrameScript(174, frame175);
}
function frame175(){
parent.gotoAndStop(1);
parent.scaleX = -(parent.scaleX);
}
}
}//package spewer_fla
Section 79
//doc3walk5_239 (spewer_fla.doc3walk5_239)
package spewer_fla {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.geom.*;
import flash.media.*;
import flash.system.*;
import flash.text.*;
import flash.net.*;
import flash.ui.*;
import flash.errors.*;
import flash.accessibility.*;
import flash.filters.*;
public dynamic class doc3walk5_239 extends MovieClip {
public function doc3walk5_239(){
addFrameScript(89, frame90);
}
function frame90(){
parent.gotoAndStop(1);
parent.scaleX = -(parent.scaleX);
}
}
}//package spewer_fla
Section 80
//doc4_218 (spewer_fla.doc4_218)
package spewer_fla {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.geom.*;
import flash.media.*;
import flash.system.*;
import flash.text.*;
import flash.net.*;
import flash.ui.*;
import flash.errors.*;
import flash.accessibility.*;
import flash.filters.*;
public dynamic class doc4_218 extends MovieClip {
public var anim:MovieClip;
public function doc4_218(){
addFrameScript(0, frame1);
}
function frame1(){
if (Math.random() < 0.7){
gotoAndStop(2);
} else {
gotoAndStop((Math.floor((Math.random() * 5)) + 3));
};
}
}
}//package spewer_fla
Section 81
//doc4_220 (spewer_fla.doc4_220)
package spewer_fla {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.geom.*;
import flash.media.*;
import flash.system.*;
import flash.text.*;
import flash.net.*;
import flash.ui.*;
import flash.errors.*;
import flash.accessibility.*;
import flash.filters.*;
public dynamic class doc4_220 extends MovieClip {
public function doc4_220(){
addFrameScript(80, frame81);
}
function frame81(){
parent.gotoAndStop(1);
}
}
}//package spewer_fla
Section 82
//doc4_222 (spewer_fla.doc4_222)
package spewer_fla {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.geom.*;
import flash.media.*;
import flash.system.*;
import flash.text.*;
import flash.net.*;
import flash.ui.*;
import flash.errors.*;
import flash.accessibility.*;
import flash.filters.*;
public dynamic class doc4_222 extends MovieClip {
public function doc4_222(){
addFrameScript(80, frame81);
}
function frame81(){
parent.gotoAndStop(1);
}
}
}//package spewer_fla
Section 83
//doc4lab4_223 (spewer_fla.doc4lab4_223)
package spewer_fla {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.geom.*;
import flash.media.*;
import flash.system.*;
import flash.text.*;
import flash.net.*;
import flash.ui.*;
import flash.errors.*;
import flash.accessibility.*;
import flash.filters.*;
public dynamic class doc4lab4_223 extends MovieClip {
public function doc4lab4_223(){
addFrameScript(58, frame59);
}
function frame59(){
parent.gotoAndStop(1);
}
}
}//package spewer_fla
Section 84
//doc4lab5_224 (spewer_fla.doc4lab5_224)
package spewer_fla {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.geom.*;
import flash.media.*;
import flash.system.*;
import flash.text.*;
import flash.net.*;
import flash.ui.*;
import flash.errors.*;
import flash.accessibility.*;
import flash.filters.*;
public dynamic class doc4lab5_224 extends MovieClip {
public function doc4lab5_224(){
addFrameScript(69, frame70);
}
function frame70(){
parent.gotoAndStop(1);
}
}
}//package spewer_fla
Section 85
//dochitskeys2_199 (spewer_fla.dochitskeys2_199)
package spewer_fla {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.geom.*;
import flash.media.*;
import flash.system.*;
import flash.text.*;
import flash.net.*;
import flash.ui.*;
import flash.errors.*;
import flash.accessibility.*;
import flash.filters.*;
public dynamic class dochitskeys2_199 extends MovieClip {
public function dochitskeys2_199(){
addFrameScript(165, frame166);
}
function frame166(){
parent.gotoAndStop(1);
}
}
}//package spewer_fla
Section 86
//docmashkeys3_200 (spewer_fla.docmashkeys3_200)
package spewer_fla {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.geom.*;
import flash.media.*;
import flash.system.*;
import flash.text.*;
import flash.net.*;
import flash.ui.*;
import flash.errors.*;
import flash.accessibility.*;
import flash.filters.*;
public dynamic class docmashkeys3_200 extends MovieClip {
public function docmashkeys3_200(){
addFrameScript(285, frame286);
}
function frame286(){
parent.gotoAndStop(1);
}
}
}//package spewer_fla
Section 87
//docpacingcutscene_241 (spewer_fla.docpacingcutscene_241)
package spewer_fla {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.geom.*;
import flash.media.*;
import flash.system.*;
import flash.text.*;
import flash.net.*;
import flash.ui.*;
import flash.errors.*;
import flash.accessibility.*;
import flash.filters.*;
public dynamic class docpacingcutscene_241 extends MovieClip {
public var anim:MovieClip;
public function docpacingcutscene_241(){
addFrameScript(0, frame1);
}
function frame1(){
if (Math.random() < 0.3){
gotoAndStop(2);
} else {
gotoAndStop((Math.floor((Math.random() * 6)) + 3));
};
}
}
}//package spewer_fla
Section 88
//docsleepingatdesk_201 (spewer_fla.docsleepingatdesk_201)
package spewer_fla {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.geom.*;
import flash.media.*;
import flash.system.*;
import flash.text.*;
import flash.net.*;
import flash.ui.*;
import flash.errors.*;
import flash.accessibility.*;
import flash.filters.*;
public dynamic class docsleepingatdesk_201 extends MovieClip {
public function docsleepingatdesk_201(){
addFrameScript(50, frame51);
}
function frame51(){
parent.gotoAndStop(1);
}
}
}//package spewer_fla
Section 89
//doctoranims_186 (spewer_fla.doctoranims_186)
package spewer_fla {
import flash.display.*;
public dynamic class doctoranims_186 extends MovieClip {
public var mainAnim:MovieClip;
}
}//package spewer_fla
Section 90
//doctyping_188 (spewer_fla.doctyping_188)
package spewer_fla {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.geom.*;
import flash.media.*;
import flash.system.*;
import flash.text.*;
import flash.net.*;
import flash.ui.*;
import flash.errors.*;
import flash.accessibility.*;
import flash.filters.*;
public dynamic class doctyping_188 extends MovieClip {
public function doctyping_188(){
addFrameScript(138, frame139);
}
function frame139(){
parent.gotoAndStop(1);
}
}
}//package spewer_fla
Section 91
//editorHUD_176 (spewer_fla.editorHUD_176)
package spewer_fla {
import flash.display.*;
import flash.text.*;
public dynamic class editorHUD_176 extends MovieClip {
public var toolTip:TextField;
}
}//package spewer_fla
Section 92
//edlinkcontainer_30 (spewer_fla.edlinkcontainer_30)
package spewer_fla {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.geom.*;
import flash.media.*;
import flash.system.*;
import flash.text.*;
import flash.net.*;
import flash.ui.*;
import flash.errors.*;
import flash.accessibility.*;
import flash.filters.*;
public dynamic class edlinkcontainer_30 extends MovieClip {
public var hitButton:SimpleButton;
public function edlinkcontainer_30(){
addFrameScript(0, frame1);
}
public function gotoEd(_arg1:MouseEvent){
var req:URLRequest;
var e = _arg1;
req = new URLRequest("http://www.edmundm.com");
try {
navigateToURL(req, "_blank");
} catch(e:Error) {
trace("Navigate to URL failed", e.message);
};
}
function frame1(){
hitButton.addEventListener(MouseEvent.CLICK, gotoEd);
}
}
}//package spewer_fla
Section 93
//erasefailed_55 (spewer_fla.erasefailed_55)
package spewer_fla {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.geom.*;
import flash.media.*;
import flash.system.*;
import flash.text.*;
import flash.net.*;
import flash.ui.*;
import flash.errors.*;
import flash.accessibility.*;
import flash.filters.*;
public dynamic class erasefailed_55 extends MovieClip {
public function erasefailed_55(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package spewer_fla
Section 94
//erasesuccess_54 (spewer_fla.erasesuccess_54)
package spewer_fla {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.geom.*;
import flash.media.*;
import flash.system.*;
import flash.text.*;
import flash.net.*;
import flash.ui.*;
import flash.errors.*;
import flash.accessibility.*;
import flash.filters.*;
public dynamic class erasesuccess_54 extends MovieClip {
public function erasesuccess_54(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package spewer_fla
Section 95
//face01_322 (spewer_fla.face01_322)
package spewer_fla {
import flash.display.*;
public dynamic class face01_322 extends MovieClip {
public var eye2:MovieClip;
public var eye1:MovieClip;
public var munch:MovieClip;
}
}//package spewer_fla
Section 96
//face01gish_335 (spewer_fla.face01gish_335)
package spewer_fla {
import flash.display.*;
public dynamic class face01gish_335 extends MovieClip {
public var eye2:MovieClip;
public var eye1:MovieClip;
public var munch:MovieClip;
}
}//package spewer_fla
Section 97
//face01red_326 (spewer_fla.face01red_326)
package spewer_fla {
import flash.display.*;
public dynamic class face01red_326 extends MovieClip {
public var eye2:MovieClip;
public var eye1:MovieClip;
public var munch:MovieClip;
}
}//package spewer_fla
Section 98
//face01yellow_339 (spewer_fla.face01yellow_339)
package spewer_fla {
import flash.display.*;
public dynamic class face01yellow_339 extends MovieClip {
public var eye2:MovieClip;
public var eye1:MovieClip;
public var munch:MovieClip;
}
}//package spewer_fla
Section 99
//facewhite_331 (spewer_fla.facewhite_331)
package spewer_fla {
import flash.display.*;
public dynamic class facewhite_331 extends MovieClip {
public var eye2:MovieClip;
public var eye1:MovieClip;
public var munch:MovieClip;
}
}//package spewer_fla
Section 100
//facewhole_321 (spewer_fla.facewhole_321)
package spewer_fla {
import flash.display.*;
public dynamic class facewhole_321 extends MovieClip {
public var face:MovieClip;
}
}//package spewer_fla
Section 101
//introsong_59 (spewer_fla.introsong_59)
package spewer_fla {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.geom.*;
import flash.media.*;
import flash.system.*;
import flash.text.*;
import flash.net.*;
import flash.ui.*;
import flash.errors.*;
import flash.accessibility.*;
import flash.filters.*;
public dynamic class introsong_59 extends MovieClip {
public function introsong_59(){
addFrameScript(0, frame1, 769, frame770);
}
function frame1(){
stop();
}
function frame770(){
gotoAndPlay(2);
}
}
}//package spewer_fla
Section 102
//jflinkcontainer_36 (spewer_fla.jflinkcontainer_36)
package spewer_fla {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.geom.*;
import flash.media.*;
import flash.system.*;
import flash.text.*;
import flash.net.*;
import flash.ui.*;
import flash.errors.*;
import flash.accessibility.*;
import flash.filters.*;
public dynamic class jflinkcontainer_36 extends MovieClip {
public var hitButton:SimpleButton;
public function jflinkcontainer_36(){
addFrameScript(0, frame1);
}
function frame1(){
hitButton.addEventListener(MouseEvent.CLICK, gotoJF);
}
public function gotoJF(_arg1:MouseEvent){
var req:URLRequest;
var e = _arg1;
req = new URLRequest("http://jordanfehr.tumblr.com");
try {
navigateToURL(req, "_blank");
} catch(e:Error) {
trace("Navigate to URL failed", e.message);
};
}
}
}//package spewer_fla
Section 103
//levelproperties_163 (spewer_fla.levelproperties_163)
package spewer_fla {
import flash.events.*;
import flash.display.*;
import fl.controls.*;
import flash.utils.*;
import flash.geom.*;
import flash.media.*;
import flash.system.*;
import flash.text.*;
import flash.net.*;
import flash.ui.*;
import flash.errors.*;
import flash.accessibility.*;
import flash.filters.*;
public dynamic class levelproperties_163 extends MovieClip {
public var defaultPuke:Slider;
public var levelName:TextField;
public function levelproperties_163(){
__setProp_defaultPuke_levelproperties_Layer1_1();
}
function __setProp_defaultPuke_levelproperties_Layer1_1(){
try {
defaultPuke["componentInspectorSetting"] = true;
} catch(e:Error) {
};
defaultPuke.direction = "horizontal";
defaultPuke.enabled = true;
defaultPuke.liveDragging = true;
defaultPuke.maximum = 100;
defaultPuke.minimum = 0;
defaultPuke.snapInterval = 1;
defaultPuke.tickInterval = 0;
defaultPuke.value = 0;
defaultPuke.visible = true;
try {
defaultPuke["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
}
}//package spewer_fla
Section 104
//loadingscreen_35 (spewer_fla.loadingscreen_35)
package spewer_fla {
import flash.display.*;
public dynamic class loadingscreen_35 extends MovieClip {
public var cont:SimpleButton;
public var poop:MovieClip;
}
}//package spewer_fla
Section 105
//MainTimeline (spewer_fla.MainTimeline)
package spewer_fla {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import com.kongregate.as3.client.*;
import flash.geom.*;
import com.dynamicflash.util.*;
import flash.media.*;
import flash.system.*;
import flash.text.*;
import flash.net.*;
import flash.ui.*;
import flash.errors.*;
import flash.accessibility.*;
import flash.filters.*;
public dynamic class MainTimeline extends MovieClip {
public var finishedVarInit;
public var spacialRecip;
public var pukeForce;
public var pukeTransform;
public var extra;
public var showBG;
public var slurpTransform;
public var checkingFluid;
public var totalVomit;
public var waterTransform;
public var skipIntro;
public var slurpVolume;
public var death1;
public var death3;
public var death4;
public var death2;
public var pukeColTrans;
public var P;
public var oldSquish;
public var spacialSize;
public var vy1p;
public var c;
public var V;
public var partID;
public var i:int;
public var j:int;
public var bytes;
public var m:int;
public var n;
public var q:int;
public var sounding;
public var e:MouseEvent;
public var tilesClip;
public var cy;
public var jumpingSound;
public var cx;
public var gHeight;
public var loadWidth;
public var s;
public var pukeColor;
public var r;
public var vy2p;
public var spewerIsDead;
public var myMatrix;
public var k:int;
public var l:int;
public var acidLoopSound;
public var stats;
public var vx1p;
public var dy:Number;
public var cBody;
public var slurpSound;
public var gameMode;
public var keysDown;
public var vx2p;
public var dx:Number;
public var tooltips;
public var HUD;
public var tipMode;
public var acidTiles;
public var go;
public var API_Settings:Object;
public var acidTile;
public var tilesBitmap;
public var endingClip;
public var musicDullSound;
public var id;
public var sound;
public var ii;
public var cPuke;
public var objects;
public var genericTile;
public var stageX;
public var stageY;
public var spikes;
public var edChange;
public var partLen;
public var steams;
public var defaultType;
public var tar2:Object;
public var bgClip;
public var landingSound;
public var tar1:Object;
public var musicStart;
public var jj;
public var chapterEnd;
public var fgBitmap;
public var splashes;
public var map;
public var menu:MovieClip;
public var clicking;
public var genericMask;
public var medal_popup:MovieClip;
public var editor;
public var bubbles;
public var jumpingChannel;
public var tilesX;
public var tilesY;
public var kk;
public var defaultParticles;
public var ll;
public var currentLevel;
public var acidChannel;
public var activeVomit;
public var emptyTile;
public var backgroundClip;
public var gWidth;
public var dist:Number;
public var mm;
public var loadHeight;
public var cTile;
public var bgBitmap;
public var rot;
public var kongregate:KongregateAPI;
public var q2;
public var pukeChannel;
public var musicSound;
public var ph;
public var redrawSwitches;
public var jumps;
public var teleBaseX;
public var dx2;
public var pukeVolume;
public var tempBitmap;
public var s2;
public var blankTile;
public var pukeSound;
public var tileDisplay;
public var constraints;
public var levelWinSound;
public var stroke;
public var acidVolume;
public var waterSound;
public var dy2;
public var newArrow;
public var jumpSoundTimer;
public var gravity;
public var zones;
public var telePos;
public var sh;
public var acidParticle;
public var oQual;
public var unlockedLevel;
public var sw;
public var tileTypes;
public var intro:MovieClip;
public var musicDullTransform;
public var hitJump;
public var edSubMode;
public var pukeAlpha;
public var teleRun;
public var tx;
public var ty;
public var cookie;
public var doors;
public var musicDullChannel;
public var sina;
public var resetScreen;
public var particles;
public var playerKilled;
public var musicTransform;
public var cDoor;
public var rise;
public var oTelePos;
public var damp;
public var edMode;
public var switches;
public var filterClip;
public var landingChannel;
public var particleClip;
public var cHero;
public var time1;
public var time2;
public var pauseGame;
public var waterVolume;
public var landingTransform;
public var musicChannel;
public var poofs;
public var levelCompleted;
public var slurpChannel;
public var steps;
public var acidTransform;
public var teleLength;
public var cTail2;
public var cTail1;
public var dist2;
public var defaultVomit;
public var fadeout:MovieClip;
public var defaultLevelNames;
public var particleBitmap;
public var color;
public var tileX;
public var blink;
public var partSet;
public var tileY;
public var pukeKickback;
public var resetLevel;
public var conv1;
public var intros:MovieClip;
public var cutscene;
public var conv2;
public var defaultObjects;
public var acidDeathSound;
public var fgFilter;
public var heroSpawn;
public var click1;
public var click2;
public var tar;
public var fgClip;
public var decay;
public var genericDraw;
public var newgroundsAPIconnector:MovieClip;
public var cosa;
public var mapBoxes;
public var movingTiles;
public var cBack;
public var waterChannel;
public var game;
public function MainTimeline(){
addFrameScript(0, frame1, 1, frame2);
}
public function eFrame(_arg1:Event){
HUD.levelProps.radios.dot.x = (HUD.levelProps.radios.greenRadio.group.selection.x + (HUD.levelProps.radios.greenRadio.group.selection.width / 2));
HUD.levelProps.radios.dot.y = (HUD.levelProps.radios.greenRadio.group.selection.y + (HUD.levelProps.radios.greenRadio.group.selection.height / 2));
if (endingClip != undefined){
if (endingClip.currentFrame == endingClip.totalFrames){
removeChild(endingClip);
endingClip = undefined;
medal_popup.unlockMedal("Conclusion");
returnToMenu();
};
};
if ((((((editor == false)) && ((((showBG == false)) && (!((chapterEnd == true))))))) && (!((cBack == undefined))))){
game.removeChild(this[cBack]);
this[cBack] = null;
cBack = undefined;
};
if ((((((editor == false)) && ((((showBG == true)) || ((chapterEnd == true)))))) && ((cBack == undefined)))){
this[("bg" + q)] = new backgroundAnimation();
cBack = ("bg" + q);
game.addChild(this[cBack]);
this[("bg" + q)].doc.gotoAndStop((1 + Math.floor((Math.random() * 4))));
game.setChildIndex(this[cBack], 0);
q++;
};
if (mapBoxes.length != 0){
HUD.mapScreen.levelNameDisp.text = "";
i = 0;
while (i < mapBoxes.length) {
tar = this[mapBoxes[i]];
if (HUD.mapScreen.y != 0){
HUD.mapScreen.removeChild(tar);
this[mapBoxes[i]] = null;
mapBoxes.splice(i, 1);
i--;
} else {
if (tar.currentFrame == 2){
if (tar.anim.hitTestPoint(mouseX, mouseY)){
tar.anim.gotoAndStop(2);
HUD.mapScreen.levelNameDisp.text = findLevelName(tar.index);
if (clicking){
mapBoxes = new Array();
currentLevel = tar.index;
j = 0;
while (j < mapBoxes.length) {
this[mapBoxes[j]] = undefined;
j++;
};
stats = undefined;
if (HUD.mapScreen.statDisp != undefined){
stats = HUD.mapScreen.statDisp.htmlText;
};
j = HUD.mapScreen.currentFrame;
destroy(false);
map = undefined;
setup();
HUD.mapScreen.gotoAndStop(j);
HUD.mapScreen.y = 0;
HUD.mapScreen.settle = true;
if (stats != undefined){
HUD.mapScreen.statDisp.htmlText = stats;
stats = undefined;
};
};
} else {
tar.anim.gotoAndStop(1);
};
};
if (tar.currentFrame == 3){
if (tar.boxLighten.hitTestPoint(mouseX, mouseY)){
tar.boxLighten.gotoAndStop(2);
tar.anim.play();
HUD.mapScreen.levelNameDisp.text = findLevelName(tar.index);
if (clicking){
mapBoxes = new Array();
currentLevel = tar.index;
j = 0;
while (j < mapBoxes.length) {
this[mapBoxes[j]] = undefined;
j++;
};
stats = undefined;
if (HUD.mapScreen.statDisp != undefined){
stats = HUD.mapScreen.statDisp.htmlText;
};
j = HUD.mapScreen.currentFrame;
destroy(false);
map = undefined;
setup();
HUD.mapScreen.gotoAndStop(j);
HUD.mapScreen.y = 0;
HUD.mapScreen.settle = true;
if (((!((stats == undefined))) && (!((HUD.mapScreen.statDisp == undefined))))){
HUD.mapScreen.statDisp.htmlText = stats;
};
break;
};
} else {
tar.boxLighten.gotoAndStop(1);
};
};
if (mapBoxes.length > 0){
if (tar.i <= 10){
tar.visible = ((tar.i % 2) == 0);
} else {
tar.visible = false;
};
if (tar.i > 0){
tar.i--;
};
if (Math.random() < 0.002){
tar.visible = (tar.visible == false);
};
};
};
i++;
};
clicking = false;
};
if (pauseGame == false){
jumpSoundTimer--;
if (cBody != undefined){
cBody.rise = (cBody.rise + 0.5);
cBody.run = (cBody.run * 0.98);
cBody.rotation = (cBody.rotation + cBody.run);
cBody.x = (cBody.x + cBody.run);
cBody.y = (cBody.y + cBody.rise);
cTail1.rise = (cTail1.rise + 0.3);
cTail1.run = (cTail1.run * 0.98);
cTail1.rotation = (cTail1.rotation + cTail1.run);
cTail1.x = (cTail1.x + cTail1.run);
cTail1.y = (cTail1.y + cTail1.rise);
dx = (cBody.x - cTail1.x);
dy = (cBody.y - cTail1.y);
dist = (Math.sqrt(((dx * dx) + (dy * dy))) - 14);
rot = Math.atan2(dy, dx);
cTail1.x = (cTail1.x + (Math.cos(rot) * dist));
cTail1.y = (cTail1.y + (Math.sin(rot) * dist));
cTail1.run = (cTail1.run + ((Math.cos(rot) * dist) / 3));
cTail1.rise = (cTail1.rise + ((Math.sin(rot) * dist) / 3));
cTail2.rise = (cTail2.rise + 0.3);
cTail2.run = (cTail2.run * 0.98);
cTail2.rotation = (cTail2.rotation + cTail2.run);
cTail2.x = (cTail2.x + cTail2.run);
cTail2.y = (cTail2.y + cTail2.rise);
dx = (cTail1.x - cTail2.x);
dy = (cTail1.y - cTail2.y);
dist = (Math.sqrt(((dx * dx) + (dy * dy))) - 6);
rot = Math.atan2(dy, dx);
cTail2.x = (cTail2.x + (Math.cos(rot) * dist));
cTail2.y = (cTail2.y + (Math.sin(rot) * dist));
cTail2.run = (cTail2.run + ((Math.cos(rot) * dist) / 3));
cTail2.rise = (cTail2.rise + ((Math.sin(rot) * dist) / 3));
if (cBody.y > stageY){
spewerIsDead = true;
resetLevel = true;
resetScreen = undefined;
HUD.mapScreen.gotoAndStop(4);
};
};
if (cutscene != true){
i = 0;
while (i < steams.length) {
tar = this[steams[i]];
if (tar.currentFrame == 20){
game.removeChild(tar);
this[steams[i]] = null;
steams.splice(i, 1);
i--;
};
i++;
};
i = 0;
while (i < poofs.length) {
tar = this[poofs[i]];
if (tar.virgin == undefined){
tar.virgin = false;
} else {
if (tar.anim.currentFrame == 21){
game.removeChild(tar);
this[poofs[i]] = null;
poofs.splice(i, 1);
i--;
};
};
i++;
};
if (editor == true){
if (edMode == 0){
tileDisplay.tiles.x = (tileDisplay.tiles.x + (((((-(cTile) * tileX) + tileX) + 60) - tileDisplay.tiles.x) / 3));
} else {
if (edMode == 1){
tileDisplay.tiles.x = (tileDisplay.tiles.x + (-(tileDisplay.tiles.x) / 3));
} else {
if (edMode == 2){
tileDisplay.tiles.x = (tileDisplay.tiles.x + ((((-(cPuke) * 30) + 60) - tileDisplay.tiles.x) / 3));
} else {
if (edMode == 3){
tileDisplay.tiles.x = (tileDisplay.tiles.x + ((((-(cDoor) * tileX) + 60) - tileDisplay.tiles.x) / 3));
};
};
};
};
tileDisplay.tiles.y = (tileDisplay.tiles.y + (((edMode * 30) - tileDisplay.tiles.y) / 3));
} else {
teleGoal = (teleLength * (1 - ((totalVomit - activeVomit) / 100)));
if (teleGoal > teleLength){
teleGoal = teleLength;
};
if (teleGoal < 0){
teleGoal = 0;
};
teleRun = (teleRun + ((teleGoal - telePos) / 20));
teleRun = (teleRun * 0.8);
if (teleRun > 10){
teleRun = 10;
};
if (teleRun < -10){
teleRun = -10;
};
telePos = (telePos + teleRun);
if (Math.abs((telePos - teleGoal)) < 0.1){
telePos = teleGoal;
};
if (telePos > teleLength){
telePos = teleLength;
teleRun = (teleRun * -1);
};
if (telePos < 0){
telePos = 0;
teleRun = (teleRun * -1);
};
if (telePos != oTelePos){
teleEndClip.x = (teleBaseX - telePos);
i = 0;
while (i < telePieces.length) {
tar = this[telePieces[i]];
tar.x = (teleBaseX - telePos);
if (tar.i >= telePos){
tar.x = (teleBaseX - telePos);
} else {
tar.x = (teleBaseX - tar.i);
};
i++;
};
};
oTelePos = telePos;
HUD.barMask.mover.scaleX = (1 - (telePos / teleLength));
};
if (cHero != undefined){
if (cHero.doorTar != undefined){
cHero.x = (cHero.x + ((cHero.doorTar.x - cHero.x) / 6));
cHero.y = (cHero.y + ((cHero.doorTar.y - cHero.y) / 6));
cHero.scaleX = (cHero.scaleX + ((0.5 - cHero.scaleX) / 10));
cHero.scaleY = cHero.scaleX;
} else {
if ((((((((checkTile((cHero.x + cHero.r), (cHero.y + cHero.r)) == 1)) || ((checkTile((cHero.x - cHero.r), (cHero.y + cHero.r)) == 1)))) || ((checkTile((cHero.x + cHero.r), (cHero.y - cHero.r)) == 1)))) || ((checkTile((cHero.x - cHero.r), (cHero.y - cHero.r)) == 1)))){
cHero.x = cHero.ox;
cHero.y = cHero.oy;
};
i = 0;
while (i < objects.length) {
tar = this[objects[i]];
if (tar.t == 0){
go = false;
if (tar.rotation == 0){
if ((cHero.y + cHero.r) < (tar.y - (tileY / 2))){
go = true;
};
} else {
if (tar.rotation == 90){
if ((cHero.x - cHero.r) > (tar.x + (tileX / 2))){
go = true;
};
} else {
if (tar.rotation == -180){
if ((cHero.y - cHero.r) > (tar.y + (tileY / 2))){
go = true;
};
} else {
if (tar.rotation == -90){
if ((cHero.x + cHero.r) < (tar.x - (tileX / 2))){
go = true;
};
};
};
};
};
if (go){
go = false;
dx = ((cHero.x + cHero.run) + cHero.r);
dy = ((cHero.y + cHero.rise) + cHero.r);
if ((((((((dx > (tar.x - (tileX / 2)))) && ((dx < (tar.x + (tileX / 2)))))) && ((dy > (tar.y - (tileY / 2)))))) && ((dy < (tar.y + (tileY / 2)))))){
go = true;
};
dx = ((cHero.x + cHero.run) + cHero.r);
dy = ((cHero.y + cHero.rise) - cHero.r);
if ((((((((dx > (tar.x - (tileX / 2)))) && ((dx < (tar.x + (tileX / 2)))))) && ((dy > (tar.y - (tileY / 2)))))) && ((dy < (tar.y + (tileY / 2)))))){
go = true;
};
dx = ((cHero.x + cHero.run) - cHero.r);
dy = ((cHero.y + cHero.rise) + cHero.r);
if ((((((((dx > (tar.x - (tileX / 2)))) && ((dx < (tar.x + (tileX / 2)))))) && ((dy > (tar.y - (tileY / 2)))))) && ((dy < (tar.y + (tileY / 2)))))){
go = true;
};
dx = ((cHero.x + cHero.run) - cHero.r);
dy = ((cHero.y + cHero.rise) - cHero.r);
if ((((((((dx > (tar.x - (tileX / 2)))) && ((dx < (tar.x + (tileX / 2)))))) && ((dy > (tar.y - (tileY / 2)))))) && ((dy < (tar.y + (tileY / 2)))))){
go = true;
};
if (go){
if (tar.currentFrame == 1){
if (sound){
click2.play();
};
tar.gotoAndStop(2);
j = 0;
while (j < switches[i].length) {
tar2 = this[doors[switches[i][j]]];
if (tar2.currentFrame == 1){
tar2.play();
};
j++;
};
};
};
};
};
i++;
};
cHero.rMult = (cHero.rMult + ((pukeColTrans[cPuke][0] - cHero.rMult) / 6));
cHero.gMult = (cHero.gMult + ((pukeColTrans[cPuke][1] - cHero.gMult) / 6));
cHero.bMult = (cHero.bMult + ((pukeColTrans[cPuke][2] - cHero.bMult) / 6));
cHero.aMult = (cHero.aMult + ((pukeColTrans[cPuke][3] - cHero.aMult) / 6));
cHero.rOff = (cHero.rOff + ((pukeColTrans[cPuke][4] - cHero.rOff) / 6));
cHero.gOff = (cHero.gOff + ((pukeColTrans[cPuke][5] - cHero.gOff) / 6));
cHero.bOff = (cHero.bOff + ((pukeColTrans[cPuke][6] - cHero.bOff) / 6));
cHero.aOff = (cHero.aOff + ((pukeColTrans[cPuke][7] - cHero.aOff) / 6));
cHero.rGoal = Number(("0x" + pukeColTrans[cPuke][8].substr(0, 2)));
cHero.gGoal = Number(("0x" + pukeColTrans[cPuke][8].substr(2, 2)));
cHero.bGoal = Number(("0x" + pukeColTrans[cPuke][8].substr(4, 2)));
cHero.outRed = (cHero.outRed + ((cHero.rGoal - cHero.outRed) / 6));
cHero.outGreen = (cHero.outGreen + ((cHero.gGoal - cHero.outGreen) / 6));
cHero.outBlue = (cHero.outBlue + ((cHero.bGoal - cHero.outBlue) / 6));
cHero.bodyParts.transform.colorTransform = new ColorTransform(cHero.rMult, cHero.gMult, cHero.bMult, cHero.aMult, cHero.rOff, cHero.gOff, cHero.bOff, cHero.aOff);
cHero.stroke.color = (((Math.round(cHero.outRed) * 65536) + (Math.round(cHero.outGreen) * 0x0100)) + Math.round(cHero.outBlue));
cHero.filters = [cHero.stroke];
dx = (mouseX - cHero.x);
dy = (mouseY - cHero.y);
rot = Math.atan2(dy, dx);
cHero.faceWhole.x = (cHero.faceWhole.x + (((Math.cos(rot) * 4) - cHero.faceWhole.x) / 6));
cHero.faceWhole.y = (cHero.faceWhole.y + (((Math.sin(rot) * 5) - cHero.faceWhole.y) / 6));
if ((((cHero.faceWhole.y < 3.5)) && ((cHero.faceWhole.y > -3.5)))){
if (dx > 0){
rot = (cHero.faceWhole.y * 5);
} else {
rot = (-(cHero.faceWhole.y) * 5);
};
} else {
if (dy > 0){
if (dx > 0){
rot = ((5 - cHero.faceWhole.y) * 11.665);
} else {
rot = (-((5 - cHero.faceWhole.y)) * 11.665);
};
} else {
if (dx > 0){
rot = ((-5 - cHero.faceWhole.y) * 11.665);
} else {
rot = (-((-5 - cHero.faceWhole.y)) * 11.665);
};
};
};
cHero.faceWhole.rotation = (cHero.faceWhole.rotation + ((rot - cHero.faceWhole.rotation) / 6));
cHero.bodyParts.foot1.x = (cHero.bodyParts.foot1.x + ((cHero.bodyParts.foot1.rx - cHero.bodyParts.foot1.x) / 16));
cHero.bodyParts.foot1.y = (cHero.bodyParts.foot1.y + ((cHero.bodyParts.foot1.ry - cHero.bodyParts.foot1.y) / 16));
cHero.bodyParts.foot2.x = (cHero.bodyParts.foot2.x + ((cHero.bodyParts.foot2.rx - cHero.bodyParts.foot2.x) / 16));
cHero.bodyParts.foot2.y = (cHero.bodyParts.foot2.y + ((cHero.bodyParts.foot2.ry - cHero.bodyParts.foot2.y) / 16));
cHero.bodyParts.tail1.a = (cHero.bodyParts.tail1.a + ((Math.PI / 180) * 6));
cHero.bodyParts.tail2.a = (cHero.bodyParts.tail2.a + ((Math.PI / 180) * 6));
cHero.bodyParts.tail1.gx = (cHero.bodyParts.tail1.rx * cHero.dir);
cHero.bodyParts.tail1.gy = (cHero.bodyParts.tail1.ry - ((Math.sin(cHero.bodyParts.tail1.a) + 1) * 1));
cHero.bodyParts.tail2.gx = (cHero.bodyParts.tail2.rx * cHero.dir);
cHero.bodyParts.tail2.gy = (cHero.bodyParts.tail2.ry - ((Math.sin(cHero.bodyParts.tail2.a) + 1) * 2));
if (cHero.rise < 0){
cHero.bodyParts.tail1.gx = (cHero.bodyParts.tail1.gx / ((Math.abs(cHero.rise) / 2) + 1));
cHero.bodyParts.tail2.gx = (cHero.bodyParts.tail2.gx / ((Math.abs(cHero.rise) / 2) + 1));
};
cHero.bodyParts.tail1.run = (cHero.bodyParts.tail1.run + ((cHero.bodyParts.tail1.gx - cHero.bodyParts.tail1.x) / 4));
cHero.bodyParts.tail1.rise = (cHero.bodyParts.tail1.rise + ((cHero.bodyParts.tail1.gy - cHero.bodyParts.tail1.y) / 4));
cHero.bodyParts.tail2.run = (cHero.bodyParts.tail2.run + ((cHero.bodyParts.tail2.gx - cHero.bodyParts.tail2.x) / 4));
cHero.bodyParts.tail2.rise = (cHero.bodyParts.tail2.rise + ((cHero.bodyParts.tail2.gy - cHero.bodyParts.tail2.y) / 4));
cHero.bodyParts.tail1.run = (cHero.bodyParts.tail1.run - (cHero.run * 0.1));
cHero.bodyParts.tail1.rise = (cHero.bodyParts.tail1.rise - (cHero.rise * 0.25));
cHero.bodyParts.tail2.run = (cHero.bodyParts.tail2.run - (cHero.run * 0.15));
cHero.bodyParts.tail2.rise = (cHero.bodyParts.tail2.rise - (cHero.rise * 0.45));
r = 0.5;
cHero.bodyParts.tail1.run = (cHero.bodyParts.tail1.run * r);
cHero.bodyParts.tail1.rise = (cHero.bodyParts.tail1.rise * r);
cHero.bodyParts.tail2.run = (cHero.bodyParts.tail2.run * r);
cHero.bodyParts.tail2.rise = (cHero.bodyParts.tail2.rise * r);
cHero.bodyParts.tail1.x = (cHero.bodyParts.tail1.x + cHero.bodyParts.tail1.run);
cHero.bodyParts.tail1.y = (cHero.bodyParts.tail1.y + cHero.bodyParts.tail1.rise);
cHero.bodyParts.tail2.x = (cHero.bodyParts.tail2.x + cHero.bodyParts.tail2.run);
cHero.bodyParts.tail2.y = (cHero.bodyParts.tail2.y + cHero.bodyParts.tail2.rise);
if (cHero.faceWhole.face.currentFrame == 1){
blink++;
if ((((Math.random() < 0.02)) && ((blink > 10)))){
blink = 0;
};
if (blink < 2){
cHero.faceWhole.face.eye1.gotoAndStop(2);
cHero.faceWhole.face.eye2.gotoAndStop(2);
} else {
cHero.faceWhole.face.eye1.gotoAndStop(1);
cHero.faceWhole.face.eye2.gotoAndStop(1);
};
};
cHero.rise = (cHero.rise + (0.3 / ((cHero.partHits / 6) + 1)));
cHero.run = (cHero.run * 0.8);
cHero.rise = (cHero.rise / ((cHero.partHits / 40) + 1));
cHero.run = (cHero.run / ((cHero.partHits / 40) + 1));
if (cHero.standing == true){
cHero.run = (cHero.run * 0.8);
};
if (cHero.partStanding == true){
cHero.standing = true;
} else {
cHero.standing = false;
};
cHero.partStanding = false;
if (cHero.run > 0){
if ((((checkTile(((cHero.x + (cHero.r * cHero.thin)) + cHero.run), (cHero.y - cHero.r)) == 1)) || ((checkTile(((cHero.x + (cHero.r * cHero.thin)) + cHero.run), (cHero.y + cHero.r)) == 1)))){
if (((cHero.x + cHero.run) + (cHero.r * cHero.thin)) < sw){
if ((((map[Math.floor(((cHero.y + cHero.r) / tileY))][Math.floor((((cHero.x + (cHero.r * cHero.thin)) + cHero.run) / tileX))] == spikes4)) || ((map[Math.floor(((cHero.y - cHero.r) / tileY))][Math.floor((((cHero.x + (cHero.r * cHero.thin)) + cHero.run) / tileX))] == spikes4)))){
playerKilled = true;
if (sound){
sawDeathSound.play();
};
};
};
if (cHero.run > 2){
squishSound((cHero.run / 10));
};
cHero.run = (cHero.run * -0.3);
};
} else {
if ((((checkTile(((cHero.x - (cHero.r * cHero.thin)) + cHero.run), (cHero.y - cHero.r)) == 1)) || ((checkTile(((cHero.x - (cHero.r * cHero.thin)) + cHero.run), (cHero.y + cHero.r)) == 1)))){
if (((cHero.x + cHero.run) - (cHero.r * cHero.thin)) >= 0){
if ((((map[Math.floor(((cHero.y + cHero.r) / tileY))][Math.floor((((cHero.x - (cHero.r * cHero.thin)) + cHero.run) / tileX))] == spikes2)) || ((map[Math.floor(((cHero.y - cHero.r) / tileY))][Math.floor((((cHero.x - (cHero.r * cHero.thin)) + cHero.run) / tileX))] == spikes2)))){
playerKilled = true;
if (sound){
sawDeathSound.play();
};
};
};
if (cHero.run < -2){
squishSound((-(cHero.run) / 10));
};
cHero.run = (cHero.run * -0.3);
};
};
cHero.x = (cHero.x + cHero.run);
if (cHero.rise > 0){
if ((((checkTile((cHero.x + ((cHero.r * cHero.thin) * 0.95)), ((cHero.y + cHero.r) + cHero.rise)) == 1)) || ((checkTile((cHero.x - ((cHero.r * cHero.thin) * 0.95)), ((cHero.y + cHero.r) + cHero.rise)) == 1)))){
if (cHero.rise > 2){
if (cHero.rise > 10){
cHero.bodyParts.body.gotoAndPlay(2);
} else {
cHero.bodyParts.body.gotoAndPlay((6 - Math.round((((cHero.rise - 2) * 4) / 8))));
};
};
if (((cHero.y + cHero.rise) + cHero.r) < sh){
if ((((map[Math.floor((((cHero.y + cHero.r) + cHero.rise) / tileY))][Math.floor(((cHero.x + (cHero.r * cHero.thin)) / tileX))] == conv1)) || ((map[Math.floor((((cHero.y + cHero.r) + cHero.rise) / tileY))][Math.floor(((cHero.x - (cHero.r * cHero.thin)) / tileX))] == conv1)))){
cHero.run = (cHero.run + 0.4);
};
if ((((map[Math.floor((((cHero.y + cHero.r) + cHero.rise) / tileY))][Math.floor(((cHero.x + (cHero.r * cHero.thin)) / tileX))] == conv2)) || ((map[Math.floor((((cHero.y + cHero.r) + cHero.rise) / tileY))][Math.floor(((cHero.x - (cHero.r * cHero.thin)) / tileX))] == conv2)))){
cHero.run = (cHero.run - 0.4);
};
if ((((map[Math.floor((((cHero.y + cHero.r) + cHero.rise) / tileY))][Math.floor(((cHero.x + (cHero.r * cHero.thin)) / tileX))] == spikes1)) || ((map[Math.floor((((cHero.y + cHero.r) + cHero.rise) / tileY))][Math.floor(((cHero.x - (cHero.r * cHero.thin)) / tileX))] == spikes1)))){
playerKilled = true;
if (sound){
sawDeathSound.play();
};
};
};
if (cHero.rise > 1){
squishSound((cHero.rise / 10));
};
cHero.rise = (cHero.rise * -0.3);
if (Math.abs(cHero.rise) < 0.5){
cHero.rise = 0;
};
cHero.standing = true;
} else {
cHero.y = (cHero.y + cHero.rise);
};
} else {
if ((((checkTile((cHero.x + ((cHero.r * cHero.thin) * 0.95)), ((cHero.y - cHero.r) + cHero.rise)) == 1)) || ((checkTile((cHero.x - ((cHero.r * cHero.thin) * 0.95)), ((cHero.y - cHero.r) + cHero.rise)) == 1)))){
if (((cHero.y + cHero.rise) - cHero.r) >= 0){
if ((((map[Math.floor((((cHero.y - cHero.r) + cHero.rise) / tileY))][Math.floor(((cHero.x + (cHero.r * cHero.thin)) / tileX))] == spikes3)) || ((map[Math.floor((((cHero.y - cHero.r) + cHero.rise) / tileY))][Math.floor(((cHero.x - (cHero.r * cHero.thin)) / tileX))] == spikes3)))){
playerKilled = true;
if (sound){
sawDeathSound.play();
};
};
};
if (cHero.rise < -1){
squishSound((-(cHero.rise) / 10));
};
cHero.rise = (cHero.rise * -0.3);
} else {
cHero.y = (cHero.y + cHero.rise);
};
};
if ((cHero.y + cHero.r) > sh){
cHero.y = (sh - cHero.r);
cHero.rise = (cHero.rise * -0.3);
cHero.standing = true;
};
if ((cHero.y - cHero.r) < 0){
cHero.y = cHero.r;
cHero.rise = (cHero.rise * -0.3);
};
if ((cHero.x - cHero.r) < 0){
cHero.x = cHero.r;
cHero.run = (cHero.run * -0.3);
};
if ((cHero.x + cHero.r) > sw){
cHero.x = (sw - cHero.r);
cHero.run = (cHero.run * -0.3);
};
cHero.ox = cHero.x;
cHero.oy = cHero.y;
if (((isDown(65)) || (isDown(37)))){
cHero.run = (cHero.run - 1);
cHero.dir = -1;
if (cHero.standing == true){
cHero.rise = -1.5;
steps++;
if (cHero.cFoot == 1){
cHero.cFoot = 2;
cHero.bodyParts.foot1.y = (cHero.bodyParts.foot1.ry + 2);
cHero.bodyParts.foot1.x = (cHero.bodyParts.foot1.rx + 2);
} else {
cHero.cFoot = 1;
cHero.bodyParts.foot2.y = (cHero.bodyParts.foot2.ry + 2);
cHero.bodyParts.foot2.x = (cHero.bodyParts.foot2.rx + 2);
};
};
};
if (((isDown(68)) || (isDown(39)))){
cHero.run = (cHero.run + 1);
cHero.dir = 1;
if (cHero.standing == true){
cHero.rise = -1.5;
steps++;
if (cHero.cFoot == 1){
cHero.cFoot = 2;
cHero.bodyParts.foot1.y = (cHero.bodyParts.foot1.ry + 2);
cHero.bodyParts.foot1.x = (cHero.bodyParts.foot1.rx - 2);
} else {
cHero.cFoot = 1;
cHero.bodyParts.foot2.y = (cHero.bodyParts.foot2.ry + 2);
cHero.bodyParts.foot2.x = (cHero.bodyParts.foot2.rx - 2);
};
};
};
if (((((isDown(87)) || (isDown(38)))) && ((hitJump == false)))){
if ((((((checkTile((cHero.x + ((cHero.r * cHero.thin) * 0.95)), ((cHero.y + cHero.r) + 5)) == 1)) || ((checkTile((cHero.x - ((cHero.r * cHero.thin) * 0.95)), ((cHero.y + cHero.r) + 5)) == 1)))) || ((cHero.standing == true)))){
if (((cHero.y + cHero.r) + 5) < sh){
if ((((map[Math.floor((((cHero.y + cHero.r) + 5) / tileY))][Math.floor(((cHero.x + (cHero.r * cHero.thin)) / tileX))] == spikes1)) || ((map[Math.floor((((cHero.y + cHero.r) + 5) / tileY))][Math.floor(((cHero.x - (cHero.r * cHero.thin)) / tileX))] == spikes1)))){
if (cHero.rise >= 0){
playerKilled = true;
if (sound){
sawDeathSound.play();
};
};
};
};
cHero.rise = -6.7;
jumps++;
cHero.y = (cHero.y - 3);
if (cHero.partHits <= 2){
jumpSound();
cHero.jumpFaceCount = 0;
};
squishSound(0.5);
cHero.jumpCount = 0;
} else {
cHero.jumpCount = 7;
};
if (cHero.partHits > 2){
cHero.rise = (cHero.rise - 0.8);
};
};
if ((((isDown(87) == false)) && ((isDown(38) == false)))){
hitJump = false;
};
if (((isDown(83)) || (isDown(40)))){
if (cHero.partHits > 2){
cHero.rise = (cHero.rise + 0.3);
};
};
cHero.jumpCount--;
if ((((cHero.jumpCount >= 0)) && ((cHero.standing == true)))){
cHero.rise = -6.7;
jumps++;
cHero.bodyParts.foot1.y = (cHero.bodyParts.foot1.ry + 2);
cHero.bodyParts.foot1.x = cHero.bodyParts.foot1.rx;
cHero.bodyParts.foot2.y = (cHero.bodyParts.foot2.ry + 2);
cHero.bodyParts.foot2.x = cHero.bodyParts.foot2.rx;
};
if (((((clicking) && ((((mouseY <= sh)) || ((editor == false)))))) && ((activeVomit < totalVomit)))){
if (cHero.partHits > 2){
if (Math.random() < 0.2){
makeBubble((cHero.x + cHero.faceWhole.x), ((cHero.y + cHero.faceWhole.y) + 2));
};
};
tar = makeParticle((cHero.x + cHero.faceWhole.x), ((cHero.y + cHero.faceWhole.y) + 2), cPuke, 0);
dx = (mouseX - cHero.x);
dy = (mouseY - cHero.y);
rot = (Math.atan2(dy, dx) + ((((Math.random() - 0.5) * Math.PI) / 180) * 10));
tar.run = (Math.cos(rot) * pukeForce[cPuke]);
tar.rise = (Math.sin(rot) * pukeForce[cPuke]);
cHero.run = (cHero.run - ((Math.cos(rot) * pukeKickback[cPuke]) * 0.3));
cHero.rise = (cHero.rise - ((Math.sin(rot) * pukeKickback[cPuke]) * 0.15));
pukeVolume = 1;
if (cHero.faceWhole.face.currentFrame != 2){
cHero.faceWhole.face.gotoAndStop(2);
};
} else {
if (isDown(32)){
if (cHero.faceWhole.face.currentFrame != 3){
cHero.faceWhole.face.gotoAndStop(3);
};
} else {
if (cHero.partHits > 2){
if (Math.random() < 0.05){
makeBubble((cHero.x + cHero.faceWhole.x), ((cHero.y + cHero.faceWhole.y) + 2));
};
if (cHero.faceWhole.face.currentFrame != 4){
cHero.faceWhole.face.gotoAndStop(4);
};
} else {
if (cHero.jumpFaceCount < 3){
cHero.faceWhole.face.gotoAndStop(2);
} else {
if (cHero.faceWhole.face.currentFrame != 1){
cHero.faceWhole.face.gotoAndStop(1);
};
};
};
};
};
if ((((cHero.partHits > 2)) && (sound))){
waterVolume = ((Math.sqrt(((cHero.run * cHero.run) + (cHero.rise * cHero.rise))) / 14) + 0.1);
} else {
waterVolume = 0;
};
cHero.partHits = 0;
if (cHero.faceWhole.currentFrame != (cPuke + 1)){
cHero.faceWhole.gotoAndStop((cPuke + 1));
};
i = 0;
while (i < doors.length) {
if (doors[i].substr(0, 4) == "goal"){
tar = this[doors[i]];
dx = (tar.x - cHero.x);
dy = (tar.y - cHero.y);
if ((((((dx * dx) + (dy * dy)) < (20 * 20))) && ((tar.currentFrame == tar.totalFrames)))){
if (levelCompleted != true){
levelCompleted = true;
if (((!((gameMode == "story"))) || (!((currentLevel == 54))))){
cHero.doorTar = tar;
if (sound){
levelWinSound.play();
};
};
if (gameMode == "story"){
kongregate.stats.submit("Level", (currentLevel + 1));
if (currentLevel == 10){
medal_popup.unlockMedal("Burp");
};
if (currentLevel == 21){
medal_popup.unlockMedal("Airhead");
};
if (currentLevel == 32){
medal_popup.unlockMedal("Rocket Sauce");
};
if (currentLevel == 43){
medal_popup.unlockMedal("Gishy");
};
if (currentLevel == 62){
medal_popup.unlockMedal("Perfectionist");
};
if (currentLevel != 54){
HUD.mapScreen.gotoAndStop(1);
randomStats = ["Stats Created", "Mental Breakdowns", "Your B.A.C.", "Interns Fired", "Points Deducted", "Planets Aligned", "Viruses Detected", "Failure Rating", "Estimated I.Q.", "Laws Broken", "Instructions Ignored", "Spelling Errors", "Ideas Plagiarized", "Diseases Collected"];
HUD.mapScreen.statDisp.htmlText = (((((((((("<font size=\"+2\"><u>Level Complete</u></font><br><br>Saved Puke:<br><font color=\"#AA0000\">" + (totalVomit - activeVomit)) + "</font><br>Jumps:<br><font color=\"#AA0000\">") + jumps) + "</font><br>Steps Taken:<br><font color=\"#AA0000\">") + steps) + "</font><br>") + randomStats[Math.floor((Math.random() * randomStats.length))]) + ":<br><font color=\"#AA0000\">") + Math.round((Math.random() * 30))) + "</font>");
if (currentLevel == unlockedLevel){
unlockedLevel++;
cookie.data.unlockedLevel = unlockedLevel;
cookie.flush();
};
} else {
if (currentLevel == unlockedLevel){
unlockedLevel++;
kongregate.stats.submit("Level", unlockedLevel);
cookie.data.unlockedLevel = unlockedLevel;
cookie.flush();
};
endingClip = new ending();
endingClip.x = 300;
endingClip.y = 225;
addChild(endingClip);
};
} else {
medal_popup.unlockMedal("Architect");
};
};
};
};
i++;
};
cHero.jumpFaceCount++;
};
};
if (editor){
if (((isDown(81)) && ((HUD.levelProps.visible == false)))){
tx = Math.floor((mouseX / tileX));
ty = Math.floor((mouseY / tileY));
if ((((((((tx >= 0)) && ((tx < map[0].length)))) && ((ty >= 0)))) && ((ty < map.length)))){
cTile = map[ty][tx];
};
};
if (edMode == 3){
if (((((isDown(32)) && ((edSubMode == 0)))) && ((HUD.levelProps.visible == false)))){
redrawSwitches = false;
i = 0;
while (i < objects.length) {
tar = this[objects[i]];
tx = Math.floor((tar.x / tileX));
ty = Math.floor((tar.y / tileY));
dx = Math.floor((mouseX / tileX));
dy = Math.floor((mouseY / tileY));
if ((((dx == tx)) && ((dy == ty)))){
HUD.editorOutput.text = "";
if ((((((tar.t == 1)) || ((tar.t == 2)))) || ((tar.t == 4)))){
map[ty][tx] = blankTile;
drawMap((tx - 1), (ty - 1), 3, 3);
c = Number.POSITIVE_INFINITY;
j = 0;
while (j < doors.length) {
if (doors[j] == objects[i]){
c = j;
doors.splice(j, 1);
break;
};
j++;
};
j = 0;
while (j < switches.length) {
k = 0;
while (k < switches[j].length) {
if (switches[j][k] > c){
var _local2 = switches[j];
var _local3 = k;
var _local4 = (_local2[_local3] - 1);
_local2[_local3] = _local4;
} else {
if (switches[j][k] == c){
switches[j].splice(k, 1);
k--;
};
};
k++;
};
j++;
};
};
switches.splice(i, 1);
objects.splice(i, 1);
game.removeChild(tar);
redrawSwitches = true;
};
i++;
};
if (redrawSwitches){
i = 0;
while (i < switches.length) {
tar = this[objects[i]];
if ((((tar.t == 0)) || ((tar.t == 5)))){
tar.drawing2.graphics.clear();
game.setChildIndex(tar, (game.numChildren - 1));
tar.drawing2.graphics.lineStyle(2, 0xFFFF00);
j = 0;
while (j < switches[i].length) {
tar2 = this[doors[switches[i][j]]];
tx = Math.floor((tar2.x / tileX));
ty = Math.floor((tar2.y / tileY));
tar.drawing2.graphics.moveTo(0, 0);
tar.drawing2.graphics.lineTo((((tx * tileX) - tar.x) + (tileX / 2)), (((ty * tileY) - tar.y) + (tileY / 2)));
j++;
};
};
i++;
};
};
};
if (edSubMode == 1){
dx = (tar.x - mouseX);
dy = (tar.y - mouseY);
tar.rotation = ((Math.round((((Math.atan2(dy, dx) * 180) / Math.PI) / 90)) * 90) - 90);
tar.drawing.rotation = ((-(Math.round((((Math.atan2(dy, dx) * 180) / Math.PI) / 90))) * 90) - 90);
tar.drawing.graphics.clear();
tar.drawing.graphics.lineStyle(1, 0xFFFFFF);
tar.drawing.graphics.lineTo(dx, dy);
if (clicking){
HUD.editorOutput.text = "";
edSubMode = 0;
clicking = false;
tar.removeChild(tar.drawing);
tar.drawing2 = new MovieClip();
tar.addChild(tar.drawing2);
objects.push(("switch" + q));
switches.push([]);
q++;
};
} else {
if (edSubMode == 2){
dx = (tar.x - mouseX);
dy = (tar.y - mouseY);
tar.drawing.graphics.clear();
tar.drawing.graphics.lineStyle(2, 0xFFFF00);
tar.drawing.graphics.lineTo(-(dx), -(dy));
tx = Math.floor((mouseX / tileX));
ty = Math.floor((mouseY / tileY));
c = 0;
k = -1;
i = 0;
while (i < objects.length) {
tar2 = this[objects[i]];
if ((((((tar2.t == 1)) || ((tar2.t == 2)))) || ((tar2.t == 4)))){
dx = Math.floor((tar2.x / tileX));
dy = Math.floor((tar2.y / tileY));
if ((((tx == dx)) && ((ty == dy)))){
tar2.alpha = 1;
k = c;
} else {
tar2.alpha = 0.5;
c++;
};
};
i++;
};
if (clicking){
clicking = false;
edSubMode = 0;
if (k != -1){
HUD.editorOutput.text = "";
tx = Math.floor((mouseX / tileX));
ty = Math.floor((mouseY / tileY));
tar.drawing.graphics.clear();
tar.drawing2.rotation = -(tar.rotation);
tar.drawing2.graphics.lineStyle(2, 0xFFFF00);
tar.drawing2.graphics.moveTo(0, 0);
tar.drawing2.graphics.lineTo((((tx * tileX) - tar.x) + (tileX / 2)), (((ty * tileY) - tar.y) + (tileY / 2)));
switches[j].push(k);
};
i = 0;
while (i < objects.length) {
tar2 = this[objects[i]];
if ((((((tar2.t == 1)) || ((tar2.t == 2)))) || ((tar2.t == 4)))){
tar2.alpha = 1;
};
i++;
};
tar.removeChild(tar.drawing);
};
};
};
};
if (((clicking) || ((((((edMode == 0)) && (isDown(32)))) && ((HUD.levelProps.visible == false)))))){
go = true;
tx = Math.floor((mouseX / tileX));
ty = Math.floor((mouseY / tileY));
i = 0;
while (i < objects.length) {
tar = this[objects[i]];
if ((((tar.x == ((tx * tileX) + (tileX / 2)))) && ((tar.y == ((ty * tileY) + (tileY / 2)))))){
go = false;
};
i++;
};
if (go){
if (edMode == 3){
if (edSubMode == 0){
if ((((cDoor == 0)) || ((cDoor == 1)))){
clicking = false;
tx = Math.floor((mouseX / tileX));
ty = Math.floor((mouseY / tileY));
if ((((((((tx >= 0)) && ((tx < map[0].length)))) && ((ty >= 0)))) && ((ty < map.length)))){
if (((((!((heroSpawn.x == ((tx * tileX) + (tileX / 2))))) || (!((heroSpawn.y == ((ty * tileY) + (tileY / 2))))))) || ((tileTypes[cTile] == 0)))){
edSubMode = 1;
if (cDoor == 0){
tar = (this[("switch" + q)] = new doorSwitch());
tar.t = 0;
} else {
tar = (this[("switch" + q)] = new pukeButton());
tar.t = 5;
};
tar.x = ((tx * tileX) + (tileX / 2));
tar.y = ((ty * tileY) + (tileY / 2));
tar.stop();
game.addChild(tar);
tar.drawing = new MovieClip();
tar.addChild(tar.drawing);
map[ty][tx] = 1;
drawMap((tx - 1), (ty - 1), 3, 3);
};
};
} else {
if (cDoor == 2){
clicking = false;
tx = Math.floor((mouseX / tileX));
ty = Math.floor((mouseY / tileY));
if ((((((((tx >= 0)) && ((tx < map[0].length)))) && ((ty >= 0)))) && ((ty < map.length)))){
if (((((!((heroSpawn.x == ((tx * tileX) + (tileX / 2))))) || (!((heroSpawn.y == ((ty * tileY) + (tileY / 2))))))) || ((tileTypes[cTile] == 0)))){
HUD.editorOutput.text = "";
tar = (this[("door" + q)] = new door());
tar.x = ((tx * tileX) + (tileX / 2));
tar.y = ((ty * tileY) + (tileY / 2));
tar.t = 1;
tar.stop();
game.addChild(tar);
map[ty][tx] = 0;
drawMap((tx - 1), (ty - 1), 3, 3);
objects.push(("door" + q));
doors.push(("door" + q));
switches.push([]);
q++;
};
};
} else {
if (cDoor == 4){
clicking = false;
tx = Math.floor((mouseX / tileX));
ty = Math.floor((mouseY / tileY));
if ((((((((tx >= 0)) && ((tx < map[0].length)))) && ((ty >= 0)))) && ((ty < map.length)))){
if (((((!((heroSpawn.x == ((tx * tileX) + (tileX / 2))))) || (!((heroSpawn.y == ((ty * tileY) + (tileY / 2))))))) || ((tileTypes[cTile] == 0)))){
HUD.editorOutput.text = "";
tar = (this[("goal" + q)] = new goalDoor());
tar.x = ((tx * tileX) + (tileX / 2));
tar.y = ((ty * tileY) + (tileY / 2));
tar.t = 2;
tar.stop();
game.addChild(tar);
map[ty][tx] = 0;
drawMap((tx - 1), (ty - 1), 3, 3);
objects.push(("goal" + q));
doors.push(("goal" + q));
switches.push([]);
q++;
};
};
} else {
if (cDoor == 5){
clicking = false;
tx = Math.floor((mouseX / tileX));
ty = Math.floor((mouseY / tileY));
if ((((((((tx >= 0)) && ((tx < map[0].length)))) && ((ty >= 0)))) && ((ty < map.length)))){
if (((((!((heroSpawn.x == ((tx * tileX) + (tileX / 2))))) || (!((heroSpawn.y == ((ty * tileY) + (tileY / 2))))))) || ((tileTypes[cTile] == 0)))){
HUD.editorOutput.text = "";
tar = (this[("gate" + q)] = new gate());
tar.x = ((tx * tileX) + (tileX / 2));
tar.y = ((ty * tileY) + (tileY / 2));
tar.t = 4;
tar.stop();
game.addChild(tar);
map[ty][tx] = 0;
drawMap((tx - 1), (ty - 1), 3, 3);
objects.push(("gate" + q));
doors.push(("gate" + q));
switches.push([]);
q++;
};
};
};
};
};
};
};
} else {
if (edMode == 2){
tx = Math.floor((mouseX / tileX));
ty = Math.floor((mouseY / tileY));
if ((((((((tx >= 0)) && ((tx < map[0].length)))) && ((ty >= 0)))) && ((ty < map.length)))){
if ((((tileTypes[map[ty][tx]] == 0)) && ((activeVomit < 100)))){
if (cPuke > 4){
clicking = false;
};
HUD.editorOutput.text = "";
makeParticle(mouseX, mouseY, cPuke, 0);
updateParticles(0);
};
};
} else {
if (edMode == 1){
tx = Math.floor((mouseX / tileX));
ty = Math.floor((mouseY / tileY));
if ((((((((tx >= 0)) && ((tx < map[0].length)))) && ((ty >= 0)))) && ((ty < map.length)))){
if (tileTypes[map[ty][tx]] == 0){
HUD.editorOutput.text = "";
heroSpawn.x = ((tx * tileX) + (tileX / 2));
heroSpawn.y = ((ty * tileY) + (tileY / 2));
};
};
} else {
if (edMode == 0){
tx = Math.floor((mouseX / tileX));
ty = Math.floor((mouseY / tileY));
if ((((((((tx >= 0)) && ((tx < map[0].length)))) && ((ty >= 0)))) && ((ty < map.length)))){
if (((((!((heroSpawn.x == ((tx * tileX) + (tileX / 2))))) || (!((heroSpawn.y == ((ty * tileY) + (tileY / 2))))))) || ((tileTypes[cTile] == 0)))){
HUD.editorOutput.text = "";
if (clicking){
map[ty][tx] = cTile;
} else {
map[ty][tx] = emptyTile;
};
drawMap((tx - 1), (ty - 1), 3, 3);
};
};
};
};
};
};
} else {
if ((((edMode == 3)) && ((edSubMode == 0)))){
if (cDoor == 3){
clicking = false;
tx = Math.floor((mouseX / tileX));
ty = Math.floor((mouseY / tileY));
if ((((((((tx >= 0)) && ((tx < map[0].length)))) && ((ty >= 0)))) && ((ty < map.length)))){
i = 0;
while (i < objects.length) {
tar = this[objects[i]];
if ((((tar.t == 0)) || ((tar.t == 5)))){
dx = Math.floor((tar.x / tileX));
dy = Math.floor((tar.y / tileY));
if ((((dx == tx)) && ((dy == ty)))){
j = i;
edSubMode = 2;
clicking = false;
tar.drawing = new MovieClip();
tar.drawing.rotation = -(tar.rotation);
tar.addChild(tar.drawing);
game.setChildIndex(tar, (game.numChildren - 1));
break;
};
};
i++;
};
};
};
};
};
};
};
if ((((editor == false)) || (((isDown(16)) && ((HUD.levelProps.visible == false)))))){
if (cHero != undefined){
slurpTransform = slurpChannel.soundTransform;
slurpTransform.volume = (slurpTransform.volume + ((slurpVolume - slurpTransform.volume) / 3));
slurpChannel.soundTransform = slurpTransform;
slurpVolume = 0;
waterTransform = waterChannel.soundTransform;
waterTransform.volume = (waterTransform.volume + ((waterVolume - waterTransform.volume) / 3));
waterChannel.soundTransform = waterTransform;
if (sound == false){
pukeVolume = 0;
};
pukeTransform = pukeChannel.soundTransform;
pukeTransform.volume = (pukeTransform.volume + ((pukeVolume - pukeTransform.volume) / 3));
pukeChannel.soundTransform = pukeTransform;
pukeVolume = 0;
};
updateParticles(1);
acidTransform = acidChannel.soundTransform;
acidTransform.volume = (acidTransform.volume + ((acidVolume - acidTransform.volume) / 6));
acidChannel.soundTransform = acidTransform;
acidVolume = 0;
} else {
updateParticles(0);
};
updateBubbles();
if (playerKilled){
kill();
};
if ((((editor == false)) && (!((cBack == undefined))))){
if (((!((this[cBack].doc.mainAnim == undefined))) && (!((this[cBack].doc.mainAnim.anim == undefined))))){
this[cBack].doc.mainAnim.anim.play();
};
};
};
} else {
if (cutscene == false){
if ((((editor == false)) && (!((cBack == undefined))))){
if (this[cBack].doc != undefined){
if (this[cBack].doc.mainAnim != undefined){
if (this[cBack].doc.mainAnim.anim != undefined){
this[cBack].doc.mainAnim.anim.stop();
};
};
};
};
slurpTransform = slurpChannel.soundTransform;
slurpTransform.volume = 0;
slurpChannel.soundTransform = slurpTransform;
waterTransform = waterChannel.soundTransform;
waterTransform.volume = 0;
waterChannel.soundTransform = waterTransform;
};
};
if (cutscene == false){
if (sound == false){
slurpTransform = slurpChannel.soundTransform;
slurpTransform.volume = 0;
slurpChannel.soundTransform = slurpTransform;
waterTransform = waterChannel.soundTransform;
waterTransform.volume = 0;
waterChannel.soundTransform = waterTransform;
};
if (((isDown(82)) && ((HUD.mapScreen.settle == false)))){
resetLevel = true;
resetScreen = undefined;
HUD.mapScreen.gotoAndStop(4);
};
if (((((((((((((resetLevel) || (levelCompleted))) || (spewerIsDead))) || (pauseGame))) && ((HUD.mapScreen.settle == false)))) && ((editor == false)))) && ((endingClip == undefined)))){
if (HUD.mapScreen.gy != 0){
HUD.mapScreen.gy = 0;
if (sound){
monitor.play();
};
};
} else {
HUD.mapScreen.gy = -420;
};
HUD.mapScreen.rise = (HUD.mapScreen.rise + ((HUD.mapScreen.gy - HUD.mapScreen.y) / 40));
HUD.mapScreen.rise = (HUD.mapScreen.rise * 0.85);
HUD.mapScreen.y = (HUD.mapScreen.y + HUD.mapScreen.rise);
if (HUD.mapScreen.currentFrame == 3){
HUD.mapScreen.returnToGame.visible = true;
HUD.mapScreen.restartLevel.visible = true;
HUD.mapScreen.exitToTitle.visible = true;
HUD.mapScreen.options.visible = true;
} else {
HUD.mapScreen.returnToGame.visible = false;
HUD.mapScreen.restartLevel.visible = false;
HUD.mapScreen.exitToTitle.visible = false;
HUD.mapScreen.options.visible = false;
};
if (HUD.mapScreen.y > 0){
HUD.mapScreen.y = 0;
HUD.mapScreen.rise = (HUD.mapScreen.rise * -0.5);
if (Math.abs(HUD.mapScreen.rise) < 0.5){
HUD.mapScreen.rise = 0;
if (((((levelCompleted) || (pauseGame))) && ((resetLevel == false)))){
pauseGame = true;
if (gameMode == "story"){
drawMapScreen();
} else {
if (levelCompleted){
destroy(editor);
setup();
HUD.mapScreen.y = 0;
HUD.mapScreen.settle = true;
};
};
} else {
resetScreen = HUD.mapScreen.variants.currentFrame;
destroy(editor);
setup();
HUD.mapScreen.gotoAndStop(4);
HUD.mapScreen.y = 0;
HUD.mapScreen.settle = true;
};
};
};
if (HUD.mapScreen.y < -420){
HUD.mapScreen.y = -420;
HUD.mapScreen.rise = 0;
HUD.mapScreen.gotoAndStop(1);
HUD.mapScreen.settle = false;
};
};
}
public function drawMapScreen(){
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
_local1 = 70;
_local2 = 100;
_local3 = 300;
_local4 = 280;
_local5 = _local1;
_local6 = _local2;
_local7 = 1;
if (unlockedLevel <= 54){
drawLevels = 55;
} else {
drawLevels = 63;
};
i = 0;
while (i < drawLevels) {
tar = (this[("mapBox" + q)] = new mapBox());
if (unlockedLevel > i){
tar.gotoAndStop(2);
} else {
if (unlockedLevel < i){
tar.gotoAndStop(1);
} else {
tar.gotoAndStop(3);
};
};
tar.x = _local5;
tar.y = _local6;
if (i > 54){
_local6 = (_local6 + ((_local4 / 7) * _local7));
} else {
_local6 = (_local6 + ((_local4 / 10) * _local7));
};
if ((((_local6 > (_local2 + _local4))) || ((_local6 < (_local2 - 1))))){
_local7 = -(_local7);
_local6 = (_local6 + ((_local4 / 10) * _local7));
if (drawLevels == 55){
_local5 = (_local5 + (_local3 / 4));
} else {
_local5 = (_local5 + (_local3 / 5));
};
};
if (((i + 1) % 11) == 0){
tar.scaleX = (tar.scaleY = 0.7);
};
if (((!((i == 54))) && (!((i == 62))))){
tar.graphics.lineStyle(2, 0x959595);
tar.graphics.lineTo(((_local5 - tar.x) / tar.scaleX), ((_local6 - tar.y) / tar.scaleY));
};
HUD.mapScreen.addChild(tar);
tar.i = (i + 10);
tar.index = i;
tar.visible = false;
mapBoxes.push(("mapBox" + q));
q++;
i++;
};
}
public function makeBubble(_arg1, _arg2){
tar = (this[("bubble" + q)] = new bubble());
tar.x = _arg1;
tar.y = _arg2;
tar.rise = (tar.run = 0);
game.addChild(tar);
bubbles.push(("bubble" + q));
q++;
}
public function hitEdit(_arg1:MouseEvent){
gameMode = "editor";
if (menu.loadBox.text == "if you have a level code that you want to play, paste it here and press the map editor button."){
levelString = "eNoz1DEkEhqZkoNGdY7qHFidREFrawMgNDQw1TE2N7W2tgYAVBmWew==";
} else {
levelString = menu.loadBox.text;
levelString = levelString.split(" ");
levelString = levelString.join("");
levelString = levelString.split("\n");
levelString = levelString.join("");
levelString = levelString.split("\r");
levelString = levelString.join("");
};
trace(levelString);
menu.playButton.removeEventListener(MouseEvent.CLICK, hitPlay);
menu.editButton.removeEventListener(MouseEvent.CLICK, hitPlay);
menu.newgrounds.removeEventListener(MouseEvent.CLICK, gotoNG);
stage.removeEventListener(Event.ENTER_FRAME, eFrame1);
menu.titleScreen.eliSite.removeEventListener(MouseEvent.CLICK, goto2D);
menu.titleScreen.edSite.removeEventListener(MouseEvent.CLICK, gotoEd);
menu.eraseShit.removeEventListener(MouseEvent.CLICK, hitErase);
menu.eraseBox.doneButton.removeEventListener(MouseEvent.CLICK, hitErase);
menu.downloadButton.removeEventListener(MouseEvent.CLICK, hitDownload);
menu.removeChild(menu.playButton);
menu.removeChild(menu.editButton);
menu.removeChild(menu.scanLines);
graphics.clear();
editor = true;
intro.stop();
if (musicChannel != undefined){
musicChannel.stop();
musicSound = (musicChannel = (musicTransform = null));
};
gotoAndStop(2);
}
function frame1(){
if (finishedVarInit == undefined){
finishedVarInit = true;
unlockedLevel = 0;
showBG = true;
sound = true;
stage.quality = StageQuality.MEDIUM;
cookie = SharedObject.getLocal("SpewerSaveData");
if (cookie.data.bg == undefined){
cookie.data.bg = showBG;
cookie.data.unlockedLevel = unlockedLevel;
cookie.data.qual = stage.quality;
cookie.data.sound = sound;
cookie.flush();
} else {
showBG = cookie.data.bg;
unlockedLevel = cookie.data.unlockedLevel;
stage.quality = cookie.data.qual;
sound = cookie.data.sound;
};
API_Settings = {movie_id:6706, enc_key:"pO3T6RsIb0n4TMjqWm3o1Q7nX4YlSNY5", debug_mode:false, movie_version:""};
newgroundsAPIconnector.initialize(API_Settings);
kongregate = new KongregateAPI();
this.addChild(kongregate);
} else {
skipIntro = true;
};
if (cutscene != undefined){
if (cutscene == true){
fadeout.visible = true;
} else {
fadeout.visible = false;
};
} else {
fadeout.visible = false;
};
stop();
loadWidth = 100;
loadHeight = 10;
menu.rise = 0;
menu.gy = 0;
tar2 = new MovieClip();
menu.addChild(tar2);
tar2.graphics.lineStyle(1, 0xFFFFFF);
tar2.graphics.moveTo((211.45 - loadWidth), (382 - loadHeight));
tar2.graphics.lineTo((211.45 - loadWidth), (382 + loadHeight));
tar2.graphics.moveTo((212.45 + loadWidth), (382 - loadHeight));
tar2.graphics.lineTo((212.45 + loadWidth), (382 + loadHeight));
tar = new MovieClip();
tar.y = 382;
tar.x = ((211.45 - loadWidth) + 1);
tar.graphics.beginFill(0x666666);
rise = 0;
gHeight = 1;
tar.scaleY = 0;
tar.scaleX = 0;
tar.graphics.drawRect(0, (-(loadHeight) * 0.5), ((loadWidth * 2) - 1), loadHeight);
tar.graphics.endFill();
menu.addChild(tar);
menu.setChildIndex(menu.scanLines, (menu.numChildren - 1));
menu.playButton.visible = false;
menu.editButton.visible = false;
menu.eraseShit.visible = false;
menu.credits.visible = false;
menu.loadBox.visible = false;
menu.eraseBox.visible = false;
menu.titleScreen.visible = false;
menu.newgrounds.visible = false;
menu.downloadButton.visible = false;
menu.loadingScreen.cont.visible = false;
if (skipIntro){
if (cutscene != true){
musicSound = new introSong();
if (sound){
musicChannel = musicSound.play(0, 99999999);
musicTransform = musicChannel.soundTransform;
musicTransform.volume = 0.2;
musicChannel.soundTransform = musicTransform;
};
};
menu.loadingScreen.visible = false;
menu.newgrounds.visible = true;
menu.newgrounds.addEventListener(MouseEvent.CLICK, gotoNG);
menu.playButton.visible = true;
menu.playButton.addEventListener(MouseEvent.CLICK, hitPlay);
menu.editButton.visible = true;
menu.editButton.addEventListener(MouseEvent.CLICK, hitEdit);
menu.credits.addEventListener(MouseEvent.CLICK, hitCredits);
menu.downloadButton.visible = true;
menu.downloadButton.addEventListener(MouseEvent.CLICK, hitDownload);
menu.eraseShit.addEventListener(MouseEvent.CLICK, hitErase);
menu.eraseBox.doneButton.addEventListener(MouseEvent.CLICK, hitErase);
menu.credits.visible = true;
menu.eraseShit.visible = true;
menu.loadBox.visible = true;
menu.titleScreen.visible = true;
menu.removeChild(tar);
menu.removeChild(tar2);
menu.titleScreen.eliSite.addEventListener(MouseEvent.CLICK, goto2D);
menu.titleScreen.edSite.addEventListener(MouseEvent.CLICK, gotoEd);
menu.titleScreen.eliSite.visible = false;
menu.titleScreen.edSite.visible = false;
menu.titleScreen.closeCredits.visible = false;
};
menu.loadBox.text = "if you have a level code that you want to play, paste it here and press the map editor button.";
currentLevel = unlockedLevel;
if (currentLevel > 62){
currentLevel = 0;
};
storyModeLevels = ["eNrFkjEOwj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srbltDN7d3gZoQxov/vhj9+fj7f3l8v359fv5e+wMlhOCrkjyFpBFrOvLt/DoG3TlsRkwO0IOmmEGyHAOwQdT7crQkEMcEdY7/YgSdxgS7RQO2ZYjhLumdxbRB4sCLNjYb9k3jBIi+6aoYvCwpZBUhfas7L6ZHHxDLVM6anOeaP1hMIOmQTv9FTIzILTxOgmJljwouVFK5f1kBS/ClID6lSA2lTQk7knc0/Wsl33aSh1pLEitWpoKHgoOK2IeFbbsaoGholV1TEsWli0ruU099DXrqg4h15jRcU19F7aNRwoDgUPPzuQ78gNhZt+uoF21sV9WvcnH7a8E7O8FSmTQXEzyFmmbJZzJIfEQMq3H73ZkufF3EDM8vBgyPKggERrMGY5uinLX5O/EZKV8A95CGlk"];
trace(storyModeLevels.length);
loaderInfo.addEventListener(ProgressEvent.PROGRESS, preloaderUpdate);
loaderInfo.addEventListener(Event.COMPLETE, preloaderFinish);
stage.addEventListener(Event.ENTER_FRAME, eFrame1);
}
public function testTheLevel(_arg1:MouseEvent){
HUD.testLevel.removeEventListener(MouseEvent.CLICK, testTheLevel);
HUD.propsButton.removeEventListener(MouseEvent.CLICK, toggleProps);
levelName = HUD.levelProps.levelName.text;
defaultVomit = Number(HUD.levelProps.defaultPuke.value);
defaultType = Number(HUD.levelProps.radios.greenRadio.group.selectedData);
editor = false;
cx = heroSpawn.x;
cy = heroSpawn.y;
defaultParticles = new Array();
i = 0;
while (i < particles.length) {
tar = this[particles[i]];
defaultParticles.push([tar.x, tar.y, tar.t, tar.surrounds]);
i++;
};
defaultObjects = new Array();
i = 0;
while (i < objects.length) {
tar = this[objects[i]];
if ((((tar.t == 0)) || ((tar.t == 5)))){
defaultObjects.push([tar.x, tar.y, tar.t, (tar.rotation / 90)]);
} else {
defaultObjects.push([tar.x, tar.y, tar.t]);
};
i++;
};
destroy(1);
setup();
}
public function updateBubbles(){
i = 0;
while (i < bubbles.length) {
tar = this[bubbles[i]];
tar.rise = (tar.rise + (((Math.random() - 0.5) * 1) - 0.5));
tar.run = (tar.run + ((Math.random() - 0.5) * 1));
tar.run = (tar.run * 0.7);
tar.rise = (tar.rise * 0.7);
tar.x = (tar.x + tar.run);
tar.y = (tar.y + tar.rise);
if (particleBitmap.getPixel32(tar.x, tar.y) == 0){
game.removeChild(tar);
this[bubbles[i]] = null;
bubbles[i] = bubbles[(bubbles.length - 1)];
bubbles.splice((bubbles.length - 1), 1);
i--;
};
i++;
};
}
public function kUp(_arg1:KeyboardEvent){
id = keysDown.indexOf(_arg1.keyCode);
if (id != -1){
keysDown[id] = keysDown[(keysDown.length - 1)];
keysDown.splice((keysDown.length - 1), 1);
};
}
public function preloaderFinish(_arg1:Event){
loaderInfo.removeEventListener(ProgressEvent.PROGRESS, preloaderUpdate);
loaderInfo.removeEventListener(Event.COMPLETE, preloaderFinish);
menu.loadingScreen.cont.visible = true;
menu.loadingScreen.cont.addEventListener(MouseEvent.CLICK, playIntros);
}
function frame2(){
levelName = "";
setup();
HUD.mapScreen.y = 0;
HUD.mapScreen.gotoAndStop(2);
}
public function preloaderUpdate(_arg1:ProgressEvent){
gWidth = (_arg1.bytesLoaded / _arg1.bytesTotal);
}
public function isDown(_arg1){
if (keysDown.indexOf(_arg1) != -1){
return (true);
};
return (false);
}
public function setHigh(_arg1:MouseEvent){
stage.quality = (cookie.data.qual = StageQuality.HIGH);
cookie.flush();
}
public function eFrame1(_arg1:Event){
time1 = getTimer();
if ((((intros.currentFrame == intros.totalFrames)) && (!((menu.gy == 0))))){
menu.gy = 0;
menu.loadingScreen.visible = false;
menu.newgrounds.visible = true;
menu.newgrounds.addEventListener(MouseEvent.CLICK, gotoNG);
menu.playButton.visible = true;
menu.playButton.addEventListener(MouseEvent.CLICK, hitPlay);
menu.editButton.visible = true;
menu.editButton.addEventListener(MouseEvent.CLICK, hitEdit);
menu.credits.visible = true;
menu.credits.addEventListener(MouseEvent.CLICK, hitCredits);
menu.downloadButton.visible = true;
menu.downloadButton.addEventListener(MouseEvent.CLICK, hitDownload);
menu.eraseShit.addEventListener(MouseEvent.CLICK, hitErase);
menu.eraseBox.doneButton.addEventListener(MouseEvent.CLICK, hitErase);
menu.loadBox.visible = true;
menu.titleScreen.visible = true;
menu.titleScreen.eliSite.addEventListener(MouseEvent.CLICK, goto2D);
menu.titleScreen.edSite.addEventListener(MouseEvent.CLICK, gotoEd);
menu.titleScreen.eliSite.visible = false;
menu.titleScreen.edSite.visible = false;
menu.titleScreen.closeCredits.visible = false;
menu.removeChild(tar);
menu.removeChild(tar2);
};
if (((!((intros.currentFrame == 1))) && (!((intros.currentFrame == intros.totalFrames))))){
menu.gy = -420;
};
menu.rise = (menu.rise + ((menu.gy - menu.y) / 40));
menu.rise = (menu.rise * 0.85);
menu.y = (menu.y + menu.rise);
if (menu.y > 0){
menu.y = 0;
menu.rise = (menu.rise * -0.5);
if (Math.abs(menu.rise) < 0.5){
menu.rise = 0;
menu.eraseShit.visible = true;
intros.visible = false;
};
};
if (menu.y < -420){
menu.y = -420;
};
if (Math.random() < 0.03){
rise = (rise + 1);
};
rise = (rise + ((gHeight - tar.scaleY) / 1));
rise = (rise * 0.7);
tar.scaleY = (tar.scaleY + rise);
tar.scaleX = (tar.scaleX + ((gWidth - tar.scaleX) / 6));
menu.playButton.alpha = (menu.playButton.alpha + ((1 - menu.playButton.alpha) / 20));
menu.editButton.alpha = (menu.editButton.alpha + ((1 - menu.editButton.alpha) / 20));
}
public function setTooltip(){
if (edMode == 0){
tipMode = cTile;
} else {
if (edMode == 1){
tipMode = 0;
} else {
if (edMode == 2){
tipMode = cPuke;
} else {
if (edMode == 3){
tipMode = cDoor;
};
};
};
};
HUD.edHUD.toolTip.text = tooltips[edMode][tipMode];
}
public function enableSound(_arg1:MouseEvent){
if (sound == false){
musicChannel = musicSound.play(0, 99999999);
musicTransform = musicChannel.soundTransform;
musicTransform.volume = 0.2;
musicChannel.soundTransform = musicTransform;
};
sound = (cookie.data.sound = true);
cookie.flush();
}
public function disableBG(_arg1:MouseEvent){
showBG = (cookie.data.bg = false);
cookie.flush();
}
public function hitDownload(_arg1:MouseEvent){
var req:URLRequest;
var e = _arg1;
req = new URLRequest("http://www.newgrounds.com/downloads/flash/spewer.zip");
try {
navigateToURL(req, "_blank");
} catch(e:Error) {
trace("Navigate to URL failed", e.message);
};
}
public function gotoEd(_arg1:MouseEvent){
var req:URLRequest;
var e = _arg1;
req = new URLRequest("http://www.edmundm.com");
try {
navigateToURL(req, "_blank");
} catch(e:Error) {
trace("Navigate to URL failed", e.message);
};
}
public function enableBG(_arg1:MouseEvent){
showBG = (cookie.data.bg = true);
cookie.flush();
}
public function hitPlay(_arg1:MouseEvent){
gameMode = "story";
if (menu.loadBox.text.toLowerCase() == "i am a fag and a queer"){
unlockedLevel = Number.POSITIVE_INFINITY;
};
menu.playButton.removeEventListener(MouseEvent.CLICK, hitPlay);
menu.editButton.removeEventListener(MouseEvent.CLICK, hitPlay);
menu.newgrounds.removeEventListener(MouseEvent.CLICK, gotoNG);
stage.removeEventListener(Event.ENTER_FRAME, eFrame1);
menu.titleScreen.eliSite.removeEventListener(MouseEvent.CLICK, goto2D);
menu.titleScreen.edSite.removeEventListener(MouseEvent.CLICK, gotoEd);
menu.eraseShit.removeEventListener(MouseEvent.CLICK, hitErase);
menu.eraseBox.doneButton.removeEventListener(MouseEvent.CLICK, hitErase);
menu.downloadButton.removeEventListener(MouseEvent.CLICK, hitDownload);
menu.removeChild(menu.playButton);
menu.removeChild(menu.editButton);
menu.removeChild(menu.scanLines);
graphics.clear();
levelString = undefined;
editor = false;
intro.stop();
if (musicChannel != undefined){
musicChannel.stop();
musicSound = (musicChannel = (musicTransform = null));
};
gotoAndStop(2);
}
public function drawMap(_arg1, _arg2, _arg3, _arg4){
var _local5:*;
var _local6:*;
oQual = stage.quality;
stage.quality = StageQuality.HIGH;
fgBitmap.fillRect(new Rectangle((_arg1 * tileX), (_arg2 * tileY), (_arg3 * tileX), (_arg4 * tileY)), 0);
fgFilter.fillRect(new Rectangle((_arg1 * tileX), (_arg2 * tileY), (_arg3 * tileX), (_arg4 * tileY)), 0);
bgBitmap.fillRect(new Rectangle((_arg1 * tileX), (_arg2 * tileY), (_arg3 * tileX), (_arg4 * tileY)), 0);
movingTiles = new Array();
_local5 = _arg2;
while (_local5 < (_arg2 + _arg4)) {
if ((((_local5 >= 0)) && ((_local5 < map.length)))){
_local6 = _arg1;
while (_local6 < (_arg1 + _arg3)) {
if ((((_local6 >= 0)) && ((_local6 < map[0].length)))){
if (map[_local5][_local6] != 0){
genericTile = new tile();
genericMask = new tileMask();
genericTile.gotoAndStop(map[_local5][_local6]);
genericTile.x = (_local6 * tileX);
genericTile.y = (_local5 * tileY);
if (((!((map[_local5][_local6] == acidTile))) || ((editor == true)))){
if (tileTypes[map[_local5][_local6]] == 1){
fgBitmap.draw(genericTile, genericTile.transform.matrix);
genericMask.gotoAndStop(map[_local5][_local6]);
genericMask.x = (_local6 * tileX);
genericMask.y = (_local5 * tileY);
fgFilter.draw(genericMask, genericMask.transform.matrix);
} else {
if (tileTypes[map[_local5][_local6]] == 0){
bgBitmap.draw(genericTile, genericTile.transform.matrix);
};
};
} else {
genericTile.gotoAndStop(blankTile);
bgBitmap.draw(genericTile, genericTile.transform.matrix);
};
if ((((((((((((((map[_local5][_local6] == spikes1)) || ((map[_local5][_local6] == spikes2)))) || ((map[_local5][_local6] == spikes3)))) || ((map[_local5][_local6] == spikes4)))) || ((map[_local5][_local6] == conv1)))) || ((map[_local5][_local6] == conv2)))) || ((map[_local5][_local6] == acidTile)))){
movingTiles.push([_local5, _local6, map[_local5][_local6]]);
};
genericTile = null;
genericMask = null;
if (map[_local5][_local6] == conv1){
newArrow = new convArrow();
newArrow.x = ((_local6 * tileX) + (tileX / 2));
newArrow.y = ((_local5 * tileY) + (tileY / 2));
fgBitmap.draw(newArrow, newArrow.transform.matrix);
newArrow = null;
};
if (map[_local5][_local6] == conv2){
newArrow = new convArrow();
newArrow.x = ((_local6 * tileX) + (tileX / 2));
newArrow.y = ((_local5 * tileY) + (tileY / 2));
newArrow.scaleX = -1;
fgBitmap.draw(newArrow, newArrow.transform.matrix);
newArrow = null;
};
} else {
genericTile = new tile();
genericMask = new tileMask();
if ((((gameMode == "story")) && ((currentLevel == 54)))){
genericTile.gotoAndStop(emptyTile);
} else {
genericTile.gotoAndStop(blankTile);
};
genericTile.x = (_local6 * tileX);
genericTile.y = (_local5 * tileY);
bgBitmap.draw(genericTile, genericTile.transform.matrix);
};
};
_local6++;
};
};
_local5++;
};
stroke = new GlowFilter();
stroke.blurX = (stroke.blurY = 4);
stroke.color = 0x777777;
stroke.strength = 8;
stroke.quality = 1;
stroke.knockout = false;
fgFilter.applyFilter(fgFilter, new Rectangle(0, 0, sw, sh), new Point(0, 0), stroke);
_local5 = _arg2;
while (_local5 < (_arg2 + _arg4)) {
if ((((_local5 >= 0)) && ((_local5 < map.length)))){
_local6 = _arg1;
while (_local6 < (_arg1 + _arg3)) {
if ((((_local6 >= 0)) && ((_local6 < map[0].length)))){
if (map[_local5][_local6] != 0){
genericMask = new tileMask();
if (tileTypes[map[_local5][_local6]] == 1){
genericMask.gotoAndStop(map[_local5][_local6]);
genericMask.x = (_local6 * tileX);
genericMask.y = (_local5 * tileY);
fgFilter.draw(genericMask, genericMask.transform.matrix, null, "erase");
};
genericTile = null;
genericMask = null;
};
};
_local6++;
};
};
_local5++;
};
stage.quality = oQual;
}
public function jumpSound(){
if (sound){
if (jumpSoundTimer <= 0){
c = Math.floor((Math.random() * 4));
if (c == 0){
jumpingSound = jumpSound0;
} else {
if (c == 1){
jumpingSound = jumpSound1;
} else {
if (c == 2){
jumpingSound = jumpSound2;
} else {
if (c == 3){
jumpingSound = jumpSound3;
};
};
};
};
jumpingSound.play();
jumpSoundTimer = 4;
};
};
}
public function hitHelp(_arg1:MouseEvent){
HUD.helpMe.visible = (HUD.helpMe.visible == false);
}
public function hitCredits(_arg1:MouseEvent){
if (menu.titleScreen.currentFrame == 1){
menu.flasher.gotoAndPlay(2);
menu.titleScreen.gotoAndStop(2);
menu.titleScreen.eliSite.visible = true;
menu.titleScreen.edSite.visible = true;
menu.titleScreen.closeCredits.visible = true;
menu.titleScreen.closeCredits.addEventListener(MouseEvent.CLICK, closeCredits);
} else {
closeCredits(_arg1);
};
}
public function exitToTitle(_arg1:MouseEvent){
destroy(editor);
if (musicChannel != undefined){
musicChannel.stop();
musicSound = (musicChannel = (musicTransform = null));
};
map = undefined;
gotoAndStop(1);
}
public function editTheLevel(_arg1:MouseEvent){
HUD.editLevel.removeEventListener(MouseEvent.CLICK, editTheLevel);
editor = true;
destroy(0);
setup();
}
public function changePuke(_arg1){
if (((!((_arg1 == cPuke))) && (sound))){
powerSound.play();
};
if (_arg1 == 0){
if (cPuke != 0){
cPuke = 0;
if (cHero != undefined){
this[("poof" + q)] = new poof();
this[("poof" + q)].gotoAndStop(1);
this[("poof" + q)].x = cHero.x;
this[("poof" + q)].y = cHero.y;
this[("poof" + q)].rotation = ((Math.random() - 0.7) * 30);
poofs.push(("poof" + q));
game.addChild(this[("poof" + q)]);
q++;
};
HUD.pukeBar.gotoAndStop(1);
HUD.pukeFlash.gotoAndPlay(2);
};
};
if (_arg1 == 1){
if (cPuke != 1){
cPuke = 1;
if (cHero != undefined){
this[("poof" + q)] = new poof();
this[("poof" + q)].gotoAndStop(2);
this[("poof" + q)].x = cHero.x;
this[("poof" + q)].y = cHero.y;
this[("poof" + q)].rotation = ((Math.random() - 0.7) * 30);
poofs.push(("poof" + q));
game.addChild(this[("poof" + q)]);
q++;
};
HUD.pukeBar.gotoAndStop(2);
HUD.pukeFlash.gotoAndPlay(2);
};
};
if (_arg1 == 2){
if (cPuke != 2){
cPuke = 2;
if (cHero != undefined){
this[("poof" + q)] = new poof();
this[("poof" + q)].gotoAndStop(3);
this[("poof" + q)].x = cHero.x;
this[("poof" + q)].y = cHero.y;
this[("poof" + q)].rotation = ((Math.random() - 0.7) * 30);
poofs.push(("poof" + q));
game.addChild(this[("poof" + q)]);
q++;
};
HUD.pukeBar.gotoAndStop(3);
HUD.pukeFlash.gotoAndPlay(2);
};
};
if (_arg1 == 3){
if (cPuke != 3){
cPuke = 3;
if (cHero != undefined){
this[("poof" + q)] = new poof();
this[("poof" + q)].gotoAndStop(4);
this[("poof" + q)].x = cHero.x;
this[("poof" + q)].y = cHero.y;
this[("poof" + q)].rotation = ((Math.random() - 0.7) * 30);
poofs.push(("poof" + q));
game.addChild(this[("poof" + q)]);
q++;
};
HUD.pukeBar.gotoAndStop(4);
HUD.pukeFlash.gotoAndPlay(2);
};
};
if (_arg1 == 4){
if (cPuke != 4){
cPuke = 4;
if (cHero != undefined){
this[("poof" + q)] = new poof();
this[("poof" + q)].gotoAndStop(5);
this[("poof" + q)].x = cHero.x;
this[("poof" + q)].y = cHero.y;
this[("poof" + q)].rotation = ((Math.random() - 0.5) * 30);
poofs.push(("poof" + q));
game.addChild(this[("poof" + q)]);
q++;
};
HUD.pukeBar.gotoAndStop(5);
HUD.pukeFlash.gotoAndPlay(2);
};
};
}
public function squishSound(_arg1){
if (sound){
c = oldSquish;
while (c == oldSquish) {
c = Math.floor((Math.random() * 3));
};
if (c == 0){
this[("landingSound" + q)] = new land0();
} else {
if (c == 1){
this[("landingSound" + q)] = new land1();
} else {
if (c == 2){
this[("landingSound" + q)] = new land2();
} else {
if (c == 3){
this[("landingSound" + q)] = new land3();
};
};
};
};
oldSquish = c;
this[("landingChannel" + q)] = this[("landingSound" + q)].play();
this[("landingTransform" + q)] = this[("landingChannel" + q)].soundTransform;
this[("landingTransform" + q)].volume = _arg1;
this[("landingChannel" + q)].soundTransform = this[("landingTransform" + q)];
q++;
};
}
public function spawnHero(_arg1, _arg2){
cHero = new spewer();
cHero.x = _arg1;
cHero.y = _arg2;
cHero.bodyParts.body.stop();
cHero.rise = (cHero.run = 0);
cHero.scaleX = (cHero.scaleY = 0.9);
cHero.r = (14 * 0.9);
cHero.dir = 1;
cHero.thin = 0.8;
cHero.jumpCount = 0;
cHero.partHits = 0;
cHero.jumpFaceCount = 100;
cHero.faceWhole.gotoAndStop(1);
cHero.bodyParts.tail2.a = 0;
cHero.bodyParts.tail1.a = (Math.PI / 8);
cHero.bodyParts.foot1.rx = (cHero.bodyParts.foot1.tx = cHero.bodyParts.foot1.x);
cHero.bodyParts.foot1.ry = (cHero.bodyParts.foot1.ty = cHero.bodyParts.foot1.y);
cHero.bodyParts.foot2.rx = (cHero.bodyParts.foot2.tx = cHero.bodyParts.foot2.x);
cHero.bodyParts.foot2.ry = (cHero.bodyParts.foot2.ty = cHero.bodyParts.foot2.y);
cHero.cFoot = 1;
cHero.bodyParts.tail1.run = (cHero.bodyParts.tail1.rise = (cHero.bodyParts.tail2.run = (cHero.bodyParts.tail2.rise = 0)));
cHero.bodyParts.tail1.rx = (cHero.bodyParts.tail1.gx = cHero.bodyParts.tail1.x);
cHero.bodyParts.tail1.ry = (cHero.bodyParts.tail1.gy = cHero.bodyParts.tail1.y);
cHero.bodyParts.tail2.rx = (cHero.bodyParts.tail2.gx = cHero.bodyParts.tail2.x);
cHero.bodyParts.tail2.ry = (cHero.bodyParts.tail2.gy = cHero.bodyParts.tail2.y);
cHero.stroke = new GlowFilter();
cHero.stroke.blurX = (cHero.stroke.blurY = 4);
cHero.stroke.strength = 8;
cHero.stroke.quality = 1;
cHero.rMult = pukeColTrans[cPuke][0];
cHero.gMult = pukeColTrans[cPuke][1];
cHero.bMult = pukeColTrans[cPuke][2];
cHero.aMult = pukeColTrans[cPuke][3];
cHero.rOff = pukeColTrans[cPuke][4];
cHero.gOff = pukeColTrans[cPuke][5];
cHero.bOff = pukeColTrans[cPuke][6];
cHero.aOff = pukeColTrans[cPuke][7];
cHero.outRed = Number(("0x" + pukeColTrans[cPuke][8].substr(0, 2)));
cHero.outGreen = Number(("0x" + pukeColTrans[cPuke][8].substr(2, 2)));
cHero.outBlue = Number(("0x" + pukeColTrans[cPuke][8].substr(4, 2)));
cHero.bodyParts.transform.colorTransform = new ColorTransform(cHero.rMult, cHero.gMult, cHero.bMult, cHero.aMult, cHero.rOff, cHero.gOff, cHero.bOff, cHero.aOff);
cHero.stroke.color = (((Math.round(cHero.outRed) * 65536) + (Math.round(cHero.outGreen) * 0x0100)) + Math.round(cHero.outBlue));
cHero.filters = [cHero.stroke];
game.addChild(cHero);
}
public function gotoNG(_arg1:MouseEvent){
var req:URLRequest;
var e = _arg1;
req = new URLRequest("http://www.newgrounds.com");
try {
navigateToURL(req, "_blank");
} catch(e:Error) {
trace("Navigate to URL failed", e.message);
};
}
public function setMedium(_arg1:MouseEvent){
stage.quality = (cookie.data.qual = StageQuality.MEDIUM);
cookie.flush();
}
public function setup(){
if (gameMode == "story"){
kongregate.stats.submit("Level", (unlockedLevel + 1));
levelString = storyModeLevels[currentLevel];
};
stage.addEventListener(Event.ENTER_FRAME, eFrame);
stage.addEventListener(MouseEvent.MOUSE_DOWN, mDown);
stage.addEventListener(MouseEvent.MOUSE_UP, mUp);
stage.addEventListener(KeyboardEvent.KEY_DOWN, kDown);
stage.addEventListener(KeyboardEvent.KEY_UP, kUp);
jumpSoundTimer = 0;
if ((((gameMode == "story")) && ((currentLevel == 54)))){
if (musicChannel != undefined){
musicChannel.stop();
};
musicSound = new introSong();
if (sound){
musicChannel = musicSound.play(0, 99999999);
musicTransform = musicChannel.soundTransform;
musicTransform.volume = 0.2;
musicChannel.soundTransform = musicTransform;
};
};
if (musicSound == undefined){
musicSound = new music();
if (sound){
musicChannel = musicSound.play(0, 99999999);
musicTransform = musicChannel.soundTransform;
musicTransform.volume = 0.2;
musicChannel.soundTransform = musicTransform;
};
};
jumpSound0 = new jump0();
jumpSound1 = new jump1();
jumpSound2 = new jump2();
jumpSound3 = new jump3();
acidDeathSound = new acidSound();
click1 = new clickA();
click2 = new clickB();
death1 = new deathA();
death2 = new deathB();
death3 = new deathC();
death4 = new deathD();
monitor = new monitorSound();
levelWinSound = new winSound();
powerSound = new powerupSound();
sawDeathSound = new sawSound();
pukeSound = new pukeLoop();
pukeChannel = pukeSound.play(0, 99999999999999);
pukeTransform = pukeChannel.soundTransform;
pukeTransform.volume = (pukeVolume = 0);
pukeChannel.soundTransform = pukeTransform;
acidLoopSound = new acidLoop();
acidChannel = acidLoopSound.play(0, 99999999999999);
acidTransform = acidChannel.soundTransform;
acidTransform.volume = (acidVolume = 0);
acidChannel.soundTransform = acidTransform;
slurpSound = new slurp();
slurpChannel = slurpSound.play(0, 99999999999999);
slurpTransform = slurpChannel.soundTransform;
slurpTransform.volume = (slurpVolume = 0);
slurpChannel.soundTransform = slurpTransform;
waterSound = new underwater();
waterChannel = waterSound.play(0, 99999999999999);
waterTransform = waterChannel.soundTransform;
waterTransform.volume = (waterVolume = 0);
waterChannel.soundTransform = waterTransform;
HUD = new headsUpDisplay();
HUD.levelProps.radios = new radioButtons();
HUD.levelProps.radios.x = 75.5;
HUD.levelProps.radios.y = 33.2;
HUD.mapScreen.gy = -420;
HUD.mapScreen.rise = 0;
HUD.mapScreen.settle = false;
HUD.mapScreen.returnToGame.visible = false;
HUD.mapScreen.restartLevel.visible = false;
HUD.mapScreen.exitToTitle.visible = false;
HUD.mapScreen.options.visible = false;
HUD.mapScreen.returnToGame.addEventListener(MouseEvent.CLICK, unPause);
HUD.mapScreen.restartLevel.addEventListener(MouseEvent.CLICK, restartLevel);
HUD.mapScreen.exitToTitle.addEventListener(MouseEvent.CLICK, exitToTitle);
HUD.mapScreen.options.AAHigh.addEventListener(MouseEvent.CLICK, setHigh);
HUD.mapScreen.options.AAMedium.addEventListener(MouseEvent.CLICK, setMedium);
HUD.mapScreen.options.AALow.addEventListener(MouseEvent.CLICK, setLow);
HUD.mapScreen.options.enableBG.addEventListener(MouseEvent.CLICK, enableBG);
HUD.mapScreen.options.disableBG.addEventListener(MouseEvent.CLICK, disableBG);
HUD.mapScreen.options.enableSound.addEventListener(MouseEvent.CLICK, enableSound);
HUD.mapScreen.options.disableSound.addEventListener(MouseEvent.CLICK, disableSound);
HUD.mapScreen.gotoAndStop(1);
HUD.levelProps.visible = false;
HUD.tutorial.visible = false;
HUD.helpMe.visible = false;
if (gameMode == "story"){
tutorialMessages = [[0, "<font color=\"#AA0000\">Move around with the W, A, D, and S keys.</font><br>If you mess up, <font color=\"#AA0000\">press R to reset the level</font>.<br>You can <font color=\"#AA0000\">pause the game by pressing p or esc</font>."], [2, "Don't be afraid of getting your feet wet, Spewer. You are a natural born swimmer."], [3, "If you <font color=\"#AA0000\">hold the mouse button</font>, you can vomit in the direction of the mouse cursor. You can also press the <font color=\"#AA0000\">Spacebar</font> to eat it back up."], [4, "If you need to jump higher, <font color=\"#AA0000\">puke downwards as you jump.</font>"], [10, "<br>Chapter 1 completed."], [21, "<br>Chapter 2 completed."], [32, "<br>Chapter 3 completed."], [43, "<br>Chapter 4 completed."], [11, "You can eat things other than your own vomit. Pills will make you throw up in new and possibly exciting ways. Fruit fills you up and tastes great."]];
i = 0;
while (i < tutorialMessages.length) {
if (tutorialMessages[i][0] == currentLevel){
HUD.tutorial.visible = true;
HUD.tutorial.tutDisp.htmlText = tutorialMessages[i][1];
break;
};
i++;
};
};
keysDown = new Array();
particles = new Array();
bubbles = new Array();
objects = new Array();
doors = new Array();
steams = new Array();
poofs = new Array();
mapBoxes = new Array();
q = 0;
cPuke = 0;
if (defaultType != undefined){
cPuke = defaultType;
HUD.levelProps.radios.greenRadio.group.selectedData = String(cPuke);
};
cTile = 1;
cDoor = 0;
activeVomit = (totalVomit = 0);
if (defaultVomit != undefined){
totalVomit = defaultVomit;
HUD.levelProps.defaultPuke.value = defaultVomit;
};
levelCompleted = false;
edSubMode = 0;
edMode = 0;
spewerIsDead = false;
playerKilled = false;
pauseGame = false;
sw = 600;
sh = 420;
cutscene = false;
stageX = 600;
stageY = 450;
teleLength = (telePos = (346.9 - 20));
oTelePos = 0;
telePieceWidth = 30;
teleBaseX = 390.8;
teleY = 15;
teleRun = 0;
hitJump = false;
jumps = 0;
steps = 0;
resetLevel = false;
telePieces = new Array();
acidTiles = [];
pukeAlpha = [0.7, 0];
tileX = (tileY = 30);
tilesX = Math.ceil((sw / tileX));
tilesY = Math.ceil((sh / tileY));
pukeColor = [3689779, 6167066, 0xFFFFFF, 0, 0xFFCC00, 0, 0, 0, 0, 0, 0];
pukeForce = [15, 20, 15, 15, 15, 0, 0, 0, 0, 0, 0];
pukeKickback = [1, 2, 1, 1, 1, 0, 0, 0, 0, 0, 0];
pukeColTrans = [[1, 1, 1, 1, 72, 55, 55, 0, "7A3030"], [1, 1, 1, 1, 76, -34, -34, 0, "9B3131"], [1, 1, 1, 1, 127, 127, 127, 0, "AEAEAE"], [1, 1, 1, 1, -51, -51, -51, 0, "333333"], [1, 1, 1, 1, 127, 127, 76, 0, "FFCC00"], [0, 0, 0, 0, 0, 0, 0, 0, "000000"], [0, 0, 0, 0, 0, 0, 0, 0, "000000"], [0, 0, 0, 0, 0, 0, 0, 0, "000000"], [0, 0, 0, 0, 0, 0, 0, 0, "000000"], [0, 0, 0, 0, 0, 0, 0, 0, "000000"], [0, 0, 0, 0, 0, 0, 0, 0, "000000"]];
if (map == undefined){
map = new Array();
bytes = new ByteArray();
bytes = Base64.decodeToByteArray(levelString);
bytes.uncompress();
levelString = bytes.toString();
s = levelString.indexOf(";");
n = levelString.substring(0, s);
n = n.split(",");
i = 0;
while (i < tilesY) {
map[i] = n.slice((i * tilesX), ((i * tilesX) + tilesX));
i++;
};
n = levelString.indexOf(";", (s + 1));
levelName = levelString.substring((s + 1), n);
s = n;
n = levelString.indexOf(";", (s + 1));
totalVomit = Number(levelString.substring((s + 1), n));
HUD.levelProps.defaultPuke.value = totalVomit;
defaultVomit = totalVomit;
s = n;
n = levelString.indexOf(";", (s + 1));
cPuke = Number(levelString.substring((s + 1), n));
HUD.levelProps.radios.greenRadio.group.selectedData = String(cPuke);
defaultType = cPuke;
s = n;
n = levelString.indexOf(",", (s + 1));
cx = Number(levelString.substring((s + 1), n));
s = n;
n = levelString.indexOf(";", (s + 1));
cy = Number(levelString.substring((s + 1), n));
s = (n + 1);
n = levelString.indexOf(";", s);
s2 = levelString.substring(s, n);
defaultParticles = s2.split("^");
defaultParticles.pop();
i = 0;
while (i < defaultParticles.length) {
defaultParticles[i] = defaultParticles[i].split(",");
j = 0;
while (j < defaultParticles[i].length) {
defaultParticles[i][j] = Number(defaultParticles[i][j]);
j++;
};
i++;
};
s = (n + 1);
n = levelString.indexOf(";", s);
s2 = levelString.substring(s, n);
defaultObjects = s2.split("^");
defaultObjects.pop();
i = 0;
while (i < defaultObjects.length) {
defaultObjects[i] = defaultObjects[i].split(",");
j = 0;
while (j < defaultObjects[i].length) {
defaultObjects[i][j] = Number(defaultObjects[i][j]);
j++;
};
i++;
};
s = (n + 1);
s2 = levelString.substring(s);
switches = s2.split("^");
switches.pop();
i = 0;
while (i < switches.length) {
if (switches[i].length > 0){
switches[i] = switches[i].split(",");
j = 0;
while (j < switches[i].length) {
switches[i][j] = Number(switches[i][j]);
j++;
};
} else {
switches[i] = new Array();
};
i++;
};
};
if (levelName.length == 0){
defaultLevelNames = ["My Dumb Level", "A Boring Level", "A Mediocre Level", "My Horrid Level", "A Stupid Level", "The Worst Level"];
levelName = (HUD.levelProps.levelName.text = defaultLevelNames[Math.floor((Math.random() * defaultLevelNames.length))]);
} else {
HUD.levelProps.levelName.text = levelName;
};
HUD.levelProps.levelName.restrict = "a-zA-Z \"'0-9/.,()\\-+_=!@#$%\\^&*`~<>[]{}\\|?:";
HUD.nameDisplay.text = levelName;
if (HUD.nameDisplay.textHeight > 20){
HUD.nameDisplay.y = 417;
} else {
HUD.nameDisplay.y = 425;
};
fgBitmap = new BitmapData(sw, sh, true, 0);
fgFilter = new BitmapData(sw, sh, true, 0);
bgBitmap = new BitmapData(sw, sh, true, 0);
fgClip = new Bitmap(fgBitmap);
bgClip = new Bitmap(bgBitmap);
filterClip = new Bitmap(fgFilter);
tileTypes = [0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
tooltips = [["Cockbomb", "A plain old boring wall tile. Doesn't do much.", "A wall tile with a stylish computer console. It's got to be the smallest screen in the history of electricity.", "Another wall tile. Awesome, yeah?", "A wall tile with some fancy looking flourishes.", "A wall tile with a dashed border. Sort of reminds me of ants. That are marching.", "Another dashed-border wall tile, but a little darker.", "A floor tile that transitions into an \"outside the level\" wall.", "A tile with a little hole in it, behind which is a standard wall tile.", "A tile with a hole that shows the world behind the tank through the center.", "A wall section with a horizontal pipe. The pipe is only there for effect. Sorry.", "A wall section with a vertical pipe. The pipe is still only there for effect.", "A corner piece for the pipe tiles.", "A corner piece for the pipe tiles.", "A corner piece for the pipe tiles.", "A corner piece for the pipe tiles.", "A very plain wall tile. Useful for filling in areas that are considered to be outside the level.", "Another \"outside the level\" tile. A little lighter.", "Deadly, deadly grinders! Be careful, Spewer!", "Deadly, deadly grinders! Be careful, Spewer!", "Deadly, deadly grinders! Be careful, Spewer!", "Deadly, deadly grinders! Be careful, Spewer!", "Acid tile-If Spewer sprays acid vomit on this tile, it will melt away. Sort of tragic, if you ask me.", "A conveyor belt. Great for pushing stuff around, I guess.", "Another conveyor belt, but in the other direction. Equally great for pushing stuff around.", "A completely empty tile, revealing the room behind the tank.", "The plain old boring background tile. Pro-tip: When editing tiles, hold space to set the current tile to this background.", "A background tile that gives a tiny view to the outside world.", "Another background tile that shows off the view, but oriented vertically.", "A background tile with one horizontal line.", "A background tile with one vertical line.", "A background tile with a horizontal pipe.", "A background tile with a vertical pipe.", "A corner piece for the background pipes.", "A corner piece for the background pipes.", "A corner piece for the background pipes.", "A corner piece for the background pipes.", "A background tile with nothing but one little dot in the middle. How desolate.", "A background tile with a little widget in the corner. Count it as one piece of flair.", "A background tile with a little widget in the corner. It's also one piece of flair.", "A background tile with a little widget in the corner. Eh, I guess we can count it as one piece of flair.", "A background tile with a little widget in the corner. Like its brothers, it's one piece of flair.", "A background tile with a quarter missing, showing the room behind the tank.", "A background tile with a quarter missing, showing the room behind the tank.", "A background tile with a quarter missing, showing the room behind the tank.", "A background tile with a quarter missing, showing the room behind the tank.", "The end of a background cable. It's got a little nubbin at the tip.", "The end of a background cable. It's got a little nubbin at the tip.", "The end of a background cable. It's got a little nubbin at the tip.", "The end of a background cable. It's got a little nubbin at the tip.", "A background cable.", "A background cable.", "A corner piece for a background cable.", "A corner piece for a background cable.", "A corner piece for a background cable.", "A corner piece for a background cable.", "A background frame tile with a cable extending out from it.", "A background frame tile with a cable extending out from it.", "A background frame tile with a cable extending out from it.", "A background frame tile with a cable extending out from it.", "A background frame tile, shaped into a corner.", "A background frame tile, shaped into a corner.", "A background frame tile, shaped into a corner.", "A background frame tile, shaped into a corner.", "A background frame tile.", "A background frame tile.", "A background frame tile.", "A background frame tile.", "An unfortunate reminder of the nature of the testing environment.", "An unfortunate reminder of the nature of the testing environment.", "An unfortunate reminder of the nature of the testing environment.", "An unfortunate reminder of the nature of the testing environment."], ["It's Spewer! Put him anywhere you want the player to start the level."], ["Standard green puke. Debatably gross. Hold shift to run the fluid sim.", "Red puke. Sprays harder than green, but otherwise, behaves the same. Hold shift to run the fluid sim.", "Strange grey puke. Somehow, it floats in the air. Hold shift to run the fluid sim.", "Black, tarry puke. Dries very quickly, creating bridges. Hold shift to run the fluid sim.", "Terrifying acidic puke. Burns through certain tiles. Hold shift to run the fluid sim.", "Vomit Pill. Eat this to gain more total puke!", "The Green Pill. Eat it to switch to standard green puke.", "The Red Pill. A possible movie reference. Eat it to switch to Rocket Puke.", "The White Pill. Possibly lightly hallucinogenic. Eat this to switch to Floater Puke.", "The Black Pill. Kind of menacing. Eat this to switch to Tar Puke.", "The Yellow Pill. Either tastes like mild lemons or battery acid. Eat this to switch to Acid Puke."], ["A switch. Place this, set its rotation, and then connect it with a wire to a door. Hi-technical, excellent!", "A puke button. Opens doors and grates like a regular switch, but activates with fluid instead of a button press.", "A door, to be used with a switch. Connect the two with a wire.", "A wire! Click on a switch and then a door to connect them. Wires are invisible when playing the game.", "The goal-make sure you have at least one. If a switch is connected, the player will have to open the door manually.", "A grate. Spewer can't pass through it until it's been opened by a switch (like a regular door), but everything else can."]];
blankTile = 26;
conv1 = 23;
conv2 = 24;
spikes1 = 18;
spikes2 = 19;
spikes3 = 20;
spikes4 = 21;
acidTile = 22;
partSet = 0;
emptyTile = 25;
drawMap(0, 0, map[0].length, map.length);
gravity = 0.5;
c = 0;
checkingFluid = false;
blink = 100;
decay = 0.98;
spacialSize = 16;
spacialRecip = (1 / spacialSize);
clicking = false;
game = new MovieClip();
addChild(game);
cBack = undefined;
if (editor == false){
chapterEnd = false;
if (gameMode == "story"){
if (((currentLevel + 1) % 11) == 0){
chapterEnd = true;
};
};
if ((((showBG == true)) || ((chapterEnd == true)))){
this[("bg" + q)] = new backgroundAnimation();
cBack = ("bg" + q);
game.addChild(this[cBack]);
this[("bg" + q)].doc.gotoAndStop((1 + Math.floor((Math.random() * 4))));
q++;
};
};
game.addChild(bgClip);
i = 0;
while (i < defaultObjects.length) {
if (defaultObjects[i][2] == 2){
tar = (this[("goal" + q)] = new goalDoor());
objects.push(("goal" + q));
doors.push(("goal" + q));
if ((((gameMode == "story")) && ((currentLevel == 54)))){
tar.visible = false;
};
if (editor){
tar.stop();
};
game.addChild(tar);
game.setChildIndex(tar, (game.numChildren - 1));
q++;
} else {
if (defaultObjects[i][2] == 4){
tar = (this[("gate" + q)] = new gate());
objects.push(("gate" + q));
doors.push(("gate" + q));
tar.stop();
} else {
if (defaultObjects[i][2] == 0){
tar = (this[("switch" + q)] = new doorSwitch());
tar.rotation = (defaultObjects[i][3] * 90);
tar.stop();
objects.push(("switch" + q));
} else {
if (defaultObjects[i][2] == 5){
tar = (this[("switch" + q)] = new pukeButton());
tar.rotation = (defaultObjects[i][3] * 90);
tar.switched = false;
tar.stop();
objects.push(("switch" + q));
} else {
if (defaultObjects[i][2] == 1){
tar = (this[("door" + q)] = new door());
tar.stop();
objects.push(("door" + q));
doors.push(("door" + q));
};
};
};
};
};
tar.x = defaultObjects[i][0];
tar.y = defaultObjects[i][1];
tar.t = defaultObjects[i][2];
q++;
i++;
};
if (editor == false){
spawnHero(cx, cy);
};
particleBitmap = new BitmapData(sw, sh, true, 0);
tempBitmap = new BitmapData(sw, sh, true, 0);
particleClip = new Bitmap(particleBitmap);
game.addChild(particleClip);
genericDraw = new MovieClip();
game.addChild(fgClip);
if (editor == false){
teleEndClip = new teleEnd();
teleEndClip.y = teleY;
HUD.barCont.addChild(teleEndClip);
teleEndClip.x = (teleBaseX - teleLength);
c = 0;
i = (teleBaseX - teleLength);
while (i < teleBaseX) {
tar = (this[("tele" + q)] = new telePiece());
tar.gotoAndStop(Math.ceil((Math.random() * tar.totalFrames)));
tar.x = i;
tar.y = teleY;
tar.scaleX = (telePieceWidth / 50);
tar.scaleY = (0.5 + (c * 0.05));
tar.i = (teleBaseX - i);
HUD.barCont.addChild(tar);
telePieces.push(("tele" + q));
q++;
c++;
i = (i + telePieceWidth);
};
HUD.pukeBar.gotoAndStop(1);
i = 0;
while (i < movingTiles.length) {
tar = (this[("tile" + q)] = new tile());
tar.x = (movingTiles[i][1] * tileX);
tar.y = (movingTiles[i][0] * tileY);
tar.gotoAndStop(movingTiles[i][2]);
game.addChild(tar);
if (movingTiles[i][2] == acidTile){
acidTiles.push([movingTiles[i][0], movingTiles[i][1], ("tile" + q)]);
};
q++;
i++;
};
game.addChild(filterClip);
HUD.edHUD.visible = false;
HUD.editorOutput.visible = false;
HUD.outputButton.visible = false;
HUD.helpButton.visible = false;
if (gameMode == "story"){
HUD.editLevel.visible = false;
} else {
HUD.editLevel.visible = true;
};
HUD.testLevel.visible = false;
HUD.propsButton.visible = false;
HUD.editLevel.addEventListener(MouseEvent.CLICK, editTheLevel);
} else {
setTooltip();
HUD.edHUD.visible = true;
HUD.testLevel.visible = true;
HUD.propsButton.visible = true;
HUD.editLevel.visible = false;
HUD.testLevel.addEventListener(MouseEvent.CLICK, testTheLevel);
HUD.propsButton.addEventListener(MouseEvent.CLICK, toggleProps);
tileDisplay = new tileDisp();
tileDisplay.x = (stageX - 150);
tileDisplay.y = (stageY - 30);
tar = new tile();
tilesBitmap = new BitmapData((tar.totalFrames * tileX), 120, false, 0);
tilesClip = new Bitmap(tilesBitmap);
tilesClip.y = -90;
tileDisplay.tiles.addChild(tilesClip);
i = 1;
while (i <= tar.totalFrames) {
tar.gotoAndStop(i);
tar.x = ((i * tileX) - tileX);
tar.y = 90;
tilesBitmap.draw(tar, tar.transform.matrix);
if (i == conv1){
newArrow = new convArrow();
newArrow.x = ((i * tileX) - (tileX / 2));
newArrow.y = 105;
tilesBitmap.draw(newArrow, newArrow.transform.matrix);
newArrow = null;
};
if (i == conv2){
newArrow = new convArrow();
newArrow.x = ((i * tileX) - (tileX / 2));
newArrow.y = 105;
newArrow.scaleX = -1;
tilesBitmap.draw(newArrow, newArrow.transform.matrix);
newArrow = null;
};
i++;
};
i = 0;
while (i < pukeColor.length) {
tar = new MovieClip();
tar.graphics.beginFill(pukeColor[i]);
tar.graphics.drawCircle(((i * 30) + 15), 45, 10);
tar.graphics.endFill();
tilesBitmap.draw(tar);
i++;
};
tar = new pillGraphic();
tar.gotoAndStop(1);
tar.x = 165;
tar.y = 45;
tilesBitmap.draw(tar, tar.transform.matrix);
tar.gotoAndStop(2);
tar.x = 195;
tar.y = 45;
tilesBitmap.draw(tar, tar.transform.matrix);
tar.gotoAndStop(3);
tar.x = 225;
tar.y = 45;
tilesBitmap.draw(tar, tar.transform.matrix);
tar.gotoAndStop(4);
tar.x = 0xFF;
tar.y = 45;
tilesBitmap.draw(tar, tar.transform.matrix);
tar.gotoAndStop(5);
tar.x = 285;
tar.y = 45;
tilesBitmap.draw(tar, tar.transform.matrix);
tar.gotoAndStop(6);
tar.x = 315;
tar.y = 45;
tilesBitmap.draw(tar, tar.transform.matrix);
tar = new spewer();
tar.x = 75;
tar.y = 75;
tar.rMult = pukeColTrans[0][0];
tar.gMult = pukeColTrans[0][1];
tar.bMult = pukeColTrans[0][2];
tar.aMult = pukeColTrans[0][3];
tar.rOff = pukeColTrans[0][4];
tar.gOff = pukeColTrans[0][5];
tar.bOff = pukeColTrans[0][6];
tar.aOff = pukeColTrans[0][7];
tar.outRed = Number(("0x" + pukeColTrans[0][8].substr(0, 2)));
tar.outGreen = Number(("0x" + pukeColTrans[0][8].substr(2, 2)));
tar.outBlue = Number(("0x" + pukeColTrans[0][8].substr(4, 2)));
tar.bodyParts.transform.colorTransform = new ColorTransform(tar.rMult, tar.gMult, tar.bMult, tar.aMult, tar.rOff, tar.gOff, tar.bOff, tar.aOff);
tilesBitmap.draw(tar, tar.transform.matrix);
tileDisplay.tiles.x = 60;
tar = new doorSwitch();
tar.x = 15;
tar.y = 17;
tar.scaleX = (tar.scaleY = 0.7);
tilesBitmap.draw(tar, tar.transform.matrix);
tar = new pukeButton();
tar.x = 45;
tar.y = 17;
tar.scaleX = (tar.scaleY = 0.7);
tilesBitmap.draw(tar, tar.transform.matrix);
tar = new door();
tar.x = 75;
tar.y = 15;
tar.scaleX = (tar.scaleY = 0.8);
tilesBitmap.draw(tar, tar.transform.matrix);
tar = new goalDoor();
tar.x = 135;
tar.y = 15;
tar.scaleX = (tar.scaleY = 0.8);
tilesBitmap.draw(tar, tar.transform.matrix);
tar = new MovieClip();
tar.graphics.lineStyle(2, 0xFFFF00);
tar.graphics.moveTo(90, 15);
tar.graphics.lineTo(120, 15);
tilesBitmap.draw(tar);
tar = new gate();
tar.x = 165;
tar.y = 15;
tar.scaleX = (tar.scaleY = 0.8);
tilesBitmap.draw(tar, tar.transform.matrix);
tar = null;
HUD.addChild(tileDisplay);
HUD.editorOutput.visible = true;
HUD.outputButton.visible = true;
HUD.helpButton.visible = true;
HUD.outputButton.addEventListener(MouseEvent.CLICK, outputLevel);
HUD.helpButton.addEventListener(MouseEvent.CLICK, hitHelp);
heroSpawn = new spewer();
heroSpawn.x = cx;
heroSpawn.y = cy;
heroSpawn.scaleX = (heroSpawn.scaleY = 0.9);
heroSpawn.faceWhole.stop();
heroSpawn.faceWhole.face.stop();
heroSpawn.faceWhole.face.eye1.stop();
heroSpawn.faceWhole.face.eye2.stop();
heroSpawn.bodyParts.body.stop();
heroSpawn.rMult = pukeColTrans[0][0];
heroSpawn.gMult = pukeColTrans[0][1];
heroSpawn.bMult = pukeColTrans[0][2];
heroSpawn.aMult = pukeColTrans[0][3];
heroSpawn.rOff = pukeColTrans[0][4];
heroSpawn.gOff = pukeColTrans[0][5];
heroSpawn.bOff = pukeColTrans[0][6];
heroSpawn.aOff = pukeColTrans[0][7];
heroSpawn.outRed = Number(("0x" + pukeColTrans[0][8].substr(0, 2)));
heroSpawn.outGreen = Number(("0x" + pukeColTrans[0][8].substr(2, 2)));
heroSpawn.outBlue = Number(("0x" + pukeColTrans[0][8].substr(4, 2)));
heroSpawn.bodyParts.transform.colorTransform = new ColorTransform(heroSpawn.rMult, heroSpawn.gMult, heroSpawn.bMult, heroSpawn.aMult, heroSpawn.rOff, heroSpawn.gOff, heroSpawn.bOff, heroSpawn.aOff);
game.addChild(heroSpawn);
};
i = 0;
while (i < defaultParticles.length) {
makeParticle(defaultParticles[i][0], defaultParticles[i][1], defaultParticles[i][2], defaultParticles[i][3]);
i++;
};
totalVomit = (totalVomit + activeVomit);
if (totalVomit > 100){
totalVomit = 100;
};
i = 0;
while (i < objects.length) {
tar = this[objects[i]];
if (tar.t != 2){
game.addChild(tar);
};
i++;
};
if (editor){
i = 0;
while (i < switches.length) {
tar = this[objects[i]];
if ((((tar.t == 0)) || ((tar.t == 5)))){
game.setChildIndex(tar, (game.numChildren - 1));
};
tar.drawing = new MovieClip();
tar.addChild(tar.drawing);
tar.drawing2 = new MovieClip();
tar.addChild(tar.drawing2);
tar.drawing2.rotation = -(tar.rotation);
tar.drawing2.graphics.lineStyle(2, 0xFFFF00);
if (switches[i].length > 0){
j = 0;
while (j < switches[i].length) {
tar2 = this[doors[switches[i][j]]];
tx = Math.floor((tar2.x / tileX));
ty = Math.floor((tar2.y / tileY));
tar.drawing2.graphics.moveTo(0, 0);
tar.drawing2.graphics.lineTo((((tx * tileX) - tar.x) + (tileX / 2)), (((ty * tileY) - tar.y) + (tileY / 2)));
j++;
};
};
i++;
};
updateParticles(0);
};
i = 0;
while (i < switches.length) {
if (switches[i].length > 0){
j = 0;
while (j < switches[i].length) {
tar2 = this[doors[switches[i][j]]];
tar2.gotoAndStop(1);
j++;
};
};
i++;
};
addChild(HUD);
setChildIndex(medal_popup, (numChildren - 1));
HUD.levelProps.addChild(HUD.levelProps.radios);
if (editor){
HUD.grid = new MovieClip();
HUD.addChild(HUD.grid);
HUD.setChildIndex(HUD.grid, 0);
HUD.grid.cacheAsBitmap = true;
HUD.grid.graphics.lineStyle(2, 0xFFFFFF, 0.2);
i = 1;
while (i < tilesX) {
HUD.grid.graphics.moveTo((i * tileX), 0);
HUD.grid.graphics.lineTo((i * tileX), sh);
i++;
};
j = 1;
while (j < tilesY) {
HUD.grid.graphics.moveTo(0, (j * tileY));
HUD.grid.graphics.lineTo(sw, (j * tileY));
j++;
};
HUD.setChildIndex(HUD.levelProps, (HUD.numChildren - 1));
};
HUD.pukeBar.gotoAndStop((cPuke + 1));
stage.focus = stage;
}
public function sortY(_arg1, _arg2){
if (this[_arg1].y < this[_arg2].y){
return (-1);
};
if (this[_arg1].y > this[_arg2].y){
return (1);
};
return (0);
}
public function toggleProps(_arg1:MouseEvent){
HUD.levelProps.visible = (HUD.levelProps.visible == false);
}
public function findLevelName(_arg1){
levelString = storyModeLevels[_arg1];
bytes = new ByteArray();
bytes = Base64.decodeToByteArray(levelString);
bytes.uncompress();
levelString = bytes.toString();
s = levelString.indexOf(";");
n = levelString.substring(0, s);
n = levelString.indexOf(";", (s + 1));
return (levelString.substring((s + 1), n));
}
public function sortX(_arg1, _arg2){
if (this[_arg1].x < this[_arg2].x){
return (-1);
};
if (this[_arg1].x > this[_arg2].x){
return (1);
};
return (0);
}
public function makeParticle(_arg1, _arg2, _arg3, _arg4){
checkingFluid = true;
if ((((checkTile(_arg1, _arg2) == 0)) || (true))){
if (_arg3 < 5){
activeVomit++;
};
tar = (this[("part" + q)] = new MovieClip());
tar.x = (tar.ox1 = _arg1);
tar.y = (tar.oy1 = _arg2);
tar.rise = (tar.run = 0);
tar.virgin = true;
tar.swallow = false;
tar.s = 25;
tar.t = _arg3;
tar.life = 0;
tar.r = ((Math.random() * 3) + 7);
tar.surrounds = _arg4;
if (_arg4 == 0){
tar.surrounds = 0.5;
};
if (_arg3 < 5){
myMatrix = new Matrix();
myMatrix.scale(0.025, 0.025);
tar.col = pukeColor[_arg3];
tar.graphics.beginGradientFill(GradientType.RADIAL, [tar.col, tar.col], pukeAlpha, [50, 0xFF], myMatrix);
tar.graphics.drawCircle(0, 0, 18);
tar.graphics.endFill();
} else {
tar.graphic = new pillGraphic();
tar.graphic.gotoAndStop((_arg3 - 4));
if (_arg3 == 5){
tar.graphic.anim.gotoAndStop(Math.ceil((Math.random() * tar.graphic.anim.totalFrames)));
tar.rotation = (Math.random() * 360);
};
tar.addChild(tar.graphic);
};
tar.q = q;
particles.push(("part" + q));
q++;
return (tar);
};
checkingFluid = false;
}
public function mDown(_arg1:MouseEvent){
if (editor == false){
clicking = true;
} else {
if (HUD.levelProps.visible){
if (HUD.levelProps.hitTestPoint(mouseX, mouseY) == false){
if (mouseY < 420){
HUD.levelProps.visible = false;
};
};
} else {
clicking = true;
};
};
}
public function restartLevel(_arg1:MouseEvent){
destroy(false);
setup();
HUD.mapScreen.y = 0;
HUD.mapScreen.settle = true;
HUD.mapScreen.gotoAndStop(3);
HUD.mapScreen.returnToGame.visible = true;
HUD.mapScreen.restartLevel.visible = true;
HUD.mapScreen.exitToTitle.visible = true;
HUD.mapScreen.options.visible = true;
}
public function hitErase(_arg1:MouseEvent){
if (menu.eraseBox.visible == false){
menu.eraseBox.visible = true;
stage.focus = menu.eraseBox.textBox;
} else {
if (menu.eraseBox.textBox.text.toLowerCase() == "delete"){
cookie.data.bg = true;
cookie.data.sound = true;
cookie.data.unlockedLevel = 0;
cookie.data.qual = StageQuality.MEDIUM;
cookie.flush();
showBG = true;
sound = true;
musicSound = undefined;
unlockedLevel = (currentLevel = 0);
stage.quality = StageQuality.MEDIUM;
menu.winner.play();
} else {
menu.failed.play();
};
menu.eraseBox.visible = false;
};
}
public function unPause(_arg1:MouseEvent){
pauseGame = false;
}
public function goto2D(_arg1:MouseEvent){
var req:URLRequest;
var e = _arg1;
req = new URLRequest("http://www.2DArray.net");
try {
navigateToURL(req, "_blank");
} catch(e:Error) {
trace("Navigate to URL failed", e.message);
};
}
public function outputLevel(_arg1:MouseEvent){
if (editor == true){
n = "";
i = 0;
while (i < map.length) {
n = (n + map[i]);
if (i != (map.length - 1)){
n = (n + ",");
} else {
n = (n + ";");
};
i++;
};
n = (n + (HUD.levelProps.levelName.text + ";"));
n = (n + (String(HUD.levelProps.defaultPuke.value) + ";"));
n = (n + (String(HUD.levelProps.radios.greenRadio.group.selectedData) + ";"));
n = (n + (((heroSpawn.x + ",") + heroSpawn.y) + ";"));
i = 0;
while (i < particles.length) {
tar = this[particles[i]];
if (checkTile(tar.x, tar.y)){
n = (n + ((((((tar.x + ",") + tar.y) + ",") + tar.t) + ",") + tar.surrounds));
} else {
n = (n + ((((((tar.ox1 + ",") + tar.oy1) + ",") + tar.t) + ",") + tar.surrounds));
};
n = (n + "^");
i++;
};
n = (n + ";");
i = 0;
while (i < objects.length) {
tar = this[objects[i]];
n = (n + ((((tar.x + ",") + tar.y) + ",") + tar.t));
if ((((tar.t == 0)) || ((tar.t == 5)))){
n = (n + ("," + (tar.rotation / 90)));
};
n = (n + "^");
i++;
};
n = (n + ";");
i = 0;
while (i < switches.length) {
n = (n + (switches[i] + "^"));
i++;
};
trace(n.length);
bytes = new ByteArray();
bytes.writeUTFBytes(n);
bytes.compress();
n = Base64.encodeByteArray(bytes);
HUD.editorOutput.text = n;
trace(n.length);
trace(particles.length);
};
}
public function kill(){
if (cHero != undefined){
this[("death" + (Math.floor((Math.random() * 4)) + 1))].play();
cHero.jumpCount = 0;
cBody = new deadBody();
cTail1 = new deadTail1();
cTail2 = new deadTail2();
cBody.x = cHero.x;
cBody.y = cHero.y;
cTail1.x = cHero.x;
cTail1.y = cHero.y;
cTail2.x = cHero.x;
cTail2.y = cHero.y;
game.addChild(cTail2);
game.addChild(cTail1);
game.addChild(cBody);
cBody.run = ((Math.random() - 0.5) * 10);
cBody.rise = ((Math.random() - 1) * 10);
cTail1.run = ((Math.random() - 0.5) * 10);
cTail1.rise = ((Math.random() - 1) * 10);
cTail2.run = ((Math.random() - 0.5) * 10);
cTail2.rise = ((Math.random() - 1) * 10);
this[("poof" + q)] = new poof();
this[("poof" + q)].gotoAndStop(6);
this[("poof" + q)].x = cHero.x;
this[("poof" + q)].y = cHero.y;
this[("poof" + q)].rotation = ((Math.random() - 0.7) * 30);
poofs.push(("poof" + q));
game.addChild(this[("poof" + q)]);
q++;
game.removeChild(cHero);
cHero = undefined;
};
}
public function closeCredits(_arg1:MouseEvent){
menu.flasher.gotoAndPlay(2);
menu.titleScreen.gotoAndStop(1);
menu.titleScreen.eliSite.visible = false;
menu.titleScreen.edSite.visible = false;
menu.titleScreen.closeCredits.visible = false;
menu.titleScreen.closeCredits.removeEventListener(MouseEvent.CLICK, closeCredits);
}
public function disableSound(_arg1:MouseEvent){
if (musicChannel != undefined){
musicChannel.stop();
};
sound = (cookie.data.sound = false);
cookie.flush();
}
public function setLow(_arg1:MouseEvent){
stage.quality = (cookie.data.qual = StageQuality.LOW);
cookie.flush();
}
public function kDown(_arg1:KeyboardEvent){
if (keysDown.indexOf(_arg1.keyCode) == -1){
if ((((editor == true)) && ((HUD.levelProps.visible == false)))){
if (edSubMode == 0){
edChange = (((cTile + cPuke) + cDoor) + edMode);
if ((((_arg1.keyCode == 65)) || ((_arg1.keyCode == 37)))){
if (edMode == 0){
cTile--;
tar = new tile();
if (cTile < 1){
cTile = tar.totalFrames;
};
tar = null;
} else {
if (edMode == 2){
cPuke--;
if (cPuke < 0){
cPuke = (pukeColor.length - 1);
};
} else {
if (edMode == 3){
cDoor--;
if (cDoor < 0){
cDoor = 5;
};
};
};
};
};
if ((((_arg1.keyCode == 68)) || ((_arg1.keyCode == 39)))){
if (edMode == 0){
cTile++;
tar = new tile();
if (cTile > tar.totalFrames){
cTile = 1;
};
tar = null;
} else {
if (edMode == 2){
cPuke++;
if (cPuke > (pukeColor.length - 1)){
cPuke = 0;
};
} else {
if (edMode == 3){
cDoor++;
if (cDoor > 5){
cDoor = 0;
};
};
};
};
};
if ((((_arg1.keyCode == 83)) || ((_arg1.keyCode == 40)))){
edMode--;
if (edMode < 0){
edMode = 3;
};
};
if ((((_arg1.keyCode == 87)) || ((_arg1.keyCode == 38)))){
edMode++;
if (edMode > 3){
edMode = 0;
};
};
if ((((cTile + cPuke) + cDoor) + edMode) != edChange){
setTooltip();
};
};
} else {
if ((((((_arg1.keyCode == 80)) || ((_arg1.keyCode == 27)))) && (!((levelCompleted == true))))){
pauseGame = (pauseGame == false);
if (pauseGame == true){
HUD.mapScreen.gotoAndStop(3);
};
};
};
keysDown.push(_arg1.keyCode);
};
}
public function returnToMenu(){
destroy(editor);
if (musicChannel != undefined){
};
map = undefined;
gotoAndStop(1);
}
public function checkTile(_arg1, _arg2){
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
if ((((((((_arg1 < 0)) || ((_arg2 < 0)))) || ((_arg1 >= sw)))) || ((_arg2 >= sh)))){
return (1);
};
_local3 = map[Math.floor((_arg2 / tileY))][Math.floor((_arg1 / tileX))];
if (((!((_local3 == 0))) && (!((_local3 == acidTile))))){
return (tileTypes[map[Math.floor((_arg2 / tileY))][Math.floor((_arg1 / tileX))]]);
};
_local4 = 0;
while (_local4 < doors.length) {
_local6 = this[doors[_local4]];
if ((((_local6.x == ((Math.floor((_arg1 / tileX)) * tileX) + (tileX / 2)))) && ((_local6.y == ((Math.floor((_arg2 / tileY)) * tileY) + (tileY / 2)))))){
if (_local6.t == 1){
if (_local6.currentFrame == _local6.totalFrames){
return (0);
};
return (1);
};
if (_local6.t == 4){
if (checkingFluid == true){
return (0);
};
if (_local6.currentFrame == _local6.totalFrames){
return (0);
};
return (1);
};
break;
};
_local4++;
};
_local5 = 0;
while (_local5 < acidTiles.length) {
if ((((Math.floor((_arg1 / tileX)) == acidTiles[_local5][1])) && ((Math.floor((_arg2 / tileY)) == acidTiles[_local5][0])))){
_local7 = this[acidTiles[_local5][2]];
if (_local7.melt.currentFrame != _local7.melt.totalFrames){
if (acidParticle == true){
if (sound){
acidVolume = (acidVolume + 0.4);
if (acidVolume > 1){
acidVolume = 1;
};
};
_local7.melt.play();
if (Math.random() < 0.2){
this[("steam" + q)] = new steamCloud();
this[("steam" + q)].x = _arg1;
this[("steam" + q)].y = _arg2;
this[("steam" + q)].alpha = Math.random();
this[("steam" + q)].scaleX = ((Math.random() * 0.5) + 0.5);
if (Math.random() < 0.5){
this[("steam" + q)].scaleX = (this[("steam" + q)].scaleX * -1);
};
this[("steam" + q)].scaleY = ((Math.random() * 0.5) + 0.5);
this[("steam" + q)].rotation = ((Math.random() - 0.5) * 50);
game.addChild(this[("steam" + q)]);
steams.push(("steam" + q));
q++;
};
};
return (1);
} else {
return (0);
};
};
_local5++;
};
return (0);
}
public function playIntros(_arg1:MouseEvent){
if (cutscene != true){
intro.play();
};
intros.play();
}
public function mUp(_arg1:MouseEvent){
clicking = false;
}
public function updateParticles(_arg1){
var _local2:Object;
var _local3:Object;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:Number;
var _local11:Number;
var _local12:Number;
var _local13:Number;
var _local14:Number;
var _local15:Number;
var _local16:Number;
checkingFluid = true;
kk = 0;
particleBitmap.fillRect(new Rectangle(0, 0, sw, sh), 0);
tempBitmap.fillRect(new Rectangle(0, 0, sw, sh), 0);
partSort = particles.slice();
partSort.sort(sortX);
time1 = getTimer();
_local4 = 0;
while (_local4 < partSort.length) {
_local2 = this[partSort[_local4]];
if (((!((_local2 == undefined))) && (!((_local2 == null))))){
if (_arg1){
if (((((!((_local2.t == 2))) && (!((_local2.t == 3))))) && (!((_local2.t == 8))))){
_local2.run = (_local2.run * decay);
_local2.rise = (_local2.rise + (gravity / (_local2.surrounds * 2)));
} else {
if ((((_local2.t == 2)) || ((_local2.t == 8)))){
_local2.run = (_local2.run * 0.9);
_local2.rise = (_local2.rise * 0.9);
if (Math.abs(_local2.run) < 0.1){
_local2.run = 0;
};
if (Math.abs(_local2.rise) < 0.1){
_local2.rise = 0;
};
} else {
if (_local2.t == 3){
if (_local2.surrounds == 0.5){
_local2.run = (_local2.run * decay);
_local2.rise = (_local2.rise + gravity);
} else {
_local2.run = (_local2.run * 0.3);
_local2.rise = (_local2.rise * 0.3);
if (Math.abs(_local2.run) < 0.1){
_local2.run = 0;
};
if (Math.abs(_local2.rise) < 0.1){
_local2.rise = 0;
};
};
};
};
};
if (_local2.t < 5){
_local2.rotation = ((Math.atan2(_local2.rise, _local2.run) * 180) / Math.PI);
_local2.speed = ((_local2.run * _local2.run) + (_local2.rise * _local2.rise));
if (_local2.speed > 250){
_local2.speed = 250;
};
_local2.scaleX = ((_local2.speed * 0.0025) + 1);
_local2.scaleY = ((-(_local2.speed) * 0.002) + 1);
} else {
_local2.rotation = (_local2.rotation + _local2.run);
if (_local2.oSurrounds != undefined){
if (_local2.oSurrounds > 0.6){
_local2.rise = (_local2.rise - ((_local2.oSurrounds - 0.6) / 4));
};
};
};
};
_local2.life++;
if (_local2.virgin == false){
if ((((_local2.swallow == false)) && (((!((cHero == undefined))) || ((editor == true)))))){
if (editor == false){
_local6 = (cHero.x - _local2.x);
_local7 = (cHero.y - _local2.y);
_local12 = (cHero.r + _local2.r);
} else {
_local6 = (mouseX - _local2.x);
_local7 = (mouseY - _local2.y);
_local12 = 25;
};
if ((((_local6 == 0)) && ((_local7 == 0)))){
_local6 = 0.1;
};
if ((((((_local6 * _local6) + (_local7 * _local7)) < (_local12 * _local12))) && ((_local2.life > 2)))){
if (editor == false){
if (((!((cPuke == 4))) && ((_local2.t == 4)))){
if (sound){
acidDeathSound.play();
};
playerKilled = true;
};
_local13 = Math.sqrt(((_local6 * _local6) + (_local7 * _local7)));
if (((!((_local2.t == 3))) || ((_local2.surrounds == 0.5)))){
if (_local2.t < 5){
cHero.partHits++;
_local16 = (_local6 / _local13);
_local2.run = (_local2.run - (((_local16 * (_local12 - _local13)) * 0.1) / (cHero.partHits * cHero.partHits)));
_local16 = (_local7 / _local13);
_local2.rise = (_local2.rise - (((_local16 * (_local12 - _local13)) * 0.1) / (cHero.partHits * cHero.partHits)));
} else {
_local16 = (_local6 / _local13);
_local2.run = (_local2.run - ((_local16 * (_local12 - _local13)) * 0.5));
_local16 = (_local7 / _local13);
_local2.rise = (_local2.rise - ((_local16 * (_local12 - _local13)) * 0.5));
};
} else {
if ((((Math.abs((cHero.x - _local2.x)) < (_local2.r / 1.2))) && ((cHero.y < _local2.y)))){
cHero.partStanding = true;
};
_local16 = (_local6 / _local13);
cHero.run = (cHero.run + ((_local16 * (_local12 - _local13)) * 0.1));
cHero.x = (cHero.x + ((_local16 * (_local12 - _local13)) * 0.3));
_local16 = (_local7 / _local13);
cHero.rise = (cHero.rise + ((_local16 * (_local12 - _local13)) * 0.1));
cHero.y = (cHero.y + ((_local16 * (_local12 - _local13)) * 0.3));
};
};
if (((((((isDown(32)) && ((((((editor == true)) && ((edMode == 2)))) || ((editor == false)))))) && ((clicking == false)))) && ((HUD.levelProps.visible == false)))){
_local2.swallow = true;
if (_local2.t == 5){
totalVomit = (totalVomit + 10);
if (totalVomit > 100){
totalVomit = 100;
};
};
if ((((_local2.t > 5)) && (!((cHero == undefined))))){
changePuke((_local2.t - 6));
};
if (_local2.t < 5){
activeVomit--;
};
if (sound){
slurpVolume = 1;
};
if (editor == false){
if (cHero.faceWhole.face.munch != undefined){
cHero.faceWhole.face.munch.play();
};
} else {
HUD.editorOutput.text = "";
};
};
};
};
} else {
_local2.virgin = false;
};
if (_local2.swallow == true){
if (_local2.t < 5){
myMatrix = new Matrix();
myMatrix.scale((0.001 * _local2.s), (0.001 * _local2.s));
_local2.graphics.clear();
_local2.graphics.beginGradientFill(GradientType.RADIAL, [_local2.col, _local2.col], pukeAlpha, [50, 0xFF], myMatrix);
_local2.graphics.drawCircle(0, 0, 25);
_local2.graphics.endFill();
_local2.s = (_local2.s * 0.7);
} else {
_local2.scaleX = (_local2.scaleX * 0.7);
_local2.scaleY = (_local2.scaleY * 0.7);
};
};
if (_arg1){
if (_local2.swallow == false){
if (_local2.t == 4){
acidParticle = true;
};
if (checkTile(_local2.x, _local2.y)){
_local2.x = _local2.ox1;
_local2.y = _local2.oy1;
};
if (checkTile((_local2.x + _local2.run), _local2.y) == 1){
_local2.run = (_local2.run * -0.3);
_local2.surrounds = (_local2.surrounds + 0.1);
if (_local2.t == 3){
_local2.rise = (_local2.run = 0);
};
};
if (checkTile(_local2.x, (_local2.y + _local2.rise)) == 1){
if (((((_local2.y + _local2.rise) < sh)) && (((_local2.y + _local2.rise) >= 0)))){
if ((((_local2.rise > 0)) && ((map[Math.floor(((_local2.y + _local2.rise) / tileY))][Math.floor((_local2.x / tileX))] == conv1)))){
_local2.run = (_local2.run + 0.3);
} else {
if ((((_local2.rise > 0)) && ((map[Math.floor(((_local2.y + _local2.rise) / tileY))][Math.floor((_local2.x / tileX))] == conv2)))){
_local2.run = (_local2.run - 0.3);
};
};
};
_local2.surrounds = (_local2.surrounds + 0.1);
if (_local2.t == 3){
_local2.rise = (_local2.run = 0);
};
_local2.rise = (_local2.rise * -0.3);
};
if (_local2.t == 4){
acidParticle = false;
};
_local2.x = (_local2.x + _local2.run);
_local2.y = (_local2.y + _local2.rise);
_local2.ox1 = _local2.x;
_local2.oy1 = _local2.y;
_local2.ox = _local2.tx;
_local2.oy = _local2.ty;
_local2.tx = Math.floor((_local2.x * spacialRecip));
_local2.ty = Math.floor((_local2.y * spacialRecip));
};
};
_local2.xHits = [];
_local2.hits = [];
_local2.hitAnything = false;
if (_local2.t != 3){
_local2.oSurrounds = _local2.surrounds;
_local2.surrounds = 0.5;
};
_local5 = (_local4 + 1);
while (_local5 < partSort.length) {
if (((!((this[partSort[_local5]] == undefined))) && (!((this[partSort[_local5]] == null))))){
_local3 = this[partSort[_local5]];
if (_local3.x < ((_local2.x + _local2.r) + _local3.r)){
if (_local3.y > (_local2.y - (_local2.r + _local3.r))){
if (_local3.y < ((_local2.y + _local2.r) + _local3.r)){
_local2.hits.push(partSort[_local5]);
};
};
} else {
break;
};
};
_local5 = (_local5 + 1);
};
};
_local4 = (_local4 + 1);
};
partSet = (partSet == 0);
partLen = particles.length;
_local4 = 0;
while (_local4 < partLen) {
_local2 = this[particles[_local4]];
if (((!((_local2 == undefined))) && (!((_local2 == null))))){
if (_arg1){
if (_local2.swallow == false){
_local10 = 0;
while (_local10 < _local2.hits.length) {
if (this[_local2.hits[_local10]] != undefined){
_local3 = this[_local2.hits[_local10]];
_local6 = (_local2.x - _local3.x);
_local7 = (_local2.y - _local3.y);
if ((((_local6 == 0)) && ((_local7 == 0)))){
_local6 = 0.01;
};
_local13 = ((_local6 * _local6) + (_local7 * _local7));
if (_local13 < ((_local2.r + _local3.r) * (_local2.r + _local3.r))){
_local13 = Math.sqrt(_local13);
dist2 = ((1 / _local13) * ((_local2.r + _local3.r) - _local13));
if (_local2.t == 3){
if (_local3.surrounds != 0.5){
_local2.surrounds = (_local2.surrounds + 0.1);
};
} else {
if ((((_local2.t < 5)) || ((_local3.t < 5)))){
if (_local3.t != 3){
_local2.surrounds++;
};
};
};
if (_local3.t == 3){
if (_local2.surrounds != 0.5){
_local3.surrounds = (_local3.surrounds + 0.1);
};
} else {
if ((((_local2.t < 5)) || ((_local3.t < 5)))){
if (_local2.t != 3){
_local3.surrounds++;
};
};
};
_local14 = ((_local6 * dist2) * 0.3);
_local15 = ((_local7 * dist2) * 0.3);
_local2.run = (_local2.run + _local14);
_local2.rise = (_local2.rise + _local15);
_local3.run = (_local3.run - _local14);
_local3.rise = (_local3.rise - _local15);
_local14 = ((_local6 * dist2) * 0.5);
_local15 = ((_local7 * dist2) * 0.5);
_local2.x = (_local2.x + _local14);
_local2.y = (_local2.y + _local15);
_local3.x = (_local3.x - _local14);
_local3.y = (_local3.y - _local15);
if ((((_local2.t == 3)) && (!((_local3.t == 3))))){
_local2.x = (_local2.x - (_local14 / 2));
_local2.y = (_local2.y - (_local15 / 2));
};
if ((((_local3.t == 3)) && (!((_local2.t == 3))))){
_local3.x = (_local3.x + (_local14 / 2));
_local3.y = (_local3.y + (_local15 / 2));
};
_local2.run = (_local2.run * 0.99);
_local2.rise = (_local2.rise * 0.99);
_local3.run = (_local3.run * 0.99);
_local3.rise = (_local3.rise * 0.99);
};
};
_local10++;
};
};
};
if ((((editor == false)) && ((_local2.t < 5)))){
_local8 = 0;
while (_local8 < objects.length) {
_local3 = this[objects[_local8]];
if (_local3.t == 5){
if (_local3.switched == false){
if (_local3.rotation == 0){
_local6 = (_local3.x - _local2.x);
_local7 = ((_local3.y - 15) - _local2.y);
} else {
if (_local3.rotation == 90){
_local6 = ((_local3.x + 15) - _local2.x);
_local7 = (_local3.y - _local2.y);
} else {
if (_local3.rotation == -180){
_local6 = (_local3.x - _local2.x);
_local7 = ((_local3.y + 15) - _local2.y);
} else {
if (_local3.rotation == -90){
_local6 = ((_local3.x - 15) - _local2.x);
_local7 = (_local3.y - _local2.y);
};
};
};
};
if (((_local6 * _local6) + (_local7 * _local7)) < (15 * 15)){
if (_local3.switched != true){
_local3.switched = true;
if (sound){
click1.play();
};
};
_local3.play();
activeVomit--;
totalVomit--;
_local2.swallow = true;
_local2.hitButton = true;
_local2.gx = (_local6 + _local2.x);
_local2.gy = (_local7 + _local2.y);
_local9 = 0;
while (_local9 < switches[_local8].length) {
_local3 = this[doors[switches[_local8][_local9]]];
if (_local3.currentFrame == 1){
_local3.play();
};
_local9++;
};
};
};
};
_local8++;
};
};
if (_local2.swallow == true){
if (cHero != undefined){
if (_local2.hitButton == undefined){
_local2.gx = (cHero.x + cHero.faceWhole.x);
_local2.gy = ((cHero.y + cHero.faceWhole.y) + 2);
_local2.x = (_local2.x + cHero.run);
_local2.y = (_local2.y + cHero.rise);
};
_local6 = (_local2.gx - _local2.x);
_local7 = (_local2.gy - _local2.y);
} else {
if (editor == true){
_local2.gx = mouseX;
_local2.gy = mouseY;
_local6 = (_local2.gx - _local2.x);
_local7 = (_local2.gy - _local2.y);
} else {
if (_local2.hitButton == undefined){
_local2.s = 0;
};
};
};
if ((((((_local6 * _local6) + (_local7 * _local7)) > 7)) && ((_local2.s > 2)))){
_local2.x = (_local2.x + (_local6 * 0.5));
_local2.y = (_local2.y + (_local7 * 0.5));
} else {
this[particles[_local4]] = null;
particles.splice(_local4, 1);
_local4--;
partLen--;
_local2 = null;
};
};
if (_local2 != null){
particleBitmap.draw(_local2, _local2.transform.matrix);
};
};
_local4++;
};
particleBitmap.threshold(particleBitmap, new Rectangle(0, 0, sw, sh), new Point(0, 0), "<", 2147483648);
checkingFluid = false;
}
public function destroy(_arg1){
if (musicChannel != undefined){
};
fgBitmap.dispose();
bgBitmap.dispose();
fgFilter.dispose();
particleBitmap.dispose();
tempBitmap.dispose();
slurpChannel.stop();
waterChannel.stop();
acidChannel.stop();
pukeChannel.stop();
if (cBack != undefined){
game.removeChild(this[cBack]);
this[cBack] = null;
};
slurpChannel = (slurpSound = (slurpTransform = null));
waterChannel = (waterSound = (waterTransform = null));
acidChannel = (acidLoopSound = (acidTransform = null));
pukeChannel = (pukeSound = (pukeTransform = null));
tar = (tar2 = (cHero = (genericDraw = (genericTile = (genericMask = null)))));
i = 0;
while (i < particles.length) {
this[particles[i]] = null;
i++;
};
i = 0;
while (i < bubbles.length) {
this[bubbles[i]] = null;
i++;
};
i = 0;
while (i < poofs.length) {
this[poofs[i]] = null;
i++;
};
stage.removeEventListener(Event.ENTER_FRAME, eFrame);
stage.removeEventListener(MouseEvent.MOUSE_DOWN, mDown);
stage.removeEventListener(MouseEvent.MOUSE_UP, mUp);
stage.removeEventListener(KeyboardEvent.KEY_DOWN, kDown);
stage.removeEventListener(KeyboardEvent.KEY_UP, kUp);
HUD.mapScreen.returnToGame.removeEventListener(MouseEvent.CLICK, unPause);
HUD.mapScreen.restartLevel.removeEventListener(MouseEvent.CLICK, restartLevel);
HUD.mapScreen.exitToTitle.removeEventListener(MouseEvent.CLICK, exitToTitle);
HUD.mapScreen.options.AAHigh.removeEventListener(MouseEvent.CLICK, setHigh);
HUD.mapScreen.options.AAMedium.removeEventListener(MouseEvent.CLICK, setMedium);
HUD.mapScreen.options.AALow.removeEventListener(MouseEvent.CLICK, setLow);
HUD.mapScreen.options.enableBG.removeEventListener(MouseEvent.CLICK, enableBG);
HUD.mapScreen.options.disableBG.removeEventListener(MouseEvent.CLICK, disableBG);
HUD.mapScreen.options.enableSound.removeEventListener(MouseEvent.CLICK, enableSound);
HUD.mapScreen.options.disableSound.removeEventListener(MouseEvent.CLICK, disableSound);
particles = null;
bubbles = null;
cBody = (cTail1 = (cTail2 = null));
removeChild(game);
if (_arg1 == 1){
tilesBitmap.dispose();
HUD.removeChild(tileDisplay);
};
removeChild(HUD);
}
}
}//package spewer_fla
Section 106
//menu_150 (spewer_fla.menu_150)
package spewer_fla {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.geom.*;
import flash.media.*;
import flash.system.*;
import flash.text.*;
import flash.net.*;
import flash.ui.*;
import flash.errors.*;
import flash.accessibility.*;
import flash.filters.*;
public dynamic class menu_150 extends MovieClip {
public var loadBox:TextField;
public var titleScreen:MovieClip;
public var editButton:SimpleButton;
public var statDisp:TextField;
public var returnToGame:SimpleButton;
public var levelNameDisp:TextField;
public var scanLines:MovieClip;
public var variants:MovieClip;
public var exitToTitle:SimpleButton;
public var playButton:SimpleButton;
public var options:MovieClip;
public var restartLevel:SimpleButton;
public var chapters:MovieClip;
public function menu_150(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
if (root.unlockedLevel <= 54){
chapters.gotoAndStop(1);
} else {
chapters.gotoAndStop(2);
};
}
function frame2(){
if (root.currentFrame == 2){
titleScreen.eliSite.visible = false;
titleScreen.edSite.visible = false;
};
}
}
}//package spewer_fla
Section 107
//menu_58 (spewer_fla.menu_58)
package spewer_fla {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.geom.*;
import flash.media.*;
import flash.system.*;
import flash.text.*;
import flash.net.*;
import flash.ui.*;
import flash.errors.*;
import flash.accessibility.*;
import flash.filters.*;
public dynamic class menu_58 extends MovieClip {
public function menu_58(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package spewer_fla
Section 108
//menuscreen_34 (spewer_fla.menuscreen_34)
package spewer_fla {
import flash.display.*;
import flash.text.*;
public dynamic class menuscreen_34 extends MovieClip {
public var loadBox:TextField;
public var eraseShit:SimpleButton;
public var editButton:SimpleButton;
public var newgrounds:SimpleButton;
public var titleScreen:MovieClip;
public var winner:MovieClip;
public var failed:MovieClip;
public var eraseBox:MovieClip;
public var scanLines:MovieClip;
public var playButton:SimpleButton;
public var credits:SimpleButton;
public var flasher:MovieClip;
public var loadingScreen:MovieClip;
public var downloadButton:SimpleButton;
}
}//package spewer_fla
Section 109
//NewgroundsAPI_Ad_Unit_38 (spewer_fla.NewgroundsAPI_Ad_Unit_38)
package spewer_fla {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import com.newgrounds.*;
import flash.geom.*;
import flash.media.*;
import flash.system.*;
import flash.text.*;
import flash.net.*;
import flash.ui.*;
import flash.errors.*;
import flash.accessibility.*;
import flash.filters.*;
public dynamic class NewgroundsAPI_Ad_Unit_38 extends MovieClip {
public var background:MovieClip;
public function NewgroundsAPI_Ad_Unit_38(){
addFrameScript(0, frame1);
}
public function attachAd(_arg1:Object, _arg2:Object):void{
NewgroundsAPI.attachFlashAd(this);
}
function frame1(){
NewgroundsAPI.addEventListener(NewgroundsAPI.events.ADS_APPROVED, attachAd);
background.visible = false;
}
}
}//package spewer_fla
Section 110
//NewgroundsAPI_Connector_61 (spewer_fla.NewgroundsAPI_Connector_61)
package spewer_fla {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import com.newgrounds.*;
import flash.geom.*;
import flash.media.*;
import flash.system.*;
import flash.text.*;
import flash.net.*;
import flash.ui.*;
import flash.errors.*;
import flash.accessibility.*;
import flash.filters.*;
public dynamic class NewgroundsAPI_Connector_61 extends MovieClip {
public var closeButton:SimpleButton;
public function NewgroundsAPI_Connector_61(){
addFrameScript(0, frame1);
}
public function checkConnection(_arg1:Object, _arg2:Object):void{
if (!_arg1.success){
visible = true;
gotoAndStop(3);
};
}
public function closeHandler(_arg1:MouseEvent):void{
visible = false;
}
function frame1(){
visible = false;
stop();
}
public function initialize(_arg1:Object):void{
NewgroundsAPI.setMovieVersion(_arg1.movie_version);
NewgroundsAPI.connectMovie(root, _arg1.movie_id.toString(), _arg1.enc_key, _arg1.debug_mode);
closeButton.addEventListener(MouseEvent.CLICK, closeHandler);
if (((NewgroundsAPI.isNewgrounds()) || (_arg1.debug_mode))){
NewgroundsAPI.addEventListener(NewgroundsAPI.events.MOVIE_CONNECTED, checkConnection);
if (((!(NewgroundsAPI.hasUserSession())) && (!(_arg1.debug_mode)))){
visible = true;
gotoAndStop(2);
};
};
NewgroundsAPI.loadMedals();
}
}
}//package spewer_fla
Section 111
//NewgroundsAPI_Medal_Popup_63 (spewer_fla.NewgroundsAPI_Medal_Popup_63)
package spewer_fla {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import com.newgrounds.*;
import flash.geom.*;
import com.adobe.utils.*;
import flash.media.*;
import flash.system.*;
import flash.text.*;
import flash.net.*;
import flash.ui.*;
import flash.errors.*;
import flash.accessibility.*;
import flash.filters.*;
public dynamic class NewgroundsAPI_Medal_Popup_63 extends MovieClip {
public var medalClassName:String;
public var medalValueText:TextField;
public var pop_delay:Timer;
public var badChars:String;
public var medal_value:String;
public var myBitmapData:BitmapData;
public var i:uint;
public var medalNameText:TextField;
public var bitmapClass:Class;
public var medal_icon:MovieClip;
public var medal_name:String;
public function NewgroundsAPI_Medal_Popup_63(){
addFrameScript(0, frame1, 9, frame10);
}
public function unlockMedal(_arg1:String):void{
var _local2:Array;
var _local3:*;
var _local4:*;
var _local5:String;
pop_delay.stop();
_local2 = NewgroundsAPI.getMedals();
for (_local3 in _local2) {
trace(_local2[_local3].medal_name);
};
_local4 = null;
for (_local5 in _local2) {
if (_local2[_local5].medal_name == _arg1){
_local4 = _local2[_local5];
medal_name = _local4.medal_name;
medal_value = (_local4.medal_value + "pts");
NewgroundsAPI.unlockMedal(medal_name);
pop_delay.start();
visible = true;
gotoAndPlay(2);
break;
};
};
}
function frame10(){
medalClassName = medal_name;
badChars = "~`!@#$%^&*()-+=[{]}|;:'\"\\,<.>/? ";
i = 0;
while (i < badChars.length) {
medalClassName = StringUtil.remove(medalClassName, badChars.charAt(i));
i++;
};
try {
bitmapClass = Class(getDefinitionByName(medalClassName));
} catch(e:Error) {
trace((("Couldn't find medal image with class name " + medalClassName) + "!"));
};
if (bitmapClass){
myBitmapData = new bitmapClass(0, 0);
medal_icon.addChild(new Bitmap(myBitmapData));
};
medalNameText.text = medal_name;
medalValueText.text = medal_value;
stop();
}
function frame1(){
pop_delay = new Timer(3000, 1);
pop_delay.addEventListener(TimerEvent.TIMER, endDelay);
medal_name = "?????";
medal_value = "???";
visible = false;
stop();
}
public function endDelay(_arg1:TimerEvent):void{
if (medal_icon.getChildAt(0)){
medal_icon.removeChildAt(0);
};
gotoAndPlay(10);
pop_delay.stop();
}
}
}//package spewer_fla
Section 112
//nglinkcontainer_17 (spewer_fla.nglinkcontainer_17)
package spewer_fla {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.geom.*;
import flash.media.*;
import flash.system.*;
import flash.text.*;
import flash.net.*;
import flash.ui.*;
import flash.errors.*;
import flash.accessibility.*;
import flash.filters.*;
public dynamic class nglinkcontainer_17 extends MovieClip {
public var hitButton:SimpleButton;
public function nglinkcontainer_17(){
addFrameScript(0, frame1);
}
public function gotoNG(_arg1:MouseEvent){
var req:URLRequest;
var e = _arg1;
req = new URLRequest("http://www.newgrounds.com");
try {
navigateToURL(req, "_blank");
} catch(e:Error) {
trace("Navigate to URL failed", e.message);
};
}
function frame1(){
hitButton.addEventListener(MouseEvent.CLICK, gotoNG);
}
}
}//package spewer_fla
Section 113
//objectloader_67 (spewer_fla.objectloader_67)
package spewer_fla {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.geom.*;
import flash.media.*;
import flash.system.*;
import flash.text.*;
import flash.net.*;
import flash.ui.*;
import flash.errors.*;
import flash.accessibility.*;
import flash.filters.*;
public dynamic class objectloader_67 extends MovieClip {
public function objectloader_67(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package spewer_fla
Section 114
//ourintro_1 (spewer_fla.ourintro_1)
package spewer_fla {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.geom.*;
import flash.media.*;
import flash.system.*;
import flash.text.*;
import flash.net.*;
import flash.ui.*;
import flash.errors.*;
import flash.accessibility.*;
import flash.filters.*;
public dynamic class ourintro_1 extends MovieClip {
public function ourintro_1(){
addFrameScript(0, frame1, 245, frame246);
}
function frame1(){
stop();
}
function frame246(){
stop();
}
}
}//package spewer_fla
Section 115
//pukebarflash_148 (spewer_fla.pukebarflash_148)
package spewer_fla {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.geom.*;
import flash.media.*;
import flash.system.*;
import flash.text.*;
import flash.net.*;
import flash.ui.*;
import flash.errors.*;
import flash.accessibility.*;
import flash.filters.*;
public dynamic class pukebarflash_148 extends MovieClip {
public function pukebarflash_148(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package spewer_fla
Section 116
//pukebarmask_140 (spewer_fla.pukebarmask_140)
package spewer_fla {
import flash.display.*;
public dynamic class pukebarmask_140 extends MovieClip {
public var mover:MovieClip;
}
}//package spewer_fla
Section 117
//resetscreen_162 (spewer_fla.resetscreen_162)
package spewer_fla {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.geom.*;
import flash.media.*;
import flash.system.*;
import flash.text.*;
import flash.net.*;
import flash.ui.*;
import flash.errors.*;
import flash.accessibility.*;
import flash.filters.*;
public dynamic class resetscreen_162 extends MovieClip {
public function resetscreen_162(){
addFrameScript(0, frame1);
}
function frame1(){
if (root.resetScreen == undefined){
gotoAndStop(Math.ceil((Math.random() * totalFrames)));
} else {
gotoAndStop(root.resetScreen);
};
}
}
}//package spewer_fla
Section 118
//settings_155 (spewer_fla.settings_155)
package spewer_fla {
import flash.display.*;
public dynamic class settings_155 extends MovieClip {
public var enableBG:SimpleButton;
public var disableSound:SimpleButton;
public var AALow:SimpleButton;
public var disableBG:SimpleButton;
public var enableSound:SimpleButton;
public var AAMedium:SimpleButton;
public var AAHigh:SimpleButton;
}
}//package spewer_fla
Section 119
//soundloader_66 (spewer_fla.soundloader_66)
package spewer_fla {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.geom.*;
import flash.media.*;
import flash.system.*;
import flash.text.*;
import flash.net.*;
import flash.ui.*;
import flash.errors.*;
import flash.accessibility.*;
import flash.filters.*;
public dynamic class soundloader_66 extends MovieClip {
public function soundloader_66(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package spewer_fla
Section 120
//suckup01_325 (spewer_fla.suckup01_325)
package spewer_fla {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.geom.*;
import flash.media.*;
import flash.system.*;
import flash.text.*;
import flash.net.*;
import flash.ui.*;
import flash.errors.*;
import flash.accessibility.*;
import flash.filters.*;
public dynamic class suckup01_325 extends MovieClip {
public function suckup01_325(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package spewer_fla
Section 121
//suckup01gish_338 (spewer_fla.suckup01gish_338)
package spewer_fla {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.geom.*;
import flash.media.*;
import flash.system.*;
import flash.text.*;
import flash.net.*;
import flash.ui.*;
import flash.errors.*;
import flash.accessibility.*;
import flash.filters.*;
public dynamic class suckup01gish_338 extends MovieClip {
public function suckup01gish_338(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package spewer_fla
Section 122
//suckup01red_330 (spewer_fla.suckup01red_330)
package spewer_fla {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.geom.*;
import flash.media.*;
import flash.system.*;
import flash.text.*;
import flash.net.*;
import flash.ui.*;
import flash.errors.*;
import flash.accessibility.*;
import flash.filters.*;
public dynamic class suckup01red_330 extends MovieClip {
public function suckup01red_330(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package spewer_fla
Section 123
//suckup01white_334 (spewer_fla.suckup01white_334)
package spewer_fla {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.geom.*;
import flash.media.*;
import flash.system.*;
import flash.text.*;
import flash.net.*;
import flash.ui.*;
import flash.errors.*;
import flash.accessibility.*;
import flash.filters.*;
public dynamic class suckup01white_334 extends MovieClip {
public function suckup01white_334(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package spewer_fla
Section 124
//suckup01yellow_342 (spewer_fla.suckup01yellow_342)
package spewer_fla {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.geom.*;
import flash.media.*;
import flash.system.*;
import flash.text.*;
import flash.net.*;
import flash.ui.*;
import flash.errors.*;
import flash.accessibility.*;
import flash.filters.*;
public dynamic class suckup01yellow_342 extends MovieClip {
public function suckup01yellow_342(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package spewer_fla
Section 125
//Symbol49_293 (spewer_fla.Symbol49_293)
package spewer_fla {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.geom.*;
import flash.media.*;
import flash.system.*;
import flash.text.*;
import flash.net.*;
import flash.ui.*;
import flash.errors.*;
import flash.accessibility.*;
import flash.filters.*;
public dynamic class Symbol49_293 extends MovieClip {
public function Symbol49_293(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7, 7, frame8, 8, frame9, 9, frame10, 10, frame11, 11, frame12, 12, frame13, 13, frame14, 14, frame15, 15, frame16, 16, frame17, 17, frame18, 18, frame19, 19, frame20, 20, frame21, 21, frame22, 22, frame23, 23, frame24, 24, frame25);
}
function frame10(){
stop();
}
function frame14(){
stop();
}
function frame18(){
play();
}
function frame12(){
stop();
}
function frame3(){
stop();
}
function frame6(){
stop();
}
function frame7(){
stop();
}
function frame1(){
stop();
}
function frame19(){
play();
}
function frame25(){
stop();
}
function frame13(){
stop();
}
function frame17(){
stop();
}
function frame4(){
stop();
}
function frame5(){
stop();
}
function frame9(){
stop();
}
function frame22(){
play();
}
function frame16(){
stop();
}
function frame8(){
stop();
}
function frame21(){
play();
}
function frame2(){
stop();
}
function frame15(){
stop();
}
function frame23(){
play();
}
function frame24(){
play();
}
function frame20(){
play();
}
function frame11(){
stop();
}
}
}//package spewer_fla
Section 126
//title_46 (spewer_fla.title_46)
package spewer_fla {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.geom.*;
import flash.media.*;
import flash.system.*;
import flash.text.*;
import flash.net.*;
import flash.ui.*;
import flash.errors.*;
import flash.accessibility.*;
import flash.filters.*;
public dynamic class title_46 extends MovieClip {
public var eliSite:SimpleButton;
public var closeCredits:SimpleButton;
public var edSite:SimpleButton;
public function title_46(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package spewer_fla
Section 127
//tutorialbox_139 (spewer_fla.tutorialbox_139)
package spewer_fla {
import flash.display.*;
import flash.text.*;
public dynamic class tutorialbox_139 extends MovieClip {
public var tutDisp:TextField;
}
}//package spewer_fla
Section 128
//acidLoop (acidLoop)
package {
import flash.media.*;
public dynamic class acidLoop extends Sound {
}
}//package
Section 129
//acidSound (acidSound)
package {
import flash.media.*;
public dynamic class acidSound extends Sound {
}
}//package
Section 130
//Airhead (Airhead)
package {
import flash.display.*;
public dynamic class Airhead extends BitmapData {
public function Airhead(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 131
//Architect (Architect)
package {
import flash.display.*;
public dynamic class Architect extends BitmapData {
public function Architect(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 132
//backgroundAnimation (backgroundAnimation)
package {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.geom.*;
import flash.media.*;
import flash.system.*;
import flash.text.*;
import flash.net.*;
import flash.ui.*;
import flash.errors.*;
import flash.accessibility.*;
import flash.filters.*;
public dynamic class backgroundAnimation extends MovieClip {
public var doc:MovieClip;
public var bg:MovieClip;
public var whiteboard:MovieClip;
public var glass:MovieClip;
public var screens:MovieClip;
public var gg:MovieClip;
public function backgroundAnimation(){
addFrameScript(0, frame1);
}
function frame1(){
if (root.gameMode != "story"){
whiteboard.visible = false;
} else {
if (root.currentLevel < 11){
whiteboard.gotoAndStop(1);
} else {
if (root.currentLevel < 22){
whiteboard.gotoAndStop(2);
} else {
if (root.currentLevel < 33){
whiteboard.gotoAndStop(3);
} else {
if (root.currentLevel < 44){
whiteboard.gotoAndStop(4);
} else {
whiteboard.visible = false;
};
};
};
};
};
if (root.chapterEnd != undefined){
if (root.chapterEnd == true){
glass.visible = (gg.visible = false);
whiteboard.filters = [];
screens.filters = [];
bg.filters = [];
if (root.currentLevel == 10){
doc.gotoAndStop(5);
};
if (root.currentLevel == 21){
doc.gotoAndStop(6);
};
if (root.currentLevel == 32){
doc.gotoAndStop(7);
};
if (root.currentLevel == 43){
doc.gotoAndStop(8);
};
if (root.currentLevel == 54){
doc.gotoAndStop(9);
};
};
};
}
}
}//package
Section 133
//blueBug (blueBug)
package {
import flash.display.*;
public dynamic class blueBug extends MovieClip {
}
}//package
Section 134
//bubble (bubble)
package {
import flash.display.*;
public dynamic class bubble extends MovieClip {
}
}//package
Section 135
//Burp (Burp)
package {
import flash.display.*;
public dynamic class Burp extends BitmapData {
public function Burp(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 136
//clickA (clickA)
package {
import flash.media.*;
public dynamic class clickA extends Sound {
}
}//package
Section 137
//clickB (clickB)
package {
import flash.media.*;
public dynamic class clickB extends Sound {
}
}//package
Section 138
//ColorPicker_backgroundSkin (ColorPicker_backgroundSkin)
package {
import flash.display.*;
public dynamic class ColorPicker_backgroundSkin extends MovieClip {
}
}//package
Section 139
//ColorPicker_colorWell (ColorPicker_colorWell)
package {
import flash.display.*;
public dynamic class ColorPicker_colorWell extends MovieClip {
}
}//package
Section 140
//ColorPicker_disabledSkin (ColorPicker_disabledSkin)
package {
import flash.display.*;
public dynamic class ColorPicker_disabledSkin extends MovieClip {
}
}//package
Section 141
//ColorPicker_downSkin (ColorPicker_downSkin)
package {
import flash.display.*;
public dynamic class ColorPicker_downSkin extends MovieClip {
}
}//package
Section 142
//ColorPicker_overSkin (ColorPicker_overSkin)
package {
import flash.display.*;
public dynamic class ColorPicker_overSkin extends MovieClip {
}
}//package
Section 143
//ColorPicker_swatchSelectedSkin (ColorPicker_swatchSelectedSkin)
package {
import flash.display.*;
public dynamic class ColorPicker_swatchSelectedSkin extends MovieClip {
}
}//package
Section 144
//ColorPicker_swatchSkin (ColorPicker_swatchSkin)
package {
import flash.display.*;
public dynamic class ColorPicker_swatchSkin extends Sprite {
}
}//package
Section 145
//ColorPicker_textFieldSkin (ColorPicker_textFieldSkin)
package {
import flash.display.*;
public dynamic class ColorPicker_textFieldSkin extends MovieClip {
}
}//package
Section 146
//ColorPicker_upSkin (ColorPicker_upSkin)
package {
import flash.display.*;
public dynamic class ColorPicker_upSkin extends MovieClip {
}
}//package
Section 147
//Conclusion (Conclusion)
package {
import flash.display.*;
public dynamic class Conclusion extends BitmapData {
public function Conclusion(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 148
//convArrow (convArrow)
package {
import flash.display.*;
public dynamic class convArrow extends MovieClip {
}
}//package
Section 149
//deadBody (deadBody)
package {
import flash.display.*;
public dynamic class deadBody extends MovieClip {
}
}//package
Section 150
//deadTail1 (deadTail1)
package {
import flash.display.*;
public dynamic class deadTail1 extends MovieClip {
}
}//package
Section 151
//deadTail2 (deadTail2)
package {
import flash.display.*;
public dynamic class deadTail2 extends MovieClip {
}
}//package
Section 152
//deathA (deathA)
package {
import flash.media.*;
public dynamic class deathA extends Sound {
}
}//package
Section 153
//deathB (deathB)
package {
import flash.media.*;
public dynamic class deathB extends Sound {
}
}//package
Section 154
//deathC (deathC)
package {
import flash.media.*;
public dynamic class deathC extends Sound {
}
}//package
Section 155
//deathD (deathD)
package {
import flash.media.*;
public dynamic class deathD extends Sound {
}
}//package
Section 156
//door (door)
package {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.geom.*;
import flash.media.*;
import flash.system.*;
import flash.text.*;
import flash.net.*;
import flash.ui.*;
import flash.errors.*;
import flash.accessibility.*;
import flash.filters.*;
public dynamic class door extends MovieClip {
public function door(){
addFrameScript(0, frame1, 7, frame8);
}
function frame1(){
stop();
}
function frame8(){
stop();
}
}
}//package
Section 157
//doorSwitch (doorSwitch)
package {
import flash.display.*;
public dynamic class doorSwitch extends MovieClip {
}
}//package
Section 158
//ending (ending)
package {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.geom.*;
import flash.media.*;
import flash.system.*;
import flash.text.*;
import flash.net.*;
import flash.ui.*;
import flash.errors.*;
import flash.accessibility.*;
import flash.filters.*;
public dynamic class ending extends MovieClip {
public function ending(){
addFrameScript(9, frame10, 2098, frame2099);
}
function frame10(){
root.pauseGame = true;
root.cutscene = true;
}
function frame2099(){
stop();
}
}
}//package
Section 159
//focusRectSkin (focusRectSkin)
package {
import flash.display.*;
public dynamic class focusRectSkin extends MovieClip {
}
}//package
Section 160
//gate (gate)
package {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.geom.*;
import flash.media.*;
import flash.system.*;
import flash.text.*;
import flash.net.*;
import flash.ui.*;
import flash.errors.*;
import flash.accessibility.*;
import flash.filters.*;
public dynamic class gate extends MovieClip {
public function gate(){
addFrameScript(14, frame15);
}
function frame15(){
stop();
}
}
}//package
Section 161
//Gishy (Gishy)
package {
import flash.display.*;
public dynamic class Gishy extends BitmapData {
public function Gishy(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 162
//goalDoor (goalDoor)
package {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.geom.*;
import flash.media.*;
import flash.system.*;
import flash.text.*;
import flash.net.*;
import flash.ui.*;
import flash.errors.*;
import flash.accessibility.*;
import flash.filters.*;
public dynamic class goalDoor extends MovieClip {
public function goalDoor(){
addFrameScript(8, frame9);
}
function frame9(){
stop();
}
}
}//package
Section 163
//headsUpDisplay (headsUpDisplay)
package {
import flash.display.*;
import flash.text.*;
public dynamic class headsUpDisplay extends MovieClip {
public var edHUD:MovieClip;
public var testLevel:SimpleButton;
public var pukeFlash:MovieClip;
public var levelProps:MovieClip;
public var tutorial:MovieClip;
public var pukeBar:MovieClip;
public var outputButton:SimpleButton;
public var barMask:MovieClip;
public var editLevel:SimpleButton;
public var nameDisplay:TextField;
public var helpMe:MovieClip;
public var propsButton:SimpleButton;
public var editorOutput:TextField;
public var helpButton:SimpleButton;
public var barCont:MovieClip;
public var mapScreen:MovieClip;
}
}//package
Section 164
//introSong (introSong)
package {
import flash.media.*;
public dynamic class introSong extends Sound {
}
}//package
Section 165
//jump0 (jump0)
package {
import flash.media.*;
public dynamic class jump0 extends Sound {
}
}//package
Section 166
//jump1 (jump1)
package {
import flash.media.*;
public dynamic class jump1 extends Sound {
}
}//package
Section 167
//jump2 (jump2)
package {
import flash.media.*;
public dynamic class jump2 extends Sound {
}
}//package
Section 168
//jump3 (jump3)
package {
import flash.media.*;
public dynamic class jump3 extends Sound {
}
}//package
Section 169
//land0 (land0)
package {
import flash.media.*;
public dynamic class land0 extends Sound {
}
}//package
Section 170
//land1 (land1)
package {
import flash.media.*;
public dynamic class land1 extends Sound {
}
}//package
Section 171
//land2 (land2)
package {
import flash.media.*;
public dynamic class land2 extends Sound {
}
}//package
Section 172
//land3 (land3)
package {
import flash.media.*;
public dynamic class land3 extends Sound {
}
}//package
Section 173
//mapBox (mapBox)
package {
import flash.display.*;
public dynamic class mapBox extends MovieClip {
public var anim:MovieClip;
public var boxLighten:MovieClip;
}
}//package
Section 174
//monitorSound (monitorSound)
package {
import flash.media.*;
public dynamic class monitorSound extends Sound {
}
}//package
Section 175
//music (music)
package {
import flash.media.*;
public dynamic class music extends Sound {
}
}//package
Section 176
//Perfectionist (Perfectionist)
package {
import flash.display.*;
public dynamic class Perfectionist extends BitmapData {
public function Perfectionist(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 177
//pillGraphic (pillGraphic)
package {
import flash.display.*;
public dynamic class pillGraphic extends MovieClip {
public var anim:MovieClip;
}
}//package
Section 178
//poof (poof)
package {
import flash.display.*;
public dynamic class poof extends MovieClip {
public var anim:MovieClip;
}
}//package
Section 179
//powerupSound (powerupSound)
package {
import flash.media.*;
public dynamic class powerupSound extends Sound {
}
}//package
Section 180
//pukeButton (pukeButton)
package {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.geom.*;
import flash.media.*;
import flash.system.*;
import flash.text.*;
import flash.net.*;
import flash.ui.*;
import flash.errors.*;
import flash.accessibility.*;
import flash.filters.*;
public dynamic class pukeButton extends MovieClip {
public function pukeButton(){
addFrameScript(4, frame5);
}
function frame5(){
stop();
}
}
}//package
Section 181
//pukeLoop (pukeLoop)
package {
import flash.media.*;
public dynamic class pukeLoop extends Sound {
}
}//package
Section 182
//RadioButton_disabledIcon (RadioButton_disabledIcon)
package {
import flash.display.*;
public dynamic class RadioButton_disabledIcon extends MovieClip {
}
}//package
Section 183
//RadioButton_downIcon (RadioButton_downIcon)
package {
import flash.display.*;
public dynamic class RadioButton_downIcon extends MovieClip {
}
}//package
Section 184
//RadioButton_overIcon (RadioButton_overIcon)
package {
import flash.display.*;
public dynamic class RadioButton_overIcon extends MovieClip {
}
}//package
Section 185
//RadioButton_selectedDisabledIcon (RadioButton_selectedDisabledIcon)
package {
import flash.display.*;
public dynamic class RadioButton_selectedDisabledIcon extends MovieClip {
}
}//package
Section 186
//RadioButton_selectedDownIcon (RadioButton_selectedDownIcon)
package {
import flash.display.*;
public dynamic class RadioButton_selectedDownIcon extends MovieClip {
}
}//package
Section 187
//RadioButton_selectedOverIcon (RadioButton_selectedOverIcon)
package {
import flash.display.*;
public dynamic class RadioButton_selectedOverIcon extends MovieClip {
}
}//package
Section 188
//RadioButton_selectedUpIcon (RadioButton_selectedUpIcon)
package {
import flash.display.*;
public dynamic class RadioButton_selectedUpIcon extends MovieClip {
}
}//package
Section 189
//RadioButton_upIcon (RadioButton_upIcon)
package {
import flash.display.*;
public dynamic class RadioButton_upIcon extends MovieClip {
}
}//package
Section 190
//radioButtons (radioButtons)
package {
import flash.events.*;
import flash.display.*;
import fl.controls.*;
import flash.utils.*;
import flash.geom.*;
import flash.media.*;
import flash.system.*;
import flash.text.*;
import flash.net.*;
import flash.ui.*;
import flash.errors.*;
import flash.accessibility.*;
import flash.filters.*;
public dynamic class radioButtons extends MovieClip {
public var blackRadio:RadioButton;
public var dot:MovieClip;
public var whiteRadio:RadioButton;
public var greenRadio:RadioButton;
public var yellowRadio:RadioButton;
public var redRadio:RadioButton;
public function radioButtons(){
__setProp_yellowRadio_radiobuttons_Layer1_1();
__setProp_blackRadio_radiobuttons_Layer1_1();
__setProp_whiteRadio_radiobuttons_Layer1_1();
__setProp_greenRadio_radiobuttons_Layer1_1();
__setProp_redRadio_radiobuttons_Layer1_1();
}
function __setProp_blackRadio_radiobuttons_Layer1_1(){
try {
blackRadio["componentInspectorSetting"] = true;
} catch(e:Error) {
};
blackRadio.enabled = true;
blackRadio.groupName = "RadioButtonGroup";
blackRadio.label = "";
blackRadio.labelPlacement = "bottom";
blackRadio.selected = false;
blackRadio.value = "3";
blackRadio.visible = true;
try {
blackRadio["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp_whiteRadio_radiobuttons_Layer1_1(){
try {
whiteRadio["componentInspectorSetting"] = true;
} catch(e:Error) {
};
whiteRadio.enabled = true;
whiteRadio.groupName = "RadioButtonGroup";
whiteRadio.label = "";
whiteRadio.labelPlacement = "bottom";
whiteRadio.selected = false;
whiteRadio.value = "2";
whiteRadio.visible = true;
try {
whiteRadio["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp_redRadio_radiobuttons_Layer1_1(){
try {
redRadio["componentInspectorSetting"] = true;
} catch(e:Error) {
};
redRadio.enabled = true;
redRadio.groupName = "RadioButtonGroup";
redRadio.label = "";
redRadio.labelPlacement = "bottom";
redRadio.selected = false;
redRadio.value = "1";
redRadio.visible = true;
try {
redRadio["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp_greenRadio_radiobuttons_Layer1_1(){
try {
greenRadio["componentInspectorSetting"] = true;
} catch(e:Error) {
};
greenRadio.enabled = true;
greenRadio.groupName = "RadioButtonGroup";
greenRadio.label = "";
greenRadio.labelPlacement = "bottom";
greenRadio.selected = false;
greenRadio.value = "0";
greenRadio.visible = true;
try {
greenRadio["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp_yellowRadio_radiobuttons_Layer1_1(){
try {
yellowRadio["componentInspectorSetting"] = true;
} catch(e:Error) {
};
yellowRadio.enabled = true;
yellowRadio.groupName = "RadioButtonGroup";
yellowRadio.label = "";
yellowRadio.labelPlacement = "bottom";
yellowRadio.selected = false;
yellowRadio.value = "4";
yellowRadio.visible = true;
try {
yellowRadio["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
}
}//package
Section 191
//RocketSauce (RocketSauce)
package {
import flash.display.*;
public dynamic class RocketSauce extends BitmapData {
public function RocketSauce(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 192
//sawSound (sawSound)
package {
import flash.media.*;
public dynamic class sawSound extends Sound {
}
}//package
Section 193
//SliderThumb_disabledSkin (SliderThumb_disabledSkin)
package {
import flash.display.*;
public dynamic class SliderThumb_disabledSkin extends MovieClip {
}
}//package
Section 194
//SliderThumb_downSkin (SliderThumb_downSkin)
package {
import flash.display.*;
public dynamic class SliderThumb_downSkin extends MovieClip {
}
}//package
Section 195
//SliderThumb_overSkin (SliderThumb_overSkin)
package {
import flash.display.*;
public dynamic class SliderThumb_overSkin extends MovieClip {
}
}//package
Section 196
//SliderThumb_upSkin (SliderThumb_upSkin)
package {
import flash.display.*;
public dynamic class SliderThumb_upSkin extends MovieClip {
}
}//package
Section 197
//SliderTick_skin (SliderTick_skin)
package {
import flash.display.*;
public dynamic class SliderTick_skin extends MovieClip {
}
}//package
Section 198
//SliderTrack_disabledSkin (SliderTrack_disabledSkin)
package {
import flash.display.*;
public dynamic class SliderTrack_disabledSkin extends MovieClip {
}
}//package
Section 199
//SliderTrack_skin (SliderTrack_skin)
package {
import flash.display.*;
public dynamic class SliderTrack_skin extends MovieClip {
}
}//package
Section 200
//slurp (slurp)
package {
import flash.media.*;
public dynamic class slurp extends Sound {
}
}//package
Section 201
//spewer (spewer)
package {
import flash.display.*;
public dynamic class spewer extends MovieClip {
public var faceWhole:MovieClip;
public var bodyParts:MovieClip;
}
}//package
Section 202
//steamCloud (steamCloud)
package {
import flash.display.*;
public dynamic class steamCloud extends MovieClip {
}
}//package
Section 203
//teleEnd (teleEnd)
package {
import flash.display.*;
public dynamic class teleEnd extends MovieClip {
}
}//package
Section 204
//telePiece (telePiece)
package {
import flash.display.*;
public dynamic class telePiece extends MovieClip {
}
}//package
Section 205
//tile (tile)
package {
import flash.display.*;
public dynamic class tile extends MovieClip {
public var melt:MovieClip;
}
}//package
Section 206
//tileDisp (tileDisp)
package {
import flash.display.*;
public dynamic class tileDisp extends MovieClip {
public var tiles:MovieClip;
}
}//package
Section 207
//tileMask (tileMask)
package {
import flash.display.*;
public dynamic class tileMask extends MovieClip {
}
}//package
Section 208
//underwater (underwater)
package {
import flash.media.*;
public dynamic class underwater extends Sound {
}
}//package
Section 209
//winSound (winSound)
package {
import flash.media.*;
public dynamic class winSound extends Sound {
}
}//package