Monthly Archives: November 2009

Setting a dynamically loaded background image fill on a Spark Border container in Flex 4

In a previous example, “Setting a background image fill on a Spark Border container in Flex 4”, we saw how you could set a background image fill on a Spark Border container in Flex 4 by setting the backgroundImage style to an embedded image.

The following example shows how you can use a dynamically loaded image as a Spark Border container background by using an MX SWFLoader control and setting the backgroundImage style to the SWFLoader control’s content property.

Full code after the jump.

Continue reading Setting a dynamically loaded background image fill on a Spark Border container in Flex 4

Styling the selected tab on a Spark TabBar control in Flex 4

In a previous example, “Styling the selected button on a Spark ButtonBar control in Flex 4”, we saw how you could style the currently selected button on a Flex 4 Spark ButtonBar control by styling the various states on the Spark ButtonBarButton selector.

The following example shows how you can style the currently selected tab on a Flex 4 Spark TabBar control by styling the various states on the Spark ButtonBarButton selector.

Continue reading Styling the selected tab on a Spark TabBar control in Flex 4

Creating an animated transition when scrolling through items in a Spark HGroup container in Flex 4

The following example shows how you can create a simple horizontal list using a HGroup container and do an animated scroll using the Animate and SimpleMotionPath classes and the getHorizontalScrollPositionDelta() method

Full code after the jump.

Continue reading Creating an animated transition when scrolling through items in a Spark HGroup container in Flex 4

Setting the selection highlight color on a Spark RichEditableText control in Flex 4

The following example shows how you can set the text selection highlight color on a Spark RichEditableText control in Flex 4 by setting the focusedTextSelectionColor style.

Full code after the jump.

Continue reading Setting the selection highlight color on a Spark RichEditableText control in Flex 4