Frame 1
Stage.showMenu = false;
if (_url.indexOf("sticky.tv") == -1) {
hijack._alpha = 100;
}
Frame 2
loadVariables ("smack.txt", _root);
globalVolume = new Sound();
Frame 3
temp = getBytesLoaded() / getBytesTotal();
if ((temp == 1) and (smackLoaded == "yes")) {
gotoAndStop ("game");
} else {
loader._y = 14 - (540 * temp);
}
Frame 4
gotoAndPlay ("loading");
Frame 6
_global.score = 0;
_global.missednum = 0;
_global.linenum = 0;
_global.isMouseDown = false;
_global.isThrowing = false;
_global.airplaneFlying = false;
_global.timeUp = true;
_global.showTail = false;
_global.gameOver = true;
_global.maxTime = 60000;
_global.timer = 0;
_global.consecutive = 0;
_global.totaltime = 0;
var trashposition = 2;
var pointstext = "";
var stalkline = "";
var btalkline = "";
var catches;
var catchattempts;
var baskets;
var basketattempts;
var planes;
var planeattempts;
var blinkies;
var blinkyattempts;
var longeststreak;
var bsmack = brandonsmack.split("|");
var ssmack = sotirismack.split("|");
var bgood = brandongood.split("|");
var sgood = sotirigood.split("|");
var nocatch = misscatch.split("|");
_root.onEnterFrame = function () {
if (!timeUp) {
temp = getTimer() - timer;
if (temp < 0) {
temp = 0;
}
_root.timerbar.bar._xscale = 100 * (1 - (temp / maxTime));
_root.throwball.floorlevel = 368 + ((10 * temp) / maxTime);
}
if ((temp > maxTime) and (!gameOver)) {
if (isMouseDown) {
isMouseDown = false;
_root.upperarm.forearm.localToGlobal((point = {x:_root.upperarm.forearm.hand._x, y:_root.upperarm.forearm.hand._y}));
_root.throwball._x = point.x;
_root.throwball._y = point.y;
_root.throwball._visible = true;
_root.upperarm.forearm.hand.gotoAndStop("grab");
showTail = true;
linenum = 0;
}
if (!timeUp) {
_root.soundGameOver.start();
}
_root.timerbar.bar._xscale = 0;
timeUp = true;
}
};
scorePoints = function (numPoints) {
score = score + numPoints;
};
goodTalk = function () {
if (Math.floor(Math.random() * 3) == 0) {
if (Math.floor(Math.random() * 2) == 0) {
btalk.gotoAndPlay(2);
btalkline = bgood[Math.floor(Math.random() * bgood.length)];
} else {
stalk.gotoAndPlay(2);
stalkline = sgood[Math.floor(Math.random() * sgood.length)];
}
}
};
smackTalk = function () {
if (Math.floor(Math.random() * 6) == 0) {
if (Math.floor(Math.random() * 2) == 0) {
btalk.gotoAndPlay(2);
btalkline = bsmack[Math.floor(Math.random() * bsmack.length)];
} else {
stalk.gotoAndPlay(2);
stalkline = ssmack[Math.floor(Math.random() * ssmack.length)];
}
}
};
missTalk = function () {
if (Math.floor(Math.random() * 3) == 0) {
btalk.gotoAndPlay(2);
btalkline = nocatch[Math.floor(Math.random() * nocatch.length)];
}
};
moveTrash = function () {
if (trashposition == 1) {
trashmove.gotoAndPlay("1-2");
trashposition = 2;
} else if (trashposition == 2) {
trashmove.gotoAndPlay("2-3");
trashposition = 3;
} else {
trashmove.gotoAndPlay("3-1");
trashposition = 1;
}
};
resetGame = function () {
i = 1;
while (i < 100) {
removeMovieClip("missed" + i);
i++;
}
score = 0;
catches = 0;
catchattempts = 0;
baskets = 0;
basketattempts = 0;
planes = 0;
planeattempts = 0;
blinkies = 0;
blinkyattempts = 0;
longeststreak = 0;
consecutive = 0;
trashposition = 2;
trashmove.gotoAndStop("two");
timer = getTimer();
totaltime = getTimer();
scoretable.gotoAndStop(1);
timeUp = false;
gameOver = false;
soundEndMusic.stop();
soundMusic.start(0, 999);
upperarm.forearm.hand.gotoAndStop("catch");
throwball._x = 1000;
airplaneflying = false;
airplane.gotoAndStop(1);
airplane._x = 1000;
throwball.resetCatch();
};
upperarm.fixRotation = function (angle) {
angle = (angle * 180) / Math.PI;
while (angle > 360) {
angle = angle - 360;
}
while (angle < 0) {
angle = angle + 360;
}
return(angle);
};
bigbutton.onPress = function () {
if (_root.upperarm.forearm.hand.hitTest(_root.throwball) and (!timeUp)) {
if (!isThrowing) {
_root.catches++;
_root.catchattempts++;
_root.scorePoints(15);
}
_root.soundCatch.start();
isThrowing = true;
isMouseDown = true;
showTail = false;
_root.throwball._xscale = 100;
_root.throwball._yscale = 100;
_root.throwball._x = 1000;
_root.throwball._visible = false;
if (_root.throwball.ballnum == 1) {
_root.upperarm.forearm.hand.gotoAndStop("special");
} else {
_root.upperarm.forearm.hand.gotoAndStop(1 + (_root.throwball.ballnum % 4));
}
} else if (!isMouseDown) {
_root.upperarm.forearm.hand.gotoAndStop("grab");
}
};
bigbutton.onRelease = function () {
if (_root.isMouseDown) {
_root.soundSThrow.start();
isMouseDown = false;
_root.upperarm.forearm.localToGlobal((point = {x:_root.upperarm.forearm.hand._x, y:_root.upperarm.forearm.hand._y}));
_root.throwball._x = point.x;
_root.throwball._y = point.y;
_root.throwball._visible = true;
_root.upperarm.forearm.hand.gotoAndStop("release");
showTail = true;
linenum = 0;
} else {
_root.upperarm.forearm.hand.gotoAndStop("catch");
}
};
airplane.onEnterFrame = function () {
if (airplaneFlying) {
this._x = this._x + this.deltax;
this._y = this._y + this.deltay;
this.deltay = this.deltay + 0.1;
if (this.hitTest(_root.throwball)) {
_root.planes++;
_root.planeattempts++;
_root.soundPlaneEnter.stop("sound_planeenter");
_root.soundPlaneHit.start();
this.play();
_root.pointstext = "400";
airplaneFlying = false;
_root.scorePoints(400);
}
if (this._x < -50) {
_root.planeattempts++;
airplaneFlying = false;
}
}
};
airplane.resetFlight = function () {
_root.airplanethrow.gotoAndPlay(2);
btalk.gotoAndPlay(2);
btalkline = "the plane, the plaaane!";
};
throwball.onEnterFrame = function () {
with (_root.throwball) {
if (!gameOver) {
oldx = x;
oldy = y;
if (isMouseDown) {
_root.upperarm.forearm.localToGlobal((point = {x:_root.upperarm.forearm.hand._x, y:_root.upperarm.forearm.hand._y}));
x = point.x;
y = point.y;
deltax = x - oldx;
deltay = y - oldy;
if (deltax > 80) {
deltax = 80;
}
if (deltay < -60) {
deltay = -60;
}
} else if (isThrowing) {
ballrotation = ballrotation * 0.96;
_rotation = _rotation + ballrotation;
x = _x;
y = _y;
deltay = deltay + 2;
deltax = deltax * 0.965;
x = x + (deltax / 1.5);
y = y + (deltay / 1.5);
_y = y;
_x = x;
if (_root.trashmove.scorezone.hitTest(this)) {
_root.soundBasket.start();
_root.moveTrash();
consecutive++;
_root.baskets++;
_root.basketattempts++;
if (consecutive > _root.longeststreak) {
_root.longeststreak = consecutive;
}
_root.trashmove.quickpoints.play();
if (ballnum == 1) {
_root.blinkies++;
_root.scorePoints(200 * consecutive);
if (consecutive == 1) {
_root.pointstext = "200";
} else {
_root.pointstext = "200 x" + consecutive;
}
} else {
_root.scorePoints(100 * consecutive);
if (consecutive == 1) {
_root.pointstext = "100";
} else {
_root.pointstext = "100 x" + consecutive;
}
}
_root.goodTalk();
_root.upperarm.forearm.hand.gotoAndStop("catch");
_root.timerbar.oldbar._xscale = _root.timerbar.bar._xscale;
_root.timerbar.oldbar.play();
timer = timer + 7000;
_root.timerbar.bar.play();
if (timeUp) {
timeUp = false;
updateAfterEvent();
}
_y = -99000;
oldy = -99000;
_x = 100;
oldx = 100;
deltax = 0;
deltay = 0;
} else if (_root.trashmove.trashhit.hitTest(this) and (deltax > 0)) {
_root.soundBounce.start();
_x = _root.trashmove.trashhit._x - 30;
deltax = deltax * (-0.3 - (Math.random() / 2));
} else if ((x > 720) or (x < -50)) {
_root.smackTalk();
consecutive = 0;
_root.basketattempts++;
resetCatch();
} else if (y > floorlevel) {
if (((deltay < 5) and (deltay > 0)) and (Math.abs(deltax) < 5)) {
_root.smackTalk();
consecutive = 0;
_root.basketattempts++;
resetCatch();
} else {
_root.soundBounce.start();
_y = floorlevel;
ballrotation = ((Math.random() * deltay) * deltax) / 8;
deltax = deltax * (0.6 + (Math.random() / 3));
deltay = deltay * (-0.1 - (Math.random() / 4));
}
}
} else {
_rotation = _rotation + ballrotation;
deltay = deltay + 2;
_x = _x + deltax;
_y = _y + (this.deltay / 3);
_xscale = 60 + ((40 * (385 - _x)) / 200);
_yscale = _xscale;
if (_y > 500) {
consecutive = 0;
_root.catchattempts++;
_root.missTalk();
resetCatch();
}
}
}
}
};
line.onEnterFrame = function () {
if (showTail) {
if (linenum == 0) {
linenum++;
} else {
_root.line.duplicateMovieClip("line" + linenum, linenum);
eval ("line" + linenum)._x = _root.throwball._x;
eval ("line" + linenum)._y = _root.throwball._y;
eval ("line" + linenum)._xscale = (-_root.throwball.deltax) / 1.5;
eval ("line" + linenum)._yscale = (-_root.throwball.deltay) / 1.5;
linenum++;
if (linenum > 20) {
linenum = 1;
}
}
}
};
throwball.resetCatch = function () {
isThrowing = false;
showTail = false;
missednum++;
if (missednum == 100) {
missednum = 1;
}
_root.throwball.duplicateMovieClip("missed" + missednum, missednum + 100);
eval ("missed" + missednum)._x = this._x;
eval ("missed" + missednum)._y = this._y;
eval ("missed" + missednum)._rotation = this._rotation;
eval ("missed" + missednum).gotoAndStop(1 + (this.ballnum % 4));
if (!timeUp) {
this.ballnum = 1 + Math.floor(Math.random() * 15);
this.gotoAndStop(1 + (this.ballnum % 4));
if (this.ballnum == 1) {
_root.blinkyattempts++;
this.gotoAndStop("special");
} else if ((this.ballnum == 2) and (!airplaneFlying)) {
airplane.resetFlight();
}
this._y = -2000;
_root.bthrow.gotoAndPlay(2);
_root.upperarm.forearm.hand.gotoAndStop("catch");
} else if (!gameOver) {
this._x = 1000;
gameOver = true;
_root.soundMusic.stop("sound_music");
_root.soundEndMusic.start(0, 999);
_root.newgame.gotoAndStop("new");
scoretable.play();
}
};
upperarm.onMouseMove = function () {
this.deltax = this._x - _root._xmouse;
this.deltay = this._y - _root._ymouse;
angle = Math.atan2(this.deltay, this.deltax);
distance = Math.sqrt((this.deltay * this.deltay) + (this.deltax * this.deltax));
if (distance < 142) {
if (!gameOver) {
Mouse.hide();
}
theta = Math.acos(distance / 142);
lambda = this.fixRotation(theta * -1.6);
if (lambda < 215) {
lambda = 215;
} else if (lambda > 355) {
lambda = 255;
}
theta = this.fixRotation(theta + angle);
if (theta > 310) {
theta = 310;
} else if (theta < 65) {
theta = 65;
}
this._rotation = theta;
this.forearm._rotation = lambda;
} else {
Mouse.show();
theta = this.fixRotation(angle);
if (theta > 310) {
theta = 310;
} else if (theta < 65) {
theta = 65;
}
this._rotation = theta + 5;
this.forearm._rotation = 356;
}
updateAfterEvent();
};
soundBasket = new Sound(this);
soundBasket.attachSound("sound_basket");
soundClick = new Sound(this);
soundClick.attachSound("sound_mouseclick");
soundBounce = new Sound(this);
soundBounce.attachSound("sound_bounce");
soundPlaneEnter = new Sound(this);
soundPlaneEnter.attachSound("sound_planeenter");
soundPlaneHit = new Sound(this);
soundPlaneHit.attachSound("sound_planehit");
soundCatch = new Sound(this);
soundCatch.attachSound("sound_catch");
soundBThrow = new Sound(this);
soundBThrow.attachSound("sound_bthrow");
soundSThrow = new Sound(this);
soundSThrow.attachSound("sound_sthrow");
soundGameOver = new Sound(this);
soundGameOver.attachSound("sound_gameover");
soundEndMusic = new Sound(this);
soundEndMusic.attachSound("sound_endmusic");
soundMusic = new Sound(this);
soundMusic.attachSound("sound_music");
sticky.swapDepths(600);
scoretable.swapDepths(500);
throwball.swapDepths(200);
upperarm._visible = false;
newgame._visible = false;
viewreel._visible = false;
timerbar._visible = false;
mute._visible = false;
upperarm.forearm.hand.gotoAndStop("catch");
Symbol 8 Button
on (release) {
getURL ("http://www.sticky.tv/game/cyrkam_airtos/");
}
Symbol 11 MovieClip Frame 20
stop();
Symbol 45 MovieClip Frame 1
stop();
Symbol 45 MovieClip Frame 15
_root.newgame._visible = true;
_root.viewreel._visible = true;
Symbol 45 MovieClip Frame 22
_root.timerbar._visible = true;
Symbol 45 MovieClip Frame 23
_root.sticky.gotoAndPlay(2);
stop();
Symbol 64 MovieClip Frame 1
stop();
Symbol 64 MovieClip Frame 8
catches = (_root.catches + " / ") + _root.catchattempts;
baskets = (_root.baskets + " / ") + _root.basketattempts;
planes = (_root.planes + " / ") + _root.planeattempts;
blinkies = (_root.blinkies + " / ") + _root.blinkyattempts;
streak = _root.longeststreak;
gametime = getTimer() - _root.totaltime;
temp = gametime / 1000;
hour = int(temp / 3600);
sec = int(temp % 60);
min = int((temp / 60) % 60);
if (hour < 10) {
hour = "0" + hour;
}
if (min < 10) {
min = "0" + min;
}
if (sec < 10) {
sec = "0" + sec;
}
gametimeStr = (((hour + ":") + min) + ":") + sec;
Symbol 64 MovieClip Frame 14
stop();
Symbol 67 MovieClip Frame 1
stop();
Symbol 69 MovieClip Frame 1
stop();
Symbol 71 MovieClip Frame 1
stop();
Symbol 73 Button
on (rollOver) {
_root.soundClick.start();
gotoAndPlay ("on");
}
on (rollOut) {
gotoAndPlay ("off");
}
on (release) {
_root.timerbar._visible = false;
_root.scoreintro.gotoAndPlay("wipe");
_root.resetGame();
_parent.gotoAndStop("end");
}
Symbol 77 MovieClip Frame 1
var buttontext = "NEW GAME";
stop();
Symbol 77 MovieClip Frame 8
stop();
Symbol 77 MovieClip Frame 15
stop();
Symbol 78 Button
on (rollOver) {
_root.soundClick.start();
gotoAndPlay ("on");
}
on (rollOut) {
gotoAndPlay ("off");
}
on (release) {
if (!_root.gameOver) {
_root.soundMusic.stop("sound_music");
_root.soundEndMusic.start(0, 999);
_root.soundGameOver.start();
_root.timerbar.bar._xscale = 0;
_root.gameOver = true;
_root.timeUp = true;
_root.scoretable.gotoAndPlay(2);
_parent.gotoAndStop("new");
}
}
Symbol 80 MovieClip Frame 1
var buttontext = "NEW GAME";
stop();
Symbol 80 MovieClip Frame 8
stop();
Symbol 80 MovieClip Frame 15
stop();
Symbol 81 MovieClip Frame 1
stop();
Symbol 84 Button
on (rollOver) {
_root.soundClick.start();
}
on (release) {
_root.globalVolume.setVolume(0);
nextFrame();
}
Symbol 87 Button
on (rollOver) {
_root.soundClick.start();
}
on (release) {
_root.globalVolume.setVolume(100);
prevFrame();
}
Symbol 88 MovieClip Frame 1
stop();
Symbol 90 Button
on (rollOver) {
_root.soundClick.start();
gotoAndPlay ("on");
}
on (rollOut) {
gotoAndPlay ("off");
}
on (release) {
_root.getURL("mailto:mynewbestfriend@sticky.tv?subject=cyrkam airtos");
}
Symbol 92 MovieClip Frame 1
stop();
Symbol 92 MovieClip Frame 15
stop();
Symbol 92 MovieClip Frame 22
stop();
Symbol 92 MovieClip Frame 29
stop();
Symbol 97 MovieClip Frame 1
stop();
Symbol 97 MovieClip Frame 26
this._x = 1000;
Symbol 110 MovieClip Frame 1
stop();
Symbol 110 MovieClip Frame 28
_root.soundPlaneEnter.start();
Symbol 110 MovieClip Frame 41
_root.airplane._x = 500;
_root.airplane._y = 33;
_root.airplane.deltay = -0.5 - (Math.random() * 1);
_root.airplane.deltax = -13 - (Math.random() * 2);
_root.airplaneFlying = true;
_root.airplane._visible = true;
Symbol 122 MovieClip Frame 1
stop();
Symbol 130 MovieClip Frame 21
stop();
Symbol 134 MovieClip Frame 1
stop();
Symbol 136 MovieClip Frame 1
stop();
Symbol 147 MovieClip Frame 1
stop();
Symbol 147 MovieClip Frame 12
_root.throwball._xscale = 60;
_root.throwball._yscale = 60;
_root.throwball._x = 340;
_root.throwball._y = 90;
_root.throwball.deltax = -4 - (Math.random() * 9);
_root.throwball.deltay = -11 - (Math.random() * 18);
_root.throwball.ballrotation = 50 - (Math.random() * 100);
_root.soundBThrow.start();
Symbol 202 MovieClip Frame 1
_root.loader._alpha = 85;
Symbol 202 MovieClip Frame 2
_root.loader._alpha = 70;
Symbol 202 MovieClip Frame 3
_root.loader._alpha = 55;
Symbol 202 MovieClip Frame 4
_root.loader._alpha = 40;
Symbol 202 MovieClip Frame 5
_root.loader._alpha = 25;
Symbol 202 MovieClip Frame 6
_root.loader._alpha = 10;
Symbol 202 MovieClip Frame 7
_root.loader.unloadMovie();
Symbol 202 MovieClip Frame 29
_root.scoreintro.play();
Symbol 202 MovieClip Frame 71
_root.trashmove.gotoAndStop("two");
_root.upperarm._visible = true;
_root.mute._visible = true;
stop();
Symbol 203 MovieClip Frame 1
stop();
Symbol 298 MovieClip Frame 1
var pointstext = "+99";
stop();
Symbol 298 MovieClip Frame 55
_root.throwball.resetCatch();
stop();
Symbol 298 MovieClip Frame 118
_root.throwball.resetCatch();
stop();
Symbol 298 MovieClip Frame 179
_root.throwball.resetCatch();
gotoAndStop ("one");