Skip to content
seanhess edited this page Sep 13, 2010 · 18 revisions

The framework allows you to select any component in an app with a css syntax similar to both jQuery and CSS3.

When you match by styleName, you can set more than one style, for example Adding more than one styleName will prevent normal flex styles from working unless you add the MultiStyle behavior.

You can match any combination of criteria. For example, the following are all valid.

<Selector match=".a.b.c">
<Selector match="Canvas#main .form Button.submit"/>

Tag

<Selector match="Button"/>

Matches all Buttons, but not subclasses

styleName

<Selector match=".fat"/>

Matches all components with styleName=“fat” or styleName=“fat one two”

id

<Selector match="#content"/>

Matches all components with a particular id

Class

<Selector match="mx.core.IButton"/>

Match any class, a superclass or interface (uses the “is” operator)

Anything

<Selector match="*"/>

Match anything (make sure you want to do this)

Descendants

<Selector match="#nestedCanvas Button">

Match a component within another

Direct Child

<Selector match="#rowBox > mx.core.Container">

Match a component that is a child of another

Event and Odd

<Selector match="#rowBox > Canvas:odd">

Checks whether the component has an even or odd child index

Clone this wiki locally