Frame 1
function grow() {
if (pregnancy < amaterasu.pregnant._totalframes) {
pregnancy = pregnancy + growthSpeed;
if (pregnancy > amaterasu.pregnant._totalframes) {
pregnancy = amaterasu.pregnant._totalframes;
}
amaterasu.pregnant.gotoAndStop(Math.floor(pregnancy));
amaterasu.puppy.gotoAndStop(Math.floor(pregnancy));
} else {
growth = 0;
}
}
function revert() {
if (pregnancy > 1) {
pregnancy = pregnancy - growthSpeed;
if (pregnancy < 1) {
pregnancy = 1;
}
amaterasu.pregnant.gotoAndStop(Math.floor(pregnancy));
amaterasu.puppy.gotoAndStop(Math.floor(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];
}
amaterasu.head.eye.gotoAndPlay(curState.eye);
if (amaterasu.frontleg1._currentlabel != curState.frontleg1) {
amaterasu.frontleg1.gotoAndPlay("move" + curState.frontleg1);
}
offset = curState.offset;
frequency = curState.frequency;
canBlink = curState.canBlink;
}
}
function updateStatus() {
amaterasu.scanner._status.text = stats[Math.floor((pregnancy * stats.length) / 600) + 1];
}
function addSpeech(name) {
var _local3 = words.total;
words.total++;
var _local1 = _talk.attachMovie("_speech", "_say" + _local3, 5 + _local3, {_x:5, _y:5 + (words.length * 50)});
var _local2 = new TextFormat();
_local2 = _local1._txt.getTextFormat();
_local2.bold = true;
_local1._txt.text = name;
_local1._txt.setTextFormat(_local2);
words[_local3] = _local1;
return(_local1);
}
function removeSpeech(n) {
var _local1 = 0;
words[n].removeMovieClip();
words.splice(n, 1);
_local1 = n;
while (_local1 < words.length) {
words[_local1]._y = 5 + (_local1 * 50);
_local1++;
}
}
_level0.bgColor = 6594303 /* 0x649EFF */;
_level0.flashWidth = 800;
_level0.flashHeight = 600;
var state = "";
var condition = "";
var states = new Array();
var pregnancy = 1;
var growthSpeed = 1;
var growth = 0;
var curState = new Object();
var canBlink = false;
var blinking = false;
var timer = 0;
var origY = amaterasu.disc._y;
var frequency = 0.3;
var count = 0;
var count2 = 0;
var offset = 0;
amaterasu.pregnant.stop();
amaterasu.puppy.stop();
states.sleeping = {mouth:"closed", eye:"closed", frontleg1:"up", frequency:0.1, offset:0, canBlink:false};
states.awaken = {mouth:"breathing", eye:"small", frontleg1:"up", frequency:0.15, offset:7, canBlink:true};
states.realize = {mouth:"breathing", eye:"medium", frontleg1:"belly", frequency:0.3, offset:6, canBlink:true};
states.enjoy = {mouth:"happy", eye:"happy", frontleg1:"up", frequency:0.3, offset:7, canBlink:false};
states.happy = {mouth:"smile", eye:"closed", frontleg1:"belly", frequency:0.2, offset:10, canBlink:false};
states.confused = {mouth:"sad", eye:"sad", frontleg1:"bellyrub", frequency:0.2, offset:10, canBlink:true};
states.nervous = {mouth:"small", eye:"open", frontleg1:"belly", frequency:0.4, offset:10, canBlink:true};
states.mad = {mouth:"teeth", eye:"mad", frontleg1:"up", frequency:0.3, offset:15, canBlink:true};
states.over = {mouth:"happy", eye:"small", frontleg1:"up", frequency:0.1, offset:15, canBlink:true};
states.revert = {mouth:"sad", eye:"open", frontleg1:"up", frequency:0.3, offset:15, canBlink:true};
states.smaller = {mouth:"breathing", eye:"closed", frontleg1:"up", frequency:0.2, offset:15, canBlink:false};
setState("sleeping");
amaterasu.onEnterFrame = function () {
amaterasu.disc._y = origY + (Math.cos(count2) * 30);
count2 = count2 + 0.1;
amaterasu.body.gotoAndStop(Math.floor(((Math.cos(count) * offset) + offset) * 0.5) + 1);
amaterasu.head.gotoAndStop(curState.mouth);
amaterasu.head.gotoAndStop(amaterasu.head._currentframe + Math.floor(((Math.cos(count) * offset) + offset) * 0.5));
count = count + frequency;
if (canBlink && (Math.random() > 0.99)) {
amaterasu.head.eye.gotoAndPlay("blink");
blinking = true;
}
if (blinking && (amaterasu.head.eye._currentlabel == "endblink")) {
amaterasu.head.eye.gotoAndPlay(curState.eye);
blinking = false;
}
if (growth == 1) {
grow();
updateStatus();
switch (true) {
case pregnancy < 30 :
break;
case pregnancy < 100 :
if (amaterasu.environ._currentlabel != "elipsis") {
amaterasu.environ.gotoAndPlay("elipsis");
}
setState("awaken");
break;
case pregnancy < 200 :
if (amaterasu.environ._currentlabel != "question") {
amaterasu.environ.gotoAndPlay("question");
}
setState("realize");
break;
case pregnancy < 250 :
if (amaterasu.environ._currentlabel != "heart") {
amaterasu.environ.gotoAndPlay("heart");
}
setState("enjoy");
break;
case (pregnancy > 250) && ((pregnancy - growthSpeed) < 250) :
if (!(_panel._nonstop._currentframe - 1)) {
pregnancy = 250;
amaterasu.pregnant.gotoAndStop(Math.floor(pregnancy));
amaterasu.puppy.gotoAndStop(Math.floor(pregnancy));
}
case pregnancy == 250 :
if (!(_panel._nonstop._currentframe - 1)) {
setState("happy");
growth = 0;
}
break;
case pregnancy < 300 :
if (amaterasu.environ._currentlabel != "elipsis") {
amaterasu.environ.gotoAndPlay("elipsis");
}
setState("confused");
break;
case pregnancy < 400 :
if (amaterasu.head.drop._currentframe == 1) {
amaterasu.head.drop.gotoAndPlay(2);
}
if (amaterasu.environ._currentlabel != "nervous") {
amaterasu.environ.gotoAndPlay("nervous");
}
setState("nervous");
break;
case pregnancy < 500 :
setState("mad");
break;
case (pregnancy > 500) && ((pregnancy - growthSpeed) < 500) :
if (!(_panel._nonstop._currentframe - 1)) {
pregnancy = 500;
amaterasu.pregnant.gotoAndStop(Math.floor(pregnancy));
amaterasu.puppy.gotoAndStop(Math.floor(pregnancy));
}
case pregnancy == 500 :
setState("over");
growth = 0;
}
} else if (growth == -1) {
revert();
amaterasu.head.drop.gotoAndStop(1);
updateStatus();
switch (true) {
case pregnancy == 1 :
amaterasu.scanner._status.text = "Status: OK";
setState("sleeping");
break;
case pregnancy < 5 :
var _local1 = 0;
while (_local1 < words.length) {
if (words[_local1]._txt.text.indexOf("scanner") > 0) {
removeSpeech(_local1);
// unexpected jump
}
_local1++;
}
// unexpected jump
// unexpected jump
case pregnancy < 250 :
case pregnancy < 500 :
// unexpected jump
setState("smaller");
break;
setState("revert");
}
} else if (pregnancy == 250) {
setState("happy");
} else if (pregnancy == 500) {
setState("over");
}
};
var reset = false;
_panel._plus._txt.text = "+";
_panel._minus._txt.text = "-";
_panel._expand._txt.text = "Expand";
_panel._revert._txt.text = "Revert";
_panel._nonstop_txt.text = "non-stop";
_panel._info.text = "Interactive pregnant Amaterasu. 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._speed_txt.text = "1";
_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 < 250) {
_panel._expand._txt.text = "Expand";
} else if (pregnancy < 500) {
_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._nonstop.onRelease = function () {
this.gotoAndStop(3 - this._currentframe);
};
_panel._plus.onPress = function () {
_panel._plus.onEnterFrame = function () {
amaterasu._xscale = (amaterasu._yscale = amaterasu._xscale + 2);
};
};
_panel._minus.onPress = function () {
_panel._minus.onEnterFrame = function () {
if (amaterasu._xscale > 15) {
amaterasu._xscale = (amaterasu._yscale = amaterasu._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 >= amaterasu.pregnant._totalframes) {
growth = 0;
reset = true;
} else {
growth = 1;
}
};
_panel._expand.onRelease = function () {
if (reset) {
growth = 0;
pregnancy = 1;
amaterasu.pregnant.gotoAndStop(pregnancy);
amaterasu.puppy.gotoAndStop(pregnancy);
condition = "";
amaterasu.scanner._status.text = "Status: OK";
var _local2 = 0;
while (_local2 < words.length) {
if (words[_local2]._txt.text.indexOf("scanner") > 0) {
removeSpeech(_local2);
break;
}
_local2++;
}
delete _root.onEnterFrame;
setState("sleeping");
reset = false;
}
};
_panel._expand.onReleaseOutside = function () {
reset = false;
};
_panel._revert.onPress = function () {
growth = -1;
};
var kDown = new Object();
Key.addListener(kDown);
_panel._speed_txt.maxChars = 2;
_panel._speed_txt.restrict = "0123456789.";
_panel._speed_txt.background = true;
_panel._speed_txt.backgroundColor = 16777215 /* 0xFFFFFF */;
_panel._speed_txt.border = true;
kDown.onKeyDown = function (K) {
if ((Key.getCode() == 13) || (K != undefined)) {
if ((_panel._speed_txt.text.length == 0) || (_panel._speed_txt.text == "..")) {
_panel._speed_txt.text = "1";
} else if (_panel._speed_txt.text == "0") {
_panel._speed_txt.text = "1";
} else if (Number(_panel._speed_txt.text) > 50) {
_panel._speed_txt.text = "50";
}
growthSpeed = Number(_panel._speed_txt.text);
_panel._speed_txt.backgroundColor = 16777215 /* 0xFFFFFF */;
if (_panel._tip.getDepth() > _panel._ok.getDepth()) {
_panel._tip.swapDepths(_panel._ok);
}
}
};
_panel._speed_txt.onChanged = function () {
_panel._speed_txt.backgroundColor = 16746632 /* 0xFF8888 */;
if (_panel._tip.getDepth() < _panel._ok.getDepth()) {
_panel._tip.swapDepths(_panel._ok);
}
};
_panel._speed_txt.onSetFocus = function () {
if (_panel._tip.getDepth() < _panel._ok.getDepth()) {
_panel._tip.swapDepths(_panel._ok);
}
_panel._speed_txt.backgroundColor = 16746632 /* 0xFF8888 */;
};
_panel._speed_txt.onKillFocus = function () {
kDown.onKeyDown(true);
};
var tF = new TextFormat();
tF.size = 12;
_panel._ok._txt.setNewTextFormat(tF);
_panel._ok._txt.text = "ok";
_panel._ok.onPress = function () {
kDown.onKeyDown(true);
};
amaterasu.onMouseDown = function () {
if (((_panel._y > 550) && (amaterasu.scanner.mode != "drag")) && (!amaterasu.tree.hitTest(_root._xmouse, _root._ymouse, true))) {
amaterasu.startDrag();
}
};
amaterasu.onMouseUp = function () {
amaterasu.stopDrag();
};
amaterasu.scanner._status.text = "Status: OK";
var stats = new Array();
stats.push("Status: OK");
stats.push("Status: Pregnant\nDegree: Unnoticeable");
stats.push("Status: Pregnant\nDegree:\nVery small");
stats.push("Status: Pregnant\nDegree: Small");
stats.push("Status: Pregnant\nDegree: Light");
stats.push("Status: Pregnant\nDegree: Moderate");
stats.push("Status: Pregnant\nDegree: Large");
stats.push("Status: Pregnant\nDegree: Heavy");
stats.push("Status: Pregnant\nDegree:\nVery heavy");
stats.push("Status: Pregnant\nDegree: Maximum");
amaterasu.scanner.onPress = function () {
amaterasu.scanner.startDrag();
amaterasu.scanner.mode = "drag";
if ((this.scanned != true) && (pregnancy > 4)) {
this.scanned = true;
addSpeech("The scanner says you're pregnant!").onRelease = function () {
curState.mouth = "breathing";
condition = "scanned";
state = "special";
frequency = 0.2;
if (pregnancy < 100) {
amaterasu.environ.gotoAndPlay("question");
amaterasu.head.eye.gotoAndPlay("wide");
curState.mouth = "sad";
frequency = 0.1;
} else {
amaterasu.environ.gotoAndPlay("elipsis");
amaterasu.head.eye.gotoAndPlay("closed");
curState.mouth = "breathing";
frequency = 0.1;
if (amaterasu.frontleg1._currentlabel == "up") {
amaterasu.frontleg1.gotoAndPlay("wave");
}
}
canBlink = false;
timer = 30;
_root.onEnterFrame = timeout_fn;
};
}
amaterasu.scanner.onMouseMove = function () {
amaterasu.s_mask._x = amaterasu.scanner._x;
amaterasu.s_mask._y = amaterasu.scanner._y;
};
};
amaterasu.scanner.onMouseUp = function () {
amaterasu.scanner.stopDrag();
amaterasu.scanner.mode = "";
delete amaterasu.scanner.onMouseMove;
amaterasu.s_mask._x = amaterasu.scanner._x;
amaterasu.s_mask._y = amaterasu.scanner._y;
};
var words = new Array();
words.total = 0;
_talk.onEnterFrame = function () {
if (_talk.hitTest(_root._xmouse, _root._ymouse, true)) {
if (Math.abs(_talk._x - 640) > 1) {
_talk._x = _talk._x + ((640 - _talk._x) * 0.4);
}
} else if (Math.abs(_talk._x - 800) > 1) {
_talk._x = _talk._x + ((800 - _talk._x) * 0.4);
}
};
addSpeech("Hey, Ammy!").onRelease = function () {
if (condition == "") {
condition = "greeting";
state = "special";
switch (true) {
case pregnancy < 30 :
curState.mouth = "happy";
amaterasu.head.eye.gotoAndPlay("happy");
amaterasu.frontleg1.gotoAndPlay("wave");
break;
case pregnancy <= 250 :
curState.mouth = "smile";
amaterasu.head.eye.gotoAndPlay("happy");
break;
case pregnancy < 500 :
curState.mouth = "breathing";
frequency = 0.2;
amaterasu.head.eye.gotoAndPlay("small");
break;
default :
curState.mouth = "happy";
amaterasu.head.eye.gotoAndPlay("closed");
}
canBlink = false;
timer = 30;
_root.onEnterFrame = timeout_fn;
delete this.onRelease;
removeSpeech((this._y - 5) * 0.05);
}
};
addSpeech("You're a pretty wolf.").onRelease = function () {
if (condition == "") {
condition = "blush";
state = "special";
amaterasu.head.eye.gotoAndPlay("happy");
amaterasu.head.blush.gotoAndPlay(2);
curState.mouth = "smile";
if (amaterasu.frontleg1._currentlabel == "up") {
amaterasu.frontleg1.gotoAndPlay("wave");
} else {
amaterasu.frontleg1.gotoAndPlay("moveup");
}
canBlink = false;
timer = 30;
_root.onEnterFrame = timeout_fn;
}
};
addSpeech("How do you feel?").onRelease = function () {
if (condition == "") {
condition = "feel";
state = "special";
switch (true) {
case curState.state == "sleeping" :
amaterasu.environ.gotoAndPlay("sleep");
break;
case pregnancy < 30 :
amaterasu.head.eye.gotoAndPlay("medium");
break;
case pregnancy <= 250 :
curState.mouth = "happy";
amaterasu.environ.gotoAndPlay("heart");
amaterasu.head.eye.gotoAndPlay("open");
break;
case pregnancy < 400 :
curState.mouth = "sad";
amaterasu.environ.gotoAndPlay("question");
amaterasu.head.eye.gotoAndPlay("sad");
break;
case pregnancy < 500 :
curState.mouth = "sad";
amaterasu.environ.gotoAndPlay("smoke");
amaterasu.head.eye.gotoAndPlay("mad");
break;
case pregnancy == 500 :
curState.mouth = "breathing";
amaterasu.environ.gotoAndPlay("sleep");
amaterasu.head.eye.gotoAndPlay("medium");
}
canBlink = false;
timer = 30;
_root.onEnterFrame = timeout_fn;
}
};
amaterasu.pregnant.onPress = function () {
if (condition == "") {
condition = "bellypoke";
state = "special";
if (pregnancy < 30) {
frequency = 0.2;
offset = 17;
curState.mouth = "breathing";
amaterasu.head.eye.gotoAndPlay("mad");
} else if ((pregnancy < 251) || (pregnancy == 500)) {
curState.mouth = "open";
amaterasu.head.eye.gotoAndPlay("open");
} else {
curState.mouth = "teeth";
amaterasu.head.eye.gotoAndPlay("open");
}
canBlink = false;
timer = 20;
_root.onEnterFrame = timeout_fn;
}
};
amaterasu.head.onPress = function () {
if (condition == "") {
condition = "pet";
state = "special";
amaterasu.head.eye.gotoAndPlay("happy");
curState.mouth = "smile";
canBlink = false;
timer = 20;
_root.onEnterFrame = timeout_fn;
}
};
var oldX = 0;
var oldY = 0;
var oldDist = 0;
var oldThick = 1;
amaterasu.erase.onRelease = function () {
amaterasu.draw.clear();
};
amaterasu.tree.useHandCursor = false;
amaterasu.tree.onPress = function () {
amaterasu.draw.moveTo(amaterasu.draw._xmouse, amaterasu.draw._ymouse);
oldX = amaterasu.draw._xmouse;
oldY = amaterasu.draw._ymouse;
oldDist = 0;
oldThick = 1;
amaterasu.tree.onMouseMove = function () {
var _local3 = amaterasu.draw._xmouse - oldX;
var _local2 = amaterasu.draw._ymouse - oldY;
oldX = amaterasu.draw._xmouse;
oldY = amaterasu.draw._ymouse;
var _local1 = Math.sqrt((_local3 * _local3) + (_local2 * _local2));
if (_local1 > (oldDist + 1)) {
oldThick = oldThick + 1;
} else if (_local1 < (oldDist - 1)) {
oldThick = oldThick - 1;
}
oldDist = _local1;
amaterasu.draw.lineStyle(oldThick);
amaterasu.draw.lineTo(amaterasu.draw._xmouse, amaterasu.draw._ymouse);
};
};
amaterasu.tree.onMouseUp = function () {
delete amaterasu.tree.onMouseMove;
};
Symbol 51 MovieClip Frame 1
_currentlabel = "open";
Symbol 51 MovieClip Frame 2
gotoAndPlay(_currentlabel);
Symbol 51 MovieClip Frame 3
_currentlabel = "closed";
Symbol 51 MovieClip Frame 4
gotoAndPlay(_currentlabel);
Symbol 51 MovieClip Frame 5
_currentlabel = "small";
Symbol 51 MovieClip Frame 6
gotoAndPlay(_currentlabel);
Symbol 51 MovieClip Frame 7
_currentlabel = "blink";
Symbol 51 MovieClip Frame 11
_currentlabel = "endblink";
Symbol 51 MovieClip Frame 12
gotoAndPlay(_currentlabel);
Symbol 51 MovieClip Frame 13
_currentlabel = "wide";
Symbol 51 MovieClip Frame 14
gotoAndPlay(_currentlabel);
Symbol 51 MovieClip Frame 15
_currentlabel = "sad";
Symbol 51 MovieClip Frame 16
gotoAndPlay(_currentlabel);
Symbol 51 MovieClip Frame 17
_currentlabel = "happy";
Symbol 51 MovieClip Frame 18
gotoAndPlay(_currentlabel);
Symbol 51 MovieClip Frame 19
_currentlabel = "medium";
Symbol 51 MovieClip Frame 20
gotoAndPlay(_currentlabel);
Symbol 51 MovieClip Frame 21
_currentlabel = "mad";
Symbol 51 MovieClip Frame 22
gotoAndPlay(_currentlabel);
Symbol 56 MovieClip Frame 1
stop();
Symbol 56 MovieClip Frame 25
stop();
Symbol 61 MovieClip Frame 1
stop();
Symbol 72 MovieClip Frame 1
_currentlabel = "closed";
Symbol 72 MovieClip Frame 20
_currentlabel = "closed";
Symbol 72 MovieClip Frame 45
_currentlabel = "happy";
Symbol 72 MovieClip Frame 65
_currentlabel = "smile";
Symbol 72 MovieClip Frame 85
_currentlabel = "sad";
Symbol 72 MovieClip Frame 105
_currentlabel = "small";
Symbol 72 MovieClip Frame 130
_currentlabel = "teeth";
Symbol 72 MovieClip Frame 151
_currentlabel = "teeth";
Symbol 127 MovieClip Frame 1
_currentlabel = "up";
Symbol 127 MovieClip Frame 2
gotoAndPlay(_currentlabel);
Symbol 127 MovieClip Frame 5
_currentlabel = "belly";
Symbol 127 MovieClip Frame 10
_currentlabel = "belly";
Symbol 127 MovieClip Frame 11
gotoAndPlay(_currentlabel);
Symbol 127 MovieClip Frame 12
_currentlabel = "up";
Symbol 127 MovieClip Frame 17
gotoAndPlay(_currentlabel);
Symbol 127 MovieClip Frame 20
_currentlabel = "bellyrub";
Symbol 127 MovieClip Frame 44
_currentlabel = "belly";
gotoAndPlay(_currentlabel);
Symbol 127 MovieClip Frame 50
_currentlabel = "up";
Symbol 127 MovieClip Frame 78
gotoAndPlay(_currentlabel);
Symbol 169 MovieClip Frame 1
stop();
Symbol 169 MovieClip Frame 5
_currentlabel = "heart";
Symbol 169 MovieClip Frame 40
gotoAndStop (1);
Symbol 169 MovieClip Frame 41
_currentlabel = "elipsis";
Symbol 169 MovieClip Frame 84
gotoAndStop (1);
Symbol 169 MovieClip Frame 85
_currentlabel = "question";
Symbol 169 MovieClip Frame 115
gotoAndStop (1);
Symbol 169 MovieClip Frame 116
_currentlabel = "nervous";
Symbol 169 MovieClip Frame 135
gotoAndStop (1);
Symbol 169 MovieClip Frame 136
_currentlabel = "sleep";
Symbol 169 MovieClip Frame 165
gotoAndStop (1);
Symbol 169 MovieClip Frame 166
_currentlabel = "smoke";
Symbol 169 MovieClip Frame 193
gotoAndStop (1);
Symbol 236 MovieClip Frame 1
stop();