Frame 1
loaded = _root.getBytesLoaded();
total = _root.getBytesTotal();
rate = Math.ceil((100 / total) * loaded);
barra._xscale = rate;
trace(rate);
if (rate > 99) {
_root.gotoAndPlay(3);
}
if (countAdd == undefined) {
myVars = new LoadVars();
myVars.SendAndLoad("http://www.naive.it/counter/count.php?key=equilibrium", myVars, "POST");
countAdd = true;
}
Instance of Symbol 30 MovieClip "barra" in Frame 1
onClipEvent (enterFrame) {
}
Frame 2
gotoAndPlay (1);
Frame 3
fscommand ("showmenu", "false");
bgm = new Sound();
bgm.attachSound("bgm");
musicstarted = false;
stopAllSounds();
stop();
Frame 4
_root.score = 0;
_root.lives = 3;
stopAllSounds();
stop();
Instance of Symbol 125 MovieClip "corda" in Frame 5
onClipEvent (enterFrame) {
overRid = _root.corda.hitTest(_root.pg);
diffLev = Math.floor(_root.pg._y - _root.pg.getGroundLevel());
currFr = Math.floor(this.dragBox._y - 6.75) + 10;
_root.var1 = force;
if (dragging) {
_root.corda.gotoAndStop(currFr);
releasing = false;
if (_root.pg.jumping == false) {
_root.pg.currY = currFr - 10;
_root.pg.aniState = 0;
}
}
if (((currFr > 10) && (!dragging)) && (!releasing)) {
if (_root.pg.jumping == false) {
force = currFr - 13;
_root.pg.currY = force;
_root.pg.jumping = true;
_root.pg.aniState = 0;
}
if (tensionTime < 100) {
_root.pg.currY = 10;
}
releasing = true;
this.gotoAndPlay("release");
}
}
Instance of Symbol 134 MovieClip "vite" in Frame 5
onClipEvent (enterFrame) {
if (_root.lives <= 0) {
_root.gotoAndStop("gameover");
}
if (_root.lives < 4) {
this.gotoAndPlay(_root.lives + 1);
} else {
this.gotoAndPlay(5);
}
}
Instance of Symbol 137 MovieClip "indScore" in Frame 5
onClipEvent (load) {
_root.punteggio = 0;
relScore = 0;
}
onClipEvent (enterFrame) {
this.punteggio = _root.punteggio;
if (_root.pg.balancing == true) {
relScore = relScore + 0.2;
_root.punteggio = Math.floor(relScore);
}
}
Instance of Symbol 139 MovieClip "scoreshow" in Frame 5
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
this._x = _root.pg._x;
this._y = _root.pg._y - 40;
}
Frame 6
_root.titles.gotoAndPlay(2);
if ((musicstarted == undefined) || (musicstarted == false)) {
bgm.start(0, 999);
musicstarted = true;
}
stop();
Instance of Symbol 147 MovieClip in Frame 6
onClipEvent (load) {
function createObject() {
numoggetti = int(onde / 10) + 1;
if (numoggetti > 3) {
numoggetti = 3;
}
onde++;
conteggio++;
if (conteggio > limLife) {
vitapossibile = true;
} else {
vitapossibile = false;
}
n = 1;
while (n <= numoggetti) {
tipo = defType();
duplicateMovieClip (_root.container.oggetto, "oggetto" + i, i + 1000);
_root.container["oggetto" + i]._x = -(100 * (n - 1));
_root.container["oggetto" + i]._y = Math.floor(random(370) + 50);
_root.container["oggetto" + i].gotoAndPlay(tipo);
_root.container["oggetto" + i].tipo = tipo;
_root.container["oggetto" + i].attivato = true;
i++;
if (i > 50) {
i = 1;
}
n++;
}
}
function defType() {
if (vitapossibile == true) {
type = Math.floor(int(random(20) + 1));
if (type > 11) {
vitapossibile = false;
limLife = limLife * 2;
conteggio = 0;
return(3);
}
} else {
type = Math.floor(int(random(20) + 1));
if ((type > 10) && (type <= 20)) {
return(2);
}
return(1);
}
}
function isTime(interval) {
return((_root.currTime % interval) == 0);
}
i = 1;
onde = 1;
limLife = 10;
_root.interval = 2;
}
onClipEvent (enterFrame) {
if (_root.giocofermo == false) {
_root.currTime = Math.floor(getTimer() / 1000);
if (isTime(_root.interval) == true) {
if (oggettocreato == false) {
createObject();
oggettocreato = true;
}
} else {
oggettocreato = false;
}
}
}
Instance of Symbol 160 MovieClip "combo" in Frame 6
onClipEvent (enterFrame) {
this.comboitem = _root.comboitem;
}
Instance of Symbol 162 MovieClip "balanceInd" in Frame 6
onClipEvent (load) {
this._visible = false;
}
Instance of Symbol 98 MovieClip "pg" in Frame 6
onClipEvent (load) {
function init() {
this._x = this.startX;
this._y = this.startY;
_root.balancing = false;
_root.corda.dragging = false;
this.falling = false;
this.jumping = false;
this.hit = false;
this.step = 2;
this.balance = 0;
_root.onCombo = false;
}
function calcBalance() {
dx = Math.ceil((this._x - _root._xmouse) / 2);
if ((dx > -1) && (dx < 1)) {
return(0);
}
return(Math.ceil(dx));
}
function getEquilibrium() {
if (oldDir != dir()) {
step = 1.5 * dir();
oldDir = dir();
} else {
step = step * 1.08;
if (dir() > 0) {
step = -Math.abs(step);
}
if (dir() < 0) {
step = Math.abs(step);
}
}
balance = balance + step;
if (balance > 200) {
balance = 200;
}
if (balance < -200) {
balance = -200;
}
return(balance);
}
function dir() {
d = calcBalance();
if (d > 0) {
return(1);
}
if (d < 0) {
return(-1);
}
if (d == 0) {
return(0);
}
}
function getGroundLevel() {
return((_root.corda.dragBox._y + _root.corda._y) - 50);
}
function pgPhysics() {
if (this.hit == true) {
this.gotoAndPlay("falling");
this._rotation = 0;
this.falling = true;
this.fallstep = 1;
_root.giocofermo = true;
}
if (anistate == 0) {
if (dragging == true) {
this._y = getGroundLevel();
}
} else if (aniState == 1) {
if (currY <= 0) {
currY = 15;
}
this._y = this._y - Math.floor(currY / 2);
currY = currY / 1.135;
} else if (aniState == 2) {
this._y = this._y + Math.floor(currY * 1.5);
currY = currY * 1.17;
} else if (aniState == 3) {
if (!_root.corda.releasing) {
firstJump = true;
this.gotoAndPlay("stand");
currY = 0;
step = 1;
jumping = false;
} else {
aniState = 0;
}
}
}
_root.giocofermo = true;
this.startY = Math.floor(this._y);
this.startX = Math.floor(this._x);
init();
}
onClipEvent (enterFrame) {
dragging = _root.corda.dragging;
if (_root.giocofermo == false) {
pgPhysics();
balancing = (jumping == false) && (dragging == false);
if (balancing == true) {
_root.onCombo = false;
if ((_root.comboItem > 1) && (comboseen == false)) {
_root.combo.gotoAndPlay("go");
comboseen = true;
}
jumping = false;
aniState = 0;
if (currY > 101) {
currY = 101;
}
this._y = startY + currY;
bal = getEquilibrium();
this._rotation = bal / 10;
_root.pg.indBal._x = 3 + (balance / 2);
myColor = new Color(_root.balanceInd);
value = myColor.getRGB().toString(16);
if (Math.abs(balance) > 120) {
myColor.setRGB(16711680);
} else {
myColor.setRGB(14540253);
}
if (Math.abs(balance) > 190) {
this.stop();
this.falling = true;
this.fallstep = 1;
_root.giocofermo = true;
}
}
if (jumping == true) {
comboseen = false;
balancing = false;
if (aniState == 0) {
this.gotoAndPlay("jump");
maxY = currY;
aniState = 1;
}
if ((aniState == 1) && (Math.floor(currY) == 0)) {
this.gotoAndPlay("descend");
aniState = 2;
}
if ((aniState == 2) && (this._y > getGroundLevel())) {
this._y = getGroundLevel();
if ((_root.corda.dragging == false) && (_root.corda.releasing == false)) {
_root.corda.gotoAndPlay("bounce");
}
aniState = 3;
}
}
} else {
_root.pg.indBal._visible = false;
if (falling) {
if (this._y > 600) {
_root.lives--;
if (_root.lives >= 0) {
_root.gotoAndPlay("pregame");
} else {
_root.gotoAndStop("gameover");
}
falling = false;
} else {
this._y = this._y + fallstep;
fallstep = fallstep * 1.1;
}
}
}
}
Frame 7
_root.titles.gotoAndPlay(3);
stopAllSounds();
musicstarted = false;
stop();
Instance of Symbol 147 MovieClip in Frame 7
onClipEvent (load) {
function createObject() {
numoggetti = int(onde / 10) + 1;
if (numoggetti > 3) {
numoggetti = 3;
}
onde++;
n = 1;
while (n <= numoggetti) {
tipo = defType();
thisx = Math.floor(int(random((360 / numoggetti) * n) + 50));
duplicateMovieClip (_root.container.oggetto, "oggetto" + i, i + 1000);
_root.container["oggetto" + i]._x = 0;
_root.container["oggetto" + i]._y = Math.floor(random(370) + 50);
_root.container["oggetto" + i].gotoAndPlay(tipo);
_root.container["oggetto" + i].tipo = tipo;
_root.container["oggetto" + i].attivato = true;
i++;
if (i > 50) {
i = 1;
}
n++;
}
}
function defType() {
type = Math.floor(int(random(8) + 1));
if (type > 5) {
return(2);
}
return(1);
}
function isTime(interval) {
return((_root.currTime % interval) == 0);
}
i = 1;
onde = 1;
_root.interval = 4;
_root.combocominciata = false;
_root.score = 0;
}
onClipEvent (enterFrame) {
_root.currTime = Math.floor(getTimer() / 1000);
if (isTime(_root.interval) == true) {
if (oggettocreato == false) {
createObject();
oggettocreato = true;
}
} else {
oggettocreato = false;
}
if ((_root.combocominciata == true) && (_root.currTime > (_root.comboStime + 1))) {
_root.combocominciata = false;
if (_root.onComboItems > 1) {
_root.box.combo._visible = true;
_root.box.combo.combovalue.text = "+" + (200 * _root.onComboItems);
_root.score = _root.score + (200 * _root.onComboItems);
_root.box.combo.play();
_root.onComboItems = 0;
}
}
}
Frame 8
stopAllSounds();
stop();
Symbol 50 Button
on (release) {
this.play();
}
Symbol 51 MovieClip Frame 63
stop();
Symbol 51 MovieClip Frame 90
_root.gotoAndPlay("htp");
Symbol 64 Button
on (release) {
this.play();
}
Instance of Symbol 91 MovieClip "indBal" in Symbol 98 MovieClip Frame 1
onClipEvent (enterFrame) {
if ((_root.pg.balancing == true) && (_root.pg.jumping != true)) {
_root.balanceInd._visible = true;
} else {
_root.balanceInd._visible = false;
}
}
Symbol 98 MovieClip Frame 50
gotoAndPlay (1);
Symbol 98 MovieClip Frame 59
stop();
Symbol 98 MovieClip Frame 68
stop();
Symbol 106 MovieClip Frame 10
stop();
Symbol 106 MovieClip Frame 20
_root.gotoAndPlay("game");
Symbol 110 Button
on (press) {
if (_root.giocofermo == false) {
startDrag (dragBox, true, 0, 5, 0, 101);
_root.corda.dragging = true;
} else {
_root.corda.dragging = false;
}
onTime = getTimer();
}
on (release) {
_root.corda.tensionTime = getTimer() - onTime;
stopDrag();
_root.corda.dragging = false;
}
Symbol 123 Button
on (press) {
if (_root.giocofermo == false) {
startDrag (dragBox, true, 0, 5, 0, 101);
_root.corda.gotoAndPlay(10);
_root.corda.dragging = true;
} else {
_root.corda.dragging = false;
}
onTime = getTimer();
}
on (release) {
_root.corda.tensionTime = getTimer() - onTime;
stopDrag();
_root.corda.dragging = false;
}
Symbol 125 MovieClip Frame 10
stop();
Symbol 125 MovieClip Frame 11
stop();
Symbol 125 MovieClip Frame 12
stop();
Symbol 125 MovieClip Frame 13
stop();
Symbol 125 MovieClip Frame 14
stop();
Symbol 125 MovieClip Frame 15
stop();
Symbol 125 MovieClip Frame 16
stop();
Symbol 125 MovieClip Frame 17
stop();
Symbol 125 MovieClip Frame 18
stop();
Symbol 125 MovieClip Frame 19
stop();
Symbol 125 MovieClip Frame 20
stop();
Symbol 125 MovieClip Frame 21
stop();
Symbol 125 MovieClip Frame 22
stop();
Symbol 125 MovieClip Frame 23
stop();
Symbol 125 MovieClip Frame 24
stop();
Symbol 125 MovieClip Frame 25
stop();
Symbol 125 MovieClip Frame 26
stop();
Symbol 125 MovieClip Frame 27
stop();
Symbol 125 MovieClip Frame 28
stop();
Symbol 125 MovieClip Frame 29
stop();
Symbol 125 MovieClip Frame 30
stop();
Symbol 125 MovieClip Frame 31
stop();
Symbol 125 MovieClip Frame 32
stop();
Symbol 125 MovieClip Frame 33
stop();
Symbol 125 MovieClip Frame 34
stop();
Symbol 125 MovieClip Frame 35
stop();
Symbol 125 MovieClip Frame 36
stop();
Symbol 125 MovieClip Frame 37
stop();
Symbol 125 MovieClip Frame 38
stop();
Symbol 125 MovieClip Frame 39
stop();
Symbol 125 MovieClip Frame 40
stop();
Symbol 125 MovieClip Frame 41
stop();
Symbol 125 MovieClip Frame 42
stop();
Symbol 125 MovieClip Frame 43
stop();
Symbol 125 MovieClip Frame 44
stop();
Symbol 125 MovieClip Frame 45
stop();
Symbol 125 MovieClip Frame 46
stop();
Symbol 125 MovieClip Frame 47
stop();
Symbol 125 MovieClip Frame 48
stop();
Symbol 125 MovieClip Frame 49
stop();
Symbol 125 MovieClip Frame 50
stop();
Symbol 125 MovieClip Frame 51
stop();
Symbol 125 MovieClip Frame 52
stop();
Symbol 125 MovieClip Frame 53
stop();
Symbol 125 MovieClip Frame 54
stop();
Symbol 125 MovieClip Frame 55
stop();
Symbol 125 MovieClip Frame 56
stop();
Symbol 125 MovieClip Frame 57
stop();
Symbol 125 MovieClip Frame 58
stop();
Symbol 125 MovieClip Frame 59
stop();
Symbol 125 MovieClip Frame 60
stop();
Symbol 125 MovieClip Frame 61
stop();
Symbol 125 MovieClip Frame 62
stop();
Symbol 125 MovieClip Frame 63
stop();
Symbol 125 MovieClip Frame 64
stop();
Symbol 125 MovieClip Frame 65
stop();
Symbol 125 MovieClip Frame 66
stop();
Symbol 125 MovieClip Frame 67
stop();
Symbol 125 MovieClip Frame 68
stop();
Symbol 125 MovieClip Frame 69
stop();
Symbol 125 MovieClip Frame 70
stop();
Symbol 125 MovieClip Frame 71
stop();
Symbol 125 MovieClip Frame 72
stop();
Symbol 125 MovieClip Frame 73
stop();
Symbol 125 MovieClip Frame 74
stop();
Symbol 125 MovieClip Frame 75
stop();
Symbol 125 MovieClip Frame 76
stop();
Symbol 125 MovieClip Frame 77
stop();
Symbol 125 MovieClip Frame 78
stop();
Symbol 125 MovieClip Frame 79
stop();
Symbol 125 MovieClip Frame 80
stop();
Symbol 125 MovieClip Frame 81
stop();
Symbol 125 MovieClip Frame 82
stop();
Symbol 125 MovieClip Frame 83
stop();
Symbol 125 MovieClip Frame 84
stop();
Symbol 125 MovieClip Frame 85
stop();
Symbol 125 MovieClip Frame 86
stop();
Symbol 125 MovieClip Frame 87
stop();
Symbol 125 MovieClip Frame 88
stop();
Symbol 125 MovieClip Frame 89
stop();
Symbol 125 MovieClip Frame 90
stop();
Symbol 125 MovieClip Frame 91
stop();
Symbol 125 MovieClip Frame 92
stop();
Symbol 125 MovieClip Frame 93
stop();
Symbol 125 MovieClip Frame 94
stop();
Symbol 125 MovieClip Frame 95
stop();
Symbol 125 MovieClip Frame 96
stop();
Symbol 125 MovieClip Frame 97
stop();
Symbol 125 MovieClip Frame 98
stop();
Symbol 125 MovieClip Frame 99
stop();
Symbol 125 MovieClip Frame 100
stop();
Symbol 125 MovieClip Frame 101
stop();
Symbol 125 MovieClip Frame 102
stop();
Symbol 125 MovieClip Frame 103
stop();
Symbol 125 MovieClip Frame 104
stop();
Symbol 125 MovieClip Frame 105
stop();
Symbol 125 MovieClip Frame 106
stop();
Symbol 125 MovieClip Frame 107
stop();
Symbol 125 MovieClip Frame 108
stop();
Symbol 125 MovieClip Frame 109
stop();
Symbol 125 MovieClip Frame 110
stop();
Symbol 125 MovieClip Frame 111
stop();
Symbol 125 MovieClip Frame 112
stop();
Symbol 125 MovieClip Frame 113
stop();
Symbol 125 MovieClip Frame 114
stop();
Symbol 125 MovieClip Frame 115
stop();
Symbol 125 MovieClip Frame 116
goon = false;
Symbol 125 MovieClip Frame 121
goon = true;
Symbol 125 MovieClip Frame 126
_root.corda.releasing = false;
Symbol 125 MovieClip Frame 136
gotoAndPlay (1);
Symbol 125 MovieClip Frame 141
gotoAndPlay (1);
Symbol 134 MovieClip Frame 1
stop();
Symbol 134 MovieClip Frame 2
stop();
Symbol 134 MovieClip Frame 3
stop();
Symbol 134 MovieClip Frame 4
stop();
Symbol 134 MovieClip Frame 5
stop();
Symbol 139 MovieClip Frame 1
this._visible = false;
stop();
Symbol 139 MovieClip Frame 21
gotoAndPlay (1);
Symbol 143 MovieClip Frame 1
stop();
Symbol 143 MovieClip Frame 2
stop();
Symbol 143 MovieClip Frame 3
stop();
Instance of Symbol 143 MovieClip "oggetto" in Symbol 144 MovieClip Frame 1
onClipEvent (load) {
xSpeed = 5;
scoreGiven = false;
this.dir = 1;
}
onClipEvent (enterFrame) {
if (this.attivato == true) {
this._x = this._x + (xSpeed * this.dir);
}
disX = Math.abs(this._x - _root.pg._x);
disY = Math.abs(this._y - _root.pg._y);
near = (disX < 40) && (disY < 70);
if (this.hitTest(_root.pg.hotspot)) {
switch (this.tipo) {
case 1 :
thisbonus = 50 - Math.abs(Math.floor(this._y / 10));
realbonus = (thisbonus - (thisbonus % 5)) + 5;
if (_root.onCombo == false) {
_root.comboitem = 1;
_root.onCombo = true;
} else {
_root.comboitem = _root.comboitem + 1;
}
_root.soundBox.gotoAndPlay("ok");
_root.indScore.relScore = _root.indScore.relScore + realbonus;
_root.scoreshow.value = ("+" + realbonus) + "pts";
_root.scoreshow._visible = true;
_root.scoreshow.play();
break;
case 2 :
_root.soundBox.gotoAndPlay("no");
_root.pg.hit = true;
break;
case 3 :
_root.soundBox.gotoAndPlay("ok");
_root.lives++;
_root.scoreshow.value = "Life";
_root.scoreshow._visible = true;
_root.scoreshow.play();
}
this.removeMovieClip();
}
}
Symbol 150 Button
on (release) {
this.play();
}
Symbol 151 MovieClip Frame 40
stop();
Symbol 151 MovieClip Frame 45
_root.giocofermo = false;
_root.pg.indBal._visible = true;
_root.pg.init();
_parent.gotoAndStop(1);
Symbol 155 Button
on (release) {
this.play();
}
Symbol 156 MovieClip Frame 35
stop();
Symbol 156 MovieClip Frame 40
_root.punteggioinviato = false;
_root.gotoAndPlay("highscore");
_parent.gotoAndStop(1);
Symbol 157 MovieClip Frame 1
stop();
Symbol 157 MovieClip Frame 2
_root.pg.init();
stop();
Symbol 157 MovieClip Frame 3
_root.pg.init();
stop();
Symbol 160 MovieClip Frame 1
stop();
Symbol 160 MovieClip Frame 26
gotoAndPlay (1);
Symbol 166 MovieClip Frame 1
stop();
Symbol 166 MovieClip Frame 2
gotoAndPlay (1);
Symbol 166 MovieClip Frame 3
gotoAndPlay (1);
Symbol 244 Button
on (release) {
_root.gotoAndPlay("home");
}
Symbol 245 Button
on (release) {
if (_root.punteggioinviato == false) {
if ((length(_root.playername) > 2) && (_root.score != 0)) {
sendVar = new LoadVars();
sendVar.key = "equi";
sendVar.action = "a";
sendVar.nm = _root.playername;
sendVar.sc = _root.score;
sendVar.onLoad = function () {
_root.highscore.scoretable.fill();
_root.highscore.pulsend.enabled = false;
_root.highscore.yourscore._visible = false;
_root.highscore.yourname._visible = false;
_root.highscore.sendbut._visible = false;
};
sendVar.sendAndLoad("http://www.naive.it/hss/scores.php", sendVar, "POST");
_root.highscore.pulsend.enabled = false;
_root.punteggioinviato = true;
} else {
_root.highscore.pulsend.enabled = false;
_root.highscore.yourscore._visible = false;
_root.highscore.yourname._visible = false;
_root.highscore.sendbut._visible = false;
}
}
}
Symbol 246 MovieClip Frame 1
_root.score = _root.punteggio;
stop();
Instance of Symbol 225 MovieClip "scoretable" in Symbol 246 MovieClip Frame 1
onClipEvent (load) {
function fill() {
myVar = new LoadVars();
myVar.key = "equi";
myVar.action = "v";
myVar.view_type = "flash";
myVar.onLoad = function () {
for (var prop in this) {
_root.highscore.scoretable[prop] = this[prop];
}
_root.highscore.gotoAndPlay("show");
};
myVar.sendAndLoad("http://www.naive.it/hss/scores.php", _root.highscore.scoretable.myVar, "POST");
}
fill();
}
Symbol 246 MovieClip Frame 10
stop();