Page 1 of 1
using specialfolderpath("engine") as source of image
Posted: Wed Oct 03, 2012 3:49 am
by prexsoccer
i have a lot of image to be use, and I think importing it to the stack will hang the app up, so maybe i can use the specialfolderpath("engine") function.
now the problem is I dont know how to use image using that path, image for my buttons. I was able to use specialfolderpath("engine") & "/sounds/" for my audio clips but i have problem using the the image.
set the icon of btn "backgroud" to specialfolderpath("engine") & "/pictures/bgimage.png"
i dont think the statement above is correct

and would return the path of the image I want

.
can anyone help me with this one?
thank you.
Re: using specialfolderpath("engine") as source of image
Posted: Wed Oct 03, 2012 10:42 am
by Klaus
Hi,
as the dictionary clarely states, you can only use the ID or the NAME
of an (already imported!) image as an icon of a button.
Using the FILENAME of an image does not work.
Best
Klaus
Re: using specialfolderpath("engine") as source of image
Posted: Wed Oct 03, 2012 3:21 pm
by prexsoccer
hi klaus,
so my only option is to import all images in the stack?
But the problem I encounter last time in using lot of images is that it freeze the app in a while.
is there any solution for this?
thank you for you help klaus.
Re: using specialfolderpath("engine") as source of image
Posted: Wed Oct 03, 2012 6:48 pm
by jmburnod
Hi prexsoccer
Is it necessary to use buttons to show all pictures ?
Jean-Marc
Re: using specialfolderpath("engine") as source of image
Posted: Wed Oct 03, 2012 9:07 pm
by Klaus
Hi prexsoccer,
prexsoccer wrote:hi klaus,
so my only option is to import all images in the stack?
If you want to display them in a button as ICON, YES.
Maybe you can use "just" images?
In that case you can set the filename of an image object.
prexsoccer wrote:But the problem I encounter last time in using lot of images is that it freeze the app in a while.
How many images are we talking about?
prexsoccer wrote:is there any solution for this?
Depends on what you want to achieve!
If not all images are shown at once, you could surely use image objects and set their filenames dynamically = when you need it.
Best
Klaus
Re: using specialfolderpath("engine") as source of image
Posted: Fri Oct 05, 2012 8:30 am
by prexsoccer
hi klaus,
i really appreciate your help
ahmmm, I have a bunch of image to use like a thousand images

. I use it for animation purposes.
I made 1 app already for this and its in appstore. its dodong ebook. its made of loads of images to animate its scene. thats why I encounter freeze on it. if you have time, you can check the app and maybe you can help me on the problem

or perhaps a good solution.
thank you.
best regards,
mike
Re: using specialfolderpath("engine") as source of image
Posted: Fri Oct 05, 2012 11:59 am
by Klaus
Hi Mike,
no, I don't have time to check your app, but maybe I can give you some hints.
The first one may not apply, since I don't know anything about your animations!
1. use a movie (mp4 or whatever iOS supports) for "static" animations instead of images, if this is possible!
2. do only load the images that you need for the (or all) animation(s) on the current card!
Setting the filename of images in a "repeat" loop is fast enough for this.
3. this (2.) requires a smart "image management concept", which is essential for your needs.
Know what I mean?
Like creating a list of images (filenames) for each animation and dynamcially load the neccessary images.
Best
Klaus