A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: writing a variable to a txt from flash projector

  1. #1
    Junior Member
    Join Date
    Oct 2000
    Posts
    22
    forgive me if this ground has been covered...

    how can i get a custom variable (this one is called 'score')to be written to the local hard drive (ie. c:\score.txt)

    i've been told it cannot be done. i didn't think flash would be without this capability for 4 versions (i'm using flash 4 for windows, BTW)

    thanks in advance...

  2. #2
    Junior Member
    Join Date
    Sep 2000
    Posts
    15

    resolved writing a variable to a txt from flash projector

    Hi, I just made a program in VBasic to write vars to my HD into a text file.
    I run the program with the FS "EXEC" command, pass the variables and the program do the rest.
    Look download this three files and let me know if this is what you are looking for.
    http://209.76.97.59/ftp/read.exe
    http://209.76.97.59/ftp/write.exe
    http://209.76.97.59/ftp/savevars.exe
    place all three in the same folder and run the write.exe first, use the read.exe to read your vars, the name of the text file is vars.exe.
    you can have more than three vars, if you want i can share the source code.



  3. #3
    Junior Member
    Join Date
    Sep 2000
    Posts
    15

    writing a variable to a txt from flash projector

    ...sorry for the typo, the name of the text file is vars.txt

  4. #4
    Senior Member
    Join Date
    Jun 2000
    Posts
    666
    To: Jaime Garate
    Why do you need a executable to read a text file?

    You should be able to read a text file without calling on a executable..

    AustinPM
    There are two other solutions to writing text files already available.. there is a freeware version of AFSaver available from
    http://www.ashzfall.com/products/afsaver/

    And there is my also my Flash Tools Beta 4 solution available at..
    http://www.flashkit.com/board/showth...threadid=20493

    There is also a MS-Dos method that I have not tested but is listed here..
    http://www.flashkit.com/board/showth...threadid=17634

    (by testing I mean I have not checked it's functionality.. nor the Operating Systems it works on)
    [Edited by The Master on 10-04-2000 at 11:55 PM]

  5. #5
    Junior Member
    Join Date
    Sep 2000
    Posts
    15

    to The Master

    The read.exe is just for demonstration purposes, the important part here is a subroutine nested in my flash file called write.exe, this subroutine inserts all the special chars like &, chr(9) and "" so you don't have to deal with that every time you add or remove a variable.
    The other important thing here is the executable built in VBasic that runs transparent in the background you don't even notice it.
    I know, I know, you don't like VBasic, but it works, so...


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