Programming 11/12: ActionScript Assignment 1 (Block 2-4)

[swf], 550, 400[/swf]

For this assignment, you will create a simple one-question multiple-choice quiz using ActionScript with the following criteria:

  • The text must be legible, be neatly organized, and make good use of the stage.
  • The question that you make up can be answered by an average Grade 8 student.
  • The quiz must have four choices: one correct answer and three incorrect choices.
  • The user can click on any of the four choices.
  • If the answer is incorrect, the user needs to try again. Question is reset when the mouse is no longer over the incorrect choice.
  • If the answer is correct, the other choices become hidden.

Make sure to upload both fla and swf files.


  • You will need to create six TextField objects: one for the question, four for the choices, and one for the feedback.
  • You will need to create a TextFormat to change the font size.
  • You will need to use myTextField.width and .height as well as .x and .y to move the objects to the proper locations.
  • You will need to use myTextField.visible = false to hide objects.
  • Optional: You will need to use myTextFormat.color = 0xFFFFFF for black, 0xFF0000, for red, 0x00FF00 for green, 0x0000FF for blue, and 0x000000 for white. The code follows the RGB convention.

Evaluation: The quiz will be marked out of 10 based on the following criteria:

  • Is the code written entirely in ActionScript (blank stage)? (4 marks)
  • Does the quiz provide a question with four selectable items?
  • Is the text legible and organized?
  • Does it provide red feedback when the incorrect item is chosen?
  • Does it allow user to choose another item when an incorrect item is chosen?
  • Does it provide green feedback when the correct item is chosen?
  • Does it hide all other items when the correct item is chosen?