def ofc2(width, height, url, id =Time.now.usec, flash_attributes = {}, flash_params = {})
      url = CGI::escape(url)
      div_name = "flashcontent_#{id}"
      <<-EOF
        <div id='#{div_name}'></div>
        <script type="text/javascript">
          swfobject.embedSWF(
          "/assets/open-flash-chart.swf","#{div_name}",
          "#{width}", "#{height}", "9.0.0", "/assets/expressInstall.swf",
          {"data-file":"#{url}"}, #{flash_params.to_json}, #{flash_attributes.to_json} );

        </script>
      EOF
    end
def ofc2(width, height, url, id =Time.now.usec, flash_attributes = {}, flash_params = {})
      url = CGI::escape(url)
      div_name = "flashcontent_#{id}"
      <<-EOF
        <div id='#{div_name}'></div>
        <script type="text/javascript">
          swfobject.embedSWF(
          "/assets/open-flash-chart.swf","#{div_name}",
          "#{width}", "#{height}", "9.0.0", "/assets/expressInstall.swf",
          {"data-file":"#{url}"}, #{flash_params.to_json}, #{flash_attributes.to_json} );

        </script>
      EOF
    end
generate a ofc object using data from url
  +width+ width for div
  +height+ height for div
  +url+ an url which return data in json format, if you use url_for method to set url param the base param must be set to '' (empty string)
  +id+ id for div with graph, default Time.now.usec
  +flash_attributes+ attributes for swf
  +flash_params+ params for swf