1. import an image, but do not show it
2. create a copy of that image
3. cut a specific rectangle from that image
4. assign the snippet to a button's icon
Following is a little tester that I wrote:
Code: Select all
on mouseUp
put the width of button "b1" into w
put the height of button "b1" into h
create image "skin"
put image "test.jpg" into image "skin"
crop image "skin" to 50, 50, 50+w, 50+h
-- future: manipulate image "skin" further (apply gloss and reflection effects)
set the icon of button "b1" to image "skin"
end mouseUp
Suggestions and pointers will be much appreciated.