Last active
November 21, 2015 15:33
-
-
Save uliwitness/ca0c81e6b6b4a2d4db0d to your computer and use it in GitHub Desktop.
How to flip through cards in HyperCard.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- first approach: | |
-- sadly this causes a deep nested hierarchy where "go" calls "openCard" | |
-- which calls "go", eventually running out of memory. | |
on openCard | |
wait 5 seconds | |
go next | |
end openCard | |
-- second approach: | |
-- idle gets called periodically by HyperCard, but you don't have control over | |
-- the interval (in some HC clones you can set the idleTicks or return a tick interval) | |
on idle | |
global gLastCardChangeTime | |
if gLastCardChangeTime is empty or (gLastCardChangeTime +5) > the seconds then | |
put the seconds into gLastCardChangeTime | |
visual effect wipe left -- or whatever you want | |
go next | |
end if | |
end idle |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment