Custom PopUpManager

In my post about modal animations, I demoed a video of an app where I experimented with a 3D’ish transition when using Flex’s PopUpManager.

In this post I will show how you can achieve the same. Start by downloadin the source code below.
See running application of this code here (Click the images to spawn windows. Spawned windows can be dragged)

You will need a minimum of these classes:

  • CustomApplicationPreloader ( Must extend SparkDownloadProgressBar. )
  • CustomPopUpManagerImpl ( Must extend PopUpManagerImpl – here you must also import mx.core.mx_internal; and declare that you use mx_internal. use namespace mx_internal; )
  • I3DPopUpAnimation Interface Class ( An empty Interface that you implement for UI that you want to have the 3D animation when popped up )

To Achieve this you need to tell Flex to register your implementation of an IPopUpManager instead of using the default. I Do this in a custom Flex preloader, so I know that it is run before  anything else.

Go ahead and download an investigate the source code. Start by looking at the CustomApplicationPreloader.as First, then take notice that this class will need to be referenced in the Main Application’s preloader property.
For the effect itself, you should be able to read my comments in the custom PopUp Implementation in the CustomPopUpManagerImpl.as File.

For any questions, please use the comments section below.

 
416 Downloads