# Sound advice needed

**URL:** https://forum.kirupa.com/t/sound-advice-needed/22206
**Category:** Uncategorized
**Created:** [June 1, 2003, 1:06am UTC](https://forum.kirupa.com/t/sound-advice-needed/22206 "2003-06-01T01:06:36Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![Daedelus](https://avatars.discourse-cdn.com/v4/letter/d/58956e/32.png) [@Daedelus](https://forum.kirupa.com/u/Daedelus)
#### Post date: [June 1, 2003, 1:06am UTC](https://forum.kirupa.com/t/sound-advice-needed/22206/1 "2003-06-01T01:06:36Z")

</div>

no pun intended!

I’m trying to create something to the effect of what they have over at [Goldspot.net](http://www.goldspot.net) but I’m running into a few snags.

Mostly my problems stem from loading/buffering. Like that site, I want to have full (or near full) quality mp3s without much wait. I used a technique like the one in the tutorial here, but that way the sound has to load completely (which is not bad, but not exactly what I want either).

Plus, that technique requires putting the audio in a frame itself, which doesn’t allow me to use actionScript functions to make a progress bar for the sound, etc. like on [Goldspot.net](http://Goldspot.net).

So… anyone got any suggestions???

---

<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: [June 1, 2003, 1:16am UTC](https://forum.kirupa.com/t/sound-advice-needed/22206/2 "2003-06-01T01:16:23Z")

</div>

If you use this tut:  
[http://www.kirupa.com/developer/mx/loading.htm#Load%20.mp3%20dynamically%20with%20Flash%20MX:](http://www.kirupa.com/developer/mx/loading.htm#Load%20.mp3%20dynamically%20with%20Flash%20MX:)  
Your mp3 will start playing as soon as it loads enough. For the progress bar, I just asked someone else if you can add a preloader to something that you are loading in. Makes me wonder if you can use something like:  
[AS]  
\_root.musicVariableName.getBytesLoaded  
and  
\_root.musicVariableName.getBytesTotal  
[/AS]  
And work from there. Anyone? Digitalosophy?  
I’m at work so I don’t have flash, otherwise I would just try 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: [June 1, 2003, 2:57am UTC](https://forum.kirupa.com/t/sound-advice-needed/22206/3 "2003-06-01T02:57:29Z")

</div>

hmmm… interesting idea. I’ll do some experimentation and let you know what happens.

Good idea!! Thanks a lot!! 🙂

---

<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: [June 1, 2003, 5:51am UTC](https://forum.kirupa.com/t/sound-advice-needed/22206/4 "2003-06-01T05:51:33Z")

</div>

Daedelus,

Check out these two examples from [actionscript.org](http://actionscript.org) sounds like what your trying to do:

- [http://actionscript.org/showMovie.php?id=614](http://actionscript.org/showMovie.php?id=614)
- [http://actionscript.org/showMovie.php?id=614](http://actionscript.org/showMovie.php?id=614)

However, I have found that you will get the best performance (load times) loading swf files containing your mp3 and not loading an external mp3 file directly. You will loose quality by loading the swf but load time is much better – loads/plays smoothly over 56k on my tests. Just depends what your targeting broad banc users I suppose…

---

<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: [June 2, 2003, 8:54pm UTC](https://forum.kirupa.com/t/sound-advice-needed/22206/5 "2003-06-02T20:54:42Z")

</div>

After nearly pulling all of my hair out, I finally got a preloader for sound files. No one ever told me that Sound objects could use getBytesLoaded and getBytesTotal!! :crazy:

Anyway, I took a few days off after trying what I thought was nearly everything, and I came up with this:

[http://www.7crescent.com/flowever/summerDreamMP3.html](http://www.7crescent.com/flowever/summerDreamMP3.html)

Thanks guys! Oh, and byis, that’s some good advice about loading into swfs… my plan is to have one mp3 for high bandwidth and one for lower bandwidth… so I guess I’ll keep running with that for now… we’ll see what happens if I get too many complaints!

:beam: Cheers!

---

<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: [June 3, 2003, 8:47am UTC](https://forum.kirupa.com/t/sound-advice-needed/22206/6 "2003-06-03T08:47:23Z")

</div>

Did you use what I suggested? Because that’s pretty good!! If you used the getBytesLoaded/getBytesTotal thing; I would like to know if it’s that smooth!!

---

<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: [June 3, 2003, 3:55pm UTC](https://forum.kirupa.com/t/sound-advice-needed/22206/7 "2003-06-03T15:55:52Z")

</div>

sorry i came in a little late, you shoudl be using external mp3’s to load your audio. this way no wait…

looks soemthing like this:  
[AS]  
x = new Sound();  
x.loadSound(“music.mp3”, true); // true = streaming  
x.start(0,99) // times looped  
[/AS]

hoep i wasnt too late 🙂

---

<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: [June 3, 2003, 7:51pm UTC](https://forum.kirupa.com/t/sound-advice-needed/22206/8 "2003-06-03T19:51:20Z")

</div>

You’re too late…😛

---

<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: [June 3, 2003, 9:43pm UTC](https://forum.kirupa.com/t/sound-advice-needed/22206/9 "2003-06-03T21:43:08Z")

</div>

lol i thought so
