vendor/gems/ziya-2.1.7/lib/ziya/html_helpers/charts.rb
def _ziya_chart( url, swf_path, swf_file, options )
    # Setup options for opaque mode
    setup_wmode( options )      
    
    # setup width and height
    setup_movie_size( options )
    
    color_param  = tag( 'param', {:name => 'bgcolor', :value => options[:bgcolor]}, true )
    color_param += tag( 'param', {:name  => "wmode", :value => options[:wmode]}, true )

    xml_swf_path = gen_swf_path( swf_path, options[:swf_path], url )
    xml_swf_path << "&amp;timestamp=#{Time.now.to_i}" if options[:cache] == false
    xml_swf_path << "&amp;timeout=#{options[:timeout]}" if options[:timeout]
    xml_swf_path << "&amp;stage_width=#{options[:width]}&amp;stage_height=#{options[:height]}" if options[:use_stage] == true 
    
    tags = <<-TAGS
    <object codebase="#{codebase}" classid="#{class_id}" id="#{options[:id]}" height="#{options[:height]}" width="#{options[:width]}">
      <param name="scale"             value="noscale"/>
      <param name="salign"            value="#{options[:salign]}"/>            
      <param name="bgcolor"           value="#{options[:bgcolor]}"/>
      <param name="wmode"             value="#{options[:wmode]}"/>                                  
      <param name="movie"             value="#{options[:asset_url]}/#{swf_file}"/>
      <param name="Flashvars"         value="#{xml_swf_path}&amp;chart_id=#{options[:id]}"/>
      <param name="menu"              value="true"/>
      <param name="allowFullScreen"   value="true"/>
      <param name="allowScriptAccess" value="#{options[:script_access]}"/>            
      <param name="quality"           value="high"/>
      <param name="play"              value="true"/>                        
      <param name="devicefont"        value="false"/>
        <embed scale="noscale" 
          allowfullscreen   = "true" 
          allowscriptaccess = "#{options[:script_access]}" 
          bgcolor           = "#{options[:bgcolor]}" 
          devicefont        = "false" 
          flashvars         = "#{xml_swf_path}&amp;chart_id=#{options[:id]}" 
          menu              = "true" 
          name              = "#{options[:id]}" 
          play              = "true" 
          pluginspage       = "#{plugin_url}" 
          quality           = "high" 
          salign            = "#{options[:salign]}" 
          src               = "#{options[:asset_url]}/#{swf_file}" 
          type              = "#{mime}" 
          wmode             = "#{options[:wmode]}" 
          align             = "#{options[:align]}" 
          height            = "#{options[:height]}" 
          width             = "#{options[:width]}"/>            
     </object>        
    TAGS
  end
# generated the object and embed tag necessary for the flash movie
generated the object and embed tag necessary for the flash movie
generated the object and embed tag necessary for the flash movie
def _ziya_chart( url, swf_path, swf_file, options )
    setup_wmode( options )      
    setup_movie_size( options )
    color_param  = tag( 'param', {:name => 'bgcolor', :value => options[:bgcolor]}, true )
    color_param += tag( 'param', {:name  => "wmode", :value => options[:wmode]}, true )
    xml_swf_path = gen_swf_path( swf_path, options[:swf_path], url )
    xml_swf_path << "&amp;timestamp=#{Time.now.to_i}" if options[:cache] == false
    xml_swf_path << "&amp;timeout=#{options[:timeout]}" if options[:timeout]
    xml_swf_path << "&amp;stage_width=#{options[:width]}&amp;stage_height=#{options[:height]}" if options[:use_stage] == true 
    tags = <<-TAGS
    <object codebase="#{codebase}" classid="#{class_id}" id="#{options[:id]}" height="#{options[:height]}" width="#{options[:width]}">
      <param name="scale"             value="noscale"/>
      <param name="salign"            value="#{options[:salign]}"/>            
      <param name="bgcolor"           value="#{options[:bgcolor]}"/>
      <param name="wmode"             value="#{options[:wmode]}"/>                                  
      <param name="movie"             value="#{options[:asset_url]}/#{swf_file}"/>
      <param name="Flashvars"         value="#{xml_swf_path}&amp;chart_id=#{options[:id]}"/>
      <param name="menu"              value="true"/>
      <param name="allowFullScreen"   value="true"/>
      <param name="allowScriptAccess" value="#{options[:script_access]}"/>            
      <param name="quality"           value="high"/>
      <param name="play"              value="true"/>                        
      <param name="devicefont"        value="false"/>
        <embed scale="noscale" 
          allowfullscreen   = "true" 
          allowscriptaccess = "#{options[:script_access]}" 
          bgcolor           = "#{options[:bgcolor]}" 
          devicefont        = "false" 
          flashvars         = "#{xml_swf_path}&amp;chart_id=#{options[:id]}" 
          menu              = "true" 
          name              = "#{options[:id]}" 
          play              = "true" 
          pluginspage       = "#{plugin_url}" 
          quality           = "high" 
          salign            = "#{options[:salign]}" 
          src               = "#{options[:asset_url]}/#{swf_file}" 
          type              = "#{mime}" 
          wmode             = "#{options[:wmode]}" 
          align             = "#{options[:align]}" 
          height            = "#{options[:height]}" 
          width             = "#{options[:width]}"/>            
     </object>        
    TAGS
  end
