Object Position data

Hello.

I’d like to ask if there is any node that can be used to transmit information of an object in the scene.
One example: if I have a lamp and I wanted to change a texture color based on that lamp position on the X axis of the scene.

I’ve tried using the Ray Lenght on the Light Paths output node, but had no success.
Any help is appreciated!

Regards,
Ark

There is an Object Info node in the material node view when you use cycles. .Don’t know if that is what you are looking for…

(Courtsey : http://wiki.blender.org/index.php/Doc:2.6/Manual/Render/Cycles/Nodes/More)