Image control in a Background

Vaughn Clement vclement at
Fri Jun 20 11:23:59 EDT 2014

Hi All

I asked this question recently and I did not get any responses.

I have a substack with a background group where there is an Image Control
is being populated using the

mobilePickPhoto "library"

The image is added to the control correctly and displays, but if I leave
the card and return the image is gone.

To solve this the image is stored in the folder on in the app as per this

*on* mouseUp

   /* the image from mobilePickPhoto uses the template image construct

   set it off screen so we don't see ift flash */

   *set* the loc of the templateImage to -10000,-10000

   /*choose a photo*/

   mobilePickPhoto "library"

   *lock* screen

   *if* the result <> "cancel" *then*

      /* make the filepath to save the chosen image*/

      *put* specialFolderPath("documents") & "/photos/" & the short ID of
this card into thePath

      /* put the image into a file in the photos folder */

      *put* the text of the last image of this card into URL("binfile:" &

      /*set the loc of image 1 to the loc of group "picgroup' so it will

      *--set the loc of  image "imageField1" to the loc of group "picgroup"*

      /* show the image on the card */

      *set* the filename of image "ImageField1" of this card to thePath

      /* destroy the image imported from the library */

      *delete* the last image of this card

   *end* *if*

*end* mouseUp

The image control is supposed load when the card opens and the last photo
is to be displayed?

*on* openCard

   *set* the defaultfolder to specialFolderPath ("documents") & "/photos/"

   *--answer the files*

   *if* the number of this card >1 *then*

      *set* the defaultfolder to specialFolderPath ("documents") &
"/photos/" *then*

         *if* there is a file the short id of this card *then*

            *put* specialFolderPath ("documents") & "/photos/" & the short
ID of this card into thePath

            *set* the filename of image "imegeField1" of this card to

         *end* *if*

      *end* *if*

*end* openCard

Several different changes were tried and the image still will not load into
the card as scripted above.

Can anyone reference the information or see what might cause this issue?

Thank you

Vaughn Clement

Apps by Vaughn Clement (Support)
Skype: vaughn.clement
FaceTime: vclement at
LogMeIn also avaialble
Call on "ooVoo" at address:  vaughnclement or 9282549062
Ph. 928-254-9062

More information about the use-livecode mailing list