Packageflupie.textanim
Classpublic class TextAnimBlock
InheritanceTextAnimBlock Inheritance flash.display.Sprite

TextAnimBlock is the part of TextAnim that contains a text slice. Is the target of effects.



Public Properties
 PropertyDefined By
  index : int
Index works like a ID block in the TextAnim instance.
TextAnimBlock
  nextBlock : TextAnimBlock
Reference to the next block.
TextAnimBlock
  posX : Number = 0
The original x position of the block.
TextAnimBlock
  posY : Number = 0
The original y position of the block.
TextAnimBlock
  text : String
Sets the text of this block.
TextAnimBlock
  textAnim : TextAnim
The instance of TextAnim that the block belongs.
TextAnimBlock
  textField : TextField
The textField containing the slice of original text.
TextAnimBlock
  textFormat : TextFormat
The TextFormat of the original text.
TextAnimBlock
  texture : Sprite
The container used for patterns, bitmaps, etc.
TextAnimBlock
  vars : Object
The empty Object to putting custom variables each blocks.
TextAnimBlock
Public Methods
 MethodDefined By
  
TextAnimBlock(textAnim:TextAnim, index:int)
Constructor.
TextAnimBlock
  
Clear the texture sprite that can contains any display objects, used in patterns, gradientColors, etc.
TextAnimBlock
  
dispose():void
Clear references.
TextAnimBlock
  
updateRegistration(px:Number, py:Number):void
Sets the registration point of block;
TextAnimBlock
Property Detail
indexproperty
public var index:int

Index works like a ID block in the TextAnim instance. Each block has a index, starting from 0. It serves as a reference for actions, delays and anything else.

nextBlockproperty 
public var nextBlock:TextAnimBlock

Reference to the next block.

posXproperty 
public var posX:Number = 0

The original x position of the block.

This value is generated after all blocks are created, and keeps the horizontal correct position of the block in TextAnim.

function myEffect(block:TextAnimBlock):void { block.x = block.posX - 100; //Put the block 100px left of correct position. Tweener.addTween(block, {x:block.posX, time:.5}) //Slide the block to correct position. }

The default value is 0;.

posYproperty 
public var posY:Number = 0

The original y position of the block.

This value is generated after all blocks are created, and keeps the vertical correct position of the block in TextAnim.

function myEffect(block:TextAnimBlock):void { block.y = block.posY + 100; //Put the block 100px below of correct position. Tweener.addTween(block, {y:block.posY, time:.5}) //Slide the block to correct position. }

The default value is 0;.

textproperty 
text:String

Sets the text of this block.


Implementation
    public function get text():String
    public function set text(value:String):void
textAnimproperty 
public var textAnim:TextAnim

The instance of TextAnim that the block belongs.

textFieldproperty 
public var textField:TextField

The textField containing the slice of original text.

textFormatproperty 
public var textFormat:TextFormat

The TextFormat of the original text.

textureproperty 
public var texture:Sprite

The container used for patterns, bitmaps, etc.

varsproperty 
public var vars:Object

The empty Object to putting custom variables each blocks.

Constructor Detail
TextAnimBlock()Constructor
public function TextAnimBlock(textAnim:TextAnim, index:int)

Constructor. Created basically by a TextAnim instance.

Parameters
textAnim:TextAnim — The TextAnim instance who contains this block.
 
index:int — The index of the block in TextAnim instance list.
Method Detail
clearTexture()method
public function clearTexture():void

Clear the texture sprite that can contains any display objects, used in patterns, gradientColors, etc.

dispose()method 
public function dispose():void

Clear references.

updateRegistration()method 
public function updateRegistration(px:Number, py:Number):void

Sets the registration point of block;

Parameters

px:Number — The horizontal registration.
 
py:Number — The vertical registration.

See also