# MP3... again

**URL:** <https://forum.kirupa.com/t/mp3-again/18962>\
**Category:** Uncategorized\
**Created:** [April 23, 2003, 12:35am UTC](https://forum.kirupa.com/t/mp3-again/18962 "2003-04-23T00:35:32Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![marius](https://avatars.discourse-cdn.com/v4/letter/m/ed655f/32.png) [@marius](https://forum.kirupa.com/u/marius)\
**Post date:** [April 23, 2003, 12:35am UTC](https://forum.kirupa.com/t/mp3-again/18962/1 "2003-04-23T00:35:32Z")

</div>

Got it playing… amazing how things won’t work when you mistype the source… sheesh! Now I’m having trouble with the song catching the stream. How do increase the buffer zone?

Thanks!

itemPicked=function() {  
\_parent.mp3Player.myConditionText = “loading…”;  
//an item has been selected:  
//insert the data value in the box into the text box  
var myVal=myList.getSelectedItem().data;  
dotIndex = myVal.indexOf(".");  
myXml = myVal.subString(0, dotIndex);  
\_root.xmlFile = myXml + “.xml”;  
\_root.pList = myList.getSelectedIndex();  
myList.setScrollPosition(myList.getSelectedIndex());  
if (\_root.startIndex == 0) {  
//trace(“creating new sound obj”);  
\_root.s.stop();  
\_root.s = new Sound();  
\_root.s.loadSound(myVal, true);  
\_root.s.start(0,0);  
} else {  
//trace("\_root.startIndex is " + \_root.startIndex);  
\_root.s.start(\_root.startIndex,0);  
}  
};

---

<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:** [April 23, 2003, 1:50pm UTC](https://forum.kirupa.com/t/mp3-again/18962/2 "2003-04-23T13:50:44Z")

</div>

Set your

```auto

_soundbuftime = 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:** [April 23, 2003, 10:15pm UTC](https://forum.kirupa.com/t/mp3-again/18962/3 "2003-04-23T22:15:56Z")

</div>

but where?

---

<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:** [April 24, 2003, 1:32pm UTC](https://forum.kirupa.com/t/mp3-again/18962/4 "2003-04-24T13:32:33Z")

</div>

I believe \_soundbuftime is a global variable. When I built my mp3 player I built it as a component and put all the code for the player in one frame. I put the \_soundbuftime variable at the top of the code. I put a loop to check if the playing time had caught up to the streaming time. If it had I increased the \_soundbuftime. The \_soundbuftime defaults to a value of 5.
