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

Stopping a moving object


In this recipe, we will create a graphic object and three buttons. The first button will animate the graphic object, the second will stop it, and the third will reset the graphical object to its original position.

Getting ready

Before using this recipe, you will need to have the Animation Engine external downloaded and available on your development computer. See the Setting up Animation Engine recipe discussed earlier in this chapter.

How to do it...

Follow the steps in this recipe to create, animate, and stop an object:

  1. Open LiveCode.

  2. Create a new main stack.

  3. Open the animationEngine stack. With LiveCode already running, you can simply double-click on the animationEngine.livecode file.

  4. Once you complete the previous steps, you will see the animationEngine window with a Use me! checkbox (see the following screenshot). Check that box.

  5. Drag a button to the stack's card, and set the following preferences using the property inspector:

    • Name: myStartButton

    • Label: StartMoving

    • ...