Create flash that autoloads images from any folder

Let’s say I have 20 folders, each with 6 images, each with different name.
I want to create a swf, which when put to a folder, autocheks its contents and loads the images in proper places /each image is 290x180/ I want them in 2 frames each with 3 images. I can rename the images, if it is needed. Is it impossible?