4

Is there any workaround to allow actionscript3 write to file system without adobe air?

The reason is because, in order to use adobe air, each of the web visitors will need to install add-on air run-time and that is tedious. Most of the users will have flash plug-in and not Adobe Air.

Stu Thompson
  • 38,370
  • 19
  • 110
  • 156
cometta
  • 35,071
  • 77
  • 215
  • 324

1 Answers1

7

This is possible in Flash 10.

Take a look at the FileReference class, specifically the save method.

There are certain limitations imposed for security's sake, of course. The write can only be initiated by user interaction (e.g. a button click), and it will always pop up the host OS's File Save dialog box prompting the user to choose a location (or cancel).

Cameron
  • 96,106
  • 25
  • 196
  • 225
  • may i know does flash10 capable of output file using simpleflv library? – cometta Sep 13 '09 at 14:53
  • in other word, is there any similar library like SimpleFlvWriter that allow write to flv file on flash 10 using "save" functioned you mentioned? (without need to use air) ? – cometta Sep 13 '09 at 14:58
  • by the way, i read the save api, it mentioned Runtime Versions: Flash Player 10, AIR 1.5 . it need to use air right? – cometta Sep 13 '09 at 14:59
  • @cometta: The save() method can be used in AIR or FP 10 (you don't need AIR at all). It can write any binary data (stored in a ByteArray object) to a file. Also, I've never used SimpleFLVWriter, but after some Googling I found a page in Japanese that contains a class called SimpleFLVWriterFP10 - translation from Google at http://translate.google.ca/translate?hl=en&sl=ja&u=http://blog.tarotaro.org/archives/445/2&ei=W6uvSpGtMIi7lAfIx5nMBg&sa=X&oi=translate&resnum=5&ct=result&prev=/search%3Fq%3DSimpleFLVWriter%26hl%3Den%26client%3Dfirefox-a%26rls%3Dorg.mozilla:en-US:official%26hs%3DCFF%26sa%3DG – Cameron Sep 15 '09 at 15:01