Hello all,
I have been trying for days to sort a problem out, I hope you can advise, I'm at the hobbyist/begginner level. I have learnt much trying to solve this but alas not the problem i need solving.
I have a group of buttons (within another group) one one card, I'm trying to make something happen when the last visible button is clicked
(each button clicked sets it's own visible to false)
That is to say if any one of the buttons is visible then nothing should happen.
Thank you for any advice.
Regards Jon
the visible
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
the visible
I dare not shake the dew drop from a rose lest I disturb the stars.
Re: the visible
Hi Jon,
1. welcome to the forum!
2. check these great resoiurces:
http://www.runrev.com/developers/lesson ... nferences/
3. Maybe call something like this handler in every "mouseup" script of your buttons, right AFTER hiding the buttons.
Like this:
## You can of course use a shorter name for the handler
Hint: You may notice that I did not check "if the visible... = TRUE then..."
If we omit this, then the (quite optiimistic) engine will presume we want to check for true!
Saves some typing
Best
Klaus
1. welcome to the forum!
2. check these great resoiurces:
http://www.runrev.com/developers/lesson ... nferences/
3. Maybe call something like this handler in every "mouseup" script of your buttons, right AFTER hiding the buttons.
Like this:
Code: Select all
on mouseup
## your actions here...
hide me
check_if_all_buttons_are_invisible
end mouseup

Code: Select all
command check_if_all_buttons_are_invisible
## We need to cycle through all buttons and check their state:
put the num of btns of grp "your group here..." into tNum
repeat with i = 1 to tNum
## Any button visible? Then exit the handler!
if the visible of btn i of grp "your group here..." then
exit check_if_all_buttons_are_invisible
end if
end repeat
## All buttons are invisible, do your thing now :-)
your_final_handler_here
end check_if_all_buttons_are_invisible
If we omit this, then the (quite optiimistic) engine will presume we want to check for true!
Saves some typing

Best
Klaus
Re: the visible
Hi Klaus
Thanks for a very quick and helpfull response, I will try it out.
so simple when I look at your code )
thanks again, Jon
Thanks for a very quick and helpfull response, I will try it out.

thanks again, Jon
I dare not shake the dew drop from a rose lest I disturb the stars.