Flash AS3 着色书 - 影片剪辑仅在某些位置可点击(事件侦听器)

发布于 2024-08-25 02:04:38 字数 656 浏览 9 评论 0原文

我正在制作一本着色书,并且有一个影片剪辑(轮廓),其中包含许多影片剪辑,可以将其更改为用户选择的任何颜色。然而,似乎有些影片剪辑可以在任何地方单击并且效果很好,而其他影片剪辑则需要单击某个位置才能着色。

我这里有一个示例:http://jeffkilroy.com/hosted/softee/coloring.html

注意冰淇淋的三个部分(顶部、中间、底部)。中间部分可以从影片剪辑内的任何位置单击,但是顶部(尤其是底部)要求您单击特定点才能激活事件侦听器。

不确定这是否是一个深度问题,因为我假设如果是这种情况,它至少会激活一个不同的影片剪辑,但似乎什么也没有发生。

任何帮助将不胜感激,我也在这里找到了源代码:

Source CS4

源 CS3

I am working on a coloring book and have a movieclip (outlines) containing many movieclips that can be changed to whatever color the user has selected. However it seems like some of the movieclips can be clicked anywhere and work great, and others you need to click a certain spot for it to color in.

I have an example here: http://jeffkilroy.com/hosted/softee/coloring.html

Notice the three sections of the icecream (top, middle, bottom). The middle is clickable from anywhere inside the movieclip, however the top and especially bottom require you to click on specific spots in order for you to activate the event listener.

Not sure if it is a depth issue because I would assume if that is the case it would activate at least a different movieclip but it just seems nothing happens at all.

Any help would be appreciated, I also have the source located here:

Source CS4

Source CS3

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

橘虞初梦 2024-09-01 02:04:38

这是您的自定义光标在可着色事物之前获取事件,尝试在创建 myCursor 之后添加此代码:

myCursor.mouseEnabled=myCursor.mouseChildren=false;

It 's your custom cursor who take the event before the colorable things, try to add this code after your myCursor creation:

myCursor.mouseEnabled=myCursor.mouseChildren=false;
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文