Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

loadsound problem

Status
Not open for further replies.

un1k

Technical User
Mar 8, 2004
30
CA
Hi,
OK well I have a little basic MP3 Player on my website but I am having trouble to run it good. I have a button that when press, loads a song from a url, here's what I have :

Code:
on (press) {
	Sound = new Sound();
	Sound.loadSound("MY LINK HERE", true);
	Sound.start(0,0);
}

That works fine, I see the "Transferring data" in the status bar and te MP3 starts playing. But my problem is, if I press another button to load another song, it won't load because it looks like it is still loading the first song in streaming (still see the Transfering data).

I have the same code on my other button.

I also have a stop button with that code :
Code:
on (press) {
	stopAllSounds();
	
}
It works fine when I press it, the MP3 stop but then again, the "Transfering data still shows in the status bar" and I cannot load any other song my button becomes kind of innactive.

I hope I am clear enough, thanks for your time and your help.
 
That doesn't do nothing...
 
First off, you're loading a streaming soundObject, thus there's no need to use the sound.start(0,0) action, as the streaming loading sound will start on it's own as soon as enough has buffered, usually around 5 seconds.

Second did you try...

on (press) {
Sound.stop();
}

Rather than...

mysound.stop();

You should maybe have a look at this fabulous soundObject tutorial...




Regards. Affiliate Program - Web Hosting - Web Design
After 25,000 posts, banned on FK, but proud not to have bowed down to them!
 
Yeah my sound stop, but it seems that it still load without hearing it because I see in the explorer status bar "transferring data", so I have another button for another song, but when I press it it doesn't do nothing, I was wondergin maybe there is a command like to stop the data transfer of the first one?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top