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
//body_guide_39 (love_fla.body_guide_39)
package love_fla {
import flash.display.*;
public dynamic class body_guide_39 extends MovieClip {
public var player1:MovieClip;
public var player2:MovieClip;
public var hitPlay:MovieClip;
}
}//package love_fla
Section 3
//countdown_41 (love_fla.countdown_41)
package love_fla {
import flash.display.*;
public dynamic class countdown_41 extends MovieClip {
public function countdown_41(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package love_fla
Section 4
//credits_box_22 (love_fla.credits_box_22)
package love_fla {
import flash.display.*;
public dynamic class credits_box_22 extends MovieClip {
public var hideButton:MovieClip;
}
}//package love_fla
Section 5
//game_over_31 (love_fla.game_over_31)
package love_fla {
import flash.display.*;
import flash.text.*;
public dynamic class game_over_31 extends MovieClip {
public var backToMenu:MovieClip;
public var nameText:TextField;
public var submitScore:MovieClip;
public var moreGames:MovieClip;
public var scoreText:TextField;
}
}//package love_fla
Section 6
//hub_legend_36 (love_fla.hub_legend_36)
package love_fla {
import flash.display.*;
public dynamic class hub_legend_36 extends MovieClip {
public function hub_legend_36(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package love_fla
Section 7
//load_item_16 (love_fla.load_item_16)
package love_fla {
import flash.display.*;
public dynamic class load_item_16 extends MovieClip {
public function load_item_16(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package love_fla
Section 8
//load_items_1 (love_fla.load_items_1)
package love_fla {
import flash.display.*;
public dynamic class load_items_1 extends MovieClip {
public var preloader:MovieClip;
public var titleLoading:MovieClip;
public function load_items_1(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package love_fla
Section 9
//loading_bar_3 (love_fla.loading_bar_3)
package love_fla {
import flash.display.*;
public dynamic class loading_bar_3 extends MovieClip {
public var lbar:MovieClip;
}
}//package love_fla
Section 10
//MainTimeline (love_fla.MainTimeline)
package love_fla {
import flash.events.*;
import com.gsolo.encryption.*;
import flash.media.*;
import flash.display.*;
import flash.text.*;
import flash.ui.*;
import flash.net.*;
import flash.geom.*;
import flash.utils.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.xml.*;
public dynamic class MainTimeline extends MovieClip {
public var loaded:Boolean;
public var hubDisplay:MovieClip;
public var countdown:Boolean;
public var gameStarted:Boolean;
public var introLogo:MovieClip;
public var ngLoad:MovieClip;
public var myName:String;
public var myContextMenu:ContextMenu;
public var i:int;
public var j:int;
public var k:int;
public var twoPlayer:Boolean;
public var l:int;
public var scoreSubmitted:Boolean;
public var gameID:int;
public var currentScore:int;
public var loadItems:MovieClip;
public var chromeplay:MovieClip;
public var creditsShow:Boolean;
public var snow_container:MovieClip;
public var currentSeconds:int;
public var totalHealth:Number;
public var currentStage:int;
public var blackFade:MovieClip;
public var musicChannel:SoundChannel;
public var currentHealth:Number;
public var MD5encryptor:MD5;
public var item2:ContextMenuItem;
public var item4:ContextMenuItem;
public var snowTimer:int;
public var item3:ContextMenuItem;
public var musicVolume:SoundTransform;
public var musicMain:mxMain;
public var bodyShow:Boolean;
public var cam:MotionCam;
public var waveTimer:int;
public var explosion_container:MovieClip;
public var musicToggle:Boolean;
public var gameOver:Boolean;
public var currentTime:int;
public function MainTimeline(){
addFrameScript(0, frame1, 9, frame10, 19, frame20);
}
public function createWave(_arg1:int):void{
createSnow(false, _arg1);
createSnow(false, (_arg1 + 40));
createSnow(false, (_arg1 + 80));
createSnow(false, (_arg1 + 120));
createSnow(false, (_arg1 + 160));
createSnow(false, (_arg1 + 200));
createSnow(false, (_arg1 + 240));
}
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 createExplode(_arg1:Boolean):void{
var _local2:fxZing;
var _local3:fxSharp;
var _local4:Explosion;
if (_arg1 == true){
_local2 = new fxZing();
_local2.play(0, 1, musicVolume);
} else {
_local3 = new fxSharp();
_local3.play(0, 1, musicVolume);
};
j = 0;
while (j < 5) {
_local4 = new Explosion(snow_container.getChildAt(i).x, snow_container.getChildAt(i).y, Math.ceil((Math.random() * 6)));
explosion_container.addChild(_local4);
j++;
};
}
function frame10(){
stop();
this.addEventListener(Event.ENTER_FRAME, enterFrameIntro);
}
public function linkChromePlay(_arg1:MouseEvent):void{
getURL("http://www.chromeplay.com", "_blank");
}
function frame1(){
stop();
stage.quality = "MEDIUM";
NewgroundsAPI.linkAPI(this);
NewgroundsAPI.connectMovie(5267);
gameID = 64;
loaded = false;
stage.addEventListener(MouseEvent.MOUSE_DOWN, mouseClickLoad);
this.addEventListener("enterFrame", load_bar);
chromeplay.addEventListener("click", linkChromePlay);
ngLoad.addEventListener("click", linkChromePlay);
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 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;
myName = "ENTER NAME";
scoreSubmitted = false;
gameStarted = false;
bodyShow = false;
countdown = false;
gameOver = false;
snowTimer = 0;
waveTimer = 0;
creditsShow = false;
twoPlayer = false;
currentTime = 0;
currentSeconds = 0;
currentStage = 1;
currentScore = 0;
totalHealth = 100;
currentHealth = totalHealth;
musicToggle = true;
blackFade = new black_fade();
addChild(blackFade);
blackFade.x = 0;
blackFade.y = 0;
snow_container = new MovieClip();
addChild(snow_container);
explosion_container = new MovieClip();
addChild(explosion_container);
hubDisplay = new hub_display();
addChild(hubDisplay);
stage.addEventListener(Event.ENTER_FRAME, gameEnterFrame);
stage.addEventListener(MouseEvent.MOUSE_DOWN, mouseClickDown);
MD5encryptor = new MD5();
musicVolume = new SoundTransform(1, 0);
musicMain = new mxMain();
musicChannel = musicMain.play(0, 99, musicVolume);
}
public function createSnow(_arg1:Boolean, _arg2:int):void{
var _local3:Snow;
_local3 = new Snow(_arg1, _arg2);
snow_container.addChild(_local3);
}
public function linkFacebook():void{
getURL("http://apps.new.facebook.com/chromeplay/process_profile.php?id=68", "_blank");
}
public function gameEnterFrame(_arg1:Event):void{
if (gameOver == true){
hubDisplay.fbcp.alpha = 1;
hubDisplay.fbcp.x = 600;
hubDisplay.gameOver.x = 0;
if (hubDisplay.gameOver.alpha < 1){
hubDisplay.gameOver.alpha = (hubDisplay.gameOver.alpha + 0.1);
};
if (hubDisplay.gameOver.backToMenu.hitTestPoint(mouseX, mouseY, true)){
hubDisplay.gameOver.backToMenu.alpha = 1;
} else {
hubDisplay.gameOver.backToMenu.alpha = 0.7;
};
if (hubDisplay.gameOver.moreGames.hitTestPoint(mouseX, mouseY, true)){
hubDisplay.gameOver.moreGames.alpha = 1;
} else {
hubDisplay.gameOver.moreGames.alpha = 0.7;
};
if (scoreSubmitted == true){
hubDisplay.gameOver.submitScore.alpha = 0.3;
} else {
if (hubDisplay.gameOver.submitScore.hitTestPoint(mouseX, mouseY, true)){
hubDisplay.gameOver.submitScore.alpha = 1;
} else {
hubDisplay.gameOver.submitScore.alpha = 0.7;
};
};
} else {
if (hubDisplay.gameOver.alpha > 0){
hubDisplay.gameOver.alpha = (hubDisplay.gameOver.alpha - 0.1);
} else {
hubDisplay.gameOver.x = 600;
};
};
hubDisplay.legend_sound.alpha = 0;
if (musicToggle == true){
hubDisplay.musicSymbol.gotoAndStop(1);
} else {
hubDisplay.musicSymbol.gotoAndStop(2);
};
if (hubDisplay.musicSymbol.hitTestPoint(mouseX, mouseY, false)){
hubDisplay.musicSymbol.alpha = 1;
hubDisplay.legend_sound.alpha = 1;
hubDisplay.legend_sound.gotoAndStop("music");
} else {
hubDisplay.musicSymbol.alpha = 0.5;
};
if (hubDisplay.qualitySymbol.hitTestPoint(mouseX, mouseY, false)){
hubDisplay.qualitySymbol.alpha = 1;
hubDisplay.legend_sound.alpha = 1;
hubDisplay.legend_sound.gotoAndStop("pause");
} else {
hubDisplay.qualitySymbol.alpha = 0.5;
};
if (hubDisplay.chromeplayLogo.hitTestPoint(mouseX, mouseY, false)){
hubDisplay.legend_chromeplay.alpha = 1;
hubDisplay.legend_chromeplay.gotoAndStop("chromeplay");
} else {
hubDisplay.legend_chromeplay.alpha = 0;
};
if ((((((gameStarted == true)) || ((bodyShow == true)))) || ((countdown == true)))){
hubDisplay.menuItems.x = -200;
hubDisplay.menuItems.buttonPlay.alpha = 0;
hubDisplay.menuItems.buttonScores.alpha = 0;
hubDisplay.menuItems.buttonMore.alpha = 0;
hubDisplay.menuItems.buttonCredits.alpha = 0;
hubDisplay.howToPlay.alpha = 0;
if (gameOver == false){
hubDisplay.fbcp.alpha = 0;
hubDisplay.fbcp.x = 600;
};
} else {
hubDisplay.menuItems.x = -7;
hubDisplay.howToPlay.alpha = 1;
hubDisplay.fbcp.alpha = 1;
hubDisplay.fbcp.x = 393;
if (hubDisplay.menuItems.buttonPlay.hitTestPoint(mouseX, mouseY, true)){
hubDisplay.menuItems.buttonPlay.alpha = 1;
} else {
hubDisplay.menuItems.buttonPlay.alpha = 0.7;
};
if (hubDisplay.menuItems.buttonScores.hitTestPoint(mouseX, mouseY, true)){
hubDisplay.menuItems.buttonScores.alpha = 1;
} else {
hubDisplay.menuItems.buttonScores.alpha = 0.7;
};
if (hubDisplay.menuItems.buttonMore.hitTestPoint(mouseX, mouseY, true)){
hubDisplay.menuItems.buttonMore.alpha = 1;
} else {
hubDisplay.menuItems.buttonMore.alpha = 0.7;
};
if (hubDisplay.menuItems.buttonCredits.hitTestPoint(mouseX, mouseY, true)){
hubDisplay.menuItems.buttonCredits.alpha = 1;
} else {
hubDisplay.menuItems.buttonCredits.alpha = 0.7;
};
if (creditsShow == true){
if (hubDisplay.creditsBox.hideButton.hitTestPoint(mouseX, mouseY, true)){
hubDisplay.creditsBox.hideButton.alpha = 1;
} else {
hubDisplay.creditsBox.hideButton.alpha = 0.7;
};
if (hubDisplay.creditsBox.x > 600){
hubDisplay.creditsBox.x = (hubDisplay.creditsBox.x - 10);
};
} else {
if (hubDisplay.creditsBox.x < 900){
hubDisplay.creditsBox.x = (hubDisplay.creditsBox.x + 10);
};
};
};
if (bodyShow == true){
hubDisplay.bodyGuide.alpha = 1;
hubDisplay.bodyGuide.x = 137;
if (twoPlayer == true){
hubDisplay.bodyGuide.gotoAndStop("double");
hubDisplay.personLine.gotoAndStop("double");
} else {
hubDisplay.bodyGuide.gotoAndStop("single");
hubDisplay.personLine.gotoAndStop("single");
};
} else {
hubDisplay.bodyGuide.alpha = 0;
hubDisplay.bodyGuide.x = -500;
};
if (hubDisplay.countdown.currentFrame == hubDisplay.countdown.totalFrames){
gameStarted = true;
countdown = false;
};
if ((((bodyShow == true)) || ((countdown == true)))){
hubDisplay.personLine.alpha = 1;
} else {
hubDisplay.personLine.alpha = 0;
};
if ((((gameStarted == true)) && ((gameOver == false)))){
currentHealth = (currentHealth - (0.02 + (0.02 * currentStage)));
if (currentHealth < 0){
currentHealth = 0;
gameOverFunction();
};
currentTime = (currentTime + 1);
if (currentTime == 30){
currentTime = 0;
currentSeconds = (currentSeconds + 1);
if (currentSeconds == (10 * currentStage)){
if (currentStage < 10){
currentStage = (currentStage + 1);
snowTimer = 0;
};
};
};
snowTimer = (snowTimer + 1);
if (snowTimer == (12 - currentStage)){
snowTimer = 0;
if (Math.random() > 0.2){
createSnow(true, (Math.random() * 600));
} else {
if ((((waveTimer > 50)) && ((waveTimer < 250)))){
createSnow(false, (Math.random() * 600));
};
};
};
waveTimer = (waveTimer + 1);
if (waveTimer == 300){
waveTimer = 0;
if (Math.random() > 0.5){
hubDisplay.moveText.gotoAndPlay("moveright");
createWave(50);
} else {
hubDisplay.moveText.gotoAndPlay("moveleft");
createWave(350);
};
};
i = 0;
while (i < snow_container.numChildren) {
MovieClip(snow_container.getChildAt(i)).currentColor = cam.out.getPixel((600 - MovieClip(snow_container.getChildAt(i)).x), (MovieClip(snow_container.getChildAt(i)).y - 10));
if (MovieClip(snow_container.getChildAt(i)).currentColor == 0xFF0000){
if (MovieClip(snow_container.getChildAt(i)).snowGood == false){
if (MovieClip(snow_container.getChildAt(i)).snowSnatched == true){
createExplode(false);
currentHealth = (currentHealth - 25);
hubDisplay.redFlash.play();
if (currentHealth < 0){
currentHealth = 0;
gameOverFunction();
};
MovieClip(snow_container.getChildAt(i)).removeSelf();
} else {
MovieClip(snow_container.getChildAt(i)).snowSnatched = true;
};
} else {
createExplode(true);
currentScore = (currentScore + 10);
if (currentHealth < 100){
currentHealth = (currentHealth + 3);
if (currentHealth > 100){
currentHealth = 100;
};
};
MovieClip(snow_container.getChildAt(i)).removeSelf();
};
};
i++;
};
};
hubDisplay.meterDamage.scaleX = (currentHealth / totalHealth);
hubDisplay.scoreText.text = ("SCORE: " + currentScore);
hubDisplay.stageText.text = ("STAGE " + currentStage);
}
public function mouseClickDown(_arg1:MouseEvent):void{
if (hubDisplay.chromeplayLogo.hitTestPoint(mouseX, mouseY, false)){
getURL("http://www.chromeplay.com", "_blank");
};
if (hubDisplay.musicSymbol.hitTestPoint(mouseX, mouseY, false)){
if (musicToggle == true){
musicToggle = false;
musicVolume = new SoundTransform(0, 0);
musicChannel.soundTransform = musicVolume;
} else {
musicToggle = true;
musicVolume = new SoundTransform(1, 0);
musicChannel.soundTransform = musicVolume;
};
};
if (hubDisplay.qualitySymbol.hitTestPoint(mouseX, mouseY, false)){
if (stage.quality == "MEDIUM"){
stage.quality = "LOW";
} else {
stage.quality = "MEDIUM";
};
};
if (bodyShow == true){
if (hubDisplay.bodyGuide.hitPlay.hitTestPoint(mouseX, mouseY, false)){
hubDisplay.countdown.play();
countdown = true;
bodyShow = false;
};
if (hubDisplay.bodyGuide.player1.hitTestPoint(mouseX, mouseY, false)){
twoPlayer = false;
};
if (hubDisplay.bodyGuide.player2.hitTestPoint(mouseX, mouseY, false)){
twoPlayer = true;
};
};
if (gameStarted == false){
if (bodyShow == false){
if (hubDisplay.fbcp.hitTestPoint(mouseX, mouseY, true)){
linkFacebook();
};
};
if (hubDisplay.menuItems.buttonPlay.hitTestPoint(mouseX, mouseY, true)){
bodyShow = true;
gameOver = false;
currentHealth = 100;
currentScore = 0;
currentTime = 0;
currentSeconds = 0;
currentStage = 1;
scoreSubmitted = false;
creditsShow = false;
hubDisplay.creditsBox.x = 900;
};
if (hubDisplay.menuItems.buttonScores.hitTestPoint(mouseX, mouseY, true)){
getURL(("http://www.chromeplay.com/highscores.php?id=" + gameID), "_blank");
};
if (hubDisplay.menuItems.buttonMore.hitTestPoint(mouseX, mouseY, true)){
getURL("http://www.chromeplay.com", "_blank");
};
if (hubDisplay.menuItems.buttonCredits.hitTestPoint(mouseX, mouseY, true)){
creditsShow = true;
};
};
if (creditsShow == true){
if (hubDisplay.creditsBox.hideButton.hitTestPoint(mouseX, mouseY, true)){
creditsShow = false;
};
};
if (gameOver == true){
if (hubDisplay.gameOver.backToMenu.hitTestPoint(mouseX, mouseY, true)){
gameStarted = false;
gameOver = false;
myName = hubDisplay.gameOver.nameText.text;
};
if (hubDisplay.gameOver.moreGames.hitTestPoint(mouseX, mouseY, true)){
getURL("http://www.chromeplay.com", "_blank");
};
if (hubDisplay.gameOver.submitScore.hitTestPoint(mouseX, mouseY, true)){
if (scoreSubmitted == false){
myName = hubDisplay.gameOver.nameText.text;
scoreSubmitted = true;
submitScore();
};
};
if (bodyShow == false){
if (hubDisplay.fbcp.hitTestPoint(mouseX, mouseY, true)){
linkFacebook();
};
};
};
}
public function linkNG(_arg1:MouseEvent):void{
getURL("http://www.newgrounds.com/collection/christmas2008.html", "_blank");
}
public function load_bar(_arg1:Event):void{
if (chromeplay.hitTestPoint(mouseX, mouseY, true)){
chromeplay.alpha = 1;
} else {
chromeplay.alpha = 0.8;
};
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);
};
if (loadItems.currentFrame == loadItems.totalFrames){
gotoAndStop("loader");
stage.removeEventListener(MouseEvent.MOUSE_DOWN, mouseClickLoad);
this.removeEventListener("enterFrame", load_bar);
};
}
public function submitScore():void{
var _local1:URLRequest;
var _local2:URLVariables;
var _local3:String;
var _local4:String;
var _local5:String;
_local1 = new URLRequest("http://www.chromeplay.com/php_scores.php");
_local2 = new URLVariables();
_local3 = "chromeplay_hash_elephant";
_local4 = ((_local3 + currentScore) + myName);
_local5 = MD5.encrypt(_local4);
_local2.gameID = gameID;
_local2.currentScore = currentScore;
_local2.myName = myName;
_local2.hashData = _local5;
_local1.data = _local2;
_local1.method = URLRequestMethod.POST;
sendToURL(_local1);
getURL(("http://www.chromeplay.com/highscores.php?id=" + gameID), "_blank");
}
public function mouseClickLoad(_arg1:MouseEvent):void{
if (loaded == true){
if (loadItems.hitTestPoint(mouseX, mouseY, true)){
loadItems.play();
};
};
}
public function gameOverFunction():void{
gameOver = true;
hubDisplay.gameOver.scoreText.text = ("Score: " + currentScore);
hubDisplay.gameOver.nameText.text = myName;
}
public function enterFrameIntro(_arg1:Event):void{
if (introLogo.currentFrame == introLogo.totalFrames){
gotoAndStop("game");
removeEventListener(Event.ENTER_FRAME, enterFrameIntro);
};
}
}
}//package love_fla
Section 11
//menu_items_25 (love_fla.menu_items_25)
package love_fla {
import flash.display.*;
public dynamic class menu_items_25 extends MovieClip {
public var buttonCredits:MovieClip;
public var buttonScores:MovieClip;
public var buttonPlay:MovieClip;
public var buttonMore:MovieClip;
}
}//package love_fla
Section 12
//meter_damage_20 (love_fla.meter_damage_20)
package love_fla {
import flash.display.*;
public dynamic class meter_damage_20 extends MovieClip {
public function meter_damage_20(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package love_fla
Section 13
//move_text_42 (love_fla.move_text_42)
package love_fla {
import flash.display.*;
public dynamic class move_text_42 extends MovieClip {
public function move_text_42(){
addFrameScript(0, frame1, 49, frame50, 99, frame100);
}
function frame1(){
stop();
}
function frame100(){
gotoAndStop(1);
}
function frame50(){
gotoAndStop(1);
}
}
}//package love_fla
Section 14
//NG_AD_OBJECT_6 (love_fla.NG_AD_OBJECT_6)
package love_fla {
import flash.events.*;
import flash.media.*;
import flash.display.*;
import flash.text.*;
import flash.ui.*;
import flash.net.*;
import flash.geom.*;
import flash.utils.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.xml.*;
public dynamic class NG_AD_OBJECT_6 extends MovieClip {
public var ng_ad:MovieClip;
public var NG_Button:SimpleButton;
public function NG_AD_OBJECT_6(){
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 love_fla
Section 15
//NG_TANK_8 (love_fla.NG_TANK_8)
package love_fla {
import flash.events.*;
import flash.display.*;
public dynamic class NG_TANK_8 extends MovieClip {
public var NG_Logo:SimpleButton;
public function NG_TANK_8(){
addFrameScript(0, frame1);
}
public function loadNGSite(_arg1:Event){
NewgroundsAPI.loadNewgrounds();
}
function frame1(){
NG_Logo.addEventListener(MouseEvent.CLICK, loadNGSite);
}
}
}//package love_fla
Section 16
//red_flash_37 (love_fla.red_flash_37)
package love_fla {
import flash.display.*;
public dynamic class red_flash_37 extends MovieClip {
public function red_flash_37(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package love_fla
Section 17
//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 18
//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 redTint:Array;
public var gravity:Number;
public var blueTint:Array;
public var startAngle:Number;
public var greenTint:Array;
public var alive:Boolean;// = true
public var moveSpeed:Number;// = 5
public var currentX:Number;
public function Explosion(_arg1, _arg2, _arg3):void{
var _local4:ColorTransform;
alive = true;
redTint = new Array(1, -1, -1, -1, 1, 1);
greenTint = new Array(-1, 1, -1, 1, -1, 1);
blueTint = new Array(-1, -1, 1, 1, 1, -1);
moveSpeed = 5;
super();
startAngle = (Math.random() * 360);
gravity = (Math.random() * -10);
x = ((_arg1 + 10) - (Math.random() * 20));
y = ((_arg2 + 10) - (Math.random() * 20));
_local4 = transform.colorTransform;
_local4.redOffset = (50 * redTint[_arg3]);
_local4.greenOffset = (50 * greenTint[_arg3]);
_local4.blueOffset = (50 * blueTint[_arg3]);
transform.colorTransform = _local4;
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 19
//fxSharp (fxSharp)
package {
import flash.media.*;
public dynamic class fxSharp extends Sound {
}
}//package
Section 20
//fxZing (fxZing)
package {
import flash.media.*;
public dynamic class fxZing extends Sound {
}
}//package
Section 21
//hub_display (hub_display)
package {
import flash.display.*;
import flash.text.*;
public dynamic class hub_display extends MovieClip {
public var scoreText:TextField;
public var fbcp:MovieClip;
public var musicSymbol:MovieClip;
public var countdown:MovieClip;
public var backDamage:MovieClip;
public var legend_chromeplay:MovieClip;
public var legend_sound:MovieClip;
public var meterDamage:MovieClip;
public var stageText:TextField;
public var qualitySymbol:MovieClip;
public var chromeplayLogo:MovieClip;
public var menuItems:MovieClip;
public var bodyGuide:MovieClip;
public var moveText:MovieClip;
public var howToPlay:MovieClip;
public var creditsBox:MovieClip;
public var redFlash:MovieClip;
public var personLine:MovieClip;
public var gameOver:MovieClip;
}
}//package
Section 22
//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 23
//MotionCam (MotionCam)
package {
import flash.media.*;
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.utils.*;
public class MotionCam extends Sprite {
public var diff:BitmapData;
private var label:TextField;
public var prev:BitmapData;
public var out:BitmapData;
private var camW:Number;// = 600
private var camH:Number;// = 450
public var video:Video;
private var camFPS:Number;// = 30
private var myInt:Number;
public var cam:Camera;
public var now:BitmapData;
public function MotionCam(){
camFPS = 30;
camW = 600;
camH = 450;
super();
cam = Camera.getCamera();
cam.setMode(camW, camH, camFPS);
if (cam == null){
label = new TextField();
label.text = "NO WEBCAM";
addChild(label);
} else {
video = new Video(cam.width, cam.height);
video.attachCamera(cam);
addChild(video);
video.scaleX = -1;
video.x = 600;
now = new BitmapData(video.width, video.height);
out = new BitmapData(video.width, video.height);
diff = new BitmapData(video.width, video.height);
prev = new BitmapData(video.width, video.height);
myInt = setInterval(render, (2000 / camFPS));
};
}
private function render():void{
if (!cam.currentFPS){
return;
};
now.draw(video);
diff.draw(video);
diff.draw(prev, null, null, "difference");
out.fillRect(new Rectangle(0, 0, out.width, out.height), 4278190080);
out.threshold(diff, new Rectangle(0, 0, diff.width, diff.height), new Point(0, 0), ">", 4281545523, 4294901760);
out.threshold(diff, new Rectangle(0, 0, diff.width, diff.height), new Point(0, 0), "<", 4281545523, 0xFFFFFF);
prev.draw(video);
}
}
}//package
Section 24
//mxMain (mxMain)
package {
import flash.media.*;
public dynamic class mxMain extends Sound {
}
}//package
Section 25
//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 26
//Particle (Particle)
package {
import flash.display.*;
public dynamic class Particle extends MovieClip {
}
}//package
Section 27
//redPic (redPic)
package {
import flash.display.*;
public dynamic class redPic extends MovieClip {
}
}//package
Section 28
//Rock (Rock)
package {
import flash.display.*;
public dynamic class Rock extends MovieClip {
public var rock:MovieClip;
}
}//package
Section 29
//Score (Score)
package {
import flash.display.*;
import flash.text.*;
public dynamic class Score extends MovieClip {
public var scorePlus:TextField;
public var scoreChain:TextField;
}
}//package
Section 30
//Snow (Snow)
package {
import flash.events.*;
import flash.display.*;
public class Snow extends MovieClip {
public var snowSnatched:Boolean;// = false
public var rotate:Number;
public var currentColor:Number;
public var snowColor:String;
public var alive:Boolean;// = true
public var snowGood:Boolean;
public var moveSpeed:Number;
public function Snow(_arg1:Boolean, _arg2:int):void{
alive = true;
snowSnatched = false;
super();
x = _arg2;
y = -100;
moveSpeed = (5 + (Math.random() * 5));
rotate = (2 - (Math.random() * 4));
if (_arg1 == true){
snowGood = true;
} else {
snowGood = false;
};
addEventListener("enterFrame", clipMove);
}
public function clipMove(_arg1:Event):void{
if (snowGood == true){
gotoAndStop(1);
} else {
if (snowSnatched == true){
gotoAndStop(3);
} else {
gotoAndStop(2);
};
};
y = (y + moveSpeed);
rotation = (rotation + rotate);
if (y > 450){
removeSelf();
};
}
public function removeSelf():void{
parent.removeChild(this);
this.removeEventListener("enterFrame", clipMove);
}
}
}//package
Section 31
//Star (Star)
package {
import flash.display.*;
public dynamic class Star extends MovieClip {
}
}//package
Section 32
//Trail (Trail)
package {
import flash.display.*;
public dynamic class Trail extends MovieClip {
}
}//package