Loading sound problem

I’m working on a sound control bar for a site, but i’m having a small problem. I’ve just found out how to dynamically load mp3 files, it works okay when i first load it. When i click the stop button, it stops, and i can control the volume and so on. But the problem is when i stop the music and press the play button to start the loop again, it doesn’t work. Why is that? When i load the loop from the library, everything works, including hte play button, but when i load it dynamically, i have problems…can anyone help me out?

You should try posting your code so everyone can see what some of the issues that your having are.

Kyle

there is a tutorial on this site on how to load sounds…

it also tells you the code for it.

there’s a stop and play action there too…

hope it helps.

:slight_smile:

I found a tutorial on how to load sounds, but it doesn’t have anything about a play or stop button…as for the code…

//this loads the sound
Tracks = new Sound();
Tracks.loadSound(“TrackOne.mp3”, true);

//this stops the sound
on (release) {
Tracks.stop();
}

//this is what’s suppose to play the sound
on (release) {
Tracks.start();
}

SInce you’re loading your sound as streaming, change your :

on (release) {
Tracks.start();
}

to:
on (release) {
Tracks.loadSound(“TrackOne.mp3”, true);
}

It should start playing right away.

i’ve been thinking bout that, but the problem is, if i do that, it will re-load the loops, and the loops are around 250k…so it won’t work out too well with the 56kers

Actually, you’re loading your sound as streaming versus an event, so it doesn’t load the sound object before it plays it. It just starts playing as soon as your 56k user has enough data to hear the tune. Because of this, this is the only way to start a streaming sound. If you want to use the mySound.start() method of a sound object, you’ll have to load it as an event (drop the “true” from your define statement), of course, then you really will have the issue you just described.

:o it works!!! thanks