用compc编译器直接编译
命令:
compc -source-path (源文件路径,不能省略) -output (swc文件路径和名称) -include-classes (类名称)
如:compc -source-path . -output CustomPreloaderSWC.swc -include-classes preload.CustomPreloader

如何导入简单声明文件
如:
<?xml version="1.0"?>
<!-- SimpleManifest.xml -->
<componentPackage>
    
<component id="MyButton" class="MyButton"/>
    
<component id="MyOtherButton" class="MyOtherButton"/>
</componentPackage>

定义一个命名空间:
-namespace http://mynamespace SimpleManifest.xml
引入命名空间:
-include-namespaces http://mynamespace
compc实例:
compc -source-path . -output c:/jrun4/servers/flex2/flex/WEB-INF/flex/user_classes/MyButtons.swc -namespace http://mynamespace SimpleManifest.xml -include-namespaces http://mynamespace
在app如何使用?如下示例:
<?xml version="1.0"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" xmlns:a="http://mynamespace">
    
<a:MyButton/>
    
<a:MyOtherButton/>
</mx:Application>

引入文件
-include-file name path
例如导入gif图片:
compc -include-file logo.gif c:/images/logo/logo1.gif 
posted on 2006-10-28 15:51  FireYang  阅读(3608)  评论(0编辑  收藏  举报