First time here? First time here? Newsletter Signup Newsletter
651326 Members and growing! | Flash Jobs
Search tutorials
Author: sspskater | Website: http://www.ffguardians.cjb.net

Making a Animated Controlling Character

First thing you want to do is make your starting of the game title screen, starting movies, whatever just do that first. Then when get to the part where you want the player to begin, that?s where you start the character.

step 1: Put a still image of the character down on the frame. Press F8 if it is highlighted already and select Movie Clip and name it something. Now right click on it and select edit. Now you are within the frames of the image it?s self.

step 2: Right click on the 2nd frame select insert blank keyframe and put an animated gif of the character walking downwards frame should have a stop( ) action.

step 3: Do the same for the animated movements going right, up, and left make sure to give the frames stop actions.

step: Now click on the main link to go back to the main movie. And highlight the still image to put key commands so the user can movie with the character.

copy and paste this code:

Code:

------------------------------------------------------------------------------------------------------------------------
onClipEvent (enterFrame) {
if (Key.isDown(Key.DOWN)) {
this._y = this._y+10;
gotoAndStop(2);
}
if (Key.isDown(Key.UP)) {
this._y = this._y-10;
gotoAndStop(4);
}
if (Key.isDown(Key.RIGHT)) {
this._x = this._x+10;
gotoAndStop(3);
}
if (Key.isDown(Key.LEFT)) {
this._x = this._x-10;
gotoAndStop(5);
}
}
-------------------------------------------------------------------------------------------------------------------------

Assuming that you did it exactly what I said and put the animated gifs in this order: down, right, up, then left. You wont have to edit the code otherwise edit so each key goes to the correct frame.

And there you have it an animated controlling character. There are more codes you need to put in of coarse to have a smooth character movement, but this is the basics. Download the fla if you need to.

» Level Basic

Added: 2002-07-17
Rating: 4.92 Votes: 202
(10 being the highest)
» Author
I would also like to credit all the flash kit members to help with the info.
» Download
Download the files used in this tutorial.
» Forums
More help? Search our boards for quick answers!

Comments

  • There are no comments yet. Be the first to comment!

  • You must have javascript enabled in order to post comments.

Leave a Comment
  • Your email address will not be published. All fields are required.
Featured Flash FLA
» Author: doc_chin7
» Description:

The flash's horizontal road drive was done in CS4 and was upgraded to CS6. The car responds to right/ left key and flash will auto-generate the movement of roads from left-right or right-left based on random number. Have fun driving in this virtual environment and avoid other cars... :) If you are creative, a road driving game can be created from it.

Featured Sound Loops
Image for equalize

Audio Player

» Author: BoxCat
» Title: CPU Talk
» Description: From the cyberpunk RPG, "Nameless: the Hackers" Completely Free to use! Keywords: edm hip hop rap electronic mysterious mission hacking chase exciting spy ios ambient chilling love happy sad angry suspense
Latest Font
» Author: Fábio FAFERS
» Description: I created this font for free use. Everyone can apply it in personal or business texts. Its free, but I want to be communicated in case of business use. Donations are accepted to keep the project of free fonts alive! Thank you all
Featured Sound Fx
Image for equalize

Audio Player

» Author: nathan
» Description:

A recorded sound of the Dimensional Fork Gate.