Created
March 6, 2012 14:56
-
-
Save jwrubel/1986676 to your computer and use it in GitHub Desktop.
Full syntax for swf_tag with swfobject_rails
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%= swf_tag "name_of_swf", options={:dom_id => "dom_element", | |
:size => "320x240", :version => "10.1", | |
:flashvars => {"a" => "test"}, | |
:params => {"menu" => "false", "wmode" => "direct"}, | |
:attributes => { | |
"align" => "left", | |
"class" => "flash_css_class" | |
} | |
} %> | |
<div id="dom_element"></div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If you are using this gist in your own code you need to replace the
name_of_swf
with the filename (obviously) and thedom_id
parameter with the element you want to contain the swfobject. In the attributes hash, theclass
parameter needs to match a css class to style the swf embed. To work around the FF issue mentioned you need to have width and height properties associated with this CSS class.