ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

How to loop half an animation

COW Forums : Adobe After Effects

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Barney Batchelor
How to loop half an animation
on Apr 8, 2010 at 2:47:48 pm

I have a piece of footage that fades in and then is animated to go on a website - i'll need to export this as an SWF. I want the website to open with the 8 second long animated logo to fade in and then loop infinitely from 4 seconds to 8 seconds.

How do I loop or use expressions to loop between frame 45 and 100 continuously? I couldn't use time remapping as they were still images (PSDs) but have exported it and imported it as an MPEG so it is a footage file if this helps..?

Thanks =]


Return to posts index

Dave LaRonde
Re: How to loop half an animation
on Apr 8, 2010 at 2:53:51 pm

[Barney Batchelor] "I couldn't use time remapping as they were still images (PSDs) but have exported it and imported it as an MPEG so it is a footage file if this helps..? "

Dave's Stock Answer #1:

If the footage you imported into AE is any kind of the following -- footage in an HDV acquisition codec, MPEG1, MPEG2, AVCHD, mp4, mts, m2t, H.261 or H.264 -- you need to convert it to a different codec.

These kinds of footage use temporal, or interframe compression. They have keyframes at regular intervals, containing complete frame information. However, the frames in between do NOT have complete information. Interframe codecs toss out duplicated information.

In order to maintain peak rendering efficiency, AE needs complete information for each and every frame. But because these kinds of footage contain only partial information, AE freaks out, resulting in a wide variety of problems.

Dave LaRonde
Sr. Promotion Producer
KCRG-TV (ABC) Cedar Rapids, IA


Return to posts index

Barney Batchelor
Re: How to loop half an animation
on Apr 8, 2010 at 3:05:26 pm

Okay so using the original PSD still image composition is there a way to do this without time remapping? Or would you suggest exporting in another (if so what?) format?

Thanks for the quick answer.


Return to posts index


Brian Charles
Re: How to loop half an animation
on Apr 8, 2010 at 3:16:00 pm

Do you want the loop in the swf for the web or in After Effects?

If its for the web then you'll only render the 8 second animation and you'll need to import the file in to Flash and write an Action Script to make it loop.


Alternately you could create 2 swfs – the 8 second version and the 4 second loop - then have the web page load the looping bit once the first one has completed playing.



Return to posts index

Barney Batchelor
Re: How to loop half an animation
on Apr 8, 2010 at 3:37:36 pm

Brilliant, thanks Brian! I want it to loop on the webpage. Which do you think is easier? I don't know how to use Flash although one of my friends and I tried to do the action script the other day using internet tutorials and we couldn't get the hang of it, we were short for time though so could probably work it out eventually.

If we were to have the flash animations on the webpage flowing from the fade in to the looping animation would it be seamless and simple to code? I guess for arguments sake it would be easier to have it all in one full flowing image though and so to spend some time with the flash action script.


Return to posts index

Brian Charles
Re: How to loop half an animation
on Apr 8, 2010 at 5:47:06 pm

This isn't my area of expertise, when I need this done I work with a Flash expert. I've worked with many swfs and flv files that are scripted to respond to user input, but I don't write the code.

Depending on which method you choose there are different solutions. In the case where you have a single video with a loop point you'd need to script the swf to return to that point once it reaches the end.

In the case where you have 2 swfs, the end of one would trigger the loading of the second.

After Effects markers can be used to generate Events and Navigation points for Flash. I suggest you look at the documentation for After Effects markers there is good information there:

http://help.adobe.com/en_US/AfterEffects/9.0/WS3878526689cb91655866c1103906c6dea-7e6ca.html#WS3878526689cb91655866c1103906c6dea-7e64a

Then pose your questions on the Flash forum.



Return to posts index


Jeremy Allen
Re: How to loop half an animation
on Apr 8, 2010 at 5:49:57 pm

If I were doing this, I would render the full 8 second animation, compress it to FLV, then import that into Flash. Put the FLV on the timeline. Create a layer for "labels" and one for "actionscript". Create a blank keyframe on the Labels layer at the starting point of the loop, and name the keyframe "loop". Now go to the last frame of the animation. On the Actionscript layer create a blank keyframe. Then write this code for that frame: gotoAndPlay("loop"); ** Note that proper capitalization is very important in Actionscript.

Now your animation will play through once, and when it hits the last frame, it will go back to the loop label and loop infinitely from that point on. Since the animation loops within one source file (the FLV), this will produce the most seamless loop, assuming you have correctly created your loop points to be seamless.

Normally you wouldn't put the FLV on the timeline. You would instead need a streaming video player or really know actionscript to create a streaming player that would load the FLV from the server. Since your animation is only 8 seconds long, it should produce a fairly small file size.

I hope this helps.. It's been a while since I've worked in Flash, so I may have left out a few small details, but this should get you most of the way there.

---------------------------------------------
8core MacPro, 3.0 GHZ, 10GB RAM, OSX 10.5.6

C4D 11.5
AE CS3
FCP 6.0.1


Return to posts index

Barney Batchelor
Re: How to loop half an animation
on Apr 9, 2010 at 5:49:56 pm

Fantastic, thanks for all your input - Jeremy your walkthrough sorted us brilliantly.

The only remaining issue is that it's now jittering on first load of the website, is this perhaps because the file size is too big? Upon refreshing it's fine, I imagine that's because it's stored in cookies. ALso the I of the COMING SOON has got issues when all the letters come in, any ideas?

http://www.vesperpictures.com

Thanks again for everybody's help, heavily appreciated!


Return to posts index

Jeremy Allen
Re: How to loop half an animation
on Apr 9, 2010 at 6:07:55 pm

Hey, glad I could help.. It plays fine for me on the first load, but I have a pretty quick connection. If its choppy for you, its most likely a file size issue. So how big is the file? Generally you would want to put a preloader on the front end, depending on the file size, and depending on what you think your average audience's connection speeds are. Its your call if you want a preloader or not, and as I said, it played fine for me the first time. Using video on the web is always a balance of quality vs. filesize, so you could also try tweaking the compression settings to make sure you get the smallest filesize with acceptable quality.

As a sidenote, that animation could have been created entirely in Flash, with the blurs and all. That would save a lot of hassle with AFX and compressing files and all. But I guess if you don't know Flash, you gotta create it the way you know how.

I'm not sure why you're having that little problem with the "I"..

---------------------------------------------
8core MacPro, 3.0 GHZ, 10GB RAM, OSX 10.5.6

C4D 11.5
AE CS3
FCP 6.0.1


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]