Section 1
//CheckSounds_8 (ddme_fla.CheckSounds_8)
package ddme_fla {
import flash.display.*;
public dynamic class CheckSounds_8 extends MovieClip {
public function CheckSounds_8(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package ddme_fla
Section 2
//preloader_container_1 (ddme_fla.preloader_container_1)
package ddme_fla {
import flash.display.*;
public dynamic class preloader_container_1 extends MovieClip {
public function preloader_container_1(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package ddme_fla
Section 3
//scoreTable_30 (ddme_fla.scoreTable_30)
package ddme_fla {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.utils.*;
public dynamic class scoreTable_30 extends MovieClip {
public var nm_text2:TextField;
public var nm_text3:TextField;
public var nm_text4:TextField;
public var nm_text1:TextField;
public var countdownTimer:Timer;
public function scoreTable_30(){
addFrameScript(0, frame1);
}
function frame1(){
nm_text1.embedFonts = true;
nm_text2.embedFonts = true;
nm_text3.embedFonts = true;
nm_text4.embedFonts = true;
stop();
countdownTimer = new Timer(1000);
countdownTimer.addEventListener(TimerEvent.TIMER, updateTime);
countdownTimer.start();
}
public function updateTime(_arg1:TimerEvent):void{
var _local2:Number;
if (g.game_mode == "time"){
g.now = new Date();
_local2 = (g.endDate.getTime() - g.now.getTime());
} else {
g.now = new Date();
_local2 = (g.now.getTime() - g.endDate.getTime());
};
var _local3:Number = Math.floor((_local2 / 1000));
var _local4:Number = Math.floor((_local3 / 60));
var _local5:Number = Math.floor((_local4 / 60));
var _local6:Number = Math.floor((_local5 / 24));
_local3 = (_local3 % 60);
_local4 = (_local4 % 60);
_local5 = (_local5 % 24);
var _local7:String = _local3.toString();
var _local8:String = _local4.toString();
var _local9:String = _local5.toString();
var _local10:String = _local6.toString();
if (_local7.length < 2){
_local7 = ("0" + _local7);
};
if (_local8.length < 2){
_local8 = ("0" + _local8);
};
if (_local9.length < 2){
_local9 = ("0" + _local9);
};
var _local11:String = ((((_local9 + ":") + _local8) + ":") + _local7);
if (g.game_mode == "time"){
if (int(((g.endDate.getTime() - g.now.getTime()) / 1000)) <= 0){
nm_text1.text = "00:00:00";
(this.parent as controlScene).loose();
};
};
if (g.can_play){
nm_text1.text = _local11;
};
}
}
}//package ddme_fla
Section 4
//Symblol_31 (ddme_fla.Symblol_31)
package ddme_fla {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.filters.*;
import mochi.*;
import flash.media.*;
import flash.text.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.xml.*;
public dynamic class Symblol_31 extends MovieClip {
public var help:DisplayObject;
public var cretits:DisplayObject;
public var btn_1:SimpleButton;
public var btn_2:SimpleButton;
public var btn_3:SimpleButton;
public var btn_4:SimpleButton;
public var btnScore:SimpleButton;
public var mc_h;
public function Symblol_31(){
addFrameScript(0, frame1);
}
public function Go_3(_arg1:Event){
if (!this.contains(cretits)){
cretits = addChild(cretits);
cretits.x = 70;
cretits.y = 10;
} else {
removeChild(cretits);
};
}
function frame1(){
btn_1.addEventListener(MouseEvent.CLICK, Go_2);
btn_2.addEventListener(MouseEvent.CLICK, Go1);
btn_3.addEventListener(MouseEvent.CLICK, Go2);
btn_4.addEventListener(MouseEvent.CLICK, Go_3);
btnScore.addEventListener(MouseEvent.CLICK, Go_6);
An.play(btn_1, "blurMoveIn");
An.play(btn_2, "blurMoveIn");
An.play(btn_3, "blurMoveIn");
An.play(btn_4, "blurMoveIn");
An.play(btnScore, "blurIn");
btn_1.addEventListener(MouseEvent.ROLL_OVER, orRoll);
btn_2.addEventListener(MouseEvent.ROLL_OVER, orRoll);
btn_3.addEventListener(MouseEvent.ROLL_OVER, orRoll);
btn_4.addEventListener(MouseEvent.ROLL_OVER, orRoll);
help = new mcHelp();
cretits = new mcCredits();
}
public function Go_6(_arg1:Event){
main.id.stage.addChild(main.id.stage.getChildByName("Mochi_score"));
MochiScores.showLeaderboard({boardID:"b6d6238b40ccf046"});
}
public function orRoll(_arg1:Event){
An.play(_arg1.target, "Flash");
}
public function Go1(_arg1:Event){
addChild(new mess_newgame());
}
public function Go2(_arg1:Event){
g.game_mode = "time";
main.id.play();
}
public function Go_2(_arg1:Event){
if (!this.contains(help)){
help = addChild(help);
} else {
removeChild(help);
};
}
}
}//package ddme_fla
Section 5
//iadd (functions.iadd)
package functions {
import flash.display.*;
public var iadd:Function = function (_arg1, _arg2, _arg3:Class, _arg4:Object, _arg5:uint=0):DisplayObject{
var _local6:* = _arg4.addChildAt(new (_arg3), _arg5);
_local6.x = _arg1;
_local6.y = _arg2;
return (_local6);
};
}//package functions
Section 6
//is_consist (functions.is_consist)
package functions {
import flash.display.*;
public var is_consist:Function = function (_arg1:Object, _arg2:Class):Boolean{
var _local3:* = _arg1.numChildren;
while (_local3--) {
if ((_arg1.getChildAt(_local3) is _arg2)){
return (true);
};
};
return (false);
};
}//package functions
Section 7
//m (functions.m)
package functions {
public class m {
static const to_dir:Number = 57.2957795130823;
static const to_grad:Number = 0.0174532925199433;
static function col_lines(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Number, _arg8:Number, _arg9:Boolean){
var _local12:*;
var _local10:* = (((((_arg8 - (_arg6 * _arg3)) - _arg1) - _arg7) - (_arg5 * _arg4)) - _arg2);
var _local11:Number = 0;
if (_local10 != 0){
_local11 = (((((_arg7 - (_arg5 * _arg2)) - _arg6) - _arg8) - (_arg6 * _arg1)) - (_arg5 / _local10));
if (_arg9){
_local12 = (((((_arg3 - (_arg1 * _arg2)) - _arg6) - _arg4) - (_arg2 * _arg1)) - (_arg5 / _local10));
if ((((((((_local11 < 0)) || ((_local11 > 1)))) || ((_local12 < 0)))) || ((_local12 > 1)))){
_local11 = 0;
};
};
};
return (_local11);
}
static function kineticEnergy(_arg1:Number, _arg2:Number):Number{
return ((((_arg1 * _arg2) * _arg2) / 2));
}
public static function mod(_arg1:int, _arg2:int):int{
return ((_arg1 - (_arg2 * int((_arg1 / _arg2)))));
}
public static function point_distance(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return (Math.sqrt((((_arg1 - _arg3) * (_arg1 - _arg3)) + ((_arg2 - _arg4) * (_arg2 - _arg4)))));
}
static function isIntersectSegmentsInLines(_arg1, _arg2){
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
var _local8:*;
var _local9:*;
var _local10:Number;
var _local11:Object = {x:_arg1.point1._x, y:_arg1.point1._y};
var _local12:Object = {x:_arg1.point2._x, y:_arg1.point2._y};
var _local13:Object = {x:_arg2.point1._x, y:_arg2.point1._y};
var _local14:Object = {x:_arg2.point2._x, y:_arg2.point2._y};
_arg1.point1.localToGlobal(_local11);
_arg1.point2.localToGlobal(_local12);
_arg1.point1.localToGlobal(_local13);
_arg1.point2.localToGlobal(_local14);
var _local15:Number = (_arg1.point1._x + (_arg1.point2._x / 2));
var _local16:Number = (_arg1.point1._y + (_arg1.point2._y / 2));
_local11.x = (_local11.x - _local15);
_local11.y = (_local11.y - _local16);
_local12.x = (_local12.x - _local15);
_local12.y = (_local12.y - _local16);
_local13.x = (_local13.x - _local15);
_local13.y = (_local13.y - _local16);
_local14.x = (_local14.x - _local15);
_local14.y = (_local14.y - _local16);
if (isIntersectSegments(_local11.x, _local11.y, _local12.x, _local12.y, _local13.x, _local13.y, _local14.x, _local14.y)){
return (true);
};
return (false);
}
static function linesIntersectionPoint(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Number, _arg8:Number):Array{
var _local15:*;
var _local16:Number;
var _local17:*;
var _local9:* = (_arg4 - _arg2);
var _local10:* = (_arg1 - _arg3);
var _local11:* = ((_arg3 * _arg2) - (_arg1 * _arg4));
var _local12:* = (_arg8 - _arg6);
var _local13:* = (_arg5 - _arg7);
var _local14:* = ((_arg7 * _arg6) - (_arg5 * _arg8));
if (((_local9 * _local13) - (_local10 * _local12)) == 0){
return (null);
};
_local16 = (((-(-(_local12)) * _local11) + (((_local9 * _local14) / -(_local12)) * _local10)) + (_local9 * _local13));
_local15 = (((-(_local13) * _local11) + (((_local14 * _local10) / -(_local12)) * _local10)) + (_local9 * _local13));
_local17 = new Array(2);
_local17[0] = _local15;
_local17[1] = _local16;
return (_local17);
}
static function hitCircleWithAnotherCircle(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Number, _arg8:Number, _arg9:Number, _arg10:Number, _arg11:Number, _arg12:Number):Object{
var _local13:Number = (_arg3 - _arg9);
var _local14:Number = (_arg4 - _arg10);
var _local15:Object = hitCircleWithNotMovedCircleVector(_arg1, _arg2, _arg7, _arg8, _local13, _local14);
var _local16:Number = (_local15.x + _arg9);
var _local17:Number = (_local15.y + _arg10);
var _local18:Number = (-(_local15.x) + _arg9);
var _local19:Number = (-(_local15.y) + _arg10);
var _local20:Object = {speedX1:_local16, speedY1:_local17, speedX2:_local18, speedY2:_local19};
return (_local20);
}
static function normalForm(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number):Number{
var _local7:* = 0;
var _local8:* = 0;
var _local9:* = (_arg4 - _arg2);
var _local10:* = (_arg1 - _arg3);
var _local11:* = (((((_arg2 - (_local8 * _arg3)) - _local7) - _arg1) - (_local7 * _arg4)) - _local8);
return ((((((_local9 * _arg5) + _local7) + (_local10 * _arg6)) + _local8) + _local11));
}
static function hitCircleWithNotMovedLine(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number):Object{
var _local7:Object;
if (Math.abs((_arg1 - _arg3)) < 1E-9){
_local7 = {x:-(_arg5), y:_arg6};
return (_local7);
};
if (Math.abs((_arg2 - _arg4)) < 1E-9){
_local7 = {x:_arg5, y:-(_arg6)};
return (_local7);
};
var _local8:Number = (((_arg3 - (_arg1 * _arg5)) + _arg4) - ((_arg2 * _arg6) / Math.sqrt(((((((_arg1 - (_arg3 * _arg1)) - _arg3) + _arg2) - (_arg4 * _arg2)) - ((_arg4 * _arg5) * _arg5)) + (_arg6 * _arg6)))));
var _local9:Number = Math.atan2((_arg4 - _arg2), (_arg3 - _arg1));
var _local10:Number = Math.sqrt(((_arg5 * _arg5) + (_arg6 * _arg6)));
var _local11:Number = (_local10 * _local8);
var _local12:Number = ((_local10 * 1) - (_local8 * _local8));
_local7 = getNewXY(_local12, -(_local11), 1, 1, (-(_local9) * to_dir), 0, 0);
return (_local7);
}
public static function len_x(_arg1:Number, _arg2:Number):Number{
return ((_arg1 * Math.cos((to_grad * _arg2))));
}
public static function len_y(_arg1:Number, _arg2:Number):Number{
return ((-(_arg1) * Math.sin((to_grad * _arg2))));
}
public static function point_direction(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return ((Math.atan2((_arg2 - _arg4), (_arg3 - _arg1)) * to_dir));
}
public static function div(_arg1:int, _arg2:int):int{
return (int((_arg1 / _arg2)));
}
static function diff(_arg1:Number, _arg2:Number, _arg3:int):int{
var _local4:*;
var _local5:* = (_arg3 / 2);
_local4 = (_arg1 - _arg2);
if (_local4 > _local5){
_local4 = (_local4 - _arg3);
} else {
if (_local4 < -(_local5)){
_local4 = (_local4 + _arg3);
};
};
return (_local4);
}
static function isIntersectSegments(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Number, _arg8:Number):Boolean{
var _local9:Number = normalForm(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6);
var _local10:Number = normalForm(_arg1, _arg2, _arg3, _arg4, _arg7, _arg8);
var _local11:Number = normalForm(_arg5, _arg6, _arg7, _arg8, _arg1, _arg2);
var _local12:Number = normalForm(_arg5, _arg6, _arg7, _arg8, _arg3, _arg4);
if (((((_local9 * _local10) <= 0)) && (((_local11 * _local12) <= 0)))){
return (true);
};
return (false);
}
public static function zpoint_direction(_arg1:int, _arg2:int, _arg3:int, _arg4:int):int{
return ((Math.atan2((_arg2 - _arg4), (_arg3 - _arg1)) * to_dir));
}
static function getLineAsAngleAndPoint(_arg1:Number, _arg2:Number, _arg3:Number):Array{
var _local4:Number = Math.tan(_arg3);
var _local5:Number = (_arg2 - (_local4 * _arg2));
var _local6:Number = -(_local4);
var _local7:Number = 1;
var _local8:Number = -(_local5);
var _local9:Array = [];
_local9.push(_local6);
_local9.push(_local7);
_local9.push(_local8);
return (_local9);
}
static function countAngleToFlash(_arg1:Number){
var _local2:Number;
if (Math.abs(_arg1) < 180){
return (_arg1);
};
_local2 = Math.abs((180 - Math.abs(_arg1)));
return ((((-1 * sign(_arg1)) * 180) - _local2));
}
static function countLenOnLine(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number){
return ((Math.abs(((_arg4 * _arg1) + (_arg5 * _arg2))) / Math.sqrt(((_arg1 * _arg1) + (_arg2 * _arg2)))));
}
static function processDelta(_arg1:Number){
if (Math.abs(_arg1) > 1){
return (Math.round(_arg1));
};
return (0);
}
static function normLine(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number):Array{
var _local6:Number = _arg2;
var _local7:Number = -(_arg1);
var _local8:Number = ((_arg1 * _arg5) - (_arg2 * _arg4));
var _local9:Array = [];
_local9.push(_local6);
_local9.push(_local7);
_local9.push(_local8);
return (_local9);
}
static function isCircleIntersectSegmentOfLine(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Number):Boolean{
var _local8:Number = distanceBetweenPointAndLine(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6);
if (isNaN(_local8)){
trace("Неверно вычислена дистанция");
return (false);
};
if (_local8 >= _arg7){
return (false);
};
var _local9:Number = (_arg4 - _arg2);
var _local10:Number = (_arg1 - _arg3);
var _local11:Number = ((_arg3 * _arg2) - (_arg1 * _arg4));
var _local12:Array = normLine(_local9, _local10, _local11, _arg5, _arg6);
var _local13:Number = _local12[0];
var _local14:Number = _local12[1];
var _local15:Number = _local12[2];
var _local16:Array = linesIntersectionPoint1(_local9, _local10, _local11, _local13, _local14, _local15);
var _local17:Number = ((_arg1 - (_local16[0] * _local16[0])) - _arg3);
var _local18:Number = ((_arg2 - (_local16[1] * _local16[1])) - _arg4);
var _local19:Boolean = (((((Math.abs(_local17) > 1E-18)) && ((_local17 < 0)))) || ((((Math.abs(_local18) > 1E-18)) && ((_local18 < 0)))));
var _local20 = (point_distance(_arg1, _arg2, _arg5, _arg6) >= _arg7);
var _local21 = (point_distance(_arg3, _arg4, _arg5, _arg6) >= _arg7);
if (((((_local19) && (_local20))) && (_local21))){
return (false);
};
return (true);
}
static function modAB(_arg1:Number, _arg2:Number):Number{
var _local3:Number = Math.round((_arg1 / _arg2));
if (Math.abs(Math.round((_arg1 / _arg2))) > Math.abs(_local3)){
_local3 = (Math.round((_arg1 / _arg2)) - sign(Math.round((_arg1 / _arg2))));
};
return (_local3);
}
public static function zero_direction(_arg1:int, _arg2:int):int{
return ((Math.atan2(-(_arg2), _arg1) * to_dir));
}
static function linesIntersectionPoint1(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number):Array{
var _local8:Number;
var _local9:Number;
var _local10:*;
var _local7:Number = ((-(_arg4) * _arg2) + (_arg1 * _arg5));
if (_local7 == 0){
return (null);
};
_local8 = (((-(-(_arg4)) * _arg3) + (((_arg1 * _arg6) / -(_arg4)) * _arg2)) + (_arg1 * _arg5));
_local9 = (((-(_arg5) * _arg3) + (((_arg6 * _arg2) / -(_arg4)) * _arg2)) + (_arg1 * _arg5));
_local10 = new Array(2);
_local10[0] = _local9;
_local10[1] = _local8;
return (_local10);
}
static function getNewXY(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Number):Object{
var _local8:*;
var _local9:Number;
var _local10:*;
var _local11:Number;
_local8 = (_arg1 * _arg3);
_local9 = (_arg2 * _arg4);
_local10 = ((_local8 * Math.cos((_arg5 * to_grad))) - (_local9 * Math.sin((_arg5 * to_grad))));
_local11 = ((_local8 * Math.sin((_arg5 * to_grad))) + (_local9 * Math.cos((_arg5 * to_grad))));
_local8 = _local10;
_local9 = _local11;
_local8 = (_local8 + _arg6);
_local9 = (_local9 + _arg7);
var _local12:* = {x:_local8, y:_local9};
return (_local12);
}
public static function zero_distance(_arg1:int, _arg2:int):int{
return (Math.sqrt(((_arg1 * _arg1) + (_arg2 * _arg2))));
}
static function distanceBetweenPointAndLine(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number):Number{
var _local7:* = (_arg4 - _arg2);
var _local8:* = (_arg1 - _arg3);
var _local9:* = ((_arg2 * _arg3) - (_arg1 * _arg4));
return ((Math.abs((((_local7 * _arg5) + (_local8 * _arg6)) + _local9)) / Math.sqrt(((_local7 * _local7) + (_local8 * _local8)))));
}
public static function angle_diff(_arg1:Number, _arg2:Number):int{
var _local3:Number;
_local3 = (_arg1 - _arg2);
if (_local3 > 180){
_local3 = (_local3 - 360);
} else {
if (_local3 < -180){
_local3 = (_local3 + 360);
};
};
return (_local3);
}
static function countTurnSpeedInFlash(_arg1:Number, _arg2:Number):Number{
var _local3:Number;
var _local4:Number;
if ((_arg1 * _arg2) > 0){
return (sign((_arg2 - _arg1)));
};
_local3 = (180 - Math.abs(_arg1));
_local4 = (180 - Math.abs(_arg2));
if ((_local3 + _local4) > (Math.abs(_arg1) + Math.abs(_arg2))){
return (-(sign(_arg1)));
};
return (sign(_arg1));
}
static function countOppositeAngleInFlash(_arg1:Number):Number{
var _local2:Number = (180 - Math.abs(_arg1));
return ((-(sign(_arg1)) * _local2));
}
static function normLineVectorWithTwoPoints(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Object{
var _local5:Number = (_arg1 - _arg3);
var _local6:Number = (_arg4 - _arg2);
var _local7:Number = 0;
var _local8:Number = 0;
if (Math.abs(_local6) > 1E-12){
_local7 = 1;
_local8 = (-(_local5) / _local6);
} else {
_local8 = 1;
_local7 = (-(_local6) / _local5);
};
var _local9:Object = {x:_local7, y:_local8};
return (_local9);
}
static function capacityOfSpherePart(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
if ((_arg2 + _arg3) <= _arg4){
return (0);
};
if ((_arg2 - _arg3) >= _arg4){
return (((((4 / 3) * Math.PI) * Math.pow(_arg3, 3)) / 1000000));
};
if (_arg2 > _arg4){
return ((((4 / 3) * Math.pow(_arg3, 3)) - ((Math.abs(((((((2 / 3) * _arg3) * _arg3) * _arg3) + _arg4) - _arg2)) * Math.PI) / 1000000)));
};
return ((Math.abs((((((((2 / 3) * Math.PI) * _arg3) * _arg3) * _arg3) + _arg4) - _arg2)) / 1000000));
}
static function hitCircleWithNotMovedCircleVector(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number):Object{
var _local12:Number;
var _local7:Number = (_arg3 - _arg1);
var _local8:Number = (_arg4 - _arg2);
var _local9:Number = Math.atan2(-(_local8), -(_local7));
var _local10:Number = Math.atan2(-(_arg6), -(_arg5));
var _local11:Number = ((_local7 * _arg5) + ((_local8 * _arg6) / Math.sqrt((((_local7 * _local7) + (((_local8 * _local8) * _arg5) * _arg5)) + (_arg6 * _arg6)))));
if (Math.abs(_local11) > 1){
throw (new Error("В hitCircleWithNotMovedCircleVector косинус угла больше 1"));
};
if ((((_arg5 == 0)) && ((_arg6 == 0)))){
throw (new Error("В hitCircleWithNotMovedCircleVector переданная скорость равна нулю, соотв вычислить косинус угла низзя"));
};
if (Math.abs(_local11) < 1E-8){
_local12 = ((Math.PI / 2) * sign(_local11));
} else {
_local12 = Math.abs(Math.atan((Math.sqrt((1 - (_local11 * _local11))) / _local11)));
};
var _local13:Number = Math.sqrt(((_arg5 * _arg5) + (_arg6 * _arg6)));
var _local14:Number = (_local13 * Math.cos(_local12));
var _local15:Number = (-(_local13) * Math.sin(_local12));
var _local16:Object = getNewXY(_local14, _local15, 1, 1, ((180 * _local9) / Math.PI), 0, 0);
return (_local16);
}
static function sign(_arg1:Number):Number{
if (_arg1 > 0){
return (1);
};
return (-1);
}
}
}//package functions
Section 8
//Back (gs.easing.Back)
package gs.easing {
public class Back {
public static function easeOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number=1.70158):Number{
_arg1 = ((_arg1 / _arg4) - 1);
return (((_arg3 * (((_arg1 * _arg1) * (((_arg5 + 1) * _arg1) + _arg5)) + 1)) + _arg2));
}
public static function easeIn(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number=1.70158):Number{
_arg1 = (_arg1 / _arg4);
return (((((_arg3 * _arg1) * _arg1) * (((_arg5 + 1) * _arg1) - _arg5)) + _arg2));
}
public static function easeInOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number=1.70158):Number{
_arg1 = (_arg1 / (_arg4 / 2));
if (_arg1 < 1){
_arg5 = (_arg5 * 1.525);
return ((((_arg3 / 2) * ((_arg1 * _arg1) * (((_arg5 + 1) * _arg1) - _arg5))) + _arg2));
};
_arg1 = (_arg1 - 2);
_arg5 = (_arg5 * 1.525);
return ((((_arg3 / 2) * (((_arg1 * _arg1) * (((_arg5 + 1) * _arg1) + _arg5)) + 2)) + _arg2));
}
}
}//package gs.easing
Section 9
//Elastic (gs.easing.Elastic)
package gs.easing {
public class Elastic {
private static const _2PI:Number = 6.28318530717959;
public static function easeIn(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number=0, _arg6:Number=0):Number{
var _local7:Number;
if (_arg1 == 0){
return (_arg2);
};
_arg1 = (_arg1 / _arg4);
if (_arg1 == 1){
return ((_arg2 + _arg3));
};
if (!_arg6){
_arg6 = (_arg4 * 0.3);
};
if (((!(_arg5)) || ((_arg5 < Math.abs(_arg3))))){
_arg5 = _arg3;
_local7 = (_arg6 / 4);
} else {
_local7 = ((_arg6 / _2PI) * Math.asin((_arg3 / _arg5)));
};
--_arg1;
return ((-(((_arg5 * Math.pow(2, (10 * _arg1))) * Math.sin(((((_arg1 * _arg4) - _local7) * _2PI) / _arg6)))) + _arg2));
}
public static function easeInOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number=0, _arg6:Number=0):Number{
var _local7:Number;
if (_arg1 == 0){
return (_arg2);
};
_arg1 = (_arg1 / (_arg4 / 2));
if (_arg1 == 2){
return ((_arg2 + _arg3));
};
if (!_arg6){
_arg6 = (_arg4 * (0.3 * 1.5));
};
if (((!(_arg5)) || ((_arg5 < Math.abs(_arg3))))){
_arg5 = _arg3;
_local7 = (_arg6 / 4);
} else {
_local7 = ((_arg6 / _2PI) * Math.asin((_arg3 / _arg5)));
};
if (_arg1 < 1){
--_arg1;
return (((-0.5 * ((_arg5 * Math.pow(2, (10 * _arg1))) * Math.sin(((((_arg1 * _arg4) - _local7) * _2PI) / _arg6)))) + _arg2));
};
--_arg1;
return ((((((_arg5 * Math.pow(2, (-10 * _arg1))) * Math.sin(((((_arg1 * _arg4) - _local7) * _2PI) / _arg6))) * 0.5) + _arg3) + _arg2));
}
public static function easeOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number=0, _arg6:Number=0):Number{
var _local7:Number;
if (_arg1 == 0){
return (_arg2);
};
_arg1 = (_arg1 / _arg4);
if (_arg1 == 1){
return ((_arg2 + _arg3));
};
if (!_arg6){
_arg6 = (_arg4 * 0.3);
};
if (((!(_arg5)) || ((_arg5 < Math.abs(_arg3))))){
_arg5 = _arg3;
_local7 = (_arg6 / 4);
} else {
_local7 = ((_arg6 / _2PI) * Math.asin((_arg3 / _arg5)));
};
return (((((_arg5 * Math.pow(2, (-10 * _arg1))) * Math.sin(((((_arg1 * _arg4) - _local7) * _2PI) / _arg6))) + _arg3) + _arg2));
}
}
}//package gs.easing
Section 10
//TransformProxy (gs.utils.TransformProxy)
package gs.utils {
import flash.display.*;
import flash.geom.*;
import flash.utils.*;
public class TransformProxy {
private static const _DEG2RAD:Number = 0.0174532925199433;
private static const _RAD2DEG:Number = 57.2957795130823;
private static var _dict:Dictionary = new Dictionary();
private static var _registration:Point;
public static var curMatrix:Matrix;
public static var _target:DisplayObject;
private static var _localRegistration:Point;
private static var _regAt0:Boolean;
private static var _proxies:Array;
public static function set registrationY(_arg1:Number):void{
_registration.y = _arg1;
calibrateLocal();
}
public static function get skewY2():Number{
return ((skewY2Radians * _RAD2DEG));
}
public static function get skewXRadians():Number{
var _local1:Matrix;
_local1 = _target.transform.matrix;
return (Math.atan2(-(_local1.c), _local1.d));
}
public static function get rotation():Number{
return ((rotationRadians * _RAD2DEG));
}
public static function set skewY2(_arg1:Number):void{
skewY2Radians = (_arg1 * _DEG2RAD);
}
public static function set localRegistration(_arg1:Point):void{
_localRegistration = _arg1;
calibrateRegistration();
}
public static function get skewX():Number{
return ((skewXRadians * _RAD2DEG));
}
public static function get skewY():Number{
return ((skewYRadians * _RAD2DEG));
}
public static function get target():DisplayObject{
return (_target);
}
public static function get localRegistrationX():Number{
return (_localRegistration.x);
}
public static function set skewXRadians(_arg1:Number):void{
var _local2:Matrix;
var _local3:Number;
_local2 = _target.transform.matrix;
_local3 = Math.sqrt(((_local2.c * _local2.c) + (_local2.d * _local2.d)));
_local2.c = (-(_local3) * Math.sin(_arg1));
_local2.d = (_local3 * Math.cos(_arg1));
_target.transform.matrix = _local2;
if (!_regAt0){
reposition();
};
}
public static function get rotationRadians():Number{
var _local1:Matrix;
var _local2:Number;
var _local3:Number;
_local1 = _target.transform.matrix;
_local2 = Math.atan2(_local1.b, _local1.a);
_local3 = Math.atan2(-(_local1.c), _local1.d);
if ((_local3 * _local2) < 0){
if (_local2 <= 0){
return ((_local2 + Math.PI));
};
return ((_local2 - Math.PI));
//unresolved jump
};
return (_local2);
}
public static function get localRegistrationY():Number{
return (_localRegistration.y);
}
public static function set skewY(_arg1:Number):void{
skewYRadians = (_arg1 * _DEG2RAD);
}
public static function calibrateRegistration():void{
_registration = _target.parent.globalToLocal(_target.localToGlobal(_localRegistration));
if (_localRegistration.x == 0){
};
_regAt0 = (_localRegistration.y == 0);
}
public static function set skewX(_arg1:Number):void{
skewXRadians = (_arg1 * _DEG2RAD);
}
public static function set scaleY(_arg1:Number):void{
var _local2:Matrix;
var _local3:Number;
var _local4:Number;
var _local5:Number;
_local2 = _target.transform.matrix;
_local3 = Math.sqrt(((_local2.c * _local2.c) + (_local2.d * _local2.d)));
if (_local2.d < 0){
_local3 = -(_local3);
};
if (_local3){
_local4 = (_arg1 / _local3);
_local2.c = (_local2.c * _local4);
_local2.d = (_local2.d * _local4);
} else {
_local5 = Math.atan2(-(_local2.c), _local2.d);
_local2.c = (-(Math.sin(_local5)) * _arg1);
_local2.d = (Math.cos(_local5) * _arg1);
};
_target.transform.matrix = _local2;
if (!_regAt0){
reposition();
};
}
public static function get y():Number{
return (_registration.y);
}
public static function set localRegistrationX(_arg1:Number):void{
_localRegistration.x = _arg1;
calibrateRegistration();
}
public static function set target(_arg1:DisplayObject){
_target = _arg1;
_localRegistration = new Point(0, 0);
calibrateRegistration();
}
public static function set localRegistrationY(_arg1:Number):void{
_localRegistration.y = _arg1;
calibrateRegistration();
}
public static function set scaleX(_arg1:Number):void{
var _local2:Matrix;
var _local3:Number;
var _local4:Number;
var _local5:Number;
_local2 = _target.transform.matrix;
_local3 = Math.sqrt(((_local2.a * _local2.a) + (_local2.b * _local2.b)));
if (_local2.a < 0){
_local3 = -(_local3);
};
if (_local3){
_local4 = (_arg1 / _local3);
_local2.a = (_local2.a * _local4);
_local2.b = (_local2.b * _local4);
} else {
_local5 = Math.atan2(_local2.b, _local2.a);
_local2.a = (Math.cos(_local5) * _arg1);
_local2.b = (Math.sin(_local5) * _arg1);
};
_target.transform.matrix = _local2;
if (!_regAt0){
reposition();
};
}
public static function set scale(_arg1:Number):void{
var _local2:* = _arg1;
scaleY = _arg1;
scaleX = _local2;
}
public static function set rotationRadians(_arg1:Number):void{
var _local2:Matrix;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
_local2 = _target.transform.matrix;
_local3 = Math.atan2(_local2.b, _local2.a);
_local4 = Math.atan2(-(_local2.c), _local2.d);
_local5 = ((_local4 + _arg1) - _local3);
_local6 = Math.sqrt(((_local2.c * _local2.c) + (_local2.d * _local2.d)));
_local2.c = (-(_local6) * Math.sin(_local5));
_local2.d = (_local6 * Math.cos(_local5));
_local7 = Math.sqrt(((_local2.a * _local2.a) + (_local2.b * _local2.b)));
_local2.a = (_local7 * Math.cos(_arg1));
_local2.b = (_local7 * Math.sin(_arg1));
_target.transform.matrix = _local2;
if (!_regAt0){
reposition();
};
}
public static function moveRegX(_arg1:Number):void{
_registration.x = (_registration.x + _arg1);
}
public static function moveRegY(_arg1:Number):void{
_registration.y = (_registration.y + _arg1);
}
public static function get registration():Point{
return (_registration);
}
public static function get registrationX():Number{
return (_registration.x);
}
public static function get registrationY():Number{
return (_registration.y);
}
public static function get localRegistration():Point{
return (_localRegistration);
}
public static function set skewYRadians(_arg1:Number):void{
var _local2:Matrix;
var _local3:Number;
_local2 = _target.transform.matrix;
_local3 = Math.sqrt(((_local2.a * _local2.a) + (_local2.b * _local2.b)));
_local2.a = (_local3 * Math.cos(_arg1));
_local2.b = (_local3 * Math.sin(_arg1));
_target.transform.matrix = _local2;
if (!_regAt0){
reposition();
};
}
public static function get scale():Number{
return (((scaleX + scaleY) / 2));
}
public static function get scaleX():Number{
var _local1:Matrix;
_local1 = _target.transform.matrix;
if (_local1.a < 0){
return (-(Math.sqrt(((_local1.a * _local1.a) + (_local1.b * _local1.b)))));
};
return (Math.sqrt(((_local1.a * _local1.a) + (_local1.b * _local1.b))));
}
public static function set skewX2(_arg1:Number):void{
skewX2Radians = (_arg1 * _DEG2RAD);
}
public static function get scaleY():Number{
var _local1:Matrix;
_local1 = _target.transform.matrix;
if (_local1.d < 0){
return (-(Math.sqrt(((_local1.c * _local1.c) + (_local1.d * _local1.d)))));
};
return (Math.sqrt(((_local1.c * _local1.c) + (_local1.d * _local1.d))));
}
private static function reposition():void{
var _local1:Point;
_local1 = _target.parent.globalToLocal(_target.localToGlobal(_localRegistration));
_target.x = (_target.x + (_registration.x - _local1.x));
_target.y = (_target.y + (_registration.y - _local1.y));
}
public static function set skewY2Radians(_arg1:Number):void{
var _local2:Matrix;
_local2 = _target.transform.matrix;
_local2.b = Math.tan(_arg1);
_target.transform.matrix = _local2;
if (!_regAt0){
reposition();
};
}
public static function get skewYRadians():Number{
var _local1:Matrix;
_local1 = _target.transform.matrix;
return (Math.atan2(_local1.b, _local1.a));
}
public static function get skewX2():Number{
return ((skewX2Radians * _RAD2DEG));
}
private static function calibrateLocal():void{
_localRegistration = _target.globalToLocal(_target.parent.localToGlobal(_registration));
if (_localRegistration.x == 0){
};
_regAt0 = (_localRegistration.y == 0);
}
public static function get skewX2Radians():Number{
return (-(Math.atan(_target.transform.matrix.c)));
}
public static function get skewY2Radians():Number{
return (Math.atan(_target.transform.matrix.b));
}
public static function set x(_arg1:Number):void{
var _local2:Number;
var _local3:int;
_local2 = (_arg1 - _registration.x);
_target.x = (_target.x + _local2);
while (_local3-- > -1) {
_proxies[_proxies.length--].moveRegX(_local2);
};
}
public static function set registration(_arg1:Point):void{
_registration = _arg1;
calibrateLocal();
}
public static function set skewX2Radians(_arg1:Number):void{
var _local2:Matrix;
_local2 = _target.transform.matrix;
_local2.c = Math.tan(-(_arg1));
_target.transform.matrix = _local2;
if (!_regAt0){
reposition();
};
}
public static function get x():Number{
return (_registration.x);
}
public static function set y(_arg1:Number):void{
var _local2:Number;
var _local3:int;
_local2 = (_arg1 - _registration.y);
_target.y = (_target.y + _local2);
while (_local3-- > -1) {
_proxies[_proxies.length--].moveRegY(_local2);
};
}
public static function set rotation(_arg1:Number):void{
rotationRadians = (_arg1 * _DEG2RAD);
}
public static function set registrationX(_arg1:Number):void{
_registration.x = _arg1;
calibrateLocal();
}
}
}//package gs.utils
Section 11
//TweenFilterLite (gs.TweenFilterLite)
package gs {
import flash.filters.*;
import flash.utils.*;
public class TweenFilterLite extends TweenLite {
protected var _matrix:Array;
protected var _hf:Boolean;// = false
protected var _cmf:ColorMatrixFilter;
protected var _uncombinedTimeScale:Number;
protected var _filters:Array;
protected var _endMatrix:Array;
protected var _originalEase:Function;
protected var _clrsa:Array;
public static var removeTween:Function = TweenLite.removeTween;
public static var version:Number = 8.22;
private static var _idMatrix:Array = [1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0];
private static var _lumB:Number = 0.072169;
public static var delayedCall:Function = TweenLite.delayedCall;
public static var killTweensOf:Function = TweenLite.killTweensOf;
private static var _lumG:Number = 0.71516;
protected static var _globalTimeScale:Number = 1;
public static var killDelayedCallsTo:Function = TweenLite.killTweensOf;
private static var _lumR:Number = 0.212671;
public static var getD:Function = TweenLite.getD;
public static var getP:Function = TweenLite.getP;
public function TweenFilterLite(_arg1:Object, _arg2:Number, _arg3:Object){
_filters = [];
super(_arg1, _arg2, _arg3);
_originalEase = this.vars.ease;
if (((!((_timeScale == 1))) && ((this.target is TweenFilterLite)))){
_uncombinedTimeScale = 1;
_timeScale = _globalTimeScale;
} else {
_uncombinedTimeScale = _timeScale;
_timeScale = (_timeScale * _globalTimeScale);
};
if (((!((_timeScale == 1))) && (!((this.delay == 0))))){
this.startTime = (this.initTime + (this.delay * (1000 / _timeScale)));
};
if (TweenLite.version < 8.16){
trace("TweenFilterLite error! Please update your TweenLite class or try deleting your ASO files. TweenFilterLite requires a more recent version. Download updates at http://www.TweenLite.com.");
};
if (_arg3.type != undefined){
trace((("TweenFilterLite error: " + _arg1) + " is using deprecated syntax. Please update to the new syntax. See http://www.TweenFilterLite.com for details."));
};
}
override public function killVars(_arg1:Object):void{
if (TweenLite.overwriteManager.enabled){
TweenLite.overwriteManager.killVars(_arg1, this.vars, this.tweens, _subTweens, _filters);
};
}
override public function initTweenVals(_arg1:Boolean=false, _arg2:String=""):void{
var _local3:int;
var _local4:Object;
var _local5:Object;
var _local6:Object;
if (((((!(_arg1)) && (!((this.delay == 0))))) && (TweenLite.overwriteManager.enabled))){
TweenLite.overwriteManager.manageOverwrites(this, _all[this.target]);
};
_clrsa = [];
_filters = [];
_matrix = _idMatrix.slice();
_arg2 = (_arg2 + " blurFilter glowFilter colorMatrixFilter dropShadowFilter bevelFilter ");
if (_isDisplayObject){
if (this.vars.blurFilter != null){
_local4 = this.vars.blurFilter;
addFilter("blurFilter", _local4, BlurFilter, ["blurX", "blurY", "quality"], new BlurFilter(0, 0, ((_local4.quality) || (1))));
};
if (this.vars.glowFilter != null){
_local4 = this.vars.glowFilter;
addFilter("glowFilter", _local4, GlowFilter, ["alpha", "blurX", "blurY", "color", "quality", "strength", "inner", "knockout"], new GlowFilter(0xFFFFFF, 0, 0, 0, ((_local4.strength) || (1)), ((_local4.quality) || (1)), _local4.inner, _local4.knockout));
};
if (this.vars.colorMatrixFilter != null){
_local4 = this.vars.colorMatrixFilter;
_local5 = addFilter("colorMatrixFilter", _local4, ColorMatrixFilter, [], new ColorMatrixFilter(_matrix));
_cmf = _local5.filter;
_matrix = ColorMatrixFilter(_cmf).matrix;
if (((!((_local4.matrix == null))) && ((_local4.matrix is Array)))){
_endMatrix = _local4.matrix;
} else {
if (_local4.relative == true){
_endMatrix = _matrix.slice();
} else {
_endMatrix = _idMatrix.slice();
};
_endMatrix = setBrightness(_endMatrix, _local4.brightness);
_endMatrix = setContrast(_endMatrix, _local4.contrast);
_endMatrix = setHue(_endMatrix, _local4.hue);
_endMatrix = setSaturation(_endMatrix, _local4.saturation);
_endMatrix = setThreshold(_endMatrix, _local4.threshold);
if (!isNaN(_local4.colorize)){
_endMatrix = colorize(_endMatrix, _local4.colorize, _local4.amount);
} else {
if (!isNaN(_local4.color)){
_endMatrix = colorize(_endMatrix, _local4.color, _local4.amount);
};
};
};
_local3 = 0;
while (_local3 < _endMatrix.length) {
if (((!((_matrix[_local3] == _endMatrix[_local3]))) && (!((_matrix[_local3] == undefined))))){
this.tweens[this.tweens.length] = {o:_matrix, p:_local3.toString(), s:_matrix[_local3], c:(_endMatrix[_local3] - _matrix[_local3]), name:"colorMatrixFilter"};
};
_local3++;
};
};
if (this.vars.dropShadowFilter != null){
_local4 = this.vars.dropShadowFilter;
addFilter("dropShadowFilter", _local4, DropShadowFilter, ["alpha", "angle", "blurX", "blurY", "color", "distance", "quality", "strength", "inner", "knockout", "hideObject"], new DropShadowFilter(0, 45, 0, 0, 0, 0, 1, ((_local4.quality) || (1)), _local4.inner, _local4.knockout, _local4.hideObject));
};
if (this.vars.bevelFilter != null){
_local4 = this.vars.bevelFilter;
addFilter("bevelFilter", _local4, BevelFilter, ["angle", "blurX", "blurY", "distance", "highlightAlpha", "highlightColor", "quality", "shadowAlpha", "shadowColor", "strength"], new BevelFilter(0, 0, 0xFFFFFF, 0.5, 0, 0.5, 2, 2, 0, ((_local4.quality) || (1))));
};
if (this.vars.runBackwards == true){
_local3 = (_clrsa.length - 1);
while (_local3 > -1) {
_local6 = _clrsa[_local3];
_clrsa[_local3].sr = (_local6.sr + _local6.cr);
_local6.cr = (_local6.cr * -1);
_local6.sg = (_local6.sg + _local6.cg);
_local6.cg = (_local6.cg * -1);
_local6.sb = (_local6.sb + _local6.cb);
_local6.cb = (_local6.cb * -1);
_local6.f[_local6.p] = (((_local6.sr << 16) | (_local6.sg << 8)) | _local6.sb);
_local3--;
};
};
super.initTweenVals(true, _arg2);
} else {
super.initTweenVals(_arg1, _arg2);
};
}
public function set timeScale(_arg1:Number):void{
if (_arg1 < 1E-5){
_arg1 = (_uncombinedTimeScale = 1E-5);
} else {
_uncombinedTimeScale = _arg1;
_arg1 = (_arg1 * _globalTimeScale);
};
this.initTime = ((_curTime - ((((_curTime - this.initTime) - (this.delay * (1000 / _timeScale))) * _timeScale) * (1 / _arg1))) - (this.delay * (1000 / _arg1)));
if (this.startTime != 99999999999){
this.startTime = (this.initTime + (this.delay * (1000 / _arg1)));
};
_timeScale = _arg1;
}
public function get timeScale():Number{
return (_uncombinedTimeScale);
}
override public function render(_arg1:uint):void{
var _local3:Number;
var _local4:Object;
var _local5:int;
var _local6:Array;
var _local7:int;
var _local2:Number = (((_arg1 - this.startTime) / 1000) * _timeScale);
if (_local2 >= this.duration){
_local2 = this.duration;
_local3 = ((((_originalEase == this.vars.ease)) || ((this.duration == 0.001)))) ? 1 : 0;
} else {
_local3 = this.vars.ease(_local2, 0, 1, this.duration);
};
_local5 = (this.tweens.length - 1);
while (_local5 > -1) {
_local4 = this.tweens[_local5];
_local4.o[_local4.p] = (_local4.s + (_local3 * _local4.c));
_local5--;
};
if (_hf){
_local5 = (_clrsa.length - 1);
while (_local5 > -1) {
_local4 = _clrsa[_local5];
_local4.f[_local4.p] = ((((_local4.sr + (_local3 * _local4.cr)) << 16) | ((_local4.sg + (_local3 * _local4.cg)) << 8)) | (_local4.sb + (_local3 * _local4.cb)));
_local5--;
};
if (_cmf != null){
ColorMatrixFilter(_cmf).matrix = _matrix;
};
_local6 = this.target.filters;
_local5 = 0;
while (_local5 < _filters.length) {
_local7 = (_local6.length - 1);
while (_local7 > -1) {
if ((_local6[_local7] is _filters[_local5].type)){
_local6.splice(_local7, 1, _filters[_local5].filter);
break;
};
_local7--;
};
_local5++;
};
this.target.filters = _local6;
};
if (_hst){
_local5 = (_subTweens.length - 1);
while (_local5 > -1) {
_subTweens[_local5].proxy(_subTweens[_local5]);
_local5--;
};
};
if (_hasUpdate){
this.vars.onUpdate.apply(null, this.vars.onUpdateParams);
};
if (_local2 == this.duration){
complete(true);
};
}
private function addFilter(_arg1:String, _arg2:Object, _arg3:Class, _arg4:Array, _arg5:BitmapFilter):Object{
var _local8:int;
var _local9:String;
var _local10:Number;
var _local11:Object;
var _local12:Object;
var _local6:Object = {type:_arg3, name:_arg1};
var _local7:Array = this.target.filters;
_local8 = 0;
while (_local8 < _local7.length) {
if ((_local7[_local8] is _arg3)){
_local6.filter = _local7[_local8];
break;
};
_local8++;
};
if (_local6.filter == undefined){
_local6.filter = _arg5;
_local7[_local7.length] = _local6.filter;
this.target.filters = _local7;
};
_local8 = 0;
while (_local8 < _arg4.length) {
_local9 = _arg4[_local8];
if (_arg2[_local9] != undefined){
if ((((((_local9 == "color")) || ((_local9 == "highlightColor")))) || ((_local9 == "shadowColor")))){
_local11 = HEXtoRGB(_local6.filter[_local9]);
_local12 = HEXtoRGB(_arg2[_local9]);
_clrsa[_clrsa.length] = {f:_local6.filter, p:_local9, sr:_local11.rb, cr:(_local12.rb - _local11.rb), sg:_local11.gb, cg:(_local12.gb - _local11.gb), sb:_local11.bb, cb:(_local12.bb - _local11.bb)};
} else {
if ((((((((_local9 == "quality")) || ((_local9 == "inner")))) || ((_local9 == "knockout")))) || ((_local9 == "hideObject")))){
_local6.filter[_local9] = _arg2[_local9];
} else {
if (typeof(_arg2[_local9]) == "number"){
_local10 = (_arg2[_local9] - _local6.filter[_local9]);
} else {
_local10 = Number(_arg2[_local9]);
};
this.tweens[this.tweens.length] = {o:_local6.filter, p:_local9, s:_local6.filter[_local9], c:_local10, name:_arg1};
};
};
};
_local8++;
};
_filters[_filters.length] = _local6;
_hf = true;
return (_local6);
}
public static function set globalTimeScale(_arg1:Number):void{
setGlobalTimeScale(_arg1);
}
public static function setHue(_arg1:Array, _arg2:Number):Array{
if (isNaN(_arg2)){
return (_arg1);
};
_arg2 = (_arg2 * (Math.PI / 180));
var _local3:Number = Math.cos(_arg2);
var _local4:Number = Math.sin(_arg2);
var _local5:Array = [((_lumR + (_local3 * (1 - _lumR))) + (_local4 * -(_lumR))), ((_lumG + (_local3 * -(_lumG))) + (_local4 * -(_lumG))), ((_lumB + (_local3 * -(_lumB))) + (_local4 * (1 - _lumB))), 0, 0, ((_lumR + (_local3 * -(_lumR))) + (_local4 * 0.143)), ((_lumG + (_local3 * (1 - _lumG))) + (_local4 * 0.14)), ((_lumB + (_local3 * -(_lumB))) + (_local4 * -0.283)), 0, 0, ((_lumR + (_local3 * -(_lumR))) + (_local4 * -((1 - _lumR)))), ((_lumG + (_local3 * -(_lumG))) + (_local4 * _lumG)), ((_lumB + (_local3 * (1 - _lumB))) + (_local4 * _lumB)), 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1];
return (applyMatrix(_local5, _arg1));
}
public static function setContrast(_arg1:Array, _arg2:Number):Array{
if (isNaN(_arg2)){
return (_arg1);
};
_arg2 = (_arg2 + 0.01);
var _local3:Array = [_arg2, 0, 0, 0, (128 * (1 - _arg2)), 0, _arg2, 0, 0, (128 * (1 - _arg2)), 0, 0, _arg2, 0, (128 * (1 - _arg2)), 0, 0, 0, 1, 0];
return (applyMatrix(_local3, _arg1));
}
public static function applyMatrix(_arg1:Array, _arg2:Array):Array{
var _local6:int;
var _local7:int;
if (((!((_arg1 is Array))) || (!((_arg2 is Array))))){
return (_arg2);
};
var _local3:Array = [];
var _local4:int;
var _local5:int;
_local6 = 0;
while (_local6 < 4) {
_local7 = 0;
while (_local7 < 5) {
if (_local7 == 4){
_local5 = _arg1[(_local4 + 4)];
} else {
_local5 = 0;
};
_local3[(_local4 + _local7)] = (((((_arg1[_local4] * _arg2[_local7]) + (_arg1[(_local4 + 1)] * _arg2[(_local7 + 5)])) + (_arg1[(_local4 + 2)] * _arg2[(_local7 + 10)])) + (_arg1[(_local4 + 3)] * _arg2[(_local7 + 15)])) + _local5);
_local7++;
};
_local4 = (_local4 + 5);
_local6++;
};
return (_local3);
}
public static function colorize(_arg1:Array, _arg2:Number, _arg3:Number=1):Array{
if (isNaN(_arg2)){
return (_arg1);
};
if (isNaN(_arg3)){
_arg3 = 1;
};
var _local4:Number = (((_arg2 >> 16) & 0xFF) / 0xFF);
var _local5:Number = (((_arg2 >> 8) & 0xFF) / 0xFF);
var _local6:Number = ((_arg2 & 0xFF) / 0xFF);
var _local7:Number = (1 - _arg3);
var _local8:Array = [(_local7 + ((_arg3 * _local4) * _lumR)), ((_arg3 * _local4) * _lumG), ((_arg3 * _local4) * _lumB), 0, 0, ((_arg3 * _local5) * _lumR), (_local7 + ((_arg3 * _local5) * _lumG)), ((_arg3 * _local5) * _lumB), 0, 0, ((_arg3 * _local6) * _lumR), ((_arg3 * _local6) * _lumG), (_local7 + ((_arg3 * _local6) * _lumB)), 0, 0, 0, 0, 0, 1, 0];
return (applyMatrix(_local8, _arg1));
}
public static function setBrightness(_arg1:Array, _arg2:Number):Array{
if (isNaN(_arg2)){
return (_arg1);
};
_arg2 = ((_arg2 * 100) - 100);
return (applyMatrix([1, 0, 0, 0, _arg2, 0, 1, 0, 0, _arg2, 0, 0, 1, 0, _arg2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1], _arg1));
}
public static function setSaturation(_arg1:Array, _arg2:Number):Array{
if (isNaN(_arg2)){
return (_arg1);
};
var _local3:Number = (1 - _arg2);
var _local4:Number = (_local3 * _lumR);
var _local5:Number = (_local3 * _lumG);
var _local6:Number = (_local3 * _lumB);
var _local7:Array = [(_local4 + _arg2), _local5, _local6, 0, 0, _local4, (_local5 + _arg2), _local6, 0, 0, _local4, _local5, (_local6 + _arg2), 0, 0, 0, 0, 0, 1, 0];
return (applyMatrix(_local7, _arg1));
}
public static function get globalTimeScale():Number{
return (_globalTimeScale);
}
public static function setGlobalTimeScale(_arg1:Number):void{
var _local3:Object;
var _local4:Object;
if (_arg1 < 1E-5){
_arg1 = 1E-5;
};
var _local2:Dictionary = _all;
_globalTimeScale = _arg1;
for each (_local3 in _local2) {
for (_local4 in _local3) {
if ((_local3[_local4] is TweenFilterLite)){
_local3[_local4].timeScale = (_local3[_local4].timeScale * 1);
};
};
};
}
public static function from(_arg1:Object, _arg2:Number, _arg3:Object):TweenFilterLite{
_arg3.runBackwards = true;
return (new TweenFilterLite(_arg1, _arg2, _arg3));
}
public static function HEXtoRGB(_arg1:Number):Object{
return ({rb:(_arg1 >> 16), gb:((_arg1 >> 8) & 0xFF), bb:(_arg1 & 0xFF)});
}
public static function setThreshold(_arg1:Array, _arg2:Number):Array{
if (isNaN(_arg2)){
return (_arg1);
};
var _local3:Array = [(_lumR * 0x0100), (_lumG * 0x0100), (_lumB * 0x0100), 0, (-256 * _arg2), (_lumR * 0x0100), (_lumG * 0x0100), (_lumB * 0x0100), 0, (-256 * _arg2), (_lumR * 0x0100), (_lumG * 0x0100), (_lumB * 0x0100), 0, (-256 * _arg2), 0, 0, 0, 1, 0];
return (applyMatrix(_local3, _arg1));
}
public static function to(_arg1:Object, _arg2:Number, _arg3:Object):TweenFilterLite{
return (new TweenFilterLite(_arg1, _arg2, _arg3));
}
}
}//package gs
Section 12
//TweenLite (gs.TweenLite)
package gs {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import gs.utils.*;
import flash.utils.*;
public class TweenLite {
public var delay:Number;
protected var _hasUpdate:Boolean;
protected var _subTweens:Array;
protected var _initted:Boolean;
public var startTime:int;
public var target:Object;
public var duration:Number;
protected var _hst:Boolean;
protected var _isDisplayObject:Boolean;
protected var _active:Boolean;
public var tweens:Array;
public var vars:Object;
public var initTime:int;
protected var _timeScale:Number;
private static var _timer:Timer = new Timer(2000);
private static var _classInitted:Boolean;
public static var defaultEase:Function = TweenLite.easeOut;
public static var version:Number = 8.16;
protected static var _all:Dictionary = new Dictionary();
private static var _sprite:Sprite = new Sprite();
protected static var _curTime:uint;
public static var overwriteManager:Object;
public static var killDelayedCallsTo:Function = TweenLite.killTweensOf;
private static var _listening:Boolean;
public function TweenLite(_arg1:Object, _arg2:Number, _arg3:Object){
var _local5:*;
super();
if (_arg1 == null){
return;
};
if (!_classInitted){
_curTime = getTimer();
_sprite.addEventListener(Event.ENTER_FRAME, executeAll);
if (overwriteManager == null){
overwriteManager = {mode:0, enabled:false};
};
_classInitted = true;
};
this.vars = _arg3;
this.duration = ((_arg2) || (0.001));
this.delay = ((_arg3.delay) || (0));
_timeScale = ((_arg3.timeScale) || (1));
_active = (((_arg2 == 0)) && ((this.delay == 0)));
this.target = _arg1;
_isDisplayObject = (_arg1 is DisplayObject);
if (!(this.vars.ease is Function)){
this.vars.ease = defaultEase;
};
if (this.vars.easeParams != null){
this.vars.proxiedEase = this.vars.ease;
this.vars.ease = easeProxy;
};
if (!isNaN(Number(this.vars.autoAlpha))){
this.vars.alpha = Number(this.vars.autoAlpha);
this.vars.visible = (this.vars.alpha > 0);
};
this.tweens = [];
_subTweens = [];
_hst = (_initted = false);
this.initTime = _curTime;
this.startTime = (this.initTime + (this.delay * 1000));
var _local4:int = ((((_arg3.overwrite == undefined)) || (((!(overwriteManager.enabled)) && ((_arg3.overwrite > 1)))))) ? overwriteManager.mode : int(_arg3.overwrite);
if ((((_all[_arg1] == undefined)) || (((!((_arg1 == null))) && ((_local4 == 1)))))){
delete _all[_arg1];
_all[_arg1] = new Dictionary(true);
} else {
if ((((_local4 > 1)) && ((this.delay == 0)))){
overwriteManager.manageOverwrites(this, _all[_arg1]);
};
};
_all[_arg1][this] = this;
if ((((((this.vars.runBackwards == true)) && (!((this.vars.renderOnStart == true))))) || (_active))){
initTweenVals();
if (_active){
render((this.startTime + 1));
} else {
render(this.startTime);
};
_local5 = this.vars.visible;
if (this.vars.isTV == true){
_local5 = this.vars.exposedProps.visible;
};
if (((((!((_local5 == null))) && ((this.vars.runBackwards == true)))) && (_isDisplayObject))){
this.target.visible = Boolean(_local5);
};
};
if (((!(_listening)) && (!(_active)))){
_timer.addEventListener("timer", killGarbage);
_timer.start();
_listening = true;
};
}
protected function addSubTween(_arg1:String, _arg2:Function, _arg3:Object, _arg4:Object, _arg5:Object=null):void{
var _local7:String;
var _local6:Object = {name:_arg1, proxy:_arg2, target:_arg3, info:_arg5};
_subTweens[_subTweens.length] = _local6;
for (_local7 in _arg4) {
if (typeof(_arg4[_local7]) == "number"){
this.tweens[this.tweens.length] = {o:_arg3, p:_local7, s:_arg3[_local7], c:(_arg4[_local7] - _arg3[_local7]), sub:_local6, name:_arg1};
} else {
this.tweens[this.tweens.length] = {o:_arg3, p:_local7, s:_arg3[_local7], c:Number(_arg4[_local7]), sub:_local6, name:_arg1};
};
};
_hst = true;
}
public function initTweenVals(_arg1:Boolean=false, _arg2:String=""):void{
var _local3:String;
var _local4:int;
var _local6:Array;
var _local7:ColorTransform;
var _local8:ColorTransform;
var _local9:Point;
var _local10:*;
var _local11:*;
var _local12:Object;
var _local5:Object = this.vars;
if (_local5.isTV == true){
_local5 = _local5.exposedProps;
};
if (((((!(_arg1)) && (!((this.delay == 0))))) && (overwriteManager.enabled))){
overwriteManager.manageOverwrites(this, _all[this.target]);
};
if ((this.target is Array)){
_local6 = ((this.vars.endArray) || ([]));
_local4 = 0;
while (_local4 < _local6.length) {
if (((!((this.target[_local4] == _local6[_local4]))) && (!((this.target[_local4] == undefined))))){
this.tweens[this.tweens.length] = {o:this.target, p:_local4.toString(), s:this.target[_local4], c:(_local6[_local4] - this.target[_local4]), name:_local4.toString()};
};
_local4++;
};
} else {
if (((((!((typeof(_local5.tint) == "undefined"))) || ((this.vars.removeTint == true)))) && (_isDisplayObject))){
_local7 = this.target.transform.colorTransform;
_local8 = new ColorTransform();
if (_local5.alpha != undefined){
_local8.alphaMultiplier = _local5.alpha;
delete _local5.alpha;
} else {
_local8.alphaMultiplier = this.target.alpha;
};
if (((!((this.vars.removeTint == true))) && (((((!((_local5.tint == null))) && (!((_local5.tint == ""))))) || ((_local5.tint == 0)))))){
_local8.color = _local5.tint;
};
addSubTween("tint", tintProxy, {progress:0}, {progress:1}, {target:this.target, color:_local7, endColor:_local8});
};
if (_local5.Transform != null){
if (!this.target.parent){
return;
};
if (_local5.Transform.Point != null){
_local9 = new Point(((_local5.Transform.Point.x * this.target.width) / this.target.scaleX), ((_local5.Transform.Point.y * this.target.height) / this.target.scaleY));
} else {
_local9 = new Point(((0.5 * this.target.width) / this.target.scaleX), ((0.5 * this.target.height) / this.target.scaleY));
};
delete _local5.Transform["Point"];
_local10 = new Object();
TransformProxy.target = (this.target as DisplayObject);
for (_local11 in _local5.Transform) {
_local10[_local11] = TransformProxy[_local11];
};
addSubTween("matrix", transformProxy, {progress:0}, {progress:1}, {target:this.target, transfer:_local5.Transform, source:_local10, tpoint:_local9});
};
if (((!((_local5.frame == null))) && (_isDisplayObject))){
addSubTween("frame", frameProxy, {frame:this.target.currentFrame}, {frame:_local5.frame}, {target:this.target});
};
if (((!(isNaN(this.vars.volume))) && (this.target.hasOwnProperty("soundTransform")))){
addSubTween("volume", volumeProxy, this.target.soundTransform, {volume:this.vars.volume}, {target:this.target});
};
for (_local3 in _local5) {
if ((((((((((((((((((((((((((((((((((((((_local3 == "ease")) || ((_local3 == "delay")))) || ((_local3 == "overwrite")))) || ((_local3 == "onComplete")))) || ((_local3 == "onCompleteParams")))) || ((_local3 == "runBackwards")))) || ((_local3 == "visible")))) || ((_local3 == "autoOverwrite")))) || ((_local3 == "persist")))) || ((_local3 == "onUpdate")))) || ((_local3 == "onUpdateParams")))) || ((_local3 == "autoAlpha")))) || ((((_local3 == "timeScale")) && (!((this.target is TweenLite))))))) || ((_local3 == "onStart")))) || ((_local3 == "onStartParams")))) || ((_local3 == "renderOnStart")))) || ((_local3 == "proxiedEase")))) || ((_local3 == "easeParams")))) || (((_arg1) && (!((_arg2.indexOf(((" " + _local3) + " ")) == -1))))))){
} else {
if (((!(((_isDisplayObject) && ((((((((_local3 == "tint")) || ((_local3 == "Transform")))) || ((_local3 == "removeTint")))) || ((_local3 == "frame"))))))) && (!((((_local3 == "volume")) && (this.target.hasOwnProperty("soundTransform"))))))){
if (typeof(_local5[_local3]) == "number"){
this.tweens[this.tweens.length] = {o:this.target, p:_local3, s:this.target[_local3], c:(_local5[_local3] - this.target[_local3]), name:_local3};
} else {
this.tweens[this.tweens.length] = {o:this.target, p:_local3, s:this.target[_local3], c:Number(_local5[_local3]), name:_local3};
};
};
};
};
};
if (this.vars.runBackwards == true){
_local4 = (this.tweens.length - 1);
while (_local4 > -1) {
_local12 = this.tweens[_local4];
this.tweens[_local4].s = (_local12.s + _local12.c);
_local12.c = (_local12.c * -1);
_local4--;
};
};
if ((((_local5.visible == true)) && (_isDisplayObject))){
this.target.visible = true;
};
if (this.vars.onUpdate != null){
_hasUpdate = true;
};
_initted = true;
}
public function get active():Boolean{
if (_active){
return (true);
};
if (_curTime >= this.startTime){
_active = true;
if (!_initted){
initTweenVals();
} else {
if (((!((this.vars.visible == undefined))) && (_isDisplayObject))){
this.target.visible = true;
};
};
if (this.vars.onStart != null){
this.vars.onStart.apply(null, this.vars.onStartParams);
};
if (this.duration == 0.001){
this.startTime = (this.startTime - 1);
};
return (true);
//unresolved jump
};
return (false);
}
public function render(_arg1:uint):void{
var _local3:Number;
var _local4:Object;
var _local5:int;
var _local2:Number = ((_arg1 - this.startTime) / 1000);
if (_local2 >= this.duration){
_local2 = this.duration;
_local3 = 1;
} else {
_local3 = this.vars.ease(_local2, 0, 1, this.duration);
};
_local5 = (this.tweens.length - 1);
while (_local5 > -1) {
_local4 = this.tweens[_local5];
_local4.o[_local4.p] = (_local4.s + (_local3 * _local4.c));
_local5--;
};
if (_hst){
_local5 = (_subTweens.length - 1);
while (_local5 > -1) {
_subTweens[_local5].proxy(_subTweens[_local5]);
_local5--;
};
};
if (_hasUpdate){
this.vars.onUpdate.apply(null, this.vars.onUpdateParams);
};
if (_local2 == this.duration){
complete(true);
};
}
protected function easeProxy(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return (this.vars.proxiedEase.apply(null, arguments.concat(this.vars.easeParams)));
}
public function killVars(_arg1:Object):void{
if (overwriteManager.enabled){
overwriteManager.killVars(_arg1, this.vars, this.tweens, _subTweens, []);
};
}
public function complete(_arg1:Boolean=false):void{
if (!_arg1){
if (!_initted){
initTweenVals();
};
this.startTime = (_curTime - ((this.duration * 1000) / _timeScale));
render(_curTime);
return;
};
if (((!((this.vars.visible == undefined))) && (_isDisplayObject))){
if (((!(isNaN(this.vars.autoAlpha))) && ((this.target.alpha == 0)))){
this.target.visible = false;
} else {
if (this.vars.runBackwards != true){
this.target.visible = this.vars.visible;
};
};
};
if (this.vars.persist != true){
removeTween(this);
};
if (this.vars.onComplete != null){
this.vars.onComplete.apply(null, this.vars.onCompleteParams);
};
}
public static function easeOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (_arg1 / _arg4);
return ((((-(_arg3) * _arg1) * (_arg1 - 2)) + _arg2));
}
public static function frameProxy(_arg1:Object):void{
_arg1.info.target.gotoAndStop(Math.round(_arg1.target.frame));
}
public static function tintProxy(_arg1:Object):void{
var _local2:Number = _arg1.target.progress;
var _local3:Number = (1 - _local2);
var _local4:Object = _arg1.info.color;
var _local5:Object = _arg1.info.endColor;
_arg1.info.target.transform.colorTransform = new ColorTransform(((_local4.redMultiplier * _local3) + (_local5.redMultiplier * _local2)), ((_local4.greenMultiplier * _local3) + (_local5.greenMultiplier * _local2)), ((_local4.blueMultiplier * _local3) + (_local5.blueMultiplier * _local2)), ((_local4.alphaMultiplier * _local3) + (_local5.alphaMultiplier * _local2)), ((_local4.redOffset * _local3) + (_local5.redOffset * _local2)), ((_local4.greenOffset * _local3) + (_local5.greenOffset * _local2)), ((_local4.blueOffset * _local3) + (_local5.blueOffset * _local2)), ((_local4.alphaOffset * _local3) + (_local5.alphaOffset * _local2)));
}
public static function removeTween(_arg1:TweenLite=null):void{
if (((!((_arg1 == null))) && (!((_all[_arg1.target] == undefined))))){
_all[_arg1.target][_arg1] = null;
delete _all[_arg1.target][_arg1];
};
}
public static function transformProxy(_arg1:Object):void{
var _local4:String;
if (!_arg1.info.target.parent){
return;
};
var _local2:Number = _arg1.target.progress;
var _local3:Number = (1 - _local2);
TransformProxy.target = _arg1.info.target;
TransformProxy.localRegistration = _arg1.info.tpoint;
for (_local4 in _arg1.info.transfer) {
TransformProxy[_local4] = ((_arg1.info.source[_local4] * _local3) + (_arg1.info.transfer[_local4] * _local2));
};
}
public static function killTweensOf(_arg1:Object=null, _arg2:Boolean=false):void{
var _local3:Object;
var _local4:*;
if (((!((_arg1 == null))) && (!((_all[_arg1] == undefined))))){
if (_arg2){
_local3 = _all[_arg1];
for (_local4 in _local3) {
_local3[_local4].complete(false);
};
};
delete _all[_arg1];
};
}
public static function delayedCall(_arg1:Number, _arg2:Function, _arg3:Array=null):TweenLite{
return (new TweenLite(_arg2, 0, {delay:_arg1, onComplete:_arg2, onCompleteParams:_arg3, overwrite:0}));
}
public static function from(_arg1:Object, _arg2:Number, _arg3:Object):TweenLite{
_arg3.runBackwards = true;
return (new TweenLite(_arg1, _arg2, _arg3));
}
public static function executeAll(_arg1:Event=null):void{
var _local3:Dictionary;
var _local4:Object;
var _local5:Object;
var _local2:uint = (_curTime = getTimer());
if (_listening){
_local3 = _all;
for each (_local4 in _local3) {
for (_local5 in _local4) {
if (((!((_local4[_local5] == undefined))) && (_local4[_local5].active))){
_local4[_local5].render(_local2);
};
};
};
};
}
public static function volumeProxy(_arg1:Object):void{
_arg1.info.target.soundTransform = _arg1.target;
}
public static function getD(_arg1:Object=null):Number{
var _local4:TweenLite;
var _local2:Number = 0;
var _local3:Dictionary = _all[_arg1];
for each (_local4 in _local3) {
_local2 = (_local2 + (_local4.duration + _local4.delay));
};
trace(_local2);
return (_local2);
}
public static function killGarbage(_arg1:TimerEvent):void{
var _local3:Boolean;
var _local4:Object;
var _local5:Object;
var _local6:Object;
var _local2:uint;
for (_local4 in _all) {
_local3 = false;
for (_local5 in _all[_local4]) {
_local3 = true;
break;
};
if (!_local3){
delete _all[_local4];
} else {
_local2++;
};
};
if (_local2 == 0){
_timer.removeEventListener("timer", killGarbage);
_timer.stop();
_listening = false;
};
}
public static function getP(_arg1:Object=null):Boolean{
var _local3:TweenLite;
var _local2:Dictionary = _all[_arg1];
for each (_local3 in _local2) {
return (true);
};
return (false);
}
public static function to(_arg1:Object, _arg2:Number, _arg3:Object):TweenLite{
return (new TweenLite(_arg1, _arg2, _arg3));
}
}
}//package gs
Section 13
//MochiScores (mochi.MochiScores)
package mochi {
import flash.display.*;
import flash.text.*;
public class MochiScores {
private static var boardID:String;
public static var onErrorHandler:Object;
public static var onCloseHandler:Object;
public static function showLeaderboard(_arg1:Object=null):void{
var options = _arg1;
if (options != null){
if (options.clip != null){
if ((options.clip is Sprite)){
MochiServices.setContainer(options.clip);
};
delete options.clip;
} else {
MochiServices.setContainer();
};
MochiServices.stayOnTop();
if (options.name != null){
if ((options.name is TextField)){
if (options.name.text.length > 0){
options.name = options.name.text;
};
};
};
if (options.score != null){
if ((options.score is TextField)){
if (options.score.text.length > 0){
options.score = options.score.text;
};
};
};
if (options.onDisplay != null){
options.onDisplay();
} else {
if (MochiServices.clip != null){
if ((MochiServices.clip is MovieClip)){
MochiServices.clip.stop();
} else {
trace("Warning: Container is not a MovieClip, cannot call default onDisplay.");
};
};
};
} else {
options = {};
if ((MochiServices.clip is MovieClip)){
MochiServices.clip.stop();
} else {
trace("Warning: Container is not a MovieClip, cannot call default onDisplay.");
};
};
if (options.onClose != null){
onCloseHandler = options.onClose;
} else {
onCloseHandler = function ():void{
if ((MochiServices.clip is MovieClip)){
MochiServices.clip.play();
} else {
trace("Warning: Container is not a MovieClip, cannot call default onClose.");
};
};
};
if (options.onError != null){
onErrorHandler = options.onError;
} else {
onErrorHandler = null;
};
if (options.boardID == null){
if (MochiScores.boardID != null){
options.boardID = MochiScores.boardID;
};
};
MochiServices.send("scores_showLeaderboard", {options:options}, null, onClose);
}
public static function closeLeaderboard():void{
MochiServices.send("scores_closeLeaderboard");
}
public static function getPlayerInfo(_arg1:Object, _arg2:Object=null):void{
MochiServices.send("scores_getPlayerInfo", null, _arg1, _arg2);
}
public static function requestList(_arg1:Object, _arg2:Object=null):void{
MochiServices.send("scores_requestList", null, _arg1, _arg2);
}
public static function scoresArrayToObjects(_arg1:Object):Object{
var _local3:Number;
var _local4:Number;
var _local5:Object;
var _local6:Object;
var _local7:String;
var _local8:String;
var _local2:Object = {};
for (_local7 in _arg1) {
if (typeof(_arg1[_local7]) == "object"){
if (((!((_arg1[_local7].cols == null))) && (!((_arg1[_local7].rows == null))))){
_local2[_local7] = [];
_local5 = _arg1[_local7];
_local4 = 0;
while (_local4 < _local5.rows.length) {
_local6 = {};
_local3 = 0;
while (_local3 < _local5.cols.length) {
_local6[_local5.cols[_local3]] = _local5.rows[_local4][_local3];
_local3++;
};
_local2[_local7].push(_local6);
_local4++;
};
} else {
_local2[_local7] = {};
for (_local8 in _arg1[_local7]) {
_local2[_local7][_local8] = _arg1[_local7][_local8];
};
};
} else {
_local2[_local7] = _arg1[_local7];
};
};
return (_local2);
}
public static function submit(_arg1:Number, _arg2:String, _arg3:Object=null, _arg4:Object=null):void{
MochiServices.send("scores_submit", {score:_arg1, name:_arg2}, _arg3, _arg4);
}
public static function onClose(_arg1:Object=null):void{
if (_arg1 != null){
if (_arg1.error != null){
if (_arg1.error == true){
if (onErrorHandler != null){
if (_arg1.errorCode == null){
_arg1.errorCode = "IOError";
};
onErrorHandler(_arg1.errorCode);
MochiServices.doClose();
return;
};
};
};
};
onCloseHandler();
MochiServices.doClose();
}
public static function setBoardID(_arg1:String):void{
MochiScores.boardID = _arg1;
MochiServices.send("scores_setBoardID", {boardID:_arg1});
}
}
}//package mochi
Section 14
//MochiServices (mochi.MochiServices)
package mochi {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
public class MochiServices {
private static var _container:Object;
private static var _connected:Boolean = false;
private static var _swfVersion:String;
private static var _sendChannel:LocalConnection;
private static var _rcvChannelName:String;
private static var _gatewayURL:String = "http://www.mochiads.com/static/lib/services/services.swf";
private static var _clip:MovieClip;
private static var _loader:Loader;
private static var _id:String;
private static var _listenChannel:LocalConnection;
private static var _timer:Timer;
private static var _sendChannelName:String;
private static var _startTime:Number;
private static var _connecting:Boolean = false;
public static var onError:Object;
private static var _listenChannelName:String = "__mochiservices";
private static var _rcvChannel:LocalConnection;
public static function isNetworkAvailable():Boolean{
return (!((Security.sandboxType == "localWithFile")));
}
public static function send(_arg1:String, _arg2:Object=null, _arg3:Object=null, _arg4:Object=null):void{
if (_connected){
_sendChannel.send(_sendChannelName, "onReceive", {methodName:_arg1, args:_arg2, callbackID:_clip._nextcallbackID});
} else {
if ((((_clip == null)) || (!(_connecting)))){
onError("NotConnected");
handleError(_arg2, _arg3, _arg4);
flush(true);
return;
};
_clip._queue.push({methodName:_arg1, args:_arg2, callbackID:_clip._nextcallbackID});
};
if (_clip != null){
if (((!((_clip._callbacks == null))) && (!((_clip._nextcallbackID == null))))){
_clip._callbacks[_clip._nextcallbackID] = {callbackObject:_arg3, callbackMethod:_arg4};
_clip._nextcallbackID++;
};
};
}
public static function get connected():Boolean{
return (_connected);
}
private static function flush(_arg1:Boolean):void{
var _local2:Object;
var _local3:Object;
if (_clip != null){
if (_clip._queue != null){
while (_clip._queue.length > 0) {
_local2 = _clip._queue.shift();
_local3 = null;
if (_local2 != null){
if (_local2.callbackID != null){
_local3 = _clip._callbacks[_local2.callbackID];
};
delete _clip._callbacks[_local2.callbackID];
if (((_arg1) && (!((_local3 == null))))){
handleError(_local2.args, _local3.callbackObject, _local3.callbackMethod);
};
};
};
};
};
}
private static function clickMovie(_arg1:String, _arg2:Function):MovieClip{
var _local4:int;
var _local14:Loader;
var _local3:Array = [150, 21, 0, 7, 1, 0, 0, 0, 0, 98, 116, 110, 0, 7, 2, 0, 0, 0, 0, 116, 104, 105, 115, 0, 28, 150, 22, 0, 0, 99, 114, 101, 97, 116, 101, 69, 109, 112, 116, 121, 77, 111, 118, 105, 101, 67, 108, 105, 112, 0, 82, 135, 1, 0, 0, 23, 150, 13, 0, 4, 0, 0, 111, 110, 82, 101, 108, 101, 97, 115, 101, 0, 142, 8, 0, 0, 0, 0, 2, 42, 0, 114, 0, 150, 17, 0, 0, 32, 0, 7, 1, 0, 0, 0, 8, 0, 0, 115, 112, 108, 105, 116, 0, 82, 135, 1, 0, 1, 23, 150, 7, 0, 4, 1, 7, 0, 0, 0, 0, 78, 150, 8, 0, 0, 95, 98, 108, 97, 110, 107, 0, 154, 1, 0, 0, 150, 7, 0, 0, 99, 108, 105, 99, 107, 0, 150, 7, 0, 4, 1, 7, 1, 0, 0, 0, 78, 150, 27, 0, 7, 2, 0, 0, 0, 7, 0, 0, 0, 0, 0, 76, 111, 99, 97, 108, 67, 111, 110, 110, 101, 99, 116, 105, 111, 110, 0, 64, 150, 6, 0, 0, 115, 101, 110, 100, 0, 82, 79, 150, 15, 0, 4, 0, 0, 95, 97, 108, 112, 104, 97, 0, 7, 0, 0, 0, 0, 79, 150, 23, 0, 7, 0xFF, 0, 0xFF, 0, 7, 1, 0, 0, 0, 4, 0, 0, 98, 101, 103, 105, 110, 70, 105, 108, 108, 0, 82, 23, 150, 25, 0, 7, 0, 0, 0, 0, 7, 0, 0, 0, 0, 7, 2, 0, 0, 0, 4, 0, 0, 109, 111, 118, 101, 84, 111, 0, 82, 23, 150, 25, 0, 7, 100, 0, 0, 0, 7, 0, 0, 0, 0, 7, 2, 0, 0, 0, 4, 0, 0, 108, 105, 110, 101, 84, 111, 0, 82, 23, 150, 25, 0, 7, 100, 0, 0, 0, 7, 100, 0, 0, 0, 7, 2, 0, 0, 0, 4, 0, 0, 108, 105, 110, 101, 84, 111, 0, 82, 23, 150, 25, 0, 7, 0, 0, 0, 0, 7, 100, 0, 0, 0, 7, 2, 0, 0, 0, 4, 0, 0, 108, 105, 110, 101, 84, 111, 0, 82, 23, 150, 25, 0, 7, 0, 0, 0, 0, 7, 0, 0, 0, 0, 7, 2, 0, 0, 0, 4, 0, 0, 108, 105, 110, 101, 84, 111, 0, 82, 23, 150, 16, 0, 7, 0, 0, 0, 0, 4, 0, 0, 101, 110, 100, 70, 105, 108, 108, 0, 82, 23];
var _local5:Array = [104, 0, 31, 64, 0, 7, 208, 0, 0, 12, 1, 0, 67, 2, 0xFF, 0xFF, 0xFF, 63, 3];
var _local6:Array = [0, 64, 0, 0, 0];
var _local7:MovieClip = new MovieClip();
var _local8:LocalConnection = new LocalConnection();
var _local9:String = ((("_click_" + Math.floor((Math.random() * 999999))) + "_") + Math.floor(new Date().getTime()));
_local8 = new LocalConnection();
_local7.lc = _local8;
_local7.click = _arg2;
_local8.client = _local7;
_local8.connect(_local9);
var _local10:ByteArray = new ByteArray();
var _local11:ByteArray = new ByteArray();
_local11.endian = Endian.LITTLE_ENDIAN;
_local11.writeShort(1);
_local11.writeUTFBytes(((_arg1 + " ") + _local9));
_local11.writeByte(0);
var _local12:uint = ((_local3.length + _local11.length) + 4);
var _local13:uint = (_local12 + 35);
_local10.endian = Endian.LITTLE_ENDIAN;
_local10.writeUTFBytes("FWS");
_local10.writeByte(8);
_local10.writeUnsignedInt(_local13);
for each (_local4 in _local5) {
_local10.writeByte(_local4);
};
_local10.writeUnsignedInt(_local12);
_local10.writeByte(136);
_local10.writeShort(_local11.length);
_local10.writeBytes(_local11);
for each (_local4 in _local3) {
_local10.writeByte(_local4);
};
for each (_local4 in _local6) {
_local10.writeByte(_local4);
};
_local14 = new Loader();
_local14.loadBytes(_local10);
_local7.addChild(_local14);
return (_local7);
}
private static function init(_arg1:String, _arg2:Object):void{
_id = _arg1;
if (_arg2 != null){
_container = _arg2;
loadCommunicator(_arg1, _container);
};
}
public static function get childClip():Object{
return (_clip);
}
public static function get id():String{
return (_id);
}
public static function stayOnTop():void{
_container.addEventListener(Event.ENTER_FRAME, MochiServices.bringToTop, false, 0, true);
if (_clip != null){
_clip.visible = true;
};
}
public static function addLinkEvent(_arg1:String, _arg2:String, _arg3:DisplayObjectContainer, _arg4:Function=null):void{
var netup:Boolean;
var s:String;
var x:String;
var req:URLRequest;
var loader:Loader;
var err:Function;
var complete:Function;
var setURL:Function;
var url = _arg1;
var burl = _arg2;
var btn = _arg3;
var onClick = _arg4;
var vars:Object = new Object();
vars["mav"] = getVersion();
vars["swfv"] = "9";
vars["swfurl"] = btn.loaderInfo.loaderURL;
vars["fv"] = Capabilities.version;
vars["os"] = Capabilities.os;
vars["lang"] = Capabilities.language;
vars["scres"] = ((Capabilities.screenResolutionX + "x") + Capabilities.screenResolutionY);
s = "?";
var i:Number = 0;
for (x in vars) {
if (i != 0){
s = (s + "&");
};
i = (i + 1);
s = (((s + x) + "=") + escape(vars[x]));
};
req = new URLRequest("http://x.mochiads.com/linkping.swf");
loader = new Loader();
err = function (_arg1:Object):void{
netup = false;
_arg1.target.removeEventListener(_arg1.type, arguments.callee);
};
complete = function (_arg1:Object):void{
netup = true;
_arg1.target.removeEventListener(_arg1.type, arguments.callee);
};
loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, err);
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, complete);
loader.load(req);
setURL = function ():void{
var _local1:String;
if (netup){
_local1 = (url + s);
} else {
_local1 = burl;
};
var _local2:DisplayObject = clickMovie(_local1, onClick);
btn.addChild(_local2);
_local2.scaleX = (0.01 * btn.width);
_local2.scaleY = (0.01 * btn.height);
};
setTimeout(setURL, 1500);
}
public static function getVersion():String{
return ("1.35");
}
public static function disconnect():void{
if (((_connected) || (_connecting))){
if (_clip != null){
if (_clip.parent != null){
if ((_clip.parent is Sprite)){
Sprite(_clip.parent).removeChild(_clip);
_clip = null;
};
};
};
_connecting = (_connected = false);
flush(true);
try {
_listenChannel.close();
_rcvChannel.close();
} catch(error:Error) {
};
};
if (_timer != null){
try {
_timer.stop();
} catch(error:Error) {
};
};
}
public static function allowDomains(_arg1:String):String{
var _local2:String;
Security.allowDomain("*");
Security.allowInsecureDomain("*");
if (_arg1.indexOf("http://") != -1){
_local2 = _arg1.split("/")[2].split(":")[0];
Security.allowDomain(_local2);
Security.allowInsecureDomain(_local2);
};
return (_local2);
}
public static function doClose():void{
_container.removeEventListener(Event.ENTER_FRAME, MochiServices.bringToTop);
if (_clip.parent != null){
Sprite(_clip.parent).removeChild(_clip);
};
}
public static function setContainer(_arg1:Object=null, _arg2:Boolean=true):void{
if (_arg1 != null){
if ((_arg1 is Sprite)){
_container = _arg1;
};
};
if (_arg2){
if ((_container is Sprite)){
Sprite(_container).addChild(_clip);
};
};
}
private static function onStatus(_arg1:StatusEvent):void{
switch (_arg1.level){
case "error":
_connected = false;
_listenChannel.connect(_listenChannelName);
break;
};
}
private static function initComChannels():void{
if (!_connected){
_sendChannel.addEventListener(StatusEvent.STATUS, MochiServices.onStatus);
_sendChannel.send(_sendChannelName, "onReceive", {methodName:"handshakeDone"});
_sendChannel.send(_sendChannelName, "onReceive", {methodName:"registerGame", id:_id, clip:_container, version:getVersion(), parentURL:_container.loaderInfo.loaderURL});
_rcvChannel.addEventListener(StatusEvent.STATUS, MochiServices.onStatus);
_clip.onReceive = function (_arg1:Object):void{
var methodName:String;
var pkg = _arg1;
var cb:String = pkg.callbackID;
var cblst:Object = this.client._callbacks[cb];
if (!cblst){
return;
};
var method:* = cblst.callbackMethod;
methodName = "";
var obj:Object = cblst.callbackObject;
if (((obj) && ((typeof(method) == "string")))){
methodName = method;
if (obj[method] != null){
method = obj[method];
} else {
trace((("Error: Method " + method) + " does not exist."));
};
};
if (method != undefined){
try {
method.apply(obj, pkg.args);
} catch(error:Error) {
trace(((("Error invoking callback method '" + methodName) + "': ") + error.toString()));
};
} else {
if (obj != null){
try {
obj(pkg.args);
} catch(error:Error) {
trace(("Error invoking method on object: " + error.toString()));
};
};
};
delete this.client._callbacks[cb];
};
_clip.onError = function ():void{
MochiServices.onError("IOError");
};
_rcvChannel.connect(_rcvChannelName);
trace("connected!");
_connecting = false;
_connected = true;
_listenChannel.close();
while (_clip._queue.length > 0) {
_sendChannel.send(_sendChannelName, "onReceive", _clip._queue.shift());
};
};
}
private static function listen():void{
_listenChannel = new LocalConnection();
_listenChannel.client = _clip;
_clip.handshake = function (_arg1:Object):void{
MochiServices.comChannelName = _arg1.newChannel;
};
_listenChannel.allowDomain("*", "localhost");
_listenChannel.allowInsecureDomain("*", "localhost");
_listenChannel.connect(_listenChannelName);
trace("Waiting for MochiAds services to connect...");
}
private static function handleError(_arg1:Object, _arg2:Object, _arg3:Object):void{
var args = _arg1;
var callbackObject = _arg2;
var callbackMethod = _arg3;
if (args != null){
if (args.onError != null){
args.onError.apply(null, ["NotConnected"]);
};
if (((!((args.options == null))) && (!((args.options.onError == null))))){
args.options.onError.apply(null, ["NotConnected"]);
};
};
if (callbackMethod != null){
args = {};
args.error = true;
args.errorCode = "NotConnected";
if (((!((callbackObject == null))) && ((callbackMethod is String)))){
try {
var _local5 = callbackObject;
_local5[callbackMethod](args);
} catch(error:Error) {
};
} else {
if (callbackMethod != null){
try {
callbackMethod.apply(args);
} catch(error:Error) {
};
};
};
};
}
public static function get clip():Object{
return (_container);
}
public static function set comChannelName(_arg1:String):void{
if (_arg1 != null){
if (_arg1.length > 3){
_sendChannelName = (_arg1 + "_fromgame");
_rcvChannelName = _arg1;
initComChannels();
};
};
}
private static function loadCommunicator(_arg1:String, _arg2:Object):MovieClip{
var id = _arg1;
var clip = _arg2;
var clipname:String = ("_mochiservices_com_" + id);
if (_clip != null){
return (_clip);
};
if (!MochiServices.isNetworkAvailable()){
return (null);
};
MochiServices.allowDomains(_gatewayURL);
_clip = createEmptyMovieClip(clip, clipname, 10336, false);
_loader = new Loader();
_timer = new Timer(1000, 0);
_startTime = getTimer();
_timer.addEventListener(TimerEvent.TIMER, connectWait);
_timer.start();
var f:Function = function (_arg1:Object):void{
_clip._mochiad_ctr_failed = true;
trace("MochiServices could not load.");
MochiServices.disconnect();
MochiServices.onError("IOError");
};
_loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, f);
var req:URLRequest = new URLRequest(_gatewayURL);
_loader.load(req);
_clip.addChild(_loader);
_clip._mochiservices_com = _loader;
_sendChannel = new LocalConnection();
_clip._queue = [];
_rcvChannel = new LocalConnection();
_rcvChannel.allowDomain("*", "localhost");
_rcvChannel.allowInsecureDomain("*", "localhost");
_rcvChannel.client = _clip;
_clip._nextcallbackID = 0;
_clip._callbacks = {};
listen();
return (_clip);
}
public static function bringToTop(_arg1:Event):void{
var e = _arg1;
if (MochiServices.clip != null){
if (MochiServices.childClip != null){
try {
if (MochiServices.clip.numChildren > 1){
MochiServices.clip.setChildIndex(MochiServices.childClip, (MochiServices.clip.numChildren - 1));
};
} catch(errorObject:Error) {
trace("Warning: Depth sort error.");
_container.removeEventListener(Event.ENTER_FRAME, MochiServices.bringToTop);
};
};
};
}
public static function connect(_arg1:String, _arg2:Object, _arg3:Object=null):void{
var id = _arg1;
var clip = _arg2;
var onError = _arg3;
if ((clip is DisplayObject)){
if (((!(_connected)) && ((_clip == null)))){
trace("MochiServices Connecting...");
_connecting = true;
init(id, clip);
};
} else {
trace("Error, MochiServices requires a Sprite, Movieclip or instance of the stage.");
};
if (onError != null){
MochiServices.onError = onError;
} else {
if (MochiServices.onError == null){
MochiServices.onError = function (_arg1:String):void{
trace(_arg1);
};
};
};
}
public static function createEmptyMovieClip(_arg1:Object, _arg2:String, _arg3:Number, _arg4:Boolean=true):MovieClip{
var parent = _arg1;
var name = _arg2;
var depth = _arg3;
var doAdd = _arg4;
var mc:MovieClip = new MovieClip();
if (doAdd){
if (((false) && (depth))){
parent.addChildAt(mc, depth);
} else {
parent.addChild(mc);
};
};
try {
parent[name] = mc;
} catch(e:Error) {
throw (new Error("MochiServices requires a clip that is an instance of a dynamic class. If your class extends Sprite or MovieClip, you must make it dynamic."));
};
mc["_name"] = name;
return (mc);
}
public static function connectWait(_arg1:TimerEvent):void{
if ((getTimer() - _startTime) > 10000){
if (!_connected){
_clip._mochiad_ctr_failed = true;
trace("MochiServices could not load.");
MochiServices.disconnect();
MochiServices.onError("IOError");
};
_timer.stop();
};
}
}
}//package mochi
Section 15
//An (An)
package {
import flash.display.*;
import gs.*;
import flash.events.*;
import functions.*;
import gs.easing.*;
import flash.utils.*;
public class An {
public static var anim_index:int = 0;
public static var i:TweenFilterLite;
public static var animations = new Object();
private static var wait:Function = TweenFilterLite.getD;
public static var getP:Function = TweenLite.getP;
public static var id:An;
public static var anim_handler:Dictionary = new Dictionary();
public function An(){
id = this;
initAnim();
}
public function initAnim(){
animations["Flash"] = function (_arg1:Object=null):TweenFilterLite{
TweenFilterLite.to(_arg1, 0.5, {overwrite:0, colorMatrixFilter:{contrast:1.5, brightness:1.5}});
return (TweenFilterLite.to(_arg1, 0.5, {delay:wait(_arg1), overwrite:0, colorMatrixFilter:{contrast:1, brightness:1}}));
};
animations["CellLoad"] = function (_arg1:Object=null):TweenFilterLite{
var _local2:*;
var _local3:*;
_local2 = (-(m.point_distance(_arg1.x, _arg1.y, 320, 180)) / 2);
_local3 = m.point_direction(_arg1.x, _arg1.y, 320, 180);
return (TweenFilterLite.from(_arg1, 0.4, {overwrite:1, alpha:0, x:(_arg1.x + m.len_x(_local2, _local3)), y:(_arg1.y + m.len_y(_local2, _local3)), scaleX:2, scaleY:2, blurFilter:{blurX:10, blurY:10}}));
};
animations["hiFlash"] = function (_arg1:Object=null):TweenFilterLite{
TweenFilterLite.to(_arg1, 0.5, {overwrite:0, colorMatrixFilter:{contrast:2, brightness:2}});
return (TweenFilterLite.to(_arg1, 0.5, {delay:wait(_arg1), overwrite:0, colorMatrixFilter:{contrast:1, brightness:1}}));
};
animations["blowIn"] = function (_arg1:Object=null):TweenFilterLite{
TweenFilterLite.to(_arg1, 0, {delay:wait(_arg1), tint:0xFFFF, alpha:0});
TweenFilterLite.to(_arg1, 1, {delay:wait(_arg1), alpha:0.5, Transform:{scaleX:0.12, scaleY:3, Point:{x:0.5, y:0.2}}, blurFilter:{blurX:5, blurY:5, quality:1}});
return (TweenFilterLite.to(_arg1, 0.5, {delay:wait(_arg1), alpha:1, Transform:{scaleX:1, scaleY:1, Point:{x:0.5, y:0.2}}, removeTint:true, blurFilter:{blurX:0, blurY:0}}));
};
animations["blowOut"] = function (_arg1:Object=null):TweenFilterLite{
TweenFilterLite.to(_arg1, 0.7, {delay:wait(_arg1), tint:0xFFFF, Transform:{scaleX:0.5, scaleY:1.4, Point:{x:0.5, y:0.2}}, blurFilter:{blurX:5, blurY:5, quality:1}});
return (TweenFilterLite.to(_arg1, 0.5, {delay:wait(_arg1), alpha:0, Transform:{scaleX:1, scaleY:1, Point:{x:0.5, y:0.2}}, blurFilter:{blurX:20, blurY:20}}));
};
animations["blowTel"] = function (_arg1:Object=null):TweenFilterLite{
TweenFilterLite.to(_arg1, 0.7, {delay:wait(_arg1), tint:0xFFFF, Transform:{scaleX:0.5, scaleY:1.4, Point:{x:0.5, y:0.2}}, blurFilter:{blurX:5, blurY:5, quality:1}});
return (TweenFilterLite.to(_arg1, 1.3, {delay:wait(_arg1), alpha:0, Transform:{scaleX:1, scaleY:0.001, Point:{x:0.5, y:0.2}}, blurFilter:{blurX:33, blurY:33}}));
};
animations["blurIn"] = function (_arg1:Object=null):TweenFilterLite{
return (TweenFilterLite.from(_arg1, 1.6, {overwrite:1, alpha:0, blurFilter:{blurX:33, blurY:0}}));
};
animations["blurInto"] = function (_arg1:Object=null):TweenFilterLite{
TweenFilterLite.to(_arg1, 0, {overwrite:1, alpha:0, blurFilter:{blurX:33, blurY:0}});
return (TweenFilterLite.to(_arg1, 0.5, {delay:wait(_arg1), overwrite:0, alpha:1, blurFilter:{blurX:0, blurY:0}}));
};
animations["blurMoveIn"] = function (_arg1:Object=null):TweenFilterLite{
return (TweenFilterLite.from(_arg1, 1.2, {delay:(Math.random() / 2), ease:Back.easeOut, overwrite:1, alpha:0, x:(_arg1.x - _arg1.width), blurFilter:{blurX:33, blurY:0}}));
};
animations["blurMoveDw"] = function (_arg1:Object=null):TweenFilterLite{
return (TweenFilterLite.from(_arg1, 1.6, {delay:(Math.random() / 2), ease:Elastic.easeOut, overwrite:1, alpha:0, y:(_arg1.y + _arg1.height), blurFilter:{blurX:0, blurY:33}}));
};
animations["blurOut"] = function (_arg1:Object=null):TweenFilterLite{
return (TweenFilterLite.to(_arg1, 1.6, {overwrite:1, alpha:0, blurFilter:{blurX:33, blurY:0}}));
};
animations["blurOutto"] = function (_arg1:Object=null):TweenFilterLite{
return (TweenFilterLite.to(_arg1, 0.6, {overwrite:1, alpha:0, blurFilter:{blurX:33, blurY:0}}));
};
}
public static function play(_arg1, _arg2:String, _arg3:Boolean=true):TweenFilterLite{
if (((getP(_arg1)) && (_arg3))){
return (null);
};
return (animations[_arg2](_arg1));
}
}
}//package
Section 16
//block_piece (block_piece)
package {
import flash.display.*;
import flash.events.*;
public class block_piece extends MovieClip {
public var x_speed:Number;// = 0
public var y_speed:Number;// = 0
protected var motion:int;// = 0
protected var x_dir:int;// = 0
protected var y_dir:int;// = 0
public function block_piece(){
x_speed = ((Math.random() * 20) - 10);
y_speed = ((Math.random() * 5) - 13);
stop();
addEventListener(Event.ENTER_FRAME, step);
}
public function step(_arg1:Event){
rotation = (rotation + x_speed);
y_speed = (y_speed + 1);
x = (x + x_speed);
y = (y + y_speed);
if (y >= 500){
this.removeEventListener(Event.ENTER_FRAME, step);
this.parent.removeChild(this);
};
}
}
}//package
Section 17
//controlScene (controlScene)
package {
import flash.display.*;
import flash.events.*;
import functions.*;
import flash.utils.*;
import flash.ui.*;
public class controlScene extends MovieClip {
public var nm_score_panel:MovieClip;
static var xx:int;
static var round_etime:Date;
public static var cur_level:int;
static var posBig:mcScene_sbig = new mcScene_sbig();
static var round_delta:int = 0;
static var posSmall:mcScene_small = new mcScene_small();
static var round_stime:Date;
static var target:Object;
static var id:controlScene;
static var yy:int;
static var cell_container = new Object();
static var posy:int;
static var posx:int;
static var text_container:Sprite = new Sprite();
static var o_levels:levels = new levels();
public function controlScene(){
var help:*;
super();
id = this;
trace(("sff:" + 1));
g.endDate = new Date();
if (g.game_mode == "time"){
g.endDate.setTime((g.endDate.getTime() + (120 * 1000)));
};
addChild(new mc_scene());
addChild(posBig);
addChild(posSmall);
addChild(text_container);
addEventListener(Event.ENTER_FRAME, step);
stage.addEventListener(MouseEvent.CLICK, mouseClick);
stage.addEventListener(KeyboardEvent.KEY_DOWN, keyReleaseHandler);
if (g.game_mode != "time"){
cur_level = g.so.data.svLevel;
g.score_play = g.so.data.svScore;
g.endDate.setTime((g.endDate.getTime() - g.so.data.svTime));
nm_score_panel.nm_text2.text = ("0000000".slice(0, (7 - g.score_play.toString().length)) + g.score_play);
if ((((cur_level < 2)) && ((g.show_help == true)))){
g.can_play = false;
help = new mcHelp();
if (!this.parent.contains(help)){
help = parent.addChild(help);
};
help.addEventListener(Event.REMOVED_FROM_STAGE, function (){
g.can_play = true;
});
};
} else {
g.score_play = 0;
cur_level = 1;
};
trace(("sff:" + 3));
create_level();
}
public function create_level(){
var _local2:*;
var _local3:int;
var _local4:*;
if (cur_level > 40){
if (g.game_mode != "time"){
addChild(new mess_onlyinfull());
g.can_play = false;
} else {
addChild(new mess_getscores());
g.can_play = false;
};
};
round_stime = new Date();
if (this.contains(text_container)){
removeChild(text_container);
};
text_container = new Sprite();
addChild(text_container);
var _local1:* = 0;
while (_local1 < 7) {
_local2 = 0;
while (_local2 < 13) {
_local3 = levels.level[cur_level][((_local1 * 13) + _local2)];
_local4 = new Mytst();
text_container.addChild(_local4);
if (_local3){
trace(((_local1 * 13) + _local2));
};
if (_local3){
_local4.nm_string.text = _local3;
} else {
_local4.nm_string.text = "";
};
_local4.x = (438 + (_local2 * 14.4));
_local4.y = (361 + (_local1 * 14.4));
_local2 = (_local2 + 1);
};
_local1 = (_local1 + 1);
};
}
private function finish_round(){
ss.play("level");
if (round_delta > 60){
iadd(100, 250, o_good, this, numChildren);
};
if ((((round_delta < 60)) && ((round_delta > 10)))){
iadd(100, 250, o_great, this, numChildren);
};
if (round_delta <= 10){
g.score_play = (g.score_play + (5000 / 4));
iadd(100, 250, o_best, this, numChildren);
} else {
g.score_play = (g.score_play + (((20 * (120 - Math.min(round_delta, 120))) + 500) / 4));
};
if (g.game_mode == "time"){
if (round_delta <= 10){
g.endDate.setTime((g.endDate.getTime() + (30 * 1000)));
};
if ((((round_delta < 60)) && ((round_delta > 10)))){
g.endDate.setTime((g.endDate.getTime() + (20 * 1000)));
};
if (round_delta > 60){
g.endDate.setTime((g.endDate.getTime() + (10 * 1000)));
};
};
clear_stage();
cur_level = (cur_level + 1);
create_level();
nm_score_panel.nm_text2.text = ("0000000".slice(0, (7 - g.score_play.toString().length)) + g.score_play);
}
public function mouseClick(_arg1:Event){
var e = _arg1;
var glow:Function = function (_arg1){
_arg1.gotoAndStop(((_arg1.currentFrame + 1) % 5));
An.play(_arg1, "hiFlash", false);
};
trace(("++++:" + is_consist(this, mess_gotomenu)));
if (!g.can_play){
return;
};
if (mouseY > 336){
return;
};
ss.play("click");
target = cell_container[((posx + "_") + posy)];
if (!target){
cell_container[((posx + "_") + posy)] = iadd(xx, yy, mc_Cell, this, numChildren);
An.play(cell_container[((posx + "_") + posy)], "CellLoad");
target = cell_container[(((posx - 1) + "_") + posy)];
if (target){
glow(target);
};
target = cell_container[(((posx + 1) + "_") + posy)];
if (target){
glow(target);
};
target = cell_container[((posx + "_") + (posy + 1))];
if (target){
glow(target);
};
target = cell_container[((posx + "_") + (posy - 1))];
if (target){
glow(target);
};
check();
};
}
public function onSpace(){
if (g.score_play >= 100){
g.score_play = (g.score_play - 100);
};
nm_score_panel.nm_text2.text = ("0000000".slice(0, (7 - g.score_play.toString().length)) + g.score_play);
clear_stage();
}
private function check():Boolean{
var _local3:*;
var _local4:*;
var _local1:Boolean;
var _local2:* = 0;
while (_local2 < 7) {
_local3 = 0;
while (_local3 < 13) {
target = cell_container[((_local3 + "_") + _local2)];
_local4 = levels.level[cur_level][((_local2 * 13) + _local3)];
if (((!(target)) && (_local4))){
_local1 = true;
return (false);
};
if (((target) && (!(_local4)))){
_local1 = true;
return (false);
};
if (((target) && (_local4))){
if (target.currentFrame == _local4){
_local1 = false;
} else {
_local1 = true;
return (false);
};
};
_local3 = (_local3 + 1);
};
_local2 = (_local2 + 1);
};
if (_local1 == false){
finish_round();
};
return (true);
}
public function gotoMenu(){
clear_stage();
removeEventListener(Event.ENTER_FRAME, step);
stage.removeEventListener(MouseEvent.CLICK, mouseClick);
stage.removeEventListener(KeyboardEvent.KEY_DOWN, keyReleaseHandler);
main.id.gotoAndStop(3);
}
private function clear_stage(){
var _local1:*;
for (_local1 in cell_container) {
create_blow(cell_container[_local1].x, cell_container[_local1].y);
this.removeChild(cell_container[_local1]);
delete cell_container[_local1];
};
}
private function keyReleaseHandler(_arg1:KeyboardEvent):void{
trace(_arg1.keyCode);
switch (_arg1.keyCode){
case Keyboard.ESCAPE:
if (g.game_mode == "single"){
addChild(new mess_gotomenu());
} else {
addChild(new mess_getscores());
};
break;
case Keyboard.SPACE:
onSpace();
break;
};
}
private function create_blow(_arg1:int, _arg2:int){
var _local3:Object;
_local3 = iadd(_arg1, _arg2, block_piece, this, numChildren);
An.play(_local3, "hiFlash", false);
_local3 = iadd((_arg1 + 24), _arg2, block_piece, this, numChildren);
_local3.gotoAndStop(2);
An.play(_local3, "hiFlash", false);
_local3 = iadd(_arg1, (_arg2 + 24), block_piece, this, numChildren);
_local3.gotoAndStop(3);
An.play(_local3, "hiFlash", false);
_local3 = iadd((_arg1 + 24), (_arg2 + 24), block_piece, this, numChildren);
_local3.gotoAndStop(4);
An.play(_local3, "hiFlash", false);
}
public function step(_arg1:Event){
round_etime = new Date();
var _local2:Number = (round_etime.getTime() - round_stime.getTime());
round_delta = int((_local2 / 1000));
posx = Math.min(int((mouseX / 48)), 12);
posy = Math.min(int((mouseY / 48)), 6);
xx = (((posx * 48) + 10) - 2);
yy = (((posy * 48) + 10) - 2);
posBig.x = (xx + 2);
posBig.y = (yy + 2);
posSmall.x = ((posx * 14.4) + 435.5);
posSmall.y = ((posy * 14.4) + 364.5);
}
public function loose(){
addChild(new mess_getscores());
g.can_play = false;
clear_stage();
trace("dead");
}
}
}//package
Section 18
//g (g)
package {
import flash.display.*;
import flash.events.*;
import flash.net.*;
public class g extends Sprite {
public static var can_play:Boolean = true;
public static var Master:MovieClip;
public static var show_help:Boolean = true;
public static var score_play:int = 0;
public static var game_mode:String;
public static var temp;
public static var now:Date = new Date();
public static var endDate:Date = new Date();
public static var main:Stage;
public static var so:SharedObject = SharedObject.getLocal("myVars");
public static var second_play:int;
public function g(){
if (g.so.data.svTime == undefined){
g.so.data.svTime = 0;
};
if (g.so.data.svScore == undefined){
g.so.data.svScore = 0;
};
if (g.so.data.svLevel == undefined){
g.so.data.svLevel = 1;
};
trace(("saved Time: " + g.so.data.svTime));
trace(("saved Score: " + g.so.data.svScore));
trace(("saved Level: " + g.so.data.svLevel));
if (g.so.data.svLevel > 1){
show_help = false;
};
}
}
}//package
Section 19
//levels (levels)
package {
import flash.display.*;
import flash.events.*;
import functions.*;
import flash.utils.*;
public class levels extends Sprite {
static var level:Array = new Array();
public function levels(){
level[0] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
level[1] = [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
level[2] = [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1];
level[3] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0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 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, 0, 0, 0, 0, 0, 0, 0, 0, 2, 1, 0, 2, 0, 0, 0, 1, 2, 0, 0, 0, 0, 0, 3, 1, 3, 3, 2, 1, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
level[41] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
}
}
}//package
Section 20
//main (main)
package {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import mochi.*;
import functions.*;
import flash.utils.*;
import flash.ui.*;
import objects.*;
import fl.transitions.easing.*;
public class main extends MovieClip {
public var AdM_loaded:Boolean;
public var mc_scre;
public var myOptions:Object;
private var temp:Object;
public var btn1:SimpleButton;
public var btn2:SimpleButton;
public var Game_loaded:Boolean;
public var _mochiads_game_id:String;
private var i:int;
public var cont;
public var s;
private var j:int;
private var playr:Object;
static var T:Number = 1;
public static var slug_array:Object = new Object();
public static var id:Object;
public static var slug_container:Object;
public function main(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4);
}
public function orRoll(_arg1:Event){
An.play(_arg1.target, "Flash");
}
public function loadProgress(_arg1:ProgressEvent):void{
var _local2:Number = (loaderInfo.bytesLoaded / loaderInfo.bytesTotal);
}
function frame1(){
cont = addChild(new MovieClip());
mc_scre = addChildAt(new MovieClip(), 0);
Game_loaded = false;
AdM_loaded = false;
cont.name = "Mochi";
mc_scre.name = "Mochi_score";
loaderInfo.addEventListener(ProgressEvent.PROGRESS, loadProgress);
loaderInfo.addEventListener(Event.COMPLETE, loadComplete);
stop();
_mochiads_game_id = "f0b4f716316a468d";
MochiServices.connect("f0b4f716316a468d", mc_scre);
myOptions = {no_bg:true, id:_mochiads_game_id, res:"640x480", clip:cont, color:26265, background:0x333333, outline:0xFFFFFF, ad_loaded:function (_arg1, _arg2){
trace(((("ad loaded: " + _arg1) + "x") + _arg2));
}, ad_progress:function (_arg1){
trace(("preloader percent: " + _arg1));
}, ad_finished:function (){
AdM_loaded = true;
check_all_loaded();
}};
MochiAd.showPreGameAd(myOptions);
}
function frame2(){
new ss();
new g();
new An();
id = this;
stage.showDefaultContextMenu = false;
main.id.stage.addChild(getChildByName("Mochi_score"));
ss.init();
ss.playSong();
nextFrame();
}
function frame4(){
stop();
addChild(getChildByName("sound panel"));
An.play(btn1, "blurMoveDw");
An.play(btn2, "blurMoveDw");
btn1.addEventListener(MouseEvent.ROLL_OVER, orRoll);
btn2.addEventListener(MouseEvent.ROLL_OVER, orRoll);
btn1.addEventListener(MouseEvent.CLICK, fn1);
btn2.addEventListener(MouseEvent.CLICK, fn2);
}
public function fn1(_arg1:Event){
if (is_consist(controlScene.id, mess_gotomenu)){
return;
};
if (g.game_mode == "single"){
controlScene.id.addChild(new mess_gotomenu());
} else {
controlScene.id.addChild(new mess_getscores());
};
}
function frame3(){
stop();
if (!this["s"]){
s = addChild(new sound_controll());
s.name = "sound panel";
s.x = 0;
s.y = 425;
};
}
public function fn2(_arg1:Event){
controlScene.id.onSpace();
}
public function check_all_loaded():void{
trace("check");
if ((((Game_loaded == true)) && ((AdM_loaded == true)))){
nextFrame();
};
}
public function loadComplete(_arg1:Event):void{
loaderInfo.removeEventListener(ProgressEvent.PROGRESS, loadProgress);
loaderInfo.removeEventListener(Event.COMPLETE, loadComplete);
Game_loaded = true;
check_all_loaded();
}
}
}//package
Section 21
//mc_Cell (mc_Cell)
package {
import flash.display.*;
import flash.events.*;
public class mc_Cell extends MovieClip {
public function mc_Cell(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4);
stop();
addEventListener(Event.ENTER_FRAME, step);
}
function frame3(){
stop();
}
public function step(_arg1:Event){
}
function frame2(){
stop();
}
function frame1(){
stop();
}
function frame4(){
stop();
}
}
}//package
Section 22
//mc_scene (mc_scene)
package {
import flash.display.*;
public dynamic class mc_scene extends MovieClip {
}
}//package
Section 23
//mc_titile_back (mc_titile_back)
package {
import flash.display.*;
public dynamic class mc_titile_back extends MovieClip {
}
}//package
Section 24
//mcCredits (mcCredits)
package {
import flash.display.*;
import flash.text.*;
public dynamic class mcCredits extends MovieClip {
public var nm_rr:TextField;
public var nm_rr2:TextField;
public function mcCredits(){
addFrameScript(0, frame1);
}
function frame1(){
nm_rr2.embedFonts = true;
}
}
}//package
Section 25
//mcHelp (mcHelp)
package {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.filters.*;
import flash.media.*;
import flash.text.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.xml.*;
public dynamic class mcHelp extends MovieClip {
public var btn_1:SimpleButton;
public var btn_2:SimpleButton;
public var btn_3:SimpleButton;
public var nm_sprites:MovieClip;
public function mcHelp(){
addFrameScript(0, frame1);
}
public function Go_z(_arg1:Event){
var _local2:* = An.play(this, "blurInto");
}
public function remove(){
g.show_help = false;
this.parent.removeChild(this);
}
function frame1(){
stop();
trace("help:");
btn_1.addEventListener(MouseEvent.CLICK, Go_2);
nm_sprites.stop();
btn_2.addEventListener(MouseEvent.CLICK, Go_1);
btn_3.addEventListener(MouseEvent.CLICK, Go_0);
addEventListener(Event.ADDED_TO_STAGE, Go_z);
}
public function Go_0(_arg1:Event){
nm_sprites.nextFrame();
}
public function Go_1(_arg1:Event){
nm_sprites.prevFrame();
}
public function Go_2(_arg1:Event){
var _local2:* = An.play(this, "blurOutto");
_local2.vars["onComplete"] = remove;
}
}
}//package
Section 26
//mcScene_sbig (mcScene_sbig)
package {
import flash.display.*;
public dynamic class mcScene_sbig extends MovieClip {
}
}//package
Section 27
//mcScene_small (mcScene_small)
package {
import flash.display.*;
public dynamic class mcScene_small extends MovieClip {
}
}//package
Section 28
//mess_getscores (mess_getscores)
package {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.filters.*;
import mochi.*;
import flash.media.*;
import flash.text.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.xml.*;
public dynamic class mess_getscores extends MovieClip {
public var time_create;
public var btn1:SimpleButton;
public var btn2:SimpleButton;
public var btn3:SimpleButton;
public var txt_name:TextField;
public function mess_getscores(){
addFrameScript(0, frame1);
}
public function remove(){
g.can_play = true;
this.parent.removeChild(this);
}
public function f_three(_arg1:Event){
this.parent.removeChild(this);
controlScene.id.gotoMenu();
}
public function re_toM(_arg1=null){
g.can_play = true;
controlScene.id.gotoMenu();
this.parent.removeChild(this);
}
function frame1(){
stop();
time_create = new Date();
g.can_play = false;
btn1.addEventListener(MouseEvent.CLICK, f_one);
btn2.addEventListener(MouseEvent.CLICK, f_two);
btn3.addEventListener(MouseEvent.CLICK, f_three);
main.id["btn1"].mouseEnabled = false;
main.id["btn2"].mouseEnabled = false;
An.play(main.id["btn1"], "blurOutto", false);
An.play(main.id["btn2"], "blurOutto", false);
}
public function f_one(_arg1:Event){
main.id.stage.addChild(main.id.stage.getChildByName("Mochi_score"));
MochiScores.showLeaderboard({boardID:"b6d6238b40ccf046", score:g.score_play, name:txt_name.text, onError:re_toM, onClose:re_toM, res:"640x480", width:600});
this.parent.removeChild(this);
}
public function f_two(_arg1:Event){
trace("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
MochiScores.closeLeaderboard();
main.id["btn1"].mouseEnabled = true;
main.id["btn2"].mouseEnabled = true;
An.play(main.id["btn1"], "blurInto");
An.play(main.id["btn2"], "blurInto");
var _local2:* = new Date();
g.endDate.setTime((g.endDate.getTime() - (time_create.getTime() - _local2.getTime())));
var _local3:* = An.play(this, "blurOutto");
_local3.vars["onComplete"] = remove;
}
}
}//package
Section 29
//mess_gotomenu (mess_gotomenu)
package {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.filters.*;
import flash.media.*;
import flash.text.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.xml.*;
public dynamic class mess_gotomenu extends MovieClip {
public var btn1:SimpleButton;
public var btn2:SimpleButton;
public var time_create;
public function mess_gotomenu(){
addFrameScript(0, frame1);
}
public function f_continue(_arg1:Event){
g.so.data.svTime = (g.now.getTime() - g.endDate.getTime());
g.so.data.svScore = g.score_play;
g.so.data.svLevel = controlScene.cur_level;
g.can_play = true;
this.parent.removeChild(this);
controlScene.id.gotoMenu();
}
public function remove(){
g.can_play = true;
this.parent.removeChild(this);
}
public function f_new(_arg1:Event){
var _local2:* = new Date();
g.endDate.setTime((g.endDate.getTime() - (time_create.getTime() - _local2.getTime())));
var _local3:* = An.play(this, "blurOutto");
_local3.vars["onComplete"] = remove;
}
function frame1(){
stop();
time_create = new Date();
g.can_play = false;
btn1.addEventListener(MouseEvent.CLICK, f_continue);
btn2.addEventListener(MouseEvent.CLICK, f_new);
}
}
}//package
Section 30
//mess_newgame (mess_newgame)
package {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.filters.*;
import flash.media.*;
import flash.text.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.xml.*;
public dynamic class mess_newgame extends MovieClip {
public var btn1:SimpleButton;
public var btn2:SimpleButton;
public function mess_newgame(){
addFrameScript(0, frame1);
}
public function f_continue(_arg1:Event){
g.game_mode = "single";
this.parent.removeChild(this);
if (!g.so.data.svLevel){
g.so.data.svLevel = 1;
g.so.data.svTime = 0;
g.so.data.svScore = 0;
};
main.id.play();
}
function frame1(){
stop();
btn1.addEventListener(MouseEvent.CLICK, f_continue);
btn2.addEventListener(MouseEvent.CLICK, f_new);
}
public function f_new(_arg1:Event){
g.so.data.svTime = 0;
g.so.data.svScore = 0;
g.so.data.svLevel = 1;
g.game_mode = "single";
this.parent.removeChild(this);
main.id.play();
}
}
}//package
Section 31
//mess_onlyinfull (mess_onlyinfull)
package {
import flash.display.*;
import flash.events.*;
public dynamic class mess_onlyinfull extends MovieClip {
public var btn1:SimpleButton;
public function mess_onlyinfull(){
addFrameScript(0, frame1);
}
public function f_continue(_arg1:Event){
controlScene.id.gotoMenu();
this.parent.removeChild(this);
g.can_play = true;
}
function frame1(){
stop();
btn1.addEventListener(MouseEvent.CLICK, f_continue);
}
}
}//package
Section 32
//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.7");
}
public static function showClickAwayAd(_arg1:Object):void{
var clip:Object;
var mc:MovieClip;
var chk:MovieClip;
var options = _arg1;
var DEFAULTS:Object = {ad_timeout:2000, regpt:"o", method:"showClickAwayAd", res:"300x250", no_bg:true, ad_started:function ():void{
}, ad_finished:function ():void{
}, ad_loaded:function (_arg1:Number, _arg2:Number):void{
}, ad_failed:function ():void{
trace("[MochiAd] Couldn't load an ad, make sure your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_skipped:function ():void{
}};
options = MochiAd._parseOptions(options, DEFAULTS);
clip = options.clip;
var ad_timeout:Number = options.ad_timeout;
delete options.ad_timeout;
if (!MochiAd.load(options)){
options.ad_failed();
options.ad_finished();
return;
};
options.ad_started();
mc = clip._mochiad;
mc["onUnload"] = function ():void{
MochiAd._cleanup(mc);
options.ad_finished();
};
var wh:Array = MochiAd._getRes(options, clip);
var w:Number = wh[0];
var h:Number = wh[1];
mc.x = (w * 0.5);
mc.y = (h * 0.5);
chk = createEmptyMovieClip(mc, "_mochiad_wait", 3);
chk.ad_timeout = ad_timeout;
chk.started = getTimer();
chk.showing = false;
mc.unloadAd = function ():void{
MochiAd.unload(clip);
};
mc.adLoaded = options.ad_loaded;
mc.adSkipped = options.ad_skipped;
mc.rpc = function (_arg1:Number, _arg2:Object):void{
MochiAd.rpc(clip, _arg1, _arg2);
};
var sendHostProgress:Boolean;
mc.regContLC = function (_arg1:String):void{
mc._containerLCName = _arg1;
};
chk["onEnterFrame"] = function ():void{
var _local4:Number;
if (!this.parent){
delete this.onEnterFrame;
return;
};
var _local1:Object = this.parent._mochiad_ctr;
var _local2:Number = (getTimer() - this.started);
var _local3:Boolean;
if (!chk.showing){
_local4 = this.parent._mochiad_ctr.contentLoaderInfo.bytesTotal;
if (_local4 > 0){
chk.showing = true;
_local3 = true;
chk.started = getTimer();
} else {
if (_local2 > chk.ad_timeout){
options.ad_failed();
_local3 = true;
};
};
};
if (this.root == null){
_local3 = true;
};
if (_local3){
delete this.onEnterFrame;
};
};
doOnEnterFrame(chk);
}
public static function _isNetworkAvailable():Boolean{
return (!((Security.sandboxType == "localWithFile")));
}
public static function _allowDomains(_arg1:String):String{
var _local2:String = _arg1.split("/")[2].split(":")[0];
Security.allowDomain("*");
Security.allowDomain(_local2);
Security.allowInsecureDomain("*");
Security.allowInsecureDomain(_local2);
return (_local2);
}
public static function unload(_arg1:Object):Boolean{
if (((_arg1.clip) && (_arg1.clip._mochiad))){
_arg1 = _arg1.clip;
};
if (_arg1.origFrameRate != undefined){
_arg1.stage.frameRate = _arg1.origFrameRate;
};
if (!_arg1._mochiad){
return (false);
};
if (_arg1._mochiad._containerLCName != undefined){
_arg1._mochiad.lc.send(_arg1._mochiad._containerLCName, "notify", {id:"unload"});
};
if (_arg1._mochiad.onUnload){
_arg1._mochiad.onUnload();
};
delete _arg1._mochiad_loaded;
delete _arg1._mochiad;
return (true);
}
public static function showInterLevelAd(_arg1:Object):void{
var clip:Object;
var mc:MovieClip;
var chk:MovieClip;
var options = _arg1;
var DEFAULTS:Object = {ad_timeout:2000, fadeout_time:250, regpt:"o", method:"showTimedAd", ad_started:function ():void{
if ((this.clip is MovieClip)){
this.clip.stop();
} else {
throw (new Error("MochiAd.showInterLevelAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers."));
};
}, ad_finished:function ():void{
if ((this.clip is MovieClip)){
this.clip.play();
} else {
throw (new Error("MochiAd.showInterLevelAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers."));
};
}, ad_loaded:function (_arg1:Number, _arg2:Number):void{
}, ad_failed:function ():void{
trace("[MochiAd] Couldn't load an ad, make sure your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_skipped:function ():void{
}};
options = MochiAd._parseOptions(options, DEFAULTS);
clip = options.clip;
var ad_msec:Number = 11000;
var ad_timeout:Number = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time:Number = options.fadeout_time;
delete options.fadeout_time;
if (!MochiAd.load(options)){
options.ad_failed();
options.ad_finished();
return;
};
options.ad_started();
mc = clip._mochiad;
mc["onUnload"] = function ():void{
MochiAd._cleanup(mc);
options.ad_finished();
};
var wh:Array = MochiAd._getRes(options, clip);
var w:Number = wh[0];
var h:Number = 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{
if (!this.parent){
delete this.onEnterFrame;
delete this.fadeFunction;
return;
};
var _local1:Number = (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.adLoaded = options.ad_loaded;
mc.adSkipped = options.ad_skipped;
mc.adjustProgress = function (_arg1:Number):void{
var _local2:Object = mc._mochiad_wait;
_local2.server_control = true;
_local2.showing = true;
_local2.started = getTimer();
_local2.ad_msec = (_arg1 - 250);
};
mc.rpc = function (_arg1:Number, _arg2:Object):void{
MochiAd.rpc(clip, _arg1, _arg2);
};
chk["onEnterFrame"] = function ():void{
var _local4:Number;
if (!this.parent){
delete this.onEnterFrame;
delete this.fadeFunction;
return;
};
var _local1:Object = this.parent._mochiad_ctr;
var _local2:Number = (getTimer() - this.started);
var _local3:Boolean;
if (!chk.showing){
_local4 = this.parent._mochiad_ctr.contentLoaderInfo.bytesTotal;
if (_local4 > 0){
chk.showing = true;
chk.started = getTimer();
MochiAd.adShowing(clip);
} else {
if (_local2 > chk.ad_timeout){
options.ad_failed();
_local3 = true;
};
};
};
if (_local2 > chk.ad_msec){
_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 _parseOptions(_arg1:Object, _arg2:Object):Object{
var _local4:String;
var _local5:Array;
var _local6:Number;
var _local7:Array;
var _local3:Object = {};
for (_local4 in _arg2) {
_local3[_local4] = _arg2[_local4];
};
if (_arg1){
for (_local4 in _arg1) {
_local3[_local4] = _arg1[_local4];
};
};
if (_local3.clip == undefined){
throw (new Error("MochiAd is missing the 'clip' parameter. This should be a MovieClip, Sprite or an instance of a class that extends MovieClip or Sprite."));
};
_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++;
};
};
if (_local3.id == "test"){
trace("[MochiAd] WARNING: Using the MochiAds test identifier, make sure to use the code from your dashboard, not this example!");
};
return (_local3);
}
public static function _cleanup(_arg1:Object):void{
var k:String;
var lc:LocalConnection;
var f:Function;
var mc = _arg1;
if (("lc" in mc)){
lc = mc.lc;
f = function ():void{
try {
lc.client = null;
lc.close();
} catch(e:Error) {
};
};
setTimeout(f, 0);
};
var idx:Number = DisplayObjectContainer(mc).numChildren;
while (idx > 0) {
idx = (idx - 1);
DisplayObjectContainer(mc).removeChildAt(idx);
};
for (k in mc) {
delete mc[k];
};
}
public static function load(_arg1:Object):MovieClip{
var clip:Object;
var k:String;
var server:String;
var hostname:String;
var lc:LocalConnection;
var name:String;
var loader:Loader;
var g:Function;
var req:URLRequest;
var v:Object;
var options = _arg1;
var DEFAULTS:Object = {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);
};
try {
if (clip._mochiad_loaded){
return (null);
};
} catch(e:Error) {
throw (new Error("MochiAd requires a clip that is an instance of a dynamic class. If your class extends Sprite or MovieClip, you must make it dynamic."));
};
var depth:Number = options.depth;
delete options.depth;
var mc:MovieClip = createEmptyMovieClip(clip, "_mochiad", depth);
var wh:Array = 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;
};
var lv:URLVariables = 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;
mc.lcName = name;
lv.lc = name;
lv.st = getTimer();
loader = new Loader();
g = function (_arg1:Object):void{
_arg1.target.removeEventListener(_arg1.type, arguments.callee);
MochiAd.unload(clip);
};
loader.contentLoaderInfo.addEventListener(Event.UNLOAD, g);
req = new URLRequest(((server + ".swf?cacheBust=") + new Date().getTime()));
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 runMethod(_arg1:Object, _arg2:String, _arg3:Array):Object{
var _local4:Array = _arg2.split(".");
var _local5:Number = 0;
while (_local5 < (_local4.length - 1)) {
if ((((_arg1[_local4[_local5]] == undefined)) || ((_arg1[_local4[_local5]] == null)))){
return (undefined);
};
_arg1 = _arg1[_local4[_local5]];
_local5++;
};
if (typeof(_arg1[_local4[_local5]]) == "function"){
return (_arg1[_local4[_local5]].apply(_arg1, _arg3));
};
return (undefined);
}
public static function createEmptyMovieClip(_arg1:Object, _arg2:String, _arg3:Number):MovieClip{
var _local4:MovieClip = new MovieClip();
if (((false) && (_arg3))){
_arg1.addChildAt(_local4, _arg3);
} else {
_arg1.addChild(_local4);
};
_arg1[_arg2] = _local4;
_local4["_name"] = _arg2;
return (_local4);
}
public static function _getRes(_arg1:Object, _arg2:Object):Array{
var _local6:Array;
var _local3:Object = _arg2.getBounds(_arg2.root);
var _local4:Number = 0;
var _local5:Number = 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 adShowing(_arg1:Object):void{
_arg1.origFrameRate = _arg1.stage.frameRate;
_arg1.stage.frameRate = 30;
}
public static function getValue(_arg1:Object, _arg2:String):Object{
var _local3:Array = _arg2.split(".");
var _local4:Number = 0;
while (_local4 < (_local3.length - 1)) {
if ((((_arg1[_local3[_local4]] == undefined)) || ((_arg1[_local3[_local4]] == null)))){
return (undefined);
};
_arg1 = _arg1[_local3[_local4]];
_local4++;
};
return (_arg1[_local3[_local4]]);
}
public static function rpc(_arg1:Object, _arg2:Number, _arg3:Object):void{
var _local4:Object;
var _local5:Object;
switch (_arg3.id){
case "setValue":
MochiAd.setValue(_arg1, _arg3.objectName, _arg3.value);
break;
case "getValue":
_local4 = MochiAd.getValue(_arg1, _arg3.objectName);
_arg1._mochiad.lc.send(_arg1._mochiad._containerLCName, "rpcResult", _arg2, _local4);
break;
case "runMethod":
_local5 = MochiAd.runMethod(_arg1, _arg3.method, _arg3.args);
_arg1._mochiad.lc.send(_arg1._mochiad._containerLCName, "rpcResult", _arg2, _local5);
break;
default:
trace(("[mochiads rpc] unknown rpc id: " + _arg3.id));
};
}
public static function setValue(_arg1:Object, _arg2:String, _arg3:Object):void{
var _local4:Array = _arg2.split(".");
var _local5:Number = 0;
while (_local5 < (_local4.length - 1)) {
if ((((_arg1[_local4[_local5]] == undefined)) || ((_arg1[_local4[_local5]] == null)))){
return;
};
_arg1 = _arg1[_local4[_local5]];
_local5++;
};
_arg1[_local4[_local5]] = _arg3;
}
public static function showPreGameAd(_arg1:Object):void{
var clip:Object;
var mc:MovieClip;
var chk:MovieClip;
var complete:Boolean;
var unloaded:Boolean;
var sendHostProgress:Boolean;
var fn:Function;
var r:MovieClip;
var options = _arg1;
var DEFAULTS:Object = {ad_timeout:3000, fadeout_time:250, regpt:"o", method:"showPreloaderAd", color:0xFF8A00, background:16777161, outline:13994812, no_progress_bar:false, ad_started:function ():void{
if ((this.clip is MovieClip)){
this.clip.stop();
} else {
throw (new Error("MochiAd.showPreGameAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers."));
};
}, ad_finished:function ():void{
if ((this.clip is MovieClip)){
this.clip.play();
} else {
throw (new Error("MochiAd.showPreGameAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers."));
};
}, ad_loaded:function (_arg1:Number, _arg2:Number):void{
}, ad_failed:function ():void{
trace("[MochiAd] Couldn't load an ad, make sure your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_skipped:function ():void{
}, ad_progress:function (_arg1:Number):void{
}};
options = MochiAd._parseOptions(options, DEFAULTS);
if ("c862232051e0a94e1c3609b3916ddb17".substr(0) == "dfeada81ac97cde83665f81c12da7def"){
options.ad_started();
fn = function ():void{
options.ad_finished();
};
setTimeout(fn, 100);
return;
};
clip = options.clip;
var ad_msec:Number = 11000;
var ad_timeout:Number = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time:Number = options.fadeout_time;
delete options.fadeout_time;
if (!MochiAd.load(options)){
options.ad_failed();
options.ad_finished();
return;
};
options.ad_started();
mc = clip._mochiad;
mc["onUnload"] = function ():void{
MochiAd._cleanup(mc);
var fn:Function = function ():void{
options.ad_finished();
};
setTimeout(fn, 100);
};
var wh:Array = MochiAd._getRes(options, clip);
var w:Number = wh[0];
var h:Number = 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);
var bar:MovieClip = createEmptyMovieClip(chk, "_mochiad_bar", 4);
if (options.no_progress_bar){
bar.visible = false;
delete options.no_progress_bar;
} else {
bar.x = 10;
bar.y = (h - 20);
};
var bar_color:Number = options.color;
delete options.color;
var bar_background:Number = options.background;
delete options.background;
var bar_outline:Number = options.outline;
delete options.outline;
var backing_mc:MovieClip = createEmptyMovieClip(bar, "_outline", 1);
var backing:Object = 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();
var inside_mc:MovieClip = createEmptyMovieClip(bar, "_inside", 2);
var inside:Object = 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;
var outline_mc:MovieClip = createEmptyMovieClip(bar, "_outline", 3);
var outline:Object = 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 = (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;
var f:Function = function (_arg1:Event):void{
_arg1.target.removeEventListener(_arg1.type, arguments.callee);
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.adLoaded = options.ad_loaded;
mc.adSkipped = options.ad_skipped;
mc.adjustProgress = function (_arg1:Number):void{
var _local2:Object = mc._mochiad_wait;
_local2.server_control = true;
_local2.showing = true;
_local2.started = getTimer();
_local2.ad_msec = _arg1;
};
mc.rpc = function (_arg1:Number, _arg2:Object):void{
MochiAd.rpc(clip, _arg1, _arg2);
};
mc.rpcTestFn = function (_arg1:String):Object{
trace(("[MOCHIAD rpcTestFn] " + _arg1));
return (_arg1);
};
mc.regContLC = function (_arg1:String):void{
mc._containerLCName = _arg1;
};
sendHostProgress = false;
mc.sendHostLoadProgress = function (_arg1:String):void{
sendHostProgress = true;
};
chk["onEnterFrame"] = function ():void{
var _local11:Number;
if (((!(this.parent)) || (!(this.parent.parent)))){
delete this["onEnterFrame"];
return;
};
var _local1:Object = this.parent.parent.root;
var _local2:Object = this.parent._mochiad_ctr;
var _local3:Number = (getTimer() - this.started);
var _local4:Boolean;
var _local5:Number = _local1.loaderInfo.bytesTotal;
var _local6:Number = _local1.loaderInfo.bytesLoaded;
if (complete){
_local6 = Math.max(1, _local6);
_local5 = _local6;
};
var _local7:Number = ((100 * _local6) / _local5);
var _local8:Number = ((100 * _local3) / chk.ad_msec);
var _local9:Object = this._mochiad_bar._inside;
var _local10:Number = Math.min(100, Math.min(((_local7) || (0)), _local8));
_local10 = Math.max(this.last_pcnt, _local10);
this.last_pcnt = _local10;
_local9.scaleX = (_local10 * 0.01);
options.ad_progress(_local10);
if (sendHostProgress){
clip._mochiad.lc.send(clip._mochiad._containerLCName, "notify", {id:"hostLoadPcnt", pcnt:_local7});
if (_local7 == 100){
sendHostProgress = false;
};
};
if (!chk.showing){
_local11 = this.parent._mochiad_ctr.contentLoaderInfo.bytesTotal;
if (_local11 > 0){
chk.showing = true;
chk.started = getTimer();
MochiAd.adShowing(clip);
} else {
if ((((_local3 > chk.ad_timeout)) && ((_local7 == 100)))){
options.ad_failed();
_local4 = true;
};
};
};
if (_local3 > chk.ad_msec){
_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{
trace("[MochiAd] DEPRECATED: showPreloaderAd was renamed to showPreGameAd in 2.0");
MochiAd.showPreGameAd(_arg1);
}
public static function showTimedAd(_arg1:Object):void{
trace("[MochiAd] DEPRECATED: showTimedAd was renamed to showInterLevelAd in 2.0");
MochiAd.showInterLevelAd(_arg1);
}
public static function doOnEnterFrame(_arg1:MovieClip):void{
var mc = _arg1;
var f:Function = function (_arg1:Object):void{
if (((("onEnterFrame" in mc)) && (mc.onEnterFrame))){
mc.onEnterFrame();
} else {
_arg1.target.removeEventListener(_arg1.type, arguments.callee);
};
};
mc.addEventListener(Event.ENTER_FRAME, f);
}
}
}//package
Section 33
//Mytst (Mytst)
package {
import flash.display.*;
import flash.text.*;
public dynamic class Mytst extends MovieClip {
public var nm_string:TextField;
}
}//package
Section 34
//o_best (o_best)
package {
import flash.display.*;
public dynamic class o_best extends MovieClip {
public function o_best(){
addFrameScript(36, frame37);
}
function frame37(){
stop();
this.parent.removeChild(this);
}
}
}//package
Section 35
//o_good (o_good)
package {
import flash.display.*;
public dynamic class o_good extends MovieClip {
public function o_good(){
addFrameScript(70, frame71);
}
function frame71(){
stop();
this.parent.removeChild(this);
}
}
}//package
Section 36
//o_great (o_great)
package {
import flash.display.*;
public dynamic class o_great extends MovieClip {
public function o_great(){
addFrameScript(60, frame61);
}
function frame61(){
stop();
this.parent.removeChild(this);
}
}
}//package
Section 37
//sound_controll (sound_controll)
package {
import flash.display.*;
import flash.events.*;
public dynamic class sound_controll extends MovieClip {
public var nm_soundsd:MovieClip;
public var btn:SimpleButton;
public var nm_plays:MovieClip;
public function sound_controll(){
addFrameScript(0, frame1);
}
function frame1(){
btn.addEventListener(MouseEvent.CLICK, Go);
}
public function Go(_arg1:Event){
if (nm_soundsd.currentFrame == 1){
ss.off();
nm_soundsd.nextFrame();
nm_plays.stop();
} else {
ss.on();
nm_soundsd.prevFrame();
nm_plays.play();
};
}
}
}//package
Section 38
//ss (ss)
package {
import flash.media.*;
public class ss {
static var channel:SoundChannel;
static var snd:Object;
static var t:SoundTransform;
static var global_t:SoundTransform;
static function on(){
global_t.volume = 1;
SoundMixer.soundTransform = global_t;
}
static function off(){
global_t.volume = 0;
SoundMixer.soundTransform = global_t;
}
static function init(){
global_t = new SoundTransform();
t = new SoundTransform();
snd = new Object();
snd["song"] = new ss_music();
snd["level"] = new ss_level();
snd["click"] = new ss_paste();
channel = snd["click"].play(0, 0, new SoundTransform(0, 0));
}
static function playSong(){
channel.stop();
channel = snd["song"].play(0, 9999999, t);
}
static function play(_arg1:String):void{
snd[_arg1].play(0, 0, t);
}
}
}//package
Section 39
//ss_level (ss_level)
package {
import flash.media.*;
public dynamic class ss_level extends Sound {
}
}//package
Section 40
//ss_music (ss_music)
package {
import flash.media.*;
public dynamic class ss_music extends Sound {
}
}//package
Section 41
//ss_paste (ss_paste)
package {
import flash.media.*;
public dynamic class ss_paste extends Sound {
}
}//package