|
-
You need to make your character into a separate movie clip, and name it - like 'cupcake' or whatever. Put it on its own layer in the main timeline.
Then make your controls into buttons, and put some script on them like:
To go left-
on(release){
cupcake._x-=20;
}
right-
on(release){
cupcake._x+=20;
}
Probably the best way to make the character jump is to edit its movie clip timeline. Put a stop(); on the first frame.
Open up the timeline (i.e. make it longer), and somewhere on it put in a key frame with the label 'jump'. Put a key frame on the character's layer (remember always to keep your frame code on a separate layer). Then you can do a bit of animation - motion tween or frame by frame. Make sure the character goes back to its original position at the end of the animation.
Then, on your jump button in the base movie, put in the code:
on(release){
cupcake.gotoAndPlay("jump");
}
The character clip will play the jump animation and then loop back to the first frame where the stop(); is.
There's obviously loads more you can do, but this should get you started. Check out the tutorials section for some more ideas.
Good luck
B
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|