I want to create a Text Layer that controls Image Size, I want so that the user can type the desired number in the text layer and it would reflect on the scale property.
I want the numbers to be relative to the max size of 1920x1080 being equal to 100% and 0% being equal to 0x0, I'm having trouble getting the source text to only write numbers then the relativity of the numbers to %.
Is this possible at all?
4 posts • Page 1 of 1
You sure can. This is one way you might want to go about it.
I hope this helps.
Code: Select all
var temp = thisComp.layer("text").text.sourceText; // Pick whip sourceText from the text layer you want to use var num = Number(temp); // Number is a method that allows you to parse/convert a value to a number data type [num, num] // Return the variable that you use to convert the sourceText in a two item array and this will return give you a relative size
For Expression Tutorials: