Grab Me Fails on snapshot Images of fields which are transparent (opaque false)

Scott Rossi scott at tactilemedia.com
Sat Feb 6 00:51:14 EST 2016


You're correct -- anywhere the image is 100% transparent will not respond
to click/touch.  Here are a couple of workarounds:

1) Export your tile images from a group that includes a graphic behind the
field set to 1% opacity of the main color that appears where your tiles
will be placed (white is fine as well).  The 1% opacity included in the
snapshot will make the images respond to clicks.

2) Instead of dragging the image tiles around the card, use graphics.
Create an opaque graphic for each tile image, and set the backPattern of
each graphic to the id of each tile.  The graphics will take on the
transparency of the images, but will remain clickable.

Other folks here may have additional options.

Regards,

Scott Rossi
Creative Director
Tactile Media, UX/UI Design




On 2/5/16, 9:25 PM, "use-livecode on behalf of Sannyasin Brahmanathaswami"
<use-livecode-bounces at lists.runrev.com on behalf of brahma at hindu.org>
wrote:

> 
>I have a puzzle widget that is made by importing a snapshot of a field
>with words in it, then we make a copy of that images and repeatedly crop
>to each word.
>
>Now we have small image tiles.  Works great BUT
>
>Problem: The original field has a transparent background. which I am
>hoping to keep. And unexpectedly, the snapshot of the field seems to
>include the alpha channel for the background which is set to transparentŠ
>so you *can* see through the images.
>
> If you put ³grab me² into the
>
>on mousedown 
>   grab me
>end mousedown
>
>script of the image tiles created by this methodŠ you cannot grab the
>image ‹ either with the pointer mouse tool on desktop or your finger on
>mobile‹ unless you are in contact with the pixels of the letters of the
>word. Even though the rect of the image includes areas above, below
>beyond and obviously in between the lettersŠ if you contact any of those
>areas, you cannot drag, the image tile
>
>Am I wrong in thinking that the grab me message should be sent if you
>mousedown anywhere in the rect of the image?
>
>I confirmed this by setting the field with a colored background, then
>making the tilesŠ now you can move them around by  easily no matter where
>your finger or mouse contacts the image.
>
>work around of course is to set the background to the same color as the
>tilesŠ but what I really want is to be able to see through the tiles.
>
>If I wanted to test how would you do this: set the alpha channel of the
>background of these images to just a small valueŠ they would still be
>semi-tranparent, but perhaps grabme would see them as ³grabbable²
>throughout the entire rect?  How would you do that
>
>??
>
>BR 
>
>_______________________________________________
>use-livecode mailing list
>use-livecode at lists.runrev.com
>Please visit this url to subscribe, unsubscribe and manage your
>subscription preferences:
>http://lists.runrev.com/mailman/listinfo/use-livecode






More information about the use-livecode mailing list