Try using a multiplier instead of addition. If you are scaling repetitively, you'll want to store the calculated size in a variable to make the scaling smoother - Director doesn't care if you specify size as non-integer. Something like:
newHeight = pWolf.height newWidth = pWolf.width -- repeat loop newHeight = newHeight * 1.02 newWidth = newWidth * 1.02 pWolf.height = integer(newHeight) pWolf.width = integer(newWidth) or: newRect = pWolf.rect * 1.02 pWolf.rect = newRect Jeremy Aker -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Michael Nadel Sent: Monday, March 21, 2005 8:52 AM To: [email protected] 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 [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!]
