First time here? First time here? Newsletter Signup Newsletter
Login | Register | 651326 Members and growing!
Search tutorials
Author: Chris Lawlor | Website:

First things first
To understand this tutorial properly, it's best to have a basic knowledge of hte "_root." action and Clip events such as "mouseDown" and "mouseUp". If you have a basic knowledge of these actions this turorial should be easy to understand :). You should switch your actions panel to "Expert Mode" if it isn't already. Don't forget to name all the objects in the instance, the symbol name doesn't really matter.

The Mallet Cursor
In this section, were going to make an interactive mallet cursor, when the left mouse button is pressed down, the mallet will swing down, when it is released, the mallet willl return to it's originak position.


First of all, you'll need to draw your self a simple mallet, it should just have a handle and the head. You can paint it any funky colour you want :).


Convert the drawing into a Graphic, call it whatever you want, I called mine "M".


select the mallet graphic on the stage and convert it into a Movie Clip, you can call it whatever you like. Go back to scene 1 on the stage and select the instance name box of the movie clip. Call it "mallet". Right-click the movie clip and add the following actions to it:

onClipEvent (load) {
	startDrag(this, true);


Now here's the fun bit, double click the mallet movie clip to access it's timeline. On the first frame of the movie clip, write the action:


On the next few frames, create a small animation of the hammer swinging downwards, you can add a sound if you like. On the last frame of the animation, put the action as:


After the second stop frame, create another small animation of the mallet swinging back up to it's original position, the position must be the same as it it at the start of te movie clip, the best way to make sure of this, is to go back to the first frame of the movie clip and press CTRL+C on the mallet graphic, and te go back to the last frame, right click anywhere on the stage and select "Paste In Place" from the menu. On the last frame of the hammer swinging back up animation, write the action:



Go back to the main timeline and create an invisible movie clip at the side of the stage where it cannot be seen when the movie is exported, you can put anything you like because nobody can see it, I just drew a square. Convert your shape into a movie clip, it doesnt amtter about the instance name or symbol name because it is only used for script.

Add the following actions to the movie clip:

onClipEvent(mouseDown) {

Just underneath that write the following:

onClipEvent(mouseUp) {

You'll notice that i've left te gotoAndPlay frame number blank, in the space, you have to put the frame number that is the starting frame of your mallet swinging back up animation.


Now you're done! There you have your very own mallet cursor. Hope you enjoy it. :)

» Level Intermediate

Added: 2003-08-13
Rating: 6 Votes: 33
(10 being the highest)
» Author
Feel fee to use my tutes 4 anything u want, dont 4get 2 visit my site if ya can
» 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.