Hi Mark-
thanks~! I think I need to be able to figure out the vFactor though-
to make the resulting rect fit my target rect.
For want of a math gene. . .
/r
At 1:47 AM -0500 11/28/2000, Mark R. Jonkman wrote:
>Hi Roy
>
>Try something like this:
>
>on mResizeRect vSprite, vFactor
> vStartRect = sprite(vSprite).rect
> theScale = float(vStartRect.width) / vStartRect.height
> if vStartRect.width >= vStartRect.height then
> vScale = float(vStartRect.width) / vStartRect.height
> vScaleRect = rect(-1.0 * vScale,-1.0,1.0 * vScale,1.0) * vFactor
> else
> vScale = float(vStartRect.height) / vStartRect.width
> vScaleRect = rect(-1.0,-1.0 * vScale,1.0,1.0 * vScale) * vFactor
> end if
> vNewRect = vStartRect + vScaleRect
> sprite(vSprite).rect = vNewRect
>end mResizeRect
>
>its not perfect, there is a slight loss in the proportionality, but unless
>this is a severe mission critical piece this should get it working.
--
Roy Pardi
[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/LUJ/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!]