Flex Path - 捕获 Click 事件 [英] Flex Path - capturing Click event

查看:21
本文介绍了Flex Path - 捕获 Click 事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在研究一个在 Flex 中创建弧形和楔形形状的示例,这些形状使用路径组件来绘制笔触和填充.

I am working through an example for creating Arc and Wedge shapes in Flex that use the Path component to draw the stroke and fill.

http://hansmuller-flex.blogspot.com/2011/10/more-about-approximating-circular-arcs.html#comment-form

我想向 Arc/Wedge 添加一个点击事件,但路径不能有一个 Click 事件(或者我认为任何其他事件作为它的原始变量).

I was looking to add a click event to the Arc/Wedge, but a Path cannot have a Click event (or really any other events as its a primitive variable I think).

您认为有解决方法吗?

推荐答案

回答我自己的问题:

我添加了一个组的路径,将组的宽度和高度设置为 100%,并为该组设置 mouseEnabledWhereTransparent="false".当我在填充的路径元素上移动时(有许多这些组彼此叠加),正确组的 mouseEvents 被触发.

I added the Path to a Group, set the group width and height to 100%, and set the mouseEnabledWhereTransparent="false" for the group. When I move over the filled path elements (there are many of these groups layered on top of one another), the mouseEvents for the correct Group's get fired.

这篇关于Flex Path - 捕获 Click 事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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