(mx) reading from text file

im not too hot with html… i dont even really know what xml is… i saw somthin with sql and somthin else on here (cant remember what) but i dont know what those are either… so umm i was wondering if there is a basic way to just read in from a text file… a command or anything… to load from a local text file into a dynamic text box… i wanna make a flash site with like a weblog… but i just wanna type in the text file instead of modifying the fla every time i wanna update… so is there an easy way to do it… or a place you know where there is a tutorial on it? any help would be appreciated… thanks in advance

var introCopy = new LoadVars();
introCopy.onLoad = function(success) {
if (success) {
introTitle = introCopy.introTitle;
} else {

file name is introduction.txt

dynamic txt box name is introTitle

where do i put this code? and i need the text file to be local, like in the same folder right? and just the instance needs to be introTitle right? thanks…

umm maybe just a really simple example if its not too much trouble would help, just to see how the code is applied and stuff… (dont worry im actually gonna learn it not just steal the code)

You put this code in the frame where you have the textbox. You are right the txt file needs to be local and instance name of the text box in introTitle.

Hope this helps!!

P.S. This is very easy give it a try. I dont have Flash at home to give you an example. Sorry!

umm ok i got my text box with a variable name (it doesnt work with instance name) of introTitle, and this code in my frame:

_checkFile = new LoadVars();
_checkFile.onLoad = function(_success){
introTitle = _checkFile;

(got from actionscript.org and modified… was a little different than yours)

and my text file contains the text:

testing 1 2 3

and the output i get is:


what did i do wrong… i can see the text file words in there… how do i get rid of the % and stuff

My mistake. Its not instance name. Its variable name.

_checkFile = new LoadVars();
_checkFile.onLoad = function(success)
introTitle = _checkFile.introTitle;
}else {

Your text file should look as:

introTitle=testing 1 2 3

Hope this helps and works!!

awesome… thanks man… lol at first i was putting a space between the introTitle=testing 1 2 3 and it wasnt workin… then i just happened to backspace it and it worked lol thanks man


oh man i feel bad now… im sorry i bothered you like that… i feel so stupid… i didnt even bother to search the site… and look what i found afterward when i went lookin for how to scroll it


sorry to have bothered you… and thanks for your paitence srinivas