Hi I face some problem with my flash script. Here is my code
onFrame (1) {
mySound = new Sound();
mySound.loadSound("http://www.mysite.com/spot_mixdown.mp3 ");
mySound.start(0, 0);
}
that play .mp3 file from my website at the first frame. It’s work for me!
But when I update spot_mixdown.mp3 (change sound inside but use same filename) on my website and then reload webpage, a sound is not change.
How do I fix it? or another way to do.
Thank you.
Your browser is probably caching the mp3. You can prevent this by adding a unique sequence to the end of the URL for the mp3. (Also, I think you want to get rid of the space). Generally, either
new Date().getTime()orMath.random()is sufficient.