Howto embed images in Actionscript 3 / Flex 3 the right way?
I'm creating a game where a lot of images are being used in Actionscript / Flex 3 (Flash). Now that I've reached the designer stage, I have to work out a structural way of using embedded images (which have to be manipulated with rotation, color, etc.).

Unfortunately, after investigating a bit, it looks like you have to manually embed images before you can use them. I currently have it setup like this:

Resource.as class file:

    package
    {
    	public final class Resource
    	{
    		[Embed (source="/assets/ships/1.gif" )]
    		public static const SHIPS_1:Class;
    	}
    }

So, just for one ship I so for have to:
> Put the image in the correct folder with the correct name
> Name it in the same way in the Resource.as file
> Create the constant with the same name in the Resource.as file

Even though this should all be possible by simply putting the file in a specified folder.

To make things even worse, I still have to call it using:

    var test:Bitmap = new Resource.SHIPS_1();

There must be better ways to handle resources when creating very huge applications? Imagine I need thousands of images, this system simply wouldn't fit.
Howto embed images in Actionscript 3 / Flex 3 the right way?
===

I'm creating a game where a lot of images are being used in Actionscript / Flex 3 (Flash). Now that I've reached the designer stage, I have to work out a structural way of using embedded images (which have to be manipulated with rotation, color, etc.).

Unfortunately, after investigating a bit, it looks like you have to manually embed images before you can use them. I currently have it setup like this:

Resource.as class file:

    package
    {
    	public final class Resource
    	{
    		[Embed (source="/assets/ships/1.gif" )]
    		public static const SHIPS_1:Class;
    	}
    }

So, just for one ship I so for have to:
> Put the image in the correct folder with the correct name
> Name it in the same way in the Resource.as file
> Create the constant with the same name in the Resource.as file

Even though this should all be possible by simply putting the file in a specified folder.

To make things even worse, I still have to call it using:

    var test:Bitmap = new Resource.SHIPS_1();

There must be better ways to handle resources when creating very huge applications? Imagine I need thousands of images, this system simply wouldn't fit.