Hello,
I am trying to implement image viewing where in user will be able to view images by swiping Left or Right.
These images are residing on a remote web server.
Here is the actual code
//Global Variables
garrPhotos is array of string
gnItemDisplayed is int
gnMaxImages is int
//End of Initialization Code
ArrayAdd(garrPhotos, "[okaywhatever.com]
ArrayAdd(garrPhotos, "[encrypted-tbn0.gstatic.com]
ArrayAdd(garrPhotos, "[encrypted-tbn0.gstatic.com]
ArrayAdd(garrPhotos, "[encrypted-tbn0.gstatic.com]
ArrayAdd(garrPhotos, "[okaywhatever.com]
gnMaxImages = ArrayCount(garrPhotos)
HourGlass(True)
gnItemDisplayed = 1
IMG_NoName1 = garrPhotos[gnItemDisplayed]
HourGlass(False)
//Code in Horizonta and Vertical Swipe event
IF Gesture.Direction = LeftToRight THEN
IF gnItemDisplayed < gnMaxImages THEN
gnItemDisplayed = gnItemDisplayed + 1
ELSE
gnItemDisplayed = gnMaxImages
END
END
IF Gesture.Direction = RightToLeft THEN
IF gnItemDisplayed > 1 THEN
gnItemDisplayed = gnItemDisplayed - 1
ELSE
gnItemDisplayed = 1
END
END
IMG_NoName1 = sURL + garrPhotos[gnItemDisplayed]
The code placed in the end of Initialize event works and the image is loaded but when I swipe the images are not getting loaded.
What mistake am I making here?
TIA
--
Yogi Yang
Edited 2 time(s). Last edit at 04/15/2019 07:02PM by YogiYang.