How do i write text into a txt file
- prut97
-
prut97
- Member since: Sep. 22, 2007
- Offline.
-
- Forum Stats
- Member
- Level 09
- Blank Slate
If i have a var i need to write into a txt file ? Someone helped me once but resulted in it asked me where i want to save the file, i want it to just overwrite the file :)
- Denvish
-
Denvish
- Member since: Apr. 25, 2003
- Offline.
-
- Send Private Message
- Browse All Posts (15,977)
- Block
-
- Forum Stats
- Member
- Level 46
- Blank Slate
You can't write directly to txt from Flash (although you CAN pull data in). To output data, you'll need to go through a PHP/ASP/CGI script first, which means basically running/having a server.
For AS2:
AS: Flash & PHP by shazwoogle
AS: Flash > ASP > Txt
AS: Load External Data/Cross-Domain
AS: Loading/Unloading Data by shazwoogle
If you want to simple save and load variables, you can use Flash cookies (sol files):
AS: Save and Load
- liam
-
liam
- Member since: Dec. 11, 2004
- Offline.
-
- Send Private Message
- Browse All Posts (14,243)
- Block
-
- Forum Stats
- Member
- Level 22
- Blank Slate
At 2/10/09 01:33 PM, prut97 wrote: If i have a var i need to write into a txt file ? Someone helped me once but resulted in it asked me where i want to save the file, i want it to just overwrite the file :)
You can only write to a txt file if the prompt appears and the user chooses where the file is saved, you can't load/save files without user permission.. and even then it can only be done with the latest Flash Player with AS3 =P
Sup, bitches :)
- prut97
-
prut97
- Member since: Sep. 22, 2007
- Offline.
-
- Forum Stats
- Member
- Level 09
- Blank Slate
LIES, I did it with AS2 b4.
- Denvish
-
Denvish
- Member since: Apr. 25, 2003
- Offline.
-
- Send Private Message
- Browse All Posts (15,977)
- Block
-
- Forum Stats
- Member
- Level 46
- Blank Slate
At 2/10/09 02:27 PM, prut97 wrote: LIES, I did it with AS2 b4.
Well I suggest you rack your memory and try and remember how then
- LeechmasterB
-
LeechmasterB
- Member since: Apr. 1, 2005
- Offline.
-
- Forum Stats
- Member
- Level 17
- Blank Slate
At 2/10/09 02:27 PM, prut97 wrote: LIES, I did it with AS2 b4.
Calling someone a liar and stating complete horseshit?! Seriously if you had the slightest bit of knowledge about flash and its restrictions you would never have said that. Does the term "sandbox" and "security" ring a bell? Wake up!
It is not possible to write to a users hard disk with flash without using other tools or scripts ect. Live with it.
- TutorialPoo
-
TutorialPoo
- Member since: Dec. 29, 2008
- Offline.
-
- Forum Stats
- Member
- Level 04
- Blank Slate
- prut97
-
prut97
- Member since: Sep. 22, 2007
- Offline.
-
- Forum Stats
- Member
- Level 09
- Blank Slate
At 2/10/09 02:33 PM, LeechmasterB wrote:At 2/10/09 02:27 PM, prut97 wrote: LIES, I did it with AS2 b4.Calling someone a liar and stating complete horseshit?! Seriously if you had the slightest bit of knowledge about flash and its restrictions you would never have said that. Does the term "sandbox" and "security" ring a bell? Wake up!
It is not possible to write to a users hard disk with flash without using other tools or scripts ect. Live with it.
I was talking to the guy who said that you could only do it with permision and it was only possible with AS3, i was told once how to do it, and it worked in AS2. And i don't wanna write to people's harddisk... To my website, Depending on stuff they write in inputs.
- LeechmasterB
-
LeechmasterB
- Member since: Apr. 1, 2005
- Offline.
-
- Forum Stats
- Member
- Level 17
- Blank Slate
Then you should try using
FLASH <-> PHP <-> SQL DATABASE
That will work... like suggested by the other guy.


