Skip to main content
WitchXHunter
Inspiring
January 4, 2013
Answered

initiate xml without having to browse for a location

  • January 4, 2013
  • 1 reply
  • 848 views

How do we come about creating a new xml without the browsing window poping out? and how do we check if the xml already exists or not? Thanks

This topic has been closed for replies.
Correct answer kglad

both the file and filereference class save() methods will open a save file operating system dialogue box.

using the sharedobject does not save a file but can save data (like xml) without opening a dialogue box.

in neither case can the programmer control where the file/data are saved.

1 reply

kglad
Community Expert
Community Expert
January 4, 2013

you want to write a file to a user's file system without them knowing about it?  that's probably not doable.

you can check if a file exists by attempting to download it and listening for an IOErrorEvent.IO_ERROR.

WitchXHunter
Inspiring
January 5, 2013

ohh actually I'm trying to make a xml file for save and load game option.

the file.save code opens up the browsing window and ask the user to select a saving location. but usually the flash games saving and loading doesn't require us to do that. Must the xml file be save this way? or Are they using shared object?

kglad
Community Expert
kgladCommunity ExpertCorrect answer
Community Expert
January 5, 2013

both the file and filereference class save() methods will open a save file operating system dialogue box.

using the sharedobject does not save a file but can save data (like xml) without opening a dialogue box.

in neither case can the programmer control where the file/data are saved.