mfv@PacBell.COM (Michael Vargo) (10/05/90)
Okay, my first post to this group. Put down those flame throwers!! I see you over there. I have a stack of flash cards (what a classic) and I want to randomize them for review. The trick is I would prefer not to actually shuffle the cards, but to create a list of random indexes to the cards that I could find with. Ug, What I mean is each card has an index number, and I want to generate a list of numbers that I can sequentially find in the index field of the stack. How can I generate these numbers? I have been thinking about using random but I don't want any repeats. I want to use HyperTalk to do this. Part 2: How can I selectively hide parts of the background. I can hide the fields no sweat, and also buttons etc. How about paint background stuff. I don't want to erase it, only to hide it. Should I put a opaque button over it?? PS: I'm glad all the 2.0 hullaballo (I like to spell it too!) is tapering off. I hope Apple sees that as a compliment that so many people are involved in using a very flexible product.
jdevoto@Apple.COM (Jeanne A. E. DeVoto) (10/05/90)
In article <5431@ptsfa.PacBell.COM> mfv@PacBell.COM (Michael Vargo) writes: >I have a stack of flash cards (what a classic) and I want to randomize them >for review. The trick is I would prefer not to actually shuffle the cards, >but to create a list of random indexes to the cards that I could find with. >Ug, What I mean is each card has an index number, and I want to generate a >list of numbers that I can sequentially find in the index field of the >stack. How can I generate these numbers? Probably the simplest way to accomplish this is to put a list of your index numbers in a handy hidden field somewhere, then use something like the following handler: on goToRandomCard global indexList if indexList is empty then put field "Hidden" of card 1 into indexList put random(the number of lines of indexList) into indexLine go card (line indexLine of indexList) delete line indexLine of indexList end goToRandomCard Note that this handler restarts the sequence if you've already been to all the cards (and hence all the lines of indexList have been deleted). To avoid this, you can either load the field contents into the global on openStack (and delete the second line of the above handler) or use a boolean flag to indicate whether you've already been through the list. >How can I selectively hide parts of the background. I can hide the fields >no sweat, and also buttons etc. How about paint background stuff. I >don't want to erase it, only to hide it. Should I put a opaque button over >it?? You can cause the entire graphics layer to appear or disappear using the syntax show [card|background] picture [of <card identifier>|<background identifier>] hide [card|background] picture [of <card identifier>|<background identifier>] For instance, show card picture -- of the current card hide background picture of background "foo" If you want to hide just a portion of the card or background picture, an opaque button is the usual solution. -- ========= jeanne a. e. devoto ======================================== jdevoto@apple.com | You may not distribute this article under a jdevoto@well.sf.ca.us | compilation copyright without my permission. ______________________________________________________________________ Apple Computer and I are not authorized | CI$: 72411,165 to speak for each other. |
kenk@tellabs.com (Ken Konecki) (10/06/90)
In article <5431@ptsfa.PacBell.COM> mfv@PacBell.COM (Michael Vargo) writes: >Part 2: > >How can I selectively hide parts of the background. I can hide the fields >no sweat, and also buttons etc. How about paint background stuff. I >don't want to erase it, only to hide it. Should I put a opaque button over >it?? Close. Put a foreground picture on it. Then you can do something like hide card picture and show card picture To show and hide the background respectively. Cheers, -Ken K -- Ken Konecki "Eat well, stay fit, and die anyway" e-mail:kenk@tellabs.com -or- ...!uunet!tellab5!kenk U.S. Mail: 1271 Portchester Circle, Carol Stream, IL 60188