6

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.

user310291
  • 36,946
  • 82
  • 271
  • 487

2 Answers2

11

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

Community
  • 1
  • 1
Jamie Wong
  • 18,104
  • 8
  • 63
  • 81
  • Thanks. According to the [mxmlc compiler flags documentation](http://livedocs.adobe.com/flex/3/html/help.html?content=compilers_13.html), this is true by default. Seems that Adobe's documentation is wrong. – Johannes Bittner May 23 '11 at 14:15
4

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.