Monthly Archives: June 2008

Playing a sound effect when a ProgressBar control completes in Flex

In a previous example, “Setting a complete effect on a ProgressBar control in Flex”, we saw how you could apply an effect that plays once a Flex ProgressBar control completes (reaches 100%).

The following code shows how you can play an embedded sound effect once a Flex ProgressBar control completes using the mx.effects SoundEffect class and the ProgressBar class’s completeEffect effect/style.

Full code after the jump.

Continue reading Playing a sound effect when a ProgressBar control completes in Flex

Preventing an image from automatically loading in an Image control in Flex

The following example shows how you can prevent the Flex Image control to automatically loading an image when setting the Image control’s source property by setting the autoLoad property to false and then explicitly loading the image using the load() method.

Full code after the jump.

Continue reading Preventing an image from automatically loading in an Image control in Flex

Detecting when the label placement changes on a Button control in Flex

In an earlier example, “Positioning an icon within a button using the Button.labelPlacement property”, we saw how you can set a Flex Button control’s label placement using the labelPlacement property.

The following example shows how you can detect when the labelPlacement property has changed using the labelPlacementChanged event.

Full code after the jump.

Continue reading Detecting when the label placement changes on a Button control in Flex

Detecting when a RadioButtonGroup has been enabled or disabled in Flex

In a previous example, “Enabling and disabling RadioButton controls in a RadioButtonGroup in Flex”, we saw how you can enable or disable all of the RadioButton controls in a Flex RadioButtonGroup by setting the enabled property.

The following example shows how you can detect when the enabled property changes by using the enabledChanged event.

Full code after the jump.

Continue reading Detecting when a RadioButtonGroup has been enabled or disabled in Flex