I have a FlashMX "screens" application all developed and I'm just trying to add a chart to it, using a sample I found on the web: http://www.flash-db.com/Components/?...pe=Bar%20Chart

When testing out the sample, it works when compiling it as actionscript 1.0, but doesn't work when compiled as AS2.0, and my screens application must be compiled with AS2.0

Any help with what I would need to change in this small piece code is greatly appreciated, thanks!

here's chart:

/* Incoming data is in the form

// Prepare Bar Chart for Data.
chart.setChartTitle("Scripting language usage on all servers");

function convertXML () {
mainTag = new XML();
elementTag = new XML();
dataList = new Array();
elementList = new Array();
mainTag = this.firstChild;
if (dataXML.loaded) {
if (mainTag.nodeName == "dataSet") {
dataList = mainTag.childNodes;
for (i=0; i<=dataList.length; i++) {
if (dataList[i].nodeName == "data") {
elementList = dataList[i].childNodes;
for (j=0; j<=elementList.length; j++) {
elementTag = elementList[j];
elementType = elementTag.nodeName;
if (elementType == "name") {
Name = elementTag.firstChild.nodeValue;
if (elementType == "dataRow") {
Info = elementTag.firstChild.nodeValue;
// Adds the label and data to the Chart.
var pollData = {label: Name, value: Info}