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

flash actionscript

group:

loadSound problem Explorer 6


loadSound problem Explorer 6 OmniLaLa
7/8/2004 9:47:25 PM
flash actionscript:
I'm building a streaming mp3 player. Everything works great in Mozilla,
Desktop player, and authoring environment. IE Explorer, however, does not play
the sound.

While developing, the one change that is correlated with IE Explorer not
working correctly is that the mp3 files are now being served dynamically from a
java servlet. Therefore my URL is not "song.mp3", but rather a java servlet
called "song.ext?id=3" that finds and serves the file where id is the database
id of the song.

When loading a straight-forward "file.mp3" file, all players are working
great. Only with the dynamic file, Internet Explorer does not play the song -
it still tries to load, however.

example:
mysong = new Sound(this);
mysong.loadSound("http://host:port/dir/song.ext?id=5",true);

Could there be a problem with the http headers?
Re: loadSound problem Explorer 6 nITiNkIlLeRmEeRuT
7/9/2004 3:43:44 AM
What i can understand with ur problem is that
U r retrieving the songname with this url
http://host:port/dir/song.ext?id=5
which is a java servlet and returns the path of the mp3.

If it is so the do like this
Use LoadVars object (using sendAndLoad() method) to retrieve the file name
(path) of mp3 and than pass that value in loadSound() method.
Re: loadSound problem Explorer 6 OmniLaLa
7/9/2004 4:12:52 PM
Its not sending the file path, but rather its streaming out the file contents.
It creates the http headers to identify the content type and then streams out
the bits.

The rationale is that we want to have a music server where the files are not
exposed through the internet. Therefore, calling this program will create an
"on the fly" mp3 when requested.
Re: loadSound problem Explorer 6 OmniLaLa
7/10/2004 3:46:10 PM
OK, we figured it out.

When simulating the mp3 file, the original response requires the http header
"Content-Length". We had "Content-Type" written as a non-standard value, but
that didn't seem to matter.
Also, for streaming radio, we simply put in a dummy content-length and it also
worked.

note: lack of headers only stopped Netscape 7.1 and IE 6.0 It still worked on
Mozilla 1.5 and Netscape 4.7
AddThis Social Bookmark Button