FORUMS: list search recent posts

# Possible to execute sequential linear calls

FAQ   •   VIEW ALL
 Possible to execute sequential linear calls on Mar 8, 2016 at 5:17:11 am

Basically I'm trying to templatize some really simple moves for a bulk project. The concept is to use linear to build in animations based off the in/out point of a layer. The code below is just playing around at the moment but I can't figure out a way to get it to execute more than one linear command, is this possible?

```key1=inPoint; key1end=inPoint+.3; key2=outPoint; key2end=outPoint-.3; Width=width*scale/100; posx=640-(Width[0]+Width[0]/2); linear(time, key1, key1end, [posx, 360],[640,360]); linear(time, key1end, key2end, [640, 360],[850,360]);```

 Re: Possible to execute sequential linear callson Mar 8, 2016 at 7:28:10 am

You have to combine them such that only one of them executes, so the last part would be like this:

``` if (time < key1end) linear(time, key1, key1end, [posx, 360],[640,360]) else linear(time, key1end, key2end, [640, 360],[850,360]); ```

Dan

```key1=inPoint; key1end=inPoint+.3; key2=outPoint; key2end=outPoint-.3; Width=width*scale/100; posx=640-(Width[0]+Width[0]/2); if (time &lt;= key1end && time>=key1) linear(time, key1, key1end, [posx, 360],[640,360]) else if (time>key1end && time&lt;=key2end) linear(time, key1end, key2end, [640, 360],[850,360]) else if (time>key2end && time&lt;=key2) linear(time, key2end, key2, [850, 360],[1050,360])```