Book Image

LiveCode Mobile Development Beginner's Guide (2nd Edition)

Book Image

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
Index

Time for action – making a racecourse


We're going to make a racecourse for little cars to move around. We'll make it out of the stack we've built! First, we need to convert what is on the card into an image that represents walls and spaces:

  1. Using the LiveCode draw tools, add a bunch of objects to the ImageDataTest stack. These are going to be the obstacles in the racecourse.

  2. To create the image we'll need, type this in the message box:

    import snapshot from rect the rect of this stack
  3. The preceding command will take a screenshot of the card window and place it onto the card as a new image control. The new image will overlay the whole card, so will not be noticeable. You can confirm that the image was created and select it with the Project Browser.

  4. Right-click on the image that was created and select Launch Editor. This will open the image in the bitmap editor that you have set in Preferences/General. You will be prompted by LiveCode to select an editor if you haven't previously done so.

  5. In your...