STORY   LOOP   FURRY   PORN   GAMES
• C •   SERVICES [?] [R] RND   POPULAR
Archived flashes:
229595
/disc/ · /res/     /show/ · /fap/ · /gg/ · /swf/P0001 · P2595 · P5190

<div style="position:absolute;top:-99px;left:-99px;"><img src="http://swfchan.com:57475/82139036?noj=FRM82139036-22DC" width="1" height="1"></div>

Critter Match.swf

This is the info page for
Flash #133371

(Click the ID number above for more basic data on this flash file.)


Text
<p align="center"><font face="Adira Display SSi" size="20" color="#ffffff" letterSpacing="0.000000" kerning="1">Reset</font></p>

<p align="center"><font face="Adira Display SSi" size="20" color="#b2fa31" letterSpacing="0.000000" kerning="1">Reset</font></p>

<p align="center"><font face="Adira Display SSi" size="20" color="#b2fa31" letterSpacing="0.000000" kerning="1">Reset</font></p>

<p align="center"><font face="Adira Display SSi" size="20" color="#b2fa31" letterSpacing="0.000000" kerning="1">Reset</font></p>

<p align="center"></p>

<p align="center"></p>

<p align="center"><font face="Adira Display SSi" size="22" color="#ffffff" letterSpacing="0.000000" kerning="1">Play Again</font></p>

<p align="center"><font face="Adira Display SSi" size="22" color="#b2fa31" letterSpacing="0.000000" kerning="1">Play Again</font></p>

<p align="center"><font face="Adira Display SSi" size="22" color="#b2fa31" letterSpacing="0.000000" kerning="1">Play Again</font></p>

<p align="center"><font face="Adira Display SSi" size="22" color="#b2fa31" letterSpacing="0.000000" kerning="1">Play Again</font></p>

0

0

Game Over

<p align="center"><font face="Adira Display SSi" size="22" color="#ffffff" letterSpacing="0.000000" kerning="1">Play</font></p>

<p align="center"><font face="Adira Display SSi" size="22" color="#b2fa31" letterSpacing="0.000000" kerning="1">Play</font></p>

<p align="center"><font face="Adira Display SSi" size="22" color="#b2fa31" letterSpacing="0.000000" kerning="1">Play</font></p>

<p align="center"><font face="Adira Display SSi" size="22" color="#b2fa31" letterSpacing="0.000000" kerning="1">Play</font></p>

<p align="center"><font face="Adira Display SSi" size="22" color="#ffffff" letterSpacing="0.000000" kerning="1">Highscores</font></p>

<p align="center"><font face="Adira Display SSi" size="22" color="#b2fa31" letterSpacing="0.000000" kerning="1">Highscores</font></p>

<p align="center"><font face="Adira Display SSi" size="22" color="#b2fa31" letterSpacing="0.000000" kerning="1">Highscores</font></p>

<p align="center"><font face="Adira Display SSi" size="22" color="#b2fa31" letterSpacing="0.000000" kerning="1">Highscores</font></p>

0

0

<p align="center"><font face="Adira Display SSi" size="22" color="#ffffff" letterSpacing="0.000000" kerning="1">Submit Score</font></p>

<p align="center"><font face="Adira Display SSi" size="22" color="#b2fa31" letterSpacing="0.000000" kerning="1">Submit Score</font></p>

<p align="center"><font face="Adira Display SSi" size="22" color="#b2fa31" letterSpacing="0.000000" kerning="1">Submit Score</font></p>

<p align="center"><font face="Adira Display SSi" size="22" color="#b2fa31" letterSpacing="0.000000" kerning="1">Submit Score</font></p>

ActionScript [AS3]

