Elizabeth Starr
Forum Replies Created
-
I figured out how to do the left and right justified versions, but am now stuck on a center-justified version.
Line 2 is always centered. The logo follows the position of the Line 2 text and is stuck to the left side, but Line 2 + the logo should appear centered on the screen. There is a ctrl layer that has logos with a slider selector. When you type “7”, there is no logo, so I need the Line 2 text to shift about 60 pixels to the left and recenter.
Right now, when I type into line 2, the text shifts over to the left and doesn’t stay centered.
I am not sure what I’m doing wrong, but I also don’t totally understand the coding and am experimenting to try and get the best result. I’m suspecting something is wrong with both my anchor point positions and some of the numbers I’ve plugged into the expressions.
Line 2 Null expression:var xDist = thisComp.layer("LINE 2").sourceRectAtTime().width;
var logoWidth = length(thisComp.layer("LOGOS NON TYPE FACE").transform.xPosition, thisComp.layer("LINE 2").transform.xPosition+165);
(thisComp.layer("Ctrl").effect("Logo Selector")("Slider") == 7) ? xDist - logoWidth :xDist;Logos expression:
textRect = thisComp.layer("LINE 2").sourceRectAtTime();
text_width = textRect.width;
text_left = textRect.left;xOffset = +490;
x = text_left + xOffset;
[x]
-
I should have titled the subject of this post “Logo follows text”
-
Elizabeth Starr
May 15, 2020 at 11:44 pm in reply to: Check Box Expression: if one box is checked, the rest are automatically unchecked or disabledThanks so much, Dan.
-
Elizabeth Starr
May 13, 2020 at 5:56 pm in reply to: Check Box Expression: if one box is checked, the rest are automatically unchecked or disabledSure! How would I rewrite the expression using a dropdown menu?
-
Elizabeth Starr
May 12, 2020 at 9:30 pm in reply to: using a layer’s visibility in an if/then expression on another layerBoom! It worked! Thank you, thank you, thank you! Wow, what a gift your help was.
-
Elizabeth Starr
May 12, 2020 at 9:19 pm in reply to: using a layer’s visibility in an if/then expression on another layerThank you so much for responding. I really appreciate it!!!
So I put the expression in the opacity property of the text layer I want to have move and here’s what it returned:
Error: expression result must be of dimension 1 not 2.
I’m not sure what this means.
I’ve included the expression below.
Thanks again!
lay1 = thisComp.layer("INSTAGRAM").effect("Checkbox Control")("Checkbox");
lay2 = thisComp.layer("TWITTER").effect("Checkbox Control")("Checkbox");
lay3= thisComp.layer("FACEBOOK").effect("Checkbox Control")("Checkbox");
lay4= thisComp.layer("YOUTUBE").effect("Checkbox Control")("Checkbox");
lay5= thisComp.layer("SKYPE").effect("Checkbox Control")("Checkbox");
lay6= thisComp.layer("SNAPCHAT").effect("Checkbox Control")("Checkbox");
y=transform.position[1];
if
(lay1==1 || lay2==1 || lay3==1|| lay4==1|| lay5==1|| lay6==1)
{
x=(56);
}
;
else
x= 556;
[x,y]; -
Elizabeth Starr
May 12, 2020 at 8:49 pm in reply to: using a layer’s visibility in an if/then expression on another layerHow would I write an expression to tell a text layer move 56 pixels to the left or right depending on whether or not a checkbox is checked on other layers? If any one of the checkboxes are checked, the text layer needs to move 56 pixels to the right to make room for a logo. If all of the checkboxes are off, then the text layer needs to move to the left to make up for the space that the absent logo leaves behind. I have 6 layers with a logo on each layer. The end user (this will become a MOGRT file) will have the option of choosing whether they want a logo next to the text line or no logo.
