A Flash Developer Resource Site

Results 1 to 7 of 7

Thread: inserting data locally into a txt file

  1. #1
    Junior Member
    Join Date
    Nov 2003
    Posts
    12

    inserting data locally into a txt file

    Hi there

    I was wondering whether anyone can help me. I'm doing a project where I have to create a fun flash questionairre for kids. The swf is to be run locally. I need to store the answers that the kids give in a text file which will be also situated locally on the hard drive. Is there anyway i can write to a text file locally or does it have to be done over a browser.

    In advance thanks for any help

  2. #2
    Senior Member pellepiano's Avatar
    Join Date
    Feb 2000
    Location
    Stockholm, Sweden
    Posts
    15,151
    You can save by using the sharedObjects.

    Make a search here or get more links about it at....

    http://www.google.com/search?hl=en&i...=Google+Search

    -Pelle Piano
    // Image Gallery
    www.studiobild.com
    // Photo Blog
    http://talesofthepixel.blogspot.com

  3. #3
    Senior Member
    Join Date
    Aug 2002
    Location
    Dublin, Ireland
    Posts
    1,749
    Shared objects are good for temporary storage (effectively a cookie) but can't be saved outside of Flash.
    If you are running the SWF locally, you could package it as an EXE, in which case you could use a third-party product such as *********** or NorthCode SWF Studio to directly write a text file.

  4. #4
    Senior Member pellepiano's Avatar
    Join Date
    Feb 2000
    Location
    Stockholm, Sweden
    Posts
    15,151
    Shared objects are ( like any cookie ) saved outside Flash. It is stored in a textfile on the users computer and can be retrieved or added to.
    The textfile will accept 100kb, then it will ask the user if its ok to increase the disc storage.

    -Pelle Piano
    // Image Gallery
    www.studiobild.com
    // Photo Blog
    http://talesofthepixel.blogspot.com

  5. #5
    Senior Member
    Join Date
    Aug 2002
    Location
    Dublin, Ireland
    Posts
    1,749
    Well, yes and no. It is hardly the most convenient method to have to search for a filename you don't know in a location that may be different on different machines, when for an EXE, you can save it as anything from TXT to CSV to PDF.

    (Incidentally, what filename _would_ you use to find the shared object?)

  6. #6
    Senior Member pellepiano's Avatar
    Join Date
    Feb 2000
    Location
    Stockholm, Sweden
    Posts
    15,151
    I must admit I havent used the Shared objects more than once, so I have very little personal experience from it. However, as the question did not mention that the swf file had to run on several machines or the need to find the textfile manually, It may be a good idea with the shared objects ( as Ive seen descriptions on quite advanced uses for shared objects in online tutorials ).

    But for use on several machines I understand the need of the thirdparty products.

    Another and maybe simpler method ( if rudyVan has a copy of Flash 5 and will use it on a PC) could be to use the fscommand save feature.

    -Pelle Piano
    // Image Gallery
    www.studiobild.com
    // Photo Blog
    http://talesofthepixel.blogspot.com

  7. #7
    Junior Member
    Join Date
    Nov 2003
    Posts
    12
    thanks to both of you for your help

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center