MC Tween: it saves the world.™

Home | Using MC Tween | Documentation | AS2 usage notes | Animation Types | Downloads | Examples | Extensions | Author & Disclaimer | Links

.resizeTo()

Applies To

MovieClip, TextField

Availability

Flash 6 and above, using AS1 or AS2.

Usage

<MovieClip|TextField>.resizeTo(width, height [, seconds, animation type, delay, callback, extra1, extra2]);

Parameters

width : Desired width (in pixels) value for the object.

height : Desired height (in pixels) value for the object.

All other parameters are standard tween() related. Refer to the .tween() command for reference.

Returns

Nothing.

Description

Shortcut method; resizes a MovieClip or a TextField to a given size, based on its original control point. You can also bypass any of the parameters if you don't want to tween that specific parameter just use undefined as the value instead.

Examples

// Scales a MovieClip to 100 pixels wide and 1 pixel hight in 3 seconds using linear easing
<MovieClip>.resizeTo(100, 1, 3, "linear");

// Scales a TextField to 200 pixels wide in 2 seconds <TextField>.resizeTo(200, undefined, 2);

See Also

scaleTo()

MC Tween· Zeh Fernando, 2003-2006 · Proudly hosted at DreamHost · Disclaimer