Graphics

 View Only
  • 1.  Distance of child relative to length of text

    Posted 04-25-2017 21:02
    Hi Guys,

    So, I am wondering what the method in XPression is to keep the relative distance (X-Axis) between a parent text object and its child dependent upon the content of the Parent's text. For example, I am making a stat page for a football team. I have the stat '259 yards per game'. The text for 259 is the parent, yards per game is the child, and the line animates in together. If an operator changes that 259 to a shorter number, say 80... I need the yards per game text to maintain its relative distance, so that a smaller number doesn't create a larger gap, or a larger number doesn't overrun the text. I am certain there is a way to do this (in VizRT, I would use an auto-follow tag), I'm just not sure where it lives here in XPression. Nothing I have tried within Visual Logic seems to have any effect.

    Any help appreciated. Thanks in advance
    - Willie


  • 2.  RE: Distance of child relative to length of text

    Posted 04-26-2017 00:35
    After a couple of hours of frustration, I have the answer. Just in case anyone else happens upon this with a similar question, the setup is the Stat (259) Bounding Box Width Scaled -> Multiply (base) *1 -> Offset (base) -> yards per game (text) Position X. Simply enter the desired value into the offset, and you're golden. It does break if you exceed the autosqueeze bounding, and I'll want to revisit that eventually, but this has me going for now.

    Cheers
    - Wille
    #XPression


  • 3.  RE: Distance of child relative to length of text

    Posted 04-26-2017 01:23
    Update - looking back at the setup, the multiply node is unneeded (it was only doing *1, which essentially had no effect)
    #XPression


  • 4.  RE: Distance of child relative to length of text

    Posted 05-31-2017 16:22
    Willie I might be over-simplifying this. If your yards number has a right tab and the "yards per game" text has a left tab they shouldn't move relative to each other. Or I don't understand the question. Either way I'm glad you got it solved.

    #XPression


  • 5.  RE: Distance of child relative to length of text

    Posted 05-31-2017 19:58
    Yes, I think you have misunderstood the question. Ultimately it was about keeping the space between 2 separate text objects (with different font values) consistent.
    #XPression