Explain how to control animation from JavaScript code.
- The animation is controlled by starting the execution of Begin() on the Storyboard.
- For example let us name the Storyboard as "animation".
- The process of animation can be started by simply invoking the
sender.findName("animation").Begin();
- The text starts animating and will last forever.
- It provides the following functions to be frequently used in animation programs.
a. setTimeout(function, duration): It calls function after duration milliseconds from now.
b. setInterval(function, duration): It calls function after every duration milliseconds.
c. clearTimeout(setTimeout_variable): It calls and clears any timer set by the setTimeout() functions.