Section 1
//DrawSine (com.midasplayer.extras.DrawSine)
package com.midasplayer.extras {
import flash.display.*;
public class DrawSine extends MovieClip {
private var target_mc:MovieClip;
private var step_x:Number;
private var my_height:Number;
private var stroke_color:Number;// = 0
private var draw_fill:Boolean;// = false
private var stroke_weight:Number;// = 1
private var fill_alpha:Number;
private var fill_height:Number;
private var draw_array;
private var steps:Number;
private var fill_color:Number;// = 0xFF0000
private var my_width:Number;
public function DrawSine(_arg1:MovieClip, _arg2:Number, _arg3:Number, _arg4:Number){
draw_array = new Array();
super();
target_mc = _arg1;
my_width = _arg2;
my_height = _arg3;
steps = _arg4;
step_x = (_arg2 / steps);
var _local5:* = 0;
while (_local5 < steps) {
draw_array.push({x:(step_x * _local5), y:0});
_local5++;
};
}
public function set_fill(_arg1:Boolean, _arg2:Number, _arg3:Number):void{
draw_fill = _arg1;
fill_color = (stroke_color = _arg2);
fill_alpha = _arg3;
}
public function set_stroke(_arg1:Number, _arg2:Number):void{
stroke_weight = _arg1;
stroke_color = _arg2;
}
public function draw_waves(_arg1:Array):void{
var _local6:*;
var _local7:*;
var _local8:*;
var _local9:*;
var _local2:* = draw_array.length;
var _local3:* = _arg1.length;
var _local4:* = 0;
while (_local4 < _local3) {
_local6 = (((_arg1[_local4].cycles * Math.PI) * 2) / steps);
_local7 = 0;
while (_local7 < _local2) {
if (_local4 == 0){
draw_array[_local7].y = (Math.sin((_arg1[_local4].phase + (_local6 * _local7))) * _arg1[_local4].radius);
} else {
draw_array[_local7].y = (draw_array[_local7].y + (Math.sin((_arg1[_local4].phase + (_local6 * _local7))) * _arg1[_local4].radius));
};
_local7++;
};
_local4++;
};
target_mc.graphics.clear();
if (stroke_weight > 0){
target_mc.graphics.lineStyle(stroke_weight, stroke_color);
};
if (draw_fill){
target_mc.graphics.beginFill(fill_color, fill_alpha);
};
target_mc.graphics.moveTo(draw_array[0].x, draw_array[0].y);
var _local5:* = 1;
while (_local5 < _local2) {
_local8 = draw_array[_local5].x;
_local9 = draw_array[_local5].y;
target_mc.graphics.lineTo(_local8, _local9);
_local5++;
};
if (draw_fill){
target_mc.graphics.lineTo(_local8, (my_height / 2));
target_mc.graphics.lineTo(0, (my_height / 2));
target_mc.graphics.lineTo(0, draw_array[0].y);
target_mc.graphics.endFill();
};
}
}
}//package com.midasplayer.extras
Section 2
//md5 (com.midasplayer.extras.md5)
package com.midasplayer.extras {
public class md5 {
public static const HEX_FORMAT_LOWERCASE:uint = 0;
public static const HEX_FORMAT_UPPERCASE:uint = 1;
public static const BASE64_PAD_CHARACTER_DEFAULT_COMPLIANCE:String = "";
public static const BASE64_PAD_CHARACTER_RFC_COMPLIANCE:String = "=";
public static var hexcase:uint = 0;
public static var b64pad:String = "";
public static function md5_gg(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Number):Number{
return (md5_cmn(((_arg2 & _arg4) | (_arg3 & ~(_arg4))), _arg1, _arg2, _arg5, _arg6, _arg7));
}
public static function md5_cmn(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number):Number{
return (safe_add(bit_rol(safe_add(safe_add(_arg2, _arg1), safe_add(_arg4, _arg6)), _arg5), _arg3));
}
public static function binl_md5(_arg1:Array, _arg2:Number):Array{
var _local8:Number;
var _local9:Number;
var _local10:Number;
var _local11:Number;
_arg1[(_arg2 >> 5)] = (_arg1[(_arg2 >> 5)] | (128 << (_arg2 % 32)));
_arg1[((((_arg2 + 64) >>> 9) << 4) + 14)] = _arg2;
var _local3:Number = 1732584193;
var _local4:Number = -271733879;
var _local5:Number = -1732584194;
var _local6:Number = 271733878;
var _local7:Number = 0;
while (_local7 < _arg1.length) {
_local8 = _local3;
_local9 = _local4;
_local10 = _local5;
_local11 = _local6;
_local3 = md5_ff(_local3, _local4, _local5, _local6, _arg1[(_local7 + 0)], 7, -680876936);
_local6 = md5_ff(_local6, _local3, _local4, _local5, _arg1[(_local7 + 1)], 12, -389564586);
_local5 = md5_ff(_local5, _local6, _local3, _local4, _arg1[(_local7 + 2)], 17, 606105819);
_local4 = md5_ff(_local4, _local5, _local6, _local3, _arg1[(_local7 + 3)], 22, -1044525330);
_local3 = md5_ff(_local3, _local4, _local5, _local6, _arg1[(_local7 + 4)], 7, -176418897);
_local6 = md5_ff(_local6, _local3, _local4, _local5, _arg1[(_local7 + 5)], 12, 1200080426);
_local5 = md5_ff(_local5, _local6, _local3, _local4, _arg1[(_local7 + 6)], 17, -1473231341);
_local4 = md5_ff(_local4, _local5, _local6, _local3, _arg1[(_local7 + 7)], 22, -45705983);
_local3 = md5_ff(_local3, _local4, _local5, _local6, _arg1[(_local7 + 8)], 7, 1770035416);
_local6 = md5_ff(_local6, _local3, _local4, _local5, _arg1[(_local7 + 9)], 12, -1958414417);
_local5 = md5_ff(_local5, _local6, _local3, _local4, _arg1[(_local7 + 10)], 17, -42063);
_local4 = md5_ff(_local4, _local5, _local6, _local3, _arg1[(_local7 + 11)], 22, -1990404162);
_local3 = md5_ff(_local3, _local4, _local5, _local6, _arg1[(_local7 + 12)], 7, 1804603682);
_local6 = md5_ff(_local6, _local3, _local4, _local5, _arg1[(_local7 + 13)], 12, -40341101);
_local5 = md5_ff(_local5, _local6, _local3, _local4, _arg1[(_local7 + 14)], 17, -1502002290);
_local4 = md5_ff(_local4, _local5, _local6, _local3, _arg1[(_local7 + 15)], 22, 1236535329);
_local3 = md5_gg(_local3, _local4, _local5, _local6, _arg1[(_local7 + 1)], 5, -165796510);
_local6 = md5_gg(_local6, _local3, _local4, _local5, _arg1[(_local7 + 6)], 9, -1069501632);
_local5 = md5_gg(_local5, _local6, _local3, _local4, _arg1[(_local7 + 11)], 14, 643717713);
_local4 = md5_gg(_local4, _local5, _local6, _local3, _arg1[(_local7 + 0)], 20, -373897302);
_local3 = md5_gg(_local3, _local4, _local5, _local6, _arg1[(_local7 + 5)], 5, -701558691);
_local6 = md5_gg(_local6, _local3, _local4, _local5, _arg1[(_local7 + 10)], 9, 38016083);
_local5 = md5_gg(_local5, _local6, _local3, _local4, _arg1[(_local7 + 15)], 14, -660478335);
_local4 = md5_gg(_local4, _local5, _local6, _local3, _arg1[(_local7 + 4)], 20, -405537848);
_local3 = md5_gg(_local3, _local4, _local5, _local6, _arg1[(_local7 + 9)], 5, 568446438);
_local6 = md5_gg(_local6, _local3, _local4, _local5, _arg1[(_local7 + 14)], 9, -1019803690);
_local5 = md5_gg(_local5, _local6, _local3, _local4, _arg1[(_local7 + 3)], 14, -187363961);
_local4 = md5_gg(_local4, _local5, _local6, _local3, _arg1[(_local7 + 8)], 20, 1163531501);
_local3 = md5_gg(_local3, _local4, _local5, _local6, _arg1[(_local7 + 13)], 5, -1444681467);
_local6 = md5_gg(_local6, _local3, _local4, _local5, _arg1[(_local7 + 2)], 9, -51403784);
_local5 = md5_gg(_local5, _local6, _local3, _local4, _arg1[(_local7 + 7)], 14, 1735328473);
_local4 = md5_gg(_local4, _local5, _local6, _local3, _arg1[(_local7 + 12)], 20, -1926607734);
_local3 = md5_hh(_local3, _local4, _local5, _local6, _arg1[(_local7 + 5)], 4, -378558);
_local6 = md5_hh(_local6, _local3, _local4, _local5, _arg1[(_local7 + 8)], 11, -2022574463);
_local5 = md5_hh(_local5, _local6, _local3, _local4, _arg1[(_local7 + 11)], 16, 1839030562);
_local4 = md5_hh(_local4, _local5, _local6, _local3, _arg1[(_local7 + 14)], 23, -35309556);
_local3 = md5_hh(_local3, _local4, _local5, _local6, _arg1[(_local7 + 1)], 4, -1530992060);
_local6 = md5_hh(_local6, _local3, _local4, _local5, _arg1[(_local7 + 4)], 11, 1272893353);
_local5 = md5_hh(_local5, _local6, _local3, _local4, _arg1[(_local7 + 7)], 16, -155497632);
_local4 = md5_hh(_local4, _local5, _local6, _local3, _arg1[(_local7 + 10)], 23, -1094730640);
_local3 = md5_hh(_local3, _local4, _local5, _local6, _arg1[(_local7 + 13)], 4, 681279174);
_local6 = md5_hh(_local6, _local3, _local4, _local5, _arg1[(_local7 + 0)], 11, -358537222);
_local5 = md5_hh(_local5, _local6, _local3, _local4, _arg1[(_local7 + 3)], 16, -722521979);
_local4 = md5_hh(_local4, _local5, _local6, _local3, _arg1[(_local7 + 6)], 23, 76029189);
_local3 = md5_hh(_local3, _local4, _local5, _local6, _arg1[(_local7 + 9)], 4, -640364487);
_local6 = md5_hh(_local6, _local3, _local4, _local5, _arg1[(_local7 + 12)], 11, -421815835);
_local5 = md5_hh(_local5, _local6, _local3, _local4, _arg1[(_local7 + 15)], 16, 530742520);
_local4 = md5_hh(_local4, _local5, _local6, _local3, _arg1[(_local7 + 2)], 23, -995338651);
_local3 = md5_ii(_local3, _local4, _local5, _local6, _arg1[(_local7 + 0)], 6, -198630844);
_local6 = md5_ii(_local6, _local3, _local4, _local5, _arg1[(_local7 + 7)], 10, 1126891415);
_local5 = md5_ii(_local5, _local6, _local3, _local4, _arg1[(_local7 + 14)], 15, -1416354905);
_local4 = md5_ii(_local4, _local5, _local6, _local3, _arg1[(_local7 + 5)], 21, -57434055);
_local3 = md5_ii(_local3, _local4, _local5, _local6, _arg1[(_local7 + 12)], 6, 1700485571);
_local6 = md5_ii(_local6, _local3, _local4, _local5, _arg1[(_local7 + 3)], 10, -1894986606);
_local5 = md5_ii(_local5, _local6, _local3, _local4, _arg1[(_local7 + 10)], 15, -1051523);
_local4 = md5_ii(_local4, _local5, _local6, _local3, _arg1[(_local7 + 1)], 21, -2054922799);
_local3 = md5_ii(_local3, _local4, _local5, _local6, _arg1[(_local7 + 8)], 6, 1873313359);
_local6 = md5_ii(_local6, _local3, _local4, _local5, _arg1[(_local7 + 15)], 10, -30611744);
_local5 = md5_ii(_local5, _local6, _local3, _local4, _arg1[(_local7 + 6)], 15, -1560198380);
_local4 = md5_ii(_local4, _local5, _local6, _local3, _arg1[(_local7 + 13)], 21, 1309151649);
_local3 = md5_ii(_local3, _local4, _local5, _local6, _arg1[(_local7 + 4)], 6, -145523070);
_local6 = md5_ii(_local6, _local3, _local4, _local5, _arg1[(_local7 + 11)], 10, -1120210379);
_local5 = md5_ii(_local5, _local6, _local3, _local4, _arg1[(_local7 + 2)], 15, 718787259);
_local4 = md5_ii(_local4, _local5, _local6, _local3, _arg1[(_local7 + 9)], 21, -343485551);
_local3 = safe_add(_local3, _local8);
_local4 = safe_add(_local4, _local9);
_local5 = safe_add(_local5, _local10);
_local6 = safe_add(_local6, _local11);
_local7 = (_local7 + 16);
};
return ([_local3, _local4, _local5, _local6]);
}
public static function str2rstr_utf16le(_arg1:String):String{
var _local2 = "";
var _local3:Number = 0;
while (_local3 < _arg1.length) {
_local2 = (_local2 + String.fromCharCode((_arg1.charCodeAt(_local3) & 0xFF), ((_arg1.charCodeAt(_local3) >>> 8) & 0xFF)));
_local3++;
};
return (_local2);
}
public static function hex_hmac_md5(_arg1:String, _arg2:String):String{
return (rstr2hex(rstr_hmac_md5(str2rstr_utf8(_arg1), str2rstr_utf8(_arg2))));
}
public static function binl2rstr(_arg1:Array):String{
var _local2 = "";
var _local3:Number = 0;
while (_local3 < (_arg1.length * 32)) {
_local2 = (_local2 + String.fromCharCode(((_arg1[(_local3 >> 5)] >>> (_local3 % 32)) & 0xFF)));
_local3 = (_local3 + 8);
};
return (_local2);
}
public static function md5_ff(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Number):Number{
return (md5_cmn(((_arg2 & _arg3) | (~(_arg2) & _arg4)), _arg1, _arg2, _arg5, _arg6, _arg7));
}
public static function md5_ii(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Number):Number{
return (md5_cmn((_arg3 ^ (_arg2 | ~(_arg4))), _arg1, _arg2, _arg5, _arg6, _arg7));
}
public static function rstr2binl(_arg1:String):Array{
var _local2:Number = 0;
var _local3:Array = new Array((_arg1.length >> 2));
_local2 = 0;
while (_local2 < _local3.length) {
_local3[_local2] = 0;
_local2++;
};
_local2 = 0;
while (_local2 < (_arg1.length * 8)) {
_local3[(_local2 >> 5)] = (_local3[(_local2 >> 5)] | ((_arg1.charCodeAt((_local2 / 8)) & 0xFF) << (_local2 % 32)));
_local2 = (_local2 + 8);
};
return (_local3);
}
public static function md5_vm_test():Boolean{
return ((hex_md5("abc") == "900150983cd24fb0d6963f7d28e17f72"));
}
public static function b64_md5(_arg1:String):String{
return (rstr2b64(rstr_md5(str2rstr_utf8(_arg1))));
}
public static function any_hmac_md5(_arg1:String, _arg2:String, _arg3:String):String{
return (rstr2any(rstr_hmac_md5(str2rstr_utf8(_arg1), str2rstr_utf8(_arg2)), _arg3));
}
public static function hex_md5(_arg1:String):String{
return (rstr2hex(rstr_md5(str2rstr_utf8(_arg1))));
}
public static function bit_rol(_arg1:Number, _arg2:Number):Number{
return (((_arg1 << _arg2) | (_arg1 >>> (32 - _arg2))));
}
public static function encrypt(_arg1:String):String{
return (hex_md5(_arg1));
}
public static function md5_hh(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Number):Number{
return (md5_cmn(((_arg2 ^ _arg3) ^ _arg4), _arg1, _arg2, _arg5, _arg6, _arg7));
}
public static function rstr2hex(_arg1:String):String{
var _local4:Number;
var _local2:String = (hexcase) ? "0123456789ABCDEF" : "0123456789abcdef";
var _local3 = "";
var _local5:Number = 0;
while (_local5 < _arg1.length) {
_local4 = _arg1.charCodeAt(_local5);
_local3 = (_local3 + (_local2.charAt(((_local4 >>> 4) & 15)) + _local2.charAt((_local4 & 15))));
_local5++;
};
return (_local3);
}
public static function any_md5(_arg1:String, _arg2:String):String{
return (rstr2any(rstr_md5(str2rstr_utf8(_arg1)), _arg2));
}
public static function b64_hmac_md5(_arg1:String, _arg2:String):String{
return (rstr2b64(rstr_hmac_md5(str2rstr_utf8(_arg1), str2rstr_utf8(_arg2))));
}
public static function rstr2b64(_arg1:String):String{
var _local6:Number;
var _local7:Number;
var _local2 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
var _local3 = "";
var _local4:Number = _arg1.length;
var _local5:Number = 0;
while (_local5 < _local4) {
_local6 = (((_arg1.charCodeAt(_local5) << 16) | (((_local5 + 1) < _local4)) ? (_arg1.charCodeAt((_local5 + 1)) << 8) : 0) | (((_local5 + 2) < _local4)) ? _arg1.charCodeAt((_local5 + 2)) : 0);
_local7 = 0;
while (_local7 < 4) {
if (((_local5 * 8) + (_local7 * 6)) > (_arg1.length * 8)){
_local3 = (_local3 + b64pad);
} else {
_local3 = (_local3 + _local2.charAt(((_local6 >>> (6 * (3 - _local7))) & 63)));
};
_local7++;
};
_local5 = (_local5 + 3);
};
return (_local3);
}
public static function safe_add(_arg1:Number, _arg2:Number):Number{
var _local3:Number = ((_arg1 & 0xFFFF) + (_arg2 & 0xFFFF));
var _local4:Number = (((_arg1 >> 16) + (_arg2 >> 16)) + (_local3 >> 16));
return (((_local4 << 16) | (_local3 & 0xFFFF)));
}
public static function str2rstr_utf8(_arg1:String):String{
var _local4:Number;
var _local5:Number;
var _local2 = "";
var _local3:Number = -1;
while (++_local3 < _arg1.length) {
_local4 = _arg1.charCodeAt(_local3);
_local5 = (((_local3 + 1) < _arg1.length)) ? _arg1.charCodeAt((_local3 + 1)) : 0;
if ((((((((0xD800 <= _local4)) && ((_local4 <= 56319)))) && ((0xDC00 <= _local5)))) && ((_local5 <= 57343)))){
_local4 = ((65536 + ((_local4 & 1023) << 10)) + (_local5 & 1023));
_local3++;
};
if (_local4 <= 127){
_local2 = (_local2 + String.fromCharCode(_local4));
} else {
if (_local4 <= 2047){
_local2 = (_local2 + String.fromCharCode((192 | ((_local4 >>> 6) & 31)), (128 | (_local4 & 63))));
} else {
if (_local4 <= 0xFFFF){
_local2 = (_local2 + String.fromCharCode((224 | ((_local4 >>> 12) & 15)), (128 | ((_local4 >>> 6) & 63)), (128 | (_local4 & 63))));
} else {
if (_local4 <= 2097151){
_local2 = (_local2 + String.fromCharCode((240 | ((_local4 >>> 18) & 7)), (128 | ((_local4 >>> 12) & 63)), (128 | ((_local4 >>> 6) & 63)), (128 | (_local4 & 63))));
};
};
};
};
};
return (_local2);
}
public static function rstr_hmac_md5(_arg1:String, _arg2:String):String{
var _local3:Array = rstr2binl(_arg1);
if (_local3.length > 16){
_local3 = binl_md5(_local3, (_arg1.length * 8));
};
var _local4:Array = new Array(16);
var _local5:Array = new Array(16);
var _local6:Number = 0;
while (_local6 < 16) {
_local4[_local6] = (_local3[_local6] ^ 909522486);
_local5[_local6] = (_local3[_local6] ^ 1549556828);
_local6++;
};
var _local7:Array = binl_md5(_local4.concat(rstr2binl(_arg2)), (0x0200 + (_arg2.length * 8)));
return (binl2rstr(binl_md5(_local5.concat(_local7), (0x0200 + 128))));
}
public static function str2rstr_utf16be(_arg1:String):String{
var _local2 = "";
var _local3:Number = 0;
while (_local3 < _arg1.length) {
_local2 = (_local2 + String.fromCharCode(((_arg1.charCodeAt(_local3) >>> 8) & 0xFF), (_arg1.charCodeAt(_local3) & 0xFF)));
_local3++;
};
return (_local2);
}
public static function rstr2any(_arg1:String, _arg2:String):String{
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Array;
var _local3:Number = _arg2.length;
var _local4:Array = [];
var _local9:Array = ((_arg1.length / 2) as Array);
_local5 = 0;
while (_local5 < _local9.length) {
_local9[_local5] = ((_arg1.charCodeAt((_local5 * 2)) << 8) | _arg1.charCodeAt(((_local5 * 2) + 1)));
_local5++;
};
while (_local9.length > 0) {
_local8 = [];
_local7 = 0;
_local5 = 0;
while (_local5 < _local9.length) {
_local7 = ((_local7 << 16) + _local9[_local5]);
_local6 = Math.floor((_local7 / _local3));
_local7 = (_local7 - (_local6 * _local3));
if ((((_local8.length > 0)) || ((_local6 > 0)))){
_local8[_local8.length] = _local6;
};
_local5++;
};
_local4[_local4.length] = _local7;
_local9 = _local8;
};
var _local10 = "";
_local5 = (_local4.length - 1);
while (_local5 >= 0) {
_local10 = (_local10 + _arg2.charAt(_local4[_local5]));
_local5--;
};
return (_local10);
}
public static function rstr_md5(_arg1:String):String{
return (binl2rstr(binl_md5(rstr2binl(_arg1), (_arg1.length * 8))));
}
}
}//package com.midasplayer.extras
Section 3
//MochiBot (com.midasplayer.extras.MochiBot)
package com.midasplayer.extras {
import flash.display.*;
import flash.net.*;
import flash.system.*;
public dynamic class MochiBot extends Sprite {
public static function track(_arg1:Sprite, _arg2:String):MochiBot{
if (Security.sandboxType == "localWithFile"){
return (null);
};
var _local3:MochiBot = new (MochiBot);
_arg1.addChild(_local3);
Security.allowDomain("*");
Security.allowInsecureDomain("*");
var _local4 = "http://core.mochibot.com/my/core.swf";
var _local5:URLVariables = new URLVariables();
_local5["sb"] = Security.sandboxType;
_local5["v"] = Capabilities.version;
_local5["swfid"] = _arg2;
_local5["mv"] = "8";
_local5["fv"] = "9";
var _local6:String = _local3.root.loaderInfo.loaderURL;
if (_local6.indexOf("http") == 0){
_local5["url"] = _local6;
} else {
_local5["url"] = "local";
};
var _local7:URLRequest = new URLRequest(_local4);
_local7.contentType = "application/x-www-form-urlencoded";
_local7.method = URLRequestMethod.POST;
_local7.data = _local5;
var _local8:Loader = new Loader();
_local3.addChild(_local8);
_local8.load(_local7);
return (_local3);
}
}
}//package com.midasplayer.extras
Section 4
//SimpleParticle (com.midasplayer.extras.SimpleParticle)
package com.midasplayer.extras {
import flash.display.*;
public dynamic class SimpleParticle extends Shape {
private var _color:Number;// = 0
private var _size:Number;// = 1
private var _type:String;// = "rect"
public static var RECT:String = "rect";
public static var CIRCLE:String = "circle";
public function get size():Number{
return (_size);
}
public function set size(_arg1:Number){
_size = _arg1;
draw();
}
public function get color():Number{
return (_color);
}
public function set color(_arg1:Number){
_color = _arg1;
draw();
}
public function get type():String{
return (_type);
}
private function draw(){
clear();
graphics.beginFill(_color, 1);
switch (type){
case RECT:
graphics.drawRect((-(size) / 2), (-(size) / 2), size, size);
break;
case CIRCLE:
graphics.drawCircle((-(size) / 2), (-(size) / 2), size);
break;
};
graphics.endFill();
}
public function clear(){
graphics.clear();
}
public function set type(_arg1:String){
_type = _arg1;
draw();
}
}
}//package com.midasplayer.extras
Section 5
//SineWave (com.midasplayer.extras.SineWave)
package com.midasplayer.extras {
public class SineWave {
private var my_cycles:Number;
private var my_radius:Number;
private var my_phase:Number;
private var my_inc:Number;
public function SineWave(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number){
my_phase = _arg1;
my_cycles = _arg2;
my_radius = _arg3;
my_inc = _arg4;
}
public function set radius(_arg1:Number):void{
my_radius = _arg1;
}
public function get cycles():Number{
return (my_cycles);
}
public function get radius():Number{
return (my_radius);
}
public function set cycles(_arg1:Number):void{
my_cycles = _arg1;
}
public function get phase():Number{
return (my_phase);
}
public function set inc(_arg1:Number):void{
my_inc = _arg1;
}
public function set phase(_arg1:Number):void{
my_phase = _arg1;
}
public function get inc():Number{
return (my_inc);
}
}
}//package com.midasplayer.extras
Section 6
//Water (com.midasplayer.extras.Water)
package com.midasplayer.extras {
import flash.display.*;
public class Water extends MovieClip {
private var m_lines:Array;
public function Water(){
m_lines = new Array();
super();
}
public function decrThickness(_arg1:Boolean):Boolean{
var _local2:int;
var _local3:Boolean;
var _local4:int;
var _local5:Boolean;
if (_arg1){
_local2 = 0;
while (_local2 < m_lines.length) {
_local3 = false;
if (m_lines[_local2].decrThickness()){
_local3 = true;
} else {
return (false);
};
_local2++;
};
return (_local3);
//unresolved jump
};
_local4 = 0;
while (_local4 < m_lines.length) {
_local5 = false;
if (m_lines[_local4].incrThickness()){
_local5 = true;
} else {
return (false);
};
_local4++;
};
return (_local5);
}
public function init(_arg1:Number, _arg2:Number){
var _local3:WaterLine;
var _local5:int;
var _local4:uint = 0xFF0000;
if (this.name == "RED"){
_local4 = 0xFF0000;
_local5 = 1;
};
if (this.name == "GREEN"){
_local4 = 0xFF00;
_local5 = 1;
};
if (this.name == "BLUE"){
_local4 = 2782939;
_local5 = 1;
};
var _local6:* = 0;
while (_local6 < _local5) {
_local3 = new WaterLine();
_local3.addParams(_local4, _arg1, _arg2);
_local3.x = (_local6 * 1.5);
addChild(_local3);
m_lines.push(_local3);
_local6++;
};
}
}
}//package com.midasplayer.extras
Section 7
//WaterLine (com.midasplayer.extras.WaterLine)
package com.midasplayer.extras {
import flash.events.*;
import flash.display.*;
public class WaterLine extends MovieClip {
private var _height:Number;// = 400
private var _line:Shape;
private var _particlesQuantity:Number;// = 20
private var _color:uint;
private var _bubbles:Array;
private var _step:Number;
private var _particles:Array;
private var _lineSize:Number;
public function WaterLine(){
trace("WaterLine()");
}
public function incrThickness():Boolean{
_lineSize = (_lineSize + 0.5);
if (_lineSize >= 5){
return (true);
};
return (false);
}
public function get randomDirection():Number{
return (((Math.round((Math.random() * 1)) * 2) - 1));
}
public function addParams(_arg1:uint, _arg2:Number, _arg3:Number):void{
_color = _arg1;
_height = _arg2;
_lineSize = _arg3;
init();
}
private function createBubbles():void{
var _local2:SimpleParticle;
var _local4:Number;
var _local5:Number;
var _local6:*;
var _local1:Array = [_color, _color];
var _local3:* = 0;
while (_local3 < 5) {
_local2 = new SimpleParticle();
_local2.type = SimpleParticle.CIRCLE;
_local2.size = 0.8;
_local2.color = _local1[Math.round((Math.random() * (_local1.length - 1)))];
_local2.alpha = 1;
addChild(_local2);
_bubbles.push(_local2);
_local3++;
};
for (_local6 in _bubbles) {
_local2 = _bubbles[_local6];
if (!_local2.isOut){
_local2.y = (_local2.y + ((Math.random() * 5) + 10));
_local4 = Math.floor((_local2.y / this._step));
_local2.x = (_local2.x + (((_particles[_local4].x + ((Math.random() * 1) * randomDirection)) - _local2.x) * 0.8));
_local5 = Math.sqrt((Math.pow((mouseX - _local2.x), 2) + Math.pow((mouseY - _local2.y), 2)));
if ((((_local5 < 4)) && (!(_local2.isOut)))){
};
} else {
_local2.y = (_local2.y + _local2.speedY);
_local2.speedY = (_local2.speedY + 3);
_local2.x = (_local2.x + _local2.speedX);
_local2.alpha = (_local2.alpha - 0.005);
};
if ((((_local2.y > _height)) || ((_local2.alpha < 0)))){
_bubbles.splice(_local6, 1);
_local2.parent.removeChild(_local2);
_local2 = null;
};
};
}
private function createLine():void{
var _local1:SimpleParticle;
var _local2:* = 0;
while (_local2 < _particlesQuantity) {
_local1 = new SimpleParticle();
_local1.elasticX = 0;
_local1.yIni = (_local1.y = (_step * _local2));
addChild(_local1);
_particles.push(_local1);
_local2++;
};
}
private function init(){
_line = new Shape();
_line.alpha = 0.8;
addChild(_line);
_bubbles = [];
_particles = [];
_step = (_height / (_particlesQuantity - 1));
createLine();
addEventListener(Event.ENTER_FRAME, animate);
}
private function animate(_arg1:Event):void{
var _local2:SimpleParticle;
var _local3:SimpleParticle;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local9:Number;
var _local8:Number = 10;
var _local10:Number = 3;
_line.graphics.clear();
_line.graphics.moveTo(_particles[0].x, _particles[0].y);
_line.graphics.lineStyle(_lineSize, _color, 1);
var _local11:* = 0;
while (_local11 < _particles.length) {
_local3 = _particles[_local11];
if (_local11 == 0){
_local3.x = (_local3.x + ((((Math.random() * _local10) * randomDirection) - _local3.x) * 0.9));
};
_local2 = ((_local11)>0) ? _particles[(_local11 - 1)] : _local3;
_local7 = Math.sqrt((Math.pow((mouseX - 0), 2) + Math.pow((mouseY - _local3.yIni), 2)));
if (_local7 < _local8){
} else {
_local5 = _local2.x;
_local3.elasticX = ((_local3.elasticX * 0.4) + ((_local5 - _local3.x) * 0.4));
_local3.x = (_local3.x + _local3.elasticX);
};
if (_local11 > 0){
_line.graphics.curveTo(_local2.x, _local2.y, ((_local2.x + _local3.x) / 2), ((_local2.y + _local3.y) / 2));
};
_local11++;
};
}
private function spreadBubble(_arg1:SimpleParticle):void{
_arg1.isOut = true;
parent.parent.addChild(_arg1);
_arg1.size = 1.2;
_arg1.alpha = 0.35;
_arg1.x = (parent.x + _arg1.x);
_arg1.y = (parent.y + _arg1.y);
_arg1.speedY = (-5 - (Math.random() * 10));
_arg1.speedX = (((Math.random() * 15) + 1) * randomDirection);
}
public function decrThickness():Boolean{
_lineSize--;
if (_lineSize <= 0){
return (true);
};
return (false);
}
}
}//package com.midasplayer.extras
Section 8
//WaveEngine (com.midasplayer.extras.WaveEngine)
package com.midasplayer.extras {
import flash.events.*;
import flash.display.*;
public class WaveEngine extends MovieClip {
private var m_wave:DrawSine;
private var m_fillColor:uint;
private var m_num_waves:int;// = 3
private var m_waveHolder:MovieClip;
private var m_sinArr:Array;
private var m_rootRef:MovieClip;
public function WaveEngine(_arg1:MovieClip, _arg2:int, _arg3:int, _arg4:uint, _arg5:uint, _arg6:MovieClip){
m_waveHolder = new MovieClip();
m_sinArr = new Array();
super();
m_rootRef = _arg1;
m_waveHolder = _arg6;
m_wave = new DrawSine(m_waveHolder, _arg2, _arg3, 100);
var _local7:* = 0;
while (_local7 < m_num_waves) {
m_sinArr.push(new SineWave(((Math.random() * Math.PI) * 1.5), (Math.random() * 1.5), ((Math.random() * 1.5) + 1), (Math.random() - 0.5)));
_local7++;
};
m_wave.set_stroke(3, _arg5);
m_wave.set_fill(true, _arg4, 100);
m_fillColor = _arg4;
}
public function startWave():void{
m_rootRef.addEventListener(Event.ENTER_FRAME, update);
}
public function getWave():MovieClip{
return (m_waveHolder);
}
private function update(_arg1:Event):void{
var _local2:*;
for (_local2 in m_sinArr) {
m_sinArr[_local2].phase = (m_sinArr[_local2].phase + m_sinArr[_local2].inc);
};
m_wave.set_fill(true, m_fillColor, 1);
m_wave.draw_waves(m_sinArr);
}
public function stopWave():void{
m_rootRef.removeEventListener(Event.ENTER_FRAME, update);
}
public function colorUpdate(_arg1:uint):void{
var _local2:String = ("0x" + _arg1.toString(16));
m_fillColor = uint(_local2);
}
}
}//package com.midasplayer.extras
Section 9
//KingAPI (com.midasplayer.KingAPI)
package com.midasplayer {
import flash.events.*;
import com.midasplayer.extras.*;
import flash.net.*;
import flash.external.*;
public class KingAPI {
public static const LINK_TYPE_RIGHT_CLICK:String = "rightclick";
public static const USER_TYPE_SUBSCRIPTION:int = 3;
public static const LINK_TYPE_HIGHSCORES:String = "highscores";
public static const LINK_TYPE_SIGN:String = "sign";
public static const INITIALIZED_EVENT:String = "initialized";
public static const LINK_TYPE_OTHER_GAMES:String = "other_games";
public static const USER_TYPE_REGISTERED:int = 1;
private static const SAK:String = "ggfd7sday923mdsfd8csfds34";
private static const loadHomeParametersURL:String = "http://www.king.com/servlet/FreeGameServlet?action=load";
public static const LINK_TYPE_LOADER_MOVIE:String = "loader_movie";
private static const bounceURL:String = "http://www.mygame.com/king/bounce.jsp";
public static const LINK_TYPE_PROTECT:String = "protect";
public static const LINK_TYPE_ADD_GAME:String = "add_game";
public static const USER_TYPE_GOLD:int = 2;
public static const USER_TYPE_UNREGISTERED:int = 0;
public static const HOST_BANNED_EVENT:String = "hostBanned";
private static const SK:String = "vf78hxcsjak77cxzhjkwad87s";
private static const loadCountURL:String = "http://www.mygame.com/king/loadcount.jsp";
public static const LINK_TYPE_LOADER_PROGRESS:String = "loader_progress";
private static var check:String = null;
public static var gameName:String;
public static var banned:Boolean = false;
protected static var dispatcher:EventDispatcher;
public static var isHome:Boolean = false;
private static var sessionID:String;
private static var iscore:int = 123;
public static var fromURL:String;
private static var SSK:String = "ng43ui54hy35tdsnd6f54rews";
private static function loadUrlErrorHandler(_arg1:Event):void{
trace(("Unable to load url: " + _arg1));
}
public static function resetScore():void{
iscore = 123;
check = null;
}
public static function openOfflineProtectionLink():void{
openKingPage(LINK_TYPE_PROTECT);
}
public static function init(_arg1:String, _arg2:String):void{
var so:SharedObject;
var rnd1:Number;
var rnd2:Number;
var name = _arg1;
var from = _arg2;
gameName = name;
fromURL = from;
var loadCounter:URLLoader = new URLLoader();
var reqvars:URLVariables = new URLVariables();
reqvars.game = gameName;
reqvars.from = fromURL;
try {
so = SharedObject.getLocal("sessionId");
if (so.data.sessionID == null){
rnd1 = Math.abs(Math.floor((Math.random() * 4294967295)));
rnd2 = Math.abs(Math.floor((Math.random() * 4294967295)));
so.data.sessionID = (rnd1.toString(16) + rnd2.toString(16));
so.flush();
};
sessionID = so.data.sessionID;
} catch(e:Error) {
sessionID = "error";
};
reqvars.session = sessionID;
var request:URLRequest = new URLRequest(((loadCountURL + "?") + reqvars.toString()));
loadCounter.addEventListener(Event.COMPLETE, loadCountHandler);
loadCounter.addEventListener(IOErrorEvent.IO_ERROR, loadUrlErrorHandler);
loadCounter.addEventListener(SecurityErrorEvent.SECURITY_ERROR, loadUrlErrorHandler);
try {
loadCounter.load(request);
} catch(error:Error) {
trace(("Unable to load loadcount url: " + loadCountURL));
trace(error.message);
};
}
private static function loadHomeParametersHandler(_arg1:Event):void{
var _local2:URLLoader = URLLoader(_arg1.target);
trace(("loadCounter.data" + _local2.data));
}
public static function submitInternalScore():void{
checkScore();
var _local1:int = ((iscore - 123) / 2);
submitScore(_local1);
}
public static function openOtherGamesLink():void{
openKingPage(LINK_TYPE_OTHER_GAMES);
}
public static function openKingPage(_arg1:String, _arg2:String=null):void{
var _local3:URLVariables = new URLVariables();
_local3.game = gameName;
_local3.from = fromURL;
_local3.type = _arg1;
_local3.session = sessionID;
if (_arg2 != null){
_local3.redirect = _arg2;
};
var _local4 = "_blank";
if (isHome){
_local4 = "_top";
};
navigateToURL(new URLRequest(((bounceURL + "?") + _local3.toString())), _local4);
}
private static function loadCountHandler(_arg1:Event):void{
var vars:URLVariables;
var event = _arg1;
var loadCounter:URLLoader = URLLoader(event.target);
trace(("loadCounter.data :" + loadCounter.data));
try {
vars = new URLVariables(loadCounter.data);
if (vars.h == "true"){
isHome = true;
};
if (vars.b == "true"){
banned = true;
dispatcher.dispatchEvent(new Event(HOST_BANNED_EVENT));
} else {
dispatcher.dispatchEvent(new Event(INITIALIZED_EVENT));
};
trace((("::" + vars.h) + "::"));
trace((("::" + vars.b) + "::"));
} catch(e:Error) {
trace(("Error reading data from loadcount url: " + e));
dispatcher.dispatchEvent(new Event(INITIALIZED_EVENT));
};
}
public static function addEventListener(_arg1:String, _arg2:Function):void{
if (dispatcher == null){
dispatcher = new EventDispatcher();
};
dispatcher.addEventListener(_arg1, _arg2);
}
public static function openLoaderMovieLink():void{
openKingPage(LINK_TYPE_LOADER_MOVIE);
}
public static function removeEventListener(_arg1:String, _arg2:Function):void{
if (dispatcher == null){
return;
};
dispatcher.removeEventListener(_arg1, _arg2);
}
public static function submitScore(_arg1:int):void{
var score = _arg1;
var hash:String = md5.encrypt(((((score + ":") + gameName) + ":") + SSK));
try {
if (isHome){
ExternalInterface.call("submitScore", score, hash);
} else {
openKingPage(LINK_TYPE_HIGHSCORES, ((((("game/" + gameName) + "/submit/") + score) + ":") + hash));
};
} catch(e:Error) {
trace(e);
};
}
public static function submitLevel(_arg1:int):void{
var level = _arg1;
var hash:String = md5.encrypt(((((level + ":") + gameName) + ":") + SSK));
try {
if (isHome){
ExternalInterface.call("submitLevel", level, hash);
};
} catch(e:Error) {
trace(e);
};
}
public static function openHighscoresLink():void{
openKingPage(LINK_TYPE_HIGHSCORES, (("game/" + gameName) + "/highscores"));
}
public static function openSignLink():void{
if (!isHome){
openKingPage(LINK_TYPE_SIGN);
};
}
public static function openRightClickLink():void{
openKingPage(LINK_TYPE_RIGHT_CLICK);
}
private static function checkScore():void{
if (check != null){
if (check != md5.encrypt(((((iscore + ":") + gameName) + ":") + SK))){
SSK = "ng41ui54hy35tdsnd6f54rews";
};
};
}
public static function addScore(_arg1:int):int{
checkScore();
var _local2:int = ((iscore - 123) / 2);
_local2 = (_local2 + _arg1);
iscore = ((_local2 * 2) + 123);
check = md5.encrypt(((((iscore + ":") + gameName) + ":") + SK));
return (_local2);
}
public static function openLoaderProgressLink():void{
openKingPage(LINK_TYPE_LOADER_PROGRESS);
}
public static function openAddToWebsiteLink():void{
openKingPage(LINK_TYPE_ADD_GAME, "website_content.jsp");
}
public static function submitAchievement(_arg1:String):void{
var achievement = _arg1;
var hash:String = md5.encrypt(((((achievement + ":") + gameName) + ":") + SAK));
try {
if (isHome){
ExternalInterface.call("submitAchievement", achievement, hash);
};
} catch(e:Error) {
trace(e);
};
}
}
}//package com.midasplayer
Section 10
//MainLoader (com.midasplayer.MainLoader)
package com.midasplayer {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import com.midasplayer.extras.*;
import fl.transitions.*;
import fl.transitions.easing.*;
import flash.media.*;
public class MainLoader extends MovieClip {
public var enemyRoom1:EnemyRoom;
public var enemyRoom2:EnemyRoom;
public var enemyRoom3:EnemyRoom;
public var enemyRoom4:EnemyRoom;
public var enemyRoom5:EnemyRoom;
public var enemyRoom6:EnemyRoom;
public var enemyRoom7:EnemyRoom;
public var enemyRoom8:EnemyRoom;
public var c3transitTo10:MoveCameraFunctor;
public var fixedYellow8:EnemyParameters;
public var chaserWhite:EnemyParameters;
public var room16_blackWall1:ColorWall;
public var room16_blackWall2:ColorWall;
public var room25_redWall1:ColorWall;
public var R6Trig:Trigger;
public var lvl4transitionRoom5to7:MoveCameraFunctor;
public var lvl4transitionRoom5to8:MoveCameraFunctor;
public var lvl4transitionRoom5to9:MoveCameraFunctor;
public var transitionZone2toBigRoom:MoveCameraFunctor;
public var lvl4transitionRoom5to6:MoveCameraFunctor;
public var lv4Door1:Door;
public var lv4Door2:Door;
public var room2Text:MovieClip;
private var m_loaderContent:Array;
public var dodgerWhite8:EnemyParameters;
public var text1:ChargeText;
public var R12Trig:Trigger;
public var room34_eventTrig1:Trigger;
public var room14box:CameraBox;
public var trialDoor2:DoorLock;
public var room5box:CameraBox;
public var R4Spawn1:SpawnPoint;
public var R4Spawn2:SpawnPoint;
public var cameraswitch32toTransitionBox7:MoveCameraFunctor;
public var trialDoor1:DoorLock;
public var transitionZone4DoorLock2:DoorLock;
public var R7Spawn10:SpawnPoint;
public var chaserGreen5:EnemyParameters;
public var TrialClear:Boolean;
public var fixedYellow:EnemyParameters;
public var room18_field1:ColorField;
public var room18_field3:ColorField;
public var room19_enemy1:PathEnemy;
public var room19_enemy2:PathEnemy;
public var room19_enemy3:PathEnemy;
public var room19_enemy4:PathEnemy;
public var room03_text1:SwitchColorText;
public var e10:PathEnemy;
public var e11:PathEnemy;
public var e12:PathEnemy;
public var e13:PathEnemy;
public var e15:PathEnemy;
public var e16:PathEnemy;
private var m_tweenBounceLogo:Tween;
public var e14:PathEnemy;
public var chaserFastYellow:EnemyParameters;
public var shooterWhite5:EnemyParameters;
public var shooterWhite8:EnemyParameters;
public var R4Trig:Trigger;
public var room32_blueSwitch1:FloorSwitch;
public var room23_purpleSwitch1:FloorSwitch;
public var R1Lock1:DoorLock;
public var R1Lock2:DoorLock;
public var cameraSwith3to5:MoveCameraFunctor;
public var cameraSwithTransitionto33:MoveCameraFunctor;
public var room29_redSwitch2:FloorSwitch;
public var room29_redSwitch3:FloorSwitch;
public var enemy4:PathEnemy;
public var R10Trig:Trigger;
public var enemy6:PathEnemy;
public var enemy7:PathEnemy;
public var enemy9:PathEnemy;
public var bossPurpleSwitch1:FloorSwitch;
public var redwall1:ColorWall;
public var redwall2:ColorWall;
public var room29_redSwitch1:FloorSwitch;
public var redwall4:ColorWall;
public var redwall5:ColorWall;
public var redwall6:ColorWall;
public var redwall7:ColorWall;
public var redwall8:ColorWall;
public var redwall3:ColorWall;
private var STAGE_HEIGHT:Number;// = 500
public var enemy1:PathEnemy;
public var enemy2:PathEnemy;
public var enemy3:PathEnemy;
public var enemy5:PathEnemy;
public var enemy8:PathEnemy;
public var redwall9:ColorWall;
public var cameraSwith3to4:MoveCameraFunctor;
public var cameraSwith28to29:MoveCameraFunctor;
private var m_waveHolderCrown:MovieClip;
public var fixedBlue:EnemyParameters;
public var Room2Clear:Boolean;
public var cameraSwithYellowChargeto23:MoveCameraFunctor;
public var Door1:Door;
public var Door4:Door;
public var chaserRed8:EnemyParameters;
public var chaserRed5:EnemyParameters;
private var m_dist:Number;
public var enemyRoomTrial5:EnemyRoom;
public var bluewall10:ColorWall;
public var room03_hintTrig:Trigger;
public var bluewall12:ColorWall;
public var bluewall13:ColorWall;
public var bluewall14:ColorWall;
public var bluewall15:ColorWall;
private var m_logoHolder:Sprite;
public var door3:Door;
public var room9box:CameraBox;
public var R2Trig:Trigger;
public var boss2:BubbleBoss;
public var bluewall11:ColorWall;
private var m_maskRown:MovieClip;
public var trigBossLock:Trigger;
public var dodgerBlue:EnemyParameters;
public var greenwall1:ColorWall;
public var greenwall2:ColorWall;
public var greenwall3:ColorWall;
public var greenwall4:ColorWall;
public var greenwall5:ColorWall;
public var greenwall6:ColorWall;
public var greenwall7:ColorWall;
public var greenwall8:ColorWall;
public var room32_redSwitch1:FloorSwitch;
public var greenwall9:ColorWall;
public var R7Spawn1:SpawnPoint;
public var R7Spawn2:SpawnPoint;
public var R7Spawn3:SpawnPoint;
public var R7Spawn4:SpawnPoint;
public var R7Spawn5:SpawnPoint;
public var R7Spawn6:SpawnPoint;
public var R7Spawn7:SpawnPoint;
public var R7Spawn8:SpawnPoint;
public var R7Spawn9:SpawnPoint;
public var room2_fl2:ColorFloorPatch;
public var room2_fl3:ColorFloor;
private var m_streamGreen:Boolean;// = true
public var room2_fl1:ColorFloor;
private var m_pressBtn:Boolean;// = false
public var room27_switch1:Switch;
public var R3Lock1:DoorLock;
public var R3Lock2:DoorLock;
private var m_colorOff:Boolean;// = false
public var cameraSwith26to27:MoveCameraFunctor;
private var m_endColor:ColorTransform;
public var room9_switch2:Switch;
public var room7_door1:Door;
public var bossGreenSwitch1:FloorSwitch;
private var m_waveEngineCrown:WaveEngine;
public var room9_switch1:Switch;
private var m_streamBlue:Boolean;// = false
public var laserBlue8:EnemyParameters;
public var cameraSwith37to35:MoveCameraFunctor;
public var bossDeath:EnemyDeathEvent;
public var cameraSwith7to8:MoveCameraFunctor;
public var room25_door1:Door;
public var room31_blueWall1:ColorWall;
public var room31_blueWall2:ColorWall;
public var room31_blueWall3:ColorWall;
private var m_overBtn:Boolean;// = false
public var room27_field1:ColorField;
public var trig10:Trigger;
public var trig11:Trigger;
public var trig12:Trigger;
public var trig13:Trigger;
public var trig14:Trigger;
public var trig15:Trigger;
public var trig16:Trigger;
public var trig17:Trigger;
public var trig18:Trigger;
private var m_prevPerc:Number;// = -1
public var Room4Clear:Boolean;
public var lvl4transitionRoom2to3:MoveCameraFunctor;
public var trig24:Trigger;
public var trig25:Trigger;
public var trig26:Trigger;
public var trig27:Trigger;
public var trig29:Trigger;
public var trig23:Trigger;
public var trig28:Trigger;
public var trig21:Trigger;
public var trig22:Trigger;
private var m_waveHolderLogo:MovieClip;
public var room34Wave2Event:EnemyDeathEvent;
public var trig33:Trigger;
public var trig34:Trigger;
public var trig35:Trigger;
public var trig36:Trigger;
public var trig37:Trigger;
public var shooterBlue:EnemyParameters;
public var room26Wave2Event:EnemyDeathEvent;
private var m_clsGreen:Water;
public var trig20:Trigger;
public var cameraSwith13to14:MoveCameraFunctor;
public var trigBlockRoom25Activate:Trigger;
public var enemy10:PathEnemy;
public var enemy11:PathEnemy;
public var enemy12:PathEnemy;
public var enemy13:PathEnemy;
public var enemy14:PathEnemy;
public var enemy15:PathEnemy;
public var enemy16:PathEnemy;
public var enemy17:PathEnemy;
public var enemy18:PathEnemy;
public var enemy19:PathEnemy;
public var room2box:CameraBox;
public var roomYellowPickup_yellowSwitch1:FloorSwitch;
public var room11box:CameraBox;
public var chaserRed:EnemyParameters;
public var yellowSuperPickedUp:Boolean;
public var room16_greenWall1:ColorWall;
public var room16_greenWall2:ColorWall;
public var enemy20:PathEnemy;
public var enemy21:PathEnemy;
public var enemy22:PathEnemy;
public var enemy23:PathEnemy;
public var enemy24:PathEnemy;
public var enemy25:PathEnemy;
public var enemy26:PathEnemy;
public var enemy27:PathEnemy;
public var enemy28:PathEnemy;
public var enemy29:PathEnemy;
public var room29_blueWall1:ColorWall;
public var room29_blueWall2:ColorWall;
public var room29_blueWall3:ColorWall;
public var room29_blueWall4:ColorWall;
public var cameraSwith24to25:MoveCameraFunctor;
public var weaponUpgrade1:WeaponUpgradeFunctor;
public var weaponUpgrade2:WeaponUpgradeFunctor;
public var weaponUpgrade3:WeaponUpgradeFunctor;
public var chaserYellow:EnemyParameters;
public var enemy30:PathEnemy;
public var enemy31:PathEnemy;
public var enemy32:PathEnemy;
public var yellowWeapPickup:MovieClip;
public var l2Glow:MovieClip;
public var R5Lock1:DoorLock;
public var R5Lock2:DoorLock;
public var R5Lock3:DoorLock;
public var bossBlueSwitch1:FloorSwitch;
private var m_tween:Tween;
public var laserWhite:EnemyParameters;
public var lbar:MovieClip;
public var room17_field1:ColorField;
public var room17_field2:ColorField;
public var R6_Switch1:FloorSwitch;
public var R6_Switch2:FloorSwitch;
public var room18_enemy1:ChaserEnemy;
public var room18_enemy2:ChaserEnemy;
public var room18_enemy3:ChaserEnemy;
public var room18_enemy4:ChaserEnemy;
public var transitionbox1ToTransition:MoveCameraFunctor;
public var Room6Clear:Boolean;
public var room14_switch1:Switch;
public var room14_switch2:Switch;
public var room14_switch3:Switch;
public var R7TrigC:Trigger;
public var fixedRed:EnemyParameters;
public var cameraSwith11to13:MoveCameraFunctor;
public var room25_switch1:Switch;
private var m_GREEN:MovieClip;
public var lvl4transitionRoom6to7:MoveCameraFunctor;
public var cameraSwith22to23:MoveCameraFunctor;
public var room29_redWall1:ColorWall;
public var room29_redWall2:ColorWall;
public var room29_redWall3:ColorWall;
public var spawn6_25:SpawnPoint;
private var m_waveEngineLogo:WaveEngine;
public var room7_switch1:SpecialSwitch;
public var room26_eventTrig1:Trigger;
private var STAGE_WIDTH:Number;// = 700
public var room9Text:MovieClip;
public var cameraSwith33to34:MoveCameraFunctor;
public var room15box:CameraBox;
public var room6box:CameraBox;
public var room24_orangeWall1:ColorWall;
public var R7Lock1:DoorLock;
public var R7Lock2:DoorLock;
public var R5_Switch1:FloorSwitch;
public var chaserFastBlue:EnemyParameters;
public var zRoom10:CameraBox;
public var zRoom11:CameraBox;
public var zRoom12:CameraBox;
public var room34_doorLock1:DoorLock;
public var room34_doorLock2:DoorLock;
public var transitToR12C:MoveCameraFunctor;
public var transitToR12B:MoveCameraFunctor;
public var room29_blueSwitch1:FloorSwitch;
public var room29_blueSwitch2:FloorSwitch;
public var room29_blueSwitch3:FloorSwitch;
public var purplewall1:ColorWall;
public var purplewall2:ColorWall;
public var purplewall3:ColorWall;
public var purplewall4:ColorWall;
public var purplewall5:ColorWall;
public var purplewall6:ColorWall;
public var purplewall7:ColorWall;
public var purplewall8:ColorWall;
public var purplewall9:ColorWall;
public var room26_doorLock1:DoorLock;
public var room26_doorLock2:DoorLock;
public var room13_switch1:Switch;
public var l9r1e1:EnemyDeathEvent;
public var l9r1e2:EnemyDeathEvent;
private var m_crownFill:Boolean;// = false
public var R3Spawn1:SpawnPoint;
public var R3Spawn2:SpawnPoint;
public var boxYellowCharge:CameraBox;
public var room5_colorField1:ColorField;
public var room5_colorField3:ColorField;
public var room5_colorField4:ColorField;
public var room5_colorField5:ColorField;
public var room5_colorField2:ColorField;
public var room3TextTrig:Trigger;
public var fixedWhite8:EnemyParameters;
public var laserBlue:EnemyParameters;
public var Room8Clear:Boolean;
public var enemyRoomTrial25:EnemyRoom;
public var room32_blueWall1:ColorWall;
public var room32_blueWall2:ColorWall;
public var room23_purpleWall1:ColorWall;
public var room6_switch1:Switch;
public var bossYellowSwitch1:FloorSwitch;
public var room3_door1:Door;
public var room22_enemy1:ChaserEnemy;
public var room22_enemy3:ChaserEnemy;
public var chaserFastWhite5:EnemyParameters;
public var room22_enemy2:ChaserEnemy;
public var room35_eventTrig1:Trigger;
public var room26DeathEvent:EnemyDeathEvent;
public var room17_purpleWall2:ColorWall;
public var room26_field1:ColorField;
public var R1TrigLockA:Trigger;
public var zRoom1:CameraBox;
public var zRoom2:CameraBox;
public var zRoom3:CameraBox;
public var zRoom4:CameraBox;
public var zRoom5:CameraBox;
public var zRoom6:CameraBox;
public var zRoom7:CameraBox;
public var R1TrigLockB:Trigger;
public var zRoom9:CameraBox;
public var erTrial:EnemyRoomWriter;
public var zRoom8:CameraBox;
public var erTrial25:EnemyRoomWriter;
private var m_rootRef:MovieClip;
public var room23_switch1:Switch;
public var room23_switch2:Switch;
public var r1e1:EnemyDeathEvent;
public var r1e2:EnemyDeathEvent;
public var r1e3:EnemyDeathEvent;
public var r1e4:EnemyDeathEvent;
public var redSuperPickedUp:Boolean;
public var TransitionBox7:CameraBox;
public var R9Trig:Trigger;
public var erTrial5:EnemyRoomWriter;
public var room5_switch1:Switch;
public var dodgerRed:EnemyParameters;
public var room07_text:ChangeWeaponsText;
private var m_startColor:ColorTransform;
public var R6Spawn1:SpawnPoint;
public var R6Spawn2:SpawnPoint;
public var R6Spawn3:SpawnPoint;
public var Switch1:Switch;
public var chaserYellow8:EnemyParameters;
public var room16_field1:ColorField;
public var Switch4:Switch;
public var chaserYellow5:EnemyParameters;
public var R2TrigLockA:Trigger;
public var endTrig2:Trigger;
public var endTrig3:Trigger;
public var endTrig5:Trigger;
public var endTrig6:Trigger;
public var cameraSwith8to9:MoveCameraFunctor;
public var R2TrigLockB:Trigger;
public var shooterYellow8:EnemyParameters;
public var lvl4transitionRoom3to4:MoveCameraFunctor;
private var m_streamRed:Boolean;// = false
public var chaserFastRed:EnemyParameters;
public var shooterYellow5:EnemyParameters;
public var room33_switch1:Switch;
public var room6_door1:Door;
public var redWeapPickup:MovieClip;
public var room3box:CameraBox;
public var purplewall10:ColorWall;
public var purplewall11:ColorWall;
public var purplewall12:ColorWall;
public var purplewall13:ColorWall;
public var purplewall14:ColorWall;
public var purplewall15:ColorWall;
public var purplewall16:ColorWall;
public var purplewall17:ColorWall;
public var purplewall18:ColorWall;
public var purplewall19:ColorWall;
public var lv4Switch2:Switch;
public var Spawn1:SpawnPoint;
public var Spawn2:SpawnPoint;
public var Spawn3:SpawnPoint;
public var Spawn4:SpawnPoint;
public var Spawn5:SpawnPoint;
public var Spawn6:SpawnPoint;
public var Spawn7:SpawnPoint;
public var Spawn8:SpawnPoint;
public var Spawn9:SpawnPoint;
public var lv4Switch1:Switch;
public var purplewall20:ColorWall;
public var purplewall21:ColorWall;
public var purplewall22:ColorWall;
public var purplewall23:ColorWall;
public var purplewall24:ColorWall;
public var blueWeapPickup:MovieClip;
public var enemyRoomTrial:EnemyRoom;
public var room27_blueSwitch1:FloorSwitch;
public var room10_switch1:Switch;
public var room22Wave2Event:EnemyDeathEvent;
public var room10Text:MovieClip;
public var chaserWhite8:EnemyParameters;
public var R3TrigLockA:Trigger;
public var chaserWhite5:EnemyParameters;
public var R3TrigLockB:Trigger;
public var chaserBlue:EnemyParameters;
public var TransitionBox4toYellowCharge:MoveCameraFunctor;
public var room31_yellowWall1:ColorWall;
public var room31_yellowWall3:ColorWall;
public var room31_yellowWall4:ColorWall;
public var room31_yellowWall5:ColorWall;
public var R5Trig:Trigger;
public var cameraSwith1to2:MoveCameraFunctor;
public var room17_blueWall1:ColorWall;
public var room17_blueWall2:ColorWall;
public var room3_switch1:Switch;
public var laserYellow8:EnemyParameters;
public var room17_greenWall1:ColorWall;
public var er2:EnemyRoomWriter;
public var er3:EnemyRoomWriter;
public var er4:EnemyRoomWriter;
public var er5:EnemyRoomWriter;
public var er7:EnemyRoomWriter;
public var er8:EnemyRoomWriter;
public var R11Trig:Trigger;
public var er6:EnemyRoomWriter;
public var room18_eventTrig1:Trigger;
public var Room1Clear:Boolean;
public var doorLock1:DoorLock;
public var doorLock2:DoorLock;
public var doorLock3:DoorLock;
public var doorLock4:DoorLock;
public var doorLock5:DoorLock;
public var doorLock6:DoorLock;
public var doorLock7:DoorLock;
public var lazer1:LaserCannon;
public var lazer2:LaserCannon;
public var lazer3:LaserCannon;
public var lazer4:LaserCannon;
public var doorLock8:DoorLock;
public var chaserFastYellow5:EnemyParameters;
public var transitionZoneTrig2:Trigger;
public var transitionZoneTrig3:Trigger;
public var room25_field1:ColorField;
public var room25_field2:ColorField;
public var room33_door1:Door;
public var room9_door1:Door;
public var room9_door2:Door;
public var room26_enemy1:ChaserEnemy;
public var room26_enemy2:ChaserEnemy;
public var room26_enemy3:ChaserEnemy;
public var room26_enemy4:ChaserEnemy;
public var room26_enemy5:ChaserEnemy;
public var room26_enemy6:ChaserEnemy;
public var room26_enemy7:ChaserEnemy;
public var room26_enemy8:ChaserEnemy;
public var room26_enemy9:ChaserEnemy;
public var room16box:CameraBox;
public var trigBlockRoom25:Trigger;
public var trigBlockRoom27:Trigger;
public var room7box:CameraBox;
public var room27_door1:Door;
public var R4TrigLockA:Trigger;
public var R4TrigLockB:Trigger;
public var shooterGreen5:EnemyParameters;
public var laserRed:EnemyParameters;
public var R3Trig:Trigger;
public var roomYellowPickup_yellowWall1:ColorWall;
public var cameraSwith16to17:MoveCameraFunctor;
public var R2Lock1:DoorLock;
public var R2Lock2:DoorLock;
public var room24_eventTrig1:Trigger;
public var cameraSwith15toTransition1:MoveCameraFunctor;
public var R2Spawn1:SpawnPoint;
public var R2Spawn2:SpawnPoint;
public var cameraSwith5to6:MoveCameraFunctor;
public var R2Spawn3:SpawnPoint;
public var room03_text2_mc:room03_text2MC;
public var room22_doorLock1:DoorLock;
public var room22_doorLock2:DoorLock;
public var Room3Clear:Boolean;
public var transitionBox1:CameraBox;
public var transitionBox2:CameraBox;
public var transitionBox3:CameraBox;
public var transitionBox4:CameraBox;
public var transitionBox5:CameraBox;
public var transitionBox6:CameraBox;
public var transitionBox8:CameraBox;
public var room34Wave1Event:EnemyDeathEvent;
private var m_clsBlue:Water;
public var R5TrigLockA:Trigger;
public var R5TrigLockC:Trigger;
public var R1Trig:Trigger;
public var yellowwall17:ColorWall;
public var yellowwall18:ColorWall;
public var yellowwall19:ColorWall;
public var room34_enemy13:ChaserEnemy;
public var yellowwall14:ColorWall;
public var yellowwall15:ColorWall;
public var yellowwall16:ColorWall;
public var room34_enemy10:ChaserEnemy;
public var transitionLevel4:MoveCameraFunctor;
public var yellowwall12:ColorWall;
public var yellowwall13:ColorWall;
public var cameraSwith28toTransitionBox5:MoveCameraFunctor;
public var room34_enemy12:ChaserEnemy;
public var yellowwall11:ColorWall;
public var room34_enemy14:ChaserEnemy;
public var R5TrigLockB:Trigger;
public var yellowwall20:ColorWall;
public var room31_blueSwitch1:FloorSwitch;
public var yellowwall10:ColorWall;
public var room14_door2:Door;
public var yellowwall21:ColorWall;
public var room14_door1:Door;
public var room14_door3:Door;
public var cameraSwith14to15:MoveCameraFunctor;
public var transitionLevelX:MoveCameraFunctor;
public var laserYellow:EnemyParameters;
public var room22DeathEvent:EnemyDeathEvent;
public var cameraSwith25to24:MoveCameraFunctor;
public var fixedRed6:EnemyParameters;
public var fixedRed8:EnemyParameters;
public var transitionRoom3to4Functor;
private var m_step:Number;
public var R4Lock1:DoorLock;
public var R4Lock2:DoorLock;
private var m_mask:MovieClip;
public var transitToR10:MoveCameraFunctor;
public var transitToR11:MoveCameraFunctor;
public var transitToR12:MoveCameraFunctor;
public var cameraSwith36to37:MoveCameraFunctor;
public var endTrig:Trigger;
public var room34_field1:ColorField;
public var room34_field2:ColorField;
public var room34_field3:ColorField;
public var room34_field4:ColorField;
public var room34_field5:ColorField;
public var room34_field6:ColorField;
public var camerSwitchlvl2217to1:MoveCameraFunctor;
public var R7TrigA2:Trigger;
public var yellowwall1:ColorWall;
public var yellowwall2:ColorWall;
public var yellowwall3:ColorWall;
public var yellowwall4:ColorWall;
public var yellowwall5:ColorWall;
public var yellowwall7:ColorWall;
public var yellowwall9:ColorWall;
public var transitionRoom2to3Functor;
public var room25_orangeWall1:ColorWall;
public var yellowwall8:ColorWall;
public var box1:CameraBox;
public var box2:CameraBox;
public var box3:CameraBox;
public var box4:CameraBox;
public var box5:CameraBox;
public var box6:CameraBox;
public var box7:CameraBox;
public var box8:CameraBox;
public var box9:CameraBox;
public var dodgerYellow:EnemyParameters;
public var yellowwall6:ColorWall;
public var Room5Clear:Boolean;
public var R6TrigB:Trigger;
public var dodgerRed8:EnemyParameters;
public var R6TrigLockA:Trigger;
public var R6TrigLockB:Trigger;
public var lvl4transitionRoom4to5:MoveCameraFunctor;
public var room24_blackWall1:ColorWall;
public var room34Wave3Event:EnemyDeathEvent;
public var room02_text:MousePointerText;
public var fixedBlue8:EnemyParameters;
public var R5Spawn1:SpawnPoint;
public var room26Wave3Event:EnemyDeathEvent;
public var room25_redSwitch1:FloorSwitch;
public var transitToR6B:MoveCameraFunctor;
private var m_yellowDest:Number;
public var d1:Door;
public var transitToR7C:MoveCameraFunctor;
public var cameraSwith23to26:MoveCameraFunctor;
public var cameraSwith23to28:MoveCameraFunctor;
public var cameraSwith23to24:MoveCameraFunctor;
public var dodgerBlue8:EnemyParameters;
public var room24_purpleWall1:ColorWall;
public var room24_purpleWall3:ColorWall;
public var e1:PathEnemy;
public var e2:PathEnemy;
public var room13box:CameraBox;
public var e4:PathEnemy;
public var e5:PathEnemy;
public var room24_purpleWall2:ColorWall;
public var room4box:CameraBox;
public var e8:PathEnemy;
public var e9:PathEnemy;
public var e3:PathEnemy;
public var e6:PathEnemy;
public var e7:PathEnemy;
public var room5_door1:Door;
public var cameraSwith34to36:MoveCameraFunctor;
public var room24_field1:ColorField;
public var room23_door1:Door;
public var room23_door2:Door;
public var R6Lock1:DoorLock;
public var R6Lock2:DoorLock;
private var m_ferryRed:MovieClip;
public var er:EnemyRoomWriter;
private var m_otherGames:Sprite;
public var transitionZone4Counter:Number;
public var shooterYellow:EnemyParameters;
public var chaserOrange5:EnemyParameters;
public var yellowChargePickup:MovieClip;
public var shooterRed5:EnemyParameters;
public var shooterRed6:EnemyParameters;
public var shooterRed8:EnemyParameters;
public var bossRedSwitch1:FloorSwitch;
private var m_BLUE:MovieClip;
public var cameraSwith10to11:MoveCameraFunctor;
public var Room7Clear:Boolean;
public var R7TrigLockA:Trigger;
public var R7TrigLockB:Trigger;
public var shooterOrange5:EnemyParameters;
public var chaserPurple5:EnemyParameters;
public var room19_floor1:ColorFloor;
public var room19_floor2:ColorFloor;
public var room19_floor3:ColorFloor;
public var fixedWhite:EnemyParameters;
public var room19_floor5:ColorFloor;
public var room19_floor6:ColorFloor;
public var room19_floor7:ColorFloor;
public var room19_floor8:ColorFloor;
public var box10:CameraBox;
public var box17:CameraBox;
public var room31_redSwitch1:FloorSwitch;
public var box19:CameraBox;
public var box18:CameraBox;
private var m_ferryGreen:MovieClip;
public var TrialLock:Trigger;
public var chargeTrig2:Trigger;
public var chargeTrig3:Trigger;
public var chargeTrig1:Trigger;
public var cameraSwith2to3:MoveCameraFunctor;
public var box22:CameraBox;
public var box23:CameraBox;
public var box24:CameraBox;
public var box25:CameraBox;
public var box26:CameraBox;
public var box27:CameraBox;
public var box28:CameraBox;
public var box29:CameraBox;
public var shooterPurple5:EnemyParameters;
public var cameraSwith21to22:MoveCameraFunctor;
private var m_logoFill:Boolean;// = true
private var m_isLoaded:Boolean;// = false
private var m_bg:Sprite;
public var box33:CameraBox;
public var box34:CameraBox;
public var box35:CameraBox;
public var box36:CameraBox;
public var box37:CameraBox;
public var shooterBlue8:EnemyParameters;
public var dodgerWhite:EnemyParameters;
public var redChargePickup:MovieClip;
public var LazCan2:MovieClip;
public var LazCan3:MovieClip;
public var LazCan4:MovieClip;
public var room8Text:MovieClip;
public var LazCan1:MovieClip;
private var m_RED:MovieClip;
public var blueSuperPickedUp:Boolean;
public var transitToR7A2:MoveCameraFunctor;
public var shooterBlue5:EnemyParameters;
public var R8Spawn1:SpawnPoint;
public var R8Spawn2:SpawnPoint;
public var R8Spawn3:SpawnPoint;
public var R8Spawn4:SpawnPoint;
public var R8Lock1:DoorLock;
public var R8Lock2:DoorLock;
public var R8Lock3:DoorLock;
public var room8box:CameraBox;
public var room10_door1:Door;
public var s1:Switch;
public var globalFloor:ColorFloor;
public var greenwall11:ColorWall;
public var greenwall12:ColorWall;
public var greenwall13:ColorWall;
public var greenwall14:ColorWall;
public var greenwall15:ColorWall;
public var greenwall16:ColorWall;
public var greenwall10:ColorWall;
public var greenwall18:ColorWall;
public var greenwall17:ColorWall;
public var R8TrigLockA:Trigger;
public var greenwall19:ColorWall;
public var R8TrigLockB:Trigger;
public var dodgerYellow8:EnemyParameters;
public var greenwall20:ColorWall;
public var greenwall21:ColorWall;
public var greenwall22:ColorWall;
public var greenwall23:ColorWall;
public var room27_blueWall2:ColorWall;
public var greenwall25:ColorWall;
public var greenwall26:ColorWall;
public var transitToR6:MoveCameraFunctor;
public var room27_blueWall1:ColorWall;
public var greenwall24:ColorWall;
public var transitToR4:MoveCameraFunctor;
public var transitToR5:MoveCameraFunctor;
public var transitToR8:MoveCameraFunctor;
public var transitToR1:MoveCameraFunctor;
public var hintText1:WrongColorText;
public var transitToR3:MoveCameraFunctor;
public var transitToR9:MoveCameraFunctor;
public var transitToR2:MoveCameraFunctor;
public var textTrig1:Trigger;
public var textTrig2:Trigger;
public var textTrig3:Trigger;
public var textTrig4:Trigger;
public var c3transitTo4:MoveCameraFunctor;
public var c3transitTo5:MoveCameraFunctor;
public var c3transitTo6:MoveCameraFunctor;
public var c3transitTo7:MoveCameraFunctor;
public var c3transitTo1:MoveCameraFunctor;
public var c3transitTo2:MoveCameraFunctor;
public var c3transitTo3:MoveCameraFunctor;
public var shooterWhite:EnemyParameters;
public var cameraSwith9to10:MoveCameraFunctor;
public var room18_greenWall1:ColorWall;
public var c3transitTo9:MoveCameraFunctor;
public var c3transitTo8:MoveCameraFunctor;
public var room19_eventTrig1:Trigger;
private var m_bounce:Boolean;// = false
public var room31_redWall1:ColorWall;
public var room31_redWall2:ColorWall;
public var room31_redWall3:ColorWall;
public var chaserFastRed5:EnemyParameters;
public var saturate:MainMenu;
public var Spawn11:SpawnPoint;
public var Spawn12:SpawnPoint;
public var Spawn13:SpawnPoint;
public var Spawn14:SpawnPoint;
public var Spawn15:SpawnPoint;
public var Spawn10:SpawnPoint;
public var Spawn18:SpawnPoint;
public var Spawn19:SpawnPoint;
public var Spawn16:SpawnPoint;
public var Spawn17:SpawnPoint;
public var cameraSwith6to7:MoveCameraFunctor;
public var room34_enemy1:ChaserEnemy;
public var room34_enemy2:ChaserEnemy;
public var room34_enemy3:ChaserEnemy;
public var room34_enemy4:ChaserEnemy;
public var room34_enemy5:ChaserEnemy;
public var room34_enemy6:ChaserEnemy;
public var room34_enemy7:ChaserEnemy;
public var room34_enemy8:ChaserEnemy;
public var room34_enemy9:ChaserEnemy;
private var m_count;// = 0
public var weaponTrig1:Trigger;
public var weaponTrig2:Trigger;
public var weaponTrig3:Trigger;
public var Spawn23:SpawnPoint;
public var Spawn24:SpawnPoint;
public var Spawn25:SpawnPoint;
public var Spawn26:SpawnPoint;
public var Spawn27:SpawnPoint;
public var Spawn28:SpawnPoint;
public var Spawn29:SpawnPoint;
private var GAME_NAME:String;// = "saturated"
public var lvl4transitionRoom1to2:MoveCameraFunctor;
public var Spawn21:SpawnPoint;
public var Spawn22:SpawnPoint;
public var Spawn20:SpawnPoint;
private var m_greenDest:Number;
private var m_sampleLoadPerc:Number;// = -1
public var Spawn31:SpawnPoint;
public var Spawn32:SpawnPoint;
public var Spawn33:SpawnPoint;
public var Spawn36:SpawnPoint;
public var Spawn30:SpawnPoint;
public var bossOrangeSwitch1:FloorSwitch;
public var Spawn34:SpawnPoint;
public var Spawn35:SpawnPoint;
public var R1Spawn1:SpawnPoint;
public var R1Spawn2:SpawnPoint;
public var R1Spawn3:SpawnPoint;
private var m_clsRed:Water;
public var room31_yellowSwitch1:FloorSwitch;
public var chaserBlue5:EnemyParameters;
public var chaserBlue8:EnemyParameters;
private var m_ferryBlue:MovieClip;
public var transitToZ1:MoveCameraFunctor;
public var transitToZ2:MoveCameraFunctor;
public var laserRed8:EnemyParameters;
public var transitionZone2toRoom16:MoveCameraFunctor;
public var room10box:CameraBox;
public var room1box:CameraBox;
private var m_streamHeight:Number;
public var R8Trig:Trigger;
public var Trig3:Trigger;
private var m_sun:Sprite;
public var switch3:Switch;
public var room22_eventTrig1:Trigger;
public var bluewall3:ColorWall;
public var bluewall4:ColorWall;
public var bluewall5:ColorWall;
public var bluewall6:ColorWall;
public var bluewall7:ColorWall;
public var trig1:Trigger;
public var trig2:Trigger;
public var trig3:Trigger;
public var trig5:Trigger;
public var trig6:Trigger;
public var trig7:Trigger;
public var trig9:Trigger;
public var trig4:Trigger;
public var trig8:Trigger;
private var MOCHI:String;// = ""
public var bluewall8:ColorWall;
public var bluewall9:ColorWall;
public var trigYellow:Trigger;
public var doorLockRoom25:DoorLock;
public var doorLockRoom27:DoorLock;
public var room23_field1:ColorField;
public var room32_redWall1:ColorWall;
public var room32_redWall2:ColorWall;
public var room13_door1:Door;
public var room23_field2:ColorField;
public var room23_field3:ColorField;
private var m_play:Sprite;
private var m_gameFrameRate:int;
public var room24_enemy1:PathEnemy;
public var room24_enemy2:PathEnemy;
public var room24_enemy3:PathEnemy;
public var room24_enemy4:PathEnemy;
public var room24_enemy5:PathEnemy;
public var room24_enemy6:PathEnemy;
public var room24_enemy7:ChaserEnemy;
public var room24_enemy8:ChaserEnemy;
public var room24_enemy9:ChaserEnemy;
public var blueChargePickup:MovieClip;
public var laserWhite8:EnemyParameters;
public var cameraLvl2to2:MoveCameraFunctor;
public var shooterRed:EnemyParameters;
public var room27_purpleWall1:ColorWall;
public function MainLoader(){
m_loaderContent = new Array();
m_waveHolderLogo = new MovieClip();
m_waveHolderCrown = new MovieClip();
m_play = new Sprite();
m_otherGames = new Sprite();
m_mask = new MovieClip();
m_maskRown = new MovieClip();
m_RED = new WaterHolderR();
m_GREEN = new WaterHolderG();
m_BLUE = new WaterHolderB();
m_ferryGreen = new ferryGreen();
m_ferryRed = new ferryRed();
m_ferryBlue = new ferryBlue();
super();
addFrameScript(1, frame2, 2, frame3, 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);
trace("MainLoader()");
stop();
m_rootRef = this;
m_bg = new Sprite();
m_bg.graphics.beginFill(0x333333, 1);
m_bg.graphics.drawRect(0, 0, STAGE_WIDTH, STAGE_HEIGHT);
m_bg.addEventListener(MouseEvent.CLICK, openKingPage);
m_rootRef.addChild(m_bg);
m_loaderContent.push(m_bg);
stage.scaleMode = StageScaleMode.NO_SCALE;
KingAPI.addEventListener(KingAPI.INITIALIZED_EVENT, onKingApiInit);
KingAPI.addEventListener(KingAPI.HOST_BANNED_EVENT, onKingApiInit);
KingAPI.init(GAME_NAME, root.loaderInfo.url);
}
public function R6Refresh(_arg1:Trigger){
}
private function onPlayReleased(_arg1:MouseEvent):void{
cleanUp();
gotoGame();
}
public function R6DoorLock(_arg1:Trigger){
if (Room6Clear == false){
R6Lock1.doorLocked();
R6Lock2.doorLocked();
};
}
public function lazer4Activate(_arg1:Event){
if (room10Text.currentFrame == room10Text.totalFrames){
room10Text.stop();
LazCan4.visible = false;
doorLock8.doorUnlocked();
lazer4.activate();
lazer4.reverseDirection();
room10Text.removeEventListener(Event.ENTER_FRAME, lazer4Activate);
};
}
private function onOtherReleased(_arg1:MouseEvent):void{
cleanUp();
KingAPI.openOtherGamesLink();
}
public function bossUnlock(){
doorLock4.doorUnlocked();
}
public function openRoom4Doors(){
Room4Clear = true;
R4Lock1.doorUnlocked();
R4Lock2.doorUnlocked();
}
public function R5DoorLock(_arg1:Trigger){
if (Room5Clear == false){
R5Lock1.doorLocked();
R5Lock2.doorLocked();
R5Lock3.doorLocked();
};
}
public function stageThree(){
globalFloor.transitionColorTo(GameColor.yellow);
}
public function room22_doorLock(_arg1:Trigger){
room22_doorLock1.doorLocked();
room22_doorLock2.doorLocked();
room22_enemy1.spawn();
}
public function room3Hint(_arg1:Trigger){
if (yellowWeapPickup.visible == true){
room03_text2_mc.fadeIn();
};
}
public function hintTextActivate(){
hintText1.fadeIn();
hintText1.addEventListener(Event.ENTER_FRAME, yellowWeaponVisible);
}
public function lazer3Activate(_arg1:Event){
if (room9Text.currentFrame == room9Text.totalFrames){
room9Text.stop();
LazCan3.visible = false;
doorLock6.doorUnlocked();
lazer3.activate();
room9Text.removeEventListener(Event.ENTER_FRAME, lazer3Activate);
};
}
public function bgRedRoom25(_arg1:Trigger){
Game.getInstance().getPlayer().addChargePower(GameColor.red);
if (redSuperPickedUp == false){
Sounds.pickUp();
redSuperPickedUp = true;
};
redChargePickup.visible = false;
}
public function PL_LOADING(_arg1:ProgressEvent):void{
var _local2:Number = ((_arg1.bytesLoaded / _arg1.bytesTotal) * 100);
lbar.scaleX = (_local2 / 100);
if (_local2 == 100){
this.gotoAndStop(1, "shell");
};
}
private function onBtnOut(_arg1:MouseEvent):void{
_arg1.target.removeEventListener(MouseEvent.MOUSE_DOWN, onBtnPress);
if (m_pressBtn){
_arg1.target.x = (_arg1.target.x - 1);
_arg1.target.y = (_arg1.target.y - 2);
m_pressBtn = false;
};
}
private function onLoaderMovieFinished():void{
trace("onGameLoaded()");
m_tween.removeEventListener(TweenEvent.MOTION_CHANGE, tweenTransformCrown);
m_rootRef.removeEventListener(Event.ENTER_FRAME, update);
}
public function R4DoorLock(_arg1:Trigger){
if (Room4Clear == false){
R4Lock1.doorLocked();
R4Lock2.doorLocked();
};
}
public function endGame10(_arg1:Trigger){
Game.getInstance().transitionToNextLevel();
}
private function onBtnPress(_arg1:MouseEvent):void{
m_pressBtn = true;
_arg1.target.x = (_arg1.target.x + 1);
_arg1.target.y = (_arg1.target.y + 2);
}
private function onBtnOver(_arg1:MouseEvent):void{
_arg1.target.addEventListener(MouseEvent.MOUSE_DOWN, onBtnPress);
}
public function lazer2Activate(_arg1:Event){
if (room8Text.currentFrame == room8Text.totalFrames){
room8Text.stop();
LazCan2.visible = false;
doorLock4.doorUnlocked();
lazer2.activate();
lazer2.reverseDirection();
room8Text.removeEventListener(Event.ENTER_FRAME, lazer2Activate);
};
}
public function openRoom6Doors(){
Room6Clear = true;
R6Lock1.doorUnlocked();
R6Lock2.doorUnlocked();
}
public function text4Activate(_arg1:Trigger){
room10Text.play();
LazCan4.play();
doorLock7.doorLocked();
doorLock8.doorLocked();
room10Text.addEventListener(Event.ENTER_FRAME, lazer4Activate);
}
private function cleanUp():void{
m_otherGames.removeEventListener(MouseEvent.MOUSE_UP, onOtherReleased);
m_otherGames.removeEventListener(MouseEvent.MOUSE_DOWN, onBtnPress);
m_otherGames.removeEventListener(MouseEvent.MOUSE_OVER, onBtnOver);
m_otherGames.removeEventListener(MouseEvent.MOUSE_OUT, onBtnOut);
m_play.removeEventListener(MouseEvent.MOUSE_UP, onPlayReleased);
m_play.removeEventListener(MouseEvent.MOUSE_DOWN, onBtnPress);
m_play.removeEventListener(MouseEvent.MOUSE_OVER, onBtnOver);
m_play.removeEventListener(MouseEvent.MOUSE_OUT, onBtnOut);
var _local1:int;
while (_local1 < m_loaderContent.length) {
m_rootRef.removeChild(m_loaderContent[_local1]);
m_loaderContent[_local1] = null;
_local1++;
};
}
public function TrialDoorLock(_arg1:Trigger){
if (TrialClear == false){
trialDoor1.doorLocked();
trialDoor2.doorLocked();
};
}
public function R5Refresh(_arg1:Trigger){
Room5Clear = false;
}
public function R3DoorLock(_arg1:Trigger){
if (Room3Clear == false){
R3Lock1.doorLocked();
R3Lock2.doorLocked();
};
}
public function endGame(_arg1:Trigger){
Game.getInstance().transitionToNextLevel();
}
public function lazer1Activate(_arg1:Event){
if (room2Text.currentFrame == room2Text.totalFrames){
room2Text.stop();
LazCan1.visible = false;
doorLock2.doorUnlocked();
lazer1.activate();
lazer1.reverseDirection();
room2Text.removeEventListener(Event.ENTER_FRAME, lazer1Activate);
};
}
private function onKingApiInit(_arg1:Event):void{
trace(("onKingApiInit() :" + _arg1.type));
if (MOCHI != ""){
MochiBot.track(this, MOCHI);
};
m_gameFrameRate = root.stage.frameRate;
root.stage.frameRate = 30;
if (KingAPI.banned){
showBannedScreen();
return;
};
playLoaderMovie();
}
public function openRoom8Doors(){
Room8Clear = true;
R8Lock1.doorUnlocked();
R8Lock2.doorUnlocked();
R8Lock3.doorUnlocked();
}
public function text3Activate(_arg1:Trigger){
room9Text.play();
LazCan3.play();
doorLock5.doorLocked();
doorLock6.doorLocked();
room9Text.addEventListener(Event.ENTER_FRAME, lazer3Activate);
}
public function PL_COMPLETE(_arg1:Event){
this.gotoAndStop(1, "shell");
}
public function R2DoorLock(_arg1:Trigger){
if (Room2Clear == false){
R2Lock1.doorLocked();
R2Lock2.doorLocked();
};
}
function frame2(){
stop();
this.stop();
this.loaderInfo.addEventListener(ProgressEvent.PROGRESS, PL_LOADING);
this.loaderInfo.addEventListener(Event.COMPLETE, PL_COMPLETE);
}
function frame3(){
stop();
Game.getInstance().setGotoAndStop(gotoAndStop);
GameLoader.initialize();
}
function frame6(){
stop();
Game.getInstance().setStage(stage);
Game.getInstance().setGlobalFloor(globalFloor);
Game.getInstance().getPlayer().setMaxColor(GameColor.white);
Game.getInstance().getPlayer().addChargePower(GameColor.white);
Game.getInstance().setGotoAndStop(gotoAndStop);
MyCamera.getInstance().setCameraBox(room1box);
globalFloor.setColor(GameColor.black);
Sounds.L1();
Game.getInstance().getPlayer().playerFadeIn(100);
cameraSwith1to2 = new MoveCameraFunctor(trig1, room2box);
cameraSwith2to3 = new MoveCameraFunctor(trig2, room3box);
cameraSwith3to4 = new MoveCameraFunctor(trig3, room4box);
cameraSwith3to5 = new MoveCameraFunctor(trig4, room5box);
cameraSwith5to6 = new MoveCameraFunctor(trig5, room6box);
cameraSwith6to7 = new MoveCameraFunctor(trig6, room7box);
cameraSwith7to8 = new MoveCameraFunctor(trig7, room8box);
cameraSwith8to9 = new MoveCameraFunctor(trig8, room9box);
cameraSwith9to10 = new MoveCameraFunctor(trig9, room10box);
cameraSwith10to11 = new MoveCameraFunctor(trig10, room11box);
cameraSwith11to13 = new MoveCameraFunctor(trig12, room13box);
cameraSwith13to14 = new MoveCameraFunctor(trig13, room14box);
cameraSwith14to15 = new MoveCameraFunctor(trig14, room15box);
cameraSwith15toTransition1 = new MoveCameraFunctor(trig15, transitionBox1);
room3_switch1.setDefault(GameColor.white);
room3_switch1.setGoal(GameColor.red);
room5_switch1.setDefault(GameColor.yellow);
room5_switch1.setGoal(GameColor.orange);
room6_switch1.setDefault(GameColor.blue);
room6_switch1.setGoal(GameColor.purple);
room6_switch1.setDefault(GameColor.blue);
room6_switch1.setGoal(GameColor.purple);
room7_switch1.setDefault(GameColor.white);
room7_switch1.setGoal(GameColor.yellow);
room9_switch1.setDefault(GameColor.red);
room9_switch1.setGoal(GameColor.orange);
room9_switch2.setDefault(GameColor.blue);
room9_switch2.setGoal(GameColor.green);
room10_switch1.setDefault(GameColor.white);
room10_switch1.setGoal(GameColor.orange);
room13_switch1.setDefault(GameColor.white);
room13_switch1.setGoal(GameColor.blue);
room14_switch1.setDefault(GameColor.yellow);
room14_switch1.setGoal(GameColor.green);
room14_switch2.setDefault(GameColor.red);
room14_switch2.setGoal(GameColor.purple);
room14_switch3.setDefault(GameColor.white);
room14_switch3.setGoal(GameColor.brown);
room3_door1.addSwitch(room3_switch1);
room5_door1.addSwitch(room5_switch1);
room6_door1.addSwitch(room6_switch1);
room7_door1.addSwitch(room7_switch1);
room9_door1.addSwitch(room9_switch1);
room9_door2.addSwitch(room9_switch2);
room10_door1.addSwitch(room10_switch1);
room13_door1.addSwitch(room13_switch1);
room14_door1.addSwitch(room14_switch1);
room14_door2.addSwitch(room14_switch2);
room14_door3.addSwitch(room14_switch3);
weaponUpgrade1 = new WeaponUpgradeFunctor(weaponTrig1, GameColor.red);
weaponUpgrade2 = new WeaponUpgradeFunctor(weaponTrig2, GameColor.yellow);
weaponUpgrade3 = new WeaponUpgradeFunctor(weaponTrig3, GameColor.blue);
room03_text1.alpha = 0;
room03_text2_mc.alpha = 0;
room02_text.alpha = 0;
room07_text.alpha = 0;
room3TextTrig.deactivateTrig();
room03_hintTrig.addTriggerFunction(room3Hint);
room3TextTrig.addTriggerFunction(room03_text1.activateFromTrigger);
weaponTrig1.addTriggerFunction(room4_Pickup);
hintText1.alpha = 0;
weaponTrig2.addTriggerFunction(room7_Pickup);
doorLock1.doorUnlocked();
doorLock2.doorLocked();
weaponTrig2.deactivateTrig();
room7_switch1.setFunction(hintTextActivate);
trig20.addTriggerFunction(doorLockActivate);
hintText1.stop();
weaponTrig3.addTriggerFunction(room11_Pickup);
weaponTrig3.activateTrig();
endTrig.addTriggerFunction(endGame);
endTrig.setMode(Trigger.mode_OneTimeOnly);
Game.getInstance().endSetup();
}
public function c3Text4Activate(_arg1:Trigger){
room10Text.play();
doorLock7.doorLocked();
doorLock8.doorLocked();
LazCan4.play();
room10Text.addEventListener(Event.ENTER_FRAME, c3Lazer4Activate);
}
function frame9(){
stage.showDefaultContextMenu = false;
stop();
Game.getInstance().setStage(stage);
Game.getInstance().setGlobalFloor(globalFloor);
Game.getInstance().getPlayer().setMaxColor(GameColor.blue);
Game.getInstance().getPlayer().addChargePower(GameColor.white);
MyCamera.getInstance().setCameraBox(transitionBox2);
globalFloor.setColor(GameColor.black);
Sounds.playBgm();
Game.getInstance().getPlayer().playerFadeIn(100);
transitToZ1 = new MoveCameraFunctor(trig1, box2);
transitToZ2 = new MoveCameraFunctor(trig2, transitionBox3);
transitionLevelX = new MoveCameraFunctor(Trig3, box1);
room9Text.gotoAndStop(1);
LazCan3.stop();
doorLock5.doorUnlocked();
doorLock6.doorUnlocked();
lazer3.setShotAngle(180);
lazer3.setStreamLength((3 * 700));
lazer3.mCloseChaseVelocity = 3;
lazer3.mFarRange = 600;
lazer3.mCloseRange = 200;
textTrig3.addTriggerFunction(text3Activate);
textTrig3.setMode(Trigger.mode_OneTimeOnly);
room10Text.gotoAndStop(1);
LazCan4.stop();
doorLock7.doorUnlocked();
doorLock8.doorUnlocked();
lazer4.setShotAngle(270);
lazer4.setStreamLength((3 * 700));
lazer4.mFarRange = 900;
lazer4.mCloseRange = 600;
lazer4.mCloseChaseVelocity = 2;
textTrig4.addTriggerFunction(text4Activate);
textTrig4.setMode(Trigger.mode_OneTimeOnly);
Switch1.setDefault(GameColor.white);
Switch1.setGoal(GameColor.red);
Door1.addSwitch(Switch1);
Switch4.setDefault(GameColor.white);
Switch4.setGoal(GameColor.blue);
Door4.addSwitch(Switch4);
endTrig3.addTriggerFunction(endGame8);
endTrig3.setMode(Trigger.mode_OneTimeOnly);
Game.getInstance().endSetup();
}
function frame7(){
stage.showDefaultContextMenu = false;
stop();
Game.getInstance().setStage(stage);
Game.getInstance().setGlobalFloor(globalFloor);
Game.getInstance().getPlayer().setMaxColor(GameColor.blue);
Game.getInstance().getPlayer().addChargePower(GameColor.white);
MyCamera.getInstance().setCameraBox(transitionBox2);
globalFloor.setColor(GameColor.black);
Sounds.L1Stop();
Sounds.L2();
Game.getInstance().getPlayer().playerFadeIn(100);
redSuperPickedUp = new Boolean(false);
blueSuperPickedUp = new Boolean(false);
yellowSuperPickedUp = new Boolean(false);
transitionZone2toRoom16 = new MoveCameraFunctor(transitionZoneTrig2, room16box);
cameraSwith16to17 = new MoveCameraFunctor(trig16, box17);
camerSwitchlvl2217to1 = new MoveCameraFunctor(trig1, box1);
cameraLvl2to2 = new MoveCameraFunctor(trig2, box2);
cameraSwith21to22 = new MoveCameraFunctor(trig21, box22);
cameraSwith22to23 = new MoveCameraFunctor(trig4, box4);
doorLock1.doorLocked();
doorLock2.doorLocked();
doorLock3.doorLocked();
doorLock4.doorLocked();
trig1.addTriggerFunction(e1Activate);
r1e1 = new EnemyDeathEvent();
r1e1.addEnemy(Enemy(e1));
r1e1.addEnemy(Enemy(e2));
r1e1.addEnemy(Enemy(e3));
r1e1.addEnemy(Enemy(e4));
r1e1.setTriggerFunction(r1Unlock);
r1e2 = new EnemyDeathEvent();
r1e2.addEnemy(Enemy(e5));
r1e2.addEnemy(Enemy(e6));
r1e2.addEnemy(Enemy(e7));
r1e2.addEnemy(Enemy(e8));
r1e2.setTriggerFunction(r2Unlock);
r1e3 = new EnemyDeathEvent();
r1e3.addEnemy(Enemy(e9));
r1e3.addEnemy(Enemy(e10));
r1e3.addEnemy(Enemy(e11));
r1e3.addEnemy(Enemy(e12));
r1e3.setTriggerFunction(r3Unlock);
r1e4 = new EnemyDeathEvent();
r1e4.addEnemy(Enemy(e13));
r1e4.addEnemy(Enemy(e14));
r1e4.addEnemy(Enemy(e15));
r1e4.addEnemy(Enemy(e16));
r1e4.setTriggerFunction(r4Unlock);
trig3.addTriggerFunction(e2Activate);
room18_enemy1.setColor(GameColor.orange);
room18_enemy2.setColor(GameColor.orange);
room18_enemy3.setColor(GameColor.orange);
room18_enemy4.setColor(GameColor.orange);
trig18.addTriggerFunction(room18EnemyActivate);
room19_enemy1.setColor(GameColor.yellow);
room19_enemy2.setColor(GameColor.red);
room19_enemy3.setColor(GameColor.blue);
room19_enemy4.setColor(GameColor.blue);
room19_eventTrig1.addTriggerFunction(room19_round1);
room19_floor1.setColor(GameColor.orange);
room19_floor5.setColor(GameColor.orange);
room19_floor2.setColor(GameColor.purple);
room19_floor6.setColor(GameColor.purple);
room19_floor3.setColor(GameColor.green);
room19_floor7.setColor(GameColor.green);
room19_floor8.setColor(GameColor.orange);
room22_enemy1.setColor(GameColor.yellow);
room22_enemy2.setColor(GameColor.blue);
room22_enemy3.setColor(GameColor.blue);
room22_enemy1.alpha = 0;
room22_enemy2.alpha = 0;
room22_enemy3.alpha = 0;
room22_eventTrig1.addTriggerFunction(room22_doorLock);
room22_eventTrig1.setMode(Trigger.mode_OneTimeOnly);
room22Wave2Event = new EnemyDeathEvent();
room22Wave2Event.addEnemy(Enemy(room22_enemy1));
room22Wave2Event.setTriggerFunction(room22Round2);
room22DeathEvent = new EnemyDeathEvent();
room22DeathEvent.addEnemy(Enemy(room22_enemy1));
room22DeathEvent.addEnemy(Enemy(room22_enemy2));
room22DeathEvent.addEnemy(Enemy(room22_enemy3));
room22DeathEvent.setTriggerFunction(room22Death);
endTrig3.addTriggerFunction(endGame2);
endTrig3.setMode(Trigger.mode_OneTimeOnly);
Game.getInstance().endSetup();
}
function frame8(){
stage.showDefaultContextMenu = false;
stop();
Game.getInstance().setStage(stage);
Game.getInstance().setGlobalFloor(globalFloor);
Game.getInstance().getPlayer().setMaxColor(GameColor.blue);
Game.getInstance().getPlayer().addChargePower(GameColor.white);
MyCamera.getInstance().setCameraBox(transitionBox2);
globalFloor.setColor(GameColor.black);
Sounds.L2Stop();
Sounds.L3();
Game.getInstance().getPlayer().playerFadeIn(100);
transitionZone2toBigRoom = new MoveCameraFunctor(trig1, box2);
transitionRoom2to3Functor = new MoveCameraFunctor(trig2, box3);
transitionRoom3to4Functor = new MoveCameraFunctor(trig3, box4);
endTrig3.addTriggerFunction(endGame7);
endTrig3.setMode(Trigger.mode_OneTimeOnly);
Game.getInstance().endSetup();
}
public function r3Unlock(){
doorLock3.doorUnlocked();
}
public function l5wave1(_arg1:Trigger){
globalFloor.transitionColorTo(GameColor.blue);
doorLock1.doorLocked();
doorLock2.doorLocked();
}
public function l5wave3(){
globalFloor.transitionColorTo(GameColor.green);
}
public function l5wave4(){
globalFloor.transitionColorTo(GameColor.yellow);
}
public function l5wave5(){
globalFloor.transitionColorTo(GameColor.purple);
}
public function l5wave2(){
globalFloor.transitionColorTo(GameColor.red);
}
public function l5wave6(){
globalFloor.transitionColorTo(GameColor.orange);
}
public function text2Activate(_arg1:Trigger){
room8Text.play();
LazCan2.play();
LazCan2.lazCan2Anim.lazCanUnfold2.play();
doorLock3.doorLocked();
doorLock4.doorLocked();
room8Text.addEventListener(Event.ENTER_FRAME, lazer2Activate);
}
public function c3Lazer4Activate(_arg1:Event){
if (room10Text.currentFrame == room10Text.totalFrames){
room10Text.stop();
doorLock8.doorUnlocked();
LazCan4.visible = false;
lazer4.activate();
lazer4.reverseDirection();
room10Text.removeEventListener(Event.ENTER_FRAME, c3Lazer4Activate);
};
}
public function R1DoorLock(_arg1:Trigger){
if (Room1Clear == false){
R1Lock1.doorLocked();
R1Lock2.doorLocked();
};
}
public function stageFour(){
globalFloor.transitionColorTo(GameColor.green);
}
public function c3Text3Activate(_arg1:Trigger){
room9Text.play();
doorLock5.doorLocked();
doorLock6.doorLocked();
room9Text.addEventListener(Event.ENTER_FRAME, c3Lazer3Activate);
LazCan3.play();
}
public function room26Round2(){
room26_enemy7.spawn();
room26_enemy8.spawn();
room26_enemy9.spawn();
}
public function room26Round3(){
room26_enemy1.spawn();
room26_enemy2.spawn();
room26_enemy3.spawn();
}
public function c3Lazer3Activate(_arg1:Event){
if (room9Text.currentFrame == room9Text.totalFrames){
room9Text.stop();
LazCan3.visible = false;
doorLock6.doorUnlocked();
lazer3.activate();
room9Text.removeEventListener(Event.ENTER_FRAME, c3Lazer3Activate);
};
}
public function text1Activate(_arg1:Trigger){
room2Text.play();
LazCan1.play();
LazCan1.lazCan1Anim.lazCanUnfold1.play();
doorLock1.doorLocked();
doorLock2.doorLocked();
room2Text.addEventListener(Event.ENTER_FRAME, lazer1Activate);
}
public function room26_doorLock(_arg1:Trigger){
room26_doorLock1.doorLocked();
room26_doorLock2.doorLocked();
room26_enemy4.spawn();
room26_enemy5.spawn();
room26_enemy6.spawn();
}
public function doorLockActivate(_arg1:Trigger){
doorLock1.doorLocked();
}
public function bossLock(_arg1:Trigger){
doorLock3.doorLocked();
doorLock4.doorLocked();
}
public function R4Refresh(_arg1:Trigger){
Room4Clear = false;
}
public function yellowWeaponVisible(_arg1:Event){
hintText1.play();
if (hintText1.currentFrame == hintText1.totalFrames){
hintText1.stop();
weaponTrig2.activateTrig();
hintText1.removeEventListener(Event.ENTER_FRAME, yellowWeaponVisible);
doorLock2.doorUnlocked();
};
}
public function room22Death(){
room22_doorLock2.doorUnlocked();
}
public function room4_Pickup(_arg1:Trigger){
room3TextTrig.activateTrig();
room03_hintTrig.deactivateTrig();
room03_text2_mc.visible = false;
room02_text.fadeIn();
redWeapPickup.visible = false;
}
private function playLoaderMovie():void{
var _local1:MovieClip = new mcFerryLine();
m_rootRef.addChild(m_ferryGreen);
m_rootRef.addChild(m_ferryRed);
m_rootRef.addChild(m_ferryBlue);
m_ferryGreen.x = ((STAGE_WIDTH / 2) - 2);
m_ferryRed.x = ((m_ferryGreen.x - (m_ferryGreen.width / 2)) + 15);
m_ferryBlue.x = ((m_ferryGreen.x + (m_ferryGreen.width / 2)) - 17);
m_ferryBlue.y = (m_ferryGreen.y = (m_ferryRed.y = (m_bg.y + 15)));
m_loaderContent.push(m_ferryGreen);
m_loaderContent.push(m_ferryRed);
m_loaderContent.push(m_ferryBlue);
_local1.x = (STAGE_WIDTH / 2);
_local1.y = ((m_ferryGreen.y + m_ferryGreen.height) - 9);
m_streamHeight = ((STAGE_HEIGHT / 2) - 40);
m_clsRed = m_RED.RED;
m_clsRed.init(m_streamHeight, 1);
m_clsGreen = m_GREEN.GREEN;
m_clsGreen.init(m_streamHeight, 1);
m_clsBlue = m_BLUE.BLUE;
m_clsBlue.init(m_streamHeight, 1);
m_RED.alpha = (m_GREEN.alpha = (m_BLUE.alpha = 0));
m_rootRef.addChild(m_RED);
m_rootRef.addChild(m_GREEN);
m_rootRef.addChild(m_BLUE);
m_loaderContent.push(m_RED);
m_loaderContent.push(m_GREEN);
m_loaderContent.push(m_BLUE);
m_RED.x = ((STAGE_WIDTH / 2) - 22);
m_GREEN.x = ((STAGE_WIDTH / 2) - 4);
m_BLUE.x = ((STAGE_WIDTH / 2) + 16);
m_RED.y = (m_GREEN.y = (m_BLUE.y = _local1.y));
m_waveEngineLogo = new WaveEngine(m_rootRef, 205.8, 120, 0xFF00, 0xFF00, m_waveHolderLogo);
m_waveHolderLogo = m_waveEngineLogo.getWave();
m_rootRef.addChild(m_waveHolderLogo);
m_loaderContent.push(m_waveHolderLogo);
m_waveEngineCrown = new WaveEngine(m_rootRef, 67.5, 100, 0xFFAA00, 0xFFAA00, m_waveHolderCrown);
m_waveHolderCrown = m_waveEngineCrown.getWave();
m_rootRef.addChild(m_waveHolderCrown);
m_loaderContent.push(m_waveHolderCrown);
m_logoHolder = new mcLogoHolder();
m_logoHolder.x = (STAGE_WIDTH / 2);
m_logoHolder.y = ((STAGE_HEIGHT / 2) - 2);
m_logoHolder.mouseEnabled = false;
m_rootRef.addChild(m_logoHolder);
m_loaderContent.push(m_logoHolder);
m_mask = new mcLogoMask();
m_mask.x = m_logoHolder.x;
m_mask.y = m_logoHolder.y;
m_rootRef.addChild(m_mask);
m_loaderContent.push(m_mask);
m_maskRown = new mcCrownMask();
m_maskRown.x = m_logoHolder.x;
m_maskRown.y = m_logoHolder.y;
m_rootRef.addChild(m_maskRown);
m_loaderContent.push(m_maskRown);
m_waveHolderLogo.mask = m_mask;
m_waveHolderLogo.x = ((STAGE_WIDTH / 2) - (m_mask.width / 2));
m_waveHolderLogo.y = (((STAGE_HEIGHT / 2) + (m_mask.height / 2)) + 15);
m_waveHolderCrown.mask = m_maskRown;
m_waveHolderCrown.x = (m_logoHolder.x - (m_maskRown.width / 2));
m_waveHolderCrown.y = (m_logoHolder.y + 4);
m_waveEngineLogo.startWave();
m_waveEngineCrown.startWave();
m_greenDest = ((m_waveHolderLogo.y - (120 / 2)) - 10);
m_yellowDest = (m_waveHolderCrown.y - (100 / 2));
m_dist = (m_waveHolderCrown.y - m_yellowDest);
m_startColor = new ColorTransform();
m_startColor.color = 0xFF00;
m_endColor = new ColorTransform();
m_endColor.color = 35886;
m_play = new mcPlay();
m_play.x = (STAGE_WIDTH / 2);
m_play.y = ((m_logoHolder.y + m_logoHolder.height) - 5);
m_play.buttonMode = true;
m_play.alpha = 0;
m_play.visible = false;
m_play.addEventListener(MouseEvent.MOUSE_UP, onPlayReleased);
m_play.addEventListener(MouseEvent.MOUSE_OVER, onBtnOver);
m_play.addEventListener(MouseEvent.MOUSE_OUT, onBtnOut);
m_rootRef.addChild(m_play);
m_loaderContent.push(m_play);
m_otherGames = new mcOtherGames();
m_otherGames.x = (STAGE_WIDTH / 2);
m_otherGames.y = ((m_play.y + m_play.height) + 15);
m_otherGames.buttonMode = true;
m_otherGames.alpha = 0;
m_otherGames.visible = false;
m_otherGames.addEventListener(MouseEvent.MOUSE_UP, onOtherReleased);
m_otherGames.addEventListener(MouseEvent.MOUSE_OVER, onBtnOver);
m_otherGames.addEventListener(MouseEvent.MOUSE_OUT, onBtnOut);
m_rootRef.addChild(m_otherGames);
m_loaderContent.push(m_otherGames);
m_rootRef.addEventListener(Event.ENTER_FRAME, update);
}
public function endGameX2(_arg1:Trigger){
Game.getInstance().transitionToNextLevel();
}
public function endGameX3(_arg1:Trigger){
Game.getInstance().transitionToNextLevel();
}
public function room24EnemiesActivate(_arg1:Trigger){
room24_enemy1.activate();
room24_enemy2.activate();
room24_enemy3.activate();
room24_enemy4.activate();
room24_enemy5.activate();
room24_enemy6.activate();
}
public function transitionTimer4(_arg1:Event){
transitionZone4Counter++;
if (transitionZone4Counter == 100){
transitionZone4DoorLock2.doorUnlocked();
stage.removeEventListener(Event.ENTER_FRAME, transitionTimer4);
};
}
public function openRoom1Doors(){
Room1Clear = true;
R1Lock1.doorUnlocked();
R1Lock2.doorUnlocked();
}
public function bgYellowPickupRoom(_arg1:Trigger){
Game.getInstance().getPlayer().addChargePower(GameColor.yellow);
if (yellowSuperPickedUp == false){
text1.fadeIn();
Sounds.pickUp();
yellowSuperPickedUp = true;
};
yellowChargePickup.visible = false;
}
private function gotoGame():void{
root.stage.frameRate = m_gameFrameRate;
gotoAndStop(1, "shell");
}
function frame10(){
stage.showDefaultContextMenu = false;
stop();
Game.getInstance().setStage(stage);
Game.getInstance().setGlobalFloor(globalFloor);
Game.getInstance().getPlayer().setMaxColor(GameColor.blue);
Game.getInstance().getPlayer().addChargePower(GameColor.white);
MyCamera.getInstance().setCameraBox(transitionBox2);
globalFloor.setColor(GameColor.black);
Sounds.L4Stop();
Sounds.BossLFive();
Game.getInstance().getPlayer().playerFadeIn(100);
transitionLevel4 = new MoveCameraFunctor(trig1, box1);
transitionbox1ToTransition = new MoveCameraFunctor(trig2, box2);
doorLock1.doorUnlocked();
doorLock2.doorUnlocked();
trig3.addTriggerFunction(l5wave1);
trig3.setMode(Trigger.mode_OneTimeOnly);
enemyRoomTrial5 = new EnemyRoom(box1);
enemyRoomTrial5.setEndFunction(trialEnds5);
erTrial5 = new EnemyRoomWriter(enemyRoomTrial5);
chaserYellow5 = new EnemyParameters(Enemy.ai_Chase, GameColor.yellow, 7);
chaserRed5 = new EnemyParameters(Enemy.ai_Chase, GameColor.red, 7);
chaserBlue5 = new EnemyParameters(Enemy.ai_Chase, GameColor.blue, 7);
chaserWhite5 = new EnemyParameters(Enemy.ai_Chase, GameColor.white, 7);
chaserFastYellow5 = new EnemyParameters(Enemy.ai_Chase, GameColor.yellow, 8.5);
chaserFastRed5 = new EnemyParameters(Enemy.ai_Chase, GameColor.red, 8.5);
chaserFastWhite5 = new EnemyParameters(Enemy.ai_Chase, GameColor.white, 8.5);
chaserGreen5 = new EnemyParameters(Enemy.ai_Chase, GameColor.green, 7);
chaserOrange5 = new EnemyParameters(Enemy.ai_Chase, GameColor.orange, 7);
chaserPurple5 = new EnemyParameters(Enemy.ai_Chase, GameColor.purple, 7);
shooterYellow5 = new EnemyParameters(Enemy.ai_Shooter, GameColor.yellow, 7);
shooterRed5 = new EnemyParameters(Enemy.ai_Shooter, GameColor.red, 7);
shooterBlue5 = new EnemyParameters(Enemy.ai_Shooter, GameColor.blue, 7);
shooterWhite5 = new EnemyParameters(Enemy.ai_Shooter, GameColor.white, 7);
shooterGreen5 = new EnemyParameters(Enemy.ai_Chase, GameColor.green, 7);
shooterOrange5 = new EnemyParameters(Enemy.ai_Chase, GameColor.orange, 7);
shooterPurple5 = new EnemyParameters(Enemy.ai_Chase, GameColor.purple, 7);
erTrial5.startNewWave();
erTrial5.addNewSpawnSet(Spawn12, chaserWhite5, 1);
erTrial5.addNewSpawnSet(Spawn4, chaserWhite5, 1);
erTrial5.addNewSpawnSet(Spawn14, chaserWhite5, 1);
erTrial5.addNewSpawnSet(Spawn13, chaserWhite5, 1);
erTrial5.addNewSpawnSet(Spawn10, chaserWhite5, 1);
erTrial5.addNewSpawnSet(Spawn15, chaserWhite5, 1);
erTrial5.setWaveEndFunction(l5wave2);
erTrial5.endWave();
erTrial5.startNewWave();
erTrial5.addNewSpawnSet(Spawn35, chaserWhite5, 1);
erTrial5.addNewSpawnSet(Spawn33, chaserWhite5, 1);
erTrial5.addNewSpawnSet(Spawn32, chaserWhite5, 1);
erTrial5.addNewSpawnSet(Spawn18, chaserWhite5, 1);
erTrial5.addNewSpawnSet(Spawn17, chaserWhite5, 1);
erTrial5.addNewSpawnSet(Spawn16, chaserWhite5, 1);
erTrial5.setWaveEndFunction(l5wave3);
erTrial5.endWave();
erTrial5.startNewWave();
erTrial5.addNewSpawnSet(Spawn11, chaserYellow5, 1);
erTrial5.addNewSpawnSet(Spawn9, chaserYellow5, 1);
erTrial5.addNewSpawnSet(Spawn10, chaserBlue5, 1);
erTrial5.setWaveEndFunction(l5wave3);
erTrial5.endWave();
erTrial5.startNewWave();
erTrial5.addNewSpawnSet(Spawn29, chaserBlue5, 1);
erTrial5.addNewSpawnSet(Spawn26, chaserBlue5, 1);
erTrial5.addNewSpawnSet(Spawn23, chaserYellow5, 1);
erTrial5.setWaveEndFunction(l5wave4);
erTrial5.endWave();
erTrial5.startNewWave();
erTrial5.addNewSpawnSet(Spawn12, shooterWhite5, 1);
erTrial5.addNewSpawnSet(Spawn8, shooterWhite5, 1);
erTrial5.addNewSpawnSet(Spawn14, shooterWhite5, 1);
erTrial5.endWave();
erTrial5.startNewWave();
erTrial5.addNewSpawnSet(Spawn29, shooterWhite5, 1);
erTrial5.addNewSpawnSet(Spawn26, shooterWhite5, 1);
erTrial5.addNewSpawnSet(Spawn23, shooterWhite5, 1);
erTrial5.addNewSpawnSet(Spawn9, chaserWhite5, 1);
erTrial5.addNewSpawnSet(Spawn10, chaserWhite5, 1);
erTrial5.addNewSpawnSet(Spawn11, chaserWhite5, 1);
erTrial5.setWaveEndFunction(l5wave5);
erTrial5.endWave();
erTrial5.startNewWave();
erTrial5.addNewSpawnSet(Spawn20, chaserBlue5, 1);
erTrial5.addNewSpawnSet(Spawn16, chaserBlue5, 1);
erTrial5.addNewSpawnSet(Spawn18, chaserBlue5, 1);
erTrial5.addNewSpawnSet(Spawn19, chaserBlue5, 1);
erTrial5.addNewSpawnSet(Spawn30, chaserRed5, 1);
erTrial5.addNewSpawnSet(Spawn32, chaserRed5, 1);
erTrial5.addNewSpawnSet(Spawn35, chaserRed5, 1);
erTrial5.addNewSpawnSet(Spawn36, chaserRed5, 1);
erTrial5.setWaveEndFunction(l5wave6);
erTrial5.endWave();
erTrial5.startNewWave();
erTrial5.addNewSpawnSet(Spawn5, chaserFastYellow5, 1);
erTrial5.addNewSpawnSet(Spawn3, chaserFastYellow5, 1);
erTrial5.addNewSpawnSet(Spawn1, chaserFastYellow5, 1);
erTrial5.addNewSpawnSet(Spawn7, chaserFastWhite5, 1);
erTrial5.endWave();
endTrig3.addTriggerFunction(endGame8);
endTrig3.setMode(Trigger.mode_OneTimeOnly);
Game.getInstance().endSetup();
}
function frame13(){
stage.showDefaultContextMenu = false;
stop();
Game.getInstance().setStage(stage);
Game.getInstance().setGlobalFloor(globalFloor);
Game.getInstance().getPlayer().setMaxColor(GameColor.blue);
Game.getInstance().getPlayer().addChargePower(GameColor.brown);
MyCamera.getInstance().setCameraBox(transitionBox2);
globalFloor.setColor(GameColor.black);
Sounds.playBgm();
Game.getInstance().getPlayer().playerFadeIn(100);
transitToR9 = new MoveCameraFunctor(R9Trig, zRoom9);
transitToR10 = new MoveCameraFunctor(R10Trig, zRoom10);
transitToR11 = new MoveCameraFunctor(R11Trig, zRoom11);
transitToR12C = new MoveCameraFunctor(R12Trig, zRoom12);
endTrig3.addTriggerFunction(endGameX3);
endTrig3.setMode(Trigger.mode_OneTimeOnly);
Game.getInstance().endSetup();
}
function frame14(){
stage.showDefaultContextMenu = false;
stop();
Game.getInstance().setStage(stage);
Game.getInstance().setGlobalFloor(globalFloor);
Game.getInstance().getPlayer().setMaxColor(GameColor.blue);
Game.getInstance().getPlayer().addChargePower(GameColor.brown);
MyCamera.getInstance().setCameraBox(transitionBox2);
globalFloor.setColor(GameColor.black);
Sounds.L6Stop();
Sounds.playBgm();
Game.getInstance().getPlayer().playerFadeIn(100);
transitToR1 = new MoveCameraFunctor(R1Trig, zRoom1);
transitToR2 = new MoveCameraFunctor(R2Trig, zRoom2);
transitToR3 = new MoveCameraFunctor(R3Trig, zRoom3);
transitToR4 = new MoveCameraFunctor(R4Trig, zRoom4);
transitToR12 = new MoveCameraFunctor(R12Trig, zRoom12);
Room1Clear = false;
R1TrigLockA.addTriggerFunction(R1DoorLock);
R1TrigLockB.addTriggerFunction(R1DoorLock);
R1Trig.addTriggerFunction(R1Refresh);
R2Trig.addTriggerFunction(R1Refresh);
enemyRoom1 = new EnemyRoom(zRoom1);
enemyRoom1.setEndFunction(openRoom1Doors);
chaserYellow = new EnemyParameters(Enemy.ai_Chase, GameColor.yellow);
chaserRed = new EnemyParameters(Enemy.ai_Chase, GameColor.red);
chaserBlue = new EnemyParameters(Enemy.ai_Chase, GameColor.blue);
chaserWhite = new EnemyParameters(Enemy.ai_Chase, GameColor.white);
chaserFastYellow = new EnemyParameters(Enemy.ai_Chase, GameColor.yellow, 8);
chaserFastRed = new EnemyParameters(Enemy.ai_Chase, GameColor.red, 8);
chaserFastBlue = new EnemyParameters(Enemy.ai_Chase, GameColor.blue, 8);
dodgerYellow = new EnemyParameters(Enemy.ai_Dodger, GameColor.yellow);
dodgerRed = new EnemyParameters(Enemy.ai_Dodger, GameColor.red);
dodgerBlue = new EnemyParameters(Enemy.ai_Dodger, GameColor.blue);
dodgerWhite = new EnemyParameters(Enemy.ai_Dodger, GameColor.white);
shooterYellow = new EnemyParameters(Enemy.ai_Shooter, GameColor.yellow);
shooterRed = new EnemyParameters(Enemy.ai_Shooter, GameColor.red);
shooterBlue = new EnemyParameters(Enemy.ai_Shooter, GameColor.blue);
shooterWhite = new EnemyParameters(Enemy.ai_Shooter, GameColor.white);
fixedYellow = new EnemyParameters(Enemy.ai_Fixed, GameColor.yellow);
fixedRed = new EnemyParameters(Enemy.ai_Fixed, GameColor.red);
fixedBlue = new EnemyParameters(Enemy.ai_Fixed, GameColor.blue);
fixedWhite = new EnemyParameters(Enemy.ai_Fixed, GameColor.white);
laserYellow = new EnemyParameters(Enemy.ai_LaserCannon, GameColor.yellow);
laserRed = new EnemyParameters(Enemy.ai_LaserCannon, GameColor.red);
laserBlue = new EnemyParameters(Enemy.ai_LaserCannon, GameColor.blue);
laserWhite = new EnemyParameters(Enemy.ai_LaserCannon, GameColor.white);
er = new EnemyRoomWriter(enemyRoom1);
er.startNewWave();
er.addNewSpawnSet(R1Spawn1, chaserYellow, 1);
er.addNewSpawnSet(R1Spawn2, chaserYellow, 1);
er.addNewSpawnSet(R1Spawn3, chaserYellow, 1);
er.endWave();
er.startNewWave();
er.addNewSpawnSet(R1Spawn1, chaserRed, 1);
er.addNewSpawnSet(R1Spawn2, chaserRed, 1);
er.addNewSpawnSet(R1Spawn3, chaserRed, 1);
er.endWave();
er.startNewWave();
er.addNewSpawnSet(R1Spawn1, chaserYellow, 1);
er.addNewSpawnSet(R1Spawn2, shooterRed, 1);
er.addNewSpawnSet(R1Spawn3, chaserYellow, 1);
er.endWave();
er.startNewWave();
er.addNewSpawnSet(R1Spawn1, chaserRed, 1);
er.addNewSpawnSet(R1Spawn2, shooterYellow, 1);
er.addNewSpawnSet(R1Spawn3, chaserRed, 1);
er.endWave();
Room2Clear = false;
room2_fl1.setColor(GameColor.red);
room2_fl2.setColor(GameColor.yellow);
room2_fl3.setColor(GameColor.blue);
R2TrigLockA.addTriggerFunction(R2DoorLock);
R2TrigLockB.addTriggerFunction(R2DoorLock);
R2Trig.addTriggerFunction(R2Refresh);
R3Trig.addTriggerFunction(R2Refresh);
enemyRoom2 = new EnemyRoom(zRoom2);
enemyRoom2.setEndFunction(openRoom2Doors);
er2 = new EnemyRoomWriter(enemyRoom2);
er2.startNewWave();
er2.addNewSpawnSet(R2Spawn1, chaserFastYellow, 1);
er2.endWave();
er2.startNewWave();
er2.addNewSpawnSet(R2Spawn2, chaserFastBlue, 1);
er2.endWave();
er2.startNewWave();
er2.addNewSpawnSet(R2Spawn3, chaserFastRed, 1);
er2.endWave();
Room3Clear = false;
R3TrigLockA.addTriggerFunction(R3DoorLock);
R3TrigLockB.addTriggerFunction(R3DoorLock);
R4Trig.addTriggerFunction(R3Refresh);
R3Trig.addTriggerFunction(R3Refresh);
enemyRoom3 = new EnemyRoom(zRoom3);
enemyRoom3.setEndFunction(openRoom3Doors);
er3 = new EnemyRoomWriter(enemyRoom3);
er3.startNewWave();
er3.addNewSpawnSet(R3Spawn1, chaserRed, 1);
er3.addNewSpawnSet(R3Spawn2, chaserRed, 1);
er3.addNewSpawnSet(R3Spawn1, fixedYellow, 1);
er3.addNewSpawnSet(R3Spawn2, fixedYellow, 1);
er3.endWave();
er3.startNewWave();
er3.addNewSpawnSet(R3Spawn1, chaserYellow, 2);
er3.addNewSpawnSet(R3Spawn1, shooterRed, 1);
er3.addNewSpawnSet(R3Spawn2, chaserRed, 2);
er3.addNewSpawnSet(R3Spawn2, shooterYellow, 1);
er3.addNewSpawnSet(R3Spawn1, fixedRed, 1);
er3.addNewSpawnSet(R3Spawn2, fixedRed, 1);
er3.endWave();
Room4Clear = false;
R4TrigLockA.addTriggerFunction(R4DoorLock);
R4TrigLockB.addTriggerFunction(R4DoorLock);
enemyRoom4 = new EnemyRoom(zRoom4);
enemyRoom4.setEndFunction(openRoom4Doors);
er4 = new EnemyRoomWriter(enemyRoom4);
if (Room4Clear == false){
er4.startNewWave();
er4.addNewSpawnSet(R4Spawn1, fixedRed, 1);
er4.addNewSpawnSet(R4Spawn2, fixedRed, 1);
er4.endWave();
er4.startNewWave();
er4.addNewSpawnSet(R4Spawn1, fixedYellow, 1);
er4.addNewSpawnSet(R4Spawn2, fixedYellow, 1);
er4.endWave();
er4.startNewWave();
er4.addNewSpawnSet(R4Spawn1, fixedRed, 1);
er4.addNewSpawnSet(R4Spawn2, fixedYellow, 1);
er4.endWave();
};
endTrig3.addTriggerFunction(endGameX);
endTrig3.setMode(Trigger.mode_OneTimeOnly);
Game.getInstance().endSetup();
}
function frame15(){
stop();
Game.getInstance().setStage(stage);
Game.getInstance().setGlobalFloor(globalFloor);
Game.getInstance().getPlayer().setMaxColor(GameColor.blue);
Game.getInstance().getPlayer().addChargePower(GameColor.brown);
MyCamera.getInstance().setCameraBox(transitionBox6);
globalFloor.transitionColorTo(GameColor.black);
Sounds.playBgm();
Game.getInstance().getPlayer().playerFadeIn(100);
cameraSwith28to29 = new MoveCameraFunctor(trig28, box29);
cameraswitch32toTransitionBox7 = new MoveCameraFunctor(trig33, TransitionBox7);
trig28.addTriggerFunction(wave1);
TrialLock.addTriggerFunction(TrialDoorLock);
TrialClear = false;
enemyRoomTrial = new EnemyRoom(box29);
enemyRoomTrial.setEndFunction(trialEnds);
chaserYellow8 = new EnemyParameters(Enemy.ai_Chase, GameColor.yellow, 9);
chaserRed8 = new EnemyParameters(Enemy.ai_Chase, GameColor.red, 9);
chaserBlue8 = new EnemyParameters(Enemy.ai_Chase, GameColor.blue, 9);
chaserWhite8 = new EnemyParameters(Enemy.ai_Chase, GameColor.white, 9);
dodgerYellow8 = new EnemyParameters(Enemy.ai_Dodger, GameColor.yellow);
dodgerRed8 = new EnemyParameters(Enemy.ai_Dodger, GameColor.red);
dodgerBlue8 = new EnemyParameters(Enemy.ai_Dodger, GameColor.blue);
dodgerWhite8 = new EnemyParameters(Enemy.ai_Dodger, GameColor.white);
shooterYellow8 = new EnemyParameters(Enemy.ai_Shooter, GameColor.yellow);
shooterRed8 = new EnemyParameters(Enemy.ai_Shooter, GameColor.red);
shooterBlue8 = new EnemyParameters(Enemy.ai_Shooter, GameColor.blue);
shooterWhite8 = new EnemyParameters(Enemy.ai_Shooter, GameColor.white);
fixedYellow8 = new EnemyParameters(Enemy.ai_Fixed, GameColor.yellow);
fixedRed8 = new EnemyParameters(Enemy.ai_Fixed, GameColor.red);
fixedBlue8 = new EnemyParameters(Enemy.ai_Fixed, GameColor.blue);
fixedWhite8 = new EnemyParameters(Enemy.ai_Fixed, GameColor.white);
laserYellow8 = new EnemyParameters(Enemy.ai_LaserCannon, GameColor.yellow);
laserRed8 = new EnemyParameters(Enemy.ai_LaserCannon, GameColor.red);
laserBlue8 = new EnemyParameters(Enemy.ai_LaserCannon, GameColor.blue);
laserWhite8 = new EnemyParameters(Enemy.ai_LaserCannon, GameColor.white);
erTrial = new EnemyRoomWriter(enemyRoomTrial);
erTrial.startNewWave();
erTrial.setWaveEndFunction(stageTwo);
erTrial.addNewSpawnSet(Spawn1, chaserWhite8, 1);
erTrial.addNewSpawnSet(Spawn2, chaserWhite8, 1);
erTrial.addNewSpawnSet(Spawn3, chaserWhite8, 1);
erTrial.addNewSpawnSet(Spawn4, chaserWhite8, 1);
erTrial.endWave();
erTrial.startNewWave();
erTrial.setWaveEndFunction(stageThree);
erTrial.addNewSpawnSet(Spawn1, shooterWhite8, 2);
erTrial.addNewSpawnSet(Spawn2, chaserWhite8, 2);
erTrial.addNewSpawnSet(Spawn3, chaserWhite8, 2);
erTrial.addNewSpawnSet(Spawn4, shooterWhite8, 2);
erTrial.endWave();
erTrial.startNewWave();
erTrial.addNewSpawnSet(Spawn1, shooterWhite8, 3);
erTrial.addNewSpawnSet(Spawn3, shooterWhite8, 3);
erTrial.addNewSpawnSet(Spawn1, chaserWhite8, 4);
erTrial.addNewSpawnSet(Spawn3, chaserWhite8, 4);
erTrial.setWaveEndFunction(stageFour);
erTrial.endWave();
erTrial.startNewWave();
erTrial.addNewSpawnSet(Spawn1, shooterYellow8, 1);
erTrial.addNewSpawnSet(Spawn3, shooterYellow8, 1);
erTrial.addNewSpawnSet(Spawn1, chaserYellow8, 3);
erTrial.addNewSpawnSet(Spawn3, chaserYellow8, 3);
erTrial.setWaveEndFunction(stageFive);
erTrial.endWave();
erTrial.startNewWave();
erTrial.addNewSpawnSet(Spawn1, shooterYellow8, 3);
erTrial.addNewSpawnSet(Spawn3, shooterYellow8, 3);
erTrial.setWaveEndFunction(stageSix);
erTrial.addNewSpawnSet(Spawn1, chaserYellow8, 3);
erTrial.addNewSpawnSet(Spawn3, chaserYellow8, 3);
erTrial.endWave();
erTrial.startNewWave();
erTrial.addNewSpawnSet(Spawn1, shooterBlue8, 4);
erTrial.addNewSpawnSet(Spawn3, shooterRed8, 4);
erTrial.addNewSpawnSet(Spawn1, chaserRed8, 4);
erTrial.addNewSpawnSet(Spawn3, chaserBlue8, 4);
erTrial.addNewSpawnSet(Spawn1, fixedRed8, 1);
erTrial.addNewSpawnSet(Spawn3, fixedBlue8, 1);
erTrial.endWave();
endTrig6.addTriggerFunction(endGame4);
endTrig6.setMode(Trigger.mode_OneTimeOnly);
Game.getInstance().endSetup();
}
function frame16(){
stage.showDefaultContextMenu = false;
stop();
Game.getInstance().setStage(stage);
Game.getInstance().setGlobalFloor(globalFloor);
Game.getInstance().getPlayer().setMaxColor(GameColor.blue);
Game.getInstance().getPlayer().addChargePower(GameColor.brown);
MyCamera.getInstance().setCameraBox(transitionBox2);
globalFloor.setColor(GameColor.black);
Sounds.playBgm();
Game.getInstance().getPlayer().playerFadeIn(100);
c3transitTo1 = new MoveCameraFunctor(trig1, box1);
c3transitTo2 = new MoveCameraFunctor(trig2, box2);
c3transitTo3 = new MoveCameraFunctor(trig3, box3);
c3transitTo4 = new MoveCameraFunctor(trig4, box4);
c3transitTo5 = new MoveCameraFunctor(trig5, box5);
c3transitTo6 = new MoveCameraFunctor(trig6, box6);
c3transitTo7 = new MoveCameraFunctor(trig7, box7);
c3transitTo8 = new MoveCameraFunctor(trig8, box8);
c3transitTo9 = new MoveCameraFunctor(trig9, box9);
c3transitTo10 = new MoveCameraFunctor(trig10, box10);
room9Text.gotoAndStop(1);
doorLock5.doorUnlocked();
doorLock6.doorUnlocked();
lazer3.setShotAngle(180);
lazer3.setStreamLength((3 * 700));
lazer3.mCloseChaseVelocity = 3;
lazer3.mFarRange = 700;
lazer3.mCloseRange = 300;
LazCan3.stop();
textTrig3.addTriggerFunction(c3Text3Activate);
textTrig3.setMode(Trigger.mode_OneTimeOnly);
room10Text.gotoAndStop(1);
doorLock7.doorUnlocked();
doorLock8.doorUnlocked();
lazer4.setShotAngle(270);
lazer4.setStreamLength((3 * 700));
lazer4.mFarRange = 600;
lazer4.mCloseRange = 250;
LazCan4.stop();
textTrig4.addTriggerFunction(c3Text4Activate);
textTrig4.setMode(Trigger.mode_OneTimeOnly);
s1.setDefault(GameColor.blue);
s1.setGoal(GameColor.purple);
d1.addSwitch(s1);
doorLock1.doorLocked();
doorLock2.doorLocked();
trig5.addTriggerFunction(l9e1Activate);
l9r1e1 = new EnemyDeathEvent();
l9r1e1.addEnemy(Enemy(e1));
l9r1e1.addEnemy(Enemy(e2));
l9r1e1.addEnemy(Enemy(e3));
l9r1e1.addEnemy(Enemy(e4));
l9r1e1.setTriggerFunction(l9r1Unlock);
l9r1e2 = new EnemyDeathEvent();
l9r1e2.addEnemy(Enemy(e5));
l9r1e2.addEnemy(Enemy(e6));
l9r1e2.addEnemy(Enemy(e7));
l9r1e2.addEnemy(Enemy(e8));
l9r1e2.setTriggerFunction(l9r2Unlock);
enemy6.activate();
enemy7.activate();
switch3.setDefault(GameColor.white);
switch3.setGoal(GameColor.green);
door3.addSwitch(switch3);
endTrig3.addTriggerFunction(c3EndGame10);
endTrig3.setMode(Trigger.mode_OneTimeOnly);
Game.getInstance().endSetup();
}
function frame11(){
stop();
Game.getInstance().setStage(stage);
Game.getInstance().setGlobalFloor(globalFloor);
Game.getInstance().getPlayer().setMaxColor(GameColor.blue);
MyCamera.getInstance().setCameraBox(transitionBox4);
globalFloor.setColor(GameColor.black);
Sounds.BossLFiveStop();
Sounds.L6();
Game.getInstance().getPlayer().playerFadeIn(100);
TransitionBox4toYellowCharge = new MoveCameraFunctor(trig22, boxYellowCharge);
cameraSwithYellowChargeto23 = new MoveCameraFunctor(trigYellow, box23);
cameraSwith23to24 = new MoveCameraFunctor(trig23, box24, box23);
cameraSwith24to25 = new MoveCameraFunctor(trig24, box25);
cameraSwith25to24 = new MoveCameraFunctor(trig25, box24);
cameraSwith23to26 = new MoveCameraFunctor(trig26, box26);
cameraSwith26to27 = new MoveCameraFunctor(trig27, box27, box26);
cameraSwith28toTransitionBox5 = new MoveCameraFunctor(trig28, transitionBox5);
cameraSwith23to28 = new MoveCameraFunctor(trig29, box28);
transitionZone4Counter = 0;
enemyRoomTrial25 = new EnemyRoom(box24);
erTrial25 = new EnemyRoomWriter(enemyRoomTrial25);
fixedRed6 = new EnemyParameters(Enemy.ai_Fixed, GameColor.red);
shooterRed6 = new EnemyParameters(Enemy.ai_Shooter, GameColor.red);
erTrial25.startNewWave();
erTrial25.addNewSpawnSet(spawn6_25, shooterRed6, 2);
erTrial25.addNewSpawnSet(spawn6_25, fixedRed6, 1);
erTrial25.endWave();
stage.addEventListener(Event.ENTER_FRAME, transitionTimer4);
chargeTrig3.setMode(Trigger.mode_OneTimeOnly);
chargeTrig3.addTriggerFunction(bgYellowPickupRoom);
text1.alpha = 0;
room23_switch1.setDefault(GameColor.white);
room23_switch1.setGoal(GameColor.red);
room23_switch2.setDefault(GameColor.white);
room23_switch2.setGoal(GameColor.blue);
room23_door1.addSwitch(room23_switch1);
room23_door2.addSwitch(room23_switch2);
room24_enemy1.setColor(GameColor.yellow);
room24_enemy2.setColor(GameColor.red);
room24_enemy3.setColor(GameColor.yellow);
room24_enemy5.setColor(GameColor.red);
room24_enemy6.setColor(GameColor.yellow);
room24_enemy4.setColor(GameColor.red);
room24_field1.setColor(GameColor.orange);
room24_eventTrig1.setMode(Trigger.mode_OneTimeOnly);
room24_eventTrig1.addTriggerFunction(room24_round1);
trigBlockRoom25.deactivateTrig();
room25_door1.addSwitch(room25_switch1);
chargeTrig1.setMode(Trigger.mode_OneTimeOnly);
chargeTrig1.addTriggerFunction(bgRedRoom25);
trig23.addTriggerFunction(room24EnemiesActivate);
trigBlockRoom25Activate.addTriggerFunction(activateRedTrigger);
trigBlockRoom25.addTriggerFunction(blockRoom25);
room27_switch1.setDefault(GameColor.yellow);
room27_switch1.setGoal(GameColor.green);
room27_door1.addSwitch(room27_switch1);
room26_eventTrig1.addTriggerFunction(room26_doorLock);
room26_eventTrig1.setMode(Trigger.mode_OneTimeOnly);
room26_enemy1.setColor(GameColor.red);
room26_enemy2.setColor(GameColor.blue);
room26_enemy3.setColor(GameColor.red);
room26_enemy4.setColor(GameColor.blue);
room26_enemy5.setColor(GameColor.blue);
room26_enemy6.setColor(GameColor.blue);
room26_enemy7.setColor(GameColor.red);
room26_enemy8.setColor(GameColor.red);
room26_enemy9.setColor(GameColor.red);
room26_enemy1.alpha = 0;
room26_enemy2.alpha = 0;
room26_enemy3.alpha = 0;
room26_enemy4.alpha = 0;
room26_enemy5.alpha = 0;
room26_enemy6.alpha = 0;
room26_enemy7.alpha = 0;
room26_enemy8.alpha = 0;
room26_enemy9.alpha = 0;
room26Wave2Event = new EnemyDeathEvent();
room26Wave2Event.addEnemy(Enemy(room26_enemy4));
room26Wave2Event.addEnemy(Enemy(room26_enemy5));
room26Wave2Event.addEnemy(Enemy(room26_enemy6));
room26Wave2Event.setTriggerFunction(room26Round2);
room26Wave3Event = new EnemyDeathEvent();
room26Wave3Event.addEnemy(Enemy(room26_enemy7));
room26Wave3Event.addEnemy(Enemy(room26_enemy8));
room26Wave3Event.addEnemy(Enemy(room26_enemy9));
room26Wave3Event.setTriggerFunction(room26Round3);
room26DeathEvent = new EnemyDeathEvent();
room26DeathEvent.addEnemy(Enemy(room26_enemy1));
room26DeathEvent.addEnemy(Enemy(room26_enemy2));
room26DeathEvent.addEnemy(Enemy(room26_enemy3));
room26DeathEvent.addEnemy(Enemy(room26_enemy4));
room26DeathEvent.addEnemy(Enemy(room26_enemy5));
room26DeathEvent.addEnemy(Enemy(room26_enemy6));
room26DeathEvent.addEnemy(Enemy(room26_enemy7));
room26DeathEvent.addEnemy(Enemy(room26_enemy8));
room26DeathEvent.addEnemy(Enemy(room26_enemy9));
room26DeathEvent.setTriggerFunction(room26Death);
chargeTrig2.setMode(Trigger.mode_OneTimeOnly);
chargeTrig2.addTriggerFunction(room27Pickup);
trigBlockRoom27.deactivateTrig();
trigBlockRoom27.addTriggerFunction(blockRoom27);
endTrig5.addTriggerFunction(endGame3);
endTrig5.setMode(Trigger.mode_OneTimeOnly);
Game.getInstance().endSetup();
}
function frame12(){
stage.showDefaultContextMenu = false;
stop();
Game.getInstance().setStage(stage);
Game.getInstance().setGlobalFloor(globalFloor);
Game.getInstance().getPlayer().setMaxColor(GameColor.blue);
Game.getInstance().getPlayer().addChargePower(GameColor.brown);
MyCamera.getInstance().setCameraBox(transitionBox2);
globalFloor.setColor(GameColor.black);
Sounds.L3Stop();
Sounds.L4();
Game.getInstance().getPlayer().playerFadeIn(100);
lvl4transitionRoom1to2 = new MoveCameraFunctor(trig1, box2);
lvl4transitionRoom2to3 = new MoveCameraFunctor(trig2, box3);
lvl4transitionRoom3to4 = new MoveCameraFunctor(trig3, box4);
lvl4transitionRoom4to5 = new MoveCameraFunctor(trig6, box5);
lvl4transitionRoom5to6 = new MoveCameraFunctor(trig4, box6);
lvl4transitionRoom6to7 = new MoveCameraFunctor(trig5, box7);
lvl4transitionRoom5to7 = new MoveCameraFunctor(trig11, box8);
lvl4transitionRoom5to8 = new MoveCameraFunctor(trig10, box9);
lvl4transitionRoom5to9 = new MoveCameraFunctor(trig12, box10);
room2Text.gotoAndStop(1);
LazCan1.gotoAndStop(1);
doorLock1.doorUnlocked();
doorLock2.doorUnlocked();
lazer1.setShotAngle(180);
lazer1.setStreamLength((3 * 700));
lazer1.mFarRange = 600;
lazer1.mCloseRange = 200;
textTrig1.addTriggerFunction(text1Activate);
textTrig1.setMode(Trigger.mode_OneTimeOnly);
LazCan1.lazCan1Anim.lazCanUnfold1.stop();
lv4Switch1.setDefault(GameColor.white);
lv4Switch1.setGoal(GameColor.red);
lv4Door1.addSwitch(lv4Switch1);
lv4Switch2.setDefault(GameColor.white);
lv4Switch2.setGoal(GameColor.blue);
lv4Door2.addSwitch(lv4Switch2);
enemy1.spawn();
enemy2.spawn();
enemy3.spawn();
enemy4.spawn();
enemy5.spawn();
enemy6.spawn();
enemy7.spawn();
enemy8.spawn();
enemy9.spawn();
enemy10.spawn();
enemy11.spawn();
enemy12.spawn();
enemy13.spawn();
enemy14.spawn();
enemy15.spawn();
enemy16.spawn();
enemy17.spawn();
enemy18.spawn();
enemy19.spawn();
enemy20.spawn();
enemy21.spawn();
enemy22.spawn();
enemy23.spawn();
enemy24.spawn();
enemy25.spawn();
enemy26.spawn();
enemy27.spawn();
enemy28.spawn();
enemy1.activate();
enemy2.activate();
enemy3.activate();
enemy4.activate();
enemy5.activate();
enemy6.activate();
enemy7.activate();
enemy8.activate();
enemy9.activate();
enemy10.activate();
enemy11.activate();
enemy12.activate();
enemy13.activate();
enemy14.activate();
enemy15.activate();
enemy16.activate();
enemy17.activate();
enemy18.activate();
enemy19.activate();
enemy20.activate();
enemy21.activate();
enemy22.activate();
enemy23.activate();
enemy24.activate();
enemy25.activate();
enemy26.activate();
enemy27.activate();
enemy28.activate();
enemy29.activate();
enemy30.activate();
enemy31.activate();
enemy32.activate();
enemy1.setColor(GameColor.yellow);
enemy2.setColor(GameColor.yellow);
enemy3.setColor(GameColor.yellow);
enemy4.setColor(GameColor.yellow);
enemy5.setColor(GameColor.white);
enemy6.setColor(GameColor.white);
enemy7.setColor(GameColor.white);
enemy8.setColor(GameColor.white);
enemy9.setColor(GameColor.blue);
enemy10.setColor(GameColor.blue);
enemy11.setColor(GameColor.blue);
enemy12.setColor(GameColor.blue);
enemy13.setColor(GameColor.orange);
enemy14.setColor(GameColor.orange);
enemy15.setColor(GameColor.orange);
enemy16.setColor(GameColor.orange);
enemy17.setColor(GameColor.purple);
enemy18.setColor(GameColor.purple);
enemy19.setColor(GameColor.purple);
enemy20.setColor(GameColor.purple);
enemy21.setColor(GameColor.green);
enemy22.setColor(GameColor.green);
enemy23.setColor(GameColor.green);
enemy24.setColor(GameColor.green);
enemy25.setColor(GameColor.brown);
enemy26.setColor(GameColor.brown);
enemy27.setColor(GameColor.brown);
enemy28.setColor(GameColor.brown);
enemy29.setColor(GameColor.white);
enemy30.setColor(GameColor.white);
enemy31.setColor(GameColor.white);
enemy32.setColor(GameColor.white);
doorLock3.doorUnlocked();
doorLock4.doorUnlocked();
lazer2.setShotAngle(90);
lazer2.setStreamLength((3 * 700));
lazer2.mFarRange = 600;
lazer2.mCloseRange = 200;
room8Text.stop();
LazCan2.stop();
LazCan2.lazCan2Anim.lazCanUnfold2.stop();
textTrig2.addTriggerFunction(text2Activate);
textTrig2.setMode(Trigger.mode_OneTimeOnly);
endTrig3.addTriggerFunction(endGame9);
endTrig3.setMode(Trigger.mode_OneTimeOnly);
Game.getInstance().endSetup();
}
function frame18(){
Game.getInstance().setStage(stage);
Game.getInstance().endSetup();
}
function frame19(){
stage.showDefaultContextMenu = false;
stop();
Game.getInstance().setStage(stage);
Game.getInstance().setGlobalFloor(globalFloor);
Game.getInstance().getPlayer().setMaxColor(GameColor.blue);
Game.getInstance().getPlayer().addChargePower(GameColor.brown);
MyCamera.getInstance().setCameraBox(transitionBox2);
globalFloor.setColor(GameColor.black);
Sounds.L10Stop();
Sounds.playBgm();
Game.getInstance().getPlayer().playerFadeIn(100);
transitToR5 = new MoveCameraFunctor(R5Trig, zRoom5);
transitToR6 = new MoveCameraFunctor(R6Trig, zRoom6);
transitToR7A2 = new MoveCameraFunctor(R7TrigA2, zRoom5, zRoom7);
transitToR6B = new MoveCameraFunctor(R6TrigB, zRoom6);
transitToR7C = new MoveCameraFunctor(R7TrigC, zRoom7, zRoom6);
transitToR8 = new MoveCameraFunctor(R8Trig, zRoom8);
transitToR12B = new MoveCameraFunctor(R12Trig, zRoom12);
Room5Clear = false;
R5TrigLockA.addTriggerFunction(R5DoorLock);
R5TrigLockB.addTriggerFunction(R5DoorLock);
R5TrigLockC.addTriggerFunction(R5DoorLock);
R5Trig.addTriggerFunction(R5Refresh);
R6Trig.addTriggerFunction(R5Refresh);
enemyRoom5 = new EnemyRoom(zRoom5);
enemyRoom5.setEndFunction(openRoom5Doors);
er5 = new EnemyRoomWriter(enemyRoom5);
er5.startNewWave();
er5.addNewSpawnSet(R5Spawn1, fixedYellow, 1);
er5.endWave();
er5.startNewWave();
er5.addNewSpawnSet(R5Spawn1, dodgerYellow, 4);
er5.endWave();
Room6Clear = false;
R6TrigLockA.addTriggerFunction(R6DoorLock);
R6TrigLockB.addTriggerFunction(R6DoorLock);
R6Trig.addTriggerFunction(R6Refresh);
R7TrigC.addTriggerFunction(R6Refresh);
enemyRoom6 = new EnemyRoom(zRoom6);
enemyRoom6.setEndFunction(openRoom6Doors);
er6 = new EnemyRoomWriter(enemyRoom6);
er6.startNewWave();
er6.addNewSpawnSet(R6Spawn1, dodgerBlue, 2);
er6.endWave();
er6.startNewWave();
er6.addNewSpawnSet(R6Spawn2, dodgerBlue, 2);
er6.addNewSpawnSet(R6Spawn2, chaserBlue, 2);
er6.endWave();
er6.startNewWave();
er6.addNewSpawnSet(R6Spawn3, shooterBlue, 2);
er6.addNewSpawnSet(R6Spawn3, chaserBlue, 2);
er6.endWave();
er6.startNewWave();
er6.addNewSpawnSet(R6Spawn3, dodgerBlue, 2);
er6.addNewSpawnSet(R6Spawn3, shooterBlue, 2);
er6.endWave();
Room7Clear = false;
R7TrigLockA.addTriggerFunction(R7DoorLock);
R7TrigLockB.addTriggerFunction(R7DoorLock);
R6TrigB.addTriggerFunction(R7Refresh);
R7TrigC.addTriggerFunction(R7Refresh);
enemyRoom7 = new EnemyRoom(zRoom7);
enemyRoom7.setEndFunction(openRoom7Doors);
er7 = new EnemyRoomWriter(enemyRoom7);
er7.startNewWave();
er7.addNewSpawnSet(R7Spawn1, fixedRed, 1);
er7.addNewSpawnSet(R7Spawn2, fixedRed, 1);
er7.addNewSpawnSet(R7Spawn3, fixedRed, 1);
er7.addNewSpawnSet(R7Spawn4, fixedRed, 1);
er7.addNewSpawnSet(R7Spawn5, fixedRed, 1);
er7.addNewSpawnSet(R7Spawn7, fixedRed, 1);
er7.addNewSpawnSet(R7Spawn8, fixedRed, 1);
er7.addNewSpawnSet(R7Spawn9, fixedRed, 1);
er7.addNewSpawnSet(R7Spawn10, fixedRed, 1);
er7.endWave();
Room8Clear = false;
R8TrigLockA.addTriggerFunction(R8DoorLock);
R8TrigLockB.addTriggerFunction(R8DoorLock);
transitionZoneTrig3.addTriggerFunction(R8Refresh);
R8Trig.addTriggerFunction(R8Refresh);
enemyRoom8 = new EnemyRoom(zRoom8);
enemyRoom8.setEndFunction(openRoom8Doors);
er8 = new EnemyRoomWriter(enemyRoom8);
er8.startNewWave();
er8.addNewSpawnSet(R8Spawn1, laserWhite, 1);
er8.endWave();
er8.startNewWave();
er8.addNewSpawnSet(R8Spawn2, laserWhite, 1);
er8.endWave();
er8.startNewWave();
er8.addNewSpawnSet(R8Spawn3, laserWhite, 1);
er8.endWave();
er8.startNewWave();
er8.addNewSpawnSet(R8Spawn4, laserWhite, 1);
er8.endWave();
er8.startNewWave();
er8.addNewSpawnSet(R8Spawn1, laserWhite, 1);
er8.addNewSpawnSet(R8Spawn4, laserWhite, 1);
er8.endWave();
er8.startNewWave();
er8.addNewSpawnSet(R8Spawn2, laserWhite, 1);
er8.addNewSpawnSet(R8Spawn3, laserWhite, 1);
er8.endWave();
er8.startNewWave();
er8.addNewSpawnSet(R8Spawn1, laserWhite, 1);
er8.addNewSpawnSet(R8Spawn2, laserWhite, 1);
er8.addNewSpawnSet(R8Spawn3, laserWhite, 1);
er8.addNewSpawnSet(R8Spawn4, laserWhite, 1);
er8.endWave();
endTrig3.addTriggerFunction(endGameX);
endTrig3.setMode(Trigger.mode_OneTimeOnly);
Game.getInstance().endSetup();
}
function frame17(){
stop();
Game.getInstance().setStage(stage);
Game.getInstance().setGlobalFloor(globalFloor);
Game.getInstance().getPlayer().setMaxColor(GameColor.blue);
Game.getInstance().getPlayer().addChargePower(GameColor.brown);
MyCamera.getInstance().setCameraBox(transitionBox8);
globalFloor.setColor(GameColor.black);
Sounds.L10();
Game.getInstance().getPlayer().playerFadeIn(100);
cameraSwithTransitionto33 = new MoveCameraFunctor(trig33, box33);
cameraSwith33to34 = new MoveCameraFunctor(trig34, box34);
cameraSwith34to36 = new MoveCameraFunctor(trig36, box36);
cameraSwith36to37 = new MoveCameraFunctor(trig37, box37);
cameraSwith37to35 = new MoveCameraFunctor(trig35, box35);
trig37.addTriggerFunction(activateBoss2);
room33_switch1.setDefault(GameColor.white);
room33_switch1.setGoal(GameColor.brown);
room33_door1.addSwitch(room33_switch1);
room34_eventTrig1.addTriggerFunction(room34_round1);
room34_eventTrig1.setMode(Trigger.mode_OneTimeOnly);
room34_doorLock1.doorUnlocked();
room34_doorLock2.doorUnlocked();
room34_enemy1.setColor(GameColor.yellow);
room34_enemy2.setColor(GameColor.red);
room34_enemy3.setColor(GameColor.yellow);
room34_enemy4.setColor(GameColor.red);
room34_enemy5.setColor(GameColor.yellow);
room34_enemy6.setColor(GameColor.blue);
room34_enemy7.setColor(GameColor.red);
room34_enemy8.setColor(GameColor.blue);
room34_enemy9.setColor(GameColor.red);
room34_enemy10.setColor(GameColor.blue);
room34_enemy12.setColor(GameColor.white);
room34_enemy13.setColor(GameColor.white);
room34_enemy14.setColor(GameColor.white);
room34_enemy1.alpha = 0;
room34_enemy2.alpha = 0;
room34_enemy3.alpha = 0;
room34_enemy4.alpha = 0;
room34_enemy5.alpha = 0;
room34_enemy6.alpha = 0;
room34_enemy7.alpha = 0;
room34_enemy8.alpha = 0;
room34_enemy9.alpha = 0;
room34_enemy10.alpha = 0;
room34_enemy12.alpha = 0;
room34_enemy13.alpha = 0;
room34_enemy14.alpha = 0;
room34Wave1Event = new EnemyDeathEvent();
room34Wave1Event.addEnemy(Enemy(room34_enemy1));
room34Wave1Event.addEnemy(Enemy(room34_enemy2));
room34Wave1Event.addEnemy(Enemy(room34_enemy3));
room34Wave1Event.addEnemy(Enemy(room34_enemy4));
room34Wave1Event.addEnemy(Enemy(room34_enemy5));
room34Wave1Event.setTriggerFunction(room34_round2);
room34Wave2Event = new EnemyDeathEvent();
room34Wave2Event.addEnemy(Enemy(room34_enemy6));
room34Wave2Event.addEnemy(Enemy(room34_enemy7));
room34Wave2Event.addEnemy(Enemy(room34_enemy8));
room34Wave2Event.addEnemy(Enemy(room34_enemy9));
room34Wave2Event.addEnemy(Enemy(room34_enemy10));
room34Wave2Event.setTriggerFunction(room34_round3);
room34Wave3Event = new EnemyDeathEvent();
room34Wave3Event.addEnemy(Enemy(room34_enemy12));
room34Wave3Event.addEnemy(Enemy(room34_enemy13));
room34Wave3Event.addEnemy(Enemy(room34_enemy14));
room34Wave3Event.setTriggerFunction(room34_round4);
room35_eventTrig1.addTriggerFunction(endGame5);
room35_eventTrig1.setMode(Trigger.mode_OneTimeOnly);
doorLock3.doorUnlocked();
trigBossLock.addTriggerFunction(bossLock);
bossDeath = new EnemyDeathEvent();
bossDeath.addEnemy(Enemy(boss2));
bossDeath.setTriggerFunction(bossUnlock);
Game.getInstance().endSetup();
}
public function e2Activate(_arg1:Trigger){
e9.transitionColorTo(GameColor.yellow);
e10.transitionColorTo(GameColor.yellow);
e11.transitionColorTo(GameColor.yellow);
e12.transitionColorTo(GameColor.yellow);
e13.transitionColorTo(GameColor.red);
e14.transitionColorTo(GameColor.red);
e15.transitionColorTo(GameColor.red);
e16.transitionColorTo(GameColor.red);
e9.activate();
e10.activate();
e11.activate();
e12.activate();
e13.activate();
e14.activate();
e15.activate();
e16.activate();
}
public function openRoom3Doors(){
Room3Clear = true;
R3Lock1.doorUnlocked();
R3Lock2.doorUnlocked();
}
public function room22Round2(){
room22_enemy2.spawn();
room22_enemy3.spawn();
}
private function showBannedScreen():void{
var _local1:Sprite = new mcBannedSign();
_local1.buttonMode = true;
_local1.addEventListener(MouseEvent.CLICK, openKingPage);
m_rootRef.addChild(_local1);
}
private function update(_arg1:Event):void{
var _local2:int;
var _local3:int;
var _local4:MovieClip;
var _local5:Sound;
var _local6:Sound;
if ((((stage.loaderInfo.bytesLoaded == stage.loaderInfo.bytesTotal)) && (!(m_isLoaded)))){
m_isLoaded = true;
trace("LOADED COMPLETWE");
};
m_count++;
if (m_streamGreen){
if (m_count == 1){
m_GREEN.height = (m_GREEN.height - m_GREEN.height);
m_GREEN.alpha = 1;
m_ferryGreen.gotoAndStop("on");
};
m_GREEN.height = (m_GREEN.height + 20);
if (m_GREEN.height >= m_streamHeight){
m_GREEN.height = m_streamHeight;
if (m_clsGreen.decrThickness(false)){
m_streamGreen = false;
m_streamBlue = true;
m_count = 0;
};
};
};
if (m_streamBlue){
if (m_count >= 40){
if (m_count == 40){
m_BLUE.height = (m_BLUE.height - m_BLUE.height);
m_BLUE.alpha = 1;
m_ferryBlue.gotoAndStop("on");
m_tween = new Tween(m_waveHolderLogo, "", None.easeNone, 0, 1, 2, true);
m_tween.addEventListener(TweenEvent.MOTION_CHANGE, tweenTransformLogo);
};
m_BLUE.height = (m_BLUE.height + 20);
if (m_BLUE.height >= m_streamHeight){
m_BLUE.height = m_streamHeight;
if (m_clsBlue.decrThickness(false)){
m_streamBlue = false;
};
};
};
};
if (m_logoFill){
if (m_waveHolderLogo.y > m_greenDest){
m_waveHolderLogo.y = (m_waveHolderLogo.y - 0.3);
} else {
m_waveHolderLogo.y = m_greenDest;
if (!m_streamBlue){
m_colorOff = true;
m_waveEngineLogo.stopWave();
};
};
};
if (m_colorOff){
if (m_logoFill){
if (m_clsBlue.decrThickness(true)){
if (m_BLUE.rotation != 180){
m_BLUE.rotation = 180;
m_BLUE.y = (STAGE_HEIGHT / 2);
m_ferryBlue.gotoAndStop("off");
};
m_BLUE.scaleY = (m_BLUE.scaleY - 0.1);
if (m_BLUE.scaleY < 0){
m_BLUE.alpha = 0;
m_colorOff = false;
m_logoFill = false;
m_count = 0;
m_crownFill = true;
m_streamRed = true;
m_startColor = new ColorTransform();
m_startColor.color = 0xFF00;
m_endColor = new ColorTransform();
m_endColor.color = 0xFFAA00;
m_tween.removeEventListener(TweenEvent.MOTION_CHANGE, tweenTransformLogo);
m_tween = new Tween(m_waveHolderCrown, "", None.easeNone, 0, 1, 2, true);
m_tween.addEventListener(TweenEvent.MOTION_CHANGE, tweenTransformCrown);
};
};
};
if (m_crownFill){
if (((m_clsRed.decrThickness(true)) && (m_clsGreen.decrThickness(true)))){
if (m_GREEN.rotation != 180){
m_GREEN.rotation = 180;
m_RED.rotation = 180;
m_GREEN.y = (STAGE_HEIGHT / 2);
m_RED.y = (STAGE_HEIGHT / 2);
m_ferryGreen.gotoAndStop("off");
m_ferryRed.gotoAndStop("off");
};
m_GREEN.scaleY = (m_GREEN.scaleY - 0.1);
m_RED.scaleY = (m_RED.scaleY - 0.1);
if ((((m_GREEN.scaleY < 0)) && ((m_RED.scaleY < 0)))){
m_GREEN.alpha = 0;
m_RED.alpha = 0;
m_colorOff = false;
m_crownFill = false;
m_bounce = true;
m_count = 0;
};
};
};
};
if (m_crownFill){
if (m_sampleLoadPerc == -1){
m_sampleLoadPerc = (100 - (100 * (stage.loaderInfo.bytesLoaded / stage.loaderInfo.bytesTotal)));
m_step = (m_dist / 100);
};
_local2 = (100 - (100 * (stage.loaderInfo.bytesLoaded / stage.loaderInfo.bytesTotal)));
_local2 = ((100 * (m_sampleLoadPerc - _local2)) / m_sampleLoadPerc);
if (m_waveHolderCrown.y > m_yellowDest){
if ((m_waveHolderCrown.y - m_step) < m_yellowDest){
m_waveHolderCrown.y = m_yellowDest;
} else {
if (m_isLoaded){
m_waveHolderCrown.y = (m_waveHolderCrown.y - 0.5);
} else {
trace(m_prevPerc, _local2);
if (m_prevPerc != _local2){
_local3 = (_local2 - m_prevPerc);
m_waveHolderCrown.y = (m_waveHolderCrown.y - m_step);
m_prevPerc = _local2;
};
};
};
} else {
m_colorOff = true;
m_waveEngineCrown.stopWave();
};
};
if (m_streamRed){
if (m_count >= 20){
if (m_count == 20){
m_RED.height = (m_RED.height - m_RED.height);
m_RED.alpha = 1;
m_ferryRed.gotoAndStop("on");
};
m_RED.height = (m_RED.height + 20);
if (m_RED.height >= m_streamHeight){
m_RED.height = m_streamHeight;
if (m_clsRed.decrThickness(false)){
m_streamRed = false;
};
};
};
};
if (m_bounce){
if (m_count == 1){
_local4 = new mcWaterRing();
_local4.x = (STAGE_WIDTH / 2);
_local4.y = ((STAGE_HEIGHT / 2) + 30);
m_rootRef.addChild(_local4);
m_loaderContent.push(_local4);
};
if (m_count == 2){
_local5 = new sfxBounce();
_local5.play();
};
if (m_count < 3){
m_logoHolder.y = (m_logoHolder.y + 1);
m_waveHolderCrown.y = (m_waveHolderCrown.y + 1);
m_waveHolderLogo.y = (m_waveHolderLogo.y + 1);
m_maskRown.y = (m_maskRown.y + 1);
m_mask.y = (m_mask.y + 1);
};
if ((((m_count > 2)) && ((m_count < 4)))){
m_logoHolder.y = (m_logoHolder.y - 1);
m_waveHolderCrown.y = (m_waveHolderCrown.y - 1);
m_waveHolderLogo.y = (m_waveHolderLogo.y - 1);
m_maskRown.y = (m_maskRown.y - 1);
m_mask.y = (m_mask.y - 1);
};
if (m_count == 4){
_local6 = new sfxBell();
_local6.play();
};
if (m_count == 30){
m_play.visible = true;
m_otherGames.visible = true;
};
if (m_count > 30){
m_play.alpha = (m_play.alpha + 0.05);
if (m_count > 40){
m_otherGames.alpha = (m_otherGames.alpha + 0.05);
};
if ((((m_play.alpha >= 1)) && ((m_otherGames.alpha >= 1)))){
m_bounce = false;
onLoaderMovieFinished();
};
};
};
}
public function stageSix(){
globalFloor.transitionColorTo(GameColor.purple);
}
public function room26Death(){
room26_doorLock1.doorUnlocked();
room26_doorLock2.doorUnlocked();
}
public function r2Unlock(){
doorLock2.doorUnlocked();
}
public function R3Refresh(_arg1:Trigger){
Room3Clear = false;
}
public function e1Activate(_arg1:Trigger){
e1.activate();
e2.activate();
e3.activate();
e4.activate();
e5.activate();
e6.activate();
e7.activate();
e8.activate();
}
public function l9r2Unlock(){
doorLock2.doorUnlocked();
}
public function openRoom5Doors(){
Room5Clear = true;
R5Lock1.doorUnlocked();
R5Lock2.doorUnlocked();
R5Lock3.doorUnlocked();
}
public function R8Refresh(_arg1:Trigger){
Room8Clear = false;
}
public function endGame2(_arg1:Trigger){
Game.getInstance().transitionToNextLevel();
}
public function endGame4(_arg1:Trigger){
Game.getInstance().transitionToNextLevel();
}
public function endGame5(_arg1:Trigger){
var _local3:DisplayObject;
var _local2:EndFade = new EndFade();
MyCamera.getInstance().addToHud(_local2, true);
Game.getInstance().getPlayer().disableInput();
_local2.gotoAndPlay(2);
if (KingAPI.isHome){
KingAPI.submitLevel(12);
KingAPI.submitScore((12 * 100));
} else {
_local3 = new EndGameSubmitScore();
_local3.x = 100;
_local3.y = 400;
MyCamera.getInstance().addToHud(_local3);
};
}
public function endGame7(_arg1:Trigger){
Game.getInstance().transitionToNextLevel();
}
public function endGame9(_arg1:Trigger){
Game.getInstance().transitionToNextLevel();
}
public function endGame3(_arg1:Trigger){
Game.getInstance().transitionToNextLevel();
}
public function endGame8(_arg1:Trigger){
Game.getInstance().transitionToNextLevel();
}
public function l9e1Activate(_arg1:Trigger){
e1.activate();
e2.activate();
e3.activate();
e4.activate();
e5.activate();
e6.activate();
e7.activate();
e8.activate();
}
public function endGameX(_arg1:Trigger){
Game.getInstance().transitionToNextLevel();
}
public function trialEnds5(){
doorLock2.doorUnlocked();
}
public function openRoom7Doors(){
Room7Clear = true;
R7Lock1.doorUnlocked();
R7Lock2.doorUnlocked();
}
public function room27Pickup(_arg1:Trigger){
Game.getInstance().getPlayer().addChargePower(GameColor.blue);
if (blueSuperPickedUp == false){
Sounds.pickUp();
blueSuperPickedUp = true;
};
blueChargePickup.visible = false;
trigBlockRoom27.activateTrig();
}
public function trialEnds(){
TrialClear = true;
trialDoor1.doorUnlocked();
trialDoor2.doorUnlocked();
}
public function bgBlackRoom33(_arg1:Trigger){
}
private function tweenTransformCrown(_arg1:TweenEvent):void{
m_waveEngineCrown.colorUpdate(interpolateColor(m_startColor, m_endColor, m_tween.position).color);
}
public function c3EndGame10(_arg1:Trigger){
Game.getInstance().transitionToNextLevel();
}
public function wave1(_arg1:Trigger){
globalFloor.transitionColorTo(GameColor.red);
}
public function R2Refresh(_arg1:Trigger){
Room2Clear = false;
}
public function R7Refresh(_arg1:Trigger){
}
public function activateBoss2(_arg1:Trigger){
boss2.activate();
}
public function activateRedTrigger(_arg1:Trigger){
trigBlockRoom25.activateTrig();
}
public function room7_Pickup(_arg1:Trigger){
yellowWeapPickup.visible = false;
hintText1.fadeOut();
room07_text.fadeIn();
}
public function room34_round2(){
globalFloor.transitionColorTo(GameColor.purple);
room34_enemy6.spawn();
room34_enemy7.spawn();
room34_enemy8.spawn();
room34_enemy9.spawn();
room34_enemy10.spawn();
}
public function room34_round3(){
globalFloor.transitionColorTo(GameColor.brown);
room34_enemy12.spawn();
room34_enemy13.spawn();
room34_enemy14.spawn();
}
public function room34_round4(){
room34_doorLock2.doorUnlocked();
}
public function room34_round1(_arg1:Trigger){
room34_doorLock1.doorLocked();
room34_doorLock2.doorLocked();
globalFloor.transitionColorTo(GameColor.orange);
room34_enemy1.spawn();
room34_enemy2.spawn();
room34_enemy3.spawn();
room34_enemy4.spawn();
room34_enemy5.spawn();
}
public function r1Unlock(){
doorLock1.doorUnlocked();
}
public function R8DoorLock(_arg1:Trigger){
if (Room8Clear == false){
R8Lock1.doorLocked();
R8Lock2.doorLocked();
R8Lock3.doorLocked();
};
}
public function l9r1Unlock(){
doorLock1.doorUnlocked();
}
public function stageTwo(){
globalFloor.transitionColorTo(GameColor.blue);
}
public function room24_round1(_arg1:Trigger){
room24_enemy7.setColor(GameColor.red);
room24_enemy8.setColor(GameColor.blue);
room24_enemy9.setColor(GameColor.red);
room24_enemy7.spawn();
room24_enemy8.spawn();
room24_enemy9.spawn();
}
private function tweenTransformLogo(_arg1:TweenEvent):void{
m_waveEngineLogo.colorUpdate(interpolateColor(m_startColor, m_endColor, m_tween.position).color);
}
public function stageFive(){
globalFloor.transitionColorTo(GameColor.orange);
}
private function interpolateColor(_arg1:ColorTransform, _arg2:ColorTransform, _arg3:Number):ColorTransform{
var _local4:ColorTransform = new ColorTransform();
_local4.redMultiplier = (_arg1.redMultiplier + ((_arg2.redMultiplier - _arg1.redMultiplier) * _arg3));
_local4.greenMultiplier = (_arg1.greenMultiplier + ((_arg2.greenMultiplier - _arg1.greenMultiplier) * _arg3));
_local4.blueMultiplier = (_arg1.blueMultiplier + ((_arg2.blueMultiplier - _arg1.blueMultiplier) * _arg3));
_local4.alphaMultiplier = (_arg1.alphaMultiplier + ((_arg2.alphaMultiplier - _arg1.alphaMultiplier) * _arg3));
_local4.redOffset = (_arg1.redOffset + ((_arg2.redOffset - _arg1.redOffset) * _arg3));
_local4.greenOffset = (_arg1.greenOffset + ((_arg2.greenOffset - _arg1.greenOffset) * _arg3));
_local4.blueOffset = (_arg1.blueOffset + ((_arg2.blueOffset - _arg1.blueOffset) * _arg3));
_local4.alphaOffset = (_arg1.alphaOffset + ((_arg2.alphaOffset - _arg1.alphaOffset) * _arg3));
return (_local4);
}
public function room11_Pickup(_arg1:Trigger){
blueWeapPickup.visible = false;
}
public function R7DoorLock(_arg1:Trigger){
if (Room7Clear == false){
};
}
private function openKingPage(_arg1:Event):void{
trace(("openKingPage() " + _arg1));
KingAPI.openLoaderMovieLink();
}
public function blockRoom25(_arg1:Trigger){
doorLockRoom25.doorLocked();
}
public function blockRoom27(_arg1:Trigger){
doorLockRoom27.doorLocked();
}
public function room18EnemyActivate(_arg1:Trigger){
room18_enemy1.spawn();
room18_enemy2.spawn();
room18_enemy3.spawn();
room18_enemy4.spawn();
}
public function R1Refresh(_arg1:Trigger){
Room1Clear = false;
}
public function room19_round1(_arg1:Trigger){
room19_enemy1.activate();
room19_enemy2.activate();
room19_enemy3.activate();
room19_enemy4.activate();
}
public function r4Unlock(){
doorLock4.doorUnlocked();
}
public function openRoom2Doors(){
Room2Clear = true;
R2Lock1.doorUnlocked();
R2Lock2.doorUnlocked();
}
}
}//package com.midasplayer
Section 11
//Color (fl.motion.Color)
package fl.motion {
import flash.display.*;
import flash.geom.*;
public class Color extends ColorTransform {
private var _tintColor:Number;// = 0
private var _tintMultiplier:Number;// = 0
public function Color(_arg1:Number=1, _arg2:Number=1, _arg3:Number=1, _arg4:Number=1, _arg5:Number=0, _arg6:Number=0, _arg7:Number=0, _arg8:Number=0){
super(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8);
}
private function deriveTintColor():uint{
var _local1:Number = (1 / this.tintMultiplier);
var _local2:uint = Math.round((this.redOffset * _local1));
var _local3:uint = Math.round((this.greenOffset * _local1));
var _local4:uint = Math.round((this.blueOffset * _local1));
var _local5:uint = (((_local2 << 16) | (_local3 << 8)) | _local4);
return (_local5);
}
public function set brightness(_arg1:Number):void{
if (_arg1 > 1){
_arg1 = 1;
} else {
if (_arg1 < -1){
_arg1 = -1;
};
};
var _local2:Number = (1 - Math.abs(_arg1));
var _local3:Number = 0;
if (_arg1 > 0){
_local3 = (_arg1 * 0xFF);
};
this.redMultiplier = (this.greenMultiplier = (this.blueMultiplier = _local2));
this.redOffset = (this.greenOffset = (this.blueOffset = _local3));
}
private function parseXML(_arg1:XML=null):Color{
var _local3:XML;
var _local4:String;
var _local5:uint;
if (!_arg1){
return (this);
};
var _local2:XML = _arg1.elements()[0];
if (!_local2){
return (this);
};
for each (_local3 in _local2.attributes()) {
_local4 = _local3.localName();
if (_local4 == "tintColor"){
_local5 = (Number(_local3.toString()) as uint);
this.tintColor = _local5;
} else {
this[_local4] = Number(_local3.toString());
};
};
return (this);
}
public function get tintColor():uint{
return (this._tintColor);
}
public function set tintColor(_arg1:uint):void{
this.setTint(_arg1, this.tintMultiplier);
}
public function get brightness():Number{
return ((this.redOffset) ? (1 - this.redMultiplier) : (this.redMultiplier - 1));
}
public function set tintMultiplier(_arg1:Number):void{
this.setTint(this.tintColor, _arg1);
}
public function get tintMultiplier():Number{
return (this._tintMultiplier);
}
public function setTint(_arg1:uint, _arg2:Number):void{
this._tintColor = _arg1;
this._tintMultiplier = _arg2;
this.redMultiplier = (this.greenMultiplier = (this.blueMultiplier = (1 - _arg2)));
var _local3:uint = ((_arg1 >> 16) & 0xFF);
var _local4:uint = ((_arg1 >> 8) & 0xFF);
var _local5:uint = (_arg1 & 0xFF);
this.redOffset = Math.round((_local3 * _arg2));
this.greenOffset = Math.round((_local4 * _arg2));
this.blueOffset = Math.round((_local5 * _arg2));
}
public static function interpolateColor(_arg1:uint, _arg2:uint, _arg3:Number):uint{
var _local4:Number = (1 - _arg3);
var _local5:uint = ((_arg1 >> 24) & 0xFF);
var _local6:uint = ((_arg1 >> 16) & 0xFF);
var _local7:uint = ((_arg1 >> 8) & 0xFF);
var _local8:uint = (_arg1 & 0xFF);
var _local9:uint = ((_arg2 >> 24) & 0xFF);
var _local10:uint = ((_arg2 >> 16) & 0xFF);
var _local11:uint = ((_arg2 >> 8) & 0xFF);
var _local12:uint = (_arg2 & 0xFF);
var _local13:uint = ((_local5 * _local4) + (_local9 * _arg3));
var _local14:uint = ((_local6 * _local4) + (_local10 * _arg3));
var _local15:uint = ((_local7 * _local4) + (_local11 * _arg3));
var _local16:uint = ((_local8 * _local4) + (_local12 * _arg3));
var _local17:uint = ((((_local13 << 24) | (_local14 << 16)) | (_local15 << 8)) | _local16);
return (_local17);
}
public static function interpolateTransform(_arg1:ColorTransform, _arg2:ColorTransform, _arg3:Number):ColorTransform{
var _local4:Number = (1 - _arg3);
var _local5:ColorTransform = new ColorTransform(((_arg1.redMultiplier * _local4) + (_arg2.redMultiplier * _arg3)), ((_arg1.greenMultiplier * _local4) + (_arg2.greenMultiplier * _arg3)), ((_arg1.blueMultiplier * _local4) + (_arg2.blueMultiplier * _arg3)), ((_arg1.alphaMultiplier * _local4) + (_arg2.alphaMultiplier * _arg3)), ((_arg1.redOffset * _local4) + (_arg2.redOffset * _arg3)), ((_arg1.greenOffset * _local4) + (_arg2.greenOffset * _arg3)), ((_arg1.blueOffset * _local4) + (_arg2.blueOffset * _arg3)), ((_arg1.alphaOffset * _local4) + (_arg2.alphaOffset * _arg3)));
return (_local5);
}
public static function fromXML(_arg1:XML):Color{
return (Color(new (Color).parseXML(_arg1)));
}
}
}//package fl.motion
Section 12
//None (fl.transitions.easing.None)
package fl.transitions.easing {
public class None {
public static function easeOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return ((((_arg3 * _arg1) / _arg4) + _arg2));
}
public static function easeIn(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return ((((_arg3 * _arg1) / _arg4) + _arg2));
}
public static function easeInOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return ((((_arg3 * _arg1) / _arg4) + _arg2));
}
public static function easeNone(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return ((((_arg3 * _arg1) / _arg4) + _arg2));
}
}
}//package fl.transitions.easing
Section 13
//Tween (fl.transitions.Tween)
package fl.transitions {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
public class Tween extends EventDispatcher {
private var _position:Number;// = NAN
public var prevTime:Number;// = NAN
public var prevPos:Number;// = NAN
public var isPlaying:Boolean;// = false
private var _fps:Number;// = NAN
private var _time:Number;// = NAN
public var begin:Number;// = NAN
private var _finish:Number;// = NAN
public var change:Number;// = NAN
public var looping:Boolean;// = false
private var _intervalID:uint;// = 0
public var func:Function;
private var _timer:Timer;// = null
private var _startTime:Number;// = NAN
public var prop:String;// = ""
private var _duration:Number;// = NAN
public var obj:Object;// = null
public var useSeconds:Boolean;// = false
protected static var _mc:MovieClip = new MovieClip();
public function Tween(_arg1:Object, _arg2:String, _arg3:Function, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Boolean=false){
this.func = function (_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return ((((_arg3 * _arg1) / _arg4) + _arg2));
};
super();
if (!arguments.length){
return;
};
this.obj = _arg1;
this.prop = _arg2;
this.begin = _arg4;
this.position = _arg4;
this.duration = _arg6;
this.useSeconds = _arg7;
if ((_arg3 is Function)){
this.func = _arg3;
};
this.finish = _arg5;
this._timer = new Timer(100);
this.start();
}
public function continueTo(_arg1:Number, _arg2:Number):void{
this.begin = this.position;
this.finish = _arg1;
if (!isNaN(_arg2)){
this.duration = _arg2;
};
this.start();
}
protected function startEnterFrame():void{
var _local1:Number;
if (isNaN(this._fps)){
_mc.addEventListener(Event.ENTER_FRAME, this.onEnterFrame, false, 0, true);
} else {
_local1 = (1000 / this._fps);
this._timer.delay = _local1;
this._timer.addEventListener(TimerEvent.TIMER, this.timerHandler, false, 0, true);
this._timer.start();
};
this.isPlaying = true;
}
public function stop():void{
this.stopEnterFrame();
this.dispatchEvent(new TweenEvent(TweenEvent.MOTION_STOP, this._time, this._position));
}
private function fixTime():void{
if (this.useSeconds){
this._startTime = (getTimer() - (this._time * 1000));
};
}
public function set FPS(_arg1:Number):void{
var _local2:Boolean = this.isPlaying;
this.stopEnterFrame();
this._fps = _arg1;
if (_local2){
this.startEnterFrame();
};
}
public function get finish():Number{
return ((this.begin + this.change));
}
public function get duration():Number{
return (this._duration);
}
protected function stopEnterFrame():void{
if (isNaN(this._fps)){
_mc.removeEventListener(Event.ENTER_FRAME, this.onEnterFrame);
} else {
this._timer.stop();
};
this.isPlaying = false;
}
public function set time(_arg1:Number):void{
this.prevTime = this._time;
if (_arg1 > this.duration){
if (this.looping){
this.rewind((_arg1 - this._duration));
this.update();
this.dispatchEvent(new TweenEvent(TweenEvent.MOTION_LOOP, this._time, this._position));
} else {
if (this.useSeconds){
this._time = this._duration;
this.update();
};
this.stop();
this.dispatchEvent(new TweenEvent(TweenEvent.MOTION_FINISH, this._time, this._position));
};
} else {
if (_arg1 < 0){
this.rewind();
this.update();
} else {
this._time = _arg1;
this.update();
};
};
}
public function getPosition(_arg1:Number=NaN):Number{
if (isNaN(_arg1)){
_arg1 = this._time;
};
return (this.func(_arg1, this.begin, this.change, this._duration));
}
public function set finish(_arg1:Number):void{
this.change = (_arg1 - this.begin);
}
public function set duration(_arg1:Number):void{
this._duration = ((_arg1)<=0) ? Infinity : _arg1;
}
public function get position():Number{
return (this.getPosition(this._time));
}
public function setPosition(_arg1:Number):void{
this.prevPos = this._position;
if (this.prop.length){
this.obj[this.prop] = (this._position = _arg1);
};
this.dispatchEvent(new TweenEvent(TweenEvent.MOTION_CHANGE, this._time, this._position));
}
public function resume():void{
this.fixTime();
this.startEnterFrame();
this.dispatchEvent(new TweenEvent(TweenEvent.MOTION_RESUME, this._time, this._position));
}
public function fforward():void{
this.time = this._duration;
this.fixTime();
}
protected function onEnterFrame(_arg1:Event):void{
this.nextFrame();
}
public function yoyo():void{
this.continueTo(this.begin, this.time);
}
public function nextFrame():void{
if (this.useSeconds){
this.time = ((getTimer() - this._startTime) / 1000);
} else {
this.time = (this._time + 1);
};
}
protected function timerHandler(_arg1:TimerEvent):void{
this.nextFrame();
_arg1.updateAfterEvent();
}
public function get FPS():Number{
return (this._fps);
}
public function rewind(_arg1:Number=0):void{
this._time = _arg1;
this.fixTime();
this.update();
}
public function set position(_arg1:Number):void{
this.setPosition(_arg1);
}
public function get time():Number{
return (this._time);
}
private function update():void{
this.setPosition(this.getPosition(this._time));
}
public function start():void{
this.rewind();
this.startEnterFrame();
this.dispatchEvent(new TweenEvent(TweenEvent.MOTION_START, this._time, this._position));
}
public function prevFrame():void{
if (!this.useSeconds){
this.time = (this._time - 1);
};
}
}
}//package fl.transitions
Section 14
//TweenEvent (fl.transitions.TweenEvent)
package fl.transitions {
import flash.events.*;
public class TweenEvent extends Event {
public var position:Number;// = NAN
public var time:Number;// = NAN
public static const MOTION_START:String = "motionStart";
public static const MOTION_STOP:String = "motionStop";
public static const MOTION_LOOP:String = "motionLoop";
public static const MOTION_CHANGE:String = "motionChange";
public static const MOTION_FINISH:String = "motionFinish";
public static const MOTION_RESUME:String = "motionResume";
public function TweenEvent(_arg1:String, _arg2:Number, _arg3:Number, _arg4:Boolean=false, _arg5:Boolean=false){
super(_arg1, _arg4, _arg5);
this.time = _arg2;
this.position = _arg3;
}
override public function clone():Event{
return (new TweenEvent(this.type, this.time, this.position, this.bubbles, this.cancelable));
}
}
}//package fl.transitions
Section 15
//laserAnimation_90 (saturatePaxV02_fla.laserAnimation_90)
package saturatePaxV02_fla {
import flash.display.*;
public dynamic class laserAnimation_90 extends MovieClip {
public var lazCan1Anim:MovieClip;
public function laserAnimation_90(){
addFrameScript(69, frame70);
}
function frame70(){
this.stop();
}
}
}//package saturatePaxV02_fla
Section 16
//laserAnimation3_116 (saturatePaxV02_fla.laserAnimation3_116)
package saturatePaxV02_fla {
import flash.display.*;
public dynamic class laserAnimation3_116 extends MovieClip {
public var lazCan2Anim:MovieClip;
public function laserAnimation3_116(){
addFrameScript(69, frame70);
}
function frame70(){
this.stop();
}
}
}//package saturatePaxV02_fla
Section 17
//laserEnemyAnimation2_92 (saturatePaxV02_fla.laserEnemyAnimation2_92)
package saturatePaxV02_fla {
import flash.display.*;
public dynamic class laserEnemyAnimation2_92 extends MovieClip {
public function laserEnemyAnimation2_92(){
addFrameScript(39, frame40);
}
function frame40(){
stop();
}
}
}//package saturatePaxV02_fla
Section 18
//PauseMenu_32 (saturatePaxV02_fla.PauseMenu_32)
package saturatePaxV02_fla {
import flash.display.*;
public dynamic class PauseMenu_32 extends MovieClip {
public function PauseMenu_32(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package saturatePaxV02_fla
Section 19
//SaturateTextAnimation_7 (saturatePaxV02_fla.SaturateTextAnimation_7)
package saturatePaxV02_fla {
import flash.display.*;
public dynamic class SaturateTextAnimation_7 extends MovieClip {
public function SaturateTextAnimation_7(){
addFrameScript(9, frame10);
}
function frame10(){
stop();
}
}
}//package saturatePaxV02_fla
Section 20
//waitText_86 (saturatePaxV02_fla.waitText_86)
package saturatePaxV02_fla {
import flash.display.*;
public dynamic class waitText_86 extends MovieClip {
public var waitText:MovieClip;
public function waitText_86(){
addFrameScript(69, frame70);
}
function frame70(){
stop();
}
}
}//package saturatePaxV02_fla
Section 21
//BackgroundMusic (BackgroundMusic)
package {
import flash.media.*;
public class BackgroundMusic {
public static const bgm_Level10:uint = 7;
public static const bgm_Aaron:uint = 0;
public static const bgm_Off:uint = 100;
public static const bgm_Level1:uint = 1;
public static const bgm_Level2:uint = 2;
public static const bgm_Level3:uint = 3;
public static const bgm_Level4:uint = 4;
public static const bgm_Level6:uint = 6;
public static const bgm_Level5:uint = 5;
static var sL10:sndLvl10;
private static var sMusicArray:Array = new Array();
private static var mCurMusic:uint = 100;
static var sL4:sndLvl4;
static var sL6:sndLvl6;
static var sBossLFive:sndBossLFive;
static var sL2:sndLvl2;
static var sL3:sndLvl3;
private static var mBgmChannel:SoundChannel;
static var sAaronBgm:sndBGMLevel0;
private static var mInitialized:Boolean = false;
static var sL1:sndLvl1;
public static function setMusic(_arg1:uint){
if (mCurMusic != bgm_Off){
mBgmChannel.stop();
};
mBgmChannel = Sound(sMusicArray[_arg1]).play(0, int.MAX_VALUE);
mCurMusic = _arg1;
}
public static function initialize(){
if (mInitialized){
return;
};
sAaronBgm = new sndBGMLevel0();
sBossLFive = new sndBossLFive();
sL1 = new sndLvl1();
sL2 = new sndLvl2();
sL3 = new sndLvl3();
sL4 = new sndLvl4();
sL6 = new sndLvl6();
sL10 = new sndLvl10();
sMusicArray.push(sAaronBgm);
sMusicArray.push(sL1);
sMusicArray.push(sL2);
sMusicArray.push(sL3);
sMusicArray.push(sL4);
sMusicArray.push(sBossLFive);
sMusicArray.push(sL6);
sMusicArray.push(sL10);
mCurMusic = bgm_Off;
mInitialized = true;
}
}
}//package
Section 22
//BubbleBoss (BubbleBoss)
package {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import fl.motion.*;
public class BubbleBoss extends Enemy {
public var ring1:MovieClip;
public var ring3:MovieClip;
public var ring5:MovieClip;
public var ring7:MovieClip;
public var ring2:MovieClip;
public var ring4:MovieClip;
public var ring6:MovieClip;
var mStage:uint;// = 1
var mFlashingAlphaValue:Number;// = 1
var mFlashingArray:Array;
var mRingArray:Array;
var mSwitchRotation:Number;// = 0
var mChildSwitch:Switch;
var mCurState:BubbleBossState;// = null
var mRemainingColor:Array;
var mRadius:Number;// = 110
public var lArm1:MovieClip;
public var lArm2:MovieClip;
public var rArm1:MovieClip;
public var rArm2:MovieClip;
var mFlashingInc:Number;// = -0.05
var mSpawnMarker:SystemMovieClip;// = null
var mDestination:SystemMovieClip;// = null
var mExposed:Boolean;// = false
private static const cNumLayers = 7;
private static const cExposedRadius = 95;
private static const cChildDistance = 110;
private static const cUnexposedRadius = 110;
public static var sStartState:BubbleBossState = null;
public static var sRechargeState:BubbleBossState = null;
public static var sRunState:BubbleBossState = null;
private static var sRingColorTransform:Color = new Color();
public static var sChaseState:BubbleBossState = null;
public function BubbleBoss(){
mRemainingColor = new Array();
mRingArray = new Array();
mFlashingArray = new Array();
mChildSwitch = new Switch();
super();
if (!sChaseState){
sChaseState = new BubbleBossChaseState();
sRunState = new BubbleBossRunState();
sRechargeState = new BubbleBossRechargingState();
};
BubbleBossState.sEnemiesAvailableToSpawn = 5;
mRingArray.push(ring7);
mRingArray.push(ring6);
mRingArray.push(ring5);
mRingArray.push(ring4);
mRingArray.push(ring3);
mRingArray.push(ring2);
mRingArray.push(ring1);
mRemainingColor.push(GameColor.brown);
mRemainingColor.push(GameColor.purple);
mRemainingColor.push(GameColor.green);
mRemainingColor.push(GameColor.orange);
mRemainingColor.push(GameColor.blue);
mRemainingColor.push(GameColor.red);
mRemainingColor.push(GameColor.yellow);
updateRingColors();
mChildSwitch.addObserver(removeColorRing);
mSpawnMarker = new FloorSwitchButton();
mSpawnMarker.visible = false;
}
override public function getRadius():Number{
return (mRadius);
}
public function clearDestination(){
mDestination = null;
mVelocity.x = 0;
mVelocity.y = 0;
}
override public function withdrawStage(_arg1:Stage){
super.withdrawStage(_arg1);
Game.framelistener.removeEventListener(FrameListener.BEGIN_FRAME, updateSwitchAnimation);
Game.framelistener.removeEventListener(FrameListener.BEGIN_FRAME, flashingAnimation);
_arg1.removeChild(mSpawnMarker);
}
public function removeColorRing(_arg1:Switch){
mRemainingColor.pop();
if (mRemainingColor.length > 0){
mFlashingArray.push(mRingArray[((cNumLayers - mRemainingColor.length) - 1)]);
updateRingColors();
unexposeTargetSwitch();
updateDifficulty();
setState(sStartState);
} else {
if (mCurState){
mCurState.onStop(this);
};
mCurState = null;
destroy();
};
}
public function fireSpray(){
}
public function exposeTargetSwitch(){
ring1.alpha = 0;
mChildSwitch.fadeIn();
mExposed = true;
}
override public function getKnockback():Number{
return ((50 + (getVelocity().length * 6)));
}
override public function matchColorFloor(){
if (!mExposed){
exposeTargetSwitch();
setState(sRunState);
};
}
public function updateSwitchAnimation(_arg1:Event){
var _local2:Number;
var _local3:Point;
var _local4:Point;
if (mExposed){
_local2 = 0.1;
mSwitchRotation = (mSwitchRotation + _local2);
_local3 = new Point();
_local3.x = (cChildDistance * Math.cos(mSwitchRotation));
_local3.y = (cChildDistance * Math.sin(mSwitchRotation));
_local4 = getAbsPos().add(_local3);
mChildSwitch.setAbsPos(_local4);
} else {
mChildSwitch.setAbsPos(getAbsPos());
};
}
override public function hitColor(_arg1:uint, _arg2:Boolean){
}
public function fireGun(){
}
override public function getEnemyType():uint{
return (ai_BubbleBoss);
}
override public function updateEnemyAI(_arg1:Event){
var _local2:Point;
var _local3:Point;
var _local4:Point;
var _local5:Number;
if (!isActive()){
return;
};
if (mCurState){
mCurState.update(this);
};
if (mDestination){
_local2 = mDestination.getAbsPos();
_local3 = getAbsPos();
_local4 = _local2.subtract(_local3);
_local4.normalize(1);
mVelocity = new Point((_local4.x * mSpeed), (_local4.y * mSpeed));
_local5 = Math.atan2(_local4.y, _local4.x);
this.rotation = ((_local5 * (180 / Math.PI)) - 90);
};
}
override public function applyStage(_arg1:Stage){
super.applyStage(_arg1);
Game.framelistener.addEventListener(FrameListener.BEGIN_FRAME, updateSwitchAnimation);
Game.framelistener.addEventListener(FrameListener.BEGIN_FRAME, flashingAnimation);
_arg1.addChild(mSpawnMarker);
mSpawnMarker.setAbsPos(getAbsPos());
}
public function flashingAnimation(_arg1:Event){
if ((((((mFlashingAlphaValue <= 0.05)) && ((mFlashingInc < 0)))) || ((((mFlashingAlphaValue >= 0.95)) && ((mFlashingInc > 0)))))){
mFlashingInc = (mFlashingInc * -1);
};
mFlashingAlphaValue = (mFlashingAlphaValue + mFlashingInc);
var _local2:uint;
while (_local2 < mFlashingArray.length) {
DisplayObject(mFlashingArray[_local2]).alpha = mFlashingAlphaValue;
_local2++;
};
}
public function setDestination(_arg1:SystemMovieClip){
mDestination = _arg1;
}
public function setState(_arg1:BubbleBossState){
if (mCurState){
mCurState.onStop(this);
};
mCurState = _arg1;
mCurState.onStart(this);
}
override public function setGraphicsColor(_arg1:uint){
}
private function updateDifficulty(){
var _local1:uint = (8 - mRemainingColor.length);
switch (_local1){
case 1:
sChaseState.setFireRate(45);
sRunState.setFireRate(45);
sRechargeState.setFireRate(45);
sChaseState.setSpawnRate(0);
sRunState.setSpawnRate(0);
sRechargeState.setSpawnRate(0);
sChaseState.setSpawnClr(GameColor.white);
sRunState.setSpawnClr(GameColor.white);
sRechargeState.setSpawnClr(GameColor.white);
break;
case 2:
sChaseState.setSpawnRate(90);
sRunState.setSpawnRate(90);
sRechargeState.setSpawnRate(90);
mSpeed = (mSpeed * 1.2);
break;
case 3:
mSpeed = (mSpeed * 1.2);
break;
case 4:
sChaseState.setSpawnClr(GameColor.yellow);
sRunState.setSpawnClr(GameColor.red);
sRechargeState.setSpawnClr(GameColor.yellow);
break;
case 5:
sChaseState.setSpawnClr(GameColor.blue);
sRunState.setSpawnClr(GameColor.yellow);
sRechargeState.setSpawnClr(GameColor.white);
break;
case 6:
sChaseState.setSpawnClr(GameColor.red);
sRunState.setSpawnClr(GameColor.blue);
sRechargeState.setSpawnClr(GameColor.white);
break;
case 7:
sChaseState.setSpawnClr(GameColor.orange);
sRunState.setSpawnClr(GameColor.red);
sRechargeState.setSpawnClr(GameColor.white);
break;
};
}
override public function getDamage():Number{
return ((1 / 2));
}
public function unexposeTargetSwitch(){
ring1.alpha = 1;
mChildSwitch.fadeOut();
mExposed = false;
}
public function fireEnemy(){
}
public function getSpawnMarker():SystemMovieClip{
return (mSpawnMarker);
}
private function updateRingColors(){
var _local1:int;
var _local2:int = (cNumLayers - mRemainingColor.length);
_local1 = 0;
while (_local1 < mRemainingColor.length) {
setObjColor(mRingArray[(_local1 + _local2)], mRemainingColor[_local1]);
_local1++;
};
_local1 = 0;
while (_local1 < _local2) {
setObjColor(mRingArray[_local1], GameColor.white);
_local1++;
};
var _local3:uint = mRemainingColor[(mRemainingColor.length - 1)];
setObjColor(lArm1, _local3);
setObjColor(lArm2, _local3);
setObjColor(rArm1, _local3);
setObjColor(rArm2, _local3);
mChildSwitch.reset();
mChildSwitch.setGoal(_local3);
setColor(_local3);
}
override public function activate(){
if (mActive){
return;
};
super.activate();
sStartState = sChaseState;
updateDifficulty();
setState(sStartState);
}
override protected function deathAnimation(){
Sounds.EnemyDeath();
setColor(GameColor.white);
var _local1:* = new ExplodeField(this, 100);
_local1.applyStage(this.stage);
}
private static function setObjColor(_arg1:DisplayObject, _arg2:uint){
var _local3:uint = GameColor.getRgb(_arg2);
sRingColorTransform.setTint(_local3, 1);
_arg1.transform.colorTransform = sRingColorTransform;
}
}
}//package
Section 23
//BubbleBossChaseState (BubbleBossChaseState)
package {
public class BubbleBossChaseState extends BubbleBossState {
override public function onStop(_arg1:BubbleBoss){
super.onStop(_arg1);
_arg1.clearDestination();
}
override public function update(_arg1:BubbleBoss){
super.update(_arg1);
}
override public function onStart(_arg1:BubbleBoss){
super.onStart(_arg1);
var _local2:PlayerShip = Game.getInstance().getPlayer();
_arg1.setDestination(_local2);
}
}
}//package
Section 24
//BubbleBossRechargingState (BubbleBossRechargingState)
package {
public class BubbleBossRechargingState extends BubbleBossState {
override public function onStop(_arg1:BubbleBoss){
super.onStop(_arg1);
}
override public function update(_arg1:BubbleBoss){
super.update(_arg1);
_arg1.ring1.alpha = (_arg1.ring1.alpha + 0.02);
if (_arg1.ring1.alpha >= 1){
_arg1.unexposeTargetSwitch();
_arg1.setState(BubbleBoss.sStartState);
};
}
override public function onStart(_arg1:BubbleBoss){
super.onStart(_arg1);
}
}
}//package
Section 25
//BubbleBossRunState (BubbleBossRunState)
package {
import flash.geom.*;
public class BubbleBossRunState extends BubbleBossState {
var mSpawnMarker:SystemMovieClip;// = null
override public function update(_arg1:BubbleBoss){
super.update(_arg1);
var _local2:Point = mSpawnMarker.getAbsPos().subtract(_arg1.getAbsPos());
if (_local2.length < _arg1.getSpeed()){
Game.getInstance().getGlobalFloor().transitionColorTo(GameColor.black);
_arg1.setState(BubbleBoss.sRechargeState);
};
}
override public function onStart(_arg1:BubbleBoss){
super.onStart(_arg1);
mSpawnMarker = _arg1.getSpawnMarker();
_arg1.setDestination(mSpawnMarker);
}
override public function onStop(_arg1:BubbleBoss){
super.onStop(_arg1);
_arg1.clearDestination();
}
}
}//package
Section 26
//BubbleBossState (BubbleBossState)
package {
import flash.geom.*;
public class BubbleBossState {
var mFireRate:uint;// = 0
var mPlayer:PlayerShip;// = null
var mFrameCount:uint;// = 0
var mSpawnRate:uint;// = 0
var mSpawnClr:uint;
static var sEnemiesAvailableToSpawn:uint = 5;
public function BubbleBossState(){
mSpawnClr = GameColor.white;
super();
}
public function onStop(_arg1:BubbleBoss){
mPlayer = null;
}
public function update(_arg1:BubbleBoss){
var _local2:Point;
var _local3:Number;
var _local4:ChaserEnemy;
mFrameCount++;
if ((mFrameCount % mFireRate) == 0){
_local2 = mPlayer.getAbsPos().subtract(_arg1.getAbsPos());
_local3 = ((180 / Math.PI) * Math.atan2(_local2.y, _local2.x));
_arg1.fireWeapon(_local3);
};
if (((((mFrameCount % mSpawnRate) == 0)) && ((sEnemiesAvailableToSpawn > 0)))){
_local4 = new ChaserEnemy();
_local4.setAbsPos(_arg1.getAbsPos());
_local4.setSpeed((PlayerShip.defaultVelocity / 2));
_local4.setColor(mSpawnClr);
_local4.activate();
_local4.addDeathObserver(BubbleBossState.spawnDeath);
sEnemiesAvailableToSpawn--;
};
}
public function onStart(_arg1:BubbleBoss){
mPlayer = Game.getInstance().getPlayer();
mFrameCount = 0;
}
public function setSpawnClr(_arg1:uint){
mSpawnClr = _arg1;
}
public function setFireRate(_arg1:uint){
mFireRate = _arg1;
}
public function setSpawnRate(_arg1:uint){
mSpawnRate = _arg1;
}
public static function spawnDeath(_arg1:Enemy){
sEnemiesAvailableToSpawn++;
}
}
}//package
Section 27
//Bullet (Bullet)
package {
public class Bullet extends BulletBase {
public static const cRadius:Number = 7;
public function Bullet(_arg1:uint, _arg2:Number=30){
super(GameObject.type_Bullet, _arg1, _arg2);
}
override public function getRadius():Number{
return (cRadius);
}
public function isCharged():Boolean{
return (false);
}
}
}//package
Section 28
//BulletBase (BulletBase)
package {
import flash.events.*;
import flash.display.*;
public class BulletBase extends GameObject {
var mVelocityMag:Number;// = 30
var mFrameCount:int;// = 0
public static const cDefaultBulletTimeout:Number = 30;
public function BulletBase(_arg1:uint, _arg2:uint, _arg3:Number=30){
super(_arg1);
setColor(_arg2);
mVelocityMag = _arg3;
mFrameCount = this.getTimeout();
}
public function setTrajectoryAngle(_arg1:Number){
var _local2:Number = (_arg1 * (Math.PI / 180));
mVelocity.x = (mVelocityMag * Math.cos(_local2));
mVelocity.y = (mVelocityMag * Math.sin(_local2));
}
public function getTimeout():int{
return (cDefaultBulletTimeout);
}
override public function applyStage(_arg1:Stage){
super.applyStage(_arg1);
Game.framelistener.addEventListener(FrameListener.BEGIN_FRAME, this.checkTimeout);
}
override public function withdrawStage(_arg1:Stage){
super.withdrawStage(_arg1);
Game.framelistener.removeEventListener(FrameListener.BEGIN_FRAME, this.checkTimeout);
}
override public function setGraphicsColor(_arg1:uint){
setTint(_arg1);
}
public function checkTimeout(_arg1:Event){
if (mDead){
return;
};
if (mFrameCount <= 0){
destroy();
} else {
mFrameCount--;
};
}
public function bulletExplosion(){
var _local1:BulletField = new BulletField(this, 3);
_local1.applyStage(Game.getInstance().mStage);
}
override public function hitWall(){
Sounds.bulletHitWall();
this.bulletExplosion();
destroy();
}
}
}//package
Section 29
//BulletField (BulletField)
package {
import flash.events.*;
import flash.display.*;
public class BulletField extends MovieClip {
var mParticleExpl:ParticleExpl;// = null
var mEndFunction:Function;// = null
public function BulletField(_arg1:GameObject, _arg2:uint=10){
mParticleExpl = new ParticleExpl(Twinkle, _arg1, _arg2);
}
public function applyStage(_arg1:Stage){
Game.framelistener.addEventListener(FrameListener.BEGIN_FRAME, updateParticles);
mParticleExpl.applyStage(_arg1);
}
public function setEndFunction(_arg1:Function){
mEndFunction = _arg1;
}
public function withdrawStage(_arg1:Stage){
Game.framelistener.removeEventListener(FrameListener.BEGIN_FRAME, updateParticles);
mParticleExpl.withdrawStage(_arg1);
}
public function updateParticles(_arg1:Event){
mParticleExpl.update();
if (!mParticleExpl.isStillActive()){
withdrawStage(Game.getInstance().getStage());
if (mEndFunction != null){
mEndFunction();
};
};
}
}
}//package
Section 30
//CameraBox (CameraBox)
package {
import flash.display.*;
import flash.geom.*;
public class CameraBox extends SystemMovieClip {
var mId:uint;// = 0
var mParalaxObjs:Array;
var mDim:Point;
var mSceneObservers:Array;
public function CameraBox(){
mParalaxObjs = new Array();
mDim = new Point();
mSceneObservers = new Array();
super();
mId = SystemMovieClip.getNewId();
Game.getInstance().addCameraBox(this);
var _local1:DisplayObject = this.getChildAt(0);
_local1.alpha = 0;
visible = false;
mDim.x = width;
mDim.y = height;
addParalax(0.7);
}
private function notifySceneObservers(_arg1:Boolean){
var _local2:int;
while (_local2 < mSceneObservers.length) {
var _local3 = mSceneObservers;
_local3[_local2](_arg1, this);
_local2++;
};
}
public function addParalax(_arg1:Number, _arg2:DisplayObject=null):Boolean{
var _local4:Boolean;
var _local5:Boolean;
var _local6:Point;
var _local7:Point;
var _local8:Number;
var _local9:Number;
var _local10:Point;
var _local3:Point = new Point(scaleX, scaleY);
if (_arg2 == null){
_local4 = ((550 * _local3.x) > MyCamera.getInstance().getWidth());
_local5 = ((400 * _local3.y) > MyCamera.getInstance().getHeight());
_local6 = new Point(550, 400);
_local7 = new Point(MyCamera.getInstance().getWidth(), MyCamera.getInstance().getHeight());
_local8 = (_local6.x - ((1 - _arg1) * (_local6.x - _local7.x)));
_local9 = (_local6.y - ((1 - _arg1) * (_local6.y - _local7.y)));
_local10 = new Point(_local8, _local9);
_arg2 = new ParticleParalax(StarMan, _local10, _local3, _arg1);
} else {
_arg2.scaleX = (_arg2.scaleX / _local3.x);
_arg2.scaleY = (_arg2.scaleY / _local3.y);
_arg2.x = 0;
_arg2.y = 0;
};
mParalaxObjs.push(_arg2);
addChild(_arg2);
return (true);
}
public function updateParalax(_arg1:Number, _arg2:Number){
var _local3:int;
while (_local3 < mParalaxObjs.length) {
Paralax(mParalaxObjs[_local3]).onCameraMove(_arg1, _arg2);
_local3++;
};
}
public function updateParticles(){
}
public function getBoxMax():Point{
var _local1:Point = getAbsPos();
_local1.x = (_local1.x + (mDim.x / 2));
_local1.y = (_local1.y + (mDim.y / 2));
return (_local1);
}
public function readId():uint{
return (mId);
}
public function deactivate(){
visible = false;
notifySceneObservers(false);
var _local1:int;
while (_local1 < mParalaxObjs.length) {
mParalaxObjs[_local1].x = 0;
mParalaxObjs[_local1].y = 0;
_local1++;
};
}
public function addSceneObserver(_arg1:Function){
mSceneObservers.push(_arg1);
}
public function activate(){
visible = true;
notifySceneObservers(true);
}
public function getBoxMin():Point{
var _local1:Point = getAbsPos();
_local1.x = (_local1.x - (mDim.x / 2));
_local1.y = (_local1.y - (mDim.y / 2));
return (_local1);
}
}
}//package
Section 31
//ChangeWeaponsText (ChangeWeaponsText)
package {
public dynamic class ChangeWeaponsText extends HintText {
}
}//package
Section 32
//ChargeBullet (ChargeBullet)
package {
public class ChargeBullet extends Bullet {
public function ChargeBullet(_arg1:uint){
super(_arg1);
}
override public function bulletExplosion(){
var _local1:BulletField = new BulletField(this, 20);
_local1.applyStage(Game.getInstance().mStage);
}
override public function isCharged():Boolean{
return (true);
}
}
}//package
Section 33
//ChargeIndicator (ChargeIndicator)
package {
public class ChargeIndicator extends SystemMovieClip {
public function ChargeRing(){
}
}
}//package
Section 34
//ChargeRing (ChargeRing)
package {
public class ChargeRing extends SystemMovieClip {
}
}//package
Section 35
//ChargeText (ChargeText)
package {
public dynamic class ChargeText extends HintText {
}
}//package
Section 36
//ChaserEnemy (ChaserEnemy)
package {
import flash.events.*;
import flash.geom.*;
public class ChaserEnemy extends Enemy {
override public function getRadius():Number{
return (18);
}
override public function getEnemyType():uint{
return (ai_Chase);
}
override public function updateEnemyAI(_arg1:Event){
var _local2:Point;
var _local3:PlayerShip;
var _local4:Point;
var _local5:Point;
var _local6:Number;
var _local7:Number;
var _local8:Number;
if (isActive()){
_local2 = getAbsPos();
_local3 = Game.getInstance().getPlayer();
if (!_local3){
return;
};
_local4 = _local3.getAbsPos();
_local5 = _local4.subtract(_local2);
_local6 = _local5.length;
_local7 = (mSpeed / _local6);
mVelocity = new Point((_local5.x * _local7), (_local5.y * _local7));
_local8 = Math.atan2(_local5.y, _local5.x);
this.rotation = ((_local8 * (180 / Math.PI)) + 90);
};
}
}
}//package
Section 37
//Checkpoint (Checkpoint)
package {
public class Checkpoint extends GameObject {
public var checkTrig:Trigger;
public var doorLock:DoorLock;
var mId:uint;// = 0
public static const sVisible = true;
public function Checkpoint(){
super(GameObject.type_Checkpoint);
visible = sVisible;
mId = SystemMovieClip.getNewId();
GameObject.reconfigureAsChild(this, doorLock);
doorLock.updateRotation();
GameObject.reconfigureAsChild(this, checkTrig);
checkTrig.addTriggerFunction(onCheckTrigger);
checkTrig.setMode(Trigger.mode_OneTimeOnly);
}
public function getTrig():Trigger{
return (checkTrig);
}
public function onCheckTrigger(_arg1:Trigger){
var _local2:CheckText;
Game.getInstance().setCheckpoint(this);
doorLock.doorLocked();
_local2 = new CheckText();
MyCamera.getInstance().addToHud(_local2, false);
_local2.x = 100;
_local2.y = 100;
}
public function readId():uint{
return (mId);
}
}
}//package
Section 38
//CheckpointMomento (CheckpointMomento)
package {
import flash.geom.*;
public class CheckpointMomento {
private var mPlayerChargeAbility;// = 0
private var mActive:Boolean;// = false
private var mCameraId:uint;// = 0
private var mCheckpointId:uint;// = 0
private var mBgColor:uint;// = 10
public function isActive():Boolean{
return (mActive);
}
public function deactivate(){
mActive = false;
}
public function grabSnapshot(_arg1:Checkpoint){
mCheckpointId = _arg1.readId();
mCameraId = MyCamera.getInstance().getCameraBox().readId();
var _local2:ColorFloor = Game.getInstance().getGlobalFloor();
mBgColor = _local2.getColor();
mPlayerChargeAbility = Game.getInstance().getPlayer().getChargePower();
mActive = true;
}
public function jumpToSnapshot(){
var _local1:CameraBox = Game.getInstance().findCamera(mCameraId);
MyCamera.getInstance().setCameraBox(_local1);
var _local2:Checkpoint = Game.getInstance().findCheckpoint(mCheckpointId);
var _local3:Point = _local2.getAbsPos();
var _local4:PlayerShip = Game.getInstance().getPlayer();
_local4.addChargePower(mPlayerChargeAbility);
_local4.x = _local3.x;
_local4.y = _local3.y;
_local4.endKnockback();
_local4.heal();
var _local5:ColorFloor = Game.getInstance().getGlobalFloor();
if (_local5){
_local5.setColor(mBgColor);
};
}
}
}//package
Section 39
//CheckText (CheckText)
package {
import flash.display.*;
public class CheckText extends MovieClip {
public function CheckText(){
addFrameScript(89, frame90);
}
function frame90(){
stop();
}
}
}//package
Section 40
//ColorField (ColorField)
package {
import flash.events.*;
import flash.display.*;
public class ColorField extends GameObject {
var isActive:Boolean;
var mParticleStream:ParticleStream;
public function ColorField(){
isActive = new Boolean(false);
mParticleStream = new ParticleStream(FieldBubble, 150, 60, 20, 0.005);
addFrameScript(0, frame1);
super(GameObject.type_ColorField);
addChild(mParticleStream);
grabTintAsColor();
}
override public function withdrawStage(_arg1:Stage){
super.withdrawStage(_arg1);
Game.framelistener.removeEventListener(FrameListener.BEGIN_FRAME, updateParticles);
}
override public function setGraphicsColor(_arg1:uint){
setTint(_arg1);
}
public function updateParticles(_arg1:Event){
if (Game.getInstance().getGlobalFloor().mNotifiedColor == this.mColor){
return;
};
mParticleStream.update();
}
function frame1(){
stop();
}
public function newFloorColor(_arg1:uint){
if (_arg1 == getColor()){
fadeOut();
} else {
fadeIn();
};
}
override public function applyStage(_arg1:Stage){
super.applyStage(_arg1);
Game.framelistener.addEventListener(FrameListener.BEGIN_FRAME, updateParticles);
}
}
}//package
Section 41
//ColorFloor (ColorFloor)
package {
public class ColorFloor extends GameObject {
var mGeneralObservers:Array;
var mFields:Array;
var mWalls:Array;
var mNotifiedColor:uint;// = 0
public function ColorFloor(){
mWalls = new Array();
mFields = new Array();
mGeneralObservers = new Array();
super(GameObject.type_ColorFloor);
mNotifiedColor = mColor;
}
override public function setColor(_arg1:uint){
super.setColor(_arg1);
notifyListeners(_arg1);
}
override public function transitionColorTo(_arg1:uint, _arg2:uint=10){
var _local3:uint = GameColor.cUndefined;
if (mTransition){
_local3 = mTransition.getGoalColor();
};
super.transitionColorTo(_arg1, _arg2);
if (_local3 != _arg1){
notifyListeners(_arg1);
Sounds.changeBGColour();
};
}
public function addWall(_arg1:ColorWall){
mWalls.push(_arg1);
_arg1.newFloorColor(mColor);
}
public function notifyListeners(_arg1:uint){
var _local2:uint;
if (mNotifiedColor != _arg1){
_local2 = 0;
while (_local2 < mWalls.length) {
ColorWall(mWalls[_local2]).newFloorColor(_arg1);
_local2++;
};
_local2 = 0;
while (_local2 < mFields.length) {
ColorField(mFields[_local2]).newFloorColor(_arg1);
_local2++;
};
_local2 = 0;
while (_local2 < mGeneralObservers.length) {
var _local3 = mGeneralObservers;
_local3[_local2](_arg1);
_local2++;
};
};
mNotifiedColor = _arg1;
}
public function addObserver(_arg1:Function){
mGeneralObservers.push(_arg1);
}
public function addField(_arg1:ColorField){
mFields.push(_arg1);
_arg1.newFloorColor(mColor);
}
override public function getRgbColor(_arg1:uint){
return (GameColor.getBackgroundRgb(_arg1));
}
override public function setGraphicsColor(_arg1:uint){
setTint(_arg1);
}
}
}//package
Section 42
//ColorFloorPatch (ColorFloorPatch)
package {
public class ColorFloorPatch extends ColorFloor {
}
}//package
Section 43
//ColorTransition (ColorTransition)
package {
public class ColorTransition {
const mNumSteps:uint = 25;
const mGreenMask:uint = 0xFF00;
const mRedMask:uint = 0xFF0000;
const mBlueMask:uint = 0xFF;
public var mNext:ColorTransition;// = null
var mCurStep:uint;// = 0
var mNewColor:uint;// = 0
var mObj:GameObject;// = null
var mDelay:uint;// = 0
var mStartRgb:uint;// = 0
var mEndRgb:uint;// = 0
public function ColorTransition(_arg1:GameObject, _arg2:uint, _arg3:uint, _arg4:uint){
mObj = _arg1;
mStartRgb = _arg1.getRgbColor(_arg2);
mEndRgb = _arg1.getRgbColor(_arg3);
mNewColor = _arg3;
mDelay = _arg4;
}
public function stepTransition(){
if (mDelay > 0){
mDelay--;
return;
};
mCurStep++;
var _local1:* = ((calclateNewColor(mRedMask) | calclateNewColor(mGreenMask)) | calclateNewColor(mBlueMask));
mObj.setGraphicsColor(_local1);
if (isDone()){
mObj.setColor(mNewColor);
mObj.completeTransition();
};
}
public function isDone():Boolean{
return ((mCurStep >= mNumSteps));
}
public function calclateNewColor(_arg1:uint):uint{
var _local2:uint;
var _local3:uint;
var _local4:*;
var _local5:*;
_local2 = (mStartRgb & _arg1);
_local3 = (mEndRgb & _arg1);
_local4 = ((_local3 - _local2) * (mCurStep / mNumSteps));
_local5 = round(_local4, _arg1);
var _local6:uint = (_local2 + _local5);
return (_local6);
}
public function restart(_arg1:uint){
mCurStep = 0;
mDelay = _arg1;
}
public function setNewGoalColor(_arg1:uint){
mStartRgb = ((calclateNewColor(mRedMask) | calclateNewColor(mGreenMask)) | calclateNewColor(mBlueMask));
mEndRgb = mObj.getRgbColor(_arg1);
mNewColor = _arg1;
mDelay = 5;
mCurStep = 0;
}
public function round(_arg1:uint, _arg2:uint):uint{
var _local3:uint;
var _local4:uint;
if (_arg2 == mBlueMask){
return (_arg1);
};
_local3 = (_arg2 >> 8);
_local4 = (_local3 & _arg1);
(_local4 << 1);
_local4 = (_local4 & _arg2);
return (((_arg1 & _arg2) + _local4));
}
public function getGoalColor():uint{
return (mNewColor);
}
public function setNewStartColor(_arg1:uint, _arg2:uint){
mStartRgb = mObj.getRgbColor(_arg1);
mDelay = _arg2;
mCurStep = 0;
}
}
}//package
Section 44
//ColorWall (ColorWall)
package {
import flash.events.*;
import flash.geom.*;
public class ColorWall extends WallBase {
var mActive:Boolean;// = true
var mPerpendicular:Point;
public function ColorWall(){
mPerpendicular = new Point();
super(GameObject.type_ColorWall);
var _local1:Number = (this.rotation * (Math.PI / 180));
mPerpendicular.x = Math.cos(_local1);
mPerpendicular.y = Math.sin(_local1);
grabTintAsColor();
}
override public function getFirstPoint():Point{
return (this.getAbsPos().add(calculateNewPoint(0, -50)));
}
override public function fadeAnimation(_arg1:Event){
var _local2:Boolean = this.isWallActive();
super.fadeAnimation(_arg1);
var _local3:Boolean = this.isWallActive();
if (((_local3) && (!(_local2)))){
checkForPlayerCollision();
};
}
override public function getRgbColor(_arg1:uint){
return (GameColor.getRgb(_arg1));
}
override public function getSecondPoint(_arg1:Point):Point{
return (_arg1.add(calculateNewPoint(0, 100)));
}
private function checkForPlayerCollision(){
var _local2:Point;
var _local3:Number;
var _local1:PlayerShip = Game.getInstance().getPlayer();
if (Physics.isColliding(_local1.getShipImage(), this)){
_local2 = _local1.getAbsPos().subtract(this.getAbsPos());
_local3 = ((_local2.x * mPerpendicular.x) + (_local2.y * mPerpendicular.y));
if (_local3 < 0){
mPerpendicular.x = (mPerpendicular.x * -1);
mPerpendicular.y = (mPerpendicular.y * -1);
};
_local1.knockback(mPerpendicular, 70, 1.7);
};
}
override public function setGraphicsColor(_arg1:uint){
setTint(_arg1);
}
public function newFloorColor(_arg1:uint){
if (_arg1 == getColor()){
fadeOut();
} else {
fadeIn();
};
}
public function isWallActive():Boolean{
return (Boolean((alpha > 0.2)));
}
}
}//package
Section 45
//ColorWheel (ColorWheel)
package {
import flash.display.*;
import flash.geom.*;
public class ColorWheel extends MovieClip {
private const ROTATION_ANGLE_IN_DEGREES:Number = 120;
private static const refRadius:Number = 40;
private static const bluePoint:Point = new Point(-112.7, 59.6);
private static const yellowPoint:Point = new Point(112.7, 59.6);
private static const redPoint:Point = new Point(0, -128);
public function hitColorRef(_arg1:Number, _arg2:Number){
var _local3:Point = new Point((_arg1 - x), (_arg2 - y));
if (_local3.subtract(redPoint).length < refRadius){
return (GameColor.red);
};
if (_local3.subtract(bluePoint).length < refRadius){
return (GameColor.blue);
};
if (_local3.subtract(yellowPoint).length < refRadius){
return (GameColor.yellow);
};
return (GameColor.white);
}
public function rotatePrev(){
this.rotation = (this.rotation - ROTATION_ANGLE_IN_DEGREES);
}
public function rotateNext(){
this.rotation = (this.rotation + ROTATION_ANGLE_IN_DEGREES);
}
}
}//package
Section 46
//CrossHair (CrossHair)
package {
import flash.events.*;
import flash.display.*;
import fl.motion.*;
import flash.ui.*;
public class CrossHair extends MovieClip {
var crossColor:Color;
var mGoalColor:uint;// = 7
public function CrossHair(_arg1:Stage){
crossColor = new Color();
super();
Mouse.hide();
this.applyStage(_arg1);
}
public function applyStage(_arg1:Stage){
_arg1.addChild(this);
Game.framelistener.addEventListener(FrameListener.BEGIN_FRAME, enterFrameHandler);
}
public function setColor(_arg1:uint){
var _local2:Color = new Color();
_local2.setTint(_arg1, 0.5);
this.transform.colorTransform = _local2;
}
public function withdrawStage(_arg1:Stage){
_arg1.removeChild(this);
Game.framelistener.removeEventListener(FrameListener.BEGIN_FRAME, enterFrameHandler);
}
function enterFrameHandler(_arg1:Event):void{
x = Game.getInstance().mStage.mouseX;
y = Game.getInstance().mStage.mouseY;
}
}
}//package
Section 47
//DodgerEnemy (DodgerEnemy)
package {
import flash.events.*;
import flash.geom.*;
public class DodgerEnemy extends Enemy {
private var MINIMUM_PLAYER_DISTANCE:Number;// = 200
private var framecounter:Number;// = 0
private var playerAngle:Number;// = 0
private var MAX_TOLERANCE:Number;// = 3
private var SHOT_ANGLE_TOLERANCE:Number;// = 1
private var shotInterval:Number;
public function DodgerEnemy(){
shotInterval = (24 * Physics.randRange(2, 5));
super();
}
public function increaseShotTolerance():void{
if ((((this.SHOT_ANGLE_TOLERANCE < this.MAX_TOLERANCE)) && ((this.SHOT_ANGLE_TOLERANCE >= 0)))){
SHOT_ANGLE_TOLERANCE++;
return;
};
if (this.SHOT_ANGLE_TOLERANCE > this.MAX_TOLERANCE){
this.SHOT_ANGLE_TOLERANCE = this.MAX_TOLERANCE;
return;
};
if (this.SHOT_ANGLE_TOLERANCE < 0){
this.SHOT_ANGLE_TOLERANCE = Math.sqrt((this.SHOT_ANGLE_TOLERANCE * this.SHOT_ANGLE_TOLERANCE));
} else {
trace("WARNING: Attempted to increase shot tolerance above max value, or undefined behaviour");
};
}
override public function updateEnemyAI(_arg1:Event){
var _local2:Number;
if (isActive()){
_local2 = this.calculatePlayerDistance();
trace(((_local2 + " ") + this.MINIMUM_PLAYER_DISTANCE));
trace((this.calculatePlayerDistance() > MINIMUM_PLAYER_DISTANCE));
if (_local2 > MINIMUM_PLAYER_DISTANCE){
this.move();
} else {
mVelocity.x = 1;
mVelocity.y = 1;
};
};
}
override public function getEnemyType():uint{
return (ai_Dodger);
}
private function move():void{
var _local1:Point = this.getAbsPos();
var _local2:Point = Game.getInstance().getPlayer().getAbsPos();
var _local3:Point = _local2.subtract(_local1);
var _local4:Number = _local3.length;
var _local5:Number = (mSpeed / _local4);
mVelocity.x = (_local3.x * _local5);
mVelocity.y = (_local3.y * _local5);
var _local6:Number = Math.atan2(_local3.y, _local3.x);
this.rotation = ((_local6 * (180 / Math.PI)) + 90);
}
public function decreaseShotTolerance():void{
if ((((this.SHOT_ANGLE_TOLERANCE <= this.MAX_TOLERANCE)) && ((this.SHOT_ANGLE_TOLERANCE > 0)))){
this.SHOT_ANGLE_TOLERANCE--;
return;
};
if (this.SHOT_ANGLE_TOLERANCE == 0){
return;
};
trace(("WARNING: Attempted to decrease shot tolerance below 0 degree angle, or undefined behaviour" + this));
}
}
}//package
Section 48
//Door (Door)
package {
import flash.geom.*;
public class Door extends WallBase {
var mSwitchTotalCount:uint;// = 0
var mSwitchOnCount:uint;// = 0
var mOpen:Boolean;// = false
private static const sVisible = true;
public function Door(){
super(GameObject.type_Door);
visible = sVisible;
}
public function switchChanged(_arg1:Switch){
if (_arg1.isOn()){
mSwitchOnCount++;
if (mSwitchOnCount >= mSwitchTotalCount){
openDoor();
};
} else {
mSwitchOnCount--;
if (mSwitchOnCount <= mSwitchTotalCount){
closeDoor();
};
};
}
public function closeDoor(){
mOpen = false;
if (sVisible){
visible = true;
};
}
override public function getSecondPoint(_arg1:Point):Point{
return (_arg1.add(calculateNewPoint(0, 140)));
}
public function isOpen():Boolean{
return (mOpen);
}
public function addSwitch(_arg1:Switch){
_arg1.addObserver(this.switchChanged);
mSwitchTotalCount++;
var _local2:uint = getRgbColor(_arg1.getGoal());
setTint(_local2);
}
public function isClosed():Boolean{
return (!(mOpen));
}
override public function getFirstPoint():Point{
return (this.getAbsPos().add(calculateNewPoint(10.5, -63)));
}
public function openDoor(){
mOpen = true;
if (sVisible){
fadeOut(7);
};
Sounds.openDoor();
}
}
}//package
Section 49
//DoorLock (DoorLock)
package {
import flash.display.*;
import flash.geom.*;
public class DoorLock extends Door {
public var doorLockPad:MovieClip;
public function DoorLock(){
this.visible = false;
mOpen = true;
doorLockPad.rotation = -(this.rotation);
}
public function setRotation(_arg1:Number){
this.rotation = _arg1;
doorLockPad.rotation = -(_arg1);
}
public function doorUnlocked(){
mOpen = true;
this.visible = false;
}
override public function getFirstPoint():Point{
return (this.getAbsPos().add(calculateNewPoint(-72.15, 0)));
}
public function updateRotation(){
doorLockPad.rotation = -(this.rotation);
}
public function doorLocked(){
mOpen = false;
this.visible = true;
}
override public function getSecondPoint(_arg1:Point):Point{
return (_arg1.add(calculateNewPoint(144.3, 0)));
}
}
}//package
Section 50
//doorLong (doorLong)
package {
public dynamic class doorLong extends Door {
}
}//package
Section 51
//EndFade (EndFade)
package {
import flash.display.*;
public class EndFade extends MovieClip {
public function EndFade(){
addFrameScript(0, frame1, 129, frame130, 150, frame151);
}
function frame151(){
stop();
}
function frame130(){
stop();
}
function frame1(){
stop();
}
}
}//package
Section 52
//EndGameSubmitScore (EndGameSubmitScore)
package {
public dynamic class EndGameSubmitScore extends SubmitScoreButton {
}
}//package
Section 53
//EndParticle (EndParticle)
package {
import flash.events.*;
import flash.display.*;
public class EndParticle extends SystemMovieClip {
var mEndParticle:EndParticleField;
public function EndParticle(){
mEndParticle = new EndParticleField(MenuStarGuy, 10);
super();
addChild(mEndParticle);
}
override public function applyStage(_arg1:Stage){
super.applyStage(_arg1);
this.stage.addEventListener(FrameListener.BEGIN_FRAME, updateParticles);
}
public function addEvent(){
this.stage.addEventListener(Event.ENTER_FRAME, updateParticles);
}
override public function withdrawStage(_arg1:Stage){
super.withdrawStage(_arg1);
this.stage.removeEventListener(FrameListener.BEGIN_FRAME, updateParticles);
}
public function updateParticles(_arg1:Event){
mEndParticle.update();
}
}
}//package
Section 54
//EndParticleField (EndParticleField)
package {
import flash.display.*;
import fl.motion.*;
public class EndParticleField extends MovieClip {
var mParticles:Array;
var mMinVelocity:Number;// = 0
var mNumParticles:uint;// = 0
var mParticleClass:Class;
var mMaxVelocity:Number;// = 0
var mColorTransform:Color;
var mWidth:Number;// = 0
var mHeight:Number;// = 0
public function EndParticleField(_arg1:Class, _arg2:uint){
var _local4:ExplodeParticle;
mParticles = new Array();
mColorTransform = new Color();
super();
mParticleClass = _arg1;
mNumParticles = _arg2;
mMinVelocity = -4;
mMaxVelocity = 4;
x = 0;
y = 0;
var _local3:uint;
while (_local3 < mNumParticles) {
_local4 = new ExplodeParticle(mParticleClass, this, 0, 0);
mParticles.push(_local4);
startParticle(_local4);
_local3++;
};
}
public function withdrawStage(_arg1:Stage){
if (this.parent){
_arg1.removeChild(this);
};
}
public function update(){
var _local1:uint;
while (_local1 < mNumParticles) {
mParticles[_local1].update();
_local1++;
};
}
public function isStillActive():Boolean{
return ((mParticles[0].clip.alpha > 0));
}
public function applyStage(_arg1:Stage){
_arg1.addChild(this);
}
private function startParticle(_arg1:ExplodeParticle){
_arg1.clip.alpha = 0.5;
_arg1.clip.scaleX = 1;
_arg1.clip.scaleY = 1;
_arg1.fade = ((Math.random() * (0.005 - 0.001)) + 0.001);
_arg1.shrink = ((Math.random() * (1 - 0.98)) + 0.98);
_arg1.xVel = Physics.randRange(mMinVelocity, mMaxVelocity);
_arg1.yVel = Physics.randRange(mMinVelocity, mMaxVelocity);
_arg1.drag = 0.98;
_arg1.spin = ((Math.random() * (15 - 5)) + 5);
}
}
}//package
Section 55
//EndParticleSpawner (EndParticleSpawner)
package {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
public class EndParticleSpawner extends MovieClip {
var explosionX:Number;// = 0
var explosionY:Number;// = 0
var myTimer:Timer;
public function EndParticleSpawner(){
myTimer = new Timer(1000);
super();
startTimer();
}
public function startTimer(){
myTimer.addEventListener(TimerEvent.TIMER, timedExplosion);
myTimer.start();
}
public function timedExplosion(_arg1:TimerEvent){
var _local2:EndParticle;
explosionX = (Math.random() * 700);
explosionY = (Math.random() * 500);
_local2 = new EndParticle();
addChild(_local2);
_local2.x = explosionX;
_local2.y = explosionY;
_local2.addEvent();
}
}
}//package
Section 56
//Enemy (Enemy)
package {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
public class Enemy extends GameObject {
var mActive:Boolean;// = false
var mDeathObservers:Array;// = null
protected var mSpeed:Number;// = 0
var mSheild:EnemySheild;// = null
public static const ai_LaserSection:uint = 11;
public static const ai_Linear:uint = 3;
public static const cEnemyHoldColorLength = 75;
public static const ai_Spike:uint = 9;
public static const ai_Dodger:uint = 6;
public static const ai_Shooter:uint = 5;
public static const ai_Undefined:uint = 0;
public static const ai_LaserCannonCap:uint = 12;
public static const ai_BubbleBoss:uint = 7;
public static const ai_Dragon:uint = 10;
public static const ai_Chase:uint = 2;
public static const ai_LaserCannon:uint = 8;
public static const ai_Path:uint = 1;
public static const ai_Fixed:uint = 4;
public static var sMotionless = false;
public function Enemy(){
super(GameObject.type_Enemy);
mSpeed = calcDefaultSpeed(getEnemyType());
}
public function dropSheild(){
mSheild = null;
}
override public function destroy(){
var _local1:Function;
if (mDead){
return;
};
mDead = true;
mActive = false;
if (mDeathObservers){
_local1 = null;
while (mDeathObservers.length > 0) {
_local1 = mDeathObservers.pop();
_local1(this);
};
};
mDead = false;
this.deathAnimation();
super.destroy();
}
public function spawn(){
var _local1:EnemySpawn = new EnemySpawn();
Game.getInstance().getMiscBin().addChild(_local1);
_local1.setAbsPos(getAbsPos());
_local1.setEnemy(this);
_local1.start();
}
public function calculatePlayerDistance():Number{
var _local1:Number = Physics.calculateDistance(this.getAbsPos(), Game.getInstance().getPlayer().getAbsPos());
return (_local1);
}
public function setSpeed(_arg1:Number){
mSpeed = _arg1;
}
public function getPlayerLocationAngle():Number{
var _local1:Number;
var _local2:Point = Game.getInstance().getPlayer().getAbsPos();
var _local3:Point = getAbsPos();
var _local4:Point = _local2.subtract(_local3);
var _local5:Number = Math.atan2(_local4.y, _local4.x);
_local1 = (_local5 * (180 / Math.PI));
return (_local1);
}
public function getKnockbackDir(_arg1:Point):Point{
return (_arg1.subtract(getAbsPos()));
}
public function addDeathObserver(_arg1:Function){
if (!mDeathObservers){
mDeathObservers = new Array();
};
mDeathObservers.push(_arg1);
}
public function getKnockback():Number{
return (Math.max((getVelocity().length * 6), 20));
}
public function matchColorFloor(){
destroy();
}
public function isActive():Boolean{
return (mActive);
}
public function getSpeed():Number{
return (mSpeed);
}
override public function withdrawStage(_arg1:Stage){
super.withdrawStage(_arg1);
_arg1.removeEventListener(Event.ENTER_FRAME, this.updateEnemyAI);
}
override public function hitColor(_arg1:uint, _arg2:Boolean){
if (mSheild){
mSheild.hit(_arg2);
return;
};
if (!(mColor & _arg1)){
addColorAndRevertWithTransition(_arg1, cEnemyHoldColorLength);
};
}
override public function updateMovement(_arg1:Event){
if (!sMotionless){
super.updateMovement(_arg1);
};
}
override public function setGraphicsColor(_arg1:uint){
setTint(_arg1);
}
public function getDamage():Number{
return (0.25);
}
public function updateEnemyAI(_arg1:Event){
}
public function getEnemyType():uint{
return (ai_Undefined);
}
override public function applyStage(_arg1:Stage){
super.applyStage(_arg1);
_arg1.addEventListener(Event.ENTER_FRAME, this.updateEnemyAI);
}
public function addSheild(){
mSheild = new EnemySheild(this);
}
public function activate(){
mActive = true;
}
public function deactivate(){
mActive = false;
}
protected function deathAnimation(){
Sounds.EnemyDeath();
var _local1:* = new ExplodeField(this, 10, 7);
_local1.applyStage(this.stage);
}
public function fireWeapon(_arg1:int){
if (!isActive()){
return;
};
var _local2:EnemyBullet = new EnemyBullet(mColor);
var _local3:Point = Point.polar((getRadius() + EnemyBullet.cRadius), (_arg1 * (Math.PI / 180)));
_local2.setAbsPos(getAbsPos().add(_local3));
_local2.setTrajectoryAngle(_arg1);
}
public static function calcDefaultSheild(_arg1:uint):Boolean{
return (false);
}
public static function calcDefaultSpeed(_arg1:uint):Number{
var _local2:Number = 0;
switch (_arg1){
case Enemy.ai_Chase:
case Enemy.ai_Shooter:
_local2 = (PlayerShip.defaultVelocity * 0.25);
break;
case Enemy.ai_Path:
case Enemy.ai_LaserCannon:
_local2 = 3;
break;
case ai_BubbleBoss:
_local2 = (PlayerShip.defaultVelocity * 0.125);
break;
case ai_Dodger:
_local2 = (PlayerShip.defaultVelocity * 0.25);
break;
default:
break;
};
return (_local2);
}
}
}//package
Section 57
//EnemyBullet (EnemyBullet)
package {
public class EnemyBullet extends BulletBase {
public static const cRadius = 10;
public function EnemyBullet(_arg1:uint, _arg2:Number=10){
super(GameObject.type_EnemyBullet, _arg1, _arg2);
}
override public function getTimeout():int{
return ((int((1400 / mVelocityMag)) + 1));
}
}
}//package
Section 58
//EnemyDeathAnimation (EnemyDeathAnimation)
package {
import flash.display.*;
public dynamic class EnemyDeathAnimation extends MovieClip {
public function EnemyDeathAnimation(){
addFrameScript(29, frame30);
}
function frame30(){
stop();
}
}
}//package
Section 59
//EnemyDeathEvent (EnemyDeathEvent)
package {
public class EnemyDeathEvent {
var triggerFunction:Function;// = null
var enemCount:uint;// = 0
public function setTriggerFunction(_arg1:Function){
triggerFunction = _arg1;
}
public function addEnemy(_arg1:Enemy){
enemCount++;
_arg1.addDeathObserver(enemyDeath);
}
public function enemyDeath(_arg1:Enemy){
enemCount--;
if (enemCount == 0){
triggerFunction();
};
}
public function EnemyDeathTrigger(){
}
}
}//package
Section 60
//EnemyParameters (EnemyParameters)
package {
public class EnemyParameters {
var mBaseColor:uint;
var mType:uint;
var mSpeed:Number;// = 0
var mSheild:Boolean;// = false
public static const useDefualtSpeed = -1;
public function EnemyParameters(_arg1:uint, _arg2:uint=0, _arg3:Number=-1){
mType = Enemy.ai_Undefined;
mBaseColor = GameColor.cUndefined;
super();
mType = _arg1;
if (_arg3 == useDefualtSpeed){
mSpeed = Enemy.calcDefaultSpeed(mType);
} else {
mSpeed = _arg3;
};
mSheild = Enemy.calcDefaultSheild(mType);
mBaseColor = _arg2;
}
public function hasSheild():Boolean{
return (mSheild);
}
public function createEnemy():Enemy{
var _local1:Enemy;
switch (mType){
case Enemy.ai_Path:
_local1 = new PathEnemy();
break;
case Enemy.ai_Fixed:
_local1 = new FixedEnemy();
break;
case Enemy.ai_Shooter:
_local1 = new ShooterEnemy();
break;
case Enemy.ai_Dodger:
_local1 = new DodgerEnemy();
break;
case Enemy.ai_Chase:
default:
_local1 = new ChaserEnemy();
break;
};
_local1.setColor(mBaseColor);
_local1.setSpeed(mSpeed);
if (mSheild){
_local1.addSheild();
};
return (_local1);
}
public function addSheild(){
mSheild = true;
}
public function setSheild(_arg1:Boolean){
mSheild = _arg1;
}
public function removeSheild(){
mSheild = false;
}
}
}//package
Section 61
//EnemyPath (EnemyPath)
package {
public class EnemyPath extends GameObject {
public static const sVisible = false;
public function EnemyPath(){
super(GameObject.type_EnemyPath);
visible = sVisible;
}
}
}//package
Section 62
//EnemyPathFollowerBase (EnemyPathFollowerBase)
package {
import flash.geom.*;
public class EnemyPathFollowerBase extends Enemy {
var mMaxPoint:Point;// = null
var mToMin:Boolean;// = true
var mMinPoint:Point;// = null
var mPath:EnemyPath;// = null
static var prevMag:Number = 0;
private function calculateVelocity(_arg1:Point, _arg2:Point):Point{
var _local3:Point;
var _local4:Number;
_local3 = _arg2.subtract(_arg1);
_local4 = Math.sqrt(((_local3.x * _local3.x) + (_local3.y * _local3.y)));
var _local5:Number = (mSpeed / _local4);
return (new Point((_local3.x * _local5), (_local3.y * _local5)));
}
public function setPath(_arg1:EnemyPath){
mPath = _arg1;
CalculateMinMaxPoints();
}
private function isClose(_arg1:Point, _arg2:Point):Boolean{
var _local3:Point;
_local3 = _arg1.subtract(_arg2);
var _local4:Number = Math.sqrt(((_local3.x * _local3.x) + (_local3.y * _local3.y)));
if (prevMag != _local4){
prevMag = _local4;
};
return ((_local4 < mSpeed));
}
protected function updateMovementAlongPath(){
if (!hasPath()){
return;
};
var _local1:Point = getAbsPos();
var _local2:Point;
if (mPath.getAbsPos() != mMinPoint){
CalculateMinMaxPoints();
};
if (mToMin){
_local2 = mMinPoint;
} else {
_local2 = mMaxPoint;
};
if (isClose(_local1, _local2)){
reverseDirection();
} else {
mVelocity = calculateVelocity(_local1, _local2);
};
}
private function CalculateMinMaxPoints(){
mMinPoint = mPath.getAbsPos();
var _local1:Point = new Point(mPath.width, mPath.height);
mMaxPoint = mMinPoint.add(_local1);
}
public function reverseDirection(){
mToMin = !(mToMin);
}
public function hasPath():Boolean{
return (!((mMinPoint == null)));
}
}
}//package
Section 63
//EnemyRoom (EnemyRoom)
package {
public class EnemyRoom {
var mEndFunction:Function;// = null
var mWaves:Array;
var mCurWave:int;// = -1
var mScene:CameraBox;// = null
public function EnemyRoom(_arg1:CameraBox){
mWaves = new Array();
super();
_arg1.addSceneObserver(onSceneChange);
}
public function addWave(_arg1:EnemyWave){
mWaves.push(_arg1);
}
public function activate(){
mCurWave = 0;
if (mWaves.length > 0){
EnemyWave(mWaves[mCurWave]).activate();
};
}
public function viewLastWave():EnemyWave{
return (EnemyWave(mWaves[(mWaves.length - 1)]));
}
public function waveFinished(){
EnemyWave(mWaves[mCurWave]).deactivate();
mCurWave++;
if (mCurWave < mWaves.length){
EnemyWave(mWaves[mCurWave]).activate();
} else {
if (mEndFunction != null){
mEndFunction();
};
mCurWave = -1;
};
}
public function isActive():Boolean{
return ((mCurWave >= 0));
}
public function setEndFunction(_arg1:Function){
mEndFunction = _arg1;
}
public function deactivate(){
if (mCurWave != -1){
EnemyWave(mWaves[mCurWave]).deactivate();
};
mCurWave = -1;
}
public function onSceneChange(_arg1:Boolean, _arg2:CameraBox){
if (_arg1){
activate();
} else {
deactivate();
};
}
}
}//package
Section 64
//EnemyRoomWriter (EnemyRoomWriter)
package {
public class EnemyRoomWriter {
var mEnemyRoom:EnemyRoom;// = null
var mCurWave:EnemyWave;// = null
public function EnemyRoomWriter(_arg1:EnemyRoom){
mEnemyRoom = _arg1;
}
public function startNewWaveWithCopyOfPrevious(){
mCurWave = mEnemyRoom.viewLastWave().copy();
}
public function removeSpawnSet(_arg1:SpawnSet){
mCurWave.removeSpawnSet(_arg1);
}
public function endWave(){
mEnemyRoom.addWave(mCurWave);
mCurWave = null;
}
public function startNewWave(){
mCurWave = new EnemyWave(mEnemyRoom);
}
public function addSpawnSet(_arg1:SpawnSet){
mCurWave.addSpawnSet(_arg1);
}
public function addNewSpawnSet(_arg1:SpawnPoint, _arg2:EnemyParameters, _arg3:int){
var _local4:SpawnSet = new SpawnSet(_arg1, _arg2, _arg3);
mCurWave.addSpawnSet(_local4);
}
public function setWaveEndFunction(_arg1:Function){
mCurWave.setEndFunction(_arg1);
}
}
}//package
Section 65
//EnemySheild (EnemySheild)
package {
public class EnemySheild extends SystemMovieClip {
var mParentEnemy:Enemy;// = null
public static const decAlpha = 0.1;
public static const startAlpha = 0.4;
public function EnemySheild(_arg1:Enemy){
x = 0;
y = 0;
var _local2:Number = (2 * (_arg1.getRadius() + 2));
var _local3:Number = (_local2 / width);
scaleX = _local3;
scaleY = _local3;
mParentEnemy = _arg1;
this.alpha = startAlpha;
_arg1.addChild(this);
}
public function hit(_arg1:Boolean){
this.alpha = (this.alpha - decAlpha);
if (this.alpha <= 0.1){
mParentEnemy.dropSheild();
mParentEnemy.removeChild(this);
mParentEnemy = null;
delete ??getglobalscope
[this];
};
}
}
}//package
Section 66
//EnemySpawn (EnemySpawn)
package {
import flash.events.*;
import fl.motion.*;
public class EnemySpawn extends SystemMovieClip {
var mColorTransform:Color;
var mEnemy:Enemy;// = null
public function EnemySpawn(){
mColorTransform = new Color();
super();
stop();
}
public function checkUpdate(_arg1:Event){
if (this.currentFrame == (this.totalFrames - 7)){
mEnemy.fadeIn();
};
if (this.currentFrame == this.totalFrames){
stop();
mEnemy.activate();
Game.framelistener.removeEventListener(FrameListener.BEGIN_FRAME, checkUpdate);
this.parent.removeChild(this);
};
}
public function start(){
gotoAndPlay(2);
Game.framelistener.addEventListener(FrameListener.BEGIN_FRAME, checkUpdate);
}
public function setEnemy(_arg1:Enemy){
mEnemy = _arg1;
mColorTransform.setTint(_arg1.getRgbColor(_arg1.getColor()), 1);
this.transform.colorTransform = mColorTransform;
var _local2:Number = ((_arg1.getRadius() + 6) / 20);
scaleX = _local2;
scaleY = _local2;
_arg1.alpha = 0;
}
}
}//package
Section 67
//EnemyWave (EnemyWave)
package {
public class EnemyWave {
var mSpawnSetsLeft:int;// = -1
var mSpawnPointList:Array;
var mSpawnList:Array;
var mEndFunction:Function;
var mParentRoom:EnemyRoom;// = null
public function EnemyWave(_arg1:EnemyRoom){
mSpawnList = new Array();
mSpawnPointList = new Array();
super();
mParentRoom = _arg1;
}
public function addSpawnSet(_arg1:SpawnSet){
mSpawnList.push(_arg1);
addSpawnPoint(_arg1.mSpawnPoint);
}
public function removeSpawnSet(_arg1:SpawnSet){
trace("remove spawn set: not implemented");
}
public function setEndFunction(_arg1:Function){
mEndFunction = _arg1;
}
public function deactivate(){
mSpawnSetsLeft = -1;
}
public function copy():EnemyWave{
var _local1:EnemyWave = new EnemyWave(mParentRoom);
var _local2:uint;
while (_local2 < mSpawnList.length) {
_local1.addSpawnSet(mSpawnList[_local2]);
_local2++;
};
return (_local1);
}
private function addSpawnPoint(_arg1:SpawnPoint){
var _local2:Boolean;
var _local3:uint;
while (_local3 < mSpawnPointList.length) {
if (mSpawnPointList[_local3] == _arg1){
_local3 = mSpawnPointList.length;
_local2 = true;
};
_local3++;
};
if (!_local2){
mSpawnPointList.push(_arg1);
};
}
public function spawnSetFinished(_arg1:SpawnPoint){
mSpawnSetsLeft--;
_arg1.deactivate();
if (mSpawnSetsLeft == 0){
if (mEndFunction != null){
mEndFunction();
};
mParentRoom.waveFinished();
deactivate();
};
}
public function activate(){
mSpawnList.reverse();
var _local1:SpawnSet;
var _local2:uint;
while (_local2 < mSpawnList.length) {
_local1 = SpawnSet(mSpawnList[_local2]);
_local1.mSpawnPoint.addSet(_local1.mEnemyParams, _local1.mMultiplicity);
_local2++;
};
var _local3:SpawnPoint;
_local2 = 0;
while (_local2 < mSpawnPointList.length) {
_local3 = SpawnPoint(mSpawnPointList[_local2]);
_local3.setParent(this);
_local3.activate();
_local2++;
};
mSpawnSetsLeft = mSpawnPointList.length;
}
}
}//package
Section 68
//ExplodeField (ExplodeField)
package {
import flash.events.*;
import flash.display.*;
public class ExplodeField extends MovieClip {
var mParticleExpl:ParticleExpl;// = null
var mEndFunction:Function;// = null
var mImg:SystemMovieClip;// = null
var mDelay:uint;// = 0
public function ExplodeField(_arg1:GameObject, _arg2:uint=10, _arg3:uint=0){
var _local4:DisplayObject;
super();
mParticleExpl = new ParticleExpl(Sparks, _arg1, _arg2);
mDelay = _arg3;
if (mDelay > 0){
mParticleExpl.visible = false;
_local4 = _arg1.getChildAt(0);
if (_local4){
mImg = new SystemMovieClip();
mImg.addChild(_local4);
mImg.setAbsPos(_arg1.getAbsPos());
mImg.transform.colorTransform = _arg1.transform.colorTransform;
mImg.rotation = _arg1.rotation;
};
};
}
public function updateParticles(_arg1:Event){
if (mDelay == 1){
mParticleExpl.visible = true;
mImg.visible = false;
};
if (mDelay > 0){
mDelay--;
if (mImg){
mImg.scaleX = (mImg.scaleX * 1.05);
mImg.scaleY = (mImg.scaleY * 1.05);
};
return;
};
mParticleExpl.update();
if (!mParticleExpl.isStillActive()){
withdrawStage(Game.getInstance().getStage());
if (mEndFunction != null){
mEndFunction();
};
};
}
public function applyStage(_arg1:Stage){
Game.framelistener.addEventListener(FrameListener.BEGIN_FRAME, updateParticles);
mParticleExpl.applyStage(_arg1);
if (mImg){
_arg1.addChild(mImg);
};
}
public function setEndFunction(_arg1:Function){
mEndFunction = _arg1;
}
public function withdrawStage(_arg1:Stage){
Game.framelistener.removeEventListener(FrameListener.BEGIN_FRAME, updateParticles);
mParticleExpl.withdrawStage(_arg1);
if (mImg){
_arg1.removeChild(mImg);
};
mImg = null;
}
}
}//package
Section 69
//ExplodeParticle (ExplodeParticle)
package {
import flash.display.*;
public class ExplodeParticle {
public var spin:Number;// = 0
public var yVel:Number;// = 0.5
public var xVel:Number;// = 0.5
public var shrink:Number;// = 1
public var clip:DisplayObject;
public var drag:Number;// = 1
public var fade:Number;// = 0
public function ExplodeParticle(_arg1:Class, _arg2:DisplayObjectContainer, _arg3:Number, _arg4:Number){
if (_arg1){
clip = new (_arg1);
_arg2.addChild(clip);
clip.x = _arg3;
clip.y = _arg4;
};
}
public function update():void{
clip.x = (clip.x + xVel);
clip.y = (clip.y + yVel);
xVel = (xVel * drag);
yVel = (yVel * drag);
clip.scaleX = (clip.scaleX * shrink);
clip.scaleY = (clip.scaleY * shrink);
clip.alpha = (clip.alpha - fade);
clip.rotation = (clip.rotation + spin);
}
public function destroy():void{
clip.parent.removeChild(clip);
}
public function setVel(_arg1:Number, _arg2:Number):void{
xVel = _arg1;
yVel = _arg2;
}
}
}//package
Section 70
//FacebookButton (FacebookButton)
package {
import flash.events.*;
import com.midasplayer.*;
public class FacebookButton extends KingButton {
override public function onClick(_arg1:MouseEvent){
KingAPI.openKingPage("facebook", "/game/saturated");
}
}
}//package
Section 71
//ferryBlue (ferryBlue)
package {
import flash.display.*;
public dynamic class ferryBlue extends MovieClip {
public function ferryBlue(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 72
//ferryGreen (ferryGreen)
package {
import flash.display.*;
public dynamic class ferryGreen extends MovieClip {
public function ferryGreen(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 73
//ferryRed (ferryRed)
package {
import flash.display.*;
public dynamic class ferryRed extends MovieClip {
public function ferryRed(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 74
//FieldBubble (FieldBubble)
package {
import flash.display.*;
public class FieldBubble extends MovieClip {
}
}//package
Section 75
//Filter (Filter)
package {
import flash.display.*;
public class Filter extends MovieClip {
}
}//package
Section 76
//FixedEnemy (FixedEnemy)
package {
import flash.events.*;
import flash.geom.*;
public class FixedEnemy extends Enemy {
private var framecounter:Number;// = 0
private var prevColor:uint;// = 0
private var playerAngle:Number;// = 0
private var MAX_TOLERANCE:Number;// = 3
private var SHOT_ANGLE_TOLERANCE:Number;// = 1
private var shotInterval:Number;
public function FixedEnemy(){
shotInterval = (24 * Physics.randRange(3, 10));
super();
shotInterval = (24 * Physics.randRange(3, 10));
}
public function fireLaserCannon(_arg1:Number):void{
var _local2:Point = Game.getInstance().getPlayer().getAbsPos();
}
override public function addColor(_arg1:uint){
prevColor = getColor();
super.addColor(_arg1);
}
override public function updateEnemyAI(_arg1:Event){
var _local2:*;
if (isActive()){
playerAngle = this.getPlayerLocationAngle();
_local2 = Physics.randRange((playerAngle - SHOT_ANGLE_TOLERANCE), (this.playerAngle + SHOT_ANGLE_TOLERANCE));
framecounter++;
if (this.framecounter >= shotInterval){
framecounter = 0;
shotInterval = (24 * Physics.randRange(2, 5));
this.fireWeapon(_local2);
};
};
}
override public function getRadius():Number{
return (36);
}
override public function getEnemyType():uint{
return (ai_Fixed);
}
public function increaseShotTolerance():void{
if ((((this.SHOT_ANGLE_TOLERANCE < this.MAX_TOLERANCE)) && ((this.SHOT_ANGLE_TOLERANCE >= 0)))){
this.SHOT_ANGLE_TOLERANCE++;
return;
};
if (this.SHOT_ANGLE_TOLERANCE > this.MAX_TOLERANCE){
this.SHOT_ANGLE_TOLERANCE = this.MAX_TOLERANCE;
return;
};
if (this.SHOT_ANGLE_TOLERANCE < 0){
this.SHOT_ANGLE_TOLERANCE = Math.sqrt((this.SHOT_ANGLE_TOLERANCE * this.SHOT_ANGLE_TOLERANCE));
} else {
trace("WARNING: Attempted to increase shot tolerance above max value, or undefined behaviour");
};
}
public function decreaseShotTolerance():void{
if ((((this.SHOT_ANGLE_TOLERANCE <= this.MAX_TOLERANCE)) && ((this.SHOT_ANGLE_TOLERANCE > 0)))){
this.SHOT_ANGLE_TOLERANCE--;
return;
};
if (this.SHOT_ANGLE_TOLERANCE == 0){
return;
};
trace(("WARNING: Attempted to decrease shot tolerance below 0 degree angle, or undefined behaviour" + this));
}
override public function destroy(){
var _local1:* = Physics.randRange((getPlayerLocationAngle() - SHOT_ANGLE_TOLERANCE), (getPlayerLocationAngle() + SHOT_ANGLE_TOLERANCE));
var _local2:uint = getColor();
setColor(prevColor);
this.fireWeapon(_local1);
this.fireWeapon((_local1 + 45));
this.fireWeapon(((_local1 + 45) + 45));
this.fireWeapon((((_local1 + 45) + 45) + 45));
this.fireWeapon((((_local1 - 45) - 45) - 45));
this.fireWeapon(((_local1 - 45) - 45));
this.fireWeapon((_local1 - 45));
setColor(_local2);
super.destroy();
}
}
}//package
Section 77
//FloorSwitch (FloorSwitch)
package {
import flash.display.*;
public class FloorSwitch extends GameObject {
var mTargetFloor:ColorFloor;// = null
var mGoalColor:uint;// = 0
var mOn:Boolean;// = false
var mButton:SystemMovieClip;// = null
public function FloorSwitch(){
super(GameObject.type_FloorSwitch);
var _local1:uint = grabTintAndReturnAsColor();
if (_local1 != GameColor.cUndefined){
setGoalColor(_local1);
mButton = new FloorSwitchButton();
mButton.setTint(GameColor.getRgb(_local1));
setTint(0, 0);
};
}
override public function fadeIn(_arg1:uint=0){
super.fadeIn(_arg1);
mButton.fadeIn(_arg1);
}
public function setFloor(_arg1:ColorFloor){
mTargetFloor = _arg1;
_arg1.addObserver(this.newFloorColor);
}
override public function getRgbColor(_arg1:uint){
return (GameColor.getRgb(_arg1));
}
override public function hitColor(_arg1:uint, _arg2:Boolean){
if (!_arg2){
Sounds.switchNoEffect();
return;
};
if ((_arg1 & mGoalColor)){
if (!(_arg1 & getColor())){
addColor(_arg1);
};
} else {
Sounds.switchNoEffect();
};
}
public function hasFloor():Boolean{
return (!((mTargetFloor == null)));
}
override public function withdrawStage(_arg1:Stage){
super.withdrawStage(_arg1);
if (mButton != null){
_arg1.removeChild(mButton);
};
}
public function setGoalColor(_arg1:uint){
mGoalColor = _arg1;
}
override public function setGraphicsColor(_arg1:uint){
setTint(_arg1);
}
override public function setColor(_arg1:uint){
super.setColor(_arg1);
if ((((getColor() == mGoalColor)) && (!((mGoalColor == GameColor.white))))){
turnOn();
transitionColorTo(GameColor.white);
};
}
public function isOff(){
return (!(mOn));
}
public function isOn(){
return (mOn);
}
override public function completeTransition(){
super.completeTransition();
}
override public function applyStage(_arg1:Stage){
super.applyStage(_arg1);
if (mButton != null){
_arg1.addChild(mButton);
mButton.setAbsPos(getAbsPos());
};
}
override public function fadeOut(_arg1:uint=0){
super.fadeOut(_arg1);
mButton.fadeOut(_arg1);
}
public function newFloorColor(_arg1:uint){
if (_arg1 == mGoalColor){
fadeOut();
} else {
fadeIn();
};
}
public function turnOff(){
mOn = false;
}
public function turnOn(){
mOn = true;
if (mTargetFloor){
Sounds.changeBGColour();
mTargetFloor.transitionColorTo(mGoalColor);
};
}
}
}//package
Section 78
//FloorSwitchButton (FloorSwitchButton)
package {
public class FloorSwitchButton extends SystemMovieClip {
}
}//package
Section 79
//Follower (Follower)
package {
import flash.events.*;
import flash.display.*;
public class Follower extends MovieClip {
var mSubject:DisplayObject;// = null
public function Follower(_arg1:DisplayObject){
mSubject = _arg1;
}
public function applyStage(_arg1:Stage){
mSubject.addEventListener(Event.ADDED_TO_STAGE, followSubject);
Game.framelistener.addEventListener(FrameListener.BEGIN_FRAME, updatePosition);
}
public function updatePosition(_arg1:Event){
if (mSubject){
x = mSubject.x;
y = mSubject.y;
};
}
public function withdrawStage(_arg1:Stage){
mSubject.removeEventListener(Event.ADDED_TO_STAGE, followSubject);
Game.framelistener.removeEventListener(FrameListener.BEGIN_FRAME, updatePosition);
this.parent.removeChild(this);
mSubject = null;
}
public function followSubject(_arg1:Event){
mSubject.parent.addChild(this);
}
}
}//package
Section 80
//FrameListener (FrameListener)
package {
import flash.events.*;
import flash.display.*;
public class FrameListener extends EventDispatcher {
private var stageref:Stage;
private var isPaused:Boolean;// = false
public static var BEGIN_FRAME:String = "BEGIN_FRAME";
public function FrameListener(_arg1:Stage){
this.applyStage(_arg1);
stageref = _arg1;
}
public function applyStage(_arg1:Stage):void{
_arg1.addEventListener(Event.ENTER_FRAME, dispatchBeginFrame);
}
public function togglePause():void{
if (this.isPaused){
resumeGame();
} else {
pauseGame();
};
}
public function withdrawStage(_arg1:Stage):void{
_arg1.removeEventListener(Event.ENTER_FRAME, dispatchBeginFrame);
}
public function resumeGame():void{
this.isPaused = false;
this.applyStage(stageref);
}
public function returnIsDisabled(){
return (this.isPaused);
}
public function dispatchBeginFrame(_arg1:Event):void{
this.dispatchEvent(new Event(FrameListener.BEGIN_FRAME));
}
public function pauseGame():void{
this.isPaused = true;
this.withdrawStage(stageref);
}
}
}//package
Section 81
//Game (Game)
package {
import flash.display.*;
import flash.geom.*;
import com.midasplayer.*;
import flash.net.*;
public class Game {
var mTriggerBin:Sprite;
var mColorWallBin:Sprite;
var mEnemyPathBin:Sprite;
var mStage:Stage;// = null
var mBackgroundBin:Sprite;
var mPlayerBulletBin:Sprite;
var mPhysics:Physics;// = null
var mGeoParalax:GeoParalaxMaster;// = null
var crosshair:CrossHair;// = null
var mPlayerOffsetPoint:Point;// = null
var mWallBin:Sprite;
var mCurLevel:uint;// = 0
var mUninitialized:Array;
var mBinArray:Array;
var mActiveCheckpoint:CheckpointMomento;
var mLevels:Array;
var mPlayer:PlayerShip;// = null
var mColorFieldBin:Sprite;
var mSwitchBin:Sprite;
var mEnemyBulletBin:Sprite;
var mDoorBin:Sprite;
var mParentConnection:LocalConnection;
var mEnemiesBin:Sprite;
var mStoredColor:uint;// = 10
var mMiscBin:Sprite;
var mPlayerRotation:Number;// = -1
var mCameraBoxBin:Array;
var mGotoAndStop:Function;// = null
var mColorFloorBin:Array;
var mCheckpointBin:Sprite;
var mLevelAddOpen:Boolean;// = true
var mProfiler:Profiler;// = null
private var mGlobalFloor:ColorFloor;// = null
public static const cFrameRate = 30;
public static var sProfileMode = false;
public static var framelistener:FrameListener;
private static var sInstance:Game = new (Game);
;
public static var sIntroScreenMode = true;
public static var mMultiSwfMode:Boolean = false;
public function Game(){
mUninitialized = new Array();
mPlayerBulletBin = new Sprite();
mEnemiesBin = new Sprite();
mWallBin = new Sprite();
mDoorBin = new Sprite();
mSwitchBin = new Sprite();
mMiscBin = new Sprite();
mTriggerBin = new Sprite();
mBackgroundBin = new Sprite();
mColorWallBin = new Sprite();
mEnemyPathBin = new Sprite();
mColorFieldBin = new Sprite();
mEnemyBulletBin = new Sprite();
mCheckpointBin = new Sprite();
mColorFloorBin = new Array();
mCameraBoxBin = new Array();
mBinArray = new Array();
mLevels = new Array();
mActiveCheckpoint = new CheckpointMomento();
mParentConnection = new LocalConnection();
super();
mPhysics = new Physics();
mBinArray.push(mBackgroundBin);
mBinArray.push(mColorWallBin);
mBinArray.push(mWallBin);
mBinArray.push(mDoorBin);
mBinArray.push(mSwitchBin);
mBinArray.push(mTriggerBin);
mBinArray.push(mColorFieldBin);
mBinArray.push(mPlayerBulletBin);
mBinArray.push(mEnemyPathBin);
mBinArray.push(mCheckpointBin);
mBinArray.push(mEnemiesBin);
mBinArray.push(mEnemyBulletBin);
mBinArray.push(mMiscBin);
if (sProfileMode){
mProfiler = new Profiler();
};
}
public function transitionToNextLevel(){
mPlayer.disableInput();
var _local1:WhiteTransition = new WhiteTransition();
_local1.start(mStage);
}
public function endSetup(){
var _local12:Sprite;
var _local13:ColorField;
var _local14:Sprite;
var _local15:FloorSwitch;
var _local16:GameObject;
var _local1:Sprite = getBin(GameObject.type_ColorWall);
var _local2:Array = mColorFloorBin;
var _local3:ColorWall;
var _local4:ColorFloor;
var _local5:uint;
var _local6:uint;
_local5 = 0;
while (_local5 < _local1.numChildren) {
_local3 = ColorWall(_local1.getChildAt(_local5));
_local6 = 0;
while (_local6 < _local2.length) {
_local4 = ColorFloor(_local2[_local6]);
if (Physics.isColliding(_local4, _local3)){
_local4.addWall(_local3);
};
_local6++;
};
_local5++;
};
var _local7:Sprite = getBin(GameObject.type_EnemyPath);
var _local8:Sprite = getBin(GameObject.type_Enemy);
var _local9:EnemyPath;
var _local10:Enemy;
var _local11:SpikeEnemy;
_local5 = 0;
while (_local5 < _local8.numChildren) {
_local10 = Enemy(_local8.getChildAt(_local5));
if ((((_local10.getEnemyType() == Enemy.ai_Path)) || ((_local10.getEnemyType() == Enemy.ai_LaserCannon)))){
_local6 = 0;
while (_local6 < _local7.numChildren) {
_local9 = EnemyPath(_local7.getChildAt(_local6));
if (Physics.isColliding(_local9, _local10)){
EnemyPathFollowerBase(_local10).setPath(_local9);
};
_local6++;
};
} else {
if ((((_local10.getEnemyType() == Enemy.ai_Spike)) && (mGlobalFloor))){
_local11 = SpikeEnemy(_local10);
mGlobalFloor.addObserver(_local11.onFloorChange);
};
};
_local5++;
};
if (mGlobalFloor){
_local12 = getBin(GameObject.type_ColorField);
_local13 = null;
_local6 = 0;
while (_local6 < _local12.numChildren) {
_local13 = ColorField(_local12.getChildAt(_local6));
mGlobalFloor.addField(_local13);
_local6++;
};
_local14 = getBin(GameObject.type_FloorSwitch);
_local15 = null;
_local16 = null;
_local6 = 0;
while (_local6 < _local14.numChildren) {
_local16 = GameObject(_local14.getChildAt(_local6));
if (_local16.getType() == GameObject.type_FloorSwitch){
_local15 = FloorSwitch(_local16);
if (!_local15.hasFloor()){
_local15.setFloor(mGlobalFloor);
};
};
_local6++;
};
};
mPlayer.visible = true;
MyCamera.getInstance().resetHud(mStage);
if (mActiveCheckpoint.isActive()){
mActiveCheckpoint.jumpToSnapshot();
};
}
public function createProfiler(){
if (!mProfiler){
mProfiler = new Profiler();
};
}
public function setCheckpoint(_arg1:Checkpoint){
mActiveCheckpoint.grabSnapshot(_arg1);
}
public function addCameraBox(_arg1:CameraBox){
mCameraBoxBin.push(_arg1);
}
private function addToStageOrBin(_arg1:GameObject){
var _local2:Sprite = getBin(_arg1.getType());
if (_local2){
_local2.addChild(_arg1);
} else {
if (!_arg1.parent){
mStage.addChild(_arg1);
};
};
if (_arg1.getType() == GameObject.type_PlayerShip){
mPlayer = PlayerShip(_arg1);
} else {
if (_arg1.getType() == GameObject.type_ColorFloor){
mColorFloorBin.push(_arg1);
};
};
}
private function clearArray(_arg1:Array){
while (_arg1.length > 0) {
_arg1.pop();
};
}
public function respawn(){
Enemy.sMotionless = false;
if (mMultiSwfMode){
shutdownLevel();
mParentConnection.send(GameConnection.sConnectionName, "restartLevel");
} else {
mGotoAndStop(1, "empty");
shutdownLevel();
gotoCurrentLevel();
};
}
public function finishAddingLevels(){
mLevelAddOpen = false;
}
public function setCurrentLevelNumber(_arg1:uint){
mCurLevel = (_arg1 - 1);
}
public function findCheckpoint(_arg1:uint):Checkpoint{
var _local2:Checkpoint;
var _local3:uint;
while (_local3 < mCheckpointBin.numChildren) {
_local2 = Checkpoint(mCheckpointBin.getChildAt(_local3));
if (_local2.readId() == _arg1){
return (_local2);
};
_local3++;
};
return (null);
}
public function addObject(_arg1:GameObject){
if (mStage != null){
_arg1.applyStage(mStage);
addToStageOrBin(_arg1);
} else {
mUninitialized.push(_arg1);
};
}
public function getCurrentLevelNumber():uint{
return ((mCurLevel + 1));
}
public function getMiscBin():Sprite{
return (mMiscBin);
}
public function gotoCurrentLevel(){
mGotoAndStop(1, mLevels[mCurLevel].mSceneName);
}
public function getStage():Stage{
return (mStage);
}
public function setStage(_arg1:Stage){
var _local2:GameObject;
var _local3:*;
var _local4:uint;
var _local5:KingLogo;
var _local6:TutorialButton;
var _local7:LevelText;
if (mStage == null){
mStage = _arg1;
mStage.showDefaultContextMenu = false;
framelistener = new FrameListener(mStage);
_local2 = null;
MyCamera.getInstance().setStage(_arg1);
while (mUninitialized.length > 0) {
_local2 = mUninitialized.pop();
_local2.applyStage(mStage);
addToStageOrBin(_local2);
};
mPhysics.setStage(_arg1);
Game.framelistener.addEventListener(FrameListener.BEGIN_FRAME, GameColor.stepTransitions);
Sounds.initialize();
BackgroundMusic.initialize();
if (mLevels.length > mCurLevel){
BackgroundMusic.setMusic(mLevels[mCurLevel].mMusic);
};
if (sIntroScreenMode){
_local7 = new LevelText();
MyCamera.getInstance().addToHud(_local7, true);
};
_local5 = new KingLogo();
_local6 = new TutorialButton();
_local5.x = 50;
_local5.y = 475;
_local6.x = 620;
_local6.y = 475;
MyCamera.getInstance().addToHud(_local5);
MyCamera.getInstance().addToHud(_local6);
};
if (mGeoParalax == null){
mGeoParalax = new GeoParalaxMaster(Paralax1);
MyCamera.getInstance().addToParalax(mGeoParalax);
};
newStage();
}
public function getCurrentLevelInfo():LevelInfo{
return (mLevels[mCurLevel]);
}
public function gotoNextLevel(){
shutdownLevel();
mActiveCheckpoint.deactivate();
saveProgress();
if (mMultiSwfMode){
mParentConnection.send(GameConnection.sConnectionName, "nextLevel");
} else {
if (KingAPI.isHome){
KingAPI.submitLevel((mCurLevel + 1));
};
mCurLevel++;
gotoCurrentLevel();
};
}
public function getFloorBin():Array{
return (mColorFloorBin);
}
public function setGotoAndStop(_arg1:Function){
mGotoAndStop = _arg1;
}
public function findCamera(_arg1:uint):CameraBox{
var _local2:CameraBox;
var _local3:uint;
while (_local3 < mCameraBoxBin.length) {
_local2 = CameraBox(mCameraBoxBin[_local3]);
if (_local2.readId() == _arg1){
return (_local2);
};
_local3++;
};
return (null);
}
public function getPlayer():PlayerShip{
return (mPlayer);
}
public function getBin(_arg1:uint):Sprite{
var _local2:Sprite;
switch (_arg1){
case GameObject.type_Bullet:
_local2 = mPlayerBulletBin;
break;
case GameObject.type_Enemy:
_local2 = mEnemiesBin;
break;
case GameObject.type_Wall:
_local2 = mWallBin;
break;
case GameObject.type_Door:
_local2 = mDoorBin;
break;
case GameObject.type_Switch:
case GameObject.type_FloorSwitch:
case GameObject.type_EyeSwitch:
_local2 = mSwitchBin;
break;
case GameObject.type_Trigger:
_local2 = mTriggerBin;
break;
case GameObject.type_PlayerShip:
case GameObject.type_ColorFloor:
break;
case GameObject.type_ColorFloor:
_local2 = mBackgroundBin;
break;
case GameObject.type_ColorWall:
_local2 = mColorWallBin;
break;
case GameObject.type_EnemyPath:
_local2 = mEnemyPathBin;
break;
case GameObject.type_Checkpoint:
_local2 = mCheckpointBin;
break;
case GameObject.type_ColorField:
_local2 = mColorFieldBin;
break;
case GameObject.type_EnemyBullet:
_local2 = mEnemyBulletBin;
break;
default:
_local2 = mMiscBin;
break;
};
return (_local2);
}
public function saveProgress(){
var _local1:SharedObject = SharedObject.getLocal("levelProgress");
if (!_local1){
return;
};
var _local2:int = _local1.data.mTopLevel;
var _local3:uint = (mCurLevel + 1);
if (_local2 < _local3){
_local2 = _local3;
};
_local1.data.mTopLevel = _local2;
_local1.flush();
}
private function clearContainer(_arg1:DisplayObjectContainer){
var _local2:GameObject;
while (_arg1.numChildren > 0) {
_local2 = GameObject(_arg1.removeChildAt((_arg1.numChildren - 1)));
_local2.withdrawStage(mStage);
};
if (mMultiSwfMode){
_arg1.x = 0;
_arg1.y = 0;
};
}
public function shutdownLevel(){
MyCamera.getInstance().shutdownCamera(mStage);
var _local1:uint;
while (_local1 < mBinArray.length) {
clearContainer(mBinArray[_local1]);
_local1++;
};
clearArray(mColorFloorBin);
clearArray(mCameraBoxBin);
Enemy.sMotionless = false;
SystemMovieClip.resetIdCounter();
var _local2:uint = mPlayer.getColor();
if (_local2 != GameColor.white){
mStoredColor = _local2;
};
mPlayerRotation = mPlayer.getRot();
if (mPlayer.parent){
mPlayer.parent.removeChild(mPlayer);
};
mPlayer.withdrawStage(mStage);
if (!mMultiSwfMode){
if (mPlayerOffsetPoint){
mPlayerOffsetPoint = mPlayerOffsetPoint.add(new Point(mBinArray[0].x, mBinArray[0].y));
} else {
mPlayerOffsetPoint = new Point(mBinArray[0].x, mBinArray[0].y);
};
};
if (mProfiler){
mProfiler.withdrawStage(mStage);
};
framelistener.withdrawStage(mStage);
framelistener = null;
mPlayer = null;
mStage = null;
mGlobalFloor = null;
}
public function setGlobalFloor(_arg1:ColorFloor){
mGlobalFloor = _arg1;
}
public function newStage(){
var _local2:Point;
var _local3:Point;
var _local1:uint;
while (_local1 < mBinArray.length) {
mStage.addChild(mBinArray[_local1]);
_local1++;
};
if (mPlayer){
mStage.addChild(mPlayer);
if (mPlayerOffsetPoint){
_local2 = new Point(mPlayer.x, mPlayer.y);
_local3 = _local2.add(mPlayerOffsetPoint);
mPlayerOffsetPoint = null;
mPlayer.x = _local3.x;
mPlayer.y = _local3.y;
};
if (mStoredColor != GameColor.cUndefined){
mPlayer.setColor(mStoredColor);
};
if (mPlayerRotation != -1){
mPlayer.setRot(mPlayerRotation);
};
} else {
trace("NO PLAYER???");
};
if (mProfiler){
MyCamera.getInstance().addToHud(mProfiler);
mProfiler.applyStage(mStage);
};
}
public function hitWall(_arg1:GameObject):Boolean{
return (mPhysics.hitWall(_arg1));
}
public function getGlobalFloor():ColorFloor{
return (mGlobalFloor);
}
public function removeObject(_arg1:GameObject){
_arg1.withdrawStage(mStage);
var _local2:Sprite = getBin(_arg1.getType());
if (_local2){
_local2.removeChild(_arg1);
} else {
mStage.removeChild(_arg1);
};
}
public function addLevel(_arg1:LevelInfo){
if (mLevelAddOpen){
mLevels.push(_arg1);
};
}
public static function getInstance():Game{
return (sInstance);
}
public static function setDebugMode(){
sProfileMode = true;
sIntroScreenMode = false;
Game.getInstance().createProfiler();
}
}
}//package
Section 82
//GameColor (GameColor)
package {
import flash.events.*;
public class GameColor {
var mColorType:uint;
public static const green:uint = 6;
public static const red:uint = 1;
public static const blue:uint = 4;
public static const cUndefined:uint = 10;
public static const orange:uint = 3;
public static const white:uint = 0;
public static const yellow:uint = 2;
public static const brown:uint = 7;
public static const purple:uint = 5;
public static const ceiling:uint = 8;
public static const black:uint = 9;
static var sTransitionHead:ColorTransition = null;
public function GameColor(_arg1:uint=0){
mColorType = _arg1;
}
public static function getBackgroundRgb(_arg1:uint):uint{
var _local2:uint;
switch (_arg1){
case white:
_local2 = 0xFFFFFF;
break;
case red:
_local2 = 0x510000;
break;
case blue:
_local2 = 8264;
break;
case yellow:
_local2 = 0xB0B000;
break;
case purple:
_local2 = 0x310042;
break;
case orange:
_local2 = 0x973100;
break;
case green:
_local2 = 0x4600;
break;
case brown:
_local2 = 4858891;
break;
case black:
_local2 = 0x292929;
break;
};
return (_local2);
}
public static function getEnumFromRgb(_arg1:uint):uint{
var _local2:uint;
switch (_arg1){
case 0xFFFFFF:
_local2 = white;
break;
case 0xFF0000:
_local2 = red;
break;
case 39423:
_local2 = blue;
break;
case 0xFFFF00:
_local2 = yellow;
break;
case 14181119:
_local2 = purple;
break;
case 0xFF9900:
_local2 = orange;
break;
case 0xDF00:
_local2 = green;
break;
case 9127187:
_local2 = brown;
break;
case 0x292929:
_local2 = black;
break;
default:
_local2 = cUndefined;
break;
};
return (_local2);
}
public static function addTransition(_arg1:GameObject, _arg2:uint, _arg3:uint, _arg4:uint=0):ColorTransition{
var _local5:ColorTransition = new ColorTransition(_arg1, _arg2, _arg3, _arg4);
_local5.mNext = sTransitionHead;
sTransitionHead = _local5;
return (_local5);
}
public static function getRgb(_arg1:uint):uint{
var _local2:uint;
switch (_arg1){
case white:
_local2 = 0xFFFFFF;
break;
case red:
_local2 = 0xFF0000;
break;
case blue:
_local2 = 7002879;
break;
case yellow:
_local2 = 0xFFFF00;
break;
case purple:
_local2 = 14181119;
break;
case orange:
_local2 = 0xFF9900;
break;
case green:
_local2 = 0xDF00;
break;
case brown:
_local2 = 9127187;
break;
case black:
_local2 = 0x292929;
break;
};
return (_local2);
}
public static function stepTransitions(_arg1:Event){
var _local3:ColorTransition;
var _local4:ColorTransition;
var _local2:ColorTransition = sTransitionHead;
while (_local2 != null) {
_local2.stepTransition();
_local2 = _local2.mNext;
};
if (sTransitionHead){
while (((sTransitionHead) && (sTransitionHead.isDone()))) {
_local4 = sTransitionHead;
sTransitionHead = sTransitionHead.mNext;
_local4.mNext = null;
};
if (sTransitionHead == null){
return;
};
_local3 = sTransitionHead;
_local2 = _local3.mNext;
while (_local2 != null) {
if (_local2.isDone()){
_local3.mNext = _local2.mNext;
_local2.mNext = null;
_local2 = _local3.mNext;
} else {
_local3 = _local2;
_local2 = _local2.mNext;
};
};
};
}
public static function doesColorContribute(_arg1:uint, _arg2:uint, _arg3:uint):Boolean{
return (((!((_arg3 & _arg2))) && ((_arg3 & _arg1))));
}
}
}//package
Section 83
//GameConnection (GameConnection)
package {
import flash.events.*;
import flash.display.*;
import flash.net.*;
import flash.system.*;
public class GameConnection extends LocalConnection {
var mLoader:Loader;// = null
var mStage:Stage;// = null
var mCurLevel:uint;// = 0
var mLevels:Array;
public static const sConnectionName = "_GameToLevelConnection";
public function GameConnection(_arg1:Stage){
mLevels = new Array();
super();
mStage = _arg1;
this.connect(sConnectionName);
}
public function addLevel(_arg1:String){
mLevels.push(_arg1);
}
private function unloadLevel(){
mLoader.unload();
mLoader = null;
}
public function errorListener(_arg1:IOErrorEvent){
trace(_arg1);
}
private function loadLevel(){
mLoader = new Loader();
mLoader.x = 0;
mLoader.y = 0;
var _local1:LoaderContext = new LoaderContext(false, ApplicationDomain.currentDomain);
mStage.addChild(mLoader);
var _local2 = (String(mLevels[mCurLevel]) + ".swf");
var _local3:URLRequest = new URLRequest(_local2);
mLoader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, errorListener);
mLoader.load(_local3, _local1);
}
public function startGame(){
loadLevel();
}
public function restartLevel(){
unloadLevel();
loadLevel();
}
public function nextLevel(){
unloadLevel();
mCurLevel++;
loadLevel();
}
public function loadFinished(_arg1:Event){
mStage.addChild(mLoader);
}
}
}//package
Section 84
//GameLoader (GameLoader)
package {
public class GameLoader {
private static var mAllLevels:Array = new Array();
public static function startNewGame(){
startAtLevel(1);
}
public static function startAtLevel(_arg1:int){
if (_arg1 > mAllLevels.length){
_arg1 = mAllLevels.length;
};
var _local2:Game = Game.getInstance();
var _local3:uint;
while (_local3 < mAllLevels.length) {
_local2.addLevel(mAllLevels[_local3]);
_local3++;
};
_local2.finishAddingLevels();
_local2.setCurrentLevelNumber(_arg1);
_local2.gotoCurrentLevel();
}
public static function initialize(){
var _local1:LevelInfo = new LevelInfo("Level1", "KNOW YOUR COLOR WHEEL", BackgroundMusic.bgm_Level1);
var _local2:LevelInfo = new LevelInfo("Level2", "DANGER IN THE COLOR FIELDS", BackgroundMusic.bgm_Level2);
var _local3:LevelInfo = new LevelInfo("Level3", "THE LABYRINTH", BackgroundMusic.bgm_Level3);
var _local4:LevelInfo = new LevelInfo("Level4", "RUN!", BackgroundMusic.bgm_Level4);
var _local5:LevelInfo = new LevelInfo("Level5", "WATCH OUT!", BackgroundMusic.bgm_Level5);
var _local6:LevelInfo = new LevelInfo("Level6", "SURVIVING THE MAZE", BackgroundMusic.bgm_Level6);
var _local7:LevelInfo = new LevelInfo("Level7", "RUN! EVEN FASTER!", BackgroundMusic.bgm_Level4);
var _local8:LevelInfo = new LevelInfo("Level8", "PASSAGEWAY", BackgroundMusic.bgm_Level2);
var _local9:LevelInfo = new LevelInfo("Level9", "THE LABYRINTH", BackgroundMusic.bgm_Aaron);
var _local10:LevelInfo = new LevelInfo("Level10", "THE ARENA", BackgroundMusic.bgm_Level5);
var _local11:LevelInfo = new LevelInfo("Level11", "DON'T STOP A RUNNIN'", BackgroundMusic.bgm_Level4);
var _local12:LevelInfo = new LevelInfo("Level12", "MR. BOSS STRIKES", BackgroundMusic.bgm_Level10);
mAllLevels.push(_local1);
mAllLevels.push(_local2);
mAllLevels.push(_local3);
mAllLevels.push(_local4);
mAllLevels.push(_local5);
mAllLevels.push(_local6);
mAllLevels.push(_local7);
mAllLevels.push(_local8);
mAllLevels.push(_local9);
mAllLevels.push(_local10);
mAllLevels.push(_local11);
mAllLevels.push(_local12);
}
}
}//package
Section 85
//GameObject (GameObject)
package {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
public class GameObject extends SystemMovieClip {
protected var mType:uint;// = 0
protected var mAcceleration:Point;
protected var mTransition:ColorTransition;// = null
protected var mVelocity:Point;
protected var mDead:Boolean;// = false
protected var mColor:uint;// = 0
public static const type_PlayerShip:uint = 2;
public static const type_EnemyBullet:uint = 19;
public static const type_Bullet:uint = 1;
public static const type_EnemySheild:uint = 20;
public static const type_Checkpoint:uint = 13;
public static const type_Wall:uint = 5;
public static const type_WakeField:uint = 17;
public static const type_Trigger:uint = 8;
public static const type_EyeSwitch:uint = 18;
public static const type_SpawnPoint:uint = 15;
public static const type_Enemy:uint = 3;
public static const type_ColorWall:uint = 10;
public static const type_Undefined:uint = 0;
public static const type_ColorFloor:uint = 9;
public static const type_EnemyPath:uint = 12;
public static const transitionDelayDefault:uint = 10;
public static const type_ColorField:uint = 14;
public static const type_Switch:uint = 6;
public static const type_Door:uint = 7;
public static const type_FloorSwitch:uint = 11;
public static const type_ParalaxField:uint = 16;
public function GameObject(_arg1:uint){
mVelocity = new Point();
mAcceleration = new Point();
super();
mType = _arg1;
Game.getInstance().addObject(this);
}
public function addColor(_arg1:uint){
if (!(_arg1 & mColor)){
setColor((mColor + _arg1));
};
}
public function explode(){
}
public function getRadius():Number{
return ((width / 2));
}
public function restartTransition(_arg1:uint=0){
if (mTransition){
mTransition.restart(_arg1);
};
}
public function getRgbColor(_arg1:uint){
return (GameColor.getRgb(_arg1));
}
public function hasTransition():Boolean{
return (!((mTransition == null)));
}
public function hitColor(_arg1:uint, _arg2:Boolean){
}
public function roundVelocity(_arg1:Number):Number{
_arg1 = (_arg1 * 8);
_arg1 = Math.round(_arg1);
_arg1 = (_arg1 / 8);
return (_arg1);
}
public function getVelocity():Point{
return (mVelocity);
}
public function setGraphicsColor(_arg1:uint){
}
public function updateMovement(_arg1:Event){
var _local2:Number;
var _local3:Number;
if (mDead){
return;
};
mVelocity.x = (mVelocity.x + mAcceleration.x);
mVelocity.y = (mVelocity.y + mAcceleration.y);
if (((!((mVelocity.x == 0))) || (!((mVelocity.y == 0))))){
_local2 = x;
_local3 = y;
x = (x + mVelocity.x);
y = (y + mVelocity.y);
if (Game.getInstance().hitWall(this)){
x = _local2;
y = _local3;
this.hitWall();
};
};
}
public function addColorAndRevertWithTransition(_arg1:uint, _arg2:uint=10){
var _local3:uint;
if ((_arg1 & mColor)){
return;
};
if (mTransition){
addColor(_arg1);
mTransition.setNewStartColor(mColor, _arg2);
} else {
_local3 = mColor;
addColor(_arg1);
mTransition = GameColor.addTransition(this, mColor, _local3, _arg2);
};
}
public function setColor(_arg1:uint){
if (_arg1 == mColor){
return;
};
mColor = _arg1;
var _local2:uint = getRgbColor(_arg1);
setGraphicsColor(_local2);
}
override public function withdrawStage(_arg1:Stage){
super.withdrawStage(_arg1);
switch (mType){
case GameObject.type_Bullet:
case GameObject.type_EnemyBullet:
case GameObject.type_PlayerShip:
case GameObject.type_Enemy:
Game.framelistener.removeEventListener(FrameListener.BEGIN_FRAME, updateMovement);
break;
default:
break;
};
}
protected function clearVisuals(){
while (numChildren > 0) {
removeChildAt((numChildren - 1));
};
}
public function getRot(){
return (this.rotation);
}
public function getColor():uint{
return (mColor);
}
public function completeTransition(){
mTransition = null;
}
public function subtractColor(_arg1:uint){
if ((_arg1 & mColor)){
setColor((mColor - _arg1));
};
}
public function transitionColorTo(_arg1:uint, _arg2:uint=10){
if (_arg1 == getColor()){
return;
};
if (mTransition){
if (mTransition.getGoalColor() != _arg1){
mTransition.setNewGoalColor(_arg1);
};
} else {
mTransition = GameColor.addTransition(this, mColor, _arg1, _arg2);
};
}
public function isDead():Boolean{
return (mDead);
}
override public function applyStage(_arg1:Stage){
super.applyStage(_arg1);
switch (mType){
case GameObject.type_Bullet:
case GameObject.type_EnemyBullet:
case GameObject.type_PlayerShip:
case GameObject.type_Enemy:
Game.framelistener.addEventListener(FrameListener.BEGIN_FRAME, updateMovement);
break;
default:
break;
};
}
protected function grabTintAndReturnAsColor():uint{
var _local1:uint = this.transform.colorTransform.color;
return (GameColor.getEnumFromRgb(_local1));
}
protected function grabTintAsColor(){
var _local1:uint = grabTintAndReturnAsColor();
if (_local1 != GameColor.cUndefined){
setColor(_local1);
};
}
public function destroy(){
if (mDead){
return;
};
Game.getInstance().removeObject(this);
mDead = true;
delete ??getglobalscope
[this];
}
public function hitWall(){
}
public function getType():uint{
return (mType);
}
public static function reconfigureAsChild(_arg1:GameObject, _arg2:GameObject){
var _local5:Point;
var _local3:Point = new Point(_arg2.x, _arg2.y);
var _local4:Number = Math.atan2(_arg2.y, _arg2.x);
_arg2.rotation = (_arg2.rotation + _arg1.rotation);
_local5 = Point.polar(_local3.length, (_local4 + ((Math.PI / 180) * _arg1.rotation)));
_arg2.x = (_arg1.x + _local5.x);
_arg2.y = (_arg1.y + _local5.y);
}
}
}//package
Section 86
//GeoParalax (GeoParalax)
package {
public class GeoParalax extends SystemMovieClip {
public static const cDown:uint = 3;
public static const cRight:uint = 1;
public static const cLeft:uint = 0;
public static const cUp:uint = 2;
public function getNum():uint{
return (0);
}
public function numberTo(_arg1:uint){
}
public function onCameraMove(_arg1:Number, _arg2:Number){
}
}
}//package
Section 87
//GeoParalaxMaster (GeoParalaxMaster)
package {
import flash.display.*;
import flash.geom.*;
public class GeoParalaxMaster extends Paralax {
private var mGridDim:Point;
private var mTileSize:Point;// = null
private var mScale:Number;// = 1
public function GeoParalaxMaster(_arg1:Class, _arg2:Number=0.5){
mGridDim = new Point();
super();
mScale = _arg2;
var _local3:DisplayObject = new (_arg1);
mTileSize = new Point(_local3.width, _local3.height);
var _local4:Point = new Point(MyCamera.getInstance().getWidth(), MyCamera.getInstance().getHeight());
var _local5:Point = new Point((_local4.x + 50), (_local4.y + 50));
var _local6:Number = (Math.ceil((_local5.x / mTileSize.x)) + 1);
var _local7:Number = (Math.ceil((_local5.y / mTileSize.y)) + 1);
mGridDim.x = Math.max(2, _local6);
mGridDim.y = Math.max(2, _local7);
var _local8:Number = (MyCamera.getInstance().getWidth() - (mTileSize.x * mGridDim.x));
var _local9:Number = 0;
var _local10:Number = (MyCamera.getInstance().getHeight() - (mTileSize.y * mGridDim.y));
var _local11:Number = 0;
var _local12:int = (mGridDim.x * mGridDim.y);
var _local13:int;
var _local14:int;
var _local15:DisplayObject;
var _local16:int;
while (_local16 < _local12) {
_local13 = (_local16 % mGridDim.x);
_local14 = Math.floor((_local16 / mGridDim.x));
_local15 = new (_arg1);
_local15.x = (_local13 * mTileSize.x);
_local15.y = (_local14 * mTileSize.y);
addChild(_local15);
_local16++;
};
x = 0;
y = 0;
}
override public function onCameraMove(_arg1:Number, _arg2:Number){
if (mTileSize.length < 1){
return;
};
var _local3:Number = (_arg1 * (mScale - 1));
var _local4:Number = (_arg2 * (mScale - 1));
x = (x + _local3);
y = (y + _local4);
var _local5:Number = (MyCamera.getInstance().getWidth() - (mTileSize.x * mGridDim.x));
var _local6:Number = 0;
var _local7:Number = (MyCamera.getInstance().getHeight() - (mTileSize.y * mGridDim.y));
var _local8:Number = 0;
if (x > _local6){
while (x > _local6) {
x = (x - mTileSize.x);
};
} else {
if (x < _local5){
while (x < _local5) {
x = (x + mTileSize.x);
};
};
};
if (y > _local8){
while (y > _local8) {
y = (y - mTileSize.y);
};
} else {
if (y < _local7){
while (y < _local7) {
y = (y + mTileSize.y);
};
};
};
}
}
}//package
Section 88
//HintText (HintText)
package {
import flash.events.*;
import flash.display.*;
public class HintText extends SystemMovieClip {
const counterLimit:Number = 1350;
protected var mHoldCount:Number;// = 0
protected var mHoldInc:Number;// = 0
var hintCounter:Number;// = 0
public function HintText(){
addFrameScript(0, frame1, 59, frame60);
}
public function holdFadeIn(_arg1:uint){
Game.framelistener.addEventListener(FrameListener.BEGIN_FRAME, holdAnimationFadeIn);
mHoldCount = _arg1;
}
function hintTimer(_arg1:Event):void{
hintCounter++;
if (hintCounter == counterLimit){
Game.framelistener.removeEventListener(FrameListener.BEGIN_FRAME, hintTimer);
};
}
function frame60(){
stop();
}
public function holdAnimationFadeIn(_arg1:Event){
mHoldInc++;
if (mHoldInc == mHoldCount){
this.fadeIn();
mHoldInc = 0;
stage.removeEventListener(Event.ENTER_FRAME, holdAnimationFadeIn);
};
}
function frame1(){
stop();
}
function hintButtonActivate(_arg1:MouseEvent):void{
this.gotoAndPlay(2);
this.removeEventListener(MouseEvent.CLICK, hintButtonActivate);
}
public function holdAnimationFadeOut(_arg1:Event){
mHoldInc++;
if (mHoldInc == mHoldCount){
this.fadeOut();
mHoldInc = 0;
stage.removeEventListener(Event.ENTER_FRAME, holdAnimationFadeOut);
};
}
override public function fadeAnimation(_arg1:Event){
super.fadeAnimation(_arg1);
}
public function holdFadeOut(_arg1:uint){
Game.framelistener.addEventListener(FrameListener.BEGIN_FRAME, holdAnimationFadeOut);
mHoldCount = _arg1;
}
public function hintActivate(_arg1:Stage){
}
public function activateFromTrigger(_arg1:Trigger){
fadeIn();
}
}
}//package
Section 89
//HostButton (HostButton)
package {
import flash.events.*;
import com.midasplayer.*;
public class HostButton extends KingButton {
override public function onClick(_arg1:MouseEvent){
KingAPI.openAddToWebsiteLink();
}
}
}//package
Section 90
//introText (introText)
package {
public dynamic class introText extends HintText {
}
}//package
Section 91
//KingButton (KingButton)
package {
import flash.events.*;
import flash.display.*;
public class KingButton extends SimpleButton {
public function KingButton(){
this.addEventListener(MouseEvent.MOUSE_DOWN, onClick);
}
public function onClick(_arg1:MouseEvent){
}
}
}//package
Section 92
//KingLogo (KingLogo)
package {
import flash.events.*;
import com.midasplayer.*;
public class KingLogo extends KingButton {
public function KingLogo(){
x = 600;
y = 400;
}
override public function onClick(_arg1:MouseEvent){
KingAPI.openSignLink();
}
}
}//package
Section 93
//LaserCannon (LaserCannon)
package {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
public class LaserCannon extends EnemyPathFollowerBase {
public var mCloseRange:Number;// = 100
private var mWarningShape:Shape;
private var mShotAngle:int;// = 0
private var mStreamLength:int;// = 15
var mLaserCap:LaserCannonCap;
private var mTargetAngle:Number;// = 0
private var SHOT_ANGLE_TOLERANCE:Number;// = 1
public var mCloseChaseVelocity:Number;// = 5
public var mFarChaseVelocity:Number;// = 20
private var mFrameCounter:int;// = 0
private var mAngVelocity:int;// = 1
private var MAX_TOLERANCE:Number;// = 3
public var mFarRange:Number;// = 500
private var mLaserStreams:Array;
private static const cShootingTimeMark = 30;
private static const cWarningTimeInterval = 20;
private static const cCannonLength = 90;
private static const cWarningTimeMark = 50;
private static const cShootingTimeInterval = 30;
private static const cWarningLineLength = 700;
private static const cWarningAngleStartSpread:int = 10;
public function LaserCannon(){
mLaserStreams = new Array();
mLaserCap = new LaserCannonCap();
mWarningShape = new Shape();
super();
grabTintAsColor();
addChild(mWarningShape);
mLaserCap.alpha = 0;
mWarningShape.graphics.lineStyle(3, getRgbColor(mColor));
}
private function calculateTargetAngle():Number{
var _local1:Number = (mTargetAngle - mShotAngle);
if (Math.abs(_local1) > 180){
if (_local1 > 0){
_local1 = (_local1 - 360);
} else {
_local1 = (_local1 + 360);
};
};
if (Math.abs(_local1) > 180){
trace(("Bigger Problem: " + _local1));
};
return (_local1);
}
public function setStreamLength(_arg1:int){
mStreamLength = ((_arg1 / LaserStream.cSize) + 1);
}
private function destroyLaser(){
while (mLaserStreams.length > 0) {
LaserStream(mLaserStreams.pop()).destroy();
};
}
function calculateAngle(_arg1:Point, _arg2:Point):Number{
var _local3:Point = _arg2.subtract(_arg1);
var _local4:Number = _local3.length;
var _local5:Number = Math.atan2(_local3.y, _local3.x);
var _local6:* = (_local5 * (180 / Math.PI));
return (_local6);
}
override public function getRadius():Number{
return (20);
}
override public function hitColor(_arg1:uint, _arg2:Boolean){
}
private function retractLaser(){
mLaserCap.deactivate();
var _local1:LaserStream;
var _local2:uint;
while (_local2 < mLaserStreams.length) {
_local1 = LaserStream(mLaserStreams[_local2]);
_local1.deactivate();
_local2++;
};
}
function targetPlayer():void{
mTargetAngle = getPlayerLocationAngle();
}
private function clearWarning(){
mWarningShape.graphics.clear();
}
private function updateWarning(){
clearWarning();
var _local1:Number = ((cWarningTimeMark - mFrameCounter) / cWarningTimeInterval);
_local1 = (1 - _local1);
var _local2:Number = (_local1 * cWarningAngleStartSpread);
var _local3:Number = ((Math.PI / 180) * (90 + _local2));
var _local4:Number = ((Math.PI / 180) * (90 - _local2));
var _local5:Number = mShotAngle;
_local5 = (_local5 * (Math.PI / 180));
var _local6:uint = getRgbColor(mColor);
mWarningShape.graphics.beginFill(_local6);
mWarningShape.graphics.lineStyle(3, _local6);
mWarningShape.graphics.drawCircle(0, cCannonLength, 7);
mWarningShape.graphics.moveTo(0, cCannonLength);
mWarningShape.graphics.lineTo((cWarningLineLength * Math.cos(_local3)), (cCannonLength + (cWarningLineLength * Math.sin(_local3))));
mWarningShape.graphics.moveTo(0, cCannonLength);
mWarningShape.graphics.lineTo((cWarningLineLength * Math.cos(_local4)), (cCannonLength + (cWarningLineLength * Math.sin(_local4))));
mWarningShape.graphics.endFill();
}
override public function fireWeapon(_arg1:int){
constructStream();
}
private function updateChaseSpeed(){
var _local6:Number;
var _local1:PlayerShip = Game.getInstance().getPlayer();
if (!_local1){
return;
};
var _local2:Point = _local1.getAbsPos();
var _local3:Point = _local2.subtract(getAbsPos());
var _local4:Point = mVelocity.clone();
_local4.normalize(1);
var _local5:Number = ((_local4.x * _local3.x) + (_local4.y * _local3.y));
if (_local5 < mCloseRange){
mSpeed = mCloseChaseVelocity;
} else {
if (_local5 > mFarRange){
mSpeed = mFarChaseVelocity;
} else {
_local6 = ((mFarChaseVelocity - mCloseChaseVelocity) / (mFarRange - mCloseRange));
mSpeed = ((_local6 * (_local5 - mCloseRange)) + mCloseChaseVelocity);
};
};
}
override public function setPath(_arg1:EnemyPath){
super.setPath(_arg1);
}
override public function getEnemyType():uint{
return (ai_LaserCannon);
}
override public function updateEnemyAI(_arg1:Event){
if (!mActive){
return;
};
if (hasPath()){
updateChaseSpeed();
updateMovementAlongPath();
constructStream();
} else {
updateMovementShootingPlayer();
};
}
private function turnTowardsPlayer(){
this.targetPlayer();
var _local1:Number = calculateTargetAngle();
if (Math.abs(_local1) < mAngVelocity){
setShotAngle(mTargetAngle);
} else {
if (_local1 < 0){
setShotAngle((mShotAngle - mAngVelocity));
} else {
if (_local1 > 0){
setShotAngle((mShotAngle + mAngVelocity));
};
};
};
}
public function updateMovementShootingPlayer(){
var _local1:int;
var _local2:Number;
if (mFrameCounter == 0){
retractLaser();
_local1 = (Game.cFrameRate * Physics.randRange(2, 5));
mFrameCounter = (cWarningTimeMark + _local1);
} else {
if (mFrameCounter < cShootingTimeMark){
mFrameCounter--;
} else {
if (mFrameCounter == cShootingTimeMark){
clearWarning();
this.fireWeapon(mShotAngle);
mFrameCounter--;
} else {
if (mFrameCounter < cWarningTimeMark){
updateWarning();
mFrameCounter--;
} else {
if (mFrameCounter == cWarningTimeMark){
_local2 = calculateTargetAngle();
if (Math.abs(_local2) < 5){
updateWarning();
mFrameCounter--;
} else {
turnTowardsPlayer();
};
} else {
turnTowardsPlayer();
mFrameCounter--;
};
};
};
};
};
}
public function setShotAngle(_arg1:int){
mShotAngle = _arg1;
this.rotation = (_arg1 - 90);
}
function constructStream(){
var _local5:uint;
if (mLaserStreams.length != mStreamLength){
destroyLaser();
_local5 = 0;
while (_local5 < mStreamLength) {
mLaserStreams.push(new LaserStream(mColor));
_local5++;
};
};
var _local1:Point = getAbsPos();
var _local2:Point = Point.polar(cCannonLength, (mShotAngle * (Math.PI / 180)));
var _local3:Point = _local1.add(_local2);
mLaserCap.setParams(_local3, mShotAngle);
_local3 = mLaserCap.calcNextPoint(_local3, mShotAngle);
mLaserCap.activate();
var _local4:LaserStream;
_local5 = 0;
while (_local5 < mLaserStreams.length) {
_local4 = LaserStream(mLaserStreams[_local5]);
_local4.setStream(_local3, mShotAngle);
_local4.activate();
_local3 = _local4.getEndPoint();
_local5++;
};
}
}
}//package
Section 94
//LaserCannonCap (LaserCannonCap)
package {
import flash.geom.*;
public class LaserCannonCap extends Enemy {
public static const cLength = 20;
public function setParams(_arg1:Point, _arg2:Number){
setAbsPos(_arg1);
this.rotation = (_arg2 - 90);
}
override public function activate(){
alpha = 1;
super.activate();
}
override public function getEnemyType():uint{
return (Enemy.ai_LaserCannonCap);
}
override public function deactivate(){
fadeOut();
super.deactivate();
}
public function calcNextPoint(_arg1:Point, _arg2:Number):Point{
return (Point.polar(cLength, (_arg2 * (Math.PI / 180))).add(_arg1));
}
}
}//package
Section 95
//LaserStream (LaserStream)
package {
import flash.geom.*;
public class LaserStream extends Enemy {
public var startPoint:Point;
public var endPoint:Point;
public static const cSize = 50;
public static const cRadius = 25;
public function LaserStream(_arg1:uint){
activate();
setColor(_arg1);
}
public function setStream(_arg1:Point, _arg2:Number){
startPoint = _arg1;
setAbsPos(_arg1);
this.rotation = (_arg2 + 90);
endPoint = Point.polar(cSize, (_arg2 * (Math.PI / 180))).add(_arg1);
}
override public function getDamage():Number{
return (1.5);
}
public function getEndPoint():Point{
return (endPoint);
}
override public function getEnemyType():uint{
return (ai_LaserSection);
}
override protected function deathAnimation(){
}
override public function deactivate(){
fadeOut();
super.deactivate();
}
override public function setGraphicsColor(_arg1:uint){
setTint(_arg1);
}
override public function hitColor(_arg1:uint, _arg2:Boolean){
}
override public function activate(){
alpha = 1;
super.activate();
}
}
}//package
Section 96
//Level (Level)
package {
import flash.display.*;
public dynamic class Level extends SimpleButton {
}
}//package
Section 97
//LevelInfo (LevelInfo)
package {
class LevelInfo {
public var mMusic:uint;
public var mSceneName:String;// = "empty"
public var mDescription:String;// = "NO DESCRIPTION"
function LevelInfo(_arg1:String, _arg2:String, _arg3:uint){
mMusic = BackgroundMusic.bgm_Aaron;
super();
mSceneName = _arg1;
mDescription = _arg2;
mMusic = _arg3;
}
}
}//package
Section 98
//LevelText (LevelText)
package {
import flash.events.*;
import flash.display.*;
public class LevelText extends MovieClip {
var filler:String;// = ""
public var levelTextMC:MovieClip;
var currentLevelInfo:LevelInfo;// = null
var currentLevelNum:uint;// = 0
public function LevelText(){
addFrameScript(99, frame100);
applyLevelName();
this.addEventListener(Event.ENTER_FRAME, checkForEnd);
}
private function applyLevelName(){
currentLevelInfo = Game.getInstance().getCurrentLevelInfo();
currentLevelNum = Game.getInstance().getCurrentLevelNumber();
if (currentLevelInfo){
filler = currentLevelInfo.mDescription;
levelTextMC.levelDynamicText.text = ((("LEVEL " + currentLevelNum) + "\n") + filler);
};
}
function frame100(){
stop();
}
function checkForEnd(_arg1:Event){
if (this.currentFrame == this.totalFrames){
this.removeEventListener(Event.ENTER_FRAME, checkForEnd);
};
}
}
}//package
Section 99
//MainMenu (MainMenu)
package {
import flash.events.*;
import flash.display.*;
import flash.net.*;
import flash.text.*;
public class MainMenu extends MovieClip {
const cOpenOptionsMenu:uint = 2;
const cOpenContinueMenu:uint = 0;
const cCloseOptionsMenu:uint = 3;
const cLevelStride:uint = 1;
const cCloseContinueMenu:uint = 1;
const cLevelStartMax:uint = 7;
const cLevelOffset:uint = 5;
const cNumLevels:uint = 12;
public var newGameButton:SimpleButton;
public var playmore:MoreButton;
var mContinueOpen:Boolean;// = false
public var LevelText1:TextField;
public var LevelText2:TextField;
public var LevelText3:TextField;
public var LevelText4:TextField;
public var LevelText5:TextField;
public var NextButton:SimpleButton;
var mCurAction:int;// = -1
var mLevelButtonArray:Array;
var mEndPoints:Array;
var mStartPoints:Array;
public var continueButton:SimpleButton;
public var LevelButton1:Level;
public var LevelButton2:Level;
public var LevelButton3:Level;
public var LevelButton4:Level;
public var LevelButton5:Level;
var mCurLevelStart:uint;// = 0
var mActionQueue:Array;
var mLevelTextArray:Array;
var mMaxAvailableLevel:uint;// = 0
var mOptionsOpen:Boolean;// = false
public var PrevButton:SimpleButton;
public var optionsButton:SimpleButton;
var mLevelNames:Array;
public function MainMenu(){
mActionQueue = new Array();
mStartPoints = new Array();
mEndPoints = new Array();
mLevelNames = new Array();
mLevelTextArray = new Array();
mLevelButtonArray = new Array();
super();
addFrameScript(44, frame45, 88, frame89, 98, frame99, 109, frame110);
mStartPoints.push(2);
mStartPoints.push(46);
mStartPoints.push(90);
mStartPoints.push(100);
mEndPoints.push(1);
mEndPoints.push((mStartPoints[1] - 1));
mEndPoints.push((mStartPoints[2] - 1));
mEndPoints.push((mStartPoints[3] - 1));
mEndPoints.push(110);
stop();
continueButton.addEventListener(MouseEvent.CLICK, onContinue);
newGameButton.addEventListener(MouseEvent.CLICK, onNewGame);
optionsButton.visible = false;
this.stage.addEventListener(Event.ENTER_FRAME, updateAction);
LevelButton1.visible = false;
LevelButton2.visible = false;
LevelButton3.visible = false;
LevelButton4.visible = false;
LevelButton5.visible = false;
NextButton.visible = false;
PrevButton.visible = false;
LevelText1.visible = false;
LevelText2.visible = false;
LevelText3.visible = false;
LevelText4.visible = false;
LevelText5.visible = false;
mLevelTextArray.push(LevelText1);
mLevelTextArray.push(LevelText2);
mLevelTextArray.push(LevelText3);
mLevelTextArray.push(LevelText4);
mLevelTextArray.push(LevelText5);
mLevelButtonArray.push(LevelButton1);
mLevelButtonArray.push(LevelButton2);
mLevelButtonArray.push(LevelButton3);
mLevelButtonArray.push(LevelButton4);
mLevelButtonArray.push(LevelButton5);
mLevelNames.push("Tutorial");
mLevelNames.push("Level 2");
mLevelNames.push("Level 3");
mLevelNames.push("Level 4");
mLevelNames.push("Level 5");
mLevelNames.push("Level 6");
mLevelNames.push("Level 7");
mLevelNames.push("Level 8");
mLevelNames.push("Level 9");
mLevelNames.push("Level 10");
mLevelNames.push("Level 11");
mLevelNames.push("Finale");
var _local1:SharedObject = SharedObject.getLocal("levelProgress");
if (!_local1){
mMaxAvailableLevel = 0;
} else {
mMaxAvailableLevel = _local1.data.mTopLevel;
};
updateLevelContents();
}
public function onNextLevels(_arg1:MouseEvent){
if (mCurLevelStart < cLevelStartMax){
mCurLevelStart = (mCurLevelStart + cLevelStride);
updateLevelContents();
};
}
private function initializeContinueMenu(){
LevelButton1.addEventListener(MouseEvent.CLICK, onLevel1);
LevelButton2.addEventListener(MouseEvent.CLICK, onLevel2);
LevelButton3.addEventListener(MouseEvent.CLICK, onLevel3);
LevelButton4.addEventListener(MouseEvent.CLICK, onLevel4);
LevelButton5.addEventListener(MouseEvent.CLICK, onLevel5);
LevelButton1.visible = true;
LevelButton2.visible = true;
LevelButton3.visible = true;
LevelButton4.visible = true;
LevelButton5.visible = true;
LevelText1.visible = true;
LevelText2.visible = true;
LevelText3.visible = true;
LevelText4.visible = true;
LevelText5.visible = true;
NextButton.addEventListener(MouseEvent.CLICK, onNextLevels);
PrevButton.addEventListener(MouseEvent.CLICK, onPrevLevels);
NextButton.visible = true;
PrevButton.visible = true;
}
protected function closeOptionsMenu(){
mActionQueue.push(cCloseOptionsMenu);
mOptionsOpen = false;
}
function frame110(){
stop();
}
public function executeAction(_arg1:uint){
gotoAndPlay(mStartPoints[_arg1]);
}
public function clearActions(){
mCurAction = -1;
while (mActionQueue.length > 0) {
mActionQueue.pop();
};
if (mContinueOpen){
initializeContinueMenu();
};
}
public function onContinue(_arg1:MouseEvent){
if (mOptionsOpen){
closeOptionsMenu();
};
if (!mContinueOpen){
openContinueMenu();
} else {
closeContinueMenu();
};
}
function frame45(){
stop();
}
protected function openContinueMenu(){
mActionQueue.push(cOpenContinueMenu);
mContinueOpen = true;
}
function frame89(){
stop();
}
public function onPrevLevels(_arg1:MouseEvent){
if (mCurLevelStart > 0){
mCurLevelStart = (mCurLevelStart - cLevelStride);
updateLevelContents();
};
}
public function onNewGame(_arg1:MouseEvent){
GameLoader.startNewGame();
}
public function shutdown(){
continueButton.removeEventListener(MouseEvent.CLICK, onContinue);
newGameButton.removeEventListener(MouseEvent.CLICK, onNewGame);
if (LevelButton1.visible){
shutdownContinueMenu();
};
}
public function onOptions(_arg1:MouseEvent){
if (mContinueOpen){
closeContinueMenu();
};
if (!mOptionsOpen){
openOptionsMenu();
} else {
closeOptionsMenu();
};
}
function frame99(){
stop();
}
private function updateButtonAvailability(_arg1:uint, _arg2:Boolean){
mLevelButtonArray[_arg1].enabled = _arg2;
var _local3:Number = 1;
var _local4 = 0xFFFFFF;
if (!_arg2){
_local3 = 0.5;
_local4 = 0x777777;
};
mLevelButtonArray[_arg1].alpha = _local3;
mLevelTextArray[_arg1].alpha = _local3;
mLevelTextArray[_arg1].textColor = _local4;
}
public function updateAction(_arg1:Event){
var _local2:Boolean;
var _local3:uint;
while (_local3 < mEndPoints.length) {
if (currentFrame == mEndPoints[_local3]){
_local2 = true;
};
_local3++;
};
if (((_local2) && ((mActionQueue.length > 0)))){
mCurAction++;
if (mCurAction == mActionQueue.length){
clearActions();
} else {
executeAction(mActionQueue[mCurAction]);
};
};
}
private function shutdownContinueMenu(){
if (LevelButton1 == null){
return;
};
LevelButton1.removeEventListener(MouseEvent.CLICK, onLevel1);
LevelButton2.removeEventListener(MouseEvent.CLICK, onLevel2);
LevelButton3.removeEventListener(MouseEvent.CLICK, onLevel3);
LevelButton4.removeEventListener(MouseEvent.CLICK, onLevel4);
LevelButton5.removeEventListener(MouseEvent.CLICK, onLevel5);
LevelButton1.visible = false;
LevelButton2.visible = false;
LevelButton3.visible = false;
LevelButton4.visible = false;
LevelButton5.visible = false;
LevelText1.visible = false;
LevelText2.visible = false;
LevelText3.visible = false;
LevelText4.visible = false;
LevelText5.visible = false;
NextButton.visible = false;
PrevButton.visible = false;
}
protected function closeContinueMenu(){
if (mActionQueue.length == 0){
shutdownContinueMenu();
};
mActionQueue.push(cCloseContinueMenu);
mContinueOpen = false;
}
public function onLevel1(_arg1:MouseEvent){
if (!LevelButton1.enabled){
return;
};
GameLoader.startAtLevel((mCurLevelStart + 1));
}
public function onLevel2(_arg1:MouseEvent){
if (!LevelButton2.enabled){
return;
};
GameLoader.startAtLevel((mCurLevelStart + 2));
}
public function onLevel3(_arg1:MouseEvent){
if (!LevelButton3.enabled){
return;
};
GameLoader.startAtLevel((mCurLevelStart + 3));
}
public function onLevel4(_arg1:MouseEvent){
if (!LevelButton4.enabled){
return;
};
GameLoader.startAtLevel((mCurLevelStart + 4));
}
protected function openOptionsMenu(){
mActionQueue.push(cOpenOptionsMenu);
mOptionsOpen = true;
}
public function updateLevelContents(){
var _local1:uint;
var _local2:uint;
while (_local2 < cLevelOffset) {
_local1 = (_local2 + mCurLevelStart);
mLevelTextArray[_local2].text = mLevelNames[_local1];
updateButtonAvailability(_local2, (_local1 <= mMaxAvailableLevel));
_local2++;
};
}
public function onLevel5(_arg1:MouseEvent){
if (!LevelButton5.enabled){
return;
};
GameLoader.startAtLevel((mCurLevelStart + 5));
}
}
}//package
Section 100
//mcBannedSign (mcBannedSign)
package {
import flash.display.*;
public dynamic class mcBannedSign extends MovieClip {
public var bg:MovieClip;
}
}//package
Section 101
//mcCrownMask (mcCrownMask)
package {
import flash.display.*;
public dynamic class mcCrownMask extends MovieClip {
}
}//package
Section 102
//mcFerryLine (mcFerryLine)
package {
import flash.display.*;
public dynamic class mcFerryLine extends MovieClip {
}
}//package
Section 103
//mcLogoHolder (mcLogoHolder)
package {
import flash.display.*;
public dynamic class mcLogoHolder extends MovieClip {
}
}//package
Section 104
//mcLogoMask (mcLogoMask)
package {
import flash.display.*;
public dynamic class mcLogoMask extends MovieClip {
}
}//package
Section 105
//mcOtherGames (mcOtherGames)
package {
import flash.display.*;
public dynamic class mcOtherGames extends MovieClip {
}
}//package
Section 106
//mcPlay (mcPlay)
package {
import flash.display.*;
public dynamic class mcPlay extends MovieClip {
}
}//package
Section 107
//mcWaterRing (mcWaterRing)
package {
import flash.display.*;
public dynamic class mcWaterRing extends MovieClip {
public function mcWaterRing(){
addFrameScript(39, frame40);
}
function frame40(){
stop();
}
}
}//package
Section 108
//MenuParticles (MenuParticles)
package {
import flash.events.*;
import flash.display.*;
public class MenuParticles extends SystemMovieClip {
var mParticleStream:MenuParticleStream;
public function MenuParticles(){
mParticleStream = new MenuParticleStream(MenuStarGuy, 800, 600, 5, 0.005);
super();
addChild(mParticleStream);
this.stage.addEventListener(Event.ENTER_FRAME, updateParticles);
}
override public function applyStage(_arg1:Stage){
super.applyStage(_arg1);
this.stage.addEventListener(FrameListener.BEGIN_FRAME, updateParticles);
}
public function updateParticles(_arg1:Event){
mParticleStream.update();
}
override public function withdrawStage(_arg1:Stage){
super.withdrawStage(_arg1);
this.stage.removeEventListener(FrameListener.BEGIN_FRAME, updateParticles);
}
}
}//package
Section 109
//MenuParticleStream (MenuParticleStream)
package {
import flash.display.*;
public class MenuParticleStream extends MovieClip {
var mParticles:Array;
var mMinVelocity:Number;// = 0
var mNumParticles:uint;// = 0
var mParticleClass:Class;
var mFade:Number;// = 0
var mUpDown:int;
var mMaxVelocity:Number;// = 0
var mWidth:Number;// = 0
var mHeight:Number;// = 0
var alphaSubtract:Boolean;
static const alphaDeltaPP = 0.005;
static const upperStrobeAlpha = 1;
static const lowerStrobeAlpha = 0.2;
public function MenuParticleStream(_arg1:Class, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number=0, _arg6:Boolean=true, _arg7:Number=1, _arg8:Number=4){
var _local10:Number;
var _local11:Particle;
mParticles = new Array();
super();
mParticleClass = _arg1;
mHeight = _arg3;
mWidth = _arg2;
mNumParticles = _arg4;
mMinVelocity = _arg7;
mMaxVelocity = _arg8;
mFade = _arg5;
mUpDown = 1;
alphaSubtract = _arg6;
var _local9:int;
while (_local9 < mNumParticles) {
_local10 = Physics.randRange((-(mHeight) / 2), (mHeight / 2));
_local11 = new Particle(mParticleClass, this, (-(mWidth) / 2), _local10);
_local11.xVel = Physics.randRange(mMinVelocity, mMaxVelocity);
_local11.yVel = 0;
mParticles.push(_local11);
startParticle(_local11);
_local9++;
};
}
public function update(){
var _local1:int;
while (_local1 < mNumParticles) {
mParticles[_local1].update();
if ((((mParticles[_local1].clip.alpha >= lowerStrobeAlpha)) && ((alphaSubtract == true)))){
mParticles[_local1].clip.alpha = (mParticles[_local1].clip.alpha - alphaDeltaPP);
} else {
mParticles[_local1].clip.alpha = (mParticles[_local1].clip.alpha + alphaDeltaPP);
};
if (mParticles[_local1].clip.alpha <= lowerStrobeAlpha){
alphaSubtract = false;
};
if (mParticles[_local1].clip.alpha >= upperStrobeAlpha){
alphaSubtract = true;
};
if (mParticles[_local1].clip.x >= (mWidth / 2)){
startParticle(mParticles[_local1]);
};
_local1++;
};
}
private function startParticle(_arg1:Particle){
var _local2:Number = ((Math.random() * (1 - 0.7)) + 0.7);
_arg1.clip.x = -((mWidth / 2));
_arg1.clip.y = Physics.randRange((-(mHeight) / 2), (mHeight / 2));
_arg1.xVel = Physics.randRange(mMinVelocity, mMaxVelocity);
_arg1.yVel = 0;
_arg1.clip.alpha = ((Math.random() * (1 - 0.5)) + 0.5);
_arg1.clip.scaleX = _local2;
_arg1.clip.scaleY = _local2;
}
}
}//package
Section 110
//MenuStarGuy (MenuStarGuy)
package {
import flash.display.*;
public class MenuStarGuy extends MovieClip {
}
}//package
Section 111
//MoreButton (MoreButton)
package {
import flash.events.*;
import com.midasplayer.*;
public class MoreButton extends KingButton {
override public function onClick(_arg1:MouseEvent){
KingAPI.openOtherGamesLink();
}
}
}//package
Section 112
//MousePointerText (MousePointerText)
package {
public dynamic class MousePointerText extends HintText {
}
}//package
Section 113
//MoveCameraFunctor (MoveCameraFunctor)
package {
import flash.geom.*;
public class MoveCameraFunctor {
var mDir:Point;// = null
var mNextBox:CameraBox;// = null
var mPrevBox:CameraBox;// = null
public function MoveCameraFunctor(_arg1:Trigger, _arg2:CameraBox, _arg3:CameraBox=null){
_arg1.addTriggerFunction(switchCamera);
mNextBox = _arg2;
if (_arg3 != null){
mPrevBox = _arg3;
mDir = new Point((mNextBox.x - mPrevBox.x), (mNextBox.y - mPrevBox.y));
};
}
public function switchCamera(_arg1:Trigger){
var _local2:Point;
var _local3:Number;
if (!mPrevBox){
mPrevBox = MyCamera.getInstance().getCameraBox();
mDir = new Point((mNextBox.x - mPrevBox.x), (mNextBox.y - mPrevBox.y));
MyCamera.getInstance().setCameraBox(mNextBox);
} else {
_local2 = Game.getInstance().getPlayer().getVelocity();
if ((((_local2.x == 0)) && ((_local2.y == 0)))){
return;
};
_local3 = ((mDir.x * _local2.x) + (mDir.y * _local2.y));
if (_local3 > 0){
MyCamera.getInstance().setCameraBox(mNextBox);
} else {
if (_local3 < 0){
MyCamera.getInstance().setCameraBox(mPrevBox);
} else {
if (_local3 == 0){
};
};
};
};
}
}
}//package
Section 114
//MyCamera (MyCamera)
package {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
public class MyCamera {
var mMainContents:Sprite;
var mPanModeX:Boolean;// = false
var mPanModeY:Boolean;// = false
var mHud:Sprite;
var mScreenWidth:int;// = 0
var mScreenHeight:int;// = 0
var mParalax:Sprite;
var mMainBin:DisplayObjectContainer;// = null
var mScreenMiddleX:int;// = 0
var mScreenMiddleY:int;// = 0
var mCurBox:CameraBox;// = null
var mBackground:Sprite;
public static const paralaxFactor:Number = 1.5;
static const panTrans:uint = 1;
static const snapTrans:uint = 0;
private static var sInstance:MyCamera = null;
public function MyCamera(){
mHud = new Sprite();
mBackground = new Sprite();
mMainContents = new Sprite();
mParalax = new Sprite();
super();
}
public function updateCamera(_arg1:Event){
if (mCurBox){
mCurBox.updateParticles();
};
centerCameraOnPlayer();
}
public function getWidth():Number{
return (mScreenWidth);
}
public function setCameraBox(_arg1:CameraBox, _arg2:uint=0){
if (_arg1 == mCurBox){
return;
};
if (mCurBox){
mCurBox.deactivate();
mCurBox = null;
};
mCurBox = _arg1;
mCurBox.activate();
mPanModeX = (mCurBox.width > (mScreenWidth + 5));
mPanModeY = (mCurBox.height > (mScreenHeight + 5));
var _local3:Point = new Point(mScreenMiddleX, mScreenMiddleY);
var _local4:Point = _arg1.getAbsPos();
moveCamera((_local4.x - _local3.x), (_local4.y - _local3.y));
centerCameraOnPlayer();
}
public function addToBackground(_arg1:DisplayObject, _arg2:Boolean=false){
if (_arg2){
_arg1.x = (getWidth() / 2);
_arg1.y = (getHeight() / 2);
};
mBackground.addChild(_arg1);
}
public function getMainBin():Sprite{
return (mMainContents);
}
public function addToHud(_arg1:DisplayObject, _arg2:Boolean=false){
if (_arg2){
_arg1.x = (getWidth() / 2);
_arg1.y = (getHeight() / 2);
};
mHud.addChild(_arg1);
}
public function getHeight():Number{
return (mScreenHeight);
}
private function moveCamera(_arg1:int, _arg2:int){
var _local3:DisplayObject;
var _local4:int;
while (_local4 < mMainBin.numChildren) {
_local3 = mMainBin.getChildAt(_local4);
_local3.x = (_local3.x - _arg1);
_local3.y = (_local3.y - _arg2);
_local4++;
};
mHud.x = 0;
mHud.y = 0;
mBackground.x = 0;
mBackground.y = 0;
mParalax.x = 0;
mParalax.y = 0;
if (mCurBox){
mCurBox.updateParalax(_arg1, _arg2);
};
var _local5:Paralax;
_local4 = 0;
while (_local4 < mParalax.numChildren) {
_local5 = Paralax(mParalax.getChildAt(_local4));
_local5.onCameraMove(_arg1, _arg2);
_local4++;
};
}
public function addToParalax(_arg1:Paralax, _arg2:Boolean=false){
if (_arg2){
_arg1.x = (getWidth() / 2);
_arg1.y = (getHeight() / 2);
};
mParalax.addChild(_arg1);
}
public function resetHud(_arg1:Stage){
Game.getInstance().getStage().addChild(mHud);
}
public function centerCameraOnPlayer(){
var _local8:Number;
var _local9:Number;
var _local10:Number;
var _local11:Number;
var _local12:Number;
var _local13:Number;
if (((!(mPanModeX)) && (!(mPanModeY)))){
return;
};
var _local1:PlayerShip = Game.getInstance().getPlayer();
if (!_local1){
return;
};
var _local2:int;
var _local3:int;
var _local4:Point = new Point(mScreenMiddleX, mScreenMiddleY);
var _local5:Point = mCurBox.getBoxMin().add(_local4);
var _local6:Point = mCurBox.getBoxMax().subtract(_local4);
var _local7:Point = _local1.getAbsPos();
if (mPanModeY){
_local8 = (_local7.y - _local5.y);
_local9 = (_local6.y - _local7.y);
_local10 = 0;
if (_local8 < 0){
_local10 = _local5.y;
} else {
if (_local9 < 0){
_local10 = _local6.y;
} else {
_local10 = _local7.y;
};
};
if (_local10 != mScreenMiddleY){
_local3 = (_local10 - mScreenMiddleY);
};
} else {
_local3 = 0;
};
if (mPanModeX){
_local11 = (_local7.x - _local5.x);
_local12 = (_local6.x - _local7.x);
_local13 = 0;
if (_local11 < 0){
_local13 = _local5.x;
} else {
if (_local12 < 0){
_local13 = _local6.x;
} else {
_local13 = _local7.x;
};
};
if (_local13 != mScreenMiddleX){
_local2 = (_local13 - mScreenMiddleX);
};
} else {
_local2 = 0;
};
if (((!((_local2 == 0))) || (!((_local3 == 0))))){
moveCamera(_local2, _local3);
};
}
private function clearContainer(_arg1:DisplayObjectContainer, _arg2:Stage){
var _local3:DisplayObject;
while (_arg1.numChildren > 0) {
_local3 = _arg1.removeChildAt((_arg1.numChildren - 1));
if ((_local3 is GameObject)){
GameObject(_local3).withdrawStage(_arg2);
};
};
}
public function getCameraBox():CameraBox{
return (mCurBox);
}
public function setStage(_arg1:Stage){
Game.framelistener.addEventListener(FrameListener.BEGIN_FRAME, updateCamera);
mMainBin = _arg1;
_arg1.addChild(mBackground);
_arg1.addChild(mParalax);
_arg1.addChild(mMainContents);
_arg1.addChild(mHud);
mScreenHeight = _arg1.stageHeight;
mScreenWidth = _arg1.stageWidth;
mScreenMiddleX = (mScreenWidth / 2);
mScreenMiddleY = (mScreenHeight / 2);
}
public function shutdownCamera(_arg1:Stage){
clearContainer(mHud, _arg1);
_arg1.removeChild(mHud);
_arg1.removeChild(mBackground);
_arg1.removeChild(mParalax);
}
public static function getInstance():MyCamera{
if (sInstance == null){
sInstance = new (MyCamera);
};
return (sInstance);
}
}
}//package
Section 115
//MyCross (MyCross)
package {
import flash.display.*;
public dynamic class MyCross extends MovieClip {
}
}//package
Section 116
//Paralax (Paralax)
package {
public class Paralax extends SystemMovieClip {
public function onCameraMove(_arg1:Number, _arg2:Number){
}
}
}//package
Section 117
//Paralax1 (Paralax1)
package {
import flash.display.*;
public class Paralax1 extends MovieClip {
}
}//package
Section 118
//Particle (Particle)
package {
import flash.display.*;
public class Particle {
public var spin:int;// = 0
public var fade:Number;// = 0
public var yVel:int;// = 0
public var xVel:int;// = 0
public var shrink:Number;// = 1
public var gravity:int;// = 0
public var clip:DisplayObject;
public var drag:int;// = 1
public var alphaSubtract:Boolean;// = true
public function Particle(_arg1:Class, _arg2:DisplayObjectContainer, _arg3:int, _arg4:int){
if (_arg1){
clip = new (_arg1);
_arg2.addChild(clip);
clip.x = _arg3;
clip.y = _arg4;
};
}
public function update():void{
clip.x = (clip.x + xVel);
clip.y = (clip.y + yVel);
if (drag > 0){
xVel = (xVel * drag);
yVel = (yVel * drag);
};
yVel = (yVel + gravity);
clip.scaleX = (clip.scaleX * shrink);
clip.scaleY = (clip.scaleY * shrink);
clip.alpha = (clip.alpha - fade);
clip.rotation = (clip.rotation + spin);
}
public function destroy():void{
clip.parent.removeChild(clip);
clip = null;
}
public function setVel(_arg1:Number, _arg2:Number):void{
xVel = _arg1;
yVel = _arg2;
}
}
}//package
Section 119
//ParticleAcc (ParticleAcc)
package {
import flash.display.*;
public class ParticleAcc {
public var yVel:Number;// = 0
public var xVel:Number;// = 0
public var yAcc:Number;// = 0
public var clip:DisplayObject;
public var xAcc:Number;// = 0
public function ParticleAcc(_arg1:Class, _arg2:DisplayObjectContainer, _arg3:int, _arg4:int){
if (_arg1){
clip = new (_arg1);
_arg2.addChild(clip);
clip.x = _arg3;
clip.y = _arg4;
};
}
public function update():void{
xVel = (xVel + xAcc);
yVel = (yVel + yAcc);
clip.x = (clip.x + xVel);
clip.y = (clip.y + yVel);
}
public function setVel(_arg1:Number, _arg2:Number):void{
xVel = _arg1;
yVel = _arg2;
}
}
}//package
Section 120
//ParticleExpl (ParticleExpl)
package {
import flash.display.*;
import flash.geom.*;
import fl.motion.*;
public class ParticleExpl extends MovieClip {
var mParticles:Array;
var mMinVelocity:Number;// = 0
var mNumParticles:uint;// = 0
var mParticleClass:Class;
var mMaxVelocity:Number;// = 0
var mColorTransform:Color;
var mParent:GameObject;// = null
var mWidth:Number;// = 0
var mHeight:Number;// = 0
public function ParticleExpl(_arg1:Class, _arg2:GameObject, _arg3:uint){
var _local7:ExplodeParticle;
mParticles = new Array();
mColorTransform = new Color();
super();
mParticleClass = _arg1;
mParent = _arg2;
mNumParticles = _arg3;
mMinVelocity = -4;
mMaxVelocity = 4;
var _local4:uint = _arg2.getRgbColor(_arg2.getColor());
mColorTransform.setTint(_local4, 1);
this.transform.colorTransform = mColorTransform;
var _local5:Point = _arg2.getAbsPos();
x = _local5.x;
y = _local5.y;
var _local6:uint;
while (_local6 < mNumParticles) {
_local7 = new ExplodeParticle(mParticleClass, this, 0, 0);
mParticles.push(_local7);
startParticle(_local7);
_local6++;
};
}
public function withdrawStage(_arg1:Stage){
if (this.parent){
_arg1.removeChild(this);
};
}
public function update(){
var _local1:uint;
while (_local1 < mNumParticles) {
mParticles[_local1].update();
_local1++;
};
}
public function isStillActive():Boolean{
return ((mParticles[0].clip.alpha > 0));
}
public function applyStage(_arg1:Stage){
_arg1.addChild(this);
}
private function startParticle(_arg1:ExplodeParticle){
_arg1.clip.alpha = 0.5;
_arg1.clip.scaleX = 1;
_arg1.clip.scaleY = 1;
_arg1.fade = ((Math.random() * (0.005 - 0.001)) + 0.001);
_arg1.shrink = ((Math.random() * (1 - 0.98)) + 0.98);
_arg1.xVel = Physics.randRange(mMinVelocity, mMaxVelocity);
_arg1.yVel = Physics.randRange(mMinVelocity, mMaxVelocity);
_arg1.drag = 0.98;
_arg1.spin = ((Math.random() * (15 - 5)) + 5);
}
}
}//package
Section 121
//ParticleParalax (ParticleParalax)
package {
import flash.geom.*;
public class ParticleParalax extends Paralax {
var mParticles:Array;
var mNumUpdateParticles:uint;// = 0
var mNumParticles:uint;// = 0
var mWidth:Number;// = 0
var mDim:Point;// = null
var mScale:Point;// = null
var mRatio:Number;// = 0
var mParticleFadeProperty:Array;
var mParticleClass:Class;
var mHeight:Number;// = 0
var mCurIndex:uint;// = 0
static const alphaDeltaPP = 0.005;
static const upperStrobeAlpha = 1;
static const lowerStrobeAlpha = 0.2;
public function ParticleParalax(_arg1:Class, _arg2:Point, _arg3:Point, _arg4:Number){
var _local6:ParticleAcc;
mParticles = new Array();
mParticleFadeProperty = new Array();
super();
mParticleClass = _arg1;
mDim = _arg2;
mScale = _arg3;
mNumParticles = ((mScale.x * mScale.y) * 4);
mNumUpdateParticles = Math.ceil((mNumParticles * 0.25));
mRatio = _arg4;
var _local5:int;
while (_local5 < mNumParticles) {
_local6 = new ParticleAcc(mParticleClass, this, 0, 0);
mParticles.push(_local6);
startParticle(_local6);
_local5++;
};
}
public function update(){
var _local1 = 3;
var _local2:ParticleAcc;
var _local3:int;
while (_local3 < mNumParticles) {
_local2 = mParticles[mCurIndex];
_local2.update();
_local3++;
};
}
private function startParticle(_arg1:ParticleAcc){
var _local2:Number = Physics.randRange(0.7, 1);
_arg1.clip.x = Physics.randRange((-(mDim.x) / 2), (mDim.x / 2));
_arg1.clip.y = Physics.randRange((-(mDim.y) / 2), (mDim.y / 2));
_arg1.xVel = 0;
_arg1.yVel = 0;
_arg1.clip.scaleX = (_local2 / mScale.x);
_arg1.clip.scaleY = (_local2 / mScale.y);
_arg1.clip.alpha = Physics.randRange(0.25, 0.5);
}
override public function onCameraMove(_arg1:Number, _arg2:Number){
var _local3:Number = ((_arg1 * (mRatio - 1)) / mScale.x);
var _local4:Number = ((_arg2 * (mRatio - 1)) / mScale.y);
x = (x - _local3);
y = (y - _local4);
}
}
}//package
Section 122
//ParticleStream (ParticleStream)
package {
import flash.display.*;
public class ParticleStream extends MovieClip {
var mParticles:Array;
var mMinVelocity:Number;// = 0
var mNumParticles:uint;// = 0
var mParticleClass:Class;
var mFade:Number;// = 0
var mUpDown:int;
var mMaxVelocity:Number;// = 0
var mWidth:Number;// = 0
var mHeight:Number;// = 0
var alphaSubtract:Boolean;
static const alphaDeltaPP = 0.005;
static const upperStrobeAlpha = 1;
static const lowerStrobeAlpha = 0.2;
public function ParticleStream(_arg1:Class, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number=0, _arg6:Boolean=true, _arg7:Number=1, _arg8:Number=5){
var _local10:Number;
var _local11:Particle;
mParticles = new Array();
super();
mParticleClass = _arg1;
mHeight = _arg3;
mWidth = _arg2;
mNumParticles = _arg4;
mMinVelocity = _arg7;
mMaxVelocity = _arg8;
mFade = _arg5;
mUpDown = 1;
alphaSubtract = _arg6;
var _local9:int;
while (_local9 < mNumParticles) {
_local10 = Physics.randRange((-(mHeight) / 2), (mHeight / 2));
_local11 = new Particle(mParticleClass, this, (-(mWidth) / 2), _local10);
_local11.xVel = Physics.randRange(mMinVelocity, mMaxVelocity);
_local11.yVel = 0;
mParticles.push(_local11);
startParticle(_local11);
_local9++;
};
}
public function update(){
var _local1:int;
while (_local1 < mNumParticles) {
mParticles[_local1].update();
if ((((mParticles[_local1].clip.alpha >= lowerStrobeAlpha)) && ((alphaSubtract == true)))){
mParticles[_local1].clip.alpha = (mParticles[_local1].clip.alpha - alphaDeltaPP);
} else {
mParticles[_local1].clip.alpha = (mParticles[_local1].clip.alpha + alphaDeltaPP);
};
if (mParticles[_local1].clip.alpha <= lowerStrobeAlpha){
alphaSubtract = false;
};
if (mParticles[_local1].clip.alpha >= upperStrobeAlpha){
alphaSubtract = true;
};
if (mParticles[_local1].clip.x >= (mWidth / 2)){
startParticle(mParticles[_local1]);
};
_local1++;
};
}
private function startParticle(_arg1:Particle){
var _local2:Number = ((Math.random() * (1 - 0.7)) + 0.7);
_arg1.clip.x = -((mWidth / 2));
_arg1.clip.y = Physics.randRange((-(mHeight) / 2), (mHeight / 2));
_arg1.xVel = Physics.randRange(mMinVelocity, mMaxVelocity);
_arg1.yVel = 0;
_arg1.clip.alpha = ((Math.random() * (1 - 0.5)) + 0.5);
_arg1.clip.scaleX = _local2;
_arg1.clip.scaleY = _local2;
}
}
}//package
Section 123
//ParticleWake (ParticleWake)
package {
import flash.display.*;
import flash.geom.*;
import fl.motion.*;
public class ParticleWake extends MovieClip {
var mParticles:Array;
var mMinVelocity:Number;// = 0
var mNumParticles:uint;// = 0
var mParticleClass:Class;
var mNextParticle:int;// = 0
var mMaxVelocity:Number;// = 0
var mParent:GameObject;// = null
var mWidth:Number;// = 0
var mHeight:Number;// = 0
public function ParticleWake(_arg1:Class, _arg2:GameObject){
var _local4:WakeParticle;
mParticles = new Array();
super();
mParticleClass = _arg1;
mParent = _arg2;
mNumParticles = 40;
mMinVelocity = -2;
mMaxVelocity = 2;
var _local3:uint;
while (_local3 < mNumParticles) {
_local4 = new WakeParticle(mParticleClass, this, 0, 0);
mParticles.push(_local4);
_local4.clip.visible = false;
_local3++;
};
}
public function update(){
var _local1:uint;
while (_local1 < mNumParticles) {
if (mParticles[_local1].clip.alpha > 0){
mParticles[_local1].update();
};
_local1++;
};
var _local2:int;
if (mParent.getVelocity().length > 0){
_local2 = Math.round(Physics.randRange(0, 4));
};
_local1 = 0;
while (_local1 < _local2) {
startParticle(mParticles[mNextParticle]);
mNextParticle = ((mNextParticle + 1) % mNumParticles);
_local1++;
};
}
public function applyStage(_arg1:Stage){
var _local2:uint;
while (_local2 < mNumParticles) {
_arg1.addChild(mParticles[_local2].clip);
_local2++;
};
}
private function startParticle(_arg1:WakeParticle){
var _local7:Number;
var _local8:Number;
var _local2:Point = mParent.getAbsPos();
_arg1.clip.visible = true;
var _local3:int = mParent.getRot();
var _local4:Color = new Color();
var _local5:uint = mParent.getColor();
var _local6:uint = GameColor.getRgb(_local5);
_local4.setTint(_local6, 1);
_arg1.clip.transform.colorTransform = _local4;
if (mParent.getVelocity().length > 0){
_arg1.clip.alpha = 0.5;
_local7 = Physics.randRange(-7, 7);
_local8 = Physics.randRange(0.8, 1);
_arg1.clip.scaleX = _local8;
_arg1.clip.scaleY = _local8;
_arg1.fade = ((Math.random() * (0.025 - 0.005)) + 0.005);
_arg1.shrink = ((Math.random() * (1 - 0.9)) + 0.9);
if (_local3 == 0){
_arg1.clip.x = (_local2.x + _local7);
_arg1.clip.y = (_local2.y + 20);
_arg1.xVel = Physics.randRange(mMinVelocity, mMaxVelocity);
_arg1.yVel = Physics.randRange(0, 1);
} else {
if (_local3 == 180){
_arg1.clip.x = (_local2.x + _local7);
_arg1.clip.y = (_local2.y - 20);
_arg1.xVel = Physics.randRange(mMinVelocity, mMaxVelocity);
_arg1.yVel = Physics.randRange(0, -1);
} else {
if (_local3 == -90){
_arg1.clip.x = (_local2.x + 20);
_arg1.clip.y = (_local2.y + _local7);
_arg1.xVel = Physics.randRange(1, 0);
_arg1.yVel = Physics.randRange(mMinVelocity, mMaxVelocity);
} else {
if (_local3 == 90){
_arg1.clip.x = (_local2.x - 20);
_arg1.clip.y = (_local2.y + _local7);
_arg1.xVel = Physics.randRange(0, 1);
_arg1.yVel = Physics.randRange(mMinVelocity, mMaxVelocity);
} else {
if (_local3 == 45){
_arg1.clip.x = (_local2.x - 14.15);
_arg1.clip.y = (_local2.y + 14.15);
_arg1.xVel = Physics.randRange((mMinVelocity / 2), (mMaxVelocity / 2));
_arg1.yVel = Physics.randRange((mMinVelocity / 2), (mMaxVelocity / 2));
} else {
if (_local3 == -45){
_arg1.clip.x = (_local2.x + 14.15);
_arg1.clip.y = (_local2.y + 14.15);
_arg1.xVel = Physics.randRange((mMinVelocity / 2), (mMaxVelocity / 2));
_arg1.yVel = Physics.randRange((mMinVelocity / 2), (mMaxVelocity / 2));
} else {
if (_local3 == 135){
_arg1.clip.x = (_local2.x - 14.15);
_arg1.clip.y = (_local2.y - 14.15);
_arg1.xVel = Physics.randRange((mMinVelocity / 2), (mMaxVelocity / 2));
_arg1.yVel = Physics.randRange((mMinVelocity / 2), (mMaxVelocity / 2));
} else {
if (_local3 == -135){
_arg1.clip.x = (_local2.x + 14.15);
_arg1.clip.y = (_local2.y - 14.15);
_arg1.xVel = Physics.randRange((mMinVelocity / 2), (mMaxVelocity / 2));
_arg1.yVel = Physics.randRange((mMinVelocity / 2), (mMaxVelocity / 2));
};
};
};
};
};
};
};
};
} else {
_arg1.clip.alpha = 0;
};
}
public function withdrawStage(_arg1:Stage){
var _local2:uint;
while (_local2 < mNumParticles) {
_arg1.removeChild(mParticles[_local2].clip);
_local2++;
};
}
}
}//package
Section 124
//PathEnemy (PathEnemy)
package {
import flash.events.*;
import flash.geom.*;
public class PathEnemy extends EnemyPathFollowerBase {
override public function updateMovement(_arg1:Event){
if (mDead){
return;
};
mVelocity.x = (mVelocity.x + mAcceleration.x);
mVelocity.y = (mVelocity.y + mAcceleration.y);
if (((!((mVelocity.x == 0))) || (!((mVelocity.y == 0))))){
x = (x + mVelocity.x);
y = (y + mVelocity.y);
};
}
override public function getKnockbackDir(_arg1:Point):Point{
var _local2:Point;
var _local3:Point;
var _local4:Number;
if (hasPath()){
_local2 = getVelocity();
_local3 = _arg1.subtract(getAbsPos());
_local4 = ((_local2.x * _local3.x) + (_local2.y * _local3.y));
if (_local4 < 0){
_local2.x = (_local2.x * -1);
_local2.y = (_local2.y * -1);
};
return (_local2);
//unresolved jump
};
return (_arg1.subtract(getAbsPos()));
}
override public function getEnemyType():uint{
return (ai_Path);
}
override public function updateEnemyAI(_arg1:Event){
updateMovementAlongPath();
}
override public function getRadius():Number{
return (24);
}
}
}//package
Section 125
//Physics (Physics)
package {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
public class Physics {
public function checkForCollisions(_arg1:Event){
var _local31:int;
var _local32:Boolean;
var _local33:Boolean;
var _local34:Sprite;
var _local35:ColorField;
var _local2:PlayerShip = Game.getInstance().getPlayer();
if (!_local2){
return;
};
if (!_local2.isActive()){
return;
};
var _local3:Stage = Game.getInstance().getStage();
var _local4:Point = _local2.getAbsPos();
var _local5:Number = PlayerShip.sRadius;
var _local6:Sprite = Game.getInstance().getBin(GameObject.type_Bullet);
var _local7:Bullet;
var _local8:Point;
var _local9:Number = Bullet.cRadius;
var _local10:Array = new Array();
var _local11:Sprite = Game.getInstance().getBin(GameObject.type_Enemy);
var _local12:Enemy;
var _local13:Point;
var _local14:Number = 0;
var _local15:Sprite = Game.getInstance().getBin(GameObject.type_EnemyBullet);
var _local16:EnemyBullet;
var _local17:Point;
var _local18:Array = new Array();
var _local19:Sprite = Game.getInstance().getBin(GameObject.type_Switch);
var _local20:GameObject;
var _local21:Point;
var _local22:Number = 0;
if (!_local11){
return;
};
var _local23:int;
while (_local23 < _local6.numChildren) {
_local7 = Bullet(_local6.getChildAt(_local23));
_local8 = _local7.getAbsPos();
_local31 = 0;
_local32 = false;
_local31 = 0;
while (_local31 < _local11.numChildren) {
_local12 = Enemy(_local11.getChildAt(_local31));
_local13 = _local12.getAbsPos();
_local14 = _local12.getRadius();
if (((_local12.isActive()) && (areCirclesColliding(_local13, _local14, _local8, _local9)))){
_local32 = true;
_local12.hitColor(_local7.getColor(), _local7.isCharged());
};
_local31++;
};
_local31 = 0;
while (_local31 < _local19.numChildren) {
_local20 = GameObject(_local19.getChildAt(_local31));
_local21 = _local20.getAbsPos();
_local22 = _local20.getRadius();
if (areCirclesColliding(_local21, _local22, _local8, _local9)){
_local20.hitColor(_local7.getColor(), _local7.isCharged());
_local32 = true;
};
_local31++;
};
if (_local32){
_local10.push(_local7);
};
_local23++;
};
while (_local10.length > 0) {
_local10.pop().hitWall();
};
var _local24:Array = new Array();
var _local25:Array = Game.getInstance().getFloorBin();
var _local26:ColorFloor;
var _local27:Boolean;
_local31 = 0;
while (_local31 < _local11.numChildren) {
_local12 = Enemy(_local11.getChildAt(_local31));
if (!_local12.isActive()){
} else {
_local23 = 0;
while (_local23 < _local25.length) {
_local26 = ColorFloor(_local25[_local23]);
if ((((_local26.getColor() == _local12.getColor())) && (isPointColliding(_local3, _local26, _local12.getAbsPos())))){
_local24.push(_local12);
};
_local23++;
};
};
_local31++;
};
while (_local24.length > 0) {
_local24.pop().matchColorFloor();
};
if (_local2.isHitable()){
_local33 = false;
_local31 = 0;
while (_local31 < _local11.numChildren) {
_local12 = Enemy(_local11.getChildAt(_local31));
if (!_local12.isActive()){
} else {
_local13 = _local12.getAbsPos();
_local14 = _local12.getRadius();
if (areCirclesColliding(_local13, _local14, _local4, _local5)){
_local2.hitFromEnemy(_local12);
_local31 = _local11.numChildren;
_local33 = true;
};
};
_local31++;
};
_local31 = 0;
while (_local31 < _local15.numChildren) {
_local16 = EnemyBullet(_local15.getChildAt(_local31));
_local17 = _local16.getAbsPos();
if (areCirclesColliding(_local17, EnemyBullet.cRadius, _local4, _local5)){
_local2.hitFromBullet(_local16);
_local18.push(_local16);
_local31 = _local15.numChildren;
_local33 = true;
};
_local31++;
};
while (_local18.length > 0) {
GameObject(_local18.pop()).destroy();
};
};
var _local28:ColorFloor = Game.getInstance().getGlobalFloor();
if (_local28){
_local34 = Game.getInstance().getBin(GameObject.type_ColorField);
_local35 = null;
_local23 = 0;
while (_local23 < _local34.numChildren) {
_local35 = ColorField(_local34.getChildAt(_local23));
if (((!((_local35.getColor() == _local28.getColor()))) && (isPointColliding(_local3, _local35, _local4)))){
_local28.transitionColorTo(_local35.getColor());
};
_local23++;
};
};
var _local29:Sprite = Game.getInstance().getBin(GameObject.type_Trigger);
var _local30:Trigger;
_local23 = 0;
while (_local23 < _local29.numChildren) {
_local30 = Trigger(_local29.getChildAt(_local23));
if (isPointColliding(_local3, _local30, _local4)){
_local30.hit();
_local23 = _local29.numChildren;
} else {
if (_local30.isTriggered()){
_local30.hitOnLeave();
_local23 = _local29.numChildren;
};
};
_local23++;
};
}
public function setStage(_arg1:Stage){
_arg1.addEventListener(Event.ENTER_FRAME, this.checkForCollisions);
}
public function hitWall(_arg1:GameObject):Boolean{
var _local12:Sprite;
var _local13:Enemy;
var _local14:Point;
var _local2:Sprite = Game.getInstance().getBin(GameObject.type_Wall);
var _local3:* = Wall.sVisible;
var _local4:Wall;
var _local5:Point = _arg1.getAbsPos();
var _local6:Number = _arg1.getRadius();
var _local7:int;
_local7 = 0;
while (_local7 < _local2.numChildren) {
_local4 = Wall(_local2.getChildAt(_local7));
if (((isColliding(_local4, _arg1)) && (isWallColliding(_local4, _local5, _local6)))){
return (true);
};
_local7++;
};
var _local8:Sprite = Game.getInstance().getBin(GameObject.type_ColorWall);
var _local9:ColorWall;
_local7 = 0;
while (_local7 < _local8.numChildren) {
_local9 = ColorWall(_local8.getChildAt(_local7));
if (((((_local9.isWallActive()) && (isColliding(_local9, _arg1)))) && (isWallColliding(_local9, _local5, _local6)))){
return (true);
};
_local7++;
};
var _local10:Sprite = Game.getInstance().getBin(GameObject.type_Door);
var _local11:Door;
_local7 = 0;
while (_local7 < _local10.numChildren) {
_local11 = Door(_local10.getChildAt(_local7));
if (((((_local11.isClosed()) && (isColliding(_local11, _arg1)))) && (isWallColliding(_local11, _local5, _local6)))){
return (true);
};
_local7++;
};
if ((((_arg1.getType() == GameObject.type_Enemy)) && ((Enemy(_arg1).getEnemyType() == Enemy.ai_Chase)))){
_local12 = Game.getInstance().getBin(GameObject.type_Enemy);
_local13 = null;
_local14 = null;
_local7 = 0;
while (_local7 < _local12.numChildren) {
_local13 = Enemy(_local12.getChildAt(_local7));
if (((((!(_local13.isActive())) || (!((_local13.getEnemyType() == Enemy.ai_Chase))))) || ((_local13 == _arg1)))){
} else {
_local14 = _local13.getAbsPos();
if (areCirclesColliding(_local5, _local6, _local14, _local13.getRadius())){
return (true);
};
};
_local7++;
};
};
return (false);
}
public static function isColliding(_arg1:DisplayObject, _arg2:DisplayObject):Boolean{
return (_arg1.hitTestObject(_arg2));
}
public static function isPointColliding(_arg1:Stage, _arg2:DisplayObject, _arg3:Point):Boolean{
return (_arg2.getBounds(_arg1).contains(_arg3.x, _arg3.y));
}
public static function isWallColliding(_arg1:WallBase, _arg2:Point, _arg3:Number){
var _local4:Point = _arg1.getFirstPoint();
var _local5:Point = _arg1.getSecondPoint(_local4);
return (isLineCircleColliding(_local4, _local5, _arg2, _arg3));
}
public static function randRange(_arg1:Number, _arg2:Number):Number{
return (((Math.random() * (_arg2 - _arg1)) + _arg1));
}
public static function calculateDistance(_arg1, _arg2):Number{
var _local3:*;
var _local4:*;
var _local5:Number;
_local4 = (_arg2.x - _arg1.x);
_local5 = (_arg2.y - _arg1.y);
_local3 = Math.sqrt(((_local4 * _local4) + (_local5 * _local5)));
return (_local3);
}
public static function areCirclesColliding(_arg1:Point, _arg2:Number, _arg3:Point, _arg4:Number):Boolean{
var _local5:Number = (_arg2 + _arg4);
var _local6:Point = _arg1.subtract(_arg3);
return ((_local6.length < _local5));
}
public static function isLineCircleColliding(_arg1:Point, _arg2:Point, _arg3:Point, _arg4:Number):Boolean{
var _local5:Point;
var _local6:Point;
var _local9:Point;
_local5 = _arg2.subtract(_arg1);
_local6 = _arg3.subtract(_arg1);
var _local7:Number = (((_local6.x * _local5.x) + (_local6.y * _local5.y)) / (_local5.length * _local5.length));
var _local8:Number = (_arg4 / _local5.length);
if (_local7 < 0){
return ((_local6.length < _arg4));
};
if (_local7 > 1){
return ((_arg3.subtract(_arg2).length < _arg4));
};
_local9 = _arg1.add(new Point((_local7 * _local5.x), (_local7 * _local5.y)));
return ((_arg3.subtract(_local9).length < _arg4));
}
}
}//package
Section 126
//PlayerDeathAnimation (PlayerDeathAnimation)
package {
import flash.display.*;
public dynamic class PlayerDeathAnimation extends MovieClip {
}
}//package
Section 127
//PlayerHealth (PlayerHealth)
package {
import flash.display.*;
import flash.filters.*;
public class PlayerHealth extends MovieClip {
public var BR:MovieClip;
public var TL:MovieClip;
public var BL:MovieClip;
public var TR:MovieClip;
public function PlayerHealth(){
var _local1:GradientGlowFilter = new GradientGlowFilter();
_local1.distance = 0;
_local1.angle = 45;
_local1.colors = [0, 0xFFFFFF];
_local1.alphas = [0, 1];
_local1.ratios = [0, 0xFF];
_local1.blurX = 20;
_local1.blurY = 20;
_local1.strength = 3;
_local1.quality = BitmapFilterQuality.HIGH;
_local1.type = BitmapFilterType.OUTER;
this.filters = [_local1];
this.TR.alpha = 0;
this.BR.alpha = 0;
this.BL.alpha = 0;
this.TL.alpha = 0;
}
public function UpdateHealth(_arg1:Number){
var _local2:Number = 0.02;
if (_arg1 >= 1){
if (this.TR.alpha > 0){
this.TR.alpha = (this.TR.alpha - _local2);
this.BR.alpha = (this.BR.alpha - _local2);
this.BL.alpha = (this.BL.alpha - _local2);
this.TL.alpha = (this.TL.alpha - _local2);
} else {
this.TR.alpha = 0;
this.BR.alpha = 0;
this.BL.alpha = 0;
this.TL.alpha = 0;
};
} else {
if (0.75 <= _arg1){
this.TR.alpha = ((_arg1 - 0.75) * 2);
this.BR.alpha = 0.5;
this.BL.alpha = 0.5;
this.TL.alpha = 0.5;
} else {
if (0.5 <= _arg1){
this.TR.alpha = 0;
this.BR.alpha = ((_arg1 - 0.5) * 2);
this.BL.alpha = 0.5;
this.TL.alpha = 0.5;
} else {
if (0.25 <= _arg1){
this.TR.alpha = 0;
this.BR.alpha = 0;
this.BL.alpha = ((_arg1 - 0.25) * 2);
this.TL.alpha = 0.5;
} else {
if (0 <= _arg1){
this.TR.alpha = 0;
this.BR.alpha = 0;
this.BL.alpha = 0;
this.TL.alpha = ((_arg1 - 0) * 2);
};
};
};
};
};
}
}
}//package
Section 128
//PlayerShip (PlayerShip)
package {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
public class PlayerShip extends GameObject {
private const sKey:int = 83;
private const cDeceleration:Number = 1.5;
private const upArrow:int = 38;
const mInvulnerabilityInc:int = 30;
private const aKey:int = 65;
private const leftArrow:int = 37;
private const tKey:int = 84;
private const rightArrow:int = 39;
private const dKey:int = 68;
const mIndicatorRadius:Number = 15;
private const wKey:int = 87;
private const spaceKey:int = 32;
private const shiftKey:int = 16;
private const cAcceleration:Number = 0.5;
private const downArrow:int = 40;
private const rKey:int = 82;
private const eKey:int = 69;
private const cChargeMax:int = 12;
private const ctrlKey:int = 17;
const mRegenerateIncrement:Number = 0.00666666666666667;
private var mChargePower:int;// = 0
public var mColorWheel:ColorWheel;
var upPressed:Boolean;// = false
var leftPressed:Boolean;// = false
var downPressed:Boolean;// = false
var leftClickPressed:Boolean;// = false
private var MAX_FIRING_CAPABILITY:Number;// = 6
public var mHealthBar:PlayerHealth;
var superPickupYellow:SuperPickupYellow;
var mHealth:Number;// = 1
private var bulletsFrameCount:Number;// = 0
var superPickupRed:SuperPickupRed;
var mPushVelocity:Point;
public var mFilter:Filter;
var colorWheelPressed:Boolean;// = false
private var mChargeRing:ChargeRing;
private var bulletsFiredCount:Number;// = 0
var mChargeAbility:uint;// = 0
var rightPressed:Boolean;// = false
var mWalkAcceleration:Point;
var mKnockbackDecay:Number;// = 0
private var mChargeIndicator:ChargeIndicator;
public var mShipImage:ShipImage;
var mDamageBuffer:Number;// = 0
var mFollower:Follower;// = null
public var mWake:WakeField;// = null
var mDisableInput:Boolean;// = false
var superPickupBlue:SuperPickupBlue;
var mActive:Boolean;// = true
var mWalkVelocity:Point;
var mKnockbackDir:Point;// = null
var mKnockbackMagnitude:Number;// = 0
var mMaxColor:uint;// = 0
var mInvulnerableCount:int;// = 0
static const sKnockbackThreshold:Number = 3;
public static const sRadius = 20;
static const sDamageDecay:Number = 0.0625;
public static const defaultVelocity:Number = 20;
public static const startVelocity:Number = 5;
public function PlayerShip(){
superPickupYellow = new SuperPickupYellow();
superPickupRed = new SuperPickupRed();
superPickupBlue = new SuperPickupBlue();
mFilter = new Filter();
mColorWheel = new ColorWheel();
mShipImage = new ShipImage();
mHealthBar = new PlayerHealth();
mChargeRing = new ChargeRing();
mChargeIndicator = new ChargeIndicator();
mWalkAcceleration = new Point();
mWalkVelocity = new Point();
mPushVelocity = new Point();
super(GameObject.type_PlayerShip);
clearVisuals();
setMaxColor(GameColor.blue);
mFollower = new Follower(this);
addChild(mShipImage);
addChild(mHealthBar);
MyCamera.getInstance().addToHud(mColorWheel);
mFollower.addChild(mFilter);
mWake = new WakeField(this);
mShipImage.visible = true;
mColorWheel.visible = colorWheelPressed;
rotation = 0;
addChild(mChargeRing);
addChild(mChargeIndicator);
mChargeIndicator.alpha = 0.5;
updateChargeGraphic();
superPickupYellow.x = 600;
superPickupYellow.y = 30;
superPickupRed.x = 640;
superPickupRed.y = 30;
superPickupBlue.x = 680;
superPickupBlue.y = 30;
}
public function playerFadeIn(_arg1){
this.alpha = 0;
fadeIn(20);
}
public function addChargeHud(_arg1:uint){
if (_arg1 == GameColor.brown){
MyCamera.getInstance().addToHud(superPickupYellow, false);
MyCamera.getInstance().addToHud(superPickupRed, false);
MyCamera.getInstance().addToHud(superPickupBlue, false);
};
if (_arg1 == GameColor.yellow){
MyCamera.getInstance().addToHud(superPickupYellow, false);
} else {
if (_arg1 == GameColor.red){
MyCamera.getInstance().addToHud(superPickupRed, false);
} else {
if (_arg1 == GameColor.blue){
MyCamera.getInstance().addToHud(superPickupBlue, false);
} else {
return;
};
};
};
}
private function bulletCountDecrementer(_arg1:Event){
this.bulletsFrameCount++;
if (this.bulletsFrameCount == 23){
this.bulletsFrameCount = 0;
if (this.bulletsFiredCount == 0){
return;
};
if (this.bulletsFiredCount > 0){
this.bulletsFiredCount--;
return;
};
if (this.bulletsFiredCount < 0){
this.bulletsFiredCount = 0;
return;
};
};
}
override public function withdrawStage(_arg1:Stage){
super.withdrawStage(_arg1);
_arg1.removeEventListener(KeyboardEvent.KEY_DOWN, this.KeyPress);
_arg1.removeEventListener(KeyboardEvent.KEY_UP, this.KeyRelease);
_arg1.removeEventListener(MouseEvent.MOUSE_DOWN, this.mouseDownHandler);
_arg1.removeEventListener(MouseEvent.MOUSE_UP, this.mouseDownHandler);
_arg1.removeEventListener(MouseEvent.MOUSE_WHEEL, this.onMouseWheelEvent);
Game.framelistener.removeEventListener(FrameListener.BEGIN_FRAME, this.updateHealth);
Game.framelistener.removeEventListener(FrameListener.BEGIN_FRAME, this.push);
Game.framelistener.removeEventListener(FrameListener.BEGIN_FRAME, this.bulletCountDecrementer);
mWake.withdrawStage(_arg1);
mFollower.withdrawStage(_arg1);
}
public function enableInput(){
mDisableInput = false;
mColorWheel.visible = colorWheelPressed;
calculateWalkVelocity();
}
public function endKnockback(){
mKnockbackMagnitude = 0;
setPushVelocity(new Point(0, 0));
}
public function setRot(_arg1:Number){
mShipImage.rotation = _arg1;
}
public function prevWeapon(){
updateWeapon(-1);
}
public function push(_arg1:Event){
var _local2:Point;
var _local3:Point;
if (mKnockbackMagnitude < sKnockbackThreshold){
return;
};
mKnockbackMagnitude = (mKnockbackMagnitude / mKnockbackDecay);
if (mKnockbackMagnitude < sKnockbackThreshold){
_local2 = new Point(0, 0);
setPushVelocity(_local2);
enableInput();
visible = true;
} else {
_local3 = new Point((mKnockbackDir.x * mKnockbackMagnitude), (mKnockbackDir.y * mKnockbackMagnitude));
setPushVelocity(_local3);
Sounds.playerHitWall();
};
}
override public function applyStage(_arg1:Stage){
super.applyStage(_arg1);
_arg1.addEventListener(KeyboardEvent.KEY_DOWN, this.KeyPress);
_arg1.addEventListener(KeyboardEvent.KEY_UP, this.KeyRelease);
_arg1.addEventListener(MouseEvent.MOUSE_DOWN, this.mouseDownHandler);
_arg1.addEventListener(MouseEvent.MOUSE_UP, this.mouseDownHandler);
_arg1.addEventListener(MouseEvent.MOUSE_WHEEL, this.onMouseWheelEvent);
Game.framelistener.addEventListener(FrameListener.BEGIN_FRAME, this.updateHealth);
Game.framelistener.addEventListener(FrameListener.BEGIN_FRAME, this.push);
Game.framelistener.addEventListener(FrameListener.BEGIN_FRAME, this.bulletCountDecrementer);
mWake.applyStage(_arg1);
mFollower.applyStage(_arg1);
mColorWheel.x = (MyCamera.getInstance().getWidth() / 2);
mColorWheel.y = (MyCamera.getInstance().getHeight() / 2);
}
public function playerExplosion(){
var _local1:ExplodeField = new ExplodeField(this, 20);
_local1.setEndFunction(Game.getInstance().respawn);
_local1.applyStage(Game.getInstance().mStage);
}
public function hitFromBullet(_arg1:EnemyBullet){
var _local2:Number = 0.25;
var _local3:Point = _arg1.getVelocity();
var _local4:Number = ((_local2 * 4) + (_local3.length * 4));
var _local5:Point = getAbsPos().subtract(_arg1.getAbsPos()).add(_local3);
damagePlayer(_local2, _local4, _local5);
}
public function updateWeapon(_arg1:int){
if ((((mMaxColor == GameColor.white)) || ((mMaxColor == GameColor.red)))){
return;
};
var _local2:* = mColor;
if (_arg1 > 0){
_local2 = (_local2 * 2);
if (_local2 > mMaxColor){
_local2 = 1;
};
} else {
if (_arg1 < 0){
_local2 = (_local2 / 2);
if (_local2 < 1){
_local2 = mMaxColor;
};
} else {
return;
};
};
if (_local2 != mColor){
mChargePower = 0;
updateChargeGraphic();
};
setColor(_local2);
Sounds.changeWeapon();
}
private function setWalkVelocity(_arg1:Point){
mWalkVelocity = _arg1;
mVelocity = mWalkVelocity.add(mPushVelocity);
}
public function addChargePower(_arg1:uint){
mChargeAbility = (mChargeAbility | _arg1);
addChargeHud(_arg1);
}
public function KeyPress(_arg1:KeyboardEvent){
KeyChange(_arg1, true);
}
public function updateChargeGraphic(){
var _local1:Number;
if (mChargePower == 0){
mChargeRing.visible = false;
mChargeIndicator.visible = false;
} else {
if (mChargePower > 3){
mChargeRing.visible = true;
mChargeIndicator.visible = true;
_local1 = (mChargePower / cChargeMax);
mChargeIndicator.scaleX = _local1;
mChargeIndicator.scaleY = _local1;
};
};
}
public function calculateWalkVelocity(){
var _local3:Number;
var _local1:* = mWalkAcceleration;
var _local2:* = mWalkVelocity;
if (((leftPressed) && (rightPressed))){
_local1.x = 0;
} else {
if (leftPressed){
_local1.x = -(cAcceleration);
if (_local2.x >= -(startVelocity)){
_local2.x = -(startVelocity);
};
} else {
if (rightPressed){
_local1.x = cAcceleration;
if (_local2.x <= startVelocity){
_local2.x = startVelocity;
};
} else {
_local1.x = 0;
};
};
};
if (((upPressed) && (downPressed))){
_local1.y = 0;
} else {
if (upPressed){
_local1.y = -(cAcceleration);
if (_local2.y >= -(startVelocity)){
_local2.y = -(startVelocity);
};
} else {
if (downPressed){
_local1.y = cAcceleration;
if (_local2.y <= startVelocity){
_local2.y = startVelocity;
};
} else {
_local1.y = 0;
};
};
};
if (((!((_local1.y == 0))) || (!((_local1.x == 0))))){
_local3 = ((Math.atan((_local1.y / _local1.x)) * (180 / Math.PI)) + 90);
if (_local1.x < 0){
_local3 = (_local3 + 180);
};
mShipImage.rotation = _local3;
setWalkVelocity(_local2);
};
}
override public function setGraphicsColor(_arg1:uint){
setTint(_arg1, 1);
}
public function mouseDownHandler(_arg1:MouseEvent){
var _local2:Boolean;
var _local3:uint;
var _local4:Point;
if (mDisableInput){
return;
};
leftClickPressed = _arg1.buttonDown;
if (leftClickPressed == false){
if (mMaxColor == GameColor.white){
return;
};
_local2 = false;
if (colorWheelPressed){
_local3 = mColorWheel.hitColorRef(_arg1.stageX, _arg1.stageY);
_local2 = (((_local3 > 0)) && ((_local3 <= mMaxColor)));
if (_local2){
setColor(_local3);
};
};
if (((!(_local2)) && ((this.bulletsFiredCount < this.MAX_FIRING_CAPABILITY)))){
_local4 = new Point(_arg1.stageX, _arg1.stageY);
fireWeapon(_local4);
};
mChargePower = 0;
updateChargeGraphic();
};
}
public function getFilter():Filter{
return (mFilter);
}
public function getHealth(){
return (mHealth);
}
public function die(){
Sounds.PlayerDeath();
this.playerExplosion();
mActive = false;
visible = false;
disableInput();
endKnockback();
mHealthBar.visible = false;
}
public function getChargePower():uint{
return (mChargeAbility);
}
public function updateHealth(_arg1:Event){
var _local3:int;
if (mDamageBuffer > 0){
mDamageBuffer = (mDamageBuffer - sDamageDecay);
mHealth = (mHealth - sDamageDecay);
} else {
if (mInvulnerableCount > 0){
} else {
if (mHealth < 1){
mHealth = (mHealth + mRegenerateIncrement);
} else {
if (mHealth < 0){
mHealth = 0;
};
};
};
};
if (mInvulnerableCount == 1){
mInvulnerableCount = 0;
mShipImage.alpha = 1;
Enemy.sMotionless = false;
} else {
if (mInvulnerableCount > 1){
mInvulnerableCount--;
_local3 = (mShipImage.alpha * 100);
_local3 = ((_local3 + 50) % 100);
mShipImage.alpha = (Number((100 - _local3)) / 100);
};
};
mHealthBar.UpdateHealth(mHealth);
if (((((((leftClickPressed) && ((getColor() & this.mChargeAbility)))) && ((this.bulletsFiredCount < this.MAX_FIRING_CAPABILITY)))) && ((mChargePower < cChargeMax)))){
mChargePower++;
updateChargeGraphic();
};
var _local2:* = mWalkVelocity;
if ((((mWalkAcceleration.length > 0.1)) && ((mWalkVelocity.length <= defaultVelocity)))){
_local2 = mWalkVelocity.add(mWalkAcceleration);
if (_local2.length > defaultVelocity){
_local2.normalize(defaultVelocity);
};
};
if ((((Math.abs(mWalkAcceleration.x) == 0)) && ((Math.abs(mWalkVelocity.x) > 0)))){
if (_local2.x > 0){
_local2.x = (_local2.x - cDeceleration);
if (_local2.x < 0){
_local2.x = 0;
};
} else {
if (_local2.x < 0){
_local2.x = (_local2.x + cDeceleration);
if (_local2.x > 0){
_local2.x = 0;
};
};
};
};
if ((((Math.abs(mWalkAcceleration.y) == 0)) && ((Math.abs(mWalkVelocity.y) > 0)))){
if (_local2.y > 0){
_local2.y = (_local2.y - cDeceleration);
if (_local2.y < 0){
_local2.y = 0;
};
} else {
if (_local2.y < 0){
_local2.y = (_local2.y + cDeceleration);
if (_local2.y > 0){
_local2.y = 0;
};
};
};
};
if (_local2 != null){
setWalkVelocity(_local2);
};
}
override public function getRadius():Number{
return (PlayerShip.sRadius);
}
public function damagePlayer(_arg1:Number, _arg2:Number, _arg3:Point){
if ((mHealth - mDamageBuffer) > _arg1){
mDamageBuffer = (mDamageBuffer + _arg1);
Sounds.PlayerHit();
mInvulnerableCount = mInvulnerabilityInc;
commenceKnockback(_arg2, _arg3);
} else {
Sounds.PlayerDeath();
die();
};
}
public function setPushVelocity(_arg1:Point){
mPushVelocity = _arg1;
mVelocity = mWalkVelocity.add(mPushVelocity);
}
override public function getRot(){
return (mShipImage.rotation);
}
function onMouseWheelEvent(_arg1:MouseEvent):void{
if (_arg1.delta > 0){
if (_arg1.ctrlKey == true){
mColorWheel.rotateNext();
};
if (_arg1.shiftKey == true){
};
nextWeapon();
} else {
if (_arg1.delta < 0){
if (_arg1.ctrlKey == true){
mColorWheel.rotatePrev();
};
if (_arg1.shiftKey == true){
};
prevWeapon();
} else {
if (_arg1.delta == 0){
if (_arg1.ctrlKey == true){
};
if (_arg1.shiftKey == true){
};
};
};
};
}
public function hitFromEnemy(_arg1:Enemy){
damagePlayer(_arg1.getDamage(), _arg1.getKnockback(), _arg1.getKnockbackDir(getAbsPos()));
Enemy.sMotionless = true;
if (mActive){
mKnockbackDecay = 1.25;
mKnockbackDir.normalize(1);
};
}
public function commenceKnockback(_arg1:Number, _arg2:Point){
mKnockbackMagnitude = _arg1;
mKnockbackDecay = 1.25;
mKnockbackDir = _arg2;
mKnockbackDir.normalize(1);
}
public function hasChargePower(_arg1:uint):Boolean{
return (Boolean((mChargeAbility & _arg1)));
}
public function knockback(_arg1:Point, _arg2:Number=10, _arg3:Number=1.3){
mKnockbackDir = _arg1;
mKnockbackDir.normalize(1);
mKnockbackMagnitude = _arg2;
mKnockbackDecay = _arg3;
}
public function disableInput(){
mDisableInput = true;
mColorWheel.visible = false;
setWalkVelocity(new Point(0, 0));
mWalkAcceleration.x = 0;
mWalkAcceleration.y = 0;
}
public function KeyRelease(_arg1:KeyboardEvent){
KeyChange(_arg1, false);
}
public function getShipImage():DisplayObject{
return (mShipImage);
}
private function KeyChange(_arg1:KeyboardEvent, _arg2:Boolean){
switch (_arg1.keyCode){
case this.wKey:
case this.upArrow:
upPressed = _arg2;
break;
case this.aKey:
case this.leftArrow:
leftPressed = _arg2;
break;
case this.sKey:
case this.downArrow:
downPressed = _arg2;
break;
case this.dKey:
case this.rightArrow:
rightPressed = _arg2;
break;
case this.shiftKey:
break;
case this.eKey:
colorWheelPressed = _arg2;
break;
case this.tKey:
if (!_arg2){
Game.getInstance().transitionToNextLevel();
};
break;
};
if (mDisableInput){
return;
};
if ((((_arg1.keyCode == this.spaceKey)) && (_arg2))){
nextWeapon();
};
calculateWalkVelocity();
mColorWheel.visible = colorWheelPressed;
}
public function isActive():Boolean{
return (mActive);
}
public function setMaxColor(_arg1:uint){
if (mMaxColor == GameColor.white){
setColor(_arg1);
} else {
if (_arg1 == GameColor.white){
setColor(_arg1);
};
};
mMaxColor = _arg1;
}
public function isHitable():Boolean{
return (((mActive) && ((mInvulnerableCount == 0))));
}
public function nextWeapon(){
updateWeapon(1);
}
public function heal(){
mHealth = 1;
}
public function fireWeapon(_arg1:Point){
var _local2:Point;
_local2 = this.getAbsPos();
var _local3:Number = (_arg1.y - _local2.y);
var _local4:Number = (_arg1.x - _local2.x);
var _local5:Number = (Math.atan((_local3 / _local4)) * (180 / Math.PI));
if (_local4 < 0){
_local5 = (_local5 + 180);
};
var _local6:Bullet;
if (mChargePower >= cChargeMax){
_local6 = new ChargeBullet(mColor);
} else {
_local6 = new Bullet(mColor);
};
_local6.setAbsPos(getAbsPos());
_local6.setTrajectoryAngle(_local5);
Sounds.fireWeapon();
}
override public function hitWall(){
Sounds.playerHitWall();
var _local1:Number = x;
var _local2:Number = y;
x = (x + mVelocity.x);
if (!Game.getInstance().hitWall(this)){
mWalkVelocity.y = 0;
setWalkVelocity(mWalkVelocity);
return;
};
x = _local1;
y = (y + mVelocity.y);
if (!Game.getInstance().hitWall(this)){
mWalkVelocity.x = 0;
setWalkVelocity(mWalkVelocity);
return;
};
y = _local2;
}
}
}//package
Section 129
//Profiler (Profiler)
package {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.text.*;
public class Profiler extends SystemMovieClip {
var mStartTime:uint;// = 0
var mCurDuration:uint;// = 0
public var actualFps:TextField;
public var targetFps:TextField;
var mEndTime:uint;// = 0
var mLastDurations:Array;
private static const cMaxDurations:uint = 30;
public function Profiler(){
mLastDurations = new Array();
super();
while (mLastDurations.length < cMaxDurations) {
mLastDurations.push(0);
};
}
public function updateProfiler(_arg1:Event){
mEndTime = getTimer();
var _local2:int = (mEndTime - mStartTime);
mLastDurations[mCurDuration] = _local2;
mCurDuration = ((mCurDuration + 1) % cMaxDurations);
var _local3:int;
var _local4:uint;
while (_local4 < mLastDurations.length) {
_local3 = (_local3 + mLastDurations[_local4]);
_local4++;
};
var _local5:Number = ((cMaxDurations * 1000) / _local3);
actualFps.text = _local5.toPrecision(3);
mStartTime = getTimer();
}
override public function withdrawStage(_arg1:Stage){
super.withdrawStage(_arg1);
Game.framelistener.removeEventListener(FrameListener.BEGIN_FRAME, updateProfiler);
}
override public function applyStage(_arg1:Stage){
super.applyStage(_arg1);
Game.framelistener.addEventListener(FrameListener.BEGIN_FRAME, updateProfiler);
targetFps.text = _arg1.frameRate.toString();
}
}
}//package
Section 130
//room03_text2MC (room03_text2MC)
package {
public dynamic class room03_text2MC extends HintText {
}
}//package
Section 131
//sfxBell (sfxBell)
package {
import flash.media.*;
public dynamic class sfxBell extends Sound {
}
}//package
Section 132
//sfxBounce (sfxBounce)
package {
import flash.media.*;
public dynamic class sfxBounce extends Sound {
}
}//package
Section 133
//ShipImage (ShipImage)
package {
import flash.display.*;
public class ShipImage extends MovieClip {
}
}//package
Section 134
//ShooterEnemy (ShooterEnemy)
package {
import flash.events.*;
import flash.geom.*;
public class ShooterEnemy extends Enemy {
private var MINIMUM_PLAYER_DISTANCE:Number;// = 150
private var framecounter:Number;// = 0
private var playerAngle:Number;// = 0
private var MAX_TOLERANCE:Number;// = 3
private var SHOT_ANGLE_TOLERANCE:Number;// = 1
private var shotInterval:Number;
public function ShooterEnemy(){
shotInterval = (24 * Physics.randRange(2, 5));
super();
}
public function increaseShotTolerance():void{
if ((((this.SHOT_ANGLE_TOLERANCE < this.MAX_TOLERANCE)) && ((this.SHOT_ANGLE_TOLERANCE >= 0)))){
this.SHOT_ANGLE_TOLERANCE++;
return;
};
if (this.SHOT_ANGLE_TOLERANCE > this.MAX_TOLERANCE){
this.SHOT_ANGLE_TOLERANCE = this.MAX_TOLERANCE;
return;
};
if (this.SHOT_ANGLE_TOLERANCE < 0){
this.SHOT_ANGLE_TOLERANCE = Math.sqrt((this.SHOT_ANGLE_TOLERANCE * this.SHOT_ANGLE_TOLERANCE));
};
}
override public function updateEnemyAI(_arg1:Event){
var _local2:*;
if (isActive()){
if (this.calculatePlayerDistance() >= MINIMUM_PLAYER_DISTANCE){
this.move();
};
playerAngle = this.getPlayerLocationAngle();
_local2 = Physics.randRange((playerAngle - SHOT_ANGLE_TOLERANCE), (this.playerAngle + SHOT_ANGLE_TOLERANCE));
framecounter++;
if (this.framecounter >= shotInterval){
framecounter = 0;
shotInterval = (24 * Physics.randRange(2, 5));
this.fireWeapon(_local2);
};
};
}
override public function getRadius():Number{
return (18);
}
override public function getEnemyType():uint{
return (ai_Shooter);
}
private function move():void{
var _local1:Point = this.getAbsPos();
var _local2:Point = Game.getInstance().getPlayer().getAbsPos();
var _local3:Point = _local2.subtract(_local1);
var _local4:Number = _local3.length;
var _local5:Number = (mSpeed / _local4);
mVelocity.x = (_local3.x * _local5);
mVelocity.y = (_local3.y * _local5);
var _local6:Number = Math.atan2(_local3.y, _local3.x);
this.rotation = ((_local6 * (180 / Math.PI)) + 90);
}
public function decreaseShotTolerance():void{
if ((((this.SHOT_ANGLE_TOLERANCE <= this.MAX_TOLERANCE)) && ((this.SHOT_ANGLE_TOLERANCE > 0)))){
this.SHOT_ANGLE_TOLERANCE--;
return;
};
if (this.SHOT_ANGLE_TOLERANCE == 0){
return;
};
}
}
}//package
Section 135
//sndBGMLevel0 (sndBGMLevel0)
package {
import flash.media.*;
public dynamic class sndBGMLevel0 extends Sound {
}
}//package
Section 136
//sndBossLFive (sndBossLFive)
package {
import flash.media.*;
public dynamic class sndBossLFive extends Sound {
}
}//package
Section 137
//sndBulletEffect (sndBulletEffect)
package {
import flash.media.*;
public dynamic class sndBulletEffect extends Sound {
}
}//package
Section 138
//sndBulletHitWall (sndBulletHitWall)
package {
import flash.media.*;
public dynamic class sndBulletHitWall extends Sound {
}
}//package
Section 139
//sndBulletNoEffect (sndBulletNoEffect)
package {
import flash.media.*;
public dynamic class sndBulletNoEffect extends Sound {
}
}//package
Section 140
//sndChangeBGColour (sndChangeBGColour)
package {
import flash.media.*;
public dynamic class sndChangeBGColour extends Sound {
}
}//package
Section 141
//sndChangeWeapon (sndChangeWeapon)
package {
import flash.media.*;
public dynamic class sndChangeWeapon extends Sound {
}
}//package
Section 142
//sndEnemyDeath (sndEnemyDeath)
package {
import flash.media.*;
public dynamic class sndEnemyDeath extends Sound {
}
}//package
Section 143
//sndFireSound (sndFireSound)
package {
import flash.media.*;
public dynamic class sndFireSound extends Sound {
}
}//package
Section 144
//sndHitWall (sndHitWall)
package {
import flash.media.*;
public dynamic class sndHitWall extends Sound {
}
}//package
Section 145
//sndLvl1 (sndLvl1)
package {
import flash.media.*;
public dynamic class sndLvl1 extends Sound {
}
}//package
Section 146
//sndLvl10 (sndLvl10)
package {
import flash.media.*;
public dynamic class sndLvl10 extends Sound {
}
}//package
Section 147
//sndLvl2 (sndLvl2)
package {
import flash.media.*;
public dynamic class sndLvl2 extends Sound {
}
}//package
Section 148
//sndLvl3 (sndLvl3)
package {
import flash.media.*;
public dynamic class sndLvl3 extends Sound {
}
}//package
Section 149
//sndLvl4 (sndLvl4)
package {
import flash.media.*;
public dynamic class sndLvl4 extends Sound {
}
}//package
Section 150
//sndLvl6 (sndLvl6)
package {
import flash.media.*;
public dynamic class sndLvl6 extends Sound {
}
}//package
Section 151
//sndOpenDoor (sndOpenDoor)
package {
import flash.media.*;
public dynamic class sndOpenDoor extends Sound {
}
}//package
Section 152
//sndPickUp (sndPickUp)
package {
import flash.media.*;
public dynamic class sndPickUp extends Sound {
}
}//package
Section 153
//sndPlayerDeath (sndPlayerDeath)
package {
import flash.media.*;
public dynamic class sndPlayerDeath extends Sound {
}
}//package
Section 154
//sndPlayerDie (sndPlayerDie)
package {
import flash.media.*;
public dynamic class sndPlayerDie extends Sound {
}
}//package
Section 155
//sndPlayerHit (sndPlayerHit)
package {
import flash.media.*;
public dynamic class sndPlayerHit extends Sound {
}
}//package
Section 156
//sndPuzzleVictory (sndPuzzleVictory)
package {
import flash.media.*;
public dynamic class sndPuzzleVictory extends Sound {
}
}//package
Section 157
//sndRockets (sndRockets)
package {
import flash.media.*;
public dynamic class sndRockets extends Sound {
}
}//package
Section 158
//sndSwitchNoEffect (sndSwitchNoEffect)
package {
import flash.media.*;
public dynamic class sndSwitchNoEffect extends Sound {
}
}//package
Section 159
//sndTransition (sndTransition)
package {
import flash.media.*;
public dynamic class sndTransition extends Sound {
}
}//package
Section 160
//Sounds (Sounds)
package {
import flash.media.*;
public class Sounds {
static var mTransitionChannel:SoundChannel;
static var mPlayerHit:sndPlayerHit;
static var mGeneralError:Sound = new Sound();
static var mFireWeaponSound:sndFireSound;
static var mL1Channel:SoundChannel;
static var sL10:sndLvl10;
static var mEnemyDeath:sndEnemyDeath;
static var sL6:sndLvl6;
static var mInitialized:Boolean = false;
static var mChangeBGColourChannel:SoundChannel;
static var mL1IsPlaying:Boolean = false;
static var mPlayerHitChannel:SoundChannel;
static var mBulletHitWallSoundChannel:SoundChannel;
static var mPlayBgmChannel:SoundChannel;
static var mL10Channel:SoundChannel;
static var mL2IsPlaying:Boolean = false;
static var mPickUpChannel:SoundChannel;
static var mPlayerDeath:sndPlayerDeath;
static var mPickUp:sndPickUp;
static var mL6Channel:SoundChannel;
static var mL10IsPlaying:Boolean = false;
static var mPlayerHitWall:sndHitWall;
static var mL3IsPlaying:Boolean = false;
static var mRocketMovementChannel:SoundChannel;
static var mRocketMovement:sndRockets;
static var mBossLFiveChannel:SoundChannel;
static var mBulletHitWallSound:sndBulletHitWall;
static var mPuzzleVictoryChannel:SoundChannel;
static var mPuzzleVictory:sndPuzzleVictory;
static var mChangeWeaponSoundChannel:SoundChannel;
static var mL4IsPlaying:Boolean = false;
static var mL2:sndLvl2;
static var mPlayerHitWallChannel:SoundChannel;
static var mL4:sndLvl4;
static var mChangeWeaponSound:sndChangeWeapon;
static var mL1:sndLvl1;
static var mL3:sndLvl3;
static var mOpenDoorChannel:SoundChannel;
static var mTransition:sndTransition;
static var mOpenDoor:sndOpenDoor;
static var mEnemyDeathChannel:SoundChannel;
static var mL4Channel:SoundChannel;
static var mSwitchNoEffectChannel:SoundChannel;
static var mBgmFiveIsPlaying:Boolean = false;
static var mPlayerDeathChannel:SoundChannel;
static var mFieldGenerator:Sound = new Sound();
static var mPlayBgm:sndBGMLevel0;
static var mBgmIsPlaying:Boolean = false;
static var mL6IsPlaying:Boolean = false;
static var mL3Channel:SoundChannel;
static var mFireWeaponSoundChannel:SoundChannel;
static var mSwitchNoEffect:sndSwitchNoEffect;
static var mBossLFive:sndBossLFive;
static var mChangeBGColour:sndChangeBGColour;
static var mL2Channel:SoundChannel;
public function Sounds(){
initialize();
}
public static function puzzleVictory(){
mPuzzleVictoryChannel = mPuzzleVictory.play();
}
public static function switchNoEffect(){
mSwitchNoEffectChannel = mSwitchNoEffect.play();
}
public static function L1Stop(){
if (mL1IsPlaying){
mL1Channel.stop();
mL1IsPlaying = false;
};
}
public static function L10Stop(){
if (mL10IsPlaying){
mL10Channel.stop();
mL10IsPlaying = false;
};
}
public static function openDoor(){
mOpenDoorChannel = mOpenDoor.play();
}
public static function L3Stop(){
if (mL3IsPlaying){
mL3Channel.stop();
mL3IsPlaying = false;
};
}
public static function BossLFiveStop(){
if (mBgmFiveIsPlaying){
mBossLFiveChannel.stop();
mBgmFiveIsPlaying = false;
};
}
public static function L1(){
}
public static function L3(){
}
public static function L4(){
}
public static function L10(){
}
public static function L6(){
}
public static function L2(){
}
public static function L2Stop(){
if (mL2IsPlaying){
mL2Channel.stop();
mL2IsPlaying = false;
};
}
public static function initialize(){
if (mInitialized){
return;
};
mFireWeaponSound = new sndFireSound();
mChangeWeaponSound = new sndChangeWeapon();
mBulletHitWallSound = new sndBulletHitWall();
mRocketMovement = new sndRockets();
mPlayerHitWall = new sndHitWall();
mOpenDoor = new sndOpenDoor();
mChangeBGColour = new sndChangeBGColour();
mSwitchNoEffect = new sndSwitchNoEffect();
mPuzzleVictory = new sndPuzzleVictory();
mEnemyDeath = new sndEnemyDeath();
mPlayerDeath = new sndPlayerDeath();
mTransition = new sndTransition();
mPlayerHit = new sndPlayerHit();
mPickUp = new sndPickUp();
mInitialized = true;
}
public static function L4Stop(){
}
public static function pickUp(){
mPickUpChannel = mPickUp.play();
}
public static function rocketMovement(){
mRocketMovementChannel = mRocketMovement.play();
}
public static function L6Stop(){
if (mL6IsPlaying){
mL6Channel.stop();
mL6IsPlaying = false;
};
}
public static function BossLFive(){
}
public static function Transit(){
mTransitionChannel = mTransition.play();
}
public static function changeBGColour(){
mChangeBGColourChannel = mChangeBGColour.play();
}
public static function bulletHitWall(){
mBulletHitWallSoundChannel = mBulletHitWallSound.play();
}
public static function PlayerHit(){
mPlayerHitChannel = mPlayerHit.play();
}
public static function playerHitWall(){
mPlayerHitWallChannel = mPlayerHitWall.play();
}
public static function EnemyDeath(){
mEnemyDeathChannel = mEnemyDeath.play();
}
public static function fireWeapon(){
mFireWeaponSoundChannel = mFireWeaponSound.play();
}
public static function PlayerDeath(){
mPlayerDeathChannel = mPlayerDeath.play();
}
public static function playBgm(){
}
public static function changeWeapon(){
mChangeWeaponSoundChannel = mChangeWeaponSound.play();
}
}
}//package
Section 161
//Sparks (Sparks)
package {
import flash.display.*;
public class Sparks extends MovieClip {
}
}//package
Section 162
//SpawnPoint (SpawnPoint)
package {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
public class SpawnPoint extends GameObject {
var mEnemParams:Array;
var mEnemySet:Array;
var mKillsLeft:int;// = -1
var mParentWave:EnemyWave;// = null
var mSpawnsLeftInSet:int;// = -1
var mEnemMult:Array;
var mCurParams:EnemyParameters;// = null
var mEnemyInTheWay:Enemy;// = null
public function SpawnPoint(){
mEnemParams = new Array();
mEnemMult = new Array();
mEnemySet = new Array();
super(GameObject.type_SpawnPoint);
visible = false;
}
public function addSet(_arg1:EnemyParameters, _arg2:int=1){
mEnemParams.push(_arg1);
mEnemMult.push(_arg2);
}
public function destoryEnemies(){
while (mEnemySet.length > 0) {
GameObject(mEnemySet.pop()).destroy();
};
}
override public function withdrawStage(_arg1:Stage){
super.withdrawStage(_arg1);
Game.framelistener.removeEventListener(FrameListener.BEGIN_FRAME, checkForSpawn);
}
public function checkForSpawn(_arg1:Event){
if (mEnemyInTheWay == null){
return;
};
var _local2:Point = getAbsPos().subtract(mEnemyInTheWay.getAbsPos());
if (_local2.length > (mEnemyInTheWay.getRadius() * 2)){
spawn();
};
}
public function setParent(_arg1:EnemyWave){
mParentWave = _arg1;
}
override public function applyStage(_arg1:Stage){
super.applyStage(_arg1);
Game.framelistener.addEventListener(FrameListener.BEGIN_FRAME, checkForSpawn);
}
public function enemyDestroyed(_arg1:Enemy){
mKillsLeft--;
if (mKillsLeft == 0){
mParentWave.spawnSetFinished(this);
} else {
if (mEnemyInTheWay == _arg1){
spawn();
};
};
}
public function activate(){
mKillsLeft = 0;
var _local1:uint;
while (_local1 < mEnemMult.length) {
mKillsLeft = (mKillsLeft + mEnemMult[_local1]);
_local1++;
};
nextSpawnSet();
spawn();
}
public function deactivate(){
destoryEnemies();
mParentWave = null;
mCurParams = null;
mSpawnsLeftInSet = -1;
mKillsLeft = -1;
}
public function nextSpawnSet(){
mCurParams = EnemyParameters(mEnemParams.pop());
mSpawnsLeftInSet = mEnemMult.pop();
}
private function spawn(){
if (mCurParams == null){
trace("In Spawn Point: Something wrong with spawn system");
return;
};
mSpawnsLeftInSet--;
var _local1:Enemy = mCurParams.createEnemy();
_local1.addDeathObserver(enemyDestroyed);
_local1.setAbsPos(getAbsPos());
_local1.spawn();
mEnemySet.push(_local1);
if (mSpawnsLeftInSet > 0){
mEnemyInTheWay = _local1;
} else {
if ((((mSpawnsLeftInSet <= 0)) && ((mEnemMult.length > 0)))){
mEnemyInTheWay = _local1;
nextSpawnSet();
} else {
mEnemyInTheWay = null;
};
};
}
}
}//package
Section 163
//SpawnSet (SpawnSet)
package {
public class SpawnSet {
public var mEnemyParams:EnemyParameters;// = null
public var mSpawnPoint:SpawnPoint;// = null
public var mMultiplicity:int;// = 1
public function SpawnSet(_arg1:SpawnPoint=null, _arg2:EnemyParameters=null, _arg3:int=1){
set(_arg1, _arg2, _arg3);
}
public function set(_arg1:SpawnPoint, _arg2:EnemyParameters, _arg3:int=1){
mSpawnPoint = _arg1;
mEnemyParams = _arg2;
mMultiplicity = _arg3;
}
}
}//package
Section 164
//SpecialSwitch (SpecialSwitch)
package {
public class SpecialSwitch extends Switch {
var mSpecialFunction:Function;
var funcCounter:Number;// = 0
override public function hitColor(_arg1:uint, _arg2:Boolean){
super.hitColor(_arg1, _arg2);
if (funcCounter < 1){
mSpecialFunction();
funcCounter++;
};
}
public function setFunction(_arg1:Function){
mSpecialFunction = _arg1;
}
}
}//package
Section 165
//SpikeEnemy (SpikeEnemy)
package {
public class SpikeEnemy extends Enemy {
public function SpikeEnemy(){
grabTintAsColor();
activate();
}
override public function hitColor(_arg1:uint, _arg2:Boolean){
}
override public function getDamage():Number{
return (1.5);
}
override public function getRadius():Number{
return (20);
}
override public function getEnemyType():uint{
return (Enemy.ai_Spike);
}
public function onFloorChange(_arg1:uint){
if (_arg1 == getColor()){
mActive = false;
fadeOut();
} else {
activate();
fadeIn();
};
}
override public function matchColorFloor(){
}
}
}//package
Section 166
//StarMan (StarMan)
package {
import flash.display.*;
public class StarMan extends MovieClip {
}
}//package
Section 167
//SubmitScoreButton (SubmitScoreButton)
package {
import flash.events.*;
import com.midasplayer.*;
import flash.net.*;
public class SubmitScoreButton extends KingButton {
override public function onClick(_arg1:MouseEvent){
var _local2:SharedObject = SharedObject.getLocal("levelProgress");
if (!_local2){
return;
};
KingAPI.submitScore((_local2.data.mTopLevel * 100));
}
}
}//package
Section 168
//SuperPickupBlue (SuperPickupBlue)
package {
import flash.display.*;
public dynamic class SuperPickupBlue extends MovieClip {
}
}//package
Section 169
//SuperPickupRed (SuperPickupRed)
package {
import flash.display.*;
public dynamic class SuperPickupRed extends MovieClip {
}
}//package
Section 170
//SuperPickupYellow (SuperPickupYellow)
package {
import flash.display.*;
public dynamic class SuperPickupYellow extends MovieClip {
}
}//package
Section 171
//Switch (Switch)
package {
public class Switch extends GameObject {
var mGoalColor:uint;// = 7
var mOn:Boolean;// = false
var mDefaultColor:uint;// = 0
var mObserverArray:Array;
public function Switch(){
mObserverArray = new Array();
super(GameObject.type_Switch);
}
override public function setColor(_arg1:uint){
if (_arg1 == mColor){
return;
};
super.setColor(_arg1);
if (mColor == mGoalColor){
turnOn();
};
}
private function statusChange(){
var _local1:Function;
var _local2:uint;
while (_local2 < mObserverArray.length) {
_local1 = mObserverArray[_local2];
_local1(this);
_local2++;
};
}
public function isOff(){
return (!(mOn));
}
public function reset(){
mOn = false;
setColor(GameColor.white);
setGoal(GameColor.brown);
}
public function getGoal():uint{
return (mGoalColor);
}
public function getDefault():uint{
return (mDefaultColor);
}
public function isOn(){
return (mOn);
}
public function turnOff(){
mOn = false;
statusChange();
}
public function setGoal(_arg1:uint){
mGoalColor = _arg1;
}
override public function hitColor(_arg1:uint, _arg2:Boolean){
var _local3:Boolean;
if (isOff()){
_local3 = GameColor.doesColorContribute(mGoalColor, mColor, _arg1);
if (_local3){
addColor(_arg1);
} else {
if ((_arg1 & mColor)){
restartTransition(50);
Sounds.switchNoEffect();
} else {
if (!(_arg1 & mColor)){
addColorAndRevertWithTransition(_arg1, 50);
};
};
};
};
}
public function addObserver(_arg1:Function){
mObserverArray.push(_arg1);
}
public function turnOn(){
mOn = true;
statusChange();
fadeOut(7);
}
override public function setGraphicsColor(_arg1:uint){
setTint(_arg1);
}
public function setDefault(_arg1:uint){
mDefaultColor = _arg1;
setColor(mDefaultColor);
}
}
}//package
Section 172
//SwitchColorText (SwitchColorText)
package {
public dynamic class SwitchColorText extends HintText {
}
}//package
Section 173
//SystemMovieClip (SystemMovieClip)
package {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import fl.motion.*;
public class SystemMovieClip extends MovieClip {
protected var mFadeCount:uint;// = 0
protected var mFadeInc:Number;// = 0
private static var sColorTransform:Color = new Color();
private static var sIdCounter:int = 0;
public function SystemMovieClip(_arg1:Boolean=true){
mouseChildren = false;
enabled = false;
doubleClickEnabled = false;
mouseEnabled = false;
}
public function fadeIn(_arg1:uint=0){
if (mFadeInc == 0){
mFadeCount = _arg1;
mFadeInc = (1 / 24);
Game.framelistener.addEventListener(FrameListener.BEGIN_FRAME, fadeAnimation);
} else {
if (mFadeInc < 0){
mFadeInc = (1 / 24);
mFadeCount = _arg1;
} else {
if (mFadeInc > 0){
};
};
};
}
public function setAbsPos(_arg1:Point){
var _local2:Point = getAbsPosOfObj(parent);
this.x = (_arg1.x - _local2.x);
this.y = (_arg1.y - _local2.y);
}
public function fadeAnimation(_arg1:Event){
var _local2:Stage;
if (mFadeCount > 0){
mFadeCount--;
} else {
this.alpha = (this.alpha + mFadeInc);
};
if ((((((mFadeInc < 0)) && ((this.alpha <= 0)))) || ((((mFadeInc > 0)) && ((this.alpha >= 1)))))){
_local2 = Game.getInstance().getStage();
Game.framelistener.removeEventListener(FrameListener.BEGIN_FRAME, fadeAnimation);
mFadeInc = 0;
};
}
public function applyStage(_arg1:Stage){
}
public function fadeOut(_arg1:uint=0){
if (mFadeInc == 0){
mFadeCount = _arg1;
mFadeInc = (-1 / 24);
Game.framelistener.addEventListener(FrameListener.BEGIN_FRAME, fadeAnimation);
} else {
if (mFadeInc < 0){
} else {
if (mFadeInc > 0){
mFadeInc = (-1 / 24);
mFadeCount = _arg1;
};
};
};
}
public function withdrawStage(_arg1:Stage){
if (mFadeInc != 0){
mFadeInc = 0;
Game.framelistener.removeEventListener(FrameListener.BEGIN_FRAME, fadeAnimation);
};
}
public function getAbsPos():Point{
return (getAbsPosOfObj(this));
}
public function setTint(_arg1:uint, _arg2:Number=1){
sColorTransform.setTint(_arg1, _arg2);
this.transform.colorTransform = sColorTransform;
}
protected static function getNewId():uint{
return (sIdCounter++);
}
private static function getAbsPosOfObj(_arg1:DisplayObjectContainer):Point{
var _local2:Point = new Point(0, 0);
while (_arg1 != null) {
_local2.x = (_local2.x + _arg1.x);
_local2.y = (_local2.y + _arg1.y);
_arg1 = _arg1.parent;
};
return (_local2);
}
public static function resetIdCounter(){
sIdCounter = 0;
}
public static function setTintToObj(_arg1:DisplayObject, _arg2:uint, _arg3:Number=1){
sColorTransform.setTint(_arg2, _arg3);
_arg1.transform.colorTransform = sColorTransform;
}
}
}//package
Section 174
//Trigger (Trigger)
package {
public class Trigger extends GameObject {
var mTriggered:Boolean;// = false
var mMode:uint;// = 1
var mObserverArray:Array;
var mActive:Boolean;// = true
public static const mode_OneTimeOnly:uint = 0;
public static const mode_Continuous:uint = 1;
private static const sVisible = false;
public function Trigger(){
mObserverArray = new Array();
super(GameObject.type_Trigger);
visible = sVisible;
}
public function hit(){
if (!mActive){
return;
};
notifyObservers();
if (mMode == mode_OneTimeOnly){
mActive = false;
};
mTriggered = true;
}
public function setMode(_arg1:uint){
mMode = _arg1;
}
public function isTriggered():Boolean{
return (mTriggered);
}
public function activateTrig(){
mActive = true;
}
public function deactivateTrig(){
mActive = false;
}
private function notifyObservers(){
var _local1:Function;
var _local2:uint;
while (_local2 < mObserverArray.length) {
_local1 = mObserverArray[_local2];
_local1(this);
_local2++;
};
}
public function hitOnLeave(){
mTriggered = false;
if (!mActive){
return;
};
notifyObservers();
}
public function addTriggerFunction(_arg1:Function){
mObserverArray.push(_arg1);
}
public function isActive():Boolean{
return (mActive);
}
}
}//package
Section 175
//TutorialButton (TutorialButton)
package {
import flash.events.*;
import com.midasplayer.*;
public class TutorialButton extends KingButton {
public function TutorialButton(){
x = 600;
y = 450;
}
override public function onClick(_arg1:MouseEvent){
KingAPI.openKingPage("solutions", "/game/saturated");
}
}
}//package
Section 176
//Twinkle (Twinkle)
package {
import flash.display.*;
public class Twinkle extends MovieClip {
}
}//package
Section 177
//Wake (Wake)
package {
import flash.display.*;
public class Wake extends MovieClip {
}
}//package
Section 178
//WakeField (WakeField)
package {
import flash.events.*;
import flash.display.*;
public class WakeField extends MovieClip {
var mParticleWake:ParticleWake;// = null
public function WakeField(_arg1:GameObject){
mParticleWake = new ParticleWake(Wake, _arg1);
}
public function applyStage(_arg1:Stage){
Game.framelistener.addEventListener(FrameListener.BEGIN_FRAME, updateParticles);
mParticleWake.applyStage(_arg1);
}
public function updateParticles(_arg1:Event){
mParticleWake.update();
}
public function withdrawStage(_arg1:Stage){
Game.framelistener.removeEventListener(FrameListener.BEGIN_FRAME, updateParticles);
mParticleWake.withdrawStage(_arg1);
}
}
}//package
Section 179
//WakeParticle (WakeParticle)
package {
import flash.display.*;
public class WakeParticle {
public var yVel:Number;// = 0.5
public var xVel:Number;// = 0.5
public var clip:DisplayObject;
public var shrink:Number;// = 1
public var fade:Number;// = 0
public function WakeParticle(_arg1:Class, _arg2:DisplayObjectContainer, _arg3:Number, _arg4:Number){
if (_arg1){
clip = new (_arg1);
_arg2.addChild(clip);
clip.x = _arg3;
clip.y = _arg4;
};
}
public function update():void{
clip.x = (clip.x + xVel);
clip.y = (clip.y + yVel);
clip.scaleX = (clip.scaleX * shrink);
clip.scaleY = (clip.scaleY * shrink);
clip.alpha = (clip.alpha - fade);
}
public function destroy():void{
clip.parent.removeChild(clip);
clip = null;
}
public function setVel(_arg1:Number, _arg2:Number):void{
xVel = _arg1;
yVel = _arg2;
}
}
}//package
Section 180
//Wall (Wall)
package {
import flash.geom.*;
public class Wall extends WallBase {
public static const sVisible = false;
public function Wall(){
super(GameObject.type_Wall);
visible = sVisible;
}
override public function getSecondPoint(_arg1:Point):Point{
return (_arg1.add(calculateNewPoint(0, 56.5)));
}
override public function getFirstPoint():Point{
return (this.getAbsPos().add(calculateNewPoint(0, -28.25)));
}
}
}//package
Section 181
//WallBase (WallBase)
package {
import flash.geom.*;
public class WallBase extends GameObject {
public function WallBase(_arg1:uint){
super(_arg1);
}
public function calculateNewPoint(_arg1:Number, _arg2:Number):Point{
var _local3:Number = (_arg2 * this.scaleY);
var _local4:Number = (_arg1 * this.scaleX);
var _local5:Number = ((Math.atan((_arg2 / _arg1)) * 180) / Math.PI);
if (_local4 < 0){
_local5 = (_local5 + 180);
};
var _local6:Number = Math.sqrt(((_local4 * _local4) + (_local3 * _local3)));
var _local7:Number = (((this.rotation + _local5) * Math.PI) / 180);
return (new Point((_local6 * Math.cos(_local7)), (_local6 * Math.sin(_local7))));
}
public function getSecondPoint(_arg1:Point):Point{
return (_arg1.add(new Point(0, this.height)));
}
public function getFirstPoint():Point{
return (this.getAbsPos());
}
}
}//package
Section 182
//WaterHolderB (WaterHolderB)
package {
import flash.display.*;
import com.midasplayer.extras.*;
public dynamic class WaterHolderB extends MovieClip {
public var BLUE:Water;
}
}//package
Section 183
//WaterHolderG (WaterHolderG)
package {
import flash.display.*;
import com.midasplayer.extras.*;
public dynamic class WaterHolderG extends MovieClip {
public var GREEN:Water;
}
}//package
Section 184
//WaterHolderR (WaterHolderR)
package {
import flash.display.*;
import com.midasplayer.extras.*;
public dynamic class WaterHolderR extends MovieClip {
public var RED:Water;
}
}//package
Section 185
//WeaponUpgradeFunctor (WeaponUpgradeFunctor)
package {
public class WeaponUpgradeFunctor {
var mNewColor:uint;
public function WeaponUpgradeFunctor(_arg1:Trigger, _arg2:uint){
mNewColor = GameColor.white;
super();
mNewColor = _arg2;
_arg1.setMode(Trigger.mode_OneTimeOnly);
_arg1.addTriggerFunction(this.upgradeWeapon);
}
public function upgradeWeapon(_arg1:Trigger){
Game.getInstance().getPlayer().setMaxColor(mNewColor);
Sounds.pickUp();
}
}
}//package
Section 186
//WhiteTransition (WhiteTransition)
package {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
public class WhiteTransition extends MovieClip {
public static var mLastPlayerStartOffset:Point = null;
public function WhiteTransition(){
addFrameScript(29, frame30);
stop();
}
function frame30(){
stop();
}
public function start(_arg1:Stage){
var _local2:Point = new Point((MyCamera.getInstance().getWidth() / 2), (MyCamera.getInstance().getHeight() / 2));
this.x = _local2.x;
this.y = _local2.y;
_arg1.addChild(this);
Sounds.Transit();
gotoAndPlay(2);
_arg1.addEventListener(Event.ENTER_FRAME, checkFrame);
}
public function checkFrame(_arg1:Event){
if (this.currentFrame == this.totalFrames){
this.stop();
Game.getInstance().getStage().removeEventListener(Event.ENTER_FRAME, checkFrame);
this.parent.removeChild(this);
Game.getInstance().gotoNextLevel();
};
}
}
}//package
Section 187
//WrongColorText (WrongColorText)
package {
public dynamic class WrongColorText extends HintText {
}
}//package