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" > <Scripts> <atlas:ScriptReference ScriptName="AtlasUIGlitz" /> </Scripts> </atlas:ScriptManager> Table 7-1 lists the animations implemented in the AtlasUIGlitz.js file.
All of these animations can be used declaratively in xml-script, and most of them can also be accessed programmatically. You'll learn to use both techniques in the following examples. 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 jumps to the next element in an array.
|