如何prevent用户鼠标点击的交互使用Flex星火滑块?星火、鼠标点击、滑块、用户

2023-09-09 21:45:36 作者:限量版帅哥

我使用Flex星火滑块作为一个时间线,我创建了一个Flex视频播放器自定义组件。

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

我想prevent从点击滑块,并改变其值的用户,但在同一时间,我应该可以以编程方式更改滑块的值。

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.

设置已启用属性的滑块为假没有帮助的话,我不能够以编程方式更改滑块值。

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.

 
精彩推荐
图片推荐