CSE 190m Flash Sessions: Homework 2

Due Friday, April 29th for 1 early day

Provided files:

You will be creating the following animated planet and moon simulation:

(Requires Flash Player to view)

The moons (white) have a gravitational force applied to them which causes them to circle the planet (red). We are providing you with the file GravityMain.as with some skeleton code. You must modify GravityMain.as and additionally write a new class, Moon.as. GravityMain.as is the document class for the program.

Moon.as

The Moon class represents a single moon which can orbit around the center planet. The planet should have an x and y velocity associated with it. It has the following methods:

GravityMain.as

The following functions have already been written for you in the GravityMain.as file, but you must make some modifications to them: