Flex Path - capturing Click event

匆匆过客 提交于 2019-12-12 02:54:02

问题


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

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?


回答1:


Answering my own question:

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.



来源:https://stackoverflow.com/questions/9117056/flex-path-capturing-click-event

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!