Skip to main content
Inspiring
10月 26, 2012 1:54 午前 UTC
質問

Button stuck in over state on iOS

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!

このトピックへの返信は締め切られました。

返信数 3

Inspiring
10月 26, 2012 12:01 午後 UTC

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
10月 26, 2012 3:26 午前 UTC

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.

翻訳
flextnet作成者
Inspiring
10月 26, 2012 12:14 午後 UTC

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).

翻訳