I am just new in livecode. I created a back button and added below code on on mouseup
event. I put the back button inside the Card 5
. On Card 1
, I have code that will go to Card 5
.
The problem is, when I press the back button in Card 5, it always goes to Card 4
. Is this the correct behavior? I was thinking if it should goes to Card 1
which is the previous card. Is there another way to do this?
Thanks for the help.
Code:
go to the previous card
Cards:
Card 1 Card 2 Card 3 Card 4 Card 5
UPDATE:
I have managed to fix my own problem. I created a global variable to store the previous card name and use this line of code go to card "previous card name"
. But if anybody else have better solution, that would be great.