找不到mx.core :: BitmapAsset

时间:2010-05-22 18:04:45

标签: flash

我在下面的示例中尝试了以下代码EmbedAssets.as: http://www.senocular.com/flash/tutorials/as3withmxmlc/

使用mxmlc.exe构建并在Flash Player 9中测试输出EmbedAssets.swf时出现此错误:

VerifyError:错误#1014:无法找到mx.core :: BitmapAsset

package {
    import flash.display.Sprite;
    public class EmbedAssets extends Sprite {

        [Embed(source="images/trophy.png")]
        private var TrophyImage:Class;

        [Embed(source="swfs/satdish.swf")]
        private var SatelliteAnimation:Class;

        public function EmbedAssets() {
            addChild(new SatelliteAnimation());
            addChild(new TrophyImage());
        }

    }
}

satdish.swf没有损坏所以我不明白为什么会出现这个错误消息。

2 个答案:

答案 0 :(得分:11)

修改flex-config以说明

<static-link-runtime-shared-libraries>true</static-link-runtime-shared-libraries>

或手动将参数传递给mxmlc

mxmlc -static-link-runtime-shared-libraries=true -debug=true Main.swf -- Main.as

我遇到了同样的问题 - External Config file in Actionscript 3

答案 1 :(得分:3)

将图片嵌入课程时,您通常会收到以下错误:

  

异常错误:VerifyError:错误#1053:在mx.core.BitmapAsset中非法覆盖z。

要避免重新出现此错误,您只需检查正在运行的Flash播放器的版本。在我的情况下,我正在运行flash player 9并且遵守10,所以我只是将flash播放器路径指向flash player 10并且它有效。

Read more on my blog

相关问题