2011-11-20 62 views

回答

3

尝试设置selectablemouseEnabledmouseChildren,和笑声mouseWheelEnabled所有假

+0

非常感谢!这个问题一直困扰着我整天!我发现你需要mouseEnabled和mouseChildren。启用似乎只能禁用鼠标与文本交互,而孩子会影响文本周围的整个hitbox,但不影响文本本身。 – CuddleBunny

2

使用

text_field.mouseEnabled = false; 
text_field.mouseChildren = false; 

mouseChildren意味着它的孩子不登记鼠标事件,他们只是从父派遣。要完全禁用它,两者都必须是假的。

由于textfield是影片剪辑的孩子,mouseChildren属性是影响它的因素,您可以将其设置为false并且它仍然可以工作。

相关问题