PDA

View Full Version : Strange problem. Can't see SWF file one embedded online.


xgoannax
11-29-2008, 04:30 AM
This is absolutely maddening. Probably something simple, I hope someone can help.

I have made a flash MP3 player. The problem is that it doesn't load-up on the html page on the server. The frustrating bit is that if I access the .swf file directly (using the complete, remote URL in the browser window), it loads up and works fine!! But even if I copy that complete, working http URL and paste the entire absolute path into the html page in order to embed the file it STILL doesn't work!!

What on earth could the problem be?

I'm using swfobject.js to embed the file.

For example, if I type this into the browser address bar:

http://www.madeUpSite.com/mp3player.swf - it works fine!

But the below code doesn't work at all! It just shows the "noFlash" content (contents of div#flashMusicPlayer). Note that this DOES work when tested locally.


swfobject.embedSWF("http://www.madeUpSite.com/mp3player.swf", "flashMusicPlayer", "250", "160", "9.0.0", "", flashvars, params, attributes);

I suspect there maybe some kind of security problem, although it's weird that everything is fine when I access the swf file directly.

Vjeko
11-29-2008, 07:41 AM
Hmmm, nice one. :-P

I don't know if there is problem with security, but where is your file? Is it on another domain? Or is it with your html?

This says in swfobject example:
swfobject.embedSWF("test.swf", "myContent", "300", "120", "9.0.0", "expressInstall.swf");

Maybe you could try to have player with html and to have relative path to it in embedSWF method.