Flash / Actionscript:如何使重叠的精灵不可见

发布于 2024-08-13 09:48:59 字数 384 浏览 2 评论 0原文

查看图片 http://reggino.kingsquare.nl/tmp/actionscriptProblem.jpg

你好,

我无法理解这个问题...

我有两个精灵,这些精灵的交集的 alpha 为 0。我尝试了所有混合模式和过滤器,但它们似乎都不合适。

我一直对这三个之上的额外层感到困惑,相互遮盖等等,但这变得一团糟并且难以维护(必须拖动文本等......)。你们中的任何一位大师对如何克服这个问题有建议吗?我认为应该有一个更简单的方法......?

预先感谢您的帮助!

See image at http://reggino.kingsquare.nl/tmp/actionscriptProblem.jpg

Hi there,

I can't get my head around this one...

I'm having two sprites, where the intersection of these sprites has an alpha of 0. I tried all the blendmodes and filters, but none of them seems appropriate.

I've been puzzeling with extra layers on top of these three, masking each other etc, but that becomes a mess and makes it difficult to maintain (the text has to be dragged etc.... ). Does any of you guru's have a suggestion how to overcome this problem? There should be an easier way i think...?

Thanks in advance for your help!

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

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

发布评论

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

评论(2

方觉久 2024-08-20 09:48:59

这些精灵确实是兄弟姐妹,但在重叠区域你可以“看穿它们”。提供的图像说明了这种行为。

[编辑]
我刚刚通过生成自定义的新位图设法达到了预期的结果!请参阅此博文

The sprites are siblings indeed, but at the overlapping areas you can 'see through them'. The image provided illustrates this behaviour.

[edit]
I just managed to achieve the desired result by generating a custom new bitmap! See this blogpost.

无妨# 2024-08-20 09:48:59

交集的 alpha 如何变为零?

如果 sprite1(文本)和 sprite2(条带)是同级,您可以通过调用 addChild(text); 在调用 addChild(strip); 之前(或通过调用 addChildAt(text, 0);) - 这样,条带将位于文本之上并覆盖它如果有重叠。

How is the alpha of the intersection becoming zero?

If sprite1 (the text) and sprite2 (the strip) are siblings, you can addChild them in such a way that strip is at a higher position than text in the parent's display list by calling addChild(text); before calling addChild(strip); (or by calling addChildAt(text, 0);) - This way, the strip will be on top of the text and cover it if there is an overlap.

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