Associating a file with an Image Object

MisterX b.xavier at internet.lu
Tue Jun 14 07:55:58 EDT 2005


there's two ways of doing this David 

After you've chosen the image file

answer file "choose and image"

put it into thisimagepath
put the long id of image x into thisimage
set the path of thisimage to thisimagepath

(image by reference)

or

put "file:" before thisimage
set the imagedata of thisimage to url thisimage

(Image by data!) - more dangerous though... if the image is corrupted...
anything can happen...

cheers
Xavier
http://monsieurx.com/taoo

> -----Original Message-----
> From: use-revolution-bounces at lists.runrev.com 
> [mailto:use-revolution-bounces at lists.runrev.com] On Behalf Of 
> David Burgun
> Sent: Tuesday, June 14, 2005 13:38
> To: How to use Revolution
> Subject: Associating a file with an Image Object
> 
> 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?
> 
> Thanks a lot
> Dave
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/use-revolution
> 



More information about the use-livecode mailing list