The FlushTextEffect Component

Open a fresh Flash movie and drag the FlushTextEffect component to the stage. The first thing you will notice is that text is in the component already, as shown in Figure 7.4. This is actually a live preview that displays the set of text to be animated, and it will change when you change the component's parameters. Do not mess with the parameters just yet; we are only experimenting for now.

click to expand
Figure 7.4: The live preview shows what the text will look like when fully animated.

Test the movie by pressing Command/Ctrl+Enter. The movie starts with a blank screen, and then small pieces of the text gradually come into form until the entire set of text is visible. Then, shortly after the text has been fully uncovered, the animation reverses itself and the text dissolves back to blankness. Really, the effect is quite simple. Many small rectangles having the same color as the background are fitted to cover the text exactly. Next, they start to shrink to point size, slowly uncovering the text that lies beneath, as shown in Figure 7.5.

click to expand
Figure 7.5: The Flush Text effect in midaction. The text is uncovered slowly by a series of animated rectangles.

You will notice that the text continuously animates in and out in a loop. This is because only one set of text is entered in its parameters. One of the most powerful features of this component is that you can enter any number of text sets into an array; the component will cycle through the sets, performing the animation on each. The parameters also allow you to customize what the component should do once it has cycled through all the text sets; it can either go back to the beginning and start over or simply quit and remove itself from the stage.

Table 7.1 is an exhaustive list of the parameters you can customize in the FlushTextEffect component.

Table 7.1: Parameters for the FlushTextEffect Component



Text Messages

Array that holds all the sets of text you want the component to cycle through. These messages are HTML-enabled, so you can use Flash-compliant HTML tags, such as bold, italics, and line break.

Text Size

Size of the text in each set.

Text Font

Font of each set of text. This value is case-sensitive, so be sure to enter the exact font name.

Text Color

Color of the text in each set.

Text Alignment

Alignment of the text in each set.

Flush Density X

Number of rectangles created along the x-axis of the text.

Flush Density Y

Number of rectangles created along the y-axis of the text.

Flush Start Difference

Controls how many frames must pass before all rectangles animate. Each rectangle waits a random number of frames between 1 and the value of this parameter before it animates either in or out.

Flush Color

Color of the rectangles that flush over the text.


True or false value that determines if the sets of text should play continuously in a loop or not.

Uncovered Frame Delay

Number of frames that the sets of text remain uncovered before the rectangles begin to animate and cover the text.

There are just a few things we should discuss when looking at these parameters. Firstly, the text font parameter says we can use HTML in our messages, but what exactly is Flash-compliant HTML? The only tags supported by Flash are <a>, <b>, <font color>, <font face>, <font size>, <i>, <p>, <br>, and <u>. Any other tags will produce unreliable results.

Also, the values for Flush Density X and Flush Density Y should be used in strict moderation. Using large values for these parameters will slow down the user's computer due to the number of rectangles being animated. To calculate the number of rectangles, simply multiply together the values you enter. So, if each density is 10, then 100 rectangles are being animated. Obviously, these numbers will grow very large with even small increases in the individual densities. Fortunately, this is one of those cases where greater numbers do not necessarily result in a better effect. Even with very small values for the densities, you can pull off a unique effect.

On the CD 

To demonstrate a few common uses of the FlushTextEffect component, I've included some samples for experimentation. You'll find the first, FlushEffect01_Sample.fla, in the Chapter 7 folder on the CD. This sample is similar to the default effect, except that I've added sets of text and changed the font and font size. Also notice that I've used the HTML tag for italics for this book's title, as shown in Figure 7.6.

click to expand
Figure 7.6: Add multiple sets of text for the component to loop through.

The next, FlushEffect02_Sample.fla, demonstrates that small flush densities can give a very clean look to the effect, which also runs smoother because it contains fewer rectangles. I've reduced each flush density to only 4, which is 16 rectangles total, and yet the effect is still very effective. Also, I used the line break tag to create sets of text that flow into two lines, as shown in Figure 7.7. Be sure to keep in mind that the component is not restricted to only one line of text.

click to expand
Figure 7.7: Text can flow into two or more lines through the use of the line break tag <br>.

In the file FlushEffect03_Sample.fla, I have used the exact same parameter settings as in the previous file, with the exception that the density values have been increased. Each flush density is now 15, which results in 225 rectangles. If you test this movie, you can see that smaller bits of the text become visible (as shown in Figure 7.8), and it appears to be smooth. However, if you had any other animations or actions playing elsewhere in the movie, you would see a noticeable drag in their performance. On top of that, the effect is not much better compared to the previous file, so in general the CPU lag is not worth it.

click to expand
Figure 7.8: The increased flush densities do not necessarily result in a better effect.

With these examples, you should start to see how you can use this text effect in your own files. You can also experiment with using the effect to flash bytes of text in a banner or to display instructions to a viewer. However, always keep in mind that the component can truly bog down someone's computer if not used in moderation. Using many instances of this component on the stage is not a good idea.

The Hidden Power of Flash Components
The Hidden Power of Flash Components
ISBN: 0782142109
EAN: 2147483647
Year: 2002
Pages: 111 © 2008-2017.
If you may any questions please contact us: