# 2 questions: mp3 player

**URL:** <https://forum.kirupa.com/t/2-questions-mp3-player/35082>\
**Category:** flash\
**Created:** [November 10, 2003, 12:02pm UTC](https://forum.kirupa.com/t/2-questions-mp3-player/35082 "2003-11-10T12:02:23Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![vgan](https://avatars.discourse-cdn.com/v4/letter/v/ea666f/32.png) [@vgan](https://forum.kirupa.com/u/vgan)\
**Post date:** [November 10, 2003, 12:02pm UTC](https://forum.kirupa.com/t/2-questions-mp3-player/35082/1 "2003-11-10T12:02:23Z")

</div>

I am trying to develop a mp3player. I know only the basics and I need somebody to please help me out witha couple of things:

1 is there a way to load an external mp3 file randomly from a list of files in a folder? is there a “rand” function (as in php) or something to get random numbers?

2 how can I display the ID3 tags?

please help me out! thank you…

ps. I am using k. bellew’s tutorial as a guide.

---

<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:** [November 10, 2003, 12:18pm UTC](https://forum.kirupa.com/t/2-questions-mp3-player/35082/2 "2003-11-10T12:18:48Z")

</div>

1. Use the Math.random() to get a random number. Search the forums, you’ll find tons of examples.

2. Check this:  
[http://www.flashguru.co.uk/000100.php](http://www.flashguru.co.uk/000100.php)

---

<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:** [November 10, 2003, 12:25pm UTC](https://forum.kirupa.com/t/2-questions-mp3-player/35082/3 "2003-11-10T12:25:32Z")

</div>

> \*Originally posted by claudio \*  
> \*\*1. Use the Math.random() to get a random number. Search the forums, you’ll find tons of examples.

1. Check this:  
[http://www.flashguru.co.uk/000100.php](http://www.flashguru.co.uk/000100.php) \*\*

obrigado claudio. thanks a lot.  
just one thing. I’m reading about that Math.random(). do you know how to get just a number between 0 and 9? I can only get number betweeon 0 and 1 with it.

---

<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:** [November 10, 2003, 12:28pm UTC](https://forum.kirupa.com/t/2-questions-mp3-player/35082/4 "2003-11-10T12:28:58Z")

</div>

```auto
Math.floor(Math.random()*10)

```

😉

---

<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:** [November 10, 2003, 12:33pm UTC](https://forum.kirupa.com/t/2-questions-mp3-player/35082/5 "2003-11-10T12:33:55Z")

</div>

> \*Originally posted by claudio \*  
> \*\*

```auto
Math.floor(Math.random()*10)

```

😉 \*\*

clever. thank you. 🙂

---

<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:** [November 10, 2003, 12:34pm UTC](https://forum.kirupa.com/t/2-questions-mp3-player/35082/6 "2003-11-10T12:34:54Z")

</div>

welcome =)
