Quantcast
Channel: Adobe Community : Discussion List - After Effects Scripting
Viewing all articles
Browse latest Browse all 2143

Dropdown list function and variables

$
0
0

Hi

I have a basic problem with dropdown list.

my variable alignTxt doesn't work outside function.

 

var alignmentBox = alignmentBoxGroup.add("dropdownlist", undefined, ["Left","Center", "Right"]);    alignmentBox.onChange = function (){        if(this.selection.index==0){            var alignTxt = "ParagraphJustification.LEFT_JUSTIFY";        };        if(this.selection.index==1){            var alignTxt = "ParagraphJustification.CENTER_JUSTIFY";        };        if(this.selection.index==2){            var alignTxt = "ParagraphJustification.RIGHT_JUSTIFY";        };
}

myText.justification = alignTxt;

Thanks in advance!


Viewing all articles
Browse latest Browse all 2143

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>