Embedding complex SWF content in WordPress which loads or references other content can be bit tricky. Often the embedded SWF is hosted in different directory than the WordPress page that contains the embed code which means simple relative paths often fail. The reason for this is that SWF files, by default, assume the page in which they are hosted is the “base” location and use that uri to construct all relative paths. This means that relative paths are often out of scope and unresolvable (I ran into this recently with a Flex example that included the “view source” option). The solution is to manually tell the embedded SWF what the desired base path is by setting the “base” attribute in the object / embed tags.
The Flash Player object / embed tags support manually setting the “base” attribute to a different location as described here. However, as I’ve mentioned before I use the killer Kimili plugin for embedding Flash content in WordPress (necessary because WordPress likes to strip out tags it doesn’t understand). Kimili, developed and maintained by Michael Bester, supports all of the object / embed attributes and uses SWFObject under the hood making it a breeze to embed Flash via its special syntax.
Here’s what a working example of setting the base definition in Kimili looks like.
Simple. Hope it saves someone some heartache.