[AS2] Importing text/URL from XML

Hi, I’m using this script in order to import some XML data in a Flash movie; in the “descrizione_txt” textfield I’d like to have some mixed text: in other words, I’d like to type both straight text and URLs in the XML file (see code at the end of the post), and then I’d like to make the text appear in the “descrizione_txt” , but the URLs should be clickable. How can I do that?

I have another question too: if you try to load the attached .fla , by default there’ s no item selected at first…well, I’d like to have one item (maybe the first one) selected by default, how can I do?
thanks

AS2:

ActionScript Code:
[LEFT][COLOR=#000000]**var**[/COLOR] caricaXML:[COLOR=#0000FF]XML[/COLOR] = [COLOR=#000000]**new**[/COLOR] [COLOR=#0000FF]XML[/COLOR][COLOR=#000000]([/COLOR][COLOR=#000000])[/COLOR];

caricaXML.[COLOR=#0000FF]ignoreWhite[/COLOR] = [COLOR=#000000]true[/COLOR];
caricaXML.[COLOR=#0000FF]onLoad[/COLOR] = leggiXML;
caricaXML.[COLOR=#0000FF]load[/COLOR]COLOR=#000000[/COLOR];
[COLOR=#000000]var[/COLOR] posInit = item_mc.[COLOR=#0000FF]_y[/COLOR];
[COLOR=#000000]function[/COLOR] leggiXMLCOLOR=#000000[/COLOR] [COLOR=#000000]{[/COLOR]
[COLOR=#0000FF]if[/COLOR] [COLOR=#000000]([/COLOR]succes == [COLOR=#000000]true[/COLOR][COLOR=#000000])[/COLOR] [COLOR=#000000]{[/COLOR]
[COLOR=#000000]var[/COLOR] images:[COLOR=#0000FF]Array[/COLOR] = [COLOR=#000000][[/COLOR][COLOR=#000000]][/COLOR];
[COLOR=#000000]var[/COLOR] anno:[COLOR=#0000FF]Array[/COLOR] = [COLOR=#000000][[/COLOR][COLOR=#000000]][/COLOR];
[COLOR=#000000]var[/COLOR] descrizione:[COLOR=#0000FF]Array[/COLOR] = [COLOR=#000000][[/COLOR][COLOR=#000000]][/COLOR];
[COLOR=#000000]var[/COLOR] titolo:[COLOR=#0000FF]Array[/COLOR] = [COLOR=#000000][[/COLOR][COLOR=#000000]][/COLOR];
[COLOR=#000000]var[/COLOR] tempArray:[COLOR=#0000FF]Array[/COLOR] = [COLOR=#000000]new[/COLOR] [COLOR=#0000FF]Array[/COLOR]COLOR=#000000[/COLOR];
[COLOR=#000000]var[/COLOR] tempArray = [COLOR=#0000FF]this[/COLOR].[COLOR=#0000FF]firstChild[/COLOR].[COLOR=#0000FF]childNodes[/COLOR];
[COLOR=#0000FF]for[/COLOR] [COLOR=#000000]([/COLOR][COLOR=#000000]var[/COLOR] i:[COLOR=#0000FF]Number[/COLOR] = [COLOR=#000080]0[/COLOR]; i<tempArray.[COLOR=#0000FF]length[/COLOR]; i++[COLOR=#000000])[/COLOR] [COLOR=#000000]{[/COLOR]
images[COLOR=#000000][[/COLOR]i[COLOR=#000000]][/COLOR] = tempArray[COLOR=#000000][[/COLOR]i[COLOR=#000000]][/COLOR].[COLOR=#0000FF]childNodes[/COLOR][COLOR=#000000][[/COLOR][COLOR=#000080]0[/COLOR][COLOR=#000000]][/COLOR].[COLOR=#0000FF]attributes[/COLOR].[COLOR=#000080]images[/COLOR];
anno[COLOR=#000000][[/COLOR]i[COLOR=#000000]][/COLOR] = tempArray[COLOR=#000000][[/COLOR]i[COLOR=#000000]][/COLOR].[COLOR=#0000FF]childNodes[/COLOR][COLOR=#000000][[/COLOR][COLOR=#000080]0[/COLOR][COLOR=#000000]][/COLOR].[COLOR=#0000FF]attributes[/COLOR].[COLOR=#000080]anno[/COLOR];
descrizione[COLOR=#000000][[/COLOR]i[COLOR=#000000]][/COLOR] = tempArray[COLOR=#000000][[/COLOR]i[COLOR=#000000]][/COLOR].[COLOR=#0000FF]childNodes[/COLOR][COLOR=#000000][[/COLOR][COLOR=#000080]0[/COLOR][COLOR=#000000]][/COLOR].[COLOR=#0000FF]firstChild[/COLOR].[COLOR=#0000FF]firstChild[/COLOR];
titolo[COLOR=#000000][[/COLOR]i[COLOR=#000000]][/COLOR] = tempArray[COLOR=#000000][[/COLOR]i[COLOR=#000000]][/COLOR].[COLOR=#0000FF]childNodes[/COLOR][COLOR=#000000][[/COLOR][COLOR=#000080]0[/COLOR][COLOR=#000000]][/COLOR].[COLOR=#0000FF]firstChild[/COLOR].[COLOR=#0000FF]attributes[/COLOR].[COLOR=#000080]titolo[/COLOR];
[COLOR=#000000]var[/COLOR] item:[COLOR=#0000FF]MovieClip[/COLOR] = item_mc.[COLOR=#0000FF]duplicateMovieClip[/COLOR][COLOR=#000000]([/COLOR][COLOR=#FF0000]“elemento”[/COLOR]+i+[COLOR=#FF0000]"_mc"[/COLOR], i[COLOR=#000000])[/COLOR];
item.[COLOR=#0000FF]_y[/COLOR] = posInit;
posInit += [COLOR=#000080]40[/COLOR];
item.[COLOR=#000080]titolo_txt[/COLOR].[COLOR=#0000FF]htmlText[/COLOR] = titolo[COLOR=#000000][[/COLOR]i[COLOR=#000000]][/COLOR];
item.[COLOR=#000080]anno_txt[/COLOR].[COLOR=#0000FF]htmlText[/COLOR] = anno[COLOR=#000000][[/COLOR]i[COLOR=#000000]][/COLOR];
item.[COLOR=#000080]images[/COLOR] = images[COLOR=#000000][[/COLOR]i[COLOR=#000000]][/COLOR];
item.[COLOR=#000080]descrizione[/COLOR] = descrizione[COLOR=#000000][[/COLOR]i[COLOR=#000000]][/COLOR];
item.[COLOR=#0000FF]onRelease[/COLOR] = [COLOR=#000000]function[/COLOR]COLOR=#000000[/COLOR] [COLOR=#000000]{[/COLOR]
loadimg_mc.[COLOR=#0000FF]loadMovie[/COLOR]COLOR=#000000[/COLOR];
descrizione_txt.[COLOR=#0000FF]htmlText[/COLOR] = [COLOR=#0000FF]this[/COLOR].[COLOR=#000080]descrizione[/COLOR];
[COLOR=#0000FF]this[/COLOR].[COLOR=#000080]titolo_txt[/COLOR].[COLOR=#0000FF]textColor[/COLOR] = [COLOR=#000080]000000[/COLOR];
oldId.[COLOR=#000080]titolo_txt[/COLOR].[COLOR=#0000FF]textColor[/COLOR] = [COLOR=#000080]000000[/COLOR];
oldId = [COLOR=#0000FF]this[/COLOR];
[COLOR=#000000]}[/COLOR];
[COLOR=#000000]}[/COLOR]
[COLOR=#000000]}[/COLOR] [COLOR=#0000FF]else[/COLOR] [COLOR=#000000]{[/COLOR]
[COLOR=#0000FF]trace[/COLOR][COLOR=#000000]([/COLOR][COLOR=#FF0000]“file non trovato!”[/COLOR][COLOR=#000000])[/COLOR];
[COLOR=#000000]}[/COLOR]
[COLOR=#000000]}[/COLOR]
[/LEFT]

XML

<?xml version="1.0" encoding="UTF-8"?>



<discografia>
<discoId id="1">
<disco images="image1.jpg" anno="2007">
<descrizione titolo="nome1"><![CDATA[aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa http://www.mylink.com aaaaaaaaaaaabbbbbbbbbbbbbbbbdddd http://www.mylink.comgggggggggggggggggg]]></descrizione>
</disco>
</discoId>
<discoId id="2">
<disco images="image2.jpg" anno="2007">
<descrizione titolo="nome2"><![CDATA[aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa http://www.mylink.com aaaaaaaaaaaabbbbbbbbbbbbbbbbdddd http://www.mylink.com gggggggggggggggggg]]></descrizione>
</disco>
</discoId>
<discoId id="3">
<disco images="image3.jpg" anno="2008">
<descrizione titolo="nome3"><![CDATA[aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa http://www.mylink.com aaaaaaaaaaaabbbbbbbbbbbbbbbbdddd http://www.mylink.com gggggggggggggggggg]]></descrizione>
</disco>
</discoId>
<discoId id="4">
<disco images="nome4.jpg" anno="2008">
<descrizione titolo="Realight"><![CDATA[aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa http://www.mylink.com aaaaaaaaaaaabbbbbbbbbbbbbbbbdddd http://www.mylink.com gggggggggggggggggg]]></descrizione>
</disco>
</discoId>
</discografia>