Frame 1
stop();
Frame 2
var soundReady = true;
var music = new Sound();
music.attachSound("music1");
var life;
var score;
var level;
var Paused;
var timer;
var startTime;
var gameState;
var sendUrl = "submit.php";
var siteUrl = "http://www.csharks.com";
Frame 25
include.main.initialize(this);
Frame 27
com.csharks.gameEngine.Game.initialize(this);
Frame 45
include.gameTransitions.initialize(this, "gameover");
Frame 55
include.gameTransitions.initialize(this, "gamewin");
Frame 61
include.gameTransitions.initialize(this, "levelup");
Symbol 31 MovieClip Frame 1
var PercentLoaded = ((_root.getBytesLoaded() / _root.getBytesTotal()) * 100);
LoadingBar.gotoAndStop(Math.round(PercentLoaded / 5));
if (PercentLoaded != 100) {
} else {
_root.gotoAndPlay(2);
}
Instance of Symbol 30 MovieClip "LoadingBar" in Symbol 31 MovieClip Frame 1
onClipEvent (load) {
this.stop();
}
Symbol 31 MovieClip Frame 2
gotoAndPlay (1);
Symbol 338 MovieClip [__Packages.include.main] Frame 0
class include.main extends MovieClip
{
var stop, sound_Mc, play_Btn, help_Btn, more_Btn, gotoAndPlay, gotoAndStop, back_Btn, getURL;
function main () {
super();
}
static function initialize(movieClip) {
movieClip.__proto__ = include.main.prototype;
movieClip.menuInit();
}
function menuInit() {
stop();
if (_root.soundReady) {
_root.music.stop();
_root.music.start();
_root.music.onSoundComplete = function () {
if (_root.soundReady) {
_root.music.start();
}
};
sound_Mc.gotoAndStop(2);
} else {
sound_Mc.gotoAndStop(1);
}
play_Btn.onRelease = function () {
this._parent.gameStart();
};
help_Btn.onRelease = function () {
this._parent.gotoHelpPage();
};
more_Btn.onRelease = function () {
this._parent.gotoSite();
};
sound_Mc.onRelease = function () {
this._parent.toggleSound();
};
sound_Mc.onRollOver = function () {
if (_root.soundReady) {
this._parent.sound_Mc.gotoAndStop(4);
} else {
this._parent.sound_Mc.gotoAndStop(3);
}
};
sound_Mc.onRollOut = function () {
if (_root.soundReady) {
this._parent.sound_Mc.gotoAndStop(2);
} else {
this._parent.sound_Mc.gotoAndStop(1);
}
};
}
function gameStart() {
(gotoAndPlay("game"));// not popped
}
function gotoHelpPage() {
(gotoAndStop("help"));// not popped
back_Btn.onRelease = function () {
this._parent.gotoMenu();
};
}
function gotoMenu() {
(gotoAndPlay("menu"));// not popped
}
function gotoSite() {
(getURL("http://www.games2girls.com/", "_blank"));// not popped
}
function toggleSound() {
if (_root.soundReady) {
_root.music.stop();
_root.soundReady = false;
sound_Mc.gotoAndStop(1);
} else {
_root.music.stop();
_root.music.start();
_root.music.onSoundComplete = function () {
if (_root.soundReady) {
_root.music.start();
}
};
_root.soundReady = true;
sound_Mc.gotoAndStop(2);
}
}
}
Symbol 339 MovieClip [__Packages.com.csharks.gameEngine.Game] Frame 0
class com.csharks.gameEngine.Game extends MovieClip
{
var inc11, delayin, inc1, delay1, inc2, inc01, beddelay1, inc02, beddelay2, inc07, delay9, inc03, beddelay3, inc04, beddelay4, inc05, beddelay5, inc06, beddelay6, delay6, delay7, inc123, _ymouse, _xmouse, bgLeftExtreme, bgRightExtreme, destination, InitTime, secsforbabyin, secsforcry, k, gotoAndPlay, attachMovie, help, sound_Mc, init_Mc, action_Mc, levelup_Mc, gameover_Mc, gamewon_Mc, help_Btn, menu_Btn, restart_Btn, stop, onEnterFrame;
function Game () {
super();
}
function setVariable(which, to, from) {
_root[which] = to;
}
function playSound(which, from) {
if (_root.soundReady) {
var _local2 = new Sound();
_local2.attachSound(which);
_local2.start();
}
}
function action() {
_root.moveMovie();
if (_root.delayin) {
inc11++;
if (inc11 == _root.babysec) {
babyIn();
playSound("enter");
_root.movie.ins1.doorx2.enabled = true;
}
if (inc11 == _root.secs) {
babyGo();
inc11 = 0;
delayin = false;
}
}
if (_root.delay1) {
inc1++;
if (inc1 == 7) {
ladyMoves();
inc1 = 0;
delay1 = false;
}
}
if (_root.dealy) {
inc2++;
if (inc2 == 50) {
babyGo();
inc2 = 0;
_root.dealy = false;
}
}
if (_root.delay2) {
ladyMoves2();
}
if (_root.beddelay1) {
inc01++;
if (inc01 > _root.numcry) {
orderObj(1);
inc01 = 0;
beddelay1 = false;
}
}
if (_root.beddelay2) {
inc02++;
if (inc02 > _root.numcry) {
orderObj(2);
inc02 = 0;
beddelay2 = false;
}
}
if (_root.delay9) {
inc07++;
if (inc07 == 10) {
takeBaby();
inc07 = 0;
delay9 = false;
}
}
if (_root.beddelay3) {
inc03++;
if (inc03 > _root.numcry) {
orderObj(3);
inc03 = 0;
beddelay3 = false;
}
}
if (_root.beddelay4) {
inc04++;
if (inc04 > _root.numcry) {
orderObj(4);
inc04 = 0;
beddelay4 = false;
}
}
if (_root.beddelay5) {
inc05++;
if (inc05 > _root.numcry) {
orderObj(5);
inc05 = 0;
beddelay5 = false;
}
}
if (_root.beddelay6) {
inc06++;
if (inc06 > _root.numcry) {
orderObj(6);
inc06 = 0;
beddelay6 = false;
}
}
if (_root.timeforDelayin) {
timeforbabyin();
}
if (_root.timeforBabyorder) {
timerforOrder();
}
if (_root.delay6) {
inc1++;
if (inc1 > 10) {
putBaby();
inc1 = 0;
delay6 = false;
}
}
if (_root.delay7) {
inc1++;
if (inc1 > 20) {
babyBuggy();
inc1 = 0;
delay7 = false;
}
}
if (_root.delay4) {
walkLady();
}
if (_root.delay3) {
inc123++;
if (inc123 > 10) {
ladyMoves3();
}
}
if (_root.babycount) {
_root.pressBaby();
}
if (_root.bedcount) {
_root.pressBed();
}
_root.score = _root.box1.score;
_root.scored = _root.score;
_root.life = _root.box1.life;
if (_root.box1.life <= 0) {
gameOver();
_root.box1.life = 0;
_root.scored = _root.score;
}
if (_root.scores1 == _root.loss2) {
_root.level = _root.level + 1;
_root.scores1 = 0;
}
if (_root.level == 16) {
gameWon();
_root.scored = _root.score;
}
if (_root.box1.score <= 0) {
_root.box1.score = 0;
}
_root.setTimer();
}
function setlevel() {
if (_root.level == 1) {
_root.loss2 = 700;
_root.secs = 200;
_root.babysec = 40;
setVariable("secsforbabyin", 20, "initLevel");
setVariable("secsforcry", 25, "initLevel");
setVariable("numcry", 100, "initLevel");
} else if ((_root.level == 2) || (_root.level == 3)) {
_root.loss2 = 400;
_root.secs = 150;
_root.babysec = 20;
setVariable("secsforbabyin", 20, "initLevel");
setVariable("secsforcry", 20, "initLevel");
setVariable("numcry", 90, "initLevel");
} else if (((_root.level == 4) || (_root.level == 5)) || (_root.level == 6)) {
_root.loss2 = 400;
_root.secs = 100;
_root.babysec = 10;
setVariable("secsforcry", 15, "initLevel");
setVariable("secsforbabyin", 20, "initLevel");
setVariable("numcry", 80, "initLevel");
} else if (((_root.level == 7) || (_root.level == 8)) || (_root.level == 9)) {
_root.loss2 = 1000;
_root.secs = 80;
_root.babysec = 8;
setVariable("secsforcry", 10, "initLevel");
setVariable("secsforbabyin", 15, "initLevel");
setVariable("numcry", 70, "initLevel");
} else if (_root.level == 10) {
_root.loss2 = 800;
_root.secs = 50;
_root.babysec = 6;
setVariable("secsforcry", 8, "initLevel");
setVariable("secsforbabyin", 12, "initLevel");
setVariable("numcry", 60, "initLevel");
} else if (_root.level == 11) {
_root.loss2 = 600;
_root.secs = 40;
_root.babysec = 5;
setVariable("secsforcry", 6, "initLevel");
setVariable("secsforbabyin", 10, "initLevel");
setVariable("numcry", 50, "initLevel");
} else if (_root.level == 12) {
_root.loss2 = 500;
_root.secs = 30;
_root.babysec = 4;
setVariable("secsforcry", 5, "initLevel");
setVariable("secsforbabyin", 8, "initLevel");
setVariable("numcry", 40, "initLevel");
} else if (_root.level == 13) {
_root.loss2 = 500;
_root.secs = 20;
_root.babysec = 3;
setVariable("secsforcry", 4, "initLevel");
setVariable("secsforbabyin", 6, "initLevel");
setVariable("numcry", 30, "initLevel");
} else if (_root.level == 14) {
_root.loss2 = 6000;
_root.secs = 20;
_root.babysec = 2;
setVariable("secsforcry", 3, "initLevel");
setVariable("secsforbabyin", 4, "initLevel");
setVariable("numcry", 20, "initLevel");
} else if (_root.level == 15) {
_root.loss2 = 10200;
_root.secs = 10;
_root.babysec = 2;
setVariable("secsforcry", 2, "initLevel");
setVariable("secsforbabyin", 3, "initLevel");
setVariable("numcry", 10, "initLevel");
}
}
function moveMovie() {
if (_ymouse < 350) {
if ((_xmouse < 253.333333333333) && (_root.movie._x < (bgLeftExtreme - ((253.333333333333 - _xmouse) / 10)))) {
_root.movie._x = _root.movie._x + ((253.333333333333 - _xmouse) / 10);
} else if ((_xmouse > 506.666666666667) && (_root.movie._x > (bgRightExtreme + ((_xmouse - 506.666666666667) / 10)))) {
_root.movie._x = _root.movie._x - ((_xmouse - 506.666666666667) / 10);
} else if (_xmouse < 253.333333333333) {
_root.movie._x = bgLeftExtreme;
} else if (_xmouse > 506.666666666667) {
_root.movie._x = bgRightExtreme;
}
}
switch (destination) {
case "right" :
_root.movie.lady1._x = _root.movie.lady1._x - _root.ladySpeed;
break;
case "left" :
_root.movie.lady1._x = _root.movie.lady1._x + _root.ladySpeed;
}
}
function moves(destination) {
switch (destination) {
case "right" :
_root.movie.lady1._x = _root.movie.lady1._x - _root.ladySpeed;
break;
case "left" :
_root.movie.lady1._x = _root.movie.lady1._x + _root.ladySpeed;
}
}
function setTimer() {
if ((getTimer() - _root.InitTime) >= 1000) {
InitTime = getTimer();
_root.timer = _root.timer + 1;
}
}
function timeforbabyin() {
if (_root.timer == (_root.times1 + secsforbabyin)) {
_root.times1 = 0;
_root.timeforDelayin = false;
_root.delayin = true;
}
}
function timerforOrder() {
var _local3 = 1;
while (_local3 < 7) {
if (_root["babyinFlag" + _local3] == true) {
if (_root.timer == (_root.movie["bed" + _local3].timerorder + secsforcry)) {
_root.movie["bed" + _local3].timerorder = 0;
_root.timeforBabyorder = false;
_root.box1.life = _root.box1.life - 1;
_root.delays(_local3);
_root["standidle" + _local3] = false;
}
}
_local3++;
}
}
function clearCanvas() {
}
function inBabyTimer() {
if (_root.timer > 150) {
_root.times1 = _root.timer;
_root.timeforDelayin = true;
}
}
function takeBaby() {
var _local2 = 0;
while (_local2 < 7) {
if (_root["bedFlag" + _local2] == true) {
_root["bedFlag" + _local2] = false;
_root.movie["bed" + _local2].babies.gotoAndStop(1);
_root.movie.lady1.gotoAndPlay(_root.ladyMove[11]);
_root.bedcount = false;
_root.s = _local2;
_root.delay2 = false;
_root.movie.lady1.babies.gotoAndPlay("baby" + _root.movie["bed" + _local2].baby);
_root.bab = _root.movie["bed" + _local2].baby;
_root.movie["bed" + _local2].babies.gotoAndStop("baby0");
_root.ordBaby = true;
_root.ladyBaby1 = true;
_root.movie["bed" + _local2].babyin = 0;
}
_local2++;
}
}
function babyGo() {
playSound("notget");
_root.movie.ins1.babies.gotoAndStop(_root.babyFrames);
_root.movie.ins1.gotoAndPlay(_root.ladyMove[9]);
_root.box1.life = _root.box1.life - 1;
_root.inc11 = 0;
_root.delayin = false;
_root.times1 = _root.timer;
_root.timeforDelayin = true;
_root.inc2 = 0;
_root.dealy = false;
_root.box1.ins.gotoAndStop(1);
_root.movie.ins1.doorx2.enabled = false;
}
function babyIn() {
_root.babyFrames = 2 + random(6);
_root.movie.ins1.gotoAndPlay(4);
_root.movie.ins1.babies.gotoAndStop(_root.babyFrames);
if (_root.movie._x == -75.8) {
_root.box1.ins.gotoAndPlay(1);
} else {
_root.box1.ins.gotoAndPlay(3);
}
_root.movie.out1.doorx2.onPress = function () {
_root.bedcount = false;
_root.delay3 = false;
var _local2 = 1;
while (_local2 < 8) {
_root["bedFlag" + _local2] = false;
_local2++;
}
_root.door1 = true;
if (_root.ladyBaby1 || (_root.ladyBaby)) {
_root.movie.lady1.gotoAndPlay(_root.ladyMove[13]);
if (_root.ladyBaby) {
_root.movie.lady1.babies.gotoAndStop(_root.babyFrames);
_root.babys = _root.babyFrames;
} else {
_root.movie.lady1.babies.gotoAndStop("baby" + _root.bab);
}
_root.babycount = true;
} else {
_root.babycount = true;
_root.movie.lady1.gotoAndPlay(_root.ladyMove[1]);
_root.delay4 = false;
}
};
_root.movie.ins1.doorx2.onPress = function () {
_root.bedcount = false;
_root.door2 = true;
_root.babycount = true;
var _local3 = 1;
while (_local3 < 8) {
_root["bedFlag" + _local3] = false;
_local3++;
}
this.incf1 = 0;
_root.flagForEnter = false;
_root.inc11 = 0;
_root.delayin = false;
_root.delay6 = false;
_root.delay3 = false;
_root.inc123 = 0;
if ((_root.ladyBaby1 == true) || (_root.ladyBaby == true)) {
if (_root.movie.lady1._x < _root.ladyPos[7]) {
_root.movie.lady1.gotoAndPlay(_root.ladyMove[3]);
_root.movie.lady1.gotoAndPlay(_root.ladyMove[4]);
_root.movie.lady1.babies.gotoAndStop("baby" + _root.bab);
_root.delay4 = false;
_root.des = "left";
} else {
_root.movie.lady1.gotoAndPlay(_root.ladyMove[10]);
_root.movie.lady1.gotoAndPlay(_root.ladyMove[13]);
_root.movie.lady1.babies.gotoAndStop("baby" + _root.bab);
_root.delay4 = false;
_root.des = "right";
}
} else if (_root.movie.lady1._x < _root.ladyPos[7]) {
_root.movie.lady1.gotoAndPlay(_root.ladyMove[8]);
_root.movie.lady1.gotoAndPlay(_root.ladyMove[7]);
_root.delay4 = false;
_root.des = "left";
_root.hits = "hit1";
} else {
_root.movie.lady1.gotoAndPlay(_root.ladyMove[1]);
_root.delay4 = false;
_root.des = "right";
_root.hits = "hit";
}
};
_root.movie.bedx1.onPress = function () {
_root.delay6 = false;
_root.door1 = false;
_root.box1.b1.gotoAndStop(1);
_root.movie.bed1.babies.order.gotoAndStop(1);
_root.delay6 = false;
_root.door1 = false;
var _local2 = 2;
while (_local2 < 8) {
_root["bedFlag" + _local2] = false;
_local2++;
}
if (_root.ladyBaby) {
_root.ladywithBaby(6);
if (_root.movie.bed1.babyin == 1) {
_root.checkBabywithbabycrying(1);
}
} else if (_root.ladyBaby1) {
if (_root.movie.bed1.babyin == 1) {
_root.checkBabywithbabycrying(1);
} else {
_root.babyinBed = false;
_root.bedcount = false;
_root.babycount = false;
_root.ordBaby = false;
}
if (_root.movie.lady1._x < _root.ladyPos[6]) {
_root.movie.lady1.gotoAndPlay(_root.ladyMove[4]);
_root.des = "left";
_root.hits = "hit";
} else {
_root["popFlag" + _root.m] = false;
_root.m = 0;
_root.movie.lady1.gotoAndPlay(_root.ladyMove[10]);
_root.movie.lady1.gotoAndPlay(_root.ladyMove[13]);
_root.des = "right";
_root.hits = "hit1";
_root.rightLadyBaby = true;
}
_root.movie.lady1.babies.gotoAndStop("baby" + _root.bab);
_root.delay1 = false;
_root.delay2 = true;
_root.delay4 = false;
} else {
_root.babycount = false;
if (_root.popOrder1) {
_root.popFlag1 = true;
_root.babyinFlag1 = false;
_root.standidle1 = false;
_root.movie.bed1.babies.order.gotoAndPlay(_root.movie.bed1.order);
_root.orderItem1 = _root.movie.bed1.order;
}
if (_root.popObj1 == true) {
_root.movie.bed1.babies.order.gotoAndPlay(_root.movie.bed1.item);
_root.orderItems1 = _root.movie.bed1.item;
}
if ((_root.orderItem1 == "ord5") || (_root.orderItems1 == "ord5")) {
_root.ordDoor1 = true;
}
if (_root.movie.lady1._x < _root.ladyPos[6]) {
_root.babycount = false;
_root.bedcount1 = true;
_root.bedcount = false;
_root.delay4 = false;
_root.ladyMoves3();
} else {
_root.bedcount1 = false;
_root.delay3 = false;
_root.inc123 = 0;
_root.bedcount = true;
_root.movie.lady1.gotoAndPlay(_root.ladyMove[1]);
_root.des = "right";
_root.delay4 = false;
}
}
_root.bedFlag1 = true;
};
_root.movie.bedx2.onPress = function () {
_root.delay6 = false;
_root.door1 = false;
_root.box1.b2.gotoAndStop(1);
var _local2 = 3;
while (_local2 < 8) {
_root["bedFlag" + _local2] = false;
_local2++;
}
_root.bedFlag1 = false;
_root.movie.bed2.babies.order.gotoAndStop(1);
if (_root.ladyBaby) {
_root.ladywithBaby(5);
if (_root.movie.bed2.babyin == 1) {
_root.checkBabywithbabycrying(2);
}
} else if (_root.ladyBaby1) {
if (_root.movie.bed2.babyin == 1) {
_root.checkBabywithbabycrying(2);
} else {
_root.babyinBed = false;
_root.bedcount = false;
_root.babycount = false;
_root.ordBaby = false;
}
if (_root.movie.lady1._x < _root.ladyPos[5]) {
_root.movie.lady1.gotoAndPlay(_root.ladyMove[4]);
_root.des = "left";
_root.hits = "hit";
} else {
_root["popFlag" + _root.m] = false;
_root.m = 0;
_root.movie.lady1.gotoAndPlay(_root.ladyMove[10]);
_root.movie.lady1.gotoAndPlay(_root.ladyMove[13]);
_root.des = "right";
_root.hits = "hit1";
_root.rightLadyBaby = true;
}
_root.movie.lady1.babies.gotoAndStop("baby" + _root.bab);
_root.delay1 = false;
_root.delay2 = true;
_root.delay4 = false;
} else {
_root.babycount = false;
if (_root.popOrder2) {
_root.popFlag2 = true;
_root.babyinFlag2 = false;
_root.standidle2 = false;
_root.orderItems2 = "";
_root.movie.bed2.babies.order.gotoAndPlay(_root.movie.bed2.order);
_root.orderItem2 = _root.movie.bed2.order;
}
if (_root.popObj2 == true) {
_root.orderItem2 = "";
_root.movie.bed2.babies.order.gotoAndPlay(_root.movie.bed2.item);
_root.orderItems2 = _root.movie.bed2.item;
}
if ((_root.orderItem2 == "ord5") || (_root.orderItems2 == "ord5")) {
_root.ordDoor1 = true;
}
if (_root.movie.lady1._x < _root.ladyPos[5]) {
_root.babycount = false;
_root.bedcount1 = true;
_root.bedcount = false;
_root.delay4 = false;
_root.ladyMoves3();
} else {
_root.bedcount = true;
_root.delay3 = false;
_root.inc123 = 0;
_root.bedcount1 = false;
_root.movie.lady1.gotoAndPlay(_root.ladyMove[1]);
_root.des = "right";
_root.delay4 = false;
}
}
_root.bedFlag2 = true;
};
_root.movie.bedx3.onPress = function () {
_root.delay6 = false;
_root.door1 = false;
_root.box1.b3.gotoAndStop(1);
var _local2 = 4;
while (_local2 < 8) {
_root["bedFlag" + _local2] = false;
_local2++;
}
_local2 = 1;
while (_local2 < 3) {
_root["bedFlag" + _local2] = false;
_local2++;
}
_root.movie.bed3.babies.order.gotoAndStop(1);
if (_root.ladyBaby) {
_root.ladywithBaby(4);
if (_root.movie.bed3.babyin == 1) {
_root.checkBabywithbabycrying(3);
}
} else if (_root.ladyBaby1) {
if (_root.movie.bed3.babyin == 1) {
_root.checkBabywithbabycrying(3);
} else {
_root.babyinBed = false;
_root.bedcount = false;
_root.babycount = false;
_root.ordBaby = false;
}
if (_root.movie.lady1._x < _root.ladyPos[4]) {
_root.movie.lady1.gotoAndPlay(_root.ladyMove[4]);
_root.des = "left";
_root.hits = "hit";
} else {
_root["popFlag" + _root.m] = false;
_root.m = 0;
_root.movie.lady1.gotoAndPlay(_root.ladyMove[10]);
_root.movie.lady1.gotoAndPlay(_root.ladyMove[13]);
_root.des = "right";
_root.hits = "hit1";
_root.rightLadyBaby = true;
}
_root.movie.lady1.babies.gotoAndStop("baby" + _root.bab);
_root.delay1 = false;
_root.delay2 = true;
_root.delay4 = false;
} else {
_root.babycount = false;
if (_root.popOrder3) {
_root.babyinFlag3 = false;
_root.popFlag3 = true;
_root.standidle3 = false;
_root.movie.bed3.babies.order.gotoAndPlay(_root.movie.bed3.order);
_root.orderItem3 = _root.movie.bed3.order;
}
if (_root.popObj3 == true) {
_root.movie.bed3.babies.order.gotoAndPlay(_root.movie.bed3.item);
_root.orderItems3 = _root.movie.bed3.item;
}
if ((_root.orderItem3 == "ord5") || (_root.orderItems3 == "ord5")) {
_root.ordDoor1 = true;
}
if (_root.movie.lady1._x < _root.ladyPos[4]) {
_root.babycount = false;
_root.bedcount1 = true;
_root.bedcount = false;
_root.delay4 = false;
_root.ladyMoves3();
} else {
_root.bedcount = true;
_root.bedcount1 = false;
_root.delay3 = false;
_root.inc123 = 0;
_root.movie.lady1.gotoAndPlay(_root.ladyMove[1]);
_root.des = "right";
_root.delay4 = false;
}
}
_root.bedFlag3 = true;
};
_root.movie.bedx4.onPress = function () {
_root.delay6 = false;
_root.door1 = false;
_root.box1.b4.gotoAndStop(1);
var _local2 = 5;
while (_local2 < 8) {
_root["bedFlag" + _local2] = false;
_local2++;
}
_local2 = 1;
while (_local2 < 4) {
_root["bedFlag" + _local2] = false;
_local2++;
}
_root.movie.bed4.babies.order.gotoAndStop(1);
if (_root.ladyBaby) {
_root.ladywithBaby(3);
if (_root.movie.bed4.babyin == 1) {
_root.checkBabywithbabycrying(4);
}
} else if (_root.ladyBaby1) {
if (_root.movie.bed4.babyin == 1) {
_root.checkBabywithbabycrying(4);
} else {
_root.babyinBed = false;
_root.bedcount = false;
_root.babycount = false;
_root.ordBaby = false;
}
if (_root.movie.lady1._x < _root.ladyPos[3]) {
_root.movie.lady1.gotoAndPlay(_root.ladyMove[4]);
_root.des = "left";
_root.hits = "hit";
} else {
_root["popFlag" + _root.m] = false;
_root.m = 0;
_root.movie.lady1.gotoAndPlay(_root.ladyMove[10]);
_root.movie.lady1.gotoAndPlay(_root.ladyMove[13]);
_root.des = "right";
_root.hits = "hit1";
_root.rightLadyBaby = true;
}
_root.movie.lady1.babies.gotoAndStop("baby" + _root.bab);
_root.delay1 = false;
_root.delay2 = true;
_root.delay4 = false;
} else {
_root.babycount = false;
if (_root.popOrder4) {
_root.popFlag4 = true;
_root.babyinFlag4 = false;
_root.standidle4 = false;
_root.movie.bed4.babies.order.gotoAndPlay(_root.movie.bed4.order);
_root.orderItem4 = _root.movie.bed4.order;
}
if (_root.popObj4 == true) {
_root.movie.bed4.babies.order.gotoAndPlay(_root.movie.bed4.item);
_root.orderItems4 = _root.movie.bed4.item;
}
if ((_root.orderItem4 == "ord5") || (_root.orderItems4 == "ord5")) {
_root.ordDoor1 = true;
}
if (_root.movie.lady1._x < _root.ladyPos[3]) {
_root.babycount = false;
_root.bedcount1 = true;
_root.bedcount = false;
_root.delay4 = false;
_root.ladyMoves3();
} else {
_root.bedcount = true;
_root.bedcount1 = false;
_root.delay3 = false;
_root.inc123 = 0;
_root.movie.lady1.gotoAndPlay(_root.ladyMove[1]);
_root.des = "right";
_root.delay4 = false;
}
}
_root.bedFlag4 = true;
};
_root.movie.bedx5.onPress = function () {
_root.delay6 = false;
_root.door1 = false;
_root.box1.b5.gotoAndStop(1);
var _local2 = 5;
while (_local2 < 8) {
_root["bedFlag" + _local2] = false;
_local2++;
}
_local2 = 1;
while (_local2 < 5) {
_root["bedFlag" + _local2] = false;
_local2++;
}
_root.movie.bed5.babies.order.gotoAndStop(1);
if (_root.ladyBaby) {
_root.ladywithBaby(2);
if (_root.movie.bed5.babyin == 1) {
_root.checkBabywithbabycrying(5);
}
} else if (_root.ladyBaby1) {
if (_root.movie.bed5.babyin == 1) {
_root.checkBabywithbabycrying(5);
} else {
_root.babyinBed = false;
_root.bedcount = false;
_root.babycount = false;
_root.ordBaby = false;
}
if (_root.movie.lady1._x < _root.ladyPos[2]) {
_root.movie.lady1.gotoAndPlay(_root.ladyMove[4]);
_root.des = "left";
_root.hits = "hit";
} else {
_root["popFlag" + _root.m] = false;
_root.m = 0;
_root.movie.lady1.gotoAndPlay(_root.ladyMove[10]);
_root.movie.lady1.gotoAndPlay(_root.ladyMove[13]);
_root.des = "right";
_root.hits = "hit1";
_root.rightLadyBaby = true;
}
_root.movie.lady1.babies.gotoAndStop("baby" + _root.bab);
_root.delay1 = false;
_root.delay2 = true;
_root.delay4 = false;
} else {
_root.babycount = false;
if (_root.popOrder5) {
_root.popFlag5 = true;
_root.babyinFlag5 = false;
_root.standidle5 = false;
_root.movie.bed5.babies.order.gotoAndPlay(_root.movie.bed5.order);
_root.orderItem5 = _root.movie.bed5.order;
}
if (_root.popObj5 == true) {
_root.movie.bed5.babies.order.gotoAndPlay(_root.movie.bed5.item);
_root.orderItems5 = _root.movie.bed5.item;
}
if ((_root.orderItem5 == "ord5") || (_root.orderItems5 == "ord5")) {
_root.ordDoor1 = true;
}
if (_root.movie.lady1._x < _root.ladyPos[2]) {
_root.babycount = false;
_root.bedcount1 = true;
_root.bedcount = false;
_root.delay4 = false;
_root.ladyMoves3();
} else {
_root.bedcount = true;
_root.bedcount1 = false;
_root.delay3 = false;
_root.inc123 = 0;
_root.movie.lady1.gotoAndPlay(_root.ladyMove[1]);
_root.des = "right";
_root.delay4 = false;
}
}
_root.bedFlag5 = true;
};
_root.movie.bedx6.onPress = function () {
_root.delay6 = false;
_root.door1 = false;
_root.box1.b6.gotoAndStop(1);
var _local2 = 1;
while (_local2 < 6) {
_root["bedFlag" + _local2] = false;
_local2++;
}
_root.movie.bed6.babies.order.gotoAndStop(1);
if (_root.ladyBaby) {
_root.ladywithBaby(1);
if (_root.movie.bed6.babyin == 1) {
_root.checkBabywithbabycrying(6);
}
} else if (_root.ladyBaby1) {
if (_root.movie.bed6.babyin == 1) {
_root.checkBabywithbabycrying(6);
} else {
_root.babyinBed = false;
_root.bedcount = false;
_root.babycount = false;
_root.ordBaby = false;
}
if (_root.movie.lady1._x < _root.ladyPos[1]) {
_root.movie.lady1.gotoAndPlay(_root.ladyMove[4]);
_root.des = "left";
_root.hits = "hit";
} else {
_root["popFlag" + _root.m] = false;
_root.m = 0;
_root.movie.lady1.gotoAndPlay(_root.ladyMove[10]);
_root.movie.lady1.gotoAndPlay(_root.ladyMove[13]);
_root.des = "right";
_root.hits = "hit1";
_root.rightLadyBaby = true;
}
_root.movie.lady1.babies.gotoAndStop("baby" + _root.bab);
_root.delay1 = false;
_root.delay2 = true;
_root.delay4 = false;
} else {
_root.babycount = false;
if (_root.popObj6 == true) {
_root.movie.bed6.babies.order.gotoAndPlay(_root.movie.bed6.item);
_root.orderItems6 = _root.movie.bed6.item;
}
if (_root.popOrder6) {
_root.popFlag6 = true;
_root.babyinFlag6 = false;
_root.standidle6 = false;
_root.movie.bed6.babies.order.gotoAndPlay(_root.movie.bed6.order);
_root.orderItem6 = _root.movie.bed6.order;
}
if ((_root.orderItem6 == "ord5") || (_root.orderItems6 == "ord5")) {
_root.ordDoor1 = true;
}
if (_root.movie.lady1._x < _root.ladyPos[1]) {
_root.babycount = false;
_root.bedcount1 = true;
_root.bedcount = false;
_root.delay4 = false;
_root.ladyMoves3();
} else {
_root.bedcount = true;
_root.bedcount1 = false;
_root.delay3 = false;
_root.inc123 = 0;
_root.movie.lady1.gotoAndPlay(_root.ladyMove[1]);
_root.des = "right";
_root.delay4 = false;
}
}
_root.bedFlag6 = true;
};
_root.movie.ob1.onPress = function () {
if ((_root.ladyBaby == false) and (_root.ladyBaby1 == false)) {
_root.obflag1 = true;
_root.babyinBed = false;
if (_root.movie.lady1._x < _root.ladyPos[8]) {
_root.des = "left";
_root.movie.lady1.gotoAndPlay(_root.ladyMove[7]);
_root.hits = "hit";
} else {
_root.des = "right";
_root.movie.lady1.gotoAndPlay(_root.ladyMove[6]);
_root.movie.lady1.gotoAndPlay(_root.ladyMove[1]);
_root.hits = "hit1";
}
_root.delay2 = true;
} else {
_root.obflag1 = true;
_root.babyinBed = false;
if (_root.ladyBaby1 == true) {
if (_root.movie.lady1._x < _root.ladyPos[8]) {
_root.des = "left";
_root.movie.lady1.gotoAndPlay(_root.ladyMove[4]);
_root.movie.lady1.babies.gotoAndStop("baby" + _root.bab);
_root.hits = "hit";
} else {
_root.des = "right";
_root.movie.lady1.gotoAndPlay(_root.ladyMove[10]);
_root.movie.lady1.gotoAndPlay(_root.ladyMove[13]);
_root.movie.lady1.babies.gotoAndStop("baby" + _root.bab);
_root.hits = "hit1";
}
}
if (_root.ladyBaby == true) {
_root.withBabyObj(8);
}
}
_root.delay2 = true;
_root.delay1 = false;
_root.delay4 = false;
_root.bedcount = false;
_root.delay3 = false;
_root.inc123 = 0;
_root.babycount = false;
_root.bedcount1 = false;
};
_root.movie.ob2.onPress = function () {
_root.delay2 = true;
_root.delay1 = false;
_root.delay4 = false;
_root.bedcount = false;
_root.delay3 = false;
_root.inc123 = 0;
_root.babycount = false;
_root.bedcount1 = false;
if ((_root.ladyBaby == false) and (_root.ladyBaby1 == false)) {
_root.obflag2 = true;
_root.babyinBed = false;
if (_root.movie.lady1._x < _root.ladyPos[9]) {
_root.des = "left";
_root.movie.lady1.gotoAndPlay(_root.ladyMove[7]);
_root.hits = "hit";
} else {
_root.des = "right";
_root.movie.lady1.gotoAndPlay(_root.ladyMove[6]);
_root.movie.lady1.gotoAndPlay(_root.ladyMove[1]);
_root.hits = "hit1";
}
_root.delay2 = true;
} else {
_root.obflag2 = true;
_root.babyinBed = false;
if (_root.ladyBaby1 == true) {
if (_root.movie.lady1._x < _root.ladyPos[9]) {
_root.des = "left";
_root.movie.lady1.gotoAndPlay(_root.ladyMove[4]);
_root.movie.lady1.babies.gotoAndStop("baby" + _root.bab);
_root.hits = "hit";
} else {
_root.des = "right";
_root.movie.lady1.gotoAndPlay(_root.ladyMove[10]);
_root.movie.lady1.gotoAndPlay(_root.ladyMove[13]);
_root.movie.lady1.babies.gotoAndStop("baby" + _root.bab);
_root.hits = "hit1";
}
}
if (_root.ladyBaby == true) {
_root.withBabyObj(9);
}
}
};
_root.movie.ob3.onPress = function () {
if ((_root.ladyBaby == false) and (_root.ladyBaby1 == false)) {
_root.babyinBed = false;
_root.obflag3 = true;
if (_root.movie.lady1._x < _root.ladyPos[10]) {
_root.des = "left";
_root.movie.lady1.gotoAndPlay(_root.ladyMove[7]);
_root.hits = "hit";
} else {
_root.des = "right";
_root.movie.lady1.gotoAndPlay(_root.ladyMove[6]);
_root.movie.lady1.gotoAndPlay(_root.ladyMove[1]);
_root.hits = "hit1";
}
_root.delay2 = true;
} else {
_root.obflag3 = true;
_root.babyinBed = false;
if (_root.ladyBaby1 == true) {
if (_root.movie.lady1._x < _root.ladyPos[10]) {
_root.des = "left";
_root.movie.lady1.gotoAndPlay(_root.ladyMove[4]);
_root.movie.lady1.babies.gotoAndStop("baby" + _root.bab);
_root.hits = "hit";
} else {
_root.des = "right";
_root.movie.lady1.gotoAndPlay(_root.ladyMove[10]);
_root.movie.lady1.gotoAndPlay(_root.ladyMove[13]);
_root.movie.lady1.babies.gotoAndStop("baby" + _root.bab);
_root.hits = "hit1";
}
}
if (_root.ladyBaby == true) {
_root.withBabyObj(10);
}
}
_root.delay1 = false;
_root.delay4 = false;
_root.bedcount = false;
_root.delay3 = false;
_root.inc123 = 0;
_root.delay2 = true;
_root.babycount = false;
_root.bedcount1 = false;
};
_root.movie.ob4.onPress = function () {
_root.delay1 = false;
_root.delay4 = false;
_root.delay3 = false;
_root.inc123 = 0;
_root.bedcount = false;
_root.babycount = false;
_root.bedcount1 = false;
_root.delay2 = true;
if ((_root.ladyBaby == false) and (_root.ladyBaby1 == false)) {
_root.babyinBed = false;
_root.obflag4 = true;
if (_root.movie.lady1._x < _root.ladyPos[11]) {
_root.des = "left";
_root.movie.lady1.gotoAndPlay(_root.ladyMove[7]);
_root.hits = "hit";
} else {
_root.des = "right";
_root.movie.lady1.gotoAndPlay(_root.ladyMove[6]);
_root.movie.lady1.gotoAndPlay(_root.ladyMove[1]);
_root.hits = "hit1";
}
} else {
_root.obflag4 = true;
_root.babyinBed = false;
if (_root.ladyBaby1 == true) {
if (_root.movie.lady1._x < _root.ladyPos[11]) {
_root.des = "left";
_root.movie.lady1.gotoAndPlay(_root.ladyMove[4]);
_root.movie.lady1.babies.gotoAndStop("baby" + _root.bab);
_root.hits = "hit";
} else {
_root.des = "right";
_root.movie.lady1.gotoAndPlay(_root.ladyMove[10]);
_root.movie.lady1.gotoAndPlay(_root.ladyMove[13]);
_root.movie.lady1.babies.gotoAndStop("baby" + _root.bab);
_root.hits = "hit1";
}
}
if (_root.ladyBaby == true) {
_root.withBabyObj(11);
}
}
};
}
function checkBabywithbabycrying(i) {
var _local3 = _root.s;
_root["popFlag" + _local3] = true;
_root["standidle" + i] = true;
if (_root["popObj" + i]) {
_root.movie["bed" + i].babies.order.gotoAndPlay(_root.movie["bed" + i].item);
} else if (_root["popFlag" + i]) {
_root.movie["bed" + i].babies.order.gotoAndPlay(_root["orderItem" + i]);
} else if (_root["popOrder" + i]) {
_root.movie["bed" + i].babies.order.gotoAndPlay(_root.movie["bed" + i].order);
}
}
function withBabyObj(i) {
if (_root.movie.lady1._x < _root.ladyPos[i]) {
_root.des = "left";
_root.movie.lady1.gotoAndPlay(_root.ladyMove[3]);
_root.movie.lady1.gotoAndPlay(_root.ladyMove[4]);
_root.hits = "hit";
} else {
_root.des = "right";
_root.movie.lady1.gotoAndPlay(_root.ladyMove[10]);
_root.movie.lady1.gotoAndPlay(_root.ladyMove[13]);
_root.hits = "hit1";
}
_root.movie.lady1.babies.gotoAndStop(_root.babys);
}
function ladywithBaby(i) {
_root.babyinBed = false;
_root.delay3 = false;
_root.inc123 = 0;
_root.delay4 = false;
_root.bedcount1 = false;
_root.babycount = false;
if (_root.obLadyBaby) {
_root.delay1 = true;
_root.movie.lady1.gotoAndPlay(_root.ladyMove[10]);
_root.movie.lady1.babies.gotoAndStop("baby" + _root.bab);
} else {
_root.delay2 = true;
if (_root.movie.lady1._x < _root.ladyPos[i]) {
_root.des = "left";
_root.hits = "hit";
_root.seti = i;
_root.movie.lady1.gotoAndPlay(_root.ladyMove[3]);
_root.movie.lady1.gotoAndPlay(_root.ladyMove[4]);
_root.movie.lady1.babies.gotoAndPlay(_root.babys);
} else {
_root.seti = i;
_root.des = "right";
_root.hits = "hit1";
_root.movie.lady1.gotoAndPlay(_root.ladyMove[10]);
_root.movie.lady1.gotoAndPlay(_root.ladyMove[13]);
_root.movie.lady1.babies.gotoAndPlay(_root.babys);
}
}
}
function pressBed() {
var _local2 = 1;
while (_local2 < 7) {
if (_root["bedFlag" + _local2] == true) {
if (_root.movie.lady1.hitTest(_root.movie["bedx" + _local2].hit1)) {
var _local3 = 1;
while (_local3 < 8) {
_root.movie["bedx" + _local3].enabled = true;
_local3++;
}
_root.movie.out1.doorx2.enabled = true;
if (_root.movie["bed" + _local2].babyin == 1) {
_root.s = _local2;
_root.movie["bed" + _local2].babies.gotoAndStop(1);
_root.movie.lady1.gotoAndPlay(_root.ladyMove[11]);
_root.babyinBed = true;
_root.ladyMoves();
_root.bedcount = false;
_root["bedFlag" + _local2] = false;
_root.movie["bed" + _local2].babyin = 0;
_root.delay2 = false;
} else {
_local3 = 1;
while (_local3 < 7) {
_root.movie["bedx" + _local3].enabled = true;
_local3++;
}
_root.movie.out1.doorx2.enabled = true;
_root.bedcount = false;
_root.movie.lady1.gotoAndStop(_root.ladyMove[0]);
_root["bedFlag" + _local2] = false;
}
} else {
_root.moves(_root.des);
}
}
_local2++;
}
}
function pressBaby() {
if (_root.door2) {
if ((_root.ladyBaby == true) || (_root.ladyBaby1 == true)) {
if (_root.movie.lady1.hitTest(_root.movie.ins1.hit2)) {
var _local2 = 1;
while (_local2 < 8) {
_root.movie["bedx" + _local2].enabled = true;
_local2++;
}
_root.movie.out1.doorx2.enabled = true;
_root.babycount = false;
_root.movie.lady1.gotoAndStop(_root.ladyMove[4]);
_root.movie.lady1.babies.gotoAndStop("baby" + _root.bab);
_root.door2 = false;
_root.dealy = true;
} else {
_root.moves(_root.des);
}
} else if (_root.movie.lady1.hitTest(_root.movie.ins1[_root.hits])) {
var _local2 = 1;
while (_local2 < 8) {
_root.movie["bedx" + _local2].enabled = true;
_local2++;
}
_root.babynum++;
_root.movie.out1.doorx2.enabled = true;
var _local3 = 1;
while (_local3 < 7) {
if (_root.movie["bed" + _local3].babyin == 1) {
_root.movie.lady1.babies.gotoAndStop("baby" + _root.bab);
} else {
_root.movie.lady1.babies.gotoAndStop(_root.babyFrames);
_root.babys = _root.babyFrames;
}
_local3++;
}
_root.babycount = false;
_root.movie.ins1.babies.gotoAndStop(1);
_root.movie.lady1.gotoAndPlay(_root.ladyMove[2]);
_root.movie.lady1.babies.gotoAndStop(_root.babyFrames);
_root.babys = _root.babyFrames;
_root.ladyBaby = true;
_root.box1.score = _root.box1.score + 10;
if (_root.babynum < 6) {
_root.times1 = _root.timer;
_root.timeforDelayin = true;
}
_root.scores1 = _root.scores1 + 100;
_root.delay2 = false;
_local3 = 1;
while (_local3 < 5) {
_root.movie["ob" + _local3].enabled = true;
_local3++;
}
_root.box1.ins.gotoAndStop(1);
_root.movie.ins1.doorx2.enabled = false;
_root.movie.ins1.babies1.gotoAndStop(1);
_root.movie.ins1.gotoAndPlay(_root.ladyMove[9]);
_root.door2 = false;
} else {
_root.moves(_root.des);
}
} else if (_root.door1) {
if (_root.movie.lady1.hitTest(_root.movie.out1.doorx2.hit)) {
var _local2 = 1;
while (_local2 < 8) {
_root.movie["bedx" + _local2].enabled = true;
_local2++;
}
if (_root.ladyBaby1 || (_root.ladyBaby)) {
_root.movie.ins1.doorx2.enabled = false;
_root.movie.lady1.gotoAndStop(_root.ladyMove[13]);
_root.delay6 = true;
_root.door1 = false;
} else {
_root.bedcount1 = false;
_root.movie.lady1.gotoAndStop(_root.ladyMove[1]);
_root.delay3 = true;
_root.delay5 = false;
_root.door1 = false;
_root.babycount = false;
}
} else {
_root.moves("right");
}
}
}
function putBaby() {
_root.movie.lady1.gotoAndPlay(_root.ladyMove[5]);
_root.movie.lady1.babies.gotoAndStop(1);
_root.movie.out1.babies.gotoAndStop("baby" + _root.bab);
_root.delay7 = true;
k = _root.s;
if (_root["orderItem" + k] == "ord5") {
_root["orderItem" + k] = "";
}
if (_root["orderItems" + k] == "ord5") {
_root["orderItems" + k] = "";
}
_root.babycount = false;
_root.ladyBaby1 = false;
_root.ladyBaby = false;
_root.afterdoor1 = true;
playSound("tata");
}
function babyBuggy() {
if (_root.delayin == true) {
_root.movie.lady1.gotoAndStop(2);
_root.movie.ins1.doorx2.enabled = true;
} else {
_root.delay3 = true;
_root.bedcount1 = false;
}
if (_root.babynum == 6) {
_root.times1 = _root.timer;
_root.timeforDelayin = true;
}
var _local3 = _root.s;
_root["popFlag" + _local3] = false;
_root["popObj" + _local3] = false;
_root.babynum--;
_root.movie.out1.gotoAndPlay(_root.ladyMove[9]);
_root.movie.out1.babies.gotoAndStop("baby" + _root.bab);
if (_root.ordDoor1 == true) {
_root.box1.score = _root.box1.score + 100;
_root.scores1 = _root.scores1 + 100;
_root.ordDoor1 = false;
} else {
_root.box1.life = _root.box1.life - 1;
}
_root.idsin = setInterval(backOut, 1300);
_root.babycount = false;
_root.ladyBaby1 = false;
_root.ladyBaby = false;
_root.obLadyBaby = false;
}
function backOut() {
clearInterval(_root.idsin);
_root.movie.out1.gotoAndPlay(4);
}
function ladyMoves() {
var _local2 = 1;
while (_local2 < 7) {
if (_root.babyinBed) {
if (_root["bedFlag" + _local2] == true) {
_root.movie.lady1.gotoAndPlay(_root.ladyMove[11]);
_root.bedcount = false;
_root.s = _local2;
_root.delay2 = false;
_root.movie.lady1.babies.gotoAndPlay("baby" + _root.movie["bed" + _local2].baby);
_root.bab = _root.movie["bed" + _local2].baby;
_root.movie["bed" + _local2].babies.gotoAndStop("baby0");
_root.ordBaby = true;
_root.ladyBaby1 = true;
_root.movie["bed" + _local2].babyin = 0;
_root["bedFlag" + _local2] = false;
_root.movie["bed" + _local2].item = "";
_root["popOrder" + _local2] = false;
_root.movie["bed" + _local2].order = "";
}
} else if (_root["bedFlag" + _local2] == true) {
_root.delay2 = true;
_root.delay1 = false;
_root.delay3 = false;
_root.inc123 = 0;
if (_root.ladyBaby1 == true) {
_root.des = "left";
_root.hits = "hit";
_root.movie.lady1.gotoAndPlay(_root.ladyMove[4]);
_root.movie.lady1.babies.gotoAndPlay(_root.babys);
} else if (_root.obLadyBaby) {
_root.des = "right";
_root.hits = "hit1";
_root.movie.lady1.gotoAndPlay(_root.ladyMove[13]);
_root.movie.lady1.babies.gotoAndPlay("baby" + _root.bab);
} else {
_root.des = "left";
_root.hits = "hit";
_root.movie.lady1.gotoAndPlay(_root.ladyMove[4]);
_root.movie.lady1.babies.gotoAndPlay("baby" + _root.bab);
}
}
_local2++;
}
}
function ladyMoves2() {
var _local2 = 1;
while (_local2 < 7) {
if (_root["bedFlag" + _local2] == true) {
if (_root.movie.lady1.hitTest(_root.movie["bedx" + _local2][_root.hits])) {
var _local4 = 1;
while (_local4 < 7) {
_root.movie["bedx" + _local4].enabled = true;
_local4++;
}
_root.movie.out1.doorx2.enabled = true;
if (_root["standidle" + _local2] == true) {
_root["standidle" + _local2] = false;
} else {
var _local5 = _root.s;
if (_root["popFlag" + _local5] == true) {
_root["popObj" + _local2] = true;
_root["popFlag" + _local5] = false;
}
}
_root.beds(_local2);
} else {
_root.moves(_root.des);
}
} else if (_root["obflag" + _local2] == true) {
if (_root.movie.lady1.hitTest(_root.movie["ob" + _local2][_root.hits])) {
var _local4 = 1;
while (_local4 < 7) {
_root.movie["bedx" + _local4].enabled = true;
_local4++;
}
_root.movie.out1.doorx2.enabled = true;
if (_root.ladyBaby == true) {
if (_root.des == "right") {
_root.movie.lady1.gotoAndStop(_root.ladyMove[13]);
_root.movie.lady1.babies.gotoAndStop(_root.babys);
} else if (_root.des == "left") {
_root.movie.lady1.gotoAndStop(_root.ladyMove[4]);
_root.movie.lady1.babies.gotoAndStop(_root.babys);
}
_root.delay2 = false;
_root.bedcount = 0;
_root["obflag" + _local2] = false;
} else if ((_root.ladyBaby == false) and (_root.ladyBaby1 == false)) {
if (_root.des == "right") {
_root.movie.lady1.gotoAndStop(_root.ladyMove[1]);
} else if (_root.des == "left") {
_root.movie.lady1.gotoAndStop(_root.ladyMove[7]);
}
_root.delay2 = false;
_root["obflag" + _local2] = false;
} else {
var _local3 = _root.s;
if (_root["popFlag" + _local3] == true) {
if (_root["popObj" + _local3] == true) {
if (_root["orderItems" + _local3] == ("ord" + _local2)) {
_root.ordering(_local2);
_root.getObject = true;
_root.countAns++;
if (_root.countAns == 1) {
_root.box1.score = _root.box1.score + 100;
_root.scores1 = _root.scores1 + 100;
} else if (_root.box1.score >= 10) {
_root.box1.score = _root.box1.score - 10;
} else {
_root.box1.score = 0;
}
_root.m = _local3;
_root["popObj" + _local3] = false;
} else if (_root["orderItem" + _local3] == ("ord" + _local2)) {
_root.ordering(_local2);
_root.getObject = true;
_root.countAns++;
if (_root.countAns == 1) {
_root.box1.score = _root.box1.score + 100;
_root.scores1 = _root.scores1 + 100;
} else if (_root.box1.score >= 10) {
_root.box1.score = _root.box1.score - 10;
} else {
_root.box1.score = 0;
}
_root.m = _local3;
_local3 = 7;
} else {
if (_root.box1.score >= 40) {
_root.box1.score = _root.box1.score - 40;
}
_root.box1.life = _root.box1.life - 1;
_root.ordering(_local2);
_local3 = 7;
}
} else {
if (_root["orderItem" + _local3] == ("ord" + _local2)) {
_root.ordering(_local2);
_root.getObject = true;
_root.countAns++;
if (_root.countAns == 1) {
_root.box1.score = _root.box1.score + 100;
_root.scores1 = _root.scores1 + 100;
} else if (_root.box1.score >= 10) {
_root.box1.score = _root.box1.score - 10;
} else {
_root.box1.score = 0;
}
_root.m = _local3;
} else {
_root.box1.score = _root.box1.score - 40;
_root.box1.life = _root.box1.life - 1;
_root.ordering(_local2);
}
_root.delay2 = false;
_local3 = 7;
}
} else {
_root.standStrt();
_root["obflag" + _local2] = false;
_root.delay2 = false;
}
}
} else {
_root.moves(_root.des);
}
}
_local2++;
}
}
function ordering(i) {
if (i == 1) {
playSound("milk");
} else if (i == 2) {
playSound("objw2");
} else if (i == 3) {
playSound("toy");
} else if (i == 4) {
playSound("bath");
}
_root.movie.lady1.gotoAndPlay(_root.ladyMove[12]);
_root.obLadyBaby = true;
_root["obflag" + i] = false;
_root.delay2 = false;
}
function standStrt() {
if (_root.des == "right") {
_root.movie.lady1.gotoAndStop(_root.ladyMove[13]);
_root.movie.lady1.babies.gotoAndStop("baby" + _root.bab);
} else if (_root.des == "left") {
_root.movie.lady1.gotoAndStop(_root.ladyMove[4]);
_root.movie.lady1.babies.gotoAndStop("baby" + _root.bab);
}
}
function beds(i) {
if (_root.movie["bed" + i].babyin == 0) {
_root.countAns = 0;
_root.movie.lady1.gotoAndPlay(_root.ladyMove[5]);
if (_root.ladyBaby1 == true) {
if (_root.obLadyBaby) {
if (_root.getObject) {
_root.movie["bed" + i].babies.gotoAndPlay("babyhappy" + _root.bab);
_root.movie["bed" + i].baby = _root.bab;
playSound("laugh");
_root.obLadyBaby = false;
var _local4 = _root.s;
if (_root["popFlag" + _local4] == true) {
_root["popFlag" + _local4] = false;
_root["orderItem" + _local4] = "";
}
if (_root["popObj" + _local4] == true) {
_root["popObj" + _local4] = false;
_root["orderItems" + _local4] = "";
}
_root.delays(i);
_root.getObject = false;
} else {
_root.movie["bed" + i].babies.gotoAndPlay("babycry" + _root.bab);
_root.movie["bed" + i].baby = _root.bab;
var _local4 = _root.s;
if (_root["popFlag" + _local4] == true) {
_root["popFlag" + _local4] = false;
_root.movie["bed" + i].order = _root["orderItem" + _local4];
_root["orderItem" + _local4] = "";
} else if (_root["popObj" + _local4] == true) {
_root["popObj" + _local4] = false;
if ((_root["orderItems" + _local4] == "") || (_root["orderItems" + _local4] == undefined)) {
_root.movie["bed" + i].order = _root["orderItem" + _local4];
_root["orderItem" + _local4] = "";
} else {
_root.movie["bed" + i].order = _root["orderItems" + _local4];
_root["orderItems" + _local4] = "";
}
} else {
_root.movie["bed" + i].order = _root["orderItem" + _local4];
_root["orderItem" + _local4] = "";
}
playSound("cry");
_root.movie["bed" + i].babies.order.gotoAndPlay(_root.movie["bed" + i].order);
_root.movie["bed" + i].timerorder = _root.timer;
_root.timeforBabyorder = true;
_root.obLadyBaby = false;
_root["popOrder" + i] = true;
}
} else if (_root["popObj" + i] == true) {
_root.movie["bed" + i].babies.gotoAndPlay("babycry" + _root.bab);
_root.movie["bed" + i].baby = _root.bab;
_root["popOrder" + i] = true;
var _local4 = _root.s;
if (_root["popFlag" + _local4] == true) {
_root["popFlag" + _local4] = false;
if (_root["orderItem" + _local4] == undefined) {
_root.movie["bed" + _local4].item = _root["orderItems" + _local4];
_root["orderItems" + _local4] = "";
} else {
_root.movie["bed" + i].item = _root["orderItem" + _local4];
_root["orderItem" + _local4] = "";
}
} else if (_root["popObj" + _local4] == true) {
_root["popObj" + _local4] = false;
if ((_root["orderItems" + _local4] == undefined) || (_root["orderItems" + _local4] == "")) {
_root.movie["bed" + i].item = _root["orderItem" + _local4];
_root["orderItem" + _local4] = "";
} else {
_root.movie["bed" + i].item = _root["orderItems" + _local4];
_root["orderItems" + _local4] = "";
}
} else {
_root.movie["bed" + i].item = _root["orderItem" + _local4];
_root["orderItem" + _local4] = "";
}
_root["popObj" + i] = true;
_root.movie["bed" + i].babies.order.gotoAndPlay(_root.movie["bed" + i].item);
_root.movie["bed" + i].timerorder = _root.timer;
_root.timeforBabyorder = true;
_root.ordDoor1 = false;
playSound("cry");
} else {
_root.movie["bed" + i].babies.gotoAndPlay("baby" + _root.bab);
_root.movie["bed" + i].baby = _root.bab;
_root.delays(i);
playSound("sleep");
}
_root.ladyBaby1 = false;
_root.ladyBaby = false;
} else {
_root.flagForEnter = true;
_root.movie["bed" + i].babies.gotoAndPlay("baby" + (_root.babys - 1));
_root.movie["bed" + i].baby = _root.babys - 1;
_root.ladyBaby = false;
_root.delays(i);
}
_root["bedFlag" + i] = false;
_root.movie.lady1.babies.gotoAndStop(1);
_root.movie["bed" + i].babyin = 1;
_root.babyinBed = true;
_root.bedcount = false;
_root.bedcount1 = false;
_root.delay3 = true;
_root["babyinFlag" + i] = true;
_root.delay2 = false;
_root.rightLadyBaby = false;
} else {
_root.delay5 = false;
if (_root.rightLadyBaby) {
_root["bedFlag" + i] = false;
_root.movie.lady1.gotoAndStop(_root.ladyMove[13]);
_root.movie.lady1.babies.gotoAndPlay(("baby" + _root.babys) - 1);
_root.delay2 = false;
_root.rightLadyBaby = false;
} else if (_root.des == "left") {
_root["bedFlag" + i] = false;
_root.movie.lady1.gotoAndStop(_root.ladyMove[4]);
_root.movie.lady1.babies.gotoAndPlay(("baby" + _root.babys) - 1);
_root.delay2 = false;
_root.rightLadyBaby = false;
} else {
_root["bedFlag" + i] = false;
_root.movie.lady1.gotoAndStop(_root.ladyMove[13]);
_root.movie.lady1.babies.gotoAndPlay(("baby" + _root.babys) - 1);
_root.delay2 = false;
_root.rightLadyBaby = false;
}
}
}
function ladyMoves3() {
if (_root.babycount == true) {
_root.movie.lady1.gotoAndStop(1);
_root.delay3 = false;
_root.inc123 = 0;
} else {
_root.movie.lady1.gotoAndStop(_root.ladyMove[6]);
_root.movie.lady1.gotoAndPlay(_root.ladyMove[7]);
_root.delay3 = false;
_root.inc123 = 0;
_root.delay4 = true;
}
}
function walkLady() {
if (_root.bedcount1) {
var _local2 = 1;
while (_local2 < 7) {
if (_root["bedFlag" + _local2] == true) {
if (_root.movie.lady1.hitTest(_root.movie["bedx" + _local2].hit)) {
if (_root.movie["bed" + _local2].babyin == 1) {
_root.movie["bed" + _local2].babies.gotoAndStop(1);
_root.movie.lady1.gotoAndPlay(_root.ladyMove[11]);
_root.ladyMoves();
_root.babyinBed = true;
_root.bedcount = false;
_root.delay4 = false;
_root["bedFlag" + _local2] = false;
} else {
_root.movie.lady1.gotoAndStop(2);
_root.delay4 = false;
_root["bedFlag" + _local2] = false;
}
} else {
_root.moves("left");
}
}
_local2++;
}
} else if (_root.movie.lady1.hitTest(_root.movie.hits)) {
_root.movie.lady1.gotoAndStop(1);
_root.delay4 = false;
} else {
_root.moves("left");
}
}
function orderObj(i) {
if (_root["babyinFlag" + i]) {
if (_root.movie["bed" + i].babyin == 1) {
_root.babyinBed = true;
_root.movie["bed" + i].babies.gotoAndStop("babycry" + _root.movie["bed" + i].baby);
_root.box1["b" + i].gotoAndStop("blink");
playSound("cry");
_root.movie["bed" + i].timerorder = _root.timer;
_root["standidle" + i] = false;
_root.timeforBabyorder = true;
if (_root["popObj" + i]) {
_root.movie["bed" + i].item = "ord" + _root.movie["bed" + i].orderFrames;
_root.movie["bed" + i].babies.order.gotoAndPlay(_root.movie["bed" + i].item);
} else {
_root["popOrder" + i] = true;
_root.movie["bed" + i].order = "ord" + _root.movie["bed" + i].orderFrames;
_root.movie["bed" + i].babies.order.gotoAndPlay(_root.movie["bed" + i].order);
}
}
}
}
function delays(i) {
if (i == 1) {
_root.beddelay1 = true;
_root.movie["bed" + i].orderFrames = 1 + random(5);
} else if (i == 2) {
_root.beddelay2 = true;
_root.movie["bed" + i].orderFrames = 1 + random(5);
} else if (i == 3) {
_root.beddelay3 = true;
_root.movie["bed" + i].orderFrames = 1 + random(5);
} else if (i == 4) {
_root.beddelay4 = true;
_root.movie["bed" + i].orderFrames = 1 + random(5);
} else if (i == 5) {
_root.beddelay5 = true;
_root.movie["bed" + i].orderFrames = 1 + random(5);
} else if (i == 6) {
_root.beddelay6 = true;
_root.movie["bed" + i].orderFrames = 1 + random(5);
}
}
function attachObjects() {
var _local2 = 1;
while (_local2 < 7) {
_root.movie["bed" + _local2].babyin = 0;
_local2++;
}
_root.delayin = true;
_root.movie.out1.gotoAndPlay(4);
_root.ladyMove = ["strtright", "walk left", "carry baby", "turnbabyright", "walkbabyright", "putbabyinbed", "turn left", "walk right", "turn right", "aftertakingbaby", "turnbabyleft", "takebabyfrombed", "carebaby", "walkbabyleft", "put baby"];
_root.ladyPos = [1580, 1402, 1262, 1142, 982, 842, 702, 562, 1585, 1679, 1787, 1879, 641, 1889, 572];
_root.box1.b1.onPress = function () {
if (!_root.Paused) {
_root.movie._x = -605.8;
}
};
_root.box1.b2.onPress = function () {
_root.movie._x = -605.8;
};
_root.box1.b3.onPress = function () {
_root.movie._x = -605.8;
};
_root.box1.b4.onPress = function () {
_root.movie._x = -605.8;
};
_root.box1.b5.onPress = function () {
_root.movie._x = -605.8;
};
_root.box1.b6.onPress = function () {
_root.movie._x = -1205.8;
};
_root.box1.room.onPress = function () {
_root.movie._x = -1205.8;
};
_root.box1.ins.onPress = function () {
_root.movie._x = -75.8;
};
_root.box1.out.onPress = function () {
_root.movie._x = -75.8;
};
}
function initLevel(which) {
clearCanvas();
setVariable("Paused", false, "initLevel");
setVariable("delayin", true, "initLevel");
setVariable("delay1", false, "initLevel");
setVariable("delay2", false, "initLevel");
setVariable("delay3", false, "initLevel");
setVariable("delay4", false, "initLevel");
setVariable("delay5", false, "initLevel");
setVariable("delay6", false, "initLevel");
setVariable("delay7", false, "initLevel");
setVariable("dealy", false, "initLevel");
setVariable("beddelay1", false, "initLevel");
setVariable("beddelay2", false, "initLevel");
setVariable("beddelay3", false, "initLevel");
setVariable("beddelay4", false, "initLevel");
setVariable("beddelay5", false, "initLevel");
setVariable("beddelay6", false, "initLevel");
setVariable("delayOut", false, "initLevel");
setVariable("inc01", 0, "initLevel");
setVariable("incf1", 0, "initLevel");
setVariable("inc02", 0, "initLevel");
setVariable("inc03", 0, "initLevel");
setVariable("inc04", 0, "initLevel");
setVariable("inc05", 0, "initLevel");
setVariable("inc06", 0, "initLevel");
setVariable("inc2", 0, "initLevel");
setVariable("inc1", 0, "initLevel");
setVariable("inc11", 0, "initLevel");
setVariable("inc12", 0, "initLevel");
setVariable("inc123", 0, "initLevel");
setVariable("inc071", 0, "initLevel");
setVariable("bgLeftExtreme", -75.8, "initLevel");
setVariable("bgRightExtreme", -1205.8, "initLevel");
setVariable("babycount1", 0, "initLevel");
setVariable("countAns", 0, "initLevel");
setVariable("babycount", false, "initLevel");
setVariable("bedFlag1", false, "initLevel");
setVariable("bedFlag2", false, "initLevel");
setVariable("bedFlag3", false, "initLevel");
setVariable("bedFlag4", false, "initLevel");
setVariable("bedFlag5", false, "initLevel");
setVariable("bedFlag6", false, "initLevel");
setVariable("obflag1", false, "initLevel");
setVariable("obflag2", false, "initLevel");
setVariable("obflag3", false, "initLevel");
setVariable("obflag4", false, "initLevel");
setVariable("ladyBaby", false, "initLevel");
setVariable("bedcount", false, "initLevel");
setVariable("bedcount1", false, "initLevel");
setVariable("babyinBed", false, "initLevel");
setVariable("ladyBaby1", false, "initLevel");
setVariable("ordBaby", false, "initLevel");
setVariable("obLadyBaby", false, "initLevel");
setVariable("babyinFlag", false, "initLevel");
setVariable("rightLadyBaby", false, "initLevel");
setVariable("popOrder1", false, "initLevel");
setVariable("popOrder2", false, "initLevel");
setVariable("popOrder3", false, "initLevel");
setVariable("popOrder4", false, "initLevel");
setVariable("popOrder5", false, "initLevel");
setVariable("popOrder6", false, "initLevel");
setVariable("popFlag1", false, "initLevel");
setVariable("popFlag2", false, "initLevel");
setVariable("popFlag3", false, "initLevel");
setVariable("popFlag4", false, "initLevel");
setVariable("popFlag5", false, "initLevel");
setVariable("popFlag6", false, "initLevel");
setVariable("popObj1", false, "initLevel");
setVariable("popObj2", false, "initLevel");
setVariable("popObj3", false, "initLevel");
setVariable("popObj4", false, "initLevel");
setVariable("popObj5", false, "initLevel");
setVariable("popObj6", false, "initLevel");
setVariable("flagForEnter", false, "initLevel");
setVariable("standidle1", false, "initLevel");
setVariable("standidle2", false, "initLevel");
setVariable("standidle3", false, "initLevel");
setVariable("standidle4", false, "initLevel");
setVariable("standidle5", false, "initLevel");
setVariable("standidle6", false, "initLevel");
setVariable("door1", false, "initLevel");
setVariable("door2", false, "initLevel");
setVariable("orderTime", false, "initLevel");
setVariable("times1", 0, "initLevel");
setVariable("seti", 0, "initLevel");
setVariable("times2", 0, "initLevel");
setVariable("ladySpeed", 17, "initLevel");
setVariable("afterdoor1", false, "initLevel");
setVariable("timeforDelayin", false, "initLevel");
setVariable("timeforBabyorder", false, "initLevel");
setVariable("babyin", 0, "initLevel");
setVariable("InitTime", getTimer(), "initLevel");
setVariable("timer", 0, "initLevel");
setVariable("score", 0, "initLevel");
setVariable("scores", 0, "initLevel");
setVariable("scores1", 0, "initLevel");
setVariable("scored", 0, "initLevel");
setVariable("idsin", 0, "initLevel");
setVariable("s", 0, "initLevel");
setVariable("timerorder", 0, "initLevel");
setVariable("m", 0, "initLevel");
setVariable("secs", 0, "initLevel");
setVariable("ordDoor1", false, "initLevel");
setVariable("getObject", false, "initLevel");
setVariable("babynum", 0, "initLevel");
if (_root.level == 1) {
setVariable("scored", 0, "initLevel");
_root.box1.life = 10;
}
if (_root.level == 1) {
_root.loss2 = 700;
_root.secs = 200;
_root.babysec = 40;
setVariable("secsforbabyin", 20, "initLevel");
setVariable("secsforcry", 25, "initLevel");
setVariable("numcry", 100, "initLevel");
} else if ((_root.level == 2) || (_root.level == 3)) {
_root.loss2 = 400;
_root.secs = 150;
_root.babysec = 20;
setVariable("secsforbabyin", 20, "initLevel");
setVariable("secsforcry", 20, "initLevel");
setVariable("numcry", 90, "initLevel");
} else if (((_root.level == 4) || (_root.level == 5)) || (_root.level == 6)) {
_root.loss2 = 400;
_root.secs = 100;
_root.babysec = 10;
setVariable("secsforcry", 15, "initLevel");
setVariable("secsforbabyin", 20, "initLevel");
setVariable("numcry", 80, "initLevel");
} else if (((_root.level == 7) || (_root.level == 8)) || (_root.level == 9)) {
_root.loss2 = 1000;
_root.secs = 80;
_root.babysec = 8;
setVariable("secsforcry", 10, "initLevel");
setVariable("secsforbabyin", 15, "initLevel");
setVariable("numcry", 70, "initLevel");
} else if (_root.level == 10) {
_root.loss2 = 800;
_root.secs = 50;
_root.babysec = 6;
setVariable("secsforcry", 8, "initLevel");
setVariable("secsforbabyin", 12, "initLevel");
setVariable("numcry", 60, "initLevel");
} else if (_root.level == 11) {
_root.loss2 = 600;
_root.secs = 40;
_root.babysec = 5;
setVariable("secsforcry", 6, "initLevel");
setVariable("secsforbabyin", 10, "initLevel");
setVariable("numcry", 50, "initLevel");
} else if (_root.level == 12) {
_root.loss2 = 500;
_root.secs = 30;
_root.babysec = 4;
setVariable("secsforcry", 5, "initLevel");
setVariable("secsforbabyin", 8, "initLevel");
setVariable("numcry", 40, "initLevel");
} else if (_root.level == 13) {
_root.loss2 = 500;
_root.secs = 20;
_root.babysec = 3;
setVariable("secsforcry", 4, "initLevel");
setVariable("secsforbabyin", 6, "initLevel");
setVariable("numcry", 30, "initLevel");
} else if (_root.level == 14) {
_root.loss2 = 6000;
_root.secs = 20;
_root.babysec = 2;
setVariable("secsforcry", 3, "initLevel");
setVariable("secsforbabyin", 4, "initLevel");
setVariable("numcry", 20, "initLevel");
} else if (_root.level == 15) {
_root.loss2 = 10200;
_root.secs = 10;
_root.babysec = 2;
setVariable("secsforcry", 2, "initLevel");
setVariable("secsforbabyin", 3, "initLevel");
setVariable("numcry", 10, "initLevel");
}
attachObjects();
}
function levelUp() {
setVariable("Paused", true, "level Up");
setVariable("level", _root.level + 1, "level Up");
(gotoAndPlay("levelup"));// not popped
}
function gameOver() {
setVariable("Paused", true, "gameOver");
clearCanvas();
(gotoAndPlay("gameover"));// not popped
}
function gameWon() {
setVariable("Paused", true, "gameWon");
clearCanvas();
(gotoAndPlay("congrats"));// not popped
}
function helpDisplay() {
setVariable("Paused", true, "helpDisplay");
attachMovie("help", "help", 30000, {_x:320, _y:205});
help.back_Btn.onPress = function () {
_root.Paused = false;
_root.menu_Btn.enabled = true;
_root.help._visible = false;
_root.box1.enabled = true;
};
}
function backtoMenu() {
clearCanvas();
_root.level = 0;
(gotoAndPlay("menu"));// not popped
}
function toggleSound() {
if (_root.soundReady) {
_root.music.stop();
_root.soundReady = false;
sound_Mc.gotoAndStop(4);
} else {
_root.music.stop();
_root.music.start();
_root.onSoundComplete = function () {
if (_root.soundReady) {
_root.music.start();
}
};
_root.soundReady = true;
sound_Mc.gotoAndStop(3);
}
}
static function initialize(movieClip) {
movieClip.__proto__ = com.csharks.gameEngine.Game.prototype;
movieClip.gameInit();
}
function gameInit() {
init_Mc.onRelease = function () {
this._parent.setVariable("gameState", "init", "init_Mc");
};
action_Mc.onRelease = function () {
this._parent.setVariable("gameState", "action", "action_Mc");
};
levelup_Mc.onRelease = function () {
this._parent.setVariable("gameState", "levelup", "levelup_Mc");
};
gameover_Mc.onRelease = function () {
this._parent.setVariable("gameState", "gameover", "gameover_Mc");
};
gamewon_Mc.onRelease = function () {
this._parent.setVariable("gameState", "gamewon", "gamewon_Mc");
};
help_Btn.onRelease = function () {
this._parent.helpDisplay();
};
menu_Btn.onRelease = function () {
this._parent.backtoMenu();
};
restart_Btn.onRelease = function () {
if (!_root.Paused) {
this._parent.backtoMenu();
}
};
sound_Mc.onRelease = function () {
this._parent.toggleSound();
};
sound_Mc.onRollOver = function () {
if (_root.soundReady) {
this._parent.sound_Mc.gotoAndStop(4);
} else {
this._parent.sound_Mc.gotoAndStop(3);
}
};
sound_Mc.onRollOut = function () {
if (_root.soundReady) {
this._parent.sound_Mc.gotoAndStop(1);
} else {
this._parent.sound_Mc.gotoAndStop(2);
}
};
if (_root.soundReady) {
sound_Mc.gotoAndStop(1);
} else {
sound_Mc.gotoAndStop(2);
}
if ((_root.level == 0) || (_root.level == undefined)) {
setVariable("gameState", "init", "gameInit");
} else {
initLevel(_root.level);
setVariable("gameState", "action", "gameInit");
}
stop();
onEnterFrame = function () {
switch (_root.gameState) {
case "init" :
this.setVariable("level", 1, "init");
this.setVariable("score", 0, "init");
this.setVariable("life", 3, "init");
this.setVariable("startTime", getTimer(), "init");
this.setVariable("gameState", "action", "init");
this.initLevel(_root.level);
break;
case "action" :
if (!_root.Paused) {
this.action();
}
break;
case "levelup" :
if (!_root.Paused) {
this.levelUp();
}
break;
case "gameover" :
if (!_root.Paused) {
this.gameOver();
}
break;
case "gamewon" :
if (_root.Paused) {
break;
}
this.gameWon();
}
};
}
var ladyMove = new Array();
var ladyPos = new Array();
var babyNum = new Array();
}
Symbol 340 MovieClip [__Packages.include.gameTransitions] Frame 0
class include.gameTransitions extends MovieClip
{
var stop, playAgain_Btn, submit_Btn, ok_Btn, gotoAndPlay, gotoAndStop;
function gameTransitions () {
super();
}
static function initialize(movieClip, transition) {
movieClip.__proto__ = include.gameTransitions.prototype;
movieClip.menuInit(transition);
}
function menuInit(transition) {
stop();
switch (transition) {
case "gameover" :
playAgain_Btn.onRelease = function () {
this._parent.gameStart();
};
submit_Btn.onRelease = function () {
this._parent.submitScore();
};
break;
case "gamewin" :
playAgain_Btn.onRelease = function () {
this._parent.gameStart();
};
submit_Btn.onRelease = function () {
this._parent.submitScore();
};
break;
case "levelup" :
ok_Btn.onRelease = function () {
this._parent.levelStart();
};
break;
case "highscores" :
ok_Btn.onRelease = function () {
this._parent.gameStart();
};
}
}
function gameStart() {
_root.level = 0;
(gotoAndPlay("game"));// not popped
}
function levelStart() {
(gotoAndPlay("game"));// not popped
}
function submitScore() {
var _local3 = new LoadVars();
var _local4 = new LoadVars();
_local3.score = _root.score;
var _local5 = new include.md5();
_local3.checks = _local5.calcMD5(((_local3.user + ".") + _local3.score) + "sdfsjdh hfihfoh. fgdflg dkkdgd fgfdgfd.");
_local3.sendAndLoad(_root.sendUrl, _local4);
_local4.onLoad = function (success) {
(this.gotoAndPlay("submitSuccess"));// not popped
};
(gotoAndStop("highscores"));// not popped
}
}
Symbol 341 MovieClip [__Packages.include.md5] Frame 0
class include.md5 extends MovieClip
{
function md5 (str) {
super();
}
function bitOR(a, b) {
var _local1 = (a & 1) | (b & 1);
var _local2 = (a >>> 1) | (b >>> 1);
return((_local2 << 1) | _local1);
}
function bitXOR(a, b) {
var _local1 = (a & 1) ^ (b & 1);
var _local2 = (a >>> 1) ^ (b >>> 1);
return((_local2 << 1) | _local1);
}
function bitAND(a, b) {
var _local1 = (a & 1) & (b & 1);
var _local2 = (a >>> 1) & (b >>> 1);
return((_local2 << 1) | _local1);
}
function addme(x, y) {
var _local1 = (x & 65535) + (y & 65535);
var _local2 = ((x >> 16) + (y >> 16)) + (_local1 >> 16);
return((_local2 << 16) | (_local1 & 65535));
}
function rhex(num) {
var _local4 = "";
var _local2 = 0;
while (_local2 <= 3) {
_local4 = _local4 + (hex_chr.charAt((num >> ((_local2 * 8) + 4)) & 15) + hex_chr.charAt((num >> (_local2 * 8)) & 15));
_local2++;
}
return(_local4);
}
function str2blks_MD5(str) {
var _local4 = ((str.length + 8) >> 6) + 1;
var _local3 = new Array(_local4 * 16);
var _local1 = 0;
while (_local1 < (_local4 * 16)) {
_local3[_local1] = 0;
_local1++;
}
_local1 = 0;
while (_local1 < str.length) {
_local3[_local1 >> 2] = _local3[_local1 >> 2] | (str.charCodeAt(_local1) << ((((str.length * 8) + _local1) % 4) * 8));
_local1++;
}
_local3[_local1 >> 2] = _local3[_local1 >> 2] | (128 << ((((str.length * 8) + _local1) % 4) * 8));
var _local5 = str.length * 8;
_local3[(_local4 * 16) - 2] = _local5 & 255;
_local3[(_local4 * 16) - 2] = _local3[(_local4 * 16) - 2] | (((_local5 >>> 8) & 255) << 8);
_local3[(_local4 * 16) - 2] = _local3[(_local4 * 16) - 2] | (((_local5 >>> 16) & 255) << 16);
_local3[(_local4 * 16) - 2] = _local3[(_local4 * 16) - 2] | (((_local5 >>> 24) & 255) << 24);
return(_local3);
}
function rol(num, cnt) {
return((num << cnt) | (num >>> (32 - cnt)));
}
function cmn(q, a, b, x, s, t) {
return(addme(rol(addme(addme(a, q), addme(x, t)), s), b));
}
function ff(a, b, c, d, x, s, t) {
return(cmn(bitOR(bitAND(b, c), bitAND(~b, d)), a, b, x, s, t));
}
function gg(a, b, c, d, x, s, t) {
return(cmn(bitOR(bitAND(b, d), bitAND(c, ~d)), a, b, x, s, t));
}
function hh(a, b, c, d, x, s, t) {
return(cmn(bitXOR(bitXOR(b, c), d), a, b, x, s, t));
}
function ii(a, b, c, d, x, s, t) {
return(cmn(bitXOR(c, bitOR(b, ~d)), a, b, x, s, t));
}
function calcMD5(str) {
var _local7 = str2blks_MD5(str);
var _local5 = 1732584193 /* 0x67452301 */;
var _local4 = -271733879;
var _local3 = -1732584194;
var _local2 = 271733878 /* 0x10325476 */;
var _local12;
var _local6 = 0;
while (_local6 < _local7.length) {
var _local11 = _local5;
var _local10 = _local4;
var _local9 = _local3;
var _local8 = _local2;
_local12 = 0;
_local5 = ff(_local5, _local4, _local3, _local2, _local7[_local6 + 0], 7, -680876936);
_local2 = ff(_local2, _local5, _local4, _local3, _local7[_local6 + 1], 12, -389564586);
_local3 = ff(_local3, _local2, _local5, _local4, _local7[_local6 + 2], 17, 606105819);
_local4 = ff(_local4, _local3, _local2, _local5, _local7[_local6 + 3], 22, -1044525330);
_local5 = ff(_local5, _local4, _local3, _local2, _local7[_local6 + 4], 7, -176418897);
_local2 = ff(_local2, _local5, _local4, _local3, _local7[_local6 + 5], 12, 1200080426);
_local3 = ff(_local3, _local2, _local5, _local4, _local7[_local6 + 6], 17, -1473231341);
_local4 = ff(_local4, _local3, _local2, _local5, _local7[_local6 + 7], 22, -45705983);
_local5 = ff(_local5, _local4, _local3, _local2, _local7[_local6 + 8], 7, 1770035416);
_local2 = ff(_local2, _local5, _local4, _local3, _local7[_local6 + 9], 12, -1958414417);
_local3 = ff(_local3, _local2, _local5, _local4, _local7[_local6 + 10], 17, -42063);
_local4 = ff(_local4, _local3, _local2, _local5, _local7[_local6 + 11], 22, -1990404162);
_local5 = ff(_local5, _local4, _local3, _local2, _local7[_local6 + 12], 7, 1804603682);
_local2 = ff(_local2, _local5, _local4, _local3, _local7[_local6 + 13], 12, -40341101);
_local3 = ff(_local3, _local2, _local5, _local4, _local7[_local6 + 14], 17, -1502002290);
_local4 = ff(_local4, _local3, _local2, _local5, _local7[_local6 + 15], 22, 1236535329);
_local5 = gg(_local5, _local4, _local3, _local2, _local7[_local6 + 1], 5, -165796510);
_local2 = gg(_local2, _local5, _local4, _local3, _local7[_local6 + 6], 9, -1069501632);
_local3 = gg(_local3, _local2, _local5, _local4, _local7[_local6 + 11], 14, 643717713);
_local4 = gg(_local4, _local3, _local2, _local5, _local7[_local6 + 0], 20, -373897302);
_local5 = gg(_local5, _local4, _local3, _local2, _local7[_local6 + 5], 5, -701558691);
_local2 = gg(_local2, _local5, _local4, _local3, _local7[_local6 + 10], 9, 38016083);
_local3 = gg(_local3, _local2, _local5, _local4, _local7[_local6 + 15], 14, -660478335);
_local4 = gg(_local4, _local3, _local2, _local5, _local7[_local6 + 4], 20, -405537848);
_local5 = gg(_local5, _local4, _local3, _local2, _local7[_local6 + 9], 5, 568446438);
_local2 = gg(_local2, _local5, _local4, _local3, _local7[_local6 + 14], 9, -1019803690);
_local3 = gg(_local3, _local2, _local5, _local4, _local7[_local6 + 3], 14, -187363961);
_local4 = gg(_local4, _local3, _local2, _local5, _local7[_local6 + 8], 20, 1163531501);
_local5 = gg(_local5, _local4, _local3, _local2, _local7[_local6 + 13], 5, -1444681467);
_local2 = gg(_local2, _local5, _local4, _local3, _local7[_local6 + 2], 9, -51403784);
_local3 = gg(_local3, _local2, _local5, _local4, _local7[_local6 + 7], 14, 1735328473);
_local4 = gg(_local4, _local3, _local2, _local5, _local7[_local6 + 12], 20, -1926607734);
_local5 = hh(_local5, _local4, _local3, _local2, _local7[_local6 + 5], 4, -378558);
_local2 = hh(_local2, _local5, _local4, _local3, _local7[_local6 + 8], 11, -2022574463);
_local3 = hh(_local3, _local2, _local5, _local4, _local7[_local6 + 11], 16, 1839030562);
_local4 = hh(_local4, _local3, _local2, _local5, _local7[_local6 + 14], 23, -35309556);
_local5 = hh(_local5, _local4, _local3, _local2, _local7[_local6 + 1], 4, -1530992060);
_local2 = hh(_local2, _local5, _local4, _local3, _local7[_local6 + 4], 11, 1272893353);
_local3 = hh(_local3, _local2, _local5, _local4, _local7[_local6 + 7], 16, -155497632);
_local4 = hh(_local4, _local3, _local2, _local5, _local7[_local6 + 10], 23, -1094730640);
_local5 = hh(_local5, _local4, _local3, _local2, _local7[_local6 + 13], 4, 681279174);
_local2 = hh(_local2, _local5, _local4, _local3, _local7[_local6 + 0], 11, -358537222);
_local3 = hh(_local3, _local2, _local5, _local4, _local7[_local6 + 3], 16, -722521979);
_local4 = hh(_local4, _local3, _local2, _local5, _local7[_local6 + 6], 23, 76029189);
_local5 = hh(_local5, _local4, _local3, _local2, _local7[_local6 + 9], 4, -640364487);
_local2 = hh(_local2, _local5, _local4, _local3, _local7[_local6 + 12], 11, -421815835);
_local3 = hh(_local3, _local2, _local5, _local4, _local7[_local6 + 15], 16, 530742520);
_local4 = hh(_local4, _local3, _local2, _local5, _local7[_local6 + 2], 23, -995338651);
_local5 = ii(_local5, _local4, _local3, _local2, _local7[_local6 + 0], 6, -198630844);
_local2 = ii(_local2, _local5, _local4, _local3, _local7[_local6 + 7], 10, 1126891415);
_local3 = ii(_local3, _local2, _local5, _local4, _local7[_local6 + 14], 15, -1416354905);
_local4 = ii(_local4, _local3, _local2, _local5, _local7[_local6 + 5], 21, -57434055);
_local5 = ii(_local5, _local4, _local3, _local2, _local7[_local6 + 12], 6, 1700485571);
_local2 = ii(_local2, _local5, _local4, _local3, _local7[_local6 + 3], 10, -1894986606);
_local3 = ii(_local3, _local2, _local5, _local4, _local7[_local6 + 10], 15, -1051523);
_local4 = ii(_local4, _local3, _local2, _local5, _local7[_local6 + 1], 21, -2054922799);
_local5 = ii(_local5, _local4, _local3, _local2, _local7[_local6 + 8], 6, 1873313359);
_local2 = ii(_local2, _local5, _local4, _local3, _local7[_local6 + 15], 10, -30611744);
_local3 = ii(_local3, _local2, _local5, _local4, _local7[_local6 + 6], 15, -1560198380);
_local4 = ii(_local4, _local3, _local2, _local5, _local7[_local6 + 13], 21, 1309151649);
_local5 = ii(_local5, _local4, _local3, _local2, _local7[_local6 + 4], 6, -145523070);
_local2 = ii(_local2, _local5, _local4, _local3, _local7[_local6 + 11], 10, -1120210379);
_local3 = ii(_local3, _local2, _local5, _local4, _local7[_local6 + 2], 15, 718787259);
_local4 = ii(_local4, _local3, _local2, _local5, _local7[_local6 + 9], 21, -343485551);
_local5 = addme(_local5, _local11);
_local4 = addme(_local4, _local10);
_local3 = addme(_local3, _local9);
_local2 = addme(_local2, _local8);
_local6 = _local6 + 16;
}
return(((rhex(_local5) + rhex(_local4)) + rhex(_local3)) + rhex(_local2));
}
var hex_chr = "0123456789abcdef";
}
Symbol 99 MovieClip Frame 1
stop();
stop();
Symbol 99 MovieClip Frame 7
stop();
Symbol 99 MovieClip Frame 8
stop();
Symbol 99 MovieClip Frame 9
stop();
Symbol 99 MovieClip Frame 10
stop();
Symbol 99 MovieClip Frame 11
stop();
Symbol 136 MovieClip Frame 1
stop();
Symbol 136 MovieClip Frame 11
stop();
Symbol 136 MovieClip Frame 20
stop();
Symbol 136 MovieClip Frame 28
stop();
Symbol 136 MovieClip Frame 39
stop();
Symbol 136 MovieClip Frame 48
stop();
Symbol 136 MovieClip Frame 56
stop();
Symbol 136 MovieClip Frame 67
stop();
Symbol 136 MovieClip Frame 76
stop();
Symbol 136 MovieClip Frame 84
stop();
Symbol 136 MovieClip Frame 95
stop();
Symbol 136 MovieClip Frame 104
stop();
Symbol 136 MovieClip Frame 112
stop();
Symbol 136 MovieClip Frame 123
stop();
Symbol 136 MovieClip Frame 132
stop();
Symbol 136 MovieClip Frame 140
stop();
Symbol 136 MovieClip Frame 151
stop();
Symbol 136 MovieClip Frame 160
stop();
Symbol 136 MovieClip Frame 168
stop();
Symbol 155 MovieClip Frame 1
stop();
Symbol 155 MovieClip Frame 2
stop();
Symbol 155 MovieClip Frame 3
stop();
Symbol 155 MovieClip Frame 4
stop();
Symbol 155 MovieClip Frame 5
stop();
Symbol 155 MovieClip Frame 6
stop();
Symbol 155 MovieClip Frame 7
stop();
Symbol 161 MovieClip Frame 1
stop();
Symbol 161 MovieClip Frame 11
stop();
Symbol 161 MovieClip Frame 29
stop();
Symbol 229 MovieClip Frame 26
stop();
Symbol 230 MovieClip Frame 1
stop();
Symbol 230 MovieClip Frame 2
stop();
Symbol 230 MovieClip Frame 17
gotoAndPlay ("walk left");
Symbol 230 MovieClip Frame 23
gotoAndPlay ("turn right");
Symbol 230 MovieClip Frame 37
gotoAndPlay ("walk right");
Symbol 230 MovieClip Frame 43
gotoAndPlay ("turn left");
Symbol 230 MovieClip Frame 50
stop();
Symbol 230 MovieClip Frame 55
stop();
Symbol 230 MovieClip Frame 69
gotoAndPlay ("walkbabyleft");
Symbol 230 MovieClip Frame 75
stop();
Symbol 230 MovieClip Frame 89
gotoAndPlay ("walkbabyright");
Symbol 230 MovieClip Frame 95
stop();
Symbol 230 MovieClip Frame 104
stop();
Symbol 230 MovieClip Frame 106
stop();
Symbol 230 MovieClip Frame 113
stop();
Symbol 230 MovieClip Frame 120
stop();
Symbol 240 MovieClip Frame 1
stop();
Symbol 240 MovieClip Frame 2
stop();
Symbol 240 MovieClip Frame 3
stop();
Symbol 246 MovieClip Frame 1
stop();
Symbol 246 MovieClip Frame 2
stop();
Symbol 246 MovieClip Frame 3
stop();
Symbol 251 MovieClip Frame 1
stop();
Symbol 251 MovieClip Frame 2
stop();
Symbol 251 MovieClip Frame 3
stop();
Symbol 256 MovieClip Frame 1
stop();
Symbol 256 MovieClip Frame 2
stop();
Symbol 256 MovieClip Frame 3
stop();
Symbol 262 MovieClip Frame 1
stop();
Symbol 262 MovieClip Frame 2
stop();
Symbol 262 MovieClip Frame 3
stop();
Symbol 267 MovieClip Frame 1
stop();
Symbol 267 MovieClip Frame 2
stop();
Symbol 267 MovieClip Frame 3
stop();
Symbol 273 MovieClip Frame 1
stop();
Symbol 273 MovieClip Frame 2
stop();
Symbol 273 MovieClip Frame 3
stop();
Symbol 278 MovieClip Frame 1
stop();
Symbol 278 MovieClip Frame 2
stop();
Symbol 278 MovieClip Frame 3
stop();
Symbol 281 MovieClip Frame 1
stop();
Symbol 281 MovieClip Frame 2
stop();
Symbol 295 Button
on (release) {
getURL ("http://www.games2girls.com/", "_blank");
}
Symbol 314 Button
on (release) {
getURL ("http://www.games2girls.com/", "_blank");
}