Monthly Archives: October 2009

Clearing the video on a Spark VideoPlayer control in Flex 4

In a previous example, “Clearing the video on a Spark VideoElement control in Flex 4”, we saw how you could clear a Spark VideoElement control’s video stream in a Flex 4 application by calling the clear() method on the VideoElement instance’s videoObject property.

The following example shows how you can clear a Spark VideoPlayer control’s video stream in a Flex 4 application by calling the clear() method on the VideoPlayer instance’s videoElement.videoObject property.

Full code after the jump.

Continue reading Clearing the video on a Spark VideoPlayer control in Flex 4

Clearing the video on a Spark VideoElement control in Flex 4

In a previous example, “Clearing the video on a Flex VideoDisplay control”, we saw how you could clear a VideoDisplay control’s content using the videoPlayer property in the mx_internal namespace.

The following example shows how you can clear a Spark VideoElement control’s video stream in a Flex 4 application by calling the clear() method on the VideoElement instance’s videoObject property.

Full code after the jump.

Continue reading Clearing the video on a Spark VideoElement control in Flex 4

Customizing the appearance or a hyperlink in a TextFlow object in Flex 4

In a previous example, “Globally styling anchor tags on a Spark RichEditableText control in Flex 4”, we saw how you could globally style the normal and hover states of a hyperlink on a Flex 4 Spark RichEditableText control by setting the static TextFlow.defaultConfiguration object.

The following example shows how you can use a custom link formats to a TextFlow object in Flex 4 by padding a Configuration object to the static TextConverter.importToFlow() method.

Continue reading Customizing the appearance or a hyperlink in a TextFlow object in Flex 4

Rounding individual corners of an Image control in Flex using a mask

In a previous example, “Rounding the corners of an Image control in Flex using a mask”, we saw how to round the corners on a Flex Image control by creating a rounded Sprite control using the drawRoundRect() method and setting the mask property.

The following example shows how you can round selected corners of an Image control in Flex by creating a rounded Sprite control using the drawRoundRectComplex() method and setting the mask property.

Continue reading Rounding individual corners of an Image control in Flex using a mask

Adding custom context menu items to a Flex 4 application

In a previous example, “Adding custom context menu items to a Flex application”, we saw you could 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).

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

Full code after the jump.

Continue reading Adding custom context menu items to a Flex 4 application

Modifying a color’s saturation in Flex 4

In a previous example, “Modifying a color’s brightness in Flex 4”, we saw how you could modify a color’s brightness in Flex 4 by using the static HSBColor.convertRGBtoHSB() and HSBColor.convertHSBtoRGB() methods and the brightness property.

The following example shows how you can modify a color’s saturation in Flex 4 by using the static HSBColor.convertRGBtoHSB() and HSBColor.convertHSBtoRGB() methods and the saturation property.

Full code after the jump.

Continue reading Modifying a color’s saturation in Flex 4