ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

looping news ticker template creation

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Tobias Pfeiffer
looping news ticker template creation
on Oct 20, 2010 at 7:32:41 am

hi,
i wanted to create a template for easy lower thirds news ticker creation. the template should be used by people not too familiar with after effects.
the main problem that im stumbling upon is that i cant access the actual width (character count would be another valuable information) of the textlayer. the width of the text layer is changing on a weekly basis. without this information im not able to script an ever repeating ticker.
any thoughts?
thanks in advance,
tobi



Return to posts index

Dan Ebberts
Re: looping news ticker template creation
on Oct 20, 2010 at 5:37:57 pm

You can get the character count of a text layer this way:

thisComp.layer("your text").text.sourceText.length

This thread discusses a hack, using sampleImage() that will give you the left or right edge of the text:

http://forums.creativecow.net/readpost/227/15135

Other than that, you'd have to use a script, which does have access to the actual extents of the text in a text layer.

Dan



Return to posts index

Kevin Camp
Re: looping news ticker template creation
on Oct 20, 2010 at 7:36:47 pm

if i under stand what you are trying to do -- just have a line of text crawl across the bottom of the screen -- then i don't think you need to know the width.

i think you could time to offset the position with an expression like this:

offset = 2; // value in pixels per frame
x = timeToFrames()*offset;
value - [x,0]


it will march across the screen for as long as the comp's duration.

and to make the source text string loop, you could use an expression like this:

value + " " + value + " " + value;

just keep adding + " " + value to make the string loop.

Kevin Camp
Senior Designer
KCPQ, KMYQ & KRCW


Return to posts index


Chris Wright
Re: looping news ticker template creation
on Oct 20, 2010 at 7:59:49 pm

if you want a ticker to look like fox news where it wraps around, just add effect-distort-offset and add this to shift center, creating an infinite wrap-looping ticker.

[time*1000,value[1]]

http://technicolorsoftware.hostzi.com/


Return to posts index

Tobias Pfeiffer
Re: looping news ticker template creation
on Oct 21, 2010 at 9:57:30 pm

thanks to everyone here.
great suggestions.
fixed it.



Return to posts index

Clayton Glenn
Re: looping news ticker template creation
on Jun 28, 2018 at 9:03:15 pm

Did you try something like this?
Seems like what you are trying to do....


txt = thisComp.layer("text");

w = txt.sourceRectAtTime(time,true).width;

border = 10;

s = (w + 2*border)*100/width;

[s,value[1]]


Saving the world one pixel at a time.


Return to posts index

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