Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Trouble with addComp in after effects script

  • Trouble with addComp in after effects script

    Posted by Alan Torres on June 24, 2013 at 12:03 am

    Hey everyone,

    I am very new to scripting in After Effects and javascript so please bear with me.

    I watched a couple of tutorials and got the hang of it but I quickly ran into an issue.

    As of now, all I want this script to do is create a comp with its settings that I define in prompts. I can do this just fine for the comp’s name but when I type in something for the comp width I get the error “Unable to call “addComp” because of parameter 2. 1920 is not an integer”. How is 1920 not an integer? I tried other numbers to no avail. I am sure this is something very simple to solve.

    Here is my script thus far

    var compName = prompt("Name of new comp","Comp Name"); //Defines the name of the new comp
    var compWidth = prompt("Width of new comp",1920); //Defines the width of the new comp

    app.project.items.addComp(compName, compWidth, 1080, 1.00, 200, 23.976);

    Roland R. kahlenberg replied 13 years, 2 months ago 2 Members · 1 Reply
  • 1 Reply

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