1. Home
  2. Computing & Technology
  3. Animation

Creating Random Motion with Flash ActionScripts and Math.random

By , About.com Guide

4 of 8

Insert an onClipEvent handler:

onClipEvent (enterFrame) {
}

The reason that we’re using onClipEven(enterFrame) is so that every time the movie re-enters the single frame that the clip is on, it’ll change the position.

Explore Animation
About.com Special Features

Holiday Central

What to eat, where to go, fun things to do and how to save money on the perfect gifts. More >

Family Tech Center

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

  1. Home
  2. Computing & Technology
  3. Animation
  4. Flash Animation Tutorials
  5. Creating Random Motion with Flash ActionScripts and Math.random

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

All rights reserved.