# Typewriter to read different messages from text file

**URL:** https://forum.kirupa.com/t/typewriter-to-read-different-messages-from-text-file/140680
**Category:** Uncategorized
**Created:** [March 13, 2005, 11:32am UTC](https://forum.kirupa.com/t/typewriter-to-read-different-messages-from-text-file/140680 "2005-03-13T11:32:11Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![FlashDeano](https://avatars.discourse-cdn.com/v4/letter/f/35a633/32.png) [@FlashDeano](https://forum.kirupa.com/u/FlashDeano)
#### Post date: [March 13, 2005, 11:32am UTC](https://forum.kirupa.com/t/typewriter-to-read-different-messages-from-text-file/140680/1 "2005-03-13T11:32:11Z")

</div>

Hi,

I have searched the posts and can not find an answer to this problem.

I have 3 frames

Frame 1

```auto

q = 1;
var l_v = new LoadVars();
l_v.onLoad = function(success) {
	if (success) {
		//trace(this);
		_root.t = this.myVar;
		//myVar is the variable in the external txt file
		_root.gotoAndPlay(2);
	}
};
l_v.load("jobs.txt");
stop();

```

Frame 2

```auto

if (q < t.length) {
	textbox = t.substring(0, q);
	q++
} else {
	textbox = t;
	gotoAndPlay(4);
}

```

Frame 3

```auto

gotoAndPlay(2);

```

It is something I found via a tutorial.

What I need to do is have several messages in my text file and the script cycle through them, displaying each message on a single line.

It will be used to show “Latest News” on a website.

I have not touched flash for over 18 months and I am struggling big style.

Please could someone point me in the correct direction.

Many thanks
