Activity › Forums › Adobe After Effects › Help! Syntax error message
-
Help! Syntax error message
Posted by allie litherland on October 12, 2020 at 6:11 pmHello,
I’m new to expressions so I’m hoping this will be an easy fix for someone out there!
Here is my code:
indexProperty = thisProperty.propertyGroup(1).propertyIndex;
mask1 = content(“Ellipse 1”).content(“indexProperty-1”).path;
point1 = linear(time,0,2,mask1.points(){0},mask1.points(){1});
point1 = linear(time,0,2,mask1.points(){1},mask1.points(){2});
point1 = linear(time,0,2,mask1.points(){2},mask1.points(){3});
point1 = linear(time,0,2,mask1.points(){3},mask1.points(){1});
createPath(points = [point1,point2,point3,point4],[0,100], inTangents = [], outTangents=[],isClosed+true);
The error message says in point1 (top point1 order) Missing ) after argument list. A couple of things I find confusing, why doesn’t it apply to the rest of the points and also I cannot find a missing )?! Can anybody help?
Many thanks, Allie
allie litherland replied 5 years, 10 months ago 3 Members · 10 Replies -
10 Replies
-
Walter Soyka
October 12, 2020 at 8:26 pmAllie, it looks like there are a few mistakes or typos in here. Can you briefly describe what you’re looking for this to accomplish and then I can make some suggestions?
-
allie litherland
October 13, 2020 at 10:08 pmHi Walter, thanks for reaching out. I was following along to a video tutorial (link below) I have triple checked the spelling used and because I’m a novice I’m blindly following instructions! Anyway, it’s a recursive animation, expect instead of using a rectangle I’ve used an ellipse. Many thanks for your help.
https://www.youtube.com/watch?v=SSdyo5BbRvM&list=PLZAr8tT8TcsRj62nIO7ILCMitj5RKjsMf&index=12
Some contents or functionalities here are not available due to your cookie preferences!This happens because the functionality/content marked as “Google Youtube” uses cookies that you choosed to keep disabled. In order to view this content or use this functionality, please enable cookies: click here to open your cookie preferences.
-
Walter Soyka
October 13, 2020 at 10:48 pmDid you convert your Ellipse path from a parametric path to a Bezier path?
Also, you’re redefining point1 over and over; I think you want to change those to the other 3 points, like this:
indexProperty = thisProperty.propertyGroup(1).propertyIndex;
mask1 = content(indexProperty-1).path;
point1 = linear(time, 0, 2, mask1.points()[0], mask1.points()[1]);
point2 = linear(time, 0, 2, mask1.points()[1], mask1.points()[2]);
point3 = linear(time, 0, 2, mask1.points()[2], mask1.points()[3]);
point4 = linear(time, 0, 2, mask1.points()[3], mask1.points()[0]);
createPath(points = [point1, point2, point3, point4], inTangents = mask1.inTangents(), outTangents = mask1.outTangents(), isClosed = true); -
allie litherland
October 14, 2020 at 1:21 pmHi Walter,
Thanks, I pasted your edited code and the following error came up on the point1 line
TypeError – cannot read property “points” of undefined….

-
allie litherland
October 14, 2020 at 2:03 pmHmm, it appears this forum doesn’t support aep files…I could screen shot?
-
Blaise Douros
October 14, 2020 at 8:11 pmI brought this up recently; the Cow staff replied that are working on getting the .aep file type added. For now, you can upload an .aep within a .zip file, and it’ll work fine that way.
-
allie litherland
October 15, 2020 at 3:13 pm -
Walter Soyka
October 16, 2020 at 7:07 amThis works in your AEP:
indexProperty = thisProperty.propertyGroup(1).propertyIndex;
mask1 = content("Ellipse 1").content(indexProperty-1).path;
point1 = linear(time, 0, 2, mask1.points()[0], mask1.points()[1]);
point2 = linear(time, 0, 2, mask1.points()[1], mask1.points()[2]);
point3 = linear(time, 0, 2, mask1.points()[2], mask1.points()[3]);
point4 = linear(time, 0, 2, mask1.points()[3], mask1.points()[0]);
createPath(points = [point1, point2, point3, point4], inTangents = mask1.inTangents(), outTangents = mask1.outTangents(), isClosed = true);But the tangents will probably not work the way you expect. How do you want this animation to work?
-
allie litherland
October 16, 2020 at 5:27 pmThanks Walter, it does animate but you’re right not how I was picturing it!
I wanted to create similar to the youtube video (https://www.youtube.com/watch?v=SSdyo5BbRvM&t=2s) rather instead of squares they are circles. Something I thought would be a simple task
I wanted this to expand for 5 seconds and collapse for 5 seconds to mimic a breathing technique.Some contents or functionalities here are not available due to your cookie preferences!This happens because the functionality/content marked as “Google Youtube” uses cookies that you choosed to keep disabled. In order to view this content or use this functionality, please enable cookies: click here to open your cookie preferences.
Reply to this Discussion! Login or Sign Up
