The FlushTextEffect Component and Shared Fonts

Now that we have covered all of the components in the text effects set, we can backtrack a little to see how to apply the knowledge of shared fonts to the FlushTextEffect component. As I mentioned earlier, one drawback of the FlushTextEffect component is that if you enter a font in the component's parameters that is not on a user's computer, then the text will be rendered in the default font of Arial. As we saw earlier, embedding a font into a text field fixes this problem for Dynamic and Input text fields. However, when it comes to components and ActionScripted control of text fields, we have to make use of shared fonts.

This is the solution to the problem in FlushTextEffect. Although the parameter in FlushTextEffect asks for the name of the font you want use, it can also accept the linkage name of the shared font. So, to use a custom font, you simply create a shared font like we have done already, give it a linkage name, and input that name into the component's parameters-nothing different from before. By following those steps, you can use any font on your computer without worrying if your viewers have the font.




The Hidden Power of Flash Components
The Hidden Power of Flash Components
ISBN: 0782142109
EAN: 2147483647
Year: 2002
Pages: 111

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net