load status 4 txt files in flash
- Started
- Last post
- 9 Responses
- pkny
does anybody know how to make a loading status thing ma jig for loading txt files in flash.. i know how to make one for movie clips but how do you do for txt files?? thx in advance
- motivdesign0
You'd have to be dealing with some HUGE textfiles for the end user to even see your preloader.
- unknown0
set a variable in your movie... for instance LOADED = 0;
then at the end of your text file set LOADED = 1;
It must be at the end though...
Motivdesign - It does matter if you've only got a small file especially if you're doing any display stuff with this data... your program will receive a load of VOID's
- motivdesign0
I was under the impression that he wanted to load an external textfile and have a loading bar display the progress.
Since textfiles are usually very small and compressed during transfer (assuming you're using a relatively recent browser that supports gzip transfers) it seemed like a silly idea to me.
- unknown0
Ah right... I was thinking that you'd only want to load small ones in too... or just the bits you need at any one time.
- Sod_Bottles0
Not sure of any built int method for this, like mc's, or jpg's. ..Just a thought, you might try seeding the text file with variables such as load=1 at the start, &load=50 half way through, &loa=75 etc.
Then as the data loads in, you can just do the percentage thing that way. It's not entirely precise, but should do the job.HTH
- unknown0
That's a great idea
- Phenyl230
If you're using mx then you can use the loadvars object, then use the getbytesloaded and getbytestotal methods.
- pkny0
um actually my txt file is like about 30 kb's.. :P and i wanted to make a "load status display" for hte txt file as its being downloaded...
uh Phenyl23 : can you give me some more detail on how to set this "loadvars" script?
thx in advance
- Phenyl230
mytext = new loadVars();
mytext.load(txt url here)you can then use
mytext.getBytesLoaded()
and mytext.getBytesTotal() to retrieve loading information.the txt file should be in the format
thisstring=yourtexthere
when it has loaded you can access the loaded string with mytext.thisstring