I would be very interested in seeing this xml-to-flash bar chart open source file. It's something that I'm very interested in (manipulating Flash with XML...and vice-versa).
I believe that I follow you so far. I also remember having seen this implemented before on the web (URL escapes me at present) to display polling results without breaking the flash interface of the site.
Anyway, I'd be interested in seeing an open source file.
The book Flash 5 Dynamic Content Studio has a tutorial on this exact subject... you may want to look into it. In fact, that seems to be an awesome book all around.
Really, if you think about it, it's quite simple. If you are advanced enough to write an XML doc to your server using ASP or Perl or whatever (that's the part I have trouble with) you should be able to make a bar chart in flash. In fact, I will write the flash code if you get the Perl script to work for me.
Load variables from your XML file.... looking for variables named answer1, answer2, answer3...... then use this code:<b>
bar1percent = Math.round(Number(answer1)/Number(total)*100);
bar2percent = Math.round(Number(answer2)/Number(total)*100);
bar3percent = Math.round(Number(answer3)/Number(total)*100);
[Edited by marigold on 07-06-2001 at 02:46 AM]
Thanks for the book recommendation and the script. Looking at the actionscript, I have to agree that the harder part is indeed rendering the XML doc dynamically rather than importing into Flash.
I will certainly be pursuing dynamic content studio for more ideas.
I'm no scripting wizard but is there any particular reason that you have to use Perl? Personally I am looking to develop the backend of my web app in JSP, thereby gaining some form of platform independence (theoretically). Although, this project is currently on hold whilst I coordinate a relocation IRL.
Do you know of any good tutorials online for generating dynamic flash (w/o invoking Generator or Turbine)?
I have no problem with generating the XML - I am generating it using asp - If you want the code let me know in fact to change this to perlscript shouldn't be a problem either.
In fact I bundled together a high score system for a game that draws xml from sql server using asp then draws it into flash, however it just displays it rather than doing anything constructive once inside - this is what I am interested in. (http://www.davidaanensen.com/dotcombat)
I saw a program called jgenerator the other day that might be of use, other than that the friends of ed books are damn fine indeed.