# Help with animation loop

**URL:** <https://forum.kirupa.com/t/help-with-animation-loop/278118>\
**Category:** flash\
**Created:** [December 22, 2008, 6:56pm UTC](https://forum.kirupa.com/t/help-with-animation-loop/278118 "2008-12-22T18:56:03Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ihookcreative](https://avatars.discourse-cdn.com/v4/letter/i/e495f1/32.png) [@ihookcreative](https://forum.kirupa.com/u/ihookcreative)\
**Post date:** [December 22, 2008, 6:56pm UTC](https://forum.kirupa.com/t/help-with-animation-loop/278118/1 "2008-12-22T18:56:03Z")

</div>

I have the following code and I need it to loop a certain number of times once it has finished the last animation tween. The clip runs a total of 15 seconds. It is a banner and will go on a few different sites so it needs to loop for some 3 times other fives, and some not at all. ANY HELP IS MUCH APPRICIATED !

// loads action script tween  
#include “lmc\_tween.as”

// set page elements alpha to zero this.introBox\_mc.\_alpha = “0”;  
this.titleText\_mc.\_alpha = “0”;  
this.outlineBoxBg\_mc.\_alpha = “0”;  
this.introBox\_mc.\_alpha = “0”;  
this.text1\_mc.\_alpha = “0”;  
this.counter\_mc.\_alpha = “0”;  
this.text2\_mc.\_alpha = “0”;  
this.text3\_mc.\_alpha = “0”;  
this.logo\_mc.\_alpha = “0”;

// set page animation sequence  
this.introBox\_mc.alphaTo(100,.25,”easeOutSine”,0);  
this.outlineBoxBg\_mc.alphaTo(100,.25,”easeOutSine”,0);  
this.titleText\_mc.alphaTo(100,1,”easeOutSine”,0);  
this.introBox\_mc.alphaTo(0,.5,”easeOutSine”,2);  
this.titleText\_mc.alphaTo(0,.5,”easeOutSine”,2);  
this.text1\_mc.alphaTo(100,1,”easeOutSine”,2.5);  
this.text1\_mc.alphaTo(0,.75,”easeOutSine”,4.5);  
this.counter\_mc.alphaTo(100,2,”easeOutSine”,5);  
this.counter\_mc.frameTo(215,4,”easeOutLinear”,5);  
this.counter\_mc.alphaTo(0,1,”easeOutSine”,9);  
this.text2\_mc.alphaTo(100,1,”easeOutSine”,10);  
this.text2\_mc.alphaTo(0,1,”easeOutSine”,11);  
this.text3\_mc.alphaTo(100,1,”easeOutSine”,12);  
this.logo\_mc.alphaTo(100,1,”easeOutSine”,12);  
this.text3\_mc.alphaTo(0,1,”easeOutSine”,14.5);  
this.logo\_mc.alphaTo(0,1,”easeOutSine”,14.5);
