Image not showing in emulator
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Image not showing in emulator
Hi,
I added an image area in my app and loaded a picture through the properties. When i ran it in the Android 2.3 emulator there was no image. Does the image file itself need to be in a certain folder to be included? I must have missed something.
Thanks,
Warren
I added an image area in my app and loaded a picture through the properties. When i ran it in the Android 2.3 emulator there was no image. Does the image file itself need to be in a certain folder to be included? I must have missed something.
Thanks,
Warren
Re: Image not showing in emulator
Hi,
The most secure way is to import a picture using File/Import As Control/Image File... You could also include the image in the standalone package (see the Files tab in the standalone application settings window) and use relative file paths in the properties inspector.
Kind regards,
Mark
The most secure way is to import a picture using File/Import As Control/Image File... You could also include the image in the standalone package (see the Files tab in the standalone application settings window) and use relative file paths in the properties inspector.
Kind regards,
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
Re: Image not showing in emulator
Thanks. Ill have to go in the LiveCode program and wheee all of that is.
Warren
Warren
Re: Image not showing in emulator
So if I use the Source property in the property inspector this will not work? I selected the image with the file selection and it shows in design mode. Then in the emulator it does not. If this is not the way to do it, then why do they let me select and show the image this way?
Thanks,
Warren
Thanks,
Warren
Re: Image not showing in emulator
THEY just want to annoy us!WarrenW wrote:...then why do they let me select and show the image this way?

Re: Image not showing in emulator
It works, but the path you chose is on your hard drive somewhere. When you run the app in the emulator, a new app folder is created that contains its own subfolders, including those you assigned in the Copy Files pane. Only those folders and resources are available to your mobile app, and the original path is now out of bounds.WarrenW wrote:So if I use the Source property in the property inspector this will not work? I selected the image with the file selection and it shows in design mode. Then in the emulator it does not. If this is not the way to do it, then why do they let me select and show the image this way?
To accomodate this, assign only relative paths to the images. Keep the images in a subfolder of the one that contains your stack. The source for the image should not be a full file path, but a relative one like "Images/photo.jpg". When you create or simulate the mobile app, be sure to include the Images folder in the Copy Files pane. That will put it where the mobile app can find it, an Images folder will be created inside the emulator app folder, and the relative path will still work.
In the IDE, the relative folder will not be found unless you set the defaultfolder to the one containing your stack. Somewhere in your stack scripts you should do that to ensure the Images folder is recognized.
As Mark suggested, an easier way to handle all this is to just import the image itself into the stack.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com