# How to make it looping contineously?

**URL:** <https://forum.kirupa.com/t/how-to-make-it-looping-contineously/321715>\
**Category:** flash\
**Created:** [April 28, 2011, 11:58am UTC](https://forum.kirupa.com/t/how-to-make-it-looping-contineously/321715 "2011-04-28T11:58:39Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![learner\_7n](https://avatars.discourse-cdn.com/v4/letter/l/b2d939/32.png) [@learner\_7n](https://forum.kirupa.com/u/learner_7n)\
**Post date:** [April 28, 2011, 11:58am UTC](https://forum.kirupa.com/t/how-to-make-it-looping-contineously/321715/1 "2011-04-28T11:58:39Z")

</div>

Hi,

The followig is the Typewriter effect text code. It works fine but doesn’t repeat the action continuosly. How to modify the below code?

var textLoader:URLLoader = new URLLoader(new URLRequest(“Data.txt”));  
textLoader.addEventListener(Event.COMPLETE, function(e:Event){initText(e.target.data);});  
function initText(string:String):void{  
myText = string;  
addEventListener(Event.ENTER\_FRAME,writeText);  
}  
function writeText(e:Event):void{  
if (counter \<= myText.length){  
textField.text = myText.substr(0,counter);  
counter++;  
}  
else{  
removeEventListener(Event.ENTER\_FRAME,writeText);  
}  
}
