开发者

Making dynamic text item transparent for mouse

开发者 https://www.devze.com 2022-12-30 11:46 出处:网络
I\'m working with actionscript 3 and have a trouble. I need to write player where users will see text on the f开发者_JS百科ront of the movie.

I'm working with actionscript 3 and have a trouble.

I need to write player where users will see text on the f开发者_JS百科ront of the movie.

The text is text field of type "Dynamic text".

The problem is that I need to make this text object transparent for mouse move and clicks.

I tried:

.mouseEnabled=false;
.selectable=false;

... but it does not help - when I click on it - it does not pass clicks through it.


You cannot pass mouse events through the application applicable to a selected item.

The only thing you can do it use the DisplayObjectContainer.getObjectsUnderPoint() method and see what 'could' have been selected... the point being the X Y of the mouse.

Adobe Help for display object container

I know it sucks but - I have never ever ever found, or know someone who has passed click event through an object. You can of course re dispatch an event, but the reference to what has been click is no longer applicable.

0

精彩评论

暂无评论...
验证码 换一张
取 消