Using Variables for Modular Particle System
Because this was a beginner's tutorial with many things to learn, the particle system was written using specific, hard coded settings for these features. But now that you have completed your particle system, we can make a few changes to the program code that will make it more modular and reuseable.
Rename the Functions
When we were only concerned with learning how to animate our snowflake movie clip, it was easier to name the function that created our snowflakes "snowflake" and the function that animated the snowflakes "snowfall". To make our program more versatile, we need to rename the functions with more generic names that still reflect the purpose of the functions.
Because this is a particle system, another name for the function that creates the snowflake can be "createParticles". Let's rename the snowflake function from "snowflake()" to "createParticles()".
At the top of the Actions panel, you will see a Find and Replace icon. Click on this icon to open the Find and Replace dialog box. In this dialog box, check the option called "Match Case" and use the following values.
Find what: snowflake()
Replace with: createParticles()
You should get a message that two were found and replaced. Repeat this step to rename the second function from "snowfall()" to "particlefall()". Again you will see two have been changed. Close the dialog box and test your movie. It still works.
Copyright 2018 Adobe Systems Incorporated. All rights reserved. Adobe product screen shot(s) reprinted with permission from Adobe Systems Incorporated. Adobe, Photoshop, Photoshop Album, Photoshop Elements, Illustrator, InDesign, GoLive, Acrobat, Cue, Premiere Pro, Premiere Elements, Bridge, After Effects, InCopy, Dreamweaver, Flash, ActionScript, Fireworks, Contribute, Captivate, Flash Catalyst and Flash Paper is/are either [a] registered trademark[s] or a trademark[s] of Adobe Systems Incorporated in the United States and/or other countries.
Editor's Picks Articles
Top Ten Articles
Content copyright © 2018 by Diane Cipollo. All rights reserved.
This content was written by Diane Cipollo. If you wish to use this content in any manner, you need written permission. Contact Diane Cipollo for details.