I gave this a shot. I made a mask for each "county", a quad to hold red, a quad to hold blue, and a quad to hold gray.. Also red, blue & gray materials. The red, blue, gray and mask are applied to quads inside a layer object along with a text object with gray being the base layer. I set the text object to select between only R and D.
on the text object on the OnSetText is this script. Basic I know but I'm on my first cup of coffee.
dim red as xpBaseObject
dim blue as xpBaseObject
scene.GetObjectByName ("red",red)
scene.GetObjectByName ("blue",blue)
if text = "R" then
blue.Visible = false
red.Visible = true
else if text = "D" then
blue.Visible = true
red.Visible = false
else
blue.Visible = false
red.Visible = false
end if
As the operator changes the value, it turns on the corresponding color. You could add as many colors as you want, or could use a percentage value that would automatically change colors, otherwise the color is gray.
This script would work on every county, all you would do is change the mask in each layer object group.
If I've oversimplified, or missed the target, sorry.
------------------------------
Malcolm Thorpe
xpression design
Free Lance Xpression Designer/Carbonite TD
------------------------------