Copying images

Jeanne A. E. DeVoto jeanne at runrev.com
Sun Mar 17 06:21:00 EST 2002


At 2:22 PM -0800 3/15/2002, JohnRule at aol.com wrote:
>How can I make sure that when I copy an image (or button with an image) to
>another stack, the image actually goes with it? Do I really have to get the
>image information, and then manually copy the image, and make it invisible?

The way it works is that the icon property in a button refers to an image.
Whatever's in that image gets displayed; the image data itself isn't
contained in the button. (It's a little bit like the way referenced
controls work. If you create a player and specify a filename for it, and
then remove the file, the player can no longer display the movie because
it's not there any longer.)

As long as the image is going to be in some open stack file, the button
will be able to find it and you'll be OK. The safest way is to make sure
the image is in either the same stack, or a substack in the same stack
file; that way it's always guaranteed to be available when the button is
displayed.

A good tactic for most purposes is to create a substack to hold images used
as icons. You never have to open this substack, but since it's in the same
file it's available to the button. It makes editing relatively simple too,
since there are no invisible objects scattered around, and any images you
may be using are in one stack you can open and edit or add to whenever you
need to.

--
Jeanne A. E. DeVoto ~ jeanne at runrev.com
http://www.runrev.com/
Runtime Revolution Limited - Power to the Developer!





More information about the use-livecode mailing list