Can cards in a stack be of different sizes
sanke at hrz.uni-kassel.de
Mon Nov 3 11:52:07 CST 2003
On Sun, 2 Nov 2003, Alex Rice <alex at mindlube.com wrote:
> On Nov 2, 2003, at 3:46 PM, Wilhelm Sanke wrote:
> > Sure, they can:
> > Have a look at the Glossary stack. All cards have different sizes.
> > In the preopencard handler you may find some hints:
> I've looked, and I have no idea where you pulled that code from. What
> you show above is just "change the size of the stack window as we go
> along". So yes, you can fake it but the stack has to be resized by
> scripting, right?
> Alex Rice
As I indicated, I pulled the code from the preopencard handler, but this
handler is contained in the *stack* script of stack "revdocsglossary".
Here is another example of the implementation of a stack with different
- set the backdrop to black (or any color)
- create a black transition card in your stack
- store the height of the individual card in a custom property
- navigate from one marked card to the other
stack script of the sample stack:
set the loc of me to the screenloc
set the backdrop to black
go to card "black"
visual effect barn door open
set the height of this stack to the cdheight of cd 1
go to cd 1
forward button of navigation group on each card:
put the cdheight of next marked cd into newheight
put the ID of the next marked cd into cardID
put the top of this stack into savedtop
visual effect wipe right slowly to black
go to card "black"
set the height of this window to newheight
set the top of this stack to savedtop
visual effect wipe left slowly
go to cd ID cardID
The last script assumes that the top of the stack should remain at the
If you want to center each card then substitute "set the top of this
stack to savedtop" by "set the loc of this stack to the screenloc" - or
set the loc of the stack to any other central point for the stack.
More information about the use-livecode