Section 1
//BearMC_21 (CritterMatch_fla.BearMC_21) package CritterMatch_fla { import gs.*; import flash.display.*; public dynamic class BearMC_21 extends MovieClip { public var front_mc:MovieClip; public var back_mc:MovieClip; public function BearMC_21(){ addFrameScript(0, frame1); } public function flipBack():void{ back_mc.visible = true; TweenLite.to(front_mc, 0.5, {scaleX:1, overwrite:false}); TweenLite.to(front_mc, 0, {alpha:0, delay:0.15, overwrite:false}); TweenLite.to(back_mc, 0.5, {scaleX:1, overwrite:false, onComplete:ReHidden}); TweenLite.to(back_mc, 0, {alpha:1, delay:0.15, overwrite:false}); } public function ReHidden(){ front_mc.visible = false; } public function hidden(){ back_mc.visible = false; } function frame1(){ } public function flip():void{ front_mc.visible = true; TweenLite.to(back_mc, 0.5, {scaleX:-1, overwrite:false}); TweenLite.to(back_mc, 0, {alpha:0, delay:0.15, overwrite:false}); TweenLite.to(front_mc, 0.5, {scaleX:-1, overwrite:false, onComplete:hidden}); TweenLite.to(front_mc, 0, {alpha:1, delay:0.15, overwrite:false}); } } }//package CritterMatch_fla
Section 2
//ChickenMC_27 (CritterMatch_fla.ChickenMC_27) package CritterMatch_fla { import gs.*; import flash.display.*; public dynamic class ChickenMC_27 extends MovieClip { public var front_mc:MovieClip; public var back_mc:MovieClip; public function ChickenMC_27(){ addFrameScript(0, frame1); } public function flipBack():void{ back_mc.visible = true; TweenLite.to(front_mc, 0.5, {scaleX:1, overwrite:false}); TweenLite.to(front_mc, 0, {alpha:0, delay:0.15, overwrite:false}); TweenLite.to(back_mc, 0.5, {scaleX:1, overwrite:false, onComplete:ReHidden}); TweenLite.to(back_mc, 0, {alpha:1, delay:0.15, overwrite:false}); } public function ReHidden(){ front_mc.visible = false; } public function hidden(){ back_mc.visible = false; } function frame1(){ } public function flip():void{ front_mc.visible = true; TweenLite.to(back_mc, 0.5, {scaleX:-1, overwrite:false}); TweenLite.to(back_mc, 0, {alpha:0, delay:0.15, overwrite:false}); TweenLite.to(front_mc, 0.5, {scaleX:-1, overwrite:false, onComplete:hidden}); TweenLite.to(front_mc, 0, {alpha:1, delay:0.15, overwrite:false}); } } }//package CritterMatch_fla
Section 3
//ChickMC_25 (CritterMatch_fla.ChickMC_25) package CritterMatch_fla { import gs.*; import flash.display.*; public dynamic class ChickMC_25 extends MovieClip { public var front_mc:MovieClip; public var back_mc:MovieClip; public function ChickMC_25(){ addFrameScript(0, frame1); } public function flipBack():void{ back_mc.visible = true; TweenLite.to(front_mc, 0.5, {scaleX:1, overwrite:false}); TweenLite.to(front_mc, 0, {alpha:0, delay:0.15, overwrite:false}); TweenLite.to(back_mc, 0.5, {scaleX:1, overwrite:false, onComplete:ReHidden}); TweenLite.to(back_mc, 0, {alpha:1, delay:0.15, overwrite:false}); } public function ReHidden(){ front_mc.visible = false; } public function hidden(){ back_mc.visible = false; } function frame1(){ } public function flip():void{ front_mc.visible = true; TweenLite.to(back_mc, 0.5, {scaleX:-1, overwrite:false}); TweenLite.to(back_mc, 0, {alpha:0, delay:0.15, overwrite:false}); TweenLite.to(front_mc, 0.5, {scaleX:-1, overwrite:false, onComplete:hidden}); TweenLite.to(front_mc, 0, {alpha:1, delay:0.15, overwrite:false}); } } }//package CritterMatch_fla
Section 4
//ChickyMC_19 (CritterMatch_fla.ChickyMC_19) package CritterMatch_fla { import gs.*; import flash.display.*; public dynamic class ChickyMC_19 extends MovieClip { public var front_mc:MovieClip; public var back_mc:MovieClip; public function ChickyMC_19(){ addFrameScript(0, frame1); } public function flipBack():void{ back_mc.visible = true; TweenLite.to(front_mc, 0.5, {scaleX:1, overwrite:false}); TweenLite.to(front_mc, 0, {alpha:0, delay:0.15, overwrite:false}); TweenLite.to(back_mc, 0.5, {scaleX:1, overwrite:false, onComplete:ReHidden}); TweenLite.to(back_mc, 0, {alpha:1, delay:0.15, overwrite:false}); } public function ReHidden(){ front_mc.visible = false; } public function hidden(){ back_mc.visible = false; } function frame1(){ } public function flip():void{ front_mc.visible = true; TweenLite.to(back_mc, 0.5, {scaleX:-1, overwrite:false}); TweenLite.to(back_mc, 0, {alpha:0, delay:0.15, overwrite:false}); TweenLite.to(front_mc, 0.5, {scaleX:-1, overwrite:false, onComplete:hidden}); TweenLite.to(front_mc, 0, {alpha:1, delay:0.15, overwrite:false}); } } }//package CritterMatch_fla
Section 5
//CowMC_35 (CritterMatch_fla.CowMC_35) package CritterMatch_fla { import gs.*; import flash.display.*; public dynamic class CowMC_35 extends MovieClip { public var front_mc:MovieClip; public var back_mc:MovieClip; public function CowMC_35(){ addFrameScript(0, frame1); } public function flipBack():void{ back_mc.visible = true; TweenLite.to(front_mc, 0.5, {scaleX:1, overwrite:false}); TweenLite.to(front_mc, 0, {alpha:0, delay:0.15, overwrite:false}); TweenLite.to(back_mc, 0.5, {scaleX:1, overwrite:false, onComplete:ReHidden}); TweenLite.to(back_mc, 0, {alpha:1, delay:0.15, overwrite:false}); } public function ReHidden(){ front_mc.visible = false; } public function hidden(){ back_mc.visible = false; } function frame1(){ } public function flip():void{ front_mc.visible = true; TweenLite.to(back_mc, 0.5, {scaleX:-1, overwrite:false}); TweenLite.to(back_mc, 0, {alpha:0, delay:0.15, overwrite:false}); TweenLite.to(front_mc, 0.5, {scaleX:-1, overwrite:false, onComplete:hidden}); TweenLite.to(front_mc, 0, {alpha:1, delay:0.15, overwrite:false}); } } }//package CritterMatch_fla
Section 6
//DuckMC_14 (CritterMatch_fla.DuckMC_14) package CritterMatch_fla { import gs.*; import flash.display.*; public dynamic class DuckMC_14 extends MovieClip { public var front_mc:MovieClip; public var back_mc:MovieClip; public function DuckMC_14(){ addFrameScript(0, frame1); } public function flipBack():void{ back_mc.visible = true; TweenLite.to(front_mc, 0.5, {scaleX:1, overwrite:false}); TweenLite.to(front_mc, 0, {alpha:0, delay:0.15, overwrite:false}); TweenLite.to(back_mc, 0.5, {scaleX:1, overwrite:false, onComplete:ReHidden}); TweenLite.to(back_mc, 0, {alpha:1, delay:0.15, overwrite:false}); } public function ReHidden(){ front_mc.visible = false; } public function hidden(){ back_mc.visible = false; } function frame1(){ } public function flip():void{ front_mc.visible = true; TweenLite.to(back_mc, 0.5, {scaleX:-1, overwrite:false}); TweenLite.to(back_mc, 0, {alpha:0, delay:0.15, overwrite:false}); TweenLite.to(front_mc, 0.5, {scaleX:-1, overwrite:false, onComplete:hidden}); TweenLite.to(front_mc, 0, {alpha:1, delay:0.15, overwrite:false}); } } }//package CritterMatch_fla
Section 7
//GnuMC_29 (CritterMatch_fla.GnuMC_29) package CritterMatch_fla { import gs.*; import flash.display.*; public dynamic class GnuMC_29 extends MovieClip { public var front_mc:MovieClip; public var back_mc:MovieClip; public function GnuMC_29(){ addFrameScript(0, frame1); } public function flipBack():void{ back_mc.visible = true; TweenLite.to(front_mc, 0.5, {scaleX:1, overwrite:false}); TweenLite.to(front_mc, 0, {alpha:0, delay:0.15, overwrite:false}); TweenLite.to(back_mc, 0.5, {scaleX:1, overwrite:false, onComplete:ReHidden}); TweenLite.to(back_mc, 0, {alpha:1, delay:0.15, overwrite:false}); } public function ReHidden(){ front_mc.visible = false; } public function hidden(){ back_mc.visible = false; } function frame1(){ } public function flip():void{ front_mc.visible = true; TweenLite.to(back_mc, 0.5, {scaleX:-1, overwrite:false}); TweenLite.to(back_mc, 0, {alpha:0, delay:0.15, overwrite:false}); TweenLite.to(front_mc, 0.5, {scaleX:-1, overwrite:false, onComplete:hidden}); TweenLite.to(front_mc, 0, {alpha:1, delay:0.15, overwrite:false}); } } }//package CritterMatch_fla
Section 8
//GoatMC_31 (CritterMatch_fla.GoatMC_31) package CritterMatch_fla { import gs.*; import flash.display.*; public dynamic class GoatMC_31 extends MovieClip { public var front_mc:MovieClip; public var back_mc:MovieClip; public function GoatMC_31(){ addFrameScript(0, frame1); } public function flipBack():void{ back_mc.visible = true; TweenLite.to(front_mc, 0.5, {scaleX:1, overwrite:false}); TweenLite.to(front_mc, 0, {alpha:0, delay:0.15, overwrite:false}); TweenLite.to(back_mc, 0.5, {scaleX:1, overwrite:false, onComplete:ReHidden}); TweenLite.to(back_mc, 0, {alpha:1, delay:0.15, overwrite:false}); } public function ReHidden(){ front_mc.visible = false; } public function hidden(){ back_mc.visible = false; } function frame1(){ } public function flip():void{ front_mc.visible = true; TweenLite.to(back_mc, 0.5, {scaleX:-1, overwrite:false}); TweenLite.to(back_mc, 0, {alpha:0, delay:0.15, overwrite:false}); TweenLite.to(front_mc, 0.5, {scaleX:-1, overwrite:false, onComplete:hidden}); TweenLite.to(front_mc, 0, {alpha:1, delay:0.15, overwrite:false}); } } }//package CritterMatch_fla
Section 9
//HorseMC_23 (CritterMatch_fla.HorseMC_23) package CritterMatch_fla { import gs.*; import flash.display.*; public dynamic class HorseMC_23 extends MovieClip { public var front_mc:MovieClip; public var back_mc:MovieClip; public function HorseMC_23(){ addFrameScript(0, frame1); } public function flipBack():void{ back_mc.visible = true; TweenLite.to(front_mc, 0.5, {scaleX:1, overwrite:false}); TweenLite.to(front_mc, 0, {alpha:0, delay:0.15, overwrite:false}); TweenLite.to(back_mc, 0.5, {scaleX:1, overwrite:false, onComplete:ReHidden}); TweenLite.to(back_mc, 0, {alpha:1, delay:0.15, overwrite:false}); } public function ReHidden(){ front_mc.visible = false; } public function hidden(){ back_mc.visible = false; } function frame1(){ } public function flip():void{ front_mc.visible = true; TweenLite.to(back_mc, 0.5, {scaleX:-1, overwrite:false}); TweenLite.to(back_mc, 0, {alpha:0, delay:0.15, overwrite:false}); TweenLite.to(front_mc, 0.5, {scaleX:-1, overwrite:false, onComplete:hidden}); TweenLite.to(front_mc, 0, {alpha:1, delay:0.15, overwrite:false}); } } }//package CritterMatch_fla
Section 10
//LionMC_17 (CritterMatch_fla.LionMC_17) package CritterMatch_fla { import gs.*; import flash.display.*; public dynamic class LionMC_17 extends MovieClip { public var front_mc:MovieClip; public var back_mc:MovieClip; public function LionMC_17(){ addFrameScript(0, frame1); } public function flipBack():void{ back_mc.visible = true; TweenLite.to(front_mc, 0.5, {scaleX:1, overwrite:false}); TweenLite.to(front_mc, 0, {alpha:0, delay:0.15, overwrite:false}); TweenLite.to(back_mc, 0.5, {scaleX:1, overwrite:false, onComplete:ReHidden}); TweenLite.to(back_mc, 0, {alpha:1, delay:0.15, overwrite:false}); } public function ReHidden(){ front_mc.visible = false; } public function hidden(){ back_mc.visible = false; } function frame1(){ } public function flip():void{ front_mc.visible = true; TweenLite.to(back_mc, 0.5, {scaleX:-1, overwrite:false}); TweenLite.to(back_mc, 0, {alpha:0, delay:0.15, overwrite:false}); TweenLite.to(front_mc, 0.5, {scaleX:-1, overwrite:false, onComplete:hidden}); TweenLite.to(front_mc, 0, {alpha:1, delay:0.15, overwrite:false}); } } }//package CritterMatch_fla
Section 11
//MainTimeline (CritterMatch_fla.MainTimeline) package CritterMatch_fla { import flash.events.*; import flash.display.*; import mochi.as3.*; import flash.utils.*; import flash.net.*; import flash.media.*; import flash.text.*; import flash.geom.*; import flash.system.*; import adobe.utils.*; import flash.accessibility.*; import flash.errors.*; import flash.external.*; import flash.filters.*; import flash.printing.*; import flash.profiler.*; import flash.sampler.*; import flash.ui.*; import flash.xml.*; public dynamic class MainTimeline extends MovieClip { public var gameScore:int; public var boardID:String; public var playBtn:SimpleButton; public var showScore:TextField; public var gameTime; public var submitScoreBtn:SimpleButton; public var showTime:TextField; public var o:Object; public var playAgainBtn:SimpleButton; public var highScoresBtn:SimpleButton; public function MainTimeline(){ addFrameScript(0, frame1, 1, frame2, 3, frame4); } public function showHighScores(_arg1:Event):void{ MochiScores.showLeaderboard({boardID:boardID}); } public function playAgain(_arg1:MouseEvent){ gotoAndStop("playgame"); } public function submitScore(_arg1:MouseEvent):void{ MochiScores.showLeaderboard({boardID:boardID, score:gameScore}); } function frame1(){ MochiServices.connect("3d2375a7f0722a21", root); MochiAd.showPreGameAd({clip:root, id:"3d2375a7f0722a21", res:"650x500"}); o = {n:[14, 12, 6, 3, 5, 0, 4, 0, 3, 6, 13, 11, 10, 9, 1, 2], f:function (_arg1:Number, _arg2:String):String{ if (_arg2.length == 16){ return (_arg2); }; return (this.f((_arg1 + 1), (_arg2 + this.n[_arg1].toString(16)))); }}; boardID = o.f(0, ""); } function frame2(){ stop(); playBtn.addEventListener(MouseEvent.CLICK, startGame); highScoresBtn.addEventListener(MouseEvent.MOUSE_DOWN, showHighScores); } function frame4(){ showScore.text = ("Score: " + String(gameScore)); showTime.text = ("Time: " + String(gameTime)); playAgainBtn.addEventListener(MouseEvent.CLICK, playAgain); submitScoreBtn.addEventListener(MouseEvent.CLICK, submitScore); } public function startGame(_arg1:MouseEvent){ gotoAndStop("playgame"); } } }//package CritterMatch_fla
Section 12
//PigMC_37 (CritterMatch_fla.PigMC_37) package CritterMatch_fla { import gs.*; import flash.display.*; public dynamic class PigMC_37 extends MovieClip { public var front_mc:MovieClip; public var back_mc:MovieClip; public function PigMC_37(){ addFrameScript(0, frame1); } public function flipBack():void{ back_mc.visible = true; TweenLite.to(front_mc, 0.5, {scaleX:1, overwrite:false}); TweenLite.to(front_mc, 0, {alpha:0, delay:0.15, overwrite:false}); TweenLite.to(back_mc, 0.5, {scaleX:1, overwrite:false, onComplete:ReHidden}); TweenLite.to(back_mc, 0, {alpha:1, delay:0.15, overwrite:false}); } public function ReHidden(){ front_mc.visible = false; } public function hidden(){ back_mc.visible = false; } function frame1(){ } public function flip():void{ front_mc.visible = true; TweenLite.to(back_mc, 0.5, {scaleX:-1, overwrite:false}); TweenLite.to(back_mc, 0, {alpha:0, delay:0.15, overwrite:false}); TweenLite.to(front_mc, 0.5, {scaleX:-1, overwrite:false, onComplete:hidden}); TweenLite.to(front_mc, 0, {alpha:1, delay:0.15, overwrite:false}); } } }//package CritterMatch_fla
Section 13
//SheepMC_33 (CritterMatch_fla.SheepMC_33) package CritterMatch_fla { import gs.*; import flash.display.*; public dynamic class SheepMC_33 extends MovieClip { public var front_mc:MovieClip; public var back_mc:MovieClip; public function SheepMC_33(){ addFrameScript(0, frame1); } public function flipBack():void{ back_mc.visible = true; TweenLite.to(front_mc, 0.5, {scaleX:1, overwrite:false}); TweenLite.to(front_mc, 0, {alpha:0, delay:0.15, overwrite:false}); TweenLite.to(back_mc, 0.5, {scaleX:1, overwrite:false, onComplete:ReHidden}); TweenLite.to(back_mc, 0, {alpha:1, delay:0.15, overwrite:false}); } public function ReHidden(){ front_mc.visible = false; } public function hidden(){ back_mc.visible = false; } function frame1(){ } public function flip():void{ front_mc.visible = true; TweenLite.to(back_mc, 0.5, {scaleX:-1, overwrite:false}); TweenLite.to(back_mc, 0, {alpha:0, delay:0.15, overwrite:false}); TweenLite.to(front_mc, 0.5, {scaleX:-1, overwrite:false, onComplete:hidden}); TweenLite.to(front_mc, 0, {alpha:1, delay:0.15, overwrite:false}); } } }//package CritterMatch_fla
Section 14
//TweenLite (gs.TweenLite) package gs { import flash.events.*; import flash.display.*; import flash.utils.*; import flash.media.*; import flash.geom.*; public class TweenLite { public var delay:Number; protected var _initted:Boolean; protected var _subTweens:Array; public var startTime:int; public var target:Object; public var duration:Number; protected var _hst:Boolean; protected var _active:Boolean; public var tweens:Array; public var vars:Object; public var initTime:int; 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 = 6.22; private static var _sprite:Sprite = new Sprite(); protected static var _all:Dictionary = new Dictionary(); public static var killDelayedCallsTo:Function = killTweensOf; protected static var _curTime:uint; private static var _listening:Boolean; public function TweenLite(_arg1:Object, _arg2:Number, _arg3:Object){ if (_arg1 == null){ return; }; if (((((!((_arg3.overwrite == false))) && (!((_arg1 == null))))) || ((_all[_arg1] == undefined)))){ delete _all[_arg1]; _all[_arg1] = new Dictionary(); }; _all[_arg1][this] = this; this.vars = _arg3; this.duration = ((_arg2) || (0.001)); this.delay = ((_arg3.delay) || (0)); this.target = _arg1; 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.tweens = []; _subTweens = []; _hst = (_initted = false); _active = (((_arg2 == 0)) && ((this.delay == 0))); if (!_classInitted){ _curTime = getTimer(); _sprite.addEventListener(Event.ENTER_FRAME, executeAll); _classInitted = true; }; this.initTime = _curTime; if ((((((this.vars.runBackwards == true)) && (!((this.vars.renderOnStart == true))))) || (_active))){ initTweenVals(); this.startTime = _curTime; if (_active){ render((this.startTime + 1)); } else { render(this.startTime); }; }; if (((!(_listening)) && (!(_active)))){ _timer.addEventListener("timer", killGarbage); _timer.start(); _listening = true; }; } protected function addSubTween(_arg1:Function, _arg2:Object, _arg3:Object, _arg4:Object=null):void{ var _local6:String; var _local5:Object = {proxy:_arg1, target:_arg2, info:_arg4}; _subTweens.push(_local5); for (_local6 in _arg3) { if (_arg2.hasOwnProperty(_local6)){ if (typeof(_arg3[_local6]) == "number"){ this.tweens.push({o:_arg2, p:_local6, s:_arg2[_local6], c:(_arg3[_local6] - _arg2[_local6]), sub:_local5}); } else { this.tweens.push({o:_arg2, p:_local6, s:_arg2[_local6], c:Number(_arg3[_local6]), sub:_local5}); }; }; }; _hst = true; } public function initTweenVals(_arg1:Boolean=false, _arg2:String=""):void{ var _local4:String; var _local5:int; var _local6:Array; var _local7:ColorTransform; var _local8:ColorTransform; var _local9:Object; var _local3 = (this.target is DisplayObject); if ((this.target is Array)){ _local6 = ((this.vars.endArray) || ([])); _local5 = 0; while (_local5 < _local6.length) { if (((!((this.target[_local5] == _local6[_local5]))) && (!((this.target[_local5] == undefined))))){ this.tweens.push({o:this.target, p:_local5.toString(), s:this.target[_local5], c:(_local6[_local5] - this.target[_local5])}); }; _local5++; }; } else { for (_local4 in this.vars) { if ((((((((((((((((((((((((((((((((((((_local4 == "ease")) || ((_local4 == "delay")))) || ((_local4 == "overwrite")))) || ((_local4 == "onComplete")))) || ((_local4 == "onCompleteParams")))) || ((_local4 == "onCompleteScope")))) || ((_local4 == "runBackwards")))) || ((_local4 == "onUpdate")))) || ((_local4 == "onUpdateParams")))) || ((_local4 == "onUpdateScope")))) || ((_local4 == "autoAlpha")))) || ((_local4 == "onStart")))) || ((_local4 == "onStartParams")))) || ((_local4 == "onStartScope")))) || ((_local4 == "renderOnStart")))) || ((_local4 == "proxiedEase")))) || ((_local4 == "easeParams")))) || (((_arg1) && (!((_arg2.indexOf(((" " + _local4) + " ")) == -1))))))){ } else { if ((((_local4 == "tint")) && (_local3))){ _local7 = this.target.transform.colorTransform; _local8 = new ColorTransform(); if (this.vars.alpha != undefined){ _local8.alphaMultiplier = this.vars.alpha; delete this.vars.alpha; _local5 = (this.tweens.length - 1); while (_local5 > -1) { if (this.tweens[_local5].p == "alpha"){ this.tweens.splice(_local5, 1); break; }; _local5--; }; } else { _local8.alphaMultiplier = this.target.alpha; }; if (((((!((this.vars[_local4] == null))) && (!((this.vars[_local4] == ""))))) || ((this.vars[_local4] == 0)))){ _local8.color = this.vars[_local4]; }; addSubTween(tintProxy, {progress:0}, {progress:1}, {target:this.target, color:_local7, endColor:_local8}); } else { if ((((_local4 == "frame")) && (_local3))){ addSubTween(frameProxy, {frame:this.target.currentFrame}, {frame:this.vars[_local4]}, {target:this.target}); } else { if ((((_local4 == "volume")) && (((_local3) || ((this.target is SoundChannel)))))){ addSubTween(volumeProxy, this.target.soundTransform, {volume:this.vars[_local4]}, {target:this.target}); } else { if (typeof(this.vars[_local4]) == "number"){ this.tweens.push({o:this.target, p:_local4, s:this.target[_local4], c:(this.vars[_local4] - this.target[_local4])}); } else { this.tweens.push({o:this.target, p:_local4, s:this.target[_local4], c:Number(this.vars[_local4])}); }; }; }; }; }; }; }; if (this.vars.runBackwards == true){ _local5 = (this.tweens.length - 1); while (_local5 > -1) { _local9 = this.tweens[_local5]; this.tweens[_local5].s = (_local9.s + _local9.c); _local9.c = (_local9.c * -1); _local5--; }; }; if (typeof(this.vars.autoAlpha) == "number"){ this.target.visible = !((((this.vars.runBackwards == true)) && ((this.target.alpha == 0)))); }; _initted = true; } public function get active():Boolean{ if (_active){ return (true); }; if (((_curTime - this.initTime) / 1000) > this.delay){ _active = true; this.startTime = (this.initTime + (this.delay * 1000)); if (!_initted){ initTweenVals(); } else { if (typeof(this.vars.autoAlpha) == "number"){ this.target.visible = true; }; }; if (this.vars.onStart != null){ this.vars.onStart.apply(this.vars.onStartScope, 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 _local4:Object; var _local5:int; var _local2:Number = ((_arg1 - this.startTime) / 1000); if (_local2 > this.duration){ _local2 = this.duration; }; var _local3:Number = 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 (this.vars.onUpdate != null){ this.vars.onUpdate.apply(this.vars.onUpdateScope, 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 complete(_arg1:Boolean=false):void{ if (!_arg1){ if (!_initted){ initTweenVals(); }; this.startTime = (_curTime - (this.duration * 1000)); render(_curTime); return; }; if ((((typeof(this.vars.autoAlpha) == "number")) && ((this.target.alpha == 0)))){ this.target.visible = false; }; if (this.vars.onComplete != null){ this.vars.onComplete.apply(this.vars.onCompleteScope, this.vars.onCompleteParams); }; removeTween(this); } 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))))){ 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, _arg4=null):TweenLite{ return (new TweenLite(_arg2, 0, {delay:_arg1, onComplete:_arg2, onCompleteParams:_arg3, onCompleteScope:_arg4, overwrite:false})); } 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 15
//MochiAd (mochi.as3.MochiAd) package mochi.as3 { import flash.events.*; import flash.display.*; import flash.utils.*; import flash.net.*; import flash.system.*; public class MochiAd { public static function getVersion():String{ return (MochiServices.getVersion()); } public static function showClickAwayAd(_arg1:Object):void{ var clip:Object; var mc:MovieClip; var chk:MovieClip; var options = _arg1; var DEFAULTS:Object = {ad_timeout:5500, regpt:"o", method:"showClickAwayAd", res:"300x250", no_bg:true, ad_started:function ():void{ }, ad_finished:function ():void{ }, ad_loaded:function (_arg1:Number, _arg2:Number):void{ }, ad_failed:function ():void{ trace("[MochiAd] Couldn't load an ad, make sure your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software"); }, ad_skipped:function ():void{ }}; options = MochiAd._parseOptions(options, DEFAULTS); clip = options.clip; var ad_timeout:Number = options.ad_timeout; delete options.ad_timeout; if (!MochiAd.load(options)){ options.ad_failed(); options.ad_finished(); return; }; options.ad_started(); mc = clip._mochiad; mc["onUnload"] = function ():void{ MochiAd._cleanup(mc); options.ad_finished(); }; var wh:Array = MochiAd._getRes(options, clip); var w:Number = wh[0]; var h:Number = wh[1]; mc.x = (w * 0.5); mc.y = (h * 0.5); chk = createEmptyMovieClip(mc, "_mochiad_wait", 3); chk.ad_timeout = ad_timeout; chk.started = getTimer(); chk.showing = false; mc.unloadAd = function ():void{ MochiAd.unload(clip); }; mc.adLoaded = options.ad_loaded; mc.adSkipped = options.ad_skipped; mc.rpc = function (_arg1:Number, _arg2:Object):void{ MochiAd.rpc(clip, _arg1, _arg2); }; chk["onEnterFrame"] = function ():void{ var _local4:Number; if (!this.parent){ delete this.onEnterFrame; return; }; var _local1:Object = this.parent._mochiad_ctr; var _local2:Number = (getTimer() - this.started); var _local3:Boolean; if (!chk.showing){ _local4 = this.parent._mochiad_ctr.contentLoaderInfo.bytesTotal; if (_local4 > 0){ chk.showing = true; _local3 = true; chk.started = getTimer(); } else { if (_local2 > chk.ad_timeout){ options.ad_failed(); _local3 = true; }; }; }; if (this.root == null){ _local3 = true; }; if (_local3){ delete this.onEnterFrame; }; }; doOnEnterFrame(chk); } public static function _isNetworkAvailable():Boolean{ return (!((Security.sandboxType == "localWithFile"))); } public static function _allowDomains(_arg1:String):String{ var _local2:String = _arg1.split("/")[2].split(":")[0]; if (Security.sandboxType == "application"){ return (_local2); }; Security.allowDomain("*"); Security.allowDomain(_local2); Security.allowInsecureDomain("*"); Security.allowInsecureDomain(_local2); return (_local2); } public static function unload(_arg1:Object):Boolean{ if (((_arg1.clip) && (_arg1.clip._mochiad))){ _arg1 = _arg1.clip; }; if (_arg1.origFrameRate != undefined){ _arg1.stage.frameRate = _arg1.origFrameRate; }; if (!_arg1._mochiad){ return (false); }; if (_arg1._mochiad._containerLCName != undefined){ _arg1._mochiad.lc.send(_arg1._mochiad._containerLCName, "notify", {id:"unload"}); }; if (_arg1._mochiad.onUnload){ _arg1._mochiad.onUnload(); }; delete _arg1._mochiad_loaded; delete _arg1._mochiad; return (true); } public static function showInterLevelAd(_arg1:Object):void{ var clip:Object; var mc:MovieClip; var chk:MovieClip; var options = _arg1; var DEFAULTS:Object = {ad_timeout:5500, fadeout_time:250, regpt:"o", method:"showTimedAd", ad_started:function ():void{ if ((this.clip is MovieClip)){ this.clip.stop(); } else { throw (new Error("MochiAd.showInterLevelAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers.")); }; }, ad_finished:function ():void{ if ((this.clip is MovieClip)){ this.clip.play(); } else { throw (new Error("MochiAd.showInterLevelAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers.")); }; }, ad_loaded:function (_arg1:Number, _arg2:Number):void{ }, ad_failed:function ():void{ trace("[MochiAd] Couldn't load an ad, make sure your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software"); }, ad_skipped:function ():void{ }}; options = MochiAd._parseOptions(options, DEFAULTS); clip = options.clip; var ad_msec:Number = 11000; var ad_timeout:Number = options.ad_timeout; delete options.ad_timeout; var fadeout_time:Number = options.fadeout_time; delete options.fadeout_time; if (!MochiAd.load(options)){ options.ad_failed(); options.ad_finished(); return; }; options.ad_started(); mc = clip._mochiad; mc["onUnload"] = function ():void{ MochiAd._cleanup(mc); options.ad_finished(); }; var wh:Array = MochiAd._getRes(options, clip); var w:Number = wh[0]; var h:Number = wh[1]; mc.x = (w * 0.5); mc.y = (h * 0.5); chk = createEmptyMovieClip(mc, "_mochiad_wait", 3); chk.ad_msec = ad_msec; chk.ad_timeout = ad_timeout; chk.started = getTimer(); chk.showing = false; chk.fadeout_time = fadeout_time; chk.fadeFunction = function ():void{ if (!this.parent){ delete this.onEnterFrame; delete this.fadeFunction; return; }; var _local1:Number = (100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time))); if (_local1 > 0){ this.parent.alpha = (_local1 * 0.01); } else { MochiAd.unload(clip); delete this["onEnterFrame"]; }; }; mc.unloadAd = function ():void{ MochiAd.unload(clip); }; mc.adLoaded = options.ad_loaded; mc.adSkipped = options.ad_skipped; mc.adjustProgress = function (_arg1:Number):void{ var _local2:Object = mc._mochiad_wait; _local2.server_control = true; _local2.showing = true; _local2.started = getTimer(); _local2.ad_msec = (_arg1 - 250); }; mc.rpc = function (_arg1:Number, _arg2:Object):void{ MochiAd.rpc(clip, _arg1, _arg2); }; chk["onEnterFrame"] = function ():void{ var _local4:Number; if (!this.parent){ delete this.onEnterFrame; delete this.fadeFunction; return; }; var _local1:Object = this.parent._mochiad_ctr; var _local2:Number = (getTimer() - this.started); var _local3:Boolean; if (!chk.showing){ _local4 = this.parent._mochiad_ctr.contentLoaderInfo.bytesTotal; if (_local4 > 0){ chk.showing = true; chk.started = getTimer(); MochiAd.adShowing(clip); } else { if (_local2 > chk.ad_timeout){ options.ad_failed(); _local3 = true; }; }; }; if (_local2 > chk.ad_msec){ _local3 = true; }; if (_local3){ if (this.server_control){ delete this.onEnterFrame; } else { this.fadeout_start = getTimer(); this.onEnterFrame = this.fadeFunction; }; }; }; doOnEnterFrame(chk); } public static function _parseOptions(_arg1:Object, _arg2:Object):Object{ var _local4:String; var _local5:Array; var _local6:Number; var _local7:Array; var _local3:Object = {}; for (_local4 in _arg2) { _local3[_local4] = _arg2[_local4]; }; if (_arg1){ for (_local4 in _arg1) { _local3[_local4] = _arg1[_local4]; }; }; if (_local3.clip == undefined){ throw (new Error("MochiAd is missing the 'clip' parameter. This should be a MovieClip, Sprite or an instance of a class that extends MovieClip or Sprite.")); }; _arg1 = _local3.clip.loaderInfo.parameters.mochiad_options; if (_arg1){ _local5 = _arg1.split("&"); _local6 = 0; while (_local6 < _local5.length) { _local7 = _local5[_local6].split("="); _local3[unescape(_local7[0])] = unescape(_local7[1]); _local6++; }; }; if (_local3.id == "test"){ trace("[MochiAd] WARNING: Using the MochiAds test identifier, make sure to use the code from your dashboard, not this example!"); }; return (_local3); } public static function _cleanup(_arg1:Object):void{ var k:String; var lc:LocalConnection; var f:Function; var mc = _arg1; if (("lc" in mc)){ lc = mc.lc; f = function ():void{ try { lc.client = null; lc.close(); } catch(e:Error) { }; }; setTimeout(f, 0); }; var idx:Number = DisplayObjectContainer(mc).numChildren; while (idx > 0) { idx = (idx - 1); DisplayObjectContainer(mc).removeChildAt(idx); }; for (k in mc) { delete mc[k]; }; } public static function load(_arg1:Object):MovieClip{ var clip:Object; var mc:MovieClip; var k:String; var server:String; var hostname:String; var lc:LocalConnection; var name:String; var loader:Loader; var g:Function; var req:URLRequest; var v:Object; var options = _arg1; var DEFAULTS:Object = {server:"http://x.mochiads.com/srv/1/", method:"load", depth:10333, id:"_UNKNOWN_"}; options = MochiAd._parseOptions(options, DEFAULTS); options.swfv = 9; options.mav = MochiAd.getVersion(); clip = options.clip; if (!(clip is DisplayObject)){ trace("Warning: Object passed as container clip not a descendant of the DisplayObject type"); return (null); }; if (MovieClip(clip).stage == null){ trace("Warning: Container clip for ad is not attached to the stage"); return (null); }; if (!MochiAd._isNetworkAvailable()){ return (null); }; try { if (clip._mochiad_loaded){ return (null); }; } catch(e:Error) { throw (new Error("MochiAd requires a clip that is an instance of a dynamic class. If your class extends Sprite or MovieClip, you must make it dynamic.")); }; var depth:Number = options.depth; delete options.depth; mc = createEmptyMovieClip(clip, "_mochiad", depth); var wh:Array = MochiAd._getRes(options, clip); options.res = ((wh[0] + "x") + wh[1]); options.server = (options.server + options.id); delete options.id; clip._mochiad_loaded = true; if (clip.loaderInfo.loaderURL.indexOf("http") == 0){ options.as3_swf = clip.loaderInfo.loaderURL; } else { trace("[MochiAd] NOTE: Security Sandbox Violation errors below are normal"); }; var lv:URLVariables = new URLVariables(); for (k in options) { v = options[k]; if (!(v is Function)){ lv[k] = v; }; }; server = lv.server; delete lv.server; hostname = _allowDomains(server); lc = new LocalConnection(); lc.client = mc; name = ["", Math.floor(new Date().getTime()), Math.floor((Math.random() * 999999))].join("_"); lc.allowDomain("*", "localhost"); lc.allowInsecureDomain("*", "localhost"); lc.connect(name); mc.lc = lc; mc.lcName = name; lv.lc = name; lv.st = getTimer(); mc.regContLC = function (_arg1:String):void{ mc._containerLCName = _arg1; }; loader = new Loader(); g = function (_arg1:Object):void{ _arg1.target.removeEventListener(_arg1.type, arguments.callee); MochiAd.unload(clip); }; loader.contentLoaderInfo.addEventListener(Event.UNLOAD, g); req = new URLRequest(((server + ".swf?cacheBust=") + new Date().getTime())); req.contentType = "application/x-www-form-urlencoded"; req.method = URLRequestMethod.POST; req.data = lv; loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, function (_arg1:IOErrorEvent):void{ trace("[MochiAds] Blocked URL"); }); if (!options.skip){ loader.load(req); }; mc.addChild(loader); mc._mochiad_ctr = loader; return (mc); } public static function runMethod(_arg1:Object, _arg2:String, _arg3:Array):Object{ var _local4:Array = _arg2.split("."); var _local5:Number = 0; while (_local5 < (_local4.length - 1)) { if ((((_arg1[_local4[_local5]] == undefined)) || ((_arg1[_local4[_local5]] == null)))){ return (undefined); }; _arg1 = _arg1[_local4[_local5]]; _local5++; }; if (typeof(_arg1[_local4[_local5]]) == "function"){ return (_arg1[_local4[_local5]].apply(_arg1, _arg3)); }; return (undefined); } public static function createEmptyMovieClip(_arg1:Object, _arg2:String, _arg3:Number):MovieClip{ var _local4:MovieClip = new MovieClip(); if (((false) && (_arg3))){ _arg1.addChildAt(_local4, _arg3); } else { _arg1.addChild(_local4); }; _arg1[_arg2] = _local4; _local4["_name"] = _arg2; return (_local4); } public static function _getRes(_arg1:Object, _arg2:Object):Array{ var _local6:Array; var _local3:Object = _arg2.getBounds(_arg2.root); var _local4:Number = 0; var _local5:Number = 0; if (typeof(_arg1.res) != "undefined"){ _local6 = _arg1.res.split("x"); _local4 = parseFloat(_local6[0]); _local5 = parseFloat(_local6[1]); } else { _local4 = (_local3.right - _local3.left); _local5 = (_local3.top - _local3.bottom); }; if ((((_local4 == 0)) || ((_local5 == 0)))){ _local4 = _arg2.stage.stageWidth; _local5 = _arg2.stage.stageHeight; }; return ([_local4, _local5]); } public static function adShowing(_arg1:Object):void{ _arg1.origFrameRate = _arg1.stage.frameRate; _arg1.stage.frameRate = 30; } public static function getValue(_arg1:Object, _arg2:String):Object{ var _local3:Array = _arg2.split("."); var _local4:Number = 0; while (_local4 < (_local3.length - 1)) { if ((((_arg1[_local3[_local4]] == undefined)) || ((_arg1[_local3[_local4]] == null)))){ return (undefined); }; _arg1 = _arg1[_local3[_local4]]; _local4++; }; return (_arg1[_local3[_local4]]); } public static function rpc(_arg1:Object, _arg2:Number, _arg3:Object):void{ var _local4:Object; var _local5:Object; switch (_arg3.id){ case "setValue": MochiAd.setValue(_arg1, _arg3.objectName, _arg3.value); break; case "getValue": _local4 = MochiAd.getValue(_arg1, _arg3.objectName); _arg1._mochiad.lc.send(_arg1._mochiad._containerLCName, "rpcResult", _arg2, _local4); break; case "runMethod": _local5 = MochiAd.runMethod(_arg1, _arg3.method, _arg3.args); _arg1._mochiad.lc.send(_arg1._mochiad._containerLCName, "rpcResult", _arg2, _local5); break; default: trace(("[mochiads rpc] unknown rpc id: " + _arg3.id)); }; } public static function setValue(_arg1:Object, _arg2:String, _arg3:Object):void{ var _local4:Array = _arg2.split("."); var _local5:Number = 0; while (_local5 < (_local4.length - 1)) { if ((((_arg1[_local4[_local5]] == undefined)) || ((_arg1[_local4[_local5]] == null)))){ return; }; _arg1 = _arg1[_local4[_local5]]; _local5++; }; _arg1[_local4[_local5]] = _arg3; } public static function showPreGameAd(_arg1:Object):void{ var clip:Object; var mc:MovieClip; var chk:MovieClip; var complete:Boolean; var unloaded:Boolean; var sendHostProgress:Boolean; var fn:Function; var r:MovieClip; var options = _arg1; var DEFAULTS:Object = {ad_timeout:5500, fadeout_time:250, regpt:"o", method:"showPreloaderAd", color:0xFF8A00, background:16777161, outline:13994812, no_progress_bar:false, ad_started:function ():void{ if ((this.clip is MovieClip)){ this.clip.stop(); } else { throw (new Error("MochiAd.showPreGameAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers.")); }; }, ad_finished:function ():void{ if ((this.clip is MovieClip)){ this.clip.play(); } else { throw (new Error("MochiAd.showPreGameAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers.")); }; }, ad_loaded:function (_arg1:Number, _arg2:Number):void{ }, ad_failed:function ():void{ trace("[MochiAd] Couldn't load an ad, make sure your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software"); }, ad_skipped:function ():void{ }, ad_progress:function (_arg1:Number):void{ }, progress_override:function (_arg1:Object):Number{ return (NaN); }, bar_offset:0}; options = MochiAd._parseOptions(options, DEFAULTS); if ("c862232051e0a94e1c3609b3916ddb17".substr(0) == "dfeada81ac97cde83665f81c12da7def"){ options.ad_started(); fn = function ():void{ options.ad_finished(); }; setTimeout(fn, 100); return; }; clip = options.clip; var ad_msec:Number = 11000; var ad_timeout:Number = options.ad_timeout; if (options.skip){ ad_timeout = 0; }; delete options.ad_timeout; var fadeout_time:Number = options.fadeout_time; delete options.fadeout_time; if (!MochiAd.load(options)){ options.ad_failed(); options.ad_finished(); return; }; options.ad_started(); mc = clip._mochiad; mc["onUnload"] = function ():void{ MochiAd._cleanup(mc); var fn:Function = function ():void{ options.ad_finished(); }; setTimeout(fn, 100); }; var wh:Array = MochiAd._getRes(options, clip); var w:Number = wh[0]; var h:Number = wh[1]; mc.x = (w * 0.5); mc.y = (h * 0.5); chk = createEmptyMovieClip(mc, "_mochiad_wait", 3); chk.x = (w * -0.5); chk.y = (h * -0.5); var bar:MovieClip = createEmptyMovieClip(chk, "_mochiad_bar", 4); if (options.no_progress_bar){ bar.visible = false; delete options.no_progress_bar; } else { bar.x = (10 + options.bar_offset); bar.y = (h - 20); }; var bar_w:Number = ((w - bar.x) - 10); var bar_color:Number = options.color; delete options.color; var bar_background:Number = options.background; delete options.background; var bar_outline:Number = options.outline; delete options.outline; var backing_mc:MovieClip = createEmptyMovieClip(bar, "_outline", 1); var backing:Object = backing_mc.graphics; backing.beginFill(bar_background); backing.moveTo(0, 0); backing.lineTo(bar_w, 0); backing.lineTo(bar_w, 10); backing.lineTo(0, 10); backing.lineTo(0, 0); backing.endFill(); var inside_mc:MovieClip = createEmptyMovieClip(bar, "_inside", 2); var inside:Object = inside_mc.graphics; inside.beginFill(bar_color); inside.moveTo(0, 0); inside.lineTo(bar_w, 0); inside.lineTo(bar_w, 10); inside.lineTo(0, 10); inside.lineTo(0, 0); inside.endFill(); inside_mc.scaleX = 0; var outline_mc:MovieClip = createEmptyMovieClip(bar, "_outline", 3); var outline:Object = outline_mc.graphics; outline.lineStyle(0, bar_outline, 100); outline.moveTo(0, 0); outline.lineTo(bar_w, 0); outline.lineTo(bar_w, 10); outline.lineTo(0, 10); outline.lineTo(0, 0); chk.ad_msec = ad_msec; chk.ad_timeout = ad_timeout; chk.started = getTimer(); chk.showing = false; chk.last_pcnt = 0; chk.fadeout_time = fadeout_time; chk.fadeFunction = function ():void{ var _local1:Number = (100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time))); if (_local1 > 0){ this.parent.alpha = (_local1 * 0.01); } else { MochiAd.unload(clip); delete this["onEnterFrame"]; }; }; complete = false; unloaded = false; var progress:Number = Math.min(1, options.progress_override(clip)); var f:Function = function (_arg1:Event):void{ _arg1.target.removeEventListener(_arg1.type, arguments.callee); complete = true; if (unloaded){ MochiAd.unload(clip); }; }; if (!isNaN(progress)){ complete = (progress == 1); } else { if (clip.loaderInfo.bytesLoaded == clip.loaderInfo.bytesTotal){ complete = true; } else { if ((clip.root is MovieClip)){ r = (clip.root as MovieClip); if (r.framesLoaded >= r.totalFrames){ complete = true; } else { clip.loaderInfo.addEventListener(Event.COMPLETE, f); }; } else { clip.loaderInfo.addEventListener(Event.COMPLETE, f); }; }; }; mc.unloadAd = function ():void{ unloaded = true; if (complete){ MochiAd.unload(clip); }; }; mc.adLoaded = options.ad_loaded; mc.adSkipped = options.ad_skipped; mc.adjustProgress = function (_arg1:Number):void{ var _local2:Object = mc._mochiad_wait; _local2.server_control = true; _local2.showing = true; _local2.started = getTimer(); _local2.ad_msec = _arg1; }; mc.rpc = function (_arg1:Number, _arg2:Object):void{ MochiAd.rpc(clip, _arg1, _arg2); }; mc.rpcTestFn = function (_arg1:String):Object{ trace(("[MOCHIAD rpcTestFn] " + _arg1)); return (_arg1); }; sendHostProgress = false; mc.sendHostLoadProgress = function (_arg1:String):void{ sendHostProgress = true; }; chk["onEnterFrame"] = function ():void{ var _local12:Number; if (((!(this.parent)) || (!(this.parent.parent)))){ delete this["onEnterFrame"]; return; }; var _local1:Object = this.parent.parent.root; var _local2:Object = this.parent._mochiad_ctr; var _local3:Number = (getTimer() - this.started); var _local4:Boolean; var _local5:Number = _local1.loaderInfo.bytesTotal; var _local6:Number = _local1.loaderInfo.bytesLoaded; var _local7:Number = Math.min(1, options.progress_override(_local1)); if (_local7 == 1){ complete = true; }; if (complete){ _local6 = Math.max(1, _local6); _local5 = _local6; }; var _local8:Number = ((100 * _local6) / _local5); if (!isNaN(_local7)){ _local8 = (100 * _local7); }; var _local9:Number = ((100 * _local3) / chk.ad_msec); var _local10:Object = this._mochiad_bar._inside; var _local11:Number = Math.min(100, Math.min(((_local8) || (0)), _local9)); _local11 = Math.max(this.last_pcnt, _local11); this.last_pcnt = _local11; _local10.scaleX = (_local11 * 0.01); options.ad_progress(_local11); if (sendHostProgress){ clip._mochiad.lc.send(clip._mochiad._containerLCName, "notify", {id:"hostLoadPcnt", pcnt:_local8}); if (_local8 >= 100){ sendHostProgress = false; }; }; if (!chk.showing){ _local12 = this.parent._mochiad_ctr.contentLoaderInfo.bytesTotal; if (_local12 > 0){ chk.showing = true; chk.started = getTimer(); MochiAd.adShowing(clip); } else { if ((((_local3 > chk.ad_timeout)) && ((_local8 == 100)))){ options.ad_failed(); _local4 = true; }; }; }; if (_local3 > chk.ad_msec){ _local4 = true; }; if (((complete) && (_local4))){ if (unloaded){ MochiAd.unload(_local1); } else { if (this.server_control){ delete this.onEnterFrame; } else { this.fadeout_start = getTimer(); this.onEnterFrame = chk.fadeFunction; }; }; }; }; doOnEnterFrame(chk); } public static function showPreloaderAd(_arg1:Object):void{ trace("[MochiAd] DEPRECATED: showPreloaderAd was renamed to showPreGameAd in 2.0"); MochiAd.showPreGameAd(_arg1); } public static function showTimedAd(_arg1:Object):void{ trace("[MochiAd] DEPRECATED: showTimedAd was renamed to showInterLevelAd in 2.0"); MochiAd.showInterLevelAd(_arg1); } public static function doOnEnterFrame(_arg1:MovieClip):void{ var mc = _arg1; var f:Function = function (_arg1:Object):void{ if (((("onEnterFrame" in mc)) && (mc.onEnterFrame))){ mc.onEnterFrame(); } else { _arg1.target.removeEventListener(_arg1.type, arguments.callee); }; }; mc.addEventListener(Event.ENTER_FRAME, f); } } }//package mochi.as3
Section 16
//MochiCoins (mochi.as3.MochiCoins) package mochi.as3 { public class MochiCoins { public static const STORE_HIDE:String = "StoreHide"; public static const NO_USER:String = "NoUser"; public static const IO_ERROR:String = "IOError"; public static const ITEM_NEW:String = "ItemNew"; public static const ITEM_OWNED:String = "ItemOwned"; public static const STORE_ITEMS:String = "StoreItems"; public static const ERROR:String = "Error"; public static const STORE_SHOW:String = "StoreShow"; private static var _dispatcher:MochiEventDispatcher = new MochiEventDispatcher(); public static var _inventory:MochiInventory; public static function triggerEvent(_arg1:String, _arg2:Object):void{ _dispatcher.triggerEvent(_arg1, _arg2); } public static function removeEventListener(_arg1:String, _arg2:Function):void{ _dispatcher.removeEventListener(_arg1, _arg2); } public static function addEventListener(_arg1:String, _arg2:Function):void{ _dispatcher.addEventListener(_arg1, _arg2); } public static function getStoreItems():void{ MochiServices.send("coins_getStoreItems"); } public static function get inventory():MochiInventory{ return (_inventory); } public static function showStore(_arg1:Object=null):void{ MochiServices.setContainer(); MochiServices.bringToTop(); MochiServices.send("coins_showStore", {options:_arg1}, null, null); } public static function requestFunding(_arg1:Object=null):void{ MochiServices.setContainer(); MochiServices.bringToTop(); MochiServices.send("social_requestFunding", _arg1); } 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.setContainer(); MochiServices.bringToTop(); MochiServices.send("coins_showItem", {options:_arg1}, null, null); } public static function getVersion():String{ return (MochiServices.getVersion()); } 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.setContainer(); MochiServices.bringToTop(); MochiServices.send("coins_showVideo", {options:_arg1}, null, null); } addEventListener(MochiSocial.LOGGED_IN, function (_arg1:Object):void{ _inventory = new MochiInventory(); }); addEventListener(MochiSocial.LOGGED_OUT, function (_arg1:Object):void{ _inventory = null; }); } }//package mochi.as3
Section 17
//MochiDigits (mochi.as3.MochiDigits) package mochi.as3 { 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.as3
Section 18
//MochiEventDispatcher (mochi.as3.MochiEventDispatcher) package mochi.as3 { 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.as3
Section 19
//MochiEvents (mochi.as3.MochiEvents) package mochi.as3 { 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 endPlay():void{ MochiServices.send("events_clearRoundID", null, null, null); } public static function addEventListener(_arg1:String, _arg2:Function):void{ _dispatcher.addEventListener(_arg1, _arg2); } public static function trackEvent(_arg1:String, _arg2=null):void{ MochiServices.send("events_trackEvent", {tag:_arg1, value:_arg2}, null, null); } 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 getVersion():String{ return (MochiServices.getVersion()); } public static function startPlay(_arg1:String="gameplay"):void{ MochiServices.send("events_setRoundID", {tag:String(_arg1)}, null, null); } } }//package mochi.as3
Section 20
//MochiInventory (mochi.as3.MochiInventory) package mochi.as3 { import flash.events.*; import flash.utils.*; public dynamic class MochiInventory extends Proxy { private var _timer:Timer; private var _names:Array; private var _syncID:Number; private var _consumableProperties:Object; private var _storeSync:Object; private var _outstandingID:Number; private var _syncPending:Boolean; public static const READY:String = "InvReady"; public static const ERROR:String = "Error"; public static const IO_ERROR:String = "IoError"; private static const KEY_SALT:String = " syncMaint"; public static const WRITTEN:String = "InvWritten"; public static const NOT_READY:String = "InvNotReady"; public static const VALUE_ERROR:String = "InvValueError"; private static const CONSUMER_KEY:String = "MochiConsumables"; private static var _dispatcher:MochiEventDispatcher = new MochiEventDispatcher(); public function MochiInventory():void{ MochiCoins.addEventListener(MochiCoins.ITEM_OWNED, itemOwned); MochiCoins.addEventListener(MochiCoins.ITEM_NEW, newItems); MochiSocial.addEventListener(MochiSocial.LOGGED_IN, loggedIn); MochiSocial.addEventListener(MochiSocial.LOGGED_OUT, loggedOut); _storeSync = new Object(); _syncPending = false; _outstandingID = 0; _syncID = 0; _timer = new Timer(1000); _timer.addEventListener(TimerEvent.TIMER, sync); _timer.start(); if (MochiSocial.loggedIn){ loggedIn(); } else { loggedOut(); }; } private function newItems(_arg1:Object):void{ if (!this[(_arg1.id + KEY_SALT)]){ this[(_arg1.id + KEY_SALT)] = 0; }; if (!this[_arg1.id]){ this[_arg1.id] = 0; }; this[(_arg1.id + KEY_SALT)] = (this[(_arg1.id + KEY_SALT)] + _arg1.count); this[_arg1.id] = (this[_arg1.id] + _arg1.count); if (((_arg1.privateProperties) && (_arg1.privateProperties.consumable))){ if (!this[_arg1.privateProperties.tag]){ this[_arg1.privateProperties.tag] = 0; }; this[_arg1.privateProperties.tag] = (this[_arg1.privateProperties.tag] + (_arg1.privateProperties.inc * _arg1.count)); }; } public function release():void{ MochiCoins.removeEventListener(MochiCoins.ITEM_NEW, newItems); MochiSocial.removeEventListener(MochiSocial.LOGGED_IN, loggedIn); MochiSocial.removeEventListener(MochiSocial.LOGGED_OUT, loggedOut); } override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function getProperty(_arg1){ if (_consumableProperties == null){ triggerEvent(ERROR, {type:NOT_READY}); return (-1); }; if (_consumableProperties[_arg1]){ return (MochiDigits(_consumableProperties[_arg1]).value); }; return (undefined); } private function loggedIn(_arg1:Object=null):void{ MochiUserData.get(CONSUMER_KEY, getConsumableBag); } override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function hasProperty(_arg1):Boolean{ if (_consumableProperties == null){ triggerEvent(ERROR, {type:NOT_READY}); return (false); }; if (_consumableProperties[_arg1] == undefined){ return (false); }; return (true); } override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function nextNameIndex(_arg1:int):int{ return (((_arg1)>=_names.length) ? 0 : (_arg1 + 1)); } private function putConsumableBag(_arg1:MochiUserData):void{ _syncPending = false; if (_arg1.error){ triggerEvent(ERROR, {type:IO_ERROR, error:_arg1.error}); _outstandingID = -1; }; triggerEvent(WRITTEN, {}); } override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function setProperty(_arg1, _arg2):void{ var _local3:MochiDigits; if (_consumableProperties == null){ triggerEvent(ERROR, {type:NOT_READY}); return; }; if (!(_arg2 is Number)){ triggerEvent(ERROR, {type:VALUE_ERROR, error:"Invalid type", arg:_arg2}); return; }; if (_consumableProperties[_arg1]){ _local3 = MochiDigits(_consumableProperties[_arg1]); if (_local3.value == _arg2){ return; }; _local3.value = _arg2; } else { _names.push(_arg1); _consumableProperties[_arg1] = new MochiDigits(_arg2); }; _syncID++; } private function itemOwned(_arg1:Object):void{ _storeSync[_arg1.id] = {properties:_arg1.properties, count:_arg1.count}; } private function sync(_arg1:Event=null):void{ var _local3:String; if (((_syncPending) || ((_syncID == _outstandingID)))){ return; }; _outstandingID = _syncID; var _local2:Object = {}; for (_local3 in _consumableProperties) { _local2[_local3] = MochiDigits(_consumableProperties[_local3]).value; }; MochiUserData.put(CONSUMER_KEY, _local2, putConsumableBag); _syncPending = true; } override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function nextName(_arg1:int):String{ return (_names[(_arg1 - 1)]); } override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function deleteProperty(_arg1):Boolean{ if (!_consumableProperties[_arg1]){ return (false); }; _names.splice(_names.indexOf(_arg1), 1); delete _consumableProperties[_arg1]; return (true); } private function getConsumableBag(_arg1:MochiUserData):void{ var _local2:String; var _local3:Number; if (_arg1.error){ triggerEvent(ERROR, {type:IO_ERROR, error:_arg1.error}); return; }; _consumableProperties = {}; _names = new Array(); if (_arg1.data){ for (_local2 in _arg1.data) { _names.push(_local2); _consumableProperties[_local2] = new MochiDigits(_arg1.data[_local2]); }; }; for (_local2 in _storeSync) { _local3 = _storeSync[_local2].count; if (_consumableProperties[(_local2 + KEY_SALT)]){ _local3 = (_local3 - _consumableProperties[(_local2 + KEY_SALT)].value); }; if (_local3 == 0){ } else { newItems({id:_local2, count:_local3, properties:_storeSync[_local2].properties}); }; }; triggerEvent(READY, {}); } private function loggedOut(_arg1:Object=null):void{ _consumableProperties = null; } public static function triggerEvent(_arg1:String, _arg2:Object):void{ _dispatcher.triggerEvent(_arg1, _arg2); } public static function removeEventListener(_arg1:String, _arg2:Function):void{ _dispatcher.removeEventListener(_arg1, _arg2); } public static function addEventListener(_arg1:String, _arg2:Function):void{ _dispatcher.addEventListener(_arg1, _arg2); } } }//package mochi.as3
Section 21
//MochiScores (mochi.as3.MochiScores) package mochi.as3 { 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.as3
Section 22
//MochiServices (mochi.as3.MochiServices) package mochi.as3 { import flash.events.*; import flash.display.*; import flash.utils.*; import flash.net.*; import flash.geom.*; import flash.system.*; public class MochiServices { public static const CONNECTED:String = "onConnected"; private static var _container:Object; private static var _connected:Boolean = false; private static var _queue:Array; private static var _swfVersion:String; private static var _preserved:Object; public static var netupAttempted:Boolean = false; private static var _sendChannel:LocalConnection; private static var _nextCallbackID:Number; private static var _clip:MovieClip; private static var _loader:Loader; 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 _dispatcher:MochiEventDispatcher = new MochiEventDispatcher(); private static var _callbacks:Object; 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 = _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 _callbacks[cb]; } 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:_nextCallbackID}); } else { if ((((_clip == null)) || (!(_connecting)))){ trace(("Error: MochiServices not connected. Please call MochiServices.connect(). Function: " + _arg1)); handleError(_arg2, _arg3, _arg4); flush(true); return; }; _queue.push({methodName:_arg1, args:_arg2, callbackID:_nextCallbackID}); }; if (_clip != null){ if (_callbacks != null){ _callbacks[_nextCallbackID] = {callbackObject:_arg3, callbackMethod:_arg4}; _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); } private static function detach(_arg1:Event):void{ var _local2:LoaderInfo = LoaderInfo(_arg1.target); _local2.removeEventListener(Event.COMPLETE, detach); _local2.removeEventListener(IOErrorEvent.IO_ERROR, detach); _local2.removeEventListener(Event.COMPLETE, loadLCBridgeComplete); _local2.removeEventListener(IOErrorEvent.IO_ERROR, loadError); } public static function stayOnTop():void{ _container.addEventListener(Event.ENTER_FRAME, MochiServices.bringToTop, false, 0, true); if (_clip != null){ _clip.visible = true; }; } private static function loadLCBridgeComplete(_arg1:Event):void{ var _local2:Loader = LoaderInfo(_arg1.target).loader; _mochiLocalConnection = MovieClip(_local2.content); listen(); } 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(); _timer.removeEventListener(TimerEvent.TIMER, connectWait); _timer = null; } 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.9.2 as3"); } public static function doClose():void{ _container.removeEventListener(Event.ENTER_FRAME, MochiServices.bringToTop); } 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++; }; } private static function flush(_arg1:Boolean):void{ var _local2:Object; var _local3:Object; if (((_clip) && (_queue))){ while (_queue.length > 0) { _local2 = _queue.shift(); _local3 = null; if (_local2 != null){ if (_local2.callbackID != null){ _local3 = _callbacks[_local2.callbackID]; }; delete _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 "services": MochiServices.triggerEvent(_arg1.event, _arg1.args); break; case "events": MochiEvents.triggerEvent(_arg1.event, _arg1.args); break; case "coins": MochiCoins.triggerEvent(_arg1.event, _arg1.args); break; case "social": MochiSocial.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 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://link.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 setContainer(_arg1:Object=null, _arg2:Boolean=true):void{ if (_clip.parent){ _clip.parent.removeChild(_clip); }; if (_arg1 != null){ if ((_arg1 is DisplayObjectContainer)){ _container = _arg1; }; }; if (_arg2){ if ((_container is DisplayObjectContainer)){ DisplayObjectContainer(_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"); } public static function get childClip():Object{ return (_clip); } 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, version:getVersion(), parentURL:_container.loaderInfo.loaderURL}); _clip.onReceive = onReceive; _clip.onEvent = onEvent; _clip.onError = function ():void{ MochiServices.onError("IOError"); }; while (_queue.length > 0) { _mochiLocalConnection.send(_sendChannelName, "onReceive", _queue.shift()); }; }; } public static function triggerEvent(_arg1:String, _arg2:Object):void{ _dispatcher.triggerEvent(_arg1, _arg2); } public static function removeEventListener(_arg1:String, _arg2:Function):void{ _dispatcher.removeEventListener(_arg1, _arg2); } 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 addEventListener(_arg1:String, _arg2:Function):void{ _dispatcher.addEventListener(_arg1, _arg2); } private static function loadLCBridge(_arg1:Object):void{ var _local2:Loader = new Loader(); var _local3:String = (_servURL + _mochiLC); var _local4:URLRequest = new URLRequest(_local3); _local2.contentLoaderInfo.addEventListener(Event.COMPLETE, detach); _local2.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, detach); _local2.contentLoaderInfo.addEventListener(Event.COMPLETE, loadLCBridgeComplete); _local2.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, loadError); _local2.load(_local4); _arg1.addChild(_local2); } 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{ if (_clip != null){ return (_clip); }; if (!MochiServices.isNetworkAvailable()){ return (null); }; if (urlOptions(_arg2).servURL){ _servURL = urlOptions(_arg2).servURL; }; var _local3:String = (_servURL + _services); if (urlOptions(_arg2).servicesURL){ _local3 = urlOptions(_arg2).servicesURL; }; _listenChannelName = (_listenChannelName + ((Math.floor(new Date().time) + "_") + Math.floor((Math.random() * 99999)))); MochiServices.allowDomains(_local3); _clip = new MovieClip(); loadLCBridge(_clip); _loader = new Loader(); _loader.contentLoaderInfo.addEventListener(Event.COMPLETE, detach); _loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, detach); _loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, loadError); var _local4:URLRequest = new URLRequest(_local3); var _local5:URLVariables = new URLVariables(); _local5.listenLC = _listenChannelName; _local5.mochiad_options = _arg2.loaderInfo.parameters.mochiad_options; _local5.api_version = getVersion(); if (widget){ _local5.widget = true; }; _local4.data = _local5; _loader.load(_local4); _clip.addChild(_loader); _sendChannel = new LocalConnection(); _queue = []; _nextCallbackID = 0; _callbacks = {}; _timer = new Timer(10000, 1); _timer.addEventListener(TimerEvent.TIMER, connectWait); _timer.start(); return (_clip); } public static function get clip():Object{ return (_container); } 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 (clip.stage == null){ trace("MochiServices connect requires the containing clip be attached to the stage"); }; 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 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"); } else { _timer.stop(); _timer.removeEventListener(TimerEvent.TIMER, connectWait); _timer = null; }; } } }//package mochi.as3
Section 23
//MochiSocial (mochi.as3.MochiSocial) package mochi.as3 { public class MochiSocial { public static const LOGGED_IN:String = "LoggedIn"; public static const ACTION_CANCELED:String = "onCancel"; public static const PROPERTIES_SIZE:String = "PropertiesSize"; public static const IO_ERROR:String = "IOError"; public static const NO_USER:String = "NoUser"; public static const FRIEND_LIST:String = "FriendsList"; public static const PROFILE_DATA:String = "ProfileData"; public static const GAMEPLAY_DATA:String = "GameplayData"; public static const ACTION_COMPLETE:String = "onComplete"; public static const LOGIN_SHOW:String = "LoginShow"; public static const PROFILE_HIDE:String = "ProfileHide"; public static const USER_INFO:String = "UserInfo"; 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_SHOWN:String = "LoginShown"; public static var _user_info:Object = null; private static var _dispatcher:MochiEventDispatcher = new MochiEventDispatcher(); public static function requestFan(_arg1:Object=null):void{ MochiServices.setContainer(); MochiServices.bringToTop(); MochiServices.send("social_requestFan", _arg1); } public static function postToStream(_arg1:Object=null):void{ MochiServices.setContainer(); MochiServices.bringToTop(); MochiServices.send("social_postToStream", _arg1); } public static function getFriendsList(_arg1:Object=null):void{ MochiServices.send("social_getFriendsList", _arg1); } public static function requestLogin(_arg1:Object=null):void{ MochiServices.setContainer(); MochiServices.bringToTop(); MochiServices.send("social_requestLogin", _arg1); } public static function getVersion():String{ return (MochiServices.getVersion()); } public static function saveUserProperties(_arg1:Object):void{ MochiServices.send("social_saveUserProperties", _arg1); } public static function triggerEvent(_arg1:String, _arg2:Object):void{ _dispatcher.triggerEvent(_arg1, _arg2); } public static function removeEventListener(_arg1:String, _arg2:Function):void{ _dispatcher.removeEventListener(_arg1, _arg2); } public static function inviteFriends(_arg1:Object=null):void{ MochiServices.setContainer(); MochiServices.bringToTop(); MochiServices.send("social_inviteFriends", _arg1); } public static function get loggedIn():Boolean{ return (!((_user_info == null))); } public static function addEventListener(_arg1:String, _arg2:Function):void{ _dispatcher.addEventListener(_arg1, _arg2); } public static function showLoginWidget(_arg1:Object=null):void{ MochiServices.setContainer(); MochiServices.bringToTop(); MochiServices.send("social_showLoginWidget", {options:_arg1}); } public static function getAPIURL():String{ if (!_user_info){ return (null); }; return (_user_info.api_url); } public static function hideLoginWidget():void{ MochiServices.send("social_hideLoginWidget"); } public static function getAPIToken():String{ if (!_user_info){ return (null); }; return (_user_info.api_token); } MochiSocial.addEventListener(MochiSocial.LOGGED_IN, function (_arg1:Object):void{ _user_info = _arg1; }); MochiSocial.addEventListener(MochiSocial.LOGGED_OUT, function (_arg1:Object):void{ _user_info = null; }); } }//package mochi.as3
Section 24
//MochiUserData (mochi.as3.MochiUserData) package mochi.as3 { import flash.events.*; import flash.utils.*; import flash.net.*; public class MochiUserData extends EventDispatcher { public var callback:Function;// = null public var operation:String;// = null public var error:Event;// = null public var data;// = null public var _loader:URLLoader; public var key:String;// = null public function MochiUserData(_arg1:String="", _arg2:Function=null){ this.key = _arg1; this.callback = _arg2; } public function serialize(_arg1):ByteArray{ var _local2:ByteArray = new ByteArray(); _local2.objectEncoding = ObjectEncoding.AMF3; _local2.writeObject(_arg1); _local2.compress(); return (_local2); } public function errorHandler(_arg1:IOErrorEvent):void{ data = null; error = _arg1; if (callback != null){ performCallback(); } else { dispatchEvent(_arg1); }; close(); } public function putEvent(_arg1):void{ request("put", serialize(_arg1)); } public function deserialize(_arg1:ByteArray){ _arg1.objectEncoding = ObjectEncoding.AMF3; _arg1.uncompress(); return (_arg1.readObject()); } public function securityErrorHandler(_arg1:SecurityErrorEvent):void{ errorHandler(new IOErrorEvent(IOErrorEvent.IO_ERROR, false, false, ("security error: " + _arg1.toString()))); } public function getEvent():void{ request("get", serialize(null)); } override public function toString():String{ return ((((((((("[MochiUserData operation=" + operation) + " key=\"") + key) + "\" data=") + data) + " error=\"") + error) + "\"]")); } public function performCallback():void{ try { callback(this); } catch(e:Error) { trace(("[MochiUserData] exception during callback: " + e)); }; } public function request(_arg1:String, _arg2:ByteArray):void{ var _operation = _arg1; var _data = _arg2; operation = _operation; var api_url:String = MochiSocial.getAPIURL(); var api_token:String = MochiSocial.getAPIToken(); if ((((api_url == null)) || ((api_token == null)))){ errorHandler(new IOErrorEvent(IOErrorEvent.IO_ERROR, false, false, "not logged in")); return; }; _loader = new URLLoader(); var args:URLVariables = new URLVariables(); args.op = _operation; args.key = key; var req:URLRequest = new URLRequest((((MochiSocial.getAPIURL() + "/") + "MochiUserData?") + args.toString())); req.method = URLRequestMethod.POST; req.contentType = "application/x-mochi-userdata"; req.requestHeaders = [new URLRequestHeader("x-mochi-services-version", MochiServices.getVersion()), new URLRequestHeader("x-mochi-api-token", api_token)]; req.data = _data; _loader.dataFormat = URLLoaderDataFormat.BINARY; _loader.addEventListener(Event.COMPLETE, completeHandler); _loader.addEventListener(IOErrorEvent.IO_ERROR, errorHandler); _loader.addEventListener(SecurityErrorEvent.SECURITY_ERROR, securityErrorHandler); try { _loader.load(req); } catch(e:SecurityError) { errorHandler(new IOErrorEvent(IOErrorEvent.IO_ERROR, false, false, ("security error: " + e.toString()))); }; } public function completeHandler(_arg1:Event):void{ var event = _arg1; try { if (_loader.data.length){ data = deserialize(_loader.data); } else { data = null; }; } catch(e:Error) { errorHandler(new IOErrorEvent(IOErrorEvent.IO_ERROR, false, false, ("deserialize error: " + e.toString()))); return; }; if (callback != null){ performCallback(); } else { dispatchEvent(event); }; close(); } public function close():void{ if (_loader){ _loader.removeEventListener(Event.COMPLETE, completeHandler); _loader.removeEventListener(IOErrorEvent.IO_ERROR, errorHandler); _loader.removeEventListener(SecurityErrorEvent.SECURITY_ERROR, securityErrorHandler); _loader.close(); _loader = null; }; error = null; callback = null; } public static function get(_arg1:String, _arg2:Function):void{ var _local3:MochiUserData = new MochiUserData(_arg1, _arg2); _local3.getEvent(); } public static function put(_arg1:String, _arg2, _arg3:Function):void{ var _local4:MochiUserData = new MochiUserData(_arg1, _arg3); _local4.putEvent(_arg2); } } }//package mochi.as3
Section 25
//BirdSounds (BirdSounds) package { import flash.media.*; public dynamic class BirdSounds extends Sound { } }//package
Section 26
//colors (colors) package { import flash.events.*; import flash.display.*; import flash.utils.*; import flash.net.*; import flash.media.*; import flash.text.*; import flash.geom.*; import flash.system.*; import adobe.utils.*; import flash.accessibility.*; import flash.errors.*; import flash.external.*; import flash.filters.*; import flash.printing.*; import flash.profiler.*; import flash.sampler.*; import flash.ui.*; import flash.xml.*; public dynamic class colors extends MovieClip { public var bear_mc:MovieClip; public var gnu_mc:MovieClip; public var sheep_mc:MovieClip; public var cow_mc:MovieClip; public var lion_mc:MovieClip; public var duck_mc:MovieClip; public var chicken_mc:MovieClip; public var pig_mc:MovieClip; public var chicky_mc:MovieClip; public var chick_mc:MovieClip; public var action; public var goat_mc:MovieClip; public var horse_mc:MovieClip; public function colors(){ addFrameScript(0, frame1); } public function flipBack(_arg1){ if (_arg1 == "pig_mc"){ pig_mc.visible = true; cow_mc.visible = false; sheep_mc.visible = false; goat_mc.visible = false; gnu_mc.visible = false; chicken_mc.visible = false; chick_mc.visible = false; horse_mc.visible = false; bear_mc.visible = false; chicky_mc.visible = false; lion_mc.visible = false; duck_mc.visible = false; pig_mc.flipBack(); }; if (_arg1 == "cow_mc"){ pig_mc.visible = false; cow_mc.visible = true; sheep_mc.visible = false; goat_mc.visible = false; gnu_mc.visible = false; chicken_mc.visible = false; chick_mc.visible = false; horse_mc.visible = false; bear_mc.visible = false; chicky_mc.visible = false; lion_mc.visible = false; duck_mc.visible = false; cow_mc.flipBack(); }; if (_arg1 == "sheep_mc"){ pig_mc.visible = false; cow_mc.visible = false; sheep_mc.visible = true; goat_mc.visible = false; gnu_mc.visible = false; chicken_mc.visible = false; chick_mc.visible = false; horse_mc.visible = false; bear_mc.visible = false; chicky_mc.visible = false; lion_mc.visible = false; duck_mc.visible = false; sheep_mc.flipBack(); }; if (_arg1 == "goat_mc"){ pig_mc.visible = false; cow_mc.visible = false; sheep_mc.visible = false; goat_mc.visible = true; gnu_mc.visible = false; chicken_mc.visible = false; chick_mc.visible = false; horse_mc.visible = false; bear_mc.visible = false; chicky_mc.visible = false; lion_mc.visible = false; duck_mc.visible = false; goat_mc.flipBack(); }; if (_arg1 == "gnu_mc"){ pig_mc.visible = false; cow_mc.visible = false; sheep_mc.visible = false; goat_mc.visible = false; gnu_mc.visible = true; chicken_mc.visible = false; chick_mc.visible = false; horse_mc.visible = false; bear_mc.visible = false; chicky_mc.visible = false; lion_mc.visible = false; duck_mc.visible = false; gnu_mc.flipBack(); }; if (_arg1 == "chicken_mc"){ pig_mc.visible = false; cow_mc.visible = false; sheep_mc.visible = false; goat_mc.visible = false; gnu_mc.visible = false; chicken_mc.visible = true; chick_mc.visible = false; horse_mc.visible = false; bear_mc.visible = false; chicky_mc.visible = false; lion_mc.visible = false; duck_mc.visible = false; chicken_mc.flipBack(); }; if (_arg1 == "chick_mc"){ pig_mc.visible = false; cow_mc.visible = false; sheep_mc.visible = false; goat_mc.visible = false; gnu_mc.visible = false; chicken_mc.visible = false; chick_mc.visible = true; horse_mc.visible = false; bear_mc.visible = false; chicky_mc.visible = false; lion_mc.visible = false; duck_mc.visible = false; chick_mc.flipBack(); }; if (_arg1 == "horse_mc"){ pig_mc.visible = false; cow_mc.visible = false; sheep_mc.visible = false; goat_mc.visible = false; gnu_mc.visible = false; chicken_mc.visible = false; chick_mc.visible = false; horse_mc.visible = true; bear_mc.visible = false; chicky_mc.visible = false; lion_mc.visible = false; duck_mc.visible = false; horse_mc.flipBack(); }; if (_arg1 == "bear_mc"){ pig_mc.visible = false; cow_mc.visible = false; sheep_mc.visible = false; goat_mc.visible = false; gnu_mc.visible = false; chicken_mc.visible = false; chick_mc.visible = false; horse_mc.visible = false; bear_mc.visible = true; chicky_mc.visible = false; lion_mc.visible = false; duck_mc.visible = false; bear_mc.flipBack(); }; if (_arg1 == "chicky_mc"){ pig_mc.visible = false; cow_mc.visible = false; sheep_mc.visible = false; goat_mc.visible = false; gnu_mc.visible = false; chicken_mc.visible = false; chick_mc.visible = false; horse_mc.visible = false; bear_mc.visible = false; chicky_mc.visible = true; lion_mc.visible = false; duck_mc.visible = false; chicky_mc.flipBack(); }; if (_arg1 == "lion_mc"){ pig_mc.visible = false; cow_mc.visible = false; sheep_mc.visible = false; goat_mc.visible = false; gnu_mc.visible = false; chicken_mc.visible = false; chick_mc.visible = false; horse_mc.visible = false; bear_mc.visible = false; chicky_mc.visible = false; lion_mc.visible = true; duck_mc.visible = false; lion_mc.flipBack(); }; if (_arg1 == "duck_mc"){ pig_mc.visible = false; cow_mc.visible = false; sheep_mc.visible = false; goat_mc.visible = false; gnu_mc.visible = false; chicken_mc.visible = false; chick_mc.visible = false; horse_mc.visible = false; bear_mc.visible = false; chicky_mc.visible = false; lion_mc.visible = false; duck_mc.visible = true; duck_mc.flipBack(); }; } function frame1(){ stop(); action = ""; } public function flip(_arg1){ if (_arg1 == "pig_mc"){ pig_mc.visible = true; cow_mc.visible = false; sheep_mc.visible = false; goat_mc.visible = false; gnu_mc.visible = false; chicken_mc.visible = false; chick_mc.visible = false; horse_mc.visible = false; bear_mc.visible = false; chicky_mc.visible = false; lion_mc.visible = false; duck_mc.visible = false; pig_mc.flip(); }; if (_arg1 == "cow_mc"){ pig_mc.visible = false; cow_mc.visible = true; sheep_mc.visible = false; goat_mc.visible = false; gnu_mc.visible = false; chicken_mc.visible = false; chick_mc.visible = false; horse_mc.visible = false; bear_mc.visible = false; chicky_mc.visible = false; lion_mc.visible = false; duck_mc.visible = false; cow_mc.flip(); }; if (_arg1 == "sheep_mc"){ pig_mc.visible = false; cow_mc.visible = false; sheep_mc.visible = true; goat_mc.visible = false; gnu_mc.visible = false; chicken_mc.visible = false; chick_mc.visible = false; horse_mc.visible = false; bear_mc.visible = false; chicky_mc.visible = false; lion_mc.visible = false; duck_mc.visible = false; sheep_mc.flip(); }; if (_arg1 == "goat_mc"){ pig_mc.visible = false; cow_mc.visible = false; sheep_mc.visible = false; goat_mc.visible = true; gnu_mc.visible = false; chicken_mc.visible = false; chick_mc.visible = false; horse_mc.visible = false; bear_mc.visible = false; chicky_mc.visible = false; lion_mc.visible = false; duck_mc.visible = false; goat_mc.flip(); }; if (_arg1 == "gnu_mc"){ pig_mc.visible = false; cow_mc.visible = false; sheep_mc.visible = false; goat_mc.visible = false; gnu_mc.visible = true; chicken_mc.visible = false; chick_mc.visible = false; horse_mc.visible = false; bear_mc.visible = false; chicky_mc.visible = false; lion_mc.visible = false; duck_mc.visible = false; gnu_mc.flip(); }; if (_arg1 == "chicken_mc"){ pig_mc.visible = false; cow_mc.visible = false; sheep_mc.visible = false; goat_mc.visible = false; gnu_mc.visible = false; chicken_mc.visible = true; chick_mc.visible = false; horse_mc.visible = false; bear_mc.visible = false; chicky_mc.visible = false; lion_mc.visible = false; duck_mc.visible = false; chicken_mc.flip(); }; if (_arg1 == "chick_mc"){ pig_mc.visible = false; cow_mc.visible = false; sheep_mc.visible = false; goat_mc.visible = false; gnu_mc.visible = false; chicken_mc.visible = false; chick_mc.visible = true; horse_mc.visible = false; bear_mc.visible = false; chicky_mc.visible = false; lion_mc.visible = false; duck_mc.visible = false; chick_mc.flip(); }; if (_arg1 == "horse_mc"){ pig_mc.visible = false; cow_mc.visible = false; sheep_mc.visible = false; goat_mc.visible = false; gnu_mc.visible = false; chicken_mc.visible = false; chick_mc.visible = false; horse_mc.visible = true; bear_mc.visible = false; chicky_mc.visible = false; lion_mc.visible = false; duck_mc.visible = false; horse_mc.flip(); }; if (_arg1 == "bear_mc"){ pig_mc.visible = false; cow_mc.visible = false; sheep_mc.visible = false; goat_mc.visible = false; gnu_mc.visible = false; chicken_mc.visible = false; chick_mc.visible = false; horse_mc.visible = false; bear_mc.visible = true; chicky_mc.visible = false; lion_mc.visible = false; duck_mc.visible = false; bear_mc.flip(); }; if (_arg1 == "chicky_mc"){ pig_mc.visible = false; cow_mc.visible = false; sheep_mc.visible = false; goat_mc.visible = false; gnu_mc.visible = false; chicken_mc.visible = false; chick_mc.visible = false; horse_mc.visible = false; bear_mc.visible = false; chicky_mc.visible = true; lion_mc.visible = false; duck_mc.visible = false; chicky_mc.flip(); }; if (_arg1 == "lion_mc"){ pig_mc.visible = false; cow_mc.visible = false; sheep_mc.visible = false; goat_mc.visible = false; gnu_mc.visible = false; chicken_mc.visible = false; chick_mc.visible = false; horse_mc.visible = false; bear_mc.visible = false; chicky_mc.visible = false; lion_mc.visible = true; duck_mc.visible = false; lion_mc.flip(); }; if (_arg1 == "duck_mc"){ pig_mc.visible = false; cow_mc.visible = false; sheep_mc.visible = false; goat_mc.visible = false; gnu_mc.visible = false; chicken_mc.visible = false; chick_mc.visible = false; horse_mc.visible = false; bear_mc.visible = false; chicky_mc.visible = false; lion_mc.visible = false; duck_mc.visible = true; duck_mc.flip(); }; } } }//package
Section 27
//CritterMatch (CritterMatch) package { import flash.events.*; import flash.display.*; import flash.utils.*; import flash.net.*; import flash.media.*; import flash.text.*; public class CritterMatch extends Sprite { private var theMissSound:MissSound; private var colordeck:Array; private var second_tile:colors; private var theMatchSound:MatchSound; private var firstFrame; private var directionsText:TextField; private var cardsLeft:uint; private var tile:colors; private var pause_timer:Timer; private var gameScore:int; private var stageHeight:Number; private var bg:Layout; private var secondFrame; private var gameTimeField:TextField; private var first_tile:colors; private var gameTime:uint; private var theFirstCardSound:FirstCardSound; private var board:MovieClip; private var stageWidth:Number; private var animals:Array; private var gameStartTime:uint; static const timeFormat:TextFormat = new TextFormat("Comic Sans MS", 18, 0xFFFFFF, true, false, false, null, null, TextFormatAlign.CENTER); private static const pointsForMiss:int = -5; static const letterFormat:TextFormat = new TextFormat("Arial", 18, 0xFFFFFF, true, false, false, null, null, TextFormatAlign.CENTER); private static const pointsForMatch:int = 100; public function CritterMatch(){ theFirstCardSound = new FirstCardSound(); theMissSound = new MissSound(); theMatchSound = new MatchSound(); super(); startGame(); } public function setTimer():void{ gameStartTime = getTimer(); gameTime = 0; addEventListener(Event.ENTER_FRAME, showTime); } function clearMovieClips(_arg1){ var _local2:*; for (_local2 in _arg1) { if (typeof(_arg1[_local2]) == "movieclip"){ _arg1[_local2].removeMovieClip(); }; }; } public function reset_tiles(_arg1:TimerEvent){ first_tile.flipBack(firstFrame); second_tile.flipBack(secondFrame); first_tile = null; second_tile = null; pause_timer.removeEventListener(TimerEvent.TIMER_COMPLETE, reset_tiles); } public function tile_clicked(_arg1:MouseEvent){ var _local2:colors = (_arg1.currentTarget as colors); if (first_tile == null){ first_tile = _local2; firstFrame = _local2.name; first_tile.flip(_local2.name); playSound(theFirstCardSound); } else { if ((((second_tile == null)) && (!((first_tile == _local2))))){ second_tile = _local2; secondFrame = _local2.name; second_tile.flip(_local2.name); if (first_tile.col == second_tile.col){ if (cardsLeft == 2){ removeEventListener(Event.ENTER_FRAME, showTime); }; gameScore = (gameScore + pointsForMatch); showGameScore(); playSound(theMatchSound); pause_timer = new Timer(2000, 1); pause_timer.addEventListener(TimerEvent.TIMER_COMPLETE, remove_tiles); pause_timer.start(); } else { gameScore = (gameScore + pointsForMiss); showGameScore(); playSound(theMissSound); pause_timer = new Timer(2000, 1); pause_timer.addEventListener(TimerEvent.TIMER_COMPLETE, reset_tiles); pause_timer.start(); }; }; }; } public function remove_tiles(_arg1:TimerEvent){ var _local2:*; var _local3:*; board.removeChild(first_tile); board.removeChild(second_tile); first_tile = null; second_tile = null; pause_timer.removeEventListener(TimerEvent.TIMER_COMPLETE, remove_tiles); cardsLeft = (cardsLeft - 2); if (cardsLeft == 0){ _local2 = bg.gameScore.text; _local3 = bg.gameTimeField.text; removeChild(board); removeChild(bg); MovieClip(root).gameScore = _local2; MovieClip(root).gameTime = gameTime; MovieClip(root).gotoAndStop("gameover"); }; } public function playSound(_arg1:Object){ var _local2:SoundChannel = _arg1.play(); } public function showGameScore():void{ bg.gameScore.text = String(gameScore); } public function displayBoard():void{ var _local1:*; cardsLeft = 0; colordeck = new Array(1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12); animals = new Array("pig_mc", "pig_mc", "cow_mc", "cow_mc", "sheep_mc", "sheep_mc", "goat_mc", "goat_mc", "gnu_mc", "gnu_mc", "chicken_mc", "chicken_mc", "chick_mc", "chick_mc", "horse_mc", "horse_mc", "bear_mc", "bear_mc", "chicky_mc", "chicky_mc", "lion_mc", "lion_mc", "duck_mc", "duck_mc"); board = new MovieClip(); addChild(board); board.x = 0; board.y = 55; x = 1; while (x <= 6) { y = 1; while (y <= 4) { _local1 = Math.floor((Math.random() * colordeck.length)); tile = new colors(); tile.col = colordeck[_local1]; tile.name = animals[_local1]; colordeck.splice(_local1, 1); animals.splice(_local1, 1); tile.gotoAndStop(1); tile.x = ((x - 1) * 107); tile.y = ((y - 1) * 107); tile.addEventListener(MouseEvent.CLICK, tile_clicked); board.addChild(tile); cardsLeft++; y++; }; x++; }; showGameScore(); setTimer(); bg.resetBtn.addEventListener(MouseEvent.MOUSE_DOWN, resetGame); } public function resetGame(_arg1:Event):void{ removeChild(board); board = null; gameScore = 0; removeEventListener(Event.ENTER_FRAME, showTime); displayBoard(); } public function showTime(_arg1:Event){ gameTime = (getTimer() - gameStartTime); bg.gameTimeField.text = clockTime(gameTime); } public function moreGames(_arg1:Event):void{ var _local2 = "http://www.flashplayland.com/"; var _local3:URLRequest = new URLRequest(_local2); navigateToURL(_local3, "_blank"); } public function startGame():void{ bg = new Layout(); addChild(bg); displayBoard(); } public function clockTime(_arg1:int){ var _local2:int = Math.floor((_arg1 / 1000)); var _local3:int = Math.floor((_local2 / 60)); _local2 = (_local2 - (_local3 * 60)); var _local4:String = ((_local3 + ":") + String((_local2 + 100)).substr(1, 2)); return (_local4); } } }//package
Section 28
//FirstCardSound (FirstCardSound) package { import flash.media.*; public dynamic class FirstCardSound extends Sound { } }//package
Section 29
//GameOver (GameOver) package { import flash.display.*; import flash.text.*; public dynamic class GameOver extends MovieClip { public var playAgainBtn:SimpleButton; public var showTime:TextField; public var showScore:TextField; } }//package
Section 30
//Layout (Layout) package { import flash.display.*; import flash.text.*; public dynamic class Layout extends MovieClip { public var gameScore:TextField; public var gameTimeField:TextField; public var resetBtn:SimpleButton; } }//package
Section 31
//MatchSound (MatchSound) package { import flash.media.*; public dynamic class MatchSound extends Sound { } }//package
Section 32
//MissSound (MissSound) package { import flash.media.*; public dynamic class MissSound extends Sound { } }//package

