点击活动外Flex中自定义组件 [英] Click-outside event on custom components in flex

查看:101
本文介绍了点击活动外Flex中自定义组件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有一种方法,当用户的自定义组件实例的点击之外的编写被触发的自定义事件?基本上其他地方在主Flex应用程序。 谢谢你。

Is there a way to write a custom event that gets triggered when the user clicks outside of that custom component instance? Basically anywhere else in the main flex app. Thanks.

推荐答案

您可以使用 FlexMouseEvent.MOUSE_DOWN_OUTSIDE 事件。例如:

You can use the FlexMouseEvent.MOUSE_DOWN_OUTSIDE event. For example:

myPopup.addEventListener(
   FlexMouseEvent.MOUSE_DOWN_OUTSIDE,
   function(mouseEvt:FlexMouseEvent):void
   {
       PopUpManager.removePopUp(myPopup);
   }
);

这篇关于点击活动外Flex中自定义组件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