Home arrow Flash arrow Page 5 - Flash MX Pro 2004 - Text Area Component
FLASH

Flash MX Pro 2004 - Text Area Component


FlashFlash 5 introduces specialized movie clips called SmartClips. The major drawback was that SmartClips exported into the first frame of a movie, and could cause serious loading delays, a nightmare for anyone on dialup. Flash MX introduced an improvement in the TextField component which reduced the need to export it as a SmartClip. Enter TextArea. In this article, we’ll discuss the TextArea component in detail, as well as covering some of the possible bugs that might be encountered while working with it.

Author Info:
By: Jefferis Peterson
Rating: 4 stars4 stars4 stars4 stars4 stars / 55
January 26, 2004
TABLE OF CONTENTS:
  1. · Flash MX Pro 2004 - Text Area Component
  2. · Transition
  3. · The TextArea Component – First Encounter
  4. · Bugs
  5. · Using the TextArea
  6. · Steps

print this article
SEARCH DEVARTICLES

TOOLS YOU CAN USE

advertisement
Flash MX Pro 2004 - Text Area Component - Using the TextArea
(Page 5 of 6 )

As you can see by the new TextArea Component Inspector (Fig. 4), the promise of this Component is that you can link text content from an online database, creating a reusable dynamic display. With the new Class structure in ActionScript 2, you can also create a reusable style set to govern the appearance of the TextArea's background color, skins, etc. However, my less lofty goal was to add a text file to one component and get it to display with some style. In my view, an upgrade to a program should make the harder things simple while not making the simple things hard. So far, I'm finding the simplest things being much harder to do - a situation that might be remedied by better documentation.

TextField
Fig. 4 – TextArea Component Inspector

Warning: One of the most important changes to the new ActionScript model is the addition of Class Structure, which is used as an integral part of creating styles and definitions, among other things. This new way of doing things is taken for granted by the programmers who wrote the manual, but it is not well or often explained to the new user. One thing that really threw me is a rather basic thing. I've used PHP but never used Classes. I never needed them, so when seeing new code like


myTextStyle = new TextField.StyleSheet();
myTextContent 
= new XML();

it never dawned on me that this code was a Class definition. I thought it was a variable definition, and I couldn't figure out how anyone could keep reusing a variable definition 'new Anything' for multiple instances without losing the original variable. In this example, new XML() creates an instance of the predefined XML Class which exists in ActionScript 2. If you do not understand that you can create multiple instances of a Class, you will be lost with much of the documentation provided with Flash 2004. So, the following code is a valid way of creating three instances of text XML object:


myTextContentA = new XML();
myTextContentB 
= new XML();
myTextContentC 
= new XML();

An  instance of a Class is different animal entirely than a variable definition – as in myText.text = "a string", which defines the value of the text itself. So, with that warning, we shall proceed.

Next: Steps >>

blog comments powered by Disqus
FLASH ARTICLES

- More Top Flash Game Tutorials
- Top Flash Game Tutorials
- Best Flash Photo Gallery Tutorials
- The Top Flash Tutorials for Menus
- 7 Great Flash Tutorials
- Adobe Creative Suite 5.5 Now Available
- Critical Flash Vulnerability Heats Up the Web
- More on Nonpersistent Client-Side Remote Sha...
- Nonpersistent Client-Side Remote Shared Obje...
- Using the Decorator Pattern for a Real Web S...
- Using Concrete Decorator Classes
- Delving More Deeply into the Decorator Patte...
- The Decorator Pattern in Action
- A Simple Decorator Pattern Example
- Decorator Pattern

Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Weekly Newsletter
 
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 
Support 



© 2003-2012 by Developer Shed. All rights reserved. DS Cluster 4 - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials