Loading random text files into textField

I’m looking for a way to load random quotes from .txt files into a text field. Does anyone know where I can find a tutortial on this or can it be explained rather simply?

My idea is to name the text files sequentially (i.e. 001.txt, 002.txt, etc.) but to have Flash load them randomly for the duration of the movie clip in which the text field will reside. (Or can Flash parse the individual quotes from a single .txt file?)

I need a push in the right direction.

I’m fairly new to ActionScripting and have searched all of my familiar sources but so far have come up empty handed.


i would use xml instead :slight_smile:

see the attached file:

Thanks guys !!!

claudio that link to a previous post is probably where I got the idea from months ago. I should have saved it then because I searched the Forum and couldn’t find it. Now to decide which would be the easiest…hmmm.

For 3 months I tried to get a handle on AS and at times have been overwhelmed. Until I read somewhere the best way to learn AS is to master the techniques you need for TODAY! Having had no previous programming language experience I decided that’s what I was going to do.

So, I’m doing my first all Flash website. (Well, WE are doing it… :wink: ) If your interested in a VERY preliminary peek [COLOR=red]here ya go [/COLOR] !!! .

BTW, the random quotes will be added to the bottom of the content clips.

(P.S. There’s only one main menu and one submenu link active so don’t expect too much…:blush: )

Sorry if this got winded…Thanks again !!!