Section 1
//png (collisoastrotiles.png)
package collisoastrotiles {
import flash.display.*;
public dynamic class png extends BitmapData {
public function png(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package collisoastrotiles
Section 2
//png (collisocells.png)
package collisocells {
import flash.display.*;
public dynamic class png extends BitmapData {
public function png(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package collisocells
Section 3
//png (collisologo.png)
package collisologo {
import flash.display.*;
public dynamic class png extends BitmapData {
public function png(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package collisologo
Section 4
//k9953 (com.kurohako.lib.k9953)
package com.kurohako.lib {
public class k9953 {
private static var mykey:Array = new Array(0xFF);
private static var sbox:Array = new Array(0xFF);
public function decrypt(_arg1:String, _arg2:String):String{
var _local3:Array;
var _local4:Array;
var _local5:Array;
_local3 = k08aa(_arg1);
_local4 = k2e26(_arg2);
_local5 = calculate(_local3, _local4);
return (k2260(_local5));
}
public function k53c8(_arg1:String, _arg2:String):String{
var _local3:Array;
var _local4:Array;
var _local5:Array;
_local3 = k2e26(_arg1);
_local4 = k2e26(_arg2);
_local5 = calculate(_local3, _local4);
return (k4644(_local5));
}
private static function k4644(_arg1:Array):String{
var _local2:String;
var _local3:Array;
var _local4:Number;
_local2 = new String("");
_local3 = new Array("0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f");
_local4 = 0;
while (_local4 < _arg1.length) {
_local2 = (_local2 + (_local3[(_arg1[_local4] >> 4)] + _local3[(_arg1[_local4] & 15)]));
_local4++;
};
return (_local2);
}
private static function calculate(_arg1:Array, _arg2:Array):Array{
var _local3:Number;
var _local4:Number;
var _local5:Array;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:Number;
k30db(_arg2);
_local3 = 0;
_local4 = 0;
_local5 = new Array();
_local9 = 0;
while (_local9 < _arg1.length) {
_local3 = ((_local3 + 1) % 0x0100);
_local4 = ((_local4 + sbox[_local3]) % 0x0100);
_local7 = sbox[_local3];
sbox[_local3] = sbox[_local4];
sbox[_local4] = _local7;
_local10 = ((sbox[_local3] + sbox[_local4]) % 0x0100);
_local6 = sbox[_local10];
_local8 = (_arg1[_local9] ^ _local6);
_local5.push(_local8);
_local9++;
};
return (_local5);
}
private static function k30db(_arg1:Array):void{
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Number;
_local2 = 0;
_local4 = _arg1.length;
_local5 = 0;
_local5 = 0;
while (_local5 <= 0xFF) {
mykey[_local5] = _arg1[(_local5 % _local4)];
sbox[_local5] = _local5;
_local5++;
};
_local5 = 0;
while (_local5 <= 0xFF) {
_local2 = (((_local2 + sbox[_local5]) + mykey[_local5]) % 0x0100);
_local3 = sbox[_local5];
sbox[_local5] = sbox[_local2];
sbox[_local2] = _local3;
_local5++;
};
}
private static function k2e26(_arg1:String):Array{
var _local2:Array;
var _local3:Number;
_local2 = new Array();
_local3 = 0;
while (_local3 < _arg1.length) {
_local2.push(_arg1.charCodeAt(_local3));
_local3++;
};
return (_local2);
}
private static function k08aa(_arg1:String):Array{
var _local2:Array;
var _local3:Number;
_local2 = new Array();
_local3 = ((_arg1.substr(0, 2))=="0x") ? 2 : 0;
while (_local3 < _arg1.length) {
_local2.push(parseInt(_arg1.substr(_local3, 2), 16));
_local3 = (_local3 + 2);
};
return (_local2);
}
private static function k2260(_arg1:Array):String{
var _local2:String;
var _local3:Number;
_local2 = new String("");
_local3 = 0;
while (_local3 < _arg1.length) {
_local2 = (_local2 + String.fromCharCode(_arg1[_local3]));
_local3++;
};
return (_local2);
}
}
}//package com.kurohako.lib
Section 5
//kdae9 (com.kurohako.lib.kdae9)
package com.kurohako.lib {
import flash.display.*;
import flash.utils.*;
import flash.geom.*;
public class kdae9 {
private var k8a2c:Object;
public function kdae9(){
k8a2c = {};
}
public function k4e07(_arg1:String, _arg2:String):Boolean{
var assetClass:Class;
var instance:*;
var assetName = _arg1;
var slices = _arg2;
try {
assetClass = (getDefinitionByName(assetName) as Class);
instance = new assetClass(null, null);
if ((instance is BitmapData)){
k577d(instance, slices.split(","));
return (true);
};
} catch(e:Error) {
};
return (false);
}
private function k577d(_arg1:BitmapData, _arg2:Array):void{
var _local3:String;
var _local4:int;
var _local5:int;
var _local6:int;
var _local7:int;
var _local8:Number;
var _local9:int;
_local7 = _arg2.length;
_local8 = (_arg1.width / _local7);
_local9 = 0;
while (_local9 < _local7) {
_local3 = _arg2[_local9];
k8a2c[_local3] = new BitmapData(_local8, _arg1.height, true, 0xFFFFFF);
k8a2c[_local3].copyPixels(_arg1, new Rectangle(_local6, 0, _local8, _arg1.height), new Point(0, 0));
_local6 = (_local6 + _local8);
_local9++;
};
_arg1.dispose();
}
public function k4ea3(_arg1:String):Bitmap{
if (k8a2c[_arg1]){
if ((k8a2c[_arg1] is BitmapData)){
return (new Bitmap(k8a2c[_arg1]));
};
};
return (null);
}
}
}//package com.kurohako.lib
Section 6
//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 7
//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 8
//png (kurohako_logo.png)
package kurohako_logo {
import flash.display.*;
public dynamic class png extends BitmapData {
public function png(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package kurohako_logo
Section 9
//Colliso (Colliso)
package {
import flash.display.*;
import flash.events.*;
import com.kurohako.lib.*;
import fl.transitions.*;
import flash.text.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.filters.*;
public class Colliso extends MovieClip {
private var k80ae:int;// = 40
private var ka080:kdae9;
private var k420a:Array;
private var k040c:int;
private var k4696:TextField;
private var k29fb:Sprite;
private var kba67:int;
private var k380e:int;// = 9
private var k54f8:int;// = 40
private var k02a8:int;// = 9
private var k5ba8:Dictionary;
private var k6778:Sprite;
private var k2fc1:int;// = 36
private var kff6d:int;// = 200
private var k8749:TextField;
private var kaf78:int;// = -1
private var k3afb:TextField;
private var k885a:Bitmap;
private var kfcd8:int;
private var kd0f4:Bitmap;
private var k3fa2:Boolean;
private var k4b4d:Sprite;
private var k3867:Array;
private var scoreText:TextField;
private var bonusLabelText:TextField;
private var k5b42:Sprite;
private var k8f21:Bitmap;
private var kbc10:Sprite;
private var k23ae:Sprite;
private var k7ef8:String;
private var keaf1:TextField;
private var kec99:Array;
private var k6cf8:String;
private var k5ae9:k9953;
private var k46ac:int;
private var k0827:TextField;
private var k0c69:ke33c;
private var ka495:int;
private var kf709:Bitmap;
private var kf704:Class;
private var k3ff3:Bitmap;
private var kcd1d:TextField;
private var k1d6a:Timer;
private var ke85e:SimpleButton;
private var k3f60:int;// = 8
private var k69f2:Sprite;
private var ka713:TextField;
private var k6039:SharedObject;
private var kf71c:Boolean;
private var k94bb:Timer;
private var k0738:TextField;
private var kce65:String;// = "92a10861945e95939fe2b13cb5e639d7"
private var k55b3:Array;
private var kf03d:Sprite;
private var ka1fb:int;
private var kd41e:int;
private var kcdeb:String;// = "Rockwell Extra Bold"
private var k966b:TextField;
private var k67d4;
private var kf869:String;
private var scoreLabelText:TextField;
private var kd4da:TextField;
private var kcd69:Array;
private var k345b:Timer;
private var k56f4:MovieClip;
private var infoWidth:int;// = 172
private var bonusText:TextField;
private var k16c0:String;
private var k15a1:Array;
public function Colliso(){
k5ae9 = new k9953();
kce65 = "92a10861945e95939fe2b13cb5e639d7";
kcdeb = "Rockwell Extra Bold";
k02a8 = 9;
k380e = 9;
k54f8 = 40;
k80ae = 40;
kff6d = 200;
k2fc1 = 36;
k3f60 = 8;
infoWidth = 172;
k420a = ["7:0,3,5,8,16,27,44,45,64,72,76,80:43,59-4,31-14,29-38,58", "9:0,1,3,5,7,8,9,17,27,35,45,46,52,53,63,71,72,73,75,77,79,80:r20,r24-r38,58-28,r34-31,33-r11,29-15,r42", "18:0,1,2,5,6,7,8,18,26,45,53,54,62,63,71,72,73,74,78,79,80:36,r75-40,58-48,50-17,r44-r35,r77-r13,22-9,27-r4,76", "12:2,6,10,16,19,20,24,25,28,34,36,44,46,52,73,75,77,79:r11,r68-r29,56-r15,r66-r3,r5-14,r62-12,33,54,60", "17:1,3,5,8,16,18,35,45,53,55,64,65,71,75,78:19,46-27,69-42,66-30,52-50,77-12,62-36,76-2,22-32,56", "18:0,4,8,10,16,36,44,64,70,72,76,80:11,65-12,28-r31,r39,r41,r49-14,68-34,r67-25,61-r13,r37,r43,46-66,69-15,55-19,52", "18:0,3,5,8,27,35,54,62,72,75,77,80:11,x57-4,66-r50,r52-r15,x16-x59,r68-x13,x22-r10,r40-18,x26-46,48", "16:2,8,11,12,14,16,20,53,56,65,66,68,70,74,80:51,r76-x4,18-r45,r72-1,r28-33,x35-r40,x55-42,64-r9,x41", "21:1,3,5,7,9,11,15,17,27,35,45,53,72,75,77,80:x4,50-x10,28-r31,34-r23,x43-x58,r60-16,x48-20,66,x68,x70-r40,x64-x21,r24-x37,r56", "27:1,22,31,36,38,39,41,42,44,49,58,79:x62,69-r12,r14-x16,34,x73,x75-r2,r8,r28,r46-3,x32,x72,r78-11,x52-4,r26-x51,53-10,x17-r63,r71-x48,66-47,55"];
kba67 = (Math.random() * 2);
kaf78 = -1;
super();
contextMenu = new ContextMenu();
contextMenu.hideBuiltInItems();
contextMenu.customItems.push(new ContextMenuItem("Copyright © 2007 kurohako.com"));
loaderInfo.addEventListener(Event.INIT, kfb56);
}
private function k53a7(_arg1:Event=null):void{
k5b42.mouseChildren = true;
if (k94bb){
k94bb.start();
};
kbc10.graphics.clear();
ke4c2(kbc10, "y", kbc10.y, -(loaderInfo.height), 0.5);
}
private function k3bd4():void{
var screen:Sprite;
var copyrightText:TextField;
var style:StyleSheet;
if (((((getTimer() - k040c) < 7000)) && ((ka495 < 5)))){
ka495++;
setTimeout(k2485, 10000);
return;
};
kf76b(null);
if (kf704){
kf704.k9e14.parent.removeChild(kf704.k9e14);
};
k69f2 = new Sprite();
k69f2.buttonMode = true;
k69f2.addChild(ka080.k4ea3("logo"));
k69f2.addEventListener(MouseEvent.CLICK, function (_arg1:MouseEvent){
navigateToURL(new URLRequest("http://kurohako.com"));
});
screen = new Sprite();
screen.graphics.beginFill(0);
screen.graphics.drawRoundRect(0, 0, loaderInfo.width, loaderInfo.height, 16, 16);
screen.graphics.endFill();
screen.filters = [new BevelFilter(4, 45, 0xDDDDDD, 0.5, 0, 0.5), new BevelFilter(4, 215, 0xDDDDDD, 0.5, 0, 0.5)];
k23ae.addChild(screen);
copyrightText = k3e3d(10, 0x777777);
copyrightText.htmlText = "Colliso version 1.0 :: Copyright © 2007 <a href=\"event:http://kurohako.com\">www.kurohako.com</a>";
copyrightText.width = loaderInfo.width;
copyrightText.height = (copyrightText.textHeight + 4);
copyrightText.y = ((loaderInfo.height - copyrightText.textHeight) - 8);
copyrightText.filters = null;
style = new StyleSheet();
style.setStyle("a", {color:"#FFFFFF"});
style.setStyle("a:hover", {color:"#FFCC00"});
copyrightText.styleSheet = style;
copyrightText.addEventListener(TextEvent.LINK, k0785);
k23ae.addChild(copyrightText);
kd0f4 = ka080.k4ea3("gamelogo");
k23ae.addChild(kd0f4);
kd0f4.y = 8;
kd0f4.x = int(((loaderInfo.width - kd0f4.width) / 2));
k8749 = (k5b42.addChild(k3e3d(13, 14540185)) as TextField);
if (k7ef8){
k8749.text = k7ef8;
};
k8749.width = infoWidth;
k8749.height = (k8749.textHeight + 4);
k8749.rotation = -1;
k8749.x = k3f60;
k8749.y = 110;
k8749.visible = false;
ke2ff(0);
}
private function k30a6(_arg1:Event):void{
var _local2:Sprite;
var _local3:TextField;
var _local4:Sprite;
var _local5:int;
var _local6:int;
var _local7:int;
var _local8:int;
var _local9:Number;
var _local10:Number;
var _local11:TextField;
var _local12:SimpleButton;
var _local13:int;
ke2ff(-1);
ka1fb = 0;
_local2 = new Sprite();
_local3 = k3e3d(14, 0xFF6600);
_local3.autoSize = "left";
_local3.text = "- PLEASE CHOOSE A LEVEL -";
_local2.addChild(_local3);
_local6 = _local3.height;
_local7 = k420a.length;
_local8 = 0;
while (_local8 < _local7) {
_local13 = (_local8 + 1);
_local4 = k560b(_local13);
_local4.x = ((k54f8 + 5) * _local5);
_local4.y = _local6;
_local5++;
if (_local5 == 12){
_local5 = 0;
_local6 = (_local6 + (_local4.height + 5));
};
_local2.addChild(_local4);
_local8++;
};
_local3.x = int(((_local2.width - _local3.width) / 2));
if (k3afb == null){
k3afb = k3e3d(14, 0xFFBB00);
k3afb.text = "W";
k3afb.height = (k3afb.textHeight + 4);
k3afb.text = "";
k3afb.width = _local2.width;
k3afb.y = (_local4.height + _local6);
};
_local2.addChild(k3afb);
_local9 = 0;
_local10 = (100 / (_local7 * 4));
_local7 = kec99.length;
_local8 = 0;
while (_local8 < _local7) {
if (kec99[_local8]["moves"] != null){
_local9 = (_local9 + _local10);
if (kec99[_local8]["moves"] <= k420a[_local8][0]){
_local9 = (_local9 + _local10);
};
if (k15a1 != null){
if (k15a1[_local8] != null){
if (k15a1[_local8]["moves"] != null){
_local9 = (_local9 + _local10);
if (k15a1[_local8]["moves"] <= (k420a[_local8][0] * 4)){
_local9 = (_local9 + _local10);
};
};
};
};
};
_local8++;
};
_local11 = k3e3d(14, 0xFF9900);
_local11.autoSize = "left";
_local11.htmlText = (("COMPLETION\n<font color='#DDDD99'>" + _local9) + "%</font>");
_local11.x = int(((_local2.width - _local11.width) / 2));
_local11.y = ((k3afb.y + k3afb.height) + 20);
_local2.addChild(_local11);
_local12 = k0dd4("DELETE DATA", kd19d);
_local12.y = ((_local11.y + _local11.height) + 30);
_local12.x = int(((_local2.width - _local12.width) / 2));
_local2.addChild(_local12);
k92b6(_local2);
}
private function kf76b(_arg1:DisplayObjectContainer, _arg2:int=0, _arg3:int=0):void{
var progressIndicator:Class;
var clip = _arg1;
var x = _arg2;
var y = _arg3;
if (clip == null){
if (k67d4){
k1d6a.stop();
k1d6a = null;
k67d4.parent.removeChild(k67d4);
};
} else {
try {
progressIndicator = (ApplicationDomain.currentDomain.getDefinition("progressIndicator") as Class);
k67d4 = clip.addChild(new (progressIndicator));
k67d4.x = x;
k67d4.y = y;
k1d6a = new Timer(80);
k1d6a.addEventListener("timer", function (_arg1:TimerEvent){
k67d4.rotation = (k67d4.rotation + 60);
});
k1d6a.start();
} catch(e:Error) {
};
};
}
private function k0785(_arg1:TextEvent):void{
var evt = _arg1;
try {
navigateToURL(new URLRequest(evt.text));
} catch(e:Error) {
};
}
private function k2605(_arg1:MouseEvent):void{
if (k0c69){
k0c69.filters = [];
};
k0c69 = (_arg1.target as ke33c);
k0c69.parent.setChildIndex(k0c69, (k0c69.parent.numChildren - 1));
k0c69.filters = [new GlowFilter(0xFF9900, 0.8, 6, 6), new GlowFilter(0xFFFFFF, 0.8, 9, 9)];
kf03d.addEventListener(MouseEvent.MOUSE_MOVE, kb17e);
kf03d.addEventListener(MouseEvent.ROLL_OUT, k2851);
stage.addEventListener(MouseEvent.MOUSE_UP, kbdde);
}
public function kaf32(_arg1):void{
}
private function kb17e(_arg1:MouseEvent):void{
var _local2:int;
var _local3:int;
var _local4:int;
var _local5:Boolean;
var _local6:Bitmap;
var _local7:int;
_local2 = ((int((k0c69.y / k80ae)) * k02a8) + int((k0c69.x / k54f8)));
_local3 = (k0c69.mouseX - (k54f8 / 2));
_local4 = (k0c69.mouseY - (k80ae / 2));
_local5 = (Math.abs(_local4) > Math.abs(_local3));
k2851(null);
if (_arg1.target === k0c69){
return;
};
_local7 = (k02a8 * k380e);
if ((((((_local4 > 0)) && (((_local2 + k02a8) < _local7)))) && ((k55b3[(_local2 + k02a8)] == null)))){
k46ac = 1;
_local6 = ka080.k4ea3("arrowdown");
_local6.y = (k0c69.y + k80ae);
_local6.x = k0c69.x;
} else {
if ((((((_local4 <= 0)) && (((_local2 - k02a8) >= 0)))) && ((k55b3[(_local2 - k02a8)] == null)))){
k46ac = 2;
_local6 = ka080.k4ea3("arrowup");
_local6.y = (k0c69.y - k80ae);
_local6.x = k0c69.x;
};
};
if (((!(_local5)) || (((_local5) && ((_local6 == null)))))){
if ((((((_local3 > 0)) && ((((_local2 + k02a8) + 1) % k02a8)))) && ((k55b3[(_local2 + 1)] == null)))){
k46ac = 3;
_local6 = ka080.k4ea3("arrowright");
_local6.x = (k0c69.x + k54f8);
_local6.y = k0c69.y;
} else {
if ((((((_local3 <= 0)) && (((_local2 + k02a8) % k02a8)))) && ((k55b3[(_local2 - 1)] == null)))){
k46ac = 4;
_local6 = ka080.k4ea3("arrowleft");
_local6.x = (k0c69.x - k54f8);
_local6.y = k0c69.y;
};
};
};
if (this.k885a){
this.k885a.bitmapData = _local6.bitmapData;
this.k885a.x = _local6.x;
this.k885a.y = _local6.y;
} else {
if (_local6){
this.k885a = (kf03d.addChild(_local6) as Bitmap);
};
};
}
private function ke1a9():Boolean{
var _local1:Boolean;
var _local2:int;
var _local3:*;
var _local4:Sprite;
var _local5:TextField;
var _local6:SimpleButton;
_local1 = true;
_local2 = (k02a8 * k380e);
_local3 = 0;
while (_local3 < _local2) {
if (((k55b3[_local3]) && (!((k55b3[_local3] == "block"))))){
_local1 = false;
break;
};
_local3++;
};
if (_local1){
if (kaf78 > 0){
if (k3867.length == 0){
_local4 = new Sprite();
_local5 = k3e3d(14, 0xFFCC00);
_local5.wordWrap = true;
_local5.width = 308;
_local5.htmlText = (((((("<font color='#FF6600' size='18'>SUCCESS!</font>\nYOU HAVE SOLVED <font color='#DDDD99'>LEVEL " + ka1fb) + "+</font>\n\nMOVES: <font color='#DDDD99'>") + k37ae) + "</font> TIME USED: <font color='#DDDD99'>") + k7ab0) + " secs</font>");
_local5.height = (_local5.textHeight + 4);
if ((((((((k15a1[(ka1fb - 1)] == null)) || ((k15a1[(ka1fb - 1)]["moves"] == null)))) || ((k15a1[(ka1fb - 1)]["moves"] > k37ae)))) || ((((k15a1[(ka1fb - 1)]["moves"] == k37ae)) && ((k15a1[(ka1fb - 1)]["secs"] < k7ab0)))))){
k15a1[(ka1fb - 1)] = {moves:k37ae, secs:k7ab0};
ke98d(ka1fb, true);
};
_local6 = k0dd4("- OK -", k30a6);
_local6.y = ((_local5.y + _local5.height) + 10);
_local6.x = int(((308 - _local6.width) / 2));
_local4.addChild(_local5);
_local4.addChild(_local6);
ka1fb = 0;
k92b6(_local4);
return (true);
} else {
kf007(ka1fb, true);
};
} else {
_local4 = new Sprite();
_local5 = k3e3d(14, 0xFF9900);
_local5.wordWrap = true;
_local5.width = 428;
_local5.multiline = true;
_local5.htmlText = (((((("<font color='#FF6600' size='18'>SUCCESS!</font>\nYOU HAVE SOLVED <font color='#DDDD99'>LEVEL " + ka1fb) + "</font>\nMOVES: <font color='#DDDD99'>") + k37ae) + "</font> TIME USED: <font color='#DDDD99'>") + k7ab0) + " secs</font>");
if ((((kec99[(ka1fb - 1)]["moves"] == null)) || ((kec99[(ka1fb - 1)]["moves"] > k420a[(ka1fb - 1)][0])))){
if (k37ae <= k420a[(ka1fb - 1)][0]){
_local5.htmlText = (_local5.htmlText + (("\n\nEXCELLENT!\nYOU HAVE UNLOCKED <font color='#DDDD99'>LEVEL " + ka1fb) + "+</font>"));
} else {
_local5.htmlText = (_local5.htmlText + (((("\n\nTRY HARDER!\nYOU NEED TO SOLVE THE PUZZLE\nWITHIN <font color='#DDDD99'>" + k420a[(ka1fb - 1)][0]) + "</font> MOVES TO UNLOCK <font color='#DDDD99'>LEVEL ") + ka1fb) + "+</font>"));
};
};
if ((((((((kec99[(ka1fb - 1)] == null)) || ((kec99[(ka1fb - 1)]["moves"] == null)))) || ((kec99[(ka1fb - 1)]["moves"] > k37ae)))) || ((((kec99[(ka1fb - 1)]["moves"] == k37ae)) && ((kec99[(ka1fb - 1)]["secs"] > k7ab0)))))){
kec99[(ka1fb - 1)] = {moves:k37ae, secs:k7ab0};
ke98d(ka1fb);
};
_local5.height = (_local5.textHeight + 4);
if (k420a.length >= (ka1fb + 1)){
kec99[ka1fb] = {};
};
_local6 = k0dd4("- OK -", k30a6);
_local6.y = ((_local5.y + _local5.height) + 10);
_local4.addChild(_local5);
_local4.addChild(_local6);
_local6.x = int(((_local4.width - _local6.width) / 2));
ka1fb = 0;
k92b6(_local4);
return (true);
};
};
return (false);
}
public function get k37ae():int{
return (parseInt(k5ae9.decrypt(k16c0, kf869)));
}
private function k0dd4(_arg1:String, _arg2:Function, _arg3:int=8755589):SimpleButton{
var _local4:Sprite;
var _local5:TextField;
var _local6:Sprite;
var _local7:TextField;
var _local8:Sprite;
var _local9:TextField;
var _local10:SimpleButton;
_local4 = new Sprite();
_local5 = k3e3d(16, 14540185);
_local5.autoSize = "left";
_local5.text = _arg1;
_local4.addChild(_local5);
_local6 = new Sprite();
_local7 = k3e3d(16, 0xFFCC00);
_local7.text = _arg1;
_local7.width = _local5.width;
_local7.height = _local5.height;
_local6.addChild(_local7);
_local8 = new Sprite();
_local9 = k3e3d(14, _arg3);
_local9.text = _arg1;
_local9.width = _local5.width;
_local9.height = _local5.height;
_local8.addChild(_local9);
_local10 = new SimpleButton(_local8, _local4, _local6, _local8);
_local10.addEventListener(MouseEvent.CLICK, _arg2, false, 0, true);
return (_local10);
}
private function k2851(_arg1:MouseEvent):void{
if (k885a){
kf03d.removeChild(k885a);
k885a.bitmapData = null;
k885a = null;
};
k46ac = 0;
}
private function k4ae3(_arg1:String, _arg2:Function, _arg3:Function):void{
var _local4:Sprite;
var _local5:TextField;
var _local6:SimpleButton;
var _local7:SimpleButton;
_local4 = new Sprite();
_local5 = k3e3d(14, 0xFF9900);
_local5.wordWrap = true;
_local5.width = 428;
_local5.text = _arg1;
_local5.height = (_local5.textHeight + 4);
_local4.addChild(_local5);
_local6 = k0dd4("YES", _arg2, 0xFFCC00);
_local6.y = ((_local5.y + _local5.height) + 10);
_local7 = k0dd4("NO", _arg3, 0xFFCC00);
_local7.y = _local6.y;
_local6.x = int(((((_local4.width - _local6.width) - _local7.width) - 100) / 2));
_local7.x = ((_local6.x + _local6.width) + 100);
_local4.addChild(_local6);
_local4.addChild(_local7);
k92b6(_local4);
}
public function set k37ae(_arg1:int):void{
k16c0 = k5ae9.k53c8(_arg1.toString(), kf869);
if (k0738){
k0738.text = ((_arg1.toString() + " / ") + kd41e);
};
}
private function ke9f1(_arg1:TimerEvent):void{
if (kfcd8++ == 17){
while (k4b4d.numChildren) {
k4b4d.removeChildAt(0);
};
kfcd8 = 0;
};
ke2ff(kfcd8);
}
private function ka117(_arg1:Event):void{
k4ae3("ARE YOU SURE YOU WANT TO RESTART THIS LEVEL?", k6353, k53a7);
}
public function set k7ab0(_arg1:int):void{
var cryptedValue:String;
var mins:int;
var hrs:int;
var secs:int;
var value = _arg1;
cryptedValue = k5ae9.k53c8(value.toString(), kf869);
if (((k6cf8) && ((cryptedValue == k6cf8)))){
return;
};
k6cf8 = cryptedValue;
if (value == 0){
if (k94bb){
k94bb.reset();
} else {
k94bb = new Timer(1000);
k94bb.addEventListener("timer", function (_arg1:TimerEvent){
k7ab0++;
}, false, 0, true);
};
k94bb.start();
};
if (k0827){
mins = (value / 60);
hrs = (mins / 60);
mins = (mins % 60);
secs = (value % 60);
k0827.text = ((((((hrs) ? (hrs + ":") : "" + ((mins)<10) ? "0" : "") + mins) + ":") + ((secs)<10) ? "0" : "") + secs);
};
}
private function k2676(_arg1:Event):void{
var _local2:int;
k3afb.text = "NOT SOLVED";
if (_arg1.target.name.charAt(0) == "x"){
_local2 = (parseInt(_arg1.target.name.substr(1)) - 1);
if (((k15a1[_local2]) && (k15a1[_local2]["moves"]))){
k3afb.htmlText = (((((("MOVES: <font color='#DDDD99'>" + k15a1[_local2]["moves"]) + "/") + (k420a[_local2][0] * 4)) + "</font>\tTIME USED: <font color='#DDDD99'>") + k15a1[_local2]["secs"]) + " secs</font>");
};
} else {
_local2 = (parseInt(_arg1.target.name) - 1);
if (((kec99[_local2]) && (kec99[_local2]["moves"]))){
k3afb.htmlText = (((((("MOVES: <font color='#DDDD99'>" + kec99[_local2]["moves"]) + "/") + k420a[_local2][0]) + "</font>\tTIME USED: <font color='#DDDD99'>") + kec99[_local2]["secs"]) + " secs</font>");
};
};
k3afb.visible = true;
}
private function kf007(_arg1:int, _arg2:Boolean=false):void{
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:ke33c;
var _local13:int;
var _local14:String;
var _local15:Array;
var _local16:BitmapData;
var _local17:SimpleButton;
var _local18:SimpleButton;
if (_arg2){
kaf78 = k3867.shift();
};
if (kf03d == null){
k8749.visible = true;
kd4da = (k5b42.addChild(k3e3d(14, 0xFF6600, false)) as TextField);
kd4da.text = "LEVEL";
kd4da.width = infoWidth;
kd4da.height = (kd4da.textHeight + 4);
kd4da.rotation = -1;
kd4da.x = k3f60;
kd4da.y = 160;
keaf1 = (k5b42.addChild(k3e3d(14, 14540185, false)) as TextField);
keaf1.text = "1";
keaf1.width = infoWidth;
keaf1.height = (keaf1.textHeight + 4);
keaf1.rotation = -1;
keaf1.x = (k3f60 + 10);
keaf1.y = (kd4da.y + 12);
ka713 = (k5b42.addChild(k3e3d(14, 0xFF6600, false)) as TextField);
ka713.text = "MOVES";
ka713.width = infoWidth;
ka713.height = (ka713.textHeight + 4);
ka713.rotation = -1;
ka713.x = k3f60;
ka713.y = (kd4da.y + 50);
k0738 = (k5b42.addChild(k3e3d(14, 14540185, false)) as TextField);
k0738.text = "0";
k0738.width = infoWidth;
k0738.height = (k0738.textHeight + 4);
k0738.rotation = -1;
k0738.x = (k3f60 + 10);
k0738.y = (ka713.y + 12);
k966b = (k5b42.addChild(k3e3d(14, 0xFF6600, false)) as TextField);
k966b.text = "TIME USED";
k966b.width = infoWidth;
k966b.height = (k966b.textHeight + 4);
k966b.rotation = -1;
k966b.x = k3f60;
k966b.y = (ka713.y + 50);
k0827 = (k5b42.addChild(k3e3d(14, 14540185, false)) as TextField);
k0827.text = "00:00";
k0827.width = infoWidth;
k0827.height = (k0827.textHeight + 4);
k0827.rotation = -1;
k0827.x = (k3f60 + 10);
k0827.y = (k966b.y + 12);
ke85e = k0dd4("UNDO", k84f3);
ke85e.rotation = -1;
ke85e.x = int(((kff6d - ke85e.width) / 2));
ke85e.y = 315;
k5b42.addChild(ke85e);
_local17 = k0dd4("RESTART LEVEL", ka117);
_local17.rotation = 1;
_local17.x = int(((kff6d - _local17.width) / 2));
_local17.y = 345;
k5b42.addChild(_local17);
_local18 = k0dd4("QUIT", kf1f9);
_local18.rotation = -1;
_local18.x = int(((kff6d - _local18.width) / 2));
_local18.y = 375;
k5b42.addChild(_local18);
};
if ((((_arg1 < 1)) || ((_arg1 > k420a.length)))){
_arg1 = 1;
};
var _temp1 = _arg1;
_arg1 = (_arg1 - 1);
ka1fb = _temp1;
keaf1.text = (ka1fb.toString() + (_arg2) ? "+" : "");
while (((k6778) && (k6778.numChildren))) {
k6778.removeChildAt(0);
};
k55b3 = [];
if (k420a[_arg1] != null){
if ((k420a[_arg1] is String)){
k420a[_arg1] = k420a[_arg1].split(":", 14);
};
} else {
return;
};
if ((((k420a[_arg1][1] is String)) && (k420a[_arg1][1].length))){
k420a[_arg1][1] = k420a[_arg1][1].split(",");
};
if ((k420a[_arg1][1] is Array)){
_local10 = k420a[_arg1][1].slice();
_local5 = _local10.length;
_local4 = 0;
while (_local4 < _local5) {
_local13 = _local10[_local4];
if (kaf78 != -1){
if ((kaf78 & 1)){
_local13 = (int((_local10[_local4] / k380e)) * k380e);
_local10[_local4] = (_local13 + Math.abs(((_local10[_local4] - _local13) - (k02a8 - 1))));
};
if ((kaf78 & 2)){
_local13 = (_local10[_local4] % k02a8);
_local10[_local4] = ((Math.abs((int((_local10[_local4] / k02a8)) - (k380e - 1))) * k02a8) + _local13);
};
};
k55b3[_local10[_local4]] = "block";
_local4++;
};
};
_local15 = k549a([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]);
if ((((k420a[_arg1][2] is String)) && (k420a[_arg1][2].length))){
k420a[_arg1][2] = k420a[_arg1][2].split("-");
};
if ((k420a[_arg1][2] is Array)){
_local7 = k420a[_arg1][2].length;
_local6 = 0;
while (_local6 < _local7) {
_local11 = _local15.shift();
_local10 = k420a[_arg1][2][_local6].split(",");
_local5 = _local10.length;
_local4 = 0;
while (_local4 < _local5) {
if (String(_local10[_local4]).charAt(0) == "r"){
_local10[_local4] = String(_local10[_local4]).substr(1);
_local14 = "r";
} else {
if (String(_local10[_local4]).charAt(0) == "x"){
_local10[_local4] = String(_local10[_local4]).substr(1);
_local14 = (kba67) ? "b" : "w";
} else {
_local14 = (kba67) ? "w" : "b";
};
};
_local13 = _local10[_local4];
if (kaf78 != -1){
if ((kaf78 & 1)){
_local13 = (int((_local10[_local4] / k380e)) * k380e);
_local10[_local4] = (_local13 + Math.abs(((_local10[_local4] - _local13) - (k02a8 - 1))));
};
if ((kaf78 & 2)){
_local13 = (_local10[_local4] % k02a8);
_local10[_local4] = ((Math.abs((int((_local10[_local4] / k02a8)) - (k380e - 1))) * k02a8) + _local13);
};
};
k55b3[_local10[_local4]] = (_local14 + _local11);
_local4++;
};
_local6++;
};
};
kba67 = (kba67 ^ 1);
_local16 = ka080.k4ea3("cell").bitmapData;
if (kf03d){
while (k6778.numChildren) {
k6778.removeChildAt(0);
};
kf03d.visible = true;
} else {
kf03d = (k5b42.addChild(new Sprite()) as Sprite);
kf03d.graphics.beginBitmapFill(_local16);
kf03d.graphics.drawRect(0, 0, (k02a8 * k54f8), (k380e * k80ae));
kf03d.graphics.endFill();
kf03d.x = kff6d;
kf03d.y = k2fc1;
kf03d.cacheAsBitmap = true;
k6778 = (kf03d.addChild(new Sprite()) as Sprite);
};
_local7 = (k02a8 * k380e);
_local6 = 0;
while (_local6 < _local7) {
if (k55b3[_local6]){
_local12 = (k6778.addChild(new ke33c(k55b3[_local6], ka080)) as ke33c);
_local12.x = ((_local6 % k380e) * k54f8);
_local12.y = (int((_local6 / k380e)) * k80ae);
if (k55b3[_local6] != "block"){
k55b3[_local6] = _local12;
_local12.addEventListener(MouseEvent.MOUSE_DOWN, k2605);
};
} else {
k55b3[_local6] = null;
};
_local6++;
};
ke4c2(kf03d, "alpha", 0, 1, 2);
ke85e.visible = false;
kd41e = (_arg2) ? (k420a[_arg1][0] * 4) : k420a[_arg1][0];
if (kaf78 == -1){
ke4c2(kd4da, "x", -(infoWidth), kd4da.x, 1);
ke4c2(keaf1, "x", -(infoWidth), keaf1.x, 1);
ke4c2(ka713, "x", -(infoWidth), ka713.x, 1);
ke4c2(k0738, "x", -(infoWidth), k0738.x, 1);
ke4c2(k966b, "x", -(infoWidth), k966b.x, 1);
ke4c2(k0827, "x", -(infoWidth), k0827.x, 1);
};
k7ab0 = k7ab0;
k37ae = k37ae;
}
private function k6353(_arg1:Event):void{
var _local2:Boolean;
k53a7();
_local2 = (kaf78 > 0);
if (_local2){
k3867 = k549a([1, 2, 3, 4]);
} else {
kaf78 = -1;
};
k7ab0 = 0;
k37ae = 0;
kf007(ka1fb, _local2);
}
private function ke2ff(_arg1:int):void{
var _local2:SimpleButton;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
if ((((_arg1 == -1)) && (k4b4d))){
kd0f4.x = (k3f60 + int(((infoWidth - kd0f4.width) / 2)));
if (k345b){
k345b.stop();
k345b.removeEventListener(TimerEvent.TIMER, ke9f1);
k345b = null;
};
while (k4b4d.numChildren) {
k4b4d.removeChildAt(0);
};
removeChild(k4b4d);
k4b4d = null;
} else {
if (_arg1 == 0){
_local2 = k0dd4("CLICK HERE TO START!", k30a6, 13421721);
_local2.x = int(((loaderInfo.width - _local2.width) / 2));
_local2.y = 350;
k4b4d.addChild(_local2);
ke4c2(_local2, "alpha", 0, 1, 3);
_local3 = (k4b4d.addChild(k3e3d(18, 0xFF6600)) as TextField);
_local3.text = "HOW TO PLAY?";
_local3.width = loaderInfo.width;
_local3.height = (_local3.textHeight + 4);
_local3.x = int(((loaderInfo.width - _local3.width) / 2));
_local3.y = (kd0f4.y + kd0f4.height);
k4696 = (k4b4d.addChild(k3e3d(15, 0xFFAA00)) as TextField);
k4696.text = "WHEN LIKE TILES COLLIDE...\n...THEY DISAPPEAR";
k4696.width = loaderInfo.width;
k4696.height = (k4696.textHeight + 4);
k4696.x = int(((loaderInfo.width - k4696.width) / 2));
k4696.y = ((_local3.y + _local3.height) + 10);
_local4 = (k4b4d.addChild(k3e3d(15, 0xFFAA00)) as TextField);
_local4.text = "CLEAR ALL TILES TO\nADVANCE TO THE NEXT LEVEL";
_local4.width = loaderInfo.width;
_local4.height = (_local4.textHeight + 4);
_local4.x = int(((loaderInfo.width - _local4.width) / 2));
_local4.y = (k4696.y + 150);
if (k345b == null){
k345b = new Timer(1000);
k345b.addEventListener(TimerEvent.TIMER, ke9f1, false, 0, true);
k345b.start();
};
k3ff3 = ka080.k4ea3("w5");
kf709 = ka080.k4ea3("w5");
k3ff3.x = 150;
kf709.x = (150 + (k54f8 * 6));
k3ff3.y = (kf709.y = ((k4696.y + k4696.height) + 30));
k4b4d.addChild(k3ff3);
k4b4d.addChild(kf709);
ke4c2(k3ff3, "alpha", 0, 1, 2);
ke4c2(kf709, "alpha", 0, 1, 2);
k69f2.x = 16;
k69f2.y = ((loaderInfo.height - k69f2.height) - 16);
k4b4d.addChild(k69f2);
} else {
if (_arg1 == 2){
k3ff3.filters = [new GlowFilter(0xFF9900, 0.8, 6, 6), new GlowFilter(0x777777, 0.8, 12, 12)];
kcd1d = (k4b4d.addChild(k3e3d(12, 13421721)) as TextField);
kcd1d.text = "click-and-hold on a tile to select...";
kcd1d.width = loaderInfo.width;
kcd1d.height = (kcd1d.textHeight + 4);
kcd1d.y = (k3ff3.y + k3ff3.height);
} else {
if (_arg1 == 4){
k8f21 = ka080.k4ea3("arrowright");
k8f21.x = (k3ff3.x + k54f8);
k8f21.y = k3ff3.y;
k4b4d.addChild(k8f21);
kcd1d.text = "...drag mouse to specify direction";
} else {
if (_arg1 == 6){
k4b4d.removeChild(k8f21);
k3ff3.filters = null;
ke4c2(k3ff3, "x", k3ff3.x, (k3ff3.x + (k54f8 * 5)), 1);
kcd1d.text = "release mouse button!";
} else {
if (_arg1 == 7){
ke4c2(k3ff3, "alpha", 1, 0, 3);
ke4c2(kf709, "alpha", 1, 0, 3);
kcd1d.text = "";
} else {
if (_arg1 == 9){
k4696.text = "WHEN DIFFERENT TILES COLLIDE...\n...THEY SWAP COLORS";
k4696.height = (k4696.textHeight + 4);
k3ff3.bitmapData = ka080.k4ea3("b1").bitmapData;
kf709.bitmapData = ka080.k4ea3("w4").bitmapData;
k3ff3.x = 150;
kf709.x = (150 + (k54f8 * 6));
ke4c2(k3ff3, "alpha", 0, 1, 2);
ke4c2(kf709, "alpha", 0, 1, 2);
} else {
if (_arg1 == 10){
kf709.filters = [new GlowFilter(0xFF9900, 0.8, 6, 6), new GlowFilter(0x777777, 0.8, 12, 12)];
kcd1d.text = "click-and-hold on a tile to select...";
kcd1d.height = (kcd1d.textHeight + 4);
} else {
if (_arg1 == 12){
k8f21 = ka080.k4ea3("arrowleft");
k8f21.x = (kf709.x - k54f8);
k8f21.y = kf709.y;
k4b4d.addChild(k8f21);
kcd1d.text = "...drag mouse to specify direction";
} else {
if (_arg1 == 14){
k4b4d.removeChild(k8f21);
kf709.filters = null;
ke4c2(kf709, "x", kf709.x, (kf709.x - (k54f8 * 5)), 1);
kcd1d.text = "release mouse button!";
} else {
if (_arg1 == 15){
_local5 = ka080.k4ea3("b1");
_local5.x = k3ff3.x;
_local5.y = k3ff3.y;
k4b4d.addChild(_local5);
_local6 = ka080.k4ea3("w4");
_local6.x = kf709.x;
_local6.y = kf709.y;
k4b4d.addChild(_local6);
k3ff3.bitmapData = ka080.k4ea3("w1").bitmapData;
kf709.bitmapData = ka080.k4ea3("b4").bitmapData;
ke4c2(_local5, "alpha", 1, 0, 3);
ke4c2(_local6, "alpha", 1, 0, 3);
kcd1d.text = "";
};
};
};
};
};
};
};
};
};
};
};
}
private function ke39b():void{
k040c = getTimer();
}
private function kd06e(_arg1:TweenEvent):void{
var evt = _arg1;
try {
if ((evt.target.obj is Bitmap)){
Bitmap(evt.target.obj).bitmapData = null;
};
evt.target.obj.parent.removeChild(evt.target.obj);
} catch(e:Error) {
};
}
private function kbdde(_arg1:MouseEvent):void{
var _local2:int;
var _local3:int;
var _local4:int;
var _local5:int;
var _local6:int;
if (k3fa2){
return;
};
if (k0c69){
kf03d.removeEventListener(MouseEvent.MOUSE_MOVE, kb17e);
_local2 = (((k0c69.y / k80ae) * k02a8) + (k0c69.x / k54f8));
_local4 = (k02a8 * k380e);
_local5 = k0c69.x;
_local6 = k0c69.y;
if (k46ac){
kcd69 = [];
_local3 = 0;
while (_local3 < _local4) {
kcd69[_local3] = ((k55b3[_local3] is ke33c)) ? k55b3[_local3].id : k55b3[_local3];
_local3++;
};
k3fa2 = true;
switch (k46ac){
case 1:
k55b3[_local2] = null;
_local3 = _local2;
while ((((k55b3[(_local3 + k02a8)] == null)) && (((_local3 + k02a8) < _local4)))) {
_local3 = (_local3 + k02a8);
_local6 = (_local6 + k80ae);
};
k55b3[_local3] = k0c69;
ke4c2(k0c69, "y", k0c69.y, _local6, 0.333, k4561);
break;
case 2:
k55b3[_local2] = null;
_local3 = _local2;
while ((((k55b3[(_local3 - k02a8)] == null)) && (((_local3 - k02a8) >= 0)))) {
_local3 = (_local3 - k02a8);
_local6 = (_local6 - k80ae);
};
k55b3[_local3] = k0c69;
ke4c2(k0c69, "y", k0c69.y, _local6, 0.333, k4561);
break;
case 3:
k55b3[_local2] = null;
_local3 = _local2;
while ((((k55b3[(_local3 + 1)] == null)) && ((((_local3 + k02a8) + 1) % k02a8)))) {
_local3++;
_local5 = (_local5 + k54f8);
};
k55b3[_local3] = k0c69;
ke4c2(k0c69, "x", k0c69.x, _local5, 0.333, k4561);
break;
case 4:
k55b3[_local2] = null;
_local3 = _local2;
while ((((k55b3[(_local3 - 1)] == null)) && (((_local3 + k02a8) % k02a8)))) {
_local3--;
_local5 = (_local5 - k54f8);
};
k55b3[_local3] = k0c69;
ke4c2(k0c69, "x", k0c69.x, _local5, 0.333, k4561);
break;
};
};
k0c69.filters = [];
k0c69 = null;
};
k2851(null);
}
private function kd19d(_arg1:Event):void{
k4ae3("DELETE YOUR SAVED DATA?", k748f, k30a6);
}
private function kfb56(_arg1:Event):void{
var evt = _arg1;
try {
kf704 = (ApplicationDomain.currentDomain.getDefinition("BlackBox") as Class);
} catch(e:Error) {
};
if (loaderInfo.loaderURL.indexOf("http:") == -1){
return;
};
stage.align = "TL";
stage.scaleMode = "noScale";
if (kf704 == null){
kf76b(this, 295, 200);
};
k6039 = SharedObject.getLocal("CollisoSave");
if ((k6039.data.records is Array)){
kec99 = k6039.data.records[0];
k15a1 = k6039.data.records[1];
} else {
k6039.data.records = [[{}], []];
kec99 = k6039.data.records[0];
k15a1 = k6039.data.records[1];
};
k7ef8 = (parent.loaderInfo.parameters.nickname) ? parent.loaderInfo.parameters.nickname : "".toLowerCase();
k5ba8 = new Dictionary();
k23ae = (addChild(new Sprite()) as Sprite);
k5b42 = (addChild(new Sprite()) as Sprite);
k4b4d = (addChild(new Sprite()) as Sprite);
kbc10 = (addChild(new Sprite()) as Sprite);
k29fb = (addChild(new Sprite()) as Sprite);
k56f4 = (addChild(new MovieClip()) as MovieClip);
ka080 = new kdae9();
if (ka080.k4e07("kurohako_logo.png", "logo")){
if (ka080.k4e07("collisologo.png", "gamelogo")){
if (ka080.k4e07("collisocells.png", "cell,block,arrowright,arrowdown,arrowleft,arrowup,sblock")){
if (ka080.k4e07("collisoastrotiles.png", "w0,w1,w2,w3,w4,w5,w6,w7,w8,w9,w10,w11,b0,b1,b2,b3,b4,b5,b6,b7,b8,b9,b10,b11,r0,r1,r2,r3,r4,r5,r6,r7,r8,r9,r10,r11")){
k2485();
};
};
};
};
}
private function kf1f9(_arg1:Event):void{
k4ae3("ARE YOU SURE YOU WANT TO QUIT?", k30a6, k53a7);
}
private function kb3f2(_arg1:TweenEvent):void{
_arg1.target.removeEventListener(TweenEvent.MOTION_FINISH, kb3f2);
k5ba8[_arg1.target] = null;
}
private function k549a(_arg1:Array):Array{
var _local2:Array;
var _local3:Object;
var _local4:int;
var _local5:int;
var _local6:int;
_local2 = _arg1.slice();
_local5 = _arg1.length;
_local6 = 0;
while (_local6 < _local5) {
_local3 = _local2[_local6];
_local4 = (Math.random() * _local5);
_local2[_local6] = _local2[_local4];
_local2[_local4] = _local3;
_local6++;
};
return (_local2);
}
private function k18b3(_arg1:Event):void{
k3afb.visible = false;
}
private function k84f3(_arg1:Event):void{
var _local2:DisplayObject;
var _local3:*;
var _local4:*;
if (((kcd69) && (kcd69.length))){
k37ae--;
k55b3 = kcd69.slice();
kcd69 = null;
ke85e.visible = false;
while (((k6778) && (k6778.numChildren))) {
k6778.removeChildAt(0);
};
_local3 = (k02a8 * k380e);
_local4 = 0;
while (_local4 < _local3) {
if (k55b3[_local4]){
_local2 = (k6778.addChild(new ke33c(k55b3[_local4], ka080)) as ke33c);
_local2.x = ((_local4 % k380e) * k54f8);
_local2.y = (int((_local4 / k380e)) * k80ae);
if (k55b3[_local4] != "block"){
k55b3[_local4] = _local2;
_local2.addEventListener(MouseEvent.MOUSE_DOWN, k2605);
};
} else {
k55b3[_local4] = null;
};
_local4++;
};
ke4c2(kf03d, "alpha", 0, 1, 1);
};
}
private function k257c(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = ((_arg1 / _arg4) - 1);
return (((_arg3 * (((((_arg1 * _arg1) * _arg1) * _arg1) * _arg1) + 1)) + _arg2));
}
private function k560b(_arg1:int):Sprite{
var _local2:Boolean;
var _local3:Boolean;
var _local4:Boolean;
var _local5:Sprite;
var _local6:TextField;
var _local7:TextField;
var _local8:Bitmap;
var _local9:Bitmap;
var _local10:Bitmap;
var _local11:Bitmap;
var _local12:Bitmap;
var _local13:SimpleButton;
var _local14:SimpleButton;
if (k420a[(_arg1 - 1)] != null){
if ((k420a[(_arg1 - 1)] is String)){
k420a[(_arg1 - 1)] = k420a[(_arg1 - 1)].split(":", 14);
};
} else {
return (null);
};
if (kec99[(_arg1 - 1)]){
_local2 = true;
_local3 = (kec99[(_arg1 - 1)]["moves"] <= k420a[(_arg1 - 1)][0]);
if (k15a1[(_arg1 - 1)]){
_local4 = (k15a1[(_arg1 - 1)]["moves"] <= (k420a[(_arg1 - 1)][0] * 4));
};
};
_local5 = new Sprite();
_local6 = k3e3d(14, (_local2) ? 0 : 8755589);
_local6.text = _arg1.toString();
_local6.autoSize = "left";
_local6.mouseEnabled = false;
_local7 = k3e3d(14, (_local3) ? 0 : 8755589);
_local7.text = (_arg1.toString() + "+");
_local7.autoSize = "left";
_local7.mouseEnabled = false;
_local8 = ka080.k4ea3((_local3) ? "sblock" : "block");
_local9 = ka080.k4ea3((_local4) ? "sblock" : "block");
_local10 = new Bitmap(_local9.bitmapData);
_local11 = new Bitmap(_local8.bitmapData);
_local10.filters = (_local11.filters = [new GlowFilter(0xFF9900, 0.8, 6, 6), new GlowFilter(0xFFFFFF, 0.8, 9, 9)]);
_local12 = ka080.k4ea3("cell");
_local13 = new SimpleButton(_local8, _local11, _local12, (_local2) ? _local8 : null);
_local13.name = _arg1.toString();
_local13.useHandCursor = false;
_local13.addEventListener(MouseEvent.CLICK, kbc6e, false, 0, true);
_local13.addEventListener(MouseEvent.ROLL_OVER, k2676, false, 0, true);
_local13.addEventListener(MouseEvent.ROLL_OUT, k18b3, false, 0, true);
_local14 = new SimpleButton(_local9, _local10, _local12, (_local3) ? _local9 : null);
_local14.name = ("x" + _arg1.toString());
_local14.useHandCursor = false;
_local14.addEventListener(MouseEvent.CLICK, kbc6e, false, 0, true);
_local14.addEventListener(MouseEvent.ROLL_OVER, k2676, false, 0, true);
_local14.addEventListener(MouseEvent.ROLL_OUT, k18b3, false, 0, true);
_local14.y = (k80ae + 5);
_local7.y = _local14.y;
_local5.addChild(_local13);
_local5.addChild(_local14);
_local5.addChild(_local6);
_local5.addChild(_local7);
return (_local5);
}
private function kcf7c(_arg1:DisplayObject):void{
ke4c2(_arg1, "x", _arg1.x, (_arg1.x + (k54f8 / 2)), 0.5);
ke4c2(_arg1, "y", _arg1.y, (_arg1.y + (k80ae / 2)), 0.5);
ke4c2(_arg1, "height", _arg1.height, 0, 0.5);
ke4c2(_arg1, "width", _arg1.width, 0, 0.5, kd06e);
}
private function k3e3d(_arg1:int, _arg2:int, _arg3:Boolean=true):TextField{
var _local4:TextFormat;
var _local5:TextField;
_local4 = new TextFormat(kcdeb, _arg1, _arg2);
if (_arg3){
_local4.align = "center";
};
_local5 = new TextField();
_local5.defaultTextFormat = _local4;
_local5.embedFonts = true;
_local5.antiAliasType = "advanced";
_local5.selectable = false;
_local5.filters = [new GlowFilter(_arg2, 0.3), new BevelFilter(2, 45, 0xDDDDDD, 0.5, 0, 0.5)];
return (_local5);
}
private function k2485():void{
MochiAd.showPreGameAd({clip:k56f4, id:"fb343df22ca50f51", res:"588x438", background:0, color:0xFF9900, outline:0, no_bg:false, ad_started:ke39b, ad_finished:k3bd4});
}
private function k748f(_arg1:Event):void{
k6039.clear();
k6039.data.records = [[{}], []];
kec99 = k6039.data.records[0];
k15a1 = k6039.data.records[1];
k30a6(null);
}
public function get k7ab0():int{
return (parseInt(k5ae9.decrypt(k6cf8, kf869)));
}
function ke98d(_arg1:int, _arg2:Boolean=false):void{
var arg:Object;
var rGateway:NetConnection;
var responder:Responder;
var lvl = _arg1;
var plus = _arg2;
if (((kf704) && (k7ef8))){
try {
arg = new Object();
arg.level = lvl;
arg.plus = plus;
arg.time_used = k7ab0;
arg.title = "collisopuzzles";
arg.nickname = k7ef8;
arg.moves = k37ae;
arg.screenX = Capabilities.screenResolutionX;
arg.screenY = Capabilities.screenResolutionY;
arg.flashVersion = Capabilities.version;
rGateway = new NetConnection();
rGateway.addEventListener(NetStatusEvent.NET_STATUS, kaf32);
rGateway.connect(k5ae9.decrypt("4d577d6b5fd552fb2af26041166f5f762b27b3c8bc12af02", kf704.k0718));
responder = new Responder(kaf32, kaf32);
rGateway.call(k5ae9.decrypt("495e6f67811814c2f5521dbc02fe", kce65), responder, arg);
} catch(e:Error) {
};
};
}
private function kbc6e(_arg1:Event):void{
k53a7();
kaf78 = -1;
kf869 = Math.random().toString();
k37ae = 0;
k7ab0 = 0;
if (_arg1.target.name.charAt(0) == "x"){
k3867 = k549a([1, 2, 3, 4]);
kf007(parseInt(_arg1.target.name.substr(1)), true);
} else {
kf007(parseInt(_arg1.target.name));
};
}
private function ke4c2(_arg1:Object, _arg2:String, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Function=null):void{
var _local7:Tween;
_local7 = new Tween(_arg1, _arg2, k257c, _arg3, _arg4, _arg5, true);
if (_arg6 != null){
_local7.addEventListener(TweenEvent.MOTION_FINISH, _arg6);
};
_local7.addEventListener(TweenEvent.MOTION_FINISH, kb3f2);
k5ba8[_local7] = _arg1;
}
private function k4561(_arg1:TweenEvent):void{
var _local2:ke33c;
var _local3:int;
var _local4:int;
var _local5:int;
var _local6:Boolean;
var _local7:Bitmap;
var _local8:Bitmap;
var _local9:String;
ke85e.visible = true;
k3fa2 = false;
_local2 = _arg1.target.obj;
_local3 = (((_local2.y / k80ae) * k02a8) + (_local2.x / k54f8));
_local4 = -1;
_local5 = 1;
k37ae++;
if ((((((_arg1.target.prop == "y")) && ((_arg1.target.begin < _arg1.target.finish)))) && (((_local3 + k02a8) < (k02a8 * k380e))))){
_local4 = (_local3 + k02a8);
} else {
if ((((((_arg1.target.prop == "y")) && ((_arg1.target.begin > _arg1.target.finish)))) && (((_local3 + k02a8) >= 0)))){
_local4 = (_local3 - k02a8);
} else {
if ((((((_arg1.target.prop == "x")) && ((_arg1.target.begin < _arg1.target.finish)))) && ((((_local3 + k02a8) + 1) % k02a8)))){
_local4 = (_local3 + 1);
} else {
if ((((((_arg1.target.prop == "x")) && ((_arg1.target.begin > _arg1.target.finish)))) && (((_local3 + k02a8) % k02a8)))){
_local4 = (_local3 - 1);
};
};
};
};
if (_local4 >= 0){
if ((k55b3[_local4] is ke33c)){
if (k55b3[_local4].id == k55b3[_local3].id){
kcf7c(k55b3[_local4]);
kcf7c(k55b3[_local3]);
k55b3[_local4] = null;
k55b3[_local3] = null;
_local6 = ke1a9();
} else {
if (k55b3[_local4].id.charAt(0) != k55b3[_local3].id.charAt(0)){
_local7 = ka080.k4ea3(k55b3[_local4].id);
_local7.x = k55b3[_local4].x;
_local7.y = k55b3[_local4].y;
k6778.addChild(_local7);
_local8 = ka080.k4ea3(k55b3[_local3].id);
_local8.x = k55b3[_local3].x;
_local8.y = k55b3[_local3].y;
k6778.addChild(_local8);
ke4c2(_local7, "alpha", 1, 0, 1, kd06e);
ke4c2(_local8, "alpha", 1, 0, 1, kd06e);
_local7.filters = (_local8.filters = [new GlowFilter(0x3300, 0.8, 12, 12)]);
_local9 = (k55b3[_local4].id.charAt(0) + k55b3[_local3].id.substr(1));
k55b3[_local4].id = (k55b3[_local3].id.charAt(0) + k55b3[_local4].id.substr(1));
k55b3[_local3].id = _local9;
};
};
};
};
}
private function k92b6(_arg1:Sprite=null):void{
var _local2:Sprite;
var _local3:Bitmap;
var _local4:TextField;
if (_arg1 == null){
k53a7();
return;
};
if (k94bb){
k94bb.stop();
};
if (kbc10.numChildren){
kbc10.removeChildAt(0);
};
k5b42.mouseChildren = false;
_local2 = new Sprite();
kbc10.addChild(_local2);
_local3 = ka080.k4ea3("gamelogo");
_local3.x = int(((loaderInfo.width - _local3.width) / 2));
_local3.y = 20;
kbc10.addChild(_local3);
kbc10.addChild(_arg1);
if (ka1fb){
_local4 = k3e3d(14, 8755589);
_local4.text = ((("LEVEL " + ka1fb) + ((kaf78)>0) ? "+" : "") + "\n- GAME PAUSED -");
_local4.autoSize = "left";
_local4.x = int(((loaderInfo.width - _local4.width) / 2));
_local4.y = (_local3.y + _local3.height);
kbc10.addChild(_local4);
};
_local2.graphics.beginFill(0);
_local2.graphics.drawRoundRect(10, 10, (loaderInfo.width - 20), 400, 16, 16);
_local2.graphics.endFill();
_local2.filters = [new BevelFilter(4, 45, 0xDDDDDD, 0.5, 0, 0.5), new BevelFilter(4, 215, 0xDDDDDD, 0.5, 0, 0.5)];
_arg1.x = int(((loaderInfo.width - _arg1.width) / 2));
_arg1.y = ((_local3.y + _local3.height) + (ka1fb) ? 50 : 10);
k69f2.x = 20;
k69f2.y = (400 - k69f2.height);
kbc10.addChild(k69f2);
ke4c2(kbc10, "y", -(loaderInfo.height), 0, 0.5);
}
}
}//package
Section 10
//fonts (fonts)
package {
import flash.display.*;
public dynamic class fonts extends MovieClip {
}
}//package
Section 11
//ke33c (ke33c)
package {
import flash.display.*;
import com.kurohako.lib.*;
public class ke33c extends Sprite {
private var ka080:kdae9;
private var _id:String;
public function ke33c(_arg1:String, _arg2:kdae9){
ka080 = _arg2;
id = _arg1;
}
public function get id():String{
return (_id);
}
public function set id(_arg1:String):void{
var _local2:Bitmap;
if (_id === _arg1){
return;
};
_id = _arg1;
_local2 = ka080.k4ea3(_arg1);
graphics.clear();
graphics.beginBitmapFill(_local2.bitmapData);
graphics.drawRect(0, 0, _local2.width, _local2.height);
graphics.endFill();
}
}
}//package
Section 12
//MochiAd (MochiAd)
package {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
public class MochiAd {
public static function getVersion():String{
return ("2.1");
}
public static function showTimedAd(_arg1:Object):void{
MochiAd.showInterLevelAd(_arg1);
}
public static function _allowDomains(_arg1:String):String{
var _local2:String;
_local2 = _arg1.split("/")[2].split(":")[0];
Security.allowDomain("*");
Security.allowDomain(_local2);
Security.allowInsecureDomain("*");
Security.allowInsecureDomain(_local2);
return (_local2);
}
public static function load(_arg1:Object):MovieClip{
var DEFAULTS:Object;
var clip:Object;
var depth:Number;
var mc:MovieClip;
var wh:Array;
var lv:URLVariables;
var k:String;
var server:String;
var hostname:String;
var lc:LocalConnection;
var name:String;
var loader:Loader;
var f:Function;
var g:Function;
var req:URLRequest;
var v:Object;
var options = _arg1;
DEFAULTS = {server:"http://x.mochiads.com/srv/1/", method:"load", depth:10333, id:"_UNKNOWN_"};
options = MochiAd._parseOptions(options, DEFAULTS);
options.swfv = 9;
options.mav = MochiAd.getVersion();
clip = options.clip;
if (!MochiAd._isNetworkAvailable()){
return (null);
};
if (clip._mochiad_loaded){
return (null);
};
depth = options.depth;
delete options.depth;
mc = createEmptyMovieClip(clip, "_mochiad", depth);
wh = MochiAd._getRes(options, clip);
options.res = ((wh[0] + "x") + wh[1]);
options.server = (options.server + options.id);
delete options.id;
clip._mochiad_loaded = true;
if (clip.loaderInfo.loaderURL.indexOf("http") == 0){
options.as3_swf = clip.loaderInfo.loaderURL;
};
lv = new URLVariables();
for (k in options) {
v = options[k];
if (!(v is Function)){
lv[k] = v;
};
};
server = lv.server;
delete lv.server;
hostname = _allowDomains(server);
lc = new LocalConnection();
lc.client = mc;
name = ["", Math.floor(new Date().getTime()), Math.floor((Math.random() * 999999))].join("_");
lc.allowDomain("*", "localhost");
lc.allowInsecureDomain("*", "localhost");
lc.connect(name);
mc.lc = lc;
lv.lc = name;
lv.st = getTimer();
loader = new Loader();
f = function (_arg1:Object):void{
mc._mochiad_ctr_failed = true;
};
loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, f);
g = function (_arg1:Object):void{
MochiAd.unload(clip);
};
loader.contentLoaderInfo.addEventListener(Event.UNLOAD, g);
req = new URLRequest((server + ".swf"));
req.contentType = "application/x-www-form-urlencoded";
req.method = URLRequestMethod.POST;
req.data = lv;
loader.load(req);
mc.addChild(loader);
mc._mochiad_ctr = loader;
return (mc);
}
public static function sendHighScore(_arg1:Object, _arg2:Object, _arg3:Object=null):Boolean{
var _local4:MovieClip;
_local4 = MochiAd._loadCommunicator({clip:_arg1.clip, id:_arg1.id});
if (!_local4){
return (false);
};
_local4.doSend(["sendHighScore", _arg1], _arg2, _arg3);
return (true);
}
public static function _parseOptions(_arg1:Object, _arg2:Object):Object{
var _local3:Object;
var _local4:String;
var _local5:Array;
var _local6:Number;
var _local7:Array;
_local3 = {};
for (_local4 in _arg2) {
_local3[_local4] = _arg2[_local4];
};
if (_arg1){
for (_local4 in _arg1) {
_local3[_local4] = _arg1[_local4];
};
};
_arg1 = _local3.clip.loaderInfo.parameters.mochiad_options;
if (_arg1){
_local5 = _arg1.split("&");
_local6 = 0;
while (_local6 < _local5.length) {
_local7 = _local5[_local6].split("=");
_local3[unescape(_local7[0])] = unescape(_local7[1]);
_local6++;
};
};
return (_local3);
}
public static function _isNetworkAvailable():Boolean{
return (!((Security.sandboxType == "localWithFile")));
}
public static function unload(_arg1:Object):Boolean{
if (((_arg1.clip) && (_arg1.clip._mochiad))){
_arg1 = _arg1.clip;
};
if (!_arg1._mochiad){
return (false);
};
if (_arg1._mochiad.onUnload){
_arg1._mochiad.onUnload();
};
_arg1.removeChild(_arg1._mochiad);
delete _arg1._mochiad_loaded;
delete _arg1._mochiad;
return (true);
}
public static function showInterLevelAd(_arg1:Object):void{
var DEFAULTS:Object;
var clip:Object;
var ad_msec:Number;
var ad_timeout:Number;
var fadeout_time:Number;
var mc:MovieClip;
var wh:Array;
var w:Number;
var h:Number;
var chk:MovieClip;
var options = _arg1;
DEFAULTS = {ad_timeout:2000, fadeout_time:250, regpt:"o", method:"showTimedAd", ad_started:function ():void{
this.clip.stop();
}, ad_finished:function ():void{
this.clip.play();
}};
options = MochiAd._parseOptions(options, DEFAULTS);
clip = options.clip;
ad_msec = 11000;
ad_timeout = options.ad_timeout;
delete options.ad_timeout;
fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!MochiAd.load(options)){
options.ad_finished();
return;
};
options.ad_started();
mc = clip._mochiad;
mc["onUnload"] = function ():void{
options.ad_finished();
};
wh = MochiAd._getRes(options, clip);
w = wh[0];
h = wh[1];
mc.x = (w * 0.5);
mc.y = (h * 0.5);
chk = createEmptyMovieClip(mc, "_mochiad_wait", 3);
chk.ad_msec = ad_msec;
chk.ad_timeout = ad_timeout;
chk.started = getTimer();
chk.showing = false;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function ():void{
var _local1:Number;
_local1 = (100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time)));
if (_local1 > 0){
this.parent.alpha = (_local1 * 0.01);
} else {
MochiAd.unload(clip);
delete this["onEnterFrame"];
};
};
mc.unloadAd = function ():void{
MochiAd.unload(clip);
};
mc.adjustProgress = function (_arg1:Number):void{
var _local2:Object;
_local2 = mc._mochiad_wait;
_local2.server_control = true;
_local2.started = getTimer();
_local2.ad_msec = (_arg1 - 250);
};
chk["onEnterFrame"] = function ():void{
var _local1:Object;
var _local2:Number;
var _local3:Boolean;
var _local4:Number;
_local1 = this.parent._mochiad_ctr;
_local2 = (getTimer() - this.started);
_local3 = false;
if (!chk.showing){
_local4 = _local1.loaderInfo.bytesTotal;
if ((((_local4 > 0)) || (("number" == "undefined")))){
chk.showing = true;
chk.started = getTimer();
} else {
if (_local2 > chk.ad_timeout){
_local3 = true;
};
};
};
if ((((_local2 > chk.ad_msec)) || (this.parent._mochiad_ctr_failed))){
_local3 = true;
};
if (_local3){
if (this.server_control){
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = this.fadeFunction;
};
};
};
doOnEnterFrame(chk);
}
public static function _getRes(_arg1:Object, _arg2:Object):Array{
var _local3:Object;
var _local4:Number;
var _local5:Number;
var _local6:Array;
_local3 = _arg2.getBounds(_arg2.root);
_local4 = 0;
_local5 = 0;
if (typeof(_arg1.res) != "undefined"){
_local6 = _arg1.res.split("x");
_local4 = parseFloat(_local6[0]);
_local5 = parseFloat(_local6[1]);
} else {
_local4 = (_local3.xMax - _local3.xMin);
_local5 = (_local3.yMax - _local3.yMin);
};
if ((((_local4 == 0)) || ((_local5 == 0)))){
_local4 = _arg2.stage.stageWidth;
_local5 = _arg2.stage.stageHeight;
};
return ([_local4, _local5]);
}
public static function createEmptyMovieClip(_arg1:Object, _arg2:String, _arg3:Number):MovieClip{
var _local4:MovieClip;
_local4 = new MovieClip();
if (((false) && (_arg3))){
_arg1.addChildAt(_local4, _arg3);
} else {
_arg1.addChild(_local4);
};
_arg1[_arg2] = _local4;
_local4["_name"] = _arg2;
return (_local4);
}
public static function _loadCommunicator(_arg1:Object):MovieClip{
var DEFAULTS:Object;
var clip:Object;
var clipname:String;
var server:String;
var depth:Number;
var mc:MovieClip;
var lv:URLVariables;
var k:String;
var lc:LocalConnection;
var name:String;
var req:URLRequest;
var loader:Loader;
var options = _arg1;
DEFAULTS = {com_server:"http://x.mochiads.com/com/1/", method:"loadCommunicator", depth:10337, id:"_UNKNOWN_"};
options = MochiAd._parseOptions(options, DEFAULTS);
options.swfv = 9;
options.mav = MochiAd.getVersion();
clip = options.clip;
clipname = ("_mochiad_com_" + options.id);
if (!MochiAd._isNetworkAvailable()){
return (null);
};
if (clip[clipname]){
return (clip[clipname]);
};
server = (options.com_server + options.id);
MochiAd._allowDomains(server);
delete options.id;
delete options.com_server;
depth = options.depth;
delete options.depth;
mc = createEmptyMovieClip(clip, clipname, depth);
lv = new URLVariables();
for (k in options) {
lv[k] = options[k];
};
lc = new LocalConnection();
lc.client = mc;
name = ["", Math.floor(new Date().getTime()), Math.floor((Math.random() * 999999))].join("_");
lc.allowDomain("*", "localhost");
lc.allowInsecureDomain("*", "localhost");
lc.connect(name);
mc.name = name;
mc.lc = lc;
lv.lc = name;
mc._id = 0;
mc._queue = [];
mc.rpcResult = function (_arg1:Object):void{
var _local3:Array;
var _local4:Array;
var _local5:Number;
var _local6:Object;
var _local7:Object;
_arg1 = parseInt(_arg1.toString());
_local3 = mc._callbacks[_arg1];
if (typeof(_local3) == "undefined"){
return;
};
delete mc._callbacks[_arg1];
_local4 = [];
_local5 = 2;
while (_local5 < _local3.length) {
_local4.push(_local3[_local5]);
_local5++;
};
_local5 = 1;
while (_local5 < arguments.length) {
_local4.push(arguments[_local5]);
_local5++;
};
_local6 = _local3[1];
_local7 = _local3[0];
if (((_local7) && ((typeof(_local6) == "string")))){
_local6 = _local7[_local6];
};
if (typeof(_local6) == "function"){
_local6.apply(_local7, _local4);
};
};
mc._didConnect = function (_arg1:String):void{
var _local2:Array;
var _local3:Function;
var _local4:Number;
var _local5:Array;
mc._endpoint = _arg1;
_local2 = mc._queue;
delete mc._queue;
_local3 = mc.doSend;
_local4 = 0;
while (_local4 < _local2.length) {
_local5 = _local2[_local4];
_local3.apply(this, _local5);
_local4++;
};
};
mc.doSend = function (_arg1:Array, _arg2:Object, _arg3:Object):void{
var _local5:Number;
var _local6:LocalConnection;
var _local7:Array;
var _local8:Number;
if (mc._endpoint == null){
_local7 = [];
_local8 = 0;
while (_local8 < arguments.length) {
_local7.push(arguments[_local8]);
_local8++;
};
mc._queue.push(_local7);
return;
};
mc._id = (mc._id + 1);
_local5 = mc._id;
mc._callbacks[_local5] = [_arg2, ((_arg3) || (_arg2))];
_local6 = new LocalConnection();
_local6.send(mc._endpoint, "rpc", _local5, _arg1);
};
mc._callbacks = {};
mc._callbacks[0] = [mc, "_didConnect"];
lv.st = getTimer();
req = new URLRequest((server + ".swf"));
req.contentType = "application/x-www-form-urlencoded";
req.method = URLRequestMethod.POST;
req.data = lv;
loader = new Loader();
loader.load(req);
mc.addChild(loader);
mc._mochiad_com = loader;
return (mc);
}
public static function showPreGameAd(_arg1:Object):void{
var DEFAULTS:Object;
var clip:Object;
var ad_msec:Number;
var ad_timeout:Number;
var fadeout_time:Number;
var mc:MovieClip;
var wh:Array;
var w:Number;
var h:Number;
var chk:MovieClip;
var bar:MovieClip;
var bar_color:Number;
var bar_background:Number;
var bar_outline:Number;
var backing_mc:MovieClip;
var backing:Object;
var inside_mc:MovieClip;
var inside:Object;
var outline_mc:MovieClip;
var outline:Object;
var complete:Boolean;
var unloaded:Boolean;
var f:Function;
var r:MovieClip;
var options = _arg1;
DEFAULTS = {ad_timeout:3000, fadeout_time:250, regpt:"o", method:"showPreloaderAd", color:0xFF8A00, background:16777161, outline:13994812, ad_started:function ():void{
this.clip.stop();
}, ad_finished:function ():void{
this.clip.play();
}};
options = MochiAd._parseOptions(options, DEFAULTS);
clip = options.clip;
ad_msec = 11000;
ad_timeout = options.ad_timeout;
delete options.ad_timeout;
fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!MochiAd.load(options)){
options.ad_finished();
return;
};
options.ad_started();
mc = clip._mochiad;
mc["onUnload"] = function ():void{
var fn:Function;
fn = function ():void{
options.ad_finished();
};
setTimeout(fn, 100);
};
wh = MochiAd._getRes(options, clip);
w = wh[0];
h = wh[1];
mc.x = (w * 0.5);
mc.y = (h * 0.5);
chk = createEmptyMovieClip(mc, "_mochiad_wait", 3);
chk.x = (w * -0.5);
chk.y = (h * -0.5);
bar = createEmptyMovieClip(chk, "_mochiad_bar", 4);
bar.x = 10;
bar.y = (h - 20);
bar_color = options.color;
delete options.color;
bar_background = options.background;
delete options.background;
bar_outline = options.outline;
delete options.outline;
backing_mc = createEmptyMovieClip(bar, "_outline", 1);
backing = backing_mc.graphics;
backing.beginFill(bar_background);
backing.moveTo(0, 0);
backing.lineTo((w - 20), 0);
backing.lineTo((w - 20), 10);
backing.lineTo(0, 10);
backing.lineTo(0, 0);
backing.endFill();
inside_mc = createEmptyMovieClip(bar, "_inside", 2);
inside = inside_mc.graphics;
inside.beginFill(bar_color);
inside.moveTo(0, 0);
inside.lineTo((w - 20), 0);
inside.lineTo((w - 20), 10);
inside.lineTo(0, 10);
inside.lineTo(0, 0);
inside.endFill();
inside_mc.scaleX = 0;
outline_mc = createEmptyMovieClip(bar, "_outline", 3);
outline = outline_mc.graphics;
outline.lineStyle(0, bar_outline, 100);
outline.moveTo(0, 0);
outline.lineTo((w - 20), 0);
outline.lineTo((w - 20), 10);
outline.lineTo(0, 10);
outline.lineTo(0, 0);
chk.ad_msec = ad_msec;
chk.ad_timeout = ad_timeout;
chk.started = getTimer();
chk.showing = false;
chk.last_pcnt = 0;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function ():void{
var _local1:Number;
_local1 = (100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time)));
if (_local1 > 0){
this.parent.alpha = (_local1 * 0.01);
} else {
MochiAd.unload(clip);
delete this["onEnterFrame"];
};
};
complete = false;
unloaded = false;
f = function (_arg1:Event):void{
complete = true;
if (unloaded){
MochiAd.unload(clip);
};
};
clip.loaderInfo.addEventListener(Event.COMPLETE, f);
if ((clip.root is MovieClip)){
r = (clip.root as MovieClip);
if (r.framesLoaded >= r.totalFrames){
complete = true;
};
};
mc.unloadAd = function ():void{
unloaded = true;
if (complete){
MochiAd.unload(clip);
};
};
mc.adjustProgress = function (_arg1:Number):void{
var _local2:Object;
_local2 = mc._mochiad_wait;
_local2.server_control = true;
_local2.started = getTimer();
_local2.ad_msec = _arg1;
};
chk["onEnterFrame"] = function ():void{
var _local1:Object;
var _local2:Object;
var _local3:Number;
var _local4:Boolean;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Object;
var _local10:Number;
var _local11:Number;
if (!this.parent.parent){
delete this["onEnterFrame"];
return;
};
_local1 = this.parent.parent.root;
_local2 = this.parent._mochiad_ctr;
_local3 = (getTimer() - this.started);
_local4 = false;
_local5 = _local1.loaderInfo.bytesTotal;
_local6 = _local1.loaderInfo.bytesLoaded;
_local7 = ((100 * _local6) / _local5);
_local8 = ((100 * _local3) / chk.ad_msec);
_local9 = this._mochiad_bar._inside;
_local10 = Math.min(100, Math.min(((_local7) || (0)), _local8));
_local10 = Math.max(this.last_pcnt, _local10);
this.last_pcnt = _local10;
_local9.scaleX = (_local10 * 0.01);
if (!chk.showing){
_local11 = _local2.loaderInfo.bytesTotal;
if ((((_local11 > 0)) || (("number" == "undefined")))){
chk.showing = true;
chk.started = getTimer();
} else {
if (_local3 > chk.ad_timeout){
_local4 = true;
};
};
};
if ((((_local3 > chk.ad_msec)) || (this.parent._mochiad_ctr_failed))){
_local4 = true;
};
if (((complete) && (_local4))){
if (this.server_control){
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = chk.fadeFunction;
};
};
};
doOnEnterFrame(chk);
}
public static function showPreloaderAd(_arg1:Object):void{
MochiAd.showPreGameAd(_arg1);
}
public static function fetchHighScores(_arg1:Object, _arg2:Object, _arg3:Object=null):Boolean{
var _local4:MovieClip;
_local4 = MochiAd._loadCommunicator({clip:_arg1.clip, id:_arg1.id});
if (!_local4){
return (false);
};
_local4.doSend(["fetchHighScores", _arg1], _arg2, _arg3);
return (true);
}
public static function doOnEnterFrame(_arg1:MovieClip):void{
var f:Function;
var mc = _arg1;
f = function (_arg1:Object):void{
if (((("onEnterFrame" in mc)) && (mc.onEnterFrame))){
mc.onEnterFrame();
} else {
mc.removeEventListener(Event.ENTER_FRAME, f);
};
};
mc.addEventListener(Event.ENTER_FRAME, f);
}
}
}//package
Section 13
//progressIndicator (progressIndicator)
package {
import flash.display.*;
public dynamic class progressIndicator extends MovieClip {
}
}//package