Mega Code Archive

 
Categories / Flex / Event
 

Detect a Mouse Click Outside a Pop Up to Close It

<?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"  xmlns:s="library://ns.adobe.com/flex/spark"                             >     <mx:LinearGradient id="gradient" rotation="45">             <mx:GradientEntry color="#000000" ratio="0"/>             <mx:GradientEntry color="#0000FF" ratio="1"/>     </mx:LinearGradient>     <s:Scroller width="100%" height="100%">         <s:Group>             <s:Rect height="300" width="400" fill="{gradient}"/>         </s:Group>     </s:Scroller> </mx:Application>