image library

J. Landman Gay jacque at hyperactivesw.com
Fri Oct 28 15:40:01 EDT 2011


On 10/28/11 1:28 PM, edward cawley wrote:
> I'll try to make it clearer what I'm trying to do. I have some
> HyperCard stacks which have a number of cards with graphics on them.
> I opened them in LiveCode with no problem. The graphic images were
> converted with no problem and are in the "image library" (accessed
> through the development menu item)of the converted stack. The script
> of the converted stack needs a lot of modification so I started a new
> stack and have scripted several cards to serve as templates. I would
> like to transfer the "image library" of the old (Hyper Card) stack to
> the new LiveCode stack so I can reference the images into the cards
> of the new stack, instead of moving the images from the old stack
> card by card. They have already been converted from the HyperCard
> resource fork. I other words I would like to import the old "image
> library" into the new stack, but where do I find the "image library"
> in the converted HyperCard stack or how do I export the old "image
> library" into the new stack from the old converted stack. I hope that
> is a little clearer.

The library you see in "This Stack" is not a real library. It is 
generated on the fly for every stack you open, and does not exist on 
disk anywhere as far as I know. What you are seeing is a dynamic 
compilation that disappears when you close the stack. That means there 
is nothing to copy.

You could write a little handler that loops through the cards, and then 
loops through all the images, copying them to the new stack. Each HC 
card will have no more than 2 images; there will be a background image 
or a card image, or neither, or both. Knowing that in advance will make 
it easy to script because you know exactly what to look for. Check for 
the existence of background image 1, and if it exists, copy it. Do the 
same for card image 1.

If you have a lot of cards and stacks, I don't think I'd do what you're 
doing though. Instead, I'd delete all the scripts in a copy of the 
stack, leaving all the objects and images intact. Then I'd rescript the 
clone.

-- 
Jacqueline Landman Gay         |     jacque at hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com




More information about the use-livecode mailing list