For example, right now I have a class called \"Balls.as\". Here I load 10 different balls-images. You know, like this:
[Embed(source = \"/ball1.png\")]
[Emb
The best practice is to have an Assets
class which will contain static embeded images, like this:
[Embed(source="ball1.png")]
public static var BallImage1:Class;
Then all you'll have to do is declare a variable for your loaded Bitmap
and use it, like so:
protected var mBall1:Bitmap = new Assets.BallImage1() as Bitmap;
This will create a Bitmap
instance of your loaded image and you can then add it to the display list. Loading will happen only once per image and you'll have all your images at your fingertips, accessible from every class you have.