Packageflupie.textanim
Classpublic class TextAnimTools
InheritanceTextAnimTools Inheritance Object

Extra tools for special treatment of TextAnim instance. Can convert the blocks to bitmap, apply patterns, etc.



Public Methods
 MethodDefined By
  
debug(textAnim:TextAnim):void
[static] Use only when you not sure if TextAnim instance is working rightly.
TextAnimTools
  
getColorBounds(block:TextAnimBlock):Rectangle
[static] Get color bounds of a TextAnimBlock instance.
TextAnimTools
  
setGradientLinear(textAnim:TextAnim, colors:Array, angle:Number = 0, alphas:Array = null, ratios:Array = null):void
[static] A linear gradient as a color of the text.
TextAnimTools
  
setPattern(textAnim:TextAnim, img:Boolean, stretch:* = false):void
[static] Takes a display object to draw a texture in each TextAnim block.
TextAnimTools
  
showAnchors(textAnim:TextAnim):void
[static] Shows the registration reference of each block in a TextAnim instance.
TextAnimTools
  
toBitmap(textAnim:TextAnim, smooth:Boolean = false):void
[static] Convert blocks to Bitmap, instead original textField vector.
TextAnimTools
  
toVector(textAnim:TextAnim):void
[static] If the textAnim instance was converted to bitmap, toVector can reverse it.
TextAnimTools
Method Detail
debug()method
public static function debug(textAnim:TextAnim):void

Use only when you not sure if TextAnim instance is working rightly.

Parameters

textAnim:TextAnim — Instance of TextAnim.

getColorBounds()method 
public static function getColorBounds(block:TextAnimBlock):Rectangle

Get color bounds of a TextAnimBlock instance.

Parameters

block:TextAnimBlock — The block measured.

Returns
Rectangle — Rectangle color bounds of a block.
setGradientLinear()method 
public static function setGradientLinear(textAnim:TextAnim, colors:Array, angle:Number = 0, alphas:Array = null, ratios:Array = null):void

A linear gradient as a color of the text.

Parameters

textAnim:TextAnim — Instance of TextAnim.
 
colors:Array — List of colors of the gradient.
 
angle:Number (default = 0) — The direction of the gradient (in degrees).
 
alphas:Array (default = null) — The alpha of each color.
 
ratios:Array (default = null) — The ratio of each color.

setPattern()method 
public static function setPattern(textAnim:TextAnim, img:Boolean, stretch:* = false):void

Takes a display object to draw a texture in each TextAnim block.

Parameters

textAnim:TextAnim — Instance of TextAnim.
 
img:Boolean — The source of texture bitmap.
 
stretch:* (default = false) — To extends the texture to fill up each block's area, without repetition.

showAnchors()method 
public static function showAnchors(textAnim:TextAnim):void

Shows the registration reference of each block in a TextAnim instance.

Parameters

textAnim:TextAnim — Instance of TextAnim.

See also

toBitmap()method 
public static function toBitmap(textAnim:TextAnim, smooth:Boolean = false):void

Convert blocks to Bitmap, instead original textField vector.

Parameters

textAnim:TextAnim — Instance of TextAnim.
 
smooth:Boolean (default = false) — Allow smooth bitmap.

See also

toVector
toVector()method 
public static function toVector(textAnim:TextAnim):void

If the textAnim instance was converted to bitmap, toVector can reverse it.

Parameters

textAnim:TextAnim — Instance of TextAnim.

See also

toBitmap