1.图片导入
一些代码片段,仅供参考,不能直接运行,有兴趣可以下载源码查看
private var _file:File;
private var _imageLoader:Loader;
_file = new File(File.desktopDirectory.nativePath);
_file.addEventListener(Event.COMPLETE, OnFileCtrlEvent);
_file.addEventListener(Event.SELECT, OnFileCtrlEvent);
_file.addEventListener(Event.CANCEL, OnFileCtrlEvent);
_imageLoader = new Loader();
_imageLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, LoadImageComplete);
protected