Man, you keep changing your game design...
Ok. You can use this.
if(dbObjectScreenX ( int iObject )<=a small number close to zero so that the entire object is visible){
now either speed up the object so that it keeps up with the camera or move the camera.
}else if(dbObjectScreenX ( int iObject )>=dbScreenwidth( void )-a small number){
now either slow down the object so that it stays with the camera or move the camera.
}
if(dbObjectScreenY ( int iObject )<=a small number){
stop the object or move the camera up.
}else if(dbObjectScreenY ( int iObject )>=dbScreenHeight-a small number){
stop the object or move the camera down.
}
It is the basic idea. Exactly what the code will be depends on what exactly you want to do in the game.
uuhh... yah...