0

Flash で静的ファイルの保存ダイアログを表示するにはどうすればよいですか? 問題のファイルは、ローカルでもリモートでもかまいません。この場合、ファイルは静止画像です。

私は AS (および SO) を初めて使用しますが、最初は非常に単純に見える問題に対する解決策がいかに多様で複雑であるかに驚いています。

私は(ByteArray、BitmapDataなどとともに)JPEGEncoderで成功しましたが、非常に遅く、明らかにファイルタイプに依存しません。

Flex や AIRではなく、Flash Pro CS5 を使用しています。

4

3 に答える 3

0

FileReference次のクラスを使用して、Flashを介してファイルを保存できます:http: //help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/net/FileReference.html

エンコーディングに関してはJPEGEncoder、品質設定のために非常に遅くなる可能性があります。100%に設定すると、速度が向上します。PNGEncoderただし、より高速であるか、Eugeny89によって提案された錬金術ベースのソリューションを使用します

于 2011-04-20T15:19:35.850 に答える
0

以下をご覧ください: http://ask.amoeba.co.in/save-images-from-flash-actionsctipt-3-filereference-save-jpgencoder/

于 2011-04-20T15:36:11.870 に答える
0

How do I trigger a save dialog for a static file in Flash?

If I understood your question correctly the answer is that you cannot touch any stuff on your computer on flash.

I've had success with JPEGEncoder (along with ByteArray, BitmapData etc.) but it's extremely slow

I've asked about that what is the simpliest way to get jpg from bitmapData

Adam Smith adviced to use faster alchemy based solution instead of JPEGEncoder: http://www.websector.de/blog/2009/06/21/speed-up-jpeg-encoding-using-alchemy/

于 2011-04-20T15:02:09.437 に答える