Quantcast
Channel: Adobe Community: Message List
Viewing all articles
Browse latest Browse all 92406

Re: Re: [Tutorial] After Effects ExtendScript Script Writing

$
0
0

Hi David,

 

Many thanks for your tutorial series. This is really big great job!

 

But I not understand how can I add dynamic code to my UI panels?

 

Here's my code:

 

{    var a = "It's working!"; 
function myScript(thisObj){        function myScript_buildUI(thisObj){                var myPanel = (thisObj instanceof Panel) ? thisObj : new Window("palette", "AE вещает ёпт", undefined);
                res = "group{orientation:'row', alligment:['fill','fill'], alignChildren:['fill','fill'],\                                groupOne: Group{orientation:'column', alligment:['fill','fill'], alignChildren:['fill','fill'],\                                    myImage: Image{text:'nothing', image:'~/Desktop/joy.png'}, alligment:['fill','top'],\                                    myButton: Button{text:'Ok'}, alligment:['fill','top'],\                                },\                                groupTwo: Group{orientation:'column',\                                    myStaticText: StaticText{text:'Пора играть в Diablo III - Даже AE тебе говорит епт'}, alligment:['fill','top'],\
                                    mySlider: Slider{text:'slider', value:'50'}, alligment:['fill','top'],\                                },\                          }";                myPanel.grp = myPanel.add(res);                             // размер окна
                myPanel.layout.layout(true);                myPanel.grp.minimumSize = myPanel.grp.size;                             //изменяемый размер панелей
                myPanel.layout.resize();                myPanel.onResizing = myPanel.onResize = function(){this.layout.resize()};                             return myPanel;            }        var myScriptPal = myScript_buildUI(thisObj);             if((myScriptPal != null) && (myScriptPal instanceof Window)){            myScriptPal.center();            myScriptPal.show();        }    }
myScript(this);
}

 

I'll try to explain. I want click on my "Ok" Button and she say

alert(a);

 

The question is,how do I makedynamicelements in this code. How to programfor example- myButton. ShouldI turn to the "res" files or not? And how it work? Thanks for your time David.


Viewing all articles
Browse latest Browse all 92406

Trending Articles



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