On 6/24/05 4:50 PM, "JOHN HART" <[EMAIL PROTECTED]> wrote:

> I use Buddy at runtime to open a dialog box and let the user choose an
> image from his HD, but I can't figure out how to prevent the image
> from conforming to the placeholder sprite on stage.  Example: sprite
> on stage is 350 px by 400 px, and when a new image is brought in that
> is larger or smaller, the sprite adjusts the new image dimensions to
> fit, like squeezing or stretching it.  I'd like the new image to fit
> within the sprite without changing new image dimensions

Hi John,

Set the .stretch property of the sprite to FALSE.  This property is not
documented in the Director 8.0 Lingo Dictionary and later, but Director
continues to use it.  If you open the Property Inspector at the Sprite pane,
select a sprite on the Stage, then hit the Restore All button, it's the
.stretch property that gets reset to 0.

> ... can anyone suggest an image scrolling behavior
> somewhere?  Once the new image is in place, I'd like to have the user
> click and hold on the image to adjust its viewing position within the
> sprite on stage.  Asking too much for Director at runtime?

Do you simply want to move the image around?  If so, you could set its
.moveableSprite property to TRUE.  The user can then drag the sprite with
the mouse.

Or do you want to move the image within a viewport, so that it if is larger
than the area of the screen that it has been allotted, then parts of it will
be masked?  If so, then you can wrap the sprite up in a filmLoop.  Set the
.crop property of the filmLoop member to TRUE.  You can then use...

  tell sprite <your filmloop sprite>
    sprite(1).locH = <whatever>
  end tell

... to move the image horizontally within the filmloop viewport.  There's a
demo movie at...

  <http://nonlinear.openspark.com/alpha/ScrollLoop.dcr>

... which illustrates this idea.  This uses the OSControl Xtra for the
scrollbars, so you may be asked to accept an xtra installation.  You don't
need to use the OSControl Xtra to scroll the filmloop, but I will be happy
to sell you a copy if you decide you want it.

You can find the source for the movie at:

Win: <http://nonlinear.openspark.com/alpha/ScrollLoop.zip>
Mac: <http://nonlinear.openspark.com/alpha/ScrollLoop.sit>

Cheers,

James


[To remove yourself from this list, or to change to digest mode, go to 
http://www.penworks.com/lingo-l.cgi  To post messages to the list, email 
[email protected]  (Problems, email [EMAIL PROTECTED]). Lingo-L is for 
learning and helping with programming Lingo.  Thanks!]

Reply via email to