Class #3 - Wednesday, May 14th, 2008





  1. Roll the dice! Dice: Random numbers, pip symbols, someKindOfButton_btn.addEventListener( whatEvent, whatFunction), etc. How and why could a Symbol have and need its own Actions layer? dieSymbol has 6 keyframes and 21 pip symbols total! In its faces layer. Please review this material, though much of it is a PREVIEW of things to be explained later on too.
    The main topics in today's class (05/14/08) were:
    
       1. Explaining the if statement that was not explained
            very well on Tuesday and needed more time and a better example.
    
       2. Developing an application to illustrate the 
                                                      if ( condition ) {
                                                         TRUE ACTIONS
                                                      } else {
                                                         FALSE ACTIONS
                                                      }
    
                                     discussion from day #2, Tuesday's class.
    
       3. Textbox or Text tool and the Property Inspector choices
    
                Static Text
                Dynamic Text
                Input Text
    
          An application that required all three TYPEs of Textbox.
     
            userNumber_txt    for the user of our Flash application to
                              enter a number, such as 22 or 205 or 322 or 138.
                                                          Type: Input Text
    
                   out_txt    for reporting whether the number was
                              an EVEN or an ODD number.   Type: Dynamic Text
    
             Unnamed Text tool created Textboxes to just describe or label
                   what userNumber_txt is for and what the application does,
                   and how to use it, etc.
                                                          Type: Static Text
             
           CHECK BACK TO THIS PAGE LATER to see more about today's 
                             example, which included a button named:
    
                                                          processNumber_btn
     
       4. Using the MOD operator to illustrate the if statement.
    
            var n : int;
    
            n = 97;
    
            if (97 % 2 == 0) {
                evenOrOdd_txt.text = "EVEN";
            } else { 
                evenOrOdd_txt.text = "ODD";
            }
    
        5.  ... more later
    
        6.  ... more later
    



  2. Working Flash application based on the 9:50 - 10:50 a.m. portion of the class. NOT READY YET.

  3. Play the MATCHING GAME and later on you will see how it is similar to the DICE throwing example that we did in class today (for the dieSymbol having 6 KeyFrames).
          Chapter 3
              o Matching Game
    
    Links to the Flash Game University games, including the CHAPTER 3 MATCHING GAME.


    IGNORE THE MATERIAL BELOW HERE - you have handouts, but we did NOT even get started on the following concepts today because of the review of Tuesday's IF THEN ELSE and addEventListener() concepts, along with the dice example taking precedence!
  4. Paddle Ball game that will be studied later. Note how the mouse movement determines where the paddle is. This could be done with left and right arrow keys too. Mouse or keyboard input for games? How do you do each one?

  5. Using Arrow Keys to play a game and move an object around on the stage.

  6. Decide which of the following three games you like the best:
          Chapter 3
              o Matching Game
    
          Chapter 5
              o Air Raid
              o Paddle Ball
    
    Links to the three Flash Game University games.