Permalink
Browse files

bar clicking ability

  • Loading branch information...
PullMonkey
PullMonkey committed Jan 8, 2009
1 parent 20a782d commit 57776d00e70020b50e6b1a6e2204a5718414b1c0
Binary file not shown.
@@ -2,7 +2,7 @@
module OpenFlashChart
module Controller
def open_flash_chart_object(width, height, url, use_swfobject=true, base="/")
def open_flash_chart_object(width, height, url, use_swfobject=true, base="/", swf_file_name="open-flash-chart.swf")
url = CGI::escape(url)
# need something that will not be repeated on the same request
special_hash = Base64.encode64(Digest::SHA1.digest("#{rand(1<<64)}/#{Time.now.to_f}/#{Process.pid}/#{url}"))[0..7]
@@ -18,15 +18,15 @@ def open_flash_chart_object(width, height, url, use_swfobject=true, base="/")
<<-HTML
<div id="#{div_name}"></div>
<script type="text/javascript">
swfobject.embedSWF("#{base}open-flash-chart.swf", "#{div_name}", "#{width}", "#{height}", "9.0.0", "expressInstall.swf",{"data-file":"#{url}"}, {"wmode":"transparent"});
swfobject.embedSWF("#{base}#{swf_file_name}", "#{div_name}", "#{width}", "#{height}", "9.0.0", "expressInstall.swf",{"data-file":"#{url}"}, {"wmode":"transparent"});
</script>
<noscript>
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="#{protocol}://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="#{width}" height="#{height}" id="#{obj_id}" align="middle" wmode="transparent">
<param name="allowScriptAccess" value="sameDomain" />
<param name="movie" value="#{base}open-flash-chart.swf?data=#{url}" />
<param name="movie" value="#{base}#{swf_file_name}?data=#{url}" />
<param name="quality" value="high" />
<param name="bgcolor" value="#FFFFFF" />
<embed src="#{base}open-flash-chart.swf?data=#{url}" quality="high" bgcolor="#FFFFFF" width="#{width}" height="#{height}" name="#{obj_id}" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="#{protocol}://www.macromedia.com/go/getflashplayer" id="#{obj_id}" />
<embed src="#{base}#{swf_file_name}?data=#{url}" quality="high" bgcolor="#FFFFFF" width="#{width}" height="#{height}" name="#{obj_id}" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="#{protocol}://www.macromedia.com/go/getflashplayer" id="#{obj_id}" />
</object>
</noscript>
HTML

0 comments on commit 57776d0

Please sign in to comment.