Frame 1
function grow() {
if (pregnancy < krystal.pregnant._totalframes) {
pregnancy++;
krystal.pregnant.gotoAndStop(pregnancy);
} else {
growth = 0;
}
}
function revert() {
if (pregnancy > 1) {
pregnancy--;
krystal.pregnant.gotoAndStop(pregnancy);
} else {
growth = 0;
}
}
function timeout_fn() {
if (!timer) {
condition = "";
setState(curState.state);
delete _root.onEnterFrame;
}
timer--;
}
function setState(str) {
if (condition != "") {
return(undefined);
}
if (state != str) {
curState.state = str;
state = str;
curState.state = state;
for (var _local2 in states[str]) {
curState[_local2] = states[str][_local2];
}
krystal.head.eye.gotoAndPlay(curState.eye);
krystal.head.mouth.gotoAndPlay(curState.mouth);
krystal.breasts.gotoAndPlay(curState.body);
krystal.breastplate.gotoAndPlay(curState.body);
if (((curState.leftarm == "down") && (krystal.leftarm._currentlabel != "down")) && (krystal.leftarm._currentlabel != "movedown")) {
krystal.leftarm.gotoAndPlay("movedown");
} else if (((curState.leftarm == "onbelly") && (krystal.leftarm._currentlabel != "onbelly")) && (krystal.leftarm._currentlabel != "tobelly")) {
krystal.leftarm.gotoAndPlay("tobelly");
}
canBlink = curState.canBlink;
krystal.head.eye.pupil._x = pX + curState.pX;
krystal.head.eye.pupil._y = pY + curState.pY;
}
}
function addAccessory(name, clip) {
var _local2 = _clothes.attachMovie("_item", "_item" + numAccessories, numAccessories, {_x:10, _y:25 + (numAccessories * 25)});
numAccessories++;
_local2.curColor = new Color(_local2);
_local2.activated = true;
_local2._txt.text = name;
_local2.clip = clip;
_local2.onPress = function () {
if (this.activated) {
this.curColor.setTransform({ra:20, rb:0, ga:20, gb:0, ba:20, bb:0});
this.activated = false;
this.clip._visible = false;
} else {
this.curColor.setTransform({ra:100, rb:0, ga:100, gb:0, ba:100, bb:0});
this.activated = true;
this.clip._visible = true;
}
};
}
_level0.bgColor = 5625088 /* 0x55D500 */;
_level0.flashWidth = 800;
_level0.flashHeight = 600;
var state = "";
var condition = "";
var states = new Array();
var pregnancy = 1;
var growth = 0;
var curState = new Object();
var canBlink = false;
var blinking = false;
var pX = krystal.head.eye.pupil._x;
var pY = krystal.head.eye.pupil._y;
krystal.pregnant.stop();
states.resting = {eye:"medium", mouth:"smile", leftarm:"down", body:"breathing", pX:3, pY:-5, canBlink:true};
states.realize = {eye:"open", mouth:"faster", leftarm:"down", body:"faster", pX:0, pY:-4, canBlink:true};
states.unhappy = {eye:"small", mouth:"closed", leftarm:"onbelly", body:"faster", pX:0, pY:5, canBlink:true};
states.confused = {eye:"medium", mouth:"faster", leftarm:"down", body:"faster", pX:10, pY:-10, canBlink:true};
states.surprised = {eye:"open", mouth:"fast", leftarm:"onbelly", body:"fast", pX:3, pY:-5, canBlink:true};
states.worried = {eye:"sad", mouth:"closed", leftarm:"onbelly", body:"fast", pX:-3, pY:5, canBlink:true};
states.over = {eye:"closed", mouth:"faster", leftarm:"down", body:"faster", pX:0, pY:0, canBlink:false};
states.relieved = {eye:"small", mouth:"smile", leftarm:"down", body:"faster", pX:0, pY:0, canBlink:true};
states.happy = {eye:"medium", mouth:"happy", leftarm:"onbelly", body:"faster", pX:18, pY:-10, canBlink:true};
states.almost = {eye:"closed", mouth:"smile", leftarm:"down", body:"breathing", pX:0, pY:0, canBlink:false};
states.nervous = {eye:"sad", mouth:"happy", leftarm:"onbelly", body:"fast", pX:5, pY:0, canBlink:false};
states.sad = {eye:"sad", mouth:"closed", body:"fast", pX:18, pY:-10, canBlink:false};
states.flattered = {eye:"open", mouth:"happy", body:"fast", pX:18, pY:-10, canBlink:false};
setState("resting");
krystal.onEnterFrame = function () {
if (blinking && (krystal.head.eye._currentlabel == "endblink")) {
blinking = false;
krystal.head.eye.gotoAndPlay(curState.eye);
krystal.head.eye.pupil._x = pX + curState.pX;
krystal.head.eye.pupil._y = pY + curState.pY;
}
if (canBlink && (Math.random() > 0.99)) {
blinking = true;
krystal.head.eye.gotoAndPlay("blink");
krystal.head.eye.pupil._x = pX + curState.pX;
krystal.head.eye.pupil._y = pY + curState.pY;
}
if (growth == 1) {
grow();
switch (true) {
case pregnancy < 30 :
break;
case pregnancy < 120 :
setState("realize");
break;
case pregnancy < 200 :
setState("unhappy");
break;
case pregnancy == 200 :
setState("confused");
growth = 0;
break;
case pregnancy < 300 :
setState("surprised");
break;
case pregnancy < 400 :
setState("worried");
break;
case pregnancy == 400 :
growth = 0;
setState("over");
}
} else if (growth == -1) {
revert();
switch (true) {
case pregnancy == 1 :
setState("resting");
break;
case pregnancy < 150 :
setState("almost");
break;
case pregnancy < 275 :
setState("happy");
break;
case pregnancy < 400 :
setState("relieved");
}
}
if (growth != -1) {
if (pregnancy == 200) {
setState("confused");
} else if (pregnancy == 400) {
setState("over");
}
}
};
var reset = false;
_panel._plus._txt.text = "+";
_panel._minus._txt.text = "-";
_panel._expand._txt.text = "Expand";
_panel._revert._txt.text = "Revert";
_panel._info.text = "Interactive pregnant Krystal. Drawn and programmed by Doom the wolf (http://doom-the-wolf.deviantart.com). Click 'Expand' or 'Revert' to change the size of her belly. Selecting 'continuous' will make the size change automatically. Move the camera by dragging the mouse across the screen. Zoom in or out by using the '+' and '-' buttons.";
_panel._cont_txt.text = "continuous";
_panel.onEnterFrame = function () {
if (_panel.hitTest(_root._xmouse, _root._ymouse)) {
if (Math.abs(_panel._y - 500) > 1) {
_panel._y = _panel._y + ((500 - _panel._y) * 0.4);
}
} else if (Math.abs(_panel._y - 600) > 1) {
_panel._y = _panel._y + ((600 - _panel._y) * 0.4);
}
if (growth && (_panel._cont._currentframe == 2)) {
_panel._cont_txt.text = "stop";
} else {
_panel._cont_txt.text = "continuous";
}
if (pregnancy < 200) {
_panel._expand._txt.text = "Expand";
} else if (pregnancy < 400) {
_panel._expand._txt.text = "Bigger";
} else {
_panel._expand._txt.text = "Reset";
}
};
_panel._cont.onRelease = function () {
if (growth != 0) {
growth = 0;
}
_panel._cont.gotoAndStop(3 - _panel._cont._currentframe);
};
_panel._plus.onPress = function () {
_panel._plus.onEnterFrame = function () {
krystal._xscale = (krystal._yscale = krystal._xscale + 2);
};
};
_panel._minus.onPress = function () {
_panel._minus.onEnterFrame = function () {
if (krystal._xscale > 2) {
krystal._xscale = (krystal._yscale = krystal._xscale - 2);
} else {
delete _panel._minus.onEnterFrame;
}
};
};
_panel.onMouseUp = function () {
delete _panel._plus.onEnterFrame;
delete _panel._minus.onEnterFrame;
if (_panel._cont._currentframe == 1) {
growth = 0;
}
};
_panel._expand.onPress = function () {
if (pregnancy >= krystal.pregnant._totalframes) {
growth = 0;
reset = true;
} else {
growth = 1;
}
};
_panel._expand.onRelease = function () {
if (reset) {
growth = 0;
pregnancy = 1;
krystal.pregnant.gotoAndStop(1);
condition = "";
delete _root.onEnterFrame;
setState("sleeping");
reset = false;
}
};
_panel._expand.onReleaseOutside = function () {
reset = false;
};
_panel._revert.onPress = function () {
growth = -1;
};
krystal.onMouseDown = function () {
if (_panel._y > 550) {
krystal.startDrag();
}
};
krystal.onMouseUp = function () {
krystal.stopDrag();
};
_clothes.onEnterFrame = function () {
if (_clothes.hitTest(_root._xmouse, _root._ymouse, true)) {
if (Math.abs(_clothes._x - 640) > 1) {
_clothes._x = _clothes._x + ((640 - _clothes._x) * 0.4);
}
} else if (Math.abs(_clothes._x - 800) > 1) {
_clothes._x = _clothes._x + ((800 - _clothes._x) * 0.4);
}
};
var numAccessories = 0;
addAccessory("Headband", krystal.head.headband);
addAccessory("Diadem", krystal.head.jewels);
addAccessory("Collar", krystal.head.neckpiece);
addAccessory("Necklace", krystal.necklace);
addAccessory("Top", krystal.breastplate);
addAccessory("Left Shoulder", krystal.leftshoulder);
addAccessory("Right shoulder", krystal.rightshoulder);
addAccessory("Left arm", krystal.leftarm.leftarmplate);
addAccessory("Right arm", krystal.rightarm.rightarmplate);
addAccessory("Cloth", krystal.cloth);
addAccessory("Tail", krystal.tail.tailcloth);
addAccessory("Left leg", krystal.leftleg.leftlegplate);
addAccessory("Right leg", krystal.rightleg.rightlegplate);
addAccessory("Left Sandal", krystal.leftleg.leftsandaltop);
addAccessory("Right Sandal", krystal.rightleg.rightsandaltop);
var timer = 0;
krystal.pregnant.onPress = function () {
if ((condition == "") && (pregnancy > 80)) {
var _local2 = curState.state;
setState("nervous");
curState.state = _local2;
timer = 30;
krystal.head.blush.gotoAndPlay(1);
condition = "bellypoke";
_root.onEnterFrame = timeout_fn;
}
};
var rub = 0;
krystal.pregnant.onRollOver = function () {
if (((condition == "") && (pregnancy > 80)) && (!(rub % 2))) {
var _local2 = curState.state;
setState("sad");
curState.state = _local2;
timer = 30;
condition = "bellyrub";
_root.onEnterFrame = timeout_fn;
}
};
krystal.breasts.onPress = function () {
if (condition == "") {
var _local2 = curState.state;
setState("flattered");
curState.state = _local2;
timer = 30;
krystal.head.blush.gotoAndPlay(1);
condition = "breastpoke";
_root.onEnterFrame = timeout_fn;
}
};
Symbol 41 MovieClip Frame 5
_currentlabel = "breathing";
Symbol 41 MovieClip Frame 66
gotoAndPlay(_currentlabel);
Symbol 41 MovieClip Frame 70
_currentlabel = "faster";
Symbol 41 MovieClip Frame 105
gotoAndPlay(_currentlabel);
Symbol 41 MovieClip Frame 110
_currentlabel = "fast";
Symbol 41 MovieClip Frame 131
gotoAndPlay(_currentlabel);
Symbol 57 MovieClip Frame 5
_currentlabel = "breathing";
Symbol 57 MovieClip Frame 66
gotoAndPlay(_currentlabel);
Symbol 57 MovieClip Frame 70
_currentlabel = "faster";
Symbol 57 MovieClip Frame 105
gotoAndPlay(_currentlabel);
Symbol 57 MovieClip Frame 110
_currentlabel = "fast";
Symbol 57 MovieClip Frame 131
gotoAndPlay(_currentlabel);
Symbol 128 MovieClip Frame 1
_currentlabel = "smile";
Symbol 128 MovieClip Frame 2
gotoAndPlay(_currentlabel);
Symbol 128 MovieClip Frame 3
_currentlabel = "closed";
Symbol 128 MovieClip Frame 4
gotoAndPlay(_currentlabel);
Symbol 128 MovieClip Frame 5
_currentlabel = "faster";
Symbol 128 MovieClip Frame 40
gotoAndPlay(_currentlabel);
Symbol 128 MovieClip Frame 45
_currentlabel = "fast";
Symbol 128 MovieClip Frame 66
gotoAndPlay(_currentlabel);
Symbol 128 MovieClip Frame 70
_currentlabel = "happy";
Symbol 128 MovieClip Frame 71
gotoAndPlay(_currentlabel);
Symbol 141 MovieClip Frame 1
stop();
Symbol 151 MovieClip Frame 1
_currentlabel = "medium";
Symbol 151 MovieClip Frame 2
gotoAndPlay(_currentlabel);
Symbol 151 MovieClip Frame 3
_currentlabel = "closed";
Symbol 151 MovieClip Frame 4
gotoAndPlay(_currentlabel);
Symbol 151 MovieClip Frame 5
_currentlabel = "small";
Symbol 151 MovieClip Frame 6
gotoAndPlay(_currentlabel);
Symbol 151 MovieClip Frame 7
_currentlabel = "blink";
Symbol 151 MovieClip Frame 11
_currentlabel = "endblink";
Symbol 151 MovieClip Frame 12
gotoAndPlay(_currentlabel);
Symbol 151 MovieClip Frame 13
_currentlabel = "open";
Symbol 151 MovieClip Frame 14
gotoAndPlay(_currentlabel);
Symbol 151 MovieClip Frame 15
_currentlabel = "sad";
Symbol 151 MovieClip Frame 16
gotoAndPlay(_currentlabel);
Symbol 167 MovieClip Frame 1
_currentlabel = "down";
Symbol 167 MovieClip Frame 2
gotoAndPlay(_currentlabel);
Symbol 167 MovieClip Frame 5
_currentlabel = "tobelly";
Symbol 167 MovieClip Frame 11
_currentlabel = "onbelly";
Symbol 167 MovieClip Frame 12
gotoAndPlay(_currentlabel);
Symbol 167 MovieClip Frame 13
_currentlabel = "tobelly";
Symbol 167 MovieClip Frame 18
gotoAndPlay ("down");
Symbol 181 MovieClip Frame 1
stop();