CS223 Assignment 2: 2D and Movement
For each exercise, package the .fla and .as files as a zip file and upload it to Moodle.
The image below represents a snapshot of programmed movement containing a car and a basketball.
The car drives from left to right at a fixed velocity. Once the car moves off the screen out of view, it should re-emerge on the left, to start its movement again.
The ball object rolls down the sidewalk from right to left. Once it moves off the screen, it should re-emerge on the right, to begin rolling down the side-walk again.
Inspect the symbols. Two instances of the Wheel are used to build the Car. Both Wheel objects must be programmed to rotate.
At a mimumum, the following AS3 classes must be constructed:
- A document class to serve as controller.
- Car
- Ball
- The image below represents a snapshop of programmed movement containing 16 instances of the Car class.
- Each car object should be assigned a random velocity and a random direction.
If the car object is moving right to left, the graphic will need to be flipped horizontally.
This can be done by using the scaleX attribute and assigning it -1.
- Once a car object drives off the screen, it must be repositioned so that it can start again with a different velocity.
- All car objects added to the stage must be stored in an array. Note: Arrays in JavaScript and AS3 can grow and shrink.
- Use AS3 classes for Car and the controller class to construct this exercise.
- The Fibonacci Flower below represents a snapshop of programmed animation containing 300-400 instances of a Petal class.
- Petal objects are added to the stage in intervals (ENTER_FRAME).
- Placement and rotation of each Petal object will be controlled by the Golden Ratio. Draw the Petal graphic any way you want.
- Use AS3 classes for Petal and the controller class to construct this exercise.