Forum: Ruby on Rails including SWFs as part of rails content

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
rocky (Guest)
on 2007-06-06 00:04
(Received via mailing list)
I'm having difficulties developing pages that include simple SWFs as
part of the content. Specifically, they won't play in MSIE 6. In
Firefox and Opera the pages play exactly as planned, both Mac and
Windows. SWFs are located in a subdirectory of /public. Has anyone run
into a similar problem?
Is there a tutorial that covers this anywhere?
Thank you
Robert W. (Guest)
on 2007-06-06 00:59
(Received via mailing list)
Aren't plugins handled differently in MSIE 6+?  You can't use Netscape
style embed tags.  Look into that and I'm guessing you'll find your
problem.
Robert W. (Guest)
on 2007-06-06 01:03
(Received via mailing list)
http://www.jeroenwijering.com/?item=embedding_flash

This should, hopefully, show you what you need to do to properly embed
your swf file.
Michael K. (Guest)
on 2007-06-06 01:19
(Received via mailing list)
Make sure you don't have any spaces in your file path to the SWF. When I
had
this problem with IE is was because of that. Also IE doesn't use src in
the
embed tag if I remember properly. It used the value of the param with
the
attribute 'movie' so make sure that path is correct.

Hope that helps.
athem (Guest)
on 2007-06-06 20:59
(Received via mailing list)
This is directed to everybody - the problem seems to be related to
serving swf's from inside VIEWS.  It seems that you should be able to
put a swf file in a subdirectory of RAILS_APP/public and link to that
swf from an embed link in a view.  Is there some special problem / way
of serving flash from IE within rails?
tmac (Guest)
on 2007-06-06 21:53
(Received via mailing list)
I recently had this exact same issue as well.  The solution to my
problem was exactly what Michael said, I needed:

<param name="movie" value="/path/to/my_player.swf">

It's really not an issue with rails because it's your server that
dishes up that content.  You may wanna double check the mime type your
server is spitting out too but I doubt that's part of the problem
unless your server is very old (apache 1.3 or something).  Not sure
how the various browsers handle the type attribute but I wouldn't
count on it.

good luck!
Tim
Cliff R. (Guest)
on 2007-06-08 09:25
(Received via mailing list)
Hi Folks,

Can I make a suggestion here?  I began writing a lengthy reply to this
subject, but figured it would be more useful to write a blog post on
embedding SWF content in Ruby on Rails using SWFObject.  So here it is:

http://blog.eleventyten.com/2007/6/8/embedding-swf...

HTH, let me know if you have any problems or if you have any
comments/criticisms on the article itself and I will update it
appropriately.

Cliff
rocky (Guest)
on 2007-06-12 16:57
(Received via mailing list)
Cliff
great post, thanks for the help on this. I followed the SWFObject
documentation and it works fine in IE
Rocky
Rob B. (Guest)
on 2007-06-12 18:04
(Received via mailing list)
Cliff,
I think you need to escape a few more < and > in the text.  In the
bullet that begins "There is no need to deal with ..." you have
<embed> and <object> which cause problems (at least for Safari).
-Rob
This topic is locked and can not be replied to.