# Flash + XML Help

**URL:** <https://forum.kirupa.com/t/flash-xml-help/173033>\
**Category:** flash\
**Created:** [December 20, 2005, 4:03pm UTC](https://forum.kirupa.com/t/flash-xml-help/173033 "2005-12-20T16:03:05Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![tobijas20](https://avatars.discourse-cdn.com/v4/letter/t/74df32/32.png) [@tobijas20](https://forum.kirupa.com/u/tobijas20)\
**Post date:** [December 20, 2005, 4:03pm UTC](https://forum.kirupa.com/t/flash-xml-help/173033/1 "2005-12-20T16:03:05Z")

</div>

OK, I’m making just another mp3 player, but with more information about songs.

I store data in XML file with this elements:

```auto
 
 
<list>
<entry date="Some date 1">
<title>Title 1</title>
<description>just another text 1</description>
<image>Image1.jpg</image>
</entry>
 
<entry date="Some date 1">
<title>Title 2</title>
<description>just another text 2</description>
<image>Image2.jpg</image>
</entry>
...
 
</list>

```

I import data into Flash and make song list.  
Each line in the list shows song No and song title.  
Each line can be clicked.

What I want is to click on each line in the list and show all data of that song (date, title, description…) in one single text field called “allinOne”.  
I have tried something like:  
…onPress = function() {  
allinOne.htmlText = songTitel\* + songDate\* + …  
};

But it doesn’t work! Here is the code:

[AS]  
\_root.playlist == undefined ? playlist=“list.xml” : playlist=\_root.playlist;  
Stage.showMenu = false;  
Stage.scaleMode = “noScale”;  
stop();  
data\_xml = new XML();  
data\_xml.ignoreWhite = true;  
data\_xml.onLoad = loadData;  
data\_xml.load(playlist);  
function loadData(success) {  
if (success) {  
songDate = new Array();  
songTitel = new Array();  
audioTracks = new Array();  
audioTracks = this.firstChild.childNodes;  
song\_total = audioTracks.length;  
for (var i = 0; i\<song\_total; i++) {  
songDate.push(audioTracks\*.attributes.date);  
songTitel.push(audioTracks\*.childNodes[0].firstChild.nodeValue);  
holder.playlist.btn.duplicateMovieClip(“btn”+i, i);  
holder.playlist[“btn”+i].\_y = holder.playlist.btn.\_y+i_int(holder.playlist.btn.\_height)+i;  
holder.playlist[“btn”+i].txt = checkDigits(i+1)+". "+ songTitel_;  
holder.playlist[“btn”+i].hit.onPress = function() {  
allinOne.htmlText = (“ok”+songTitel\*);// I need help for this line here!!!  
};  
}

}  
delete audioTracks;  
delete data\_xml;  
}  
[/AS]
