I would work out the width to height ratio, add the increase increment,
then change the height to match

i.e.

property sp, thisRatio, incSize

on beginSprite me
        sp = me.spriteNum
        thisRatio = sprite(sp). height / sprite(sp).width
        incSize = 8
end 

on exitFrame me
        newWidth = sprite(sp).width + incSize
        newHeight = newWidth * thisRatio

        sprite(sp).width = newWidth
        sprite(sp).height = newHeight
end

(I haven't checked this code for erros)

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Michael
Nadel
Sent: 21 March 2005 13:52
To: lingo-l@lists.fcgnetworks.net
Subject: <lingo-l> Lingo to make a sprite grow by scaling?

Is there a way using Lingo to make a sprite that is scaled, say at 50%,
to 
slowly grow as it moved accross the screen (giving the illusion of
getting 
closer to you)?

I was using the following script:

pWolf.height = pWolf.height + 4
pWolf.width = pWolf.width + 8

The problem is, the sprite's length is greater than it's width and it's
very 
difficult to get the hieght and width to grow at the proper rate. Isn't 
there a way to make it grow by "scaling" using Lingo?

Thanks for help,

Michael Nadel
MediArt.Corp
"Creativity is more powerful than knowledge" -- Albert Einstein
***********************************************************************
Tel: (972-2) 5807-454
Email: [EMAIL PROTECTED]
Web: http://www.intelligineering.com/mediart/home.htm

[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
lingo-l@penworks.com  (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 
lingo-l@penworks.com  (Problems, email [EMAIL PROTECTED]). Lingo-L is for 
learning and helping with programming Lingo.  Thanks!]

Reply via email to