Graphics

 View Only
  • 1.  Formatting text to remain within boundary of L3rd Bar

    Posted 02-26-2015 20:41

    Hello all, I'm hoping someone can help me with a solution.

    I have a L3rd bar that we place tweets into via a database. My problem is the producer wants me to fill the space of the bar. Therefore, tweets with less words (smaller) need to be bigger and longer tweets (bigger) need to be smaller in size to fix all the text. I have a script below but I keep getting inconsistent results from it. 1 show it will work fine and then next show won't. Not sure if i'm missing something in my script? The goal is to get this as automated as possible because producers want to start using live tweets. Any advice is appreciated.

    Thanks.



    dim textobject as xpTextObject

    self.GetObjectByName("Tweet", textobject)

    textobject.PosY = 325

    textobject.ScaleX = 1.0

    textobject.ScaleY = 1.0

    textobject.WordWrapWidth = 1720.00

    if textobject.LineCount = 1 then

    textobject.PosY = 280

    textobject.ScaleX = 1.0

    textobject.ScaleY = 1.0

    textobject.WordWrapWidth = 1773.00

    elseif textobject.LineCount = 2 then

    textobject.PosY = 320

    textobject.ScaleX = 0.950

    textobject.ScaleY = 0.950

    textobject.WordWrapWidth = 1800.00

    elseif textobject.LineCount = 3 then

    textobject.PosY = 335

    textobject.ScaleX = .7

    textobject.ScaleY = .7

    textobject.WordWrapWidth = 2418.00

    end if


  • 2.  RE: Formatting text to remain within boundary of L3rd Bar

    Posted 02-27-2015 21:46
    I think the major problem is the word wrap length keeps changing each time the datalinq puts in new text; which cause the text wrap to screw up.

    Anyone run into this problem before?

    #XPression


  • 3.  RE: Formatting text to remain within boundary of L3rd Bar

    Posted 03-02-2015 19:59

    Hello,

    I'm wondering if it's getting confused by having a set of coordinates and wordwrap and then you get an if statement. What are the first set of coordinates for?



    textobject.PosY = 325

    textobject.ScaleX = 1.0

    textobject.ScaleY = 1.0

    textobject.WordWrapWidth = 1720.00

    Is the default to have 1 line? Does it go more than 3 lines?

    i have found that it's easiest to start with the largest and work your way down. With the last statement being the lowest number. Below starts with if 3 lines, then 2 lines otherwise it will be one line and do this.

    dim textobject as xpTextObject

    self.GetObjectByName("Tweet"�, textobject)

    if textobject.LineCount = 3 then

    textobject.PosY = 335

    textobject.ScaleX = .7

    textobject.ScaleY = .7

    textobject.WordWrapWidth = 2418.00

    else if textobject.LineCount = 2 then

    textobject.PosY = 320

    textobject.ScaleX = 0.950

    textobject.ScaleY = 0.950

    textobject.WordWrapWidth = 1800.00

    Else

    textobject.PosY = 280

    textobject.ScaleX = 1.0

    textobject.ScaleY = 1.0

    textobject.WordWrapWidth = 1773.00

    end if



    I'm just unclear what the first set of actions are for?

    Does this help?


    #XPression


  • 4.  RE: Formatting text to remain within boundary of L3rd Bar

    Posted 03-09-2015 15:00
    Hi Lesley, ignore the first set of actions. I put those in while trying to trouble shoot the problem. Thinking that if I started with a default I may track down the issue. Thanks for the advice.

    S.

    #XPression