Archive for the 'PopUpManager' Category

16
Aug

Creating an undraggable TitleWindow container in Flex

In a previous example, “Creating an undraggable Alert control in Flex”, we saw how you could create a Flex Alert control that isn’t draggable by listening for the mouseDown event and calling the stopImmediatePropagation() method in the event handler.

The following examples show how you can create an undraggable TitleWindow container by setting the isPopUp property to false on the TitleWindow instance.

Full code after the jump.

Continue reading ‘Creating an undraggable TitleWindow container in Flex’

06
Aug

Creating a simple image gallery with the Flex HorizontalList control (redux)

In a previous example, “Creating a simple image gallery with the Flex HorizontalList control”, we saw how to create a simple image gallery using the HorizontalList control and Image control in Flex.

The following example shows how you can change the full image whenever you roll your mouse cursor over the items in the HorizontalList control, as well as how you can double click an item in the Horizontal List control to display the image using the PopUpManager class.

Full code after the jump.

Continue reading ‘Creating a simple image gallery with the Flex HorizontalList control (redux)’

04
Aug

Closing a pop up window using the keyboard in Flex

The following example shows how you can close a pop up window when a user presses the Escape key in Flex.

Full code after the jump.

Continue reading ‘Closing a pop up window using the keyboard in Flex’

04
Aug

Displaying a video in a pop up window in Flex

The following example shows how you can use the PopUpManager class to display a VideoDisplay control in a TitleWindow container in Flex.

Full code after the jump.

Continue reading ‘Displaying a video in a pop up window in Flex’

20
Mar

Creating custom pop-up windows with the PopUpManager class (redux)

In a previous example, “Creating custom pop-up windows with the PopUpManager class”, we saw how you could use ActionScript to create pop up windows using the PopUpManager class in Flex.

In the following example we see how you can create a custom MXML component and pass the class name to the static PopUpManager.createPopUp() method to display the pop up.

Full code after the jump.

Continue reading ‘Creating custom pop-up windows with the PopUpManager class (redux)’

22
Oct

Programmatically removing an Alert using the PopUpManager

The following example shows how you can close an Alert control by calling the PopUpManager class’s removePopUp() method.

Full code after the jump.

Continue reading ‘Programmatically removing an Alert using the PopUpManager’

12
Oct

Globally setting modal styles in a Flex application

The topic of setting modal styles came up again today so I thought I’d re-share this tip (I previously covered controlling modal styles for the Alert control in an earlier post, “Changing a modal Alert control’s blur, transparency and transparency color”).

The following example shows how you can set the various modal styles (modalTransparencyBlur, modalTransparency, modalTransparencyColor, and modalTransparencyDuration) on the global selector so it propogates to both the Alert control and pop-ups created using the PopUpManager.

Full code after the jump.

Continue reading ‘Globally setting modal styles in a Flex application’

20
Aug

Creating custom dialog boxes using the PopUpManager and TitleWindow classes

Here are a couple examples of using the TitleWindow container with the PopUpManager class to create custom pop-up windows and dialog boxes.

Full code after the jump.

Continue reading ‘Creating custom dialog boxes using the PopUpManager and TitleWindow classes’

06
Aug

Creating custom pop-up windows with the PopUpManager class

The Alert control is great if you need to get a simple confirmation on an action which has a yes/no type answer, but what do you use when you need to prompt a user for their name or something else? JavaScript has a prompt(), and Flex has a very robust PopUpManager class.

This following example will demonstrate how to launch a custom Panel pop-up dialog which includes a Label control, TextInput control, and two Button controls. It also shows how to create a bunch of Flex components and containers using ActionScript instead of MXML.

Full code after the jump.

Continue reading ‘Creating custom pop-up windows with the PopUpManager class’