Quantcast
Channel: Adobe Community : Discussion List - After Effects Scripting
Viewing all articles
Browse latest Browse all 2143

multiple onClick

$
0
0

hi,

 

What should I do in order to make all onClick buttens to do index button alert?

 

 

 

var myWin = buildUI(this);

if (myWin != null && myWin instanceof Window) {

  myWin.show();

  }

 

 

function buildUI (thisObject) {

 

 

if (thisObject instanceof Panel) {

  var myWin = thisObject;

  } else {

    var myWin = new Window ("palette", undefined, [200, 200, 600, 500], {resizeable: true});

  }

 

 

if (myWin != null ) {

 

 

 

        btnGroup=myWin.add("group");

        btnGroup.orientation="column"

       

       

       

        var AIBtns=[];

        var filse=4;

        var r=0;

        for(r;r<filse;r++){

            AIBtns[r]= btnGroup.add("button", undefined,name=[r+1] ,{style:"toolbutton"});

            AIBtns[r].onClick=function (AIBtns){

              alert(r)//<<

                }

           

            }

//~         alert(AIBtns)

 

 

  myWin.layout.layout(true);

  myWin.layout.resize();

   

  myWin.onResizing = myWin.onRize = function () {

        this.layout.resize();}

  } //if (myWin != null )

return myWin;

} //function buildUI (thisObject)


Viewing all articles
Browse latest Browse all 2143

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>