Ho un box di testo su un fla che prende il testo da un xml. Fin qui tutto ok, riesco a cambiare gli attributi del testo ma non il colore della riga che mi interessa, vorrei ottenere una cosa del genere:
A CERTAIN GIRL
Naomi Neville
There's a certain girl I've been in love with a long, long time.
(What's her name?) I can't tell you. (No!)
I can't reveal her name until I've got her.
Questo il codice actionscript:
----------------------------------
myXML.onLoad = ParseXML;
songs = [];
function ParseXML () {
lyrics = myXML.firstChild.childNodes;
for(x=0;x<lyrics.length;x++)
songs[x] = "" +
lyrics[x].attributes.title + "
" +
lyrics[x].attributes.author + "
" +
lyrics[x].firstChild.nodeValue.split("\r").join("");
}
song = 0;
------------------------------------------------------------
Come e dove devo impostare il colore del testo scelto, ci sono dei tag simili a quelli x impostare il grassetto ed il corsivo o forse devo farlo direttamente sul file XML?
Questo è il file xml:
-------------------------
<?xml version="1.0" encoding="UTF-8"?>
<!--
<lyrics>
<song title="" aughor="">
</song>
</lyrics>
//-->
<lyrics>
<song title="A CERTAIN GIRL" author="Naomi Neville">
There's a certain girl I've been in love with a long, long time.
(What's her name?) I can't tell you. (No!)
I can't reveal her name until I've got her.
</song>
</lyrics>
-------------------------------------------------------
E se volessi linkare anche una parte del testo...che so... solo il titolo?
Lo so sono un rompiballe...ma grazie a tutti in anticipo!
Zampox

Rispondi quotando
