Communication between flash and TXT files

Hi there!!!

I’m trying to develope some flash applications that will storage text data for later use. I wofuld like to know how to make a dynamic conection between Flash and a TXT File, what I need to know is how do I storage that data?, how do I tell flash to storage that data on a file, and how to retrieve it?

I know very little about Action Script and certainly need asistance. If there’s any chance you can help me, please do so. I’m a new flash user trying to grow. Thanks for any information you can submit.

Take a look at loadVariables in the Actionscript Dictionnary, it should be helpful.

pom :asian:

If you want to write external variables in a web environment, the easiest way is to invoke a server side script using getURl() or loadVariablesNum().

You will need a script (probably written in PHP, Perl or VB Script) and also the ability to change the CHMOD on the directory in which you want to write the script.

You used to be able to write cookies but Netscape 5 and above no longer supports SW LiveConnect.

Thanks for that post, it was more helpful than the last one, at least I know what to look for now. I’m new in this and certainly need some guide.

Can you recomend a book about the matter???

Thanks again for your help!!!

Can’t think of a book offhand but try this - you’ll need a server that supports php.

This will detect a user ip address and diplay it. It’s pretty basic but gives you an idea of flash-php interaction.

Paste this code into a text editor and save it as getIP.php

Remove the space between the < and the ?php (I have to put them in here or this BB won’t display properly)

< ?php

Next create a new FLA with a dynamic text field on the main timeline called ip

Add the script
loadVariablesNum (“http://domain/subdomain/getIP.php”, 0);
editing the path as appropriate and publish

and you should get a result like or whatever

This is php-flash interaction at it’s most basic but you’ll get the gist.

By the way calling php in test (Ctrl+Enter) mode is pretty unreliable - you’re far better publishing onto a web server.

Man, thanks for all your help!!!

I really apreciate it. I’ll try that right away!!!

Thanks again!!!

Server Side Flash
ISBN 0-7645-3598-6

comes with a disk and is chocked full of primary examples of server Flash interaction. Provided are scripts database information and an entire chapter on XML.

I highly recomend it.

Warning though… once you get into server side stuff… you are no longer a beginner. :wink: I don’t think that this book is too tough to understand… but it does require just a little more than a passing knowledge of Flash methods and movie clip construction. I’d be happy to explain just about anything that I can from the book though if you encountered something you couldn’t tackle.

Thanks for that note!!!, I’ll start looking for it.

And thanks for the notice too, the whole thing about learning flash is to stop been a beginner, and little by little start becoming a pro like all of you, and maybe, who knows, helping the upcomimg beginners like me.

Thanks a lot for your help again!!!