Macromedia Flash MX 2004: Putting the "Application" in RIA
Table of Contents
- Introduction
- Data Control: Data Binding Components
- Visual Control: CSS, Images, and Text
- User Control: Macromedia Flash Player 7
- Video Control: Quality and Delivery Options
- Project Control: Workflow, Custom Code, and Accuracy
- Extending Macromedia Flash: Customizing and Simplifying Your Work Process
- More, More, More: Starting a List of the Top 50 Features
Visual Control: Cascading Style Sheets (CSS), Images, and Text
Cascading Style Sheets (CSS)
Whether you consider visual presentation as the role for the designer or the developer, you still strive to have control. In the area of text display, you'll find some killer new features.
Perhaps the most profound improvement is support for the Cascading
Style Sheets (CSS) in onscreen text fields. On the surface this is simply
an update to the TextFormat object, a feature you use to control formatting
with script. However, CSS goes a bit further, letting you import standard
CSS documents that you may be using elsewhere in your site. Also, the
support for a:hover will surely lift some of you off your
feet; it lets you quickly add rollover effects to dynamic text. Note
that like the support for HTML, you can't include every last CSS style
known to man—but this is still a very versatile feature.
HTML Embedded Images
By no means has Macromedia ignored HTML text support in the new version. Probably the second coolest text-related feature is three little simple letters: src. That is, you can embed JPGs, SWFs, or other symbols right into text fields. Text flows around the images automatically as shown in Figure 2. You can even use code to call out to the embedded SWFs, for example, to make them start or stop animating.
Figure 2. Image embedded into a text field, with text flowing around it automatically
Small, But Clear, Text
You may be getting the impression that there are a lot of text-related improvements, and there are. Text is a great way of communicating a lot of detailed information in a small space.
No doubt you've seen how small text can look fuzzy because of anti-aliasing. Many users have struggled with this issue, searching for custom fonts that would still look good at small sizes. Now you can get around this issue with one click. Want to make small text look good? Just click the Property inspector's Alias Text button, and you're all set.
Text Metrics
Controlling exactly how text appears is now possible with improved
font metrics support. In the past, getTextExtent() only
returned width and height for a single line of text, and it wasn't even
accurate! New properties (including ascent and descent) make all kinds
of complex layouts possible.
Dancing with Pixels: No More Pixel Shift
If you just heard someone out there scream "Yes!" that's probably because he's just learned that Macromedia Flash Player 7 no longer exhibits that tiny little pixel shift with raster graphics. Although this may reduce the workload of the "witch doctors" your company employs to rid your apps of this curse, it's surely a relief to many, even if some of your clients never noticed it.