Section 1
//Expansion (expansion.Expansion)
package expansion {
import flash.display.*;
import flash.events.*;
public class Expansion extends EventDispatcher {
private var _expanding:Array;
private var _sizes:Array;
private var _active:Boolean;
private var _numExpandables:uint;
private var _expandables:Array;
private var _checkPoints:Array;
private var _maxSizes:Array;
private var _stage:Stage;
public function Expansion(_arg1:Stage){
_stage = _arg1;
_active = false;
_numExpandables = 0;
_expandables = [];
_sizes = [];
_maxSizes = [];
_expanding = [];
_checkPoints = [];
if (_arg1 == null){
throw ("ERROR: Stage must not be null.");
};
}
public function set size(_arg1:Number){
var _local2:int;
_local2 = 0;
while (_local2 < _expandables.length) {
if (!_expandables[_local2]){
return;
};
setSize(_local2, _arg1);
_local2++;
};
}
public function setSize(_arg1:uint, _arg2:Number){
if (isNaN(_arg2)){
return;
};
_sizes[_arg1] = Math.max(1, Math.min(_arg2, _maxSizes[_arg1]));
_expandables[_arg1].gotoAndStop(_sizes[_arg1]);
}
public function getExpandableID(_arg1:MovieClip):int{
var _local2:int;
while (_local2 < _expandables.length) {
if (_expandables[_local2] == _arg1){
return (_local2);
};
_local2++;
};
return (-1);
}
private function eFrame(_arg1:Event){
var _local2:int;
var _local3:Number;
var _local4:Boolean;
var _local5:Array;
var _local6:int;
_local4 = false;
_local5 = [];
_local2 = 0;
while (_local2 < _expandables.length) {
if (!_expandables[_local2]){
} else {
_local3 = _sizes[_local2];
_sizes[_local2] = Math.max(1, Math.min(_maxSizes[_local2], (_sizes[_local2] + _expanding[_local2])));
if (_local3 != _sizes[_local2]){
_local4 = true;
_expandables[_local2].gotoAndStop(Math.floor(_sizes[_local2]));
while (_local6 < _checkPoints.length) {
if (_checkPoints[_local6].expandable == _local2){
if ((((((_checkPoints[_local6].direction > 0)) && ((_checkPoints[_local6].size > _local3)))) && ((_checkPoints[_local6].size <= _sizes[_local2])))){
_local5.push(new ExpansionEvent("checkpoint", _expandables[_local2], _checkPoints[_local6].size, _checkPoints[_local6].direction, _checkPoints[_local6].reaction, _checkPoints[_local6].timer));
break;
} else {
if ((((((_checkPoints[_local6].direction < 0)) && ((_checkPoints[_local6].size >= _sizes[_local2])))) && ((_checkPoints[_local6].size < _local3)))){
_local5.push(new ExpansionEvent("checkpoint", _expandables[_local2], _checkPoints[_local6].size, _checkPoints[_local6].direction, _checkPoints[_local6].reaction, _checkPoints[_local6].timer));
break;
};
};
};
_local6++;
};
};
};
_local2++;
};
if (_local4){
dispatchEvent(new Event("sizeChanged"));
_local2 = 0;
while (_local2 < _local5.length) {
dispatchEvent(_local5[_local2]);
_local2++;
};
};
}
public function set maxSize(_arg1:uint){
var _local2:int;
_local2 = 0;
while (_local2 < _expandables.length) {
if (!_expandables[_local2]){
return;
};
setMaxSize(_local2, _arg1);
_local2++;
};
}
public function set growth(_arg1:Number){
var _local2:int;
_local2 = 0;
while (_local2 < _expandables.length) {
if (!_expandables[_local2]){
return;
};
setGrowth(_local2, _arg1);
_local2++;
};
}
public function insertExpandable(_arg1:MovieClip, _arg2:int=-1):int{
var _local3:int;
if (_arg1 == null){
return (-1);
};
_local3 = 0;
while (_local3 < _expandables.length) {
if (_expandables[_local3] == _arg1){
if (_arg2 > 0){
_maxSizes[_local3] = _arg2;
} else {
if (!_arg2){
_maxSizes[_local3] = _arg1.totalFrames;
};
};
return (_local3);
};
_local3++;
};
_local3 = 0;
while (_local3 < _expandables.length) {
if (_expandables[_local3] == null){
break;
};
_local3++;
};
_arg1.gotoAndStop(1);
_numExpandables++;
_sizes[_local3] = 1;
_expandables[_local3] = _arg1;
_expanding[_local3] = 0;
if (_arg2 > 0){
_maxSizes[_local3] = _arg2;
} else {
_maxSizes[_local3] = _arg1.totalFrames;
};
return (_local3);
}
public function clearCheckPoint(_arg1:uint, _arg2:int, _arg3:int=1){
var _local4:MovieClip;
var _local5:int;
_local4 = _expandables[_arg1];
if (!_local4){
return;
};
_local5 = 0;
while (_local5 < _checkPoints.length) {
if ((((((_checkPoints[_local5].size == _arg2)) && ((_checkPoints.expandable == _local4)))) && ((_checkPoints[_local5].direction == _arg3)))){
delete _checkPoints[_local5];
_checkPoints.splice(_local5, 1);
return;
};
_local5++;
};
}
public function get numExpandables():uint{
return (_numExpandables);
}
public function removeExpandable(_arg1:MovieClip){
var _local2:int;
while (_local2 < _expandables.length) {
if (_expandables[_local2] == _arg1){
clearCheckPointByID(_local2);
delete _expandables[_local2];
_expandables[_local2] = null;
_sizes[_local2] = 0;
_maxSizes[_local2] = 0;
_expanding[_local2] = 0;
_numExpandables--;
if (_local2 == (_expandables.length - 1)){
_expandables.splice(_local2, 1);
_sizes.splice(_local2, 1);
_maxSizes.splice(_local2, 1);
_expanding.splice(_local2, 1);
};
return;
};
_local2++;
};
}
public function getGrowth(_arg1:uint):Number{
if (_arg1 > _expandables.length){
return (0);
};
return (_expanding[_arg1]);
}
public function setMaxSize(_arg1:uint, _arg2:uint){
if (isNaN(_arg2)){
return;
};
_maxSizes[_arg1] = Math.max(1, Math.min(_expandables[_arg1].totalFrames, _arg2));
if (_sizes[_arg1] > _arg2){
setSize(_arg1, _arg2);
};
}
public function setGrowth(_arg1:uint, _arg2:Number){
if (isNaN(_arg2)){
return;
};
_expanding[_arg1] = _arg2;
}
public function getMaxSize(_arg1:uint):uint{
if (_arg1 > _expandables.length){
return (0);
};
return (_maxSizes[_arg1]);
}
public function getCheckPoint(_arg1:int, _arg2:int, _arg3:int=1):String{
var _local4:MovieClip;
var _local5:int;
_local4 = _expandables[_arg1];
if (!_local4){
return ("");
};
_local5 = 0;
while (_local5 < _checkPoints.length) {
if ((((((_checkPoints[_local5].size == _arg2)) && ((_checkPoints.expandable == _local4)))) && ((_checkPoints[_local5].direction == _arg3)))){
return (_checkPoints[_local5].reaction);
};
_local5++;
};
return ("");
}
private function clearCheckPointByID(_arg1:uint){
var _local2:MovieClip;
var _local3:int;
_local2 = _expandables[_arg1];
if (!_local2){
return;
};
_local3 = 0;
while (_local3 < _checkPoints.length) {
if (_checkPoints.expandable == _local2){
delete _checkPoints[_local3];
_checkPoints.splice(_local3, 1);
_local3--;
};
_local3++;
};
}
public function getExpandable(_arg1:uint):MovieClip{
if (_arg1 > _expandables.length){
return (null);
};
return (_expandables[_arg1]);
}
public function removeExpandableAt(_arg1:uint){
if ((((_arg1 < _expandables.length)) && (!((_expandables[_arg1] == null))))){
clearCheckPointByID(_arg1);
_expandables[_arg1] = null;
_sizes[_arg1] = 0;
_maxSizes[_arg1] = 0;
_expanding[_arg1] = 0;
_numExpandables--;
if (_arg1 == (_expandables.length - 1)){
_expandables.splice(_arg1, 1);
_sizes.splice(_arg1, 1);
_maxSizes.splice(_arg1, 1);
_expanding.splice(_arg1, 1);
};
};
}
public function setCheckPoint(_arg1:uint, _arg2:int, _arg3:int=1, _arg4:String="", _arg5:int=30){
var _local6:MovieClip;
var _local7:int;
_local6 = _expandables[_arg1];
if (!_local6){
return;
};
_local7 = 0;
while (_local7 < _checkPoints.length) {
if ((((((_checkPoints[_local7].size == _arg2)) && ((_checkPoints[_local7].expandable == _arg1)))) && ((_checkPoints[_local7].direction == _arg3)))){
_checkPoints[_local7].reaction = _arg4;
return;
};
_local7++;
};
if (_arg3 < 0){
_arg3 = -1;
} else {
if (_arg3 > 0){
_arg3 = 1;
};
};
_checkPoints.push({size:_arg2, reaction:_arg4, expandable:_arg1, direction:_arg3, timer:_arg5});
}
public function activate(_arg1:Boolean=true){
if (_active == _arg1){
return;
};
_active = _arg1;
if (_active){
_stage.addEventListener("enterFrame", eFrame);
} else {
_stage.removeEventListener("enterFrame", eFrame);
};
}
public function getSize(_arg1:uint):Number{
if (_arg1 > _expandables.length){
return (0);
};
return (_sizes[_arg1]);
}
}
}//package expansion
Section 2
//ExpansionEvent (expansion.ExpansionEvent)
package expansion {
import flash.display.*;
import flash.events.*;
public class ExpansionEvent extends Event {
public var timer:int;
public var size:int;
public var reaction:String;
public var expandable:MovieClip;
public var direction:int;
public function ExpansionEvent(_arg1:String, _arg2:MovieClip, _arg3:int, _arg4:int=1, _arg5:String="", _arg6:int=30){
super(_arg1);
expandable = _arg2;
size = _arg3;
direction = _arg4;
reaction = _arg5;
timer = _arg6;
}
}
}//package expansion
Section 3
//Expression (expansion.Expression)
package expansion {
import flash.display.*;
import flash.events.*;
public class Expression extends EventDispatcher {
private var _position:Number;
private var _state:String;
private var _curState:Array;
private var _states:Array;
private var _active:Boolean;
private var _permanent:Boolean;
private var _offset:Number;
private var _interruptible:Boolean;
private var _eyes:Array;
private var _partBaseValues:Array;
private var _timer:int;
private var _canBlink:Boolean;
private var _partTypes:Array;
private var _expansion:Expansion;
private var _angle:Number;
private var _frequency:Number;
private var _parts:Array;
private var _blinking:Boolean;
private var _savedState:Array;
private var _reactions:Array;
private var _stage:Stage;
public static const ANIMATED:int = 0;
public static const ROTATION_SPEED:int = 2;
public static const X_POS:int = 3;
public static const Y_POS:int = 4;
public static const FRAME:int = 0;
public static const MOVABLE:int = 1;
public static const ROTATION:int = 1;
public function Expression(_arg1:Stage){
_active = false;
_stage = _arg1;
_state = "";
_canBlink = true;
_blinking = false;
_offset = 0;
_frequency = 0;
_angle = 0;
_position = 0;
_curState = [];
_states = [];
_eyes = [];
_parts = [];
_partTypes = [];
_partBaseValues = [];
_savedState = null;
_reactions = [];
_interruptible = true;
_timer = -1;
_permanent = false;
_expansion = null;
if (_arg1 == null){
throw ("ERROR: Stage must not be null.");
};
}
public function get reacting():Boolean{
return (!((_savedState == null)));
}
public function get canBlink():Boolean{
return (_canBlink);
}
public function addPartToState(_arg1:Array, _arg2:int, _arg3:String, _arg4:Number=0, _arg5:Number=1, _arg6:Number=0, _arg7:Number=0){
var _local8:MovieClip;
if (!_arg1){
return;
};
_local8 = getPartAt(_arg2);
if (!_local8){
throw ("This part is not in the list. Try using addPart() first.");
};
if (_arg1[_arg2]){
delete _arg1[_arg2];
};
_arg1[_arg2] = [];
_arg1[_arg2][FRAME] = _arg3;
_arg1[_arg2][ROTATION] = _arg4;
_arg1[_arg2][ROTATION_SPEED] = _arg5;
if (isNaN(_arg6)){
_arg1[_arg2][X_POS] = undefined;
} else {
_arg1[_arg2][X_POS] = _arg6;
};
if (isNaN(_arg7)){
_arg1[_arg2][Y_POS] = undefined;
} else {
_arg1[_arg2][Y_POS] = _arg7;
};
}
public function get state():String{
return (_state);
}
public function get offset():Number{
return (_offset);
}
public function get blinking():Boolean{
return (_blinking);
}
private function _reacting(_arg1:Event){
var _local2:Object;
_local2 = getReaction((_arg1.target as EventDispatcher), _arg1.type);
if (_local2 == null){
throw ("Reaction not found on the list.");
};
react(_local2.state, _local2.timer);
}
public function destroy(){
var _local1:int;
if (_expansion != null){
_expansion.removeEventListener("checkpoint", expansionReaction);
_expansion = null;
};
_local1 = 0;
while (_local1 < _reactions.length) {
_reactions[_local1].hit.removeEventListener(_reactions[_local1].type, _reacting);
delete _reactions[_local1];
_local1++;
};
_reactions = [];
_curState = [];
_states = [];
_parts = [];
_partTypes = [];
_partBaseValues = [];
_savedState = null;
_state = "";
_canBlink = true;
_blinking = false;
_offset = 0;
_frequency = 0;
_angle = 0;
_position = 0;
_timer = -1;
}
public function endReact(){
if (!_savedState){
return;
};
_curState.state = _savedState.state;
_savedState = null;
setState(_curState.state);
_timer = -1;
dispatchEvent(new Event("endreact"));
}
public function removePart(_arg1:MovieClip){
var _local2:int;
var _local3:int;
_local2 = 0;
while (_local2 < _parts.length) {
if (_parts[_local2] == _arg1){
delete _parts[_local2];
delete _partTypes[_local2];
_parts[_local2] = null;
_partTypes[_local2] = 0;
_local3 = 0;
while (_local3 < _eyes.length) {
if (_eyes[_local3] == _local2){
_eyes.splice(_local3, 1);
break;
};
_local3++;
};
if (_local2 == (_parts.length - 1)){
_parts.splice(_local2, 1);
_partTypes.splice(_local2, 1);
};
return;
};
_local2++;
};
}
public function getReaction(_arg1:EventDispatcher, _arg2:String):Object{
var _local3:int;
_local3 = 0;
while (_local3 < _reactions.length) {
if ((((_reactions[_local3].hit == _arg1)) && ((_reactions[_local3].type == _arg2)))){
return (_reactions[_local3]);
};
_local3++;
};
return (null);
}
public function set offset(_arg1:Number){
if (!isNaN(_arg1)){
_offset = _arg1;
};
}
public function get position():Number{
return (_position);
}
private function eFrame(_arg1:Event){
var _local2:int;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
if ((((((((Math.random() > 0.99)) && (_canBlink))) && ((_savedState == null)))) && (_eyes.length))){
_local2 = 0;
while (_local2 < _eyes.length) {
_parts[_eyes[_local2]].gotoAndPlay("blink");
_local2++;
};
_blinking = true;
dispatchEvent(new Event("blink"));
};
if (((_blinking) && ((_parts[_eyes[0]].currentLabel == "endblink")))){
_local2 = 0;
while (_local2 < _eyes.length) {
if (((_curState[_eyes[_local2]]) && (_curState[_eyes[_local2]][FRAME]))){
_parts[_eyes[_local2]].gotoAndPlay(_curState[_eyes[_local2]][FRAME]);
};
_local2++;
};
_blinking = false;
dispatchEvent(new Event("endblink"));
};
_local2 = 0;
while (_local2 < _curState.length) {
if (((_curState[_local2]) && (_parts[_local2]))){
_local3 = (_curState[_local2][ROTATION] + _partBaseValues[_local2].rotation);
_local4 = (_local3 - 360);
_local5 = (_local3 + 360);
_local6 = _local3;
_local7 = Math.abs((_local4 - _parts[_local2].rotation));
_local8 = Math.abs((_local5 - _parts[_local2].rotation));
_local9 = Math.abs((_local3 - _parts[_local2].rotation));
if (_local7 <= _local9){
_local6 = _local4;
};
if ((((_local8 <= _local7)) && ((_local8 <= _local9)))){
_local6 = _local5;
};
if (_parts[_local2].rotation < (_local6 - _curState[_local2][ROTATION_SPEED])){
_parts[_local2].rotation = (_parts[_local2].rotation + _curState[_local2][ROTATION_SPEED]);
} else {
if (_parts[_local2].rotation > (_local6 + _curState[_local2][ROTATION_SPEED])){
_parts[_local2].rotation = (_parts[_local2].rotation - _curState[_local2][ROTATION_SPEED]);
} else {
_parts[_local2].rotation = _local3;
};
};
if (!isNaN(_curState[_local2][X_POS])){
_local3 = (_curState[_local2][X_POS] + _partBaseValues[_local2].x);
_parts[_local2].x = (_parts[_local2].x + ((_local3 - _parts[_local2].x) * 0.5));
};
if (!isNaN(_curState[_local2][Y_POS])){
_local3 = (_curState[_local2][Y_POS] + _partBaseValues[_local2].y);
_parts[_local2].y = (_parts[_local2].y + ((_local3 - _parts[_local2].y) * 0.5));
};
};
_local2++;
};
_position = Math.sin(_angle);
_angle = (_angle + _frequency);
if (_angle > 500){
_angle = (_angle - ((Math.PI * 2) * (500 / (Math.PI * 2))));
};
if (_savedState){
if (_timer > 0){
_timer--;
} else {
if (_timer == 0){
endReact();
};
};
};
dispatchEvent(new Event("enterFrame"));
}
public function react(_arg1:String, _arg2:int=30){
var _local3:Array;
if (((_savedState) && (!(_interruptible)))){
return;
};
if (((!(_arg1)) || (!(_arg1.length)))){
return;
};
_local3 = null;
if (!_savedState){
_local3 = _curState;
} else {
_local3 = _savedState;
};
_savedState = null;
_timer = _arg2;
setState(_arg1);
if (_local3 != null){
_savedState = _local3;
};
dispatchEvent(new Event("react"));
}
public function removePartAt(_arg1:uint){
var _local2:int;
if ((((_arg1 >= _parts.length)) || ((_parts[_arg1] == null)))){
return;
};
delete _parts[_arg1];
delete _partTypes[_arg1];
_parts[_arg1] = null;
_partTypes[_arg1] = 0;
_local2 = 0;
while (_local2 < _eyes.length) {
if (_eyes[_local2] == _arg1){
_eyes.splice(_local2, 1);
break;
};
_local2++;
};
if (_arg1 == (_parts.length - 1)){
_parts.splice(_arg1, 1);
_partTypes.splice(_arg1, 1);
};
}
public function addPart(_arg1:MovieClip, _arg2:int=0, _arg3:Boolean=false):int{
var _local4:int;
if (!_arg1){
return (-1);
};
_local4 = 0;
while (_local4 < _parts.length) {
if (_parts[_local4] == _arg1){
_partTypes[_local4] = _arg2;
return (_local4);
};
_local4++;
};
_local4 = 0;
while (_local4 < _parts.length) {
if (_parts[_local4] == null){
break;
};
_local4++;
};
_arg1.stop();
if (_arg3){
_eyes.push(_local4);
};
_parts[_local4] = _arg1;
_partTypes[_local4] = _arg2;
_partBaseValues[_local4] = {x:_arg1.x, y:_arg1.y, scaleX:_arg1.scaleX, scaleY:_arg1.scaleY, rotation:_arg1.rotation};
return (_local4);
}
public function get interruptible():Boolean{
return (_interruptible);
}
public function get curState():Array{
return (_curState);
}
public function getStateByName(_arg1:String):Object{
if (!_states[_arg1]){
return (null);
};
return (_states[_arg1]);
}
public function set frequency(_arg1:Number){
if (!isNaN(_arg1)){
_frequency = _arg1;
};
}
public function getPartID(_arg1:MovieClip):int{
var _local2:int;
_local2 = 0;
while (_local2 < _parts.length) {
if (_parts[_local2] == _arg1){
return (_local2);
};
_local2++;
};
return (-1);
}
public function get timer():int{
return (_timer);
}
public function get defaultState():String{
if (!_savedState){
return (_state);
};
return (_savedState.state);
}
public function get angle():Number{
return (_angle);
}
public function set canBlink(_arg1:Boolean){
_canBlink = _arg1;
}
public function reactTo(_arg1:Expansion, _arg2:Boolean=false){
if (_expansion != null){
_expansion.removeEventListener("checkpoint", expansionReaction);
_expansion = null;
};
_permanent = _arg2;
if (!_arg1){
return;
};
_expansion = _arg1;
_arg1.addEventListener("checkpoint", expansionReaction, false, 1, true);
}
public function get frequency():Number{
return (_frequency);
}
private function expansionReaction(_arg1:ExpansionEvent){
if (((!(_arg1.reaction)) || (!(_arg1.reaction.length)))){
return;
};
if (_permanent){
if (reacting){
_savedState.state = _arg1.reaction;
} else {
setState(_arg1.reaction);
};
} else {
react(_arg1.reaction, _arg1.timer);
};
}
public function setState(_arg1:String){
var _local2:Array;
var _local3:int;
var _local4:String;
if ((((_arg1 == _state)) || (_savedState))){
return;
};
if (!_states[_arg1]){
return;
};
_local2 = _curState;
_curState = [];
_curState.state = (_state = _arg1);
if (_states[_arg1]["canBlink"] != undefined){
_canBlink = _states[_arg1]["canBlink"];
};
if (!isNaN(_states[_arg1]["frequency"])){
_frequency = _states[_arg1]["frequency"];
};
if (!isNaN(_states[_arg1]["offset"])){
_offset = _states[_arg1]["offset"];
};
_blinking = false;
_local3 = 0;
while (_local3 < _states[_arg1].length) {
_curState[_local3] = _states[_arg1][_local3];
_local3++;
};
_local3 = 0;
while (_local3 < _parts.length) {
if (((((!(_states[_arg1][_local3])) || (!(_states[_arg1][_local3][FRAME])))) || (!(_states[_arg1][_local3][FRAME].length)))){
} else {
if ((((_partTypes[_local3] == MOVABLE)) && (_local2[_local3]))){
_local4 = ((_local2[_local3][FRAME] + "2") + _states[_arg1][_local3][FRAME]);
if (((!((_parts[_local3].currentLabel == _states[_arg1][_local3][FRAME]))) && (hasLabel(_parts[_local3], _local4)))){
_parts[_local3].gotoAndPlay(_local4);
} else {
if (_states[_arg1][_local3][FRAME] != _local2[_local3][FRAME]){
_parts[_local3].gotoAndPlay(_states[_arg1][_local3][FRAME]);
throw ((((((("Label " + _local4) + " is missing! in Movieclip #") + _local3) + "(") + _parts[_local3].name) + ")."));
};
};
} else {
if (((_states[_arg1][_local3][FRAME]) && (_states[_arg1][_local3][FRAME].length))){
_parts[_local3].gotoAndPlay(_states[_arg1][_local3][FRAME]);
};
};
};
_local3++;
};
}
public function set interruptible(_arg1:Boolean){
_interruptible = _arg1;
}
public function removeState(_arg1:String){
delete _states[_arg1];
}
public function addStateAttributes(_arg1:Array, _arg2:Boolean, _arg3:Number=NaN, _arg4:Number=NaN){
if (!_arg1){
return;
};
_arg1.canBlink = _arg2;
if (!isNaN(_arg3)){
_arg1.frequency = _arg3;
};
if (!isNaN(_arg4)){
_arg1.offset = _arg4;
};
}
public function removeReaction(_arg1:EventDispatcher, _arg2:String){
var _local3:int;
_local3 = 0;
while (_local3 < _reactions.length) {
if ((((_reactions[_local3].hit == _arg1)) && ((_reactions[_local3].type == _arg2)))){
_reactions[_local3].hit.removeEventListener(_arg2, _reacting);
delete _reactions[_local3];
_reactions.splice(_local3, 1);
return;
};
_local3++;
};
}
public function addState(_arg1:String, _arg2:Array){
var _local3:int;
if (_states[_arg1]){
delete _states[_arg1];
};
_states[_arg1] = new Array();
_local3 = 0;
while (_local3 < _arg2.length) {
if (_arg2[_local3]){
_states[_arg1][_local3] = _arg2[_local3].concat();
} else {
_states[_arg1][_local3] = null;
};
_local3++;
};
_states[_arg1].canBlink = _arg2.canBlink;
_states[_arg1].frequency = _arg2.frequency;
_states[_arg1].offset = _arg2.offset;
}
public function addReaction(_arg1:EventDispatcher, _arg2:String, _arg3:String, _arg4:int=30){
var _local5:Object;
_local5 = getReaction(_arg1, _arg2);
if (_local5 != null){
_local5.state = _arg3;
return;
};
_arg1.addEventListener(_arg2, _reacting, false, 2, true);
_reactions.push({hit:_arg1, type:_arg2, state:_arg3, timer:_arg4});
}
public function getBaseValues(_arg1:uint):Object{
var _local2:MovieClip;
_local2 = getPartAt(_arg1);
if (!_local2){
return (null);
};
return (_partBaseValues[_arg1]);
}
public function activate(_arg1:Boolean=true){
if (_active == _arg1){
return;
};
_active = _arg1;
if (_active){
_stage.addEventListener("enterFrame", eFrame);
} else {
_stage.removeEventListener("enterFrame", eFrame);
};
}
public function getPartAt(_arg1:int):MovieClip{
if (_parts[_arg1]){
return (_parts[_arg1]);
};
return (null);
}
public static function hasLabel(_arg1:MovieClip, _arg2:String):Boolean{
var _local3:Array;
var _local4:FrameLabel;
var _local5:int;
_local3 = _arg1.currentLabels;
_local5 = 0;
while (_local5 < _local3.length) {
_local4 = _local3[_local5];
if (_local4.name == _arg2){
return (true);
};
_local5++;
};
return (false);
}
}
}//package expansion
Section 4
//Speech (expansion.Speech)
package expansion {
import flash.display.*;
import flash.events.*;
import flash.text.*;
public class Speech extends EventDispatcher {
private var _contained:Boolean;
private var _textSpeed:int;
private var _checkpoints:Array;
private var _txt:TextField;
private var _events:Array;
private var _interruptible:Boolean;
private var _letter:int;
private var _timer:int;
private var _expansion:Expansion;
private var _phrase:String;
private var _interruptionText:String;
public function Speech(_arg1:TextField, _arg2:Boolean=true){
_txt = _arg1;
_contained = _arg2;
_textSpeed = 1;
_timer = 0;
_letter = 0;
_phrase = "";
_expansion = null;
_events = [];
_checkpoints = [];
if (!_txt){
throw ("ERROR: No TextField object found!");
};
_interruptionText = "--";
_interruptible = false;
_txt.visible = false;
_txt.text = "";
if (((_contained) && (_txt.parent))){
_txt.parent.visible = _txt.visible;
};
}
public function get interruptionText():String{
return (_interruptionText);
}
public function clearCheckPoint(_arg1:MovieClip, _arg2:int, _arg3:int=1){
var _local4:int;
_local4 = 0;
while (_local4 < _checkpoints.length) {
if ((((((_checkpoints[_local4].part == _arg1)) && ((_checkpoints[_local4].size == _arg2)))) && ((_checkpoints[_local4].direction == _arg3)))){
_checkpoints.splice(_local4, 1);
return;
};
_local4++;
};
}
public function get textSpeed():int{
return (_textSpeed);
}
public function clearSpeech(){
_letter = 0;
_phrase = "";
_txt.removeEventListener("enterFrame", _speaking);
_txt.text = "";
if (((_contained) && (_txt.parent))){
_txt.parent.visible = false;
};
_txt.visible = false;
}
private function _event(_arg1:Event){
var _local2:Object;
_local2 = getEvent((_arg1.target as EventDispatcher), _arg1.type);
if (!_local2){
return;
};
say(_local2.phrase, _local2.time);
}
public function set interruptionText(_arg1:String){
_interruptionText = _arg1;
}
private function _checkpoint(_arg1:ExpansionEvent){
var _local2:Object;
_local2 = getCheckPoint(_arg1.expandable, _arg1.size, _arg1.direction);
if (!_local2){
return;
};
say(_local2.phrase, _local2.time);
}
public function get position():int{
return (_letter);
}
private function _speaking(_arg1:Event){
var _local2:int;
if (_letter < _phrase.length){
_local2 = 0;
while ((((_local2 < _textSpeed)) && ((_letter < _phrase.length)))) {
_txt.appendText(_phrase.charAt(_letter++));
_txt.scrollV = _txt.maxScrollV;
_local2++;
};
if (_letter >= _phrase.length){
dispatchEvent(new Event("speechFinished"));
};
} else {
if (_timer > 0){
_timer--;
} else {
clearSpeech();
dispatchEvent(new Event("speechCleared"));
};
};
}
public function set textSpeed(_arg1:int){
if (_arg1 < 1){
_arg1 = 1;
};
_textSpeed = _arg1;
}
public function get interruptible():Boolean{
return (_interruptible);
}
public function get phrase():String{
return (_phrase);
}
public function listenTo(_arg1:Expansion){
if (_expansion){
_expansion.removeEventListener("checkpoint", _checkpoint);
_expansion = null;
};
if (!_arg1){
return;
};
_expansion = _arg1;
_expansion.addEventListener("checkpoint", _checkpoint, false, 0, true);
}
public function get timer():int{
return (_timer);
}
public function get speaking():Boolean{
return (((_txt.visible) && ((_letter < _phrase.length))));
}
public function get textField():TextField{
return (_txt);
}
public function getCheckPoint(_arg1:MovieClip, _arg2:int, _arg3:int=1):Object{
var _local4:int;
_local4 = 0;
while (_local4 < _checkpoints.length) {
if ((((((_checkpoints[_local4].part == _arg1)) && ((_checkpoints[_local4].size == _arg2)))) && ((_checkpoints[_local4].direction == _arg3)))){
return (_checkpoints[_local4]);
};
_local4++;
};
return (null);
}
public function getEvent(_arg1:EventDispatcher, _arg2:String):Object{
var _local3:int;
_local3 = 0;
while (_local3 < _events.length) {
if ((((_events[_local3].object == _arg1)) && ((_events[_local3].type == _arg2)))){
return (_events[_local3]);
};
_local3++;
};
return (null);
}
public function clearEvent(_arg1:EventDispatcher, _arg2:String){
var _local3:int;
_local3 = 0;
while (_local3 < _events.length) {
if ((((_events[_local3].object == _arg1)) && ((_events[_local3].type == _arg2)))){
_arg1.removeEventListener(_arg2, _event);
_events.splice(_local3, 1);
return;
};
_local3++;
};
}
public function set contained(_arg1:Boolean){
if (((_contained) && (_txt.parent))){
if (!_arg1){
_txt.parent.visible = true;
} else {
_txt.parent.visible = _txt.visible;
};
};
_contained = _arg1;
}
public function setEvent(_arg1:EventDispatcher, _arg2:String, _arg3:String, _arg4:int=-1){
var _local5:Object;
if (((((!(_arg1)) || (!(_arg2)))) || (!(_arg2.length)))){
return;
};
_local5 = getEvent(_arg1, _arg2);
if (_local5 != null){
_local5.phrase = phrase;
_local5.time = _arg4;
return;
};
_events.push({object:_arg1, type:_arg2, phrase:_arg3, time:_arg4});
_arg1.addEventListener(_arg2, _event, false, 5, true);
}
public function set interruptible(_arg1:Boolean){
_interruptible = _arg1;
}
public function say(_arg1:String, _arg2:int=-1){
var _local3:String;
var _local4:String;
if (((speaking) && (!(_interruptible)))){
return;
};
if (!_txt){
throw ("ERROR: No TextField object found!");
};
if (_txt.length > 0){
_local3 = _phrase.charAt((_letter - 1));
_local4 = _phrase.charAt(_letter);
if ((((((((_letter > 0)) && ((_letter < _phrase.length)))) && (isLetter(_local3)))) && (isLetter(_local4)))){
_txt.appendText(_interruptionText);
};
_txt.appendText("\n\n");
_txt.scrollV = _txt.maxScrollV;
};
if (((_contained) && (_txt.parent))){
_txt.parent.visible = true;
};
if (_arg2 < 0){
_arg2 = (_arg1.length + 20);
};
_phrase = _arg1;
_letter = 0;
_timer = _arg2;
_txt.visible = true;
_txt.addEventListener("enterFrame", _speaking);
}
public function get contained():Boolean{
return (_contained);
}
public function setCheckPoint(_arg1:MovieClip, _arg2:int, _arg3:int=1, _arg4:String="", _arg5:int=-1){
var _local6:Object;
if (!_arg1){
return;
};
_local6 = getCheckPoint(_arg1, _arg2, _arg3);
if (_local6 != null){
_local6.phrase = _arg4;
_local6.time = _arg5;
return;
};
_checkpoints.push({part:_arg1, size:_arg2, direction:_arg3, phrase:_arg4, time:_arg5});
}
public function destroy(){
var _local1:int;
_local1 = 0;
while (_local1 < _events.length) {
_events[_local1].object.removeEventListener(_events[_local1].type, _event);
_local1++;
};
_events = [];
_local1 = 0;
while (_local1 < _checkpoints.length) {
delete _checkpoints[_local1];
_local1++;
};
_checkpoints = [];
listenTo(null);
clearSpeech();
if (((_contained) && (_txt.parent))){
_txt.parent.visible = true;
};
_txt.visible = true;
_txt = null;
}
public static function isLetter(_arg1:String){
var _local2:int;
var _local3:Array;
var _local4:int;
_local2 = _arg1.charCodeAt(0);
if ((((_local2 >= "a".charCodeAt(0))) && ((_local2 <= "z".charCodeAt(0))))){
return (true);
};
if ((((_local2 >= "A".charCodeAt(0))) && ((_local2 <= "Z".charCodeAt(0))))){
return (true);
};
if ((((_local2 >= "0".charCodeAt(0))) && ((_local2 <= "9".charCodeAt(0))))){
return (true);
};
_local3 = ["á", "é", "í", "ó", "ú", "Á", "É", "Í", "Ó", "Ú", "à", "è", "ì", "ò", "ù", "À", "È", "Ì", "Ò", "Ù", "ä", "ë", "ï", "ö", "ü", "Ä", "Ë", "Ï", "Ö", "Ü", "â", "ê", "î", "ô", "û", "Â", "Ê", "Î", "Ô", "Û", "ñ", "Ñ"];
_local4 = 0;
while (_local4 < _local3.length) {
if (_local3[_local4] == _arg1){
return (true);
};
_local4++;
};
return (false);
}
}
}//package expansion
Section 5
//_btn_26 (holly_fla._btn_26)
package holly_fla {
import flash.display.*;
import flash.text.*;
public dynamic class _btn_26 extends MovieClip {
public var _txt:TextField;
}
}//package holly_fla
Section 6
//_panel_25 (holly_fla._panel_25)
package holly_fla {
import flash.display.*;
import flash.text.*;
public dynamic class _panel_25 extends MovieClip {
public var _revert:MovieClip;
public var _cont:MovieClip;
public var _minus:MovieClip;
public var _zero:MovieClip;
public var _plus:MovieClip;
public var _expand:MovieClip;
public var _info_txt:TextField;
}
}//package holly_fla
Section 7
//arm1_20 (holly_fla.arm1_20)
package holly_fla {
import flash.display.*;
public dynamic class arm1_20 extends MovieClip {
public function arm1_20(){
addFrameScript(1, frame2, 9, frame10, 15, frame16, 24, frame25, 33, frame34, 43, frame44, 50, frame51, 58, frame59, 68, frame69);
}
function frame10(){
this.gotoAndPlay("bellyA");
}
function frame16(){
this.gotoAndPlay(this.currentLabel);
}
function frame25(){
this.gotoAndPlay("down");
}
function frame2(){
this.gotoAndPlay(this.currentLabel);
}
function frame34(){
this.gotoAndPlay("bellyB");
}
function frame44(){
this.gotoAndPlay("bellyB");
}
function frame51(){
this.gotoAndPlay(this.currentLabel);
}
function frame59(){
this.gotoAndPlay("bellyA");
}
function frame69(){
this.gotoAndPlay("down");
}
}
}//package holly_fla
Section 8
//eye1_14 (holly_fla.eye1_14)
package holly_fla {
import flash.display.*;
public dynamic class eye1_14 extends MovieClip {
public var pupil:MovieClip;
public function eye1_14(){
addFrameScript(1, frame2, 5, frame6, 10, frame11, 14, frame15, 20, frame21, 23, frame24, 27, frame28, 39, frame40);
}
function frame6(){
this.gotoAndPlay(this.currentLabel);
}
function frame24(){
this.gotoAndPlay(this.currentLabel);
}
function frame21(){
this.gotoAndPlay(this.currentLabel);
}
function frame2(){
this.gotoAndPlay(this.currentLabel);
}
function frame15(){
this.gotoAndPlay(this.currentLabel);
}
function frame28(){
this.gotoAndPlay(this.currentLabel);
}
function frame11(){
this.gotoAndPlay(this.currentLabel);
}
function frame40(){
this.gotoAndPlay(this.currentLabel);
}
}
}//package holly_fla
Section 9
//head_12 (holly_fla.head_12)
package holly_fla {
import flash.display.*;
public dynamic class head_12 extends MovieClip {
public var eye1:MovieClip;
public var hair1:MovieClip;
public var ear1:MovieClip;
public var mouth:MovieClip;
}
}//package holly_fla
Section 10
//holly_1 (holly_fla.holly_1)
package holly_fla {
import flash.display.*;
public dynamic class holly_1 extends MovieClip {
public var leg1:MovieClip;
public var chair2:MovieClip;
public var mini_3ds:MovieClip;
public var chair1:MovieClip;
public var outlet:MovieClip;
public var speech_mc:MovieClip;
public var sky:MovieClip;
public var tail:MovieClip;
public var plug1:MovieClip;
public var plug2:MovieClip;
public var arm1:MovieClip;
public var breast1:MovieClip;
public var hair2:MovieClip;
public var body:MovieClip;
public var belly:MovieClip;
public var room:MovieClip;
public var head:MovieClip;
}
}//package holly_fla
Section 11
//MainTimeline (holly_fla.MainTimeline)
package holly_fla {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import expansion.*;
import flash.geom.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.media.*;
import flash.net.*;
import flash.printing.*;
import flash.system.*;
import flash.ui.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class MainTimeline extends MovieClip {
public var oldMX:int;
public var oldMY:int;
public var exp:Expansion;
public var dsInit:Boolean;
public var dsBallColors:Array;
public var dsTextTimer:int;
public var sizeBar:MovieClip;
public var scr2Rect:Rectangle;
public var dsText:TextField;
public var dsBallVY:Number;
public var DS_BALL_MAXVY:Number;
public var holly:MovieClip;
public var bmpPink:BitmapData;
public var oldAY:Number;
public var bgX:int;
public var bgY:int;
public var scr1Rect:Rectangle;
public var amberVY:Number;
public var speech:Speech;
public var scrBorder:MovieClip;
public var _panel:MovieClip;
public var bmpRect:Rectangle;
public var origHY:Number;
public var dsBG:MovieClip;
public var dsScoreText:TextField;
public var origHX:Number;
public var DS_BALL_RADIUS:Number;
public var tempState:Array;
public var dsBall:MovieClip;
public var blinkTimer:int;
public var char:Expression;
public var amberFrames:Array;
public var oldHX:Number;
public var oldHY:Number;
public var bmpBlack:BitmapData;
public var expIDs:Object;
public var ds3:DS;
public var bmp:BitmapData;
public var dsAmber:Amber;
public var dsBallHit:Boolean;
public var charIDs:Object;
public var bmpWhite:BitmapData;
public var dsBallFall:Boolean;
public var amberX:Number;
public var amberY:Number;
public var bouncySpace:Array;
public var DS_BALL_MINVY:Number;
public function MainTimeline(){
addFrameScript(0, frame1);
}
public function balancePoint(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number):Array{
return ([(_arg1 + (_arg2 * _arg4)), ((_arg2 * _arg4) + _arg3), ((_arg5 - _arg1) * _arg6)]);
}
public function zoomin_fn(_arg1:Event){
stage.addEventListener("enterFrame", zoomingin_fn, false, 0, true);
stage.addEventListener("mouseUp", endzoom_fn, false, 0, true);
}
public function scrollMove(_arg1:Event){
var _local2:Number;
var _local3:Number;
_local2 = (stage.mouseX - oldMX);
_local3 = (stage.mouseY - oldMY);
holly.x = (oldHX + _local2);
holly.y = (oldHY + _local3);
adjustScreen();
}
public function startReact(_arg1:Event){
speech.interruptible = false;
}
public function deleteBall(_arg1:Event=null){
if (dsBall){
dsBall.mask.parent.removeChild(dsBall.mask);
dsBall.mask = null;
dsBall.parent.removeChild(dsBall);
dsBall.graphics.clear();
dsBall = null;
};
}
public function zoomingin_fn(_arg1:Event){
holly.scaleX = (holly.scaleX + 0.01);
holly.scaleY = holly.scaleX;
adjustScreen();
}
public function outlet_fn(_arg1:Event){
if (holly.plug1.currentFrame == 2){
holly.plug1.gotoAndStop(3);
};
}
function frame1(){
expIDs = {};
charIDs = {};
exp = new Expansion(stage);
expIDs["belly"] = exp.insertExpandable(holly.belly);
expIDs["breast1"] = exp.insertExpandable(holly.breast1);
exp.maxSize = 400;
char = new Expression(stage);
charIDs["breast1"] = char.addPart(holly.breast1);
charIDs["head"] = char.addPart(holly.head);
charIDs["mouth"] = char.addPart(holly.head.mouth);
charIDs["eye1"] = char.addPart(holly.head.eye1, Expression.ANIMATED, true);
charIDs["pupil1"] = char.addPart(holly.head.eye1.pupil, Expression.ANIMATED);
charIDs["arm1"] = char.addPart(holly.arm1, Expression.MOVABLE);
tempState = [];
char.addStateAttributes(tempState, true, 0.2, 0.5);
char.addPartToState(tempState, charIDs["head"], null, -10, 2);
char.addPartToState(tempState, charIDs["eye1"], "big");
char.addPartToState(tempState, charIDs["pupil1"], null, NaN, NaN, 1, 2);
char.addPartToState(tempState, charIDs["mouth"], "smile");
char.addPartToState(tempState, charIDs["arm1"], "down");
char.addState("normal", tempState);
tempState = [];
char.addStateAttributes(tempState, true, 0.3, 0.75);
char.addPartToState(tempState, charIDs["head"], null, 0, 2);
char.addPartToState(tempState, charIDs["eye1"], "open");
char.addPartToState(tempState, charIDs["pupil1"], null, NaN, NaN, 2, 4);
char.addPartToState(tempState, charIDs["mouth"], "closed");
char.addPartToState(tempState, charIDs["arm1"], "down");
char.addState("check", tempState);
tempState = [];
char.addStateAttributes(tempState, true, 0.3, 0.75);
char.addPartToState(tempState, charIDs["head"], null, 0, 2);
char.addPartToState(tempState, charIDs["eye1"], "medium");
char.addPartToState(tempState, charIDs["pupil1"], null, NaN, NaN, 2, 4);
char.addPartToState(tempState, charIDs["mouth"], "small");
char.addPartToState(tempState, charIDs["arm1"], "down");
char.addState("expand", tempState);
tempState = [];
char.addStateAttributes(tempState, true, 0.3, 0.75);
char.addPartToState(tempState, charIDs["head"], null, 0, 2);
char.addPartToState(tempState, charIDs["eye1"], "medium");
char.addPartToState(tempState, charIDs["pupil1"], null, NaN, NaN, 4, 4);
char.addPartToState(tempState, charIDs["mouth"], "happy3");
char.addPartToState(tempState, charIDs["arm1"], "bellyA");
char.addState("happy", tempState);
tempState = [];
char.addStateAttributes(tempState, false, 0.3, 0.4);
char.addPartToState(tempState, charIDs["head"], null, 5, 2);
char.addPartToState(tempState, charIDs["eye1"], "closed");
char.addPartToState(tempState, charIDs["pupil1"], null, NaN, NaN, 4, 4);
char.addPartToState(tempState, charIDs["mouth"], "happy2");
char.addPartToState(tempState, charIDs["arm1"], "down");
char.addState("enjoy", tempState);
tempState = [];
char.addStateAttributes(tempState, true, 0.3, 0.4);
char.addPartToState(tempState, charIDs["head"], null, -10, 2);
char.addPartToState(tempState, charIDs["eye1"], "sad");
char.addPartToState(tempState, charIDs["pupil1"], null, NaN, NaN, 4, 2);
char.addPartToState(tempState, charIDs["mouth"], "happy3");
char.addPartToState(tempState, charIDs["arm1"], "bellyB");
char.addState("big", tempState);
tempState = [];
char.addStateAttributes(tempState, true, 0.3, 0.4);
char.addPartToState(tempState, charIDs["head"], null, -5, 2);
char.addPartToState(tempState, charIDs["eye1"], "open");
char.addPartToState(tempState, charIDs["pupil1"], null, NaN, NaN, 3, -2);
char.addPartToState(tempState, charIDs["mouth"], "teeth1");
char.addPartToState(tempState, charIDs["arm1"], "bellyA");
char.addState("surprised", tempState);
tempState = [];
char.addStateAttributes(tempState, true, 0.5, 0.6);
char.addPartToState(tempState, charIDs["head"], null, -10, 2);
char.addPartToState(tempState, charIDs["eye1"], "medium");
char.addPartToState(tempState, charIDs["pupil1"], null, NaN, NaN, 3, -2);
char.addPartToState(tempState, charIDs["mouth"], "tired");
char.addPartToState(tempState, charIDs["arm1"], "down");
char.addState("pleasure", tempState);
tempState = [];
char.addStateAttributes(tempState, false, 0.1, 0.8);
char.addPartToState(tempState, charIDs["head"], null, -15, 2);
char.addPartToState(tempState, charIDs["eye1"], "closed");
char.addPartToState(tempState, charIDs["pupil1"], null, NaN, NaN, 3, -2);
char.addPartToState(tempState, charIDs["mouth"], "small");
char.addPartToState(tempState, charIDs["arm1"], "bellyB");
char.addState("over", tempState);
tempState = [];
char.addStateAttributes(tempState, false, 0.2, 0.5);
char.addPartToState(tempState, charIDs["head"], null, 15, 5);
char.addPartToState(tempState, charIDs["eye1"], "closed");
char.addPartToState(tempState, charIDs["pupil1"], null, NaN, NaN, 3, -2);
char.addPartToState(tempState, charIDs["mouth"], "small");
char.addPartToState(tempState, charIDs["arm1"], "bellyB");
char.addState("reverting", tempState);
tempState = [];
char.addStateAttributes(tempState, false, 0.2, 0.5);
char.addPartToState(tempState, charIDs["head"], null, 15, 5);
char.addPartToState(tempState, charIDs["eye1"], "sad");
char.addPartToState(tempState, charIDs["pupil1"], null, NaN, NaN, -3, 3);
char.addPartToState(tempState, charIDs["mouth"], "happy");
char.addPartToState(tempState, charIDs["arm1"], "bellyA");
char.addState("wonder", tempState);
tempState = [];
char.addStateAttributes(tempState, false, 0.2, 0.5);
char.addPartToState(tempState, charIDs["head"], null, 0, 3);
char.addPartToState(tempState, charIDs["eye1"], "medium");
char.addPartToState(tempState, charIDs["pupil1"], null, NaN, NaN, 0, 3);
char.addPartToState(tempState, charIDs["mouth"], "open");
char.addPartToState(tempState, charIDs["arm1"], "down");
char.addState("sad", tempState);
tempState = [];
char.addStateAttributes(tempState, true, 0, 0.5);
char.addPartToState(tempState, charIDs["head"], null, 10, 4);
char.addPartToState(tempState, charIDs["eye1"], "open");
char.addPartToState(tempState, charIDs["pupil1"], null, NaN, NaN, -2, 0);
char.addPartToState(tempState, charIDs["mouth"], "happy");
char.addPartToState(tempState, charIDs["arm1"], "down");
char.addState("greeting", tempState);
tempState = [];
char.addStateAttributes(tempState, true, 0.6, 0.3);
char.addPartToState(tempState, charIDs["head"], null, 10, 8);
char.addPartToState(tempState, charIDs["eye1"], "shut");
char.addPartToState(tempState, charIDs["pupil1"], null, NaN, NaN, -2, 0);
char.addPartToState(tempState, charIDs["mouth"], "teeth1");
char.addPartToState(tempState, charIDs["arm1"], "down");
char.addState("bellypoke", tempState);
tempState = [];
char.addStateAttributes(tempState, true, 0.3, 0.8);
char.addPartToState(tempState, charIDs["head"], null, 10, 8);
char.addPartToState(tempState, charIDs["eye1"], "small");
char.addPartToState(tempState, charIDs["pupil1"], null, NaN, NaN, 3, 4);
char.addPartToState(tempState, charIDs["mouth"], "teeth1");
char.addState("breastpoke", tempState);
tempState = [];
char.addStateAttributes(tempState, true, 1.23, 0.35);
char.addPartToState(tempState, charIDs["head"], null, -15, 8);
char.addPartToState(tempState, charIDs["eye1"], "shut");
char.addPartToState(tempState, charIDs["pupil1"], null, NaN, NaN, 3, 4);
char.addPartToState(tempState, charIDs["mouth"], "happy2");
char.addState("laugh", tempState);
speech = new Speech(holly.speech_mc._txt, true);
setSpeech();
exp.addEventListener("checkpoint", checkPoint, false, -10, true);
exp.setCheckPoint(expIDs["belly"], 2, 1, "check");
exp.setCheckPoint(expIDs["belly"], 40, 1, "expand");
exp.setCheckPoint(expIDs["belly"], 150, 1, "happy");
exp.setCheckPoint(expIDs["belly"], 250, 1, "enjoy");
exp.setCheckPoint(expIDs["belly"], 400, 1, "big");
exp.setCheckPoint(expIDs["belly"], 401, 1, "surprised");
exp.setCheckPoint(expIDs["belly"], 500, 1, "pleasure");
exp.setCheckPoint(expIDs["belly"], 600, 1, "over");
exp.setCheckPoint(expIDs["belly"], 599, -1, "reverting");
exp.setCheckPoint(expIDs["belly"], 399, -1, "wonder");
exp.setCheckPoint(expIDs["belly"], 200, -1, "sad");
exp.setCheckPoint(expIDs["belly"], 149, -1);
exp.setCheckPoint(expIDs["belly"], 1, -1, "normal");
char.reactTo(exp, true);
speech.listenTo(exp);
char.addEventListener("react", startReact);
char.addEventListener("endreact", endReact);
char.setState("normal");
exp.activate();
char.activate();
char.interruptible = false;
stage.addEventListener("mouseDown", init);
holly.body.addEventListener("enterFrame", breathing);
_panel._expand.gotoAndStop(1);
_panel._revert.gotoAndStop(1);
_panel._cont.gotoAndStop(1);
_panel._expand._txt.text = "Expand";
_panel._revert._txt.text = "Revert";
_panel._info_txt.text = "Interactive pregnant Holly.\nDrawn, animated and programmed by Doom the wolf.\nhttp://doom-the-wolf.deviantart.com";
origHX = holly.x;
origHY = holly.y;
_panel._zero.gotoAndStop(1);
_panel._plus.gotoAndStop(1);
_panel._minus.gotoAndStop(1);
ds3 = new DS();
scr1Rect = new Rectangle(100, 30, 300, 180);
scr2Rect = new Rectangle(140, 270, 220, 160);
scrBorder = new MovieClip();
ds3.x = 150;
ds3.y = 100;
scrBorder.graphics.lineStyle(1);
scrBorder.graphics.drawRect(scr1Rect.x, scr1Rect.y, scr1Rect.width, scr1Rect.height);
scrBorder.graphics.lineStyle(1);
scrBorder.graphics.drawRect(scr2Rect.x, scr2Rect.y, scr2Rect.width, scr2Rect.height);
ds3.addChild(scrBorder);
amberFrames = [];
amberFrames["stand"] = {body:"stand", face:"happy", arms:"down"};
amberFrames["jump"] = {body:"jump", face:"jump", arms:"up"};
amberFrames["hit"] = {body:"stand", face:"hit", arms:"down"};
bmpRect = new Rectangle(0, 0, scr1Rect.width, ((scr2Rect.y + scr2Rect.height) - scr1Rect.y));
bmp = new BitmapData(bmpRect.width, bmpRect.height, false, 4465186);
bmpBlack = new BitmapData(bmpRect.width, bmpRect.height);
bmpPink = new BitmapData(bmpRect.width, bmpRect.height);
bmpWhite = new BitmapData(bmpRect.width, bmpRect.height);
bmpPink.perlinNoise((bmpRect.width * 0.2), bmpRect.height, 3, (Math.random() * 4095), true, true, 7, true, null);
bmpWhite.perlinNoise(bmpRect.width, bmpRect.height, 3, (Math.random() * 4095), true, true, 7, true, null);
colorNoise(bmpPink, 16737928);
bmpBlack = combineBitmaps(bmpPink, bmp);
bmp.dispose();
bmp = combineBitmaps(bmpBlack, bmpWhite);
bmpBlack.dispose();
bmpPink.dispose();
bmpWhite.dispose();
bmpPink = (bmpWhite = (bmpBlack = null));
dsBG = new MovieClip();
dsBG.x = scr1Rect.x;
dsBG.y = scr1Rect.y;
dsBG.mask = makeDSMask();
ds3.addChild(dsBG);
dsAmber = null;
amberX = (scr1Rect.x + (bmpRect.width * 0.5));
amberY = ((scr1Rect.y + bmpRect.height) - 5);
amberVY = 0;
bgX = 0;
bgY = 0;
dsBallColors = [0xFF0000, 0xFF00, 0xFF, 0xFF00FF, 0xFFFF00, 0xFF9900];
DS_BALL_RADIUS = 20;
DS_BALL_MAXVY = 30;
DS_BALL_MINVY = -20;
oldAY = amberY;
dsBallVY = 0;
dsBall = null;
dsBallHit = false;
dsBallFall = false;
dsInit = false;
bouncySpace = [1, 0, 0];
holly.mini_3ds.blinker.gotoAndStop(1);
holly.plug1.gotoAndStop(1);
holly.plug2.gotoAndStop(1);
blinkTimer = 0;
holly.mini_3ds.addEventListener("mouseDown", ds_blinker);
holly.plug1.addEventListener("mouseDown", plug_fn);
holly.plug2.addEventListener("mouseDown", plug_fn);
holly.outlet.addEventListener("mouseDown", outlet_fn);
sizeBar = new MovieClip();
sizeBar.x = 5;
sizeBar.y = 5;
stage.addChild(sizeBar);
exp.addEventListener("sizeChanged", updateBar);
updateBar();
}
public function dsTextFrame(_arg1:Event=null){
if (dsInit){
dsText.visible = Boolean((int((dsTextTimer / 10)) % 2));
dsTextTimer++;
} else {
if (dsTextTimer > 0){
dsTextTimer--;
if (dsTextTimer <= 0){
dsText.visible = false;
};
};
};
}
public function updateBar(_arg1:Event=null){
sizeBar.graphics.clear();
sizeBar.graphics.lineStyle(4, 0xFF0000);
sizeBar.graphics.beginFill(0xCC0000);
sizeBar.graphics.drawRoundRect(0, 0, exp.getMaxSize(expIDs["belly"]), 32, 8);
sizeBar.graphics.endFill();
sizeBar.graphics.lineStyle(4, 0xFF00);
sizeBar.graphics.beginFill(0xCC00);
sizeBar.graphics.drawRoundRect(0, 0, exp.getSize(expIDs["belly"]), 32, 8);
sizeBar.graphics.endFill();
}
public function expand_fn(_arg1:Event){
if (exp.getSize(expIDs["belly"]) == 600){
reset();
return;
};
if (exp.getSize(expIDs["belly"]) >= exp.getMaxSize(expIDs["belly"])){
return;
};
exp.growth = 1;
_panel._revert.gotoAndStop(1);
_panel._expand.gotoAndStop(2);
}
public function amberInit(_arg1:Event){
dsAmber.y = (dsAmber.y + amberVY);
if ((((dsAmber.y >= amberY)) && ((amberVY > 0)))){
dsAmber.y = amberY;
amberVY = 0;
setAmberFrames(dsAmber, "stand");
} else {
amberVY = (amberVY + 4);
};
bouncySpace = balancePoint(bouncySpace[0], bouncySpace[1], bouncySpace[2], 0.01, (1 + ((dsAmber.y - oldAY) * 0.05)), 20);
dsAmber.breasts.scaleY = bouncySpace[0];
dsAmber.belly.scaleY = (1 + ((((bouncySpace[0] - dsAmber.scaleY) * 0.4) * dsAmber.belly.currentFrame) / dsAmber.belly.totalFrames));
if (!dsInit){
stage.removeEventListener("enterFrame", amberInit);
stage.addEventListener("enterFrame", amberEFrame, false, 0, true);
};
updateDSBG();
oldAY = dsAmber.y;
}
public function ds_blinking(_arg1:Event){
var _local2:int;
blinkTimer--;
_local2 = ((Math.floor((blinkTimer * 0.33)) % 2) + 1);
holly.mini_3ds.blinker.gotoAndStop(_local2);
if (blinkTimer <= 0){
holly.mini_3ds.blinker.gotoAndStop(_local2);
stage.removeEventListener("enterFrame", ds_blinking);
};
}
public function expand_release_fn(_arg1:Event){
if ((_panel._cont.currentFrame - 2)){
exp.growth = 0;
_panel._revert.gotoAndStop(1);
_panel._expand.gotoAndStop(1);
};
}
public function amberEFrame(_arg1:Event){
var _local2:Rectangle;
dsAmber.y = (dsAmber.y + amberVY);
if ((((dsAmber.y >= amberY)) && ((amberVY > 0)))){
dsAmber.y = amberY;
amberVY = 0;
setAmberFrames(dsAmber, "stand");
} else {
amberVY = (amberVY + 4);
};
bouncySpace = balancePoint(bouncySpace[0], bouncySpace[1], bouncySpace[2], 0.01, (1 + ((dsAmber.y - oldAY) * 0.05)), 20);
dsAmber.breasts.scaleY = bouncySpace[0];
dsAmber.belly.scaleY = (1 + ((((bouncySpace[0] - dsAmber.scaleY) * 0.4) * dsAmber.belly.currentFrame) / dsAmber.belly.totalFrames));
_local2 = dsAmber.getRect(ds3);
if (!dsBall){
if ((((dsTextTimer <= 0)) && ((Math.random() < (1 / 30))))){
makeBall();
};
} else {
if (dsBallHit){
dsBall.y = (dsBall.y + DS_BALL_MINVY);
if ((dsBall.y + DS_BALL_RADIUS) < scr1Rect.y){
deleteBall();
};
} else {
if (dsBallFall){
setAmberFrames(dsAmber, "hit");
dsBallVY = (dsBallVY + 4);
dsBallVY = Math.min(DS_BALL_MAXVY, dsBallVY);
if ((dsBall.y - DS_BALL_RADIUS) > (scr2Rect.y + scr2Rect.height)){
deleteBall();
setAmberFrames(dsAmber, "stand");
};
} else {
if ((dsBall.y + DS_BALL_RADIUS) > _local2.y){
if ((((amberVY < 4)) && ((dsAmber.y < amberY)))){
dsBallHit = true;
dsBallVY = 0;
dsAmber.belly.nextFrame();
dsText.text = "YAY!";
dsScoreText.text = (((dsAmber.belly.currentFrame - 1) + "/") + (dsAmber.belly.totalFrames - 1));
dsText.visible = true;
dsTextTimer = 20;
if (dsAmber.belly.currentFrame == dsAmber.belly.totalFrames){
dsText.appendText("YOU DID IT!");
unlockSecret();
return;
};
} else {
dsBallFall = true;
dsBallVY = -16;
dsAmber.y = amberY;
amberVY = 0;
dsAmber.belly.prevFrame();
dsText.text = "OW!";
dsScoreText.text = (((dsAmber.belly.currentFrame - 1) + "/") + (dsAmber.belly.totalFrames - 1));
dsText.visible = true;
dsTextTimer = 20;
};
} else {
dsBallVY = (dsBallVY + 4);
dsBallVY = Math.min(DS_BALL_MAXVY, dsBallVY);
};
};
};
};
if (dsBall){
dsBall.y = (dsBall.y + dsBallVY);
};
updateDSBG();
oldAY = dsAmber.y;
}
public function scrollEnd(_arg1:Event){
stage.removeEventListener("mouseMove", scrollMove);
stage.removeEventListener("mouseUp", scrollEnd);
}
public function displayDS(){
stage.addChild(ds3);
}
public function adjustScreen(_arg1:Event=null){
var _local2:Rectangle;
if (holly.width < 800){
holly.width = 800;
holly.scaleY = holly.scaleX;
};
if (holly.width < 600){
holly.height = 600;
holly.scaleX = holly.scaleY;
};
_local2 = holly.getBounds(stage);
if (_local2.x > 0){
holly.x = (holly.x - _local2.x);
};
if (_local2.y > 0){
holly.y = (holly.y - _local2.y);
};
if ((_local2.x + _local2.width) < 800){
holly.x = (holly.x + (800 - (_local2.x + _local2.width)));
};
if ((_local2.y + _local2.height) < 600){
holly.y = (holly.y + (600 - (_local2.y + _local2.height)));
};
}
public function panel_fn(_arg1:Event){
if (((_panel.hitTestPoint(stage.mouseX, stage.mouseY, true)) && (!(ds3.parent)))){
_panel.y = (_panel.y + (((600 - 120) - _panel.y) * 0.5));
} else {
_panel.y = (_panel.y + ((600 - _panel.y) * 0.5));
};
}
public function combineBitmaps(_arg1:BitmapData, _arg2:BitmapData):BitmapData{
var _local3:BitmapData;
var _local4:uint;
var _local5:uint;
var _local6:uint;
var _local7:uint;
var _local8:uint;
var _local9:uint;
var _local10:uint;
var _local11:int;
var _local12:int;
_local3 = new BitmapData(Math.min(_arg1.width, _arg2.width), Math.min(_arg1.height, _arg2.height));
_local3.lock();
_local11 = 0;
while (_local11 < _local3.width) {
_local12 = 0;
while (_local12 < _local3.height) {
_local10 = _arg1.getPixel(_local11, _local12);
_local4 = ((_local10 >> 16) & 0xFF);
_local5 = ((_local10 >> 8) & 0xFF);
_local6 = (_local10 & 0xFF);
_local10 = _arg2.getPixel(_local11, _local12);
_local7 = ((_local10 >> 16) & 0xFF);
_local8 = ((_local10 >> 8) & 0xFF);
_local9 = (_local10 & 0xFF);
_local7 = (_local7 + _local4);
_local7 = Math.min(_local7, 0xFF);
_local8 = (_local8 + _local5);
_local8 = Math.min(_local8, 0xFF);
_local9 = (_local9 + _local6);
_local9 = Math.min(_local9, 0xFF);
_local3.setPixel(_local11, _local12, (((_local7 << 16) | (_local8 << 8)) | _local9));
_local12++;
};
_local11++;
};
_local3.unlock();
return (_local3);
}
public function zoomout_fn(_arg1:Event){
stage.addEventListener("enterFrame", zoomingout_fn, false, 0, true);
stage.addEventListener("mouseUp", endzoom_fn, false, 0, true);
}
public function revert_fn(_arg1:Event){
if (exp.getSize(expIDs["belly"]) <= 1){
return;
};
exp.growth = -1;
_panel._revert.gotoAndStop(2);
_panel._expand.gotoAndStop(1);
}
public function makeBall(_arg1:Event=null){
if (dsBall){
return;
};
dsBall = new MovieClip();
dsBall.x = amberX;
dsBall.y = (scr1Rect.y - DS_BALL_RADIUS);
dsBall.mask = makeDSMask();
drawBall(dsBall);
ds3.addChild(dsBall);
dsBallHit = false;
dsBallFall = false;
dsBallVY = 0;
}
public function init(_arg1:Event=null){
speech.say("Hey! I've been expecting you.");
char.react("greeting");
_panel._expand.addEventListener("mouseDown", expand_fn);
_panel._revert.addEventListener("mouseDown", revert_fn);
_panel._cont.addEventListener("mouseDown", invert_fn);
_panel._cont.addEventListener("mouseDown", expand_release_fn);
_panel.addEventListener("enterFrame", panel_fn);
stage.addEventListener("mouseUp", expand_release_fn);
_panel._zero.addEventListener("mouseDown", zero_fn);
_panel._plus.addEventListener("mouseDown", zoomin_fn);
_panel._minus.addEventListener("mouseDown", zoomout_fn);
stage.addEventListener("mouseDown", scrollStart);
stage.removeEventListener("mouseDown", init);
char.addReaction(holly.belly, "mouseDown", "bellypoke", 20);
char.addReaction(holly.breast1, "mouseDown", "breastpoke", 20);
char.addReaction(holly.leg1, "mouseDown", "laugh", 15);
speech.setEvent(holly.belly, "mouseDown", "Hee hee! That tickles!");
speech.setEvent(holly.breast1, "mouseDown", "Oooh! You're naughty!");
speech.setEvent(holly.leg1, "mouseDown", "AHAHA! Hey!");
}
public function unlockSecret(_arg1:Event=null){
exp.maxSize = 600;
updateBar();
}
public function plug_fn(_arg1:Event){
var _local2:MovieClip;
_local2 = (_arg1.currentTarget as MovieClip);
if (_local2.currentFrame == 2){
_local2.gotoAndStop(1);
return;
};
if (_local2.currentFrame == 1){
_local2.gotoAndStop(2);
return;
};
}
public function zoomingout_fn(_arg1:Event){
holly.scaleX = (holly.scaleX - 0.01);
holly.scaleY = holly.scaleX;
adjustScreen();
}
public function hideDS(){
stage.removeChild(ds3);
}
public function updateDSBG(){
bgX--;
bgY = (bgY - 8);
dsBG.graphics.clear();
drawBitmap(dsBG, bmp, bmpRect, bgX, bgY);
}
public function drawBall(_arg1:MovieClip){
var _local2:Graphics;
var _local3:uint;
_local2 = _arg1.graphics;
_local3 = dsBallColors[Math.floor((Math.random() * dsBallColors.length))];
_local2.beginFill(_local3);
_local2.drawCircle(0, 0, DS_BALL_RADIUS);
_local2.endFill();
_local2.beginFill(0xFFFFFF, 0.9);
_local2.drawCircle((-(DS_BALL_RADIUS) * 0.5), (-(DS_BALL_RADIUS) * 0.5), (DS_BALL_RADIUS * 0.2));
_local2.endFill();
}
public function endReact(_arg1:Event){
speech.interruptible = true;
}
public function checkPoint(_arg1:ExpansionEvent){
speech.clearCheckPoint(_arg1.expandable, _arg1.size, _arg1.direction);
if ((((_arg1.size == 400)) && ((_arg1.direction == 1)))){
exp.growth = 0;
_panel._expand.gotoAndStop(1);
};
if ((((_arg1.size == 600)) && ((_arg1.direction == 1)))){
exp.growth = 0;
_panel._expand.gotoAndStop(1);
_panel._expand._txt.text = "Reset";
};
if ((((_arg1.size == 1)) && ((_arg1.direction == -1)))){
exp.growth = 0;
_panel._revert.gotoAndStop(1);
};
if ((((((_arg1.size == 150)) && ((_arg1.direction == 1)))) || ((((_arg1.size == 399)) && ((_arg1.direction == -1)))))){
char.getStateByName("bellypoke")[charIDs["arm1"]][Expression.FRAME] = "bellyA";
} else {
if ((((_arg1.size == 400)) && ((_arg1.direction == 1)))){
char.getStateByName("bellypoke")[charIDs["arm1"]][Expression.FRAME] = "bellyB";
} else {
if ((((_arg1.size == 149)) && ((_arg1.direction == -1)))){
char.getStateByName("bellypoke")[charIDs["arm1"]][Expression.FRAME] = "down";
};
};
};
if (_arg1.size == 599){
_panel._expand._txt.text = "Expand";
};
}
public function reset(_arg1:Event=null){
exp.size = 0;
exp.maxSize = 400;
char.endReact();
char.setState("normal");
speech.say("Hey! I've been expecting you.");
char.react("greeting");
setSpeech();
updateBar();
holly.plug1.gotoAndStop(1);
holly.plug2.gotoAndStop(1);
holly.mini_3ds.blinker.gotoAndStop(1);
}
public function endzoom_fn(_arg1:Event){
stage.removeEventListener("enterFrame", zoomingout_fn);
stage.removeEventListener("enterFrame", zoomingin_fn);
stage.removeEventListener("mouseUp", endzoom_fn);
}
public function breathing(_arg1:Event){
var _local2:MovieClip;
var _local3:Number;
var _local4:int;
var _local5:Object;
_local2 = (_arg1.currentTarget as MovieClip);
_local3 = (((char.position * 0.5) + 0.5) * char.offset);
_local4 = (1 + Math.floor((_local3 * (_local2.totalFrames - 1))));
holly.body.gotoAndStop(_local4);
_local5 = char.getBaseValues(charIDs["breast1"]);
holly.breast1.x = (_local5.x + (_local3 * 3));
holly.breast1.y = (_local5.y - (_local3 * 2));
}
public function makeDSMask():MovieClip{
var _local1:*;
_local1 = new MovieClip();
ds3.addChild(_local1);
_local1.graphics.beginFill(0xFF0000);
_local1.graphics.drawRect(scr1Rect.x, scr1Rect.y, scr1Rect.width, scr1Rect.height);
_local1.graphics.endFill();
_local1.graphics.beginFill(0xFF0000);
_local1.graphics.drawRect(scr2Rect.x, scr2Rect.y, scr2Rect.width, scr2Rect.height);
_local1.graphics.endFill();
return (_local1);
}
public function colorNoise(_arg1:BitmapData, _arg2:uint){
var _local3:uint;
var _local4:uint;
var _local5:uint;
var _local6:uint;
var _local7:Number;
var _local8:uint;
var _local9:uint;
var _local10:uint;
var _local11:int;
var _local12:int;
_local3 = ((_arg2 >> 16) & 0xFF);
_local4 = ((_arg2 >> 8) & 0xFF);
_local5 = (_arg2 & 0xFF);
_arg1.lock();
_local11 = 0;
while (_local11 < _arg1.width) {
_local12 = 0;
while (_local12 < _arg1.height) {
_local6 = _arg1.getPixel(_local11, _local12);
_local7 = (Number((_local6 & 0xFF)) / 0xFF);
_local8 = (Math.floor(_local3) * _local7);
_local9 = (Math.floor(_local4) * _local7);
_local10 = (Math.floor(_local5) * _local7);
_arg1.setPixel(_local11, _local12, (((_local8 << 16) | (_local9 << 8)) | _local10));
_local12++;
};
_local11++;
};
_arg1.unlock();
}
public function unloadGame(_arg1:Event=null){
ds3.power.removeEventListener("mouseDown", unloadGame);
stage.removeEventListener("mouseDown", amberJump);
stage.removeEventListener("enterFrame", amberInit);
stage.removeEventListener("enterFrame", amberEFrame);
dsAmber.mask.parent.removeChild(dsAmber.mask);
dsAmber.mask = null;
dsAmber.parent.removeChild(dsAmber);
dsAmber = null;
deleteBall();
deleteDSText();
hideDS();
}
public function scrollStart(_arg1:Event){
if (noScroll(stage.mouseX, stage.mouseY)){
return;
};
oldMX = stage.mouseX;
oldMY = stage.mouseY;
oldHX = holly.x;
oldHY = holly.y;
stage.addEventListener("mouseMove", scrollMove, false, 0, true);
stage.addEventListener("mouseUp", scrollEnd, false, 0, true);
}
public function drawBitmap(_arg1:MovieClip, _arg2:BitmapData, _arg3:Rectangle, _arg4:int, _arg5:int){
var _local6:Matrix;
_local6 = new Matrix();
_local6.translate(_arg4, _arg5);
_arg1.graphics.beginBitmapFill(_arg2, _local6, true, false);
_arg1.graphics.drawRect(_arg3.x, _arg3.y, _arg3.width, _arg3.height);
_arg1.graphics.endFill();
}
public function ds_blinker(_arg1:Event=null){
if (ds3.parent){
return;
};
if (blinkTimer > 0){
return;
};
if (holly.plug2.currentFrame == 2){
holly.plug2.gotoAndStop(3);
return;
};
if ((((holly.plug2.currentFrame == 3)) && ((holly.plug1.currentFrame == 3)))){
loadGame();
return;
};
blinkTimer = (20 * 5);
stage.addEventListener("enterFrame", ds_blinking, false, 0, true);
}
public function setAmberFrames(_arg1:MovieClip, _arg2:String){
_arg1.face.gotoAndStop(amberFrames[_arg2]["face"]);
_arg1.body.gotoAndStop(amberFrames[_arg2]["body"]);
_arg1.arms.gotoAndStop(amberFrames[_arg2]["arms"]);
}
public function amberJump(_arg1:Event){
if ((((dsAmber.y < amberY)) || (!(dsAmber.hitTestPoint(stage.mouseX, stage.mouseY, true))))){
return;
};
if (dsInit){
dsText.text = "YAY! LET'S PLAY A GAME!";
dsText.visible = true;
dsTextTimer = (20 * 5);
dsInit = false;
};
setAmberFrames(dsAmber, "jump");
amberVY = -12;
}
public function zero_fn(_arg1:Event){
holly.x = origHX;
holly.y = origHY;
holly.scaleX = (holly.scaleY = 1);
}
public function invert_fn(_arg1:Event){
var _local2:MovieClip;
_local2 = (_arg1.currentTarget as MovieClip);
_local2.gotoAndStop((3 - _local2.currentFrame));
}
public function makeDSText(_arg1:Event=null){
var _local2:TextFormat;
dsText = new TextField();
dsText.multiline = (dsText.wordWrap = true);
dsText.selectable = false;
dsText.x = scr2Rect.x;
dsText.y = scr2Rect.y;
dsText.height = (scr2Rect.height * 0.5);
dsText.width = scr2Rect.width;
ds3.addChild(dsText);
dsText.mask = makeDSMask();
dsText.addEventListener("enterFrame", dsTextFrame, false, 0, true);
_local2 = new TextFormat();
_local2.bold = true;
_local2.size = 18;
_local2.color = 0xFF0000;
_local2.align = "right";
dsText.defaultTextFormat = _local2;
dsText.text = "CLICK ME! \nCLICK ME! \nCLICK ME!!";
dsTextTimer = 0;
_local2.align = "left";
_local2.color = 14266210;
dsScoreText = new TextField();
dsScoreText.defaultTextFormat = _local2;
dsScoreText.text = (((dsAmber.belly.currentFrame - 1) + "/") + (dsAmber.belly.totalFrames - 1));
dsScoreText.multiline = (dsScoreText.wordWrap = true);
dsScoreText.selectable = false;
dsScoreText.x = scr2Rect.x;
dsScoreText.y = ((scr2Rect.y + scr2Rect.height) - 32);
dsScoreText.height = 32;
dsScoreText.width = scr2Rect.width;
ds3.addChild(dsScoreText);
dsScoreText.mask = makeDSMask();
}
public function setSpeech(_arg1:Event=null){
speech.textSpeed = 2;
speech.setCheckPoint(holly.belly, 2, 1, "Hmm?");
speech.setCheckPoint(holly.belly, 40, 1, "Ooh, my belly is growing! Are you doing this?");
speech.setCheckPoint(holly.belly, 150, 1, "My breasts are growing, too. I must be pregnant!");
speech.setCheckPoint(holly.belly, 250, 1, "Ahh... How big am I going to get?");
speech.setCheckPoint(holly.belly, 400, 1, "This is huge. I think this is enough.");
speech.setCheckPoint(holly.belly, 401, 1, "Wow! I'm growing even more!");
speech.setCheckPoint(holly.belly, 500, 1, "Good... Good... They're moving slowly inside me...");
speech.setCheckPoint(holly.belly, 600, 1, "I can't move now. Maybe you could make my belly smaller later.");
speech.setCheckPoint(holly.belly, 599, -1, "Ooh, yeah. A bit smaller.");
speech.setCheckPoint(holly.belly, 399, -1, "I rather liked being pregnant.");
speech.setCheckPoint(holly.belly, 200, -1, "So small? I like feeling the warm weight inside me.");
speech.setCheckPoint(holly.belly, 1, -1, "Wanna try that again?");
}
public function deleteDSText(_arg1:Event=null){
if (dsText){
dsText.text = "";
dsText.mask.parent.removeChild(dsText.mask);
dsText.mask = null;
dsText.parent.removeChild(dsText);
dsText.removeEventListener("enterFrame", dsTextFrame);
dsScoreText.text = "";
dsScoreText.mask.parent.removeChild(dsScoreText.mask);
dsScoreText.mask = null;
dsScoreText.parent.removeChild(dsScoreText);
};
}
public function noScroll(_arg1:int, _arg2:int):Boolean{
if (holly.head.hitTestPoint(_arg1, _arg2, true)){
return (true);
};
if (holly.body.hitTestPoint(_arg1, _arg2, true)){
return (true);
};
if (holly.belly.hitTestPoint(_arg1, _arg2, true)){
return (true);
};
if (holly.breast1.hitTestPoint(_arg1, _arg2, true)){
return (true);
};
if (holly.arm1.hitTestPoint(_arg1, _arg2, true)){
return (true);
};
if (holly.leg1.hitTestPoint(_arg1, _arg2, true)){
return (true);
};
if (holly.tail.hitTestPoint(_arg1, _arg2, true)){
return (true);
};
if (holly.hair2.hitTestPoint(_arg1, _arg2, true)){
return (true);
};
if (_panel.hitTestPoint(_arg1, _arg2, true)){
return (true);
};
if (ds3.parent){
return (true);
};
return (false);
}
public function loadGame(_arg1:Event=null){
displayDS();
dsAmber = new Amber();
dsAmber.mask = makeDSMask();
dsAmber.x = amberX;
dsAmber.y = amberY;
ds3.addChild(dsAmber);
dsAmber.belly.gotoAndStop(1);
setAmberFrames(dsAmber, "stand");
dsInit = true;
makeDSText();
ds3.power.addEventListener("mouseDown", unloadGame, false, 0, true);
stage.addEventListener("mouseDown", amberJump, false, 0, true);
stage.addEventListener("enterFrame", amberInit, false, 0, true);
}
}
}//package holly_fla
Section 12
//mini_3ds_23 (holly_fla.mini_3ds_23)
package holly_fla {
import flash.display.*;
public dynamic class mini_3ds_23 extends MovieClip {
public var blinker:MovieClip;
}
}//package holly_fla
Section 13
//mouth_17 (holly_fla.mouth_17)
package holly_fla {
import flash.display.*;
public dynamic class mouth_17 extends MovieClip {
public function mouth_17(){
addFrameScript(1, frame2, 5, frame6, 10, frame11, 15, frame16, 20, frame21, 25, frame26, 31, frame32, 36, frame37, 41, frame42, 45, frame46, 50, frame51);
}
function frame6(){
this.gotoAndPlay(this.currentLabel);
}
function frame16(){
this.gotoAndPlay(this.currentLabel);
}
function frame26(){
this.gotoAndPlay(this.currentLabel);
}
function frame21(){
this.gotoAndPlay(this.currentLabel);
}
function frame2(){
this.gotoAndPlay(this.currentLabel);
}
function frame37(){
this.gotoAndPlay(this.currentLabel);
}
function frame11(){
this.gotoAndPlay(this.currentLabel);
}
function frame46(){
this.gotoAndPlay(this.currentLabel);
}
function frame32(){
this.gotoAndPlay(this.currentLabel);
}
function frame42(){
this.gotoAndPlay(this.currentLabel);
}
function frame51(){
this.gotoAndPlay(this.currentLabel);
}
}
}//package holly_fla
Section 14
//speech_mc_22 (holly_fla.speech_mc_22)
package holly_fla {
import flash.display.*;
import flash.text.*;
public dynamic class speech_mc_22 extends MovieClip {
public var _txt:TextField;
}
}//package holly_fla
Section 15
//Amber (Amber)
package {
import flash.display.*;
public dynamic class Amber extends MovieClip {
public var face:MovieClip;
public var arms:MovieClip;
public var body:MovieClip;
public var breasts:MovieClip;
public var belly:MovieClip;
}
}//package
Section 16
//DS (DS)
package {
import flash.display.*;
public dynamic class DS extends MovieClip {
public var power:MovieClip;
public var light:MovieClip;
}
}//package