找不到mx.core :: BitmapAsset

use*_*291 5 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());
        }

    }
}
Run Code Online (Sandbox Code Playgroud)

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

Jam*_*ong 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

我有同样的问题 - Actionscript 3中的外部配置文件