You can write javascript in so many differnet ways. Its a very open langauge with no fixed datatypes, no classes and a ton of differnte coding styles. This makes it quite difficult to create documentation out of a javascript file it self, compared to the similar task using actionscript.

To solve this problem you can do 3 differnt things. You try to handle every possible coding pratice, which is almost impossible, since the language itself has a very open structure. You can tell your user to coding in a specific way, which can be quite anyoing if its isent your way. Finally you can forget all about analyzing the code and rely 100% on the javadoc tags.

I choose the last solution. This means that you have to add slightly more javadoc tags to your code. Actualy, you have to add tags thats not even javadoc tags.

Non javadoc tags
@namespace
If your 'classes' is structured in some namespace alike hieracy, you add a namespace tag. You can also use it for simulation a folder or trre structure for you files.

@class
Yes, its true; you dont have classes in javascript, only objects. The @class tag is used whenever you have a class like element. This is typically functions that has been encapsulated in an object. Thenthe object is the @class

@method
Any function is a method.

@property
A variable that is accesable through a object.

{datatype}
Although you dont define wich datatype your variable is, you usually expects that it is of a certain type. You use the curly brackets to tell the datatype of your, property, method parameter and return value.

>> How to do it - look at the example

The following javadoc tag are supported for 'classes'
@class
@author
@version
@playerversion
@langversion
@copyright
@see
@todo
@since

The following javadoc tag are supported for methods
@method
@param
@return
@see
@todo
@since

The following javadoc tag are supported for properties
@property

Besides that it supports the generel description in the beginning of a javadoc comment.

Javadoc is not just for Ortelius
Javadoc is a general standard. So if you decide to use another documentation generating tool than Ortelius, you can switch right away.