Issue with png images in group and "mouseup" detection
    Jim Lambert 
    jiml at netrin.com
       
    Sun Apr 20 19:10:14 EDT 2025
    
    
  
Bernd kindly posted this approach years ago:
> here is a little script that sets the alphaData (the data for transparency) just from 0 (completely transparent) to 1 (hardly noticeble less transparent).
> Sometimes one wants to stick to image nonetheless.
> 
> This only applies to images with transparent areas, usually png.
> 
> Transparent parts of your image will now get the mouse events.
> on mouseUp
>    put the alphaData of image "myImage" into tData
>    put the length of tData into tHowOften
>    put numToChar(0) into tTrans -- transparent
>    put numToChar(1) into tAlmostTrans -- almost transparent
>    repeat with i = 1 to tHowOften
>       if char i of tData = tTrans then put tAlmostTrans into char i of tData
>    end repeat
>    set the alphaData of image "myImage" to tData
> end mouseUp
Jim Lambert
    
    
More information about the use-livecode
mailing list