• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Position reaction expression

Explorer ,
May 25, 2017 May 25, 2017

Copy link to clipboard

Copied

Take a look at this video. The red line moves right as the time scale moves left (from 1945 to 1964). I'm wondering what expression I could give the time scale so that it moves automatically to the left when I move the red line to the right.

<grumble> I really wish AE had a feature like 3DS Max's Reaction controller </grumble>.

Thank you.

TOPICS
Expressions

Views

776

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , May 25, 2017 May 25, 2017

Ah, with dimensions separated I guess it would be like this:

p = thisComp.layer("Red Line").transform.position;

linear(p[0],352,1538,2114,-658);

Dan

Votes

Translate

Translate
Explorer ,
May 25, 2017 May 25, 2017

Copy link to clipboard

Copied

Basically all I'm looking to do is

When object Red Line x = 352

object Base x should = 2114

When object Red Line x = 1538

object Base x should = -658

Thanks.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 25, 2017 May 25, 2017

Copy link to clipboard

Copied

I haven't tested it, but something like this should work:

p = thisComp.layer("Red Line").transform.position;

x = linear(p[0],352,1538,2114,-658);

[x,value[1]]

Dan

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
May 25, 2017 May 25, 2017

Copy link to clipboard

Copied

Thanks, Dan. I'm getting an error saying "Property or method named '1' is missing or does not exist. It may have been renamed, moved deleted, or mistyped."

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 25, 2017 May 25, 2017

Copy link to clipboard

Copied

I assumed you would apply the expression to the Position property of the Base layer. Is that not the case?

Dan

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
May 25, 2017 May 25, 2017

Copy link to clipboard

Copied

I did. See attached.

TimelineScript-1.jpg

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 25, 2017 May 25, 2017

Copy link to clipboard

Copied

Ah, with dimensions separated I guess it would be like this:

p = thisComp.layer("Red Line").transform.position;

linear(p[0],352,1538,2114,-658);

Dan

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
May 25, 2017 May 25, 2017

Copy link to clipboard

Copied

LATEST

Fantastic! Thanks so much!!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines