Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!zaphod.mps.ohio-state.edu!mips!apple!uokmax!munnari.oz.au!kaukau.comp.vuw.ac.nz!virtue!ccc_ldo From: ccc_ldo@waikato.ac.nz Newsgroups: comp.sys.mac.hypercard Subject: Re: Hierarchical stack buttons Message-ID: <153.25dc3a88@waikato.ac.nz> Date: 16 Feb 90 06:53:49 GMT References: <529@opus.NMSU.EDU> Lines: 30 Another solution would be to adopt a systematic naming convention for your cards. That is, each card takes the name of its parent, to which it appends something extra unique to this level. Say you've got three layers in the hierarchy: a (the "root" level), b, and c (the "leaf" level). The root-level cards are named "a1", "a2" etc. The cards at level b are named "a1 b1", "a1 b2" etc. And the ones at level c are similarly named "a1 b1 c1", "a1 b1 c2" etc. Then your "up one level" button script becomes something like On MouseUp Get the short name of this card Delete last word of it Go to card it End MouseUp If all your cards share the same background, then the background should contain an OpenCard script, somewhat as follows: On OpenCard Get the short name of this card Set visible of background button "Up one level" to \l (the number of words in it = 1) End OpenCard (insert the appropriate continuation character in place of "\l"). This hides the button if you're already on a root-level card. Hope this works.