Flash and PHP

I think i am down to my last 3 strands of hair trying to work this out. Please someone help before I lose it all. Thank you.

So here’s my problem:

I have a php page which displays an image, when clicked on I want a pop-up window. Because there are several pictures in the series I want to use flash to create a slide show to display the other images in the series.

The information is stored in a mySQL database. What I am trying to do is send the names of these images to flash.

I have looked around and see the only way to send a variable to flash is by doing the “print” command. But I do not want anything to printed to my screen.

I am hoping there is an alternative without having anythin extra printed to the screen. Thank you for your help. All suggestions are highly appreciated.