Discover millions of ebooks, audiobooks, and so much more with a free trial

Only $11.99/month after trial. Cancel anytime.

LiveCode Mobile Development Beginner's Guide
LiveCode Mobile Development Beginner's Guide
LiveCode Mobile Development Beginner's Guide
Ebook536 pages2 hours

LiveCode Mobile Development Beginner's Guide

Rating: 0 out of 5 stars

()

Read preview

About this ebook

In Detail

LiveCode is a tool for developing mobile apps designed for those who don't want to use Objective-C, C++ or Java. Although it is a tool full of rich features to create apps it can be challenging to get beyond the basics and build interactive and fun apps. Using this book, you can develop various apps and this book guides you through 'till you upload the apps in the appstore.

"LiveCode Mobile Development Beginner's Guide" will explain how to create applications with the easiest, most practical cross platform framework available, Livecode Mobile and upload the apps to the appstore with minimal effort.

Throughout the book, you'll learn details that will help you become a pro at mobile app development using LiveCode. You begin with simple calculator application and quickly enhance it using LiveCode Mobile. Start by learning the interface controls for videos and images of LiveCode's environment. Dig into configuring devices, building user interfaces, and making rich media applications, then finish by uploading the mobile applications to App Stores. You will learn how to build apps for devices such as iPhone, Android with the recently developed LiveCode Mobile through sample applications of increasing complexity.

Approach

This book will follow a tutorial style, starting from basic LiveCode coding concepts to its real-world implementation. It will teach developers how to use this new framework to develop interactive, cross-platform mobile applications.

Who this book is for

If you are a developer, consultant or student looking to create fast, scalable mobile applications, then this book is for you. Basic knowledge of programming such as understanding variables, expressions, control structures and functions is required.

LanguageEnglish
Release dateJul 26, 2012
ISBN9781849692496
LiveCode Mobile Development Beginner's Guide
Author

Colin Holgate

Colin Holgate was originally trained as a telecommunications technician in the Royal Air Force, but with the advent of the personal computer era he transitioned to working as a technical support engineer for companies that included Apple Computer UK. In 1992 he moved to the USA, to become a full time multimedia programmer, working for The Voyager Company. In that role he programmed several award winning CD-ROMs, including A Hard Day's Night and This Is Spinal Tap. For the last 12 years Colin has worked for Funny Garbage, a New York City based web design company. In addition to using Adobe Director and Adobe Flash for online and kiosk application, he has used LiveCode for in-house production tools. At the introduction of LiveCode for Mobile at the RunRevLive Conference in 2011, Colin entered, and won a contest to create a mobile application made with LiveCode.

Related to LiveCode Mobile Development Beginner's Guide

Related ebooks

Internet & Web For You

View More

Related articles

Reviews for LiveCode Mobile Development Beginner's Guide

Rating: 0 out of 5 stars
0 ratings

0 ratings0 reviews

What did you think?

Tap to rate

