MC Tween: it saves the world.™

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

Special notice! While MC Tween is a nice extension and it will continue to work for AS1 and AS2 until the end of time, it is my duty to inform all citizens that I have switched the focus from further development on MC Tween to a new AS2 and AS3 extension, a real Class this time, called "caurina.transitions.Tweener" (or just Tweener). Tweener doesn't have as many features as MC Tween yet (for example, it doesn't have native filter tweens), and the documentation isn't 100% done, but it features a complete, more solid redesign with a few additional syntax features that were impossible to achieve with MC Tween. And it works the same for AS2 (including Flash Lite 2+) and AS3.

So, if you use MC Tween, or you're thinking about using it, I'd like to suggest you try Tweener instead. It follows all the principles of simplicity I tried to feature on MC Tween, but with a more powerful syntax. Tweener download, examples and documentation are available on Tweener's page. You can read more about this change on this blog post.

Thank you for your attention and sorry for this ugly box. And don't worry, this website will not be deleted or anything.

Notice for October 2008: also note that, if you are still interested in MC Tween and don't want to use class-based AS2 or AS3 solutions, Larry Benedict has taken the matter into his hands and updated MC Tween with some filter features that are not available in the latest version. You can read more about it (and download his version) here or here.

Documentation

» Introduction

Core Methods

» tween()

» stopTween()

Shortcut Methods

» alphaTo()

» bezierSlideTo()

» colorTo()

» colorTransformTo()

» frameTo()

» panTo()

» resizeTo()

» rotateTo()

» scaleTo()

» scrollTo()

» slideTo()

» volumeTo()

» xScaleTo()

» xSlideTo()

» yScaleTo()

» ySlideTo()

Rounded Shortcut Methods

» roundedBezierSlideTo()

» roundedSlideTo()

» roundedTween()

» roundedXSlideTo()

» roundedYSlideTo()

Flash 8 Filters Shortcut Methods

» bevelTo()

» blurTo()

» glowTo()

» xBlurTo()

» xGlowTo()

» yBlurTo()

» yGlowTo()

» xyBevelTo()

» xyBlurTo()

» xyGlowTo()

Auxiliary Functions

» getTweens()

» isTweening()

Auxiliary Methods

» lockTween()

» unlockTween()

» pauseTween()

» resumeTween()

Additional Events

» onTweenComplete

» onTweenUpdate

.xGlowTo()

Applies To

MovieClip, TextField

Availability

Flash 8 and above, using AS1 or AS2.

Usage

<MovieClip|TextField>.xGlowTo([color, alpha, blurX, strength, quality, inner, knockout, seconds, animation type, delay, callback, extra1, extra2]);

Parameters

BlurFilter : A flash.filters.GlowFilter object that will be applied to this object's filters array.

color : Desired glow color, in numeric value. This numeric value works similarly to the Color.setRGB color parameter. This is equivalent to this filter's color parameter.

alpha : Desired alpha for this glow. Notice, though, that this value ranges from 0 (transparent) to 1 (opaque) instead of from 0 to 100. This is equivalent to this filter's alpha parameter.

blurX : Desired horizontal radius of the glow blur. The bigger this value, the more blurred the glow it will look. This is equivalent to this filter's blurX property.

strength : Desired strength for this filter. This value usually ranges from 0 to 1 (default) and beyond. This is equivalent to this filter's strength parameter.

quality : A numeric value indicating the quality of this blur, usually from 1 ("Low") to 3 ("High"). It's, roughly, the number of times this filter is applied - the higher the number, the better the quality, but also the higher the time it takes to be applied. If ommited, this value defaults to 2. This value is not tweenable. This is equivalent to this filter's quality property.

inner : A boolean value indicating if this is an inner glow instead of the default outer glow. This is equivalent to this filter's inner parameter.

knockout : A boolean value indicating whether or not this filter knocks out its object, hiding the original content and showing the filter instead. This is equivalent to this filter's knockout parameter.

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

Returns

Nothing.

Description

Shortcut method; applies a horizontal Glow filter to an existing object, tweening its properties.

If the object doesn't have any filter of this type applied, it creates a new filter with default values and then tweens to the new one. If the object already has a filter of this type applied, it will tween the existing filter's properties to match the new one. If the object has two different filters of this same type applied, it will tween the first one.

Some values are not tweenable and will be rewritten on the new filter if they differ from the original value.

Examples

// Creates a blue horizontal aura around a MovieClip on 3 seconds
<MovieClip>.xGlowTo(0x0000ff, 1, 20, 1, 2, false, false, 3);

See Also

glowTo(), xyGlowTo(), yGlowTo(), flash.filters.GlowFilter

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