1. Home
  2. Computing & Technology
  3. Animation

Flash Tip: Commenting Out ActionScripts

By Adrien-Luc Sanders, About.com

1 of 2

One thing that’s essential to any scripting/programming language is the ability to add notes or inactivate code without affecting the existing code or deleting something that might be needed later. Various languages use various markers to identify comments; Flash ActionScripting is no exception.

To insert a comment in ActionScripted code, just put two backslashes (//) in front of it. So a comment explaining the function of a particular block of code might look like this:

//duplicate the snow movie clip up to 250 duplicates
dup = Math.random()*5;
for (dup=0; dup<250; dup++){
duplicateMovieClip(this.snowbit, “snowbit”+dup, dup) ;
}

Flash color-codes ActionScripts so that you can pick out keywords and determine active code; any comments will be grey, rather than black or blue.

Explore Animation
About.com Special Features

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

Easy ways to connect two computers for networking purposes. More >

  1. Home
  2. Computing & Technology
  3. Animation
  4. Flash Animation Tutorials
  5. ActionScripting Basics
  6. Flash Tip: Commenting Out ActionScripts

©2009 About.com, a part of The New York Times Company.

All rights reserved.