Jumping: The sprite can "float" because as soon as the player sprite starts to fall, you set the "jumping" flag to false, so the code will allow starting a new jump while still in the air. I suggest you to introduce a "player state" variable which can have three values: jumping, falling, on the ground. Allow starting a new jump only when you are on the ground.
Remark: You have a constant gravity value which you add to the Y position of the player directly. The result will be that the speed of the jump is constant. This may be OK for your game, depending on how it's designed, but the usual way to jump is to have a starting velocity, then deduct the gravity from the velocity and deduct the velocity from the Y position. This way, the jump will gradually slow down, then start to fall and the downward speed will increase the longer it falls. This would make the jump look more realistic.
Collision: I see you have written your own function to compare the coordinates of the player sprite and the enemy sprite and you say it doesn't work properly. There are two ways to fix this: either you find out what's wrong with your coordinate calculation, or simply use dbSpriteCollision which should solve your problem easily.
The best use I can see for calculating your own coordinates is to call dbSpriteCollision only for those sprites which are in the immediate vicinity of the player. dbSpriteCollision is rather slow when you have a lot of "ground" or "obstacle" sprites and it's a waste of CPU time to check collision with sprites which are far away from the player.
I see you are using dbSpriteHit in a few places, to check for collision between player and "floor" sprites. If that doesn't work properly either, then I would change that also to dbSpriteCollision, to check for overlap instead of edge-to-edge (during falling, the sprite may miss the stage when it is exactly lined up with the floor).
Scrolling: I'm afraid you'll have to work it out yourself, because the only way to do it is to adjust the coordinates of the background sprites. When you reach the edge, it's not the player that moves, but the background. Or you can keep the player always in the centre and move only the background around the player. In any case, it's not an easy task and how exactly you do it depends on your game design. Number your background sprites so that the numbers are in a continuous range, then you can update them all in a loop. This is useful when the background is composed of many small blocks.
If you have also a big background picture (like "sky.png" or "ground.png" which I see in your code), then you can apply the following trick: Make two copies of the background image and position them side by side. If you want to scroll the background to the left, you scroll them both, so as the first image slides out of view, the second one slides in from the right and it seems as if it were a continuous background. Of course, for this effect to work, the edges of the pictures should match seamlessly, so that you don't see where one image ends and the other begins.
Some general remarks to your code:
You have put the player.makePlayer() function call in your GAME part, but this function only contains a call to dbCreateAnimatedSprite(). You don't need to load and recreate the sprite every loop. Do this in the game setup part instead.
if( dbSpriteHit( 3, 5 ) == 1 && dbKeyState( 33 ) == 0)
Does it really matter which key is pressed if a collision happens? I don't think you need the KeyState condition here.
if( player.xpos == 440 )
{
dbSpriteX( 2 ) - player.speed;
}
I hope you realise that these lines don't do anything? You calculate a difference value, but it's not assigned to any variable, the result of the calculation is not used.
if( player.ypos <= (floorHeight - jumpHeight) && ( dbKeyState( 33 ) == 1 || dbKeyState( 33 ) == 0 ) )
...
if( !jumping && player.ypos <= floorHeight && ( dbKeyState(33) == 1 || dbKeyState( 33 ) == 0) )
Same mistake in two places: dbKeyState is always either 1 or 0, so this condition is always true. It doesn't do anything and it is exactly the same as writing the code without it:
if( player.ypos <= (floorHeight - jumpHeight) )
...
if( !jumping && player.ypos <= floorHeight )
Finally, in the UpdatePlayer function, you first draw the player sprite, then move it. It should be the other way around, since in this case you will draw the sprite at the previous position, not at the new position calculated by the move function. It's not a big difference in a fast loop, but it's better to draw always the latest situation.
I hope that helps.