Section 1
//Algorithms (as3.Algorithms)
package as3 {
import flash.display.*;
import flash.geom.*;
public class Algorithms {
public static function insertIntoArray(_arg1, _arg2:Array):Boolean{
var _local3:int;
_local3 = 0;
while (_local3 < _arg2.length) {
if (_arg2[_local3] == _arg1){
return (false);
};
_local3++;
};
_arg2.push(_arg1);
return (true);
}
public static function orderPointsClockwise(_arg1:Array):Array{
var _local2:int;
var _local3:Object;
var _local4:Array;
var _local5:Array;
var _local6:Number;
var _local7:int;
var _local8:int;
_local3 = new Object();
_local3.x = (_local3.y = 0);
_local2 = 0;
while (_local2 < _arg1.length) {
_local3.x = (_local3.x + _arg1[_local2].x);
_local3.y = (_local3.y + _arg1[_local2].y);
_local2++;
};
_local3.x = (_local3.x / _arg1.length);
_local3.y = (_local3.y / _arg1.length);
_local4 = new Array(_arg1.length);
_local2 = 0;
while (_local2 < _arg1.length) {
_local4[_local2] = Math.atan2((_arg1[_local2].y - _local3.y), (_arg1[_local2].x - _local3.x));
_local2++;
};
_local5 = new Array();
_local2 = 0;
while (_local2 < _arg1.length) {
_local6 = Infinity;
_local7 = -1;
_local8 = 0;
while (_local8 < _arg1.length) {
if (((!(isNaN(_local4[_local8]))) && ((_local4[_local8] < _local6)))){
_local7 = _local8;
_local6 = _local4[_local8];
};
_local8++;
};
_local5.push(_arg1[_local7]);
_local4[_local7] = NaN;
_local2++;
};
return (_local5);
}
public static function pointsToShape(_arg1:Array):Array{
var _local2:Array;
var _local3:Object;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:*;
_local2 = new Array();
_local6 = 0;
_local7 = 0;
while (_local7 < (_arg1.length - 1)) {
_local3 = new Object();
_local4 = (_arg1[(_local7 + 1)].x - _arg1[_local7].x);
_local5 = (_arg1[(_local7 + 1)].y - _arg1[_local7].y);
_local3.length = Math.floor(_pointShapeDistance(_arg1[_local7], _arg1[(_local7 + 1)]));
if (Math.abs(_local4) > (Math.abs(_local5) * 3)){
_local3.dir = ((_local4 > 0)) ? "r" : "l";
} else {
if (Math.abs(_local5) > (Math.abs(_local4) * 3)){
_local3.dir = ((_local5 > 0)) ? "d" : "u";
} else {
_local3.dir = ((_local5 > 0)) ? "d" : "u";
_local3.dir = (_local3.dir + ((_local4 > 0)) ? "r" : "l");
};
};
_local2.push(_local3);
_local6 = Math.max(_local6, _local3.length);
_local7++;
};
_local7 = 0;
while (_local7 < _local2.length) {
if (_local2[_local7].length < (_local6 / 5)){
_local2.splice(_local7, 1);
_local7--;
};
if ((((_local7 > 0)) && ((_local2[_local7].dir == _local2[(_local7 - 1)].dir)))){
_local2[(_local7 - 1)].length = (_local2[(_local7 - 1)].length + _local2[_local7].length);
_local2.splice(_local7, 1);
_local7--;
};
_local7++;
};
_local7 = 0;
while (_local7 < _local2.length) {
switch (_local2[_local7].dir){
case "ur":
_local2[_local7] = "e";
break;
case "dr":
_local2[_local7] = "f";
break;
case "dl":
_local2[_local7] = "g";
break;
case "ul":
_local2[_local7] = "h";
break;
default:
_local2[_local7] = _local2[_local7].dir;
};
_local7++;
};
return (_local2);
}
public static function deform(_arg1:MovieClip, _arg2:Number, _arg3:Number){
var _local4:Matrix;
var _local5:Matrix;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Matrix;
var _local10:Number;
var _local11:Number;
var _local12:Number;
_local4 = new Matrix();
_local4.a = 1;
_local4.b = 0;
_local4.c = 0;
_local4.d = 1;
_local5 = new Matrix();
_local5.a = ((1 + (Math.abs(_arg2) * _arg1.deformDist)) - (Math.abs(_arg3) * _arg1.deformDist));
_local5.b = 0;
_local5.c = 0;
_local5.d = ((1 + (Math.abs(_arg3) * _arg1.deformDist)) - (Math.abs(_arg2) * _arg1.deformDist));
_local6 = Math.sqrt(((_arg2 * _arg2) + (_arg3 * _arg3)));
_local7 = 0;
_local8 = (Boolean(((_arg2 * _arg3) < 0))) ? -1 : 1;
if (_local6){
_local10 = Math.atan2(_arg3, _arg2);
_local11 = Math.floor(((_local10 * 8) / Number((Math.PI * 2))));
_local12 = (_local10 - (((_local11 * Math.PI) * 2) / 8));
_local7 = (_local12 / Number((Math.PI * 0.25)));
if ((_local11 % 2)){
_local7 = (1 - _local7);
};
};
_local9 = new Matrix();
_local9.a = 1;
_local9.b = ((((_local8 * _local7) * _arg1.maxAngle) * _arg1.deformDist) * _local6);
_local9.c = ((((_local8 * _local7) * _arg1.maxAngle) * _arg1.deformDist) * _local6);
_local9.d = 1;
_local4.concat(_local5);
_local4.concat(_local9);
_local4.tx = _arg1.transform.matrix.tx;
_local4.ty = _arg1.transform.matrix.ty;
_arg1.transform.matrix = _local4;
}
public static function deformMatrix(_arg1:Matrix, _arg2:Number, _arg3:Number, _arg4:Number=1){
var _local5:Matrix;
var _local6:Number;
var _local7:Matrix;
var _local8:Number;
var _local9:Number;
var _local10:Number;
var _local11:Number;
var _local12:Number;
var _local13:Number;
var _local14:Number;
var _local15:Matrix;
var _local16:Number;
var _local17:Number;
var _local18:Number;
_local5 = new Matrix();
_local5.a = 1;
_local5.b = 0;
_local5.c = 0;
_local5.d = 1;
_local6 = ((Math.abs(_arg2) - Math.abs(_arg3)) * _arg4);
_local7 = new Matrix();
_local7.a = (1 + _local6);
_local7.b = 0;
_local7.c = 0;
_local7.d = (1 - _local6);
_local8 = (Math.PI * 0.25);
_local9 = ((Math.PI * 2) / 8);
_local10 = (1 / _local9);
_local11 = (Math.sqrt(((_arg2 * _arg2) + (_arg3 * _arg3))) * _arg4);
_local12 = 0;
_local13 = (Boolean(!(((_arg2 <= 0) == (_arg3 <= 0))))) ? -1 : 1;
if (_local11){
_local16 = Math.atan2(_arg3, _arg2);
_local17 = Math.floor((_local16 * _local10));
_local18 = (_local16 - (_local17 * _local9));
_local12 = (_local18 / Number(_local8));
if ((_local17 % 2)){
_local12 = (1 - _local12);
};
};
_local14 = ((_local13)<0) ? ((-(_local12) * _local8) * _local11) : ((_local12 * _local8) * _local11);
_local15 = new Matrix();
_local15.a = 1;
_local15.b = _local14;
_local15.c = _local14;
_local15.d = 1;
_local5.concat(_local7);
_local5.concat(_local15);
_arg1.a = _local5.a;
_arg1.b = _local5.b;
_arg1.c = _local5.c;
_arg1.d = _local5.d;
}
public static function isInArray(_arg1, _arg2:Array):Boolean{
var _local3:int;
_local3 = 0;
while (_local3 < _arg2.length) {
if (_arg2[_local3] == _arg1){
return (true);
};
_local3++;
};
return (false);
}
public static function removeFromArray(_arg1, _arg2:Array):Boolean{
var _local3:int;
_local3 = 0;
while (_local3 < _arg2.length) {
if (_arg2[_local3] == _arg1){
_arg2.splice(_local3, 1);
return (true);
};
_local3++;
};
return (false);
}
private static function _pointShapeDistance(_arg1:Object, _arg2:Object):Number{
return (Math.sqrt((Math.pow((_arg2.x - _arg1.x), 2) + Math.pow((_arg2.y - _arg1.y), 2))));
}
public static function simplifyPointsList(_arg1:Array):Array{
var _local2:Array;
var _local3:Number;
var _local4:*;
_local2 = new Array();
_local3 = 0;
_local2.push(_arg1[0]);
_local4 = 1;
while (_local4 < (_arg1.length - 1)) {
if ((((Math.abs((_pointShapeAngle(_arg1[(_local4 + 1)], _arg1[_local4]) - _pointShapeAngle(_arg1[_local4], _arg1[(_local4 - 1)]))) >= (Math.PI / 2.5))) || ((Math.abs(_local3) >= (Math.PI / 3))))){
_local2.push(_arg1[_local4]);
_local3 = 0;
} else {
_local3 = (_local3 + (_pointShapeAngle(_arg1[(_local4 + 1)], _arg1[_local4]) - _pointShapeAngle(_arg1[_local4], _arg1[(_local4 - 1)])));
};
_local4++;
};
_local2.push(_arg1[(_arg1.length - 1)]);
return (_local2);
}
private static function _pointShapeAngle(_arg1:Object, _arg2:Object):Number{
return (Math.atan2((_arg2.y - _arg1.y), (_arg2.x - _arg1.x)));
}
public static function balancePoint(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:int=1):Array{
var _local8:Array;
var _local9:int;
_local8 = [_arg1, _arg2, _arg3];
_local9 = 0;
while (_local9 < _arg7) {
_local8 = [(_local8[0] + (_arg2 * _arg4)), ((_local8[1] * _arg4) + _local8[2]), ((_arg5 - _local8[0]) * _arg6)];
_local9++;
};
return (_local8);
}
public static function myGetShape(_arg1:Array):String{
var _local2:Array;
var _local3:Number;
var _local4:String;
var _local5:String;
_local2 = simplifyPointsList(_arg1);
_local5 = pointsToShape(_local2).join("");
switch (_local5){
case "d":
return ("|v");
case "u":
return ("|^");
case "ef":
case "hg":
return ("^");
case "dr":
case "lu":
return ("L");
case "ur":
case "ld":
return ("Γ");
case "ldr":
case "lur":
return ("[");
case "ufu":
case "dhd":
return ("N");
default:
return ("");
};
}
public static function updateHand(_arg1:MovieClip, _arg2:Number, _arg3:Number, _arg4:Array, _arg5:Array, _arg6:Object){
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:Number;
var _local11:Number;
var _local12:Number;
var _local13:Number;
_local7 = (Math.PI * 0.5);
_arg1.x = _arg2;
_arg1.y = _arg3;
_arg4[0] = Geometry.interpolateAngle(_arg4[0], _arg5[0], 0.2);
_arg4[1] = Geometry.interpolateAngle(_arg4[1], _arg5[1], 0.2);
if (_arg5.length >= 3){
_arg4[2] = Geometry.interpolateAngle(_arg4[2], _arg5[2], 0.2);
} else {
_arg4[2] = Geometry.interpolateAngle(_arg4[2], 0, 0.2);
};
if (_arg4[0] > _local7){
_arg4[0] = _local7;
} else {
if (_arg4[0] < -(_local7)){
_arg4[0] = -(_local7);
};
};
if (_arg4[1] > _local7){
_arg4[1] = _local7;
} else {
if (_arg4[1] < -(_local7)){
_arg4[1] = -(_local7);
};
};
_local8 = Math.abs((_arg4[2] / _local7));
if (_arg4[0] < 0){
_arg1.addChildAt(_arg1.thumb_mc, 0);
} else {
_arg1.addChildAt(_arg1.thumb_mc, (_arg1.numChildren - 1));
};
if (_arg4[1] > 0){
_arg1.addChildAt(_arg1.wrist_mc, 0);
} else {
_arg1.addChildAt(_arg1.wrist_mc, (_arg1.numChildren - 1));
};
_local9 = (_arg4[0] / _local7);
_local10 = (_arg4[1] / _local7);
_local11 = Math.abs(_local9);
_local12 = Math.abs(_local10);
_local13 = ((((_local9 * _local10) * _local7) * (1 - _local8)) + (_local8 * _arg4[2]));
_arg1.glove_mc.scaleX = (_arg6.glove.max.x - (((_arg6.glove.max.x - _arg6.glove.min.x) * _local11) * (1 - _local12)));
_arg1.wrist_mc.scaleX = (_arg6.wrist.max.x - (((_arg6.wrist.max.x - _arg6.wrist.min.x) * _local11) * (1 - _local12)));
_arg1.thumb_mc.x = (_arg6.orig.thumbX + (((_arg6.end.thumbX - _arg6.orig.thumbX) * _local11) * (1 - _local12)));
_arg1.glove_mc.scaleY = (_arg6.glove.max.y - (((_arg6.glove.max.y - _arg6.glove.min.y) * _local12) * (1 - _local11)));
_arg1.thumb_mc.scaleY = _arg1.glove_mc.scaleY;
_arg1.wrist_mc.scaleY = (_arg6.wrist.min.y + (((_arg6.wrist.max.y - _arg6.wrist.min.y) * _local12) * (1 - _local11)));
_arg1.wrist_mc.y = (_arg6.orig.wristY + (((_arg6.end.wristY - _arg6.orig.wristY) * _local12) * (1 - _local11)));
_arg1.rotation = (_arg4[2] * Geometry.RAD_TO_DEG);
}
public static function liquidInPolygon(_arg1:Number, _arg2:Array, _arg3:Number, _arg4:Number):Array{
var _local5:Number;
var _local6:Number;
var _local7:Object;
var _local8:int;
var _local9:Number;
var _local10:Number;
var _local11:Number;
var _local12:Array;
var _local13:Array;
var _local14:Array;
var _local15:Point;
var _local16:Number;
var _local17:Number;
var _local18:int;
_local5 = -(Infinity);
_local6 = Infinity;
_local8 = 0;
while (_local8 < _arg2.length) {
_local7 = Geometry.rotate(_arg1, _arg2[_local8].x, _arg2[_local8].y);
_arg2[_local8].x = _local7.x;
_arg2[_local8].y = _local7.y;
_local5 = Math.max(_arg2[_local8].y, _local5);
_local6 = Math.min(_arg2[_local8].y, _local6);
_local8++;
};
_local9 = (_arg4 * _arg3);
_local10 = 0;
_local11 = 0;
_local13 = [];
_local14 = [];
_local15 = new Point();
_local16 = Math.abs((_local5 - _local6));
_local17 = ((_local6 + _local5) * 0.5);
_local18 = 50;
do {
_local13 = Geometry.getSidePoints(_arg2, _local17);
_local14 = [];
_local8 = 0;
while (_local8 < _arg2.length) {
if (_arg2[_local8].y >= _local17){
_local14.push(_arg2[_local8]);
};
_local8++;
};
_local12 = _local13.concat(_local14);
_local12 = orderPointsClockwise(_local12);
trace("Algorithm::liquidInPolygon\nYou'll have to fix this later. Try to connect the 'sides' and 'lower' arrays coherently.\nAvoid having to use the orderPointsClockwise() function.");
_local10 = Geometry.polygonArea(_local12);
_local17 = (_local17 - ((_local16 * (_local9 - _local10)) / _arg4));
_local18--;
} while ((((Math.abs((_local10 - _local9)) > Geometry.TOLERANCE)) && ((_local18 > 0))));
_local8 = 0;
while (_local8 < _local12.length) {
_local7 = Geometry.rotate(-(_arg1), _local12[_local8].x, _local12[_local8].y);
_local12[_local8].x = _local7.x;
_local12[_local8].y = _local7.y;
_local8++;
};
return (_local12);
}
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);
}
public static function adjustScreen(_arg1:DisplayObject, _arg2:DisplayObject){
var _local3:Stage;
var _local4:Rectangle;
if (!_arg1.stage){
return;
};
_local3 = _arg1.stage;
_local4 = _arg2.getRect(_local3);
if (_local4.width < _local3.stageWidth){
_arg1.scaleX = (_arg1.scaleX * (_local3.stageWidth / _local4.width));
_arg1.scaleY = _arg1.scaleX;
_local4 = _arg2.getRect(_local3);
};
if (_local4.height < _local3.stageHeight){
_arg1.scaleY = (_arg1.scaleY * (_local3.stageHeight / _local4.height));
_arg1.scaleX = _arg1.scaleY;
_local4 = _arg2.getRect(_local3);
};
if (_local4.x > 0){
_arg1.x = (_arg1.x - _local4.x);
_local4 = _arg2.getRect(_local3);
};
if (_local4.y > 0){
_arg1.y = (_arg1.y - _local4.y);
_local4 = _arg2.getRect(_local3);
};
if ((_local4.x + _local4.width) < _local3.stageWidth){
_arg1.x = (_arg1.x + (_local3.stageWidth - (_local4.x + _local4.width)));
_local4 = _arg2.getRect(_local3);
};
if ((_local4.y + _local4.height) < _local3.stageHeight){
_arg1.y = (_arg1.y + (_local3.stageHeight - (_local4.y + _local4.height)));
_local4 = _arg2.getRect(_local3);
};
}
public static function approximatePoint(_arg1:Number, _arg2:Number, _arg3:Number):Number{
return ((_arg1 + ((_arg2 - _arg1) * _arg3)));
}
}
}//package as3
Section 2
//Geometry (as3.Geometry)
package as3 {
import flash.display.*;
import flash.geom.*;
public class Geometry {
public static const DEG_TO_RAD:Number = 0.0174532925199433;
public static const RAD_TO_DEG:Number = 57.2957795130823;
public static const TOLERANCE:Number = 1E-5;
function regularPolygonArea(_arg1:Number, _arg2:int){
var _local3:Number;
var _local4:Number;
if (_arg2 < 3){
return (0);
};
_local3 = ((Math.PI * 2) / _arg2);
_local4 = (Math.sin(_local3) * _arg1);
return ((((_local4 * _arg1) * 0.5) * _arg2));
}
public static function intersectLines(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Number, _arg8:Number, _arg9:Boolean=false):Object{
var _local10:Number;
var _local11:Number;
var _local12:Number;
var _local13:Number;
var _local14:Number;
var _local15:Number;
var _local16:Number;
var _local17:Number;
var _local18:Object;
var _local19:Boolean;
var _local20:Boolean;
_local10 = (_arg1 - _arg3);
_local11 = (_arg5 - _arg7);
_local12 = (_arg2 - _arg4);
_local13 = (_arg6 - _arg8);
_local14 = ((_arg1 * _arg4) - (_arg2 * _arg3));
_local15 = ((_arg5 * _arg8) - (_arg6 * _arg7));
_local16 = ((_local10 * _local13) - (_local12 * _local11));
if (!_local16){
return (null);
};
_local17 = (1 / _local16);
_local18 = {x:(((_local14 * _local11) - (_local10 * _local15)) * _local17), y:(((_local14 * _local13) - (_local12 * _local15)) * _local17)};
if (_arg9){
_local19 = pointInsideRect(_local18.x, _local18.y, _arg1, _arg2, _arg3, _arg4);
_local20 = pointInsideRect(_local18.x, _local18.y, _arg5, _arg6, _arg7, _arg8);
if (((!(_local19)) || (!(_local20)))){
return (null);
};
};
return (_local18);
}
public static function pointFromEllipse(_arg1:Object, _arg2:Object):Object{
var _local3:Point;
var _local4:Object;
_local3 = new Point();
_local3.x = (_arg1.x + ((_arg1.radius * Math.cos(_arg2.angle)) * _arg2.distance));
_local3.y = (_arg1.y + (((_arg1.radius * _arg1.excentricity) * Math.sin(_arg2.angle)) * _arg2.distance));
_local4 = rotate(_arg1.rotation, _local3.x, _local3.y, _arg1.x, _arg1.y);
return (new Point(_local4.x, _local4.y));
}
public static function polygonArea(_arg1:Array):Number{
var _local2:Point;
var _local3:Point;
var _local4:Number;
if (_arg1.length < 3){
return (0);
};
_local4 = 0;
return (_local4);
}
public static function getEllipse(_arg1:DisplayObject):Object{
var obj:Object;
var rect:Rectangle;
var clip = _arg1;
obj = {};
rect = clip.getRect(clip);
obj.x = clip.x;
obj.y = clip.y;
obj.radius = (-(rect.x) * clip.scaleX);
obj.rotation = ((clip.rotation * Math.PI) / 180);
obj.excentricity = (clip.scaleY / clip.scaleX);
obj.toString = function (){
return ((((((((((("[ x=" + this.x) + ", y=") + this.y) + ", radius=") + this.radius) + ", rotation=") + this.rotation) + ", excentricity=") + this.excentricity) + " ]"));
};
return (obj);
}
public static function pointToEllipse(_arg1:Object, _arg2:Object):Object{
var obj:Object;
var untranslated:Point;
var unrotated:Object;
var unexcentered:Point;
var unscaled:Point;
var point = _arg1;
var ellipse = _arg2;
obj = {};
untranslated = new Point((point.x - ellipse.x), (point.y - ellipse.y));
unrotated = rotate(-(ellipse.rotation), untranslated.x, untranslated.y);
unexcentered = new Point(unrotated.x, (unrotated.y / ellipse.excentricity));
unscaled = new Point((unexcentered.x / ellipse.radius), (unexcentered.y / ellipse.radius));
obj.distance = Math.sqrt(((unscaled.x * unscaled.x) + (unscaled.y * unscaled.y)));
obj.hDist = unscaled.x;
obj.vDist = unscaled.y;
obj.normal = (Math.atan2(unscaled.y, unscaled.x) + ellipse.rotation);
obj.angle = Math.atan2(unscaled.y, unscaled.x);
obj.rotation = ellipse.rotation;
obj.toString = function (){
return ((((((((((((("[ distance=" + obj.distance) + ", normal=") + obj.normal) + ", angle=") + obj.angle) + ", hDist=") + obj.hDist) + ", vDist=") + obj.vDist) + ", rotation=") + obj.rotation) + " ]"));
};
return (obj);
}
public static function getOuterPoints(_arg1:Array):Array{
var _local2:Array;
var _local3:Point;
var _local4:int;
var _local5:Array;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:Point;
var _local11:int;
var _local12:Number;
var _local13:Point;
var _local14:int;
var _local15:Number;
var _local16:Number;
_local2 = _arg1.concat();
_local3 = _local2[0];
_local4 = 1;
while (_local4 < _local2.length) {
if (_local2[_local4].y < _local3.y){
_local3 = _local2[_local4];
};
_local4++;
};
_local5 = [_local3];
_local6 = Infinity;
_local8 = 0;
_local9 = 0;
_local10 = _local5[0];
_local11 = _local2.length;
while (1) {
_local12 = (Math.PI * 2);
_local13 = null;
_local4 = 0;
while (_local4 < _local2.length) {
_local7 = Math.atan2((_local2[_local4].y - _local5[(_local5.length - 1)].y), (_local2[_local4].x - _local5[(_local5.length - 1)].x));
_local16 = getLowestPositiveAngle((_local7 - _local8));
if ((((_local16 <= _local12)) && (!((_local2[_local4] == _local5[(_local5.length - 1)]))))){
_local13 = _local2[_local4];
_local12 = _local16;
};
_local4++;
};
if ((((_local13 == null)) || ((((_local13 == _local5[0])) && ((_local5.length > 1)))))){
break;
};
_local15 = _local8;
_local8 = getLowestPositiveAngle(Math.atan2((_local13.y - _local5[(_local5.length - 1)].y), (_local13.x - _local5[(_local5.length - 1)].x)));
_local9 = (_local9 + getLowestPositiveAngle((_local8 - _local15)));
if (_local9 >= (Math.PI * 2)){
break;
};
_local5.push(_local13);
--_local11;
if (!_local11){
trace(("FAILURE: " + (_local9 - (Math.PI * 2))), "\n");
break;
};
};
if ((((_local5.length > 2)) && ((_local5[(_local5.length - 1)] == _local5[1])))){
_local5.pop();
};
return (_local5);
}
public static function getSidePoints(_arg1:Array, _arg2:Number):Array{
var _local3:int;
var _local4:Number;
var _local5:Number;
var _local6:Array;
var _local7:Point;
var _local8:Point;
var _local9:Number;
var _local10:Number;
var _local11:Array;
var _local12:Number;
var _local13:Number;
_local4 = Infinity;
_local5 = -(Infinity);
_local3 = 0;
while (_local3 < _arg1.length) {
if (_arg1[_local3].y < _local4){
_local4 = _arg1[_local3].y;
};
if (_arg1[_local3].y > _local5){
_local5 = _arg1[_local3].y;
};
_local3++;
};
if (_arg2 < _local4){
_arg2 = _local4;
} else {
if (_arg2 > _local5){
_arg2 = _local5;
};
};
_local6 = [];
_local3 = 0;
while (_local3 < _arg1.length) {
_local7 = _arg1[_local3];
_local8 = _arg1[((_local3 + 1) % _arg1.length)];
if ((((((_arg2 <= _local7.y)) && ((_arg2 >= _local8.y)))) || ((((_arg2 >= _local7.y)) && ((_arg2 <= _local8.y)))))){
if (_local8.y == _local7.y){
_local6.push(new Point(_local7.x, _local7.y));
_local6.push(new Point(_local8.x, _local8.y));
} else {
_local12 = ((_arg2 - _local7.y) / (_local8.y - _local7.y));
_local13 = (_local7.x + ((_local8.x - _local7.x) * _local12));
_local6.push(new Point(_local13, _arg2));
};
};
_local3++;
};
_local9 = Infinity;
_local10 = -(Infinity);
_local3 = 0;
while (_local3 < _local6.length) {
_local7 = _local6[_local3];
if (_local7.x < _local9){
_local9 = _local7.x;
};
if (_local7.x > _local10){
_local10 = _local7.x;
};
_local3++;
};
_local11 = [];
_local3 = 0;
while (_local3 < _local6.length) {
if (_local6[_local3].x <= (_local9 + TOLERANCE)){
_local11[0] = _local6[_local3];
};
if (_local6[_local3].x >= (_local10 - TOLERANCE)){
_local11[1] = _local6[_local3];
};
_local3++;
};
return (_local11);
}
public static function projectPointOnLine(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number):Object{
var _local7:Object;
var _local8:Object;
_local7 = getNormal(_arg3, _arg4, _arg5, _arg6);
_local8 = intersectLines(_arg1, _arg2, (_arg1 + _local7.x), (_arg2 + _local7.y), _arg3, _arg4, _arg5, _arg6, false);
if (_local8 == null){
throw ("Unexpected error in Geometry::closestPointToLine. Perpendicular lines aren't intersecting!\n");
};
return (_local8);
}
private static function getLowestPositiveAngle(_arg1:Number):Number{
var _local2:Number;
_local2 = _arg1;
while (_local2 < 0) {
_local2 = (_local2 + (Math.PI * 2));
};
while (_local2 >= (Math.PI * 2)) {
_local2 = (_local2 - (Math.PI * 2));
};
return (_local2);
}
public static function generateRegularPolygon(_arg1:Number, _arg2:Number):Array{
var _local3:Array;
var _local4:Number;
var _local5:int;
_local3 = new Array(_arg1);
_local4 = ((Math.PI * 2) / _arg1);
_local5 = 0;
while (_local5 < _arg1) {
_local3[_local5] = new Point();
_local3[_local5].x = (_arg2 * Math.cos((_local5 * _local4)));
_local3[_local5].y = (_arg2 * Math.sin((_local5 * _local4)));
_local5++;
};
return (_local3);
}
public static function triangleArea(_arg1:Point, _arg2:Point, _arg3:Point):Number{
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
_local4 = (_arg2.x - _arg1.x);
_local5 = (_arg3.x - _arg1.x);
_local6 = (_arg2.y - _arg1.y);
_local7 = (_arg3.y - _arg1.y);
return ((0.5 * Math.abs(((_local4 * _local7) - (_local5 * _local6)))));
}
public static function pointInsideRect(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number){
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:Number;
var _local11:Number;
if (_arg3 < _arg5){
_local7 = _arg3;
_local9 = _arg5;
} else {
_local7 = _arg5;
_local9 = _arg3;
};
if (_arg4 < _arg6){
_local8 = _arg4;
_local10 = _arg6;
} else {
_local8 = _arg6;
_local10 = _arg4;
};
_local11 = 0.0001;
return (!((((((((_arg1 < (_local7 - _local11))) || ((_arg1 > (_local9 + _local11))))) || ((_arg2 < (_local8 - _local11))))) || ((_arg2 > (_local10 + _local11))))));
}
public static function interpolateAngle(_arg1:Number, _arg2:Number, _arg3:Number):Number{
var _local4:Number;
var _local5:Number;
while (_arg1 < 0) {
_arg1 = (_arg1 + (Math.PI * 2));
};
while (_arg2 < 0) {
_arg2 = (_arg2 + (Math.PI * 2));
};
while (_arg1 >= (Math.PI * 2)) {
_arg1 = (_arg1 - (Math.PI * 2));
};
while (_arg2 >= (Math.PI * 2)) {
_arg2 = (_arg2 - (Math.PI * 2));
};
if (_arg1 > _arg2){
if ((_arg1 - _arg2) > Math.PI){
_arg1 = (_arg1 - (Math.PI * 2));
};
} else {
if ((_arg2 - _arg1) > Math.PI){
_arg2 = (_arg2 - (Math.PI * 2));
};
};
_local5 = (_arg1 + (_arg3 * (_arg2 - _arg1)));
while (_local5 > Math.PI) {
_local5 = (_local5 - (Math.PI * 2));
};
while (_local5 < -(Math.PI)) {
_local5 = (_local5 + (Math.PI * 2));
};
return (_local5);
}
public static function rotate(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number=0, _arg5:Number=0):Object{
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
_local6 = (_arg2 - _arg4);
_local7 = (_arg3 - _arg5);
_local8 = Math.cos(_arg1);
_local9 = Math.sin(_arg1);
return ({x:((_arg4 + (_local6 * _local8)) - (_local7 * _local9)), y:((_arg5 + (_local6 * _local9)) + (_local7 * _local8))});
}
public static function rotatePoint(_arg1:Number, _arg2:Point, _arg3:Point=null):Point{
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
if (_arg3 == null){
_local5 = 0;
_local4 = _local5;
} else {
_local4 = _arg3.x;
_local5 = _arg3.y;
};
_local6 = (_arg2.x - _local4);
_local7 = (_arg2.y - _local5);
_local8 = Math.cos(_arg1);
_local9 = Math.sin(_arg1);
return (new Point(((_local4 + (_local6 * _local8)) - (_local7 * _local9)), ((_local5 + (_local6 * _local9)) + (_local7 * _local8))));
}
public static function getNormal(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Object{
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Object;
_local5 = (_arg1 - _arg3);
_local6 = (_arg2 - _arg4);
_local7 = Math.sqrt(((_local5 * _local5) + (_local6 * _local6)));
if (!_local7){
return ({x:0, y:0});
};
_local8 = {x:(_local6 / _local7), y:(-(_local5) / _local7)};
return (_local8);
}
public static function intersectPolygons(_arg1:Array, _arg2:Array){
var _local3:int;
var _local4:int;
var _local5:Array;
var _local6:Point;
var _local7:Point;
var _local8:Point;
var _local9:Point;
var _local10:Number;
var _local11:Number;
var _local12:Number;
var _local13:Number;
var _local14:Object;
var _local15:int;
var _local16:int;
_local3 = (_arg1.length - 1);
_local4 = (_arg2.length - 1);
_local5 = [];
if ((((_local3 < 2)) || ((_local4 < 2)))){
return;
};
_local15 = 0;
while (_local15 < _local3) {
_local6 = _arg1[_local15];
_local7 = _arg1[(_local15 + 1)];
_local10 = _local6.x;
_local11 = _local6.y;
_local12 = _local7.x;
_local13 = _local7.y;
_local16 = 0;
while (_local16 < _local4) {
_local8 = _arg2[_local16];
_local9 = _arg2[(_local16 + 1)];
_local14 = intersectLines(_local10, _local11, _local12, _local13, _local8.x, _local8.y, _local9.x, _local9.y, true);
if (_local14){
_local5[_local5.length] = new Point(_local14.x, _local14.y);
};
_local16++;
};
_local8 = _arg2[_local16];
_local9 = _arg2[0];
_local14 = intersectLines(_local10, _local11, _local12, _local13, _local8.x, _local8.y, _local9.x, _local9.y, true);
if (_local14){
_local5[_local5.length] = new Point(_local14.x, _local14.y);
};
_local15++;
};
_local6 = _arg1[_local15];
_local7 = _arg1[0];
_local10 = _local6.x;
_local11 = _local6.y;
_local12 = _local7.x;
_local13 = _local7.y;
_local16 = 0;
while (_local16 < _local4) {
_local8 = _arg2[_local16];
_local9 = _arg2[(_local16 + 1)];
_local14 = intersectLines(_local10, _local11, _local12, _local13, _local8.x, _local8.y, _local9.x, _local9.y, true);
if (_local14){
_local5[_local5.length] = new Point(_local14.x, _local14.y);
};
_local16++;
};
_local8 = _arg2[_local16];
_local9 = _arg2[0];
_local14 = intersectLines(_local10, _local11, _local12, _local13, _local8.x, _local8.y, _local9.x, _local9.y, true);
if (_local14){
_local5[_local5.length] = new Point(_local14.x, _local14.y);
};
return (_local5);
}
}
}//package as3
Section 3
//Physics (as3.Physics)
package as3 {
import flash.display.*;
import flash.geom.*;
public class Physics {
public static const ROTATION_PROP:String = "rotation";
public static const Y_PROP:String = "y";
public static const SKEWY_PROP:String = "skewY";
public static const SCALEX_PROP:String = "scaleX";
public static const X_PROP:String = "x";
public static const SCALEY_PROP:String = "scaleY";
public static const SKEWX_PROP:String = "skewX";
public static function attach(_arg1:Array, _arg2:DisplayObject, _arg3:MovieClip, _arg4:Array=null){
var _local5:Point;
var _local6:Point;
_local5 = _arg2.localToGlobal(new Point());
_local6 = _arg3.globalToLocal(_local5);
if (_arg4 == null){
_arg4 = [];
};
_arg1[_arg1.length] = {mc:_arg2, par:_arg3, point:_local6, props:_arg4};
}
public static function updateSkewY(_arg1:Object, _arg2:Point, _arg3:Matrix, _arg4:Array, _arg5:Number, _arg6:Number, _arg7:Number, _arg8:Number, _arg9:Number){
_arg4[0] = (_arg4[0] + ((-(_arg9) * (_arg2.y - _arg1.position.y)) / _arg1.hWeight));
balancePoint(_arg4, _arg5, _arg6, _arg7, _arg8);
_arg3.b = _arg4[0];
}
public static function updateElastic(_arg1:Array){
var _local2:int;
var _local3:int;
_local3 = _arg1.length;
_local2 = 0;
while (_local2 < _local3) {
updateElasticClip(_arg1[_local2]);
_local2++;
};
}
public static function updateAttached(_arg1:Array){
var _local2:int;
var _local3:int;
var _local4:Object;
var _local5:Point;
var _local6:Point;
var _local7:int;
var _local8:int;
var _local9:Array;
_local3 = _arg1.length;
_local2 = 0;
while (_local2 < _local3) {
_local4 = _arg1[_local2];
if (_local4.mc.parent){
_local5 = _local4.par.localToGlobal(_local4.point);
_local6 = _local4.mc.parent.globalToLocal(_local5);
_local4.mc.x = _local6.x;
_local4.mc.y = _local6.y;
};
_local9 = _local4.props;
_local8 = _local9.length;
_local7 = 0;
while (_local7 < _local8) {
_local4.mc[_local9[_local7]] = _local4.par[_local9[_local7]];
_local7++;
};
_local2++;
};
}
public static function detach(_arg1:Array, _arg2:DisplayObject, _arg3:MovieClip, _arg4:Array=null){
var _local5:int;
var _local6:int;
var _local7:Object;
_local6 = _arg1.length;
_local5 = 0;
while (_local5 < _local6) {
_local7 = _arg1[_local5];
if ((((_local7.mc == _arg2)) && ((_local7.par == _arg3)))){
_arg1.splice(_local5, 1);
return;
};
_local5++;
};
}
public static function verlet(_arg1:Array, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number=1, _arg6:Number=1){
var _local7:int;
var _local8:Number;
var _local9:int;
var _local10:Number;
var _local11:Number;
var _local12:Number;
_local8 = ((0.5 * _arg5) * _arg5);
_local9 = (_arg6 / _arg5);
_local10 = _arg1[0];
_local11 = _arg1[1];
_local12 = 0;
_local7 = 0;
while (_local7 < _local9) {
_local12 = (_arg4 * (_arg2 - _local10));
_local10 = (_local10 + ((_local11 * _arg5) + (_local12 * _local8)));
_local11 = ((_local11 + (_local12 * _arg5)) * _arg3);
_local7++;
};
_arg1[0] = _local10;
_arg1[1] = _local11;
}
public static function updateSkewX(_arg1:Object, _arg2:Point, _arg3:Matrix, _arg4:Array, _arg5:Number, _arg6:Number, _arg7:Number, _arg8:Number, _arg9:Number){
_arg4[0] = (_arg4[0] + ((-(_arg9) * (_arg2.x - _arg1.position.x)) / _arg1.vWeight));
balancePoint(_arg4, _arg5, _arg6, _arg7, _arg8);
_arg3.c = _arg4[0];
}
public static function balancePoint(_arg1:Array, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:int=1){
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:int;
_local6 = _arg1[0];
_local7 = _arg1[1];
_local8 = _arg1[2];
_local9 = 0;
while (_local9 < _arg5) {
_arg1[1] = ((_arg1[1] * _arg2) + _arg1[2]);
_arg1[2] = ((_arg3 - _arg1[0]) * _arg4);
_arg1[0] = (_arg1[0] + (_local7 * _arg2));
_local9++;
};
}
public static function setElastic(_arg1:Array, _arg2:DisplayObjectContainer, _arg3:MovieClip, _arg4:Array, _arg5:Array, _arg6:Array, _arg7:Array, _arg8:Array, _arg9:Array):Object{
var _local10:Array;
var _local11:int;
var _local12:int;
var _local13:String;
var _local14:Point;
var _local15:Rectangle;
var _local16:Number;
var _local17:Number;
var _local18:Number;
var _local19:Number;
if (!_arg3.parent){
return (null);
};
_local10 = [ROTATION_PROP];
_local12 = _arg4.length;
_local11 = 0;
while (_local11 < _local12) {
_local13 = _arg4[_local11];
_local10[_local11] = [_arg6[_local11], 0, 0];
_local11++;
};
_local14 = _arg3.localToGlobal(new Point());
_local14 = _arg2.globalToLocal(_local14);
_local15 = _arg3.getBounds(_arg3);
_local16 = (_local15.right + _local15.left);
_local17 = (_local15.bottom + _local15.top);
_local18 = ((_local16)<0) ? _local15.left : _local15.right;
_local19 = ((_local17)<0) ? _local15.top : _local15.bottom;
_arg1[_arg1.length] = {clip:_arg3, props:_arg4, position:_local14, values:_local10, topLevel:_arg2, rect:_local15, hWeight:_local18, vWeight:_local19, frictions:_arg5, dests:_arg6, multipliers:_arg7, speeds:_arg8, scales:_arg9};
return (_arg1[(_arg1.length - 1)]);
}
public static function editElastic(_arg1:Array, _arg2:MovieClip, _arg3:String, _arg4:Number){
var _local5:int;
var _local6:int;
_local6 = _arg1.length;
_local5 = 0;
while (_local5 < _local6) {
if (_arg1[_local5].clip == _arg2){
_arg1[_local5].dests[_arg3] = _arg4;
return;
};
_local5++;
};
}
public static function updateScaleX(_arg1:Object, _arg2:Point, _arg3:Matrix, _arg4:Array, _arg5:Number, _arg6:Number, _arg7:Number, _arg8:Number, _arg9:Number){
var _local10:Rectangle;
var _local11:Number;
_local10 = _arg1.clip.getBounds(_arg1.topLevel);
_local11 = (_local10.right - _local10.left);
_arg4[0] = (_arg4[0] + ((-(_arg9) * (_arg2.x - _arg1.position.x)) / _local11));
balancePoint(_arg4, _arg5, _arg6, _arg7, _arg8);
_arg3.a = _arg4[0];
}
public static function updateScaleY(_arg1:Object, _arg2:Point, _arg3:Matrix, _arg4:Array, _arg5:Number, _arg6:Number, _arg7:Number, _arg8:Number, _arg9:Number){
var _local10:Rectangle;
var _local11:Number;
_local10 = _arg1.clip.getBounds(_arg1.topLevel);
_local11 = (_local10.bottom - _local10.top);
_arg4[0] = (_arg4[0] + ((-(_arg9) * (_arg2.y - _arg1.position.y)) / _local11));
balancePoint(_arg4, _arg5, _arg6, _arg7, _arg8);
_arg3.d = _arg4[0];
}
public static function updateElasticClip(_arg1:Object){
var _local2:int;
var _local3:Array;
var _local4:int;
var _local5:Point;
var _local6:String;
var _local7:Matrix;
_local3 = _arg1.props;
_local4 = _local3.length;
_local5 = _arg1.clip.localToGlobal(new Point());
_local5 = _arg1.topLevel.globalToLocal(_local5);
_local7 = _arg1.clip.transform.matrix;
_local2 = 0;
while (_local2 < _local4) {
_local6 = _local3[_local2];
switch (_local6){
case SKEWX_PROP:
updateSkewX(_arg1, _local5, _local7, _arg1.values[_local2], _arg1.frictions[_local2], _arg1.dests[_local2], _arg1.multipliers[_local2], _arg1.speeds[_local2], _arg1.scales[_local2]);
break;
case SKEWY_PROP:
updateSkewY(_arg1, _local5, _local7, _arg1.values[_local2], _arg1.frictions[_local2], _arg1.dests[_local2], _arg1.multipliers[_local2], _arg1.speeds[_local2], _arg1.scales[_local2]);
break;
case SCALEX_PROP:
updateScaleX(_arg1, _local5, _local7, _arg1.values[_local2], _arg1.frictions[_local2], _arg1.dests[_local2], _arg1.multipliers[_local2], _arg1.speeds[_local2], _arg1.scales[_local2]);
break;
case SCALEY_PROP:
updateScaleY(_arg1, _local5, _local7, _arg1.values[_local2], _arg1.frictions[_local2], _arg1.dests[_local2], _arg1.multipliers[_local2], _arg1.speeds[_local2], _arg1.scales[_local2]);
break;
};
_local2++;
};
_arg1.clip.transform.matrix = _local7;
_arg1.position = _local5;
}
}
}//package as3
Section 4
//_btn1_37 (desiree_fla._btn1_37)
package desiree_fla {
import flash.display.*;
import flash.text.*;
public dynamic class _btn1_37 extends MovieClip {
public var _txt:TextField;
}
}//package desiree_fla
Section 5
//_btn2_38 (desiree_fla._btn2_38)
package desiree_fla {
import flash.display.*;
public dynamic class _btn2_38 extends MovieClip {
public function _btn2_38(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package desiree_fla
Section 6
//_btn3_39 (desiree_fla._btn3_39)
package desiree_fla {
import flash.display.*;
import flash.text.*;
public dynamic class _btn3_39 extends MovieClip {
public var _txt:TextField;
}
}//package desiree_fla
Section 7
//arm1_16 (desiree_fla.arm1_16)
package desiree_fla {
import flash.display.*;
public dynamic class arm1_16 extends MovieClip {
public var hand1:MovieClip;
public var p1:MovieClip;
public var p2:MovieClip;
public function arm1_16(){
addFrameScript(1, frame2, 25, frame26);
}
function frame26(){
this.gotoAndPlay(this.currentLabel);
}
function frame2(){
this.gotoAndPlay(this.currentLabel);
}
}
}//package desiree_fla
Section 8
//arm2_19 (desiree_fla.arm2_19)
package desiree_fla {
import flash.display.*;
public dynamic class arm2_19 extends MovieClip {
public var hand2:MovieClip;
public var p1:MovieClip;
public var p2:MovieClip;
public function arm2_19(){
addFrameScript(1, frame2, 26, frame27);
}
function frame2(){
this.gotoAndPlay(this.currentLabel);
}
function frame27(){
this.gotoAndPlay(this.currentLabel);
}
}
}//package desiree_fla
Section 9
//breasts_22 (desiree_fla.breasts_22)
package desiree_fla {
import flash.display.*;
public dynamic class breasts_22 extends MovieClip {
public var p1:MovieClip;
public var p2:MovieClip;
public var p3:MovieClip;
public var p5:MovieClip;
public var p6:MovieClip;
public var p7:MovieClip;
public var p8:MovieClip;
public var p4:MovieClip;
}
}//package desiree_fla
Section 10
//environ_1 (desiree_fla.environ_1)
package desiree_fla {
import flash.display.*;
public dynamic class environ_1 extends MovieClip {
public var chest:MovieClip;
public var leg1:MovieClip;
public var leg2:MovieClip;
public var front:MovieClip;
public var bg:MovieClip;
public var tail:MovieClip;
public var arm2:MovieClip;
public var top:MovieClip;
public var arm1:MovieClip;
public var head_cover:MovieClip;
public var body:MovieClip;
public var breastShadow:MovieClip;
public var body2:MovieClip;
public var breasts:MovieClip;
public var head:MovieClip;
public var speech:MovieClip;
}
}//package desiree_fla
Section 11
//eye1_26 (desiree_fla.eye1_26)
package desiree_fla {
import flash.display.*;
public dynamic class eye1_26 extends MovieClip {
public var pupil:MovieClip;
public function eye1_26(){
addFrameScript(1, frame2, 6, frame7, 8, frame9, 10, frame11, 12, frame13, 14, frame15, 21, frame22);
}
function frame15(){
this.gotoAndPlay(this.currentLabel);
}
function frame7(){
this.gotoAndPlay(this.currentLabel);
}
function frame22(){
this.gotoAndPlay(this.currentLabel);
}
function frame13(){
this.gotoAndPlay(this.currentLabel);
}
function frame9(){
this.gotoAndPlay(this.currentLabel);
}
function frame2(){
this.gotoAndPlay(this.currentLabel);
}
function frame11(){
this.gotoAndPlay(this.currentLabel);
}
}
}//package desiree_fla
Section 12
//eye2_28 (desiree_fla.eye2_28)
package desiree_fla {
import flash.display.*;
public dynamic class eye2_28 extends MovieClip {
public var pupil:MovieClip;
public function eye2_28(){
addFrameScript(1, frame2, 3, frame4, 6, frame7, 8, frame9, 10, frame11, 12, frame13, 14, frame15, 21, frame22);
}
function frame15(){
this.gotoAndPlay(this.currentLabel);
}
function frame7(){
this.gotoAndPlay(this.currentLabel);
}
function frame22(){
this.gotoAndPlay(this.currentLabel);
}
function frame13(){
this.gotoAndPlay(this.currentLabel);
}
function frame4(){
this.gotoAndPlay(this.currentLabel);
}
function frame9(){
this.gotoAndPlay(this.currentLabel);
}
function frame2(){
this.gotoAndPlay(this.currentLabel);
}
function frame11(){
this.gotoAndPlay(this.currentLabel);
}
}
}//package desiree_fla
Section 13
//head_23 (desiree_fla.head_23)
package desiree_fla {
import flash.display.*;
public dynamic class head_23 extends MovieClip {
public var blush:MovieClip;
public var eye2:MovieClip;
public var eye1:MovieClip;
public var whiskers1:MovieClip;
public var ear1:MovieClip;
public var whiskers2:MovieClip;
public var ear2:MovieClip;
public var mouth:MovieClip;
public var hair:MovieClip;
}
}//package desiree_fla
Section 14
//leg1_7 (desiree_fla.leg1_7)
package desiree_fla {
import flash.display.*;
public dynamic class leg1_7 extends MovieClip {
public var foot1:MovieClip;
public var leg1b:MovieClip;
}
}//package desiree_fla
Section 15
//leg2_10 (desiree_fla.leg2_10)
package desiree_fla {
import flash.display.*;
public dynamic class leg2_10 extends MovieClip {
public var leg2b:MovieClip;
public var foot2:MovieClip;
}
}//package desiree_fla
Section 16
//MainTimeline (desiree_fla.MainTimeline)
package desiree_fla {
import flash.display.*;
import flash.geom.*;
import flash.events.*;
import as3.*;
import flash.net.*;
import flash.text.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.media.*;
import flash.printing.*;
import flash.system.*;
import flash.ui.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class MainTimeline extends MovieClip {
public const BREAST_SHADOW_FALL_Y:Number = 240;
public const HIGH_BODY_X:Number = -4.05;
public const HIGH_BODY2_SCALE_Y:Number = 1;
public const FALL_BODY_X:Number = -4.8;
public const HIGH_BODY_Y:Number = -226.8;
public const FALL_LEG2_SKEW_X:Number = 0.1;
public const FALL_BODY2_SCALE_Y:Number = 0.5;
public const FALL_BODY_Y:Number = -130;
public const HIGH_FRONT_SCALE_Y:Number = 1;
public const FALL_FRONT_SCALE_Y:Number = 0.4;
public const BREAST_SHADOW_HIGH_Y:Number = 185;
public const END_FRAME:int = 600;
public const BREAST_SHADOW_BIG_WIDTH:Number = 300;
public const BREAST_SHADOW_SMALL_WIDTH:Number = 93;
public const HIGH_HEAD_X:Number = -3.6;
public const HIGH_HEAD_Y:Number = -29.6;
public const FALL_HEAD_X:Number = -3.6;
public const FALL_HEAD_Y:Number = -15;
public const HIGH_LEG1_SKEW_X:Number = 0;
public const ARM_FALL_END_POS:Number = 0.9;
public const STAGE_WIDTH:Number = 800;
public const OTHER_FRAME:int = 800;
public const HIGH_CHEST_SCALE_Y:Number = 1;
public const ARM_FALL_START_POS:Number = 0.3;
public const FALL_LEG1_SKEW_X:Number = -0.1;
public const FALL_CHEST_SCALE_Y:Number = 0.9;
public const ARM_FALL_END_FRAME:int = 25;
public const FALL_FRAME:int = 500;
public const STAGE_HEIGHT:Number = 600;
public const HIGH_LEG2_SKEW_X:Number = 0;
public const ARM_FALL_START_FRAME:int = 10;
public var size:int;
public var states:Object;
public var bar:MovieClip;
public var oldMY:Number;
public var eye1:MovieClip;
public var eye2:MovieClip;
public var speechPosition:int;
public var mouthState:Object;
public var speechTxt:String;
public var fallK:Number;
public var curState:Object;
public var oldMX:Number;
public var blushValue:Number;
public var lcd_stolen_bg:MovieClip;
public var bar2:MovieClip;
public var pupil1:MovieClip;
public var pupil2:MovieClip;
public var state:String;
public var offset:Number;
public var saveFile:SharedObject;
public var bounds:Rectangle;
public var p1X:Number;
public var p1Y:Number;
public var top2Points:Array;
public var time:Number;
public var mouth:MovieClip;
public var angle:Number;
public var LOWEST_BREAST_Y:Number;
public var ELASTIC:Array;
public var fallPos;
public var p2X:Number;
public var slider:MovieClip;
public var p2Y:Number;
public var speech:MovieClip;
public var fallKDown:Number;
public var top1Len:Number;
public var _panel:MovieClip;
public var topColor:uint;
public var blinking:Boolean;
public var blush:MovieClip;
public var top1Results:Array;
public var fallKUp:Number;
public var reactTimer:int;
public var environ:MovieClip;
public var fallTS:Number;
public var bShade:MovieClip;
public var fallDT:Number;
public var top:MovieClip;
public var top2Len:Number;
public var frequency:Number;
public var oldX:Number;
public var oldY:Number;
public var shakeAngle:Number;
public var LOWEST_HAND1_X:Number;
public var canBlink:Boolean;
public var LOWEST_HAND1_Y:Number;
public var top1Points:Array;
public var speechTimer:int;
public var fallFriction:Number;
public var speechReacting:Boolean;
public var ATTACHED;
public var mouthOpen:Boolean;
public var speechLetter:int;
public var lcd_stolen_item:MovieClip;
public var top2Results:Array;
public var growth:Number;
public var destFallPos:Number;
public var lcd_stolen:String;
public var ORIG_X:Number;
public var ORIG_Y:Number;
public var head:MovieClip;
public var zoom:Number;
public function MainTimeline(){
addFrameScript(0, frame1);
}
public function updateArms(){
var _local1:int;
var _local2:MovieClip;
var _local3:MovieClip;
var _local4:MovieClip;
var _local5:MovieClip;
var _local6:Number;
var _local7:Number;
var _local8:Boolean;
var _local9:Point;
var _local10:Point;
var _local11:Point;
var _local12:Number;
_local1 = environ.breasts.currentFrame;
_local2 = environ.arm1;
_local3 = _local2.hand1;
_local4 = environ.arm2;
_local5 = _local4.hand2;
_local7 = fallPos[0];
_local8 = (_local7 > ARM_FALL_END_POS);
if (_local7 >= ARM_FALL_START_POS){
_local6 = ((_local7 - ARM_FALL_START_POS) / (ARM_FALL_END_POS - ARM_FALL_START_POS));
if (_local6 < 0){
_local6 = 0;
};
if (_local6 > 1){
_local6 = 1;
};
_local2.gotoAndStop((ARM_FALL_START_FRAME + Math.floor((_local6 * (ARM_FALL_END_FRAME - ARM_FALL_START_FRAME)))));
_local4.gotoAndStop(_local2.currentFrame);
} else {
if (_local2.currentLabel != "down"){
_local2.gotoAndPlay("down");
};
if (_local4.currentLabel != "down"){
_local4.gotoAndPlay("down");
};
};
_local5.visible = (_local3.visible = _local8);
_local2.scaleY = (_local4.scaleY = 1);
_local9 = new Point();
if (_local8){
_local10 = _local3.localToGlobal(_local9);
_local11 = environ.globalToLocal(_local10);
_local12 = (_local11.y - _local2.y);
_local2.scaleY = ((LOWEST_HAND1_Y - _local2.y) / _local12);
_local4.scaleY = _local2.scaleY;
_local5.scaleY = (_local3.scaleY = (2 - _local2.scaleY));
};
}
public function eFrame(_arg1:Event){
var _local2:Matrix;
updateFallPos();
Physics.updateAttached(ATTACHED);
Physics.updateElastic(ELASTIC);
updateArms();
_local2 = environ.breasts.transform.matrix;
_local2.a = (2 - _local2.d);
environ.breasts.transform.matrix = _local2;
updateTop();
drawTop();
updateExpressions();
updateShadows();
updatePanel();
updateSpeech();
}
public function setFallDistance(_arg1:Number){
var _local2:Matrix;
environ.body.x = (environ.front.x + (HIGH_BODY_X + (_arg1 * (FALL_BODY_X - HIGH_BODY_X))));
environ.body.y = (environ.front.y + (HIGH_BODY_Y + (_arg1 * (FALL_BODY_Y - HIGH_BODY_Y))));
environ.head.x = (environ.body.x + (HIGH_HEAD_X + (_arg1 * (FALL_HEAD_X - HIGH_HEAD_X))));
environ.head.y = (environ.body.y + (HIGH_HEAD_Y + (_arg1 * (FALL_HEAD_Y - HIGH_HEAD_Y))));
environ.front.scaleY = (HIGH_FRONT_SCALE_Y + (_arg1 * (FALL_FRONT_SCALE_Y - HIGH_FRONT_SCALE_Y)));
environ.body2.scaleY = (HIGH_BODY2_SCALE_Y + (_arg1 * (FALL_BODY2_SCALE_Y - HIGH_BODY2_SCALE_Y)));
environ.chest.scaleY = (HIGH_CHEST_SCALE_Y + (_arg1 * (FALL_CHEST_SCALE_Y - HIGH_CHEST_SCALE_Y)));
_local2 = environ.leg1.transform.matrix;
_local2.c = (HIGH_LEG1_SKEW_X + (_arg1 * (FALL_LEG1_SKEW_X - HIGH_LEG1_SKEW_X)));
environ.leg1.transform.matrix = _local2;
_local2 = environ.leg1.leg1b.transform.matrix;
_local2.c = (HIGH_LEG1_SKEW_X + (_arg1 * (-(FALL_LEG1_SKEW_X) - HIGH_LEG1_SKEW_X)));
environ.leg1.leg1b.transform.matrix = _local2;
_local2 = environ.leg2.transform.matrix;
_local2.c = (HIGH_LEG2_SKEW_X + (_arg1 * (FALL_LEG2_SKEW_X - HIGH_LEG2_SKEW_X)));
environ.leg2.transform.matrix = _local2;
_local2 = environ.leg2.leg2b.transform.matrix;
_local2.c = (HIGH_LEG2_SKEW_X + (_arg1 * (-(FALL_LEG2_SKEW_X) - HIGH_LEG2_SKEW_X)));
environ.leg2.leg2b.transform.matrix = _local2;
}
public function showSlider(_arg1:Boolean){
slider.visible = (bar.visible = (bar2.visible = _arg1));
}
public function updateShadows(){
var _local1:Number;
_local1 = (environ.breasts.currentFrame / END_FRAME);
bShade.y = (BREAST_SHADOW_HIGH_Y + (_local1 * (BREAST_SHADOW_FALL_Y - BREAST_SHADOW_HIGH_Y)));
bShade.width = (BREAST_SHADOW_SMALL_WIDTH + (_local1 * (BREAST_SHADOW_BIG_WIDTH - BREAST_SHADOW_SMALL_WIDTH)));
bShade.alpha = _local1;
}
public function moveWorld(_arg1:MouseEvent){
environ.x = ((oldX + stage.mouseX) - oldMX);
environ.y = ((oldY + stage.mouseY) - oldMY);
Algorithms.adjustScreen(environ, environ.bg);
}
public function updateExpressions(){
var _local1:Number;
var _local2:SharedObject;
angle = (angle + frequency);
shakeAngle = (shakeAngle + 2.271);
if (curState.blush != undefined){
blushValue = (blushValue + ((curState.blush - blushValue) * 0.2));
};
blush.alpha = blushValue;
if (growth > 0){
if (destFallPos > (fallPos[0] + 0.4)){
if (speechPosition == 4){
speak("Oh! ");
speechPosition = 5;
};
react("fall", 12);
};
size = (size + growth);
if (size < 20){
} else {
if (size < 200){
if (speechPosition == 1){
speak("Oh my! I have breasts. They're REAL!");
speechPosition = 2;
};
setState("wonder");
} else {
if (size < 400){
if (speechPosition == 2){
speak("Wow! These are getting huge! They're so soft and bouncy!");
speechPosition = 3;
};
setState("happy");
} else {
if (size < FALL_FRAME){
if (speechPosition == 3){
speak("So... Heavy...");
speechPosition = 4;
};
setState("heavy");
} else {
if (size < END_FRAME){
setState("enjoy");
} else {
if (size >= END_FRAME){
setState("over");
size = END_FRAME;
growth = 0;
_local2 = SharedObject.getLocal("thing");
_local2.data.sliderVisible = true;
_local2.flush();
_local2.close();
_local2 = null;
showSlider(true);
if (speechPosition == 5){
speak("Ah, I never even thought this was possible. That was amazing!");
speechPosition = 6;
};
};
};
};
};
};
};
environ.breasts.gotoAndStop(size);
} else {
if (growth < 0){
size = (size + growth);
if (size <= 1){
size = 1;
growth = 0;
setState("normal");
} else {
if (size < END_FRAME){
setState("over");
};
};
environ.breasts.gotoAndStop(size);
} else {
if ((((size > 400)) && ((size < FALL_FRAME)))){
setState("heavy2");
};
};
};
slider.x = (bar.x + (((environ.breasts.currentFrame - 1) / (END_FRAME - 1)) * bar.width));
bar2.width = (slider.x - bar.x);
if (((((canBlink) && (!(blinking)))) && ((Math.random() < 0.01)))){
eye1.gotoAndPlay("blink");
eye2.gotoAndPlay("blink");
blinking = true;
} else {
if (((blinking) && ((eye1.currentLabel == "endblink")))){
eye1.gotoAndPlay(curState.eye1);
eye2.gotoAndPlay(curState.eye2);
blinking = false;
};
};
if (reactTimer > 0){
reactTimer--;
if (reactTimer <= 0){
endReact();
};
};
mouthOpen = mouthState[curState.mouth];
_local1 = (((Math.cos(angle) * 0.5) + 0.5) * offset);
if (mouthOpen){
mouth.scaleY = (1 - (_local1 * 0.1));
} else {
mouth.scaleY = 1;
};
}
public function zoomIn(_arg1:MouseEvent){
zoom = 0.01;
}
public function moveSlider(_arg1:MouseEvent){
slider.x = stage.mouseX;
if (slider.x < bar.x){
slider.x = bar.x;
};
if (slider.x > (bar.x + bar.width)){
slider.x = (bar.x + bar.width);
};
bar2.width = (slider.x - bar.x);
environ.breasts.gotoAndStop((1 + Math.floor((((END_FRAME - 1) * (slider.x - bar.x)) / bar.width))));
size = environ.breasts.currentFrame;
if (environ.breasts.currentFrame <= 1){
setState("normal");
} else {
setState("over");
};
}
function frame1(){
stage.scaleMode = StageScaleMode.NO_SCALE;
stage.align = StageAlign.TOP_LEFT;
lcd_stolen = new LocalConnection().domain;
if (lcd_stolen.toLowerCase().indexOf("swfchan") != -1){
stop();
lcd_stolen_bg = new MovieClip();
while (numChildren) {
removeChildAt(0);
};
lcd_stolen_bg.graphics.beginFill(0xFFFFFF);
lcd_stolen_bg.graphics.drawRect(0, 0, stage.stageWidth, stage.stageHeight);
lcd_stolen_bg.graphics.endFill();
lcd_stolen_item = new MovieClip();
lcd_stolen_item.tF = new TextFormat();
lcd_stolen_item.tF.bold = true;
lcd_stolen_item.tF.size = 64;
lcd_stolen_item.tF.color = 0xFF2200;
lcd_stolen_item.tF.font = "Trebuchet MS";
lcd_stolen_item.txt = new TextField();
lcd_stolen_item.txt.defaultTextFormat = lcd_stolen_item.tF;
lcd_stolen_item.txt.text = "swfchan.com";
lcd_stolen_item.txt.width = (lcd_stolen_item.txt.textWidth + 5);
lcd_stolen_item.txt.height = (lcd_stolen_item.txt.textHeight + 5);
lcd_stolen_item.bmp = new Bitmap(new BitmapData((lcd_stolen_item.txt.textWidth + 5), (lcd_stolen_item.txt.textHeight + 5), true, 0));
lcd_stolen_item.bmp.bitmapData.draw(lcd_stolen_item.txt);
lcd_stolen_item.bmp.x = (lcd_stolen_item.bmp.x - (lcd_stolen_item.bmp.width * 0.5));
lcd_stolen_item.bmp.y = (lcd_stolen_item.bmp.y - (lcd_stolen_item.bmp.height * 0.5));
lcd_stolen_item.addChild(lcd_stolen_item.bmp);
delete lcd_stolen_item.txt;
delete lcd_stolen_item.tF;
lcd_stolen_item.x = (Math.random() * stage.stageWidth);
lcd_stolen_item.y = (Math.random() * stage.stageWidth);
lcd_stolen_item.vX = (5 + (Math.random() * 10));
lcd_stolen_item.vY = (5 + (Math.random() * 10));
lcd_stolen_item.vR = (1 + ((Math.random() * 5) * ((Math.random())<0.5) ? -1 : 1));
stage.addChild(lcd_stolen_bg);
stage.addChild(lcd_stolen_item);
stage.addEventListener(Event.RESIZE, function (_arg1:Event){
lcd_stolen_bg.graphics.clear();
lcd_stolen_bg.graphics.beginFill(0xFFFFFF);
lcd_stolen_bg.graphics.drawRect(0, 0, stage.stageWidth, stage.stageHeight);
lcd_stolen_bg.graphics.endFill();
});
stage.addEventListener(Event.ENTER_FRAME, function (_arg1:Event){
lcd_stolen_item.x = (lcd_stolen_item.x + lcd_stolen_item.vX);
lcd_stolen_item.y = (lcd_stolen_item.y + lcd_stolen_item.vY);
lcd_stolen_item.rotation = (lcd_stolen_item.rotation + lcd_stolen_item.vR);
bounds = lcd_stolen_item.getBounds(stage);
if ((((((bounds.left < 0)) && ((lcd_stolen_item.vX < 0)))) || ((((bounds.right > stage.stageWidth)) && ((lcd_stolen_item.vX > 0)))))){
lcd_stolen_item.vX = -(lcd_stolen_item.vX);
};
if ((((((bounds.top < 0)) && ((lcd_stolen_item.vY < 0)))) || ((((bounds.bottom > stage.stageHeight)) && ((lcd_stolen_item.vY > 0)))))){
lcd_stolen_item.vY = -(lcd_stolen_item.vY);
};
});
return;
};
LOWEST_BREAST_Y = 430;
LOWEST_HAND1_Y = 230;
LOWEST_HAND1_X = -195;
stage.addEventListener(Event.ENTER_FRAME, eFrame);
time = 0;
destFallPos = 0;
fallPos = [0, 0, 0];
fallFriction = 0.92;
fallKDown = 0.35;
fallKUp = 0.1;
fallK = fallKDown;
fallDT = 0.2;
fallTS = 1;
ATTACHED = [];
Physics.attach(ATTACHED, environ.head_cover, environ.body);
Physics.attach(ATTACHED, environ.breasts, environ.body);
Physics.attach(ATTACHED, environ.top, environ.body);
Physics.attach(ATTACHED, environ.arm1, environ.body);
Physics.attach(ATTACHED, environ.arm2, environ.body);
Physics.attach(ATTACHED, environ.chest, environ.body);
Physics.attach(ATTACHED, environ.body2, environ.front);
Physics.attach(ATTACHED, environ.leg1.foot1, environ.leg1.leg1b);
Physics.attach(ATTACHED, environ.leg2.foot2, environ.leg2.leg2b);
ELASTIC = [];
Physics.setElastic(ELASTIC, environ, environ.head.ear1, ["skewY", "scaleX"], [0.22, 0.22], [0, 1], [0.93, 0.93], [4, 4], [0.4, 0.4]);
Physics.setElastic(ELASTIC, environ, environ.head.ear2, ["skewY", "scaleX"], [0.22, 0.22], [0, 1], [0.93, 0.93], [4, 4], [0.4, -0.4]);
Physics.setElastic(ELASTIC, environ, environ.head.whiskers1, ["skewY"], [0.18], [0], [0.98], [2], [0.3]);
Physics.setElastic(ELASTIC, environ, environ.head.whiskers2, ["skewY"], [0.18], [0], [0.98], [2], [0.3]);
Physics.setElastic(ELASTIC, environ, environ.head.hair, ["scaleY"], [0.18], [1], [0.98], [2], [0.08]);
Physics.setElastic(ELASTIC, environ, environ.breasts, ["scaleY"], [0.3], [1], [0.4], [2], [1]);
top = environ.top;
top1Points = [environ.arm1.p1, environ.breasts.p6, environ.breasts.p2, environ.breasts.p1, environ.breasts.p5, environ.arm1.p2];
top1Results = [];
top1Len = top1Points.length;
top2Points = [environ.arm2.p2, environ.breasts.p8, environ.breasts.p4, environ.breasts.p3, environ.breasts.p7, environ.arm2.p1];
top2Results = [];
top2Len = top2Points.length;
topColor = 16764142;
bShade = environ.breastShadow;
head = environ.head;
mouth = head.mouth;
eye1 = head.eye1;
eye2 = head.eye2;
pupil1 = eye1.pupil;
pupil2 = eye2.pupil;
blush = environ.head.blush;
p1X = pupil1.x;
p1Y = pupil1.y;
p2X = pupil2.x;
p2Y = pupil2.y;
blinking = false;
canBlink = true;
mouthOpen = false;
frequency = 0.1;
offset = 0.5;
angle = 0;
shakeAngle = 0;
blushValue = 0;
curState = {};
state = "";
reactTimer = 0;
states = [];
mouthState = {smile:false, small:true, open:true, happy:true, happy2:true, teeth:false};
states["normal"] = {eye1:"medium", eye2:"medium", mouth:"smile", p1X:0, p1Y:0, p2X:0, p2Y:0, canBlink:true, frequency:0.2, offset:0.5};
states["talk"] = {eye1:"big", eye2:"big", mouth:"small", p1X:0, p1Y:0, p2X:0, p2Y:0, canBlink:true, frequency:0.2, offset:0.7, blush:0};
states["wonder"] = {eye1:"open", eye2:"open", mouth:"open", p1X:0, p1Y:4, p2X:0, p2Y:4, canBlink:true, frequency:0.3, offset:0.5, blush:0};
states["happy"] = {eye1:"open", eye2:"open", mouth:"happy", p1X:0, p1Y:4, p2X:0, p2Y:4, canBlink:true, frequency:0.3, offset:0.5, blush:0};
states["heavy"] = {eye1:"medium", eye2:"shut", mouth:"teeth", p1X:0, p1Y:-4, p2X:0, p2Y:-4, canBlink:false, frequency:0.4, offset:0.5, blush:1};
states["heavy2"] = {eye1:"small2", eye2:"small2", mouth:"open", p1X:0, p1Y:2, p2X:0, p2Y:2, canBlink:false, frequency:0.4, offset:0.5, blush:0};
states["enjoy"] = {eye1:"small2", eye2:"small2", mouth:"happy2", p1X:0, p1Y:2, p2X:0, p2Y:2, canBlink:true, frequency:0.3, offset:0.5, blush:0.5};
states["over"] = {eye1:"small", eye2:"small", mouth:"smile", p1X:0, p1Y:2, p2X:0, p2Y:2, canBlink:true, frequency:0.3, offset:0.5, blush:0.5};
states["teeth"] = {eye1:"closed", eye2:"closed", mouth:"teeth", p1X:0, p1Y:0, p2X:0, p2Y:0, canBlink:false, frequency:0.4, offset:0.6, blush:1};
states["push"] = {eye1:"big", eye2:"big", mouth:"open", p1X:0, p1Y:0, p2X:0, p2Y:0, canBlink:true, frequency:0.3, offset:0.5, blush:0};
states["revert"] = {eye1:"big", eye2:"big", mouth:"closed", p1X:0, p1Y:0, p2X:0, p2Y:0, canBlink:true, frequency:0.3, offset:0.5, blush:0};
states["fall"] = {eye1:"open", eye2:"open", mouth:"open", p1X:0, p1Y:-2, p2X:0, p2Y:-2, canBlink:true, frequency:0.3, offset:0.5, blush:0};
states["devious"] = {eye1:"small", eye2:"small", mouth:"teeth2", p1X:0, p1Y:0, p2X:0, p2Y:0, canBlink:false, frequency:0.4, offset:0.6, blush:1};
setState("normal");
blush.alpha = 0;
speechPosition = 0;
speech = environ.speech;
speechTxt = "";
speechLetter = 0;
speechTimer = 0;
speechReacting = false;
speech.visible = false;
stage.addEventListener(MouseEvent.CLICK, speechClick);
environ.addEventListener(MouseEvent.MOUSE_DOWN, pokeBody);
ORIG_X = environ.x;
ORIG_Y = environ.y;
environ.breasts.gotoAndStop(1);
environ.addEventListener(MouseEvent.MOUSE_DOWN, pickWorld);
stage.addEventListener(Event.RESIZE, resize);
_panel._expand._txt.text = "Expand";
_panel._revert._txt.text = "Revert";
_panel._plus._txt.text = "+";
_panel._minus._txt.text = "-";
_panel._zero._txt.text = "0";
_panel._cont_txt.text = "Continuous";
_panel._info.text = "Interactive Desiree Breast Expansion\nDrawn, animated and programmed by Doom the wolf.\nhttp://doom-the-wolf.deviantart.com";
_panel._expand.gotoAndStop(1);
_panel._revert.gotoAndStop(1);
growth = 0;
size = 1;
zoom = 0;
_panel._expand.addEventListener(MouseEvent.MOUSE_DOWN, expand);
_panel._revert.addEventListener(MouseEvent.MOUSE_DOWN, revert);
_panel._plus.addEventListener(MouseEvent.MOUSE_DOWN, zoomIn);
_panel._minus.addEventListener(MouseEvent.MOUSE_DOWN, zoomOut);
_panel._zero.addEventListener(MouseEvent.MOUSE_DOWN, resetCamera);
_panel._cont.addEventListener(MouseEvent.MOUSE_DOWN, invertFrame);
stage.addEventListener(MouseEvent.MOUSE_UP, panelUp);
slider.x = (bar.x + (((environ.breasts.currentFrame - 1) / (END_FRAME - 1)) * bar.width));
slider.addEventListener(MouseEvent.MOUSE_DOWN, pickSlider);
bar2 = new MovieClip();
bar2.x = bar.x;
bar2.y = bar.y;
bar2.graphics.lineStyle(2, 0xFF00, 1, false, LineScaleMode.NONE);
bar2.graphics.moveTo(0, 0);
bar2.graphics.lineTo(300, 0);
bar2.width = 1;
bar.parent.addChildAt(bar2, bar.parent.getChildIndex(slider));
saveFile = SharedObject.getLocal("thing");
if (!saveFile.data.sliderVisible){
showSlider(false);
};
saveFile.close();
saveFile = null;
}
public function pickSlider(_arg1:MouseEvent){
stage.addEventListener(MouseEvent.MOUSE_MOVE, moveSlider);
stage.addEventListener(MouseEvent.MOUSE_UP, dropSlider);
}
public function zoomOut(_arg1:MouseEvent){
zoom = -0.01;
}
public function expand(_arg1:MouseEvent){
if (environ.breasts.currentFrame == environ.breasts.totalFrames){
resetAll();
return;
};
if ((((((speechPosition <= 1)) && (speech.visible))) && ((speechLetter < speechTxt.length)))){
return;
};
growth = ((growth)==1) ? 0 : 1;
_panel._expand.gotoAndStop((growth) ? 2 : 1);
_panel._revert.gotoAndStop(1);
}
public function resize(_arg1:Event){
Algorithms.adjustScreen(environ, environ.bg);
bar2.x = (bar.x = ((stage.stageWidth - bar.width) - 20));
bar2.y = (bar.y = (stage.stageHeight - 30));
slider.y = bar.y;
slider.x = (bar.x + (((environ.breasts.currentFrame - 1) / (END_FRAME - 1)) * bar.width));
bar2.width = (slider.x - bar.x);
}
public function updatePanel(){
if (_panel.hitTestPoint(stage.mouseX, stage.mouseY, true)){
_panel.y = (_panel.y + (((stage.stageHeight - 100) - _panel.y) * 0.5));
} else {
_panel.y = (_panel.y + ((stage.stageHeight - _panel.y) * 0.5));
};
if (zoom){
environ.scaleY = (environ.scaleY + zoom);
environ.scaleX = environ.scaleY;
Algorithms.adjustScreen(environ, environ.bg);
};
if (size < END_FRAME){
_panel._expand._txt.text = "Expand";
} else {
_panel._expand._txt.text = "Reset";
};
}
public function dropSlider(_arg1:MouseEvent){
stage.removeEventListener(MouseEvent.MOUSE_MOVE, moveSlider);
stage.removeEventListener(MouseEvent.MOUSE_UP, dropSlider);
}
public function pokeBody(_arg1:MouseEvent){
var _local2:Object;
var _local3:Number;
var _local4:Number;
_local2 = _arg1.target;
_local3 = stage.mouseX;
_local4 = stage.mouseY;
if (((environ.breasts.hitTestPoint(_local3, _local4, true)) && ((environ.breasts.currentFrame > 50)))){
if (!speech.visible){
react("devious", 0);
speechReacting = true;
speak("You like what you're feeling?\n\nSo do I!");
};
ELASTIC[5]["values"][0][1] = (ELASTIC[5]["values"][0][1] + 0.12);
} else {
if (((environ.chest.hitTestPoint(_local3, _local4, true)) || (environ.body.hitTestPoint(_local3, _local4, true)))){
if (fallPos[0] <= (destFallPos + 0.1)){
fallPos[1] = (fallPos[1] + (0.1 * (environ.breasts.currentFrame / END_FRAME)));
if (environ.breasts.currentFrame > 50){
react("push", 10);
};
};
};
};
}
public function updateSpeech(){
var _local1:int;
if (!speech.visible){
return;
};
if (speechLetter < speechTxt.length){
_local1 = 0;
while (_local1 < 2) {
if (speechLetter >= speechTxt.length){
break;
};
speech._txt.appendText(speechTxt.charAt(speechLetter++));
_local1++;
};
speech._txt.scrollV = speech._txt.maxScrollV;
if (speechLetter >= speechTxt.length){
endReact();
};
} else {
if (speechTimer > 0){
speechTimer--;
} else {
speech.visible = false;
speechTxt = "";
speechLetter = 0;
speechTimer = 0;
};
};
}
public function setState(_arg1:String){
var _local2:*;
if ((((state == _arg1)) || ((reactTimer > 0)))){
return;
};
for (_local2 in states[_arg1]) {
curState[_local2] = states[_arg1][_local2];
};
curState.state = (state = _arg1);
mouth.gotoAndPlay(curState.mouth);
eye1.gotoAndPlay(curState.eye1);
eye2.gotoAndPlay(curState.eye2);
pupil1.x = (p1X + curState.p1X);
pupil1.y = (p1Y + curState.p1Y);
pupil2.x = (p2X + curState.p2X);
pupil2.y = (p2Y + curState.p2Y);
canBlink = curState.canBlink;
frequency = curState.frequency;
offset = curState.offset;
}
public function resetCamera(_arg1:MouseEvent){
environ.scaleX = (environ.scaleY = 1);
environ.x = ORIG_X;
environ.y = ORIG_Y;
}
public function endReact(){
reactTimer = 0;
state = "";
setState(curState.state);
}
public function drawTop(){
var _local1:Graphics;
var _local2:Array;
var _local3:Point;
_local1 = top.graphics;
_local2 = top1Results;
_local1.clear();
_local1.lineStyle(0.1);
_local1.beginFill(topColor);
_local1.moveTo(_local2[0].x, _local2[0].y);
_local1.curveTo(_local2[1].x, _local2[1].y, _local2[2].x, _local2[2].y);
_local1.lineTo(_local2[3].x, _local2[3].y);
_local1.curveTo(_local2[4].x, _local2[4].y, _local2[5].x, _local2[5].y);
_local3 = new Point(((_local2[5].x + _local2[0].x) * 0.5), ((_local2[5].y + _local2[0].y) * 0.5));
_local1.endFill();
_local2 = top2Results;
_local1.lineStyle(0.1);
_local1.beginFill(topColor);
_local1.moveTo(_local2[0].x, _local2[0].y);
_local1.curveTo(_local2[1].x, _local2[1].y, _local2[2].x, _local2[2].y);
_local1.lineTo(_local2[3].x, _local2[3].y);
_local1.curveTo(_local2[4].x, _local2[4].y, _local2[5].x, _local2[5].y);
_local3 = new Point(((_local2[5].x + _local2[0].x) * 0.5), ((_local2[5].y + _local2[0].y) * 0.5));
_local1.endFill();
}
public function invertFrame(_arg1:MouseEvent){
_arg1.currentTarget.gotoAndStop((3 - _arg1.currentTarget.currentFrame));
}
public function react(_arg1:String, _arg2:int=30){
var _local3:String;
if (reactTimer > 0){
return;
};
_local3 = curState.state;
state = "";
setState(_arg1);
curState.state = _local3;
reactTimer = _arg2;
}
public function updateTop(){
var _local1:int;
var _local2:Point;
var _local3:Point;
var _local4:Point;
_local4 = new Point();
_local1 = 0;
while (_local1 < top1Len) {
_local3 = top1Points[_local1].localToGlobal(_local4);
top1Results[_local1] = top.globalToLocal(_local3);
_local1++;
};
_local1 = 0;
while (_local1 < top2Len) {
_local3 = top2Points[_local1].localToGlobal(_local4);
top2Results[_local1] = top.globalToLocal(_local3);
_local1++;
};
}
public function speechClick(_arg1:MouseEvent){
if (((speech.visible) && ((speechLetter < speechTxt.length)))){
return;
};
if (speechPosition == 0){
react("talk", 0);
speechReacting = true;
speak("I'm wearing this special top you said I'd need! \nDid you really say breast expansion? ... \nI don't even have breasts!");
speechPosition = 1;
};
}
public function updateFallPos(){
var _local1:Number;
var _local2:int;
var _local3:Number;
var _local4:Number;
_local2 = environ.breasts.currentFrame;
if (_local2 >= FALL_FRAME){
destFallPos = 1;
fallK = fallKDown;
} else {
_local1 = (_local2 / FALL_FRAME);
destFallPos = (0.2 * _local1);
fallK = fallKUp;
};
Physics.verlet(fallPos, destFallPos, fallFriction, fallK, fallDT, fallTS);
_local3 = (((Math.cos(angle) * 0.5) + 0.5) * offset);
_local4 = 0;
if (state == "heavy"){
_local4 = (Math.cos(shakeAngle) * 0.003);
};
setFallDistance(((fallPos[0] + (_local3 * 0.01)) + _local4));
}
public function speak(_arg1:String){
speechTxt = _arg1;
speechLetter = 0;
speechTimer = (10 + _arg1.length);
speech._txt.text = "";
speech.visible = true;
}
public function dropWorld(_arg1:MouseEvent){
stage.removeEventListener(MouseEvent.MOUSE_MOVE, moveWorld);
stage.removeEventListener(MouseEvent.MOUSE_UP, dropWorld);
}
public function revert(_arg1:MouseEvent){
growth = ((growth)==-1) ? 0 : -1;
_panel._expand.gotoAndStop(1);
_panel._revert.gotoAndStop((growth) ? 2 : 1);
}
public function pickWorld(_arg1:MouseEvent){
stage.addEventListener(MouseEvent.MOUSE_MOVE, moveWorld);
stage.addEventListener(MouseEvent.MOUSE_UP, dropWorld);
oldX = environ.x;
oldY = environ.y;
oldMX = stage.mouseX;
oldMY = stage.mouseY;
}
public function resetAll(){
environ.breasts.gotoAndStop(1);
destFallPos = 0;
endReact();
speech.visible = false;
speechPosition = 0;
_panel._expand.gotoAndStop(1);
_panel._revert.gotoAndStop(1);
_panel._expand._txt.text = "Expand";
growth = 0;
size = 1;
slider.x = (bar.x + (((environ.breasts.currentFrame - 1) / (END_FRAME - 1)) * bar.width));
bar2.width = (slider.x - bar.x);
resetCamera(null);
}
public function panelUp(_arg1:MouseEvent){
if (_panel._cont.currentFrame == 1){
growth = 0;
_panel._expand.gotoAndStop(1);
_panel._revert.gotoAndStop(1);
};
zoom = 0;
}
}
}//package desiree_fla
Section 17
//mouth_30 (desiree_fla.mouth_30)
package desiree_fla {
import flash.display.*;
public dynamic class mouth_30 extends MovieClip {
public function mouth_30(){
addFrameScript(1, frame2, 3, frame4, 5, frame6, 7, frame8, 9, frame10, 11, frame12, 13, frame14, 15, frame16);
}
function frame10(){
this.gotoAndPlay(this.currentLabel);
}
function frame14(){
this.gotoAndPlay(this.currentLabel);
}
function frame12(){
this.gotoAndPlay(this.currentLabel);
}
function frame6(){
this.gotoAndPlay(this.currentLabel);
}
function frame16(){
this.gotoAndPlay(this.currentLabel);
}
function frame8(){
this.gotoAndPlay(this.currentLabel);
}
function frame4(){
this.gotoAndPlay(this.currentLabel);
}
function frame2(){
this.gotoAndPlay(this.currentLabel);
}
}
}//package desiree_fla
Section 18
//panel_36 (desiree_fla.panel_36)
package desiree_fla {
import flash.display.*;
import flash.text.*;
public dynamic class panel_36 extends MovieClip {
public var _revert:MovieClip;
public var _cont:MovieClip;
public var _minus:MovieClip;
public var _cont_txt:TextField;
public var _zero:MovieClip;
public var _plus:MovieClip;
public var _info:TextField;
public var _expand:MovieClip;
}
}//package desiree_fla
Section 19
//speech_35 (desiree_fla.speech_35)
package desiree_fla {
import flash.display.*;
import flash.text.*;
public dynamic class speech_35 extends MovieClip {
public var _txt:TextField;
}
}//package desiree_fla