Whoop, I think I missed the point of your message there...
I believe scripts can only apply textures to the object their connected
with, so you would want to have a script in the object that listens for
some message from the parent box, then applies the texture.
There should be some way to give the texture to the child object as
well. Alternately, you could have any potential textures already residing
on the child object and apply the appropriate one by script when needed.
Something like:
int COMM_CHANNEL 123456
default
{
state_entry()
{
llListen(COMM_CHANNEL,"",NULL_KEY,""

;
}
listen(integer channel, string name, key id, string message)
{
if (channel == COMM_CHANNEL && message == "Texture1"

{
llSetTexture(ALL_SIDES, "Texture1"

;
}
}
}