This Guide is most relevant to Sencha Animator, 1.x.
Contents
This guide is intended to help you get your hands on Animator controls and take you through basic techniques for building CSS3 Transformation-based animations using the tool. Follow the steps described here to build a simple project composed of a single scene. You add objects, set their properties, and export and run the project when it's complete. It replicates an Adobe Flash animation perfectly with HTML5/CSS3. (See the animation.) Note that although this project involves building only a single scene, many if not most animations will employ multiple scenes.
Before using this guide, do the following:
- Download the project assets. The
assetsfolder contains the images used here; save it to a location that's easy to find. It also contains the fileRocking Boat.anim, which you can open in Animator if you want to see the finished product and preview it in Animator or a browser. - Take the Animator Guided Tour. The steps described here build on the exercises from the Guided Tour.
- Set your system default browser to Safari or Chrome so you can preview the project in a browser supported by Animator.
Start the project
First you should create a new project and set it up.
- Open Animator. This will automatically create a new project for you.
- In the right panel, select Properties and under General, change Dimensions to W: 960 px and H: 540 px. This will enlarge the stage.

- Save the project. Go to File-->Save. Since this is the first time you are saving the project, you will be asked to select a location and name for the project. Choose something that will make it easy to find your project later.
- Be sure to periodically save the project while you work with File-->Save, or by pressing Command+S (MacOSX) or Control+S (Windows).
Add water images
The next steps are to add images to the project’s single scene. We will also name them, put them in the proper front-to-back order, and position them on the Stage.
Importing the first wave image.
- Select the Image Tool (or press I on keyboard) and click anywhere on the stage.

- Under properties, General, change Image property by clicking
…and selecting the imagewater1.pngfrom the assets package that you downloaded.
Set image base properties.
- Select the base state of the image by either double-clicking it on the stage or clicking the purple diamond next to
New Imageobject in the Object Tree. - Name the image. Double click
New Imagename in the Object tree and change it towater light. Alternatively, after selecting the object base state you can change the name in the right panel, under Properties-->General-->Name. - Position the image. In the right panel, under Properties-->Dimensions-->Position, change values to X:
-11px and Y:471px. This sets the location of the upper left corner of thewater lightimage 11 pixels to the left and 471 pixels below the upper left corner of the stage. - Set iterations for infinite. Because we want the waves to roll continuously, we set the animation to repeat indefinitely. To achieve this, under Properties-->General-->Iterations, click the triangle to open additional settings, and tick
Infinite. Alternatively, you can enter0for Iterations, this has the same effect.
After you complete these steps, the Stage should look like this:

Import and set properties for other wave images
Repeat the steps above in order to import and set properties for 2 more wave images.
For water medium:
- Import
water2.png - Set name to
water medium - Set position to X:
-11px and Y:409px - Set iterations to
Infinite. - In object tree, drag the
water mediumbelowwater light, in order to place it behind it.
After you complete these steps, the Stage should look like this:

For water dark:
- Import
water3.png - Set name to
water dark - Set position to X:
-11px and Y:366px - Set iterations to
Infinite. - In object tree, drag the
water darkbelowwater medium, in order to place it behind it.
After you complete these steps, the Stage should look like this:

Animate the water images
Now that the water images have been positioned in the project, make them look like waves by applying a parallax animation effect. Parallax effect is achieved by animating objects that are supposed to appear in the front at faster speeds than objects that are supposed to be more distant. In order to achieve this, water light will move the quickest, while water medium will move more slowly, and water dark even slower.
This animation effect is accomplished by setting two keyframes for each object, with each object's first keyframe set at zero seconds and its second keyframe set at a different time. The second keyframe has to have an offset to its X coordinate of -960, since the images occupy the entire 960 pixel width of the scene and repeat at the 960 pixel mark. Finally, animation easing is set to smooth the animation.
You can always preview an animation by clicking Play button (or pressing Spacebar on keyboard).
Animate water light.
- If the timeline indicator is not placed at 0 seconds, drag it all the way to the left. Alternatively, click the clock, and enter
0to set the indicator to 0 seconds. - Create first keyframe. Select
water light. Create a new keyframe by clicking the button Keyframe State in the right panel, under Properties, and then clicking the diamond icon Add Keyframe. Alternatively, you can add keyframe by clicking the diamond icon on the object on stage, or double clicking the timeline on the spot where you would like to add a keyframe. Creating a keyframe automatically selects it. Keyframes can be selected by clicking them in the timeline. - Set first keyframe easing. In the right panel, under Properties-->General-->Easing, select
Linear. - Create second keyframe. Move the timeline indicator to
4second mark on the timeline. Insert keyframe by clicking the button Keyframe State in the right panel, under Properties, and then clicking the diamond icon Add Keyframe. - Set second keyframe easing. In the right panel, under Properties-->General-->Easing, select
Linear. - Set second keyframe position. In the right panel, under Properties-->Dimensions-->Positions, set X:
-960px.
After you complete these steps, the Stage should look like this:

Animate water medium and water dark.
Repeat the steps above in order to animate water medium and water dark.
For water medium:
- Create first keyframe at
0seconds. - Set first keyframe easing to
Linear. - Create second keyframe at
6seconds. - Set second keyframe easing to
Linear. - Set second keyframe position to X:
-960px.
The Stage should now look like this:

For water dark:
- Create first keyframe at
0seconds. - Set first keyframe easing to
Linear. - Create second keyframe at
8seconds. - Set second keyframe easing to
Linear. - Set second keyframe position to X:
-960px.
The Stage should now look like this:

