In Flex3, I can compile clean as3 code and use the "embed" tags to load images. This was done by Flex by creating the BitmapAsset class.
I can still do this in Flex4.
However, there was a trick for fakeout flex3 and use my own mx.core.BitmapAsset class to remove some of the extraneous things that Flex BitmapAsset introduces into it. This is described here: http://www.ultrashock.com/forums/flex/embed-flex-assets-without-using-flex-123405.html
Unfortunately, I cannot get these tricks to work with Flex4 and get smaller file sizes. I get the error message "VerifyError: Error # 1014: Class mx.core :: BitmapAsset not found".
This error leads me to this forum and the solution described there: http://tech.groups.yahoo.com/group/flexcoders/message/148762
Following this advice, I add -static-link-runtime-shared-libraries = true, and my swf loads without errors ... but that means that I load fragments of the frame that I wanted to omit (and the file size also says).
Is there a better way to fake flex4 when it comes to using Embed?
source
share