irregular shaped button

mark mitchell cowhead at mac.com
Wed Jan 8 13:47:00 EST 2003


Vikram wrote:

> Only the 'filled' portion will respond to the mouse action in this 
> case. Try
> making a filled oval, give it a simple script, set it's ink to noop, and
> click
> near the corners. It should not respond.

That's a nifty trick Vikram, works great!  Specifically, what Judy asked 
for (a 'states' game) could be done relatively easily this way. Import a 
nice colorful image of the USA map.  Next make a small graphic over a 
state.  Choose brush from paint tools and color the state.  You don't 
have to be too careful as no one will see it in the end anyway, and if 
the user clicks right on the border, well, you probably ought to give 
them a break anyway.  Now switch the ink to noop and you've got a nice 
'state' button.  Should take only about a minute or two per state (but 
you know how developers calculate time :-)

mark mitchell
Japan




More information about the use-livecode mailing list