Swiping between cards - metaphor end-of-the-road?
Richard Gaskin
ambassador at fourthworld.com
Sat Apr 29 15:00:07 EDT 2017
Alejandro Tejada wrote:
> Check this script. This code would be a starting point for a script
> that implement this swiping card feature. Maybe I will try to code it
> myself when my headache ends.
Your headache won't end until your RAM chips arrive. :)\
> After we have 3 images (from previous, current and next card,) the
> script of top image (image of current card) just have to change
> the layer of previous and next card images, depending of movement
> direction:
>
> a) moving the image to left or down or diagonally to the left
> will show the image of next card
>
> b) moving the image to right or up or diagonally to the right
> will show the image of next card
>
> In countries that reads from right to left, like Japan,
> these movements would be reversed.
>
> on mouseup
> lock screen
>
> put the rect of this cd into q
> export snapshot from rect q of this cd to myVar as PNG
> create img
> set the text of it to myVar
>
> go prev -- previous card
> put the rect of this cd into q
> export snapshot from rect q of this cd to myVar as PNG
> go back -- we return to the card where we started
> create img
> set the text of it to myVar
>
>
> go next
> put the rect of this cd into q
> export snapshot from rect q of this cd to myVar as PNG
> go back
> create img
> set the text of it to myVar
>
> put the number of images of this card into w
> put the number of controls of this card into r
>
> set the layer of img (w-2) of this card to r
> -- image of current card is moved to top layer
>
> unlock screen
> end mouseup
I like DIY solutions that don't require waiting for the engine team, but
I wonder how smoothly performant this would feel in actual use?
On modern high-end phones those bitmaps will be pretty big.
--
Richard Gaskin
Fourth World Systems
Software Design and Development for the Desktop, Mobile, and the Web
____________________________________________________________________
Ambassador at FourthWorld.com http://www.FourthWorld.com
More information about the use-livecode
mailing list