I have a swf which embeds around 40 various png and fxg objects using the embed metatag... eg.:
public class OneOfMyEbeddedAssets
{
[Embed(source = "./assets/OneOfMyEbeddedAssets.png")]
private static const shapeClass: Class;
public static function get bitmapData():BitmapData
{
var bm:Bitmap = new shapeClass();
return bm.bitmapData;
}
}
When it compiles with the incremental tag, I notice a number of classes and fxgs are recompiled each time, saying "Reason: one of the assets has been updated", or "Reason: It's dependent file, .as has been updated". The build completes successfully.
Then, when I run my application, I get a message in the flash log:
[Fault] ex开发者_运维技巧ception, information=ReferenceError: Error #1065: Variable
OneOfMyEbeddedAssets_shapeClass is not defined.
When I explore the swf file, and look at the Symbols embedded in it, I can see the required shape class has actually been embedded properly. The message is not for every embedded asset, just one in particular; and not necessarily the first one accessed in the code.
The problem disappears if I don't do an incremental compile... any ideas why?
This is a bug.
I found the exact reproduction steps so hopefully this bug can get upvoted and fixed.
I think this a known bug with embedding assets and incremental compile not working correctly.
See Here
精彩评论