One of those little things I hate to remember.
// define the vars
var desiredSize:Number ;
var currentSize:Number ;
// check to see which side is longer
if( sizeRef.width > sizeRef.height )
{
desiredSize = sizeRef.width;
currentSize = sizeMe.width;
} else {
desiredSize = sizeRef.height;
currentSize = sizeMe.height;
}
//Get the %
var scale:Number = (desiredSize / currentSize) * 100;
//Set the _xscale and _yscale of the loaded image
sizeMe.scaleX = sizeMe.scaleY = scale;
