【问题标题】:Detecting if there is a timeline mask检测是否有时间线掩码
【发布时间】:2011-11-14 04:04:12
【问题描述】:

我在 Flash 上遇到了一个非常奇怪的行为。 如果您在 Flash IDE 上创建一个带有与其关联的蒙版的形状,将其保存,然后将其导出为 swf,则您无法以编程方式知道存在蒙版(displayObject.mask 为空)

这是一个简单的测试脚本来证明:

//executed on enter_frame with the root object
function test(d:DisplayObject) : Void
{
    if (Std.is(d, DisplayObjectContainer))
    {
        var s:DisplayObjectContainer =  cast d;
        for (i in 0...s.numChildren)
            test(s.getChildAt(i));
    }

    if (d.mask != null)
        trace("FOUND " + d.name);
}

语法有点不同,因为它是 haxe,但它会在原版 AS3 上显示相同

没有找到掩码的痕迹!我只需要以不同的方式处理附有面具的情况,那么有什么办法/解决这个奇怪的问题吗?

【问题讨论】:

    标签: flash actionscript-3 flash-cs5 mask haxe


    【解决方案1】:

    很确定这是不可能的......这里有一个支持我的帖子:

    http://www.actionscript.org/forums/archive/index.php3/t-184762.html

    【讨论】:

      猜你喜欢
      • 2014-09-08
      • 1970-01-01
      • 2020-12-14
      • 2012-10-18
      • 2018-08-10
      • 2014-09-25
      • 1970-01-01
      • 1970-01-01
      • 2021-09-29
      相关资源
      最近更新 更多