Storing images
Jim Hurley
jhurley at infostations.com
Wed Feb 5 08:15:00 EST 2003
>Jim Hurley wrote:
>
>
>> Perhaps "inelegant" isn't the word, but it can be cumbersome to set
>> the button icon to the image if you want to use different sizes on
>> different card. You need a preOpenCard handler on each card on which
>> the image appears in order to set the size of the image on that card.
>> (If you lock the position and size you needn't worry about the
>> location. That is held fixed. But you can reset the size through the
>> script even though the imaged is lock.)
Scott Rossi wrote:
>If I understand the intent of your comment, you should consider using
>groups. If you want an image to appear on every card, simply place it in a
>group whose backgroundBehavior is set to true. This way the image will
>appear on every card that contains the group with no preOpenCard necessary.
>If you want a card with no image, simply remove the group from that card.
>
Scott,
I'm afraid I didn't make myself clear. I was addressing the issue
in which the image appears on certain select cards, perhaps two or
three, *and* they are to be of different sizes. Under these
circumstances, referencing the image from the disk is the simpler
method; otherwise a preOpenCard script is necessary to rezise the
image stored in the icon.
> > A more elegant or less cumbersome solution (and idiot proof for the
> > end user) would be to embed the single images in some "secret" place
>> from which they might be referenced and a different size and
>> location for the image could be locked on each card.
>
>Again, a group is one solution. Or, place all your master images into a
>substack "library" and create images and/or buttons that reference the
>substack.
Thank you for this suggestion. A group wouldn't work for me--the
image is to be placed only on selective cards. But importing from a
substack might. How does one import the image from the subgroup to
the main stack? And may the image then be sized on each card in the
main stack when imported without appending a preOpenCard script?
>The methods for storing and displaying images in Rev/MC are actually very
>numerous. And with the recent introduction of PNG support, there's now
>almost nothing that Rev/MC can't handle. (Granted, my own wish is to have
>irregular masks for image display, but there are workarounds for this.)
>
>If anyone is running into a specific problem, post it to the list -- I'm
>sure one of the knowledgeable people here will offer a solution.
Thank you again; you have already offered possible solutions.
Jim
More information about the use-livecode
mailing list