Flash animation overview: Difference between revisions

The educational technology and digital learning wiki
Jump to navigation Jump to search
m (Text replacement - "<pageby nominor="false" comments="false"/>" to "<!-- <pageby nominor="false" comments="false"/> -->")
 
(92 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Incomplete}}
{{Incomplete}}
<pageby nominor="false" comments="false"/>
{{Flash tutorial|CS3, CS4, CS5, CS6|beginner|}}
<!-- <pageby nominor="false" comments="false"/> -->


== Definition ==
== Overview ==
 
This is part of some [[Flash]] tutorials.


<div class="tut_goals">
;Learning goals:
;Learning goals:
:Learn about basic motion animation, i.e. move an object from A to B, to C ...
:Learn '''about''' the various methods to create animations in Flash
:Learn about timeline representations of the Flash Professional Interface (you can consult that later again)
;Prerequisites:
;Prerequisites:
:[[Flash CS3 desktop tutorial]]
:[[Flash CS6 desktop tutorial]] (or [[Flash CS3 desktop tutorial]] or [[Flash CS4 desktop tutorial]])
:[[Flash layers tutorial]] (first part)
:[[Flash layers tutorial]] (first part)
:[[Flash drawing tutorial]] (at least some of it)
:[[Flash drawing tutorial]] (at least some of it)
:[[Flash frame-by-frame animation tutorial]] (not absolutely needed, but probably useful)
; Next steps:
: [[Flash classic motion tweening tutorial]] (optional, CS3-style tweening for CS3 and better)
: [[Flash CS4 motion tweening tutorial]] (CS4, CS5, CS6)
: [[Flash shape tweening tutorial]] (all)
: [[AS3 TweenLite tweening engine]] (CS3-CS6, intermediate)
; Moving on:
: [[Flash CS4 inverse kinematics tutorial]]
: [[Flash animation summary]]
: [[Flash CS4 motion tweening with AS3 tutorial]]
: After these (or even before) you should be ready for interactivity. E.g. do the [[Flash button tutorial]]
;Quality and level
;Quality and level
: This text should technical people get going. It's probably not good enough for beginners, but may be used as handout in "hands-on" class. That is what [[User:Daniel K. Schneider|Daniel K. Schneider]] made it for...
: This is just an overview article.
: It aims at beginners. More advanced features and tricks are not explained here.
</div>
;Materials (*.fla file you can play with)
:http://tecfa.unige.ch/guides/flash/ex/motion-tweening-intro/


== Introduction ==
== Introduction ==


=== Frame-by-frame vs. tweening ===
'''Animation means changing properties of objects (e.g. position, size or color) over time.'''
 
