PDA

View Full Version : Submit input to .txt files


2wylo
05-26-2003, 01:04 AM
Before I begin I'm definatley a newbie - to scripting!


The flash interface is a simple game where user answer s questions - if all correct they see a winners screen and enter details - if they lose they see another screen and enter details.

My objective is to write to a text file from the flash form using input text boxes and a submit button.

The game is running on a stand alone machine and a want to write to a text file in a directory on that machine - no clever server stuff just 2 files: one for winners and one for losers.

I have read the newbie tutorials and summised that I should use LoadVariableNum + POST to do this. I want to do this without a server side action so no asp, php , etc. .. if thats possible.

any help given is much appreciated

Cheers

2wylo

CyanBlue
05-26-2003, 01:12 AM
Howdy and Welcome... ;)

If you are using the projector, you have two options...

1. Stick with the cookie like file called Shared Object...
2. Use thrid party projector tools such as SWF Studio or Jugglor to do it...

This topic has been dealt many times... Please do some searching with given terms to find more information...

Also check out this tutorial as well...
http://www.actionscript.org/tutorials/beginner/Flash_Projectors_and_Crossplatform_CD_burning/

Sualdam
05-26-2003, 01:12 AM
Are you using Flash 5 or MX?

If MX, you can use the Shared Object:

http://www.macromedia.com/support/flash/ts/documents/local_so.htm

I think I'm correct in saying that you cannot write to a local .txt file in MX.

There was an FSCommand in Flash 5 that did it, but I think that this is no longer supported.

2wylo
05-26-2003, 01:26 AM
Thanks for the speedy response...

Just to add I'm using Flash5.

...I've got some searching to do

CyanBlue
05-26-2003, 05:35 AM
Easier then... ;)

Disregard all the answers above...

What you are looking for is 'fscommand save'...

Do some searching on the forum with that term to find more information regarding that... :)

2wylo
05-27-2003, 01:14 PM
OK thanks very much for your help...

FScommand is the solution but where do I attach the script and button so that it sends the information in the input boxes?

I've attached the basic form which I'm going to use but I cant seem to get it do write to the file at all

Cheers

:confused:

CyanBlue
05-27-2003, 01:30 PM
That I have not tried, so I cannot really help you with that...

However, if I remember correctly, there was several threads that deals with the same thing, and there were examples attached on the thread... Do some searching and I think you will find your answer quicker... ;)