Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Adobe Animate 2022 for Creative Professionals

You're reading from   Adobe Animate 2022 for Creative Professionals Implement professional techniques and create vivid animated and interactive content with Animate

Arrow left icon
Product type Paperback
Published in Jan 2022
Publisher Packt
ISBN-13 9781803232799
Length 464 pages
Edition 2nd Edition
Concepts
Arrow right icon
Author (1):
Arrow left icon
Joseph Labrecque Joseph Labrecque
Author Profile Icon Joseph Labrecque
Joseph Labrecque
Arrow right icon
View More author details
Toc

Table of Contents (19) Chapters Close

Preface 1. Section 1 – Getting up to Speed
2. Chapter 1: A Brief Introduction to Adobe Animate FREE CHAPTER 3. Chapter 2: Exploring Platform-Specific Considerations 4. Chapter 3: Settling into the User Interface 5. Chapter 4: Publishing and Exporting Creative Content 6. Section 2 – Animating with Diverse Techniques
7. Chapter 5: Creating and Manipulating Media Content 8. Chapter 6: Interactive Motion Graphics for the Web 9. Chapter 7: Character Design through Layer Parenting 10. Chapter 8: Animating Poses with IK Armatures 11. Chapter 9: Manipulating Warped Objects through Advanced Rigging 12. Chapter 10: Working with the Camera and Layer Depth 13. Section 3 – Exploring Additional Platforms
14. Chapter 11: Developing Web-Based Games 15. Chapter 12: Producing Virtual Reality Content for WebGL 16. Chapter 13: Building Apps for Desktop and Mobile 17. Chapter 14: Extending Adobe Animate 18. Other Books You May Enjoy

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...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image