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.
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
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With