LiveCode Mobile Development Beginner's Guide
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 ha...