FORUMS: list search recent posts

Why onClick doesnt work in UI Panel ????

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Adrián Wulfrath
Why onClick doesnt work in UI Panel ????
on Apr 5, 2016 at 12:44:35 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 = "http://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);
}


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2018 CreativeCOW.net All Rights Reserved
[TOP]