# MP3 Player v2 - XML

**URL:** https://forum.kirupa.com/t/mp3-player-v2-xml/44539
**Category:** design
**Created:** [March 4, 2004, 8:25pm UTC](https://forum.kirupa.com/t/mp3-player-v2-xml/44539 "2004-03-04T20:25:36Z")
**Posts on this page:** 20
**Page:** 3

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [August 13, 2004, 9:09am UTC](https://forum.kirupa.com/t/mp3-player-v2-xml/44539/41 "2004-08-13T09:09:25Z")

</div>

Can I see the playlist too ?

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [August 13, 2004, 9:12am UTC](https://forum.kirupa.com/t/mp3-player-v2-xml/44539/42 "2004-08-13T09:12:46Z")

</div>

```auto

<?xml version="1.0" encoding="iso-8859-1"?>
<playlist>
<song title="Lovers Tale"><![CDATA[loverstale.mp3]]></song>
<song title="Hungry"><![CDATA[hungry.mp3]]></song>
<song title="Hurricane"><![CDATA[hurricane.mp3]]></song>
<song title="Everybody's Girl"><![CDATA[everybodysgirl.mp3]]></song>
<song title="Vale of Avoca"><![CDATA[valeofavoca.mp3]]></song>
<song title="Amelie"><![CDATA[amelie.mp3]]></song>
<song title="Rolling Dice"><![CDATA[rollingdice.mp3]]></song>
<song title="You"><![CDATA[you.mp3]]></song>
<song title="Then Came The Rain"><![CDATA[thencametherain.mp3]]></song>
</playlist>

```

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [August 13, 2004, 9:48am UTC](https://forum.kirupa.com/t/mp3-player-v2-xml/44539/43 "2004-08-13T09:48:03Z")

</div>

hi Voets, great player, trying to get my head around the coding…

for my needs, id like the player to appear but only for a track to start streaming if the user requests it by pressing play…save bandwith in case they dont want music…

is this possible?

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [August 13, 2004, 11:23am UTC](https://forum.kirupa.com/t/mp3-player-v2-xml/44539/44 "2004-08-13T11:23:17Z")

</div>

This answer has been asked before - what you need to do is to execute the onRelease handler of the stop button right after the player has initialized. I’ve posted this before, and in the comments on my site too I think.

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [August 13, 2004, 11:02pm UTC](https://forum.kirupa.com/t/mp3-player-v2-xml/44539/45 "2004-08-13T23:02:07Z")

</div>

Voetsjoeba:

Is that answer for me?

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [August 14, 2004, 6:21pm UTC](https://forum.kirupa.com/t/mp3-player-v2-xml/44539/46 "2004-08-14T18:21:20Z")

</div>

Hey Voets. Is there a way to make the track loop continuously without gaps? In effect turning the MP3 player into a loop selector.

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [August 14, 2004, 6:24pm UTC](https://forum.kirupa.com/t/mp3-player-v2-xml/44539/47 "2004-08-14T18:24:06Z")

</div>

Oh … that’s really not what it’s made for FG. That would require major changes to the code.

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [August 14, 2004, 6:27pm UTC](https://forum.kirupa.com/t/mp3-player-v2-xml/44539/48 "2004-08-14T18:27:54Z")

</div>

That’s what I thought. Thx anyway.

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [August 15, 2004, 12:31am UTC](https://forum.kirupa.com/t/mp3-player-v2-xml/44539/49 "2004-08-15T00:31:00Z")

</div>

Voetsjoeba:

Have you managed to see why my movie was behaving strangely?

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [August 15, 2004, 9:05am UTC](https://forum.kirupa.com/t/mp3-player-v2-xml/44539/50 "2004-08-15T09:05:32Z")

</div>

Nick - I’ve been very busy lately and haven’t really had the time to look at it thoroughly, though I will when I find the time.

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [August 15, 2004, 9:26am UTC](https://forum.kirupa.com/t/mp3-player-v2-xml/44539/51 "2004-08-15T09:26:26Z")

</div>

Here’s your error. This is what it should be:

```auto

songsArray.push({title:this.firstChild.childNodes[j].attributes.title, artist:this.firstChild.childNodes[j].attributes.artist, url:this.firstChild.childNodes[j].firstChild.nodeValue, duration:ms, totalbytes:Number(this.firstChild.childNodes[j].attributes.filesize)});

```

You cut out more than half of that line, cutting away more than half of all the required info causing it to freak.

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [August 15, 2004, 9:42am UTC](https://forum.kirupa.com/t/mp3-player-v2-xml/44539/52 "2004-08-15T09:42:58Z")

</div>

I changed the code and it still behaves strangely. Could there be anything else?

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [August 15, 2004, 9:51am UTC](https://forum.kirupa.com/t/mp3-player-v2-xml/44539/53 "2004-08-15T09:51:31Z")

</div>

Not that I could see from your fla.

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [August 15, 2004, 9:54am UTC](https://forum.kirupa.com/t/mp3-player-v2-xml/44539/54 "2004-08-15T09:54:04Z")

</div>

Oh right, what about the XML file? Could it just be a bug?

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [August 15, 2004, 10:09am UTC](https://forum.kirupa.com/t/mp3-player-v2-xml/44539/55 "2004-08-15T10:09:27Z")

</div>

Oh right, I changed something else too - your songbox being a graphic ! Why are you changing everything ?

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [August 15, 2004, 10:13am UTC](https://forum.kirupa.com/t/mp3-player-v2-xml/44539/56 "2004-08-15T10:13:31Z")

</div>

Hi, i’m not doing too many changes, but there is alot of the code that I don’t need. like a stop button and volume control, not too bothered about the button animations either. The client wants it fairly simple to use.

So does the problem lie with the songbox being a graphic?

Sorry to be a pain, I really appreciate the help.

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [August 15, 2004, 10:16am UTC](https://forum.kirupa.com/t/mp3-player-v2-xml/44539/57 "2004-08-15T10:16:13Z")

</div>

I think it may be the XML file, because when I copy your code into my fla, and then run it, it works ok, then when I change the xml part of the code to load in my xml file it starts to behave strangely. On your XML I don’t need to have artist, because it is all the same artist, but do I need to have the duration and filesize?

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [August 15, 2004, 11:07am UTC](https://forum.kirupa.com/t/mp3-player-v2-xml/44539/58 "2004-08-15T11:07:17Z")

</div>

Of course ! You need everything that my playlist has ! Now I see - I indeed used my own playlist because your paths to your mp3s were relative so I couldn’t use it !

Don’t forget to use the absolute bytesize “on disk” for the filesize.

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [August 15, 2004, 11:24am UTC](https://forum.kirupa.com/t/mp3-player-v2-xml/44539/59 "2004-08-15T11:24:10Z")

</div>

So I can discard the artist tag, but keep the other two (filesize and duration)

Also what do you mean bytesize on disk, where is that?

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [August 15, 2004, 11:33am UTC](https://forum.kirupa.com/t/mp3-player-v2-xml/44539/60 "2004-08-15T11:33:30Z")

</div>

No you can not discard the artist tag, unless you type it in manually in the line I corrected.

Bytesize on disk you can see by rightclicking the file, and look at the “Size on Disk”. Next to it is the size in bytes. Copy that number, without .'s or ,'s, so not 6.123.568 for example, but 6123568.

[Previous page](https://forum.kirupa.com/t/mp3-player-v2-xml/44539.md?page=2)

[Next page](https://forum.kirupa.com/t/mp3-player-v2-xml/44539.md?page=4)
