Ultrashock Tutorials > Flash MX 2004 > Flash MX 2004 UI Components  
 
by Aral Balkan,  BitsAndPixels.co.uk 
Download Source Files (5MB!)  
 
Flash MX 2004 UI Components
 

 01. v1 Components, We Hardly Knew Ye 
 02. Button Component 
 03. Alert Component 
 04. Checkbox Component 
 05. Radio Buttons 
 06. The List Box family of Components 
 07. Date Chooser Component 
 08. Date Field Component 
 09. Label Component 

 10. Loader / Progress Bar Components 
 11. Numeric Stepper Component 
 12. Text Area/Input Components 
 13. Menu / Menu Bar Components 
 14. Scroll Pane Component 
 15. Window Component 
 16. Tree Component 
 17. Accordion Component 
 18. Conclusion 

Aral Balkan is co-author of
Flash MX Components Most Wanted.
Click to check it out at Amazon.com!
- discuss this tutorial -

09. Label Component

It may seem funny at first to have a component for something as basic as a Label and, for most cases, you will probably not want to use a label component unless you are using the Data Components and Databinding. Let's quickly look at this simple component in any case.

  1. Start a new Flash movie.

  2. Drag three Label components on Stage and place them one under the other, as shown below.



  3. Select the topmost Label instance and set its parameters using the Property Inspector (PI), as shown below.



  4. Select the next Label down and set its parameters using the PI, as shown below.



  5. Select the last Label and set its parameters using the PI, as shown below. Note that unlike a dynamic textfield, you can enter HTML text directly into a Label component using the PI.



  6. Test the movie and see how the various parameters affect the displayed label. Notice especially how the second label resizes to fit the text (since you set autoSize to "left") where the first one cuts it off. You can see the final output in the movie below.


- discuss this tutorial -
 
©2003 Ultrashock.com - All rights reserved