bject: RE: [Flashcoders] Image resizer that maintains ratio
mc._width = maxW;
mc._height = maxH;
(mc._xscale > mc._yscale) ? mc._xscale = mc._yscale : mc._yscale =
mc._xscale;
> You could probably optimize a little bit by removing the Math
> function...
>
> mc._width = maxW;
mc._width = maxW;
mc._height = maxH;
(mc._xscale > mc._yscale) ? mc._xscale = mc._yscale : mc._yscale =
mc._xscale;
> You could probably optimize a little bit by removing the Math
> function...
>
> mc._width = maxW;
> mc._height = maxH;
> if ( mc._xscale > mc._yscale ) {
> mc._xscale
. Anyone?
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Hans Wichman
Sent: 27 March 2007 16:06
To: flashcoders@chattyfig.figleaf.com
Subject: Re: [Flashcoders] Image resizer that maintains ratio
ok, thanks joe for the explanation. Seems a lot of static / redun
a long time before showing
up.
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Hans
Wichman
Sent: 27 March 2007 08:23
To: flashcoders@chattyfig.figleaf.com
Subject: Re: [Flashcoders] Image resizer that maintains ratio
The more I read these post, the mo
oders@chattyfig.figleaf.com
Subject: Re: [Flashcoders] Image resizer that maintains ratio
The more I read these post, the more I wonder whether people actually read
what others have already replied.
On 3/26/07, Joe Wheeler <[EMAIL PROTECTED]> wrote:
>
> Here's how I do it:
>
;
mc._height = maxH;
mc._xscale = mc._yscale = Math.min( mc._xscale, mc._yscale );
}
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Guilherme
Cruz
Sent: 26 March 2007 18:15
To: flashcoders@chattyfig.figleaf.com
Subject: Re: [Flashcoders] Im
EMAIL PROTECTED] On Behalf Of Guilherme
Cruz
Sent: 26 March 2007 18:15
To: flashcoders@chattyfig.figleaf.com
Subject: Re: [Flashcoders] Image resizer that maintains ratio
The "_scale" property is a percentage value if you have a 800x600 image and
set _xscale=50 and _yscale=50, you get a 400x300
The "_scale" property is a percentage value
if you have a 800x600 image and set _xscale=50 and _yscale=50, you get a
400x300 image
On 3/26/07, Hans Wichman < [EMAIL PROTECTED]> wrote:
Hi,
that IS weird, because if your image is 800x600, you are saying:
target_mc._xscale = target_mc._yscal
Ah nice one Jack. That's just what I was looking for.
Will let you know how I get on.
Adrian
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Jack
Doyle
Sent: 26 March 2007 15:59
To: flashcoders@chattyfig.figleaf.com
Subject: RE: [Flashcoders] Image re
My scaleToFit function. Probably not the most awesome thing, but it does
the job
private function
scaleToFit(target:Object,clipRect:Rectangle,maintainAspect:Boolean){
var w:Number = clipRect.width;
var h:Number = clipRect.height;
var ratio:Number;
var scalew:Number;
This might be overkill, but feel free to use the TransformManager and/or
TransformItem class(es) available at
http://www.greensock.com/ActionScript/TransformManager. You can just set the
constrainScale_boolean property to true.
Jack Doyle
-Original Message-
Date: Mon, 26 Mar 2007 13:08:
f Of Danny
Kodicek
Sent: 26 March 2007 14:03
To: flashcoders@chattyfig.figleaf.com
Subject: RE: [Flashcoders] Image resizer that maintains ratio
> Any examples out there?
>
> I've got as far as resizing a user supplied image and am
> about to work on the ratio remaining fixed. Just t
Hi,
that IS weird, because if your image is 800x600, you are saying:
target_mc._xscale = target_mc._yscale = 800;
which is probably not what you want^^
greetz
JC
On 3/26/07, eric e. dolecki <[EMAIL PROTECTED]> wrote:
Ok that is SO weird. I was just thinking about this...
myListener.onLoad
Ops..
//store original sizes
originalWidth = myImage._width;
originalHeight = myImage._height;
//get the ratio
finalRatio = originalWidth/500;
myImage._width = originalWidth * finalRatio;
myImage._height = originalHeight * finalRatio;
___
Flashcoders@c
eg. if your original image size is 800x600 and you want it to be 500 x ? :
(pseudo code)
//store original sizes
originalWidth = myImage._width;
originalHeight = myImage._width;
//get the ratio
finalRatio = originalWidth/500;
myImage._width = originalWidth * finalRatio;
myImage._height = origina
> Any examples out there?
>
> I've got as far as resizing a user supplied image and am
> about to work on the ratio remaining fixed. Just thought I'd
> throw this out there as I think it may be tricky.
How are they resizing? Which bit is tricky? Maintaining an aspect ratio
isn't too hard - you
Ok that is SO weird. I was just thinking about this...
myListener.onLoadInit = function( target_mc:MovieClip ):Void
{
target_mc._xscale = target_mc._yscale = Math.max( target_mc._width,
target_mc._height );
};
- Eric
On 3/26/07, Adrian Lynch <[EMAIL PROTECTED]> wrote:
Any examples out the
17 matches
Mail list logo