Library Items

Symbol 1 Sound {MissSound}
Symbol 2 Sound {MatchSound}
Symbol 3 Sound {FirstCardSound}
Symbol 4 Sound {BirdSounds}
Symbol 5 GraphicUsed by:6
Symbol 6 MovieClipUses:5Used by:9
Symbol 7 GraphicUsed by:8
Symbol 8 MovieClipUses:7Used by:9 12 15 18 21 24 27 30 33 36 39 42
Symbol 9 MovieClip {CritterMatch_fla.DuckMC_14}Uses:6 8Used by:43
Symbol 10 GraphicUsed by:11
Symbol 11 MovieClipUses:10Used by:12
Symbol 12 MovieClip {CritterMatch_fla.LionMC_17}Uses:11 8Used by:43
Symbol 13 GraphicUsed by:14
Symbol 14 MovieClipUses:13Used by:15
Symbol 15 MovieClip {CritterMatch_fla.ChickyMC_19}Uses:14 8Used by:43
Symbol 16 GraphicUsed by:17
Symbol 17 MovieClipUses:16Used by:18
Symbol 18 MovieClip {CritterMatch_fla.BearMC_21}Uses:17 8Used by:43
Symbol 19 GraphicUsed by:20
Symbol 20 MovieClipUses:19Used by:21
Symbol 21 MovieClip {CritterMatch_fla.HorseMC_23}Uses:20 8Used by:43
Symbol 22 GraphicUsed by:23
Symbol 23 MovieClipUses:22Used by:24
Symbol 24 MovieClip {CritterMatch_fla.ChickMC_25}Uses:23 8Used by:43
Symbol 25 GraphicUsed by:26
Symbol 26 MovieClipUses:25Used by:27
Symbol 27 MovieClip {CritterMatch_fla.ChickenMC_27}Uses:26 8Used by:43
Symbol 28 GraphicUsed by:29
Symbol 29 MovieClipUses:28Used by:30
Symbol 30 MovieClip {CritterMatch_fla.GnuMC_29}Uses:29 8Used by:43
Symbol 31 GraphicUsed by:32
Symbol 32 MovieClipUses:31Used by:33
Symbol 33 MovieClip {CritterMatch_fla.GoatMC_31}Uses:32 8Used by:43
Symbol 34 GraphicUsed by:35
Symbol 35 MovieClipUses:34Used by:36
Symbol 36 MovieClip {CritterMatch_fla.SheepMC_33}Uses:35 8Used by:43
Symbol 37 GraphicUsed by:38
Symbol 38 MovieClipUses:37Used by:39
Symbol 39 MovieClip {CritterMatch_fla.CowMC_35}Uses:38 8Used by:43
Symbol 40 GraphicUsed by:41
Symbol 41 MovieClipUses:40Used by:42
Symbol 42 MovieClip {CritterMatch_fla.PigMC_37}Uses:41 8Used by:43
Symbol 43 MovieClip {colors}Uses:9 12 15 18 21 24 27 30 33 36 39 42
Symbol 44 GraphicUsed by:45 51
Symbol 45 MovieClipUses:44Used by:51
Symbol 46 FontUsed by:47 48 49 50 57 58 61 62 63 64 76 77 78 79 83 84 85 86 90 91 92 93 94 95
Symbol 47 EditableTextUses:46Used by:51
Symbol 48 EditableTextUses:46Used by:51
Symbol 49 EditableTextUses:46Used by:51
Symbol 50 EditableTextUses:46Used by:51
Symbol 51 ButtonUses:45 47 48 49 44 50Used by:59
Symbol 52 BitmapUsed by:54
Symbol 53 BitmapUsed by:54
Symbol 54 GraphicUses:52 53Used by:59
Symbol 55 GraphicUsed by:56
Symbol 56 MovieClipUses:55Used by:59
Symbol 57 EditableTextUses:46Used by:59
Symbol 58 EditableTextUses:46Used by:59
Symbol 59 MovieClip {Layout}Uses:51 54 56 57 58
Symbol 60 GraphicUsed by:65 80 87 96
Symbol 61 EditableTextUses:46Used by:65
Symbol 62 EditableTextUses:46Used by:65
Symbol 63 EditableTextUses:46Used by:65
Symbol 64 EditableTextUses:46Used by:65
Symbol 65 ButtonUses:60 61 62 63 64Used by:70  Timeline
Symbol 66 FontUsed by:67 68 69
Symbol 67 EditableTextUses:66Used by:70
Symbol 68 EditableTextUses:66Used by:70
Symbol 69 TextUses:66Used by:70
Symbol 70 MovieClip {GameOver}Uses:65 67 68 69
Symbol 71 MovieClip {CritterMatch}Used by:Timeline
Symbol 72 BitmapUsed by:73
Symbol 73 GraphicUses:72Used by:74
Symbol 74 MovieClipUses:73Used by:Timeline
Symbol 75 GraphicUsed by:Timeline
Symbol 76 EditableTextUses:46Used by:80
Symbol 77 EditableTextUses:46Used by:80
Symbol 78 EditableTextUses:46Used by:80
Symbol 79 EditableTextUses:46Used by:80
Symbol 80 ButtonUses:60 76 77 78 79Used by:Timeline
Symbol 81 GraphicUsed by:82
Symbol 82 MovieClipUses:81Used by:Timeline
Symbol 83 EditableTextUses:46Used by:87
Symbol 84 EditableTextUses:46Used by:87
Symbol 85 EditableTextUses:46Used by:87
Symbol 86 EditableTextUses:46Used by:87
Symbol 87 ButtonUses:60 83 84 85 86Used by:Timeline
Symbol 88 BitmapUsed by:89
Symbol 89 GraphicUses:88Used by:Timeline
Symbol 90 EditableTextUses:46Used by:Timeline
Symbol 91 EditableTextUses:46Used by:Timeline
Symbol 92 EditableTextUses:46Used by:96
Symbol 93 EditableTextUses:46Used by:96
Symbol 94 EditableTextUses:46Used by:96
Symbol 95 EditableTextUses:46Used by:96
Symbol 96 ButtonUses:60 92 93 94 95Used by:Timeline
Symbol 97 BitmapUsed by:98
Symbol 98 GraphicUses:97Used by:Timeline

