Drawers

Wilhelm Sanke sanke at hrz.uni-kassel.de
Sun Aug 10 18:13:00 EDT 2003


On Sun, 10 Aug 2003  Tuviah M Snyder <diskot123 at juno.com> in response to
my post "drawers" wrote:

> >Create three drawer stacks whose sum of heights is the height of the
> >base stack (or otherwise, if you like).
>
> It is possible..it hasn't been documented for some reason....
>
> drawer "x1" at "right,top" in stack "parent"
> drawer "x2" at "right,center" in stack "parent"
> drawer "x3" at "right,top" in stack "parent"
>
> Same goes for other directions where the syntax is
>
> drawer  [at pintoside,[alignment]]
>
> So you can have multiple drawers on one side.
>
> Tuviah Snyder Runtime Revolution Limited
>
>
Thanks, Tuviah, for the response to my request to further improve the
new "drawer" command.

Looking over the sample stacks we provide for our students being
introduced to Metacard/Revolution I found the following scripts that
simulate drawers (with stacks) and that - unlike the solution with
changing the width of the drawer stack in my last post - provides a
visual effect moving the drawer from underneath to full exposure:

Script in the drawer base ( the calling stack):

on opencard
  open invisible stack "drawer1"
  open invisible stack "drawer2"
  open invisible stack "drawer3"
 end opencard

Button for drawer 1 on the drawer base
(set the topright of drawer 2 and 3 accordingly)

on mouseUp
  put the topright of this stack into cornerRight
  set the topright of stack "drawer1" to cornerRight
  lock screen
#necessary to prevent the flickering when setting vis to true
  set the vis of stack "drawer1" to true
  go to stack "drawer2-base"
# set the calling stack to top so that the drawer will not appear
# above the calling stack, but appear  underneath the calling stack
  unlock screen
  repeat with i = 1 to 254
    add 1 to item 1 of cornerRight
    set the topright of stack "drawer1" to cornerRight
    wait 1 milliseconds
  end repeat
  end mouseUp

Closing the drawers of course the other way round.

If you want to have this "visual effect" of a drawer being opened and
closed like a real drawer, it is important to first open the drawers
invisibly, and then take care that the drawers start from underneath the
base stack and prevent that flickering that occurs when the vis of the
drawer is set the true.

Tuviah, although the undocumented parts of the drawer command you
provide are indeed an improvement in a direction I had in mind, I think
it  is worth mentioning what solutions we have found.

Our common goal, without reservation, is to improve Metacard/Revolution.

Regards,

Wilhelm Sanke




More information about the metacard mailing list