Section 1
//Strong (fl.transitions.easing.Strong)
package fl.transitions.easing {
public class Strong {
public static function easeOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = ((_arg1 / _arg4) - 1);
return (((_arg3 * (((((_arg1 * _arg1) * _arg1) * _arg1) * _arg1) + 1)) + _arg2));
}
public static function easeIn(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (_arg1 / _arg4);
return (((((((_arg3 * _arg1) * _arg1) * _arg1) * _arg1) * _arg1) + _arg2));
}
public static function easeInOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (_arg1 / (_arg4 / 2));
if (_arg1 < 1){
return ((((((((_arg3 / 2) * _arg1) * _arg1) * _arg1) * _arg1) * _arg1) + _arg2));
};
_arg1 = (_arg1 - 2);
return ((((_arg3 / 2) * (((((_arg1 * _arg1) * _arg1) * _arg1) * _arg1) + 2)) + _arg2));
}
}
}//package fl.transitions.easing
Section 2
//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 3
//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 4
//demoNode_8 (untangle_fla.demoNode_8)
package untangle_fla {
import flash.display.*;
public dynamic class demoNode_8 extends MovieClip {
public function demoNode_8(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package untangle_fla
Section 5
//LogoShow_9 (untangle_fla.LogoShow_9)
package untangle_fla {
import flash.display.*;
public dynamic class LogoShow_9 extends MovieClip {
public function LogoShow_9(){
addFrameScript(119, frame120);
}
function frame120(){
stop();
}
}
}//package untangle_fla
Section 6
//MainTimeline (untangle_fla.MainTimeline)
package untangle_fla {
import flash.display.*;
import flash.events.*;
import fl.transitions.easing.*;
import fl.transitions.*;
import flash.utils.*;
import flash.media.*;
import flash.net.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.geom.*;
import flash.printing.*;
import flash.text.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class MainTimeline extends MovieClip {
public var node:MovieClip;
public var bgImage:Background;
public var activeNode;
public var so:SharedObject;
public var myContextMenu;
public var a:int;
public var moreGames:SimpleButton;
public var d:Sound;
public var maxLevel;
public var showLevel:MovieClip;
public var request:URLRequest;
public var container:Sprite;
public var level10:SimpleButton;
public var level11:SimpleButton;
public var level12:SimpleButton;
public var level13:SimpleButton;
public var level14:SimpleButton;
public var level15:SimpleButton;
public var level16:SimpleButton;
public var level18:SimpleButton;
public var level19:SimpleButton;
public var level17:SimpleButton;
public var ido;
public var level20:SimpleButton;
public var roter:MovieClip;
public var loaderMC:MovieClip;
public var playNow:SimpleButton;
public var lineNodes:Array;
public var level1:SimpleButton;
public var level2:SimpleButton;
public var level3:SimpleButton;
public var level4:SimpleButton;
public var level5:SimpleButton;
public var level6:SimpleButton;
public var level7:SimpleButton;
public var level9:SimpleButton;
public var level8:SimpleButton;
public var wasRemoved:Boolean;
public var dotCount;
public var lastWin;
public var bgMusic1:Sound;
public var doSelect:Boolean;
public var url:String;
public var level;
public var logo:SimpleButton;
public var dotCache:Array;
public var relations:Array;
public var pairNode;
public function MainTimeline(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7, 7, frame8, 8, frame9, 9, frame10, 10, frame11, 11, frame12, 12, frame13, 13, frame14, 14, frame15, 15, frame16, 16, frame17, 17, frame18, 18, frame19, 19, frame20, 20, frame21, 21, frame22);
}
function frame10(){
stop();
GenerateLevel("279|454|315|471|322|358|159|193|268|440|176|181|488|189|476|177|381|440|332|472|369|454:0|5|5|2|2|9|9|4|4|2|2|8|8|1|1|2|2|7|7|10|10|2|2|3|3|6|6|2|2|0|8|4|9|5|0|6|3|10|7|1|6|5|5|4|4|1|1|10|10|6");
}
function frame16(){
stop();
GenerateLevel("316|147|394|178|233|172|451|309|339|432|175|309|223|392|442|237|201|200|417|393|174|267|425|206|295|433|186|233|449|270|188|347|440|353|250|419|266|155|360|159|380|421:15|17|17|18|18|19|19|20|20|16|16|14|14|6|6|5|5|1|1|0|0|2|2|3|3|9|9|10|10|15|11|12|12|13|13|7|7|4|4|8|8|11|10|17|20|14|1|2|8|7|7|12|12|8|11|17|11|18|18|12|12|19|19|13|13|20|14|13|13|6|6|7|7|5|5|4|4|1|2|4|4|3|3|8|8|9|9|11|11|10|15|0|0|16|16|15|2|10|17|20|14|1|17|19|14|5|2|9");
}
function frame14(){
stop();
GenerateLevel("377|311|294|312|315|233|325|333|356|235|347|334|279|265|374|247|296|247|304|333|390|264|336|222|368|332|385|288|284|288:0|4|4|5|5|3|3|2|2|1|1|0|4|10|10|8|8|9|9|5|3|14|14|7|7|13|13|2|1|12|12|6|6|11|11|0|4|8|8|5|3|7|7|2|1|6|6|0|11|10|9|14|13|12|11|12|14|13|10|9|12|2|14|5|10|0|5|0|0|2|2|5|13|9|9|11|11|13");
}
function frame15(){
stop();
GenerateLevel("494|352|323|83|338|531|111|389|493|381|279|530|320|151|308|538|314|425|315|400|132|419|477|404|484|325|316|362|129|325|112|356:8|15|9|10|10|11|11|9|13|14|14|7|7|12|12|13|2|6|6|5|5|4|4|3|3|2|1|15|8|0|0|1|6|13|13|9|5|12|12|11|10|14|14|2|3|7|7|4|9|8|15|10|0|11|1|10|1|11|0|9|9|15|10|7|7|11|14|9|9|12|14|3|12|4|13|2|13|5|5|2|15|0");
}
function frame18(){
stop();
GenerateLevel("358|343|264|447|306|446|214|390|389|446|244|447|202|404|174|433|407|443|268|333|284|447|241|362|381|351|162|449|228|376|376|374|184|448|296|300|347|445|223|447|282|316|310|282|328|446|371|398|335|336|255|347|204|448|187|418|194|433|369|445:29|4|4|13|13|9|9|4|4|7|7|27|27|5|5|28|28|6|6|7|7|8|8|9|9|10|10|12|12|13|13|29|29|3|3|17|17|16|16|3|3|14|14|15|15|16|17|20|20|2|2|1|1|21|21|22|22|26|26|0|0|23|23|24|24|25|25|0|23|22|26|1|21|20|20|19|19|18|18|17|17|19|2|3|3|4|4|27|12|11|11|10|29|14|15|3|3|20|18|16|16|14|13|18|18|29|29|16|11|8|7|11|10|8|28|7|5|6|5|3|28|27|27|3|2|21|1|5|3|1|26|21|22|0|25|5|5|0|0|1");
}
function frame12(){
stop();
GenerateLevel("231|307|368|364|257|211|287|370|247|347|343|195|413|296|383|213|409|249|229|256|330|378|294|197|396|334:9|10|10|11|11|8|8|9|1|3|3|2|2|0|0|1|4|7|7|6|6|5|5|4|4|6|1|2|10|8|5|9|9|3|3|5|4|1|2|8|10|6|5|12|12|3|12|9|11|6|7|1|0|8|9|6|5|1|3|8");
}
function frame4(){
stop();
GenerateLevel("129|160|513|160|510|473|128|470:0|1|1|2|2|0|0|3|3|2|3|1");
}
function frame3(){
stop();
lineNodes = [];
relations = [];
ido = 0;
activeNode = null;
wasRemoved = false;
doSelect = false;
pairNode = null;
roter.addEventListener(Event.ENTER_FRAME, function (){
if (roter){
roter.rotation = (roter.rotation + 1);
};
});
level = "94|283|94|460|327|368|323|466:0|1|1|2|2|3|3|0";
dotCount = 0;
dotCache = [];
lastWin = 0;
GenerateLevel(level);
}
function frame7(){
stop();
GenerateLevel("321|516|322|202|472|342|181|341|341|203|339|516|182|360|473|358:0|7|7|6|6|5|5|4|4|3|3|2|2|1|1|0|6|1|2|5|7|4|0|3|6|4|3|5|7|1|0|2");
}
function frame2(){
loaderMC.addEventListener(MouseEvent.MOUSE_DOWN, function (){
url = "http://nonoba.com/?ref=untangleTracking";
request = new URLRequest(url);
try {
navigateToURL(request);
} catch(e:Error) {
trace("Error occurred!");
};
});
node.addEventListener(MouseEvent.MOUSE_DOWN, function (){
if (node.currentFrame == 1){
SoundMixer.stopAll();
} else {
d = new BgMusic();
d.play(0, 1000);
};
node.gotoAndStop(((node.currentFrame == 1)) ? 2 : 1);
});
SoundMixer.stopAll();
bgMusic1 = new BgMusic();
bgMusic1.play(0, 1000);
stop();
level1.addEventListener(MouseEvent.MOUSE_DOWN, function (_arg1:Event){
if (maxLevel >= 3){
gotoAndStop(3);
};
});
level2.addEventListener(MouseEvent.MOUSE_DOWN, function (_arg1:Event){
if (maxLevel >= 4){
gotoAndStop(4);
};
});
level3.addEventListener(MouseEvent.MOUSE_DOWN, function (_arg1:Event){
if (maxLevel >= 5){
gotoAndStop(5);
};
});
level4.addEventListener(MouseEvent.MOUSE_DOWN, function (_arg1:Event){
if (maxLevel >= 6){
gotoAndStop(6);
};
});
level5.addEventListener(MouseEvent.MOUSE_DOWN, function (_arg1:Event){
if (maxLevel >= 7){
gotoAndStop(7);
};
});
level6.addEventListener(MouseEvent.MOUSE_DOWN, function (_arg1:Event){
if (maxLevel >= 8){
gotoAndStop(8);
};
});
level7.addEventListener(MouseEvent.MOUSE_DOWN, function (_arg1:Event){
if (maxLevel >= 9){
gotoAndStop(9);
};
});
level8.addEventListener(MouseEvent.MOUSE_DOWN, function (_arg1:Event){
if (maxLevel >= 10){
gotoAndStop(10);
};
});
level9.addEventListener(MouseEvent.MOUSE_DOWN, function (_arg1:Event){
if (maxLevel >= 11){
gotoAndStop(11);
};
});
level10.addEventListener(MouseEvent.MOUSE_DOWN, function (_arg1:Event){
if (maxLevel >= 12){
gotoAndStop(12);
};
});
level11.addEventListener(MouseEvent.MOUSE_DOWN, function (_arg1:Event){
if (maxLevel >= 13){
gotoAndStop(13);
};
});
level12.addEventListener(MouseEvent.MOUSE_DOWN, function (_arg1:Event){
if (maxLevel >= 14){
gotoAndStop(14);
};
});
level13.addEventListener(MouseEvent.MOUSE_DOWN, function (_arg1:Event){
if (maxLevel >= 15){
gotoAndStop(15);
};
});
level14.addEventListener(MouseEvent.MOUSE_DOWN, function (_arg1:Event){
if (maxLevel >= 16){
gotoAndStop(16);
};
});
level15.addEventListener(MouseEvent.MOUSE_DOWN, function (_arg1:Event){
if (maxLevel >= 17){
gotoAndStop(17);
};
});
level16.addEventListener(MouseEvent.MOUSE_DOWN, function (_arg1:Event){
if (maxLevel >= 18){
gotoAndStop(18);
};
});
level17.addEventListener(MouseEvent.MOUSE_DOWN, function (_arg1:Event){
if (maxLevel >= 19){
gotoAndStop(19);
};
});
level18.addEventListener(MouseEvent.MOUSE_DOWN, function (_arg1:Event){
if (maxLevel >= 20){
gotoAndStop(20);
};
});
level19.addEventListener(MouseEvent.MOUSE_DOWN, function (_arg1:Event){
if (maxLevel >= 21){
gotoAndStop(21);
};
});
level20.addEventListener(MouseEvent.MOUSE_DOWN, function (_arg1:Event){
if (maxLevel >= 22){
gotoAndStop(22);
};
});
so = SharedObject.getLocal("untangleLevel", "/");
maxLevel = ((so.data.currentLevel) || (3));
so.data.currentLevel = maxLevel;
so.flush();
myContextMenu = new ContextMenu();
myContextMenu.hideBuiltInItems();
bgImage.contextMenu = myContextMenu;
stage.showDefaultContextMenu = false;
playNow.addEventListener(MouseEvent.MOUSE_DOWN, function (_arg1:Event){
gotoAndStop(maxLevel);
});
moreGames.addEventListener(MouseEvent.MOUSE_DOWN, function (_arg1:Event){
var e = _arg1;
url = "http://nonoba.com/?ref=untangleTracking";
request = new URLRequest(url);
try {
navigateToURL(request);
} catch(e:Error) {
trace("Error occurred!");
};
});
logo.addEventListener(MouseEvent.MOUSE_DOWN, function (_arg1:Event){
var e = _arg1;
url = "http://nonoba.com/?ref=untangleTracking";
request = new URLRequest(url);
try {
navigateToURL(request);
} catch(e:Error) {
trace("Error occurred!");
};
});
}
function frame17(){
stop();
GenerateLevel("507|293|478|422|489|181|84|308|500|359|364|86|215|82|376|506|104|184|161|464|164|114|276|72|470|143|201|494|122|411|396|98|503|233|102|368|320|74|414|485|127|148|443|457|261|515|430|117|326|518|88|243:0|19|19|18|18|17|17|16|16|15|15|14|14|13|13|12|12|11|11|10|10|9|9|8|8|7|7|6|6|5|5|4|4|3|3|2|2|1|1|0|19|20|20|21|21|22|22|23|23|24|24|25|25|9|1|20|20|17|16|21|21|2|3|22|22|15|14|23|23|4|5|24|24|13|12|25|25|6|7|9|9|11|11|25|25|7|6|8|10|12|6|24|24|12|14|24|24|4|4|22|22|2|2|20|20|0|18|20|20|16|16|22|22|14|14|12|6|4|14|16|2|4|16|18|0|2");
}
function frame5(){
stop();
GenerateLevel("166|245|324|500|488|242|163|424|324|152|485|422:5|0|0|1|1|2|2|3|3|4|4|5|5|3|2|0");
}
function frame9(){
stop();
GenerateLevel("190|272|242|499|315|503|193|468|149|360|164|421|367|487|400|455|160|311|438|168:9|6|6|1|1|7|7|8|8|9|5|0|0|4|4|3|3|2|2|5|8|1|1|9|2|0|0|3|0|1|7|4|5|6|1|4|0|6|9|2|3|8|7|3|5|9");
}
function frame8(){
stop();
GenerateLevel("320|521|361|249|324|122|500|429|137|222|367|405|132|437|511|220|231|335:0|8|8|7|7|5|5|4|4|1|1|0|0|2|2|1|3|4|3|5|7|6|6|8|6|2|2|3|3|6|6|5|3|1|2|8|0|7|7|4|4|0|0|1|1|2|2|3|3|4|4|5|5|6|6|7|7|8");
}
function frame21(){
stop();
GenerateLevel("277|236|356|253|459|238|209|283|225|283|493|329|402|254|476|329|428|239|195|237|193|297|241|282|424|328|240|238|457|314|399|299|347|287|396|238|390|327|457|299|193|312|195|253|337|300|458|283|313|324|459|268|399|313|374|328|279|265|285|280|209|326|459|254|293|296|194|326|194|268|209|237|412|238|325|312|357|235|240|326|276|251|510|329|354|271|302|310|194|282|458|329|400|284|225|237|408|328|402|269|380|238|225|326:0|3|3|2|2|1|1|0|0|2|7|6|6|5|5|4|4|7|3|6|0|7|1|4|2|5|3|5|2|4|1|7|0|6|7|11|11|6|6|10|10|5|5|9|9|4|4|8|8|7|12|19|19|18|18|17|17|16|16|15|15|14|14|13|13|12|12|7|7|19|19|11|11|18|18|6|6|17|17|10|10|16|16|5|5|15|15|9|9|14|14|4|4|13|13|8|8|12|18|23|23|17|16|22|22|15|14|21|21|13|12|20|20|19|19|38|38|39|39|40|40|24|24|25|25|12|13|26|26|27|27|41|41|28|28|29|29|14|15|30|30|31|31|42|42|32|32|33|33|16|17|34|34|35|35|43|43|37|37|36|36|18|19|39|39|20|20|24|24|12|13|27|27|21|21|28|28|14|15|31|31|22|22|32|32|16|17|35|35|23|23|37|37|18|36|47|47|38|25|46|46|26|29|45|45|30|33|44|44|34|44|17|44|16|15|45|45|14|13|46|46|12|19|47|47|18|34|33|30|29|26|25|38|36|37|51|51|43|51|35|23|51|22|48|32|48|48|42|31|48|21|49|49|28|27|49|49|41|40|50|50|24|20|50|50|39|31|28|24|27|37|39|32|35|39|36|35|33|31|29|27|25|40|43|43|42|42|41|41|40|40|27|41|31|42|35|43|39|43|41");
}
function frame1(){
stop();
url = "http://nonoba.com/chris/untangle/?ref=untangleTracking";
request = new URLRequest(url);
MochiAd.showPreGameAd({clip:root, id:"378791e8c35917c3", res:"650x650", background:0xFFFFFF, color:0x626262, outline:0xFFFFFF, no_bg:true});
}
function frame13(){
stop();
GenerateLevel("303|90|476|333|376|127|159|353|284|103|329|85|326|483|467|352|369|106|153|335|278|124|471|313|353|92|158|315:12|11|9|10|8|7|5|6|4|3|2|1|0|13|13|1|1|3|3|5|5|7|7|9|9|11|12|10|10|8|8|6|6|4|4|2|2|0|0|1|1|4|4|5|5|8|8|9|9|12|2|6|6|10|10|11|13|2|2|10|13|3|3|7|7|11");
}
function frame6(){
stop();
GenerateLevel("323|260|257|544|421|503|212|495|375|544|325|162|319|561:0|2|2|1|1|0|3|6|6|5|5|4|4|3|2|6|1|5|4|0|0|3|6|0");
}
function frame20(){
stop();
GenerateLevel("352|317|403|409|358|433|373|333|337|259|313|263|242|363|367|309|250|317|294|429|266|293|359|260|305|316|425|371|261|403|277|418|345|401|401|283|383|425|303|390|415|389|322|402|317|306|358|332|423|326|314|436|414|301|383|268|243|339|289|276|250|385|325|331|307|331|330|316|336|436|379|319|290|376|426|348|365|393|382|378:2|0|0|1|1|2|5|4|4|3|3|5|8|7|7|6|6|8|11|9|9|10|10|11|11|7|7|9|9|6|6|10|10|8|8|11|7|5|5|8|8|4|4|6|6|3|3|7|3|1|1|5|5|0|0|4|4|2|2|3|12|1|12|0|12|2|7|15|15|5|5|14|14|8|14|4|4|13|13|6|13|3|3|15|9|18|18|7|18|6|6|17|17|8|8|16|16|7|16|11|17|10|7|21|21|6|6|20|20|8|8|19|19|7|21|18|20|17|19|16|7|26|26|9|9|27|27|6|27|18|18|26|6|22|22|10|10|23|23|8|23|17|17|22|8|24|24|11|11|25|25|7|25|16|16|24|11|30|30|9|9|29|29|10|10|28|28|11|9|35|35|29|29|36|36|10|10|31|31|28|28|32|32|11|11|33|33|30|30|34|34|9|32|39|39|31|36|38|38|35|33|37|37|34");
}
function frame22(){
GenerateLevel("");
}
function frame19(){
stop();
GenerateLevel("612|247|314|538|600|258|533|323|577|280|268|577|566|291|544|313|492|367|555|302|523|334|502|356|171|135|303|548|480|377|423|431|402|453|468|388|336|517|292|557|622|236|434|420|256|588|391|463|446|410|588|269|412|441|280|567|358|496|325|527|512|345|368|485|347|507|457|400|380|474:29|28|28|27|27|0|0|1|1|2|2|3|3|4|4|5|5|6|6|7|7|8|8|9|9|10|10|11|11|12|12|13|13|14|14|15|15|16|16|17|17|18|18|19|19|20|20|21|21|22|22|23|23|24|24|25|25|26|26|24|24|22|22|20|20|18|18|16|16|14|14|12|12|10|10|8|8|6|6|4|4|2|2|0|0|28|29|27|27|1|1|3|3|5|5|7|7|9|9|11|11|13|13|15|15|17|17|19|19|21|21|23|23|25|34|26|24|34|34|22|22|34|34|20|18|34|34|16|28|30|30|31|31|32|32|33|33|12|12|32|32|6|6|31|31|2|33|34|34|14|10|32|31|4|8|32|31|0|0|30");
}
function frame11(){
stop();
GenerateLevel("498|307|487|201|181|376|485|344|142|244|163|339|470|165|159|198|147|298|173|161|497|249|463|379:11|10|10|9|9|8|8|11|0|1|1|2|2|3|3|4|4|5|5|6|6|7|7|0|6|0|0|2|2|4|4|6|5|3|3|1|1|7|7|5|7|8|1|9|3|10|11|5|7|11|1|8|3|9|10|5");
}
public function GenerateLevel(_arg1:String){
var bgTween:Tween;
var myTween:Tween;
var tmp:*;
var dots:*;
var rels:*;
var r:*;
var node1:*;
var node2:*;
var data = _arg1;
trace(so.data.currentLevel);
so.data.currentLevel = Math.max(so.data.currentLevel, currentFrame);
so.flush();
maxLevel = so.data.currentLevel;
showLevel.gotoAndStop((so.data.currentLevel - 2));
if (container){
stage.removeChild(container);
};
lineNodes = [];
relations = [];
container = new Sprite();
lastWin = 0;
bgTween = new Tween(bgImage, "y", Strong.easeOut, bgImage.y, (-165 * (currentFrame - 2)), 2, true);
if (data != ""){
tmp = data.split(":");
dots = tmp[0].split("|");
rels = tmp[1].split("|");
a = 0;
while (a < dots.length) {
r = new LineNode(dotCount++);
r.addEventListener(Event.RESIZE, function (_arg1:Event){
redraw(_arg1, false);
});
r.addEventListener(Event.CHANGE, function (_arg1:Event){
redraw(_arg1, true);
});
r.x = dots[a];
r.y = dots[(a + 1)];
lineNodes.push(r);
container.addChild(r);
a = (a + 2);
};
a = 0;
while (a < rels.length) {
node1 = lineNodes[rels[a]];
node2 = lineNodes[rels[(a + 1)]];
relations.push([node1, node2]);
node1.AddNeighbor(node2);
node2.AddNeighbor(node1);
a = (a + 2);
};
};
stage.addChild(container);
myTween = new Tween(container, "alpha", Strong.easeIn, 0, 1, 0.5, true);
redraw(null, false);
}
public function checkNode(_arg1:int, _arg2:int, _arg3:Array){
var _local4:int;
var _local5:Array;
var _local6:int;
var _local7:Array;
_local4 = ((_arg1 * 700) + _arg2);
_local5 = dotCache[_local4];
if (_local5 == null){
dotCache[_local4] = [_arg3];
} else {
_local6 = 0;
while (_local6 < _local5.length) {
_local7 = _local5[_local6];
if (_local7 == _arg3){
return;
};
_local6++;
};
_local6 = 0;
while (_local6 < _local5.length) {
_local7 = _local5[_local6];
if (((((((!((_local7[0] == _arg3[0]))) && (!((_local7[1] == _arg3[0]))))) && (!((_local7[0] == _arg3[1]))))) && (!((_local7[1] == _arg3[1]))))){
_local7[2] = true;
_arg3[2] = true;
};
_local6++;
};
_local5.push(_arg3);
};
}
public function setDot(_arg1:int, _arg2:int, _arg3:Array){
checkNode(_arg1, _arg2, _arg3);
checkNode((_arg1 + 1), _arg2, _arg3);
checkNode(_arg1, (_arg2 + 1), _arg3);
}
public function line(_arg1:int, _arg2:int, _arg3:int, _arg4:int, _arg5:Array){
var _local6:int;
var _local7:int;
var _local8:int;
var _local9:int;
var _local10:int;
var _local11:int;
var _local12:int;
if ((((_arg1 == _arg3)) && ((_arg2 == _arg4)))){
setDot(_arg1, _arg2, _arg5);
return;
};
if (_arg3 >= _arg1){
_local8 = (_arg3 - _arg1);
_local10 = 1;
} else {
_local8 = (_arg1 - _arg3);
_local10 = -1;
};
if (_arg4 >= _arg2){
_local9 = (_arg4 - _arg2);
_local11 = 1;
} else {
_local9 = (_arg2 - _arg4);
_local11 = -1;
};
_local6 = _arg1;
_local7 = _arg2;
if (_local8 >= _local9){
_local9 = (_local9 << 1);
_local12 = (_local9 - _local8);
_local8 = (_local8 << 1);
while (_local6 != _arg3) {
setDot(_local6, _local7, _arg5);
if (_local12 >= 0){
_local7 = (_local7 + _local11);
_local12 = (_local12 - _local8);
};
_local12 = (_local12 + _local9);
_local6 = (_local6 + _local10);
};
setDot(_local6, _local7, _arg5);
} else {
_local8 = (_local8 << 1);
_local12 = (_local8 - _local9);
_local9 = (_local9 << 1);
while (_local7 != _arg4) {
setDot(_local6, _local7, _arg5);
if (_local12 >= 0){
_local6 = (_local6 + _local10);
_local12 = (_local12 - _local9);
};
_local12 = (_local12 + _local8);
_local7 = (_local7 + _local11);
};
setDot(_local6, _local7, _arg5);
};
}
public function redraw(_arg1:Event, _arg2:Boolean){
var crossing:*;
var d:Number;
var cR:Array;
var e = _arg1;
var calcLines = _arg2;
crossing = false;
d = new Date().getTime();
container.graphics.clear();
dotCache = [];
a = 0;
while (a < relations.length) {
cR = relations[a];
cR[2] = false;
line(Math.floor(cR[0].x), Math.floor(cR[0].y), Math.floor(cR[1].x), Math.floor(cR[1].y), cR);
a++;
};
a = 0;
while (a < relations.length) {
cR = relations[a];
if (cR[2]){
crossing = true;
};
container.graphics.lineStyle(2, 0xFFFFFF, (cR[2]) ? 1 : 0.2);
container.graphics.moveTo(cR[0].x, cR[0].y);
container.graphics.lineTo(cR[1].x, cR[1].y);
a++;
};
if (((((!(crossing)) && (((new Date().getTime() - lastWin) > 2000)))) && (calcLines))){
lastWin = new Date().getTime();
a = 0;
while (a < lineNodes.length) {
lineNodes[a].Lock();
a++;
};
setTimeout(function (){
var cSound:*;
var myTween:Tween;
cSound = new Complate();
cSound.play();
myTween = new Tween(container, "alpha", Strong.easeOut, 1, 0, 1, true);
setTimeout(function (){
gotoAndStop((currentFrame + 1));
}, 800);
}, 300);
};
}
}
}//package untangle_fla
Section 7
//node_4 (untangle_fla.node_4)
package untangle_fla {
import flash.display.*;
public dynamic class node_4 extends MovieClip {
public function node_4(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package untangle_fla
Section 8
//progress_12 (untangle_fla.progress_12)
package untangle_fla {
import flash.display.*;
public dynamic class progress_12 extends MovieClip {
public function progress_12(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package untangle_fla
Section 9
//Background (Background)
package {
import flash.display.*;
public class Background extends MovieClip {
public var starContainer:MovieClip;
public function Background(){
var _local1:*;
var _local2:*;
super();
_local1 = 0;
while (_local1 < 200) {
_local2 = new Star();
_local2.x = (Math.random() * 650);
_local2.y = (Math.random() * 3000);
_local2.alpha = Math.random();
starContainer.addChild(_local2);
_local1++;
};
}
}
}//package
Section 10
//BgMusic (BgMusic)
package {
import flash.media.*;
public dynamic class BgMusic extends Sound {
}
}//package
Section 11
//Complate (Complate)
package {
import flash.media.*;
public dynamic class Complate extends Sound {
}
}//package
Section 12
//Hit (Hit)
package {
import flash.media.*;
public dynamic class Hit extends Sound {
}
}//package
Section 13
//LineNode (LineNode)
package {
import flash.display.*;
import flash.events.*;
import flash.media.*;
public class LineNode extends MovieClip {
private var locked:Boolean;// = false
private var offsetX:Number;// = 0
private var offsetY:Number;// = 0
public var Id:Number;
private var neighbors:Array;
private var isInDrag:Boolean;// = false
public function LineNode(_arg1:Number){
isInDrag = false;
offsetX = 0;
offsetY = 0;
neighbors = [];
locked = false;
super();
addFrameScript(0, frame1);
Id = _arg1;
this.addEventListener(MouseEvent.MOUSE_DOWN, handleMouseDown);
this.addEventListener(Event.ADDED_TO_STAGE, handleAddedToStage);
}
private function handleMouseUp(_arg1:MouseEvent){
var _local2:int;
var _local3:*;
if (isInDrag){
Unmark();
dispatchEvent(new Event(Event.DEACTIVATE, false, false));
_local2 = 0;
while (_local2 < neighbors.length) {
neighbors[_local2].Unmark();
_local2++;
};
dispatchEvent(new Event(Event.CHANGE, false, false));
_local3 = new Hit();
_local3.play();
};
isInDrag = false;
}
public function Unmark(){
this.gotoAndStop(1);
}
public function Lock(){
this.locked = true;
}
private function handleAddedToStage(_arg1:Event){
stage.addEventListener(MouseEvent.MOUSE_UP, handleMouseUp);
stage.addEventListener(MouseEvent.MOUSE_MOVE, handleMouseMove);
}
function frame1(){
stop();
}
public function AddNeighbor(_arg1:LineNode){
neighbors.push(_arg1);
}
private function handleMouseDown(_arg1:MouseEvent){
var _local2:int;
var _local3:Sound;
dispatchEvent(new Event(Event.ACTIVATE, false, false));
isInDrag = true;
offsetX = this.mouseX;
offsetY = this.mouseY;
Mark();
_local2 = 0;
while (_local2 < neighbors.length) {
neighbors[_local2].Mark();
_local2++;
};
_local3 = new Pick();
_local3.play(100);
}
private function handleMouseMove(_arg1:MouseEvent){
if (((((isInDrag) && (stage))) && (!(locked)))){
this.x = Math.min(Math.max((stage.mouseX - offsetX), (this.width / 2)), (650 - (this.width / 2)));
this.y = Math.min(Math.max((stage.mouseY - offsetY), (this.width / 2)), (650 - (this.width / 2)));
dispatchEvent(new Event(Event.RESIZE, false, false));
_arg1.updateAfterEvent();
};
}
public function Mark(){
this.gotoAndStop(2);
}
}
}//package
Section 14
//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 15
//Pick (Pick)
package {
import flash.media.*;
public dynamic class Pick extends Sound {
}
}//package
Section 16
//Star (Star)
package {
import flash.display.*;
public dynamic class Star extends MovieClip {
}
}//package