Has anybody had a problem where the browser freezes for a few seconds when you load the streaming audio, or is it just me?
Im using this code:
bgmusic = new Sound();
bgmusic.loadSound(“cynic.mp3”, true);
bgmusic.start();
to stream the background music, but it seems to pause right when it starts. If you want to see what I’m talking about go to.
www.new-valley.com/enhanced/index.htm
Thanks for any advice.
system
March 21, 2003, 4:45pm
2
bgmusic = new Sound();
bgmusic.loadSound(“cynic.mp3”, true);
bgmusic.start();
the 2nd line should be:
bgmusic.loadSound(“cynic.mp3”, false);
this will prevent the sound from playing until all of it is downloaded, so it won’t freeze during playing.
:rambo:
system
March 21, 2003, 5:37pm
3
Hi slayerment,
I like your flat earth site.
You are doing your code right. I’m not sure if you are trying to get sound to stream over broadband or dialup, but I would try to mess around with the _soundbuftime = 5; property. I think by default it is set at 5.
system
March 22, 2003, 7:38am
6
hey slayerment =)
with your last post i’d assume that you solved the problem. still i’m gonna post a few lines of code
to load the whole mp3 and then play it automatically … use the onLoad handler:
bgmusic = new Sound();
bgmusic.loadSound("cynic.mp3");
bgmusic.onLoad = function() {
this.start();
}
or you can increase the prebuffer time:
_soundbuftime = *integer*;
bgmusic = new Sound();
bgmusic.loadSound("cynic.mp3", true);
integer the number of seconds before the movie starts to stream
hope this helps in the future =)