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 _local8:Number;
var _local9:Number;
var _local10:Number;
var _local11:Number;
_arg1[(_arg2 >> 5)] = (_arg1[(_arg2 >> 5)] | (128 << (_arg2 % 32)));
_arg1[((((_arg2 + 64) >>> 9) << 4) + 14)] = _arg2;
var _local3:Number = 1732584193;
var _local4:Number = -271733879;
var _local5:Number = -1732584194;
var _local6:Number = 271733878;
var _local7:Number = 0;
while (_local7 < _arg1.length) {
_local8 = _local3;
_local9 = _local4;
_local10 = _local5;
_local11 = _local6;
_local3 = md5_ff(_local3, _local4, _local5, _local6, _arg1[(_local7 + 0)], 7, -680876936);
_local6 = md5_ff(_local6, _local3, _local4, _local5, _arg1[(_local7 + 1)], 12, -389564586);
_local5 = md5_ff(_local5, _local6, _local3, _local4, _arg1[(_local7 + 2)], 17, 606105819);
_local4 = md5_ff(_local4, _local5, _local6, _local3, _arg1[(_local7 + 3)], 22, -1044525330);
_local3 = md5_ff(_local3, _local4, _local5, _local6, _arg1[(_local7 + 4)], 7, -176418897);
_local6 = md5_ff(_local6, _local3, _local4, _local5, _arg1[(_local7 + 5)], 12, 1200080426);
_local5 = md5_ff(_local5, _local6, _local3, _local4, _arg1[(_local7 + 6)], 17, -1473231341);
_local4 = md5_ff(_local4, _local5, _local6, _local3, _arg1[(_local7 + 7)], 22, -45705983);
_local3 = md5_ff(_local3, _local4, _local5, _local6, _arg1[(_local7 + 8)], 7, 1770035416);
_local6 = md5_ff(_local6, _local3, _local4, _local5, _arg1[(_local7 + 9)], 12, -1958414417);
_local5 = md5_ff(_local5, _local6, _local3, _local4, _arg1[(_local7 + 10)], 17, -42063);
_local4 = md5_ff(_local4, _local5, _local6, _local3, _arg1[(_local7 + 11)], 22, -1990404162);
_local3 = md5_ff(_local3, _local4, _local5, _local6, _arg1[(_local7 + 12)], 7, 1804603682);
_local6 = md5_ff(_local6, _local3, _local4, _local5, _arg1[(_local7 + 13)], 12, -40341101);
_local5 = md5_ff(_local5, _local6, _local3, _local4, _arg1[(_local7 + 14)], 17, -1502002290);
_local4 = md5_ff(_local4, _local5, _local6, _local3, _arg1[(_local7 + 15)], 22, 1236535329);
_local3 = md5_gg(_local3, _local4, _local5, _local6, _arg1[(_local7 + 1)], 5, -165796510);
_local6 = md5_gg(_local6, _local3, _local4, _local5, _arg1[(_local7 + 6)], 9, -1069501632);
_local5 = md5_gg(_local5, _local6, _local3, _local4, _arg1[(_local7 + 11)], 14, 643717713);
_local4 = md5_gg(_local4, _local5, _local6, _local3, _arg1[(_local7 + 0)], 20, -373897302);
_local3 = md5_gg(_local3, _local4, _local5, _local6, _arg1[(_local7 + 5)], 5, -701558691);
_local6 = md5_gg(_local6, _local3, _local4, _local5, _arg1[(_local7 + 10)], 9, 38016083);
_local5 = md5_gg(_local5, _local6, _local3, _local4, _arg1[(_local7 + 15)], 14, -660478335);
_local4 = md5_gg(_local4, _local5, _local6, _local3, _arg1[(_local7 + 4)], 20, -405537848);
_local3 = md5_gg(_local3, _local4, _local5, _local6, _arg1[(_local7 + 9)], 5, 568446438);
_local6 = md5_gg(_local6, _local3, _local4, _local5, _arg1[(_local7 + 14)], 9, -1019803690);
_local5 = md5_gg(_local5, _local6, _local3, _local4, _arg1[(_local7 + 3)], 14, -187363961);
_local4 = md5_gg(_local4, _local5, _local6, _local3, _arg1[(_local7 + 8)], 20, 1163531501);
_local3 = md5_gg(_local3, _local4, _local5, _local6, _arg1[(_local7 + 13)], 5, -1444681467);
_local6 = md5_gg(_local6, _local3, _local4, _local5, _arg1[(_local7 + 2)], 9, -51403784);
_local5 = md5_gg(_local5, _local6, _local3, _local4, _arg1[(_local7 + 7)], 14, 1735328473);
_local4 = md5_gg(_local4, _local5, _local6, _local3, _arg1[(_local7 + 12)], 20, -1926607734);
_local3 = md5_hh(_local3, _local4, _local5, _local6, _arg1[(_local7 + 5)], 4, -378558);
_local6 = md5_hh(_local6, _local3, _local4, _local5, _arg1[(_local7 + 8)], 11, -2022574463);
_local5 = md5_hh(_local5, _local6, _local3, _local4, _arg1[(_local7 + 11)], 16, 1839030562);
_local4 = md5_hh(_local4, _local5, _local6, _local3, _arg1[(_local7 + 14)], 23, -35309556);
_local3 = md5_hh(_local3, _local4, _local5, _local6, _arg1[(_local7 + 1)], 4, -1530992060);
_local6 = md5_hh(_local6, _local3, _local4, _local5, _arg1[(_local7 + 4)], 11, 1272893353);
_local5 = md5_hh(_local5, _local6, _local3, _local4, _arg1[(_local7 + 7)], 16, -155497632);
_local4 = md5_hh(_local4, _local5, _local6, _local3, _arg1[(_local7 + 10)], 23, -1094730640);
_local3 = md5_hh(_local3, _local4, _local5, _local6, _arg1[(_local7 + 13)], 4, 681279174);
_local6 = md5_hh(_local6, _local3, _local4, _local5, _arg1[(_local7 + 0)], 11, -358537222);
_local5 = md5_hh(_local5, _local6, _local3, _local4, _arg1[(_local7 + 3)], 16, -722521979);
_local4 = md5_hh(_local4, _local5, _local6, _local3, _arg1[(_local7 + 6)], 23, 76029189);
_local3 = md5_hh(_local3, _local4, _local5, _local6, _arg1[(_local7 + 9)], 4, -640364487);
_local6 = md5_hh(_local6, _local3, _local4, _local5, _arg1[(_local7 + 12)], 11, -421815835);
_local5 = md5_hh(_local5, _local6, _local3, _local4, _arg1[(_local7 + 15)], 16, 530742520);
_local4 = md5_hh(_local4, _local5, _local6, _local3, _arg1[(_local7 + 2)], 23, -995338651);
_local3 = md5_ii(_local3, _local4, _local5, _local6, _arg1[(_local7 + 0)], 6, -198630844);
_local6 = md5_ii(_local6, _local3, _local4, _local5, _arg1[(_local7 + 7)], 10, 1126891415);
_local5 = md5_ii(_local5, _local6, _local3, _local4, _arg1[(_local7 + 14)], 15, -1416354905);
_local4 = md5_ii(_local4, _local5, _local6, _local3, _arg1[(_local7 + 5)], 21, -57434055);
_local3 = md5_ii(_local3, _local4, _local5, _local6, _arg1[(_local7 + 12)], 6, 1700485571);
_local6 = md5_ii(_local6, _local3, _local4, _local5, _arg1[(_local7 + 3)], 10, -1894986606);
_local5 = md5_ii(_local5, _local6, _local3, _local4, _arg1[(_local7 + 10)], 15, -1051523);
_local4 = md5_ii(_local4, _local5, _local6, _local3, _arg1[(_local7 + 1)], 21, -2054922799);
_local3 = md5_ii(_local3, _local4, _local5, _local6, _arg1[(_local7 + 8)], 6, 1873313359);
_local6 = md5_ii(_local6, _local3, _local4, _local5, _arg1[(_local7 + 15)], 10, -30611744);
_local5 = md5_ii(_local5, _local6, _local3, _local4, _arg1[(_local7 + 6)], 15, -1560198380);
_local4 = md5_ii(_local4, _local5, _local6, _local3, _arg1[(_local7 + 13)], 21, 1309151649);
_local3 = md5_ii(_local3, _local4, _local5, _local6, _arg1[(_local7 + 4)], 6, -145523070);
_local6 = md5_ii(_local6, _local3, _local4, _local5, _arg1[(_local7 + 11)], 10, -1120210379);
_local5 = md5_ii(_local5, _local6, _local3, _local4, _arg1[(_local7 + 2)], 15, 718787259);
_local4 = md5_ii(_local4, _local5, _local6, _local3, _arg1[(_local7 + 9)], 21, -343485551);
_local3 = safe_add(_local3, _local8);
_local4 = safe_add(_local4, _local9);
_local5 = safe_add(_local5, _local10);
_local6 = safe_add(_local6, _local11);
_local7 = (_local7 + 16);
};
return ([_local3, _local4, _local5, _local6]);
}
public static function str2rstr_utf16le(_arg1:String):String{
var _local2 = "";
var _local3:Number = 0;
while (_local3 < _arg1.length) {
_local2 = (_local2 + String.fromCharCode((_arg1.charCodeAt(_local3) & 0xFF), ((_arg1.charCodeAt(_local3) >>> 8) & 0xFF)));
_local3++;
};
return (_local2);
}
public static function hex_hmac_md5(_arg1:String, _arg2:String):String{
return (rstr2hex(rstr_hmac_md5(str2rstr_utf8(_arg1), str2rstr_utf8(_arg2))));
}
public static function binl2rstr(_arg1:Array):String{
var _local2 = "";
var _local3:Number = 0;
while (_local3 < (_arg1.length * 32)) {
_local2 = (_local2 + String.fromCharCode(((_arg1[(_local3 >> 5)] >>> (_local3 % 32)) & 0xFF)));
_local3 = (_local3 + 8);
};
return (_local2);
}
public static function md5_ff(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Number):Number{
return (md5_cmn(((_arg2 & _arg3) | (~(_arg2) & _arg4)), _arg1, _arg2, _arg5, _arg6, _arg7));
}
public static function md5_ii(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Number):Number{
return (md5_cmn((_arg3 ^ (_arg2 | ~(_arg4))), _arg1, _arg2, _arg5, _arg6, _arg7));
}
public static function rstr2binl(_arg1:String):Array{
var _local2:Array = new Array((_arg1.length >> 2));
var _local3:Number = 0;
while (_local3 < _local2.length) {
_local2[_local3] = 0;
_local3++;
};
var _local4:Number = 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 _local4:Number;
var _local2:String = (hexcase) ? "0123456789ABCDEF" : "0123456789abcdef";
var _local3 = "";
var _local5:Number = 0;
while (_local5 < _arg1.length) {
_local4 = _arg1.charCodeAt(_local5);
_local3 = (_local3 + (_local2.charAt(((_local4 >>> 4) & 15)) + _local2.charAt((_local4 & 15))));
_local5++;
};
return (_local3);
}
public static function any_md5(_arg1:String, _arg2:String):String{
return (rstr2any(rstr_md5(str2rstr_utf8(_arg1)), _arg2));
}
public static function b64_hmac_md5(_arg1:String, _arg2:String):String{
return (rstr2b64(rstr_hmac_md5(str2rstr_utf8(_arg1), str2rstr_utf8(_arg2))));
}
public static function rstr2b64(_arg1:String):String{
var _local6:Number;
var _local7:Number;
var _local2 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
var _local3 = "";
var _local4:Number = _arg1.length;
var _local5:Number = 0;
while (_local5 < _local4) {
_local6 = (((_arg1.charCodeAt(_local5) << 16) | (((_local5 + 1) < _local4)) ? (_arg1.charCodeAt((_local5 + 1)) << 8) : 0) | (((_local5 + 2) < _local4)) ? _arg1.charCodeAt((_local5 + 2)) : 0);
_local7 = 0;
while (_local7 < 4) {
if (((_local5 * 8) + (_local7 * 6)) > (_arg1.length * 8)){
_local3 = (_local3 + b64pad);
} else {
_local3 = (_local3 + _local2.charAt(((_local6 >>> (6 * (3 - _local7))) & 63)));
};
_local7++;
};
_local5 = (_local5 + 3);
};
return (_local3);
}
public static function safe_add(_arg1:Number, _arg2:Number):Number{
var _local3:Number = ((_arg1 & 0xFFFF) + (_arg2 & 0xFFFF));
var _local4:Number = (((_arg1 >> 16) + (_arg2 >> 16)) + (_local3 >> 16));
return (((_local4 << 16) | (_local3 & 0xFFFF)));
}
public static function str2rstr_utf8(_arg1:String):String{
var _local4:Number;
var _local5:Number;
var _local2 = "";
var _local3:Number = -1;
while (++_local3 < _arg1.length) {
_local4 = _arg1.charCodeAt(_local3);
_local5 = (((_local3 + 1) < _arg1.length)) ? _arg1.charCodeAt((_local3 + 1)) : 0;
if ((((((((0xD800 <= _local4)) && ((_local4 <= 56319)))) && ((0xDC00 <= _local5)))) && ((_local5 <= 57343)))){
_local4 = ((65536 + ((_local4 & 1023) << 10)) + (_local5 & 1023));
_local3++;
};
if (_local4 <= 127){
_local2 = (_local2 + String.fromCharCode(_local4));
} else {
if (_local4 <= 2047){
_local2 = (_local2 + String.fromCharCode((192 | ((_local4 >>> 6) & 31)), (128 | (_local4 & 63))));
} else {
if (_local4 <= 0xFFFF){
_local2 = (_local2 + String.fromCharCode((224 | ((_local4 >>> 12) & 15)), (128 | ((_local4 >>> 6) & 63)), (128 | (_local4 & 63))));
} else {
if (_local4 <= 2097151){
_local2 = (_local2 + String.fromCharCode((240 | ((_local4 >>> 18) & 7)), (128 | ((_local4 >>> 12) & 63)), (128 | ((_local4 >>> 6) & 63)), (128 | (_local4 & 63))));
};
};
};
};
};
return (_local2);
}
public static function rstr_hmac_md5(_arg1:String, _arg2:String):String{
var _local3:Array = rstr2binl(_arg1);
if (_local3.length > 16){
_local3 = binl_md5(_local3, (_arg1.length * 8));
};
var _local4:Array = new Array(16);
var _local5:Array = new Array(16);
var _local6:Number = 0;
while (_local6 < 16) {
_local4[_local6] = (_local3[_local6] ^ 909522486);
_local5[_local6] = (_local3[_local6] ^ 1549556828);
_local6++;
};
var _local7:Array = binl_md5(_local4.concat(rstr2binl(_arg2)), (0x0200 + (_arg2.length * 8)));
return (binl2rstr(binl_md5(_local5.concat(_local7), (0x0200 + 128))));
}
public static function str2rstr_utf16be(_arg1:String):String{
var _local2 = "";
var _local3:Number = 0;
while (_local3 < _arg1.length) {
_local2 = (_local2 + String.fromCharCode(((_arg1.charCodeAt(_local3) >>> 8) & 0xFF), (_arg1.charCodeAt(_local3) & 0xFF)));
_local3++;
};
return (_local2);
}
public static function rstr2any(_arg1:String, _arg2:String):String{
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Array;
var _local3:Number = _arg2.length;
var _local4:Array = [];
var _local9:Array = 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;
};
var _local10 = "";
_local5 = (_local4.length - 1);
while (_local5 >= 0) {
_local10 = (_local10 + _arg2.charAt(_local4[_local5]));
_local5--;
};
return (_local10);
}
public static function rstr_md5(_arg1:String):String{
return (binl2rstr(binl_md5(rstr2binl(_arg1), (_arg1.length * 8))));
}
}
}//package com.gsolo.encryption
Section 2
//countdown_45 (egg_fla.countdown_45)
package egg_fla {
import flash.display.*;
public dynamic class countdown_45 extends MovieClip {
public var startText:MovieClip;
public function countdown_45(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package egg_fla
Section 3
//hub_legend_39 (egg_fla.hub_legend_39)
package egg_fla {
import flash.display.*;
public dynamic class hub_legend_39 extends MovieClip {
public function hub_legend_39(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package egg_fla
Section 4
//load_item_15 (egg_fla.load_item_15)
package egg_fla {
import flash.display.*;
public dynamic class load_item_15 extends MovieClip {
public function load_item_15(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package egg_fla
Section 5
//load_items_1 (egg_fla.load_items_1)
package egg_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 egg_fla
Section 6
//MainTimeline (egg_fla.MainTimeline)
package egg_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.profiler.*;
import flash.sampler.*;
import flash.system.*;
import flash.xml.*;
public dynamic class MainTimeline extends MovieClip {
public var loaded:Boolean;
public var currentStage:int;
public var hubDisplay:MovieClip;
public var blackFade:MovieClip;
public var musicChannel:SoundChannel;
public var cam_container:MovieClip;
public var basketHolder:MovieClip;
public var gameStarted:Boolean;
public var countdown:Boolean;
public var currentHealth:Number;
public var introLogo:MovieClip;
public var webcamMode:Boolean;
public var gameID2:int;
public var basket_container:MovieClip;
public var MD5encryptor:MD5;
public var twoPlayer:Boolean;
public var myName:String;
public var myContextMenu:ContextMenu;
public var i:int;
public var j:int;
public var k:int;
public var l:int;
public var loadItems:MovieClip;
public var item2:ContextMenuItem;
public var item3:ContextMenuItem;
public var item4:ContextMenuItem;
public var snowTimer:int;
public var bGround:MovieClip;
public var gameID:int;
public var scoreSubmitted:Boolean;
public var fallSpeed:int;
public var musicMain:mxMain;
public var getCam;
public var currentScore:int;
public var backFence:MovieClip;
public var musicVolume:SoundTransform;
public var creditsShow:Boolean;
public var cpLogo:MovieClip;
public var eggSnatched:Boolean;
public var bodyShow:Boolean;
public var totalHealth:Number;
public var snow_container:MovieClip;
public var currentSeconds:int;
public var cam:MovieClip;
public var waveTimer:int;
public var explosion_container:MovieClip;
public var musicToggle:Boolean;
public var gameOver:Boolean;
public var eggHide:Boolean;
public var currentTime:int;
public var currentX:Number;
public function MainTimeline(){
addFrameScript(0, frame1, 9, frame10, 19, frame20);
}
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);
};
gameOverRoll("backToMenu");
gameOverRoll("moreGames");
if (scoreSubmitted == true){
hubDisplay.gameOver.submitScore.alpha = 0.3;
} else {
gameOverRoll("submitScore");
};
} 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.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 = 10;
menuRoll("buttonPlay");
menuRoll("buttonScores");
if (getCam != null){
menuRoll("buttonWebcam");
menuRoll("buttonCamScores");
hubDisplay.menuItems.buttonCamScores.scoreText.text = "High Scores";
} else {
hubDisplay.menuItems.buttonWebcam.alpha = 0.3;
hubDisplay.menuItems.buttonCamScores.alpha = 0.5;
hubDisplay.menuItems.buttonCamScores.scoreText.text = "No Cam Detected";
};
menuRoll("buttonMore");
menuRoll("buttonCredits");
if (creditsShow == true){
creditsBoxRoll("hideButton");
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)))) && ((webcamMode == true)))){
hubDisplay.personLine.alpha = 1;
} else {
hubDisplay.personLine.alpha = 0;
};
if ((((gameStarted == true)) && ((webcamMode == true)))){
bGround.alpha = 0;
} else {
bGround.alpha = 1;
};
if ((((gameStarted == true)) && ((gameOver == false)))){
if (webcamMode == false){
currentX = (currentX - (Math.floor((basketHolder.x - mouseX)) / 10));
basketHolder.x = currentX;
if (eggHide == true){
basketHolder.alpha = 0.5;
} else {
basketHolder.alpha = 1;
};
};
bGround.tree1.x = (150 - (basketHolder.x / 9));
bGround.tree2.x = (150 - (basketHolder.x / 7));
bGround.tree3.x = (150 - (basketHolder.x / 5));
currentHealth = (currentHealth - ((0.02 * fallSpeed) + (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 < 20){
currentStage = (currentStage + 1);
snowTimer = 0;
};
};
};
snowTimer = (snowTimer + ((currentStage / 2) + 0.5));
if (snowTimer >= 10){
snowTimer = 0;
if (Math.random() > (0.2 * fallSpeed)){
createSnow(true, (Math.random() * 600), (5 + ((currentStage / 2) * (fallSpeed - 1))));
} else {
if ((((waveTimer > 50)) && ((waveTimer < 250)))){
createSnow(false, (Math.random() * 600), ((fallSpeed * 5) + ((currentStage / 2) * (fallSpeed - 1))));
};
};
};
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) {
eggSnatched = false;
if (webcamMode == true){
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){
eggSnatched = true;
};
} else {
if (basketHolder.hitTestPoint(MovieClip(snow_container.getChildAt(i)).x, MovieClip(snow_container.getChildAt(i)).y, true)){
if (eggHide == false){
eggSnatched = true;
};
};
};
if (eggSnatched == true){
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 createWave(_arg1:int):void{
createSnow(false, _arg1, (fallSpeed * 5));
createSnow(false, (_arg1 + 40), (fallSpeed * 5));
createSnow(false, (_arg1 + 80), (fallSpeed * 5));
createSnow(false, (_arg1 + 120), (fallSpeed * 5));
createSnow(false, (_arg1 + 160), (fallSpeed * 5));
createSnow(false, (_arg1 + 200), (fallSpeed * 5));
createSnow(false, (_arg1 + 240), (fallSpeed * 5));
}
public function mouseClickDown(_arg1:MouseEvent):void{
eggHide = true;
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();
hubDisplay.countdown.startText.gotoAndStop("webcam");
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)){
startGame(false);
};
if (hubDisplay.menuItems.buttonScores.hitTestPoint(mouseX, mouseY, true)){
getURL(("http://www.chromeplay.com/highscores.php?id=" + gameID), "_blank");
};
if (getCam != null){
if (hubDisplay.menuItems.buttonWebcam.hitTestPoint(mouseX, mouseY, true)){
startGame(true);
};
};
if (hubDisplay.menuItems.buttonCamScores.hitTestPoint(mouseX, mouseY, true)){
getURL(("http://www.chromeplay.com/highscores.php?id=" + gameID2), "_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;
if (webcamMode == true){
cam_container.removeChildAt(0);
} else {
basket_container.removeChildAt(0);
};
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 getURL(_arg1:String, _arg2:String){
var url = _arg1;
var method = _arg2;
var web:String = url;
var request:URLRequest = new URLRequest(web);
try {
navigateToURL(request, method);
} catch(e:Error) {
};
}
public function load_bar(_arg1:Event):void{
if (cpLogo.hitTestPoint(mouseX, mouseY, true)){
if (cpLogo.alpha < 1){
cpLogo.alpha = (cpLogo.alpha + 0.05);
};
} else {
if (cpLogo.alpha > 0.7){
cpLogo.alpha = (cpLogo.alpha - 0.05);
};
};
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 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 submitScore():void{
var _local1:URLRequest = new URLRequest("http://www.chromeplay.com/php_scores.php");
var _local2:URLVariables = new URLVariables();
var _local3 = "chromeplay_hash_elephant";
var _local4:String = ((_local3 + currentScore) + myName);
var _local5:String = MD5.encrypt(_local4);
if (webcamMode == true){
_local2.gameID = gameID2;
} else {
_local2.gameID = gameID;
};
_local2.currentScore = currentScore;
_local2.myName = myName;
_local2.hashData = _local5;
_local1.data = _local2;
_local1.method = URLRequestMethod.POST;
sendToURL(_local1);
if (webcamMode == true){
getURL(("http://www.chromeplay.com/highscores.php?id=" + gameID2), "_blank");
} else {
getURL(("http://www.chromeplay.com/highscores.php?id=" + gameID), "_blank");
};
}
function frame1(){
stop();
stage.quality = "MEDIUM";
NewgroundsAPI.linkAPI(this);
NewgroundsAPI.connectMovie(6066);
gameID = 65;
gameID2 = 66;
loaded = false;
stage.addEventListener(MouseEvent.MOUSE_DOWN, mouseClickLoad);
this.addEventListener("enterFrame", load_bar);
cpLogo.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 linkChromePlay(_arg1:MouseEvent):void{
getURL("http://www.chromeplay.com", "_blank");
}
public function mouseClickLoad(_arg1:MouseEvent):void{
if (loaded == true){
if (loadItems.hitTestPoint(mouseX, mouseY, true)){
loadItems.play();
};
};
}
function frame20(){
stop();
i = 0;
j = 0;
k = 0;
l = 0;
getCam = Camera.getCamera();
cam = new MovieClip();
if (getCam != null){
cam = new MotionCam();
};
myName = "ENTER NAME";
scoreSubmitted = false;
webcamMode = false;
gameStarted = false;
bodyShow = false;
countdown = false;
gameOver = false;
snowTimer = 0;
waveTimer = 0;
creditsShow = false;
twoPlayer = false;
eggHide = false;
currentTime = 0;
currentSeconds = 0;
currentStage = 1;
currentScore = 0;
totalHealth = 100;
currentHealth = totalHealth;
musicToggle = true;
currentX = 300;
eggSnatched = true;
cam_container = new MovieClip();
addChild(cam_container);
snow_container = new MovieClip();
addChild(snow_container);
explosion_container = new MovieClip();
addChild(explosion_container);
basket_container = new MovieClip();
addChild(basket_container);
basketHolder = new basket();
backFence = new fence();
addChild(backFence);
backFence.x = 0;
backFence.y = 400;
hubDisplay = new hub_display();
addChild(hubDisplay);
blackFade = new black_fade();
addChild(blackFade);
stage.addEventListener(Event.ENTER_FRAME, gameEnterFrame);
stage.addEventListener(MouseEvent.MOUSE_DOWN, mouseClickDown);
stage.addEventListener(MouseEvent.MOUSE_UP, mouseClickUp);
MD5encryptor = new MD5();
musicVolume = new SoundTransform(1, 0);
musicMain = new mxMain();
musicChannel = musicMain.play(0, 99, musicVolume);
}
public function startGame(_arg1:Boolean):void{
webcamMode = _arg1;
if (webcamMode == true){
cam_container.addChild(cam);
fallSpeed = 1;
bodyShow = true;
} else {
basket_container.addChild(basketHolder);
basketHolder.x = 300;
basketHolder.y = 450;
fallSpeed = 2;
countdown = true;
bodyShow = false;
hubDisplay.countdown.play();
hubDisplay.countdown.startText.gotoAndStop("mouse");
};
gameOver = false;
currentHealth = 100;
currentScore = 0;
currentTime = 0;
currentSeconds = 0;
currentStage = 1;
scoreSubmitted = false;
creditsShow = false;
hubDisplay.creditsBox.x = 900;
}
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";
}
public function menuRoll(_arg1:String):void{
if (hubDisplay.menuItems[_arg1].back.hitTestPoint(mouseX, mouseY, true)){
if (hubDisplay.menuItems[_arg1].alpha < 1){
hubDisplay.menuItems[_arg1].alpha = (hubDisplay.menuItems[_arg1].alpha + 0.05);
hubDisplay.menuItems[_arg1].x = (hubDisplay.menuItems[_arg1].x + 1);
};
} else {
if (hubDisplay.menuItems[_arg1].alpha > 0.7){
hubDisplay.menuItems[_arg1].alpha = (hubDisplay.menuItems[_arg1].alpha - 0.05);
hubDisplay.menuItems[_arg1].x = (hubDisplay.menuItems[_arg1].x - 1);
};
};
}
public function gameOverRoll(_arg1:String):void{
if (hubDisplay.gameOver[_arg1].hitTestPoint(mouseX, mouseY, true)){
hubDisplay.gameOver[_arg1].alpha = 1;
} else {
hubDisplay.gameOver[_arg1].alpha = 0.7;
};
}
public function createSnow(_arg1:Boolean, _arg2:int, _arg3:int):void{
var _local4:Snow = new Snow(_arg1, _arg2, _arg3);
snow_container.addChild(_local4);
}
public function gameOverFunction():void{
gameOver = true;
hubDisplay.gameOver.scoreText.text = ("Score: " + currentScore);
hubDisplay.gameOver.nameText.text = myName;
}
public function linkFacebook():void{
getURL("http://apps.new.facebook.com/chromeplay/process_profile.php?id=133", "_blank");
}
public function mouseClickUp(_arg1:MouseEvent):void{
eggHide = false;
}
public function creditsBoxRoll(_arg1:String):void{
if (hubDisplay.creditsBox[_arg1].hitTestPoint(mouseX, mouseY, true)){
hubDisplay.creditsBox[_arg1].alpha = 1;
} else {
hubDisplay.creditsBox[_arg1].alpha = 0.7;
};
}
public function enterFrameIntro(_arg1:Event):void{
if (introLogo.currentFrame == introLogo.totalFrames){
gotoAndStop("game");
removeEventListener(Event.ENTER_FRAME, enterFrameIntro);
};
}
}
}//package egg_fla
Section 7
//meter_damage_19 (egg_fla.meter_damage_19)
package egg_fla {
import flash.display.*;
public dynamic class meter_damage_19 extends MovieClip {
public function meter_damage_19(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package egg_fla
Section 8
//move_text_47 (egg_fla.move_text_47)
package egg_fla {
import flash.display.*;
public dynamic class move_text_47 extends MovieClip {
public function move_text_47(){
addFrameScript(0, frame1, 49, frame50, 99, frame100);
}
function frame50(){
gotoAndStop(1);
}
function frame100(){
gotoAndStop(1);
}
function frame1(){
stop();
}
}
}//package egg_fla
Section 9
//NG_AD_OBJECT_5 (egg_fla.NG_AD_OBJECT_5)
package egg_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.profiler.*;
import flash.sampler.*;
import flash.system.*;
import flash.xml.*;
public dynamic class NG_AD_OBJECT_5 extends MovieClip {
public var NG_Button:SimpleButton;
public var ng_ad:MovieClip;
public function NG_AD_OBJECT_5(){
addFrameScript(0, frame1);
}
public function ad_Loaded(_arg1:Event){
var _local2:* = String(_arg1.target.data);
var _local3:Loader = new Loader();
_local3.load(new URLRequest(_local2));
ng_ad.addChild(_local3);
}
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 startAd(_arg1){
var _local2:URLLoader = new URLLoader(new URLRequest(_arg1));
_local2.addEventListener(Event.COMPLETE, ad_Loaded);
}
public function loadNGSite(_arg1:Event){
NewgroundsAPI.loadNewgrounds();
}
}
}//package egg_fla
Section 10
//NG_TANK_7 (egg_fla.NG_TANK_7)
package egg_fla {
import flash.events.*;
import flash.display.*;
public dynamic class NG_TANK_7 extends MovieClip {
public var NG_Logo:SimpleButton;
public function NG_TANK_7(){
addFrameScript(0, frame1);
}
function frame1(){
NG_Logo.addEventListener(MouseEvent.CLICK, loadNGSite);
}
public function loadNGSite(_arg1:Event){
NewgroundsAPI.loadNewgrounds();
}
}
}//package egg_fla
Section 11
//red_flash_41 (egg_fla.red_flash_41)
package egg_fla {
import flash.display.*;
public dynamic class red_flash_41 extends MovieClip {
public function red_flash_41(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package egg_fla
Section 12
//basket (basket)
package {
import flash.display.*;
public dynamic class basket extends MovieClip {
}
}//package
Section 13
//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 14
//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 alive:Boolean;// = true
public var gravity:Number;
public var startAngle:Number;
public var blueTint:Array;
public var moveSpeed:Number;// = 5
public var greenTint:Array;
public var currentX:Number;
public function Explosion(_arg1, _arg2, _arg3):void{
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);
super();
startAngle = (Math.random() * 360);
gravity = (Math.random() * -10);
x = ((_arg1 + 10) - (Math.random() * 20));
y = ((_arg2 + 10) - (Math.random() * 20));
var _local4:ColorTransform = 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 15
//fence (fence)
package {
import flash.display.*;
public dynamic class fence extends MovieClip {
}
}//package
Section 16
//fxSharp (fxSharp)
package {
import flash.media.*;
public dynamic class fxSharp extends Sound {
}
}//package
Section 17
//fxZing (fxZing)
package {
import flash.media.*;
public dynamic class fxZing extends Sound {
}
}//package
Section 18
//hub_display (hub_display)
package {
import flash.display.*;
import flash.text.*;
public dynamic class hub_display extends MovieClip {
public var stageText:TextField;
public var creditsBox:MovieClip;
public var scoreText:TextField;
public var legend_sound:MovieClip;
public var moveText:MovieClip;
public var redFlash:MovieClip;
public var legend_chromeplay:MovieClip;
public var menuItems:MovieClip;
public var musicSymbol:MovieClip;
public var gameOver:MovieClip;
public var meterDamage:MovieClip;
public var fbcp:MovieClip;
public var personLine:MovieClip;
public var countdown:MovieClip;
public var backDamage:MovieClip;
public var qualitySymbol:MovieClip;
public var chromeplayLogo:MovieClip;
public var bodyGuide:MovieClip;
public var howToPlay:MovieClip;
}
}//package
Section 19
//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 20
//MotionCam (MotionCam)
package {
import flash.media.*;
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.utils.*;
public class MotionCam extends MovieClip {
private var myInt:Number;
public var diff:BitmapData;
public var out:BitmapData;
public var cam:Camera;
public var prev:BitmapData;
private var label:TextField;
public var now:BitmapData;
private var camW:Number;// = 600
private var camH:Number;// = 450
private var camFPS:Number;// = 30
public var video:Video;
public function MotionCam(){
var _local1:*;
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);
_local1 = addChild(new Bitmap(out));
_local1.scaleX = -1;
_local1.x = 600;
_local1.alpha = 0.2;
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 21
//mxMain (mxMain)
package {
import flash.media.*;
public dynamic class mxMain extends Sound {
}
}//package
Section 22
//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 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 {
var XML_Loaded:Function = function (_arg1:Event){
var _local5:XML;
var _local6:*;
var _local7:*;
XML.ignoreWhitespace = true;
var _local2:XML = XML(_arg1.target.data);
var _local3:Object = new Object();
var _local4:XMLList = _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 _root:*;
var overlay:MovieClip;
var version = _arg1;
var movie_url = _arg2;
var redirect_url = _arg3;
var sw:* = bridge.stage.stageWidth;
var sh:* = bridge.stage.stageHeight;
var tw:* = 350;
var th:* = 160;
var 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();
var overlay_x:* = Math.round(((sw - tw) / 2));
var 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);
};
var 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);
var blankarea:TextField = new TextField();
blankarea.x = (overlay_x - mg);
blankarea.y = (overlay_y - mg);
blankarea.width = (tw + mg);
blankarea.height = (th + mg);
blankarea.selectable = false;
var header:TextField = new TextField();
header.width = tw;
header.x = overlay_x;
header.y = overlay_y;
header.height = 100;
header.selectable = false;
var header_format:TextFormat = new TextFormat();
header_format.font = "Arial Black";
header_format.color = 0xFFFFFF;
header_format.size = 20;
header.defaultTextFormat = header_format;
header.text = "New Version Available!";
var msgtext:TextField = new TextField();
msgtext.x = overlay_x;
msgtext.y = (overlay_y + 70);
msgtext.width = tw;
msgtext.height = 60;
msgtext.selectable = false;
var msgtext_format:TextFormat = new TextFormat();
msgtext_format.font = "Arial";
msgtext_format.color = 0xFFFFFF;
msgtext_format.size = 12;
msgtext_format.bold = true;
var msgtext_link:TextFormat = 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:* = bridge.stage.stageWidth;
var _local5:* = bridge.stage.stageHeight;
var _local6:* = 350;
var _local7:* = 160;
var _local8:* = bridge.root;
var _local9:MovieClip = new MovieClip();
_local9.graphics.beginFill(0x660000);
_local9.graphics.lineStyle(20, 0);
_local9.graphics.drawRect(0, 0, _local4, _local5);
_local9.graphics.endFill();
var _local10:TextField = new TextField();
_local10.x = 0;
_local10.y = 0;
_local10.width = _local4;
_local10.height = _local5;
_local10.selectable = false;
var _local11:TextField = 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;
var _local12:TextFormat = new TextFormat();
_local12.font = "Arial Black";
_local12.color = 0xFF0000;
_local12.size = 38;
_local11.defaultTextFormat = _local12;
_local11.text = "ERROR!";
var _local13:TextField = 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;
var _local14:TextFormat = new TextFormat();
_local14.font = "Arial";
_local14.color = 0xFFFFFF;
_local14.size = 12;
_local14.bold = true;
var _local15:TextFormat = 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 23
//Particle (Particle)
package {
import flash.display.*;
public dynamic class Particle extends MovieClip {
}
}//package
Section 24
//redPic (redPic)
package {
import flash.display.*;
public dynamic class redPic extends MovieClip {
}
}//package
Section 25
//Rock (Rock)
package {
import flash.display.*;
public dynamic class Rock extends MovieClip {
public var rock:MovieClip;
}
}//package
Section 26
//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 27
//Snow (Snow)
package {
import flash.events.*;
import flash.display.*;
public class Snow extends MovieClip {
public var snowColor:String;
public var alive:Boolean;// = true
public var snowGood:Boolean;
public var currentColor:Number;
public var snowSnatched:Boolean;// = false
public var moveSpeed:Number;
public var rotate:Number;
public function Snow(_arg1:Boolean, _arg2:int, _arg3:int):void{
x = _arg2;
y = -100;
moveSpeed = (_arg3 + (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 28
//Star (Star)
package {
import flash.display.*;
public dynamic class Star extends MovieClip {
}
}//package
Section 29
//Trail (Trail)
package {
import flash.display.*;
public dynamic class Trail extends MovieClip {
}
}//package