XML/SWF Charts| CSS/XML Timeline Eons(New)| Timeline Eons| SlickBoard

 < previousnext > 


External Variables


Pass variables from the web page to the XML source like this:



To avoid conflicts with other FlashVars variables, convert the special characters to their hex values like this:



The result is:

'FlashVars', 'library_path=charts_library&xml_source=sample.php%3Fchart_type%3Dbar%26user_id%3D658'


The sample.php source might read the variables and generate the XML code like this:


//read the query variables
$type =  $_REQUEST['chart_type'];
$id = $_REQUEST['user_id'];

//make it a line chart for all users other than user id 658	
if ( $id != 658 ){
   $type = "line";

<chart_type><?php print $type ?></chart_type>



The amount of variables passed to the xml_source URL via FlashVars might have limits on some browsers. These limits are not documented. Try a few variables and verify that they work on all browsers, then gradually add more.

Ideally, the xml_source should contain scripts that collect data and variables from databases and other sources, limiting the use of FlashVars.



 < previousnext > 

Copyright © 2003-2020, maani.us