First question have you tried this setting

Second part, yes you can use this script to apply a material
dim box as xpBaseObject
dim mat as xpMaterial
Scene.GetObjectByName("Quad1", box)
if text = "D" then
engine.GetMaterialByName("blue", mat)
box.SetMaterial(0, mat)
end if
if text = "R" then
engine.GetMaterialByName("red", mat)
box.SetMaterial(0, mat)
end if
if text = "I" then
engine.GetMaterialByName("white", mat)
box.SetMaterial(0, mat)
end if
------------------------------
Simon Redmile
Senior Graphic Programmer & Designer
Ross Video
Bristol United Kingdom
------------------------------