Tutorials Books Videos Forums

Change the theme! Search!
Rambo ftw!

Customize Theme


Color

Background


Done
Look, an author!

Commenting Your Code

by ilyas usal   | filed under Flash and ActionScript

Most of the best programmers on the world will tell you that: always comment on your code. For yourself and for the others. This is absolutely vital. Personally, before writing any line of code, I write in commentary everything I want to do. All the functions, and what they are doing.

It is a very good habit because it gives you a clear idea of what you have to do, if you want to modify something a year later, you'll be happy to know what all your functions do, and if you give your fla to someone, it will be a great help for him to understand it.

There are two ways to comment:

// This is a commentary, but it
// only works on 1 line.

And the other:

/* I can put as many things as I want,
on as many lines as I want */

Of course, any code put in there will NOT be executed. That's why it is also useful for debugging your code (you can try to take out parts that might not work in order to test the fla).

Just a final word before we wrap up. What you've seen here is freshly baked content without added preservatives, artificial intelligence, ads, and algorithm-driven doodads. A huge thank you to all of you who buy kirupa's books, became a paid subscriber, watch the videos, and/or interact on the forums.

Your support keeps this site going! 😇

- pom

The KIRUPA Newsletter

Thought provoking content that lives at the intersection of design 🎨, development 🤖, and business 💰 - delivered weekly to over a bazillion subscribers!

SUBSCRIBE NOW

Creating engaging and entertaining content for designers and developers since 1998.

Follow:

Popular

Loose Ends

:: Copyright KIRUPA 2026 //--