def _ziya_chart ( url , swf_path , swf_file , options ) setup_wmode ( options ) setup_movie_size ( options ) color_param = tag ( 'param' , { :name => 'bgcolor' , :value => options [ :bgcolor ] } , true ) color_param += tag ( 'param' , { :name => "wmode" , :value => options [ :wmode ] } , true ) xml_swf_path = gen_swf_path ( swf_path , options [ :swf_path ] , url ) xml_swf_path << "&amp;timestamp=#{Time.now.to_i}" if options [ :cache ] == false xml_swf_path << "&amp;timeout=#{options[:timeout]}" if options [ :timeout ] xml_swf_path << "&amp;stage_width=#{options[:width]}&amp;stage_height=#{options[:height]}" if options [ :use_stage ] == true tags = <<-TAGS 
    <object codebase=" #{ codebase } " classid=" #{ class_id } " id=" #{ options [ :id ] } " height=" #{ options [ :height ] } " width=" #{ options [ :width ] } ">
      <param name="scale"             value="noscale"/>
      <param name="salign"            value=" #{ options [ :salign ] } "/>            
      <param name="bgcolor"           value=" #{ options [ :bgcolor ] } "/>
      <param name="wmode"             value=" #{ options [ :wmode ] } "/>                                  
      <param name="movie"             value=" #{ options [ :asset_url ] } / #{ swf_file } "/>
      <param name="Flashvars"         value=" #{ xml_swf_path } &amp;chart_id= #{ options [ :id ] } "/>
      <param name="menu"              value="true"/>
      <param name="allowFullScreen"   value="true"/>
      <param name="allowScriptAccess" value=" #{ options [ :script_access ] } "/>            
      <param name="quality"           value="high"/>
      <param name="play"              value="true"/>                        
      <param name="devicefont"        value="false"/>
        <embed scale="noscale" 
          allowfullscreen   = "true" 
          allowscriptaccess = " #{ options [ :script_access ] } " 
          bgcolor           = " #{ options [ :bgcolor ] } " 
          devicefont        = "false" 
          flashvars         = " #{ xml_swf_path } &amp;chart_id= #{ options [ :id ] } " 
          menu              = "true" 
          name              = " #{ options [ :id ] } " 
          play              = "true" 
          pluginspage       = " #{ plugin_url } " 
          quality           = "high" 
          salign            = " #{ options [ :salign ] } " 
          src               = " #{ options [ :asset_url ] } / #{ swf_file } " 
          type              = " #{ mime } " 
          wmode             = " #{ options [ :wmode ] } " 
          align             = " #{ options [ :align ] } " 
          height            = " #{ options [ :height ] } " 
          width             = " #{ options [ :width ] } "/>            
     </object>        
     TAGS end
generated the object and embed tag necessary for the flash movie
generated the object and embed tag necessary for the flash movie
# Setup options for opaque mode # setup width and height
url
swf_path
swf_file
options