Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Update “statictext” on UI

  • Update “statictext” on UI

    Posted by Loris Grifa on February 19, 2018 at 12:57 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());

    Loris Grifa replied 8 years, 2 months ago 2 Members · 3 Replies
  • 3 Replies
  • Loris Grifa

    February 20, 2018 at 4:50 pm

    No one can help?

  • James Ronan

    February 21, 2018 at 2:56 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();
    }

    w.show(); // show window

  • Loris Grifa

    February 22, 2018 at 9:21 am

    Great!

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

    Now, my index, is shown perfectly!

    Thank’s again

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