title: Flash Actionscript 3 saving a XML file locally has a "Save As" window (How can I remove it?)
body: <p>So, I have a flash application that handles several client profiles for a company. Whenever a new client profile is created, it saves a new XML file localy. My problem is that instead of doing a "silent" file creation, a window pops up just like doing a "Save As" as to confirm that the file is being saved on disk and which name should it be.</p>
  
  <p>Is there a way to do a file save within flash without it calling out that window? If so, would it be possible to link me to an example of it?</p>
  
  <p>Here is an example of my code:</p>
  
  <pre><code>var xmltosave:XML = new XML ( "&lt;?xml version=&amp;quot1.0&amp;quot encoding=&amp;quotutf-8&amp;quot?&gt;&lt;cliente&gt;&lt;id&gt;"+idfield.text+"&lt;/id&gt;&lt;nome&gt;"+nomefield.text+"&lt;/nome&gt;&lt;tipo&gt;"+tipofield.text+"&lt;/tipo&gt;&lt;empresa&gt;&lt;/empresa&gt;&lt;email&gt;"+emailfield.text+"&lt;/email&gt;&lt;contacto&gt;"+contacto1field.text+"&lt;/contacto&gt;&lt;contacto2&gt;"+contacto2field.text+"&lt;/contacto2&gt;&lt;profissao&gt;&lt;/profissao&gt;&lt;datainscricao&gt;"+datafield.text+"&lt;/datainscricao&gt;&lt;dataalteracao&gt;&lt;/dataalteracao&gt;&lt;notas&gt;&lt;/notas&gt;&lt;notas2&gt;&lt;/notas2&gt;&lt;notas3&gt;&lt;/notas3&gt;&lt;/cliente&gt;");
  
  var file:FileReference = new FileReference;
  var filepath:String = new String(idfield.text + ".xml");
  file.save( xmltosave, filepath );
  </code></pre>
  
  <p>Also, I know that the xmltosave is very long, is it possible to do line breaks in AS3 code?</p>
  
  <p>Thank you.
  Marco Roberto.</p>
  
  <p>NOTE: I know that I should use a php script to manage files, but unless that php is able to run locally without any server installs, like XAMPP, im not interested in using it. This is a small project and I just need to handle XML files. Unless its absolutely impossible to do it without PHP scripts, I would prefer a AS3 solution.</p>