Flash Skin and Rails View Issue


I have an issue embedding a flash movie into one of my rails views.

embeds /resources/movies/episode1.swf and episode1.flv

e.g index.rhtml includes:

If I put this in index.html in /resources/movies, everything works fine.

But as I understand it, flash.swf references a player skin in the same directory (/resources/movie)- MojaveExternalAll.swf.

With the code in my view, this isn’t being found, so my movie plays without controls.

Adobe’s site says “FLVPlayback skin SWF must be in same directory as HTML file”


If I load an html file from /resources/movie it all works fine. However, I need to embedd that flash movie into my Rails view.

Hopefully I’ve made myself clear. I expect this may be a common problem with loading components that load other components in their same directory. I tried using javascript to modify base href, but to no avail.

Any thoughts?


making sure I have this straight.
your flash.swf, episode1.flv and MojaveExternalAll.swf are in the same
directory (/resources/movie)
and when you have a web page in that directory that flash movie works fine.
but when you access that slash movie from another directory it fails?

I think it might be a relative link to the
MojaveExternalAll.swf.(which is the controller for the movie,
(the movie.swf (just a shell) loads the FLV and the MojaveExternalAll)

let's do some testing.
we know it works in the same directory.
lets make a new in the /resources/movie called flash and move all you
flash movie things into that directory.
now with the web page in the /resources/movie/ directory see if you
can get the flash movie to play from the /resources/movie/flash

I think that will work. But if you start moving the flash components
around into different directories it fails.

It's been several months since I've done flash video work. I running
from memory.

let me know if that helps.

Thanks for the thoughts.

Everything works when in the same directory as a regular html page.

I got it to work in a rails view by doing the following:

  1. move the flash files to public (e.g. / )
  2. add to my main layout.
  3. reference flash file by “movie.swf” reference in view.

Not sure exactly why yet, but I’m happy for now.