2011-11-20 56 views

回答

3

嘗試設置selectablemouseEnabledmouseChildren,和笑聲mouseWheelEnabled所有假

+0

非常感謝!這個問題一直困擾着我整天!我發現你需要mouseEnabled和mouseChildren。啓用似乎只能禁用鼠標與文本交互,而孩子會影響文本週圍的整個hitbox,但不影響文本本身。 – CuddleBunny

2

使用

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

mouseChildren意味着它的孩子不登記鼠標事件,他們只是從父派遣。要完全禁用它,兩者都必須是假的。

由於textfield是影片剪輯的孩子,mouseChildren屬性是影響它的因素,您可以將其設置爲false並且它仍然可以工作。

相關問題