Close PopUps, TitleWindow, Panel etc by clicking the modal in Flex

I got one query, how to close Popups ( TitleWindow, Panel etc. ) just by clicking on Modal.

A functionality which we found in HTML / Javascript based modal (with lightbox ), some thing we can see now a days in Yahoo Mails, when we see images attached in our mails.

See, Modal is actually a FlexSprite instance in Flex frame work (same as well for AIR ). The Modal is created by SystemManager in Flex.

So, if we want to just close ( or to perform any business logic ), it is very easy, just listen for an Event.

The event is : ‘ mouseDownOutside ‘ .
A simple example is as below…
There are two files : 1) ModalTitleWindow.mxml 2) ModalClose.mxml

Continue reading

Advertisements