script help
Rob Cozens
rcozens at pon.net
Fri Mar 17 14:44:25 EST 2006
Hi Ben,
> I have a stack that with 141 cards. 40 of the cards have images set
> on a timer :
>
> on openCard
> wait 2 seconds
> hide image "img1"
> end openCard
>
> I need to make an openStack script that will set the images to "show".
Are you sure? If no runtime changes to the stack need be saved, simply
set destroyStack to true and close the stack without saving it. The
next time it is opened the images will all show if the stack was last
saved that way.
If it is compiled as a standalone, it _will_ retain the original state
of the images when the standalone was built.
> My usual lowbrow, untrained approach is to hard code it, which gets
> tedious:
> on closeCard
> show img "img1"
> end closeCard
>
> I want to make a stack script for this easy problem, so that all
> images are set to "visible = true" or "show". I just can't get it
> right.
How about (in the stack script):
on preOpenCard
repeat with x = 1 to the number of images
show image x
end repeat
end preOpenCard
?
Rob Cozens
CCW, Serendipity Software Company
"And I, which was two fooles, do so grow three;
Who are a little wise, the best fooles bee."
from "The Triple Foole" by John Donne (1572-1631)
More information about the use-livecode
mailing list