
this.addEventListener(Event.ENTER_FRAME,frames);
function frames(e:Event): void {
star.rotation=star.rotation+1;
}
We have told Flash to execute a function called frames every time the ENTER_FRAME event occurs. The code in the function gives a new value to star.rotation that is one more than its current value.
This says that the function frame receives an argument named e that is type Event.
The colon followed by the word void means that the function does not return anything.
The body of the function, the lines of code that are executed, are enclosed between { and }
Experiment: Modify the code to subtract 1 instead of adding 1. Change the 1 to a 3 or 5.
Debugging: If you star does not spin, but rather looks like it is in orbit, the registration point is not in the center. You can move the registration point by double clicking on the star and moving the drawing so that the + is in the middle. If it still doesn't work, open the finished movie and check carefully to find what you did wrong.