Monthly Archives: February 2008

Disabling user input in a Flex Application

I’ve seen this come up a few times in various lists, and figured maybe somebody out there may find this useful.

The following example shows how you can prevent user input in a Flex application by setting the enabled property to false in the <mx:Application /> tag, or by setting the Application.application.enabled property.

Any suggestions? Leave them in the comments!

Full code after the jump.

Continue reading Disabling user input in a Flex Application

Creating custom timers by extending the Timer class

In a previous example, “Creating timers using the Timer class”, we saw how to create simple timers using the Timer class and listening for the timer and timerComplete events.

The following examples show how you can extend the Timer class to add methods and properties to the Timer object, which allow you to pass additional data to the event handlers.

Full code after the jump.

Continue reading Creating custom timers by extending the Timer class

Creating timers using the Timer class

In previous examples, we saw how to use the setInterval() and setTimeout() methods to create simple timers.

The following example shows how you can execute code at regular intervals using the Timer class. It also shows you how you can create timers that repeat continuously as well as timers which only execute a specific number of times.

Full code after the jump.

Continue reading Creating timers using the Timer class

Setting the selection color and selection disabled color for a row in the Flex DataGrid control

The following example shows how you can edit the row selection color and disabled selection color of a DataGrid control in Flex by setting the selectionColor and selectionDisabledColor styles.

Full code after the jump.

Continue reading Setting the selection color and selection disabled color for a row in the Flex DataGrid control