6.3. Summary
This chapter covered Atlas behaviors such as click and hover, as well as Atlas
|
6.4. For Further Reading
|
Chapter 7. Animations
Nifty transitions between pages or elements make for nice eye
Luckily, Atlas comes with several built-in animations. They are all defined in the
AtlasUIGlitz.js
library. Currently, Internet Explorer DirectX filters are used for the animations; these filtersobviouslyonly work with the Microsoft browser. However, the animations described in this chapter also work on other browsers like the Mozilla brands. And even if some browsers do not support some of the animations, seeing as they are only eye candy, there should be no
In this chapter, you'll learn how to use Atlas animations to change an element's position and opacity. You will also learn which type of animations exist and how they work. |
7.1. Using AnimationsSince the animations reside in an external library, the AtlasUIGlitz.js file must be included manually in any page that uses them. There are several possibilities for including this file. Probably the best way is to add an Atlas ScriptReference element, as shown in the following snippet:
<atlas:ScriptManager runat="server" ID="ScriptManager1">
<Scripts>
<atlas:ScriptReference ScriptName="AtlasUIGlitz" />
</Scripts>
</atlas:ScriptManager>
Table 7-1 lists the animations implemented in the AtlasUIGlitz.js file. Table 7-1. Animations included in AtlasUIGlitz.js library
All of these animations can be used
Every animation has a play() method that starts the animation. The method internally uses a couple of properties defined in the class. The following three properties are the most useful ones:
Whenever a step of the animation is executed, the
setValue()
method is called; what it does is up to its implementation. This method can be implemented by each animation, or else the
setValue()
method of the base animation class in
Sys.UI.Animation
is used. Depending on the animation, the method's implementation involves quite sophisticated calculations or just
|