Frame 1
function __com_mochibot__(swfid, mc, lv, trk) {
var x;
var g;
var s;
var fv;
var sb;
var u;
var res;
var mb;
var mbc;
mb = "__mochibot__";
mbc = "mochibot.com";
g = (_global ? (_global) : (_level0._root));
if (g[mb + swfid]) {
return(g[mb + swfid]);
}
s = System.security;
x = mc._root.getSWFVersion;
fv = (x ? (mc.getSWFVersion()) : ((_global ? 6 : 5)));
if (!s) {
s = {};
}
sb = s.sandboxType;
if (sb == "localWithFile") {
return(null);
}
x = s.allowDomain;
if (x) {
s.allowDomain(mbc);
}
x = s.allowInsecureDomain;
if (x) {
s.allowInsecureDomain(mbc);
}
u = (((((((((((("http://" + mbc) + "/my/core.swf?mv=7&fv=") + fv) + "&v=") + escape(getVersion())) + "&swfid=") + escape(swfid)) + "&l=") + lv) + "&f=") + mc) + (sb ? ("&sb=" + sb) : "")) + (trk ? "&t=1" : "");
lv = ((fv > 6) ? (mc.getNextHighestDepth()) : ((g[mb + "level"] ? (g[mb + "level"] + 1) : (lv))));
g[mb + "level"] = lv;
if (fv == 5) {
res = "_level" + lv;
if (!eval (res)) {
loadMovieNum (u, lv);
}
} else {
res = mc.createEmptyMovieClip(mb + swfid, lv);
res.loadMovie(u);
}
return(res);
}
__com_mochibot__("394eb717", this, 10301, true);
function randRange(min, max) {
var _local1 = Math.floor(Math.random() * ((max - min) + 1)) + min;
return(_local1);
}
MovieClip.prototype.bounceIn = function (delay, callback) {
this._visible = false;
xFinish = this._x;
yFinish = this._y;
rotFinish = this._rotation;
this._xscale = 0;
this._yscale = 0;
this._visible = true;
var startTime = getTimer();
this.onEnterFrame = function () {
currentTime = getTimer();
if (currentTime >= (startTime + delay)) {
this.gotoAndPlay(2);
var _local3 = new mx.transitions.Tween(this, "_xscale", mx.transitions.easing.Elastic.easeOut, 0, 100, 1, true);
var _local2 = new mx.transitions.Tween(this, "_yscale", mx.transitions.easing.Elastic.easeOut, 0, 100, 1, true);
xtween.onMotionFinished = callback;
delete this.onEnterFrame;
}
};
};
MovieClip.prototype.bounceFinal = function (delay, callback) {
this._visible = false;
xFinish = this._x;
yFinish = this._y;
rotFinish = this._rotation;
this._xscale = 0;
this._yscale = 0;
this._visible = true;
var startTime = getTimer();
this.onEnterFrame = function () {
currentTime = getTimer();
if (currentTime >= (startTime + delay)) {
var _local3 = new mx.transitions.Tween(this, "_xscale", mx.transitions.easing.Elastic.easeOut, 0, 100, 1, true);
var _local2 = new mx.transitions.Tween(this, "_yscale", mx.transitions.easing.Elastic.easeOut, 0, 100, 1, true);
xtween.onMotionFinished = callback;
delete this.onEnterFrame;
}
};
};
MovieClip.prototype.bounceBtnIn = function (amount) {
var _local3 = new mx.transitions.Tween(this, "_xscale", mx.transitions.easing.Elastic.easeOut, this._xscale, amount, 1, true);
var _local2 = new mx.transitions.Tween(this, "_yscale", mx.transitions.easing.Elastic.easeOut, this._yscale, amount, 1, true);
};
MovieClip.prototype.bounceBtnOut = function () {
var _local3 = new mx.transitions.Tween(this, "_xscale", mx.transitions.easing.Elastic.easeOut, this._xscale, 90, 1, true);
var _local2 = new mx.transitions.Tween(this, "_yscale", mx.transitions.easing.Elastic.easeOut, this._yscale, 90, 1, true);
};
MovieClip.prototype.bounceOut = function (delay, callback) {
this._visible = false;
var _local3 = this._x;
var _local2 = this._y;
var _local6 = this._rotation;
this._xscale = 100;
this._yscale = 100;
this._visible = true;
var startTime = getTimer();
this.onEnterFrame = function () {
currentTime = getTimer();
if (currentTime >= (startTime + delay)) {
var _local3 = new mx.transitions.Tween(this, "_xscale", mx.transitions.easing.Elastic.easeOut, 100, 0, 1.5, true);
var _local2 = new mx.transitions.Tween(this, "_yscale", mx.transitions.easing.Elastic.easeOut, 100, 0, 1.5, true);
xtween.onMotionFinished = callback;
delete this.onEnterFrame;
}
};
};
MovieClip.prototype.fadeOut = function (delay, callback) {
this._alpha = 100;
var startTime = getTimer();
this.onEnterFrame = function () {
currentTime = getTimer();
if (currentTime >= (startTime + delay)) {
var _local2 = new mx.transitions.Tween(this, "_alpha", mx.transitions.easing.Regular.easeOut, 100, 0, 1.5, true);
_local2.onMotionFinished = function () {
this._visible = false;
this._alpha = 100;
};
delete this.onEnterFrame;
}
};
};
MovieClip.prototype.slide = function (delay, callback) {
this._visible = false;
var xFinish = this._x;
this._x = Stage.width + this._width;
this._visible = true;
var startTime = getTimer();
this.onEnterFrame = function () {
currentTime = getTimer();
if (currentTime >= (startTime + delay)) {
var _local2 = new mx.transitions.Tween(this, "_x", mx.transitions.easing.Elastic.easeOut, this._x, xFinish, 1, true);
_local2.onMotionFinished = callback;
delete this.onEnterFrame;
}
};
};
ScaleRange = 350;
ScaleMin = 150;
Rotation = Math.random() * 4;
angle = 0;
angleRate = 0.1;
max = 12;
vx = randRange(-max, max);
vy = randRange(-max, max);
rot = randRange(-2, 2);
mouseX = _root._xmouse;
mouseY = _root._ymouse;
oldMouseX = mouseX;
oldMouseY = mouseY;
totalWidth = preloader_mc.percentbar_mc._width;
preloader_mc.percentbar_mc._width = 0;
preloader_mc.kPercent.text = "0%";
preloader_mc.onEnterFrame = function () {
var _local4 = _root.getBytesLoaded();
var _local3 = _root.getBytesTotal();
if (_local3 != -1) {
var _local6 = Math.round(_local4 / 1024);
var _local5 = Math.round(_local3 / 1024);
percent = Math.round((_local6 / _local5) * 100);
if (isNaN(percent)) {
this.kPercent.text = "0%";
} else {
this.kPercent.text = percent + "%";
this.percentbar_mc._width = totalWidth * (percent / 100);
}
if ((_local4 == _local3) && (_local3 > 0)) {
delete this.onEnterFrame;
gotoAndPlay ("start");
} else if (_local4 == -1) {
failureReport_txt.text = "The file is not currently available. Please try again later. If you continue to receive this message, please contact the system administrator.";
}
}
};
stop();
Instance of Symbol 36 MovieClip "mcBall" in Frame 1
onClipEvent (load) {
movieWIDTH = Stage.width;
movieHEIGHT = Stage.height;
oldx = 1;
oldy = 1;
vx = (x - oldx) * 10;
vy = (y - oldy) * 10;
gravity = 0;
bounce = 0.9;
radius = this._width / 2;
ScaleRange = 200;
ScaleMin = 150;
Rotation = Math.random() * 4;
angle = 0;
angleRate = 0.1;
max = 12;
Sound1 = new Sound();
Sound1.attachSound("soccer_01");
Sound1.setVolume(10);
}
onClipEvent (enterFrame) {
oldx = x;
oldy = y;
x = this._x;
y = this._y;
this._xscale = (this._yscale = Math.abs(Math.sin(angle) * ScaleRange) + ScaleMin);
if (Math.abs(Math.sin(angle)) < 0.05) {
Sound1.start(0, 1);
vx = vx * bounce;
vy = vy * bounce;
}
angle = angle + angleRate;
if (dragging) {
vx = (x - oldx) * 10;
vy = (y - oldy) * 10;
} else {
vy = vy + gravity;
x = x + (int(vx) / 5);
y = y + (vy / 10);
if (y < radius) {
y = radius;
vx = vx * bounce;
vy = vy * (-bounce);
}
if (y > (movieHEIGHT - radius)) {
y = movieHEIGHT - radius;
vx = vx * bounce;
vy = vy * (-bounce);
Sound1.start(0, 1);
}
if (x < radius) {
x = radius;
vx = vx * (-bounce);
vy = vy * bounce;
Sound1.start(0, 1);
}
if (x > (movieWIDTH - radius)) {
x = movieWIDTH - radius;
vx = vx * (-bounce);
vy = vy * bounce;
Sound1.start(0, 1);
}
with (this) {
_x = x;
_y = y;
}
if (Math.abs(vx) > 0.1) {
this.mcDetails._rotation = this.mcDetails._rotation + (vx / 3);
}
}
}
Frame 44
stop();
Frame 68
function ballMove() {
streaks._x = ball._x;
streaks._y = ball._y;
gameController();
if (getTimer() > (this.collideTimer + collideTime)) {
colliding = false;
}
this._rotation = this._rotation + this.dw;
this.vx = this.vx * DAMP;
this.vy = this.vy * DAMP;
this._x = this._x + this.vx;
this._y = this._y + this.vy;
if (this._x > RIGHT) {
this._x = RIGHT;
this.vx = this.vx * BOUNCE;
Sound1.start(0, 1);
} else if (this._x < LEFT) {
this._x = LEFT;
this.vx = this.vx * BOUNCE;
Sound1.start(0, 1);
}
if (this._y > BOTTOM) {
this._y = BOTTOM;
this.vy = this.vy * BOUNCE;
Sound1.start(0, 1);
} else if (this._y < TOP) {
this._y = TOP;
this.vy = this.vy * BOUNCE;
Sound1.start(0, 1);
}
if (ball.hitTest(goalOpponent.hit)) {
opponentsGoalDisplay.bounceIn(0);
centerBall();
scoreOpponent++;
scoreBoardOpponent.scoreText.text = scoreOpponent;
if (scoreOpponent == winningScore) {
gotoAndPlay ("game over");
}
} else if (ball.hitTest(goalPlayer.hit)) {
playersGoalDisplay.bounceIn(0);
centerBall();
scorePlayer++;
scoreBoardPlayer.scoreText.text = scorePlayer;
if (scorePlayer == winningScore) {
gotoAndPlay ("game over");
}
}
}
function centerBall() {
ball._visible = true;
delete ball.onEnterFrame;
ball._x = 168;
ball._y = 244;
}
function restart() {
centerBall();
var _local1 = new mx.transitions.Tween(ball, "_xscale", mx.transitions.easing.Bounce.easeOut, 500, 100, 1.5, true);
var _local2 = new mx.transitions.Tween(ball, "_yscale", mx.transitions.easing.Bounce.easeOut, 500, 100, 1.5, true);
_local1.onMotionFinished = function () {
ball.dw = 0;
ball.vx = rand((-VMAX) / 2, VMAX / 2);
if (Math.random() > 0.5) {
ball.vy = -VMAX;
} else {
ball.vy = VMAX;
}
ball.onEnterFrame = ballMove;
};
}
function gameController() {
controls();
moveOpponent();
}
function controls() {
if (Key.isDown(39)) {
players._x = Math.min(players._x + MOVERATE, playersRightBoundary);
} else if (Key.isDown(37)) {
players._x = Math.max(players._x - MOVERATE, playersLeftBoundary);
}
}
function moveOpponent() {
ballRelative = ball._y - opponents._y;
if (ball.vy < 0) {
if (ballRelative > rowsOpponent[0][0]._y) {
activeRow = 0;
} else if (ballRelative > rowsOpponent[1][0]._y) {
activeRow = 1;
} else if (ballRelative > rowsOpponent[2][0]._y) {
activeRow = 2;
} else {
activeRow = 3;
}
} else if (ballRelative < rowsOpponent[3][0]._y) {
activeRow = 3;
} else if (ballRelative < rowsOpponent[2][0]._y) {
activeRow = 2;
} else if (ballRelative < rowsOpponent[1][0]._y) {
activeRow = 1;
} else {
activeRow = 0;
}
column = 0;
distance = Stage.width;
i = 0;
while (i < rowsOpponent[activeRow].length) {
testDistance = Math.abs((ball._x - rowsOpponent[activeRow][i]._x) - opponents._x);
if (testDistance < distance) {
column = i;
distance = testDistance;
}
i++;
}
rowsOpponent[activeRow][column].tint = 100;
difference = (ball._x - rowsOpponent[activeRow][column]._x) - opponents._x;
if (difference >= OPPONENTMOVERATE) {
opponents._x = Math.min(opponents._x + OPPONENTMOVERATE, opponentsRightBoundary);
} else if (difference <= (-OPPONENTMOVERATE)) {
opponents._x = Math.max(opponents._x - OPPONENTMOVERATE, opponentsLeftBoundary);
}
if (!collisions()) {
collisionsPlayer();
}
}
function aimOpponentGoal() {
var _local2 = goalOpponent._x - ball._x;
var _local1 = goalOpponent._y - ball._y;
angle = Math.atan2(_local1, _local2);
streaks._rotation = ((angle + Math.PI) * 180) / Math.PI;
streaks.play();
stick._rotation = (angle * 180) / Math.PI;
return(angle);
}
function aimOpponent(target) {
var _local2 = (target._x + opponents._x) - ball._x;
var _local1 = (target._y + opponents._y) - ball._y;
angle = Math.atan2(_local1, _local2);
streaks._rotation = ((angle + Math.PI) * 180) / Math.PI;
streaks.play();
return(angle);
}
function aimPlayerGoal() {
var _local2 = goalPlayer._x - ball._x;
var _local1 = goalPlayer._y - ball._y;
angle = Math.atan2(_local1, _local2);
streaks._rotation = ((angle + Math.PI) * 180) / Math.PI;
streaks.play();
angle = angle + (((Math.random() * 2) * PLAYERGOALRANDOM) - PLAYERGOALRANDOM);
return(angle);
}
function aimPlayer(target) {
var _local2 = (target._x + players._x) - ball._x;
var _local1 = (target._y + players._y) - ball._y;
angle = Math.atan2(_local1, _local2);
streaks._rotation = ((angle + Math.PI) * 180) / Math.PI;
streaks.play();
stick2._rotation = (angle * 180) / Math.PI;
return(angle);
}
function collisions() {
if (!colliding) {
i = 0;
while (i < rowsOpponent.length) {
j = 0;
while (j < rowsOpponent[i].length) {
if (ball.hitTest(rowsOpponent[i][j].hit)) {
Sound1.start(0, 1);
rowsOpponent[i][j].gotoAndPlay(2);
ball.collideTimer = getTimer();
colliding = true;
if (i == 0) {
ballAngle = aimOpponentGoal();
ballAngle = ballAngle + ((Math.random() * ACCURACY) - ACCURACY);
ball.vx = Math.cos(ballAngle) * VMAXOPPONENT;
ball.vy = Math.sin(ballAngle) * VMAXOPPONENT;
ball.dw = (2 * ballAngle) / Math.PI;
return(true);
}
row = i - 1;
player = rand(rowsOpponent[row].length - 1);
mc = rowsOpponent[row][player];
ballAngle = aimOpponent(mc);
ballAngle = ballAngle + ((Math.random() * ACCURACY) - ACCURACY);
ball.vx = Math.cos(ballAngle) * VMAXOPPONENT;
ball.vy = Math.sin(ballAngle) * VMAXOPPONENT;
ball.dw = (2 * ballAngle) / Math.PI;
ball._x = ball._x + ball.vx;
ball._y = ball._y + ball.vy;
return(true);
}
j++;
}
i++;
}
}
return(false);
}
function collisionsPlayer() {
if (!colliding) {
i = 0;
while (i < rowsPlayer.length) {
j = 0;
while (j < rowsPlayer[i].length) {
if (ball.hitTest(rowsPlayer[i][j].hit)) {
rowsPlayer[i][j].gotoAndPlay(2);
Sound1.start(0, 1);
ball.collideTimer = getTimer();
colliding = true;
if (i == 0) {
ballAngle = aimPlayerGoal();
ball.vx = Math.cos(ballAngle) * VMAX;
ball.vy = Math.sin(ballAngle) * VMAX;
ball.dw = (2 * ballAngle) / Math.PI;
return(true);
}
row = i - 1;
player = rand(rowsPlayer[row].length - 1);
mc = rowsPlayer[row][player];
ballAngle = aimPlayer(mc);
ball.vx = Math.cos(ballAngle) * VMAX;
ball.vy = Math.sin(ballAngle) * VMAX;
ball.dw = (2 * ballAngle) / Math.PI;
ball._x = ball._x + ball.vx;
ball._y = ball._y + ball.vy;
return(true);
}
j++;
}
i++;
}
}
return(false);
}
MovieClip.prototype.rand = function (num) {
if (arguments.length == 1) {
return(Math.floor(Math.random() * num) + 1);
}
return(Math.floor(Math.random() * (Math.abs(arguments[1] - num) + 1)) + Math.min(num, arguments[1]));
};
Sound1 = new Sound();
Sound1.attachSound("soccer_01");
Sound1.setVolume(10);
GAME_ANGLE = 0;
BALL_DIAMETER = 12;
BALL_RADIUS = BALL_DIAMETER / 2;
TOP = table_mc._y + BALL_RADIUS;
BOTTOM = (table_mc._y + table_mc._height) - BALL_RADIUS;
LEFT = table_mc._x + BALL_RADIUS;
RIGHT = (table_mc._x + table_mc._width) - BALL_RADIUS;
BOUNCE = -1;
DAMP = 1;
MINSPEED = 1;
var playersLeftBoundary = 120;
var playersRightBoundary = 240;
var opponentsLeftBoundary = 10;
var opponentsRightBoundary = 140;
var scorePlayer = 0;
var scoreOpponent = 0;
var deg2rad = (Math.PI/180);
var colliding = false;
var collideTime = 100;
var winningScore = 5;
ball._visible = false;
goalPaddle._visible = false;
goalCyclone._visible = false;
trace(_global.player);
if (_global.player == "paddle") {
VMAX = 6;
VMAXOPPONENT = 5;
ACCURACY = 30 * deg2rad;
MOVERATE = 3;
OPPONENTMOVERATE = 1.5;
PLAYERGOALRANDOM = 10 * deg2rad;
opponents.gotoAndPlay("cyclone");
players.gotoAndPlay("paddle");
scoreBoardOpponent.logo.gotoAndPlay("cyclone");
scoreBoardPlayer.logo.gotoAndPlay("paddle");
opponentsGoalDisplay = goalCyclone;
playersGoalDisplay = goalPaddle;
} else {
VMAX = 5;
VMAXOPPONENT = 6;
ACCURACY = 10 * deg2rad;
MOVERATE = 3;
OPPONENTMOVERATE = 1;
PLAYERGOALRANDOM = 10 * deg2rad;
opponents.gotoAndPlay("paddle");
players.gotoAndPlay("cyclone");
scoreBoardOpponent.logo.gotoAndPlay("paddle");
scoreBoardPlayer.logo.gotoAndPlay("cyclone");
opponentsGoalDisplay = goalPaddle;
playersGoalDisplay = goalCyclone;
}
scoreBoardOpponent.slide(0, restart);
scoreBoardPlayer.slide(400);
Color.prototype.reduceRGB = function (p) {
var _local2 = this.getTransform();
var _local3 = (100 - p) / 100;
this.setTransform({ra:p, rb:_local2.rb * _local3, ga:p, gb:_local2.gb * _local3, ba:p, bb:_local2.bb * _local3});
};
Color.prototype.tintRGB = function (hex, p) {
this.setRGB(hex);
this.reduceRGB(p);
};
var rowsOpponent = [[opponents.ball0, opponents.ball1, opponents.ball2], [opponents.ball3, opponents.ball4, opponents.ball6, opponents.ball7], [opponents.ball8, opponents.ball9], [opponents.ball10]];
var rowsPlayer = [[players.ball0, players.ball1, players.ball2], [players.ball3, players.ball4, players.ball6, players.ball7], [players.ball8, players.ball9], [players.ball10]];
trace(scoreOpponent);
scoreBoardOpponent.setScore(1);
stop();
Frame 79
trace((((("opponent " + scoreOpponent) + " player ") + scorePlayer) + "_global ") + _global.player);
if (scoreOpponent > scorePlayer) {
if (_global.player == "paddle") {
trace("Cyclone Won");
gameoverCyclone.gotoAndStop("unlucky");
gameoverCyclone.bounceFinal(0);
} else {
trace("Paddle Won");
gameoverPaddle.gotoAndStop("unlucky");
gameoverPaddle.bounceFinal(0);
}
} else if (_global.player == "paddle") {
trace("I Paddle Won");
gameoverPaddle.gotoAndStop("win");
gameoverPaddle.bounceFinal(0);
} else {
trace("! Cyclone Won");
gameoverCyclone.gotoAndStop("win");
gameoverCyclone.bounceFinal(0);
}
stop();
Symbol 17 Button
on (press) {
dragging = true;
startDrag (this, false, radius, radius, movieWIDTH - radius, movieHEIGHT - radius);
}
on (release, releaseOutside) {
dragging = false;
stopDrag();
}
Symbol 161 MovieClip [__Packages.mx.transitions.OnEnterFrameBeacon] Frame 0
class mx.transitions.OnEnterFrameBeacon
{
function OnEnterFrameBeacon () {
}
static function init() {
var _local4 = _global.MovieClip;
if (!_root.__OnEnterFrameBeacon) {
mx.transitions.BroadcasterMX.initialize(_local4);
var _local3 = _root.createEmptyMovieClip("__OnEnterFrameBeacon", 9876);
_local3.onEnterFrame = function () {
_global.MovieClip.broadcastMessage("onEnterFrame");
};
}
}
static var version = "1.1.0.52";
}
Symbol 162 MovieClip [__Packages.mx.transitions.BroadcasterMX] Frame 0
class mx.transitions.BroadcasterMX
{
var _listeners;
function BroadcasterMX () {
}
static function initialize(o, dontCreateArray) {
if (o.broadcastMessage != undefined) {
delete o.broadcastMessage;
}
o.addListener = mx.transitions.BroadcasterMX.prototype.addListener;
o.removeListener = mx.transitions.BroadcasterMX.prototype.removeListener;
if (!dontCreateArray) {
o._listeners = new Array();
}
}
function addListener(o) {
removeListener(o);
if (broadcastMessage == undefined) {
broadcastMessage = mx.transitions.BroadcasterMX.prototype.broadcastMessage;
}
return(_listeners.push(o));
}
function removeListener(o) {
var _local2 = _listeners;
var _local3 = _local2.length;
while (_local3--) {
if (_local2[_local3] == o) {
_local2.splice(_local3, 1);
if (!_local2.length) {
broadcastMessage = undefined;
}
return(true);
}
}
return(false);
}
function broadcastMessage() {
var _local5 = String(arguments.shift());
var _local4 = _listeners.concat();
var _local6 = _local4.length;
var _local3 = 0;
while (_local3 < _local6) {
_local4[_local3][_local5].apply(_local4[_local3], arguments);
_local3++;
}
}
static var version = "1.1.0.52";
}
Symbol 163 MovieClip [__Packages.mx.transitions.Tween] Frame 0
class mx.transitions.Tween
{
var obj, prop, begin, useSeconds, _listeners, addListener, prevTime, _time, looping, _duration, broadcastMessage, isPlaying, _fps, prevPos, _pos, change, _intervalID, _startTime;
function Tween (obj, prop, func, begin, finish, duration, useSeconds) {
mx.transitions.OnEnterFrameBeacon.init();
if (!arguments.length) {
return;
}
this.obj = obj;
this.prop = prop;
this.begin = begin;
position = (begin);
this.duration = (duration);
this.useSeconds = useSeconds;
if (func) {
this.func = func;
}
this.finish = (finish);
_listeners = [];
addListener(this);
start();
}
function set time(t) {
prevTime = _time;
if (t > duration) {
if (looping) {
rewind(t - _duration);
update();
broadcastMessage("onMotionLooped", this);
} else {
if (useSeconds) {
_time = _duration;
update();
}
stop();
broadcastMessage("onMotionFinished", this);
}
} else if (t < 0) {
rewind();
update();
} else {
_time = t;
update();
}
//return(time);
}
function get time() {
return(_time);
}
function set duration(d) {
_duration = (((d == null) || (d <= 0)) ? (_global.Infinity) : (d));
//return(duration);
}
function get duration() {
return(_duration);
}
function set FPS(fps) {
var _local2 = isPlaying;
stopEnterFrame();
_fps = fps;
if (_local2) {
startEnterFrame();
}
//return(FPS);
}
function get FPS() {
return(_fps);
}
function set position(p) {
setPosition(p);
//return(position);
}
function setPosition(p) {
prevPos = _pos;
obj[prop] = (_pos = p);
broadcastMessage("onMotionChanged", this, _pos);
updateAfterEvent();
}
function get position() {
return(getPosition());
}
function getPosition(t) {
if (t == undefined) {
t = _time;
}
return(func(t, begin, change, _duration));
}
function set finish(f) {
change = f - begin;
//return(finish);
}
function get finish() {
return(begin + change);
}
function continueTo(finish, duration) {
begin = position;
this.finish = (finish);
if (duration != undefined) {
this.duration = (duration);
}
start();
}
function yoyo() {
continueTo(begin, time);
}
function startEnterFrame() {
if (_fps == undefined) {
_global.MovieClip.addListener(this);
} else {
_intervalID = setInterval(this, "onEnterFrame", 1000 / _fps);
}
isPlaying = true;
}
function stopEnterFrame() {
if (_fps == undefined) {
_global.MovieClip.removeListener(this);
} else {
clearInterval(_intervalID);
}
isPlaying = false;
}
function start() {
rewind();
startEnterFrame();
broadcastMessage("onMotionStarted", this);
}
function stop() {
stopEnterFrame();
broadcastMessage("onMotionStopped", this);
}
function resume() {
fixTime();
startEnterFrame();
broadcastMessage("onMotionResumed", this);
}
function rewind(t) {
_time = ((t == undefined) ? 0 : (t));
fixTime();
update();
}
function fforward() {
time = (_duration);
fixTime();
}
function nextFrame() {
if (useSeconds) {
time = ((getTimer() - _startTime) / 1000);
} else {
time = (_time + 1);
}
}
function onEnterFrame() {
nextFrame();
}
function prevFrame() {
if (!useSeconds) {
time = (_time - 1);
}
}
function toString() {
return("[Tween]");
}
function fixTime() {
if (useSeconds) {
_startTime = getTimer() - (_time * 1000);
}
}
function update() {
position = (getPosition(_time));
}
static var version = "1.1.0.52";
static var __initBeacon = mx.transitions.OnEnterFrameBeacon.init();
static var __initBroadcaster = mx.transitions.BroadcasterMX.initialize(mx.transitions.Tween.prototype, true);
function func(t, b, c, d) {
return(((c * t) / d) + b);
}
}
Symbol 164 MovieClip [__Packages.mx.transitions.easing.Elastic] Frame 0
class mx.transitions.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 var version = "1.1.0.52";
}
Symbol 165 MovieClip [__Packages.mx.transitions.easing.Regular] Frame 0
class mx.transitions.easing.Regular
{
function Regular () {
}
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 var version = "1.1.0.52";
}
Symbol 166 MovieClip [__Packages.mx.transitions.easing.Bounce] Frame 0
class mx.transitions.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 var version = "1.1.0.52";
}
Symbol 80 MovieClip Frame 1
stop();
Symbol 84 MovieClip Frame 1
stop();
btnPaddle.onRollOver = function () {
btnPaddle.bounceBtnIn(120);
};
btnPaddle.onRollOut = function () {
btnPaddle.bounceBtnOut();
};
btnPaddle.onRelease = function () {
_global.player = "paddle";
_parent.gotoAndPlay("intro");
};
btnCyclone.onRelease = function () {
_global.player = "cyclone";
_parent.gotoAndPlay("intro");
};
btnCyclone.onRollOver = function () {
btnCyclone.bounceBtnIn(120);
};
btnCyclone.onRollOut = function () {
btnCyclone.bounceBtnOut();
};
Symbol 108 MovieClip Frame 1
stop();
Symbol 123 MovieClip Frame 1
stop();
Symbol 130 MovieClip Frame 1
stop();
Symbol 131 MovieClip Frame 1
stop();
Symbol 131 MovieClip Frame 2
stop();
Symbol 132 MovieClip Frame 1
stop();
Symbol 132 MovieClip Frame 2
stop();
Symbol 136 MovieClip Frame 1
stop();
Symbol 136 MovieClip Frame 36
_parent.restart();
Symbol 139 MovieClip Frame 1
stop();
Symbol 139 MovieClip Frame 36
_parent.restart();
Symbol 147 MovieClip Frame 1
stop();
Symbol 147 MovieClip Frame 2
stop();
Symbol 148 MovieClip Frame 1
stop();
Symbol 157 MovieClip Frame 1
stop();
Symbol 157 MovieClip Frame 2
playAgain.onRollOver = function () {
playAgain.bounceBtnIn(200);
};
playAgain.onRollOut = function () {
playAgain.bounceBtnOut();
};
playAgain.onRelease = function () {
_parent.gotoAndPlay("instructions");
};
stop();
Symbol 157 MovieClip Frame 3
playAgain.onRollOver = function () {
playAgain.bounceBtnIn(200);
};
playAgain.onRollOut = function () {
playAgain.bounceBtnOut();
};
playAgain.onRelease = function () {
_parent.gotoAndPlay("instructions");
};
stop();
Symbol 160 MovieClip Frame 1
stop();
Symbol 160 MovieClip Frame 2
trace("unlucky Cyclone");
playAgain.onRollOver = function () {
playAgain.bounceBtnIn(200);
};
playAgain.onRollOut = function () {
playAgain.bounceBtnOut();
};
playAgain.onRelease = function () {
_parent.gotoAndPlay("instructions");
};
stop();
Symbol 160 MovieClip Frame 3
trace("win Cyclone");
playAgain.onRollOver = function () {
playAgain.bounceBtnIn(200);
};
playAgain.onRollOut = function () {
playAgain.bounceBtnOut();
};
playAgain.onRelease = function () {
_parent.gotoAndPlay("instructions");
};
stop();