A Flash Developer Resource Site

Results 1 to 12 of 12

Thread: Back door fscommand to save files locally?

  1. #1

    Back door fscommand to save files locally?

    Originally posted by Tupps
    If you are running the XML locally there is a back door that allows you to save files using the fscommand function, however it is not documented and only supported on the PC.
    This is exactly what I want to do. I'm making a stand-alone Flash app, and exercise log. I want to keep track of progress, groups of exercises, etc.

    I'd like more info on this 'backdoor' fscommand function, please!! Actually there are a lot of apps I'd like to develop with Flash. It is just a lot easier than C++ or Delphi.

    Jason
    Last edited by 5t0n3cr4b; 11-29-2002 at 02:56 AM.
    I Flash, therefore I am.

  2. #2
    Senior Member
    Join Date
    Dec 2001
    Posts
    160
    Oh I would also like to know what is this backdoor if theres one.
    But you have a chance to write data on users computers use localSharedObject it's like cooky on users machine.

  3. #3
    Through a little meta-searching I found that you do it like this:

    fscommand ("save","file.txt")

    But I would like to save into an actual XML file. Actually, I'm not sure if XML or just a text file with variables is necessary. For instance, with XML I could create something like this:

    PHP Code:
    <user name="me" gender="m">
      <
    session id="00001" type="upper" date="20021128">
        <
    exercise name="bicep curl" weight="30" sets="3" reps="10" />
        <
    exercise name="military press" weight="45" sets="3" reps="10" />
        <
    exercise name="tricep extention" weight="30" sets="3" reps="10" />
      </
    session>
      <
    session id="00002" type="lower" date="20021129">
        <
    exercise name="squats" weight="150" sets="3" reps="10" />
        <
    exercise name="leg press" weight="45" sets="3" reps="10" />
        <
    exercise name="hamstring pull" weight="60" sets="3" reps="10" />
      </
    session>
    </
    user
    Can I create multiple variables for each exercise session using just a text file?
    I Flash, therefore I am.

  4. #4
    Senior Member
    Join Date
    Dec 2001
    Posts
    160
    If you will suucceed to write those vars to txt file, pls be so kind and sent it to me too.

    In attachment you can see how loacalSharedObject works, and I think that it should solve all your problems
    Attached Files Attached Files

  5. #5
    Junior Member
    Join Date
    Nov 2000
    Posts
    23
    Would this still work with a swf & txt/xml file on a server?


    And then, how do we go about writing to the file?
    -Bmud-

  6. #6
    Timetravelling Superhero AJ Infinity's Avatar
    Join Date
    Oct 2002
    Location
    The Realms of Infinity
    Posts
    203
    For info on localSharedObject, go to http://www.flashworker.de/tutorial/40/001.html . It's not in English, but you can understand it. LocalSharedObject is the Flash version of cookies. It saves in files, though. This page/tutorial should answer your question.
    From here to infinity,
    A J I N F I N I T Y

  7. #7
    Senior Member
    Join Date
    Dec 2001
    Posts
    160
    I do know about lso!

    question is about writing text files on hard drive, I know how to set cookies

  8. #8
    Timetravelling Superhero AJ Infinity's Avatar
    Join Date
    Oct 2002
    Location
    The Realms of Infinity
    Posts
    203
    Oh, ok. I want to know how to write TXT/XML files, also.
    From here to infinity,
    A J I N F I N I T Y

  9. #9
    That's why were here AJ. lol

    Seriously, is this a viable path or are we making things harder than they are? Macromedia has no support pages for localSharedObject. I only found the link posted above when I searched for it on Google.

    Nothing like the bleeding edge!
    I Flash, therefore I am.

  10. #10
    Timetravelling Superhero AJ Infinity's Avatar
    Join Date
    Oct 2002
    Location
    The Realms of Infinity
    Posts
    203
    I did some gooling and found:

    http://www.flzone.net/ShowDetail.asp?NewsId=3777
    http://www.moock.org/asdg/technotes/fscommandsave/

    these should definitely help.

    Found many pages that said the save fscommand is a major vulnerbility threat. But Windows (Not Mac OS X, Linux, or other UNIX flavors) is the only OS vulnerable to this fscommand. It appears to work only on the PC. Windows is insecure to everything. I can create a JavaScript that grabs all your personal information from Outlook. I've never got a virus on my Mac, either, nor have I ever been hacked. The Mac will tell you when stuff like this happens, although it rarely does happen and requires you to use the Terminal or an access blocker like BrickHouse. Or Virex, Viruscan, etc.

    Anyway, back to the save FSCommand. It only works in Windows projectors.
    From here to infinity,
    A J I N F I N I T Y

  11. #11
    Senior Member tupps's Avatar
    Join Date
    Jan 2001
    Location
    Melbourne
    Posts
    2,035
    I also seem to remember that some (all?) MX projectors on FlashMX no longer support this. It is undocumented, which means that Macromedia might disable this feature at any time.

    If you are using FlashMX look at the local stored objects.

    Thanks

    Luke
    Flash-XML FAQ
    http://www.tupps.com/flash/faq/

  12. #12
    Timetravelling Superhero AJ Infinity's Avatar
    Join Date
    Oct 2002
    Location
    The Realms of Infinity
    Posts
    203
    Well, Zirgz, just use lso. It saves .sof shared object files on the users hard drive. Store your XML object in a lso like this:
    PHP Code:
    myXML = new XML();
    myLSO SharedObject.getLocal("myLocalObj");
    myLSO.data.xmlObj myXML
    That should do it.
    From here to infinity,
    A J I N F I N I T Y

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