Now, having set an identifier, the div containing the marquis text now has a class name of wlby_1 marquis. The name of the identifier has been appended to the div class. Adding Basic Interactivity | 41 Now that this has been done, you can easily reference the marquis text using JQuery in order to add interactivity. html"; }); } This is a bit of JavaScript and JQuery that takes your marquis object and tells a function to fire when the marquis is clicked.
Each snowflake has to be held separately in memory, and then each one must be translated during each step of the animation. Another approach that could accomplish something very similar is to create one large image with snowflakes of different designs, sizes, and rotations, and simply animate it so that it moves downward, thus creating the illusion of falling snow. This approach requires much less effort on behalf of the browser and would allow you to create several additional animated elements in your animation before reaching its performance limitations.
Although this is what you sought to achieve, it’s hardly the extent to which you can add interactivity to your animation. With a greater understanding of JavaScript and JQuery, as well as some knowledge of the generated code from your animation, there are seemingly vast possibilities as to what you can do with your animation. Now go forth and have fun creating your own HTML5 animations and exploring all the possibilities! 42 | Chapter 5: Using Wallaby Animations About the Author Ian McLean is a Flash platform enthusiast, speaker, and technical writer who has been building enterprise applications for over 10 years.