Got from a google result while i was searching for proportional scaling in as3 for an office project. really simple and reusable.
function scale_uniform(photo:MovieClip) {
photo.width = stage.stageWidth;
photo.height = stage.stageHeight;
( photo.scaleX > photo.scaleY ) ? photo.scaleY = photo.scaleX : photo.scaleX = photo.scaleY;
}










Leave Your Response