unfortunately the rest of the code wasnot there either. i suspect it is because of the multiple 'code' inserts. if this doesn't show, i don't know what to tell you....here it is without any vB markup:
Is it possible to create a line and/or bar chart in Flash using data from a database?
yes, you can. you can experiment this to get a basic idea how this works:
create text file containing nothing but:
&surveyResults=5|4|1|3|2
make a new movie, on the first frame add the AS:
loadVariablesNum ("viewerSurvey.txt", 0);
create a button, splitter, containing the AS:
on(press) {
surveyArray = surveyResults.split("|");
element0=surveyArray[0];// element 0
element1=surveyArray[1];
element2=surveyArray[2];
element3=surveyArray[3];
element4=surveyArray[4];
}
create a dynamic text box labeled surveyResults
create 5 dynamic text boxes labeled element0...element4.
add a second button, showMe, with the AS:
on (release) {
setProperty (dynamicBar, _height, element0 * 10);
}
now make a new movie symbol called dynamicBar, and draw a box h=1, w=50, make the x=0, y=-1.
now play the movie, hit the splitter first, then the showMe button.
Congrats! what you've done is take in a datasource, split the array it contains, show what was in it, and then make the dynamicBar resize according to the datasource!
this should give you the idea how to get started - good luck!