djancess
Messages postés2Date d'inscriptionlundi 1 septembre 2008StatutMembreDernière intervention29 septembre 2009
-
29 sept. 2009 à 14:17
djancess
Messages postés2Date d'inscriptionlundi 1 septembre 2008StatutMembreDernière intervention29 septembre 2009
-
29 sept. 2009 à 16:23
Slt mon code me marque undefined au niveau du deuxieme trace en rouge pourkoi et comment recuperer ma variable en dessous. pour quel puisse charger mon texte dynamique lesdedi_txt
onClipEvent (load) {
playlist_xml = new XML(); //Créons l'objet xml
playlist_xml.ignoreWhite = true; //Suppprimons les espaces vides
playlist_xml.onLoad = function(succes) {
if (succes=true) {
//Remarque: le mot clé this est utilisé pr faire reference
//à l'objet en cours qui est notre objet playlist_xml
toutLesNoeudPlayliste = this.firstChild.childNodes; //renvoie tout les noeud du fichier xml
//trace (toutLesNoeudPlayliste);
chansonEnCours=this.childNodes[0].firstChild; //Lecture du premier elt du 1er noeud
//trace (chansonEnCours);
premiereChanson=chansonEnCours;
titrEmiss=premiereChanson.attributes.titremiss;
Surnom=premiereChanson.attributes.surnomanim;
madedi=premiereChanson.attributes.dedicace;
trace (madedi);
ziq.loadSound(premiereChanson.attributes.fichier,true); //Chargement du fichier du morceau suivant
chansonPosition=0;
ziq.start(chansonPosition,0);
}
};
playlist_xml.load("../lecteur/playlist.xml"); //Chargeons l'objet xml avec le fichier externe xml
trace ("CEKIDOITPASER="+madedi);
this.lesdedi_txt.text =madedi;
this.lesdedi_txt.backgroundColor = "0xB8BDCB";
for (i=0;i<(Math.round(this.lesdedi_txt._width/4));i++) this.lesdedi_txt.text = " "+this.lesdedi_txt.text;
for (i=0;i<(Math.round(this.lesdedi_txt._width/4));i++) this.lesdedi_txt.text = this.lesdedi_txt.text+" ";
}
onClipEvent (enterFrame) {
// vers la gauche
this.lesdedi_txt.hscroll +=2;
// vers la droite
// this.monTexte.hscroll -=5;
if (this.lesdedi_txt.hscroll==this.lesdedi_txt.maxhscroll) this.lesdedi_txt.hscroll = 1;
}