Storing Images for later use within the program
Posted: Thu Jun 27, 2013 7:56 pm
Hi,
I'm working on a project where I need the ability to select images and store them for use later. I have the code in place to select the images and store them in a variable. I can then have the image display in an image area on the same card as the button used to select it.
The problem I have is when I try to display the image (stored in a variable) in an image area on a different card in the stack
The code I'm using in the button is as follows
and the image displays perfectly in "Image 2"
however, when I try to have the image display on the next card in an image area nothing happens. The code, which is on the card script, is as follows:
Also, I'll eventually have multiple images that will need to be displayed within image areas and these images will have to change using randomization and was going to store them in an array to make working with the code easier. I just need to get the image displaying properly for now so I will worry about that later.
any help anyone can offer would be greatly appreciated.
I'm working on a project where I need the ability to select images and store them for use later. I have the code in place to select the images and store them in a variable. I can then have the image display in an image area on the same card as the button used to select it.
The problem I have is when I try to display the image (stored in a variable) in an image area on a different card in the stack
The code I'm using in the button is as follows
Code: Select all
on mouseUp
answer file ""
put it into targetArray
if there is a file targetArray then
put targetArray into field "Field"
set filename of img "Image 2" to targetArray
end if
end mouseUp
however, when I try to have the image display on the next card in an image area nothing happens. The code, which is on the card script, is as follows:
Code: Select all
on openCard
set the filename of img "Image" to targetArray
end openCard
any help anyone can offer would be greatly appreciated.