You could do that if you need the card, but you don't need to that just to have icon images referenced.
You can use any icon of any other stack provided both stacks are in memory, and you load the one which references them.
LiveCode will first look for a referenced image in the stack that refers to it. If not found it'll look in other open stacks (in load order, IIRC).
And you'll want to use high IDs. Many lower IDs are either used by LC or just risk a likelihood of conflicting with another image in another stack.
Use images of a stack in another stack
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
-
- VIP Livecode Opensource Backer
- Posts: 10043
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: Use images of a stack in another stack
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: Use images of a stack in another stack
You say you have a few images only. So copy the images from card x of stack A to card y of stack B and you are done.
jmburnod (Jean-Marc) already described above a way to do this by script.
You could also simply select the needed images on the source card (of stack A), copy, go to the destination card (of stack B) and paste.
(Copy the images, don't copy the buttons. Else there may arise reference problems.)
jmburnod (Jean-Marc) already described above a way to do this by script.
You could also simply select the needed images on the source card (of stack A), copy, go to the destination card (of stack B) and paste.
(Copy the images, don't copy the buttons. Else there may arise reference problems.)
shiftLock happens
Re: Use images of a stack in another stack
There was this nugget from the 'tips' stack that I have been playing with, which goes along with what Richard was talking about ~
Create a library of images
You don't need to open a stack to display an image from it. Just create a blank button and set its icon property to the ID property of the image. You can display images from any stack in memory--even if the stack isn't open!
To store images, create a substack of your main stack and place an image on each card of the substack. This makes it easy to scan all the images while keeping them in a separate window.

Re: Use images of a stack in another stack
I also mentioned this on page 1, Mr. steel-trap-memory. 
