开发者

Flash builder for Ipad, reading images from local filesystem

I'm currently developing an application for Ipad in which I download some images from my server and then i have to display them in to a spark image controller (i have a mobile project) The images are wrote in the File.documentDirectory without problemi, but when i make attempts to refer them into a spark image control nothing is loaded. I attached an event listener on the image control for the ioerror event, and when fired it says that the url is not found. I checked the url is correct because i tested it on the fileystem.

At the beginning of the project I was using the File.applicationDirectory and the images where correctly loaded ( to refer them i was using source="assets/mypicturedir/pict.jpg") and when locally tested I could even write in that folder. Unfortunately when I deployed this method on the iPad it turned开发者_JAVA百科 out that I cannot write in that folder. So I started using the File.documentsDirectory and I could write the images, but now i can't refer them from the image container.

Have you ever encountered this error? Any ideas on how resolve it?

Thanks in advance


I believe you can also write to: File.applicationStorageDirectory

You could embed the asset:

[Embed(source="assets/file.png")]
private var _class:Class;

Also, I'm unsure if you want a Spark Image component for iOS. Flex Mobile projects are currently not supported by iOS, I believe.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