My current web host does not allow mp3 files and I would prefer to keep all my files in one place, rather than storing mp3s on an external file hosting service.
What other formats can be streamed in Flash? I was pretty sure .swf and .flv sound files would work, but they aren’t - unless I’m doing something wrong.
Here’s the basic code I’m using:
private var _song:Sound; private var _songFile:String;
then in an event handler:
_songFile = _songNameField.text; _song = new Sound(); var soundFile:URLRequest = new URLRequest(_songFile); _song.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler); _song.addEventListener(SecurityErrorEvent.SECURITY_ERROR, errorHandler); _song.load(soundFile);
I don’t see a message from either of my error handlers, just no sound. The sog.swf file itself works.