Closed benkhachouch closed 7 years ago
To fix this I applied a more practical alternative that does the same as removing and adding the event listener.
I declared the sendButton as a private var at the top and set isEnabled
to false
when the message is sending, and back to true
when it has been sent or failed.
in ChatroomScreen
if (messageInput.text != "") { event.currentTarget.removeEventListener(starling.events.Event.TRIGGERED, sendMessage); ..