Selecting Multiple Buttons in iOS

J. Landman Gay jacque at hyperactivesw.com
Mon Nov 28 18:53:02 EST 2011


On 11/27/11 8:28 PM, Randy Hengst wrote:

> I thought it would be nice to allow the user to select a button with
> a tap and then slide(swipe) to the right or left to select other
> buttons.

Create a script local variable to serve as a flag, and initialize it to 
false. When the first button gets a mouseDown, do its hiliting and set 
the flag variable to true. Write a mouseEnter handler that checks to see 
if the script local flag is true and if the target is one of the ten 
buttons in the row. If so, hilite that button. On mouseUp, set the flag 
to false so hiliting will stop.

The handlers should all be in the same script, probably the card script, 
so they can all read the flag status. There are other ways to do it but 
that's the easiest.

-- 
Jacqueline Landman Gay         |     jacque at hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com




More information about the use-livecode mailing list