In AS3, you can embed graphics in a class variable:
[Embed(source="MenuAssets.swf", symbol="topSquare")]
public var TopMenuItem:Class;
I have hundreds of assets in this project that I am doing, so I want to embed the assets in an array for quick access.
Can I do something like this? This is not a compilation, so I wonder if this is possible.
public var MenuAssets:Array = [
[Embed(source="MenuAssets.swf", symbol="topSquare")],
[Embed(source="MenuAssets.swf", symbol="botSquare")],
[Embed(source="MenuAssets.swf", symbol="leftSquare")],
[Embed(source="MenuAssets.swf", symbol="rightSquare")],
]
source
share