Create Image, Hide Image

J. Landman Gay jacque at hyperactivesw.com
Sat Dec 7 20:55:01 EST 2002


JamesHBeckmann at aol.com wrote:

> So the script works on the first run, showing the image and hiding the image. 
>  Press the button again and the next image does not "hide".  
> 
> So I opened the Properties of the button, and then noted on the Editing 
> scrolling button that there is an object "Image Holder" that is never killed.
> 
> I was under the impression that this use of "create" did not permanently 
> store an object.

The create command does create a new object, which it doesn't sound like 
you need to do. Changing the filename property of an existing image will 
change the image it displays, so all you need is a single, permanent 
image object that a script can update to contain different image 
content. Assuming you have an image object named "holder":

on mouseUp
   answer file empty
   put it into thisPict
   set the filename of image "Holder" to it
   show image "holder"
   wait 3 secs
   hide image "Holder"
end mouseUp

-- 
Jacqueline Landman Gay         |     jacque at hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com




More information about the use-livecode mailing list