Book Image

Adobe Animate 2022 for Creative Professionals - Second Edition

By : Joseph Labrecque
Book Image

Adobe Animate 2022 for Creative Professionals - Second Edition

By: Joseph Labrecque

Overview of this book

Adobe Animate is platform-agnostic asset creation, motion design, animation, and interactivity software. Complete with explanations of essential concepts and step-by-step walkthroughs of practical examples, this book will guide you in using Adobe Animate to create immersive experiences by breaking through creative limitations across every medium. We begin by getting up to speed with all that you need to know about Adobe Animate. You'll learn how to get started with Animate as a creative platform and explore the features introduced in its most recent versions. The book will show you how to consume and produce media assets for multiple platforms through both the publish and export workflows. Following this, you’ll explore advanced rigging techniques and discover how to create more dynamic animation with advanced depth and movement techniques. You’ll also find out how to build projects such as games, virtual reality experiences, and apps for various platforms as the book demonstrates different ways to use Animate. Finally, it covers the different methods used to extend the software for various needs. By the end of this Adobe Animate book, you'll be able to produce a variety of media assets, motion graphic design materials, animated artifacts, and interactive content pieces for platforms such as HTML5 Canvas, WebGL, and mobile devices.
Table of Contents (19 chapters)
1
Section 1 – Getting up to Speed
6
Section 2 – Animating with Diverse Techniques
13
Section 3 – Exploring Additional Platforms

Programming the Game with JavaScript

As we mentioned in the previous section, Preparing the game's timeline, stage, and library, since we are targeting the native web with an HTML5 Canvas document, we'll be programming our game with JavaScript. Most code in Animate is bound directly to specific keyframes and is executed when the playhead reaches that frame.

The code we will write is composed of variables and functions. When we want to hold data or change data, we use variables. The first time a variable is declared, we use the var keyword. When we need to group a set of instructions to perform a task, we group them all within a function and then invoke that function when we want to execute the code.

As we start building the code for our game, recall that certain objects exist on the stage already and have been given instance names to allow us to manipulate them. In addition to this, there is a set of objects that only exist within the library and have been given Linkage...