Frame 1
function myOnKeyDown() {
var _local1 = Key.getCode();
if ((_local1 eq 38) && (!isUpOn)) {
isUpOn = true;
changeGas(100);
} else if ((_local1 eq 40) && (!isDownOn)) {
isDownOn = true;
changeGas(-75);
} else if ((_local1 eq 37) && (!isLeftOn)) {
isLeftOn = true;
changeSteer(-100);
} else if ((_local1 eq 39) && (!isRightOn)) {
isRightOn = true;
changeSteer(100);
}
}
function myOnKeyUp() {
gasV = 0;
if ((!Key.isDown(38)) && (isUpOn)) {
isUpOn = false;
if (Key.isDown(40)) {
isDownOn = true;
changeGas(-50);
} else {
changeGas(0);
}
}
if ((!Key.isDown(40)) && (isDownOn)) {
isDownOn = false;
if (Key.isDown(38)) {
isUpOn = true;
changeGas(100);
} else {
changeGas(0);
}
}
if ((!Key.isDown(37)) && (isLeftOn)) {
isLeftOn = false;
if (Key.isDown(39)) {
isRightOn = true;
changeSteer(100);
} else {
changeSteer(0);
}
}
if ((!Key.isDown(39)) && (isRightOn)) {
isRightOn = false;
if (Key.isDown(37)) {
isLeftOn = true;
changeSteer(-100);
} else {
changeSteer(0);
}
}
}
function changeGas(z) {
gas = z;
if (!gasActive) {
gasActive = true;
gasId = setInterval(upDateGas, 10);
}
}
function changeSteer(z) {
steer = z;
if (!steerActive) {
steerActive = true;
steerId = setInterval(upDateSteer, 10);
}
}
function upDateGas() {
if (gasVal > gas) {
gasV = gasV - gasRate;
} else {
gasV = gasV + gasRate;
}
if (((gasV < 0) && (gasVal < gas)) or ((gasV > 0) && (gasVal > gas))) {
gasV = 0;
gasVal = gas;
gasActive = false;
clearInterval(gasId);
} else {
gasVal = Number(gasVal) + gasV;
}
}
function upDateSteer() {
if (steerVal eq 0) {
var _local1 = 2;
} else {
var _local1 = 1;
}
if (steerVal > steer) {
steerV = steerV - (steerRate * _local1);
} else {
steerV = steerV + (steerRate * _local1);
}
if (((steerV < 0) && (steerVal < steer)) or ((steerV > 0) && (steerVal > steer))) {
steerV = 0;
steerVal = steer;
steerActive = false;
clearInterval(steerId);
} else {
steerVal = Number(steerVal) + steerV;
}
}
function stopCar() {
delete car.onEnterFrame;
Key.removeListener(myListener);
}
function distance(x1, y1, x2, y2) {
return(Math.sqrt(Math.pow(Math.abs(x1 - x2), 2) + Math.pow(Math.abs(y1 - y2), 2)));
}
function adjustCopSound() {
var _local1 = {x:car.ub._x, y:car.ub._y};
car.localToGlobal(_local1);
var _local3 = distance(_local1.x, _local1.y, walls.cop1._x, walls.cop1._y);
var _local2 = 100 - ((_local3 / 500) * 100);
trace(_local2);
siren.siren.setVolume(_local2);
}
function startCar() {
steer = 0;
gas = 0;
steerVal = 0;
gasVal = 0;
gasV = 0;
steerV = 0;
cD = 0;
gasRate = 0.1;
steerRate = 1.5;
maxTurn = 4;
maxSpeed = 3;
car._rotation = 0;
record = [];
makeCopRecord();
postIDX = 0;
myListener = new Object();
myListener.onKeyDown = myOnKeyDown;
myListener.onKeyUp = myOnKeyUp;
Key.addListener(myListener);
car._x = car.initX;
car._y = car.initY;
car.gotoAndPlay(2);
car.onEnterFrame = function () {
var _local3 = gasVal / 100;
if (_local3 eq 0) {
idle.idle.setVolume(100);
drive.drive.setVolume(0);
} else {
if (drive.drive.getVolume() eq 0) {
play_sound("burnout");
}
idle.idle.setVolume(0);
drive.drive.setVolume(100);
}
var _local7 = steerVal / 100;
var _local6 = _local3 * maxSpeed;
var _local5 = (_local7 * maxTurn) * _local3;
if (_local7 eq 1) {
play_sound("skid");
}
cD = car._rotation;
if (_local6 > 0) {
car._rotation = car._rotation + _local5;
} else {
car._rotation = car._rotation - (_local5 * 2);
}
pX = car._x;
pY = car._y;
movement(this, cD, _local6);
checkPosts();
if (copDelay > 150) {
moveCops();
} else {
copDelay++;
}
adjustCopSound();
if (didHitWall()) {
var _local4 = {x:car.ul._x, y:car.ul._y};
car.localToGlobal(_local4);
var _local2 = walls.hitTest(_local4.x, _local4.y, true);
_local4 = {x:car.ur._x, y:car.ur._y};
car.localToGlobal(_local4);
var _local8 = walls.hitTest(_local4.x, _local4.y, true);
_local4 = {x:car.ub._x, y:car.ub._y};
car.localToGlobal(_local4);
var _local9 = walls.hitTest(_local4.x, _local4.y, true);
if ((!checkHits()) && (!checkExit())) {
if ((((!_local9) && (!_local2)) && (!_local8)) or (_local2 && (_local8))) {
car._x = pX;
car._y = pY;
car._rotation = car._rotation + 15;
} else if (_local2) {
car._x = pX;
car._y = pY;
car._rotation = car._rotation + 15;
} else {
car._x = pX;
car._y = pY;
car._rotation = car._rotation - 15;
}
}
checkCops();
}
};
}
function relativePoint(z) {
var _local4 = this._xscale / 100;
var _local3 = this._yscale / 100;
z.x = (z.x * _local4) + this._x;
z.y = (z.y * _local3) + this._y;
}
function radian(z) {
return((Math.PI/180) * z);
}
function movement(z, d, s) {
z._x = z._x + (s * Math.cos(radian(d - 90)));
z._y = z._y + (s * Math.sin(radian(d - 90)));
}
function didHitWall() {
return(walls.hitTest(car._x, car._y, true));
}
function checkHits() {
var _local1 = checkBoxes();
if (_local1) {
_local1.gotoAndStop(2);
if (checkBoxesComplete()) {
openGate();
}
return(true);
}
return(false);
}
function checkBoxes() {
var i = 1;
while (i <= 10) {
obj = eval ("walls.box" add i);
var hit = obj.hitTest(car);
if (hit) {
return(obj);
}
i++;
}
return(false);
}
function checkCops() {
obj = walls.cop1;
var _local1 = obj.hitTest(car);
if (_local1) {
gotCaught();
return(obj);
}
return(false);
}
function checkBoxesComplete() {
var i = 1;
while (i <= 10) {
var obj = eval ("walls.box" add i);
if (obj._currentframe eq 1) {
return(false);
}
i++;
}
return(true);
}
function openGate() {
walls.gate.gotoAndStop(2);
exit.gotoAndStop(2);
}
function checkExit() {
if (walls.exit.hitTest(car)) {
endGame();
return(true);
}
return(false);
}
function endGame() {
trace("CONGRATULATIONS!");
stopCar();
gameOn = false;
boat.play();
boat.boat.gotoAndStop(2);
}
function gotCaught() {
trace("YOU WERE CAUGHT!");
stopCar();
walls.stop();
gameOn = false;
titleIn(3);
}
function titleIn(z) {
_quality = "HIGH";
strip.gotoAndStop(z);
strip.easeToHome(9, 15, 15);
}
function titleOut() {
strip.easeOff("up", 0, 9, 15, 15);
}
function gameInit() {
copInitX = walls.cop1._x;
copInitY = walls.cop1._y;
strip.offSet("up");
titleIn(1);
strip.gb.onRelease = function () {
strip.onStop = function () {
_quality = "LOW";
startGame();
};
titleOut();
};
}
function startGame() {
siren.siren.setVolume(0);
idle.idle.setVolume(0);
drive.drive.setVolume(0);
boat.gotoAndStop(1);
boat.boat.gotoAndStop(1);
exit.gotoAndStop(1);
walls.cop1._x = copInitX;
walls.cop1._y = copInitY;
walls.cop2._x = copInitX;
walls.cop2._y = 509;
walls.cop3._x = copInitX;
walls.cop3._y = 553;
walls.cop1._rotation = 0;
targetR = 0;
copSpeed = copInitSpeed;
copDelay = 0;
resetBoxes();
startCar();
gameOn = true;
walls.gotoAndPlay(1);
}
function resetBoxes() {
var i = 1;
while (i <= 10) {
var obj = eval ("walls.box" add i);
obj.gotoAndStop(1);
i++;
}
}
function checkPosts() {
if (didHitPost()) {
var _local1 = findPost();
if ((_local1 ne lastPost) && (_local1 ne false)) {
lastPost = _local1;
record.push(lastPost);
trace(lastPost);
}
}
}
function findPost() {
var i = 1;
while (i <= 34) {
obj = eval ("posts.p" add i);
var hit = obj.hitTest(car);
if (hit) {
return(obj);
}
i++;
}
return(false);
}
function didHitPost() {
return(posts.hitTest(car._x, car._y, true));
}
function moveCops() {
upDatePost();
copSpeed = copSpeed + 0.00025;
copTurnSpeed = copSpeed * 2;
var _local2 = walls.cop1._x - targetX;
var _local3 = walls.cop1._y - targetY;
var _local1 = _local2;
if (Math.abs(_local1) > copSpeed) {
if (_local1 > 0) {
walls.cop1._x = walls.cop1._x - copSpeed;
} else if (_local1 < 0) {
walls.cop1._x = walls.cop1._x + copSpeed;
}
} else {
walls.cop1._x = targetX;
}
_local1 = _local3;
if (Math.abs(_local1) > copSpeed) {
if (_local1 > 0) {
walls.cop1._y = walls.cop1._y - copSpeed;
} else if (_local1 < 0) {
walls.cop1._y = walls.cop1._y + copSpeed;
}
} else {
walls.cop1._y = targetY;
}
turnCopTo(targetR);
copBrake = copHitCar();
if (copBrake) {
if (!shifting) {
shifting = true;
walls.cop1.play();
}
} else {
shifting = false;
}
recordCopPosition();
upDateTrailers();
}
function upDatePost() {
var _local1 = record[postIDX];
if (_local1 eq undefined) {
targetX = car._x;
targetY = car._y;
} else {
targetX = _local1._x;
targetY = _local1._y;
}
if (_local1.hitTest(walls.cop1._x, walls.cop1._y, true)) {
postIDX++;
_local1 = record[postIDX];
if (_local1 eq undefined) {
targetX = car._x;
targetY = car._y;
} else {
targetX = _local1._x;
targetY = _local1._y;
}
var _local2 = walls.cop1._x - targetX;
var _local3 = walls.cop1._y - targetY;
clockWise = 1;
if (Math.abs(_local2) > Math.abs(_local3)) {
if (walls.cop1._x > targetX) {
trace("A");
if (targetR eq 0) {
clockWise = 1;
}
targetR = 270;
} else {
trace("B");
targetR = 90;
}
} else if (walls.cop1._y > targetY) {
trace("C");
targetR = 0;
} else {
trace("D");
targetR = 180;
}
}
}
function turnCopTo(z) {
if (z eq undefined) {
z = 0;
}
change_direction(walls.cop1, targetX, targetY);
}
function fixAngle(angle) {
while (angle > 360) {
angle = angle - 360;
}
while (angle < 0) {
angle = angle + 360;
}
return(angle);
}
function change_direction(z, x, y) {
var _local2 = fixAngle((((Math.atan2(z._y - y, z._x - x) * 180) / Math.PI) - 90) - z._rotation);
if ((_local2 > 4) && (_local2 < 356)) {
if (_local2 > 180) {
var _local3 = -copTurnSpeed;
} else {
var _local3 = copTurnSpeed;
}
z._rotation = z._rotation + _local3;
} else {
z._rotation = targetR;
}
}
function copHitCar() {
var i = 1;
while (i <= 3) {
var obj = eval (("walls.car" add i) add ".th");
if (walls.cop1.c.hb.hitTest(obj)) {
return(true);
}
i++;
}
return(false);
}
function recordCopPosition() {
copRecord.push({x:walls.cop1._x, y:walls.cop1._y, r:walls.cop1._rotation, f:walls.cop1._currentframe});
copRecord.shift();
}
function upDateTrailers() {
walls.cop2._x = copRecord[80].x;
walls.cop2._y = copRecord[80].y;
walls.cop2._rotation = copRecord[80].r;
walls.cop2.gotoAndStop(copRecord[80].f);
walls.cop3._x = copRecord[60].x;
walls.cop3._y = copRecord[60].y;
walls.cop3._rotation = copRecord[60].r;
walls.cop3.gotoAndStop(copRecord[60].f);
}
function makeCopRecord() {
copRecord = [];
var _local1 = 0;
while (_local1 <= 100) {
copRecord.push({x:copInitX, y:copInitY + (200 - (_local1 * copInitSpeed)), r:0});
_local1++;
}
}
copInitSpeed = 2;
gameInit();
function play_sound(z, x) {
if (x eq undefined) {
x = 0;
}
eval ((z add ".") add z).start(x, 1);
}
Instance of Symbol 72 MovieClip "car" in Frame 1
onClipEvent (load) {
initX = _x;
initY = _y;
_x = -50;
_y = -50;
}
Instance of Symbol 92 MovieClip in Frame 1
//component parameters
onClipEvent (construct) {
MKdFrames = 100;
MKdRate = 10;
MKdEase = 9;
MKpixelSnap = true;
MKautoDeleteStop = true;
MKallowInterupt = true;
}
Instance of Symbol 94 MovieClip "skid" in Frame 1
onClipEvent (load) {
Set(_name, new Sound(this));
eval (_name).attachSound(_name add "_sound");
eval (_name).setVolume(10);
}
Instance of Symbol 94 MovieClip "siren" in Frame 1
onClipEvent (load) {
Set(_name, new Sound(this));
eval (_name).attachSound(_name add "_loop");
eval (_name).start(0, 999);
eval (_name).setVolume(0);
}
Instance of Symbol 94 MovieClip "idle" in Frame 1
onClipEvent (load) {
Set(_name, new Sound(this));
eval (_name).attachSound(_name add "_loop");
eval (_name).start(0, 999);
eval (_name).setVolume(0);
}
Instance of Symbol 94 MovieClip "burnout" in Frame 1
onClipEvent (load) {
Set(_name, new Sound(this));
eval (_name).attachSound(_name add "_sound");
eval (_name).setVolume(50);
}
Instance of Symbol 94 MovieClip "drive" in Frame 1
onClipEvent (load) {
Set(_name, new Sound(this));
eval (_name).attachSound(_name add "_loop");
eval (_name).start(0, 999);
eval (_name).setVolume(0);
}
Symbol 14 MovieClip Frame 1
stop();
Symbol 30 MovieClip Frame 1
stop();
Symbol 30 MovieClip Frame 6
stop();
Symbol 44 MovieClip Frame 1
stop();
Instance of Symbol 57 MovieClip in Symbol 58 MovieClip Frame 1
onClipEvent (load) {
gotoAndPlay(random(_totalframes));
}
Instance of Symbol 57 MovieClip in Symbol 58 MovieClip Frame 1
onClipEvent (load) {
gotoAndPlay(random(_totalframes));
}
Instance of Symbol 57 MovieClip in Symbol 58 MovieClip Frame 1
onClipEvent (load) {
gotoAndPlay(random(_totalframes));
}
Instance of Symbol 57 MovieClip in Symbol 58 MovieClip Frame 1
onClipEvent (load) {
gotoAndPlay(random(_totalframes));
}
Instance of Symbol 57 MovieClip in Symbol 58 MovieClip Frame 1
onClipEvent (load) {
gotoAndPlay(random(_totalframes));
}
Symbol 59 MovieClip Frame 1
stop();
Symbol 60 MovieClip Frame 1
stop();
Symbol 60 MovieClip Frame 60
_parent.titleIn(2);
stop();
Symbol 64 MovieClip Frame 1
stop();
Symbol 67 MovieClip Frame 1
stop();
Symbol 72 MovieClip Frame 1
stop();
Symbol 72 MovieClip Frame 62
stop();
Symbol 88 MovieClip Frame 1
stop();
Symbol 92 MovieClip Frame 1
#initclip 1
this.ease = ["linearTween", "easeinquad", "easeoutquad", "easeinoutquad", "easeinsine", "easeoutsine", "easeinoutsine", "easeinexpo", "easeoutexpo", "easeinoutexpo", "easeincirc", "easeoutcirc", "easeinoutcirc", "easeincubic", "easeoutcubic", "easeinoutcubic", "easeinquart", "easeoutquart", "easeinoutquart", "easeinquint", "easeoutquint", "easeinoutquint", "easeinelastic", "easeoutelastic", "easeinoutelastic", "easeinsnap", "easeoutsnap", "easeinoutsnap", "easeinbounce", "easeoutbounce", "easeinoutbounce"];
this.propList = ["_x", "_y"];
Object.prototype.initEaseMotion = function (ox, oy, tx, ty, e, d, r, e1, e2) {
if (ox eq tx) {
this.easeProp("_y", ty, e, d, r, e1, e2);
} else if (oy eq ty) {
this.easeProp("_x", tx, e, d, r, e1, e2);
} else {
this.easeProp("_xy", [tx, ty], e, d, r, e1, e2);
}
};
Object.prototype.easeProp = function (p, t, e, d, r, e1, e2) {
if (r eq undefined) {
r = MKGlobals.MKdRate;
}
if (e eq undefined) {
e = MKGlobals.MKdEase;
}
if (d eq undefined) {
d = MKGlobals.MKdFrames;
}
var _local5 = p add "ease";
if (r > 0) {
if (this.MKData eq undefined) {
this.MKData = {};
}
var _local6;
var _local3 = this.MKData;
var _local8 = _local3[_local5].intervalId;
if ((_local8 eq undefined) or (((MKGlobals.MKallowInterupt eq true) and (this.allowInterupt ne false)) or (this.allowInterupt eq true))) {
clearInterval(_local8);
_local3[_local5] = {};
_local6 = true;
} else {
_local6 = false;
}
} else {
if (this.MKHold eq undefined) {
this.createEmptyMovieClip("MKHold", 0);
}
var _local3 = this.MKHold;
if ((_local3[_local5].onEnterFrame eq undefined) or (((MKGlobals.MKallowInterupt eq true) and (this.allowInterupt ne false)) or (this.allowInterupt eq true))) {
delete _local3[_local5].onEnterFrame;
_local3.x = _local3.x + 1;
_local3.createEmptyMovieClip(p add "ease", _local3.x);
var _local6 = true;
} else {
var _local6 = false;
}
}
var _local2 = _local3[_local5];
if (_local6) {
_local2.propTransform = p;
_local2.propTarget = this;
if (this.onStop ne undefined) {
this.onPropStop(p, this.onStop);
}
if (p eq "_xy") {
_local2.propTransformFrom = [this._x, this._y];
_local2.propTransformTo = [t[0] - this._x, t[1] - this._y];
if (((MKGlobals.MKpixelSnap eq true) and (this.pixelSnap ne false)) or (this.pixelSnap eq true)) {
transform = stepXYMotionPSnap;
} else {
transform = stepXYMotion;
}
} else {
_local2.propTransformFrom = this[p];
_local2.propTransformTo = t - this[p];
if (((MKGlobals.MKpixelSnap eq true) and (this.pixelSnap ne false)) or (this.pixelSnap eq true)) {
transform = stepPropTransformPSnap;
} else {
transform = stepPropTransform;
}
}
_local2.applyEaseVal(transform, e, d, r, e1, e2);
}
};
Object.prototype.easeValueReport = function (e, t, e1, e2) {
return(this[ease[e]](t, 0, 100, 100, e1, e2) / 100);
};
Object.prototype.stepEaseValue = function (f, e, d, e1, e2) {
this.t++;
if (this.t <= d) {
f.apply(this, [easeValueReport(e, this.t * (100 / d), e1, e2)]);
} else {
clearInterval(this.intervalId);
this.intervalId = undefined;
delete this.onEnterFrame;
this.onStop();
if (((MKGlobals.MKautoDeleteStop eq true) and (this.propTarget.autoDeleteStop ne false)) or (this.propTarget.autoDeleteStop eq true)) {
delete this.onStop;
delete this.propTarget.onStop;
}
}
updateAfterEvent();
};
Object.prototype.stepPropTransform = function (z) {
this.propTarget[this.propTransform] = this.propTransformFrom + (this.propTransformTo * z);
};
Object.prototype.stepPropTransformPSnap = function (z) {
this.propTarget[this.propTransform] = Math.round(this.propTransformFrom + (this.propTransformTo * z));
};
Object.prototype.stepXYMotion = function (z) {
this.propTarget._x = this.propTransformFrom[0] + (this.propTransformTo[0] * z);
this.propTarget._y = this.propTransformFrom[1] + (this.propTransformTo[1] * z);
};
Object.prototype.stepXYMotionPSnap = function (z) {
this.propTarget._x = Math.round(this.propTransformFrom[0] + (this.propTransformTo[0] * z));
this.propTarget._y = Math.round(this.propTransformFrom[1] + (this.propTransformTo[1] * z));
};
Object.prototype.easeTo = function (tx, ty, e, d, r, e1, e2) {
var _local3 = this._x;
var _local2 = this._y;
this.initEaseMotion(_local3, _local2, tx, ty, e, d, r, e1, e2);
};
Object.prototype.easePull = function (tx, ty, e, d, r, e1, e2) {
var _local3 = this._x;
var _local2 = this._y;
tx = _local3 + tx;
ty = _local2 + ty;
this.initEaseMotion(_local3, _local2, tx, ty, e, d, r, e1, e2);
};
Object.prototype.applyEaseVal = function (f, e, d, r, e1, e2) {
this.t = 0;
if (r > 0) {
this.intervalId = setInterval(this, "stepEaseValue", r, f, e, d, e1, e2);
} else {
this.onEnterFrame = function () {
this.stepEaseValue(f, e, d, e1, e2);
};
}
};
Object.prototype.motionHolder = function (r) {
if (r > 0) {
if (this.MKData eq undefined) {
this.MKData = {};
}
return(this.MKData);
}
if (this.MKHold eq undefined) {
this.createEmptyMovieClip("MKHold", 0);
}
return(this.MKHold);
};
Object.prototype.onPropStop = function (p, f, pr) {
var _local3 = this.motionHolder(0);
var _local2 = this.motionHolder(1);
_local3[p add "ease"].onStop = (_local2[p add "ease"].onStop = function () {
f.apply(this.propTarget, pr);
});
};
Object.prototype.halt = function (p) {
if (p eq undefined) {
removeMovieClip(this.MKHold);
if (this.MKData ne undefined) {
for (process in this.MKData) {
if (this.MKData[process].intervalId ne undefined) {
clearInterval(this.MKData[process].intervalId);
}
delete this.MKData;
}
}
} else {
clearInterval(this.MKData[p add "ease"].intervalId);
removeMovieClip(this.MKHold[p add "ease"]);
}
};
Object.prototype.offSetProp = function (p, z) {
this.recordHomeProps();
this[p] = this[p] + z;
};
Object.prototype.recordHomeProps = function () {
var _local2 = propList.length;
while (_local2--) {
this[propList[_local2] add "home"] = this[propList[_local2]];
}
};
Object.prototype.offSet = function (t, pad, z) {
var _local2;
var _local6;
if (pad eq undefined) {
pad = 0;
}
this.recordHomeProps();
(((t eq "up") or (t eq "down")) ? (_local6 = "_y") : (_local6 = "_x"));
if (z ne undefined) {
(((t eq "up") or (t eq "left")) ? (_local2 = z * -1) : (_local2 = z));
} else {
var _local4 = this.getBounds(this._parent);
if (t eq "up") {
_local2 = (_local4.yMax + pad) * -1;
} else if (t eq "down") {
_local2 = (Stage.height - _local4.yMin) + pad;
} else if (t eq "left") {
_local2 = (_local4.xMax + pad) * -1;
} else {
_local2 = (Stage.width - _local4.xMin) + pad;
}
}
this.offSetProp(_local6, _local2);
};
Object.prototype.easeOff = function (t, pad, e, d, r, e1, e2) {
var _local2;
var _local5 = 0;
var _local7 = 0;
this.recordHomeProps();
var _local3 = this.getBounds(this._parent);
if (t eq "up") {
_local2 = (_local3.yMax + pad) * -1;
} else if (t eq "down") {
_local2 = (Stage.height - _local3.yMin) + pad;
} else if (t eq "left") {
_local2 = (_local3.xMax + pad) * -1;
} else {
_local2 = (Stage.width - _local3.xMin) + pad;
}
(((t eq "up") or (t eq "down")) ? (_local7 = _local2) : (_local5 = _local2));
this.easePull(_local5, _local7, e, d, r, e1, e2);
};
Object.prototype.easeToHome = function (e, d, r, e1, e2) {
this.easeTo(this._xhome, this._yhome, e, d, r, e1, e2);
};
Object.prototype.startChain = function (chain) {
this.MKChain = chain;
this.MKChainIndex = 0;
this.ADSVal = this.autoDeleteStop;
this.autoDeleteStop = true;
this.MKChainStop = this.onStop;
this.stepChain(0);
};
Object.prototype.stepChain = function (z) {
if (this.MKChain[z] ne undefined) {
this.MKChainIndex++;
obj = this.MKChain[z];
if (obj[0].length ne undefined) {
var _local2 = 0;
while (_local2 < obj.length) {
if (_local2 eq (obj.length - 1)) {
this.onStop = function () {
this.stepChain(this.MKChainIndex);
};
}
obj[_local2][0].apply(this, obj[_local2][1]);
_local2++;
}
} else {
this.onStop = function () {
this.stepChain(this.MKChainIndex);
};
obj[0].apply(this, obj[1]);
}
} else {
delete this.MKChain;
this.autoDeleteStop = this.ADSVal;
this.MKChainStop();
if (!(((MKGlobals.MKautoDeleteStop eq true) and (this.autoDeleteStop ne false)) or (this.autoDeleteStop eq true))) {
this.onStop = this.MKChainStop;
}
}
};
Object.prototype.linearTween = function (t, b, c, d) {
return(((c * t) / d) + b);
};
Object.prototype.easeinquad = function (t, b, c, d) {
return((((c * t) * t) / (d * d)) + b);
};
Object.prototype.easeoutquad = function (t, b, c, d) {
return((((((-c) * t) * t) / (d * d)) + (((2 * c) * t) / d)) + b);
};
Object.prototype.easeinoutquad = function (t, b, c, d) {
if (t < (d / 2)) {
return(((((2 * c) * t) * t) / (d * d)) + b);
}
var _local2 = t - (d / 2);
return(((((((-2 * c) * _local2) * _local2) / (d * d)) + (((2 * c) * _local2) / d)) + (c / 2)) + b);
};
Object.prototype.easeinexpo = function (t, b, c, d) {
return(((t == 0) ? (b) : ((c * Math.pow(2, 10 * ((t / d) - 1))) + b)));
};
Object.prototype.easeoutexpo = function (t, b, c, d) {
trace("HIT");
return(((t == d) ? (b + c) : ((c * ((-Math.pow(2, (-10 * t) / d)) + 1)) + b)));
};
Object.prototype.easeinoutexpo = function (t, b, c, d) {
if (t == 0) {
return(b);
}
if (t == d) {
return(b + c);
}
t = t / (d / 2);
if (t < 1) {
return(((c / 2) * Math.pow(2, 10 * (t - 1))) + b);
}
t--;
return(((c / 2) * ((-Math.pow(2, -10 * t)) + 2)) + b);
};
Object.prototype.easeinsine = function (t, b, c, d) {
return((((-c) * Math.cos(((t / d) * Math.PI) / 2)) + c) + b);
};
Object.prototype.easeoutsine = function (t, b, c, d) {
return((c * Math.sin(((t / d) * Math.PI) / 2)) + b);
};
Object.prototype.easeinoutsine = function (t, b, c, d) {
return((((-c) / 2) * (Math.cos((Math.PI * t) / d) - 1)) + b);
};
Object.prototype.easeincirc = function (t, b, c, d) {
return(((-c) * (Math.sqrt(1 - ((t * t) / (d * d))) - 1)) + b);
};
Object.prototype.easeoutcirc = function (t, b, c, d) {
return((c * Math.sqrt(1 - (((t - d) * (t - d)) / (d * d)))) + b);
};
Object.prototype.easeinoutcirc = function (t, b, c, d) {
if (t < (d / 2)) {
return((((-c) / 2) * (Math.sqrt(1 - (((4 * t) * t) / (d * d))) - 1)) + b);
}
return(((c / 2) * (Math.sqrt(1 - (((4 * (t - d)) * (t - d)) / (d * d))) + 1)) + b);
};
Object.prototype.easeincubic = function (t, b, c, d) {
t = t / d;
return((((c * t) * t) * t) + b);
};
Object.prototype.easeoutcubic = function (t, b, c, d) {
t = (t / d) - 1;
return((c * (((t * t) * t) + 1)) + b);
};
Object.prototype.easeinoutcubic = function (t, b, c, d) {
t = t / (d / 2);
if (t < 1) {
return(((((c / 2) * t) * t) * t) + b);
}
t = t - 2;
return(((c / 2) * (((t * t) * t) + 2)) + b);
};
Object.prototype.easeinquart = function (t, b, c, d) {
t = t / d;
return(((((c * t) * t) * t) * t) + b);
};
Object.prototype.easeoutquart = function (t, b, c, d) {
t = (t / d) - 1;
return(((-c) * ((((t * t) * t) * t) - 1)) + b);
};
Object.prototype.easeinoutquart = function (t, b, c, d) {
t = t / (d / 2);
if (t < 1) {
return((((((c / 2) * t) * t) * t) * t) + b);
}
t = t - 2;
return((((-c) / 2) * ((((t * t) * t) * t) - 2)) + b);
};
Object.prototype.easeinquint = function (t, b, c, d) {
t = t / d;
return((((((c * t) * t) * t) * t) * t) + b);
};
Object.prototype.easeoutquint = function (t, b, c, d) {
t = (t / d) - 1;
return((c * (((((t * t) * t) * t) * t) + 1)) + b);
};
Object.prototype.easeinoutquint = function (t, b, c, d) {
t = t / (d / 2);
if (t < 1) {
return(((((((c / 2) * t) * t) * t) * t) * t) + b);
}
t = t - 2;
return(((c / 2) * (((((t * t) * t) * t) * t) + 2)) + b);
};
Object.prototype.easeinelastic = function (t, b, c, d, a, p) {
if (t == 0) {
return(b);
}
t = t / d;
if (t == 1) {
return(b + c);
}
if (!p) {
p = d * 0.3;
}
if (a < Math.abs(c)) {
a = c;
var _local7 = p / 4;
} else {
var _local7 = (p / (Math.PI*2)) * Math.asin(c / a);
}
t = t - 1;
return((-((a * Math.pow(2, 10 * t)) * Math.sin((((t * d) - _local7) * (Math.PI*2)) / p))) + b);
};
Object.prototype.easeoutelastic = function (t, b, c, d, a, p) {
if (t == 0) {
return(b);
}
t = t / d;
if (t == 1) {
return(b + c);
}
if (!p) {
p = d * 0.3;
}
if (a < Math.abs(c)) {
a = c;
var _local7 = p / 4;
} else {
var _local7 = (p / (Math.PI*2)) * Math.asin(c / a);
}
return((((a * Math.pow(2, -10 * t)) * Math.sin((((t * d) - _local7) * (Math.PI*2)) / p)) + c) + b);
};
Object.prototype.easeinoutelastic = function (t, b, c, d, a, p) {
if (t == 0) {
return(b);
}
t = t / (d / 2);
if (t == 2) {
return(b + c);
}
if (!p) {
p = d * 0.45;
}
if (a < Math.abs(c)) {
a = c;
var _local7 = p / 4;
} else {
var _local7 = (p / (Math.PI*2)) * Math.asin(c / a);
}
if (t < 1) {
t = t - 1;
return((-0.5 * ((a * Math.pow(2, 10 * t)) * Math.sin((((t * d) - _local7) * (Math.PI*2)) / p))) + b);
}
t = t - 1;
return(((((a * Math.pow(2, -10 * t)) * Math.sin((((t * d) - _local7) * (Math.PI*2)) / p)) * 0.5) + c) + b);
};
MovieClip.prototype.easeinsnap = function (t, b, c, d, s) {
s = Number(s);
if (s == 0) {
s = 1.70158;
}
t = t / d;
return((((c * t) * t) * (((s + 1) * t) - s)) + b);
};
Object.prototype.easeoutsnap = function (t, b, c, d, s) {
s = Number(s);
if (s == 0) {
s = 1.70158;
}
t = (t / d) - 1;
return((c * (((t * t) * (((s + 1) * t) + s)) + 1)) + b);
};
Object.prototype.easeinoutsnap = function (t, b, c, d, s) {
s = Number(s);
if (s == 0) {
s = 1.70158;
}
t = t / (d / 2);
if (t < 1) {
s = s * 1.525;
return(((c / 2) * ((t * t) * (((s + 1) * t) - s))) + b);
}
t = t - 2;
s = s * 1.525;
return(((c / 2) * (((t * t) * (((s + 1) * t) + s)) + 2)) + b);
};
Object.prototype.easeinbounce = function (t, b, c, d) {
return((c - easeoutbounce(d - t, 0, c, d)) + b);
};
Object.prototype.easeoutbounce = function (t, b, c, d) {
t = t / d;
if (t < 0.363636363636364) {
return((c * ((7.5625 * t) * t)) + b);
}
if (t < 0.727272727272727) {
t = t - 0.545454545454545;
return((c * (((7.5625 * t) * t) + 0.75)) + b);
}
if (t < 0.909090909090909) {
t = t - 0.818181818181818;
return((c * (((7.5625 * t) * t) + 0.9375)) + b);
}
t = t - 0.954545454545455;
return((c * (((7.5625 * t) * t) + 0.984375)) + b);
};
Object.prototype.easeinoutbounce = function (t, b, c, d) {
if (t < (d / 2)) {
return((easeinbounce(t * 2, 0, c, d) * 0.5) + b);
}
return(((easeoutbounce((t * 2) - d, 0, c, d) * 0.5) + (c * 0.5)) + b);
};
#endinitclip
_global.MKGlobals = {};
MKGlobals.MKpixelSnap = MKpixelSnap;
MKGlobals.MKautoDeleteStop = MKautoDeleteStop;
MKGlobals.MKallowInterupt = MKallowInterupt;
MKGlobals.MKdRate = MKdRate;
MKGlobals.MKdFrames = MKdFrames;
MKGlobals.MKdEase = MKdEase;