Extract IPTC caption from JPEGs into Flash?

Howdy - I am building a gallery of photos with dynamically photos (JPEG) with Flash. So far I have to .txt file that contains the caption information that is then dynamically loaded into the Flash file. But I want to skip that part. Is it possible to automatically extract the IPTC caption from the JPEG and then somehow, majically place that info into a dynamic text box in the Flash file?

Someone told me that it would involve some PHP first, then into flash. But I’m not sure where to start.
:beer:
thanks