Add clouds and background
Let’s add a few elements to make the project more interesting and attractive — clouds and a background.
Add clouds image.
Follow the same steps you used to import water images in order to import clouds and then set properties.
- Import
clouds.png - Set name to
clouds - Set position to X:
0px and Y:0px - Set iterations to
Infinite. - In object tree, drag the
cloudsbelowwater dark, in order to place it behind it.
The Stage should look like this:

Animate clouds image.
Follow the same steps as for animating water images in order to animate clouds.
- Create first keyframe at
0seconds. - Set first keyframe easing to
Linear. - Create second keyframe at
15seconds. - Set second keyframe easing to
Linear. - Set second keyframe position to X:
-960px.
Here's what the Stage should look like:

Add Background
To add background, select Rectangle Tool (or press U on the keyboard). Then click on the stage to add a new rectangle.

Select rectangle and change basic properties as follows:
- Set name to
background. - Set dimensions to W:
960px and H:540px, to match the stage size. - Set position to X:
0px and Y:0px. - In object tree, drag the
backgroundbelowclouds, in order to place it behind it.
Next, change the more advanced properties in order to make the background appear more like the sky.
- Turn off border. All rectangle elements initially have a 1 px thick border. This is not needed for the background, so turn it off. In the right panel, under Properties-->Borders, click the purple rectangle to turn off this property.
- Enable color gradient. In order to set gradient, in the right panel, under Properties-->Background-->Gradient, click the purple rectangle to enable this property. The background will instantly color with white-black gradient.
- Set gradient color. In the right panel, under Properties-->Background-->Gradient, click the black square on the right side below the gradient in order to change the color on that end. In the color picker adjust the color to light blue, colorcode
#66ccffby entering the color code under HEX. The color on the other side of gradient should remain white, colorcode#ffffff. - Rotate gradient. Default gradient spans from left to right, but the gradient for the background should span from bottom to top. To adjust this, open additional properties under Properties-->Background-->Gradient, and set Angle to
90deg.
The Stage should now look like this:

Animator gives you a great way to customize backgrounds by setting additional points for changing colors in a gradient and dragging across the color palette to choose colors. For the purposes of this exercise, we’ll stick with these preset HTML color codes and use a two-point, start-end gradient.
Add the boat and make it rock
One last set of things to do: add the boat image and animate it so it rocks. To make the boat rock, use a partial rotation effect. Center the partial rotation just beneath the center of the boat image by setting its origin accordingly. To make it go back and forth, set the animation to go in the opposite direction after it runs, and set the rocking motion so it continues indefinitely. Here’s how to do that:
Add boat image.
Import the boat image and then set properties.
- Import
boat.png - Set name to
boat - Set position to X:
161px and Y:153px - Set iterations to
Infinite.5. - In object tree, drag the
boatbelowwater medium, in order to place it behind water medium, but in front of water dark. This will make the boat appear in the middle of the water.
After setting the basic properties, adjust the rotation point of the boat, as follows:
- In the right panel, under Properties-->Transforms-->Origin, set X:
50% and Y:65%. This will set the rotation point slightly lower, and closer to the bottom of the boat. - Because the animation should go back and forth, in the right panel, under Properties-->General-->Iterations, open the extra properties and tick
Alternate. This will cause the animation to play alternately forward and backward.
The Stage should now look like this:

Animate boat
The boat should rock from left to right. So far all the animations involved changing the position of objects. The next animation modifies the rotation of the image. Here's how to do that:
- Create first keyframe at
0seconds. - Set first keyframe easing to
Ease-in-out. This setting will cause the animation to start out and end slowly. - Adjust rotation. In the right panel, under Properties-->Transforms-->Rotate, set Z:
-5deg. - Create second keyframe at
1seconds. - Set second keyframe easing to
Ease-in-out. - Set rotation to Z:
5deg.
After you complete these steps, the Stage should look like this:

Save your project, and preview the animation.
Export and embed the project
The final steps are to export the code for the project and embed it in a web page.
Exporting is straightforward, but there are a few settings that can be adjusted prior to export. Normally, exported animations will work in Chrome and Safari browsers, but it is possible to add support for Firefox browser. In order to do this, in the right panel, go to Project-->Browser Support and tick Firefox. Leave other options unpicked.

Export project.
In the Menu Bar go to File-->Export Project. Select the folder where you would like the exported project to be saved.
Embed project with iframe.
To embed the project in a web page, set up an <iframe> pointing to the index.html file in the folder you just saved. The <iframe> should look like this:
<iframe src="http://dev.sencha.com/animator/demos/rocking-boat/iframe.html"></iframe>
Exercise
If you look at example animation (See the animation) you will notice that it also includes some fish. The file fish.png is also included in the assets. Using the techniques that you learned above, add two fishes to the scene.
What's next
Now that you've built your first Animator project, you're ready to dig deeper. The place to do that is in the examples and demos in the Animator docs area and in the Animator Reference, which contains instructions about how to use every Animator feature. Start with Animator Reference: Introduction and TOC.
Also, be sure to join the Sencha Animator community, where you can meet Sencha engineers, discuss the ins and outs of creating CSS-based animations with colleagues, and get answers to questions.

3 Comments
Bert Carrein
2 years agoIs it possible to have a stage size which is the full size of your screen? That way I could use devices with other dimensions too.
danbres
1 year agoThe export file works just with chrome. IN firefox and IE the waves are positoned on the top and there is no animation
Emma Lampard
1 year agoCould you give any hint on where to download this software for free? I guess I could use it for giving good animation on my sales presentation. This will truly enhance the marketing liability and attraction.
Leave a comment:
Commenting is not available in this channel entry.