Author Topic: FlxButton execute callback function twice or more?  (Read 820 times)

hima

  • Member
  • **
  • Posts: 96
  • Karma: +0/-0
    • View Profile
    • My Dev Blog
Does this happen to anyone? Sometime my FlxButton execute the callback twice or more on one click. It's really annoying and sometime causes strange bug in the game.

I'm thinking that it might be me a mistake on my part, but I decided to ask just in case someone has experienced the same thing. If it isn't flixel, then could you please help me figure out what could be the cuase of this?

I've made sure that there is only one instance of the button exist on the State. I think it happens when I switch state back and forth.

zez

  • Active Member
  • ***
  • Posts: 203
  • Karma: +0/-0
    • View Profile
    • Devlog
Re: FlxButton execute callback function twice or more?
« Reply #1 on: Sat, May 15, 2010 »
I actually just havent used FlxButtons at all, so no help there, but you could probably get around it by using a counter, and only firing the event when the counter is zero.