ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Update "statictext" on UI

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
loris grifa
Update "statictext" on UI
on Feb 19, 2018 at 12:57:19 pm

Hi to everybody,

here i got an extracted from my code.

Is it possible to update the value of my "statictext" that refers to a function that simply checks a number of remaining object?

In the same interface there are a couple of buttons that modifies that number, but the value is calculated only when the UI is built,

Thank's a lot

var group_one = MyWin.add("group", undefined,"G1");

group_one.orientation = "row";

group_one.add("statictext", undefined, "TOTAL ITEMS");

group_one.add("statictext", undefined, ReadElemNum());

Return to posts index

loris grifa
Re: Update "statictext" on UI
on Feb 20, 2018 at 4:50:37 pm

No one can help?

Return to posts index

James Ronan
Re: Update "statictext" on UI
on Feb 21, 2018 at 2:56:53 pm

I'm not entirely sure what your trying to do... But here is an example of static text changing values when a slider is moved.

var w = new Window ("dialog", "test",undefined,{}); // create window

var slider = w.add("Slider",undefined); // create slider
slider.value = 50; // set intital value as 50

var staticText = w.add("StaticText",undefined,"50"); //Create static text

slider.onChanging = function() { //create onchanging event for the slider that updates the staticText everytime there is a change
var percentage = slider.value;
staticText.text = percentage.toString();
}; // show window

Return to posts index

loris grifa
Re: Update "statictext" on UI
on Feb 22, 2018 at 9:21:28 am


the code u posted was really helpfull to understand the logic!

Now, my index, is shown perfectly!

Thank's again

Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2019 All Rights Reserved