public
Description: Rails Plugin: Embed Adobe Flash content using swfobject 2.0
Clone URL: git://github.com/duncanbeevers/swf_object_helper.git
Search Repo:
name age message
folder README Tue Jun 03 09:57:59 -0700 2008 Copy comments to README [duncanbeevers]
folder Rakefile Tue Jun 03 09:56:49 -0700 2008 Initial check-in [duncanbeevers]
folder init.rb Tue Jun 03 09:56:49 -0700 2008 Initial check-in [duncanbeevers]
folder lib/ Tue Jun 03 15:15:21 -0700 2008 Allow lazy value-setting for some attributes by... [duncanbeevers]
folder test/ Tue Jun 03 14:24:19 -0700 2008 Tweak default attribute and ensure required opt... [duncanbeevers]
README
Generates JavaScript and optionally alternative content for SWFObject v2.0:
http://code.google.com/p/swfobject/wiki/documentation

Pass a block with alternative content to also create a div containing it:

  <% swf_object(...) do %>
    <p>Get Flash, fool!</p>
  <% end %>

Like other helpers that take blocks, this will concatenate the generated code to
the ERB output stream directly, so use <% %> instead of <%= %> if a block is given.

Or, pass :alt => true to generate string output including default alternative content:

  <%= swf_object(..., :id => 'alt_content', :alt => true) %>
  # => <div id='alt_content'>This website requires ...</div><script ...

or pass :alt => "some string" to put that in the alternative content:
  <%= swf_object(..., :id => 'alt_content', :alt => "no flash") %>
  # => <div id='alt_content'>no flash</div><script ...

By default, or if you explicitly pass :alt => false, you will have to create the
alternative content element yourself.

Originally by Henrik N - http://henrik.nyh.se/ http://pastie.textmate.org/private/nu0hpwxmtcx0toi58j4kha