FORUMS: list search recent posts

Preventing Buttons to show animation after mouse click

COW Forums : Adobe Flash

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Sergio Pol
Preventing Buttons to show animation after mouse click
on Mar 28, 2017 at 3:34:48 pm

Hello there, I think this must have been asked before but I searched the forums and couldn't find it. I have buttons with animated "over" states. The thing is that after a mouse click the button keeps showing its animation and I don't want that. My intention is that it shows that mouse over animation once and thats it. Is it possible? Thank you very much.


Return to posts index

Sam Mattern
Re: Preventing Buttons to show animation after mouse click
on Mar 29, 2017 at 1:50:43 pm

One way to accomplish it is to disable the button after the click, which will prevent it from working until you reenable it (based off an event, let's say). Try:
myButton.enabled = false;
It might not work depending on what components you are actually using.

-Sam


Return to posts index

Sergio Pol
Re: Preventing Buttons to show animation after mouse click
on Mar 30, 2017 at 6:22:32 am

Well that's something I could try. Too bad there's no other way. Thank you very much Sam.


Return to posts index


Sam Mattern
Re: Preventing Buttons to show animation after mouse click
on Mar 30, 2017 at 11:26:29 am
Last Edited By Sam Mattern on Mar 30, 2017 at 11:27:20 am

Well , there are other things. You can also remove the mouse handler for the button, but that would be harder to reenable. Or you can make a movie clip your button and use a variable to remember if it played already. Just depends on ultimate goal.

-Sam


Return to posts index

Sergio Pol
Re: Preventing Buttons to show animation after mouse click
on Mar 30, 2017 at 2:33:56 pm

Oh ok. It's cool to have options. I'm sticking to the first one you suggested though, I think I can make it work the way I need to. Thanks again Sam.


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2018 CreativeCOW.net All Rights Reserved
[TOP]