Scroll to position
Scroll to X
Scroll to Y
Set the X and Y positions to center the view on. This scrolls all layers taking in to account their parallax property.
clamp(x, lower, upper)
Return lower if x is less than lower, upper if x is greater than upper, else return x.
scroll to clamp(player.x,whatever,whatever)
scroll to clamp(player.y,whatever,whatever)
Play with this , might work .