flash - Scale proportionally below movieclip size -
I am trying to make the movieclop scale proportionate, if the size of the item is smaller than the current.
Obviously I can use the ScaleX / Y value like this:
If (cont.scaleX I need to restrict / reset the proportionately large proportion in the special case that the width / height of the platform is less than the movie clip. Thank you
P> Just above my mind, but you have a chance to find some prospect:
Edit: The maximum scale of 1 should be added in response to your first comment. .
var sw: number = forum. Location Width, Sh: Number = Step. If (sw / sh & lt; c.width / c.height) // (or vice versa based on scaling method) {c.width = Math.min (origW, sw); C.scaleY = c.scaleX = Math.Man (1, C. SCALX); } And {c.height = Math.min (origH, sh); C.scaleX = c.scaleY = Math.man (1, c.)
Comments
Post a Comment