|
|
Flash dodge ball game part 3 character advanced movingIn this tutorial we will make our little game character a bit more alive, we will make his legs, and body move when he walks, just for the fun of it. 1. I named mine joe, so when we refere to him, we will say _root.joe 2. We are going to animate joe in frame 2, so when we want him to walk we just jump to frame 2. (confused?, try to stay with me). 3. double click this movie clip to get into its timeline, now we need to animate it a bit, so what i did was to make him normal in frame 1, then make a new keyframe in frame 2, and drag his left leg a bit up as shown in the image below. 4. 5. Now you can go back to the root stage in flash. 6. So click joe and go to the actionscript panel, there should be some code from our previous lessons. onClipEvent (keyUp) { This tells flash that when a key is up (have been pressed but is now up) then the joe movie clip should go to frame one, (the one that is not animated to walk). 7. if (Key.isDown(Key.UP)) { Add in the following if (Key.isDown(Key.UP)) { 8. Now you are done, you can download the source code here. Part 1 Part 2 Part 3 Part 4 Part 5 Part 6 Part 7 |




