Book Image

LiveCode Mobile Development Cookbook

By : Dr. Edward Lavieri
Book Image

LiveCode Mobile Development Cookbook

By: Dr. Edward Lavieri

Overview of this book

Table of Contents (17 chapters)
LiveCode Mobile Development Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Using buttons for navigation


Buttons are frequently used to navigate between cards. Standard buttons include ones labeled Back and Next. This recipe shows you how to program these buttons.

How to do it...

To navigate using buttons, follow the given steps:

  1. Create a new main stack.

  2. Drag a new button to the stack's card.

  3. Change the name of the new button to Next and add the following code to it:

    go to next card
  4. Create a button named Back and add the following code to it:

    go back 1

How it works...

Card navigation in LiveCode is relatively simply. All of the following commands will work:

go to card "Main"
go to card 3
go to next card
go back 1