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

查看:118
本文介绍了Flex的路径 - 捕获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.

<一个href="http://hansmuller-flex.blogspot.com/2011/10/more-about-approximating-circular-arcs.html#comment-form" rel="nofollow">http://hansmuller-flex.blogspot.com/2011/10/more-about-approximating-circular-arcs.html#comment-form

我一直在寻找增加一个点击事件弧/楔子,但路径不能有一个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).

有一种解决方法,你觉得呢?

Is there a workaround do you think?

推荐答案

回答我的问题:

我添加的路径为一组,设置组的宽度和高度为100%,并设置mouseEnabledWhereTransparent =假的组。当我搬过来填充路径元素(也有许多这样的群体分层在彼此的顶部)时,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的路径 - 捕获Click事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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