如何使用AS3在Flash中点击显示对象? [英] How to click through a display object in Flash with AS3?

查看:167
本文介绍了如何使用AS3在Flash中点击显示对象?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在创建一个照片编辑器应用程序,在某个时候,您编辑的照片应该放在两层DisplayObjects(背景图像和图像蒙版)之间.

I am creating a photo editor app where, at some point, the photo you edit is supposed to be dropped between two layers of DisplayObjects (a background image and an image mask.)

但是有一个问题.当您正在编辑的图像放在背景层和图像蒙版层之间时,它变得不可单击,因此被卡在那里,没有机会再次拖动它. (照片编辑器使用TransformManager库.)

There is a problem, though. When the image you are editing is dropped between the background and the image mask layers, it becomes unclickable, and therefore gets stuck there, with no chance of dragging it again. (The photo editor uses TransformManager library.)

我正在寻找一种允许您选择正在编辑的图像的方法,而不管其上是否还有另一个DisplayObject.这可能意味着找到某种方式来点击图像蒙版.

I am looking for a way to allow you to select the image you are editing no matter if there is another DisplayObject on top of it. And that probably means finding some way to click through the image mask.

有没有办法做到这一点?

Is there a way to do that?

我尝试在imageMask上设置mouseChildren = false,但是效果不理想.

I tried setting mouseChildren = false on imageMask, but that didn't have the desired effect.

非常感谢.

推荐答案

这个怎么样?

mask.mouseEnabled = false;

这篇关于如何使用AS3在Flash中点击显示对象?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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