| << | ||
Scripting style used in my tutorial |
||
| My scripts use some of the shorthand
methods of writing scripts which are particularly useful in a competition
where the maximum number of lines are limited. In order for you to understand
the way some of my scripts work you need to understand the following (you
may skip this page and come back to it later if you come across any scripting
construction that is not familiar to you): |
||
| 1. |
Operator assignment a += b; ...is the same as: a = a+b; |
|
2. |
Multiple assignments a = b = c = d = e = 0; ...is the same as: a = 0; b = 0; c = 0; d = 0; e = 0; |
|
3. |
Compounding assignments |
|
4. |
Conditional assignments a = (b > c) ? 5 : 10; ...is the same as: if (b > c) { a = 5; } else { a = 10; } |
|
5. |
Object Definition initObj={_x:50, _y:100}; ...is the same as: initObj = new Object(); initObj._x = 50; initObj._y = 100; |
|
6. |
Using variables in the path to a movie clip |
|
7. |
Using initialisation objects when duplicating or attaching movie
clips |
|