Bonjour a tous
J'ai le script pour faire vibrer un texte sa marche nikel, mais probleme sur la meme page je veux creer un autre texte qui vibre mais sa ne marche pu, le premier texte a disparu et le 2eme est ok, voila le code :
var chaineAafficher = String("The Visit");
style1 = new TextFormat();
style1.font = "Courrier";
style1.bold = true;
style1.color = 0xFA8116;
style1.size = 10;
//
for (i=0; i<chaineAafficher.length; i++) {
_root.createEmptyMovieClip("lettre"+i, i);
_root["lettre"+i]._x = 185+(i*13);
_root["lettre"+i]._y = 320;
_root["lettre"+i].createTextField("caractere", 1, 0, 0, 80, 80);
_root["lettre"+i].caractere.text = chaineAafficher.substr(i, 1);
_root["lettre"+i].caractere.setTextFormat(style1);
_root["lettre"+i].origX = _root["lettre"+i]._x;
_root["lettre"+i].origY = _root["lettre"+i]._y;
//
/*_root["lettre"+i].onEnterFrame = function() {
this._x = this.origX+random(4);
this._y = this.origY+random(4);
};*/
}
faireVibrertexte = function () {
for (i=0; i<chaineAafficher.length; i++) {
_root["lettre"+i]._x = _root["lettre"+i].origX+random(4);
_root["lettre"+i]._y = _root["lettre"+i].origY+random(4);
}
};
//
setInterval(faireVibrertexte, 50);
Comment faire pour afficher un autre texte vibrant ?
Partager