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

The place to discuss anything and everything about running your LiveCode on Android

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
Googie85
Posts: 227
Joined: Tue Aug 05, 2014 10:07 am

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

Post 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.
Klaus
Posts: 14324
Joined: Sat Apr 08, 2006 8:41 am
Contact:

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

Post 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
Googie85
Posts: 227
Joined: Tue Aug 05, 2014 10:07 am

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

Post 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.
Klaus
Posts: 14324
Joined: Sat Apr 08, 2006 8:41 am
Contact:

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

Post 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...
Googie85
Posts: 227
Joined: Tue Aug 05, 2014 10:07 am

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

Post by Googie85 »

Thanks for your reply Klaus!!

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

Cheers,

Googie.
SparkOut
Posts: 2984
Joined: Sun Sep 23, 2007 4:58 pm

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

Post 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.
jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7423
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

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

Post by jacque »

You may need to import it directly into the stack. Images called by reference don't always behave the same way.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
Post Reply