Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Drop down menu for toolkit.

  • Drop down menu for toolkit.

    Posted by Fabio Apelbaum on March 27, 2015 at 8:10 pm

    Hi, Im new to the scripting world and can really use everyone input!

    The project I am working on is a team match-up. I have all the team logos inside the comps.

    So far I was able to write a short script that first hides all teams and then enables only the team being selected:

    Then I have the script that provides the two drop down menu for the Home and Away teams:

    Both scripts works fine on its own, was I am having difficulty is to blend them together in one script, Final objective is to be able to select a team tricode from the drop down list and once selected make the team visible within the comp.

    Here is the script after i tried to put them together, The ?????? is what I believe its missing for it to work, not sure what to write there:

    var myWin = new Window(“palette”, “Drop down list”, undefined);
    var proj = app.project;
    var awayComp = proj.item(2);
    var homeComp = proj.item(3);
    var myList = new Array();

    for(var i=1; i <= awayComp.numLayers; i++){ myList[myList.length] = awayComp.layer(i).name; } var groupOne = myWin.add("group", undefined, "GroupOne"); var dd = groupOne.add("dropdownlist", undefined, myList); dd.selection = 0; dd.onChange = function() { for(var i = 1; i < awayComp.layers.length +1;i++){ //Hides all visible layers awayComp.layer(i).enabled = awayComp.layers.enable = false; // check name if(awayComp.layers[i].name == ?????? { // turn into opposite awayComp.layers[i].enabled = !awayComp.layers[i].enabled; } } }; myWin.center(); myWin.show();
    Hope it makes sense!

    Please, I will truly appreciate all your help!

    Fabio Apelbaum replied 11 years, 1 month ago 1 Member · 0 Replies
  • 0 Replies

Sorry, there were no replies found.

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