FORUMS: list search recent posts

News Ticker (cropped text issue)

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Daniel Sleeth
News Ticker (cropped text issue)
on Dec 5, 2013 at 12:18:36 pm
Last Edited By Daniel Sleeth on Dec 5, 2013 at 1:19:07 pm

I have read all the other news ticker posts that I could find using the search, but none seem to resolve the issue.

I have made some news graphics with a ticker which scrolls some names across the red bar (see image below). The scrolling function works and it loops the text at the end e.g. in the image, after the last name "NAOMI CART" moves to the left, a few pixels later, the "• GIRLS TEAM..." follows it.

This is almost perfect, but my problem is that my text layer 'Ticker' actually has a load more names after Naomi Cart, but because they are off the screen at the start of the comp, they don't get included. Is there any way to adapt the expressions so AE scrolls the length of that layer instead of just the comp width of that layer? That way the whole ticker would be pretty much automated and I wouldn't have to change the width properties each time I change the text length...

http://images.creativecow.net/171222/screenshot2013-12-05at11.52.42.png

Thank you in advance

Mr Noob


//Tile Centre
offset = effect("Autoscroll - horizontal")("Speed (pixels/second)") * (time-inPoint) * (100/scale[0]);
[thisLayer.width/2 + offset, thisLayer.height/2]

//Output Width
(thisComp.width / (thisLayer.width * (scale[0]/100))) * 100


Return to posts index

Kevin Camp
Re: News Ticker (cropped text issue)
on Dec 5, 2013 at 11:25:25 pm

the problem you are running into is that ae sees a text layer as the size of the comp regardless of whether the text all fits within the comp or not...

what you could do is use a simple expression to have the text crawl:

offset = 2;
value-[0,timeToFrames(time)*offset)


and then another for the source text to make it repeat:

txt = text.sourceText;
txt+txt+txt+txt+txt+txt+txt+txt+txt+txt


you can just keep adding '+txt' for as many times as needed to keep text on the screen for the duration of the comp.

Kevin Camp
Senior Designer
KCPQ, KMYQ & KRCW


Return to posts index

Kevin Camp
Re: News Ticker (cropped text issue)
on Dec 5, 2013 at 11:39:17 pm

the last line of the first expresion should be this:

value-[timeToFrames(time)*offset,0)

got x and y transposed...

Kevin Camp
Senior Designer
KCPQ, KMYQ & KRCW


Return to posts index


Daniel Sleeth
Re: News Ticker (cropped text issue)
on Dec 6, 2013 at 11:08:24 am

Thanks for your reply!

txt = text.sourceText;
txt+txt+txt+txt+txt+txt+txt+txt+txt+txt

That is useful! Does that sourceText have a length that AE can use in an expression? i.e. take sourceText's length and offset thisLayer by that value?

UK Freelance Videographer


Return to posts index

Kevin Camp
Re: News Ticker (cropped text issue)
on Dec 6, 2013 at 8:20:56 pm

[Daniel Sleeth] "Does that sourceText have a length that AE can use in an expression? i.e. take sourceText's length and offset thisLayer by that value?"

not exactly... sourceText is just the text that is typed into the layer. it does't include anything about the size or font, it's just the text.

however, if you used a fixed width font, and measured the width of a character then you could use that to determine the width of the entire text string.

so, say you used a fixed width font like courier, and you determined the width of a character at the point size your chose was 20px. you could use an expression like this to get the width of the string and then have it crawl and loop:

chrW = 20; // value in pixels
rate = 2; // value in pixels per frame
txtW = chrW * text.sourceText.length / 2;
x = (timeToFrames(time) * rate) % txtW;
value-[x,0]


to make the loop seamless you'll need to make two instances of the sourceText, so this would go in the sourceText:

txt = text.sourceText;
txt+txt


so that should make a looping crawl for any length of text.. though the original source text would need to be wider than the comp (or the crawl area of the screen).

Kevin Camp
Senior Designer
KCPQ, KMYQ & KRCW


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]