I currently have a dropdown list with three sizing options in it. Then I have two check mark boxes, one if checked ideally would create the template at its normal composition size and if the other checkbox is checked it would inverse the widthxheight of the composition size. Then below that I have a "generate" button that I want to be able to click and depending on my selections it creates the comp.
It sounds like I need some sort of if then statement but I'm having a hard time putting the two together. See below what I have so far.
There may be parts missing but I have it all working in a decibel pallate currently. I just don't have the functionality tied to a button yet.
Any help would be much appreciated!!!
(also I don't know how to format the extend script on here so apologies for that)
---------------------------
// palette controls
templateGen.VerticalCheckbox = new Object();
templateGen.HorizontalCheckbox = new Object();
// define values for the controls
templateGen.comLookup = new Object();
templateGen.compLookup = 'Template1';
templateGen.compLookup = 'Template2';
templateGen.compLookup = 'Template3';
function templateGen_getHashValues(hash)
{ // {{{
var ary = new Array();
for (k in hash) {
ary.push(hash[k]);
}
return ary;
} // }}}
// "composition" menu
var panelGrp1 = templateGen.palette.add('Panel', undefined, 'Comp Templates');
compGrp1 = panelGrp1.add('group', undefined, 'Templates List');
compGrp2 = panelGrp1.add('group', undefined, 'Orientation');
compGrp3 = panelGrp1.add('group', undefined, 'Generate');
templateGen.compList = compGrp1.add('dropdownlist', LIST_DIMENSIONS, templateGen_getHashValues(bapple.compLookup));
templateGen.compList.helpTip = "Choose the type device template you want here. All comps are 60fps.";
templateGen.compList.selection = 'Template1';
templateGen.compList.graphics.foregroundColor = darkColorBrush;
templateGen.VerticalCheckbox = compGrp2.add('checkbox', undefined, 'Vertical');
templateGen.VerticalCheckbox .value = true;
templateGen.HorizontalCheckbox = compGrp2.add('checkbox', undefined, 'Horizontal');
templateGen.HorizontalCheckbox .value = false;
templateGen.generateBtn1 = compGrp3.add('button', undefined, 'Generate');
//applyBtn.onClick =????;