# Flash Skin and Rails View Issue

**URL:** <https://www.ruby-forum.com/t/flash-skin-and-rails-view-issue/92917>\
**Category:** Rails\
**Created:** [April 25, 2007, 6:02pm UTC](https://www.ruby-forum.com/t/flash-skin-and-rails-view-issue/92917 "2007-04-25T18:02:33Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nicholas\_Van\_W](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/b5ac83/32.png) [@Nicholas\_Van\_W](https://www.ruby-forum.com/u/Nicholas_Van_W)\
**Post date:** [April 25, 2007, 6:02pm UTC](https://www.ruby-forum.com/t/flash-skin-and-rails-view-issue/92917/1 "2007-04-25T18:02:33Z")

</div>

Hi,

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

/movies/index.rhtml  
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”  
[http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=608abffd](http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=608abffd)

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?

Thanks,  
Nick

---

<div class="post-metadata">

**Author:** ![Nicholas\_Van\_W](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/b5ac83/32.png) [@Nicholas\_Van\_W](https://www.ruby-forum.com/u/Nicholas_Van_W)\
**Post date:** [April 25, 2007, 6:23pm UTC](https://www.ruby-forum.com/t/flash-skin-and-rails-view-issue/92917/2 "2007-04-25T18:23:38Z")

</div>

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,  
correct?)  
(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  
directory.

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.  
John

---

<div class="post-metadata">

**Author:** ![Nicholas\_Van\_W](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/b5ac83/32.png) [@Nicholas\_Van\_W](https://www.ruby-forum.com/u/Nicholas_Van_W)\
**Post date:** [April 25, 2007, 11:19pm UTC](https://www.ruby-forum.com/t/flash-skin-and-rails-view-issue/92917/3 "2007-04-25T23:19:33Z")

</div>

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.

Thanks,  
Nick

On 4/25/07, John I. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> MojaveExternalAll.swf.(which is the controller for the movie,
> 
> > Hi,
> > 
> > align=“middle” allowScriptAccess=“sameDomain”  
> > without
> > 
> > >
> 
> >

–  
Nicholas Van W.
