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!

Comments

bruce says, "thanks for that,"
bruce's picture

thanks for that,
i couldn't work out why IE was the only browser not displaying content correctly ...

thanks
-bruce

Daniel says, "great! i'm glad somebody"
Daniel's picture

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.

Karan says, "This fix is not working for"
Karan's picture

This fix is not working for me

Post new comment

The content of this field is kept private and will not be shown publicly.
If you have a Gravatar account, used to display your avatar.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • You can enable syntax highlighting of source code with the following tags: <code>. Beside the tag style "<foo>" it is also possible to use "[foo]".
  • Lines and paragraphs break automatically.
  • Web page addresses and e-mail addresses turn into links automatically.

More information about formatting options

About

Daniel McLaren

Daniel is a Flash and Flex developer specializing in the art of information visualization.

Latest from SketchyD

Latest Drawing from SketchyD

This is the most recent drawing from my mobile sketch blog, SketchyD.com.

Recent comments