using specialfolderpath("engine") as source of image
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
-
- Posts: 29
- Joined: Fri Jun 08, 2012 9:54 am
using specialfolderpath("engine") as source of image
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.
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
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
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
-
- Posts: 29
- Joined: Fri Jun 08, 2012 9:54 am
Re: using specialfolderpath("engine") as source of image
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.
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.
-
- VIP Livecode Opensource Backer
- Posts: 2718
- Joined: Sat Dec 22, 2007 5:35 pm
- Location: Genève
- Contact:
Re: using specialfolderpath("engine") as source of image
Hi prexsoccer
Is it necessary to use buttons to show all pictures ?
Jean-Marc
Is it necessary to use buttons to show all pictures ?
Jean-Marc
https://alternatic.ch
Re: using specialfolderpath("engine") as source of image
Hi prexsoccer,
Maybe you can use "just" images?
In that case you can set the filename of an image object.
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
If you want to display them in a button as ICON, YES.prexsoccer wrote:hi klaus,
so my only option is to import all images in the stack?
Maybe you can use "just" images?
In that case you can set the filename of an image object.
How many images are we talking about?prexsoccer wrote:But the problem I encounter last time in using lot of images is that it freeze the app in a while.
Depends on what you want to achieve!prexsoccer wrote:is there any solution for this?
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
-
- Posts: 29
- Joined: Fri Jun 08, 2012 9:54 am
Re: using specialfolderpath("engine") as source of image
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
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
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
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