Reputation: 23
I am working on a Flex 4.5 app tageting Android. In different views the app needs to load and display images which I have deployed as part of the app.
Where do I put these images? And how do I load them?
I am familiar with @Embed for images, but this doesn't seem to be the correct approach in this case. I also know how to load from the file system, but I really don't know how to include my images as part of the app for distribution.
Thanks if you can help.
Gary
Upvotes: 0
Views: 585
Reputation: 48157
This worked for me in a mobile app that I wrote in Flex:
I have the following files:
src/assets/images/myImage.png
src/myApp.mxml
Inside myApp.mxml
I have an image that references the one in the assets:
<s:Image source="../assets/images/myImage.png" />
I have NO idea why I have to go up one directory to make this work as the assets
folder is in the same folder as the MXML file... but this is what worked for me.
Upvotes: 1