Skip to main content
George Bernard
Inspiring
January 22, 2021
Answered

Animated button run Movie Clip of down state when hover

  • January 22, 2021
  • 1 reply
  • 1000 views

Hello everyone,

I am making animated button. When click on the button, it changed color slowly and have effect bounce. I did it using MovieClip in down state.

The thing is, when I click on the button and later hover on it. The movie clip run again. How can I prevent it? My button's hover state is just image. I don't know why it's happened.

Please help.

    This topic has been closed for replies.
    Correct answer kglad

    Here the fla.

    https://drive.google.com/file/d/1YlAmE0Eq4h7N6qlSJ9kpmqW1cw4cGPyX/view?usp=sharing


    you have more than one problem.

     

    first, you have duplicate frame labels. 

    second, you have code spread across multiple frames which is causing problems as soon as you change main timeline frames.

     

    i suggest you rethink you design and put all code (other than this.stop(), this.play() etc) on the first frame of your project.

    1 reply

    kglad
    Community Expert
    Community Expert
    January 22, 2021

    if you have a button (and not a movieclip button) with a movieclip on the down state and one (or two) static image(s) in the out and over states (and something in the hit state), you would only see the movieclip play when you mousedown on your button AND kept pressing down.  as soon as you mouse up, the movieclip would no longer be visible and the over state (assuming you didn't drag out) would be what you'd see.

     

    is that what you see?

    George Bernard
    Inspiring
    January 23, 2021

    Yes, I have movie clip on down state and picture on hover. I attached my video to show you.

    As you can see, only the first time work. Next time I hover, MovieClip run with out click.

     
    kglad
    Community Expert
    Community Expert
    January 23, 2021

    upload your fla to a file server and post a link.