Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Why onClick doesnt work in UI Panel ????

  • Why onClick doesnt work in UI Panel ????

    Posted by Adrián Wulfrath on April 5, 2016 at 12:44 am

    I dont know why variables in UI Panels doesnt work, just with the normal Window work, but not in the panel. I dont know how to assign variable name to an specific panel statement.

    {
    function myScript(thisObj){
    function myScript_buildUI(thisObj){
    var myPanel = (thisObj instanceof Panel) ? thisObj : new Window("palette","My Window name",undefined,{resizable:true});

    res = "group{orientation:'column',\
    groupTwo: Group{orientation:'column',\
    myIconButton: IconButton{text:'IconButton', image:'~/Desktop/LogoC5Ctrl.png'},\
    myStaticText: StaticText{text:'Este es mi texto /n dfgdf'},\
    },\
    groupOne: Panel{text:'Master', orientation:'column',alignment:['fill','fill'],alignChildren:['fill','fill'],\
    myCheckbox: Checkbox{text:'My Checkbox'},\
    myDropDownList: DropDownList{properties:{items:['Amarillo','Morado','LightBlue','MidBlue']}},\
    },\
    }";

    myPanel.grp = myPanel.add(res);

    //Defaults
    myPanel.grp.groupOne.myDropDownList.selection = 0

    return myPanel;

    var BtnURL = myPanel.grp.groupTwo.myIconButton.onClick
    //Action to link Voraz OnClick
    BtnURL.onClick = LinkToURL;

    function LinkToURL()
    {
    var URL = "https://www.estudiovoraz.com"; // your web page
    if ($.os.indexOf("Windows") != -1)
    system.callSystem(winBrowserCmd + " " + URL);
    else
    system.callSystem(macBrowserCmdStart + URL + macBrowserCmdEnd);

    }

    }
    var myScriptPal = myScript_buildUI(thisObj);

    if((myScriptPal != null) && (myScriptPal instanceof Window)){
    myScriptPal.center();
    myScriptPal.show();
    }

    }

    myScript(this);
    }

    Adrián Wulfrath replied 10 years, 1 month ago 1 Member · 0 Replies
  • 0 Replies

Sorry, there were no replies found.

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