Hello All!
I’m trying to make a Bar graph that feeds off of data from a MySQL dbase, and server side language is php. I think I have the ‘bar’ part working, and i’m just messing with getting the data.
PHP data:
$string .="&bench".$i."=".$row['Bench']."&result".$i."=".$row['Baseline'];
Actionscript:
onClipEvent (load) {
myData = new LoadVars()
myData.load("http://localhost/sites.php")
_root.tim.htmlText = "";
myData.onLoad = function(success){
if(success){
for(var i = 0; i < 15; i += 1)
{
_root.datafornewBAR += myData["result"+i];
duplicateMovieClip (_root.bar1, "bar" + i, i);
}
} else trace ("Error loading data")
}
}
It appears the data is looping through the array, but it does this faster than duplicateMovieClip so, all of the bars on the graph have the same value (the last value).
Any thoughts?
Thanks!
-Tim