Give "Elements" to take a good name [Learning Goals]: Master the skills of the name, know those names are the best, those names are illegal. In the tutorial four and five, we tell you a question: AS can be placed in key, buttons, film clips, and through example let everyone practice, although there is a different code, everyone does not understand, but you can rest assured, we are step by step. Yeah, the tutorial must also master the control of the time axis, that is, the broadcast, stop, move forward, back, I believe everyone understands, is a few common word combinations :) The action script is created through a statement, Control the "actors" in our animation, to complete these operations, we must know who "control" objects, or what is called "Elements", so create and use them, the name is critical. Take a good name, is what we want to do, that is a good name, this need to understand a certain "rule"
It is possible to provide more information with a minimum character. In AS, what we need to be named is very very very, such as a button, a movie clip instance, a text instance, a variable, a function, a class, must be named. First, you can do the characters of the name, four categories: letters, numbers, underscores (_), USD ($). Special requirements: The first character of the name is only three categories of the three categories, underline (_), dollar mark ($), that is, the number is in the beginning, for example, you have made a movie clip is 3 The rose, you are named 3ROSE, you can name Rose_3_mc like this. Second, add a suffix is a good habit
Support auto code prompts you need:
Object type suffix
Array_array button _btn camera _camColor_colorContextMenu_cmTextField_txt ContextMenuItem_cmiCamera_cam date _dateTextFormat_fmtError_errLoadVars_lvLocalConnection_lc microphone _micMovieClip_mcNetStream _nsPrintJob_pj NetConnection _ncSharedObject_soSound_sound String _str Video _videoXML_xmlXMLSocket_xmlsocketXMLNode_xmlnode If you define a name, you can refer to the type of the above, plus a corresponding suffix, so you entered the code is simple, you can get Better tips, reduce your trouble. Third, the case-sensitive case AS2 is subject to the name of the character, and pay attention to this problem. For example, mymc, mymc is two names. Fourth, don't use the same name. Whether it is a definition object or an instance of the MC inside the scene, or the label, etc. cannot be the same. Reduce unnecessary trouble. 5. Do not use the name of the AS system. Some words occupied by the AS system are not available, like keywords, class names, attributes, process names, such as Class, Break, For, Play, etc. Above we introduced the time when you named the name, you need to pay attention to it. In the future, we will have a masterpiece. Everyone should learn how to name this section. Tutorial source:
http://jinjunshi.blogchina.com