Read hittest from distance

Hi, is there a way to detect a hittest with two objects colliding from a distance? For example if I move an object like 5 pixels to the right, then it will touch the other object; is there a way to see this?

I used my imagination to create the following code ofr this:

 if(block1.x + 2 == block1.hitTestObject(block2)) { //this is when he's 2 pixels away from Block2 } else {
 //Or else?

As you can see I want Flash to do something when he’s 2 pixels away from block 2.

Unfortunately this code didn’t work. But I hope you understand what I try to do.

I hope anyone can help me,