Précédent   Forum des professionnels en informatique > Webmasters - Développement Web > Flash/Flex > Flash
Flash Forum d'entraide sur la technologie Flash (Cours, FAQs, Sources)
Partagez cette discussion sur d'autres réseaux sociaux : Viadeo Twitter Google Facebook Digg Delicious MySpace Yahoo
Réponse Proposer ce sujet en actualité
 
Outils de la discussion
Publicité
'
Vieux 25/06/2007, 16h40   #1
Membre du Club
 
Inscription : juin 2007
Messages : 336
Détails du profil
Informations forums :
Inscription : juin 2007
Messages : 336
Points : 48
Points : 48
Par défaut Texte vibrant double

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 ?
yuyu599 est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 25/06/2007, 16h48   #2
Membre du Club
 
Inscription : juin 2007
Messages : 336
Détails du profil
Informations forums :
Inscription : juin 2007
Messages : 336
Points : 48
Points : 48
voila comment j'ai placer mon code pour afficher 2 textes

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);
{
var chaineAafficher = String("2eme texte !!!");
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 = 200+(i*13);
_root["lettre"+i]._y = 200;
_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);
}
yuyu599 est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 25/06/2007, 19h53   #3
Membre du Club
 
Inscription : juin 2007
Messages : 336
Détails du profil
Informations forums :
Inscription : juin 2007
Messages : 336
Points : 48
Points : 48
personne ?
yuyu599 est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 28/06/2007, 11h19   #4
Invité de passage
 
Inscription : décembre 2006
Messages : 4
Détails du profil
Informations forums :
Inscription : décembre 2006
Messages : 4
Points : 1
Points : 1
perso, je ne vois pas trop l'utilité de faire tout ce scipt... alors qu'il suffit juste de placer ton texte sur un clip de quelques images (entre 2 et 10) et de le bouger légèrement sur chaqu'unes d'elles...
Sildarin est déconnecté   Envoyer un message privé Réponse avec citation 00
Réponse Proposer ce sujet en actualité
Outils de la discussion



Fuseau horaire GMT +2. Il est actuellement 22h29.


 
 
 
 
Partenaires

Hébergement Web