Design Lab 5: Game Media   [ Monday 6pm - Rm 908]

instructor: Jonah Warren
email: jonah AT feedtank DOT com
url: http://www.playfulsystems.com/teaching/2007/gamemedia


Lab 2: Actionscript Basics Part II
(September 17th, 2007)

Note: you should be able to complete this lab using concepts discussed in the lecture / notes today. If you are having problems, please refer to the notes from class here.

  1. In this lab, you will be making a simple data entry tool for entering names. Complete the following steps:
    • Create an input TextField (Input Text) that will allow users to enter a name.
    • Next to it, create a "submit" button.
    • Create a "display" button.
    • When the user clicks on the submit button, put the name entered in the input TextField into an array, and let the user know that a name has been added.
    • When the user clicks the display button, print out the entire array which should include all names that have been previously entered with the submit button.
    • Make it so that the maximum number of names that can be entered is 5. If the user tries to enter more, print out an error message.
    To complete this lab, you will need to use an array, a for loop and a conditional. Keep in mind this program need not be long. It can be done in 15 lines of code.

    You may either print statements to the output window using the trace command, or create an output TextField (Dynamic Text) like in the following clip. I'm looking for something like this:

  2. When you are done, post both FLAs and SWFs to your website.