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

Chapter 5. Syntax and Language Fundamentals > About constants and keywords

About constants and keywords

Constants and keywords are the backbone of ActionScript syntax. Constants are properties with a fixed value that cannot be altered, so they are values that don’t change throughout an application.

Flash includes several predefined constants, which can help simplify application development. An example of constants can be found in the Key class, which includes many properties, such as Key.ENTER or Key.PGDN. If you rely on constants, you never have to remember that the key code values for the Enter and Page Down keys are 13 and 34. Using constant values not only makes development and debugging easier, but it also makes your code easier to read by your fellow developers.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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