I have 3 buttons that behave like a background on all my cards. These buttons are groups of a button, a text layer and a graphic layer.
I have this code placed on each button, because I cannot seem to get it to work if I put it on a card script.
Code: Select all
on mouseDown
local thisGroup
put the short name of group me into thisGroup
put (thisGroup)
switch (thisGroup)
case "next_btn"
set the icon of button ("navigation_btn") of group ("next_btn") to "button_zwart.png"
go to the next card of stack "registration"
break
case "back_btn"
set the icon of button ("navigation_btn") of group ("back_btn") to "button_zwart.png"
break
case "logout_btn"
set the icon of button ("navigation_btn") of group ("logout_btn") to "button_zwart.png"
break
end switch
end mouseDown
on mouseLeave
call "navWhite" of card "taal" of stack "registration"
end mouseLeave
Ideally, I would like to have the entire mouse Event handling on a stack script, that would seem the most logically to me, but as stated above, I can't get the name of the group, just of the separate elements of which the group consists... (I tried 'target')
Anyone...?
Johan