Fixing the "base" attribute for Flash embedded in IE
I discovered that one of my Flash apps wasn't working in Internet Explorer. The movie would appear but the external XML file wasn't being loaded. The movie is embedded using a Javascript Eolas fix and since the SWF is stored elsewhere on the server, I used the "embed" and "object" tags' "base" attribute to make sure external assets would still work. Unfortunately, IE wasn't reading the base attribute properly.
Checking the server error logs, I found that IE was looking for the XML file in the directory above the one I specified. The fix was fairly simple:
Old base attribute: "http://domain.tld/path/to/external/assets/"
New base attribute: "http://domain.tld/path/to/external/assets/."
The period at the end doesn't break the movie for Firefox because it's simply a reference to the current directory. IE reads the attribute properly and looks for the XML file at the correct URL. Woot!
Delicious
Digg
Reddit
Facebook
Google
Yahoo
Technorati

Comments
thanks for that,
i couldn't work out why IE was the only browser not displaying content correctly ...
thanks
-bruce
great! i'm glad somebody was able to make use of this! your feedback is good motivation for me to keep posting my findings, so thank you.
This fix is not working for me
Post new comment