The following example shows how you can style a Flex Alert control using the static StyleManager.getStyleDeclaration() method, and the setStyle() method.
Full code after the jump.
The following example shows how you can style a Flex Alert control using the static StyleManager.getStyleDeclaration() method, and the setStyle() method.
Full code after the jump.
The following example shows how you can set a Flex Button control’s icon style to an asset from a SWF file using MXML or ActionScript.
Full code after the jump.
Continue reading ‘Setting a Button control’s icon to an asset from a SWF file in Flex’
The following example shows how you can determine if a Flex application has focus or not by listening for the activate and deactivate events on the <mx:Application /> container.
Full code after the jump.
I’ve seen this question come up a few times recently in various forums/lists and even in my blog comments (see “Changing the default sort arrow skin on a Flex DataGrid control”).
The following example shows how you can display the sort arrow in a DataGrid control in Flex without having the user click on a column header in the DataGrid control.
Full code after the jump.
The following example shows how you can set effects on a Flex Image control using ActionScript by setting the showEffect and hideEffect effects using the setStyle() method.
Full code after the jump.
Continue reading ‘Setting effects with ActionScript in Flex’
The following example shows how you can use a Tree control as a PopUpButton control’s pop up in Flex.
Full code after the jump.
Continue reading ‘Displaying a Tree control as a pop up for a Flex PopUpButton control’
The following example shows how you can change the sort arrow skin on a DataGrid control in Flex by setting the sortArrowSkin style.
Full code after the jump.
Continue reading ‘Changing the default sort arrow skin on a Flex DataGrid control’
The following example shows how you can detect when the mouse leaves the bounds of a Flex application by listening for the stage object’s mouseLeave event.
Full code after the jump.
Continue reading ‘Detecting when a mouse leaves 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’
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’