# Action Script Problem (Flash CS4)

**URL:** <https://forum.kirupa.com/t/action-script-problem-flash-cs4/306733>\
**Category:** flash\
**Created:** [March 21, 2010, 11:33am UTC](https://forum.kirupa.com/t/action-script-problem-flash-cs4/306733 "2010-03-21T11:33:54Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Logan\_Walker](https://avatars.discourse-cdn.com/v4/letter/l/3ec8ea/32.png) [@Logan\_Walker](https://forum.kirupa.com/u/Logan_Walker)\
**Post date:** [March 21, 2010, 11:33am UTC](https://forum.kirupa.com/t/action-script-problem-flash-cs4/306733/1 "2010-03-21T11:33:54Z")

</div>

[FONT=Calibri][SIZE=3]Hey guys, I’m a bit stuck, I recently found this cool typewriter effect which works fine. However, for some reason I can only use it once, it won’t let me use it in any other scene without having problems. Anyone know why?[/SIZE][/FONT]

```auto
 
var str:String = "Testing testing testing tesing testing testing";
 
var timer:Timer = new Timer(20);
 
var i:uint =0;
 
timer.addEventListener(TimerEvent.TIMER,gotime);
 
timer.start();
 
function gotime(e:TimerEvent){
 textbox_txt.appendText(str.charAt(i));
 i++;
 if(i>=str.length){
  timer.stop();
  }
 }

```
