Embedded Animations
The two simple demonstrations on this page show what can be done by combining scripted animation, as in our bouncing particle from the second week, with linear, frame-based, timeline animation. The sprite object used in both examples is a Movie Clip with an internal timeline containing 29 frames of animation, showing the rendered character walking (and talking on the phone).
In the first animation, our sprite simply paces back and forth, reversing direction at left and right boundaries. The pivot is actually a mirror-flip, accomplished by changing the scaleX property of the Movie Clip from 1 to -1, and vice versa. The lateral progress of the sprite is timed (3 px/frame entry) to make the walking action look reasonably realistic, avoiding the Michael Jackson moonwalk.
In the second example, our character strolls completely offstage, then reappears further down the screen. When she passes below the bottom edge, she reappears at top right, recycling the animation.
Example 1: Reversing sprite. See Embed_V1.fla and walkSpriteClass.as
Example 2: Descending sprite. See Embed_V2.fla and walkSpriteClass_2.as
The character animation was rendered in Poser 7 and exported as a series of still images (PNGs).
See the Code Resources page for source files, listed under 9-15-09.
|
|