flash read txt
- Started
- Last post
- 6 Responses
- cercle
another flash question...
is there any way i can make flash (8) read a txt file without having to put &variable on the beggining of the text file?
many thanks
- colag0
surely, you only need to have the variable name plus the data in the text eg.
variable=this is the data
but, i would reccommend you look into using xml as it is much more useful/powerful.
- cercle0
thanks!
i'll check it outsalut
- ********0
reading the txt file is sort of a hack; the standard way to do it is to use xml.
bad news: it requires a few more steps.
good news: it's huge and super powerful; you can turn a whole excel spreadsheeet into xml, you can change a database into an xml doc using php, etc.
on http://www.subaru.com we use like 30 xml files, and every bit of text and most of the graphics are controlled outside of flash, in the xml.
check out kirupa.com for a starter tutorial or else google flash xml.
- cercle0
many thanks j red!
- ********0
why does my dog keep licking his dick? maybe an infection
- caseyc0
Just use an xml object, but instead of an onLoad function use onData and you can get the raw data from the txt file as a string. No need to do name/value pairs or valid xml.
It's a bit of a hack but it works, here's an example: