making stack self contained - auto import images?

J. Landman Gay jacque at hyperactivesw.com
Tue Sep 2 11:22:01 EDT 2003


On 8/29/03 12:59 AM, Rodney Tamblyn wrote:

> If you've created a stack which uses images you've copied in from other 
> stacks, is there any easy way to make this stack self contained (copy 
> all the images from other stacks it has referenced into it).
> 
>  For example: create stack 1, import image, make a button and set it's 
> icon to the image
> create stack 2, copy button from stack 1.  Button will display with 
> image (as image is available in stack 1).  Is there a standard way to 
> make this stack self contained importing the image button requires?
> 
> Put another way, is there any way to resolve an icon id and determine 
> exactly where the original object is?

You could run a script inside Stack2 that loops over all the images and 
checks their long ID. If the ID doesn't contain the short name of 
Stack1, it means the image is located elsewhere. In that case, issue the 
command:

  copy image ID <whatever> from stack "Stack1" to this card

That should bring them all over. If your images are not all located in 
Stack1, then you'd need to parse the ID to get the actual name of the 
stack the image is really in.

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




More information about the use-livecode mailing list