Page 1 of 1

Image in specialFolderPath("resources") - Can't put into Image

Posted: Sat Mar 19, 2022 11:23 am
by Googie85
Hi Guys

I have an image file in specialFolderPath("resources") and I am trying to put it into an Image element. I have tried a lot of things and I know it is probably a simple fix but I have tried everything that I can think of and nothing will work. Any help is welcomed!!

Many Thanks,

Googie.

Re: Image in specialFolderPath("resources") - Can't put into Image

Posted: Sat Mar 19, 2022 11:38 am
by Klaus
Hi Googie85,

what did you try so far?
This should work:

Code: Select all

...
set the filename of img "name of your LC image object" to (specialfolderpath("resources") & "/your image.jpg")
...
Best

Klaus

Re: Image in specialFolderPath("resources") - Can't put into Image

Posted: Sat Mar 19, 2022 11:48 am
by Googie85
Thanks Klaus!!

It works fine, but I am trying to load in a .GIF image. The problem I am having is the image will not animate, rather appears as a still image. Any ideas on how to fix that? I have tried disable and enable image and set the vis of image to true/false.

Thanks!

Googie.

Re: Image in specialFolderPath("resources") - Can't put into Image

Posted: Sat Mar 19, 2022 12:28 pm
by Klaus
Hm, that should work. :D

Try to "start" the animation of the GIF:

Code: Select all

set the repeatcount of img "your gif image" to -1
To stop it use:

Code: Select all

set the repeatcount of img "your gif image" to 0
If that does not work, I am out of ideas...

Re: Image in specialFolderPath("resources") - Can't put into Image

Posted: Sat Mar 19, 2022 12:38 pm
by Googie85
Thanks for your reply Klaus!!

It didn't work. I will try something else.

Cheers,

Googie.

Re: Image in specialFolderPath("resources") - Can't put into Image

Posted: Sat Mar 19, 2022 2:35 pm
by SparkOut
I don't know, but maybe the gif needs to be somewhere in a writable location in order for it to be addressed by LC and maintain knowledge of the frame to display.
Try copying the gif image to specialFolderPath ("documents") on first run, then assign it from there.

Re: Image in specialFolderPath("resources") - Can't put into Image

Posted: Sat Mar 19, 2022 5:47 pm
by jacque
You may need to import it directly into the stack. Images called by reference don't always behave the same way.