我ve been looking above an hour for some tutorials without any luck. I need to store my capture image in application data folder for later purpose. I have my code for capture, but i don
知道如何保存它。您可以帮助学习一些教程或任何代码示例。
IOS,Android,Flash builder 4.6
这是我的代码:
private function takePhotoHandler(e:Event):void {
if (CameraUI.isSupported){
var cameraUI:CameraUI = new CameraUI();
cameraUI.addEventListener(MediaEvent.COMPLETE, onCameraUIComplete);
cameraUI.launch(MediaType.IMAGE);
}
}
private function onCameraUIComplete(e:MediaEvent):void
{
var cameraUI:CameraUI = e.target as CameraUI;
cameraUI.removeEventListener(MediaEvent.COMPLETE, onCameraUIComplete);
var mediaPromise:MediaPromise = e.data;
this.mpLoader = new Loader();
this.mpLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, onMediaPromiseLoaded);
this.mpLoader.loadFilePromise(mediaPromise);
}
private function onMediaPromiseLoaded(e:Event):void
{
var mpLoaderInfo:LoaderInfo = e.target as LoaderInfo;
mpLoaderInfo.removeEventListener(Event.COMPLETE, onMediaPromiseLoaded);
snapshot.source = mpLoaderInfo.loader.content;
}