Section 1
//igirlsgames_loading_4 (_fla.igirlsgames_loading_4)
package _fla {
import flash.display.*;
public dynamic class igirlsgames_loading_4 extends MovieClip {
public function igirlsgames_loading_4(){
addFrameScript(99, frame100);
}
function frame100(){
stop();
}
}
}//package _fla
Section 2
//igirlsgames_loading_6 (_fla.igirlsgames_loading_6)
package _fla {
import flash.display.*;
public dynamic class igirlsgames_loading_6 extends MovieClip {
public var k28:MovieClip;
public var k23:MovieClip;
public var k30:MovieClip;
public var k31:MovieClip;
public var k33:MovieClip;
public var k22:MovieClip;
public var k36:MovieClip;
public var k35:MovieClip;
public var k32:MovieClip;
public var k4:MovieClip;
public var k6:MovieClip;
public var k7:MovieClip;
public var k8:MovieClip;
public var k2:MovieClip;
public var k5:MovieClip;
public var k9:MovieClip;
public var k1:MovieClip;
public var k34:MovieClip;
public var k3:MovieClip;
public var k10:MovieClip;
public var k12:MovieClip;
public var k13:MovieClip;
public var k14:MovieClip;
public var k15:MovieClip;
public var k16:MovieClip;
public var k17:MovieClip;
public var k19:MovieClip;
public var k18:MovieClip;
public var k11:MovieClip;
public var k20:MovieClip;
public var k24:MovieClip;
public var k25:MovieClip;
public var k26:MovieClip;
public var k21:MovieClip;
public var k29:MovieClip;
public var k27:MovieClip;
}
}//package _fla
Section 3
//igirlsgames_loadingyj6_2 (_fla.igirlsgames_loadingyj6_2)
package _fla {
import flash.display.*;
import flash.events.*;
import flash.net.*;
public dynamic class igirlsgames_loadingyj6_2 extends MovieClip {
public var logo_btn:SimpleButton;
public function igirlsgames_loadingyj6_2(){
addFrameScript(0, frame1);
}
function frame1(){
logo_btn.addEventListener(MouseEvent.CLICK, linkHandler);
}
public function linkHandler(_arg1:MouseEvent):void{
navigateToURL(new URLRequest("http://www.igirlsgames.com"), "_blank");
}
}
}//package _fla
Section 4
//igirlsgames_logo_113 (_fla.igirlsgames_logo_113)
package _fla {
import flash.display.*;
public dynamic class igirlsgames_logo_113 extends MovieClip {
public function igirlsgames_logo_113(){
addFrameScript(142, frame143);
}
function frame143(){
gotoAndPlay(44);
}
}
}//package _fla
Section 5
//igirlsgames_logo_115 (_fla.igirlsgames_logo_115)
package _fla {
import flash.display.*;
public dynamic class igirlsgames_logo_115 extends MovieClip {
public function igirlsgames_logo_115(){
addFrameScript(7, frame8);
}
function frame8(){
stop();
}
}
}//package _fla
Section 6
//igirlsgames_logo_117 (_fla.igirlsgames_logo_117)
package _fla {
import flash.display.*;
public dynamic class igirlsgames_logo_117 extends MovieClip {
public function igirlsgames_logo_117(){
addFrameScript(7, frame8);
}
function frame8(){
stop();
}
}
}//package _fla
Section 7
//igirlsgames_logo_mc_108 (_fla.igirlsgames_logo_mc_108)
package _fla {
import flash.display.*;
import flash.events.*;
import flash.net.*;
public dynamic class igirlsgames_logo_mc_108 extends MovieClip {
public var logo_btn:SimpleButton;
public function igirlsgames_logo_mc_108(){
addFrameScript(0, frame1);
}
function frame1(){
logo_btn.addEventListener(MouseEvent.CLICK, linkHandler);
}
public function linkHandler(_arg1:MouseEvent):void{
navigateToURL(new URLRequest("http://www.igirlsgames.com"), "_blank");
}
}
}//package _fla
Section 8
//igirlsgamesload_mc_1 (_fla.igirlsgamesload_mc_1)
package _fla {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.media.*;
import flash.filters.*;
import flash.net.*;
import flash.system.*;
import flash.geom.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.text.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class igirlsgamesload_mc_1 extends MovieClip {
public var loading:MovieClip;
public var a;
public var percent_mc:MovieClip;
public var play_btn:SimpleButton;
public function igirlsgamesload_mc_1(){
addFrameScript(0, frame1, 1, frame2);
}
public function enterFrameHandler(_arg1:Event):void{
var _local2:Number;
var _local3:*;
_local2 = int(((root.loaderInfo.bytesLoaded / root.loaderInfo.bytesTotal) * 100));
if (percent_mc.currentFrame < _local2){
percent_mc.play();
} else {
percent_mc.stop();
};
_local3 = 1;
while (_local3 <= 36) {
if (_local3 <= Math.ceil(((percent_mc.currentFrame * 36) / 100))){
loading[("k" + _local3)].visible = true;
};
_local3++;
};
if (((loading.k36.visible) && ((percent_mc.currentFrame >= 100)))){
this.removeEventListener(Event.ENTER_FRAME, enterFrameHandler);
goNext();
};
}
function frame1(){
stop();
a = 1;
while (a <= 36) {
loading[("k" + a)].gotoAndStop(a);
loading[("k" + a)].visible = false;
a++;
};
this.addEventListener(Event.ENTER_FRAME, enterFrameHandler);
}
public function playHandler(_arg1:MouseEvent):void{
play_btn.removeEventListener(MouseEvent.CLICK, playHandler);
MovieClip(root).play();
}
function frame2(){
stop();
play_btn.addEventListener(MouseEvent.CLICK, playHandler);
}
public function goNext():void{
this.play();
}
}
}//package _fla
Section 9
//Timeline_101 (_fla.Timeline_101)
package _fla {
import flash.display.*;
public dynamic class Timeline_101 extends MovieClip {
public function Timeline_101(){
addFrameScript(12, frame13);
}
function frame13(){
stop();
}
}
}//package _fla
Section 10
//Timeline_105 (_fla.Timeline_105)
package _fla {
import flash.display.*;
import flash.events.*;
import flash.net.*;
public dynamic class Timeline_105 extends MovieClip {
public function Timeline_105(){
addFrameScript(0, frame1);
}
function frame1(){
getChildAt(0).addEventListener(MouseEvent.CLICK, linkHandler);
}
public function linkHandler(_arg1:MouseEvent):void{
navigateToURL(new URLRequest("http://www.igirlsgames.com"), "_blank");
}
}
}//package _fla
Section 11
//Timeline_123 (_fla.Timeline_123)
package _fla {
import flash.display.*;
public dynamic class Timeline_123 extends MovieClip {
public var p1:MovieClip;
public var p2:MovieClip;
public var p3:MovieClip;
public var p5:MovieClip;
public var p0:MovieClip;
public var p4:MovieClip;
}
}//package _fla
Section 12
//Timeline_132 (_fla.Timeline_132)
package _fla {
import flash.display.*;
public dynamic class Timeline_132 extends MovieClip {
public function Timeline_132(){
addFrameScript(3, frame4);
}
function frame4(){
stop();
}
}
}//package _fla
Section 13
//Timeline_135 (_fla.Timeline_135)
package _fla {
import flash.display.*;
public dynamic class Timeline_135 extends MovieClip {
public function Timeline_135(){
addFrameScript(4, frame5);
}
function frame5(){
stop();
}
}
}//package _fla
Section 14
//Timeline_138 (_fla.Timeline_138)
package _fla {
import flash.display.*;
public dynamic class Timeline_138 extends MovieClip {
public function Timeline_138(){
addFrameScript(4, frame5);
}
function frame5(){
stop();
}
}
}//package _fla
Section 15
//Timeline_166 (_fla.Timeline_166)
package _fla {
import flash.display.*;
public dynamic class Timeline_166 extends MovieClip {
public var p1:MovieClip;
public var p2:MovieClip;
public var p3:MovieClip;
public var p5:MovieClip;
public var p4:MovieClip;
}
}//package _fla
Section 16
//Timeline_167 (_fla.Timeline_167)
package _fla {
import flash.display.*;
public dynamic class Timeline_167 extends MovieClip {
public var p1:MovieClip;
public var p2:MovieClip;
}
}//package _fla
Section 17
//Timeline_170 (_fla.Timeline_170)
package _fla {
import flash.display.*;
public dynamic class Timeline_170 extends MovieClip {
public var p1:MovieClip;
public var p2:MovieClip;
public var p3:MovieClip;
public var p5:MovieClip;
public var p4:MovieClip;
}
}//package _fla
Section 18
//Timeline_171 (_fla.Timeline_171)
package _fla {
import flash.display.*;
public dynamic class Timeline_171 extends MovieClip {
public var p1:MovieClip;
public var p2:MovieClip;
}
}//package _fla
Section 19
//Timeline_174 (_fla.Timeline_174)
package _fla {
import flash.display.*;
public dynamic class Timeline_174 extends MovieClip {
public var p1:MovieClip;
public var p2:MovieClip;
public var p3:MovieClip;
public var p5:MovieClip;
public var p4:MovieClip;
}
}//package _fla
Section 20
//Timeline_175 (_fla.Timeline_175)
package _fla {
import flash.display.*;
public dynamic class Timeline_175 extends MovieClip {
public var p1:MovieClip;
public var p2:MovieClip;
}
}//package _fla
Section 21
//Timeline_180 (_fla.Timeline_180)
package _fla {
import flash.display.*;
public dynamic class Timeline_180 extends MovieClip {
public function Timeline_180(){
addFrameScript(16, frame17);
}
function frame17(){
stop();
}
}
}//package _fla
Section 22
//Timeline_181 (_fla.Timeline_181)
package _fla {
import flash.display.*;
public dynamic class Timeline_181 extends MovieClip {
public function Timeline_181(){
addFrameScript(114, frame115);
}
function frame115(){
MovieClip(parent).nextFrame();
}
}
}//package _fla
Section 23
//twitter_logo_mc_120 (_fla.twitter_logo_mc_120)
package _fla {
import flash.display.*;
import flash.events.*;
import flash.net.*;
public dynamic class twitter_logo_mc_120 extends MovieClip {
public var logo_btn:SimpleButton;
public function twitter_logo_mc_120(){
addFrameScript(0, frame1);
}
function frame1(){
logo_btn.addEventListener(MouseEvent.CLICK, linkHandler);
}
public function linkHandler(_arg1:MouseEvent):void{
navigateToURL(new URLRequest("http://twitter.com/igirlsgames"), "_blank");
}
}
}//package _fla
Section 24
//MochiAd (mochi.as3.MochiAd)
package mochi.as3 {
import flash.display.*;
import flash.events.*;
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 DEFAULTS:Object;
var clip:Object;
var ad_timeout:Number;
var mc:MovieClip;
var wh:Array;
var w:Number;
var h:Number;
var chk:MovieClip;
var sendHostProgress:Boolean;
var options = _arg1;
DEFAULTS = {ad_timeout:2000, regpt:"o", method:"showClickAwayAd", res:"300x250", no_bg:true, ad_started:function ():void{
}, ad_finished:function ():void{
}, ad_loaded:function (_arg1:Number, _arg2:Number):void{
}, ad_failed:function ():void{
trace("[MochiAd] Couldn't load an ad, make sure your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_skipped:function ():void{
}};
options = MochiAd._parseOptions(options, DEFAULTS);
clip = options.clip;
ad_timeout = 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();
};
wh = MochiAd._getRes(options, clip);
w = wh[0];
h = wh[1];
mc.x = (w * 0.5);
mc.y = (h * 0.5);
chk = createEmptyMovieClip(mc, "_mochiad_wait", 3);
chk.ad_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);
};
sendHostProgress = false;
mc.regContLC = function (_arg1:String):void{
mc._containerLCName = _arg1;
};
chk["onEnterFrame"] = function ():void{
var _local1:Object;
var _local2:Number;
var _local3:Boolean;
var _local4:Number;
if (!this.parent){
delete this.onEnterFrame;
return;
};
_local1 = this.parent._mochiad_ctr;
_local2 = (getTimer() - this.started);
_local3 = false;
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;
_local2 = _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 DEFAULTS:Object;
var clip:Object;
var ad_msec:Number;
var ad_timeout:Number;
var fadeout_time:Number;
var mc:MovieClip;
var wh:Array;
var w:Number;
var h:Number;
var chk:MovieClip;
var options = _arg1;
DEFAULTS = {ad_timeout:2000, fadeout_time:250, regpt:"o", method:"showTimedAd", ad_started:function ():void{
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;
ad_msec = 11000;
ad_timeout = options.ad_timeout;
delete options.ad_timeout;
fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!MochiAd.load(options)){
options.ad_failed();
options.ad_finished();
return;
};
options.ad_started();
mc = clip._mochiad;
mc["onUnload"] = function ():void{
MochiAd._cleanup(mc);
options.ad_finished();
};
wh = MochiAd._getRes(options, clip);
w = wh[0];
h = wh[1];
mc.x = (w * 0.5);
mc.y = (h * 0.5);
chk = createEmptyMovieClip(mc, "_mochiad_wait", 3);
chk.ad_msec = ad_msec;
chk.ad_timeout = ad_timeout;
chk.started = getTimer();
chk.showing = false;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function ():void{
var _local1:Number;
if (!this.parent){
delete this.onEnterFrame;
delete this.fadeFunction;
return;
};
_local1 = (100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time)));
if (_local1 > 0){
this.parent.alpha = (_local1 * 0.01);
} else {
MochiAd.unload(clip);
delete this["onEnterFrame"];
};
};
mc.unloadAd = function ():void{
MochiAd.unload(clip);
};
mc.adLoaded = options.ad_loaded;
mc.adSkipped = options.ad_skipped;
mc.adjustProgress = function (_arg1:Number):void{
var _local2:Object;
_local2 = 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 _local1:Object;
var _local2:Number;
var _local3:Boolean;
var _local4:Number;
if (!this.parent){
delete this.onEnterFrame;
delete this.fadeFunction;
return;
};
_local1 = this.parent._mochiad_ctr;
_local2 = (getTimer() - this.started);
_local3 = false;
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 _local3:Object;
var _local4:String;
var _local5:Array;
var _local6:Number;
var _local7:Array;
_local3 = {};
for (_local4 in _arg2) {
_local3[_local4] = _arg2[_local4];
};
if (_arg1){
for (_local4 in _arg1) {
_local3[_local4] = _arg1[_local4];
};
};
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 idx:Number;
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);
};
idx = 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 DEFAULTS:Object;
var clip:Object;
var depth:Number;
var mc:MovieClip;
var wh:Array;
var lv:URLVariables;
var k:String;
var server:String;
var hostname:String;
var lc:LocalConnection;
var name:String;
var loader:Loader;
var g:Function;
var req:URLRequest;
var v:Object;
var options = _arg1;
DEFAULTS = {server:"http://x.mochiads.com/srv/1/", method:"load", depth:10333, id:"_UNKNOWN_"};
options = MochiAd._parseOptions(options, DEFAULTS);
options.swfv = 9;
options.mav = MochiAd.getVersion();
clip = options.clip;
if (!MochiAd._isNetworkAvailable()){
return (null);
};
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."));
};
depth = options.depth;
delete options.depth;
mc = createEmptyMovieClip(clip, "_mochiad", depth);
wh = MochiAd._getRes(options, clip);
options.res = ((wh[0] + "x") + wh[1]);
options.server = (options.server + options.id);
delete options.id;
clip._mochiad_loaded = true;
if (clip.loaderInfo.loaderURL.indexOf("http") == 0){
options.as3_swf = clip.loaderInfo.loaderURL;
} else {
trace("[MochiAd] NOTE: Security Sandbox Violation errors below are normal");
};
lv = new URLVariables();
for (k in options) {
v = options[k];
if (!(v is Function)){
lv[k] = v;
};
};
server = lv.server;
delete lv.server;
hostname = _allowDomains(server);
lc = new LocalConnection();
lc.client = mc;
name = ["", Math.floor(new Date().getTime()), Math.floor((Math.random() * 999999))].join("_");
lc.allowDomain("*", "localhost");
lc.allowInsecureDomain("*", "localhost");
lc.connect(name);
mc.lc = lc;
mc.lcName = name;
lv.lc = name;
lv.st = getTimer();
loader = new Loader();
g = function (_arg1:Object):void{
_arg1.target.removeEventListener(_arg1.type, arguments.callee);
MochiAd.unload(clip);
};
loader.contentLoaderInfo.addEventListener(Event.UNLOAD, g);
req = new URLRequest(((server + ".swf?cacheBust=") + new Date().getTime()));
req.contentType = "application/x-www-form-urlencoded";
req.method = URLRequestMethod.POST;
req.data = lv;
loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, function (_arg1:IOErrorEvent):void{
trace("[MochiAds] Blocked URL");
});
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;
var _local5:Number;
_local4 = _arg2.split(".");
_local5 = 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;
_local4 = new MovieClip();
if (((false) && (_arg3))){
_arg1.addChildAt(_local4, _arg3);
} else {
_arg1.addChild(_local4);
};
_arg1[_arg2] = _local4;
_local4["_name"] = _arg2;
return (_local4);
}
public static function _getRes(_arg1:Object, _arg2:Object):Array{
var _local3:Object;
var _local4:Number;
var _local5:Number;
var _local6:Array;
_local3 = _arg2.getBounds(_arg2.root);
_local4 = 0;
_local5 = 0;
if (typeof(_arg1.res) != "undefined"){
_local6 = _arg1.res.split("x");
_local4 = parseFloat(_local6[0]);
_local5 = parseFloat(_local6[1]);
} else {
_local4 = (_local3.xMax - _local3.xMin);
_local5 = (_local3.yMax - _local3.yMin);
};
if ((((_local4 == 0)) || ((_local5 == 0)))){
_local4 = _arg2.stage.stageWidth;
_local5 = _arg2.stage.stageHeight;
};
return ([_local4, _local5]);
}
public static function 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;
var _local4:Number;
_local3 = _arg2.split(".");
_local4 = 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;
var _local5:Number;
_local4 = _arg2.split(".");
_local5 = 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 DEFAULTS:Object;
var clip:Object;
var ad_msec:Number;
var ad_timeout:Number;
var fadeout_time:Number;
var mc:MovieClip;
var wh:Array;
var w:Number;
var h:Number;
var chk:MovieClip;
var bar:MovieClip;
var bar_w:Number;
var bar_color:Number;
var bar_background:Number;
var bar_outline:Number;
var backing_mc:MovieClip;
var backing:Object;
var inside_mc:MovieClip;
var inside:Object;
var outline_mc:MovieClip;
var outline:Object;
var complete:Boolean;
var unloaded:Boolean;
var progress:Number;
var f:Function;
var sendHostProgress:Boolean;
var fn:Function;
var r:MovieClip;
var options = _arg1;
DEFAULTS = {ad_timeout:3000, fadeout_time:250, regpt:"o", method:"showPreloaderAd", color:0xFF8A00, background:16777161, outline:13994812, no_progress_bar:false, ad_started:function ():void{
if ((this.clip is MovieClip)){
this.clip.stop();
} else {
throw (new Error("MochiAd.showPreGameAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers."));
};
}, ad_finished:function ():void{
if ((this.clip is MovieClip)){
this.clip.play();
} else {
throw (new Error("MochiAd.showPreGameAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers."));
};
}, ad_loaded:function (_arg1:Number, _arg2:Number):void{
}, ad_failed:function ():void{
trace("[MochiAd] Couldn't load an ad, make sure your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_skipped:function ():void{
}, ad_progress:function (_arg1:Number):void{
}, 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;
ad_msec = 11000;
ad_timeout = options.ad_timeout;
delete options.ad_timeout;
fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!MochiAd.load(options)){
options.ad_failed();
options.ad_finished();
return;
};
options.ad_started();
mc = clip._mochiad;
mc["onUnload"] = function ():void{
var fn:Function;
MochiAd._cleanup(mc);
fn = function ():void{
options.ad_finished();
};
setTimeout(fn, 100);
};
wh = MochiAd._getRes(options, clip);
w = wh[0];
h = wh[1];
mc.x = (w * 0.5);
mc.y = (h * 0.5);
chk = createEmptyMovieClip(mc, "_mochiad_wait", 3);
chk.x = (w * -0.5);
chk.y = (h * -0.5);
bar = createEmptyMovieClip(chk, "_mochiad_bar", 4);
if (options.no_progress_bar){
bar.visible = false;
delete options.no_progress_bar;
} else {
bar.x = (10 + options.bar_offset);
bar.y = (h - 20);
};
bar_w = ((w - bar.x) - 10);
bar_color = options.color;
delete options.color;
bar_background = options.background;
delete options.background;
bar_outline = options.outline;
delete options.outline;
backing_mc = createEmptyMovieClip(bar, "_outline", 1);
backing = backing_mc.graphics;
backing.beginFill(bar_background);
backing.moveTo(0, 0);
backing.lineTo(bar_w, 0);
backing.lineTo(bar_w, 10);
backing.lineTo(0, 10);
backing.lineTo(0, 0);
backing.endFill();
inside_mc = createEmptyMovieClip(bar, "_inside", 2);
inside = inside_mc.graphics;
inside.beginFill(bar_color);
inside.moveTo(0, 0);
inside.lineTo(bar_w, 0);
inside.lineTo(bar_w, 10);
inside.lineTo(0, 10);
inside.lineTo(0, 0);
inside.endFill();
inside_mc.scaleX = 0;
outline_mc = createEmptyMovieClip(bar, "_outline", 3);
outline = outline_mc.graphics;
outline.lineStyle(0, bar_outline, 100);
outline.moveTo(0, 0);
outline.lineTo(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;
_local1 = (100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time)));
if (_local1 > 0){
this.parent.alpha = (_local1 * 0.01);
} else {
MochiAd.unload(clip);
delete this["onEnterFrame"];
};
};
complete = false;
unloaded = false;
progress = Math.min(1, options.progress_override(clip));
f = 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;
_local2 = mc._mochiad_wait;
_local2.server_control = true;
_local2.showing = true;
_local2.started = getTimer();
_local2.ad_msec = _arg1;
};
mc.rpc = function (_arg1:Number, _arg2:Object):void{
MochiAd.rpc(clip, _arg1, _arg2);
};
mc.rpcTestFn = function (_arg1:String):Object{
trace(("[MOCHIAD rpcTestFn] " + _arg1));
return (_arg1);
};
mc.regContLC = function (_arg1:String):void{
mc._containerLCName = _arg1;
};
sendHostProgress = false;
mc.sendHostLoadProgress = function (_arg1:String):void{
sendHostProgress = true;
};
chk["onEnterFrame"] = function ():void{
var _local1:Object;
var _local2:Object;
var _local3:Number;
var _local4:Boolean;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:Object;
var _local11:Number;
var _local12:Number;
if (((!(this.parent)) || (!(this.parent.parent)))){
delete this["onEnterFrame"];
return;
};
_local1 = this.parent.parent.root;
_local2 = this.parent._mochiad_ctr;
_local3 = (getTimer() - this.started);
_local4 = false;
_local5 = _local1.loaderInfo.bytesTotal;
_local6 = _local1.loaderInfo.bytesLoaded;
_local7 = Math.min(1, options.progress_override(_local1));
if (_local7 == 1){
complete = true;
};
if (complete){
_local6 = Math.max(1, _local6);
_local5 = _local6;
};
_local8 = ((100 * _local6) / _local5);
if (!isNaN(_local7)){
_local8 = (100 * _local7);
};
_local9 = ((100 * _local3) / chk.ad_msec);
_local10 = this._mochiad_bar._inside;
_local11 = 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 f:Function;
var mc = _arg1;
f = 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 25
//MochiCoins (mochi.as3.MochiCoins)
package mochi.as3 {
public class MochiCoins {
public static const STORE_HIDE:String = "StoreHide";
public static const LOGGED_IN:String = "LoggedIn";
public static const STORE_ITEMS:String = "StoreItems";
public static const NO_USER:String = "NoUser";
public static const PROPERTIES_SIZE:String = "PropertiesSize";
public static const ITEM_NEW:String = "ItemNew";
public static const USER_INFO:String = "UserInfo";
public static const IO_ERROR:String = "IOError";
public static const ITEM_OWNED:String = "ItemOwned";
public static const PROPERTIES_SAVED:String = "PropertySaved";
public static const WIDGET_LOADED:String = "WidgetLoaded";
public static const ERROR:String = "Error";
public static const LOGGED_OUT:String = "LoggedOut";
public static const PROFILE_SHOW:String = "ProfileShow";
public static const LOGIN_HIDE:String = "LoginHide";
public static const LOGIN_SHOW:String = "LoginShow";
public static const STORE_SHOW:String = "StoreShow";
public static const PROFILE_HIDE:String = "ProfileHide";
private static var _dispatcher:MochiEventDispatcher = new MochiEventDispatcher();
public static function showItem(_arg1:Object=null):void{
if (((!(_arg1)) || (!((typeof(_arg1.item) == "string"))))){
trace("ERROR: showItem call must pass an Object with an item key");
return;
};
MochiServices.bringToTop();
MochiServices.send("coins_showItem", {options:_arg1}, null, null);
}
public static function saveUserProperties(_arg1:Object):void{
MochiServices.send("coins_saveUserProperties", _arg1);
}
public static function triggerEvent(_arg1:String, _arg2:Object):void{
_dispatcher.triggerEvent(_arg1, _arg2);
}
public static function showLoginWidget(_arg1:Object=null):void{
MochiServices.setContainer();
MochiServices.bringToTop();
MochiServices.send("coins_showLoginWidget", {options:_arg1});
}
public static function getStoreItems():void{
MochiServices.send("coins_getStoreItems");
}
public static function getVersion():String{
return (MochiServices.getVersion());
}
public static function showStore(_arg1:Object=null):void{
MochiServices.bringToTop();
MochiServices.send("coins_showStore", {options:_arg1}, null, null);
}
public static function addEventListener(_arg1:String, _arg2:Function):void{
_dispatcher.addEventListener(_arg1, _arg2);
}
public static function getUserInfo():void{
MochiServices.send("coins_getUserInfo");
}
public static function hideLoginWidget():void{
MochiServices.send("coins_hideLoginWidget");
}
public static function removeEventListener(_arg1:String, _arg2:Function):void{
_dispatcher.removeEventListener(_arg1, _arg2);
}
public static function showVideo(_arg1:Object=null):void{
if (((!(_arg1)) || (!((typeof(_arg1.item) == "string"))))){
trace("ERROR: showVideo call must pass an Object with an item key");
return;
};
MochiServices.bringToTop();
MochiServices.send("coins_showVideo", {options:_arg1}, null, null);
}
}
}//package mochi.as3
Section 26
//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 27
//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 addEventListener(_arg1:String, _arg2:Function):void{
_dispatcher.addEventListener(_arg1, _arg2);
}
public static function removeEventListener(_arg1:String, _arg2:Function):void{
_dispatcher.removeEventListener(_arg1, _arg2);
}
public static function startSession(_arg1:String):void{
MochiServices.send("events_beginSession", {achievementID:_arg1}, null, null);
}
public static function triggerEvent(_arg1:String, _arg2:Object):void{
_dispatcher.triggerEvent(_arg1, _arg2);
}
public static function setNotifications(_arg1:MovieClip, _arg2:Object):void{
var _local3:Object;
var _local4:Object;
_local3 = {};
for (_local4 in _arg2) {
_local3[_local4] = _arg2[_local4];
};
_local3.clip = _arg1;
MochiServices.send("events_setNotifications", _local3, null, null);
}
public static function endGame():void{
var _local1:Number;
_local1 = (new Date().time - gameStart);
trigger("end_game", {time:_local1});
}
public static function startGame():void{
gameStart = new Date().time;
trigger("start_game");
}
public static function trigger(_arg1:String, _arg2:Object=null):void{
if (_arg2 == null){
_arg2 = {};
} else {
if (_arg2["kind"] != undefined){
trace("WARNING: optional arguements package contains key 'id', it will be overwritten");
_arg2["kind"] = _arg1;
};
};
MochiServices.send("events_triggerEvent", {eventObject:_arg2}, null, null);
}
public static function getVersion():String{
return (MochiServices.getVersion());
}
public static function startLevel():void{
levelStart = new Date().time;
trigger("start_level");
}
public static function endLevel():void{
var _local1:Number;
_local1 = (new Date().time - levelStart);
trigger("end_level", {time:_local1});
}
}
}//package mochi.as3
Section 28
//MochiServices (mochi.as3.MochiServices)
package mochi.as3 {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.geom.*;
public class MochiServices {
private static var _container:Object;
private static var _connected:Boolean = false;
private static var _swfVersion:String;
private static var _preserved:Object;
public static var netupAttempted:Boolean = false;
private static var _sendChannel:LocalConnection;
public static var servicesSync:MochiSync = new MochiSync();
private static var _clip:MovieClip;
private static var _id:String;
private static var _services:String = "services.swf";
private static var _servURL:String = "http://www.mochiads.com/static/lib/services/";
public static var widget:Boolean = false;
private static var _timer:Timer;
private static var _sendChannelName:String;
private static var _loader:Loader;
private static var _connecting:Boolean = false;
private static var _mochiLocalConnection:MovieClip;
private static var _listenChannelName:String = "__ms_";
public static var onError:Object;
public static var netup:Boolean = true;
private static var _mochiLC:String = "MochiLC.swf";
public static function isNetworkAvailable():Boolean{
return (!((Security.sandboxType == "localWithFile")));
}
public static function get connected():Boolean{
return (_connected);
}
private static function onReceive(_arg1:Object):void{
var cb:String;
var cblst:Object;
var method:*;
var methodName:String;
var obj:Object;
var pkg = _arg1;
cb = pkg.callbackID;
cblst = _clip._callbacks[cb];
if (!cblst){
return;
};
method = cblst.callbackMethod;
methodName = "";
obj = cblst.callbackObject;
if (((obj) && ((typeof(method) == "string")))){
methodName = method;
if (obj[method] != null){
method = obj[method];
} else {
trace((("Error: Method " + method) + " does not exist."));
};
};
if (method != undefined){
try {
method.apply(obj, pkg.args);
} catch(error:Error) {
trace(((("Error invoking callback method '" + methodName) + "': ") + error.toString()));
};
} else {
if (obj != null){
try {
obj(pkg.args);
} catch(error:Error) {
trace(("Error invoking method on object: " + error.toString()));
};
};
};
delete _clip._callbacks[cb];
}
public static function get childClip():Object{
return (_clip);
}
public static function send(_arg1:String, _arg2:Object=null, _arg3:Object=null, _arg4:Object=null):void{
if (_connected){
_mochiLocalConnection.send(_sendChannelName, "onReceive", {methodName:_arg1, args:_arg2, callbackID:_clip._nextcallbackID});
} else {
if ((((_clip == null)) || (!(_connecting)))){
trace(("Error: MochiServices not connected. Please call MochiServices.connect(). Function: " + _arg1));
handleError(_arg2, _arg3, _arg4);
flush(true);
return;
};
_clip._queue.push({methodName:_arg1, args:_arg2, callbackID:_clip._nextcallbackID});
};
if (_clip != null){
if (((!((_clip._callbacks == null))) && (!((_clip._nextcallbackID == null))))){
_clip._callbacks[_clip._nextcallbackID] = {callbackObject:_arg3, callbackMethod:_arg4};
_clip._nextcallbackID++;
};
};
}
private static function init(_arg1:String, _arg2:Object):void{
_id = _arg1;
if (_arg2 != null){
_container = _arg2;
loadCommunicator(_arg1, _container);
};
}
private static function clickMovie(_arg1:String, _arg2:Function):MovieClip{
var _local3:Array;
var _local4:int;
var _local5:Array;
var _local6:Array;
var _local7:MovieClip;
var _local8:LocalConnection;
var _local9:String;
var _local10:ByteArray;
var _local11:ByteArray;
var _local12:uint;
var _local13:uint;
var _local14:Loader;
_local3 = [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];
_local5 = [104, 0, 31, 64, 0, 7, 208, 0, 0, 12, 1, 0, 67, 2, 0xFF, 0xFF, 0xFF, 63, 3];
_local6 = [0, 64, 0, 0, 0];
_local7 = new MovieClip();
_local8 = new LocalConnection();
_local9 = ((("_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);
_local10 = new ByteArray();
_local11 = new ByteArray();
_local11.endian = Endian.LITTLE_ENDIAN;
_local11.writeShort(1);
_local11.writeUTFBytes(((_arg1 + " ") + _local9));
_local11.writeByte(0);
_local12 = ((_local3.length + _local11.length) + 4);
_local13 = (_local12 + 35);
_local10.endian = Endian.LITTLE_ENDIAN;
_local10.writeUTFBytes("FWS");
_local10.writeByte(8);
_local10.writeUnsignedInt(_local13);
for each (_local4 in _local5) {
_local10.writeByte(_local4);
};
_local10.writeUnsignedInt(_local12);
_local10.writeByte(136);
_local10.writeShort(_local11.length);
_local10.writeBytes(_local11);
for each (_local4 in _local3) {
_local10.writeByte(_local4);
};
for each (_local4 in _local6) {
_local10.writeByte(_local4);
};
_local14 = new Loader();
_local14.loadBytes(_local10);
_local7.addChild(_local14);
return (_local7);
}
public static function stayOnTop():void{
_container.addEventListener(Event.ENTER_FRAME, MochiServices.bringToTop, false, 0, true);
if (_clip != null){
_clip.visible = true;
};
}
public static function addLinkEvent(_arg1:String, _arg2:String, _arg3:DisplayObjectContainer, _arg4:Function=null):void{
var vars:Object;
var avm1Click:DisplayObject;
var s:String;
var i:Number;
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;
vars = new Object();
vars["mav"] = getVersion();
vars["swfv"] = "9";
vars["swfurl"] = btn.loaderInfo.loaderURL;
vars["fv"] = Capabilities.version;
vars["os"] = Capabilities.os;
vars["lang"] = Capabilities.language;
vars["scres"] = ((Capabilities.screenResolutionX + "x") + Capabilities.screenResolutionY);
s = "?";
i = 0;
for (x in vars) {
if (i != 0){
s = (s + "&");
};
i = (i + 1);
s = (((s + x) + "=") + escape(vars[x]));
};
req = new URLRequest("http://x.mochiads.com/linkping.swf");
loader = new Loader();
setURL = function (_arg1:String):void{
var _local2:Rectangle;
if (avm1Click){
btn.removeChild(avm1Click);
};
avm1Click = clickMovie(_arg1, onClick);
_local2 = btn.getBounds(btn);
btn.addChild(avm1Click);
avm1Click.x = _local2.x;
avm1Click.y = _local2.y;
avm1Click.scaleX = (0.01 * _local2.width);
avm1Click.scaleY = (0.01 * _local2.height);
};
err = function (_arg1:Object):void{
netup = false;
_arg1.target.removeEventListener(_arg1.type, arguments.callee);
setURL(burl);
};
complete = function (_arg1:Object):void{
_arg1.target.removeEventListener(_arg1.type, arguments.callee);
};
if (netup){
setURL((url + s));
} else {
setURL(burl);
};
if (!((netupAttempted) || (_connected))){
netupAttempted = true;
loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, err);
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, complete);
loader.load(req);
};
}
public static function warnID(_arg1:String, _arg2:Boolean):void{
var _local3:Number;
_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;
};
};
};
_local3 = 0;
while (_local3 < _arg1.length) {
switch (_arg1.charAt(_local3)){
case "0":
case "1":
case "2":
case "3":
case "4":
case "5":
case "6":
case "7":
case "8":
case "9":
case "a":
case "b":
case "c":
case "d":
case "e":
case "f":
break;
default:
trace(("WARNING: Board ID contains illegal characters: " + _arg1));
return;
};
_local3++;
};
}
public static function disconnect():void{
if (((_connected) || (_connecting))){
if (_clip != null){
if (_clip.parent != null){
if ((_clip.parent is Sprite)){
Sprite(_clip.parent).removeChild(_clip);
_clip = null;
};
};
};
_connecting = (_connected = false);
flush(true);
try {
_mochiLocalConnection.close();
} catch(error:Error) {
};
};
if (_timer != null){
try {
_timer.stop();
} catch(error:Error) {
};
};
}
public static function allowDomains(_arg1:String):String{
var _local2:String;
if (Security.sandboxType != "application"){
Security.allowDomain("*");
Security.allowInsecureDomain("*");
};
if (_arg1.indexOf("http://") != -1){
_local2 = _arg1.split("/")[2].split(":")[0];
if (Security.sandboxType != "application"){
Security.allowDomain(_local2);
Security.allowInsecureDomain(_local2);
};
};
return (_local2);
}
public static function getVersion():String{
return ("3.3 as3");
}
public static function doClose():void{
_container.removeEventListener(Event.ENTER_FRAME, MochiServices.bringToTop);
}
private static function flush(_arg1:Boolean):void{
var _local2:Object;
var _local3:Object;
if (((_clip) && (_clip._queue))){
while (_clip._queue.length > 0) {
_local2 = _clip._queue.shift();
_local3 = null;
if (_local2 != null){
if (_local2.callbackID != null){
_local3 = _clip._callbacks[_local2.callbackID];
};
delete _clip._callbacks[_local2.callbackID];
if (((_arg1) && (!((_local3 == null))))){
handleError(_local2.args, _local3.callbackObject, _local3.callbackMethod);
};
};
};
};
}
public static function get id():String{
return (_id);
}
private static function onEvent(_arg1:Object):void{
var _local2:String;
var _local3:String;
_local2 = _arg1.target;
_local3 = _arg1.event;
switch (_local2){
case "events":
MochiEvents.triggerEvent(_arg1.event, _arg1.args);
break;
case "coins":
MochiCoins.triggerEvent(_arg1.event, _arg1.args);
break;
case "sync":
servicesSync.triggerEvent(_arg1.event, _arg1.args);
break;
};
}
private static function urlOptions(_arg1:Object):Object{
var _local2:Object;
var _local3:String;
var _local4:Array;
var _local5:Number;
var _local6:Array;
_local2 = {};
if (_arg1.stage){
_local3 = _arg1.stage.loaderInfo.parameters.mochiad_options;
} else {
_local3 = _arg1.loaderInfo.parameters.mochiad_options;
};
if (_local3){
_local4 = _local3.split("&");
_local5 = 0;
while (_local5 < _local4.length) {
_local6 = _local4[_local5].split("=");
_local2[unescape(_local6[0])] = unescape(_local6[1]);
_local5++;
};
};
return (_local2);
}
public static function setContainer(_arg1:Object=null, _arg2:Boolean=true):void{
if (_arg1 != null){
if ((_arg1 is Sprite)){
_container = _arg1;
};
};
if (_arg2){
if ((_container is Sprite)){
Sprite(_container).addChild(_clip);
};
};
}
private static function handleError(_arg1:Object, _arg2:Object, _arg3:Object):void{
var args = _arg1;
var callbackObject = _arg2;
var callbackMethod = _arg3;
if (args != null){
if (args.onError != null){
args.onError.apply(null, ["NotConnected"]);
};
if (((!((args.options == null))) && (!((args.options.onError == null))))){
args.options.onError.apply(null, ["NotConnected"]);
};
};
if (callbackMethod != null){
args = {};
args.error = true;
args.errorCode = "NotConnected";
if (((!((callbackObject == null))) && ((callbackMethod is String)))){
try {
var _local5 = callbackObject;
_local5[callbackMethod](args);
} catch(error:Error) {
};
} else {
if (callbackMethod != null){
try {
callbackMethod.apply(args);
} catch(error:Error) {
};
};
};
};
}
private static function loadError(_arg1:Object):void{
_clip._mochiad_ctr_failed = true;
trace("MochiServices could not load.");
MochiServices.disconnect();
MochiServices.onError("IOError");
}
private static function initComChannels():void{
if (!_connected){
trace("[SERVICES_API] connected!");
_connecting = false;
_connected = true;
_mochiLocalConnection.send(_sendChannelName, "onReceive", {methodName:"handshakeDone"});
_mochiLocalConnection.send(_sendChannelName, "onReceive", {methodName:"registerGame", preserved:_preserved, id:_id, clip:_container, version:getVersion(), parentURL:_container.loaderInfo.loaderURL});
_clip.onReceive = onReceive;
_clip.onEvent = onEvent;
_clip.onError = function ():void{
MochiServices.onError("IOError");
};
while (_clip._queue.length > 0) {
_mochiLocalConnection.send(_sendChannelName, "onReceive", _clip._queue.shift());
};
};
}
private static function loadLCBridge(_arg1:Object):void{
var loader:Loader;
var mochiLCURL:String;
var req:URLRequest;
var complete:Function;
var clip = _arg1;
loader = new Loader();
mochiLCURL = (_servURL + _mochiLC);
req = new URLRequest(mochiLCURL);
complete = function (_arg1:Object):void{
_mochiLocalConnection = MovieClip(loader.content);
listen();
};
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, complete);
loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, loadError);
loader.load(req);
clip.addChild(loader);
}
private static function listen():void{
_mochiLocalConnection.connect(_listenChannelName);
_clip.handshake = function (_arg1:Object):void{
MochiServices.comChannelName = _arg1.newChannel;
};
trace("Waiting for MochiAds services to connect...");
}
public static function get clip():Object{
return (_container);
}
public static function set comChannelName(_arg1:String):void{
if (_arg1 != null){
if (_arg1.length > 3){
_sendChannelName = (_arg1 + "_fromgame");
initComChannels();
};
};
}
private static function loadCommunicator(_arg1:String, _arg2:Object):MovieClip{
var _local3:String;
var _local4:String;
var _local5:URLRequest;
var _local6:URLVariables;
_local3 = ("_mochiservices_com_" + _arg1);
if (_clip != null){
return (_clip);
};
if (!MochiServices.isNetworkAvailable()){
return (null);
};
if (urlOptions(_arg2).servURL){
_servURL = urlOptions(_arg2).servURL;
};
_local4 = (_servURL + _services);
if (urlOptions(_arg2).servicesURL){
_local4 = urlOptions(_arg2).servicesURL;
};
_listenChannelName = (_listenChannelName + ((Math.floor(new Date().time) + "_") + Math.floor((Math.random() * 99999))));
MochiServices.allowDomains(_local4);
_clip = createEmptyMovieClip(_arg2, _local3, 10336, false);
loadLCBridge(_clip);
_loader = new Loader();
_loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, loadError);
_local5 = new URLRequest(_local4);
_local6 = new URLVariables();
_local6.listenLC = _listenChannelName;
_local6.mochiad_options = _arg2.loaderInfo.parameters.mochiad_options;
_local6.api_version = getVersion();
if (widget){
_local6.widget = true;
};
_local5.data = _local6;
_loader.load(_local5);
_clip.addChild(_loader);
_clip._mochiservices_com = _loader;
_sendChannel = new LocalConnection();
_clip._queue = [];
_clip._nextcallbackID = 0;
_clip._callbacks = {};
_timer = new Timer(10000, 1);
_timer.addEventListener(TimerEvent.TIMER, connectWait);
_timer.start();
return (_clip);
}
public static function connect(_arg1:String, _arg2:Object, _arg3:Object=null):void{
var id = _arg1;
var clip = _arg2;
var onError = _arg3;
warnID(id, false);
if ((clip is DisplayObject)){
if (((!(_connected)) && ((_clip == null)))){
trace("MochiServices Connecting...");
_connecting = true;
init(id, clip);
};
} else {
trace("Error, MochiServices requires a Sprite, Movieclip or instance of the stage.");
};
if (onError != null){
MochiServices.onError = onError;
} else {
if (MochiServices.onError == null){
MochiServices.onError = function (_arg1:String):void{
trace(_arg1);
};
};
};
}
public static function createEmptyMovieClip(_arg1:Object, _arg2:String, _arg3:Number, _arg4:Boolean=true):MovieClip{
var mc:MovieClip;
var parent = _arg1;
var name = _arg2;
var depth = _arg3;
var doAdd = _arg4;
mc = new MovieClip();
if (doAdd){
if (((false) && (depth))){
parent.addChildAt(mc, depth);
} else {
parent.addChild(mc);
};
};
try {
parent[name] = mc;
} catch(e:Error) {
throw (new Error("MochiServices requires a clip that is an instance of a dynamic class. If your class extends Sprite or MovieClip, you must make it dynamic."));
};
mc["_name"] = name;
return (mc);
}
public static function bringToTop(_arg1:Event=null):void{
var e = _arg1;
if (((!((MochiServices.clip == null))) && (!((MochiServices.childClip == null))))){
try {
if (MochiServices.clip.numChildren > 1){
MochiServices.clip.setChildIndex(MochiServices.childClip, (MochiServices.clip.numChildren - 1));
};
} catch(errorObject:Error) {
trace("Warning: Depth sort error.");
_container.removeEventListener(Event.ENTER_FRAME, MochiServices.bringToTop);
};
};
}
public static function connectWait(_arg1:TimerEvent):void{
if (!_connected){
_clip._mochiad_ctr_failed = true;
trace("MochiServices could not load. (timeout)");
MochiServices.disconnect();
MochiServices.onError("IOError");
};
}
}
}//package mochi.as3
Section 29
//MochiSync (mochi.as3.MochiSync)
package mochi.as3 {
import flash.utils.*;
public dynamic class MochiSync extends Proxy {
private var _syncContainer:Object;
public static var SYNC_PROPERTY:String = "UpdateProperty";
public static var SYNC_REQUEST:String = "SyncRequest";
public function MochiSync():void{
_syncContainer = {};
}
public function triggerEvent(_arg1:String, _arg2:Object):void{
switch (_arg1){
case SYNC_REQUEST:
MochiServices.send("sync_syncronize", _syncContainer);
break;
case SYNC_PROPERTY:
_syncContainer[_arg2.name] = _arg2.value;
break;
};
}
override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function getProperty(_arg1){
return (_syncContainer[_arg1]);
}
override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function setProperty(_arg1, _arg2):void{
var _local3:String;
if (_syncContainer[_arg1] == _arg2){
return;
};
_local3 = _arg1.toString();
_syncContainer[_local3] = _arg2;
MochiServices.send("sync_propUpdate", {name:_local3, value:_arg2});
}
}
}//package mochi.as3
Section 30
//bg_music (bg_music)
package {
import flash.media.*;
public dynamic class bg_music extends Sound {
}
}//package
Section 31
//Main (Main)
package {
import flash.display.*;
import flash.events.*;
import mochi.as3.*;
import flash.media.*;
public dynamic class Main extends MovieClip {
public var shanMusic:shan_music;
public var replay_btn:SimpleButton;
public var pack1_mc:packClass;
public var show_btn:SimpleButton;
public var person3_btn:SimpleButton;
public var beginPerson2_btn:SimpleButton;
public var beginFrame:int;// = 0
public var show1Person_mc:MovieClip;
public var pack2_mc:pack2Class;
private var deagMc:Object;
public var show3Person_mc:MovieClip;
public var person2_btn:SimpleButton;
public var beginPerson1_btn:SimpleButton;
public var bgMusic:bg_music;
public var saveCop_ary:Array;
public var save3_ary:Array;
public var start_btn:SimpleButton;
public var person1_btn:SimpleButton;
public var dressUpPerson:MovieClip;
public var pageChange_btn:SimpleButton;
public var volumeSize1:Number;// = 1
public var volumeSize2:Number;// = 1
public var myChannel1:SoundChannel;
public var myChannel2:SoundChannel;
public var show2Person_mc:MovieClip;
public var reset_btn:SimpleButton;
public var save2_ary:Array;
public var load_mc:MovieClip;
public var beginPerson3_btn:SimpleButton;
public var nowPerson:uint;// = 1
private var beginMode:String;// = "load"
public var music_mc:MovieClip;
public var st2:SoundTransform;
public var st1:SoundTransform;
public var save1_ary:Array;
public function Main(){
saveCop_ary = new Array(5, 0, 0, 0, 0);
beginFrame = 0;
nowPerson = 1;
beginMode = "load";
bgMusic = new bg_music();
shanMusic = new shan_music();
volumeSize1 = 1;
volumeSize2 = 1;
st1 = new SoundTransform(volumeSize1, 0);
st2 = new SoundTransform(volumeSize2, 0);
super();
addFrameScript(0, frame0, (beginFrame + 1), frame1, (beginFrame + 2), frame2, (beginFrame + 3), frame3);
}
private function beginClick(_arg1:MouseEvent):void{
var _local2:uint;
_local2 = 1;
while (_local2 <= 3) {
if (_arg1.currentTarget == this[(("beginPerson" + _local2) + "_btn")]){
nowPerson = _local2;
gotoAndStop("frame_2");
break;
};
_local2++;
};
}
private function frame0():void{
if (beginMode == "load"){
stop();
} else {
if (beginMode == "add"){
MochiAd.showPreGameAd({clip:root, id:"266d413d7fa6e5f4", res:"650x450", background:0xFFFFFF, color:0xFF8A00, outline:0xFFFFFF, no_bg:true});
};
};
}
private function frame2():void{
var _local1:*;
((myChannel2) && (myChannel2.stop()));
pack1_mc.main_mc.gotoAndStop(1);
refurbish(dressUpPerson, nowPerson);
reset_btn.addEventListener(MouseEvent.CLICK, resetGame);
show_btn.addEventListener(MouseEvent.CLICK, showGame);
pageChange_btn.addEventListener(MouseEvent.CLICK, pageChange);
_local1 = 1;
while (_local1 <= 3) {
this[(("person" + _local1) + "_btn")].addEventListener(MouseEvent.CLICK, personChange);
_local1++;
};
}
private function frame3():void{
var _local1:*;
if (!myChannel2){
myChannel2 = shanMusic.play(0, 9999);
myChannel2.soundTransform = st2;
};
refurbish(show1Person_mc, 1);
refurbish(show2Person_mc, 2);
refurbish(show3Person_mc, 3);
replay_btn.addEventListener(MouseEvent.CLICK, replayGame);
_local1 = 1;
while (_local1 <= 3) {
this[(("show" + _local1) + "Person_mc")].buttonMode = true;
this[(("show" + _local1) + "Person_mc")].addEventListener(MouseEvent.MOUSE_DOWN, dragStart);
_local1++;
};
}
private function musicDown(_arg1:MouseEvent):void{
if (volumeSize1){
volumeSize1 = 0;
volumeSize2 = 0;
_arg1.currentTarget.gotoAndStop(2);
} else {
volumeSize1 = 1;
volumeSize2 = 1;
_arg1.currentTarget.gotoAndStop(1);
};
st1 = new SoundTransform(volumeSize1, 0);
st2 = new SoundTransform(volumeSize2, 0);
myChannel1.soundTransform = st1;
if (this.currentFrame == (beginFrame + 4)){
myChannel2.soundTransform = st2;
};
}
private function frame1():void{
var _local1:uint;
if (!myChannel1){
myChannel1 = bgMusic.play(0, 9999);
myChannel1.soundTransform = st1;
};
((myChannel2) && (myChannel2.stop()));
save1_ary = saveCop_ary.concat();
save2_ary = saveCop_ary.concat();
save3_ary = saveCop_ary.concat();
nowPerson = 1;
stop();
music_mc.gotoAndStop((2 - volumeSize1));
start_btn.addEventListener(MouseEvent.CLICK, startGame);
music_mc.addEventListener(MouseEvent.MOUSE_DOWN, musicDown);
_local1 = 1;
while (_local1 <= 3) {
this[(("beginPerson" + _local1) + "_btn")].addEventListener(MouseEvent.CLICK, beginClick);
_local1++;
};
}
private function replayGame(_arg1:MouseEvent):void{
gotoAndStop("frame_1");
}
private function showGame(_arg1:MouseEvent):void{
gotoAndStop("frame_3");
}
private function pageChange(_arg1:MouseEvent):void{
if (pack1_mc.currentFrame == 1){
pack1_mc.gotoAndPlay(2);
};
}
public function refurbish(_arg1:MovieClip, _arg2:uint){
var _local3:Array;
var _local4:int;
_local3 = new Array();
_local3 = this[(("save" + _arg2) + "_ary")];
_local4 = 1;
while (_local4 <= _local3.length) {
if (this.currentFrame == (beginFrame + 4)){
if (((_arg1[("p" + _local4)]) && ((_local4 < 5)))){
if (_local3[_local4] > 0){
_arg1[("p" + _local4)].gotoAndStop(_local3[_local4]);
} else {
_arg1[("p" + _local4)].gotoAndStop(_arg1[("p" + _local4)].totalFrames);
if ((((_local4 == 2)) || ((_local4 == 3)))){
_arg1[("p" + _local4)].gotoAndStop((19 + _arg2));
};
};
};
if (((_arg1[("p" + _local4)]) && ((_local4 == 5)))){
if (_local3[_local4] > 0){
_arg1[("p" + _local4)].p1.gotoAndStop(_local3[_local4]);
_arg1[("p" + _local4)].p2.gotoAndStop(_local3[_local4]);
} else {
_arg1[("p" + _local4)].p1.gotoAndStop(_arg1[("p" + _local4)].p1.totalFrames);
_arg1[("p" + _local4)].p2.gotoAndStop(_arg1[("p" + _local4)].p2.totalFrames);
};
};
} else {
if (_arg1[("p" + _local4)]){
if (_local3[_local4] > 0){
_arg1[("p" + _local4)].gotoAndStop(_local3[_local4]);
} else {
_arg1[("p" + _local4)].gotoAndStop(_arg1[("p" + _local4)].totalFrames);
if ((((_local4 == 2)) || ((_local4 == 3)))){
_arg1[("p" + _local4)].gotoAndStop((19 + _arg2));
};
};
};
};
_local4++;
};
if (_arg1.p0){
_arg1.p0.gotoAndStop(_arg2);
};
}
private function dragStop(_arg1:MouseEvent):void{
deagMc.stopDrag();
stage.removeEventListener(MouseEvent.MOUSE_UP, dragStop);
}
private function personChange(_arg1:MouseEvent):void{
var _local2:*;
_local2 = 1;
while (_local2 <= 3) {
if (_arg1.currentTarget == this[(("person" + _local2) + "_btn")]){
nowPerson = _local2;
refurbish(dressUpPerson, nowPerson);
};
_local2++;
};
}
private function startGame(_arg1:MouseEvent):void{
gotoAndStop("frame_2");
}
private function dragStart(_arg1:MouseEvent):void{
_arg1.currentTarget.startDrag(false);
if (_arg1.currentTarget.scaleX < 0.9){
_arg1.currentTarget.y = (_arg1.currentTarget.y + 50);
};
_arg1.currentTarget.scaleX = (_arg1.currentTarget.scaleY = 0.9);
deagMc = _arg1.currentTarget;
stage.addEventListener(MouseEvent.MOUSE_UP, dragStop);
}
private function resetGame(_arg1:MouseEvent):void{
this[(("save" + nowPerson) + "_ary")] = saveCop_ary.concat();
refurbish(dressUpPerson, nowPerson);
}
}
}//package
Section 32
//pack1Class (pack1Class)
package {
import flash.display.*;
import flash.events.*;
import flash.filters.*;
public dynamic class pack1Class extends MovieClip {
private var strength:Number;// = 3
private var inner:Boolean;// = false
public var p2c11:MovieClip;
public var p2c12:MovieClip;
public var p2c13:MovieClip;
public var p2c14:MovieClip;
public var p2c15:MovieClip;
public var p2c16:MovieClip;
public var p2c17:MovieClip;
public var p2c19:MovieClip;
public var p2c10:MovieClip;
private var blurX:Number;// = 5
private var blurY:Number;// = 5
public var p2c18:MovieClip;
private var quality:Number;// = 3
public var p3c11:MovieClip;
public var p3c13:MovieClip;
public var p3c14:MovieClip;
public var p3c16:MovieClip;
public var p3c17:MovieClip;
public var p3c15:MovieClip;
public var p3c10:MovieClip;
public var p3c19:MovieClip;
public var p3c12:MovieClip;
public var p3c1:MovieClip;
public var p3c2:MovieClip;
public var p3c3:MovieClip;
public var p3c5:MovieClip;
public var p3c18:MovieClip;
public var p3c8:MovieClip;
public var p3c9:MovieClip;
public var p3c4:MovieClip;
public var p3c6:MovieClip;
public var p3c7:MovieClip;
private var Alpha:Number;// = 100
private var color:Number;// = 0xFFFFFF
public var p2c1:MovieClip;
public var p2c2:MovieClip;
public var p2c3:MovieClip;
public var p2c4:MovieClip;
public var p2c6:MovieClip;
public var p2c7:MovieClip;
public var p2c8:MovieClip;
public var p2c9:MovieClip;
public var p2c5:MovieClip;
private var filter:GlowFilter;
public var p1c1:MovieClip;
public var p1c2:MovieClip;
private var filterArray:Array;
private var filterclear:Array;
private var knockout:Boolean;// = false
public function pack1Class(){
color = 0xFFFFFF;
Alpha = 100;
blurX = 5;
blurY = 5;
strength = 3;
quality = 3;
inner = false;
knockout = false;
filter = new GlowFilter(color, Alpha, blurX, blurY, strength, quality, inner, knockout);
filterArray = new Array();
filterclear = new Array();
super();
filterArray.push(filter);
addFrameScript(0, frame0, 1, frame0, 2, frame0);
}
private function frame0():void{
var _local1:*;
_local1 = 1;
while (_local1 <= (this.numChildren - 1)) {
(getChildAt(_local1) as MovieClip).gotoAndStop((getChildAt(_local1) as MovieClip).name.substring(3));
(getChildAt(_local1) as MovieClip).buttonMode = true;
(getChildAt(_local1) as MovieClip).addEventListener(MouseEvent.MOUSE_OVER, mouseOver);
(getChildAt(_local1) as MovieClip).addEventListener(MouseEvent.MOUSE_OUT, mouseOut);
(getChildAt(_local1) as MovieClip).addEventListener(MouseEvent.CLICK, mouseClick);
_local1++;
};
}
private function mouseOut(_arg1:MouseEvent):void{
_arg1.currentTarget.filters = filterclear;
}
private function mouseOver(_arg1:MouseEvent):void{
_arg1.currentTarget.filters = filterArray;
}
private function mouseClick(_arg1:MouseEvent):void{
var _local2:int;
var _local3:int;
_local2 = _arg1.currentTarget.name.substring(1, 2);
_local3 = _arg1.currentTarget.name.substring(3);
MovieClip(parent.parent)[(("save" + MovieClip(parent.parent).nowPerson) + "_ary")][_local2] = _local3;
if (_local2 == 1){
MovieClip(parent.parent)[(("save" + MovieClip(parent.parent).nowPerson) + "_ary")][2] = 0;
MovieClip(parent.parent)[(("save" + MovieClip(parent.parent).nowPerson) + "_ary")][3] = 0;
} else {
MovieClip(parent.parent)[(("save" + MovieClip(parent.parent).nowPerson) + "_ary")][1] = 0;
};
MovieClip(parent.parent).refurbish(MovieClip(parent.parent).dressUpPerson, MovieClip(parent.parent).nowPerson);
}
}
}//package
Section 33
//pack2Class (pack2Class)
package {
import flash.display.*;
import flash.events.*;
import flash.filters.*;
public dynamic class pack2Class extends Sprite {
public var p4c4:MovieClip;
private var quality:Number;// = 3
public var p4c9:MovieClip;
public var p4c8:MovieClip;
private var knockout:Boolean;// = false
public var p4c3:MovieClip;
private var Alpha:Number;// = 100
private var strength:Number;// = 3
private var inner:Boolean;// = false
private var color:Number;// = 0xFFFFFF
public var p4c11:MovieClip;
public var p4c12:MovieClip;
public var p4c13:MovieClip;
public var p4c10:MovieClip;
private var filter:GlowFilter;
public var p5c1:MovieClip;
public var p5c3:MovieClip;
public var p5c2:MovieClip;
private var filterArray:Array;
private var blurX:Number;// = 5
private var blurY:Number;// = 5
private var filterclear:Array;
public var p4c6:MovieClip;
public var p4c1:MovieClip;
public var p4c2:MovieClip;
public var p4c5:MovieClip;
public var p4c7:MovieClip;
public function pack2Class(){
var _local1:int;
color = 0xFFFFFF;
Alpha = 100;
blurX = 5;
blurY = 5;
strength = 3;
quality = 3;
inner = false;
knockout = false;
filter = new GlowFilter(color, Alpha, blurX, blurY, strength, quality, inner, knockout);
filterArray = new Array();
filterclear = new Array();
super();
filterArray.push(filter);
_local1 = 0;
while (_local1 < this.numChildren) {
(getChildAt(_local1) as MovieClip).buttonMode = true;
(getChildAt(_local1) as MovieClip).addEventListener(MouseEvent.MOUSE_OVER, mouseOver);
(getChildAt(_local1) as MovieClip).addEventListener(MouseEvent.MOUSE_OUT, mouseOut);
(getChildAt(_local1) as MovieClip).addEventListener(MouseEvent.CLICK, mouseClick);
_local1++;
};
}
private function mouseClick(_arg1:MouseEvent):void{
var _local2:int;
var _local3:int;
_local2 = _arg1.currentTarget.name.substring(1, 2);
_local3 = _arg1.currentTarget.name.substring(3);
MovieClip(parent)[(("save" + MovieClip(parent).nowPerson) + "_ary")][_local2] = _local3;
MovieClip(parent).refurbish(MovieClip(parent).dressUpPerson, MovieClip(parent).nowPerson);
}
private function mouseOver(_arg1:MouseEvent):void{
_arg1.currentTarget.filters = filterArray;
}
private function mouseOut(_arg1:MouseEvent):void{
_arg1.currentTarget.filters = filterclear;
}
}
}//package
Section 34
//packClass (packClass)
package {
import flash.display.*;
public dynamic class packClass extends MovieClip {
public var main_mc:pack1Class;
public function packClass(){
addFrameScript(0, frame0, 10, frame10);
}
private function frame10():void{
if (main_mc.currentFrame < main_mc.totalFrames){
main_mc.nextFrame();
} else {
main_mc.gotoAndStop(1);
};
}
private function frame0():void{
stop();
}
private function frame20():void{
gotoAndStop(1);
}
}
}//package
Section 35
//shan_music (shan_music)
package {
import flash.media.*;
public dynamic class shan_music extends Sound {
}
}//package