flex 4.6:如何缓存使用PersistenceManager捕获的图像

时间:2013-12-11 17:39:40

标签: actionscript-3 flex flash-builder flexbuilder

我是Flex移动应用程序的初学者,我的问题是应用程序重新启动然后我使用PersistenceManager来解决它,但是当我用相机拍摄图像时如果应用程序重新启动则无法保存图像,那么如何保存用户捕获的所有图像点击保存按钮我认为它将在图像捕获的方法,但它不起作用重新启动应用程序和相机应用程序打开采取图像方法是

public function imagecaptured(event:MediaEvent):void
        {
            //submitButton.enabled = false;
            antherImg.label = "please wait to detect your location";
            imagepromise = event.data;
            imgBorder.source = imagepromise.file.url;
            //values to send
            var imgURL:Object = imagepromise.file.url;
            var imgName:Object = imagepromise.relativePath;

            //save Persistence
            var saveManager:PersistenceManager = new PersistenceManager();            
            saveManager.setProperty("url", imagepromise.file.url);
            saveManager.setProperty("name", imagepromise.relativePath);
        }

以及页面创建时(creationComplete)

 public var loadManager:PersistenceManager = new PersistenceManager();


if(loadManager.load())
            {

                var savedData:Object = saveManager.getProperty("url");
                var savedData:Object = saveManager.getProperty("name");


            }

请帮助,提前致谢

0 个答案:

没有答案