Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8561125
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T16:25:55+00:00 2026-06-11T16:25:55+00:00

I made a custom cursor -as a hammer and want to run an animation

  • 0

I made a custom cursor -as a hammer and want to run an animation when I click the button. When the user clicks any buttons, hammer will hit(hammer) the button. I used 2 key frames in Cursor() class to make hammer animation and use several ways to implement it in my program -like gotoAndStop(), play() etc. But nothing works…

So, if you show me a way to solve this problem, I’ll be very appreciated.
Here is my code:

var menuCursor:MovieClip = new Cursor();
Mouse.hide();
menuCursor.mouseEnabled = false;
addEventListener(Event.ENTER_FRAME, cursorMenuMove);
menuCursor.gotoAndStop(1);
function cursorMenuMove(event:Event )
{
    menuCursor.x = mouseX;
    menuCursor.y = mouseY;
}

.
.
.

howToImageOn.addEventListener( MouseEvent.CLICK, run1HowTo );

.
.
.

function run1HowTo( event:MouseEvent )
{
       menuCursor.gotoAndStop(2);
   //    or   menuCursor.play();
    whackSound.play(0,1);
    menuMusicChannel.stop();
    howToImageOn.removeEventListener( MouseEvent.MOUSE_OUT, howTo1Out );
    playImageOff.removeEventListener( MouseEvent.MOUSE_OVER, play1Over );
    creditsImageOff.removeEventListener( MouseEvent.MOUSE_OVER, credits1Over );
    removeChild( playImageOff );
    removeChild(howToImageOn);
    removeChild( creditsImageOff);
    removeChild( menuCursor );
    gotoAndStop( "HowToPlay" );
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T16:25:56+00:00Added an answer on June 11, 2026 at 4:25 pm

    I solved the problem using this code:

    stage.addEventListener(MouseEvent.MOUSE_DOWN, down);
    stage.addEventListener(MouseEvent.MOUSE_UP, up);
    
    function down(e:MouseEvent){
        menuCursor.gotoAndStop(2);
    }
    
    function up(e:MouseEvent){
        menuCursor.gotoAndStop(1);
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I made a custom popup , when the user click a button in the
I made my custom view and I want to add view.button, so I made
I made a custom cursor using this tutorial . Problem is, as soon as
I followed the other questions on StackOverflow and made custom User Templates. Instead of
Recently I've made custom CSS only (imageless) checkmarks and radio buttons. I've used this
I'm not sure if these are custom made buttons or if they are standard,
I made a custom button with some panels and pictureboxes. With the MouseEnter and
Working on iphone splash screen, I have made custom animation with the help of
Made a custom post type, Events, great. Now I want to get a second
I made a custom LabelItemRenderer, inside it I want to give some additional style

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.