• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 20. ActionScript: Write Scripts > Add comments to ActionScript

Add comments to ActionScript

In ActionScript, text after double slashes (//) is commented text, which Macromedia Flash Player ignores. Commented text often documents script functionality so that other developers can understand your script, but you can also use comments to deactivate sections of your script when debugging. As a best practice, always add comments that explain your scripts.

  • In the Script pane of the Actions panel, place the insertion point at the beginning of the line of code and type // Initialize document to hide screen movie clip. Press Enter (Windows) or Return (Macintosh).

    Text in the Script pane appears as follows:

    // Initialize document to hide screen movie clip.
    this.screen_mc._visible = false;

PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint