• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 9. Controlling Information Flow > Initializing Information

Initializing Information

Variables hold information. You can create, change the contents of, and discard variables at any time. The first time you put information into a variable is called initialization. Initializing a variable in Normal mode of the Actions panel involves the set variable action, which assigns a value to a variable. You can also write out a statement that initializes a variable without using the set variable action as long as you have a variable name on the left side of an equal sign and a value on the right side. This point is crucial, because a=b is not the same as b=a.

You’ve initialized variables before; you just didn’t call it that. When you create new objects by using set variable, as in the statement myColor= new Color (myMovieClip), you initialize the variable myColor. In this case, the variable contains the Color object, but a variable can hold any kind of information, such as a number, letters, a true or false value, or even a reference to another variable. The different kinds of information that variables can contain are known as data types.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint