Creative Communities of the World Forums

The peer to peer support community for media production professionals.

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 pm

    I’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.rotation

    Is 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 pm

    A 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 pm

    I 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 pm

    Either of these seem to work:

    var bluecircle = thisComp.layer(“BlueCircle”).transform.rotation;
    bluecircle

    Or,

    bluecircle = thisComp.layer(“BlueCircle”).transform.rotation

    Dan

  • Christopher Rotter

    August 14, 2010 at 4:34 pm

    It’s not working, same error.

  • Dan Ebberts

    August 14, 2010 at 4:43 pm

    Well, 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 pm

    If 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 am

    I 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 am

    I’m really curious – what did you have to do to get it to work?

    Dan

  • Christopher Rotter

    August 16, 2010 at 12:22 pm

    I thought I got it to work. Argh!

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy