Activity › Forums › Adobe After Effects Expressions › Simple Expression Error, why ??
-
Simple Expression Error, why ??
Posted by Christopher Rotter on August 13, 2010 at 12:46 pmI’m trying to test some expression syntax out and why does After Effects throw me back this error for this expression?
var blue circle=thisComp.layer("BlueCircle").transform.rotationIs there a way to make the font of the expression window larger, in After Effects CS3 ?
Christopher Rotter replied 15 years, 9 months ago 2 Members · 9 Replies -
9 Replies
-
Dan Ebberts
August 13, 2010 at 2:04 pmA variable name can’t have a space in it. Try it this way:
var blueCircle = thisComp.layer(“BlueCircle”).transform.rotation
As far as I know there’s no way to change the font size in the expression editor.
Dan
-
Christopher Rotter
August 14, 2010 at 3:25 pmI want to assign a variable on the Red Circle for the Blue Circle and removing the space continues After Effects to fire back an error:
That error is:
After Effects warning: Undefined value used in expression. Could be an out of range array subscript ?
Error occurred a line 0.
Comp: ‘Comp 1’
Layer 2: (‘Red Circle’)
Property: ‘Position’var bluecircle=thisComp.layer("BlueCircle").transform.rotation -
Dan Ebberts
August 14, 2010 at 4:07 pmEither of these seem to work:
var bluecircle = thisComp.layer(“BlueCircle”).transform.rotation;
bluecircleOr,
bluecircle = thisComp.layer(“BlueCircle”).transform.rotation
Dan
-
Dan Ebberts
August 14, 2010 at 4:43 pmWell, I’m stumped. Both versions that I posted work for me, while the version you posted generates the error you described. Apparently you can’t end an expression with a var declaration (I guess I’d never tried it before) but if the versions I posted (which don’t do that) generate the same error for you, I have no idea what’s going on.
Dan
-
Christopher Rotter
August 14, 2010 at 5:19 pmIf something as simple as that, doesn’t work I’m not going to try anything else. I wanted to stay with CS3 Maybe I should scratch things together and upgrade.
-
Christopher Rotter
August 16, 2010 at 12:39 amI got the expression to work, it is quite sensitive it more so then the JavaScript language its self. I’m going to have to do some more practices so I know what arrangement the syntax has to be in.
-
Dan Ebberts
August 16, 2010 at 1:51 amI’m really curious – what did you have to do to get it to work?
Dan
Reply to this Discussion! Login or Sign Up