Frame 1
inertia = 0.8;
k = 0.7;
xp = 0.1;
Instance of Symbol 13 MovieClip "barra" in Frame 1
/* no clip actions */
Frame 3
koberts = int(this.getBytesLoaded() / 1024);
ktotal = int((this.getBytesTotal() / 1024) / 1);
porcentatge = int((koberts * 100) / ktotal);
x0 = barra._xscale;
x = (-x0) + porcentatge;
xp = (xp * inertia) + (x * k);
barra._xscale = barra._xscale + xp;
barra2._alpha = 100;
frase = ("Loading " + porcentatge) + "%";
if (koberts < ktotal) {
gotoAndPlay (2);
}
Frame 4
_root.soOn = true;
var musica = new Sound();
musica.attachSound("musicaBar\u00E7a.mp3");
musica.start(1, 1000);
onoff.onRelease = function () {
if (_root.soOn == true) {
musica.stop();
onoff.gotoAndStop(2);
_root.soOn = false;
} else {
musica.start(1, 100);
onoff.gotoAndStop(1);
_root.soOn = true;
}
};
onoff.onRollOver = function () {
this._width = 30;
this._height = 29.3;
};
onoff.onRollOut = function () {
this._width = 35;
this._height = 34.2;
};
stop();
_root.soOnInici = false;
jugar_bt.onRelease = function () {
nextFrame();
};
Frame 5
stop();
var clic = 0;
var nomenemic = new Array();
zp.onRelease = function () {
if (_root.clic < 3) {
_root.nomenemic[_root.clic] = "zp_mc";
_root.clic++;
zp_rollover._x = this._x - 3;
zp_rollover._y = this._y;
this.enabled = false;
_root["contrari" + _root.clic].gotoAndStop(2);
}
};
rajoy.onRelease = function () {
if (_root.clic < 3) {
_root.nomenemic[_root.clic] = "rajoy_mc";
_root.clic++;
rajoy_rollover._x = this._x - 3;
rajoy_rollover._y = this._y;
this.enabled = false;
_root["contrari" + _root.clic].gotoAndStop(3);
}
};
saura.onRelease = function () {
if (_root.clic < 3) {
_root.nomenemic[_root.clic] = "saura_mc";
_root.clic++;
saura_rollover._x = this._x;
saura_rollover._y = this._y;
this.enabled = false;
_root["contrari" + _root.clic].gotoAndStop(4);
}
};
rivera.onRelease = function () {
if (_root.clic < 3) {
_root.nomenemic[_root.clic] = "rivera_mc";
_root.clic++;
rivera_rollover._x = this._x;
rivera_rollover._y = this._y;
this.enabled = false;
_root["contrari" + _root.clic].gotoAndStop(5);
}
};
putin.onRelease = function () {
if (_root.clic < 3) {
_root.nomenemic[_root.clic] = "putin_mc";
_root.clic++;
putin_rollover._x = this._x - 3;
putin_rollover._y = this._y;
this.enabled = false;
_root["contrari" + _root.clic].gotoAndStop(6);
}
};
bush.onRelease = function () {
if (_root.clic < 3) {
_root.nomenemic[_root.clic] = "bush_mc";
_root.clic++;
bush_rollover._x = this._x - 3;
bush_rollover._y = this._y - 1;
this.enabled = false;
_root["contrari" + _root.clic].gotoAndStop(7);
}
};
monti.onRelease = function () {
if (_root.clic < 3) {
_root.nomenemic[_root.clic] = "monti_mc";
_root.clic++;
monti_rollover._x = this._x - 3;
monti_rollover._y = this._y;
this.enabled = false;
_root["contrari" + _root.clic].gotoAndStop(8);
}
};
mas.onRelease = function () {
if (_root.clic < 3) {
_root.nomenemic[_root.clic] = "mas_mc";
_root.clic++;
mas_rollover._x = this._x - 2;
mas_rollover._y = this._y;
this.enabled = false;
_root["contrari" + _root.clic].gotoAndStop(9);
}
};
carod.onRelease = function () {
if (_root.clic < 3) {
_root.nomenemic[_root.clic] = "carod_mc";
_root.clic++;
carod_rollover._x = this._x;
carod_rollover._y = this._y;
this.enabled = false;
_root["contrari" + _root.clic].gotoAndStop(10);
}
};
pique.onRelease = function () {
if (_root.clic < 3) {
_root.nomenemic[_root.clic] = "pique_mc";
_root.clic++;
pique_rollover._x = this._x - 1;
pique_rollover._y = this._y;
this.enabled = false;
_root["contrari" + _root.clic].gotoAndStop(11);
}
};
endavant_bt.onRelease = function () {
if (clic >= 1) {
_root.personatge = "caganer";
gotoAndPlay (12);
}
};
variablesPHP = new LoadVars();
variablesPHP.enemic1 = _root.nomenemic[0];
variablesPHP.enemic2 = _root.nomenemic[1];
variablesPHP.enemic3 = _root.nomenemic[2];
nino_rollover0._visible = false;
nino_rollover1._visible = false;
nino_rollover2._visible = false;
Frame 24
gotoAndStop (25);
Frame 25
function aleatori(min, max) {
var _local1 = Math.floor(Math.random() * ((max - min) + 1)) + min;
return(_local1);
}
function updateTimer() {
if (_root.prota.proteccio) {
if (segons >= 3) {
_root.prota.proteccio = false;
}
segons++;
} else {
segons = 0;
}
if (_root.mort || (_root.victoria)) {
segonsmort++;
}
}
function enemicdispara() {
tempaleatori = aleatori(0, array0.length);
auxaleatori = aleatori(0, numenemics);
if ((auxaleatori == 0) || (_root["array" + (auxaleatori - 1)][tempaleatori] == null)) {
indexprojectil++;
duplicateMovieClip (missilenemic_mc, "missilenemic" + indexprojectil, this.getNextHighestDepth());
framealeatori = aleatori(1, 6);
_root["missilenemic" + indexprojectil].gotoAndStop(framealeatori);
_root["missilenemic" + indexprojectil]._x = _root["array" + auxaleatori][tempaleatori]._x + (_root[("enemic" + auxaleatori) + "_mc"]._width / 2);
_root["missilenemic" + indexprojectil]._y = (_root["array" + auxaleatori][tempaleatori]._y + (_root[("enemic" + auxaleatori) + "_mc"]._height / 2)) + missilenemic_mc._height;
}
if (indexprojectil == 25) {
indexprojectil = 0;
}
}
function invaditbaixa() {
i = 0;
while (i < _root["array" + (numenemics - 1)].length) {
if (_root["array" + (numenemics - 1)][i] != null) {
k = 0;
while (k < numenemics) {
j = 0;
while (j < _root["array" + k].length) {
_root["array" + k][j]._y = _root["array" + k][j]._y + 1;
j++;
}
k++;
}
}
i++;
}
}
function baixaenemic() {
sortit = false;
i = 0;
while (i < cares) {
j = 0;
while (j < numenemics) {
if (_root["array" + j][i] != null) {
if ((_root["array" + j][i]._x >= (amplada_escenari - 50)) && (!tocadreta)) {
tocadreta = true;
tocaesquerra = false;
k = 0;
while (k < numenemics) {
j = 0;
while (j < _root["array" + k].length) {
_root["array" + k][j]._y = _root["array" + k][j]._y + vdescens;
j++;
}
k++;
}
sortit = true;
break;
}
if ((_root["array" + j][i]._x <= venemic) && (!tocaesquerra)) {
tocaesquerra = true;
tocadreta = false;
k = 0;
while (k < numenemics) {
j = 0;
while (j < _root["array" + k].length) {
_root["array" + k][j]._y = _root["array" + k][j]._y + vdescens;
j++;
}
k++;
}
sortit = true;
break;
}
}
j++;
}
if (sortit) {
break;
}
i++;
}
}
function mouenemic() {
if (prota.clip._visible) {
parat = false;
}
if (!parat) {
if (tocadreta) {
tocaesquerra = false;
j = 0;
while (j < _root["array" + estat].length) {
_root["array" + estat][j]._x = _root["array" + estat][j]._x - venemic;
k = 0;
while (k < numescuts) {
if (_root["array" + estat][j].hitTest(_root["escut" + k])) {
_root.estatescuts[k] = 5;
_root["escut" + k].gotoAndStop(5);
}
k++;
}
if (_root["array" + estat][j].hitTest(invade_mc)) {
invadit = true;
mort = true;
prota.setvides(0);
prota.clip.gotoAndPlay("mort");
}
j++;
}
temp++;
if (temp > avansaments) {
estat++;
temp = 0;
}
if (estat > numenemics) {
baixaenemic();
estat = 0;
temp = 0;
}
}
if (tocaesquerra) {
tocadreta = false;
j = 0;
while (j < _root["array" + estat].length) {
_root["array" + estat][j]._x = _root["array" + estat][j]._x + venemic;
k = 0;
while (k < numescuts) {
if (_root["array" + estat][j].hitTest(_root["escut" + k])) {
_root.estatescuts[k] = 5;
_root["escut" + k].gotoAndStop(5);
}
k++;
}
if (_root["array" + estat][j].hitTest(invade_mc)) {
invadit = true;
mort = true;
prota.setvides(0);
prota.clip.gotoAndPlay("mort");
}
j++;
}
temp++;
if (temp > avansaments) {
estat++;
temp = 0;
}
if (estat > numenemics) {
baixaenemic();
estat = 0;
temp = 0;
}
}
}
}
function dispara(missil_mc) {
indexprojectilprota++;
duplicateMovieClip (missil_mc, "missil" + indexprojectilprota, this.getNextHighestDepth());
if (_root.personatge == "reis") {
_root["missil" + indexprojectilprota]._x = (_root.prota.clip._x + (_root.prota.clip._width / 3)) + 5;
} else {
_root["missil" + indexprojectilprota]._x = _root.prota.clip._x + (_root.prota.clip._width / 2);
}
_root["missil" + indexprojectilprota]._y = _root.prota.clip._y - (_root.prota.clip._height / 2);
if (_root.indexprojectilprota == 25) {
_root.indexprojectilprota = 0;
}
}
function ranking() {
trace(("el nom: " + _root) - nom);
form_lv = new LoadVars();
form_lv.nom = _root.nom;
form_lv.punts = _root.punts;
form_lv.sendAndLoad("php/punts.php", form_lv, "POST");
form_lv.onLoad = function () {
i = 1;
while (i < 11) {
_root["punts" + i] = eval ("this.punts" + i);
_root["jugador" + i] = eval ("this.jugador" + i);
i++;
}
};
}
function rankingLoser() {
form_lv = new LoadVars();
form_lv.nom = _root.nom;
form_lv.punts = _root.punts;
form_lv.sendAndLoad("php/punts2.php", form_lv, "POST");
form_lv.onLoad = function () {
i = 1;
while (i < 11) {
_root["punts" + i] = eval ("this.punts" + i);
_root["jugador" + i] = eval ("this.jugador" + i);
i++;
}
};
}
function treurePopUps() {
victoria_catala._visible = false;
victoria_catala2._visible = false;
ranking_mc._visible = false;
tornar_jugar_mc._visible = false;
negre_mc._visible = false;
}
stop();
var intervalID = setInterval(updateTimer, 500);
var segons = 0;
var segonsmort = 0;
MovieClip.prototype.purgeVars = function () {
for (var _local2 in this) {
if (_local2 != "$version") {
trace("Deleted a var named " + _local2);
delete this[_local2];
}
}
};
iClip.gotoAndStop(2);
vida1._visible = false;
vida2._visible = false;
vida3._visible = false;
victoria_catala._visible = false;
victoria_catala2._visible = false;
ranking_mc._visible = false;
tornar_jugar_mc._visible = false;
negre_mc._visible = false;
var potencia_mcu;
potencia_mcu = potencia_mc;
var missil_mc;
var missil2_mc;
var victoria = false;
var mort = false;
var numescuts = 3;
var num_vides = 3;
var llargada_escenari = Stage.height;
var amplada_escenari = Stage.width;
var tocadreta = true;
var tocaesquerra = false;
var imouenemic = 0;
var invadit = false;
var prota = new Protagonista(num_vides, prota_mc);
potencia_mcu = potencia_mc;
missil_mc = caca_mc;
missil2_mc = cacagran_mc;
var vmissilprota = 12;
var indexprojectilprota = 0;
var venemic = 1;
var vdescens = 40;
var numenemics = 3;
var vmissil = 10;
var indexprojectil = 0;
var numprojectils = 2;
var puntsenemic = 10;
var estatescuts = new Array();
estatescuts[0] = 1;
estatescuts[1] = 1;
estatescuts[2] = 1;
var posiciox;
var posicioy = 300;
var array0 = new Array();
var array1 = new Array();
var array2 = new Array();
var array3 = new Array();
var amplada = (amplada_escenari - (bush_mc._width * 2));
var arraycont = new Array();
var cares = 0;
i = 0;
while (i < numenemics) {
posiciox = -10;
posicioy = (posicioy - bush_mc._height) - 10;
if (nomenemic[i] == undefined) {
nomenemic[i] = nomenemic[0];
}
nomenemic[i] = eval (nomenemic[i]);
trace("nomenemic[i] : " + nomenemic[i]);
trace(("posiciox+y: " + posiciox) + posicioy);
j = 0;
while (posiciox < amplada) {
duplicateMovieClip (nomenemic[i], ("enemic" + i) + j, posiciox + posicioy);
_root["array" + i][j] = eval (("enemic" + i) + j);
posiciox = posiciox + nomenemic[i]._width;
_root["array" + i][j]._x = posiciox;
_root["array" + i][j]._y = posicioy;
_root["array" + i][j].punts = puntsenemic;
j++;
}
cares = j;
puntsenemic = puntsenemic + 10;
i++;
}
var estat = 0;
var avansaments = 3;
var temp = 0;
var unavegada = false;
var mort2 = false;
tornar_jugar_mc.onRelease = function () {
_root.purgeVars();
gotoAndStop (5);
};
onEnterFrame = function () {
if (!mort) {
prota.esquerra = Key.isDown(37);
prota.dreta = Key.isDown(39);
prota.espai = Key.isDown(32);
if (prota.dreta) {
prota.moute(10, 0);
}
if (prota.esquerra) {
prota.moute(-10, 0);
}
if (prota.espai) {
if (prota.estat == "normal") {
if (!prota.esperant) {
prota.clip.gotoAndPlay("disparar");
prota.esperant = true;
potencia_mcu.play();
}
} else if (prota.estat == "tocat") {
prota.estat = "normal";
}
} else {
if (prota.estat == "bomba") {
prota.clip.gotoAndPlay("disparar2");
prota.estat = "disparant";
potencia_mcu.gotoAndStop(1);
} else {
potencia_mcu.gotoAndStop(1);
}
prota.esperant = false;
}
mouenemic();
if (prota.clip._visible) {
if (aleatori(0, numprojectils) == 1) {
enemicdispara();
}
}
} else {
if (!mort2) {
mort2 = true;
prota.clip.gotoAndPlay("mort");
}
if (((!unavegada) && (segonsmort >= 6)) && (!victoria)) {
unavegada = true;
negre_mc._visible = true;
i = 0;
while (i < _root["array" + (numenemics - 1)].length) {
if (_root["array" + (numenemics - 1)][i] != null) {
k = 0;
while (k < numenemics) {
j = 0;
while (j < _root["array" + k].length) {
_root["array" + k][j].removeMovieClip();
j++;
}
k++;
}
}
i++;
}
}
}
if (victoria) {
delete prota;
mort = true;
victoria_catala._visible = true;
}
if (invadit) {
invaditbaixa();
}
};
victoria_catala.bt_continuar.onRelease = function () {
victoria_catala._visible = false;
ranking();
ranking_mc._visible = true;
};
victoria_catala.bt_play.onRelease = function () {
_root.purgeVars();
treurePopUps();
gotoAndStop (5);
};
victoria_catala2.bt_ranking.onRelease = function () {
ranking_mc._visible = true;
victoria_catala2._visible = false;
};
victoria_catala2.bt_play.onRelease = function () {
_root.purgeVars();
treurePopUps();
gotoAndStop (5);
};
ranking_mc.bt_play.onRelease = function () {
_root.purgeVars();
treurePopUps();
gotoAndStop (5);
};
negre_mc.bt_play.onRelease = function () {
_root.purgeVars();
treurePopUps();
gotoAndStop (5);
};
negre_mc.bt_ranking.onRelease = function () {
rankingLoser();
negre_mc._visible = false;
ranking_mc._visible = true;
};
Instance of Symbol 258 MovieClip "missilenemic_mc" in Frame 25
onClipEvent (load) {
function projectil() {
if (this._y > 500) {
if (this.hitTest(_root.prota.clip)) {
_root.prota.tocat();
this.removeMovieClip();
}
}
if (this._y > 400) {
i = 0;
while (i < _root.numescuts) {
if (_root.estatescuts[i] < 5) {
if (_root["escut" + i].hitTest(_x, _y, true)) {
_root.estatescuts[i]++;
_root["escut" + i].gotoAndStop(_root.estatescuts[i]);
this.removeMovieClip();
}
}
i++;
}
}
if (this._y >= _root.llargada_escenari) {
this.removeMovieClip();
}
this._y = this._y + _root.vmissil;
}
function projectilprota() {
if (!this.explosio) {
k = 0;
while (k < _root.numenemics) {
enemictocat(_root["array" + k]);
k++;
}
if (this._y > 400) {
i = 0;
while (i < _root.numescuts) {
if (_root.estatescuts[i] < 5) {
if (_root["escut" + i].hitTest(_x, _y, true)) {
this.explosio = true;
this.gotoAndPlay("explosio");
}
}
i++;
}
}
i = 0;
while (i <= 25) {
if (this.hitTest(_root["missilenemic" + i])) {
_root["missilenemic" + i].removeMovieClip();
this.explosio = true;
this.gotoAndPlay("explosio");
}
i++;
}
if (this._y <= 0) {
this.removeMovieClip();
}
this._y = this._y - _root.vmissilprota;
}
}
function acabat() {
k = 0;
while (k < _root.numenemics) {
j = 0;
while (j < _root["array" + k].length) {
if (_root["array" + k][j] != null) {
return(false);
}
j++;
}
k++;
}
_root.victoria = true;
}
function enemictocat(array) {
if (potencia == 2) {
i = 0;
while (i < array.length) {
if (this.hitTest(array[i])) {
potencia--;
_root.prota.sumapunts(array[i].punts);
array[i].removeMovieClip();
array[i] = null;
this.explosio = true;
this.gotoAndPlay("explosio");
acabat();
break;
}
i++;
}
}
}
function enemictocat2(array) {
if (potencia > 0) {
i = 0;
while (i < array.length) {
if (this.hitTest(array[i])) {
_root.prota.sumapunts2(array[i].punts, potencia);
array[i].removeMovieClip();
array[i] = null;
if (potencia == 1) {
if (!this.explosio) {
this.explosio = true;
this.gotoAndPlay("explosio2");
}
} else if (!this.explosio) {
this.explosio = true;
this.gotoAndPlay("explosio");
}
potencia--;
acabat();
break;
}
i++;
}
}
}
function projectilprota2() {
k = 0;
while (k < _root.numenemics) {
enemictocat2(_root["array" + k]);
k++;
}
i = 0;
while (i <= 25) {
if (this.hitTest(_root["missilenemic" + i])) {
if (potencia == 1) {
this.gotoAndPlay("explosio2");
_root["missilenemic" + i].removeMovieClip();
}
if (potencia == 2) {
this.gotoAndPlay("petita");
_root["missilenemic" + i].removeMovieClip();
}
potencia--;
}
i++;
}
if (!this.explosio) {
if (this._y > 400) {
i = 0;
while (i < _root.numescuts) {
if (_root.estatescuts[i] < 5) {
if (_root["escut" + i].hitTest(_x, _y, true)) {
this.explosio = true;
this.gotoAndPlay("explosio");
potencia = 0;
}
}
i++;
}
}
if (this._y <= 0) {
this.removeMovieClip();
}
}
if (potencia > 0) {
this._y = this._y - _root.vmissilprota;
}
}
this.explosio = false;
this.potencia = 2;
}
onClipEvent (enterFrame) {
projectil();
}
Instance of Symbol 313 MovieClip "cacagran_mc" in Frame 25
onClipEvent (load) {
function projectil() {
if (this._y > 500) {
if (this.hitTest(_root.prota.clip)) {
_root.prota.tocat();
this.removeMovieClip();
}
}
if (this._y > 400) {
i = 0;
while (i < _root.numescuts) {
if (_root.estatescuts[i] < 5) {
if (_root["escut" + i].hitTest(_x, _y, true)) {
_root.estatescuts[i]++;
_root["escut" + i].gotoAndStop(_root.estatescuts[i]);
this.removeMovieClip();
}
}
i++;
}
}
if (this._y >= _root.llargada_escenari) {
this.removeMovieClip();
}
this._y = this._y + _root.vmissil;
}
function projectilprota() {
if (!this.explosio) {
k = 0;
while (k < _root.numenemics) {
enemictocat(_root["array" + k]);
k++;
}
if (this._y > 400) {
i = 0;
while (i < _root.numescuts) {
if (_root.estatescuts[i] < 5) {
if (_root["escut" + i].hitTest(_x, _y, true)) {
this.explosio = true;
this.gotoAndPlay("explosio");
}
}
i++;
}
}
i = 0;
while (i <= 25) {
if (this.hitTest(_root["missilenemic" + i])) {
_root["missilenemic" + i].removeMovieClip();
this.explosio = true;
this.gotoAndPlay("explosio");
}
i++;
}
if (this._y <= 0) {
this.removeMovieClip();
}
this._y = this._y - _root.vmissilprota;
}
}
function acabat() {
k = 0;
while (k < _root.numenemics) {
j = 0;
while (j < _root["array" + k].length) {
if (_root["array" + k][j] != null) {
return(false);
}
j++;
}
k++;
}
_root.victoria = true;
}
function enemictocat(array) {
if (potencia == 2) {
i = 0;
while (i < array.length) {
if (this.hitTest(array[i])) {
potencia--;
_root.prota.sumapunts(array[i].punts);
array[i].removeMovieClip();
array[i] = null;
this.explosio = true;
this.gotoAndPlay("explosio");
acabat();
break;
}
i++;
}
}
}
function enemictocat2(array) {
if (potencia > 0) {
i = 0;
while (i < array.length) {
if (this.hitTest(array[i])) {
_root.prota.sumapunts2(array[i].punts, potencia);
array[i].removeMovieClip();
array[i] = null;
if (potencia == 1) {
if (!this.explosio) {
this.explosio = true;
this.gotoAndPlay("explosio2");
}
} else if (!this.explosio) {
this.explosio = true;
this.gotoAndPlay("explosio");
}
potencia--;
acabat();
break;
}
i++;
}
}
}
function projectilprota2() {
k = 0;
while (k < _root.numenemics) {
enemictocat2(_root["array" + k]);
k++;
}
i = 0;
while (i <= 25) {
if (this.hitTest(_root["missilenemic" + i])) {
if (potencia == 1) {
this.gotoAndPlay("explosio2");
_root["missilenemic" + i].removeMovieClip();
}
if (potencia == 2) {
this.gotoAndPlay("petita");
_root["missilenemic" + i].removeMovieClip();
}
potencia--;
}
i++;
}
if (!this.explosio) {
if (this._y > 400) {
i = 0;
while (i < _root.numescuts) {
if (_root.estatescuts[i] < 5) {
if (_root["escut" + i].hitTest(_x, _y, true)) {
this.explosio = true;
this.gotoAndPlay("explosio");
potencia = 0;
}
}
i++;
}
}
if (this._y <= 0) {
this.removeMovieClip();
}
}
if (potencia > 0) {
this._y = this._y - _root.vmissilprota;
}
}
this.explosio = false;
this.potencia = 2;
}
onClipEvent (enterFrame) {
projectilprota2();
}
Instance of Symbol 73 MovieClip "caca_mc" in Frame 25
onClipEvent (load) {
function projectil() {
if (this._y > 500) {
if (this.hitTest(_root.prota.clip)) {
_root.prota.tocat();
this.removeMovieClip();
}
}
if (this._y > 400) {
i = 0;
while (i < _root.numescuts) {
if (_root.estatescuts[i] < 5) {
if (_root["escut" + i].hitTest(_x, _y, true)) {
_root.estatescuts[i]++;
_root["escut" + i].gotoAndStop(_root.estatescuts[i]);
this.removeMovieClip();
}
}
i++;
}
}
if (this._y >= _root.llargada_escenari) {
this.removeMovieClip();
}
this._y = this._y + _root.vmissil;
}
function projectilprota() {
if (!this.explosio) {
k = 0;
while (k < _root.numenemics) {
enemictocat(_root["array" + k]);
k++;
}
if (this._y > 400) {
i = 0;
while (i < _root.numescuts) {
if (_root.estatescuts[i] < 5) {
if (_root["escut" + i].hitTest(_x, _y, true)) {
this.explosio = true;
this.gotoAndPlay("explosio");
}
}
i++;
}
}
i = 0;
while (i <= 25) {
if (this.hitTest(_root["missilenemic" + i])) {
_root["missilenemic" + i].removeMovieClip();
this.explosio = true;
this.gotoAndPlay("explosio");
}
i++;
}
if (this._y <= 0) {
this.removeMovieClip();
}
this._y = this._y - _root.vmissilprota;
}
}
function acabat() {
k = 0;
while (k < _root.numenemics) {
j = 0;
while (j < _root["array" + k].length) {
if (_root["array" + k][j] != null) {
return(false);
}
j++;
}
k++;
}
_root.victoria = true;
}
function enemictocat(array) {
if (potencia == 2) {
i = 0;
while (i < array.length) {
if (this.hitTest(array[i])) {
potencia--;
_root.prota.sumapunts(array[i].punts);
array[i].removeMovieClip();
array[i] = null;
this.explosio = true;
this.gotoAndPlay("explosio");
acabat();
break;
}
i++;
}
}
}
function enemictocat2(array) {
if (potencia > 0) {
i = 0;
while (i < array.length) {
if (this.hitTest(array[i])) {
_root.prota.sumapunts2(array[i].punts, potencia);
array[i].removeMovieClip();
array[i] = null;
if (potencia == 1) {
if (!this.explosio) {
this.explosio = true;
this.gotoAndPlay("explosio2");
}
} else if (!this.explosio) {
this.explosio = true;
this.gotoAndPlay("explosio");
}
potencia--;
acabat();
break;
}
i++;
}
}
}
function projectilprota2() {
k = 0;
while (k < _root.numenemics) {
enemictocat2(_root["array" + k]);
k++;
}
i = 0;
while (i <= 25) {
if (this.hitTest(_root["missilenemic" + i])) {
if (potencia == 1) {
this.gotoAndPlay("explosio2");
_root["missilenemic" + i].removeMovieClip();
}
if (potencia == 2) {
this.gotoAndPlay("petita");
_root["missilenemic" + i].removeMovieClip();
}
potencia--;
}
i++;
}
if (!this.explosio) {
if (this._y > 400) {
i = 0;
while (i < _root.numescuts) {
if (_root.estatescuts[i] < 5) {
if (_root["escut" + i].hitTest(_x, _y, true)) {
this.explosio = true;
this.gotoAndPlay("explosio");
potencia = 0;
}
}
i++;
}
}
if (this._y <= 0) {
this.removeMovieClip();
}
}
if (potencia > 0) {
this._y = this._y - _root.vmissilprota;
}
}
this.explosio = false;
this.potencia = 2;
}
onClipEvent (enterFrame) {
projectilprota();
}
Instance of Symbol 336 MovieClip "carbo_mc" in Frame 25
onClipEvent (load) {
function projectil() {
if (this._y > 500) {
if (this.hitTest(_root.prota.clip)) {
_root.prota.tocat();
this.removeMovieClip();
}
}
if (this._y > 400) {
i = 0;
while (i < _root.numescuts) {
if (_root.estatescuts[i] < 5) {
if (_root["escut" + i].hitTest(_x, _y, true)) {
_root.estatescuts[i]++;
_root["escut" + i].gotoAndStop(_root.estatescuts[i]);
this.removeMovieClip();
}
}
i++;
}
}
if (this._y >= _root.llargada_escenari) {
this.removeMovieClip();
}
this._y = this._y + _root.vmissil;
}
function projectilprota() {
if (!this.explosio) {
k = 0;
while (k < _root.numenemics) {
enemictocat(_root["array" + k]);
k++;
}
if (this._y > 400) {
i = 0;
while (i < _root.numescuts) {
if (_root.estatescuts[i] < 5) {
if (_root["escut" + i].hitTest(_x, _y, true)) {
this.explosio = true;
this.gotoAndPlay("explosio");
}
}
i++;
}
}
i = 0;
while (i <= 25) {
if (this.hitTest(_root["missilenemic" + i])) {
_root["missilenemic" + i].removeMovieClip();
this.explosio = true;
this.gotoAndPlay("explosio");
}
i++;
}
if (this._y <= 0) {
this.removeMovieClip();
}
this._y = this._y - _root.vmissilprota;
}
}
function acabat() {
k = 0;
while (k < _root.numenemics) {
j = 0;
while (j < _root["array" + k].length) {
if (_root["array" + k][j] != null) {
return(false);
}
j++;
}
k++;
}
_root.victoria = true;
}
function enemictocat(array) {
if (potencia == 2) {
i = 0;
while (i < array.length) {
if (this.hitTest(array[i])) {
potencia--;
_root.prota.sumapunts(array[i].punts);
array[i].removeMovieClip();
array[i] = null;
this.explosio = true;
this.gotoAndPlay("explosio");
acabat();
break;
}
i++;
}
}
}
function enemictocat2(array) {
if (potencia > 0) {
i = 0;
while (i < array.length) {
if (this.hitTest(array[i])) {
_root.prota.sumapunts2(array[i].punts, potencia);
array[i].removeMovieClip();
array[i] = null;
if (potencia == 1) {
if (!this.explosio) {
this.explosio = true;
this.gotoAndPlay("explosio2");
}
} else if (!this.explosio) {
this.explosio = true;
this.gotoAndPlay("explosio");
}
potencia--;
acabat();
break;
}
i++;
}
}
}
function projectilprota2() {
k = 0;
while (k < _root.numenemics) {
enemictocat2(_root["array" + k]);
k++;
}
i = 0;
while (i <= 25) {
if (this.hitTest(_root["missilenemic" + i])) {
if (potencia == 1) {
this.gotoAndPlay("explosio2");
_root["missilenemic" + i].removeMovieClip();
}
if (potencia == 2) {
this.gotoAndPlay("petita");
_root["missilenemic" + i].removeMovieClip();
}
potencia--;
}
i++;
}
if (!this.explosio) {
if (this._y > 400) {
i = 0;
while (i < _root.numescuts) {
if (_root.estatescuts[i] < 5) {
if (_root["escut" + i].hitTest(_x, _y, true)) {
this.explosio = true;
this.gotoAndPlay("explosio");
potencia = 0;
}
}
i++;
}
}
if (this._y <= 0) {
this.removeMovieClip();
}
}
if (potencia > 0) {
this._y = this._y - _root.vmissilprota;
}
}
this.explosio = false;
this.potencia = 2;
}
onClipEvent (enterFrame) {
projectilprota();
}
Instance of Symbol 350 MovieClip "carbogran_mc" in Frame 25
onClipEvent (load) {
function projectil() {
if (this._y > 500) {
if (this.hitTest(_root.prota.clip)) {
_root.prota.tocat();
this.removeMovieClip();
}
}
if (this._y > 400) {
i = 0;
while (i < _root.numescuts) {
if (_root.estatescuts[i] < 5) {
if (_root["escut" + i].hitTest(_x, _y, true)) {
_root.estatescuts[i]++;
_root["escut" + i].gotoAndStop(_root.estatescuts[i]);
this.removeMovieClip();
}
}
i++;
}
}
if (this._y >= _root.llargada_escenari) {
this.removeMovieClip();
}
this._y = this._y + _root.vmissil;
}
function projectilprota() {
if (!this.explosio) {
k = 0;
while (k < _root.numenemics) {
enemictocat(_root["array" + k]);
k++;
}
if (this._y > 400) {
i = 0;
while (i < _root.numescuts) {
if (_root.estatescuts[i] < 5) {
if (_root["escut" + i].hitTest(_x, _y, true)) {
this.explosio = true;
this.gotoAndPlay("explosio");
}
}
i++;
}
}
i = 0;
while (i <= 25) {
if (this.hitTest(_root["missilenemic" + i])) {
_root["missilenemic" + i].removeMovieClip();
this.explosio = true;
this.gotoAndPlay("explosio");
}
i++;
}
if (this._y <= 0) {
this.removeMovieClip();
}
this._y = this._y - _root.vmissilprota;
}
}
function acabat() {
k = 0;
while (k < _root.numenemics) {
j = 0;
while (j < _root["array" + k].length) {
if (_root["array" + k][j] != null) {
return(false);
}
j++;
}
k++;
}
_root.victoria = true;
}
function enemictocat(array) {
if (potencia == 2) {
i = 0;
while (i < array.length) {
if (this.hitTest(array[i])) {
potencia--;
_root.prota.sumapunts(array[i].punts);
array[i].removeMovieClip();
array[i] = null;
this.explosio = true;
this.gotoAndPlay("explosio");
acabat();
break;
}
i++;
}
}
}
function enemictocat2(array) {
if (potencia > 0) {
i = 0;
while (i < array.length) {
if (this.hitTest(array[i])) {
_root.prota.sumapunts2(array[i].punts, potencia);
array[i].removeMovieClip();
array[i] = null;
if (potencia == 1) {
if (!this.explosio) {
this.explosio = true;
this.gotoAndPlay("explosio2");
}
} else if (!this.explosio) {
this.explosio = true;
this.gotoAndPlay("explosio");
}
potencia--;
acabat();
break;
}
i++;
}
}
}
function projectilprota2() {
k = 0;
while (k < _root.numenemics) {
enemictocat2(_root["array" + k]);
k++;
}
i = 0;
while (i <= 25) {
if (this.hitTest(_root["missilenemic" + i])) {
if (potencia == 1) {
this.gotoAndPlay("explosio2");
_root["missilenemic" + i].removeMovieClip();
}
if (potencia == 2) {
this.gotoAndPlay("petita");
_root["missilenemic" + i].removeMovieClip();
}
potencia--;
}
i++;
}
if (!this.explosio) {
if (this._y > 400) {
i = 0;
while (i < _root.numescuts) {
if (_root.estatescuts[i] < 5) {
if (_root["escut" + i].hitTest(_x, _y, true)) {
this.explosio = true;
this.gotoAndPlay("explosio");
potencia = 0;
}
}
i++;
}
}
if (this._y <= 0) {
this.removeMovieClip();
}
}
if (potencia > 0) {
this._y = this._y - _root.vmissilprota;
}
}
this.explosio = false;
this.potencia = 2;
}
onClipEvent (enterFrame) {
projectilprota2();
}
Symbol 454 MovieClip [__Packages.Protagonista] Frame 0
class Protagonista
{
var clip, punts, vides, indexprojectil;
function Protagonista (num, peli) {
clip = peli;
punts = 0;
if (_root.personatge == "reis") {
vides = 1;
while (vides <= num) {
_root["vida_rei" + vides]._visible = true;
vides++;
}
} else {
vides = 1;
while (vides <= num) {
_root["vida" + vides]._visible = true;
vides++;
}
}
vides = num;
indexprojectil = 0;
estat = "normal";
}
function getvides() {
return(vides);
}
function setvides(num) {
vides = num;
}
function sumapunts(num) {
punts = punts + num;
_root.punts = punts;
}
function sumapunts2(num, pot) {
if (pot > 1) {
punts = punts + (num * 3);
}
_root.punts = punts;
}
function restapunts(num) {
punts = punts - num;
}
function getpunts() {
return(punts);
}
function moute(auxx, auxy) {
if (((!_root.mort) && (estat != "tocat")) && (estat != "disparant")) {
if ((((clip._x + auxx) + clip._width) < Stage.width) && ((clip._x + auxx) > 0)) {
if (auxx < 0) {
if (!clip.actiu) {
clip.gotoAndPlay("esquerra");
}
} else if (!clip.actiu) {
clip.gotoAndPlay("dreta");
}
clip._x = clip._x + auxx;
}
}
}
function getx() {
return(clip._x);
}
function gety() {
return(clip._y);
}
function posiciona(auxx, auxy) {
clip._x = auxx;
clip._y = auxy;
}
function tocat() {
if (!_root.mort) {
if (proteccio == false) {
estat = "tocat";
if (_root.personatge == "reis") {
_root["vida_rei" + vides]._visible = false;
} else {
_root["vida" + vides]._visible = false;
}
vides--;
if (vides == 0) {
_root.mort = true;
_root.estat = "mort";
clip.gotoAndPlay("mort");
} else {
proteccio = true;
clip.gotoAndPlay("tocat");
_root.potencia_mc.gotoAndStop(1);
}
}
}
}
var proteccio = false;
var estat = "";
var esperant = false;
}
Symbol 69 MovieClip Frame 10
stop();
Symbol 70 MovieClip Frame 1
i = 2;
while (Number(i) < 50) {
duplicateMovieClip ("isk1", "isk" + i, 16384 + i);
eval ("isk" + i)._rotation = random(360);
scalefactor = 20 + Number(random(40));
eval ("isk" + i)._xscale = scalefactor;
eval ("isk" + i)._yscale = scalefactor;
tellTarget ("isk" + i) {
gotoAndPlay(random(3));
};
i = Number(i) + 1;
}
Symbol 73 MovieClip Frame 1
stop();
Symbol 73 MovieClip Frame 11
this.removeMovieClip();
Symbol 98 MovieClip Frame 12
stop();
Symbol 107 MovieClip Frame 1
actiu = false;
Symbol 107 MovieClip Frame 21
gotoAndPlay (1);
Symbol 107 MovieClip Frame 26
actiu = true;
if (_root.prota.estat == "tocat") {
gotoAndPlay ("tocat");
}
Symbol 107 MovieClip Frame 30
actiu = false;
gotoAndPlay (1);
Symbol 107 MovieClip Frame 36
actiu = true;
if (_root.prota.estat == "tocat") {
gotoAndPlay ("tocat");
}
Symbol 107 MovieClip Frame 40
actiu = false;
gotoAndPlay (1);
Symbol 107 MovieClip Frame 53
_root.dispara(_root.missil_mc);
Symbol 107 MovieClip Frame 60
gotoAndPlay (1);
Symbol 107 MovieClip Frame 83
_root.potencia_mc.gotoAndStop(1);
_root.dispara(_root.missil2_mc);
_root.prota.estat = "normal";
gotoAndPlay (1);
Symbol 107 MovieClip Frame 92
stop();
Symbol 107 MovieClip Frame 98
actiu = true;
Symbol 107 MovieClip Frame 99
trace("hola");
Symbol 107 MovieClip Frame 108
_root.prota.estat = "normal";
actiu = false;
Symbol 107 MovieClip Frame 116
_root.prota.estat = "normal";
gotoAndPlay (1);
Symbol 107 MovieClip Frame 158
stop();
Symbol 179 MovieClip Frame 6
stop();
Symbol 187 MovieClip Frame 6
stop();
Symbol 191 MovieClip Frame 6
stop();
Symbol 196 MovieClip Frame 6
stop();
Symbol 200 MovieClip Frame 6
stop();
Symbol 209 MovieClip Frame 6
stop();
Symbol 211 MovieClip Frame 6
stop();
Symbol 214 MovieClip Frame 6
stop();
Symbol 219 MovieClip Frame 6
stop();
Symbol 227 MovieClip Frame 6
stop();
Symbol 228 MovieClip Frame 1
stop();
Symbol 228 MovieClip Frame 2
stop();
Symbol 228 MovieClip Frame 3
stop();
Symbol 228 MovieClip Frame 4
stop();
Symbol 228 MovieClip Frame 5
stop();
Symbol 228 MovieClip Frame 6
stop();
Symbol 228 MovieClip Frame 7
stop();
Symbol 228 MovieClip Frame 8
stop();
Symbol 228 MovieClip Frame 9
stop();
Symbol 228 MovieClip Frame 10
stop();
Symbol 228 MovieClip Frame 11
stop();
Symbol 258 MovieClip Frame 1
stop();
Symbol 258 MovieClip Frame 2
stop();
Symbol 258 MovieClip Frame 3
stop();
Symbol 258 MovieClip Frame 4
stop();
Symbol 258 MovieClip Frame 5
stop();
Symbol 258 MovieClip Frame 6
stop();
Symbol 283 MovieClip Frame 1
stop();
Symbol 283 MovieClip Frame 35
stop();
_root.prota.estat = "bomba";
Symbol 290 MovieClip Frame 1
stop();
Symbol 290 MovieClip Frame 2
stop();
Symbol 290 MovieClip Frame 3
stop();
Symbol 293 MovieClip Frame 1
stop();
Symbol 293 MovieClip Frame 2
stop();
Symbol 293 MovieClip Frame 3
stop();
Symbol 296 MovieClip Frame 1
stop();
Symbol 296 MovieClip Frame 2
stop();
Symbol 296 MovieClip Frame 3
stop();
Symbol 313 MovieClip Frame 1
stop();
Symbol 313 MovieClip Frame 8
this.removeMovieClip();
Symbol 313 MovieClip Frame 9
stop();
Symbol 313 MovieClip Frame 16
this.removeMovieClip();
Symbol 336 MovieClip Frame 1
stop();
Symbol 336 MovieClip Frame 15
this.removeMovieClip();
Symbol 350 MovieClip Frame 1
stop();
Symbol 350 MovieClip Frame 16
this.removeMovieClip();
Symbol 350 MovieClip Frame 17
stop();
Symbol 350 MovieClip Frame 31
this.removeMovieClip();
Symbol 398 MovieClip Frame 1
trace("el this de negre_mc: " + this);
Symbol 411 MovieClip Frame 1
stop();
nick.tabIndex = 1;
Symbol 415 MovieClip Frame 1
stop();
stop();
stop();
Symbol 453 MovieClip Frame 1
stop();
stop();