Bonjour à tous,
je débute en FLASH mais je maitrise PHP ...
J'ai un retour d'une BD que je transforme en XML et j'ai fais ceci :
Je cherche à affichier dans un texte dynamique ( News) le retour de ma BD, ligne par ligne en essayant de temporiser l'affichage d'une ligne à 10 secondes par exemple.Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 news_xml = new XML(); news_xml.ignoreWhite = true; activite = ""; titre = ""; texte = ""; lien = ""; news_xml.onLoad = function(){ listNew = news_xml.firstChild.childNodes; for (var i:Number = 0; i< listNew.length; i++ ) { activite += listNew[i].firstChild.firstChild.nodeValue +"\n";; titre += listNew[i].childNodes[1].firstChild.nodeValue +"\n";; texte += listNew[i].childNodes[2].firstChild.nodeValue +"\n"; lien += listNew[i].childNodes[3].firstChild.nodeValue; } News = activite; News += titre; News += texte; News += lien; } news_xml.load("annonceurs.xml");
( 1 ligne activite,contient titre,texte,lien).
Je sais pas trop comment m'y prendre dans FLASH.
Merci de vos conseils.
Michel
Mon XML réduit:
Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 <?xml version="1.0" encoding="UTF-8" standalone="no" ?> <root> <annonceur> <activite>ASSOCIATION</activite> <titre>association sur la ville </titre> <texte>bla, bla..........................</texte> <lien>/annonceurs/annonceurs.php?NoID=1</lien> </annonceur> <annonceur> <activite>CLUB</activite> <titre>Club sportif sur la ville</titre> <texte>bla, bla..........................</texte> <lien>/annonceurs/annonceurs.php?NoID=2</lien> </annonceur> </root>