flash - Problems with playing a sound in AS3 from a page that is not in the same directory as the SWF? -


O overflow Long listener, first time collar

So what do I have here: I Trying to create a sound player in AS / AS3 that will take the external MP3, load it, and play it with the sound (). Your typical music player, nothing super fancy. The problem is that it works and everything is just fine, no error throws ... unless I link it to a different part of the site.

I place the swf in mydomain.com/projects/fsp . I have found an MP3 that puts it in a subdirectory of that directory on mydomain.com/projects/fsp/music/song.mp3 and embeds the MP3 as a flash parameter Moves: Fsp.swf? File = music / song.mp3

If I test it with mydomain.com/projects/fsp/index.html , then it only works Fine. Swf loads, MP3 loads, everything works without a grip

However, if I embed SWF from another location, for example mydomain.com / Blog , Suddenly we die in water, swf loads but the MP3 does not

I am as surprised as the cat. In both instances SDF load is fine, it is the second step of loading MP3 which causes issues. Although we are referring to the same sound file both times, and the actual SWF is in one place. This happens when I embed both using full and relative references ( ../ projects / fsp.swf? File = music / song.mp3 )

Anyone Clue?

Mp3, depending on the way you are making your way to load, you get an issue The first thing that I can do is to use a proxy to set up a proxy in Fiddler, Charles or Firebug to see where the file is being loaded. My garbage is that you can /blog/music/song.mp3 Attempting to load the file, which may not exist.


Comments

Popular posts from this blog

oracle - The fastest way to check if some records in a database table? -

php - multilevel menu with multilevel array -

jQuery UI: Datepicker month format -