// As the actionscript is put
inside the mc, "this" refers the the mc on
the timeline the code is in.
//
So by association references
the the mc "mc1" as it is inside it.
onClipEvent(enterFrame){
this._x += 10;
this._y += 20;
}
// The code "_x +=10 " adds
10 pixels to the x position and "_y+=20"
adds 20 piexels to the y position of the movie clip.
// Since both of these commands are inside the "onClipEvent(enterFrame)"
function it is called every time the animation
// enters
a new frame.
// The code when viewed as a whole tells the movie
clip it is inside the move 10 pixels to the right and
20 pixels down
// every time the movie enters a new
frame creating 2d motion.
|