- Project Unit 2-A
- Project Unit 2-B
- Project Unit 3-A
- Project Unit 3-B
- Project Unit 4
- Project Unit 5
- Project Unit 7
- Project Unit 8
Unit 2–A Project—Conditional Statements (If/Else Statements)
This project checks to see which
of a set of conditions are met by clicking the "Check Condition" button.
The possible set of conditions to be compared are:
Condition 1: If the rotation and the y-positions are both the
same.
Condition 2: If the rotation is not the same, but the y-positions
are both the same.
Condition 3: If the rotation is the same, but the green boarder2_mc
is higher than the red boarder1_mc.
Condition 4: If the rotation is not the same, and the green
boarder2_mc is higher than the red boarder1_mc.
Condition 5: If the rotation is not the same, but the red boarder1_mc
is higher than the green boarder2_mc.
Condition 6: If the rotation is not the same, and the red boarder1_mc
is higher than the green boarder2_mc.
Condition 7: No conditions are met and none of the conditions
are true.
NOTE: The original project had us create a "Trace Statement" to show the answer within Flash, but for this portfolio piece, I changed the code so the file will generate the answer as dynamic text.
Unit 2-B Project—Conditional Statements and Loops
This project was to learn how to create a code loop to generate multiple instances of a MovieClip class, and automate the placement, alpha, rotation and the scale of the instances in the Flash movie.
Unit 3–A Project—Random Math (A)
This project is for learning to creating a code that generates five MovieClip instances of a deck of 52 cards (4 suits of 13 each, plus the back of a card). The goal of the project was to create five instances of a MovieClip, each of which uses the buttonMode property, and the addEventListener() method to respond to a MouseEvent.CLICK to respond to a function that generates a random number, by using the Math.random() function and the appropriate “rounding” function to produce the desired results, which are:
- The numbers must be whole numbers.
- The numbers generated must be from 2-53, inclusive.
- The numbers generated must be used as the frame parameter of the
gotoAndStop() method.
Unit 3B Project—Random Math (B)
This project was a variation of Project 3-A, but with some differences. This project is for learning to create code that generates two different MovieClip classes, one for a blue deck of cards and one for a red deck of cards. The projext goal was to create five MovieClip instances of the blue deck of 52 cards (4 suits of 13 each, plus the back of a card), and create five MovieClip instances of the red deck of 52 cards (4 suits of 13 each, plus the back of a card).
There is also a MovieClip instance of a button that uses the buttonMode
property, and the addEventListener() method to respond to a MouseEvent.CLICK
to respond to a function that generates ten (10) random numbers, by
using the Math.random() function and the appropriate “rounding” function
to produce the
desired results, which are:
- Each of the numbers must be whole numbers.
- Each of the numbers generated must be from 2-53, inclusive.
- Each of the numbers generated must be used as the frame parameter
of the gotoAndStop() method.
Unit 4 Project—Importing External Text
This project demonstrates the use of external files for adding content to swf file, and apply formatting to text in a scrolling text field that might be used in a word game or web page. As a Flash game developer, the ability to load external files as content in a swf is important as it is timesaving to edit, it makes the best use of screen real estate, and is another skill that is needed to create a variety in presentation.
I created two instances of a button symbol, each of which uses the addEventListener() method to respond to a MouseEvent.CLICK call a function that changes the TextField.scrollV property. One of the functions decrements by one, while the other increments by one. There is a 200 px by 200 px text field that is positioned on the stage 175 px from the left corner of the stage and 100 px from the top, with a border, and has word-wrap. This text field displays unformatted text loaded from an external file (“external.txt”) and is then formatted within the ActionScript as “Verdana” 10 pt blue font with 1px of letter spacing.
Unit 5 Project—Memory Game
This project builds on the fundamental concepts to learn how to create games in AS3. The task of this project is to create a memory card game in which the placement of the cards on the table is randomized fopr each new game. I used external class ActionScript (.as) files to place the instances on the stage, randomize the placement of the card instances, and the code also turns the cards back over if there is no match, and then lock them in place when there is a match.
Unit 7 Project—Puzzle Game
This project involved creating a drag-and-drop interactive puzzle game. The following features are included:
- Creates a Drop-and-Drag Class
- Detects Collisions
- Responds to Collisions
- Detects a Win
- Employs the Use of Drop Shadows on the Puzzle Pieces
- Random Placement of the Puzzle Pieces on the Stage
Unit 8 Project—Sound Control
The project consisted of creating a SWF file that loads and communicates with an external sound file and controls the sound volume. The code controls the following:
- A button that starts the sound playing and only visible when the sound is not playing
- A button that stops the sound from playing
- If the sound was stopped, the play should begin at the beginning of the sound
- A button that pauses the sound and is only visible when the sound is playing
- If the sound is paused, the play continues from the point where the sound was paused
- A button to increase the sound’s volume
- A button to decrease the sound’s volume

