This works! By adding
if sStopRequested then exit repeat also at the beginning of the repeat, the wait does go to second screen what we stop the show... Now. The next trick, get a quote to show in between the photos. command startNarrative # store brand image put the long id of img "homeStoryMainImage" of me into sMainImage put path_Assets()& "img/siva-darshan/who-is-siva_1200x800.jpg" into sDefaultImage put FALSE into sStopRequested # from model_Narrative: repeat for each line pPath in sPhotoList if sStopRequested then exit repeat dispatch "loadNewImage" to me with pPath repeat 2 times if sStopRequested then exit repeat wait 1 second with messages end repeat -- for the number of seconds end repeat setDefaultImage end startNarrative Brahmanathaswami On 12/31/18, 5:21 AM, "use-livecode on behalf of Alex Tweedly via use-livecode" <use-livecode-boun...@lists.runrev.com on behalf of use-livecode@lists.runrev.com> wrote: In essence, you want something like the following: (this assumes a capital Q typed to the card will quit the display. It could easily be changed to clicking a button - so long as the mouseUp handler would set the script-local when appropriate). local sStopRequested command playShow local tPhotos put FALSE into sStopRequested put randomPhotoList() into tPhotos repeat for each line L in tPhotos dispatch "loadImage" with L wait 5 seconds with messages if sStopRequested then exit repeat end repeat dispatch "loadImage" with "defaultMainImage" end playShow _______________________________________________ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode