flash preload mp3 from xml
flash preload mp3 from xml
- Started
- Last post
- 2 Responses
- cvirus
anyone ever do any preloading an mp3 file which is named in XML and then used with attachSound?
ideally the mp3 has to preload before the rest of the movie/functions happen.
- enjine0
Make sure your mp3.isStreaming is set to false:
var obj = //your sound file
var loaded = Math.floor(obj.getBytesLoaded...
var total = Math.floor(obj.getBytesTotal()/1...
var percent = isNaN(Math.floor(loaded/total * 100)) ?
0 : Math.floor(loaded/total * 100);
- cvirus0
sweet! thats it? seems so simple, i'll give it a shot. thanks enjine.