Last modified: May 18, 2011 15:43:51.

Flash Vars

Flash variables are convenient way to pass settings to CU3ER and override ones defined in configuration XML file. Here is the list of available flash variables:

Flash Variable Mandatory Description
xml_location Yes Defines path to XML configuration file
xml No Pass whole XML configuration as string NOTE: when passing XML string use it as one line - don't use breaks. .
Deprecated due to issues with passing non encoded strings to Flash.
xml_encoded No Pass whole or parts of XML configuration as URL encoded string. Use encodeURI Javascript function or equal functions in other languages to encode the string.. NOTE: when passing XML string use it as one line - don't use breaks.

If xml_location is present then xml_encoded values will overwrite XML from xml_location file. In this case you can pass parts of config XML.
If xml_location is not present then you need to pass whole CU3ER config XML through xml_encoded variable.
start_slide No Slide number CU3ER slideshow will start with
images No Defines image paths! Will override defined images for slides in XML starting from first image. Images not overridden with this flash variable will still took place in slideshow.

 

Flash Vars code example

<!-- CU3ER content JavaScript part starts here   -->
<script type="text/javascript" src="js/swfobject.js"></script>
<script type="text/javascript">
  // add your FlashVars
  var vars = { 
  		// Mandatory variable - defines path to XML configuration file 
		xml_location : 'CU3ER-config.xml',
		// Optional variable - pass whole XML configuration as URL encoded string
		xml_encoded : '%3Cdata%3E .... %2Fdata%3E',
		// Optiona variable - defines start slide								
		start_slide : '4',	
		// Optional variable - defines image paths! Will override defined images in XML starting from first image												
		images : 'someImage1.jpg,anotherImage2.jpg,absoluteImageURL3.jpg'
  };
  				
  // add Flash embedding parameters, etc. wmode, bgcolor...
  var params = { bgcolor : '#ffffff' };
  // Flash object attributes id and name
  var attributes = { id:'CU3ER', name:'CU3ER' };
  // dynamic embed of Flash, set the location of expressInstall if needed
  swfobject.embedSWF('CU3ER.swf', "CU3ER", 640, 480, "10.0.0", "js/expressInstall.swf", vars, params, attributes );
  // initialize CU3ER class containing Javascript controls and events for CU3ER
</script>
<!-- CU3ER content JavaScript part ends here   -->