Week 2 Day 4: Inheritance and Polymorphism

How the completed files work:
(To try out any of the following fly-throughs, make sure click once inside the one you want to try before pressing the keys. LEFT, RIGHT, UP, DOWN arrow keys to move around. Spacebar to fly up.)

File #1:

Use of inheritance and polymorphism to add some fun features to the 3D fly-through lab. Students, come up some new fun features to add to the game and propose how to apply inheritance and polymorphism to implement the features. Please discuss your ideas with me or Brent before coding.

 

File #2: May be multiple

Add sound and filters to your previous games.

File #3:

Write code to create an array. Then, randomly draw an item from the array, and trace out the item's index and content. No visuals needed on stage.

 

File #4:

LEFT, RIGHT, UP, DOWN arrow keys to move around. Spacebar to fly up.
Pressing more than one key smultaneously works, i.e. you can press the UP and Spacebar to fly forward.

 

 

 

File #5:

The racer is added to the 3D fly-through lab by applying inheritance and polymorphism.

 


Extra Effort #1:

Make the "tree" an animation. In this example, the little stick figure on the top of the mountain is animated.

 

Extra Effort #2:

Hitting a key (say, SHIFT) to give you a boost forward.

 

Extra Effort #3:

More than one graphic, randomly selected upon generation.
Note: The example shown below use animated graphic, but this particular extra credit does not require animated graphic.
The key is having more than one graphic and randomly selected.
(Hint: Think the hairstyle lab: how one hair movieclip can have multiple possibilities and how you control which possibility to show.)

 

Extra Effort #4:

Have a different object laid flat on the ground, such as the checker pattern of the starting line shown in the example below.
(Hint: Look up rotationX in ActionScript.)

 

Extra Effort #5: Image Carousel

Use a same image to make it rotate around.