Associating a file with an Image Object
Klaus Major
klaus at major-k.de
Tue Jun 14 07:57:15 EDT 2005
Hi David,
> Hi All,
>
> I want to be able to choose and image file and have that image
> appear in an "image" object. I can't seem to find out how to do
> this! I have the following script on a "Choose" button:
>
> on mouseUp
> answer file "Please select an Image"
> put it into field "FilePathName"
>
> --
> -- Now I want to set the image file selected by the user to be
> displayed in "Image1", the following doesn't work!
> --
> set the text of image "Image1" to it
> end mouseUp
>
> Could anyone tell me how to acheive this?
yes, you have two options:
1. reference the image, just set the filename...
2. copy that image into your stack
on mouseUp
answer file "Please select an Image"
put it into field "FilePathName"
##1.
set the filename of img "Image1" to it
##OR
##2.
## put url("binfile:" & it) into img "Image1"
end mouseUp
Hope that helps.
> Thanks a lot
> Dave
Regards
Klaus Major
klaus at major-k.de
http://www.major-k.de
More information about the use-livecode
mailing list