Answers.Body: <p>Expressions work by returning a value to the property to which they are applied. So if you apply an expression to the position property and you put in the expression</p>
  
  <pre><code>[1,2]
  </code></pre>
  
  <p>in the expression editor, it will return the value [1,2] so that will be the position of that layer, i.e x= 1 y=2. Because the values 1 and 2 don't change, it will stay there forever.</p>
  
  <p>If you have an expression on the position where the x value increases over time then the layer will move right. So for example if you put the expression</p>
  
  <pre><code>[time, thisComp.height / 2]
  </code></pre>
  
  <p>the layer will start at [0, 540] (if the comp is 1080 px high) and move right at the rate of 1 pixel per second. For a HD frame it will reach the right side at around 1:17:20. That might be too slow, but you can use maths to adjust it. For example to make it twenty times as fast you could multiply it by 2, like so:</p>
  
  <pre><code>[time * 20, thisComp.height / 2]
  </code></pre>
  
  <p>So in the expressions editor you can see the drop-down with the available objects, properties and methods. You can use these along with the pick-whip to build up the expression to do whatever you need.</p>
  
  <p>You might want to start looking at <a href="http://motionscript.com/" rel="nofollow noreferrer">Dan Ebbert's</a> site. I can't quite believe that anyone could spend any time researching expressions and <em>not</em> find this site in the search results.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-05-19T11:55:27.503Z
Answers.LastActivityDate: 2018-05-21T21:31:33.503Z
Answers.LastEditDate: 2018-05-21T21:31:33.503Z
Answers.UserDisplayName: stib
Body: <p>Im trying to do an expression to my object. I want to make him come out from the side to center. I searched a lot but I didnt find any expression. I can do it with keyframes but I need expression only. 
  Please, can someone help me with expression?</p>
  
Tags: <after-effects-expressions>
Title: position expression
UserDisplayName: Marija Gabrielė
ThreadText: # position expression
  
  (Asked by: username_0 on 2018-05-18)
  
  Im trying to do an expression to my object. I want to make him come out from the side to center. I searched a lot but I didnt find any expression. I can do it with keyframes but I need expression only.
  Please, can someone help me with expression?
  
  **Tags:** after-effects-expressions
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2018-05-19. Score: 1
  
  Expressions work by returning a value to the property to which they are applied. So if you apply an expression to the position property and you put in the expression
  
  ```
  [1,2]
  
  ```
  
  in the expression editor, it will return the value [1,2] so that will be the position of that layer, i.e x= 1 y=2. Because the values 1 and 2 don't change, it will stay there forever.
  
  If you have an expression on the position where the x value increases over time then the layer will move right. So for example if you put the expression
  
  ```
  [time, thisComp.height / 2]
  
  ```
  
  the layer will start at [0, 540] (if the comp is 1080 px high) and move right at the rate of 1 pixel per second. For a HD frame it will reach the right side at around 1:17:20. That might be too slow, but you can use maths to adjust it. For example to make it twenty times as fast you could multiply it by 2, like so:
  
  ```
  [time * 20, thisComp.height / 2]
  
  ```
  
  So in the expressions editor you can see the drop-down with the available objects, properties and methods. You can use these along with the pick-whip to build up the expression to do whatever you need.
  
  You might want to start looking at [Dan Ebbert's](http://motionscript.com/) site. I can't quite believe that anyone could spend any time researching expressions and *not* find this site in the search results.
  
  
  ---
  
  