1. Technology
You can opt-out at any time. Please refer to our privacy policy for contact information.

Animating with ActionScripts


All that the current script does is set the starting point, though. Now we need to add new scripts to move the symbol away from the starting point, one frame at a time. Since we’re only working with a single frame, but causing Flash to cycle over that same frame 12 times per second (12 fps standard frame rate for the web), that means that we need to tell Flash to do something each time it passes over that frame again. For that we’ll need another onClipEvent.

onClipEvent (load){
this._x = 10;
onClipEvent (enterFrame) {

Using enterFrame does exactly what I described above: it checks the functions inside the onClipEvent each time the movie cycles over a new frame, or the same frame repeatedly.

©2014 About.com. All rights reserved.