Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

mx.core::BitmapAsset could not be found

Tags:

flash

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.

like image 689
user310291 Avatar asked May 22 '10 18:05

user310291


2 Answers

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

like image 75
Jamie Wong Avatar answered Nov 08 '22 05:11

Jamie Wong


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.

like image 45
Fahim Chowdhury Avatar answered Nov 08 '22 03:11

Fahim Chowdhury