Copy link to clipboard
Copied
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.
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.
Copy link to clipboard
Copied
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?
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
upload your fla to a file server and post a link.
Copy link to clipboard
Copied
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
Yes, thank you. I will revise the code and label again. Hope it's fix the problem.
Copy link to clipboard
Copied
you're welcome
Copy link to clipboard
Copied
Thank you, after change put all the code in first frame and remove duplicate frame label, it's worked!
Copy link to clipboard
Copied
great!