Instance Names

"playBtn"Frame 2Symbol 80 Button
"highScoresBtn"Frame 2Symbol 87 Button
"playAgainBtn"Frame 4Symbol 65 Button
"showTime"Frame 4Symbol 90 EditableText
"showScore"Frame 4Symbol 91 EditableText
"submitScoreBtn"Frame 4Symbol 96 Button
"front_mc"Symbol 9 MovieClip {CritterMatch_fla.DuckMC_14} Frame 1Symbol 6 MovieClip
"back_mc"Symbol 9 MovieClip {CritterMatch_fla.DuckMC_14} Frame 1Symbol 8 MovieClip
"front_mc"Symbol 12 MovieClip {CritterMatch_fla.LionMC_17} Frame 1Symbol 11 MovieClip
"back_mc"Symbol 12 MovieClip {CritterMatch_fla.LionMC_17} Frame 1Symbol 8 MovieClip
"front_mc"Symbol 15 MovieClip {CritterMatch_fla.ChickyMC_19} Frame 1Symbol 14 MovieClip
"back_mc"Symbol 15 MovieClip {CritterMatch_fla.ChickyMC_19} Frame 1Symbol 8 MovieClip
"front_mc"Symbol 18 MovieClip {CritterMatch_fla.BearMC_21} Frame 1Symbol 17 MovieClip
"back_mc"Symbol 18 MovieClip {CritterMatch_fla.BearMC_21} Frame 1Symbol 8 MovieClip
"front_mc"Symbol 21 MovieClip {CritterMatch_fla.HorseMC_23} Frame 1Symbol 20 MovieClip
"back_mc"Symbol 21 MovieClip {CritterMatch_fla.HorseMC_23} Frame 1Symbol 8 MovieClip
"front_mc"Symbol 24 MovieClip {CritterMatch_fla.ChickMC_25} Frame 1Symbol 23 MovieClip
"back_mc"Symbol 24 MovieClip {CritterMatch_fla.ChickMC_25} Frame 1Symbol 8 MovieClip
"front_mc"Symbol 27 MovieClip {CritterMatch_fla.ChickenMC_27} Frame 1Symbol 26 MovieClip
"back_mc"Symbol 27 MovieClip {CritterMatch_fla.ChickenMC_27} Frame 1Symbol 8 MovieClip
"front_mc"Symbol 30 MovieClip {CritterMatch_fla.GnuMC_29} Frame 1Symbol 29 MovieClip
"back_mc"Symbol 30 MovieClip {CritterMatch_fla.GnuMC_29} Frame 1Symbol 8 MovieClip
"front_mc"Symbol 33 MovieClip {CritterMatch_fla.GoatMC_31} Frame 1Symbol 32 MovieClip
"back_mc"Symbol 33 MovieClip {CritterMatch_fla.GoatMC_31} Frame 1Symbol 8 MovieClip
"front_mc"Symbol 36 MovieClip {CritterMatch_fla.SheepMC_33} Frame 1Symbol 35 MovieClip
"back_mc"Symbol 36 MovieClip {CritterMatch_fla.SheepMC_33} Frame 1Symbol 8 MovieClip
"front_mc"Symbol 39 MovieClip {CritterMatch_fla.CowMC_35} Frame 1Symbol 38 MovieClip
"back_mc"Symbol 39 MovieClip {CritterMatch_fla.CowMC_35} Frame 1Symbol 8 MovieClip
"front_mc"Symbol 42 MovieClip {CritterMatch_fla.PigMC_37} Frame 1Symbol 41 MovieClip
"back_mc"Symbol 42 MovieClip {CritterMatch_fla.PigMC_37} Frame 1Symbol 8 MovieClip
"duck_mc"Symbol 43 MovieClip {colors} Frame 1Symbol 9 MovieClip {CritterMatch_fla.DuckMC_14}
"lion_mc"Symbol 43 MovieClip {colors} Frame 1Symbol 12 MovieClip {CritterMatch_fla.LionMC_17}
"chicky_mc"Symbol 43 MovieClip {colors} Frame 1Symbol 15 MovieClip {CritterMatch_fla.ChickyMC_19}
"bear_mc"Symbol 43 MovieClip {colors} Frame 1Symbol 18 MovieClip {CritterMatch_fla.BearMC_21}
"horse_mc"Symbol 43 MovieClip {colors} Frame 1Symbol 21 MovieClip {CritterMatch_fla.HorseMC_23}
"chick_mc"Symbol 43 MovieClip {colors} Frame 1Symbol 24 MovieClip {CritterMatch_fla.ChickMC_25}
"chicken_mc"Symbol 43 MovieClip {colors} Frame 1Symbol 27 MovieClip {CritterMatch_fla.ChickenMC_27}
"gnu_mc"Symbol 43 MovieClip {colors} Frame 1Symbol 30 MovieClip {CritterMatch_fla.GnuMC_29}
"goat_mc"Symbol 43 MovieClip {colors} Frame 1Symbol 33 MovieClip {CritterMatch_fla.GoatMC_31}
"sheep_mc"Symbol 43 MovieClip {colors} Frame 1Symbol 36 MovieClip {CritterMatch_fla.SheepMC_33}
"cow_mc"Symbol 43 MovieClip {colors} Frame 1Symbol 39 MovieClip {CritterMatch_fla.CowMC_35}
"pig_mc"Symbol 43 MovieClip {colors} Frame 1Symbol 42 MovieClip {CritterMatch_fla.PigMC_37}
"resetBtn"Symbol 59 MovieClip {Layout} Frame 1Symbol 51 Button
"gameTimeField"Symbol 59 MovieClip {Layout} Frame 1Symbol 57 EditableText
"gameScore"Symbol 59 MovieClip {Layout} Frame 1Symbol 58 EditableText
"playAgainBtn"Symbol 70 MovieClip {GameOver} Frame 1Symbol 65 Button
"showTime"Symbol 70 MovieClip {GameOver} Frame 1Symbol 67 EditableText
"showScore"Symbol 70 MovieClip {GameOver} Frame 1Symbol 68 EditableText

Special Tags

FileAttributes (69)Timeline Frame 1Access local files only, Metadata not present, AS3.

Labels

"intro"Frame 2
"playgame"Frame 3
"gameover"Frame 4




http://swfchan.com/27/133371/info.shtml
Created: 14/2 -2019 07:14:54 Last modified: 14/2 -2019 07:14:54 Server time: 22/12 -2024 06:45:43