Forum: Ruby on Rails linking a .swf file in a rails document

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.
Peter M. (Guest)
on 2006-02-25 06:03
(Received via mailing list)
Hi,

I have a little .swf movie I'd like to have in my page. Is there a
rails way of linking it?

Thanks,
Peter
Roberto S. (Guest)
on 2006-02-25 07:13
(Received via mailing list)
No. But you could use http://blog.deconcept.com/flashobject/ and build a
Rails Helper around it.

btw.  Campfire (37Signals, DHH)  also seems to use flash.  I took a look
at
the HTML sources a few days ago and they seem to include the Macromedia
Flash/JS bridge, which also contains functions for embedding a swf.
Alain R. (Guest)
on 2006-02-25 11:50
(Received via mailing list)
Peter
    > I have a little .swf movie I'd like to have in my page. Is there a
    > rails way of linking it?

It's not a Rails way, but the standard html way works fine:

Example (C&Pasted from a working app.) :

     <html>
      ....
		  <p>
		    <OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"

codebase="http://download.macromedia.com/pub/shockwave/cabs/...
		 WIDTH="550" HEIGHT="400" id="CGAintro" ALIGN="">
		      <PARAM NAME=movie VALUE="your_movie.swf">
		      <PARAM NAME=loop VALUE=false>
		      <PARAM NAME=quality VALUE=high>
		      <PARAM NAME=bgcolor VALUE=#003366>
		      <EMBED src="your_movie.swf" tppabs="your_movie.swf" loop=false
quality=high bgcolor=#003366  WIDTH="550" HEIGHT="400" NAME="CGAintro"
ALIGN=""
		 TYPE="application/x-shockwave-flash"
PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer">
		      </EMBED>
		    </OBJECT> </p>
		  <p><%= link_to "Skip intro" , {:action => :home} %></p>


Alain
Peter M. (Guest)
on 2006-02-25 18:35
(Received via mailing list)
Hi Alain,

Thanks for the code snip. Where is your file "your_movie.swf"?

Peter
Alain R. (Guest)
on 2006-02-25 21:22
(Received via mailing list)
Peter
    > Thanks for the code snip. Where is your file "your_movie.swf"?


In the public root :

      <rails_app_root>/public/your_movie.swf


Alain
chems (Guest)
on 2006-02-27 19:55
Alain,

I tested but seems not working for me. Got a message like movie not
loaded
I pasted your code in a rhtml file, and include the .swf in the public
directory
Any help

Rgs
Peter M. (Guest)
on 2006-02-27 22:12
(Received via mailing list)
Hi Rgs,

I got this working but had a problem at first also. My problem was I
didn't notice that the .swf filename is written twice in Alain's code.
When I changed both then everything was ok. It was even ok if I moved
the file into my images directory and used 'images/theFIle.swf' twice
in Alain's code.

Peter
Carlos A. (Guest)
on 2010-07-20 22:52
I've have another problem, every time I go to another page the flash
dissapears, It's like the link changes.

I'm using the flash in a layout placed in every page of the system.

Can you help me please?!
Marnen L. (Guest)
on 2010-07-20 23:09
Carlos Aldas wrote:
> I've have another problem, every time I go to another page the flash
> dissapears, It's like the link changes.
>
> I'm using the flash in a layout placed in every page of the system.
>
> Can you help me please?!

Check the generated HTML.  Make sure it's pointing to the URL you expect
it to.

Best,
--
Marnen Laibow-Koser
http://www.marnen.org
removed_email_address@domain.invalid
This topic is locked and can not be replied to.