Section 1
//ag_intro_mc_223 (AGL_fla.ag_intro_mc_223)
package AGL_fla {
import flash.display.*;
public dynamic class ag_intro_mc_223 extends MovieClip {
public function ag_intro_mc_223(){
super();
addFrameScript(246, frame247);
}
function frame247(){
stop();
}
}
}//package AGL_fla
Section 2
//CROWD_604 (AGL_fla.CROWD_604)
package AGL_fla {
import flash.display.*;
public dynamic class CROWD_604 extends MovieClip {
public var mc1:MovieClip;
public var mc3:MovieClip;
public var mc2:MovieClip;
public function CROWD_604(){
super();
}
}
}//package AGL_fla
Section 3
//ENDLIFE_640 (AGL_fla.ENDLIFE_640)
package AGL_fla {
import flash.display.*;
public dynamic class ENDLIFE_640 extends MovieClip {
public var mc1:MovieClip;
public function ENDLIFE_640(){
super();
addFrameScript(0, frame1, 14, frame15, 29, frame30, 44, frame45, 59, frame60);
}
function frame15(){
stop();
}
function frame1(){
stop();
this.visible = false;
}
function frame30(){
stop();
}
function frame45(){
stop();
}
function frame60(){
stop();
}
}
}//package AGL_fla
Section 4
//ENDLIFE_648 (AGL_fla.ENDLIFE_648)
package AGL_fla {
import flash.display.*;
public dynamic class ENDLIFE_648 extends MovieClip {
public var mc1:MovieClip;
public function ENDLIFE_648(){
super();
addFrameScript(0, frame1, 1, frame2, 14, frame15, 29, frame30, 44, frame45, 59, frame60);
}
function frame15(){
stop();
}
function frame1(){
stop();
this.visible = false;
}
function frame2(){
this.visible = true;
}
function frame30(){
stop();
}
function frame45(){
stop();
}
function frame60(){
stop();
}
}
}//package AGL_fla
Section 5
//ENDLIFE_655 (AGL_fla.ENDLIFE_655)
package AGL_fla {
import flash.display.*;
public dynamic class ENDLIFE_655 extends MovieClip {
public var mc1:MovieClip;
public function ENDLIFE_655(){
super();
addFrameScript(0, frame1, 14, frame15, 29, frame30, 44, frame45, 59, frame60);
}
function frame15(){
stop();
}
function frame1(){
stop();
this.visible = false;
}
function frame30(){
stop();
}
function frame45(){
stop();
}
function frame60(){
stop();
}
}
}//package AGL_fla
Section 6
//ENDLIFE_665 (AGL_fla.ENDLIFE_665)
package AGL_fla {
import flash.display.*;
public dynamic class ENDLIFE_665 extends MovieClip {
public var mc1:MovieClip;
public function ENDLIFE_665(){
super();
addFrameScript(0, frame1, 14, frame15, 29, frame30, 44, frame45, 59, frame60);
}
function frame15(){
stop();
}
function frame1(){
stop();
this.visible = false;
}
function frame30(){
stop();
}
function frame45(){
stop();
}
function frame60(){
stop();
}
}
}//package AGL_fla
Section 7
//ENDLIFE_677 (AGL_fla.ENDLIFE_677)
package AGL_fla {
import flash.display.*;
public dynamic class ENDLIFE_677 extends MovieClip {
public var mc1:MovieClip;
public function ENDLIFE_677(){
super();
addFrameScript(0, frame1, 14, frame15, 29, frame30, 44, frame45, 59, frame60);
}
function frame15(){
stop();
}
function frame1(){
stop();
this.visible = false;
}
function frame30(){
stop();
}
function frame45(){
stop();
}
function frame60(){
stop();
}
}
}//package AGL_fla
Section 8
//INGAME_104 (AGL_fla.INGAME_104)
package AGL_fla {
import flash.display.*;
public dynamic class INGAME_104 extends MovieClip {
public function INGAME_104(){
super();
addFrameScript(0, frame1, 11, frame12, 31, frame32, 69, frame70, 85, frame86, 99, frame100);
}
function frame70(){
gotoAndPlay(("go" + randRange(1, 2)));
}
function frame86(){
gotoAndStop(1);
}
public function randRange(min:Number, max:Number):Number{
var randomNum:Number;
randomNum = (Math.floor((Math.random() * ((max - min) + 1))) + min);
return (randomNum);
}
function frame12(){
gotoAndPlay(("go" + randRange(1, 2)));
}
function frame1(){
gotoAndPlay(("idle" + randRange(1, 3)));
}
function frame100(){
gotoAndStop(1);
}
function frame32(){
gotoAndPlay(("go" + randRange(1, 2)));
}
}
}//package AGL_fla
Section 9
//INGAME_140 (AGL_fla.INGAME_140)
package AGL_fla {
import flash.display.*;
public dynamic class INGAME_140 extends MovieClip {
public var mcfly:MovieClip;
public function INGAME_140(){
super();
}
}
}//package AGL_fla
Section 10
//INGAME_198 (AGL_fla.INGAME_198)
package AGL_fla {
import flash.display.*;
import flash.text.*;
public dynamic class INGAME_198 extends MovieClip {
public var txt1:TextField;
public function INGAME_198(){
super();
addFrameScript(0, frame1);
}
function frame1(){
txt1.mouseEnabled = false;
}
}
}//package AGL_fla
Section 11
//INGAME_200 (AGL_fla.INGAME_200)
package AGL_fla {
import flash.display.*;
public dynamic class INGAME_200 extends MovieClip {
public var mctip:MovieClip;
public var mc1:MovieClip;
public function INGAME_200(){
super();
}
}
}//package AGL_fla
Section 12
//INGAME_355 (AGL_fla.INGAME_355)
package AGL_fla {
import flash.display.*;
import flash.text.*;
public dynamic class INGAME_355 extends MovieClip {
public var mctab7:MovieClip;
public var mccoins:MovieClip;
public var btnback:SimpleButton;
public var btnnext:MovieClip;
public var btnprev:MovieClip;
public var mcitem1:MovieClip;
public var mcitem2:MovieClip;
public var mcitem3:MovieClip;
public var mcitem4:MovieClip;
public var txt1:TextField;
public var mctab1:MovieClip;
public var mctab2:MovieClip;
public var mctab3:MovieClip;
public var mctab4:MovieClip;
public var mctab5:MovieClip;
public var mctab6:MovieClip;
public var mctab8:MovieClip;
public function INGAME_355(){
super();
}
}
}//package AGL_fla
Section 13
//INGAME_375 (AGL_fla.INGAME_375)
package AGL_fla {
import flash.display.*;
import flash.text.*;
public dynamic class INGAME_375 extends MovieClip {
public var mccoins:MovieClip;
public var mcdesire:MovieClip;
public var mc1:MovieClip;
public var mc3:MovieClip;
public var mc2:MovieClip;
public var mc5:MovieClip;
public var btnnext:MovieClip;
public var mc4:MovieClip;
public var txtname:TextField;
public var mcage:MovieClip;
public var mcgoal:MovieClip;
public var btnprev:MovieClip;
public var txtstar:TextField;
public var txtdays:TextField;
public var txtgold:TextField;
public var txtage:TextField;
public function INGAME_375(){
super();
}
}
}//package AGL_fla
Section 14
//INGAME_411 (AGL_fla.INGAME_411)
package AGL_fla {
import flash.display.*;
import flash.text.*;
public dynamic class INGAME_411 extends MovieClip {
public var txtreq:TextField;
public var mcreq:MovieClip;
public var mc1:MovieClip;
public var mc3:MovieClip;
public var mc5:MovieClip;
public var mc2:MovieClip;
public var mc4:MovieClip;
public var txt1:TextField;
public function INGAME_411(){
super();
}
}
}//package AGL_fla
Section 15
//INGAME_415 (AGL_fla.INGAME_415)
package AGL_fla {
import flash.display.*;
public dynamic class INGAME_415 extends MovieClip {
public var mc1:MovieClip;
public function INGAME_415(){
super();
addFrameScript(0, frame1, 1, frame2, 14, frame15);
}
function frame15(){
stop();
}
function frame1(){
stop();
this.visible = false;
}
function frame2(){
this.visible = true;
}
}
}//package AGL_fla
Section 16
//INGAME_423 (AGL_fla.INGAME_423)
package AGL_fla {
import flash.display.*;
public dynamic class INGAME_423 extends MovieClip {
public var mc1:MovieClip;
public function INGAME_423(){
super();
addFrameScript(0, frame1, 1, frame2, 9, frame10);
}
function frame10(){
stop();
}
function frame1(){
stop();
this.visible = false;
}
function frame2(){
this.visible = true;
}
}
}//package AGL_fla
Section 17
//INGAME_433 (AGL_fla.INGAME_433)
package AGL_fla {
import flash.display.*;
public dynamic class INGAME_433 extends MovieClip {
public var mc1:MovieClip;
public function INGAME_433(){
super();
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
this.visible = false;
}
function frame2(){
this.visible = true;
}
}
}//package AGL_fla
Section 18
//INGAME_434 (AGL_fla.INGAME_434)
package AGL_fla {
import flash.display.*;
import flash.text.*;
public dynamic class INGAME_434 extends MovieClip {
public var txt1:TextField;
public function INGAME_434(){
super();
}
}
}//package AGL_fla
Section 19
//INGAME_435 (AGL_fla.INGAME_435)
package AGL_fla {
import flash.display.*;
public dynamic class INGAME_435 extends MovieClip {
public var mc3:MovieClip;
public var mc2:MovieClip;
public var mcdot2:MovieClip;
public var mcdot4:MovieClip;
public var mcdot3:MovieClip;
public var mcdot5:MovieClip;
public var mcdot1:MovieClip;
public var mcdot7:MovieClip;
public var mcdot6:MovieClip;
public function INGAME_435(){
super();
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
this.visible = false;
}
function frame2(){
this.visible = true;
}
}
}//package AGL_fla
Section 20
//INGAME_448 (AGL_fla.INGAME_448)
package AGL_fla {
import flash.display.*;
public dynamic class INGAME_448 extends MovieClip {
public var btnback:SimpleButton;
public var mc1:MovieClip;
public var mc3:MovieClip;
public var mc2:MovieClip;
public var btnnext:SimpleButton;
public var btnapply:SimpleButton;
public function INGAME_448(){
super();
addFrameScript(0, frame1, 1, frame2, 12, frame13);
}
function frame1(){
stop();
this.visible = false;
}
function frame13(){
stop();
}
function frame2(){
stop();
this.visible = true;
}
}
}//package AGL_fla
Section 21
//INGAME_455 (AGL_fla.INGAME_455)
package AGL_fla {
import flash.display.*;
import flash.text.*;
public dynamic class INGAME_455 extends MovieClip {
public var mcthumb:MovieClip;
public var mctxt:MovieClip;
public var btnback:SimpleButton;
public var mcfx1:MovieClip;
public var mc1:MovieClip;
public var mc3:MovieClip;
public var mc2:MovieClip;
public var mc4:MovieClip;
public var mcfx2:MovieClip;
public var txtname:TextField;
public var txt1:TextField;
public var txtstat:TextField;
public function INGAME_455(){
super();
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
this.visible = false;
}
function frame2(){
this.visible = true;
}
}
}//package AGL_fla
Section 22
//INGAME_466 (AGL_fla.INGAME_466)
package AGL_fla {
import flash.display.*;
import flash.text.*;
public dynamic class INGAME_466 extends MovieClip {
public var btnclose:SimpleButton;
public var txt1:TextField;
public function INGAME_466(){
super();
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
this.visible = false;
}
function frame2(){
this.visible = true;
}
}
}//package AGL_fla
Section 23
//INGAME_469 (AGL_fla.INGAME_469)
package AGL_fla {
import flash.display.*;
import flash.text.*;
public dynamic class INGAME_469 extends MovieClip {
public var btnok:SimpleButton;
public var txt1:TextField;
public var txt2:TextField;
public function INGAME_469(){
super();
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
this.visible = false;
}
function frame2(){
this.visible = true;
}
}
}//package AGL_fla
Section 24
//INGAME_472 (AGL_fla.INGAME_472)
package AGL_fla {
import flash.display.*;
import flash.text.*;
public dynamic class INGAME_472 extends MovieClip {
public var mctxt:MovieClip;
public var btn1:SimpleButton;
public var txt1:TextField;
public var btnskip:SimpleButton;
public function INGAME_472(){
super();
addFrameScript(0, frame1, 1, frame2, 14, frame15, 20, frame21, 27, frame28, 34, frame35, 35, frame36, 45, frame46, 50, frame51, 61, frame62);
}
function frame15(){
this.visible = true;
}
function frame1(){
stop();
this.visible = false;
}
function frame21(){
this.visible = true;
}
function frame2(){
this.visible = true;
}
function frame36(){
this.visible = true;
}
function frame28(){
this.visible = true;
}
function frame35(){
this.visible = true;
}
function frame46(){
this.visible = true;
}
function frame51(){
this.visible = true;
}
function frame62(){
this.visible = true;
}
}
}//package AGL_fla
Section 25
//INGAME_488 (AGL_fla.INGAME_488)
package AGL_fla {
import flash.display.*;
public dynamic class INGAME_488 extends MovieClip {
public var btnyay:SimpleButton;
public function INGAME_488(){
super();
addFrameScript(0, frame1, 1, frame2, 149, frame150);
}
function frame1(){
stop();
this.visible = false;
}
function frame2(){
this.visible = true;
}
function frame150(){
stop();
}
}
}//package AGL_fla
Section 26
//INGAME_492 (AGL_fla.INGAME_492)
package AGL_fla {
import flash.display.*;
public dynamic class INGAME_492 extends MovieClip {
public function INGAME_492(){
super();
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
this.visible = false;
}
function frame2(){
this.visible = true;
}
}
}//package AGL_fla
Section 27
//INGAME_531 (AGL_fla.INGAME_531)
package AGL_fla {
import flash.display.*;
public dynamic class INGAME_531 extends MovieClip {
public var btngood:SimpleButton;
public var mccoinposition:MovieClip;
public var mc1:MovieClip;
public function INGAME_531(){
super();
addFrameScript(0, frame1, 1, frame2, 22, frame23);
}
function frame1(){
stop();
this.visible = false;
}
function frame23(){
stop();
}
function frame2(){
this.visible = true;
}
}
}//package AGL_fla
Section 28
//INGAME_533 (AGL_fla.INGAME_533)
package AGL_fla {
import flash.display.*;
public dynamic class INGAME_533 extends MovieClip {
public var btngood:SimpleButton;
public function INGAME_533(){
super();
addFrameScript(0, frame1, 1, frame2, 47, frame48);
}
function frame1(){
stop();
this.visible = false;
}
function frame2(){
this.visible = true;
}
function frame48(){
stop();
}
}
}//package AGL_fla
Section 29
//INGAME_547 (AGL_fla.INGAME_547)
package AGL_fla {
import flash.display.*;
import flash.text.*;
public dynamic class INGAME_547 extends MovieClip {
public var btngood:SimpleButton;
public var mc2:MovieClip;
public var txt1:TextField;
public function INGAME_547(){
super();
addFrameScript(0, frame1, 1, frame2, 44, frame45);
}
function frame1(){
stop();
this.visible = false;
}
function frame2(){
this.visible = true;
}
function frame45(){
stop();
}
}
}//package AGL_fla
Section 30
//INGAME_549 (AGL_fla.INGAME_549)
package AGL_fla {
import flash.display.*;
public dynamic class INGAME_549 extends MovieClip {
public var mctxt:MovieClip;
public function INGAME_549(){
super();
addFrameScript(0, frame1, 1, frame2, 110, frame111);
}
function frame1(){
stop();
this.visible = false;
}
function frame111(){
stop();
}
function frame2(){
this.visible = true;
}
}
}//package AGL_fla
Section 31
//INGAME_616 (AGL_fla.INGAME_616)
package AGL_fla {
import flash.display.*;
public dynamic class INGAME_616 extends MovieClip {
public function INGAME_616(){
super();
addFrameScript(0, frame1, 20, frame21, 39, frame40);
}
function frame1(){
stop();
}
function frame21(){
stop();
}
function frame40(){
stop();
}
}
}//package AGL_fla
Section 32
//INGAME_624 (AGL_fla.INGAME_624)
package AGL_fla {
import flash.display.*;
public dynamic class INGAME_624 extends MovieClip {
public var mccloud:MovieClip;
public var mccar1:MovieClip;
public var mclight1:MovieClip;
public function INGAME_624(){
super();
addFrameScript(0, frame1, 20, frame21, 39, frame40);
}
function frame1(){
stop();
}
function frame21(){
stop();
}
function frame40(){
stop();
}
}
}//package AGL_fla
Section 33
//INGAME_629 (AGL_fla.INGAME_629)
package AGL_fla {
import flash.display.*;
public dynamic class INGAME_629 extends MovieClip {
public var mcstink:MovieClip;
public function INGAME_629(){
super();
}
}
}//package AGL_fla
Section 34
//INGAME_630 (AGL_fla.INGAME_630)
package AGL_fla {
import flash.display.*;
public dynamic class INGAME_630 extends MovieClip {
public var mcstink:MovieClip;
public function INGAME_630(){
super();
}
}
}//package AGL_fla
Section 35
//INPUT_311 (AGL_fla.INPUT_311)
package AGL_fla {
import flash.display.*;
public dynamic class INPUT_311 extends MovieClip {
public var mc1:MovieClip;
public var mc3:MovieClip;
public var mc2:MovieClip;
public var btnnext:MovieClip;
public var btnprev:MovieClip;
public function INPUT_311(){
super();
addFrameScript(0, frame1, 1, frame2, 14, frame15, 26, frame27, 38, frame39, 49, frame50);
}
function frame15(){
stop();
}
function frame1(){
stop();
this.visible = false;
}
function frame2(){
this.visible = true;
}
function frame27(){
stop();
}
function frame39(){
stop();
}
function frame50(){
stop();
}
}
}//package AGL_fla
Section 36
//ITEM_517 (AGL_fla.ITEM_517)
package AGL_fla {
import flash.display.*;
public dynamic class ITEM_517 extends MovieClip {
public var mcstink:MovieClip;
public function ITEM_517(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package AGL_fla
Section 37
//ITEM_561 (AGL_fla.ITEM_561)
package AGL_fla {
import flash.display.*;
public dynamic class ITEM_561 extends MovieClip {
public var mcstink:MovieClip;
public function ITEM_561(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package AGL_fla
Section 38
//ITEM_577 (AGL_fla.ITEM_577)
package AGL_fla {
import flash.display.*;
public dynamic class ITEM_577 extends MovieClip {
public var mcstink:MovieClip;
public function ITEM_577(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package AGL_fla
Section 39
//MAINMENU_248 (AGL_fla.MAINMENU_248)
package AGL_fla {
import flash.display.*;
public dynamic class MAINMENU_248 extends MovieClip {
public var btndelete2:SimpleButton;
public var btnslot1:SimpleButton;
public var btndelete1:SimpleButton;
public var btnslot2:SimpleButton;
public var btnback:SimpleButton;
public var btnfb:MovieClip;
public var btnarmor:MovieClip;
public var btngoody:SimpleButton;
public var btnplay:MovieClip;
public var mcoption:MovieClip;
public var btnmoregames:SimpleButton;
public var btncredits:MovieClip;
public function MAINMENU_248(){
super();
addFrameScript(174, frame175);
}
function frame175(){
stop();
}
}
}//package AGL_fla
Section 40
//MAINMENU_299 (AGL_fla.MAINMENU_299)
package AGL_fla {
import flash.display.*;
public dynamic class MAINMENU_299 extends MovieClip {
public var btnback:SimpleButton;
public function MAINMENU_299(){
super();
addFrameScript(0, frame1, 1, frame2, 301, frame302);
}
function frame1(){
stop();
this.visible = false;
}
function frame2(){
this.visible = true;
}
function frame302(){
gotoAndPlay("repeater");
}
}
}//package AGL_fla
Section 41
//MainTimeline (AGL_fla.MainTimeline)
package AGL_fla {
import fl.motion.*;
import flash.geom.*;
import flash.events.*;
import flash.media.*;
import flash.display.*;
import flash.text.*;
import flash.ui.*;
import flash.net.*;
import flash.filters.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.system.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class MainTimeline extends MovieClip {
public var prizeindex;
public var mcendlife:MovieClip;
public var mcnews1:MovieClip;
public var houseitemcommandstat;
public var loader:Loader;
public var colorbright:Color;
public var tutorialshoptime;
public var soundcoin:Sound;
public var timejam;
public var tutorialdesire;
public var soundwrite:Sound;
public var waitwritephase;
public var tutorialindex;
public var btnbar:SimpleButton;
public var stadiumsorttimetemp;
public var houseitemstatreq;
public var wageswait;
public var closedList;
public var mcsplash2:MovieClip;
public var studiotesttimelist;
public var textwaitingtemp;
public var pizzacost;
public var officewordmemory;
public var btnexitpark:SimpleButton;
public var steakeffect;
public var mcstatustxt:MovieClip;
public var i;
public var j;
public var k;
public var stadiumsorttime;
public var crowdappear;
public var shoptablength;
public var rusaktime;
public var waitertip;
public var soundbath:Sound;
public var hungerkuranger;
public var relationshipstat;
public var btnexittocafe:SimpleButton;
public var texteused;
public var hargarare;
public var cartime;
public var soundlose:Sound;
public var btnbusstop:SimpleButton;
public var bgmon;
public var btnsfx:MovieClip;
public var soundmainmenu:Sound;
public var soundwork:Sound;
public var sink1cleanuptime;
public var crowd;
public var studiosingingtime;
public var maxdeposit;
public var soundchewing:Sound;
public var relationshiphint;
public var weathertime;
public var finalroyalties;
public var mcweatherposition:MovieClip;
public var txtloading:TextField;
public var mceffectposition:MovieClip;
public var texte;
public var pengurangan;
public var batasmalam;
public var soundcook:Sound;
public var mcmic:MovieClip;
public var stadiumtestjumplist;
public var pagephase;
public var onout;
public var soundfall:Sound;
public var agi;
public var tutorialdesiretext;
public var btnpause:SimpleButton;
public var maxage;
public var mcstory:MovieClip;
public var speedx;
public var bigrefri;
public var officetesttime;
public var mcjobstat:MovieClip;
public var snackcost;
public var armor;
public var soundgainpoint:Sound;
public var jobrelationreq;
public var btnmusic:MovieClip;
public var trashbinslot;
public var tutorialjobtext;
public var soundtalk1:Sound;
public var soundtalk2:Sound;
public var onshop;
public var relativesstatrate;
public var mckettle:MovieClip;
public var sorttime;
public var tileheight;
public var colorsuperdark:Color;
public var trashbincleanuptime;
public var tablecounterslot;
public var speedy;
public var cafereload;
public var soundflute22:Sound;
public var btnexit:SimpleButton;
public var mcitemsdesc:MovieClip;
public var finalcreat;
public var mcjoblevelupinfo:MovieClip;
public var tutorialshop2text;
public var heritageint;
public var walkenergy;
public var toplate;
public var changehour;
public var onnight;
public var studiotestappearamount;
public var cafe;
public var ratekuranger;
public var rating;
public var storyphase;
public var officewordmemoryrate;
public var originCell:Object;
public var soundtyping2:Sound;
public var soundtyping3:Sound;
public var cookamount;
public var soundtyping1:Sound;
public var workcompletion;
public var refrigeratorstock;
public var positionongtempstat;
public var soundphase;
public var relationshipsymbol;
public var mccareerfailed:MovieClip;
public var mcstarreduced:MovieClip;
public var tambahanint;
public var soundthunder1:Sound;
public var soundpaper:Sound;
public var jamtime;
public var soundthunder2:Sound;
public var rareprice;
public var statdesc2;
public var soundcarpass:Sound;
public var soundresult:Sound;
public var houseitemenvironment;
public var mcflag:MovieClip;
public var gamegoal;
public var hygienekuranger;
public var relationshipcost;
public var cookenergyincrease;
public var finalmaxage;
public var obj3;
public var foodstocklist;
public var penambahan;
public var obj2;
public var donecalculate;
public var soundlist;
public var steakcost;
public var studiotesttime;
public var mccrowd1:MovieClip;
public var mccrowd2:MovieClip;
public var mccredits:MovieClip;
public var colorred:Color;
public var soundrepair2:Sound;
public var texte3;
public var soundrepair1:Sound;
public var texte2;
public var effectimage;
public var mctileposition:MovieClip;
public var allowsavetext;
public var btngoody:SimpleButton;
public var tutorialshoptext;
public var startup;
public var destinationCell:Object;
public var rusaksound;
public var mcfainted:MovieClip;
public var defaultspeedy;
public var mcpond:MovieClip;
public var defaultspeedx;
public var mcshopposition:MovieClip;
public var stadiumtambay;
public var mcstadiumtest:MovieClip;
public var finalint;
public var houseitemstattype;
public var soundspark2:Sound;
public var stadiumtambax;
public var soundwashdish:Sound;
public var mcpositioning:MovieClip;
public var crowdgone;
public var mcrelationship:MovieClip;
public var soundgame1:Sound;
public var investment;
public var txtlog:TextField;
public var jobday;
public var soundgame3:Sound;
public var soundspark1:Sound;
public var jobincreasement;
public var soundgame2:Sound;
public var soundflute2:Sound;
public var statdesc;
public var soundbird1:Sound;
public var soundbird2:Sound;
public var CELL_FILLED:uint;
public var soundflute1:Sound;
public var stadiumposawaly;
public var soundflute3:Sound;
public var jobreached;
public var mctutorial:MovieClip;
public var tutorialfirstdayjobtext;
public var connected;
public var stadiumposawalx;
public var MAX_ITERATIONS:uint;
public var timemenit;
public var hospitalfee;
public var CELL_FREE:uint;
public var wagescointemp;
public var mctable1:MovieClip;
public var mctable2:MovieClip;
public var mctable3:MovieClip;
public var houseitemname;
public var shopuisectiontext;
public var mcflute:MovieClip;
public var soundflush:Sound;
public var pagestatus;
public var tutoriallife;
public var tileprice;
public var tutorialshop2;
public var soundplate:Sound;
public var tileimage;
public var workrate;
public var soundyes:Sound;
public var customContextMenu:ContextMenu;
public var btnag:SimpleButton;
public var currentname;
public var contextmenu;
public var rain;
public var relationfxtime;
public var tutorialjob;
public var btndrink:SimpleButton;
public var tutoriallifetext;
public var txt1:TextField;
public var startgold;
public var bladderkuranger;
public var repairmancoming;
public var charimage;
public var townparkperson;
public var posisirumahy;
public var posisirumahx;
public var cookstatincrease;
public var repairtime;
public var cooklist;
public var onbuild;
public var prizetaken;
public var mctable:MovieClip;
public var statbubbletimetemp;
public var soundcricket:Sound;
public var houseclickable;
public var feedmin;
public var rankingke;
public var mcsave:MovieClip;
public var weathertimetemp;
public var shoprarity;
public var relationshipcolor;
public var mcclock:MovieClip;
public var mcbuildmode:MovieClip;
public var mcag:MovieClip;
public var btnyay2:SimpleButton;
public var officetestindex;
public var btntotownpark:SimpleButton;
public var relationindex;
public var mcbg:MovieClip;
public var cookreq;
public var soundclock:Sound;
public var mccarrerpromotion:MovieClip;
public var mctransisi:MovieClip;
public var btnexittooffice:SimpleButton;
public var mcwages:MovieClip;
public var soundnewdesire:Sound;
public var soundwin:Sound;
public var mcbush:MovieClip;
public var textwaiting;
public var inimc;
public var soundingame1:Sound;
public var soundingame2:Sound;
public var donefirstjob;
public var CELL_DESTINATION:uint;
public var relationshipincrease;
public var accessdirectionex;
public var mcobjectposition:MovieClip;
public var studiotestbutton;
public var desiredesc;
public var accessdirectioney;
public var mcuishop:MovieClip;
public var CELL_ORIGIN:uint;
public var houseitems;
public var discountprice;
public var menittimetemp;
public var relationshipoption;
public var mcpercentage:MovieClip;
public var stadiumtestjumpneeded;
public var btnexitoffice:SimpleButton;
public var relationshipname;
public var guestbool;
public var finalstat;
public var mcmouse:MovieClip;
public var bladdermin;
public var adarusak;
public var cookstock;
public var jobfrom;
public var mcinvestment:MovieClip;
public var btnexittownpark:SimpleButton;
public var obj;
public var cookbladderincrease;
public var kurangerarray;
public var mcperform:MovieClip;
public var ratinggainedstat;
public var donepage;
public var mctxt:MovieClip;
public var soundrain:Sound;
public var startupdefault;
public var sfxon;
public var uangtotal;
public var doneloadtownparkperson;
public var sounddoor:Sound;
public var btnexitstadium:SimpleButton;
public var houseitemcommandeffect;
public var btn1:SimpleButton;
public var btn2:SimpleButton;
public var btn3:SimpleButton;
public var mc1:MovieClip;
public var mc2:MovieClip;
public var mc3:MovieClip;
public var mc4:MovieClip;
public var wagescoin;
public var statcarrermax;
public var colordark:Color;
public var stadiumtesttime;
public var agiURL:String;
public var soundtutorial:Sound;
public var mcpiano:item481;
public var coinimage;
public var standarttext;
public var smallrefri;
public var objectimage;
public var mcstudiotest:MovieClip;
public var mcbook:MovieClip;
public var colorgreen:Color;
public var mcwallposition:MovieClip;
public var desiretitle;
public var sounddesirecompleted:Sound;
public var houseitemsymbol;
public var soundchannel1:SoundChannel;
public var soundchannel2:SoundChannel;
public var soundchannel4:SoundChannel;
public var soundchannel5:SoundChannel;
public var soundcleanuptrash:Sound;
public var stadiumdonejump;
public var soundchannel3:SoundChannel;
public var thundertime;
public var AGIconnected;
public var mcpassiveincome:MovieClip;
public var soundjump:Sound;
public var naekta;
public var soundphone:Sound;
public var wallimage;
public var mcuiposition:MovieClip;
public var soundpiano1:Sound;
public var soundclick:Sound;
public var soundpiano4:Sound;
public var btnskip:SimpleButton;
public var soundpiano7:Sound;
public var soundpiano3:Sound;
public var wallprice;
public var tutorialsave;
public var soundpiano6:Sound;
public var houseitemcommand;
public var soundpiano2:Sound;
public var relativesyay;
public var mcprog:MovieClip;
public var soundpiano5:Sound;
public var steakbladder;
public var relationshipmultiplier;
public var btnexitstreet:SimpleButton;
public var mcguest:MovieClip;
public var bawahe;
public var openList;
public var colornormal:Color;
public var mccareerlevelup:MovieClip;
public var heritagecreat;
public var cooktime;
public var typehealth;
public var btnexitcafe:SimpleButton;
public var jobprogperlevel;
public var mcpause:MovieClip;
public var soundtest:Sound;
public var jobpercentage;
public var tutorialjobtimetext;
public var houseprice;
public var donemasukrumah;
public var mcmainmenu:MovieClip;
public var onfainted;
public var relationship;
public var sink2cleanuptime;
public var faintedtime;
public var houseitemsizey;
public var repairmanrepairtime;
public var btntopark:SimpleButton;
public var daylist;
public var houseitemsizex;
public var heritagesports;
public var statbonus;
public var so:SharedObject;
public var mapArray;
public var waitwritetemp;
public var prize1;
public var prize2;
public var soundsetting;
public var activitytime;
public var buscost;
public var mcjob:MovieClip;
public var prize3;
public var validplacement;
public var cookexpire;
public var contributemoney;
public var talkcost;
public var houseitemhp;
public var paperbool;
public var cleanuptableke;
public var jobentertime;
public var AGIcontinue;
public var statmax;
public var btnyay:SimpleButton;
public var mctileclickerposition:MovieClip;
public var textlefover;
public var adresslist1;
public var adresslist2;
public var hargashop;
public var charstat;
public var mcsofa:MovieClip;
public var jobwages;
public var sounddeposit:Sound;
public var textwarnamerah;
public var rareitem:GlowFilter;
public var textmakan;
public var desirelevel;
public var slotused;
public var currentCell:Object;
public var statbubbletime;
public var energymin;
public var soundtext:Sound;
public var linkage;
public var uiindex;
public var foodstockprice;
public var volsfx;
public var doneselecthouse;
public var hargarumah;
public var happinesskuranger;
public var pausegame;
public var typehealthtemp;
public var tutorialjobtime;
public var uipopuphealth;
public var snackbladder;
public var soundtreadmill:Sound;
public var relationshipgender;
public var houseitemprice;
public var jobto;
public var moneysupport;
public var soundno:Sound;
public var volbgm;
public var xx:int;
public var typerate;
public var housesize;
public var selisih;
public var tambahansport;
public var rareresell;
public var soundsleep:Sound;
public var trashmax;
public var tutorialfirstdayjob;
public var yy:int;
public var jobdecreasement;
public var desiregift;
public var donechangename;
public var houseitemnameshow;
public var uiimage;
public var energykuranger;
public var tutorialshop;
public var snackeffect;
public var mcgameover:MovieClip;
public var mcofficetest:MovieClip;
public var btntoilet:SimpleButton;
public var mcover:MovieClip;
public var relationshiphistory;
public var soundresultdone:Sound;
public var officetesttimetemp;
public var hygienemin;
public var relationpreferences;
public var houseitemmark;
public var waitwriteindex;
public var passiveincome;
public var waitwrite;
public var speedtime;
public var adressindex1;
public var soundtimer;
public var adressindex3;
public var adressindex4;
public var studiotestsuccess;
public var adressindex2;
public var energykurangertemp;
public var pageindex;
public var gotmoney;
public var studiotesttimeleft;
public var sorttimetemp;
public var textindex;
public var rainchance;
public var hargadompet;
public var happinessmin;
public var isie;
public var menittime;
public var soundtv:Sound;
public var officeword;
public var btnexitstudio:SimpleButton;
public var batasterang;
public var promostat;
public var ondeposit;
public var mcnews2:MovieClip;
public var finalsport;
public var tambahancreat;
public var tileclickerimage;
public var uwangetotal;
public var repairmancost;
public var mcinput:MovieClip;
public var mcuistat:MovieClip;
public function MainTimeline(){
super();
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7, 7, frame8, 8, frame9, 9, frame10, 10, frame11, 11, frame12, 12, frame13, 13, frame14, 14, frame15, 15, frame16, 16, frame17, 18, frame19, 19, frame20);
}
public function hidearrow(){
mcendlife.btnnext.visible = false;
mcendlife.btnprev.visible = false;
}
public function phoneringwaiting(e:Event):void{
if (e.currentTarget.currentFrame == 2){
soundchannel5 = soundphone.play(0, 2, new SoundTransform(volsfx));
};
}
public function shopitemclick(e:MouseEvent):void{
var i:*;
var j:*;
soundclick.play(0, 1, new SoundTransform(volsfx));
removealluiimage();
if ((((mcuishop.tabindex == 7)) || ((mcuishop.tabindex == 8)))){
if ((((((mcuishop.tabindex == 7)) && ((charstat[slotused][2] >= tileprice)))) && (!((charstat[slotused][21] == e.currentTarget.mc7.currentFrame))))){
if ((((charstat[slotused][32] == 9)) || ((charstat[slotused][32] == 26)))){
charstat[slotused][34] = (charstat[slotused][34] - tileprice);
cekdesirestatus();
if (charstat[slotused][34] <= 0){
cekdesiredone(charstat[slotused][32]);
};
};
soundcoin.play(0, 1, new SoundTransform(volsfx));
charstat[slotused][2] = (charstat[slotused][2] - tileprice);
mcuishop.mccoins.gotoAndPlay(2);
mcuishop.txt1.text = charstat[slotused][2];
charstat[slotused][21] = e.currentTarget.mc7.currentFrame;
i = 0;
while (i < housesize[charstat[slotused][13]]) {
j = 0;
while (j < housesize[charstat[slotused][13]]) {
tileimage[i][j].mc1.gotoAndStop(e.currentTarget.mc7.currentFrame);
j++;
};
i++;
};
if (charstat[slotused][32] == 15){
cekdesiredone(15);
};
} else {
if ((((((mcuishop.tabindex == 8)) && ((charstat[slotused][2] >= wallprice)))) && (!((charstat[slotused][14] == (e.currentTarget.mc8.currentFrame + (e.currentTarget.mc8.currentFrame - 1))))))){
if ((((charstat[slotused][32] == 9)) || ((charstat[slotused][32] == 26)))){
charstat[slotused][34] = (charstat[slotused][34] - wallprice);
cekdesirestatus();
if (charstat[slotused][34] <= 0){
cekdesiredone(charstat[slotused][32]);
};
};
soundcoin.play(0, 1, new SoundTransform(volsfx));
charstat[slotused][2] = (charstat[slotused][2] - wallprice);
mcuishop.mccoins.gotoAndPlay(2);
mcuishop.txt1.text = charstat[slotused][2];
i = 0;
while (i < wallimage.length) {
removeChild(wallimage[i]);
wallimage[i] = null;
i++;
};
wallimage = [];
charstat[slotused][14] = (e.currentTarget.mc8.currentFrame + (e.currentTarget.mc8.currentFrame - 1));
trace(("wall : " + charstat[slotused][14]));
createwall(charstat[slotused][14]);
if (charstat[slotused][32] == 16){
cekdesiredone(16);
};
};
};
} else {
shoprarity = 0;
if ((((e.currentTarget.mcpromo.visible == true)) && ((e.currentTarget.mcpromo.currentFrame == 2)))){
shoprarity = 1;
};
hargashop = e.currentTarget.txt1.text;
createitemfollow(e.currentTarget.nomor, 0);
};
}
public function tipover(e:MouseEvent):void{
e.currentTarget.mctip.gotoAndStop(2);
}
public function plateclick(e:MouseEvent):void{
var xeku:*;
var yeku:*;
var parente:*;
var namee:*;
var i:*;
soundclick.play(0, 1, new SoundTransform(volsfx));
removealluiimage();
xeku = e.currentTarget.parent.xe;
yeku = e.currentTarget.parent.ye;
parente = e.currentTarget.parent;
namee = e.currentTarget.name;
namee = namee.charAt((namee.length - 1));
toplate = namee;
trace(("makan ke : " + toplate));
stage.removeEventListener(MouseEvent.CLICK, resetuipopup);
uipopuphealth = 2;
stage.addEventListener(MouseEvent.CLICK, resetuipopup);
i = 0;
while (i < tablecounterslot[slotused].length) {
if ((((tablecounterslot[slotused][i][0] == parente.xe)) && ((tablecounterslot[slotused][i][1] == parente.ye)))){
createuipopup("CLEAN UP", parente);
trace(("he : " + tablecounterslot[slotused][i]));
if ((((tablecounterslot[slotused][i][int((int(namee) + int(5)))] > 0)) && ((tablecounterslot[slotused][i][int((int(namee) + int(7)))] > 0)))){
createuipopup("EAT", parente);
};
break;
};
i++;
};
}
public function createtext(texte:String){
soundtext.play(0, 1, new SoundTransform(volsfx));
effectimage[effectimage.length] = new (textui);
addChildAt(effectimage[(effectimage.length - 1)], getChildIndex(mceffectposition));
effectimage[(effectimage.length - 1)].indexke = (effectimage.length - 1);
settextvertical(texte, effectimage[(effectimage.length - 1)], -107.1);
if (charimage[0].visible == true){
effectimage[(effectimage.length - 1)].x = charimage[0].x;
effectimage[(effectimage.length - 1)].y = charimage[0].y;
if (effectimage[(effectimage.length - 1)].y < 123){
trace("KANAN");
effectimage[(effectimage.length - 1)].x = (charimage[0].x + 100);
effectimage[(effectimage.length - 1)].y = (charimage[0].y + 65);
effectimage[(effectimage.length - 1)].mc1.gotoAndStop(2);
};
if (effectimage[(effectimage.length - 1)].x > 584){
trace("KIRI");
effectimage[(effectimage.length - 1)].x = (charimage[0].x - 100);
effectimage[(effectimage.length - 1)].y = (charimage[0].y + 65);
effectimage[(effectimage.length - 1)].mc1.gotoAndStop(3);
};
effectimage[(effectimage.length - 1)].awal = 0;
} else {
cektextposition(effectimage[(effectimage.length - 1)]);
};
effectimage[(effectimage.length - 1)].btnclose.removeEventListener(MouseEvent.CLICK, textclose);
effectimage[(effectimage.length - 1)].btnclose.addEventListener(MouseEvent.CLICK, textclose);
effectimage[(effectimage.length - 1)].addEventListener(Event.ENTER_FRAME, textbaloonwaiting);
}
public function jobnext(e:MouseEvent):void{
soundclick.play(0, 1, new SoundTransform(volsfx));
if (mcjob.currentFrame == 2){
ambilnextjob();
if (mcjob.nextke == charstat[slotused][23]){
mcjob.nextke++;
};
loadgambarjobuntuk(mcjob.mc2, mcjob.nextke);
loadgambarjobuntuk(mcjob.mc3, mcjob.nextke);
mcjob.gotoAndPlay("go");
stage.addEventListener(Event.ENTER_FRAME, jobshiftwaiting);
};
}
public function loadjobprogress(){
var i:*;
var obj:*;
mcjoblevelupinfo.visible = false;
mcjobstat.mc1.mcicon.gotoAndStop(charstat[slotused][23]);
mcjobstat.mc1.mc1.width = ((charstat[slotused][25] / jobprogperlevel) * 84);
mcjobstat.mc1.txt1.text = ("Lvl." + int((int(charstat[slotused][24]) + int(1))));
mcjobstat.mc1.txtgold.text = jobwages[charstat[slotused][23]][charstat[slotused][24]];
mcjobstat.mc1.txtprog.text = (int(((charstat[slotused][25] / jobprogperlevel) * 100)) + "%");
mcjobstat.mc1.btninfo.removeEventListener(MouseEvent.MOUSE_OVER, oversound);
mcjobstat.mc1.btninfo.addEventListener(MouseEvent.MOUSE_OVER, oversound);
mcjobstat.mc1.btninfo.removeEventListener(MouseEvent.MOUSE_OVER, jobinfoover);
mcjobstat.mc1.btninfo.addEventListener(MouseEvent.MOUSE_OVER, jobinfoover);
mcjobstat.mc1.btninfo.removeEventListener(MouseEvent.MOUSE_OUT, jobinfoout);
mcjobstat.mc1.btninfo.addEventListener(MouseEvent.MOUSE_OUT, jobinfoout);
i = 1;
while (i <= 7) {
obj = mcjobstat.mc1.getChildByName(("mcday" + i));
obj.gotoAndStop(1);
if (i == ambilharikerja()){
obj.gotoAndStop(2);
};
obj.mc1.txt1.text = i;
obj.mc1.gotoAndStop(1);
if (jobday[charstat[slotused][23]][i] == 0){
obj.mc1.gotoAndStop(2);
};
if (i < ambilharikerja()){
obj.transform.colorTransform = colorsuperdark;
} else {
obj.transform.colorTransform = colornormal;
};
i++;
};
}
public function solve():Array{
var isSolved:Boolean;
var iter:int;
var solutionPath:Array;
var count:int;
var cellPointer:Object;
isSolved = false;
iter = 0;
isSolved = stepPathfinder();
while (!(isSolved)) {
isSolved = stepPathfinder();
var _temp1 = iter;
iter = (iter + 1);
if (_temp1 > MAX_ITERATIONS){
return (null);
};
};
solutionPath = new Array();
count = 0;
cellPointer = closedList[(closedList.length - 1)];
while (cellPointer != originCell) {
var _temp2 = count;
count = (count + 1);
if (_temp2 > 800){
return (null);
};
solutionPath.push(cellPointer);
cellPointer = cellPointer.parentCell;
};
return (solutionPath);
}
public function loadinvestment(){
var i:*;
var profite:*;
var obj:*;
pausegame = true;
mcinvestment.gotoAndStop(2);
trace(("INVESTMENT RATE : " + investment[slotused]));
mcinvestment.mc3.visible = false;
mcinvestment.mc2.visible = true;
if (investment[slotused][0] == 1){
mcinvestment.mc3.visible = true;
mcinvestment.mc2.visible = false;
i = 1;
while (i <= 7) {
obj = mcinvestment.getChildByName(("mcdot" + i));
if (i > investment[slotused][9]){
obj.visible = false;
} else {
obj.gotoAndStop((investment[slotused][i] + 1));
if (i != 7){
if (int((int(i) + int(1))) <= investment[slotused][9]){
obj.mcline.visible = true;
obj.mcline.gotoAndStop(1);
if (investment[slotused][(i + 1)] < investment[slotused][i]){
obj.mcline.gotoAndStop(3);
} else {
if (investment[slotused][(i + 1)] > investment[slotused][i]){
obj.mcline.gotoAndStop(2);
};
};
} else {
obj.mcline.visible = false;
};
} else {
obj.mcline.visible = false;
};
obj.visible = true;
};
i++;
};
mcinvestment.mc3.txt1.text = investment[slotused][8];
profite = (investment[slotused][8] * (investment[slotused][investment[slotused][9]] - 1));
mcinvestment.mc3.txt2.text = profite;
} else {
i = 1;
while (i <= 7) {
obj = mcinvestment.getChildByName(("mcdot" + i));
obj.visible = false;
i++;
};
if (charstat[slotused][2] >= 10){
mcinvestment.mc2.txt1.text = "10";
} else {
mcinvestment.mc2.txt1.text = "0";
};
};
mcinvestment.mc2.btnplus.removeEventListener(MouseEvent.MOUSE_OVER, oversound);
mcinvestment.mc2.btnplus.addEventListener(MouseEvent.MOUSE_OVER, oversound);
mcinvestment.mc2.btnplus.removeEventListener(MouseEvent.CLICK, investmentplus);
mcinvestment.mc2.btnplus.addEventListener(MouseEvent.CLICK, investmentplus);
mcinvestment.mc2.btnminus.removeEventListener(MouseEvent.MOUSE_OVER, oversound);
mcinvestment.mc2.btnminus.addEventListener(MouseEvent.MOUSE_OVER, oversound);
mcinvestment.mc2.btnminus.removeEventListener(MouseEvent.CLICK, investmentminus);
mcinvestment.mc2.btnminus.addEventListener(MouseEvent.CLICK, investmentminus);
mcinvestment.mc2.btndeposit.removeEventListener(MouseEvent.MOUSE_OVER, oversound);
mcinvestment.mc2.btndeposit.addEventListener(MouseEvent.MOUSE_OVER, oversound);
mcinvestment.mc2.btndeposit.removeEventListener(MouseEvent.CLICK, investmentdeposit);
mcinvestment.mc2.btndeposit.addEventListener(MouseEvent.CLICK, investmentdeposit);
mcinvestment.mc2.btnclose.removeEventListener(MouseEvent.MOUSE_OVER, oversound);
mcinvestment.mc2.btnclose.addEventListener(MouseEvent.MOUSE_OVER, oversound);
mcinvestment.mc2.btnclose.removeEventListener(MouseEvent.CLICK, investmentclose);
mcinvestment.mc2.btnclose.addEventListener(MouseEvent.CLICK, investmentclose);
mcinvestment.mc3.btnwithdraw.removeEventListener(MouseEvent.MOUSE_OVER, oversound);
mcinvestment.mc3.btnwithdraw.addEventListener(MouseEvent.MOUSE_OVER, oversound);
mcinvestment.mc3.btnwithdraw.removeEventListener(MouseEvent.CLICK, investmentwithdraw);
mcinvestment.mc3.btnwithdraw.addEventListener(MouseEvent.CLICK, investmentwithdraw);
mcinvestment.mc3.btnclose.removeEventListener(MouseEvent.MOUSE_OVER, oversound);
mcinvestment.mc3.btnclose.addEventListener(MouseEvent.MOUSE_OVER, oversound);
mcinvestment.mc3.btnclose.removeEventListener(MouseEvent.CLICK, investmentclose);
mcinvestment.mc3.btnclose.addEventListener(MouseEvent.CLICK, investmentclose);
}
public function cleanuptownpark(){
var j:*;
j = 0;
while (j < charimage.length) {
charimage[j].removeEventListener(Event.ENTER_FRAME, repairmanwaiting);
removeChild(charimage[j]);
charimage[j] = null;
j++;
};
cleanupeffectimage();
removealluiimage();
stage.removeEventListener(Event.ENTER_FRAME, gamewaiting);
stage.removeEventListener(Event.ENTER_FRAME, faintedwaiting);
}
function frame14(){
stop();
doneloadtownparkperson = false;
loadsoundsetting();
trace("TOWN PARK");
mcuistat.visible = true;
mcclock.visible = true;
mcpositioning.visible = false;
mcitemsdesc.visible = false;
uiimage = [];
tileimage = [];
wallimage = [];
charimage = [];
tileclickerimage = [];
objectimage = [];
effectimage = [];
loadtownpark();
}
function frame15(){
stop();
naekta = false;
soundchannel1 = soundmainmenu.play(0, 999, new SoundTransform(volbgm));
relativesstatrate = 0.7;
mcendlife.mc6.mc1.btnyay.visible = false;
mcendlife.mc6.mc1.btnyay.removeEventListener(MouseEvent.MOUSE_OVER, oversound);
mcendlife.mc6.mc1.btnyay.addEventListener(MouseEvent.MOUSE_OVER, oversound);
mcendlife.mc6.mc1.btnyay.removeEventListener(MouseEvent.CLICK, yaynextlife);
mcendlife.mc6.mc1.btnyay.addEventListener(MouseEvent.CLICK, yaynextlife);
heritagesports = 0;
heritageint = 0;
heritagecreat = 0;
loadgoal(mcendlife.mc5.mc1.mcgoal);
donepage = [undefined, 1, 0, 0, 0, 0, 0];
mcendlife.btnnext.removeEventListener(MouseEvent.MOUSE_OVER, oversound);
mcendlife.btnnext.addEventListener(MouseEvent.MOUSE_OVER, oversound);
mcendlife.btnnext.removeEventListener(MouseEvent.CLICK, nextpage);
mcendlife.btnnext.addEventListener(MouseEvent.CLICK, nextpage);
mcendlife.btnprev.removeEventListener(MouseEvent.MOUSE_OVER, oversound);
mcendlife.btnprev.addEventListener(MouseEvent.MOUSE_OVER, oversound);
mcendlife.btnprev.removeEventListener(MouseEvent.CLICK, prevpage);
mcendlife.btnprev.addEventListener(MouseEvent.CLICK, prevpage);
pagestatus = 1;
pageindex = 1;
pagephase = 1;
hargarumah = 0;
hargadompet = int((int(charstat[slotused][2]) + int(investment[slotused][8])));
hargarare = 0;
statbonus = [];
finalsport = 0;
finalint = 0;
finalcreat = 0;
finalmaxage = 0;
finalstat = 0;
finalroyalties = 0;
tambahansport = 0;
tambahanint = 0;
tambahancreat = 0;
uangtotal = 0;
contributemoney = 0;
pengurangan = 100;
hidearrow();
loadendlife();
}
public function loadstadium(){
var tipeobj:*;
var i:*;
var obj:*;
if (tutorialfirstdayjob[slotused] == false){
loadtutorial("firstdayjob");
};
mcbg.mccloud.visible = false;
btnexitstadium.visible = true;
btnexitstadium.removeEventListener(MouseEvent.MOUSE_OVER, oversound);
btnexitstadium.addEventListener(MouseEvent.MOUSE_OVER, oversound);
btnexitstadium.removeEventListener(MouseEvent.CLICK, exitstadium);
btnexitstadium.addEventListener(MouseEvent.CLICK, exitstadium);
createchar();
mcclock.txt3.text = daylist[ambilharikerja()];
loadspeedsymbol();
loaduistat();
hitungenviro();
trace("a");
workcompletion = 100;
charstat[slotused][26] = workcompletion;
tipeobj = [undefined];
i = 1;
while (i <= 3) {
obj = getChildByName(("btn" + i));
obj.removeEventListener(MouseEvent.MOUSE_OVER, oversound);
obj.addEventListener(MouseEvent.MOUSE_OVER, oversound);
obj.removeEventListener(MouseEvent.CLICK, relationshipclick);
obj.addEventListener(MouseEvent.CLICK, relationshipclick);
obj = null;
i++;
};
resetstadiumusage();
trace("b");
mcflag.buttonMode = true;
mcflag.addEventListener(MouseEvent.MOUSE_OVER, objectover);
mcflag.addEventListener(MouseEvent.MOUSE_OUT, objectout);
mcsofa.buttonMode = true;
mcsofa.addEventListener(MouseEvent.MOUSE_OVER, objectover);
mcsofa.addEventListener(MouseEvent.MOUSE_OUT, objectout);
mcflag.removeEventListener(MouseEvent.MOUSE_OVER, oversound);
mcflag.addEventListener(MouseEvent.MOUSE_OVER, oversound);
mcflag.removeEventListener(MouseEvent.CLICK, stadiumflag);
mcflag.addEventListener(MouseEvent.CLICK, stadiumflag);
btntoilet.removeEventListener(MouseEvent.MOUSE_OVER, oversound);
btntoilet.addEventListener(MouseEvent.MOUSE_OVER, oversound);
trace("c");
btntoilet.removeEventListener(MouseEvent.CLICK, toiletclick);
btntoilet.addEventListener(MouseEvent.CLICK, toiletclick);
btndrink.removeEventListener(MouseEvent.MOUSE_OVER, oversound);
btndrink.addEventListener(MouseEvent.MOUSE_OVER, oversound);
btndrink.removeEventListener(MouseEvent.CLICK, drinkclick);
btndrink.addEventListener(MouseEvent.CLICK, drinkclick);
mcsofa.removeEventListener(MouseEvent.MOUSE_OVER, oversound);
mcsofa.addEventListener(MouseEvent.MOUSE_OVER, oversound);
mcsofa.removeEventListener(MouseEvent.CLICK, sofaclick);
mcsofa.addEventListener(MouseEvent.CLICK, sofaclick);
mcflag.visible = true;
cekstatusadd();
stage.addEventListener(Event.ENTER_FRAME, gamewaiting);
trace(("BERAPA : " + charstat[slotused][25]));
if (charstat[slotused][24] < 5){
if ((((charstat[slotused][25] >= jobprogperlevel)) && ((charstat[slotused][11] >= jobrelationreq[charstat[slotused][24]])))){
speedtime = 1;
mcuistat.visible = false;
pausegame = true;
loadcarrerpromotion();
charimage[0].visible = false;
mcflag.visible = false;
mcflag.buttonMode = false;
mcflag.removeEventListener(MouseEvent.MOUSE_OVER, objectover);
mcflag.removeEventListener(MouseEvent.MOUSE_OUT, objectout);
mcflag.removeEventListener(MouseEvent.MOUSE_OVER, oversound);
mcflag.removeEventListener(MouseEvent.CLICK, stadiumflag);
mcclock.visible = false;
i = 1;
while (i <= 3) {
obj = getChildByName(("mcnews" + i));
if (obj != null){
obj.gotoAndStop(1);
};
i++;
};
} else {
soundchannel4 = soundwork.play(0, 999, new SoundTransform(volbgm));
};
} else {
soundchannel4 = soundwork.play(0, 999, new SoundTransform(volbgm));
};
}
function frame16(){
stop();
rating = (startupdefault - startup[slotused]);
trace(((("cek : " + startupdefault) + " ") + startup[slotused]));
if (rating <= 3){
mcgameover.mc1.mcfinal.gotoAndStop(1);
if ((((armor == true)) && ((AGIconnected == true)))){
so.data.lessrelatives = 1;
cekquestdone();
};
} else {
if (rating <= 5){
mcgameover.mc1.mcfinal.gotoAndStop(2);
} else {
mcgameover.mc1.mcfinal.gotoAndStop(3);
};
};
loadgameover();
}
public function parktotownpark(e:MouseEvent):void{
soundclick.play(0, 1, new SoundTransform(volsfx));
if (charstat[slotused][5] < walkenergy){
createtext("I'm too tired.");
} else {
charstat[slotused][5] = (charstat[slotused][5] - walkenergy);
if (charstat[slotused][5] <= 0){
charstat[slotused][5] = 0;
};
cleanuppark();
loadspeedsymbol();
transisi("townpark");
};
}
function frame11(){
stop();
loadsoundsetting();
mcuistat.visible = true;
mcclock.visible = true;
mcpositioning.visible = false;
mcitemsdesc.visible = false;
uiimage = [];
tileimage = [];
wallimage = [];
charimage = [];
tileclickerimage = [];
objectimage = [];
effectimage = [];
loadstadium();
}
function frame13(){
stop();
loadsoundsetting();
trace(("CAFE " + cafe[slotused]));
mcuistat.visible = true;
mcclock.visible = true;
mcpositioning.visible = false;
mcitemsdesc.visible = false;
uiimage = [];
tileimage = [];
wallimage = [];
charimage = [];
tileclickerimage = [];
objectimage = [];
effectimage = [];
loadcafe();
}
public function cekaccessobject(){
var xe:*;
var ye:*;
var maxstock:*;
var i:*;
var jumtotal:*;
var tersisa:*;
var sizex:*;
var sizey:*;
var j:*;
var kex:*;
var key:*;
removealluiimage();
repairtime = 0;
if (charimage[0].statto != ""){
charimage[0].stat = charimage[0].statto;
if (charimage[0].statto == "FIND A JOB"){
charimage[0].stat = "idle";
xe = objectimage[charimage[0].objectto].xe;
ye = objectimage[charimage[0].objectto].ye;
setdirection(xe, ye, 0);
makeidle(0);
mcjob.ke = 1;
if (mcjob.ke == charstat[slotused][23]){
mcjob.ke = 2;
};
loadjoblist();
} else {
if (charimage[0].statto == "INVESTMENT"){
charimage[0].stat = "INVESTMENT";
loadinvestment();
};
};
if (charimage[0].statto == "STOCK FOOD"){
uipopuphealth = 2;
stage.addEventListener(MouseEvent.CLICK, resetuipopup);
maxstock = 0;
i = 0;
while (i < objectimage.length) {
if (objectimage[i].namee == "REFRIGERATOR"){
if (objectimage[i].nomor == 16){
maxstock = (maxstock + bigrefri);
} else {
maxstock = (maxstock + smallrefri);
};
};
i++;
};
jumtotal = 0;
i = 0;
while (i < refrigeratorstock[slotused].length) {
if (refrigeratorstock[slotused][i][2] > 0){
jumtotal = (jumtotal + refrigeratorstock[slotused][i][2]);
};
i++;
};
tersisa = (maxstock - jumtotal);
trace((("Ada " + tersisa) + " yang bisa diisi"));
if (charstat[slotused][2] < foodstockprice){
createtext("I don't have enough money.");
} else {
if (tersisa > 0){
i = 1;
while (i < foodstocklist.length) {
if ((((charstat[slotused][2] >= (foodstocklist[i] * foodstockprice))) && ((foodstocklist[i] <= tersisa)))){
createuipopup((("+" + foodstocklist[i]) + " STOCK"), objectimage[charimage[0].objectto]);
};
i++;
};
} else {
if (maxstock == 0){
createtext("I don't have a place to store it.");
} else {
if (((!((maxstock == 0))) && ((tersisa == maxstock)))){
createtext("Storage is full.");
};
};
};
};
xe = objectimage[charimage[0].objectto].xe;
ye = objectimage[charimage[0].objectto].ye;
setdirection(xe, ye, 0);
} else {
if (charimage[0].statto == "CALL REPAIRMAN"){
soundtalk2.play(0, 1, new SoundTransform(volsfx));
charstat[slotused][2] = (charstat[slotused][2] - repairmancost);
soundcoin.play(0, 1, new SoundTransform(volsfx));
mcuistat.mccoins.gotoAndPlay(2);
mcuistat.txtgold.text = charstat[slotused][2];
makeidle(0);
callrepairman();
trace("GREAT");
} else {
if (charimage[0].statto == "REPAIR"){
xe = objectimage[charimage[0].objectto].xe;
ye = objectimage[charimage[0].objectto].ye;
setdirection(xe, ye, 0);
charimage[0].stat = "REPAIR";
if (charimage[0].mc1.currentLabel == "idle1"){
charimage[0].mc1.gotoAndPlay("idleactivity1");
} else {
charimage[0].mc1.gotoAndPlay("idleactivity2");
};
} else {
if (charimage[0].statto == "ORDER A PIZZA"){
if (cekcancook(true, true)){
if ((((armor == true)) && ((AGIconnected == true)))){
so.data.pizzaorder = 1;
cekquestdone();
};
soundplate.play(0, 1, new SoundTransform(volsfx));
cekdesiredone(25);
charstat[slotused][2] = (charstat[slotused][2] - pizzacost);
soundcoin.play(0, 1, new SoundTransform(volsfx));
mcuistat.mccoins.gotoAndPlay(2);
mcuistat.txtgold.text = charstat[slotused][2];
isimakananini(5);
makeidle(0);
};
} else {
if (charimage[0].statto == "CLEAN TRASH"){
xe = objectimage[charimage[0].objectto].xe;
ye = objectimage[charimage[0].objectto].ye;
setdirection(xe, ye, 0);
charimage[0].timee = 0;
charimage[0].timeetemp = (trashbincleanuptime * 25);
charimage[0].stat = "CLEAN TRASH";
if (charimage[0].mc1.currentLabel == "idle1"){
charimage[0].mc1.gotoAndPlay("idleactivity1");
} else {
charimage[0].mc1.gotoAndPlay("idleactivity2");
};
} else {
if (charimage[0].statto == "CLEAN UP"){
xe = objectimage[charimage[0].objectto].xe;
ye = objectimage[charimage[0].objectto].ye;
trace(((("HE : " + xe) + " ") + ye));
setdirection(xe, ye, 0);
charimage[0].timee = 0;
charimage[0].plateto = toplate;
if (objectimage[charimage[0].objectto].namee == "TRASH BIN"){
charimage[0].timeetemp = (trashbincleanuptime * 25);
} else {
trace(("PIRING KE : " + charimage[0].plateto));
if (objectimage[charimage[0].objectto].nomor == 17){
charimage[0].timeetemp = (sink1cleanuptime * 25);
} else {
charimage[0].timeetemp = (sink2cleanuptime * 25);
};
};
charimage[0].stat = "CLEAN UP";
if (charimage[0].mc1.currentLabel == "idle1"){
charimage[0].mc1.gotoAndPlay("idleactivity1");
} else {
charimage[0].mc1.gotoAndPlay("idleactivity2");
};
} else {
if (charimage[0].statto == "EAT"){
if (toplate == 1){
xe = objectimage[charimage[0].objectto].xe;
ye = objectimage[charimage[0].objectto].ye;
setdirection(xe, ye, 0);
} else {
xe = (objectimage[charimage[0].objectto].xe + houseitemsizex[objectimage[charimage[0].objectto].nomor][objectimage[charimage[0].objectto].tipe]);
ye = (objectimage[charimage[0].objectto].ye + houseitemsizey[objectimage[charimage[0].objectto].nomor][objectimage[charimage[0].objectto].tipe]);
setdirection(xe, ye, 0);
};
charimage[0].stat = "EAT";
if (charimage[0].mc1.currentLabel == "idle1"){
charimage[0].mc1.gotoAndPlay("idleactivity1");
} else {
charimage[0].mc1.gotoAndPlay("idleactivity2");
};
} else {
if ((((charimage[0].statto == "WATCH")) || ((charimage[0].statto == "OBSERVE")))){
objectimage[charimage[0].objectto].gotoAndStop(2);
if ((((houseitemsizex[objectimage[charimage[0].objectto].nomor][objectimage[charimage[0].objectto].tipe] > 0)) || ((houseitemsizey[objectimage[charimage[0].objectto].nomor][objectimage[charimage[0].objectto].tipe] > 0)))){
trace("YA CARI");
sizex = houseitemsizex[objectimage[charimage[0].objectto].nomor][objectimage[charimage[0].objectto].tipe];
sizey = houseitemsizey[objectimage[charimage[0].objectto].nomor][objectimage[charimage[0].objectto].tipe];
xe = 0;
while (xe <= sizex) {
ye = 0;
while (ye <= sizey) {
i = -1;
while (i <= 1) {
j = -1;
while (j <= 1) {
if ((((((((((i == 1)) && ((j == 0)))) || ((((i == -1)) && ((j == 0)))))) || ((((i == 0)) && ((j == 1)))))) || ((((i == 0)) && ((j == -1)))))){
kex = int(((int(objectimage[charimage[0].objectto].xe) + int(i)) + int(xe)));
key = int(((int(objectimage[charimage[0].objectto].ye) + int(j)) + int(ye)));
if ((((kex == charimage[0].xe)) && ((key == charimage[0].ye)))){
trace("YA NEMU");
setdirection(int((int(objectimage[charimage[0].objectto].xe) + int(xe))), int((int(objectimage[charimage[0].objectto].ye) + int(ye))), 0);
//unresolved jump
};
};
j++;
};
i++;
};
ye++;
};
xe++;
};
} else {
setdirection(objectimage[charimage[0].objectto].xe, objectimage[charimage[0].objectto].ye, 0);
};
} else {
if (charimage[0].statto == "OPEN GOODY MART"){
mcpositioning.visible = false;
mcbuildmode.visible = true;
mcbuildmode.mc1.visible = false;
removeallobjectfunction(true);
pausegame = true;
loaduishop();
setdirection(objectimage[charimage[0].objectto].xe, objectimage[charimage[0].objectto].ye, 0);
} else {
if ((((((((((((((((((((((charimage[0].statto == "PLAY GAMES")) || ((charimage[0].statto == "READ NEWS")))) || ((charimage[0].statto == "INVESTMENT")))) || ((charimage[0].statto == "TAKE A SHOWER")))) || ((charimage[0].statto == "USE")))) || ((charimage[0].statto == "PLAY PIANO")))) || ((charimage[0].statto == "EXERCISE")))) || ((charimage[0].statto == "WEIGHTLIFTING")))) || ((charimage[0].statto == "RUN")))) || ((charimage[0].statto == "SIT")))) || ((charimage[0].statto == "SLEEP")))){
if ((((objectimage[charimage[0].objectto].nomor == 62)) || ((objectimage[charimage[0].objectto].nomor == 63)))){
if (charstat[slotused][32] == 30){
cekdesiredone(30);
};
};
objectimage[charimage[0].objectto].gotoAndStop(2);
charimage[0].visible = false;
} else {
if ((((charimage[0].statto == "PLAY")) || ((charimage[0].statto == "PLAY CHESS")))){
objectimage[charimage[0].objectto].gotoAndStop(2);
setdirection(objectimage[charimage[0].objectto].xe, objectimage[charimage[0].objectto].ye, 0);
if (charimage[0].mc1.currentLabel == "idle1"){
charimage[0].mc1.gotoAndPlay("idleactivity1");
} else {
charimage[0].mc1.gotoAndPlay("idleactivity2");
};
} else {
if (charimage[0].statto == "READ BOOK"){
charimage[0].mc1.gotoAndPlay("readbook");
} else {
if (charimage[0].statto == "SAVE"){
pausegame = true;
charstat[slotused][35] = charimage[0].xe;
charstat[slotused][36] = charimage[0].ye;
savegame();
setdirection(objectimage[charimage[0].objectto].xe, objectimage[charimage[0].objectto].ye, 0);
charimage[0].stat = "idle";
makeidle(0);
mcsave.gotoAndPlay(2);
soundwrite.play(0, 1, new SoundTransform(volsfx));
saveAGI();
stage.addEventListener(Event.ENTER_FRAME, waitsaves);
} else {
if (charimage[0].statto == "LISTEN TO MUSIC"){
charimage[0].mc1.gotoAndPlay("music");
} else {
if (charimage[0].statto == "PLAY FLUTE"){
charimage[0].mc1.gotoAndPlay("flute");
} else {
if (charimage[0].statto == "CHECK STOCKS"){
objectimage[charimage[0].objectto].gotoAndStop(2);
setdirection(objectimage[charimage[0].objectto].xe, objectimage[charimage[0].objectto].ye, 0);
checkstock(objectimage[charimage[0].objectto]);
charimage[0].objectto = "";
} else {
if (charimage[0].statto == "COOK"){
setdirection(objectimage[charimage[0].objectto].xe, objectimage[charimage[0].objectto].ye, 0);
trace("CEK COOK");
cekcancook(false, false);
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
charimage[0].statto = "";
} else {
charimage[0].stat = "idle";
makeidle(0);
};
}
public function pausemenu(e:MouseEvent):void{
var i:*;
speedtime = 1;
loadspeedsymbol();
soundclick.play(0, 1, new SoundTransform(volsfx));
if (soundchannel1 != null){
soundchannel1.stop();
soundchannel1 = null;
};
if (soundchannel2 != null){
soundchannel2.stop();
soundchannel2 = null;
};
if (soundchannel3 != null){
soundchannel3.stop();
soundchannel3 = null;
};
if (soundchannel5 != null){
soundchannel5.stop();
soundchannel5 = null;
};
i = 0;
while (i < objectimage.length) {
if ((objectimage[i] is item31)){
objectimage[i].removeEventListener(Event.ENTER_FRAME, phoneringwaiting);
objectimage[i].gotoAndStop(1);
};
i++;
};
trace(("BGM : " + bgmon));
if (bgmon == true){
volbgm = 1;
};
if (currentLabel == "house"){
cleanuphouse();
} else {
if (currentLabel == "street"){
cleanupstreet();
} else {
if (currentLabel == "office"){
cleanupoffice();
} else {
if (currentLabel == "stadium"){
cleanupoffice();
} else {
if (currentLabel == "park"){
cleanuppark();
} else {
if (currentLabel == "cafe"){
cleanupcafe();
} else {
if (currentLabel == "townpark"){
cleanuptownpark();
};
};
};
};
};
};
};
transisi("main menu");
}
public function ambilnextjob(){
trace(((("cek stat : " + mcjob.ke) + " ") + charstat[slotused][23]));
if ((((mcjob.ke == 3)) || ((((mcjob.ke == 2)) && ((charstat[slotused][23] == 3)))))){
mcjob.nextke = 1;
} else {
mcjob.nextke = int((int(mcjob.ke) + int(1)));
};
}
public function townparkpianoclick(e:MouseEvent):void{
var namee:*;
soundclick.play(0, 1, new SoundTransform(volsfx));
if (charstat[slotused][18] < houseitemstatreq[47]){
createtext((((("I need " + houseitemstatreq[47]) + " ") + statdesc[8]) + " points to use that."));
} else {
cleanupeffectimage();
removealluiimage();
uipopuphealth = 2;
stage.addEventListener(MouseEvent.CLICK, resetuipopup);
namee = e.currentTarget.name;
namee = namee.charAt((namee.length - 1));
createuipopup("PIANO PERFORM", e.currentTarget);
};
}
function frame12(){
stop();
loadsoundsetting();
trace("PARK");
mcuistat.visible = true;
mcclock.visible = true;
mcpositioning.visible = false;
mcitemsdesc.visible = false;
uiimage = [];
tileimage = [];
wallimage = [];
charimage = [];
tileclickerimage = [];
objectimage = [];
effectimage = [];
loadpark();
}
public function studiotestkeywaiting(e:Event):void{
if (studiotesttime.length > 0){
var _local2 = studiotesttime;
var _local3:int;
var _local4 = (_local2[_local3] - 1);
_local2[_local3] = _local4;
if (studiotesttime[0] <= 0){
spawnstudionote();
studiotesttime.splice(0, 1);
studiotestbutton.splice(0, 1);
};
};
studiotesttimeleft--;
mcstudiotest.mc1.width = ((studiotestsuccess / studiosingingtime[int((int(charstat[slotused][24]) + int(1)))]) * 114);
if (studiotesttimeleft <= 0){
mcstudiotest.txttime.text = 0;
if (effectimage.length == 0){
cleanupstudiotest();
trace("DONE");
};
} else {
mcstudiotest.txttime.text = int((studiotesttimeleft / 25));
};
}
public function stepPathfinder():Boolean{
var adjacentCell:Array;
var arryPtr:Object;
var xx:int;
var g:int;
var h:int;
var ii:int;
var indexOfCurrent:*;
var yy:int;
if (currentCell == destinationCell){
closedList.push(destinationCell);
return (true);
};
openList.push(currentCell);
adjacentCell = new Array();
xx = -1;
while (xx <= 1) {
yy = -1;
while (yy <= 1) {
if ((((((((((xx == 1)) && ((yy == 0)))) || ((((xx == 0)) && ((yy == -1)))))) || ((((xx == -1)) && ((yy == 0)))))) || ((((xx == 0)) && ((yy == 1)))))){
if (((((((((currentCell.x + xx) >= 0)) && (((currentCell.y + yy) >= 0)))) && (((currentCell.x + xx) < housesize[charstat[slotused][13]])))) && (((currentCell.y + yy) < housesize[charstat[slotused][13]])))){
if (mapArray[(currentCell.x + xx)][(currentCell.y + yy)]){
arryPtr = mapArray[(currentCell.x + xx)][(currentCell.y + yy)];
if (((!((arryPtr.cellType == CELL_FILLED))) && ((closedList.indexOf(arryPtr) == -1)))){
adjacentCell.push(arryPtr);
};
};
};
};
yy++;
};
xx++;
};
ii = 0;
while (ii < adjacentCell.length) {
g = (currentCell.g + 1);
h = (Math.abs((adjacentCell[ii].x - destinationCell.x)) + Math.abs((adjacentCell[ii].y - destinationCell.y)));
if (openList.indexOf(adjacentCell[ii]) == -1){
adjacentCell[ii].f = (g + h);
adjacentCell[ii].parentCell = currentCell;
adjacentCell[ii].g = g;
openList.push(adjacentCell[ii]);
} else {
if (adjacentCell[ii].g < currentCell.parentCell.g){
currentCell.parentCell = adjacentCell[ii];
currentCell.g = (adjacentCell[ii].g + 1);
currentCell.f = (adjacentCell[ii].g + h);
};
};
ii++;
};
indexOfCurrent = openList.indexOf(currentCell);
closedList.push(currentCell);
openList.splice(indexOfCurrent, 1);
openList.sortOn("f", (Array.NUMERIC | Array.DESCENDING));
if (openList.length == 0){
return (true);
};
currentCell = openList.pop();
return (false);
}
public function statout(e:MouseEvent):void{
e.currentTarget.gotoAndStop(1);
stage.removeEventListener(Event.ENTER_FRAME, statusinfowaiting);
mcstatustxt.x = -200;
mcstatustxt.y = -200;
}
public function investmentdeposit(e:MouseEvent):void{
soundclick.play(0, 1, new SoundTransform(volsfx));
if (int(mcinvestment.mc2.txt1.text) > 0){
soundcoin.play(0, 1, new SoundTransform(volsfx));
charstat[slotused][2] = (charstat[slotused][2] - mcinvestment.mc2.txt1.text);
mcuistat.mccoins.gotoAndPlay(2);
mcuistat.txtgold.text = charstat[slotused][2];
investment[slotused] = [1, 0, 0, 0, 0, 0, 0, 0, mcinvestment.mc2.txt1.text, 0];
ondeposit = true;
applyinvestment();
loadinvestment();
};
}
public function jumpchar(){
if (mcstadiumtest.mcchar1.currentLabel == "run"){
soundjump.play(0, 1, new SoundTransform(volsfx));
mcstadiumtest.mcchar1.gotoAndPlay("jump");
};
}
public function stadiumtestkeyup(e:KeyboardEvent):void{
if (e.keyCode == 65){
jumpleft();
};
if (e.keyCode == 32){
jumpchar();
};
if (e.keyCode == 68){
jumpright();
};
}
function frame20(){
}
public function objectover(e:MouseEvent):void{
e.currentTarget.transform.colorTransform = colorbright;
}
public function hitungenviro(){
var totale:*;
var maxe:*;
var i:*;
totale = 0;
maxe = 25;
if (currentLabel == "street"){
totale = 6;
} else {
if (currentLabel == "park"){
totale = 8;
} else {
if ((((currentLabel == "cafe")) || ((currentLabel == "townpark")))){
totale = 8;
} else {
i = 0;
while (i < objectimage.length) {
totale = (totale + houseitemenvironment[objectimage[i].nomor]);
i++;
};
};
};
};
trace(("enviroe : " + totale));
if (totale > maxe){
totale = maxe;
};
charstat[slotused][12] = ((totale / maxe) * statmax);
}
public function loadstreet(){
var i:*;
var obj:*;
mcbg.mccloud.visible = false;
btn2.removeEventListener(MouseEvent.MOUSE_OVER, oversound);
btn2.addEventListener(MouseEvent.MOUSE_OVER, oversound);
btn2.removeEventListener(MouseEvent.CLICK, relationshipclick);
btn2.addEventListener(MouseEvent.CLICK, relationshipclick);
if (charstat[slotused][23] != 0){
loadjobprogress();
};
btnexitstreet.visible = true;
cekbgnight();
btnexittocafe.removeEventListener(MouseEvent.MOUSE_OVER, oversound);
btnexittocafe.addEventListener(MouseEvent.MOUSE_OVER, oversound);
btnexittocafe.removeEventListener(MouseEvent.CLICK, streetgocafe);
btnexittocafe.addEventListener(MouseEvent.CLICK, streetgocafe);
btnexitstreet.removeEventListener(MouseEvent.MOUSE_OVER, oversound);
btnexitstreet.addEventListener(MouseEvent.MOUSE_OVER, oversound);
btnexitstreet.removeEventListener(MouseEvent.CLICK, exitstreet);
btnexitstreet.addEventListener(MouseEvent.CLICK, exitstreet);
btntopark.removeEventListener(MouseEvent.MOUSE_OVER, oversound);
btntopark.addEventListener(MouseEvent.MOUSE_OVER, oversound);
btntopark.removeEventListener(MouseEvent.CLICK, topark);
btntopark.addEventListener(MouseEvent.CLICK, topark);
btnexittooffice.visible = false;
btnexittooffice.removeEventListener(MouseEvent.MOUSE_OVER, oversound);
btnexittooffice.addEventListener(MouseEvent.MOUSE_OVER, oversound);
btnexittooffice.removeEventListener(MouseEvent.CLICK, streetgowork);
btnexittooffice.addEventListener(MouseEvent.CLICK, streetgowork);
i = 1;
while (i <= 3) {
obj = getChildByName(("mcnews" + i));
if (obj != null){
if ((((obj.mc1.currentFrame == 2)) && (!((obj.currentFrame == 1))))){
btnexittooffice.visible = true;
};
};
i++;
};
btnbusstop.removeEventListener(MouseEvent.MOUSE_OVER, oversound);
btnbusstop.addEventListener(MouseEvent.MOUSE_OVER, oversound);
btnbusstop.removeEventListener(MouseEvent.CLICK, streetbustop);
btnbusstop.addEventListener(MouseEvent.CLICK, streetbustop);
createchar();
if (gotmoney != -1){
if (charstat[slotused][32] == 10){
charstat[slotused][34] = (charstat[slotused][34] - gotmoney);
cekdesirestatus();
if (charstat[slotused][34] <= 0){
cekdesiredone(10);
};
};
gotmoney = -1;
};
mcclock.txt3.text = daylist[ambilharikerja()];
loadspeedsymbol();
loaduistat();
hitungenviro();
cekstatusadd();
stage.addEventListener(Event.ENTER_FRAME, gamewaiting);
}
public function cleanuprepairman(){
repairmancoming = false;
charimage[1].removeEventListener(Event.ENTER_FRAME, repairmanwaiting);
removeChild(charimage[1]);
charimage[1] = null;
charimage.splice(1, 1);
}
function frame17(){
stop();
stage.addEventListener(Event.ENTER_FRAME, creditswaiting);
}
public function counterlist(){
var potong:*;
var tempi:*;
potong = 0;
i = 0;
while (i < tablecounterslot[slotused].length) {
trace(("cek counter : " + tablecounterslot[slotused][i]));
i++;
};
}
public function cleanuppark(){
var j:*;
j = 0;
while (j < charimage.length) {
charimage[j].removeEventListener(Event.ENTER_FRAME, repairmanwaiting);
removeChild(charimage[j]);
charimage[j] = null;
j++;
};
cleanupeffectimage();
removealluiimage();
stage.removeEventListener(Event.ENTER_FRAME, gamewaiting);
stage.removeEventListener(Event.ENTER_FRAME, faintedwaiting);
}
public function loadfaintedui(){
mcfainted.gotoAndStop(2);
mcfainted.txt1.text = (charstat[slotused][15] + " has collapsed and requires medical treatment!");
mcfainted.txt2.text = (((charstat[slotused][15] + " will be billed for ") + hospitalfee) + " coins and overall lifespan is decreased.");
mcfainted.btnok.removeEventListener(MouseEvent.MOUSE_OVER, oversound);
mcfainted.btnok.addEventListener(MouseEvent.MOUSE_OVER, oversound);
mcfainted.btnok.removeEventListener(MouseEvent.CLICK, faintedok);
mcfainted.btnok.addEventListener(MouseEvent.CLICK, faintedok);
}
function frame19(){
gotoAndStop("house");
if (bgmon == true){
volbgm = 1;
};
}
public function oversound(event:MouseEvent):void{
}
public function resettownparkusage(){
mcpiano.gotoAndStop(1);
mcpiano.mcstink.visible = false;
mcflute.gotoAndStop(1);
mcflute.mcstink.visible = false;
mcbook.gotoAndStop(1);
mcbook.mcstink.visible = false;
mcflag.gotoAndStop(1);
mcflag.mcstink.visible = false;
}
public function exithouse(e:MouseEvent):void{
soundclick.play(0, 1, new SoundTransform(volsfx));
onout = true;
if ((((charimage[0].xe == posisirumahx[charstat[slotused][13]])) && ((charimage[0].ye == posisirumahy[charstat[slotused][13]])))){
gooutside();
} else {
charmove(posisirumahx[charstat[slotused][13]], posisirumahy[charstat[slotused][13]]);
};
}
public function careerfailedwaiting(e:Event):void{
if (mccareerfailed.currentFrame == mccareerfailed.totalFrames){
mccareerfailed.gotoAndStop(1);
stage.removeEventListener(Event.ENTER_FRAME, careerfailedwaiting);
charstat[slotused][26] = (workcompletion * 0.99);
cekwages();
};
}
public function cleanupstory(){
stage.removeEventListener(KeyboardEvent.KEY_DOWN, naminginput);
stage.removeEventListener(Event.ENTER_FRAME, storywaiting);
stage.removeEventListener(Event.ENTER_FRAME, statusinfowaiting);
mcinput.mc1.mcapproved.removeEventListener(Event.ENTER_FRAME, approvedwait1);
stage.removeEventListener(Event.ENTER_FRAME, namewritewaiting);
}
public function createsparkle(mader:Object){
var clickPoint1:Point;
clickPoint1 = mader.localToGlobal(new Point(0, 0));
effectimage[effectimage.length] = new (sparkleeffect);
addChildAt(effectimage[(effectimage.length - 1)], getChildIndex(mceffectposition));
effectimage[(effectimage.length - 1)].indexke = (effectimage.length - 1);
effectimage[(effectimage.length - 1)].mouseChildren = false;
effectimage[(effectimage.length - 1)].mouseEnabled = false;
effectimage[(effectimage.length - 1)].x = clickPoint1.x;
effectimage[(effectimage.length - 1)].y = clickPoint1.y;
trace(((("Create di : " + clickPoint1.x) + " ") + clickPoint1.y));
effectimage[(effectimage.length - 1)].addEventListener(Event.ENTER_FRAME, effectwaiting);
}
public function mmplay(event:MouseEvent):void{
txtlog.text = "LOAD MM PLAY";
updatelocalsave();
txtlog.text = "a";
soundclick.play(0, 1, new SoundTransform(volsfx));
txtlog.text = "b";
loadslot();
txtlog.text = "c";
}
public function loadstudiotest(){
studiotesttimeleft = (studiotesttimelist[int((int(charstat[slotused][24]) + int(1)))] * 25);
mcstudiotest.txttime.text = int((studiotesttimeleft / 25));
mcstudiotest.btnstart.visible = true;
mcstudiotest.gotoAndStop(2);
mcstudiotest.mcnote.gotoAndStop(1);
mcstudiotest.btnstart.removeEventListener(MouseEvent.MOUSE_OVER, oversound);
mcstudiotest.btnstart.addEventListener(MouseEvent.MOUSE_OVER, oversound);
mcstudiotest.btnstart.removeEventListener(MouseEvent.CLICK, officeteststart);
mcstudiotest.btnstart.addEventListener(MouseEvent.CLICK, officeteststart);
mcstudiotest.mc1.width = 1;
}
public function exittownpark(e:MouseEvent):void{
soundclick.play(0, 1, new SoundTransform(volsfx));
cleanuptownpark();
loadspeedsymbol();
transisi("park");
}
public function creditswaiting(e:Event):void{
if (mccredits.currentFrame == mccredits.totalFrames){
stage.removeEventListener(Event.ENTER_FRAME, creditswaiting);
transisi("story");
};
}
public function goleft(e:MouseEvent):void{
soundclick.play(0, 1, new SoundTransform(volsfx));
jumpleft();
}
public function createfailedcareer(){
soundlose.play(0, 1, new SoundTransform(volsfx));
stage.addEventListener(MouseEvent.CLICK, careerfailedclick);
mccareerfailed.gotoAndPlay(2);
mccareerfailed.mctxt.gotoAndStop(charstat[slotused][23]);
}
public function clickAGFB(event:MouseEvent):void{
var request:URLRequest;
soundclick.play(0, 1, new SoundTransform(volsfx));
request = new URLRequest("http://www.facebook.com/ArmorGames");
navigateToURL(request);
}
public function createtileclickerimage(){
var i:*;
var j:*;
i = 0;
while (i < housesize[charstat[slotused][13]]) {
tileclickerimage[i] = [];
j = 0;
while (j < housesize[charstat[slotused][13]]) {
tileclickerimage[i][j] = new (tileclicker);
addChildAt(tileclickerimage[i][j], getChildIndex(mctileclickerposition));
tileclickerimage[i][j].x = tileimage[i][j].x;
tileclickerimage[i][j].y = tileimage[i][j].y;
tileclickerimage[i][j].xe = i;
tileclickerimage[i][j].ye = j;
tileclickerimage[i][j].buttonMode = true;
tileclickerimage[i][j].alpha = 0.01;
tileclickerimage[i][j].addEventListener(MouseEvent.CLICK, tileclick);
j++;
};
i++;
};
}
public function settextvertical(texte:String, mc1:Object, standarte:Number){
var objtext:*;
var persatu:*;
var standarty:*;
var i:*;
objtext = mc1.txt1;
objtext.text = "asd";
persatu = objtext.textHeight;
standarty = standarte;
objtext.text = texte;
if (objtext.textHeight <= persatu){
objtext.y = standarty;
} else {
i = 1;
while (i <= 5) {
if (objtext.textHeight <= int(((21 + (i * persatu)) + 2))){
objtext.y = (standarty - (i * 5));
break;
};
i++;
};
};
}
public function townparkfluteclick(e:MouseEvent):void{
var namee:*;
soundclick.play(0, 1, new SoundTransform(volsfx));
if (charstat[slotused][18] < houseitemstatreq[46]){
createtext((((("I need " + houseitemstatreq[46]) + " ") + statdesc[8]) + " points to use that."));
} else {
cleanupeffectimage();
removealluiimage();
uipopuphealth = 2;
stage.addEventListener(MouseEvent.CLICK, resetuipopup);
namee = e.currentTarget.name;
namee = namee.charAt((namee.length - 1));
createuipopup("FLUTE PERFORM", e.currentTarget);
};
}
public function loadgoal(mader:Object){
var persene:*;
var i:*;
var hasile:*;
var obj:*;
mader.txt1.text = (gamegoal - charstat[slotused][38]);
persene = int(((charstat[slotused][38] / gamegoal) * 10));
i = 1;
while (i <= 10) {
obj = mader.getChildByName(("mcbar" + i));
obj.gotoAndStop(1);
if (i <= persene){
obj.gotoAndStop(2);
};
i++;
};
trace(((("LETS CHECK : " + charstat[slotused][38]) + " ") + gamegoal));
hasile = int(((charstat[slotused][38] / gamegoal) * 100));
mader.txt2.text = (hasile + "%");
}
function frame10(){
stop();
loadsoundsetting();
mcuistat.visible = true;
mcclock.visible = true;
mcpositioning.visible = false;
mcitemsdesc.visible = false;
uiimage = [];
tileimage = [];
wallimage = [];
charimage = [];
tileclickerimage = [];
objectimage = [];
effectimage = [];
loadstudio();
}
public function approvedwait1(e:Event):void{
if (e.currentTarget.currentFrame == e.currentTarget.totalFrames){
soundpaper.play(0, 1, new SoundTransform(volsfx));
mcinput.mc1.mcapproved.removeEventListener(Event.ENTER_FRAME, approvedwait1);
mcinput.page++;
mcinput.gotoAndPlay(("go" + mcinput.page));
loadinput();
};
}
public function statover(e:MouseEvent):void{
var namee:*;
e.currentTarget.gotoAndStop(2);
namee = e.currentTarget.mc1.currentFrame;
mcstatustxt.txt2.mouseEnabled = false;
if ((((namee >= 6)) && ((namee <= 8)))){
mcstatustxt.txt2.text = statdesc2[namee];
mcstatustxt.gotoAndStop(2);
} else {
mcstatustxt.txt2.text = "";
mcstatustxt.gotoAndStop(1);
};
settextvertical(statdesc[namee], mcstatustxt, 16.4);
stage.addEventListener(Event.ENTER_FRAME, statusinfowaiting);
}
public function loadcredits(){
mcmainmenu.btnplay.visible = false;
mcmainmenu.btncredits.visible = false;
mcmainmenu.btngoody.visible = false;
mcmainmenu.btnarmor.visible = false;
mcmainmenu.btnfb.visible = false;
mccredits.gotoAndPlay(2);
mccredits.btnback.removeEventListener(MouseEvent.MOUSE_OVER, oversound);
mccredits.btnback.addEventListener(MouseEvent.MOUSE_OVER, oversound);
mccredits.btnback.removeEventListener(MouseEvent.CLICK, mmcreditsback);
mccredits.btnback.addEventListener(MouseEvent.CLICK, mmcreditsback);
}
public function mmdeleteeh(e:MouseEvent):void{
soundclick.play(0, 1, new SoundTransform(volsfx));
mcmainmenu.mcoption.visible = false;
loadslot();
}
public function overframe(e:MouseEvent):void{
var i:*;
var obj:*;
var j:*;
e.currentTarget.mcframe.gotoAndStop(2);
i = 1;
while (i <= 5) {
obj = mcitemsdesc.getChildByName(("mc" + i));
obj.visible = false;
obj = null;
i++;
};
mcitemsdesc.txtreq.text = "";
mcitemsdesc.mcreq.visible = false;
mcitemsdesc.visible = true;
mcitemsdesc.gotoAndStop(1);
if (mcuishop.tabindex < 7){
mcitemsdesc.gotoAndStop(2);
settextvertical(houseitemnameshow[e.currentTarget.nomor], mcitemsdesc, 7.8);
if (houseitemsymbol[e.currentTarget.nomor].length > 0){
i = 0;
while (i < houseitemsymbol[e.currentTarget.nomor].length) {
obj = mcitemsdesc.getChildByName(("mc" + int((int(i) + int(1)))));
obj.visible = true;
obj.mc1.gotoAndStop(houseitemsymbol[e.currentTarget.nomor][i]);
obj.gotoAndStop(houseitemmark[e.currentTarget.nomor][i]);
obj = null;
i++;
};
} else {
mcitemsdesc.gotoAndStop(1);
};
if (houseitemstattype[e.currentTarget.nomor] != 0){
mcitemsdesc.gotoAndStop(3);
mcitemsdesc.txtreq.text = houseitemstatreq[e.currentTarget.nomor];
mcitemsdesc.mcreq.visible = true;
mcitemsdesc.mcreq.gotoAndStop((houseitemstattype[e.currentTarget.nomor] - 10));
mcitemsdesc.txtreq.textColor = "0xFF0000";
if (charstat[slotused][houseitemstattype[e.currentTarget.nomor]] >= houseitemstatreq[e.currentTarget.nomor]){
mcitemsdesc.txtreq.textColor = "0x00FF00";
};
};
} else {
if (mcuishop.tabindex == 7){
settextvertical("Tile", mcitemsdesc, 7.8);
i = 0;
while (i < housesize[charstat[slotused][13]]) {
j = 0;
while (j < housesize[charstat[slotused][13]]) {
tileimage[i][j].mc1.gotoAndStop(e.currentTarget.mc7.currentFrame);
j++;
};
i++;
};
} else {
settextvertical("Wallpaper", mcitemsdesc, 7.8);
i = 0;
while (i < wallimage.length) {
removeChild(wallimage[i]);
wallimage[i] = null;
i++;
};
trace("REMOVE WALL");
wallimage = [];
createwall((e.currentTarget.mc8.currentFrame + (e.currentTarget.mc8.currentFrame - 1)));
};
};
}
public function parkbenchclick(e:MouseEvent):void{
soundclick.play(0, 1, new SoundTransform(volsfx));
cleanupeffectimage();
removealluiimage();
uipopuphealth = 2;
stage.addEventListener(MouseEvent.CLICK, resetuipopup);
createuipopup("SLEEP IN PARK", e.currentTarget);
}
public function cekworkperformance(){
workcompletion = ((charstat[slotused][24] + 1) * 70);
itungworkrate();
}
public function cekworkannouncement(){
if (((((!((charstat[slotused][23] == 0))) && ((jobday[charstat[slotused][23]][ambilharikerja()] == 1)))) && ((charstat[slotused][29] == 0)))){
trace(("jam : " + charstat[slotused][19]));
if ((((timejam >= 0)) && ((timejam < jobfrom)))){
bwatnews(1, (jobfrom - timejam));
} else {
if ((((timejam >= jobfrom)) && ((timejam < jobentertime)))){
bwatnews(2, (jobentertime - timejam));
trace(("TUTORIAL JOB TIME : " + tutorialjobtime[slotused]));
};
};
};
}
public function loading(e:Event):void{
var total:Number;
var loaded:Number;
var percentage:Number;
btnyay.visible = false;
total = this.stage.loaderInfo.bytesTotal;
loaded = this.stage.loaderInfo.bytesLoaded;
percentage = ((loaded / total) * 100);
txtloading.text = (int(percentage) + "%");
if (loaded == total){
stage.removeEventListener(Event.ENTER_FRAME, loading);
txt1.text = "";
txtloading.text = "";
btnyay.visible = true;
};
}
public function relationshipwaiting(e:Event):void{
var untuk:*;
var obj:*;
if (relationindex == 1){
if (e.currentTarget.mc2.currentFrame == e.currentTarget.mc2.totalFrames){
if (e.currentTarget.mc2.mc1.currentFrame == 2){
relationindex = 2;
} else {
e.currentTarget.removeEventListener(Event.ENTER_FRAME, relationshipwaiting);
pausegame = false;
mcrelationship.gotoAndStop(1);
};
charimage[0].stat = "idle";
charimage[0].visible = true;
};
} else {
if (relationindex == 2){
relationfxtime--;
if (relationfxtime <= 0){
relationfxtime = 15;
relationindex = 3;
mcrelationship.mcfx1.gotoAndPlay(2);
mcrelationship.txt1.text = (relationship[slotused][mcrelationship.ke] + 1);
};
} else {
if (relationindex == 3){
relationfxtime--;
if (relationfxtime <= 0){
relationfxtime = 35;
relationindex = 4;
mcrelationship.mcfx2.gotoAndPlay(2);
untuk = (relationship[slotused][mcrelationship.ke] + 1);
mcrelationship.txtstat.text = relationshipstat[untuk];
mcrelationship.txtstat.textColor = relationshipcolor[untuk];
};
} else {
if (relationindex == 4){
relationfxtime--;
if (relationfxtime <= 0){
e.currentTarget.removeEventListener(Event.ENTER_FRAME, relationshipwaiting);
pausegame = false;
mcrelationship.gotoAndStop(1);
if ((((relationshipincrease == true)) && ((charstat[slotused][32] == 8)))){
cekdesiredone(8);
};
createstaticon(11);
if (mcuistat.tabindex == 2){
obj = mcuistat.getChildByName(("mc" + 4));
if (obj.mcarrow.currentFrame == 1){
obj.mcarrow.gotoAndPlay(2);
};
obj = null;
};
};
};
};
};
};
}
public function setdirection(xe:int, ye:int, ke:int){
var obj:*;
obj = objectimage[charimage[ke].objectto];
if ((((xe < charimage[ke].xe)) && ((charimage[ke].directione == "right")))){
charimage[ke].mc1.scaleX = (charimage[ke].mc1.scaleX * -1);
charimage[ke].directione = "left";
} else {
if ((((xe > charimage[ke].xe)) && ((charimage[ke].directione == "left")))){
charimage[ke].mc1.scaleX = (charimage[ke].mc1.scaleX * -1);
charimage[ke].directione = "right";
} else {
if (xe == charimage[ke].xe){
if (ye > charimage[ke].ye){
if (charimage[ke].directione == "right"){
charimage[ke].mc1.scaleX = (charimage[ke].mc1.scaleX * -1);
charimage[ke].directione = "left";
};
} else {
if (charimage[ke].directione == "left"){
charimage[ke].mc1.scaleX = (charimage[ke].mc1.scaleX * -1);
charimage[ke].directione = "right";
};
};
};
};
};
if (ye > charimage[ke].ye){
charimage[ke].mc1.gotoAndPlay("idle1");
} else {
if (ye < charimage[ke].ye){
charimage[ke].mc1.gotoAndPlay("idle2");
} else {
if (ye == charimage[ke].ye){
if (xe > charimage[ke].xe){
charimage[ke].mc1.gotoAndPlay("idle1");
} else {
charimage[ke].mc1.gotoAndPlay("idle2");
};
};
};
};
obj = null;
}
public function loadstadiumtest(){
var i:*;
var obj:*;
charimage[0].visible = false;
stadiumtesttime = ((charstat[slotused][16] * 4) * 25);
stadiumtestjumpneeded = 0;
mcstadiumtest.mcchar1.posisi = 2;
mcstadiumtest.mcchar1.x = (stadiumposawalx + stadiumtambax);
mcstadiumtest.mcchar1.y = (stadiumposawaly + stadiumtambay);
mcstadiumtest.btnspace.transform.colorTransform = colordark;
mcstadiumtest.btnleft.transform.colorTransform = colordark;
mcstadiumtest.btnright.transform.colorTransform = colordark;
i = 1;
while (i <= 4) {
obj = mcstadiumtest.getChildByName(("mcobstacle" + i));
obj.visible = false;
i++;
};
mcstadiumtest.txttime.text = int((stadiumtesttime / 25));
mcstadiumtest.btnstart.visible = true;
mcstadiumtest.gotoAndStop(2);
mcstadiumtest.btnstart.removeEventListener(MouseEvent.MOUSE_OVER, oversound);
mcstadiumtest.btnstart.addEventListener(MouseEvent.MOUSE_OVER, oversound);
mcstadiumtest.btnstart.removeEventListener(MouseEvent.CLICK, officeteststart);
mcstadiumtest.btnstart.addEventListener(MouseEvent.CLICK, officeteststart);
mcstadiumtest.mc1.width = 1;
}
public function uploadhighscore(){
if (guestbool == false){
agi.scoreboard.submit({scoreboardName:"Day needed", score:(startupdefault - startup[slotused]), callback:function (data:Object):void{
if (data.success){
} else {
trace(data.error);
};
}});
};
}
public function exitoffice(e:MouseEvent):void{
sounddoor.play(0, 1, new SoundTransform(volsfx));
soundclick.play(0, 1, new SoundTransform(volsfx));
gostreet();
}
public function turuninsoundbgm(ke:Number){
if (bgmon == true){
trace(("BGM JADI : " + volbgm));
volbgm = ke;
if (soundchannel1 != null){
soundchannel1.soundTransform = new SoundTransform(volbgm);
};
if (soundchannel3 != null){
soundchannel3.soundTransform = new SoundTransform(volbgm);
};
};
}
public function investmentminus(e:MouseEvent):void{
var skrg:*;
var jadie:*;
soundclick.play(0, 1, new SoundTransform(volsfx));
skrg = mcinvestment.mc2.txt1.text;
jadie = int((int(skrg) - int(10)));
if (jadie > 0){
mcinvestment.mc2.txt1.text = jadie.toString();
};
}
public function jobinfoout(e:MouseEvent):void{
mcjoblevelupinfo.visible = false;
}
public function isimakananini(i:int){
var l:*;
var j:*;
var k:*;
var obj:*;
l = 0;
while (l < tablecounterslot[slotused].length) {
j = 2;
while (j <= 3) {
if (tablecounterslot[slotused][l][j] == 0){
k = 0;
while (k < objectimage.length) {
if ((((objectimage[k].namee == "COUNTER")) || ((objectimage[k].namee == "TABLE")))){
if ((((objectimage[k].xe == tablecounterslot[slotused][l][0])) && ((objectimage[k].ye == tablecounterslot[slotused][l][1])))){
soundplate.play(0, 1, new SoundTransform(volsfx));
trace("b");
obj = objectimage[k].getChildByName(("mcplate" + int((j - 1))));
obj.visible = true;
obj.gotoAndStop(int((i + 2)));
obj.mcfly.visible = false;
tablecounterslot[slotused][l][j] = 1;
tablecounterslot[slotused][l][(j + 2)] = i;
tablecounterslot[slotused][l][(j + 4)] = cookamount[i];
tablecounterslot[slotused][l][(j + 6)] = cookexpire[i];
trace(("counter jadi : " + tablecounterslot[slotused][l]));
obj = null;
//unresolved jump
};
};
k++;
};
};
j++;
};
l++;
};
}
public function openpositioning(e:MouseEvent):void{
var i:*;
stage.removeEventListener(MouseEvent.CLICK, resetuipopup);
removealluiimage();
soundclick.play(0, 1, new SoundTransform(volsfx));
speedtime = 1;
loadspeedsymbol();
if ((((charimage[0].stat == "idle")) || ((charimage[0].stat == "walk")))){
charimage[0].objectto = "";
charimage[0].statto = "";
charimage[0].stat = "idle";
makeidle(0);
};
if (mcpositioning.currentFrame == 1){
turuninsoundbgm(0.4);
btnexit.visible = false;
removeallobjectfunction(false);
i = 0;
while (i < objectimage.length) {
if ((((houseitemname[objectimage[i].nomor][objectimage[i].tipe] == "TABLE")) || ((houseitemname[objectimage[i].nomor][objectimage[i].tipe] == "COUNTER")))){
objectimage[i].mcplate1.mouseEnabled = false;
objectimage[i].mcplate1.mouseChildren = false;
objectimage[i].mcplate2.mouseEnabled = false;
objectimage[i].mcplate2.mouseChildren = false;
};
i++;
};
mcpositioning.gotoAndStop(2);
pausegame = true;
mcbuildmode.visible = true;
mcbuildmode.mc1.visible = false;
} else {
trace(("CEK ADA NYANTOL : " + positionongtempstat));
if ((((onbuild == true)) && ((positionongtempstat.length > 0)))){
rebuildthisitem(positionongtempstat[2], positionongtempstat[3]);
createitemhere(positionongtempstat[2], positionongtempstat[3]);
ceklight();
ceklightenarea();
hitungenviro();
};
removealluiimage();
stage.removeEventListener(Event.ENTER_FRAME, furniturefollowwaiting);
onshop = false;
onbuild = false;
turuninsoundbgm(1);
btnexit.visible = true;
trace("HE");
removeallobjectfunction(false);
onbuild = false;
mcpositioning.gotoAndStop(1);
pausegame = false;
mcbuildmode.visible = false;
cleanupitemfollow();
balikinfungsiplate();
pausegame = false;
};
}
public function loadAGI2(){
var username:String;
trace("LOAD AGIII");
if (AGIconnected == true){
if (agi.user.isGuest()){
mcguest.mc1.txt1.text = "Guest connected.";
} else {
guestbool = false;
username = agi.user.getUsername();
mcguest.mc1.txt1.text = (("Citizen " + username) + " connected.");
};
} else {
mcguest.mc1.txt1.text = "Offline save.";
};
mcguest.gotoAndPlay(2);
}
public function transisiwaiting(e:Event):void{
if (mctransisi.currentLabel == "go"){
gotoAndStop(mctransisi.goto);
mctransisi.gotoAndPlay("done");
mctransisi.removeEventListener(Event.ENTER_FRAME, transisiwaiting);
};
}
public function cekwages(){
var perolehan:*;
var bonus:*;
trace("CEK WAGES");
coinimage = [];
speedtime = 1;
loadspeedsymbol();
pausegame = true;
perolehan = int(jobwages[charstat[slotused][23]][int((int(charstat[slotused][24]) + int(0)))]);
bonus = 0;
trace(((("hm : " + charstat[slotused][26]) + " ") + workcompletion));
if (charstat[slotused][26] >= workcompletion){
charstat[slotused][25] = (charstat[slotused][25] + jobincreasement[charstat[slotused][24]]);
if (charstat[slotused][25] >= jobprogperlevel){
charstat[slotused][25] = jobprogperlevel;
};
jobpercentage[slotused][charstat[slotused][23]] = charstat[slotused][25];
bonus = (charstat[slotused][26] - workcompletion);
bonus = int(((bonus / workcompletion) * jobwages[charstat[slotused][23]][int((int(charstat[slotused][24]) + int(0)))]));
} else {
perolehan = int((jobwages[charstat[slotused][23]][int((int(charstat[slotused][24]) + int(0)))] * (charstat[slotused][26] / workcompletion)));
charstat[slotused][25] = (charstat[slotused][25] - jobdecreasement[charstat[slotused][24]]);
trace(("char stat : " + charstat[slotused][25]));
if (charstat[slotused][25] <= 0){
charstat[slotused][25] = 0;
};
jobpercentage[slotused][charstat[slotused][23]] = charstat[slotused][25];
};
trace(((("perolehan : " + perolehan) + " bonus : ") + bonus));
perolehan = (perolehan + bonus);
if (perolehan <= 0){
perolehan = 1;
};
charstat[slotused][2] = (charstat[slotused][2] + perolehan);
gotmoney = perolehan;
mcwages.btngood.visible = false;
mcwages.mc1.coin = 0;
mcwages.mc1.txt1.text = ("+" + 0);
mcwages.gotoAndPlay(2);
mcwages.btngood.removeEventListener(MouseEvent.MOUSE_OVER, oversound);
mcwages.btngood.addEventListener(MouseEvent.MOUSE_OVER, oversound);
mcwages.btngood.removeEventListener(MouseEvent.CLICK, wagesgood);
mcwages.btngood.addEventListener(MouseEvent.CLICK, wagesgood);
wagescoin = perolehan;
wagescointemp = wagescoin;
wageswait = 0;
stage.addEventListener(Event.ENTER_FRAME, wageswaiting);
stage.addEventListener(MouseEvent.CLICK, skipwages);
}
public function createcoin(){
coinimage[coinimage.length] = new (ingamecoin);
mcwages.addChildAt(coinimage[(coinimage.length - 1)], mcwages.getChildIndex(mcwages.mccoinposition));
coinimage[(coinimage.length - 1)].x = randRange(-152, -20);
coinimage[(coinimage.length - 1)].y = randRange(-245, -304);
mcwages.mc1.visible = true;
mcwages.mc1.coin++;
mcwages.mc1.txt1.text = ("+" + mcwages.mc1.coin);
}
public function objectclick(e:MouseEvent):void{
var prego:*;
var go:*;
var i:*;
soundclick.play(0, 1, new SoundTransform(volsfx));
onout = false;
if ((((pausegame == true)) && ((mcpositioning.currentFrame == 2)))){
prego = false;
if (((((((!((charimage[0].stat == "walk"))) && (!((charimage[0].stat == "idle"))))) && ((charimage[0].objectto == e.currentTarget.indexke)))) || ((repairmancoming == true)))){
if ((((repairmancoming == true)) && ((charimage[1].objectto == e.currentTarget.indexke)))){
createtext("Still being repaired.");
} else {
if ((((repairmancoming == true)) && (!((charimage[1].objectto == e.currentTarget.indexke))))){
prego = true;
} else {
if (charimage[0].objectto == e.currentTarget.indexke){
createtext("I'm still using the object.");
};
};
};
} else {
prego = true;
};
if (prego == true){
go = true;
if ((((houseitemname[e.currentTarget.nomor][e.currentTarget.tipe] == "TABLE")) || ((houseitemname[e.currentTarget.nomor][e.currentTarget.tipe] == "COUNTER")))){
i = 0;
while (i < tablecounterslot[slotused].length) {
if ((((e.currentTarget.xe == tablecounterslot[slotused][i][0])) && ((e.currentTarget.ye == tablecounterslot[slotused][i][1])))){
if ((((tablecounterslot[slotused][i][2] == 1)) || ((tablecounterslot[slotused][i][3] == 1)))){
go = false;
createtext("Must clean it before moving it.");
break;
};
};
i++;
};
};
if (go == true){
ceklight();
ceklightenarea();
positionongtempstat = [e.currentTarget.nomor, e.currentTarget.tipe, e.currentTarget.xe, e.currentTarget.ye, houseitems[slotused][e.currentTarget.xe][e.currentTarget.ye][2], houseitems[slotused][e.currentTarget.xe][e.currentTarget.ye][3]];
trace(("ISI POSITIONING STAT : " + positionongtempstat));
createitemfollow(e.currentTarget.nomor, e.currentTarget.tipe);
removethisobject(e.currentTarget);
};
};
} else {
cleanupeffectimage();
accessthis(e.currentTarget);
};
stage.focus = stage;
}
public function resetcafeusage(){
var i:*;
var obj:*;
i = 1;
while (i <= 3) {
obj = getChildByName(("mctable" + i));
obj.gotoAndStop(cafe[slotused][i]);
obj.removeEventListener(MouseEvent.CLICK, tableclick);
obj.transform.colorTransform = colornormal;
obj.buttonMode = false;
obj.removeEventListener(MouseEvent.MOUSE_OVER, objectover);
obj.removeEventListener(MouseEvent.MOUSE_OUT, objectout);
if ((((cafe[slotused][i] == 1)) || ((cafe[slotused][i] == 2)))){
obj.buttonMode = true;
obj.gotoAndStop(1);
if (cafe[slotused][i] == 1){
obj.mcplate.gotoAndStop(6);
obj.mcplate.visible = true;
} else {
if (cafe[slotused][i] == 2){
if ((((obj.mcplate.visible == false)) || ((obj.mcplate.currentFrame == 6)))){
obj.mcplate.gotoAndStop(randRange(1, 5));
obj.mcplate.visible = true;
};
};
};
obj.addEventListener(MouseEvent.CLICK, tableclick);
obj.addEventListener(MouseEvent.MOUSE_OVER, objectover);
obj.addEventListener(MouseEvent.MOUSE_OUT, objectout);
} else {
if (cafe[slotused][i] == 3){
if ((((obj.mcplate.visible == false)) || ((obj.mcplate.currentFrame == 6)))){
obj.mcplate.visible = true;
obj.gotoAndStop(4);
obj.mcplate.gotoAndStop(randRange(1, 5));
};
} else {
if (cafe[slotused][i] == 4){
obj.mcplate.visible = false;
obj.gotoAndStop(1);
};
};
};
obj = null;
i++;
};
}
public function streetgowork(e:MouseEvent):void{
soundclick.play(0, 1, new SoundTransform(volsfx));
if (charstat[slotused][5] < walkenergy){
createtext("I'm too tired.");
} else {
charstat[slotused][5] = (charstat[slotused][5] - walkenergy);
if (charstat[slotused][5] <= 0){
charstat[slotused][5] = 0;
};
cleanupstreet();
loadspeedsymbol();
if (charstat[slotused][23] == 2){
transisi("office");
} else {
if (charstat[slotused][23] == 3){
transisi("studio");
} else {
if (charstat[slotused][23] == 1){
transisi("stadium");
};
};
};
};
}
public function createthundersound(){
var sounde:*;
sounde = [soundthunder1, soundthunder2];
sounde[randRange(0, (sounde.length - 1))].play(0, 1, new SoundTransform(volsfx));
}
public function jobinfoover(e:MouseEvent):void{
if (charstat[slotused][24] < 5){
mcjoblevelupinfo.visible = true;
mcjoblevelupinfo.txt1.text = "";
if (jobrelationreq[charstat[slotused][24]] != 0){
mcjoblevelupinfo.txt1.text = jobrelationreq[charstat[slotused][24]];
mcjoblevelupinfo.gotoAndStop(2);
} else {
mcjoblevelupinfo.gotoAndStop(1);
};
};
}
public function createsuccesscareer(){
var selisih:*;
var nextlevelcarrer:*;
var xe:*;
var no:*;
soundwin.play(0, 1, new SoundTransform(volsfx));
mccareerlevelup.btngood.removeEventListener(MouseEvent.MOUSE_OVER, oversound);
mccareerlevelup.btngood.addEventListener(MouseEvent.MOUSE_OVER, oversound);
mccareerlevelup.btngood.removeEventListener(MouseEvent.CLICK, carrersuccessgood);
mccareerlevelup.btngood.addEventListener(MouseEvent.CLICK, carrersuccessgood);
mccareerlevelup.gotoAndPlay(2);
trace(((("HE ANEH : " + jobwages[charstat[slotused][23]][int((int(charstat[slotused][24]) + int(1)))]) + " ") + jobwages[charstat[slotused][23]][charstat[slotused][24]]));
selisih = (jobwages[charstat[slotused][23]][int((int(charstat[slotused][24]) + int(1)))] - jobwages[charstat[slotused][23]][charstat[slotused][24]]);
mccareerlevelup.txt1.text = (("Wages increased by " + selisih) + ".");
nextlevelcarrer = int((int(charstat[slotused][24]) + int(1)));
if (jobreached[slotused][charstat[slotused][23]] >= nextlevelcarrer){
mccareerlevelup.mc2.gotoAndStop("done");
};
xe = [undefined, -46, 1, 38];
no = false;
trace(("JOB KE : " + charstat[slotused][23]));
if (charstat[slotused][23] == 2){
if (jobreached[slotused][charstat[slotused][23]] <= nextlevelcarrer){
mccareerlevelup.mc2.txt2.text = "increased by 1.";
charstat[slotused][11] = (charstat[slotused][11] + 1);
} else {
no = true;
mccareerlevelup.mc2.txt2.text = "Reward already acquired.";
};
} else {
if (charstat[slotused][23] == 1){
trace(((("a " + jobreached[slotused][charstat[slotused][23]]) + " ") + nextlevelcarrer));
if (jobreached[slotused][charstat[slotused][23]] <= nextlevelcarrer){
trace("b");
mccareerlevelup.mc2.txt2.text = "Maximum energy increased.";
charstat[slotused][30] = (charstat[slotused][30] + 1);
} else {
no = true;
mccareerlevelup.mc2.txt2.text = "Reward already acquired.";
};
} else {
mccareerlevelup.mc2.txt2.text = ((nextlevelcarrer * passiveincome) + " passive income earned per day.");
};
};
if (jobreached[slotused][charstat[slotused][23]] < nextlevelcarrer){
jobreached[slotused][charstat[slotused][23]] = nextlevelcarrer;
};
}
public function shopuisectionout(e:MouseEvent):void{
mcitemsdesc.visible = false;
}
public function donecooking(){
var i:*;
var kurangie:*;
var persene:*;
var maxe:*;
var j:*;
i = charimage[0].cookno;
kurangie = cookstock[i];
j = 0;
while (j < refrigeratorstock[slotused].length) {
if (refrigeratorstock[slotused][j][2] >= kurangie){
trace(("KURANGI refri ini ENTEK: " + j));
refrigeratorstock[slotused][j][2] = (refrigeratorstock[slotused][j][2] - kurangie);
kurangie = 0;
} else {
if (refrigeratorstock[slotused][j][2] < kurangie){
trace(("KURANGI refri ini kurang: " + j));
refrigeratorstock[slotused][j][2] = 0;
kurangie = (kurangie - refrigeratorstock[slotused][j][2]);
};
};
if (kurangie <= 0){
break;
};
j++;
};
createstaticon(10);
persene = ambilpersenlearning();
charstat[slotused][10] = (charstat[slotused][10] + (cookstatincrease[i] * persene));
maxe = ((charstat[slotused][18] + 1) * statcarrermax);
if (charstat[slotused][10] > maxe){
createstaticon(10);
charstat[slotused][10] = 0;
var _local6 = charstat[slotused];
var _local7 = 18;
var _local8 = (_local6[_local7] + 1);
_local6[_local7] = _local8;
cekdesiredone(5);
};
if (mcuistat.tabindex == 2){
mcuistat.mc3.mcarrow.gotoAndPlay(2);
};
updatestat();
isimakananini(i);
if (charstat[slotused][32] == 14){
cekdesiredone(14);
};
}
public function yaynextlife(e:MouseEvent):void{
var contributee:*;
var namae:*;
var i:*;
var j:*;
soundresultdone.play(0, 1, new SoundTransform(volsfx));
contributee = charstat[slotused][38];
namae = charstat[slotused][15];
charstat[slotused] = [1, 0, uangtotal, statmax, statmax, statmax, statmax, statmax, 0, 0, 0, 0, 0, 3, 3, namae, heritagesports, heritageint, heritagecreat, 5, 0, 1, false, 0, 0, 0, 0, 0, int((int(maxage) + int(finalmaxage))), 0, 0, 0, -1, 0, 0, -1, -1, int((int(maxage) + int(finalmaxage))), contributee];
houseitems[slotused] = [];
refrigeratorstock[slotused] = [];
tablecounterslot[slotused] = [];
trashbinslot[slotused] = [];
investment[slotused] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
relationship[slotused] = [undefined, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
crowd[slotused] = [];
relationshiphistory[slotused] = [];
i = 1;
while (i < relationpreferences.length) {
relationshiphistory[slotused][i] = [];
j = 1;
while (j <= 4) {
relationshiphistory[slotused][i][j] = [undefined, 0, 0, 0, 0];
j++;
};
i++;
};
i = 0;
while (i < housesize[charstat[slotused][13]]) {
houseitems[slotused][i] = [];
j = 0;
while (j < housesize[charstat[slotused][13]]) {
houseitems[slotused][i][j] = -1;
j++;
};
i++;
};
i = 1;
while (i <= 2) {
crowd[slotused][i] = [undefined, -1, -1, -1];
i++;
};
promostat[slotused] = [];
jobreached[slotused] = [];
cleanupendlife();
if ((((charstat[slotused][38] >= gamegoal)) && ((naekta == true)))){
transisi("gameover");
} else {
transisi("story");
};
}
public function tutorialskip(event:MouseEvent):void{
cektutorialdone();
if (mctutorial.ke != "shop2"){
mcuistat.tabindex = 1;
loaduistat();
};
}
public function loadhouse(){
var i:*;
var obj:*;
var rand:*;
mcbg.mccloud.visible = false;
mcjoblevelupinfo.visible = false;
cekworkannouncement();
ceklifended();
if (charstat[slotused][23] != 0){
mcjobstat.gotoAndPlay(2);
loadjobprogress();
};
btnexit.removeEventListener(MouseEvent.MOUSE_OVER, oversound);
btnexit.addEventListener(MouseEvent.MOUSE_OVER, oversound);
btnexit.removeEventListener(MouseEvent.CLICK, exithouse);
btnexit.addEventListener(MouseEvent.CLICK, exithouse);
btnpause.removeEventListener(MouseEvent.MOUSE_OVER, oversound);
btnpause.addEventListener(MouseEvent.MOUSE_OVER, oversound);
btnpause.removeEventListener(MouseEvent.CLICK, pausegamenow);
btnpause.addEventListener(MouseEvent.CLICK, pausegamenow);
mcpause.btnlogo.removeEventListener(MouseEvent.MOUSE_OVER, oversound);
mcpause.btnlogo.addEventListener(MouseEvent.MOUSE_OVER, oversound);
mcpause.btnlogo.removeEventListener(MouseEvent.CLICK, clickAG);
mcpause.btnlogo.addEventListener(MouseEvent.CLICK, clickAG);
mcpause.btnmenu.removeEventListener(MouseEvent.MOUSE_OVER, oversound);
mcpause.btnmenu.addEventListener(MouseEvent.MOUSE_OVER, oversound);
mcpause.btnmenu.removeEventListener(MouseEvent.CLICK, pausemenu);
mcpause.btnmenu.addEventListener(MouseEvent.CLICK, pausemenu);
mcpause.btnback.removeEventListener(MouseEvent.MOUSE_OVER, oversound);
mcpause.btnback.addEventListener(MouseEvent.MOUSE_OVER, oversound);
mcpause.btnback.removeEventListener(MouseEvent.CLICK, pauseback);
mcpause.btnback.addEventListener(MouseEvent.CLICK, pauseback);
cekstatusadd();
cekbgnight();
i = 1;
while (i <= 2) {
obj = mcclock.getChildByName(("btn" + i));
obj.addEventListener(MouseEvent.CLICK, speedchange);
i++;
};
mcclock.txt3.text = daylist[ambilharikerja()];
loadspeedsymbol();
mcitemsdesc.visible = false;
mcbuildmode.visible = false;
mcpositioning.visible = true;
mcpositioning.gotoAndStop(1);
mcpositioning.removeEventListener(MouseEvent.MOUSE_OVER, oversound);
mcpositioning.addEventListener(MouseEvent.MOUSE_OVER, oversound);
mcpositioning.removeEventListener(MouseEvent.CLICK, openpositioning);
mcpositioning.addEventListener(MouseEvent.CLICK, openpositioning);
mcprog.x = -200;
mcprog.y = -200;
createmaparray();
createtile();
createtileclickerimage();
createwall(charstat[slotused][14]);
createchar();
donemasukrumah = true;
createhouseitems();
ceklight();
ceklightenarea();
hitungenviro();
mcuishop.tabindex = 1;
mcuishop.itemindex = 1;
mcuistat.tabindex = 1;
loaduistat();
if (soundchannel1 == null){
createsound();
};
stage.addEventListener(Event.ENTER_FRAME, gamewaiting);
stage.addEventListener(KeyboardEvent.KEY_DOWN, keywaiting);
if (tutoriallife[slotused] == false){
btnexit.visible = false;
loadtutorial("life");
};
cekphoneringing();
if ((((((tutorialjob[slotused] == true)) && ((tutorialsave[slotused] == true)))) && ((allowsavetext == true)))){
rand = randRange(1, 2);
if (rand == 1){
createtext("Remember to save your progress with the phone!");
};
};
allowsavetext = true;
}
public function faintedwaiting(e:Event):void{
faintedtime--;
if (faintedtime <= 0){
loadfaintedui();
stage.removeEventListener(Event.ENTER_FRAME, faintedwaiting);
};
}
public function accessthis(mader:Object){
var typereq:*;
var nomorreq:*;
var go:*;
var xe:*;
var i:*;
removealluiimage();
if ((mader is tile1)){
if (((!((charimage[0].xe == mader.xe))) || (!((charimage[0].ye == mader.ye))))){
charmove(mader.xe, mader.ye);
} else {
cekcharmove(charimage[0].stat, charimage[0].objectto);
if (charimage[0].stat2 != ""){
cekcharmove(charimage[0].stat2, charimage[0].objectto2);
};
makeidle(0);
charimage[0].stat = "idle";
};
charimage[0].objectto = "";
charimage[0].statto = "";
charimage[0].objectto2 = "";
charimage[0].stat2 = "";
} else {
typereq = houseitemstattype[mader.nomor];
nomorreq = houseitemstatreq[mader.nomor];
go = false;
if (typereq == 0){
go = true;
} else {
if (charstat[slotused][typereq] >= nomorreq){
go = true;
};
};
if (go == false){
createtext((((("I need " + nomorreq) + " ") + statdesc[(typereq - 10)]) + " points to use that."));
} else {
if (go == true){
if (mader.namee == "TRASH BIN"){
if (mader.namee == "TRASH BIN"){
xe = 0;
while (xe < trashbinslot[slotused].length) {
if ((((((trashbinslot[slotused][xe][0] == mader.xe)) && ((trashbinslot[slotused][xe][1] == mader.ye)))) && ((trashbinslot[slotused][xe][2] > 0)))){
createuipopup("CLEAN TRASH", mader);
};
xe++;
};
};
} else {
if (((((!((houseitemhp[mader.nomor] == -1))) && (!((houseitems[slotused][mader.xe][mader.ye][2] == houseitemhp[mader.nomor]))))) && ((mader.mcbroken.visible == true)))){
createuipopup("REPAIR", mader);
} else {
i = 0;
while (i < houseitemcommand[mader.nomor].length) {
if ((((((((((((mader is item31)) && ((donefirstjob[slotused] == false)))) && ((houseitemcommand[mader.nomor][i] == "FIND A JOB")))) || ((((((((mader is item31)) && ((donefirstjob[slotused] == true)))) && ((tutorialsave[slotused] == false)))) && ((houseitemcommand[mader.nomor][i] == "SAVE")))))) || (!((mader is item31))))) || ((((((mader is item31)) && ((donefirstjob[slotused] == true)))) && ((tutorialsave[slotused] == true)))))){
if ((((((mader is item31)) && ((donefirstjob[slotused] == false)))) && ((houseitemcommand[mader.nomor][i] == "FIND A JOB")))){
mader.removeEventListener(Event.ENTER_FRAME, phoneringwaiting);
mader.gotoAndStop(1);
} else {
if ((((((mader is item31)) && ((tutorialsave[slotused] == false)))) && ((houseitemcommand[mader.nomor][i] == "SAVE")))){
mader.removeEventListener(Event.ENTER_FRAME, phoneringwaiting);
mader.gotoAndStop(1);
tutorialsave[slotused] = true;
};
};
createuipopup(houseitemcommand[mader.nomor][i], mader);
};
i++;
};
};
};
};
};
};
uipopuphealth = 2;
stage.addEventListener(MouseEvent.CLICK, resetuipopup);
}
public function removealluiimage(){
var i:*;
i = 0;
while (i < uiimage.length) {
removeChild(uiimage[i]);
uiimage[i] = null;
i++;
};
uiimage = [];
}
public function faintedok(e:Event):void{
soundclick.play(0, 1, new SoundTransform(volsfx));
charstat[slotused][4] = statmax;
charstat[slotused][5] = statmax;
charstat[slotused][6] = statmax;
charstat[slotused][7] = statmax;
if ((charstat[slotused][37] - 5) > charstat[slotused][1]){
charstat[slotused][37] = (charstat[slotused][37] - 5);
} else {
charstat[slotused][37] = (charstat[slotused][1] + 1);
};
if (charstat[slotused][37] <= 2){
charstat[slotused][37] = 2;
};
charstat[slotused][2] = (charstat[slotused][2] - hospitalfee);
if (charstat[slotused][2] < 0){
charstat[slotused][2] = 0;
};
if (currentLabel == "house"){
cleanuphouse();
} else {
if (currentLabel == "street"){
cleanupstreet();
} else {
if (currentLabel == "office"){
cleanupoffice();
} else {
if (currentLabel == "stadium"){
cleanupoffice();
} else {
if (currentLabel == "park"){
cleanuppark();
} else {
if (currentLabel == "cafe"){
cleanupcafe();
} else {
if (currentLabel == "townpark"){
cleanuptownpark();
};
};
};
};
};
};
};
transisi("relogger");
}
public function carrersuccessgood(e:MouseEvent):void{
soundclick.play(0, 1, new SoundTransform(volsfx));
mccareerlevelup.gotoAndStop(1);
charstat[slotused][26] = workcompletion;
cekwages();
charstat[slotused][24] = (charstat[slotused][24] + 1);
if (charstat[slotused][24] < 5){
charstat[slotused][25] = 0;
};
jobpercentage[slotused][charstat[slotused][23]] = 0;
}
public function createuipopup(texte:String, mader:Object){
var widthe:*;
var namee:*;
var i:*;
var jadie:*;
if (onfainted == false){
uiimage[uiimage.length] = new (ingameuipopup);
addChildAt(uiimage[(uiimage.length - 1)], (getChildIndex(mcuiposition) + 1));
uiimage[(uiimage.length - 1)].x = mader.x;
uiimage[(uiimage.length - 1)].y = (mader.y - 30);
trace(((("bwat di : " + uiimage[(uiimage.length - 1)].x) + " ") + uiimage[(uiimage.length - 1)].y));
if (uiimage.length > 1){
uiimage[(uiimage.length - 1)].y = (uiimage[(uiimage.length - 2)].y - 19);
};
uiimage[(uiimage.length - 1)].txt1.text = texte;
widthe = (uiimage[(uiimage.length - 1)].txt1.textWidth + 6);
uiimage[(uiimage.length - 1)].mcmask.width = widthe;
uiimage[(uiimage.length - 1)].mctip.x = ((0 - widthe) + 1);
uiimage[(uiimage.length - 1)].mcicon.visible = false;
uiimage[(uiimage.length - 1)].txt2.text = "";
if (currentLabel == "house"){
uiimage[(uiimage.length - 1)].ownerindex = mader.indexke;
} else {
if (((!((currentLabel == "house"))) && ((texte == "TALK")))){
trace("HM");
namee = mader.name;
namee = int(namee.charAt((namee.length - 1)));
if (currentLabel == "stadium"){
namee = (namee + 6);
} else {
if (currentLabel == "studio"){
namee = (namee + 3);
} else {
if (currentLabel == "street"){
namee = (namee + 9);
} else {
if (currentLabel == "cafe"){
namee = (namee + 9);
} else {
if (currentLabel == "townpark"){
namee = mader.currentFrame;
};
};
};
};
};
uiimage[(uiimage.length - 1)].npcno = namee;
uiimage[(uiimage.length - 1)].mcicon.visible = true;
uiimage[(uiimage.length - 1)].mcicon.gotoAndStop(3);
uiimage[(uiimage.length - 1)].txt2.text = relationshipcost[relationship[slotused][namee]];
};
};
uiimage[(uiimage.length - 1)].mcicon.x = (uiimage[(uiimage.length - 1)].mctip.x - 25);
uiimage[(uiimage.length - 1)].txt2.x = (uiimage[(uiimage.length - 1)].mctip.x - 50);
uiimage[(uiimage.length - 1)].mcicon.x = (uiimage[(uiimage.length - 1)].mctip.x - 20);
uiimage[(uiimage.length - 1)].txt2.x = (uiimage[(uiimage.length - 1)].mctip.x - 50);
if ((((((((((texte == "SPICY SPAGHETTI")) || ((texte == "SAUSAGE & BEAN")))) || ((texte == "CAESAR SALAD")))) || ((texte == "ROASTED CHICKEN")))) || ((texte == "TART CAKE")))){
i = 0;
while (i < cooklist.length) {
if (texte == cooklist[i]){
uiimage[(uiimage.length - 1)].mcicon.visible = true;
uiimage[(uiimage.length - 1)].mcicon.gotoAndStop(1);
uiimage[(uiimage.length - 1)].txt2.text = cookstock[i];
break;
};
i++;
};
} else {
if (texte == "ORDER A PIZZA"){
uiimage[(uiimage.length - 1)].mcicon.visible = true;
uiimage[(uiimage.length - 1)].mcicon.gotoAndStop(2);
uiimage[(uiimage.length - 1)].txt2.text = pizzacost;
} else {
if (texte == "ORDER FRIES"){
uiimage[(uiimage.length - 1)].mcicon.visible = true;
uiimage[(uiimage.length - 1)].mcicon.gotoAndStop(2);
uiimage[(uiimage.length - 1)].txt2.text = snackcost;
} else {
if (texte == "ORDER STEAK"){
uiimage[(uiimage.length - 1)].mcicon.visible = true;
uiimage[(uiimage.length - 1)].mcicon.gotoAndStop(2);
uiimage[(uiimage.length - 1)].txt2.text = steakcost;
} else {
if (texte == "CALL REPAIRMAN"){
uiimage[(uiimage.length - 1)].mcicon.visible = true;
uiimage[(uiimage.length - 1)].mcicon.gotoAndStop(2);
uiimage[(uiimage.length - 1)].txt2.text = repairmancost;
} else {
if ((((((((texte == "BUS TO WORK")) || ((texte == "BUS TO PARK")))) || ((texte == "BUS TO CAFE")))) || ((texte == "BUS TO TOWN PARK")))){
uiimage[(uiimage.length - 1)].mcicon.visible = true;
uiimage[(uiimage.length - 1)].mcicon.gotoAndStop(2);
uiimage[(uiimage.length - 1)].txt2.text = buscost;
} else {
if (texte == "GRAB A SNACK"){
uiimage[(uiimage.length - 1)].mcicon.visible = true;
uiimage[(uiimage.length - 1)].mcicon.gotoAndStop(2);
uiimage[(uiimage.length - 1)].txt2.text = snackcost;
} else {
if ((((texte == "HELP CLEANUP")) || ((texte == "EAT LEFTOVER")))){
namee = mader.name;
namee = int(namee.charAt((namee.length - 1)));
uiimage[(uiimage.length - 1)].tableke = namee;
} else {
i = 1;
while (i < foodstocklist.length) {
jadie = (("+" + foodstocklist[i]) + " STOCK");
if (texte == jadie){
uiimage[(uiimage.length - 1)].mcicon.visible = true;
uiimage[(uiimage.length - 1)].mcicon.gotoAndStop(2);
uiimage[(uiimage.length - 1)].txt2.text = (foodstocklist[i] * foodstockprice);
break;
};
i++;
};
};
};
};
};
};
};
};
};
uiimage[(uiimage.length - 1)].removeEventListener(MouseEvent.MOUSE_OVER, tipover);
uiimage[(uiimage.length - 1)].addEventListener(MouseEvent.MOUSE_OVER, tipover);
uiimage[(uiimage.length - 1)].removeEventListener(MouseEvent.MOUSE_OUT, tipout);
uiimage[(uiimage.length - 1)].addEventListener(MouseEvent.MOUSE_OUT, tipout);
uiimage[(uiimage.length - 1)].removeEventListener(MouseEvent.MOUSE_OVER, oversound);
uiimage[(uiimage.length - 1)].addEventListener(MouseEvent.MOUSE_OVER, oversound);
uiimage[(uiimage.length - 1)].removeEventListener(MouseEvent.CLICK, uipopupclick);
uiimage[(uiimage.length - 1)].addEventListener(MouseEvent.CLICK, uipopupclick);
};
}
public function loadjoblist(){
speedtime = 1;
loadspeedsymbol();
pausegame = true;
mcjob.gotoAndStop(2);
loadgambarjobuntuk(mcjob.mc1, mcjob.ke);
mcjob.btnnext.removeEventListener(MouseEvent.MOUSE_OVER, oversound);
mcjob.btnnext.addEventListener(MouseEvent.MOUSE_OVER, oversound);
mcjob.btnnext.removeEventListener(MouseEvent.CLICK, jobnext);
mcjob.btnnext.addEventListener(MouseEvent.CLICK, jobnext);
mcjob.btnapply.removeEventListener(MouseEvent.MOUSE_OVER, oversound);
mcjob.btnapply.addEventListener(MouseEvent.MOUSE_OVER, oversound);
mcjob.btnapply.removeEventListener(MouseEvent.CLICK, jobapply);
mcjob.btnapply.addEventListener(MouseEvent.CLICK, jobapply);
mcjob.btnback.removeEventListener(MouseEvent.MOUSE_OVER, oversound);
mcjob.btnback.addEventListener(MouseEvent.MOUSE_OVER, oversound);
mcjob.btnback.removeEventListener(MouseEvent.CLICK, jobback);
mcjob.btnback.addEventListener(MouseEvent.CLICK, jobback);
}
public function preloaderyay(event:MouseEvent):void{
gotoAndPlay("preloader2");
stage.removeEventListener(Event.ENTER_FRAME, loading);
}
public function loadtutorial(ke:String){
speedtime = 1;
mctutorial.txt1.mouseEnabled = false;
soundtutorial.play(0, 1, new SoundTransform(volsfx));
pausegame = true;
tutorialindex = 0;
mctutorial.gotoAndStop(ke);
mctutorial.btnskip.visible = true;
mctutorial.ke = ke;
if (ke == "life"){
mctutorial.texte = tutoriallifetext;
} else {
if (ke == "desire"){
mctutorial.texte = tutorialdesiretext;
} else {
if ((((ke == "phone")) || ((ke == "save")))){
mctutorial.texte = ["Better answer that phone!"];
} else {
if (ke == "job"){
mctutorial.texte = tutorialjobtext;
} else {
if (ke == "shop"){
mctutorial.texte = tutorialshoptext;
} else {
if (ke == "shop2"){
mctutorial.texte = tutorialshop2text;
} else {
if (ke == "jobtime"){
mctutorial.texte = tutorialjobtimetext;
} else {
if (ke == "firstdayjob"){
mctutorial.texte = tutorialfirstdayjobtext;
};
};
};
};
};
};
};
};
settextvertical(mctutorial.texte[tutorialindex], mctutorial, 78.8);
mctutorial.mctxt.gotoAndPlay(2);
mctutorial.buttonMode = true;
mctutorial.btn1.addEventListener(MouseEvent.CLICK, tutorialclick);
mctutorial.btnskip.addEventListener(MouseEvent.CLICK, tutorialskip);
}
public function relationshipclick(e:MouseEvent):void{
var namee:*;
var texte:*;
soundclick.play(0, 1, new SoundTransform(volsfx));
trace("RELATIONSHIP CLICK");
cleanupeffectimage();
removealluiimage();
if (currentLabel == "office"){
resetofficeusage();
} else {
if (currentLabel == "studio"){
resetstudiousage();
} else {
if (currentLabel == "stadium"){
resetstadiumusage();
} else {
if (currentLabel == "cafe"){
resetcafeusage();
charimage[0].tableke = -1;
charimage[0].timee = -1;
charimage[0].timeetemp = -1;
charimage[0].stat = "";
};
};
};
};
namee = e.currentTarget.name;
namee = int(namee.charAt((namee.length - 1)));
if (currentLabel == "stadium"){
namee = (namee + 6);
} else {
if (currentLabel == "studio"){
namee = (namee + 3);
} else {
if (currentLabel == "street"){
namee = (namee + 9);
} else {
if (currentLabel == "cafe"){
namee = (namee + 9);
} else {
if (currentLabel == "townpark"){
namee = e.currentTarget.currentFrame;
};
};
};
};
};
charimage[0].stat = "idle";
charimage[0].visible = true;
trace(("CEK RELATION : " + relationship[slotused]));
trace(("ORG KE : " + namee));
trace(((("CEK : " + charstat[slotused][31]) + " ") + relationshipcost[relationship[slotused][namee]]));
if (relationship[slotused][namee] >= 4){
cleanupeffectimage();
createtext("Relationship level maximum!");
} else {
if (charstat[slotused][31] < relationshipcost[relationship[slotused][namee]]){
cleanupeffectimage();
createtext("I need Star coins to talk.");
} else {
if ((((((relationship[slotused][namee] < 4)) && ((charstat[slotused][31] > 0)))) && ((charstat[slotused][6] > hygienemin)))){
uipopuphealth = 2;
stage.addEventListener(MouseEvent.CLICK, resetuipopup);
createuipopup("TALK", e.currentTarget);
} else {
if (charstat[slotused][6] <= hygienemin){
soundtext.play(0, 1, new SoundTransform(volsfx));
effectimage[effectimage.length] = new (textui);
addChildAt(effectimage[(effectimage.length - 1)], getChildIndex(mceffectposition));
effectimage[(effectimage.length - 1)].indexke = (effectimage.length - 1);
texte = ["Err…Maybe next time.", "I'm busy.", "*Cough cough!"];
settextvertical(texte[randRange(0, (texte.length - 1))], effectimage[(effectimage.length - 1)], -107.1);
effectimage[(effectimage.length - 1)].x = e.currentTarget.x;
effectimage[(effectimage.length - 1)].y = e.currentTarget.y;
trace(e.currentTarget);
effectimage[(effectimage.length - 1)].awal = 0;
effectimage[(effectimage.length - 1)].mouseChildren = false;
effectimage[(effectimage.length - 1)].mouseEnabled = false;
effectimage[(effectimage.length - 1)].btnclose.removeEventListener(MouseEvent.CLICK, textclose);
effectimage[(effectimage.length - 1)].btnclose.addEventListener(MouseEvent.CLICK, textclose);
effectimage[(effectimage.length - 1)].addEventListener(Event.ENTER_FRAME, effectwaiting);
};
};
};
};
stage.removeEventListener(MouseEvent.CLICK, resetuipopup);
uipopuphealth = 2;
stage.addEventListener(MouseEvent.CLICK, resetuipopup);
}
public function jobback(e:MouseEvent):void{
soundclick.play(0, 1, new SoundTransform(volsfx));
pausegame = false;
mcjob.gotoAndStop(1);
cekphoneringing();
}
public function townparkbookclick(e:MouseEvent):void{
var namee:*;
soundclick.play(0, 1, new SoundTransform(volsfx));
cleanupeffectimage();
removealluiimage();
uipopuphealth = 2;
stage.addEventListener(MouseEvent.CLICK, resetuipopup);
namee = e.currentTarget.name;
namee = namee.charAt((namee.length - 1));
createuipopup("READ NEWSPAPER", e.currentTarget);
}
public function loadstudio(){
var tipeobj:*;
var i:*;
var obj:*;
if (tutorialfirstdayjob[slotused] == false){
loadtutorial("firstdayjob");
};
btnexitstudio.visible = true;
btnexitstudio.removeEventListener(MouseEvent.MOUSE_OVER, oversound);
btnexitstudio.addEventListener(MouseEvent.MOUSE_OVER, oversound);
btnexitstudio.removeEventListener(MouseEvent.CLICK, exitstudio);
btnexitstudio.addEventListener(MouseEvent.CLICK, exitstudio);
createchar();
mcclock.txt3.text = daylist[ambilharikerja()];
loadspeedsymbol();
loaduistat();
hitungenviro();
workcompletion = 100;
charstat[slotused][26] = workcompletion;
tipeobj = [undefined];
i = 1;
while (i <= 3) {
obj = getChildByName(("btn" + i));
obj.removeEventListener(MouseEvent.MOUSE_OVER, oversound);
obj.addEventListener(MouseEvent.MOUSE_OVER, oversound);
obj.removeEventListener(MouseEvent.CLICK, relationshipclick);
obj.addEventListener(MouseEvent.CLICK, relationshipclick);
obj = null;
i++;
};
resetstudiousage();
mcmic.buttonMode = true;
mcmic.addEventListener(MouseEvent.MOUSE_OVER, objectover);
mcmic.addEventListener(MouseEvent.MOUSE_OUT, objectout);
mcsofa.buttonMode = true;
mcsofa.addEventListener(MouseEvent.MOUSE_OVER, objectover);
mcsofa.addEventListener(MouseEvent.MOUSE_OUT, objectout);
mcmic.removeEventListener(MouseEvent.MOUSE_OVER, oversound);
mcmic.addEventListener(MouseEvent.MOUSE_OVER, oversound);
mcmic.removeEventListener(MouseEvent.CLICK, studiomic);
mcmic.addEventListener(MouseEvent.CLICK, studiomic);
btntoilet.removeEventListener(MouseEvent.MOUSE_OVER, oversound);
btntoilet.addEventListener(MouseEvent.MOUSE_OVER, oversound);
btntoilet.removeEventListener(MouseEvent.CLICK, toiletclick);
btntoilet.addEventListener(MouseEvent.CLICK, toiletclick);
btndrink.removeEventListener(MouseEvent.MOUSE_OVER, oversound);
btndrink.addEventListener(MouseEvent.MOUSE_OVER, oversound);
btndrink.removeEventListener(MouseEvent.CLICK, drinkclick);
btndrink.addEventListener(MouseEvent.CLICK, drinkclick);
mcsofa.removeEventListener(MouseEvent.MOUSE_OVER, oversound);
mcsofa.addEventListener(MouseEvent.MOUSE_OVER, oversound);
mcsofa.removeEventListener(MouseEvent.CLICK, sofaclick);
mcsofa.addEventListener(MouseEvent.CLICK, sofaclick);
cekstatusadd();
stage.addEventListener(Event.ENTER_FRAME, gamewaiting);
trace(("BERAPA : " + charstat[slotused][25]));
if (charstat[slotused][24] < 5){
if ((((charstat[slotused][25] >= jobprogperlevel)) && ((charstat[slotused][11] >= jobrelationreq[charstat[slotused][24]])))){
speedtime = 1;
mcuistat.visible = false;
pausegame = true;
loadcarrerpromotion();
charimage[0].visible = false;
mcmic.gotoAndStop(2);
mcmic.buttonMode = false;
mcmic.removeEventListener(MouseEvent.MOUSE_OVER, objectover);
mcmic.removeEventListener(MouseEvent.MOUSE_OUT, objectout);
mcmic.removeEventListener(MouseEvent.MOUSE_OVER, oversound);
mcmic.removeEventListener(MouseEvent.CLICK, studiomic);
mcclock.visible = false;
i = 1;
while (i <= 3) {
obj = getChildByName(("mcnews" + i));
if (obj != null){
obj.gotoAndStop(1);
};
i++;
};
} else {
soundchannel4 = soundwork.play(0, 999, new SoundTransform(volbgm));
};
} else {
soundchannel4 = soundwork.play(0, 999, new SoundTransform(volbgm));
};
}
public function loadrelationship(ke:int){
var untuk:*;
var i:*;
var obj:*;
cleanupeffectimage();
removealluiimage();
if (currentLabel == "office"){
resetofficeusage();
} else {
if (currentLabel == "studio"){
resetstudiousage();
} else {
if (currentLabel == "stadium"){
resetstadiumusage();
};
};
};
speedtime = 1;
loadspeedsymbol();
trace(("UNTUK NPC KE : " + ke));
untuk = (relationship[slotused][ke] + 1);
trace(("yang sukses : " + relationpreferences[ke][untuk]));
trace(("isie : " + relationshipoption[ke]));
mcrelationship.gotoAndStop(2);
mcrelationship.ke = ke;
mcrelationship.mcthumb.gotoAndStop(ke);
mcrelationship.txt1.text = untuk;
if (relationshipgender[ke] == 1){
soundtalk1.play(0, 1, new SoundTransform(volsfx));
} else {
soundtalk2.play(0, 1, new SoundTransform(volsfx));
};
mcrelationship.txtname.text = relationshipname[ke];
mcrelationship.txtstat.text = relationshipstat[untuk];
mcrelationship.txtstat.textColor = relationshipcolor[untuk];
mcrelationship.btnback.removeEventListener(MouseEvent.MOUSE_OVER, oversound);
mcrelationship.btnback.addEventListener(MouseEvent.MOUSE_OVER, oversound);
mcrelationship.btnback.removeEventListener(MouseEvent.CLICK, relationshipback);
mcrelationship.btnback.addEventListener(MouseEvent.CLICK, relationshipback);
untuk = (relationship[slotused][mcrelationship.ke] + 1);
ke = relationpreferences[mcrelationship.ke][untuk];
settextvertical(relationshiphint[ke][randRange(0, (relationshiphint[ke].length - 1))], mcrelationship.mctxt, -107.1);
mcrelationship.mctxt.gotoAndPlay(2);
soundtext.play(0, 1, new SoundTransform(volsfx));
mcrelationship.mctxt.btnclose.removeEventListener(MouseEvent.CLICK, textcloserelationship);
mcrelationship.mctxt.btnclose.addEventListener(MouseEvent.CLICK, textcloserelationship);
i = 1;
while (i <= 4) {
obj = mcrelationship.getChildByName(("mc" + i));
obj.mc1.gotoAndStop(relationshipoption[untuk][i]);
obj.mc2.mc1.gotoAndStop(2);
trace(((("isi data : " + ke) + " ") + untuk));
if (relationshiphistory[slotused][mcrelationship.ke][untuk][i] == -1){
obj.mc2.mc1.gotoAndStop(1);
obj.mc2.gotoAndStop("done");
} else {
obj.mc2.gotoAndStop(1);
obj.removeEventListener(MouseEvent.MOUSE_OVER, oversound);
obj.addEventListener(MouseEvent.MOUSE_OVER, oversound);
obj.removeEventListener(MouseEvent.CLICK, relationshipchoose);
obj.addEventListener(MouseEvent.CLICK, relationshipchoose);
};
i++;
};
}
public function createnewlocalforthis(ke:int){
var i:*;
var j:*;
charstat[ke] = [-1, 1, startgold, statmax, statmax, statmax, statmax, statmax, 0, 0, 0, 0, 0, 3, 3, "", 0, 0, 0, 5, 0, 1, false, 0, 0, 0, 0, 0, maxage, 0, 0, 0, -1, 0, 0, -1, -1, 0, 0];
houseitems[ke] = [];
refrigeratorstock[ke] = [];
tablecounterslot[ke] = [];
trashbinslot[ke] = [];
investment[ke] = [];
relationship[ke] = [undefined, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
crowd[ke] = [];
tutoriallife[ke] = [];
tutorialjob[ke] = [];
tutorialsave[ke] = [];
tutorialdesire[ke] = [];
tutorialshoptime[ke] = 2;
tutorialshop[ke] = [];
cafe[ke] = [undefined, 1, 1, 1];
cafereload[ke] = 4;
townparkperson[ke] = [undefined, 0, 0, 0, 0];
relationshiphistory[ke] = [];
i = 1;
while (i < relationpreferences.length) {
relationshiphistory[ke][i] = [];
j = 1;
while (j <= 4) {
relationshiphistory[ke][i][j] = [undefined, 0, 0, 0, 0];
j++;
};
i++;
};
i = 0;
while (i < housesize[charstat[ke][13]]) {
houseitems[ke][i] = [];
j = 0;
while (j < housesize[charstat[ke][13]]) {
houseitems[ke][i][j] = -1;
j++;
};
i++;
};
i = 1;
while (i <= 2) {
crowd[ke][i] = [undefined, -1, -1, -1];
i++;
};
tutoriallife[ke] = false;
tutorialjob[ke] = false;
tutorialsave[ke] = false;
tutorialdesire[ke] = false;
tutorialshoptime[ke] = 2;
tutorialshop[ke] = false;
donefirstjob[ke] = false;
promostat[ke] = [];
jobreached[ke] = [undefined, 0, 0, 0];
jobpercentage[ke] = [undefined, 0, 0, 0];
startup[ke] = startupdefault;
tutorialjobtime[ke] = false;
tutorialfirstdayjob[ke] = false;
}
public function stadiumtestkeywaiting(e:Event):void{
var i:*;
var obj:*;
var ada:*;
var j:*;
var imagee:*;
mcstadiumtest.mcchar1.x = (mcstadiumtest.mcchar1.x - (speedx / 2));
mcstadiumtest.mcchar1.y = (mcstadiumtest.mcchar1.y + (speedy / 2));
mcstadiumtest.mcshadow.x = mcstadiumtest.mcchar1.x;
mcstadiumtest.mcshadow.y = mcstadiumtest.mcchar1.y;
i = 1;
while (i <= 4) {
obj = mcstadiumtest.getChildByName(("mcobstacle" + i));
if ((((((((obj.visible == true)) && ((mcstadiumtest.mcchar1.mchit.hitTestObject(obj.mchit) == true)))) && ((i == mcstadiumtest.mcchar1.posisi)))) && ((mcstadiumtest.mcchar1.currentLabel == "run")))){
ada = false;
j = 0;
while (j < stadiumdonejump.length) {
if (stadiumdonejump[j] == i){
ada = true;
break;
};
j++;
};
if (ada == false){
soundfall.play(0, 1, new SoundTransform(volsfx));
stadiumdonejump[stadiumdonejump.length] = i;
mcstadiumtest.mcchar1.gotoAndPlay("fall");
};
} else {
if ((((((((obj.visible == true)) && ((mcstadiumtest.mcchar1.mchit.hitTestObject(obj.mchit) == true)))) && ((i == mcstadiumtest.mcchar1.posisi)))) && ((mcstadiumtest.mcchar1.currentLabel == "jump")))){
ada = false;
j = 0;
while (j < stadiumdonejump.length) {
if (stadiumdonejump[j] == i){
ada = true;
break;
};
j++;
};
if (ada == false){
createsparkle(obj);
stadiumdonejump[stadiumdonejump.length] = i;
stadiumtestjumpneeded++;
};
};
};
i++;
};
stadiumsorttime--;
if (stadiumsorttime <= 0){
stadiumsorttime = stadiumsorttimetemp;
imagee = [];
i = 1;
while (i <= 4) {
obj = mcstadiumtest.getChildByName(("mcobstacle" + i));
imagee[imagee.length] = {obje:obj, ye:obj.y};
i++;
};
imagee[imagee.length] = {obje:mcstadiumtest.mcchar1, ye:obj.y};
imagee.sortOn("ye", Array.NUMERIC);
i = 0;
while (i < imagee.length) {
mcstadiumtest.addChildAt(imagee[i].obje, mcstadiumtest.getChildIndex(mcstadiumtest.mceffectposition));
i++;
};
imagee = [];
};
stadiumtesttime--;
mcstadiumtest.mc1.width = ((stadiumtestjumpneeded / stadiumtestjumplist[charstat[slotused][24]]) * 114);
mcstadiumtest.txttime.text = int((stadiumtesttime / 25));
if (mcstadiumtest.mcchar1.y > ((stadiumposawaly + (mcstadiumtest.mcchar1.posisi * stadiumtambay)) + 80)){
if (stadiumtestjumpneeded >= stadiumtestjumplist[charstat[slotused][24]]){
stadiumtesttime = 0;
} else {
mcstadiumtest.mcchar1.x = (stadiumposawalx + (stadiumtambax * (mcstadiumtest.mcchar1.posisi - 1)));
mcstadiumtest.mcchar1.y = (stadiumposawaly + (stadiumtambay * (mcstadiumtest.mcchar1.posisi - 1)));
stadiumdonejump = [];
createobstacleposition();
};
};
if (stadiumtesttime <= 0){
mcstadiumtest.gotoAndStop(1);
stage.removeEventListener(KeyboardEvent.KEY_DOWN, stadiumtestkeyup);
stage.removeEventListener(Event.ENTER_FRAME, stadiumtestkeywaiting);
charstat[slotused][19] = jobto;
charstat[slotused][20] = 0;
timejam = jobto;
timemenit = 0;
charstat[slotused][33] = (24 - jobto);
if (stadiumtestjumpneeded >= stadiumtestjumplist[charstat[slotused][24]]){
createsuccesscareer();
trace("SUCCESS");
} else {
createfailedcareer();
trace("FAILED");
};
};
}
public function relationshipchoose(e:MouseEvent):void{
var namee:*;
var i:*;
var untuk:*;
var obj:*;
namee = e.currentTarget.name;
namee = namee.charAt((namee.length - 1));
i = 1;
while (i <= 4) {
obj = mcrelationship.getChildByName(("mc" + i));
obj.removeEventListener(MouseEvent.CLICK, relationshipchoose);
i++;
};
relationindex = 1;
untuk = (relationship[slotused][mcrelationship.ke] + 1);
trace(("yang sukses : " + relationpreferences[mcrelationship.ke][untuk]));
if (e.currentTarget.mc1.currentFrame == relationpreferences[mcrelationship.ke][untuk]){
soundyes.play(0, 1, new SoundTransform(volsfx));
if (relationship[slotused][mcrelationship.ke] < 4){
if ((((armor == true)) && ((AGIconnected == true)))){
so.data.goodfriend = 1;
cekquestdone();
};
charstat[slotused][11] = (charstat[slotused][11] + 1);
relationship[slotused][mcrelationship.ke] = (relationship[slotused][mcrelationship.ke] + 1);
relationshipincrease = true;
relationfxtime = 0;
e.currentTarget.mc2.mc1.gotoAndStop(2);
e.currentTarget.mc2.gotoAndPlay(2);
e.currentTarget.addEventListener(Event.ENTER_FRAME, relationshipwaiting);
};
} else {
trace(((((("erroe data : " + mcrelationship.ke) + " ") + untuk) + " ") + namee));
soundno.play(0, 1, new SoundTransform(volsfx));
relationshiphistory[slotused][mcrelationship.ke][untuk][namee] = -1;
e.currentTarget.mc2.mc1.gotoAndStop(1);
e.currentTarget.mc2.gotoAndPlay(2);
e.currentTarget.addEventListener(Event.ENTER_FRAME, relationshipwaiting);
};
}
public function loadsoundsetting(){
if ((((volbgm == 1)) && ((bgmon == true)))){
btnmusic.gotoAndStop(1);
} else {
if ((((volbgm == 0)) && ((bgmon == false)))){
btnmusic.gotoAndStop(2);
};
};
if ((((volsfx == 1)) && ((sfxon == true)))){
btnsfx.gotoAndStop(1);
} else {
if ((((volsfx == 0)) && ((sfxon == false)))){
btnsfx.gotoAndStop(2);
};
};
btnmusic.removeEventListener(MouseEvent.MOUSE_OVER, oversound);
btnmusic.addEventListener(MouseEvent.MOUSE_OVER, oversound);
btnmusic.removeEventListener(MouseEvent.CLICK, musicmute);
btnmusic.addEventListener(MouseEvent.CLICK, musicmute);
btnsfx.removeEventListener(MouseEvent.MOUSE_OVER, oversound);
btnsfx.addEventListener(MouseEvent.MOUSE_OVER, oversound);
btnsfx.removeEventListener(MouseEvent.CLICK, sfxmute);
btnsfx.addEventListener(MouseEvent.CLICK, sfxmute);
}
public function cleanupoffice(){
var j:*;
trace("a");
if (soundchannel4 != null){
soundchannel4.stop();
soundchannel4 = null;
};
pausegame = false;
trace("b");
j = 0;
while (j < charimage.length) {
charimage[j].removeEventListener(Event.ENTER_FRAME, repairmanwaiting);
removeChild(charimage[j]);
charimage[j] = null;
j++;
};
trace("c");
j = 0;
while (j < coinimage.length) {
mcwages.removeChild(coinimage[j]);
coinimage[j] = null;
j++;
};
coinimage = [];
trace("d");
cleanupeffectimage();
trace("e");
removealluiimage();
trace("f");
stage.removeEventListener(Event.ENTER_FRAME, gamewaiting);
trace("g");
mcrelationship.mc1.removeEventListener(Event.ENTER_FRAME, relationshipwaiting);
mcrelationship.mc2.removeEventListener(Event.ENTER_FRAME, relationshipwaiting);
mcrelationship.mc3.removeEventListener(Event.ENTER_FRAME, relationshipwaiting);
mcrelationship.mc4.removeEventListener(Event.ENTER_FRAME, relationshipwaiting);
trace("h");
stage.removeEventListener(Event.ENTER_FRAME, wageswaiting);
stage.removeEventListener(MouseEvent.CLICK, skipwages);
stage.removeEventListener(Event.ENTER_FRAME, faintedwaiting);
stage.removeEventListener(KeyboardEvent.KEY_UP, officetestkeyup);
stage.removeEventListener(Event.ENTER_FRAME, officetestkeywaiting);
stage.removeEventListener(Event.ENTER_FRAME, careerfailedwaiting);
stage.removeEventListener(KeyboardEvent.KEY_DOWN, studiotestkeyup);
stage.removeEventListener(Event.ENTER_FRAME, studiotestkeywaiting);
}
public function finalstatwaiting(e:Event):void{
mcover.x = mouseX;
mcover.y = mouseY;
}
public function mmdeleteok(e:MouseEvent):void{
soundpaper.play(0, 1, new SoundTransform(volsfx));
mcmainmenu.mcoption.visible = false;
createnewlocalforthis(mcmainmenu.mcoption.ke);
savegame();
trace(("CEK : " + startup));
loadslot();
}
public function houseclick(e:MouseEvent):void{
var namee:*;
var i:*;
var obj:*;
soundclick.play(0, 1, new SoundTransform(volsfx));
namee = e.currentTarget.name;
namee = namee.charAt((namee.length - 1));
if ((((charstat[slotused][2] >= houseprice[namee])) && (!((doneselecthouse == namee))))){
prizetaken = isie[namee];
doneselecthouse = namee;
i = 1;
while (i <= 3) {
obj = mcinput.mc2.getChildByName(("mc" + i));
obj.mcapproved.gotoAndStop(1);
i++;
};
if (charstat[slotused][0] == -1){
uwangetotal = (startgold - houseprice[namee]);
} else {
uwangetotal = (charstat[slotused][2] - houseprice[namee]);
};
soundyes.play(0, 1, new SoundTransform(volsfx));
mcinput.mc2.txt1.text = uwangetotal;
e.currentTarget.mcapproved.gotoAndPlay(2);
};
}
public function resetuipopup(event:MouseEvent):void{
trace(("kurangi :" + uipopuphealth));
uipopuphealth--;
if (uipopuphealth <= 0){
stage.removeEventListener(MouseEvent.CLICK, resetuipopup);
removealluiimage();
cekphoneringing();
};
}
public function setcharstadiumposition(amount:Number){
mcstadiumtest.mcchar1.x = (mcstadiumtest.mcchar1.x + (stadiumtambax * amount));
mcstadiumtest.mcchar1.y = (mcstadiumtest.mcchar1.y + (stadiumtambay * amount));
}
public function clickGoodyFB(event:MouseEvent):void{
var request:URLRequest;
soundclick.play(0, 1, new SoundTransform(volsfx));
request = new URLRequest("https://www.facebook.com/goodygameworks");
navigateToURL(request);
}
public function ceklight(){
var dark:*;
var i:*;
var j:*;
dark = 0;
if (onnight == true){
dark = 1;
};
if (currentLabel == "house"){
i = 0;
while (i < housesize[charstat[slotused][13]]) {
j = 0;
while (j < housesize[charstat[slotused][13]]) {
if (dark == 1){
tileimage[i][j].gotoAndStop(2);
} else {
tileimage[i][j].gotoAndStop(1);
};
j++;
};
i++;
};
};
trace("1");
if (dark == 1){
charimage[0].onlight = false;
charimage[0].transform.colorTransform = colordark;
} else {
charimage[0].onlight = true;
charimage[0].transform.colorTransform = colornormal;
};
trace("2");
i = 0;
while (i < objectimage.length) {
if (objectimage[i].namee != "LAMP"){
if (dark == 1){
objectimage[i].transform.colorTransform = colordark;
} else {
objectimage[i].transform.colorTransform = colornormal;
};
};
i++;
};
i = 0;
while (i < wallimage.length) {
if (dark == 1){
wallimage[i].transform.colorTransform = colordark;
} else {
wallimage[i].transform.colorTransform = colornormal;
};
i++;
};
}
public function mmback(e:MouseEvent):void{
soundclick.play(0, 1, new SoundTransform(volsfx));
mcmainmenu.btnplay.visible = true;
mcmainmenu.btncredits.visible = true;
mcmainmenu.btnslot1.visible = false;
mcmainmenu.btnslot2.visible = false;
mcmainmenu.btnback.visible = false;
}
public function tableclick(e:MouseEvent):void{
var namee:*;
soundclick.play(0, 1, new SoundTransform(volsfx));
cleanupeffectimage();
removealluiimage();
uipopuphealth = 2;
stage.addEventListener(MouseEvent.CLICK, resetuipopup);
namee = e.currentTarget.name;
namee = namee.charAt((namee.length - 1));
if (cafe[slotused][namee] == 1){
createuipopup("HELP CLEANUP", e.currentTarget);
} else {
if (cafe[slotused][namee] == 2){
createuipopup("EAT LEFTOVER", e.currentTarget);
};
};
}
public function createitemfollow(nomor:int, tipe:int){
removeallobjectfunction(true);
validplacement = false;
uiimage[uiimage.length] = new (linkage[nomor][tipe]);
addChildAt(uiimage[(uiimage.length - 1)], getChildIndex(mcshopposition));
uiimage[(uiimage.length - 1)].x = mouseX;
uiimage[(uiimage.length - 1)].y = mouseY;
uiimage[(uiimage.length - 1)].nomor = nomor;
uiimage[(uiimage.length - 1)].tipe = tipe;
uiimage[(uiimage.length - 1)].mouseChildren = false;
uiimage[(uiimage.length - 1)].mouseEnabled = false;
if (uiimage[(uiimage.length - 1)].mcstink != null){
uiimage[(uiimage.length - 1)].mcstink.visible = false;
};
if (houseitemhp[nomor] != -1){
uiimage[(uiimage.length - 1)].mcbroken.visible = false;
};
trace(("NAMAE : " + houseitemname[nomor][tipe]));
if ((((houseitemname[nomor][tipe] == "TABLE")) || ((houseitemname[nomor][tipe] == "COUNTER")))){
uiimage[(uiimage.length - 1)].mcplate1.visible = false;
uiimage[(uiimage.length - 1)].mcplate2.visible = false;
} else {
if (houseitemname[nomor][tipe] == "TRASH BIN"){
uiimage[(uiimage.length - 1)].mcfly.visible = false;
} else {
if (houseitemname[nomor][tipe] == "OVEN"){
trace("SEMBUNYI");
uiimage[(uiimage.length - 1)].mckettle.visible = false;
uiimage[(uiimage.length - 1)].mckettle.gotoAndStop(1);
};
};
};
if (mcpositioning.currentFrame == 1){
onshop = true;
mcbuildmode.mc1.visible = true;
mcbuildmode.mc1.txt1.text = "SPACE to rotate.\nESC to cancel.";
} else {
onbuild = true;
mcbuildmode.mc1.visible = true;
mcbuildmode.mc1.txt1.text = (("SPACE to rotate.\nESC to cancel.\nDELETE or [D] to sell for " + int((houseitemprice[nomor] / 2))) + " coins.");
mcbuildmode.mc1.price = int((houseitemprice[nomor] / 2));
};
pausegame = true;
stage.addEventListener(Event.ENTER_FRAME, furniturefollowwaiting);
}
public function loadinput(){
var i:*;
var pjge:*;
var obj:*;
soundpaper.play(0, 1, new SoundTransform(volsfx));
if (mcinput.page == 1){
stage.focus = mcinput.mc1.txt1;
pjge = mcinput.mc1.txt1.text;
pjge = pjge.length;
mcinput.mc1.txt1.setSelection(0, pjge);
};
if (charstat[slotused][0] == -1){
mcinput.mc1.txt2.text = "Family of Goody.";
} else {
mcinput.mc1.txt2.text = ("Family of " + charstat[slotused][15]);
};
mcinput.mc1.txt3.text = ((((((adresslist1[adressindex1] + " ") + adresslist2[adressindex2]) + " ") + adressindex3) + "") + adressindex4);
mcinput.mc1.mcstat1.mc1.gotoAndStop(6);
mcinput.mc1.mcstat2.mc1.gotoAndStop(7);
mcinput.mc1.mcstat3.mc1.gotoAndStop(8);
mcinput.mc1.mcstat1.mc2.gotoAndStop(6);
mcinput.mc1.mcstat2.mc2.gotoAndStop(7);
mcinput.mc1.mcstat3.mc2.gotoAndStop(8);
mcinput.mc1.mcstat1.statke = 6;
mcinput.mc1.mcstat2.statke = 7;
mcinput.mc1.mcstat3.statke = 8;
mcinput.mc1.mcstat1.txt1.text = charstat[slotused][16];
mcinput.mc1.mcstat2.txt1.text = charstat[slotused][17];
mcinput.mc1.mcstat3.txt1.text = charstat[slotused][18];
i = 1;
while (i <= 3) {
obj = mcinput.mc1.getChildByName(("mcstat" + i));
obj.buttonMode = true;
obj.removeEventListener(MouseEvent.MOUSE_OVER, oversound);
obj.addEventListener(MouseEvent.MOUSE_OVER, oversound);
obj.removeEventListener(MouseEvent.MOUSE_OVER, statover);
obj.addEventListener(MouseEvent.MOUSE_OVER, statover);
obj.removeEventListener(MouseEvent.MOUSE_OUT, statout);
obj.addEventListener(MouseEvent.MOUSE_OUT, statout);
i++;
};
i = 1;
while (i <= 3) {
obj = mcinput.mc2.getChildByName(("mc" + i));
obj.buttonMode = true;
obj.mc1.txt1.text = houseprice[i];
obj.mc2.txt1.text = houseprice[i];
obj.removeEventListener(MouseEvent.MOUSE_OVER, oversound);
obj.addEventListener(MouseEvent.MOUSE_OVER, oversound);
obj.removeEventListener(MouseEvent.MOUSE_OVER, houseover);
obj.addEventListener(MouseEvent.MOUSE_OVER, houseover);
obj.removeEventListener(MouseEvent.MOUSE_OUT, houseout);
obj.addEventListener(MouseEvent.MOUSE_OUT, houseout);
obj.removeEventListener(MouseEvent.CLICK, houseclick);
obj.addEventListener(MouseEvent.CLICK, houseclick);
i++;
};
mcinput.mc2.txt1.text = uwangetotal;
mcinput.mc3.btngood.removeEventListener(MouseEvent.MOUSE_OVER, oversound);
mcinput.mc3.btngood.addEventListener(MouseEvent.MOUSE_OVER, oversound);
mcinput.mc3.btngood.removeEventListener(MouseEvent.CLICK, inputgood);
mcinput.mc3.btngood.addEventListener(MouseEvent.CLICK, inputgood);
mcinput.btnprev.removeEventListener(MouseEvent.MOUSE_OVER, oversound);
mcinput.btnprev.addEventListener(MouseEvent.MOUSE_OVER, oversound);
mcinput.btnnext.removeEventListener(MouseEvent.MOUSE_OVER, oversound);
mcinput.btnnext.addEventListener(MouseEvent.MOUSE_OVER, oversound);
mcinput.btnprev.removeEventListener(MouseEvent.CLICK, previnput);
mcinput.btnprev.addEventListener(MouseEvent.CLICK, previnput);
mcinput.btnnext.removeEventListener(MouseEvent.CLICK, nextinput);
mcinput.btnnext.addEventListener(MouseEvent.CLICK, nextinput);
currentname = mcinput.mc1.txt1.text;
stage.addEventListener(KeyboardEvent.KEY_DOWN, naminginput);
cekinputprev();
}
public function exitstreet(e:MouseEvent):void{
soundclick.play(0, 1, new SoundTransform(volsfx));
gohome();
}
public function cektutorialdone(){
if (mctutorial.ke == "life"){
tutoriallife[slotused] = true;
mcuistat.tabindex--;
loaduistat();
cekphoneringing();
} else {
if (mctutorial.ke == "desire"){
tutorialdesire[slotused] = true;
} else {
if (mctutorial.ke == "job"){
tutorialjob[slotused] = true;
cekphoneringing();
} else {
if (mctutorial.ke == "shop"){
tutorialshop[slotused] = true;
} else {
if (mctutorial.ke == "shop2"){
tutorialshop2[slotused] = true;
} else {
if (mctutorial.ke == "jobtime"){
tutorialjobtime[slotused] = true;
} else {
if (mctutorial.ke == "firstdayjob"){
tutorialfirstdayjob[slotused] = true;
};
};
};
};
};
};
};
if (currentLabel == "house"){
btnexit.visible = true;
};
mctutorial.texte = null;
mctutorial.gotoAndStop(1);
if (mctutorial.ke != "shop2"){
pausegame = false;
};
}
public function createhouseitems(){
var i:*;
var j:*;
i = 0;
while (i < housesize[charstat[slotused][13]]) {
j = 0;
while (j < housesize[charstat[slotused][13]]) {
if (houseitems[slotused][i][j] != -1){
createitemhere(i, j);
};
j++;
};
i++;
};
}
public function cekdesiredone(ke:int){
var done:*;
done = false;
if (charstat[slotused][32] != -1){
if (charstat[slotused][32] == ke){
done = true;
};
};
if (done == true){
sounddesirecompleted.play(0, 1, new SoundTransform(volsfx));
charstat[slotused][3] = statmax;
effectimage[effectimage.length] = new (fxstarbig);
addChildAt(effectimage[(effectimage.length - 1)], getChildIndex(mceffectposition));
effectimage[(effectimage.length - 1)].indexke = (effectimage.length - 1);
cektextposition(effectimage[(effectimage.length - 1)]);
effectimage[(effectimage.length - 1)].mouseChildren = false;
effectimage[(effectimage.length - 1)].mouseEnabled = false;
effectimage[(effectimage.length - 1)].addEventListener(Event.ENTER_FRAME, effectwaiting);
mcstarreduced.mc1.txt1.textColor = "0x00FF00";
mcstarreduced.mc1.txt1.text = ("+ " + desiregift[ke]);
mcstarreduced.gotoAndPlay(2);
charstat[slotused][32] = 999;
charstat[slotused][31] = (charstat[slotused][31] + desiregift[ke]);
updatestat();
cekdesirestatus();
};
}
public function cekcancook(checkonly:Boolean, pizzabool:Boolean){
var ok:*;
var jumtotal:*;
var ada:*;
var i:*;
var ada2:*;
var j:*;
var objaccess:*;
ok = false;
jumtotal = 0;
ada = false;
i = 0;
while (i < refrigeratorstock[slotused].length) {
if (refrigeratorstock[slotused][i][2] > 0){
jumtotal = (jumtotal + refrigeratorstock[slotused][i][2]);
ada = true;
};
i++;
};
ada2 = false;
trace(("length utk : " + tablecounterslot[slotused].length));
i = 0;
while (i < tablecounterslot[slotused].length) {
trace(("cek utk : " + tablecounterslot[slotused][i]));
j = 2;
while (j <= 3) {
if (tablecounterslot[slotused][i][j] == 0){
ada2 = true;
//unresolved jump
};
j++;
};
i++;
};
trace(((ada + " ") + ada2));
if ((((ada == true)) && ((ada2 == true)))){
ok = true;
objaccess = objectimage[charimage[0].objectto];
if (checkonly == false){
ada = false;
uipopuphealth = 2;
stage.addEventListener(MouseEvent.CLICK, resetuipopup);
i = 0;
while (i < cooklist.length) {
trace(((("he : " + jumtotal) + " ") + cookstock[i]));
if (charstat[slotused][18] >= cookreq[i]){
trace(("GO " + objaccess.nomor));
if ((((i <= 1)) && ((objaccess.nomor == 19)))){
ada = true;
createuipopup(cooklist[i], objectimage[charimage[0].objectto]);
} else {
if ((((i > 1)) && ((objaccess.nomor == 20)))){
ada = true;
createuipopup(cooklist[i], objectimage[charimage[0].objectto]);
};
};
};
i++;
};
if (ada == false){
trace("ER 1");
createtext("No food stores.");
};
};
objaccess = null;
} else {
if (ada2 == false){
createtext("No place to put the food.");
} else {
if ((((ada == false)) && ((pizzabool == false)))){
trace("ER 2");
createtext("No food stores.");
};
};
charnointeraction();
makeidle(0);
charimage[0].visible = true;
charimage[0].stat = "idle";
charimage[0].objectto = "";
charimage[0].stat2 = "idle";
charimage[0].objectto2 = "";
};
if ((((ada2 == true)) && ((pizzabool == true)))){
ok = true;
};
return (ok);
}
public function splash1(e:Event):void{
if (mcag.currentFrame == mcag.totalFrames){
stage.frameRate = 25;
stage.removeEventListener(Event.ENTER_FRAME, splash1);
gotoAndStop("splash2");
};
}
public function textcloserelationship(e:MouseEvent):void{
var parente:*;
soundclick.play(0, 1, new SoundTransform(volsfx));
parente = e.currentTarget.parent;
parente.gotoAndStop(1);
}
public function speedchange(e:MouseEvent):void{
var namee:*;
soundclick.play(0, 1, new SoundTransform(volsfx));
namee = e.currentTarget.name;
namee = namee.charAt((namee.length - 1));
trace(("SPD JD : " + namee));
if (namee == 1){
speedtime = 2;
} else {
speedtime = 1;
};
loadspeedsymbol();
}
public function officetable(e:MouseEvent):void{
soundclick.play(0, 1, new SoundTransform(volsfx));
cleanupeffectimage();
removealluiimage();
uipopuphealth = 2;
stage.addEventListener(MouseEvent.CLICK, resetuipopup);
createuipopup("WORK", e.currentTarget);
}
public function balikinfungsiplate(){
var i:*;
i = 0;
while (i < objectimage.length) {
if (houseclickable[objectimage[i].nomor][objectimage[i].tipe] == 0){
objectimage[i].buttonMode = false;
objectimage[i].removeEventListener(MouseEvent.MOUSE_OVER, objectover);
objectimage[i].removeEventListener(MouseEvent.MOUSE_OUT, objectout);
objectimage[i].removeEventListener(MouseEvent.CLICK, objectclick);
};
if ((((houseitemname[objectimage[i].nomor][objectimage[i].tipe] == "TABLE")) || ((houseitemname[objectimage[i].nomor][objectimage[i].tipe] == "COUNTER")))){
objectimage[i].mcplate1.mouseEnabled = true;
objectimage[i].mcplate1.mouseChildren = true;
objectimage[i].mcplate2.mouseEnabled = true;
objectimage[i].mcplate2.mouseChildren = true;
};
i++;
};
}
public function mmcreditsback(event:MouseEvent):void{
soundclick.play(0, 1, new SoundTransform(volsfx));
mcmainmenu.btnplay.visible = true;
mcmainmenu.btncredits.visible = true;
mcmainmenu.btngoody.visible = true;
mcmainmenu.btnarmor.visible = true;
mcmainmenu.btnfb.visible = true;
mccredits.gotoAndStop(1);
}
public function officetestkeywaiting(e:Event):void{
officetesttime--;
mcofficetest.mc1.width = ((officetestindex / (officeword.length - 1)) * 114);
mcofficetest.txttime.text = int((officetesttime / 25));
if (officetesttime <= 0){
cleanupofficetest();
};
}
public function loadofficetest(){
mcofficetest.txttime.text = int((officetesttime / 25));
mcofficetest.btnstart.visible = true;
typehealth = 6;
typehealth = (typehealth * charstat[slotused][24]);
typehealthtemp = typehealth;
typerate = charstat[slotused][17];
mcofficetest.gotoAndStop(2);
mcofficetest.txt1.text = "";
mcofficetest.mcpaper.gotoAndStop(1);
mcofficetest.btnstart.removeEventListener(MouseEvent.MOUSE_OVER, oversound);
mcofficetest.btnstart.addEventListener(MouseEvent.MOUSE_OVER, oversound);
mcofficetest.btnstart.removeEventListener(MouseEvent.CLICK, officeteststart);
mcofficetest.btnstart.addEventListener(MouseEvent.CLICK, officeteststart);
mcofficetest.mc1.width = 1;
}
public function furniturefollowwaiting(e:Event):void{
trace(uiimage.length);
uiimage[0].x = mouseX;
uiimage[0].y = mouseY;
}
public function mmcredits(event:MouseEvent):void{
soundclick.play(0, 1, new SoundTransform(volsfx));
loadcredits();
}
public function investmentwithdraw(e:MouseEvent):void{
var untunge:*;
soundclick.play(0, 1, new SoundTransform(volsfx));
untunge = int((int(mcinvestment.mc3.txt1.text) + int(mcinvestment.mc3.txt2.text)));
if ((((armor == true)) && ((AGIconnected == true)))){
if (int(mcinvestment.mc3.txt2.text) >= 200){
so.data.investmentcoin = 1;
cekquestdone();
};
};
charstat[slotused][2] = (charstat[slotused][2] + untunge);
if (charstat[slotused][32] == 10){
charstat[slotused][34] = (charstat[slotused][34] - untunge);
cekdesirestatus();
if (charstat[slotused][34] <= 0){
cekdesiredone(10);
};
};
ondeposit = false;
soundcoin.play(0, 1, new SoundTransform(volsfx));
mcuistat.mccoins.gotoAndPlay(2);
mcuistat.txtgold.text = charstat[slotused][2];
investment[slotused] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
loadinvestment();
}
public function pausegamenow(e:MouseEvent):void{
soundclick.play(0, 1, new SoundTransform(volsfx));
cekpause();
}
public function itunghargarumah(){
var i:*;
var j:*;
i = 0;
while (i < housesize[charstat[slotused][13]]) {
j = 0;
while (j < housesize[charstat[slotused][13]]) {
trace(("isi : " + houseitems[slotused][i][j]));
if (houseitems[slotused][i][j] != -1){
if (houseitems[slotused][i][j][3] != 1){
hargarumah = (hargarumah + int((houseitemprice[houseitems[slotused][i][j][0]] / 2)));
} else {
hargarare = (hargarare + int((houseitemprice[houseitems[slotused][i][j][0]] * rareresell)));
};
};
j++;
};
i++;
};
}
public function updatestat(){
var i:*;
var obj:*;
var statke:*;
var maxe:*;
var pakeinisu:*;
var hasile:*;
mcuistat.txtstar.text = charstat[slotused][31];
i = 1;
while (i <= 5) {
obj = mcuistat.getChildByName(("mc" + i));
obj.mc1.gotoAndStop((((mcuistat.tabindex - 1) * 5) + i));
obj.statke = obj.mc1.currentFrame;
obj.txt1.text = "";
if (mcuistat.tabindex == 3){
obj.visible = false;
} else {
obj.visible = true;
};
if ((((obj.statke >= 6)) && ((obj.statke <= 9)))){
if ((((obj.statke >= 6)) && ((obj.statke <= 8)))){
statke = (obj.statke + 10);
trace(("statke : " + statke));
maxe = ((charstat[slotused][statke] + 1) * statcarrermax);
trace(("maxe : " + maxe));
trace(("statke : " + int((int(obj.statke) + int(2)))));
trace(("skrg : " + charstat[slotused][int((int(obj.statke) + int(2)))]));
pakeinisu = charstat[slotused][int((int(obj.statke) + int(2)))];
pakeinisu = parseInt(pakeinisu);
trace(("a " + pakeinisu));
hasile = (pakeinisu / maxe);
trace("b");
obj.mcbar.width = (hasile * 98);
trace(("hasile : " + hasile));
trace(("percentage : " + int((hasile * 100))));
obj.mcbarcolor.gotoAndStop(int((hasile * 100)));
obj.txt1.text = charstat[slotused][int((int(obj.statke) + int(10)))];
} else {
obj.mcbar.width = 0;
obj.txt1.text = charstat[slotused][11];
};
} else {
hasile = (charstat[slotused][int((int(obj.statke) + int(2)))] / statmax);
obj.mcbar.width = (hasile * 98);
obj.mcbarcolor.gotoAndStop(int((hasile * 100)));
};
obj.removeEventListener(MouseEvent.MOUSE_OVER, oversound);
obj.addEventListener(MouseEvent.MOUSE_OVER, oversound);
obj.removeEventListener(MouseEvent.MOUSE_OVER, statover);
obj.addEventListener(MouseEvent.MOUSE_OVER, statover);
obj.removeEventListener(MouseEvent.MOUSE_OUT, statout);
obj.addEventListener(MouseEvent.MOUSE_OUT, statout);
obj = null;
i++;
};
}
public function loadcarrerpromotion(){
speedtime = 1;
loadspeedsymbol();
soundtest.play(0, 1, new SoundTransform(volsfx));
mccarrerpromotion.gotoAndPlay(2);
mccarrerpromotion.btngood.removeEventListener(MouseEvent.MOUSE_OVER, oversound);
mccarrerpromotion.btngood.addEventListener(MouseEvent.MOUSE_OVER, oversound);
mccarrerpromotion.btngood.removeEventListener(MouseEvent.CLICK, promotiongood);
mccarrerpromotion.btngood.addEventListener(MouseEvent.CLICK, promotiongood);
}
public function jumpright(){
if (mcstadiumtest.mcchar1.currentLabel == "run"){
if (mcstadiumtest.mcchar1.posisi < 4){
mcstadiumtest.mcchar1.posisi++;
setcharstadiumposition(1);
};
};
}
public function minuscontribute(e:MouseEvent):void{
soundclick.play(0, 1, new SoundTransform(volsfx));
if (contributemoney >= pengurangan){
uangtotal = (uangtotal + pengurangan);
mcendlife.mc5.mc1.mc1.mc1.txt1.text = uangtotal;
contributemoney = (contributemoney - pengurangan);
mcendlife.mc5.mc1.mc2.mc1.txt1.text = contributemoney;
charstat[slotused][38] = (charstat[slotused][38] - pengurangan);
loadgoal(mcendlife.mc5.mc1.mcgoal);
mcendlife.mc6.mc1.mc6.mc1.txt1.text = uangtotal;
};
}
public function retrieveAGI(){
if (guestbool == false){
agi.storage.user.retrieve({key:"savee", callback:function (data:Object):void{
if (((data.success) && (!((data == null))))){
so.data.charstat = data.keys.savee.charstat;
so.data.refrigeratorstock = data.keys.savee.refrigeratorstock;
so.data.tablecounterslot = data.keys.savee.tablecounterslot;
so.data.houseitems = data.keys.savee.houseitems;
so.data.trashbinslot = data.keys.savee.trashbinslot;
so.data.investment = data.keys.savee.investment;
so.data.relationship = data.keys.savee.relationship;
so.data.crowd = data.keys.savee.crowd;
so.data.tutoriallife = data.keys.savee.tutoriallife;
so.data.tutorialjob = data.keys.savee.tutorialjob;
so.data.tutorialsave = data.keys.savee.tutorialsave;
so.data.tutorialdesire = data.keys.savee.tutorialdesire;
so.data.tutorialshoptime = data.keys.savee.tutorialshoptime;
so.data.tutorialshop = data.keys.savee.tutorialshop;
so.data.donefirstjob = data.keys.savee.donefirstjob;
so.data.promostat = data.keys.savee.promostat;
so.data.jobreached = data.keys.savee.jobreached;
so.data.jobpercentage = data.keys.savee.jobpercentage;
so.data.startup = data.keys.savee.startup;
so.data.soundsetting = data.keys.savee.soundsetting;
so.data.cafe = data.keys.savee.cafe;
so.data.cafereload = data.keys.savee.cafereload;
so.data.townparkperson = data.keys.savee.townparkperson;
so.data.tutorialshop2 = data.keys.savee.tutorialshop2;
so.data.tutorialjobtime = data.keys.savee.tutorialjobtime;
so.data.tutorialfirstdayjob = data.keys.savee.tutorialfirstdayjob;
so.data.dishesclean = data.keys.savee.dishesclean;
so.data.pizzaorder = data.keys.savee.pizzaorder;
so.data.fullwork = data.keys.savee.fullwork;
so.data.goodfriend = data.keys.savee.goodfriend;
so.data.investmentcoin = data.keys.savee.investmentcoin;
so.data.lessrelatives = data.keys.savee.lessrelatives;
AGIcontinue = true;
volbgm = so.data.soundsetting[0];
volsfx = so.data.soundsetting[1];
samainlocaldgnsave();
updatelocalsave();
};
}});
};
}
public function repairmanwaiting(e:Event):void{
var i:*;
var j:*;
var sizex:*;
var sizey:*;
var xe:*;
var ye:*;
var k:*;
var l:*;
var kex:*;
var key:*;
var finalx:*;
var finaly:*;
var lo:*;
var hasile:*;
var sounde:*;
var obje:*;
if (pausegame == false){
if (e.currentTarget.phase == 0){
i = 0;
while (i < housesize[charstat[slotused][13]]) {
j = 0;
while (j < housesize[charstat[slotused][13]]) {
if (houseitems[slotused][i][j] != -1){
if (houseitems[slotused][i][j][2] == 0){
sizex = houseitemsizex[houseitems[slotused][i][j][0]][houseitems[slotused][i][j][1]];
sizey = houseitemsizey[houseitems[slotused][i][j][0]][houseitems[slotused][i][j][1]];
xe = 0;
while (xe <= sizex) {
ye = 0;
while (ye <= sizey) {
k = -1;
while (k <= 1) {
l = -1;
while (l <= 1) {
if ((((((((((k == 1)) && ((l == 0)))) || ((((k == -1)) && ((l == 0)))))) || ((((k == 0)) && ((l == 1)))))) || ((((k == 0)) && ((l == -1)))))){
kex = int(((int(k) + int(i)) + int(xe)));
key = int(((int(l) + int(j)) + int(ye)));
finalx = kex;
finaly = key;
if (cekvalid(finalx, finaly)){
lo = 0;
while (lo < objectimage.length) {
if ((((objectimage[lo].xe == i)) && ((objectimage[lo].ye == j)))){
e.currentTarget.objectto = lo;
hasile = carijalandonkie(e.currentTarget.xe, e.currentTarget.ye, finalx, finaly);
if (hasile.length > 0){
charimage[1].arraymove = [];
charimage[1].stat = "waitwalk";
i = 0;
while (i < hasile.length) {
charimage[1].arraymove[i] = [hasile[i].x, hasile[i].y];
trace(charimage[1].arraymove[i]);
i++;
};
trace(("TARGET INI : " + objectimage[lo]));
mapArray[charimage[1].xe][charimage[1].ye].cellType = CELL_FREE;
e.currentTarget.phase = 1;
//unresolved jump
};
};
lo++;
};
};
};
l++;
};
k++;
};
ye++;
};
xe++;
};
};
};
j++;
};
i++;
};
if (e.currentTarget.phase == 0){
hasile = carijalandonkie(e.currentTarget.xe, e.currentTarget.ye, posisirumahx[charstat[slotused][13]], posisirumahy[charstat[slotused][13]]);
if (hasile.length > 0){
charimage[1].arraymove = [];
charimage[1].stat = "waitwalk";
i = 0;
while (i < hasile.length) {
charimage[1].arraymove[i] = [hasile[i].x, hasile[i].y];
i++;
};
mapArray[charimage[1].xe][charimage[1].ye].cellType = CELL_FREE;
e.currentTarget.phase = 1;
};
if (e.currentTarget.phase == 0){
e.currentTarget.retrytime--;
if (e.currentTarget.retrytime <= 0){
cleanuprepairman();
};
};
};
} else {
if (e.currentTarget.phase == 1){
movethischar(1);
} else {
if (e.currentTarget.phase == 2){
e.currentTarget.repairtime--;
if (e.currentTarget.repairtime <= 0){
sounde = [soundrepair1, soundrepair2];
sounde[randRange(0, (sounde.length - 1))].play(0, 2, new SoundTransform(volsfx));
e.currentTarget.repairtime = 40;
};
e.currentTarget.timee--;
if (e.currentTarget.timee <= 0){
obje = objectimage[e.currentTarget.objectto];
houseitems[slotused][obje.xe][obje.ye][2] = houseitemhp[obje.nomor];
e.currentTarget.phase = 0;
obje.mcbroken.visible = false;
makeidle(1);
obje = null;
cekmasiadarusak();
};
};
};
};
};
}
public function outframe(e:MouseEvent):void{
var i:*;
var j:*;
e.currentTarget.mcframe.gotoAndStop(1);
mcitemsdesc.visible = false;
if (mcuishop.tabindex == 7){
i = 0;
while (i < housesize[charstat[slotused][13]]) {
j = 0;
while (j < housesize[charstat[slotused][13]]) {
tileimage[i][j].mc1.gotoAndStop(charstat[slotused][21]);
j++;
};
i++;
};
} else {
if (mcuishop.tabindex == 8){
i = 0;
while (i < wallimage.length) {
removeChild(wallimage[i]);
wallimage[i] = null;
i++;
};
wallimage = [];
createwall(charstat[slotused][14]);
};
};
}
public function shopuisectionover(e:MouseEvent):void{
var namee:*;
var i:*;
var obj:*;
namee = e.currentTarget.name;
namee = namee.charAt((namee.length - 1));
mcitemsdesc.visible = true;
settextvertical(shopuisectiontext[namee], mcitemsdesc, 7.8);
i = 1;
while (i <= 5) {
obj = mcitemsdesc.getChildByName(("mc" + i));
obj.visible = false;
obj = null;
i++;
};
mcitemsdesc.txtreq.text = "";
mcitemsdesc.mcreq.visible = false;
mcitemsdesc.gotoAndStop(1);
}
public function mmdelete(e:MouseEvent):void{
var namee:*;
soundclick.play(0, 1, new SoundTransform(volsfx));
namee = e.currentTarget.name;
namee = namee.charAt((namee.length - 1));
mcmainmenu.mcoption.ke = namee;
loaddeletesection(namee);
}
public function prevpage(e:MouseEvent):void{
var obj:*;
if (pageindex != 1){
obj = mcendlife.getChildByName(("mc" + pageindex));
if (obj.currentLabel == "ok"){
soundpaper.play(0, 1, new SoundTransform(volsfx));
obj = mcendlife.getChildByName(("mc" + pageindex));
obj.gotoAndPlay("right2");
obj = mcendlife.getChildByName(("mc" + int((int(pageindex) - int(1)))));
obj.gotoAndPlay("right1");
obj.visible = true;
obj = null;
pageindex--;
if (donepage[pageindex] == 0){
hidearrow();
} else {
loadarrow();
};
};
};
}
public function cekpause(){
if (mcuishop.visible == false){
trace("a");
if (pausegame == false){
pausegame = true;
mcpause.gotoAndStop(2);
turuninsoundbgm(0.4);
} else {
pausegame = false;
mcpause.gotoAndStop(1);
turuninsoundbgm(1);
};
};
}
public function setEndPoints(originX:int, originY:int, destX:int, destY:int):void{
originCell = mapArray[originX][originY];
destinationCell = mapArray[destX][destY];
originCell.cellType = CELL_ORIGIN;
destinationCell.cellType = CELL_DESTINATION;
currentCell = originCell;
closedList.push(originCell);
}
public function loaduistat(){
mcuistat.visible = true;
mcuishop.visible = false;
mcuistat.txtname.text = charstat[slotused][15];
mcuistat.txtgold.text = charstat[slotused][2];
updateministat();
updatestat();
mcuistat.btnprev.removeEventListener(MouseEvent.MOUSE_OVER, oversound);
mcuistat.btnprev.addEventListener(MouseEvent.MOUSE_OVER, oversound);
mcuistat.btnnext.removeEventListener(MouseEvent.MOUSE_OVER, oversound);
mcuistat.btnnext.addEventListener(MouseEvent.MOUSE_OVER, oversound);
mcuistat.btnprev.removeEventListener(MouseEvent.CLICK, prevstat);
mcuistat.btnprev.addEventListener(MouseEvent.CLICK, prevstat);
mcuistat.btnnext.removeEventListener(MouseEvent.CLICK, nextstat);
mcuistat.btnnext.addEventListener(MouseEvent.CLICK, nextstat);
mcuistat.mcgoal.visible = false;
if (mcuistat.tabindex == 1){
mcuistat.btnprev.gotoAndStop(2);
mcuistat.btnnext.gotoAndStop(1);
} else {
if (mcuistat.tabindex == 3){
mcuistat.btnprev.gotoAndStop(1);
mcuistat.btnnext.gotoAndStop(2);
mcuistat.mcgoal.visible = true;
loadgoal(mcuistat.mcgoal);
} else {
mcuistat.btnprev.gotoAndStop(1);
mcuistat.btnnext.gotoAndStop(1);
};
};
}
public function cekstatincrease(stat:String, no:int){
var arrowstat:*;
var i:*;
var ok:*;
var tipemakanan:*;
var obje:*;
var ke:*;
var plate:*;
var donebool:*;
var doneke:*;
var objtemp:*;
var cekini:*;
var minini:*;
var cek:*;
var rand:*;
var statke:*;
var statpts:*;
var maxe:*;
var sblme:*;
var persene:*;
var kasihe:*;
var liststattambah:*;
var liststattambahnumba:*;
var j:*;
var rare:*;
var tambahe:*;
var bonusrate:*;
var tambahidariint:*;
var textlist:*;
var go:*;
var obj:*;
arrowstat = [];
if (stat == "EAT"){
charimage[0].eattime = 0;
if (charimage[0].eattime <= 0){
charimage[0].eattime = charimage[0].eattimetemp;
ok = false;
tipemakanan = 0;
obje = objectimage[no];
i = 0;
while (i < tablecounterslot[slotused].length) {
if ((((tablecounterslot[slotused][i][0] == obje.xe)) && ((tablecounterslot[slotused][i][1] == obje.ye)))){
ke = int((int(toplate) + int(5)));
if (tablecounterslot[slotused][i][ke] > 0){
ok = true;
tablecounterslot[slotused][i][ke] = (tablecounterslot[slotused][i][ke] - 1);
};
tipemakanan = tablecounterslot[slotused][i][int((int(toplate) + int(3)))];
if (tablecounterslot[slotused][i][ke] <= 0){
trace("entek");
plate = obje.getChildByName(("mcplate" + toplate));
plate.gotoAndStop(1);
createtext(textmakan[randRange(0, (textmakan.length - 1))]);
if (charimage[0].visible == true){
charimage[0].stat = "idle";
if (charimage[0].mc1.currentLabel == "idleactivity1"){
charimage[0].mc1.gotoAndPlay("idle1");
} else {
charimage[0].mc1.gotoAndPlay("idle2");
};
} else {
objectimage[charimage[0].objectto].gotoAndStop(2);
};
charimage[0].stat2 = "";
charimage[0].objectto2 = "";
break;
};
break;
};
i++;
};
if (ok == true){
charstat[slotused][4] = (charstat[slotused][4] + 3);
charstat[slotused][7] = (charstat[slotused][7] - cookbladderincrease[tipemakanan]);
charstat[slotused][5] = (charstat[slotused][5] + cookenergyincrease[tipemakanan]);
if (statbubbletime <= 0){
createstaticon(4);
};
if (mcuistat.tabindex == 1){
if (mcuistat.mc2.mcarrow.currentFrame == 1){
mcuistat.mc2.mcarrow.gotoAndPlay(2);
};
};
if (charstat[slotused][4] >= statmax){
trace(((("YA MAX : " + charimage[0].stat) + " ") + charimage[0].stat2));
if (charimage[0].stat == "EAT"){
charimage[0].stat = "idle";
charimage[0].stat2 = "";
makeidle(0);
} else {
if ((((charimage[0].stat == "SIT")) && ((charimage[0].stat2 == "EAT")))){
charimage[0].stat2 = "";
objectimage[charimage[0].objectto].gotoAndStop(2);
charimage[0].objectto2 = -1;
};
};
};
};
obje = null;
};
} else {
if ((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((stat == "WATCH")) || ((stat == "PLAY GAMES")))) || ((stat == "READ NEWS")))) || ((stat == "PLAY")))) || ((stat == "TAKE A SHOWER")))) || ((stat == "USE")))) || ((stat == "READ BOOK")))) || ((stat == "OBSERVE")))) || ((stat == "PLAY CHESS")))) || ((stat == "LISTEN TO MUSIC")))) || ((stat == "PLAY FLUTE")))) || ((stat == "PLAY PIANO")))) || ((stat == "EXERCISE")))) || ((stat == "WEIGHTLIFTING")))) || ((stat == "RUN")))) || ((stat == "SIT")))) || ((stat == "SLEEP")))) || ((stat == "REPAIR")))) || ((stat == "WORK")))) || ((stat == "REST")))) || ((stat == "USE BATHROOM")))) || ((stat == "SING")))) || ((stat == "RUN THE COURSE")))) || ((stat == "PERFORM")))) || ((stat == "TAKE A DUMP")))) || ((stat == "TAKE A BATH")))) || ((stat == "SLEEP IN PARK")))) || ((stat == "PIANO PERFORM")))) || ((stat == "FLUTE PERFORM")))) || ((stat == "READ NEWSPAPER")))) || ((stat == "JOGGING")))){
if ((((((((((((((((((((((((((((((((((((((((((stat == "WATCH")) || ((stat == "PLAY GAMES")))) || ((stat == "PLAY")))) || ((stat == "READ BOOK")))) || ((stat == "OBSERVE")))) || ((stat == "PLAY CHESS")))) || ((stat == "LISTEN TO MUSIC")))) || ((stat == "PLAY FLUTE")))) || ((stat == "PLAY PIANO")))) || ((stat == "EXERCISE")))) || ((stat == "WEIGHTLIFTING")))) || ((stat == "RUN")))) || ((stat == "REPAIR")))) || ((stat == "WORK")))) || ((stat == "SING")))) || ((stat == "RUN THE COURSE")))) || ((stat == "PERFORM")))) || ((stat == "PIANO PERFORM")))) || ((stat == "FLUTE PERFORM")))) || ((stat == "READ NEWSPAPER")))) || ((stat == "JOGGING")))){
charstat[slotused][5] = (charstat[slotused][5] - kurangerarray[5]);
charstat[slotused][4] = (charstat[slotused][4] - kurangerarray[4]);
if ((((((((((((((((stat == "EXERCISE")) || ((stat == "WEIGHTLIFTING")))) || ((stat == "RUN")))) || ((stat == "REPAIR")))) || ((stat == "RUN THE COURSE")))) || ((stat == "SING")))) || ((stat == "PERFORM")))) || ((stat == "JOGGING")))){
charstat[slotused][6] = (charstat[slotused][6] - kurangerarray[6]);
charstat[slotused][5] = (charstat[slotused][5] - kurangerarray[5]);
charstat[slotused][4] = (charstat[slotused][4] - kurangerarray[4]);
};
};
donebool = false;
doneke = 0;
if ((((((((((((((((((((((((((((((((((((((((((((((((stat == "WATCH")) || ((stat == "PLAY GAMES")))) || ((stat == "PLAY")))) || ((stat == "READ BOOK")))) || ((stat == "OBSERVE")))) || ((stat == "PLAY CHESS")))) || ((stat == "LISTEN TO MUSIC")))) || ((stat == "PLAY FLUTE")))) || ((stat == "PLAY PIANO")))) || ((stat == "EXERCISE")))) || ((stat == "WEIGHTLIFTING")))) || ((stat == "RUN")))) || ((stat == "REPAIR")))) || ((stat == "WORK")))) || ((stat == "SING")))) || ((stat == "RUN THE COURSE")))) || ((stat == "SLEEP")))) || ((stat == "SLEEP IN PARK")))) || ((stat == "EAT")))) || ((stat == "PERFORM")))) || ((stat == "PIANO PERFORM")))) || ((stat == "FLUTE PERFORM")))) || ((stat == "READ NEWSPAPER")))) || ((stat == "JOGGING")))){
cekini = [4, 5, 7, 3];
minini = [feedmin, energymin, bladdermin, happinessmin];
i = 0;
while (i < cekini.length) {
if ((((charstat[slotused][cekini[i]] < minini[i])) && ((((((((((((i == 0)) && (!((stat == "COOKING"))))) && (!((stat == "COOK"))))) || ((((((i == 1)) && (!((stat == "SLEEP"))))) && (!((stat == "SLEEP IN PARK"))))))) || ((i == 2)))) || ((((((((((((((((((((((((((((((((((i == 3)) && (!((stat == "REPAIR"))))) && (!((stat == "COOK"))))) && (!((stat == "WATCH"))))) && (!((stat == "PLAY GAMES"))))) && (!((stat == "PLAY"))))) && (!((stat == "SLEEP"))))) && (!((stat == "SLEEP IN PARK"))))) && (!((stat == "PERFORM"))))) && (!((stat == "SING"))))) && (!((stat == "WORK"))))) && (!((stat == "RUN THE COURSE"))))) && (!((stat == "PIANO PERFORM"))))) && (!((stat == "FLUTE PERFORM"))))) && (!((stat == "PLAY PIANO"))))) && (!((stat == "PLAY FLUTE"))))) && (!((stat == "LISTEN TO MUSIC"))))))))){
cek = ((1 - (charstat[slotused][cekini[i]] / 50)) * 100);
rand = randRange(0, 100);
if (rand < cek){
doneke = i;
donebool = true;
};
};
i++;
};
};
objtemp = objectimage[no];
if ((((stat == "SLEEP")) || ((stat == "SLEEP IN PARK")))){
charstat[slotused][3] = (charstat[slotused][3] + (kurangerarray[3] / 2));
charstat[slotused][4] = (charstat[slotused][4] + (kurangerarray[4] / 2));
charstat[slotused][6] = (charstat[slotused][6] + (kurangerarray[6] / 2));
charstat[slotused][7] = (charstat[slotused][7] + (kurangerarray[7] / 2));
};
if ((((((stat == "REPAIR")) || ((stat == "WORK")))) || ((stat == "RUN THE COURSE")))){
if (stat == "WORK"){
sblme = charstat[slotused][26];
charstat[slotused][26] = (charstat[slotused][26] + workrate);
updateworkprogress(sblme);
};
statke = 9;
if (stat == "RUN THE COURSE"){
statke = 8;
persene = ambilpersenlearning();
kasihe = (houseitemcommandeffect[49][0][0] * persene);
trace(("KASIHE : " + kasihe));
charstat[slotused][statke] = (charstat[slotused][statke] + kasihe);
} else {
if (stat == "WORK"){
trace(((("STATKE : " + statke) + " TAMBA : ") + houseitemcommandeffect[43][0][0]));
charstat[slotused][statke] = (charstat[slotused][statke] + houseitemcommandeffect[43][0][0]);
} else {
charstat[slotused][statke] = (charstat[slotused][statke] + 1);
};
};
arrowstat[arrowstat.length] = statke;
statpts = (statke + 8);
maxe = ((charstat[slotused][statpts] + 1) * statcarrermax);
if (charstat[slotused][statke] > maxe){
createstaticon(statke);
charstat[slotused][statke] = 0;
var _local33 = charstat[slotused];
var _local34 = statpts;
var _local35 = (_local33[_local34] + 1);
_local33[_local34] = _local35;
};
if (stat == "REPAIR"){
houseitems[slotused][objtemp.xe][objtemp.ye][2] = (houseitems[slotused][objtemp.xe][objtemp.ye][2] + 0.2);
if (houseitems[slotused][objtemp.xe][objtemp.ye][2] >= houseitemhp[objtemp.nomor]){
houseitems[slotused][objtemp.xe][objtemp.ye][2] = houseitemhp[objtemp.nomor];
objtemp.mcbroken.visible = false;
adarusak = false;
cekmasiadarusak();
charimage[0].stat = "idle";
makeidle(0);
};
};
} else {
if ((((stat == "REST")) || ((stat == "SLEEP IN PARK")))){
statke = 5;
if (stat == "REST"){
charstat[slotused][statke] = (charstat[slotused][statke] + houseitemcommandeffect[62][0][0]);
} else {
charstat[slotused][statke] = (charstat[slotused][statke] + houseitemcommandeffect[64][0][0]);
};
if (statbubbletime <= 0){
createstaticon(statke);
};
if (charstat[slotused][statke] > statmax){
charstat[slotused][statke] = statmax;
};
arrowstat[arrowstat.length] = statke;
} else {
if (stat == "USE BATHROOM"){
statke = 7;
charstat[slotused][statke] = (charstat[slotused][statke] + houseitemcommandeffect[13][0][0]);
if (statbubbletime <= 0){
createstaticon(statke);
};
if (charstat[slotused][statke] > statmax){
charstat[slotused][statke] = statmax;
};
arrowstat[arrowstat.length] = statke;
} else {
liststattambah = [];
liststattambahnumba = [];
if (stat == "SING"){
liststattambah = [10, 3];
liststattambahnumba = [houseitemcommandeffect[43][0][0], 1];
} else {
if (stat == "PIANO PERFORM"){
liststattambah = [10, 3];
liststattambahnumba = [houseitemcommandeffect[47][0][0], 1];
} else {
if (stat == "FLUTE PERFORM"){
liststattambah = [10, 3];
liststattambahnumba = [houseitemcommandeffect[46][0][0], 1];
} else {
if (stat == "READ NEWSPAPER"){
liststattambah = [9];
liststattambahnumba = [houseitemcommandeffect[42][0][0]];
} else {
if (stat == "JOGGING"){
liststattambah = [8];
liststattambahnumba = [houseitemcommandeffect[50][0][0]];
} else {
if (stat == "PERFORM"){
liststattambah = [3, 8, 9, 10];
liststattambahnumba = [1, houseitemcommandeffect[42][0][0], houseitemcommandeffect[42][0][0], houseitemcommandeffect[42][0][0]];
} else {
if (stat == "TAKE A DUMP"){
liststattambah = [7];
liststattambahnumba = [4];
} else {
if (stat == "TAKE A BATH"){
liststattambah = [6];
liststattambahnumba = [1];
} else {
i = 0;
while (i < houseitemcommand[objtemp.nomor].length) {
if (houseitemcommand[objtemp.nomor][i] == stat){
j = 0;
while (j < houseitemcommandstat[objtemp.nomor][i].length) {
rare = 1;
if (houseitems[slotused][objtemp.xe][objtemp.ye][3] == 1){
rare = 2;
};
statke = houseitemcommandstat[objtemp.nomor][i][j];
trace(("RARE : " + rare));
liststattambah.push(statke);
if (houseitemcommandstat[objtemp.nomor][i][j] < 8){
tambahe = (houseitemcommandeffect[objtemp.nomor][i][j] * rare);
liststattambahnumba.push(tambahe);
} else {
persene = ambilpersenlearning();
liststattambahnumba.push(((houseitemcommandeffect[objtemp.nomor][i][j] * rare) * persene));
};
j++;
};
};
i++;
};
};
};
};
};
};
};
};
};
i = 0;
while (i < liststattambah.length) {
statke = liststattambah[i];
tambahe = liststattambahnumba[i];
if (statke < 8){
charstat[slotused][statke] = (charstat[slotused][statke] + tambahe);
if (charimage[0].stat == "SLEEP"){
bonusrate = ((((charstat[slotused][3] + charstat[slotused][4]) + charstat[slotused][6]) + charstat[slotused][7]) / (statmax * 4));
tambahe = (tambahe + (tambahe * bonusrate));
};
} else {
tambahidariint = ((charstat[slotused][17] * 0.15) * tambahe);
tambahe = (tambahe + tambahidariint);
charstat[slotused][statke] = (charstat[slotused][statke] + tambahe);
};
arrowstat[arrowstat.length] = statke;
if (statke < 8){
if (statbubbletime <= 0){
createstaticon(statke);
};
if (charstat[slotused][statke] > statmax){
charstat[slotused][statke] = statmax;
};
} else {
statpts = (statke + 8);
maxe = ((charstat[slotused][statpts] + 1) * statcarrermax);
if (charstat[slotused][statke] > maxe){
trace(("STAT NAEK KE : " + statke));
if (statpts == 18){
cekdesiredone(5);
};
if (statpts == 16){
cekdesiredone(6);
};
if (statpts == 17){
cekdesiredone(7);
};
createstaticon(statke);
charstat[slotused][statke] = 0;
_local33 = charstat[slotused];
_local34 = statpts;
_local35 = (_local33[_local34] + 1);
_local33[_local34] = _local35;
};
};
i++;
};
if (currentLabel == "house"){
if ((((changehour == true)) && (!((houseitemhp[objtemp.nomor] == -1))))){
_local33 = houseitems[slotused][objtemp.xe][objtemp.ye];
_local34 = 2;
_local35 = (_local33[_local34] - 1);
_local33[_local34] = _local35;
if (houseitems[slotused][objtemp.xe][objtemp.ye][2] == 0){
objtemp.mcbroken.visible = true;
adarusak = true;
trace("DONE DONE");
charnointeraction();
charimage[0].stat2 = "";
charimage[0].stat = "idle";
makeidle(0);
};
trace(("HP KURANGI : " + houseitems[slotused][objtemp.xe][objtemp.ye][2]));
};
};
objtemp = null;
};
};
};
if (donebool == true){
textlist = ["I'm so hungry.", "I'm so tired, I'm about to pass out.", "I have to relieve my bladder now!", "I'm so bored."];
charimage[0].visible = true;
charnointeraction();
charimage[0].stat2 = "";
charimage[0].stat = "idle";
makeidle(0);
if (currentLabel == "office"){
resetofficeusage();
charimage[0].mc1.gotoAndPlay("idle3");
} else {
if (currentLabel == "studio"){
resetstudiousage();
charimage[0].mc1.gotoAndPlay("idle4");
} else {
if (currentLabel == "stadium"){
resetstadiumusage();
charimage[0].mc1.gotoAndPlay("idle5");
} else {
if (currentLabel == "park"){
resetparkusage();
charimage[0].mc1.gotoAndPlay("idle1");
} else {
if (currentLabel == "townpark"){
resettownparkusage();
charimage[0].mc1.gotoAndPlay("idle1");
} else {
if (currentLabel == "cafe"){
resetcafeusage();
charimage[0].mc1.gotoAndPlay("idle1");
} else {
if (currentLabel == "townpark"){
resettownparkusage();
charimage[0].mc1.gotoAndPlay("idle1");
};
};
};
};
};
};
};
createtext(textlist[doneke]);
};
};
};
i = 0;
while (i < arrowstat.length) {
go = false;
if ((((arrowstat[i] < 8)) && ((mcuistat.tabindex == 1)))){
arrowstat[i] = (arrowstat[i] - 2);
go = true;
} else {
if ((((arrowstat[i] >= 8)) && ((mcuistat.tabindex == 2)))){
arrowstat[i] = (arrowstat[i] - 7);
go = true;
};
};
if (go == true){
obj = mcuistat.getChildByName(("mc" + arrowstat[i]));
if (obj.mcarrow.currentFrame == 1){
obj.mcarrow.gotoAndPlay(2);
};
obj = null;
};
i++;
};
if (stat == "USE"){
trace(((("ya use : " + charstat[slotused][7]) + " ") + statmax));
if (charstat[slotused][7] >= statmax){
charimage[0].visible = true;
charnointeraction();
charimage[0].stat2 = "";
charimage[0].stat = "idle";
makeidle(0);
};
} else {
if (stat == "TAKE A SHOWER"){
if (charstat[slotused][6] >= statmax){
charimage[0].visible = true;
charnointeraction();
charimage[0].stat2 = "";
charimage[0].stat = "idle";
makeidle(0);
};
} else {
if (stat == "USE BATHROOM"){
if (charstat[slotused][7] >= statmax){
charimage[0].visible = true;
charnointeraction();
charimage[0].stat2 = "";
charimage[0].stat = "idle";
makeidle(0);
if (currentLabel == "office"){
resetofficeusage();
charimage[0].mc1.gotoAndPlay("idle3");
} else {
if (currentLabel == "studio"){
resetstudiousage();
charimage[0].mc1.gotoAndPlay("idle4");
} else {
if (currentLabel == "stadium"){
resetstadiumusage();
charimage[0].mc1.gotoAndPlay("idle5");
};
};
};
};
} else {
if (stat == "TAKE A DUMP"){
if (charstat[slotused][7] >= statmax){
charimage[0].visible = true;
charnointeraction();
charimage[0].stat2 = "";
charimage[0].stat = "idle";
makeidle(0);
resetparkusage();
charimage[0].mc1.gotoAndPlay("idle1");
};
} else {
if (stat == "TAKE A BATH"){
if (charstat[slotused][6] >= statmax){
charimage[0].visible = true;
charnointeraction();
charimage[0].stat2 = "";
charimage[0].stat = "idle";
makeidle(0);
resetparkusage();
charimage[0].mc1.gotoAndPlay("idle1");
};
};
};
};
};
};
}
public function gameoversubmit(event:MouseEvent):void{
uploadhighscore();
stage.removeEventListener(Event.ENTER_FRAME, gameoverwaiting);
soundresultdone.play(0, 1, new SoundTransform(volsfx));
transisi("credits");
}
public function gonecrowd(){
var i:*;
var j:*;
var obj:*;
var obj2:*;
i = 1;
while (i <= 2) {
trace(("he : " + crowd[slotused][i]));
j = 1;
while (j <= 3) {
obj = getChildByName(("mccrowd" + i));
obj2 = obj.getChildByName(("mc" + j));
obj2.visible = false;
j++;
};
i++;
};
}
public function cekcharmove(stat:String, no:int){
if ((((stat == "WATCH")) || ((stat == "PLAY")))){
if (objectimage[no].mcstink != null){
objectimage[no].mcstink.visible = false;
};
objectimage[no].gotoAndStop(1);
} else {
if (stat == "COOKING"){
objectimage[no].mckettle.gotoAndStop(1);
} else {
if ((((((((((((((((((((((stat == "PLAY GAMES")) || ((stat == "READ NEWS")))) || ((stat == "INVESTMENT")))) || ((stat == "TAKE A SHOWER")))) || ((stat == "USE")))) || ((stat == "PLAY PIANO")))) || ((stat == "EXERCISE")))) || ((stat == "WEIGHTLIFTING")))) || ((stat == "RUN")))) || ((stat == "SIT")))) || ((stat == "SLEEP")))){
charimage[0].visible = true;
if (objectimage[no].mcstink != null){
objectimage[no].mcstink.visible = false;
};
objectimage[no].gotoAndStop(1);
};
};
};
}
public function createmaparray(){
xx = 0;
while (xx < housesize[charstat[slotused][13]]) {
mapArray[xx] = new Array();
yy = 0;
while (yy < housesize[charstat[slotused][13]]) {
mapArray[xx][yy] = new Object();
mapArray[xx][yy].cellType = CELL_FREE;
mapArray[xx][yy].parentCell = null;
mapArray[xx][yy].g = 0;
mapArray[xx][yy].f = 0;
mapArray[xx][yy].x = xx;
mapArray[xx][yy].y = yy;
yy++;
};
xx++;
};
}
public function ceknewstime(ke:int){
var ada:*;
var liste:*;
var i:*;
var obj:*;
var aie:*;
ada = false;
liste = [undefined, 0, 0];
i = 1;
while (i <= 3) {
obj = getChildByName(("mcnews" + i));
if (obj != null){
if (obj.currentLabel == "ok"){
liste[i] = 1;
aie = obj.mc1.txt1.text;
if (obj.mc1.currentFrame == ke){
aie--;
};
obj.mc1.txt1.text = aie;
if (aie == 0){
obj.gotoAndPlay("done");
liste[i] = 0;
if (obj.mc1.currentFrame == 1){
ada = true;
if (currentLabel == "street"){
btnexittooffice.visible = true;
};
} else {
if ((((obj.mc1.currentFrame == 2)) && ((currentLabel == "street")))){
btnexittooffice.visible = false;
};
};
};
};
};
obj = null;
i++;
};
if ((((liste[2] == 1)) && ((liste[1] == 0)))){
mcnews1.gotoAndStop(1);
mcnews2.gotoAndStop(1);
bwatnews(mcnews2.mc1.currentFrame, mcnews2.mc1.txt1.text);
mcnews1.gotoAndStop("ok");
};
if (ada == true){
trace(("ANEH SE : " + tutorialjobtime[slotused]));
if (tutorialjobtime[slotused] == false){
loadtutorial("jobtime");
};
bwatnews(2, (jobentertime - jobfrom));
};
}
public function loadcafe(){
var i:*;
var obj:*;
i = 1;
while (i <= 3) {
obj = getChildByName(("mctable" + i));
obj.mcplate.visible = false;
i++;
};
if (charstat[slotused][23] != 0){
loadjobprogress();
};
btnexitcafe.visible = true;
trace(("A " + btn1));
btn1.removeEventListener(MouseEvent.MOUSE_OVER, oversound);
btn1.addEventListener(MouseEvent.MOUSE_OVER, oversound);
btn1.removeEventListener(MouseEvent.CLICK, relationshipclick);
btn1.addEventListener(MouseEvent.CLICK, relationshipclick);
btnbar.removeEventListener(MouseEvent.MOUSE_OVER, oversound);
btnbar.addEventListener(MouseEvent.MOUSE_OVER, oversound);
btnbar.removeEventListener(MouseEvent.CLICK, cafeorderbar);
btnbar.addEventListener(MouseEvent.CLICK, cafeorderbar);
resetcafeusage();
trace("b");
btnexitcafe.removeEventListener(MouseEvent.MOUSE_OVER, oversound);
btnexitcafe.addEventListener(MouseEvent.MOUSE_OVER, oversound);
btnexitcafe.removeEventListener(MouseEvent.CLICK, exitcafe);
btnexitcafe.addEventListener(MouseEvent.CLICK, exitcafe);
createchar();
mcclock.txt3.text = daylist[ambilharikerja()];
loadspeedsymbol();
loaduistat();
hitungenviro();
cekstatusadd();
stage.addEventListener(Event.ENTER_FRAME, gamewaiting);
}
public function inputgood(e:MouseEvent):void{
if (((!((donechangename == ""))) && (!((doneselecthouse == -1))))){
mcinput.mc3.btngood.removeEventListener(MouseEvent.CLICK, inputgood);
soundyes.play(0, 1, new SoundTransform(volsfx));
mcinput.btnnext.gotoAndStop(2);
mcinput.btnprev.gotoAndStop(2);
soundchannel2 = soundwrite.play(0, 1, new SoundTransform(volsfx));
stage.addEventListener(Event.ENTER_FRAME, namewritewaiting);
} else {
mcinput.mc3.mc1.mc1.txt1.text = "";
if (donechangename == ""){
mcinput.mc3.mc1.mc1.txt1.text = "-Name required-\n";
};
if (doneselecthouse == -1){
mcinput.mc3.mc1.mc1.txt1.text = (mcinput.mc3.mc1.mc1.txt1.text + "-Select house-");
};
mcinput.mc3.mc1.gotoAndPlay(2);
};
}
public function performclick(e:MouseEvent):void{
soundclick.play(0, 1, new SoundTransform(volsfx));
cleanupeffectimage();
removealluiimage();
uipopuphealth = 2;
stage.addEventListener(MouseEvent.CLICK, resetuipopup);
createuipopup("PERFORM", e.currentTarget);
}
public function waitsplash2(e:Event):void{
if (mcsplash2.currentFrame == mcsplash2.totalFrames){
stage.removeEventListener(Event.ENTER_FRAME, waitsplash2);
gotoAndStop("main menu");
};
}
public function cleanupstreet(){
var j:*;
removealluiimage();
j = 0;
while (j < charimage.length) {
charimage[j].removeEventListener(Event.ENTER_FRAME, repairmanwaiting);
removeChild(charimage[j]);
charimage[j] = null;
j++;
};
cleanupeffectimage();
stage.removeEventListener(Event.ENTER_FRAME, gamewaiting);
stage.removeEventListener(Event.ENTER_FRAME, faintedwaiting);
}
public function clickAG(event:MouseEvent):void{
var request:URLRequest;
soundclick.play(0, 1, new SoundTransform(volsfx));
request = new URLRequest("http://armor.ag/MoreGames");
navigateToURL(request);
}
public function cekduplikatcounter(){
var potong:*;
var tempi:*;
potong = 0;
i = 0;
while (i < tablecounterslot[slotused].length) {
potong = 0;
tempi = i;
j = 0;
while (j < tablecounterslot[slotused].length) {
if ((((((tablecounterslot[slotused][i][0] == tablecounterslot[slotused][j][0])) && ((tablecounterslot[slotused][i][1] == tablecounterslot[slotused][j][1])))) && (!((i == j))))){
potong = j;
break;
};
j++;
};
if (potong != 0){
trace(("ya potong : " + j));
tablecounterslot[slotused].splice(potong, 1);
i = tempi;
};
i++;
};
}
public function cleanupendlife(){
stage.removeEventListener(Event.ENTER_FRAME, endlifewaiting);
}
public function loaddeletesection(ke:int){
mcmainmenu.mcoption.visible = true;
mcmainmenu.mcoption.txt1.text = (("Delete Slot " + ke) + "?");
mcmainmenu.btnslot1.visible = false;
mcmainmenu.btnslot2.visible = false;
mcmainmenu.btnback.visible = false;
mcmainmenu.btndelete1.visible = false;
mcmainmenu.btndelete2.visible = false;
}
public function gooutside(){
if ((((donefirstjob[slotused] == false)) && ((tutoriallife[slotused] == true)))){
charimage[0].stat = "idle";
charimage[0].timee = -1;
makeidle(0);
loadtutorial("phone");
mctutorial.btnskip.visible = false;
} else {
if ((((donefirstjob[slotused] == true)) && ((tutorialsave[slotused] == false)))){
charimage[0].stat = "idle";
charimage[0].timee = -1;
makeidle(0);
loadtutorial("save");
mctutorial.btnskip.visible = false;
} else {
sounddoor.play(0, 1, new SoundTransform(volsfx));
cleanuphouse();
loadspeedsymbol();
transisi("street");
};
};
}
public function jobshiftwaiting(e:Event):void{
if (mcjob.currentLabel == "done"){
mcjob.ke = mcjob.nextke;
loadgambarjobuntuk(mcjob.mc1, mcjob.nextke);
stage.removeEventListener(Event.ENTER_FRAME, jobshiftwaiting);
mcjob.gotoAndStop(2);
};
}
public function exitcafe(e:MouseEvent):void{
soundclick.play(0, 1, new SoundTransform(volsfx));
cleanupcafe();
loadspeedsymbol();
transisi("street");
}
public function prevshop(e:MouseEvent):void{
if (e.currentTarget.currentFrame == 1){
soundclick.play(0, 1, new SoundTransform(volsfx));
removealluiimage();
stage.removeEventListener(Event.ENTER_FRAME, furniturefollowwaiting);
mcuishop.itemindex--;
loaduishop();
};
}
public function loadstory(){
stage.addEventListener(Event.ENTER_FRAME, storywaiting);
}
public function retrievescore(){
agi.scoreboard.retrieveUserScores({scoreboardName:"Day needed", sortBy:agi.scoreboard.BY_DATE, callback:function (data:Object):void{
var i:*;
if (data.success){
i = 0;
while (i < data.scores.length) {
txtlog.text = (txtlog.text + ((("RANK KE : " + i) + " YAITU : ") + data.scores[i].score));
if (data.scores[i].score <= 3){
relativesyay = 1;
};
i++;
};
} else {
trace(data.error);
};
}});
}
public function updateworkprogress(sblme:int){
var persenawal:*;
var persene:*;
var texte:*;
trace(((("hm : " + sblme) + " ") + charstat[slotused][26]));
persenawal = int(((sblme / workcompletion) * 100));
persene = int(((charstat[slotused][26] / workcompletion) * 100));
mcpercentage.txt1.text = (persene + "%");
if (persene < 30){
mcpercentage.txt1.textColor = "0XFF0000";
} else {
if (persene < 60){
mcpercentage.txt1.textColor = "0XFF6600";
} else {
if (persene < 80){
mcpercentage.txt1.textColor = "0XFFFF00";
} else {
mcpercentage.txt1.textColor = "0X000FF00";
};
};
};
texte = "";
if ((((persenawal < 100)) && ((persene >= 100)))){
if (currentLabel == "office"){
if ((((armor == true)) && ((AGIconnected == true)))){
so.data.fullwork = 1;
cekquestdone();
};
soundtext.play(0, 1, new SoundTransform(volsfx));
texte = "Great, work is done!";
};
trace(("WORK IS DONE : " + persene));
mctxt.gotoAndPlay(2);
settextvertical(texte, mctxt, -18.1);
} else {
if ((((persenawal < 150)) && ((persene >= 150)))){
if (currentLabel == "office"){
soundtext.play(0, 1, new SoundTransform(volsfx));
texte = "Wow, you're awesome!";
};
mctxt.gotoAndPlay(2);
settextvertical(texte, mctxt, -18.1);
} else {
if ((((persenawal < 200)) && ((persene >= 200)))){
if (currentLabel == "office"){
soundtext.play(0, 1, new SoundTransform(volsfx));
texte = "A true journalist never stops!";
};
mctxt.gotoAndPlay(2);
settextvertical(texte, mctxt, -18.1);
} else {
if (persene == 300){
if (currentLabel == "office"){
soundtext.play(0, 1, new SoundTransform(volsfx));
texte = "You're journalist of the month!";
};
mctxt.gotoAndPlay(2);
settextvertical(texte, mctxt, -18.1);
};
};
};
};
}
public function createtownparkperson(){
var jum:*;
var ke:*;
var alrdy:*;
var i:*;
var rand:*;
var ambelke:*;
var jadie:*;
jum = 4;
ke = 1;
alrdy = [];
i = 1;
while (i <= 9) {
alrdy.push(i);
i++;
};
do {
townparkperson[slotused][ke] = 0;
rand = randRange(0, 10);
if (rand < 7){
ambelke = randRange(0, (alrdy.length - 1));
jadie = alrdy[ambelke];
townparkperson[slotused][ke] = jadie;
alrdy.splice(ambelke, 1);
};
ke++;
jum--;
} while (jum > 0);
trace(("HASILE TOWN PARK PERSON : " + townparkperson[slotused]));
}
public function loadslot(){
var i:*;
var obj:*;
mcmainmenu.btnplay.visible = false;
mcmainmenu.btncredits.visible = false;
mcmainmenu.btnslot1.visible = true;
mcmainmenu.btnslot2.visible = true;
mcmainmenu.btnback.visible = true;
i = 1;
while (i <= 2) {
obj = mcmainmenu.getChildByName(("btndelete" + i));
if (charstat[i][0] == -1){
obj.visible = false;
} else {
obj.visible = true;
};
i++;
};
}
public function promotiongood(e:MouseEvent):void{
soundyes.play(0, 1, new SoundTransform(volsfx));
mccarrerpromotion.gotoAndStop(1);
mccareerlevelup.mc2.gotoAndStop(charstat[slotused][23]);
if (currentLabel == "office"){
loadofficetest();
} else {
if (currentLabel == "studio"){
loadstudiotest();
} else {
if (currentLabel == "stadium"){
loadstadiumtest();
};
};
};
}
public function kurangidesire(){
if (charstat[slotused][32] != 999){
var _local1 = charstat[slotused];
var _local2 = 33;
var _local3 = (_local1[_local2] - 1);
_local1[_local2] = _local3;
if (charstat[slotused][33] <= 0){
charstat[slotused][32] = -1;
charstat[slotused][33] = 2;
};
if (((!((charstat[slotused][32] == -1))) && (!((charstat[slotused][32] == 999))))){
mcuistat.txtdays.text = charstat[slotused][33];
};
cekdesirestatus();
};
}
public function gameoverwaiting(e:Event):void{
if (mcgameover.mc1.currentLabel == "paper"){
soundpaper.play(0, 1, new SoundTransform(volsfx));
} else {
if (mcgameover.mc1.currentLabel == "yes"){
soundyes.play(0, 1, new SoundTransform(volsfx));
} else {
if (mcgameover.mc1.currentLabel == "sound"){
soundresult.play(0, 1, new SoundTransform(volsfx));
};
};
};
}
public function pluscontribute(e:MouseEvent):void{
soundclick.play(0, 1, new SoundTransform(volsfx));
trace(((((("cek : " + uangtotal) + " ") + pengurangan) + " ") + startgold));
if (((((uangtotal - pengurangan) >= startgold)) && ((charstat[slotused][38] < gamegoal)))){
uangtotal = (uangtotal - pengurangan);
mcendlife.mc5.mc1.mc1.mc1.txt1.text = uangtotal;
contributemoney = (contributemoney + pengurangan);
mcendlife.mc5.mc1.mc2.mc1.txt1.text = contributemoney;
charstat[slotused][38] = (charstat[slotused][38] + pengurangan);
loadgoal(mcendlife.mc5.mc1.mcgoal);
mcendlife.mc6.mc1.mc6.mc1.txt1.text = uangtotal;
if (charstat[slotused][38] >= gamegoal){
naekta = true;
if (mcendlife.mcgoalfx.currentFrame == 1){
soundwin.play(0, 1, new SoundTransform(volsfx));
mcendlife.mcgoalfx.gotoAndPlay(2);
};
};
};
}
public function drinkclick(e:MouseEvent):void{
soundclick.play(0, 1, new SoundTransform(volsfx));
cleanupeffectimage();
removealluiimage();
uipopuphealth = 2;
stage.addEventListener(MouseEvent.CLICK, resetuipopup);
createuipopup("GRAB A SNACK", e.currentTarget);
}
public function storyskip(e:Event):void{
if (paperbool == false){
textindex = 8;
storyphase = 0;
textwaiting = textwaitingtemp;
paperbool = true;
mcstory.gotoAndStop("paper");
} else {
mcstory.gotoAndStop(mcstory.totalFrames);
};
}
public function loadspeedsymbol(){
var speede:*;
var i:*;
var obj:*;
speede = [undefined, 25, 55];
stage.frameRate = speede[speedtime];
i = 1;
while (i <= 2) {
obj = mcclock.getChildByName(("btn" + i));
if (i != speedtime){
obj.visible = false;
} else {
obj.visible = true;
};
i++;
};
}
public function houseover(e:MouseEvent):void{
e.currentTarget.gotoAndStop(2);
}
public function nextpage(e:MouseEvent):void{
var obj:*;
if (pageindex != 6){
obj = mcendlife.getChildByName(("mc" + pageindex));
if (obj.currentLabel == "ok"){
soundpaper.play(0, 1, new SoundTransform(volsfx));
obj = mcendlife.getChildByName(("mc" + pageindex));
obj.gotoAndPlay("left1");
obj = mcendlife.getChildByName(("mc" + int((int(pageindex) + int(1)))));
obj.gotoAndPlay("left2");
trace(("GO : " + obj.name));
obj.visible = true;
obj = null;
pageindex++;
if (donepage[pageindex] == 0){
hidearrow();
} else {
loadarrow();
};
if (donepage[pageindex] == 0){
pagestatus = 1;
pagephase = 1;
stage.addEventListener(Event.ENTER_FRAME, endlifewaiting);
};
};
};
}
public function randRange(min:Number, max:Number):Number{
var randomNum:Number;
randomNum = (Math.floor((Math.random() * ((max - min) + 1))) + min);
return (randomNum);
}
public function endlifewaiting(e:Event):void{
var obj:*;
var i:*;
var jadi:*;
var obj2:*;
obj = mcendlife.getChildByName(("mc" + pageindex));
if (pagestatus == 1){
if (obj.currentLabel == "ok"){
pagestatus = 2;
if (pageindex == 1){
obj.mc1.mc1.mc1.txt1.text = (("Your property value is " + hargarumah) + " coins.");
obj.mc1.mc1.mc1.txt1.setTextFormat(textwarnamerah, 23, (24 + hargarumah.toString().length));
obj.mc1.mc1.gotoAndPlay(2);
soundresult.play(0, 1, new SoundTransform(volsfx));
} else {
if ((((pageindex == 2)) || ((pageindex == 3)))){
obj.mc1.mc1.gotoAndPlay(2);
soundresult.play(0, 1, new SoundTransform(volsfx));
} else {
if (pageindex == 4){
trace("a");
finalsport = charstat[slotused][16];
finalint = charstat[slotused][17];
finalcreat = charstat[slotused][18];
trace(((((("Awal : " + finalsport) + " ") + finalint) + " ") + finalcreat));
i = 1;
while (i < relationshipsymbol.length) {
if (relationshipsymbol[i] == 2){
tambahansport = (tambahansport + statbonus[i]);
} else {
if (relationshipsymbol[i] == 3){
tambahanint = (tambahanint + statbonus[i]);
} else {
if (relationshipsymbol[i] == 4){
tambahancreat = (tambahancreat + statbonus[i]);
};
};
};
i++;
};
finalmaxage = int((jobreached[slotused][1] * 7));
finalstat = jobreached[slotused][2];
finalroyalties = (jobreached[slotused][3] * 150);
if (jobreached[slotused][1] == 0){
obj.mc1.mcjob1.mc1.txt1.text = "No reward";
} else {
obj.mc1.mcjob1.mc1.txt1.text = (("Max age increased by " + finalmaxage) + " days.");
};
trace("c");
if (jobreached[slotused][2] == 0){
obj.mc1.mcjob2.mc1.txt1.text = "No reward";
} else {
obj.mc1.mcjob2.mc1.txt1.text = ("Sport, Intelligence and Creativity increase by : " + finalstat);
};
if (jobreached[slotused][3] == 0){
obj.mc1.mcjob3.mc1.txt1.text = "No reward";
} else {
obj.mc1.mcjob3.mc1.txt1.text = ("Music royalty coins gained : " + finalroyalties);
};
trace("d");
finalsport = (finalsport + (finalstat + tambahansport));
finalint = (finalint + (finalstat + tambahanint));
finalcreat = (finalcreat + (finalstat + tambahancreat));
trace(((((("jadi : " + finalsport) + " ") + finalint) + " ") + finalcreat));
obj.mc1.mc1.mc1.mc1.gotoAndStop(6);
obj.mc1.mc2.mc1.mc1.gotoAndStop(7);
obj.mc1.mc3.mc1.mc1.gotoAndStop(8);
obj.mc1.mc1.removeEventListener(MouseEvent.MOUSE_OVER, oversound);
obj.mc1.mc1.addEventListener(MouseEvent.MOUSE_OVER, oversound);
obj.mc1.mc1.removeEventListener(MouseEvent.MOUSE_OVER, finalstatover);
obj.mc1.mc1.addEventListener(MouseEvent.MOUSE_OVER, finalstatover);
obj.mc1.mc1.removeEventListener(MouseEvent.MOUSE_OUT, finalstatout);
obj.mc1.mc1.addEventListener(MouseEvent.MOUSE_OUT, finalstatout);
obj.mc1.mc2.removeEventListener(MouseEvent.MOUSE_OVER, oversound);
obj.mc1.mc2.addEventListener(MouseEvent.MOUSE_OVER, oversound);
obj.mc1.mc2.removeEventListener(MouseEvent.MOUSE_OVER, finalstatover);
obj.mc1.mc2.addEventListener(MouseEvent.MOUSE_OVER, finalstatover);
obj.mc1.mc2.removeEventListener(MouseEvent.MOUSE_OUT, finalstatout);
obj.mc1.mc2.addEventListener(MouseEvent.MOUSE_OUT, finalstatout);
obj.mc1.mc3.removeEventListener(MouseEvent.MOUSE_OVER, oversound);
obj.mc1.mc3.addEventListener(MouseEvent.MOUSE_OVER, oversound);
obj.mc1.mc3.removeEventListener(MouseEvent.MOUSE_OVER, finalstatover);
obj.mc1.mc3.addEventListener(MouseEvent.MOUSE_OVER, finalstatover);
obj.mc1.mc3.removeEventListener(MouseEvent.MOUSE_OUT, finalstatout);
obj.mc1.mc3.addEventListener(MouseEvent.MOUSE_OUT, finalstatout);
obj.mc1.mcjob1.mc1.gotoAndStop(1);
obj.mc1.mcjob2.mc1.gotoAndStop(2);
obj.mc1.mcjob3.mc1.gotoAndStop(3);
obj.mc1.mc1.mc1.txt1.text = finalsport;
obj.mc1.mc2.mc1.txt1.text = finalint;
obj.mc1.mc3.mc1.txt1.text = finalcreat;
trace("e");
obj.mc1.mc1.gotoAndPlay(2);
soundresult.play(0, 1, new SoundTransform(volsfx));
heritagesports = Math.round((finalsport * relativesstatrate));
heritageint = Math.round((finalint * relativesstatrate));
heritagecreat = Math.round((finalcreat * relativesstatrate));
if ((((heritagesports == 0)) && ((finalsport == 1)))){
heritagesports = 1;
};
if ((((heritageint == 0)) && ((finalint == 1)))){
heritageint = 1;
};
if ((((heritagecreat == 0)) && ((finalcreat == 1)))){
heritagecreat = 1;
};
mcendlife.mc6.mc1.mc2.mc1.mc1.gotoAndStop(6);
mcendlife.mc6.mc1.mc3.mc1.mc1.gotoAndStop(7);
mcendlife.mc6.mc1.mc4.mc1.mc1.gotoAndStop(8);
mcendlife.mc6.mc1.mc2.mc1.txt1.text = heritagesports;
mcendlife.mc6.mc1.mc3.mc1.txt1.text = heritageint;
mcendlife.mc6.mc1.mc4.mc1.txt1.text = heritagecreat;
} else {
if (pageindex == 5){
soundresult.play(0, 1, new SoundTransform(volsfx));
loadgoal(obj.mc1.mcgoal);
trace("a");
uangtotal = ((((hargarumah + hargadompet) + hargarare) + finalroyalties) + moneysupport);
contributemoney = 0;
i = 1;
while (i < relationshipsymbol.length) {
if (relationshipsymbol[i] == 1){
uangtotal = (uangtotal + statbonus[i]);
};
i++;
};
obj.mc1.mc1.mc1.txt1.text = uangtotal;
obj.mc1.mc2.mc1.txt1.text = contributemoney;
trace("b");
if (charstat[slotused][38] >= gamegoal){
obj.mc1.mc2.mc1.btnplus.visible = false;
obj.mc1.mc2.mc1.btnmin.visible = false;
};
obj.mc1.mc2.mc1.btnplus.removeEventListener(MouseEvent.MOUSE_OVER, oversound);
obj.mc1.mc2.mc1.btnplus.addEventListener(MouseEvent.MOUSE_OVER, oversound);
obj.mc1.mc2.mc1.btnplus.removeEventListener(MouseEvent.CLICK, pluscontribute);
obj.mc1.mc2.mc1.btnplus.addEventListener(MouseEvent.CLICK, pluscontribute);
obj.mc1.mc2.mc1.btnmin.removeEventListener(MouseEvent.MOUSE_OVER, oversound);
obj.mc1.mc2.mc1.btnmin.addEventListener(MouseEvent.MOUSE_OVER, oversound);
obj.mc1.mc2.mc1.btnmin.removeEventListener(MouseEvent.CLICK, minuscontribute);
obj.mc1.mc2.mc1.btnmin.addEventListener(MouseEvent.CLICK, minuscontribute);
trace("c");
obj.mc1.mc1.gotoAndPlay(2);
var _local6 = startup;
var _local7 = slotused;
var _local8 = (_local6[_local7] - 1);
_local6[_local7] = _local8;
jadi = startup[slotused];
if (jadi <= 0){
jadi = 0;
};
obj.mc1.mc3.mc1.txt1.text = ("Startup sets left : " + jadi);
mcendlife.mc6.mc1.mc6.mc1.txt1.text = uangtotal;
} else {
if (pageindex == 6){
soundresult.play(0, 1, new SoundTransform(volsfx));
obj.mc1.mc1.gotoAndPlay(2);
};
};
};
};
};
};
} else {
if (pagestatus == 2){
if (pageindex == 1){
obj2 = obj.mc1.getChildByName(("mc" + pagephase));
if (obj2.currentFrame == obj2.totalFrames){
soundresult.play(0, 1, new SoundTransform(volsfx));
pagephase++;
obj2 = obj.mc1.getChildByName(("mc" + pagephase));
if (pagephase == 2){
obj2.mc1.txt1.text = (("Your cash and deposit value is " + hargadompet) + " coins.");
obj2.mc1.txt1.setTextFormat(textwarnamerah, 30, (31 + hargadompet.toString().length));
obj2.gotoAndPlay(2);
} else {
if (pagephase == 3){
obj2.mc1.txt1.text = (("Your rare collection was sold and valued at " + hargarare) + " coins.");
obj2.mc1.txt1.setTextFormat(textwarnamerah, 44, (45 + hargarare.toString().length));
obj2.gotoAndPlay(2);
stage.removeEventListener(Event.ENTER_FRAME, endlifewaiting);
donepage[pageindex] = 1;
loadarrow();
};
};
};
obj2 = null;
} else {
if ((((pageindex == 2)) || ((pageindex == 3)))){
obj2 = obj.mc1.getChildByName(("mc" + pagephase));
if (obj2.currentFrame == obj2.totalFrames){
soundresult.play(0, 1, new SoundTransform(volsfx));
trace("DONE");
pagephase++;
if ((((((pagephase == 7)) && ((pageindex == 2)))) || ((((pagephase == 6)) && ((pageindex == 3)))))){
loadarrow();
obj.mc1.mcline.gotoAndPlay(2);
stage.removeEventListener(Event.ENTER_FRAME, endlifewaiting);
donepage[pageindex] = 1;
} else {
obj2 = obj.mc1.getChildByName(("mc" + pagephase));
obj2.gotoAndPlay(2);
};
};
obj2 = null;
} else {
if (pageindex == 4){
if (pagephase >= 5){
obj2 = obj.mc1.getChildByName(("mcjob" + (pagephase - 4)));
if (obj2.currentFrame == obj2.totalFrames){
soundresult.play(0, 1, new SoundTransform(volsfx));
pagephase++;
if (pagephase == 8){
loadarrow();
stage.removeEventListener(Event.ENTER_FRAME, endlifewaiting);
donepage[pageindex] = 1;
} else {
obj2 = obj.mc1.getChildByName(("mcjob" + (pagephase - 4)));
obj2.gotoAndPlay(2);
};
};
obj = null;
};
if (pagephase == 4){
obj2 = obj.mc1.mcline;
if (obj2.currentFrame == obj2.totalFrames){
soundresult.play(0, 1, new SoundTransform(volsfx));
pagephase++;
obj2 = obj.mc1.mcjob1.gotoAndPlay(2);
};
obj2 = null;
} else {
if ((((pagephase >= 1)) && ((pagephase <= 3)))){
obj2 = obj.mc1.getChildByName(("mc" + pagephase));
if (obj2.currentFrame == obj2.totalFrames){
soundresult.play(0, 1, new SoundTransform(volsfx));
pagephase++;
if (pagephase == 4){
obj2 = obj.mc1.mcline;
obj2.gotoAndPlay(2);
} else {
obj2 = obj.mc1.getChildByName(("mc" + pagephase));
obj2.gotoAndPlay(2);
};
};
obj2 = null;
};
};
} else {
if (pageindex == 5){
obj2 = obj.mc1.getChildByName(("mc" + pagephase));
if (obj2.currentFrame == obj2.totalFrames){
soundresult.play(0, 1, new SoundTransform(volsfx));
pagephase++;
if (pagephase == 4){
loadarrow();
stage.removeEventListener(Event.ENTER_FRAME, endlifewaiting);
donepage[pageindex] = 1;
} else {
obj2 = obj.mc1.getChildByName(("mc" + pagephase));
obj2.gotoAndPlay(2);
};
};
obj2 = null;
} else {
if (pageindex == 6){
obj2 = obj.mc1.getChildByName(("mc" + pagephase));
if (obj2.currentFrame == obj2.totalFrames){
soundresult.play(0, 1, new SoundTransform(volsfx));
pagephase++;
if (pagephase == 7){
loadarrow();
stage.removeEventListener(Event.ENTER_FRAME, endlifewaiting);
donepage[pageindex] = 1;
mcendlife.mc6.mc1.btnyay.visible = true;
} else {
obj2 = obj.mc1.getChildByName(("mc" + pagephase));
obj2.gotoAndPlay(2);
};
};
obj2 = null;
};
};
};
};
};
};
};
obj = null;
}
public function sfxmute(e:MouseEvent):void{
if (volsfx == 1){
volsfx = 0;
sfxon = false;
soundsetting[1] = 0;
} else {
volsfx = 1;
sfxon = true;
soundsetting[1] = 1;
};
so.data.soundsetting[1] = volsfx;
if (soundchannel2 != null){
soundchannel2.soundTransform = new SoundTransform(volsfx);
};
loadsoundsetting();
}
public function cekrepaircounter(){
var ada:*;
var potong:*;
var xe:*;
var ye:*;
trace("SCANNING COUNTER LIST");
ada = false;
do {
ada = false;
potong = -1;
i = 0;
while (i < tablecounterslot[slotused].length) {
xe = tablecounterslot[slotused][i][0];
ye = tablecounterslot[slotused][i][1];
if (houseitems[slotused][xe][ye] != -1){
trace(((("items di : " + xe) + ",") + ye));
trace(("ya ini ada : " + houseitems[slotused][xe][ye]));
trace(("house item name : " + houseitemname[houseitems[slotused][xe][ye][0]][houseitems[slotused][xe][ye][1]]));
if (((!((houseitemname[houseitems[slotused][xe][ye][0]][houseitems[slotused][xe][ye][1]] == "TABLE"))) && (!((houseitemname[houseitems[slotused][xe][ye][0]][houseitems[slotused][xe][ye][1]] == "COUNTER"))))){
potong = i;
break;
};
} else {
trace("iki ga ada isie");
potong = i;
break;
};
i++;
};
if (potong != -1){
ada = true;
tablecounterslot[slotused].splice(potong, 1);
};
} while (ada == true);
counterlist();
}
public function charmove(tox:int, toy:int){
var i:*;
var hasile:*;
var j:*;
trace("CEK CHAR MOVE");
charnointeraction();
i = 0;
while (i < housesize[charstat[slotused][13]]) {
j = 0;
while (j < housesize[charstat[slotused][13]]) {
tileimage[i][j].txt1.visible = false;
j++;
};
i++;
};
hasile = carijalandonkie(charimage[0].xe, charimage[0].ye, tox, toy);
trace(("LENGTH " + hasile.length));
if (hasile.length > 0){
charimage[0].arraymove = [];
charimage[0].stat = "waitwalk";
i = 0;
while (i < hasile.length) {
charimage[0].arraymove[i] = [hasile[i].x, hasile[i].y];
i++;
};
} else {
trace("NOT THIS");
createtext("Something is in my way.");
};
}
public function removeallobjectfunction(remove:Boolean){
var i:*;
i = 0;
while (i < objectimage.length) {
if (remove == true){
if ((((houseitemname[objectimage[i].nomor][objectimage[i].tipe] == "TABLE")) || ((houseitemname[objectimage[i].nomor][objectimage[i].tipe] == "COUNTER")))){
objectimage[i].mcplate1.mouseEnabled = false;
objectimage[i].mcplate1.mouseChildren = false;
objectimage[i].mcplate2.mouseEnabled = false;
objectimage[i].mcplate2.mouseChildren = false;
};
objectimage[i].mouseEnabled = false;
objectimage[i].mouseChildren = false;
objectimage[i].buttonMode = false;
objectimage[i].removeEventListener(MouseEvent.MOUSE_OVER, objectover);
objectimage[i].removeEventListener(MouseEvent.MOUSE_OUT, objectout);
objectimage[i].removeEventListener(MouseEvent.CLICK, objectclick);
} else {
objectimage[i].mouseEnabled = true;
objectimage[i].mouseChildren = true;
objectimage[i].buttonMode = true;
objectimage[i].addEventListener(MouseEvent.MOUSE_OVER, objectover);
objectimage[i].addEventListener(MouseEvent.MOUSE_OUT, objectout);
objectimage[i].addEventListener(MouseEvent.CLICK, objectclick);
};
i++;
};
}
public function cektextposition(mader:Object){
var clickPoint1:Point;
var obj:*;
if ((((((((((((currentLabel == "office")) || ((currentLabel == "studio")))) || ((currentLabel == "stadium")))) || ((currentLabel == "park")))) || ((currentLabel == "cafe")))) || ((currentLabel == "townpark")))){
if (charimage[0].stat == "WORK"){
mader.x = mctable.x;
mader.y = (mctable.y - 45);
} else {
if (charimage[0].stat == "SING"){
mader.x = mcmic.x;
mader.y = (mcmic.y - 45);
} else {
if (charimage[0].stat == "RUN"){
clickPoint1 = mcflag.mc1.localToGlobal(new Point(0, 0));
mader.x = clickPoint1.x;
mader.y = (clickPoint1.y - 45);
} else {
if (charimage[0].stat == "REST"){
mader.x = mcsofa.x;
mader.y = (mcsofa.y - 45);
} else {
if (charimage[0].stat == "USE BATHROOM"){
mader.x = btntoilet.x;
mader.y = (btntoilet.y - 5);
} else {
if (charimage[0].stat == "PERFORM"){
mader.x = mcperform.x;
mader.y = (mcperform.y - 5);
} else {
if (charimage[0].stat == "TAKE A BATH"){
mader.x = mcpond.x;
mader.y = (mcpond.y - 5);
} else {
if (charimage[0].stat == "TAKE A DUMP"){
mader.x = mcbush.x;
mader.y = (mcbush.y - 5);
} else {
if (charimage[0].stat == "SLEEP IN PARK"){
mader.x = mcsofa.x;
mader.y = (mcsofa.y - 5);
} else {
if (charimage[0].stat == "PIANO PERFORM"){
mader.x = mcpiano.x;
mader.y = (mcpiano.y - 5);
} else {
if (charimage[0].stat == "FLUTE PERFORM"){
mader.x = mcflute.x;
mader.y = (mcflute.y - 5);
} else {
if (charimage[0].stat == "READ NEWSPAPER"){
mader.x = mcbook.x;
mader.y = (mcbook.y - 5);
} else {
if (charimage[0].stat == "JOGGING"){
clickPoint1 = mcflag.mc1.localToGlobal(new Point(0, 0));
mader.x = clickPoint1.x;
mader.y = (clickPoint1.y - 45);
} else {
mader.x = charimage[0].x;
mader.y = (charimage[0].y - 45);
};
};
};
};
};
};
};
};
};
};
};
};
};
} else {
trace(("cek cek : " + charimage[0].objectto));
if (charimage[0].visible == false){
obj = objectimage[charimage[0].objectto];
mader.x = obj.x;
mader.y = (obj.y - 45);
obj = null;
} else {
mader.x = charimage[0].x;
mader.y = (charimage[0].y - 45);
};
};
if ((mader is staticon)){
mader.x = (mader.x + randRange(-30, 30));
mader.y = (mader.y + randRange(-20, 20));
};
}
public function cekitemwithslotplacement(nomor:int, tipe:int, xe:int, ye:int){
var jumlahe:*;
if (houseitemname[nomor][tipe] == "REFRIGERATOR"){
jumlahe = smallrefri;
if (nomor == 16){
jumlahe = bigrefri;
};
refrigeratorstock[slotused][refrigeratorstock[slotused].length] = [xe, ye, jumlahe];
} else {
if ((((houseitemname[nomor][tipe] == "TABLE")) || ((houseitemname[nomor][tipe] == "COUNTER")))){
if (houseitemname[nomor][tipe] == "TABLE"){
tablecounterslot[slotused][tablecounterslot[slotused].length] = [xe, ye, 0, 0, 0, 0, 0, 0, 0, 0];
} else {
tablecounterslot[slotused][tablecounterslot[slotused].length] = [xe, ye, 0, -1, 0, 0, 0, 0, 0, 0];
};
} else {
if (houseitemname[nomor][tipe] == "TRASH BIN"){
trashbinslot[slotused][trashbinslot[slotused].length] = [xe, ye, 0];
};
};
};
}
public function houseout(e:MouseEvent):void{
e.currentTarget.gotoAndStop(1);
}
public function naminginput(event:KeyboardEvent):void{
var sounde:*;
if (stage.focus == mcinput.mc1.txt1){
currentname = mcinput.mc1.txt1.text;
sounde = [soundtyping1, soundtyping2, soundtyping3];
sounde[randRange(0, (sounde.length - 1))].play(0, 1, new SoundTransform(volsfx));
};
}
public function streetgocafe(e:MouseEvent):void{
soundclick.play(0, 1, new SoundTransform(volsfx));
if (charstat[slotused][5] < walkenergy){
createtext("I'm too tired.");
} else {
charstat[slotused][5] = (charstat[slotused][5] - walkenergy);
if (charstat[slotused][5] <= 0){
charstat[slotused][5] = 0;
};
cleanupstreet();
loadspeedsymbol();
transisi("cafe");
};
}
public function itungworkrate(){
var workratebonus:*;
workrate = ((charstat[slotused][17] * 0.09) + 0.09);
workratebonus = (((((charstat[slotused][3] + charstat[slotused][4]) + charstat[slotused][5]) + charstat[slotused][6]) + charstat[slotused][7]) / (statmax * 5));
trace(((("COMPLETION AT : " + workcompletion) + " RATE : ") + workrate));
trace(("bonus : " + workratebonus));
workrate = (workrate + (workrate * workratebonus));
trace(("final rate : " + workrate));
}
function frame1(){
stop();
relativesyay = 0;
txtlog.mouseEnabled = false;
finalmaxage = 0;
soundclick = new buttonsound();
slotused = 0;
startupdefault = 2;
bgmon = true;
sfxon = true;
volbgm = 1;
volsfx = 1;
crowdappear = 18;
crowdgone = 2;
maxage = 14;
gamegoal = 2000;
housesize = [undefined, 6, 8, 10];
relationshiphint = [undefined, ["What's trending now?", "You read the news?", "The market is stable."], ["I miss my bunny…", "My house is super cozy!", "It is always raining when I'm home."], ["Cheesecake is my favorite!", "I'm super hungry.", "I need to buy pudding."], ["Have you played Vault of Xenos?", "I like playing games at Armor Games!", "I love retro RPGs."], ["You must do this before that.", "Just work hard!", "I'm exhausted."], ["A new theater is open!", "OMG, that movie is hilarious!", "I prefer the cowboy era."], ["The city lights are romantic.", "I hope it rains tonight!", "Yeah, the weather is fine."]];
relationpreferences = [undefined, [undefined, 1, 3, 6, 3], [undefined, 5, 4, 5, 4], [undefined, 5, 5, 2, 2], [undefined, 5, 5, 5, 2], [undefined, 1, 6, 6, 4], [undefined, 1, 5, 5, 2], [undefined, 7, 3, 5, 3], [undefined, 1, 5, 5, 7], [undefined, 5, 5, 5, 7], [undefined, 7, 3, 2, 2], [undefined, 6, 3, 2, 7]];
relationshipoption = [undefined, [undefined, 1, 5, 6, 7], [undefined, 3, 4, 5, 6], [undefined, 2, 3, 5, 6], [undefined, 2, 3, 4, 7]];
relationshipcost = [1, 1, 2, 2, 5];
relationshipname = [undefined, "Mina", "Greg", "Mr.Willem", "Mr.Chong", "Brad", "Nalisa", "Mr.John", "Peter", "May", "Matilda", "Tom"];
relationshipgender = [undefined, 1, 2, 2, 2, 2, 1, 2, 2, 1, 1, 2];
relationshipsymbol = [undefined, 1, 3, 1, 1, 4, 1, 2, 2, 1, 1, 3];
relationshipmultiplier = [undefined, 25, 1, 50, 12, 1, 12, 1, 1, 25, 50, 1];
relationshipstat = [undefined, "Stranger", "Just Met", "Friend", "Best Friend", "Life Friend"];
relationshipcolor = [undefined, "0XFF0000", "0XFFFF00", "0X0000FF", "0X00FF00", "0X00FF00"];
jobprogperlevel = 100;
jobfrom = 9;
jobentertime = 11;
jobto = 17;
trashmax = 5;
statmax = 100;
statcarrermax = 100;
colorgreen = new Color();
colorgreen.setTint(uint(0xCC00), 0.6);
colorred = new Color();
colorred.setTint(uint(0xFF0000), 0.6);
colorbright = new Color();
colorbright.brightness = 0.5;
colordark = new Color();
colordark.brightness = -0.5;
colorsuperdark = new Color();
colorsuperdark.brightness = -0.8;
colornormal = new Color();
colornormal.brightness = 0;
textwarnamerah = new TextFormat();
textwarnamerah.color = 0xFF0000;
rareitem = new GlowFilter();
rareitem.blurX = 6;
rareitem.blurY = 6;
rareitem.color = 0xFFFF00;
rareitem.strength = 2.4;
rareitem.quality = 1;
startgold = 1050;
moneysupport = 1000;
charstat = [];
houseitems = [];
refrigeratorstock = [];
tablecounterslot = [];
trashbinslot = [];
investment = [];
relationship = [];
relationshiphistory = [];
crowd = [];
tutoriallife = [];
tutorialjob = [];
tutorialsave = [];
tutorialdesire = [];
promostat = [];
tutorialshoptime = [];
tutorialshop = [];
jobreached = [];
jobpercentage = [];
startup = [];
soundsetting = [1, 1];
cafe = [undefined, 1, 1, 1];
cafereload = [];
townparkperson = [];
donefirstjob = [];
tutorialshop2 = [];
tutorialjobtime = [];
tutorialfirstdayjob = [];
customContextMenu = new ContextMenu();
customContextMenu.hideBuiltInItems();
contextmenu = new ContextMenuItem("Goody Gameworks");
contextmenu.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, clickGoodyFB);
customContextMenu.customItems.push(contextmenu);
contextMenu = customContextMenu;
btnyay2.removeEventListener(MouseEvent.CLICK, testsubmit);
btnyay2.addEventListener(MouseEvent.CLICK, testsubmit);
btnyay.visible = false;
btnyay.removeEventListener(MouseEvent.CLICK, preloaderyay);
btnyay.addEventListener(MouseEvent.CLICK, preloaderyay);
stage.addEventListener(Event.ENTER_FRAME, loading);
btnag.removeEventListener(MouseEvent.CLICK, clickAG);
btnag.addEventListener(MouseEvent.CLICK, clickAG);
btngoody.removeEventListener(MouseEvent.CLICK, clickGoodyFB);
btngoody.addEventListener(MouseEvent.CLICK, clickGoodyFB);
so = SharedObject.getLocal("AGL");
so.flush(10000);
if (so.size == 0){
createnewso();
};
armor = true;
AGIconnected = false;
AGIcontinue = false;
guestbool = true;
connected = false;
agiURL = "http://agi.armorgames.com/assets/agi/AGI2.swf";
Security.allowDomain("agi.armorgames.com");
cekarmorornot();
cekpatch();
if (armor == true){
trace(("CEK ARMOR : " + armor));
loader = new Loader();
loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, function (e:IOErrorEvent):void{
});
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, function (e:Event):void{
var e = e;
agi = e.currentTarget.content;
agi.connect({stage:stage, apiKey:"E62CD177-6B0A-4874-A888-280E96491BBA", callback:function (data:Object):void{
if (data.success){
AGIconnected = true;
loadAGI();
} else {
trace(data.error);
};
}});
});
loader.load(new URLRequest(agiURL));
} else {
samainlocaldgnsave();
updatelocalsave();
};
}
function frame2(){
soundmainmenu = new mainmenusound();
soundingame1 = new ingamesound1();
soundingame2 = new ingamesound2();
sounddoor = new doorclosesound();
soundtext = new textsound();
soundtutorial = new tutorialsound();
soundclock = new clocksound();
soundpaper = new papersound();
soundtyping1 = new typingsound1();
soundtyping2 = new typingsound2();
soundtyping3 = new typingsound3();
soundyes = new yessound();
soundwrite = new writesound();
soundthunder1 = new thundersound1();
soundthunder2 = new thundersound2();
soundrain = new rainsound();
soundcarpass = new passcarsound();
soundcricket = new cricketsound();
soundbird1 = new distantbirdsound1();
soundbird2 = new distantbirdsound2();
soundrepair1 = new repairsound1();
soundrepair2 = new repairsound2();
soundspark1 = new sparksound1();
soundspark2 = new sparksound2();
soundtv = new tvsound();
soundgame1 = new gamesound1();
soundgame2 = new gamesound2();
soundgame3 = new gamesound3();
soundtalk1 = new talksound1();
soundtalk2 = new talksound2();
soundflush = new flushsound();
soundbath = new bathsound();
sounddeposit = new depositsound();
soundcleanuptrash = new cleanuptrashsound();
soundwashdish = new washdishsound();
soundcook = new cooksound();
soundpiano1 = new pianosound1();
soundpiano2 = new pianosound2();
soundpiano3 = new pianosound3();
soundpiano4 = new pianosound4();
soundpiano5 = new pianosound5();
soundpiano6 = new pianosound6();
soundpiano7 = new pianosound7();
soundflute1 = new flutesound1();
soundflute2 = new flutesound2();
soundflute22 = new flutesound22();
soundflute3 = new flutesound3();
soundsleep = new sleepsound();
soundgainpoint = new gainpointsound();
soundnewdesire = new newdesiresound();
sounddesirecompleted = new desirecompletedsound();
soundtest = new testsound();
soundno = new nosound();
soundcoin = new coinsound();
soundjump = new jumpsound();
soundfall = new fallsound();
soundplate = new platesound();
soundchewing = new chewingsound();
soundwork = new worksound();
soundresult = new resultsound();
soundresultdone = new doneresultsound();
soundtreadmill = new treadmillsound();
soundlose = new losesound();
soundwin = new winsound();
soundphone = new phonesound();
}
public function loadpaper(){
mcstory.mc1.mc1.gotoAndPlay("idle2");
mcinput.mc1.txt1.text = standarttext;
mcinput.gotoAndStop(2);
stage.removeEventListener(Event.ENTER_FRAME, storywaiting);
mcstory.stop();
mcinput.page = 1;
loadinput();
}
public function tambadishes(){
}
public function nextshop(e:MouseEvent):void{
if (e.currentTarget.currentFrame == 1){
soundclick.play(0, 1, new SoundTransform(volsfx));
removealluiimage();
stage.removeEventListener(Event.ENTER_FRAME, furniturefollowwaiting);
mcuishop.itemindex++;
loaduishop();
};
}
function frame8(){
stop();
loadsoundsetting();
trace("STREET");
mcuistat.visible = true;
mcclock.visible = true;
mcpositioning.visible = false;
mcitemsdesc.visible = false;
uiimage = [];
tileimage = [];
wallimage = [];
charimage = [];
tileclickerimage = [];
objectimage = [];
effectimage = [];
loadstreet();
}
function frame9(){
stop();
loadsoundsetting();
mcuistat.visible = true;
mcclock.visible = true;
mcpositioning.visible = false;
mcitemsdesc.visible = false;
uiimage = [];
tileimage = [];
wallimage = [];
charimage = [];
tileclickerimage = [];
objectimage = [];
effectimage = [];
loadoffice();
}
function frame4(){
stop();
mcsplash2.gotoAndStop(1);
mcsplash2.gotoAndPlay(2);
mcsplash2.buttonMode = true;
mcsplash2.addEventListener(MouseEvent.CLICK, clickGoodyFB);
stage.addEventListener(Event.ENTER_FRAME, waitsplash2);
}
function frame5(){
stop();
if (!(so.data.dishesclean is Number)){
so.data.dishesclean = 0;
};
if (!(so.data.pizzaorder is Number)){
so.data.pizzaorder = 0;
};
if (!(so.data.fullwork is Number)){
so.data.fullwork = 0;
};
if (!(so.data.goodfriend is Number)){
so.data.goodfriend = 0;
};
if (!(so.data.investmentcoin is Number)){
so.data.investmentcoin = 0;
};
if (!(so.data.lessrelatives is Number)){
so.data.lessrelatives = 0;
};
so.data.lessrelatives = relativesyay;
cekquestdone();
if (soundchannel5 != null){
soundchannel5.stop();
soundchannel5 = null;
};
allowsavetext = false;
speedtime = 1;
soundtimer = 0;
soundphase = 1;
donemasukrumah = false;
loadAGI2();
mcmainmenu.btnfb.removeEventListener(MouseEvent.CLICK, clickAGFB);
mcmainmenu.btnfb.addEventListener(MouseEvent.CLICK, clickAGFB);
mcmainmenu.btnarmor.removeEventListener(MouseEvent.CLICK, clickAG);
mcmainmenu.btnarmor.addEventListener(MouseEvent.CLICK, clickAG);
mcmainmenu.btnmoregames.removeEventListener(MouseEvent.CLICK, clickAG);
mcmainmenu.btnmoregames.addEventListener(MouseEvent.CLICK, clickAG);
mcmainmenu.btngoody.removeEventListener(MouseEvent.CLICK, clickGoodyFB);
mcmainmenu.btngoody.addEventListener(MouseEvent.CLICK, clickGoodyFB);
rareprice = 2;
rareresell = 5;
loadsoundsetting();
soundchannel1 = soundmainmenu.play(0, 999, new SoundTransform(volbgm));
coinimage = [];
uiimage = [];
tileimage = [];
wallimage = [];
charimage = [];
tileclickerimage = [];
objectimage = [];
effectimage = [];
wagescoin = 0;
wageswait = 0;
shoptablength = [0, 9, 5, 6, 33, 10, 3, 5, 8];
houseitemhp = [undefined, 12, 24, -1, -1, -1, -1, 40, 50, 60, 12, 24, 10, 15, 15, -1, -1, 10, 20, 20, 30, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 20, -1, 15, -1, -1, 30, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1];
statdesc = [undefined, "Happiness", "Feed level", "Energy", "Hygiene", "Bladder", "Sports", "Intelligence", "Creativity", "Relationship", "Environment"];
statdesc2 = [undefined, "", "", "", "", "", "Determines movement speed.", "Determines status gain rate.", "Determines performance tips earned.", "", "Determine happiness"];
houseitemname = [undefined, ["TV", "TV", "TV", "TV"], ["TV", "TV", "TV", "TV"], ["PHONE"], ["PHONE"], ["PHONE"], ["PHONE"], ["PC", "PC", "PC", "PC"], ["PC", "PC", "PC", "PC"], ["ARCADE", "ARCADE", "ARCADE", "ARCADE"], ["SHOWER"], ["SHOWER"], ["TOILET", "TOILET"], ["TOILET", "TOILET"], ["TOILET", "TOILET"], ["REFRIGERATOR", "REFRIGERATOR"], ["REFRIGERATOR", "REFRIGERATOR"], ["SINK"], ["SINK"], ["OVEN", "OVEN", "OVEN", "OVEN"], ["OVEN", "OVEN", "OVEN", "OVEN"], ["LAMP"], ["LAMP"], ["LAMP"], ["LAMP"], ["TRASH BIN"], ["PLANT"], ["PLANT"], ["PLANT"], ["PLANT"], ["PLANT"], ["PLANT"], ["CLOCK"], ["FISH TANK"], ["DIVIDER", "DIVIDER"], ["DIVIDER", "DIVIDER"], ["DIVIDER", "DIVIDER"], ["DIVIDER", "DIVIDER"], ["DIVIDER", "DIVIDER"], ["DIVIDER", "DIVIDER"], ["DIVIDER", "DIVIDER"], ["DIVIDER", "DIVIDER"], ["BOOK SHELF"], ["GLOBE"], ["CHESS TABLE"], ["HEADPHONE STAND"], ["FLUTE STAND"], ["PIANO", "PIANO", "PIANO", "PIANO"], ["YOGA MAT", "YOGA MAT"], ["DUMBELL RACK"], ["TREADMILL", "TREADMILL"], ["COUNTER", "COUNTER"], ["COUNTER", "COUNTER"], ["COUNTER", "COUNTER"], ["TABLE", "TABLE"], ["TABLE", "TABLE"], ["TABLE", "TABLE"], ["TABLE", "TABLE"], ["CHAIR", "CHAIR", "CHAIR", "CHAIR"], ["CHAIR", "CHAIR", "CHAIR", "CHAIR"], ["CHAIR", "CHAIR", "CHAIR", "CHAIR"], ["CHAIR", "CHAIR", "CHAIR", "CHAIR"], ["CHAIR", "CHAIR", "CHAIR", "CHAIR"], ["CHAIR", "CHAIR", "CHAIR", "CHAIR"], ["BED", "BED"], ["BED", "BED"], ["BED", "BED"]];
bigrefri = 20;
smallrefri = 10;
loadmainmenu();
}
function frame6(){
loadsoundsetting();
paperbool = false;
btnskip.removeEventListener(MouseEvent.MOUSE_OVER, oversound);
btnskip.addEventListener(MouseEvent.MOUSE_OVER, oversound);
btnskip.removeEventListener(MouseEvent.CLICK, storyskip);
btnskip.addEventListener(MouseEvent.CLICK, storyskip);
uwangetotal = charstat[slotused][2];
adresslist1 = ["Goody", "Armor", "Azeroth", "Tristam", "Leaf", "Baloon", "Bluebbly", "Silkly", "Rain", "Colorful"];
adresslist2 = ["Road", "Avenue", "Street"];
adressindex1 = randRange(0, (adresslist1.length - 1));
adressindex2 = randRange(0, (adresslist2.length - 1));
adressindex3 = randRange(0, 9);
adressindex4 = randRange(0, 9);
prizeindex = [undefined, [12, 21, 22, 23, 24, 25, 26, 27, 28, 51, 52, 53, 58], [1, 7, 10, 13, 14, 15, 17, 19, 32, 33, 42, 45, 48, 54, 59, 60, 61, 64], [2, 8, 9, 11, 16, 20, 32, 43, 46, 49, 55, 56, 57, 62, 63, 65]];
prizetaken = 0;
prize1 = prizeindex[1][randRange(0, (prizeindex[1].length - 1))];
prize2 = prizeindex[2][randRange(0, (prizeindex[1].length - 1))];
prize3 = prizeindex[3][randRange(0, (prizeindex[1].length - 1))];
currentname = "";
standarttext = "<NAME HERE>";
waitwrite = 0;
waitwriteindex = 0;
waitwritephase = 1;
waitwritetemp = 6;
donechangename = "";
doneselecthouse = -1;
textwaiting = 80;
textwaitingtemp = textwaiting;
textindex = 0;
storyphase = 0;
texte = ["You have arrived! I've been waiting for you!", "This town knows your family very well!", "It's a long story…", "Ah, where are my manners.", "I'm the mayor of Goody City.", "Well, the most important thing is that you're here!", "I believe that you will have a good time and a good life here.", "Let's finish the paperwork, shall we?", "Perfect, you have finished completing all the forms!", "I'm not gonna hassle you again, you can go straight to your home.", "Here's to the start of your new life in Goody City!", "See you again soon!", "The journey begins!"];
texte2 = ["You have arrived! I've been waiting for you!", "Welcome to Goody City, I'm the mayor!", "I always feel excited to welcome any newcomers to my city!", "You will be the foundation stone for your next next of kin!", "We provide start-up support for newcomers, don’t worry.", "The goal is to register your family name with the city by contributing enough money.", "I believe that you will have a good time and a good life here.", "Let's finish the paperwork, shall we?", "Perfect, you have finished completing all the forms!", "Remember that your life will have an effect on those of your next of kin.", "Here's to the start of your new life in Goody City!", "See you again soon!", "The journey begins!"];
texte3 = ["You have arrived! I've been waiting for you!", "Welcome to Goody City, I'm the mayor!", "I'm always excited to welcome good families to my city!", "Ah, I remember your family very well.", "They have proven themselves great assets to the city!", "Most of them are hard workers. I like it!", "Enjoy your time here!", "Let's finish the paperwork, shall we?", "Perfect, you have finished completing all the forms!", "Have fun living in the city!", "Here's to the start of your new life in Goody City!", "See you again soon!", "Goody life!"];
texteused = texte2;
if (charstat[slotused][38] >= gamegoal){
texteused = texte3;
} else {
if (charstat[slotused][1] != 1){
texteused = texte;
};
};
mcstory.mc1.mcstink.visible = false;
mcstory.mc1.mc1.mcint.visible = false;
charstat[slotused][1] = 1;
trace(((((("prize : " + prize1) + " ") + prize2) + " ") + prize3));
isie = [undefined, prize1, prize2, prize3];
i = 1;
while (i <= 3) {
obj = mcinput.mc2.getChildByName(("mc" + i));
penambahan = 0;
inimc = 0;
selisih = 0;
j = 0;
while (j < shoptablength.length) {
trace(((("dari : " + penambahan) + " sampe : ") + int((int(penambahan) + int(shoptablength[int((int(j) + int(1)))])))));
if ((((isie[i] >= penambahan)) && ((isie[i] <= (int(int(penambahan)) + int(int(shoptablength[int((int(j) + int(1)))]))))))){
inimc = int((int(j) + int(1)));
selisih = (isie[i] - penambahan);
trace(("MC KE : " + inimc));
break;
} else {
penambahan = (penambahan + int(shoptablength[int((int(j) + int(1)))]));
};
j++;
};
trace(("a " + startup[slotused]));
j = 1;
while (j <= 2) {
obj2 = obj.getChildByName(("mc" + j));
trace(obj2.name);
if (startup[slotused] > 0){
obj2.mcprizetxt.gotoAndStop(2);
} else {
obj2.mcprizetxt.gotoAndStop(1);
};
k = 1;
while (k <= 6) {
obj3 = obj2.mcprize.getChildByName(("mc" + k));
obj3.visible = false;
if (k == inimc){
if (startup[slotused] <= 0){
obj3.visible = true;
};
obj3.gotoAndStop(selisih);
};
k++;
};
j++;
};
i++;
};
houseprice = [undefined, 1000, 1100, 1200];
loadstory();
}
function frame7(){
stop();
onfainted = false;
trace(("CEK STAT PERTAMA : " + charstat[slotused][16]));
trace(("CEK STAT KEDUA : " + charstat[slotused][17]));
trace(("CEK STAT KETIGA : " + charstat[slotused][18]));
trace(("CEK STAT PERTAMA : " + parseInt(charstat[slotused][8])));
trace(("CEK STAT KEDUA : " + parseInt(charstat[slotused][9])));
trace(("CEK STAT KETIGA : " + parseInt(charstat[slotused][10])));
charstat[slotused][8] = parseInt(charstat[slotused][8]);
charstat[slotused][9] = parseInt(charstat[slotused][9]);
charstat[slotused][10] = parseInt(charstat[slotused][10]);
wagescointemp = 0;
trace(("person : " + townparkperson[slotused]));
doneloadtownparkperson = false;
walkenergy = 5;
waitertip = 5;
counterlist();
cekduplikatcounter();
cekduplikatrefrigerator();
cekrepaircounter();
i = 1;
while (i <= 3) {
if ((((jobreached[slotused][i] == undefined)) || ((jobreached[slotused][i] == "")))){
jobreached[slotused][i] = 0;
};
i++;
};
trace(((((((("CEK SOUND : " + volbgm) + " ") + volsfx) + " ") + bgmon) + " ") + sfxon));
loadsoundsetting();
rusaktime = 0;
adarusak = false;
activitytime = 0;
repairtime = 0;
rusaksound = 0;
thundertime = 0;
soundlist = [soundingame1, soundingame2];
discountprice = 0.7;
trace(("PROMO CEK : " + promostat[slotused]));
trace(((("WAKTU CEK " + charstat[slotused][19]) + " ") + charstat[slotused][20]));
shoprarity = 0;
hargashop = 0;
maxdeposit = 200;
tutorialindex = 0;
tutoriallifetext = ["Welcome to your comfy home. We have furnished it for you!", "First, I'm gonna give you a quick tutorial about living your life to the fullest.", "These are your main stats that affect daily activities.", "These are your secondary stats that affect work and other performances.", "Doing any activity will fill and deplete the meters associated to the given activity.", "This is the clock to monitor timing of an event.", "This button allows you to rearrange your furniture.", "This is your lifespan status. Once it reaches 100%, your current life will end.", "The starting life quality for your next of kin is determined by how you live this life.", "At first, things can be challenging, but I believe that you can do it!", "Don't forget that your main goal is to register your family's name with Goody City.", "You can do that by completing the required coin contribution at the end of your life.", "Well, that's it, let's explore and have a goody life!"];
tutorialdesiretext = ["This is your first desire objective!", "By completing the objective, you will receive Star coins.", "Star coins are needed to interact with other key citizens!", "Fulfilling these desires will also restore your happiness meter!", "Have a goody day!"];
tutorialjobtext = ["You've got your first job!", "Besides steady income, a job can also enhance your current life.", "And it will affect the status of your next of kin.", "You can track job progress, wages, and promotion requirements here.", "I suggest trying each of the jobs to discover the effects that each have.", "Don't forget to increase the secondary stats that correspond to your selected job!", "Have a goody day!"];
tutorialshoptext = ["You appear to be doing well!", "Did you know you can access Goodymart by using the phone?", "Each day, some items at Goodymart have a special price.", "Sometimes a price is discounted or rare items are available!", "Rare items may cost more, but it doubles the effect given!", "Check the Goodymart daily for great deals!"];
tutorialshop2text = ["Welcome to Goodymart!", "You can buy everything for your home here.", "The furniture section and the exit button are located here.", "Note that in order to use certain items, you must meet their stat requirements.", "Happy shopping spree!"];
tutorialjobtimetext = ["It's time to get to work!", "You have a two-hour window in which to go to work.", "You can get to work by bus or walking down the street.", "You will miss work for the day if this time expires."];
tutorialfirstdayjobtext = ["It's your first day on the job!", "Wages are paid at closing time which is 17:00.", "You must remain at work the whole day to get paid.", "The journalist job pays based on performance for the day.", "Artists and athletes receive fixed wages.", "After each successful work day, your job progress will increase.", "Filling the progress bar will result in a job test.", "Passing the mini-game test will increase the job level and the pay!", "That's all there is to it!"];
trace(("CEK STAT : " + charstat[slotused][11]));
gotmoney = -1;
desiretitle = ["Full Belly", "Happy Time", "Smooth Skin", "Empty Bladder", "Well Rested", "Fellin Artistic", "Tough Athlete", "Tinkerer", "Social Life", "Rich Boy", "Coins magnet", "Screen time", "True Gamer", "Futurist", "Mister Chef", "Decorator I", "Decorator II", "Dirty Skin", "Curiosity", "Food Saver", "Cleaning time", "asd", "asd", "asd", "asd", "asd", "asd", "asd", "asd", "asd", "asd", "asd", "asd"];
desirelevel = [1, 1, 1, 1, 2, 2, 2, 2, 2, 1, 1, 1, 2, 2, 1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 1, 2, 1, 2, 2, 2, 1, 1];
desiredesc = ["Completely fill the Hunger level.", "Completely fill the Happiness level.", "Completely fill the Hygiene level.", "Completely fill the Bladder level.", "Completely fill the Energy level.", "Increase your level of Creativity.", "Increase your level of Sports.", "Increase your level of Intelligence.", "Increase your level of Relationship.", "Spend at least X coins at the Goodymart.", "Get X coins.", "Watch TV.", "Play games.", "Invest some coins using a computer.", "Cook some food.", "Change the tile.", "Change the wallpaper.", "Deplete the hygiene level.", "Read a book.", "Stock food.", "Clean up any trash.", "Play an arcade machine.", "Observe the globe.", "Sleep in the park.", "Get money from performing.", "Order a pizza.", "Spend at least X coins at the Goodymart.", "Sell X items.", "Play a flute.", "Play a piano.", "Rest on the sofa.", "Buy a plant.", "Take a bath in the park."];
desiregift = [1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 3, 3, 1, 2, 1, 1, 1];
cartime = 75;
shopuisectiontext = [undefined, "Electronics", "Bathroom", "Kitchen", "Misc", "Living room", "Bedroom", "Tile", "Wallpaper"];
stadiumtestjumpneeded = 0;
stadiumtestjumplist = [4, 6, 8, 10, 12];
stadiumsorttime = 3;
stadiumsorttimetemp = stadiumsorttime;
stadiumposawalx = -85;
stadiumposawaly = -23;
stadiumtambax = 27;
stadiumtambay = 12;
stadiumdonejump = [];
donecalculate = false;
textmakan = ["Tastes great!", "[Chomp chomp]", "Yummy!"];
textlefover = ["It's okay.", "It tastes weird.", "Urrpp!"];
ondeposit = false;
relationshipincrease = false;
talkcost = 2;
studiosingingtime = [undefined, 10, 13, 16, 20, 25];
studiotesttimelist = [undefined, 30, 30, 30, 40, 40];
studiotestappearamount = 0;
studiotesttime = [];
studiotestbutton = [];
studiotesttimeleft = 0;
studiotestsuccess = 0;
typerate = 0;
typehealth = 6;
typehealthtemp = typehealth;
officetestindex = 0;
officeword = "Citizens of Goody City report that they're moving towards more green-living to provide a better life for future generations. The movement begins with small steps, cleaning up the enviroment, outputting less non-biodegradable trash, focusing on more renewable energy sources and planting more trees. This green movement is the first step to changing Goody City into a fully green city with a minimal carbon footprint. It's time to do your part to make the world better, citizen!";
officewordmemory = [];
officewordmemoryrate = [];
officetesttime = (30 * 25);
officetesttimetemp = officetesttime;
passiveincome = 2;
mcfainted.gotoAndStop(1);
hospitalfee = 10;
faintedtime = 25;
trace(("job : " + charstat[slotused][23]));
feedmin = 20;
hygienemin = 20;
energymin = 20;
bladdermin = 20;
happinessmin = 20;
workrate = 0.4;
workcompletion = 100;
relationindex = 0;
relationfxtime = 0;
mcpositioning.visible = false;
snackeffect = 20;
snackbladder = 5;
snackcost = 3;
buscost = 3;
steakcost = 10;
steakeffect = 100;
steakbladder = 25;
trace(("CEK NUM : " + numChildren));
onout = false;
jobwages = [undefined, [13, 40, 55, 60, 72, 80], [10, 30, 40, 50, 60, 70], [15, 35, 50, 58, 66, 75]];
jobday = [undefined, [undefined, 1, 0, 1, 0, 1, 0, 1], [undefined, 0, 1, 1, 0, 1, 1, 1], [undefined, 1, 1, 1, 1, 0, 0, 0]];
jobrelationreq = [0, 4, 6, 8, 10];
jobincreasement = [35, 35, 25, 25, 25];
jobdecreasement = [0, 0, 0, 0, 0];
foodstocklist = [undefined, 2, 5, 10];
foodstockprice = 2;
repairmanrepairtime = (3 * 25);
repairmancoming = false;
posisirumahx = [undefined, 5, 7, 9];
posisirumahy = [undefined, 5, 7, 7];
repairmancost = 5;
ratinggainedstat = (statmax * 0.8);
trace(("CEK STAT :" + charstat[slotused]));
onnight = false;
rain = charstat[slotused][22];
trace(("RAIN : " + rain));
rainchance = 3;
weathertime = 0;
weathertimetemp = 1;
daylist = [undefined, "MON", "TUE", "WED", "THU", "FRI", "SAT", "SUN"];
changehour = false;
pizzacost = 3;
tileprice = 25;
wallprice = 30;
trashbincleanuptime = 6;
sink1cleanuptime = 3;
sink2cleanuptime = 1;
cleanuptableke = 0;
toplate = 0;
cooklist = ["SPICY SPAGHETTI", "SAUSAGE & BEAN", "CAESAR SALAD", "ROASTED CHICKEN", "TART CAKE", "PIZZA"];
cookreq = [0, 2, 4, 6, 8, 99];
cookstock = [1, 2, 3, 4, 4, -1];
cookstatincrease = [15, 35, 80, 100, 130, 140];
cooktime = [3, 4, 5, 6, 7, 99];
cookamount = [20, 35, 75, 105, 135, 20];
cookexpire = [8, 15, 22, 33, 40, 3];
cookbladderincrease = [0.6, 0.4, 0.2, 0.1, 0.1, 1.5];
cookenergyincrease = [0, 0.1, 0.2, 0.3, 0.4, 0];
statbubbletime = 0;
statbubbletimetemp = 20;
positionongtempstat = [];
menittime = 0;
menittimetemp = 10;
jamtime = 30;
ratekuranger = 1.5;
happinesskuranger = ((statmax / jamtime) / (25 * ratekuranger));
hungerkuranger = ((statmax / jamtime) / (26 * ratekuranger));
energykuranger = ((statmax / jamtime) / (42 * ratekuranger));
energykurangertemp = energykuranger;
hygienekuranger = ((statmax / jamtime) / (20 * ratekuranger));
bladderkuranger = ((statmax / jamtime) / (20 * ratekuranger));
kurangerarray = [0, 0, 0, happinesskuranger, hungerkuranger, energykuranger, hygienekuranger, bladderkuranger];
timemenit = charstat[slotused][20];
timejam = charstat[slotused][19];
uiindex = 0;
validplacement = false;
onshop = false;
onbuild = false;
pausegame = false;
uipopuphealth = 0;
houseitemprice = [undefined, 10, 40, 5, 5, 5, 5, 50, 100, 200, 80, 160, 10, 15, 15, 10, 25, 8, 15, 80, 140, 4, 4, 4, 4, 2, 3, 5, 6, 7, 8, 8, 15, 8, 5, 5, 5, 5, 5, 7, 7, 8, 20, 50, 95, 20, 40, 120, 10, 45, 115, 8, 8, 8, 9, 14, 14, 14, 5, 7, 7, 7, 11, 11, 10, 25, 45];
houseitemcommand = [undefined, ["WATCH"], ["WATCH"], ["FIND A JOB", "ORDER A PIZZA", "STOCK FOOD", "CALL REPAIRMAN", "OPEN GOODY MART", "SAVE"], ["FIND A JOB", "ORDER A PIZZA", "STOCK FOOD", "CALL REPAIRMAN", "OPEN GOODY MART", "SAVE"], ["FIND A JOB", "ORDER A PIZZA", "STOCK FOOD", "CALL REPAIRMAN", "OPEN GOODY MART", "SAVE"], ["FIND A JOB", "ORDER A PIZZA", "STOCK FOOD", "CALL REPAIRMAN", "OPEN GOODY MART", "SAVE"], ["PLAY GAMES", "READ NEWS", "INVESTMENT"], ["PLAY GAMES", "READ NEWS", "INVESTMENT"], ["PLAY"], ["TAKE A SHOWER"], ["TAKE A SHOWER"], ["USE"], ["USE"], ["USE"], ["CHECK STOCKS"], ["CHECK STOCKS"], [], [], ["COOK"], ["COOK"], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], ["READ BOOK"], ["OBSERVE"], ["PLAY CHESS"], ["LISTEN TO MUSIC"], ["PLAY FLUTE"], ["PLAY PIANO"], ["EXERCISE"], ["WEIGHTLIFTING"], ["RUN"], [], [], [], [], [], [], [], ["SIT"], ["SIT"], ["SIT"], ["SIT"], ["SIT"], ["SIT"], ["SLEEP"], ["SLEEP"], ["SLEEP"]];
houseitemcommandstat = [undefined, [[3, 10, 9]], [[3, 10, 9]], ["STOCK FOOD", "CALL REPAIRMAN", "OPEN GOODY MART"], ["STOCK FOOD", "CALL REPAIRMAN", "OPEN GOODY MART"], ["STOCK FOOD", "CALL REPAIRMAN", "OPEN GOODY MART"], ["STOCK FOOD", "CALL REPAIRMAN", "OPEN GOODY MART"], [[3, 10, 9], [9], "INVESTMENT"], [[3, 10, 9], [9], "INVESTMENT"], [[3, 10, 9]], [[6]], [[6]], [[7]], [[7]], [[7]], ["CHECK STOCKS"], ["CHECK STOCKS"], [], [], [[10]], [[10]], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [[9]], [[9]], [[9]], [[3, 10]], [[3, 10]], [[3, 10]], [[8]], [[8]], [[8]], [], [], [], [], [], [], [], [[5]], [[5]], [[5]], [[5]], [[5]], [[5]], [[5]], [[5]], [[5]]];
houseitemcommandeffect = [undefined, [[1.5, 0.3, 0.3]], [[2.4, 0.4, 0.4]], ["STOCK FOOD", "CALL REPAIRMAN", "OPEN GOODY MART"], ["STOCK FOOD", "CALL REPAIRMAN", "OPEN GOODY MART"], ["STOCK FOOD", "CALL REPAIRMAN", "OPEN GOODY MART"], ["STOCK FOOD", "CALL REPAIRMAN", "OPEN GOODY MART"], [[1.5, 0.3, 0.3], [0.5], "INVESTMENT"], [[2.4, 0.4, 0.4], [0.5], "INVESTMENT"], [[2.4, 0.4, 0.4]], [[2]], [[4]], [[4]], [[6]], [[6]], ["CHECK STOCKS"], ["CHECK STOCKS"], [], [], [[0.3]], [[0.5]], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [[1]], [[2]], [[3]], [[1, 1]], [[1, 2]], [[1, 3]], [[1]], [[2]], [[3]], [], [], [], [], [], [], [], [[0.1]], [[0.2]], [[0.2]], [[0.2]], [[0.4]], [[0.4]], [[0.7]], [[0.9]], [[1.3]]];
houseclickable = [undefined, [1, 1, 1, 1], [1, 1, 1, 1], [1], [1], [1], [1], [1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1], [1], [1], [1, 1], [1, 1], [1, 1], [1, 1], [1, 1], [0], [0], [1, 1, 1, 1], [1, 1, 1, 1], [0], [0], [0], [0], [1], [0], [0], [0], [0], [0], [0], [0], [0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [1], [1], [1], [1], [1], [1, 1, 1, 1], [1, 1], [1], [1, 1], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1], [1, 1], [1, 1], [1, 1]];
houseitemsymbol = [undefined, [1, 7, 8], [1, 7, 8], [], [], [], [], [1, 7, 8], [1, 7, 8], [1, 7, 8], [4], [4], [5], [5], [5], [2], [2], [], [], [2], [2], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [7], [7], [7, 7], [1, 8], [1, 8], [1, 8, 8], [6], [6], [6, 6], [2], [2], [2], [2], [2], [2], [2], [3], [3], [3], [3], [3, 3], [3, 3], [3, 3, 3], [3, 3, 3, 3], [3, 3, 3, 3, 3]];
houseitemmark = [undefined, [1, 1, 1], [2, 2, 2], [], [], [], [], [1, 1, 1], [2, 2, 2], [2, 2, 2], [1], [2], [1], [2], [2], [1], [2], [], [], [1], [2], [1], [1], [1], [1], [], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], [1], [2], [2, 2], [1], [2], [2, 2], [1], [2], [2, 2], [1], [1], [1], [1], [1], [1], [1], [1], [2], [2], [2], [2, 2], [2, 2], [2, 2, 2], [2, 2, 2, 2], [2, 2, 2, 2, 2]];
houseitemnameshow = [undefined, "Old TV", "HDTV", "Phone", "Phone", "Phone", "Phone", "PC", "Super PC", "Caravan Beast Arcade", "Shower", "Heavenly Shower", "Toilet", "Colored Toilet", "Colored Toilet", "Old Refrigerator", "Arctic Refrigerator", "Sink", "Dishwasher", "Oven", "Masterchef Oven", "Lamp", "Lamp", "Lamp", "Lamp", "Trash Bin", "Simple Plant", "Flowers", "Flowers", "Sunflower", "Cactus", "Bamboo", "Antique Clock", "Fish Tank", "Divider", "Divider", "Divider", "Divider", "Divider", "Fence", "Fence", "Wood Divider", "Book Shelf", "Observation Globe", "Chess Table", "Headphone Stand", "Flute Stand", "Antique Piano", "Yoga Mat", "Dumbbell Rack", "Treadmill", "Counter", "Counter", "Counter", "Table", "Table with Cloth", "Table with Cloth", "Table with Cloth", "Wood Chair", "Cushion Chair", "Cushion Chair", "Cushion Chair", "Sofa", "Sofa", "Bed", "Comfy Bed", "Deluxe Bed"];
houseitemstatreq = [undefined, 0, 2, 0, 0, 0, 0, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 6, 0, 3, 6, 0, 3, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
houseitemstattype = [undefined, 0, 17, 0, 0, 0, 0, 17, 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 17, 17, 0, 18, 18, 0, 16, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
houseitemenvironment = [undefined, 2, 3, 1, 1, 1, 1, 2, 3, 3, 1, 2, 1, 2, 2, 1, 2, 1, 1, 1, 2, 2, 2, 2, 2, 1, 3, 3, 3, 3, 3, 3, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 2, 2, 4, 2, 3, 3, 1, 1, 1, 1, 2, 2, 2, 1, 1, 1, 1, 2, 2, 2, 3, 4];
linkage = [undefined, [item11, item12, item13, item14], [item21, item22, item23, item24], [item31], [item41], [item51], [item61], [item71, item72, item73, item74], [item91, item92, item93, item94], [item101, item102, item103, item104], [item111], [item121], [item131, item132], [item141, item142], [item151, item152], [item161, item162], [item171, item172], [item181], [item191], [item201, item202, item203, item204], [item211, item212, item213, item214], [item221], [item231], [item241], [item251], [item261], [item271], [item281], [item291], [item301], [item311], [item321], [item331], [item341], [item351, item352], [item361, item362], [item371, item372], [item381, item382], [item391, item392], [item401, item402], [item411, item412], [item421, item422], [item431], [item441], [item451], [item461], [item471], [item481, item482, item483, item484], [item491, item492], [item501], [item511, item512], [item521, item522], [item531, item532], [item541, item542], [item551, item552], [item561, item562], [item571, item572], [item581, item582], [item81, item82, item83, item84], [item591, item592, item593, item594], [item601, item602, item603, item604], [item611, item612, item613, item614], [item621, item622, item623, item624], [item631, item632, item633, item634], [item641, item642], [item651, item652], [item661, item662]];
houseitemsizex = [undefined, [0, 0, 0, 0], [0, 0, 0, 0], [0], [0], [0], [0], [1, 1, 1, 1], [1, 1, 1, 1], [0, 0, 0, 0], [0], [0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0], [0], [0, 0, 0, 0], [0, 0, 0, 0], [0], [0], [0], [0], [0], [0], [0], [0], [0], [0], [0], [0], [0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0], [1], [0], [0], [0], [1, 1, 1, 1], [0, 1], [1], [0, 1], [0, 0], [0, 0], [0, 0], [0, 1], [0, 1], [0, 1], [0, 1], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 1], [0, 1], [0, 1]];
houseitemsizey = [undefined, [0, 0, 0, 0], [0, 0, 0, 0], [0], [0], [0], [0], [1, 1, 1, 1], [1, 1, 1, 1], [0, 0, 0, 0], [0], [0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0], [0], [0, 0, 0, 0], [0, 0, 0, 0], [0], [0], [0], [0], [0], [0], [0], [0], [0], [0], [0], [0], [0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0], [1], [0], [0], [0], [1, 1, 1, 1], [1, 0], [1], [1, 0], [0, 0], [0, 0], [0, 0], [1, 0], [1, 0], [1, 0], [1, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [1, 0], [1, 0], [1, 0]];
accessdirectionex = [undefined, [1, 0, -1, 0], [1, 0, -1, 0], [9], [9], [9], [9], [9, 9, 9, 9], [9, 9, 9, 9], [1, 0, -1, 0], [9], [9], [9, 9], [9, 9], [9, 9], [9, 9], [9, 9], [9], [9], [1, 0, -1, 0], [1, 0, -1, 0], [0], [0], [0], [0], [9], [0], [0], [0], [0], [0], [0], [0], [0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [9], [9], [9], [9], [9], [2, 1, -1, 0], [9, 9], [9], [9, 9], [9, 9], [9, 9], [9, 9], [9, 9], [9, 9], [9, 9], [9, 9], [9, 9, 9, 9], [9, 9, 9, 9], [9, 9, 9, 9], [9, 9, 9, 9], [9, 9, 9, 9], [9, 9, 9, 9], [9, 9], [9, 9], [9, 9]];
accessdirectioney = [undefined, [0, 1, 0, -1], [0, 1, 0, -1], [9], [9], [9], [9], [9, 9, 9, 9], [9, 9, 9, 9], [0, 1, 0, -1], [9], [9], [9, 9], [9, 9], [9, 9], [9, 9], [9, 9], [9], [9], [0, 1, 0, -1], [0, 1, 0, -1], [0], [0], [0], [0], [0], [0], [0], [0], [0], [0], [0], [0], [0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [9], [0], [9], [9], [9], [0, 2, 0, -1], [9, 9], [9], [9, 9], [0], [0], [0], [9, 9], [9, 9], [9, 9], [9, 9], [9, 9, 9, 9], [9, 9, 9, 9], [9, 9, 9, 9], [9, 9, 9, 9], [9, 9, 9, 9], [9, 9, 9, 9], [9, 9], [9, 9], [9, 9]];
speedx = 2.015;
speedy = 0.9375;
defaultspeedx = 2.015;
defaultspeedy = 0.9375;
CELL_FREE = 0;
CELL_FILLED = 1;
CELL_ORIGIN = 2;
CELL_DESTINATION = 3;
MAX_ITERATIONS = 2000;
mapArray = new Array();
xx = 0;
yy = 0;
sorttime = 5;
sorttimetemp = sorttime;
openList = new Array();
closedList = new Array();
tileheight = 26;
bawahe = 12;
uiimage = [];
tileimage = [];
wallimage = [];
charimage = [];
tileclickerimage = [];
objectimage = [];
effectimage = [];
batasterang = 5;
batasmalam = 17;
loadhouse();
}
public function createnewso(){
var i:*;
so.data.soundsetting = [1, 1];
so.data.charstat = [];
so.data.houseitems = [];
so.data.refrigeratorstock = [];
so.data.tablecounterslot = [];
so.data.trashbinslot = [];
so.data.investment = [];
so.data.relationship = [];
so.data.relationshiphistory = [];
so.data.crowd = [];
so.data.tutoriallife = [];
so.data.tutorialjob = [];
so.data.tutorialsave = [];
so.data.tutorialdesire = [];
so.data.promostat = [];
so.data.tutorialshoptime = [];
so.data.tutorialshop = [];
so.data.jobreached = [];
so.data.jobpercentage = [];
so.data.startup = [];
so.data.soundsetting = [1, 1];
so.data.cafe = [];
so.data.cafereload = [];
so.data.townparkperson = [];
so.data.donefirstjob = [];
so.data.tutorialshop2 = [];
so.data.tutorialjobtime = [];
so.data.tutorialfirstdayjob = [];
so.data.dishesclean = 0;
i = 1;
while (i <= 2) {
createnewforthis(i);
i++;
};
}
public function loadtownpark(){
var i:*;
var obj:*;
if (charstat[slotused][23] != 0){
loadjobprogress();
};
btnexittownpark.visible = true;
resettownparkusage();
btnexittownpark.removeEventListener(MouseEvent.MOUSE_OVER, oversound);
btnexittownpark.addEventListener(MouseEvent.MOUSE_OVER, oversound);
btnexittownpark.removeEventListener(MouseEvent.CLICK, exittownpark);
btnexittownpark.addEventListener(MouseEvent.CLICK, exittownpark);
mcpiano.buttonMode = true;
mcpiano.addEventListener(MouseEvent.MOUSE_OVER, objectover);
mcpiano.addEventListener(MouseEvent.MOUSE_OUT, objectout);
mcpiano.addEventListener(MouseEvent.MOUSE_OVER, objectover);
mcpiano.addEventListener(MouseEvent.MOUSE_OUT, objectout);
mcpiano.addEventListener(MouseEvent.CLICK, townparkpianoclick);
mcpiano.addEventListener(MouseEvent.CLICK, townparkpianoclick);
mcflute.buttonMode = true;
mcflute.addEventListener(MouseEvent.MOUSE_OVER, objectover);
mcflute.addEventListener(MouseEvent.MOUSE_OUT, objectout);
mcflute.addEventListener(MouseEvent.MOUSE_OVER, objectover);
mcflute.addEventListener(MouseEvent.MOUSE_OUT, objectout);
mcflute.addEventListener(MouseEvent.CLICK, townparkfluteclick);
mcflute.addEventListener(MouseEvent.CLICK, townparkfluteclick);
mcbook.buttonMode = true;
mcbook.addEventListener(MouseEvent.MOUSE_OVER, objectover);
mcbook.addEventListener(MouseEvent.MOUSE_OUT, objectout);
mcbook.addEventListener(MouseEvent.MOUSE_OVER, objectover);
mcbook.addEventListener(MouseEvent.MOUSE_OUT, objectout);
mcbook.addEventListener(MouseEvent.CLICK, townparkbookclick);
mcbook.addEventListener(MouseEvent.CLICK, townparkbookclick);
mcflag.buttonMode = true;
mcflag.addEventListener(MouseEvent.MOUSE_OVER, objectover);
mcflag.addEventListener(MouseEvent.MOUSE_OUT, objectout);
mcflag.addEventListener(MouseEvent.MOUSE_OVER, objectover);
mcflag.addEventListener(MouseEvent.MOUSE_OUT, objectout);
mcflag.addEventListener(MouseEvent.CLICK, townparkflagclick);
mcflag.addEventListener(MouseEvent.CLICK, townparkflagclick);
trace("c");
i = 1;
while (i <= 4) {
obj = getChildByName(("mc" + i));
obj.removeEventListener(MouseEvent.MOUSE_OVER, oversound);
obj.addEventListener(MouseEvent.MOUSE_OVER, oversound);
obj.removeEventListener(MouseEvent.CLICK, relationshipclick);
obj.addEventListener(MouseEvent.CLICK, relationshipclick);
obj.buttonMode = true;
obj.addEventListener(MouseEvent.MOUSE_OVER, objectover);
obj.addEventListener(MouseEvent.MOUSE_OUT, objectout);
obj.addEventListener(MouseEvent.MOUSE_OVER, objectover);
obj.addEventListener(MouseEvent.MOUSE_OUT, objectout);
obj = null;
i++;
};
trace("d");
createchar();
mcclock.txt3.text = daylist[ambilharikerja()];
loadspeedsymbol();
loaduistat();
hitungenviro();
cekstatusadd();
stage.addEventListener(Event.ENTER_FRAME, gamewaiting);
}
function frame3(){
stop();
mcag.gotoAndStop(1);
stage.quality = "HIGH";
stage.frameRate = 45;
mcag.gotoAndPlay(2);
mcag.buttonMode = true;
mcag.addEventListener(MouseEvent.CLICK, clickAG);
stage.addEventListener(Event.ENTER_FRAME, splash1);
}
public function streetbustop(e:MouseEvent):void{
var bole:*;
var i:*;
var obj:*;
removealluiimage();
soundclick.play(0, 1, new SoundTransform(volsfx));
bole = false;
uipopuphealth = 2;
stage.addEventListener(MouseEvent.CLICK, resetuipopup);
i = 1;
while (i <= 3) {
obj = getChildByName(("mcnews" + i));
if (obj != null){
if ((((obj.mc1.currentFrame == 2)) && (!((obj.currentFrame == 1))))){
bole = true;
};
};
i++;
};
if (bole == true){
createuipopup("BUS TO WORK", e.currentTarget);
};
createuipopup("BUS TO CAFE", e.currentTarget);
createuipopup("BUS TO PARK", e.currentTarget);
createuipopup("BUS TO TOWN PARK", e.currentTarget);
}
public function spawnstudionote(){
effectimage[effectimage.length] = new (studionote);
mcstudiotest.addChildAt(effectimage[(effectimage.length - 1)], mcstudiotest.getChildIndex(mcstudiotest.mceffectposition));
effectimage[(effectimage.length - 1)].indexke = (effectimage.length - 1);
effectimage[(effectimage.length - 1)].mouseChildren = false;
effectimage[(effectimage.length - 1)].mouseEnabled = false;
effectimage[(effectimage.length - 1)].mc1.gotoAndStop(studiotestbutton[0]);
effectimage[(effectimage.length - 1)].x = (-80 + ((studiotestbutton[0] - 1) * 32));
effectimage[(effectimage.length - 1)].y = -100;
effectimage[(effectimage.length - 1)].addEventListener(Event.ENTER_FRAME, studionotewaiting);
}
public function startstadiumtest(){
stage.addEventListener(KeyboardEvent.KEY_DOWN, stadiumtestkeyup);
stage.addEventListener(Event.ENTER_FRAME, stadiumtestkeywaiting);
mcstadiumtest.btnleft.removeEventListener(MouseEvent.MOUSE_OVER, oversound);
mcstadiumtest.btnleft.addEventListener(MouseEvent.MOUSE_OVER, oversound);
mcstadiumtest.btnleft.removeEventListener(MouseEvent.CLICK, goleft);
mcstadiumtest.btnleft.addEventListener(MouseEvent.CLICK, goleft);
mcstadiumtest.btnright.removeEventListener(MouseEvent.MOUSE_OVER, oversound);
mcstadiumtest.btnright.addEventListener(MouseEvent.MOUSE_OVER, oversound);
mcstadiumtest.btnright.removeEventListener(MouseEvent.CLICK, goright);
mcstadiumtest.btnright.addEventListener(MouseEvent.CLICK, goright);
mcstadiumtest.btnspace.removeEventListener(MouseEvent.MOUSE_OVER, oversound);
mcstadiumtest.btnspace.addEventListener(MouseEvent.MOUSE_OVER, oversound);
mcstadiumtest.btnspace.removeEventListener(MouseEvent.CLICK, gojump);
mcstadiumtest.btnspace.addEventListener(MouseEvent.CLICK, gojump);
createobstacleposition();
mcstadiumtest.btnstart.visible = false;
mcstadiumtest.btnspace.transform.colorTransform = colornormal;
mcstadiumtest.btnleft.transform.colorTransform = colornormal;
mcstadiumtest.btnright.transform.colorTransform = colornormal;
}
public function bwatfainted(){
var i:*;
var obj:*;
removealluiimage();
onfainted = true;
speedtime = 1;
loadspeedsymbol();
pausegame = true;
charimage[0].visible = true;
charimage[0].stat = "idle";
createtext("I'm so tired…");
if (currentLabel == "house"){
charimage[0].mc1.gotoAndPlay("fainted");
charnointeraction();
mcpositioning.visible = false;
btnexit.visible = false;
removeallobjectfunction(true);
} else {
if (currentLabel == "street"){
charimage[0].mc1.gotoAndPlay("fainted");
btnexitstreet.visible = false;
btnexittooffice.visible = false;
btnbusstop.removeEventListener(MouseEvent.CLICK, streetbustop);
} else {
if ((((((((((((currentLabel == "office")) || ((currentLabel == "stadium")))) || ((currentLabel == "studio")))) || ((currentLabel == "park")))) || ((currentLabel == "cafe")))) || ((currentLabel == "townpark")))){
if (currentLabel == "office"){
resetofficeusage();
btnexitoffice.visible = false;
mctable.removeEventListener(MouseEvent.CLICK, officetable);
btntoilet.removeEventListener(MouseEvent.CLICK, toiletclick);
btndrink.removeEventListener(MouseEvent.CLICK, drinkclick);
mcsofa.removeEventListener(MouseEvent.CLICK, sofaclick);
charimage[0].mc1.gotoAndPlay("faintedoffice");
} else {
if (currentLabel == "studio"){
resetstudiousage();
btnexitstudio.visible = false;
mcmic.removeEventListener(MouseEvent.CLICK, officetable);
btntoilet.removeEventListener(MouseEvent.CLICK, toiletclick);
btndrink.removeEventListener(MouseEvent.CLICK, drinkclick);
mcsofa.removeEventListener(MouseEvent.CLICK, sofaclick);
charimage[0].mc1.gotoAndPlay("faintedstudio");
} else {
if (currentLabel == "stadium"){
resetstadiumusage();
btnexitstadium.visible = false;
mcflag.removeEventListener(MouseEvent.CLICK, officetable);
btntoilet.removeEventListener(MouseEvent.CLICK, toiletclick);
btndrink.removeEventListener(MouseEvent.CLICK, drinkclick);
mcsofa.removeEventListener(MouseEvent.CLICK, sofaclick);
charimage[0].mc1.gotoAndPlay("faintedstadium");
} else {
if (currentLabel == "park"){
resetparkusage();
btnexitpark.visible = false;
mcsofa.removeEventListener(MouseEvent.CLICK, sofaclick);
mcperform.removeEventListener(MouseEvent.CLICK, sofaclick);
charimage[0].mc1.gotoAndPlay("fainted");
} else {
if (currentLabel == "cafe"){
resetcafeusage();
btnexitcafe.visible = false;
btn1.removeEventListener(MouseEvent.CLICK, relationshipclick);
charimage[0].mc1.gotoAndPlay("fainted");
} else {
if (currentLabel == "townpark"){
resettownparkusage();
btnexittownpark.visible = false;
charimage[0].mc1.gotoAndPlay("fainted");
};
};
};
};
};
};
i = 1;
while (i <= 3) {
obj = getChildByName(("btn" + i));
if (obj != null){
obj.removeEventListener(MouseEvent.CLICK, relationshipclick);
obj = null;
};
i++;
};
};
};
};
faintedtime = 75;
stage.addEventListener(Event.ENTER_FRAME, faintedwaiting);
}
public function bushclick(e:MouseEvent):void{
soundclick.play(0, 1, new SoundTransform(volsfx));
cleanupeffectimage();
removealluiimage();
uipopuphealth = 2;
stage.addEventListener(MouseEvent.CLICK, resetuipopup);
createuipopup("TAKE A DUMP", e.currentTarget);
}
public function cekmasiadarusak(){
var k:*;
var l:*;
adarusak = false;
k = 0;
while (k < housesize[charstat[slotused][13]]) {
l = 0;
while (l < housesize[charstat[slotused][13]]) {
if (houseitems[slotused][k][l] != -1){
if (houseitems[slotused][k][l][2] == 0){
adarusak = true;
//unresolved jump
};
};
l++;
};
k++;
};
}
public function officetestkeyup(e:KeyboardEvent):void{
var list:*;
var cek:*;
var ok:*;
var listke:*;
var i:*;
var sounde:*;
var reducedrate:*;
var ada:*;
var jume:*;
var jumtotal:*;
var reducer:*;
list = ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"];
cek = String.fromCharCode(e.keyCode);
ok = false;
i = 0;
while (i < list.length) {
if (cek == list[i].toUpperCase()){
listke = i;
ok = true;
break;
};
i++;
};
if (ok == true){
sounde = [soundtyping1, soundtyping2, soundtyping3];
sounde[randRange(0, (sounde.length - 1))].play(0, 1, new SoundTransform(volsfx));
reducedrate = 0;
if (officewordmemory.length == 0){
officewordmemory.push(list[listke].toUpperCase());
officewordmemoryrate.push(1);
} else {
ada = false;
jume = 0;
jumtotal = 0;
i = 0;
while (i < officewordmemory.length) {
if (list[listke].toUpperCase() == officewordmemory[i]){
ada = true;
officewordmemoryrate[i] = (officewordmemoryrate[i] + 1);
jume = officewordmemoryrate[i];
};
jumtotal = (jumtotal + officewordmemoryrate[i]);
i++;
};
if (ada == false){
officewordmemory.push(list[listke].toUpperCase());
officewordmemoryrate.push(1);
jume = 1;
jumtotal = (jumtotal + 1);
};
reducer = (jume / jumtotal);
reducedrate = reducer;
};
typehealth = (typehealth - (typerate - (typerate * reducedrate)));
if (typehealth <= 0){
if (officeword.charAt(officetestindex) == " "){
mcofficetest.txt1.text = (mcofficetest.txt1.text + officeword.charAt(officetestindex));
officetestindex++;
};
officetestaddword();
typehealth = typehealthtemp;
};
};
}
public function nextinput(e:MouseEvent):void{
var go:*;
var yo:*;
var isie:*;
var i:*;
soundclick.play(0, 1, new SoundTransform(volsfx));
if (e.currentTarget.currentFrame == 1){
if (mcinput.currentLabel == "ok"){
go = false;
if ((((mcinput.page == 1)) && ((donechangename == "")))){
yo = false;
isie = mcinput.mc1.txt1.text;
i = 0;
while (i < isie.length) {
if (isie.charAt(i) != " "){
yo = true;
break;
};
i++;
};
if (((((!((mcinput.mc1.txt1.text == standarttext))) && (!((mcinput.mc1.txt1.text == ""))))) && ((yo == true)))){
soundyes.play(0, 1, new SoundTransform(volsfx));
donechangename = mcinput.mc1.txt1.text;
mcinput.mc1.mcapproved.gotoAndPlay(2);
mcinput.mc1.mcapproved.addEventListener(Event.ENTER_FRAME, approvedwait1);
} else {
go = true;
};
} else {
go = true;
};
if (go == true){
mcinput.page++;
mcinput.gotoAndPlay(("go" + mcinput.page));
loadinput();
};
};
};
}
public function tulisclock(){
var cek1:*;
cek1 = timejam;
if (timejam < 10){
cek1 = ("0" + timejam);
};
mcclock.txt1.text = cek1;
if ((((timejam < 13)) && ((timejam >= 0)))){
mcclock.txt2.text = "AM";
} else {
mcclock.txt2.text = "PM";
};
}
public function updatelocalsave(){
var k:*;
var i:*;
var l:*;
var j:*;
var ke:*;
trace("LOAD TO LOCAL");
txtlog.text = "a";
k = 1;
while (k <= 2) {
i = 0;
while (i < so.data.charstat[k].length) {
charstat[k][i] = so.data.charstat[k][i];
i++;
};
trace("1");
i = 0;
while (i < so.data.refrigeratorstock[k].length) {
refrigeratorstock[k][i] = [];
l = 0;
while (l < so.data.refrigeratorstock[k][i].length) {
refrigeratorstock[k][i][l] = so.data.refrigeratorstock[k][i][l];
l++;
};
i++;
};
trace("2");
i = 0;
while (i < so.data.tablecounterslot[k].length) {
tablecounterslot[k][i] = [];
l = 0;
while (l < so.data.tablecounterslot[k][i].length) {
tablecounterslot[k][i][l] = so.data.tablecounterslot[k][i][l];
l++;
};
i++;
};
trace("3");
txtlog.text = "b";
i = 0;
while (i < housesize[so.data.charstat[k][13]]) {
j = 0;
while (j < housesize[so.data.charstat[k][13]]) {
if (so.data.houseitems[k][i][j] == -1){
houseitems[k][i][j] = -1;
} else {
houseitems[k][i][j] = [];
l = 0;
while (l < so.data.houseitems[k][i][j].length) {
houseitems[k][i][j][l] = so.data.houseitems[k][i][j][l];
l++;
};
};
j++;
};
i++;
};
i = 0;
while (i < so.data.trashbinslot[k].length) {
trashbinslot[k][i] = [];
l = 0;
while (l < so.data.trashbinslot[k][i].length) {
trashbinslot[k][i][l] = so.data.trashbinslot[k][i][l];
l++;
};
i++;
};
i = 0;
while (i < so.data.investment[k].length) {
investment[k][i] = so.data.investment[k][i];
i++;
};
txtlog.text = "c";
i = 0;
while (i < so.data.relationship[k].length) {
relationship[k][i] = so.data.relationship[k][i];
i++;
};
relationshiphistory[k] = [];
i = 1;
while (i < relationship[k].length) {
relationshiphistory[k][i] = [];
j = 1;
while (j <= 4) {
relationshiphistory[k][i][j] = [];
ke = 1;
while (ke <= 4) {
relationshiphistory[k][i][j][ke] = so.data.relationshiphistory[k][i][j][ke];
ke++;
};
j++;
};
i++;
};
crowd[k] = [];
i = 1;
while (i <= 2) {
crowd[k][i] = [];
j = 1;
while (j <= 3) {
crowd[k][i][j] = so.data.crowd[k][i][j];
j++;
};
i++;
};
tutoriallife[k] = so.data.tutoriallife[k];
tutorialjob[k] = so.data.tutorialjob[k];
tutorialsave[k] = so.data.tutorialsave[k];
tutorialdesire[k] = so.data.tutorialdesire[k];
tutorialshoptime[k] = so.data.tutorialshoptime[k];
tutorialshop[k] = so.data.tutorialshop[k];
donefirstjob[k] = so.data.donefirstjob[k];
promostat[k] = [];
i = 0;
while (i < so.data.promostat[k].length) {
promostat[k][i] = so.data.promostat[k][i];
i++;
};
jobreached[k] = [];
i = 0;
while (i < so.data.jobreached[k].length) {
jobreached[k][i] = so.data.jobreached[k][i];
i++;
};
jobpercentage[k] = [];
i = 0;
while (i < so.data.jobpercentage[k].length) {
jobpercentage[k][i] = so.data.jobpercentage[k][i];
i++;
};
startup[k] = so.data.startup[k];
soundsetting = [];
soundsetting[0] = so.data.soundsetting[0];
soundsetting[1] = so.data.soundsetting[1];
trace(("CEK SOUND : " + so.data.soundsetting));
volbgm = soundsetting[0];
volsfx = soundsetting[1];
if (volbgm == 0){
bgmon = false;
};
if (volsfx == 0){
sfxon = false;
};
cafe[k] = [];
i = 1;
while (i <= 3) {
cafe[k][i] = so.data.cafe[k][i];
i++;
};
cafereload[k] = so.data.cafereload[k];
townparkperson[k] = [];
i = 1;
while (i <= 4) {
townparkperson[k][i] = so.data.townparkperson[k][i];
i++;
};
tutorialshop2[k] = so.data.tutorialshop2[k];
tutorialjobtime[k] = so.data.tutorialjobtime[k];
tutorialfirstdayjob[k] = so.data.tutorialfirstdayjob[k];
k++;
};
trace(("charstat : " + charstat[1][0]));
}
public function endlifeyay(e:MouseEvent):void{
if (soundchannel1 != null){
soundchannel1.stop();
soundchannel1 = null;
};
if (soundchannel2 != null){
soundchannel2.stop();
soundchannel2 = null;
};
if (soundchannel3 != null){
soundchannel3.stop();
soundchannel3 = null;
};
if (soundchannel4 != null){
soundchannel4.stop();
soundchannel4 = null;
};
soundclick.play(0, 1, new SoundTransform(volsfx));
if (currentLabel == "house"){
cleanuphouse();
} else {
if (currentLabel == "street"){
cleanupstreet();
} else {
if (currentLabel == "office"){
cleanupoffice();
} else {
if (currentLabel == "stadium"){
cleanupoffice();
} else {
if (currentLabel == "park"){
cleanuppark();
} else {
if (currentLabel == "cafe"){
cleanupcafe();
} else {
if (currentLabel == "townpark"){
cleanuptownpark();
};
};
};
};
};
};
};
transisi("endlife");
}
public function createwall(ke:int){
var jendelaper:*;
var i:*;
jendelaper = 3;
i = 0;
while (i < housesize[charstat[slotused][13]]) {
wallimage[wallimage.length] = new (wall1);
addChildAt(wallimage[(wallimage.length - 1)], (getChildIndex(mcwallposition) + 1));
wallimage[(wallimage.length - 1)].x = tileimage[0][i].x;
wallimage[(wallimage.length - 1)].y = tileimage[0][i].y;
wallimage[(wallimage.length - 1)].xe = 0;
wallimage[(wallimage.length - 1)].ye = i;
wallimage[(wallimage.length - 1)].gotoAndStop(ke);
jendelaper--;
if (jendelaper <= 0){
jendelaper = 3;
wallimage[(wallimage.length - 1)].nextFrame();
};
i++;
};
jendelaper = 3;
i = 0;
while (i < housesize[charstat[slotused][13]]) {
wallimage[wallimage.length] = new (wall1);
addChildAt(wallimage[(wallimage.length - 1)], (getChildIndex(mcwallposition) + 1));
wallimage[(wallimage.length - 1)].scaleX = (wallimage[(wallimage.length - 1)].scaleX * -1);
wallimage[(wallimage.length - 1)].x = tileimage[i][0].x;
wallimage[(wallimage.length - 1)].y = tileimage[i][0].y;
wallimage[(wallimage.length - 1)].xe = i;
wallimage[(wallimage.length - 1)].ye = 0;
wallimage[(wallimage.length - 1)].gotoAndStop(ke);
jendelaper--;
if (jendelaper <= 0){
jendelaper = 3;
wallimage[(wallimage.length - 1)].nextFrame();
};
i++;
};
wallimage[wallimage.length] = new (walladdon1);
addChildAt(wallimage[(wallimage.length - 1)], (getChildIndex(mcwallposition) + 1));
wallimage[(wallimage.length - 1)].x = tileimage[0][0].x;
wallimage[(wallimage.length - 1)].y = tileimage[0][0].y;
wallimage[(wallimage.length - 1)].gotoAndStop(charstat[slotused][14]);
}
public function applyinvestment(){
var chance:*;
var rand:*;
var i:*;
var dari:*;
var sampe:*;
chance = [30, 80, 60, 40, 25];
rand = randRange(0, 100);
if (rand <= chance[0]){
investment[slotused][1] = 0;
} else {
if (rand > chance[0]){
investment[slotused][1] = 1;
};
};
i = 2;
while (i <= 7) {
dari = (investment[slotused][(i - 1)] - 1);
sampe = (investment[slotused][(i - 1)] + 1);
if (dari == -1){
dari = 0;
};
if (sampe > (chance.length - 1)){
sampe = (chance.length - 1);
};
rand = randRange(0, 100);
if (rand <= chance[sampe]){
investment[slotused][i] = sampe;
} else {
if (rand <= chance[dari]){
investment[slotused][i] = dari;
} else {
investment[slotused][i] = investment[slotused][(i - 1)];
};
};
i++;
};
i = 1;
while (i <= 7) {
trace(((("day : " + i) + " yaitu : ") + investment[slotused][i]));
i++;
};
}
public function cekduplikatrefrigerator(){
var i:*;
var posx:*;
var posy:*;
var ada:*;
var j:*;
trace("CEK DUPLIKAT REFRI");
i = 0;
while (i < refrigeratorstock[slotused].length) {
posx = refrigeratorstock[slotused][i][0];
posy = refrigeratorstock[slotused][i][1];
trace(((("CEK UNTUK : " + posx) + " ") + posy));
if (i > 0){
trace("1");
ada = false;
do {
ada = false;
j = (i - 1);
while (j >= 0) {
trace(("cek sama : " + refrigeratorstock[slotused][j]));
if ((((refrigeratorstock[slotused][j][0] == posx)) && ((refrigeratorstock[slotused][j][1] == posy)))){
ada = true;
i--;
refrigeratorstock[slotused].splice(j, 1);
break;
};
j--;
};
} while (ada == true);
};
i++;
};
}
public function tipout(e:MouseEvent):void{
e.currentTarget.mctip.gotoAndStop(1);
}
public function transisi(ke:String){
mctransisi.goto = ke;
mctransisi.gotoAndPlay(2);
mctransisi.addEventListener(Event.ENTER_FRAME, transisiwaiting);
}
public function studiomic(e:MouseEvent):void{
soundclick.play(0, 1, new SoundTransform(volsfx));
cleanupeffectimage();
removealluiimage();
uipopuphealth = 2;
stage.addEventListener(MouseEvent.CLICK, resetuipopup);
createuipopup("SING", e.currentTarget);
}
public function resetstudiousage(){
mcmic.gotoAndStop(1);
mcmic.mcstink.visible = false;
mcsofa.gotoAndStop(1);
mcsofa.mcstink.visible = false;
}
public function shopclose(e:MouseEvent):void{
turuninsoundbgm(1);
soundclick.play(0, 1, new SoundTransform(volsfx));
btnexit.visible = true;
charnointeraction();
charimage[0].stat = "idle";
charimage[0].objectto = "";
mcpositioning.visible = true;
mcbuildmode.visible = false;
removeallobjectfunction(false);
cleanupitemfollow();
balikinfungsiplate();
pausegame = false;
loaduistat();
}
public function topark(e:MouseEvent):void{
soundclick.play(0, 1, new SoundTransform(volsfx));
if (charstat[slotused][5] < walkenergy){
createtext("I'm too tired.");
} else {
charstat[slotused][5] = (charstat[slotused][5] - walkenergy);
if (charstat[slotused][5] <= 0){
charstat[slotused][5] = 0;
};
cleanupstreet();
loadspeedsymbol();
transisi("park");
};
}
public function tutorialclick(event:MouseEvent):void{
if (mctutorial.ke == "phone"){
mctutorial.texte = null;
mctutorial.gotoAndStop(1);
pausegame = false;
} else {
tutorialindex++;
mctutorial.nextFrame();
if (tutorialindex > (mctutorial.texte.length - 1)){
cektutorialdone();
} else {
soundtutorial.play(0, 1, new SoundTransform(volsfx));
settextvertical(mctutorial.texte[tutorialindex], mctutorial, 78.8);
mctutorial.mctxt.gotoAndPlay(2);
if ((((mctutorial.ke == "life")) && ((tutorialindex == 3)))){
mcuistat.tabindex++;
loaduistat();
};
};
};
}
public function textclose(e:MouseEvent):void{
var parente:*;
soundclick.play(0, 1, new SoundTransform(volsfx));
parente = e.currentTarget.parent;
parente.gotoAndStop(parente.totalFrames);
}
public function exitstudio(e:MouseEvent):void{
sounddoor.play(0, 1, new SoundTransform(volsfx));
soundclick.play(0, 1, new SoundTransform(volsfx));
gostreet();
}
public function samainlocaldgnsave(){
var k:*;
k = 1;
while (k <= 2) {
createnewlocalforthis(k);
k++;
};
}
public function calculatecrowd(){
var liste:*;
var i:*;
var j:*;
var ceknone:*;
var ke:*;
trace("cALCULATE CROWD");
liste = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11];
i = 1;
while (i <= 2) {
j = 1;
while (j <= 3) {
ceknone = randRange(0, 10);
if (((((charstat[slotused][1] % 7) == 0)) || (((charstat[slotused][1] % 7) == 6)))){
ceknone = 10;
};
if (ceknone < 3){
trace("RANDOM");
crowd[slotused][i][j] = -1;
} else {
ke = randRange(0, (liste.length - 1));
trace(((((i + " ") + j) + "ISI ") + liste[ke]));
crowd[slotused][i][j] = liste[ke];
liste.splice(ke, 1);
};
j++;
};
i++;
};
}
public function cleanupstudiotest(){
mcstudiotest.gotoAndStop(1);
stage.removeEventListener(KeyboardEvent.KEY_DOWN, studiotestkeyup);
stage.removeEventListener(Event.ENTER_FRAME, studiotestkeywaiting);
charstat[slotused][19] = jobto;
charstat[slotused][20] = 0;
timejam = jobto;
timemenit = 0;
charstat[slotused][33] = (24 - jobto);
if (studiotestsuccess >= studiosingingtime[int((int(charstat[slotused][24]) + int(1)))]){
createsuccesscareer();
trace("SUCCESS");
} else {
createfailedcareer();
trace("FAILED");
};
}
public function setdesiretext(){
var finale:*;
var i:*;
mcuistat.mcdesire.txt1.text = "";
if (mcuistat.mcdesire.currentLabel != "golight"){
trace("ab");
mcuistat.mcdesire.gotoAndStop("light");
};
finale = "";
i = 0;
while (i < desiredesc[charstat[slotused][32]].length) {
if (desiredesc[charstat[slotused][32]].charAt(i) == "X"){
finale = (finale + charstat[slotused][34]);
} else {
finale = (finale + desiredesc[charstat[slotused][32]].charAt(i));
};
i++;
};
mcuistat.mcdesire.mcstar.visible = true;
mcuistat.mcdesire.mcstar.gotoAndStop(desiregift[charstat[slotused][32]]);
settextvertical(finale, mcuistat.mcdesire, -9.6);
if (charstat[slotused][33] > 1){
mcuistat.txtdays.text = (charstat[slotused][33] + " hours");
} else {
mcuistat.txtdays.text = (charstat[slotused][33] + " hour");
};
}
public function exitstadium(e:MouseEvent):void{
sounddoor.play(0, 1, new SoundTransform(volsfx));
soundclick.play(0, 1, new SoundTransform(volsfx));
gostreet();
}
public function ceklifended(){
if ((charstat[slotused][37] - charstat[slotused][1]) <= 2){
trace(("life max : " + charstat[slotused][37]));
trace(("skrg : " + charstat[slotused][1]));
bwatnews(3, (charstat[slotused][37] - charstat[slotused][1]));
};
}
public function stadiumflag(e:MouseEvent):void{
soundclick.play(0, 1, new SoundTransform(volsfx));
cleanupeffectimage();
removealluiimage();
uipopuphealth = 2;
stage.addEventListener(MouseEvent.CLICK, resetuipopup);
createuipopup("RUN THE COURSE", e.currentTarget);
}
public function gojump(e:MouseEvent):void{
soundclick.play(0, 1, new SoundTransform(volsfx));
jumpchar();
}
public function careerfailedclick(e:MouseEvent):void{
mccareerfailed.gotoAndStop(1);
stage.removeEventListener(MouseEvent.CLICK, careerfailedclick);
charstat[slotused][26] = (workcompletion * 0.99);
cekwages();
}
public function jumpleft(){
if (mcstadiumtest.mcchar1.currentLabel == "run"){
if (mcstadiumtest.mcchar1.posisi > 1){
mcstadiumtest.mcchar1.posisi--;
setcharstadiumposition(-1);
};
};
}
public function createcrowd(){
var i:*;
var j:*;
var obj:*;
var obj2:*;
i = 1;
while (i <= 2) {
trace(("park stat : " + crowd[slotused][i]));
j = 1;
while (j <= 3) {
obj = getChildByName(("mccrowd" + i));
obj2 = obj.getChildByName(("mc" + j));
if (crowd[slotused][i][j] == -1){
obj2.visible = false;
} else {
if (obj2.visible == false){
trace("set");
obj2.visible = true;
obj2.gotoAndStop(crowd[slotused][i][j]);
};
};
j++;
};
i++;
};
}
public function cekquestdone(){
if ((((armor == true)) && ((AGIconnected == true)))){
if (so.data.dishesclean == 1){
agi.quests.submit({key:"clean", progress:0.5});
} else {
if (so.data.dishesclean >= 2){
agi.quests.submit({key:"clean"});
};
};
if (so.data.pizzaorder == 1){
agi.quests.submit({key:"pizza"});
};
if (so.data.fullwork == 1){
agi.quests.submit({key:"job"});
};
if (so.data.goodfriend == 1){
agi.quests.submit({key:"friend"});
};
if (so.data.investmentcoin == 1){
agi.quests.submit({key:"money"});
};
if (so.data.lessrelatives == 1){
agi.quests.submit({key:"family"});
};
};
}
public function cekarmorornot(){
var ini:*;
var sama:*;
var index:*;
var ada:*;
var i:*;
var j:*;
ini = loaderInfo.url;
armor = false;
sama = "armorgames";
index = 0;
ada = false;
i = 0;
while (i < ini.length) {
if (ini.charAt(i) == sama.charAt(index)){
index++;
i++;
j = i;
while (j < ini.length) {
if (ini.charAt(j) == sama.charAt(index)){
if (index == (sama.length - 1)){
armor = true;
//unresolved jump
};
index++;
} else {
index = 0;
break;
};
j++;
};
};
i++;
};
}
public function removethiseffect(mader:Object){
var parente:*;
var indexke:*;
var i:*;
parente = mader.parent;
indexke = mader.indexke;
effectimage[indexke].removeEventListener(Event.ENTER_FRAME, textbaloonwaiting);
effectimage[indexke].removeEventListener(Event.ENTER_FRAME, effectwaiting);
effectimage[indexke].removeEventListener(Event.ENTER_FRAME, studionotewaiting);
parente.removeChild(effectimage[indexke]);
effectimage[indexke] = null;
effectimage.splice(indexke, 1);
i = indexke;
while (i < effectimage.length) {
effectimage[i].indexke--;
i++;
};
}
public function cekstatusadd(){
var energyreducer:*;
energyreducer = ((charstat[slotused][30] / 10) * energykuranger);
trace(((("REDUCER : " + energyreducer) + " ") + charstat[slotused][30]));
energykuranger = (energykuranger - energyreducer);
speedx = (defaultspeedx + ((charstat[slotused][16] * 0.1) * defaultspeedx));
speedy = (defaultspeedy + ((charstat[slotused][16] * 0.1) * defaultspeedy));
trace(((("SPEED JD : " + speedx) + " ") + speedy));
cekdesirestatus();
}
public function finalstatover(e:MouseEvent):void{
var namee:*;
stage.addEventListener(Event.ENTER_FRAME, finalstatwaiting);
namee = e.currentTarget.name;
namee = int(namee.charAt((namee.length - 1)));
if (namee == 1){
mcover.txt1.text = ((((charstat[slotused][16] + "+") + tambahansport) + "+") + finalstat);
} else {
if (namee == 2){
mcover.txt1.text = ((((charstat[slotused][17] + "+") + tambahanint) + "+") + finalstat);
} else {
if (namee == 3){
mcover.txt1.text = ((((charstat[slotused][18] + "+") + tambahancreat) + "+") + finalstat);
};
};
};
}
public function startstudiotest(){
var jum:*;
var standare:*;
var maxe:*;
var i:*;
var tottime:*;
var totale:*;
var waktusisa:*;
var j:*;
studiotestsuccess = 0;
settextvertical("Press the right key at the right time!", mcstudiotest.mctxt, -18.1);
mcstudiotest.mctxt.gotoAndPlay(2);
studiotestappearamount = ((charstat[slotused][18] * 2) + 10);
jum = studiotestappearamount;
standare = studiosingingtime[int((int(charstat[slotused][24]) + int(1)))];
maxe = int((standare + (standare / 2)));
if (jum > maxe){
jum = maxe;
};
trace(("KELUARE : " + jum));
studiotestappearamount = jum;
i = 0;
while (i < jum) {
studiotestbutton[studiotestbutton.length] = randRange(1, 6);
totale = (studiotestappearamount - i);
waktusisa = 0;
j = 0;
while (j < studiotesttime.length) {
waktusisa = (waktusisa + studiotesttime[j]);
j++;
};
waktusisa = (studiotesttimeleft - waktusisa);
trace(("waktu sisa : " + waktusisa));
trace(("masi ada : " + int((studiotestappearamount - i))));
waktusisa = (waktusisa / (studiotestappearamount - i));
studiotesttime[studiotesttime.length] = randRange(int((waktusisa * 0.8)), int((waktusisa * 0.9)));
i++;
};
trace(((("jum keluar : " + studiotestappearamount) + " ") + int((studiotestbutton.length - 1))));
tottime = 0;
i = 0;
while (i < studiotestbutton.length) {
tottime = (tottime + studiotesttime[i]);
i++;
};
mcstudiotest.mcnote.gotoAndStop(2);
mcstudiotest.btnstart.visible = false;
stage.addEventListener(KeyboardEvent.KEY_DOWN, studiotestkeyup);
stage.addEventListener(Event.ENTER_FRAME, studiotestkeywaiting);
}
public function cekcafetime(){
var i:*;
var rande:*;
i = 1;
while (i <= 3) {
rande = randRange(1, 3);
cafe[slotused][i] = rande;
i++;
};
trace(("APA : " + cafe[slotused]));
if (currentLabel == "cafe"){
if (charimage[0].stat != "idle"){
charimage[0].stat = "idle";
charimage[0].visible = true;
charimage[0].timee = -1;
charimage[0].timeetemp = -1;
};
resetcafeusage();
};
}
public function cleantilecolor(){
var i:*;
var j:*;
i = 0;
while (i < housesize[charstat[slotused][13]]) {
j = 0;
while (j < housesize[charstat[slotused][13]]) {
tileimage[i][j].transform.colorTransform = colornormal;
tileimage[i][j].occupied = 0;
j++;
};
i++;
};
}
public function cekphoneringing(){
var i:*;
if ((((donefirstjob[slotused] == false)) && ((tutoriallife[slotused] == true)))){
i = 0;
while (i < objectimage.length) {
if ((((objectimage[i] is item31)) && ((objectimage[i].currentFrame == 1)))){
trace("RINGING");
objectimage[i].addEventListener(Event.ENTER_FRAME, phoneringwaiting);
objectimage[i].gotoAndPlay(2);
break;
};
i++;
};
} else {
if ((((donefirstjob[slotused] == true)) && ((tutoriallife[slotused] == true)))){
if (tutorialsave[slotused] == false){
i = 0;
while (i < objectimage.length) {
if ((((objectimage[i] is item31)) && ((objectimage[i].currentFrame == 1)))){
trace("RINGING");
objectimage[i].addEventListener(Event.ENTER_FRAME, phoneringwaiting);
objectimage[i].gotoAndPlay(2);
break;
};
i++;
};
};
};
};
}
public function cekvalid(kex:int, key:int){
var valid:*;
valid = false;
if ((((kex == (housesize[charstat[slotused][13]] - 1))) && ((key == (housesize[charstat[slotused][13]] - 1))))){
valid = false;
} else {
if ((((((((((kex >= 0)) && ((kex < housesize[charstat[slotused][13]])))) && ((key >= 0)))) && ((key < housesize[charstat[slotused][13]])))) && ((mapArray[kex][key].cellType == CELL_FREE)))){
valid = true;
};
};
return (valid);
}
public function previnput(e:MouseEvent):void{
soundclick.play(0, 1, new SoundTransform(volsfx));
if (e.currentTarget.currentFrame == 1){
if (mcinput.currentLabel == "ok"){
mcinput.page--;
mcinput.gotoAndPlay(("back" + mcinput.page));
loadinput();
};
};
}
public function loadmainmenu(){
mcmainmenu.mcoption.visible = false;
mcmainmenu.btnslot1.visible = false;
mcmainmenu.btnslot2.visible = false;
mcmainmenu.btnback.visible = false;
mcmainmenu.btndelete1.visible = false;
mcmainmenu.btndelete2.visible = false;
mcmainmenu.btndelete1.removeEventListener(MouseEvent.MOUSE_OVER, oversound);
mcmainmenu.btndelete1.addEventListener(MouseEvent.MOUSE_OVER, oversound);
mcmainmenu.btndelete2.removeEventListener(MouseEvent.MOUSE_OVER, oversound);
mcmainmenu.btndelete2.addEventListener(MouseEvent.MOUSE_OVER, oversound);
mcmainmenu.btnplay.removeEventListener(MouseEvent.MOUSE_OVER, oversound);
mcmainmenu.btnplay.addEventListener(MouseEvent.MOUSE_OVER, oversound);
mcmainmenu.btncredits.removeEventListener(MouseEvent.MOUSE_OVER, oversound);
mcmainmenu.btncredits.addEventListener(MouseEvent.MOUSE_OVER, oversound);
mcmainmenu.btnslot1.removeEventListener(MouseEvent.MOUSE_OVER, oversound);
mcmainmenu.btnslot1.addEventListener(MouseEvent.MOUSE_OVER, oversound);
mcmainmenu.btnslot2.removeEventListener(MouseEvent.MOUSE_OVER, oversound);
mcmainmenu.btnslot2.addEventListener(MouseEvent.MOUSE_OVER, oversound);
mcmainmenu.btnback.removeEventListener(MouseEvent.MOUSE_OVER, oversound);
mcmainmenu.btnback.addEventListener(MouseEvent.MOUSE_OVER, oversound);
mcmainmenu.btnplay.removeEventListener(MouseEvent.CLICK, mmplay);
mcmainmenu.btnplay.addEventListener(MouseEvent.CLICK, mmplay);
mcmainmenu.btncredits.removeEventListener(MouseEvent.CLICK, mmcredits);
mcmainmenu.btncredits.addEventListener(MouseEvent.CLICK, mmcredits);
mcmainmenu.btnslot1.removeEventListener(MouseEvent.CLICK, mmslot);
mcmainmenu.btnslot1.addEventListener(MouseEvent.CLICK, mmslot);
mcmainmenu.btnslot2.removeEventListener(MouseEvent.CLICK, mmslot);
mcmainmenu.btnslot2.addEventListener(MouseEvent.CLICK, mmslot);
mcmainmenu.btnback.removeEventListener(MouseEvent.CLICK, mmback);
mcmainmenu.btnback.addEventListener(MouseEvent.CLICK, mmback);
mcmainmenu.btndelete1.removeEventListener(MouseEvent.CLICK, mmdelete);
mcmainmenu.btndelete1.addEventListener(MouseEvent.CLICK, mmdelete);
mcmainmenu.btndelete2.removeEventListener(MouseEvent.CLICK, mmdelete);
mcmainmenu.btndelete2.addEventListener(MouseEvent.CLICK, mmdelete);
mcmainmenu.mcoption.removeEventListener(MouseEvent.MOUSE_OVER, oversound);
mcmainmenu.mcoption.addEventListener(MouseEvent.MOUSE_OVER, oversound);
mcmainmenu.mcoption.btnok.removeEventListener(MouseEvent.CLICK, mmdeleteok);
mcmainmenu.mcoption.btnok.addEventListener(MouseEvent.CLICK, mmdeleteok);
mcmainmenu.mcoption.removeEventListener(MouseEvent.MOUSE_OVER, oversound);
mcmainmenu.mcoption.addEventListener(MouseEvent.MOUSE_OVER, oversound);
mcmainmenu.mcoption.btneh.removeEventListener(MouseEvent.CLICK, mmdeleteeh);
mcmainmenu.mcoption.btneh.addEventListener(MouseEvent.CLICK, mmdeleteeh);
}
public function createsound(){
var randsound:*;
var soundke:*;
soundphase = 1;
randsound = randRange(0, 10);
if ((((charstat[slotused][1] == 1)) && ((charstat[slotused][19] == 5)))){
randsound = 5;
};
if (randsound < 3){
soundtimer = randRange((30 * 25), (50 * 25));
} else {
if (bgmon == true){
volbgm = 1;
};
soundtimer = randRange((60 * 25), (140 * 25));
soundke = randRange(0, (soundlist.length - 1));
soundchannel1 = soundlist[soundke].play(0, 999, new SoundTransform(volbgm));
};
}
public function cekpatch(){
var i:*;
if (so.data.tutorialsave == undefined){
so.data.tutorialsave = [];
i = 1;
while (i <= 2) {
so.data.tutorialsave[i] = false;
i++;
};
};
if (so.data.dishesclean == undefined){
txtlog.text = "CREATE NEW DISHES";
so.data.dishesclean = 0;
};
if (so.data.pizzaorder == undefined){
so.data.pizzaorder = 0;
};
if (so.data.fullwork == undefined){
so.data.fullwork = 0;
};
if (so.data.goodfriend == undefined){
so.data.goodfriend = 0;
};
if (so.data.investmentcoin == undefined){
so.data.investmentcoin = 0;
};
if (so.data.lessrelatives == undefined){
so.data.lessrelatives = 0;
};
}
public function ambilharikerja(){
var harike:*;
harike = (charstat[slotused][1] % 7);
if (harike == 0){
harike = 7;
};
return (harike);
}
public function createobstacleposition(){
var rand:*;
var i:*;
var ambil:*;
var ada:*;
var obj:*;
var j:*;
trace("cREATE OBSTACLE");
rand = [];
do {
ambil = randRange(1, 4);
ada = false;
i = 0;
while (i < rand.length) {
if (ambil == rand[i]){
ada = true;
break;
};
i++;
};
if (ada == false){
rand[rand.length] = ambil;
};
} while ((rand.length - 1) < 2);
trace(("haseil : " + rand));
i = 1;
while (i <= 4) {
obj = mcstadiumtest.getChildByName(("mcobstacle" + i));
obj.visible = false;
j = 0;
while (j < rand.length) {
if (i == rand[j]){
obj.visible = true;
obj.gotoAndStop(randRange(1, obj.totalFrames));
};
j++;
};
i++;
};
}
public function createpromo(){
var jumpromo:*;
var adarare:*;
var no:*;
var promono:*;
var i:*;
trace("CREATE PROMO");
jumpromo = randRange(3, 5);
adarare = randRange(0, 10);
if (adarare <= 6){
adarare = true;
jumpromo++;
};
promostat[slotused] = [];
do {
no = false;
promono = randRange(1, (houseitemhp.length - 1));
i = 0;
while (i < (promostat[slotused].length - 1)) {
if (promostat[slotused][i] == promono){
no = true;
break;
};
i++;
};
if (no == false){
jumpromo--;
if ((((jumpromo <= 0)) && ((adarare == true)))){
promostat[slotused][promostat[slotused].length] = [promono, 2];
} else {
promostat[slotused][promostat[slotused].length] = [promono, 1];
};
};
} while (jumpromo > 0);
trace(("hasil promo : " + promostat[slotused]));
}
public function ceklightenarea(){
var lamplist:*;
var i:*;
var lightarea:*;
var xe:*;
var ye:*;
var j:*;
var k:*;
var finalex:*;
var finaley:*;
var l:*;
lamplist = [];
i = 0;
while (i < objectimage.length) {
if (objectimage[i].namee == "LAMP"){
lamplist[lamplist.length] = i;
};
i++;
};
lightarea = 2;
i = 0;
while (i < lamplist.length) {
xe = objectimage[lamplist[i]].xe;
ye = objectimage[lamplist[i]].ye;
j = (lightarea * -1);
while (j <= lightarea) {
k = (lightarea * -1);
while (k <= lightarea) {
finalex = (xe + j);
finaley = (ye + k);
if ((((((((finalex >= 0)) && ((finalex < housesize[charstat[slotused][13]])))) && ((finaley >= 0)))) && ((finaley < housesize[charstat[slotused][13]])))){
tileimage[finalex][finaley].gotoAndStop(1);
l = 0;
while (l < objectimage.length) {
if ((((objectimage[l].xe == finalex)) && ((objectimage[l].ye == finaley)))){
objectimage[l].onlight = true;
objectimage[l].transform.colorTransform = colornormal;
};
l++;
};
l = 0;
while (l < wallimage.length) {
if ((((wallimage[l].xe == finalex)) && ((wallimage[l].ye == finaley)))){
wallimage[l].transform.colorTransform = colornormal;
};
l++;
};
if ((((finalex == charimage[0].xe)) && ((finaley == charimage[0].ye)))){
charimage[0].onlight = true;
charimage[0].transform.colorTransform = colornormal;
};
};
k++;
};
j++;
};
i++;
};
}
public function cleanupeffectimage(){
var j:*;
var parente:*;
j = 0;
while (j < effectimage.length) {
parente = effectimage[j].parent;
effectimage[j].removeEventListener(Event.ENTER_FRAME, textbaloonwaiting);
effectimage[j].removeEventListener(Event.ENTER_FRAME, effectwaiting);
effectimage[j].removeEventListener(Event.ENTER_FRAME, studionotewaiting);
parente.removeChild(effectimage[j]);
effectimage[j] = null;
j++;
};
effectimage = [];
}
public function musicmute(e:MouseEvent):void{
if (volbgm == 1){
volbgm = 0;
bgmon = false;
soundsetting[0] = 0;
} else {
volbgm = 1;
soundsetting[0] = 1;
bgmon = true;
};
so.data.soundsetting[0] = volbgm;
if (soundchannel1 != null){
soundchannel1.soundTransform = new SoundTransform(volbgm);
};
if (soundchannel3 != null){
soundchannel3.soundTransform = new SoundTransform(volbgm);
};
if (soundchannel4 != null){
soundchannel4.soundTransform = new SoundTransform(volbgm);
};
loadsoundsetting();
}
public function gohome(){
cleanupstreet();
loadspeedsymbol();
transisi("house");
}
public function jobapply(e:MouseEvent):void{
var i:*;
var obj:*;
if (donefirstjob[slotused] == false){
donefirstjob[slotused] = true;
i = 0;
while (i < objectimage.length) {
if ((objectimage[i] is item31)){
objectimage[i].removeEventListener(Event.ENTER_FRAME, phoneringwaiting);
objectimage[i].gotoAndStop(1);
break;
};
i++;
};
};
soundclick.play(0, 1, new SoundTransform(volsfx));
charstat[slotused][26] = 0;
charstat[slotused][29] = 1;
charstat[slotused][23] = mcjob.ke;
charstat[slotused][25] = jobpercentage[slotused][charstat[slotused][23]];
charstat[slotused][24] = jobreached[slotused][charstat[slotused][23]];
charimage[0].mc1.gotoAndPlay("jump");
i = 1;
while (i <= 3) {
obj = getChildByName(("mcnews" + i));
if (obj != null){
if (obj.currentLabel == "ok"){
if ((((obj.mc1.currentFrame == 1)) || ((obj.mc1.currentFrame == 2)))){
obj.gotoAndStop(1);
};
};
};
i++;
};
if (jobday[charstat[slotused][23]][((charstat[slotused][1] + 1) % 7)] == 1){
createtext("My new job starts tomorrow!");
};
mcjobstat.gotoAndPlay(2);
loadjobprogress();
pausegame = false;
mcjob.gotoAndStop(1);
trace(("mari ga se : " + tutorialjob[slotused]));
if (tutorialjob[slotused] == false){
loadtutorial("job");
};
}
public function createstaticon(ke:int){
effectimage[effectimage.length] = new (staticon);
addChildAt(effectimage[(effectimage.length - 1)], getChildIndex(mceffectposition));
effectimage[(effectimage.length - 1)].mc1.gotoAndStop(ke);
effectimage[(effectimage.length - 1)].indexke = (effectimage.length - 1);
if ((((ke >= 8)) && ((ke <= 11)))){
soundgainpoint.play(0, 1, new SoundTransform(volsfx));
};
cektextposition(effectimage[(effectimage.length - 1)]);
effectimage[(effectimage.length - 1)].mouseChildren = false;
effectimage[(effectimage.length - 1)].mouseEnabled = false;
effectimage[(effectimage.length - 1)].addEventListener(Event.ENTER_FRAME, effectwaiting);
}
public function loadgambarjobuntuk(mader:Object, ke:int){
var i:*;
var objtext:*;
var objday:*;
mader.mc1.gotoAndStop(ke);
mader.txt1.text = jobwages[ke][0];
i = 1;
while (i <= 7) {
objtext = mader.getChildByName(("txtday" + i));
objday = mader.getChildByName(("mcday" + i));
if (jobday[ke][i] == 0){
objtext.textColor = 14463334;
objday.gotoAndStop(2);
} else {
objtext.textColor = 0xFFFFFF;
objday.gotoAndStop(1);
};
i++;
};
}
public function movethischar(ke:int){
var targetx:*;
var targety:*;
var done:*;
var xe:*;
var ye:*;
if (charimage[ke].stat == "waitwalk"){
if (charimage[ke].arraymove.length > 0){
charimage[ke].stat = "walk";
targetx = charimage[ke].arraymove[0][0];
targety = charimage[ke].arraymove[0][1];
if ((((targety > charimage[ke].ye)) || ((targetx > charimage[ke].xe)))){
if (charimage[ke].mc1.currentLabel != "walk1"){
charimage[ke].mc1.gotoAndPlay("walk1");
};
} else {
if (charimage[ke].mc1.currentLabel != "walk2"){
charimage[ke].mc1.gotoAndPlay("walk2");
};
};
if (targety > charimage[ke].ye){
if (charimage[ke].directione == "right"){
charimage[ke].directione = "left";
charimage[ke].mc1.scaleX = (charimage[ke].mc1.scaleX * -1);
};
} else {
if (targety < charimage[ke].ye){
if (charimage[ke].directione == "left"){
charimage[ke].directione = "right";
charimage[ke].mc1.scaleX = (charimage[ke].mc1.scaleX * -1);
};
} else {
if (targetx < charimage[ke].xe){
if (charimage[ke].directione == "right"){
charimage[ke].directione = "left";
charimage[ke].mc1.scaleX = (charimage[ke].mc1.scaleX * -1);
};
} else {
if (targetx > charimage[ke].xe){
if (charimage[ke].directione == "left"){
charimage[ke].directione = "right";
charimage[ke].mc1.scaleX = (charimage[ke].mc1.scaleX * -1);
};
};
};
};
};
};
} else {
if (charimage[ke].stat == "walk"){
done = false;
targetx = charimage[ke].arraymove[0][0];
targety = charimage[ke].arraymove[0][1];
if (charimage[ke].xe < targetx){
charimage[ke].x = (charimage[ke].x + speedx);
if (charimage[ke].x >= tileimage[targetx][targety].x){
done = true;
};
} else {
if (charimage[ke].xe > targetx){
charimage[ke].x = (charimage[ke].x - speedx);
if (charimage[ke].x <= tileimage[targetx][targety].x){
done = true;
};
} else {
if (charimage[ke].xe == targetx){
if (charimage[ke].directione == "left"){
charimage[ke].x = (charimage[ke].x - speedx);
} else {
charimage[ke].x = (charimage[ke].x + speedx);
};
};
};
};
if (charimage[ke].ye < targety){
charimage[ke].y = (charimage[ke].y + speedy);
if (charimage[ke].y >= tileimage[targetx][targety].y){
done = true;
};
} else {
if (charimage[ke].ye > targety){
charimage[ke].y = (charimage[ke].y - speedy);
if (charimage[ke].y <= tileimage[targetx][targety].y){
done = true;
};
} else {
if (charimage[ke].ye == targety){
if (charimage[ke].directione == "left"){
charimage[ke].y = (charimage[ke].y - speedy);
} else {
charimage[ke].y = (charimage[ke].y + speedy);
};
};
};
};
if (done == true){
if (ke == 0){
mapArray[charimage[ke].xe][charimage[ke].ye].cellType = CELL_FREE;
};
charimage[ke].xe = targetx;
charimage[ke].ye = targety;
charimage[ke].x = tileimage[targetx][targety].x;
charimage[ke].y = tileimage[targetx][targety].y;
if (ke == 0){
ceklight();
ceklightenarea();
setlocked(targetx, targety);
};
charimage[ke].arraymove.splice(0, 1);
if (charimage[ke].arraymove.length == 0){
if (ke == 0){
if (onout == true){
gooutside();
} else {
cekaccessobject();
};
} else {
if ((((targetx == posisirumahx[charstat[slotused][13]])) && ((targety == posisirumahx[charstat[slotused][13]])))){
cleanuprepairman();
} else {
xe = objectimage[charimage[ke].objectto].xe;
ye = objectimage[charimage[ke].objectto].ye;
setdirection(xe, ye, ke);
if (charimage[ke].mc1.currentLabel == "idle1"){
charimage[ke].mc1.gotoAndPlay("idleactivity1");
} else {
charimage[ke].mc1.gotoAndPlay("idleactivity2");
};
charimage[ke].phase = 2;
charimage[ke].timee = repairmanrepairtime;
charimage[ke].timeetemp = repairmanrepairtime;
};
};
} else {
charimage[ke].stat = "waitwalk";
};
};
};
};
}
public function uipopupclick(e:MouseEvent):void{
var texte:*;
var ownerindex:*;
var diisisebanyak:*;
var i:*;
var jadie:*;
var j:*;
var acuan:*;
var isi:*;
var obj:*;
var go:*;
var jumtotal:*;
var sizex:*;
var sizey:*;
var objxe:*;
var objye:*;
var finalx:*;
var finaly:*;
var charfinalpositionx:*;
var charfinalpositiony:*;
var noneed:*;
var ok:*;
var inino:*;
var priority:*;
var ada:*;
var xe:*;
var ye:*;
var kex:*;
var key:*;
var solutionlist:*;
var lengthlist:*;
var charpositionlist:*;
var okay:*;
var jadiposx:*;
var jadiposy:*;
var objnomor:*;
var objtipe:*;
var sizex2:*;
var sizey2:*;
var objposx:*;
var objposy:*;
var te:*;
var be:*;
var ie:*;
var je:*;
var kex2:*;
var key2:*;
var hasile:*;
soundclick.play(0, 1, new SoundTransform(volsfx));
texte = e.currentTarget.txt1.text;
ownerindex = e.currentTarget.ownerindex;
removealluiimage();
diisisebanyak = -1;
trace(("hm : " + texte));
i = 1;
while (i < foodstocklist.length) {
jadie = (("+" + foodstocklist[i]) + " STOCK");
trace(((("banding : " + texte) + " ") + jadie));
if (texte == jadie){
trace("a");
charstat[slotused][2] = (charstat[slotused][2] - (foodstocklist[i] * foodstockprice));
soundcoin.play(0, 1, new SoundTransform(volsfx));
mcuistat.mccoins.gotoAndPlay(2);
mcuistat.txtgold.text = charstat[slotused][2];
diisisebanyak = foodstocklist[i];
if (charstat[slotused][32] == 19){
cekdesiredone(19);
};
trace("b");
break;
};
i++;
};
if (diisisebanyak != -1){
trace("c");
i = 0;
while (i < objectimage.length) {
if (objectimage[i].namee == "REFRIGERATOR"){
j = 0;
while (j < refrigeratorstock[slotused].length) {
if ((((refrigeratorstock[slotused][j][0] == objectimage[i].xe)) && ((refrigeratorstock[slotused][j][1] == objectimage[i].ye)))){
trace("d");
acuan = smallrefri;
if (objectimage[i].nomor == 16){
acuan = bigrefri;
};
trace(((("ini : " + refrigeratorstock[slotused][j][2]) + " ") + acuan));
if (refrigeratorstock[slotused][j][2] < acuan){
isi = (acuan - refrigeratorstock[slotused][j][2]);
if (diisisebanyak < isi){
refrigeratorstock[slotused][j][2] = (refrigeratorstock[slotused][j][2] + diisisebanyak);
diisisebanyak = 0;
} else {
if (diisisebanyak > isi){
refrigeratorstock[slotused][j][2] = acuan;
diisisebanyak = (diisisebanyak - isi);
} else {
if (diisisebanyak == isi){
refrigeratorstock[slotused][j][2] = acuan;
diisisebanyak = 0;
};
};
};
};
};
j++;
};
};
i++;
};
trace(("akhire : " + diisisebanyak));
};
if (texte == "HELP CLEANUP"){
resetcafeusage();
obj = getChildByName(("mctable" + e.currentTarget.tableke));
obj.gotoAndStop(2);
obj = null;
charimage[0].tableke = e.currentTarget.tableke;
charimage[0].timee = 0;
charimage[0].timeetemp = 75;
charimage[0].stat = texte;
charimage[0].visible = false;
} else {
if (texte == "EAT LEFTOVER"){
charimage[0].timee = -1;
charimage[0].timeetemp = -14;
charimage[0].stat = "idle";
charimage[0].visible = true;
soundchewing.play(0, 1, new SoundTransform(volsfx));
charstat[slotused][4] = (charstat[slotused][4] + snackeffect);
if (charstat[slotused][4] > statmax){
charstat[slotused][4] = statmax;
};
charstat[slotused][3] = (charstat[slotused][3] - 20);
cafe[slotused][e.currentTarget.tableke] = 1;
resetcafeusage();
if (mcuistat.tabindex == 1){
obj = mcuistat.getChildByName(("mc" + 2));
if (obj.mcarrow.currentFrame == 1){
obj.mcarrow.gotoAndPlay(2);
};
obj = null;
};
createtext(textlefover[randRange(0, (textmakan.length - 1))]);
} else {
if (texte == "SLEEP IN PARK"){
resetparkusage();
charimage[0].visible = false;
charimage[0].stat = "SLEEP IN PARK";
mcsofa.gotoAndStop(2);
if (charstat[slotused][6] == 0){
mcsofa.mcstink.visible = true;
};
} else {
if (texte == "TAKE A BATH"){
resetparkusage();
charimage[0].visible = false;
charimage[0].stat = "TAKE A BATH";
mcpond.gotoAndStop(2);
if (charstat[slotused][6] == 0){
mcpond.mcstink.visible = true;
};
} else {
if (texte == "TAKE A DUMP"){
resetparkusage();
charimage[0].visible = false;
charimage[0].stat = "TAKE A DUMP";
mcbush.gotoAndStop(2);
if (charstat[slotused][6] == 0){
mcbush.mcstink.visible = true;
};
} else {
if (texte == "PERFORM"){
resetparkusage();
charimage[0].visible = false;
charimage[0].stat = "PERFORM";
mcperform.gotoAndStop(2);
if (charstat[slotused][6] == 0){
mcperform.mcstink.visible = true;
};
} else {
if (texte == "TALK"){
pausegame = true;
charstat[slotused][31] = (charstat[slotused][31] - relationshipcost[relationship[slotused][e.currentTarget.npcno]]);
mcstarreduced.mc1.txt1.textColor = "0xFF0000";
mcstarreduced.mc1.txt1.text = ("- " + relationshipcost[relationship[slotused][e.currentTarget.npcno]]);
mcstarreduced.gotoAndPlay(2);
updatestat();
loadrelationship(e.currentTarget.npcno);
} else {
if (texte == "RUN THE COURSE"){
resetstadiumusage();
charimage[0].visible = false;
charimage[0].stat = "RUN THE COURSE";
mcflag.gotoAndPlay(2);
if (charstat[slotused][6] == 0){
mcflag.mcstink.visible = true;
};
} else {
if (texte == "WORK"){
resetofficeusage();
charimage[0].visible = false;
charimage[0].stat = "WORK";
mctable.gotoAndStop(1);
if (charstat[slotused][6] == 0){
mctable.mcstink.visible = true;
};
} else {
if (texte == "SING"){
resetstudiousage();
charimage[0].visible = false;
charimage[0].stat = "SING";
mcmic.gotoAndStop(2);
if (charstat[slotused][6] == 0){
mcmic.mcstink.visible = true;
};
} else {
if (texte == "PIANO PERFORM"){
resettownparkusage();
charimage[0].visible = false;
charimage[0].stat = texte;
mcpiano.gotoAndStop(2);
if (charstat[slotused][6] == 0){
mcpiano.mcstink.visible = true;
};
} else {
if (texte == "FLUTE PERFORM"){
resettownparkusage();
charimage[0].visible = false;
charimage[0].stat = texte;
mcflute.gotoAndStop(2);
if (charstat[slotused][6] == 0){
mcflute.mcstink.visible = true;
};
} else {
if (texte == "READ NEWSPAPER"){
resettownparkusage();
charimage[0].visible = false;
charimage[0].stat = texte;
mcbook.gotoAndStop(2);
if (charstat[slotused][6] == 0){
mcbook.mcstink.visible = true;
};
} else {
if (texte == "JOGGING"){
resettownparkusage();
charimage[0].visible = false;
charimage[0].stat = texte;
mcflag.gotoAndPlay(2);
if (charstat[slotused][6] == 0){
mcflag.mcstink.visible = true;
};
} else {
if (texte == "REST"){
if (currentLabel == "office"){
resetofficeusage();
} else {
if (currentLabel == "studio"){
resetstudiousage();
} else {
if (currentLabel == "stadium"){
resetstadiumusage();
} else {
if (currentLabel == "park"){
resetparkusage();
};
};
};
};
if ((((charstat[slotused][32] == 30)) && ((((currentLabel == "office")) || ((currentLabel == "studio")))))){
cekdesiredone(30);
};
charimage[0].visible = false;
charimage[0].stat = "REST";
mcsofa.gotoAndStop(2);
if (charstat[slotused][6] == 0){
mcsofa.mcstink.visible = true;
};
} else {
if (texte == "USE BATHROOM"){
if (currentLabel == "office"){
resetofficeusage();
} else {
if (currentLabel == "studio"){
resetstudiousage();
} else {
if (currentLabel == "stadium"){
resetstadiumusage();
} else {
if (currentLabel == "park"){
resetparkusage();
};
};
};
};
charimage[0].visible = false;
charimage[0].stat = "USE BATHROOM";
} else {
if ((((((texte == "GRAB A SNACK")) || ((texte == "ORDER FRIES")))) || ((texte == "ORDER STEAK")))){
go = false;
if ((((texte == "GRAB A SNACK")) || ((texte == "ORDER FRIES")))){
if (charstat[slotused][2] >= snackcost){
go = true;
charstat[slotused][2] = (charstat[slotused][2] - snackcost);
charstat[slotused][4] = (charstat[slotused][4] + snackeffect);
charstat[slotused][7] = (charstat[slotused][7] - snackbladder);
};
} else {
if (texte == "ORDER STEAK"){
if (charstat[slotused][2] >= steakcost){
go = true;
charstat[slotused][2] = (charstat[slotused][2] - steakcost);
charstat[slotused][4] = (charstat[slotused][4] + steakeffect);
charstat[slotused][7] = (charstat[slotused][7] - steakbladder);
};
};
};
if (go == true){
if (charstat[slotused][4] > statmax){
charstat[slotused][4] = statmax;
};
if (charstat[slotused][7] <= 0){
charstat[slotused][7] = 0;
};
if (currentLabel == "office"){
resetofficeusage();
} else {
if (currentLabel == "studio"){
resetstudiousage();
} else {
if (currentLabel == "stadium"){
resetstadiumusage();
} else {
if (currentLabel == "park"){
resetparkusage();
};
};
};
};
soundchewing.play(0, 1, new SoundTransform(volsfx));
soundcoin.play(0, 1, new SoundTransform(volsfx));
mcuistat.mccoins.gotoAndPlay(2);
mcuistat.txtgold.text = charstat[slotused][2];
if (mcuistat.tabindex == 1){
obj = mcuistat.getChildByName(("mc" + 2));
if (obj.mcarrow.currentFrame == 1){
obj.mcarrow.gotoAndPlay(2);
};
obj = null;
};
charimage[0].stat = "idle";
charimage[0].visible = true;
createtext(textmakan[randRange(0, (textmakan.length - 1))]);
} else {
createtext("I don't have enough money.");
};
} else {
if ((((((((texte == "BUS TO WORK")) || ((texte == "BUS TO CAFE")))) || ((texte == "BUS TO PARK")))) || ((texte == "BUS TO TOWN PARK")))){
if (charstat[slotused][2] >= buscost){
charstat[slotused][2] = (charstat[slotused][2] - buscost);
soundcoin.play(0, 1, new SoundTransform(volsfx));
mcuistat.mccoins.gotoAndPlay(2);
mcuistat.txtgold.text = charstat[slotused][2];
cleanupstreet();
loadspeedsymbol();
if (texte == "BUS TO WORK"){
if (charstat[slotused][23] == 2){
transisi("office");
} else {
if (charstat[slotused][23] == 3){
transisi("studio");
} else {
if (charstat[slotused][23] == 1){
transisi("stadium");
};
};
};
} else {
if (texte == "BUS TO CAFE"){
transisi("cafe");
} else {
if (texte == "BUS TO PARK"){
transisi("park");
} else {
if (texte == "BUS TO TOWN PARK"){
transisi("townpark");
};
};
};
};
} else {
createtext("I don't have enough money.");
};
} else {
if ((((((((((texte == "SPICY SPAGHETTI")) || ((texte == "SAUSAGE & BEAN")))) || ((texte == "CAESAR SALAD")))) || ((texte == "ROASTED CHICKEN")))) || ((texte == "TART CAKE")))){
jumtotal = 0;
i = 0;
while (i < refrigeratorstock[slotused].length) {
if (refrigeratorstock[slotused][i][2] > 0){
jumtotal = (jumtotal + refrigeratorstock[slotused][i][2]);
};
i++;
};
charimage[0].stat = "COOKING";
i = 0;
while (i < cooklist.length) {
if (texte == cooklist[i]){
if (jumtotal >= cookstock[i]){
charimage[0].cookno = i;
charimage[0].timee = 0;
charimage[0].timeetemp = (cooktime[i] * 25);
if (charimage[0].mc1.currentLabel == "idle1"){
charimage[0].mc1.gotoAndPlay("idleactivity1");
} else {
charimage[0].mc1.gotoAndPlay("idleactivity2");
};
objectimage[charimage[0].objectto].mckettle.gotoAndPlay(2);
break;
} else {
trace("ER 3");
createtext("No food stores.");
};
};
i++;
};
} else {
obj = objectimage[ownerindex];
sizex = houseitemsizex[obj.nomor][obj.tipe];
sizey = houseitemsizey[obj.nomor][obj.tipe];
objxe = obj.xe;
objye = obj.ye;
charfinalpositionx = charimage[0].xe;
charfinalpositiony = charimage[0].ye;
trace(((("cek pos awal : " + charfinalpositionx) + " ") + charfinalpositiony));
go = false;
noneed = false;
trace(("CHECK : " + obj));
trace(("CHECK : " + obj.accessdirectionx));
if (obj.accessdirectionx == 9){
if (texte == "EAT"){
if (toplate == 1){
sizex = 0;
sizey = 0;
} else {
objxe = (objxe + sizex);
objye = (objye + sizey);
sizex = 0;
sizey = 0;
};
} else {
if (texte == "CLEAN UP"){
noneed = true;
ok = false;
inino = 0;
priority = [];
i = 0;
while (i < objectimage.length) {
if (objectimage[i].namee == "TRASH BIN"){
j = 0;
while (j < trashbinslot[slotused].length) {
trace(("cek data : " + trashbinslot[slotused][j]));
if ((((((trashbinslot[slotused][j][0] == objectimage[i].xe)) && ((trashbinslot[slotused][j][1] == objectimage[i].ye)))) && ((trashbinslot[slotused][j][2] < trashmax)))){
trace("OK");
priority[priority.length] = {no:i, priority:1};
ok = true;
};
j++;
};
} else {
if (objectimage[i].namee == "SINK"){
priority[priority.length] = {no:i, priority:2};
ok = true;
};
};
i++;
};
if (ok == true){
priority.sortOn("priority", Array.DESCENDING);
inino = priority[0].no;
cleanuptableke = obj.indexke;
obj = objectimage[inino];
ownerindex = inino;
sizex = houseitemsizex[obj.nomor][obj.tipe];
sizey = houseitemsizey[obj.nomor][obj.tipe];
objxe = obj.xe;
objye = obj.ye;
noneed = false;
} else {
createtext("Need a sink or trash bin.");
go = false;
};
} else {
if (texte == "ORDER A PIZZA"){
if (cekcancook(true, true) == false){
noneed = true;
go = false;
};
} else {
if (texte == "CALL REPAIRMAN"){
ada = false;
i = 0;
while (i < housesize[charstat[slotused][13]]) {
j = 0;
while (j < housesize[charstat[slotused][13]]) {
if (houseitems[slotused][i][j] != -1){
trace(("he : " + houseitems[slotused][i][j]));
if (houseitems[slotused][i][j][2] == 0){
ada = true;
break;
};
};
j++;
};
i++;
};
if (ada == false){
createtext("No broken item to fix.");
noneed = true;
go = false;
};
};
};
};
};
if ((((charimage[0].stat == "SIT")) && ((((((texte == "PLAY CHESS")) || ((texte == "OBSERVE")))) || ((texte == "EAT")))))){
xe = 0;
while (xe <= sizex) {
ye = 0;
while (ye <= sizey) {
kex = int((int(objxe) + int(xe)));
key = int((int(objye) + int(ye)));
trace(("lets check : " + objectimage[charimage[0].objectto].tipe));
trace(((("xe : " + kex) + " ") + objectimage[charimage[0].objectto].xe));
trace(((("ye : " + key) + " ") + objectimage[charimage[0].objectto].ye));
if ((((((((((((objectimage[charimage[0].objectto].tipe == 0)) && ((kex == (objectimage[charimage[0].objectto].xe + 1))))) && ((key == objectimage[charimage[0].objectto].ye)))) || ((((((objectimage[charimage[0].objectto].tipe == 1)) && ((kex == objectimage[charimage[0].objectto].xe)))) && ((key == (objectimage[charimage[0].objectto].ye + 1))))))) || ((((((objectimage[charimage[0].objectto].tipe == 2)) && ((kex == (objectimage[charimage[0].objectto].xe - 1))))) && ((key == objectimage[charimage[0].objectto].ye)))))) || ((((((objectimage[charimage[0].objectto].tipe == 3)) && ((kex == objectimage[charimage[0].objectto].xe)))) && ((key == (objectimage[charimage[0].objectto].ye - 1))))))){
noneed = true;
if (texte == "EAT"){
objectimage[charimage[0].objectto].gotoAndStop(3);
};
charimage[0].stat2 = texte;
charimage[0].objectto2 = obj.indexke;
//unresolved jump
};
ye++;
};
xe++;
};
};
if (noneed == false){
solutionlist = [];
lengthlist = [];
charpositionlist = [];
xe = 0;
while (xe <= sizex) {
ye = 0;
while (ye <= sizey) {
i = -1;
while (i <= 1) {
j = -1;
while (j <= 1) {
trace(((("cek direction : " + i) + " ") + j));
if ((((((((((i == 1)) && ((j == 0)))) || ((((i == -1)) && ((j == 0)))))) || ((((i == 0)) && ((j == 1)))))) || ((((i == 0)) && ((j == -1)))))){
kex = int(((int(objxe) + int(i)) + int(xe)));
key = int(((int(objye) + int(j)) + int(ye)));
if ((((kex == charimage[0].xe)) && ((key == charimage[0].ye)))){
mapArray[kex][key].cellType = CELL_FREE;
};
trace(((("cek access utk : " + kex) + " ") + key));
if (cekvalid(kex, key)){
trace(((("ya point ini valid : " + kex) + " ") + key));
okay = false;
jadiposx = charimage[0].xe;
jadiposy = charimage[0].ye;
if (charimage[0].visible == false){
trace("nda nggangur");
objnomor = objectimage[charimage[0].objectto].nomor;
objtipe = objectimage[charimage[0].objectto].tipe;
sizex2 = houseitemsizex[objnomor][objtipe];
sizey2 = houseitemsizey[objnomor][objtipe];
objposx = objectimage[charimage[0].objectto].xe;
objposy = objectimage[charimage[0].objectto].ye;
te = 0;
while (te <= sizex2) {
be = 0;
while (be <= sizey2) {
ie = -1;
while (ie <= 1) {
je = -1;
while (je <= 1) {
if ((((((((((ie == 1)) && ((je == 0)))) || ((((ie == -1)) && ((je == 0)))))) || ((((ie == 0)) && ((je == 1)))))) || ((((ie == 0)) && ((je == -1)))))){
kex2 = int(((int(objposx) + int(ie)) + int(te)));
key2 = int(((int(objposy) + int(je)) + int(be)));
if ((((kex2 == charimage[0].xe)) && ((key2 == charimage[0].ye)))){
mapArray[kex2][key2].cellType = CELL_FREE;
};
if (cekvalid(kex2, key2)){
trace(((("bisa kluar dari poin ini : " + kex2) + " ") + key2));
trace(((("utk pos : " + kex) + " ") + key));
jadiposx = kex2;
jadiposy = key2;
if ((((kex == jadiposx)) && ((key == jadiposy)))){
solutionlist[solutionlist.length] = [kex, key];
lengthlist[lengthlist.length] = {lengthe:0, ke:(solutionlist.length - 1)};
charpositionlist[charpositionlist.length] = [jadiposx, jadiposy];
} else {
trace(((("he : " + kex) + " ") + key));
hasile = carijalandonkie(jadiposx, jadiposy, kex, key);
trace(("hm : " + int((hasile.length - 1))));
if (hasile.length > 0){
solutionlist[solutionlist.length] = [kex, key];
lengthlist[lengthlist.length] = {lengthe:(hasile.length - 1), ke:(solutionlist.length - 1)};
charpositionlist[charpositionlist.length] = [jadiposx, jadiposy];
};
};
};
};
je++;
};
ie++;
};
be++;
};
te++;
};
} else {
trace("nggangur");
if ((((kex == jadiposx)) && ((key == jadiposy)))){
solutionlist[solutionlist.length] = [kex, key];
lengthlist[lengthlist.length] = {lengthe:0, ke:(solutionlist.length - 1)};
charpositionlist[charpositionlist.length] = [jadiposx, jadiposy];
} else {
trace(((("he : " + kex) + " ") + key));
hasile = carijalandonkie(jadiposx, jadiposy, kex, key);
trace(("hm : " + int((hasile.length - 1))));
if (hasile.length > 0){
solutionlist[solutionlist.length] = [kex, key];
lengthlist[lengthlist.length] = {lengthe:(hasile.length - 1), ke:(solutionlist.length - 1)};
charpositionlist[charpositionlist.length] = [jadiposx, jadiposy];
};
};
};
};
};
j++;
};
i++;
};
ye++;
};
xe++;
};
trace(("f " + solutionlist.length));
if (solutionlist.length > 0){
j = 0;
while (j < solutionlist.length) {
trace(("cek solusi : " + solutionlist[j]));
trace(("cek length : " + lengthlist[j].lengthe));
j++;
};
lengthlist.sortOn("lengthe", Array.NUMERIC);
trace(("yaitu : " + solutionlist[lengthlist[0].ke]));
finalx = solutionlist[lengthlist[0].ke][0];
finaly = solutionlist[lengthlist[0].ke][1];
charfinalpositionx = charpositionlist[lengthlist[0].ke][0];
charfinalpositiony = charpositionlist[lengthlist[0].ke][1];
go = true;
if ((((finalx == charimage[0].xe)) && ((finaly == charimage[0].ye)))){
mapArray[finalx][finaly].cellType = CELL_FREE;
};
} else {
trace("G ISA 3");
createtext("Something is in my way.");
};
};
} else {
trace("no");
finalx = (objxe + obj.accessdirectionx);
finaly = (objye + obj.accessdirectiony);
trace(((("akhire : " + finalx) + " ") + finaly));
if ((((((((finalx >= 0)) && ((finalx < housesize[charstat[slotused][13]])))) && ((finaly >= 0)))) && ((finaly < housesize[charstat[slotused][13]])))){
trace(("cek kosong : " + mapArray[(objxe + obj.accessdirectionx)][(objye + obj.accessdirectiony)].cellType));
if ((((finalx == charimage[0].xe)) && ((finaly == charimage[0].ye)))){
mapArray[finalx][finaly].cellType = CELL_FREE;
};
if (mapArray[(objxe + obj.accessdirectionx)][(objye + obj.accessdirectiony)].cellType == CELL_FREE){
go = true;
};
} else {
trace("G ISA 2");
createtext("Something is in my way.");
};
};
if (go == true){
charimage[0].xe = charfinalpositionx;
charimage[0].ye = charfinalpositiony;
charimage[0].x = tileimage[charfinalpositionx][charfinalpositiony].x;
charimage[0].y = tileimage[charfinalpositionx][charfinalpositiony].y;
if ((((charimage[0].xe == finalx)) && ((charimage[0].ye == finaly)))){
charnointeraction();
charimage[0].objectto = ownerindex;
charimage[0].statto = texte;
cekaccessobject();
} else {
charmove(finalx, finaly);
charimage[0].objectto = ownerindex;
charimage[0].statto = texte;
};
} else {
if ((((((((charimage[0].stat == "SIT")) && ((objectimage[charimage[0].objectto].xe == finalx)))) && ((objectimage[charimage[0].objectto].ye == finaly)))) && ((((((texte == "WATCH")) || ((texte == "PLAY")))) || ((texte == "EAT")))))){
if ((((((((((objectimage[charimage[0].objectto].tipe == 0)) && ((obj.tipe == 3)))) || ((((objectimage[charimage[0].objectto].tipe == 1)) && ((obj.tipe == 4)))))) || ((((objectimage[charimage[0].objectto].tipe == 2)) && ((obj.tipe == 0)))))) || ((((objectimage[charimage[0].objectto].tipe == 3)) && ((obj.tipe == 1)))))){
charimage[0].stat2 = texte;
charimage[0].objectto2 = obj.indexke;
obj.gotoAndStop(2);
trace("ISA");
};
} else {
if (noneed == false){
trace("G ISA");
createtext("Something is in my way.");
};
};
};
obj = null;
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
}
public function loadpark(){
mcbg.mccloud.visible = false;
if (charstat[slotused][23] != 0){
loadjobprogress();
};
btnexitpark.visible = true;
cekbgnight();
resetparkusage();
gonecrowd();
trace(("CEK HARI : " + charstat[slotused][1]));
if ((((((((timejam >= crowdappear)) || ((timejam <= crowdgone)))) || (((charstat[slotused][1] % 7) == 0)))) || (((charstat[slotused][1] % 7) == 6)))){
createcrowd();
} else {
gonecrowd();
};
mcpond.buttonMode = true;
mcpond.removeEventListener(MouseEvent.MOUSE_OVER, objectover);
mcpond.removeEventListener(MouseEvent.MOUSE_OUT, objectout);
mcpond.addEventListener(MouseEvent.MOUSE_OVER, objectover);
mcpond.addEventListener(MouseEvent.MOUSE_OUT, objectout);
mcbush.buttonMode = true;
mcbush.removeEventListener(MouseEvent.MOUSE_OVER, objectover);
mcbush.removeEventListener(MouseEvent.MOUSE_OUT, objectout);
mcbush.addEventListener(MouseEvent.MOUSE_OVER, objectover);
mcbush.addEventListener(MouseEvent.MOUSE_OUT, objectout);
mcperform.buttonMode = true;
mcperform.removeEventListener(MouseEvent.MOUSE_OVER, objectover);
mcperform.removeEventListener(MouseEvent.MOUSE_OUT, objectout);
mcperform.addEventListener(MouseEvent.MOUSE_OVER, objectover);
mcperform.addEventListener(MouseEvent.MOUSE_OUT, objectout);
mcsofa.buttonMode = true;
mcsofa.removeEventListener(MouseEvent.MOUSE_OVER, objectover);
mcsofa.removeEventListener(MouseEvent.MOUSE_OUT, objectout);
mcsofa.addEventListener(MouseEvent.MOUSE_OVER, objectover);
mcsofa.addEventListener(MouseEvent.MOUSE_OUT, objectout);
mcpond.removeEventListener(MouseEvent.MOUSE_OVER, oversound);
mcpond.addEventListener(MouseEvent.MOUSE_OVER, oversound);
mcpond.removeEventListener(MouseEvent.CLICK, pondclick);
mcpond.addEventListener(MouseEvent.CLICK, pondclick);
btnexitpark.removeEventListener(MouseEvent.MOUSE_OVER, oversound);
btnexitpark.addEventListener(MouseEvent.MOUSE_OVER, oversound);
btnexitpark.removeEventListener(MouseEvent.CLICK, exitpark);
btnexitpark.addEventListener(MouseEvent.CLICK, exitpark);
mcsofa.removeEventListener(MouseEvent.MOUSE_OVER, oversound);
mcsofa.addEventListener(MouseEvent.MOUSE_OVER, oversound);
mcsofa.removeEventListener(MouseEvent.CLICK, parkbenchclick);
mcsofa.addEventListener(MouseEvent.CLICK, parkbenchclick);
mcperform.removeEventListener(MouseEvent.MOUSE_OVER, oversound);
mcperform.addEventListener(MouseEvent.MOUSE_OVER, oversound);
mcperform.removeEventListener(MouseEvent.CLICK, performclick);
mcperform.addEventListener(MouseEvent.CLICK, performclick);
mcbush.removeEventListener(MouseEvent.MOUSE_OVER, oversound);
mcbush.addEventListener(MouseEvent.MOUSE_OVER, oversound);
mcbush.removeEventListener(MouseEvent.CLICK, bushclick);
mcbush.addEventListener(MouseEvent.CLICK, bushclick);
btntotownpark.removeEventListener(MouseEvent.MOUSE_OVER, oversound);
btntotownpark.addEventListener(MouseEvent.MOUSE_OVER, oversound);
btntotownpark.removeEventListener(MouseEvent.CLICK, parktotownpark);
btntotownpark.addEventListener(MouseEvent.CLICK, parktotownpark);
createchar();
mcclock.txt3.text = daylist[ambilharikerja()];
loadspeedsymbol();
loaduistat();
hitungenviro();
cekstatusadd();
stage.addEventListener(Event.ENTER_FRAME, gamewaiting);
}
public function createtile(){
var housestartx:*;
var housestarty:*;
var i:*;
var j:*;
housestartx = [undefined, 319, 319, 315];
housestarty = [undefined, 149, 101, 94];
i = 0;
while (i < housesize[charstat[slotused][13]]) {
tileimage[i] = [];
j = 0;
while (j < housesize[charstat[slotused][13]]) {
tileimage[i][j] = new (tile1);
addChildAt(tileimage[i][j], (getChildIndex(mctileposition) + 1));
tileimage[i][j].x = ((housestartx[charstat[slotused][13]] + (i * tileheight)) - (j * tileheight));
tileimage[i][j].y = ((housestarty[charstat[slotused][13]] + (i * bawahe)) + (j * 12));
if ((((timejam > batasterang)) && ((timejam < batasmalam)))){
tileimage[i][j].gotoAndStop(1);
} else {
tileimage[i][j].gotoAndStop(2);
};
tileimage[i][j].mc1.gotoAndStop(charstat[slotused][21]);
tileimage[i][j].occupied = 0;
tileimage[i][j].txt1.text = int((int(i) + int(j)));
tileimage[i][j].txt1.visible = false;
tileimage[i][j].xe = i;
tileimage[i][j].ye = j;
j++;
};
i++;
};
}
public function setlocked(xx:int, yy:int){
mapArray[xx][yy].cellType = CELL_FILLED;
}
public function callrepairman(){
repairmancoming = true;
charimage[charimage.length] = new (char2);
addChildAt(charimage[(charimage.length - 1)], (getChildIndex(mcobjectposition) + 1));
charimage[(charimage.length - 1)].x = tileimage[posisirumahx[charstat[slotused][13]]][posisirumahy[charstat[slotused][13]]].x;
charimage[(charimage.length - 1)].y = tileimage[posisirumahy[charstat[slotused][13]]][posisirumahy[charstat[slotused][13]]].y;
charimage[(charimage.length - 1)].xe = posisirumahx[charstat[slotused][13]];
charimage[(charimage.length - 1)].ye = posisirumahy[charstat[slotused][13]];
charimage[(charimage.length - 1)].onlight = true;
charimage[(charimage.length - 1)].stat = "idle";
charimage[(charimage.length - 1)].statto = "";
charimage[(charimage.length - 1)].objectto = -1;
charimage[(charimage.length - 1)].timee = -1;
charimage[(charimage.length - 1)].timeetemp = -1;
charimage[(charimage.length - 1)].gotoAndPlay("idle2");
charimage[(charimage.length - 1)].retrytime = 10;
charimage[(charimage.length - 1)].mouseEnabled = false;
charimage[(charimage.length - 1)].mouseChildren = false;
charimage[(charimage.length - 1)].repairtime = 0;
charimage[(charimage.length - 1)].phase = 0;
charimage[(charimage.length - 1)].directione = "left";
charimage[(charimage.length - 1)].addEventListener(Event.ENTER_FRAME, repairmanwaiting);
}
public function bwatnews(tipe:int, texte:int){
var no:*;
var i:*;
var obj:*;
no = false;
i = 1;
while (i <= 3) {
obj = getChildByName(("mcnews" + i));
if (obj != null){
if ((((obj.currentLabel == "ok")) && ((obj.mc1.currentFrame == tipe)))){
no = true;
break;
};
};
obj = null;
i++;
};
if (no == false){
i = 1;
while (i <= 3) {
obj = getChildByName(("mcnews" + i));
if (obj != null){
obj.removeEventListener(MouseEvent.MOUSE_OVER, oversound);
obj.addEventListener(MouseEvent.MOUSE_OVER, oversound);
if (((!((obj.currentLabel == "yay"))) && (!((obj.currentLabel == "ok"))))){
soundclock.play(0, 2, new SoundTransform(volsfx));
obj.gotoAndPlay(2);
obj.mc1.txt1.mouseEnabled = false;
obj.mc1.txt1.text = texte;
obj.mc1.gotoAndStop(tipe);
break;
};
};
obj = null;
i++;
};
};
}
public function officetestaddword(){
var listtext:*;
var ke:*;
mcofficetest.mcpaper.txt1.visible = false;
mcofficetest.txt1.text = (mcofficetest.txt1.text + officeword.charAt(officetestindex));
officetestindex++;
if (officetestindex > officeword.length){
cleanupofficetest();
} else {
if ((officetestindex % 20) == 0){
listtext = ["Press letters on the keyboard!", "Keyboard mashing time!", "I can do this!", "Just type and don't stop!"];
ke = randRange(0, (listtext.length - 1));
mcofficetest.mctxt.gotoAndPlay(2);
settextvertical(listtext[ke], mcofficetest.mctxt, -18.1);
};
};
}
public function skipwages(event:MouseEvent):void{
var j:*;
var i:*;
stage.removeEventListener(MouseEvent.CLICK, skipwages);
stage.removeEventListener(Event.ENTER_FRAME, wageswaiting);
wagescoin = wagescointemp;
j = 0;
while (j < coinimage.length) {
mcwages.removeChild(coinimage[j]);
coinimage[j] = null;
j++;
};
coinimage = [];
mcwages.mc1.visible = true;
mcwages.mc1.coin = 0;
mcwages.mc1.txt1.text = ("+" + 0);
soundcoin.play(0, 1, new SoundTransform(volsfx));
i = 1;
while (i <= wagescoin) {
createcoin();
coinimage[(coinimage.length - 1)].gotoAndStop(coinimage[(coinimage.length - 1)].totalFrames);
i++;
};
mcwages.btngood.visible = true;
}
public function cleanupitemfollow(){
removeallobjectfunction(false);
validplacement = false;
removealluiimage();
stage.removeEventListener(Event.ENTER_FRAME, furniturefollowwaiting);
onshop = false;
onbuild = false;
}
public function gamewaiting(e:Event):void{
var sounde:*;
var carke:*;
var obj:*;
var objlight:*;
var ke:*;
var enviroku:*;
var batasenviro:*;
var rate:*;
var dikurangi:*;
var i:*;
var go:*;
var j:*;
var rand:*;
var ratetambah:*;
var ratefinal:*;
var obje:*;
var listtext:*;
var kassiuwang:*;
var xe:*;
var cek:*;
var dapete:*;
var adahit:*;
var valid:*;
var k:*;
var l:*;
var ye:*;
var opose:*;
var ie:*;
var je:*;
var kex:*;
var key:*;
var temparray:*;
var posisi:*;
mcmouse.x = mouseX;
mcmouse.y = mouseY;
if ((((adarusak == true)) && ((currentLabel == "house")))){
rusaktime--;
if (rusaktime <= 0){
sounde = [soundspark1, soundspark2];
sounde[randRange(0, (sounde.length - 1))].play(0, 1, new SoundTransform(volsfx));
rusaktime = randRange(50, 100);
};
};
if ((((((charimage[0].stat == "READ BOOK")) || ((charimage[0].stat == "OBSERVE")))) || ((charimage[0].stat == "PLAY CHESS")))){
charimage[0].mc1.mcint.visible = true;
} else {
charimage[0].mc1.mcint.visible = false;
};
if (charimage[0].stat == "RUN"){
if (soundchannel2 == null){
soundchannel2 = soundtreadmill.play(0, 999, new SoundTransform(volsfx));
};
} else {
if (charimage[0].stat == "REPAIR"){
repairtime--;
if (repairtime <= 0){
sounde = [soundrepair1, soundrepair2];
sounde[randRange(0, (sounde.length - 1))].play(0, 2, new SoundTransform(volsfx));
repairtime = 40;
};
} else {
if ((((charimage[0].stat == "PLAY PIANO")) || ((charimage[0].stat == "PIANO PERFORM")))){
repairtime--;
if (repairtime <= 0){
sounde = [soundpiano1, soundpiano2, soundpiano3, soundpiano4, soundpiano5, soundpiano6, soundpiano7];
sounde[randRange(0, (sounde.length - 1))].play(0, 1, new SoundTransform(volsfx));
repairtime = 35;
};
} else {
if ((((charimage[0].stat == "PLAY FLUTE")) || ((charimage[0].stat == "FLUTE PERFORM")))){
repairtime--;
if (repairtime <= 0){
sounde = [soundflute1, soundflute2, soundflute22, soundflute3];
sounde[randRange(0, (sounde.length - 1))].play(0, 1, new SoundTransform(volsfx));
repairtime = 50;
};
} else {
if ((((charimage[0].stat == "SLEEP")) || ((charimage[0].stat == "SLEEP IN PARK")))){
repairtime--;
if (repairtime <= 0){
soundsleep.play(0, 1, new SoundTransform(volsfx));
repairtime = 100;
};
} else {
if ((((charimage[0].stat == "CLEAN UP")) || ((charimage[0].stat == "HELP CLEANUP")))){
if (soundchannel2 == null){
if (charimage[0].stat == "HELP CLEANUP"){
soundchannel2 = soundcleanuptrash.play(0, 999, new SoundTransform(volsfx));
} else {
if (objectimage[charimage[0].objectto].namee == "TRASH BIN"){
soundchannel2 = soundcleanuptrash.play(0, 999, new SoundTransform(volsfx));
} else {
soundchannel2 = soundwashdish.play(0, 999, new SoundTransform(volsfx));
};
};
};
} else {
if (charimage[0].stat == "COOKING"){
if (soundchannel2 == null){
soundchannel2 = soundcook.play(0, 999, new SoundTransform(volsfx));
};
} else {
if ((((charimage[0].stat == "EAT")) || ((charimage[0].stat2 == "EAT")))){
if (soundchannel2 == null){
soundchannel2 = soundchewing.play(0, 999, new SoundTransform(volsfx));
};
} else {
if (charimage[0].stat == "CLEAN TRASH"){
if (soundchannel2 == null){
soundchannel2 = soundcleanuptrash.play(0, 999, new SoundTransform(volsfx));
};
} else {
if ((((charimage[0].stat == "PLAY GAMES")) || ((charimage[0].stat == "PLAY")))){
repairtime--;
if (repairtime <= 0){
sounde = [soundgame1, soundgame2, soundgame3];
sounde[randRange(0, (sounde.length - 1))].play(0, 1, new SoundTransform(volsfx));
repairtime = 35;
};
} else {
if ((((charimage[0].stat == "TAKE A BATH")) || ((charimage[0].stat == "TAKE A SHOWER")))){
if (soundchannel2 == null){
soundchannel2 = soundbath.play(0, 999, new SoundTransform(volsfx));
};
} else {
if ((((charimage[0].stat == "USE")) || ((charimage[0].stat == "USE BATHROOM")))){
repairtime--;
if (repairtime <= 0){
soundflush.play(0, 1, new SoundTransform(volsfx));
repairtime = 225;
};
} else {
if ((((charimage[0].stat == "WATCH")) || ((charimage[0].stat2 == "WATCH")))){
activitytime--;
if (activitytime <= 0){
soundtv.play(0, 1, new SoundTransform(volsfx));
activitytime = 200;
};
};
};
};
};
};
};
};
};
};
};
};
};
};
if (charimage[0].stat == "TAKE A BATH"){
cekdesiredone(32);
} else {
if (charimage[0].stat == "FLUTE PERFORM"){
cekdesiredone(28);
} else {
if (charimage[0].stat == "PIANO PERFORM"){
cekdesiredone(29);
} else {
if ((((charimage[0].stat == "PLAY FLUTE")) && ((charstat[slotused][32] == 28)))){
cekdesiredone(28);
} else {
if ((((charimage[0].stat == "PLAY PIANO")) && ((charstat[slotused][32] == 29)))){
cekdesiredone(29);
};
};
};
};
};
if (((((((((((((((((((!((soundchannel2 == null))) && (!((charimage[0].stat == "TAKE A BATH"))))) && (!((charimage[0].stat == "TAKE A SHOWER"))))) && (!((charimage[0].stat == "CLEAN UP"))))) && (!((charimage[0].stat == "CLEAN TRASH"))))) && (!((charimage[0].stat == "COOKING"))))) && (!((charimage[0].stat == "EAT"))))) && (!((charimage[0].stat2 == "EAT"))))) && (!((charimage[0].stat == "RUN"))))) && (!((charimage[0].stat == "HELP CLEANUP"))))){
soundchannel2.stop();
soundchannel2 = null;
};
if (soundphase == 1){
thundertime--;
if (thundertime <= 0){
if ((((soundchannel1 == null)) && ((rain == false)))){
if (onnight == true){
soundcricket.play(0, 1, new SoundTransform(volsfx));
} else {
sounde = [soundbird1, soundbird2];
sounde[randRange(0, (sounde.length - 1))].play(0, 1, new SoundTransform(volsfx));
};
thundertime = (randRange(15, 20) * 25);
};
};
soundtimer--;
if (soundtimer <= 0){
trace("PHASE 2");
soundphase = 2;
};
} else {
if (soundchannel1 != null){
if (bgmon == true){
volbgm = (volbgm - 0.005);
soundchannel1.soundTransform = new SoundTransform(volbgm);
};
if ((((volbgm <= 0)) || ((bgmon == false)))){
soundchannel1.stop();
soundchannel1 = null;
createsound();
};
} else {
createsound();
};
};
if (mcitemsdesc.visible == true){
mcitemsdesc.x = mouseX;
mcitemsdesc.y = mouseY;
if (mcitemsdesc.y > 449){
mcitemsdesc.y = 440;
};
};
if ((((rain == true)) && ((((((((((currentLabel == "house")) || ((currentLabel == "street")))) || ((currentLabel == "stadium")))) || ((currentLabel == "park")))) || ((currentLabel == "townpark")))))){
if (mcbg.mccloud != null){
if (mcbg.mccloud.visible == false){
mcbg.mccloud.visible = true;
};
};
if (soundchannel3 == null){
soundchannel3 = soundrain.play(0, 999, new SoundTransform(volbgm));
};
thundertime--;
if (thundertime <= 0){
thundertime = (randRange(30, 45) * 25);
createthundersound();
};
weathertime--;
if (weathertime <= 0){
weathertime = weathertimetemp;
createraindroplets();
};
};
if (pausegame == false){
if (currentLabel == "street"){
if ((((timejam >= 17)) && ((timejam < 23)))){
btn2.visible = true;
} else {
btn2.visible = false;
};
};
if (currentLabel == "cafe"){
if ((((timejam >= 4)) && ((timejam < 15)))){
btn1.visible = true;
} else {
btn1.visible = false;
};
};
cartime--;
if ((((cartime <= 0)) && ((((((currentLabel == "house")) || ((currentLabel == "street")))) || ((currentLabel == "townpark")))))){
cartime = randRange((10 * 25), (20 * 25));
carke = randRange(1, 2);
if ((((currentLabel == "street")) || ((currentLabel == "townpark")))){
carke = 1;
};
obj = mcbg.getChildByName(("mccar" + carke));
objlight = mcbg.getChildByName(("mclight" + carke));
if (onnight == true){
objlight.mc1.mclight.gotoAndStop("light");
objlight.mc1.mclight2.gotoAndStop("light");
} else {
objlight.mc1.mclight.gotoAndStop("dark");
objlight.mc1.mclight2.gotoAndStop("dark");
};
ke = randRange(1, obj.mc1.totalFrames);
obj.mc1.gotoAndStop(ke);
obj.gotoAndPlay(2);
objlight.mc1.gotoAndStop(ke);
objlight.gotoAndPlay(2);
soundcarpass.play(0, 1, new SoundTransform(volsfx));
};
if (currentLabel == "park"){
if (((((!(((charstat[slotused][1] % 7) == 0))) && (!(((charstat[slotused][1] % 7) == 6))))) && ((mcbg.mcweekendbanner.visible == true)))){
mcbg.mcweekendbanner.visible = false;
} else {
if (((((charstat[slotused][1] % 7) == 0)) || (((((charstat[slotused][1] % 7) == 6)) && ((mcbg.mcweekendbanner.visible == false)))))){
mcbg.mcweekendbanner.visible = true;
};
};
};
if (currentLabel == "townpark"){
if ((((timejam >= 5)) && ((timejam <= 17)))){
mcpiano.visible = true;
mcflute.visible = true;
mcbook.visible = true;
mc1.visible = false;
mc2.visible = false;
mc3.visible = false;
mc4.visible = false;
} else {
mcpiano.visible = false;
mcflute.visible = false;
mcbook.visible = false;
};
if ((((((timejam >= 18)) && ((timejam <= 24)))) && ((doneloadtownparkperson == false)))){
trace("LOAD PERSON");
doneloadtownparkperson = true;
loadtownparkperson();
if (charimage[0].stat != "idle"){
resettownparkusage();
charimage[0].visible = true;
charimage[0].stat = "idle";
};
} else {
if (timejam < 18){
mc1.visible = false;
mc2.visible = false;
mc3.visible = false;
mc4.visible = false;
};
};
};
tulisclock();
statbubbletime--;
menittime--;
if (menittime <= 0){
if ((((rain == true)) && ((((((currentLabel == "street")) || ((currentLabel == "park")))) || ((currentLabel == "townpark")))))){
charstat[slotused][5] = (charstat[slotused][5] - (kurangerarray[5] * 2));
};
if (charimage[0].stat == "PERFORM"){
go = -1;
if ((((((((timejam >= crowdappear)) || ((timejam <= crowdgone)))) || (((charstat[slotused][1] % 7) == 0)))) || (((charstat[slotused][1] % 7) == 6)))){
i = 1;
while (i <= 2) {
j = 1;
while (j <= 3) {
if (crowd[slotused][i][j] != -1){
rand = randRange(0, 300);
ratetambah = (int((int(charstat[slotused][6]) + int(charstat[slotused][3]))) / 50);
ratefinal = int(((int(1) + int(ratetambah)) + int((((int(charstat[slotused][16]) + int(charstat[slotused][17])) + int(charstat[slotused][18])) / 4))));
trace(("RATE : " + ratefinal));
if (rand <= ratefinal){
cekdesiredone(24);
go = i;
//unresolved jump
};
};
j++;
};
i++;
};
};
if (go != -1){
obje = getChildByName(("mccrowd" + go));
mctxt.x = (obje.x + randRange(-20, 20));
mctxt.y = (obje.y - 60);
mctxt.gotoAndPlay(2);
listtext = ["That's actually great!", "I enjoyed that!", "You're pretty funny!"];
soundtext.play(0, 1, new SoundTransform(volsfx));
settextvertical(listtext[randRange(0, (listtext.length - 1))], mctxt, -18.1);
kassiuwang = 1;
kassiuwang = (kassiuwang + int((charstat[slotused][18] / 2)));
charstat[slotused][2] = (charstat[slotused][2] + kassiuwang);
if (charstat[slotused][32] == 10){
charstat[slotused][34] = (charstat[slotused][34] - kassiuwang);
cekdesirestatus();
if (charstat[slotused][34] <= 0){
cekdesiredone(10);
};
};
soundcoin.play(0, 1, new SoundTransform(volsfx));
mcuistat.mccoins.gotoAndPlay(2);
mcuistat.txtgold.text = charstat[slotused][2];
obje = null;
};
};
menittime = menittimetemp;
timemenit++;
enviroku = charstat[slotused][12];
batasenviro = 70;
rate = (enviroku / batasenviro);
if (rate > 0.8){
rate = 0.8;
};
dikurangi = (energykurangertemp - (energykurangertemp * rate));
energykuranger = dikurangi;
i = 3;
while (i <= 7) {
charstat[slotused][i] = (charstat[slotused][i] - kurangerarray[i]);
if (charstat[slotused][i] <= 0){
charstat[slotused][i] = 0;
if (i == 4){
charstat[slotused][5] = (charstat[slotused][5] - kurangerarray[5]);
};
};
if (charstat[slotused][6] <= hygienemin){
if (charstat[slotused][32] == 17){
cekdesiredone(17);
};
if (charimage[0].visible == true){
charimage[0].mcstink.visible = true;
} else {
if ((((((((((((currentLabel == "office")) || ((currentLabel == "studio")))) || ((currentLabel == "stadium")))) || ((currentLabel == "park")))) || ((currentLabel == "townpark")))) || ((currentLabel == "cafe")))){
if (charimage[0].stat == "WORK"){
mctable.mcstink.visible = true;
} else {
if (charimage[0].stat == "SING"){
mcmic.mcstink.visible = true;
} else {
if (charimage[0].stat == "RUN THE COURSE"){
mcflag.mcstink.visible = true;
} else {
if (charimage[0].stat == "REST"){
mcsofa.mcstink.visible = true;
} else {
if (charimage[0].stat == "PERFORM"){
mcperform.mcstink.visible = true;
} else {
if (charimage[0].stat == "TAKE A BATH"){
mcpond.mcstink.visible = true;
} else {
if (charimage[0].stat == "PIANO PERFORM"){
mcpiano.mcstink.visible = true;
} else {
if (charimage[0].stat == "FLUTE PERFORM"){
mcflute.mcstink.visible = true;
} else {
if (charimage[0].stat == "READ NEWSPAPER"){
mcbook.mcstink.visible = true;
} else {
if (charimage[0].stat == "JOGGING"){
mcflag.mcstink.visible = true;
};
};
};
};
};
};
};
};
};
};
} else {
objectimage[charimage[0].objectto].mcstink.visible = true;
};
};
} else {
if (charimage[0].visible == true){
charimage[0].mcstink.visible = false;
} else {
if (currentLabel == "house"){
objectimage[charimage[0].objectto].mcstink.visible = false;
};
};
};
i++;
};
if (charstat[slotused][6] > hygienemin){
if ((((charimage[0].visible == true)) && ((charimage[0].mcstink.visible == true)))){
charimage[0].mcstink.visible = false;
};
};
if (charstat[slotused][4] < feedmin){
charstat[slotused][5] = (charstat[slotused][5] - kurangerarray[5]);
};
if (charstat[slotused][6] < hygienemin){
charstat[slotused][3] = (charstat[slotused][3] - kurangerarray[3]);
};
if (charstat[slotused][5] <= 0){
var _local35 = charstat[slotused];
var _local36 = 27;
var _local37 = (_local35[_local36] + 1);
_local35[_local36] = _local37;
if (charstat[slotused][27] > faintedtime){
charstat[slotused][27] = 0;
bwatfainted();
};
};
if (charstat[slotused][7] == 0){
charstat[slotused][6] = (charstat[slotused][6] - kurangerarray[6]);
};
if (charimage[0].onlight == false){
charstat[slotused][3] = (charstat[slotused][3] - kurangerarray[3]);
};
updatestat();
if (timemenit > jamtime){
trace(("CEK ENERGY : " + charstat[slotused][5]));
_local35 = cafereload;
_local36 = slotused;
_local37 = (_local35[_local36] - 1);
_local35[_local36] = _local37;
if (cafereload[slotused] <= 0){
cafereload[slotused] = 4;
if (charimage[0].stat != "HELP CLEANUP"){
cekcafetime();
};
};
kurangidesire();
if (currentLabel == "office"){
itungworkrate();
};
i = 0;
while (i < tablecounterslot[slotused].length) {
j = 2;
while (j <= 3) {
if (tablecounterslot[slotused][i][j] == 1){
trace(("ada isi " + tablecounterslot[slotused][i][int((int(j) + int(4)))]));
if (tablecounterslot[slotused][i][int((int(j) + int(4)))] > 0){
trace(("ada expire " + tablecounterslot[slotused][i][int((int(j) + int(6)))]));
_local35 = tablecounterslot[slotused][i];
_local36 = int((int(j) + int(6)));
_local37 = (_local35[_local36] - 1);
_local35[_local36] = _local37;
if (tablecounterslot[slotused][i][int((int(j) + int(6)))] <= 0){
xe = 0;
while (xe < objectimage.length) {
if ((((objectimage[xe].xe == tablecounterslot[slotused][i][0])) && ((objectimage[xe].ye == tablecounterslot[slotused][i][1])))){
obj = objectimage[xe].getChildByName(("mcplate" + (j - 1)));
obj.mcfly.visible = true;
obj = null;
break;
};
xe++;
};
};
};
};
j++;
};
i++;
};
ceknewstime(1);
ceknewstime(2);
changehour = true;
timemenit = 0;
timejam++;
if ((((((((((((timejam == jobto)) && (!((currentLabel == "house"))))) && (!((currentLabel == "street"))))) && (!((currentLabel == "park"))))) && (!((currentLabel == "cafe"))))) && (!((currentLabel == "townpark"))))){
removealluiimage();
soundclock.play(0, 2, new SoundTransform(volsfx));
trace("CEK WAGES");
cekwages();
};
trace("d");
if ((((timejam == (crowdgone + 1))) && ((donecalculate == false)))){
donecalculate = true;
calculatecrowd();
};
if (currentLabel == "park"){
if ((((((((timejam >= crowdappear)) || ((timejam <= crowdgone)))) || (((charstat[slotused][1] % 7) == 0)))) || (((charstat[slotused][1] % 7) == 6)))){
createcrowd();
} else {
gonecrowd();
};
};
if ((((timejam == 13)) && ((charstat[slotused][32] == 999)))){
trace(((("jadi jam : " + timejam) + " ") + charstat[slotused][32]));
createdesire();
};
if (timejam > 24){
doneloadtownparkperson = false;
createtownparkperson();
donecalculate = false;
ceknewstime(3);
if (tutorialshop[slotused] == false){
_local35 = tutorialshoptime;
_local36 = slotused;
_local37 = (_local35[_local36] - 1);
_local35[_local36] = _local37;
if (tutorialshoptime[slotused] <= 0){
loadtutorial("shop");
};
};
createpromo();
charstat[slotused][29] = 0;
if (charstat[slotused][23] == 3){
if (charstat[slotused][24] > 0){
trace("a");
dapete = (passiveincome * charstat[slotused][24]);
mcpassiveincome.mc1.txt1.text = ("+" + dapete);
mcpassiveincome.gotoAndPlay(2);
trace("b");
soundcoin.play(0, 1, new SoundTransform(volsfx));
charstat[slotused][2] = (charstat[slotused][2] + dapete);
mcuistat.mccoins.gotoAndPlay(2);
mcuistat.txtgold.text = charstat[slotused][2];
trace("c");
};
};
charstat[slotused][26] = 0;
if (investment[slotused][0] == 1){
if (investment[slotused][9] < 7){
_local35 = investment[slotused];
_local36 = 9;
_local37 = (_local35[_local36] + 1);
_local35[_local36] = _local37;
};
};
charstat[slotused][1] = (charstat[slotused][1] + 1);
timejam = 0;
cekworkannouncement();
if (charstat[slotused][23] != 0){
loadjobprogress();
};
updateministat();
mcclock.txt3.text = daylist[ambilharikerja()];
cek = randRange(0, 10);
if (cek < rainchance){
thundertime = 0;
rain = true;
charstat[slotused][22] = true;
mcbg.mccloud.visible = true;
} else {
if (soundchannel3 != null){
soundchannel3.stop();
soundchannel3 = null;
};
rain = false;
mcbg.mccloud.visible = false;
charstat[slotused][22] = false;
};
if (charstat[slotused][1] >= charstat[slotused][37]){
createendlife();
} else {
ceklifended();
if ((((charstat[slotused][32] == -1)) || ((charstat[slotused][32] == 999)))){
createdesire();
};
};
};
if (timejam == batasmalam){
onnight = true;
if ((((((((currentLabel == "house")) || ((currentLabel == "street")))) || ((currentLabel == "park")))) || ((currentLabel == "townpark")))){
mcbg.gotoAndPlay("gonight");
ceklight();
ceklightenarea();
};
} else {
if (timejam == batasterang){
onnight = false;
if ((((((((currentLabel == "house")) || ((currentLabel == "street")))) || ((currentLabel == "park")))) || ((currentLabel == "townpark")))){
mcbg.gotoAndPlay("gomorning");
ceklight();
};
};
};
charstat[slotused][19] = timejam;
};
charstat[slotused][20] = timemenit;
cekstatincrease(charimage[0].stat, charimage[0].objectto);
if (charimage[0].stat2 != ""){
cekstatincrease(charimage[0].stat2, charimage[0].objectto2);
};
if (statbubbletime <= 0){
statbubbletime = statbubbletimetemp;
};
changehour = false;
i = 3;
while (i <= 7) {
if (charstat[slotused][i] <= 0){
charstat[slotused][i] = 0;
};
i++;
};
};
tulisclock();
};
if (pausegame == false){
if (charimage[0].timee != -1){
charimage[0].timee++;
if (currentLabel == "cafe"){
obj = getChildByName(("mctable" + charimage[0].tableke));
mcprog.x = obj.x;
mcprog.y = obj.y;
obj = null;
} else {
mcprog.x = charimage[0].x;
mcprog.y = charimage[0].y;
};
mcprog.mc1.width = ((charimage[0].timee / charimage[0].timeetemp) * 38);
mcprog.mctip.x = (-21.1 + mcprog.mc1.width);
if ((((((((charimage[0].stat == "CLEAN TRASH")) || ((charimage[0].stat == "CLEAN UP")))) || ((charimage[0].stat == "TAKE A DUMP")))) || ((charimage[0].stat == "HELP CLEANUP")))){
charstat[slotused][6] = (charstat[slotused][6] - (kurangerarray[6] / 4));
};
if (charimage[0].timee >= charimage[0].timeetemp){
if (charimage[0].stat == "HELP CLEANUP"){
if ((((armor == true)) && ((AGIconnected == true)))){
txtlog.text = (txtlog.text + "\nCLEAN DONE");
so.data.dishesclean++;
cekquestdone();
};
removealluiimage();
if (charstat[slotused][32] == 20){
cekdesiredone(20);
};
soundchannel2.stop();
soundchannel2 = null;
cafe[slotused][charimage[0].tableke] = 4;
charimage[0].visible = true;
charimage[0].stat = "idle";
resetcafeusage();
mctxt.gotoAndPlay(2);
settextvertical("Thanks!", mctxt, -18.1);
soundcoin.play(0, 1, new SoundTransform(volsfx));
mcuistat.mccoins.gotoAndPlay(2);
charstat[slotused][2] = (charstat[slotused][2] + int(waitertip));
mcuistat.txtgold.text = charstat[slotused][2];
if (charstat[slotused][32] == 10){
charstat[slotused][34] = (charstat[slotused][34] - waitertip);
cekdesirestatus();
if (charstat[slotused][34] <= 0){
cekdesiredone(10);
};
};
} else {
if (charimage[0].stat == "COOKING"){
objectimage[charimage[0].objectto].mckettle.gotoAndStop(1);
if (cekcancook(true, false)){
donecooking();
};
} else {
if (charimage[0].stat == "CLEAN UP"){
if ((((armor == true)) && ((AGIconnected == true)))){
so.data.dishesclean++;
cekquestdone();
};
if (charstat[slotused][32] == 20){
cekdesiredone(20);
};
if (objectimage[charimage[0].objectto].namee == "TRASH BIN"){
i = 0;
while (i < trashbinslot[slotused].length) {
if ((((trashbinslot[slotused][i][0] == objectimage[charimage[0].objectto].xe)) && ((trashbinslot[slotused][i][1] == objectimage[charimage[0].objectto].ye)))){
_local35 = trashbinslot[slotused][i];
_local36 = 2;
_local37 = (_local35[_local36] + 1);
_local35[_local36] = _local37;
if (trashbinslot[slotused][i][2] >= trashmax){
objectimage[charimage[0].objectto].mcfly.visible = true;
};
};
i++;
};
};
i = 0;
while (i < tablecounterslot[slotused].length) {
if ((((objectimage[cleanuptableke].xe == tablecounterslot[slotused][i][0])) && ((objectimage[cleanuptableke].ye == tablecounterslot[slotused][i][1])))){
trace(("INI CLEAN UP : " + charimage[0].plateto));
tablecounterslot[slotused][i][int((int(charimage[0].plateto) + int(1)))] = 0;
if (houseitemname[objectimage[cleanuptableke].nomor] == "Counter"){
tablecounterslot[slotused][i][2] = 0;
tablecounterslot[slotused][i][3] = -1;
};
trace(("jadi : " + tablecounterslot[slotused][i]));
obj = objectimage[cleanuptableke].getChildByName(("mcplate" + charimage[0].plateto));
obj.visible = false;
obj = null;
};
i++;
};
} else {
if (charimage[0].stat == "CLEAN TRASH"){
if (charstat[slotused][32] == 20){
cekdesiredone(20);
};
i = 0;
while (i < trashbinslot[slotused].length) {
if ((((trashbinslot[slotused][i][0] == objectimage[charimage[0].objectto].xe)) && ((trashbinslot[slotused][i][1] == objectimage[charimage[0].objectto].ye)))){
trashbinslot[slotused][i][2] = 0;
objectimage[charimage[0].objectto].mcfly.visible = false;
break;
};
i++;
};
};
};
};
};
mcprog.x = -200;
mcprog.y = -200;
charimage[0].stat = "idle";
charimage[0].timee = -1;
makeidle(0);
};
} else {
if (mcprog != null){
mcprog.x = -200;
mcprog.y = -200;
};
};
};
if (currentLabel == "house"){
adahit = false;
valid = true;
i = 0;
while (i < housesize[charstat[slotused][13]]) {
j = 0;
while (j < housesize[charstat[slotused][13]]) {
if (mcmouse.hitTestObject(tileclickerimage[i][j].mcbody) == true){
adahit = true;
if ((((onshop == false)) && ((onbuild == false)))){
tileimage[i][j].transform.colorTransform = colorbright;
} else {
if ((((onshop == true)) || ((onbuild == true)))){
cleantilecolor();
tileimage[i][j].transform.colorTransform = colorgreen;
k = 0;
while (k <= houseitemsizex[uiimage[0].nomor][uiimage[0].tipe]) {
l = 0;
while (l <= houseitemsizey[uiimage[0].nomor][uiimage[0].tipe]) {
xe = (i + k);
ye = (j + l);
opose = cekvalid(xe, ye);
if (opose == true){
tileimage[xe][ye].transform.colorTransform = colorgreen;
tileimage[xe][ye].occupied = 1;
} else {
if ((((((((xe >= 0)) && ((xe < housesize[charstat[slotused][13]])))) && ((ye >= 0)))) && ((ye < housesize[charstat[slotused][13]])))){
tileimage[xe][ye].transform.colorTransform = colorred;
};
valid = false;
};
if (accessdirectionex[uiimage[0].nomor][uiimage[0].tipe] == 9){
ie = -1;
while (ie <= 1) {
je = -1;
while (je <= 1) {
if ((((((((((ie == 1)) && ((je == 0)))) || ((((ie == -1)) && ((je == 0)))))) || ((((ie == 0)) && ((je == 1)))))) || ((((ie == 0)) && ((je == -1)))))){
kex = int((int(xe) + int(ie)));
key = int((int(ye) + int(je)));
if (cekvalid(kex, key)){
tileimage[kex][key].transform.colorTransform = colorgreen;
tileimage[kex][key].occupied = 1;
};
};
je++;
};
ie++;
};
} else {
kex = int((int(xe) + int(accessdirectionex[uiimage[0].nomor][uiimage[0].tipe])));
key = int((int(ye) + int(accessdirectioney[uiimage[0].nomor][uiimage[0].tipe])));
if (cekvalid(kex, key)){
tileimage[kex][key].transform.colorTransform = colorgreen;
tileimage[kex][key].occupied = 1;
};
};
l++;
};
k++;
};
};
};
} else {
if ((((onshop == false)) && ((onbuild == false)))){
tileimage[i][j].transform.colorTransform = colornormal;
} else {
if ((((onshop == true)) || ((onbuild == true)))){
if (tileimage[i][j].occupied == 0){
tileimage[i][j].transform.colorTransform = colornormal;
};
};
};
};
j++;
};
i++;
};
};
if (adahit == false){
cleantilecolor();
};
if ((((onshop == true)) || ((onbuild == true)))){
validplacement = valid;
if (valid == false){
i = 0;
while (i < housesize[charstat[slotused][13]]) {
j = 0;
while (j < housesize[charstat[slotused][13]]) {
if ((((tileimage[i][j].occupied == 1)) || ((((i == housesize[charstat[slotused][13]])) && ((j == (housesize[charstat[slotused][13]] - 1))))))){
tileimage[i][j].transform.colorTransform = colorred;
};
j++;
};
i++;
};
};
};
sorttime--;
if (sorttime <= 0){
sorttime = sorttimetemp;
temparray = [];
i = 0;
while (i < objectimage.length) {
posisi = (objectimage[i].xe + objectimage[i].ye);
if (houseitemsizex[objectimage[i].nomor][objectimage[i].tipe] > 0){
posisi = (posisi + 0.5);
};
if (houseitemsizey[objectimage[i].nomor][objectimage[i].tipe] > 0){
posisi = (posisi + 0.5);
};
temparray[temparray.length] = {obje:objectimage[i], posisi:posisi};
i++;
};
i = 0;
while (i < charimage.length) {
temparray[temparray.length] = {obje:charimage[i], posisi:(charimage[i].xe + charimage[i].ye)};
i++;
};
temparray.sortOn("posisi", Array.NUMERIC);
i = 0;
while (i < temparray.length) {
addChildAt(temparray[i].obje, (getChildIndex(mcobjectposition) - 1));
i++;
};
temparray = [];
};
if (pausegame == false){
if (charstat[slotused][4] >= statmax){
cekdesiredone(0);
};
if (charstat[slotused][3] >= statmax){
cekdesiredone(1);
};
if (charstat[slotused][6] >= statmax){
cekdesiredone(2);
};
if (charstat[slotused][7] >= statmax){
cekdesiredone(3);
};
if (charstat[slotused][5] >= statmax){
cekdesiredone(4);
};
if ((((charimage[0].stat == "WATCH")) || ((charimage[0].stat2 == "WATCH")))){
cekdesiredone(11);
};
if (charimage[0].stat == "READ BOOK"){
cekdesiredone(18);
};
if ((((((charimage[0].stat == "PLAY GAMES")) || ((charimage[0].stat2 == "PLAY GAMES")))) || ((charimage[0].stat == "PLAY")))){
cekdesiredone(12);
};
if (charimage[0].stat == "PLAY"){
cekdesiredone(21);
};
if (charimage[0].stat == "OBSERVE"){
cekdesiredone(22);
};
if (charimage[0].stat == "SLEEP IN PARK"){
cekdesiredone(23);
};
movethischar(0);
i = 3;
while (i <= 7) {
if (charstat[slotused][i] <= 0){
charstat[slotused][i] = 0;
};
i++;
};
};
}
public function exitpark(e:MouseEvent):void{
soundclick.play(0, 1, new SoundTransform(volsfx));
cleanuppark();
loadspeedsymbol();
transisi("street");
}
public function loadtownparkperson(){
var i:*;
var obj:*;
i = 1;
while (i <= 4) {
obj = getChildByName(("mc" + i));
if (townparkperson[slotused][i] != 0){
obj.visible = true;
obj.gotoAndStop(townparkperson[slotused][i]);
} else {
obj.visible = false;
};
obj = null;
i++;
};
}
public function createendlife(){
speedtime = 1;
loadspeedsymbol();
pausegame = true;
mcendlife.gotoAndPlay(2);
mcendlife.btnyay.removeEventListener(MouseEvent.MOUSE_OVER, oversound);
mcendlife.btnyay.addEventListener(MouseEvent.MOUSE_OVER, oversound);
mcendlife.btnyay.removeEventListener(MouseEvent.CLICK, endlifeyay);
mcendlife.btnyay.addEventListener(MouseEvent.CLICK, endlifeyay);
}
public function goright(e:MouseEvent):void{
soundclick.play(0, 1, new SoundTransform(volsfx));
jumpright();
}
public function loadAGI(){
createnewso();
trace("LOAD AGIII");
if (AGIconnected == true){
if (agi.user.isGuest()){
} else {
guestbool = false;
retrieveAGI();
retrievescore();
};
};
volbgm = so.data.soundsetting[0];
volsfx = so.data.soundsetting[1];
samainlocaldgnsave();
updatelocalsave();
}
public function saveAGI(){
if (guestbool == false){
agi.storage.user.submit({key:"savee", value:{charstat:so.data.charstat, refrigeratorstock:so.data.refrigeratorstock, tablecounterslot:so.data.tablecounterslot, houseitems:so.data.houseitems, trashbinslot:so.data.trashbinslot, investment:so.data.investment, relationship:so.data.relationship, crowd:so.data.crowd, tutoriallife:so.data.tutoriallife, tutorialjob:so.data.tutorialjob, tutorialsave:so.data.tutorialsave, tutorialdesire:so.data.tutorialdesire, tutorialshoptime:so.data.tutorialshoptime, tutorialshop:so.data.tutorialshop, donefirstjob:so.data.donefirstjob, promostat:so.data.promostat, jobreached:so.data.jobreached, jobpercentage:so.data.jobpercentage, startup:so.data.startup, soundsetting:so.data.soundsetting, cafe:so.data.cafe, cafereload:so.data.cafereload, townparkperson:so.data.townparkperson, tutorialshop2:so.data.tutorialshop2, tutorialjobtime:so.data.tutorialjobtime, tutorialfirstdayjob:so.data.tutorialfirstdayjob, dishesclean:so.data.dishesclean, pizzaorder:so.data.pizzaorder, fullwork:so.data.fullwork, goodfriend:so.data.goodfriend, investmentcoin:so.data.investmentcoin, lessrelatives:so.data.lessrelatives}, callback:function (data:Object):void{
}});
};
}
public function cekdesirestatus(){
trace(("cek desire stat : " + charstat[slotused][32]));
if (((!((charstat[slotused][32] == -1))) && (!((charstat[slotused][32] == 999))))){
trace("a");
if (mcuistat.mcdesire.currentFrame == 1){
mcuistat.mcdesire.mcfx.gotoAndPlay(2);
};
setdesiretext();
} else {
if (charstat[slotused][32] == -1){
mcuistat.txtdays.text = "-";
mcuistat.mcdesire.mcstar.visible = false;
mcuistat.mcdesire.mcfx.gotoAndStop(1);
mcuistat.mcdesire.gotoAndStop(1);
mcuistat.mcdesire.txt1.text = "";
} else {
if (charstat[slotused][32] == 999){
mcuistat.mcdesire.mcstar.visible = false;
mcuistat.mcdesire.mcfx.gotoAndStop(1);
mcuistat.mcdesire.gotoAndStop("dark");
mcuistat.mcdesire.txt1.text = "";
if (charstat[slotused][32] == 999){
mcuistat.mcdesire.gotoAndStop("completed");
settextvertical("COMPLETED", mcuistat.mcdesire, -9.6);
};
mcuistat.txtdays.text = "-";
};
};
};
}
public function finalstatout(e:MouseEvent):void{
mcover.x = -200;
mcover.y = -200;
stage.removeEventListener(Event.ENTER_FRAME, finalstatwaiting);
}
public function waitsaves(e:Event):void{
if (mcsave.currentFrame == 1){
pausegame = false;
stage.removeEventListener(Event.ENTER_FRAME, waitsaves);
createtext("Progress saved!");
};
}
public function createchar(){
charimage[charimage.length] = new (char1);
addChildAt(charimage[(charimage.length - 1)], (getChildIndex(mcobjectposition) + 1));
if (currentLabel == "house"){
trace(("hm : " + charstat[slotused][35]));
if (charstat[slotused][35] != -1){
charimage[(charimage.length - 1)].xe = charstat[slotused][35];
charimage[(charimage.length - 1)].ye = charstat[slotused][36];
setlocked(charstat[slotused][35], charstat[slotused][36]);
} else {
if (donemasukrumah == true){
charimage[(charimage.length - 1)].xe = (housesize[charstat[slotused][13]] - 1);
charimage[(charimage.length - 1)].ye = (housesize[charstat[slotused][13]] - 1);
setlocked((housesize[charstat[slotused][13]] - 1), (housesize[charstat[slotused][13]] - 1));
} else {
charimage[(charimage.length - 1)].xe = 1;
charimage[(charimage.length - 1)].ye = 2;
setlocked(1, 2);
};
};
charimage[(charimage.length - 1)].x = tileimage[charimage[(charimage.length - 1)].xe][charimage[(charimage.length - 1)].ye].x;
charimage[(charimage.length - 1)].y = tileimage[charimage[(charimage.length - 1)].xe][charimage[(charimage.length - 1)].ye].y;
charimage[(charimage.length - 1)].gotoAndPlay("idle2");
charimage[(charimage.length - 1)].directione = "left";
} else {
if (currentLabel == "street"){
charimage[(charimage.length - 1)].x = 249;
charimage[(charimage.length - 1)].y = 175;
charimage[(charimage.length - 1)].scaleX = (charimage[(charimage.length - 1)].scaleX * -1);
charimage[(charimage.length - 1)].mc1.gotoAndPlay("idle1");
charimage[(charimage.length - 1)].directione = "right";
} else {
if (currentLabel == "office"){
charimage[(charimage.length - 1)].x = 305;
charimage[(charimage.length - 1)].y = 195;
charimage[(charimage.length - 1)].mc1.gotoAndPlay("idle3");
charimage[(charimage.length - 1)].directione = "left";
} else {
if (currentLabel == "studio"){
charimage[(charimage.length - 1)].x = 339;
charimage[(charimage.length - 1)].y = 198;
charimage[(charimage.length - 1)].mc1.gotoAndPlay("idle4");
charimage[(charimage.length - 1)].directione = "left";
} else {
if (currentLabel == "stadium"){
charimage[(charimage.length - 1)].x = 0x0100;
charimage[(charimage.length - 1)].y = 178;
charimage[(charimage.length - 1)].mc1.gotoAndPlay("idle5");
charimage[(charimage.length - 1)].mc1.scaleX = (charimage[(charimage.length - 1)].mc1.scaleX * -1);
charimage[(charimage.length - 1)].directione = "right";
} else {
if (currentLabel == "park"){
charimage[(charimage.length - 1)].x = 227;
charimage[(charimage.length - 1)].y = 178;
charimage[(charimage.length - 1)].scaleX = (charimage[(charimage.length - 1)].scaleX * -1);
charimage[(charimage.length - 1)].mc1.gotoAndPlay("idle1");
charimage[(charimage.length - 1)].directione = "right";
} else {
if (currentLabel == "cafe"){
charimage[(charimage.length - 1)].x = 262;
charimage[(charimage.length - 1)].y = 263;
charimage[(charimage.length - 1)].scaleX = (charimage[(charimage.length - 1)].scaleX * -1);
charimage[(charimage.length - 1)].mc1.gotoAndPlay("idle1");
charimage[(charimage.length - 1)].directione = "right";
} else {
if (currentLabel == "townpark"){
charimage[(charimage.length - 1)].x = 229;
charimage[(charimage.length - 1)].y = 263;
charimage[(charimage.length - 1)].scaleX = (charimage[(charimage.length - 1)].scaleX * -1);
charimage[(charimage.length - 1)].mc1.gotoAndPlay("idle1");
charimage[(charimage.length - 1)].directione = "right";
};
};
};
};
};
};
};
};
charimage[(charimage.length - 1)].onlight = true;
charimage[(charimage.length - 1)].stat = "idle";
charimage[(charimage.length - 1)].statto = "";
charimage[(charimage.length - 1)].objectto = -1;
charimage[(charimage.length - 1)].stat2 = "";
charimage[(charimage.length - 1)].objectto2 = -1;
charimage[(charimage.length - 1)].eattime = 0;
charimage[(charimage.length - 1)].eattimetemp = 5;
charimage[(charimage.length - 1)].mcstink.visible = false;
charimage[(charimage.length - 1)].cookno = -1;
charimage[(charimage.length - 1)].timee = -1;
charimage[(charimage.length - 1)].timeetemp = -1;
charimage[(charimage.length - 1)].mouseEnabled = false;
charimage[(charimage.length - 1)].mouseChildren = false;
if (charstat[slotused][6] == 0){
charimage[(charimage.length - 1)].mcstink.visible = true;
};
}
public function charnointeraction(){
mcprog.x = -200;
mcprog.y = -200;
charimage[0].timee = -1;
charimage[0].eattime = 0;
cekcharmove(charimage[0].stat, charimage[0].objectto);
if (charimage[0].stat2 != ""){
cekcharmove(charimage[0].stat2, charimage[0].objectto2);
};
charimage[0].stat2 = "";
}
public function createitemhere(i:int, j:int){
var k:*;
var xe:*;
var obj:*;
var ye:*;
var l:*;
objectimage[objectimage.length] = new (linkage[houseitems[slotused][i][j][0]][houseitems[slotused][i][j][1]]);
addChildAt(objectimage[(objectimage.length - 1)], (getChildIndex(mcobjectposition) + 1));
objectimage[(objectimage.length - 1)].x = tileimage[i][j].x;
objectimage[(objectimage.length - 1)].y = tileimage[i][j].y;
objectimage[(objectimage.length - 1)].nomor = houseitems[slotused][i][j][0];
objectimage[(objectimage.length - 1)].tipe = houseitems[slotused][i][j][1];
objectimage[(objectimage.length - 1)].accessdirectionx = accessdirectionex[houseitems[slotused][i][j][0]][houseitems[slotused][i][j][1]];
objectimage[(objectimage.length - 1)].accessdirectiony = accessdirectioney[houseitems[slotused][i][j][0]][houseitems[slotused][i][j][1]];
objectimage[(objectimage.length - 1)].xe = i;
objectimage[(objectimage.length - 1)].ye = j;
if (houseitems[slotused][i][j][3] == 1){
objectimage[(objectimage.length - 1)].filters = [rareitem];
};
objectimage[(objectimage.length - 1)].onlight = false;
objectimage[(objectimage.length - 1)].indexke = (objectimage.length - 1);
if (objectimage[(objectimage.length - 1)].mcstink != null){
objectimage[(objectimage.length - 1)].mcstink.visible = false;
};
objectimage[(objectimage.length - 1)].namee = houseitemname[houseitems[slotused][i][j][0]][houseitems[slotused][i][j][1]];
if (objectimage[(objectimage.length - 1)].namee == "OVEN"){
objectimage[(objectimage.length - 1)].mckettle.gotoAndStop(1);
} else {
if (objectimage[(objectimage.length - 1)].namee == "TRASH BIN"){
objectimage[(objectimage.length - 1)].mcfly.visible = false;
xe = 0;
while (xe < trashbinslot[slotused].length) {
if ((((((trashbinslot[slotused][xe][0] == i)) && ((trashbinslot[slotused][xe][1] == j)))) && ((trashbinslot[slotused][xe][2] >= trashmax)))){
objectimage[(objectimage.length - 1)].mcfly.visible = true;
};
xe++;
};
} else {
if ((((objectimage[(objectimage.length - 1)].namee == "COUNTER")) || ((objectimage[(objectimage.length - 1)].namee == "TABLE")))){
xe = 1;
while (xe <= 2) {
obj = objectimage[(objectimage.length - 1)].getChildByName(("mcplate" + xe));
obj.mcfly.visible = false;
obj.visible = false;
obj.buttonMode = true;
obj.addEventListener(MouseEvent.MOUSE_OVER, objectover);
obj.addEventListener(MouseEvent.MOUSE_OUT, objectout);
obj.addEventListener(MouseEvent.CLICK, plateclick);
obj = null;
xe++;
};
xe = 0;
while (xe < tablecounterslot[slotused].length) {
if ((((tablecounterslot[slotused][xe][0] == i)) && ((tablecounterslot[slotused][xe][1] == j)))){
ye = 2;
while (ye <= 3) {
if (tablecounterslot[slotused][xe][ye] == 1){
obj = objectimage[(objectimage.length - 1)].getChildByName(("mcplate" + int((ye - 1))));
if (tablecounterslot[slotused][xe][int((int(ye) + int(6)))] <= 0){
obj.mcfly.visible = true;
};
if (tablecounterslot[slotused][xe][int((int(ye) + int(4)))] == 0){
obj.gotoAndStop(1);
} else {
obj.gotoAndStop((tablecounterslot[slotused][xe][int((int(ye) + int(2)))] + 2));
};
obj.visible = true;
obj = null;
};
ye++;
};
};
xe++;
};
};
};
};
if (houseitemhp[houseitems[slotused][i][j][0]] != -1){
if (houseitems[slotused][i][j][2] == 0){
objectimage[(objectimage.length - 1)].mcbroken.visible = true;
adarusak = true;
} else {
objectimage[(objectimage.length - 1)].mcbroken.visible = false;
};
};
k = 0;
while (k <= houseitemsizex[houseitems[slotused][i][j][0]][houseitems[slotused][i][j][1]]) {
l = 0;
while (l <= houseitemsizey[houseitems[slotused][i][j][0]][houseitems[slotused][i][j][1]]) {
xe = (i + k);
ye = (j + l);
setlocked(xe, ye);
tileclickerimage[xe][ye].visible = false;
l++;
};
k++;
};
if (houseclickable[houseitems[slotused][i][j][0]][houseitems[slotused][i][j][1]] == 1){
objectimage[(objectimage.length - 1)].buttonMode = true;
objectimage[(objectimage.length - 1)].addEventListener(MouseEvent.MOUSE_OVER, objectover);
objectimage[(objectimage.length - 1)].addEventListener(MouseEvent.MOUSE_OUT, objectout);
objectimage[(objectimage.length - 1)].addEventListener(MouseEvent.CLICK, objectclick);
};
}
public function cleanupcafe(){
var j:*;
j = 0;
while (j < charimage.length) {
charimage[j].removeEventListener(Event.ENTER_FRAME, repairmanwaiting);
removeChild(charimage[j]);
charimage[j] = null;
j++;
};
cleanupeffectimage();
removealluiimage();
stage.removeEventListener(Event.ENTER_FRAME, gamewaiting);
stage.removeEventListener(Event.ENTER_FRAME, faintedwaiting);
}
public function studionotewaiting(e:Event):void{
e.currentTarget.y = (e.currentTarget.y + 3);
if (e.currentTarget.y > 91){
soundno.play(0, 1, new SoundTransform(volsfx));
studiotestsuccess = (studiotestsuccess - 0.5);
if (studiotestsuccess <= 0){
studiotestsuccess = 0;
};
removethiseffect(e.currentTarget);
};
}
public function cekbgnight(){
if ((((timejam >= batasterang)) && ((timejam < batasmalam)))){
mcbg.gotoAndStop("morning");
} else {
onnight = true;
mcbg.gotoAndStop("night");
};
}
public function resetstadiumusage(){
mcflag.gotoAndStop(1);
mcflag.mcstink.visible = false;
mcsofa.gotoAndStop(1);
mcsofa.mcstink.visible = false;
}
public function loadgameover(){
mcgameover.mc1.mctxt.txt1.text = rating;
mcgameover.mc1.gotoAndPlay(2);
mcgameover.mc1.btnsubmit.removeEventListener(MouseEvent.CLICK, gameoversubmit);
mcgameover.mc1.btnsubmit.addEventListener(MouseEvent.CLICK, gameoversubmit);
stage.addEventListener(Event.ENTER_FRAME, gameoverwaiting);
}
public function statusinfowaiting(e:Event):void{
mcstatustxt.x = mouseX;
mcstatustxt.y = mouseY;
if ((((mcstatustxt.y > 449)) && ((mcstatustxt.currentFrame == 1)))){
mcstatustxt.y = 443;
} else {
if ((((mcstatustxt.y > 409)) && ((mcstatustxt.currentFrame == 2)))){
mcstatustxt.y = 407;
};
};
}
public function makeidle(ke:int){
if (((!((charimage[ke].mc1.currentLabel == "idle1"))) && (!((charimage[ke].mc1.currentLabel == "idle2"))))){
if (charimage[ke].mc1.currentLabel == "walk1"){
charimage[ke].mc1.gotoAndPlay("idle1");
} else {
charimage[ke].mc1.gotoAndPlay("idle2");
};
};
}
public function cafeorderbar(e:MouseEvent):void{
resetcafeusage();
charimage[0].tableke = -1;
charimage[0].timee = -1;
charimage[0].timeetemp = -1;
charimage[0].stat = "";
charimage[0].stat = "idle";
charimage[0].visible = true;
soundclick.play(0, 1, new SoundTransform(volsfx));
cleanupeffectimage();
removealluiimage();
uipopuphealth = 2;
stage.addEventListener(MouseEvent.CLICK, resetuipopup);
createuipopup("ORDER FRIES", e.currentTarget);
createuipopup("ORDER STEAK", e.currentTarget);
}
public function loadendlife(){
var i:*;
var j:*;
var obj:*;
var obj2:*;
var ke:*;
var total:*;
itunghargarumah();
mcendlife.mc1.gotoAndPlay("right1");
mcendlife.mc1.visible = true;
stage.addEventListener(Event.ENTER_FRAME, endlifewaiting);
i = 2;
while (i <= 3) {
j = 1;
while (j <= 6) {
obj = mcendlife.getChildByName(("mc" + i));
obj2 = obj.mc1.getChildByName(("mc" + j));
ke = (j + (6 * (i - 2)));
if (ke != 12){
obj2.mc1.mc1.gotoAndStop(ke);
trace(((("cek status : " + relationship[slotused][ke]) + " ") + relationshipmultiplier[ke]));
obj2.mc1.txt1.text = relationshipname[ke];
if (relationshipsymbol[ke] == 1){
total = (relationship[slotused][ke] * relationshipmultiplier[ke]);
trace(("INI ISI : " + total));
statbonus[ke] = total;
obj2.mc1.txt3.text = ("+" + total);
} else {
total = int(((relationship[slotused][ke] * relationshipmultiplier[ke]) / 2));
trace(("INI ISI : " + total));
statbonus[ke] = total;
obj2.mc1.txt3.text = ("+" + total);
};
obj2.mc1.txt2.text = relationshipstat[int((int(relationship[slotused][ke]) + int(1)))];
obj2.mc1.txt2.textColor = relationshipcolor[int((int(relationship[slotused][ke]) + int(1)))];
obj2.mc1.mc2.gotoAndStop(relationshipsymbol[ke]);
} else {
obj2.visible = false;
};
j++;
};
i++;
};
}
public function pondclick(e:MouseEvent):void{
soundclick.play(0, 1, new SoundTransform(volsfx));
cleanupeffectimage();
removealluiimage();
uipopuphealth = 2;
stage.addEventListener(MouseEvent.CLICK, resetuipopup);
createuipopup("TAKE A BATH", e.currentTarget);
}
public function cekinputprev(){
if (mcinput.page == 1){
mcinput.btnprev.gotoAndStop(2);
mcinput.btnnext.gotoAndStop(1);
} else {
if (mcinput.page == 3){
mcinput.btnprev.gotoAndStop(1);
mcinput.btnnext.gotoAndStop(2);
} else {
mcinput.btnprev.gotoAndStop(1);
mcinput.btnnext.gotoAndStop(1);
};
};
}
public function gostreet(){
cleanupoffice();
loadspeedsymbol();
transisi("street");
}
public function investmentplus(e:MouseEvent):void{
var skrg:*;
var jadie:*;
soundclick.play(0, 1, new SoundTransform(volsfx));
skrg = mcinvestment.mc2.txt1.text;
jadie = int((int(skrg) + int(10)));
if ((((jadie < charstat[slotused][2])) && ((jadie <= maxdeposit)))){
trace(("hm " + mcinvestment.mc2.txt1.text));
mcinvestment.mc2.txt1.text = jadie.toString();
trace(("ha " + mcinvestment.mc2.txt1.text));
};
}
public function savegame(){
var k:*;
var i:*;
var l:*;
var j:*;
var ke:*;
trace("SAVE GAME ");
k = 1;
while (k <= 2) {
i = 0;
while (i < charstat[k].length) {
so.data.charstat[k][i] = charstat[k][i];
i++;
};
trace(((("STAT CEK " + charstat[k][19]) + " ") + charstat[k][20]));
trace("1");
i = 0;
while (i < refrigeratorstock[k].length) {
so.data.refrigeratorstock[k][i] = [];
l = 0;
while (l < refrigeratorstock[k][i].length) {
so.data.refrigeratorstock[k][i][l] = refrigeratorstock[k][i][l];
l++;
};
i++;
};
trace("2");
i = 0;
while (i < tablecounterslot[k].length) {
so.data.tablecounterslot[k][i] = [];
l = 0;
while (l < tablecounterslot[k][i].length) {
so.data.tablecounterslot[k][i][l] = tablecounterslot[k][i][l];
l++;
};
i++;
};
trace("3");
i = 0;
while (i < housesize[charstat[k][13]]) {
j = 0;
while (j < housesize[charstat[k][13]]) {
if (houseitems[k][i][j] == -1){
so.data.houseitems[k][i][j] = -1;
} else {
trace(((("isian utk tile : " + i) + " ") + j));
trace(houseitems[k][i][j]);
so.data.houseitems[k][i][j] = [];
l = 0;
while (l < houseitems[k][i][j].length) {
so.data.houseitems[k][i][j][l] = houseitems[k][i][j][l];
l++;
};
};
j++;
};
i++;
};
trace(("4 " + trashbinslot[k].length));
i = 0;
while (i < trashbinslot[k].length) {
so.data.trashbinslot[k][i] = [];
l = 0;
while (l < trashbinslot[k][i].length) {
so.data.trashbinslot[k][i][l] = trashbinslot[k][i][l];
l++;
};
i++;
};
i = 0;
while (i < investment[k].length) {
so.data.investment[k][i] = investment[k][i];
i++;
};
i = 0;
while (i < relationship[k].length) {
so.data.relationship[k][i] = relationship[k][i];
i++;
};
so.data.relationshiphistory[k] = [];
i = 1;
while (i < relationship[k].length) {
so.data.relationshiphistory[k][i] = [];
j = 1;
while (j <= 4) {
so.data.relationshiphistory[k][i][j] = [];
ke = 1;
while (ke <= 4) {
so.data.relationshiphistory[k][i][j][ke] = relationshiphistory[k][i][j][ke];
ke++;
};
j++;
};
i++;
};
so.data.crowd[k] = [];
i = 1;
while (i <= 2) {
so.data.crowd[k][i] = [];
j = 1;
while (j <= 3) {
so.data.crowd[k][i][j] = crowd[k][i][j];
j++;
};
i++;
};
so.data.tutoriallife[k] = tutoriallife[k];
so.data.tutorialjob[k] = tutorialjob[k];
so.data.tutorialsave[k] = tutorialsave[k];
so.data.tutorialdesire[k] = tutorialdesire[k];
so.data.tutorialshoptime[k] = tutorialshoptime[k];
so.data.tutorialshop[k] = tutorialshop[k];
so.data.donefirstjob[k] = donefirstjob[k];
so.data.promostat[k] = [];
i = 0;
while (i < promostat[k].length) {
so.data.promostat[k][i] = promostat[k][i];
i++;
};
so.data.jobreached[k] = [];
i = 0;
while (i < jobreached[k].length) {
so.data.jobreached[k][i] = jobreached[k][i];
i++;
};
so.data.jobpercentage[k] = [];
i = 0;
while (i < jobpercentage[k].length) {
so.data.jobpercentage[k][i] = jobpercentage[k][i];
i++;
};
so.data.startup[k] = startup[k];
so.data.soundsetting = [];
so.data.soundsetting[0] = soundsetting[0];
so.data.soundsetting[1] = soundsetting[1];
so.data.cafe[k] = [];
i = 1;
while (i <= 3) {
so.data.cafe[k][i] = cafe[k][i];
i++;
};
so.data.cafereload[k] = cafereload[k];
so.data.townparkperson[k] = [];
i = 1;
while (i <= 4) {
so.data.townparkperson[k][i] = townparkperson[k][i];
i++;
};
so.data.tutorialshop2[k] = tutorialshop2[k];
so.data.tutorialjobtime[k] = tutorialjobtime[k];
so.data.tutorialfirstdayjob[k] = tutorialfirstdayjob[k];
k++;
};
trace(("charstat : " + so.data.charstat[1][0]));
}
public function cleanupofficetest(){
mcofficetest.gotoAndStop(1);
stage.removeEventListener(KeyboardEvent.KEY_UP, officetestkeyup);
stage.removeEventListener(Event.ENTER_FRAME, officetestkeywaiting);
charstat[slotused][19] = jobto;
charstat[slotused][20] = 0;
timejam = jobto;
timemenit = 0;
charstat[slotused][33] = (24 - jobto);
if (officetestindex > officeword.length){
createsuccesscareer();
trace("SUCCESS");
} else {
createfailedcareer();
trace("FAILED");
};
}
public function updateministat(){
mcuistat.txtage.text = (int(((charstat[slotused][1] / charstat[slotused][37]) * 100)) + "%");
trace(((("MINI STAT : " + charstat[slotused][1]) + " ") + charstat[slotused][37]));
trace(("jadi : " + ((charstat[slotused][1] / charstat[slotused][37]) * 64)));
mcuistat.mcage.width = ((charstat[slotused][1] / charstat[slotused][37]) * 64);
trace(("Hm :" + mcuistat.mcage));
trace(("Hm 2 :" + mcuistat.mcage.width));
}
public function removethisobject(mader:Object){
var indexke:*;
var k:*;
var i:*;
var l:*;
var xe:*;
var ye:*;
houseitems[slotused][mader.xe][mader.ye] = -1;
indexke = mader.indexke;
removeChild(objectimage[indexke]);
objectimage[indexke] = null;
k = 0;
while (k <= houseitemsizex[mader.nomor][mader.tipe]) {
l = 0;
while (l <= houseitemsizey[mader.nomor][mader.tipe]) {
xe = (mader.xe + k);
ye = (mader.ye + l);
mapArray[xe][ye].cellType = CELL_FREE;
tileclickerimage[xe][ye].visible = true;
l++;
};
k++;
};
objectimage.splice(indexke, 1);
if (charimage[0].objectto > indexke){
charimage[0].objectto--;
};
if (cleanuptableke > indexke){
cleanuptableke--;
};
i = indexke;
while (i < objectimage.length) {
objectimage[i].indexke--;
i++;
};
}
public function investmentclose(e:MouseEvent):void{
soundclick.play(0, 1, new SoundTransform(volsfx));
mcprog.x = -200;
mcprog.y = -200;
charimage[0].timee = -1;
charimage[0].eattime = 0;
cekcharmove(charimage[0].stat, charimage[0].objectto);
if (charimage[0].stat2 != ""){
cekcharmove(charimage[0].stat2, charimage[0].objectto2);
};
charimage[0].stat2 = "";
charimage[0].stat = "idle";
makeidle(0);
if (ondeposit == true){
if (charstat[slotused][32] == 13){
cekdesiredone(13);
};
};
pausegame = false;
mcinvestment.gotoAndStop(1);
}
public function createdesire(){
var ok:*;
var randdesire:*;
soundnewdesire.play(0, 1, new SoundTransform(volsfx));
if (tutorialdesire[slotused] == false){
loadtutorial("desire");
};
ok = false;
do {
randdesire = randRange(0, (desiretitle.length - 1));
if ((((randdesire == 13)) && ((investment[slotused][0] == 0)))){
ok = true;
} else {
if ((((randdesire == 8)) && ((charstat[slotused][31] > 0)))){
ok = true;
} else {
if ((((randdesire == 8)) && ((charstat[slotused][31] == 0)))){
ok = false;
} else {
if (randdesire != 13){
ok = true;
};
};
};
};
if ((((desirelevel[randdesire] == 2)) && ((startup[slotused] == 2)))){
ok = false;
} else {
ok = true;
};
} while (ok == false);
charstat[slotused][32] = randdesire;
charstat[slotused][33] = (24 - timejam);
charstat[slotused][34] = 0;
if ((((randdesire == 10)) || ((randdesire == 9)))){
charstat[slotused][34] = randRange(int((charstat[slotused][2] * 0.2)), int((charstat[slotused][2] * 0.4)));
if (charstat[slotused][34] <= 1){
charstat[slotused][34] = 2;
};
} else {
if (randdesire == 26){
charstat[slotused][34] = 100;
} else {
if (randdesire == 27){
charstat[slotused][34] = 2;
};
};
};
mcuistat.mcdesire.gotoAndPlay("golight");
setdesiretext();
mcuistat.mcdesire.mcfx.gotoAndPlay(2);
}
public function cleanuphouse(){
var i:*;
var j:*;
stage.removeEventListener(Event.ENTER_FRAME, waitsaves);
stage.removeEventListener(Event.ENTER_FRAME, gamewaiting);
stage.removeEventListener(MouseEvent.CLICK, resetuipopup);
stage.removeEventListener(Event.ENTER_FRAME, furniturefollowwaiting);
stage.removeEventListener(KeyboardEvent.KEY_DOWN, keywaiting);
stage.removeEventListener(Event.ENTER_FRAME, jobshiftwaiting);
stage.removeEventListener(Event.ENTER_FRAME, faintedwaiting);
removealluiimage();
trace("1");
i = 0;
while (i < housesize[charstat[slotused][13]]) {
j = 0;
while (j < housesize[charstat[slotused][13]]) {
removeChild(tileimage[i][j]);
tileimage[i][j] = null;
removeChild(tileclickerimage[i][j]);
tileclickerimage[i][j] = null;
j++;
};
i++;
};
trace("2");
j = 0;
while (j < wallimage.length) {
removeChild(wallimage[j]);
wallimage[j] = null;
j++;
};
trace("3");
j = 0;
while (j < charimage.length) {
charimage[j].removeEventListener(Event.ENTER_FRAME, repairmanwaiting);
removeChild(charimage[j]);
charimage[j] = null;
j++;
};
trace("4");
j = 0;
while (j < objectimage.length) {
removeChild(objectimage[j]);
objectimage[j] = null;
j++;
};
trace(("5 " + int((effectimage.length - 1))));
cleanupeffectimage();
trace("6");
trace(("CEK NUM : " + numChildren));
}
public function prevstat(e:MouseEvent):void{
soundclick.play(0, 1, new SoundTransform(volsfx));
if (e.currentTarget.currentFrame == 1){
mcuistat.tabindex--;
loaduistat();
};
}
public function keywaiting(e:KeyboardEvent):void{
var i:*;
var j:*;
var nomor:*;
var tipe:*;
var go:*;
var jum:*;
trace(("ON SHOP : " + onshop));
if (e.keyCode == 107){
charstat[slotused][2] = (charstat[slotused][2] + 2000);
mcuistat.txtgold.text = charstat[slotused][2];
};
if (e.keyCode == 80){
soundclick.play(0, 1, new SoundTransform(volsfx));
cekpause();
} else {
if (e.keyCode == 107){
i = 0;
while (i < housesize[charstat[slotused][13]]) {
j = 0;
while (j < housesize[charstat[slotused][13]]) {
if (mapArray[i][j].cellType == CELL_FILLED){
tileimage[i][j].gotoAndStop(3);
} else {
tileimage[i][j].gotoAndStop(1);
};
j++;
};
i++;
};
counterlist();
};
};
if ((((e.keyCode == 27)) && ((onshop == true)))){
mcbuildmode.mc1.visible = false;
cleanupitemfollow();
} else {
if ((((e.keyCode == 32)) && ((((onshop == true)) || ((onbuild == true)))))){
nomor = uiimage[0].nomor;
tipe = uiimage[0].tipe;
if (tipe == (linkage[nomor].length - 1)){
cleanupitemfollow();
createitemfollow(nomor, 0);
} else {
cleanupitemfollow();
createitemfollow(nomor, (tipe + 1));
};
} else {
if ((((e.keyCode == 27)) && ((onbuild == true)))){
trace(("jadie : " + positionongtempstat));
mcbuildmode.mc1.visible = false;
onbuild = false;
validplacement = false;
removealluiimage();
stage.removeEventListener(Event.ENTER_FRAME, furniturefollowwaiting);
houseitems[slotused][positionongtempstat[2]][positionongtempstat[3]] = [positionongtempstat[0], positionongtempstat[1], positionongtempstat[4], positionongtempstat[5]];
createitemhere(positionongtempstat[2], positionongtempstat[3]);
removeallobjectfunction(false);
} else {
if ((((((e.keyCode == 46)) || ((e.keyCode == 68)))) && ((onbuild == true)))){
go = true;
if (houseitemname[positionongtempstat[0]][positionongtempstat[1]] == "REFRIGERATOR"){
i = 0;
while (i < refrigeratorstock[slotused].length) {
if ((((positionongtempstat[2] == refrigeratorstock[slotused][i][0])) && ((positionongtempstat[3] == refrigeratorstock[slotused][i][1])))){
refrigeratorstock[slotused].splice(i, 1);
break;
};
i++;
};
} else {
if ((((houseitemname[uiimage[0].nomor][uiimage[0].tipe] == "TABLE")) || ((houseitemname[uiimage[0].nomor][uiimage[0].tipe] == "COUNTER")))){
i = 0;
while (i < tablecounterslot[slotused].length) {
if ((((positionongtempstat[2] == tablecounterslot[slotused][i][0])) && ((positionongtempstat[3] == tablecounterslot[slotused][i][1])))){
if ((((tablecounterslot[slotused][i][2] == 0)) || ((tablecounterslot[slotused][i][3] == 0)))){
tablecounterslot[slotused].splice(i, 1);
break;
};
};
i++;
};
} else {
if (houseitemname[positionongtempstat[0]][positionongtempstat[1]] == "REFRIGERATOR"){
i = 0;
while (i < trashbinslot[slotused].length) {
if ((((positionongtempstat[2] == trashbinslot[slotused][i][0])) && ((positionongtempstat[3] == trashbinslot[slotused][i][1])))){
trashbinslot[slotused].splice(i, 1);
break;
};
i++;
};
} else {
if (houseitemname[positionongtempstat[0]][positionongtempstat[1]] == "PHONE"){
jum = 0;
i = 0;
while (i < objectimage.length) {
trace(("he : " + objectimage[i].namee));
if (objectimage[i].namee == "PHONE"){
jum++;
};
i++;
};
if (jum == 0){
createtext("I must have a phone.");
go = false;
};
};
};
};
};
if (go == true){
trace(("sell : " + charstat[slotused][32]));
soundcoin.play(0, 1, new SoundTransform(volsfx));
mcuistat.mccoins.gotoAndPlay(2);
charstat[slotused][2] = (charstat[slotused][2] + int(mcbuildmode.mc1.price));
mcuistat.txtgold.text = charstat[slotused][2];
if (charstat[slotused][32] == 10){
charstat[slotused][34] = (charstat[slotused][34] - int(mcbuildmode.mc1.price));
cekdesirestatus();
if (charstat[slotused][34] <= 0){
cekdesiredone(10);
};
} else {
if (charstat[slotused][32] == 27){
charstat[slotused][34] = (charstat[slotused][34] - 1);
cekdesirestatus();
if (charstat[slotused][34] <= 0){
cekdesiredone(27);
};
};
};
ceklight();
ceklightenarea();
hitungenviro();
onbuild = false;
removeallobjectfunction(false);
validplacement = false;
removealluiimage();
stage.removeEventListener(Event.ENTER_FRAME, furniturefollowwaiting);
mcbuildmode.mc1.visible = false;
cekmasiadarusak();
};
};
};
};
};
}
public function relationshipback(e:MouseEvent):void{
soundclick.play(0, 1, new SoundTransform(volsfx));
pausegame = false;
mcrelationship.gotoAndStop(1);
charimage[0].stat = "idle";
charimage[0].visible = true;
}
public function loadoffice(){
var tipeobj:*;
var i:*;
var obj:*;
if (tutorialfirstdayjob[slotused] == false){
loadtutorial("firstdayjob");
};
btnexitoffice.visible = true;
updateworkprogress(charstat[slotused][26]);
btnexitoffice.removeEventListener(MouseEvent.MOUSE_OVER, oversound);
btnexitoffice.addEventListener(MouseEvent.MOUSE_OVER, oversound);
btnexitoffice.removeEventListener(MouseEvent.CLICK, exitoffice);
btnexitoffice.addEventListener(MouseEvent.CLICK, exitoffice);
createchar();
mcclock.txt3.text = daylist[ambilharikerja()];
loadspeedsymbol();
loaduistat();
hitungenviro();
cekworkperformance();
tipeobj = [undefined];
i = 1;
while (i <= 3) {
obj = getChildByName(("btn" + i));
obj.removeEventListener(MouseEvent.MOUSE_OVER, oversound);
obj.addEventListener(MouseEvent.MOUSE_OVER, oversound);
obj.removeEventListener(MouseEvent.CLICK, relationshipclick);
obj.addEventListener(MouseEvent.CLICK, relationshipclick);
obj = null;
i++;
};
resetofficeusage();
mctable.buttonMode = true;
mctable.addEventListener(MouseEvent.MOUSE_OVER, objectover);
mctable.addEventListener(MouseEvent.MOUSE_OUT, objectout);
mcsofa.buttonMode = true;
mcsofa.addEventListener(MouseEvent.MOUSE_OVER, objectover);
mcsofa.addEventListener(MouseEvent.MOUSE_OUT, objectout);
mctable.removeEventListener(MouseEvent.MOUSE_OVER, oversound);
mctable.addEventListener(MouseEvent.MOUSE_OVER, oversound);
mctable.removeEventListener(MouseEvent.CLICK, officetable);
mctable.addEventListener(MouseEvent.CLICK, officetable);
btntoilet.removeEventListener(MouseEvent.MOUSE_OVER, oversound);
btntoilet.addEventListener(MouseEvent.MOUSE_OVER, oversound);
btntoilet.removeEventListener(MouseEvent.CLICK, toiletclick);
btntoilet.addEventListener(MouseEvent.CLICK, toiletclick);
btndrink.removeEventListener(MouseEvent.MOUSE_OVER, oversound);
btndrink.addEventListener(MouseEvent.MOUSE_OVER, oversound);
btndrink.removeEventListener(MouseEvent.CLICK, drinkclick);
btndrink.addEventListener(MouseEvent.CLICK, drinkclick);
mcsofa.removeEventListener(MouseEvent.MOUSE_OVER, oversound);
mcsofa.addEventListener(MouseEvent.MOUSE_OVER, oversound);
mcsofa.removeEventListener(MouseEvent.CLICK, sofaclick);
mcsofa.addEventListener(MouseEvent.CLICK, sofaclick);
cekstatusadd();
stage.addEventListener(Event.ENTER_FRAME, gamewaiting);
trace(("BERAPA : " + charstat[slotused][25]));
if (charstat[slotused][24] < 5){
if ((((charstat[slotused][25] >= jobprogperlevel)) && ((charstat[slotused][11] >= jobrelationreq[charstat[slotused][24]])))){
speedtime = 1;
mcuistat.visible = false;
pausegame = true;
mcpercentage.visible = false;
loadcarrerpromotion();
charimage[0].visible = false;
mctable.gotoAndStop(1);
mctable.buttonMode = false;
mctable.removeEventListener(MouseEvent.MOUSE_OVER, objectover);
mctable.removeEventListener(MouseEvent.MOUSE_OUT, objectout);
mctable.removeEventListener(MouseEvent.MOUSE_OVER, oversound);
mctable.removeEventListener(MouseEvent.CLICK, officetable);
mcclock.visible = false;
i = 1;
while (i <= 3) {
obj = getChildByName(("mcnews" + i));
if (obj != null){
obj.gotoAndStop(1);
};
i++;
};
} else {
soundchannel4 = soundwork.play(0, 999, new SoundTransform(volbgm));
mcpercentage.visible = true;
};
} else {
soundchannel4 = soundwork.play(0, 999, new SoundTransform(volbgm));
mcpercentage.visible = true;
};
}
public function studiotestkeyup(e:KeyboardEvent):void{
var liste:*;
var ada:*;
var hit:*;
var i:*;
var j:*;
var sounde:*;
var obj:*;
liste = [undefined, 65, 83, 68, 74, 75, 76];
ada = false;
hit = false;
i = 1;
while (i < liste.length) {
if (e.keyCode == liste[i]){
j = 0;
while (j < effectimage.length) {
if ((effectimage[j] is studionote)){
if (effectimage[j].mc1.currentFrame == i){
ada = true;
if (effectimage[j].hitTestObject(mcstudiotest.mchit) == true){
sounde = [soundpiano1, soundpiano2, soundpiano3, soundpiano4, soundpiano5, soundpiano6, soundpiano7];
sounde[i].play(0, 1, new SoundTransform(volsfx));
hit = true;
trace(((("Ya : " + effectimage[j].mc1.currentFrame) + " ") + i));
obj = mcstudiotest.getChildByName(("mctab" + i));
createsparkle(obj);
obj = null;
studiotestsuccess++;
removethiseffect(effectimage[j]);
if (studiotestsuccess > studiosingingtime[int((int(charstat[slotused][24]) + int(1)))]){
studiotesttimeleft = 0;
studiotestsuccess = studiosingingtime[int((int(charstat[slotused][24]) + int(1)))];
cleanupeffectimage();
};
break;
};
};
};
j++;
};
if ((((ada == true)) && ((hit == false)))){
soundno.play(0, 1, new SoundTransform(volsfx));
studiotestsuccess = (studiotestsuccess - 0.5);
if (studiotestsuccess <= 0){
studiotestsuccess = 0;
};
};
break;
};
i++;
};
}
public function loadarrow(){
mcendlife.btnnext.visible = true;
mcendlife.btnprev.visible = true;
if (pageindex == 1){
mcendlife.btnprev.gotoAndStop(2);
mcendlife.btnnext.gotoAndStop(1);
} else {
if (pageindex == 6){
mcendlife.btnnext.gotoAndStop(2);
mcendlife.btnprev.gotoAndStop(1);
} else {
mcendlife.btnnext.gotoAndStop(1);
mcendlife.btnprev.gotoAndStop(1);
};
};
}
public function testsubmit(event:MouseEvent):void{
var event = event;
agi.scoreboard.submit({scoreboardName:"Day needed", score:randRange(1, 5), callback:function (data:Object):void{
if (data.success){
} else {
trace(data.error);
};
}});
}
public function startofficetest(){
txtlog.text = (txtlog.text + ("\n3 " + mcofficetest));
txtlog.text = (txtlog.text + ("\n3a " + mcofficetest.mcpaper));
txtlog.text = (txtlog.text + ("\n3b " + mcofficetest.mcpaper.txt1));
mcofficetest.mcpaper.txt1.visible = true;
txtlog.text = (txtlog.text + "\n4");
settextvertical("Press letters on the keyboard!", mcofficetest.mctxt, -18.1);
txtlog.text = (txtlog.text + "\n5");
mcofficetest.mctxt.gotoAndPlay(2);
txtlog.text = (txtlog.text + "\n6");
mcofficetest.mcpaper.gotoAndStop(2);
mcofficetest.btnstart.visible = false;
stage.addEventListener(KeyboardEvent.KEY_UP, officetestkeyup);
stage.addEventListener(Event.ENTER_FRAME, officetestkeywaiting);
txtlog.text = (txtlog.text + "\n5");
}
public function createnewforthis(ke:int){
var i:*;
var j:*;
so.data.charstat[ke] = [-1, 1, startgold, statmax, statmax, statmax, statmax, statmax, 0, 0, 0, 0, 0, 3, 3, "", 0, 0, 0, 5, 0, 1, false, 0, 0, 0, 0, 0, maxage, 0, 0, 0, -1, 0, 0, -1, -1, 0, 0];
so.data.houseitems[ke] = [];
so.data.refrigeratorstock[ke] = [];
so.data.tablecounterslot[ke] = [];
so.data.trashbinslot[ke] = [];
so.data.relationship[ke] = [undefined, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
so.data.investment[ke] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
i = 0;
while (i < housesize[so.data.charstat[ke][13]]) {
so.data.houseitems[ke][i] = [];
j = 0;
while (j < housesize[so.data.charstat[ke][13]]) {
so.data.houseitems[ke][i][j] = -1;
j++;
};
i++;
};
so.data.relationshiphistory[ke] = [];
i = 1;
while (i < relationpreferences.length) {
so.data.relationshiphistory[ke][i] = [];
j = 1;
while (j <= 4) {
so.data.relationshiphistory[ke][i][j] = [undefined, 0, 0, 0, 0];
j++;
};
i++;
};
so.data.crowd[ke] = [];
i = 1;
while (i <= 2) {
so.data.crowd[ke][i] = [];
j = 1;
while (j <= 3) {
so.data.crowd[ke][i][j] = [undefined, -1, -1, -1];
j++;
};
i++;
};
so.data.tutoriallife[ke] = false;
so.data.tutorialjob[ke] = false;
so.data.tutorialsave[ke] = false;
so.data.tutorialdesire[ke] = false;
so.data.tutorialshoptime[ke] = 2;
so.data.tutorialshop[ke] = false;
so.data.donefirstjob[ke] = false;
so.data.promostat[ke] = [];
so.data.jobreached[ke] = [undefined, 0, 0, 0];
so.data.jobpercentage[ke] = [undefined, 0, 0, 0];
so.data.startup[ke] = startupdefault;
so.data.cafe[ke] = [undefined, 1, 1, 1];
so.data.cafereload[ke] = 4;
so.data.townparkperson[ke] = [undefined, 0, 0, 0, 0];
so.data.tutorialshop2[ke] = false;
so.data.tutorialjobtime[ke] = false;
so.data.tutorialfirstdayjob[ke] = false;
}
public function checkstock(mader:Object){
var jum:*;
var ini:*;
var i:*;
jum = 0;
ini = 0;
i = 0;
while (i < refrigeratorstock[slotused].length) {
trace(refrigeratorstock[slotused][i]);
if ((((refrigeratorstock[slotused][i][0] == mader.xe)) && ((refrigeratorstock[slotused][i][1] == mader.ye)))){
ini = refrigeratorstock[slotused][i][2];
};
if (houseitems[slotused][mader.xe][mader.ye][0] == 15){
jum = (jum + smallrefri);
} else {
jum = (jum + bigrefri);
};
i++;
};
createtext((((ini + " food with a max space of ") + jum) + "."));
trace(("JUM STOCK : " + jum));
return (jum);
}
public function wagesgood(e:MouseEvent):void{
soundyes.play(0, 1, new SoundTransform(volsfx));
gostreet();
}
public function tileclick(e:MouseEvent):void{
var potongke:*;
soundclick.play(0, 1, new SoundTransform(volsfx));
onout = false;
cekphoneringing();
if (pausegame == false){
accessthis(tileimage[e.currentTarget.xe][e.currentTarget.ye]);
} else {
if (validplacement == true){
mcbuildmode.mc1.visible = false;
if (onshop == true){
potongke = -1;
j = 0;
while (j < promostat[slotused].length) {
if (promostat[slotused][j][0] == uiimage[0].nomor){
potongke = j;
break;
};
j++;
};
if (potongke != -1){
promostat[slotused].splice(potongke, 1);
};
houseitems[slotused][e.currentTarget.xe][e.currentTarget.ye] = [uiimage[0].nomor, uiimage[0].tipe, houseitemhp[uiimage[0].nomor], shoprarity];
cekitemwithslotplacement(uiimage[0].nomor, uiimage[0].tipe, e.currentTarget.xe, e.currentTarget.ye);
charstat[slotused][2] = (charstat[slotused][2] - hargashop);
if ((((charstat[slotused][32] == 9)) || ((charstat[slotused][32] == 26)))){
charstat[slotused][34] = (charstat[slotused][34] - hargashop);
cekdesirestatus();
if (charstat[slotused][34] <= 0){
cekdesiredone(charstat[slotused][32]);
};
};
if ((((charstat[slotused][32] == 31)) && ((((uiimage[0].nomor >= 26)) && ((uiimage[0].nomor <= 31)))))){
cekdesiredone(charstat[slotused][32]);
};
soundcoin.play(0, 1, new SoundTransform(volsfx));
mcuishop.mccoins.gotoAndPlay(2);
mcuishop.txt1.text = charstat[slotused][2];
loaduishop();
};
if (onbuild == true){
positionongtempstat[0] = uiimage[0].nomor;
positionongtempstat[1] = uiimage[0].tipe;
rebuildthisitem(e.currentTarget.xe, e.currentTarget.ye);
};
createitemhere(e.currentTarget.xe, e.currentTarget.ye);
if (onshop == true){
removeallobjectfunction(true);
} else {
removeallobjectfunction(false);
};
ceklight();
ceklightenarea();
hitungenviro();
validplacement = false;
removealluiimage();
stage.removeEventListener(Event.ENTER_FRAME, furniturefollowwaiting);
onshop = false;
onbuild = false;
positionongtempstat = [];
};
};
}
public function mmslot(e:MouseEvent):void{
var namee:*;
soundyes.play(0, 1, new SoundTransform(volsfx));
namee = e.currentTarget.name;
namee = namee.charAt((namee.length - 1));
slotused = namee;
if (charstat[slotused][0] == -1){
transisi("story");
} else {
soundchannel1.stop();
soundchannel1 = null;
transisi("house");
};
}
public function effectwaiting(e:Event):void{
if (e.currentTarget.currentFrame == e.currentTarget.totalFrames){
removethiseffect(e.currentTarget);
};
}
public function townparkflagclick(e:MouseEvent):void{
var namee:*;
soundclick.play(0, 1, new SoundTransform(volsfx));
cleanupeffectimage();
removealluiimage();
uipopuphealth = 2;
stage.addEventListener(MouseEvent.CLICK, resetuipopup);
namee = e.currentTarget.name;
namee = namee.charAt((namee.length - 1));
createuipopup("JOGGING", e.currentTarget);
}
public function namewritewaiting(e:Event):void{
waitwrite--;
if (waitwrite <= 0){
if (waitwritephase == 1){
waitwrite = waitwritetemp;
mcinput.mc3.txt1.text = (mcinput.mc3.txt1.text + donechangename.charAt(waitwriteindex));
waitwriteindex++;
if (waitwriteindex > donechangename.length){
soundchannel2.stop();
soundchannel2 = null;
waitwritephase = 2;
waitwrite = 50;
};
} else {
cekcafetime();
createtownparkperson();
trace(("GATEL : " + promostat[slotused]));
charstat[slotused][13] = doneselecthouse;
charstat[slotused][21] = 1;
charstat[slotused][0] = 1;
charstat[slotused][15] = donechangename;
charstat[slotused][37] = (maxage + finalmaxage);
charstat[slotused][2] = uwangetotal;
finalmaxage = 0;
if (startup[slotused] > 0){
houseitems[slotused][0][0] = [15, 0, -1, 0];
cekitemwithslotplacement(15, 0, 0, 0);
houseitems[slotused][0][1] = [52, 0, -1, 0];
cekitemwithslotplacement(52, 0, 0, 1);
houseitems[slotused][0][2] = [19, 0, 20, 0];
houseitems[slotused][0][3] = [36, 0, -1, 0];
houseitems[slotused][0][4] = [1, 0, 12, 0];
houseitems[slotused][0][5] = [22, 0, -1, 0];
houseitems[slotused][1][3] = [36, 0, -1, 0];
houseitems[slotused][1][5] = [64, 1, -1, 0];
houseitems[slotused][2][0] = [24, 0, -1, 0];
houseitems[slotused][2][3] = [36, 0, -1, 0];
houseitems[slotused][3][0] = [36, 1, -1, 0];
houseitems[slotused][3][1] = [36, 1, -1, 0];
houseitems[slotused][4][0] = [10, 0, 12, 0];
houseitems[slotused][4][1] = [12, 0, 10, 0];
houseitems[slotused][4][2] = [36, 0, -1, 0];
houseitems[slotused][2][1] = [25, 0, -1, 0];
cekitemwithslotplacement(25, 0, 2, 1);
houseitems[slotused][4][3] = [3, 0, -1, 0];
} else {
houseitems[slotused][3][3] = [3, 0];
houseitems[slotused][3][4] = [prizetaken, 0, houseitemhp[prizetaken]];
cekitemwithslotplacement(prizetaken, 0, 3, 4);
};
calculatecrowd();
trace(("CEK CROWD : " + crowd[slotused]));
stage.addEventListener(Event.ENTER_FRAME, storywaiting);
stage.removeEventListener(Event.ENTER_FRAME, namewritewaiting);
mcinput.gotoAndStop(1);
mcstory.gotoAndPlay((mcstory.currentFrame + 1));
};
};
}
public function shopchangetab(e:MouseEvent):void{
var namee:*;
soundclick.play(0, 1, new SoundTransform(volsfx));
namee = e.currentTarget.name;
namee = namee.charAt((namee.length - 1));
removealluiimage();
stage.removeEventListener(Event.ENTER_FRAME, furniturefollowwaiting);
mcuishop.tabindex = namee;
mcuishop.itemindex = 1;
loaduishop();
}
public function wageswaiting(e:Event):void{
if (mcwages.currentFrame == mcwages.totalFrames){
wageswait--;
if (wageswait <= 0){
wageswait = 7;
trace("a");
wagescoin--;
createcoin();
trace(("a1" + coinimage.length));
coinimage[(coinimage.length - 1)].gotoAndPlay(1);
trace("b");
soundcoin.play(0, 1, new SoundTransform(volsfx));
if (wagescoin <= 0){
trace("c");
stage.removeEventListener(MouseEvent.CLICK, skipwages);
stage.removeEventListener(Event.ENTER_FRAME, wageswaiting);
mcwages.btngood.visible = true;
};
};
};
}
public function toiletclick(e:MouseEvent):void{
soundclick.play(0, 1, new SoundTransform(volsfx));
cleanupeffectimage();
removealluiimage();
uipopuphealth = 2;
stage.addEventListener(MouseEvent.CLICK, resetuipopup);
createuipopup("USE BATHROOM", e.currentTarget);
}
public function resetparkusage(){
mcsofa.gotoAndStop(1);
mcsofa.mcstink.visible = false;
mcperform.gotoAndStop(1);
mcperform.mcstink.visible = false;
mcbush.gotoAndStop(1);
mcbush.mcstink.visible = false;
mcpond.gotoAndStop(1);
mcpond.mcstink.visible = false;
}
public function objectout(e:MouseEvent):void{
if ((((((onnight == true)) && ((e.currentTarget.onlight == true)))) || ((e.currentTarget.onlight == undefined)))){
e.currentTarget.transform.colorTransform = colornormal;
} else {
if ((((((onnight == true)) && ((e.currentTarget.onlight == false)))) || ((e.currentTarget.onlight == undefined)))){
e.currentTarget.transform.colorTransform = colordark;
} else {
if (onnight == false){
e.currentTarget.transform.colorTransform = colornormal;
};
};
};
}
public function createraindroplets(){
var ok:*;
var time:*;
var wallcheck:*;
var i:*;
var j:*;
effectimage[effectimage.length] = new (ingamerain);
addChildAt(effectimage[(effectimage.length - 1)], getChildIndex(mcweatherposition));
effectimage[(effectimage.length - 1)].indexke = (effectimage.length - 1);
effectimage[(effectimage.length - 1)].x = randRange(15, 616);
effectimage[(effectimage.length - 1)].y = randRange(18, 343);
ok = false;
time = 5;
if (currentLabel == "house"){
do {
ok = true;
wallcheck = true;
i = 0;
while (i < housesize[charstat[slotused][13]]) {
j = 0;
while (j < housesize[charstat[slotused][13]]) {
if (effectimage[(effectimage.length - 1)].mchit.hitTestObject(tileimage[i][j]) == true){
wallcheck = false;
effectimage[(effectimage.length - 1)].x = randRange(15, 616);
effectimage[(effectimage.length - 1)].y = randRange(18, 343);
time--;
ok = false;
//unresolved jump
};
j++;
};
i++;
};
if (wallcheck == true){
j = 0;
while (j < wallimage.length) {
if (effectimage[(effectimage.length - 1)].mchit.hitTestObject(wallimage[j]) == true){
effectimage[(effectimage.length - 1)].x = randRange(15, 616);
effectimage[(effectimage.length - 1)].y = randRange(18, 343);
time--;
ok = false;
break;
};
j++;
};
};
} while ((((ok == false)) && ((time > 0))));
} else {
effectimage[(effectimage.length - 1)].x = randRange(108, 535);
effectimage[(effectimage.length - 1)].y = randRange(74, 294);
};
if (time <= 0){
removethiseffect(effectimage[(effectimage.length - 1)]);
} else {
effectimage[(effectimage.length - 1)].mouseChildren = false;
effectimage[(effectimage.length - 1)].mouseEnabled = false;
effectimage[(effectimage.length - 1)].addEventListener(Event.ENTER_FRAME, effectwaiting);
};
}
public function storywaiting(e:Event):void{
if (mcstory.currentLabel == "door"){
sounddoor.play(0, 1, new SoundTransform(volsfx));
};
if (mcstory.currentLabel == "idle"){
mcstory.mc1.mc1.gotoAndPlay("idle2");
} else {
if (mcstory.currentLabel == "walk"){
mcstory.mc1.mc1.gotoAndPlay("walk2");
};
};
if (mcstory.currentLabel == "idle2"){
mcstory.mc1.mc1.gotoAndPlay("idle1");
} else {
if (mcstory.currentLabel == "walk2"){
mcstory.mc1.mc1.gotoAndPlay("walk1");
} else {
if (mcstory.currentLabel == "paper"){
loadpaper();
};
};
};
if (storyphase == 0){
if (mcstory.currentLabel == "text"){
soundtext.play(0, 1, new SoundTransform(volsfx));
mcstory.stop();
settextvertical(texteused[textindex], mcstory.mctxt, -20.1);
mcstory.mctxt.gotoAndPlay(1);
textindex++;
storyphase = 1;
textwaiting = textwaitingtemp;
};
} else {
textwaiting--;
if (textwaiting < 0){
mcstory.gotoAndPlay((mcstory.currentFrame + 1));
storyphase = 0;
};
};
if (mcstory.currentFrame == mcstory.totalFrames){
cleanupstory();
savegame();
soundchannel1.stop();
soundchannel1 = null;
transisi("house");
};
}
public function resetofficeusage(){
mctable.gotoAndStop(2);
mctable.mcstink.visible = false;
mcsofa.gotoAndStop(1);
mcsofa.mcstink.visible = false;
}
public function nextstat(e:MouseEvent):void{
soundclick.play(0, 1, new SoundTransform(volsfx));
if (e.currentTarget.currentFrame == 1){
mcuistat.tabindex++;
loaduistat();
};
}
public function rebuildthisitem(xe:int, ye:int){
var i:*;
trace(("cek stat : " + positionongtempstat));
houseitems[slotused][xe][ye] = [positionongtempstat[0], positionongtempstat[1], positionongtempstat[4], positionongtempstat[5]];
if (houseitemname[positionongtempstat[0]][positionongtempstat[1]] == "REFRIGERATOR"){
i = 0;
while (i < refrigeratorstock[slotused].length) {
if ((((refrigeratorstock[slotused][i][0] == positionongtempstat[2])) && ((refrigeratorstock[slotused][i][1] == positionongtempstat[3])))){
refrigeratorstock[slotused][i][0] = xe;
refrigeratorstock[slotused][i][1] = ye;
break;
};
i++;
};
} else {
if ((((houseitemname[positionongtempstat[0]][positionongtempstat[1]] == "TABLE")) || ((houseitemname[positionongtempstat[0]][positionongtempstat[1]] == "COUNTER")))){
i = 0;
while (i < tablecounterslot[slotused].length) {
if ((((tablecounterslot[slotused][i][0] == positionongtempstat[2])) && ((tablecounterslot[slotused][i][1] == positionongtempstat[3])))){
tablecounterslot[slotused][i][0] = xe;
tablecounterslot[slotused][i][1] = ye;
break;
};
i++;
};
} else {
if (houseitemname[positionongtempstat[0]][positionongtempstat[1]] == "TRASH BIN"){
i = 0;
while (i < trashbinslot[slotused].length) {
if ((((trashbinslot[slotused][i][0] == positionongtempstat[2])) && ((trashbinslot[slotused][i][1] == positionongtempstat[3])))){
trashbinslot[slotused][i][0] = xe;
trashbinslot[slotused][i][1] = ye;
break;
};
i++;
};
};
};
};
}
public function ambilpersenlearning(){
var ini:*;
ini = 0;
ini = (charstat[slotused][3] / ratinggainedstat);
if (ini <= 0){
ini = 0;
};
return (ini);
}
public function sofaclick(e:MouseEvent):void{
soundclick.play(0, 1, new SoundTransform(volsfx));
cleanupeffectimage();
removealluiimage();
uipopuphealth = 2;
stage.addEventListener(MouseEvent.CLICK, resetuipopup);
createuipopup("REST", e.currentTarget);
}
public function officeteststart(e:MouseEvent):void{
txtlog.text = "";
txtlog.text = (txtlog.text + "\n1");
soundclick.play(0, 1, new SoundTransform(volsfx));
if (currentLabel == "office"){
txtlog.text = (txtlog.text + "\n2");
startofficetest();
} else {
if (currentLabel == "studio"){
startstudiotest();
} else {
if (currentLabel == "stadium"){
startstadiumtest();
};
};
};
}
public function pauseback(e:MouseEvent):void{
soundclick.play(0, 1, new SoundTransform(volsfx));
cekpause();
}
public function textbaloonwaiting(e:Event):void{
if (charimage[0].visible == true){
e.currentTarget.x = charimage[0].x;
e.currentTarget.y = charimage[0].y;
if (e.currentTarget.y < 123){
e.currentTarget.x = (charimage[0].x + 85);
e.currentTarget.y = (charimage[0].y + 65);
e.currentTarget.mc1.gotoAndStop(2);
};
if (e.currentTarget.x > 584){
e.currentTarget.x = (charimage[0].x - 85);
e.currentTarget.y = (charimage[0].y + 65);
e.currentTarget.mc1.gotoAndStop(3);
};
} else {
cektextposition(e.currentTarget);
};
if (e.currentTarget.currentFrame == e.currentTarget.totalFrames){
removethiseffect(e.currentTarget);
};
}
public function carijalandonkie(xe:int, ye:int, tox:int, toy:int){
var solution:Array;
var i:*;
var go:*;
trace("Cari jalan");
openList = [];
closedList = [];
mapArray[xe][ye].cellType = CELL_ORIGIN;
mapArray[tox][toy].cellType = CELL_DESTINATION;
setEndPoints(xe, ye, tox, toy);
solution = solve();
i = 0;
while (i < solution.length) {
i++;
};
go = false;
if ((((((solution.length > 0)) && ((solution[0].x == tox)))) && ((solution[0].y == toy)))){
go = true;
solution.reverse();
} else {
solution = [];
};
mapArray[charimage[0].xe][charimage[0].ye].cellType = CELL_FREE;
mapArray[tox][toy].cellType = CELL_FREE;
mapArray[xe][ye].cellType = CELL_FREE;
openList = [];
closedList = [];
return (solution);
}
public function loaduishop(){
var i:*;
var j:*;
var obj:*;
var startdr:*;
var k:*;
var obj3:*;
var obj2:*;
var hargaasli:*;
if (tutorialshop2[slotused] == false){
btnexit.visible = false;
loadtutorial("shop2");
};
removealluiimage();
turuninsoundbgm(0.4);
speedtime = 1;
loadspeedsymbol();
btnexit.visible = false;
mcuistat.visible = false;
mcuishop.visible = true;
mcuishop.txt1.text = charstat[slotused][2];
mcuishop.btnback.removeEventListener(MouseEvent.MOUSE_OVER, oversound);
mcuishop.btnback.addEventListener(MouseEvent.MOUSE_OVER, oversound);
mcuishop.btnback.removeEventListener(MouseEvent.CLICK, shopclose);
mcuishop.btnback.addEventListener(MouseEvent.CLICK, shopclose);
mcuishop.btnprev.removeEventListener(MouseEvent.MOUSE_OVER, oversound);
mcuishop.btnprev.addEventListener(MouseEvent.MOUSE_OVER, oversound);
mcuishop.btnnext.removeEventListener(MouseEvent.MOUSE_OVER, oversound);
mcuishop.btnnext.addEventListener(MouseEvent.MOUSE_OVER, oversound);
mcuishop.btnprev.removeEventListener(MouseEvent.CLICK, prevshop);
mcuishop.btnprev.addEventListener(MouseEvent.CLICK, prevshop);
mcuishop.btnnext.removeEventListener(MouseEvent.CLICK, nextshop);
mcuishop.btnnext.addEventListener(MouseEvent.CLICK, nextshop);
i = 1;
while (i <= 8) {
obj = mcuishop.getChildByName(("mctab" + i));
obj.mc1.gotoAndStop(i);
obj.gotoAndStop(1);
if (mcuishop.tabindex == i){
obj.gotoAndStop(2);
};
obj.removeEventListener(MouseEvent.MOUSE_OVER, oversound);
obj.addEventListener(MouseEvent.MOUSE_OVER, oversound);
obj.removeEventListener(MouseEvent.MOUSE_OVER, shopuisectionover);
obj.addEventListener(MouseEvent.MOUSE_OVER, shopuisectionover);
obj.removeEventListener(MouseEvent.MOUSE_OUT, shopuisectionout);
obj.addEventListener(MouseEvent.MOUSE_OUT, shopuisectionout);
obj.removeEventListener(MouseEvent.CLICK, shopchangetab);
obj.addEventListener(MouseEvent.CLICK, shopchangetab);
obj = null;
i++;
};
trace(("promo cek : " + promostat[slotused]));
j = 0;
while (j < promostat[slotused].length) {
startdr = 0;
k = 0;
while (k < shoptablength.length) {
startdr = (startdr + shoptablength[k]);
if (k < shoptablength.length){
if ((((promostat[slotused][j][0] >= startdr)) && ((promostat[slotused][j][0] <= int((int(startdr) + int(shoptablength[(k + 1)]))))))){
trace(("BUTTON KE : " + int((int(k) + int(1)))));
obj = mcuishop.getChildByName(("mctab" + int((int(k) + int(1)))));
obj.gotoAndStop(3);
break;
};
};
k++;
};
j++;
};
if (mcuishop.itemindex == 1){
mcuishop.btnprev.gotoAndStop(2);
mcuishop.btnnext.gotoAndStop(1);
} else {
if (mcuishop.itemindex >= (shoptablength[mcuishop.tabindex] / 4)){
mcuishop.btnprev.gotoAndStop(1);
mcuishop.btnnext.gotoAndStop(2);
} else {
mcuishop.btnprev.gotoAndStop(1);
mcuishop.btnnext.gotoAndStop(1);
};
};
i = 1;
while (i <= 4) {
obj = mcuishop.getChildByName(("mcitem" + i));
if ((((mcuishop.itemindex - 1) * 4) + i) <= shoptablength[mcuishop.tabindex]){
obj.visible = true;
j = 1;
while (j <= 8) {
obj2 = obj.getChildByName(("mc" + j));
obj2.visible = false;
j++;
};
obj3 = obj.getChildByName(("mc" + mcuishop.tabindex));
obj3.visible = true;
obj3.gotoAndStop((((mcuishop.itemindex - 1) * 4) + i));
startdr = 0;
j = 0;
while (j < mcuishop.tabindex) {
startdr = (startdr + shoptablength[j]);
j++;
};
obj.nomor = ((((mcuishop.itemindex - 1) * 4) + i) + startdr);
obj.mcpromo.visible = false;
if (((!((mcuishop.tabindex == 7))) && (!((mcuishop.tabindex == 8))))){
hargaasli = houseitemprice[obj.nomor];
j = 0;
while (j < promostat[slotused].length) {
if (promostat[slotused][j][0] == obj.nomor){
obj.mcpromo.visible = true;
obj.mcpromo.gotoAndStop(promostat[slotused][j][1]);
if (promostat[slotused][j][1] == 1){
hargaasli = (hargaasli - int((hargaasli * discountprice)));
} else {
if (promostat[slotused][j][1] == 2){
hargaasli = int((hargaasli * rareprice));
};
};
break;
};
j++;
};
obj.txt1.text = hargaasli;
} else {
if (mcuishop.tabindex == 7){
obj.txt1.text = tileprice;
} else {
obj.txt1.text = wallprice;
};
};
obj.removeEventListener(MouseEvent.MOUSE_OVER, oversound);
obj.removeEventListener(MouseEvent.MOUSE_OVER, overframe);
obj.removeEventListener(MouseEvent.MOUSE_OUT, outframe);
obj.removeEventListener(MouseEvent.CLICK, shopitemclick);
if (int(mcuishop.txt1.text) < int(obj.txt1.text)){
obj.transform.colorTransform = colordark;
} else {
obj.transform.colorTransform = colornormal;
obj.addEventListener(MouseEvent.MOUSE_OVER, oversound);
obj.addEventListener(MouseEvent.MOUSE_OVER, overframe);
obj.addEventListener(MouseEvent.MOUSE_OUT, outframe);
obj.addEventListener(MouseEvent.CLICK, shopitemclick);
};
obj.buttonMode = true;
} else {
obj.visible = false;
};
obj = null;
i++;
};
}
}
}//package AGL_fla
Section 42
//MOUSE_343 (AGL_fla.MOUSE_343)
package AGL_fla {
import flash.display.*;
import flash.text.*;
public dynamic class MOUSE_343 extends MovieClip {
public var txt1:TextField;
public var txt2:TextField;
public function MOUSE_343(){
super();
}
}
}//package AGL_fla
Section 43
//MUSIC_220 (AGL_fla.MUSIC_220)
package AGL_fla {
import flash.display.*;
public dynamic class MUSIC_220 extends MovieClip {
public function MUSIC_220(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package AGL_fla
Section 44
//OFFICE_539 (AGL_fla.OFFICE_539)
package AGL_fla {
import flash.display.*;
import flash.text.*;
public dynamic class OFFICE_539 extends MovieClip {
public var mctxt:MovieClip;
public var txttime:TextField;
public var mc1:MovieClip;
public var btnstart:SimpleButton;
public var txt1:TextField;
public var mcpaper:MovieClip;
public function OFFICE_539(){
super();
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
this.visible = false;
}
function frame2(){
this.visible = true;
}
}
}//package AGL_fla
Section 45
//PARK_601 (AGL_fla.PARK_601)
package AGL_fla {
import flash.display.*;
public dynamic class PARK_601 extends MovieClip {
public var mccloud:MovieClip;
public var mcweekendbanner:MovieClip;
public function PARK_601(){
super();
addFrameScript(0, frame1, 20, frame21, 39, frame40);
}
function frame1(){
stop();
}
function frame21(){
stop();
}
function frame40(){
stop();
}
}
}//package AGL_fla
Section 46
//PRELOADER_10 (AGL_fla.PRELOADER_10)
package AGL_fla {
import flash.geom.*;
import flash.events.*;
import flash.media.*;
import flash.display.*;
import flash.text.*;
import flash.ui.*;
import flash.net.*;
import flash.filters.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.system.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class PRELOADER_10 extends MovieClip {
public var loader:Loader;
public var abs_url:String;
public var urlRequest:URLRequest;
public var abs;
public var enviroposition:MovieClip;
public function PRELOADER_10(){
super();
addFrameScript(0, frame1);
}
public function loadComplete(e:Event):void{
abs = e.currentTarget.content;
addChild(abs);
abs.show({x:100, y:100, backgroundColor:4861953});
}
function frame1(){
abs_url = "http://agi.armorgames.com/assets/agi/ABS.swf";
Security.allowDomain(abs_url);
urlRequest = new URLRequest(abs_url);
loader = new Loader();
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, loadComplete);
loader.load(urlRequest);
}
}
}//package AGL_fla
Section 47
//Splash_227 (AGL_fla.Splash_227)
package AGL_fla {
import flash.geom.*;
import flash.events.*;
import flash.media.*;
import flash.display.*;
import flash.text.*;
import flash.ui.*;
import flash.net.*;
import flash.filters.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.system.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class Splash_227 extends MovieClip {
public var size;
public var minusery;
public var linkee;
public var total;
public var image;
public var i;
public var j;
public var minuserx;
public var mchere:MovieClip;
public var startey;
public var startex;
public var waittime;
public var xe;
public function Splash_227(){
super();
addFrameScript(35, frame36, 137, frame138, 172, frame173);
}
function frame173(){
stop();
}
public function preloader(e:Event):void{
e.currentTarget.delaye--;
if (e.currentTarget.delaye > 0){
e.currentTarget.visible = false;
} else {
e.currentTarget.visible = true;
e.currentTarget.mc2.gotoAndPlay(1);
e.currentTarget.removeEventListener(Event.ENTER_FRAME, preloader);
};
}
function frame36(){
waittime = 2;
size = 20;
total = Math.ceil((85 / size));
image = [];
xe = 0;
while (xe < 4) {
minuserx = [-1, 1, 1, -1];
minusery = [-1, -1, 1, 1];
linkee = [asd, asd2, asd3, asd4];
startex = [0, 20, 20, 0];
startey = [0, 0, 20, 20];
i = 0;
while (i < total) {
j = 0;
while (j < total) {
image[image.length] = new (linkee[xe]);
addChildAt(image[(image.length - 1)], getChildIndex(mchere));
image[(image.length - 1)].x = 0;
image[(image.length - 1)].y = 1;
image[(image.length - 1)].mc1.x = startex[xe];
image[(image.length - 1)].mc1.y = startey[xe];
image[(image.length - 1)].mc1.x = (image[(image.length - 1)].mc1.x + ((i * size) * minuserx[xe]));
image[(image.length - 1)].mc1.y = (image[(image.length - 1)].mc1.y + ((j * size) * minusery[xe]));
image[(image.length - 1)].delaye = ((i * waittime) + (j * waittime));
image[(image.length - 1)].visible = false;
image[(image.length - 1)].addEventListener(Event.ENTER_FRAME, preloader);
trace(((("di : " + image[(image.length - 1)].mc1.x) + " ") + image[(image.length - 1)].mc1.y));
j++;
};
i++;
};
xe++;
};
trace(("tot : " + int((image.length - 1))));
}
function frame138(){
trace(("JUM IMAGE : " + image.length));
i = 0;
while (i < image.length) {
trace("REMOVE");
removeChild(image[i]);
image[i] = null;
i++;
};
trace(("JUM IMAGE NOW : " + image.length));
}
}
}//package AGL_fla
Section 48
//Splash_230 (AGL_fla.Splash_230)
package AGL_fla {
import flash.display.*;
public dynamic class Splash_230 extends MovieClip {
public function Splash_230(){
super();
addFrameScript(0, frame1);
}
function frame1(){
this.visible = false;
}
}
}//package AGL_fla
Section 49
//STADIUM_588 (AGL_fla.STADIUM_588)
package AGL_fla {
import flash.display.*;
import flash.text.*;
public dynamic class STADIUM_588 extends MovieClip {
public var mctxt:MovieClip;
public var btnspace:SimpleButton;
public var mcshadow:MovieClip;
public var txttime:TextField;
public var mc1:MovieClip;
public var btnleft:SimpleButton;
public var btnstart:SimpleButton;
public var mcobstacle1:MovieClip;
public var mcobstacle2:MovieClip;
public var mcobstacle4:MovieClip;
public var btnright:SimpleButton;
public var mcobstacle3:MovieClip;
public var mcchar1:MovieClip;
public var mceffectposition:MovieClip;
public function STADIUM_588(){
super();
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
this.visible = false;
}
function frame2(){
this.visible = true;
}
}
}//package AGL_fla
Section 50
//STORY_308 (AGL_fla.STORY_308)
package AGL_fla {
import flash.display.*;
public dynamic class STORY_308 extends MovieClip {
public var mctxt:MovieClip;
public var mc1:char1;
public function STORY_308(){
super();
addFrameScript(424, frame425);
}
function frame425(){
stop();
}
}
}//package AGL_fla
Section 51
//STUDIO_565 (AGL_fla.STUDIO_565)
package AGL_fla {
import flash.display.*;
import flash.text.*;
public dynamic class STUDIO_565 extends MovieClip {
public var mctxt:MovieClip;
public var mchit:MovieClip;
public var txttime:TextField;
public var mc1:MovieClip;
public var btnstart:SimpleButton;
public var mcnote:MovieClip;
public var mceffectposition:MovieClip;
public var mctab1:MovieClip;
public var mctab2:MovieClip;
public var mctab3:MovieClip;
public var mctab4:MovieClip;
public var mctab5:MovieClip;
public var mctab6:MovieClip;
public function STUDIO_565(){
super();
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
this.visible = false;
}
function frame2(){
this.visible = true;
}
}
}//package AGL_fla
Section 52
//Symbol101_377 (AGL_fla.Symbol101_377)
package AGL_fla {
import flash.display.*;
import flash.text.*;
public dynamic class Symbol101_377 extends MovieClip {
public var mcarrow:MovieClip;
public var mc1:MovieClip;
public var mcbar:MovieClip;
public var txt1:TextField;
public var mcbarcolor:MovieClip;
public function Symbol101_377(){
super();
addFrameScript(0, frame1);
}
function frame1(){
txt1.mouseEnabled = false;
mc1.mouseChildren = false;
mc1.mouseEnabled = false;
}
}
}//package AGL_fla
Section 53
//Symbol105_402 (AGL_fla.Symbol105_402)
package AGL_fla {
import flash.display.*;
import flash.text.*;
public dynamic class Symbol105_402 extends MovieClip {
public var btn2:SimpleButton;
public var btn1:SimpleButton;
public var txt1:TextField;
public var txt2:TextField;
public var txt3:TextField;
public function Symbol105_402(){
super();
}
}
}//package AGL_fla
Section 54
//Symbol106_385 (AGL_fla.Symbol106_385)
package AGL_fla {
import flash.display.*;
public dynamic class Symbol106_385 extends MovieClip {
public function Symbol106_385(){
super();
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
this.visible = false;
}
function frame2(){
this.visible = true;
}
}
}//package AGL_fla
Section 55
//Symbol110_397 (AGL_fla.Symbol110_397)
package AGL_fla {
import flash.display.*;
public dynamic class Symbol110_397 extends MovieClip {
public var btnpositioning:SimpleButton;
public function Symbol110_397(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package AGL_fla
Section 56
//Symbol113_409 (AGL_fla.Symbol113_409)
package AGL_fla {
import flash.display.*;
public dynamic class Symbol113_409 extends MovieClip {
public var mc1:MovieClip;
public function Symbol113_409(){
super();
addFrameScript(0, frame1);
}
function frame1(){
this.mouseChildren = false;
this.mouseEnabled = false;
}
}
}//package AGL_fla
Section 57
//Symbol114_410 (AGL_fla.Symbol114_410)
package AGL_fla {
import flash.display.*;
import flash.text.*;
public dynamic class Symbol114_410 extends MovieClip {
public var txt1:TextField;
public function Symbol114_410(){
super();
}
}
}//package AGL_fla
Section 58
//Symbol116_196 (AGL_fla.Symbol116_196)
package AGL_fla {
import flash.display.*;
public dynamic class Symbol116_196 extends MovieClip {
public function Symbol116_196(){
super();
addFrameScript(0, frame1);
}
public function randRange(min:Number, max:Number):Number{
var randomNum:Number;
randomNum = (Math.floor((Math.random() * ((max - min) + 1))) + min);
return (randomNum);
}
function frame1(){
gotoAndStop(randRange(1, 2));
}
}
}//package AGL_fla
Section 59
//Symbol117_197 (AGL_fla.Symbol117_197)
package AGL_fla {
import flash.display.*;
public dynamic class Symbol117_197 extends MovieClip {
public function Symbol117_197(){
super();
addFrameScript(0, frame1);
}
public function randRange(min:Number, max:Number):Number{
var randomNum:Number;
randomNum = (Math.floor((Math.random() * ((max - min) + 1))) + min);
return (randomNum);
}
function frame1(){
gotoAndStop(randRange(1, 2));
}
}
}//package AGL_fla
Section 60
//Symbol120_58 (AGL_fla.Symbol120_58)
package AGL_fla {
import flash.display.*;
public dynamic class Symbol120_58 extends MovieClip {
public function Symbol120_58(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package AGL_fla
Section 61
//Symbol124_373 (AGL_fla.Symbol124_373)
package AGL_fla {
import flash.display.*;
public dynamic class Symbol124_373 extends MovieClip {
public function Symbol124_373(){
super();
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
this.visible = false;
}
function frame2(){
this.visible = true;
}
}
}//package AGL_fla
Section 62
//Symbol125_322 (AGL_fla.Symbol125_322)
package AGL_fla {
import flash.display.*;
public dynamic class Symbol125_322 extends MovieClip {
public var mc1:MovieClip;
public var mc3:MovieClip;
public var mc5:MovieClip;
public var mc2:MovieClip;
public var mc4:MovieClip;
public var mc6:MovieClip;
public function Symbol125_322(){
super();
}
}
}//package AGL_fla
Section 63
//Symbol126_26 (AGL_fla.Symbol126_26)
package AGL_fla {
import flash.display.*;
public dynamic class Symbol126_26 extends MovieClip {
public function Symbol126_26(){
super();
addFrameScript(0, frame1);
}
public function randRange(min:Number, max:Number):Number{
var randomNum:Number;
randomNum = (Math.floor((Math.random() * ((max - min) + 1))) + min);
return (randomNum);
}
function frame1(){
gotoAndStop(randRange(1, 2));
}
}
}//package AGL_fla
Section 64
//Symbol126bb_32 (AGL_fla.Symbol126bb_32)
package AGL_fla {
import flash.display.*;
public dynamic class Symbol126bb_32 extends MovieClip {
public function Symbol126bb_32(){
super();
addFrameScript(0, frame1);
}
public function randRange(min:Number, max:Number):Number{
var randomNum:Number;
randomNum = (Math.floor((Math.random() * ((max - min) + 1))) + min);
return (randomNum);
}
function frame1(){
gotoAndStop(randRange(1, 2));
}
}
}//package AGL_fla
Section 65
//Symbol127_25 (AGL_fla.Symbol127_25)
package AGL_fla {
import flash.display.*;
public dynamic class Symbol127_25 extends MovieClip {
public function Symbol127_25(){
super();
addFrameScript(0, frame1, 14, frame15, 40, frame41, 80, frame81);
}
function frame81(){
gotoAndPlay("go");
}
public function randRange(min:Number, max:Number):Number{
var randomNum:Number;
randomNum = (Math.floor((Math.random() * ((max - min) + 1))) + min);
return (randomNum);
}
function frame15(){
gotoAndPlay("go");
}
function frame1(){
gotoAndPlay(("idle" + randRange(1, 3)));
}
function frame41(){
gotoAndPlay("go");
}
}
}//package AGL_fla
Section 66
//Symbol127bb_31 (AGL_fla.Symbol127bb_31)
package AGL_fla {
import flash.display.*;
public dynamic class Symbol127bb_31 extends MovieClip {
public function Symbol127bb_31(){
super();
addFrameScript(0, frame1, 14, frame15, 40, frame41, 80, frame81);
}
function frame81(){
gotoAndPlay("go");
}
public function randRange(min:Number, max:Number):Number{
var randomNum:Number;
randomNum = (Math.floor((Math.random() * ((max - min) + 1))) + min);
return (randomNum);
}
function frame15(){
gotoAndPlay("go");
}
function frame1(){
gotoAndPlay(("idle" + randRange(1, 3)));
}
function frame41(){
gotoAndPlay("go");
}
}
}//package AGL_fla
Section 67
//Symbol128_30 (AGL_fla.Symbol128_30)
package AGL_fla {
import flash.display.*;
public dynamic class Symbol128_30 extends MovieClip {
public function Symbol128_30(){
super();
addFrameScript(0, frame1);
}
public function randRange(min:Number, max:Number):Number{
var randomNum:Number;
randomNum = (Math.floor((Math.random() * ((max - min) + 1))) + min);
return (randomNum);
}
function frame1(){
gotoAndStop(randRange(1, 2));
}
}
}//package AGL_fla
Section 68
//Symbol129_29 (AGL_fla.Symbol129_29)
package AGL_fla {
import flash.display.*;
public dynamic class Symbol129_29 extends MovieClip {
public function Symbol129_29(){
super();
addFrameScript(0, frame1, 7, frame8, 19, frame20, 35, frame36, 44, frame45, 53, frame54, 62, frame63);
}
public function randRange(min:Number, max:Number):Number{
var randomNum:Number;
randomNum = (Math.floor((Math.random() * ((max - min) + 1))) + min);
return (randomNum);
}
function frame1(){
gotoAndPlay(("idle" + randRange(1, 3)));
}
function frame8(){
gotoAndPlay(("pop" + randRange(1, 3)));
}
function frame36(){
gotoAndPlay(("pop" + randRange(1, 3)));
}
function frame20(){
gotoAndPlay(("pop" + randRange(1, 3)));
}
function frame45(){
gotoAndPlay(1);
}
function frame54(){
gotoAndPlay(1);
}
function frame63(){
gotoAndPlay(1);
}
}
}//package AGL_fla
Section 69
//Symbol135_208 (AGL_fla.Symbol135_208)
package AGL_fla {
import flash.display.*;
public dynamic class Symbol135_208 extends MovieClip {
public function Symbol135_208(){
super();
addFrameScript(33, frame34, 50, frame51, 63, frame64, 65, frame66, 75, frame76, 118, frame119, 136, frame137, 138, frame139, 148, frame149, 159, frame160, 170, frame171, 172, frame173, 174, frame175, 176, frame177, 217, frame218, 219, frame220);
}
function frame64(){
gotoAndPlay("jump");
}
function frame76(){
gotoAndPlay("sitactivity1");
}
function frame160(){
gotoAndPlay("idleactivity1");
}
function frame171(){
gotoAndPlay("idleactivity2");
}
function frame177(){
gotoAndPlay("readbook");
}
function frame218(){
gotoAndPlay("music");
}
function frame220(){
gotoAndPlay("flute");
}
function frame173(){
gotoAndPlay("fainted");
}
function frame175(){
gotoAndPlay("readpaper");
}
function frame34(){
gotoAndPlay("idle1");
}
function frame119(){
gotoAndPlay("idle2");
}
function frame51(){
gotoAndPlay("walk1");
}
function frame139(){
gotoAndPlay("sit2");
}
function frame137(){
gotoAndPlay("walk2");
}
function frame149(){
gotoAndPlay("sitactivity2");
}
function frame66(){
gotoAndPlay("sit1");
}
}
}//package AGL_fla
Section 70
//Symbol137_437 (AGL_fla.Symbol137_437)
package AGL_fla {
import flash.display.*;
import flash.text.*;
public dynamic class Symbol137_437 extends MovieClip {
public var btnclose:SimpleButton;
public var btnminus:SimpleButton;
public var txt1:TextField;
public var btndeposit:SimpleButton;
public var btnplus:SimpleButton;
public function Symbol137_437(){
super();
}
}
}//package AGL_fla
Section 71
//Symbol142_442 (AGL_fla.Symbol142_442)
package AGL_fla {
import flash.display.*;
import flash.text.*;
public dynamic class Symbol142_442 extends MovieClip {
public var btnclose:SimpleButton;
public var btnwithdraw:SimpleButton;
public var txt1:TextField;
public var txt2:TextField;
public function Symbol142_442(){
super();
}
}
}//package AGL_fla
Section 72
//Symbol144_444 (AGL_fla.Symbol144_444)
package AGL_fla {
import flash.display.*;
public dynamic class Symbol144_444 extends MovieClip {
public var mcline:MovieClip;
public function Symbol144_444(){
super();
}
}
}//package AGL_fla
Section 73
//Symbol147_449 (AGL_fla.Symbol147_449)
package AGL_fla {
import flash.display.*;
import flash.text.*;
public dynamic class Symbol147_449 extends MovieClip {
public var mc1:MovieClip;
public var txtday3:TextField;
public var txtday6:TextField;
public var txtday5:TextField;
public var txtday2:TextField;
public var txtday4:TextField;
public var txtday7:TextField;
public var txtday1:TextField;
public var mcday2:MovieClip;
public var mcday3:MovieClip;
public var mcday5:MovieClip;
public var mcday6:MovieClip;
public var mcday7:MovieClip;
public var mcday4:MovieClip;
public var mcday1:MovieClip;
public var txt1:TextField;
public function Symbol147_449(){
super();
}
}
}//package AGL_fla
Section 74
//Symbol155_416 (AGL_fla.Symbol155_416)
package AGL_fla {
import flash.display.*;
import flash.text.*;
public dynamic class Symbol155_416 extends MovieClip {
public var txt1:TextField;
public function Symbol155_416(){
super();
addFrameScript(0, frame1);
}
function frame1(){
txt1.mouseEnabled = false;
}
}
}//package AGL_fla
Section 75
//Symbol156_424 (AGL_fla.Symbol156_424)
package AGL_fla {
import flash.display.*;
import flash.text.*;
public dynamic class Symbol156_424 extends MovieClip {
public var mcicon:MovieClip;
public var btninfo:SimpleButton;
public var mc1:MovieClip;
public var mc2:MovieClip;
public var mcday3:MovieClip;
public var mcday5:MovieClip;
public var mcday6:MovieClip;
public var mcday7:MovieClip;
public var mcday2:MovieClip;
public var mcday4:MovieClip;
public var mcday1:MovieClip;
public var txt1:TextField;
public var txtprog:TextField;
public var txtgold:TextField;
public function Symbol156_424(){
super();
}
}
}//package AGL_fla
Section 76
//Symbol160_429 (AGL_fla.Symbol160_429)
package AGL_fla {
import flash.display.*;
import flash.text.*;
public dynamic class Symbol160_429 extends MovieClip {
public var txt1:TextField;
public function Symbol160_429(){
super();
}
}
}//package AGL_fla
Section 77
//Symbol161_428 (AGL_fla.Symbol161_428)
package AGL_fla {
import flash.display.*;
public dynamic class Symbol161_428 extends MovieClip {
public var mc1:MovieClip;
public function Symbol161_428(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package AGL_fla
Section 78
//Symbol164_501 (AGL_fla.Symbol164_501)
package AGL_fla {
import flash.display.*;
public dynamic class Symbol164_501 extends MovieClip {
public var mccloud:MovieClip;
public var mccar1:MovieClip;
public var mclight1:MovieClip;
public function Symbol164_501(){
super();
addFrameScript(0, frame1, 20, frame21, 39, frame40);
}
function frame1(){
stop();
}
function frame21(){
stop();
}
function frame40(){
stop();
}
}
}//package AGL_fla
Section 79
//Symbol166copy_521 (AGL_fla.Symbol166copy_521)
package AGL_fla {
import flash.display.*;
public dynamic class Symbol166copy_521 extends MovieClip {
public var mcstink:MovieClip;
public function Symbol166copy_521(){
super();
}
}
}//package AGL_fla
Section 80
//Symbol179_456 (AGL_fla.Symbol179_456)
package AGL_fla {
import flash.display.*;
public dynamic class Symbol179_456 extends MovieClip {
public var mc1:MovieClip;
public var mc2:MovieClip;
public function Symbol179_456(){
super();
addFrameScript(0, frame1);
}
function frame1(){
mc1.mouseChildren = false;
mc1.mouseEnabled = false;
mc2.mouseChildren = false;
mc2.mouseEnabled = false;
}
}
}//package AGL_fla
Section 81
//Symbol182_460 (AGL_fla.Symbol182_460)
package AGL_fla {
import flash.display.*;
public dynamic class Symbol182_460 extends MovieClip {
public var mc1:MovieClip;
public function Symbol182_460(){
super();
addFrameScript(0, frame1, 1, frame2, 33, frame34);
}
function frame1(){
stop();
this.visible = false;
}
function frame2(){
this.visible = true;
}
function frame34(){
stop();
}
}
}//package AGL_fla
Section 82
//Symbol183_530 (AGL_fla.Symbol183_530)
package AGL_fla {
import flash.display.*;
import flash.text.*;
public dynamic class Symbol183_530 extends MovieClip {
public var txt1:TextField;
public function Symbol183_530(){
super();
}
}
}//package AGL_fla
Section 83
//Symbol185_532 (AGL_fla.Symbol185_532)
package AGL_fla {
import flash.display.*;
import flash.text.*;
public dynamic class Symbol185_532 extends MovieClip {
public var txt1:TextField;
public function Symbol185_532(){
super();
}
}
}//package AGL_fla
Section 84
//Symbol191_537 (AGL_fla.Symbol191_537)
package AGL_fla {
import flash.display.*;
public dynamic class Symbol191_537 extends MovieClip {
public function Symbol191_537(){
super();
addFrameScript(0, frame1);
}
public function randRange(min:Number, max:Number):Number{
var randomNum:Number;
randomNum = (Math.floor((Math.random() * ((max - min) + 1))) + min);
return (randomNum);
}
function frame1(){
gotoAndStop(randRange(1, this.totalFrames));
}
}
}//package AGL_fla
Section 85
//Symbol193_536 (AGL_fla.Symbol193_536)
package AGL_fla {
import flash.display.*;
public dynamic class Symbol193_536 extends MovieClip {
public function Symbol193_536(){
super();
addFrameScript(17, frame18);
}
function frame18(){
stop();
}
}
}//package AGL_fla
Section 86
//Symbol197_541 (AGL_fla.Symbol197_541)
package AGL_fla {
import flash.display.*;
import flash.text.*;
public dynamic class Symbol197_541 extends MovieClip {
public var txt1:TextField;
public function Symbol197_541(){
super();
}
}
}//package AGL_fla
Section 87
//Symbol1asd_463 (AGL_fla.Symbol1asd_463)
package AGL_fla {
import flash.display.*;
public dynamic class Symbol1asd_463 extends MovieClip {
public function Symbol1asd_463(){
super();
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
this.visible = false;
}
function frame2(){
this.visible = true;
}
}
}//package AGL_fla
Section 88
//Symbol1char_20 (AGL_fla.Symbol1char_20)
package AGL_fla {
import flash.display.*;
public dynamic class Symbol1char_20 extends MovieClip {
public var mcint:MovieClip;
public function Symbol1char_20(){
super();
addFrameScript(33, frame34, 50, frame51, 63, frame64, 65, frame66, 75, frame76, 118, frame119, 136, frame137, 138, frame139, 148, frame149, 159, frame160, 170, frame171, 172, frame173, 174, frame175, 176, frame177, 217, frame218, 219, frame220, 253, frame254, 0xFF, frame256, 0x0101, frame258, 259, frame260, 293, frame294, 327, frame328);
}
function frame64(){
gotoAndPlay("idle1");
}
function frame76(){
gotoAndPlay("sitactivity1");
}
function frame160(){
gotoAndPlay("idleactivity1");
}
function frame328(){
gotoAndPlay("idle5");
}
function frame171(){
gotoAndPlay("idleactivity2");
}
function frame177(){
gotoAndPlay("readbook");
}
function frame218(){
gotoAndPlay("music");
}
function frame220(){
gotoAndPlay("flute");
}
function frame173(){
gotoAndPlay("fainted");
}
function frame175(){
gotoAndPlay("readpaper");
}
function frame34(){
gotoAndPlay("idle1");
}
function frame294(){
gotoAndPlay("idle4");
}
function frame119(){
gotoAndPlay("idle2");
}
function frame51(){
gotoAndPlay("walk1");
}
function frame139(){
gotoAndPlay("sit2");
}
function frame256(){
gotoAndPlay("faintedoffice");
}
function frame137(){
gotoAndPlay("walk2");
}
function frame254(){
gotoAndPlay("idle3");
}
function frame258(){
gotoAndPlay("faintedstudio");
}
function frame260(){
gotoAndPlay("faintedstadium");
}
function frame149(){
gotoAndPlay("sitactivity2");
}
function frame66(){
gotoAndPlay("sit1");
}
}
}//package AGL_fla
Section 89
//Symbol201_548 (AGL_fla.Symbol201_548)
package AGL_fla {
import flash.display.*;
import flash.text.*;
public dynamic class Symbol201_548 extends MovieClip {
public var txt2:TextField;
public function Symbol201_548(){
super();
}
}
}//package AGL_fla
Section 90
//Symbol204_555 (AGL_fla.Symbol204_555)
package AGL_fla {
import flash.display.*;
public dynamic class Symbol204_555 extends MovieClip {
public function Symbol204_555(){
super();
addFrameScript(0, frame1, 84, frame85, 119, frame120);
}
public function randRange(min:Number, max:Number):Number{
var randomNum:Number;
randomNum = (Math.floor((Math.random() * ((max - min) + 1))) + min);
return (randomNum);
}
function frame85(){
gotoAndPlay(("go" + randRange(1, 2)));
}
function frame1(){
}
function frame120(){
gotoAndPlay(("go" + randRange(1, 2)));
}
}
}//package AGL_fla
Section 91
//Symbol209_559 (AGL_fla.Symbol209_559)
package AGL_fla {
import flash.display.*;
public dynamic class Symbol209_559 extends MovieClip {
public var mcstink:MovieClip;
public function Symbol209_559(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package AGL_fla
Section 92
//Symbol221_213 (AGL_fla.Symbol221_213)
package AGL_fla {
import flash.display.*;
public dynamic class Symbol221_213 extends MovieClip {
public function Symbol221_213(){
super();
addFrameScript(0, frame1);
}
public function randRange(min:Number, max:Number):Number{
var randomNum:Number;
randomNum = (Math.floor((Math.random() * ((max - min) + 1))) + min);
return (randomNum);
}
function frame1(){
gotoAndStop(randRange(1, 3));
}
}
}//package AGL_fla
Section 93
//Symbol222_550 (AGL_fla.Symbol222_550)
package AGL_fla {
import flash.display.*;
public dynamic class Symbol222_550 extends MovieClip {
public var mc1:MovieClip;
public function Symbol222_550(){
super();
}
}
}//package AGL_fla
Section 94
//Symbol223_552 (AGL_fla.Symbol223_552)
package AGL_fla {
import flash.display.*;
public dynamic class Symbol223_552 extends MovieClip {
public function Symbol223_552(){
super();
addFrameScript(0, frame1);
}
public function randRange(min:Number, max:Number):Number{
var randomNum:Number;
randomNum = (Math.floor((Math.random() * ((max - min) + 1))) + min);
return (randomNum);
}
function frame1(){
gotoAndStop(randRange(1, this.totalFrames));
}
}
}//package AGL_fla
Section 95
//Symbol224_553 (AGL_fla.Symbol224_553)
package AGL_fla {
import flash.display.*;
public dynamic class Symbol224_553 extends MovieClip {
public function Symbol224_553(){
super();
addFrameScript(0, frame1);
}
public function randRange(min:Number, max:Number):Number{
var randomNum:Number;
randomNum = (Math.floor((Math.random() * ((max - min) + 1))) + min);
return (randomNum);
}
function frame1(){
gotoAndStop(randRange(1, this.totalFrames));
}
}
}//package AGL_fla
Section 96
//Symbol228_579 (AGL_fla.Symbol228_579)
package AGL_fla {
import flash.display.*;
public dynamic class Symbol228_579 extends MovieClip {
public function Symbol228_579(){
super();
addFrameScript(0, frame1, 17, frame18, 44, frame45);
}
public function randRange(min:Number, max:Number):Number{
var randomNum:Number;
randomNum = (Math.floor((Math.random() * ((max - min) + 1))) + min);
return (randomNum);
}
function frame18(){
gotoAndStop(1);
}
function frame1(){
gotoAndPlay(("go" + randRange(1, 2)));
}
function frame45(){
gotoAndStop(1);
}
}
}//package AGL_fla
Section 97
//Symbol230_584 (AGL_fla.Symbol230_584)
package AGL_fla {
import flash.display.*;
public dynamic class Symbol230_584 extends MovieClip {
public var mcstink:MovieClip;
public var mc1:MovieClip;
public function Symbol230_584(){
super();
addFrameScript(0, frame1, 129, frame130);
}
function frame1(){
stop();
}
function frame130(){
gotoAndPlay(2);
}
}
}//package AGL_fla
Section 98
//Symbol230copy_627 (AGL_fla.Symbol230copy_627)
package AGL_fla {
import flash.display.*;
public dynamic class Symbol230copy_627 extends MovieClip {
public var mcstink:MovieClip;
public var mc1:MovieClip;
public function Symbol230copy_627(){
super();
addFrameScript(0, frame1, 103, frame104);
}
function frame1(){
stop();
}
function frame104(){
gotoAndPlay(2);
}
}
}//package AGL_fla
Section 99
//Symbol231copy_592 (AGL_fla.Symbol231copy_592)
package AGL_fla {
import flash.display.*;
public dynamic class Symbol231copy_592 extends MovieClip {
public var mchit:MovieClip;
public function Symbol231copy_592(){
super();
addFrameScript(8, frame9, 17, frame18, 30, frame31);
}
function frame18(){
gotoAndPlay("run");
}
function frame9(){
gotoAndPlay("run");
}
function frame31(){
gotoAndPlay("run");
}
}
}//package AGL_fla
Section 100
//Symbol240_432 (AGL_fla.Symbol240_432)
package AGL_fla {
import flash.display.*;
import flash.text.*;
public dynamic class Symbol240_432 extends MovieClip {
public var txt1:TextField;
public function Symbol240_432(){
super();
}
}
}//package AGL_fla
Section 101
//Symbol248_593 (AGL_fla.Symbol248_593)
package AGL_fla {
import flash.display.*;
public dynamic class Symbol248_593 extends MovieClip {
public var mchit:MovieClip;
public function Symbol248_593(){
super();
}
}
}//package AGL_fla
Section 102
//Symbol251_347 (AGL_fla.Symbol251_347)
package AGL_fla {
import flash.display.*;
public dynamic class Symbol251_347 extends MovieClip {
public var mclight:MovieClip;
public var mclight2:MovieClip;
public function Symbol251_347(){
super();
}
}
}//package AGL_fla
Section 103
//Symbol251copy_353 (AGL_fla.Symbol251copy_353)
package AGL_fla {
import flash.display.*;
public dynamic class Symbol251copy_353 extends MovieClip {
public var mclight:MovieClip;
public var mclight2:MovieClip;
public function Symbol251copy_353(){
super();
}
}
}//package AGL_fla
Section 104
//Symbol251copy2_626 (AGL_fla.Symbol251copy2_626)
package AGL_fla {
import flash.display.*;
public dynamic class Symbol251copy2_626 extends MovieClip {
public var mclight:MovieClip;
public var mclight2:MovieClip;
public function Symbol251copy2_626(){
super();
}
}
}//package AGL_fla
Section 105
//Symbol252_348 (AGL_fla.Symbol252_348)
package AGL_fla {
import flash.display.*;
public dynamic class Symbol252_348 extends MovieClip {
public function Symbol252_348(){
super();
addFrameScript(0, frame1, 7, frame8);
}
function frame1(){
stop();
}
function frame8(){
stop();
}
}
}//package AGL_fla
Section 106
//Symbol254_346 (AGL_fla.Symbol254_346)
package AGL_fla {
import flash.display.*;
public dynamic class Symbol254_346 extends MovieClip {
public var mc1:MovieClip;
public function Symbol254_346(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package AGL_fla
Section 107
//Symbol254copy_503 (AGL_fla.Symbol254copy_503)
package AGL_fla {
import flash.display.*;
public dynamic class Symbol254copy_503 extends MovieClip {
public var mc1:MovieClip;
public function Symbol254copy_503(){
super();
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
this.visible = false;
}
function frame2(){
this.visible = true;
}
}
}//package AGL_fla
Section 108
//Symbol254copy2_352 (AGL_fla.Symbol254copy2_352)
package AGL_fla {
import flash.display.*;
public dynamic class Symbol254copy2_352 extends MovieClip {
public var mc1:MovieClip;
public function Symbol254copy2_352(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package AGL_fla
Section 109
//Symbol254copy3_504 (AGL_fla.Symbol254copy3_504)
package AGL_fla {
import flash.display.*;
public dynamic class Symbol254copy3_504 extends MovieClip {
public var mc1:MovieClip;
public function Symbol254copy3_504(){
super();
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
this.visible = false;
}
function frame2(){
this.visible = true;
}
}
}//package AGL_fla
Section 110
//Symbol254copy4_625 (AGL_fla.Symbol254copy4_625)
package AGL_fla {
import flash.display.*;
public dynamic class Symbol254copy4_625 extends MovieClip {
public var mc1:MovieClip;
public function Symbol254copy4_625(){
super();
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
this.visible = false;
}
function frame2(){
this.visible = true;
}
}
}//package AGL_fla
Section 111
//Symbol256_387 (AGL_fla.Symbol256_387)
package AGL_fla {
import flash.display.*;
import flash.text.*;
public dynamic class Symbol256_387 extends MovieClip {
public var txt1:TextField;
public var mcfx:MovieClip;
public var mcstar:MovieClip;
public function Symbol256_387(){
super();
addFrameScript(0, frame1, 20, frame21, 31, frame32);
}
function frame1(){
stop();
}
function frame21(){
stop();
}
function frame32(){
stop();
}
}
}//package AGL_fla
Section 112
//Symbol260_219 (AGL_fla.Symbol260_219)
package AGL_fla {
import flash.display.*;
public dynamic class Symbol260_219 extends MovieClip {
public function Symbol260_219(){
super();
addFrameScript(0, frame1);
}
public function randRange(min:Number, max:Number):Number{
var randomNum:Number;
randomNum = (Math.floor((Math.random() * ((max - min) + 1))) + min);
return (randomNum);
}
function frame1(){
gotoAndStop(randRange(1, 2));
}
}
}//package AGL_fla
Section 113
//Symbol264_467 (AGL_fla.Symbol264_467)
package AGL_fla {
import flash.display.*;
public dynamic class Symbol264_467 extends MovieClip {
public var mc1:MovieClip;
public function Symbol264_467(){
super();
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
this.visible = false;
}
function frame2(){
this.visible = true;
}
}
}//package AGL_fla
Section 114
//Symbol265_468 (AGL_fla.Symbol265_468)
package AGL_fla {
import flash.display.*;
import flash.text.*;
public dynamic class Symbol265_468 extends MovieClip {
public var txt1:TextField;
public function Symbol265_468(){
super();
}
}
}//package AGL_fla
Section 115
//Symbol266_390 (AGL_fla.Symbol266_390)
package AGL_fla {
import flash.display.*;
public dynamic class Symbol266_390 extends MovieClip {
public function Symbol266_390(){
super();
addFrameScript(0, frame1, 1, frame2, 59, frame60);
}
function frame1(){
stop();
this.visible = false;
}
function frame2(){
this.visible = true;
}
function frame60(){
gotoAndPlay(2);
}
}
}//package AGL_fla
Section 116
//Symbol271_603 (AGL_fla.Symbol271_603)
package AGL_fla {
import flash.display.*;
public dynamic class Symbol271_603 extends MovieClip {
public var mcstink:MovieClip;
public function Symbol271_603(){
super();
}
}
}//package AGL_fla
Section 117
//Symbol272_605 (AGL_fla.Symbol272_605)
package AGL_fla {
import flash.display.*;
public dynamic class Symbol272_605 extends MovieClip {
public var btn3:MovieClip;
public var btn2:MovieClip;
public var btn1:MovieClip;
public function Symbol272_605(){
super();
}
}
}//package AGL_fla
Section 118
//Symbol272copy_621 (AGL_fla.Symbol272copy_621)
package AGL_fla {
import flash.display.*;
public dynamic class Symbol272copy_621 extends MovieClip {
public function Symbol272copy_621(){
super();
addFrameScript(0, frame1);
}
public function randRange(min:Number, max:Number):Number{
var randomNum:Number;
randomNum = (Math.floor((Math.random() * ((max - min) + 1))) + min);
return (randomNum);
}
function frame1(){
gotoAndStop(randRange(1, 3));
}
}
}//package AGL_fla
Section 119
//Symbol272copy2_631 (AGL_fla.Symbol272copy2_631)
package AGL_fla {
import flash.display.*;
public dynamic class Symbol272copy2_631 extends MovieClip {
public var btn3:MovieClip;
public var btn2:MovieClip;
public var btn1:MovieClip;
public function Symbol272copy2_631(){
super();
}
}
}//package AGL_fla
Section 120
//Symbol273_607 (AGL_fla.Symbol273_607)
package AGL_fla {
import flash.display.*;
public dynamic class Symbol273_607 extends MovieClip {
public var mcstink:MovieClip;
public function Symbol273_607(){
super();
}
}
}//package AGL_fla
Section 121
//Symbol275_23 (AGL_fla.Symbol275_23)
package AGL_fla {
import flash.display.*;
public dynamic class Symbol275_23 extends MovieClip {
public function Symbol275_23(){
super();
addFrameScript(0, frame1);
}
public function randRange(min:Number, max:Number):Number{
var randomNum:Number;
randomNum = (Math.floor((Math.random() * ((max - min) + 1))) + min);
return (randomNum);
}
function frame1(){
gotoAndStop(randRange(1, 2));
}
}
}//package AGL_fla
Section 122
//Symbol277_608 (AGL_fla.Symbol277_608)
package AGL_fla {
import flash.display.*;
public dynamic class Symbol277_608 extends MovieClip {
public var mcstink:MovieClip;
public function Symbol277_608(){
super();
}
}
}//package AGL_fla
Section 123
//Symbol278_412 (AGL_fla.Symbol278_412)
package AGL_fla {
import flash.display.*;
public dynamic class Symbol278_412 extends MovieClip {
public var mc1:MovieClip;
public function Symbol278_412(){
super();
}
}
}//package AGL_fla
Section 124
//Symbol279_609 (AGL_fla.Symbol279_609)
package AGL_fla {
import flash.display.*;
public dynamic class Symbol279_609 extends MovieClip {
public var mcstink:MovieClip;
public function Symbol279_609(){
super();
}
}
}//package AGL_fla
Section 125
//Symbol291_474 (AGL_fla.Symbol291_474)
package AGL_fla {
import flash.display.*;
public dynamic class Symbol291_474 extends MovieClip {
public function Symbol291_474(){
super();
addFrameScript(9, frame10);
}
function frame10(){
stop();
}
}
}//package AGL_fla
Section 126
//Symbol296_395 (AGL_fla.Symbol296_395)
package AGL_fla {
import flash.display.*;
import flash.text.*;
public dynamic class Symbol296_395 extends MovieClip {
public var mcbar4:MovieClip;
public var mcbar7:MovieClip;
public var mcbar1:MovieClip;
public var mcbar2:MovieClip;
public var mcbar8:MovieClip;
public var mcbar9:MovieClip;
public var mcbar3:MovieClip;
public var mcbar5:MovieClip;
public var mcbar6:MovieClip;
public var mcbar10:MovieClip;
public var txt1:TextField;
public var txt2:TextField;
public function Symbol296_395(){
super();
}
}
}//package AGL_fla
Section 127
//Symbol308_633 (AGL_fla.Symbol308_633)
package AGL_fla {
import flash.display.*;
public dynamic class Symbol308_633 extends MovieClip {
public var mcgoalfx:MovieClip;
public var mc1:MovieClip;
public var mc3:MovieClip;
public var mc5:MovieClip;
public var mc2:MovieClip;
public var mc4:MovieClip;
public var btnnext:MovieClip;
public var mc6:MovieClip;
public var btnprev:MovieClip;
public function Symbol308_633(){
super();
}
}
}//package AGL_fla
Section 128
//Symbol308copy_688 (AGL_fla.Symbol308copy_688)
package AGL_fla {
import flash.display.*;
public dynamic class Symbol308copy_688 extends MovieClip {
public var mcgoalfx:MovieClip;
public var mc1:MovieClip;
public function Symbol308copy_688(){
super();
}
}
}//package AGL_fla
Section 129
//Symbol308copy2_699 (AGL_fla.Symbol308copy2_699)
package AGL_fla {
import flash.display.*;
public dynamic class Symbol308copy2_699 extends MovieClip {
public var mcgoalfx:MovieClip;
public function Symbol308copy2_699(){
super();
addFrameScript(794, frame795);
}
function frame795(){
stop();
}
}
}//package AGL_fla
Section 130
//Symbol309_638 (AGL_fla.Symbol309_638)
package AGL_fla {
import flash.display.*;
public dynamic class Symbol309_638 extends MovieClip {
public function Symbol309_638(){
super();
addFrameScript(0, frame1);
}
public function randRange(min:Number, max:Number):Number{
var randomNum:Number;
randomNum = (Math.floor((Math.random() * ((max - min) + 1))) + min);
return (randomNum);
}
function frame1(){
gotoAndStop(randRange(1, this.totalFrames));
}
}
}//package AGL_fla
Section 131
//Symbol310_639 (AGL_fla.Symbol310_639)
package AGL_fla {
import flash.display.*;
public dynamic class Symbol310_639 extends MovieClip {
public function Symbol310_639(){
super();
addFrameScript(0, frame1);
}
public function randRange(min:Number, max:Number):Number{
var randomNum:Number;
randomNum = (Math.floor((Math.random() * ((max - min) + 1))) + min);
return (randomNum);
}
function frame1(){
gotoAndStop(randRange(1, 2));
}
}
}//package AGL_fla
Section 132
//Symbol311_636 (AGL_fla.Symbol311_636)
package AGL_fla {
import flash.display.*;
public dynamic class Symbol311_636 extends MovieClip {
public function Symbol311_636(){
super();
addFrameScript(0, frame1, 60, frame61, 164, frame165, 340, frame341, 466, frame467, 716, frame717, 1045, frame1046);
}
function frame717(){
gotoAndPlay(1);
}
function frame165(){
gotoAndPlay(("go" + randRange(1, 3)));
}
public function randRange(min:Number, max:Number):Number{
var randomNum:Number;
randomNum = (Math.floor((Math.random() * ((max - min) + 1))) + min);
return (randomNum);
}
function frame341(){
gotoAndPlay(("go" + randRange(1, 3)));
}
function frame1(){
gotoAndPlay(("idle" + randRange(1, 3)));
}
function frame467(){
gotoAndPlay(1);
}
function frame1046(){
gotoAndPlay(1);
}
function frame61(){
gotoAndPlay(("go" + randRange(1, 3)));
}
}
}//package AGL_fla
Section 133
//Symbol314_650 (AGL_fla.Symbol314_650)
package AGL_fla {
import flash.display.*;
public dynamic class Symbol314_650 extends MovieClip {
public var mc1:MovieClip;
public function Symbol314_650(){
super();
addFrameScript(0, frame1, 1, frame2, 8, frame9);
}
function frame1(){
stop();
this.visible = false;
}
function frame9(){
stop();
}
function frame2(){
this.visible = true;
}
}
}//package AGL_fla
Section 134
//Symbol315_641 (AGL_fla.Symbol315_641)
package AGL_fla {
import flash.display.*;
public dynamic class Symbol315_641 extends MovieClip {
public var mc1:MovieClip;
public var mc3:MovieClip;
public var mc2:MovieClip;
public function Symbol315_641(){
super();
}
}
}//package AGL_fla
Section 135
//Symbol315copy_649 (AGL_fla.Symbol315copy_649)
package AGL_fla {
import flash.display.*;
public dynamic class Symbol315copy_649 extends MovieClip {
public var mc1:MovieClip;
public var mc3:MovieClip;
public var mc5:MovieClip;
public var mc2:MovieClip;
public var mc4:MovieClip;
public var mcline:MovieClip;
public var mc6:MovieClip;
public function Symbol315copy_649(){
super();
}
}
}//package AGL_fla
Section 136
//Symbol315copy2_656 (AGL_fla.Symbol315copy2_656)
package AGL_fla {
import flash.display.*;
public dynamic class Symbol315copy2_656 extends MovieClip {
public var mc1:MovieClip;
public var mc3:MovieClip;
public var mc2:MovieClip;
public var mcline:MovieClip;
public var mcjob3:MovieClip;
public var mcjob1:MovieClip;
public var mcjob2:MovieClip;
public function Symbol315copy2_656(){
super();
}
}
}//package AGL_fla
Section 137
//Symbol315copy3_666 (AGL_fla.Symbol315copy3_666)
package AGL_fla {
import flash.display.*;
public dynamic class Symbol315copy3_666 extends MovieClip {
public var mc1:MovieClip;
public var mc3:MovieClip;
public var mc2:MovieClip;
public var mcgoal:MovieClip;
public function Symbol315copy3_666(){
super();
}
}
}//package AGL_fla
Section 138
//Symbol315copy4_678 (AGL_fla.Symbol315copy4_678)
package AGL_fla {
import flash.display.*;
public dynamic class Symbol315copy4_678 extends MovieClip {
public var mc1:MovieClip;
public var mc3:MovieClip;
public var mc5:MovieClip;
public var mc2:MovieClip;
public var mc4:MovieClip;
public var btnyay:SimpleButton;
public var mc6:MovieClip;
public function Symbol315copy4_678(){
super();
}
}
}//package AGL_fla
Section 139
//Symbol316_642 (AGL_fla.Symbol316_642)
package AGL_fla {
import flash.display.*;
public dynamic class Symbol316_642 extends MovieClip {
public var mc1:MovieClip;
public function Symbol316_642(){
super();
addFrameScript(0, frame1, 1, frame2, 7, frame8);
}
function frame1(){
stop();
this.visible = false;
}
function frame8(){
stop();
}
function frame2(){
this.visible = true;
}
}
}//package AGL_fla
Section 140
//Symbol316copy_644 (AGL_fla.Symbol316copy_644)
package AGL_fla {
import flash.display.*;
public dynamic class Symbol316copy_644 extends MovieClip {
public var mc1:MovieClip;
public function Symbol316copy_644(){
super();
addFrameScript(0, frame1, 1, frame2, 7, frame8);
}
function frame1(){
stop();
this.visible = false;
}
function frame8(){
stop();
}
function frame2(){
this.visible = true;
}
}
}//package AGL_fla
Section 141
//Symbol316copy2_646 (AGL_fla.Symbol316copy2_646)
package AGL_fla {
import flash.display.*;
public dynamic class Symbol316copy2_646 extends MovieClip {
public var mc1:MovieClip;
public function Symbol316copy2_646(){
super();
addFrameScript(0, frame1, 1, frame2, 7, frame8);
}
function frame1(){
stop();
this.visible = false;
}
function frame8(){
stop();
}
function frame2(){
this.visible = true;
}
}
}//package AGL_fla
Section 142
//Symbol317_643 (AGL_fla.Symbol317_643)
package AGL_fla {
import flash.display.*;
import flash.text.*;
public dynamic class Symbol317_643 extends MovieClip {
public var txt1:TextField;
public function Symbol317_643(){
super();
}
}
}//package AGL_fla
Section 143
//Symbol317copy_645 (AGL_fla.Symbol317copy_645)
package AGL_fla {
import flash.display.*;
import flash.text.*;
public dynamic class Symbol317copy_645 extends MovieClip {
public var txt1:TextField;
public function Symbol317copy_645(){
super();
}
}
}//package AGL_fla
Section 144
//Symbol317copy2_647 (AGL_fla.Symbol317copy2_647)
package AGL_fla {
import flash.display.*;
import flash.text.*;
public dynamic class Symbol317copy2_647 extends MovieClip {
public var txt1:TextField;
public function Symbol317copy2_647(){
super();
}
}
}//package AGL_fla
Section 145
//Symbol318_651 (AGL_fla.Symbol318_651)
package AGL_fla {
import flash.display.*;
import flash.text.*;
public dynamic class Symbol318_651 extends MovieClip {
public var mc1:MovieClip;
public var mc2:MovieClip;
public var txt1:TextField;
public var txt2:TextField;
public var txt3:TextField;
public function Symbol318_651(){
super();
}
}
}//package AGL_fla
Section 146
//Symbol320_657 (AGL_fla.Symbol320_657)
package AGL_fla {
import flash.display.*;
public dynamic class Symbol320_657 extends MovieClip {
public var mc1:MovieClip;
public function Symbol320_657(){
super();
addFrameScript(0, frame1, 1, frame2, 7, frame8);
}
function frame1(){
stop();
this.visible = false;
}
function frame8(){
stop();
}
function frame2(){
this.visible = true;
}
}
}//package AGL_fla
Section 147
//Symbol320copy_681 (AGL_fla.Symbol320copy_681)
package AGL_fla {
import flash.display.*;
public dynamic class Symbol320copy_681 extends MovieClip {
public var mc1:MovieClip;
public function Symbol320copy_681(){
super();
addFrameScript(0, frame1, 1, frame2, 7, frame8);
}
function frame1(){
stop();
this.visible = false;
}
function frame8(){
stop();
}
function frame2(){
this.visible = true;
}
}
}//package AGL_fla
Section 148
//Symbol321_658 (AGL_fla.Symbol321_658)
package AGL_fla {
import flash.display.*;
import flash.text.*;
public dynamic class Symbol321_658 extends MovieClip {
public var mc1:MovieClip;
public var txt1:TextField;
public function Symbol321_658(){
super();
addFrameScript(0, frame1);
}
function frame1(){
mc1.mouseChildren = false;
mc1.mouseEnabled = false;
txt1.mouseEnabled = false;
}
}
}//package AGL_fla
Section 149
//Symbol321copy_682 (AGL_fla.Symbol321copy_682)
package AGL_fla {
import flash.display.*;
import flash.text.*;
public dynamic class Symbol321copy_682 extends MovieClip {
public var mc1:MovieClip;
public var txt1:TextField;
public function Symbol321copy_682(){
super();
addFrameScript(0, frame1);
}
function frame1(){
mc1.mouseChildren = false;
mc1.mouseEnabled = false;
txt1.mouseEnabled = false;
}
}
}//package AGL_fla
Section 150
//Symbol322_661 (AGL_fla.Symbol322_661)
package AGL_fla {
import flash.display.*;
public dynamic class Symbol322_661 extends MovieClip {
public function Symbol322_661(){
super();
addFrameScript(0, frame1, 1, frame2, 7, frame8);
}
function frame1(){
stop();
this.visible = false;
}
function frame8(){
stop();
}
function frame2(){
this.visible = true;
}
}
}//package AGL_fla
Section 151
//Symbol322copy_653 (AGL_fla.Symbol322copy_653)
package AGL_fla {
import flash.display.*;
public dynamic class Symbol322copy_653 extends MovieClip {
public function Symbol322copy_653(){
super();
addFrameScript(0, frame1, 1, frame2, 7, frame8);
}
function frame1(){
stop();
this.visible = false;
}
function frame8(){
stop();
}
function frame2(){
this.visible = true;
}
}
}//package AGL_fla
Section 152
//Symbol322copy2_683 (AGL_fla.Symbol322copy2_683)
package AGL_fla {
import flash.display.*;
public dynamic class Symbol322copy2_683 extends MovieClip {
public function Symbol322copy2_683(){
super();
addFrameScript(0, frame1, 1, frame2, 7, frame8);
}
function frame1(){
stop();
this.visible = false;
}
function frame8(){
stop();
}
function frame2(){
this.visible = true;
}
}
}//package AGL_fla
Section 153
//Symbol322copy3_685 (AGL_fla.Symbol322copy3_685)
package AGL_fla {
import flash.display.*;
public dynamic class Symbol322copy3_685 extends MovieClip {
public function Symbol322copy3_685(){
super();
addFrameScript(0, frame1, 1, frame2, 7, frame8);
}
function frame1(){
stop();
this.visible = false;
}
function frame8(){
stop();
}
function frame2(){
this.visible = true;
}
}
}//package AGL_fla
Section 154
//Symbol324_663 (AGL_fla.Symbol324_663)
package AGL_fla {
import flash.display.*;
public dynamic class Symbol324_663 extends MovieClip {
public var mc1:MovieClip;
public function Symbol324_663(){
super();
addFrameScript(0, frame1, 1, frame2, 9, frame10);
}
function frame10(){
stop();
}
function frame1(){
stop();
this.visible = false;
}
function frame2(){
this.visible = true;
}
}
}//package AGL_fla
Section 155
//Symbol325_664 (AGL_fla.Symbol325_664)
package AGL_fla {
import flash.display.*;
import flash.text.*;
public dynamic class Symbol325_664 extends MovieClip {
public var txt1:TextField;
public function Symbol325_664(){
super();
}
}
}//package AGL_fla
Section 156
//Symbol326_667 (AGL_fla.Symbol326_667)
package AGL_fla {
import flash.display.*;
public dynamic class Symbol326_667 extends MovieClip {
public var mc1:MovieClip;
public function Symbol326_667(){
super();
addFrameScript(0, frame1, 1, frame2, 7, frame8);
}
function frame1(){
stop();
this.visible = false;
}
function frame8(){
stop();
}
function frame2(){
this.visible = true;
}
}
}//package AGL_fla
Section 157
//Symbol326copy_679 (AGL_fla.Symbol326copy_679)
package AGL_fla {
import flash.display.*;
public dynamic class Symbol326copy_679 extends MovieClip {
public var mc1:MovieClip;
public function Symbol326copy_679(){
super();
addFrameScript(0, frame1, 1, frame2, 7, frame8);
}
function frame1(){
stop();
this.visible = false;
}
function frame8(){
stop();
}
function frame2(){
this.visible = true;
}
}
}//package AGL_fla
Section 158
//Symbol326name_292 (AGL_fla.Symbol326name_292)
package AGL_fla {
import flash.display.*;
import flash.text.*;
public dynamic class Symbol326name_292 extends MovieClip {
public var txt1:TextField;
public function Symbol326name_292(){
super();
}
}
}//package AGL_fla
Section 159
//Symbol327_668 (AGL_fla.Symbol327_668)
package AGL_fla {
import flash.display.*;
import flash.text.*;
public dynamic class Symbol327_668 extends MovieClip {
public var txt1:TextField;
public var txt2:TextField;
public function Symbol327_668(){
super();
addFrameScript(0, frame1);
}
function frame1(){
txt1.mouseEnabled = false;
txt2.mouseEnabled = false;
}
}
}//package AGL_fla
Section 160
//Symbol327copy_680 (AGL_fla.Symbol327copy_680)
package AGL_fla {
import flash.display.*;
import flash.text.*;
public dynamic class Symbol327copy_680 extends MovieClip {
public var txt1:TextField;
public function Symbol327copy_680(){
super();
addFrameScript(0, frame1);
}
function frame1(){
txt1.mouseEnabled = false;
}
}
}//package AGL_fla
Section 161
//Symbol327name_291 (AGL_fla.Symbol327name_291)
package AGL_fla {
import flash.display.*;
public dynamic class Symbol327name_291 extends MovieClip {
public var mc1:MovieClip;
public function Symbol327name_291(){
super();
addFrameScript(0, frame1, 1, frame2, 11, frame12);
}
function frame12(){
stop();
}
function frame1(){
stop();
this.visible = false;
}
function frame2(){
this.visible = true;
}
}
}//package AGL_fla
Section 162
//Symbol328_671 (AGL_fla.Symbol328_671)
package AGL_fla {
import flash.display.*;
public dynamic class Symbol328_671 extends MovieClip {
public var mc1:MovieClip;
public function Symbol328_671(){
super();
addFrameScript(0, frame1, 1, frame2, 8, frame9);
}
function frame1(){
stop();
this.visible = false;
}
function frame9(){
stop();
}
function frame2(){
this.visible = true;
}
}
}//package AGL_fla
Section 163
//Symbol329_672 (AGL_fla.Symbol329_672)
package AGL_fla {
import flash.display.*;
import flash.text.*;
public dynamic class Symbol329_672 extends MovieClip {
public var btnmin:SimpleButton;
public var txt1:TextField;
public var btnplus:SimpleButton;
public function Symbol329_672(){
super();
}
}
}//package AGL_fla
Section 164
//Symbol332_687 (AGL_fla.Symbol332_687)
package AGL_fla {
import flash.display.*;
import flash.text.*;
public dynamic class Symbol332_687 extends MovieClip {
public var txt1:TextField;
public function Symbol332_687(){
super();
}
}
}//package AGL_fla
Section 165
//Symbol337_676 (AGL_fla.Symbol337_676)
package AGL_fla {
import flash.display.*;
import flash.text.*;
public dynamic class Symbol337_676 extends MovieClip {
public var txt1:TextField;
public function Symbol337_676(){
super();
}
}
}//package AGL_fla
Section 166
//Symbol338_675 (AGL_fla.Symbol338_675)
package AGL_fla {
import flash.display.*;
public dynamic class Symbol338_675 extends MovieClip {
public var mc1:MovieClip;
public function Symbol338_675(){
super();
addFrameScript(0, frame1, 1, frame2, 9, frame10);
}
function frame10(){
stop();
}
function frame1(){
stop();
this.visible = false;
}
function frame2(){
this.visible = true;
}
}
}//package AGL_fla
Section 167
//Symbol340_132 (AGL_fla.Symbol340_132)
package AGL_fla {
import flash.display.*;
public dynamic class Symbol340_132 extends MovieClip {
public function Symbol340_132(){
super();
addFrameScript(0, frame1);
}
public function randRange(min:Number, max:Number):Number{
var randomNum:Number;
randomNum = (Math.floor((Math.random() * ((max - min) + 1))) + min);
return (randomNum);
}
function frame1(){
gotoAndStop(randRange(1, 2));
}
}
}//package AGL_fla
Section 168
//Symbol341_131 (AGL_fla.Symbol341_131)
package AGL_fla {
import flash.display.*;
public dynamic class Symbol341_131 extends MovieClip {
public function Symbol341_131(){
super();
addFrameScript(0, frame1, 68, frame69, 136, frame137);
}
public function randRange(min:Number, max:Number):Number{
var randomNum:Number;
randomNum = (Math.floor((Math.random() * ((max - min) + 1))) + min);
return (randomNum);
}
function frame1(){
gotoAndPlay(("go" + randRange(1, 2)));
}
function frame137(){
gotoAndPlay(2);
}
function frame69(){
gotoAndPlay(2);
}
}
}//package AGL_fla
Section 169
//Symbol350_498 (AGL_fla.Symbol350_498)
package AGL_fla {
import flash.display.*;
public dynamic class Symbol350_498 extends MovieClip {
public var btnlogo:MovieClip;
public var btnback:SimpleButton;
public var btnmenu:SimpleButton;
public function Symbol350_498(){
super();
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
this.visible = false;
}
function frame2(){
this.visible = true;
}
}
}//package AGL_fla
Section 170
//Symbol357_273 (AGL_fla.Symbol357_273)
package AGL_fla {
import flash.display.*;
import flash.text.*;
public dynamic class Symbol357_273 extends MovieClip {
public var btnok:SimpleButton;
public var txt1:TextField;
public var btneh:SimpleButton;
public function Symbol357_273(){
super();
}
}
}//package AGL_fla
Section 171
//Symbol36_306 (AGL_fla.Symbol36_306)
package AGL_fla {
import flash.display.*;
public dynamic class Symbol36_306 extends MovieClip {
public function Symbol36_306(){
super();
addFrameScript(0, frame1);
}
public function randRange(min:Number, max:Number):Number{
var randomNum:Number;
randomNum = (Math.floor((Math.random() * ((max - min) + 1))) + min);
return (randomNum);
}
function frame1(){
gotoAndStop(randRange(1, this.totalFrames));
}
}
}//package AGL_fla
Section 172
//Symbol365_391 (AGL_fla.Symbol365_391)
package AGL_fla {
import flash.display.*;
public dynamic class Symbol365_391 extends MovieClip {
public function Symbol365_391(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package AGL_fla
Section 173
//Symbol366_90 (AGL_fla.Symbol366_90)
package AGL_fla {
import flash.display.*;
public dynamic class Symbol366_90 extends MovieClip {
public function Symbol366_90(){
super();
addFrameScript(0, frame1, 1, frame2, 21, frame22);
}
function frame1(){
stop();
this.visible = false;
}
function frame22(){
gotoAndPlay(2);
}
function frame2(){
this.visible = true;
}
}
}//package AGL_fla
Section 174
//Symbol366copy_618 (AGL_fla.Symbol366copy_618)
package AGL_fla {
import flash.display.*;
public dynamic class Symbol366copy_618 extends MovieClip {
public function Symbol366copy_618(){
super();
addFrameScript(0, frame1);
}
function frame1(){
this.visible = true;
}
}
}//package AGL_fla
Section 175
//Symbol369_634 (AGL_fla.Symbol369_634)
package AGL_fla {
import flash.display.*;
public dynamic class Symbol369_634 extends MovieClip {
public function Symbol369_634(){
super();
addFrameScript(0, frame1, 1, frame2, 119, frame120);
}
function frame1(){
stop();
this.visible = false;
}
function frame2(){
this.visible = true;
}
function frame120(){
gotoAndPlay(2);
}
}
}//package AGL_fla
Section 176
//Symbol369copy_689 (AGL_fla.Symbol369copy_689)
package AGL_fla {
import flash.display.*;
public dynamic class Symbol369copy_689 extends MovieClip {
public function Symbol369copy_689(){
super();
addFrameScript(0, frame1, 118, frame119);
}
function frame1(){
this.visible = true;
}
function frame119(){
gotoAndPlay(2);
}
}
}//package AGL_fla
Section 177
//Symbol370_690 (AGL_fla.Symbol370_690)
package AGL_fla {
import flash.display.*;
public dynamic class Symbol370_690 extends MovieClip {
public var mctxt:MovieClip;
public var btnsubmit:SimpleButton;
public var mcfinal:MovieClip;
public function Symbol370_690(){
super();
addFrameScript(0, frame1, 1, frame2, 299, frame300);
}
function frame1(){
stop();
this.visible = false;
}
function frame2(){
this.visible = true;
}
function frame300(){
stop();
}
}
}//package AGL_fla
Section 178
//Symbol372_696 (AGL_fla.Symbol372_696)
package AGL_fla {
import flash.display.*;
import flash.text.*;
public dynamic class Symbol372_696 extends MovieClip {
public var txt1:TextField;
public function Symbol372_696(){
super();
}
}
}//package AGL_fla
Section 179
//Symbol379_691 (AGL_fla.Symbol379_691)
package AGL_fla {
import flash.display.*;
import flash.text.*;
public dynamic class Symbol379_691 extends MovieClip {
public var txt1:TextField;
public function Symbol379_691(){
super();
}
}
}//package AGL_fla
Section 180
//Symbol384_619 (AGL_fla.Symbol384_619)
package AGL_fla {
import flash.display.*;
public dynamic class Symbol384_619 extends MovieClip {
public var mcplate:MovieClip;
public function Symbol384_619(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package AGL_fla
Section 181
//Symbol386_576 (AGL_fla.Symbol386_576)
package AGL_fla {
import flash.display.*;
public dynamic class Symbol386_576 extends MovieClip {
public var mccloud:MovieClip;
public function Symbol386_576(){
super();
}
}
}//package AGL_fla
Section 182
//Symbol392_221 (AGL_fla.Symbol392_221)
package AGL_fla {
import flash.display.*;
public dynamic class Symbol392_221 extends MovieClip {
public function Symbol392_221(){
super();
addFrameScript(246, frame247);
}
function frame247(){
stop();
}
}
}//package AGL_fla
Section 183
//Symbol394_226 (AGL_fla.Symbol394_226)
package AGL_fla {
import flash.display.*;
public dynamic class Symbol394_226 extends MovieClip {
public function Symbol394_226(){
super();
addFrameScript(172, frame173);
}
function frame173(){
stop();
}
}
}//package AGL_fla
Section 184
//Symbol408_215 (AGL_fla.Symbol408_215)
package AGL_fla {
import flash.display.*;
public dynamic class Symbol408_215 extends MovieClip {
public function Symbol408_215(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package AGL_fla
Section 185
//Symbol409_551 (AGL_fla.Symbol409_551)
package AGL_fla {
import flash.display.*;
public dynamic class Symbol409_551 extends MovieClip {
public function Symbol409_551(){
super();
addFrameScript(0, frame1);
}
public function randRange(min:Number, max:Number):Number{
var randomNum:Number;
randomNum = (Math.floor((Math.random() * ((max - min) + 1))) + min);
return (randomNum);
}
function frame1(){
gotoAndStop(randRange(1, this.totalFrames));
}
}
}//package AGL_fla
Section 186
//Symbol41_313 (AGL_fla.Symbol41_313)
package AGL_fla {
import flash.display.*;
import flash.text.*;
public dynamic class Symbol41_313 extends MovieClip {
public var mcstat1:MovieClip;
public var mcstat3:MovieClip;
public var mcstat2:MovieClip;
public var mcapproved:MovieClip;
public var txt1:TextField;
public var txt2:TextField;
public var txt3:TextField;
public function Symbol41_313(){
super();
}
}
}//package AGL_fla
Section 187
//Symbol44_340 (AGL_fla.Symbol44_340)
package AGL_fla {
import flash.display.*;
public dynamic class Symbol44_340 extends MovieClip {
public var btnprev:SimpleButton;
public function Symbol44_340(){
super();
}
}
}//package AGL_fla
Section 188
//Symbol45_314 (AGL_fla.Symbol45_314)
package AGL_fla {
import flash.display.*;
import flash.text.*;
public dynamic class Symbol45_314 extends MovieClip {
public var mc1:MovieClip;
public var mc2:MovieClip;
public var txt1:TextField;
public function Symbol45_314(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
txt1.mouseEnabled = false;
}
}
}//package AGL_fla
Section 189
//Symbol458wewe_464 (AGL_fla.Symbol458wewe_464)
package AGL_fla {
import flash.display.*;
public dynamic class Symbol458wewe_464 extends MovieClip {
public function Symbol458wewe_464(){
super();
addFrameScript(0, frame1);
}
public function randRange(min:Number, max:Number):Number{
var randomNum:Number;
randomNum = (Math.floor((Math.random() * ((max - min) + 1))) + min);
return (randomNum);
}
function frame1(){
gotoAndStop(randRange(1, 2));
}
}
}//package AGL_fla
Section 190
//Symbol49_319 (AGL_fla.Symbol49_319)
package AGL_fla {
import flash.display.*;
import flash.text.*;
public dynamic class Symbol49_319 extends MovieClip {
public var mc1:MovieClip;
public var mc3:MovieClip;
public var mc2:MovieClip;
public var txt1:TextField;
public function Symbol49_319(){
super();
}
}
}//package AGL_fla
Section 191
//Symbol4copy2gdychild_711 (AGL_fla.Symbol4copy2gdychild_711)
package AGL_fla {
import flash.display.*;
public dynamic class Symbol4copy2gdychild_711 extends MovieClip {
public function Symbol4copy2gdychild_711(){
super();
addFrameScript(7, frame8);
}
function frame8(){
stop();
}
}
}//package AGL_fla
Section 192
//Symbol4copy3gdychild_714 (AGL_fla.Symbol4copy3gdychild_714)
package AGL_fla {
import flash.display.*;
public dynamic class Symbol4copy3gdychild_714 extends MovieClip {
public function Symbol4copy3gdychild_714(){
super();
addFrameScript(7, frame8);
}
function frame8(){
stop();
}
}
}//package AGL_fla
Section 193
//Symbol4copygdychild_708 (AGL_fla.Symbol4copygdychild_708)
package AGL_fla {
import flash.display.*;
public dynamic class Symbol4copygdychild_708 extends MovieClip {
public function Symbol4copygdychild_708(){
super();
addFrameScript(7, frame8);
}
function frame8(){
stop();
}
}
}//package AGL_fla
Section 194
//Symbol4gdychild_705 (AGL_fla.Symbol4gdychild_705)
package AGL_fla {
import flash.display.*;
public dynamic class Symbol4gdychild_705 extends MovieClip {
public function Symbol4gdychild_705(){
super();
addFrameScript(7, frame8);
}
function frame8(){
stop();
}
}
}//package AGL_fla
Section 195
//Symbol50_320 (AGL_fla.Symbol50_320)
package AGL_fla {
import flash.display.*;
public dynamic class Symbol50_320 extends MovieClip {
public var mc1:MovieClip;
public var mc2:MovieClip;
public var mcapproved:MovieClip;
public function Symbol50_320(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package AGL_fla
Section 196
//Symbol51_321 (AGL_fla.Symbol51_321)
package AGL_fla {
import flash.display.*;
import flash.text.*;
public dynamic class Symbol51_321 extends MovieClip {
public var mcprize:MovieClip;
public var mcprizetxt:MovieClip;
public var txt1:TextField;
public var txta:TextField;
public function Symbol51_321(){
super();
addFrameScript(0, frame1);
}
function frame1(){
txta.mouseEnabled = false;
txt1.mouseEnabled = false;
}
}
}//package AGL_fla
Section 197
//Symbol52_331 (AGL_fla.Symbol52_331)
package AGL_fla {
import flash.display.*;
public dynamic class Symbol52_331 extends MovieClip {
public var mc1:MovieClip;
public var mc2:MovieClip;
public var mcapproved:MovieClip;
public function Symbol52_331(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package AGL_fla
Section 198
//Symbol53_332 (AGL_fla.Symbol53_332)
package AGL_fla {
import flash.display.*;
import flash.text.*;
public dynamic class Symbol53_332 extends MovieClip {
public var mcprize:MovieClip;
public var mcprizetxt:MovieClip;
public var txt1:TextField;
public var txta:TextField;
public function Symbol53_332(){
super();
addFrameScript(0, frame1);
}
function frame1(){
txta.mouseEnabled = false;
txt1.mouseEnabled = false;
}
}
}//package AGL_fla
Section 199
//Symbol54_333 (AGL_fla.Symbol54_333)
package AGL_fla {
import flash.display.*;
public dynamic class Symbol54_333 extends MovieClip {
public var mc1:MovieClip;
public var mc2:MovieClip;
public var mcapproved:MovieClip;
public function Symbol54_333(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package AGL_fla
Section 200
//Symbol55_334 (AGL_fla.Symbol55_334)
package AGL_fla {
import flash.display.*;
import flash.text.*;
public dynamic class Symbol55_334 extends MovieClip {
public var mcprize:MovieClip;
public var mcprizetxt:MovieClip;
public var txt1:TextField;
public var txta:TextField;
public function Symbol55_334(){
super();
addFrameScript(0, frame1);
}
function frame1(){
txta.mouseEnabled = false;
txt1.mouseEnabled = false;
}
}
}//package AGL_fla
Section 201
//Symbol56_318 (AGL_fla.Symbol56_318)
package AGL_fla {
import flash.display.*;
public dynamic class Symbol56_318 extends MovieClip {
public function Symbol56_318(){
super();
addFrameScript(0, frame1, 1, frame2, 13, frame14);
}
function frame14(){
stop();
}
function frame1(){
stop();
this.visible = false;
this.mouseChildren = false;
this.mouseEnabled = false;
}
function frame2(){
this.visible = true;
this.mouseChildren = false;
this.mouseEnabled = false;
}
}
}//package AGL_fla
Section 202
//Symbol57_335 (AGL_fla.Symbol57_335)
package AGL_fla {
import flash.display.*;
import flash.text.*;
public dynamic class Symbol57_335 extends MovieClip {
public var btngood:SimpleButton;
public var mc1:MovieClip;
public var txt1:TextField;
public function Symbol57_335(){
super();
}
}
}//package AGL_fla
Section 203
//Symbol60_338 (AGL_fla.Symbol60_338)
package AGL_fla {
import flash.display.*;
public dynamic class Symbol60_338 extends MovieClip {
public var mc1:MovieClip;
public function Symbol60_338(){
super();
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
this.visible = false;
}
function frame2(){
this.visible = true;
}
}
}//package AGL_fla
Section 204
//Symbol61_339 (AGL_fla.Symbol61_339)
package AGL_fla {
import flash.display.*;
import flash.text.*;
public dynamic class Symbol61_339 extends MovieClip {
public var txt1:TextField;
public function Symbol61_339(){
super();
}
}
}//package AGL_fla
Section 205
//Symbol62_344 (AGL_fla.Symbol62_344)
package AGL_fla {
import flash.display.*;
public dynamic class Symbol62_344 extends MovieClip {
public var mccloud:MovieClip;
public var mccar2:MovieClip;
public var mccar1:MovieClip;
public var mclight1:MovieClip;
public var mclight2:MovieClip;
public function Symbol62_344(){
super();
addFrameScript(0, frame1, 20, frame21, 39, frame40);
}
function frame1(){
stop();
}
function frame21(){
stop();
}
function frame40(){
stop();
}
}
}//package AGL_fla
Section 206
//Symbol67_34 (AGL_fla.Symbol67_34)
package AGL_fla {
import flash.display.*;
public dynamic class Symbol67_34 extends MovieClip {
public var mc1:MovieClip;
public function Symbol67_34(){
super();
addFrameScript(0, frame1, 41, frame42, 121, frame122, 279, frame280);
}
function frame280(){
gotoAndStop(1);
}
public function randRange(min:Number, max:Number):Number{
var randomNum:Number;
randomNum = (Math.floor((Math.random() * ((max - min) + 1))) + min);
return (randomNum);
}
function frame1(){
mc1.gotoAndStop(randRange(0, mc1.totalFrames));
gotoAndPlay(("idle" + randRange(1, 3)));
}
function frame122(){
gotoAndStop(1);
}
function frame42(){
gotoAndStop(1);
}
}
}//package AGL_fla
Section 207
//Symbol71_50 (AGL_fla.Symbol71_50)
package AGL_fla {
import flash.display.*;
public dynamic class Symbol71_50 extends MovieClip {
public var mc1:MovieClip;
public function Symbol71_50(){
super();
addFrameScript(0, frame1, 23, frame24, 63, frame64, 162, frame163);
}
function frame64(){
gotoAndStop(1);
}
public function randRange(min:Number, max:Number):Number{
var randomNum:Number;
randomNum = (Math.floor((Math.random() * ((max - min) + 1))) + min);
return (randomNum);
}
function frame163(){
gotoAndStop(1);
}
function frame1(){
mc1.gotoAndStop(randRange(1, mc1.totalFrames));
gotoAndPlay(("idle" + randRange(1, 3)));
}
function frame24(){
gotoAndStop(1);
}
}
}//package AGL_fla
Section 208
//Symbol73_71 (AGL_fla.Symbol73_71)
package AGL_fla {
import flash.display.*;
public dynamic class Symbol73_71 extends MovieClip {
public var mc1:MovieClip;
public function Symbol73_71(){
super();
addFrameScript(0, frame1, 18, frame19);
}
public function randRange(min:Number, max:Number):Number{
var randomNum:Number;
randomNum = (Math.floor((Math.random() * ((max - min) + 1))) + min);
return (randomNum);
}
function frame1(){
mc1.gotoAndStop(randRange(1, mc1.totalFrames));
gotoAndPlay("idle");
}
function frame19(){
gotoAndStop(1);
}
}
}//package AGL_fla
Section 209
//Symbol76_127 (AGL_fla.Symbol76_127)
package AGL_fla {
import flash.display.*;
public dynamic class Symbol76_127 extends MovieClip {
public var rand;
public function Symbol76_127(){
super();
addFrameScript(0, frame1, 74, frame75, 149, frame150, 222, frame223);
}
function frame75(){
gotoAndStop(1);
}
public function randRange(min:Number, max:Number):Number{
var randomNum:Number;
randomNum = (Math.floor((Math.random() * ((max - min) + 1))) + min);
return (randomNum);
}
function frame223(){
gotoAndStop(1);
}
function frame1(){
gotoAndPlay(("go" + randRange(1, 3)));
rand = randRange(0, 1);
if (rand == 1){
this.scaleX = (this.scaleX * -1);
};
}
function frame150(){
gotoAndStop(1);
}
}
}//package AGL_fla
Section 210
//Symbol82_356 (AGL_fla.Symbol82_356)
package AGL_fla {
import flash.display.*;
public dynamic class Symbol82_356 extends MovieClip {
public var mc1:MovieClip;
public function Symbol82_356(){
super();
addFrameScript(0, frame1);
}
function frame1(){
mc1.mouseChildren = false;
mc1.mouseEnabled = false;
stop();
}
}
}//package AGL_fla
Section 211
//Symbol84_365 (AGL_fla.Symbol84_365)
package AGL_fla {
import flash.display.*;
import flash.text.*;
public dynamic class Symbol84_365 extends MovieClip {
public var mcpromo:MovieClip;
public var mc1:MovieClip;
public var mc3:MovieClip;
public var mc5:MovieClip;
public var mc2:MovieClip;
public var mc8:MovieClip;
public var mc4:MovieClip;
public var mc7:MovieClip;
public var mcframe:MovieClip;
public var mc6:MovieClip;
public var txt1:TextField;
public function Symbol84_365(){
super();
}
}
}//package AGL_fla
Section 212
//Symbol86_368 (AGL_fla.Symbol86_368)
package AGL_fla {
import flash.display.*;
public dynamic class Symbol86_368 extends MovieClip {
public function Symbol86_368(){
super();
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
this.visible = false;
}
function frame2(){
this.visible = true;
}
}
}//package AGL_fla
Section 213
//TEXT_199 (AGL_fla.TEXT_199)
package AGL_fla {
import flash.display.*;
import flash.text.*;
public dynamic class TEXT_199 extends MovieClip {
public var txt1:TextField;
public function TEXT_199(){
super();
addFrameScript(0, frame1, 12, frame13);
}
function frame1(){
txt1.mouseEnabled = false;
}
function frame13(){
stop();
}
}
}//package AGL_fla
Section 214
//TEXT2_526 (AGL_fla.TEXT2_526)
package AGL_fla {
import flash.display.*;
import flash.text.*;
public dynamic class TEXT2_526 extends MovieClip {
public var txt1:TextField;
public function TEXT2_526(){
super();
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
this.visible = false;
}
function frame2(){
this.visible = true;
}
}
}//package AGL_fla
Section 215
//TEXT3_590 (AGL_fla.TEXT3_590)
package AGL_fla {
import flash.display.*;
import flash.text.*;
public dynamic class TEXT3_590 extends MovieClip {
public var txt1:TextField;
public function TEXT3_590(){
super();
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
this.visible = false;
}
function frame2(){
this.visible = true;
}
}
}//package AGL_fla
Section 216
//TEXTSTORY_309 (AGL_fla.TEXTSTORY_309)
package AGL_fla {
import flash.display.*;
import flash.text.*;
public dynamic class TEXTSTORY_309 extends MovieClip {
public var txt1:TextField;
public function TEXTSTORY_309(){
super();
addFrameScript(0, frame1, 12, frame13);
}
function frame1(){
txt1.mouseEnabled = false;
}
function frame13(){
stop();
}
}
}//package AGL_fla
Section 217
//TRANSISI_305 (AGL_fla.TRANSISI_305)
package AGL_fla {
import flash.display.*;
public dynamic class TRANSISI_305 extends MovieClip {
public function TRANSISI_305(){
super();
addFrameScript(0, frame1, 1, frame2, 23, frame24);
}
function frame1(){
stop();
this.visible = false;
}
function frame24(){
stop();
}
function frame2(){
this.visible = true;
}
}
}//package AGL_fla
Section 218
//VISIBLER_9 (AGL_fla.VISIBLER_9)
package AGL_fla {
import flash.display.*;
public dynamic class VISIBLER_9 extends MovieClip {
public function VISIBLER_9(){
super();
addFrameScript(0, frame1);
}
function frame1(){
this.visible = false;
}
}
}//package AGL_fla
Section 219
//VISIBLERyoyo_11 (AGL_fla.VISIBLERyoyo_11)
package AGL_fla {
import flash.display.*;
public dynamic class VISIBLERyoyo_11 extends MovieClip {
public function VISIBLERyoyo_11(){
super();
addFrameScript(0, frame1);
}
function frame1(){
this.visible = false;
}
}
}//package AGL_fla
Section 220
//Color (fl.motion.Color)
package fl.motion {
import flash.geom.*;
import flash.display.*;
public class Color extends ColorTransform {
private var _tintMultiplier:Number;// = 0
private var _tintColor:Number;// = 0
public function Color(redMultiplier:Number=1, greenMultiplier:Number=1, blueMultiplier:Number=1, alphaMultiplier:Number=1, redOffset:Number=0, greenOffset:Number=0, blueOffset:Number=0, alphaOffset:Number=0){
_tintColor = 0;
_tintMultiplier = 0;
super(redMultiplier, greenMultiplier, blueMultiplier, alphaMultiplier, redOffset, greenOffset, blueOffset, alphaOffset);
}
public function setTint(tintColor:uint, tintMultiplier:Number):void{
var r:uint;
var g:uint;
var b:uint;
this._tintColor = tintColor;
this._tintMultiplier = tintMultiplier;
this.redMultiplier = (this.greenMultiplier = (this.blueMultiplier = (1 - tintMultiplier)));
r = ((tintColor >> 16) & 0xFF);
g = ((tintColor >> 8) & 0xFF);
b = (tintColor & 0xFF);
this.redOffset = Math.round((r * tintMultiplier));
this.greenOffset = Math.round((g * tintMultiplier));
this.blueOffset = Math.round((b * tintMultiplier));
}
public function set tintColor(value:uint):void{
this.setTint(value, this.tintMultiplier);
}
public function get brightness():Number{
return ((this.redOffset) ? (1 - this.redMultiplier) : (this.redMultiplier - 1));
}
private function deriveTintColor():uint{
var ratio:Number;
var r:uint;
var g:uint;
var b:uint;
var colorNum:uint;
ratio = (1 / this.tintMultiplier);
r = Math.round((this.redOffset * ratio));
g = Math.round((this.greenOffset * ratio));
b = Math.round((this.blueOffset * ratio));
colorNum = (((r << 16) | (g << 8)) | b);
return (colorNum);
}
public function get tintMultiplier():Number{
return (this._tintMultiplier);
}
public function get tintColor():uint{
return (this._tintColor);
}
public function set brightness(value:Number):void{
var percent:Number;
var offset:Number;
if (value > 1){
value = 1;
} else {
if (value < -1){
value = -1;
};
};
percent = (1 - Math.abs(value));
offset = 0;
if (value > 0){
offset = (value * 0xFF);
};
this.redMultiplier = (this.greenMultiplier = (this.blueMultiplier = percent));
this.redOffset = (this.greenOffset = (this.blueOffset = offset));
}
public function set tintMultiplier(value:Number):void{
this.setTint(this.tintColor, value);
}
private function parseXML(xml:XML=null):Color{
var firstChild:XML;
var att:XML;
var name:String;
var tintColorNumber:uint;
if (!xml){
return (this);
};
firstChild = xml.elements()[0];
if (!firstChild){
return (this);
};
for each (att in firstChild.attributes()) {
name = att.localName();
if (name == "tintColor"){
tintColorNumber = (Number(att.toString()) as uint);
this.tintColor = tintColorNumber;
} else {
this[name] = Number(att.toString());
};
};
return (this);
}
public static function interpolateColor(fromColor:uint, toColor:uint, progress:Number):uint{
var q:Number;
var fromA:uint;
var fromR:uint;
var fromG:uint;
var fromB:uint;
var toA:uint;
var toR:uint;
var toG:uint;
var toB:uint;
var resultA:uint;
var resultR:uint;
var resultG:uint;
var resultB:uint;
var resultColor:uint;
q = (1 - progress);
fromA = ((fromColor >> 24) & 0xFF);
fromR = ((fromColor >> 16) & 0xFF);
fromG = ((fromColor >> 8) & 0xFF);
fromB = (fromColor & 0xFF);
toA = ((toColor >> 24) & 0xFF);
toR = ((toColor >> 16) & 0xFF);
toG = ((toColor >> 8) & 0xFF);
toB = (toColor & 0xFF);
resultA = ((fromA * q) + (toA * progress));
resultR = ((fromR * q) + (toR * progress));
resultG = ((fromG * q) + (toG * progress));
resultB = ((fromB * q) + (toB * progress));
resultColor = ((((resultA << 24) | (resultR << 16)) | (resultG << 8)) | resultB);
return (resultColor);
}
public static function interpolateTransform(fromColor:ColorTransform, toColor:ColorTransform, progress:Number):ColorTransform{
var q:Number;
var resultColor:ColorTransform;
q = (1 - progress);
resultColor = new ColorTransform(((fromColor.redMultiplier * q) + (toColor.redMultiplier * progress)), ((fromColor.greenMultiplier * q) + (toColor.greenMultiplier * progress)), ((fromColor.blueMultiplier * q) + (toColor.blueMultiplier * progress)), ((fromColor.alphaMultiplier * q) + (toColor.alphaMultiplier * progress)), ((fromColor.redOffset * q) + (toColor.redOffset * progress)), ((fromColor.greenOffset * q) + (toColor.greenOffset * progress)), ((fromColor.blueOffset * q) + (toColor.blueOffset * progress)), ((fromColor.alphaOffset * q) + (toColor.alphaOffset * progress)));
return (resultColor);
}
public static function fromXML(xml:XML):Color{
return (Color(new (Color).parseXML(xml)));
}
}
}//package fl.motion
Section 221
//asd (asd)
package {
import flash.display.*;
public dynamic class asd extends MovieClip {
public var mc1:MovieClip;
public var mc2:MovieClip;
public function asd(){
super();
}
}
}//package
Section 222
//asd2 (asd2)
package {
import flash.display.*;
public dynamic class asd2 extends MovieClip {
public var mc1:MovieClip;
public var mc2:MovieClip;
public function asd2(){
super();
}
}
}//package
Section 223
//asd3 (asd3)
package {
import flash.display.*;
public dynamic class asd3 extends MovieClip {
public var mc1:MovieClip;
public var mc2:MovieClip;
public function asd3(){
super();
}
}
}//package
Section 224
//asd4 (asd4)
package {
import flash.display.*;
public dynamic class asd4 extends MovieClip {
public var mc1:MovieClip;
public var mc2:MovieClip;
public function asd4(){
super();
}
}
}//package
Section 225
//bathsound (bathsound)
package {
import flash.media.*;
public dynamic class bathsound extends Sound {
public function bathsound(){
super();
}
}
}//package
Section 226
//buttonsound (buttonsound)
package {
import flash.media.*;
public dynamic class buttonsound extends Sound {
public function buttonsound(){
super();
}
}
}//package
Section 227
//char1 (char1)
package {
import flash.display.*;
public dynamic class char1 extends MovieClip {
public var mcstink:MovieClip;
public var mc1:MovieClip;
public function char1(){
super();
}
}
}//package
Section 228
//char2 (char2)
package {
import flash.display.*;
public dynamic class char2 extends MovieClip {
public var mc1:MovieClip;
public function char2(){
super();
}
}
}//package
Section 229
//chewingsound (chewingsound)
package {
import flash.media.*;
public dynamic class chewingsound extends Sound {
public function chewingsound(){
super();
}
}
}//package
Section 230
//cleanuptrashsound (cleanuptrashsound)
package {
import flash.media.*;
public dynamic class cleanuptrashsound extends Sound {
public function cleanuptrashsound(){
super();
}
}
}//package
Section 231
//clocksound (clocksound)
package {
import flash.media.*;
public dynamic class clocksound extends Sound {
public function clocksound(){
super();
}
}
}//package
Section 232
//coinsound (coinsound)
package {
import flash.media.*;
public dynamic class coinsound extends Sound {
public function coinsound(){
super();
}
}
}//package
Section 233
//cooksound (cooksound)
package {
import flash.media.*;
public dynamic class cooksound extends Sound {
public function cooksound(){
super();
}
}
}//package
Section 234
//cricketsound (cricketsound)
package {
import flash.media.*;
public dynamic class cricketsound extends Sound {
public function cricketsound(){
super();
}
}
}//package
Section 235
//depositsound (depositsound)
package {
import flash.media.*;
public dynamic class depositsound extends Sound {
public function depositsound(){
super();
}
}
}//package
Section 236
//desirecompletedsound (desirecompletedsound)
package {
import flash.media.*;
public dynamic class desirecompletedsound extends Sound {
public function desirecompletedsound(){
super();
}
}
}//package
Section 237
//distantbirdsound1 (distantbirdsound1)
package {
import flash.media.*;
public dynamic class distantbirdsound1 extends Sound {
public function distantbirdsound1(){
super();
}
}
}//package
Section 238
//distantbirdsound2 (distantbirdsound2)
package {
import flash.media.*;
public dynamic class distantbirdsound2 extends Sound {
public function distantbirdsound2(){
super();
}
}
}//package
Section 239
//doneresultsound (doneresultsound)
package {
import flash.media.*;
public dynamic class doneresultsound extends Sound {
public function doneresultsound(){
super();
}
}
}//package
Section 240
//doorclosesound (doorclosesound)
package {
import flash.media.*;
public dynamic class doorclosesound extends Sound {
public function doorclosesound(){
super();
}
}
}//package
Section 241
//fallsound (fallsound)
package {
import flash.media.*;
public dynamic class fallsound extends Sound {
public function fallsound(){
super();
}
}
}//package
Section 242
//flushsound (flushsound)
package {
import flash.media.*;
public dynamic class flushsound extends Sound {
public function flushsound(){
super();
}
}
}//package
Section 243
//flutesound1 (flutesound1)
package {
import flash.media.*;
public dynamic class flutesound1 extends Sound {
public function flutesound1(){
super();
}
}
}//package
Section 244
//flutesound2 (flutesound2)
package {
import flash.media.*;
public dynamic class flutesound2 extends Sound {
public function flutesound2(){
super();
}
}
}//package
Section 245
//flutesound22 (flutesound22)
package {
import flash.media.*;
public dynamic class flutesound22 extends Sound {
public function flutesound22(){
super();
}
}
}//package
Section 246
//flutesound3 (flutesound3)
package {
import flash.media.*;
public dynamic class flutesound3 extends Sound {
public function flutesound3(){
super();
}
}
}//package
Section 247
//fxstarbig (fxstarbig)
package {
import flash.display.*;
public dynamic class fxstarbig extends MovieClip {
public function fxstarbig(){
super();
addFrameScript(70, frame71);
}
function frame71(){
stop();
}
}
}//package
Section 248
//gainpointsound (gainpointsound)
package {
import flash.media.*;
public dynamic class gainpointsound extends Sound {
public function gainpointsound(){
super();
}
}
}//package
Section 249
//gamesound1 (gamesound1)
package {
import flash.media.*;
public dynamic class gamesound1 extends Sound {
public function gamesound1(){
super();
}
}
}//package
Section 250
//gamesound2 (gamesound2)
package {
import flash.media.*;
public dynamic class gamesound2 extends Sound {
public function gamesound2(){
super();
}
}
}//package
Section 251
//gamesound3 (gamesound3)
package {
import flash.media.*;
public dynamic class gamesound3 extends Sound {
public function gamesound3(){
super();
}
}
}//package
Section 252
//ingamecoin (ingamecoin)
package {
import flash.display.*;
public dynamic class ingamecoin extends MovieClip {
public function ingamecoin(){
super();
addFrameScript(15, frame16);
}
function frame16(){
stop();
}
}
}//package
Section 253
//ingamerain (ingamerain)
package {
import flash.display.*;
public dynamic class ingamerain extends MovieClip {
public var mchit:MovieClip;
public function ingamerain(){
super();
addFrameScript(35, frame36);
}
function frame36(){
stop();
}
}
}//package
Section 254
//ingamesound1 (ingamesound1)
package {
import flash.media.*;
public dynamic class ingamesound1 extends Sound {
public function ingamesound1(){
super();
}
}
}//package
Section 255
//ingamesound2 (ingamesound2)
package {
import flash.media.*;
public dynamic class ingamesound2 extends Sound {
public function ingamesound2(){
super();
}
}
}//package
Section 256
//ingameuipopup (ingameuipopup)
package {
import flash.display.*;
import flash.text.*;
public dynamic class ingameuipopup extends MovieClip {
public var mcicon:MovieClip;
public var mctip:MovieClip;
public var mcmask:MovieClip;
public var txt1:TextField;
public var txt2:TextField;
public function ingameuipopup(){
super();
addFrameScript(0, frame1);
}
function frame1(){
txt1.mouseEnabled = false;
txt2.mouseEnabled = false;
mctip.mouseEnabled = false;
mctip.mouseChildren = false;
}
}
}//package
Section 257
//item101 (item101)
package {
import flash.display.*;
public dynamic class item101 extends MovieClip {
public var mcbroken:MovieClip;
public function item101(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 258
//item102 (item102)
package {
import flash.display.*;
public dynamic class item102 extends MovieClip {
public var mcbroken:MovieClip;
public function item102(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 259
//item103 (item103)
package {
import flash.display.*;
public dynamic class item103 extends MovieClip {
public var mcbroken:MovieClip;
public function item103(){
super();
}
}
}//package
Section 260
//item104 (item104)
package {
import flash.display.*;
public dynamic class item104 extends MovieClip {
public var mcbroken:MovieClip;
public function item104(){
super();
}
}
}//package
Section 261
//item11 (item11)
package {
import flash.display.*;
public dynamic class item11 extends MovieClip {
public var mcbroken:MovieClip;
public function item11(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 262
//item111 (item111)
package {
import flash.display.*;
public dynamic class item111 extends MovieClip {
public var mcbroken:MovieClip;
public var mcstink:MovieClip;
public function item111(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 263
//item12 (item12)
package {
import flash.display.*;
public dynamic class item12 extends MovieClip {
public var mcbroken:MovieClip;
public function item12(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 264
//item121 (item121)
package {
import flash.display.*;
public dynamic class item121 extends MovieClip {
public var mcbroken:MovieClip;
public var mcstink:MovieClip;
public function item121(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 265
//item13 (item13)
package {
import flash.display.*;
public dynamic class item13 extends MovieClip {
public var mcbroken:MovieClip;
public function item13(){
super();
}
}
}//package
Section 266
//item131 (item131)
package {
import flash.display.*;
public dynamic class item131 extends MovieClip {
public var mcbroken:MovieClip;
public var mcstink:MovieClip;
public function item131(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 267
//item132 (item132)
package {
import flash.display.*;
public dynamic class item132 extends MovieClip {
public var mcbroken:MovieClip;
public var mcstink:MovieClip;
public function item132(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 268
//item14 (item14)
package {
import flash.display.*;
public dynamic class item14 extends MovieClip {
public var mcbroken:MovieClip;
public function item14(){
super();
}
}
}//package
Section 269
//item141 (item141)
package {
import flash.display.*;
public dynamic class item141 extends MovieClip {
public var mcbroken:MovieClip;
public var mcstink:MovieClip;
public function item141(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 270
//item142 (item142)
package {
import flash.display.*;
public dynamic class item142 extends MovieClip {
public var mcbroken:MovieClip;
public var mcstink:MovieClip;
public function item142(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 271
//item151 (item151)
package {
import flash.display.*;
public dynamic class item151 extends MovieClip {
public var mcbroken:MovieClip;
public var mcstink:MovieClip;
public function item151(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 272
//item152 (item152)
package {
import flash.display.*;
public dynamic class item152 extends MovieClip {
public var mcbroken:MovieClip;
public var mcstink:MovieClip;
public function item152(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 273
//item161 (item161)
package {
import flash.display.*;
public dynamic class item161 extends MovieClip {
public function item161(){
super();
}
}
}//package
Section 274
//item162 (item162)
package {
import flash.display.*;
public dynamic class item162 extends MovieClip {
public function item162(){
super();
}
}
}//package
Section 275
//item171 (item171)
package {
import flash.display.*;
public dynamic class item171 extends MovieClip {
public function item171(){
super();
}
}
}//package
Section 276
//item172 (item172)
package {
import flash.display.*;
public dynamic class item172 extends MovieClip {
public function item172(){
super();
}
}
}//package
Section 277
//item181 (item181)
package {
import flash.display.*;
public dynamic class item181 extends MovieClip {
public var mcbroken:MovieClip;
public function item181(){
super();
}
}
}//package
Section 278
//item191 (item191)
package {
import flash.display.*;
public dynamic class item191 extends MovieClip {
public var mcbroken:MovieClip;
public function item191(){
super();
}
}
}//package
Section 279
//item201 (item201)
package {
import flash.display.*;
public dynamic class item201 extends MovieClip {
public var mcbroken:MovieClip;
public var mckettle:MovieClip;
public function item201(){
super();
}
}
}//package
Section 280
//item202 (item202)
package {
import flash.display.*;
public dynamic class item202 extends MovieClip {
public var mcbroken:MovieClip;
public var mckettle:MovieClip;
public function item202(){
super();
}
}
}//package
Section 281
//item203 (item203)
package {
import flash.display.*;
public dynamic class item203 extends MovieClip {
public var mcbroken:MovieClip;
public var mckettle:MovieClip;
public function item203(){
super();
}
}
}//package
Section 282
//item204 (item204)
package {
import flash.display.*;
public dynamic class item204 extends MovieClip {
public var mcbroken:MovieClip;
public var mckettle:MovieClip;
public function item204(){
super();
}
}
}//package
Section 283
//item21 (item21)
package {
import flash.display.*;
public dynamic class item21 extends MovieClip {
public var mcbroken:MovieClip;
public function item21(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 284
//item211 (item211)
package {
import flash.display.*;
public dynamic class item211 extends MovieClip {
public var mcbroken:MovieClip;
public var mckettle:MovieClip;
public function item211(){
super();
}
}
}//package
Section 285
//item212 (item212)
package {
import flash.display.*;
public dynamic class item212 extends MovieClip {
public var mcbroken:MovieClip;
public var mckettle:MovieClip;
public function item212(){
super();
}
}
}//package
Section 286
//item213 (item213)
package {
import flash.display.*;
public dynamic class item213 extends MovieClip {
public var mcbroken:MovieClip;
public var mckettle:MovieClip;
public function item213(){
super();
}
}
}//package
Section 287
//item214 (item214)
package {
import flash.display.*;
public dynamic class item214 extends MovieClip {
public var mcbroken:MovieClip;
public var mckettle:MovieClip;
public function item214(){
super();
}
}
}//package
Section 288
//item22 (item22)
package {
import flash.display.*;
public dynamic class item22 extends MovieClip {
public var mcbroken:MovieClip;
public function item22(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 289
//item221 (item221)
package {
import flash.display.*;
public dynamic class item221 extends MovieClip {
public function item221(){
super();
}
}
}//package
Section 290
//item23 (item23)
package {
import flash.display.*;
public dynamic class item23 extends MovieClip {
public var mcbroken:MovieClip;
public function item23(){
super();
}
}
}//package
Section 291
//item231 (item231)
package {
import flash.display.*;
public dynamic class item231 extends MovieClip {
public function item231(){
super();
}
}
}//package
Section 292
//item24 (item24)
package {
import flash.display.*;
public dynamic class item24 extends MovieClip {
public var mcbroken:MovieClip;
public function item24(){
super();
}
}
}//package
Section 293
//item241 (item241)
package {
import flash.display.*;
public dynamic class item241 extends MovieClip {
public function item241(){
super();
}
}
}//package
Section 294
//item251 (item251)
package {
import flash.display.*;
public dynamic class item251 extends MovieClip {
public function item251(){
super();
}
}
}//package
Section 295
//item261 (item261)
package {
import flash.display.*;
public dynamic class item261 extends MovieClip {
public var mcfly:MovieClip;
public function item261(){
super();
}
}
}//package
Section 296
//item271 (item271)
package {
import flash.display.*;
public dynamic class item271 extends MovieClip {
public function item271(){
super();
}
}
}//package
Section 297
//item281 (item281)
package {
import flash.display.*;
public dynamic class item281 extends MovieClip {
public function item281(){
super();
}
}
}//package
Section 298
//item291 (item291)
package {
import flash.display.*;
public dynamic class item291 extends MovieClip {
public function item291(){
super();
}
}
}//package
Section 299
//item301 (item301)
package {
import flash.display.*;
public dynamic class item301 extends MovieClip {
public function item301(){
super();
}
}
}//package
Section 300
//item31 (item31)
package {
import flash.display.*;
public dynamic class item31 extends MovieClip {
public function item31(){
super();
addFrameScript(0, frame1, 99, frame100);
}
function frame1(){
stop();
}
function frame100(){
gotoAndPlay(2);
}
}
}//package
Section 301
//item311 (item311)
package {
import flash.display.*;
public dynamic class item311 extends MovieClip {
public function item311(){
super();
}
}
}//package
Section 302
//item321 (item321)
package {
import flash.display.*;
public dynamic class item321 extends MovieClip {
public function item321(){
super();
}
}
}//package
Section 303
//item331 (item331)
package {
import flash.display.*;
public dynamic class item331 extends MovieClip {
public function item331(){
super();
}
}
}//package
Section 304
//item341 (item341)
package {
import flash.display.*;
public dynamic class item341 extends MovieClip {
public function item341(){
super();
}
}
}//package
Section 305
//item351 (item351)
package {
import flash.display.*;
public dynamic class item351 extends MovieClip {
public function item351(){
super();
}
}
}//package
Section 306
//item352 (item352)
package {
import flash.display.*;
public dynamic class item352 extends MovieClip {
public function item352(){
super();
}
}
}//package
Section 307
//item361 (item361)
package {
import flash.display.*;
public dynamic class item361 extends MovieClip {
public function item361(){
super();
}
}
}//package
Section 308
//item362 (item362)
package {
import flash.display.*;
public dynamic class item362 extends MovieClip {
public function item362(){
super();
}
}
}//package
Section 309
//item371 (item371)
package {
import flash.display.*;
public dynamic class item371 extends MovieClip {
public function item371(){
super();
}
}
}//package
Section 310
//item372 (item372)
package {
import flash.display.*;
public dynamic class item372 extends MovieClip {
public function item372(){
super();
}
}
}//package
Section 311
//item381 (item381)
package {
import flash.display.*;
public dynamic class item381 extends MovieClip {
public function item381(){
super();
}
}
}//package
Section 312
//item382 (item382)
package {
import flash.display.*;
public dynamic class item382 extends MovieClip {
public function item382(){
super();
}
}
}//package
Section 313
//item391 (item391)
package {
import flash.display.*;
public dynamic class item391 extends MovieClip {
public function item391(){
super();
}
}
}//package
Section 314
//item392 (item392)
package {
import flash.display.*;
public dynamic class item392 extends MovieClip {
public function item392(){
super();
}
}
}//package
Section 315
//item401 (item401)
package {
import flash.display.*;
public dynamic class item401 extends MovieClip {
public function item401(){
super();
}
}
}//package
Section 316
//item402 (item402)
package {
import flash.display.*;
public dynamic class item402 extends MovieClip {
public function item402(){
super();
}
}
}//package
Section 317
//item41 (item41)
package {
import flash.display.*;
public dynamic class item41 extends MovieClip {
public function item41(){
super();
}
}
}//package
Section 318
//item411 (item411)
package {
import flash.display.*;
public dynamic class item411 extends MovieClip {
public function item411(){
super();
}
}
}//package
Section 319
//item412 (item412)
package {
import flash.display.*;
public dynamic class item412 extends MovieClip {
public function item412(){
super();
}
}
}//package
Section 320
//item421 (item421)
package {
import flash.display.*;
public dynamic class item421 extends MovieClip {
public function item421(){
super();
}
}
}//package
Section 321
//item422 (item422)
package {
import flash.display.*;
public dynamic class item422 extends MovieClip {
public function item422(){
super();
}
}
}//package
Section 322
//item431 (item431)
package {
import flash.display.*;
public dynamic class item431 extends MovieClip {
public function item431(){
super();
}
}
}//package
Section 323
//item441 (item441)
package {
import flash.display.*;
public dynamic class item441 extends MovieClip {
public function item441(){
super();
}
}
}//package
Section 324
//item451 (item451)
package {
import flash.display.*;
public dynamic class item451 extends MovieClip {
public function item451(){
super();
}
}
}//package
Section 325
//item461 (item461)
package {
import flash.display.*;
public dynamic class item461 extends MovieClip {
public var mcbroken:MovieClip;
public function item461(){
super();
}
}
}//package
Section 326
//item471 (item471)
package {
import flash.display.*;
public dynamic class item471 extends MovieClip {
public function item471(){
super();
}
}
}//package
Section 327
//item481 (item481)
package {
import flash.display.*;
public dynamic class item481 extends MovieClip {
public var mcbroken:MovieClip;
public var mcstink:MovieClip;
public function item481(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 328
//item482 (item482)
package {
import flash.display.*;
public dynamic class item482 extends MovieClip {
public var mcbroken:MovieClip;
public var mcstink:MovieClip;
public function item482(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 329
//item483 (item483)
package {
import flash.display.*;
public dynamic class item483 extends MovieClip {
public var mcbroken:MovieClip;
public var mcstink:MovieClip;
public function item483(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 330
//item484 (item484)
package {
import flash.display.*;
public dynamic class item484 extends MovieClip {
public var mcbroken:MovieClip;
public var mcstink:MovieClip;
public function item484(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 331
//item491 (item491)
package {
import flash.display.*;
public dynamic class item491 extends MovieClip {
public var mcstink:MovieClip;
public function item491(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 332
//item492 (item492)
package {
import flash.display.*;
public dynamic class item492 extends MovieClip {
public var mcstink:MovieClip;
public function item492(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 333
//item501 (item501)
package {
import flash.display.*;
public dynamic class item501 extends MovieClip {
public var mcstink:MovieClip;
public function item501(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 334
//item51 (item51)
package {
import flash.display.*;
public dynamic class item51 extends MovieClip {
public function item51(){
super();
}
}
}//package
Section 335
//item511 (item511)
package {
import flash.display.*;
public dynamic class item511 extends MovieClip {
public var mcbroken:MovieClip;
public var mcstink:MovieClip;
public function item511(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 336
//item512 (item512)
package {
import flash.display.*;
public dynamic class item512 extends MovieClip {
public var mcbroken:MovieClip;
public var mcstink:MovieClip;
public function item512(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 337
//item521 (item521)
package {
import flash.display.*;
public dynamic class item521 extends MovieClip {
public var mcplate1:MovieClip;
public var mcplate2:MovieClip;
public function item521(){
super();
}
}
}//package
Section 338
//item522 (item522)
package {
import flash.display.*;
public dynamic class item522 extends MovieClip {
public var mcplate1:MovieClip;
public var mcplate2:MovieClip;
public function item522(){
super();
}
}
}//package
Section 339
//item531 (item531)
package {
import flash.display.*;
public dynamic class item531 extends MovieClip {
public var mcplate1:MovieClip;
public var mcplate2:MovieClip;
public function item531(){
super();
}
}
}//package
Section 340
//item532 (item532)
package {
import flash.display.*;
public dynamic class item532 extends MovieClip {
public var mcplate1:MovieClip;
public var mcplate2:MovieClip;
public function item532(){
super();
}
}
}//package
Section 341
//item541 (item541)
package {
import flash.display.*;
public dynamic class item541 extends MovieClip {
public var mcplate1:MovieClip;
public var mcplate2:MovieClip;
public function item541(){
super();
}
}
}//package
Section 342
//item542 (item542)
package {
import flash.display.*;
public dynamic class item542 extends MovieClip {
public var mcplate1:MovieClip;
public var mcplate2:MovieClip;
public function item542(){
super();
}
}
}//package
Section 343
//item551 (item551)
package {
import flash.display.*;
public dynamic class item551 extends MovieClip {
public var mcplate1:MovieClip;
public var mcplate2:MovieClip;
public function item551(){
super();
}
}
}//package
Section 344
//item552 (item552)
package {
import flash.display.*;
public dynamic class item552 extends MovieClip {
public var mcplate1:MovieClip;
public var mcplate2:MovieClip;
public function item552(){
super();
}
}
}//package
Section 345
//item561 (item561)
package {
import flash.display.*;
public dynamic class item561 extends MovieClip {
public var mcplate1:MovieClip;
public var mcplate2:MovieClip;
public function item561(){
super();
}
}
}//package
Section 346
//item562 (item562)
package {
import flash.display.*;
public dynamic class item562 extends MovieClip {
public var mcplate1:MovieClip;
public var mcplate2:MovieClip;
public function item562(){
super();
}
}
}//package
Section 347
//item571 (item571)
package {
import flash.display.*;
public dynamic class item571 extends MovieClip {
public var mcplate1:MovieClip;
public var mcplate2:MovieClip;
public function item571(){
super();
}
}
}//package
Section 348
//item572 (item572)
package {
import flash.display.*;
public dynamic class item572 extends MovieClip {
public var mcplate1:MovieClip;
public var mcplate2:MovieClip;
public function item572(){
super();
}
}
}//package
Section 349
//item581 (item581)
package {
import flash.display.*;
public dynamic class item581 extends MovieClip {
public var mcplate1:MovieClip;
public var mcplate2:MovieClip;
public function item581(){
super();
}
}
}//package
Section 350
//item582 (item582)
package {
import flash.display.*;
public dynamic class item582 extends MovieClip {
public var mcplate1:MovieClip;
public var mcplate2:MovieClip;
public function item582(){
super();
}
}
}//package
Section 351
//item591 (item591)
package {
import flash.display.*;
public dynamic class item591 extends MovieClip {
public var mcstink:MovieClip;
public function item591(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 352
//item592 (item592)
package {
import flash.display.*;
public dynamic class item592 extends MovieClip {
public var mcstink:MovieClip;
public function item592(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 353
//item593 (item593)
package {
import flash.display.*;
public dynamic class item593 extends MovieClip {
public var mcstink:MovieClip;
public function item593(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 354
//item594 (item594)
package {
import flash.display.*;
public dynamic class item594 extends MovieClip {
public var mcstink:MovieClip;
public function item594(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 355
//item601 (item601)
package {
import flash.display.*;
public dynamic class item601 extends MovieClip {
public var mcstink:MovieClip;
public function item601(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 356
//item602 (item602)
package {
import flash.display.*;
public dynamic class item602 extends MovieClip {
public var mcstink:MovieClip;
public function item602(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 357
//item603 (item603)
package {
import flash.display.*;
public dynamic class item603 extends MovieClip {
public var mcstink:MovieClip;
public function item603(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 358
//item604 (item604)
package {
import flash.display.*;
public dynamic class item604 extends MovieClip {
public var mcstink:MovieClip;
public function item604(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 359
//item61 (item61)
package {
import flash.display.*;
public dynamic class item61 extends MovieClip {
public function item61(){
super();
}
}
}//package
Section 360
//item611 (item611)
package {
import flash.display.*;
public dynamic class item611 extends MovieClip {
public var mcstink:MovieClip;
public function item611(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 361
//item612 (item612)
package {
import flash.display.*;
public dynamic class item612 extends MovieClip {
public var mcstink:MovieClip;
public function item612(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 362
//item613 (item613)
package {
import flash.display.*;
public dynamic class item613 extends MovieClip {
public var mcstink:MovieClip;
public function item613(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 363
//item614 (item614)
package {
import flash.display.*;
public dynamic class item614 extends MovieClip {
public var mcstink:MovieClip;
public function item614(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 364
//item621 (item621)
package {
import flash.display.*;
public dynamic class item621 extends MovieClip {
public var mcstink:MovieClip;
public function item621(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 365
//item622 (item622)
package {
import flash.display.*;
public dynamic class item622 extends MovieClip {
public var mcstink:MovieClip;
public function item622(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 366
//item623 (item623)
package {
import flash.display.*;
public dynamic class item623 extends MovieClip {
public var mcstink:MovieClip;
public function item623(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 367
//item624 (item624)
package {
import flash.display.*;
public dynamic class item624 extends MovieClip {
public var mcstink:MovieClip;
public function item624(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 368
//item631 (item631)
package {
import flash.display.*;
public dynamic class item631 extends MovieClip {
public var mcstink:MovieClip;
public function item631(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 369
//item632 (item632)
package {
import flash.display.*;
public dynamic class item632 extends MovieClip {
public var mcstink:MovieClip;
public function item632(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 370
//item633 (item633)
package {
import flash.display.*;
public dynamic class item633 extends MovieClip {
public var mcstink:MovieClip;
public function item633(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 371
//item634 (item634)
package {
import flash.display.*;
public dynamic class item634 extends MovieClip {
public var mcstink:MovieClip;
public function item634(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 372
//item641 (item641)
package {
import flash.display.*;
public dynamic class item641 extends MovieClip {
public var mcstink:MovieClip;
public function item641(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 373
//item642 (item642)
package {
import flash.display.*;
public dynamic class item642 extends MovieClip {
public var mcstink:MovieClip;
public function item642(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 374
//item651 (item651)
package {
import flash.display.*;
public dynamic class item651 extends MovieClip {
public var mcstink:MovieClip;
public function item651(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 375
//item652 (item652)
package {
import flash.display.*;
public dynamic class item652 extends MovieClip {
public var mcstink:MovieClip;
public function item652(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 376
//item661 (item661)
package {
import flash.display.*;
public dynamic class item661 extends MovieClip {
public var mcstink:MovieClip;
public function item661(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 377
//item662 (item662)
package {
import flash.display.*;
public dynamic class item662 extends MovieClip {
public var mcstink:MovieClip;
public function item662(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 378
//item71 (item71)
package {
import flash.display.*;
public dynamic class item71 extends MovieClip {
public var mcbroken:MovieClip;
public var mcstink:MovieClip;
public function item71(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 379
//item72 (item72)
package {
import flash.display.*;
public dynamic class item72 extends MovieClip {
public var mcbroken:MovieClip;
public var mcstink:MovieClip;
public function item72(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 380
//item73 (item73)
package {
import flash.display.*;
public dynamic class item73 extends MovieClip {
public var mcbroken:MovieClip;
public var mcstink:MovieClip;
public function item73(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 381
//item74 (item74)
package {
import flash.display.*;
public dynamic class item74 extends MovieClip {
public var mcbroken:MovieClip;
public var mcstink:MovieClip;
public function item74(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 382
//item81 (item81)
package {
import flash.display.*;
public dynamic class item81 extends MovieClip {
public var mcstink:MovieClip;
public function item81(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 383
//item82 (item82)
package {
import flash.display.*;
public dynamic class item82 extends MovieClip {
public var mcstink:MovieClip;
public function item82(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 384
//item83 (item83)
package {
import flash.display.*;
public dynamic class item83 extends MovieClip {
public var mcstink:MovieClip;
public function item83(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 385
//item84 (item84)
package {
import flash.display.*;
public dynamic class item84 extends MovieClip {
public var mcstink:MovieClip;
public function item84(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 386
//item91 (item91)
package {
import flash.display.*;
public dynamic class item91 extends MovieClip {
public var mcbroken:MovieClip;
public var mcstink:MovieClip;
public function item91(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 387
//item92 (item92)
package {
import flash.display.*;
public dynamic class item92 extends MovieClip {
public var mcbroken:MovieClip;
public var mcstink:MovieClip;
public function item92(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 388
//item93 (item93)
package {
import flash.display.*;
public dynamic class item93 extends MovieClip {
public var mcbroken:MovieClip;
public function item93(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 389
//item94 (item94)
package {
import flash.display.*;
public dynamic class item94 extends MovieClip {
public var mcbroken:MovieClip;
public var mcstink:MovieClip;
public function item94(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 390
//jumpsound (jumpsound)
package {
import flash.media.*;
public dynamic class jumpsound extends Sound {
public function jumpsound(){
super();
}
}
}//package
Section 391
//lordcoinsound (lordcoinsound)
package {
import flash.media.*;
public dynamic class lordcoinsound extends Sound {
public function lordcoinsound(){
super();
}
}
}//package
Section 392
//losesound (losesound)
package {
import flash.media.*;
public dynamic class losesound extends Sound {
public function losesound(){
super();
}
}
}//package
Section 393
//mainmenusound (mainmenusound)
package {
import flash.media.*;
public dynamic class mainmenusound extends Sound {
public function mainmenusound(){
super();
}
}
}//package
Section 394
//newdesiresound (newdesiresound)
package {
import flash.media.*;
public dynamic class newdesiresound extends Sound {
public function newdesiresound(){
super();
}
}
}//package
Section 395
//nosound (nosound)
package {
import flash.media.*;
public dynamic class nosound extends Sound {
public function nosound(){
super();
}
}
}//package
Section 396
//papersound (papersound)
package {
import flash.media.*;
public dynamic class papersound extends Sound {
public function papersound(){
super();
}
}
}//package
Section 397
//passcarsound (passcarsound)
package {
import flash.media.*;
public dynamic class passcarsound extends Sound {
public function passcarsound(){
super();
}
}
}//package
Section 398
//phonesound (phonesound)
package {
import flash.media.*;
public dynamic class phonesound extends Sound {
public function phonesound(){
super();
}
}
}//package
Section 399
//pianosound1 (pianosound1)
package {
import flash.media.*;
public dynamic class pianosound1 extends Sound {
public function pianosound1(){
super();
}
}
}//package
Section 400
//pianosound2 (pianosound2)
package {
import flash.media.*;
public dynamic class pianosound2 extends Sound {
public function pianosound2(){
super();
}
}
}//package
Section 401
//pianosound3 (pianosound3)
package {
import flash.media.*;
public dynamic class pianosound3 extends Sound {
public function pianosound3(){
super();
}
}
}//package
Section 402
//pianosound4 (pianosound4)
package {
import flash.media.*;
public dynamic class pianosound4 extends Sound {
public function pianosound4(){
super();
}
}
}//package
Section 403
//pianosound5 (pianosound5)
package {
import flash.media.*;
public dynamic class pianosound5 extends Sound {
public function pianosound5(){
super();
}
}
}//package
Section 404
//pianosound6 (pianosound6)
package {
import flash.media.*;
public dynamic class pianosound6 extends Sound {
public function pianosound6(){
super();
}
}
}//package
Section 405
//pianosound7 (pianosound7)
package {
import flash.media.*;
public dynamic class pianosound7 extends Sound {
public function pianosound7(){
super();
}
}
}//package
Section 406
//platesound (platesound)
package {
import flash.media.*;
public dynamic class platesound extends Sound {
public function platesound(){
super();
}
}
}//package
Section 407
//rainsound (rainsound)
package {
import flash.media.*;
public dynamic class rainsound extends Sound {
public function rainsound(){
super();
}
}
}//package
Section 408
//repairsound1 (repairsound1)
package {
import flash.media.*;
public dynamic class repairsound1 extends Sound {
public function repairsound1(){
super();
}
}
}//package
Section 409
//repairsound2 (repairsound2)
package {
import flash.media.*;
public dynamic class repairsound2 extends Sound {
public function repairsound2(){
super();
}
}
}//package
Section 410
//resultsound (resultsound)
package {
import flash.media.*;
public dynamic class resultsound extends Sound {
public function resultsound(){
super();
}
}
}//package
Section 411
//sleepsound (sleepsound)
package {
import flash.media.*;
public dynamic class sleepsound extends Sound {
public function sleepsound(){
super();
}
}
}//package
Section 412
//sparkleeffect (sparkleeffect)
package {
import flash.display.*;
public dynamic class sparkleeffect extends MovieClip {
public function sparkleeffect(){
super();
addFrameScript(12, frame13);
}
function frame13(){
stop();
}
}
}//package
Section 413
//sparksound1 (sparksound1)
package {
import flash.media.*;
public dynamic class sparksound1 extends Sound {
public function sparksound1(){
super();
}
}
}//package
Section 414
//sparksound2 (sparksound2)
package {
import flash.media.*;
public dynamic class sparksound2 extends Sound {
public function sparksound2(){
super();
}
}
}//package
Section 415
//staticon (staticon)
package {
import flash.display.*;
public dynamic class staticon extends MovieClip {
public var mc1:MovieClip;
public function staticon(){
super();
addFrameScript(21, frame22);
}
function frame22(){
stop();
}
}
}//package
Section 416
//studionote (studionote)
package {
import flash.display.*;
public dynamic class studionote extends MovieClip {
public var mc1:MovieClip;
public function studionote(){
super();
addFrameScript(6, frame7);
}
function frame7(){
stop();
}
}
}//package
Section 417
//talksound1 (talksound1)
package {
import flash.media.*;
public dynamic class talksound1 extends Sound {
public function talksound1(){
super();
}
}
}//package
Section 418
//talksound2 (talksound2)
package {
import flash.media.*;
public dynamic class talksound2 extends Sound {
public function talksound2(){
super();
}
}
}//package
Section 419
//testsound (testsound)
package {
import flash.media.*;
public dynamic class testsound extends Sound {
public function testsound(){
super();
}
}
}//package
Section 420
//textsound (textsound)
package {
import flash.media.*;
public dynamic class textsound extends Sound {
public function textsound(){
super();
}
}
}//package
Section 421
//textui (textui)
package {
import flash.display.*;
import flash.text.*;
public dynamic class textui extends MovieClip {
public var btnclose:SimpleButton;
public var mc1:MovieClip;
public var txt1:TextField;
public function textui(){
super();
addFrameScript(0, frame1);
}
function frame1(){
txt1.mouseEnabled = false;
}
}
}//package
Section 422
//thundersound1 (thundersound1)
package {
import flash.media.*;
public dynamic class thundersound1 extends Sound {
public function thundersound1(){
super();
}
}
}//package
Section 423
//thundersound2 (thundersound2)
package {
import flash.media.*;
public dynamic class thundersound2 extends Sound {
public function thundersound2(){
super();
}
}
}//package
Section 424
//tile1 (tile1)
package {
import flash.display.*;
import flash.text.*;
public dynamic class tile1 extends MovieClip {
public var mc1:MovieClip;
public var txt1:TextField;
public function tile1(){
super();
}
}
}//package
Section 425
//tileclicker (tileclicker)
package {
import flash.display.*;
public dynamic class tileclicker extends MovieClip {
public var mcbody:MovieClip;
public function tileclicker(){
super();
}
}
}//package
Section 426
//treadmillsound (treadmillsound)
package {
import flash.media.*;
public dynamic class treadmillsound extends Sound {
public function treadmillsound(){
super();
}
}
}//package
Section 427
//tutorialsound (tutorialsound)
package {
import flash.media.*;
public dynamic class tutorialsound extends Sound {
public function tutorialsound(){
super();
}
}
}//package
Section 428
//tvsound (tvsound)
package {
import flash.media.*;
public dynamic class tvsound extends Sound {
public function tvsound(){
super();
}
}
}//package
Section 429
//typingsound1 (typingsound1)
package {
import flash.media.*;
public dynamic class typingsound1 extends Sound {
public function typingsound1(){
super();
}
}
}//package
Section 430
//typingsound2 (typingsound2)
package {
import flash.media.*;
public dynamic class typingsound2 extends Sound {
public function typingsound2(){
super();
}
}
}//package
Section 431
//typingsound3 (typingsound3)
package {
import flash.media.*;
public dynamic class typingsound3 extends Sound {
public function typingsound3(){
super();
}
}
}//package
Section 432
//wall1 (wall1)
package {
import flash.display.*;
public dynamic class wall1 extends MovieClip {
public function wall1(){
super();
}
}
}//package
Section 433
//walladdon1 (walladdon1)
package {
import flash.display.*;
public dynamic class walladdon1 extends MovieClip {
public function walladdon1(){
super();
}
}
}//package
Section 434
//washdishsound (washdishsound)
package {
import flash.media.*;
public dynamic class washdishsound extends Sound {
public function washdishsound(){
super();
}
}
}//package
Section 435
//winsound (winsound)
package {
import flash.media.*;
public dynamic class winsound extends Sound {
public function winsound(){
super();
}
}
}//package
Section 436
//worksound (worksound)
package {
import flash.media.*;
public dynamic class worksound extends Sound {
public function worksound(){
super();
}
}
}//package
Section 437
//writesound (writesound)
package {
import flash.media.*;
public dynamic class writesound extends Sound {
public function writesound(){
super();
}
}
}//package
Section 438
//yessound (yessound)
package {
import flash.media.*;
public dynamic class yessound extends Sound {
public function yessound(){
super();
}
}
}//package