0

I would like to get the file path of an image that got loaded over the CameraRoll with the code below. The app runs on an iPhone with iOS 8 an it's build with Adobe Air 15.

var loaderCameraRoll:Loader 
var deviceCameraRoll:CameraRoll

function loadImageFromCameraRoll(e:Event=null):void {
deviceCameraRoll = new CameraRoll();
deviceCameraRoll.addEventListener(MediaEvent.SELECT, onSelectCameraRoll);
deviceCameraRoll.browseForImage();
}

function onSelectCameraRoll(event:MediaEvent):void {
var promise:MediaPromise = event.data as MediaPromise;
loaderCameraRoll = new Loader() 
loaderCameraRoll.contentLoaderInfo.addEventListener(Event.COMPLETE, onLoadedCameraRoll);
loaderCameraRoll.loadFilePromise(promise);      
}

function onLoadedCameraRoll(event:Event):void {
trace("Loaded - File path: ?")
}
Jay
  • 491
  • 1
  • 12
  • 22
  • try this: `trace("Loaded - File path: "+ LoaderInfo(event.currentTarget).url );` – Karmacon Dec 15 '14 at 23:11
  • That returns `http://adobe.com/apollo/[DYNAMIC]]/1` - I was expecting a local path. Did I miss something? – Jay Dec 15 '14 at 23:17
  • I don't think it's possible to get the path to an image inside the native camera roll. – crooksy88 Dec 16 '14 at 07:39
  • @crooksy88 What makes you so sure about it? Can an image loaded from the Photos folder generally only with an user interaction such as taking a photo or selecting an image from the camera roll? – Jay Dec 16 '14 at 22:31
  • I believe this issue talking about the same thing. https://forums.adobe.com/message/3827717 – crooksy88 Dec 17 '14 at 07:35

0 Answers0