1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90
| stop();
label_01 = "Votre message";
label_02 = "e-mail";
label_03 = "Telephone";
label_04 = "Objet";
label_05 = "Votre nom";
text1 = label_01;
text2 = label_02;
text3 = label_03;
text4 = label_04;
text5 = label_05;
this.onEnterFrame = function() {
text_field_1.onSetFocus = function() {
if (text1 == label_01) {
text1 = "";
}
};
text_field_1.onKillFocus = function() {
if (text1== "") {
text1 = label_01;
};
};
text_field_2.onSetFocus = function() {
if (text2 == label_02) {
text2 = "";
}
};
text_field_2.onKillFocus = function() {
if (text2 == "") {
text2 = label_02;
}
};
text_field_3.onSetFocus = function() {
if (text3 == label_03) {
text3 = "";
}
};
text_field_3.onKillFocus = function() {
if (text3 == "") {
text3 = label_03;
}
};
text_field_4.onSetFocus = function() {
if (text4 == label_04) {
text4 = "";
}
};
text_field_4.onKillFocus = function() {
if (text4 == "") {
text4 = label_04;
}
};
text_field_5.onSetFocus = function() {
if (text5 == label_05) {
text5 = "";
}
};
text_field_5.onKillFocus = function() {
if (text5 == "") {
text5 = label_05;
}
};
};
var my_lv:LoadVars = new LoadVars();
var my_lv2:LoadVars = new LoadVars();
mBtn.onRelease = function() {
my_lv.text_field_1 = text1;
my_lv.text_field_2 = text2;
my_lv.text_field_3 = text3;
my_lv.text_field_4 = text4;
my_lv.text_field_5 = text5;
my_lv.sendAndLoad("mail1.php", my_lv2, "POST");
}
my_lv2.onLoad = function(bOk:Boolean) {
if(bOk) {
trace(this.nomVariableRetournee1);
trace(this.nomVariableRetournee2);
// ...
} else {
trace("Erreur lors du chargement");
}
} |