Hi,
I have been digging a bit more into this problem.
if i use the following code:
var str:String = File.applicationDirectory.nativePath;
trace(str);
_pointModel.mainImage= LoaderMax.getContent(str+"/\.\./Library/Caches/resources/img/4/4_mamma.jpg");
trace(_pointModel.mainImage);
var file:File = new File(str +"/\.\./Library/Caches/resources/img/4/4_mamma.jpg");
if(file.exists) {
trace("exists");
}
the traces will show:
/Users/larshansson/Documents/src/ParkenMobile/bin-debug
null
exists
So the file seems to be in the right place, but the LoaderMax.getContent() method returns null.
if I try to load it explicitly with ImageLoader
var loader:ImageLoader = new ImageLoader(str +"/\.\./Library/Caches/resources/img/4/4_mamma.jpg", {name:"photo1", container:_pointModel.mainImage,scaleMode:"proportionalInside", centerRegistration:true, onComplete:onImageLoad, onError:onErrorCode});
I get the following error:
error:ImageLoader 'photo1' (/Users/larshansson/Documents/src/ParkenMobile/bin-debug/../Library/Caches/resources/img/4/4_mamma.jpg) > Error #2035: URL Not Found. URL: app:/Users/larshansson/Documents/src/ParkenMobile/Library/Caches/resources/img/4/4_mamma.jpg
if I change the path above to:
var loader:ImageLoader = new ImageLoader("app:/\.\./Library/Caches/resources/img/4/4_mamma.jpg", {name:"photo1", container:_pointModel.mainImage,scaleMode:"proportionalInside", centerRegistration:true, onComplete:onImageLoad, onError:onErrorCode});
i get
*** Sandbox error ***
Access tp app:/../Library/Caches/resources/img/4/4_mamma.jpg has been stopped - not allowed from app:/ParkenMobile.swf
regards,
/Lars