ActionScript - Adding Integrated Help
The propietary built-in Flash help viewer is pretty clunky and not particularly useful.
However, it is fairly easy to add basic support.
Table of Contents
The propietary viewer has 4 parts
In case you haven't guessed, I don't think much of propietary viewers ...
but this one does have a nice tree view. By the way, the search is terrible
... really third rate.
|Main help display
||On the right
||Displays an html file
||On left, Top
||This has a Text Field, Search button, and a Clear button
||On left, below Search Field
||This ComboBox displays the contents of categories.xml
||On left, lower part of the frame
||This is the main navigation aid - controlled by the help_toc.xml files,
one per directory
Controlling the Tree Display
- book tag
| Simple Procedure
Controlling the Tree Display
On my system, the Flash built in help is located at
C:\Documents and Settings\All Users\Application Data\Adobe\Flash CS3
The Book Selector ComboBox (used to select which sections to see) is defined in
The text displayed in the Tree View is specified in the
files - one for each subdirectory / section / book.
controls what is displayed in the Book Selector ComboBox.
When one of the options is selected, the keyword
is used to control what is displayed in the Tree View
just below it.
This file is fairly simple to understand -
the following example is based on the actual file.
||This is displayed in the Book Selector ComboBox
||This is used to limit the contents of the Tree View
Every top level help directory contains a help_toc.xml file
- What is shown in the Tree View
- What order the entries are in
- What html file should be displayed
For all practical purposes, help_toc.xml has 2 sections
- The book tag - describes the main entry and controls when it will be displayed
- The level tags - one for each additional entry
help_toc.xml - book tag
The book tag (the second line) controls what is displayed
at the top level of the
help tree display. (The following example is formatted to improve readability.)
title = "ActionScript 3.0 Language and Components Reference"
directory = "ActionScriptLangRefV3"
categories = "languagereferences,as3,components3"
language = "en"
version = "3.0"
sort = "mm_3"
||This is displayed at the top level of the Tree View
||Just the directory your files are located in
||These control what is displayed when a category is selected
from the ComboBox - they match the keywords in categories.xml.
When you create a directory, add 3rdparty
||This controls the position of the entry in the Tree View -
the existing directories use "mm_1" through "mm_16", "mm_a" will be first
||The rest are self explanitory
help_toc.xml - level tags
Under the main heading, the level tags define the
Levels are numbered 1 thru 4 (and perhaps higher) and contain 2 parameters
Example (from "ActionScriptLangRefV3\help_toc.xml" - slightly modified to be more readable)
Because this is xml, you can add spaces and tabs between elements as you see fit ...
they will be ignored.
||This is displayed in the Tree View
||The name of the associated html file
Because the parameters are named, their order is not important.
I assume that Adobe is using some kind of help generation program
to automatically generate these files from tags inside their *.as files
and a different tool for help not specific to classes.
- The code I've seen
- The lack of formatting in some xml files
- The use of Tabs in some xml files
- The fact that the parameter order varies
To add your own help
The xml files are only read when Flash starts ... you must restart Flash
to see the changes.
- Create a directory
- Create (copy and modify) an help_toc.xml file
- Create html files
Author: Robert Clemenzi -