1. Home
  2. Computing & Technology
  3. Animation

Animating with ActionScripts

By Adrien-Luc Sanders, About.com

4 of 7

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.

Explore Animation
About.com Special Features

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

Easy ways to connect two computers for networking purposes. More >

  1. Home
  2. Computing & Technology
  3. Animation
  4. Flash Animation Tutorials
  5. Animating with ActionScripts

©2009 About.com, a part of The New York Times Company.

All rights reserved.