Nice use of video
for hovering there are (as often) several possible ways to do it. One that is not 100% reliable (but most of the time) would be this:
Code: Select all
on mouseEnter
put "mouse is within" && the short name of me into field 1
end mouseEnter
on mouseLeave
put "mouse is not over a button" into field 1
end mouseLeave
Another way is to not use a field, but enter text into the "tooltip" part of the property inspector for each of your buttons.
for changing the stuff that is currently shown on a stack ("stack" can mean various things in Rev, here it is a synonym for window) there's mostly 2 approaches:
showing/hiding groups:
You can group all the objects that belong together, and then set the "visibility" of the group to false/true. This is faster then hiding/showing each object by itself, and also easier to manage in code.
so for a tab button, you could create groups that are named the same as the items that the user can choose in the tabs:
Code: Select all
on menupick thePickedItem thePreviousItem
--first hiding the previous one
hide group thePreviousItem
--now show the one the user clicked on
show group thePickedItem
end menuPick
using cards:
this is easier if you already used hypercard before, as the concept of cards would be known to you. basically each card is a "view", and a card is always part of a stack. you can do various things with cards, like store them for later reference (with "push" and "pop"), or just for hiding stuff from the user (by not giving him a way to navigate to the card).
For a tabbed button, you'd need to put the tabs into a group, and set that groups "backgroundbehavior" to true, and then you'd need to "place" said group onto each card that is part of the tabbed behaviour (this is done automatically if you create a new card). the code could then look like this, if you'd have named your cards the same as all the tabs:
Code: Select all
on menuPick theCurrentChoice
go card theCurrentChoice
end menuPick
I suggest to read all the tearms i mentioned above in the dictionary. Even if it's a bit overwhelming at first, something is bound to stick, and "browsing" trough the terms via the "see also" links is a good way to read about similar, or related topics.