First time here? First time here? Newsletter Signup Newsletter
Login | Register | 651326 Members and growing!
Search tutorials
Author: IT is my name.
For this you need to know how to make Movie Clips, mess around the properties of text (change it to static, dynamic, and input) In this tutorial you will be makin a character, health, money, enemies, and talking to people. THE FLOOR: Okay draw your floor or terrain or whatever you want to call it. After you are done drawing the floor turn it into a movie clip. Go to the properties table of the ground and give it an instance name of "terrain". without quotations. _______________________________________Character: Draw your character. Now convert it to a movie clip. Press "OK". Now go to the properties and give it an instance name of "man" without the quotations. Now double click on the character to edit it. On the first frame's actions put the action


on the next few frames of the movie clip edit the character walking in place. Now double click on anywhere besides the character. Now the put these codes on your character.

onClipEvent (load) { gravity = 0.2; yspeed = 0; xspeed = 1; jumping = 0; } onClipEvent (enterFrame) { if (_root.go) { if (Key.isDown(Key.LEFT)) { if (!_root.terrain.hitTest(_x-_width/2, _y+_height/4, true)) { _x -= xspeed; } } if (Key.isDown(Key.RIGHT)) { if (!_root.terrain.hitTest(_x+_width/2, _y+_height/4, true)) { _x += xspeed; } } if ((Key.isDown(Key.UP)) and (!jumping)) { yspeed = -5; jumping = 1; } yspeed += gravity; while (_root.terrain.hitTest(_x, _y+_height/2, true)) { _y--; yspeed = 0; jumping = 0; } if ((!_root.terrain.hitTest(_x, _y+_height/2+1, true)) or (yspeed<0)) { _y += yspeed; } else { yspeed = 0; jumping = 0; } } } onClipEvent (load) { scale = _xscale; } onClipEvent (enterFrame) { if (key.isdown(key.right)) { this._x += 10; _xscale = scale; play(); } if (key.isdown(key.left)) { this._x -= 10; _xscale = -scale; play(); } }

health system: Make a red rectangle. On the properties table have the width at 100. That is important. Select the red rectangle. turn it into a movie clip and now put the name as "hpBar" BUT!!!!!!!! where it says registration put it to the middle left. IMPORTANTTTT!!!!!! Now add this code to the health bar.

onClipEvent (enterFrame) { this._xscale = _root.hp; if (_root.hp<=0) { _root.hp = 0; if (_root.hp<=100) { _root.hp = 100; } } }

ENEMIES: Draw your enemy and make it a movie clip. name it "enemy1" also put the registration point as the middle one. Now double click on the movie clip and animate him moving or whatever you want.What the code does is that when the character hits the man the health bar goes down. Also when you are close to the enemy if you press SHIFT key, the enemy dies. Add this code to the enemy. onClipEvent (enterFrame) { if ( { _root.hp--; } } onClipEvent (enterFrame) { distance = 55; ux =; uy =; hx = this._x; hy = this._y; if (Math.sqrt((ux-hx)*(ux-hx)+(uy-hy)*(uy-hx))onClipEvent (enterFrame) { if ( { _root.score += 10; unloadMovie(this); } } Talking to people: Draw the person you want talking to him. Make it a movie clip. Put these actions in the person

onClipEvent (enterFrame) { distance = 55; ux =; uy =; hx = this._x; hy = this._y; if (Math.sqrt((ux-hx)*(ux-hx)+(uy-hy)*(uy-hx))_____________________Where it says PUT WhATEVER YOU WANT IN HERE! well... go to expert mode and look for that scripting. and well just put whatever you want there.

» Level Basic

Added: 2008-02-27
Rating: 2.96 Votes: 49
(10 being the highest)
» Author
Make sure you read all of the instructions.
» Download
Download the files used in this tutorial.
» Forums
More help? Search our boards for quick answers!


  • 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: work2survive
» Title: Girl Walking 1kb
» Description: Walking girl, animation just takes 1kb, using high heels shoes, and fashion model attitude.
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.