# Case sensitivity

When you publish files for Flash Player 7, or to Flash Player 6 while using ActionScript 2, ActionScript implements strict case sensitivity. This means that keywords, class names, variables, method names, and so on are all case sensitive. For example, the following statements are not equivalent:

    // Sets properties of two different objects
    cat.hilite = true;
    CAT.hilite = true;
    // Creates three different variables
    var myVar=10;
    var myvar=10;
    var mYvAr=10;

Case sensitivity is supported in different ways depending on the Flash Player version you are targeting and the version of ActionScript you are using. These differences are summarized in the following table. However, no matter which Flash Player you are targeting, it's good practice to follow consistent capitalization conventions, such as those used in this manual, to make it is easier to identify names of functions and variables in ActionScript code.

Because ActionScript is case sensitive, do not use variable names that match built-in ActionScript objects or that match custom classes you have defined. Although you can use variable names that are spelled the same as built-in objects or custom classes, it isn't recommended. Instead, use variable names such as `my_date`, `the_date`, and so on.

    // Allowed, but overwrites built-in Date object, thus deleting all built-in
    // properties and methods
    var Date = new Date();
    // Allowed when publishing to Flash Player 7 or later, but not recommended
    var date = new Date();

If you don't use correct capitalization, your script will have errors or will simply not run correctly. When Colored Syntax is turned on in the Actions panel, keywords written with correct capitalization are blue by default. For more information, see Keywords and "About syntax highlighting" in Using Flash.