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

Lesson 16. Building a Quiz with Components

Lesson 16. Building a Quiz with Components

In this lesson, you will complete the first part of the book's final project: a Flash-based test that records user scores and identities into a database. As you look back over all you have learned, from dynamic changes to object attributes (such as DHTML layers), through Flash ActionScript and onto 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 hand-coding, and data that gets sent in and out of Flash.

Before worrying about sending data, you need to build the Flash interface that collects the data. Flash MX comes with a set of components that you can use to automate inter face building. You got a taste of components when you used the scrollbar component in Lessons 9 through 11. In this lesson, the components you will use are a bit more complicated, in the sense that you have to set more parameters, but you will be pleasantly surprised at how easy it is to mock up a test using components.

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

Once you've built the forms using components, you have to write some ActionScript to extract the data that the user enters. In the next lesson, 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 on the final screen. 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 and log in at http://www.allectomedia.com/cf_elearning/.


In this lesson, you will:

  • Build a test using Flash user interface components: RadioButton, ComboBox, and ListBox.

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

  • Use the MessageBox component to display error messages

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


This lesson takes approximately 2 hours to complete.


Media Files:



Starting Files:


Completed Files:




Not a subscriber?

Start A Free Trial

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