Making a Walking Character
Okay let’s begin, we will start by making all the layers that we need, these are the layers that you will need, a layer named actions, button and character. On the actions layer right click on the first frame, select the option actions. This will bring up a screen where actions will be placed. This is what you need to put on the first line:
1.Stop();
What this does is stops the flash movie at this frame. The reason we have done this is because we want to put a button on this layer that will start the flash movie, and without writing stop(); the movie will continue playing without it stopping where the button is. Let’s start by making a button. On the first and only frame of the button layer, draw out a rectangle or an oval, now grab the text tool making sure the text is a different colour than the text, this can be changed via the properties inspector which was explained in a previous tutorial. Now change the text size to a size that will fit in the oval or rectangle, and write start in the text box. Now place this text on top of the circle or rectangle. Now select the whole button and convert it to a symbol. Now this time we are not going to convert it to a graphic, we will be converting it in to a button, give it the name start or whatever you will recognize it by. Now we must also add some simple actions to this button, to do this right click on the button, and select actions, now on the first line put in the following:
on (release) {
gotoAndPlay(2);
}
Here is what this will do:
On(release) = this means that it will do the actions when the mouse is clicked and released on the button.
{gotoAndPlay(2));
} = As this is in front of the on(release) it will when the button has been pressed go to the second keyframe represented by (2) and play from there.
Here is this code translated to English.
On(release) {
gotoAndPlay(2);
} “Actionscript”
When the mouse is clicker is (released) {go to the second keyframe and play it from there} “English”
Ok now let’s move on the character. Start by going to the menu item insert, than select new symbol. Check the box next to movieclip, than name it character.
Now up where it says scene 1, next to that, it will say character, what you have done is entered the characters timeline, which is where we will be creating the walk. To enter any symbols timeline, simply double click on it. Now back to where we were. On the first frame, draw out a very simple character, I suggest to start off with just a simple stick figure until be get the hang of creating the characters walk.
Now insert a new keyframe in the 3rd keyframe, in this third keyframe delete the legs and the legs only. You can do this by clicking on one of the legs, than by holding shift, click on the other leg as well, than delete them both at the same time, or just delete them separately. Okay, in frame 3 is what we want the character legs to look like when he is in the middle of his first step. What we want to do is turn on onion skin. Onion skin is located under the frames, you will see a few little icons, scan through them until you find onion skin, than click on it.
Now a faded picture of what the legs looked like on frame 1 will appear, this will help to keep the legs the same size and to figure out where to put these next legs.
Now imagine stand up and take a few steps, what you want to do is get a very basic idea of the way your legs move when you walk. You should only end up creating about 3-4 separate legs. It is a good idea to skip one frame when inserting a new keyframe so that the characters legs don’t move to fast.
Now when you have got the second pair of legs in, create another pair using the same process. Now when you have the walk ready, turn off onion skin by clicking on it again. Note: you want the legs on the last keyframe to look fairly similar to the legs on the first keyframe.
Now up where it says scene 1 and character, click on scene 1. This will take you back in to the main timeline. Now in the library you will see the movieclip character, click on it once, now a picture of you little man will appear in the library window, in the right corner of this window will be a play button, click on this, and your character will start the walk you made.
In the character layer insert a keyframe in frame 2, then drag your character into the second keyframe and position him off a bit to the right of the stage, make sure he his facing the left way, if not right click on him and select free transform. Now click an hold on the left box that appears around your and drag it to the right, this will flip your character around, similar to a mirror.
Now at frame twenty insert another keyframe in the character layer, in frame 20 drag your character off to the right of the stage, now create a motion tween.
That is it, press ctrl enter, the start button will come up on the screen, when you press on it, the movie will start. You are progressing really well, congratulations. Please move on to the next tutorial.
No comments:
Post a Comment