Go to the Keepers card and create a MobGUI button for Prev, Next, and Play Media. Make a MobGUI Multiline field and name it
mediaURL
. Be sure to uncheck the Auto delete option, so that it keeps the URL data when we change cards. Also uncheck the Editable option. You should now have something looking like the following screenshot:Add these lines to the
mouseUp
handler of the Prev button:if the number of this card is > 5 then go previous end if
Add these lines to the
mouseUp
handler of the Next button. Note that- 1
is used since the last card is the MobGUI card:if the number of this card < the number of cards - 1 then go next end if
Add this line to the Play Media button's
mouseUp
handler:showMedia the mgText of group "mediaURL"
Select the four controls and Group them. Check the box that says Behave like a background. Name the group
keeperbuttons
.Edit the script of the new group. Add this
refresh
handler:on refresh set the...
LiveCode Mobile Development Beginner's Guide (2nd Edition)
LiveCode Mobile Development Beginner's Guide (2nd Edition)
Overview of this book
Table of Contents (15 chapters)
LiveCode Mobile Development Beginner's Guide Second Edition
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Free Chapter
LiveCode Fundamentals
Getting Started with LiveCode Mobile
Building User Interfaces
Using Remote Data and Media
Making a Jigsaw Puzzle Application
Making a Reminder Application
Deploying to Your Device
Extending LiveCode
Index
Customer Reviews