Review must be at least 10 words

    Book preview

    LiveCode Mobile Development Beginner's Guide - Colin Holgate

    Table of Contents

    LiveCode Mobile Development Beginner's Guide

    Credits

    About the Author

    About the Reviewers

    www.PacktPub.com

    Support files, eBooks, discount offers and more

    Why Subscribe?

    Free Access for Packt account holders

    Preface

    What this book covers

    What you need for this book

    Who this book is for

    Conventions

    Time for action — heading

    What just happened?

    Pop quiz — heading

    Have a go hero — heading

    Reader feedback

    Customer support

    Downloading the example code

    Errata

    Piracy

    Questions

    1. LiveCode Fundamentals

    Background history and metaphors

    You do have LiveCode, don't you?

    Learning the lay of the land

    Main windows

    Time for action — it's a drag, but you'll like it!

    What just happened?

    Creating a hierarchy

    Stack structure

    Where code goes

    Time for action — making and navigating between cards

    What just happened?

    Pop quiz — best name?

    Making a simple calculator application

    Inspector clues, oh…

    Time for action — making the calculator buttons

    What just happened?

    Verbosity, synonyms, and me

    Adding the card handlers

    Variable types in LiveCode

    Pop quiz — try to remember…

    Extending the calculator

    Have a go hero — getting to the root of things

    Other interface controls

    Video player control

    Still image control

    Rollover buttons

    Many More Controls…

    Debugging

    RunRev's online tutorials

    Summary

    2. Getting Started with LiveCode Mobile

    iOS, Android, or both?

    Becoming an Android developer

    Android Market

    Amazon Appstore

    Pop quiz — when is something too much?

    Downloading the Android SDK

    Installing Android SDK on Mac OS X (Intel)

    Installing Android SDK on Windows

    Pointing LiveCode to the Android SDK

    Pop quiz — tasty code names

    Becoming an iOS developer

    Pop quiz — iOS code names

    Installing Xcode

    Pointing LiveCode to the iOS SDKs

    Before we can make our first mobile app

    Getting ready to test for Android

    Time for action — starting an Android virtual device

    What just happened?

    Connecting a physical Android device

    Using a Kindle Fire

    Time for action — adding a Kindle Fire to ADB

    What just happened?

    Getting ready to test for iOS

    Time for action — using the iOS simulator

    What just happened?

    Appiness at last!

    Time for action — testing a simple stack in the simulators

    What just happened?

    Time for action — testing a simple stack on devices

    What just happened?

    Have a go hero — Nook

    Further reading

    Summary

    3. Building User Interfaces

    Setting up a test bed mobile app

    Time for action — making the test bed stack

    What just happened?

    Invoking the desktop e-mail application

    Time for action — calling the native e-mail application

    What just happened?

    Installing the e-mail test onto devices

    Time for action — trying test bed stack on devices

    What just happened?

    Opening a web page

    Time for action — calling the native browser application

    What just happened?

    Mobile-only, date picker

    Time for action — showing a date picker

    What just happened?

    Mobile-only, loading pictures

    Time for action — loading pictures

    What just happened?

    Pop quiz — getting the big picture

    Making OS styled buttons

    Using bitmaps

    Time for action — using Photoshop to prepare button states

    What just happened?

    Pop quiz — the cost of things these days

    MobGUI to the rescue!

    Time for action — getting started with MobGUI

    What just happened?

    Test bed app, the MobGUI way

    Time for action — using MobGUI to make a test bed app

    What just happened?

    MobGUI native controls

    Time for action — using native controls from MobGUI

    What just happened?

    Have a go hero — other tests and pretty icons

    Adjusting things for different screen sizes

    Layout using a resize handler

    Time for action — simple code layout example

    What just happened?

    Layout using the LiveCode Geometry Manager

    Time for action — using the Geometry Manager to position buttons

    What just happened?

    Layout using MobGUI

    Time for action — using MobGUI to remember layouts for us

    What just happened?

    Have a go hero — other sizes

    Further reading

    Summary

    4. Using Remote Data and Media

    Stack structure

    Code driven and manually created layouts

    Locations for code

    Pop quiz — name that structure

    Loading and saving external data

    Querying a URL

    Reading and writing to a text file

    Using another stack to store data

    Time for action — creating a data save stack

    What just happened?

    Pop quiz — other special places

    Creating a web scraper app

    Time for action — setting up tab navigation

    What just happened?

    The Browser card

    Time for action — adding the browser controls

    What just happened?

    The Links card

    Time for action — making a links extraction function

    What just happened?

    The missing links

    One more thing…

    Time for action — adding the Links card init handler

    What just happened?

    The Text card

    Time for action — setting up the Text card

    What just happened?

    The Media card

    Time for action — extracting a list of media links

    What just happened?

    Time for action — setting up the Media card scripts

    What just happened?

    The Keepers card

    Time for action — setting up the Keepers card

    What just happened?

    Have a go hero — add some preset locations

    What now?

    Summary

    5. Making a Jigsaw Puzzle Application

    Image data format

    Mystery byte…

    Misusing imageData!

    Time for action — testing a getPixel function

    What just happened?

    Pop-Quiz — how many bits in a byte?

    Simulating lots and lots of buttons

    Time for action — making a map of the United States

    What just happened?

    Pop-Quiz — getting the big picture

    Using maskData for collision detection

    Time for action — making a racecourse

    What just happened?

    Time for action — making a race car

    What just happened?

    Pop-Quiz — calculate this!

    Making a jigsaw puzzle

    Going to pieces…

    Time for action — creating the pieces and choosing an image

    What just happened?

    Time for action — transferring imageData

    What just happened?

    Adding interactivity

    Time for action — setting up touch events

    What just happened?

    Have a go hero — one for the kids

    Summary

    6. Making a Reminder Application

    What is a reminder?

    When?

    Date and time pickers

    Time for action — creating date and time pickers

    What just happened?

    Pop-Quiz — AO (Odd Acronyms!)

    Where?

    Time for action — trying out native location tracking

    What just happened?

    Calculating the distance between two points on Earth

    Pop quiz — what floor is my apartment on?

    What?

    Making the reminders app

    Laying out the cards

    Time for action — creating the reminder app screens

    What just happened?

    Stack level scripts

    Time for action — adding Stack level functions

    What just happened?

    Home card scripts

    Time for action — making the Home card buttons work

    What just happened?

    Creating a location card

    Time for action — making the location card work

    What just happened?

    Reminder entry form

    Time for action — taking in information about the reminder

    What just happened?

    Have a go hero — nice transitions

    Summary

    7. Deploying to Your Device

    Standalone Application Settings

    General

    Stacks

    Copy Files

    iOS

    Build for

    Basic Application Settings

    Icons

    Splash Screens

    Orientation Options

    Custom URL Scheme

    Requirements and Restrictions

    Status Bar

    Android

    Basic Application Settings

    Requirements and Restrictions

    Application Permissions

    User Interface Options

    Building Apps for Beta Testers

    Sending an Android App to testers

    Preparing an iOS App so that it can work on someone else's device

    Creating over the air installers for iOS

    AirLaunch

    BetaBuilder

    TestFlightApp.com

    Creating an app store submission file

    Finding and using the Android Keytool application

    Creating a distribution certificate for iOS

    Uploading to the app stores

    What's similar

    What's different

    Bottom line

    Summary

    A. Extending LiveCode

    The story so far…

    Extending LiveCode

    MobGUI

    tmControl

    DropTools Palette

    mergExt

    Creating your own add-ons

    Custom controls

    Externals

    B. Pop quiz Answers

    Chapter 1, LiveCode Fundamentals

    Pop quiz — best name?

    Pop quiz — try to remember…

    Chapter 2, Getting Started with LiveCode Mobile

    Pop quiz — when is something too much?

    Pop quiz — tasty code names

    Pop quiz — iOS code names

    Chapter 3, Building User Interfaces

    Pop quiz — getting the big picture

    Pop quiz — the cost of things these days

    Chapter 4, Using Remote Data and Media

    Pop quiz — name that structure

    Pop quiz — other special places

    Chapter 5, Making a Jigsaw Puzzle Application

    Pop-Quiz — how many bits in a byte?

    Pop-Quiz — getting the big picture

    Pop-Quiz — calculate this!

    Chapter 6, Making a Reminders Application

    Pop-Quiz — AO (Odd Acronyms!)

    Pop-Quiz — What floor is my apartment on?

    Index

    LiveCode Mobile Development Beginner's Guide


    LiveCode Mobile Development Beginner's Guide

    Copyright © 2012 Packt Publishing

    All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.

    Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.

    Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.

    First published: July 2012

    Production Reference: 1190712

    Published by Packt Publishing Ltd.

    Livery Place

    35 Livery Street

    Birmingham B3 2PB, UK.

    ISBN 978-1-84969-248-9

    www.packtpub.com

    Cover Image by Artie Ng (<artherng@yahoo.com.au>)

    Credits

    Author

    Colin Holgate

    Reviewers

    Björnke von Gierke

    Andreas Rozek

    Acquisition Editor

    Mary Jasmine Nadar

    Lead Technical Editor

    Susmita Panda

    Technical Editors

    Rati Pillai

    Lubna Shaikh

    Project Coordinator

    Leena Purkait

    Proofreader

    Stephen Silk

    Indexers

    Hemangini Bari

    Tejal Daruwale

    Production Coordinator

    Arvindkumar Gupta

    Cover Work

    Arvindkumar Gupta

    About the Author

    Colin Holgate was originally trained as a telecommunications technician in the Royal Air Force, but with the advent of the personal computer era he transitioned to work as a technical support engineer for companies that included Apple Computer UK.

    In 1992 he moved to the USA to become a full time multimedia programmer, working for The Voyager Company. In that role he programmed several award winning CD-ROMs, including A Hard Day's Night and This Is Spinal Tap.

    For the last 12 years Colin has worked for Funny Garbage, a New York City based interactive media design company. In addition to using Adobe Director and Adobe Flash for online and kiosk applications, he has used LiveCode to create in-house and client production tools. At the RunRevLive Conference in 2011, Colin entered and won a contest to create a mobile application made with LiveCode.

    About the Reviewers

    Björnke von Gierke started scripting with HyperCard when he was a teenager. He began to use LiveCode as a hobby and because he wanted to create a computer game, for which he never did any coding. Soon his focus changed to several community initiatives and free add-ons for LiveCode developers, as well as small database applications for local non-profit organizations. By now he has worked and, more importantly, played with LiveCode for more than 10 years.

    Andreas Rozek is a physicist (albeit with many years of experience in EU research projects in the area of multimedia and mobile telecommunications). But, as his hope (namely that Computers should be fun and support people rather than bother or even impede them) still needs to become common reality, he essentially searches - day in, day out - for development environments well suited for the rest of us and tries to construct humane solutions by means of intelligently coupled systems, intuitive operating concepts, attractive user interfaces and fault-tolerant procedures.

    LiveCode is both, a programming language which can easily be used by casual programmers, and a development environment which helps in constructing visually appealing user interfaces for a wide variety of target devices. For that reason, Andreas is glad to have gotten the opportunity to review this wonderful book which should help you in converting your ideas into actual mobile applications.

    www.PacktPub.com

    Support files, eBooks, discount offers and more

    You might want to visit www.PacktPub.com for support files and downloads related to your book.

    Did you know that Packt offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at www.PacktPub.com and as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at for more details.

    At www.PacktPub.com, you can also read a collection of free technical articles, sign up for a range of free newsletters and receive exclusive discounts and offers on Packt books and eBooks.

    http://PacktLib.PacktPub.com

    Do you need instant solutions to your IT questions? PacktLib is Packt's online digital book library. Here, you can access, read and search across Packt's entire library of books.

    Why Subscribe?

    Fully searchable across every book published by Packt

    Copy and paste, print and bookmark content

    On demand and accessible via web browser

    Free Access for Packt account holders

    If you have an account with Packt at www.PacktPub.com, you can use this to access PacktLib today and view nine entirely free books. Simply use your login credentials for immediate access.

    Preface

    Everyone you know has a smart mobile device of some kind. You probably own several! The general idea of having utility applications on a phone is not new, and even cell phone and PDA games have existed for years, but the way that the iPhone used touch instead of a stylus or keyboard, and gestures to reduce the number of steps to do something, was a game changer.

    The iPhone was released in June 2007, and Android OS in September 2008. If you wanted to create something that worked on both platforms you had to learn two development environments and languages; Objective-C for iPhone, and Java for Android.

    In the desktop world there are several development tools that do allow you to publish to both Mac and Windows, as well as Linux in the case of LiveCode. The most successful of these tools are Adobe Director, Adobe Flash, Unity, and LiveCode. Publishing to iOS is being worked on for Director, which will mean that all four tools are also suitable for developing for mobile.

    Those tools have different strengths. In some cases the strengths relate to the nature of the applications you can make, and in other cases it relates to how accessible the tool is to people who are not hardcore programmers. If you want to make a high quality 3D game, Unity would be the best choice, with Director and then Flash as other choices. If you need a lot of character animations, then Flash would be the best choice, with Director being a good alternate.

    If the important thing is how approachable the tool is, then LiveCode wins easily. It's also just as valid a choice for making the majority of apps you might wish to. In fact, for apps that are a set of single screens, as would be the case for most utility apps, as well as for board and puzzle games, LiveCode is better suited than the other tools. It also has better access to native interface elements; with the other tools you usually have to create graphics that resemble the look of native iOS and Android controls, instead of accessing the real thing.

    With its easy to use English-like programming language, and the stack of cards metaphor, LiveCode lets you concentrate more on creating the app you want to make, and less on the technicalities of the development environment.

    What this book covers

    Chapter 1, LiveCode Fundamentals, will introduce you to the LiveCode environment, and to its English-like programming language. Experienced LiveCode users can skip this chapter, but for someone new to LiveCode this chapter will take you through creating a simple calculator app as a way to make you familiar with the various tools and hierarchy of LiveCode.

    Chapter 2, Getting Started with LiveCode Mobile, describes in detail how to set up your Mac or Windows computer so that you are ready to develop and publish mobile apps. This chapter will take you all the way from signing up as an iOS and Android developer, to creating and testing your first LiveCode mobile app.

    Chapter 3, Building User Interfaces, shows how to use some of the standard mobile features, such as date pickers, photo album, and camera. This chapter will also show how to make your own buttons with an iOS look to them, and how to use the LiveCode add-on, MobGUI, to make your life easier!

    Chapter 4, Using Remote Data and Media, discusses the structure of your apps, where to place your code, and how to read from and write to external text files. You will also create a mobile app that is a web-scraper, capable of extracting links and media from a web page, and to show or play media from that page.

    Chapter 5, Making a Jigsaw Puzzle Application, will show you how to process image data, and to use the information to create a color picker, detect regions,

    Enjoying the preview?
    Page 1 of 1