Search Tutorials
Building the Key (con't) Step 3 : Creating the Textfield for the Category Name
The final movieclip is the category clip, which contains a dynamic textfield that will show the category of the corresponding colored segment of the pie chart. Drag out a text field and use the Text Options panel to specify Dynamic Text Field and give it a variable name of "tfCategory". Then use the Character tab to specify device font _sans and a size of 14. Insert> Convert to Symbol (F8) to convert this to a movieclip. Delete it from the stage because we'll use the attachMovie method to attach it directly from the library, so it doesn't need an instance name either. In this example, we will use the attachMovie method to make copies of the Category movieclip. We could've used duplicateMovieClip, but this provides an example of how to attach movieclips that exist only in the library and not anywhere on a timeline. In order to use attachMovie, we need to specify an export name for the movieclip. Right-click on the library entry for category, click Linkage, check Export this Symbol, and specify an identifier of "mcCategory". Now we're ready to create the pie chart and we'll do it all in one frame.
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
![]() |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|