Creating a Web Poll in Flash MX 2004: Pt. 2 Support

In the first part of this tutorial, we looked at how you could create a simple web poll application. The poll displays a question and a list of radio buttons containing responses. The user selects a response, votes and then views a simple chart showing all responses. The content for the web poll is taken from an external source and, in part one, we looked at the different sources available to Flash - a text file, an XML file and a database.

The first part of the tutorial covered the LoadVars and XML classes and we added radio buttons to our Flash movie dynamically. I've assumed that you've completed this tutorial. If not, you might find it useful to complete it first.

In this tutorial, we'll collect the user's vote and display a simple chart. We'll also update the results in the text file, XML file and database. You'll learn techniques to add movie clips and text files dynamically as well as using the LoadVars class to update the data sources.

By the end of the last tutorial, we had created three Flash files that loaded external content, one each for a text file, XML file and database. When you have finished this tutorial, you'll be able to display a chart and update each of these data sources.

Please note if you want to work with a database or update the poll results, you'll need some kind of web server and a server-side language like PHP, Cold Fusion, ASP or ASP.NET. Because I'm an ASP.NET developer, this part of the tutorial will use ASP.NET, IIS 5 with .NET, and Access for the back-end.

All the source code is available for download.

$2.89
- OR -

Sas Jacobs

Sas JacobsHello. I'm the Principal of Anything Is Possible, an Australian web development business specialising in web applications development and training. I'm interested in using Flash with dynamic content and I've presented at a number of International conferences on topics relating to applications development, XML and scripting components. I have recently released my second print book Beginning XML with DOM and Ajax to match the first one - Foundation XML for Flash. I have a business web site
and a personal web site.

See All Postings From Sas Jacobs >>