Section 1
//png (background.png)
package background {
import flash.display.*;
public dynamic class png extends BitmapData {
public function png(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package background
Section 2
//png (buttons.png)
package buttons {
import flash.display.*;
public dynamic class png extends BitmapData {
public function png(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package buttons
Section 3
//k33ed (com.kurohako.lib.k33ed)
package com.kurohako.lib {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.net.*;
import flash.geom.*;
public class k33ed {
private var k8988:Array;
private var k70d7:String;
private var k0fea:Object;
public function k33ed(_arg1:String="assets/images/"){
k0fea = {};
k8988 = [];
k70d7 = _arg1;
}
public function k4e07(_arg1:String, _arg2:String, _arg3:Boolean=false){
var assetClass:Class;
var instance:*;
var fileLoader:Loader;
var fileName = _arg1;
var slices = _arg2;
var embedded = _arg3;
if (embedded){
try {
assetClass = (getDefinitionByName(fileName) as Class);
instance = new assetClass(null, null);
if ((instance is BitmapData)){
k577d(instance, slices.split(","));
return (true);
};
} catch(e:Error) {
};
return (null);
//unresolved jump
};
fileLoader = new Loader();
fileLoader.name = slices;
fileLoader.contentLoaderInfo.addEventListener(Event.INIT, k277a);
fileLoader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, k277a);
fileLoader.load(new URLRequest((k70d7 + fileName)));
return (fileLoader.contentLoaderInfo);
}
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];
k0fea[_local3] = new BitmapData(_local8, _arg1.height, true, 0xFFFFFF);
k0fea[_local3].copyPixels(_arg1, new Rectangle(_local6, 0, _local8, _arg1.height), new Point(0, 0));
if (k8988[_local3]){
_local5 = k8988[_local3].length;
_local4 = 0;
while (_local4 < _local5) {
k8988[_local3][_local4].apply(null, [_local3]);
_local4++;
};
k8988[_local3] = null;
};
_local6 = (_local6 + _local8);
_local9++;
};
_arg1.dispose();
}
private function k277a(_arg1:Event):void{
_arg1.target.removeEventListener(Event.INIT, k277a);
_arg1.target.removeEventListener(IOErrorEvent.IO_ERROR, k277a);
if (_arg1.type == Event.INIT){
if ((_arg1.target.loader.content is Bitmap)){
k577d(Bitmap(_arg1.target.loader.content).bitmapData, _arg1.target.loader.name.split(","));
};
_arg1.target.loader.unload();
};
}
public function k4ea3(_arg1:String, _arg2:Function=null):Bitmap{
if (k0fea[_arg1]){
if ((k0fea[_arg1] is BitmapData)){
return (new Bitmap(k0fea[_arg1]));
};
return (null);
//unresolved jump
};
if (_arg2 != null){
if (k8988[_arg1] == null){
k8988[_arg1] = [];
};
k8988[_arg1].push(_arg2);
};
return (null);
}
}
}//package com.kurohako.lib
Section 4
//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 5
//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 6
//png (pin.png)
package pin {
import flash.display.*;
public dynamic class png extends BitmapData {
public function png(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package pin
Section 7
//png (tiles.png)
package tiles {
import flash.display.*;
public dynamic class png extends BitmapData {
public function png(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package tiles
Section 8
//png (title.png)
package title {
import flash.display.*;
public dynamic class png extends BitmapData {
public function png(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package title
Section 9
//fonts (fonts)
package {
import flash.display.*;
public dynamic class fonts extends MovieClip {
}
}//package
Section 10
//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._k8988[_arg1];
if (typeof(_local3) == "undefined"){
return;
};
delete mc._k8988[_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._k8988[_local5] = [_arg2, ((_arg3) || (_arg2))];
_local6 = new LocalConnection();
_local6.send(mc._endpoint, "rpc", _local5, _arg1);
};
mc._k8988 = {};
mc._k8988[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 11
//progressIndicator (progressIndicator)
package {
import flash.display.*;
public dynamic class progressIndicator extends MovieClip {
}
}//package
Section 12
//RailzLite (RailzLite)
package {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import fl.transitions.*;
import com.kurohako.lib.*;
import flash.utils.*;
import flash.net.*;
import flash.geom.*;
import flash.ui.*;
import flash.filters.*;
public class RailzLite extends MovieClip {
private var k7282:TextField;
private var k80ae:int;// = 56
private var kd21a:int;// = 180
private var k39be:int;
private var ka080:k33ed;
private var k380e:int;// = 7
private var k54f8:int;// = 56
private var k02a8:int;// = 7
private var k5ba8:Dictionary;
private var k0448:Sprite;
private var k5c20:Array;
private var k6d19:int;
private var k2fc1:int;// = 22
private var kb770:int;
private var kb896:int;// = 408
private var kff6d:int;// = 10
private var kfc27:String;
private var k8fc5:TextField;
private var k252e:TextField;
private var k23a7:Bitmap;
private var k5b42:Sprite;
private var kbc10:Sprite;
private var k23ae:Sprite;
private var k6122:int;
private var keaee:Bitmap;
private var k570b:Boolean;
private var kb2d0:Array;
private var k85ef:int;
private var ke7e9:Array;
private var k9405:int;
private var k4086:int;// = 48
private var k1d6a:Timer;
private var k7802:Timer;
private var kf03d:Sprite;
private var kf71c:Boolean;
private var k6161:int;
private var kc1b1:int;
private var kcdeb:String;// = "Rockwell Extra Bold"
private var k67d4;
private var k6fa3:Bitmap;
private var kf192:int;
private var k2934:int;
private var k713d:Bitmap;
private var kbc6f:int;
public function RailzLite(){
k02a8 = 7;
k380e = 7;
k54f8 = 56;
k80ae = 56;
kff6d = 10;
k2fc1 = 22;
kb896 = 408;
kd21a = 180;
k4086 = 48;
kcdeb = "Rockwell Extra Bold";
super();
contextMenu = new ContextMenu();
contextMenu.hideBuiltInItems();
contextMenu.customItems.push(new ContextMenuItem("Copyright © 2007 kurohako.com"));
loaderInfo.addEventListener(Event.INIT, kfb56);
}
private function k3bd4():void{
var _local1:Sprite;
var _local2:Sprite;
var _local3:TextField;
var _local4:Bitmap;
var _local5:TextField;
var _local6:*;
var _local7:SimpleButton;
_local1 = new Sprite();
_local1.graphics.beginBitmapFill(ka080.k4ea3("background").bitmapData);
_local1.graphics.drawRoundRect(0, 0, loaderInfo.width, loaderInfo.height, 16, 16);
_local1.graphics.endFill();
_local1.filters = [new BevelFilter(4, 45, 13946791, 0.5, 0, 0.5)];
_local2 = new Sprite();
_local2.graphics.beginFill(8998930);
_local2.graphics.drawRect(kff6d, k2fc1, (k02a8 * k54f8), (k380e * k80ae));
_local2.graphics.endFill();
_local2.filters = [new BevelFilter(4, 45, 0, 0.5, 13946791, 0.5, 4, 4, 1, 1, "outer")];
_local1.addChild(_local2);
k23ae.addChild(_local1);
_local3 = k3e3d(10, 13946791);
_local3.htmlText = "Railz! LITE version :: Copyright © 2007 <a href='http://kurohako.com'>http://www.kurohako.com</a>";
_local3.width = loaderInfo.width;
_local3.y = ((loaderInfo.height - _local3.textHeight) - 8);
_local3.filters = null;
k23ae.addChild(_local3);
_local4 = ka080.k4ea3("title");
k23ae.addChild(_local4);
_local4.y = 12;
_local4.x = int((kb896 + ((kd21a - _local4.width) / 2)));
_local5 = k3e3d(14, 13946791);
_local5.text = "LITE";
_local5.rotation = -5;
_local5.width = kd21a;
_local5.x = kb896;
_local5.y = ((_local4.y + _local4.height) + 6);
_local5.filters = null;
k23ae.addChild(_local5);
_local6 = k23ae.addChild(ka080.k4ea3("pin"));
_local6.x = 4;
_local6.y = 4;
_local6 = k23ae.addChild(ka080.k4ea3("pin"));
_local6.x = 4;
_local6.y = ((loaderInfo.height - 4) - _local6.height);
_local6 = k23ae.addChild(ka080.k4ea3("pin"));
_local6.x = ((loaderInfo.width - 4) - _local6.width);
_local6.y = 4;
_local6 = k23ae.addChild(ka080.k4ea3("pin"));
_local6.x = ((loaderInfo.width - 4) - _local6.width);
_local6.y = ((loaderInfo.height - 4) - _local6.height);
kf03d = new Sprite();
kf03d.x = kff6d;
kf03d.y = k2fc1;
k5b42.addChild(kf03d);
k252e = k3e3d(12, 0xCCCCCC, false);
k252e.filters = null;
k252e.htmlText = "<font color='#ffcc00' size='18'>Instructions</font>\nThe objective in this game is to complete loops of railway tracks by moving tiles around on the board.\n\nTo move a tile, first select it by clicking on it. Then click on any empty space to move the tile to the new location.\n\nYou score each time a loop is completed. The bigger the loop, the more points you score. Tiles forming the loop will be removed from the board.\n\nEach time you move a tile, another new tile will take its place. You can preview the next tile at the bottom right of the game screen.\n\nTiles containing a dollar sign are special Bonus Railway tiles that cannot be moved. These tiles earn extra points if you include them in a loop.\n\nThe game ends if the deck of replacement tiles is depleted, or you cannot move any tile on the board, ie there is no more empty space or moveable tile on the board.\n\nTip: if you need help with this game, please visit <font color='#eeeeee'><a href='http://kurohako.com'>http://kurohako.com</a></font> and watch some game replays.";
k252e.x = (kff6d + 4);
k252e.y = k2fc1;
k252e.wordWrap = true;
k252e.width = ((k02a8 * k54f8) - 8);
k252e.height = (k380e * k80ae);
k23ae.addChild(k252e);
k8fc5 = k3e3d(16, 0xCCCCCC);
k7282 = k3e3d(14, 0xCCCCCC);
_local7 = k60ef("start", keebb);
_local7.x = (kb896 + int(((kd21a - _local7.width) / 2)));
_local7.y = 390;
k5b42.addChild(_local7);
}
private function kf76b(_arg1:DisplayObjectContainer, _arg2:int=0, _arg3:int=0):void{
var clip = _arg1;
var x = _arg2;
var y = _arg3;
if (clip == null){
if (k67d4){
k1d6a.stop();
k1d6a = null;
k67d4.parent.removeChild(k67d4);
};
} else {
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();
};
}
private function kb7f8(_arg1:TimerEvent):void{
if (kf192 < k9405){
kf192++;
} else {
if (kf192 > k9405){
kf192--;
};
};
if (kf192 == k9405){
k7802.stop();
k7802 = null;
};
k8fc5.text = ("$" + k6228(kf192));
}
private function k15bd(_arg1:TweenEvent):void{
_arg1.target.removeEventListener(TweenEvent.MOTION_FINISH, k15bd);
if (_arg1.target.obj.parent){
k5b42.removeChild(_arg1.target.obj);
};
}
private function k3954(_arg1:TweenEvent):void{
_arg1.target.removeEventListener(TweenEvent.MOTION_FINISH, k3954);
if (_arg1.target.obj.parent){
k5b42.removeChild(_arg1.target.obj);
};
}
private function k0e52(_arg1:MouseEvent):void{
var _local2:int;
var _local3:int;
var _local4:int;
_local2 = int(((_arg1.localX - 1) / k54f8));
_local3 = int(((_arg1.localY - 1) / k80ae));
_local4 = ((_local3 * k02a8) + _local2);
if (k713d == null){
k713d = ka080.k4ea3("selector");
k713d.alpha = 0.25;
kf03d.addChild(k713d);
};
k713d.x = (_local2 * k54f8);
k713d.y = (_local3 * k80ae);
}
public function k0b12():void{
var _local1:*;
var _local2:TextField;
var _local3:SimpleButton;
kf76b(null);
_local1 = kbc10.getChildAt(1);
_local2 = (_local1.getChildAt(0) as TextField);
_local2.htmlText = (kfc27 + "\n\nplay again?");
_local2.height = (_local2.textHeight + 8);
_local3 = k60ef("ok", k6a3d);
_local3.x = int(((408 - _local3.width) / 2));
_local3.y = (_local2.height + 6);
_local1.addChild(_local3);
ke4c2(kbc10.getChildAt(0), "height", kbc10.height, ((_local2.height + _local3.height) + 22), 0.333);
ke4c2(kbc10, "y", kbc10.y, int(((loaderInfo.height - ((_local2.height + _local3.height) + 22)) / 2)), 0.333);
}
public function get score():int{
return (k9405);
}
private function kbff6(_arg1:int):Boolean{
var _local2:int;
var _local3:int;
var _local4:int;
var _local5:Boolean;
_local2 = _arg1;
if (k5c20[_local2]){
ke7e9 = [];
_local5 = true;
while (_local5) {
_local4 = k5c20[_local2];
if (_local4 < 0){
return (false);
};
if (_local4 > 12){
_local4 = (_local4 / 10);
};
_local5 = false;
if (((!((_local3 == 8))) && ((_local4 & 8)))){
if (_local2 > 6){
_local2 = (_local2 - k02a8);
_local4 = k5c20[_local2];
if (_local4 > 12){
_local4 = (_local4 / 10);
};
_local5 = Boolean(((_local4) && ((_local4 & 2))));
if (_local5){
ke7e9.push(_local2);
_local3 = 2;
};
} else {
return (false);
};
} else {
if (((!((_local3 == 4))) && ((_local4 & 4)))){
if (((_local2 + 1) % k02a8)){
_local2++;
_local4 = k5c20[_local2];
if (_local4 > 12){
_local4 = (_local4 / 10);
};
_local5 = Boolean(((_local4) && ((_local4 & 1))));
if (_local5){
ke7e9.push(_local2);
_local3 = 1;
};
} else {
return (false);
};
} else {
if (((!((_local3 == 2))) && ((_local4 & 2)))){
if (_local2 < 42){
_local2 = (_local2 + k02a8);
_local4 = k5c20[_local2];
if (_local4 > 12){
_local4 = (_local4 / 10);
};
_local5 = Boolean(((_local4) && ((_local4 & 8))));
if (_local5){
ke7e9.push(_local2);
_local3 = 8;
};
} else {
return (false);
};
} else {
if (((!((_local3 == 1))) && ((_local4 & 1)))){
if ((_local2 % k02a8)){
_local2--;
_local4 = k5c20[_local2];
if (_local4 > 12){
_local4 = (_local4 / 10);
};
_local5 = Boolean(((_local4) && ((_local4 & 4))));
if (_local5){
ke7e9.push(_local2);
_local3 = 4;
};
} else {
return (false);
};
};
};
};
};
if (_local2 == _arg1){
break;
};
};
return (_local5);
//unresolved jump
};
return (false);
}
private function kc520():int{
var _local1:Array;
if ((((kb2d0 == null)) || ((kb2d0.length < 1)))){
_local1 = [3, 5, 6, 9, 10, 12, 3, 5, 6, 9, 10, 12, 30, 50, 60, 90, 100, 120];
kb2d0 = k549a(_local1);
};
return (kb2d0.shift());
}
private function k6228(_arg1:int):String{
var _local2:String;
_local2 = String(_arg1);
if (_local2.length < 4){
return (_local2);
};
return (((k6228(int(_local2.slice(0, -3))) + ",") + _local2.slice(-3)));
}
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 k23c7():Boolean{
var _local1:Boolean;
var _local2:Boolean;
var _local3:int;
var _local4:int;
var _local5:Sprite;
var _local6:TextField;
var _local7:MovieClip;
_local3 = k5c20.length;
_local4 = 0;
while (_local4 < _local3) {
if (k5c20[_local4] == 0){
_local1 = true;
};
if (((k5c20[_local4]) && ((k5c20[_local4] <= 12)))){
_local2 = true;
if (_local1){
break;
};
};
_local4++;
};
if (((((_local1) && (_local2))) && ((k2934 >= 0)))){
return (false);
};
kfc27 = ((("Game Over!\n+++ " + ((k2934)<0) ? "no more replacement tiles" : "no more moves") + " +++\n\n$") + k6228(k9405));
_local5 = new Sprite();
_local6 = k3e3d(14, 0xFFCC00);
_local6.wordWrap = true;
_local6.htmlText = (kfc27 + "\n\n<font color='#FFFFFF'>please wait...</font>");
_local6.width = 408;
_local6.height = (_local6.textHeight + 8);
_local5.addChild(_local6);
_local7 = new MovieClip();
_local7.graphics.drawRect(0, 0, 400, 300);
_local7.y = (_local6.height + 8);
kf76b(_local7, 205);
_local5.addChild(_local7);
k8eff(_local5);
MochiAd.showInterLevelAd({clip:_local7, id:"c21efb593fdb83d7", res:"400x300", no_bg:true, ad_finished:k0b12});
return (true);
}
private function ke0da(_arg1:MouseEvent):void{
if (k713d){
kf03d.removeChild(k713d);
k713d = null;
};
}
public function set score(_arg1:int):void{
if (_arg1 == k9405){
return;
};
k9405 = _arg1;
if (kf192 != k9405){
if (k7802 == null){
k7802 = new Timer(25);
k7802.addEventListener("timer", kb7f8);
};
k7802.start();
};
}
private function kc89f(_arg1):void{
var _local2:Sprite;
var _local3:int;
var _local4:int;
var _local5:int;
var _local6:int;
var _local7:TextField;
var _local8:Bitmap;
if (kbff6(_arg1)){
_local2 = new Sprite();
_local4 = ke7e9.length;
_local5 = 0;
while (_local5 < _local4) {
if (k5c20[ke7e9[_local5]] > 12){
_local3 = (_local3 + 3);
} else {
_local3++;
};
_local8 = ka080.k4ea3(("tile" + k5c20[ke7e9[_local5]]));
_local8.x = kf03d.getChildAt(ke7e9[_local5]).x;
_local8.y = kf03d.getChildAt(ke7e9[_local5]).y;
_local2.addChild(_local8);
Bitmap(kf03d.getChildAt(ke7e9[_local5])).bitmapData = ka080.k4ea3("tile0").bitmapData;
k5c20[ke7e9[_local5]] = 0;
_local5++;
};
_local2.x = kff6d;
_local2.y = k2fc1;
k5b42.addChild(_local2);
ke4c2(_local2, "alpha", 1, 0, 0.666, k3954);
_local6 = (Math.pow((_local3 - 4), 2) + _local3);
this.score = (this.score + _local6);
_local7 = k3e3d(24, 0xFFCC00, false);
_local7.autoSize = "left";
_local7.text = ("+$" + k6228(_local6));
_local7.x = (kf03d.getChildAt(_arg1).x + kff6d);
_local7.y = (kf03d.getChildAt(_arg1).y + k2fc1);
ke4c2(_local7, "alpha", 1, 0, 3);
ke4c2(_local7, "y", _local7.y, (_local7.y - k80ae), 5, k15bd);
k5b42.addChild(_local7);
ke7e9 = [];
};
}
private function kad78(_arg1:TweenEvent):void{
Bitmap(kf03d.getChildAt(kb770)).bitmapData = ka080.k4ea3(("tile" + k5c20[kb770])).bitmapData;
kc89f(kb770);
kb770 = -1;
k6fa3.x = (k8fc5.x + int(((k8fc5.width - k6fa3.width) / 2)));
k6fa3.y = 306;
if (!k23c7()){
if (k2934){
kc1b1 = kc520();
k6fa3.bitmapData = ka080.k4ea3(("tile" + kc1b1)).bitmapData;
k6fa3.alpha = 0.5;
ke4c2(k6fa3, "x", loaderInfo.width, k6fa3.x, 0.333);
} else {
k5b42.removeChild(k6fa3);
k7282.text = "last move!";
};
kf71c = false;
if (((k39be) && (k6122))){
kc006(null);
};
};
}
private function kfb56(_arg1:Event):void{
var _local2:MovieClip;
k6161 = stage.frameRate;
stage.align = "TL";
stage.scaleMode = "noScale";
k5ba8 = new Dictionary();
k23ae = (addChild(new Sprite()) as Sprite);
k5b42 = (addChild(new Sprite()) as Sprite);
kbc10 = (addChild(new Sprite()) as Sprite);
_local2 = (addChild(new MovieClip()) as MovieClip);
ka080 = new k33ed("");
if (ka080.k4e07("background.png", "background", true)){
if (ka080.k4e07("tiles.png", "tile0,tile3,tile5,tile6,tile9,tile10,tile12,tile30,tile50,tile60,tile90,tile100,tile120,selector", true)){
if (ka080.k4e07("title.png", "title", true)){
if (ka080.k4e07("pin.png", "pin", true)){
if (ka080.k4e07("buttons.png", "start_up,start_over,start_down,yes_up,yes_over,yes_down,no_up,no_over,no_down,ok_up,ok_over,ok_down", true)){
MochiAd.showPreGameAd({clip:_local2, id:"c21efb593fdb83d7", res:"588x438", background:0, color:0xFF9900, outline:0, no_bg:false, ad_finished:k3bd4});
};
};
};
};
};
}
private function kb3f2(_arg1:TweenEvent):void{
if (!--k85ef){
stage.frameRate = k6161;
};
_arg1.target.removeEventListener(TweenEvent.MOTION_FINISH, kb3f2);
k5ba8[_arg1.target] = null;
}
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 k22d5(_arg1:TweenEvent):void{
kf03d.removeChild(k23a7);
Bitmap(kf03d.getChildAt(kbc6f)).bitmapData = ka080.k4ea3(("tile" + k5c20[kbc6f])).bitmapData;
kc89f(kbc6f);
if (k2934--){
k5c20[kb770] = kc1b1;
ke4c2(k6fa3, "x", k6fa3.x, (keaee.x + kff6d), 0.333);
ke4c2(k6fa3, "y", k6fa3.y, (keaee.y + k2fc1), 0.333, kad78);
k7282.text = ("x" + k2934);
if (k2934 > 10){
k7282.textColor = 0xCCCCCC;
} else {
k7282.textColor = 0xFFCC00;
};
} else {
kad78(null);
};
}
private function k8eff(_arg1:Sprite):void{
var _local2:Sprite;
if (_arg1 == null){
return;
};
if (kbc10.numChildren){
kbc10.removeChildAt(0);
};
k5b42.mouseChildren = false;
k5b42.alpha = 0.15;
k23ae.alpha = 0.15;
_arg1.x = 8;
_arg1.y = 8;
_local2 = new Sprite();
kbc10.addChild(_local2);
kbc10.addChild(_arg1);
_local2.graphics.beginFill(8012042);
_local2.graphics.drawRoundRect(0, 0, (_arg1.width + 16), (_arg1.height + 16), 16, 16);
_local2.scale9Grid = new Rectangle(8, 8, (_arg1.width - 8), (_arg1.height - 8));
kbc10.x = int((((loaderInfo.width - _arg1.width) - 16) / 2));
kbc10.y = int((((loaderInfo.height - _arg1.height) - 16) / 2));
kbc10.filters = [new GlowFilter(0, 1, 2, 2, 4), new DropShadowFilter()];
}
private function k6a3d(_arg1:Event=null):void{
var _local2:int;
var _local3:int;
var _local4:Array;
var _local5:int;
var _local6:Bitmap;
var _local7:int;
var _local8:int;
var _local9:int;
kf71c = false;
k53a7();
_local4 = [];
_local2 = 0;
while (_local2 < k380e) {
_local5 = (Math.random() * 6);
_local3 = Math.abs(kc520());
if (_local3 > 12){
_local3 = (_local3 / 10);
};
_local4[((_local2 * k02a8) + _local5)] = _local3;
_local2++;
};
_local5 = (Math.random() * 48);
while ((_local5 in _local4)) {
_local5 = (Math.random() * 48);
};
_local3 = Math.abs(kc520());
if (_local3 > 12){
_local3 = (_local3 / 10);
};
_local4[_local5] = _local3;
kb2d0 = null;
k2934 = k4086;
_local3 = 0;
k5c20 = [];
_local2 = 0;
while (_local2 < k380e) {
_local7 = 0;
_local9 = 0;
while (_local9 < k02a8) {
k5c20[_local3] = 0;
if (_local4[_local3] != null){
k5c20[_local3] = _local4[_local3];
};
if (k570b){
Bitmap(kf03d.getChildAt(_local3)).bitmapData = ka080.k4ea3(("tile" + k5c20[_local3])).bitmapData;
} else {
_local6 = (kf03d.addChild(ka080.k4ea3(("tile" + k5c20[_local3]))) as Bitmap);
_local6.x = _local7;
_local6.y = _local8;
};
_local7 = (_local7 + k54f8);
_local3++;
_local9++;
};
_local8 = (_local8 + k80ae);
_local2++;
};
if (keaee == null){
keaee = ka080.k4ea3("selector");
};
keaee.visible = false;
keaee.x = 0;
keaee.y = 0;
kb770 = -1;
kf03d.addChild(keaee);
kf03d.addEventListener(MouseEvent.MOUSE_MOVE, k0e52);
kf03d.addEventListener(MouseEvent.MOUSE_OUT, ke0da);
kf03d.addEventListener(MouseEvent.CLICK, kc006);
k8fc5.text = "$0";
k8fc5.width = kd21a;
k8fc5.height = (k8fc5.textHeight + 4);
k8fc5.x = kb896;
k8fc5.y = 120;
if (((k6fa3) && (k6fa3.parent))){
k5b42.removeChild(k6fa3);
};
kc1b1 = kc520();
k6fa3 = ka080.k4ea3(("tile" + kc1b1));
k6fa3.x = (k8fc5.x + int(((k8fc5.width - k6fa3.width) / 2)));
k6fa3.y = 310;
k6fa3.alpha = 0.5;
k7282.text = ("x" + k2934);
k7282.textColor = 0xCCCCCC;
k7282.width = kd21a;
k7282.height = (k7282.textHeight + 2);
k7282.x = kb896;
k7282.y = (k6fa3.y + k6fa3.height);
k5b42.addChild(k8fc5);
k5b42.addChild(k6fa3);
k5b42.addChild(k7282);
k570b = true;
k8fc5.text = "$0";
k9405 = 0;
kf192 = 0;
k6d19 = getTimer();
}
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.thickness = -100;
_local5.selectable = false;
_local5.filters = [new GlowFilter(0, 1, 2, 2, 4), new DropShadowFilter(1, 45, 0, 1, 0, 0)];
return (_local5);
}
private function ke4c2(_arg1:Object, _arg2:String, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Function=null):void{
var _local7:Tween;
stage.frameRate = 1000;
k85ef++;
_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 keebb(_arg1:Event):void{
var _local2:Sprite;
var _local3:TextField;
var _local4:SimpleButton;
var _local5:SimpleButton;
var _local6:SimpleButton;
_local2 = new Sprite();
_local3 = k3e3d(14, 0xCCCCCC);
_local3.wordWrap = true;
_local3.width = 308;
if (k570b){
_local3.text = "Are you sure you want to quit and start a new game?";
_local3.height = (_local3.textHeight + 4);
_local2.addChild(_local3);
_local4 = k60ef("yes", k6a3d);
_local4.x = int((((328 - (_local4.width * 2)) - 10) / 2));
_local4.y = (_local3.height + 10);
_local5 = k60ef("no", k53a7);
_local5.x = ((_local4.x + _local4.width) + 10);
_local5.y = _local4.y;
_local2.addChild(_local4);
_local2.addChild(_local5);
} else {
_local3.text = "Reminder!\n\nYou need to complete loops of railway tracks to score!";
_local3.height = (_local3.textHeight + 4);
_local2.addChild(_local3);
_local6 = k60ef("ok", k6a3d);
_local6.x = int(((328 - _local6.width) / 2));
_local6.y = (_local2.height + 10);
_local2.addChild(_local6);
};
k252e.text = "";
k8eff(_local2);
}
private function k60ef(_arg1:String, _arg2:Function):SimpleButton{
var _local3:SimpleButton;
_local3 = new SimpleButton(ka080.k4ea3((_arg1 + "_up")), ka080.k4ea3((_arg1 + "_over")), ka080.k4ea3((_arg1 + "_down")), ka080.k4ea3((_arg1 + "_up")));
_local3.useHandCursor = false;
_local3.addEventListener(MouseEvent.CLICK, _arg2);
return (_local3);
}
private function kc006(_arg1:MouseEvent):void{
var _local2:int;
var _local3:int;
var _local4:int;
if (_arg1){
k39be = _arg1.localX;
k6122 = _arg1.localY;
};
if (kf71c){
return;
};
_local2 = int(((k39be - 1) / k54f8));
_local3 = int(((k6122 - 1) / k80ae));
k39be = 0;
k6122 = 0;
_local4 = ((_local3 * k02a8) + _local2);
if (k5c20[_local4]){
if (k5c20[_local4] <= 12){
if (keaee.visible){
ke4c2(keaee, "x", keaee.x, (_local2 * k54f8), 0.333);
ke4c2(keaee, "y", keaee.y, (_local3 * k80ae), 0.333);
} else {
keaee.x = (_local2 * k54f8);
keaee.y = (_local3 * k80ae);
keaee.visible = true;
};
kb770 = _local4;
};
} else {
if (kb770 != -1){
kf71c = true;
if (((k23a7) && (k23a7.parent))){
k23a7.parent.removeChild(k23a7);
};
k23a7 = ka080.k4ea3(("tile" + k5c20[kb770]));
k23a7.alpha = 0.25;
k23a7.x = keaee.x;
k23a7.y = keaee.y;
kf03d.addChild(k23a7);
ke4c2(k23a7, "x", k23a7.x, (_local2 * k54f8), 0.333);
ke4c2(k23a7, "y", k23a7.y, (_local3 * k80ae), 0.333, k22d5);
kbc6f = _local4;
k5c20[_local4] = k5c20[kb770];
k5c20[kb770] = 0;
Bitmap(kf03d.getChildAt(kb770)).bitmapData = ka080.k4ea3("tile0").bitmapData;
keaee.visible = false;
};
};
}
private function k53a7(_arg1:Event=null):void{
k5b42.mouseChildren = true;
k5b42.alpha = 1;
k23ae.alpha = 1;
while (kbc10.numChildren) {
kbc10.removeChildAt(0);
};
}
}
}//package