Frame 1
tb = [let00, let01, let02, let03, let04, let10, let11, let12, let13, let14, let20, let21, let22, let23, let24, let30, let31, let32, let33, let34, let40, let41, let42, let43, let44];
nums = [line0, line1, line2, line3, line4, col0, col1, col2, col3, col4];
Instance of Symbol 7 MovieClip "barre_horiz" in Frame 1
onClipEvent (load) {
this._visible = false;
}
Instance of Symbol 7 MovieClip "barre_vert" in Frame 1
onClipEvent (load) {
this._visible = false;
}
Instance of Symbol 9 MovieClip "carre" in Frame 1
onClipEvent (load) {
this._visible = false;
}
Instance of Symbol 11 MovieClip "ombre" in Frame 1
onClipEvent (load) {
this._alpha = 0;
}
Instance of Symbol 15 MovieClip "vert_ligne" in Frame 1
onClipEvent (load) {
this._alpha = 0;
}
Instance of Symbol 17 MovieClip "horiz_ligne" in Frame 1
onClipEvent (load) {
this._alpha = 0;
}
Frame 2
stop();
for (var i in tb) {
tb[i]._alpha = 0;
}
for (var i in nums) {
nums[i]._alpha = 0;
}
titre._alpha = 0;
onEnterFrame = function () {
titre._alpha = titre._alpha + 2.5;
if (ombre._alpha > 30) {
if (ombre._alpha > 55) {
ombre._alpha = 60;
} else {
ombre._alpha = ombre._alpha + 2;
}
horiz_ligne.play();
horiz_ligne._alpha = horiz_ligne._alpha + 3;
vert_ligne.play();
vert_ligne._alpha = vert_ligne._alpha + 3;
for (var _local1 in tb) {
tb[_local1]._alpha = tb[_local1]._alpha + 3;
}
for (var _local1 in nums) {
nums[_local1]._alpha = nums[_local1]._alpha + 4;
}
} else {
ombre._alpha = ombre._alpha + 2;
}
if (horiz_ligne._alpha > 95) {
gotoAndPlay ("Jeu");
delete onEnterFrame;
}
};
Frame 6
function barreControl(colonne, ligne, barre) {
switch (barre) {
case "horizontal" :
barre_vert._visible = false;
barre_horiz._y = decalagey + (ligne * ecartement);
barre_horiz._visible = true;
carre._x = decalagex + (colonne * ecartement);
carre._y = decalagey + (ligne * ecartement);
carre._visible = true;
break;
case "vertical" :
barre_horiz._visible = false;
barre_vert._x = decalagex + (colonne * ecartement);
barre_vert._visible = true;
carre._x = decalagex + (colonne * ecartement);
carre._y = decalagey + (ligne * ecartement);
carre._visible = true;
break;
case "reset" :
barre_vert._visible = false;
barre_horiz._visible = false;
carre._visible = false;
break;
default :
barre_vert._visible = false;
barre_horiz._visible = false;
carre._visible = false;
trace("Erreur de barreControl");
}
}
function focusControl(ligne, colonne, barre) {
ligne = Number(ligne);
colonne = Number(colonne);
switch (barre) {
case "horizontal" :
if (((((ligne == 0) and (colonne == 1)) or ((ligne == 2) and (colonne == 0))) or ((ligne == 3) and (colonne == 3))) or ((ligne == 1) and (colonne == 4))) {
ligne = ligne + 1;
}
Selection.setFocus(tbb[ligne + 1][colonne]);
break;
case "vertical" :
if (((((ligne == 1) and (colonne == 0)) or ((ligne == 2) and (colonne == 3))) or ((ligne == 4) and (colonne == 2))) or ((ligne == 3) and (colonne == -1))) {
colonne = colonne + 1;
}
Selection.setFocus(tbb[ligne][colonne + 1]);
break;
case "reset" :
Selection.setFocus(rien);
break;
default :
Selection.setFocus();
trace("Erreur de focusControl");
}
}
function verification() {
x = 0;
for (var _local1 in tb) {
if (tb[_local1].text == reponses[_local1]) {
x++;
}
}
if (x == (nombreCases * nombreCases)) {
barreControl(0, 0, "reset");
focusControl(0, 0, "reset");
gotoAndPlay ("Resolu");
}
}
stop();
var tb = new Array();
var tbb = new Array();
var colonnes = new Array();
var tbb = new Array();
var reponses = new Array();
var depart = new Array();
var decalagex = ombre._x;
var decalagey = ombre._y;
var supr_lettre = false;
var changement = true;
var barre = "vertical";
var nomLet;
var nomLetActive;
var dureedudoubleclic = 250;
var clicprecedent = 0;
var nombreCases = 5;
var ecartement = 42;
tbb[0] = [let00, let01, let02, let03, let04];
tbb[1] = [let10, let11, let12, let13, let14];
tbb[2] = [let20, let21, let22, let23, let24];
tbb[3] = [let30, let31, let32, let33, let34];
tbb[4] = [let40, let41, let42, let43, let44];
tb = [let00, let01, let02, let03, let04, let10, let11, let12, let13, let14, let20, let21, let22, let23, let24, let30, let31, let32, let33, let34, let40, let41, let42, let43, let44];
reponses = ["K", "O", "T", "A", "T", "E", "B", "O", "U", "A", "F", "E", "R", "R", "A", "I", "L", "E", "A", "L", "R", "E", "A", "I", "S"];
depart = ["", "", "", "", "", "", "B", "", "", "", "", "", "", "", "A", "I", "", "", "", "", "", "", "", "I", ""];
for (var i in tb) {
tb[i]._alpha = tb[i]._alpha + 100;
}
for (var i in tb) {
tb[i].onSetFocus = function () {
nomLet = this;
nomLet = String(nomLet);
nomLetx = nomLet.slice(11, 12);
nomLety = nomLet.slice(12, 13);
nomLetActive = this;
_level0.nomLetActive = nomLetActive;
changement = !changement;
barreControl(nomLetx, nomLety, barre);
};
}
onEnterFrame = function () {
lettre_ = nomLetActive.text;
if (((((lettre_ == "\u00E9") or (lettre_ == "\u00E8")) or (lettre_ == "\u00E7")) or (lettre_ == "\u00E0")) or (lettre_ == "\u00F9")) {
lettre_ = "";
}
lettre = lettre_.toUpperCase();
switch (supr_lettre) {
case true :
if ((lettre == lettre_.toLowerCase()) or ((lettre == lettre_) and (changement != changement_))) {
lettre = "";
}
break;
case false :
if (lettre == lettre_.toLowerCase()) {
lettre = "";
}
break;
default :
lettre = "";
}
nomLetActive.text = lettre;
if (lettre_ != lettre_.toUpperCase()) {
focusControl(nomLetx, nomLety, barre);
verification();
}
double_click.onMouseUp = function () {
if (double_click.hitTest(_root._xmouse, _root._ymouse, true)) {
if (clicprecedent == 0) {
clicprecedent = getTimer();
nomLetActiveTemp = nomLetActive;
} else {
clicprecedent = 0;
if (nomLetActiveTemp == nomLetActive) {
if (barre == "vertical") {
barre = "horizontal";
barreControl(nomLetx, nomLety, barre);
} else if (barre == "horizontal") {
barre = "vertical";
barreControl(nomLetx, nomLety, barre);
}
}
}
}
};
if (clicprecedent > 0) {
if ((getTimer() - clicprecedent) > dureedudoubleclic) {
clicprecedent = 0;
}
}
changement_ = changement;
};
solution_bouton.onRelease = function () {
barreControl(0, 0, "reset");
focusControl(0, 0, "reset");
for (var _local1 in tb) {
tb[_local1].text = reponses[_local1];
}
};
nettoyer_bouton.onRelease = function () {
barreControl(0, 0, "reset");
focusControl(0, 0, "reset");
for (var _local1 in tb) {
if (tb[_local1].text == reponses[_local1]) {
} else {
tb[_local1].text = "";
}
}
nomLetx = 0;
nomLety = 0;
};
vertical_bouton.onRelease = function () {
barre = "vertical";
barre_horiz._visible = false;
barreControl(nomLetx, nomLety, barre);
focusControl(nomLetx, nomLety - 1, barre);
barre_vert._visible = true;
};
horizontal_bouton.onRelease = function () {
barre = "horizontal";
barre_vert._visible = false;
barreControl(nomLetx, nomLety, barre);
focusControl(nomLetx - 1, nomLety, barre);
barre_horiz._visible = true;
};
effacer_bouton.onRelease = function () {
barreControl(0, 0, "reset");
focusControl(0, 0, "reset");
for (var _local1 in tb) {
tb[_local1].text = depart[_local1];
}
nomLetx = 0;
nomLety = 0;
};
effacerLigne_bouton.onRelease = function () {
switch (barre) {
case "horizontal" :
for (var _local1 in tbb) {
j = Number(_local1);
nomLety = Number(nomLety);
if (tbb[_local1][nomLety].text == depart[nomLety + (j * nombreCases)]) {
} else {
tbb[_local1][nomLety].text = "";
}
}
focusControl(-1, nomLety, barre);
break;
case "vertical" :
for (var _local1 in tbb) {
j = Number(_local1);
if (tbb[nomLetx][_local1].text == depart[j + (nomLetx * nombreCases)]) {
} else {
tbb[nomLetx][_local1].text = "";
}
}
focusControl(nomLetx, -1, barre);
}
};
lettre_bouton.onRelease = function () {
nomLety = Number(nomLety);
tbb[nomLetx][nomLety].text = reponses[nomLety + (nomLetx * nombreCases)];
focusControl(nomLetx, nomLety, barre);
};
mot_bouton.onRelease = function () {
switch (barre) {
case "horizontal" :
focusControl(0, 0, "reset");
carre._visible = false;
for (var _local1 in tbb) {
j = Number(_local1);
nomLety = Number(nomLety);
tbb[_local1][nomLety].text = reponses[nomLety + (j * nombreCases)];
}
break;
case "vertical" :
focusControl(0, 0, "reset");
carre._visible = false;
for (var _local1 in tbb) {
j = Number(_local1);
tbb[nomLetx][_local1].text = reponses[j + (nomLetx * nombreCases)];
}
}
};
imprimable_bouton.onRelease = function () {
for (var _local1 in tb) {
tb[_local1].text = depart[_local1];
}
gotoAndPlay ("Print");
};
emploi_bouton.onRelease = function () {
gotoAndPlay ("Regles");
delete onEnterFrame;
};
Frame 11
stop();
Frame 16
stop();
ombre._visible = false;
for (var i in tb) {
tb[i].text = depart[i];
}
print_bouton.onRelease = function () {
gotoAndPlay ("Print");
};
annuler_bouton.onRelease = function () {
gotoAndPlay ("Jeu");
ombre._visible = true;
};
Frame 17
stop();
var my_pj = new PrintJob();
var myResult = my_pj.start();
if (myResult) {
myResult = my_pj.addPage(0, {xMin:0, xMax:500, yMin:0, yMax:400});
myResult = my_pj.addPage("myMovieClip", {xMin:0, xMax:500, yMin:400, yMax:800}, {printAsBitmap:true}, 1);
myResult = my_pj.addPage(1, null, {printAsBitmap:false}, 2);
myResult = my_pj.addPage(0);
my_pj.send();
}
delete my_pj;
Frame 21
stop();
ombre._visible = false;
horiz_ligne._visible = false;
vert_ligne._visible = false;
for (var i in tb) {
tb[i]._visible = false;
}
retour_bouton.onRelease = function () {
for (var _local1 in tb) {
tb[_local1]._visible = true;
}
ombre._visible = true;
horiz_ligne._visible = true;
vert_ligne._visible = true;
gotoAndPlay ("Jeu");
};
Symbol 15 MovieClip Frame 1
stop();
Instance of Symbol 14 MovieClip "mask2" in Symbol 15 MovieClip Frame 1
onClipEvent (load) {
position = this._y;
ralenti = 25;
}
onClipEvent (enterFrame) {
v = position - this._y;
this._y = this._y + (v / ralenti);
}
Symbol 15 MovieClip Frame 2
mask2.position = 0;
Symbol 17 MovieClip Frame 1
stop();
Instance of Symbol 14 MovieClip "mask1" in Symbol 17 MovieClip Frame 1
onClipEvent (load) {
position = this._x;
ralenti = 25;
}
onClipEvent (enterFrame) {
v = position - this._x;
this._x = this._x + (v / ralenti);
}
Symbol 17 MovieClip Frame 2
mask1.position = 0;