Having read through the various tutorials on this site and attempted many times to solve my code issue from the information available I have almost given up.
In fact I have spent hours attempting different combinations to complete something that in theory is quite simple.
However I would really apprecited some direction as my knowledge is still improving.
This direction is basically what method I should adopt when attempting to play an audio file from a button on my movie.
which is better
loadmovie (launches a seperate .swf with audio embedded on the stage
snd = new
snd.load
in my html foler on the desktop I have the master index.fla, index.swf, audio file a, b, c, and additional audio embedded .swf
I will transfer this to a web loaction once the code is correct
which direction would you suggest when using sound?
depends, mp3’s dont seem to stream as well as embedded sound in an swf. If you just want to load a sound in before playing it, the load sound is better, if you want to stream it in under control then embedded is better (all imo/experience…)
Filesize is pretty much the same. Encode a 17’121kb wav at 128kbp J-Stereo Mpeg1 with any mp3 encoder, and the file size is roughly 1,554kb. Embedding on the stage in flash at 128kbps stereo creates an swf exactly the same size. Big difference is that you cant VBR encode within flash (as far as I know) so I admit it’s not possible to get the file size down with better encoding… So it does depend what you want.
I’d rather take a small hit on quality, and embed it on the stage so dial-up users can stream the song in. Nothing worse than having to ‘wait’ for the entire song to load before playing it… again IMO ;)…
Nick
Edit: Just discovered you can… if you encode the mp3 at the quality you want first, then import it into the flash library and embed it on the stage. Then when you export it, disable compression - you end up with a file size almost exactly the same as the original mp3.
For example. VBR encoding the same wav above gives an mp3 filesize of 1,194kb.
Embedding this on the stage in an swf with compression disabled gives a filesize of 1,174kb…(smaller as I trimmed a couple of frames off the end of the MP3 on the stage…)