Frame 1
musik = new Sound();
musik.attachSound("musik");
musik.start(0, 3);
_root.thesound = 1;
select = new Sound();
select.attachSound("select");
error = new Sound();
error.attachSound("error");
mvt = new Sound();
mvt.attachSound("mvt");
fin = new Sound();
fin.attachSound("fin");
disp = new Sound();
disp.attachSound("disp");
stop();
Frame 2
function complete() {
j = 0;
while (j < 9) {
i = 0;
while (i < 9) {
if (_root.compo[i][j] < 0) {
_root.compo[i][j] = 0;
}
_root[("domp" + i) + j]._alpha = 0;
i++;
}
j++;
}
trans = 0;
calcul = 0;
do {
if (calcul < 0) {
i = 0;
while (i < 9) {
j = 0;
while (j < 9) {
if (tab3[i][j] == 1) {
trans++;
compo[i][j] = calcul;
}
j++;
}
i++;
}
}
tab3 = [[0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0]];
place_x = [];
place_y = [];
i = 0;
j = 0;
while (compo[i][j] != 0) {
i++;
if (i == 9) {
j++;
i = 0;
}
}
place_x[0] = i;
place_y[0] = j;
tab3[i][j] = 1;
result = 0;
tabfin = 0;
do {
x = place_x[result];
y = place_y[result];
if (tab3[x][y - 1] == 0) {
if (compo[x][y - 1] == 0) {
tabfin++;
tab3[x][y - 1] = 1;
place_x[tabfin] = x;
place_y[tabfin] = y - 1;
}
}
if (tab3[x - 1][y] == 0) {
if (compo[x - 1][y] == 0) {
tabfin++;
tab3[x - 1][y] = 1;
place_x[tabfin] = x - 1;
place_y[tabfin] = y;
}
}
if (tab3[x][y + 1] == 0) {
if (compo[x][y + 1] == 0) {
tabfin++;
tab3[x][y + 1] = 1;
place_x[tabfin] = x;
place_y[tabfin] = y + 1;
}
}
if (tab3[x + 1][y] == 0) {
if (compo[x + 1][y] == 0) {
tabfin++;
tab3[x + 1][y] = 1;
place_x[tabfin] = x + 1;
place_y[tabfin] = y;
}
}
result++;
} while (result < (tabfin + 1));
_root.after = (result + _root.total) + trans;
calcul = calcul - 1;
} while (_root.after < 81);
}
function complete_inc() {
trans = 0;
calcul = 1;
tab_inc = [[0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0]];
place_x = [];
place_y = [];
place_z = [];
result = 0;
tabfin = 0;
place_x[0] = dx;
place_y[0] = dy;
place_z[0] = 0;
tab_inc[x][y] = 0;
do {
x = place_x[result];
y = place_y[result];
z = place_z[result];
if (tab_inc[x][y - 1] == 0) {
if (compo[x][y - 1] < 1) {
tabfin++;
tab_inc[x][y - 1] = z + 1;
place_z[tabfin] = z + 1;
place_x[tabfin] = x;
place_y[tabfin] = y - 1;
}
}
if (tab_inc[x - 1][y] == 0) {
if (compo[x - 1][y] < 1) {
tabfin++;
tab_inc[x - 1][y] = z + 1;
place_z[tabfin] = z + 1;
place_x[tabfin] = x - 1;
place_y[tabfin] = y;
}
}
if (tab_inc[x][y + 1] == 0) {
if (compo[x][y + 1] < 1) {
tabfin++;
tab_inc[x][y + 1] = z + 1;
place_z[tabfin] = z + 1;
place_x[tabfin] = x;
place_y[tabfin] = y + 1;
}
}
if (tab_inc[x + 1][y] == 0) {
if (compo[x + 1][y] < 1) {
tabfin++;
tab_inc[x + 1][y] = z + 1;
place_z[tabfin] = z + 1;
place_x[tabfin] = x + 1;
place_y[tabfin] = y;
}
}
result++;
} while (result < (tabfin + 1));
}
function moulinette() {
place_x = [];
place_y = [];
pass = tab_inc[fx][fy];
zx = fx;
zy = fy;
place_x[pass] = zx;
place_y[pass] = zy;
if (pass > 0) {
ex = fx;
ey = fy;
}
while (pass > 1) {
if (tab_inc[zx + 1][zy] == (pass - 1)) {
zx++;
} else if (tab_inc[zx - 1][zy] == (pass - 1)) {
zx--;
} else if (tab_inc[zx][zy + 1] == (pass - 1)) {
zy++;
} else if (tab_inc[zx][zy - 1] == (pass - 1)) {
zy--;
}
pass--;
place_x[pass] = zx;
place_y[pass] = zy;
}
place_x[0] = ex;
place_y[0] = ey;
}
function chemin() {
_root.complete_inc();
tab_highlight = [[0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0]];
ex = dx;
ey = dy;
place_x = [];
place_y = [];
final_val = compo[fx][fy];
if (final_val > 0) {
KO = "KO";
} else if (((((compo[dx + 1][dy] > 0) and (compo[dx - 1][dy] > 0)) and (compo[dx][dy + 1] > 0)) and (compo[dx][dy - 1] > 0)) or ((((compo[dx + 1][dy] != final_val) and (compo[dx - 1][dy] != final_val)) and (compo[dx][dy + 1] != final_val)) and (compo[dx][dy - 1] != final_val))) {
KO = "KO";
} else {
moulinette();
}
taille = place_x.length;
if (taille > 0) {
KO = taille;
i = 0;
while (i < taille) {
tab_highlight[place_x[i]][place_y[i]] = 1;
i++;
}
}
i = 0;
while (i < 9) {
j = 0;
while (j < 9) {
_root[("domp" + i) + j]._alpha = 0;
if (tab_highlight[j][i] == 1) {
_root[("domp" + i) + j]._alpha = 40;
}
_root[("domp" + ey) + ex]._alpha = 40;
j++;
}
i++;
}
_root[("domp" + dy) + dx]._alpha = 100;
}
function supprime(tab_sup) {
nb_bille = 0;
nb_color = 0;
tcolor = 0;
tcolor2 = 0;
j = 0;
while (j < 9) {
i = 0;
while (i < 9) {
if (tab_sup[i][j] > 0) {
if (tcolor == 0) {
tcolor = tab_sup[i][j];
nbcolor = 1;
} else if (tcolor != tab_sup[i][j]) {
tcolor2 = tab_sup[i][j];
nbcolor = 2;
} else if ((tcolor != tab_sup[i][j]) and (tcolor2 != tab_sup[i][j])) {
nbcolor = 3;
}
nb_bille++;
compo[i][j] = 0;
nb_pion = compo2[i][j];
compo2[i][j] = 0;
_root["pion" + nb_pion].gotoAndPlay(11);
total--;
}
i++;
}
j++;
}
if ((nb_bille == 9) and (score == 10)) {
score = 150;
}
if ((nb_bille == 10) and (score == 20)) {
score = 200;
}
if ((nb_bille == 11) and (score == 40)) {
score = 250;
}
if ((nb_bille == 12) and (score == 80)) {
score = 300;
}
if (nb_bille == 13) {
score = 500;
}
if (nb_bille > 13) {
score = 500 + ((nb_bille - 13) * 200);
}
j = 0;
while (j < 9) {
i = 0;
while (i < 9) {
if (compo[i][j] < 0) {
compo[i][j] = 0;
}
i++;
}
j++;
}
}
function elimine() {
tab_sup = [[0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0]];
score = 0;
i = 0;
while (i < 5) {
j = 0;
while (j < 9) {
value = compo[i][j];
if (((((value > 0) and (value == compo[i + 1][j])) and (value == compo[i + 2][j])) and (value == compo[i + 3][j])) and (value == compo[i + 4][j])) {
if (value == compo[i + 5][j]) {
tab_sup[i + 5][j] = value;
if (value == compo[i + 6][j]) {
tab_sup[i + 6][j] = value;
if (value == compo[i + 7][j]) {
tab_sup[i + 7][j] = value;
if (value == compo[i + 8][j]) {
tab_sup[i + 8][j] = value;
}
}
}
}
if (score == 0) {
score = 5;
} else {
score = score * 2;
}
h = 0;
while (h < 5) {
tab_sup[i + h][j] = 1;
h++;
}
}
j++;
}
i++;
}
j = 0;
while (j < 5) {
i = 0;
while (i < 9) {
value = compo[i][j];
if (((((value > 0) and (value == compo[i][j + 1])) and (value == compo[i][j + 2])) and (value == compo[i][j + 3])) and (value == compo[i][j + 4])) {
if (value == compo[i][j + 5]) {
tab_sup[i][j + 5] = value;
if (value == compo[i][j + 6]) {
tab_sup[i][j + 6] = value;
if (value == compo[i][j + 7]) {
tab_sup[i][j + 7] = value;
if (value == compo[i][j + 8]) {
tab_sup[i][j + 8] = value;
}
}
}
}
if (score == 0) {
score = 5;
} else {
score = score * 2;
}
h = 0;
while (h < 5) {
tab_sup[i][j + h] = value;
h++;
}
}
i++;
}
j++;
}
i = 8;
while (i > 3) {
j = 0;
while (j < 5) {
value = compo[i][j];
if (((((value > 0) and (value == compo[i - 1][j + 1])) and (value == compo[i - 2][j + 2])) and (value == compo[i - 3][j + 3])) and (value == compo[i - 4][j + 4])) {
if (value == compo[i - 5][j + 5]) {
tab_sup[i - 5][j + 5] = value;
if (value == compo[i - 6][j + 6]) {
tab_sup[i - 6][j + 6] = value;
if (value == compo[i - 7][j + 7]) {
tab_sup[i - 7][j + 7] = value;
if (value == compo[i - 8][j + 8]) {
tab_sup[i - 8][j + 8] = value;
}
}
}
}
if (score == 0) {
score = 5;
} else {
score = score * 2;
}
h = 0;
while (h < 5) {
tab_sup[i - h][j + h] = 1;
h++;
}
}
j++;
}
i--;
}
i = 0;
while (i < 5) {
j = 0;
while (j < 5) {
value = compo[i][j];
if (((((value > 0) and (value == compo[i + 1][j + 1])) and (value == compo[i + 2][j + 2])) and (value == compo[i + 3][j + 3])) and (value == compo[i + 4][j + 4])) {
if (value == compo[i + 5][j + 5]) {
tab_sup[i + 5][j + 5] = value;
if (value == compo[i + 6][j + 6]) {
tab_sup[i + 6][j + 6] = value;
if (value == compo[i + 7][j + 7]) {
tab_sup[i + 7][j + 7] = value;
if (value == compo[i + 8][j + 8]) {
tab_sup[i + 8][j + 8] = value;
}
}
}
}
if (score == 0) {
score = 5;
} else {
score = score * 2;
}
h = 0;
while (h < 5) {
tab_sup[i + h][j + h] = 1;
h++;
}
}
j++;
}
i++;
}
return(score);
}
function ajoute_bille(no) {
do {
i = random(9);
j = random(9);
} while (compo[i][j] > 0);
pion_txt = tab[no];
duplicateMovieClip (pion_txt, "pion" + total_dup, masque);
_root["pion" + total_dup]._x = (init_x + (j * 40)) + 19;
_root["pion" + total_dup]._y = (init_y + (i * 40)) + 19;
compo2[i][j] = total_dup;
compo[i][j] = no;
total_dup++;
masque++;
total++;
}
function remplace() {
bille_color = [total, total, total, total, total, total, total, total];
j = 0;
while (j < 9) {
i = 0;
while (i < 9) {
if (compo[i][j] == 1) {
bille_color[1]--;
}
if (compo[i][j] == 2) {
bille_color[2]--;
}
if (compo[i][j] == 3) {
bille_color[3]--;
}
if (compo[i][j] == 4) {
bille_color[4]--;
}
if (compo[i][j] == 5) {
bille_color[5]--;
}
if (compo[i][j] == 6) {
bille_color[6]--;
}
if (compo[i][j] == 7) {
bille_color[7]--;
}
i++;
}
j++;
}
k = 1;
while (k < 7) {
bille_color[k + 1] = bille_color[k + 1] + bille_color[k];
k++;
}
if (total < 81) {
hasard = random(bille_color[7] + 1);
m = 1;
k = 1;
while (k < 7) {
if (hasard >= bille_color[k]) {
m = k + 1;
}
k++;
}
ajoute_bille(m);
}
if (total < 81) {
hasard = random(bille_color[7] + 1);
m = 1;
k = 1;
while (k < 7) {
if (hasard >= bille_color[k]) {
m = k + 1;
}
k++;
}
ajoute_bille(m);
}
if (total < 81) {
hasard = random(bille_color[7] + 1);
m = 1;
k = 1;
while (k < 7) {
if (hasard >= bille_color[k]) {
m = k + 1;
}
k++;
}
ajoute_bille(m);
}
}
compo = [[0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0]];
compo2 = [[0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0]];
tab = ["", "bleu", "blanc", "rouge", "vert", "orange", "jaune", "noir"];
score_memo = [];
total = 0;
total_dup = 1;
mode = 0;
init_x = 15;
init_y = 10;
score_total = 0;
score = 0;
fx = "";
fy = "";
masque = 0;
j = 0;
while (j < 9) {
i = 0;
while (i < 9) {
duplicateMovieClip (domp, ("domp" + i) + j, masque);
_root[("domp" + i) + j]._x = init_x + (i * 40);
_root[("domp" + i) + j]._y = init_y + (j * 40);
masque++;
i++;
}
j++;
}
ajoute_bille(random(7) + 1);
ajoute_bille(random(7) + 1);
ajoute_bille(random(7) + 1);
ajoute_bille(random(7) + 1);
ajoute_bille(random(7) + 1);
complete();
_root.onEnterFrame = function () {
if (thesound == 0) {
stopAllSounds();
}
};
stop();
Instance of Symbol 195 MovieClip "domp" in Frame 2
on (rollOver) {
if (_root.mode == 1) {
_root.fy = Number(this._name.substr(4, 1));
_root.fx = Number(this._name.substr(5, 1));
_root.chemin();
}
}
on (rollOut) {
}
on (press) {
if (_root.mode < 2) {
if ((((_root.mode == 1) and (_root.compo[_root.fx][_root.fy] < 1)) and (_root.fx != "")) and (_root.fy != "")) {
_root.mode = 0;
if ((_root.ex == _root.fx) and (_root.ey == _root.fy)) {
if (_root.thesound == 1) {
stopAllSounds();
_root.mvt.start(0, 1);
}
_root.mode = 2;
_root.compo[_root.fx][_root.fy] = _root.compo[_root.dx][_root.dy];
_root.compo[_root.dx][_root.dy] = 0;
_root.nb_pion = _root.compo2[_root.dx][_root.dy];
_root.compo2[_root.dx][_root.dy] = 0;
_root.compo2[_root.fx][_root.fy] = _root.nb_pion;
_root.moove.gotoAndPlay(2);
} else {
_root[("domp" + _root.dy) + _root.dx]._alpha = 0;
}
} else {
if (_root.mode == 1) {
_root[("domp" + _root.dy) + _root.dx]._alpha = 0;
}
_root.dy = Number(this._name.substr(4, 1));
_root.dx = Number(this._name.substr(5, 1));
if (_root.compo[_root.dx][_root.dy] > 0) {
if (_root.thesound == 1) {
stopAllSounds();
_root.select.start(0, 1);
}
this._alpha = 100;
_root.mode = 1;
}
}
}
}
on (releaseOutside) {
}
Frame 3
if (thesound == 1) {
stopAllSounds();
fin.start(0, 1);
}
j = 0;
while (j < 9) {
i = 0;
while (i < 9) {
_root[("domp" + i) + j]._alpha = 0;
i++;
}
j++;
}
stop();
Symbol 11 MovieClip [FLabelSymbol] Frame 1
#initclip 2
_global.FLabelClass = function () {
if (this.hostComponent == undefined) {
this.hostComponent = ((this._parent.controller == undefined) ? (this._parent) : (this._parent.controller));
}
if (this.customTextStyle == undefined) {
if (this.hostComponent.textStyle == undefined) {
this.hostComponent.textStyle = new TextFormat();
}
this.textStyle = this.hostComponent.textStyle;
this.enable = true;
}
};
FLabelClass.prototype = new MovieClip();
Object.registerClass("FLabelSymbol", FLabelClass);
FLabelClass.prototype.setLabel = function (label) {
var val = this.hostComponent.styleTable.embedFonts.value;
if (val != undefined) {
this.labelField.embedFonts = val;
}
this.labelField.setNewTextFormat(this.textStyle);
this.labelField.text = label;
this.labelField._height = this.labelField.textHeight + 2;
};
FLabelClass.prototype.setSize = function (width) {
this.labelField._width = width;
};
FLabelClass.prototype.setEnabled = function (enable) {
this.enable = enable;
var tmpColor = this.hostComponent.styleTable[(enable ? "textColor" : "textDisabled")].value;
if (tmpColor == undefined) {
tmpColor = (enable ? 0 : 8947848);
}
this.setColor(tmpColor);
};
FLabelClass.prototype.getLabel = function () {
return(this.labelField.text);
};
FLabelClass.prototype.setColor = function (col) {
this.labelField.textColor = col;
};
#endinitclip
Symbol 20 MovieClip Frame 1
var component = _parent._parent;
component.registerSkinElement(frame5, "face");
component.registerSkinElement(frame3, "shadow");
component.registerSkinElement(frame1, "darkshadow");
component.registerSkinElement(frame4, "highlight");
component.registerSkinElement(frame2, "highlight3D");
Symbol 26 MovieClip Frame 1
var component = _parent._parent;
component.registerSkinElement(frame5, "face");
component.registerSkinElement(frame3, "shadow");
component.registerSkinElement(frame1, "darkshadow");
component.registerSkinElement(frame4, "highlight");
component.registerSkinElement(frame2, "highlight3D");
Symbol 32 MovieClip Frame 1
var component = _parent._parent;
component.registerSkinElement(frame5, "face");
component.registerSkinElement(frame4, "shadow");
component.registerSkinElement(frame2, "darkshadow");
component.registerSkinElement(frame3, "highlight");
component.registerSkinElement(frame1, "highlight3D");
Symbol 38 MovieClip Frame 1
var component = _parent._parent;
component.registerSkinElement(frame5, "face");
component.registerSkinElement(frame3, "shadow");
component.registerSkinElement(frame1, "darkshadow");
component.registerSkinElement(frame4, "highlight");
component.registerSkinElement(frame2, "highlight3D");
Symbol 39 MovieClip [fpb_states] Frame 1
stop();
Symbol 39 MovieClip [fpb_states] Frame 2
stop();
Symbol 39 MovieClip [fpb_states] Frame 3
stop();
Symbol 39 MovieClip [fpb_states] Frame 4
stop();
Symbol 40 MovieClip [FUIComponentSymbol] Frame 1
#initclip 1
function FUIComponentClass() {
this.init();
}
FUIComponentClass.prototype = new MovieClip();
FUIComponentClass.prototype.init = function () {
this.enable = true;
this.focused = false;
this.useHandCursor = false;
this._accImpl = new Object();
this._accImpl.stub = true;
this.styleTable = new Array();
if (_global.globalStyleFormat == undefined) {
_global.globalStyleFormat = new FStyleFormat();
globalStyleFormat.isGlobal = true;
_global._focusControl = new Object();
_global._focusControl.onSetFocus = function (oldFocus, newFocus) {
oldFocus.myOnKillFocus();
newFocus.myOnSetFocus();
};
Selection.addListener(_global._focusControl);
}
if (this._name != undefined) {
this._focusrect = false;
this.tabEnabled = true;
this.focusEnabled = true;
this.tabChildren = false;
this.tabFocused = true;
if (this.hostStyle == undefined) {
globalStyleFormat.addListener(this);
} else {
this.styleTable = this.hostStyle;
}
this.deadPreview._visible = false;
this.deadPreview._width = (this.deadPreview._height = 1);
this.methodTable = new Object();
this.keyListener = new Object();
this.keyListener.controller = this;
this.keyListener.onKeyDown = function () {
this.controller.myOnKeyDown();
};
this.keyListener.onKeyUp = function () {
this.controller.myOnKeyUp();
};
for (var i in this.styleFormat_prm) {
this.setStyleProperty(i, this.styleFormat_prm[i]);
}
}
};
FUIComponentClass.prototype.setEnabled = function (enabledFlag) {
this.enable = ((arguments.length > 0) ? (enabledFlag) : true);
this.tabEnabled = (this.focusEnabled = enabledFlag);
if ((!this.enable) && (this.focused)) {
Selection.setFocus(undefined);
}
};
FUIComponentClass.prototype.getEnabled = function () {
return(this.enable);
};
FUIComponentClass.prototype.setSize = function (w, h) {
this.width = w;
this.height = h;
this.focusRect.removeMovieClip();
};
FUIComponentClass.prototype.setChangeHandler = function (chng, obj) {
this.handlerObj = ((obj == undefined) ? (this._parent) : (obj));
this.changeHandler = chng;
};
FUIComponentClass.prototype.invalidate = function (methodName) {
this.methodTable[methodName] = true;
this.onEnterFrame = this.cleanUI;
};
FUIComponentClass.prototype.cleanUI = function () {
if (this.methodTable.setSize) {
this.setSize(this.width, this.height);
} else {
this.cleanUINotSize();
}
this.methodTable = new Object();
delete this.onEnterFrame;
};
FUIComponentClass.prototype.cleanUINotSize = function () {
for (var funct in this.methodTable) {
this[funct]();
}
};
FUIComponentClass.prototype.drawRect = function (x, y, w, h) {
var inner = this.styleTable.focusRectInner.value;
var outer = this.styleTable.focusRectOuter.value;
if (inner == undefined) {
inner = 16777215 /* 0xFFFFFF */;
}
if (outer == undefined) {
outer = 0;
}
this.createEmptyMovieClip("focusRect", 1000);
this.focusRect.controller = this;
this.focusRect.lineStyle(1, outer);
this.focusRect.moveTo(x, y);
this.focusRect.lineTo(x + w, y);
this.focusRect.lineTo(x + w, y + h);
this.focusRect.lineTo(x, y + h);
this.focusRect.lineTo(x, y);
this.focusRect.lineStyle(1, inner);
this.focusRect.moveTo(x + 1, y + 1);
this.focusRect.lineTo((x + w) - 1, y + 1);
this.focusRect.lineTo((x + w) - 1, (y + h) - 1);
this.focusRect.lineTo(x + 1, (y + h) - 1);
this.focusRect.lineTo(x + 1, y + 1);
};
FUIComponentClass.prototype.pressFocus = function () {
this.tabFocused = false;
this.focusRect.removeMovieClip();
Selection.setFocus(this);
};
FUIComponentClass.prototype.drawFocusRect = function () {
this.drawRect(-2, -2, this.width + 4, this.height + 4);
};
FUIComponentClass.prototype.myOnSetFocus = function () {
this.focused = true;
Key.addListener(this.keyListener);
if (this.tabFocused) {
this.drawFocusRect();
}
};
FUIComponentClass.prototype.myOnKillFocus = function () {
this.tabFocused = true;
this.focused = false;
this.focusRect.removeMovieClip();
Key.removeListener(this.keyListener);
};
FUIComponentClass.prototype.executeCallBack = function () {
this.handlerObj[this.changeHandler](this);
};
FUIComponentClass.prototype.updateStyleProperty = function (styleFormat, propName) {
this.setStyleProperty(propName, styleFormat[propName], styleFormat.isGlobal);
};
FUIComponentClass.prototype.setStyleProperty = function (propName, value, isGlobal) {
if (value == "") {
return(undefined);
}
var tmpValue = parseInt(value);
if (!isNaN(tmpValue)) {
value = tmpValue;
}
var global = ((arguments.length > 2) ? (isGlobal) : false);
if (this.styleTable[propName] == undefined) {
this.styleTable[propName] = new Object();
this.styleTable[propName].useGlobal = true;
}
if (this.styleTable[propName].useGlobal || (!global)) {
this.styleTable[propName].value = value;
if (this.setCustomStyleProperty(propName, value)) {
} else if (propName == "embedFonts") {
this.invalidate("setSize");
} else if (propName.subString(0, 4) == "text") {
if (this.textStyle == undefined) {
this.textStyle = new TextFormat();
}
var textProp = propName.subString(4, propName.length);
this.textStyle[textProp] = value;
this.invalidate("setSize");
} else {
for (var j in this.styleTable[propName].coloredMCs) {
var myColor = new Color(this.styleTable[propName].coloredMCs[j]);
if (this.styleTable[propName].value == undefined) {
var myTObj = {ra:"100", rb:"0", ga:"100", gb:"0", ba:"100", bb:"0", aa:"100", ab:"0"};
myColor.setTransform(myTObj);
} else {
myColor.setRGB(value);
}
}
}
this.styleTable[propName].useGlobal = global;
}
};
FUIComponentClass.prototype.registerSkinElement = function (skinMCRef, propName) {
if (this.styleTable[propName] == undefined) {
this.styleTable[propName] = new Object();
this.styleTable[propName].useGlobal = true;
}
if (this.styleTable[propName].coloredMCs == undefined) {
this.styleTable[propName].coloredMCs = new Object();
}
this.styleTable[propName].coloredMCs[skinMCRef] = skinMCRef;
if (this.styleTable[propName].value != undefined) {
var myColor = new Color(skinMCRef);
myColor.setRGB(this.styleTable[propName].value);
}
};
_global.FStyleFormat = function () {
this.nonStyles = {listeners:true, isGlobal:true, isAStyle:true, addListener:true, removeListener:true, nonStyles:true, applyChanges:true};
this.listeners = new Object();
this.isGlobal = false;
if (arguments.length > 0) {
for (var i in arguments[0]) {
this[i] = arguments[0][i];
}
}
};
_global.FStyleFormat.prototype = new Object();
FStyleFormat.prototype.addListener = function () {
var arg = 0;
while (arg < arguments.length) {
var mcRef = arguments[arg];
this.listeners[arguments[arg]] = mcRef;
for (var i in this) {
if (this.isAStyle(i)) {
mcRef.updateStyleProperty(this, i.toString());
}
}
arg++;
}
};
FStyleFormat.prototype.removeListener = function (component) {
this.listeners[component] = undefined;
for (var prop in this) {
if (this.isAStyle(prop)) {
if (component.styleTable[prop].useGlobal == this.isGlobal) {
component.styleTable[prop].useGlobal = true;
var value = (this.isGlobal ? undefined : (globalStyleFormat[prop]));
component.setStyleProperty(prop, value, true);
}
}
}
};
FStyleFormat.prototype.applyChanges = function () {
var count = 0;
for (var i in this.listeners) {
var component = this.listeners[i];
if (arguments.length > 0) {
var j = 0;
while (j < arguments.length) {
if (this.isAStyle(arguments[j])) {
component.updateStyleProperty(this, arguments[j]);
}
j++;
}
} else {
for (var j in this) {
if (this.isAStyle(j)) {
component.updateStyleProperty(this, j.toString());
}
}
}
}
};
FStyleFormat.prototype.isAStyle = function (name) {
return((this.nonStyles[name] ? false : true));
};
#endinitclip
Symbol 44 MovieClip [FBoundingBoxSymbol] Frame 1
var component = _parent;
component.registerSkinElement(boundingBox, "background");
stop();
Symbol 44 MovieClip [FBoundingBoxSymbol] Frame 2
component.registerSkinElement(boundingBox2, "backgroundDisabled");
stop();
Symbol 47 MovieClip [FPushButtonSymbol] Frame 1
#initclip 3
function FPushButtonClass() {
this.init();
}
FPushButtonClass.prototype = new FUIComponentClass();
Object.registerClass("FPushButtonSymbol", FPushButtonClass);
FPushButtonClass.prototype.init = function () {
super.setSize(this._width, this._height);
this.boundingBox_mc.unloadMovie();
this.attachMovie("fpb_states", "fpbState_mc", 1);
this.attachMovie("FLabelSymbol", "fLabel_mc", 2);
this.attachMovie("fpb_hitArea", "fpb_hitArea_mc", 3);
super.init();
this.btnState = false;
this.setClickHandler(this.clickHandler);
this._xscale = 100;
this._yscale = 100;
this.setSize(this.width, this.height);
if (this.label != undefined) {
this.setLabel(this.label);
}
this.ROLE_SYSTEM_PUSHBUTTON = 43;
this.STATE_SYSTEM_PRESSED = 8;
this.EVENT_OBJECT_STATECHANGE = 32778;
this.EVENT_OBJECT_NAMECHANGE = 32780;
this._accImpl.master = this;
this._accImpl.stub = false;
this._accImpl.get_accRole = this.get_accRole;
this._accImpl.get_accName = this.get_accName;
this._accImpl.get_accState = this.get_accState;
this._accImpl.get_accDefaultAction = this.get_accDefaultAction;
this._accImpl.accDoDefaultAction = this.accDoDefaultAction;
};
FPushButtonClass.prototype.setHitArea = function (w, h) {
var hit = this.fpb_hitArea_mc;
this.hitArea = hit;
hit._visible = false;
hit._width = w;
hit._height = ((arguments.length > 1) ? (h) : (hit._height));
};
FPushButtonClass.prototype.setSize = function (w, h) {
w = ((w < 6) ? 6 : (w));
if (arguments.length > 1) {
if (h < 6) {
h = 6;
}
}
super.setSize(w, h);
this.setLabel(this.getLabel());
this.arrangeLabel();
this.setHitArea(w, h);
this.boundingBox_mc._width = w;
this.boundingBox_mc._height = h;
this.drawFrame();
if (this.focused) {
super.myOnSetFocus();
}
this.initContentPos("fLabel_mc");
};
FPushButtonClass.prototype.arrangeLabel = function () {
var label = this.fLabel_mc;
var h = this.height;
var w = (this.width - 2);
var b = 1;
this.fLabel_mc.setSize(w - (b * 4));
label._x = b * 3;
label._y = (h / 2) - (label._height / 2);
};
FPushButtonClass.prototype.getLabel = function () {
return(this.fLabel_mc.labelField.text);
};
FPushButtonClass.prototype.setLabel = function (label) {
this.fLabel_mc.setLabel(label);
this.txtFormat();
this.arrangeLabel();
if (Accessibility.isActive()) {
Accessibility.sendEvent(this, 0, this.EVENT_OBJECT_NAMECHANGE);
}
};
FPushButtonClass.prototype.getEnabled = function () {
return(this.enabled);
};
FPushButtonClass.prototype.setEnabled = function (enable) {
if (enable || (enable == undefined)) {
this.gotoFrame(1);
this.drawFrame();
this.flabel_mc.setEnabled(true);
this.enabled = true;
super.setEnabled(true);
} else {
this.gotoFrame(4);
this.drawFrame();
this.flabel_mc.setEnabled(false);
this.enabled = false;
super.setEnabled(false);
}
};
FPushButtonClass.prototype.txtFormat = function () {
var txtS = this.textStyle;
var sTbl = this.styleTable;
txtS.align = ((sTbl.textAlign.value == undefined) ? ((txtS.align = "center")) : undefined);
txtS.leftMargin = ((sTbl.textLeftMargin.value == undefined) ? ((txtS.leftMargin = 1)) : undefined);
txtS.rightMargin = ((sTbl.textRightMargin.value == undefined) ? ((txtS.rightMargin = 1)) : undefined);
if (this.fLabel_mc._height > this.height) {
super.setSize(this.width, this.fLabel_mc._height);
} else {
super.setSize(this.width, this.height);
}
this.fLabel_mc.labelField.setTextFormat(this.textStyle);
this.setEnabled(this.enable);
};
FPushButtonClass.prototype.drawFrame = function () {
var b = 1;
var x1 = 0;
var y1 = 0;
var x2 = this.width;
var y2 = this.height;
var mc_array = ["up_mc", "over_mc", "down_mc", "disabled_mc"];
var frame = mc_array[this.fpbState_mc._currentframe - 1];
var mc = "frame";
var i = 0;
while (i < 6) {
x1 = x1 + ((i % 2) * b);
y1 = y1 + ((i % 2) * b);
x2 = x2 - (((i + 1) % 2) * b);
y2 = y2 - (((i + 1) % 2) * b);
var w = (Math.abs(x1 - x2) + (2 * b));
var h = (Math.abs(y1 - y2) + (2 * b));
this.fpbState_mc[frame][mc + i]._width = w;
this.fpbState_mc[frame][mc + i]._height = h;
this.fpbState_mc[frame][mc + i]._x = x1 - b;
this.fpbState_mc[frame][mc + i]._y = y1 - b;
i++;
}
};
FPushButtonClass.prototype.setClickHandler = function (chng, obj) {
this.handlerObj = ((arguments.length < 2) ? (this._parent) : (obj));
this.clickHandler = chng;
};
FPushButtonClass.prototype.executeCallBack = function () {
this.handlerObj[this.clickHandler](this);
};
FPushButtonClass.prototype.initContentPos = function (mc) {
this.incrVal = 1;
this.initx = this[mc]._x - (this.getBtnState() * this.incrVal);
this.inity = this[mc]._y - (this.getBtnState() * this.incrVal);
this.togx = this.initx + this.incrVal;
this.togy = this.inity + this.incrVal;
};
FPushButtonClass.prototype.setBtnState = function (state) {
this.btnState = state;
if (state) {
this.fLabel_mc._x = this.togx;
this.fLabel_mc._y = this.togy;
} else {
this.fLabel_mc._x = this.initx;
this.fLabel_mc._y = this.inity;
}
};
FPushButtonClass.prototype.getBtnState = function () {
return(this.btnState);
};
FPushButtonClass.prototype.myOnSetFocus = function () {
this.focused = true;
super.myOnSetFocus();
};
FPushButtonClass.prototype.onPress = function () {
this.pressFocus();
this.fpbState_mc.gotoAndStop(3);
this.drawFrame();
this.setBtnState(true);
if (Accessibility.isActive()) {
Accessibility.sendEvent(this, 0, this.EVENT_OBJECT_STATECHANGE, true);
}
};
FPushButtonClass.prototype.onRelease = function () {
this.fpbState_mc.gotoAndStop(2);
this.drawFrame();
this.executeCallBack();
this.setBtnState(false);
if (Accessibility.isActive()) {
Accessibility.sendEvent(this, 0, this.EVENT_OBJECT_STATECHANGE, true);
}
};
FPushButtonClass.prototype.onRollOver = function () {
this.fpbState_mc.gotoAndStop(2);
this.drawFrame();
};
FPushButtonClass.prototype.onRollOut = function () {
this.fpbState_mc.gotoAndStop(1);
this.drawFrame();
};
FPushButtonClass.prototype.onReleaseOutside = function () {
this.setBtnState(false);
this.fpbState_mc.gotoAndStop(1);
this.drawFrame();
};
FPushButtonClass.prototype.onDragOut = function () {
this.setBtnState(false);
this.fpbState_mc.gotoAndStop(1);
this.drawFrame();
};
FPushButtonClass.prototype.onDragOver = function () {
this.setBtnState(true);
this.fpbState_mc.gotoAndStop(3);
this.drawFrame();
};
FPushButtonClass.prototype.myOnKeyDown = function () {
if ((Key.getCode() == 32) && (this.pressOnce == undefined)) {
this.onPress();
this.pressOnce = 1;
}
};
FPushButtonClass.prototype.myOnKeyUp = function () {
if (Key.getCode() == 32) {
this.onRelease();
this.pressOnce = undefined;
}
};
FPushButtonClass.prototype.get_accRole = function (childId) {
return(this.master.ROLE_SYSTEM_PUSHBUTTON);
};
FPushButtonClass.prototype.get_accName = function (childId) {
return(this.master.getLabel());
};
FPushButtonClass.prototype.get_accState = function (childId) {
if (this.pressOnce) {
return(this.master.STATE_SYSTEM_PRESSED);
}
return(this.master.STATE_SYSTEM_DEFAULT);
};
FPushButtonClass.prototype.get_accDefaultAction = function (childId) {
return("Press");
};
FPushButtonClass.prototype.accDoDefaultAction = function (childId) {
this.master.onPress();
this.master.onRelease();
};
#endinitclip
boundingBox_mc._visible = false;
deadPreview._visible = false;
Symbol 70 Button
on (press) {
_root.nextFrame();
}
on (rollOver) {
_root.intro.starti._alpha = 50;
}
on (rollOut) {
_root.intro.starti._alpha = 100;
}
Symbol 78 Button
on (press) {
_root.intro.aide._y = 75;
}
on (rollOver) {
_root.intro.starti2._alpha = 50;
}
on (rollOut) {
_root.intro.starti2._alpha = 100;
}
Symbol 79 Button
on (press) {
_root.nextFrame();
}
on (rollOver) {
_root.intro.starti._alpha = 50;
}
on (rollOut) {
_root.intro.starti._alpha = 100;
}
Symbol 89 Button
on (press) {
this.nextFrame();
}
Symbol 106 Button
on (press) {
this.gotoAndPlay(1);
this._y = -500;
}
Symbol 111 MovieClip Frame 1
stop();
Symbol 111 MovieClip Frame 2
stop();
Symbol 111 MovieClip Frame 3
stop();
Symbol 112 MovieClip Frame 95
stop();
Symbol 199 MovieClip Frame 10
stop();
Symbol 199 MovieClip Frame 20
removeMovieClip(this);
stop();
Symbol 203 MovieClip Frame 10
stop();
Symbol 203 MovieClip Frame 20
removeMovieClip(this);
stop();
Symbol 207 MovieClip Frame 10
stop();
Symbol 207 MovieClip Frame 20
removeMovieClip(this);
stop();
Symbol 211 MovieClip Frame 10
stop();
Symbol 211 MovieClip Frame 20
removeMovieClip(this);
stop();
Symbol 215 MovieClip Frame 10
stop();
Symbol 215 MovieClip Frame 20
removeMovieClip(this);
stop();
Symbol 219 MovieClip Frame 10
stop();
Symbol 219 MovieClip Frame 20
removeMovieClip(this);
stop();
Symbol 223 MovieClip Frame 10
stop();
Symbol 223 MovieClip Frame 20
removeMovieClip(this);
stop();
Symbol 258 MovieClip Frame 1
stop();
Symbol 258 MovieClip Frame 2
_root.pos = 1;
Symbol 258 MovieClip Frame 3
Symbol 258 MovieClip Frame 4
_root["pion" + _root.nb_pion]._x = (_root.init_x + (_root.place_y[_root.pos] * 40)) + 19;
_root["pion" + _root.nb_pion]._y = (_root.init_y + (_root.place_x[_root.pos] * 40)) + 19;
_root.pos++;
if (_root.pos > _root.place_x.length) {
this.gotoAndPlay(5);
} else {
this.gotoAndPlay(3);
}
Symbol 258 MovieClip Frame 5
_root["pion" + _root.nb_pion]._x = (_root.init_x + (_root.fy * 40)) + 19;
_root["pion" + _root.nb_pion]._y = (_root.init_y + (_root.fx * 40)) + 19;
if (_root.elimine() > 0) {
if (_root.thesound == 1) {
stopAllSounds();
_root.disp.start(0, 1);
}
_root.supprime(_root.tab_sup);
_root.score_total = _root.score_total + _root.score;
} else {
_root.remplace();
if (_root.elimine() > 0) {
if (_root.thesound == 1) {
stopAllSounds();
_root.disp.start(0, 1);
}
_root.supprime(_root.tab_sup);
_root.score_total = _root.score_total + _root.score;
}
}
Array.prototype.minValue = function () {
var i = 0;
while (i < (this.length - 1)) {
this[i + 1] = ((this[i] < this[i + 1]) ? (this[i]) : (this[i + 1]));
i++;
}
return(this[this.length - 1]);
};
if (_root.score == 0) {
_root.score_memo = [];
} else {
_root.lengths = _root.score_memo.length;
_root.score_memo[_root.lengths] = _root.score;
if (_root.lengths > 0) {
_root.score_total = _root.score_total + (Math.pow(2, _root.lengths) * _root.score_memo.minValue());
}
}
_root.score_string = _root.score_total.toString();
var i = 0;
while (i < 10) {
var j = 1;
while (j < 6) {
_root[("c" + i) + j]._x = 125 + (18 * j);
_root[("c" + i) + j]._y = 480;
j++;
}
i++;
}
_root.scorey = 380;
_root[("c" + _root.score_string.charAt(0)) + "1"]._y = _root.scorey;
if (_root.score_string.length > 1) {
_root[("c" + _root.score_string.charAt(1)) + "2"]._y = _root.scorey;
}
if (_root.score_string.length > 2) {
_root[("c" + _root.score_string.charAt(2)) + "3"]._y = _root.scorey;
}
if (_root.score_string.length > 3) {
_root[("c" + _root.score_string.charAt(3)) + "4"]._y = _root.scorey;
}
if (_root.score_string.length > 4) {
_root[("c" + _root.score_string.charAt(4)) + "5"]._y = _root.scorey;
}
if (_root.total == 81) {
_root.gotoAndStop(3);
} else {
_root.complete();
}
_root.mode = 0;
stop();
Symbol 271 Button
on (press) {
_root.go_url = "http://www.my-iq.net/index.php?ref=" + _root.test_qi._url;
getURL (_root.go_url, "_top");
}
on (rollOver) {
_root.iq._alpha = 50;
}
on (rollOut) {
_root.iq._alpha = 100;
}
Symbol 273 Button
on (release) {
if (_root.thesound == 0) {
_root.snd_ok._alpha = 0;
_root.thesound = 1;
stopAllSounds();
_root.error.start(0, 1);
} else {
_root.snd_ok._alpha = 100;
_root.thesound = 0;
}
}
Symbol 284 Button
on (release) {
code1 = ["8", "D", "1", "4", "F", "A", "0", "2", "C", "3"];
code2 = ["A", "E", "2", "0", "D", "B", "5", "7", "6", "9"];
equa1 = (_root.score_total + 10) * 11;
equa2 = (_root.score_total + 11) * 11;
score_string1 = equa1.toString();
score_string2 = equa2.toString();
while (score_string1.length < score_string2.length) {
score_string1 = "0" + score_string1;
}
i = 0;
codage = "";
while (i < score_string2.length) {
pos_string1 = Number(score_string1.charAt(i));
pos_string2 = Number(score_string2.charAt(i));
codage = (codage + code1[pos_string1]) + code2[pos_string2];
i++;
}
_root.url_results = "http://www.flash-gamer.eu/index.php?page=4&game=lines&result=" + codage;
getURL (_root.url_results, "_top");
}
on (rollOver) {
_root.hs._alpha = 50;
}
on (rollOut) {
_root.hs._alpha = 100;
}