Featured FLA
» Author: Bugra Ozden
» Title: Skatalog v9 - product catalog
» Description: Create your product catalog easly and publish on your website or Create your image gallery, documents list, portfolio. Fully XML Driven
» More by Bugra Ozden
Featured Site
» Posted in the Flash Kit Links section
» Title: Creative DW Image Show PRO
» Description: Creative DW Image Show PRO is a Dreamweaver extension which enables the user to create multimedia presentations. It combines the features of the popular Creative DW Image Show with the ability to add professional text effects to slides (similar to After Effects). The product is very customizable: the user can choose the duration of the transition effects, the slide motion start and end position, zoom and panning type for both images and texts.
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.