MC Tween: it saves the world.™

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

.slideTo()

Applies To

MovieClip, TextField

Availability

Flash 6 and above, using AS1 or AS2.

Usage

<MovieClip|TextField>.slideTo(x, y [, seconds, animation type, delay, callback, extra1, extra2]);

Parameters

x : Desired _x position for this object. Can be omitted (use undefined) but then the y parameter is mandatory. If omitted, no _x transition occurs.

y : Desired _y position for this object. Can be omitted (use undefined) but then the x parameter is mandatory. If omitted, no _y transition occurs.

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

Returns

Nothing.

Description

Shortcut method; does a transition on the _x and _y properties of a MovieClip or TextField, sliding it on screen.

Examples

// Moves a MovieClip to 10, 10 in 0.5 seconds
<MovieClip>.slideTo(10, 10, 0.5);

// Moves a TextField to _y 20 in 1 second, using a linear transition. The TextField's _x position is not changed.
<TextField>.slideTo(undefined, 20, 1, "linear");

See Also

roundedSlideTo(), bezierSlideTo(), xSlideTo(), ySlideTo()

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