Frame 1
Mouse.hide();
var mouseListener = new Object();
mouseListener.onMouseDown = function () {
_root.gotoAndStop("main");
};
mouseListener.onMouseMove = function () {
introCursor._x = _root._xmouse - 10;
introCursor._y = _root._ymouse - 10;
};
Mouse.addListener(mouseListener);
soundtrack = new Sound();
soundtrack.setVolume(100);
soundtrack.attachSound("bgLoop");
soundtrack.start(0, 9999999999);
stop();
Frame 2
function init() {
_root.cursor.swapDepths(99999);
initMouseListener();
this.createEmptyMovieClip("stageMC", 20);
_root.stageManager = new StageManager(this.stageMC);
}
function initMouseListener() {
Mouse.hide();
var _local2 = new Object();
_local2.onMouseDown = function () {
_root.mouseIsDown = true;
if (!_root.scoreManager.gameIsOver) {
_root.stageManager.throwBall(_root._xmouse + 16, _root._ymouse + 16);
}
};
_local2.onMouseUp = function () {
_root.mouseIsDown = false;
_root.stageManager.stopRapidFire();
trace("THROW");
};
_local2.onMouseMove = function () {
_root.cursor._x = _root._xmouse - 16;
_root.cursor._y = _root._ymouse - 16;
};
Mouse.addListener(_local2);
}
if (_global.$tweenManager == undefined) {
_global.$tweenManager = new zigo.tweenManager();
} else {
_global.$tweenManager.cleanUp();
_global.$tweenManager.init();
}
com.robertpenner.easing.Back;
com.robertpenner.easing.Bounce;
com.robertpenner.easing.Circ;
com.robertpenner.easing.Cubic;
com.robertpenner.easing.Elastic;
com.robertpenner.easing.Expo;
com.robertpenner.easing.Linear;
com.robertpenner.easing.Quad;
com.robertpenner.easing.Quart;
com.robertpenner.easing.Quint;
com.robertpenner.easing.Sine;
var Mp = MovieClip.prototype;
Mp.addListener = function () {
if (!this._listeners) {
AsBroadcaster.initialize(this);
}
this.addListener.apply(this, arguments);
};
ASSetPropFlags(Mp, "addListener", 1, 0);
Mp.tween = function (props, pEnd, seconds, animType, delay, callback, extra1, extra2) {
if (_global.$tweenManager.isTweenLocked(this)) {
trace("tween not added, this movieclip is locked");
return(undefined);
}
if (arguments.length < 2) {
trace("tween not added, props & pEnd must be defined");
return(undefined);
}
if (typeof(props) == "string") {
if (props.indexOf(",") > -1) {
props = props.split(" ").join("").split(",");
} else {
props = [props];
}
}
if (!(pEnd instanceof Array)) {
pEnd = [pEnd];
while (pEnd.length < props.length) {
pEnd.push(pEnd[0]);
}
}
if (seconds == undefined) {
seconds = 2;
} else if (seconds < 0.01) {
seconds = 0;
}
if ((delay < 0.01) || (delay == undefined)) {
delay = 0;
}
switch (typeof(animType)) {
case "string" :
animType = animType.toLowerCase();
if (animType == "linear") {
var eqf = com.robertpenner.easing.Linear.easeNone;
} else if (animType.indexOf("easeoutin") == 0) {
var t = animType.substr(9);
t = t.charAt(0).toUpperCase() + t.substr(1);
var eqf = com.robertpenner.easing[t].easeOutIn;
} else if (animType.indexOf("easeinout") == 0) {
var t = animType.substr(9);
t = t.charAt(0).toUpperCase() + t.substr(1);
var eqf = com.robertpenner.easing[t].easeInOut;
} else if (animType.indexOf("easein") == 0) {
var t = animType.substr(6);
t = t.charAt(0).toUpperCase() + t.substr(1);
var eqf = com.robertpenner.easing[t].easeIn;
} else if (animType.indexOf("easeout") == 0) {
var t = animType.substr(7);
t = t.charAt(0).toUpperCase() + t.substr(1);
var eqf = com.robertpenner.easing[t].easeOut;
}
if (eqf == undefined) {
var eqf = com.robertpenner.easing.Expo.easeOut;
}
break;
case "function" :
var eqf = animType;
break;
case "object" :
if ((animType.ease != undefined) && (animType.pts != undefined)) {
var eqf = animType.ease;
extra1 = animType.pts;
} else {
var eqf = com.robertpenner.easing.Expo.easeOut;
}
break;
default :
var eqf = com.robertpenner.easing.Expo.easeOut;
}
switch (typeof(callback)) {
case "function" :
callback = {func:callback, scope:this._parent};
break;
case "string" :
var ilp;
var funcp;
var scope;
var args;
var a;
ilp = callback.indexOf("(");
funcp = callback.slice(0, ilp);
scope = eval (funcp.slice(0, funcp.lastIndexOf(".")));
func = eval (funcp);
args = callback.slice(ilp + 1, callback.lastIndexOf(")")).split(",");
var i = 0;
while (i < args.length) {
a = eval (args[i]);
if (a != undefined) {
args[i] = a;
}
i++;
}
callback = {func:func, scope:scope, args:args};
}
if (_global.$tweenManager.autoStop) {
_global.$tweenManager.removeTween(this);
}
if (delay > 0) {
_global.$tweenManager.addTweenWithDelay(delay, this, props, pEnd, seconds, eqf, callback, extra1, extra2);
} else {
_global.$tweenManager.addTween(this, props, pEnd, seconds, eqf, callback, extra1, extra2);
}
};
Mp.stopTween = function (props) {
if (typeof(props) == "string") {
if (props.indexOf(",") > -1) {
props = props.split(" ").join("").split(",");
} else {
props = [props];
}
}
_global.$tweenManager.removeTween(this, props);
};
Mp.isTweening = function (prop) {
return(_global.$tweenManager.isTweening(this, prop));
};
Mp.getTweens = function () {
return(_global.$tweenManager.getTweens(this));
};
Mp.lockTween = function () {
_global.$tweenManager.lockTween(this, true);
};
Mp.unlockTween = function () {
_global.$tweenManager.lockTween(this, false);
};
Mp.isTweenLocked = function () {
return(_global.$tweenManager.isTweenLocked(this));
};
Mp.isTweenPaused = function (prop) {
return(_global.$tweenManager.isTweenPaused(this, prop));
};
Mp.pauseTween = function (props) {
var _local4;
if (props != undefined) {
if (typeof(props) == "string") {
if (props.indexOf(",") > -1) {
props = props.split(" ").join("").split(",");
} else {
props = [props];
}
}
_local4 = {};
for (var _local5 in props) {
_local4[props[_local5]] = true;
}
}
_global.$tweenManager.pauseTween(this, _local4);
};
Mp.unpauseTween = function (props) {
var _local4;
if (props != undefined) {
if (typeof(props) == "string") {
if (props.indexOf(",") > -1) {
props = props.split(" ").join("").split(",");
} else {
props = [props];
}
}
_local4 = {};
for (var _local5 in props) {
_local4[props[_local5]] = true;
}
}
_global.$tweenManager.unpauseTween(this, _local4);
};
Mp.pauseAllTweens = function () {
_global.$tweenManager.pauseTween();
};
Mp.unpauseAllTweens = function () {
_global.$tweenManager.unpauseTween();
};
Mp.stopAllTweens = function () {
_global.$tweenManager.stopAll();
};
Mp.ffTween = function (props) {
var _local4;
if (props != undefined) {
if (typeof(props) == "string") {
if (props.indexOf(",") > -1) {
props = props.split(" ").join("").split(",");
} else {
props = [props];
}
}
_local4 = {};
for (var _local5 in props) {
_local4[props[_local5]] = true;
}
}
_global.$tweenManager.ffTween(this, _local4);
};
Mp.rewTween = function (props) {
var _local4;
if (props != undefined) {
if (typeof(props) == "string") {
if (props.indexOf(",") > -1) {
props = props.split(" ").join("").split(",");
} else {
props = [props];
}
}
_local4 = {};
for (var _local5 in props) {
_local4[props[_local5]] = true;
}
}
_global.$tweenManager.rewTween(this, _local4);
};
Mp.alphaTo = function (destAlpha, seconds, animType, delay, callback, extra1, extra2) {
this.tween(["_alpha"], [destAlpha], seconds, animType, delay, callback, extra1, extra2);
};
Mp.scaleTo = function (destScale, seconds, animType, delay, callback, extra1, extra2) {
this.tween(["_xscale", "_yscale"], [destScale, destScale], seconds, animType, delay, callback, extra1, extra2);
};
Mp.sizeTo = function (destSize, seconds, animType, delay, callback, extra1, extra2) {
this.tween(["_width", "_height"], [destSize, destSize], seconds, animType, delay, callback, extra1, extra2);
};
Mp.slideTo = function (destX, destY, seconds, animType, delay, callback, extra1, extra2) {
this.tween(["_x", "_y"], [destX, destY], seconds, animType, delay, callback, extra1, extra2);
};
Mp.rotateTo = function (destRotation, seconds, animType, delay, callback, extra1, extra2) {
this.tween(["_rotation"], [destRotation], seconds, animType, delay, callback, extra1, extra2);
};
_global.getColorTransObj = function (type, amt, rgb) {
switch (type) {
case "brightness" :
var _local4 = 100 - Math.abs(amt);
var _local6 = 0;
if (amt > 0) {
_local6 = 256 * (amt / 100);
}
return({ra:_local4, rb:_local6, ga:_local4, gb:_local6, ba:_local4, bb:_local6});
case "brightOffset" :
_local6 = 256 * (amt / 100);
return({ra:100, rb:_local6, ga:100, gb:_local6, ba:100, bb:_local6});
case "contrast" :
var _local2 = {};
_local2.ra = (_local2.ga = (_local2.ba = amt));
_local2.rb = (_local2.gb = (_local2.bb = 128 - (1.28 * amt)));
return(_local2);
case "invertColor" :
_local2 = {};
_local2.ra = (_local2.ga = (_local2.ba = 100 - (2 * amt)));
_local2.rb = (_local2.gb = (_local2.bb = amt * 2.55));
return(_local2);
case "tint" :
if ((rgb == undefined) || (rgb == null)) {
} else {
var _local8 = rgb >> 16;
var _local9 = (rgb >> 8) & 255;
var _local7 = rgb & 255;
var _local5 = amt / 100;
_local2 = {rb:_local8 * _local5, gb:_local9 * _local5, bb:_local7 * _local5};
_local2.ra = (_local2.ga = (_local2.ba = 100 - amt));
return(_local2);
}
}
return({rb:0, ra:100, gb:0, ga:100, bb:0, ba:100});
};
Mp.brightnessTo = function (bright, seconds, animType, delay, callback, extra1, extra2) {
this.tween(["_ct_"], [getColorTransObj("brightness", bright)], seconds, animType, delay, callback, extra1, extra2);
};
Mp.brightOffsetTo = function (percent, seconds, animType, delay, callback, extra1, extra2) {
this.tween(["_ct_"], [getColorTransObj("brightOffset", percent)], seconds, animType, delay, callback, extra1, extra2);
};
Mp.contrastTo = function (percent, seconds, animType, delay, callback, extra1, extra2) {
this.tween(["_ct_"], [getColorTransObj("contrast", percent)], seconds, animType, delay, callback, extra1, extra2);
};
Mp.colorTo = function (rgb, seconds, animType, delay, callback, extra1, extra2) {
this.tween(["_ct_"], [getColorTransObj("tint", 100, rgb)], seconds, animType, delay, callback, extra1, extra2);
};
Mp.colorTransformTo = function (ra, rb, ga, gb, ba, bb, aa, ab, seconds, animType, delay, callback, extra1, extra2) {
var _local2 = {ra:ra, rb:rb, ga:ga, gb:gb, ba:ba, bb:bb, aa:aa, ab:ab};
this.tween(["_ct_"], [_local2], seconds, animType, delay, callback, extra1, extra2);
};
Mp.invertColorTo = function (percent, seconds, animType, delay, callback, extra1, extra2) {
this.tween(["_ct_"], [getColorTransObj("invertColor", percent)], seconds, animType, delay, callback, extra1, extra2);
};
Mp.tintTo = function (rgb, percent, seconds, animType, delay, callback, extra1, extra2) {
this.tween(["_ct_"], [getColorTransObj("tint", percent, rgb)], seconds, animType, delay, callback, extra1, extra2);
};
Mp.getFrame = function () {
return(this._currentframe);
};
Mp.setFrame = function (fr) {
this.gotoAndStop(Math.round(fr));
};
Mp.addProperty("_frame", Mp.getFrame, Mp.setFrame);
Mp.frameTo = function (endframe, duration, animType, delay, callback, extra1, extra2) {
if (endframe == undefined) {
endframe = this._totalframes;
}
this.tween("_frame", endframe, duration, animType, delay, callback, extra1, extra2);
};
var TFP = TextField.prototype;
if (!TFP.origAddListener) {
TFP.origAddListener = TFP.addListener;
ASSetPropFlags(TFP, "origAddListener", 1, 0);
TFP.addListener = function () {
if (!this._listeners) {
AsBroadcaster.initialize(this);
}
this.origAddListener.apply(this, arguments);
};
}
var $_$methods = ["tween", "stopTween", "isTweening", "getTweens", "lockTween", "isTweenLocked", "unlockTween", "isTweenPaused", "pauseTween", "unpauseTween", "pauseAllTweens", "unpauseAllTweens", "stopAllTweens", "ffTween", "rewTween", "getFrame", "setFrame", "_frame", "frameTo", "alphaTo", "brightnessTo", "colorTo", "colorTransformTo", "invertColorTo", "tintTo", "scaleTo", "sizeTo", "slideTo", "rotateTo", "brightOffsetTo", "contrastTo"];
for (var $_$i in $_$methods) {
ASSetPropFlags(Mp, $_$methods[$_$i], 1, 0);
if ($_$methods[$_$i].toLowerCase().indexOf("frame") == -1) {
TFP[$_$methods[$_$i]] = Mp[$_$methods[$_$i]];
ASSetPropFlags(TFP, $_$methods[$_$i], 1, 0);
}
}
delete Mp;
delete TFP;
delete $_$methods;
delete $_$i;
init();
Symbol 21 MovieClip [playAgain_mc] Frame 1
stop();
Symbol 21 MovieClip [playAgain_mc] Frame 2
stop();
Symbol 121 MovieClip [squirrel_mc] Frame 69
stop();
Symbol 154 MovieClip [upperLeftTarget_mc] Frame 19
_root.dispatcher.upperleftThrow();
Symbol 154 MovieClip [upperLeftTarget_mc] Frame 28
stop();
Symbol 154 MovieClip [upperLeftTarget_mc] Frame 33
stop();
Symbol 157 MovieClip [squirrelHit_mc] Frame 10
stop();
Symbol 161 MovieClip [throwUL_mc] Frame 7
_root.stageManager.hit();
stop();
Symbol 221 MovieClip [character_mc] Frame 1
this._x = this._x - 24;
_root.character.checkStep(this._x);
Symbol 221 MovieClip [character_mc] Frame 3
this._x = this._x - 24;
_root.character.checkStep(this._x);
Symbol 221 MovieClip [character_mc] Frame 5
this._x = this._x - 20;
_root.character.checkStep(this._x);
Symbol 221 MovieClip [character_mc] Frame 7
this._x = this._x - 10;
_root.character.checkStep(this._x);
Symbol 221 MovieClip [character_mc] Frame 9
this._x = this._x - 42;
_root.character.checkStep(this._x);
Symbol 221 MovieClip [character_mc] Frame 11
this._x = this._x - 20;
_root.character.checkStep(this._x);
Symbol 221 MovieClip [character_mc] Frame 12
gotoAndPlay ("runLeft");
Symbol 221 MovieClip [character_mc] Frame 23
_root.character.throwBall();
Symbol 221 MovieClip [character_mc] Frame 32
stop();
_root.character.checkStep();
Symbol 221 MovieClip [character_mc] Frame 33
this._x = this._x + 20;
_root.character.checkStep(this._x);
Symbol 221 MovieClip [character_mc] Frame 35
this._x = this._x + 10;
_root.character.checkStep(this._x);
Symbol 221 MovieClip [character_mc] Frame 37
this._x = this._x + 42;
_root.character.checkStep(this._x);
Symbol 221 MovieClip [character_mc] Frame 39
this._x = this._x + 20;
_root.character.checkStep(this._x);
Symbol 221 MovieClip [character_mc] Frame 41
this._x = this._x + 24;
_root.character.checkStep(this._x);
Symbol 221 MovieClip [character_mc] Frame 43
this._x = this._x + 24;
_root.character.checkStep(this._x);
Symbol 221 MovieClip [character_mc] Frame 44
gotoAndPlay ("runRight");
Symbol 221 MovieClip [character_mc] Frame 58
_root.character.serveBall();
Symbol 221 MovieClip [character_mc] Frame 62
stop();
_root.character.checkStep();
Symbol 232 MovieClip [throwCenter_mc] Frame 11
_root.stageManager.hit();
stop();
Symbol 294 MovieClip [characterToNet_mc] Frame 29
_root.characterToNet.randomThrow();
stop();
Symbol 294 MovieClip [characterToNet_mc] Frame 50
_root.characterToNet.throwBall();
Symbol 294 MovieClip [characterToNet_mc] Frame 65
_root.characterToNet.randomThrow();
stop();
Symbol 294 MovieClip [characterToNet_mc] Frame 72
stop();
Symbol 347 MovieClip [runUpToNetLeft_mc] Frame 42
_root.characterToNet.throwBall();
Symbol 347 MovieClip [runUpToNetLeft_mc] Frame 57
_root.characterToNet.randomThrow();
stop();
Symbol 347 MovieClip [runUpToNetLeft_mc] Frame 64
stop();
Symbol 365 MovieClip Frame 3
this._parent._parent._x = this._parent._parent.pathArray[1][0];
this._parent._parent._y = this._parent._parent.pathArray[1][1];
Symbol 365 MovieClip Frame 5
this._parent._parent._x = this._parent._parent.pathArray[2][0];
this._parent._parent._y = this._parent._parent.pathArray[2][1];
Symbol 365 MovieClip Frame 7
this._parent._parent._x = this._parent._parent.pathArray[3][0];
this._parent._parent._y = this._parent._parent.pathArray[3][1];
Symbol 365 MovieClip Frame 9
this._parent._parent._x = this._parent._parent.pathArray[4][0];
this._parent._parent._y = this._parent._parent.pathArray[4][1];
Symbol 365 MovieClip Frame 11
_root.dispatcher.checkHit(this._parent._parent.pathArray[7][0], this._parent._parent.pathArray[7][1]);
this._parent._parent._x = this._parent._parent.pathArray[5][0];
this._parent._parent._y = this._parent._parent.pathArray[5][1];
Symbol 365 MovieClip Frame 13
this._parent._parent._x = this._parent._parent.pathArray[6][0];
this._parent._parent._y = this._parent._parent.pathArray[6][1];
Symbol 365 MovieClip Frame 15
this._parent._parent.removeMovieClip();
stop();
Symbol 376 MovieClip [introCursor_mc] Frame 1
stop();
Symbol 376 MovieClip [introCursor_mc] Frame 2
stop();
Symbol 411 MovieClip [__Packages.com.robertpenner.easing.Quad] Frame 0
class com.robertpenner.easing.Quad
{
function Quad () {
}
static function easeIn(t, b, c, d) {
t = t / d;
return(((c * t) * t) + b);
}
static function easeOut(t, b, c, d) {
t = t / d;
return((((-c) * t) * (t - 2)) + b);
}
static function easeInOut(t, b, c, d) {
t = t / (d / 2);
if (t < 1) {
return((((c / 2) * t) * t) + b);
}
t--;
return((((-c) / 2) * ((t * (t - 2)) - 1)) + b);
}
static function easeOutIn(t, b, c, d) {
t = t / (d / 2);
if (t < 1) {
t--;
return((((-c) / 2) * ((t * t) - 1)) + b);
}
t--;
return(((c / 2) * ((t * t) + 1)) + b);
}
}
Symbol 412 MovieClip [__Packages.com.robertpenner.easing.Circ] Frame 0
class com.robertpenner.easing.Circ
{
function Circ () {
}
static function easeIn(t, b, c, d) {
t = t / d;
return(((-c) * (Math.sqrt(1 - (t * t)) - 1)) + b);
}
static function easeOut(t, b, c, d) {
t = (t / d) - 1;
return((c * Math.sqrt(1 - (t * t))) + b);
}
static function easeInOut(t, b, c, d) {
t = t / (d / 2);
if (t < 1) {
return((((-c) / 2) * (Math.sqrt(1 - (t * t)) - 1)) + b);
}
t = t - 2;
return(((c / 2) * (Math.sqrt(1 - (t * t)) + 1)) + b);
}
static function easeOutIn(t, b, c, d) {
t = t / (d / 2);
if (t < 1) {
t--;
return(((c / 2) * Math.sqrt(1 - (t * t))) + b);
}
t--;
return(((c / 2) * (2 - Math.sqrt(1 - (t * t)))) + b);
}
}
Symbol 413 MovieClip [__Packages.com.robertpenner.easing.Quart] Frame 0
class com.robertpenner.easing.Quart
{
function Quart () {
}
static function easeIn(t, b, c, d) {
t = t / d;
return(((((c * t) * t) * t) * t) + b);
}
static function easeOut(t, b, c, d) {
t = (t / d) - 1;
return(((-c) * ((((t * t) * t) * t) - 1)) + b);
}
static function easeInOut(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);
}
static function easeOutIn(t, b, c, d) {
t = t / (d / 2);
if (t < 1) {
t--;
return((((-c) / 2) * ((((t * t) * t) * t) - 1)) + b);
}
t--;
return(((c / 2) * ((((t * t) * t) * t) + 1)) + b);
}
}
Symbol 414 MovieClip [__Packages.com.robertpenner.easing.Sine] Frame 0
class com.robertpenner.easing.Sine
{
function Sine () {
}
static function easeIn(t, b, c, d) {
return((((-c) * Math.cos((t / d) * (Math.PI/2))) + c) + b);
}
static function easeOut(t, b, c, d) {
return((c * Math.sin((t / d) * (Math.PI/2))) + b);
}
static function easeInOut(t, b, c, d) {
return((((-c) / 2) * (Math.cos((Math.PI * t) / d) - 1)) + b);
}
static function easeOutIn(t, b, c, d) {
t = t / (d / 2);
if (t < 1) {
return(((c / 2) * Math.sin((Math.PI * t) / 2)) + b);
}
t--;
return((((-c) / 2) * (Math.cos((Math.PI * t) / 2) - 2)) + b);
}
}
Symbol 415 MovieClip [__Packages.com.robertpenner.easing.Back] Frame 0
class com.robertpenner.easing.Back
{
function Back () {
}
static function easeIn(t, b, c, d, s) {
if (s == undefined) {
s = 1.70158;
}
t = t / d;
return((((c * t) * t) * (((s + 1) * t) - s)) + b);
}
static function easeOut(t, b, c, d, s) {
if (s == undefined) {
s = 1.70158;
}
t = (t / d) - 1;
return((c * (((t * t) * (((s + 1) * t) + s)) + 1)) + b);
}
static function easeInOut(t, b, c, d, s) {
if (s == undefined) {
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);
}
static function easeOutIn(t, b, c, d, s) {
if (s == undefined) {
s = 1.70158;
}
t = t / (d / 2);
if (t < 1) {
t--;
s = s * 1.525;
return(((c / 2) * (((t * t) * (((s + 1) * t) + s)) + 1)) + b);
}
t--;
s = s * 1.525;
return(((c / 2) * (((t * t) * (((s + 1) * t) - s)) + 1)) + b);
}
}
Symbol 416 MovieClip [__Packages.com.robertpenner.easing.Quint] Frame 0
class com.robertpenner.easing.Quint
{
function Quint () {
}
static function easeIn(t, b, c, d) {
t = t / d;
return((((((c * t) * t) * t) * t) * t) + b);
}
static function easeOut(t, b, c, d) {
t = (t / d) - 1;
return((c * (((((t * t) * t) * t) * t) + 1)) + b);
}
static function easeInOut(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);
}
static function easeOutIn(t, b, c, d) {
t = t / (d / 2);
t--;
return(((c / 2) * (((((t * t) * t) * t) * t) + 1)) + b);
}
}
Symbol 417 MovieClip [__Packages.com.robertpenner.easing.Linear] Frame 0
class com.robertpenner.easing.Linear
{
function Linear () {
}
static function easeNone(t, b, c, d) {
return(((c * t) / d) + b);
}
static function easeIn(t, b, c, d) {
return(((c * t) / d) + b);
}
static function easeOut(t, b, c, d) {
return(((c * t) / d) + b);
}
static function easeInOut(t, b, c, d) {
return(((c * t) / d) + b);
}
static function easeOutIn(t, b, c, d) {
return(((c * t) / d) + b);
}
}
Symbol 418 MovieClip [__Packages.com.robertpenner.easing.Expo] Frame 0
class com.robertpenner.easing.Expo
{
function Expo () {
}
static function easeIn(t, b, c, d) {
return(((t == 0) ? (b) : ((c * Math.pow(2, 10 * ((t / d) - 1))) + b)));
}
static function easeOut(t, b, c, d) {
return(((t == d) ? (b + c) : ((c * ((-Math.pow(2, (-10 * t) / d)) + 1)) + b)));
}
static function easeInOut(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);
}
static function easeOutIn(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);
}
return(((c / 2) * (Math.pow(2, 10 * (t - 2)) + 1)) + b);
}
}
Symbol 419 MovieClip [__Packages.com.robertpenner.easing.Elastic] Frame 0
class com.robertpenner.easing.Elastic
{
function Elastic () {
}
static function easeIn(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) || (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);
}
static function easeOut(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) || (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);
}
static function easeInOut(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) || (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);
}
static function easeOutIn(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) || (a < Math.abs(c))) {
a = c;
var _local7 = p / 4;
} else {
var _local7 = (p / (Math.PI*2)) * Math.asin(c / a);
}
if (t < 1) {
return(((0.5 * ((a * Math.pow(2, -10 * t)) * Math.sin((((t * d) - _local7) * (Math.PI*2)) / p))) + (c / 2)) + b);
}
return(((c / 2) + (0.5 * ((a * Math.pow(2, 10 * (t - 2))) * Math.sin((((t * d) - _local7) * (Math.PI*2)) / p)))) + b);
}
}
Symbol 420 MovieClip [__Packages.StageManager] Frame 0
class StageManager
{
static var thisClass;
var targetMC, scoreMC, ballMC, ballArray, rapidFireMC, rapidFireInterval;
function StageManager (tMC) {
targetMC = tMC;
thisClass = this;
init();
}
function init() {
initMovieClips();
initArrays();
initScoreManger();
_root.fence.swapDepths(29);
initDispatcher();
}
function initScoreManger() {
scoreMC = targetMC.createEmptyMovieClip("scoreMC", 40);
_root.scoreManager = new ScoreManager(scoreMC);
}
function initDispatcher() {
_root.dispatcher = new Dispatcher(targetMC);
}
function initMovieClips() {
ballMC = _root.createEmptyMovieClip("ballMC", 20000);
}
function initArrays() {
ballArray = new Array();
initLives();
}
function initLives() {
var _local2 = 0;
while (_local2 < lives) {
var _local3 = targetMC.attachMovie("heart_mc", "heart" + _local2, _local2 + 99999);
_local3._x = (50 * _local2) + 10;
_local3._y = 440;
_local2++;
}
lives--;
}
function hit() {
if (!_root.scoreManager.gameIsOver) {
trace("I GOT HIT");
if (lives > 0) {
eval ((targetMC + ".heart") + lives).removeMovieClip();
lives--;
} else {
_root.dispatcher.stopTimer();
eval ((targetMC + ".heart") + lives).removeMovieClip();
_root.scoreManager.displayHighScore();
}
}
}
function throwBall(xEnd, yEnd) {
trace("throwing ball");
if (thisClass.rapidFireRemaining > 0) {
ballArray.push(new Ball(ballMC, _root._xmouse, _root._ymouse));
thisClass.rapidFire();
thisClass.rapidFireRemaining--;
_root.scoreManager.displayRapidFireNumbers(thisClass.rapidFireRemaining);
trace("REMAINING - " + thisClass.rapidFireRemaining);
} else {
_root.scoreManager.displayRapidFireNumbers();
rapidFireMC.removeMovieClip();
ballArray.push(new Ball(ballMC, _root._xmouse, _root._ymouse));
stopRapidFire();
}
}
function rapidFire(xEnd, yEnd) {
rapidFireInterval = setTimeout(thisClass, "throwBall", 140, _root._xmouse + 16, _root._ymouse + 16);
}
function stopRapidFire() {
clearTimeout(thisClass.rapidFireInterval);
}
function initRapidFire() {
rapidFireMC = targetMC.attachMovie("rapidFire_mc", "rapidFireMC", 39);
rapidFireMC._x = 10;
rapidFireMC._y = 360;
rapidFireRemaining = 50;
_root.scoreManager.displayRapidFireNumbers(thisClass.rapidFireRemaining);
}
function destroy() {
rapidFireMC.removeMovieClip();
}
var rapidFireRemaining = 0;
var lives = 12;
}
Symbol 421 MovieClip [__Packages.ScoreManager] Frame 0
class ScoreManager
{
static var thisClass;
var targetMC, levelArray, numberArray, totalScore, scoreCounterMC, timeBonusTime, timeBonusMC, timeBonusNumbersMC, nextLevelMC, highScoreMC, rapidFireNumbersMC;
function ScoreManager (tMC) {
thisClass = this;
targetMC = tMC;
init();
}
function init() {
trace("SCORE " + targetMC);
initNumberArray();
setTotalScore(100);
playSound();
}
function initNumberArray() {
levelArray = new Array(20, 70, 160, 300, 500, 900, 1200, 1800);
numberArray = new Array("num_0", "num_1", "num_2", "num_3", "num_4", "num_5", "num_6", "num_7", "num_8", "num_9");
}
function playSound() {
var _local1 = new Sound();
_local1.setVolume(80);
_local1.attachSound("letsRock_snd");
_local1.start();
}
function setTotalScore(num) {
totalScore = num;
displayScore();
}
function setCurrentScore(num) {
if (!gameIsOver) {
currentScore = currentScore + num;
displayScore();
if (currentScore >= totalScore) {
nextLevel();
}
}
}
function displayScore() {
trace((("SET SCORE " + currentScore) + " / ") + totalScore);
scoreCounterMC = targetMC.createEmptyMovieClip("scoreCounterMC", 0);
scoreCounterMC._x = 142;
scoreCounterMC._y = 6;
var _local6 = currentScore.toString();
var _local4 = _local6.split("");
var _local2 = 0;
while (_local2 < _local4.length) {
var _local3 = scoreCounterMC.createEmptyMovieClip(_local2, _local2);
var _local5 = scoreCounterMC._width;
_local3.attachMovie(numberArray[_local4[_local2]], _local2, _local2);
_local3._x = _local5;
trace((((("new clip " + numberArray[_local4[_local2]]) + " i = ") + _local2) + " newMC = ") + _local3);
_local2++;
}
}
function nextLevel() {
trace("NEXT LEVEL");
_root.timer.stopTimer();
timeBonusTime = _root.timer.getRemaining();
trace("TIME BONUS TIME = " + timeBonusTime);
if (timeBonusTime > 100) {
timeBonusTime = timeBonusTime - 100;
_root.timer.setValue(100);
}
initTimeBonus();
timeBonus();
}
function initTimeBonus() {
timeBonusMC = targetMC.attachMovie("timeBonus_mc", "timeBonusMC", 2345, {_x:200, _y:144});
}
function timeBonus() {
trace("timebonustime = " + timeBonusTime);
if (timeBonusTime > 0) {
_root.timer.increaseValue(2);
timeBonusTime = timeBonusTime - 2;
var _local3 = setTimeout(this, "timeBonus", 50);
displayTimeBonus();
} else {
trace("done");
timeBonusMC._visible = false;
timeBonusNumbersMC._visible = false;
currentLevel++;
displayNextLevel();
}
}
function displayNextLevel() {
nextLevelMC = targetMC.attachMovie("nextLevel_mc", "nextLevelMC", 2345, {_x:200, _y:144});
timeBonusNumbersMC = targetMC.createEmptyMovieClip("timeBonusNumbersMC", 699);
timeBonusNumbersMC._x = 420;
timeBonusNumbersMC._y = 144;
var _local6 = levelArray[currentLevel].toString();
var _local4 = _local6.split("");
var _local2 = 0;
while (_local2 < _local4.length) {
var _local3 = timeBonusNumbersMC.createEmptyMovieClip(_local2, _local2);
var _local5 = timeBonusNumbersMC._width;
_local3.attachMovie(numberArray[_local4[_local2]], _local2, _local2);
_local3._x = _local5;
trace((((("new clip " + numberArray[_local4[_local2]]) + " i = ") + _local2) + " newMC = ") + _local3);
_local2++;
}
setTotalScore(levelArray[currentLevel]);
var _local7 = setTimeout(thisClass, "beginLevel", 1000);
}
function beginLevel() {
nextLevelMC._visible = false;
timeBonusNumbersMC._visible = false;
_root.timer.startTimer();
}
function displayHighScore() {
targetMC.attachMovie("gameOver_mc", "gameOverMC", 2345, {_x:232, _y:144});
highScoreMC = targetMC.createEmptyMovieClip("highScoreMC", 599);
targetMC.attachMovie("highScore_mc", "highScoreMC", 2346, {_x:204, _y:182});
targetMC.attachMovie("playAgain_mc", "playAgainMC", 2347, {_x:222, _y:226});
Mouse.show();
targetMC.playAgainMC.onRollOver = function () {
this.gotoAndStop(2);
};
targetMC.playAgainMC.onRollOut = (targetMC.playAgainMC.onDragOut = function () {
this.gotoAndStop(1);
});
targetMC.playAgainMC.onRelease = function () {
ScoreManager.thisClass.destroy();
_root.reset();
Mouse.hide();
_root.cursor._visible = true;
};
var _local7 = new Sound();
_root.cursor._visible = false;
_local7.setVolume(80);
_local7.attachSound("gameOver_snd");
_local7.start();
highScoreMC._x = 414;
highScoreMC._y = 182;
gameIsOver = true;
var _local8 = currentScore.toString();
var _local5 = _local8.split("");
var _local3 = 0;
while (_local3 < _local5.length) {
var _local4 = highScoreMC.createEmptyMovieClip(_local3, _local3);
var _local6 = highScoreMC._width;
_local4.attachMovie(numberArray[_local5[_local3]], _local3, _local3);
_local4._x = _local6;
trace((((("new clip " + numberArray[_local5[_local3]]) + " i = ") + _local3) + " newMC = ") + _local4);
_local3++;
}
}
function displayTimeBonus() {
timeBonusNumbersMC = targetMC.createEmptyMovieClip("timeBonusNumbersMC", 699);
timeBonusNumbersMC._x = 420;
timeBonusNumbersMC._y = 144;
var _local6 = timeBonusTime.toString();
var _local4 = _local6.split("");
var _local2 = 0;
while (_local2 < _local4.length) {
var _local3 = timeBonusNumbersMC.createEmptyMovieClip(_local2, _local2);
var _local5 = timeBonusNumbersMC._width;
_local3.attachMovie(numberArray[_local4[_local2]], _local2, _local2);
_local3._x = _local5;
trace((((("new clip " + numberArray[_local4[_local2]]) + " i = ") + _local2) + " newMC = ") + _local3);
_local2++;
}
}
function displayRapidFireNumbers(num) {
rapidFireNumbersMC = targetMC.createEmptyMovieClip("private var ", 765);
rapidFireNumbersMC._x = 22;
rapidFireNumbersMC._y = 378;
var _local6 = num.toString();
var _local4 = _local6.split("");
var _local2 = 0;
while (_local2 < _local4.length) {
var _local3 = rapidFireNumbersMC.createEmptyMovieClip(_local2, _local2);
var _local5 = rapidFireNumbersMC._width;
_local3.attachMovie(numberArray[_local4[_local2]], _local2, _local2);
_local3._x = _local5;
trace((((("new clip " + numberArray[_local4[_local2]]) + " i = ") + _local2) + " newMC = ") + _local3);
_local2++;
}
}
function destroy() {
targetMC.highScoreMC.removeMovieClip();
targetMC.gameOverMC.removeMovieClip();
targetMC.playAgainMC.removeMovieClip();
_root.stageManager = new StageManager(_root.stageMC);
}
var currentScore = 0;
var currentLevel = 0;
var gameIsOver = false;
}
Symbol 422 MovieClip [__Packages.Dispatcher] Frame 0
class Dispatcher
{
static var thisClass;
var targetMC, hitSoundsArray, rndSoundsArray, tmeOutSQ, tmeOutUL, squirrelMC, upperLeftTargetMC, characterMC, characterToNetMC;
function Dispatcher (tMC) {
thisClass = this;
targetMC = tMC;
init();
}
function init() {
initSquirrelTimer();
initUpperLeftTimer();
initCharacterTimer();
initCharacterToNetTimer();
initSounds();
initRandomSoundTimer();
}
function initSounds() {
hitSoundsArray = new Array("hey_snd", "oh_snd", "oh_snd", "ahh_snd", "ow_snd", "ow_snd", "damIt_snd", "oww_snd", "damnIt_snd", "stopThat_snd");
rndSoundsArray = new Array("pardon_snd", "getaway_snd", "getThem_snd", "thisCoolest_snd");
}
function stopTimer() {
clearTimeout(tmeOutSQ);
clearTimeout(tmeOutUL);
}
function initRandomSoundTimer() {
var _local1 = (Math.random() * 15000) + 4000;
var _local2 = setTimeout(thisClass, "randomSound", _local1);
}
function initSquirrelTimer() {
var _local2 = (Math.random() * 10000) + 4000;
tmeOutSQ = setTimeout(thisClass, "initSquirrel", _local2);
}
function initCharacterTimer() {
var _local1 = (Math.random() * 6000) + 1000;
var _local2 = setTimeout(thisClass, "initCharacter", _local1);
}
function initCharacterToNetTimer() {
var _local1 = (Math.random() * 9000) + 4000;
var _local2 = setTimeout(thisClass, "initCharacterToNet", _local1);
}
function initSquirrel() {
trace("INIT SQ");
if (!_root.scoreManager.gameIsOver) {
squirrelMC.isHit = false;
squirrelMC = targetMC.attachMovie("squirrel_mc", "squirrelMC", 122);
squirrelMC._x = 174;
squirrelMC._y = 112;
initSquirrelTimer();
}
}
function initUpperLeftTimer() {
var _local2 = (Math.random() * 8000) + 4000;
tmeOutUL = setTimeout(thisClass, "initUpperLeftTarget", _local2);
}
function initUpperLeftTarget() {
trace("INIT SQ");
upperLeftTargetMC = _root.attachMovie("upperLeftTarget_mc", "upperLeftTargetMC", 919);
upperLeftTargetMC._x = 55;
upperLeftTargetMC._y = 49;
initUpperLeftTimer();
}
function upperleftThrow() {
var _local2 = targetMC.attachMovie("throwUL_mc", "upperLeftThrowMC", 930);
_local2._x = 57;
_local2._y = 124;
}
function initCharacter() {
if (!_root.scoreManager.gameIsOver) {
characterMC = targetMC.createEmptyMovieClip("characterMC", 90);
_root.character = new Character(characterMC);
}
}
function initCharacterToNet() {
if (!_root.scoreManager.gameIsOver) {
trace("initCharacterToNet");
characterToNetMC = targetMC.createEmptyMovieClip("characterToNetMC", 91);
characterToNetMC.isHit = false;
_root.characterToNet = new CharacterToNet(characterToNetMC);
}
}
function checkHit(xpos, ypos) {
if (squirrelMC.targetArea.hitTest(xpos, ypos, false)) {
trace("HIT SQUIRREL");
if (!squirrelMC.isHit) {
squirrelMC._visible = false;
squirrelMC.isHit = true;
targetMC.attachMovie("squirrelHit_mc", "squirrelHitMC", 124);
targetMC.squirrelHitMC._x = xpos - 22;
targetMC.squirrelHitMC._y = 117;
_root.stageManager.initRapidFire();
var _local6 = random(hitSoundsArray.length);
var _local4 = new Sound();
_local4.setVolume(80);
_local4.attachSound("doThatAgain_snd");
_local4.start();
}
} else if (upperLeftTargetMC.hitTest(xpos, ypos, true)) {
if (upperLeftTargetMC._visible != false) {
upperLeftTargetMC.stop();
hitTargetSound();
upperLeftTargetMC.gotoAndPlay("hit");
_root.scoreManager.setCurrentScore(1);
}
} else if (characterMC.hitTest(xpos, ypos, true)) {
trace("HIT MAN");
characterMC.stop();
characterMC.removeMovieClip();
hitTargetSound();
_root.scoreManager.setCurrentScore(1);
initCharacterTimer();
} else if (characterToNetMC.hitTest(xpos, ypos, true)) {
trace("HIT NET");
if (!characterToNetMC.isHit) {
characterToNetMC.isHit = true;
characterToNetMC.stop();
hitTargetSound();
characterToNetMC.characterMC.gotoAndPlay("hit");
_root.scoreManager.setCurrentScore(1);
initCharacterToNetTimer();
}
}
}
function randomSound() {
if (!_root.scoreManager.gameIsOver) {
var _local5 = random(rndSoundsArray.length);
var _local3 = new Sound();
_local3.setVolume(80);
_local3.attachSound(rndSoundsArray[_local5]);
_local3.start();
var _local4 = (_local3.duration + (Math.random() * 12000)) + 5000;
var _local6 = setTimeout(thisClass, "randomSound", _local4);
}
}
function hitTargetSound() {
var _local3 = random(hitSoundsArray.length);
var _local2 = new Sound();
_local2.setVolume(80);
_local2.attachSound(hitSoundsArray[_local3]);
_local2.start();
}
}
Symbol 423 MovieClip [__Packages.Character] Frame 0
class Character
{
var targetMC, actionArray, characterMC;
function Character (tMC) {
targetMC = tMC;
initActions();
}
function init() {
initActions();
}
function initActions() {
var _local2 = random(2);
trace("RND = " + _local2);
actionArray = new Array();
if (_local2 == 0) {
actionArray.push(["start", 600]);
actionArray.push(["runLeft", 300]);
actionArray.push(["throw", 0]);
actionArray.push(["runLeft", 200]);
actionArray.push(["throw", 0]);
actionArray.push(["runRight", 700]);
actionArray.push(["stop", 0]);
currentStep = 0;
} else if (_local2 == 1) {
actionArray.push(["start", -20]);
actionArray.push(["runRight", 300]);
actionArray.push(["throw", 0]);
actionArray.push(["runLeft", 200]);
actionArray.push(["throw", 0]);
actionArray.push(["runLeft", -20]);
actionArray.push(["stop", 0]);
currentStep = 0;
} else if (_local2 == 2) {
actionArray.push(["start", 600]);
actionArray.push(["runLeft", 400]);
actionArray.push(["serve", 0]);
actionArray.push(["runLeft", 200]);
actionArray.push(["serve", 0]);
actionArray.push(["runLeft", -20]);
actionArray.push(["stop", 0]);
}
animate();
}
function animate() {
var _local3 = actionArray[currentStep][0];
var _local4 = actionArray[currentStep][1];
if (_local3 == "start") {
characterMC = targetMC.attachMovie("character_mc", "characterMC", 1);
characterMC._x = _local4;
characterMC._y = 180;
currentStep++;
animate();
} else if (_local3 == "runLeft") {
characterMC.gotoAndPlay("runLeft");
} else if (_local3 == "throw") {
characterMC.gotoAndPlay("throw");
} else if (_local3 == "serve") {
characterMC.gotoAndPlay("serve");
} else if (_local3 == "runRight") {
characterMC.gotoAndPlay("runRight");
} else if (_local3 == "stop") {
_root.dispatcher.initCharacterTimer();
}
}
function checkStep(xpos) {
var _local2 = actionArray[currentStep][0];
var _local3 = actionArray[currentStep][1];
if (_local2 == "runLeft") {
if (xpos <= _local3) {
characterMC.stop();
currentStep++;
animate();
}
} else if (_local2 == "runRight") {
if (xpos >= _local3) {
characterMC.stop();
currentStep++;
animate();
}
} else if (_local2 == "throw") {
currentStep++;
animate();
}
}
function throwBall() {
var _local3 = _root.attachMovie("throwCenter_mc", "upperCenterMC", 99897);
_local3._x = characterMC._x;
_local3._y = characterMC._y + 40;
}
function serveBall() {
var _local2 = characterMC.attachMovie("throwCenter_mc", "upperCenterMC", 2);
_local2._x = 20;
_local2._y = 20;
}
var currentStep = 0;
}
Symbol 424 MovieClip [__Packages.CharacterToNet] Frame 0
class CharacterToNet
{
var targetMC, characterMC;
function CharacterToNet (tMC) {
targetMC = tMC;
init();
}
function init() {
var _local2 = Math.round(Math.random());
if (_local2 == 1) {
characterMC = targetMC.attachMovie("characterToNet_mc", "characterMC", 0);
characterMC._x = 382;
characterMC._y = 200;
} else {
characterMC = targetMC.attachMovie("runUpToNetLeft_mc", "characterMC", 0);
characterMC._x = 133;
characterMC._y = 197;
}
}
function randomThrow() {
if (!_root.scoreManager.gameIsOver) {
var _local4 = Math.round(Math.random() * 200) + 200;
var _local3 = Math.random() * 6000;
characterMC._x = _local4;
var _local5 = setTimeout(this, "popUp", _local3);
}
}
function popUp() {
characterMC.gotoAndPlay("throw");
}
function throwBall() {
if (!_root.scoreManager.gameIsOver) {
var _local3 = _root.attachMovie("throwCenter_mc", "upperCenterMC", 91897);
_local3._y = characterMC._y + 60;
_local3._x = characterMC._x;
}
}
function destroy() {
characterMC.removeMovieClip();
}
var currentStep = 0;
}
Symbol 425 MovieClip [__Packages.Ball] Frame 0
class Ball
{
var targetMC, xEnd, yEnd, ballMC, pathArray;
function Ball (tMC, xE, yE) {
targetMC = tMC;
xEnd = xE;
yEnd = yE;
init();
}
function init() {
var _local2 = targetMC.getNextHighestDepth();
playSound();
ballMC = targetMC.createEmptyMovieClip("ball" + _local2, _local2);
ballMC._x = xStart;
ballMC._y = yStart;
ballMC.attachMovie("ball_mc", "ballMC", 0);
ballMC.pos = _local2;
initPathArray();
calculatePath();
}
function initPathArray() {
pathArray = new Array();
}
function playSound() {
var _local1 = new Sound();
_local1.setVolume(80);
_local1.attachSound("canon");
_local1.start();
}
function calculatePath() {
var _local3 = 0.5;
var _local7 = xStart - xEnd;
var _local6 = yStart - yEnd;
trace("xDist = " + _local7);
trace("yDist = " + _local6);
var _local5 = xStart;
var _local4 = yStart;
var _local2 = 0;
while (_local2 < 7) {
_local5 = _local5 - (_local7 * _local3);
_local4 = _local4 - (_local6 * _local3);
trace((("xpos" + _local2) + " = ") + _local5);
trace((("ypos" + _local2) + " = ") + _local4);
_local7 = _local7 * _local3;
_local6 = _local6 * _local3;
pathArray[_local2] = new Array(_local5, _local4 - 120);
_local2++;
}
pathArray[7] = new Array(xEnd, yEnd);
ballMC.pathArray = pathArray;
}
var xStart = 240;
var yStart = 360;
}
Symbol 426 MovieClip [__Packages.com.robertpenner.easing.Bounce] Frame 0
class com.robertpenner.easing.Bounce
{
function Bounce () {
}
static function easeOut(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);
}
static function easeIn(t, b, c, d) {
return((c - easeOut(d - t, 0, c, d)) + b);
}
static function easeInOut(t, b, c, d) {
if (t < (d / 2)) {
return((easeIn(t * 2, 0, c, d) * 0.5) + b);
}
return(((easeOut((t * 2) - d, 0, c, d) * 0.5) + (c * 0.5)) + b);
}
static function easeOutIn(t, b, c, d) {
if (t < (d / 2)) {
return((easeOut(t * 2, 0, c, d) * 0.5) + b);
}
return(((easeIn((t * 2) - d, 0, c, d) * 0.5) + (c * 0.5)) + b);
}
}
Symbol 427 MovieClip [__Packages.zigo.tweenManager] Frame 0
class zigo.tweenManager
{
var playing, autoStop, broadcastEvents, autoOverwrite, ints, lockedTweens, tweenList, updateTime, tweenHolder, updateIntId, now;
function tweenManager () {
playing = false;
autoStop = false;
broadcastEvents = false;
autoOverwrite = true;
ints = new Array();
lockedTweens = new Object();
tweenList = new Array();
}
function cleanUp() {
if (!((tweenList instanceof Array) && (tweenList.length > 0))) {
return(undefined);
}
for (var _local2 in tweenList) {
if (tweenList[_local2].mc._x == undefined) {
tweenList.splice(Number(_local2), 1);
}
}
if (tweenList.length == 0) {
tweenList = [];
deinit();
}
for (var _local2 in ints) {
if ((ints[_local2] != undefined) && (ints[_local2].mc._x == undefined)) {
removeDelayedTween(Number(_local2));
}
}
}
function set updateInterval(time) {
if (playing) {
deinit();
updateTime = time;
init();
} else {
updateTime = time;
}
//return(updateInterval);
}
function get updateInterval() {
return(updateTime);
}
function set controllerDepth(v) {
if (_global.isNaN(v) == true) {
return;
}
if (tweenHolder._name != undefined) {
tweenHolder.swapDepths(v);
} else {
_th_depth = v;
}
//return(controllerDepth);
}
function get controllerDepth() {
return(_th_depth);
}
function init() {
if (updateTime > 0) {
clearInterval(updateIntId);
updateIntId = setInterval(this, "update", updateTime);
} else {
if (tweenHolder._name == undefined) {
tweenHolder = _root.createEmptyMovieClip("_th_", _th_depth);
}
var tm = this;
tweenHolder.onEnterFrame = function () {
tm.update.call(tm);
};
}
playing = true;
now = getTimer();
}
function deinit() {
playing = false;
clearInterval(updateIntId);
delete tweenHolder.onEnterFrame;
}
function update() {
var _local2;
var _local10;
var _local3;
var _local13 = false;
_local10 = tweenList.length;
if (broadcastEvents) {
var _local4;
var _local7;
var _local5;
var _local9;
_local4 = {};
_local7 = {};
_local5 = {};
_local9 = {};
}
while (_local10--) {
_local2 = tweenList[_local10];
if (_local2.mc._x == undefined) {
_local13 = true;
continue;
}
if (_local2.pt != -1) {
continue;
}
if ((_local2.ts + _local2.d) > now) {
if (_local2.ctm == undefined) {
_local2.mc[_local2.pp] = _local2.ef(now - _local2.ts, _local2.ps, _local2.ch, _local2.d, _local2.e1, _local2.e2);
} else {
var _local8 = {};
for (_local3 in _local2.ctm) {
_local8[_local3] = _local2.ef(now - _local2.ts, _local2.stm[_local3], _local2.ctm[_local3], _local2.d, _local2.e1, _local2.e2);
}
_local2.c.setTransform(_local8);
}
if (broadcastEvents) {
if (_local4[targetPath(_local2.mc)] == undefined) {
_local4[targetPath(_local2.mc)] = _local2.mc;
}
if (_local5[targetPath(_local2.mc)] == undefined) {
_local5[targetPath(_local2.mc)] = [];
}
_local5[targetPath(_local2.mc)].push(((_local2.ctm != undefined) ? "_ct_" : (_local2.pp)));
}
if (_local2.cb.updfunc != undefined) {
var _local6 = _local2.cb.updfunc;
if ((typeof(_local6) == "string") && (_local2.cb.updscope != undefined)) {
_local6 = _local2.cb.updscope[_local6];
}
_local6.apply(_local2.cb.updscope, _local2.cb.updargs);
}
} else {
if (_local2.ctm == undefined) {
_local2.mc[_local2.pp] = _local2.ps + _local2.ch;
} else {
var _local8 = {};
for (_local3 in _local2.ctm) {
_local8[_local3] = _local2.stm[_local3] + _local2.ctm[_local3];
}
_local2.c.setTransform(_local8);
}
if (broadcastEvents) {
if (_local4[targetPath(_local2.mc)] == undefined) {
_local4[targetPath(_local2.mc)] = _local2.mc;
}
if (_local7[targetPath(_local2.mc)] == undefined) {
_local7[targetPath(_local2.mc)] = _local2.mc;
}
if (_local5[targetPath(_local2.mc)] == undefined) {
_local5[targetPath(_local2.mc)] = [];
}
_local5[targetPath(_local2.mc)].push(((_local2.ctm != undefined) ? "_ct_" : (_local2.pp)));
if (_local9[targetPath(_local2.mc)] == undefined) {
_local9[targetPath(_local2.mc)] = [];
}
_local9[targetPath(_local2.mc)].push(((_local2.ctm != undefined) ? "_ct_" : (_local2.pp)));
}
if (_local2.cb.updfunc != undefined) {
var _local6 = _local2.cb.updfunc;
if ((typeof(_local6) == "string") && (_local2.cb.updscope != undefined)) {
_local6 = _local2.cb.updscope[_local6];
}
_local6.updfunc.apply(_local2.cb.updscope, _local2.cb.updargs);
}
if (endt == undefined) {
var endt = new Array();
}
endt.push(_local10);
}
}
if (_local13) {
cleanUp();
}
for (_local3 in _local4) {
_local4[_local3].broadcastMessage("onTweenUpdate", {target:_local4[_local3], props:_local5[_local3]});
}
if (endt != undefined) {
endTweens(endt);
}
for (_local3 in _local7) {
_local7[_local3].broadcastMessage("onTweenEnd", {target:_local7[_local3], props:_local9[_local3]});
}
now = getTimer();
if (updateTime > 0) {
updateAfterEvent();
}
}
function endTweens(tid_arr) {
var _local2;
var _local9;
var _local3;
var _local5;
var _local8;
_local2 = [];
_local9 = tid_arr.length;
_local3 = 0;
while (_local3 < _local9) {
_local5 = tweenList[tid_arr[_local3]].cb;
if (_local5 != undefined) {
var _local6 = true;
for (_local8 in _local2) {
if (_local2[_local8] == _local5) {
_local6 = false;
break;
}
}
if (_local6) {
_local2.push(_local5);
}
}
tweenList.splice(tid_arr[_local3], 1);
_local3++;
}
_local3 = 0;
while (_local3 < _local2.length) {
var _local4 = _local2[_local3].func;
if ((typeof(_local4) == "string") && (_local2[_local3].scope != undefined)) {
_local4 = _local2[_local3].scope[_local4];
}
_local4.apply(_local2[_local3].scope, _local2[_local3].args);
_local3++;
}
if (tweenList.length == 0) {
deinit();
}
}
function removeDelayedTween(index) {
clearInterval(ints[index].intid);
ints[index] = undefined;
var _local2 = true;
for (var _local3 in ints) {
if (ints[_local3] != undefined) {
_local2 = false;
break;
}
}
if (_local2) {
ints = [];
}
}
function addTween(mc, props, pEnd, sec, eqFunc, callback, extra1, extra2) {
var _local4;
var _local13;
var _local6;
var _local3;
var _local2;
if (!playing) {
init();
}
var _local12 = [];
for (_local4 in props) {
_local13 = props[_local4];
_local6 = true;
if (_local13.substr(0, 4) != "_ct_") {
var _local17 = ((typeof(pEnd[_local4]) == "string") ? (Number(pEnd[_local4])) : (pEnd[_local4] - mc[_local13]));
if (autoOverwrite) {
for (_local3 in tweenList) {
_local2 = tweenList[_local3];
if ((_local2.mc == mc) && (_local2.pp == _local13)) {
_local2.ps = mc[_local13];
_local2.ch = _local17;
_local2.ts = now;
_local2.d = sec * 1000;
_local2.ef = eqFunc;
_local2.cb = callback;
_local2.e1 = extra1;
_local2.e2 = extra2;
_local2.pt = -1;
_local6 = false;
_local12.push(_local2.pp);
break;
}
}
}
if (_local6) {
tweenList.unshift({mc:mc, pp:_local13, ps:mc[_local13], ch:_local17, ts:now, d:sec * 1000, ef:eqFunc, cb:callback, e1:extra1, e2:extra2, pt:-1});
}
} else {
var _local16 = new Color(mc);
var _local20 = _local16.getTransform();
var _local19 = {};
for (_local3 in pEnd[_local4]) {
if ((pEnd[_local4][_local3] != _local20[_local3]) && (pEnd[_local4][_local3] != undefined)) {
_local19[_local3] = ((typeof(pEnd[_local4][_local3]) == "string") ? (_local20[_local3] + Number(pEnd[_local4][_local3])) : (pEnd[_local4][_local3] - _local20[_local3]));
}
}
if (autoOverwrite) {
for (_local3 in tweenList) {
_local2 = tweenList[_local3];
if ((_local2.mc == mc) && (_local2.ctm != undefined)) {
_local2.c = _local16;
_local2.stm = _local20;
(_local2.ctm = _local19);
(_local2.ts = now);
_local2.d = sec * 1000;
_local2.ef = eqFunc;
_local2.cb = callback;
_local2.e1 = extra1;
_local2.e2 = extra2;
_local2.pt = -1;
_local6 = false;
_local12.push("_ct_");
break;
}
}
}
if (_local6) {
tweenList.unshift({mc:mc, c:_local16, stm:_local20, ctm:_local19, ts:now, d:sec * 1000, ef:eqFunc, cb:callback, e1:extra1, e2:extra2, pt:-1});
}
}
}
if (broadcastEvents) {
if (_local12.length > 0) {
mc.broadcastMessage("onTweenInterrupt", {target:mc, props:_local12});
}
mc.broadcastMessage("onTweenStart", {target:mc, props:props});
}
if (callback.startfunc != undefined) {
var _local27 = callback.startfunc;
if ((typeof(_local27) == "string") && (callback.startscope != undefined)) {
_local27 = callback.startscope[_local27];
}
_local27.apply(callback.startscope, callback.startargs);
}
if (sec == 0) {
update();
}
}
function addTweenWithDelay(delay, mc, props, pEnd, sec, eqFunc, callback, extra1, extra2) {
var il;
var _local3;
il = ints.length;
_local3 = setInterval(function (obj) {
obj.removeDelayedTween(il);
if (mc._x != undefined) {
obj.addTween(mc, props, pEnd, sec, eqFunc, callback, extra1, extra2);
}
}, delay * 1000, this);
ints[il] = {mc:mc, props:props, pend:pEnd, intid:_local3, st:getTimer(), delay:delay * 1000, args:arguments.slice(1), pt:-1};
if (!playing) {
init();
}
}
function removeTween(mc, props) {
var _local8;
var _local2;
var _local5;
_local8 = false;
if ((props == undefined) && (broadcastEvents != true)) {
_local8 = true;
}
_local2 = tweenList.length;
var _local4 = {};
while (_local2--) {
if (tweenList[_local2].mc == mc) {
if (_local8) {
tweenList.splice(_local2, 1);
} else {
for (_local5 in props) {
if (tweenList[_local2].pp == props[_local5]) {
tweenList.splice(_local2, 1);
if (_local4[targetPath(mc)] == undefined) {
_local4[targetPath(mc)] = {t:mc, p:[]};
}
_local4[targetPath(mc)].p.push(props[_local5]);
} else if (((props[_local5] == "_ct_") && (tweenList[_local2].ctm != undefined)) && (tweenList[_local2].mc == mc)) {
tweenList.splice(_local2, 1);
if (_local4[targetPath(mc)] == undefined) {
_local4[targetPath(mc)] = {t:mc, p:[]};
}
_local4[targetPath(mc)].p.push("_ct_");
}
}
}
}
}
_local2 = ints.length;
while (_local2--) {
if (ints[_local2].mc == mc) {
if (_local8) {
removeDelayedTween(Number(_local2));
} else {
for (_local5 in props) {
for (var _local11 in ints[_local2].props) {
if (ints[_local2].props[_local11] == props[_local5]) {
ints[_local2].props.splice(_local11, 1);
ints[_local2].pend.splice(_local11, 1);
if (_local4[targetPath(mc)] == undefined) {
_local4[targetPath(mc)] = {t:mc, p:[]};
}
_local4[targetPath(mc)].p.push(props[_local5]);
}
}
if (ints[_local2].props.length == 0) {
clearInterval(ints[_local2].intid);
}
}
}
}
}
if (broadcastEvents) {
for (var _local11 in _local4) {
if (_local4[_local11].p.length > 0) {
_local4[_local11].t.broadcastMessage("onTweenInterrupt", {target:_local4[_local11].t, props:_local4[_local11].p});
}
}
}
if (tweenList.length == 0) {
deinit();
}
}
function isTweening(mc, prop) {
var _local4 = prop == undefined;
for (var _local6 in tweenList) {
var _local2 = tweenList[_local6];
if (((tweenList[_local6].mc == mc) && (tweenList[_local6].pt == -1)) && ((_local4 || (prop == _local2.pp)) || ((prop == "_ct_") && (_local2.ctm != undefined)))) {
return(true);
}
}
return(false);
}
function getTweens(mc) {
var _local2 = 0;
for (var _local4 in tweenList) {
if (tweenList[_local4].mc == mc) {
_local2++;
}
}
return(_local2);
}
function lockTween(mc, bool) {
lockedTweens[targetPath(mc)] = bool;
}
function isTweenLocked(mc) {
if (lockedTweens[targetPath(mc)] == undefined) {
return(false);
}
return(lockedTweens[targetPath(mc)]);
}
function ffTween(mc, propsObj) {
var _local4 = mc == undefined;
var _local6 = propsObj == undefined;
for (var _local8 in tweenList) {
var _local2 = tweenList[_local8];
if (((_local2.mc == mc) || (_local4)) && (_local6 || (propsObj[_local2.pp] == true))) {
if (_local2.pt != -1) {
_local2.pt = -1;
}
_local2.ts = now - _local2.d;
}
}
for (var _local8 in ints) {
if (ints[_local8] != undefined) {
if ((ints[_local8].mc == mc) || (_local4)) {
if (ints[_local8].mc._x != undefined) {
var _local3 = ints[_local8].args;
_local3[3] = 0;
addTween.apply(this, _local3);
}
removeDelayedTween(Number(_local8));
}
}
}
update();
}
function rewTween(mc, propsObj) {
var _local3 = mc == undefined;
var _local5 = propsObj == undefined;
for (var _local7 in tweenList) {
var _local2 = tweenList[_local7];
if (((_local2.mc == mc) || (_local3)) && (_local5 || (propsObj[_local2.pp] == true))) {
if (_local2.pt != -1) {
_local2.pt = -1;
}
_local2.ts = now;
}
}
for (var _local7 in ints) {
if (ints[_local7] != undefined) {
if ((ints[_local7].mc == mc) || (_local3)) {
if (ints[_local7].mc._x != undefined) {
addTween.apply(this, ints[_local7].args);
}
removeDelayedTween(Number(_local7));
}
}
}
update();
}
function isTweenPaused(mc, prop) {
if (mc == undefined) {
return(null);
}
var _local5 = prop == undefined;
for (var _local6 in tweenList) {
var _local2 = tweenList[_local6];
if ((tweenList[_local6].mc == mc) && ((_local5 || (prop == _local2.pp)) || ((prop == "_ct_") && (_local2.ctm != undefined)))) {
return(Boolean(tweenList[_local6].pt != -1));
}
}
for (var _local6 in ints) {
if ((ints[_local6] != undefined) && (ints[_local6].mc == mc)) {
return(Boolean(ints[_local6].pt != -1));
}
}
return(false);
}
function pauseTween(mc, propsObj) {
var _local3 = mc == undefined;
if ((_local3 == false) && (isTweenPaused(mc) == true)) {
return(undefined);
}
var _local6 = propsObj == undefined;
for (var _local7 in tweenList) {
var _local2 = tweenList[_local7];
if (((_local2.pt == -1) && ((_local2.mc == mc) || (_local3))) && ((_local6 || (propsObj[_local2.pp] == true)) || ((propsObj._ct_ != undefined) && (_local2.ctm != undefined)))) {
_local2.pt = now;
}
}
for (var _local7 in ints) {
if (ints[_local7] != undefined) {
if ((ints[_local7].pt == -1) && ((ints[_local7].mc == mc) || (_local3))) {
ints[_local7].pt = now;
}
}
}
}
function unpauseTween(mc, propsObj) {
var _local4 = mc == undefined;
if ((_local4 == false) && (isTweenPaused(mc) === false)) {
return(undefined);
}
var _local7 = propsObj == undefined;
if (!playing) {
init();
}
for (var _local2 in tweenList) {
var _local3 = tweenList[_local2];
if ((((_local3.pt != -1) && ((_local3.mc == mc) || (_local4))) && (_local7 || (propsObj[_local3.pp] == true))) || ((propsObj._ct_ != undefined) && (_local3.ctm != undefined))) {
_local3.ts = now - (_local3.pt - _local3.ts);
_local3.pt = -1;
}
}
for (var _local2 in ints) {
if (ints[_local2] != undefined) {
if ((ints[_local2].pt != -1) && ((ints[_local2].mc == mc) || (_local4))) {
ints[_local2].delay = ints[_local2].delay - (ints[_local2].pt - ints[_local2].st);
ints[_local2].st = now;
ints[_local2].intid = setInterval(function (obj, id) {
obj.addTween.apply(obj, obj.ints[id].args);
clearInterval(obj.ints[id].intid);
obj.ints[id] = undefined;
}, ints[_local2].delay, this, _local2);
}
}
}
}
function pauseAll() {
pauseTween();
}
function unpauseAll() {
unpauseTween();
}
function stopAll() {
for (var _local2 in ints) {
removeDelayedTween(Number(_local2));
}
tweenList = new Array();
deinit();
}
function toString() {
return("[AS2 tweenManager 1.2.0]");
}
var _th_depth = 6789;
}
Symbol 428 MovieClip [__Packages.com.robertpenner.easing.Cubic] Frame 0
class com.robertpenner.easing.Cubic
{
function Cubic () {
}
static function easeIn(t, b, c, d) {
t = t / d;
return((((c * t) * t) * t) + b);
}
static function easeOut(t, b, c, d) {
t = (t / d) - 1;
return((c * (((t * t) * t) + 1)) + b);
}
static function easeInOut(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);
}
static function easeOutIn(t, b, c, d) {
t = t / (d / 2);
t--;
return(((c / 2) * (((t * t) * t) + 1)) + b);
}
}