Similar to a previous example, “Creating a simple image gallery with the Flex HorizontalList control”, the following example shows how you can create a simple photo gallery in Flex using the TileList control, Image control, and the PopUpManager class.
Full code after the jump.
Continue reading ‘Creating a simple image gallery with the Flex TileList 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’
We’ve already seen how to get a TextInput control to display its text as a masked password field before in an earlier example, “Displaying a TextInput control’s text as a password in Flex” by setting the displayAsPassword property to true.
The following example will show you how you can listen for the focusIn and focusOut events to toggle the displayAsPassword property so that when the password field has focus the text is displayed as plain text, and when the password field does not have focus the text is displayed as masked text.
Full code after the jump.
Continue reading ‘Displaying a TextInput control’s text as a password in Flex (redux)’
The following example shows how you can use the PopUpManager class to launch an modal Image control.
Full code after the jump.
Continue reading ‘Using the Image control as a pop up’
This is a bit more of a “gotcha” than a tip, but it is something I’ve run into twice in the past week or so. When working with application domains and singletons (such as the DragManager or PopUpManager). I’ve been playing with modules the past couple days and ran into an issue when trying to drag items from a DataGrid in one module to a DataGrid in the second module. When trying to select an item in one of the data grids, I’d get strange run-time errors. The solution? Create a reference in my main application to a dummy DragManager or PopUpManager instance.
Hopefully this will save somebody a little bit of a headache in the future.
Full code after the jump.
Continue reading ‘Modules and singleton manager classes’