Page 1. Setting the Stage for the RadioButton Quiz

In the spirit of separating function from content, we will place the navigation buttons and textboxes for instructions/feedback on the stage at "authoring time." The screenshot below shows all of the stage elements along with the instance names needed to reference them in our code. Note that the buttons btnPrev and btnNext were pulled directly from Window > Common Libraries > Buttons. The button btnDone was from the same source, but we added a static textbox to the text layer of the button to integrate the text "QUIT" into the button. Finally, the button btnCheck was created in the style of the Basic tutorial Making Custom Buttons in Flash CS3.

All of the textboxes shown are dynamic including the title (txtTitle) so that the instructor can eventually customize this from the XML as week. In addition, the mcCheck clip was formed by creating a static text box containing an appropriate font symbol (I used a 36 point bold checkmark from the WingDings2 font), and converting it to a MovieClip using Modify > Convert to Symbol.

Stage Layout for Applet

In addition to those elements of the stage that you can see, we also created a movie clip called EndClip, consisting of a filled rectangle the same size as the stage (drawn and "converted to symbol" just like the check mark). This clip includes a dynamic text box called txtReport in which we will write how the student did on the quiz when he or she clicks the "QUIT" button btnDone.

Quiz Report Clip Layout

Once we created the EndClip MovieClip shown above, we selected it in the Library panel and then pulled down the menu from the top right corner of the Library panel and chose Linkage as shown in the screen shot on the right. Once the linkage dialog box is set up as shown below, we will be able to create an instance of this clip at run-time, which we do only when the "QUIT" button is pressed.

Linkage Dialog Box

Selecting Linkage from Library Panel Menu

Download

Download the fla file with stage set up as shown above, with no ActionScript code.

Back to Intermediate Tutorials              Back to Flash and Math Home

The site www.flashandmath.com is maintained by Doug Ensley (doug@flashandmath.com) and Barbara Kaskosz (barbara@flashandmath.com).
It has been developed with partial funding from the National Science Foundation and the Mathematical Association of America.