A Flash Developer Resource Site

Results 1 to 10 of 10

Thread: FMX writing text files???

  1. #1
    Senior Member
    Join Date
    Sep 2000
    Posts
    298

    Smile

    I was just getting ready to buy flash jesters jsave and netcheck, when I saw the flashmx announcement. WIll MX proivide the facilities to do these things from a flash projector?

    1. check for internet connection.
    2. write a text file.

    I am building a desktop app that will load data from our live site and display it, but I need to be able to write to a text file on the hard drive so I can show the latest possible info (written to text file at time of last connection) if they are not currently connected. Hope some one can/will answer this... trying to save $300 (money is short here as everywhere).

    Thanks in advance
    Felix_Man

  2. #2
    Senior Moderator
    Join Date
    Apr 2000
    Location
    Sheffield, UK
    Posts
    3,881
    No new commands or functions to do this no, you can of course use the new LocalObjects to store the data you wanted to store in a textfile - LocalObjects are just like cookies except you can store full flash object structures inside of them.

    To check for an internet connection youll still need to use a .bat file in conjunction with fscommand just as you would have in flash 5.

  3. #3
    Beyond the Sea
    Join Date
    Mar 2000
    Posts
    997
    I can still save you money, though. Buy SWF Studio from Northern Codeworks! It's only $150, does all the things you want, and has great product support. http://www.northcode.com

  4. #4
    Senior Member
    Join Date
    Sep 2000
    Posts
    298

    LocalObjects?

    FlashGuru
    Sounds interesting Guy. Are you saying that info can be written to the flash file and recalled the next time it is opened? If so does this include standalone projectors? If not could you expand a little on what you mean (I'm a little slow...)?

    Kraken
    Thanks man I appreciate the link. I have never heard of this before... great stuff. Maybe replace screenwaeaver and Jtools... Sweet!

    Thanks again guys.


  5. #5
    Senior Moderator
    Join Date
    Apr 2000
    Location
    Sheffield, UK
    Posts
    3,881
    Sounds interesting Guy. Are you saying that info can be written to the flash file and recalled the next time it is opened? If so does this include standalone projectors? If not could you expand a little on what you mean (I'm a little slow...)?
    LocalObjects are a means to store data used in a flash movie persistently throughout movies, much like cookies. You can save objects in a LocalObject and then load the object back into the movie the next time it is opened.

    You can store all of the primitive data types in a LocalObject.

    LocalObjects work both as standalone and online.


  6. #6
    the indian sunmillennium's Avatar
    Join Date
    Nov 2000
    Location
    New Delhi INDIA
    Posts
    249
    There is an undocumented FSCommand("save","filename.txt") which when invoked in Flash running in the Flash Player ( not the browser ) will write a text file with name value pairs of all the variables on the timeline.

  7. #7
    NerdInside's Avatar
    Join Date
    May 2001
    Location
    Penguin Island
    Posts
    3,439
    Originally posted by sunmillennium
    There is an undocumented FSCommand("save","filename.txt") which when invoked in Flash running in the Flash Player ( not the browser ) will write a text file with name value pairs of all the variables on the timeline.
    No, that was only in Flash 5 and was left over from testing. It has been removed in Flash MX. If you use the code, export as Flash 5, and the viewer still has Flash Player 6 or the updated Flash 5 Player, it will not work.

  8. #8
    Junior Member
    Join Date
    Jun 2005
    Posts
    2
    What must I do to create and save a file (txt file or xml file) in the same folder of the swf file?
    (In flash MX 2004)
    Thank in advance
    Last edited by lastid; 06-07-2005 at 09:06 PM.

  9. #9
    Senile member! :)
    Join Date
    Dec 2001
    Location
    Saunaswamp (transl)
    Posts
    2,296
    If its online you need serversidescripting like PHP or ASP to which you send variables that they can save in the right place.

    If its offline you'll need to get a 3:rd party app like Zinc:

    http://www.multidmedia.com/software/zinc/

    /Mirandir

  10. #10
    Junior Member
    Join Date
    Jun 2005
    Posts
    2
    Ok, thanks a lot

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