assign a texture by clicking on a specific object

Hello there,
I have a certain number of objects in a live scene (cubes,
boxeq, cones…)
I would like to assign a texture on a object by cicking on it.
I assume that a mouse pick feature and the standart
texture assignment.
But how to link to two actions ?

Any idea ?

Thanks
Spytox

Um… create your obejcts appearances wiuth TEXTURE_WRITE enabled,
Use a pick ray to find teh object,
Retrieve the object’;s appearance.
Set the texture.

I dont see where the mystery is, its all very straight foward.