We do something similar, but not with a radio button.
We've got a tab on top of our lower thirds that can be used for franchise graphics or web pushes or whatever. We wrote into it that if it's just random text, use font A and material B for the graphic, but if certain phrases or words are used, change the font and material accordingly. Here's a rough matchup of the script:
dim tab as xpBaseObject
dim tabtext as xpTextObject
dim BlackFont as xpFont
dim WhiteFont as xpFont
dim WhiteBKG as xpMaterial
dim RedBKG as xpMaterial
dim temp as String
Self.GetObjectByName("tab", tab)
Self.GetObjectByName("tab text", tabtext)
Engine.GetFontByName("Black Font", BlackFont)
Engine.GetFontByName("White Font", WhiteFont)
Engine.GetMaterialByName("White BKG", WhiteBKG)
Engine.GetMaterialByName("Red BKG", RedBKG)
we use _InStr_ here because we can just isolate a couple characters. You could just use
if tab.Text = "text".
if InStr(Ucase(tabtext.Text), "BREAK") = 1 then
tab.SetMaterial(0, RedBKG) change material on tab background
temp=tabtext.Text copy text to a placeholder
tabtext.Text="" remove text from the tabtext field
tabtext.CurrentFont=WhiteFont change the font of the tabtext field to the white font
tabtext.Text=temp copy the text back in
else
tab.SetMaterial(0, WhiteBKG)
temp=tabtext.Text
tabtext.Text=""
tabtext.CurrentFont=BlackFont
tabtext.Text=temp
end if
I forgot to add, basically what this does is see if the characters listed in the top line are the first characters in that text field (InStr will spit out a number, so if my string was
abcdefg and I ran
InStr(string.Text, "c"), it would return 3, while "a" would return 1, etc), and if so, change the text and background materials. We use "BREAK" for "Breaking News,", "CONT" for Continuing Coverage, and "DEV" for Developing Story. If the 1st characters in the field are not one of those three, it keeps it in the standard black on white, but if they are, it changes to white on red.
You could expand that pretty quickly with
or and
elseif statments, as well.
#XPression