Skip to main content
Known Participant
September 5, 2012
Answered

Buttons remaining in down state on IOS after touching them

  • September 5, 2012
  • 3 replies
  • 797 views

I am having an issue where my buttons are remaining in the down state after being clicked.

My app is being published in Flash CS6 with Air 3.4 for iPad only with rendering mode Auto.

My button is just a button where I have used a different graphic for each state.

I have tried each of the following events, all of which result in the same issue.


splashMC.optionsBtn.addEventListener(MouseEvent.CLICK, clickOptionsButton);

splashMC.helpBtn.addEventListener(MouseEvent.MOUSE_UP, clickHelpButton);

splashMC.testBtn.addEventListener(MouseEvent.MOUSE_DOWN, clickTestButton);

I do notice if I touch the screen away from the button after touching the button, the button returns to the correct up state. So it is almost as if it is not detecting the finger has been removed from the button until I touch elsewhere.

Is this a bug or a minsunderstanding on my behalf?

This topic has been closed for replies.
Correct answer Colin Holgate

Try to imagine where the cursor is after you have released the button. I believe that on iOS the mouse is effectively stashed away somewhere, but on Android the invisible cursor is left where it is. Or the other way around! That leaves the cursor as if it's still over the button.

So, make your over state look the same as your up state.

3 replies

Colin Holgate
Colin HolgateCorrect answer
Inspiring
September 5, 2012

Try to imagine where the cursor is after you have released the button. I believe that on iOS the mouse is effectively stashed away somewhere, but on Android the invisible cursor is left where it is. Or the other way around! That leaves the cursor as if it's still over the button.

So, make your over state look the same as your up state.

P StevenAuthor
Known Participant
September 5, 2012

Ah I see - I hadn't thought of that. I will give that a go now.

Thank you again Colin - I am glad you are around to answer my questions:)