My account
Shopping cart
Knowledge base
Support


Using partial effects



Overview | Properties | Methods | Events | Patterns | XML | Partial Effects | Base Presets

By modifying the partialGroup, partialPercent, selectedStrings, partialStart and blurAmount properties you can further customize the effects in order to emphasize the artistic side of the text effect. This way you can apply the effect:
  • on every letter of the text or only on a few of them
  • on every word of the text or only on a few of them
  • on every line of the text or only on a few of them
  • on specifically mentioned strings found in the text (letters, groups of letters, words, groups of words)
  • add blur to the text elements left outside the main effect
  • modify the delay between the start of the main effect and the start of the alpha fade effect

This partial effect consists of two animations each on a speciffic group of text: the selected parts and the leftovers. The first animation is the main effect applied on the text elements selected from the partialGroup property (letters, words, lines or specific strings). This animation will last as long as the time specified at the tweenDuration property (in seconds). The second animation is a simple alpha fade effect (to which you can add some blur) applied on the text elements which were not included in the main effect, the leftovers.

To use a partial effect, first you need to set the text elements on which the effect will be applied. This is set from the partialGroup parameter. Next, you need to specify on how many text elements the effect will be applied. This is done from the partialPercent property. This property represents the percentage of text elements (not the number of them) on which the effect is applied.

If you need to apply the XYScale effect only on half the letters, you set the partialGroup to "letters" and partialPercent to 50. This way, the XYScale is applied on half the letters and on the other half, the letters left out of the effect, an alpha fade effect is applied. This is the second animation. This alpha fade effect can start later than the main effect and will last as long as the main effect.

If you need to change the time this second animation starts, you can do it by changing the value set to the partialStart parameter. Remember that the partialStart value represents percentage (not seconds) of the tweenDuration property. So if partialStart has a value of 50, that would mean the alpha fade effect will start when the main effect reaches half of its duration; a value of 0 means that the alpha fade effect starts at the same time as the main effect; a value of 100 means that the alpha fade effect starts when the main effect reaches the end, but it will not be able to execute since both, the main effect and alpha fade effect, must end at the same time. So the second animation will last from its starting time to the end of the main effect animation.

Besides the alpha fade in or out, the second animation can also support blurring, in case you would like to add a little blur to the second alpha fade animation. This is done, using the blurAmount property.

Partial effect examples

You have a TextField containing some text:



Now, of course, you can apply a few patterns on the text, using the TxEff component and you can even change the way the pattern applies, by using one of the pattern's presets. But what if you would like to change a little the way that preset is applied ? By changing the five previously mentioned properties, you can do just that. Here are a few scenarios:

1. You need to apply the effect on only a third of the letters, the rest of them, using a fade in or out effect:

txeffInstanceName.partialGroup = "letters";
txeffInstanceName.partialPercent = 33;
txeffInstanceName.blurAmount = 1;
txeffInstanceName.partialStart = 33;


In the next image you can see how the component randomly selects 33% of the letters and applies the selected effect on them. As mentioned before, on the rest of the letters, it applies a fade in or out effect (according to the show or hide transition) using alpha fade and blur (if the blurAmount parameter has a positive value). The fade effect will start when the main effect has reached a third of its tween.



2. You need to apply the effect on half of the words in the text

txeffInstanceName.partialGroup = "words";
txeffInstanceName.partialPercent = 50;




3. You want to highlight, during the effect, the words "MCTE", "animations" and "transitions" (that is done by applying the effect only on those strings, the rest of the text having a fade in or out effect applied on it with a small amount of blur); you also want the second animation to last a quarter of the main effect:

txeffInstanceName.partialGroup = "selectedStrings";
txeffInstanceName.selectedStrings = new Array("MCTE", "animations", "transitions");
txeffInstanceName.blurAmount = 2;
txeffInstanceName.partialStart = 75;





Overview | Properties | Methods | Events | Patterns | XML | Partial Effects | Base Presets