I have one that has me stumped. I was creating a small picture demo to explore different aspects of handling, well, pictures.
- Image Data button puts the image everywhere.
I first imported as a control the original image on the far right, then I wrote for the "Image Text" button -
Code: Select all
on mouseUp
put the text of image "imgOriginal" into image "imgOne"
put the text of image "imgOne" into image "imgTwo"
put the text of image "imgTwo" into image "imgThree"
put the text of image "imgThree" into image "imgFour"
end mouseUp
This worked just fine, so I moved onto the "Image Data" button, and again, that worked out fine. Then I decided to add the ability to change the picture since I don't always work on the same machine or even the same os, so I wrote this for the original image -
Code: Select all
on mouseUp
answer files "Select the image you wish to view:" with type ("Image files|jpg,jpeg,JPEG,JFIF,png")
if the result is not "" then
set the fileName of image "imgOriginal" to it
else
end if
end mouseUp
And that works fine for changing the picture in the original image slot, but now the image text button doesn't work. On top of that, if I put "the text of imgOriginal" into a variable, the variable comes up empty.
- Image Text gives me nothing
Using the "Image Data" button still puts the imageData from image to image, so I know there is an image there, but I can't seem to put the text of the image anywhere, and this all started with opening a file into the image control instead of importing an image as a control.
Can anyone explain that?