Skip to main content
May 16, 2006
Question

Using loadSound(); Does Flash store my .mp3's on my local machine? If so, where?

  • May 16, 2006
  • 1 reply
  • 286 views
I'm loading mp3s on a server into my movie in a browser. I want to confirm that a sound has been downloaded by checking for that file in a folder on my client machine. I've searched for the file that I have playing (and hence know that has been downloaded), and I can't find it.

Does flash download the file to my machine or does it do something else?
This topic has been closed for replies.

1 reply

Participant
May 16, 2006
Try to use sound.getBytesTotal(); and sound.getBytesLoaded();
where sound is instance of a Sound object.

Example:

var soundObj:Sound = new Sound();
soundObj.loadSound("file.mp3", true);
function checkDownload(){
var b = soundObj.getBytesLoaded();
var bt = soundObj.getBytesTotal();
var p = Math.ceil(b/bt * 100);
if(p >= 100){
trace("file transfer completed");
} else {
trace("file transfer at:"+p+"%");
}
}

setInterval(checkDownload,100);

Flash put the file in Browser Cache, same as xml, jpg, etc.