Scaling an Image

Jeanne A. E. DeVoto jeanne at runrev.com
Fri Nov 29 00:24:51 EST 2002


At 7:36 PM -0800 11/28/02, JamesHBeckmann at aol.com wrote:
>I wish to:  Show an image (file in the same folder) that has its rect set to
>the rect of a fld, visible for 3 seconds then hidden.
>
>I would like to have this image scaled to the fld's rect.
>
>I do not want this image incorporated into the stack.

Try this:

  set the lockLoc of the templateImage to true
  set the rect of the templateImage to the rect of field "My Field"
  set the filename of the templateImage to myFilePath
  -- setting the templateImage sets up properties for the next
  -- image you create:
  create image "Holder" -- make a blank image with above settings
  wait for 3 seconds
  hide image "Holder"
  send "choose browse tool" to me in 1 tick

>I've tried different configurations of the following:  import paint, set rect
>of image to rect of fld, etc.
>
>I can't get the image scaled to a different size from its original, nor hide
>it after it is visible.

The import command brings the picture file into the stack - which you don't
want. Instead, you set the image's filename property to the name of the
picture file to diplay the external file in the image object.

Normally, Revolution automatically adjusts the size of images to fit the
contents. Setting the lockLoc to true turns this behavior off.

--
Jeanne A. E. DeVoto ~ jeanne at runrev.com
Runtime Revolution Limited - The Solution for Software Development
http://www.runrev.com/





More information about the use-livecode mailing list