It addresses half the problem. I missed the other requirement. It's pretty easy to accomplish that, though.
You find the largest dimension delta and determine its percentage delta and then adjust based on that. var perc:Number; if (actualW - targetW > actualH - targetH) { perc = targetW / actualW; } else { perc = targetH / actualH; } clip._xscale = clip._yscale = perc * 100; _______________________________________________ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com