Path: utzoo!attcan!uunet!jarthur!usc!wuarchive!udel!princeton!pucc.princeton.edu!jonhiga From: jonhiga@pucc.princeton.edu Newsgroups: comp.sys.mac.hypercard Subject: Re: Same-background NEXT/PREV buttons Message-ID: <6723@idunno.Princeton.EDU> Date: 28 Feb 91 21:29:27 GMT References: <8647.27cab58f@jetson.uh.edu> Sender: news@idunno.Princeton.EDU Organization: Princeton CIT AdTech Lines: 35 In article <8647.27cab58f@jetson.uh.edu> inde5py@jetson.uh.edu writes: >Wanted: > >I need help writing a script for NEXT and PREVIOUS buttons in a stack with >several backgrounds in no particular order. I need the buttons to go to the >next or previous card with the same background, with wrap-around from first to >last and vice versa. The buttons are obviously background buttons. Also, is >there a way to disable users from using command- 1,2,3,4 to navigate through >the stack? Thanks for the help! > >(Matthew Mucker INDE5PY@JETSON.UH.EDU) > Try the following handler in your stack script: on domenu choice if choice is "next" then go to next card of this bg else if choice is "prev" then go to prev card of this bg else if choice is not "first" and choice is not "last" then pass domenu end if end domenu Then for your NEXT button script, you can use on mouseUp domenu next end mouseUp and an equivalent handler for the PREVIOUS button. This will disable CMD-1 and CMD-4, and it will make CMD-2 and CMD-3 work exactly like the buttons. -- jonhiga@pucc.princeton.edu