Today, I was trying to build a scrolling form in Flash MX using components. Everything was going well until I published my movie. The fonts and UI components nested within the scrolling component were... drunk. Text was missing and then appearing out of nowhere, and the UI components were missing or distorted.
Here's a sample of what I'm talking about:
After doing some investigation on Macromedia's support site, I found the problem. When nesting components inside another component, any fonts used need to be embedded in the movie and some custom ActionScript needs to be added to the first frame of the movie. Although, Macromedia's technote says this solution only fixes the font disappearing act, it also fixes the UI component problem.
Here are the steps I took:
1. Open Window > Library
2. Select the Options Menu pop-up in the upper right of the Library.
3. Choose New Font.
4. Name the font (i.e., "verdana") and select the desired font from the Font list (the components use the Arial font by default, so if you want the default look of the component, choose Arial).
5. Select OK.
6. Right-click on the new font symbol in the Library and choose Linkage.
The Linkage Properties box will pop up:
7. Check "Export for ActionScript".
8. Check "Export in first frame".
9. Enter a name (i.e., "verdana").
10. In the first frame of your movie, add the following ActionScript: