This is a discussion on "Tutorial - ActionScript Terminology" within the Flash & Multimedia Forum section. This forum, and the thread "Tutorial - ActionScript Terminology are both part of the Design Your Website category.
|
|
|
|
|
![]() |
||
Tutorial - ActionScript Terminology
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
|||
|
Tutorial - ActionScript Terminology
Here's a quick primer on terminology. These definitions are more or less corect and are intended to orient people who've never touched programming before, or are very new to Object-Oriented programming languages. They are NOT technically exact or complete in every regard. If you already know what these terms mean, then please excuse what may be perceived as imprecise definitions, which are presented here for clarity and brevity.
Variables Convenient places to place data in our code. The name must be not already reserved by Actionscipt and the name starts with a letter, underscore, or dollar sign, but not a number. They are used to store interim info, such as sum of numbers or refer to someting, such as a text field or movie clip. Local variables are preferably declared with the var keyword the first time they are used. Functions Functions are blocs of code that perform a certain action. They are essentially the building blocks of all object oriented programming lanugage. Think of a function as something like a segment containing a group of statements, conditions, etc. Scope A variable's scope describes where the variable can be manipulated by the code in a movie. Scope defines a variable's lifespan and from where in our code we can set or retrieve the value of the variable. A function's scope deterimens where and when the function can be assessed by other code elsewhere. Handler A handler, also referred to as Event Handler, is executed as a response to an event. The event can be anything from mouseclicks, keystrokes to the movement of the playhead in a timeline. Objects and Classes An object is something you can manipulate programmatically in ActionScript, such as a movieclip, graphic object, etc. Objects are instances of classes. That is, a class is a template for creating objects and an object is a particular occurence of that class. A rather good way of imagining it would be in terms of biology : You can consider yourself as an object ( instance ) that belongs to the general class, homo sapiens ( class ) Properties A property is an attribute of an object, which can be read or set. For instance, a movieclip's horizontal location is specified by the _x property, which can be both tested and set. On the other hand, a text field's length property, which indicates the no. of characters in the field, can be tested but cannot be set directly. Statements Actionscript commands are entered as series of one or more statements. A statement might tell the playhead to jump to a particular frame ( gotoandPlay ), or it might change the coordinate / position of a movie clip. Comments Comments are notes within code that are intended for the programmers to read later, to have a memory of what they did earlier. They can be handy in keeping track of large volumes of code too. In Actionscript, single-line comments begin with // and are automatically terminated at the end of the line. Multi-line comments begin with /* and end with */ Interpreter The actionscript intepreter is that portion of the Flash player that examines your code and attempts to understand and execute it. Following ActionScript's strict rules of grammar (syntax ) ensures that the intepreter can easily understand your code. If the intepreter comes up with an error, it usually cause the code to fail silently or malfunction. Directives and Pragma A line of code beginning with a # is called a directive/pragma. They provide special instructions to Flash at compilation time ( when a .fla is converted to a .swf ). The most common directive used is the include directive, or #include, which is used to include ActionScript code contained in another external .as file. Do not include a terminating semicolon or lines of code containing directives or pragma. |
|
|
![]() |
| Tags |
| tutorial, actionscript, terminology |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| a little actionscript | ziggi | Flash & Multimedia Forum | 0 | Sep 18th, 2007 11:46 |
| Computer Terminology/Business Writing Needed | cbrams9 | Job Opportunities | 3 | Sep 15th, 2007 19:58 |
| Actionscript within .NET | timshih | ASP.NET Forum | 0 | Aug 16th, 2007 00:56 |
| actionscript | cressy | Flash & Multimedia Forum | 3 | Jul 24th, 2007 07:29 |
| Actionscript 3.0 | Sgaspar11 | Flash & Multimedia Forum | 7 | May 28th, 2007 18:31 |