Apply Spring to a Motion
An A-flat played on a guitar sounds different from an A-flat on a trumpet. The note may be the same, but the differences in overtone and timbre make music beautiful and endlessly entertaining. Motion in the real world is like a symphony orchestra. A pencil, a feather, and a cooked noodle may move the same distance and arrive at the same resting point, but the subtleties of their motion are entirely different. Your audience subconsciously recognizes these differences. When you want to fine-tune motion's subtleties in Flash, turn to the Spring properties: Strength and Damping, which you find in the Properties panel when you select an IK Bone.
Here's a simple experiment that shows how Spring works. If you want to skip the first few steps for creating a rectangle shape with bones, use the file 09-5_Spring_Settings.fla from the Missing CD (www.missingmanuals.com/cds).
Choose File→New→ActionScript 3.0.
A new Flash document opens.
Select the Rectangle tool (R) and then make sure object drawing mode (J) is toggled off.
A simple shape works great for this demonstration.
In the Properties panel, set Stroke to None and Fill to a color of your choice.
Again, simplicity works just fine.
Draw a skinny, horizontal rectangle across the top of the stage, as shown in Figure 9-15.
In this animation, one side of the rectangle drops to the floor. The shape of the rectangle and the fluidity of the motion changes depending on the Spring properties.
Figure 9-15. You apply Spring properties ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access