Section 1
//MD5 (com.adobe.crypto.MD5)
package com.adobe.crypto {
import com.adobe.utils.*;
public class MD5 {
private static function ff(_arg1:int, _arg2:int, _arg3:int, _arg4:int, _arg5:int, _arg6:int, _arg7:int):int{
return (transform(f, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7));
}
private static function createBlocks(_arg1:String):Array{
var _local2:Array;
var _local3:int;
var _local4:int;
var _local5:int;
_local2 = new Array();
_local3 = (_arg1.length * 8);
_local4 = 0xFF;
_local5 = 0;
while (_local5 < _local3) {
_local2[(_local5 >> 5)] = (_local2[(_local5 >> 5)] | ((_arg1.charCodeAt((_local5 / 8)) & _local4) << (_local5 % 32)));
_local5 = (_local5 + 8);
};
_local2[(_local3 >> 5)] = (_local2[(_local3 >> 5)] | (128 << (_local3 % 32)));
_local2[((((_local3 + 64) >>> 9) << 4) + 14)] = _local3;
return (_local2);
}
private static function ii(_arg1:int, _arg2:int, _arg3:int, _arg4:int, _arg5:int, _arg6:int, _arg7:int):int{
return (transform(i, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7));
}
private static function f(_arg1:int, _arg2:int, _arg3:int):int{
return (((_arg1 & _arg2) | (~(_arg1) & _arg3)));
}
private static function g(_arg1:int, _arg2:int, _arg3:int):int{
return (((_arg1 & _arg3) | (_arg2 & ~(_arg3))));
}
private static function h(_arg1:int, _arg2:int, _arg3:int):int{
return (((_arg1 ^ _arg2) ^ _arg3));
}
private static function i(_arg1:int, _arg2:int, _arg3:int):int{
return ((_arg2 ^ (_arg1 | ~(_arg3))));
}
private static function transform(_arg1:Function, _arg2:int, _arg3:int, _arg4:int, _arg5:int, _arg6:int, _arg7:int, _arg8:int):int{
var _local9:int;
_local9 = (((_arg2 + int(_arg1(_arg3, _arg4, _arg5))) + _arg6) + _arg8);
return ((IntUtil.rol(_local9, _arg7) + _arg3));
}
private static function hh(_arg1:int, _arg2:int, _arg3:int, _arg4:int, _arg5:int, _arg6:int, _arg7:int):int{
return (transform(h, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7));
}
public static function hash(_arg1:String):String{
var _local2:int;
var _local3:int;
var _local4:int;
var _local5:int;
var _local6:int;
var _local7:int;
var _local8:int;
var _local9:int;
var _local10:Array;
var _local11:int;
var _local12:int;
_local2 = 1732584193;
_local3 = -271733879;
_local4 = -1732584194;
_local5 = 271733878;
_local10 = createBlocks(_arg1);
_local11 = _local10.length;
_local12 = 0;
while (_local12 < _local11) {
_local6 = _local2;
_local7 = _local3;
_local8 = _local4;
_local9 = _local5;
_local2 = ff(_local2, _local3, _local4, _local5, _local10[(_local12 + 0)], 7, -680876936);
_local5 = ff(_local5, _local2, _local3, _local4, _local10[(_local12 + 1)], 12, -389564586);
_local4 = ff(_local4, _local5, _local2, _local3, _local10[(_local12 + 2)], 17, 606105819);
_local3 = ff(_local3, _local4, _local5, _local2, _local10[(_local12 + 3)], 22, -1044525330);
_local2 = ff(_local2, _local3, _local4, _local5, _local10[(_local12 + 4)], 7, -176418897);
_local5 = ff(_local5, _local2, _local3, _local4, _local10[(_local12 + 5)], 12, 1200080426);
_local4 = ff(_local4, _local5, _local2, _local3, _local10[(_local12 + 6)], 17, -1473231341);
_local3 = ff(_local3, _local4, _local5, _local2, _local10[(_local12 + 7)], 22, -45705983);
_local2 = ff(_local2, _local3, _local4, _local5, _local10[(_local12 + 8)], 7, 1770035416);
_local5 = ff(_local5, _local2, _local3, _local4, _local10[(_local12 + 9)], 12, -1958414417);
_local4 = ff(_local4, _local5, _local2, _local3, _local10[(_local12 + 10)], 17, -42063);
_local3 = ff(_local3, _local4, _local5, _local2, _local10[(_local12 + 11)], 22, -1990404162);
_local2 = ff(_local2, _local3, _local4, _local5, _local10[(_local12 + 12)], 7, 1804603682);
_local5 = ff(_local5, _local2, _local3, _local4, _local10[(_local12 + 13)], 12, -40341101);
_local4 = ff(_local4, _local5, _local2, _local3, _local10[(_local12 + 14)], 17, -1502002290);
_local3 = ff(_local3, _local4, _local5, _local2, _local10[(_local12 + 15)], 22, 1236535329);
_local2 = gg(_local2, _local3, _local4, _local5, _local10[(_local12 + 1)], 5, -165796510);
_local5 = gg(_local5, _local2, _local3, _local4, _local10[(_local12 + 6)], 9, -1069501632);
_local4 = gg(_local4, _local5, _local2, _local3, _local10[(_local12 + 11)], 14, 643717713);
_local3 = gg(_local3, _local4, _local5, _local2, _local10[(_local12 + 0)], 20, -373897302);
_local2 = gg(_local2, _local3, _local4, _local5, _local10[(_local12 + 5)], 5, -701558691);
_local5 = gg(_local5, _local2, _local3, _local4, _local10[(_local12 + 10)], 9, 38016083);
_local4 = gg(_local4, _local5, _local2, _local3, _local10[(_local12 + 15)], 14, -660478335);
_local3 = gg(_local3, _local4, _local5, _local2, _local10[(_local12 + 4)], 20, -405537848);
_local2 = gg(_local2, _local3, _local4, _local5, _local10[(_local12 + 9)], 5, 568446438);
_local5 = gg(_local5, _local2, _local3, _local4, _local10[(_local12 + 14)], 9, -1019803690);
_local4 = gg(_local4, _local5, _local2, _local3, _local10[(_local12 + 3)], 14, -187363961);
_local3 = gg(_local3, _local4, _local5, _local2, _local10[(_local12 + 8)], 20, 1163531501);
_local2 = gg(_local2, _local3, _local4, _local5, _local10[(_local12 + 13)], 5, -1444681467);
_local5 = gg(_local5, _local2, _local3, _local4, _local10[(_local12 + 2)], 9, -51403784);
_local4 = gg(_local4, _local5, _local2, _local3, _local10[(_local12 + 7)], 14, 1735328473);
_local3 = gg(_local3, _local4, _local5, _local2, _local10[(_local12 + 12)], 20, -1926607734);
_local2 = hh(_local2, _local3, _local4, _local5, _local10[(_local12 + 5)], 4, -378558);
_local5 = hh(_local5, _local2, _local3, _local4, _local10[(_local12 + 8)], 11, -2022574463);
_local4 = hh(_local4, _local5, _local2, _local3, _local10[(_local12 + 11)], 16, 1839030562);
_local3 = hh(_local3, _local4, _local5, _local2, _local10[(_local12 + 14)], 23, -35309556);
_local2 = hh(_local2, _local3, _local4, _local5, _local10[(_local12 + 1)], 4, -1530992060);
_local5 = hh(_local5, _local2, _local3, _local4, _local10[(_local12 + 4)], 11, 1272893353);
_local4 = hh(_local4, _local5, _local2, _local3, _local10[(_local12 + 7)], 16, -155497632);
_local3 = hh(_local3, _local4, _local5, _local2, _local10[(_local12 + 10)], 23, -1094730640);
_local2 = hh(_local2, _local3, _local4, _local5, _local10[(_local12 + 13)], 4, 681279174);
_local5 = hh(_local5, _local2, _local3, _local4, _local10[(_local12 + 0)], 11, -358537222);
_local4 = hh(_local4, _local5, _local2, _local3, _local10[(_local12 + 3)], 16, -722521979);
_local3 = hh(_local3, _local4, _local5, _local2, _local10[(_local12 + 6)], 23, 76029189);
_local2 = hh(_local2, _local3, _local4, _local5, _local10[(_local12 + 9)], 4, -640364487);
_local5 = hh(_local5, _local2, _local3, _local4, _local10[(_local12 + 12)], 11, -421815835);
_local4 = hh(_local4, _local5, _local2, _local3, _local10[(_local12 + 15)], 16, 530742520);
_local3 = hh(_local3, _local4, _local5, _local2, _local10[(_local12 + 2)], 23, -995338651);
_local2 = ii(_local2, _local3, _local4, _local5, _local10[(_local12 + 0)], 6, -198630844);
_local5 = ii(_local5, _local2, _local3, _local4, _local10[(_local12 + 7)], 10, 1126891415);
_local4 = ii(_local4, _local5, _local2, _local3, _local10[(_local12 + 14)], 15, -1416354905);
_local3 = ii(_local3, _local4, _local5, _local2, _local10[(_local12 + 5)], 21, -57434055);
_local2 = ii(_local2, _local3, _local4, _local5, _local10[(_local12 + 12)], 6, 1700485571);
_local5 = ii(_local5, _local2, _local3, _local4, _local10[(_local12 + 3)], 10, -1894986606);
_local4 = ii(_local4, _local5, _local2, _local3, _local10[(_local12 + 10)], 15, -1051523);
_local3 = ii(_local3, _local4, _local5, _local2, _local10[(_local12 + 1)], 21, -2054922799);
_local2 = ii(_local2, _local3, _local4, _local5, _local10[(_local12 + 8)], 6, 1873313359);
_local5 = ii(_local5, _local2, _local3, _local4, _local10[(_local12 + 15)], 10, -30611744);
_local4 = ii(_local4, _local5, _local2, _local3, _local10[(_local12 + 6)], 15, -1560198380);
_local3 = ii(_local3, _local4, _local5, _local2, _local10[(_local12 + 13)], 21, 1309151649);
_local2 = ii(_local2, _local3, _local4, _local5, _local10[(_local12 + 4)], 6, -145523070);
_local5 = ii(_local5, _local2, _local3, _local4, _local10[(_local12 + 11)], 10, -1120210379);
_local4 = ii(_local4, _local5, _local2, _local3, _local10[(_local12 + 2)], 15, 718787259);
_local3 = ii(_local3, _local4, _local5, _local2, _local10[(_local12 + 9)], 21, -343485551);
_local2 = (_local2 + _local6);
_local3 = (_local3 + _local7);
_local4 = (_local4 + _local8);
_local5 = (_local5 + _local9);
_local12 = (_local12 + 16);
};
return ((((IntUtil.toHex(_local2) + IntUtil.toHex(_local3)) + IntUtil.toHex(_local4)) + IntUtil.toHex(_local5)));
}
private static function gg(_arg1:int, _arg2:int, _arg3:int, _arg4:int, _arg5:int, _arg6:int, _arg7:int):int{
return (transform(g, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7));
}
}
}//package com.adobe.crypto
Section 2
//IntUtil (com.adobe.utils.IntUtil)
package com.adobe.utils {
public class IntUtil {
private static var hexChars:String = "0123456789abcdef";
public static function toHex(_arg1:int, _arg2:Boolean=false):String{
var _local3:String;
var _local4:int;
var _local5:int;
_local3 = "";
if (_arg2){
_local4 = 0;
while (_local4 < 4) {
_local3 = (_local3 + (hexChars.charAt(((_arg1 >> (((3 - _local4) * 8) + 4)) & 15)) + hexChars.charAt(((_arg1 >> ((3 - _local4) * 8)) & 15))));
_local4++;
};
} else {
_local5 = 0;
while (_local5 < 4) {
_local3 = (_local3 + (hexChars.charAt(((_arg1 >> ((_local5 * 8) + 4)) & 15)) + hexChars.charAt(((_arg1 >> (_local5 * 8)) & 15))));
_local5++;
};
};
return (_local3);
}
public static function ror(_arg1:int, _arg2:int):uint{
var _local3:int;
_local3 = (32 - _arg2);
return (((_arg1 << _local3) | (_arg1 >>> (32 - _local3))));
}
public static function rol(_arg1:int, _arg2:int):int{
return (((_arg1 << _arg2) | (_arg1 >>> (32 - _arg2))));
}
}
}//package com.adobe.utils
Section 3
//Tracker (com.memecounter.Tracker)
package com.memecounter {
import flash.display.*;
import flash.events.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
public class Tracker {
private static var ori_dom:String;
private static var lurl:String;
private static var _isReady:Boolean = false;
public static var a:uint = 0;
public static var root:DisplayObject;
public static var c:uint;
public static var d:String = "";
private static var _isInited:Boolean = false;
public static var fpv:String = "";
private static var l:Loader;
private static var tracker:MovieClip;
public static var da:Array = ["distralytics.com", "distralytics.co.uk"];
private static function loadError(_arg1:Event):void{
a++;
lc();
}
public static function init(_arg1:uint, _arg2:DisplayObject):void{
var _local3:uint;
if (!_isInited){
_isInited = true;
c = _arg1;
root = _arg2;
_local3 = 0;
while (_local3 < da.length) {
Security.allowDomain(da[_local3], ((c + ".c.") + da[_local3]), ("*." + da[_local3]));
_local3++;
};
ori_dom = (root.loaderInfo.parameters.hasOwnProperty("ori_dom")) ? root.loaderInfo.parameters.ori_dom : "";
d = ((ori_dom)!="") ? ori_dom : ((root.loaderInfo.loaderURL.split("/")[0].indexOf("http"))==-1) ? "Local" : root.loaderInfo.loaderURL.split("/")[2].split("?")[0];
fpv = Capabilities.version.split(" ")[1].split(",")[0];
lurl = ((((((((("/control/tracking/trackerAS3.swf" + "?c=") + c) + "&r=") + Math.floor((Math.random() * 10000000000))) + "&d=") + d) + "&p=") + fpv) + "&as=3");
l = new Loader();
l.contentLoaderInfo.addEventListener(Event.INIT, loadComplete);
l.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, loadError);
lc();
};
}
public static function get isReady():Boolean{
return (isReady);
}
public static function kvClick(_arg1:uint):void{
if (_isReady){
trace("CLICKTHROUGH SENT");
tracker.kvClick(_arg1);
};
}
public static function kvCountry():String{
if (_isReady){
return (tracker.kvCountry());
};
return ("");
}
public static function kvEvent(_arg1:uint):void{
if (_isReady){
trace("EVENT SENT");
tracker.kvEvent(_arg1);
};
}
private static function lc():void{
var _local1:String;
_local1 = (((("http://" + c) + ".c.") + da[(a % da.length)]) + lurl);
Security.allowDomain(_local1);
l.load(new URLRequest(_local1));
}
private static function loadComplete(_arg1:Event):void{
tracker = _arg1.target.content;
tracker.init(getDefinitionByName("com.memecounter.Tracker"), root);
_isReady = true;
}
}
}//package com.memecounter
Section 4
//KeyboardControls (console.control.KeyboardControls)
package console.control {
import flash.display.*;
import flash.events.*;
public class KeyboardControls extends Sprite {
public var _keyUp:int;
public var _keyDown:int;
public var _debug:Boolean;
public var _keysDown_array:Array;
public static const SINGLE_KEY_UP:String = "Key Up";
public static const MULTI_KEYS_DOWN:String = "Multi Keys Down";
public static const SINGLE_KEY_DOWN:String = "Key DOWN";
public function KeyboardControls(_arg1:Boolean):void{
_keysDown_array = new Array();
super();
_debug = _arg1;
addEventListener(Event.ADDED_TO_STAGE, addKeyListeners);
}
public function fnKeyUp(_arg1:KeyboardEvent):void{
var _local2:*;
var _local3:*;
_local2 = _arg1.keyCode;
_local3 = 0;
while (_local3 < _keysDown_array.length) {
if (_keysDown_array[_local3] == _local2){
_keyUp = _local2;
_keysDown_array.splice(_local3, 1);
dispatchEvent(new Event(KeyboardControls.SINGLE_KEY_UP));
};
_local3++;
};
}
public function dispatchMultiKeyEvent(_arg1:Event){
if (_keysDown_array.length > 0){
dispatchEvent(new Event(KeyboardControls.MULTI_KEYS_DOWN));
};
}
public function fnKeyDown(_arg1:KeyboardEvent):void{
var _local2:*;
var _local3:*;
var _local4:*;
_local2 = _arg1.keyCode;
_local3 = false;
_local4 = 0;
while (_local4 < _keysDown_array.length) {
if (_keysDown_array[_local4] == _local2){
_local3 = true;
break;
};
_local4++;
};
if (!_local3){
if (_debug){
trace(("KEY PRESS CODE = " + _local2));
};
_keyDown = _local2;
_keysDown_array.push(_arg1.keyCode);
dispatchEvent(new Event(KeyboardControls.SINGLE_KEY_DOWN));
};
}
public function addKeyListeners(_arg1:Event):void{
this.stage.addEventListener(KeyboardEvent.KEY_UP, fnKeyUp);
this.stage.addEventListener(KeyboardEvent.KEY_DOWN, fnKeyDown);
addEventListener(Event.ENTER_FRAME, dispatchMultiKeyEvent);
}
}
}//package console.control
Section 5
//TileBasedWorld (console.engines.TileBasedWorld)
package console.engines {
import flash.display.*;
public class TileBasedWorld extends Sprite {
public var _tile_array:Array;
public function TileBasedWorld(_arg1:Number, _arg2:Number, _arg3:uint, _arg4:uint, _arg5:Boolean){
var _local6:*;
var _local7:Array;
var _local8:*;
var _local9:Object;
var _local10:*;
var _local11:*;
_tile_array = new Array();
super();
_local6 = 0;
while (_local6 < _arg3) {
_local7 = new Array();
_local8 = 0;
while (_local8 < _arg4) {
_local9 = new Object();
_local10 = (_arg1 * _local8);
_local11 = (_arg2 * _local6);
_local9.ID = (((_local6 * _arg4) + _local8) + 1);
_local9.x = _local10;
_local9.y = _local11;
_local7.push(_local9);
if (_arg5){
drawTile(_local10, _local11, _arg1, _arg2);
};
_local8++;
};
_tile_array.push(_local7);
_local6++;
};
trace(_tile_array);
}
public function drawTile(_arg1, _arg2, _arg3, _arg4){
var _local5:int;
var _local6:uint;
var _local7:Shape;
_local5 = 1;
_local6 = 0;
_local7 = new Shape();
_local7.graphics.lineStyle(_local5, _local6);
_local7.graphics.drawRect(0, 0, _arg3, _arg4);
_local7.x = _arg1;
_local7.y = _arg2;
addChild(_local7);
}
}
}//package console.engines
Section 6
//Cache (console.loaders.Cache)
package console.loaders {
public class Cache {
public function returnAntiCacheURL(_arg1:String):String{
var _local2:*;
var _local3:*;
var _local4:*;
_local2 = ("rand=" + Math.ceil((Math.random() * 1000000)));
_local3 = "?";
_local4 = 0;
while (_local4 < _arg1.length) {
if (_arg1.charAt(_local4) == "?"){
_local3 = "&";
break;
};
_local4++;
};
_arg1 = (_arg1 + (_local3 + _local2));
return (_arg1);
}
}
}//package console.loaders
Section 7
//SendReceiveData (console.loaders.SendReceiveData)
package console.loaders {
import flash.events.*;
import flash.net.*;
public class SendReceiveData extends EventDispatcher {
public var _loader:URLLoader;
public var _errorMessage:String;
public static const DATA_LOADED:String = "Data Loaded";
public static const DATA_ERROR:String = "Data Error";
public function onError(_arg1:IOErrorEvent){
trace(("ERROR = " + _arg1.text));
trace("POSSIBLE PROBLEMS - crossdomain.xml missing");
_errorMessage = _arg1.text;
dispatchEvent(new Event(SendReceiveData.DATA_ERROR));
}
public function sendData(_arg1:String, _arg2:URLVariables):void{
var _local3:URLRequest;
_local3 = new URLRequest(_arg1);
_local3.data = _arg2;
_local3.method = URLRequestMethod.POST;
_loader = new URLLoader();
_loader.addEventListener(Event.COMPLETE, onComplete);
_loader.addEventListener(IOErrorEvent.IO_ERROR, onError);
_loader.load(_local3);
}
public function onComplete(_arg1:Event){
dispatchEvent(new Event(SendReceiveData.DATA_LOADED));
}
}
}//package console.loaders
Section 8
//URLPreload (console.loaders.URLPreload)
package console.loaders {
import flash.events.*;
import flash.net.*;
public class URLPreload extends EventDispatcher {
public var _progressBytesTotal:uint;
public var _progress:uint;
private var _URL:String;
public var _progressBytesPerc:uint;
public var _urlLoader:URLLoader;// = null
public var _progressBytesLoaded:uint;
private var _retry:uint;// = 0
private var _antiCache:Boolean;
public static const LOAD_COMPLETE:String = "Complete";
public static const LOAD_PROGRESS:String = "Load Progress";
public static const LOAD_ERROR:String = "Error";
public function URLPreload(_arg1:String, _arg2:Boolean){
_retry = 0;
_urlLoader = null;
super();
_URL = _arg1;
_antiCache = _arg2;
setupPreload(_URL, _antiCache);
}
private function onProgress(_arg1:ProgressEvent):void{
_progressBytesLoaded = _arg1.target.bytesLoaded;
_progressBytesTotal = _arg1.target.bytesTotal;
_progressBytesPerc = ((_arg1.target.bytesLoaded / _arg1.target.bytesTotal) * 100);
dispatchEvent(new Event(URLPreload.LOAD_PROGRESS));
}
public function setupPreload(_arg1:String, _arg2:Boolean){
var _local3:URLRequest;
var _local4:*;
if (_arg2){
_local4 = new Cache();
_arg1 = _local4.returnAntiCacheURL(_arg1);
trace(("URL: " + _arg1));
};
_local3 = new URLRequest(_arg1);
_local3.method = URLRequestMethod.POST;
_urlLoader = new URLLoader();
_urlLoader.load(_local3);
_urlLoader.addEventListener(Event.COMPLETE, onComplete);
_urlLoader.addEventListener(ProgressEvent.PROGRESS, onProgress);
_urlLoader.addEventListener(IOErrorEvent.IO_ERROR, onError);
}
private function onError(_arg1:IOErrorEvent):void{
if (_retry > 10){
dispatchEvent(new Event(URLPreload.LOAD_ERROR));
} else {
_retry++;
setupPreload(_URL, _antiCache);
};
}
private function onComplete(_arg1:Event):void{
dispatchEvent(new Event(URLPreload.LOAD_COMPLETE));
}
}
}//package console.loaders
Section 9
//ConvertDegrees (console.math.ConvertDegrees)
package console.math {
public class ConvertDegrees {
public function convertToDegree(_arg1:Number){
var _local2:*;
_local2 = ((_arg1 * 180) / Math.PI);
return (_local2);
}
public function convertToRadian(_arg1:Number){
var _local2:*;
_local2 = ((_arg1 * Math.PI) / 180);
return (_local2);
}
}
}//package console.math
Section 10
//Pythag (console.math.Pythag)
package console.math {
public class Pythag {
public function findOppositeLength(_arg1, _arg2):Number{
var _local3:*;
_local3 = (Math.sin(_arg1) * _arg2);
return (_local3);
}
public function findNewXY(_arg1, _arg2, _arg3, _arg4):Array{
var _local5:*;
var _local6:*;
var _local7:Array;
var _local8:*;
var _local9:*;
_local5 = findAdjascentLength(_arg3, _arg4);
_local6 = findOppositeLength(_arg3, _arg4);
_local7 = new Array();
_local8 = (_arg1 + _local5);
_local9 = (_arg2 + _local6);
_local7[0] = _local8;
_local7[1] = _local9;
return (_local7);
}
public function findHypotenuseLength(_arg1, _arg2:Number){
var _local3:*;
_local3 = Math.sqrt((Math.pow(_arg1, 2) + Math.pow(_arg2, 2)));
return (_local3);
}
public function findAngle(_arg1, _arg2, _arg3, _arg4){
var _local5:Number;
var _local6:Number;
var _local7:Number;
_local5 = (_arg1 - _arg3);
_local6 = (_arg2 - _arg4);
_local7 = Math.atan2(_local6, _local5);
return (_local7);
}
public function findAdjascentLength(_arg1, _arg2):Number{
var _local3:*;
_local3 = (Math.cos(_arg1) * _arg2);
return (_local3);
}
}
}//package console.math
Section 11
//ParseTOKEN (console.parsers.ParseTOKEN)
package console.parsers {
import flash.events.*;
import flash.net.*;
import com.adobe.crypto.*;
import console.loaders.*;
public class ParseTOKEN extends EventDispatcher {
public var _loadToken;
public var _loadedVars:URLVariables;
public var _token:String;
private var _MD5;
public static const TOKEN_GENERATED:String = "Token Generated";
public function ParseTOKEN(_arg1){
var _local2:URLVariables;
_MD5 = new MD5();
super();
_local2 = new URLVariables();
_local2.action = "token_generate";
_loadToken = new SendReceiveData();
_loadToken.sendData(_arg1, _local2);
_loadToken.addEventListener(SendReceiveData.DATA_LOADED, loadToken);
}
public function loadToken(_arg1:Event):void{
var _local2:URLLoader;
var _local3:String;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
_local2 = URLLoader(_arg1.target._loader);
_loadedVars = new URLVariables(_local2.data);
_token = _loadedVars.token;
_local3 = _token.substr(28, 8);
_local4 = MD5.hash(_local3);
_local5 = Math.ceil((Math.random() * 1000000));
_local6 = Math.ceil((Math.random() * 1000000));
_local7 = Math.ceil((Math.random() * 1000000));
_token = (((MD5.hash(_local5) + MD5.hash(_local6)) + _local4) + MD5.hash(_local7));
trace(_token);
dispatchEvent(new Event(ParseTOKEN.TOKEN_GENERATED));
}
}
}//package console.parsers
Section 12
//ParseXML (console.parsers.ParseXML)
package console.parsers {
import flash.events.*;
import flash.net.*;
import console.loaders.*;
public class ParseXML extends EventDispatcher {
public var _progressBytesPerc:uint;// = 0
public var _progressBytesTotal:uint;// = 0
public var _xmlDoc:XML;
public var _tag:String;// = null
private var _urlLoader:URLLoader;
public var _progressBytesLoaded:uint;// = 0
public var _loaded:Boolean;// = false
public var _preloader:URLPreload;
public static const XML_FAILED:String = "XMLFailed";
public static const XML_PROGRESS:String = "XMLProgress";
public static const XML_LOADED:String = "XMLLoaded";
public function ParseXML(){
_tag = null;
_progressBytesLoaded = 0;
_progressBytesTotal = 0;
_progressBytesPerc = 0;
_loaded = false;
super();
}
public function checkProgress(_arg1:Event):void{
_progressBytesLoaded = _arg1.target._progressBytesLoaded;
_progressBytesTotal = _arg1.target._progressBytesTotal;
_progressBytesPerc = _arg1.target._progressBytesPerc;
dispatchEvent(new Event(ParseXML.XML_PROGRESS));
}
public function parseURL(_arg1:String, _arg2:Boolean):void{
_preloader = new URLPreload(_arg1, _arg2);
_preloader.addEventListener(URLPreload.LOAD_PROGRESS, checkProgress);
_preloader.addEventListener(URLPreload.LOAD_COMPLETE, completeLoad);
}
public function completeLoad(_arg1:Event):void{
_xmlDoc = new XML(_arg1.target._urlLoader.data);
dispatchEvent(new Event(ParseXML.XML_LOADED));
}
}
}//package console.parsers
Section 13
//MochiBot (console.trackers.MochiBot)
package console.trackers {
import flash.display.*;
import flash.net.*;
import flash.system.*;
public dynamic class MochiBot extends Sprite {
public static function track(_arg1:Sprite, _arg2:String):MochiBot{
var _local3:MochiBot;
var _local4:String;
var _local5:URLVariables;
var _local6:String;
var _local7:URLRequest;
var _local8:Loader;
trace("RUN MOCHIBOT TRACKING");
if (Security.sandboxType == "localWithFile"){
return (null);
};
_local3 = new (MochiBot);
_arg1.addChild(_local3);
Security.allowDomain("*");
Security.allowInsecureDomain("*");
_local4 = "http://core.mochibot.com/my/core.swf";
_local5 = new URLVariables();
_local5["sb"] = Security.sandboxType;
_local5["v"] = Capabilities.version;
_local5["swfid"] = _arg2;
_local5["mv"] = "8";
_local5["fv"] = "9";
_local6 = _local3.root.loaderInfo.loaderURL;
if (_local6.indexOf("http") == 0){
_local5["url"] = _local6;
} else {
_local5["url"] = "local";
};
_local7 = new URLRequest(_local4);
_local7.contentType = "application/x-www-form-urlencoded";
_local7.method = URLRequestMethod.POST;
_local7.data = _local5;
_local8 = new Loader();
_local3.addChild(_local8);
_local8.load(_local7);
return (_local3);
}
}
}//package console.trackers
Section 14
//Back (fl.transitions.easing.Back)
package fl.transitions.easing {
public class Back {
public static function easeOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number=0):Number{
if (!_arg5){
_arg5 = 1.70158;
};
_arg1 = ((_arg1 / _arg4) - 1);
return (((_arg3 * (((_arg1 * _arg1) * (((_arg5 + 1) * _arg1) + _arg5)) + 1)) + _arg2));
}
public static function easeIn(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number=0):Number{
if (!_arg5){
_arg5 = 1.70158;
};
_arg1 = (_arg1 / _arg4);
return (((((_arg3 * _arg1) * _arg1) * (((_arg5 + 1) * _arg1) - _arg5)) + _arg2));
}
public static function easeInOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number=0):Number{
if (!_arg5){
_arg5 = 1.70158;
};
_arg1 = (_arg1 / (_arg4 / 2));
if (_arg1 < 1){
_arg5 = (_arg5 * 1.525);
return ((((_arg3 / 2) * ((_arg1 * _arg1) * (((_arg5 + 1) * _arg1) - _arg5))) + _arg2));
};
_arg1 = (_arg1 - 2);
_arg5 = (_arg5 * 1.525);
return ((((_arg3 / 2) * (((_arg1 * _arg1) * (((_arg5 + 1) * _arg1) + _arg5)) + 2)) + _arg2));
}
}
}//package fl.transitions.easing
Section 15
//Bounce (fl.transitions.easing.Bounce)
package fl.transitions.easing {
public class Bounce {
public static function easeOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (_arg1 / _arg4);
if (_arg1 < (1 / 2.75)){
return (((_arg3 * ((7.5625 * _arg1) * _arg1)) + _arg2));
};
if (_arg1 < (2 / 2.75)){
_arg1 = (_arg1 - (1.5 / 2.75));
return (((_arg3 * (((7.5625 * _arg1) * _arg1) + 0.75)) + _arg2));
};
if (_arg1 < (2.5 / 2.75)){
_arg1 = (_arg1 - (2.25 / 2.75));
return (((_arg3 * (((7.5625 * _arg1) * _arg1) + 0.9375)) + _arg2));
};
_arg1 = (_arg1 - (2.625 / 2.75));
return (((_arg3 * (((7.5625 * _arg1) * _arg1) + 0.984375)) + _arg2));
}
public static function easeIn(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return (((_arg3 - easeOut((_arg4 - _arg1), 0, _arg3, _arg4)) + _arg2));
}
public static function easeInOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
if (_arg1 < (_arg4 / 2)){
return (((easeIn((_arg1 * 2), 0, _arg3, _arg4) * 0.5) + _arg2));
};
return ((((easeOut(((_arg1 * 2) - _arg4), 0, _arg3, _arg4) * 0.5) + (_arg3 * 0.5)) + _arg2));
}
}
}//package fl.transitions.easing
Section 16
//Regular (fl.transitions.easing.Regular)
package fl.transitions.easing {
public class Regular {
public static function easeOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (_arg1 / _arg4);
return ((((-(_arg3) * _arg1) * (_arg1 - 2)) + _arg2));
}
public static function easeIn(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (_arg1 / _arg4);
return ((((_arg3 * _arg1) * _arg1) + _arg2));
}
public static function easeInOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (_arg1 / (_arg4 / 2));
if (_arg1 < 1){
return (((((_arg3 / 2) * _arg1) * _arg1) + _arg2));
};
--_arg1;
return ((((-(_arg3) / 2) * ((_arg1 * (_arg1 - 2)) - 1)) + _arg2));
}
}
}//package fl.transitions.easing
Section 17
//Tween (fl.transitions.Tween)
package fl.transitions {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
public class Tween extends EventDispatcher {
private var _position:Number;// = NAN
public var prevTime:Number;// = NAN
public var prevPos:Number;// = NAN
public var isPlaying:Boolean;// = false
public var begin:Number;// = NAN
private var _fps:Number;// = NAN
private var _time:Number;// = NAN
public var change:Number;// = NAN
private var _finish:Number;// = NAN
public var looping:Boolean;// = false
private var _intervalID:uint;// = 0
public var func:Function;
private var _timer:Timer;// = null
private var _startTime:Number;// = NAN
public var prop:String;// = ""
private var _duration:Number;// = NAN
public var obj:Object;// = null
public var useSeconds:Boolean;// = false
protected static var _mc:MovieClip = new MovieClip();
public function Tween(_arg1:Object, _arg2:String, _arg3:Function, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Boolean=false){
isPlaying = false;
obj = null;
prop = "";
func = function (_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return ((((_arg3 * _arg1) / _arg4) + _arg2));
};
begin = NaN;
change = NaN;
useSeconds = false;
prevTime = NaN;
prevPos = NaN;
looping = false;
_duration = NaN;
_time = NaN;
_fps = NaN;
_position = NaN;
_startTime = NaN;
_intervalID = 0;
_finish = NaN;
_timer = null;
super();
if (!arguments.length){
return;
};
this.obj = _arg1;
this.prop = _arg2;
this.begin = _arg4;
this.position = _arg4;
this.duration = _arg6;
this.useSeconds = _arg7;
if ((_arg3 is Function)){
this.func = _arg3;
};
this.finish = _arg5;
this._timer = new Timer(100);
this.start();
}
public function continueTo(_arg1:Number, _arg2:Number):void{
this.begin = this.position;
this.finish = _arg1;
if (!isNaN(_arg2)){
this.duration = _arg2;
};
this.start();
}
public function stop():void{
this.stopEnterFrame();
this.dispatchEvent(new TweenEvent(TweenEvent.MOTION_STOP, this._time, this._position));
}
private function fixTime():void{
if (this.useSeconds){
this._startTime = (getTimer() - (this._time * 1000));
};
}
public function set FPS(_arg1:Number):void{
var _local2:Boolean;
_local2 = this.isPlaying;
this.stopEnterFrame();
this._fps = _arg1;
if (_local2){
this.startEnterFrame();
};
}
public function get finish():Number{
return ((this.begin + this.change));
}
public function get duration():Number{
return (this._duration);
}
protected function startEnterFrame():void{
var _local1:Number;
if (isNaN(this._fps)){
_mc.addEventListener(Event.ENTER_FRAME, this.onEnterFrame, false, 0, true);
} else {
_local1 = (1000 / this._fps);
this._timer.delay = _local1;
this._timer.addEventListener(TimerEvent.TIMER, this.timerHandler, false, 0, true);
this._timer.start();
};
this.isPlaying = true;
}
public function set time(_arg1:Number):void{
this.prevTime = this._time;
if (_arg1 > this.duration){
if (this.looping){
this.rewind((_arg1 - this._duration));
this.update();
this.dispatchEvent(new TweenEvent(TweenEvent.MOTION_LOOP, this._time, this._position));
} else {
if (this.useSeconds){
this._time = this._duration;
this.update();
};
this.stop();
this.dispatchEvent(new TweenEvent(TweenEvent.MOTION_FINISH, this._time, this._position));
};
} else {
if (_arg1 < 0){
this.rewind();
this.update();
} else {
this._time = _arg1;
this.update();
};
};
}
protected function stopEnterFrame():void{
if (isNaN(this._fps)){
_mc.removeEventListener(Event.ENTER_FRAME, this.onEnterFrame);
} else {
this._timer.stop();
};
this.isPlaying = false;
}
public function getPosition(_arg1:Number=NaN):Number{
if (isNaN(_arg1)){
_arg1 = this._time;
};
return (this.func(_arg1, this.begin, this.change, this._duration));
}
public function set finish(_arg1:Number):void{
this.change = (_arg1 - this.begin);
}
public function set duration(_arg1:Number):void{
this._duration = ((_arg1)<=0) ? Infinity : _arg1;
}
public function setPosition(_arg1:Number):void{
this.prevPos = this._position;
if (this.prop.length){
this.obj[this.prop] = (this._position = _arg1);
};
this.dispatchEvent(new TweenEvent(TweenEvent.MOTION_CHANGE, this._time, this._position));
}
public function resume():void{
this.fixTime();
this.startEnterFrame();
this.dispatchEvent(new TweenEvent(TweenEvent.MOTION_RESUME, this._time, this._position));
}
public function fforward():void{
this.time = this._duration;
this.fixTime();
}
protected function onEnterFrame(_arg1:Event):void{
this.nextFrame();
}
public function get position():Number{
return (this.getPosition(this._time));
}
public function yoyo():void{
this.continueTo(this.begin, this.time);
}
public function nextFrame():void{
if (this.useSeconds){
this.time = ((getTimer() - this._startTime) / 1000);
} else {
this.time = (this._time + 1);
};
}
protected function timerHandler(_arg1:TimerEvent):void{
this.nextFrame();
_arg1.updateAfterEvent();
}
public function get FPS():Number{
return (this._fps);
}
public function rewind(_arg1:Number=0):void{
this._time = _arg1;
this.fixTime();
this.update();
}
public function set position(_arg1:Number):void{
this.setPosition(_arg1);
}
public function get time():Number{
return (this._time);
}
private function update():void{
this.setPosition(this.getPosition(this._time));
}
public function start():void{
this.rewind();
this.startEnterFrame();
this.dispatchEvent(new TweenEvent(TweenEvent.MOTION_START, this._time, this._position));
}
public function prevFrame():void{
if (!this.useSeconds){
this.time = (this._time - 1);
};
}
}
}//package fl.transitions
Section 18
//TweenEvent (fl.transitions.TweenEvent)
package fl.transitions {
import flash.events.*;
public class TweenEvent extends Event {
public var time:Number;// = NAN
public var position:Number;// = NAN
public static const MOTION_START:String = "motionStart";
public static const MOTION_STOP:String = "motionStop";
public static const MOTION_LOOP:String = "motionLoop";
public static const MOTION_CHANGE:String = "motionChange";
public static const MOTION_FINISH:String = "motionFinish";
public static const MOTION_RESUME:String = "motionResume";
public function TweenEvent(_arg1:String, _arg2:Number, _arg3:Number, _arg4:Boolean=false, _arg5:Boolean=false){
time = NaN;
position = NaN;
super(_arg1, _arg4, _arg5);
this.time = _arg2;
this.position = _arg3;
}
override public function clone():Event{
return (new TweenEvent(this.type, this.time, this.position, this.bubbles, this.cancelable));
}
}
}//package fl.transitions
Section 19
//DynamicButton (koko.DynamicButton)
package koko {
import flash.display.*;
import flash.events.*;
public class DynamicButton extends MovieClip {
public function DynamicButton(){
this.stop();
this.buttonMode = true;
this.mouseChildren = false;
this.addEventListener(MouseEvent.MOUSE_OVER, rOver);
this.addEventListener(MouseEvent.MOUSE_OUT, rOut);
}
public function rOver(_arg1:MouseEvent){
gotoAndPlay("over");
}
public function rOut(_arg1:MouseEvent){
gotoAndPlay("out");
}
}
}//package koko
Section 20
//cloud_31 (umbelbee_fla.cloud_31)
package umbelbee_fla {
import flash.display.*;
public dynamic class cloud_31 extends MovieClip {
public function cloud_31(){
addFrameScript(4008, frame4009);
}
function frame4009(){
gotoAndPlay(1);
}
}
}//package umbelbee_fla
Section 21
//kokoIntro_24 (umbelbee_fla.kokoIntro_24)
package umbelbee_fla {
import flash.display.*;
import flash.events.*;
import flash.net.*;
public dynamic class kokoIntro_24 extends MovieClip {
public var koko_btn:SimpleButton;
public function kokoIntro_24(){
addFrameScript(60, frame61, 116, frame117);
}
public function kokoDigital(_arg1:MouseEvent){
navigateToURL(new URLRequest("http://www.kokodigital.co.uk"), "_blank");
}
function frame117(){
MovieClip(parent).play();
stop();
}
function frame61(){
koko_btn.addEventListener(MouseEvent.MOUSE_UP, kokoDigital);
}
}
}//package umbelbee_fla
Section 22
//KokoLeaf_28 (umbelbee_fla.KokoLeaf_28)
package umbelbee_fla {
import flash.display.*;
public dynamic class KokoLeaf_28 extends MovieClip {
public function KokoLeaf_28(){
addFrameScript(77, frame78);
}
function frame78(){
stop();
}
}
}//package umbelbee_fla
Section 23
//KokoLeafUp_25 (umbelbee_fla.KokoLeafUp_25)
package umbelbee_fla {
import flash.display.*;
public dynamic class KokoLeafUp_25 extends MovieClip {
public function KokoLeafUp_25(){
addFrameScript(84, frame85);
}
function frame85(){
stop();
}
}
}//package umbelbee_fla
Section 24
//spriteHolder_4 (umbelbee_fla.spriteHolder_4)
package umbelbee_fla {
import flash.display.*;
public dynamic class spriteHolder_4 extends MovieClip {
public function spriteHolder_4(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package umbelbee_fla
Section 25
//arrowPointer (arrowPointer)
package {
import flash.display.*;
public dynamic class arrowPointer extends MovieClip {
public function arrowPointer(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 26
//bassLoop_snd (bassLoop_snd)
package {
import flash.media.*;
public dynamic class bassLoop_snd extends Sound {
}
}//package
Section 27
//beeAnimation (beeAnimation)
package {
import flash.display.*;
public dynamic class beeAnimation extends MovieClip {
public var beeA:MovieClip;
}
}//package
Section 28
//borderMC (borderMC)
package {
import flash.display.*;
public dynamic class borderMC extends MovieClip {
public var visitUmbel1_btn:SimpleButton;
}
}//package
Section 29
//bumbleBeeMC (bumbleBeeMC)
package {
import flash.display.*;
public dynamic class bumbleBeeMC extends MovieClip {
}
}//package
Section 30
//collect_snd (collect_snd)
package {
import flash.media.*;
public dynamic class collect_snd extends Sound {
}
}//package
Section 31
//cs_frame_button_koko_ (cs_frame_button_koko_)
package {
import koko.*;
public dynamic class cs_frame_button_koko_ extends DynamicButton {
public function cs_frame_button_koko_(){
addFrameScript(0, frame1, 5, frame6);
}
function frame6(){
stop();
}
function frame1(){
stop();
}
}
}//package
Section 32
//fire_snd (fire_snd)
package {
import flash.media.*;
public dynamic class fire_snd extends Sound {
}
}//package
Section 33
//hexagonMC (hexagonMC)
package {
import flash.display.*;
public dynamic class hexagonMC extends MovieClip {
}
}//package
Section 34
//hexagonMCFlash (hexagonMCFlash)
package {
import flash.display.*;
public dynamic class hexagonMCFlash extends MovieClip {
public function hexagonMCFlash(){
addFrameScript(17, frame18);
}
function frame18(){
stop();
}
}
}//package
Section 35
//highScores_btn (highScores_btn)
package {
import flash.display.*;
public dynamic class highScores_btn extends SimpleButton {
}
}//package
Section 36
//instructions (instructions)
package {
import flash.display.*;
public dynamic class instructions extends MovieClip {
public var next_btn:SimpleButton;
public var playGame1_btn:SimpleButton;
public function instructions(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package
Section 37
//Levels (Levels)
package {
public class Levels {
private var r2:Array;
private var r5:Array;
private var r7:Array;
private var r3:Array;
private var r4:Array;
private var r6:Array;
private var r8:Array;
private var r9:Array;
private var _returnArray;
private var r0:Array;
private var r1:Array;
public function Levels(){
_returnArray = new Array();
super();
}
public function buildLevel7():Array{
r0 = new Array(0, 0, 0, 0, 0, 0, 0, 0);
r1 = new Array(0, 0, 0, 0, 0, 0, 0, 0);
r2 = new Array(0, 0, 0, 1, 0, 0, 0, 0);
r3 = new Array(0, 0, 1, 1, 0, 0, 0, 0);
r4 = new Array(0, 0, 1, 3, 1, 0, 0, 0);
r5 = new Array(0, 1, 4, 1, 1, 0, 0, 0);
r6 = new Array(1, 0, 0, 2, 0, 0, 1, 0);
r7 = new Array(0, 1, 1, 1, 1, 0, 0, 0);
r8 = new Array(0, 1, 0, 1, 0, 1, 0, 0);
r9 = new Array(1, 0, 0, 0, 0, 1, 0, 0);
buildReturnArray();
trace(("RETURN = " + _returnArray[1]));
return (_returnArray);
}
public function buildLevel9():Array{
r0 = new Array(0, 1, 1, 1, 1, 1, 1, 0);
r1 = new Array(0, 0, 0, 2, 0, 0, 0, 0);
r2 = new Array(0, 0, 0, 1, 1, 0, 0, 0);
r3 = new Array(0, 1, 1, 4, 1, 1, 0, 0);
r4 = new Array(0, 1, 0, 0, 0, 0, 1, 0);
r5 = new Array(0, 1, 0, 0, 0, 1, 0, 0);
r6 = new Array(0, 0, 1, 1, 1, 1, 0, 0);
r7 = new Array(0, 0, 1, 3, 1, 0, 0, 0);
r8 = new Array(0, 0, 0, 0, 0, 0, 0, 0);
r9 = new Array(0, 0, 1, 2, 1, 0, 0, 0);
buildReturnArray();
trace(("RETURN = " + _returnArray[1]));
return (_returnArray);
}
private function buildReturnArray(){
_returnArray = null;
_returnArray = new Array();
_returnArray.push(r0);
_returnArray.push(r1);
_returnArray.push(r2);
_returnArray.push(r3);
_returnArray.push(r4);
_returnArray.push(r5);
_returnArray.push(r6);
_returnArray.push(r7);
_returnArray.push(r8);
_returnArray.push(r9);
}
public function buildLevel14():Array{
r0 = new Array(0, 1, 1, 1, 1, 1, 1, 0);
r1 = new Array(1, 0, 0, 3, 0, 0, 1, 0);
r2 = new Array(0, 1, 1, 1, 1, 1, 1, 0);
r3 = new Array(1, 0, 0, 2, 0, 0, 1, 0);
r4 = new Array(0, 1, 1, 1, 1, 1, 1, 0);
r5 = new Array(1, 0, 0, 3, 0, 0, 1, 0);
r6 = new Array(0, 1, 1, 1, 1, 1, 1, 0);
r7 = new Array(1, 0, 0, 2, 0, 0, 1, 0);
r8 = new Array(0, 1, 1, 1, 1, 1, 1, 0);
r9 = new Array(1, 1, 1, 1, 1, 1, 1, 0);
buildReturnArray();
trace(("RETURN = " + _returnArray[1]));
return (_returnArray);
}
public function buildLevel8():Array{
r0 = new Array(0, 0, 0, 0, 0, 0, 0, 0);
r1 = new Array(0, 0, 0, 0, 0, 0, 0, 0);
r2 = new Array(0, 0, 0, 0, 0, 0, 0, 0);
r3 = new Array(0, 0, 0, 0, 0, 0, 0, 0);
r4 = new Array(0, 0, 0, 0, 1, 0, 0, 0);
r5 = new Array(1, 0, 0, 1, 1, 0, 1, 0);
r6 = new Array(0, 1, 1, 1, 3, 1, 1, 0);
r7 = new Array(1, 1, 1, 4, 1, 1, 1, 0);
r8 = new Array(0, 1, 2, 1, 1, 1, 1, 0);
r9 = new Array(0, 0, 1, 1, 1, 1, 0, 0);
buildReturnArray();
trace(("RETURN = " + _returnArray[1]));
return (_returnArray);
}
public function buildLevel10():Array{
r0 = new Array(0, 1, 0, 0, 0, 0, 0, 0);
r1 = new Array(1, 1, 0, 0, 0, 0, 0, 0);
r2 = new Array(1, 0, 1, 0, 0, 0, 0, 0);
r3 = new Array(1, 1, 1, 0, 0, 0, 0, 0);
r4 = new Array(0, 0, 1, 1, 1, 1, 4, 0);
r5 = new Array(1, 0, 1, 1, 1, 1, 0, 0);
r6 = new Array(0, 4, 1, 1, 1, 1, 0, 0);
r7 = new Array(1, 0, 1, 1, 1, 1, 0, 0);
r8 = new Array(0, 0, 1, 1, 1, 1, 4, 0);
r9 = new Array(0, 0, 1, 1, 1, 1, 0, 0);
buildReturnArray();
trace(("RETURN = " + _returnArray[1]));
return (_returnArray);
}
public function buildLevel11():Array{
r0 = new Array(0, 1, 0, 1, 1, 0, 1, 0);
r1 = new Array(1, 0, 1, 3, 1, 0, 1, 0);
r2 = new Array(0, 0, 1, 1, 1, 1, 0, 0);
r3 = new Array(0, 1, 0, 0, 0, 1, 0, 0);
r4 = new Array(0, 1, 4, 1, 1, 4, 1, 0);
r5 = new Array(1, 1, 1, 1, 1, 1, 1, 0);
r6 = new Array(0, 0, 1, 1, 1, 1, 0, 0);
r7 = new Array(1, 1, 1, 3, 1, 1, 1, 0);
r8 = new Array(0, 1, 0, 1, 1, 0, 1, 0);
r9 = new Array(0, 1, 1, 2, 1, 1, 0, 0);
buildReturnArray();
trace(("RETURN = " + _returnArray[1]));
return (_returnArray);
}
public function buildLevel2():Array{
r0 = new Array(0, 0, 0, 0, 0, 0, 0, 0);
r1 = new Array(0, 0, 0, 0, 0, 0, 0, 0);
r2 = new Array(0, 0, 0, 0, 0, 0, 0, 0);
r3 = new Array(0, 0, 0, 0, 0, 0, 0, 0);
r4 = new Array(0, 0, 0, 1, 1, 0, 0, 0);
r5 = new Array(0, 0, 1, 0, 1, 0, 0, 0);
r6 = new Array(0, 0, 1, 0, 0, 1, 0, 0);
r7 = new Array(0, 0, 1, 0, 1, 0, 0, 0);
r8 = new Array(0, 0, 0, 1, 1, 0, 0, 0);
r9 = new Array(0, 0, 0, 1, 0, 0, 0, 0);
buildReturnArray();
trace(("RETURN = " + _returnArray[1]));
return (_returnArray);
}
public function buildLevel13():Array{
r0 = new Array(0, 0, 1, 0, 1, 0, 1, 0);
r1 = new Array(1, 1, 1, 1, 1, 3, 1, 0);
r2 = new Array(0, 1, 0, 1, 0, 1, 0, 0);
r3 = new Array(1, 1, 0, 1, 0, 1, 1, 0);
r4 = new Array(0, 0, 1, 0, 1, 0, 1, 0);
r5 = new Array(1, 0, 1, 4, 1, 0, 1, 0);
r6 = new Array(0, 1, 0, 1, 0, 1, 0, 0);
r7 = new Array(1, 1, 0, 1, 0, 1, 1, 0);
r8 = new Array(0, 2, 1, 0, 1, 0, 1, 0);
r9 = new Array(1, 0, 1, 0, 1, 0, 1, 0);
buildReturnArray();
trace(("RETURN = " + _returnArray[1]));
return (_returnArray);
}
public function buildLevel4():Array{
r0 = new Array(0, 0, 0, 0, 0, 0, 0, 0);
r1 = new Array(0, 0, 0, 0, 0, 0, 0, 0);
r2 = new Array(0, 0, 0, 0, 0, 0, 0, 0);
r3 = new Array(0, 0, 0, 0, 0, 0, 0, 0);
r4 = new Array(1, 1, 1, 1, 3, 1, 1, 1);
r5 = new Array(0, 1, 0, 1, 0, 1, 0, 0);
r6 = new Array(0, 0, 1, 0, 0, 1, 0, 0);
r7 = new Array(0, 0, 1, 1, 1, 0, 0, 0);
r8 = new Array(0, 0, 1, 0, 0, 1, 0, 0);
r9 = new Array(0, 1, 0, 0, 0, 1, 0, 0);
buildReturnArray();
trace(("RETURN = " + _returnArray[1]));
return (_returnArray);
}
public function buildLevel5():Array{
r0 = new Array(0, 0, 0, 0, 0, 0, 0, 0);
r1 = new Array(0, 0, 0, 0, 0, 0, 0, 0);
r2 = new Array(0, 0, 0, 0, 0, 0, 0, 0);
r3 = new Array(0, 0, 0, 0, 0, 0, 0, 0);
r4 = new Array(0, 1, 1, 1, 4, 1, 1, 1);
r5 = new Array(0, 0, 0, 1, 1, 0, 0, 0);
r6 = new Array(1, 0, 1, 0, 0, 1, 0, 1);
r7 = new Array(0, 1, 0, 0, 0, 1, 0, 0);
r8 = new Array(0, 1, 0, 0, 0, 0, 1, 0);
r9 = new Array(1, 0, 0, 0, 0, 0, 1, 0);
buildReturnArray();
trace(("RETURN = " + _returnArray[1]));
return (_returnArray);
}
public function buildLevel6():Array{
r0 = new Array(0, 0, 0, 0, 0, 0, 0, 0);
r1 = new Array(0, 0, 0, 0, 0, 0, 0, 0);
r2 = new Array(0, 0, 0, 1, 1, 0, 0, 0);
r3 = new Array(0, 0, 1, 1, 1, 0, 0, 0);
r4 = new Array(0, 0, 1, 1, 3, 1, 0, 0);
r5 = new Array(1, 0, 1, 0, 1, 0, 1, 0);
r6 = new Array(0, 0, 0, 0, 4, 0, 0, 0);
r7 = new Array(0, 0, 1, 1, 1, 1, 0, 0);
r8 = new Array(0, 0, 1, 0, 1, 0, 1, 0);
r9 = new Array(0, 0, 1, 0, 0, 1, 0, 0);
buildReturnArray();
trace(("RETURN = " + _returnArray[1]));
return (_returnArray);
}
public function buildLevel12():Array{
r0 = new Array(0, 1, 0, 1, 0, 1, 0, 0);
r1 = new Array(1, 0, 1, 0, 1, 0, 1, 0);
r2 = new Array(0, 1, 1, 1, 1, 1, 1, 0);
r3 = new Array(1, 0, 1, 0, 1, 0, 1, 0);
r4 = new Array(0, 0, 1, 3, 4, 1, 0, 0);
r5 = new Array(1, 0, 1, 0, 1, 0, 1, 0);
r6 = new Array(1, 1, 1, 1, 1, 1, 1, 1);
r7 = new Array(3, 0, 1, 0, 1, 0, 3, 0);
r8 = new Array(0, 0, 1, 1, 1, 1, 0, 0);
r9 = new Array(0, 1, 1, 1, 1, 1, 0, 0);
buildReturnArray();
trace(("RETURN = " + _returnArray[1]));
return (_returnArray);
}
public function buildLevel15():Array{
r0 = new Array(0, 1, 1, 1, 1, 1, 4, 0);
r1 = new Array(1, 3, 1, 1, 1, 1, 1, 0);
r2 = new Array(0, 1, 0, 1, 1, 0, 2, 0);
r3 = new Array(1, 1, 0, 1, 0, 1, 1, 0);
r4 = new Array(0, 4, 1, 1, 1, 1, 1, 0);
r5 = new Array(1, 0, 1, 0, 1, 0, 1, 0);
r6 = new Array(0, 2, 0, 1, 1, 0, 1, 0);
r7 = new Array(1, 1, 0, 0, 0, 1, 1, 0);
r8 = new Array(0, 1, 1, 1, 1, 1, 1, 0);
r9 = new Array(1, 2, 1, 1, 1, 1, 1, 0);
buildReturnArray();
trace(("RETURN = " + _returnArray[1]));
return (_returnArray);
}
public function buildLevel1():Array{
r0 = new Array(0, 0, 0, 0, 0, 0, 0, 0);
r1 = new Array(0, 0, 0, 0, 0, 0, 0, 0);
r2 = new Array(0, 0, 0, 0, 0, 0, 0, 0);
r3 = new Array(0, 0, 0, 0, 0, 0, 0, 0);
r4 = new Array(0, 0, 0, 0, 0, 0, 0, 0);
r5 = new Array(0, 0, 0, 0, 0, 0, 0, 0);
r6 = new Array(0, 0, 0, 0, 0, 0, 0, 0);
r7 = new Array(0, 0, 0, 0, 0, 0, 0, 0);
r8 = new Array(0, 0, 0, 0, 0, 0, 0, 0);
r9 = new Array(0, 1, 1, 1, 1, 1, 0, 0);
buildReturnArray();
trace(("RETURN = " + _returnArray[1]));
return (_returnArray);
}
public function buildLevel3():Array{
r0 = new Array(0, 0, 0, 0, 0, 0, 0, 0);
r1 = new Array(0, 0, 0, 0, 0, 0, 0, 0);
r2 = new Array(0, 0, 0, 0, 0, 0, 0, 0);
r3 = new Array(0, 0, 0, 0, 0, 0, 0, 0);
r4 = new Array(0, 0, 1, 1, 1, 1, 0, 0);
r5 = new Array(0, 1, 0, 3, 0, 1, 0, 0);
r6 = new Array(0, 0, 1, 0, 0, 1, 0, 0);
r7 = new Array(0, 1, 1, 0, 1, 1, 0, 0);
r8 = new Array(0, 0, 0, 1, 1, 0, 0, 0);
r9 = new Array(0, 0, 0, 1, 0, 0, 0, 0);
buildReturnArray();
trace(("RETURN = " + _returnArray[1]));
return (_returnArray);
}
}
}//package
Section 38
//lText (lText)
package {
import flash.display.*;
import flash.text.*;
public dynamic class lText extends MovieClip {
public var levelText:TextField;
}
}//package
Section 39
//musicLoop_snd (musicLoop_snd)
package {
import flash.media.*;
public dynamic class musicLoop_snd extends Sound {
}
}//package
Section 40
//mute_btn (mute_btn)
package {
import flash.display.*;
public dynamic class mute_btn extends MovieClip {
public function mute_btn(){
addFrameScript(19, frame20, 28, frame29);
}
function frame20(){
gotoAndPlay(1);
}
function frame29(){
stop();
}
}
}//package
Section 41
//pauseGame (pauseGame)
package {
import flash.display.*;
public dynamic class pauseGame extends MovieClip {
}
}//package
Section 42
//playGame_btn (playGame_btn)
package {
import flash.display.*;
public dynamic class playGame_btn extends SimpleButton {
}
}//package
Section 43
//retry_mc (retry_mc)
package {
import flash.display.*;
public dynamic class retry_mc extends MovieClip {
public var quitGame_btn:SimpleButton;
public var visitUmbel_btn:SimpleButton;
public var retry_btn:SimpleButton;
public var bee2_mc:MovieClip;
public var bee3_mc:MovieClip;
public var playGame1_btn:SimpleButton;
public var bee1_mc:MovieClip;
public function retry_mc(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package
Section 44
//score_mc (score_mc)
package {
import flash.display.*;
import flash.text.*;
public dynamic class score_mc extends MovieClip {
public var level:TextField;
public var score:TextField;
}
}//package
Section 45
//sendToFriend (sendToFriend)
package {
import flash.display.*;
import flash.events.*;
import flash.net.*;
import flash.utils.*;
import flash.media.*;
import flash.text.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.geom.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class sendToFriend extends MovieClip {
public var sendEmail:SimpleButton;
public var fe3:TextField;
public var fe5:TextField;
public var fe1:TextField;
public var fe2:TextField;
public var fe4:TextField;
public var mainMenu1:SimpleButton;
public var ye1:TextField;
public function sendToFriend(){
addFrameScript(0, frame1);
}
function frame1(){
ye1.addEventListener(Event.CHANGE, textChanged);
fe1.addEventListener(Event.CHANGE, textChanged);
fe2.addEventListener(Event.CHANGE, textChanged);
fe3.addEventListener(Event.CHANGE, textChanged);
fe4.addEventListener(Event.CHANGE, textChanged);
fe5.addEventListener(Event.CHANGE, textChanged);
stop();
}
public function textChanged(_arg1:Event):void{
var _local2:String;
trace("CHANGED");
_local2 = _arg1.target.text.slice((_arg1.target.text.length - 1), _arg1.target.text.length);
if (_local2 == "\""){
_arg1.target.text = (_arg1.target.text.slice(0, (_arg1.target.text.length - 1)) + "@");
};
}
}
}//package
Section 46
//sendToFriend_btn (sendToFriend_btn)
package {
import flash.display.*;
public dynamic class sendToFriend_btn extends SimpleButton {
}
}//package
Section 47
//submitScore (submitScore)
package {
import flash.display.*;
import flash.events.*;
import flash.net.*;
import flash.utils.*;
import flash.media.*;
import flash.text.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.geom.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class submitScore extends MovieClip {
public var submitScore_btn:SimpleButton;
public var yourEmail:TextField;
public var yourName:TextField;
public var mainMenu3:SimpleButton;
public var score:TextField;
public function submitScore(){
addFrameScript(0, frame1);
}
function frame1(){
yourEmail.addEventListener(Event.CHANGE, textChanged);
}
public function textChanged(_arg1:Event):void{
var _local2:String;
trace("CHANGED");
_local2 = _arg1.target.text.slice((_arg1.target.text.length - 1), _arg1.target.text.length);
if (_local2 == "\""){
_arg1.target.text = (_arg1.target.text.slice(0, (_arg1.target.text.length - 1)) + "@");
};
}
}
}//package
Section 48
//topScores (topScores)
package {
import flash.display.*;
import flash.text.*;
public dynamic class topScores extends MovieClip {
public var name1:TextField;
public var name3:TextField;
public var name4:TextField;
public var name6:TextField;
public var name8:TextField;
public var name2:TextField;
public var name5:TextField;
public var name7:TextField;
public var name9:TextField;
public var mainMenu2:SimpleButton;
public var points2:TextField;
public var points3:TextField;
public var points4:TextField;
public var points6:TextField;
public var points1:TextField;
public var points5:TextField;
public var points7:TextField;
public var points9:TextField;
public var points8:TextField;
public var name10:TextField;
public var points10:TextField;
}
}//package
Section 49
//umbelBeeLogo (umbelBeeLogo)
package {
import flash.display.*;
public dynamic class umbelBeeLogo extends MovieClip {
}
}//package
Section 50
//UmbelGameEngine (UmbelGameEngine)
package {
import flash.display.*;
import flash.events.*;
import flash.net.*;
import console.trackers.*;
import fl.transitions.*;
import fl.transitions.easing.*;
import com.memecounter.*;
import console.math.*;
import console.loaders.*;
import console.parsers.*;
import flash.utils.*;
import flash.media.*;
import console.control.*;
import console.engines.*;
import flash.text.*;
import flash.system.*;
public class UmbelGameEngine extends MovieClip {
private const _strMailURL = "http://umbelbee.viral-game.co.uk/mail.php";
private const _strURL = "http://umbelbee.viral-game.co.uk/data.php";
private const _bbSpeed = 10;
private var _speedUp;// = 0
private var _tileWorld;
private var _points;// = 0
private var _levelIsOver:Boolean;// = false
public var _keyboardControls;
private var _sendToFriend_btn;
private var _userRetryLevel:Boolean;// = false
private var _umbelPwr_snd;
private var _beeSpeed:Number;// = 2
private var _pythag;
private var _muteButton;
private var _gameInPlay:Boolean;// = false
private var _tempTimer:Timer;
private var _sfxChannel:SoundChannel;
private var _convertDegree;
private var _paused:Boolean;// = false
private var _retriesUsed;// = 0
private var _tweenOut;// = 0
private var _bonusPlay:Boolean;// = false
private var _highscores_btn;
private var _midVol:SoundTransform;
private var _fullVol:SoundTransform;
private var _musicLoop_snd;
public var _levels;
public var request:URLRequest;
public var percentage:TextField;
private var _mainBee1;
public var visitUmbel1_btn:SimpleButton;
private var _sendData;
private var _submitScore_mc;
private var _muteVol:SoundTransform;
private var _hexagonsMoving:uint;// = 0
private var _resetVal;// = 0
private var _mainBee2;
private var _previousPoints;// = 0
private var _multiTask;// = 0
private var _colours:Array;
private var _highScores_mc;
private var _pause;
private var _musicChannel:SoundChannel;
private var _mute;// = 1
private var _token;
private var _beeQueue;
private var _umbelBeeLogo;
private var _collect_snd;
private var _arrow;
private var _submitScoreEnabled:Boolean;// = true
private var _visitUmbel_btn;
private var _bassLoop_snd;
private var _fire_snd;
private var _gameIsOver:Boolean;// = false
public var _debug:Boolean;// = false
private var _lineManager;// = 0
private var _border;
public var koko_btn:cs_frame_button_koko_;
private var _scoreText;
private var _currentLevel:uint;// = 1
private var _rotationSpeed;// = 2.5
private var _bassChannel:SoundChannel;
private var _levelText;
private var _xmlPass:ParseXML;
private var _instructions;
private var _allowFire:Boolean;// = true
private var _retry;
private var _sendToFriend_mc;
private var _bottomBeesPos:Array;
private var _hexagonFallSpeed;// = 2.1
private var _whatAction;// = ""
private var _whip_snd;
private var _playGame_btn;
private var _whoop_snd;
private var _mask1:Shape;
private var _mask:Shape;
private var _whatScreen:String;
public function UmbelGameEngine():void{
_levels = new Levels();
_debug = false;
_keyboardControls = new KeyboardControls(_debug);
_arrow = new arrowPointer();
_tileWorld = new TileBasedWorld(45, 50, 10, 8, false);
_allowFire = true;
_beeSpeed = 2;
_convertDegree = new ConvertDegrees();
_pythag = new Pythag();
_beeQueue = new Array();
_colours = new Array(0, 0, 0, 0, 0, 0, 0, 0);
_points = 0;
_previousPoints = 0;
_speedUp = 0;
_multiTask = 0;
_lineManager = 0;
_mainBee1 = new beeAnimation();
_mainBee2 = new beeAnimation();
_fire_snd = new fire_snd();
_collect_snd = new collect_snd();
_umbelPwr_snd = new umbelPwr_snd();
_musicLoop_snd = new musicLoop_snd();
_bassLoop_snd = new bassLoop_snd();
_whoop_snd = new whoop_snd();
_whip_snd = new whip_snd();
_muteVol = new SoundTransform(0, 0);
_fullVol = new SoundTransform(1, 0);
_midVol = new SoundTransform(0.5, 0);
_umbelBeeLogo = new umbelBeeLogo();
_playGame_btn = new playGame_btn();
_highscores_btn = new highScores_btn();
_sendToFriend_btn = new sendToFriend_btn();
_visitUmbel_btn = new visitUmbel_btn();
_sendToFriend_mc = new sendToFriend();
_highScores_mc = new topScores();
_submitScore_mc = new submitScore();
_instructions = new instructions();
_retry = new retry_mc();
_border = new borderMC();
_pause = new pauseGame();
_mask = new Shape();
_mask1 = new Shape();
_levelText = new lText();
_scoreText = new score_mc();
_currentLevel = 1;
_levelIsOver = false;
_gameIsOver = false;
_userRetryLevel = false;
_bonusPlay = false;
_rotationSpeed = 2.5;
_sendData = new SendReceiveData();
_xmlPass = new ParseXML();
_hexagonFallSpeed = 2.1;
_retriesUsed = 0;
_mute = 1;
_muteButton = new mute_btn();
_paused = false;
_submitScoreEnabled = true;
_bottomBeesPos = new Array();
_hexagonsMoving = 0;
_resetVal = 0;
_tempTimer = new Timer(1000, 1);
_tweenOut = 0;
_gameInPlay = false;
_whatAction = "";
super();
addFrameScript(0, frame1, 3, frame4, 14, frame15);
}
public function hideMainMenu():void{
_mainBee2.tweenY = new Tween(_mainBee2, "x", Regular.easeIn, 329, 500, 0.8, true);
_mainBee1.tweenY = new Tween(_mainBee1, "x", Regular.easeIn, -24, -200, 0.8, true);
_umbelBeeLogo.tweenY = new Tween(_umbelBeeLogo, "y", Regular.easeIn, 250, -200, 0.6, true);
_playGame_btn.tweenY = new Tween(_playGame_btn, "y", Regular.easeIn, 325, 0, 0.4, true);
_highscores_btn.tweenX = new Tween(_highscores_btn, "x", Regular.easeIn, 78, -100, 0.4, true);
_sendToFriend_btn.tweenX = new Tween(_sendToFriend_btn, "x", Regular.easeIn, 218, 430, 0.4, true);
_visitUmbel_btn.tweenY = new Tween(_visitUmbel_btn, "y", Regular.easeIn, 460, 660, 0.4, true);
switch (_whatScreen){
case "startGame":
_umbelBeeLogo.tweenY.addEventListener(TweenEvent.MOTION_FINISH, animateInstructionsIn);
break;
case "sendToFriend":
_umbelBeeLogo.tweenY.addEventListener(TweenEvent.MOTION_FINISH, animateSendToFriendIn);
break;
case "highScores":
_umbelBeeLogo.tweenY.addEventListener(TweenEvent.MOTION_FINISH, animateHighScoreIn);
break;
};
}
public function findHexagon(_arg1, _arg2, _arg3){
var _local4:*;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:int;
var _local9:int;
var _local10:uint;
var _local11:*;
var _local12:*;
var _local13:*;
var _local14:*;
var _local15:*;
var _local16:Boolean;
var _local17:Array;
_local4 = _tileWorld._tile_array;
_local11 = 0;
while (_local11 < 600) {
_local12 = (_arg1.x - ((_arg2 / 10) * _local11));
_local13 = (_arg1.y - ((_arg3 / 10) * _local11));
_local14 = (_local4.length - 1);
while (_local14 > -1) {
_local15 = 0;
while (_local15 < _local4[_local14].length) {
if (isNaN(_local5)){
_local6 = _local4[_local14][_local15].x;
_local7 = _local4[_local14][_local15].y;
_local16 = _local4[_local14][_local15].collected;
if ((((_local12 > (_local6 - 26))) && ((_local12 < (_local6 + 26))))){
if ((((((_local13 < (_local7 + 25))) && ((_local13 > _local7)))) && (!(_local16)))){
_local5 = _pythag.findAngle(_arg1.x, _arg1.y, _local6, _local7);
_local10 = 1;
_local8 = _local14;
_local9 = _local15;
break;
};
};
};
_local15++;
};
_local14--;
};
_local11++;
};
if (isNaN(_local5)){
return (1);
};
_local17 = new Array(_local6, _local7, _local5, _local10, _local8, _local9);
return (_local17);
}
public function animateLevelTextIn(_arg1):void{
var _local2:*;
_levelText.levelText.text = "";
_levelText = null;
_levelText = new lText();
if (_levelText.tweenY != undefined){
trace(_levelText.tweenY);
_tempTimer.removeEventListener(TimerEvent.TIMER, animateLevelTextOut);
_levelText.tweenY.removeEventListener(TweenEvent.MOTION_FINISH, textScreenFinish);
_levelText.tweenY.removeEventListener(TweenEvent.MOTION_FINISH, timeLevelExit);
};
_levelText.levelText.text = _arg1;
_local2 = buildMask();
_levelText.mask = _local2;
addChild(_levelText);
_levelText.x = 166;
_levelText.tweenY = new Tween(_levelText, "y", Bounce.easeOut, 0, 300, 1, true);
_levelText.tweenY.addEventListener(TweenEvent.MOTION_FINISH, timeLevelExit);
}
public function beginGame(_arg1:TweenEvent){
_hexagonsMoving--;
if (_hexagonsMoving == 0){
removeEventListener(Event.ENTER_FRAME, moveHexagons);
addEventListener(Event.ENTER_FRAME, moveHexagons);
setAllowFire(true);
};
}
public function animateLevelTextOut(_arg1:TimerEvent):void{
_tweenOut++;
_levelText.tweenY = new Tween(_levelText, "y", Back.easeIn, 300, 700, 0.5, true);
_levelText.tweenY.addEventListener(TweenEvent.MOTION_FINISH, textScreenFinish);
}
public function getToken(_arg1:Event):void{
_token = _arg1.target._token;
}
public function animateInstructionsOut():void{
_instructions.tweenY = new Tween(_instructions, "y", Regular.easeOut, 317, -44, 1.2, true);
_instructions.tweenY.addEventListener(TweenEvent.MOTION_FINISH, finishInstructionsAnimation);
}
function frame4(){
stop();
}
function frame15(){
buildGameEngine();
stop();
}
public function buttonPress(_arg1:MouseEvent){
var _local2:URLVariables;
var _local3:*;
var _local4:*;
var _local5:*;
_local2 = new URLVariables();
switch (_arg1.target.name){
case "playGame_btn":
_whatScreen = "startGame";
hideMainMenu();
break;
case "playGame1_btn":
animateInstructionsOut();
break;
case "highscores_btn":
_whatScreen = "highScores";
hideMainMenu();
break;
case "sendToFriend_btn":
_whatScreen = "sendToFriend";
hideMainMenu();
break;
case "visitUmbel_btn":
case "visitUmbel1_btn":
Tracker.kvClick(767);
navigateToURL(new URLRequest("http://www.umbel.co.uk"), "_blank");
break;
case "koko_btn":
Tracker.kvClick(0x0300);
navigateToURL(new URLRequest("http://www.kokodigital.co.uk"), "_blank");
break;
case "retry_btn":
animateRetryOut();
break;
case "mainMenu1":
animateSendToFriendOut();
break;
case "mainMenu2":
animateHighScoreOut();
break;
case "mainMenu3":
animateSubmitScoreOut1();
break;
case "next_btn":
_instructions.gotoAndStop(2);
break;
case "quitGame_btn":
_gameIsOver = true;
animateRetryOut2();
break;
case "mute_btn1":
break;
case "sendEmail":
_local3 = 1;
while (_local3 < 6) {
_local4 = _sendToFriend_mc[("fe" + _local3)].text;
_local5 = _sendToFriend_mc.ye1.text;
if (((!((_local5 == ""))) && (!((_local4 == ""))))){
Tracker.kvEvent(1044);
_local2.player_email = _local5;
_local2.friend_email = _local4;
_sendData.sendData(_strMailURL, _local2);
_sendToFriend_mc[("fe" + _local3)].text = "";
_sendToFriend_mc.play();
};
_local3++;
};
break;
case "submitScore_btn":
if (((!((_submitScore_mc.yourName.text == ""))) && (!((_submitScore_mc.yourEmail.text == ""))))){
Tracker.kvEvent(1043);
_local2.token = _token;
_local2.action = "scores_submit";
_local2.player_name = _submitScore_mc.yourName.text;
_local2.player_email = _submitScore_mc.yourEmail.text;
_local2.player_score = _points;
_sendData.sendData(_strURL, _local2);
animateSubmitScoreOut();
};
break;
};
}
public function fireBee(_arg1:Event){
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
trace(("KEY = " + _arg1.target._keyDown));
trace("YO YO");
if ((((_arg1.target._keyDown == 80)) && (!(_submitScoreEnabled)))){
if (_paused){
removeChild(_pause);
_paused = false;
} else {
_pause.x = 165;
_pause.y = 315;
addChildAt(_pause, numChildren);
_paused = true;
};
};
if ((((((_arg1.target._keyDown == 38)) && (_allowFire))) && (!(_paused)))){
_sfxChannel = _fire_snd.play(0, 0);
_local2 = new bumbleBeeMC();
_local2.gotoAndStop(_beeQueue[0]);
_local2.mask = _mask;
_bottomBeesPos[0].gotoAndStop(_beeQueue[0]);
_bottomBeesPos[1].gotoAndStop(_beeQueue[1]);
_bottomBeesPos[2].gotoAndStop(_beeQueue[2]);
_bottomBeesPos[3].gotoAndStop(_beeQueue[3]);
if (_speedUp > 0){
_speedUp--;
} else {
_beeSpeed = 2;
};
if (_multiTask > 0){
_local2.play();
_multiTask--;
} else {
_multiTask = false;
};
if (_lineManager > 0){
_lineManager--;
};
_local2.colour = _beeQueue[0];
_local2.x = 165;
_local2.y = 525;
_local2.ang = _arrow.rotation;
buildBeeArray(1, 4);
moveBottomBees();
addChild(_local2);
_local3 = _convertDegree.convertToRadian((_local2.ang + 90));
_local4 = _pythag.findNewXY(_local2.x, _local2.y, _local3, _bbSpeed);
_local5 = (_local4[0] - _local2.x);
_local6 = (_local4[1] - _local2.y);
_local7 = findHexagon(_local2, _local5, _local6);
if (isNaN(_local7)){
setAllowFire(false);
_local2.scaleX = (_local2.scaleY = 0.7);
_local2.tileRow = _local7[4];
_local2.tileCol = _local7[5];
_local2.tweenX = new Tween(_local2, "x", Regular.easeInOut, _local2.x, _local7[0], (_local7[3] / _beeSpeed), true);
_local2.tweenY = new Tween(_local2, "y", Regular.easeInOut, _local2.y, _local7[1], (_local7[3] / _beeSpeed), true);
_local2.tweenScaleX = new Tween(_local2, "scaleX", Regular.easeOut, 0.7, 1, 0.75, true);
_local2.tweenScaleY = new Tween(_local2, "scaleY", Regular.easeOut, 0.7, 1, 0.75, true);
_local2.tweenY.addEventListener(TweenEvent.MOTION_FINISH, dropHexagon);
} else {
setAllowFire(false);
if (_points > 0){
_points = (_points - 5);
_scoreText.score.text = _points;
};
_local2.tweenX = new Tween(_local2, "x", Regular.easeInOut, _local2.x, (_local2.x - (_local5 * 100)), 1, true);
_local2.tweenY = new Tween(_local2, "y", Regular.easeInOut, _local2.y, (_local2.y - (_local6 * 100)), 1, true);
if (((((!(_gameIsOver)) && (!(_levelIsOver)))) && (!(_userRetryLevel)))){
_local2.tweenY.addEventListener(TweenEvent.MOTION_FINISH, resetBee1);
};
_scoreText.score.text = _points;
_scoreText.level.text = _currentLevel;
};
};
}
public function timeLevelExit(_arg1:TweenEvent):void{
_tempTimer.addEventListener(TimerEvent.TIMER, animateLevelTextOut);
_tempTimer.start();
}
public function preloader(_arg1:ProgressEvent):void{
var _local2:*;
var _local3:*;
var _local4:int;
_local2 = stage.loaderInfo.bytesTotal;
_local3 = stage.loaderInfo.bytesLoaded;
_local4 = (_local3 * (100 / _local2));
percentage.text = (_local4 + "%");
}
public function dropHexagon(_arg1:TweenEvent){
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
var _local8:*;
_local2 = _arg1.target.obj;
_local3 = _tileWorld._tile_array;
_local4 = _local3[_local2.tileRow][_local2.tileCol];
if (((((!(_gameIsOver)) && (!(_levelIsOver)))) && (!(_userRetryLevel)))){
setAllowFire(true);
if ((((((((_local2.colour == _local4.colour)) || ((_multiTask > 0)))) || ((_local4.type > 1)))) || ((_lineManager > 0)))){
_sfxChannel = _collect_snd.play(0, 0);
if (_lineManager > 0){
_local6 = _local4.row;
_local7 = 0;
while (_local7 < _local3[_local6].length) {
_local8 = _local3[_local6][_local7];
if (!_local8.collected){
_local8.collected = true;
_local5 = new hexagonMCFlash();
_local5.x = _local8.hmc.x;
_local5.y = _local8.hmc.y;
_tileWorld.addChild(_local5);
_points = (_points + 25);
_scoreText.score.text = _points;
var _local9 = _colours;
var _local10 = _local8.colour;
var _local11 = (_local9[_local10] - 1);
_local9[_local10] = _local11;
_local8.hmc.tweenScaleY = new Tween(_local8.hmc, "scaleX", Back.easeInOut, 1, 0, 0.7, true);
_local8.hmc.tweenScaleX = new Tween(_local8.hmc, "scaleY", Back.easeInOut, 1, 0, 0.7, true);
_local8.hmc.tweenScaleAlpha = new Tween(_local8.hmc, "alpha", Back.easeInOut, 1, 0, 0.7, true);
};
_local7++;
};
_local2.tweenScaleBeeY = new Tween(_local2, "scaleX", Regular.easeInOut, 1, 0, 0.7, true);
_local2.tweenScaleBeeX = new Tween(_local2, "scaleY", Regular.easeInOut, 1, 0, 0.7, true);
_local2.tweenScaleBeeAlpha = new Tween(_local2, "alpha", Regular.easeInOut, 1, 0, 0.7, true);
} else {
_local5 = new hexagonMCFlash();
_local5.x = _local4.hmc.x;
_local5.y = _local4.hmc.y;
_tileWorld.addChild(_local5);
_points = (_points + 25);
_scoreText.score.text = _points;
_local9 = _colours;
_local10 = _local4.colour;
_local11 = (_local9[_local10] - 1);
_local9[_local10] = _local11;
if (_local4.type == 2){
_sfxChannel = _umbelPwr_snd.play(0, 0);
_bonusPlay = true;
animateLevelTextIn("efficiency bee");
_speedUp = 8;
_beeSpeed = 10;
};
if (_local4.type == 3){
_sfxChannel = _umbelPwr_snd.play(0, 0);
_bonusPlay = true;
animateLevelTextIn("multitask bee");
beginMultiTaskBee();
_multiTask = 8;
};
if (_local4.type == 4){
_sfxChannel = _umbelPwr_snd.play(0, 0);
_bonusPlay = true;
animateLevelTextIn("line manager bee");
_lineManager = 2;
};
_local4.collected = true;
_local4.hmc.tweenScaleY = new Tween(_local4.hmc, "scaleX", Back.easeInOut, 1, 0, 0.7, true);
_local4.hmc.tweenScaleX = new Tween(_local4.hmc, "scaleY", Back.easeInOut, 1, 0, 0.7, true);
_local4.hmc.tweenScaleAlpha = new Tween(_local4.hmc, "alpha", Back.easeInOut, 1, 0, 0.7, true);
_local2.tweenScaleBeeY = new Tween(_local2, "scaleX", Regular.easeInOut, 1, 0, 0.7, true);
_local2.tweenScaleBeeX = new Tween(_local2, "scaleY", Regular.easeInOut, 1, 0, 0.7, true);
_local2.tweenScaleBeeAlpha = new Tween(_local2, "alpha", Regular.easeInOut, 1, 0, 0.7, true);
_local2.tweenScaleBeeY.addEventListener(TweenEvent.MOTION_FINISH, resetBee);
};
} else {
if (_points > 0){
_points = (_points - 5);
_scoreText.score.text = _points;
};
_sfxChannel = _whoop_snd.play(0, 0);
_local4.clip.gotoAndStop(_local2.colour);
_local9 = _colours;
_local10 = _local4.colour;
_local11 = (_local9[_local10] - 1);
_local9[_local10] = _local11;
_local4.colour = _local2.colour;
_local9 = _colours;
_local10 = _local4.colour;
_local11 = (_local9[_local10] + 1);
_local9[_local10] = _local11;
_local2.tweenScaleBeeAlpha = new Tween(_local2, "alpha", Regular.easeOut, 1, 0, 1, true);
_local2.tweenScaleBeeX = new Tween(_local2, "rotation", Regular.easeInOut, 0, 6000, 1, true);
_local2.tweenScaleBeeY = new Tween(_local2, "y", Regular.easeInOut, _local2.y, (_local2.y - 200), 1, true);
_local2.tweenScaleBeeY.addEventListener(TweenEvent.MOTION_FINISH, resetBee);
};
if (!_levelIsOver){
checkEndGame();
};
} else {
_local2.tweenScaleBeeAlpha = new Tween(_local2, "alpha", Regular.easeOut, 1, 0, 1, true);
_local2.tweenScaleBeeX = new Tween(_local2, "rotation", Regular.easeInOut, 0, 6000, 1, true);
_local2.tweenScaleBeeY = new Tween(_local2, "y", Regular.easeInOut, _local2.y, (_local2.y - 200), 1, true);
_local2.tweenScaleBeeY.addEventListener(TweenEvent.MOTION_FINISH, resetBee);
};
}
function frame1(){
Security.loadPolicyFile("http://www.viral-game.co.uk/crossdomain.xml");
Security.loadPolicyFile("http://umbelbee.viral-game.co.uk/crossdomain.xml");
Security.allowDomain("*");
MochiBot.track(this, "d955d4b7");
Tracker.init(447, root);
request = new URLRequest("http://www.viralchart.com/tracker.php?media=830&f=F");
request.method = URLRequestMethod.GET;
sendToURL(request);
this.loaderInfo.addEventListener(Event.OPEN, showPreloader);
this.loaderInfo.addEventListener(ProgressEvent.PROGRESS, preloader);
this.loaderInfo.addEventListener(Event.COMPLETE, showLoadResult);
Security.loadPolicyFile("http://www.viral-game.co.uk/crossdomain.xml");
Security.loadPolicyFile("http://dragonuniversity.viral-game.co.uk/crossdomain.xml");
Security.allowDomain("*");
stop();
}
public function muteSound(_arg1:MouseEvent){
trace("MUTE BABY");
switch (_mute){
case 1:
_muteButton.gotoAndStop(30);
_mute = 0;
Tracker.kvEvent(1045);
break;
case 0:
_muteButton.gotoAndPlay(1);
_mute = 1;
break;
};
SoundMixer.soundTransform = new SoundTransform(_mute);
}
public function animateHighScoreOut():void{
_highScores_mc.tweenY = new Tween(_highScores_mc, "y", Regular.easeOut, 317, -44, 1.2, true);
_highScores_mc.tweenY.addEventListener(TweenEvent.MOTION_FINISH, finishHighScoreAnimation);
}
function xml_display(_arg1:Event):void{
var _local2:XML;
var _local3:*;
var _local4:*;
var _local5:Object;
_local2 = _xmlPass._xmlDoc;
_local3 = 1;
while (_local3 <= _local2.daily_scores.entry.length()) {
_local4 = _local2.daily_scores.entry[(_local3 - 1)];
_local5 = new Object();
_local5.pos = _local3;
_local5.playerName = _local4.attributes()[0];
_local5.playerScore = _local4.attributes()[1];
_highScores_mc[("name" + _local3)].text = _local5.playerName.toLowerCase();
_highScores_mc[("points" + _local3)].text = _local5.playerScore;
_local3++;
};
}
public function finishInstructionsAnimation(_arg1:TweenEvent):void{
removeChild(_instructions);
_instructions.mask = null;
startGame();
}
public function buildMask():Shape{
var _local1:Shape;
_local1 = new Shape();
_local1.graphics.beginFill(0x666666);
_local1.graphics.drawRect(6, 134, 320, 425);
_local1.graphics.endFill();
return (_local1);
}
public function removeBottomBees():void{
removeChild(_bottomBeesPos[0]);
removeChild(_bottomBeesPos[1]);
removeChild(_bottomBeesPos[2]);
removeChild(_bottomBeesPos[3]);
_bottomBeesPos = null;
_bottomBeesPos = new Array();
}
public function animateSubmitScoreIn():void{
var _local1:*;
_musicChannel.soundTransform = _muteVol;
_bassChannel.soundTransform = _fullVol;
_submitScoreEnabled = true;
_submitScore_mc.score.text = _points;
_local1 = buildMask();
_submitScore_mc.mask = _local1;
_submitScore_mc.x = 166;
_submitScore_mc.tweenY = new Tween(_submitScore_mc, "y", Regular.easeOut, -44, 317, 1.2, true);
addChild(_submitScore_mc);
}
public function moveArrow(_arg1:Event){
var _local2:Array;
var _local3:*;
_local2 = _arg1.target._keysDown_array;
_local3 = 0;
while (_local3 < _local2.length) {
switch (_local2[_local3]){
case 39:
if ((((_arrow.rotation < 75)) && (!(_paused)))){
_arrow.rotation = (_arrow.rotation + _rotationSpeed);
};
break;
case 37:
if ((((_arrow.rotation > -75)) && (!(_paused)))){
_arrow.rotation = (_arrow.rotation - _rotationSpeed);
};
break;
};
_local3++;
};
}
public function finishSubmitScoreAnimation(_arg1:TweenEvent):void{
removeChild(_submitScore_mc);
_submitScore_mc.mask = null;
runHighScoreAnimation();
}
public function beginMultiTaskBee(){
var _local1:*;
_local1 = 0;
while (_local1 < 4) {
_bottomBeesPos[_local1].play();
_local1++;
};
}
public function retryGame():void{
_musicChannel.soundTransform = _fullVol;
_bassChannel.soundTransform = _muteVol;
_points = _previousPoints;
buildTiles();
}
public function removeMenuSprites():void{
removeChild(_mainBee1);
removeChild(_mainBee2);
removeChild(_umbelBeeLogo);
removeChild(_playGame_btn);
removeChild(_highscores_btn);
removeChild(_sendToFriend_btn);
removeChild(_visitUmbel_btn);
}
public function setAllowFire(_arg1){
if (_arg1){
_arrow.gotoAndStop(1);
_allowFire = true;
} else {
_arrow.gotoAndStop(2);
_allowFire = false;
};
}
public function resetBee(_arg1:TweenEvent):void{
removeChild(_arg1.target.obj);
_resetVal++;
}
public function finishRetryAnimation1(_arg1:TweenEvent):void{
removeChild(_retry);
_retry.mask = null;
animateSubmitScoreIn();
}
public function animateInstructionsIn(_arg1:TweenEvent):void{
var _local2:*;
_instructions.gotoAndStop(1);
removeMenuSprites();
_local2 = buildMask();
_instructions.mask = _local2;
_instructions.x = 166;
_instructions.tweenY = new Tween(_instructions, "y", Regular.easeOut, -44, 317, 1.2, true);
addChild(_instructions);
}
public function showMainMenu():void{
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
addChild(_mask);
_bassChannel.soundTransform = _fullVol;
_musicChannel.soundTransform = _muteVol;
_local1 = buildMask();
_mainBee2 = new beeAnimation();
_mainBee2.gotoAndPlay((Math.ceil((Math.random() * 50)) + 50));
_mainBee2.scaleX = -0.5;
_mainBee2.scaleY = 0.5;
_mainBee2.y = 300;
_mainBee2.mask = _local1;
_mainBee2.tweenY = new Tween(_mainBee2, "x", Regular.easeOut, 500, 350, 0.8, true);
addChild(_mainBee2);
_local2 = buildMask();
_umbelBeeLogo.mask = _local2;
_umbelBeeLogo.x = 166;
_umbelBeeLogo.tweenY = new Tween(_umbelBeeLogo, "y", Bounce.easeOut, -200, 250, 1.2, true);
addChild(_umbelBeeLogo);
_local3 = buildMask();
_playGame_btn.mask = _local3;
_playGame_btn.name = "playGame_btn";
_playGame_btn.x = 166;
_playGame_btn.tweenY = new Tween(_playGame_btn, "y", Bounce.easeOut, 0, 355, 0.8, true);
addChild(_playGame_btn);
_playGame_btn.mask = _mask;
_local4 = buildMask();
_highscores_btn.mask = _local4;
_highscores_btn.name = "highscores_btn";
_highscores_btn.y = 410;
_highscores_btn.tweenX = new Tween(_highscores_btn, "x", Bounce.easeOut, -100, 78, 0.8, true);
addChild(_highscores_btn);
_local5 = buildMask();
_sendToFriend_btn.mask = _local5;
_sendToFriend_btn.name = "sendToFriend_btn";
_sendToFriend_btn.y = 410;
_sendToFriend_btn.tweenX = new Tween(_sendToFriend_btn, "x", Bounce.easeOut, 430, 218, 0.8, true);
addChild(_sendToFriend_btn);
_local6 = buildMask();
_visitUmbel_btn.mask = _local6;
_visitUmbel_btn.name = "visitUmbel_btn";
_visitUmbel_btn.x = 166;
_visitUmbel_btn.tweenY = new Tween(_visitUmbel_btn, "y", Bounce.easeOut, 660, 460, 0.8, true);
addChild(_visitUmbel_btn);
_local7 = buildMask();
_mainBee1 = new beeAnimation();
_mainBee1.gotoAndPlay(Math.ceil((Math.random() * 50)));
_mainBee1.y = 140;
_mainBee1.mask = _local7;
_mainBee1.tweenY = new Tween(_mainBee1, "x", Regular.easeOut, -200, -24, 0.8, true);
addChild(_mainBee1);
}
public function animateSendToFriendIn(_arg1:TweenEvent):void{
var _local2:*;
removeMenuSprites();
_local2 = buildMask();
_sendToFriend_mc.mask = _local2;
_sendToFriend_mc.x = 166;
_sendToFriend_mc.tweenY = new Tween(_sendToFriend_mc, "y", Regular.easeOut, -44, 317, 1.2, true);
addChild(_sendToFriend_mc);
}
public function buildBotomBees():void{
var _local1:*;
var _local2:*;
_local1 = 0;
while (_local1 < 4) {
_local2 = new bumbleBeeMC();
_local2.gotoAndStop(_beeQueue[_local1]);
_local2.x = (165 + (40 * _local1));
_local2.tx = _local2.x;
if (_local1 == 0){
_local2.y = 525;
_local2.ty = 525;
} else {
_local2.x = (_local2.x + 20);
_local2.tx = _local2.x;
_local2.y = 520;
_local2.ty = 520;
};
_local2.scaleX = 0.7;
_local2.scaleY = 0.7;
_bottomBeesPos.push(_local2);
addChild(_local2);
_local1++;
};
}
public function buildMask1():Shape{
var _local1:Shape;
_local1 = new Shape();
_local1.graphics.beginFill(0x666666);
_local1.graphics.drawRect(6, 134, 320, 365);
_local1.graphics.endFill();
return (_local1);
}
public function finishSendToFriendAnimation(_arg1:TweenEvent):void{
removeChild(_sendToFriend_mc);
_sendToFriend_mc.mask = null;
showMainMenu();
}
public function animateSubmitScoreOut():void{
_submitScore_mc.tweenY = new Tween(_submitScore_mc, "y", Regular.easeOut, 317, -44, 1.2, true);
_submitScore_mc.tweenY.addEventListener(TweenEvent.MOTION_FINISH, finishSubmitScoreAnimation);
}
public function tileFocus(_arg1:Event){
}
public function removeHexagons(_arg1):Function{
var hmc = _arg1;
return (function (_arg1:TimerEvent):void{
hmc.clip.tweenY = new Tween(hmc.clip, "y", Regular.easeIn, hmc.y, 800, 1, true);
hmc.clip.tweenY.addEventListener(TweenEvent.MOTION_FINISH, endGame);
});
}
public function displayHexagons(_arg1):Function{
var hmc = _arg1;
return (function (_arg1:TimerEvent):void{
_tileWorld.addChild(hmc);
hmc.tweenY = new Tween(hmc, "y", Back.easeOut, 600, hmc.y, 1, true);
_sfxChannel = _whip_snd.play(0, 0);
hmc.tweenY.addEventListener(TweenEvent.MOTION_FINISH, beginGame);
});
}
public function finishRetryAnimation(_arg1:TweenEvent):void{
removeChild(_retry);
_retry.mask = null;
retryGame();
}
public function moveHexagons(_arg1:Event){
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
if (!_paused){
_local2 = _tileWorld._tile_array;
_local3 = false;
_local4 = (_local2.length - 1);
while (_local4 > -1) {
_local5 = 0;
while (_local5 < _local2[_local4].length) {
_local2[_local4][_local5].y = (_local2[_local4][_local5].y + _hexagonFallSpeed);
_local2[_local4][_local5].hmc.y = _local2[_local4][_local5].y;
if ((((_local2[_local4][_local5].y > 480)) && (!(_local2[_local4][_local5].collected)))){
_local3 = true;
};
_local5++;
};
_local4--;
};
};
if (_local3){
setAllowFire(false);
beginGameOver();
removeEventListener(Event.ENTER_FRAME, moveHexagons);
};
}
public function checkEndGame():void{
var _local1:Boolean;
var _local2:uint;
_local1 = true;
_local2 = 0;
while (_local2 < 5) {
if (_colours[_local2] > 0){
_local1 = false;
};
_local2++;
};
if (_local1){
setAllowFire(false);
if (_currentLevel != 15){
if (!_levelIsOver){
animateLevelTextIn("level complete");
};
_levelIsOver = true;
} else {
animateLevelTextIn("game complete");
_gameIsOver = true;
};
};
}
function xml_progress(_arg1:Event):void{
trace(_arg1.target._progressBytesPerc);
}
public function finishSubmitScoreAnimation1(_arg1:TweenEvent):void{
removeChild(_submitScore_mc);
_submitScore_mc.mask = null;
showMainMenu();
}
public function finishHighScoreAnimation(_arg1:TweenEvent):void{
removeChild(_highScores_mc);
_highScores_mc.mask = null;
showMainMenu();
}
public function endGame(_arg1:TweenEvent){
_hexagonsMoving--;
_tileWorld.removeChild(_arg1.target.obj);
if (_hexagonsMoving == 0){
if (_retriesUsed < 4){
animateLevelTextIn("level failed");
} else {
animateLevelTextIn("game over");
removeBottomBees();
};
if (_gameIsOver){
_arrow.tweenScaleX = new Tween(_arrow, "scaleX", Bounce.easeInOut, 1, 0, 0.8, true);
_arrow.tweenScaleY = new Tween(_arrow, "scaleY", Bounce.easeInOut, 1, 0, 0.8, true);
};
};
}
public function runHighScoreAnimation(){
var _local1:*;
_local1 = buildMask();
_highScores_mc.mask = _local1;
_highScores_mc.x = 166;
_highScores_mc.tweenY = new Tween(_highScores_mc, "y", Regular.easeOut, -44, 317, 1.2, true);
addChild(_highScores_mc);
_xmlPass.addEventListener(ParseXML.XML_LOADED, xml_display);
_xmlPass.addEventListener(ParseXML.XML_FAILED, xml_failed);
_xmlPass.addEventListener(ParseXML.XML_PROGRESS, xml_progress);
_xmlPass.parseURL("http://umbelbee.viral-game.co.uk/data.php?action=scores_daily_xml", true);
}
public function startGame():void{
_gameIsOver = false;
_points = 0;
_previousPoints = 0;
_currentLevel = 1;
_retriesUsed = 0;
_retry.bee1_mc.scaleX = (_retry.bee1_mc.scaleY = 1);
_retry.bee2_mc.scaleX = (_retry.bee2_mc.scaleY = 1);
_retry.bee3_mc.scaleX = (_retry.bee3_mc.scaleY = 1);
_hexagonFallSpeed = 0.1;
_scoreText.score.text = _points;
_scoreText.level.text = _currentLevel;
_musicChannel.soundTransform = _fullVol;
_bassChannel.soundTransform = _muteVol;
animateLevelTextIn("level 1/15");
addChild(_tileWorld);
_arrow.x = 166;
_arrow.y = 525;
_arrow.tweenScaleX = new Tween(_arrow, "scaleX", Bounce.easeInOut, 0, 1, 0.8, true);
_arrow.tweenScaleY = new Tween(_arrow, "scaleY", Bounce.easeInOut, 0, 1, 0.8, true);
addChild(_arrow);
}
public function buildBeeArray(_arg1, _arg2){
var _local3:*;
var _local4:int;
_beeQueue.splice(0, 1);
_local3 = 0;
while (_local3 < _arg1) {
_local4 = Math.ceil((Math.random() * _arg2));
while (_colours[_local4] == 0) {
_local4 = Math.ceil((Math.random() * _arg2));
};
_beeQueue.push(_local4);
_local3++;
};
}
public function showLoadResult(_arg1:Event){
gotoAndPlay(2);
}
public function animateRetryOut1(_arg1:Event):void{
_retry.tweenY = new Tween(_retry, "y", Regular.easeOut, 317, -44, 1.2, true);
_retry.tweenY.addEventListener(TweenEvent.MOTION_FINISH, finishRetryAnimation);
}
public function animateRetryOut():void{
hideRetryBees();
}
public function animateRetryOut2():void{
removeBottomBees();
_arrow.tweenScaleX = new Tween(_arrow, "scaleX", Bounce.easeInOut, 1, 0, 0.8, true);
_arrow.tweenScaleY = new Tween(_arrow, "scaleY", Bounce.easeInOut, 1, 0, 0.8, true);
_retry.tweenY = new Tween(_retry, "y", Regular.easeOut, 317, -44, 1.2, true);
_retry.tweenY.addEventListener(TweenEvent.MOTION_FINISH, finishRetryAnimation1);
}
public function generateToken(){
var _local1:*;
_local1 = new ParseTOKEN(_strURL);
_local1.addEventListener(ParseTOKEN.TOKEN_GENERATED, getToken);
}
function xml_failed(_arg1:Event):void{
trace("failed");
}
public function moveBottomBees():void{
var _local1:*;
_bottomBeesPos[0].tweenX = new Tween(_bottomBeesPos[0], "x", Regular.easeInOut, _bottomBeesPos[1].tx, _bottomBeesPos[0].tx, 0.5, true);
_bottomBeesPos[0].tweenY = new Tween(_bottomBeesPos[0], "y", Regular.easeInOut, _bottomBeesPos[1].ty, _bottomBeesPos[0].ty, 0.5, true);
_bottomBeesPos[1].tweenX = new Tween(_bottomBeesPos[1], "x", Regular.easeInOut, _bottomBeesPos[2].tx, _bottomBeesPos[1].tx, 0.5, true);
_bottomBeesPos[2].tweenX = new Tween(_bottomBeesPos[2], "x", Regular.easeInOut, _bottomBeesPos[3].tx, _bottomBeesPos[2].tx, 0.5, true);
_bottomBeesPos[3].tweenXScale = new Tween(_bottomBeesPos[3], "scaleX", Regular.easeInOut, 0, 0.7, 0.5, true);
_bottomBeesPos[3].tweenYScale = new Tween(_bottomBeesPos[3], "scaleY", Regular.easeInOut, 0, 0.7, 0.5, true);
_local1 = 0;
while (_local1 < 4) {
_bottomBeesPos[_local1].gotoAndStop(_beeQueue[_local1]);
_local1++;
};
if (_multiTask > 0){
beginMultiTaskBee();
};
}
public function beginGameOver():void{
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
_retriesUsed++;
if (_retriesUsed < 4){
_userRetryLevel = true;
} else {
_gameIsOver = true;
};
_tileWorld.mask = _mask1;
setAllowFire(false);
_local1 = _tileWorld._tile_array;
_local2 = (_local1.length - 1);
while (_local2 > -1) {
_local3 = (_local1[_local2].length - 1);
while (_local3 > -1) {
_local4 = _local1.length;
_local5 = _local1[_local2].length;
_local6 = _local1[_local2][_local3];
_local7 = (((_local5 * _local4) - ((_local2 * _local5) + (_local3 + 1))) + 1);
if (!_local6.collected){
_hexagonsMoving++;
_local6.timer = new Timer((25 * _local7), 1);
_local6.timer.addEventListener(TimerEvent.TIMER, removeHexagons(_local6));
_local6.timer.start();
};
_local3--;
};
_local2--;
};
}
public function moveBumbleBee(_arg1:Event){
_arg1.target.x = (_arg1.target.x - _arg1.target.xSpeed);
_arg1.target.y = (_arg1.target.y - _arg1.target.ySpeed);
}
public function animateHighScoreIn(_arg1:TweenEvent):void{
removeMenuSprites();
runHighScoreAnimation();
}
public function buildTiles():void{
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:Boolean;
var _local7:*;
var _local8:*;
var _local9:*;
_submitScoreEnabled = false;
stage.focus = stage;
_colours = null;
_colours = new Array(0, 0, 0, 0, 0, 0, 0, 0);
_gameIsOver = false;
_points = _previousPoints;
_speedUp = 0;
_multiTask = 0;
_lineManager = 0;
_scoreText.score.text = _points;
_scoreText.level.text = _currentLevel;
removeChild(_tileWorld);
_local1 = buildMask1();
_tileWorld = new Object();
_tileWorld = new TileBasedWorld(45, 50, 10, 8, false);
_tileWorld.mask = _local1;
addChild(_tileWorld);
_local2 = _levels[("buildLevel" + _currentLevel)]();
switch (_currentLevel){
case 1:
Tracker.kvEvent(1039);
break;
case 5:
Tracker.kvEvent(1040);
break;
case 10:
Tracker.kvEvent(1041);
break;
case 15:
Tracker.kvEvent(1042);
break;
};
_local3 = _tileWorld._tile_array;
_local4 = 0;
while (_local4 < _local3.length) {
_local5 = 0;
while (_local5 < _local3[_local4].length) {
_local6 = true;
_local3[_local4][_local5].y = (_local3[_local4][_local5].y - ((10 * _local4) + 120));
_local3[_local4][_local5].x = (_local3[_local4][_local5].x + 8.5);
_local3[_local4][_local5].collected = false;
_local3[_local4][_local5].row = _local4;
if (Math.ceil((_local4 / 2)) != (_local4 / 2)){
_local3[_local4][_local5].x = (_local3[_local4][_local5].x + 22.5);
if (_local5 == 7){
_local6 = false;
_local3[_local4][_local5].collected = true;
};
};
if (_local2[_local4][_local5] == 0){
_local6 = false;
_local3[_local4][_local5].collected = true;
};
_local7 = new hexagonMC();
_local8 = Math.ceil((Math.random() * 4));
_local3[_local4][_local5].colour = _local8;
_local3[_local4][_local5].clip = _local7;
_local3[_local4][_local5].type = _local2[_local4][_local5];
_local7.gotoAndStop(_local8);
if (_local2[_local4][_local5] > 1){
_local8 = 5;
_local3[_local4][_local5].colour = 5;
_local7.gotoAndStop(5);
};
_local7.x = _local3[_local4][_local5].x;
_local7.y = _local3[_local4][_local5].y;
_local3[_local4][_local5].hmc = _local7;
if (_local6){
_local9 = ((_local4 * _local3[_local4].length) + (_local5 + 1));
_hexagonsMoving++;
_local7.timer = new Timer((25 * _local9), 1);
_local7.timer.addEventListener(TimerEvent.TIMER, displayHexagons(_local7));
_local7.timer.start();
var _local10 = _colours;
var _local11 = _local8;
var _local12 = (_local10[_local11] + 1);
_local10[_local11] = _local12;
};
_local5++;
};
_local4++;
};
setChildIndex(_arrow, (numChildren - 1));
}
public function animateSendToFriendOut():void{
_sendToFriend_mc.tweenY = new Tween(_sendToFriend_mc, "y", Regular.easeOut, 317, -44, 1.2, true);
_sendToFriend_mc.tweenY.addEventListener(TweenEvent.MOTION_FINISH, finishSendToFriendAnimation);
}
public function animateRetryIn():void{
var _local1:*;
_musicChannel.soundTransform = _muteVol;
_bassChannel.soundTransform = _fullVol;
_local1 = buildMask();
_retry.mask = _local1;
_retry.x = 166;
_retry.tweenY = new Tween(_retry, "y", Regular.easeOut, -44, 317, 1.2, true);
addChild(_retry);
}
public function hideRetryBees():void{
var _local1:*;
_local1 = _retry[(("bee" + _retriesUsed) + "_mc")];
_local1.tweenScaleX = new Tween(_local1, "scaleX", Back.easeIn, 1, 0, 0.8, true);
_local1.tweenScaleY = new Tween(_local1, "scaleY", Back.easeIn, 1, 0, 0.8, true);
_local1.tweenScaleY.addEventListener(TweenEvent.MOTION_FINISH, animateRetryOut1);
}
public function buildGameEngine(){
var _local1:*;
_arrow = new arrowPointer();
_umbelBeeLogo = new umbelBeeLogo();
_playGame_btn = new playGame_btn();
_highscores_btn = new highScores_btn();
_sendToFriend_btn = new sendToFriend_btn();
_visitUmbel_btn = new visitUmbel_btn();
_sendToFriend_mc = new sendToFriend();
_highScores_mc = new topScores();
_submitScore_mc = new submitScore();
_fire_snd = new fire_snd();
_collect_snd = new collect_snd();
_umbelPwr_snd = new umbelPwr_snd();
_musicLoop_snd = new musicLoop_snd();
_bassLoop_snd = new bassLoop_snd();
_levelText = new lText();
_scoreText = new score_mc();
_local1 = 1;
while (_local1 < 6) {
_sendToFriend_mc[("fe" + _local1)].text = "";
_sendToFriend_mc.ye1.text = "";
_local1++;
};
_submitScore_mc.yourName.text = "";
_submitScore_mc.yourEmail.text = "";
_mask.graphics.beginFill(0x666666);
_mask.graphics.drawRect(6, 134, 320, 425);
_mask.graphics.endFill();
_mask1.graphics.beginFill(0x666666);
_mask1.graphics.drawRect(6, 134, 320, 365);
_mask1.graphics.endFill();
_tileWorld.mask = _mask;
addChild(_keyboardControls);
addChild(_border);
_muteButton.buttonMode = true;
_muteButton.x = 15;
_muteButton.y = 542;
_muteButton.scaleX = (_muteButton.scaleY = 0.6);
_muteButton.addEventListener(MouseEvent.MOUSE_DOWN, muteSound);
_muteButton.rotation = 45;
_border.addChild(_muteButton);
addChild(_scoreText);
_scoreText.score.text = _points;
_scoreText.level.text = _currentLevel;
_scoreText.x = 95;
_scoreText.y = 525;
_keyboardControls.addEventListener(KeyboardControls.MULTI_KEYS_DOWN, moveArrow);
_keyboardControls.addEventListener(KeyboardControls.SINGLE_KEY_DOWN, fireBee);
addEventListener(MouseEvent.MOUSE_DOWN, buttonPress);
_bassChannel = _bassLoop_snd.play(0, 999999);
_musicChannel = _musicLoop_snd.play(0, 99999);
showMainMenu();
generateToken();
}
public function resetBee1(_arg1:TweenEvent):void{
setAllowFire(true);
}
public function textScreenFinish(_arg1:TweenEvent):void{
if (((_bonusPlay) && (!(_levelIsOver)))){
_gameInPlay = true;
_bonusPlay = false;
} else {
if (_gameIsOver){
animateSubmitScoreIn();
_gameInPlay = false;
_bonusPlay = false;
} else {
if (_userRetryLevel){
_gameInPlay = false;
_userRetryLevel = false;
animateRetryIn();
} else {
if (_levelIsOver){
_gameInPlay = false;
_currentLevel++;
animateLevelTextIn((("level " + _currentLevel) + "/15"));
_levelIsOver = false;
_bonusPlay = false;
} else {
if (!_gameInPlay){
_userRetryLevel = false;
_levelIsOver = false;
_gameIsOver = false;
_bonusPlay = false;
_gameInPlay = true;
_hexagonFallSpeed = (_hexagonFallSpeed + 0.025);
_previousPoints = _points;
buildTiles();
if (_currentLevel == 1){
buildBeeArray(4, 4);
buildBotomBees();
};
};
};
};
};
};
}
public function showPreloader(_arg1:Event){
}
public function animateSubmitScoreOut1():void{
_submitScore_mc.tweenY = new Tween(_submitScore_mc, "y", Regular.easeOut, 317, -44, 1.2, true);
_submitScore_mc.tweenY.addEventListener(TweenEvent.MOTION_FINISH, finishSubmitScoreAnimation1);
}
}
}//package
Section 51
//umbelPwr_snd (umbelPwr_snd)
package {
import flash.media.*;
public dynamic class umbelPwr_snd extends Sound {
}
}//package
Section 52
//whip_snd (whip_snd)
package {
import flash.media.*;
public dynamic class whip_snd extends Sound {
}
}//package
Section 53
//whoop_snd (whoop_snd)
package {
import flash.media.*;
public dynamic class whoop_snd extends Sound {
}
}//package
Section 54
//visitUmbel_btn (visitUmbel_btn)
package {
import flash.display.*;
public dynamic class visitUmbel_btn extends SimpleButton {
}
}//package