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

 < previousnext > 

 

Chart Inside Another Flash File

 

This feature requires Actionscript 3 and some Flash knowledge not covered by this tool. For technical information related to Flash, please refer to the Flash manual.

This feature is available to registered users only. If your Flash application runs outside of a domain name (not on the web), then a bulk-license is required.

 

To insert a chart inside another flash (swf) file, copy the following actionscript code, paste it in your flash movie, edit the variable highlighted in red, and then publish and test the movie:

var loader:Loader = new Loader();
loader.contentLoaderInfo.addEventListener(Event.INIT, Loaded);   
loader.load(new URLRequest("charts.swf"));

function Loaded(event:Event):void{
	
	var chart:MovieClip = event.target.content;

	//edit the library and source paths here
	chart.library_path="charts_library";
	chart.xml_source="sample.xml";
	
	addChild(chart);
}

 

If charts.swf is not in the same directory as the main flash file, its URL must contain the appropriate relative or absolute file path. Example:

loader.load(new URLRequest("graphics/charts.swf"));

If charts_library and sample.xml are not in the same directory as charts.swf, their URLs must contain the appropriate relative or absolute file paths. Example:

chart.library_path="/libraries/charts_library";
chart.xml_source="/xml/sample.xml";	

 

The download package comes with an example in the resources folder called chart_in_swf.

 

 

 < previousnext > 


Copyright © 2003-2017, maani.us