• Global community
• Language:
• Deutsch
• English
• Español
• Français
• Português
• 日本語コミュニティ
Dedicated community for Japanese speakers
• 한국 커뮤니티
Dedicated community for Korean speakers
Exit
• simple expression question!

# simple expression question!

Explorer ,
Nov 15, 2023 Nov 15, 2023

Copied

Hi there!  I'm working with someone's AE file, and I need to understand something.

A shape layer has a Group that contains multiple dashed strokes that all move along the line ... and loop.

They're using an expression on the Offset property on each stroke:

one stroke will have:

-time * 24 * 6 + 25

then the one below will have:

-time * 24 * 6 + 250

And the next one will have:

-time * 24 * 6 + 1000

Can someone break this down for me?

TOPICS
Expressions

Views

118

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
2 Replies 2
Community Expert ,
Nov 16, 2023 Nov 16, 2023

Copied

Looking at the expressions, my guess is the comp is 24 frames per second.  That explains the 24.  Times 6 is a liitle odd:

• If time = 1 (1 second) set the value to be 144 + 25
• If time = 2, set the value to be 288 + 25

The plus (+) values are just offsetting the starting positions, so the second expression offsets the value by 225 from the first.

-time is setting the values into the negative, so it's offsetting the strokes by -144 etc...

A simpler way to code this would have been to have had the expression on one stroke, (time*-144)+25, then pickwhip this value for the second stroke and add the difference., e.g. "strokeoffset"+225.

The brackets are not "needed", but add clarity.

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Explorer ,
Nov 16, 2023 Nov 16, 2023

Copied

LATEST

Thanks for the reply!  ... I think the " x6" was just to speed it up. There's probably a better way to do this.