How to write data to a database (txt or MS Excel) from flash

I need a help in flash plz anyone could help me ??

I want to write datas to a database (txt or MS Excel) from a flash file that can be stored in my hard disk.

Thanks a lot.

interesting idea. I’m sure it can be done, but I’m unsure of the process. I’ll see if I can get one of the mods who might know the answer to take a look at your thread here.

hi upuaut

i’ve the script for the same but it is not working. so am not sure weather this is the right way or not. is there any other way to do this?? if so let me know.
thnx.

//script in a submit buttton

on (release) {
fscommand (“save”, abc+".txt");
}

*abc: Variable name of the text field, that is, you want to save the
written texts with that name as in txt format

that looks right to me… but like I said… I really am not that familiar with the function.

ok

An article I found…

Flash 5 supports an undocumented ActionScript command called fscommand:save that enables Flash developers to save the main timeline variables of a movie to a file.

Vengy’s demo showed how the “save” command could be used to create a batch program on the hard disk of Flash standalone player users who viewed a movie containing the Trojan horse code. In the demo, the Trojan program executed when the victim rebooted his or her computer.

A Macromedia representative today said the company released an updated version of its standalone Flash player Monday, and that the “save” feature would be removed from future versions of the player.

Now…if you want to write things in a txt you have to use a serverside script.
Just make a php/cfm/asp page that creates the txt and call it from flash while sending the variables you want.

Good luck.

My goddd#@#@#@

i’m a starter in flash MX with some knoledge in AS & moreover i dono php, cfm, asp…

so i think i’m helpless :frowning:

It’s the perfect time for you to learn something new. :stuck_out_tongue:
That’s how we all do it.

I don’t have such a script available now to help you but if I find one I’ll send it to you.
If you search in google you will find zillions of them, though.

I think I know someone with a basic script for doing this. I saw something over in the IRC… I just have to remember which mod showed it to me. I’ll be chatting in there so I’ll see if I can find out.

thts fine

thksa lot

Is this flash movie going to be on the web? If so, you could write a java applett and start that first, and then take what ever command you create and the Java would save the file…

Or (im a big fan of XML) if you have some sort of server side scripting like PHP or asp.net or something you could create an xml document and have 1 node like…

<data>This is where data would go.</data>

then on the server side, save the file to a text document using Php or Asp.net etc… You’d code the actual file saving proceedure. This will save it on the server.

Im doing it with Asp.net with much success. In fact I have data from flash being saved to a sql database .

But there is one issue surrrounding that. You’ll have to do a little bit of coding to make sure that the source is from your flash and nobody elses. Because flash’s XML.send() uses the POST method (you can choose methods) and it sends it in plain text. So in theory someone could discover your “page” and submit a batch file that could contain instructions for a virus etc… its a big whole if left open =) but it can be done =)

hi Raydred

its a corporate presentation. the presentation is running from the hard disk itself)
& user may input some text details on the related input text fields. after viewing the presentation, user wants a printable file (txt) with all his inputs which will be stored in the hard disk.

like this one of getting datas

[on (release) {
loadVariablesNum (+AAA+".txt", 0);
}]

there may be some simpler methords to do this.
i do no exatly.

does this script work for it

on (release) {
fscommand (“save”, abc+".txt");
}

but macromedia says its not possible

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

:(:(:frowning: