At 10:40 PM -0800 11/14/2001, Mark MacKenzie (Shaw) wrote:
>I have an image graphic of 62 (W) pixels by 33 (H) pixels.
>1.   I wish to show one half of its area without resizing the image itself.
>The resulting image rectangle would then be 31 (W) pixels by 33 (H) pixels.
>Showing the left half of the image.
>2.   Keeping the same new width of 31 (W) by 33(H) I then wish to show the
>right half of the image.

One way to do this is to group the image (select it and choose "Group" from
the Objects menu) and set the group's hScroll property according to your
requirements. You can scroll a group by setting its hScroll and vScroll
properties, even if the group doesn't have visible scrollbars.

In this case, after grouping the image, you would set the new group's
lockLoc property to true (to prevent the group automatically resizing
itself to fit the image's full size) and set its width to 33 to display
only the width you want. The script to switch between halves would go into
the group and look like this:

  on mouseDown -- assuming you want to click to switch
    if the hScroll of me is zero then set the hScroll of me to 33
    else set the hScroll of me to zero
  end mouseDown

--
Jeanne A. E. DeVoto ~ [EMAIL PROTECTED]
http://www.runrev.com/
Runtime Revolution Limited - Power to the Developer!


Reply via email to