Welcome! Log In Create A New Profile

Advanced

[WM] - Show remote images in ImageControl by swiping

Posted by YogiYang 
[WM] - Show remote images in ImageControl by swiping
April 15, 2019 07:00PM
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]winking smiley
ArrayAdd(garrPhotos, "[encrypted-tbn0.gstatic.com]winking smiley	
ArrayAdd(garrPhotos, "[encrypted-tbn0.gstatic.com]winking smiley	
ArrayAdd(garrPhotos, "[encrypted-tbn0.gstatic.com]winking smiley	
ArrayAdd(garrPhotos, "[okaywhatever.com]winking smiley

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.
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: