Thanx james that helped....
But....


It nearly does what it supposed to but I thought as it was on an
exitframe handler it would repeat its self....cause all the code is
doing is takeing 25 % off the image size. But if its still larger than a
certain size it doest repeat the process....do I need some dsort of
repeat loop...
How would one put that into the code

Thanx

Jayp





-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]] On Behalf Of James Newton
Sent: 27 February 2002 14:15
To: [EMAIL PROTECTED]
Subject: Re: <lingo-l> Resizing Lingo problem!

Jayp <[EMAIL PROTECTED]> wrote:

> What am I doing wrong here...
>  sprite (me.spritenum).member.width  = (thenewwidth)
>  sprite (me.spritenum).member.height = (thenewheight)

Hi Jayp,

You are instructing Director to change the size of a member.  Director
much
prefers to change the size of a sprite.  Try:

on exitframe me
  tSprite = sprite(me.spritenum)
  tMember = member(150)
  tSprite.member = tMember
  
  maxWidth  = 350
  maxHeight = 174
  
  tWidth  = tMember.width
  tHeight = tMember.height
  
  if tWidth > 350 then
    tWidth = tWidth * 0.75
    tHeight = tHeight * 0.75
    tSprite.width = tWidth
    tSprite.height = tHeight
  end if 
end

You can change the size of a bitmap sprite using imaging Lingo.  Your
code
(minus the asterisks) will actually work with text members in Director
8,
since the width of the member is a settable property.

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!]

[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