You can add comments to a script to describe the particular functionality of a block of code explain a problematic section of code, indicate where to start and end if editing of code at future dates, and so on.
There are two ways of commenting in ActionScript:
1) Single line-- Inserting two forward slashes (//) before a bit of code, will comment out the code for the rest of the line.
2) Multiline- Inserting a forward slash followed by an asterisk(/*) at the start of a block of code, and terminated by and asterisk and a forward slash(*/) at the end of the block of code, will comment out an entire block of code.
Ex:
Single Line comment:
// trace("This statement will NOT display in the output panel");
trace("This statement will display in the output panel");
Multiline comment:
/* trace("This statement will NOT
display in the output panel");
trace("This script is running");*/
comment.fla
We will see about the variables and properties in the next posts.
No comments:
Post a Comment