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

Chapter 9. Creating Menu Effects > Understanding Global Variables in Flash

Understanding Global Variables in Flash

ActionScript allows you to create global variables, which are variables that are accessible on every Timeline and scope within a Flash document. You'll use some in this project's menu.

By putting variables in the global scope, you don't have to worry about providing a fully qualified path to a function in a specific scope. Global variables also allow you to modify values directly rather than having to pass them to a function as an argument and return the modified values. To create a global variable, you use the identifier _global before you type the variable name. You do not use the var syntax when you create a global variable; therefore, to create a global variable, you could type the following:


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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