5
votes

I tried the code EmbedAssets.as below found in sample here: http://www.senocular.com/flash/tutorials/as3withmxmlc/

I got this error when building with mxmlc.exe and testing the ouput EmbedAssets.swf in Flash Player 9:

VerifyError: Error #1014: mx.core::BitmapAsset could not be found

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 is not corrupted so I don't understand why this error message.

2

2 Answers

11
votes

Either modify flex-config to say

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

or manually pass in the parameter to mxmlc

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

I had the same problem - External Config file in Actionscript 3

4
votes

When embedding images into a class you can often get the error below:

Exception fault: VerifyError: Error #1053: Illegal override of z in mx.core.BitmapAsset.

To avoid this error from re-occurring you simply have to check the version of the flash player that you are running. In my case I was running flash player 9 and complying to 10 so I just point the flash player path to flash player 10 and it worked.

Read more on my blog.