Understanding the ActionScript Language > Using ActionScript syntax > Comments |
![]() ![]() ![]() |
Comments
In the Actions panel, use comments to add notes to scripts. Comments are useful for keeping track of what you intended, and for passing information to other developers if you work in a collaborative environment or are providing samples.
When you choose the comment
action, the characters //
are inserted into the script. Even a simple script is easier to understand if you make notes as you create it:
on(release) { // create new Date object myDate = new Date(); currentMonth = myDate.getMonth(); // convert month number to month name monthName = calcMonth(currentMonth); year = myDate.getFullYear(); currentDate = myDate.getDate(); }
When Colored Syntax is turned on in the Actions panel, comments are pink by default in the Script pane. Comments can be any length without affecting the size of the exported file, and they do not need to follow rules for ActionScript syntax or keywords
![]() ![]() ![]() |