Streaming sound

I have looked all over the net for a nice tutorial on how to stream audio/music in flash, but didnt find anything on the subject.

Could someone please post some sort of starting guide for me? Or some url. I can make one mp3 stream but then what? how do i change the streaming music? how do i make some other mp3 to follow when the first ends?
And the streaming i do is just plain native one, using for example:

mysound.loadsound(“blah.mp3”, true);

and its off playing. :stuck_out_tongue:

I am a bit blank on the subject, would really appreciate some help.
Thanks.

Hello.

I was looking into the sound object recently for use with streaming audio and found out that, as of right now, it’s buggy. Apparently, loading MP3’s using the loadSound method of the sound object with the isStreaming parameter set to true prevents the use of the other sound object methods, specifically the start at position one (although I think that stop still works). I believe this is cause by a bug in the current version of the Flash player, and that a beta player with this fixed is in the works (including support for ID3 v1.0 and v1.1 tags!).

When everything does get working, there are several excellent additions to the sound object in version 6. In order to make another MP3 follow when another one ends you could make use of the onSoundComplete (http://www.macromedia.com/support/flash/action_scripts/actionscript_dictionary/actionscript_dictionary606.html#236885) event to load the new file. Or you could check if the position property of the sound object matches the duration property in an onEnterFrame handler and then switch files. I believe you currently can load a new MP3 file using the same sound object. All you have to do is call the loadSound method with a new file.

The actionscript dictionary has a lot of good information on all the available methods. It can be found at http://www.macromedia.com/support/flash/action_scripts/actionscript_dictionary/actionscript_dictionary596.html. In addition, there are some good general (i.e. not focused on streaming sound) sound object tutorials at the Actionscript Toolbox (http://actionscript-toolbox.com/soundobject.php), Ultrashock (http://www.ultrashock.com/tutorials/flash5/soundbasic.html), and a very good one at kirupa.com (http://www.kirupa.com/developer/actionscript/sound.asp).

Hope that helps.

.:.mike.:.

Thanks a lot, shadow, i will do some tests and bug the forum again if i run into any problems. :slight_smile:

Best one i know is
http://www.killersound.com/cgi-bin/killersound.storefront/3cacb86500265b612718c690603d0687/Catalog/1020

(click Tips&Tutorials >Macromedia Flash, then make your choice…)

*Originally posted by shadow *
**Hello.

Apparently, loading MP3’s using the loadSound method of the sound object with the isStreaming parameter set to true prevents the use of the other sound object methods, specifically the start at position one (although I think that stop still works). I believe this is cause by a bug in the current version of the Flash player, and that a beta player with this fixed is in the works (including support for ID3 v1.0 and v1.1 tags!).
**

The reason you can’t use the start at position on a streaming MP3 in flash, is because it can only be used on attached sounds (sounds inside the swf library). Because the MP3 is streaming (being read and played at the same time) and not downloaded it cannot jump to a specific part of the MP3. Hope it helps. Good Luck.

Peace
nemo | Bejingler

:slight_smile:

Woohoo! Actually nemo, now you can start at position with streaming sounds. Macromedia released version 6,0,40,0 of the Flash player today. Although they haven’t released a complete list of fixes/new features yet, through my own experiments I have found you can start a stopped streaming MP3 at a given position! According to mesh on MX (http://radio.weblogs.com/0106797/) this version fixes a ton of bugs as well as including some new features.

However, it took two installs for it to work for me. Apparently Macromedia is having some cache issues. So if you do download the new player (available at http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash) make sure you have the correct version by using the online tester (http://www.macromedia.com/shockwave/welcome/)

Can’t wait to see what else is in it.

.:.mike.:.

WOOT! New player. Thanks for the info. Sorry for the wrong info.

Peace
nemo | Bejingler

:slight_smile: