我正在开发使用Flash 10图片上传。
我使用的FileReference
对象浏览图像和装载机来显示图像:
I am developing a Image uploader using Flash 10.
I am using FileReference
object to browse images and Loader to show the image:
样品code:
var tempFileRef:FileReference = FileReference(ev.target);
var oLoader:Loader = new Loader();
oLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, onImageLoad);
oLoader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, onIOError);
oLoader.loadBytes(tempFileRef.data);
它工作正常的 .JPG 和 .gif注意:文件,但是当我浏览.BMP或.TIFF文件,我得到的错误:
It works fine with .jpg and .gif files but when I browse .bmp or .tiff file, I am getting the error:
Error #2124: Loaded file is an unknown type.
有没有办法来加载和桌面显示浏览.BMP图像?
Is there a way to load and display browsed .bmp images from desktop?
感谢
BMPDe codeR从星火LIB类: 的http://www.libspark.org/svn/as3/BMPDe$c$cr/src/com/voidelement/images/BMPDe$c$cr.as
BMPDecoder class from Spark lib: http://www.libspark.org/svn/as3/BMPDecoder/src/com/voidelement/images/BMPDecoder.as
的使用示例: http://hi.baidu.com/leyhui /blog/item/d12be8b116ec915308230298.html
对于TIFFDe codeR,它的工作仍然在进行中,但非常有前途的:
Regarding TIFFDecoder, it is still work in progress, but very promising one:
HTTP://$c$c.google.com/p / windowsbitmapden codeR /
上一篇:在AS3中同时使用的NetStream视频播放我怎么求,当我使用对appendBytes当我、视频播放、我怎么、NetStream
下一篇:闪存AS3:的ReferenceError:错误#1056:无法创建属性闪存、属性、错误、ReferenceError