Symptoms
Flash files play properly when accessed directly on the server, but…
- fail to load when embedded in an EE template, or
- Flash loads in your index.php (home page) template but not in other templates, or
- the main .swf loads but some external assets (e.g. images, video) fail to load, or
- Flash loads when a “?” is present in the URL, but not without the question mark.
Issue
This is essentially the same as the images failing to load problem, and is caused by relative URLs being used in one or more places, either within your Flash files, or in URLs that point to your Flash files, or in external documents (like XML) that are imported into your Flash, or all of the above. Because EE’s URLs are structured as virtual directories, relative URLs don’t work as expected.
Solution
To ensure that Flash works properly, all URLs associated with your Flash files need to either be called from root, e.g.
<embed src="/flash/myFile.swf" />
(note that the first slash does not have a period before it);
or called with an absolute URL, e.g.
<embed src="http://mysite.com/flash/myFile.swf" />
This is true regardless of which method you use to insert your Flash (e.g. SWFObject), and is true for all external files being imported into your Flash. Specifically, you (or your Flash developer) may need to change…
- URLs in an EE template that point to an .swf
- URLs in an .swf that point to external assets, like .flv (video) files, XML files, and other .swf files (like your video player skin)
- URLs in an XML file that point to external assets (e.g. jpg, flv, etc.)
