# Writing to a text document w/ actionscript

**URL:** <https://forum.kirupa.com/t/writing-to-a-text-document-w-actionscript/62281>\
**Category:** Uncategorized\
**Created:** [August 26, 2004, 1:53pm UTC](https://forum.kirupa.com/t/writing-to-a-text-document-w-actionscript/62281 "2004-08-26T13:53:13Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![vagabond007](https://avatars.discourse-cdn.com/v4/letter/v/e480ec/32.png) [@vagabond007](https://forum.kirupa.com/u/vagabond007)\
**Post date:** [August 26, 2004, 1:53pm UTC](https://forum.kirupa.com/t/writing-to-a-text-document-w-actionscript/62281/1 "2004-08-26T13:53:13Z")

</div>

Hello –

I am curious if something can be done with actionscript…

Basically, I am wondering if there is a way to write to a text document on the users system in order to store variables and/ or XML nodes with attributes.

These documents would, in theory, allow the Flash movie to remember it’s states so when a user returns to the site, or tries to save what they had open, the text file could be used to initialize and display the “saved” state.

Wondering if anyone knows any resources for this or even if anyone out there has done something like this. Seems like it should be able to but may’be not. Hopefully there is research out there I can view…

Thanks in advance…

–vagabond007

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 26, 2004, 5:47pm UTC](https://forum.kirupa.com/t/writing-to-a-text-document-w-actionscript/62281/2 "2004-08-26T17:47:23Z")

</div>

i asked very same question ages ago mate!

unfortuneatly its past the cut-off date… on the up side, some1 posted a reply led2me downloading page and wich i still have on my system (which i STILL aint had a chance2look at yet! :S lol)…

Prophet.

> [@"boondogger"](#):
>
> I had the same problem. Flash lets you load text in from a file but it won’t let you save to a text file. But there are ways round it. You can get Flash to create a cookie and send text into there. What you need is to create a shared object:
> 
> myLocal\_so = sharedobject.getLocal(“FlashCookie”,“/”);
> 
> Then to send text to it:
> 
> myLocal\_so.data.savegame = yourtext;
> 
> To get it to save text on demand:
> 
> myLocal\_so.flush();
> 
> Hope this works
