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
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
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.
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/flash/swflash.cab#version=6,0,0,0”
WIDTH=“550” HEIGHT=“400” id=“CGAintro” ALIGN=“”>
<%= link_to “Skip intro” , {:action => :home} %>
Alain
Hi Alain,
Thanks for the code snip. Where is your file “your_movie.swf”?
Peter
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
> Thanks for the code snip. Where is your file “your_movie.swf”?
In the public root :
<rails_app_root>/public/your_movie.swf
Alain
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?!
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 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.
Marnen Laibow-Koser
http://www.marnen.org
[email protected]
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs