Home / Articles / Compose an Animated HTML5 Greeting with Adobe Animate CC

Compose an Animated HTML5 Greeting with Adobe Animate CC

This chapter will build on everything you’ve learned so far, but we’ll take things in a different direction from previous projects by authoring content that runs natively in the browser without the need for Flash Player. We’ll also delve deeper into aspects of the library and symbols while introducing some new tools.

This project involves the traditional web-based greeting card (Figure 4.1), but with a twist: the client wants you to design the card in such a way that it can be accessed via a web browser on a desktop, mobile device, or other similar means. In other words, since the browser-based Flash Player is widely available only on desktop browsers, in order to hit mobile targets we’ll need to deploy using a native HTML5 target. Luckily, Adobe Animate CC includes a number of target-platform document types suited specifically to this task.

Figure 4.1

Figure 4.1 The greeting you’ll create in this chapter

Creating a New HTML5 Canvas Document

star.jpg ACA Objective 1.4
star.jpg ACA Objective 2.1

Content created in Animate CC can be published directly to a number of modern HTML5 formats, including Canvas and WebGL. The primary document type that allows this publish target is HTML5 Canvas. When creating content using this publish target, Animate CC leverages the CreateJS JavaScript libraries to output an entire animation or interactive project for the HTML5 canvas element.

Setting up the project document

The first thing you’ll do is create a new document by doing one of the following:

  • On the Welcome screen, select HTML5 Canvas as your document type.

  • Choose File > New to open the New Document dialog box (Figure 4.2). In the Type list, select HTML5 Canvas.

    Figure 4.2

    Figure 4.2 The New Document dialog box

Animate CC opens a new document, which initially looks exactly the same as the documents we’ve already worked with. You should note a number of differences, however:

  • First, notice that in the General tab of the New Document dialog box, the name of the file is appended with the (Canvas) qualifier. This lets you know that you’re working in that particular document type. ActionScript-based projects have no such qualifier.

  • A couple of tools in the Tools panel are disabled: the 3D Rotation tool (p0091_01.jpg) and the 3D Translation tool (p0091_02.jpg).

  • If you select the Text tool (p0091_03.jpg), you’ll notice that you can only choose Static Text or Dynamic Text. Input text Type is disabled.

  • When viewing Document Properties, you’ll see that a lot of options under the Publish area are disabled because they pertain only to ActionScript-based projects.

Otherwise, creating and animating content targeting HTML5 Canvas should be nearly identical to what you have already encountered.

Preparing the Stage and timeline

Before creating any assets in the greeting card project, you’ll do some work on configuring the Stage and other project fundamentals.

  1. In the Properties panel (Figure 4.3), set the Stage width to 550 pixels and the height to 400 pixels. This is the normal Animate CC default, so there may not be anything to change depending on your preferences.

    Figure 4.3

    Figure 4.3 Configuring the Stage in the Properties panel

  2. Make sure FPS is set to a value of 24 and choose a background color that suits you. I choose black most of the time, but in this project, I’ll select a cheery orange color instead. You’ll be drawing a background anyhow, so it doesn’t matter all that much.

  3. Moving on to the timeline, rename the present layer BG. This is where you will draw your project background.

  4. Use the New Layer button (p0092_01.jpg) to create an additional layer and name it Frame (Figure 4.4). This layer will contain assets that make up the basic background elements of your project.

    Figure 4.4

    Figure 4.4 Frame layer added

  5. Save the document in a location that makes sense to you.

    Even though you’re using a different document type in this project, Animate CC treats the file the same way, even saving it in the same FLA file format.

2. Laying Out the Background Elements | Next Section

There are currently no related articles. Please check back later.