#include "com/fusioncharts/includes/LoadingFunctions.as"
#include "com/fusioncharts/includes/AppMessages.as"
import com.fusioncharts.core.charts.Column3DChart;
import com.fusioncharts.core.charts.Pie3DChart;
var objL:Object = new Object();
objL.linkClicked = function(targetObj:Object){
trace("Data belonging to " + targetObj.link + " was clicked");
}
var myXML = new XML();
var myXML2 = new XML();
var myXML3 = new XML();
myXML.ignoreWhite=true;
myXML2.ignoreWhite=true;
myXML3.ignoreWhite=true;
myXML.load("http://rrsaccess/FlashXML.aspx?MonthlyCount=8");
myXML2.load("http://rrsaccess/FlashXML.aspx?Drage=1");
myXML3.load("http://rrsaccess/FlashXML.aspx?Reconciliation=1");
myXML.onLoad = function(loaded){
if (loaded){
myXML =this;
loadChart();
}
}
myXML2.onLoad = function(loaded){
if (loaded){
myXML2 = this;
loadChart2();
}
}
myXML3.onLoad = function(loaded){
if (loaded){
myXML3 = this;
loadChart3();
}
}
function loadChart(){
var chartContainerMC1:MovieClip = this.createEmptyMovieClip("ChartHolder1",1);
var Chart1:Column3DChart = new Column3DChart(chartContainerMC1, 1, 450, 325, 20, 15, false, "EN", "noScale");
Chart1.setXMLData(myXML);
Chart1.render();
Chart1.addEventListener("linkClicked", objL);
stop();
}
function loadChart2(){
var chartContainerMC2:MovieClip = this.createEmptyMovieClip("ChartHolder2",2);
var Chart2:Pie3DChart = new Pie3DChart(chartContainerMC2, 1, 450, 325, 500, 15, false, "EN", "noScale");
Chart2.setXMLData(myXML2);
Chart2.render();
stop();
}
function loadChart3(){
var chartContainerMC3:MovieClip = this.createEmptyMovieClip("ChartHolder3",3);
var Chart3:Column3DChart = new Column3DChart(chartContainerMC3, 1, 450, 325, 20, 400, false, "EN", "noScale");
Chart3.setXMLData(myXML3);
Chart3.render();
stop();
}