| Previous | Next | Frames | No Frames |
| Summary: Field | Property | Contructor | Method | Detail: Field | Property | Contructor | Method |
Object | +--com.mosesSupposes.util.TextFX
Field Summary | |
| public static | BLOCKINDENT: String |
| Tweens a TextField's block indent (TextFormat.blockIndent) | |
| public static | INDENT: String |
| Tweens a TextField's first-line indent (TextFormat.indent) | |
| public static | KERNING: String |
| Tweens
a TextField's horizontal spacing between letters (TextFormat.letterSpacing) |
|
| public static | LEADING: String |
| Tweens a TextField's vertical spacing between lines (TextFormat.leading) | |
| public static | LEFTMARGIN: String |
| Tweens a TextField's left margin (TextFormat.leftMargin) | |
| public static | RIGHTMARGIN: String |
| Tweens a TextField's right margin (TextFormat.rightMargin) | |
| public static | TEXT_COLOR: String |
| This property requires special array usage... | |
| public static | TEXT_SIZE: String |
| Tweens a TextField's font size (TextFormat.size) | |
Method Summary | |
| public | addTween ( target: Object, prop: String, endval: Object ): Boolean |
| Required by IFuseFX for compliance with FuseFX. Setup, called just prior to tweening. | |
| public | defineProperties ( ): Array |
| Required by IFuseFX for compliance with FuseFX. | |
| public | destroy ( target: Object ): Void |
| Required by IFuseFX for compliance with FuseFX. Cleanup, called just prior to deletion. Listeners are removed by FuseFX. | |
| public | onTweenUpdate ( o: Object ): Void |
| Required by IFuseFX for compliance with FuseFX. Standard event fired by the engine on its update pulse just after updating the property. | |
| public static var BLOCKINDENT: String = "textBlockIndentFX" |
| Tweens a TextField's block indent (TextFormat.blockIndent) |
| public static var INDENT: String = "textIndentFX" |
| Tweens a TextField's first-line indent (TextFormat.indent) |
| public static var KERNING: String = "textKerningFX" |
|
| public static var LEADING: String = "textLeadingFX" |
| Tweens a TextField's vertical spacing between lines (TextFormat.leading) |
| public static var LEFTMARGIN: String = "textLMarginFX" |
| Tweens a TextField's left margin (TextFormat.leftMargin) |
| public static var RIGHTMARGIN: String = "textRMarginFX" |
| Tweens a TextField's right margin (TextFormat.rightMargin) |
| public static var TEXT_COLOR: String = "textColorsArrayFX" |
This property requires special array usage...
|
| public static var TEXT_SIZE: String= "textSizeFX" |
| Tweens a TextField's font size (TextFormat.size) |
|
| Required by IFuseFX for compliance with FuseFX. Setup, called just prior to tweening. | |||||||||
|
|
| Required by IFuseFX for compliance with FuseFX. |
|
|
| Required by IFuseFX for compliance with FuseFX. Cleanup, called just prior to deletion. Listeners are removed by FuseFX. | |||
|
|
| Required by IFuseFX for compliance with FuseFX. Standard event fired by the engine on its update pulse just after updating the property. | |||
|
import com.mosesSupposes.fuse.*; import com.mosesSupposes.fusefx.*; import com.mosesSupposes.util.*; ZigoEngine.register( PennerEasing ); FuseFX.register( MixerFX ); // place a textfield onstage with embedded fonts named my_txt // Tween kerning +20 using the engine // This is equivalent to tweening (my_txt, "textKerningFX",...) ZigoEngine.doTween(my_txt, TextFX.KERNING, "20", 2, "easeInOutQuint"); // You can't use the constants with Fuse's object-literal syntax, // so instead of TextFX.LEADING you should use the value of the constant "textLeadingFX" var f:Fuse = new Fuse({ target:my_txt, textLeadingFX:"-4", time:2, ease:"easeInOutQuint" }); f.start();Tweening a TextField's color can be very useful if you've applied BitmapFilters to the TextField, because tweening any color transform on the TextField results in the filters being colorized as well. TEXT_COLOR is a little bit tricky though, the value MUST register as a colors array in the engine so the value is handled as a hex. For this reason the name of the property is "textColorsArrayFX" instead of "colorX" both as a reminder, and because it is the string "colors" plus using an Array that forces this behavior in the engine.ZigoEngine.doTween(myTextField, TextFormatTween.TEXT_COLOR, [[0x33FF00]], 1, "easeInQuad"); // The same thing in Fuse would read: myFuse.push({ target:myTextField, textColorsArrayFX:[0x33FF00], time:1, ease:"easeInQuad"});Note that because doTween accepts an Array for its endVals parameter (for when multiple properties are being tweened in one call), you need to use two sets of brackets to indicate that the color value is itself a nested Array.The Fuse version also passes an Array but should only use one set of brackets because you're only declaring one property, which Fuse will send within an Array with any other properties in the action.