Comment sections of code

Code comments are parts of code that the ActionScript compiler ignores. A comment lines explains what your code is doing, or temporarily deactivates code that you don’t want to delete. Comment a line of code by beginning it with a double slash (//). The compiler ignores all text on that line after the double slash. You can also comment larger blocks of code by placing a slash and asterisk (/*) at the beginning of the block and an asterisk and slash (*/) at the end of the block.

You can type these comment markers manually, or you can use buttons at the top of the Actions panel or Script window to add them.

Comment a line of code

  1. Place the insertion point at the beginning of the line or at the character where you want the comment to begin.
  2. Click Apply Line Comment  at the top of the Actions panel or Script window.

A double slash (//) is placed at the insertion point.

Comment multiple lines of code

  1. Select the lines to comment. (The first and last lines of the selection can be partial lines.)
  2. Click Apply Block Comment  at the top of the Actions panel or Script window.

Block comment characters are placed at the beginning (/*) and end (*/) of the selection.

Remove a comment

  1. Place the insertion point in the line that contains the comment, or select the block of code that is commented.
  2. Click Remove Comment .

  This page on the Web