In Flash, you can create several kinds of animations and associated special effects. To create motion animation, there are 2 options:
* Frame-by-frame animation (like they used to do for cartoons). This is very time consuming of course.
* Tweening. [http://en.wikipedia.org/wiki/Tweening Wikipedia], retrieved 20:45, 7 August 2007 (MEST) defines {{quotation|Tweening, short for in-betweening, as the process of generating intermediate frames between two images to give the appearance that the first image evolves smoothly into the second image. Inbetweens are the drawings between the keyframes which help to create the illusion of motion. Tweening is a key process in all types of animation, including computer animation. Sophisticated animation software enables one to identify specific objects in an image and define how they should move and change during the tweening process. Software may be used to manually render or adjust transitional frames by hand or use to automatically render transitional frames using interpolation of graphic parameters.}}. In other contexts, one uses also "morphing". E.g. [http://www.pcmag.com/encyclopedia_term/0,2542,t=tweening&i=53271,00.asp PCMag] (retrieved 20:45, 7 August 2007 (MEST)) defines tweening as {{quotation|An animation technique that, based on starting and ending shapes, creates the necessary "in-between" frames. See morphing}}.
 
=== Symbols Layers ===


Animated objects should be (graphic) symbols. To convert an object to a symbol use ''right-click''.
In Flash CS3 to CS6, you can create several kinds of animations and associated special effects. To create animations, there are several options:


You should use a different layer for each animation. If you plan to animate several of your objects, there is a practical shortcut to distribute each object to a new layer:
(1) '''Frame-by-frame animation'''
# Select objects you want to distribute (e.g. with ''right-click->select all'')
Frame by frame animation is an ancient technique used for cartoons. This leads to precise results but is time consuming, since you will have to draw each picture. See the [[Flash frame-by-frame animation tutorial]].
# Then, ''Modify->Timeline->Distribute to layers


So the principles is: Each object to be animated must be symbol in a separate layer. All the other objects can remain in a single layer.
(2) '''Motion tweening''' with the CS Flash authoring interfaces
[http://en.wikipedia.org/wiki/Tweening Wikipedia], retrieved 20:45, 7 August 2007 (MEST) defines {{quotation|Tweening, short for in-betweening, as the process of generating intermediate frames between two images to give the appearance that the first image evolves smoothly into the second image. Inbetweens are the drawings between the keyframes which help to create the illusion of motion. Tweening is a key process in all types of animation, including computer animation. Sophisticated animation software enables one to identify specific objects in an image and define how they should move and change during the tweening process. Software may be used to manually render or adjust transitional frames by hand or use to automatically render transitional frames using interpolation of graphic parameters.}}. In other contexts, one uses also "morphing". E.g. [http://www.pcmag.com/encyclopedia_term/0,2542,t=tweening&i=53271,00.asp PCMag] (retrieved 20:45, 7 August 2007 (MEST)) defines tweening as {{quotation|An animation technique that, based on starting and ending shapes, creates the necessary "in-between" frames. See morphing}}.


== Introductory example ==
In CS4/CS5/CS6, there exist two variants:


We will use the drawings made for the [[flash drawing tutorial]] and move one of the cats around.
# '''Classic motion tweening''' as known from CS3 and earlier versions. See the [[Flash classic motion tweening tutorial]]. You can skip this.
# '''Motion tweening''', a more oject-oriented method introduced in Flash CS4. See [[Flash CS4 motion tweening tutorial]]


The principle of motion tweening is quite simple:
(3) Shape animations
* Firstly define position of an object at two or more different times
* [[Flash shape tweening tutorial|Shape tweening]], since you can position key frames of shapes in different positions.
** We call these positions in time ''keyframes'', since objects are frozen in different states.
** Btw, you also can other features than position of an object in different frames.
* Then, apply some interpolation method (''tweening'') between the two keyframes.
** Simple motion tweening is a linear path.
** You can also apply a motion tween along a path (but this is bit more complicated).


=== Moving a cat from x to y ===
(4) '''Motion and shape tweening with ActionScript code'''


You may want to lock all other layers. This way you are sure not edit by mistake a frame for another layer.
There exist many different possibilities, e.g.


; Create a layer
* Using a third party library like the Greensocks [[AS3 TweenLite tweening engine]]. '''Must need to know''' for everyone who plans to create interactive educational scenarios.
* Select the layer with the object (graphic symbol) you want to animate, in our example we called the layer "Animation cat".
* Put an object inside, e.g. it drag from your library, or cut/paste or copy/paste from an other layer or *.fla document.


; Create a first keyframe
* Dynamically changing x and y positions of a display object over time, e.g. through using the Timer class. See the unfinished [[Flash games tutorial]] for an example.
* Right-click for example in position 5 and ''Insert Keyframe''
* You should still see the object you want to animate, move it to its starting point which can be outside the stage.


; Create a second keyframe
* Using the Adobe "fl.motion" classes. See the [[Flash CS4 motion tweening with AS3 tutorial]]
* Right-click somewhere in the timeline, e.g. at 50 and ''Insert Keyframe'' again.
* Drag the object to its final position which can be outside the stage again.
* The timeline for the layer including this object should now include a solid line with an arrow (if it is dashed something went wrong). See screen dumps below.


; Click on a random frame between the two keyframes
(4) '''Inverse kinematics'''
* Then in the properties panel, use the ''Tween'' pull-down menu and select motion. Alternatively, you can just right-click between frames and ''Create Motion Tween''.
[[image:flash-cs3-motion-tweening1.png|frame|none|Moving a cat]]


The result should look like this in the screen capture below:
* Inverse kinematics is the animation of armatures for shapes or connected symbols instances. See [[Flash CS4 inverse kinematics tutorial]]
* Between the two keyframes you see a solid line with an arrow.
* You should see your object somewhere in the middle of the two keyframes.


[[image:flash-cs3-motion-tweening2.png|frame|none|Moving a cat]]
== What can be animated with built-in motion tweening ? ==


; Test it
In Flash 9/10/11, you can animate all sorts of compound objects:
* ''Control->Test Movie''
* Symbols, i.e. any object that is an instance of a library object, e.g.
* Alternatively, you can glide (left-right) the red rectangle on top of the red line that displays the current frame in the timeline. It will manually move the object to a position within the interpolation path.
** Graphic symbols
** Movie clips
** Buttons
* Compound objects (things that you grouped together)
* Text boxes


; Make sure that all the static objects are displayed during the movie
The ground rules are the following:
* Motion animation means just changing x/y positions of an object over time. Of course during the motion path one also can change other properties, e.g. orientation, size and tint.
* With all built-in tools, an animation is usually done '''in a single layer''' with a '''single instance''' of something that sits in the library.
* With ActionScript it depends, but usually you also would use "heavy" objects like movie clips.


Objects from other layers that are only defined in frame 1 (the default) will not show anymore once the animations starts.
== Flash CS4/5/6 timeline representations of interpolations ==


In order to make these visible until the end you should do the following:
Adobe show different types of animations using the ''timeline'' in the following way: According to [http://help.adobe.com/en_US/Flash/10.0_UsingFlash/WS42406111-940D-4eff-A9F3-16EFDA4F1340.html Animation basics], (retrieved 11:17, 25 April 2010 (UTC))
* Rick-Click in frame 1 and ''Convert to keyframes'' (if layers are unlocked it should convert them all, else do it one by one).
* Then click on the little white rectangle inside the grey rectangle and drag each to the last frame of your animation. The result should look as in the screen capture above, i.e. each animation track is gray and at the end you see a white rectangle.


=== Adding more motions and shape tweens ===
* A span of frames with a blue background indicates a motion tween. A black dot in the first frame of the span indicates that the tween span has a target object assigned to it. Black diamonds indicate the last frame and any other property keyframes. Property keyframes are frames that contain property changes explicitly defined by you. You can choose which types of property keyframes to display by right-clicking (Windows) or Command-clicking (Macintosh) the motion tween span and choosing View Keyframes > type  from the context menu. Flash displays all types of property keyframes by default. All other frames in the span contain interpolated values for the tweened properties of the target object.
:[[image:an_motion_tween_span.png]]


; Several motion tweens for an object
* A hollow dot in the first frame indicates that the target object of the motion tween has been removed. The tween span still contains its property keyframes and can have a new target object applied to it.
You can add more motions to an object simply by repeating the procedure outlined above.
:[[image: an_motion_tween_span_no_target.png]]
* Add a new keyframe
* Right-click in the middle and add a motion tween


; Onion skins
* A span of frames with a green background indicates an inverse kinematics (IK) pose layer. Pose layers contain IK armatures and poses. Each pose appears in the Timeline as a black diamond. Flash interpolates the positions of the armature in the frames in between poses.
* You can display the path an object will take by clicking one of the onion skin buttons in the Edit toolbar. This is handy if you have several objects that move.
:[[image: an_pose_layer_span.png]]


; Turning the cat
* A black dot at the beginning keyframe with a black arrow and blue background indicates a '''classic tween'''.
* Turning a cat in the animation is not very graceful
:[[image: motion_tween-classic.png]]
* In this case I made an animation from left to right and the cat will leave the stage. Next to the end frame I made a new frame with the cat turned (Click on the cat and ''Modify->Transform->Flip Horizontal'')


The final result in the Flash Desktop should look like this (more or less):
* A dashed line indicates that the classic tween is broken or incomplete, such as when the final keyframe is missing.
[[image:flash-cs3-motion-tweening.png|frame|none|Moving a cat]]
:[[image: classic-motion_timeline_broken.png]]


You can also consult the published result (including the *.fla file which you can load into your Flash and play with)
* A black dot at the beginning keyframe with a black arrow and a light green background indicates a shape tween.
* http://tecfa.unige.ch/guides/flash/ex/motion-tweening-intro/
:[[image: shape_timeline.png]]


== Discussion ==
* A black dot indicates a single keyframe. Light gray frames after a single keyframe contain the same content with no changes. These frames have a vertical black line and a hollow rectangle at the last frame of the span.
:[[image: keyframe_timeline.png]]


I do have to say that I find the [[SMIL]]/[[SVG]] time-based animation model including it's interpolation mechanisms more elegant and simpler to understand. But then there are no such tools as Flash CS3 for these formats. A shame ...
* A small a indicates that the frame includes an associated script (created with the Actions panel).
:[[image: frame_script.png]]


== Motion along a path ==
* A red flag indicates that the frame contains a label. This allows for instance to write AS code like:
<source lang="actionscript">
''GotoAndPlay("label");''
</source>
:[[image: frame_label.png]]
* A green double slash indicates that the frame contains a comment.


(to be written)
:[[image: frame-commented.png]]


== Links ==
* A gold anchor indicates that the frame is a named anchor.
:[[image: anchor_tween.png]]


I strongly suggest that look at some of these videos.
== Credits and copyright modification ==
* [http://www.adobe.com/designcenter/video_workshop/ Video tutorials]
** Click in the top left window on "Flash CS3 Professional"
** Then view in particular "Creating animations with motion tweens" and "Understanding the timeline, keyframes and frame rate.


[[Category: Tutorials]]
{{copyrightalso|Some contents of this page (including pictures) have been taken from Adobe's [http://help.adobe.com/en_US/Flash/10.0_UsingFlash/index.html Using Flash CS4 Professional], in particular [http://help.adobe.com/en_US/Flash/10.0_UsingFlash/WS42406111-940D-4eff-A9F3-16EFDA4F1340.html Animation Basic]. You also must quote this source according to the [http://creativecommons.org/licenses/by-nc-sa/3.0/ Attribution-Noncommercial-Share Alike 3.0 License] that is used by both Adobe and Edutechwiki}}
[[Category: Multimedia]]
[[Category: Authoring tools]]

Latest revision as of 17:29, 22 August 2016

Overview

Learning goals
Learn about the various methods to create animations in Flash
Learn about timeline representations of the Flash Professional Interface (you can consult that later again)
Prerequisites
Flash CS6 desktop tutorial (or Flash CS3 desktop tutorial or Flash CS4 desktop tutorial)
Flash layers tutorial (first part)
Flash drawing tutorial (at least some of it)
Flash frame-by-frame animation tutorial (not absolutely needed, but probably useful)
Next steps
Flash classic motion tweening tutorial (optional, CS3-style tweening for CS3 and better)
Flash CS4 motion tweening tutorial (CS4, CS5, CS6)
Flash shape tweening tutorial (all)
AS3 TweenLite tweening engine (CS3-CS6, intermediate)
Moving on
Flash CS4 inverse kinematics tutorial
Flash animation summary
Flash CS4 motion tweening with AS3 tutorial
After these (or even before) you should be ready for interactivity. E.g. do the Flash button tutorial
Quality and level
This is just an overview article.

Introduction

Animation means changing properties of objects (e.g. position, size or color) over time.

In Flash CS3 to CS6, you can create several kinds of animations and associated special effects. To create animations, there are several options:

(1) Frame-by-frame animation Frame by frame animation is an ancient technique used for cartoons. This leads to precise results but is time consuming, since you will have to draw each picture. See the Flash frame-by-frame animation tutorial.

(2) Motion tweening with the CS Flash authoring interfaces Wikipedia, retrieved 20:45, 7 August 2007 (MEST) defines “Tweening, short for in-betweening, as the process of generating intermediate frames between two images to give the appearance that the first image evolves smoothly into the second image. Inbetweens are the drawings between the keyframes which help to create the illusion of motion. Tweening is a key process in all types of animation, including computer animation. Sophisticated animation software enables one to identify specific objects in an image and define how they should move and change during the tweening process. Software may be used to manually render or adjust transitional frames by hand or use to automatically render transitional frames using interpolation of graphic parameters.”. In other contexts, one uses also "morphing". E.g. PCMag (retrieved 20:45, 7 August 2007 (MEST)) defines tweening as “An animation technique that, based on starting and ending shapes, creates the necessary "in-between" frames. See morphing”.

In CS4/CS5/CS6, there exist two variants:

  1. Classic motion tweening as known from CS3 and earlier versions. See the Flash classic motion tweening tutorial. You can skip this.
  2. Motion tweening, a more oject-oriented method introduced in Flash CS4. See Flash CS4 motion tweening tutorial

(3) Shape animations

  • Shape tweening, since you can position key frames of shapes in different positions.

(4) Motion and shape tweening with ActionScript code

There exist many different possibilities, e.g.

  • Using a third party library like the Greensocks AS3 TweenLite tweening engine. Must need to know for everyone who plans to create interactive educational scenarios.
  • Dynamically changing x and y positions of a display object over time, e.g. through using the Timer class. See the unfinished Flash games tutorial for an example.

(4) Inverse kinematics

What can be animated with built-in motion tweening ?

In Flash 9/10/11, you can animate all sorts of compound objects:

  • Symbols, i.e. any object that is an instance of a library object, e.g.
    • Graphic symbols
    • Movie clips
    • Buttons
  • Compound objects (things that you grouped together)
  • Text boxes

The ground rules are the following:

  • Motion animation means just changing x/y positions of an object over time. Of course during the motion path one also can change other properties, e.g. orientation, size and tint.
  • With all built-in tools, an animation is usually done in a single layer with a single instance of something that sits in the library.
  • With ActionScript it depends, but usually you also would use "heavy" objects like movie clips.

Flash CS4/5/6 timeline representations of interpolations

Adobe show different types of animations using the timeline in the following way: According to Animation basics, (retrieved 11:17, 25 April 2010 (UTC))

  • A span of frames with a blue background indicates a motion tween. A black dot in the first frame of the span indicates that the tween span has a target object assigned to it. Black diamonds indicate the last frame and any other property keyframes. Property keyframes are frames that contain property changes explicitly defined by you. You can choose which types of property keyframes to display by right-clicking (Windows) or Command-clicking (Macintosh) the motion tween span and choosing View Keyframes > type from the context menu. Flash displays all types of property keyframes by default. All other frames in the span contain interpolated values for the tweened properties of the target object.
An motion tween span.png
  • A hollow dot in the first frame indicates that the target object of the motion tween has been removed. The tween span still contains its property keyframes and can have a new target object applied to it.
An motion tween span no target.png
  • A span of frames with a green background indicates an inverse kinematics (IK) pose layer. Pose layers contain IK armatures and poses. Each pose appears in the Timeline as a black diamond. Flash interpolates the positions of the armature in the frames in between poses.
An pose layer span.png
  • A black dot at the beginning keyframe with a black arrow and blue background indicates a classic tween.
Motion tween-classic.png
  • A dashed line indicates that the classic tween is broken or incomplete, such as when the final keyframe is missing.
Classic-motion timeline broken.png
  • A black dot at the beginning keyframe with a black arrow and a light green background indicates a shape tween.
Shape timeline.png
  • A black dot indicates a single keyframe. Light gray frames after a single keyframe contain the same content with no changes. These frames have a vertical black line and a hollow rectangle at the last frame of the span.
Keyframe timeline.png
  • A small a indicates that the frame includes an associated script (created with the Actions panel).
Frame script.png
  • A red flag indicates that the frame contains a label. This allows for instance to write AS code like:
 ''GotoAndPlay("label");''
Frame label.png
  • A green double slash indicates that the frame contains a comment.
Frame-commented.png
  • A gold anchor indicates that the frame is a named anchor.
Anchor tween.png

Credits and copyright modification