Creating distance when clicking object

I am new to Unity3d and have learned a lot. I have a cube that is click-able to launch a web page. But you can be anywhere in the environment and click the object whenever. I want to create a certain distance that you have to be in to be able to click the object. I found some other scripts on this but have not gotten any to work.

Any help would be great.

Thanks

Within the routine that processes the click, test for distance from the camera.

var other : Transform;
if (other) {
var dist = Vector3.Distance(other.position, transform.position);
print ("Distance to other: " + dist);
}

I put the script on my object and drug my FP camera to the other: slot in the inspector panel.

Then where it has "Distance to other: " do I put some distance there?

Its somewhat confusing.

Ive tried the Vector 3 script with no avail.

When I get right up to the object I want to be able to highlight it and when I step back its unavailable.

I have the highlight script on the gameobject already. I just need a distance limitation to add to it