Is there anyway in Flash (perhaps using a bit of php?) to;

a)Read through a given directory for images until the last image is reached.
b)Convert those images into thumbnail buttons, or mc's that you can 'drag and drop'?