Infinite Repeating Dashed Lines in After Effects
I’ve been creating a lot of videos in After Effects like the one below. One thing I had to learn was to how to create that Dashed Line Repeating Animation.
- First Select the Pen Tool
- Click the Fill and Select the Transparent Color. Select a stroke color. This makes sure that you’re going to draw a path or line.
- Draw a path of your choice
- Select the Shape Layer that was created that references the path that you just drew. Expand to
Dashesthen press the
+Button. Choose some number for the
Offset Valueuntil you see a dashed line.
- Now expand
Dashesand now hold down the Option or Alt Key and click the Clock on
Offset. You’ll be granted an place to add an expression. This is a script that will run
This is the code:
content("Shape 1").content("Stroke 1").dash.offset + -(250 * time)
- Press play! And now you should have it animating inifinitely.
- To have the animation move in the opposite direction remove the
(250 * time)
So you should have something like this:
content("Shape 1").content("Stroke 1").dash.offset + (250 * time)
To have the shape move faster or slower change the number
250to something else.
To reference other Shapes or Strokes, change
"Stroke 1"to refer to differing paths and shapes.