programming4us
 
Graphics
 

Adobe After Effects CS5 : Expressions - Looping Keyframes

6/19/2013 7:39:36 PM

The expression language provides two convenient ways to loop a sequence of keyframes: loopOut() and loopIn().

Suppose you keyframed a short animation and you want that sequence to repeat continuously. Simply add this expression to the keyframed property

loopOut("cycle")

and your animation will loop for the duration of the comp (Figure 1).

Figure 1. The solid line in the graph represents the keyframed bounce action. The dotted line represents the subsequent bounces created by loopOut("cycle").

Tip

A small glitch in the cycle version of loopOut() drops the first keyframe from each of the loops. If you want the frame with the first keyframe to be included, add a duplicate of the first keyframe one frame beyond the last keyframe.


There are three other variations of loopOut(), as well:

  • loopOut("pingpong") Runs your animation alternately forward, then backward.

  • loopOut("continue") Extrapolates the animation beyond the last keyframe, so the value of the property keeps moving at the same rate (and in the same direction, if you’re animating a spatial property such as Position) as the last keyframe. This can be useful, for example, if you’re tracking an object that has moved offscreen and you want After Effects to extrapolate where it would be if it kept moving at the same speed and in the same direction.

  • loopOut("offset") Works similarly to "cycle" except that instead of returning to the value of the first keyframe, each loop of the animation is offset by an amount equal to the value at the end of the previous loop. This produces a cumulative or stair-step effect.

loopIn() operates the same way as loopOut(), except that the looping occurs before the first keyframe instead of after the last keyframe. Both loopIn() and loopOut() will accept a second, optional parameter that specifies how many keyframes to loop. Actually, it’s easier to think of it as how many keyframed segments to loop. For loopOut() the segments are counted from the last keyframe toward the layer’s In point. For loopIn() the segments are counted from the first keyframe toward the layer’s Out point. If you leave this parameter out (or specify it as 0), all keyframes are looped. For example, this variation loops the segment bounded by the last and next-to-last keyframes:

loopOut("cycle",1)

Two variations on the expressions—loopOutDuration() and loopInDuration()—enable you to specify the time (in seconds) as the second parameter instead of the number of keyframed segments to be looped. For loopOutDuration(), the time is measured from the last keyframe toward the layer’s In point. For loopInDuration(), the time is measured from the first keyframe toward the layer’s Out point. For example, this expression loops the two-second interval prior to the last keyframe:

loopOutDuration("cycle",2)

If you leave out the second parameter (or specify it as 0), the entire interval between the layer’s In point and the last keyframe will be looped for loopOutDuration(). For loopInDuration(), the interval from the first keyframe to the Out point will be looped.

 
Others
 
- Adobe Fireworks CS5 : Fireworks and Flash (part 2) - Importing a flattened bitmap
- Adobe Fireworks CS5 : Fireworks and Flash (part 1) - Importing Fireworks documents into Flash
- Adobe Flash Professional CS5 : Working Within the Flash Environment - Working with Page Setup in Macintosh
- Adobe Flash Professional CS5 : Working Within the Flash Environment - Setting Warning Preferences
- Adobe Flash Professional CS5 : Working Within the Flash Environment - Setting Text Preferences, Setting Clipboard Preferences
- QuarkXPress 8 : Special effects for pictures - Exporting modified pictures, Managing imported pictures
- QuarkXPress 8 : Special effects for pictures - Making adjustments, Applying filters
- Adobe InDesign CS5 : Working with Objects and Layers - Shearing Objects
- Adobe InDesign CS5 : Working with Objects and Layers - Scaling Objects
- Adobe InDesign CS5 : Working with Objects and Layers - Using the Free Transform Tool
 
 
REVIEW
 
- First look: Apple Watch

- 10 Amazing Tools You Should Be Using with Dropbox

- Sigma 24mm f/1.4 DG HSM Art

- Canon EF11-24mm f/4L USM

- Creative Sound Blaster Roar 2

- Alienware 17 - Dell's Alienware laptops

- Smartwatch : Wellograph

- Xiaomi Redmi 2
 
VIDEO TUTORIAL
 
- How to create your first Swimlane Diagram or Cross-Functional Flowchart Diagram by using Microsoft Visio 2010 (Part 1)

- How to create your first Swimlane Diagram or Cross-Functional Flowchart Diagram by using Microsoft Visio 2010 (Part 2)

- How to create your first Swimlane Diagram or Cross-Functional Flowchart Diagram by using Microsoft Visio 2010 (Part 3)
 
Popular tags
 
Video Tutorail Microsoft Access Microsoft Excel Microsoft OneNote Microsoft PowerPoint Microsoft Project Microsoft Visio Microsoft Word Active Directory Biztalk Exchange Server Microsoft LynC Server Microsoft Dynamic Sharepoint Sql Server Windows Server 2008 Windows Server 2012 Windows 7 Windows 8 Adobe Indesign Adobe Flash Professional Dreamweaver Adobe Illustrator Adobe After Effects Adobe Photoshop Adobe Fireworks Adobe Flash Catalyst Corel Painter X CorelDRAW X5 CorelDraw 10 QuarkXPress 8 windows Phone 7 windows Phone 8 BlackBerry Android Ipad Iphone iOS
 
Top 10
 
- How To Install Android Market & Google Apps On Kindle Fire
- How To Make Ubuntu Look Like Windows 7
- How To Add A New Account in MS Outlook 2013
- Get Android & Mac OS X Style Gadgets For Windows 7 & Windows 8 With XWidget
- How To Activate Microsoft Office 2013
- How To Install Actual Facebook App On Kindle Fire
- How To Create, View And Edit Microsoft Office Files On Kindle Fire
- Download Attractive Business PowerPoint Templates For Free At SlideHunter
- How To Use And Enable Hibernate & Sleep Mode In Windows 8
- How To Get Microsoft Office 2013 Trial Product Key From Microsoft