.bevelTo()
Applies To
MovieClip, TextField
Availability
Flash 8 and above, using AS1 or AS2.
Usage
<MovieClip|TextField>.bevelTo(BevelFilter [, seconds, animation type, delay, callback, extra1, extra2]); or <MovieClip|TextField>.bevelTo([distance, angle, highlightColor, highlightAlpha, shadowColor, shadowAlpha, blurRadius, strength, quality, type, knockout, seconds, animation type, delay, callback, extra1, extra2]);
Parameters
BevelFilter : A flash.filters.BevelFilter object that will be applied to this object's filters array.
distance : Desired bevel distance (acts like the "height" of the bevel). This is equivalent to this filter's distance parameter.
angle :
Desired bevel angle, in degrees. Default is 45. This is equivalent to this filter's angle parameter.
highlightColor : Desired light color, in numeric value. This numeric value works similarly to the Color.setRGB color parameter. This is equivalent to this filter's highlightColor parameter.
highlightAlpha :
Desired light alpha. 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 highlightAlpha parameter.
shadowColor : Desired shadow color, in numeric value. This numeric value works similarly to the Color.setRGB color parameter. This is equivalent to this filter's shadowColor parameter.
shadowAlpha : Desired shadow alpha. 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 shadowAlpha parameter.
blurRadius :
A numeric value indicating the radius of the desired bevel blur. The bigger this value, the more blurred the glow it will look. This is equivalent to this filter's blurX and blurY properties.
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.
type : The type of bevel to apply. This is a string with either "inner" (default), "outer" or "full" as values. This is equivalent to this filter's type 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 Bevel 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 very simple Bevel on a movieclip on 2 seconds, with a distance of 10 and using default values, using in-line commands
<MovieClip>.bevelTo(10, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, 2);
// Creates a blurry bevel and applies it to a movieclip using a linear animation, using a Bevel filter object
var bvl = new flash.filters.BevelFilter(20, 45, 0xffffff, 0.5, 0x000000, 0.5, 10, 10, 1, 2, "inner", false); <MovieClip>.bevelTo(bvl, 2, "linear");
See Also
xyBevelTo(), flash.filters.BevelFilter
|