Code Generator

Would anyone possibly know how I would go about creating a code generator??? so that if I had an image and made it move by dragging it across a picture, the dode for that particular movement would be created?? Basically like making flash. Thanks for any help on the matter :confused:

i think you should get the x,y,z values from where the image is at the start, then get the end values, then just use an:
if(actual_image_location<finishing_image_location)

i think you should get the values from where the image is at the beginnig, then get the end values, then just use an:

if(current_xPos<ending_xPos)
{
    current_xPos+=x_Movement_Rate;
    glTranslatef(current_xPos,0,0);
}//repeat for y and z... 

  

btw, dont mind the reply above…