Transparent

Richmond Mathewson geradamas at yahoo.com
Thu Feb 5 14:45:39 EST 2009


Thank you Wilhelm Sanke for you scripting advice.

Working from your advice I wrote the following script:

on mouseUp
  put top of group "gX" into TOPP
  put bottom of group "gX"  into BUM
  put left of group "gX"  into LEFTT
  put right of group "gX"  into RITE
   put LEFTT & "," & TOPP & "," & RITE & "," & BUM into fld "fRECT"
  put fld "fRECT" into FRECT
  put the windowID of this stack into WINDY
  set the fileType to empty
     export snapshot from rect FRECT of window WINDY to img "HOLDER" as PNG
     set the alphaData of img "HOLDER" to the alphaData of img "TRANS"
     export img "HOLDER" to file "GOTTIT.png" as PNG
end mouseUp

where the group "gX" contains an odd-shaped image and a transparent 
button.

Everything works well until:

     set the alphaData of img "HOLDER" to the alphaData of img "TRANS"

which makes ALL of the image "HOLDER" transparent!

sincerely, Richmond Mathewson.


____________________________________________________________

A Thorn in the flesh is better than a failed Systems Development Life Cycle.
____________________________________________________________


      



More information about the use-livecode mailing list