Page 1 of 1

Show Card Command

Posted: Wed Aug 01, 2018 3:18 pm
by Hutchboy
I would like some help understanding how to use the "show card" command properly, especially the variant "show all cards". I've searched the forum and online but haven't found anything relevant.

When I script a button with "on mouseUp show all cards end mouseUp" it either is going through the cards and back to the first so quickly as to be unusable or I am missing how to properly use it. I don't see any modifiers in the command that would let me adjust the speed of display.

I am sure there are other ways to set up a program loop to step through the cards but I am really just trying to understand this simple command and whether there is a useful way to use it it LC.

BTW, I like to convert old hypercard stacks for fun and a button with this script often shows up in HC stacks.

Any advice or examples would be greatly appreciated.

Mike

Re: Show Card Command

Posted: Wed Aug 01, 2018 3:26 pm
by Klaus
Hi Mike,

welcome to the forum!

I never used this command, but essentially it was made to use a stack as some kind of flipbook/animation tool. This has been in LC since version 1 and I guess this is still here for nostalgia. :-)

I guess since this version, which came out in 2001, the machines have actually HEAVILY evolved
and that is the reason we can hardly see any card if issuing this command nowadays.
I am only guessing, but that makes sense to me.


Best

Klaus

Re: Show Card Command

Posted: Wed Aug 01, 2018 5:01 pm
by Hutchboy
Klaus,

Thanks for the quick response. I thought that might be the case but hoping that maybe I was missing something in how to use it. Even in HyperCard running on Sheepshaver the show command cycles through the cards extremely fast.

I think I will just find or create an alternate handler with parameters so I can loop through the cards of a stack with a variable delay.

Happy coding,
Mike

Re: Show Card Command

Posted: Wed Aug 01, 2018 6:00 pm
by dunbarx
These commands are indeed from HC, dating to version 1.0. They were used to animate a slideshow. But I do not think that LC supports this command to the extent HC did. For example, you cannot insert a visual effect in the process, so that there is no timing control available. Showing all cards takes only an instant.

Craig Newman

Re: Show Card Command

Posted: Wed Aug 01, 2018 8:15 pm
by FourthWorld
dunbarx wrote:
Wed Aug 01, 2018 6:00 pm
These commands are indeed from HC, dating to version 1.0. They were used to animate a slideshow. But I do not think that LC supports this command to the extent HC did. For example, you cannot insert a visual effect in the process, so that there is no timing control available. Showing all cards takes only an instant.
I don't think HC included options for visual effects with the show command.

According to HyperTalk 2.2: The Book (Winkler, Kamins, DeVoto), the show command only had these options:

Code: Select all

show [numberOfCards|marked|all] cards
On p551 the authors do provide an example of how to use visual effects, but it's done there as Mike proposed above, using a custom handler instead of using the show command.

Re: Show Card Command

Posted: Wed Aug 01, 2018 9:38 pm
by dunbarx
Hmmm.

I think you are right.

Craig

Re: Show Card Command

Posted: Thu Aug 02, 2018 3:57 pm
by jacque
I think another difference is that HC managed stacks on disk and LC keeps everything in RAM which runs much faster. Then as machines got faster so did the card display. That's usually an improvement except in cases like this one.

Re: Show Card Command

Posted: Thu Aug 02, 2018 4:35 pm
by dunbarx
Jacque.

I made a 100 card stack in HC. Disk management notwithstanding, the "show all cards" command took 15 ticks.

So unless the flip book that one was making required a frame rate 20 times faster than old movies had, it seems that a delay parameter in that command is sorely needed.

Craig

Re: Show Card Command

Posted: Thu Aug 02, 2018 11:32 pm
by capellan
Hi Mike,

Mike wrote:
Any advice or examples would be greatly appreciated.
You could download this stack with a card flipbook animation example:
https://drive.google.com/file/d/0B9ja3Y ... Awb1k/view

This stack displays:

1) an animated gif inside a background group
with the Dynamic Layer property set.
Control the Dove position using the keyboard:
QWE
A S
ZXC

2) a 20 cards flip animation that plays
when you press the mouse button
inside the photo or stack background.

In this version, you could use sliders to control the speed
and movement step of the animated gif.

Check the handler runAnim in the stack script.
It uses "go next" to show the next card with a new background image
and "send" to control animation speed.
http://docs.runrev.com/Command/send
http://livecode.byu.edu/time/timeDelay.php

By the way, I have been away for a while from the forums and mail list so:
Does exists a Livecode version of HyperCard's Train set?

https://www.mrericsir.com/blog/personal ... portfolio/

Al
animation stack screenshot.JPG

Re: Show Card Command

Posted: Thu Nov 30, 2023 2:59 pm
by PaulDaMacMan
I know this thread is 5 years old, but I just found it and would interject.
ShowAllCards, originating from HyperCard which ran on Moto 68K CPUs at less then 1MHz clock speed, IIRC the command simply visits every card (or range or marked cards only) as if the stack user had navigated to them, which means an 'on openCard' message gets sent by 'the engine' for each card. So to control the speed for 'frames' (cards) of a flip book animation you could put a (back then blocking-only) 'wait' delay in the card's openCard handler (or maybe use a 'background' script to effect all cards with that background, which people who've converted HC to LC know, is equivalent to LC's shared 'Group').