# Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Controlling the Scale of one Layer with the Scale of another

• # Controlling the Scale of one Layer with the Scale of another

2 Members · 6 Posts
• ### Steven Tapia

October 12, 2022 at 7:15 pm

Hello All,

I would like a paper unfolding animation layer to maintain it’s scale while I scale a matte that its parented to. When ever I scale the matte the paper unfold later either gets smaller or bigger. Is this possible? I haveattached the AE File. Thanks in advanced!

• ### Dan Ebberts

October 12, 2022 at 7:28 pm

I think we might need more info to help. How about some examples (numbers) that give the relationship that you want to see between the two scale values?

• ### Steven Tapia

October 12, 2022 at 8:21 pm

Thanks for the reply Dan ! You’re a Legend! I’m going to try to explain the best way I can. If the Matte’s x scale is at 100% I want all of the pieces of paper within the paper unfold animation comp to be at a 100%. If I scale the Matte down on it’s x scale I want all of the pieces of paper in the unfold paper animation comp to maintain their x scale no matter what size the main Matte scales to.

I have a slider control in the main comp that controls the x scale of the pieces of paper in the paper unfold animation comp, but I want that to either offset it’s self based on the x scale of the main matte, or be able to apply an expression on each of the pieces of paper in the paper unfold animation comp in order for them to maintain their original size. I hope that helps. Thanks in advanced! Here’s a quick mp4 of the problem

• ### Dan Ebberts

October 12, 2022 at 8:44 pm

I think the scale expression for your folded paper layers is going to need to look something like this to account for the slider and the scale of the track matte:

`c = comp("LO 02 - Producer Name Reveal L to R 02");s1 = c.layer("Paper Unfold Intro - Driven").effect("Slider Control")("Slider");s2 = c.layer("Matte - Driver").scale[0];x = (scale[0] - s1)/(s2/100);[x,value[1]]`

But I think you’ll have to adjust your initial values (something doesn’t seem quite right).

• ### Steven Tapia

October 12, 2022 at 9:42 pm

Thank you Dan! I’ll try this.

• ### Steven Tapia

October 12, 2022 at 11:50 pm

I don’t know how you do it! Thanks that worked Dan!

Viewing 1 - 6 of 6 posts