On 10/11/05 12:32 AM, "MisterX" <[EMAIL PROTECTED]> wrote: > grab the maximum of the images's width or height. > > Get the ratio of W/H
Here you go: function stsScaleObject pOrigW,pOrigH,pMaxW,pMaxH put pMaxW/pOrigW into tPctW put pMaxH/pOrigH into tPctH if tPctH < tPctW then put pOrigH * tPctH into tNewH put pOrigW * tPctH into tNewW else put pOrigH * tPctW into tNewH put pOrigW * tPctW into tNewW end if return round(tNewW),round(tNewH) end stsScaleObject Pass in the current width and height, along with the maximum width/height you want it to scale to, and it will return the new width and height. HTH, Ken Ray Sons of Thunder Software Web site: http://www.sonsothunder.com/ Email: [EMAIL PROTECTED] _______________________________________________ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution