Ipad 的 Flash 生成器,从本地文件系统读取图像
我目前正在为 iPad 开发一个应用程序,在其中我从服务器下载一些图像,然后我必须将它们显示到 Spark 图像控制器中(我有一个移动项目) 这些图像毫无问题地写入 File.documentDirectory 中,但是当我尝试将它们引用到 Spark 图像控件时,没有任何内容被加载。 我在图像控件上为 ioerror 事件附加了一个事件侦听器,当触发时,它表示找不到该 url。 我检查了 url 是否正确,因为我在文件系统上测试了它。
在项目开始时,我使用 File.applicationDirectory 和正确加载的图像(为了引用它们,我使用 source="assets/mypicturedir/pict.jpg"),当本地测试时,我什至可以在该文件夹中写入。 不幸的是,当我在 iPad 上部署此方法时,结果发现我无法在该文件夹中写入。所以我开始使用 File.documentsDirectory 并且可以编写图像,但现在我无法从图像容器中引用它们。
您遇到过这个错误吗? 关于如何解决它有什么想法吗?
提前致谢
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 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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我相信您还可以写入:File.applicationStorageDirectory
您可以嵌入资产:
另外,我不确定您是否需要适用于 iOS 的 Spark Image 组件。我相信 iOS 目前不支持 Flex Mobile 项目。
I believe you can also write to: File.applicationStorageDirectory
You could embed the asset:
Also, I'm unsure if you want a Spark Image component for iOS. Flex Mobile projects are currently not supported by iOS, I believe.