I have a Flash SWF file working correctly in the root of my website. It is fully embedded, with everything including the player hosted directly on the website (not a YouTube embed). This flash file plays from a page located in the root of my site. I want to show the same flash SWF in a page which is not in the root, that is, it is on a page which is in a virtual subdirectory linked from a menu item.

1) I have www.friendlyaquaponics.com. The home page contains the flash video (second one on the page, not first one). It plays correctly. The HTML is properly set off inside of <code> ... </code> tags.

2) The same swf plays correctly when the absolute URL is put directly into the browser address bar, as www.friendlyaquaponics.com/fa-2013-03-24b.swf. It finds all the required components including the player controls.

3) But then I have a page linked from the top menu TRAININGS -> NEW YORK. This page is in a Wordpress "virtual" subdirectory at www.firendlyaquaponics.com/new-york/ I have put the coding for the same flash video in the "New York" page. But it wont play. I have tried many variations of specifying the path to the swf (in 3 places as required), but no variation seems to work:

a) Referencing <param name="movie" value="http://www.friendlyaquaponics.com/fa-2013-03-24b.swf" /> DOESNT WORK, even though this absolute URL works stand-alone as noted above.

b) Referencing <param name="movie" value="../fa-2013-03-24b.swf" /> This relative URL DOESNT WORK (doesn't load or show the player controls).

c) Referencing <param name="movie" value="/fa-2013-03-24b.swf" /> This "absolute relative" URL (relative to the root of the website) DOESNT WORK (doesn't load or show the player controls).

What is the correct reference within the Flash embed code to make this work, in the context of a page in a "virtual subdirectory"?


1 Answer 1


When dealing with WordPress and Flash, we have to use always absolute URLs. When embedding, when referencing inside the ActionScript, in XML files and when dealing with Remoting. This way is hassle free.

I put my SWFs inside wp-content/swf/ and use the URL http://example.com/wp-content/swf/my-flash.swf. There's nothing virtual about this, it has to be real.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.