Sending and loading gif images via loadvars

I’m trying to create a test taking application for a system that already exists. Currently everything is done in HTML, but they need to convert the app to flash to add tricky components. So for now, everything is in HTML format and everything is created dynamically using mod_perl and a mysql database.

The problem really comes in when one of the test questions has an image included with it. The image is stored in the database and with HTML was just inserted into the <HEAD> tag in raw format. The image does not actually reside anywhere on the server , just in the database.

So the question is, is there any way to feed the raw image to flash and have it display? Right now I’m using as 2.0, but not opposed to going to 3.0, just want to know if this is even possible.

Thanks for any help you can offer.