Select the side view or quarter-front view of your character for the walk cycle. Import your character as a .psd or .ai file; remember to import as "composition - retain layer sizes." This will create a composition that maintains your individual layers. Open the character composition. This will be a 16-frame animation, but we want to leave some space at the front of our timeline, so set your work area from 2 seconds to 2:16.
First you need to make sure the anchor points are in the correct places using the pan-behind tool (Y) - generally, you want the body parts to rotate at the joints, so arms rotate at the shoulder, head at the neck, etc. For some of you, if you have parts on different layers that you want to treat as one object, you may want to create pre-comps (nested compositions) for them.
Next, create your parent-child relationships. Fingers are parented to the hand, hands to forearms, forearms to upper arms, upper arms to torso, etc. If you have separate torso and hips layers, parent the torso to the hips. This will allow your character to bend at the waist. This will most likely make your hips layer the top parent layer – the “root” layer that everything is ultimately connected to. If this is the case, you may want to create a null object (Layer>New>Null Object) to parent the hips to. This will act as a sort of “master control” layer. Counterintuitively, when using this puppet pinning method, you don't want to parent the legs to anything, so they can move independently.
As you parent the layers to each other, test them out by rotating them with the rotate tool (W). If something looks wrong, check the location of the anchor point, the overall position of the layer, and the parenting order. Your layer stack should look something like the image to the left.
Remember that color-coding the layers can help you stay organized.
Now it's time to add your puppet pins to the body part layers. Using the Puppet Pin tool (CMD + P) and with the cursor at 2 seconds, select the front arm and place a pin at the shoulder, elbow, and hand of the arm. Turn off mesh visibility with the checkbox at the top.
Do this for each limb, as well as the body (top, middle, and bottom). This allows you to bend the limbs in an organic way, in addition to the properties of rotation and position, which we will also be using.
Before you start animating, make a copy of your main composition and call it rigBasic.
Start with the Up and Down position for the Body and Head; you need them to move up and down twice in one loop. Without moving anything, on the Body layer place keyframes for the Position at 2 seconds, 2:08, and 2:16. Place the cursor at 2:04 and move the body up slightly; copy/paste that keyframe at 2:12. Select all keyframes and Easy-ease them (F9). Set a Keyframe at 2 secs. for Rotation, then rotate the body slightly back on the Up positions (use copy/ paste or dial in rotation amount to get an exact loop), and add easing. The Head should also rotate back slightly and move up on the Up position; add easing.
Now it's time to animate the limbs. Select with the Front Arm; at 2 seconds, set a rotation keyframe so the arm is rotated back a bit for the beginning pose; add an additional keyframes at 2:16. At 2:08, the arm should rotate forward. Add easing. Do the same to the Back Arm with the positions switched.
Select the front leg and open up the Mesh 1 so that you can see the keyframes on the Puppet Pins. Move your cursor to the Up position, which is where the leg will be straightest, and add keyframes without changing anything. Move to 2:08 and use the Puppet Pins to bring the leg back slightly.
Move to 2:12 and use puppet pins to bring the knee forward and the foot up, as in the image to the left.
Move to 2:16 and move the foot and knee forward so it makes impact on the floor, as in the image to the right. This is also your first keyframe; copy/paste it at 2 seconds. Select all keyframes and add easing.
Now, you'll do the same thing to the back leg, using the front leg as a guide to make it look exactly like the front - this is why we left room at the top of the timeline, so we can offset the legs. Once you have your puppet pins keyframed and eased, select them all and copy/ paste them over the last keyframe, so you have a doubled cycle. Select all the frames and move them backwards on the timeline so when the front leg is forward, the back leg is back (offset).
Finally, return to the arms and accentuate the movement. Select the Front Arm and select the Hand pin; pull it slightly forward at middle keyframe (2:08) and slightly back at the back positions. Add easing, and do the same for the Back Arm.
This is your basic walk cycle!