Flash 上传 ByteArray 数据到 php 并保存为图片
Flash 可以通过各种途径获取或生成图片的 ByteArray 数据, 尤其是 Flash Player 10 增加了 FileReference.load 方法之后, 更是方便了许多, 最典型的一个应用场景就是用 Flash 编辑图片.
在 player 10 以前, 通常的做法是: 打开图片 -> 上传 -> 返回图片地址 -> 加载 -> 处理 -> 再上传.
player 10 以后就方便了, 直接用 load 方法打开本地图片, 用 Loader.loadBytes 方法显示图片就完成了上面说的前四步.
最终上传也很简单, AS 代码如下:
<div class="dp-highlighter bg_java" style="font-family: Consolas, 'Courier New', Courier, mono, serif; width: 687px; margin-top: 18px !important; margin-right: 0px !important; margin-bottom: 18px !important; margin-left: 0px !important; padding-top: 1px; color: #333333; line-height: 26px; text-align: left;"><div class="bar" style="padding-left: 45px;"><div class="tools" style="padding-top: 3px; padding-right: 8px; padding-left: 10px; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 9px; line-height: normal; color: silver; background-color: #f8f8f8; padding-bottom: 10px; border-left-width: 3px; border-left-style: solid; border-left-color: #999999;"> view plaincopyprint?<div style="width: 29px; height: 14px;">
页:
[1]