Side-Scrolling Background w/ HitTest

I know this may sound very noobish, but how do you code a working scrolling background w/ hitTest functions?

I’ve coded a scrolling background b4 no problem, but when “player” hitTest a impassable terrain/block, I want the background to stop scrolling along with the player to stop moving.

Now, i thought it was somewhat around these lines:


if(_root.player.hiTest(hitMC._x , hitMC._y ,true)) {
_root.isBlocked = true
} else {
_root.isBlocked = false
}

but apparently, it doesn’t work because when the player HitTest “block”, var isBlock just changes back and forth from “true” to “false” very fast.

Is there a solution to this?

-Jephz