# Computer Type effect

**URL:** <https://forum.kirupa.com/t/computer-type-effect/180055>\
**Category:** flash\
**Created:** [February 25, 2006, 2:24am UTC](https://forum.kirupa.com/t/computer-type-effect/180055 "2006-02-25T02:24:02Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vulshok](https://avatars.discourse-cdn.com/v4/letter/v/96bed5/32.png) [@Vulshok](https://forum.kirupa.com/u/Vulshok)\
**Post date:** [February 25, 2006, 2:24am UTC](https://forum.kirupa.com/t/computer-type-effect/180055/1 "2006-02-25T02:24:02Z")

</div>

Im trying to create a dynamic text typing effect that will type the text from a variable like a computer with a cursor in front of the text.

There’s a dynamic textbox with variable field on stage  
cursor is a blinking rectangular movie clip designed to precede the text.

Here’s the code I got so far:

```auto

field = "";
startx = 13;
i = 0;
msg1 = "Connecting... ";
_root.onEnterFrame = function() {
    field += msg1.charAt(i);
        startx = startx+30;
    i++;
    cursor._x = startx;
};

```

With this code, the cursor follows the text but keeps on going after msg1 has been typed out.

1. How can I get it to stop typing when its finished the message?

2.Also, is there a way to slow the text typing down? Make it so there is a slight delay between each character typed?  
[SIZE=1]  
p.s. how do I wrap actionscript tags around text?[/SIZE]
