Skip to main content
Inspiring
October 26, 2012
Question

Button stuck in over state on iOS

  • October 26, 2012
  • 3 replies
  • 853 views

Hi

I have some simple buttons on the stage on an iPad app. I notice when I touch those buttons they stay stuck in the 'over' state. At first I thought they were stuck in the down state, but after removing 'down' frames on those it seems it's definitely the 'over' state.

I wonder if there's some easy way to force the button back into the 'up' state or to avoid the problem altogether?

The app needs to be both web and iPad so I don't want to get rid of the mouse over states.

Thanks!

This topic has been closed for replies.

3 replies

Inspiring
October 26, 2012

As Colin said, I would avoid having an "over" state for buttons on a smartphone/tablet platform. If you don't want to create new buttons, maybe add a conditional to your button class for iOS/iPad platform to ignore the mouse over?

Colin Holgate
Inspiring
October 26, 2012

If you think about how you release the screen with your finger, the effective cursor is still on top of the button you touched. The simplest solution would be to have different buttons for the web version.

flextnetAuthor
Inspiring
October 26, 2012

Thanks for the reply- I see what you mean about cursor position. It seems the SimpleButton is really not up to the task for touch screens then. On native iPhone apps there is a behavior where you see the down-state on touch, and then it returns to the up-state when letting go. To do this in Flash we would need to use a MovieClip in which we can control the current frame based on MOUSE_DOWN, MOUSE_UP (since we can't set the state on a SimpleButton).