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

Preface

LiveCode is a powerful programming environment with an easy-to-use scripting language. As a development environment, LiveCode has the capability to publish apps for both Android and iOS mobile devices. This, coupled with its ability to publish to desktop computers, makes LiveCode a multiplatform development environment.

The number of available mobile development tools continues to increase. Despite the growing number of options, LiveCode's English-like programming language makes mobile app development a more efficient process than that of other development tools. The speed at which we can prototype and provide final apps with LiveCode is impressive.

You'll find this book's recipes a great tribute to LiveCode and, hopefully, a useful reference for you.

What this book covers

Chapter 1, LiveCode Mobile Basics, introduces you to the concepts and steps that are required to set up your computer to develop Android and iOS applications using LiveCode. You'll learn how to set up your development environments, what icons and images are required for the apps you create, how to use the mobile simulator, how to run your apps on physical devices, and how to get your apps into the global marketplace.

Chapter 2, Human-computer Interfaces, demonstrates a variety of human-computer interface objects and how they can be used in your mobile apps. In addition to learning about buttons, cards, input boxes, dialog windows, and geometric shapes, you'll explore password masking, card navigation, and how to change an object's properties.

Chapter 3, Loops and Timers, has you examine the LiveCode scripting required to implement and control count-up and countdown timers. You'll also learn how to use loops to count and iterate through a list.

Chapter 4, Managing Text, offers you a complete coverage of how to manage text to include reading the user input, searching, replacing, combining, encrypting, writing, reading, sorting, formatting, and appending. As a bonus example, this chapter includes the LiveCode scripting required to create the Pig Latin text.

Chapter 5, Communications, shows you how to initiate a phone call from within your mobile apps. You will also learn how to format and send an e-mail.

Chapter 6, Data Structures, explores how to use advance data structures to include arrays (both one- and multidimensional), XML, SQLite, and MySQL.

Chapter 7, External Media, covers everything you need to know about external media for your mobile apps. You'll learn how to load an external image, how to capture an image from a mobile device's camera, how to resize an image, and how to play movie and audio clips.

Chapter 8, Using MobGUI, provides an introduction to using the MobGUI LiveCode plugin to accelerate your mobile app development. This chapter provides hands-on recipes using all of MobGUI's interface objects.

Chapter 9, Using Animation Engine, presents 10 recipes that explore the power of the Animation Engine plugin's capabilities. You'll learn how to move objects, stop objects, change the speed of objects, simulate gravity, and more.

Chapter 10, Miscellaneous, introduces you to LiveCode's mathematical computation abilities. In addition to gaining hands-on experience with math operations, you'll learn how to open and query a web page, how to use the geometry manager, how to use invisible objects, how to detect the user's mobile operating system, and how to take snapshots of cards and specific areas on a card.

What you need for this book

To complete the recipes in this book, you will need to download and install a current license of LiveCode. You can use either a community or professional license version 6.x or higher.

In order to develop mobile apps for Android devices, you'll need to download and install the latest Android SDK. If you are using a Windows computer, you'll also need to have the Java SDK.

If you are developing iOS mobile apps, you'll need to download the Apple iOS SDK and Xcode. Both of these tools are available to you as an Apple developer.

Configuring your computer for use with LiveCode is pretty straightforward when you are developing for iOS devices. This is true for Windows, Mac, and Linux machines. When developing for Android devices, the configuration process can be a bit more difficult on a PC running Windows than on a Mac. Please consult the LiveCode documentation if you run into any problems.

To complete the recipes in Chapter 8, Using MobGUI, you'll need to have a copy of the MobGUI LiveCode plugin. For Chapter 9, Using Animation Engine, you'll need a copy of the Animation Engine plugin.

Chapter 1, LiveCode Mobile Basics, will help you download and install these software tools on your development computer.

LiveCode is available for Mac OS, Windows, and Linux based computers. The user interface for each version is slightly different. The examples and images in this book are from Mac OS.

Who this book is for

This book is written for anyone who wants to get started with developing mobile apps using LiveCode. Some knowledge of the LiveCode integrated development environment (IDE) and scripting language is assumed, although the recipes were written in a manner that allows pure novices, as well as experienced developers, to follow the steps. No experience with developing mobile apps is required to start using this book.

Conventions

In this book, you will find a number of styles of text that distinguish between different kinds of information. Here are some examples of these styles, and an explanation of their meaning.

Code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles are shown as follows: "Create a text entry field and name it fldUsername."

A block of code is set as follows:

go to card "Main"
go to card 3
go to next card

When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:

answer quote & englishWord & quote & " is " &quote & pigLatinWord & quote\

New terms and important words are shown in bold. Words that you see on the screen, in menus or dialog boxes for example, appear in the text like this: "Select Mobile Support from the left navigation pane of the Preferences window."

Note

Warnings or important notes appear in a box like this.

Note

Tips and tricks appear like this.

Reader feedback

Feedback from our readers is always welcome. Let us know what you think about this book—what you liked or may have disliked. Reader feedback is important for us to develop titles that you really get the most out of.

To send us general feedback, simply send an e-mail to , and mention the book title via the subject of your message.

If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide on www.packtpub.com/authors.

Customer support

Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.

Downloading the example code

You can download the example code files for all Packt books you have purchased from your account at http://www.packtpub.com. If you purchased this book elsewhere, you can visit http://www.packtpub.com/support and register to have the files e-mailed directly to you.

Errata

Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in one of our books—maybe a mistake in the text or the code—we would be grateful if you would report this to us. By doing so, you can save other readers from frustration and help us improve subsequent versions of this book. If you find any errata, please report them by visiting http://www.packtpub.com/submit-errata, selecting your book, clicking on the errata submission form link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata will be uploaded on our website, or added to any list of existing errata, under the Errata section of that title. Any existing errata can be viewed by selecting your title from http://www.packtpub.com/support.

Piracy

Piracy of copyright material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works, in any form, on the Internet, please provide us with the location address or website name immediately so that we can pursue a remedy.

Please contact us at with a link to the suspected pirated material.

We appreciate your help in protecting our authors, and our ability to bring you valuable content.

Questions

You can contact us at if you are having a problem with any aspect of the book, and we will do our best to address it.