At this point in the game, Jiro has added enemies to the game. The enemies are being dynamically attached to the Stage based upon information being loaded from an XML file. The XML file specifies what enemy of four possible enemy types to load.
In this movie, Jiro explores how to simulate a gravity effect. He discusses this topic in theory and applies the theory to a generic object outside the game. Later he will look at how to apply these concepts to one of the enemies within the game.

Figure 5. Gravity overview
In Lesson 3 of the DVD course, several functions were written to handle the loaded XML data and, in turn, display the appropriate enemy on the Stage in the proper location. In this movie, Jiro adds the required code to animate one of the specific enemies, the Bouncer, with the effect of gravity.

Figure 6. Creating the bouncing enemy
Now that the Bouncer enemy is animating properly, you're ready to move on to the next enemy. The next enemy you want to animate is one of the spaceships. The goal is to animate this ship so that it bobs up and down. In order to achieve this effect, you must use trigonometry, so in this movie Jiro provides you with a quick overview of that subject.

Figure 7. Trigonometry primer
In this movie, Jiro takes the concepts discussed in the last lesson and applies them to a MovieClip object to create realistic movement.

Figure 8. Applying trigonometry to animation
For more information about Flash animation and game development, check out these resources:
You can also take the full Flash 8 Game Development class on the Train Simple website, either as part of their online training subscription service or for purchase in DVD-ROM or CD-ROM format.