Skip to content

Instantly share code, notes, and snippets.

@uliwitness
Last active November 21, 2015 15:33
Show Gist options
  • Save uliwitness/ca0c81e6b6b4a2d4db0d to your computer and use it in GitHub Desktop.
Save uliwitness/ca0c81e6b6b4a2d4db0d to your computer and use it in GitHub Desktop.
How to flip through cards in HyperCard.
-- 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