Well, for the mouse, I simply start off by making an integer that has the Y and X position of the Mouse. Soo I will have something like this:
int MX = dbMouseX();
int MY = dbMouseY();
Then when I want something to happen if I click on an image or something like that, I will get the dimensions. So say if there is a button that starts at 100 and ends at 200 at X axis and Y axis. I will do an if statement like this:
if(MX >= 100 && MX <= 200 && MY >= 100 && MY < 200)
{
if(dbMouseClick())
//Here I'll put whatever.
}
As for gif images, I don't really know about them but you could use sprites and play there frames with dbPlaySprite(ID,Start Frame, End Frame, Delay);
Hope this helps.