storing images

mark mitchell cowhead at mac.com
Tue Feb 4 11:56:01 EST 2003


Judy wrote:

> Yes, there are many different ways of doing one thing; problem is, it
> doesn't matter if they're all equally inelegant/non-intuitive.
>
> Maybe it's the non-assembly code programmer in me, but it's just not 
> clear
> why, once you've embedded something, you have to re-embed it with each
> usage.  This is just nuts.  This results in bloatware.
>

I finally understand this thread.  I couldn't figure out how "set the 
icon of button 1 to myImage" could possibly be described as inelegant 
(especially relative to HC's resource fork and pict external).  But it 
sounds like some people are under the impression that setting the icon 
of a button to an image 're-embeds' the image.  It doesn't.  The button 
just references the image within the stack.  So you can reference the 
same imbeded image in a hundred different buttons without increasing the 
memory requirements much.  I remember there was a big thread on this 
about a year or so ago.  Just make a single card or substack called 
'myImages' and stick all your images there.  You'll find they are much 
more accessible than in HC's resource fork.  One trick, if you want the 
image to display with a border, depending on button type and settings, 
you may have to resize it to a little smaller than the button (the 
height/width - 15)  prior to display.

PS.  the throbbing buttons in the pre-beta on OSX are just too cool!

mark mitchell
Japan




More information about the use-livecode mailing list