• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL

Part: 7 Flash and ColdFusion PROJECT 2: ... > A Component-Based Flash Quiz

Lesson 16. A Component-Based Flash Quiz

In this lesson, you will complete the first part of the book's final project: a Flash-based quiz that records user scores and identities into a database. As you look back overall you have learned, from interface layouts and static Web page design through Macromedia Flash ActionScript and Dreamweaver and ColdFusion, you'll see that you have learned quite a bit. In this final project you'll have a chance to pull it all together. The result combines a sleek Flash user interface, some ActionScript, a bit of ColdFusion coding, and data that gets sent in and out of Flash to a database.

Before worrying about sending data, you need to build the Flash interface that collects the data. Macromedia Flash MX 2004 comes with a set of components that you can use to automate interface building. You got a taste of components when you used the TextArea component in Lesson 12, “Nonlinear Flash Interactions,” and Lesson 13, “Drag-and-Drop Interactions.” In this lesson the components you will use are a bit more complicated: You have to set more parameters, but you will be pleasantly surprised at how easy it is to mock up a quiz using components.

Flash MX 2004 components, such as the ComboBox component shown here, make it a snap to create Flash-based user interfaces.

Once you've built the quiz forms using components, you have to write some ActionScript to extract the data the user enters. In Lesson 17, “Flash, ColdFusion, and the Database,” you'll learn how to send that data to a database via ColdFusion, but in this lesson you'll at least score the results and display them in the Flash testing and debugging environment. You'll also add some ActionScript that will verify that the user entered something for each question—if she or he doesn't, then an error message will display.

If you want a quick refresher on how the Flash movie looks and feels, go back to http://www.allectomedia.com/dante/ and take the test again.


In this lesson, you will:

  • Build a quiz using Flash user interface components: RadioButton, ComboBox, List, and Button.

  • Send data into Flash from its host Web page.

  • Write ActionScript to collect all of the data that users enter

  • Deploy a custom error message movie clip symbol to display error messages

  • Score the test using ActionScript and display the user's score dynamically


This lesson takes approximately two hours to complete.


Starting Files:


Completed Files:




Not a subscriber?

Start A Free Trial

  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint