Creating a web poll in Flash MX 2004 part 4

Welcome to the last tutorial in this series on Creating a web poll in Flash MX 2004. The tutorials have worked with a simple Web poll application. We started by looking at how we could use various data sources for our application – text and XML files and a database. We used functions written in AS2.0 to populate the application, record the vote and display a chart of all responses.

In the third tutorial we created two custom classes for our Web poll application. By the end of that tutorial, we had populated the application with information from a database. This tutorial extends the classes to record the vote and display a simple chart of responses.

As with the last tutorial, you'll need some kind of web server and a server-side language like PHP, Cold Fusion, ASP or ASP.NET. The examples in this tutorial use VB.NET, as I'm an ASP.NET developer. My own computer is set up to use IIS 5 as the Web server and it has the .NET 1.1 framework installed.

You can download the files for this tutorial from the blue Properties box that contains the article PDF. There's a heading titled Code Download and you can click the Details link next to it to get the zip file. It contains the source files you'll need for the tutorial as well as the completed files.

You can either start with the class files from the previous tutorial - Poll.as and PollResponse.as – or use the files provided in the resources zip file. Open these files in Flash as well as the file pollclasses2.fla. Just make sure you don't use the files from the completed folder.

Copy all the files to your Web server – in my case, I created a folder called poll in Inetpub >wwwroot. Open and test the file pollclasses2.fla and you should see the interface populated from the database.

$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 >>