home page icon Flash Bestiary / Physics / Springy Thingies
   

Springy Thingies

This movie is part of an ongoing project to simulate elastic motion and use it for animation. All the movies in this section use the same 'SpringSim.as' class to generate elastic motion. You can use this class to simulate elastics, fabrics, the surface of water, to create bouncy animated creatures, or to create unusual user interfaces, such as in my springy titles example.

During simulation any of the dots may be dragged around with the mouse. You may also move the red dot, which is otherwise fixed in place.

To make a new object, press the 'clear' button. You may build freestanding objects which are not connected to the red dot (deselect the red dot after you press the clear button).

When in build mode, click on a dot to select or unselect it. Click another dot to connect it to the previously selected dot with a spring.

Click a blank area to create a new dot. New dots are usually connected to the previously selected dot, if any. If no dots are selected, the new dot will be unconnected to anything.

The following keystroke shortcuts may be used:

  • BACKSPACE or DELETE will delete the selected dot.
  • F will toggle a dot between fixed (red) and unfixed (green).
  • Spacebar will toggle between build and simulate mode.
  • N will add a new dot at the mouse position.

The "draw curvy" button makes the shapes look more 'cartoony', but doesn't affect their motion.

Check back here for updates to this movie, as I'm actively adding improvements to it.

 

sourcecode iconDownload the flash project
book iconJim's Favorite Actionscript Books
wiki iconAsk Jim about Actionscript
Next: Sodaplay Dainty Walker

Having trouble opening the project? You may need to Upgrade to Flash MX 2004



Copyright © 2003,2004 by Jim Bumgardner. All Rights Reserved.        Leave Jim some feedback