I just finished a project where I needed to use MP3s on demand.
So the first issue was when I used the attachSound method. It worked
perfectly until I tried loading the movie using a loadMovie method
from another movie clip. it appeared as though my attached files
(with an ID name) could not be found or where not included... even
when I tried giving them IDs in the main movie (which was a big
compromise) the loaded movie wasn't able to find them.
so I abandoned this method
then I came across an even more strange bug. When I actually streamed
the MP3s using the loadSound method, and set streaming to 'false', IE
browsers (and ONLY IE browsers) had the most bizarre reaction....
they played the MP3s the first time they loaded, but once the MP3s
were chached, it refused to play them... it's as if it wasn't able to
load them if they were already loaded.... (note that I only tried
this when the clip was included as a loadMovie in another swf). when
I changed streaming to 'true' the problem went away, but I wasn't
happy with it, since the mp3 wasn't playing smoothly in slower
connections...stopping them immediately and having them played onLoad
didn't work as well....
my solution was to pass a variable from the PARAM flashVars tag
indicating browser=ie
here's the idiotic code I had to end up with:
my_sound.loadSound(_root.path+"wavs/sc_2_"+myNum+".mp3",true);
if (_root.browser!="ie"){
my_sound.stop();
my_sound.onLoad = function(success:Boolean) {
if (success) {
my_sound.start();
}
}
}
If anyone could shed light on the issue i'd be very grateful
Itai
_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com