Graphics

 View Only
  • 1.  Election Party Color Field

    Posted 10-12-2022 09:34
    Morning Everyone!

    I am laying out my lower 3rd for our election coverage and I want to change the Quad for my selected Party.
    Example: If the Party Text Field is R, I want my Red Quad to be visible or if the Party Text Filed is D, I want my Blue Quad to visible.

    How do I go about this?



    ------------------------------
    Lee Mann
    On Air Director
    WAKA 8
    ------------------------------


  • 2.  RE: Election Party Color Field

    MalThePal
    Posted 10-13-2022 00:43
    the easiest way for me is just a little scripting. Add a text object that is not visible. Datalinq this text object to the data that shows party. Then right click on that text object and look for "edit script event" or something like that. I'm not at my Xpression. Add this script to that text object. Remember to compile it by clicking on the orange icon near the top of the window. You will have to substitute the names of the various quads for what I have put in " ". Also, you might have to modify the script if your data sends a different character that the ones I have used. Good luck.

    dim rep, dem, ind as xpbaseobject

    scene.getobjectbyname ("Republican quad", rep)
    scene.getobjectbyname ("Democrat quad", dem)
    scene.getobjectbyname ("Independent quad", ind)

    if text = "R" then
    rep.visible = true
    dem.visible = false
    ind.visible = false

    else if text = "D" then
    rep.visible = false
    dem.visible = true
    ind.visible = false

    else if text = "I" then
    rep.visible = false
    dem.visible = false
    ind.visible = true

    else
    rep.visible = false
    dem.visible = false
    ind.visible = false

    end if

    ------------------------------
    Malcolm Thorpe
    Free Lance Xpression Designer/Carbonite TD
    ------------------------------



  • 3.  RE: Election Party Color Field

    Ross Staff
    Posted 10-13-2022 05:02
    There's quite a few threads already started on this subject. 
    https://livinglive.community/communities/community-home/digestviewer/viewthread?GroupId=199&MID=23051&CommunityKey=91812bfd-9393-4a3f-8a74-7f8035df130e&tab=digestviewer

    https://livinglive.community/communities/community-home/digestviewer/viewthread?GroupId=199&MID=23525&CommunityKey=91812bfd-9393-4a3f-8a74-7f8035df130e&tab=digestviewer

    ------------------------------
    Simon Redmile
    Senior Graphic Programmer & Designer
    Ross Video
    Bristol United Kingdom
    ------------------------------



  • 4.  RE: Election Party Color Field

    Posted 10-13-2022 06:13


    Thanks guys for the help.
    I used one of the threads provided by Red and came up with a solution.



    ------------------------------
    Lee Mann
    On Air Director
    WAKA 8
    ------------------------------



  • 5.  RE: Election Party Color Field

    Posted 10-13-2022 06:37
    Hi all.
    Lee use for that dynamic material.
    Create materials named like R with red color and D with blue color. In the quad select dynamic material and set  a text object name @Party@
    https://livinglive.community/discussion/visual-logic-color-change-based-on-datalinq-strings?ReturnUrl=%2fcommunities%2fcommunity-home%2fdigestviewer%3fcommunitykey%3d91812bfd-9393-4a3f-8a74-7f8035df130e


    ------------------------------
    Roman Yaroshenko
    chief specialist
    RBC-TV
    Moscow Russian Federation
    ------------------------------