FORUMS: list search recent posts

# Adapting an expression: reverse effect

FAQ   •   VIEW ALL
 Adapting an expression: reverse effect on Oct 21, 2010 at 10:57:07 am

I have a pre-comp with a linear wipe, and a null. I want the wipe's 'transition completion' to link to the 'X' position of the Null.

I found an expression that can do this, but there is one problem;
as the 'X' position of the null moves from left to right, the wipe moves from right to left.

How can I adapt the working expression to reverse the wipe, or simply link the Wipe and 'x' position exactly?

Here is a thread http://forums.creativecow.net/thread/227/15114#15175 on the same topic, but I still don't know how to adapt the expression to work.

```//I want to adapt this expression: nullX = thisComp.layer("Null 1").transform.position[0]; startX = toWorld([0,0])[0]; endX = toWorld([width,0])[0]; linear(nullX,startX,endX,0,100) ```

 Re: Adapting an expression: reverse effecton Oct 21, 2010 at 4:35:18 pm

It works for me. Do you have the wipe angle set to -90? If so, can't you just change it to +90?

Dan

 Re: Adapting an expression: reverse effecton Oct 21, 2010 at 4:55:26 pm

Thank you, Dan.

It does work when you change the angle to +90, but that means I have a right-to-left reveal. What if I want the image to have a left-to-right reveal?

I've attached particle layers to the null's 'X' position, so, for simplicities sake and future reference, it would be useful to learn how the attached code can be adapted for the transition, if possible.

I apologise if your right and I've not 'got-it'. Expressions are brilliant but difficult to edit when you don't understand how it works!

 Re: Adapting an expression: reverse effecton Oct 21, 2010 at 5:12:52 pm

Try changing the last line to this:

linear(nullX,startX,endX,100,0)

Dan