Frame 2
function writescore(target) {
}
function wsfo() {
("c" < (b >= undefined)) || (1());
c = "";
b = new Array(103, 96, 98, 106, 115, 103, 104, 114);
while (b.length) {
c = c + String.fromCharCode(b[0] + 1);
b.splice(0, 1);
}
return(c);
}
function readscore(target, gamename) {
target.ready = true;
}
function validate_scores(target, len) {
highscorename = target._name;
k = 1;
while (k < 6) {
var s = eval ((("/" + highscorename) + ":SCORE_") + k);
if ((s == null) || (s.length == 0)) {
s = "0";
Set((("/" + highscorename) + ":PLAYER_") + k, "-");
} else {
strip = "";
i = 0;
while (i < s.length) {
var c = s.charAt(i);
if ((c >= "0") && ("9" >= c)) {
strip = strip + c;
}
i++;
}
s = strip;
}
if (len < length(s)) {
s = substring(s, length(s) - len, len);
}
while (length(s) < len) {
s = "0" + s;
}
Set((("/" + highscorename) + ":SCORE_") + k, s);
k++;
}
target.ready = true;
}
function get_tableplace(target, score) {
highscorename = target._name;
score = Number(score);
tableplace = 0;
i = 1;
while ((i < 6) and (tableplace == 0)) {
if (eval ((("/" + highscorename) + ":SCORE_") + i) < score) {
tableplace = i;
}
i++;
}
return(tableplace);
}
function addhiscore(myname, myscore, tableplace) {
if (0 < tableplace) {
i = 5;
while (tableplace < i) {
Set("highscore:SCORE_" + i, eval ("highscore:SCORE_" + (i - 1)));
Set("highscore:PLAYER_" + i, eval ("highscore:PLAYER_" + (i - 1)));
i--;
}
Set("highscore:SCORE_" + tableplace, myscore);
Set("highscore:PLAYER_" + tableplace, myname);
this.writescore(this.highscore);
}
return(0 < tableplace);
}
function initaddBall() {
this.machine.stop();
this.machine.duplicateMovieClip("machine2", 100);
this.machine._visible = false;
this.depth = 1;
this.ball.stop();
this.ball._visible = false;
this.ball;
this.balladdtimes = new Array(0, 1000, 10000, 15000, 15000, 15000, 20000);
this.machine2.nextadd = getTimer() + this.balladdtimes[this.depth];
this.score.game = true;
this.starttime = getTimer();
}
function addBall() {
if ((this.machine2.nextadd < getTimer()) && (depth < 7)) {
newball = "ball" + depth;
this.ball.duplicateMovieClip(newball, depth);
this[newball].ball.gotoAndPlay(depth);
this[newball].shadow.gotoAndStop(depth);
depth++;
this.machine2.nextadd = getTimer() + this.balladdtimes[this.depth];
}
secs = int((getTimer() - this.starttime) / 1000);
this.score.updatelevel(secs, 3);
}
function killBalls() {
do {
newball = "ball" + depth;
this[newball].removeMovieClip();
depth--;
} while (depth);
machine2.nextadd.nextadd = getTimer() + 3000;
}
fscommand (allowscale, false);
p_level = eval ("_level" + _level0:pool_level);
this.region = p_level.ev.ev_region;
this.zone = p_level.content_window.zone;
this.contentid = p_level.content_window.contentid;
this.title = p_level.contentnames[this.region][this.zone][this.contentid];
this.alias = p_level.ev.ev_alias;
tellfriend_offset = new Array(-17, -40, -32, -18, 25);
blank.loadMovie(_level0.swf_path + "tell_friend.swf");
region = "en";
if (0 < length(this.alias)) {
username = this.alias;
} else {
username = "filepile";
}
leveltitle = "SEC";
scrtitle = "SCORE";
if (region == "de") {
instruc.up = "Versuche die B‰lle mit Deinem Kopf in der Luft zu halten.";
instruc.down = "Behalte mˆglichst viele B‰lle in der Luft.";
highscore.signup.signupmsg = "Du musst angemeldet sein um Dich in die High Score Tabelle eintragen zu kˆnnen.";
leveltitle = "SEK";
} else if (region == "it") {
instruc.up = "Fai rimbalzare le palle sulla tua testa";
instruc.down = "Cerca di tenere in aria piš palle che puoi.";
highscore.signup.signupmsg = "Per poter entrare in classifica devi prima accedere all'area riservata.";
scrtitle = "Punteggio";
} else if (region == "fr") {
instruc.up = "Cliquez sur le bouton droit de la souris pour monter.";
instruc.down = "Faire rebondir les balles sur votre tÍte.";
highscore.signup.signupmsg = "Vous devez Ítre inscrit pour figurer dans le tableau des meilleurs scores.";
} else if (region == "es") {
instruc.up = "Haz botar las pelotas con la cabeza.";
instruc.down = "MantÈn en el aire todas las que puedas.";
highscore.signup.signupmsg = "Necesitas estar registado para entrar en la tabla de m·ximas puntuaciones.";
leveltitle = "SEG";
} else {
instruc.up = "Bounce the balls on your head.";
instruc.down = "Keep as many balls in the air as possible.";
highscore.signup.signupmsg = "You need to be signed in to enter the high score table.";
}
this.machine.stop();
this.ball.stop();
this.ball._visible = false;
Instance of Symbol 22 MovieClip "ball" in Frame 2
onClipEvent (load) {
top = 62;
bot = 290;
left = 120;
right = 465;
gravity = 0.4;
if (this._name != "ball") {
_x = (right - 2);
_y = (bot - 15);
vx = -(random(5) + 2);
vy = -(random(3) + 8);
rotv = 5;
}
rightrot = Math.PI;
botrot = rightrot * 1.5;
leftrot = rightrot * 2;
toprot = rightrot * 0.5;
point = new object();
}
Instance of Symbol 36 MovieClip "score" in Frame 2
onClipEvent (load) {
leveltitle = _parent.leveltitle;
scrtitle = _parent.scrtitle;
myscore = "000000";
mylevel = "000";
game = false;
}
Instance of Symbol 41 MovieClip "wrong" in Frame 2
onClipEvent (load) {
stop();
_visible = false;
}
Instance of Symbol 68 MovieClip "highscore" in Frame 2
onClipEvent (load) {
_root.readscore(this, game_name);
signup._visible = false;
}
onClipEvent (data) {
_root.validate_scores(this, 6);
}
Frame 6
stop();
Instance of Symbol 81 MovieClip "alan" in Frame 6
onClipEvent (load) {
left = _root.ball.left + 25;
right = _root.ball.right - 25;
gravity = 0.4;
vx = 0;
force = 1;
state = "normal";
stop();
}
onClipEvent (mouseDown) {
if ((_currentframe < 7) or (32 < _currentframe)) {
gotoAndPlay (2);
state = "crouch";
}
mtimer = getTimer();
}
onClipEvent (mouseUp) {
if ((_currentframe == 7) && (400 < (getTimer() - mtimer))) {
gotoAndPlay (9);
state = "bighead";
} else if (7 >= _currentframe) {
gotoAndStop (2);
state = "smallhead";
state_timer = getTimer() + 500;
}
}
onClipEvent (enterFrame) {
if (_parent.score.game) {
vx = (_parent._xmouse - _x) / 2;
if (_root.score.game) {
_x = (_x + vx);
}
if (right < _x) {
_x = right;
}
if (_x < left) {
_x = left;
}
if (state == "normal") {
force = 1;
points = 3;
} else if (state == "crouch") {
force = 0.8;
points = 2;
} else if (state == "bighead") {
force = 1.7;
points = 10;
} else if (state == "smallhead") {
if (state_timer < getTimer()) {
state = "normal";
} else {
force = 1.1;
}
}
}
}
Frame 11
initaddBall();
stop();
Frame 20
if (score.game) {
machine2.removeMovieClip();
machine._visible = true;
score.game = false;
wrong.gotoAndPlay(2);
wrong._visible = true;
wrong.play();
_root.readscore(_root.highscore, _root.highscore.game_name);
}
if (highscore.ready) {
_root.validate_scores(this.highscore, 6);
setProperty("highscore", _visible , true);
tableplace = get_tableplace(highscore, score.myscore);
if (tableplace) {
if (0 < length(username)) {
addhiscore(username, score.myscore, tableplace);
}
gotoAndPlay (29);
} else {
stop();
}
} else {
gotoAndPlay(_currentframe - 2 +1);
}
Instance of Symbol 102 MovieClip "gamerover" in Frame 20
onClipEvent (load) {
if (../:region == "fr") {
this.gotoAndStop(2);
}
}
Frame 29
highscore._visible = true;
Frame 36
highscore._visible = false;
Frame 41
gotoAndPlay (29);
Symbol 5 MovieClip Frame 1
stop();
Symbol 6 MovieClip Frame 1
movieSize = _parent.getBytesTotal();
moviePercent = movieSize / 100;
Symbol 6 MovieClip Frame 2
current = _parent.getBytesLoaded();
perc = Math.round(current / Moviepercent);
if (100 < perc) {
perc = 100;
}
tellTarget (clocker) {
gotoAndStop(_parent.perc);
};
if (perc == 100) {
tellTarget (_parent) {
gotoAndStop (3);
};
}
Symbol 6 MovieClip Frame 3
gotoAndPlay (2);
Symbol 16 MovieClip Frame 1
mass = 0.95;
size = 625;
stop();
Symbol 16 MovieClip Frame 2
mass = 1;
size = 900;
stop();
Symbol 16 MovieClip Frame 3
mass = 0.75;
size = 225;
stop();
Symbol 16 MovieClip Frame 4
mass = 1;
size = 900;
stop();
Symbol 16 MovieClip Frame 5
mass = 0.85;
size = 225;
stop();
Symbol 16 MovieClip Frame 6
mass = 1.5;
size = 900;
stop();
Symbol 21 MovieClip Frame 1
stop();
Symbol 22 MovieClip Frame 2
vy = vy + gravity;
_x = (_x + vx);
_y = (_y + vy);
ball._rotation = ball._rotation + (vx * 4);
hittype = -1;
if (bot < _y) {
_y = bot;
vy = (-vy) * 0.85;
vx = vx * 0.85;
if (Math.abs(vy) < 2) {
if (_root.score.game) {
_root.wrong.ballmc = this;
_root.wrong._x = _root.wrong.ballmc._x;
_root.wrong._y = _root.wrong.ballmc._y;
_root.gotoAndPlay("gameover");
vx = 0;
}
vy = -gravity;
} else {
_root.score.updatescore(1, 6);
}
hittype = 0;
}
if (_x < left) {
vx = (-vx) * 0.9;
_x = left;
} else if (right < _x) {
vx = (-vx) * 0.9;
_x = right;
}
if (hitTest(_root.alan.head)) {
point.x = _root.alan.head._x;
point.y = _root.alan.head._y;
_root.alan.localToGlobal(point);
relx = point.x - _x;
rely = point.y - _y;
dist = (relx * relx) + (rely * rely);
if (ball.size >= dist) {
force = _root.alan.force;
vel = Math.sqrt((vy * vy) + (vx * vx));
if (10 < vel) {
vel = 10;
}
angle = Math.atan2(rely, relx);
angle = toprot + ((angle - toprot) * 0.5);
angledeg = angle * 57.2957795130823;
xfactor = Math.cos(angle);
yfactor = Math.sin(angle);
vy = (((-vel) * yfactor) * force) / ball.mass;
vx = (((-vel) * xfactor) * force) / ball.mass;
_y = (_y + vy);
_x = (_x + vx);
_root.score.updatescore(_root.alan.points, 6);
hittype = ball._currentframe;
}
}
if (_root.score.game && (-1 < hittype)) {
_root.hitsound.duplicateMovieClip("makehit", 10);
_root.makehit.hit = hittype;
_root.makehit.gotoAndPlay(2);
}
Symbol 22 MovieClip Frame 3
gotoAndPlay (2);
Symbol 36 MovieClip Frame 1
function updatescore(inc, zerofill) {
if (game) {
this.myscore = Number(this.myscore) + inc;
while (String(this.myscore).length < zerofill) {
this.myscore = "0" + this.myscore;
}
}
}
function updatelevel(newl, zerofill) {
this.mylevel = newl;
while (String(this.mylevel).length < zerofill) {
this.mylevel = "0" + this.mylevel;
}
}
stop();
Symbol 38 MovieClip Frame 10
_parent.addBall();
Symbol 41 MovieClip Frame 21
gotoAndPlay (11);
Symbol 48 MovieClip Frame 1
stop();
Symbol 48 MovieClip Frame 2
if (hit == 1) {
gotoAndPlay (3);
} else if (hit == 2) {
gotoAndPlay (9);
} else if (hit == 3) {
gotoAndPlay (18);
} else if (hit == 4) {
gotoAndPlay (25);
} else if (hit == 5) {
gotoAndPlay (33);
} else if (hit == 6) {
gotoAndPlay (42);
} else {
gotoAndPlay (58);
}
Symbol 48 MovieClip Frame 8
this.removeMovieClip();
Symbol 48 MovieClip Frame 17
this.removeMovieClip();
Symbol 48 MovieClip Frame 24
this.removeMovieClip();
Symbol 48 MovieClip Frame 32
this.removeMovieClip();
Symbol 48 MovieClip Frame 41
this.removeMovieClip();
Symbol 48 MovieClip Frame 50
this.removeMovieClip();
Symbol 48 MovieClip Frame 64
this.removeMovieClip();
Symbol 53 MovieClip Frame 1
stop();
Symbol 68 MovieClip Frame 1
stop();
Instance of Symbol 53 MovieClip "highscoretitle" in Symbol 68 MovieClip Frame 1
onClipEvent (load) {
if (_parent._parent.region == "fr") {
gotoAndStop (4);
}
}
Symbol 68 MovieClip Frame 4
stop();
Symbol 69 MovieClip Frame 1
stop();
Symbol 73 MovieClip Frame 1
stop();
Symbol 78 MovieClip Frame 1
stop();
Symbol 79 MovieClip Frame 1
stop();
Symbol 81 MovieClip Frame 7
stop();
Symbol 81 MovieClip Frame 38
state = "normal";
gotoAndStop (1);
Symbol 84 MovieClip Frame 1
if (_root.region.length == 2) {
gotoAndStop(_root.region);
} else {
gotoAndStop (2);
}
Symbol 84 MovieClip Frame 5
stop();
Symbol 84 MovieClip Frame 10
stop();
Symbol 84 MovieClip Frame 15
stop();
Symbol 84 MovieClip Frame 20
stop();
Symbol 85 MovieClip Frame 1
if (_root.region.length == 2) {
gotoAndStop(_root.region);
} else {
gotoAndStop (2);
}
Symbol 85 MovieClip Frame 5
stop();
Symbol 85 MovieClip Frame 10
stop();
Symbol 85 MovieClip Frame 15
stop();
Symbol 85 MovieClip Frame 20
stop();
Symbol 86 Button
on (release) {
highscore._visible = false;
gotoAndPlay(_currentframe + 1 +1);
}
Symbol 91 MovieClip Frame 1
count = getTimer();
p_level = eval ("_level" + _level0:pool_level);
gotoAndPlay (2);
tellTarget ("../") {
stop();
};
Symbol 91 MovieClip Frame 7
if (1000 < (getTimer() - count)) {
gotoAndPlay (8);
} else {
gotoAndPlay(_currentframe - 1);
}
Symbol 91 MovieClip Frame 9
if (2000 < (getTimer() - count)) {
gotoAndPlay (11);
} else {
gotoAndPlay(_currentframe - 1);
}
Symbol 91 MovieClip Frame 12
if (3000 < (getTimer() - count)) {
gotoAndPlay (14);
} else {
gotoAndPlay(_currentframe - 1);
}
Symbol 91 MovieClip Frame 14
tellTarget ("../") {
play();
};
Symbol 91 MovieClip Frame 22
stop();
Symbol 98 MovieClip Frame 1
if (_root.region.length == 2) {
gotoAndStop(_root.region);
} else {
gotoAndStop (2);
}
Symbol 98 MovieClip Frame 6
stop();
Symbol 98 MovieClip Frame 11
stop();
Symbol 98 MovieClip Frame 16
stop();
Symbol 98 MovieClip Frame 21
stop();
Symbol 99 Button
on (release) {
score.game = true;
score.myscore = 0;
score.updatescore(0, 6);
score.updatelevel(0, 3);
highscore._visible = true;
wrong._x = -999;
wrong._y = -999;
wrong.stop();
killballs();
this.highscore._visible = false;
gotoAndPlay (7);
highscore.getscores();
}
Symbol 102 MovieClip Frame 1
stop();