# loadSound with large mp3 files

**URL:** <https://forum.kirupa.com/t/loadsound-with-large-mp3-files/280106>\
**Category:** flash\
**Created:** [January 22, 2009, 7:04pm UTC](https://forum.kirupa.com/t/loadsound-with-large-mp3-files/280106 "2009-01-22T19:04:16Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![zagreus](https://avatars.discourse-cdn.com/v4/letter/z/8797f3/32.png) [@zagreus](https://forum.kirupa.com/u/zagreus)\
**Post date:** [January 22, 2009, 7:04pm UTC](https://forum.kirupa.com/t/loadsound-with-large-mp3-files/280106/1 "2009-01-22T19:04:16Z")

</div>

Hi all,

I’ve submitted this same query to a forum on [actionscript.org](http://actionscript.org), hope it’s cool to post here too.

I’m writing a small mp3 player. It reads the playlist from an xml file, then at the end of a song (or when the “Next” button is pressed) automatically plays the next song in the list.

My problem is that if the song is a large file (around 16MB), the player doesn’t play the song – I have to click pause then play a couple of times to play it.

The code is roughly:

```auto

function playSong():Void
{
tune = new Sound();
tune.onSoundComplete = playSong;
tune.loadSound(tunes[++current],true);
}

```

… where ‘tunes’ is an array of paths to the file. I’ve missed out a couple of things, but that’s basically it. Is there an issue with loadSound needing to load some of the song first? Any way of getting around it?

Any ideas gratefully received!

Thanks in advance,  
Z
