views:

14

answers:

1

I have a Wordpress site. I want to embed a Flash file in one of my pages, like this:

<object id="wdmmg" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"  
 width="100%" height="100%" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"&gt;
<param name="src" value="/_flash/main.swf" />
<embed id="wdmmg" type="application/x-shockwave-flash" width="100%" height="100%" src="/_flash/main.swf"> 
</embed></object>

The Flash file that I have been given (I'm not a Flash coder, as will become clear) comes with a bunch of extra .zlib and asset files. I have put main.swf and all its accompanying files in a _flash directory in the DocumentRoot.

If I go to http://mywebsite/_flash/main.swf the Flash loads just fine.

However, from my Wordpress page - say http://mywebsite/flashypage - it does not. /_flash/main.swf loads OK, but the browser is looking for all the accompanying .zlib and other files not in /_flash, but in /flashypage (which of course doesn't exist as a directory).

My Flash coder tells me that Flash will always look for its assets in a directory relative to the loading HTML page.

In that case, given Wordpress's URL routing, is there any way I can actually embed Flash?

Viz: I can't create a /flashypage/_flash subdirectory, or symlink, in the document root and put the Flash assets in there, because then when I try to load http://mywebsite/flashypage, I just see a directory listing.

And I can't just put an index.html page in the /flashypage directory to load the Flash, because I need this page to be part of Wordpress, and use my Wordpress templates.

Any ideas?

A: 

I'm not strong on flash myself, but if it is true that the flash embed will always look for the files in the directory of the page its embedded in then why don't you try an iframe? Embed the flash file in a simple html page and save it in the /_flash directory and then embed the html page as an iframe.

Evan Moore