Section 1
//LineBlink_MC_8 (3p_fla.LineBlink_MC_8)
package 3p_fla {
import flash.display.*;
public dynamic class LineBlink_MC_8 extends MovieClip {
public function LineBlink_MC_8(){
addFrameScript(23, frame24);
}
function frame24(){
stop();
}
}
}//package 3p_fla
Section 2
//LineMoving_MC_7 (3p_fla.LineMoving_MC_7)
package 3p_fla {
import flash.display.*;
public dynamic class LineMoving_MC_7 extends MovieClip {
public function LineMoving_MC_7(){
addFrameScript(15, frame16);
}
function frame16(){
stop();
}
}
}//package 3p_fla
Section 3
//mcTimeBonus_23 (3p_fla.mcTimeBonus_23)
package 3p_fla {
import flash.display.*;
public dynamic class mcTimeBonus_23 extends MovieClip {
public var mc:MovieClip;
public function mcTimeBonus_23(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package 3p_fla
Section 4
//Part1Appearance_MC_4 (3p_fla.Part1Appearance_MC_4)
package 3p_fla {
import flash.display.*;
public dynamic class Part1Appearance_MC_4 extends MovieClip {
public function Part1Appearance_MC_4(){
addFrameScript(0, frame1, 56, frame57);
}
function frame1(){
stop();
}
function frame57(){
stop();
}
}
}//package 3p_fla
Section 5
//Part2Appearance_MC_15 (3p_fla.Part2Appearance_MC_15)
package 3p_fla {
import flash.display.*;
public dynamic class Part2Appearance_MC_15 extends MovieClip {
public function Part2Appearance_MC_15(){
addFrameScript(0, frame1, 55, frame56);
}
function frame1(){
stop();
}
function frame56(){
stop();
}
}
}//package 3p_fla
Section 6
//Part3Appearance_MC_17 (3p_fla.Part3Appearance_MC_17)
package 3p_fla {
import flash.display.*;
public dynamic class Part3Appearance_MC_17 extends MovieClip {
public function Part3Appearance_MC_17(){
addFrameScript(0, frame1, 56, frame57);
}
function frame1(){
stop();
}
function frame57(){
stop();
}
}
}//package 3p_fla
Section 7
//StarBlinking_MC_12 (3p_fla.StarBlinking_MC_12)
package 3p_fla {
import flash.display.*;
public dynamic class StarBlinking_MC_12 extends MovieClip {
public function StarBlinking_MC_12(){
addFrameScript(23, frame24);
}
function frame24(){
stop();
}
}
}//package 3p_fla
Section 8
//TweenLite (gs.TweenLite)
package gs {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.geom.*;
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.13;
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:1, 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();
this.startTime = _curTime;
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:Object;
var _local5:Object = this.vars;
if (_local5.isTV == true){
_local5 = _local5.exposedProps;
};
if (((!(_arg1)) && (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.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")))) || ((_local3 == "onStart")))) || ((_local3 == "onStartParams")))) || ((_local3 == "renderOnStart")))) || ((_local3 == "proxiedEase")))) || ((_local3 == "easeParams")))) || (((_arg1) && (!((_arg2.indexOf(((" " + _local3) + " ")) == -1))))))){
} else {
if (((!(((_isDisplayObject) && ((((((_local3 == "tint")) || ((_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) {
_local9 = this.tweens[_local4];
this.tweens[_local4].s = (_local9.s + _local9.c);
_local9.c = (_local9.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.initTime) / 1000) > this.delay){
_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 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 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 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 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 to(_arg1:Object, _arg2:Number, _arg3:Object):TweenLite{
return (new TweenLite(_arg1, _arg2, _arg3));
}
}
}//package gs
Section 9
//MochiBot (mochi.MochiBot)
package mochi {
import flash.display.*;
import flash.net.*;
import flash.system.*;
public dynamic class MochiBot extends Sprite {
public static function track(_arg1:Sprite, _arg2:String):MochiBot{
if (Security.sandboxType == "localWithFile"){
return (null);
};
var _local3:MochiBot = new (MochiBot);
_arg1.addChild(_local3);
Security.allowDomain("*");
Security.allowInsecureDomain("*");
var _local4 = "http://core.mochibot.com/my/core.swf";
var _local5:URLVariables = new URLVariables();
_local5["sb"] = Security.sandboxType;
_local5["v"] = Capabilities.version;
_local5["swfid"] = _arg2;
_local5["mv"] = "8";
_local5["fv"] = "9";
var _local6:String = _local3.root.loaderInfo.loaderURL;
if (_local6.indexOf("http") == 0){
_local5["url"] = _local6;
} else {
_local5["url"] = "local";
};
var _local7:URLRequest = new URLRequest(_local4);
_local7.contentType = "application/x-www-form-urlencoded";
_local7.method = URLRequestMethod.POST;
_local7.data = _local5;
var _local8:Loader = new Loader();
_local3.addChild(_local8);
_local8.load(_local7);
return (_local3);
}
}
}//package mochi
Section 10
//MochiCoins (mochi.MochiCoins)
package mochi {
public class MochiCoins {
public static const STORE_HIDE:String = "StoreHide";
public static const LOGGED_IN:String = "LoggedIn";
public static const STORE_ITEMS:String = "StoreItems";
public static const NO_USER:String = "NoUser";
public static const PROPERTIES_SIZE:String = "PropertiesSize";
public static const ITEM_NEW:String = "ItemNew";
public static const USER_INFO:String = "UserInfo";
public static const IO_ERROR:String = "IOError";
public static const ITEM_OWNED:String = "ItemOwned";
public static const PROPERTIES_SAVED:String = "PropertySaved";
public static const WIDGET_LOADED:String = "WidgetLoaded";
public static const ERROR:String = "Error";
public static const LOGGED_OUT:String = "LoggedOut";
public static const PROFILE_SHOW:String = "ProfileShow";
public static const LOGIN_HIDE:String = "LoginHide";
public static const LOGIN_SHOW:String = "LoginShow";
public static const STORE_SHOW:String = "StoreShow";
public static const PROFILE_HIDE:String = "ProfileHide";
private static var _dispatcher:MochiEventDispatcher = new MochiEventDispatcher();
public static function showItem(_arg1:Object=null):void{
if (((!(_arg1)) || (!((typeof(_arg1.item) == "string"))))){
trace("ERROR: showItem call must pass an Object with an item key");
return;
};
MochiServices.bringToTop();
MochiServices.send("coins_showItem", {options:_arg1}, null, null);
}
public static function saveUserProperties(_arg1:Object):void{
MochiServices.send("coins_saveUserProperties", _arg1);
}
public static function triggerEvent(_arg1:String, _arg2:Object):void{
_dispatcher.triggerEvent(_arg1, _arg2);
}
public static function showLoginWidget(_arg1:Object=null):void{
MochiServices.setContainer();
MochiServices.bringToTop();
MochiServices.send("coins_showLoginWidget", {options:_arg1});
}
public static function getStoreItems():void{
MochiServices.send("coins_getStoreItems");
}
public static function getVersion():String{
return (MochiServices.getVersion());
}
public static function showStore(_arg1:Object=null):void{
MochiServices.bringToTop();
MochiServices.send("coins_showStore", {options:_arg1}, null, null);
}
public static function addEventListener(_arg1:String, _arg2:Function):void{
_dispatcher.addEventListener(_arg1, _arg2);
}
public static function getUserInfo():void{
MochiServices.send("coins_getUserInfo");
}
public static function hideLoginWidget():void{
MochiServices.send("coins_hideLoginWidget");
}
public static function removeEventListener(_arg1:String, _arg2:Function):void{
_dispatcher.removeEventListener(_arg1, _arg2);
}
public static function showVideo(_arg1:Object=null):void{
if (((!(_arg1)) || (!((typeof(_arg1.item) == "string"))))){
trace("ERROR: showVideo call must pass an Object with an item key");
return;
};
MochiServices.bringToTop();
MochiServices.send("coins_showVideo", {options:_arg1}, null, null);
}
}
}//package mochi
Section 11
//MochiDigits (mochi.MochiDigits)
package mochi {
public final class MochiDigits {
private var Sibling:MochiDigits;
private var Fragment:Number;
private var Encoder:Number;
public function MochiDigits(_arg1:Number=0, _arg2:uint=0):void{
Encoder = 0;
setValue(_arg1, _arg2);
}
public function reencode():void{
var _local1:uint = int((2147483647 * Math.random()));
Fragment = (Fragment ^ (_local1 ^ Encoder));
Encoder = _local1;
}
public function set value(_arg1:Number):void{
setValue(_arg1);
}
public function toString():String{
var _local1:String = String.fromCharCode((Fragment ^ Encoder));
if (Sibling != null){
_local1 = (_local1 + Sibling.toString());
};
return (_local1);
}
public function setValue(_arg1:Number=0, _arg2:uint=0):void{
var _local3:String = _arg1.toString();
var _temp1 = _arg2;
_arg2 = (_arg2 + 1);
Fragment = (_local3.charCodeAt(_temp1) ^ Encoder);
if (_arg2 < _local3.length){
Sibling = new MochiDigits(_arg1, _arg2);
} else {
Sibling = null;
};
reencode();
}
public function get value():Number{
return (Number(this.toString()));
}
public function addValue(_arg1:Number):void{
value = (value + _arg1);
}
}
}//package mochi
Section 12
//MochiEventDispatcher (mochi.MochiEventDispatcher)
package mochi {
public class MochiEventDispatcher {
private var eventTable:Object;
public function MochiEventDispatcher():void{
eventTable = {};
}
public function triggerEvent(_arg1:String, _arg2:Object):void{
var _local3:Object;
if (eventTable[_arg1] == undefined){
return;
};
for (_local3 in eventTable[_arg1]) {
var _local6 = eventTable[_arg1];
_local6[_local3](_arg2);
};
}
public function removeEventListener(_arg1:String, _arg2:Function):void{
var _local3:Object;
if (eventTable[_arg1] == undefined){
eventTable[_arg1] = [];
return;
};
for (_local3 in eventTable[_arg1]) {
if (eventTable[_arg1][_local3] != _arg2){
} else {
eventTable[_arg1].splice(Number(_local3), 1);
};
};
}
public function addEventListener(_arg1:String, _arg2:Function):void{
removeEventListener(_arg1, _arg2);
eventTable[_arg1].push(_arg2);
}
}
}//package mochi
Section 13
//MochiEvents (mochi.MochiEvents)
package mochi {
import flash.display.*;
public class MochiEvents {
public static const ALIGN_BOTTOM_LEFT:String = "ALIGN_BL";
public static const FORMAT_LONG:String = "LongForm";
public static const ALIGN_BOTTOM:String = "ALIGN_B";
public static const ACHIEVEMENT_RECEIVED:String = "AchievementReceived";
public static const FORMAT_SHORT:String = "ShortForm";
public static const ALIGN_TOP_RIGHT:String = "ALIGN_TR";
public static const ALIGN_BOTTOM_RIGHT:String = "ALIGN_BR";
public static const ALIGN_TOP:String = "ALIGN_T";
public static const ALIGN_LEFT:String = "ALIGN_L";
public static const ALIGN_RIGHT:String = "ALIGN_R";
public static const ALIGN_TOP_LEFT:String = "ALIGN_TL";
public static const ALIGN_CENTER:String = "ALIGN_C";
private static var _dispatcher:MochiEventDispatcher = new MochiEventDispatcher();
private static var gameStart:Number;
private static var levelStart:Number;
public static function addEventListener(_arg1:String, _arg2:Function):void{
_dispatcher.addEventListener(_arg1, _arg2);
}
public static function removeEventListener(_arg1:String, _arg2:Function):void{
_dispatcher.removeEventListener(_arg1, _arg2);
}
public static function startSession(_arg1:String):void{
MochiServices.send("events_beginSession", {achievementID:_arg1}, null, null);
}
public static function triggerEvent(_arg1:String, _arg2:Object):void{
_dispatcher.triggerEvent(_arg1, _arg2);
}
public static function setNotifications(_arg1:MovieClip, _arg2:Object):void{
var _local4:Object;
var _local3:Object = {};
for (_local4 in _arg2) {
_local3[_local4] = _arg2[_local4];
};
_local3.clip = _arg1;
MochiServices.send("events_setNotifications", _local3, null, null);
}
public static function endGame():void{
var _local1:Number = (new Date().time - gameStart);
trigger("end_game", {time:_local1});
}
public static function startGame():void{
gameStart = new Date().time;
trigger("start_game");
}
public static function trigger(_arg1:String, _arg2:Object=null):void{
if (_arg2 == null){
_arg2 = {};
} else {
if (_arg2["kind"] != undefined){
trace("WARNING: optional arguements package contains key 'id', it will be overwritten");
_arg2["kind"] = _arg1;
};
};
MochiServices.send("events_triggerEvent", {eventObject:_arg2}, null, null);
}
public static function getVersion():String{
return (MochiServices.getVersion());
}
public static function startLevel():void{
levelStart = new Date().time;
trigger("start_level");
}
public static function endLevel():void{
var _local1:Number = (new Date().time - levelStart);
trigger("end_level", {time:_local1});
}
}
}//package mochi
Section 14
//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 n:Number;
var options = _arg1;
if (options != null){
delete options.clip;
MochiServices.setContainer();
MochiServices.bringToTop();
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;
};
} else {
if ((options.score is MochiDigits)){
options.score = options.score.value;
};
};
n = Number(options.score);
if (isNaN(n)){
trace((("ERROR: Submitted score '" + options.score) + "' will be rejected, score is 'Not a Number'"));
} else {
if ((((n == Number.NEGATIVE_INFINITY)) || ((n == Number.POSITIVE_INFINITY)))){
trace((("ERROR: Submitted score '" + options.score) + "' will be rejected, score is an infinite"));
} else {
if (Math.floor(n) != n){
trace((("WARNING: Submitted score '" + options.score) + "' will be truncated"));
};
options.score = n;
};
};
};
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.warnID(options.boardID, true);
trace("[MochiScores] NOTE: Security Sandbox Violation errors below are normal");
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{
_arg1 = Number(_arg1);
if (isNaN(_arg1)){
trace((("ERROR: Submitted score '" + String(_arg1)) + "' will be rejected, score is 'Not a Number'"));
} else {
if ((((_arg1 == Number.NEGATIVE_INFINITY)) || ((_arg1 == Number.POSITIVE_INFINITY)))){
trace((("ERROR: Submitted score '" + String(_arg1)) + "' will be rejected, score is an infinite"));
} else {
if (Math.floor(_arg1) != _arg1){
trace((("WARNING: Submitted score '" + String(_arg1)) + "' will be truncated"));
};
_arg1 = Number(_arg1);
};
};
MochiServices.send("scores_submit", {score:_arg1, name:_arg2}, _arg3, _arg4);
}
public static function onClose(_arg1:Object=null):void{
if (((((_arg1) && ((_arg1.error == true)))) && (onErrorHandler))){
if (_arg1.errorCode == null){
_arg1.errorCode = "IOError";
};
onErrorHandler(_arg1.errorCode);
MochiServices.doClose();
return;
};
onCloseHandler();
MochiServices.doClose();
}
public static function setBoardID(_arg1:String):void{
MochiServices.warnID(_arg1, true);
MochiScores.boardID = _arg1;
MochiServices.send("scores_setBoardID", {boardID:_arg1});
}
}
}//package mochi
Section 15
//MochiServices (mochi.MochiServices)
package mochi {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.geom.*;
public class MochiServices {
private static var _container:Object;
private static var _connected:Boolean = false;
private static var _swfVersion:String;
private static var _preserved:Object;
public static var netupAttempted:Boolean = false;
private static var _sendChannel:LocalConnection;
public static var servicesSync:MochiSync = new MochiSync();
private static var _clip:MovieClip;
private static var _id:String;
private static var _services:String = "services.swf";
private static var _servURL:String = "http://www.mochiads.com/static/lib/services/";
public static var widget:Boolean = false;
private static var _timer:Timer;
private static var _sendChannelName:String;
private static var _loader:Loader;
private static var _connecting:Boolean = false;
private static var _mochiLocalConnection:MovieClip;
private static var _listenChannelName:String = "__ms_";
public static var onError:Object;
public static var netup:Boolean = true;
private static var _mochiLC:String = "MochiLC.swf";
public static function isNetworkAvailable():Boolean{
return (!((Security.sandboxType == "localWithFile")));
}
public static function get connected():Boolean{
return (_connected);
}
private static function onReceive(_arg1:Object):void{
var methodName:String;
var pkg = _arg1;
var cb:String = pkg.callbackID;
var cblst:Object = _clip._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 _clip._callbacks[cb];
}
public static function get childClip():Object{
return (_clip);
}
public static function send(_arg1:String, _arg2:Object=null, _arg3:Object=null, _arg4:Object=null):void{
if (_connected){
_mochiLocalConnection.send(_sendChannelName, "onReceive", {methodName:_arg1, args:_arg2, callbackID:_clip._nextcallbackID});
} else {
if ((((_clip == null)) || (!(_connecting)))){
trace(("Error: MochiServices not connected. Please call MochiServices.connect(). Function: " + _arg1));
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++;
};
};
}
private static function init(_arg1:String, _arg2:Object):void{
_id = _arg1;
if (_arg2 != null){
_container = _arg2;
loadCommunicator(_arg1, _container);
};
}
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().time));
_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);
}
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 avm1Click:DisplayObject;
var x:String;
var req:URLRequest;
var loader:Loader;
var setURL:Function;
var err:Function;
var complete: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);
var 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();
setURL = function (_arg1:String):void{
if (avm1Click){
btn.removeChild(avm1Click);
};
avm1Click = clickMovie(_arg1, onClick);
var _local2:Rectangle = btn.getBounds(btn);
btn.addChild(avm1Click);
avm1Click.x = _local2.x;
avm1Click.y = _local2.y;
avm1Click.scaleX = (0.01 * _local2.width);
avm1Click.scaleY = (0.01 * _local2.height);
};
err = function (_arg1:Object):void{
netup = false;
_arg1.target.removeEventListener(_arg1.type, arguments.callee);
setURL(burl);
};
complete = function (_arg1:Object):void{
_arg1.target.removeEventListener(_arg1.type, arguments.callee);
};
if (netup){
setURL((url + s));
} else {
setURL(burl);
};
if (!((netupAttempted) || (_connected))){
netupAttempted = true;
loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, err);
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, complete);
loader.load(req);
};
}
public static function warnID(_arg1:String, _arg2:Boolean):void{
_arg1 = _arg1.toLowerCase();
if (_arg1.length != 16){
trace((("WARNING: " + (_arg2) ? "board" : "game") + " ID is not the appropriate length"));
return;
} else {
if (_arg1 == "1e113c7239048b3f"){
if (_arg2){
trace("WARNING: Using testing board ID");
} else {
trace("WARNING: Using testing board ID as game ID");
};
return;
} else {
if (_arg1 == "84993a1de4031cd8"){
if (_arg2){
trace("WARNING: Using testing game ID as board ID");
} else {
trace("WARNING: Using testing game ID");
};
return;
};
};
};
var _local3:Number = 0;
while (_local3 < _arg1.length) {
switch (_arg1.charAt(_local3)){
case "0":
case "1":
case "2":
case "3":
case "4":
case "5":
case "6":
case "7":
case "8":
case "9":
case "a":
case "b":
case "c":
case "d":
case "e":
case "f":
break;
default:
trace(("WARNING: Board ID contains illegal characters: " + _arg1));
return;
};
_local3++;
};
}
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 {
_mochiLocalConnection.close();
} catch(error:Error) {
};
};
if (_timer != null){
try {
_timer.stop();
} catch(error:Error) {
};
};
}
public static function allowDomains(_arg1:String):String{
var _local2:String;
if (Security.sandboxType != "application"){
Security.allowDomain("*");
Security.allowInsecureDomain("*");
};
if (_arg1.indexOf("http://") != -1){
_local2 = _arg1.split("/")[2].split(":")[0];
if (Security.sandboxType != "application"){
Security.allowDomain(_local2);
Security.allowInsecureDomain(_local2);
};
};
return (_local2);
}
public static function getVersion():String{
return ("3.3 as3");
}
public static function doClose():void{
_container.removeEventListener(Event.ENTER_FRAME, MochiServices.bringToTop);
}
private static function flush(_arg1:Boolean):void{
var _local2:Object;
var _local3:Object;
if (((_clip) && (_clip._queue))){
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);
};
};
};
};
}
public static function get id():String{
return (_id);
}
private static function onEvent(_arg1:Object):void{
var _local2:String = _arg1.target;
var _local3:String = _arg1.event;
switch (_local2){
case "events":
MochiEvents.triggerEvent(_arg1.event, _arg1.args);
break;
case "coins":
MochiCoins.triggerEvent(_arg1.event, _arg1.args);
break;
case "sync":
servicesSync.triggerEvent(_arg1.event, _arg1.args);
break;
};
}
private static function urlOptions(_arg1:Object):Object{
var _local3:String;
var _local4:Array;
var _local5:Number;
var _local6:Array;
var _local2:Object = {};
if (_arg1.stage){
_local3 = _arg1.stage.loaderInfo.parameters.mochiad_options;
} else {
_local3 = _arg1.loaderInfo.parameters.mochiad_options;
};
if (_local3){
_local4 = _local3.split("&");
_local5 = 0;
while (_local5 < _local4.length) {
_local6 = _local4[_local5].split("=");
_local2[unescape(_local6[0])] = unescape(_local6[1]);
_local5++;
};
};
return (_local2);
}
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 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) {
};
};
};
};
}
private static function loadError(_arg1:Object):void{
_clip._mochiad_ctr_failed = true;
trace("MochiServices could not load.");
MochiServices.disconnect();
MochiServices.onError("IOError");
}
private static function initComChannels():void{
if (!_connected){
trace("[SERVICES_API] connected!");
_connecting = false;
_connected = true;
_mochiLocalConnection.send(_sendChannelName, "onReceive", {methodName:"handshakeDone"});
_mochiLocalConnection.send(_sendChannelName, "onReceive", {methodName:"registerGame", preserved:_preserved, id:_id, clip:_container, version:getVersion(), parentURL:_container.loaderInfo.loaderURL});
_clip.onReceive = onReceive;
_clip.onEvent = onEvent;
_clip.onError = function ():void{
MochiServices.onError("IOError");
};
while (_clip._queue.length > 0) {
_mochiLocalConnection.send(_sendChannelName, "onReceive", _clip._queue.shift());
};
};
}
private static function loadLCBridge(_arg1:Object):void{
var loader:Loader;
var clip = _arg1;
loader = new Loader();
var mochiLCURL:String = (_servURL + _mochiLC);
var req:URLRequest = new URLRequest(mochiLCURL);
var complete:Function = function (_arg1:Object):void{
_mochiLocalConnection = MovieClip(loader.content);
listen();
};
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, complete);
loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, loadError);
loader.load(req);
clip.addChild(loader);
}
private static function listen():void{
_mochiLocalConnection.connect(_listenChannelName);
_clip.handshake = function (_arg1:Object):void{
MochiServices.comChannelName = _arg1.newChannel;
};
trace("Waiting for MochiAds services to connect...");
}
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");
initComChannels();
};
};
}
private static function loadCommunicator(_arg1:String, _arg2:Object):MovieClip{
var _local3:String = ("_mochiservices_com_" + _arg1);
if (_clip != null){
return (_clip);
};
if (!MochiServices.isNetworkAvailable()){
return (null);
};
if (urlOptions(_arg2).servURL){
_servURL = urlOptions(_arg2).servURL;
};
var _local4:String = (_servURL + _services);
if (urlOptions(_arg2).servicesURL){
_local4 = urlOptions(_arg2).servicesURL;
};
_listenChannelName = (_listenChannelName + ((Math.floor(new Date().time) + "_") + Math.floor((Math.random() * 99999))));
MochiServices.allowDomains(_local4);
_clip = createEmptyMovieClip(_arg2, _local3, 10336, false);
loadLCBridge(_clip);
_loader = new Loader();
_loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, loadError);
var _local5:URLRequest = new URLRequest(_local4);
var _local6:URLVariables = new URLVariables();
_local6.listenLC = _listenChannelName;
_local6.mochiad_options = _arg2.loaderInfo.parameters.mochiad_options;
_local6.api_version = getVersion();
if (widget){
_local6.widget = true;
};
_local5.data = _local6;
_loader.load(_local5);
_clip.addChild(_loader);
_clip._mochiservices_com = _loader;
_sendChannel = new LocalConnection();
_clip._queue = [];
_clip._nextcallbackID = 0;
_clip._callbacks = {};
_timer = new Timer(10000, 1);
_timer.addEventListener(TimerEvent.TIMER, connectWait);
_timer.start();
return (_clip);
}
public static function connect(_arg1:String, _arg2:Object, _arg3:Object=null):void{
var id = _arg1;
var clip = _arg2;
var onError = _arg3;
warnID(id, false);
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 bringToTop(_arg1:Event=null):void{
var e = _arg1;
if (((!((MochiServices.clip == null))) && (!((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 connectWait(_arg1:TimerEvent):void{
if (!_connected){
_clip._mochiad_ctr_failed = true;
trace("MochiServices could not load. (timeout)");
MochiServices.disconnect();
MochiServices.onError("IOError");
};
}
}
}//package mochi
Section 16
//MochiSync (mochi.MochiSync)
package mochi {
import flash.utils.*;
public dynamic class MochiSync extends Proxy {
private var _syncContainer:Object;
public static var SYNC_PROPERTY:String = "UpdateProperty";
public static var SYNC_REQUEST:String = "SyncRequest";
public function MochiSync():void{
_syncContainer = {};
}
override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function setProperty(_arg1, _arg2):void{
if (_syncContainer[_arg1] == _arg2){
return;
};
var _local3:String = _arg1.toString();
_syncContainer[_local3] = _arg2;
MochiServices.send("sync_propUpdate", {name:_local3, value:_arg2});
}
override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function getProperty(_arg1){
return (_syncContainer[_arg1]);
}
public function triggerEvent(_arg1:String, _arg2:Object):void{
switch (_arg1){
case SYNC_REQUEST:
MochiServices.send("sync_syncronize", _syncContainer);
break;
case SYNC_PROPERTY:
_syncContainer[_arg2.name] = _arg2.value;
break;
};
}
}
}//package mochi
Section 17
//AllPilesRemoved (AllPilesRemoved)
package {
import flash.media.*;
public dynamic class AllPilesRemoved extends Sound {
}
}//package
Section 18
//BackGround (BackGround)
package {
import flash.display.*;
import flash.text.*;
public class BackGround extends MovieClip {
public var tfScore:TextField;
public var btPause:SimpleButton;
public var tfCardRun:TextField;
public var mcPointsEffect:MovieClip;
public var mcTimer:TimerClass;
public var lastRun:String;
public var mcSound:SoundButton;
public var lastScore:int;
public var tfRoundNumber:TextField;
public var tfPointsEffect:TextField;
public var _sbtTakePoints:SimpleButton;
public var castle_mc:MovieClip;
public function BackGround(){
score = 0;
mcTimer.onInitialize(Game.GAME);
mcTimer.setEndFunction(Game.GAME.timeOut);
var _local1:DisplayObjectContainer = (mcPointsEffect.getChildAt(0) as DisplayObjectContainer);
tfPointsEffect = (_local1.getChildAt(0) as TextField);
invisibleCastle();
}
public function returnScore():void{
tfScore.text = String(lastScore);
tfCardRun.text = lastRun;
tfPointsEffect.text = String((lastScore - score));
if (tfPointsEffect.text != "0"){
mcPointsEffect.gotoAndPlay(1);
};
}
public function invisibleCastle():void{
castle_mc.castle_left.visible = false;
castle_mc.castle_center.visible = false;
castle_mc.castle_right.visible = false;
_sbtTakePoints.visible = false;
}
public function addRunCount(_arg1:int):void{
var _local2:int;
if (_arg1 < 0){
_local2 = 0;
} else {
_local2 = (int(tfCardRun.text) + _arg1);
};
lastRun = tfCardRun.text;
tfCardRun.text = String(_local2);
}
public function get score():int{
return (int(tfScore.text));
}
public function set score(_arg1:int):void{
if (tfPointsEffect != null){
tfPointsEffect.text = String((_arg1 - score));
};
lastScore = int(tfScore.text);
tfScore.text = String(_arg1);
if (_arg1 != 0){
mcPointsEffect.gotoAndPlay(1);
};
}
}
}//package
Section 19
//btnMenu (btnMenu)
package {
import flash.display.*;
public class btnMenu extends SimpleButton {
public function btnMenu(_arg1:DisplayObject=null, _arg2:DisplayObject=null, _arg3:DisplayObject=null, _arg4:DisplayObject=null){
super(_arg1, _arg2, _arg3, _arg4);
}
}
}//package
Section 20
//btnUndo (btnUndo)
package {
import flash.display.*;
public class btnUndo extends SimpleButton {
public function btnUndo(_arg1:DisplayObject=null, _arg2:DisplayObject=null, _arg3:DisplayObject=null, _arg4:DisplayObject=null){
super(_arg1, _arg2, _arg3, _arg4);
}
}
}//package
Section 21
//ButtonClick (ButtonClick)
package {
import flash.media.*;
public dynamic class ButtonClick extends Sound {
}
}//package
Section 22
//c1 (c1)
package {
import flash.display.*;
public dynamic class c1 extends MovieClip {
public function c1(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 23
//c10 (c10)
package {
import flash.display.*;
public dynamic class c10 extends MovieClip {
public function c10(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 24
//c11 (c11)
package {
import flash.display.*;
public dynamic class c11 extends MovieClip {
}
}//package
Section 25
//c12 (c12)
package {
import flash.display.*;
public dynamic class c12 extends MovieClip {
}
}//package
Section 26
//c13 (c13)
package {
import flash.display.*;
public dynamic class c13 extends MovieClip {
}
}//package
Section 27
//c2 (c2)
package {
import flash.display.*;
public dynamic class c2 extends MovieClip {
public function c2(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 28
//c3 (c3)
package {
import flash.display.*;
public dynamic class c3 extends MovieClip {
public function c3(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 29
//c4 (c4)
package {
import flash.display.*;
public dynamic class c4 extends MovieClip {
public function c4(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 30
//c5 (c5)
package {
import flash.display.*;
public dynamic class c5 extends MovieClip {
public function c5(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 31
//c6 (c6)
package {
import flash.display.*;
public dynamic class c6 extends MovieClip {
public function c6(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 32
//c7 (c7)
package {
import flash.display.*;
public dynamic class c7 extends MovieClip {
public function c7(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 33
//c8 (c8)
package {
import flash.display.*;
public dynamic class c8 extends MovieClip {
public function c8(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 34
//c9 (c9)
package {
import flash.display.*;
public dynamic class c9 extends MovieClip {
public function c9(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 35
//Card (Card)
package {
import flash.display.*;
import flash.events.*;
import gs.*;
import flash.utils.*;
import flash.filters.*;
public class Card extends Sprite {
public var placementIndexOld:int;
public var placementOld:String;
public var posY:int;
public var posX:int;
public var posOldY:int;
public var posOldX:int;
public var active:Boolean;
public var numRunCnt:Number;
public var numFilter:Number;// = 0
public var topPyramid:Boolean;
public var depth:int;
public var isWildCard:Boolean;// = false
public var step:int;
public var colour:String;
public var _b:CardBack;
public var depthOld:int;
public var placement:String;
public var back:Boolean;
public var _c:DisplayObject;
public var value:int;// = 0
public static var cardHolder:CardHolder;
public function Card(_arg1:String){
var _local2:Class = (getDefinitionByName(_arg1) as Class);
_c = addChild(new (_local2));
_b = new CardBack();
this.addChild(_c);
this.addChild(_b);
_c["numFilter"] = 4;
name = _arg1;
buttonMode = true;
_b.mcBugless.addEventListener(MouseEvent.CLICK, releaseCard);
_b.mcBugless.addEventListener(MouseEvent.MOUSE_OVER, onMouseOver);
_b.mcBugless.addEventListener(MouseEvent.MOUSE_OUT, onMouseOut);
}
public function turnCard(_arg1:Boolean=true):void{
if (_arg1 == false){
_b.alpha = 1;
_c.alpha = 0;
back = true;
return;
};
if (back){
if ((((placement == "pyramid")) && ((cardHolder.disable == false)))){
SoundController.sndTurnCard.play();
};
_c.alpha = 1;
_b.alpha = 0;
} else {
_c.alpha = 0;
_b.alpha = 1;
};
back = !(back);
}
private function releaseCard(_arg1):void{
var _local2:int;
var _local3:int;
if (cardHolder.arrPyramid.length == 0){
return;
};
if (!active){
SoundController.sndUnAccessibleCard.play();
return;
};
if (isWildCard){
cardHolder.packingCard(this);
SoundController.sndWildCard.play();
};
if (((back) && ((placement == "drawpile")))){
turnCard();
Game.GAME._mcBG.addRunCount(-1);
cardHolder.packingCard(this);
cardHolder.arrDraw.splice((cardHolder.arrDraw.length - 1), 1);
if (cardHolder.arrDraw.length > 0){
cardHolder.arrDraw[(cardHolder.arrDraw.length - 1)].active = true;
};
numRunCnt = 0;
SoundController.sndCardClick.play();
} else {
if (((!(back)) && ((placement == "pyramid")))){
if (cardHolder.checkValid(this, cardHolder.arrPack[(cardHolder.arrPack.length - 1)])){
numRunCnt++;
if (topPyramid){
};
SoundController.sndCardClick.play();
cardHolder.packingCard(this);
Game.GAME._mcBG.addRunCount(1);
_local2 = (cardHolder.arrPyramid.length - 1);
while (_local2 >= 0) {
if (this == cardHolder.arrPyramid[_local2]){
cardHolder.arrPyramid.splice(_local2, 1);
this.placementIndexOld = _local2;
break;
};
_local2--;
};
_local3 = (int(Game.GAME._mcBG.tfCardRun.text) * 200);
if (topPyramid){
_local3 = (_local3 + 10000);
if (this.x < 230){
Game.GAME._mcBG.castle_mc.castle_left.visible = true;
Game.GAME._mcBG.castle_mc.castle_left.gotoAndPlay(2);
SoundController.sndAllPilesRemoved.play();
if (cardHolder.arrPyramid.length == 0){
cardHolder.mcToCheckAnimation = Game.GAME._mcBG.castle_mc.castle_left;
};
} else {
if (this.x > 400){
Game.GAME._mcBG.castle_mc.castle_right.visible = true;
Game.GAME._mcBG.castle_mc.castle_right.gotoAndPlay(2);
SoundController.sndAllPilesRemoved.play();
if (cardHolder.arrPyramid.length == 0){
cardHolder.mcToCheckAnimation = Game.GAME._mcBG.castle_mc.castle_right;
};
} else {
Game.GAME._mcBG.castle_mc.castle_center.visible = true;
Game.GAME._mcBG.castle_mc.castle_center.gotoAndPlay(2);
SoundController.sndAllPilesRemoved.play();
if (cardHolder.arrPyramid.length == 0){
cardHolder.mcToCheckAnimation = Game.GAME._mcBG.castle_mc.castle_center;
};
};
};
if (cardHolder.arrPyramid.length == 0){
Game.GAME._mcTimer.stopTimer();
};
};
Game.GAME._mcBG.score = (Game.GAME._mcBG.score + _local3);
cardHolder.checkActiveCards();
};
};
};
}
public function get _width():Number{
return (_c.width);
}
public function removeMe():void{
}
public function get _height():Number{
return (_c.height);
}
private function onUpdateTween():void{
if (active == false){
return;
};
this.filters = [new GlowFilter((0xCC00 * int(active)), _c["numFilter"], 6, 6, (int(active) + 1))];
}
private function onReachedPlace():void{
cardHolder.checkNextStep();
this.filters = [];
}
private function onReturned():void{
this.depth = this.depthOld;
if (!isWildCard){
cardHolder.mcCardHolder.setChildIndex(this, this.depth);
};
cardHolder.checkActiveCards();
if (this.placement == "drawpile"){
turnCard();
};
}
private function onMouseOut(_arg1:MouseEvent):void{
if (active == false){
return;
};
if (((!(cardHolder.checkValid(this, cardHolder.arrPack[(cardHolder.arrPack.length - 1)]))) && (!((placement == "drawpile"))))){
return;
};
TweenLite.to(_c, 0.3, {numFilter:0, onUpdate:onUpdateTween});
}
public function gotoStack():void{
TweenLite.to(this, 0.3, {x:CardHolder.numDrawX, y:CardHolder.numDrawY, onComplete:onReachedPlace});
}
public function goBack():void{
TweenLite.to(this, 0.3, {x:this.posX, y:this.posY, onComplete:onReturned});
}
private function onMouseOver(_arg1:MouseEvent):void{
if (active == false){
return;
};
if (((!(cardHolder.checkValid(this, cardHolder.arrPack[(cardHolder.arrPack.length - 1)]))) && (!((placement == "drawpile"))))){
return;
};
TweenLite.to(_c, 0.15, {numFilter:1, onUpdate:onUpdateTween});
}
}
}//package
Section 36
//CardBack (CardBack)
package {
import flash.display.*;
public class CardBack extends MovieClip {
public var mcBugless:Sprite;
}
}//package
Section 37
//CardClick (CardClick)
package {
import flash.media.*;
public dynamic class CardClick extends Sound {
}
}//package
Section 38
//CardHolder (CardHolder)
package {
import flash.display.*;
import flash.events.*;
import gs.*;
import flash.utils.*;
public class CardHolder {
public var arrCards:Array;
private var numPyramidXShift:Number;
private var lastDroped:Number;// = 0
public var arrSuit:Array;
public var mcCardHolder:Sprite;
private var numPyramidYShift:Number;
private var numDrawOpenShift:Number;// = 0
public var arrPack:Array;
private var numPyramidX:Number;
public var arrPyramid:Array;
private var numCardWidth:int;// = 60
private var numPyramidY:Number;
public var arrDraw:Array;
private var lastCard:Card;
public var arrMove:Array;
public var disable:Boolean;// = true
public var mcToCheckAnimation:MovieClip;
private var _Game:Game;
private var numDrawCloseShift:Number;// = 12
public var wildCard:Card;
private var numCardHeight:int;// = 85
public static var numDrawX:int = 400;
public static var numDrawY:int = 370;
public function CardHolder(_arg1:Sprite, _arg2:Game){
arrSuit = new Array("c", "d", "h", "s");
arrDraw = new Array();
arrCards = new Array();
arrPack = new Array();
arrPyramid = new Array();
arrMove = new Array();
numPyramidX = (5 + (numCardWidth / 2));
numPyramidY = (25 + (numCardHeight / 2));
numPyramidXShift = (numCardWidth - 2);
numPyramidYShift = (numCardHeight / 2);
super();
_Game = _arg2;
mcToCheckAnimation = null;
mcCardHolder = _arg1;
Card.cardHolder = this;
numPyramidX = (11 + (numCardWidth / 2));
numPyramidY = (105 + (numCardHeight / 2));
numPyramidXShift = (numCardWidth + 2);
numPyramidYShift = ((numCardHeight / 2) + 1);
createDeck();
shuffleDeck();
arrangeCards();
spreadCard();
}
public function checkNextStep():void{
if (arrDraw.length == 0){
_Game._mcBG._sbtTakePoints.visible = true;
_Game.showNextCardMC(false);
};
if (arrPyramid.length > 0){
return;
};
if (arrPyramid.length == 0){
_Game.enableUndo(false);
_Game.enableMenu(false);
mcToCheckAnimation.addEventListener(Event.ENTER_FRAME, checkCastleAnimation);
return;
};
}
private function delayShowNextPanel():void{
_Game.showNewRoundPanel();
}
private function moveDrawPile(_arg1:int):void{
var _local2:int;
while (_local2 < arrDraw.length) {
arrDraw[_local2].x = (arrDraw[_local2].x + (12 * _arg1));
_local2++;
};
}
private function arrangeCards():void{
var _local6:Card;
var _local7:int;
var _local8:Card;
disable = true;
var _local1:int;
while (_local1 < 23) {
_local6 = arrCards[_local1];
_local6.posX = (((numDrawX - 10) - numCardWidth) - ((23 - _local1) * numDrawCloseShift));
_local6.posY = numDrawY;
_local6.placement = "drawpile";
_local6.x = _local6.posX;
_local6.y = _local6.posY;
arrDraw[_local1] = arrCards[_local1];
_local1++;
};
arrDraw[22].active = true;
arrCards[23].active = true;
arrCards[23].posX = numDrawX;
arrCards[23].posY = numDrawY;
arrCards[23].placement = "pack";
arrCards[23].turnCard();
arrCards[23].x = arrCards[23].posX;
arrCards[23].y = arrCards[23].posY;
arrCards[23].depth = 100;
arrPack[0] = arrCards[23];
var _local2 = 24;
var _local3:int;
var _local4:int;
var _local5:int;
while (_local5 < 4) {
_local3 = (numPyramidX + (((3 - _local5) * numPyramidXShift) / 2));
_local7 = 0;
while (_local7 < ((_local5 * 3) + 3)) {
_local8 = arrCards[_local2];
_local8.posX = ((_local7)==0) ? _local3 : (arrCards[(_local2 - 1)].posX + numPyramidXShift);
if (_local5 == 0){
arrCards[_local2].posX = (arrCards[_local2].posX + ((_local7)>0) ? (2 * numPyramidXShift) : 0);
arrCards[_local2].topPyramid = true;
} else {
if (_local5 == 1){
arrCards[_local2].posX = (arrCards[_local2].posX + ((((_local7 > 0)) && (((_local7 % 2) == 0)))) ? numPyramidXShift : 0);
};
};
arrCards[_local2].posY = ((_local7)==0) ? (numPyramidY + Math.round((_local5 * numPyramidYShift))) : arrCards[(_local2 - 1)].posY;
arrCards[_local2].placement = "pyramid";
if (_local5 == 3){
arrCards[_local2].turnCard();
arrCards[_local2].active = true;
};
arrCards[_local2].x = arrCards[_local2].posX;
arrCards[_local2].y = arrCards[_local2].posY;
arrPyramid[_local4] = arrCards[_local2];
_local4++;
var _temp1 = _local2;
_local2 = (_local2 + 1);
if (_temp1 >= (arrCards.length - 1)){
break;
};
_local7++;
};
_local5++;
};
}
public function playAgain():void{
Game.isPlayAgain = true;
mcCardHolder.removeEventListener(Event.ENTER_FRAME, dropCard);
lastCard = null;
_Game.enableUndo(false);
_Game.enableMenu(false);
arrPack.splice(0);
arrPack = new Array();
mcToCheckAnimation = null;
createDeck();
wildCard.x = 1000;
var _local1:int;
while (_local1 < arrCards.length) {
arrCards[_local1].turnCard(false);
arrCards[_local1]._c["numFilter"] = 4;
arrCards[_local1].numFilter = 0;
arrCards[_local1].depth = _local1;
_local1++;
};
shuffleDeck();
arrangeCards();
spreadCard();
}
private function dropCard(_arg1):void{
if (lastDroped == Math.floor(lastDroped)){
arrCards[lastDroped].visible = true;
mcCardHolder.setChildIndex(arrCards[lastDroped], lastDroped);
if (lastDroped < 51){
TweenLite.from(arrCards[lastDroped], 0.4, {rotation:(Math.random() * 360), x:-100, y:-100});
} else {
TweenLite.from(arrCards[lastDroped], 0.4, {rotation:(Math.random() * 360), x:-100, y:-100, onComplete:activateAllElements});
};
};
lastDroped = (lastDroped + 1);
if (lastDroped >= 52){
mcCardHolder.removeEventListener(Event.ENTER_FRAME, dropCard);
addWildCard();
};
}
private function spreadCard():void{
mcCardHolder.addEventListener(Event.ENTER_FRAME, dropCard);
SoundController.sndNewDeal.play();
disable = true;
trace("set disable");
}
private function addWildCard():void{
if (!Game.isPlayAgain){
wildCard = new Card("WildCard");
};
wildCard.isWildCard = true;
mcCardHolder.addChild(wildCard);
wildCard.value = 0;
wildCard.active = true;
wildCard.topPyramid = false;
wildCard.depth = 0;
wildCard.placement = "pack";
wildCard.x = 600;
wildCard.y = numDrawY;
wildCard.step = 0;
wildCard.back = false;
wildCard._b.alpha = 0;
}
public function removeCards():void{
trace(arrCards.length);
var _local1:int;
while (_local1 < arrCards.length) {
arrCards[_local1].x = -200;
_local1++;
};
}
private function shuffleDeck():void{
var _local1:Card;
var _local2:int;
Utils.numRandomSeed = Math.floor((Math.random() * 200));
var _local3:int;
while (_local3 < arrCards.length) {
_local1 = arrCards[_local3];
_local2 = Utils.getRandomValue(arrCards.length);
arrCards[_local3] = arrCards[_local2];
arrCards[_local2] = _local1;
arrCards[_local3].depth = _local3;
mcCardHolder.swapChildren(arrCards[_local3], arrCards[_local2]);
arrCards[_local2].depth = _local2;
_local3++;
};
}
private function checkCastleAnimation(_arg1:Event):void{
if (mcToCheckAnimation.currentFrame == mcToCheckAnimation.totalFrames){
mcToCheckAnimation.removeEventListener(Event.ENTER_FRAME, checkCastleAnimation);
setTimeout(delayShowNextPanel, 1000);
};
}
private function activateAllElements():void{
_Game._mcTimer.startNewCountDown(_Game._nRoundTime);
_Game.enableMenu(true);
_Game.showNextCardMC(true);
disable = false;
}
private function createDeck():void{
var _local4:int;
var _local5:Card;
var _local1:int;
var _local2 = "";
lastDroped = 0;
var _local3 = 1;
while (_local3 <= 13) {
_local4 = 0;
while (_local4 < arrSuit.length) {
_local2 = (arrSuit[_local4] + _local3);
if (!Game.isPlayAgain){
_local5 = new Card(_local2);
mcCardHolder.addChild(_local5);
arrCards[_local1] = _local5;
} else {
_local5 = (arrCards[_local1] as Card);
};
_local5.colour = ((((arrSuit[_local4] == "d")) || ((arrSuit[_local4] == "h")))) ? "red" : "black";
if (!Game.isPlayAgain){
_local5.value = _local3;
};
_local5.active = false;
_local5.topPyramid = false;
_local5.depth = 0;
_local5.placement = "pack";
_local5.x = numDrawX;
_local5.y = numDrawY;
_local5.posX = numDrawX;
_local5.posY = numDrawY;
_local5.step = 0;
_local5.back = true;
_local5.visible = false;
_local1++;
_local4++;
};
_local3++;
};
}
public function checkActiveCards(_arg1:MovieClip=null):void{
var _local2:Boolean;
var _local4:int;
var _local3:int = (arrPyramid.length - 1);
while (_local3 >= 0) {
_local2 = false;
_local4 = (arrPyramid.length - 1);
while (_local4 >= 0) {
if (((!((_local3 == _local4))) && (arrPyramid[_local3]._b.mcBugless.hitTestObject(arrPyramid[_local4]._b.mcBugless)))){
if ((((arrPyramid[_local4].depth > arrPyramid[_local3].depth)) && ((arrPyramid[_local4].depth < 100)))){
_local2 = true;
break;
};
};
_local4--;
};
if (((!(_local2)) && (!(arrPyramid[_local3].active)))){
arrPyramid[_local3].active = true;
arrPyramid[_local3].turnCard();
} else {
if (((_local2) && (arrPyramid[_local3].active))){
arrPyramid[_local3].active = false;
arrPyramid[_local3].turnCard();
};
};
_local3--;
};
}
public function packingCard(_arg1:Card):void{
if (arrPyramid.length == 0){
_Game.enableUndo(false);
_Game.enableMenu(false);
return;
};
lastCard = _arg1;
lastCard.posOldX = _arg1.x;
lastCard.posOldY = _arg1.y;
lastCard.placementOld = _arg1.placement;
lastCard.depthOld = _arg1.depth;
_arg1.posY = numDrawY;
_arg1.posX = (numDrawX - (arrPack.length * numDrawOpenShift));
arrPack[(arrPack.length - 1)].active = false;
arrPack.push(_arg1);
if (_arg1.placement == "drawpile"){
moveDrawPile(1);
};
_arg1.placement = "pack";
var _local2:int;
while (_local2 < (arrPack.length - 3)) {
arrPack[_local2].y = 1000;
_local2++;
};
arrPack[(arrPack.length - 1)].depth = (arrPack[(arrPack.length - 2)].depth + 1);
mcCardHolder.setChildIndex(arrPack[(arrPack.length - 1)], (mcCardHolder.numChildren - 1));
arrMove.push(_arg1);
_arg1.gotoStack();
_Game.enableUndo(true);
}
public function checkValid(_arg1:Card, _arg2:Card):Boolean{
if (((_arg1.isWildCard) || (_arg2.isWildCard))){
return (true);
};
if ((((Math.abs((_arg1.value - _arg2.value)) == 1)) || ((Math.abs((_arg1.value - _arg2.value)) == 12)))){
return (true);
};
return (false);
}
public function returningCard():void{
lastCard.posY = lastCard.posOldY;
lastCard.posX = (lastCard.posOldX - (arrPack.length * numDrawOpenShift));
arrPack.pop();
if (lastCard.placementOld == "drawpile"){
moveDrawPile(-1);
if (arrDraw.length > 0){
arrDraw[(arrDraw.length - 1)].active = false;
};
arrDraw.push(lastCard);
arrDraw[(arrDraw.length - 1)].active = true;
if (arrDraw.length == 1){
_Game._mcBG._sbtTakePoints.visible = false;
_Game.showNextCardMC(true);
};
};
if (lastCard.placementOld == "pyramid"){
arrPyramid.splice(lastCard.placementIndexOld, 0, lastCard);
};
lastCard.placement = lastCard.placementOld;
arrMove.push(lastCard);
if (!lastCard.isWildCard){
_Game._mcBG.returnScore();
};
lastCard.goBack();
_Game.enableUndo(false);
}
}
}//package
Section 39
//d1 (d1)
package {
import flash.display.*;
public dynamic class d1 extends MovieClip {
public function d1(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 40
//d10 (d10)
package {
import flash.display.*;
public dynamic class d10 extends MovieClip {
public function d10(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 41
//d11 (d11)
package {
import flash.display.*;
public dynamic class d11 extends MovieClip {
}
}//package
Section 42
//d12 (d12)
package {
import flash.display.*;
public dynamic class d12 extends MovieClip {
public function d12(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 43
//d13 (d13)
package {
import flash.display.*;
public dynamic class d13 extends MovieClip {
public function d13(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 44
//d2 (d2)
package {
import flash.display.*;
public dynamic class d2 extends MovieClip {
public function d2(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 45
//d3 (d3)
package {
import flash.display.*;
public dynamic class d3 extends MovieClip {
public function d3(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 46
//d4 (d4)
package {
import flash.display.*;
public dynamic class d4 extends MovieClip {
public function d4(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 47
//d5 (d5)
package {
import flash.display.*;
public dynamic class d5 extends MovieClip {
public function d5(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 48
//d6 (d6)
package {
import flash.display.*;
public dynamic class d6 extends MovieClip {
public function d6(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 49
//d7 (d7)
package {
import flash.display.*;
public dynamic class d7 extends MovieClip {
public function d7(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 50
//d8 (d8)
package {
import flash.display.*;
public dynamic class d8 extends MovieClip {
public function d8(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 51
//d9 (d9)
package {
import flash.display.*;
public dynamic class d9 extends MovieClip {
public function d9(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 52
//Game (Game)
package {
import flash.display.*;
import flash.events.*;
import mochi.*;
public class Game {
private var _nTimerPause:Number;// = 0
public var _nRoundNumber:int;
private var _cardHolder:CardHolder;
public var _mcTimer:TimerClass;
private var _mcNextPanel:NextRoundPanel;
private var _bGameInPause:Boolean;
private var _mcCardContainer:Sprite;
private var _mcMenu:Menu;
public var _mcBG:BackGround;
private var _root:MovieClip;
public var _nRoundTime:Number;// = 120
public var _nFullTimeBonus:int;// = 20000
private var _mcOverPanel:GameOverPanel;
private var _nRoundScore:Number;
public var _btUndo:btnUndo;
public var _btMenu:btnMenu;
private var _mcNextCard:nextCard_mc;
private var _mcInstructions:instructions;
public static var GAME;
public static var isPlayAgain:Boolean = false;
public function Game(_arg1:MovieClip){
GAME = this;
_root = _arg1;
_btUndo = new btnUndo();
_btUndo.x = 452;
_btUndo.y = 355;
_root.addChild(_btUndo);
enableUndo(false);
_btMenu = new btnMenu();
_btMenu.x = 5;
_btMenu.y = 5;
_root.addChild(_btMenu);
enableMenu(false);
_mcCardContainer = new Sprite();
_root.addChild(_mcCardContainer);
_mcBG = new BackGround();
_root.addChildAt(_mcBG, 0);
_mcBG._sbtTakePoints.addEventListener(MouseEvent.CLICK, showGameOverPanel);
_mcTimer = _mcBG.mcTimer;
_mcNextCard = new nextCard_mc();
_mcNextCard.x = 292;
_mcNextCard.y = 340;
_mcNextCard.alpha = 0.8;
_mcNextCard.mouseChildren = false;
_mcNextCard.mouseEnabled = false;
_mcNextCard.visible = false;
_root.addChild(_mcNextCard);
_bGameInPause = false;
if (!_root.showInstr){
startGame();
} else {
showInstructions(1);
};
}
public function mochiSent(_arg1):void{
_mcOverPanel._smcHigh.txtSent.text = "Online score submitted";
_mcOverPanel._smcHigh._sbtOnlineSend.visible = false;
_mcOverPanel._smcHigh._sbtOnlineSend.removeEventListener(MouseEvent.CLICK, sendHighScore);
}
public function enableMenu(_arg1:Boolean):void{
if (_arg1){
if (_btMenu.enabled){
return;
};
_btMenu.addEventListener(MouseEvent.CLICK, onMenuClicked);
_btMenu.enabled = true;
} else {
_btMenu.removeEventListener(MouseEvent.CLICK, onMenuClicked);
_btMenu.enabled = false;
};
}
public function playAgain():void{
_mcBG.score = 0;
_mcBG.lastScore = 0;
_mcBG.lastRun = "0";
_mcBG.tfCardRun.text = "0";
_cardHolder.playAgain();
_bGameInPause = false;
_nRoundNumber = 1;
_mcBG.tfRoundNumber.text = _nRoundNumber.toString();
_mcTimer.setTime(0);
_mcBG.invisibleCastle();
}
public function enableUndo(_arg1:Boolean):void{
if (_arg1){
if (_btUndo.enabled){
return;
};
_btUndo.enabled = true;
_btUndo.addEventListener(MouseEvent.CLICK, onUndoClicked);
_btUndo.alpha = 1;
} else {
_btUndo.enabled = false;
_btUndo.removeEventListener(MouseEvent.CLICK, onUndoClicked);
_btUndo.alpha = 0.7;
};
}
private function pauseGame(_arg1:Boolean):void{
if (_arg1){
_bGameInPause = true;
_nTimerPause = _mcTimer.getTime();
_mcTimer.stopTimer();
} else {
_bGameInPause = false;
_mcTimer.startNewCountDown(_nTimerPause);
};
}
private function showHighScore(_arg1:MouseEvent):void{
SoundController.sndButtonClick.play();
sendMochiLeaderBoard();
HighScorePanel.saveNewUser(_mcOverPanel.tfName.text, _mcBG.score);
_mcOverPanel._smcHigh.init("over");
_mcOverPanel._smcHigh.visible = true;
_mcOverPanel._smcHigh._sbtOnlineSend.visible = true;
_mcOverPanel._smcHigh._sbtOnlineSend.addEventListener(MouseEvent.CLICK, sendHighScore);
_mcOverPanel._smcHigh._sbtBack.addEventListener(MouseEvent.CLICK, showStartPanelFromEnd);
_mcOverPanel._sbtOK.removeEventListener(MouseEvent.CLICK, showHighScore);
_mcOverPanel._sbtOK.enabled = false;
}
private function sendHighScore(_arg1:MouseEvent):void{
SoundController.sndButtonClick.play();
MochiScores.showLeaderboard({boardID:"1eae4923c2771491", score:_mcBG.score, name:_mcOverPanel.tfName.text, onClose:mochiSent});
}
private function playAgainFromInstructions(_arg1:MouseEvent):void{
_root.removeChild(_mcInstructions);
playAgain();
}
public function allSoundsLoaded(_arg1){
}
public function playAgainFromMain():void{
_mcBG.mcSound.initBtn();
_cardHolder.removeCards();
if (!_root.showInstr){
playAgain();
} else {
showInstructions(2);
};
}
public function showStartPanelFromEnd(_arg1:MouseEvent=null):void{
SoundController.sndButtonClick.play();
if (_mcOverPanel){
_root.removeChild(_mcOverPanel);
};
_root.showStartPanel();
}
private function showInstructions(_arg1:int):void{
_mcInstructions = new instructions();
if (_arg1 == 1){
_mcInstructions._sbtOk.addEventListener(MouseEvent.CLICK, startFromInstructions);
} else {
_mcInstructions._sbtOk.addEventListener(MouseEvent.CLICK, playAgainFromInstructions);
};
_root.addChild(_mcInstructions);
}
private function onUndoClicked(_arg1:MouseEvent):void{
SoundController.sndButtonClick.play();
_cardHolder.returningCard();
}
public function showGameOverPanel(_arg1:MouseEvent=null):void{
if (_cardHolder.arrPyramid.length == 0){
return;
};
_mcOverPanel = new GameOverPanel();
_mcOverPanel.noHigh.visible = false;
_mcOverPanel.tfName.text = HighScorePanel.showLastTypedName();
_mcOverPanel._stxScore.text = _mcBG.score.toString();
trace(_root.getMinScore(), _mcBG.score);
if (_root.getMinScore() > _mcBG.score){
_mcOverPanel.noHigh.visible = true;
_mcOverPanel.noHigh._stxScore.text = _mcBG.score.toString();
_mcOverPanel.noHigh._sbtMainMenu.addEventListener(MouseEvent.CLICK, showStartPanelFromEnd);
} else {
_mcOverPanel._sbtOK.addEventListener(MouseEvent.CLICK, showHighScore);
_mcOverPanel._sbtMainMenu.addEventListener(MouseEvent.CLICK, showStartPanelFromEnd);
};
_root.addChild(_mcOverPanel);
SoundController.sndGameOver.play();
SoundController.sndButtonClick.play();
_mcTimer.stopTimer();
showNextCardMC(false);
}
public function functionsFor4Frame():void{
_root.removeChild(_mcOverPanel);
_root.showStartPanel();
}
public function startNewRound(_arg1:MouseEvent):void{
SoundController.sndButtonClick.play();
_mcNextPanel._sbtNextRound.removeEventListener(MouseEvent.CLICK, startNewRound);
_root.removeChild(_mcNextPanel);
_cardHolder.playAgain();
_nRoundNumber++;
_mcBG.tfRoundNumber.text = _nRoundNumber.toString();
_mcTimer.setTime(0);
_mcBG.invisibleCastle();
}
public function showNextCardMC(_arg1:Boolean):void{
_mcNextCard.visible = _arg1;
}
public function showNewRoundPanel():void{
_mcNextPanel = new NextRoundPanel();
_mcNextPanel._sbtNextRound.addEventListener(MouseEvent.CLICK, startNewRound);
var _local1:Number = (_cardHolder.arrDraw.length * 1000);
var _local2:Number = (_nRoundNumber * 1000);
var _local3:Number = (_cardHolder.wildCard.active) ? 5000 : 0;
_nRoundScore = (((_mcTimer._nBonusLeft + _local1) + _local2) + _local3);
_mcBG.score = (_mcBG.score + _nRoundScore);
_mcNextPanel._stxTimeBonus.text = _mcTimer._nBonusLeft.toString();
_mcNextPanel._stxDeckBonus.text = _local1.toString();
_mcNextPanel._stxRoundBonus.text = _local2.toString();
_mcNextPanel._stxWildBonus.text = _local3.toString();
_mcNextPanel._stxScore.text = _mcBG.score.toString();
_mcNextPanel.showBonuses();
_root.addChild(_mcNextPanel);
_mcTimer.stopTimer();
showNextCardMC(false);
}
private function sendMochiLeaderBoard():void{
MochiScores.submit(_mcBG.score, _mcOverPanel.tfName.text, this, mochiSent);
}
public function showStartPanelFromMenu(_arg1:MouseEvent=null):void{
SoundController.sndButtonClick.play();
if (_mcMenu){
_root.removeChild(_mcMenu);
};
showNextCardMC(false);
_root.showStartPanel();
}
public function onMenuClicked(_arg1:MouseEvent=null):void{
pauseGame(!(_bGameInPause));
SoundController.sndButtonClick.play();
if (_bGameInPause){
_mcMenu = new Menu();
_mcMenu.init(this);
_root.addChild(_mcMenu);
} else {
_root.removeChild(_mcMenu);
};
}
public function timeOut():void{
}
private function startFromInstructions(_arg1:MouseEvent):void{
_root.removeChild(_mcInstructions);
startGame();
}
public function startGame():void{
_cardHolder = new CardHolder(_mcCardContainer, this);
_nRoundNumber = 1;
_mcBG.tfRoundNumber.text = _nRoundNumber.toString();
}
}
}//package
Section 53
//GameOver (GameOver)
package {
import flash.media.*;
public dynamic class GameOver extends Sound {
}
}//package
Section 54
//GameOverPanel (GameOverPanel)
package {
import flash.display.*;
import flash.text.*;
public class GameOverPanel extends MovieClip {
public var _stxScore:TextField;
public var _sbtOK:SimpleButton;
public var noHigh:MovieClip;
public var _smcHigh:HighScorePanel;
public var tfName:TextField;
public var _sbtMainMenu:SimpleButton;
public function setMinScore(_arg1:Number):void{
}
}
}//package
Section 55
//h1 (h1)
package {
import flash.display.*;
public dynamic class h1 extends MovieClip {
public function h1(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 56
//h10 (h10)
package {
import flash.display.*;
public dynamic class h10 extends MovieClip {
public function h10(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 57
//h11 (h11)
package {
import flash.display.*;
public dynamic class h11 extends MovieClip {
}
}//package
Section 58
//h12 (h12)
package {
import flash.display.*;
public dynamic class h12 extends MovieClip {
public function h12(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 59
//h13 (h13)
package {
import flash.display.*;
public dynamic class h13 extends MovieClip {
public function h13(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 60
//h2 (h2)
package {
import flash.display.*;
public dynamic class h2 extends MovieClip {
public function h2(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 61
//h3 (h3)
package {
import flash.display.*;
public dynamic class h3 extends MovieClip {
public function h3(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 62
//h4 (h4)
package {
import flash.display.*;
public dynamic class h4 extends MovieClip {
public function h4(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 63
//h5 (h5)
package {
import flash.display.*;
public dynamic class h5 extends MovieClip {
public function h5(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 64
//h6 (h6)
package {
import flash.display.*;
public dynamic class h6 extends MovieClip {
public function h6(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 65
//h7 (h7)
package {
import flash.display.*;
public dynamic class h7 extends MovieClip {
public function h7(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 66
//h8 (h8)
package {
import flash.display.*;
public dynamic class h8 extends MovieClip {
public function h8(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 67
//h9 (h9)
package {
import flash.display.*;
public dynamic class h9 extends MovieClip {
public function h9(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 68
//HighScorePanel (HighScorePanel)
package {
import flash.display.*;
import flash.events.*;
import mochi.*;
import flash.text.*;
import flash.net.*;
public class HighScorePanel extends Sprite {
public var txtSent:TextField;
public var txtS4:TextField;
public var txtS6:TextField;
public var txtS7:TextField;
public var txtS1:TextField;
public var txtS2:TextField;
public var txtS3:TextField;
public var txtS5:TextField;
public var txtS8:TextField;
public var txtS9:TextField;
public var _sbtOnline:SimpleButton;
public var txtS10:TextField;
public var _sbtBack:SimpleButton;
public var txtP1:TextField;
public var txtP2:TextField;
public var txtP3:TextField;
public var txtP4:TextField;
public var txtP5:TextField;
public var txtP6:TextField;
public var txtP7:TextField;
public var txtP8:TextField;
public var txtP9:TextField;
public var _sbtOnlineSend:SimpleButton;
public var txtP10:TextField;
private static var _soData:SharedObject;
private static var _soLastScoreData:SharedObject;
public function HighScorePanel(){
visible = false;
_sbtOnlineSend.visible = false;
}
private function onCloseOnline():void{
}
public function init(_arg1:String):void{
if (_arg1 == "start"){
_sbtBack.addEventListener(MouseEvent.CLICK, onCloseHigh);
};
_sbtOnline.addEventListener(MouseEvent.CLICK, onShowOnline);
readSO(_arg1);
}
private function onCloseHigh(_arg1:MouseEvent):void{
SoundController.sndButtonClick.play();
visible = false;
}
private function setTFcolors():void{
var _local2:TextField;
var _local3:TextField;
var _local1 = 1;
while (_local1 <= 10) {
_local2 = this[("txtP" + _local1)];
_local3 = this[("txtS" + _local1)];
if (((((!((_local1 == 1))) && (!((_local1 == 4))))) && (!((_local1 == 8))))){
_local2.textColor = 14027274;
_local3.textColor = 14027274;
} else {
_local2.textColor = 710154;
_local3.textColor = 710154;
};
_local1++;
};
}
private function onShowOnline(_arg1:MouseEvent):void{
SoundController.sndButtonClick.play();
MochiScores.showLeaderboard({boardID:"3c1e4891a3cb430b", onClose:onCloseOnline});
}
public function readSO(_arg1:String):void{
var _local3:String;
var _local4:int;
var _local8:Object;
var _local9:TextField;
var _local10:TextField;
_soData = SharedObject.getLocal("LocalScoreData");
_soLastScoreData = SharedObject.getLocal("LastScoreData");
var _local2:Array = new Array();
for (_local3 in _soData.data) {
_local8 = {n:_local3, s:_soData.data[_local3]};
if (_local3.indexOf("^") != -1){
_local8.n = _local3.substr(0, _local3.indexOf("^"));
};
_local2.push(_local8);
trace([_local8.n, _local8.s]);
};
_local2.sortOn("s", Array.NUMERIC);
_local2.reverse();
_local4 = ((_local2.length)<10) ? _local2.length : 10;
var _local5:int;
while (_local5 < _local4) {
_local9 = this[("txtP" + int((_local5 + 1)))];
_local10 = this[("txtS" + int((_local5 + 1)))];
_local9.text = _local2[_local5].n;
_local10.text = _local2[_local5].s;
_local5++;
};
var _local6:* = parent;
var _local7:* = ((_local2.length)<10) ? 0 : _local2[9].s;
_local6.setMinScore(Number(_local7));
if (_arg1 != "over"){
return;
};
if (_soLastScoreData.data.nLastUser != undefined){
_local5 = 0;
while (_local5 < _local4) {
_local9 = this[("txtP" + int((_local5 + 1)))];
_local10 = this[("txtS" + int((_local5 + 1)))];
if ((((_local9.text == _soLastScoreData.data["nLastUser"])) && ((_local10.text == _soLastScoreData.data["nLastScore"])))){
_local9 = this[("txtP" + int((_local5 + 1)))];
_local10 = this[("txtS" + int((_local5 + 1)))];
_local9.textColor = 658134;
_local10.textColor = 658134;
};
_local5++;
};
};
}
public static function showLastTypedName():String{
var _local1:String = (_soLastScoreData.data["nLastUser"]) ? _soLastScoreData.data["nLastUser"] : "Player";
return (_local1);
}
public static function saveNewUser(_arg1:String, _arg2:Number):void{
if (_arg2 == 0){
return;
};
var _local3:Number = Math.random();
if (_soData.data[((_arg1 + "^") + _local3)] == undefined){
_soData.data[((_arg1 + "^") + _local3)] = _arg2;
};
if (_soData.data[((_arg1 + "^") + _local3)] < _arg2){
_soData.data[((_arg1 + "^") + _local3)] = _arg2;
};
_soLastScoreData.data["nLastUser"] = _arg1;
_soLastScoreData.data["nLastScore"] = _arg2;
_soData.flush();
_soLastScoreData.flush();
}
}
}//package
Section 69
//instructions (instructions)
package {
import flash.display.*;
public dynamic class instructions extends MovieClip {
public var _sbtOk:SimpleButton;
}
}//package
Section 70
//Main (Main)
package {
import flash.display.*;
import flash.events.*;
import mochi.*;
import flash.text.*;
public dynamic class Main extends MovieClip {
private var startPanel:StartPanel;
public var percent:TextField;
private var shield:MovieClip;
public var soundController:SoundController;
public var showInstr:Boolean;
private var game:Game;
public var minScoreToGet:Number;
public function Main():void{
stop();
init();
}
public function setMinScore(_arg1:Number):void{
minScoreToGet = _arg1;
trace(("setMinScore " + minScoreToGet));
}
public function getMinScore():Number{
trace(minScoreToGet);
return (minScoreToGet);
}
private function init(_arg1:Event=null):void{
addEventListener(Event.ENTER_FRAME, onEnterFrame);
soundController = new SoundController();
MochiServices.connect("221126791903b70a", root);
MochiBot.track(this, "c1fea029");
MochiScores.setBoardID("3c1e4891a3cb430b");
}
public function initGame(_arg1:Boolean):void{
removeChild(startPanel);
showInstr = _arg1;
if (!game){
game = new Game(this);
} else {
game.playAgainFromMain();
};
}
private function onEnterFrame(_arg1:Event){
var _local2:Number = ((loaderInfo.bytesLoaded / loaderInfo.bytesTotal) * 100);
percent.text = (Math.round(_local2).toString() + "%");
if (framesLoaded == totalFrames){
removeEventListener(Event.ENTER_FRAME, onEnterFrame);
play();
addEventListener(Event.ENTER_FRAME, EFlistener);
};
}
private function EFlistener(_arg1:Event):void{
if (currentFrame == 3){
stop();
showStartPanel(true);
removeEventListener(Event.ENTER_FRAME, EFlistener);
};
}
public function showStartPanel(_arg1:Boolean=false):void{
var _local2:McMask;
startPanel = new StartPanel(this, _arg1);
if (!this.mask){
_local2 = new McMask();
addChild(_local2);
this.mask = _local2;
};
addChild(startPanel);
}
}
}//package
Section 71
//McMask (McMask)
package {
import flash.display.*;
public class McMask extends MovieClip {
}
}//package
Section 72
//Menu (Menu)
package {
import flash.display.*;
import flash.events.*;
public class Menu extends MovieClip {
public var _sbtExit:SimpleButton;
public var _sbtInstructions:SimpleButton;
public var _smcInstructions:MovieClip;
private var _Game:Game;
public var _sbtResume:SimpleButton;
public var _smcBoard:MovieClip;
public function Menu(){
_smcInstructions.visible = false;
_smcInstructions._sbtBack.visible = false;
var _local1:SimpleButton = (getChildAt(0) as SimpleButton);
_local1.useHandCursor = false;
}
private function removeMenu(_arg1:Boolean):void{
_smcBoard.visible = _arg1;
_sbtResume.visible = _arg1;
_sbtExit.visible = _arg1;
_sbtInstructions.visible = _arg1;
}
private function onInstructionsExit(_arg1:MouseEvent):void{
SoundController.sndButtonClick.play();
_smcInstructions.visible = false;
_smcInstructions._sbtResume.removeEventListener(MouseEvent.CLICK, onInstructionsExit);
removeMenu(true);
}
private function onInstructions(_arg1:MouseEvent):void{
SoundController.sndButtonClick.play();
_smcInstructions.visible = true;
_smcInstructions._sbtResume.addEventListener(MouseEvent.CLICK, onInstructionsExit);
removeMenu(false);
}
private function onResume(_arg1:MouseEvent):void{
removeListeners();
_Game.onMenuClicked();
}
public function init(_arg1:Game):void{
_Game = _arg1;
_sbtResume.addEventListener(MouseEvent.CLICK, onResume);
_sbtExit.addEventListener(MouseEvent.CLICK, onExit);
_sbtInstructions.addEventListener(MouseEvent.CLICK, onInstructions);
}
private function removeListeners():void{
_sbtResume.removeEventListener(MouseEvent.CLICK, onResume);
_sbtExit.removeEventListener(MouseEvent.CLICK, onExit);
_sbtInstructions.removeEventListener(MouseEvent.CLICK, onInstructions);
}
private function onExit(_arg1:MouseEvent):void{
removeListeners();
_Game.showStartPanelFromMenu();
}
}
}//package
Section 73
//MFNWLogo (MFNWLogo)
package {
import flash.display.*;
import flash.events.*;
import flash.net.*;
public class MFNWLogo extends SimpleButton {
public function MFNWLogo(){
this.addEventListener(MouseEvent.CLICK, onMouseClick);
this.mouseEnabled = true;
}
private function onMouseClick(_arg1:MouseEvent){
var _local2:URLRequest = new URLRequest("http://www.makeflashnotwar.com");
navigateToURL(_local2);
}
}
}//package
Section 74
//NewDeal (NewDeal)
package {
import flash.media.*;
public dynamic class NewDeal extends Sound {
}
}//package
Section 75
//nextCard_mc (nextCard_mc)
package {
import flash.display.*;
import flash.text.*;
public dynamic class nextCard_mc extends MovieClip {
public var _stxTimeBonus:TextField;
}
}//package
Section 76
//NextRoundPanel (NextRoundPanel)
package {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.net.*;
public class NextRoundPanel extends MovieClip {
public var btnPlayMoreGames:SimpleButton;
public var _stxScore:TextField;
public var _stxRoundBonus:TextField;
public var _sbtNextRound:SimpleButton;
private var _nTimer:Number;
public var _stxTimeBonus:TextField;
public var _stxWildBonus:TextField;
public var _stxDeckBonus:TextField;
public function NextRoundPanel(){
_sbtNextRound.visible = false;
_stxTimeBonus.visible = false;
_stxWildBonus.visible = false;
_stxDeckBonus.visible = false;
_stxRoundBonus.visible = false;
_stxScore.visible = false;
btnPlayMoreGames.addEventListener(MouseEvent.CLICK, onPlayMore);
}
private function onPlayMore(_arg1:MouseEvent):void{
SoundController.sndButtonClick.play();
var _local2:URLRequest = new URLRequest("http://www.solitaireparadise.com");
navigateToURL(_local2);
}
public function enterFrameListener(_arg1:Event):void{
_nTimer--;
if (_nTimer == 75){
_stxTimeBonus.visible = true;
SoundController.sndScorePing.play();
};
if (_nTimer == 60){
_stxWildBonus.visible = true;
SoundController.sndScorePing.play();
};
if (_nTimer == 45){
_stxDeckBonus.visible = true;
SoundController.sndScorePing.play();
};
if (_nTimer == 30){
_stxRoundBonus.visible = true;
SoundController.sndScorePing.play();
};
if (_nTimer == 15){
_stxScore.visible = true;
SoundController.sndScorePing.play();
};
if (_nTimer == 0){
_sbtNextRound.visible = true;
this.removeEventListener(Event.ENTER_FRAME, enterFrameListener);
};
}
public function removeBtnListeners():void{
btnPlayMoreGames.removeEventListener(MouseEvent.CLICK, onPlayMore);
}
public function showBonuses():void{
_nTimer = 90;
this.addEventListener(Event.ENTER_FRAME, enterFrameListener);
}
}
}//package
Section 77
//PileRemoved (PileRemoved)
package {
import flash.media.*;
public dynamic class PileRemoved extends Sound {
}
}//package
Section 78
//s1 (s1)
package {
import flash.display.*;
public dynamic class s1 extends MovieClip {
public function s1(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 79
//s10 (s10)
package {
import flash.display.*;
public dynamic class s10 extends MovieClip {
public function s10(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 80
//s11 (s11)
package {
import flash.display.*;
public dynamic class s11 extends MovieClip {
}
}//package
Section 81
//s12 (s12)
package {
import flash.display.*;
public dynamic class s12 extends MovieClip {
public function s12(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 82
//s13 (s13)
package {
import flash.display.*;
public dynamic class s13 extends MovieClip {
public function s13(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 83
//s2 (s2)
package {
import flash.display.*;
public dynamic class s2 extends MovieClip {
public function s2(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 84
//s3 (s3)
package {
import flash.display.*;
public dynamic class s3 extends MovieClip {
public function s3(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 85
//s4 (s4)
package {
import flash.display.*;
public dynamic class s4 extends MovieClip {
public function s4(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 86
//s5 (s5)
package {
import flash.display.*;
public dynamic class s5 extends MovieClip {
public function s5(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 87
//s6 (s6)
package {
import flash.display.*;
public dynamic class s6 extends MovieClip {
public function s6(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 88
//s7 (s7)
package {
import flash.display.*;
public dynamic class s7 extends MovieClip {
public function s7(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 89
//s8 (s8)
package {
import flash.display.*;
public dynamic class s8 extends MovieClip {
public function s8(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 90
//s9 (s9)
package {
import flash.display.*;
public dynamic class s9 extends MovieClip {
public function s9(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 91
//ScorePing (ScorePing)
package {
import flash.media.*;
public dynamic class ScorePing extends Sound {
}
}//package
Section 92
//Shield (Shield)
package {
import flash.display.*;
public dynamic class Shield extends MovieClip {
}
}//package
Section 93
//SoundButton (SoundButton)
package {
import flash.display.*;
import flash.events.*;
import flash.net.*;
public class SoundButton extends MovieClip {
private var _soData:SharedObject;
private var _enable:Boolean;
public var btSoundOff:SimpleButton;
public var btSoundOn:SimpleButton;
public function SoundButton(){
btSoundOff.addEventListener(MouseEvent.CLICK, setSoundOn);
btSoundOn.addEventListener(MouseEvent.CLICK, setSoundOff);
readSO();
}
private function saveSound(_arg1:Boolean):void{
(_soData.data.sound = _arg1);
_soData.flush();
}
private function setSoundOff(_arg1:Event):void{
enable = false;
}
private function get enable():Boolean{
return (_enable);
}
private function set enable(_arg1:Boolean){
if (_arg1 == false){
btSoundOff.visible = true;
btSoundOn.visible = !(btSoundOff.visible);
} else {
btSoundOff.visible = false;
btSoundOn.visible = !(btSoundOff.visible);
};
_enable = _arg1;
onSetSound(_arg1);
}
private function setSoundOn(_arg1:Event):void{
enable = true;
SoundController.sndButtonClick.play();
}
private function onSetSound(_arg1:Boolean):void{
saveSound(_arg1);
(SoundController.enable = _arg1);
}
private function readSO():void{
var _local1:*;
var _local2:*;
_soData = SharedObject.getLocal("soundData");
for (_local1 in _soData.data) {
};
_local2 = ((_soData.data.sound)==undefined) ? true : _soData.data.sound;
(enable = _local2);
}
public function initBtn():void{
readSO();
}
}
}//package
Section 94
//SoundController (SoundController)
package {
import flash.media.*;
public class SoundController {
private var indexLoaded:int;// = 0
public static var sndNewDeal:NewDeal;
public static var sndTurnCard:TurnCard;
public static var sndWildCard:WildCardUsed;
public static var sndButtonClick:ButtonClick;
private static var __enable:Boolean;
public static var sndPileRemoved:PileRemoved;
public static var sndUnAccessibleCard:UnAccessibleCard;
public static var sndGameOver:GameOver;
public static var sndCardClick:CardClick;
public static var sndAllPilesRemoved:AllPilesRemoved;
public static var sndScorePing:ScorePing;
public function SoundController(){
sndPileRemoved = new PileRemoved();
sndAllPilesRemoved = new AllPilesRemoved();
sndCardClick = new CardClick();
sndButtonClick = new ButtonClick();
sndNewDeal = new NewDeal();
sndGameOver = new GameOver();
sndUnAccessibleCard = new UnAccessibleCard();
sndTurnCard = new TurnCard();
sndWildCard = new WildCardUsed();
sndScorePing = new ScorePing();
}
public static function get enable():Boolean{
return (Boolean(true));
}
public static function set enable(_arg1:Boolean){
var _local2:SoundTransform = new SoundTransform();
SoundMixer.soundTransform = new SoundTransform(Number(_arg1));
}
}
}//package
Section 95
//StartPanel (StartPanel)
package {
import flash.display.*;
import flash.events.*;
import gs.*;
import flash.net.*;
public class StartPanel extends MovieClip {
private var _mainClass:Main;
private var _soData:SharedObject;
public var _sbtHigh:SimpleButton;
public var _sbtInstructions:SimpleButton;
public var _smcInstructions:MovieClip;
public var _sbtPlay:SimpleButton;
public var btnPlayMoreGames:SimpleButton;
public var btnGoToWebsite:SimpleButton;
public var _smcSound:SoundButton;
public var _smcHighScore:HighScorePanel;
public var enableShow:Boolean;
public var _smcCredits:MovieClip;
public var _smcShowInstructions:MovieClip;
public var _sbtCredits:SimpleButton;
public var _btSolParadise:SimpleButton;
public function StartPanel(_arg1:Main, _arg2:Boolean=false){
_mainClass = _arg1;
init(_arg2);
}
private function onCloseCredits(_arg1:MouseEvent):void{
SoundController.sndButtonClick.play();
_smcCredits.visible = false;
}
private function onCredits(_arg1:MouseEvent):void{
SoundController.sndButtonClick.play();
_smcCredits.visible = true;
}
private function onCloseInst(_arg1:MouseEvent):void{
SoundController.sndButtonClick.play();
_smcInstructions.visible = false;
}
private function showInstructions(_arg1:Boolean):void{
(_soData.data.show = _arg1);
_soData.flush();
}
private function onSetShowInstructions(_arg1:Boolean):void{
showInstructions(_arg1);
(enableShow = _arg1);
}
private function onShowParadiseFaded():void{
_btSolParadise.visible = false;
_btSolParadise.alpha = 1;
}
private function init(_arg1:Boolean=false):void{
readSO();
_smcHighScore.init("start");
_smcInstructions.visible = false;
_smcInstructions._sbtResume.visible = false;
_smcInstructions._sbtBack.addEventListener(MouseEvent.CLICK, onCloseInst);
btnGoToWebsite.addEventListener(MouseEvent.CLICK, goToWebsite);
btnPlayMoreGames.addEventListener(MouseEvent.CLICK, playMoreGames);
_btSolParadise.addEventListener(MouseEvent.CLICK, playMoreGames);
_smcCredits.visible = false;
_smcCredits._sbtBack.addEventListener(MouseEvent.CLICK, onCloseCredits);
_sbtPlay.addEventListener(MouseEvent.CLICK, onStartGame);
_sbtInstructions.addEventListener(MouseEvent.CLICK, onInstructions);
_sbtCredits.addEventListener(MouseEvent.CLICK, onCredits);
_sbtHigh.addEventListener(MouseEvent.CLICK, onHigh);
_smcShowInstructions.addEventListener(MouseEvent.CLICK, onShow);
if (_arg1){
_btSolParadise.visible = false;
} else {
_btSolParadise.visible = false;
};
}
private function goToWebsite(_arg1:MouseEvent):void{
SoundController.sndButtonClick.play();
var _local2:URLRequest = new URLRequest("http://www.glowingeyegames.com/index.html");
navigateToURL(_local2);
}
public function onHigh(_arg1:MouseEvent):void{
SoundController.sndButtonClick.play();
_smcHighScore.visible = true;
}
private function onStartGame(_arg1:MouseEvent):void{
SoundController.sndButtonClick.play();
_mainClass.initGame(enableShow);
}
public function setMinScore(_arg1:Number):void{
_mainClass.setMinScore(_arg1);
}
private function onInstructions(_arg1:MouseEvent):void{
SoundController.sndButtonClick.play();
_smcInstructions.visible = true;
}
private function playMoreGames(_arg1:MouseEvent):void{
SoundController.sndButtonClick.play();
var _local2:URLRequest = new URLRequest("http://www.solitaireparadise.com");
navigateToURL(_local2);
}
private function readSO():void{
var _local1:*;
var _local2:*;
_soData = SharedObject.getLocal("showInstructions");
for (_local1 in _soData.data) {
};
_local2 = ((_soData.data.show)==undefined) ? true : _soData.data.show;
(enableShow = _local2);
if (_local2){
_smcShowInstructions.gotoAndStop(2);
} else {
_smcShowInstructions.gotoAndStop(1);
};
}
private function onShow(_arg1:MouseEvent):void{
if (_smcShowInstructions.currentFrame == 1){
_smcShowInstructions.gotoAndStop(2);
onSetShowInstructions(true);
} else {
_smcShowInstructions.gotoAndStop(1);
onSetShowInstructions(false);
};
}
private function hideShowParadise():void{
_btSolParadise.removeEventListener(MouseEvent.CLICK, playMoreGames);
TweenLite.to(_btSolParadise, 0.5, {alpha:0, onComplete:onShowParadiseFaded});
}
}
}//package
Section 96
//TimerClass (TimerClass)
package {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.text.*;
public class TimerClass extends MovieClip {
public var _nTimeTarget:Number;
private var _nSeconds:Number;// = 0
public var _nTimer:Number;
public var _nBonusLeft:Number;
private var _nTotalFrames:Number;
private var _fTickFunction:Function;// = null
private var _bTimerOn:Boolean;
private var _fTimeRanOut:Function;
private var _nOldTime:Number;
public var _nTimeWarning:Number;
private var _fEnterFrameFunction:Function;
private var _fBonusTick:Function;
private var _nStartingTime:Number;
public var timerDisplay:TextField;
public var _smcTimerTarget:MovieClip;
public var _smcTimerModifier:MovieClip;
public var _sTimeModifier:String;
private var _nBonusPerSecond:Number;
private var _bWarned:Boolean;
public var _bPlayerWarned:Boolean;
public var _Game:Game;
private var _fTimeTargetFunction:Function;
public function TimerClass(){
timerDisplay = (getChildAt(0) as TextField);
}
public function startTimer():void{
_nOldTime = (getTimer() / 1000);
_bTimerOn = true;
}
public function countUp(_arg1:Event):void{
var _local2:Number = (getTimer() / 1000);
if (_bTimerOn == true){
_nTimer = (_nTimer + (_local2 - _nOldTime));
if ((((_nTimer > _nTimeWarning)) && ((_bPlayerWarned == false)))){
_bPlayerWarned = true;
};
};
_nOldTime = _local2;
var _local3:Number = Math.floor((_nTimer / 60));
var _local4:Number = Math.floor((_nTimer % 60));
if (_local4 != _nSeconds){
_nSeconds = _local4;
if (_fTickFunction != null){
_fTickFunction();
};
_local3 = (_local3 % 24);
if (_local3 > 11){
_local3 = (_local3 % 12);
_smcTimerModifier._sdtTimerModifier.text = "PM";
} else {
_smcTimerModifier._sdtTimerModifier.text = "AM";
};
if (_local3 == 0){
_local3 = 12;
};
if (_local4 > 9){
timerDisplay.text = ((String(_local3) + ":") + String(_local4));
} else {
timerDisplay.text = ((String(_local3) + ":") + ("0" + String(_local4)));
};
};
}
public function setTargetFunction(_arg1:Function):void{
_fTimeTargetFunction = _arg1;
}
public function addTime(_arg1:Number):void{
setTime((_nTimer + _arg1));
}
public function setEndFunction(_arg1:Function):void{
_fTimeRanOut = _arg1;
}
public function startNewCountDown(_arg1:Number):void{
clearTimer();
_nStartingTime = _arg1;
setTime(_arg1);
_nSeconds = Math.floor((_nTimer % 60));
_nOldTime = (getTimer() / 1000);
_bTimerOn = true;
if (this.hasEventListener(Event.ENTER_FRAME)){
this.removeEventListener(Event.ENTER_FRAME, _fEnterFrameFunction);
};
_fEnterFrameFunction = countDown;
this.addEventListener(Event.ENTER_FRAME, _fEnterFrameFunction);
}
public function setTickFunction(_arg1:Function):void{
_fTickFunction = _arg1;
}
public function playBonusCountdown(_arg1:Function):void{
_fBonusTick = _arg1;
if (this.hasEventListener(Event.ENTER_FRAME)){
this.removeEventListener(Event.ENTER_FRAME, _fEnterFrameFunction);
};
_fEnterFrameFunction = countDown;
this.addEventListener(Event.ENTER_FRAME, _fEnterFrameFunction);
}
public function getTimeTarget():Number{
return (_nTimeTarget);
}
public function playBonusCountUp(_arg1:Function):void{
_bPlayerWarned = true;
_fBonusTick = _arg1;
if (this.hasEventListener(Event.ENTER_FRAME)){
this.removeEventListener(Event.ENTER_FRAME, _fEnterFrameFunction);
};
_fEnterFrameFunction = bonusCountUp;
this.addEventListener(Event.ENTER_FRAME, _fEnterFrameFunction);
}
public function getTime():Number{
return (_nTimer);
}
public function setTimeTarget(_arg1:Number):void{
_nTimeTarget = _arg1;
_nTimeWarning = (_nTimeTarget - 10);
var _local2:Number = Math.floor((_arg1 / 60));
var _local3:Number = Math.floor((_arg1 % 60));
if (_local2 == 0){
_local2 = 12;
};
if (_local3 > 9){
_smcTimerTarget._sdtTimerTarget.text = ((String(_local2) + ":") + String(_local3));
} else {
_smcTimerTarget._sdtTimerTarget.text = ((String(_local2) + ":") + ("0" + String(_local3)));
};
}
public function onInitialize(_arg1:Game):void{
_Game = _arg1;
_nTotalFrames = this.totalFrames;
this.stop();
_bTimerOn = false;
_bWarned = false;
_nBonusPerSecond = (_Game._nFullTimeBonus / _Game._nRoundTime);
_nBonusLeft = _Game._nFullTimeBonus;
setTickFunction(decrementBonus);
}
public function countDown(_arg1:Event):void{
var _local2:Number = (getTimer() / 1000);
if (_bTimerOn == true){
_nTimer = (_nTimer - (_local2 - _nOldTime));
if (_nTimer <= 0){
_nTimer = 0;
_bTimerOn = false;
_fTimeRanOut();
};
};
_nOldTime = _local2;
var _local3:Number = Math.floor(_nTimer);
if (_local3 != _nSeconds){
_nSeconds = _local3;
if (_fTickFunction != null){
_fTickFunction();
};
};
_nBonusLeft = Math.floor((_nSeconds * _nBonusPerSecond));
timerDisplay.text = String(_nBonusLeft);
}
private function decrementBonus():void{
var _local1:int = Math.floor((_nBonusPerSecond * _nTimer));
timerDisplay.text = String(_local1);
}
public function setTime(_arg1:Number):void{
_nTimer = _arg1;
}
public function startNewCountUp(_arg1:Number):void{
clearTimer();
_bPlayerWarned = false;
_nStartingTime = _arg1;
setTime(_arg1);
_nOldTime = (getTimer() / 1000);
if (this.hasEventListener(Event.ENTER_FRAME)){
this.removeEventListener(Event.ENTER_FRAME, _fEnterFrameFunction);
};
_fEnterFrameFunction = countUp;
this.addEventListener(Event.ENTER_FRAME, _fEnterFrameFunction);
_bTimerOn = true;
}
public function stopTimer():void{
_bTimerOn = false;
}
public function bonusCountUp(_arg1:Event):void{
var _local2:Number;
var _local3:Number;
if (_bTimerOn == true){
_nTimer = (_nTimer + 1);
if (_nTimer > _nTimeTarget){
_nTimer = _nTimeTarget;
};
_local2 = Math.floor((_nTimer / 60));
_local3 = Math.floor((_nTimer % 60));
if (_local3 != _nSeconds){
_nSeconds = _local3;
if (_fTickFunction != null){
_fTickFunction();
};
_local2 = (_local2 % 24);
if (_local2 > 11){
_local2 = 0;
_smcTimerModifier._sdtTimerModifier.text = "PM";
} else {
_smcTimerModifier._sdtTimerModifier.text = "AM";
};
if (_local2 == 0){
_local2 = 12;
};
if (_local3 > 9){
timerDisplay.text = ((String(_local2) + ":") + String(_local3));
} else {
timerDisplay.text = ((String(_local2) + ":") + ("0" + String(_local3)));
};
};
_fBonusTick();
if (_nTimer == _nTimeTarget){
_fTimeTargetFunction();
_fTimeTargetFunction = new Function();
clearTimer();
};
};
}
public function bonusCountDown(_arg1:Event):void{
var _local2:int = this.currentFrame;
if (_local2 == _nTotalFrames){
if (this.hasEventListener(Event.ENTER_FRAME)){
this.removeEventListener(Event.ENTER_FRAME, _fEnterFrameFunction);
};
_fTimeRanOut();
} else {
_local2++;
this.gotoAndStop(_local2);
_fBonusTick();
};
}
public function clearTimer():void{
if (this.hasEventListener(Event.ENTER_FRAME)){
this.removeEventListener(Event.ENTER_FRAME, _fEnterFrameFunction);
};
}
}
}//package
Section 97
//TurnCard (TurnCard)
package {
import flash.media.*;
public dynamic class TurnCard extends Sound {
}
}//package
Section 98
//UnAccessibleCard (UnAccessibleCard)
package {
import flash.media.*;
public dynamic class UnAccessibleCard extends Sound {
}
}//package
Section 99
//Utils (Utils)
package {
public class Utils {
private static const A:int = 3423313;
private static const C:int = 2435;
public static var numRandomSeed:int;
public static function getRandomValue(_arg1:int):int{
numRandomSeed = ((numRandomSeed * A) % 2147352576);
var _local2:int = (Math.floor(((numRandomSeed * _arg1) / C)) % _arg1);
return (_local2);
}
}
}//package
Section 100
//WildCard (WildCard)
package {
import flash.display.*;
public dynamic class WildCard extends Sprite {
public var mcBugless:MovieClip;
}
}//package
Section 101
//WildCardUsed (WildCardUsed)
package {
import flash.media.*;
public dynamic class WildCardUsed extends Sound {
}
}//package