Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions setValueAtKey integer problem extendscript

  • setValueAtKey integer problem extendscript

    Posted by Rainier Raydán on June 16, 2017 at 1:57 am

    Hi. Im trying to assing a textbox number to the first parameter of the setValueAtKey method.

    var xValue = myPanel.grp.panelThree.setX.text;
    var yValue = myPanel.grp.panelThree.setY.text;
    var zValue = myPanel.grp.panelThree.setZ.text;
    var kValue = myPanel.grp.panelTwo.setK.text;
    curItem.layer(1).property("ADBE Transform Group").property("ADBE Scale").setValueAtKey ((kValue), [xValue, yValue, 0]);

    when a put this it says “Unable to call setValueAtKey” because of parameter 1. is not an unsigned integer.

    the idea is set keyframe number by a textbox in my script UI.

    Thanks!

    Rainier Raydán replied 8 years, 11 months ago 2 Members · 2 Replies
  • 2 Replies
  • Dan Ebberts

    June 16, 2017 at 6:41 am

    It sounds like you need to convert your key number from text to an integer with parseInt(). You probably need to convert your x and y values as well, using parseFloat().

    Dan

  • Rainier Raydán

    June 16, 2017 at 10:43 am

    Thanks!

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