1. Home
  2. Computing & Technology
  3. Animation

Flash Tip: Commenting Out ActionScripts

By , About.com Guide

2 of 2

Don’t forget, when you’re commenting out code to remove its functions from your compiled scripts, to comment out every line. If you just comment out the first line, Flash will read the rest of the code as valid but missing parameters, and you’ll get syntax errors and some rather unexpected results. Inactive code should be grey, and similar in format to this:
// onClipEvent (enterFrame) {
// pos = pos+(Math.random()*1) ;
// this._x = this._x+Math.sin(pos) ;
// this._y = this._y+1+Math.random()*5;
// if (this._y>600){
// this._y = this.y-650+Math.random()*600;
// this._x = -50+Math.random()*950;
// }
// }

You’ll notice that each individual line has the double backslash (//) in front of it.

To make code active again, just delete the double backslash.

Explore Animation
About.com Special Features

Holiday Central

What to eat, where to go, fun things to do and how to save money on the perfect gifts. More >

Family Tech Center

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. 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.