Activity › Forums › Adobe After Effects › How to loop half an animation
-
How to loop half an animation
Posted by Barney Batchelor on April 8, 2010 at 2:47 pmI 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 =]
Jeremy Allen replied 16 years, 1 month ago 3 Members · 7 Replies -
7 Replies
-
Barney Batchelor
April 8, 2010 at 3:05 pmOkay 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.
-
Brian Charles
April 8, 2010 at 3:16 pmDo 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.
-
Barney Batchelor
April 8, 2010 at 3:37 pmBrilliant, 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.
-
Brian Charles
April 8, 2010 at 5:47 pmThis 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:
https://help.adobe.com/en_US/AfterEffects/9.0/WS3878526689cb91655866c1103906c6dea-7e6ca.html#WS3878526689cb91655866c1103906c6dea-7e64a
Then pose your questions on the Flash forum.
-
Jeremy Allen
April 8, 2010 at 5:49 pmIf 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.6C4D 11.5
AE CS3
FCP 6.0.1 -
Barney Batchelor
April 9, 2010 at 5:49 pmFantastic, 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?
https://www.vesperpictures.com
Thanks again for everybody’s help, heavily appreciated!
-
Jeremy Allen
April 9, 2010 at 6:07 pmHey, 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.6C4D 11.5
AE CS3
FCP 6.0.1
Reply to this Discussion! Login or Sign Up