views:

48

answers:

1

Hi, i'm trying to include a number of images in my SWF file not by loading them but by embedding them in the SWF itself. I found the following instruction to do that:

[Embed(source="../graphics/images/ss0.png")] private var SS0:Class;

Basically, i want to embed a different number of images each time. Is there a way to do that automatically (let's say inside a for loop) or do i have to type manually this instruction for each image i want to include?

+1  A: 

You could store all your PNG files in a single ZIP file, then use the FZip class to extract them. See the example of this on their site.

davr
thanks for pointing this class, but is not what i need because i will have to deliver a ZIP file beside the SWF.
Ponty
Why do you need everything to be in a single SWF file? Just downloading one extra file from your server is not going to be very much overhead. Eg every time you visit a webpage it downloads many many things (images, CSS, javascript, etc etc)
davr
it's not my decision :)
Ponty