script help
Ben Bock
benbock at msn.com
Fri Mar 17 14:21:05 EST 2006
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". 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.
on preOpenStack
put the number of cds into cardCount
repeat with x = 1 to cardCount
end repeat
put the number of images into imageCount
repeat with y = 1 to imageCount
end repeat
put the ID of image y of cd x into imageNameList --(something is wrong here)
repeat for each line Joe in imageNameList
set the visible of image q to true
end repeat
end preOpenStack
I think part of my problem is that I don't really understand the repeat syntax.
1) is there any design flaw using the wait/hide format?
2) How can I re-write the preOpenStack script to do what I want?
I'll eagerly read any pointers.
Thanks for any help,
Ben
More information about the use-livecode
mailing list