Section 1
//MD5 (com.gsolo.encryption.MD5)
package com.gsolo.encryption {
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 _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
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;
_local3 = 1732584193;
_local4 = -271733879;
_local5 = -1732584194;
_local6 = 271733878;
_local7 = 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:String;
var _local3:Number;
_local2 = "";
_local3 = 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:String;
var _local3:Number;
_local2 = "";
_local3 = 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:Array;
var _local3:Number;
var _local4:Number;
_local2 = new Array((_arg1.length >> 2));
_local3 = 0;
while (_local3 < _local2.length) {
_local2[_local3] = 0;
_local3++;
};
_local4 = 0;
while (_local4 < (_arg1.length * 8)) {
_local2[(_local4 >> 5)] = (_local2[(_local4 >> 5)] | ((_arg1.charCodeAt((_local4 / 8)) & 0xFF) << (_local4 % 32)));
_local4 = (_local4 + 8);
};
return (_local2);
}
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 _local2:String;
var _local3:String;
var _local4:Number;
var _local5:Number;
_local2 = (hexcase) ? "0123456789ABCDEF" : "0123456789abcdef";
_local3 = "";
_local5 = 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 _local2:String;
var _local3:String;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
_local2 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
_local3 = "";
_local4 = _arg1.length;
_local5 = 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;
var _local4:Number;
_local3 = ((_arg1 & 0xFFFF) + (_arg2 & 0xFFFF));
_local4 = (((_arg1 >> 16) + (_arg2 >> 16)) + (_local3 >> 16));
return (((_local4 << 16) | (_local3 & 0xFFFF)));
}
public static function str2rstr_utf8(_arg1:String):String{
var _local2:String;
var _local3:Number;
var _local4:Number;
var _local5:Number;
_local2 = "";
_local3 = -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;
var _local4:Array;
var _local5:Array;
var _local6:Number;
var _local7:Array;
_local3 = rstr2binl(_arg1);
if (_local3.length > 16){
_local3 = binl_md5(_local3, (_arg1.length * 8));
};
_local4 = new Array(16);
_local5 = new Array(16);
_local6 = 0;
while (_local6 < 16) {
_local4[_local6] = (_local3[_local6] ^ 909522486);
_local5[_local6] = (_local3[_local6] ^ 1549556828);
_local6++;
};
_local7 = 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:String;
var _local3:Number;
_local2 = "";
_local3 = 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 _local3:Number;
var _local4:Array;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Array;
var _local9:Array;
var _local10:String;
_local3 = _arg2.length;
_local4 = [];
_local9 = new Array((_arg1.length / 2));
_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;
};
_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.gsolo.encryption
Section 2
//challenge_complete_61 (synergy4_fla.challenge_complete_61)
package synergy4_fla {
import flash.display.*;
public dynamic class challenge_complete_61 extends MovieClip {
public var challengeNotice:MovieClip;
public function challenge_complete_61(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package synergy4_fla
Section 3
//challenge_list_49 (synergy4_fla.challenge_list_49)
package synergy4_fla {
import flash.display.*;
public dynamic class challenge_list_49 extends MovieClip {
public var check1:MovieClip;
public var check3:MovieClip;
public var check4:MovieClip;
public var check5:MovieClip;
public var check6:MovieClip;
public var check2:MovieClip;
public var check7:MovieClip;
public var backToMenu:MovieClip;
}
}//package synergy4_fla
Section 4
//game_complete_57 (synergy4_fla.game_complete_57)
package synergy4_fla {
import flash.display.*;
import flash.text.*;
public dynamic class game_complete_57 extends MovieClip {
public var submitScore:MovieClip;
public var returnToMenu:MovieClip;
public var nameInput:TextField;
}
}//package synergy4_fla
Section 5
//game_over_60 (synergy4_fla.game_over_60)
package synergy4_fla {
import flash.display.*;
import flash.text.*;
public dynamic class game_over_60 extends MovieClip {
public var submitScore:MovieClip;
public var returnToMenu:MovieClip;
public var nameInput:TextField;
}
}//package synergy4_fla
Section 6
//game_paused_46 (synergy4_fla.game_paused_46)
package synergy4_fla {
import flash.display.*;
public dynamic class game_paused_46 extends MovieClip {
public var resumeGame:MovieClip;
}
}//package synergy4_fla
Section 7
//hub_legend_34 (synergy4_fla.hub_legend_34)
package synergy4_fla {
import flash.display.*;
public dynamic class hub_legend_34 extends MovieClip {
public function hub_legend_34(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package synergy4_fla
Section 8
//load_item_17 (synergy4_fla.load_item_17)
package synergy4_fla {
import flash.display.*;
public dynamic class load_item_17 extends MovieClip {
public function load_item_17(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package synergy4_fla
Section 9
//load_items_5 (synergy4_fla.load_items_5)
package synergy4_fla {
import flash.display.*;
public dynamic class load_items_5 extends MovieClip {
public var preloader:MovieClip;
public var titleLoading:MovieClip;
public function load_items_5(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package synergy4_fla
Section 10
//loading_bar_7 (synergy4_fla.loading_bar_7)
package synergy4_fla {
import flash.display.*;
public dynamic class loading_bar_7 extends MovieClip {
public var lbar:MovieClip;
}
}//package synergy4_fla
Section 11
//MainTimeline (synergy4_fla.MainTimeline)
package synergy4_fla {
import flash.events.*;
import com.gsolo.encryption.*;
import flash.media.*;
import flash.display.*;
import flash.text.*;
import flash.net.*;
import flash.ui.*;
import flash.geom.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class MainTimeline extends MovieClip {
public var loaded:Boolean;
public var particle_container:MovieClip;
public var hubDisplay:MovieClip;
public var highScore:int;
public var laserDamage:Number;
public var startJuice:Number;
public var totalPower:int;
public var rock_container:MovieClip;
public var levelTimer:int;
public var fbcp:MovieClip;
public var gameStarted:Boolean;
public var introLogo:MovieClip;
public var levelJuice:int;
public var rockType:String;
public var menuTitle:MovieClip;
public var greenLevel:Array;
public var myName:String;
public var so:SharedObject;
public var levelStarted:Boolean;
public var myContextMenu:ContextMenu;
public var levelChange:Boolean;
public var laserTint:int;
public var i:int;
public var j:int;
public var k:int;
public var l:int;
public var startLevel:int;
public var totalJuice:Number;
public var scoreSubmitted:Boolean;
public var synergyLevel:Array;
public var keyLetterGreen:int;
public var loadItems:MovieClip;
public var currentGas:Number;
public var performancePower:int;
public var endlessMode:Boolean;
public var colorDamage:Array;
public var titleMusic:MeteorTitle;
public var totalHealth:Number;
public var keyCodeArray:Array;
public var levelEndTimer:int;
public var ultraHard:Number;
public var scoreAdd:int;
public var xDistance:Number;
public var levelGas:int;
public var star_container:MovieClip;
public var showOptions:Boolean;
public var keyLetterRed:int;
public var rockTimer:int;
public var totalGas:Number;
public var megaRock:Boolean;
public var highEndless:int;
public var laserPower:Number;
public var soundVolume:SoundTransform;
public var colorTint:Array;
public var startGas:Number;
public var musicChannel:SoundChannel;
public var levelHealth:int;
public var score_container:MovieClip;
public var laserBeam:MovieClip;
public var blackFade:MovieClip;
public var currentHealth:Number;
public var consecutiveChain:int;
public var speedUp:Number;
public var soundToggle:Boolean;
public var showChallenges:Boolean;
public var gameComplete:Boolean;
public var currentSecond:int;
public var scoreChain:int;
public var keyLetterBlue:int;
public var colorPower:Array;
public var shooting:Boolean;
public var startHealth:Number;
public var keyBlue:Boolean;
public var currentJuice:Number;
public var blueLevel:Array;
public var redLevel:Array;
public var item2:ContextMenuItem;
public var item4:ContextMenuItem;
public var musicMain:mxMain;
public var item3:ContextMenuItem;
public var levelLength:int;
public var keyLetterP:Boolean;
public var slowField:MovieClip;
public var trail_container:MovieClip;
public var chromePlayLogo:MovieClip;
public var thisLevel:int;
public var musicVolume:SoundTransform;
public var menu_container:MovieClip;
public var shootingTimer:int;
public var yDistance:Number;
public var keyPressP:Boolean;
public var currentLevel:int;
public var menuItems:MovieClip;
public var totalScore:int;
public var challengeArray:Array;
public var keyRed:Boolean;
public var totalStats:int;
public var gamePaused:Boolean;
public var bombTimer:int;
public var challengesComplete:int;
public var mouseClicked:Boolean;
public var hubDescription:Boolean;
public var explosion_container:MovieClip;
public var musicToggle:Boolean;
public var goldArray:Array;
public var gameOver:Boolean;
public var megaDestroyed:Boolean;
public var keyGreen:Boolean;
public var currentTime:int;
public var keySpace:Boolean;
public var keyLetterArray:Array;
public function MainTimeline(){
addFrameScript(0, frame1, 9, frame10, 19, frame20);
}
public function addMenuItems():void{
menu_container.addChild(menuItems);
stage.addEventListener(Event.ENTER_FRAME, menuEnterFrame);
stage.addEventListener(MouseEvent.MOUSE_DOWN, menuClickDown);
}
public function sponsorLink():void{
if (challengeArray[6] == false){
hubDisplay.challengeComplete.gotoAndPlay("fade_in");
challengeArray[6] = true;
};
saveData();
getURL("http://www.chromeplay.com", "_blank");
}
public function ultraRoll(_arg1:String):void{
if (hubDisplay.optionsMenu.ultraHard[_arg1].hitTestPoint(mouseX, mouseY, false)){
hubDisplay.optionsMenu.ultraHard[_arg1].gotoAndStop("border_on");
} else {
hubDisplay.optionsMenu.ultraHard[_arg1].gotoAndStop("border_off");
};
}
public function getURL(_arg1:String, _arg2:String){
var web:String;
var request:URLRequest;
var url = _arg1;
var method = _arg2;
web = url;
request = new URLRequest(web);
try {
navigateToURL(request, method);
} catch(e:Error) {
};
}
public function menuEnterFrame(_arg1:Event):void{
if (gameStarted == false){
if (menuItems.alpha < 1){
menuItems.alpha = (menuItems.alpha + 0.1);
};
if (challengeArray[0] == true){
menuItems.menuButtons.menuEndless.alpha = 1;
} else {
menuItems.menuButtons.menuEndless.alpha = 0.5;
};
hubDescription = true;
if (menuItems.menuButtons.menuPlay.hitTestPoint(mouseX, mouseY, false)){
menuItems.menuDescription.gotoAndStop("play");
menuItems.menuDescription.menuText.text = ("Play through 10 stages of increasingly difficult meteor destruction. Buy upgrades to improve your equipment.\n\n\nHigh Score\n" + highScore);
} else {
if (menuItems.menuButtons.menuEndless.hitTestPoint(mouseX, mouseY, false)){
menuItems.menuDescription.gotoAndStop("endless");
if (challengeArray[0] == true){
menuItems.menuDescription.menuText.text = ("No time limit, maximum difficulty and full upgrades - how long can you survive?\n\n\nHigh Score\n" + highEndless);
} else {
menuItems.menuDescription.menuText.text = "Unlock after completing Arcade mode.";
};
} else {
if (menuItems.menuButtons.menuChallenges.hitTestPoint(mouseX, mouseY, false)){
menuItems.menuDescription.gotoAndStop("challenges");
menuItems.menuDescription.menuText.text = "See a list of additional game challenges, try and acheive them all.\n\nComplete every challenge to unlock Ultra Hard mode.";
} else {
if (menuItems.menuButtons.menuCredits.hitTestPoint(mouseX, mouseY, false)){
menuItems.menuDescription.gotoAndStop("credits");
menuItems.menuDescription.menuText.text = "Game created by Mark Lunney (ChromeShark) chromesharkmedia\n.com (click to visit)\n\nMusic by Chris Reed christoffah.com";
} else {
if (menuItems.menuButtons.menuScores.hitTestPoint(mouseX, mouseY, false)){
menuItems.menuDescription.gotoAndStop("scores");
menuItems.menuDescription.menuText.text = "See the list of High Scores for the game. Try and score high to get on their yourself!";
} else {
menuItems.menuDescription.gotoAndStop("blank");
menuItems.menuDescription.menuText.text = "";
hubDescription = false;
};
};
};
};
};
if ((((showOptions == true)) || ((showChallenges == true)))){
menuItems.menuDescription.alpha = 0;
menuItems.ngAd.alpha = 0;
} else {
if (hubDescription == true){
menuItems.ngAd.alpha = 0;
if (menuItems.menuDescription.alpha < 1){
menuItems.menuDescription.alpha = (menuItems.menuDescription.alpha + 0.2);
};
} else {
menuItems.ngAd.alpha = 1;
if (menuItems.menuDescription.alpha > 0){
menuItems.menuDescription.alpha = (menuItems.menuDescription.alpha - 0.2);
};
};
};
menuItems.menuDescription.lightShine.x = (50 - (mouseX / 10));
menuItems.menuDescription.lightShine.y = (-50 - (mouseY / 10));
};
}
public function createExplode(_arg1, _arg2):void{
var _local3:fxExploder;
var _local4:SoundTransform;
var _local5:Explosion;
if (soundToggle == true){
_local3 = new fxExploder();
_local4 = new SoundTransform(_arg2, 0);
_local3.play(0, 1, _local4);
};
j = 0;
while (j < (_arg1 * performancePower)) {
_local5 = new Explosion(rock_container.getChildAt(i).x, rock_container.getChildAt(i).y, MovieClip(rock_container.getChildAt(i)).colorTint[1], MovieClip(rock_container.getChildAt(i)).colorTint[2], MovieClip(rock_container.getChildAt(i)).colorTint[3]);
explosion_container.addChild(_local5);
j++;
};
if ((((explosion_container.numChildren >= (250 * performancePower))) && ((challengeArray[4] == false)))){
hubDisplay.challengeComplete.gotoAndPlay("fade_in");
challengeArray[4] = true;
};
}
public function linkChromePlay(_arg1:MouseEvent):void{
getURL("http://www.chromeplay.com", "_blank");
}
public function challengeCheck():void{
challengesComplete = 0;
i = 0;
while (i <= 6) {
if (challengeArray[i] == true){
challengesComplete = (challengesComplete + 1);
};
i++;
};
}
public function menuSelectHandler2(_arg1:ContextMenuEvent):void{
getURL("http://www.chromeplay.com", "_blank");
}
public function menuSelectHandler3(_arg1:ContextMenuEvent):void{
stage.quality = "LOW";
}
public function menuSelectHandler4(_arg1:ContextMenuEvent):void{
stage.quality = "MEDIUM";
}
function frame20(){
stop();
i = 0;
j = 0;
k = 0;
l = 0;
keyRed = false;
keyGreen = false;
keyBlue = false;
keyLetterP = false;
keySpace = false;
keyPressP = false;
keyLetterArray = new Array(" ", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z");
keyCodeArray = new Array(0, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90);
shooting = false;
shootingTimer = 0;
totalPower = 0;
gameStarted = false;
gameComplete = false;
gameOver = false;
gamePaused = false;
showChallenges = false;
showOptions = false;
challengesComplete = 0;
consecutiveChain = 0;
rockTimer = 0;
bombTimer = 0;
scoreSubmitted = false;
levelLength = 29;
startLevel = 1;
ultraHard = 1;
speedUp = 1;
currentTime = 0;
currentSecond = 0;
hubDescription = false;
levelEndTimer = 100;
levelChange = false;
levelStarted = false;
megaRock = false;
megaDestroyed = true;
laserTint = 0;
startHealth = 100;
startGas = 100;
startJuice = 100;
laserPower = 30;
goldArray = new Array(0, 0, 0);
colorPower = new Array(0, 0, 0, 0);
colorTint = new Array(0, 0, 0, 0);
colorDamage = new Array(0, 0, 0, 0);
redLevel = new Array(0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1);
greenLevel = new Array(0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1);
blueLevel = new Array(0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1);
synergyLevel = new Array(0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 4);
scoreChain = 0;
totalScore = 0;
scoreAdd = 100;
totalStats = 0;
xDistance = 0;
yDistance = 0;
mouseClicked = false;
star_container = new MovieClip();
addChild(star_container);
trail_container = new MovieClip();
addChild(trail_container);
rock_container = new MovieClip();
addChild(rock_container);
particle_container = new MovieClip();
addChild(particle_container);
explosion_container = new MovieClip();
addChild(explosion_container);
score_container = new MovieClip();
addChild(score_container);
laserBeam = new laser_beam();
addChild(laserBeam);
hubDisplay = new hub_display();
addChild(hubDisplay);
slowField = new slow_field();
addChild(slowField);
menu_container = new MovieClip();
addChild(menu_container);
menuItems = new Menu_items();
addMenuItems();
blackFade = new black_fade();
addChild(blackFade);
blackFade.x = 0;
blackFade.y = 0;
stage.addEventListener(Event.ENTER_FRAME, gameEnterFrame);
stage.addEventListener(Event.ENTER_FRAME, menuEnterFrame);
stage.addEventListener(MouseEvent.MOUSE_DOWN, mouseClickDown);
stage.addEventListener(MouseEvent.MOUSE_UP, mouseClickUp);
stage.addEventListener(KeyboardEvent.KEY_DOWN, keyDownFunction);
stage.addEventListener(KeyboardEvent.KEY_UP, keyUpFunction);
musicVolume = new SoundTransform(1, 0);
musicMain = new mxMain();
titleMusic = new MeteorTitle();
musicChannel = titleMusic.play(0, 99, musicVolume);
soundVolume = new SoundTransform(0.4, 0);
i = 0;
while (i < 100) {
createStar((Math.random() * 500));
i++;
};
}
public function createRock(_arg1:Number, _arg2:Number, _arg3:int, _arg4:int, _arg5:int, _arg6:Number, _arg7:Number, _arg8:Number, _arg9:String):void{
var _local10:Rock;
_local10 = new Rock(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9);
rock_container.addChild(_local10);
}
public function keyDownFunction(_arg1:KeyboardEvent):void{
if (_arg1.keyCode == keyCodeArray[keyLetterRed]){
keyRed = true;
};
if (_arg1.keyCode == keyCodeArray[keyLetterGreen]){
keyGreen = true;
};
if (_arg1.keyCode == keyCodeArray[keyLetterBlue]){
keyBlue = true;
};
if (_arg1.keyCode == 80){
keyLetterP = true;
};
if (_arg1.keyCode == 32){
keySpace = true;
};
}
function frame10(){
stop();
this.addEventListener(Event.ENTER_FRAME, enterFrameIntro);
}
public function checkHighEndless():void{
if (totalScore > highEndless){
highEndless = totalScore;
saveData();
};
}
public function checkHighScore():void{
if (totalScore > highScore){
highScore = totalScore;
saveData();
};
}
public function levelEnd():void{
if (currentLevel == 10){
gameComplete = true;
hubDisplay.gameComplete.nameInput.text = (myName + "");
checkHighScore();
if (challengeArray[0] == false){
hubDisplay.challengeComplete.gotoAndPlay("fade_in");
challengeArray[0] = true;
};
} else {
megaRock = false;
megaDestroyed = true;
currentLevel = (currentLevel + 1);
goldArray[0] = 0;
goldArray[1] = 0;
goldArray[2] = 0;
levelChange = true;
totalHealth = (currentHealth = (startHealth + (levelHealth * 10)));
totalJuice = (currentJuice = (startJuice + (levelJuice * 10)));
totalGas = (currentGas = (startGas + (levelGas * 10)));
};
}
public function linkFacebook():void{
getURL("http://apps.new.facebook.com/chromeplay/process_profile.php?id=79", "_blank");
}
function frame1(){
stop();
stage.quality = "MEDIUM";
NewgroundsAPI.linkAPI(this);
NewgroundsAPI.connectMovie(5142);
so = SharedObject.getLocal("userData");
highScore = 0;
highEndless = 0;
challengeArray = new Array(false, false, false, false, false, false, false);
keyLetterRed = 23;
keyLetterGreen = 4;
keyLetterBlue = 1;
myName = "My Name";
musicToggle = true;
soundToggle = true;
performancePower = 2;
if (so.size != 0){
highScore = so.data.highScore;
highEndless = so.data.highEndless;
challengeArray = so.data.challengeArray;
keyLetterRed = so.data.keyLetterRed;
keyLetterGreen = so.data.keyLetterGreen;
keyLetterBlue = so.data.keyLetterBlue;
myName = so.data.myName;
musicToggle = so.data.musicToggle;
soundToggle = so.data.soundToggle;
performancePower = so.data.performancePower;
};
loaded = false;
stage.addEventListener(MouseEvent.MOUSE_DOWN, mouseClickLoad);
this.addEventListener("enterFrame", load_bar);
myContextMenu = new ContextMenu();
myContextMenu.hideBuiltInItems();
item2 = new ContextMenuItem("Play More Games");
myContextMenu.customItems.push(item2);
item2.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, menuSelectHandler2);
item3 = new ContextMenuItem("Game Quality: Low");
myContextMenu.customItems.push(item3);
item3.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, menuSelectHandler3);
item4 = new ContextMenuItem("Game Quality: Normal");
myContextMenu.customItems.push(item4);
item4.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, menuSelectHandler4);
this.contextMenu = myContextMenu;
}
public function saveData():void{
so.data.highScore = highScore;
so.data.highEndless = highEndless;
so.data.challengeArray = challengeArray;
so.data.keyLetterRed = keyLetterRed;
so.data.keyLetterGreen = keyLetterGreen;
so.data.keyLetterBlue = keyLetterBlue;
so.data.myName = myName;
so.data.musicToggle = musicToggle;
so.data.soundToggle = soundToggle;
so.data.performancePower = performancePower;
}
public function gameEnterFrame(_arg1:Event):void{
var _local2:Particle;
var _local3:Trail;
var _local4:Score;
slowField.x = mouseX;
slowField.y = mouseY;
if (gameStarted == true){
if (gamePaused == true){
if (hubDisplay.gamePaused.alpha < 1){
hubDisplay.gamePaused.alpha = (hubDisplay.gamePaused.alpha + 0.1);
};
hubDisplay.optionsMenu.alpha = 1;
optionsRolls();
} else {
hubDisplay.optionsMenu.alpha = 0;
if (hubDisplay.gamePaused.alpha > 0){
hubDisplay.gamePaused.alpha = (hubDisplay.gamePaused.alpha - 0.1);
};
};
};
if ((((gameComplete == true)) && ((gamePaused == false)))){
hubDisplay.gameComplete.x = 0;
if (hubDisplay.gameComplete.alpha < 1){
hubDisplay.gameComplete.alpha = (hubDisplay.gameComplete.alpha + 0.1);
};
} else {
if (hubDisplay.gameComplete.alpha > 0){
hubDisplay.gameComplete.alpha = (hubDisplay.gameComplete.alpha - 0.1);
} else {
hubDisplay.gameComplete.x = 600;
};
};
if ((((gameOver == true)) && ((gamePaused == false)))){
hubDisplay.gameOver.x = 0;
if (hubDisplay.gameOver.alpha < 1){
hubDisplay.gameOver.alpha = (hubDisplay.gameOver.alpha + 0.1);
};
} else {
if (hubDisplay.gameOver.alpha > 0){
hubDisplay.gameOver.alpha = (hubDisplay.gameOver.alpha - 0.1);
} else {
hubDisplay.gameOver.x = 600;
};
};
if (gameStarted == true){
hubDisplay.pauseSymbol.gotoAndStop("pause");
} else {
hubDisplay.pauseSymbol.gotoAndStop("options");
};
if (hubDisplay.pauseSymbol.hitTestPoint(mouseX, mouseY, false)){
hubDisplay.legend_pause.alpha = 1;
if (gameStarted == true){
hubDisplay.legend_pause.gotoAndStop("pause");
} else {
hubDisplay.legend_pause.gotoAndStop("options");
};
} else {
hubDisplay.legend_pause.alpha = 0;
};
if (hubDisplay.sponsorLogo.hitTestPoint(mouseX, mouseY, false)){
hubDisplay.legend_chromeplay.alpha = 1;
hubDisplay.legend_chromeplay.gotoAndStop("chromeplay");
} else {
hubDisplay.legend_chromeplay.alpha = 0;
};
if (gamePaused == true){
if (hubDisplay.gamePaused.resumeGame.hitTestPoint(mouseX, mouseY, false)){
hubDisplay.gamePaused.resumeGame.alpha = 1;
} else {
hubDisplay.gamePaused.resumeGame.alpha = 0.5;
};
};
if (gameComplete == true){
if (hubDisplay.gameComplete.returnToMenu.hitTestPoint(mouseX, mouseY, false)){
hubDisplay.gameComplete.returnToMenu.alpha = 1;
} else {
hubDisplay.gameComplete.returnToMenu.alpha = 0.5;
};
if (endlessMode == true){
hubDisplay.gameComplete.submitScore.alpha = 0;
} else {
if (scoreSubmitted == true){
hubDisplay.gameComplete.submitScore.alpha = 0.2;
} else {
if (hubDisplay.gameComplete.submitScore.hitTestPoint(mouseX, mouseY, false)){
hubDisplay.gameComplete.submitScore.alpha = 1;
} else {
hubDisplay.gameComplete.submitScore.alpha = 0.5;
};
};
};
};
if (gameOver == true){
if (hubDisplay.gameOver.returnToMenu.hitTestPoint(mouseX, mouseY, false)){
hubDisplay.gameOver.returnToMenu.alpha = 1;
} else {
hubDisplay.gameOver.returnToMenu.alpha = 0.5;
};
if (endlessMode == true){
hubDisplay.gameOver.submitScore.alpha = 0;
} else {
if (scoreSubmitted == true){
hubDisplay.gameOver.submitScore.alpha = 0.2;
} else {
if (hubDisplay.gameOver.submitScore.hitTestPoint(mouseX, mouseY, false)){
hubDisplay.gameOver.submitScore.alpha = 1;
} else {
hubDisplay.gameOver.submitScore.alpha = 0.5;
};
};
};
};
if (levelChange == true){
hubDisplay.statUpgrades.statsAvailable.text = ("Stats Available: " + totalStats);
if (hubDisplay.statUpgrades.nextButton.hitTestPoint(mouseX, mouseY, false)){
hubDisplay.statUpgrades.nextButton.alpha = 1;
} else {
hubDisplay.statUpgrades.nextButton.alpha = 0.5;
};
hubDisplay.statUpgrades.statDescription.text = "Roll over an attribute to see a description. Click to upgrade.";
i = 1;
while (i <= 3) {
if (i == 1){
thisLevel = levelJuice;
} else {
if (i == 2){
thisLevel = levelGas;
} else {
if (i == 3){
thisLevel = levelHealth;
};
};
};
j = 1;
while (j <= 10) {
if (thisLevel >= j){
hubDisplay.statUpgrades[((("stat" + i) + "_") + j)].alpha = 0.7;
} else {
hubDisplay.statUpgrades[((("stat" + i) + "_") + j)].alpha = 0.2;
};
j++;
};
if (hubDisplay.statUpgrades[("statBar" + i)].hitTestPoint(mouseX, mouseY, false)){
hubDisplay.statUpgrades[("statBar" + i)].alpha = 0.2;
if (i == 1){
hubDisplay.statUpgrades.statDescription.text = "Upgrade to increase your Laser fuel and time it takes to recover.";
} else {
if (i == 2){
hubDisplay.statUpgrades.statDescription.text = "Upgrade to increase your Vortex charge and time takes to recharge.";
} else {
if (i == 3){
hubDisplay.statUpgrades.statDescription.text = "Upgrade to increase your total health and time it takes to repair.";
};
};
};
} else {
hubDisplay.statUpgrades[("statBar" + i)].alpha = 0.1;
};
i++;
};
};
if (levelStarted == true){
hubDisplay.nextLevel.alpha = 0;
} else {
if (hubDisplay.nextLevel.hitTestPoint(mouseX, mouseY, false)){
hubDisplay.nextLevel.alpha = 1;
} else {
hubDisplay.nextLevel.alpha = 0.7;
};
};
if (gameStarted == true){
if (endlessMode == true){
hubDisplay.textStage.text = "ENDLESS";
hubDisplay.textScore.text = ("SCORE: " + totalScore);
hubDisplay.textTime.text = ("TIME: " + currentSecond);
} else {
hubDisplay.textStage.text = ("STAGE " + currentLevel);
hubDisplay.textScore.text = ("SCORE: " + totalScore);
hubDisplay.textTime.text = ("TIME: " + ((currentLevel * (levelLength + currentLevel)) - currentSecond));
};
} else {
hubDisplay.textStage.text = "";
hubDisplay.textScore.text = "";
hubDisplay.textTime.text = "";
};
if (gameStarted == true){
hubDisplay.meterDamage.scaleX = (currentHealth / totalHealth);
hubDisplay.meterDamage.gotoAndStop((100 - Math.ceil(currentHealth)));
hubDisplay.backDamage.gotoAndStop((100 - Math.ceil(currentHealth)));
hubDisplay.meterLaser.scaleX = (currentJuice / totalJuice);
hubDisplay.meterLaser.gotoAndStop((100 - Math.ceil(currentJuice)));
hubDisplay.backLaser.gotoAndStop((100 - Math.ceil(currentJuice)));
hubDisplay.meterVortex.scaleX = (hubDisplay.meterVortex.scaleY = (currentGas / totalGas));
} else {
hubDisplay.meterDamage.scaleX = 0;
hubDisplay.meterLaser.scaleX = 0;
hubDisplay.meterVortex.scaleX = (hubDisplay.meterVortex.scaleY = 0);
};
if (currentHealth == 0){
(gameOver == true);
};
if ((((((gamePaused == false)) && ((gameOver == false)))) && ((gameComplete == false)))){
if (currentHealth < totalHealth){
currentHealth = (currentHealth + (totalHealth / 1000));
};
if (currentJuice < totalJuice){
currentJuice = (currentJuice + (totalJuice / 100));
if (currentJuice > totalJuice){
currentJuice = totalJuice;
};
};
};
shooting = false;
if ((((((((gameComplete == false)) && ((gameOver == false)))) && ((gamePaused == false)))) && ((gameStarted == true)))){
colorPower[1] = 0;
colorPower[2] = 0;
colorPower[3] = 0;
if (currentJuice > 0){
if (keyRed == true){
colorPower[1] = 1;
};
if ((((keyRed == false)) || ((synergyLevel[currentLevel] > 0)))){
if (keyGreen == true){
colorPower[2] = 1;
};
};
if ((((((keyRed == false)) || ((synergyLevel[currentLevel] > 1)))) && ((((keyGreen == false)) || ((synergyLevel[currentLevel] > 2)))))){
if (keyBlue == true){
colorPower[3] = 1;
};
};
if ((((((((colorPower[1] == true)) && ((colorPower[2] == true)))) && ((colorPower[3] == true)))) && ((synergyLevel[currentLevel] < 4)))){
colorPower[2] = false;
colorPower[3] = false;
};
};
};
if ((((((((((mouseY > 30)) && ((mouseY < 450)))) && ((gameStarted == true)))) && ((gameOver == false)))) && ((gameComplete == false)))){
Mouse.hide();
slowField.alpha = 1;
} else {
Mouse.show();
slowField.alpha = 0;
};
colorWheel(1);
colorWheel(2);
colorWheel(3);
colorWheel(4);
colorWheel(5);
colorWheel(6);
colorWheel(7);
hubDisplay.letter_red.text = (keyLetterArray[keyLetterRed] + "");
hubDisplay.letter_green.text = (keyLetterArray[keyLetterGreen] + "");
hubDisplay.letter_blue.text = (keyLetterArray[keyLetterBlue] + "");
if ((((((((((gameStarted == false)) || ((gamePaused == true)))) || ((gameComplete == true)))) || ((gameOver == true)))) || ((levelChange == true)))){
if (hubDisplay.playMoreGames.alpha < 1){
hubDisplay.playMoreGames.alpha = (hubDisplay.playMoreGames.alpha + 0.1);
};
} else {
if (hubDisplay.playMoreGames.alpha > 0){
hubDisplay.playMoreGames.alpha = (hubDisplay.playMoreGames.alpha - 0.1);
};
};
if (gameStarted == true){
if (menu_container.numChildren > 0){
Object(menu_container.getChildAt(0)).removeSelf();
stage.removeEventListener(Event.ENTER_FRAME, menuEnterFrame);
};
if ((((mouseY > 60)) && ((mouseY < 440)))){
laserBeam.y = mouseY;
} else {
if (mouseY > 60){
laserBeam.y = 440;
} else {
laserBeam.y = 60;
};
};
} else {
laserBeam.y = -50;
hubDisplay.gamePaused.alpha = 0;
if (showOptions == true){
menuItems.menuTitle.alpha = 1;
menuItems.menuButtons.alpha = 0;
hubDisplay.challengeList.alpha = 0;
hubDisplay.optionsMenu.alpha = 1;
optionsRolls();
} else {
if (showChallenges == true){
menuItems.menuTitle.alpha = 0;
menuItems.menuButtons.alpha = 0;
hubDisplay.challengeList.alpha = 1;
hubDisplay.optionsMenu.alpha = 0;
if (hubDisplay.challengeList.backToMenu.hitTestPoint(mouseX, mouseY, false)){
hubDisplay.challengeList.backToMenu.alpha = 1;
} else {
hubDisplay.challengeList.backToMenu.alpha = 0.5;
};
i = 1;
while (i <= 7) {
if (challengeArray[(i - 1)] == true){
hubDisplay.challengeList[("check" + i)].alpha = 0.8;
} else {
hubDisplay.challengeList[("check" + i)].alpha = 0.3;
};
i++;
};
} else {
menuItems.menuTitle.alpha = 1;
menuItems.menuButtons.alpha = 1;
hubDisplay.challengeList.alpha = 0;
hubDisplay.optionsMenu.alpha = 0;
};
};
};
if ((((((((gamePaused == false)) && ((gameStarted == true)))) && ((gameComplete == false)))) && ((gameOver == false)))){
if ((((((levelChange == false)) && ((levelStarted == true)))) && ((((currentSecond < levelTimer)) || ((endlessMode == true)))))){
currentTime = (currentTime + 1);
};
if (currentTime == 30){
currentTime = 0;
currentSecond = (currentSecond + 1);
if ((((((endlessMode == true)) && ((currentSecond == 100)))) && ((challengeArray[2] == false)))){
hubDisplay.challengeComplete.gotoAndPlay("fade_in");
challengeArray[2] = true;
};
};
levelTimer = (currentLevel * (levelLength + currentLevel));
if (endlessMode == false){
if (currentSecond == (levelTimer - 2)){
if ((((((((currentLevel == 2)) || ((currentLevel == 5)))) || ((currentLevel == 8)))) || ((currentLevel == 10)))){
hubDisplay.megarockFlash.play();
};
};
if (currentSecond == levelTimer){
if ((((((((currentLevel == 2)) || ((currentLevel == 5)))) || ((currentLevel == 8)))) || ((currentLevel == 10)))){
if (megaDestroyed == true){
megaRock = true;
megaDestroyed = false;
};
} else {
levelEnd();
};
};
};
if (levelStarted == false){
if (currentHealth <= totalHealth){
currentHealth = (currentHealth + 1);
};
if (endlessMode == true){
hubDisplay.levelUp.gotoAndStop(11);
} else {
hubDisplay.levelUp.gotoAndStop(currentLevel);
};
if (hubDisplay.levelUp.alpha < 1){
hubDisplay.levelUp.alpha = (hubDisplay.levelUp.alpha + 0.1);
};
} else {
if (hubDisplay.levelUp.alpha > 0){
hubDisplay.levelUp.alpha = (hubDisplay.levelUp.alpha - 0.1);
};
};
if (levelChange == true){
if (levelEndTimer == 100){
hubDisplay.stageComplete.alpha = 1;
hubDisplay.stageComplete.play();
};
if (levelEndTimer > 0){
levelEndTimer = (levelEndTimer - 1);
} else {
if (hubDisplay.statUpgrades.alpha <= 1){
hubDisplay.statUpgrades.alpha = (hubDisplay.statUpgrades.alpha + 0.1);
};
};
} else {
if (hubDisplay.statUpgrades.alpha >= 0){
hubDisplay.statUpgrades.alpha = (hubDisplay.statUpgrades.alpha - 0.1);
};
};
if (levelStarted == true){
if (keySpace == true){
hubDisplay.meterVortex.alpha = 0.6;
if (currentGas > 1){
currentGas = (currentGas - 2);
i = 0;
while (i < (10 * performancePower)) {
_local2 = new Particle();
particle_container.addChild(_local2);
i++;
};
particle_container.y = mouseY;
};
} else {
hubDisplay.meterVortex.alpha = 0.3;
if (currentGas < totalGas){
currentGas = (currentGas + (totalGas / 200));
};
if (currentGas > totalGas){
currentGas = totalGas;
};
};
};
if (megaRock == true){
megaRock = false;
if (currentLevel == 2){
createRock(275, -200, 0, 0, 0, currentLevel, (5 * ultraHard), 300, "asteroid");
} else {
if (currentLevel == 5){
createRock(275, -200, 1, 0, 0, currentLevel, (4 * ultraHard), 300, "asteroid");
} else {
if (currentLevel == 8){
createRock(275, -200, 1, 1, 0, currentLevel, (3 * ultraHard), 250, "asteroid");
} else {
if (currentLevel == 10){
createRock(275, -200, 1, 1, 1, currentLevel, (2 * ultraHard), 200, "asteroid");
};
};
};
};
};
if ((((((levelChange == false)) && ((levelStarted == true)))) && ((((currentSecond < levelTimer)) || ((endlessMode == true)))))){
rockTimer = (rockTimer + 1);
if (currentLevel >= 4){
bombTimer = (bombTimer + 1);
};
};
if (rockTimer >= (20 / ultraHard)){
rockTimer = 0;
colorTint[1] = Math.floor(((Math.random() * 2) * redLevel[currentLevel]));
colorTint[2] = Math.floor(((Math.random() * 2) * greenLevel[currentLevel]));
colorTint[3] = Math.floor(((Math.random() * 2) * blueLevel[currentLevel]));
if (synergyLevel[currentLevel] == 0){
if ((((colorTint[1] == 1)) && ((colorTint[2] == 1)))){
colorTint[2] = 0;
};
if ((((colorTint[1] == 1)) && ((colorTint[3] == 1)))){
colorTint[1] = 0;
};
if ((((colorTint[2] == 1)) && ((colorTint[3] == 1)))){
colorTint[3] = 0;
};
} else {
if (synergyLevel[currentLevel] == 1){
if ((((colorTint[1] == 1)) && ((colorTint[3] == 1)))){
colorTint[3] = 0;
};
if ((((colorTint[2] == 1)) && ((colorTint[3] == 1)))){
colorTint[2] = 0;
};
} else {
if (synergyLevel[currentLevel] == 2){
if ((((colorTint[2] == 1)) && ((colorTint[3] == 1)))){
colorTint[2] = 0;
};
} else {
if (synergyLevel[currentLevel] == 3){
if ((((((colorTint[1] == 1)) && ((colorTint[2] == 1)))) && ((colorTint[3] == 1)))){
colorTint[2] = 0;
};
};
};
};
};
if ((((goldArray[0] == 0)) && ((currentSecond == (levelTimer - 25))))){
goldArray[0] = 1;
rockType = "gold";
} else {
if ((((goldArray[1] == 0)) && ((currentSecond == (levelTimer - 18))))){
goldArray[1] = 1;
rockType = "gold";
} else {
if ((((goldArray[2] == 0)) && ((currentSecond == (levelTimer - 10))))){
goldArray[2] = 1;
rockType = "gold";
} else {
rockType = "silver";
};
};
};
if ((((currentLevel == 10)) || ((endlessMode == true)))){
speedUp = 1.2;
};
createRock(((Math.random() * 450) + 50), (-50 - (Math.random() * 100)), colorTint[1], colorTint[2], colorTint[3], currentLevel, ((((Math.random() * 2) + 5) * ultraHard) * speedUp), (Math.random() * 15), rockType);
};
if ((((bombTimer >= (100 / ultraHard))) && ((Math.random() > 0.99)))){
bombTimer = 0;
createRock(((Math.random() * 450) + 50), (-50 - (Math.random() * 100)), 0, 0, 0, currentLevel, ((8 * ultraHard) * speedUp), (Math.random() * 15), "bomb");
};
} else {
hubDisplay.levelUp.alpha = 0;
hubDisplay.nextLevel.alpha = 0;
hubDisplay.statUpgrades.alpha = 0;
hubDisplay.stageComplete.alpha = 0;
hubDisplay.stageComplete.stop();
};
scoreChain = 0;
i = 0;
while (i < rock_container.numChildren) {
MovieClip(rock_container.getChildAt(i)).gamePaused = gamePaused;
if ((((((gameOver == true)) || ((gameComplete == true)))) || ((levelChange == true)))){
if (MovieClip(rock_container.getChildAt(i)).alive == true){
MovieClip(rock_container.getChildAt(i)).alive = false;
createExplode(30, 0.3);
};
};
if (rock_container.getChildAt(i).y > 500){
if (MovieClip(rock_container.getChildAt(i)).alive == true){
if (MovieClip(rock_container.getChildAt(i)).rockType != "bomb"){
causeDamage(MovieClip(rock_container.getChildAt(i)).rockHealth);
if (MovieClip(rock_container.getChildAt(i)).startHealth > 100){
levelEnd();
};
consecutiveChain = 0;
MovieClip(rock_container.getChildAt(i)).alive = false;
};
};
};
if (MovieClip(rock_container.getChildAt(i)).alive == true){
_local3 = new Trail(MovieClip(rock_container.getChildAt(i)).x, MovieClip(rock_container.getChildAt(i)).y, MovieClip(rock_container.getChildAt(i)).width, MovieClip(rock_container.getChildAt(i)).colorTint[1], MovieClip(rock_container.getChildAt(i)).colorTint[2], MovieClip(rock_container.getChildAt(i)).colorTint[3]);
trail_container.addChild(_local3);
};
if (MovieClip(rock_container.getChildAt(i)).hitTestObject(laserBeam.laser)){
if (MovieClip(rock_container.getChildAt(i)).alive == true){
colorDamage[1] = ((1 - colorPower[1]) * MovieClip(rock_container.getChildAt(i)).colorTint[1]);
colorDamage[2] = ((1 - colorPower[2]) * MovieClip(rock_container.getChildAt(i)).colorTint[2]);
colorDamage[3] = ((1 - colorPower[3]) * MovieClip(rock_container.getChildAt(i)).colorTint[3]);
if (((colorDamage[1] + colorDamage[2]) + colorDamage[3]) > 0){
laserDamage = 0;
} else {
laserDamage = laserPower;
};
MovieClip(rock_container.getChildAt(i)).rockHealth = (MovieClip(rock_container.getChildAt(i)).rockHealth - laserDamage);
if (MovieClip(rock_container.getChildAt(i)).rockHealth <= 0){
MovieClip(rock_container.getChildAt(i)).alive = false;
consecutiveChain = (consecutiveChain + 1);
if ((((consecutiveChain >= 100)) && ((challengeArray[3] == false)))){
hubDisplay.challengeComplete.gotoAndPlay("fade_in");
challengeArray[3] = true;
};
createExplode(30, (0.1 + (MovieClip(rock_container.getChildAt(i)).scaleX / 4)));
if (MovieClip(rock_container.getChildAt(i)).rockType == "bomb"){
causeDamage(20);
} else {
if (MovieClip(rock_container.getChildAt(i)).startHealth > 100){
levelEnd();
};
scoreChain = (scoreChain + 1);
scoreAdd = ((100 * scoreChain) * scoreChain);
if (MovieClip(rock_container.getChildAt(i)).rockType == "asteroid"){
scoreAdd = (scoreAdd * 10);
};
totalScore = (totalScore + scoreAdd);
};
_local4 = new Score(rock_container.getChildAt(i).x, rock_container.getChildAt(i).y);
score_container.addChild(_local4);
if (MovieClip(rock_container.getChildAt(i)).rockType == "bomb"){
_local4.scorePlus.text = "DAMAGE";
_local4.scoreChain.text = "";
} else {
if ((((MovieClip(rock_container.getChildAt(i)).rockType == "gold")) || ((MovieClip(rock_container.getChildAt(i)).rockType == "asteroid")))){
totalStats = (totalStats + 1);
_local4.scorePlus.text = "+STAT POINT";
} else {
_local4.scorePlus.text = (scoreAdd + "");
if (scoreChain > 1){
_local4.scoreChain.text = (scoreChain + "X CHAIN");
} else {
_local4.scoreChain.text = "";
};
};
};
};
};
};
yDistance = (mouseY - MovieClip(rock_container.getChildAt(i)).y);
if (yDistance < 0){
yDistance = (0 - yDistance);
};
MovieClip(rock_container.getChildAt(i)).rockDistance = yDistance;
if (keySpace == true){
if (currentGas > 1){
MovieClip(rock_container.getChildAt(i)).slowCheck = MovieClip(rock_container.getChildAt(i)).slowVar;
};
};
i++;
};
createStar(500);
}
public function mouseClickDown(_arg1:MouseEvent):void{
mouseClicked = true;
if ((((((((gameStarted == true)) && ((gamePaused == false)))) && ((gameOver == false)))) && ((gameComplete == false)))){
if ((((levelChange == true)) && ((levelEndTimer == 0)))){
if (hubDisplay.statUpgrades.nextButton.hitTestPoint(mouseX, mouseY, false)){
levelStarted = false;
levelChange = false;
levelEndTimer = 100;
};
i = 1;
while (i <= 3) {
if (hubDisplay.statUpgrades[("statBar" + i)].hitTestPoint(mouseX, mouseY, false)){
if (totalStats > 0){
if (i == 1){
if (levelJuice < 10){
levelJuice = (levelJuice + 1);
totalStats = (totalStats - 1);
};
} else {
if (i == 2){
if (levelGas < 10){
levelGas = (levelGas + 1);
totalStats = (totalStats - 1);
};
} else {
if (i == 3){
if (levelHealth < 10){
levelHealth = (levelHealth + 1);
totalStats = (totalStats - 1);
};
};
};
};
};
};
i++;
};
if ((((((((levelHealth == 10)) && ((levelGas == 10)))) && ((levelHealth == 10)))) && ((challengeArray[1] == false)))){
hubDisplay.challengeComplete.gotoAndPlay("fade_in");
challengeArray[1] = true;
};
} else {
if (levelStarted == false){
if (hubDisplay.nextLevel.hitTestPoint(mouseX, mouseY, false)){
levelStarted = true;
if ((((currentLevel == 1)) || ((endlessMode == true)))){
musicChannel.stop();
musicChannel = musicMain.play(0, 99, musicVolume);
};
};
} else {
if ((((mouseY > 30)) && ((mouseY < 450)))){
laserFire(colorPower[1], colorPower[2], colorPower[3]);
};
};
};
};
if ((((((((((gameStarted == false)) || ((gamePaused == true)))) || ((gameOver == true)))) || ((gameComplete == true)))) || ((levelChange == true)))){
if (hubDisplay.playMoreGames.moreGames.hitTestPoint(mouseX, mouseY, false)){
sponsorLink();
};
if (hubDisplay.playMoreGames.fbcp.hitTestPoint(mouseX, mouseY, false)){
linkFacebook();
};
};
if (hubDisplay.sponsorLogo.hitTestPoint(mouseX, mouseY, false)){
sponsorLink();
};
if (showChallenges == true){
if (hubDisplay.challengeList.backToMenu.hitTestPoint(mouseX, mouseY, false)){
showChallenges = false;
};
};
if ((((showOptions == true)) || ((gamePaused == true)))){
if (hubDisplay.optionsMenu.backToMenu.hitTestPoint(mouseX, mouseY, false)){
if (gameStarted == false){
showOptions = false;
} else {
returnToMenu();
};
};
if (hubDisplay.optionsMenu.sound_on.hitTestPoint(mouseX, mouseY, false)){
soundToggle = true;
};
if (hubDisplay.optionsMenu.sound_off.hitTestPoint(mouseX, mouseY, false)){
soundToggle = false;
};
if (hubDisplay.optionsMenu.music_on.hitTestPoint(mouseX, mouseY, false)){
musicToggle = true;
musicVolume = new SoundTransform(1, 0);
musicChannel.soundTransform = musicVolume;
};
if (hubDisplay.optionsMenu.music_off.hitTestPoint(mouseX, mouseY, false)){
musicToggle = false;
musicVolume = new SoundTransform(0, 0);
musicChannel.soundTransform = musicVolume;
};
if (hubDisplay.optionsMenu.quality_low.hitTestPoint(mouseX, mouseY, false)){
stage.quality = "LOW";
};
if (hubDisplay.optionsMenu.quality_normal.hitTestPoint(mouseX, mouseY, false)){
stage.quality = "MEDIUM";
};
if (hubDisplay.optionsMenu.fx_high.hitTestPoint(mouseX, mouseY, false)){
performancePower = 2;
};
if (hubDisplay.optionsMenu.fx_low.hitTestPoint(mouseX, mouseY, false)){
performancePower = 1;
};
challengeCheck();
if (challengesComplete == 7){
if (hubDisplay.optionsMenu.ultraHard.ultra_on.hitTestPoint(mouseX, mouseY, false)){
ultraHard = 1.5;
};
if (hubDisplay.optionsMenu.ultraHard.ultra_off.hitTestPoint(mouseX, mouseY, false)){
ultraHard = 1;
};
};
if (hubDisplay.optionsMenu.box_red.hitTestPoint(mouseX, mouseY, false)){
keyLetterRed = (keyLetterRed + 1);
if (keyLetterRed > 26){
keyLetterRed = 1;
};
};
if (hubDisplay.optionsMenu.box_green.hitTestPoint(mouseX, mouseY, false)){
keyLetterGreen = (keyLetterGreen + 1);
if (keyLetterGreen > 26){
keyLetterGreen = 1;
};
};
if (hubDisplay.optionsMenu.box_blue.hitTestPoint(mouseX, mouseY, false)){
keyLetterBlue = (keyLetterBlue + 1);
if (keyLetterBlue > 26){
keyLetterBlue = 1;
};
};
};
if (hubDisplay.pauseSymbol.hitTestPoint(mouseX, mouseY, false)){
if (gameStarted == true){
if (gamePaused == false){
gamePaused = true;
musicChannel.stop();
};
} else {
showOptions = true;
};
};
if (gamePaused == true){
if (hubDisplay.gamePaused.resumeGame.hitTestPoint(mouseX, mouseY, false)){
gamePaused = false;
musicChannel = musicMain.play(0, 99, musicVolume);
};
};
if (gameComplete == true){
if (hubDisplay.gameComplete.returnToMenu.hitTestPoint(mouseX, mouseY, false)){
returnToMenu();
};
if (endlessMode == false){
if (scoreSubmitted == false){
if (hubDisplay.gameComplete.submitScore.hitTestPoint(mouseX, mouseY, false)){
scoreSubmitted = true;
myName = hubDisplay.gameComplete.nameInput.text;
submitScore();
};
};
};
};
if (gameOver == true){
if (hubDisplay.gameOver.returnToMenu.hitTestPoint(mouseX, mouseY, false)){
returnToMenu();
};
if (endlessMode == false){
if (scoreSubmitted == false){
if (hubDisplay.gameOver.submitScore.hitTestPoint(mouseX, mouseY, false)){
scoreSubmitted = true;
myName = hubDisplay.gameOver.nameInput.text;
submitScore();
};
};
};
};
}
public function causeDamage(_arg1:int):void{
currentHealth = (currentHealth - _arg1);
hubDisplay.redFlash.play();
if (currentHealth < 0){
currentHealth = 0;
gameOver = true;
hubDisplay.gameOver.nameInput.text = (myName + "");
if (endlessMode == true){
checkHighScore();
} else {
checkHighEndless();
};
};
}
public function load_bar(_arg1:Event):void{
var _local2:String;
var _local3:Number;
var _local4:Number;
var _local5:String;
var _local6:Number;
var _local7:Number;
if (this.loaderInfo.bytesLoaded == this.loaderInfo.bytesTotal){
loaded = true;
loadItems.preloader.alpha = 0;
loadItems.titleLoading.gotoAndStop(2);
if (loadItems.hitTestPoint(mouseX, mouseY, true)){
loadItems.titleLoading.alpha = 1;
} else {
loadItems.titleLoading.alpha = 0.8;
};
} else {
loadItems.titleLoading.alpha = 0.8;
loadItems.titleLoading.gotoAndStop(1);
loadItems.preloader.lbar.scaleX = (this.loaderInfo.bytesLoaded / this.loaderInfo.bytesTotal);
};
_local2 = stage.loaderInfo.url;
_local3 = (_local2.indexOf("://") + 3);
_local4 = _local2.indexOf("/", _local3);
_local5 = _local2.substring(_local3, _local4);
_local6 = (_local5.lastIndexOf(".") - 1);
_local7 = (_local5.lastIndexOf(".", _local6) + 1);
_local5 = _local5.substring(_local7, _local5.length);
if (loadItems.currentFrame == loadItems.totalFrames){
gotoAndStop("loader");
stage.removeEventListener(MouseEvent.MOUSE_DOWN, mouseClickLoad);
this.removeEventListener("enterFrame", load_bar);
};
}
public function mouseClickLoad(_arg1:MouseEvent):void{
if (loaded == true){
if (loadItems.hitTestPoint(mouseX, mouseY, true)){
loadItems.play();
};
};
if (chromePlayLogo.hitTestPoint(mouseX, mouseY, true)){
getURL("http://www.chromeplay.com", "_blank");
};
if (fbcp.hitTestPoint(mouseX, mouseY, true)){
linkFacebook();
};
}
public function startGame(_arg1:Boolean):void{
gameStarted = true;
levelStarted = false;
scoreSubmitted = false;
currentTime = 0;
megaRock = false;
megaDestroyed = true;
consecutiveChain = 0;
rockTimer = 0;
bombTimer = 0;
totalScore = 0;
totalStats = 0;
endlessMode = _arg1;
if (endlessMode == true){
currentLevel = 10;
currentSecond = 0;
} else {
currentLevel = startLevel;
currentSecond = ((currentLevel - 1) * (levelLength + (currentLevel - 1)));
};
levelHealth = (levelJuice = (levelGas = currentLevel));
totalHealth = (currentHealth = (startHealth + (levelHealth * 10)));
totalJuice = (currentJuice = (startJuice + (levelJuice * 10)));
totalGas = (currentGas = (startGas + (levelGas * 10)));
}
public function submitScore():void{
var _local1:int;
var _local2:URLRequest;
var _local3:URLVariables;
var _local4:String;
var _local5:String;
var _local6:String;
if (challengeArray[5] == false){
hubDisplay.challengeComplete.gotoAndPlay("fade_in");
challengeArray[5] = true;
};
saveData();
_local1 = 63;
_local2 = new URLRequest("http://www.chromeplay.com/php_scores.php");
_local3 = new URLVariables();
_local4 = "chromeplay_hash_elephant";
_local5 = ((_local4 + totalScore) + myName);
_local6 = MD5.encrypt(_local5);
_local3.gameID = _local1;
_local3.currentScore = totalScore;
_local3.myName = myName;
_local3.hashData = _local6;
_local2.data = _local3;
_local2.method = URLRequestMethod.POST;
sendToURL(_local2);
getURL(("http://www.chromeplay.com/highscores.php?id=" + _local1), "_blank");
}
public function createStar(_arg1):void{
var _local2:Star;
_local2 = new Star(_arg1);
star_container.addChild(_local2);
}
public function optionsRolls():void{
if (hubDisplay.optionsMenu.backToMenu.hitTestPoint(mouseX, mouseY, false)){
hubDisplay.optionsMenu.backToMenu.alpha = 1;
} else {
hubDisplay.optionsMenu.backToMenu.alpha = 0.5;
};
if (stage.quality == "MEDIUM"){
hubDisplay.optionsMenu.quality_normal.alpha = 1;
hubDisplay.optionsMenu.quality_low.alpha = 0.5;
} else {
hubDisplay.optionsMenu.quality_normal.alpha = 0.5;
hubDisplay.optionsMenu.quality_low.alpha = 1;
};
if (musicToggle == true){
hubDisplay.optionsMenu.music_on.alpha = 1;
hubDisplay.optionsMenu.music_off.alpha = 0.5;
} else {
hubDisplay.optionsMenu.music_on.alpha = 0.5;
hubDisplay.optionsMenu.music_off.alpha = 1;
};
if (soundToggle == true){
hubDisplay.optionsMenu.sound_on.alpha = 1;
hubDisplay.optionsMenu.sound_off.alpha = 0.5;
} else {
hubDisplay.optionsMenu.sound_on.alpha = 0.5;
hubDisplay.optionsMenu.sound_off.alpha = 1;
};
if (keyRed == true){
hubDisplay.optionsMenu.box_red.alpha = 1;
} else {
hubDisplay.optionsMenu.box_red.alpha = 0.5;
};
if (keyGreen == true){
hubDisplay.optionsMenu.box_green.alpha = 1;
} else {
hubDisplay.optionsMenu.box_green.alpha = 0.5;
};
if (keyBlue == true){
hubDisplay.optionsMenu.box_blue.alpha = 1;
} else {
hubDisplay.optionsMenu.box_blue.alpha = 0.5;
};
hubDisplay.optionsMenu.text_red.text = ("Red Key: " + keyLetterArray[keyLetterRed]);
hubDisplay.optionsMenu.text_green.text = ("Green Key: " + keyLetterArray[keyLetterGreen]);
hubDisplay.optionsMenu.text_blue.text = ("Blue Key: " + keyLetterArray[keyLetterBlue]);
if (performancePower == 1){
hubDisplay.optionsMenu.fx_low.alpha = 1;
hubDisplay.optionsMenu.fx_high.alpha = 0.5;
} else {
hubDisplay.optionsMenu.fx_low.alpha = 0.5;
hubDisplay.optionsMenu.fx_high.alpha = 1;
};
if (ultraHard == 1.5){
hubDisplay.optionsMenu.ultraHard.ultra_on.alpha = 1;
hubDisplay.optionsMenu.ultraHard.ultra_off.alpha = 0.5;
} else {
hubDisplay.optionsMenu.ultraHard.ultra_on.alpha = 0.5;
hubDisplay.optionsMenu.ultraHard.ultra_off.alpha = 1;
};
checkRoll("music_off");
checkRoll("music_on");
checkRoll("sound_off");
checkRoll("sound_on");
checkRoll("fx_high");
checkRoll("fx_low");
checkRoll("quality_low");
checkRoll("quality_normal");
ultraRoll("ultra_on");
ultraRoll("ultra_off");
checkRoll("box_red");
checkRoll("box_green");
checkRoll("box_blue");
challengeCheck();
if (challengesComplete == 7){
hubDisplay.optionsMenu.ultraHard.alpha = 1;
} else {
hubDisplay.optionsMenu.ultraHard.alpha = 0;
};
}
public function checkRoll(_arg1:String):void{
if (hubDisplay.optionsMenu[_arg1].hitTestPoint(mouseX, mouseY, false)){
hubDisplay.optionsMenu[_arg1].gotoAndStop("border_on");
} else {
hubDisplay.optionsMenu[_arg1].gotoAndStop("border_off");
};
}
public function menuClickDown(_arg1:MouseEvent):void{
if ((((((gameStarted == false)) && ((showChallenges == false)))) && ((showOptions == false)))){
if (menuItems.menuButtons.menuPlay.hitTestPoint(mouseX, mouseY, false)){
startGame(false);
};
if (challengeArray[0] == true){
if (menuItems.menuButtons.menuEndless.hitTestPoint(mouseX, mouseY, false)){
startGame(true);
};
};
if (menuItems.menuButtons.menuChallenges.hitTestPoint(mouseX, mouseY, false)){
showChallenges = true;
};
if (menuItems.menuButtons.menuCredits.hitTestPoint(mouseX, mouseY, false)){
getURL("http://www.chromesharkmedia.com", "_blank");
};
if (menuItems.menuButtons.menuScores.hitTestPoint(mouseX, mouseY, false)){
getURL("http://www.chromeplay.com/highscores.php?id=63", "_blank");
};
if (hubDisplay.playMoreGames.hitTestPoint(mouseX, mouseY, false)){
};
};
}
public function keyUpFunction(_arg1:KeyboardEvent):void{
if (_arg1.keyCode == keyCodeArray[keyLetterRed]){
keyRed = false;
};
if (_arg1.keyCode == keyCodeArray[keyLetterGreen]){
keyGreen = false;
};
if (_arg1.keyCode == keyCodeArray[keyLetterBlue]){
keyBlue = false;
};
if (_arg1.keyCode == 80){
keyLetterP = false;
};
if (_arg1.keyCode == 32){
keySpace = false;
};
}
public function returnToMenu():void{
saveData();
musicChannel.stop();
musicChannel = titleMusic.play(0, 99, musicVolume);
addMenuItems();
removeAllObjects();
gamePaused = false;
gameStarted = false;
gameComplete = false;
gameOver = false;
levelChange = false;
hubDisplay.levelUp.alpha = 0;
}
public function colorWheel(_arg1:int):void{
var _local2:Boolean;
var _local3:Boolean;
var _local4:int;
_local2 = false;
_local3 = false;
_local4 = (((redLevel[currentLevel] + greenLevel[currentLevel]) + blueLevel[currentLevel]) + synergyLevel[currentLevel]);
if (_arg1 > _local4){
_local2 = true;
};
if ((((_arg1 == 1)) && ((colorPower[1] == 1)))){
_local3 = true;
} else {
if ((((_arg1 == 2)) && ((colorPower[2] == 1)))){
_local3 = true;
} else {
if ((((_arg1 == 3)) && ((colorPower[3] == 1)))){
_local3 = true;
} else {
if ((((((_arg1 == 4)) && ((colorPower[1] == 1)))) && ((colorPower[2] == 1)))){
_local3 = true;
} else {
if ((((((_arg1 == 5)) && ((colorPower[1] == 1)))) && ((colorPower[3] == 1)))){
_local3 = true;
} else {
if ((((((_arg1 == 6)) && ((colorPower[2] == 1)))) && ((colorPower[3] == 1)))){
_local3 = true;
} else {
if ((((((((_arg1 == 7)) && ((colorPower[1] == 1)))) && ((colorPower[2] == 1)))) && ((colorPower[3] == 1)))){
_local3 = true;
};
};
};
};
};
};
};
if (_local2 == true){
hubDisplay[("wheel_" + _arg1)].gotoAndStop("black");
} else {
if (_local3 == true){
hubDisplay[("wheel_" + _arg1)].gotoAndStop("light");
} else {
hubDisplay[("wheel_" + _arg1)].gotoAndStop("dark");
};
};
}
public function laserFire(_arg1:int, _arg2:int, _arg3:int):void{
var _local4:Number;
var _local5:Number;
var _local6:ColorTransform;
var _local7:laser5;
var _local8:laser4;
var _local9:laser3;
var _local10:laser2;
_local4 = (((10 * (1 + _arg1)) * (1 + _arg2)) * (1 + _arg3));
_local5 = ((_arg1 + _arg2) + _arg3);
if (currentJuice > _local4){
if (soundToggle == true){
if (_local5 == 0){
_local7 = new laser5();
_local7.play(0, 1, soundVolume);
} else {
if (_local5 == 1){
_local8 = new laser4();
_local8.play(0, 1, soundVolume);
} else {
if (_local5 == 2){
_local9 = new laser3();
_local9.play(0, 1, soundVolume);
} else {
if (_local5 == 3){
_local10 = new laser2();
_local10.play(0, 1, soundVolume);
};
};
};
};
};
_local6 = laserBeam.transform.colorTransform;
_local6.redOffset = ((100 * _arg1) - 50);
_local6.greenOffset = ((100 * _arg2) - 50);
_local6.blueOffset = ((100 * _arg3) - 50);
laserBeam.transform.colorTransform = _local6;
laserBeam.play();
currentJuice = (currentJuice - _local4);
};
}
public function mouseClickUp(_arg1:MouseEvent):void{
mouseClicked = false;
}
public function removeAllObjects():void{
while (rock_container.numChildren > 0) {
Object(rock_container.getChildAt(0)).removeSelf();
};
while (trail_container.numChildren > 0) {
Object(trail_container.getChildAt(0)).removeSelf();
};
while (particle_container.numChildren > 0) {
Object(particle_container.getChildAt(0)).removeSelf();
};
while (explosion_container.numChildren > 0) {
Object(explosion_container.getChildAt(0)).removeSelf();
};
while (score_container.numChildren > 0) {
Object(score_container.getChildAt(0)).removeSelf();
};
}
public function enterFrameIntro(_arg1:Event):void{
if (introLogo.currentFrame == introLogo.totalFrames){
gotoAndStop("game");
removeEventListener(Event.ENTER_FRAME, enterFrameIntro);
};
}
}
}//package synergy4_fla
Section 12
//megarock_flash_44 (synergy4_fla.megarock_flash_44)
package synergy4_fla {
import flash.display.*;
public dynamic class megarock_flash_44 extends MovieClip {
public function megarock_flash_44(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package synergy4_fla
Section 13
//menu_buttons_79 (synergy4_fla.menu_buttons_79)
package synergy4_fla {
import flash.display.*;
public dynamic class menu_buttons_79 extends MovieClip {
public var menuPlay:MovieClip;
public var menuChallenges:MovieClip;
public var menuCredits:MovieClip;
public var menuEndless:MovieClip;
public var menuScores:MovieClip;
}
}//package synergy4_fla
Section 14
//menu_description_78 (synergy4_fla.menu_description_78)
package synergy4_fla {
import flash.display.*;
import flash.text.*;
public dynamic class menu_description_78 extends MovieClip {
public var lightShine:MovieClip;
public var menuText:TextField;
}
}//package synergy4_fla
Section 15
//meter_damage_31 (synergy4_fla.meter_damage_31)
package synergy4_fla {
import flash.display.*;
public dynamic class meter_damage_31 extends MovieClip {
public function meter_damage_31(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package synergy4_fla
Section 16
//meter_laser_32 (synergy4_fla.meter_laser_32)
package synergy4_fla {
import flash.display.*;
public dynamic class meter_laser_32 extends MovieClip {
public function meter_laser_32(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package synergy4_fla
Section 17
//NG_AD_OBJECT_1 (synergy4_fla.NG_AD_OBJECT_1)
package synergy4_fla {
import flash.events.*;
import flash.media.*;
import flash.display.*;
import flash.text.*;
import flash.net.*;
import flash.ui.*;
import flash.geom.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class NG_AD_OBJECT_1 extends MovieClip {
public var ng_ad:MovieClip;
public var NG_Button:SimpleButton;
public function NG_AD_OBJECT_1(){
addFrameScript(0, frame1);
}
public function loadNGSite(_arg1:Event){
NewgroundsAPI.loadNewgrounds();
}
public function startAd(_arg1){
var _local2:URLLoader;
_local2 = new URLLoader(new URLRequest(_arg1));
_local2.addEventListener(Event.COMPLETE, ad_Loaded);
}
function frame1(){
Security.allowDomain("70.87.128.99");
Security.allowInsecureDomain("70.87.128.99");
Security.allowDomain("ads.shizmoo.com");
Security.allowInsecureDomain("ads.shizmoo.com");
Security.allowDomain("www.cpmstar.com");
Security.allowInsecureDomain("www.cpmstar.com");
Security.allowDomain("server.cpmstar.com");
Security.allowInsecureDomain("server.cpmstar.com");
if (NewgroundsAPI.getAdURL()){
startAd(NewgroundsAPI.getAdURL());
};
NewgroundsAPI.addEventListener(NewgroundsAPI.ADS_APPROVED, startAd);
NG_Button.addEventListener(MouseEvent.CLICK, loadNGSite);
stop();
}
public function ad_Loaded(_arg1:Event){
var _local2:*;
var _local3:Loader;
_local2 = String(_arg1.target.data);
_local3 = new Loader();
_local3.load(new URLRequest(_local2));
ng_ad.addChild(_local3);
}
}
}//package synergy4_fla
Section 18
//NG_TANK_3 (synergy4_fla.NG_TANK_3)
package synergy4_fla {
import flash.events.*;
import flash.display.*;
public dynamic class NG_TANK_3 extends MovieClip {
public var NG_Logo:SimpleButton;
public function NG_TANK_3(){
addFrameScript(0, frame1);
}
public function loadNGSite(_arg1:Event){
NewgroundsAPI.loadNewgrounds();
}
function frame1(){
NG_Logo.addEventListener(MouseEvent.CLICK, loadNGSite);
}
}
}//package synergy4_fla
Section 19
//options_menu_50 (synergy4_fla.options_menu_50)
package synergy4_fla {
import flash.display.*;
import flash.text.*;
public dynamic class options_menu_50 extends MovieClip {
public var quality_low:MovieClip;
public var box_red:MovieClip;
public var quality_normal:MovieClip;
public var sound_on:MovieClip;
public var text_blue:TextField;
public var sound_off:MovieClip;
public var backToMenu:MovieClip;
public var music_on:MovieClip;
public var box_blue:MovieClip;
public var music_off:MovieClip;
public var text_green:TextField;
public var fx_low:MovieClip;
public var text_red:TextField;
public var box_green:MovieClip;
public var ultraHard:MovieClip;
public var fx_high:MovieClip;
}
}//package synergy4_fla
Section 20
//play_more_games_52 (synergy4_fla.play_more_games_52)
package synergy4_fla {
import flash.display.*;
public dynamic class play_more_games_52 extends MovieClip {
public var fbcp:MovieClip;
public var moreGames:MovieClip;
}
}//package synergy4_fla
Section 21
//red_flash_21 (synergy4_fla.red_flash_21)
package synergy4_fla {
import flash.display.*;
public dynamic class red_flash_21 extends MovieClip {
public function red_flash_21(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package synergy4_fla
Section 22
//stage_complete_55 (synergy4_fla.stage_complete_55)
package synergy4_fla {
import flash.display.*;
public dynamic class stage_complete_55 extends MovieClip {
public function stage_complete_55(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package synergy4_fla
Section 23
//stat_block_43 (synergy4_fla.stat_block_43)
package synergy4_fla {
import flash.display.*;
public dynamic class stat_block_43 extends MovieClip {
public function stat_block_43(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package synergy4_fla
Section 24
//stat_upgrades_40 (synergy4_fla.stat_upgrades_40)
package synergy4_fla {
import flash.display.*;
import flash.text.*;
public dynamic class stat_upgrades_40 extends MovieClip {
public var nextButton:MovieClip;
public var statDescription:TextField;
public var statBar2:MovieClip;
public var stat1_10:MovieClip;
public var stat3_7:MovieClip;
public var stat3_4:MovieClip;
public var stat3_6:MovieClip;
public var stat3_8:MovieClip;
public var stat3_1:MovieClip;
public var stat3_2:MovieClip;
public var stat3_3:MovieClip;
public var stat3_9:MovieClip;
public var stat3_5:MovieClip;
public var statBar3:MovieClip;
public var stat2_1:MovieClip;
public var stat2_2:MovieClip;
public var stat2_6:MovieClip;
public var stat2_8:MovieClip;
public var stat2_9:MovieClip;
public var stat2_3:MovieClip;
public var stat2_4:MovieClip;
public var stat2_7:MovieClip;
public var stat2_10:MovieClip;
public var stat2_5:MovieClip;
public var stat1_1:MovieClip;
public var stat1_2:MovieClip;
public var stat1_3:MovieClip;
public var stat1_4:MovieClip;
public var stat1_5:MovieClip;
public var stat1_6:MovieClip;
public var stat1_7:MovieClip;
public var stat1_8:MovieClip;
public var stat1_9:MovieClip;
public var statsAvailable:TextField;
public var statBar1:MovieClip;
public var stat3_10:MovieClip;
}
}//package synergy4_fla
Section 25
//ultra_hard_51 (synergy4_fla.ultra_hard_51)
package synergy4_fla {
import flash.display.*;
public dynamic class ultra_hard_51 extends MovieClip {
public var ultra_off:MovieClip;
public var ultra_on:MovieClip;
}
}//package synergy4_fla
Section 26
//wheelBlue_23 (synergy4_fla.wheelBlue_23)
package synergy4_fla {
import flash.display.*;
public dynamic class wheelBlue_23 extends MovieClip {
public function wheelBlue_23(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package synergy4_fla
Section 27
//wheelCyan_26 (synergy4_fla.wheelCyan_26)
package synergy4_fla {
import flash.display.*;
public dynamic class wheelCyan_26 extends MovieClip {
public function wheelCyan_26(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package synergy4_fla
Section 28
//wheelGreen_25 (synergy4_fla.wheelGreen_25)
package synergy4_fla {
import flash.display.*;
public dynamic class wheelGreen_25 extends MovieClip {
public function wheelGreen_25(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package synergy4_fla
Section 29
//black_fade (black_fade)
package {
import flash.display.*;
public dynamic class black_fade extends MovieClip {
public function black_fade(){
addFrameScript(9, frame10);
}
function frame10(){
stop();
}
}
}//package
Section 30
//Explosion (Explosion)
package {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
public class Explosion extends Sprite {
public var currentY:Number;
public var startPosX:int;
public var startPosY:int;
public var gravity:Number;
public var startAngle:Number;
public var alive:Boolean;// = true
public var moveSpeed:Number;// = 5
public var currentX:Number;
public function Explosion(_arg1:Number, _arg2:Number, _arg3:int, _arg4:int, _arg5:int):void{
var _local6:ColorTransform;
alive = true;
moveSpeed = 5;
super();
startAngle = (Math.random() * 360);
gravity = (Math.random() * -10);
x = ((_arg1 + 10) - (Math.random() * 20));
y = ((_arg2 + 10) - (Math.random() * 20));
_local6 = transform.colorTransform;
_local6.redOffset = ((100 * _arg3) - 50);
_local6.greenOffset = ((100 * _arg4) - 50);
_local6.blueOffset = ((100 * _arg5) - 50);
transform.colorTransform = _local6;
addEventListener("enterFrame", clipMove);
}
public function clipMove(_arg1:Event):void{
alpha = (alpha - 0.01);
gravity = (gravity + 1);
if (alpha <= 0){
removeSelf();
};
x = (x + (Math.cos(startAngle) * moveSpeed));
y = (y + gravity);
}
public function removeSelf():void{
parent.removeChild(this);
this.removeEventListener("enterFrame", clipMove);
}
}
}//package
Section 31
//fxExploder (fxExploder)
package {
import flash.media.*;
public dynamic class fxExploder extends Sound {
}
}//package
Section 32
//hub_display (hub_display)
package {
import flash.display.*;
import flash.text.*;
public dynamic class hub_display extends MovieClip {
public var backLaser:MovieClip;
public var optionsMenu:MovieClip;
public var pauseSymbol:MovieClip;
public var backDamage:MovieClip;
public var legend_chromeplay:MovieClip;
public var levelUp:MovieClip;
public var legend_pause:MovieClip;
public var wheel_1:MovieClip;
public var wheel_4:MovieClip;
public var stageComplete:MovieClip;
public var wheel_2:MovieClip;
public var meterDamage:MovieClip;
public var statUpgrades:MovieClip;
public var nextLevel:MovieClip;
public var wheel_6:MovieClip;
public var wheel_7:MovieClip;
public var gameComplete:MovieClip;
public var megarockFlash:MovieClip;
public var wheel_3:MovieClip;
public var textScore:TextField;
public var wheel_5:MovieClip;
public var meterVortex:MovieClip;
public var textTime:TextField;
public var playMoreGames:MovieClip;
public var challengeList:MovieClip;
public var meterLaser:MovieClip;
public var challengeComplete:MovieClip;
public var gamePaused:MovieClip;
public var textStage:TextField;
public var letter_blue:TextField;
public var letter_green:TextField;
public var sponsorLogo:MovieClip;
public var redFlash:MovieClip;
public var gameOver:MovieClip;
public var letter_red:TextField;
}
}//package
Section 33
//laser_beam (laser_beam)
package {
import flash.display.*;
public dynamic class laser_beam extends MovieClip {
public var laser:MovieClip;
public function laser_beam(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 34
//laser2 (laser2)
package {
import flash.media.*;
public dynamic class laser2 extends Sound {
}
}//package
Section 35
//laser3 (laser3)
package {
import flash.media.*;
public dynamic class laser3 extends Sound {
}
}//package
Section 36
//laser4 (laser4)
package {
import flash.media.*;
public dynamic class laser4 extends Sound {
}
}//package
Section 37
//laser5 (laser5)
package {
import flash.media.*;
public dynamic class laser5 extends Sound {
}
}//package
Section 38
//Menu_items (Menu_items)
package {
import flash.display.*;
public class Menu_items extends MovieClip {
public var menuButtons:MovieClip;
public var menuDescription:MovieClip;
public var menuTitle:MovieClip;
public var ngAd:MovieClip;
public function Menu_items():void{
x = 100;
y = 175;
}
public function removeSelf():void{
parent.removeChild(this);
}
}
}//package
Section 39
//MeteorTitle (MeteorTitle)
package {
import flash.media.*;
public dynamic class MeteorTitle extends Sound {
}
}//package
Section 40
//mxMain (mxMain)
package {
import flash.media.*;
public dynamic class mxMain extends Sound {
}
}//package
Section 41
//NewgroundsAPI (NewgroundsAPI)
package {
import flash.events.*;
import flash.display.*;
import flash.text.*;
import flash.net.*;
public class NewgroundsAPI {
public static const ADS_APPROVED:Number = 3;
public static const bridge:Sprite = new Sprite();
private static const STAT_NEW_VERSION:Number = 4;
private static const STAT_AUTHOR_SITE:Number = 2;
private static const GATEWAY_URL:String = "http://www.ngads.com/gateway.php";
private static const NEWGROUNDS_URL:String = "http://www.newgrounds.com";
private static const STAT_CUSTOM_STATS:Number = 50;
private static const STAT_MOVIE_VIEWS:Number = 1;
private static const STAT_NEWGROUNDS:Number = 3;
public static const NEW_VERSION:Number = 2;
public static const DENY_HOST:Number = 1;
private static var tracker_id:Number;
private static var movie_options:Object = new Object();
private static var connected:Boolean;
private static var custom_events:Object = new Object();
private static var host:String;
private static var linked:Boolean;
private static var events:Object = new Object();
private static var debug:Boolean;
private static var version:String;
private static var custom_links:Object = new Object();
public static function getNewVersionURL(){
return (((((((GATEWAY_URL + "?&id=") + tracker_id) + "&host=") + escape(host)) + "&stat=") + STAT_NEW_VERSION));
}
private static function ReadGatewayData(_arg1:Object){
var _local2:*;
var _local3:String;
var _local4:*;
var _local5:URLLoader;
for (_local2 in _arg1) {
_arg1[_local2] = unescape(_arg1[_local2]);
movie_options[_local2] = _arg1[_local2];
};
if (_arg1["settings_loaded"]){
SendMessage("You have successfully connected to the Newgrounds API gateway!");
SendMessage((("Movie Identified as '" + movie_options["movie_name"]) + "'"));
if (movie_options["message"]){
SendMessage(movie_options["message"]);
};
if (movie_options["ad_url"]){
SendMessage("Your movie has been approved to run Flash Ads");
if (events[ADS_APPROVED]){
var _local6 = events;
_local6[ADS_APPROVED](movie_options["ad_url"]);
} else {
onAdsApproved(movie_options["ad_url"]);
};
};
if (((movie_options["movie_version"]) && (!((String(movie_options["movie_version"]) == String(version)))))){
SendMessage("WARNING: The movie version configured in your API settings does not match this movie's version!");
if (events[NEW_VERSION]){
_local6 = events;
_local6[NEW_VERSION]({version:movie_options["movie_version"], real_url:getMovieURL(), redirect_url:getNewVersionURL()});
} else {
onNewVersionAvailable(movie_options["movie_version"], getMovieURL(), getNewVersionURL());
};
};
if (movie_options["deny_host"]){
SendMessage("You have blocked 'localHost' in your API settings.");
SendMessage("If you wish to test your movie you will need to remove this block.");
if (events[DENY_HOST]){
_local6 = events;
_local6[DENY_HOST]({host:host, real_url:getMovieURL(), redirect_url:getNewVersionURL()});
} else {
onDenyHost(host, getMovieURL(), getNewVersionURL());
};
};
if (movie_options["request_portal_url"]){
_local3 = bridge.root.loaderInfo.url;
_local4 = ((((GATEWAY_URL + "?&id=") + tracker_id) + "&portal_url=") + escape(_local3));
_local5 = new URLLoader(new URLRequest(_local4));
};
if (events[69]){
_local6 = events;
_local6[69]();
};
} else {
if (!movie_options["settings_loaded"]){
SendError("Could not establish connection to the API gateway.");
};
};
}
public static function setMovieVersion(_arg1){
if (!_arg1){
SendError("Missing required 'version' in NewgroundsAPI.setMovieVersion(version:String)");
} else {
version = String(_arg1);
};
}
public static function loadCustomLink(_arg1:String){
if (!_arg1){
SendError("Missing required 'link_name' parameter in NewgroundsAPI.loadCustomLink(link_name:String)");
} else {
if (!custom_links[_arg1]){
SendError(("Attempted to open undefined custom link: " + _arg1));
} else {
SendLink(custom_links[_arg1]);
};
};
}
public static function addCustomLink(_arg1:Number, _arg2:String){
if (!_arg1){
SendError("Missing required 'id' parameter in NewgroundsAPI.AddCustomLink(id:Number, link_name:String)");
} else {
if (!_arg2){
SendError("Missing required 'link_name' parameter in NewgroundsAPI.AddCustomLink(id:Number, link_name:String)");
} else {
custom_links[_arg2] = (STAT_CUSTOM_STATS + _arg1);
SendMessage(((("Created custom link " + _arg1) + ": ") + _arg2));
};
};
}
public static function getMovieURL(){
if (movie_options["movie_url"]){
return (movie_options["movie_url"]);
};
return ("Newgrounds.com");
}
public static function debugMode(){
debug = true;
}
public static function getAdURL(){
return (movie_options["ad_url"]);
}
private static function SendStat(_arg1:Number, _arg2:Boolean, _arg3=null){
var target_url:*;
var XML_Loaded:Function;
var x:*;
var request:URLRequest;
var gateway_loader:URLLoader;
var stat_id = _arg1;
var open_in_browser = _arg2;
var extra = _arg3;
if (!tracker_id){
SendError("You must call NewgroundsAPI.connectMovie() with a valid movie id before using API features!");
} else {
XML_Loaded = function (_arg1:Event){
var _local2:XML;
var _local3:Object;
var _local4:XMLList;
var _local5:XML;
var _local6:*;
var _local7:*;
XML.ignoreWhitespace = true;
_local2 = XML(_arg1.target.data);
_local3 = new Object();
_local4 = _local2.children();
for each (_local5 in _local4) {
_local6 = _local5.localName();
_local7 = _local5.attribute("value");
if (_local7 == Number(_local7)){
_local7 = Number(_local7);
};
_local3[_local6] = _local7;
};
ReadGatewayData(_local3);
};
target_url = (((((((GATEWAY_URL + "?&id=") + tracker_id) + "&host=") + escape(host)) + "&stat=") + stat_id) + addSeed());
if (extra){
for (x in extra) {
target_url = (target_url + ((("&" + escape(x)) + "=") + escape(extra[x])));
};
};
if (debug){
target_url = (target_url + "&debug=1");
};
if (open_in_browser){
request = new URLRequest((target_url + addSeed()));
navigateToURL(request, "_blank");
} else {
gateway_loader = new URLLoader(new URLRequest((target_url + addSeed())));
gateway_loader.addEventListener(Event.COMPLETE, XML_Loaded);
};
};
}
public static function onAdsApproved(_arg1:String){
}
public static function loadMySite(_arg1:Event=null){
SendLink(STAT_AUTHOR_SITE);
}
private static function SendMessage(_arg1:String){
trace(("[NEWGROUNDS API] :: " + _arg1));
}
public static function linkAPI(_arg1){
_arg1.addChild(bridge);
linked = true;
}
public static function loadNewgrounds(_arg1:Event=null, _arg2:String=null){
var _local3:URLRequest;
var _local4:*;
if (!tracker_id){
_local3 = new URLRequest(((NEWGROUNDS_URL + "/") + _arg2));
navigateToURL(_local3, "_blank");
} else {
_local4 = null;
if (_arg2){
_local4 = new Object();
_local4.page = _arg2;
};
SendLink(STAT_NEWGROUNDS, _local4);
};
}
private static function SendLink(_arg1, _arg2=null){
SendStat(_arg1, true, _arg2);
}
public static function logCustomEvent(_arg1:String){
if (!_arg1){
SendError("Missing required 'event_name' parameter in NewgroundsAPI.logCustomEvent(event_name:String)");
} else {
if (!custom_events[_arg1]){
SendError(("Attempted to log undefined custom event: " + _arg1));
} else {
SendEvent(custom_events[_arg1]);
};
};
}
private static function SendError(_arg1:String){
trace(("[NEWGROUNDS API ERROR] :: " + _arg1));
}
public static function addCustomEvent(_arg1:Number, _arg2:String){
if (!_arg1){
SendError("Missing required 'id' parameter in NewgroundsAPI.AddCustomEvent(id:Number, event_name:String)");
} else {
if (!_arg2){
SendError("Missing required 'event_name' parameter in NewgroundsAPI.AddCustomEvent(id:Number, event_name:String)");
} else {
custom_events[_arg2] = (STAT_CUSTOM_STATS + _arg1);
SendMessage(("Created custom event: " + _arg2));
};
};
}
private static function addSeed(){
return (("&seed=" + Math.random()));
}
public static function addEventListener(_arg1:Number, _arg2:Function){
events[_arg1] = _arg2;
}
private static function SendEvent(_arg1){
SendStat(_arg1, false);
}
public static function onNewVersionAvailable(_arg1:String, _arg2:String, _arg3:String){
var sw:*;
var sh:*;
var tw:*;
var th:*;
var mg:*;
var _root:*;
var overlay:MovieClip;
var overlay_x:*;
var overlay_y:*;
var close_x:*;
var blankarea:TextField;
var header:TextField;
var header_format:TextFormat;
var msgtext:TextField;
var msgtext_format:TextFormat;
var msgtext_link:TextFormat;
var version = _arg1;
var movie_url = _arg2;
var redirect_url = _arg3;
sw = bridge.stage.stageWidth;
sh = bridge.stage.stageHeight;
tw = 350;
th = 160;
mg = 20;
_root = bridge.root;
overlay = new MovieClip();
overlay.graphics.beginFill(0, 0.6);
overlay.graphics.lineStyle(0, 0);
overlay.graphics.drawRect(0, 0, sw, sh);
overlay.graphics.endFill();
overlay_x = Math.round(((sw - tw) / 2));
overlay_y = Math.round(((sh - th) / 2));
overlay.graphics.beginFill(102);
overlay.graphics.lineStyle(10, 0);
overlay.graphics.drawRect((overlay_x - mg), (overlay_y - mg), (tw + mg), (th + mg));
overlay.graphics.endFill();
overlay.close = function (_arg1:Event){
_root.removeChild(overlay);
};
close_x = new MovieClip();
close_x.graphics.beginFill(0, 0.1);
close_x.graphics.lineStyle(3, 22015);
close_x.graphics.drawRect(0, 0, 16, 16);
close_x.graphics.endFill();
close_x.graphics.moveTo(4, 4);
close_x.graphics.lineTo(13, 13);
close_x.graphics.moveTo(13, 4);
close_x.graphics.lineTo(4, 13);
close_x.x = ((overlay_x + tw) - 26);
close_x.y = (overlay_y - 10);
close_x.addEventListener(MouseEvent.CLICK, overlay.close);
blankarea = new TextField();
blankarea.x = (overlay_x - mg);
blankarea.y = (overlay_y - mg);
blankarea.width = (tw + mg);
blankarea.height = (th + mg);
blankarea.selectable = false;
header = new TextField();
header.width = tw;
header.x = overlay_x;
header.y = overlay_y;
header.height = 100;
header.selectable = false;
header_format = new TextFormat();
header_format.font = "Arial Black";
header_format.color = 0xFFFFFF;
header_format.size = 20;
header.defaultTextFormat = header_format;
header.text = "New Version Available!";
msgtext = new TextField();
msgtext.x = overlay_x;
msgtext.y = (overlay_y + 70);
msgtext.width = tw;
msgtext.height = 60;
msgtext.selectable = false;
msgtext_format = new TextFormat();
msgtext_format.font = "Arial";
msgtext_format.color = 0xFFFFFF;
msgtext_format.size = 12;
msgtext_format.bold = true;
msgtext_link = new TextFormat();
msgtext_link.font = "Arial";
msgtext_link.color = 0xFFFF00;
msgtext_link.size = 12;
msgtext_link.bold = true;
msgtext_link.url = redirect_url;
msgtext_link.target = "_blank";
if (version){
version = ("Version " + version);
} else {
version = "A new version";
};
msgtext.defaultTextFormat = msgtext_format;
msgtext.appendText((version + " is now available"));
if (movie_url){
msgtext.appendText(" at:\n");
msgtext.defaultTextFormat = msgtext_link;
msgtext.appendText(movie_url);
} else {
msgtext.appendText("!");
};
_root.addChild(overlay);
overlay.addChild(blankarea);
overlay.addChild(header);
overlay.addChild(msgtext);
overlay.addChild(close_x);
}
public static function onDenyHost(_arg1:String, _arg2:String, _arg3:String){
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
var _local8:*;
var _local9:MovieClip;
var _local10:TextField;
var _local11:TextField;
var _local12:TextFormat;
var _local13:TextField;
var _local14:TextFormat;
var _local15:TextFormat;
_local4 = bridge.stage.stageWidth;
_local5 = bridge.stage.stageHeight;
_local6 = 350;
_local7 = 160;
_local8 = bridge.root;
_local9 = new MovieClip();
_local9.graphics.beginFill(0x660000);
_local9.graphics.lineStyle(20, 0);
_local9.graphics.drawRect(0, 0, _local4, _local5);
_local9.graphics.endFill();
_local10 = new TextField();
_local10.x = 0;
_local10.y = 0;
_local10.width = _local4;
_local10.height = _local5;
_local10.selectable = false;
_local11 = new TextField();
_local11.x = Math.round(((_local4 - _local6) / 2));
_local11.y = Math.round(((_local5 - _local7) / 2.5));
_local11.width = _local6;
_local11.height = 100;
_local11.selectable = false;
_local12 = new TextFormat();
_local12.font = "Arial Black";
_local12.color = 0xFF0000;
_local12.size = 38;
_local11.defaultTextFormat = _local12;
_local11.text = "ERROR!";
_local13 = new TextField();
_local13.x = Math.round(((_local4 - _local6) / 2));
_local13.y = (Math.round(((_local5 - _local7) / 2.5)) + 80);
_local13.width = _local6;
_local13.height = 80;
_local13.selectable = false;
_local14 = new TextFormat();
_local14.font = "Arial";
_local14.color = 0xFFFFFF;
_local14.size = 12;
_local14.bold = true;
_local15 = new TextFormat();
_local15.font = "Arial";
_local15.color = 0xFFFF00;
_local15.size = 12;
_local15.bold = true;
_local15.url = _arg3;
_local15.target = "_blank";
_local13.defaultTextFormat = _local14;
_local13.appendText((("This movie has not been approved for use on " + _arg1) + "\n"));
_local13.appendText("For an approved copy, please visit:\n");
_local13.defaultTextFormat = _local15;
_local13.appendText(_arg2);
_local8.addChild(_local9);
_local9.addChild(_local10);
_local9.addChild(_local11);
_local9.addChild(_local13);
}
public static function connectMovie(_arg1:Number){
var _local2:String;
var _local3:*;
if (!_arg1){
SendError("Missing required 'id' parameter in NewgroundsAPI.connectMovie(id:Number)");
} else {
if (!linked){
SendError("Attempted to call MewgroundsAPI.connectMovie() without first calling NewgroundsAPI.linkAPI(this)");
} else {
if (!tracker_id){
SendMessage("Connecting to API gateway...");
tracker_id = _arg1;
_local2 = bridge.root.loaderInfo.url;
host = _local2.split("/")[2].toLowerCase();
if (host.length < 1){
host = "localhost";
};
_local3 = new Object();
SendEvent(STAT_MOVIE_VIEWS);
};
};
};
}
public static function isInstalled(){
return (true);
}
}
}//package
Section 42
//Particle (Particle)
package {
import flash.events.*;
import flash.display.*;
public class Particle extends Sprite {
public var currentY:Number;
public var startPosX:int;
public var startPosY:int;
public var currentHyp:Number;
public var startAngle:Number;
public var alive:Boolean;// = true
public var storeHyp:Number;// = 100
public var moveSpeed:Number;// = 5
public var currentX:Number;
public function Particle():void{
alive = true;
storeHyp = 100;
moveSpeed = 5;
super();
startAngle = (1 - (Math.random() * 2));
x = (Math.random() * 550);
addEventListener("enterFrame", clipMove);
}
public function clipMove(_arg1:Event):void{
alpha = (alpha - 0.1);
y = (y - (startAngle * moveSpeed));
if (alpha <= 0){
removeSelf();
};
}
public function removeSelf():void{
parent.removeChild(this);
this.removeEventListener("enterFrame", clipMove);
}
}
}//package
Section 43
//redPic (redPic)
package {
import flash.display.*;
public dynamic class redPic extends MovieClip {
}
}//package
Section 44
//Rock (Rock)
package {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
public class Rock extends MovieClip {
public var colorTint:Array;
public var rockFrame:Number;// = 1
public var rockHealth:Number;
public var rockType:String;
public var slowVar:Number;// = 1
public var startHealth:Number;
public var rock:MovieClip;
public var slowCheck:Number;// = 1
public var rockDistance:Number;// = 1
public var alive:Boolean;// = true
public var gamePaused:Boolean;// = true
public var rockMove:Boolean;// = true
public var rockSpeed:Number;
public function Rock(_arg1:Number, _arg2:Number, _arg3:int, _arg4:int, _arg5:int, _arg6:Number, _arg7:Number, _arg8:Number, _arg9:String):void{
var _local10:ColorTransform;
gamePaused = true;
alive = true;
rockMove = true;
slowCheck = 1;
slowVar = 1;
colorTint = new Array(0, 0, 0, 0);
rockDistance = 1;
rockFrame = 1;
super();
x = _arg1;
y = _arg2;
rockType = _arg9;
gotoAndStop(rockType);
startHealth = ((_arg8 + 5) + _arg6);
rockHealth = startHealth;
colorTint[1] = _arg3;
colorTint[2] = _arg4;
colorTint[3] = _arg5;
_local10 = transform.colorTransform;
_local10.redOffset = ((100 * colorTint[1]) - 50);
_local10.greenOffset = ((100 * colorTint[2]) - 50);
_local10.blueOffset = ((100 * colorTint[3]) - 50);
transform.colorTransform = _local10;
rockSpeed = _arg7;
addEventListener("enterFrame", clipMove);
}
public function clipMove(_arg1:Event):void{
if (gamePaused == false){
scaleX = (scaleY = (0.6 + (rockHealth / 50)));
slowVar = ((rockDistance / 70) - 0.2);
if (slowVar > 1){
slowVar = 1;
};
if (slowVar < 0){
slowVar = 0;
};
if (slowCheck < 1){
slowCheck = (slowCheck + 0.1);
};
if (rockMove == true){
y = (y + (rockSpeed * slowCheck));
};
rockFrame = (rockFrame + slowCheck);
if (rockFrame > (rock.totalFrames - 1)){
rockFrame = 1;
};
rock.gotoAndStop(Math.ceil(rockFrame));
if (alive == false){
alpha = (alpha - 0.2);
if (alpha <= 0){
removeSelf();
};
};
};
}
public function removeSelf():void{
parent.removeChild(this);
this.removeEventListener("enterFrame", clipMove);
}
}
}//package
Section 45
//Score (Score)
package {
import flash.events.*;
import flash.display.*;
import flash.text.*;
import flash.geom.*;
public class Score extends MovieClip {
public var scorePlus:TextField;
public var scoreChain:TextField;
public function Score(_arg1:Number, _arg2:Number):void{
var _local3:ColorTransform;
super();
x = _arg1;
y = _arg2;
_local3 = transform.colorTransform;
_local3.redOffset = 100;
_local3.greenOffset = 100;
_local3.blueOffset = 100;
transform.colorTransform = _local3;
addEventListener("enterFrame", clipMove);
}
public function clipMove(_arg1:Event):void{
alpha = (alpha - 0.05);
if (alpha <= 0){
removeSelf();
};
y = (y - 2);
}
public function removeSelf():void{
parent.removeChild(this);
this.removeEventListener("enterFrame", clipMove);
}
}
}//package
Section 46
//slow_field (slow_field)
package {
import flash.display.*;
public dynamic class slow_field extends MovieClip {
}
}//package
Section 47
//Star (Star)
package {
import flash.events.*;
import flash.display.*;
public class Star extends Sprite {
public var alive:Boolean;// = true
public var moveSpeed:Number;
public function Star(_arg1:Number):void{
alive = true;
super();
x = (Math.random() * 550);
y = _arg1;
moveSpeed = (5 + (Math.random() * 5));
alpha = (0.5 + (Math.random() * 0.5));
addEventListener("enterFrame", clipMove);
}
public function clipMove(_arg1:Event):void{
y = (y - moveSpeed);
if (y < -50){
removeSelf();
};
}
public function removeSelf():void{
parent.removeChild(this);
this.removeEventListener("enterFrame", clipMove);
}
}
}//package
Section 48
//Trail (Trail)
package {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
public class Trail extends MovieClip {
public var alive:Boolean;// = true
public var moveSpeed:Number;
public function Trail(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:int, _arg5:int, _arg6:int):void{
var _local7:ColorTransform;
alive = true;
super();
x = ((_arg1 + (Math.random() * _arg3)) - (_arg3 / 2));
y = (_arg2 - (Math.random() * (_arg3 / 2)));
moveSpeed = (5 + (Math.random() * 5));
_local7 = transform.colorTransform;
_local7.redOffset = ((50 * _arg4) + (Math.random() * 150));
_local7.greenOffset = ((100 * _arg5) - 50);
_local7.blueOffset = ((100 * _arg6) - 50);
transform.colorTransform = _local7;
alpha = 1;
addEventListener("enterFrame", clipMove);
}
public function clipMove(_arg1:Event):void{
y = (y - moveSpeed);
alpha = (alpha - 0.1);
if (alpha <= 0){
removeSelf();
};
}
public function removeSelf():void{
parent.removeChild(this);
this.removeEventListener("enterFrame", clipMove);
}
}
}//package