When using mouseDownOutside with PopUpAnchor, clicking the toggle button was not closing the PopUpAnchor Popup.
Use the event.relatedObject of the mouseDownOutside event and determine if the ToggleButton is the relatedObject.
Using a toggle button to open and close a PopUpAnchor I found that the user wanted a mouseDown external to the popup to trigger the close of the popup. I found the "mouseDownOutside" event that can be used in a child of a PopUpAnchor to trigger an event that I can attach the close to. In doing this I found that the clicking the toggleButton would dispatch 2 events. Rather than trying to change my code to use the events and try and stop one of the events from occuring. The following is a solution that I thought was simple, and that I would share on Cookbooks.
<s:ToggleButton
x="8"
y="7"
skinClass="com.tass.intranet.binary.ui.skins.SearchOptionsToggleSkin"
id="my_toggle"
selected="{ displayMyPanel }"
click="displayMyPanel = true;"
/>
<s:PopUpAnchor top="115" right="302" displayPopUp="{
displayMyPanel }">
<s:Panel
id="my_panel"
mouseDownOutside="if ( event.relatedObject !=
my_toggle ) { displayMyPanel = false; }"
/>
</s:PopUpAnchor>
+