So, I've got a section off to the left of my card that I want to slide out in front. It should be hidden by default. This is what I have:
local showOnline
on OpenCard
set the right of group OnlineUsers to the left of this card
put false into showOnline
end OpenCard
on mouseUp
if showOnline is false then
move group OnlineUsers to 96, 332 in 80 milliseconds
put true into showOnline
else
move group OnlineUsers to -96, 332 in 80 milliseconds
put false into showOnline
end if
end mouseUp
This works absolutely fine, apart from the fact that after opening the card, the first click does nothing. After that, it works as it should. Why is this?
First Click does Nothing
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Re: First Click does Nothing
think you need to change local showOnline to Global showonline
also you need to include that in the button script
also:
--cardscript
--button script
also you need to include that in the button script
also:
--cardscript
Code: Select all
global showOnline
on OpenCard
set the right of group OnlineUsers to the left of this card
put false into showOnline
end OpenCard
Code: Select all
on mouseUp
global showonline
if showOnline is false then
move group OnlineUsers to 96, 332 in 80 milliseconds
put true into showOnline
else
move group OnlineUsers to -96, 332 in 80 milliseconds
put false into showOnline
end if
end mouseUp
Re: First Click does Nothing
Fixed it - thanks!