Dynamically loading and playing external .mp3 files
Posted on 2003-11-13
Does anyone have suggestions for how to dynamically load and play external .mp3 files from a Flash movie. I'm interested in making a movie that does nothing but read a parameter or variable containing the name of a file and then play it.
I'm a .NET programmer working on an ASP questionnaire application where people see questions one at a time. With each question they see, they get some question text, a series of controls to respond to the question, and they will have a sound file played which reads the question aloud.
So far I've gotten this to work:
mySound = new Sound();
If I manually load files into the library there's no problem, but it is not ideal because it will be odious to load hundreds of sounds this way. So my question is really:
Is there a good way to dynamically create the "soundInMyLibrary" which I can use to attach to a sound object?
Also, any ideas about how to change the "soundInMyLibrary" based on a variable that gets passed to the Flash movie? I think this can by loading some server variables that you pass in a form, but I wonder if people have comments on any other good ways to pass data to a movie (ie, can you get something to it with a parameter specified in the object tag?)
Any comments would be appreciated :)