Image control in a Background

Vaughn Clement vclement at gmail.com
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
script:


*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:" &
thePath)

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

      *--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
thepath

         *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)
*http://www.appsbyvaughnclement.com/tools/home-page/
<http://www.appsbyvaughnclement.com/tools/home-page/>*
Skype: vaughn.clement
https://secure.join.me/appsbyvclement
FaceTime: vclement at gmail.com
LogMeIn also avaialble
Call on "ooVoo" at address:  vaughnclement or 9282549062
Ph. 928-254-9062



More information about the use-livecode mailing list