Image uploadING IN FLASH

Hi everyone!

Advance thanks for the help, i am struggling with the upload function in flash, I know we can perform upload using file reference class, but i dont know how to use the class or other file uload functions for the following concept, Iam just populating a image gallery with help of xml file, when i click the image from the gallery, the image should be uploaded, i dont know how to do this

For Ex:


clip.onRelease = function() {
                
      i want the upload function here, i can get the location of the file but i cant upload
      
}