A Flash Developer Resource Site

Results 1 to 15 of 15

Thread: writing info to user's computer from EXE?

  1. #1
    Junior Member
    Join Date
    Aug 2005
    Posts
    15

    writing info to user's computer from EXE?

    I was wondering if it is possible to write information to a user's computer from a Flash executable file? I'm hoping to create a standalone executable that will track (and save) information in a graphic chart over time.

    Any advice on this subject would be helpful.

  2. #2
    FK's Official Mac Hater jasonsplace's Avatar
    Join Date
    Mar 2002
    Location
    Provo, Utah
    Posts
    2,245
    Unfortunately Macromedia removed the "save" feature in MX so we can't use it anymore. For a free solution, if it doesn't have to be on the hard drive and the people will have an internet connection, you could have it send the info to a server using PHP or ASP or JSP or any server side language. If you want the functionality in your standalone to save on your computer you will need a third party tool. I prefer SWF Studio from http://www.northcode.com but others are available too. Sorry that it isn't asier than that.
    Jason L. Wright
    I'm not that hard to imitate. Just make some random negative claim at Apple or anything else for that matter and then have nothing to back it up.

  3. #3
    Junior Member
    Join Date
    Aug 2005
    Posts
    15
    Thanks, Jason. I had a feeling it wouldn't be easy even if it was possible, but at least I can be sure now when I let my client know.

    Lisa

  4. #4
    Lifetime Friend of Site Staff Northcode's Avatar
    Join Date
    Dec 2000
    Location
    Whitehorse YT
    Posts
    3,766
    You can use Local Shared Objects to store persistent data as well, and you can do it for FREE using functionality built into Flash. Check out this Macromedia technote for more details...

    http://www.macromedia.com/cfusion/kn...fm?id=tn_16194

  5. #5
    FK's Official Mac Hater jasonsplace's Avatar
    Join Date
    Mar 2002
    Location
    Provo, Utah
    Posts
    2,245
    I completely forgot about Shared Objects. The only downside to that is it is stored in a cookie so it may not be permanent storage. Correct me if i'm wrong.
    Jason L. Wright
    I'm not that hard to imitate. Just make some random negative claim at Apple or anything else for that matter and then have nothing to back it up.

  6. #6
    Junior Member
    Join Date
    Aug 2005
    Posts
    15
    Thanks, Northcode. I took a quick look at the technote, but it does seem to refer to online sites rather than executables downloaded to one's desktop. Do you know if it's adaptable to a standalone player? Does it then matter where the user saves the EXE file to their computer?

  7. #7
    Lifetime Friend of Site Staff Northcode's Avatar
    Join Date
    Dec 2000
    Location
    Whitehorse YT
    Posts
    3,766
    Local Shared Objects will work in a player running in a browser and in the standalone Flash player. A shared object isn't a cookie, it's a real file (.SOL) so it won't be removed when someone clears their cache or something.

  8. #8
    Junior Member
    Join Date
    Aug 2005
    Posts
    15
    Okay, thanks. Sounds like it's definitely worth me looking into further.

  9. #9
    Lifetime Friend of Site Staff Northcode's Avatar
    Join Date
    Dec 2000
    Location
    Whitehorse YT
    Posts
    3,766
    I know I've helped people here with code to store and retrieve data from shared local objects so you might want to have a look through this forum first.

  10. #10
    Member
    Join Date
    Nov 2003
    Location
    Tennessee
    Posts
    49
    The simplest solution would be to use Flash 5. It has the capability of saving text files containing all the variable data from a stand alone executable to the local hard drive. The hard part is retrieving the data once it's saved, but it's definitely possible. I've done it many times before.
    GetLives Arcade: Play games, nothing else.
    This site is nothing but Flash-powered games. If you're bored, try a few of them.

  11. #11
    FK's Official Mac Hater jasonsplace's Avatar
    Join Date
    Mar 2002
    Location
    Provo, Utah
    Posts
    2,245
    Flash 5 wasn't hard.
    To save:
    fscommand("save", "hello.txt");
    To load:
    loadVariables("hello.txt");

    It was real easy. The only problem with that is that the computer that you are using the projector on would have to have the Flash 5 player as the newer players don't support that function.
    Jason L. Wright
    I'm not that hard to imitate. Just make some random negative claim at Apple or anything else for that matter and then have nothing to back it up.

  12. #12
    Member
    Join Date
    Nov 2003
    Location
    Tennessee
    Posts
    49
    Loading the variables is iffy in Flash 5. You have to check to make sure everything is loaded before you change frames or it'll stop loading the variables. This is a major pain for large files, but what you have to do is check for a variable at the end of the text file to be set to true. Once it's set to true, the movie can continue playing.

    Also, it's almost impossible to load user-created files, because you have no way to search through the hard drive and pick out the file you want to load. Instead, you're stuck with a text input field or a slot-based system.
    GetLives Arcade: Play games, nothing else.
    This site is nothing but Flash-powered games. If you're bored, try a few of them.

  13. #13
    FK's Official Mac Hater jasonsplace's Avatar
    Join Date
    Mar 2002
    Location
    Provo, Utah
    Posts
    2,245
    Flash by itself wasn't created to make full blown applications. It does do a good job for simple things but in order to do anything to advamced you need add-ons. I loved the save command. It worked very well for saving simple data to the hard drive.
    Jason L. Wright
    I'm not that hard to imitate. Just make some random negative claim at Apple or anything else for that matter and then have nothing to back it up.

  14. #14
    Lifetime Friend of Site Staff Northcode's Avatar
    Join Date
    Dec 2000
    Location
    Whitehorse YT
    Posts
    3,766
    It was real easy. The only problem with that is that the computer that you are using the projector on would have to have the Flash 5 player as the newer players don't support that function.
    Minor correction: The SAVE feature only worked in the Flash 5 standalone projector, which means the user wouldn't need anything else installed. The Macromedia standalone projectors are completely self-contained.

  15. #15
    FK's Official Mac Hater jasonsplace's Avatar
    Join Date
    Mar 2002
    Location
    Provo, Utah
    Posts
    2,245
    I guess that would be correct Northcode.
    Jason L. Wright
    I'm not that hard to imitate. Just make some random negative claim at Apple or anything else for that matter and then have nothing to back it up.

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