The Flex 4 SDK supports a couple of selectors that you can use to affect…controls throughout an application or in very specific situations.…In this demonstration, I'll show you the global selector and a new feature of…the Flex 4 SDK called descendant selectors.…The global selector is applied only at the application level that is you can…declare it only in an embedded style sheet within the application or an external…style sheet that's linked into the application main file.…You can't use the global selector say in a style sheet that's linked into…a custom component.…

When you declare the global selector, its properties are applied to all visual…components throughout the application.…Common uses of the global selector include setting a default font family,…font size, and color.…I'll demonstrate the global selector in the application file,…AdvancedSelectors.mxml.…I'll place the cursor above the existing style declarations in the embedded…style sheet, and type in the name of the selector, global.…

Resume Transcript Auto-Scroll

Author

Released

3/22/2010

Adobe's open source programming framework, Flex SDK, combined with Flash Builder (formerly named Flex Builder) simplifies and streamlines the process for building rich internet applications, or RIAs. Author David Gassner explores the newest release of this powerful toolset in Flash Builder 4 and Flex 4 Essential Training, explaining critical information for developers who are upgrading from Flex 3, but also for those who are new to RIA development. The course culminates in the development of a complete application, integrated with a PHP application server and a MySQL database. Exercise files accompany the course.

Topics include:

Understanding the history of Adobe Flex

Installing the Flash Builder components

Using Eclipse views and editors

Programming with MXML and integrating MXML and ActionScript

Debugging Flex applications

Adding visual controls to a Flex application interface

Displaying images and dynamic data

Formatting with CSS

Skinning Spark components with MXML graphics

Creating data entry form components

Integrating with Apache, PHP and MySQL

Skill Level Beginner

10h 27m

Duration

574,989

Views

Show MoreShow Less

Q: After importing the Debugging.fxp file following the steps outlined in the “Importing and exporting projects as FXP files” video, several of the applications will not run.When I attempt to debug or run the Variables.mxml or Watchpoints.mxml applications, I am unsuccessful. Pressing F11 to debug causes Flex to look for an application it CAN run, and runs that one. If I Right-Click one of the aforementioned applications and then click Run Application, an error appears that says “This file cannot be launched.”What is causing this problem?

A: This is a common issue with Flash Builder. Before pressing F11 (or right-clicking and choosing Run Application), set the current MXML application file as the "default" by right-clicking it and choosing "Set as default application".This should ensure that the application you want to preview opens in the browser when you press F11.

Q: When trying to specify the fontStyle as italic in both ways described in the first and second videos of the “Using Cascading Style Sheets (CSS)” chapter, only the literal string "italic" seems to work. If I use the constant for the same value like this:
fontStyle="{FontPosture.ITALIC}"
I get a warning that reads:
"Design mode: Error during component layout. Choose Design > Refresh to refresh design mode."
Even if I try to refresh, design mode will not work until I change it back to the literal string. I made sure the import for this namespace was there by pressing Ctrl+spacebar, refreshed design mode several times, and even restarted Flash Builder. However, the only solution seems to be to use the literal. Is there a fix for this?

A: The use of constants and bindings in MXML style attributes results in unpredictable results in Design View, as evidenced by this error. Unfortunately, the best you can expect is that design view will render the presentation, but won't show the results of the style setting, because Design View isn't capable of evaluating MXML bindings without the benefit of Flash Player's runtime capabilities.

Q: Is Flash Builder compatible with Mac OS X 10.7 (Lion)?

A: Yes, Flash Builder 4.51 is compatible with the most recent
version of Mac OS X. (The original Flash Builder 4 is not compatible
with Lion; if you want to upgrade Mac OS X, you'll also need to upgrade
Flash Builder.)

Unlike previous versions of Mac OS X, Lion does not include a default Java development environment. Before running the Flash Builder installer, you should install Java for Mac OS X. Failure to do this will result in Flash Builder 4.5, rather than 4.5.1, being installed on the system.

You can trigger the installation of Java with these steps:

1. Open Terminal.

2. Type 'java' and press Return.

3. Follow the prompts to download and install Java.

There
is one usability issue that will affect all users of Flash Builder on
Mac OS X 10.7–right-clicking in the package explorer may stop working
after prolonged use of Flash Builder. To resolve the issue Flash Builder
must be restarted.

Finally,
the Flash Builder installer includes a version of Flash Player that is
not recommended for use with Mac OS X 10.7. Rather than installing the
default version, you should download and install the latest debugger
version from http://www.adobe.com/support/flashplayer/downloads.html.