Flash 5: ScriptClips & SmartClips
September 07, 2001
by: Robert Ross
rob@trainingtools.com
User Level - Intermediate 
 
  Download Printable in FullSite

Creating a SmartClip
To create a SmartClip, build the Symbol as you normally would. In this case, we’ve built the ScriptClip called script.alphaFadeIn and we’ve prepared it to be a SmartClip by including a variable without a declared value. Currently, our ScriptClip is a Movie Clip. We need to change its behavior from Movie Clip to SmartClip. To do so, {Right-Click} the Symbol in the Library and select Define Clip Parameters from the context-sensitive menu.

The Clip Parameters Panel appears.

{Click} the Add button ( + Sign at the top of the Panel) to designate the variables used in the Symbol. Flash presents you with a generic variable name (varName) with default values for the Value of the variable, and the type of variable.

{Double-Click} the field called varName in the Name category and input the name of your own variable(s). In this case, I’ve input userValue.

We could also specify a default value in the Value category, but leaving it unspecified defaults to a value of 0. We’ll change the value accordingly when we use an Instance of the SmartClip. We’ll leave the Type category at Default as well, though you can select from Default (numerical or string value), Array, Object, and List. {Click} OK.


What is a Script File? Objective
Building the Script File Using the Script File
Added Flexibility: Using Smart Clips Creating a SmartClip
Using a ScriptClip Conclusion