If you have uneven terrain, but not a ramp (I would use exact math for that), then you should be using the optional flag in your hittest.
while(_root.ground.hitTest(_root.player.
_x, _root.player._y, true))
or
while(ground.hitTestObject(player.x, player.y, true))
It won't push you up until you get to the top of its bounding box if you use this.. About scrolling, I use two variables, worldX and worldY. When you create something, it sets its own fields called modernX and modernY.
public function Object(startX:Number, startY:Number, master:Gamescreen)
{
this.modernX = master.worldX + startX;
this.modernY = master.worldY + startY;
UpdatePosition(master);
}
public function UpdatePosition(master:Gamescreen):void
{
this.x = this.modernX - master.worldX;
this.y = this.modernY - master.worldY;
}
public function Update(master:Gamescreen):void
{
UpdatePosition(master);
//Do any AI here.
}
And when the player moves:
.....
master.worldX += this.xvel;
master.worldY += this.yvel;
.....
It's just an option, i do it this way because everytime I try using a Vcam it makes my HUD jitter =(.