SWF Object plugin
Plugin details
Documentation
ruby script/plugin install http://swfobjecthelper.googlecode.com/svn/trunk/swfobject_helper/
How to use:
Include swfobject in your view:
<%= javascript_include_tag "swfobject" %>
if you wan't add this js lib in your :defaults helper uncomment the last line of swfobject_view_helper.rb or register this in AssetTagHelper manually.
The is very simple for add a Flash in your page add this:
<%= swfobject_tag "/source/of/your/flash.swf", :div_id => "id_of_div" %>
It's really simple....
Parameters can be passed:
- div_id: the HTML +id+ of the +div+ element that is used to contain the Flash object, the content of this DIV will be replaced for Flash content."
- flash_id: the +id+ of the Flash object itself.
- background_color: the background color of the Flash object; default white
- flash_version: the version of the Flash player that is required; default "9"
- size: the size of the Flash object, in the form "100x100". Defaults to "100%x100%"
- variables: a Hash of initialization variables that are passed to the object;(FlashVars)
- parameters: a Hash of parameters that configure the display of the object;
example:
<%= swfobject_tag "/swfs/header.swf", :div_id => "header_div", :parameters => {:wmode => "transparent"} %>
- express_install: If user don't had required flash version it will be instaled.To use this feature you need copy expressinstal.swf from plugin folder to your rails public folder.
example:
<%= swfobject_tag "/swfs/header.swf", :div_id => "header_div", :express_install => "/swfs/expressinstall.swf" %>
Further Documentation
There is currently no advanced documentation for this plugin.
New documentationEdit plugin | (0 older versions) | Last edited by: scott, 7 months ago

