Flex Examples

Syndicate content
Random stuff I pick up along the way.
Updated: 20 min 52 sec ago

Stepping through an FxHSlider control in Flex Gumbo

Thu, 11/20/2008 - 10:18

The following example shows how you can change the value in a Flex Gumbo FxHSlider component by using the step() method.

Full code after the jump.

(more…)

Upgrading to Flex Builder 3.0.2

Wed, 11/19/2008 - 02:05

On November 17th, Adobe released Flex Builder 3.0.2 and Flex SDK 3.2. For more information on what’s new, check out Matt Chotin’s excellent article, “Introducing Flex SDK 3.2 and Flex Builder 3.0.2″.

There are two ways to download and install the latest update to Flex Builder 3.
The easiest way is to select Help > Search for Flex Builder Updates from the main menu in Flex Builder. This should launch the Adobe updater which will search for the latest version of Flex Builder on the Adobe servers.
The other way to get the latest Flex Builder update is to go to the Adobe Flex Support Center’s “Updaters” page and download the updater installer for Mac or Windows.

(more…)

Stepping through an FxHScrollBar in Flex Gumbo

Wed, 11/19/2008 - 00:47

In a previous example, “Paging through an FxHScrollBar in Flex Gumbo”, we saw how you could change the horizontal scroll position a single page up or page down in a Flex Gumbo FxHScrollBar component by using the page() method.

The following example shows how you can change the horizontal scroll position a single line up or line down in a Flex Gumbo FxHScrollBar component by using the step() method.

Full code after the jump.

(more…)

Paging through an FxHScrollBar in Flex Gumbo

Wed, 11/19/2008 - 00:16

The following example shows how you can change the horizontal scroll position a single page up or page down in a Flex Gumbo FxHScrollBar component by using the page() method.

Full code after the jump.

(more…)

Wrapping values on an FxNumericStepper control in Flex Gumbo

Mon, 11/17/2008 - 22:34

The following example shows how you can wrap values in a Flex FxNumericStepper control by setting the valueWrap property.

Full code after the jump.

(more…)

Programmatically selecting text in an FxTextArea control in Flex Gumbo

Mon, 11/17/2008 - 00:57

The following example shows how you can use ActionScript to select text in a Flex Gumbo FxTextArea control by calling the setSelection() method. This example also shows how you can determine the current text selection’s anchor position and active position by using the selectionAnchorPosition and selectionActivePosition properties.

Full code after the jump.

(more…)

Setting the inactive text selection color on a FxTextArea control in Flex Gumbo

Sat, 11/15/2008 - 23:09

In previous examples, “Setting the text selection color on a FxTextArea control in Flex Gumbo” and “Setting the unfocused text selection color on a FxTextArea control in Flex Gumbo”, we saw how to to set the text selection color when the FxTextArea is focused and unfocused by setting the selectionColor and unfocusedSelectionColor styles respectively.

The following example shows how you can set the inactive text selection color on a Flex Gumbo FxTextArea control by setting the inactiveSelectionColor style.

Full code after the jump.

(more…)

Setting the unfocused text selection color on a FxTextArea control in Flex Gumbo

Fri, 11/14/2008 - 20:58

In a previous example, “Setting the text selection color on a FxTextArea control in Flex Gumbo”, we saw how you couldset the text selection color on a Flex Gumbo FxTextArea control by setting the selectionColor style.

The following example shows how you can set the unfocused text selection color on a Flex Gumbo FxTextArea control by setting the unfocusedSelectionColor style.

Full code after the jump.

(more…)

Setting the text selection color on a FxTextArea control in Flex Gumbo

Thu, 11/13/2008 - 21:12

The following example shows how you can set the text selection color on a Flex Gumbo FxTextArea control by setting the selectionColor style.

Full code after the jump.

(more…)

Creating multicolumn text in an FxTextArea control in Flex Gumbo

Wed, 11/12/2008 - 21:26

The following example shows how you can create multicolumn text in a Flex Gumbo FxTextArea control by setting the columnCount style.

Full code after the jump.

(more…)

Setting a mask type on an Ellipse in Flex Gumbo

Tue, 11/11/2008 - 20:51

The following example shows how you can set an Ellipse object’s mask type as a clip mask or alpha mask by setting the maskType property.

Full code after the jump.

(more…)

Detecting when the number of radio buttons changes in a radio button group in Flex

Mon, 11/10/2008 - 20:56

The following example shows how you can detect when the number of RadioButton objects changes in a RadioButtonGroup in Flex by listening for the numRadioButtonsChanged event.

Full code after the jump.

(more…)

Opening a new browser window by double clicking an Image control in Flex

Sun, 11/09/2008 - 20:28

The following example shows how you can open a new browser window/tab by double clicking a Flex Image control by setting the doubleClickEnabled property to true and calling the navigateToURL() method

Full code after the jump.

(more…)

Setting text styles for a selected button in a ToggleButtonBar control in Flex

Sat, 11/08/2008 - 22:12

The following example shows how you can set the text color for the selected button in a Flex ToggleButtonBar control by setting the selectedButtonTextStyleName style.

Full code after the jump.

(more…)

Adding custom context menu items to a Flex application

Fri, 11/07/2008 - 11:14

The following example shows how you can add custom context menu items to a Flex application by creating new ContextMenuItem objects and adding them to the Flex application’s customItems array (via the contextMenu property).

Full code after the jump.

(more…)

Animating colors using the FxAnimateColor effect in Flex Gumbo

Thu, 11/06/2008 - 23:59

The following example shows how you can create an animated transition between two colors using the Flex Gumbo FxAnimateColor class.

Full code after the jump.

(more…)

Setting a DataGrid control’s data provider to an XML object in Flex

Wed, 11/05/2008 - 23:05

The following example shows how you can use an XML object as a data provider for a Flex DataGrid control and use a custom label function to display the XML node’s name.

Full code after the jump.

(more…)

Setting the line height on an FxTextArea control in Flex Gumbo

Tue, 11/04/2008 - 22:50

The following example shows how you can set the line height on a Flex Gumbo FxTextArea control by setting the lineHeight style.

Full code after the jump.

(more…)

Aligning text vertically within an FxTextInput control in Flex Gumbo

Tue, 11/04/2008 - 22:15

The following example shows how you can align text vertically within a Flex Gumbo FxTextInput control by setting the verticalAlign style.

Full code after the jump.

(more…)

Setting mouse cursors in Flash Player 10

Mon, 11/03/2008 - 23:49

The following example shows how you can set mouse cursors in Flash Player 10 by setting the Mouse object’s cursor property to one of the static constants in the MouseCursor class.

Full code after the jump.

(more…)