in this tutorial i want to tell about a way to make adding of new sprites easier/faster (it could also increase performance).
What will be end result: 2x less assets files(no need to create .as per file), less code, asset files stored in folders(sprites/xmls/etc), using my own made program click to download (click for source code) you could make process faster
Delete duplicate files of assets ( e.g. EmbeddedAssets_ExistingAssetEmbed_.as
)
Remove EmbeddedAssets_, EmbeddedData, Embed_ from asset files, and sort them in folders (Sprites/Xmls/Etc...)
Remove all assignments to variables type of Class in EmbeddedAssets.as
//before
public static var lofiCharEmbed_:Class = EmbeddedAssets_lofiCharEmbed_;
//after
public static var lofiCharEmbed_:Class;
and on top of each put this tag
//for .png
[Embed(source = "relative path to asset file.png")]
public static var lofiChar:Class;
//for .dat
[Embed(source="relative path to asset file.dat", mimeType="application/octet-stream")]
public static var particlesEmbed:Class;
e.g. you should end up with something like this for each asset
[Embed(source="Textures/lofiChar.png")]
public static var lofiChar:Class;
//Example of many variables/assets
[Embed(source="particles.dat", mimeType="application/octet-stream")]
public static var particlesEmbed:Class;
[Embed(source="Xmls/Players.xml", mimeType="application/octet-stream")]
public static const PlayersCXML:Class;
[Embed(source="Textures/lofiObj.png")]
public static var lofiObj:Class;
[Embed(source="Textures/lofiObj2.png")]
public static var lofiObj2:Class;
[Embed(source="Textures/lofiObj3.png")]
public static var lofiObj3:Class;
[Embed(source="Textures/lofiObj4.png")]
public static var lofiObj4:Class;
[Embed(source="Textures/lofiObj5.png")]
public static var lofiObj5:Class;
[Embed(source="Textures/lofiObj6.png")]
public static var lofiObj6:Class;
[Embed(source="Textures/lofiObj7.png")]
public static var lofiObj7:Class;
thats it for manual way!
Put program in assets folder, run it, when its done close it.
Fix errors the program caused(Mostly just delete unnecessary [Embed]). Suddenly its pretty retarted and puts the [Embed] tag after every semicolon. The [Embed] tag should only be on top of variables type of Class, so if program put it on top of variable type of Array, remove the tag.
Enter the assets name in [Embed] tag. You should end up with stuff like from manual way.
When youre done, delete the program from assets folder. Hope program will work lol.