This code is
executed once every time the animation enters a new
frame. As you can see the ball leaves the stage and
moves out of view. But by looking at the Actionscript
we can see that flash is still rendering the animation
even though we cannot see it.If you were
to put a trace() inside the function you will see in
the output panel that the code will run as long as the
swf is open (potentially forever).
Every time
the mouse is moved the a section of code is looped.This loop
repeats the code inside it five times.Since the
code inside is adding a number to the x and y coordinate
every time the mouse is moved the x moves by 5 pixels
and the y coordinate moves by 10 pixels.
This main timeline code performs
operation of adding values to the x and y co-ordinates
100 times. It is called and run automatically independently
of the frame rate.The animation occurs as fast as the
computer's processor will allow moving 200 steps and
then stopping. It happens so fast that all you see is
the final position of the object with the animation.