Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions bringToFront() for AE? UI keeps falling behind application

  • bringToFront() for AE? UI keeps falling behind application

    Posted by Mac Ward on August 21, 2009 at 10:47 pm

    Is there a way to make a user interface come to the front of the screen?

    I’m using the UI from this script:

    https://forums.creativecow.net/thread/227/12707

    but it keeps falling behind After Effects, and I always have to move AE to get to it.


    function switchPal(thisObj)
    {
    function switchPal_buildUI(thisObj) {

    var panel = (thisObj instanceof Panel) ? thisObj : new Window("palette", "Express On/Off", [100, 100, 310, 180],{resizeable:true});

    // Text...
    panel.butOne = panel.add("statictext", [40, 10, 225, 30], "Enable/Disable Expressions");

    // 'Enable' button
    panel.enabBtn = panel.add("button", [40, 40, 80, 60], "=");
    panel.enabBtn.onClick = enableAll;

    // 'Disable' button
    panel.disabBtn = panel.add("button", [120, 40, 160, 60],"≠");
    panel.disabBtn.onClick = disableAll;

    return panel;
    }

    // Display interface...

    var UI = switchPal_buildUI(thisObj);

    if ((UI != null) && (UI instanceof Window)) {
    UI.center();
    UI.show();
    }
    }
    switchPal(this);

    Filip Vandueren replied 16 years, 11 months ago 2 Members · 1 Reply
  • 1 Reply
  • Filip Vandueren

    August 25, 2009 at 7:56 pm

    I think it lies in the fact if the script’s UI is a Window or a Panel.
    Panels always stay on top.

    Don’t know if the browser way of giving window.focus() works. Probably not.

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