asdoc以及flex namespace
sshong 发表于2013年2月6日 14:48:23 更新于2013年2月6日 23:40:49
好久没用asdoc,都快忘了,今天搜了点资料用了下,写日志备查。

1、asdoc的使用
新建external tool,参数如下
asdoc

新建config xml,如下,可根据需要修改
<?xml version="1.0"?>
<flex-config xmlns="http://www.adobe.com/2006/flex-config">
    <compiler>
        <!--源码路径(包含但不等于最终要导出的类,如可以有依赖的源码等等)-->        
        <source-path>
            <path-element>src</path-element>
            <path-element>E:\dev\flex\mylib\src</path-element>  
        </source-path>
        <!--外部引入的swc文件夹路径-->
        <external-library-path>
            <path-element>C:\Program Files\Adobe\Adobe Flash Builder 4.5\sdks\4.5.1\frameworks\libs</path-element>
            <path-element>C:\Program Files\Adobe\Adobe Flash Builder 4.5\sdks\4.5.1\frameworks\libs\mx</path-element>
            <path-element>C:\Program Files\Adobe\Adobe Flash Builder 4.5\sdks\4.5.1\frameworks\libs\air</path-element>
            <path-element>C:\Program Files\Adobe\Adobe Flash Builder 4.5\eclipse\plugins\com.adobe.flexbuilder.flexunit_4.5.1.313231\flexunitframework\libs\version4libs\FlexProject</path-element>
            <path-element>libs</path-element>
        </external-library-path>
        <!--uri 命名空间-->  
        <namespaces>
            <namespace>
                <uri>http://www.asarea.me</uri>
                <manifest>manifest.xml</manifest>
            </namespace>
        </namespaces>                   
    </compiler>
    <!--最终要导出的类路径-->
    <doc-sources>
        <path-element>src</path-element>
    </doc-sources>
    <!--输出文件夹-->
    <output>asdoc</output>
    <!--页面标题-->
    <window-title>My语言参考文档</window-title>
    <!--文档内顶部标题-->
    <main-title>My API Documentation</main-title>
    <!--文档内底部文字-->
    <footer>© 2013 asarea.me All rights reserved.</footer>
</flex-config>

asdoc具体有哪些参数可以设置,请参考
http://livedocs.adobe.com/flex/3/html/help.html?content=asdoc_9.html#142061

2、自定义uri namespace
不必羡慕
xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx"
,你也可以。
自定义uri namespace只需要加一个manifest.xml验证文件即可。
manifest文件怎么写,可以参看flex sdk里的manifest文件,如“\sdks\4.5.1\frameworks”目录下。

写好了manifest,就可以把你自定义的uri(如http://www.asarea.me)与它绑定。

ui方式如下图(只有library工程才可以):
namespace

后续使用
xmlns:asarea="http://www.asarea.me"
标签:asdocnamespace分类:As3&Flex阅读:2981
评论
暂无评论
添加评论
您的大名,限长10汉字,20英文(*)
电子信箱(*)
您的网站
正文,限长500汉字,1000英文(*)
验证码(*) 单击刷新验证码
联系我
博客订阅