FlashVars parameter value

  1. #1

    FlashVars parameter value

    I need to provide a dynamic value to a parameter.

    This works for me

    
      </ext:FlashComponent>    
                                          <ext:FlashComponent
    		                            ID="FlashComponent1"
    		                            runat="server"
    		                            Url="http://www.graphicmail.com.es/FusionCharts/Column3D.swf" Flex="1">
    		                             <FlashVars>
    			                            <ext:Parameter Name="FlashVars" Value="&chartWidth=200&chartHeight=200&debugMode=0&registerWithJS=1&DOMId=Bounced&dataXML=%3cchart+caption%3d''+animation%3d'1'+formatNumberScale%3d'0'+showValues%3d'1'+plotSpacePercent%3d'1'+labelDisplay%3d'ROTATE'+palette%3d'2'+slantLabels%3d'1'++numberSuffix%3d'%25'+maxColWidth%3d'40'+baseFontSize%3d'10'+baseFontColor%3d'666666'+baseFont%3d'Tahoma'++showCanvasBg%3d'0'++canvasBaseDepth%3d'1'+%3e++%3cset+label%3d'Email+desc.'+toolText%3d'Email+desc.%2c+0'+value%3d'0.0'+color%3d'F7941D'%2f%3e%0d%0a++%3cset+label%3d'Dominio+desc.'+toolText%3d'Dominio+desc.%2c+0'+value%3d'0.0'+color%3d'7693A7'%2f%3e%0d%0a++%3cset+label%3d'Buzon+lleno'+toolText%3d'Buzon+lleno%2c+0'+value%3d'0.0'+color%3d'446E44'%2f%3e%0d%0a++%3cset+label%3d'Filtro+Spam'+toolText%3d'Filtro+Spam%2c+0'+value%3d'0.0'+color%3d'D15D4E'%2f%3e%0d%0a++%3cset+label%3d'Otros'+toolText%3d'Otros%2c+0'+value%3d'0.0'+color%3d'9B9B70'%2f%3e%0d%0a+%3c%2fchart%3e%0d%0a" Mode="Value"  />
    		                             </FlashVars>
    	                             </ext:FlashComponent>
    But this does not:

    
             <ext:FlashComponent
    		                            ID="FlashComponent1"
    		                            runat="server"
    		                            Url="http://www.graphicmail.com.es/FusionCharts/Column3D.swf" Flex="1">
    		                             <FlashVars>
    			                            <ext:Parameter Name="FlashVars" Value="#{porfa1}.getValue()" Mode="Value"  />
    		                             </FlashVars>
    	                             </ext:FlashComponent>   
    
    
            <ext:Hidden ID="porfa1" runat="server"></ext:Hidden>
    Porfa1 has value in a js function:

    
            var draw = function (cmd, record) {
    
                var value = "&chartWidth=200&chartHeight=200&debugMode=0&registerWithJS=1&DOMId=Bounced&dataXML=%3cchart+caption%3d''+animation%3d'1'+formatNumberScale%3d'0'+showValues%3d'1'+plotSpacePercent%3d'1'+labelDisplay%3d'ROTATE'+palette%3d'2'+slantLabels%3d'1'++numberSuffix%3d'%25'+maxColWidth%3d'40'+baseFontSize%3d'10'+baseFontColor%3d'666666'+baseFont%3d'Tahoma'++showCanvasBg%3d'0'++canvasBaseDepth%3d'1'+%3e++%3cset+label%3d'Email+desc.'+toolText%3d'Email+desc.%2c+0'+value%3d'0.0'+color%3d'F7941D'%2f%3e%0d%0a++%3cset+label%3d'Dominio+desc.'+toolText%3d'Dominio+desc.%2c+0'+value%3d'0.0'+color%3d'7693A7'%2f%3e%0d%0a++%3cset+label%3d'Buzon+lleno'+toolText%3d'Buzon+lleno%2c+0'+value%3d'0.0'+color%3d'446E44'%2f%3e%0d%0a++%3cset+label%3d'Filtro+Spam'+toolText%3d'Filtro+Spam%2c+0'+value%3d'0.0'+color%3d'D15D4E'%2f%3e%0d%0a++%3cset+label%3d'Otros'+toolText%3d'Otros%2c+0'+value%3d'0.0'+color%3d'9B9B70'%2f%3e%0d%0a+%3c%2fchart%3e%0d%0a";
    
                porfa1.setValue(value);
    
            }
    Any ideas? Is there another way to give value to a parameter dynamically?
    Thank you very much
  2. #2
    Hi,

    Try to set Mode="Raw" if Value="#{porfa1}.getValue()"
  3. #3
    <ext:Parameter Name="FlashVars" Value="#{porfa1}.getValue()" Mode="Raw"  />
    Does not work
  4. #4
    Hi,

    Please provide full description of result instead "Does not work" otherwise i will not be able to help you
  5. #5
    The flash component (a bar graph), no data is to draw it.
  6. #6
    What we achieved in the following way:

    
    protected void draw(object semder, DirectEventArgs e)
        {
            string envioID = e.ExtraParams["EnvioID"];
            
            var value = "&chartWidth=200&chartHeight=200&debugMode=0&registerWithJS=1&DOMId=Bounced&dataXML=%3cchart+caption%3d''+animation%3d'1'+formatNumberScale%3d'0'+showValues%3d'1'+plotSpacePercent%3d'1'+labelDisplay%3d'ROTATE'+palette%3d'2'+slantLabels%3d'1'++numberSuffix%3d'%25'+maxColWidth%3d'40'+baseFontSize%3d'10'+baseFontColor%3d'666666'+baseFont%3d'Tahoma'++showCanvasBg%3d'0'++canvasBaseDepth%3d'1'+%3e++%3cset+label%3d'Email+desc.'+toolText%3d'Email+desc.%2c+0'+value%3d'0.0'+color%3d'F7941D'%2f%3e%0d%0a++%3cset+label%3d'Dominio+desc.'+toolText%3d'Dominio+desc.%2c+0'+value%3d'0.0'+color%3d'7693A7'%2f%3e%0d%0a++%3cset+label%3d'Buzon+lleno'+toolText%3d'Buzon+lleno%2c+0'+value%3d'0.0'+color%3d'446E44'%2f%3e%0d%0a++%3cset+label%3d'Filtro+Spam'+toolText%3d'Filtro+Spam%2c+0'+value%3d'0.0'+color%3d'D15D4E'%2f%3e%0d%0a++%3cset+label%3d'Otros'+toolText%3d'Otros%2c+0'+value%3d'0.0'+color%3d'9B9B70'%2f%3e%0d%0a+%3c%2fchart%3e%0d%0a";
            porfa1.SetValue(value);
        }
    With javascript does not work (Fn = "draw"), but with an event (OnEvent = "draw"). Why can that be?

    Thank you very much

Similar Threads

  1. Textextfield value as a parameter to store
    By threewonders in forum 1.x Help
    Replies: 13
    Last Post: Aug 10, 2011, 7:30 PM
  2. Return a parameter MVC
    By threewonders in forum 1.x Help
    Replies: 0
    Last Post: Mar 09, 2011, 12:24 PM
  3. How to pass object as a parameter?
    By diegovbs in forum 1.x Help
    Replies: 1
    Last Post: Jan 04, 2011, 5:53 PM
  4. ajaxevent parameter
    By [WP]joju in forum 1.x Help
    Replies: 0
    Last Post: Oct 30, 2009, 3:08 AM
  5. Store Parameter.
    By grmontero in forum 1.x Help
    Replies: 3
    Last Post: Aug 13, 2009, 1:59 PM

Posting Permissions