Flex help document (html format) creation and use of ASDoc

Source: Internet
Author: User

In recent work, we need to launch the Flex Realspace product developed in the past few months at sp3. We urgently need to prepare help documents. During the previous development, annotations are based on the habit of uninstalling the code, I have not considered the help documentation in the later stages. I have spent so much time on other Flex products of the company using my own package tools. I have checked a lot of information, hope to fulfill your wish through ASDoc.

ASDoc is an API document generation tool provided by adobe. It has already been integrated in Flex Builder. I am using Flex Builder4.6. The usage is as follows;

1. First, configure an environment required for document generation. follow these steps:

Run-> external tools-> external tool Configuration

Click "create STARTUP configuration" to generate the following interface and fill in the following information:

Name: Random. Here is the ASDoc.
Location: select the path of asdoc.exe under your installation directory. my options are D: \ Adobe Flash Builder 4.6 \ Adobe Flash Builder 4.6 \ sdks \ 4.6.0 \ bin \ asdoc.exe.
Working directory: The default value is $ {project_loc}. In this way, the system uses the project where the as class or mxml file is currently opened as the default output project.
Independent Variables: There are a lot of online information about parameters in this field. I will not describe them in detail here.
-Source-path: directory where the code is located (the Chinese directory cannot be used)
-Doc-sources: directory where the file is located (the Chinese directory cannot be used)
-Output: directory of the output document (the Chinese directory cannot be used)
-External-library-path: Expanded Lib path (external swc path) (Chinese directory unavailable)
-Main-title: The title displayed on the homepage of the document. Here I add it as "SuperMap iClient 6R (2012) for Flex Realspace help document"
Here I have written the following three items, the first two must be written.
-Source-path src
-Doc-sources src
-Main-title "SuperMap iClient 6R (2012) for Flex Realspace help document"

2. Documents support Chinese annotations

To make the generated document support Chinese comments, we need to switch to public, encoding-> Other-> select UTF-8. As follows:

3. Run

Click "application" to save it. We can directly click the following operation. At the same time, when you click an application, a shortcut key will be generated in the external tool, which will be convenient in the future, it can be modified again.

At last, the console displays the above information, indicating that the generation is successful. If the red font appears, it indicates that there is an error and the most common error.

[Fatal Error] toplevel. xml: 25186: 244: The value of attribute "defaultValue" must not contain the '<'character.

Error: cocould not create toplevel. xml: The value of attribute "defaultValue" must not contain the '<'character.

The reason is that there is a problem with your comments in some places, such as whether the tag is closed or not, whether some special characters are used, such as >@, <B>. SDK4.x has no errors, but its fault tolerance is poor, and the error prompt is also bad. However, you only need to write according to the rules, you can pass.

The successful files are as follows:

Click index.html in this file to view the generated interface as follows:

Careful readers may find that they generate all the English letters, while I use the Chinese version, and some icons have been changed. Find the installation directory of your own flash builder, there is a folder named templates under D: \ Adobe Flash Builder 4.6 \ Adobe Flash Builder 4.6 \ sdks \ 4.6.0 \ asdoc. In fact, we package what is in this folder, our company has made some modifications and replaced this file so that it can be written in Chinese. It also supports the icons of our company. If you want them, you can leave a message and write your own email.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.