Bonjour,
Je cherche à changer le contenu d'un TextField que je cré dynamqiement
en ActionScript. Seulement j'ai quelque problème. Dés que je modifie le
texte de mon TextField, celui-ci n'est plus visible sur ma page.
Voila le code que j'ai fait :
_root.txt_process = "Vérification des informations en cours";
if (headerZone.login_info_process == undefined) {
var format = new TextFormat();
format.color = 0xA1A1A1;
format.bullet = false;
format.bold = false;
format.font = "Myriad Pro Bold";
format.size = 10;
login_info_process =
headerZone.createTextField("login_info_process", getNextHighestDepth(),
780, 32, 210, 41);
with (login_info_process) {
type = "dynamic";
variable = "_root.txt_process";
multiline = false;
setTextFormat(format);
embedFonts = true;
selectable = false;
_alpha = 0;
}
} else {
headerZone.login_info_process._alpha = 0;
}
headerZone.login_info_process.changeTexte = function() {
trace(_root.txt_process);
if (_root.txt_process == "Vérification des informations en cours") {
_root.txt_process = "Vérification des informations en cours.";
} else if (_root.txt_process == "Vérification des informations en cours.") {
_root.txt_process = "Vérification des informations en cours..";
} else if (_root.txt_process == "Vérification des informations en cours..") {
_root.txt_process = "Vérification des informations en cours...";
} else if (_root.txt_process == "Vérification des informations en cours...") {
_root.txt_process = "Vérification des informations en cours";
}
};
headerZone.login_info_process.displayLoginProcess = function() {
this._alpha += 5;
if (this._alpha>=100) {
this._alpha = 100;
clearInterval(this.intervalDisplay);
this.intervalDisplay = setInterval(this, "changeTexte", 1000);
}
};
clearInterval(headerZone.login_info_process.intervalDisplay);
headerZone.login_info_process.intervalDisplay =
setInterval(headerZone.login_info_process, "displayLoginProcess", 20);
Lorsque j'éxecute ce script dans la trace j'obtiens bien les valeurs désiré :
Vérification des informations en cours
Vérification des informations en cours.
Vérification des informations en cours..
Vérification des informations en cours...
Vérification des informations en cours
Vérification des informations en cours.
Vérification des informations en cours..
Vérification des informations en cours...
Vérification des informations en cours
Là je suis un peu perdu et je ne vois pas comment faire. J'ai essayer
aussi en changeant dynamqiement le chamtp.text et non de passer var un
champ dynamique lié à une variables mais j'ai le même problème.
Merci d'avance.
--
Arno