The essence is as follows. starling / AIR / as3. In the mobile version I load all external graphics:
assets.enqueue(appDir.resolvePath("head/atlasVikings.png")); assets.enqueue(appDir.resolvePath("head/atlasVikings.xml")); For the web version I try to do the same. The next option does not work ...
package other { public class EmbeddedAssets { [Embed(source="../../bin/head/atlasVikings.png")] public static const art:Class; [Embed(source = "../../bin/head/atlasVikings.xml", mimeType = "application/octet-stream")] public static const art_xml:Class; } } Uploading:
assets.enqueue(EmbeddedAssets); I add as follows
var textureLoader:Texture= assets.getTexture("preloader_bg"); _loader = new Image(textureLoader); I get the error texture cannot be null