Animation Part III: Interactive Multimedia Authoring with Flash Flash: Tweening “Computers and Creativity” Richard D. Webster, COSC 109 Instructor Office: 7800 York Road, Room 422 | Phone: (410) 704-2424 e-mail: webster@towson.edu 109 website: https://tigerweb.towson.edu/webster/109/index.html
In this lecture, you will learn: the types of tweening: classic tween motion tween shape tween how to create tween animation how to animate an object following a custom path
Tweening To create movement and changes of visual content over time, without having to manually create the content frame by frame The computer interpolates the changes between 2 keyframes
To Create Keyframes in Flash Method 1: Select a frame on timeline Choose Insert > Timeline > Keyframe Method 2: Right-click (Windows) or Control-click (Mac OS) on a frame on timeline Choose Insert Keyframe
Types of Tween in Flash Classic tween (called Motion tween in Flash CS3 and prior) Motion tween Shape tween
Motion (Classic) Tween vs. Shape Tween Motion and Classic Tween Shape Tween Works with symbols only Works with shapes only Not changing the shapes Morphing the shapes Cannot have more than one symbol in a frame of the same layer Can have more than one shapes in a keyframe, but the result is unpredictable Can be tweened to follow a path that is drawn as a stroke Does not work with motion guide Tweened frames are colored blue (Motion tween) or purple (Classic tween) on timeline Tweened frames are colored green on timeline
Classic Tween Example
Example of Classic Tween A leaf is created as a Graphic symbol, and placed on the stage.
Example of Classic Tween Keyframe at frame 1
Example of Classic Tween Keyframe at frame 20: The leaf is repositioned, rotated, and scaled bigger.
Example of Classic Tween Keyframe at frame 60: The leaf is repositioned again, rotated, and scaled smaller.
Example of Classic Tween Result after applying classic tween to the keyframes: 60 frames But only 3 keyframes to specify the leaf's position, rotation, and size. The computer interpolates the positions, rotation, and size of the leaf between keyframes.
Properties of a symbol instance that can be tweened using Classic tween Position Rotation Width Height Color Opacity
Motion Tween Example
Example of Motion Tween A leaf is created as a Graphic symbol, and placed on the stage.
Example of Classic Tween Keyframe at frame 1
Example of Classic Tween Keyframe at frame 20: The leaf is repositioned, rotated, and scaled bigger.
Example of Classic Tween Keyframe at frame 60: The leaf is repositioned again, rotated, and scaled smaller.
Properties of a symbol instance that can be tweened using Motion tween Position Rotation Width Height Color (Classic tween) Opacity (Classic tween)
Shape Tween Example
Example of Shape Tween Keyframe at frame 1: A shape of the letter "I" in blue
Example of Shape Tween Keyframe at frame 15: A heart shape in pink
Example of Shape Tween Keyframe at frame 40: A shape of the letter "U" in green
Example of Shape Tween Result after applying shape tween to the keyframes: 40 frames But only 3 keyframes to specify the shapes. The computer interpolates the shapes between keyframes.
Properties of a shape that can be tweened in shape tween Position Rotation Width Height Color Opacity Shape
Troubleshooting If a Classic or Shape tween sequence is working correctly: an solid-line arrow in timeline If a Classic or Shape tween sequence is working correctly: a dash line in timeline
Possible Causes for Tweening Problems Multiple symbol instances in the same keyframe Classic tween applied to shapes Shape tween applied to symbol instances A mix of symbol instances and shapes in the same keyframe
Tween a Symbol to Follow a Path
Tween a Symbol to Follow a Path Motion path for Motion tween Motion guide for Classic tween
Motion Guide
Motion Guide Allows an object to follow a path that you draw as a stroke Works with symbols, not shapes Note that the color and width of the path in the motion guide do not matter
To Create Animation with Motion Guide Create keyframes like you would create a classic tween animation Create a motion guide layer for the tween animation: In the timeline, right-click (Windows) or Control-click (Mac OS) on the motion tween layer. Choose the option of motion guide In the motion guide layer, draw a path (using pencil or pen tool) in one single stroke. Do not create multiple strokes. For each keyframe of the tween animation, drag the symbol instance to snap on the path.
Returning to the leaf animation to make it follow a more complex path Motion Guide Example: Returning to the leaf animation to make it follow a more complex path
Example of Motion Guide A classic tween sequence with the leaf is created using only 2 keyframes.
Example of Motion Guide A motion guide is created for the classic tween layer.
Example of Motion Guide A complex path is drawn in the motion guide layer using the Pencil tool.
Example of Motion Guide The leaf in frame 1 (first keyframe) is snapped to the beginning of the path.
Example of Motion Guide The leaf in frame 60 (last keyframe) is snapped to the end of the path.
Example of Motion Guide Result: 60 frames of animation The leaf follows the path drawn in the motion guide layer
More About Motion Guide The color and width of the path do not matter. The motion guide is automatically hidden when the movie plays. In the example: Only 2 keyframes are used but it can have more than 2 keyframes. The leaf is snapped to the two ends of the path, but it can be snapped anywhere along the path.
Motion Path for Motion tween
Motion Path A motion path is automatically generated for each Motion twee span.
Motion Path Can be edited like a stroke using Selection and Subselection tools
Motion Path Can also be a custom-drawn stroke To apply a stroke as the motion path for a Motion tween: Copy the stroke Select the Motion tween span on the timeline Paste the stroke
Interactive Multimedia Authoring with Flash: Animation Flash: Mask
Mask Defines areas to reveal its linked layer (maskee layer) The content in a mask layer can be thought of as a hole that lets the underlying maskee layers show through. In other words, the mask item acts as a window that reveals the area of linked layers that lie beneath it. The rest of the mask layer conceals everything else on these linked layers
Mask a mask original mask effect
To Create Mask Effect On the timeline, arrange the maskee layer immediately below the layer that you want to be the mask layer. On the timeline, right-click (Windows) or Control-click (Mac OS) on the mask layer, and select Mask.
Mask Effect Example Spotlight Effect
Mask Effect Example: Spotlight Effect
Mask Effect Example: Spotlight Effect Maskee content Maskee layer
Mask Effect Example: Spotlight Effect Mask content:black circle Mask layer
Mask Effect Applied by locking the mask layer
More About Mask Effect The resulted mask effect can be seen on the stage by locking the mask layer. The mask effect always shows when you do a Test Movie, with or without unlocking the mask layer. Don't forget to unlock the mask layer when you want to edit the mask layer.
Mask Effect Example X-ray Effect
Mask Effect Example: X-ray Effect maskee layer(s) mask layer, immediately above the maskee layer(s) Right-click on it, choose "Mask" to make it a mask
Mask Effect Example: X-ray Effect 57 maskee layer(s) Resulted mask effect mask layer, immediately above the maskee layer(s) Right-click on it, choose "Mask" to make it a mask 57
Mask Effect Example: X-ray Effect Add a bottom layer of a man Result 58
If you create a tween animation of the x-ray bar (the mask), then you get
Mask Effect Example Appearance Effect
Mask Effect Example: Appearance Effect Maskee layer: Contains only the little alien
Mask Effect Example: Appearance Effect Mask layer: Contains only the light beam
Mask Effect Example: Appearance Effect Mask effect is applied by locking the mask layer. Note: The mask does not always show up.
Mask Effect Example: Appearance Effect Blue beam layer: Overlay the blue beam by adding it on another layer because we want to see the blue beam.
If you tween the height of the blue beam (both the mask and the blue beam on the extra layer), then you get