Can AS create txt file to be stored on clientside?

  • janice_2k
  • Novice
  • Novice
  • janice_2k
  • Posts: 28

Post 3+ Months Ago

Dear gurus/members,
I am very new in actionscript and flash. I would like to know whether is it possible to create a text file that contains some variables or strings that will be stored on the users pc (client side)? I have a button on my e-learning website that will launch an exe(located on user's computer). When the exe is launched, the user is required to record and save his audio on his computer. When the user clicks on the save button on the exe, the user has the option to save the audio on any folders and any name of their preference. This part of development is done. However, I would like to create a 'default' file name whereby the user can either use the default name or change the file name themselves. When the user navigate to other lessons and click to save the audio recorded, the default file name will change according to the unit/activity name. Therefore, I personnally think that the way to make this realise is to pass a tag/variable/text file from the flash. The exe file will read the file names from the tag/variable/text file and display a different default name for each different page on my site.

Example: When user save an audio on unit S35PE12 (unit/activity name), the flash will pass this value(S35PE12) to the exe. If the user is saving an audio from unit L23PE41, the value being passed to exe will be L23PE41.

I am not sure how this thing can work, but I am seriously looking forward to some replies soon. Any suggestions or ideas are highly appreciated. Hope my thread isn't confusing though.

Thanks in advance,
  • Abelius
  • Proficient
  • Proficient
  • User avatar
  • Posts: 260
  • Loc: Miami Beach, FL, USA

Post 3+ Months Ago

No, you can't store stuff in client's text files...

For that, you should use so (Shared Objects), as they work in a similar way cookies do... :)
  • joebert
  • Genius
  • Genius
  • User avatar
  • Posts: 13511
  • Loc: Florida

Post 3+ Months Ago

Flash itself can't save txt files (since MX) but you can pass variables to a script within the page which inturn relays them to an activeX controll capable of saving the file. How to go about it on the activeX side I can be of no help, however fscommand will play a big role in communicating with the controll from flash.

Shared Objects will work as well, they are almost impervious to people cleaning their cache. However they are not always reliable.

Quick example of a shared object,
Code: [ Select ]
userSettings = SharedObject.getLocal("userSets"); = "value"; = "value2";
  1. userSettings = SharedObject.getLocal("userSets");
  2. = "value";
  3. = "value2";
  4. userSettings.flush();

Code: [ Select ]
userSettings = SharedObject.getLocal("userSets");
savedVar1 =;
savedVar2 =;
  1. userSettings = SharedObject.getLocal("userSets");
  2. savedVar1 =;
  3. savedVar2 =;

Post Information

  • Total Posts in this topic: 3 posts
  • Users browsing this forum: No registered users and 6 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum

© 1998-2017. Ozzu® is a registered trademark of Unmelted, LLC.