Sound in Flash
- Started
- Last post
- 22 Responses
- JamesEngage
Morning All...
I'm soon to start designing a site for some 'superstar' DJ's?!?!?!?!?!... and need some 'sound' advice before I begin...
I want some ambient audio in the background... now not being an audio expert in flash, how do I stream that in flash so it kind of loads in the background and doesn't interfere with all the other stuff loading... can I have a streaming movieclip? (I'd liek no e coz it means I can swap out the audio occasionally... answers on a postcard... ta!
- rabattski0
yep. sure streaming is possible. make sure you have a mute button though. don't know the design of the site but you could also make a different swf just for the audio.
- CyBrainX0
Let me just re-emphasize the last response. YOU MUST HAVE A SOUND OFF option.
Also, use the sound object for better control.
- JamesEngage0
Is there ways of streaming and using the sound object?
- Anarchitect0
indeed.
you can control pause, stop, check bytes loaded [ie: use for a streaming bar], volume, pan, check ID3 tags...
you should make a 'checkloop' to see when the file starts playing [Sound.position] and use a onSoundComplete to skip to a next track...
- mirola0
you can load external mp3's and stream them using the loadSound function. then, set the second argument to true. That will make it stream and you can use it like any other sound object i.e.
var game_loop = new Sound();
game_loop.onLoad = function (loadedOK) {
if(loadedOK) {
game_loop.start(0,1000);
}
}game_loop.loadSound("poo.mp3", true);
that's if you have an mp3 called poo, which frankly, nobody should.
- mirola0
also, check out the manual for reading id3 tags, that's quite cool.
- silencer0
Podlob has a good mp3 player here. I think its flash 5 but I'm sure you can update the scripts no hassle.
http://www.podlob.com/download/m…
- JazX0
you could also control it with XML
- silencer0
The one from podlob uses XML i think
- JazX0
there are a lot of mp3 XML machines out there
- silencer0
I've downloaded quite a few but this seems to be the cleanest one I've found. the code is well commented and it works like a treat. :)
- pistollero0
Hey.. who's the DJ - us, eng.?!! Let's share!!
- JazX0
I developed a small one here http://www.factorx.com
- silencer0
Like the style in that site.
- JazX0
not too shabby
- JamesEngage0
woah! thanks for all the links...
sorry can't say who they are... yet.
- -_MU_-0
Really useful links, thanks guys. I gotsta do one of these soon too!
- JamesEngage0
Can I start to play a sound even if it is not completely loaded?
- unfittoprint0
if the stream parameter is true then it will start playing when the player evaluates that download speed / streamed file is enough for the sound not to be interrupted.