How do I internalize an image source?

Graham graham.samuel at wanadoo.fr
Wed Jul 30 16:02:01 EDT 2003


Thanks to Chipp and Scott for replying. I had written:

On Tue, 29 Jul 2003 15:50:08 -0500, "Chipp Walters" <chipp at chipp.com> wrote:


>put url("bin & "C:/test.png") into image "myinternalimage"

Chipp, thanks but that requires me to put the new images in external files, 
which is what I'm trying to avoid (just one more thing for the user to get 
confused by).

On Tue, 29 Jul 2003 14:02:25 -0700, Scott Rossi <scott at tactilemedia.com> wrote:

>I'm not quite following what you're trying to avoid here: do you just want
>to prevent having two image objects that include the same data?  If so, you
>can use a button to reference images by setting the icon of the button to
>the id of whatever image you want.  Disable all the visual properties of the
>button (threeD, autoHilite, border, etc) and you have an object that can act
>as a viewer for internal images.

Thanks, I didn't think of that - I kind of want to do (repeatedly)

   set the picture of image "mySpecialImage" to the picture of image 
"myPlaceholderImage"

So that "mySpecialImage" can contain all the custom props and stuff which I 
want it to have but change its appearance when the script requires it to do 
so - without invoking external files.

I now see that setting the icon does the job, unless there are some things 
you can't do with buttons and icons that you can do with images (I'll try 
it out).

Thanks again

Graham



---------------------------------------------------
Graham Samuel / The Living Fossil Co. / UK & France  





More information about the use-livecode mailing list