When you create a new object, the BlackBerry® Composer adds to the current frame a property key for every animatable property as well as an object handle. Before adding each object, consider where you need keys and select an appropriate frame. Until you add another key for a property, however, the property will remain static; its value will remain unchanged for every frame in the timeline. To animate a property you must add at least one additional key somewhere along the timeline.
You can add new property keys in one of two ways:
- Selecting property at a specific frame, then right-clicking and selecting Add a Key. A new key will be placed on the key editor.
- Select a new frame in the animation key editor, then change the value of one or more of the object’s animatable properties. For example, creating an object in one location in frame 1 will add an object handle and keys for each of the properties. If you then select frame 10, then reposition the object on the canvas, a new key will be added for the object’s Translate property at frame 10 on the key editor.
Adding a key serves to set the value of a property at a specific frame. Remember that for every frame between two key frames for a property, the BlackBerry Composer interpolates a value based on the interpolation parameters you select in the tweening editor (or based on a linear, even progression if no interpolation parameters have been selected). If you change which frame you place a property key in (that is, if you move the property key forward or backward along the timeline), the value of that property is recalculated for every frame between the new position of the key and the other key frame.
For example, if you set the fill color for an object to white in frame 1, and to black in frame 10, then for each frame in between, the BlackBerry Composer must determine the fill value of the object. Assuming you have specified no tweening, the change will be linear, with each frame getting 10% darker than the preceding frame, until the animation reaches frame 10 and the fill achieves a value of 100% black. If you then move the key specifying the end value to frame 20, then the BlackBerry Composer must recalculate the values for frames 2 through 19, with each frame now only 5% darker than the previous frame. However, if you fix the value at frame 5 by adding a key to the fill color property, and then move the end value to frame 20, the values for frames 2 through 5 do not change. The BlackBerry Composer must interpolate new values between frame 5 (40% black) and frame 20 (100% black).
By adding a key for every object property at a particular frame, you can fix the appearance and position of an object at a given point in the timeline of the animation.