Hum… offhand. In the material you have to designate the texture as a parameter so that it can be exposed and accessed along with the material.
You may want to look I to material functions as well.
I’m assuming you are probably processing the actual JPG via custom cpp since you are using a jpg rather then better file formats.
I’m not sure how well a jpg swap would run at runtime though.
Also, in this tutorial they were shooting at the wall and changing it, so maybe you can get something off it.