Game Development Reference
In-Depth Information
Figure 12-1 . “Create Keyframes from Selection” creates Sprite Frame animation keyframes on the currently
selected sprite node
Because Create Keyframes from Selection is a context menu item, you'd expect it to apply
at any time—but apply to what?
In fact, this menu item works only if you have an open CCB file and have selected a sprite
node. The menu item will do nothing if the selected node isn't a sprite node, or if you
have multiple sprite nodes or no sprite nodes selected. There's no feedback in those cases
whatsoever. You'll just notice that the command didn't add any keyframes.
So open the PlayerSoftBody.ccb in the Prefabs folder, and then select the root node
labeled CCSprite as seen in Figure 12-1 .
Make sure the Timeline Cursor is moved to the far left. Then select the three player-an-
im#.png images, right-click to bring up the context menu, and select Create Keyframes
from Selection .
You'll notice that three sprite frame keyframes have been added to the Timeline. If you
play this animation, you should see the player close his eye lids.
Caution At the time of this writing, SpriteBuilder had an issue with keyframes
on a CCB's root node: A root node's sprite frame keyframes could not be selec-
ted. I had to manually add each sprite frame animation keyframe one by one,
moving the Timeline Cursor into the desired keyframe position before issuing
the Create Keyframes from Selection command on an individual player-an-
Search WWH ::




Custom Search