all groups > flash actionscript > march 2004 >
You're in the

flash actionscript

group:

MP3 not playing


MP3 not playing JDRives
3/14/2004 8:33:12 PM
flash actionscript:
Hi I am loading various external MP3s as event sounds, but only one at a time,
and depending on the file, sometimes it plays and sometimes it doesn't. All the
MP3s work in various MP3 players. If I stream the sounds it works, but not when
loaded as an event. I'm using an onLoad function to make sure the sound is
loaded before I start it. I thought at first maybe it was a file size problem,
but some files that are larger than the ones that don't work are OK. I'm using
this code to load and play the sounds:

mainSound = new Sound();
mainSound.onLoad = function(){
this.start();
this.setVolume(80);
}
mainSound.loadSound("Sound/Soundtrack.mp3", false);

when I retrieve the duration and position info on the sounds that aren't
working after the sound is loaded and should be playing I only get (13) as the
duration and position no matter when I check them.
Anybody got any ideas why some of the MP3s aren't playing? They all have the
same compression settings.(i.e. bit depth etc.)

Re: MP3 not playing JDRives
3/14/2004 8:48:44 PM
Don't know if this was clear before but, I'm using a Director program I created
to change the Soundtrack.mp3 file in the Sound folder. This is working fine and
the the MP3s play in Director just fine. I've tested them in WMP and Nero
player and they work also. All the settings are the same for all the MP3s but
some of the files don't play in the Flash projector movie, even though the
getBytesLoaded and getBytesTotal are showing the full file size. JD
AddThis Social Bookmark Button