Page 1 of 1
Displaying an image from another stack
Posted: Wed Aug 24, 2011 2:23 am
by Pebah
I have a main stack and also a substack that contains images. I want grab and display an image in the main stack from one that lives in the substack. I'm having trouble with the syntax to do this. The substack image control is reading from a binary file and has resized it. I want to use that modified version of the image.
Re: Displaying an image from another stack
Posted: Wed Aug 24, 2011 11:11 am
by Klaus
Hi Pebah,
use a button to display the image
Do this:
Go to your substack and note the ID of your image
Create a button (no border, no nothing, you can even DISABLE that button, since it should only display your image)
and set its ICON to the ID of the image in the substack via the "Inspector" paltette or script:
...
set the icon of btn "you button here" to 1007
## YOUR ID here of course!
...
Done
Best
Klaus
Re: Displaying an image from another stack
Posted: Wed Aug 24, 2011 2:34 pm
by jmburnod
Hi Klaus,
It is ok for display the image but an other point is how to grab the image from the substack to the main stack
I want grab and display an image in the main stack from one that lives in the substack.
Best from Geneva beach
Jean-Marc
Re: Displaying an image from another stack
Posted: Wed Aug 24, 2011 2:55 pm
by AndyP
Hi Pebah,
Try this:
In the main stack:
on openStack
put image id 1003 of stack "mysub-stack" into image id 1004 of this stack
end openStack
This assumes you have a sub stack named "mysub-stack" containing an Image with the id 1003 and an empty Image Area on your main stack of id 1004.
Re: Displaying an image from another stack
Posted: Wed Aug 24, 2011 4:19 pm
by Klaus
Hi Pebah,
oh, sorry, overlooked the GRAB part!
But Andy is correct, you can simply copy an image with
...
put img "name of img in substack" of cd X of stack "the substack" into img "the image on the current card"
...
Best
Klaus