Dynamic photo gallery

You could say I’m a beginner with Flash. I can do simple tweens and fading effects. I know this is very simple stuph. But I was asked to have a photo on our homepage that will keep on rotating photos by fading in and out.

Is there a script or a file I you can share that will show the photos from a directory in a rotating manner?

I know how to fetch all the photos from a directory using PHP, but I have no idea on how to do it using ActionScript. Can anybody please help me?