Skip to main content
S_ A
Inspiring
May 30, 2025
Answered

Stroke animation- how to get rid of this glitch

  • May 30, 2025
  • 2 replies
  • 375 views

hi,

 

I have tried all the numbers of universe in 'offseting' but no way I can fix this error, Like 'Papa Roach' I am singing 'this is my last resort', Adobe AE community forum is my last resort... please help.

how can I make this glitch gone, plaeas help... I want a smooth flow, Thank you.

 

 

Correct answer Rick Gerard

If you want to have a symmetrical dashed line around a circle, decide how many dashes you want and divide the circle's circumference by the number of dashes. This is very easy to do if you calculate the circumference and divide that by the number of dashes you want. This expression added to the Ellipse/Stroke/Dashes/Dash property will give you 40 segments and fix the overlap problem:

r = content("Ellipse 1").content("Ellipse Path 1").size[0];
c = Math.PI * r;
s = 40;
c/s

Offset the Ellipse/Transform/Rotation by -1.5 times (-60) the number of dashes and animate the Trim Paths/Start from 100 to 0, and you'll then get a dashed line that grows counter-clockwise with the top dash centered. You can then set a keyframe for offset at zero, then move down the timeline the same number of frames, set a second keyframe at -1 for the number of rotations, and add a loopOut("continue") expression to the offset to keep the dashed line rotating smoothly.

 

You will get something like this:

If you want to add gaps, you'll need to use the circumference formula again ( or for the gap, then combine the values.

 

This should get you started. I have uploaded a project file.

 

 

2 replies

Rick GerardCommunity ExpertCorrect answer
Community Expert
May 30, 2025

If you want to have a symmetrical dashed line around a circle, decide how many dashes you want and divide the circle's circumference by the number of dashes. This is very easy to do if you calculate the circumference and divide that by the number of dashes you want. This expression added to the Ellipse/Stroke/Dashes/Dash property will give you 40 segments and fix the overlap problem:

r = content("Ellipse 1").content("Ellipse Path 1").size[0];
c = Math.PI * r;
s = 40;
c/s

Offset the Ellipse/Transform/Rotation by -1.5 times (-60) the number of dashes and animate the Trim Paths/Start from 100 to 0, and you'll then get a dashed line that grows counter-clockwise with the top dash centered. You can then set a keyframe for offset at zero, then move down the timeline the same number of frames, set a second keyframe at -1 for the number of rotations, and add a loopOut("continue") expression to the offset to keep the dashed line rotating smoothly.

 

You will get something like this:

If you want to add gaps, you'll need to use the circumference formula again ( or for the gap, then combine the values.

 

This should get you started. I have uploaded a project file.

 

 

S_ A
S_ AAuthor
Inspiring
May 30, 2025

😮😮This is what I needed. Thank you so much.

nishu_kush
Community Manager
Community Manager
May 30, 2025

Thanks for reaching out.

If it's a circle, have you tried rotating it so that this point is out of the visible area? I understand it's not a solution but good for a quick fix if it helps.

Let us know.


Thanks,
Nishu