如何防止用户使用 Flex Spark 滑块进行鼠标单击交互? [英] How to prevent user mouse-click interactivity with Flex Spark slider?

查看:18
本文介绍了如何防止用户使用 Flex Spark 滑块进行鼠标单击交互?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用 Flex Spark Slider 作为我创建的 Flex 视频播放器自定义组件的时间线.

I am using Flex Spark Slider as a time-line for a Flex video player custom component I have created.

我想阻止用户点击滑块并更改其值,但同时我应该能够以编程方式更改滑块的值.

I want to prevent the user from clicking on the slider and changing its value, but at the same time I should be able to change the value of the slider programmatically.

将滑块的启用"属性设置为false"没有帮助,因为我无法以编程方式更改滑块值.

Setting the "enabled" property for the slider to "false" doesn't help as then I am not able to change the slider value programmatically.

任何线索,如何实现这种行为?

Any clue, how to achieve this behavior?

推荐答案

如果您只有一个元素需要禁用鼠标,请使用 mouseEnabled 属性.但是,如果您希望将鼠标事件的禁用级联到特定对象上的子元素,请确保设置 mouseChildren 属性.当我仍然收到对鼠标事件的响应时,即使我已经禁用了它们,这第二个已经抓住了我.对于您的需要,听起来像设置 mouseEnabled 就足够了.

If you only have a single element that needs to have the mouse disabled, use the mouseEnabled property. If however you have child elements on a particular object that you want to cascade the disabling of the mouse events to, make sure to set the mouseChildren property as well. This second one has caught me before when I was still getting a response to mouse events even though I though I had disabled them. For what you need, sounds like setting mouseEnabled should be enough.

这篇关于如何防止用户使用 Flex Spark 滑块进行鼠标单击交互?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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