Graphics

 View Only
  • 1.  Xpression Template Radio Button

    Posted 08-26-2014 22:27
    I'd like to use a radio button within a template to exclusively select which of several items is made visible.

    I am trying make templates as flexible as possible and reduce the number of templates needed. For instance, a producer might need a superscript bar for "Breaking News" or "Live" or "Franchise Name" or "Whatever." I could publish the visibility of the superscript bar and the visibility of each stock item, plus a custom "Whatever" text field, but if somebody turned them all on, (and at some point it would happen!) it would be ugly.

    Is there a way to make a radio button?


  • 2.  RE: Xpression Template Radio Button

    Posted 08-27-2014 18:33
    You can't make a radio button; but I've seen people publish a text object called "1=LIVE, 2=BREAKING, etc". and the producer would enter the number 1,2,3,or 4 etc into that published text field. A script attached to the text object would set the visibility and positions of various objects to change between "looks" of the same graphic.. Make sense?

    #XPression


  • 3.  RE: Xpression Template Radio Button

    Posted 09-05-2014 15:02
    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


  • 4.  RE: Xpression Template Radio Button

    Posted 09-08-2014 07:09
    Or just :

    dim tab as xpBaseObject

    dim tabtext as xpTextObject

    dim WhiteBKG as xpMaterial

    dim RedBKG as xpMaterial

    Self.GetObjectByName("tab", tab)

    Self.GetObjectByName("tab text", tabtext)

    Engine.GetMaterialByName("White BKG", WhiteBKG)

    Engine.GetMaterialByName("Red BKG", RedBKG)

    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.TextWithTags = "{White Font}" & tabtext.Text

    else

    tab.SetMaterial(0, WhiteBKG)

    tabtext.TextWithTags = "{Black Font}" & tabtext.Text

    end if


    #XPression


  • 5.  RE: Xpression Template Radio Button

    Posted 09-08-2014 23:14
    Still waiting on the chance to rack up our Xpression boxes...when I start getting into scripting I will test these out. I am hoping that Visual Logic will give me some choices, too. Thanks.

    #XPression


  • 6.  RE: Xpression Template Radio Button

    Posted 09-09-2014 06:03
    This is a fantastic application for dashboard if you would like to make a scene that is easy to change around like that controllable by someone who does not have a desire or need to really learn how to work Xpression. Instead of Publishing the visibility, you would instead datalinq to the xml file the dashboard generates. Just make a parameter that is an integer choice constraint (this parameter type lets you list the numbers you want to use as well as name them with a string like "Breaking News" or something). You can publish the text you want from dashboard by declaring a string parameter and having the producer type in a field in dashboard. If you really wanted to and were feeling the dashboard, you could make a take and clear button to call the takeid of the scene you just changed with rosstalk and send it to live and back off again all from another pc.

    #XPression