you need to replace your
GoToStateAction
by something like:
if ExpandedState = True then
GoToStateAction "Reduce"
ExpandedState = False
else
GoToStateAction "Expand"
ExpandedState = True
end if
I let you deal with details
ExpandedState
must be a global variable