Flash Templates Tutorials - Keyframe
Keyframe is a frame in which you define changes in the form and interlocation of objects involved in the process of animation.
When you create a frame-by-frame animation each frame is the keyframe. In tweened animation, you define the keyframes in important issues of animation and let Flash by itself to fill the content of frames between them. Flash displays the interpolated frames of tweened animation in Time-Line as marked with green or blue with an arrow between keyframes.
Keyframes containing any objects are displayed in the time-line as hatched black spots. Empty keyframes are displayed as not hatched circles. The first frame of each layer is always a keyframe. Content of simple frames of each layer (unless they are involved in tweened animation) always repeats the content of the previous keyframe.
To create a keyframe, you need to do the following:
* Select a frame, and then in the menu Insert - KeyFrame.
* Right click on the frame in the time-line, and select Insert Keyframe. (however it is better for this purpose to use F6 button).
* To create a number of keyframes: Select a few frames in a layer (this can be done by pressing the left mouse button, and without releasing it lead the pointer right or left) and press F6. In this example, two object of “symbol” type, located in different layers, there is the same way set for the movement in the process of animation.
To set the way of symbols movement in animation of "motion" type you should:
* In a time-line create a sequence of frames containing animation of motion type as described in paragraph Animation of group of objects and animation with the change of symbols properties
* Select from the menu Insert / Motion Guide. Right click on the layer name and select "Add Motion Guide" from the context menu - Flash will create a new level above the existing with the title "Guide: name of the existing layer and with a special icon on the left from the title. And the name of the existing layer will be shifted to the right - it shows that the layer has become a "slave"
* Use tools like pencil, line, circle, rectangle, or brush to set the desired path of motion. Pay attention to the pencil icon at the right from the layer title – you should draw the path in the layer Guide. In case in the properties of the keyframe you have an active "Snap to Guide" option, the symbol in all keyframes of animation in the slave layer is set automatically as its center (a cross) at the nearest point at the newly drawn line. At the keyframe of animation beginning move the symbol closer to the beginning of the path, and in the last frame - closer to the end
* If you want path lines, in which objects are moving, not to be displayed in the main movie clip, make the Guide layer invisible by clicking in the column below the eye image at the right from this layer title. If you now start animation, the symbol will move through a given path
* In addition to the notion of "direction of motion" there is a notion of “angle between the direction of motion and the basis of symbol”. In fact, this notion is not necessarily linked to the basis of symbol – if you take any part of the symbol (e.g. not the basis but the lower right corner), one may then define the angle between this part of the symbol and the line through which the motion is processed from the structure of “motion through a given path”in any keyframe.
As already mentioned, there is an interesting option of "Orient to Path Direction" in the properties window of the keyframe of the beginning of animation.
If it is active, then in he process of motion the angle between the direction of motion and "any part of symbol” will be saved (the simplest example of this option usage - a symbol in the form of an airplane can be made "flying" on a complex path with propeller ahead). In fact, everything is more complicated than simple "symbol orientation is always parallel to the direction of motion." In the process of animation with the motion through a given path with enabled "Orient to Path Direction" option, a symbol while moving smoothly alters the angle between its base and the direction of motion, starting from an angle set in the keyframe of beginning of animation and finishing with an angle set in the keyframe of the end.
To make the objects move in a set path from any layer, do one of the following actions:
* Drag the existing layer containing animation directly under the "motion guide" layer.
* Then just moved layer will automatically become a slave layer and all the objects from it will automatically stand through the path set in the leading layer.
* Create a new layer under the leading layer of “motion guide” type. Now, if you try to set motion animation in this new layer, all the objects will be moved through the given path. Select Modify / Layer, check the "Guided" box of the layer properties.
* Click on the name of the layer holding the Alt button. Thus the layer containing animation must be located below the layer of “motion guide” type.
To make the slave layer the usual one again, do the following:
* Drag this layer above the motion guide layer.
* Select Modify / Layer, and select the type "Normal". Click on the name of the layer holding the Alt button.