I am trying to incorporate some image replacement in my Sports graphics. I have some scripting received during Xpression training:
dim name1 as xpTextObject
dim pic1 as xpBaseObject
dim teampic1 as xpMaterial
dim picshader1 as xpBaseShader
dim FilePath1 as String
Self.GetObjectByName("name1", name1)
FilePath1 = "D:XPRS ProjectsNEWSSports" & name1.Text & ".tif"
Self.GetObjectByName("pic1", pic1)
pic1.GetMaterial(0, teampic1)
teampic1.GetShader(0, picshader1)
picshader1.SetFileName(FilePath1)
It works perfectly, with one exception. When I have multiple instances of the same scene in a row, a misspelled filename on a scene will end up displaying the logo in that particular place from the previous scene. For example: In the first scene, I would have a Minnesota Twins logo. In the next a New York Yankees logo in the corresponding object in the scene. However if Yankees is misspelled as Yankkes, the file isn't found, and the Twins logo is displayed again.
What I would like to do, is if a file can't be found, then I would like it to bring up a specific generic image. My scripting knowledge is limited at best, and I can't figure out how to do this, or even if it can be done. Any help would be appreciated.