Picture a website with a series of pictures. As you click on one picture any current music stops and the relevant music for that picture starts. That is the structure I am aiming for.
I have at present two pictures, I have defined an empty movie clip, given it a name (soundLoader) and then added the following line into the ActionScript section of each picture:
on (press)
{
stopAllSounds();
mysound = new Sound(soundLoader);
mysound.loadSound("[site URL]/[music folder]/[song filename]", true);
}
Now, sometimes this works and other times it does not. The files vary between 1.5Mb and 7.5Mb and so I thought it might have been that the page is waiting until it has fully loaded the files (all MP3 format) before playing, instead of streaming? But then why would it work more frequently with the larger file?
Okay, exhausted ideas. Can you help?
I have at present two pictures, I have defined an empty movie clip, given it a name (soundLoader) and then added the following line into the ActionScript section of each picture:
on (press)
{
stopAllSounds();
mysound = new Sound(soundLoader);
mysound.loadSound("[site URL]/[music folder]/[song filename]", true);
}
Now, sometimes this works and other times it does not. The files vary between 1.5Mb and 7.5Mb and so I thought it might have been that the page is waiting until it has fully loaded the files (all MP3 format) before playing, instead of streaming? But then why would it work more frequently with the larger file?
Okay, exhausted ideas. Can you help?